diff --git a/build/playcanvas-spine.3.6.js b/build/playcanvas-spine.3.6.js index 7a1ce94..7bd9961 100644 --- a/build/playcanvas-spine.3.6.js +++ b/build/playcanvas-spine.3.6.js @@ -1,4 +1,4 @@ -/* Copyright 2015-2023 PlayCanvas Ltd */ +/* Copyright 2015-2024 PlayCanvas Ltd */ var spine = (function (pc) { 'use strict'; @@ -6329,10 +6329,7 @@ var spine = (function (pc) { f = !0, o = !1; try { - if (i = (t = t.call(r)).next, 0 === l) { - if (Object(t) !== t) return; - f = !1; - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); + if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { @@ -6345,307 +6342,6 @@ var spine = (function (pc) { return a; } } - function _regeneratorRuntime() { - _regeneratorRuntime = function () { - return e; - }; - var t, - e = {}, - r = Object.prototype, - n = r.hasOwnProperty, - o = Object.defineProperty || function (t, e, r) { - t[e] = r.value; - }, - i = "function" == typeof Symbol ? Symbol : {}, - a = i.iterator || "@@iterator", - c = i.asyncIterator || "@@asyncIterator", - u = i.toStringTag || "@@toStringTag"; - function define(t, e, r) { - return Object.defineProperty(t, e, { - value: r, - enumerable: !0, - configurable: !0, - writable: !0 - }), t[e]; - } - try { - define({}, ""); - } catch (t) { - define = function (t, e, r) { - return t[e] = r; - }; - } - function wrap(t, e, r, n) { - var i = e && e.prototype instanceof Generator ? e : Generator, - a = Object.create(i.prototype), - c = new Context(n || []); - return o(a, "_invoke", { - value: makeInvokeMethod(t, r, c) - }), a; - } - function tryCatch(t, e, r) { - try { - return { - type: "normal", - arg: t.call(e, r) - }; - } catch (t) { - return { - type: "throw", - arg: t - }; - } - } - e.wrap = wrap; - var h = "suspendedStart", - l = "suspendedYield", - f = "executing", - s = "completed", - y = {}; - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - var p = {}; - define(p, a, function () { - return this; - }); - var d = Object.getPrototypeOf, - v = d && d(d(values([]))); - v && v !== r && n.call(v, a) && (p = v); - var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); - function defineIteratorMethods(t) { - ["next", "throw", "return"].forEach(function (e) { - define(t, e, function (t) { - return this._invoke(e, t); - }); - }); - } - function AsyncIterator(t, e) { - function invoke(r, o, i, a) { - var c = tryCatch(t[r], t, o); - if ("throw" !== c.type) { - var u = c.arg, - h = u.value; - return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { - invoke("next", t, i, a); - }, function (t) { - invoke("throw", t, i, a); - }) : e.resolve(h).then(function (t) { - u.value = t, i(u); - }, function (t) { - return invoke("throw", t, i, a); - }); - } - a(c.arg); - } - var r; - o(this, "_invoke", { - value: function (t, n) { - function callInvokeWithMethodAndArg() { - return new e(function (e, r) { - invoke(t, n, e, r); - }); - } - return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); - } - }); - } - function makeInvokeMethod(e, r, n) { - var o = h; - return function (i, a) { - if (o === f) throw new Error("Generator is already running"); - if (o === s) { - if ("throw" === i) throw a; - return { - value: t, - done: !0 - }; - } - for (n.method = i, n.arg = a;;) { - var c = n.delegate; - if (c) { - var u = maybeInvokeDelegate(c, n); - if (u) { - if (u === y) continue; - return u; - } - } - if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { - if (o === h) throw o = s, n.arg; - n.dispatchException(n.arg); - } else "return" === n.method && n.abrupt("return", n.arg); - o = f; - var p = tryCatch(e, r, n); - if ("normal" === p.type) { - if (o = n.done ? s : l, p.arg === y) continue; - return { - value: p.arg, - done: n.done - }; - } - "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); - } - }; - } - function maybeInvokeDelegate(e, r) { - var n = r.method, - o = e.iterator[n]; - if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; - var i = tryCatch(o, e.iterator, r.arg); - if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; - var a = i.arg; - return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); - } - function pushTryEntry(t) { - var e = { - tryLoc: t[0] - }; - 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); - } - function resetTryEntry(t) { - var e = t.completion || {}; - e.type = "normal", delete e.arg, t.completion = e; - } - function Context(t) { - this.tryEntries = [{ - tryLoc: "root" - }], t.forEach(pushTryEntry, this), this.reset(!0); - } - function values(e) { - if (e || "" === e) { - var r = e[a]; - if (r) return r.call(e); - if ("function" == typeof e.next) return e; - if (!isNaN(e.length)) { - var o = -1, - i = function next() { - for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; - return next.value = t, next.done = !0, next; - }; - return i.next = i; - } - } - throw new TypeError(typeof e + " is not iterable"); - } - return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { - value: GeneratorFunctionPrototype, - configurable: !0 - }), o(GeneratorFunctionPrototype, "constructor", { - value: GeneratorFunction, - configurable: !0 - }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { - var e = "function" == typeof t && t.constructor; - return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); - }, e.mark = function (t) { - return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; - }, e.awrap = function (t) { - return { - __await: t - }; - }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { - return this; - }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { - void 0 === i && (i = Promise); - var a = new AsyncIterator(wrap(t, r, n, o), i); - return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { - return t.done ? t.value : a.next(); - }); - }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { - return this; - }), define(g, "toString", function () { - return "[object Generator]"; - }), e.keys = function (t) { - var e = Object(t), - r = []; - for (var n in e) r.push(n); - return r.reverse(), function next() { - for (; r.length;) { - var t = r.pop(); - if (t in e) return next.value = t, next.done = !1, next; - } - return next.done = !0, next; - }; - }, e.values = values, Context.prototype = { - constructor: Context, - reset: function (e) { - if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); - }, - stop: function () { - this.done = !0; - var t = this.tryEntries[0].completion; - if ("throw" === t.type) throw t.arg; - return this.rval; - }, - dispatchException: function (e) { - if (this.done) throw e; - var r = this; - function handle(n, o) { - return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; - } - for (var o = this.tryEntries.length - 1; o >= 0; --o) { - var i = this.tryEntries[o], - a = i.completion; - if ("root" === i.tryLoc) return handle("end"); - if (i.tryLoc <= this.prev) { - var c = n.call(i, "catchLoc"), - u = n.call(i, "finallyLoc"); - if (c && u) { - if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); - if (this.prev < i.finallyLoc) return handle(i.finallyLoc); - } else if (c) { - if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); - } else { - if (!u) throw new Error("try statement without catch or finally"); - if (this.prev < i.finallyLoc) return handle(i.finallyLoc); - } - } - } - }, - abrupt: function (t, e) { - for (var r = this.tryEntries.length - 1; r >= 0; --r) { - var o = this.tryEntries[r]; - if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { - var i = o; - break; - } - } - i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); - var a = i ? i.completion : {}; - return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); - }, - complete: function (t, e) { - if ("throw" === t.type) throw t.arg; - return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; - }, - finish: function (t) { - for (var e = this.tryEntries.length - 1; e >= 0; --e) { - var r = this.tryEntries[e]; - if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; - } - }, - catch: function (t) { - for (var e = this.tryEntries.length - 1; e >= 0; --e) { - var r = this.tryEntries[e]; - if (r.tryLoc === t) { - var n = r.completion; - if ("throw" === n.type) { - var o = n.arg; - resetTryEntry(r); - } - return o; - } - } - throw new Error("illegal catch attempt"); - }, - delegateYield: function (e, r, n) { - return this.delegate = { - iterator: values(e), - resultName: r, - nextLoc: n - }, "next" === this.method && (this.arg = t), y; - } - }, e; - } function _typeof(o) { "@babel/helpers - typeof"; @@ -6720,17 +6416,6 @@ var spine = (function (pc) { }; return _setPrototypeOf(o, p); } - function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } - } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); @@ -6745,20 +6430,6 @@ var spine = (function (pc) { } return _assertThisInitialized(self); } - function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - return function _createSuperInternal() { - var Super = _getPrototypeOf(Derived), - result; - if (hasNativeReflectConstruct) { - var NewTarget = _getPrototypeOf(this).constructor; - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - return _possibleConstructorReturn(this, result); - }; - } function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); @@ -6766,11 +6437,11 @@ var spine = (function (pc) { } return object; } - function _get$1() { + function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { - _get$1 = Reflect.get.bind(); + _get = Reflect.get.bind(); } else { - _get$1 = function _get(target, property, receiver) { + _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); @@ -6780,7 +6451,7 @@ var spine = (function (pc) { return desc.value; }; } - return _get$1.apply(this, arguments); + return _get.apply(this, arguments); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); @@ -6819,7 +6490,7 @@ var spine = (function (pc) { function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { - if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { + if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike ) { if (it) o = it; var i = 0; var F = function () {}; @@ -6871,11 +6542,11 @@ var spine = (function (pc) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { - var res = prim.call(input, hint || "default"); + var res = prim.call(input, hint ); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } - return (hint === "string" ? String : Number)(input); + return (String )(input); } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); @@ -6904,7 +6575,7 @@ var spine = (function (pc) { }; this.pcTexture = texture; } - _createClass(SpineTextureWrapper, [{ + return _createClass(SpineTextureWrapper, [{ key: "setFilters", value: function setFilters(minFilter, magFilter) { this.pcTexture.minFilter = TO_TEXTURE_FILTER[minFilter]; @@ -6927,7 +6598,6 @@ var spine = (function (pc) { this.pcTexture.destroy(); } }]); - return SpineTextureWrapper; }(); function getDefaultExportFromCjs (x) { @@ -7017,8 +6687,11 @@ var spine = (function (pc) { createToken('XRANGEPLAINLOOSE', "[v=\\s]*(".concat(src[t.XRANGEIDENTIFIERLOOSE], ")") + "(?:\\.(".concat(src[t.XRANGEIDENTIFIERLOOSE], ")") + "(?:\\.(".concat(src[t.XRANGEIDENTIFIERLOOSE], ")") + "(?:".concat(src[t.PRERELEASELOOSE], ")?").concat(src[t.BUILD], "?") + ")?)?"); createToken('XRANGE', "^".concat(src[t.GTLT], "\\s*").concat(src[t.XRANGEPLAIN], "$")); createToken('XRANGELOOSE', "^".concat(src[t.GTLT], "\\s*").concat(src[t.XRANGEPLAINLOOSE], "$")); - createToken('COERCE', "".concat('(^|[^\\d])' + '(\\d{1,').concat(MAX_SAFE_COMPONENT_LENGTH, "})") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?") + "(?:$|[^\\d])"); + createToken('COERCEPLAIN', "".concat('(^|[^\\d])' + '(\\d{1,').concat(MAX_SAFE_COMPONENT_LENGTH, "})") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?")); + createToken('COERCE', "".concat(src[t.COERCEPLAIN], "(?:$|[^\\d])")); + createToken('COERCEFULL', src[t.COERCEPLAIN] + "(?:".concat(src[t.PRERELEASE], ")?") + "(?:".concat(src[t.BUILD], ")?") + "(?:$|[^\\d])"); createToken('COERCERTL', src[t.COERCE], true); + createToken('COERCERTLFULL', src[t.COERCEFULL], true); createToken('LONETILDE', '(?:~>?)'); createToken('TILDETRIM', "(\\s*)".concat(src[t.LONETILDE], "\\s+"), true); exports.tildeTrimReplace = '$1~'; @@ -7137,7 +6810,7 @@ var spine = (function (pc) { this.build = m[5] ? m[5].split('.') : []; this.format(); } - _createClass(SemVer, [{ + return _createClass(SemVer, [{ key: "format", value: function format() { this.version = "".concat(this.major, ".").concat(this.minor, ".").concat(this.patch); @@ -7215,7 +6888,7 @@ var spine = (function (pc) { do { var a = this.build[i]; var b = other.build[i]; - debug('prerelease compare', i, a, b); + debug('build compare', i, a, b); if (a === undefined && b === undefined) { return 0; } else if (b === undefined) { @@ -7326,7 +6999,6 @@ var spine = (function (pc) { return this; } }]); - return SemVer; }(); var semver$1 = SemVer$3; getDefaultExportFromCjs(semver$1); @@ -7374,727 +7046,76 @@ var spine = (function (pc) { options = options || {}; var match = null; if (!options.rtl) { - match = version.match(re[t.COERCE]); + match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]); } else { + var coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]; var next; - while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) { + while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next; } - re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; + coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length; } - re[t.COERCERTL].lastIndex = -1; + coerceRtlRegex.lastIndex = -1; } if (match === null) { return null; } - return parse("".concat(match[2], ".").concat(match[3] || '0', ".").concat(match[4] || '0'), options); + var major = match[2]; + var minor = match[3] || '0'; + var patch = match[4] || '0'; + var prerelease = options.includePrerelease && match[5] ? "-".concat(match[5]) : ''; + var build = options.includePrerelease && match[6] ? "+".concat(match[6]) : ''; + return parse("".concat(major, ".").concat(minor, ".").concat(patch).concat(prerelease).concat(build), options); }; var coerce_1 = coerce; var coerce$1 = getDefaultExportFromCjs(coerce_1); - var iterator; - var hasRequiredIterator; - function requireIterator() { - if (hasRequiredIterator) return iterator; - hasRequiredIterator = 1; - iterator = function iterator(Yallist) { - Yallist.prototype[Symbol.iterator] = _regeneratorRuntime().mark(function _callee() { - var walker; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - walker = this.head; - case 1: - if (!walker) { - _context.next = 7; - break; - } - _context.next = 4; - return walker.value; - case 4: - walker = walker.next; - _context.next = 1; - break; - case 7: - case "end": - return _context.stop(); - } - }, _callee, this); - }); - }; - return iterator; - } - - var yallist = Yallist$1; - Yallist$1.Node = Node; - Yallist$1.create = Yallist$1; - function Yallist$1(list) { - var self = this; - if (!(self instanceof Yallist$1)) { - self = new Yallist$1(); - } - self.tail = null; - self.head = null; - self.length = 0; - if (list && typeof list.forEach === 'function') { - list.forEach(function (item) { - self.push(item); - }); - } else if (arguments.length > 0) { - for (var i = 0, l = arguments.length; i < l; i++) { - self.push(arguments[i]); - } - } - return self; - } - Yallist$1.prototype.removeNode = function (node) { - if (node.list !== this) { - throw new Error('removing node which does not belong to this list'); - } - var next = node.next; - var prev = node.prev; - if (next) { - next.prev = prev; - } - if (prev) { - prev.next = next; - } - if (node === this.head) { - this.head = next; - } - if (node === this.tail) { - this.tail = prev; - } - node.list.length--; - node.next = null; - node.prev = null; - node.list = null; - return next; - }; - Yallist$1.prototype.unshiftNode = function (node) { - if (node === this.head) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - var head = this.head; - node.list = this; - node.next = head; - if (head) { - head.prev = node; - } - this.head = node; - if (!this.tail) { - this.tail = node; - } - this.length++; - }; - Yallist$1.prototype.pushNode = function (node) { - if (node === this.tail) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - var tail = this.tail; - node.list = this; - node.prev = tail; - if (tail) { - tail.next = node; - } - this.tail = node; - if (!this.head) { - this.head = node; - } - this.length++; - }; - Yallist$1.prototype.push = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - push(this, arguments[i]); - } - return this.length; - }; - Yallist$1.prototype.unshift = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - unshift(this, arguments[i]); - } - return this.length; - }; - Yallist$1.prototype.pop = function () { - if (!this.tail) { - return undefined; - } - var res = this.tail.value; - this.tail = this.tail.prev; - if (this.tail) { - this.tail.next = null; - } else { - this.head = null; - } - this.length--; - return res; - }; - Yallist$1.prototype.shift = function () { - if (!this.head) { - return undefined; - } - var res = this.head.value; - this.head = this.head.next; - if (this.head) { - this.head.prev = null; - } else { - this.tail = null; - } - this.length--; - return res; - }; - Yallist$1.prototype.forEach = function (fn, thisp) { - thisp = thisp || this; - for (var walker = this.head, i = 0; walker !== null; i++) { - fn.call(thisp, walker.value, i, this); - walker = walker.next; - } - }; - Yallist$1.prototype.forEachReverse = function (fn, thisp) { - thisp = thisp || this; - for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { - fn.call(thisp, walker.value, i, this); - walker = walker.prev; - } - }; - Yallist$1.prototype.get = function (n) { - for (var i = 0, walker = this.head; walker !== null && i < n; i++) { - walker = walker.next; - } - if (i === n && walker !== null) { - return walker.value; - } - }; - Yallist$1.prototype.getReverse = function (n) { - for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { - walker = walker.prev; - } - if (i === n && walker !== null) { - return walker.value; - } - }; - Yallist$1.prototype.map = function (fn, thisp) { - thisp = thisp || this; - var res = new Yallist$1(); - for (var walker = this.head; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.next; - } - return res; - }; - Yallist$1.prototype.mapReverse = function (fn, thisp) { - thisp = thisp || this; - var res = new Yallist$1(); - for (var walker = this.tail; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.prev; - } - return res; - }; - Yallist$1.prototype.reduce = function (fn, initial) { - var acc; - var walker = this.head; - if (arguments.length > 1) { - acc = initial; - } else if (this.head) { - walker = this.head.next; - acc = this.head.value; - } else { - throw new TypeError('Reduce of empty list with no initial value'); - } - for (var i = 0; walker !== null; i++) { - acc = fn(acc, walker.value, i); - walker = walker.next; - } - return acc; - }; - Yallist$1.prototype.reduceReverse = function (fn, initial) { - var acc; - var walker = this.tail; - if (arguments.length > 1) { - acc = initial; - } else if (this.tail) { - walker = this.tail.prev; - acc = this.tail.value; - } else { - throw new TypeError('Reduce of empty list with no initial value'); - } - for (var i = this.length - 1; walker !== null; i--) { - acc = fn(acc, walker.value, i); - walker = walker.prev; - } - return acc; - }; - Yallist$1.prototype.toArray = function () { - var arr = new Array(this.length); - for (var i = 0, walker = this.head; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.next; - } - return arr; - }; - Yallist$1.prototype.toArrayReverse = function () { - var arr = new Array(this.length); - for (var i = 0, walker = this.tail; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.prev; - } - return arr; - }; - Yallist$1.prototype.slice = function (from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; - } - from = from || 0; - if (from < 0) { - from += this.length; - } - var ret = new Yallist$1(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - for (var i = 0, walker = this.head; walker !== null && i < from; i++) { - walker = walker.next; - } - for (; walker !== null && i < to; i++, walker = walker.next) { - ret.push(walker.value); - } - return ret; - }; - Yallist$1.prototype.sliceReverse = function (from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; - } - from = from || 0; - if (from < 0) { - from += this.length; - } - var ret = new Yallist$1(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { - walker = walker.prev; - } - for (; walker !== null && i > from; i--, walker = walker.prev) { - ret.push(walker.value); - } - return ret; - }; - Yallist$1.prototype.splice = function (start, deleteCount) { - if (start > this.length) { - start = this.length - 1; - } - if (start < 0) { - start = this.length + start; - } - for (var i = 0, walker = this.head; walker !== null && i < start; i++) { - walker = walker.next; - } - var ret = []; - for (var i = 0; walker && i < deleteCount; i++) { - ret.push(walker.value); - walker = this.removeNode(walker); - } - if (walker === null) { - walker = this.tail; - } - if (walker !== this.head && walker !== this.tail) { - walker = walker.prev; - } - for (var i = 0; i < (arguments.length <= 2 ? 0 : arguments.length - 2); i++) { - walker = insert(this, walker, i + 2 < 2 || arguments.length <= i + 2 ? undefined : arguments[i + 2]); - } - return ret; - }; - Yallist$1.prototype.reverse = function () { - var head = this.head; - var tail = this.tail; - for (var walker = head; walker !== null; walker = walker.prev) { - var p = walker.prev; - walker.prev = walker.next; - walker.next = p; - } - this.head = tail; - this.tail = head; - return this; - }; - function insert(self, node, value) { - var inserted = node === self.head ? new Node(value, null, node, self) : new Node(value, node, node.next, self); - if (inserted.next === null) { - self.tail = inserted; - } - if (inserted.prev === null) { - self.head = inserted; - } - self.length++; - return inserted; - } - function push(self, item) { - self.tail = new Node(item, self.tail, null, self); - if (!self.head) { - self.head = self.tail; - } - self.length++; - } - function unshift(self, item) { - self.head = new Node(item, null, self.head, self); - if (!self.tail) { - self.tail = self.head; - } - self.length++; - } - function Node(value, prev, next, list) { - if (!(this instanceof Node)) { - return new Node(value, prev, next, list); - } - this.list = list; - this.value = value; - if (prev) { - prev.next = this; - this.prev = prev; - } else { - this.prev = null; - } - if (next) { - next.prev = this; - this.next = next; - } else { - this.next = null; - } - } - try { - requireIterator()(Yallist$1); - } catch (er) {} - getDefaultExportFromCjs(yallist); - - var Yallist = yallist; - var MAX = Symbol('max'); - var LENGTH = Symbol('length'); - var LENGTH_CALCULATOR = Symbol('lengthCalculator'); - var ALLOW_STALE = Symbol('allowStale'); - var MAX_AGE = Symbol('maxAge'); - var DISPOSE = Symbol('dispose'); - var NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet'); - var LRU_LIST = Symbol('lruList'); - var CACHE = Symbol('cache'); - var UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet'); - var naiveLength = function naiveLength() { - return 1; - }; var LRUCache = function () { - function LRUCache(options) { + function LRUCache() { _classCallCheck(this, LRUCache); - if (typeof options === 'number') options = { - max: options - }; - if (!options) options = {}; - if (options.max && (typeof options.max !== 'number' || options.max < 0)) throw new TypeError('max must be a non-negative number'); - this[MAX] = options.max || Infinity; - var lc = options.length || naiveLength; - this[LENGTH_CALCULATOR] = typeof lc !== 'function' ? naiveLength : lc; - this[ALLOW_STALE] = options.stale || false; - if (options.maxAge && typeof options.maxAge !== 'number') throw new TypeError('maxAge must be a number'); - this[MAX_AGE] = options.maxAge || 0; - this[DISPOSE] = options.dispose; - this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false; - this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false; - this.reset(); + this.max = 1000; + this.map = new Map(); } - _createClass(LRUCache, [{ - key: "max", - get: function get() { - return this[MAX]; - }, - set: function set(mL) { - if (typeof mL !== 'number' || mL < 0) throw new TypeError('max must be a non-negative number'); - this[MAX] = mL || Infinity; - trim(this); - } - }, { - key: "allowStale", - get: function get() { - return this[ALLOW_STALE]; - }, - set: function set(allowStale) { - this[ALLOW_STALE] = !!allowStale; - } - }, { - key: "maxAge", - get: function get() { - return this[MAX_AGE]; - }, - set: function set(mA) { - if (typeof mA !== 'number') throw new TypeError('maxAge must be a non-negative number'); - this[MAX_AGE] = mA; - trim(this); - } - }, { - key: "lengthCalculator", - get: function get() { - return this[LENGTH_CALCULATOR]; - }, - set: function set(lC) { - var _this = this; - if (typeof lC !== 'function') lC = naiveLength; - if (lC !== this[LENGTH_CALCULATOR]) { - this[LENGTH_CALCULATOR] = lC; - this[LENGTH] = 0; - this[LRU_LIST].forEach(function (hit) { - hit.length = _this[LENGTH_CALCULATOR](hit.value, hit.key); - _this[LENGTH] += hit.length; - }); - } - trim(this); - } - }, { - key: "length", - get: function get() { - return this[LENGTH]; - } - }, { - key: "itemCount", - get: function get() { - return this[LRU_LIST].length; - } - }, { - key: "rforEach", - value: function rforEach(fn, thisp) { - thisp = thisp || this; - for (var walker = this[LRU_LIST].tail; walker !== null;) { - var prev = walker.prev; - forEachStep(this, fn, walker, thisp); - walker = prev; - } - } - }, { - key: "forEach", - value: function forEach(fn, thisp) { - thisp = thisp || this; - for (var walker = this[LRU_LIST].head; walker !== null;) { - var next = walker.next; - forEachStep(this, fn, walker, thisp); - walker = next; - } - } - }, { - key: "keys", - value: function keys() { - return this[LRU_LIST].toArray().map(function (k) { - return k.key; - }); - } - }, { - key: "values", - value: function values() { - return this[LRU_LIST].toArray().map(function (k) { - return k.value; - }); - } - }, { - key: "reset", - value: function reset() { - var _this2 = this; - if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { - this[LRU_LIST].forEach(function (hit) { - return _this2[DISPOSE](hit.key, hit.value); - }); + return _createClass(LRUCache, [{ + key: "get", + value: function get(key) { + var value = this.map.get(key); + if (value === undefined) { + return undefined; + } else { + this.map.delete(key); + this.map.set(key, value); + return value; } - this[CACHE] = new Map(); - this[LRU_LIST] = new Yallist(); - this[LENGTH] = 0; - } - }, { - key: "dump", - value: function dump() { - var _this3 = this; - return this[LRU_LIST].map(function (hit) { - return isStale(_this3, hit) ? false : { - k: hit.key, - v: hit.value, - e: hit.now + (hit.maxAge || 0) - }; - }).toArray().filter(function (h) { - return h; - }); - } - }, { - key: "dumpLru", - value: function dumpLru() { - return this[LRU_LIST]; } }, { - key: "set", - value: function set(key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE]; - if (maxAge && typeof maxAge !== 'number') throw new TypeError('maxAge must be a number'); - var now = maxAge ? Date.now() : 0; - var len = this[LENGTH_CALCULATOR](value, key); - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - _del(this, this[CACHE].get(key)); - return false; - } - var node = this[CACHE].get(key); - var item = node.value; - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) this[DISPOSE](key, item.value); - } - item.now = now; - item.maxAge = maxAge; - item.value = value; - this[LENGTH] += len - item.length; - item.length = len; - this.get(key); - trim(this); + key: "delete", + value: function _delete(key) { + if (this.map.has(key)) { + this.map.delete(key); return true; - } - var hit = new Entry(key, value, len, now, maxAge); - if (hit.length > this[MAX]) { - if (this[DISPOSE]) this[DISPOSE](key, value); + } else { return false; } - this[LENGTH] += hit.length; - this[LRU_LIST].unshift(hit); - this[CACHE].set(key, this[LRU_LIST].head); - trim(this); - return true; - } - }, { - key: "has", - value: function has(key) { - if (!this[CACHE].has(key)) return false; - var hit = this[CACHE].get(key).value; - return !isStale(this, hit); - } - }, { - key: "get", - value: function get(key) { - return _get(this, key, true); - } - }, { - key: "peek", - value: function peek(key) { - return _get(this, key, false); - } - }, { - key: "pop", - value: function pop() { - var node = this[LRU_LIST].tail; - if (!node) return null; - _del(this, node); - return node.value; - } - }, { - key: "del", - value: function del(key) { - _del(this, this[CACHE].get(key)); } }, { - key: "load", - value: function load(arr) { - this.reset(); - var now = Date.now(); - for (var l = arr.length - 1; l >= 0; l--) { - var hit = arr[l]; - var expiresAt = hit.e || 0; - if (expiresAt === 0) this.set(hit.k, hit.v);else { - var maxAge = expiresAt - now; - if (maxAge > 0) { - this.set(hit.k, hit.v, maxAge); - } + key: "set", + value: function set(key, value) { + var deleted = this.delete(key); + if (!deleted && value !== undefined) { + if (this.map.size >= this.max) { + var firstKey = this.map.keys().next().value; + this.delete(firstKey); } + this.map.set(key, value); } - } - }, { - key: "prune", - value: function prune() { - var _this4 = this; - this[CACHE].forEach(function (value, key) { - return _get(_this4, key, false); - }); + return this; } }]); - return LRUCache; }(); - var _get = function _get(self, key, doUse) { - var node = self[CACHE].get(key); - if (node) { - var hit = node.value; - if (isStale(self, hit)) { - _del(self, node); - if (!self[ALLOW_STALE]) return undefined; - } else { - if (doUse) { - if (self[UPDATE_AGE_ON_GET]) node.value.now = Date.now(); - self[LRU_LIST].unshiftNode(node); - } - } - return hit.value; - } - }; - var isStale = function isStale(self, hit) { - if (!hit || !hit.maxAge && !self[MAX_AGE]) return false; - var diff = Date.now() - hit.now; - return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && diff > self[MAX_AGE]; - }; - var trim = function trim(self) { - if (self[LENGTH] > self[MAX]) { - for (var walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null;) { - var prev = walker.prev; - _del(self, walker); - walker = prev; - } - } - }; - var _del = function _del(self, node) { - if (node) { - var hit = node.value; - if (self[DISPOSE]) self[DISPOSE](hit.key, hit.value); - self[LENGTH] -= hit.length; - self[CACHE].delete(hit.key); - self[LRU_LIST].removeNode(node); - } - }; - var Entry = _createClass(function Entry(key, value, length, now, maxAge) { - _classCallCheck(this, Entry); - this.key = key; - this.value = value; - this.length = length; - this.now = now; - this.maxAge = maxAge || 0; - }); - var forEachStep = function forEachStep(self, fn, node, thisp) { - var hit = node.value; - if (isStale(self, hit)) { - _del(self, node); - if (!self[ALLOW_STALE]) hit = undefined; - } - if (hit) fn.call(thisp, hit.value, hit.key, self); - }; - var lruCache = LRUCache; - getDefaultExportFromCjs(lruCache); + var lrucache = LRUCache; + getDefaultExportFromCjs(lrucache); var SemVer = semver$1; var compare$6 = function compare(a, b, loose) { @@ -8219,7 +7240,7 @@ var spine = (function (pc) { } debug('comp', this); } - _createClass(Comparator, [{ + return _createClass(Comparator, [{ key: "parse", value: function parse(comp) { var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; @@ -8305,7 +7326,6 @@ var spine = (function (pc) { return ANY; } }]); - return Comparator; }(); comparator = Comparator; var parseOptions = parseOptions_1; @@ -8380,7 +7400,7 @@ var spine = (function (pc) { } this.format(); } - _createClass(Range, [{ + return _createClass(Range, [{ key: "format", value: function format() { this.range = this.set.map(function (comps) { @@ -8488,13 +7508,10 @@ var spine = (function (pc) { return false; } }]); - return Range; }(); range = Range; - var LRU = lruCache; - var cache = new LRU({ - max: 1000 - }); + var LRU = lrucache; + var cache = new LRU(); var parseOptions = parseOptions_1; var Comparator = requireComparator(); var debug = debug_1; @@ -8684,7 +7701,7 @@ var spine = (function (pc) { return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ''); }; var hyphenReplace = function hyphenReplace(incPr) { - return function ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { + return function ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) { if (isX(fM)) { from = ''; } else if (isX(fm)) { @@ -8826,7 +7843,7 @@ var spine = (function (pc) { this.init(); this._hidden = false; } - _createClass(Spine, [{ + return _createClass(Spine, [{ key: "destroy", value: function destroy() { this.removeFromLayers(); @@ -9221,25 +8238,37 @@ var spine = (function (pc) { this.addToLayers(); } }]); - return Spine; }(); + function _callSuper$1(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var SpineComponent = function (_Component) { - _inherits(SpineComponent, _Component); - var _super = _createSuper(SpineComponent); function SpineComponent(system, entity) { - var _this; + var _this2; _classCallCheck(this, SpineComponent); - _this = _super.call(this, system, entity); - _this.on('set_atlasAsset', _this.onSetAsset, _assertThisInitialized(_this)); - _this.on('set_textureAssets', _this.onSetAssets, _assertThisInitialized(_this)); - _this.on('set_skeletonAsset', _this.onSetAsset, _assertThisInitialized(_this)); - _this.on('set_atlasData', _this.onSetResource, _assertThisInitialized(_this)); - _this.on('set_textures', _this.onSetResource, _assertThisInitialized(_this)); - _this.on('set_skeletonData', _this.onSetResource, _assertThisInitialized(_this)); - return _this; + _this2 = _callSuper$1(this, SpineComponent, [system, entity]); + _this2.on('set_atlasAsset', _this2.onSetAsset, _this2); + _this2.on('set_textureAssets', _this2.onSetAssets, _this2); + _this2.on('set_skeletonAsset', _this2.onSetAsset, _this2); + _this2.on('set_atlasData', _this2.onSetResource, _this2); + _this2.on('set_textures', _this2.onSetResource, _this2); + _this2.on('set_skeletonData', _this2.onSetResource, _this2); + return _this2; } - _createClass(SpineComponent, [{ + _inherits(SpineComponent, _Component); + return _createClass(SpineComponent, [{ key: "_createSpine", value: function _createSpine() { if (this.data.spine) { @@ -9421,7 +8450,6 @@ var spine = (function (pc) { } } }]); - return SpineComponent; }(pc.Component); var SpineComponentData = _createClass(function SpineComponentData() { @@ -9437,26 +8465,39 @@ var spine = (function (pc) { this.skeletonData = null; }); + function _callSuper(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var SpineComponentSystem = function (_ComponentSystem) { - _inherits(SpineComponentSystem, _ComponentSystem); - var _super = _createSuper(SpineComponentSystem); function SpineComponentSystem(app) { - var _this; + var _this2; _classCallCheck(this, SpineComponentSystem); - _this = _super.call(this, app); - _this.id = 'spine'; - _this.ComponentType = SpineComponent; - _this.DataType = SpineComponentData; - _this.schema = ['enabled', 'atlasAsset', 'textureAssets', 'skeletonAsset', 'atlasData', 'textures', 'skeletonData', 'speed', 'spine']; - _this.on('beforeremove', _this.onBeforeRemove, _assertThisInitialized(_this)); - _this.app.systems.on('update', _this.onUpdate, _assertThisInitialized(_this)); - return _this; + _this2 = _callSuper(this, SpineComponentSystem, [app]); + _this2.id = 'spine'; + _this2.ComponentType = SpineComponent; + _this2.DataType = SpineComponentData; + _this2.schema = ['enabled', 'atlasAsset', 'textureAssets', 'skeletonAsset', 'atlasData', 'textures', 'skeletonData', 'speed', 'spine']; + _this2.on('beforeremove', _this2.onBeforeRemove, _this2); + _this2.app.systems.on('update', _this2.onUpdate, _this2); + return _this2; } - _createClass(SpineComponentSystem, [{ + _inherits(SpineComponentSystem, _ComponentSystem); + return _createClass(SpineComponentSystem, [{ key: "initializeComponentData", value: function initializeComponentData(component, data, properties) { properties = ['enabled', 'atlasAsset', 'textureAssets', 'skeletonAsset', 'atlasData', 'textures', 'skeletonData', 'spine']; - _get$1(_getPrototypeOf(SpineComponentSystem.prototype), "initializeComponentData", this).call(this, component, data, properties); + _get(_getPrototypeOf(SpineComponentSystem.prototype), "initializeComponentData", this).call(this, component, data, properties); } }, { key: "onBeforeRemove", @@ -9485,7 +8526,6 @@ var spine = (function (pc) { } } }]); - return SpineComponentSystem; }(pc.ComponentSystem); (function () { diff --git a/build/playcanvas-spine.3.6.min.js b/build/playcanvas-spine.3.6.min.js index accdf90..888052a 100644 --- a/build/playcanvas-spine.3.6.min.js +++ b/build/playcanvas-spine.3.6.min.js @@ -1 +1 @@ -var spine=function(t){"use strict";function e(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var n,r,i,a=e(t),o=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function s(){s=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",h=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var a=e&&e.prototype instanceof y?e:y,o=Object.create(a.prototype),s=new N(r||[]);return i(o,"_invoke",{value:b(t,n,s)}),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var p="suspendedStart",d="suspendedYield",m="executing",v="completed",g={};function y(){}function E(){}function w(){}var x={};u(x,o,(function(){return this}));var A=Object.getPrototypeOf,T=A&&A(A(_([])));T&&T!==n&&r.call(T,o)&&(x=T);var M=w.prototype=y.prototype=Object.create(x);function R(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function n(i,a,o,s){var h=f(t[i],t,a);if("throw"!==h.type){var l=h.arg,u=l.value;return u&&"object"==typeof u&&r.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,o,s)}),(function(t){n("throw",t,o,s)})):e.resolve(u).then((function(t){l.value=t,o(l)}),(function(t){return n("throw",t,o,s)}))}s(h.arg)}var a;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return a=a?a.then(i,i):i()}})}function b(e,n,r){var i=p;return function(a,o){if(i===m)throw new Error("Generator is already running");if(i===v){if("throw"===a)throw o;return{value:t,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var h=S(s,r);if(h){if(h===g)continue;return h}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=m;var l=f(e,n,r);if("normal"===l.type){if(i=r.done?v:d,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function S(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var a=f(i,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,g;var o=a.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function _(e){if(e||""===e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var h=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(h&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),C(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:_(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function M(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}!function(t){var e,n,r,i=function(){function t(t,e,n){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.duration=n}return t.prototype.apply=function(t,e,n,r,i,a,o,s){if(null==t)throw new Error("skeleton cannot be null.");r&&0!=this.duration&&(n%=this.duration,e>0&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;l>>1;;){if(t[(a+1)*n]<=e?r=a+1:i=a,r==i)return(r+1)*n;a=r+i>>>1}},t.linearSearch=function(t,e,n){for(var r=0,i=t.length-n;r<=i;r+=n)if(t[r]>e)return r;return-1},t}();t.Animation=i,function(t){t[t.setup=0]="setup",t[t.current=1]="current",t[t.currentLayered=2]="currentLayered"}(e=t.MixPose||(t.MixPose={})),function(t){t[t.in=0]="in",t[t.out=1]="out"}(n=t.MixDirection||(t.MixDirection={})),function(t){t[t.rotate=0]="rotate",t[t.translate=1]="translate",t[t.scale=2]="scale",t[t.shear=3]="shear",t[t.attachment=4]="attachment",t[t.color=5]="color",t[t.deform=6]="deform",t[t.event=7]="event",t[t.drawOrder=8]="drawOrder",t[t.ikConstraint=9]="ikConstraint",t[t.transformConstraint=10]="transformConstraint",t[t.pathConstraintPosition=11]="pathConstraintPosition",t[t.pathConstraintSpacing=12]="pathConstraintSpacing",t[t.pathConstraintMix=13]="pathConstraintMix",t[t.twoColor=14]="twoColor"}(r=t.TimelineType||(t.TimelineType={}));var a=function(){function e(n){if(n<=0)throw new Error("frameCount must be > 0: "+n);this.curves=t.Utils.newFloatArray((n-1)*e.BEZIER_SIZE)}return e.prototype.getFrameCount=function(){return this.curves.length/e.BEZIER_SIZE+1},e.prototype.setLinear=function(t){this.curves[t*e.BEZIER_SIZE]=e.LINEAR},e.prototype.setStepped=function(t){this.curves[t*e.BEZIER_SIZE]=e.STEPPED},e.prototype.getCurveType=function(t){var n=t*e.BEZIER_SIZE;if(n==this.curves.length)return e.LINEAR;var r=this.curves[n];return r==e.LINEAR?e.LINEAR:r==e.STEPPED?e.STEPPED:e.BEZIER},e.prototype.setCurve=function(t,n,r,i,a){var o=.03*(2*-n+i),s=.03*(2*-r+a),h=.006*(3*(n-i)+1),l=.006*(3*(r-a)+1),u=2*o+h,c=2*s+l,f=.3*n+o+.16666667*h,p=.3*r+s+.16666667*l,d=t*e.BEZIER_SIZE,m=this.curves;m[d++]=e.BEZIER;for(var v=f,g=p,y=d+e.BEZIER_SIZE-1;d=r){var u=void 0,c=void 0;return a==h?(u=0,c=0):(u=i[a-2],c=i[a-1]),c+(i[a+1]-c)*(r-u)/(s-u)}var f=i[a-1];return f+(1-f)*(r-s)/(1-s)},e.LINEAR=0,e.STEPPED=1,e.BEZIER=2,e.BEZIER_SIZE=19,e}();t.CurveTimeline=a;var s=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e<<1),r}return o(a,n),a.prototype.getPropertyId=function(){return(r.rotate<<24)+this.boneIndex},a.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+a.ROTATION]=n},a.prototype.apply=function(t,n,r,o,s,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(r=u[u.length-a.ENTRIES])if(h==e.setup)c.rotation=c.data.rotation+u[u.length+a.PREV_ROTATION]*s;else{var p=c.data.rotation+u[u.length+a.PREV_ROTATION]-c.rotation;p-=360*(16384-(16384.499999999996-p/360|0)),c.rotation+=p*s}else{var d=i.binarySearch(u,r,a.ENTRIES),m=u[d+a.PREV_ROTATION],v=u[d],g=this.getCurvePercent((d>>1)-1,1-(r-v)/(u[d+a.PREV_TIME]-v)),y=u[d+a.ROTATION]-m;y=m+(y-=360*(16384-(16384.499999999996-y/360|0)))*g,h==e.setup?(y-=360*(16384-(16384.499999999996-y/360|0)),c.rotation=c.data.rotation+y*s):(y=c.data.rotation+y-c.rotation,y-=360*(16384-(16384.499999999996-y/360|0)),c.rotation+=y*s)}},a.ENTRIES=2,a.PREV_TIME=-2,a.PREV_ROTATION=-1,a.ROTATION=1,a}(a);t.RotateTimeline=s;var h=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*a.ENTRIES),r}return o(a,n),a.prototype.getPropertyId=function(){return(r.translate<<24)+this.boneIndex},a.prototype.setFrame=function(t,e,n,r){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.X]=n,this.frames[t+a.Y]=r},a.prototype.apply=function(t,n,r,o,s,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(r=u[u.length-a.ENTRIES])f=u[u.length+a.PREV_X],p=u[u.length+a.PREV_Y];else{var d=i.binarySearch(u,r,a.ENTRIES);f=u[d+a.PREV_X],p=u[d+a.PREV_Y];var m=u[d],v=this.getCurvePercent(d/a.ENTRIES-1,1-(r-m)/(u[d+a.PREV_TIME]-m));f+=(u[d+a.X]-f)*v,p+=(u[d+a.Y]-p)*v}h==e.setup?(c.x=c.data.x+f*s,c.y=c.data.y+p*s):(c.x+=(c.data.x+f-c.x)*s,c.y+=(c.data.y+p-c.y)*s)}},a.ENTRIES=3,a.PREV_TIME=-3,a.PREV_X=-2,a.PREV_Y=-1,a.X=1,a.Y=2,a}(a);t.TranslateTimeline=h;var l=function(a){function s(t){return a.call(this,t)||this}return o(s,a),s.prototype.getPropertyId=function(){return(r.scale<<24)+this.boneIndex},s.prototype.apply=function(r,a,o,h,l,u,c){var f=this.frames,p=r.bones[this.boneIndex];if(o=f[f.length-s.ENTRIES])d=f[f.length+s.PREV_X]*p.data.scaleX,m=f[f.length+s.PREV_Y]*p.data.scaleY;else{var v=i.binarySearch(f,o,s.ENTRIES);d=f[v+s.PREV_X],m=f[v+s.PREV_Y];var g=f[v],y=this.getCurvePercent(v/s.ENTRIES-1,1-(o-g)/(f[v+s.PREV_TIME]-g));d=(d+(f[v+s.X]-d)*y)*p.data.scaleX,m=(m+(f[v+s.Y]-m)*y)*p.data.scaleY}if(1==l)p.scaleX=d,p.scaleY=m;else{var E=0,w=0;u==e.setup?(E=p.data.scaleX,w=p.data.scaleY):(E=p.scaleX,w=p.scaleY),c==n.out?(d=Math.abs(d)*t.MathUtils.signum(E),m=Math.abs(m)*t.MathUtils.signum(w)):(E=Math.abs(E)*t.MathUtils.signum(d),w=Math.abs(w)*t.MathUtils.signum(m)),p.scaleX=E+(d-E)*l,p.scaleY=w+(m-w)*l}}},s}(h);t.ScaleTimeline=l;var u=function(t){function n(e){return t.call(this,e)||this}return o(n,t),n.prototype.getPropertyId=function(){return(r.shear<<24)+this.boneIndex},n.prototype.apply=function(t,r,a,o,s,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(a=u[u.length-n.ENTRIES])f=u[u.length+n.PREV_X],p=u[u.length+n.PREV_Y];else{var d=i.binarySearch(u,a,n.ENTRIES);f=u[d+n.PREV_X],p=u[d+n.PREV_Y];var m=u[d],v=this.getCurvePercent(d/n.ENTRIES-1,1-(a-m)/(u[d+n.PREV_TIME]-m));f+=(u[d+n.X]-f)*v,p+=(u[d+n.Y]-p)*v}h==e.setup?(c.shearX=c.data.shearX+f*s,c.shearY=c.data.shearY+p*s):(c.shearX+=(c.data.shearX+f-c.shearX)*s,c.shearY+=(c.data.shearY+p-c.shearY)*s)}},n}(h);t.ShearTimeline=u;var c=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*a.ENTRIES),r}return o(a,n),a.prototype.getPropertyId=function(){return(r.color<<24)+this.slotIndex},a.prototype.setFrame=function(t,e,n,r,i,o){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.R]=n,this.frames[t+a.G]=r,this.frames[t+a.B]=i,this.frames[t+a.A]=o},a.prototype.apply=function(t,n,r,o,s,h,l){var u=t.slots[this.slotIndex],c=this.frames;if(r=c[c.length-a.ENTRIES]){var y=c.length;d=c[y+a.PREV_R],m=c[y+a.PREV_G],v=c[y+a.PREV_B],g=c[y+a.PREV_A]}else{var E=i.binarySearch(c,r,a.ENTRIES);d=c[E+a.PREV_R],m=c[E+a.PREV_G],v=c[E+a.PREV_B],g=c[E+a.PREV_A];var w=c[E],x=this.getCurvePercent(E/a.ENTRIES-1,1-(r-w)/(c[E+a.PREV_TIME]-w));d+=(c[E+a.R]-d)*x,m+=(c[E+a.G]-m)*x,v+=(c[E+a.B]-v)*x,g+=(c[E+a.A]-g)*x}if(1==s)u.color.set(d,m,v,g);else{f=u.color;h==e.setup&&f.setFromColor(u.data.color),f.add((d-f.r)*s,(m-f.g)*s,(v-f.b)*s,(g-f.a)*s)}}},a.ENTRIES=5,a.PREV_TIME=-5,a.PREV_R=-4,a.PREV_G=-3,a.PREV_B=-2,a.PREV_A=-1,a.R=1,a.G=2,a.B=3,a.A=4,a}(a);t.ColorTimeline=c;var f=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*a.ENTRIES),r}return o(a,n),a.prototype.getPropertyId=function(){return(r.twoColor<<24)+this.slotIndex},a.prototype.setFrame=function(t,e,n,r,i,o,s,h,l){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.R]=n,this.frames[t+a.G]=r,this.frames[t+a.B]=i,this.frames[t+a.A]=o,this.frames[t+a.R2]=s,this.frames[t+a.G2]=h,this.frames[t+a.B2]=l},a.prototype.apply=function(t,n,r,o,s,h,l){var u=t.slots[this.slotIndex],c=this.frames;if(r=c[c.length-a.ENTRIES]){var T=c.length;v=c[T+a.PREV_R],g=c[T+a.PREV_G],y=c[T+a.PREV_B],E=c[T+a.PREV_A],w=c[T+a.PREV_R2],x=c[T+a.PREV_G2],A=c[T+a.PREV_B2]}else{var M=i.binarySearch(c,r,a.ENTRIES);v=c[M+a.PREV_R],g=c[M+a.PREV_G],y=c[M+a.PREV_B],E=c[M+a.PREV_A],w=c[M+a.PREV_R2],x=c[M+a.PREV_G2],A=c[M+a.PREV_B2];var R=c[M],I=this.getCurvePercent(M/a.ENTRIES-1,1-(r-R)/(c[M+a.PREV_TIME]-R));v+=(c[M+a.R]-v)*I,g+=(c[M+a.G]-g)*I,y+=(c[M+a.B]-y)*I,E+=(c[M+a.A]-E)*I,w+=(c[M+a.R2]-w)*I,x+=(c[M+a.G2]-x)*I,A+=(c[M+a.B2]-A)*I}if(1==s)u.color.set(v,g,y,E),u.darkColor.set(w,x,A,1);else{f=u.color,p=u.darkColor;h==e.setup&&(f.setFromColor(u.data.color),p.setFromColor(u.data.darkColor)),f.add((v-f.r)*s,(g-f.g)*s,(y-f.b)*s,(E-f.a)*s),p.add((w-p.r)*s,(x-p.g)*s,(A-p.b)*s,0)}}},a.ENTRIES=8,a.PREV_TIME=-8,a.PREV_R=-7,a.PREV_G=-6,a.PREV_B=-5,a.PREV_A=-4,a.PREV_R2=-3,a.PREV_G2=-2,a.PREV_B2=-1,a.R=1,a.G=2,a.B=3,a.A=4,a.R2=5,a.G2=6,a.B2=7,a}(a);t.TwoColorTimeline=f;var p=function(){function a(e){this.frames=t.Utils.newFloatArray(e),this.attachmentNames=new Array(e)}return a.prototype.getPropertyId=function(){return(r.attachment<<24)+this.slotIndex},a.prototype.getFrameCount=function(){return this.frames.length},a.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},a.prototype.apply=function(t,r,a,o,s,h,l){var u=t.slots[this.slotIndex];if(l!=n.out||h!=e.setup){var c=this.frames;if(a=c[c.length-1]?c.length-1:i.binarySearch(c,a,1)-1;var d=this.attachmentNames[p];t.slots[this.slotIndex].setAttachment(null==d?null:t.getAttachment(this.slotIndex,d))}}else{var m=u.data.attachmentName;u.setAttachment(null==m?null:t.getAttachment(this.slotIndex,m))}},a}();t.AttachmentTimeline=p;var d=null,m=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e),r.frameVertices=new Array(e),null==d&&(d=t.Utils.newFloatArray(64)),r}return o(a,n),a.prototype.getPropertyId=function(){return(r.deform<<27)+ +this.attachment.id+this.slotIndex},a.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},a.prototype.apply=function(n,r,a,o,s,h,l){var u=n.slots[this.slotIndex],c=u.getAttachment();if(c instanceof t.VertexAttachment&&c.applyDeform(this.attachment)){var f=u.attachmentVertices;0==f.length&&(s=1);var p=this.frameVertices,d=p[0].length,m=this.frames;if(a=m[m.length-1]){var x=p[m.length-1];if(1==s)t.Utils.arrayCopy(x,0,w,0,d);else if(h==e.setup){if(null==(v=c).bones)for(var A=v.vertices,T=0;Tn)this.apply(t,e,Number.MAX_VALUE,r,a,o,s),e=-1;else if(e>=h[l-1])return;if(!(n0&&h[u-1]==c;)u--;for(;u=h[u];u++)r.push(this.events[u])}}},e}();t.EventTimeline=v;var g=function(){function a(e){this.frames=t.Utils.newFloatArray(e),this.drawOrders=new Array(e)}return a.prototype.getPropertyId=function(){return r.drawOrder<<24},a.prototype.getFrameCount=function(){return this.frames.length},a.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},a.prototype.apply=function(r,a,o,s,h,l,u){var c=r.drawOrder,f=r.slots;if(u!=n.out||l!=e.setup){var p=this.frames;if(o=p[p.length-1]?p.length-1:i.binarySearch(p,o)-1;var m=this.drawOrders[d];if(null==m)t.Utils.arrayCopy(f,0,c,0,f.length);else for(var v=0,g=m.length;v=c[c.length-s.ENTRIES])l==e.setup?(f.mix=f.data.mix+(c[c.length+s.PREV_MIX]-f.data.mix)*h,f.bendDirection=u==n.out?f.data.bendDirection:c[c.length+s.PREV_BEND_DIRECTION]):(f.mix+=(c[c.length+s.PREV_MIX]-f.mix)*h,u==n.in&&(f.bendDirection=c[c.length+s.PREV_BEND_DIRECTION]));else{var p=i.binarySearch(c,a,s.ENTRIES),d=c[p+s.PREV_MIX],m=c[p],v=this.getCurvePercent(p/s.ENTRIES-1,1-(a-m)/(c[p+s.PREV_TIME]-m));l==e.setup?(f.mix=f.data.mix+(d+(c[p+s.MIX]-d)*v-f.data.mix)*h,f.bendDirection=u==n.out?f.data.bendDirection:c[p+s.PREV_BEND_DIRECTION]):(f.mix+=(d+(c[p+s.MIX]-d)*v-f.mix)*h,u==n.in&&(f.bendDirection=c[p+s.PREV_BEND_DIRECTION]))}},s.ENTRIES=3,s.PREV_TIME=-3,s.PREV_MIX=-2,s.PREV_BEND_DIRECTION=-1,s.MIX=1,s.BEND_DIRECTION=2,s}(a);t.IkConstraintTimeline=y;var E=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*a.ENTRIES),r}return o(a,n),a.prototype.getPropertyId=function(){return(r.transformConstraint<<24)+this.transformConstraintIndex},a.prototype.setFrame=function(t,e,n,r,i,o){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.ROTATE]=n,this.frames[t+a.TRANSLATE]=r,this.frames[t+a.SCALE]=i,this.frames[t+a.SHEAR]=o},a.prototype.apply=function(t,n,r,o,s,h,l){var u=this.frames,c=t.transformConstraints[this.transformConstraintIndex];if(r=u[u.length-a.ENTRIES]){var g=u.length;p=u[g+a.PREV_ROTATE],d=u[g+a.PREV_TRANSLATE],m=u[g+a.PREV_SCALE],v=u[g+a.PREV_SHEAR]}else{var y=i.binarySearch(u,r,a.ENTRIES);p=u[y+a.PREV_ROTATE],d=u[y+a.PREV_TRANSLATE],m=u[y+a.PREV_SCALE],v=u[y+a.PREV_SHEAR];var E=u[y],w=this.getCurvePercent(y/a.ENTRIES-1,1-(r-E)/(u[y+a.PREV_TIME]-E));p+=(u[y+a.ROTATE]-p)*w,d+=(u[y+a.TRANSLATE]-d)*w,m+=(u[y+a.SCALE]-m)*w,v+=(u[y+a.SHEAR]-v)*w}if(h==e.setup){f=c.data;c.rotateMix=f.rotateMix+(p-f.rotateMix)*s,c.translateMix=f.translateMix+(d-f.translateMix)*s,c.scaleMix=f.scaleMix+(m-f.scaleMix)*s,c.shearMix=f.shearMix+(v-f.shearMix)*s}else c.rotateMix+=(p-c.rotateMix)*s,c.translateMix+=(d-c.translateMix)*s,c.scaleMix+=(m-c.scaleMix)*s,c.shearMix+=(v-c.shearMix)*s}},a.ENTRIES=5,a.PREV_TIME=-5,a.PREV_ROTATE=-4,a.PREV_TRANSLATE=-3,a.PREV_SCALE=-2,a.PREV_SHEAR=-1,a.ROTATE=1,a.TRANSLATE=2,a.SCALE=3,a.SHEAR=4,a}(a);t.TransformConstraintTimeline=E;var w=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*a.ENTRIES),r}return o(a,n),a.prototype.getPropertyId=function(){return(r.pathConstraintPosition<<24)+this.pathConstraintIndex},a.prototype.setFrame=function(t,e,n){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.VALUE]=n},a.prototype.apply=function(t,n,r,o,s,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(r=u[u.length-a.ENTRIES])f=u[u.length+a.PREV_VALUE];else{var p=i.binarySearch(u,r,a.ENTRIES);f=u[p+a.PREV_VALUE];var d=u[p],m=this.getCurvePercent(p/a.ENTRIES-1,1-(r-d)/(u[p+a.PREV_TIME]-d));f+=(u[p+a.VALUE]-f)*m}h==e.setup?c.position=c.data.position+(f-c.data.position)*s:c.position+=(f-c.position)*s}},a.ENTRIES=2,a.PREV_TIME=-2,a.PREV_VALUE=-1,a.VALUE=1,a}(a);t.PathConstraintPositionTimeline=w;var x=function(t){function n(e){return t.call(this,e)||this}return o(n,t),n.prototype.getPropertyId=function(){return(r.pathConstraintSpacing<<24)+this.pathConstraintIndex},n.prototype.apply=function(t,r,a,o,s,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(a=u[u.length-n.ENTRIES])f=u[u.length+n.PREV_VALUE];else{var p=i.binarySearch(u,a,n.ENTRIES);f=u[p+n.PREV_VALUE];var d=u[p],m=this.getCurvePercent(p/n.ENTRIES-1,1-(a-d)/(u[p+n.PREV_TIME]-d));f+=(u[p+n.VALUE]-f)*m}h==e.setup?c.spacing=c.data.spacing+(f-c.data.spacing)*s:c.spacing+=(f-c.spacing)*s}},n}(w);t.PathConstraintSpacingTimeline=x;var A=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*a.ENTRIES),r}return o(a,n),a.prototype.getPropertyId=function(){return(r.pathConstraintMix<<24)+this.pathConstraintIndex},a.prototype.setFrame=function(t,e,n,r){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.ROTATE]=n,this.frames[t+a.TRANSLATE]=r},a.prototype.apply=function(t,n,r,o,s,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(r=u[u.length-a.ENTRIES])f=u[u.length+a.PREV_ROTATE],p=u[u.length+a.PREV_TRANSLATE];else{var d=i.binarySearch(u,r,a.ENTRIES);f=u[d+a.PREV_ROTATE],p=u[d+a.PREV_TRANSLATE];var m=u[d],v=this.getCurvePercent(d/a.ENTRIES-1,1-(r-m)/(u[d+a.PREV_TIME]-m));f+=(u[d+a.ROTATE]-f)*v,p+=(u[d+a.TRANSLATE]-p)*v}h==e.setup?(c.rotateMix=c.data.rotateMix+(f-c.data.rotateMix)*s,c.translateMix=c.data.translateMix+(p-c.data.translateMix)*s):(c.rotateMix+=(f-c.rotateMix)*s,c.translateMix+=(p-c.translateMix)*s)}},a.ENTRIES=3,a.PREV_TIME=-3,a.PREV_ROTATE=-2,a.PREV_TRANSLATE=-1,a.ROTATE=1,a.TRANSLATE=2,a}(a);t.PathConstraintMixTimeline=A}(i||(i={})),function(t){var e=function(){function e(e){this.tracks=new Array,this.events=new Array,this.listeners=new Array,this.queue=new i(this),this.propertyIDs=new t.IntSet,this.mixingTo=new Array,this.animationsChanged=!1,this.timeScale=1,this.trackEntryPool=new t.Pool((function(){return new n})),this.data=e}return e.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,r=e.length;n0){if(i.delay-=a,i.delay>0)continue;a=-i.delay,i.delay=0}var o=i.next;if(null!=o){var s=i.trackLast-o.delay;if(s>=0){for(o.delay=0,o.trackTime=s+t*o.timeScale,i.trackTime+=a,this.setCurrent(n,o,!0);null!=o.mixingFrom;)o.mixTime+=a,o=o.mixingFrom;continue}}else if(i.trackLast>=i.trackEnd&&null==i.mixingFrom){e[n]=null,this.queue.end(i),this.disposeNext(i);continue}if(null!=i.mixingFrom&&this.updateMixingFrom(i,t)){var h=i.mixingFrom;for(i.mixingFrom=null;null!=h;)this.queue.end(h),h=h.mixingFrom}i.trackTime+=a}}this.queue.drain()},e.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(null==n)return!0;var r=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,t.mixTime>0&&(t.mixTime>=t.mixDuration||0==t.timeScale)?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),r):(n.trackTime+=e*n.timeScale,t.mixTime+=e*t.timeScale,!1)},e.prototype.apply=function(n){if(null==n)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var r=this.events,i=this.tracks,a=!1,o=0,s=i.length;o0)){a=!0;var l=0==o?t.MixPose.current:t.MixPose.currentLayered,u=h.alpha;null!=h.mixingFrom?u*=this.applyMixingFrom(h,n,l):h.trackTime>=h.trackEnd&&null==h.next&&(u=0);var c=h.animationLast,f=h.getAnimationTime(),p=h.animation.timelines.length,d=h.animation.timelines;if(1==u)for(var m=0;m=e.FIRST?t.MixPose.setup:l;E instanceof t.RotateTimeline?this.applyRotateTimeline(E,n,f,u,w,y,m<<1,g):(t.Utils.webkit602BugfixHelper(u,w),E.apply(n,c,f,r,u,w,t.MixDirection.in))}}this.queueEvents(h,f),r.length=0,h.nextAnimationLast=f,h.nextTrackLast=h.trackTime}}return this.queue.drain(),a},e.prototype.applyMixingFrom=function(n,r,i){var a=n.mixingFrom;null!=a.mixingFrom&&this.applyMixingFrom(a,r,i);var o=0;0==n.mixDuration?(o=1,i=t.MixPose.setup):(o=n.mixTime/n.mixDuration)>1&&(o=1);var s=o0&&this.queueEvents(a,c),this.events.length=0,a.nextAnimationLast=c,a.nextTrackLast=a.trackTime,o},e.prototype.applyRotateTimeline=function(e,n,r,i,a,o,s,h){if(h&&(o[s]=0),1!=i){var l=e,u=l.frames,c=n.bones[l.boneIndex];if(r=u[u.length-t.RotateTimeline.ENTRIES])f=c.data.rotation+u[u.length+t.RotateTimeline.PREV_ROTATION];else{var p=t.Animation.binarySearch(u,r,t.RotateTimeline.ENTRIES),d=u[p+t.RotateTimeline.PREV_ROTATION],m=u[p],v=l.getCurvePercent((p>>1)-1,1-(r-m)/(u[p+t.RotateTimeline.PREV_TIME]-m));f=u[p+t.RotateTimeline.ROTATION]-d,f=d+(f-=360*(16384-(16384.499999999996-f/360|0)))*v+c.data.rotation,f-=360*(16384-(16384.499999999996-f/360|0))}var g=a==t.MixPose.setup?c.data.rotation:c.rotation,y=0,E=f-g;if(0==E)y=o[s];else{E-=360*(16384-(16384.499999999996-E/360|0));var w=0,x=0;h?(w=0,x=E):(w=o[s],x=o[s+1]);var A=E>0,T=w>=0;t.MathUtils.signum(x)!=t.MathUtils.signum(E)&&Math.abs(x)<=90&&(Math.abs(w)>180&&(w+=360*t.MathUtils.signum(w)),T=A),y=E+w-w%360,T!=A&&(y+=360*t.MathUtils.signum(w)),o[s]=y}o[s+1]=E,g+=y*i,c.rotation=g-360*(16384-(16384.499999999996-g/360|0))}}else e.apply(n,0,r,null,1,a,t.MixDirection.in)},e.prototype.queueEvents=function(t,e){for(var n=t.animationStart,r=t.animationEnd,i=r-n,a=t.trackLast%i,o=this.events,s=0,h=o.length;sr||this.queue.event(t,l)}for((t.loop?0==i||a>t.trackTime%i:e>=r&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var n=e;;){var r=n.mixingFrom;if(null==r)break;this.queue.end(r),n.mixingFrom=null,n=r}this.tracks[e.trackIndex]=null,this.queue.drain()}}},e.prototype.setCurrent=function(t,e,n){var r=this.expandToIndex(t);this.tracks[t]=e,null!=r&&(n&&this.queue.interrupt(r),e.mixingFrom=r,e.mixTime=0,null!=r.mixingFrom&&r.mixDuration>0&&(e.interruptAlpha*=Math.min(1,r.mixTime/r.mixDuration)),r.timelinesRotation.length=0),this.queue.start(e)},e.prototype.setAnimation=function(t,e,n){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,r,n)},e.prototype.setAnimationWith=function(t,e,n){if(null==e)throw new Error("animation cannot be null.");var r=!0,i=this.expandToIndex(t);null!=i&&(-1==i.nextTrackLast?(this.tracks[t]=i.mixingFrom,this.queue.interrupt(i),this.queue.end(i),this.disposeNext(i),i=i.mixingFrom,r=!1):this.disposeNext(i));var a=this.trackEntry(t,e,n,i);return this.setCurrent(t,a,r),this.queue.drain(),a},e.prototype.addAnimation=function(t,e,n,r){var i=this.data.skeletonData.findAnimation(e);if(null==i)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,i,n,r)},e.prototype.addAnimationWith=function(t,e,n,r){if(null==e)throw new Error("animation cannot be null.");var i=this.expandToIndex(t);if(null!=i)for(;null!=i.next;)i=i.next;var a=this.trackEntry(t,e,n,i);if(null==i)this.setCurrent(t,a,!0),this.queue.drain();else if(i.next=a,r<=0){var o=i.animationEnd-i.animationStart;0!=o?(i.loop?r+=o*(1+(i.trackTime/o|0)):r+=o,r-=this.data.getMix(i.animation,e)):r=0}return a.delay=r,a},e.prototype.setEmptyAnimation=function(t,n){var r=this.setAnimationWith(t,e.emptyAnimation,!1);return r.mixDuration=n,r.trackEnd=n,r},e.prototype.addEmptyAnimation=function(t,n,r){r<=0&&(r-=n);var i=this.addAnimationWith(t,e.emptyAnimation,!1,r);return i.mixDuration=n,i.trackEnd=n,i},e.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,r=this.tracks.length;n=this.tracks.length?null:this.tracks[t]},e.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},e.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)},e.prototype.clearListeners=function(){this.listeners.length=0},e.prototype.clearListenerNotifications=function(){this.queue.clear()},e.emptyAnimation=new t.Animation("",[],0),e.SUBSEQUENT=0,e.FIRST=1,e.DIP=2,e.DIP_MIX=3,e}();t.AnimationState=e;var n=function(){function n(){this.timelineData=new Array,this.timelineDipMix=new Array,this.timelinesRotation=new Array}return n.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.animation=null,this.listener=null,this.timelineData.length=0,this.timelineDipMix.length=0,this.timelinesRotation.length=0},n.prototype.setTimelineData=function(n,r,i){null!=n&&r.push(n);var a=null!=this.mixingFrom?this.mixingFrom.setTimelineData(this,r,i):this;null!=n&&r.pop();var o=r,s=r.length-1,h=this.animation.timelines,l=this.animation.timelines.length,u=t.Utils.setArraySize(this.timelineData,l);this.timelineDipMix.length=0;var c=t.Utils.setArraySize(this.timelineDipMix,l);t:for(var f=0;f=0;d--){var m=o[d];if(!m.hasTimeline(p)&&m.mixDuration>0){u[f]=e.DIP_MIX,c[f]=m;continue t}}u[f]=e.DIP}else u[f]=e.FIRST;else u[f]=e.SUBSEQUENT}return a},n.prototype.hasTimeline=function(t){for(var e=this.animation.timelines,n=0,r=e.length;n=this.animationEnd-this.animationStart},n.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},n}();t.TrackEntry=n;var r,i=function(){function t(t){this.objects=[],this.drainDisabled=!1,this.animState=t}return t.prototype.start=function(t){this.objects.push(r.start),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.interrupt=function(t){this.objects.push(r.interrupt),this.objects.push(t)},t.prototype.end=function(t){this.objects.push(r.end),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.dispose=function(t){this.objects.push(r.dispose),this.objects.push(t)},t.prototype.complete=function(t){this.objects.push(r.complete),this.objects.push(t)},t.prototype.event=function(t,e){this.objects.push(r.event),this.objects.push(t),this.objects.push(e)},t.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,n=0;n=0?n.substring(0,n.lastIndexOf("/")):"";n=this.pathPrefix+n,this.toLoad++,e.downloadText(n,(function(e){var s={count:0},h=new Array;try{new t.TextureAtlas(e,(function(e){h.push(o+"/"+e);var n=document.createElement("img");return n.width=16,n.height=16,new t.FakeTexture(n)}))}catch(t){var l=t;return a.errors[n]="Couldn't load texture atlas "+n+": "+l.message,i&&i(n,"Couldn't load texture atlas "+n+": "+l.message),a.toLoad--,void a.loaded++}for(var u=function(l){var u=!1;a.loadTexture(l,(function(l,c){if(s.count++,s.count==h.length)if(u)a.errors[n]="Couldn't load texture atlas page "+l+"} of atlas "+n,i&&i(n,"Couldn't load texture atlas page "+l+" of atlas "+n),a.toLoad--,a.loaded++;else try{var f=new t.TextureAtlas(e,(function(t){return a.get(o+"/"+t)}));a.assets[n]=f,r&&r(n,f),a.toLoad--,a.loaded++}catch(t){var p=t;a.errors[n]="Couldn't load texture atlas "+n+": "+p.message,i&&i(n,"Couldn't load texture atlas "+n+": "+p.message),a.toLoad--,a.loaded++}}),(function(t,e){u=!0,s.count++,s.count==h.length&&(a.errors[n]="Couldn't load texture atlas page "+t+"} of atlas "+n,i&&i(n,"Couldn't load texture atlas page "+t+" of atlas "+n),a.toLoad--,a.loaded++)}))},c=0,f=h;c0},e.prototype.getErrors=function(){return this.errors},e}();t.AssetManager=e}(i||(i={})),function(t){var e=function(){function e(t){this.atlas=t}return e.prototype.newRegionAttachment=function(e,n,r){var i=this.atlas.findRegion(r);if(null==i)throw new Error("Region not found in atlas: "+r+" (region attachment: "+n+")");i.renderObject=i;var a=new t.RegionAttachment(n);return a.setRegion(i),a},e.prototype.newMeshAttachment=function(e,n,r){var i=this.atlas.findRegion(r);if(null==i)throw new Error("Region not found in atlas: "+r+" (mesh attachment: "+n+")");i.renderObject=i;var a=new t.MeshAttachment(n);return a.region=i,a},e.prototype.newBoundingBoxAttachment=function(e,n){return new t.BoundingBoxAttachment(n)},e.prototype.newPathAttachment=function(e,n){return new t.PathAttachment(n)},e.prototype.newPointAttachment=function(e,n){return new t.PointAttachment(n)},e.prototype.newClippingAttachment=function(e,n){return new t.ClippingAttachment(n)},e}();t.AtlasAttachmentLoader=e}(i||(i={})),function(t){var e;(e=t.BlendMode||(t.BlendMode={}))[e.Normal=0]="Normal",e[e.Additive=1]="Additive",e[e.Multiply=2]="Multiply",e[e.Screen=3]="Screen"}(i||(i={})),function(t){var e=function(){function e(t,e,n){if(this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.appliedValid=!1,this.a=0,this.b=0,this.worldX=0,this.c=0,this.d=0,this.worldY=0,this.sorted=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=n,this.setToSetupPose()}return e.prototype.update=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransformWith=function(e,n,r,i,a,o,s){this.ax=e,this.ay=n,this.arotation=r,this.ascaleX=i,this.ascaleY=a,this.ashearX=o,this.ashearY=s,this.appliedValid=!0;var h=this.parent;if(null==h){var l=r+90+s,u=t.MathUtils.cosDeg(r+o)*i,c=t.MathUtils.cosDeg(l)*a,f=t.MathUtils.sinDeg(r+o)*i,p=t.MathUtils.sinDeg(l)*a,d=this.skeleton;return d.flipX&&(e=-e,u=-u,c=-c),d.flipY&&(n=-n,f=-f,p=-p),this.a=u,this.b=c,this.c=f,this.d=p,this.worldX=e+d.x,void(this.worldY=n+d.y)}var m=h.a,v=h.b,g=h.c,y=h.d;switch(this.worldX=m*e+v*n+h.worldX,this.worldY=g*e+y*n+h.worldY,this.data.transformMode){case t.TransformMode.Normal:l=r+90+s,u=t.MathUtils.cosDeg(r+o)*i,c=t.MathUtils.cosDeg(l)*a,f=t.MathUtils.sinDeg(r+o)*i,p=t.MathUtils.sinDeg(l)*a;return this.a=m*u+v*f,this.b=m*c+v*p,this.c=g*u+y*f,void(this.d=g*c+y*p);case t.TransformMode.OnlyTranslation:l=r+90+s;this.a=t.MathUtils.cosDeg(r+o)*i,this.b=t.MathUtils.cosDeg(l)*a,this.c=t.MathUtils.sinDeg(r+o)*i,this.d=t.MathUtils.sinDeg(l)*a;break;case t.TransformMode.NoRotationOrReflection:var E=0;(A=m*m+g*g)>1e-4?(v=g*(A=Math.abs(m*y-v*g)/A),y=m*A,E=Math.atan2(g,m)*t.MathUtils.radDeg):(m=0,g=0,E=90-Math.atan2(y,v)*t.MathUtils.radDeg);var w=r+o-E,x=r+s-E+90;u=t.MathUtils.cosDeg(w)*i,c=t.MathUtils.cosDeg(x)*a,f=t.MathUtils.sinDeg(w)*i,p=t.MathUtils.sinDeg(x)*a;this.a=m*u-v*f,this.b=m*c-v*p,this.c=g*u+y*f,this.d=g*c+y*p;break;case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:var A,T=t.MathUtils.cosDeg(r),M=t.MathUtils.sinDeg(r),R=m*T+v*M,I=g*T+y*M;(A=Math.sqrt(R*R+I*I))>1e-5&&(A=1/A),R*=A,I*=A,A=Math.sqrt(R*R+I*I);var b=Math.PI/2+Math.atan2(I,R),S=Math.cos(b)*A,P=Math.sin(b)*A;u=t.MathUtils.cosDeg(o)*i,c=t.MathUtils.cosDeg(90+s)*a,f=t.MathUtils.sinDeg(o)*i,p=t.MathUtils.sinDeg(90+s)*a;return(this.data.transformMode!=t.TransformMode.NoScaleOrReflection?m*y-v*g<0:this.skeleton.flipX!=this.skeleton.flipY)&&(S=-S,P=-P),this.a=R*u+S*f,this.b=R*c+S*p,this.c=I*u+P*f,void(this.d=I*c+P*p)}this.skeleton.flipX&&(this.a=-this.a,this.b=-this.b),this.skeleton.flipY&&(this.c=-this.c,this.d=-this.d)},e.prototype.setToSetupPose=function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY},e.prototype.getWorldRotationX=function(){return Math.atan2(this.c,this.a)*t.MathUtils.radDeg},e.prototype.getWorldRotationY=function(){return Math.atan2(this.d,this.b)*t.MathUtils.radDeg},e.prototype.getWorldScaleX=function(){return Math.sqrt(this.a*this.a+this.c*this.c)},e.prototype.getWorldScaleY=function(){return Math.sqrt(this.b*this.b+this.d*this.d)},e.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var e=this.parent;if(null==e)return this.ax=this.worldX,this.ay=this.worldY,this.arotation=Math.atan2(this.c,this.a)*t.MathUtils.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*t.MathUtils.radDeg);var n=e.a,r=e.b,i=e.c,a=e.d,o=1/(n*a-r*i),s=this.worldX-e.worldX,h=this.worldY-e.worldY;this.ax=s*a*o-h*r*o,this.ay=h*n*o-s*i*o;var l=o*a,u=o*n,c=o*r,f=o*i,p=l*this.a-c*this.c,d=l*this.b-c*this.d,m=u*this.c-f*this.a,v=u*this.d-f*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(p*p+m*m),this.ascaleX>1e-4){var g=p*v-d*m;this.ascaleY=g/this.ascaleX,this.ashearY=Math.atan2(p*d+m*v,g)*t.MathUtils.radDeg,this.arotation=Math.atan2(m,p)*t.MathUtils.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(d*d+v*v),this.ashearY=0,this.arotation=90-Math.atan2(v,d)*t.MathUtils.radDeg},e.prototype.worldToLocal=function(t){var e=this.a,n=this.b,r=this.c,i=this.d,a=1/(e*i-n*r),o=t.x-this.worldX,s=t.y-this.worldY;return t.x=o*i*a-s*n*a,t.y=s*e*a-o*r*a,t},e.prototype.localToWorld=function(t){var e=t.x,n=t.y;return t.x=e*this.a+n*this.b+this.worldX,t.y=e*this.c+n*this.d+this.worldY,t},e.prototype.worldToLocalRotation=function(e){var n=t.MathUtils.sinDeg(e),r=t.MathUtils.cosDeg(e);return Math.atan2(this.a*n-this.c*r,this.d*r-this.b*n)*t.MathUtils.radDeg},e.prototype.localToWorldRotation=function(e){var n=t.MathUtils.sinDeg(e),r=t.MathUtils.cosDeg(e);return Math.atan2(r*this.c+n*this.d,r*this.a+n*this.b)*t.MathUtils.radDeg},e.prototype.rotateWorld=function(e){var n=this.a,r=this.b,i=this.c,a=this.d,o=t.MathUtils.cosDeg(e),s=t.MathUtils.sinDeg(e);this.a=o*n-s*i,this.b=o*r-s*a,this.c=s*n+o*i,this.d=s*r+o*a,this.appliedValid=!1},e}();t.Bone=e}(i||(i={})),function(t){var e,n=function(t,n,r){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=e.Normal,t<0)throw new Error("index must be >= 0.");if(null==n)throw new Error("name cannot be null.");this.index=t,this.name=n,this.parent=r};t.BoneData=n,function(t){t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection"}(e=t.TransformMode||(t.TransformMode={}))}(i||(i={})),function(t){var e=function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e};t.Event=e}(i||(i={})),function(t){var e=function(t){this.name=t};t.EventData=e}(i||(i={})),function(t){var e=function(){function e(t,e){if(this.mix=1,this.bendDirection=0,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.bendDirection=t.bendDirection,this.bones=new Array;for(var n=0;n180?c-=360:c<-180&&(c+=360),e.updateWorldTransformWith(e.ax,e.ay,e.arotation+c*i,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)},e.prototype.apply2=function(e,n,r,i,a,o){if(0!=o){e.appliedValid||e.updateAppliedTransform(),n.appliedValid||n.updateAppliedTransform();var s=e.ax,h=e.ay,l=e.ascaleX,u=e.ascaleY,c=n.ascaleX,f=0,p=0,d=0;l<0?(l=-l,f=180,d=-1):(f=0,d=1),u<0&&(u=-u,d=-d),c<0?(c=-c,p=180):p=0;var m=n.ax,v=0,g=0,y=0,E=e.a,w=e.b,x=e.c,A=e.d,T=Math.abs(l-u)<=1e-4;T?(g=E*m+w*(v=n.ay)+e.worldX,y=x*m+A*v+e.worldY):(v=0,g=E*m+e.worldX,y=x*m+e.worldY);var M=e.parent;E=M.a,w=M.b,x=M.c;var R=1/(E*(A=M.d)-w*x),I=r-M.worldX,b=i-M.worldY,S=(I*A-b*w)*R-s,P=(b*E-I*x)*R-h,C=((I=g-M.worldX)*A-(b=y-M.worldY)*w)*R-s,N=(b*E-I*x)*R-h,_=Math.sqrt(C*C+N*N),k=n.data.length*c,L=0,O=0;t:if(T){var V=(S*S+P*P-_*_-(k*=l)*k)/(2*_*k);V<-1?V=-1:V>1&&(V=1),O=Math.acos(V)*a,E=_+k*V,w=k*Math.sin(O),L=Math.atan2(P*E-S*w,S*E+P*w)}else{var D=(E=l*k)*E,F=(w=u*k)*w,X=S*S+P*P,U=Math.atan2(P,S),Y=-2*F*_,B=F-D;if((A=Y*Y-4*B*(x=F*_*_+D*X-D*F))>=0){var j=Math.sqrt(A);Y<0&&(j=-j);var W=(j=-(Y+j)/2)/B,G=x/j,q=Math.abs(W)=-1&&x<=1&&(x=Math.acos(x),(A=(I=E*Math.cos(x)+_)*I+(b=w*Math.sin(x))*b)K&&(J=x,K=A,Q=I,tt=b)),X<=(Z+K)/2?(L=U-Math.atan2($*a,H),O=z*a):(L=U-Math.atan2(tt*a,Q),O=J*a)}var et=Math.atan2(v,m)*d,nt=e.arotation;(L=(L-et)*t.MathUtils.radDeg+f-nt)>180?L-=360:L<-180&&(L+=360),e.updateWorldTransformWith(s,h,nt+L*o,e.ascaleX,e.ascaleY,0,0),nt=n.arotation,(O=((O+et)*t.MathUtils.radDeg-n.ashearX)*d+p-nt)>180?O-=360:O<-180&&(O+=360),n.updateWorldTransformWith(m,v,nt+O*o,n.ascaleX,n.ascaleY,n.ashearX,n.ashearY)}else n.updateWorldTransform()},e}();t.IkConstraint=e}(i||(i={})),function(t){var e=function(t){this.order=0,this.bones=new Array,this.bendDirection=1,this.mix=1,this.name=t};t.IkConstraintData=e}(i||(i={})),function(t){var e=function(){function e(t,e){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(var n=0,r=t.bones.length;n0;if(i>0||a){var o=this.data,s=o.spacingMode,h=s==t.SpacingMode.Length,l=o.rotateMode,u=l==t.RotateMode.Tangent,c=l==t.RotateMode.ChainScale,f=this.bones.length,p=u?f:f+1,d=this.bones,m=t.Utils.setArraySize(this.spaces,p),v=null,g=this.spacing;if(c||h){c&&(v=t.Utils.setArraySize(this.lengths,f));for(var y=0,E=p-1;y0?t.MathUtils.degRad:-t.MathUtils.degRad;y=0;for(var P=3;yt.MathUtils.PI?X-=t.MathUtils.PI2:X<-t.MathUtils.PI&&(X+=t.MathUtils.PI2),X*=r,U=Math.cos(X),Y=Math.sin(X),C.a=U*O-Y*D,C.b=U*V-Y*F,C.c=Y*O+U*D,C.d=Y*V+U*F}C.appliedValid=!1}}}},e.prototype.computeWorldPositions=function(n,r,i,a,o){var s=this.target,h=this.position,l=this.spaces,u=t.Utils.setArraySize(this.positions,3*r+2),c=null,f=n.closed,p=n.worldVerticesLength,d=p/6,m=e.NONE;if(!n.constantSpeed){var v=n.lengths,g=v[d-=f?1:2];if(a&&(h*=g),o)for(var y=0;yg){m!=e.AFTER&&(m=e.AFTER,n.computeWorldVertices(s,p-6,4,c,0,2)),this.addAfterPosition(x-g,c,0,u,E);continue}}for(;;w++){var A=v[w];if(!(x>A)){if(0==w)x/=A;else x=(x-(Z=v[w-1]))/(A-Z);break}}w!=m&&(m=w,f&&w==d?(n.computeWorldVertices(s,p-4,4,c,0,2),n.computeWorldVertices(s,0,4,c,4,2)):n.computeWorldVertices(s,6*w+2,8,c,0,2)),this.addCurvePosition(x,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],u,E,i||y>0&&0==G)}return u}f?(p+=2,c=t.Utils.setArraySize(this.world,p),n.computeWorldVertices(s,2,p-4,c,0,2),n.computeWorldVertices(s,0,2,c,p-4,2),c[p-2]=c[0],c[p-1]=c[1]):(d--,p-=4,c=t.Utils.setArraySize(this.world,p),n.computeWorldVertices(s,2,p,c,0,2));for(var T=t.Utils.setArraySize(this.curves,d),M=0,R=c[0],I=c[1],b=0,S=0,P=0,C=0,N=0,_=0,k=0,L=0,O=0,V=0,D=0,F=0,X=0,U=0,Y=(y=0,2);yM){this.addAfterPosition(x-M,c,p-4,u,E);continue}}for(;;w++){var q=T[w];if(!(x>q)){if(0==w)x/=q;else x=(x-(Z=T[w-1]))/(q-Z);break}}if(w!=m){m=w;var z=6*w;for(R=c[z],I=c[z+1],b=c[z+2],S=c[z+3],P=c[z+4],C=c[z+5],D=2*(k=.03*(R-2*b+P))+(O=.006*(3*(b-P)-R+(N=c[z+6]))),F=2*(L=.03*(I-2*S+C))+(V=.006*(3*(S-C)-I+(_=c[z+7]))),X=.3*(b-R)+k+.16666667*O,U=.3*(S-I)+L+.16666667*V,j=Math.sqrt(X*X+U*U),B[0]=j,z=1;z<8;z++)X+=D,U+=F,D+=O,F+=V,j+=Math.sqrt(X*X+U*U),B[z]=j;X+=D,U+=F,j+=Math.sqrt(X*X+U*U),B[8]=j,X+=D+O,U+=F+V,j+=Math.sqrt(X*X+U*U),B[9]=j,W=0}for(x*=j;;W++){var H=B[W];if(!(x>H)){var Z;if(0==W)x/=H;else x=W+(x-(Z=B[W-1]))/(H-Z);break}}this.addCurvePosition(.1*x,R,I,b,S,P,C,N,_,u,E,i||y>0&&0==G)}return u},e.prototype.addBeforePosition=function(t,e,n,r,i){var a=e[n],o=e[n+1],s=e[n+2]-a,h=e[n+3]-o,l=Math.atan2(h,s);r[i]=a+t*Math.cos(l),r[i+1]=o+t*Math.sin(l),r[i+2]=l},e.prototype.addAfterPosition=function(t,e,n,r,i){var a=e[n+2],o=e[n+3],s=a-e[n],h=o-e[n+1],l=Math.atan2(h,s);r[i]=a+t*Math.cos(l),r[i+1]=o+t*Math.sin(l),r[i+2]=l},e.prototype.addCurvePosition=function(t,e,n,r,i,a,o,s,h,l,u,c){(0==t||isNaN(t))&&(t=1e-4);var f=t*t,p=f*t,d=1-t,m=d*d,v=m*d,g=d*t,y=3*g,E=d*y,w=y*t,x=e*v+r*E+a*w+s*p,A=n*v+i*E+o*w+h*p;l[u]=x,l[u+1]=A,c&&(l[u+2]=Math.atan2(A-(n*m+i*g*2+o*f),x-(e*m+r*g*2+a*f)))},e.prototype.getOrder=function(){return this.data.order},e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e.epsilon=1e-5,e}();t.PathConstraint=e}(i||(i={})),function(t){var e,n,r,i=function(t){this.order=0,this.bones=new Array,this.name=t};t.PathConstraintData=i,(e=t.PositionMode||(t.PositionMode={}))[e.Fixed=0]="Fixed",e[e.Percent=1]="Percent",(n=t.SpacingMode||(t.SpacingMode={}))[n.Length=0]="Length",n[n.Fixed=1]="Fixed",n[n.Percent=2]="Percent",(r=t.RotateMode||(t.RotateMode={}))[r.Tangent=0]="Tangent",r[r.Chain=1]="Chain",r[r.ChainScale=2]="ChainScale"}(i||(i={})),function(t){var e=function(){function t(t){this.toLoad=new Array,this.assets={},this.clientId=t}return t.prototype.loaded=function(){var t=0;for(var e in this.assets)t++;return t},t}(),n=function(){function t(t){void 0===t&&(t=""),this.clientAssets={},this.queuedAssets={},this.rawAssets={},this.errors={},this.pathPrefix=t}return t.prototype.queueAsset=function(t,n,r){var i=this.clientAssets[t];return null==i&&(i=new e(t),this.clientAssets[t]=i),null!==n&&(i.textureLoader=n),i.toLoad.push(r),this.queuedAssets[r]!==r&&(this.queuedAssets[r]=r,!0)},t.prototype.loadText=function(t,e){var n=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState==XMLHttpRequest.DONE&&(r.status>=200&&r.status<300?n.rawAssets[e]=r.responseText:n.errors[e]="Couldn't load text "+e+": status "+r.status+", "+r.responseText)},r.open("GET",e,!0),r.send()}},t.prototype.loadJson=function(t,e){var n=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState==XMLHttpRequest.DONE&&(r.status>=200&&r.status<300?n.rawAssets[e]=JSON.parse(r.responseText):n.errors[e]="Couldn't load text "+e+": status "+r.status+", "+r.responseText)},r.open("GET",e,!0),r.send()}},t.prototype.loadTexture=function(t,e,n){var r=this;if(n=this.pathPrefix+n,this.queueAsset(t,e,n)){var i=new Image;i.src=n,i.crossOrigin="anonymous",i.onload=function(t){r.rawAssets[n]=i},i.onerror=function(t){r.errors[n]="Couldn't load image "+n}}},t.prototype.get=function(t,e){e=this.pathPrefix+e;var n=this.clientAssets[t];return null==n||n.assets[e]},t.prototype.updateClientAssets=function(t){for(var e=0;e0},t.prototype.getErrors=function(){return this.errors},t}();t.SharedAssetManager=n}(i||(i={})),function(t){var e=function(){function e(e){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.flipX=!1,this.flipY=!1,this.x=0,this.y=0,null==e)throw new Error("data cannot be null.");this.data=e,this.bones=new Array;for(var n=0;n1){var i=n[n.length-1];this._updateCache.indexOf(i)>-1||this.updateCacheReset.push(i)}this._updateCache.push(t),this.sortReset(r.children),n[n.length-1].sorted=!0},e.prototype.sortPathConstraint=function(e){var n=e.target,r=n.data.index,i=n.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,r,i),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,r,i);for(var a=0,o=this.data.skins.length;a-1||this.updateCacheReset.push(i)}else for(r=0;r=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},e.prototype.aabbIntersectsSegment=function(t,e,n,r){var i=this.minX,a=this.minY,o=this.maxX,s=this.maxY;if(t<=i&&n<=i||e<=a&&r<=a||t>=o&&n>=o||e>=s&&r>=s)return!1;var h=(r-e)/(n-t),l=h*(i-t)+e;if(l>a&&la&&li&&ui&&ut.minX&&this.minYt.minY},e.prototype.containsPoint=function(t,e){for(var n=this.polygons,r=0,i=n.length;r=n||l=n){var u=r[s];u+(n-h)/(l-h)*(r[a]-u)=u&&E<=p||E>=p&&E<=u)&&(E>=e&&E<=r||E>=r&&E<=e)){var w=(l*g-h*m)/y;if((w>=c&&w<=d||w>=d&&w<=c)&&(w>=n&&w<=i||w>=i&&w<=n))return!0}u=p,c=d}return!1},e.prototype.getPolygon=function(t){if(null==t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},e.prototype.getWidth=function(){return this.maxX-this.minX},e.prototype.getHeight=function(){return this.maxY-this.minY},e}();t.SkeletonBounds=e}(i||(i={})),function(t){var e=function(){function e(){this.triangulator=new t.Triangulator,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array}return e.prototype.clipStart=function(n,r){if(null!=this.clipAttachment)return 0;this.clipAttachment=r;var i=r.worldVerticesLength,a=t.Utils.setArraySize(this.clippingPolygon,i);r.computeWorldVertices(n,0,i,a,0,2);var o=this.clippingPolygon;e.makeClockwise(o);for(var s=this.clippingPolygons=this.triangulator.decompose(o,this.triangulator.triangulate(o)),h=0,l=s.length;h>1,X=this.clipOutput,U=t.Utils.setArraySize(u,N+F*d),Y=0;Y<_;Y+=2){var B=X[Y],j=X[Y+1];U[N]=B,U[N+1]=j,U[N+2]=o.r,U[N+3]=o.g,U[N+4]=o.b,U[N+5]=o.a;var W=B-I,G=j-b,q=(k*W+L*G)*D,z=(V*W+O*G)*D,H=1-q-z;U[N+6]=w*q+M*z+S*H,U[N+7]=x*q+R*z+P*H,h&&(U[N+8]=s.r,U[N+9]=s.g,U[N+10]=s.b,U[N+11]=s.a),N+=d}N=c.length;var Z=t.Utils.setArraySize(c,N+3*(F-2));F--;for(Y=1;Y=2?(u=s,s=this.scratch):u=this.scratch,u.length=0,u.push(t),u.push(e),u.push(n),u.push(r),u.push(i),u.push(a),u.push(t),u.push(e),s.length=0;for(var c=o,f=o.length-4,p=0;;p+=2){for(var d=c[p],m=c[p+1],v=c[p+2],g=c[p+3],y=d-v,E=m-g,w=u,x=u.length-2,A=s.length,T=0;T0;if(y*(R-g)-E*(M-v)>0){if(S){s.push(I),s.push(b);continue}var P=((N=I-M)*(m-R)-(C=b-R)*(d-M))/(C*(v-d)-N*(g-m));s.push(d+(v-d)*P),s.push(m+(g-m)*P)}else if(S){var C,N;P=((N=I-M)*(m-R)-(C=b-R)*(d-M))/(C*(v-d)-N*(g-m));s.push(d+(v-d)*P),s.push(m+(g-m)*P),s.push(I),s.push(b)}l=!0}if(A==s.length)return h.length=0,!0;if(s.push(s[0]),s.push(s[1]),p==f)break;var _=s;(s=u).length=0,u=_}if(h!=s){h.length=0;p=0;for(var k=s.length-2;p>1;s=0;f--)-1==W[f]&&(W[f]=q[--H])}w.setFrame(c++,j.time,W)}a.push(w),o=Math.max(o,w.frames[w.getFrameCount()-1])}if(e.events){for(w=new t.EventTimeline(e.events.length),c=0,f=0;f=r.length&&(r.length=t+1),r[t]||(r[t]={}),r[t][e]=n},t.prototype.getAttachment=function(t,e){var n=this.attachments[t];return n?n[e]:null},t.prototype.attachAll=function(t,e){for(var n=0,r=0;r= 0.");if(null==n)throw new Error("name cannot be null.");if(null==r)throw new Error("boneData cannot be null.");this.index=e,this.name=n,this.boneData=r};t.SlotData=e}(i||(i={})),function(t){var e,n,r=function(){function t(t){this._image=t}return t.prototype.getImage=function(){return this._image},t.filterFromString=function(t){switch(t.toLowerCase()){case"nearest":return e.Nearest;case"linear":return e.Linear;case"mipmap":return e.MipMap;case"mipmapnearestnearest":return e.MipMapNearestNearest;case"mipmaplinearnearest":return e.MipMapLinearNearest;case"mipmapnearestlinear":return e.MipMapNearestLinear;case"mipmaplinearlinear":return e.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}},t.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return n.MirroredRepeat;case"clamptoedge":return n.ClampToEdge;case"repeat":return n.Repeat;default:throw new Error("Unknown texture wrap "+t)}},t}();t.Texture=r,function(t){t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear"}(e=t.TextureFilter||(t.TextureFilter={})),function(t){t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat"}(n=t.TextureWrap||(t.TextureWrap={}));var i=function(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.rotate=!1,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0};t.TextureRegion=i;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.setFilters=function(t,e){},e.prototype.setWraps=function(t,e){},e.prototype.dispose=function(){},e}(t.Texture);t.FakeTexture=a}(i||(i={})),function(t){var e=function(){function e(t,e){this.pages=new Array,this.regions=new Array,this.load(t,e)}return e.prototype.load=function(e,a){if(null==a)throw new Error("textureLoader cannot be null.");for(var o=new n(e),s=new Array(4),h=null;;){var l=o.readLine();if(null==l)break;if(0==(l=l.trim()).length)h=null;else if(h){var u=new i;u.name=l,u.page=h,u.rotate="true"==o.readValue(),o.readTuple(s);var c=parseInt(s[0]),f=parseInt(s[1]);o.readTuple(s);var p=parseInt(s[0]),d=parseInt(s[1]);u.u=c/h.width,u.v=f/h.height,u.rotate?(u.u2=(c+d)/h.width,u.v2=(f+p)/h.height):(u.u2=(c+p)/h.width,u.v2=(f+d)/h.height),u.x=c,u.y=f,u.width=Math.abs(p),u.height=Math.abs(d),4==o.readTuple(s)&&4==o.readTuple(s)&&o.readTuple(s),u.originalWidth=parseInt(s[0]),u.originalHeight=parseInt(s[1]),o.readTuple(s),u.offsetX=parseInt(s[0]),u.offsetY=parseInt(s[1]),u.index=parseInt(o.readValue()),u.texture=h.texture,this.regions.push(u)}else{(h=new r).name=l,2==o.readTuple(s)&&(h.width=parseInt(s[0]),h.height=parseInt(s[1]),o.readTuple(s)),o.readTuple(s),h.minFilter=t.Texture.filterFromString(s[0]),h.magFilter=t.Texture.filterFromString(s[1]);var m=o.readValue();h.uWrap=t.TextureWrap.ClampToEdge,h.vWrap=t.TextureWrap.ClampToEdge,"x"==m?h.uWrap=t.TextureWrap.Repeat:"y"==m?h.vWrap=t.TextureWrap.Repeat:"xy"==m&&(h.uWrap=h.vWrap=t.TextureWrap.Repeat),h.texture=a(l),h.texture.setFilters(h.minFilter,h.magFilter),h.texture.setWraps(h.uWrap,h.vWrap),h.width=h.texture.getImage().width,h.height=h.texture.getImage().height,this.pages.push(h)}}},e.prototype.findRegion=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},t.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},t.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw new Error("Invalid line: "+e);for(var r=0,i=n+1;r<3;r++){var a=e.indexOf(",",i);if(-1==a)break;t[r]=e.substr(i,a-i).trim(),i=a+1}return t[r]=e.substring(i).trim(),r+1},t}(),r=function(){};t.TextureAtlasPage=r;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(t.TextureRegion);t.TextureAtlasRegion=i}(i||(i={})),function(t){var e=function(){function e(e,n){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new t.Vector2,null==e)throw new Error("data cannot be null.");if(null==n)throw new Error("skeleton cannot be null.");this.data=e,this.rotateMix=e.rotateMix,this.translateMix=e.translateMix,this.scaleMix=e.scaleMix,this.shearMix=e.shearMix,this.bones=new Array;for(var r=0;r0?t.MathUtils.degRad:-t.MathUtils.degRad,c=this.data.offsetRotation*u,f=this.data.offsetShearY*u,p=this.bones,d=0,m=p.length;dt.MathUtils.PI?b-=t.MathUtils.PI2:b<-t.MathUtils.PI&&(b+=t.MathUtils.PI2),b*=e;var A=Math.cos(b),T=Math.sin(b);v.a=A*y-T*w,v.b=A*E-T*x,v.c=T*y+A*w,v.d=T*E+A*x,g=!0}if(0!=n){var M=this.temp;a.localToWorld(M.set(this.data.offsetX,this.data.offsetY)),v.worldX+=(M.x-v.worldX)*n,v.worldY+=(M.y-v.worldY)*n,g=!0}if(r>0){var R=Math.sqrt(v.a*v.a+v.c*v.c),I=Math.sqrt(o*o+h*h);R>1e-5&&(R=(R+(I-R+this.data.offsetScaleX)*r)/R),v.a*=R,v.c*=R,R=Math.sqrt(v.b*v.b+v.d*v.d),I=Math.sqrt(s*s+l*l),R>1e-5&&(R=(R+(I-R+this.data.offsetScaleY)*r)/R),v.b*=R,v.d*=R,g=!0}if(i>0){E=v.b,x=v.d;var b,S=Math.atan2(x,E);(b=Math.atan2(l,s)-Math.atan2(h,o)-(S-Math.atan2(v.c,v.a)))>t.MathUtils.PI?b-=t.MathUtils.PI2:b<-t.MathUtils.PI&&(b+=t.MathUtils.PI2),b=S+(b+f)*i;R=Math.sqrt(E*E+x*x);v.b=Math.cos(b)*R,v.d=Math.sin(b)*R,g=!0}g&&(v.appliedValid=!1)}},e.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,n=this.translateMix,r=this.scaleMix,i=this.shearMix,a=this.target,o=a.a,s=a.b,h=a.c,l=a.d,u=o*l-s*h>0?t.MathUtils.degRad:-t.MathUtils.degRad,c=this.data.offsetRotation*u,f=this.data.offsetShearY*u,p=this.bones,d=0,m=p.length;dt.MathUtils.PI?I-=t.MathUtils.PI2:I<-t.MathUtils.PI&&(I+=t.MathUtils.PI2),I*=e;var A=Math.cos(I),T=Math.sin(I);v.a=A*y-T*w,v.b=A*E-T*x,v.c=T*y+A*w,v.d=T*E+A*x,g=!0}if(0!=n){var M=this.temp;a.localToWorld(M.set(this.data.offsetX,this.data.offsetY)),v.worldX+=M.x*n,v.worldY+=M.y*n,g=!0}if(r>0){var R=(Math.sqrt(o*o+h*h)-1+this.data.offsetScaleX)*r+1;v.a*=R,v.c*=R,R=(Math.sqrt(s*s+l*l)-1+this.data.offsetScaleY)*r+1,v.b*=R,v.d*=R,g=!0}if(i>0){var I;(I=Math.atan2(l,s)-Math.atan2(h,o))>t.MathUtils.PI?I-=t.MathUtils.PI2:I<-t.MathUtils.PI&&(I+=t.MathUtils.PI2);E=v.b,x=v.d;I=Math.atan2(x,E)+(I-t.MathUtils.PI/2+f)*i;R=Math.sqrt(E*E+x*x);v.b=Math.cos(I)*R,v.d=Math.sin(I)*R,g=!0}g&&(v.appliedValid=!1)}},e.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,r=this.shearMix,i=this.target;i.appliedValid||i.updateAppliedTransform();for(var a=this.bones,o=0,s=a.length;o0&&(p>1e-5&&(p=(p+(i.ascaleX-p+this.data.offsetScaleX)*n)/p),d>1e-5&&(d=(d+(i.ascaleY-d+this.data.offsetScaleY)*n)/d));var m=h.ashearY;if(r>0){u=i.ashearY-m+this.data.offsetShearY;u-=360*(16384-(16384.499999999996-u/360|0)),h.shearY+=u*r}h.updateWorldTransformWith(c,f,l,p,d,h.ashearX,m)}},e.prototype.applyRelativeLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,r=this.shearMix,i=this.target;i.appliedValid||i.updateAppliedTransform();for(var a=this.bones,o=0,s=a.length;o0&&(f>1e-5&&(f*=(i.ascaleX-1+this.data.offsetScaleX)*n+1),p>1e-5&&(p*=(i.ascaleY-1+this.data.offsetScaleY)*n+1));var d=h.ashearY;r>0&&(d+=(i.ashearY+this.data.offsetShearY)*r),h.updateWorldTransformWith(u,c,l,f,p,h.ashearX,d)}},e.prototype.getOrder=function(){return this.data.order},e}();t.TransformConstraint=e}(i||(i={})),function(t){var e=function(t){if(this.order=0,this.bones=new Array,this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.offsetRotation=0,this.offsetX=0,this.offsetY=0,this.offsetScaleX=0,this.offsetScaleY=0,this.offsetShearY=0,this.relative=!1,this.local=!1,null==t)throw new Error("name cannot be null.");this.name=t};t.TransformConstraintData=e}(i||(i={})),function(t){var e=function(){function e(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new t.Pool((function(){return new Array})),this.polygonIndicesPool=new t.Pool((function(){return new Array}))}return e.prototype.triangulate=function(t){var n=t,r=t.length>>1,i=this.indicesArray;i.length=0;for(var a=0;a3;){for(var l=r-1,u=(a=0,1);;){t:if(!o[a]){for(var c=i[l]<<1,f=i[a]<<1,p=i[u]<<1,d=n[c],m=n[c+1],v=n[f],g=n[f+1],y=n[p],E=n[p+1],w=(u+1)%r;w!=l;w=(w+1)%r)if(o[w]){var x=i[w]<<1,A=n[x],T=n[x+1];if(e.positiveArea(y,E,d,m,A,T)&&e.positiveArea(d,m,v,g,A,T)&&e.positiveArea(v,g,y,E,A,T))break t}break}if(0==u){do{if(!o[a])break;a--}while(a>0);break}l=a,a=u,u=(u+1)%r}h.push(i[(r+a-1)%r]),h.push(i[a]),h.push(i[(a+1)%r]),i.splice(a,1),o.splice(a,1);var M=(--r+a-1)%r,R=a==r?0:a;o[M]=e.isConcave(M,r,n,i),o[R]=e.isConcave(R,r,n,i)}return 3==r&&(h.push(i[2]),h.push(i[0]),h.push(i[1])),h},e.prototype.decompose=function(t,n){var r=t,i=this.convexPolygons;this.polygonPool.freeAll(i),i.length=0;var a=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(a),a.length=0;var o=this.polygonIndicesPool.obtain();o.length=0;var s=this.polygonPool.obtain();s.length=0;for(var h=-1,l=0,u=0,c=n.length;u0?(i.push(s),a.push(o)):(this.polygonPool.free(s),this.polygonIndicesPool.free(o)),(s=this.polygonPool.obtain()).length=0,s.push(m),s.push(v),s.push(g),s.push(y),s.push(E),s.push(w),(o=this.polygonIndicesPool.obtain()).length=0,o.push(f),o.push(p),o.push(d),l=e.winding(m,v,g,y,E,w),h=f)}s.length>0&&(i.push(s),a.push(o));for(u=0,c=i.length;u=0;u--)0==(s=i[u]).length&&(i.splice(u,1),this.polygonPool.free(s),o=a[u],a.splice(u,1),this.polygonIndicesPool.free(o));return i},e.isConcave=function(t,e,n,r){var i=r[(e+t-1)%e]<<1,a=r[t]<<1,o=r[(t+1)%e]<<1;return!this.positiveArea(n[i],n[i+1],n[a],n[a+1],n[o],n[o+1])},e.positiveArea=function(t,e,n,r,i,a){return t*(a-r)+n*(e-a)+i*(r-e)>=0},e.winding=function(t,e,n,r,i,a){var o=n-t,s=r-e;return i*s-a*o+o*e-t*s>=0?1:-1},e}();t.Triangulator=e}(i||(i={})),function(t){var e=function(){function t(){this.array=new Array}return t.prototype.add=function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e},t.prototype.contains=function(t){return null!=this.array[0|t]},t.prototype.remove=function(t){this.array[0|t]=void 0},t.prototype.clear=function(){this.array.length=0},t}();t.IntSet=e;var n=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.r=t,this.g=e,this.b=n,this.a=r}return t.prototype.set=function(t,e,n,r){return this.r=t,this.g=e,this.b=n,this.a=r,this.clamp(),this},t.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},t.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=(8!=t.length?255:parseInt(t.substr(6,2),16))/255,this},t.prototype.add=function(t,e,n,r){return this.r+=t,this.g+=e,this.b+=n,this.a+=r,this.clamp(),this},t.prototype.clamp=function(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this},t.WHITE=new t(1,1,1,1),t.RED=new t(1,0,0,1),t.GREEN=new t(0,1,0,1),t.BLUE=new t(0,0,1,1),t.MAGENTA=new t(1,0,1,1),t}();t.Color=n;var r=function(){function t(){}return t.clamp=function(t,e,n){return tn?n:t},t.cosDeg=function(e){return Math.cos(e*t.degRad)},t.sinDeg=function(e){return Math.sin(e*t.degRad)},t.signum=function(t){return t>0?1:t<0?-1:0},t.toInt=function(t){return t>0?Math.floor(t):Math.ceil(t)},t.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},t.randomTriangular=function(e,n){return t.randomTriangularWith(e,n,.5*(e+n))},t.randomTriangularWith=function(t,e,n){var r=Math.random(),i=e-t;return r<=(n-t)/i?t+Math.sqrt(r*i*(n-t)):e-Math.sqrt((1-r)*i*(e-n))},t.PI=3.1415927,t.PI2=2*t.PI,t.radiansToDegrees=180/t.PI,t.radDeg=t.radiansToDegrees,t.degreesToRadians=t.PI/180,t.degRad=t.degreesToRadians,t}();t.MathUtils=r;var i=function(){function t(){}return t.prototype.apply=function(t,e,n){return t+(e-t)*this.applyInternal(n)},t}();t.Interpolation=i;var a=function(t){function e(e){var n=t.call(this)||this;return n.power=2,n.power=e,n}return o(e,t),e.prototype.applyInternal=function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1},e}(i);t.Pow=a;var s=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.applyInternal=function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1},e}(a);t.PowOut=s;var h=function(){function t(){}return t.arrayCopy=function(t,e,n,r,i){for(var a=e,o=r;a=n?e:t.setArraySize(e,n,r)},t.newArray=function(t,e){for(var n=new Array(t),r=0;r0?this.items.pop():this.instantiator()},t.prototype.free=function(t){t.reset&&t.reset(),this.items.push(t)},t.prototype.freeAll=function(t){for(var e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)},t}();t.TimeKeeper=f;var p=function(){function t(t){void 0===t&&(t=32),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}return t.prototype.hasEnoughData=function(){return this.addedValues>=this.values.length},t.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},t.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*a;var o=t.bone.skeleton,s=t.attachmentVertices,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,f=0;f0&&(h=s);for(var w,x=(w=t.bone).worldX,A=w.worldY,T=w.a,M=w.b,R=w.c,I=w.d,b=e,S=i;S)?=?)"),p("XRANGEIDENTIFIERLOOSE","".concat(h[l.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),p("XRANGEIDENTIFIER","".concat(h[l.NUMERICIDENTIFIER],"|x|X|\\*")),p("XRANGEPLAIN","[v=\\s]*(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:".concat(h[l.PRERELEASE],")?").concat(h[l.BUILD],"?")+")?)?"),p("XRANGEPLAINLOOSE","[v=\\s]*(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(h[l.PRERELEASELOOSE],")?").concat(h[l.BUILD],"?")+")?)?"),p("XRANGE","^".concat(h[l.GTLT],"\\s*").concat(h[l.XRANGEPLAIN],"$")),p("XRANGELOOSE","^".concat(h[l.GTLT],"\\s*").concat(h[l.XRANGEPLAINLOOSE],"$")),p("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(n,"})")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:$|[^\\d])"),p("COERCERTL",h[l.COERCE],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM","(\\s*)".concat(h[l.LONETILDE],"\\s+"),!0),e.tildeTrimReplace="$1~",p("TILDE","^".concat(h[l.LONETILDE]).concat(h[l.XRANGEPLAIN],"$")),p("TILDELOOSE","^".concat(h[l.LONETILDE]).concat(h[l.XRANGEPLAINLOOSE],"$")),p("LONECARET","(?:\\^)"),p("CARETTRIM","(\\s*)".concat(h[l.LONECARET],"\\s+"),!0),e.caretTrimReplace="$1^",p("CARET","^".concat(h[l.LONECARET]).concat(h[l.XRANGEPLAIN],"$")),p("CARETLOOSE","^".concat(h[l.LONECARET]).concat(h[l.XRANGEPLAINLOOSE],"$")),p("COMPARATORLOOSE","^".concat(h[l.GTLT],"\\s*(").concat(h[l.LOOSEPLAIN],")$|^$")),p("COMPARATOR","^".concat(h[l.GTLT],"\\s*(").concat(h[l.FULLPLAIN],")$|^$")),p("COMPARATORTRIM","(\\s*)".concat(h[l.GTLT],"\\s*(").concat(h[l.LOOSEPLAIN],"|").concat(h[l.XRANGEPLAIN],")"),!0),e.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE","^\\s*(".concat(h[l.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(h[l.XRANGEPLAIN],")")+"\\s*$"),p("HYPHENRANGELOOSE","^\\s*(".concat(h[l.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(h[l.XRANGEPLAINLOOSE],")")+"\\s*$"),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(k,k.exports);var L=k.exports;S(L);var O=Object.freeze({loose:!0}),V=Object.freeze({}),D=function(t){return t?"object"!==h(t)?O:t:V};S(D);var F=/^[0-9]+$/,X=function(t,e){var n=F.test(t),r=F.test(e);return n&&r&&(t=+t,e=+e),t===e?0:n&&!r?-1:r&&!n?1:tB)throw new TypeError("version is longer than ".concat(B," characters"));Y("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;var r=e.trim().match(n.loose?W[G.LOOSE]:W[G.FULL]);if(!r)throw new TypeError("Invalid Version: ".concat(e));if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>j||this.major<0)throw new TypeError("Invalid major version");if(this.minor>j||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>j||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((function(t){if(/^[0-9]+$/.test(t)){var e=+t;if(e>=0&&e=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(e===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(e){var a=[e,r];!1===n&&(a=[e]),0===z(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=a):this.prerelease=a}break;default:throw new Error("invalid increment argument: ".concat(t))}return this.raw=this.format(),this.build.length&&(this.raw+="+".concat(this.build.join("."))),this}}]),t}(),Z=H;S(Z);var $=Z,J=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t instanceof $)return t;try{return new $(t,e)}catch(t){if(!n)return null;throw t}};S(J);var Q,K,tt=J,et=S((function(t,e){var n=tt(t,e);return n?n.version:null})),nt=Z,rt=J,it=L.safeRe,at=L.t,ot=S((function(t,e){if(t instanceof nt)return t;if("number"==typeof t&&(t=String(t)),"string"!=typeof t)return null;var n=null;if((e=e||{}).rtl){for(var r;(r=it[at.COERCERTL].exec(t))&&(!n||n.index+n[0].length!==t.length);)n&&r.index+r[0].length===n.index+n[0].length||(n=r),it[at.COERCERTL].lastIndex=r.index+r[1].length+r[2].length;it[at.COERCERTL].lastIndex=-1}else n=t.match(it[at.COERCE]);return null===n?null:rt("".concat(n[2],".").concat(n[3]||"0",".").concat(n[4]||"0"),e)}));var st=ht;function ht(t){var e=this;if(e instanceof ht||(e=new ht),e.tail=null,e.head=null,e.length=0,t&&"function"==typeof t.forEach)t.forEach((function(t){e.push(t)}));else if(arguments.length>0)for(var n=0,r=arguments.length;n1)n=e;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=t(n,r.value,i),r=r.next;return n},ht.prototype.reduceReverse=function(t,e){var n,r=this.tail;if(arguments.length>1)n=e;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=t(n,r.value,i),r=r.prev;return n},ht.prototype.toArray=function(){for(var t=new Array(this.length),e=0,n=this.head;null!==n;e++)t[e]=n.value,n=n.next;return t},ht.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,n=this.tail;null!==n;e++)t[e]=n.value,n=n.prev;return t},ht.prototype.slice=function(t,e){(e=e||this.length)<0&&(e+=this.length),(t=t||0)<0&&(t+=this.length);var n=new ht;if(ethis.length&&(e=this.length);for(var r=0,i=this.head;null!==i&&rthis.length&&(e=this.length);for(var r=this.length,i=this.tail;null!==i&&r>e;r--)i=i.prev;for(;null!==i&&r>t;r--,i=i.prev)n.push(i.value);return n},ht.prototype.splice=function(t,e){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var n=0,r=this.head;null!==r&&nthis[dt])return Pt(this,this[At].get(t)),!1;var a=this[At].get(t).value;return this[Et]&&(this[wt]||this[Et](t,a.value)),a.now=r,a.maxAge=n,a.value=e,this[mt]+=i-a.length,a.length=i,this.get(t),St(this),!0}var o=new Ct(t,e,i,r,n);return o.length>this[dt]?(this[Et]&&this[Et](t,e),!1):(this[mt]+=o.length,this[xt].unshift(o),this[At].set(t,this[xt].head),St(this),!0)}},{key:"has",value:function(t){if(!this[At].has(t))return!1;var e=this[At].get(t).value;return!bt(this,e)}},{key:"get",value:function(t){return It(this,t,!0)}},{key:"peek",value:function(t){return It(this,t,!1)}},{key:"pop",value:function(){var t=this[xt].tail;return t?(Pt(this,t),t.value):null}},{key:"del",value:function(t){Pt(this,this[At].get(t))}},{key:"load",value:function(t){this.reset();for(var e=Date.now(),n=t.length-1;n>=0;n--){var r=t[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{var a=i-e;a>0&&this.set(r.k,r.v,a)}}}},{key:"prune",value:function(){var t=this;this[At].forEach((function(e,n){return It(t,n,!1)}))}}]),t}(),It=function(t,e,n){var r=t[At].get(e);if(r){var i=r.value;if(bt(t,i)){if(Pt(t,r),!t[gt])return}else n&&(t[Tt]&&(r.value.now=Date.now()),t[xt].unshiftNode(r));return i.value}},bt=function(t,e){if(!e||!e.maxAge&&!t[yt])return!1;var n=Date.now()-e.now;return e.maxAge?n>e.maxAge:t[yt]&&n>t[yt]},St=function(t){if(t[mt]>t[dt])for(var e=t[xt].tail;t[mt]>t[dt]&&null!==e;){var n=e.prev;Pt(t,e),e=n}},Pt=function(t,e){if(e){var n=e.value;t[Et]&&t[Et](n.key,n.value),t[mt]-=n.length,t[At].delete(n.key),t[xt].removeNode(e)}},Ct=c((function t(e,n,r,i,a){l(this,t),this.key=e,this.value=n,this.length=r,this.now=i,this.maxAge=a||0})),Nt=function(t,e,n,r){var i=n.value;bt(t,i)&&(Pt(t,n),t[gt]||(i=void 0)),i&&e.call(r,i.value,i.key,t)},_t=Rt;S(_t);var kt=Z,Lt=function(t,e,n){return new kt(t,n).compare(new kt(e,n))};S(Lt);var Ot=Lt,Vt=function(t,e,n){return 0===Ot(t,e,n)};S(Vt);var Dt=Lt,Ft=function(t,e,n){return 0!==Dt(t,e,n)};S(Ft);var Xt=Lt,Ut=function(t,e,n){return Xt(t,e,n)>0};S(Ut);var Yt=Lt,Bt=function(t,e,n){return Yt(t,e,n)>=0};S(Bt);var jt=Lt,Wt=function(t,e,n){return jt(t,e,n)<0};S(Wt);var Gt=Lt,qt=function(t,e,n){return Gt(t,e,n)<=0};S(qt);var zt,Ht,Zt,$t,Jt=Vt,Qt=Ft,Kt=Ut,te=Bt,ee=Wt,ne=qt,re=function(t,e,n,r){switch(e){case"===":return"object"===h(t)&&(t=t.version),"object"===h(n)&&(n=n.version),t===n;case"!==":return"object"===h(t)&&(t=t.version),"object"===h(n)&&(n=n.version),t!==n;case"":case"=":case"==":return Jt(t,n,r);case"!=":return Qt(t,n,r);case">":return Kt(t,n,r);case">=":return te(t,n,r);case"<":return ee(t,n,r);case"<=":return ne(t,n,r);default:throw new TypeError("Invalid operator: ".concat(e))}};function ie(){if($t)return Zt;$t=1;var t=function(){function t(e,i){var a=this;if(l(this,t),i=n(i),e instanceof t)return e.loose===!!i.loose&&e.includePrerelease===!!i.includePrerelease?e:new t(e.raw,i);if(e instanceof r)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((function(t){return a.parseRange(t.trim())})).filter((function(t){return t.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(this.raw));if(this.set.length>1){var o=this.set[0];if(this.set=this.set.filter((function(t){return!m(t[0])})),0===this.set.length)this.set=[o];else if(this.set.length>1){var s,h=T(this.set);try{for(h.s();!(s=h.n()).done;){var u=s.value;if(1===u.length&&v(u[0])){this.set=[u];break}}}catch(t){h.e(t)}finally{h.f()}}}this.format()}return c(t,[{key:"format",value:function(){return this.range=this.set.map((function(t){return t.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(t){var n=this,a=((this.options.includePrerelease&&p)|(this.options.loose&&d))+":"+t,l=e.get(a);if(l)return l;var c=this.options.loose,v=c?o[s.HYPHENRANGELOOSE]:o[s.HYPHENRANGE];t=t.replace(v,N(this.options.includePrerelease)),i("hyphen replace",t),t=t.replace(o[s.COMPARATORTRIM],h),i("comparator trim",t),t=t.replace(o[s.TILDETRIM],u),i("tilde trim",t),t=t.replace(o[s.CARETTRIM],f),i("caret trim",t);var g=t.split(" ").map((function(t){return y(t,n.options)})).join(" ").split(/\s+/).map((function(t){return C(t,n.options)}));c&&(g=g.filter((function(t){return i("loose invalid filter",t,n.options),!!t.match(o[s.COMPARATORLOOSE])}))),i("range list",g);var E,x=new Map,A=g.map((function(t){return new r(t,n.options)})),M=T(A);try{for(M.s();!(E=M.n()).done;){var R=E.value;if(m(R))return[R];x.set(R.value,R)}}catch(t){M.e(t)}finally{M.f()}x.size>1&&x.has("")&&x.delete("");var I=w(x.values());return e.set(a,I),I}},{key:"intersects",value:function(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((function(t){return g(t,n)&&e.set.some((function(e){return g(e,n)&&t.every((function(t){return e.every((function(e){return t.intersects(e,n)}))}))}))}))}},{key:"test",value:function(t){if(!t)return!1;if("string"==typeof t)try{t=new a(t,this.options)}catch(t){return!1}for(var e=0;e")||!t.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!t.operator.startsWith("<"))&&(this.semver.version!==t.semver.version||!this.operator.includes("=")||!t.operator.includes("="))&&!(a(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<"))&&!(a(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}}],[{key:"ANY",get:function(){return t}}]),e}();zt=e;var n=D,r=L.safeRe,i=L.t,a=re,o=_,s=Z,h=ie();return zt}(),i=_,a=Z,o=L.safeRe,s=L.t,h=L.comparatorTrimReplace,u=L.tildeTrimReplace,f=L.caretTrimReplace,p=P.FLAG_INCLUDE_PRERELEASE,d=P.FLAG_LOOSE,m=function(t){return"<0.0.0-0"===t.value},v=function(t){return""===t.value},g=function(t,e){for(var n=!0,r=t.slice(),i=r.pop();n&&r.length;)n=r.every((function(t){return i.intersects(t,e)})),i=r.pop();return n},y=function(t,e){return i("comp",t,e),t=M(t,e),i("caret",t),t=x(t,e),i("tildes",t),t=I(t,e),i("xrange",t),t=S(t,e),i("stars",t),t},E=function(t){return!t||"x"===t.toLowerCase()||"*"===t},x=function(t,e){return t.trim().split(/\s+/).map((function(t){return A(t,e)})).join(" ")},A=function(t,e){var n=e.loose?o[s.TILDELOOSE]:o[s.TILDE];return t.replace(n,(function(e,n,r,a,o){var s;return i("tilde",t,e,n,r,a,o),E(n)?s="":E(r)?s=">=".concat(n,".0.0 <").concat(+n+1,".0.0-0"):E(a)?s=">=".concat(n,".").concat(r,".0 <").concat(n,".").concat(+r+1,".0-0"):o?(i("replaceTilde pr",o),s=">=".concat(n,".").concat(r,".").concat(a,"-").concat(o," <").concat(n,".").concat(+r+1,".0-0")):s=">=".concat(n,".").concat(r,".").concat(a," <").concat(n,".").concat(+r+1,".0-0"),i("tilde return",s),s}))},M=function(t,e){return t.trim().split(/\s+/).map((function(t){return R(t,e)})).join(" ")},R=function(t,e){i("caret",t,e);var n=e.loose?o[s.CARETLOOSE]:o[s.CARET],r=e.includePrerelease?"-0":"";return t.replace(n,(function(e,n,a,o,s){var h;return i("caret",t,e,n,a,o,s),E(n)?h="":E(a)?h=">=".concat(n,".0.0").concat(r," <").concat(+n+1,".0.0-0"):E(o)?h="0"===n?">=".concat(n,".").concat(a,".0").concat(r," <").concat(n,".").concat(+a+1,".0-0"):">=".concat(n,".").concat(a,".0").concat(r," <").concat(+n+1,".0.0-0"):s?(i("replaceCaret pr",s),h="0"===n?"0"===a?">=".concat(n,".").concat(a,".").concat(o,"-").concat(s," <").concat(n,".").concat(a,".").concat(+o+1,"-0"):">=".concat(n,".").concat(a,".").concat(o,"-").concat(s," <").concat(n,".").concat(+a+1,".0-0"):">=".concat(n,".").concat(a,".").concat(o,"-").concat(s," <").concat(+n+1,".0.0-0")):(i("no pr"),h="0"===n?"0"===a?">=".concat(n,".").concat(a,".").concat(o).concat(r," <").concat(n,".").concat(a,".").concat(+o+1,"-0"):">=".concat(n,".").concat(a,".").concat(o).concat(r," <").concat(n,".").concat(+a+1,".0-0"):">=".concat(n,".").concat(a,".").concat(o," <").concat(+n+1,".0.0-0")),i("caret return",h),h}))},I=function(t,e){return i("replaceXRanges",t,e),t.split(/\s+/).map((function(t){return b(t,e)})).join(" ")},b=function(t,e){t=t.trim();var n=e.loose?o[s.XRANGELOOSE]:o[s.XRANGE];return t.replace(n,(function(n,r,a,o,s,h){i("xRange",t,n,r,a,o,s,h);var l=E(a),u=l||E(o),c=u||E(s),f=c;return"="===r&&f&&(r=""),h=e.includePrerelease?"-0":"",l?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&f?(u&&(o=0),s=0,">"===r?(r=">=",u?(a=+a+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",u?a=+a+1:o=+o+1),"<"===r&&(h="-0"),n="".concat(r+a,".").concat(o,".").concat(s).concat(h)):u?n=">=".concat(a,".0.0").concat(h," <").concat(+a+1,".0.0-0"):c&&(n=">=".concat(a,".").concat(o,".0").concat(h," <").concat(a,".").concat(+o+1,".0-0")),i("xRange return",n),n}))},S=function(t,e){return i("replaceStars",t,e),t.trim().replace(o[s.STAR],"")},C=function(t,e){return i("replaceGTE0",t,e),t.trim().replace(o[e.includePrerelease?s.GTE0PRE:s.GTE0],"")},N=function(t){return function(e,n,r,i,a,o,s,h,l,u,c,f,p){return n=E(r)?"":E(i)?">=".concat(r,".0.0").concat(t?"-0":""):E(a)?">=".concat(r,".").concat(i,".0").concat(t?"-0":""):o?">=".concat(n):">=".concat(n).concat(t?"-0":""),h=E(l)?"":E(u)?"<".concat(+l+1,".0.0-0"):E(c)?"<".concat(l,".").concat(+u+1,".0-0"):f?"<=".concat(l,".").concat(u,".").concat(c,"-").concat(f):t?"<".concat(l,".").concat(u,".").concat(+c+1,"-0"):"<=".concat(h),"".concat(n," ").concat(h).trim()}},k=function(t,e,n){for(var a=0;a0){var s=t[o].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0};return Zt}S(re);var ae,oe,se=ie(),he=function(t,e,n){try{e=new se(e,n)}catch(t){return!1}return e.test(t)},le={valid:et,coerce:ot,satisfies:S(he),SEMVER_SPEC_VERSION:C.SEMVER_SPEC_VERSION},ue=0,ce=1,fe=2,pe=[0,1,2,2,3,0],de=function(){function t(e,n,r,o){var s;if(l(this,t),f(this,"autoUpdate",!0),f(this,"skeleton",void 0),f(this,"states",void 0),this._app=e,this._position=new a.Vec3,1===i.TextureAtlas.length){var h,u=T((s=new i.TextureAtlas(n)).pages);try{for(u.s();!(h=u.n()).done;){var c=h.value;c.setTexture(new b(o[c.name]))}}catch(t){u.e(t)}finally{u.f()}}else s=new i.TextureAtlas(n,(function(t){return new b(o[t])}));var p=new i.SkeletonJson(new i.AtlasAttachmentLoader(s));p.scale*=.01;var d=p.readSkeletonData(r);this.skeletonVersion=le.valid(le.coerce(d.version)),this._spine_3_6_0=le.satisfies(this.skeletonVersion,"<=3.6.0"),this._spine_3_7_99=le.satisfies(this.skeletonVersion,"<=3.7.99"),this._spine_4_0_X=le.satisfies(this.skeletonVersion,"~4.0.0"),this._spine_4_1_X=le.satisfies(this.skeletonVersion,"~4.1.23"),this.skeleton=new i.Skeleton(d),this.skeleton.updateWorldTransform(),this.stateData=new i.AnimationStateData(this.skeleton.data),this.states=[new i.AnimationState(this.stateData)],this.clipper=new i.SkeletonClipping,this._node=new a.GraphNode,this._meshes=[],this._meshInstances=[],this._materials={},this._tint={},this._aabb=new a.BoundingBox,this._aabbTempArray=[],this._aabbTempOffset=new a.Vec2,this._aabbTempSize=new a.Vec2,this._renderCounts={vertexCount:0,indexCount:0},this._vertexFormat=null,this._vertexBuffer=null,this._indexBuffer=null,this._priority=0,this._timeScale=1,this._layers=[a.LAYERID_UI],this.init(),this._hidden=!1}return c(t,[{key:"destroy",value:function(){this.removeFromLayers();for(var t=0;t0&&this._renderCounts.vertexCount>0){this.skeleton.getBounds(this._aabbTempOffset,this._aabbTempSize,this._aabbTempArray),this._aabb.center=new a.Vec3(this._aabbTempOffset.x,this._aabbTempOffset.y,0),this._aabb.halfExtents=new a.Vec3(.5*this._aabbTempSize.x,.5*this._aabbTempSize.y,0),(!this._vertexBuffer||this._vertexBuffer.getNumVertices()0&&c.indices.length>0){t&&t!==c.material&&(this.SubmitBatch(e,n,t),t=c.material,e=o,n=0),t=c.material;var f=c.positions,p=c.vertexColor.r,d=c.vertexColor.g,m=c.vertexColor.b,v=c.vertexColor.a,g=c.uvs,y=void 0,E=f.length/2;for(y=0;y0){var r=new a.Mesh(this._app.graphicsDevice);r.vertexBuffer=this._vertexBuffer,r.indexBuffer[0]=this._indexBuffer,r.primitive[0].type=a.PRIMITIVE_TRIANGLES,r.primitive[0].base=t,r.primitive[0].count=e,r.primitive[0].indexed=!0,r.aabb=this._aabb,this._meshes.push(r);var i=new a.MeshInstance(r,this._materials[n],this._node);i.drawOrder=this.priority+this._meshInstances.length,i.visible=!this._hidden,this._meshInstances.push(i)}}},{key:"update",value:function(t){if(!this._hidden){var e;t*=this._timeScale;var n=this.states.length;for(e=0;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function A(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:String(e)}!function(t){var e,n,r,i=function(){function t(t,e,n){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.duration=n}return t.prototype.apply=function(t,e,n,r,i,a,o,s){if(null==t)throw new Error("skeleton cannot be null.");r&&0!=this.duration&&(n%=this.duration,e>0&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;l>>1;;){if(t[(a+1)*n]<=e?r=a+1:i=a,r==i)return(r+1)*n;a=r+i>>>1}},t.linearSearch=function(t,e,n){for(var r=0,i=t.length-n;r<=i;r+=n)if(t[r]>e)return r;return-1},t}();t.Animation=i,function(t){t[t.setup=0]="setup",t[t.current=1]="current",t[t.currentLayered=2]="currentLayered"}(e=t.MixPose||(t.MixPose={})),function(t){t[t.in=0]="in",t[t.out=1]="out"}(n=t.MixDirection||(t.MixDirection={})),function(t){t[t.rotate=0]="rotate",t[t.translate=1]="translate",t[t.scale=2]="scale",t[t.shear=3]="shear",t[t.attachment=4]="attachment",t[t.color=5]="color",t[t.deform=6]="deform",t[t.event=7]="event",t[t.drawOrder=8]="drawOrder",t[t.ikConstraint=9]="ikConstraint",t[t.transformConstraint=10]="transformConstraint",t[t.pathConstraintPosition=11]="pathConstraintPosition",t[t.pathConstraintSpacing=12]="pathConstraintSpacing",t[t.pathConstraintMix=13]="pathConstraintMix",t[t.twoColor=14]="twoColor"}(r=t.TimelineType||(t.TimelineType={}));var a=function(){function e(n){if(n<=0)throw new Error("frameCount must be > 0: "+n);this.curves=t.Utils.newFloatArray((n-1)*e.BEZIER_SIZE)}return e.prototype.getFrameCount=function(){return this.curves.length/e.BEZIER_SIZE+1},e.prototype.setLinear=function(t){this.curves[t*e.BEZIER_SIZE]=e.LINEAR},e.prototype.setStepped=function(t){this.curves[t*e.BEZIER_SIZE]=e.STEPPED},e.prototype.getCurveType=function(t){var n=t*e.BEZIER_SIZE;if(n==this.curves.length)return e.LINEAR;var r=this.curves[n];return r==e.LINEAR?e.LINEAR:r==e.STEPPED?e.STEPPED:e.BEZIER},e.prototype.setCurve=function(t,n,r,i,a){var o=.03*(2*-n+i),s=.03*(2*-r+a),h=.006*(3*(n-i)+1),l=.006*(3*(r-a)+1),u=2*o+h,c=2*s+l,f=.3*n+o+.16666667*h,p=.3*r+s+.16666667*l,d=t*e.BEZIER_SIZE,m=this.curves;m[d++]=e.BEZIER;for(var v=f,g=p,y=d+e.BEZIER_SIZE-1;d=r){var u=void 0,c=void 0;return a==h?(u=0,c=0):(u=i[a-2],c=i[a-1]),c+(i[a+1]-c)*(r-u)/(s-u)}var f=i[a-1];return f+(1-f)*(r-s)/(1-s)},e.LINEAR=0,e.STEPPED=1,e.BEZIER=2,e.BEZIER_SIZE=19,e}();t.CurveTimeline=a;var s=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e<<1),r}return o(a,n),a.prototype.getPropertyId=function(){return(r.rotate<<24)+this.boneIndex},a.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+a.ROTATION]=n},a.prototype.apply=function(t,n,r,o,s,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(r=u[u.length-a.ENTRIES])if(h==e.setup)c.rotation=c.data.rotation+u[u.length+a.PREV_ROTATION]*s;else{var p=c.data.rotation+u[u.length+a.PREV_ROTATION]-c.rotation;p-=360*(16384-(16384.499999999996-p/360|0)),c.rotation+=p*s}else{var d=i.binarySearch(u,r,a.ENTRIES),m=u[d+a.PREV_ROTATION],v=u[d],g=this.getCurvePercent((d>>1)-1,1-(r-v)/(u[d+a.PREV_TIME]-v)),y=u[d+a.ROTATION]-m;y=m+(y-=360*(16384-(16384.499999999996-y/360|0)))*g,h==e.setup?(y-=360*(16384-(16384.499999999996-y/360|0)),c.rotation=c.data.rotation+y*s):(y=c.data.rotation+y-c.rotation,y-=360*(16384-(16384.499999999996-y/360|0)),c.rotation+=y*s)}},a.ENTRIES=2,a.PREV_TIME=-2,a.PREV_ROTATION=-1,a.ROTATION=1,a}(a);t.RotateTimeline=s;var h=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*a.ENTRIES),r}return o(a,n),a.prototype.getPropertyId=function(){return(r.translate<<24)+this.boneIndex},a.prototype.setFrame=function(t,e,n,r){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.X]=n,this.frames[t+a.Y]=r},a.prototype.apply=function(t,n,r,o,s,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(r=u[u.length-a.ENTRIES])f=u[u.length+a.PREV_X],p=u[u.length+a.PREV_Y];else{var d=i.binarySearch(u,r,a.ENTRIES);f=u[d+a.PREV_X],p=u[d+a.PREV_Y];var m=u[d],v=this.getCurvePercent(d/a.ENTRIES-1,1-(r-m)/(u[d+a.PREV_TIME]-m));f+=(u[d+a.X]-f)*v,p+=(u[d+a.Y]-p)*v}h==e.setup?(c.x=c.data.x+f*s,c.y=c.data.y+p*s):(c.x+=(c.data.x+f-c.x)*s,c.y+=(c.data.y+p-c.y)*s)}},a.ENTRIES=3,a.PREV_TIME=-3,a.PREV_X=-2,a.PREV_Y=-1,a.X=1,a.Y=2,a}(a);t.TranslateTimeline=h;var l=function(a){function s(t){return a.call(this,t)||this}return o(s,a),s.prototype.getPropertyId=function(){return(r.scale<<24)+this.boneIndex},s.prototype.apply=function(r,a,o,h,l,u,c){var f=this.frames,p=r.bones[this.boneIndex];if(o=f[f.length-s.ENTRIES])d=f[f.length+s.PREV_X]*p.data.scaleX,m=f[f.length+s.PREV_Y]*p.data.scaleY;else{var v=i.binarySearch(f,o,s.ENTRIES);d=f[v+s.PREV_X],m=f[v+s.PREV_Y];var g=f[v],y=this.getCurvePercent(v/s.ENTRIES-1,1-(o-g)/(f[v+s.PREV_TIME]-g));d=(d+(f[v+s.X]-d)*y)*p.data.scaleX,m=(m+(f[v+s.Y]-m)*y)*p.data.scaleY}if(1==l)p.scaleX=d,p.scaleY=m;else{var E=0,w=0;u==e.setup?(E=p.data.scaleX,w=p.data.scaleY):(E=p.scaleX,w=p.scaleY),c==n.out?(d=Math.abs(d)*t.MathUtils.signum(E),m=Math.abs(m)*t.MathUtils.signum(w)):(E=Math.abs(E)*t.MathUtils.signum(d),w=Math.abs(w)*t.MathUtils.signum(m)),p.scaleX=E+(d-E)*l,p.scaleY=w+(m-w)*l}}},s}(h);t.ScaleTimeline=l;var u=function(t){function n(e){return t.call(this,e)||this}return o(n,t),n.prototype.getPropertyId=function(){return(r.shear<<24)+this.boneIndex},n.prototype.apply=function(t,r,a,o,s,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(a=u[u.length-n.ENTRIES])f=u[u.length+n.PREV_X],p=u[u.length+n.PREV_Y];else{var d=i.binarySearch(u,a,n.ENTRIES);f=u[d+n.PREV_X],p=u[d+n.PREV_Y];var m=u[d],v=this.getCurvePercent(d/n.ENTRIES-1,1-(a-m)/(u[d+n.PREV_TIME]-m));f+=(u[d+n.X]-f)*v,p+=(u[d+n.Y]-p)*v}h==e.setup?(c.shearX=c.data.shearX+f*s,c.shearY=c.data.shearY+p*s):(c.shearX+=(c.data.shearX+f-c.shearX)*s,c.shearY+=(c.data.shearY+p-c.shearY)*s)}},n}(h);t.ShearTimeline=u;var c=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*a.ENTRIES),r}return o(a,n),a.prototype.getPropertyId=function(){return(r.color<<24)+this.slotIndex},a.prototype.setFrame=function(t,e,n,r,i,o){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.R]=n,this.frames[t+a.G]=r,this.frames[t+a.B]=i,this.frames[t+a.A]=o},a.prototype.apply=function(t,n,r,o,s,h,l){var u=t.slots[this.slotIndex],c=this.frames;if(r=c[c.length-a.ENTRIES]){var y=c.length;d=c[y+a.PREV_R],m=c[y+a.PREV_G],v=c[y+a.PREV_B],g=c[y+a.PREV_A]}else{var E=i.binarySearch(c,r,a.ENTRIES);d=c[E+a.PREV_R],m=c[E+a.PREV_G],v=c[E+a.PREV_B],g=c[E+a.PREV_A];var w=c[E],x=this.getCurvePercent(E/a.ENTRIES-1,1-(r-w)/(c[E+a.PREV_TIME]-w));d+=(c[E+a.R]-d)*x,m+=(c[E+a.G]-m)*x,v+=(c[E+a.B]-v)*x,g+=(c[E+a.A]-g)*x}if(1==s)u.color.set(d,m,v,g);else{f=u.color;h==e.setup&&f.setFromColor(u.data.color),f.add((d-f.r)*s,(m-f.g)*s,(v-f.b)*s,(g-f.a)*s)}}},a.ENTRIES=5,a.PREV_TIME=-5,a.PREV_R=-4,a.PREV_G=-3,a.PREV_B=-2,a.PREV_A=-1,a.R=1,a.G=2,a.B=3,a.A=4,a}(a);t.ColorTimeline=c;var f=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*a.ENTRIES),r}return o(a,n),a.prototype.getPropertyId=function(){return(r.twoColor<<24)+this.slotIndex},a.prototype.setFrame=function(t,e,n,r,i,o,s,h,l){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.R]=n,this.frames[t+a.G]=r,this.frames[t+a.B]=i,this.frames[t+a.A]=o,this.frames[t+a.R2]=s,this.frames[t+a.G2]=h,this.frames[t+a.B2]=l},a.prototype.apply=function(t,n,r,o,s,h,l){var u=t.slots[this.slotIndex],c=this.frames;if(r=c[c.length-a.ENTRIES]){var T=c.length;v=c[T+a.PREV_R],g=c[T+a.PREV_G],y=c[T+a.PREV_B],E=c[T+a.PREV_A],w=c[T+a.PREV_R2],x=c[T+a.PREV_G2],A=c[T+a.PREV_B2]}else{var M=i.binarySearch(c,r,a.ENTRIES);v=c[M+a.PREV_R],g=c[M+a.PREV_G],y=c[M+a.PREV_B],E=c[M+a.PREV_A],w=c[M+a.PREV_R2],x=c[M+a.PREV_G2],A=c[M+a.PREV_B2];var R=c[M],I=this.getCurvePercent(M/a.ENTRIES-1,1-(r-R)/(c[M+a.PREV_TIME]-R));v+=(c[M+a.R]-v)*I,g+=(c[M+a.G]-g)*I,y+=(c[M+a.B]-y)*I,E+=(c[M+a.A]-E)*I,w+=(c[M+a.R2]-w)*I,x+=(c[M+a.G2]-x)*I,A+=(c[M+a.B2]-A)*I}if(1==s)u.color.set(v,g,y,E),u.darkColor.set(w,x,A,1);else{f=u.color,p=u.darkColor;h==e.setup&&(f.setFromColor(u.data.color),p.setFromColor(u.data.darkColor)),f.add((v-f.r)*s,(g-f.g)*s,(y-f.b)*s,(E-f.a)*s),p.add((w-p.r)*s,(x-p.g)*s,(A-p.b)*s,0)}}},a.ENTRIES=8,a.PREV_TIME=-8,a.PREV_R=-7,a.PREV_G=-6,a.PREV_B=-5,a.PREV_A=-4,a.PREV_R2=-3,a.PREV_G2=-2,a.PREV_B2=-1,a.R=1,a.G=2,a.B=3,a.A=4,a.R2=5,a.G2=6,a.B2=7,a}(a);t.TwoColorTimeline=f;var p=function(){function a(e){this.frames=t.Utils.newFloatArray(e),this.attachmentNames=new Array(e)}return a.prototype.getPropertyId=function(){return(r.attachment<<24)+this.slotIndex},a.prototype.getFrameCount=function(){return this.frames.length},a.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},a.prototype.apply=function(t,r,a,o,s,h,l){var u=t.slots[this.slotIndex];if(l!=n.out||h!=e.setup){var c=this.frames;if(a=c[c.length-1]?c.length-1:i.binarySearch(c,a,1)-1;var d=this.attachmentNames[p];t.slots[this.slotIndex].setAttachment(null==d?null:t.getAttachment(this.slotIndex,d))}}else{var m=u.data.attachmentName;u.setAttachment(null==m?null:t.getAttachment(this.slotIndex,m))}},a}();t.AttachmentTimeline=p;var d=null,m=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e),r.frameVertices=new Array(e),null==d&&(d=t.Utils.newFloatArray(64)),r}return o(a,n),a.prototype.getPropertyId=function(){return(r.deform<<27)+ +this.attachment.id+this.slotIndex},a.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},a.prototype.apply=function(n,r,a,o,s,h,l){var u=n.slots[this.slotIndex],c=u.getAttachment();if(c instanceof t.VertexAttachment&&c.applyDeform(this.attachment)){var f=u.attachmentVertices;0==f.length&&(s=1);var p=this.frameVertices,d=p[0].length,m=this.frames;if(a=m[m.length-1]){var x=p[m.length-1];if(1==s)t.Utils.arrayCopy(x,0,w,0,d);else if(h==e.setup){if(null==(v=c).bones)for(var A=v.vertices,T=0;Tn)this.apply(t,e,Number.MAX_VALUE,r,a,o,s),e=-1;else if(e>=h[l-1])return;if(!(n0&&h[u-1]==c;)u--;for(;u=h[u];u++)r.push(this.events[u])}}},e}();t.EventTimeline=v;var g=function(){function a(e){this.frames=t.Utils.newFloatArray(e),this.drawOrders=new Array(e)}return a.prototype.getPropertyId=function(){return r.drawOrder<<24},a.prototype.getFrameCount=function(){return this.frames.length},a.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},a.prototype.apply=function(r,a,o,s,h,l,u){var c=r.drawOrder,f=r.slots;if(u!=n.out||l!=e.setup){var p=this.frames;if(o=p[p.length-1]?p.length-1:i.binarySearch(p,o)-1;var m=this.drawOrders[d];if(null==m)t.Utils.arrayCopy(f,0,c,0,f.length);else for(var v=0,g=m.length;v=c[c.length-s.ENTRIES])l==e.setup?(f.mix=f.data.mix+(c[c.length+s.PREV_MIX]-f.data.mix)*h,f.bendDirection=u==n.out?f.data.bendDirection:c[c.length+s.PREV_BEND_DIRECTION]):(f.mix+=(c[c.length+s.PREV_MIX]-f.mix)*h,u==n.in&&(f.bendDirection=c[c.length+s.PREV_BEND_DIRECTION]));else{var p=i.binarySearch(c,a,s.ENTRIES),d=c[p+s.PREV_MIX],m=c[p],v=this.getCurvePercent(p/s.ENTRIES-1,1-(a-m)/(c[p+s.PREV_TIME]-m));l==e.setup?(f.mix=f.data.mix+(d+(c[p+s.MIX]-d)*v-f.data.mix)*h,f.bendDirection=u==n.out?f.data.bendDirection:c[p+s.PREV_BEND_DIRECTION]):(f.mix+=(d+(c[p+s.MIX]-d)*v-f.mix)*h,u==n.in&&(f.bendDirection=c[p+s.PREV_BEND_DIRECTION]))}},s.ENTRIES=3,s.PREV_TIME=-3,s.PREV_MIX=-2,s.PREV_BEND_DIRECTION=-1,s.MIX=1,s.BEND_DIRECTION=2,s}(a);t.IkConstraintTimeline=y;var E=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*a.ENTRIES),r}return o(a,n),a.prototype.getPropertyId=function(){return(r.transformConstraint<<24)+this.transformConstraintIndex},a.prototype.setFrame=function(t,e,n,r,i,o){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.ROTATE]=n,this.frames[t+a.TRANSLATE]=r,this.frames[t+a.SCALE]=i,this.frames[t+a.SHEAR]=o},a.prototype.apply=function(t,n,r,o,s,h,l){var u=this.frames,c=t.transformConstraints[this.transformConstraintIndex];if(r=u[u.length-a.ENTRIES]){var g=u.length;p=u[g+a.PREV_ROTATE],d=u[g+a.PREV_TRANSLATE],m=u[g+a.PREV_SCALE],v=u[g+a.PREV_SHEAR]}else{var y=i.binarySearch(u,r,a.ENTRIES);p=u[y+a.PREV_ROTATE],d=u[y+a.PREV_TRANSLATE],m=u[y+a.PREV_SCALE],v=u[y+a.PREV_SHEAR];var E=u[y],w=this.getCurvePercent(y/a.ENTRIES-1,1-(r-E)/(u[y+a.PREV_TIME]-E));p+=(u[y+a.ROTATE]-p)*w,d+=(u[y+a.TRANSLATE]-d)*w,m+=(u[y+a.SCALE]-m)*w,v+=(u[y+a.SHEAR]-v)*w}if(h==e.setup){f=c.data;c.rotateMix=f.rotateMix+(p-f.rotateMix)*s,c.translateMix=f.translateMix+(d-f.translateMix)*s,c.scaleMix=f.scaleMix+(m-f.scaleMix)*s,c.shearMix=f.shearMix+(v-f.shearMix)*s}else c.rotateMix+=(p-c.rotateMix)*s,c.translateMix+=(d-c.translateMix)*s,c.scaleMix+=(m-c.scaleMix)*s,c.shearMix+=(v-c.shearMix)*s}},a.ENTRIES=5,a.PREV_TIME=-5,a.PREV_ROTATE=-4,a.PREV_TRANSLATE=-3,a.PREV_SCALE=-2,a.PREV_SHEAR=-1,a.ROTATE=1,a.TRANSLATE=2,a.SCALE=3,a.SHEAR=4,a}(a);t.TransformConstraintTimeline=E;var w=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*a.ENTRIES),r}return o(a,n),a.prototype.getPropertyId=function(){return(r.pathConstraintPosition<<24)+this.pathConstraintIndex},a.prototype.setFrame=function(t,e,n){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.VALUE]=n},a.prototype.apply=function(t,n,r,o,s,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(r=u[u.length-a.ENTRIES])f=u[u.length+a.PREV_VALUE];else{var p=i.binarySearch(u,r,a.ENTRIES);f=u[p+a.PREV_VALUE];var d=u[p],m=this.getCurvePercent(p/a.ENTRIES-1,1-(r-d)/(u[p+a.PREV_TIME]-d));f+=(u[p+a.VALUE]-f)*m}h==e.setup?c.position=c.data.position+(f-c.data.position)*s:c.position+=(f-c.position)*s}},a.ENTRIES=2,a.PREV_TIME=-2,a.PREV_VALUE=-1,a.VALUE=1,a}(a);t.PathConstraintPositionTimeline=w;var x=function(t){function n(e){return t.call(this,e)||this}return o(n,t),n.prototype.getPropertyId=function(){return(r.pathConstraintSpacing<<24)+this.pathConstraintIndex},n.prototype.apply=function(t,r,a,o,s,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(a=u[u.length-n.ENTRIES])f=u[u.length+n.PREV_VALUE];else{var p=i.binarySearch(u,a,n.ENTRIES);f=u[p+n.PREV_VALUE];var d=u[p],m=this.getCurvePercent(p/n.ENTRIES-1,1-(a-d)/(u[p+n.PREV_TIME]-d));f+=(u[p+n.VALUE]-f)*m}h==e.setup?c.spacing=c.data.spacing+(f-c.data.spacing)*s:c.spacing+=(f-c.spacing)*s}},n}(w);t.PathConstraintSpacingTimeline=x;var A=function(n){function a(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*a.ENTRIES),r}return o(a,n),a.prototype.getPropertyId=function(){return(r.pathConstraintMix<<24)+this.pathConstraintIndex},a.prototype.setFrame=function(t,e,n,r){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.ROTATE]=n,this.frames[t+a.TRANSLATE]=r},a.prototype.apply=function(t,n,r,o,s,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(r=u[u.length-a.ENTRIES])f=u[u.length+a.PREV_ROTATE],p=u[u.length+a.PREV_TRANSLATE];else{var d=i.binarySearch(u,r,a.ENTRIES);f=u[d+a.PREV_ROTATE],p=u[d+a.PREV_TRANSLATE];var m=u[d],v=this.getCurvePercent(d/a.ENTRIES-1,1-(r-m)/(u[d+a.PREV_TIME]-m));f+=(u[d+a.ROTATE]-f)*v,p+=(u[d+a.TRANSLATE]-p)*v}h==e.setup?(c.rotateMix=c.data.rotateMix+(f-c.data.rotateMix)*s,c.translateMix=c.data.translateMix+(p-c.data.translateMix)*s):(c.rotateMix+=(f-c.rotateMix)*s,c.translateMix+=(p-c.translateMix)*s)}},a.ENTRIES=3,a.PREV_TIME=-3,a.PREV_ROTATE=-2,a.PREV_TRANSLATE=-1,a.ROTATE=1,a.TRANSLATE=2,a}(a);t.PathConstraintMixTimeline=A}(i||(i={})),function(t){var e=function(){function e(e){this.tracks=new Array,this.events=new Array,this.listeners=new Array,this.queue=new i(this),this.propertyIDs=new t.IntSet,this.mixingTo=new Array,this.animationsChanged=!1,this.timeScale=1,this.trackEntryPool=new t.Pool((function(){return new n})),this.data=e}return e.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,r=e.length;n0){if(i.delay-=a,i.delay>0)continue;a=-i.delay,i.delay=0}var o=i.next;if(null!=o){var s=i.trackLast-o.delay;if(s>=0){for(o.delay=0,o.trackTime=s+t*o.timeScale,i.trackTime+=a,this.setCurrent(n,o,!0);null!=o.mixingFrom;)o.mixTime+=a,o=o.mixingFrom;continue}}else if(i.trackLast>=i.trackEnd&&null==i.mixingFrom){e[n]=null,this.queue.end(i),this.disposeNext(i);continue}if(null!=i.mixingFrom&&this.updateMixingFrom(i,t)){var h=i.mixingFrom;for(i.mixingFrom=null;null!=h;)this.queue.end(h),h=h.mixingFrom}i.trackTime+=a}}this.queue.drain()},e.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(null==n)return!0;var r=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,t.mixTime>0&&(t.mixTime>=t.mixDuration||0==t.timeScale)?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),r):(n.trackTime+=e*n.timeScale,t.mixTime+=e*t.timeScale,!1)},e.prototype.apply=function(n){if(null==n)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var r=this.events,i=this.tracks,a=!1,o=0,s=i.length;o0)){a=!0;var l=0==o?t.MixPose.current:t.MixPose.currentLayered,u=h.alpha;null!=h.mixingFrom?u*=this.applyMixingFrom(h,n,l):h.trackTime>=h.trackEnd&&null==h.next&&(u=0);var c=h.animationLast,f=h.getAnimationTime(),p=h.animation.timelines.length,d=h.animation.timelines;if(1==u)for(var m=0;m=e.FIRST?t.MixPose.setup:l;E instanceof t.RotateTimeline?this.applyRotateTimeline(E,n,f,u,w,y,m<<1,g):(t.Utils.webkit602BugfixHelper(u,w),E.apply(n,c,f,r,u,w,t.MixDirection.in))}}this.queueEvents(h,f),r.length=0,h.nextAnimationLast=f,h.nextTrackLast=h.trackTime}}return this.queue.drain(),a},e.prototype.applyMixingFrom=function(n,r,i){var a=n.mixingFrom;null!=a.mixingFrom&&this.applyMixingFrom(a,r,i);var o=0;0==n.mixDuration?(o=1,i=t.MixPose.setup):(o=n.mixTime/n.mixDuration)>1&&(o=1);var s=o0&&this.queueEvents(a,c),this.events.length=0,a.nextAnimationLast=c,a.nextTrackLast=a.trackTime,o},e.prototype.applyRotateTimeline=function(e,n,r,i,a,o,s,h){if(h&&(o[s]=0),1!=i){var l=e,u=l.frames,c=n.bones[l.boneIndex];if(r=u[u.length-t.RotateTimeline.ENTRIES])f=c.data.rotation+u[u.length+t.RotateTimeline.PREV_ROTATION];else{var p=t.Animation.binarySearch(u,r,t.RotateTimeline.ENTRIES),d=u[p+t.RotateTimeline.PREV_ROTATION],m=u[p],v=l.getCurvePercent((p>>1)-1,1-(r-m)/(u[p+t.RotateTimeline.PREV_TIME]-m));f=u[p+t.RotateTimeline.ROTATION]-d,f=d+(f-=360*(16384-(16384.499999999996-f/360|0)))*v+c.data.rotation,f-=360*(16384-(16384.499999999996-f/360|0))}var g=a==t.MixPose.setup?c.data.rotation:c.rotation,y=0,E=f-g;if(0==E)y=o[s];else{E-=360*(16384-(16384.499999999996-E/360|0));var w=0,x=0;h?(w=0,x=E):(w=o[s],x=o[s+1]);var A=E>0,T=w>=0;t.MathUtils.signum(x)!=t.MathUtils.signum(E)&&Math.abs(x)<=90&&(Math.abs(w)>180&&(w+=360*t.MathUtils.signum(w)),T=A),y=E+w-w%360,T!=A&&(y+=360*t.MathUtils.signum(w)),o[s]=y}o[s+1]=E,g+=y*i,c.rotation=g-360*(16384-(16384.499999999996-g/360|0))}}else e.apply(n,0,r,null,1,a,t.MixDirection.in)},e.prototype.queueEvents=function(t,e){for(var n=t.animationStart,r=t.animationEnd,i=r-n,a=t.trackLast%i,o=this.events,s=0,h=o.length;sr||this.queue.event(t,l)}for((t.loop?0==i||a>t.trackTime%i:e>=r&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var n=e;;){var r=n.mixingFrom;if(null==r)break;this.queue.end(r),n.mixingFrom=null,n=r}this.tracks[e.trackIndex]=null,this.queue.drain()}}},e.prototype.setCurrent=function(t,e,n){var r=this.expandToIndex(t);this.tracks[t]=e,null!=r&&(n&&this.queue.interrupt(r),e.mixingFrom=r,e.mixTime=0,null!=r.mixingFrom&&r.mixDuration>0&&(e.interruptAlpha*=Math.min(1,r.mixTime/r.mixDuration)),r.timelinesRotation.length=0),this.queue.start(e)},e.prototype.setAnimation=function(t,e,n){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,r,n)},e.prototype.setAnimationWith=function(t,e,n){if(null==e)throw new Error("animation cannot be null.");var r=!0,i=this.expandToIndex(t);null!=i&&(-1==i.nextTrackLast?(this.tracks[t]=i.mixingFrom,this.queue.interrupt(i),this.queue.end(i),this.disposeNext(i),i=i.mixingFrom,r=!1):this.disposeNext(i));var a=this.trackEntry(t,e,n,i);return this.setCurrent(t,a,r),this.queue.drain(),a},e.prototype.addAnimation=function(t,e,n,r){var i=this.data.skeletonData.findAnimation(e);if(null==i)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,i,n,r)},e.prototype.addAnimationWith=function(t,e,n,r){if(null==e)throw new Error("animation cannot be null.");var i=this.expandToIndex(t);if(null!=i)for(;null!=i.next;)i=i.next;var a=this.trackEntry(t,e,n,i);if(null==i)this.setCurrent(t,a,!0),this.queue.drain();else if(i.next=a,r<=0){var o=i.animationEnd-i.animationStart;0!=o?(i.loop?r+=o*(1+(i.trackTime/o|0)):r+=o,r-=this.data.getMix(i.animation,e)):r=0}return a.delay=r,a},e.prototype.setEmptyAnimation=function(t,n){var r=this.setAnimationWith(t,e.emptyAnimation,!1);return r.mixDuration=n,r.trackEnd=n,r},e.prototype.addEmptyAnimation=function(t,n,r){r<=0&&(r-=n);var i=this.addAnimationWith(t,e.emptyAnimation,!1,r);return i.mixDuration=n,i.trackEnd=n,i},e.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,r=this.tracks.length;n=this.tracks.length?null:this.tracks[t]},e.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},e.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)},e.prototype.clearListeners=function(){this.listeners.length=0},e.prototype.clearListenerNotifications=function(){this.queue.clear()},e.emptyAnimation=new t.Animation("",[],0),e.SUBSEQUENT=0,e.FIRST=1,e.DIP=2,e.DIP_MIX=3,e}();t.AnimationState=e;var n=function(){function n(){this.timelineData=new Array,this.timelineDipMix=new Array,this.timelinesRotation=new Array}return n.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.animation=null,this.listener=null,this.timelineData.length=0,this.timelineDipMix.length=0,this.timelinesRotation.length=0},n.prototype.setTimelineData=function(n,r,i){null!=n&&r.push(n);var a=null!=this.mixingFrom?this.mixingFrom.setTimelineData(this,r,i):this;null!=n&&r.pop();var o=r,s=r.length-1,h=this.animation.timelines,l=this.animation.timelines.length,u=t.Utils.setArraySize(this.timelineData,l);this.timelineDipMix.length=0;var c=t.Utils.setArraySize(this.timelineDipMix,l);t:for(var f=0;f=0;d--){var m=o[d];if(!m.hasTimeline(p)&&m.mixDuration>0){u[f]=e.DIP_MIX,c[f]=m;continue t}}u[f]=e.DIP}else u[f]=e.FIRST;else u[f]=e.SUBSEQUENT}return a},n.prototype.hasTimeline=function(t){for(var e=this.animation.timelines,n=0,r=e.length;n=this.animationEnd-this.animationStart},n.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},n}();t.TrackEntry=n;var r,i=function(){function t(t){this.objects=[],this.drainDisabled=!1,this.animState=t}return t.prototype.start=function(t){this.objects.push(r.start),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.interrupt=function(t){this.objects.push(r.interrupt),this.objects.push(t)},t.prototype.end=function(t){this.objects.push(r.end),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.dispose=function(t){this.objects.push(r.dispose),this.objects.push(t)},t.prototype.complete=function(t){this.objects.push(r.complete),this.objects.push(t)},t.prototype.event=function(t,e){this.objects.push(r.event),this.objects.push(t),this.objects.push(e)},t.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,n=0;n=0?n.substring(0,n.lastIndexOf("/")):"";n=this.pathPrefix+n,this.toLoad++,e.downloadText(n,(function(e){var s={count:0},h=new Array;try{new t.TextureAtlas(e,(function(e){h.push(o+"/"+e);var n=document.createElement("img");return n.width=16,n.height=16,new t.FakeTexture(n)}))}catch(t){var l=t;return a.errors[n]="Couldn't load texture atlas "+n+": "+l.message,i&&i(n,"Couldn't load texture atlas "+n+": "+l.message),a.toLoad--,void a.loaded++}for(var u=function(l){var u=!1;a.loadTexture(l,(function(l,c){if(s.count++,s.count==h.length)if(u)a.errors[n]="Couldn't load texture atlas page "+l+"} of atlas "+n,i&&i(n,"Couldn't load texture atlas page "+l+" of atlas "+n),a.toLoad--,a.loaded++;else try{var f=new t.TextureAtlas(e,(function(t){return a.get(o+"/"+t)}));a.assets[n]=f,r&&r(n,f),a.toLoad--,a.loaded++}catch(t){var p=t;a.errors[n]="Couldn't load texture atlas "+n+": "+p.message,i&&i(n,"Couldn't load texture atlas "+n+": "+p.message),a.toLoad--,a.loaded++}}),(function(t,e){u=!0,s.count++,s.count==h.length&&(a.errors[n]="Couldn't load texture atlas page "+t+"} of atlas "+n,i&&i(n,"Couldn't load texture atlas page "+t+" of atlas "+n),a.toLoad--,a.loaded++)}))},c=0,f=h;c0},e.prototype.getErrors=function(){return this.errors},e}();t.AssetManager=e}(i||(i={})),function(t){var e=function(){function e(t){this.atlas=t}return e.prototype.newRegionAttachment=function(e,n,r){var i=this.atlas.findRegion(r);if(null==i)throw new Error("Region not found in atlas: "+r+" (region attachment: "+n+")");i.renderObject=i;var a=new t.RegionAttachment(n);return a.setRegion(i),a},e.prototype.newMeshAttachment=function(e,n,r){var i=this.atlas.findRegion(r);if(null==i)throw new Error("Region not found in atlas: "+r+" (mesh attachment: "+n+")");i.renderObject=i;var a=new t.MeshAttachment(n);return a.region=i,a},e.prototype.newBoundingBoxAttachment=function(e,n){return new t.BoundingBoxAttachment(n)},e.prototype.newPathAttachment=function(e,n){return new t.PathAttachment(n)},e.prototype.newPointAttachment=function(e,n){return new t.PointAttachment(n)},e.prototype.newClippingAttachment=function(e,n){return new t.ClippingAttachment(n)},e}();t.AtlasAttachmentLoader=e}(i||(i={})),function(t){var e;(e=t.BlendMode||(t.BlendMode={}))[e.Normal=0]="Normal",e[e.Additive=1]="Additive",e[e.Multiply=2]="Multiply",e[e.Screen=3]="Screen"}(i||(i={})),function(t){var e=function(){function e(t,e,n){if(this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.appliedValid=!1,this.a=0,this.b=0,this.worldX=0,this.c=0,this.d=0,this.worldY=0,this.sorted=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=n,this.setToSetupPose()}return e.prototype.update=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransformWith=function(e,n,r,i,a,o,s){this.ax=e,this.ay=n,this.arotation=r,this.ascaleX=i,this.ascaleY=a,this.ashearX=o,this.ashearY=s,this.appliedValid=!0;var h=this.parent;if(null==h){var l=r+90+s,u=t.MathUtils.cosDeg(r+o)*i,c=t.MathUtils.cosDeg(l)*a,f=t.MathUtils.sinDeg(r+o)*i,p=t.MathUtils.sinDeg(l)*a,d=this.skeleton;return d.flipX&&(e=-e,u=-u,c=-c),d.flipY&&(n=-n,f=-f,p=-p),this.a=u,this.b=c,this.c=f,this.d=p,this.worldX=e+d.x,void(this.worldY=n+d.y)}var m=h.a,v=h.b,g=h.c,y=h.d;switch(this.worldX=m*e+v*n+h.worldX,this.worldY=g*e+y*n+h.worldY,this.data.transformMode){case t.TransformMode.Normal:l=r+90+s,u=t.MathUtils.cosDeg(r+o)*i,c=t.MathUtils.cosDeg(l)*a,f=t.MathUtils.sinDeg(r+o)*i,p=t.MathUtils.sinDeg(l)*a;return this.a=m*u+v*f,this.b=m*c+v*p,this.c=g*u+y*f,void(this.d=g*c+y*p);case t.TransformMode.OnlyTranslation:l=r+90+s;this.a=t.MathUtils.cosDeg(r+o)*i,this.b=t.MathUtils.cosDeg(l)*a,this.c=t.MathUtils.sinDeg(r+o)*i,this.d=t.MathUtils.sinDeg(l)*a;break;case t.TransformMode.NoRotationOrReflection:var E=0;(A=m*m+g*g)>1e-4?(v=g*(A=Math.abs(m*y-v*g)/A),y=m*A,E=Math.atan2(g,m)*t.MathUtils.radDeg):(m=0,g=0,E=90-Math.atan2(y,v)*t.MathUtils.radDeg);var w=r+o-E,x=r+s-E+90;u=t.MathUtils.cosDeg(w)*i,c=t.MathUtils.cosDeg(x)*a,f=t.MathUtils.sinDeg(w)*i,p=t.MathUtils.sinDeg(x)*a;this.a=m*u-v*f,this.b=m*c-v*p,this.c=g*u+y*f,this.d=g*c+y*p;break;case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:var A,T=t.MathUtils.cosDeg(r),M=t.MathUtils.sinDeg(r),R=m*T+v*M,I=g*T+y*M;(A=Math.sqrt(R*R+I*I))>1e-5&&(A=1/A),R*=A,I*=A,A=Math.sqrt(R*R+I*I);var b=Math.PI/2+Math.atan2(I,R),S=Math.cos(b)*A,C=Math.sin(b)*A;u=t.MathUtils.cosDeg(o)*i,c=t.MathUtils.cosDeg(90+s)*a,f=t.MathUtils.sinDeg(o)*i,p=t.MathUtils.sinDeg(90+s)*a;return(this.data.transformMode!=t.TransformMode.NoScaleOrReflection?m*y-v*g<0:this.skeleton.flipX!=this.skeleton.flipY)&&(S=-S,C=-C),this.a=R*u+S*f,this.b=R*c+S*p,this.c=I*u+C*f,void(this.d=I*c+C*p)}this.skeleton.flipX&&(this.a=-this.a,this.b=-this.b),this.skeleton.flipY&&(this.c=-this.c,this.d=-this.d)},e.prototype.setToSetupPose=function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY},e.prototype.getWorldRotationX=function(){return Math.atan2(this.c,this.a)*t.MathUtils.radDeg},e.prototype.getWorldRotationY=function(){return Math.atan2(this.d,this.b)*t.MathUtils.radDeg},e.prototype.getWorldScaleX=function(){return Math.sqrt(this.a*this.a+this.c*this.c)},e.prototype.getWorldScaleY=function(){return Math.sqrt(this.b*this.b+this.d*this.d)},e.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var e=this.parent;if(null==e)return this.ax=this.worldX,this.ay=this.worldY,this.arotation=Math.atan2(this.c,this.a)*t.MathUtils.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*t.MathUtils.radDeg);var n=e.a,r=e.b,i=e.c,a=e.d,o=1/(n*a-r*i),s=this.worldX-e.worldX,h=this.worldY-e.worldY;this.ax=s*a*o-h*r*o,this.ay=h*n*o-s*i*o;var l=o*a,u=o*n,c=o*r,f=o*i,p=l*this.a-c*this.c,d=l*this.b-c*this.d,m=u*this.c-f*this.a,v=u*this.d-f*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(p*p+m*m),this.ascaleX>1e-4){var g=p*v-d*m;this.ascaleY=g/this.ascaleX,this.ashearY=Math.atan2(p*d+m*v,g)*t.MathUtils.radDeg,this.arotation=Math.atan2(m,p)*t.MathUtils.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(d*d+v*v),this.ashearY=0,this.arotation=90-Math.atan2(v,d)*t.MathUtils.radDeg},e.prototype.worldToLocal=function(t){var e=this.a,n=this.b,r=this.c,i=this.d,a=1/(e*i-n*r),o=t.x-this.worldX,s=t.y-this.worldY;return t.x=o*i*a-s*n*a,t.y=s*e*a-o*r*a,t},e.prototype.localToWorld=function(t){var e=t.x,n=t.y;return t.x=e*this.a+n*this.b+this.worldX,t.y=e*this.c+n*this.d+this.worldY,t},e.prototype.worldToLocalRotation=function(e){var n=t.MathUtils.sinDeg(e),r=t.MathUtils.cosDeg(e);return Math.atan2(this.a*n-this.c*r,this.d*r-this.b*n)*t.MathUtils.radDeg},e.prototype.localToWorldRotation=function(e){var n=t.MathUtils.sinDeg(e),r=t.MathUtils.cosDeg(e);return Math.atan2(r*this.c+n*this.d,r*this.a+n*this.b)*t.MathUtils.radDeg},e.prototype.rotateWorld=function(e){var n=this.a,r=this.b,i=this.c,a=this.d,o=t.MathUtils.cosDeg(e),s=t.MathUtils.sinDeg(e);this.a=o*n-s*i,this.b=o*r-s*a,this.c=s*n+o*i,this.d=s*r+o*a,this.appliedValid=!1},e}();t.Bone=e}(i||(i={})),function(t){var e,n=function(t,n,r){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=e.Normal,t<0)throw new Error("index must be >= 0.");if(null==n)throw new Error("name cannot be null.");this.index=t,this.name=n,this.parent=r};t.BoneData=n,function(t){t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection"}(e=t.TransformMode||(t.TransformMode={}))}(i||(i={})),function(t){var e=function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e};t.Event=e}(i||(i={})),function(t){var e=function(t){this.name=t};t.EventData=e}(i||(i={})),function(t){var e=function(){function e(t,e){if(this.mix=1,this.bendDirection=0,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.bendDirection=t.bendDirection,this.bones=new Array;for(var n=0;n180?c-=360:c<-180&&(c+=360),e.updateWorldTransformWith(e.ax,e.ay,e.arotation+c*i,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)},e.prototype.apply2=function(e,n,r,i,a,o){if(0!=o){e.appliedValid||e.updateAppliedTransform(),n.appliedValid||n.updateAppliedTransform();var s=e.ax,h=e.ay,l=e.ascaleX,u=e.ascaleY,c=n.ascaleX,f=0,p=0,d=0;l<0?(l=-l,f=180,d=-1):(f=0,d=1),u<0&&(u=-u,d=-d),c<0?(c=-c,p=180):p=0;var m=n.ax,v=0,g=0,y=0,E=e.a,w=e.b,x=e.c,A=e.d,T=Math.abs(l-u)<=1e-4;T?(g=E*m+w*(v=n.ay)+e.worldX,y=x*m+A*v+e.worldY):(v=0,g=E*m+e.worldX,y=x*m+e.worldY);var M=e.parent;E=M.a,w=M.b,x=M.c;var R=1/(E*(A=M.d)-w*x),I=r-M.worldX,b=i-M.worldY,S=(I*A-b*w)*R-s,C=(b*E-I*x)*R-h,P=((I=g-M.worldX)*A-(b=y-M.worldY)*w)*R-s,N=(b*E-I*x)*R-h,_=Math.sqrt(P*P+N*N),L=n.data.length*c,k=0,V=0;t:if(T){var O=(S*S+C*C-_*_-(L*=l)*L)/(2*_*L);O<-1?O=-1:O>1&&(O=1),V=Math.acos(O)*a,E=_+L*O,w=L*Math.sin(V),k=Math.atan2(C*E-S*w,S*E+C*w)}else{var D=(E=l*L)*E,F=(w=u*L)*w,U=S*S+C*C,X=Math.atan2(C,S),Y=-2*F*_,B=F-D;if((A=Y*Y-4*B*(x=F*_*_+D*U-D*F))>=0){var W=Math.sqrt(A);Y<0&&(W=-W);var j=(W=-(Y+W)/2)/B,G=x/W,q=Math.abs(j)=-1&&x<=1&&(x=Math.acos(x),(A=(I=E*Math.cos(x)+_)*I+(b=w*Math.sin(x))*b)<$&&(z=x,$=A,H=I,Z=b),A>K&&(J=x,K=A,Q=I,tt=b)),U<=($+K)/2?(k=X-Math.atan2(Z*a,H),V=z*a):(k=X-Math.atan2(tt*a,Q),V=J*a)}var et=Math.atan2(v,m)*d,nt=e.arotation;(k=(k-et)*t.MathUtils.radDeg+f-nt)>180?k-=360:k<-180&&(k+=360),e.updateWorldTransformWith(s,h,nt+k*o,e.ascaleX,e.ascaleY,0,0),nt=n.arotation,(V=((V+et)*t.MathUtils.radDeg-n.ashearX)*d+p-nt)>180?V-=360:V<-180&&(V+=360),n.updateWorldTransformWith(m,v,nt+V*o,n.ascaleX,n.ascaleY,n.ashearX,n.ashearY)}else n.updateWorldTransform()},e}();t.IkConstraint=e}(i||(i={})),function(t){var e=function(t){this.order=0,this.bones=new Array,this.bendDirection=1,this.mix=1,this.name=t};t.IkConstraintData=e}(i||(i={})),function(t){var e=function(){function e(t,e){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(var n=0,r=t.bones.length;n0;if(i>0||a){var o=this.data,s=o.spacingMode,h=s==t.SpacingMode.Length,l=o.rotateMode,u=l==t.RotateMode.Tangent,c=l==t.RotateMode.ChainScale,f=this.bones.length,p=u?f:f+1,d=this.bones,m=t.Utils.setArraySize(this.spaces,p),v=null,g=this.spacing;if(c||h){c&&(v=t.Utils.setArraySize(this.lengths,f));for(var y=0,E=p-1;y0?t.MathUtils.degRad:-t.MathUtils.degRad;y=0;for(var C=3;yt.MathUtils.PI?U-=t.MathUtils.PI2:U<-t.MathUtils.PI&&(U+=t.MathUtils.PI2),U*=r,X=Math.cos(U),Y=Math.sin(U),P.a=X*V-Y*D,P.b=X*O-Y*F,P.c=Y*V+X*D,P.d=Y*O+X*F}P.appliedValid=!1}}}},e.prototype.computeWorldPositions=function(n,r,i,a,o){var s=this.target,h=this.position,l=this.spaces,u=t.Utils.setArraySize(this.positions,3*r+2),c=null,f=n.closed,p=n.worldVerticesLength,d=p/6,m=e.NONE;if(!n.constantSpeed){var v=n.lengths,g=v[d-=f?1:2];if(a&&(h*=g),o)for(var y=0;yg){m!=e.AFTER&&(m=e.AFTER,n.computeWorldVertices(s,p-6,4,c,0,2)),this.addAfterPosition(x-g,c,0,u,E);continue}}for(;;w++){var A=v[w];if(!(x>A)){if(0==w)x/=A;else x=(x-($=v[w-1]))/(A-$);break}}w!=m&&(m=w,f&&w==d?(n.computeWorldVertices(s,p-4,4,c,0,2),n.computeWorldVertices(s,0,4,c,4,2)):n.computeWorldVertices(s,6*w+2,8,c,0,2)),this.addCurvePosition(x,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],u,E,i||y>0&&0==G)}return u}f?(p+=2,c=t.Utils.setArraySize(this.world,p),n.computeWorldVertices(s,2,p-4,c,0,2),n.computeWorldVertices(s,0,2,c,p-4,2),c[p-2]=c[0],c[p-1]=c[1]):(d--,p-=4,c=t.Utils.setArraySize(this.world,p),n.computeWorldVertices(s,2,p,c,0,2));for(var T=t.Utils.setArraySize(this.curves,d),M=0,R=c[0],I=c[1],b=0,S=0,C=0,P=0,N=0,_=0,L=0,k=0,V=0,O=0,D=0,F=0,U=0,X=0,Y=(y=0,2);yM){this.addAfterPosition(x-M,c,p-4,u,E);continue}}for(;;w++){var q=T[w];if(!(x>q)){if(0==w)x/=q;else x=(x-($=T[w-1]))/(q-$);break}}if(w!=m){m=w;var z=6*w;for(R=c[z],I=c[z+1],b=c[z+2],S=c[z+3],C=c[z+4],P=c[z+5],D=2*(L=.03*(R-2*b+C))+(V=.006*(3*(b-C)-R+(N=c[z+6]))),F=2*(k=.03*(I-2*S+P))+(O=.006*(3*(S-P)-I+(_=c[z+7]))),U=.3*(b-R)+L+.16666667*V,X=.3*(S-I)+k+.16666667*O,W=Math.sqrt(U*U+X*X),B[0]=W,z=1;z<8;z++)U+=D,X+=F,D+=V,F+=O,W+=Math.sqrt(U*U+X*X),B[z]=W;U+=D,X+=F,W+=Math.sqrt(U*U+X*X),B[8]=W,U+=D+V,X+=F+O,W+=Math.sqrt(U*U+X*X),B[9]=W,j=0}for(x*=W;;j++){var H=B[j];if(!(x>H)){var $;if(0==j)x/=H;else x=j+(x-($=B[j-1]))/(H-$);break}}this.addCurvePosition(.1*x,R,I,b,S,C,P,N,_,u,E,i||y>0&&0==G)}return u},e.prototype.addBeforePosition=function(t,e,n,r,i){var a=e[n],o=e[n+1],s=e[n+2]-a,h=e[n+3]-o,l=Math.atan2(h,s);r[i]=a+t*Math.cos(l),r[i+1]=o+t*Math.sin(l),r[i+2]=l},e.prototype.addAfterPosition=function(t,e,n,r,i){var a=e[n+2],o=e[n+3],s=a-e[n],h=o-e[n+1],l=Math.atan2(h,s);r[i]=a+t*Math.cos(l),r[i+1]=o+t*Math.sin(l),r[i+2]=l},e.prototype.addCurvePosition=function(t,e,n,r,i,a,o,s,h,l,u,c){(0==t||isNaN(t))&&(t=1e-4);var f=t*t,p=f*t,d=1-t,m=d*d,v=m*d,g=d*t,y=3*g,E=d*y,w=y*t,x=e*v+r*E+a*w+s*p,A=n*v+i*E+o*w+h*p;l[u]=x,l[u+1]=A,c&&(l[u+2]=Math.atan2(A-(n*m+i*g*2+o*f),x-(e*m+r*g*2+a*f)))},e.prototype.getOrder=function(){return this.data.order},e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e.epsilon=1e-5,e}();t.PathConstraint=e}(i||(i={})),function(t){var e,n,r,i=function(t){this.order=0,this.bones=new Array,this.name=t};t.PathConstraintData=i,(e=t.PositionMode||(t.PositionMode={}))[e.Fixed=0]="Fixed",e[e.Percent=1]="Percent",(n=t.SpacingMode||(t.SpacingMode={}))[n.Length=0]="Length",n[n.Fixed=1]="Fixed",n[n.Percent=2]="Percent",(r=t.RotateMode||(t.RotateMode={}))[r.Tangent=0]="Tangent",r[r.Chain=1]="Chain",r[r.ChainScale=2]="ChainScale"}(i||(i={})),function(t){var e=function(){function t(t){this.toLoad=new Array,this.assets={},this.clientId=t}return t.prototype.loaded=function(){var t=0;for(var e in this.assets)t++;return t},t}(),n=function(){function t(t){void 0===t&&(t=""),this.clientAssets={},this.queuedAssets={},this.rawAssets={},this.errors={},this.pathPrefix=t}return t.prototype.queueAsset=function(t,n,r){var i=this.clientAssets[t];return null==i&&(i=new e(t),this.clientAssets[t]=i),null!==n&&(i.textureLoader=n),i.toLoad.push(r),this.queuedAssets[r]!==r&&(this.queuedAssets[r]=r,!0)},t.prototype.loadText=function(t,e){var n=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState==XMLHttpRequest.DONE&&(r.status>=200&&r.status<300?n.rawAssets[e]=r.responseText:n.errors[e]="Couldn't load text "+e+": status "+r.status+", "+r.responseText)},r.open("GET",e,!0),r.send()}},t.prototype.loadJson=function(t,e){var n=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState==XMLHttpRequest.DONE&&(r.status>=200&&r.status<300?n.rawAssets[e]=JSON.parse(r.responseText):n.errors[e]="Couldn't load text "+e+": status "+r.status+", "+r.responseText)},r.open("GET",e,!0),r.send()}},t.prototype.loadTexture=function(t,e,n){var r=this;if(n=this.pathPrefix+n,this.queueAsset(t,e,n)){var i=new Image;i.src=n,i.crossOrigin="anonymous",i.onload=function(t){r.rawAssets[n]=i},i.onerror=function(t){r.errors[n]="Couldn't load image "+n}}},t.prototype.get=function(t,e){e=this.pathPrefix+e;var n=this.clientAssets[t];return null==n||n.assets[e]},t.prototype.updateClientAssets=function(t){for(var e=0;e0},t.prototype.getErrors=function(){return this.errors},t}();t.SharedAssetManager=n}(i||(i={})),function(t){var e=function(){function e(e){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.flipX=!1,this.flipY=!1,this.x=0,this.y=0,null==e)throw new Error("data cannot be null.");this.data=e,this.bones=new Array;for(var n=0;n1){var i=n[n.length-1];this._updateCache.indexOf(i)>-1||this.updateCacheReset.push(i)}this._updateCache.push(t),this.sortReset(r.children),n[n.length-1].sorted=!0},e.prototype.sortPathConstraint=function(e){var n=e.target,r=n.data.index,i=n.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,r,i),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,r,i);for(var a=0,o=this.data.skins.length;a-1||this.updateCacheReset.push(i)}else for(r=0;r=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},e.prototype.aabbIntersectsSegment=function(t,e,n,r){var i=this.minX,a=this.minY,o=this.maxX,s=this.maxY;if(t<=i&&n<=i||e<=a&&r<=a||t>=o&&n>=o||e>=s&&r>=s)return!1;var h=(r-e)/(n-t),l=h*(i-t)+e;if(l>a&&la&&li&&ui&&ut.minX&&this.minYt.minY},e.prototype.containsPoint=function(t,e){for(var n=this.polygons,r=0,i=n.length;r=n||l=n){var u=r[s];u+(n-h)/(l-h)*(r[a]-u)=u&&E<=p||E>=p&&E<=u)&&(E>=e&&E<=r||E>=r&&E<=e)){var w=(l*g-h*m)/y;if((w>=c&&w<=d||w>=d&&w<=c)&&(w>=n&&w<=i||w>=i&&w<=n))return!0}u=p,c=d}return!1},e.prototype.getPolygon=function(t){if(null==t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},e.prototype.getWidth=function(){return this.maxX-this.minX},e.prototype.getHeight=function(){return this.maxY-this.minY},e}();t.SkeletonBounds=e}(i||(i={})),function(t){var e=function(){function e(){this.triangulator=new t.Triangulator,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array}return e.prototype.clipStart=function(n,r){if(null!=this.clipAttachment)return 0;this.clipAttachment=r;var i=r.worldVerticesLength,a=t.Utils.setArraySize(this.clippingPolygon,i);r.computeWorldVertices(n,0,i,a,0,2);var o=this.clippingPolygon;e.makeClockwise(o);for(var s=this.clippingPolygons=this.triangulator.decompose(o,this.triangulator.triangulate(o)),h=0,l=s.length;h>1,U=this.clipOutput,X=t.Utils.setArraySize(u,N+F*d),Y=0;Y<_;Y+=2){var B=U[Y],W=U[Y+1];X[N]=B,X[N+1]=W,X[N+2]=o.r,X[N+3]=o.g,X[N+4]=o.b,X[N+5]=o.a;var j=B-I,G=W-b,q=(L*j+k*G)*D,z=(O*j+V*G)*D,H=1-q-z;X[N+6]=w*q+M*z+S*H,X[N+7]=x*q+R*z+C*H,h&&(X[N+8]=s.r,X[N+9]=s.g,X[N+10]=s.b,X[N+11]=s.a),N+=d}N=c.length;var $=t.Utils.setArraySize(c,N+3*(F-2));F--;for(Y=1;Y=2?(u=s,s=this.scratch):u=this.scratch,u.length=0,u.push(t),u.push(e),u.push(n),u.push(r),u.push(i),u.push(a),u.push(t),u.push(e),s.length=0;for(var c=o,f=o.length-4,p=0;;p+=2){for(var d=c[p],m=c[p+1],v=c[p+2],g=c[p+3],y=d-v,E=m-g,w=u,x=u.length-2,A=s.length,T=0;T0;if(y*(R-g)-E*(M-v)>0){if(S){s.push(I),s.push(b);continue}var C=((N=I-M)*(m-R)-(P=b-R)*(d-M))/(P*(v-d)-N*(g-m));s.push(d+(v-d)*C),s.push(m+(g-m)*C)}else if(S){var P,N;C=((N=I-M)*(m-R)-(P=b-R)*(d-M))/(P*(v-d)-N*(g-m));s.push(d+(v-d)*C),s.push(m+(g-m)*C),s.push(I),s.push(b)}l=!0}if(A==s.length)return h.length=0,!0;if(s.push(s[0]),s.push(s[1]),p==f)break;var _=s;(s=u).length=0,u=_}if(h!=s){h.length=0;p=0;for(var L=s.length-2;p>1;s=0;f--)-1==j[f]&&(j[f]=q[--H])}w.setFrame(c++,W.time,j)}a.push(w),o=Math.max(o,w.frames[w.getFrameCount()-1])}if(e.events){for(w=new t.EventTimeline(e.events.length),c=0,f=0;f=r.length&&(r.length=t+1),r[t]||(r[t]={}),r[t][e]=n},t.prototype.getAttachment=function(t,e){var n=this.attachments[t];return n?n[e]:null},t.prototype.attachAll=function(t,e){for(var n=0,r=0;r= 0.");if(null==n)throw new Error("name cannot be null.");if(null==r)throw new Error("boneData cannot be null.");this.index=e,this.name=n,this.boneData=r};t.SlotData=e}(i||(i={})),function(t){var e,n,r=function(){function t(t){this._image=t}return t.prototype.getImage=function(){return this._image},t.filterFromString=function(t){switch(t.toLowerCase()){case"nearest":return e.Nearest;case"linear":return e.Linear;case"mipmap":return e.MipMap;case"mipmapnearestnearest":return e.MipMapNearestNearest;case"mipmaplinearnearest":return e.MipMapLinearNearest;case"mipmapnearestlinear":return e.MipMapNearestLinear;case"mipmaplinearlinear":return e.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}},t.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return n.MirroredRepeat;case"clamptoedge":return n.ClampToEdge;case"repeat":return n.Repeat;default:throw new Error("Unknown texture wrap "+t)}},t}();t.Texture=r,function(t){t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear"}(e=t.TextureFilter||(t.TextureFilter={})),function(t){t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat"}(n=t.TextureWrap||(t.TextureWrap={}));var i=function(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.rotate=!1,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0};t.TextureRegion=i;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.setFilters=function(t,e){},e.prototype.setWraps=function(t,e){},e.prototype.dispose=function(){},e}(t.Texture);t.FakeTexture=a}(i||(i={})),function(t){var e=function(){function e(t,e){this.pages=new Array,this.regions=new Array,this.load(t,e)}return e.prototype.load=function(e,a){if(null==a)throw new Error("textureLoader cannot be null.");for(var o=new n(e),s=new Array(4),h=null;;){var l=o.readLine();if(null==l)break;if(0==(l=l.trim()).length)h=null;else if(h){var u=new i;u.name=l,u.page=h,u.rotate="true"==o.readValue(),o.readTuple(s);var c=parseInt(s[0]),f=parseInt(s[1]);o.readTuple(s);var p=parseInt(s[0]),d=parseInt(s[1]);u.u=c/h.width,u.v=f/h.height,u.rotate?(u.u2=(c+d)/h.width,u.v2=(f+p)/h.height):(u.u2=(c+p)/h.width,u.v2=(f+d)/h.height),u.x=c,u.y=f,u.width=Math.abs(p),u.height=Math.abs(d),4==o.readTuple(s)&&4==o.readTuple(s)&&o.readTuple(s),u.originalWidth=parseInt(s[0]),u.originalHeight=parseInt(s[1]),o.readTuple(s),u.offsetX=parseInt(s[0]),u.offsetY=parseInt(s[1]),u.index=parseInt(o.readValue()),u.texture=h.texture,this.regions.push(u)}else{(h=new r).name=l,2==o.readTuple(s)&&(h.width=parseInt(s[0]),h.height=parseInt(s[1]),o.readTuple(s)),o.readTuple(s),h.minFilter=t.Texture.filterFromString(s[0]),h.magFilter=t.Texture.filterFromString(s[1]);var m=o.readValue();h.uWrap=t.TextureWrap.ClampToEdge,h.vWrap=t.TextureWrap.ClampToEdge,"x"==m?h.uWrap=t.TextureWrap.Repeat:"y"==m?h.vWrap=t.TextureWrap.Repeat:"xy"==m&&(h.uWrap=h.vWrap=t.TextureWrap.Repeat),h.texture=a(l),h.texture.setFilters(h.minFilter,h.magFilter),h.texture.setWraps(h.uWrap,h.vWrap),h.width=h.texture.getImage().width,h.height=h.texture.getImage().height,this.pages.push(h)}}},e.prototype.findRegion=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},t.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},t.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw new Error("Invalid line: "+e);for(var r=0,i=n+1;r<3;r++){var a=e.indexOf(",",i);if(-1==a)break;t[r]=e.substr(i,a-i).trim(),i=a+1}return t[r]=e.substring(i).trim(),r+1},t}(),r=function(){};t.TextureAtlasPage=r;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(t.TextureRegion);t.TextureAtlasRegion=i}(i||(i={})),function(t){var e=function(){function e(e,n){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new t.Vector2,null==e)throw new Error("data cannot be null.");if(null==n)throw new Error("skeleton cannot be null.");this.data=e,this.rotateMix=e.rotateMix,this.translateMix=e.translateMix,this.scaleMix=e.scaleMix,this.shearMix=e.shearMix,this.bones=new Array;for(var r=0;r0?t.MathUtils.degRad:-t.MathUtils.degRad,c=this.data.offsetRotation*u,f=this.data.offsetShearY*u,p=this.bones,d=0,m=p.length;dt.MathUtils.PI?b-=t.MathUtils.PI2:b<-t.MathUtils.PI&&(b+=t.MathUtils.PI2),b*=e;var A=Math.cos(b),T=Math.sin(b);v.a=A*y-T*w,v.b=A*E-T*x,v.c=T*y+A*w,v.d=T*E+A*x,g=!0}if(0!=n){var M=this.temp;a.localToWorld(M.set(this.data.offsetX,this.data.offsetY)),v.worldX+=(M.x-v.worldX)*n,v.worldY+=(M.y-v.worldY)*n,g=!0}if(r>0){var R=Math.sqrt(v.a*v.a+v.c*v.c),I=Math.sqrt(o*o+h*h);R>1e-5&&(R=(R+(I-R+this.data.offsetScaleX)*r)/R),v.a*=R,v.c*=R,R=Math.sqrt(v.b*v.b+v.d*v.d),I=Math.sqrt(s*s+l*l),R>1e-5&&(R=(R+(I-R+this.data.offsetScaleY)*r)/R),v.b*=R,v.d*=R,g=!0}if(i>0){E=v.b,x=v.d;var b,S=Math.atan2(x,E);(b=Math.atan2(l,s)-Math.atan2(h,o)-(S-Math.atan2(v.c,v.a)))>t.MathUtils.PI?b-=t.MathUtils.PI2:b<-t.MathUtils.PI&&(b+=t.MathUtils.PI2),b=S+(b+f)*i;R=Math.sqrt(E*E+x*x);v.b=Math.cos(b)*R,v.d=Math.sin(b)*R,g=!0}g&&(v.appliedValid=!1)}},e.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,n=this.translateMix,r=this.scaleMix,i=this.shearMix,a=this.target,o=a.a,s=a.b,h=a.c,l=a.d,u=o*l-s*h>0?t.MathUtils.degRad:-t.MathUtils.degRad,c=this.data.offsetRotation*u,f=this.data.offsetShearY*u,p=this.bones,d=0,m=p.length;dt.MathUtils.PI?I-=t.MathUtils.PI2:I<-t.MathUtils.PI&&(I+=t.MathUtils.PI2),I*=e;var A=Math.cos(I),T=Math.sin(I);v.a=A*y-T*w,v.b=A*E-T*x,v.c=T*y+A*w,v.d=T*E+A*x,g=!0}if(0!=n){var M=this.temp;a.localToWorld(M.set(this.data.offsetX,this.data.offsetY)),v.worldX+=M.x*n,v.worldY+=M.y*n,g=!0}if(r>0){var R=(Math.sqrt(o*o+h*h)-1+this.data.offsetScaleX)*r+1;v.a*=R,v.c*=R,R=(Math.sqrt(s*s+l*l)-1+this.data.offsetScaleY)*r+1,v.b*=R,v.d*=R,g=!0}if(i>0){var I;(I=Math.atan2(l,s)-Math.atan2(h,o))>t.MathUtils.PI?I-=t.MathUtils.PI2:I<-t.MathUtils.PI&&(I+=t.MathUtils.PI2);E=v.b,x=v.d;I=Math.atan2(x,E)+(I-t.MathUtils.PI/2+f)*i;R=Math.sqrt(E*E+x*x);v.b=Math.cos(I)*R,v.d=Math.sin(I)*R,g=!0}g&&(v.appliedValid=!1)}},e.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,r=this.shearMix,i=this.target;i.appliedValid||i.updateAppliedTransform();for(var a=this.bones,o=0,s=a.length;o0&&(p>1e-5&&(p=(p+(i.ascaleX-p+this.data.offsetScaleX)*n)/p),d>1e-5&&(d=(d+(i.ascaleY-d+this.data.offsetScaleY)*n)/d));var m=h.ashearY;if(r>0){u=i.ashearY-m+this.data.offsetShearY;u-=360*(16384-(16384.499999999996-u/360|0)),h.shearY+=u*r}h.updateWorldTransformWith(c,f,l,p,d,h.ashearX,m)}},e.prototype.applyRelativeLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,r=this.shearMix,i=this.target;i.appliedValid||i.updateAppliedTransform();for(var a=this.bones,o=0,s=a.length;o0&&(f>1e-5&&(f*=(i.ascaleX-1+this.data.offsetScaleX)*n+1),p>1e-5&&(p*=(i.ascaleY-1+this.data.offsetScaleY)*n+1));var d=h.ashearY;r>0&&(d+=(i.ashearY+this.data.offsetShearY)*r),h.updateWorldTransformWith(u,c,l,f,p,h.ashearX,d)}},e.prototype.getOrder=function(){return this.data.order},e}();t.TransformConstraint=e}(i||(i={})),function(t){var e=function(t){if(this.order=0,this.bones=new Array,this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.offsetRotation=0,this.offsetX=0,this.offsetY=0,this.offsetScaleX=0,this.offsetScaleY=0,this.offsetShearY=0,this.relative=!1,this.local=!1,null==t)throw new Error("name cannot be null.");this.name=t};t.TransformConstraintData=e}(i||(i={})),function(t){var e=function(){function e(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new t.Pool((function(){return new Array})),this.polygonIndicesPool=new t.Pool((function(){return new Array}))}return e.prototype.triangulate=function(t){var n=t,r=t.length>>1,i=this.indicesArray;i.length=0;for(var a=0;a3;){for(var l=r-1,u=(a=0,1);;){t:if(!o[a]){for(var c=i[l]<<1,f=i[a]<<1,p=i[u]<<1,d=n[c],m=n[c+1],v=n[f],g=n[f+1],y=n[p],E=n[p+1],w=(u+1)%r;w!=l;w=(w+1)%r)if(o[w]){var x=i[w]<<1,A=n[x],T=n[x+1];if(e.positiveArea(y,E,d,m,A,T)&&e.positiveArea(d,m,v,g,A,T)&&e.positiveArea(v,g,y,E,A,T))break t}break}if(0==u){do{if(!o[a])break;a--}while(a>0);break}l=a,a=u,u=(u+1)%r}h.push(i[(r+a-1)%r]),h.push(i[a]),h.push(i[(a+1)%r]),i.splice(a,1),o.splice(a,1);var M=(--r+a-1)%r,R=a==r?0:a;o[M]=e.isConcave(M,r,n,i),o[R]=e.isConcave(R,r,n,i)}return 3==r&&(h.push(i[2]),h.push(i[0]),h.push(i[1])),h},e.prototype.decompose=function(t,n){var r=t,i=this.convexPolygons;this.polygonPool.freeAll(i),i.length=0;var a=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(a),a.length=0;var o=this.polygonIndicesPool.obtain();o.length=0;var s=this.polygonPool.obtain();s.length=0;for(var h=-1,l=0,u=0,c=n.length;u0?(i.push(s),a.push(o)):(this.polygonPool.free(s),this.polygonIndicesPool.free(o)),(s=this.polygonPool.obtain()).length=0,s.push(m),s.push(v),s.push(g),s.push(y),s.push(E),s.push(w),(o=this.polygonIndicesPool.obtain()).length=0,o.push(f),o.push(p),o.push(d),l=e.winding(m,v,g,y,E,w),h=f)}s.length>0&&(i.push(s),a.push(o));for(u=0,c=i.length;u=0;u--)0==(s=i[u]).length&&(i.splice(u,1),this.polygonPool.free(s),o=a[u],a.splice(u,1),this.polygonIndicesPool.free(o));return i},e.isConcave=function(t,e,n,r){var i=r[(e+t-1)%e]<<1,a=r[t]<<1,o=r[(t+1)%e]<<1;return!this.positiveArea(n[i],n[i+1],n[a],n[a+1],n[o],n[o+1])},e.positiveArea=function(t,e,n,r,i,a){return t*(a-r)+n*(e-a)+i*(r-e)>=0},e.winding=function(t,e,n,r,i,a){var o=n-t,s=r-e;return i*s-a*o+o*e-t*s>=0?1:-1},e}();t.Triangulator=e}(i||(i={})),function(t){var e=function(){function t(){this.array=new Array}return t.prototype.add=function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e},t.prototype.contains=function(t){return null!=this.array[0|t]},t.prototype.remove=function(t){this.array[0|t]=void 0},t.prototype.clear=function(){this.array.length=0},t}();t.IntSet=e;var n=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.r=t,this.g=e,this.b=n,this.a=r}return t.prototype.set=function(t,e,n,r){return this.r=t,this.g=e,this.b=n,this.a=r,this.clamp(),this},t.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},t.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=(8!=t.length?255:parseInt(t.substr(6,2),16))/255,this},t.prototype.add=function(t,e,n,r){return this.r+=t,this.g+=e,this.b+=n,this.a+=r,this.clamp(),this},t.prototype.clamp=function(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this},t.WHITE=new t(1,1,1,1),t.RED=new t(1,0,0,1),t.GREEN=new t(0,1,0,1),t.BLUE=new t(0,0,1,1),t.MAGENTA=new t(1,0,1,1),t}();t.Color=n;var r=function(){function t(){}return t.clamp=function(t,e,n){return tn?n:t},t.cosDeg=function(e){return Math.cos(e*t.degRad)},t.sinDeg=function(e){return Math.sin(e*t.degRad)},t.signum=function(t){return t>0?1:t<0?-1:0},t.toInt=function(t){return t>0?Math.floor(t):Math.ceil(t)},t.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},t.randomTriangular=function(e,n){return t.randomTriangularWith(e,n,.5*(e+n))},t.randomTriangularWith=function(t,e,n){var r=Math.random(),i=e-t;return r<=(n-t)/i?t+Math.sqrt(r*i*(n-t)):e-Math.sqrt((1-r)*i*(e-n))},t.PI=3.1415927,t.PI2=2*t.PI,t.radiansToDegrees=180/t.PI,t.radDeg=t.radiansToDegrees,t.degreesToRadians=t.PI/180,t.degRad=t.degreesToRadians,t}();t.MathUtils=r;var i=function(){function t(){}return t.prototype.apply=function(t,e,n){return t+(e-t)*this.applyInternal(n)},t}();t.Interpolation=i;var a=function(t){function e(e){var n=t.call(this)||this;return n.power=2,n.power=e,n}return o(e,t),e.prototype.applyInternal=function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1},e}(i);t.Pow=a;var s=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.applyInternal=function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1},e}(a);t.PowOut=s;var h=function(){function t(){}return t.arrayCopy=function(t,e,n,r,i){for(var a=e,o=r;a=n?e:t.setArraySize(e,n,r)},t.newArray=function(t,e){for(var n=new Array(t),r=0;r0?this.items.pop():this.instantiator()},t.prototype.free=function(t){t.reset&&t.reset(),this.items.push(t)},t.prototype.freeAll=function(t){for(var e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)},t}();t.TimeKeeper=f;var p=function(){function t(t){void 0===t&&(t=32),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}return t.prototype.hasEnoughData=function(){return this.addedValues>=this.values.length},t.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},t.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*a;var o=t.bone.skeleton,s=t.attachmentVertices,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,f=0;f0&&(h=s);for(var w,x=(w=t.bone).worldX,A=w.worldY,T=w.a,M=w.b,R=w.c,I=w.d,b=e,S=i;S)?=?)"),p("XRANGEIDENTIFIERLOOSE","".concat(h[l.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),p("XRANGEIDENTIFIER","".concat(h[l.NUMERICIDENTIFIER],"|x|X|\\*")),p("XRANGEPLAIN","[v=\\s]*(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:".concat(h[l.PRERELEASE],")?").concat(h[l.BUILD],"?")+")?)?"),p("XRANGEPLAINLOOSE","[v=\\s]*(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(h[l.PRERELEASELOOSE],")?").concat(h[l.BUILD],"?")+")?)?"),p("XRANGE","^".concat(h[l.GTLT],"\\s*").concat(h[l.XRANGEPLAIN],"$")),p("XRANGELOOSE","^".concat(h[l.GTLT],"\\s*").concat(h[l.XRANGEPLAINLOOSE],"$")),p("COERCEPLAIN","".concat("(^|[^\\d])(\\d{1,").concat(n,"})")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:\\.(\\d{1,".concat(n,"}))?")),p("COERCE","".concat(h[l.COERCEPLAIN],"(?:$|[^\\d])")),p("COERCEFULL",h[l.COERCEPLAIN]+"(?:".concat(h[l.PRERELEASE],")?")+"(?:".concat(h[l.BUILD],")?")+"(?:$|[^\\d])"),p("COERCERTL",h[l.COERCE],!0),p("COERCERTLFULL",h[l.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM","(\\s*)".concat(h[l.LONETILDE],"\\s+"),!0),e.tildeTrimReplace="$1~",p("TILDE","^".concat(h[l.LONETILDE]).concat(h[l.XRANGEPLAIN],"$")),p("TILDELOOSE","^".concat(h[l.LONETILDE]).concat(h[l.XRANGEPLAINLOOSE],"$")),p("LONECARET","(?:\\^)"),p("CARETTRIM","(\\s*)".concat(h[l.LONECARET],"\\s+"),!0),e.caretTrimReplace="$1^",p("CARET","^".concat(h[l.LONECARET]).concat(h[l.XRANGEPLAIN],"$")),p("CARETLOOSE","^".concat(h[l.LONECARET]).concat(h[l.XRANGEPLAINLOOSE],"$")),p("COMPARATORLOOSE","^".concat(h[l.GTLT],"\\s*(").concat(h[l.LOOSEPLAIN],")$|^$")),p("COMPARATOR","^".concat(h[l.GTLT],"\\s*(").concat(h[l.FULLPLAIN],")$|^$")),p("COMPARATORTRIM","(\\s*)".concat(h[l.GTLT],"\\s*(").concat(h[l.LOOSEPLAIN],"|").concat(h[l.XRANGEPLAIN],")"),!0),e.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE","^\\s*(".concat(h[l.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(h[l.XRANGEPLAIN],")")+"\\s*$"),p("HYPHENRANGELOOSE","^\\s*(".concat(h[l.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(h[l.XRANGEPLAINLOOSE],")")+"\\s*$"),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(N,N.exports);var _=N.exports;I(_);var L=Object.freeze({loose:!0}),k=Object.freeze({}),V=function(t){return t?"object"!==s(t)?L:t:k};I(V);var O=/^[0-9]+$/,D=function(t,e){var n=O.test(t),r=O.test(e);return n&&r&&(t=+t,e=+e),t===e?0:n&&!r?-1:r&&!n?1:tX)throw new TypeError("version is longer than ".concat(X," characters"));U("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;var r=e.trim().match(n.loose?B[W.LOOSE]:B[W.FULL]);if(!r)throw new TypeError("Invalid Version: ".concat(e));if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Y||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Y||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Y||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((function(t){if(/^[0-9]+$/.test(t)){var e=+t;if(e>=0&&e=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(e===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(e){var a=[e,r];!1===n&&(a=[e]),0===G(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=a):this.prerelease=a}break;default:throw new Error("invalid increment argument: ".concat(t))}return this.raw=this.format(),this.build.length&&(this.raw+="+".concat(this.build.join("."))),this}}])}(),z=q;I(z);var H=z,$=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t instanceof H)return t;try{return new H(t,e)}catch(t){if(!n)return null;throw t}};I($);var Z=$,J=I((function(t,e){var n=Z(t,e);return n?n.version:null})),Q=z,K=$,tt=_.safeRe,et=_.t,nt=I((function(t,e){if(t instanceof Q)return t;if("number"==typeof t&&(t=String(t)),"string"!=typeof t)return null;var n=null;if((e=e||{}).rtl){for(var r,i=e.includePrerelease?tt[et.COERCERTLFULL]:tt[et.COERCERTL];(r=i.exec(t))&&(!n||n.index+n[0].length!==t.length);)n&&r.index+r[0].length===n.index+n[0].length||(n=r),i.lastIndex=r.index+r[1].length+r[2].length;i.lastIndex=-1}else n=t.match(e.includePrerelease?tt[et.COERCEFULL]:tt[et.COERCE]);if(null===n)return null;var a=n[2],o=n[3]||"0",s=n[4]||"0",h=e.includePrerelease&&n[5]?"-".concat(n[5]):"",l=e.includePrerelease&&n[6]?"+".concat(n[6]):"";return K("".concat(a,".").concat(o,".").concat(s).concat(h).concat(l),e)})),rt=u((function t(){h(this,t),this.max=1e3,this.map=new Map}),[{key:"get",value:function(t){var e=this.map.get(t);return void 0===e?void 0:(this.map.delete(t),this.map.set(t,e),e)}},{key:"delete",value:function(t){return!!this.map.has(t)&&(this.map.delete(t),!0)}},{key:"set",value:function(t,e){if(!this.delete(t)&&void 0!==e){if(this.map.size>=this.max){var n=this.map.keys().next().value;this.delete(n)}this.map.set(t,e)}return this}}]);I(rt);var it=z,at=function(t,e,n){return new it(t,n).compare(new it(e,n))};I(at);var ot=at,st=function(t,e,n){return 0===ot(t,e,n)};I(st);var ht=at,lt=function(t,e,n){return 0!==ht(t,e,n)};I(lt);var ut=at,ct=function(t,e,n){return ut(t,e,n)>0};I(ct);var ft=at,pt=function(t,e,n){return ft(t,e,n)>=0};I(pt);var dt=at,mt=function(t,e,n){return dt(t,e,n)<0};I(mt);var vt=at,gt=function(t,e,n){return vt(t,e,n)<=0};I(gt);var yt,Et,wt,xt,At=st,Tt=lt,Mt=ct,Rt=pt,It=mt,bt=gt,St=function(t,e,n,r){switch(e){case"===":return"object"===s(t)&&(t=t.version),"object"===s(n)&&(n=n.version),t===n;case"!==":return"object"===s(t)&&(t=t.version),"object"===s(n)&&(n=n.version),t!==n;case"":case"=":case"==":return At(t,n,r);case"!=":return Tt(t,n,r);case">":return Mt(t,n,r);case">=":return Rt(t,n,r);case"<":return It(t,n,r);case"<=":return bt(t,n,r);default:throw new TypeError("Invalid operator: ".concat(e))}};function Ct(){if(xt)return wt;xt=1;var t=function(){function t(e,i){var a=this;if(h(this,t),i=n(i),e instanceof t)return e.loose===!!i.loose&&e.includePrerelease===!!i.includePrerelease?e:new t(e.raw,i);if(e instanceof r)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((function(t){return a.parseRange(t.trim())})).filter((function(t){return t.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(this.raw));if(this.set.length>1){var o=this.set[0];if(this.set=this.set.filter((function(t){return!m(t[0])})),0===this.set.length)this.set=[o];else if(this.set.length>1){var s,l=x(this.set);try{for(l.s();!(s=l.n()).done;){var u=s.value;if(1===u.length&&v(u[0])){this.set=[u];break}}}catch(t){l.e(t)}finally{l.f()}}}this.format()}return u(t,[{key:"format",value:function(){return this.range=this.set.map((function(t){return t.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(t){var n=this,a=((this.options.includePrerelease&&p)|(this.options.loose&&d))+":"+t,h=e.get(a);if(h)return h;var u=this.options.loose,v=u?o[s.HYPHENRANGELOOSE]:o[s.HYPHENRANGE];t=t.replace(v,L(this.options.includePrerelease)),i("hyphen replace",t),t=t.replace(o[s.COMPARATORTRIM],l),i("comparator trim",t),t=t.replace(o[s.TILDETRIM],c),i("tilde trim",t),t=t.replace(o[s.CARETTRIM],f),i("caret trim",t);var g=t.split(" ").map((function(t){return E(t,n.options)})).join(" ").split(/\s+/).map((function(t){return N(t,n.options)}));u&&(g=g.filter((function(t){return i("loose invalid filter",t,n.options),!!t.match(o[s.COMPARATORLOOSE])}))),i("range list",g);var w,A=new Map,T=g.map((function(t){return new r(t,n.options)})),M=x(T);try{for(M.s();!(w=M.n()).done;){var R=w.value;if(m(R))return[R];A.set(R.value,R)}}catch(t){M.e(t)}finally{M.f()}A.size>1&&A.has("")&&A.delete("");var I=y(A.values());return e.set(a,I),I}},{key:"intersects",value:function(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((function(t){return g(t,n)&&e.set.some((function(e){return g(e,n)&&t.every((function(t){return e.every((function(e){return t.intersects(e,n)}))}))}))}))}},{key:"test",value:function(t){if(!t)return!1;if("string"==typeof t)try{t=new a(t,this.options)}catch(t){return!1}for(var e=0;e")||!t.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!t.operator.startsWith("<"))&&(this.semver.version!==t.semver.version||!this.operator.includes("=")||!t.operator.includes("="))&&!(a(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<"))&&!(a(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}}],[{key:"ANY",get:function(){return t}}])}();yt=e;var n=V,r=_.safeRe,i=_.t,a=St,o=P,s=z,l=Ct();return yt}(),i=P,a=z,o=_.safeRe,s=_.t,l=_.comparatorTrimReplace,c=_.tildeTrimReplace,f=_.caretTrimReplace,p=b.FLAG_INCLUDE_PRERELEASE,d=b.FLAG_LOOSE,m=function(t){return"<0.0.0-0"===t.value},v=function(t){return""===t.value},g=function(t,e){for(var n=!0,r=t.slice(),i=r.pop();n&&r.length;)n=r.every((function(t){return i.intersects(t,e)})),i=r.pop();return n},E=function(t,e){return i("comp",t,e),t=M(t,e),i("caret",t),t=A(t,e),i("tildes",t),t=I(t,e),i("xrange",t),t=C(t,e),i("stars",t),t},w=function(t){return!t||"x"===t.toLowerCase()||"*"===t},A=function(t,e){return t.trim().split(/\s+/).map((function(t){return T(t,e)})).join(" ")},T=function(t,e){var n=e.loose?o[s.TILDELOOSE]:o[s.TILDE];return t.replace(n,(function(e,n,r,a,o){var s;return i("tilde",t,e,n,r,a,o),w(n)?s="":w(r)?s=">=".concat(n,".0.0 <").concat(+n+1,".0.0-0"):w(a)?s=">=".concat(n,".").concat(r,".0 <").concat(n,".").concat(+r+1,".0-0"):o?(i("replaceTilde pr",o),s=">=".concat(n,".").concat(r,".").concat(a,"-").concat(o," <").concat(n,".").concat(+r+1,".0-0")):s=">=".concat(n,".").concat(r,".").concat(a," <").concat(n,".").concat(+r+1,".0-0"),i("tilde return",s),s}))},M=function(t,e){return t.trim().split(/\s+/).map((function(t){return R(t,e)})).join(" ")},R=function(t,e){i("caret",t,e);var n=e.loose?o[s.CARETLOOSE]:o[s.CARET],r=e.includePrerelease?"-0":"";return t.replace(n,(function(e,n,a,o,s){var h;return i("caret",t,e,n,a,o,s),w(n)?h="":w(a)?h=">=".concat(n,".0.0").concat(r," <").concat(+n+1,".0.0-0"):w(o)?h="0"===n?">=".concat(n,".").concat(a,".0").concat(r," <").concat(n,".").concat(+a+1,".0-0"):">=".concat(n,".").concat(a,".0").concat(r," <").concat(+n+1,".0.0-0"):s?(i("replaceCaret pr",s),h="0"===n?"0"===a?">=".concat(n,".").concat(a,".").concat(o,"-").concat(s," <").concat(n,".").concat(a,".").concat(+o+1,"-0"):">=".concat(n,".").concat(a,".").concat(o,"-").concat(s," <").concat(n,".").concat(+a+1,".0-0"):">=".concat(n,".").concat(a,".").concat(o,"-").concat(s," <").concat(+n+1,".0.0-0")):(i("no pr"),h="0"===n?"0"===a?">=".concat(n,".").concat(a,".").concat(o).concat(r," <").concat(n,".").concat(a,".").concat(+o+1,"-0"):">=".concat(n,".").concat(a,".").concat(o).concat(r," <").concat(n,".").concat(+a+1,".0-0"):">=".concat(n,".").concat(a,".").concat(o," <").concat(+n+1,".0.0-0")),i("caret return",h),h}))},I=function(t,e){return i("replaceXRanges",t,e),t.split(/\s+/).map((function(t){return S(t,e)})).join(" ")},S=function(t,e){t=t.trim();var n=e.loose?o[s.XRANGELOOSE]:o[s.XRANGE];return t.replace(n,(function(n,r,a,o,s,h){i("xRange",t,n,r,a,o,s,h);var l=w(a),u=l||w(o),c=u||w(s),f=c;return"="===r&&f&&(r=""),h=e.includePrerelease?"-0":"",l?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&f?(u&&(o=0),s=0,">"===r?(r=">=",u?(a=+a+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",u?a=+a+1:o=+o+1),"<"===r&&(h="-0"),n="".concat(r+a,".").concat(o,".").concat(s).concat(h)):u?n=">=".concat(a,".0.0").concat(h," <").concat(+a+1,".0.0-0"):c&&(n=">=".concat(a,".").concat(o,".0").concat(h," <").concat(a,".").concat(+o+1,".0-0")),i("xRange return",n),n}))},C=function(t,e){return i("replaceStars",t,e),t.trim().replace(o[s.STAR],"")},N=function(t,e){return i("replaceGTE0",t,e),t.trim().replace(o[e.includePrerelease?s.GTE0PRE:s.GTE0],"")},L=function(t){return function(e,n,r,i,a,o,s,h,l,u,c,f){return n=w(r)?"":w(i)?">=".concat(r,".0.0").concat(t?"-0":""):w(a)?">=".concat(r,".").concat(i,".0").concat(t?"-0":""):o?">=".concat(n):">=".concat(n).concat(t?"-0":""),h=w(l)?"":w(u)?"<".concat(+l+1,".0.0-0"):w(c)?"<".concat(l,".").concat(+u+1,".0-0"):f?"<=".concat(l,".").concat(u,".").concat(c,"-").concat(f):t?"<".concat(l,".").concat(u,".").concat(+c+1,"-0"):"<=".concat(h),"".concat(n," ").concat(h).trim()}},k=function(t,e,n){for(var a=0;a0){var s=t[o].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0};return wt}I(St);var Pt=Ct(),Nt=function(t,e,n){try{e=new Pt(e,n)}catch(t){return!1}return e.test(t)},_t={valid:J,coerce:nt,satisfies:I(Nt),SEMVER_SPEC_VERSION:S.SEMVER_SPEC_VERSION},Lt=0,kt=1,Vt=2,Ot=[0,1,2,2,3,0],Dt=u((function t(e,n,r,o){var s;if(h(this,t),c(this,"autoUpdate",!0),c(this,"skeleton",void 0),c(this,"states",void 0),this._app=e,this._position=new a.Vec3,1===i.TextureAtlas.length){var l,u=x((s=new i.TextureAtlas(n)).pages);try{for(u.s();!(l=u.n()).done;){var f=l.value;f.setTexture(new R(o[f.name]))}}catch(t){u.e(t)}finally{u.f()}}else s=new i.TextureAtlas(n,(function(t){return new R(o[t])}));var p=new i.SkeletonJson(new i.AtlasAttachmentLoader(s));p.scale*=.01;var d=p.readSkeletonData(r);this.skeletonVersion=_t.valid(_t.coerce(d.version)),this._spine_3_6_0=_t.satisfies(this.skeletonVersion,"<=3.6.0"),this._spine_3_7_99=_t.satisfies(this.skeletonVersion,"<=3.7.99"),this._spine_4_0_X=_t.satisfies(this.skeletonVersion,"~4.0.0"),this._spine_4_1_X=_t.satisfies(this.skeletonVersion,"~4.1.23"),this.skeleton=new i.Skeleton(d),this.skeleton.updateWorldTransform(),this.stateData=new i.AnimationStateData(this.skeleton.data),this.states=[new i.AnimationState(this.stateData)],this.clipper=new i.SkeletonClipping,this._node=new a.GraphNode,this._meshes=[],this._meshInstances=[],this._materials={},this._tint={},this._aabb=new a.BoundingBox,this._aabbTempArray=[],this._aabbTempOffset=new a.Vec2,this._aabbTempSize=new a.Vec2,this._renderCounts={vertexCount:0,indexCount:0},this._vertexFormat=null,this._vertexBuffer=null,this._indexBuffer=null,this._priority=0,this._timeScale=1,this._layers=[a.LAYERID_UI],this.init(),this._hidden=!1}),[{key:"destroy",value:function(){this.removeFromLayers();for(var t=0;t0&&this._renderCounts.vertexCount>0){this.skeleton.getBounds(this._aabbTempOffset,this._aabbTempSize,this._aabbTempArray),this._aabb.center=new a.Vec3(this._aabbTempOffset.x,this._aabbTempOffset.y,0),this._aabb.halfExtents=new a.Vec3(.5*this._aabbTempSize.x,.5*this._aabbTempSize.y,0),(!this._vertexBuffer||this._vertexBuffer.getNumVertices()0&&c.indices.length>0){t&&t!==c.material&&(this.SubmitBatch(e,n,t),t=c.material,e=o,n=0),t=c.material;var f=c.positions,p=c.vertexColor.r,d=c.vertexColor.g,m=c.vertexColor.b,v=c.vertexColor.a,g=c.uvs,y=void 0,E=f.length/2;for(y=0;y0){var r=new a.Mesh(this._app.graphicsDevice);r.vertexBuffer=this._vertexBuffer,r.indexBuffer[0]=this._indexBuffer,r.primitive[0].type=a.PRIMITIVE_TRIANGLES,r.primitive[0].base=t,r.primitive[0].count=e,r.primitive[0].indexed=!0,r.aabb=this._aabb,this._meshes.push(r);var i=new a.MeshInstance(r,this._materials[n],this._node);i.drawOrder=this.priority+this._meshInstances.length,i.visible=!this._hidden,this._meshInstances.push(i)}}},{key:"update",value:function(t){if(!this._hidden){var e;t*=this._timeScale;var n=this.states.length;for(e=0;e= 0; --o) { - var i = this.tryEntries[o], - a = i.completion; - if ("root" === i.tryLoc) return handle("end"); - if (i.tryLoc <= this.prev) { - var c = n.call(i, "catchLoc"), - u = n.call(i, "finallyLoc"); - if (c && u) { - if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); - if (this.prev < i.finallyLoc) return handle(i.finallyLoc); - } else if (c) { - if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); - } else { - if (!u) throw new Error("try statement without catch or finally"); - if (this.prev < i.finallyLoc) return handle(i.finallyLoc); - } - } - } - }, - abrupt: function (t, e) { - for (var r = this.tryEntries.length - 1; r >= 0; --r) { - var o = this.tryEntries[r]; - if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { - var i = o; - break; - } - } - i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); - var a = i ? i.completion : {}; - return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); - }, - complete: function (t, e) { - if ("throw" === t.type) throw t.arg; - return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; - }, - finish: function (t) { - for (var e = this.tryEntries.length - 1; e >= 0; --e) { - var r = this.tryEntries[e]; - if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; - } - }, - catch: function (t) { - for (var e = this.tryEntries.length - 1; e >= 0; --e) { - var r = this.tryEntries[e]; - if (r.tryLoc === t) { - var n = r.completion; - if ("throw" === n.type) { - var o = n.arg; - resetTryEntry(r); - } - return o; - } - } - throw new Error("illegal catch attempt"); - }, - delegateYield: function (e, r, n) { - return this.delegate = { - iterator: values(e), - resultName: r, - nextLoc: n - }, "next" === this.method && (this.arg = t), y; - } - }, e; - } function _typeof(o) { "@babel/helpers - typeof"; @@ -8228,17 +7924,6 @@ var spine = (function (pc) { }; return _setPrototypeOf(o, p); } - function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } - } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); @@ -8253,20 +7938,6 @@ var spine = (function (pc) { } return _assertThisInitialized(self); } - function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - return function _createSuperInternal() { - var Super = _getPrototypeOf(Derived), - result; - if (hasNativeReflectConstruct) { - var NewTarget = _getPrototypeOf(this).constructor; - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - return _possibleConstructorReturn(this, result); - }; - } function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); @@ -8274,11 +7945,11 @@ var spine = (function (pc) { } return object; } - function _get$1() { + function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { - _get$1 = Reflect.get.bind(); + _get = Reflect.get.bind(); } else { - _get$1 = function _get(target, property, receiver) { + _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); @@ -8288,7 +7959,7 @@ var spine = (function (pc) { return desc.value; }; } - return _get$1.apply(this, arguments); + return _get.apply(this, arguments); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); @@ -8327,7 +7998,7 @@ var spine = (function (pc) { function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { - if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { + if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike ) { if (it) o = it; var i = 0; var F = function () {}; @@ -8379,11 +8050,11 @@ var spine = (function (pc) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { - var res = prim.call(input, hint || "default"); + var res = prim.call(input, hint ); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } - return (hint === "string" ? String : Number)(input); + return (String )(input); } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); @@ -8412,7 +8083,7 @@ var spine = (function (pc) { }; this.pcTexture = texture; } - _createClass(SpineTextureWrapper, [{ + return _createClass(SpineTextureWrapper, [{ key: "setFilters", value: function setFilters(minFilter, magFilter) { this.pcTexture.minFilter = TO_TEXTURE_FILTER[minFilter]; @@ -8435,7 +8106,6 @@ var spine = (function (pc) { this.pcTexture.destroy(); } }]); - return SpineTextureWrapper; }(); function getDefaultExportFromCjs (x) { @@ -8525,8 +8195,11 @@ var spine = (function (pc) { createToken('XRANGEPLAINLOOSE', "[v=\\s]*(".concat(src[t.XRANGEIDENTIFIERLOOSE], ")") + "(?:\\.(".concat(src[t.XRANGEIDENTIFIERLOOSE], ")") + "(?:\\.(".concat(src[t.XRANGEIDENTIFIERLOOSE], ")") + "(?:".concat(src[t.PRERELEASELOOSE], ")?").concat(src[t.BUILD], "?") + ")?)?"); createToken('XRANGE', "^".concat(src[t.GTLT], "\\s*").concat(src[t.XRANGEPLAIN], "$")); createToken('XRANGELOOSE', "^".concat(src[t.GTLT], "\\s*").concat(src[t.XRANGEPLAINLOOSE], "$")); - createToken('COERCE', "".concat('(^|[^\\d])' + '(\\d{1,').concat(MAX_SAFE_COMPONENT_LENGTH, "})") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?") + "(?:$|[^\\d])"); + createToken('COERCEPLAIN', "".concat('(^|[^\\d])' + '(\\d{1,').concat(MAX_SAFE_COMPONENT_LENGTH, "})") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?")); + createToken('COERCE', "".concat(src[t.COERCEPLAIN], "(?:$|[^\\d])")); + createToken('COERCEFULL', src[t.COERCEPLAIN] + "(?:".concat(src[t.PRERELEASE], ")?") + "(?:".concat(src[t.BUILD], ")?") + "(?:$|[^\\d])"); createToken('COERCERTL', src[t.COERCE], true); + createToken('COERCERTLFULL', src[t.COERCEFULL], true); createToken('LONETILDE', '(?:~>?)'); createToken('TILDETRIM', "(\\s*)".concat(src[t.LONETILDE], "\\s+"), true); exports.tildeTrimReplace = '$1~'; @@ -8645,7 +8318,7 @@ var spine = (function (pc) { this.build = m[5] ? m[5].split('.') : []; this.format(); } - _createClass(SemVer, [{ + return _createClass(SemVer, [{ key: "format", value: function format() { this.version = "".concat(this.major, ".").concat(this.minor, ".").concat(this.patch); @@ -8723,7 +8396,7 @@ var spine = (function (pc) { do { var a = this.build[i]; var b = other.build[i]; - debug('prerelease compare', i, a, b); + debug('build compare', i, a, b); if (a === undefined && b === undefined) { return 0; } else if (b === undefined) { @@ -8834,7 +8507,6 @@ var spine = (function (pc) { return this; } }]); - return SemVer; }(); var semver$1 = SemVer$3; getDefaultExportFromCjs(semver$1); @@ -8882,727 +8554,76 @@ var spine = (function (pc) { options = options || {}; var match = null; if (!options.rtl) { - match = version.match(re[t.COERCE]); + match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]); } else { + var coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]; var next; - while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) { + while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next; } - re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; + coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length; } - re[t.COERCERTL].lastIndex = -1; + coerceRtlRegex.lastIndex = -1; } if (match === null) { return null; } - return parse("".concat(match[2], ".").concat(match[3] || '0', ".").concat(match[4] || '0'), options); + var major = match[2]; + var minor = match[3] || '0'; + var patch = match[4] || '0'; + var prerelease = options.includePrerelease && match[5] ? "-".concat(match[5]) : ''; + var build = options.includePrerelease && match[6] ? "+".concat(match[6]) : ''; + return parse("".concat(major, ".").concat(minor, ".").concat(patch).concat(prerelease).concat(build), options); }; var coerce_1 = coerce; var coerce$1 = getDefaultExportFromCjs(coerce_1); - var iterator; - var hasRequiredIterator; - function requireIterator() { - if (hasRequiredIterator) return iterator; - hasRequiredIterator = 1; - iterator = function iterator(Yallist) { - Yallist.prototype[Symbol.iterator] = _regeneratorRuntime().mark(function _callee() { - var walker; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - walker = this.head; - case 1: - if (!walker) { - _context.next = 7; - break; - } - _context.next = 4; - return walker.value; - case 4: - walker = walker.next; - _context.next = 1; - break; - case 7: - case "end": - return _context.stop(); - } - }, _callee, this); - }); - }; - return iterator; - } - - var yallist = Yallist$1; - Yallist$1.Node = Node; - Yallist$1.create = Yallist$1; - function Yallist$1(list) { - var self = this; - if (!(self instanceof Yallist$1)) { - self = new Yallist$1(); - } - self.tail = null; - self.head = null; - self.length = 0; - if (list && typeof list.forEach === 'function') { - list.forEach(function (item) { - self.push(item); - }); - } else if (arguments.length > 0) { - for (var i = 0, l = arguments.length; i < l; i++) { - self.push(arguments[i]); - } - } - return self; - } - Yallist$1.prototype.removeNode = function (node) { - if (node.list !== this) { - throw new Error('removing node which does not belong to this list'); - } - var next = node.next; - var prev = node.prev; - if (next) { - next.prev = prev; - } - if (prev) { - prev.next = next; - } - if (node === this.head) { - this.head = next; - } - if (node === this.tail) { - this.tail = prev; - } - node.list.length--; - node.next = null; - node.prev = null; - node.list = null; - return next; - }; - Yallist$1.prototype.unshiftNode = function (node) { - if (node === this.head) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - var head = this.head; - node.list = this; - node.next = head; - if (head) { - head.prev = node; - } - this.head = node; - if (!this.tail) { - this.tail = node; - } - this.length++; - }; - Yallist$1.prototype.pushNode = function (node) { - if (node === this.tail) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - var tail = this.tail; - node.list = this; - node.prev = tail; - if (tail) { - tail.next = node; - } - this.tail = node; - if (!this.head) { - this.head = node; - } - this.length++; - }; - Yallist$1.prototype.push = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - push(this, arguments[i]); - } - return this.length; - }; - Yallist$1.prototype.unshift = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - unshift(this, arguments[i]); - } - return this.length; - }; - Yallist$1.prototype.pop = function () { - if (!this.tail) { - return undefined; - } - var res = this.tail.value; - this.tail = this.tail.prev; - if (this.tail) { - this.tail.next = null; - } else { - this.head = null; - } - this.length--; - return res; - }; - Yallist$1.prototype.shift = function () { - if (!this.head) { - return undefined; - } - var res = this.head.value; - this.head = this.head.next; - if (this.head) { - this.head.prev = null; - } else { - this.tail = null; - } - this.length--; - return res; - }; - Yallist$1.prototype.forEach = function (fn, thisp) { - thisp = thisp || this; - for (var walker = this.head, i = 0; walker !== null; i++) { - fn.call(thisp, walker.value, i, this); - walker = walker.next; - } - }; - Yallist$1.prototype.forEachReverse = function (fn, thisp) { - thisp = thisp || this; - for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { - fn.call(thisp, walker.value, i, this); - walker = walker.prev; - } - }; - Yallist$1.prototype.get = function (n) { - for (var i = 0, walker = this.head; walker !== null && i < n; i++) { - walker = walker.next; - } - if (i === n && walker !== null) { - return walker.value; - } - }; - Yallist$1.prototype.getReverse = function (n) { - for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { - walker = walker.prev; - } - if (i === n && walker !== null) { - return walker.value; - } - }; - Yallist$1.prototype.map = function (fn, thisp) { - thisp = thisp || this; - var res = new Yallist$1(); - for (var walker = this.head; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.next; - } - return res; - }; - Yallist$1.prototype.mapReverse = function (fn, thisp) { - thisp = thisp || this; - var res = new Yallist$1(); - for (var walker = this.tail; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.prev; - } - return res; - }; - Yallist$1.prototype.reduce = function (fn, initial) { - var acc; - var walker = this.head; - if (arguments.length > 1) { - acc = initial; - } else if (this.head) { - walker = this.head.next; - acc = this.head.value; - } else { - throw new TypeError('Reduce of empty list with no initial value'); - } - for (var i = 0; walker !== null; i++) { - acc = fn(acc, walker.value, i); - walker = walker.next; - } - return acc; - }; - Yallist$1.prototype.reduceReverse = function (fn, initial) { - var acc; - var walker = this.tail; - if (arguments.length > 1) { - acc = initial; - } else if (this.tail) { - walker = this.tail.prev; - acc = this.tail.value; - } else { - throw new TypeError('Reduce of empty list with no initial value'); - } - for (var i = this.length - 1; walker !== null; i--) { - acc = fn(acc, walker.value, i); - walker = walker.prev; - } - return acc; - }; - Yallist$1.prototype.toArray = function () { - var arr = new Array(this.length); - for (var i = 0, walker = this.head; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.next; - } - return arr; - }; - Yallist$1.prototype.toArrayReverse = function () { - var arr = new Array(this.length); - for (var i = 0, walker = this.tail; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.prev; - } - return arr; - }; - Yallist$1.prototype.slice = function (from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; - } - from = from || 0; - if (from < 0) { - from += this.length; - } - var ret = new Yallist$1(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - for (var i = 0, walker = this.head; walker !== null && i < from; i++) { - walker = walker.next; - } - for (; walker !== null && i < to; i++, walker = walker.next) { - ret.push(walker.value); - } - return ret; - }; - Yallist$1.prototype.sliceReverse = function (from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; - } - from = from || 0; - if (from < 0) { - from += this.length; - } - var ret = new Yallist$1(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { - walker = walker.prev; - } - for (; walker !== null && i > from; i--, walker = walker.prev) { - ret.push(walker.value); - } - return ret; - }; - Yallist$1.prototype.splice = function (start, deleteCount) { - if (start > this.length) { - start = this.length - 1; - } - if (start < 0) { - start = this.length + start; - } - for (var i = 0, walker = this.head; walker !== null && i < start; i++) { - walker = walker.next; - } - var ret = []; - for (var i = 0; walker && i < deleteCount; i++) { - ret.push(walker.value); - walker = this.removeNode(walker); - } - if (walker === null) { - walker = this.tail; - } - if (walker !== this.head && walker !== this.tail) { - walker = walker.prev; - } - for (var i = 0; i < (arguments.length <= 2 ? 0 : arguments.length - 2); i++) { - walker = insert(this, walker, i + 2 < 2 || arguments.length <= i + 2 ? undefined : arguments[i + 2]); - } - return ret; - }; - Yallist$1.prototype.reverse = function () { - var head = this.head; - var tail = this.tail; - for (var walker = head; walker !== null; walker = walker.prev) { - var p = walker.prev; - walker.prev = walker.next; - walker.next = p; - } - this.head = tail; - this.tail = head; - return this; - }; - function insert(self, node, value) { - var inserted = node === self.head ? new Node(value, null, node, self) : new Node(value, node, node.next, self); - if (inserted.next === null) { - self.tail = inserted; - } - if (inserted.prev === null) { - self.head = inserted; - } - self.length++; - return inserted; - } - function push(self, item) { - self.tail = new Node(item, self.tail, null, self); - if (!self.head) { - self.head = self.tail; - } - self.length++; - } - function unshift(self, item) { - self.head = new Node(item, null, self.head, self); - if (!self.tail) { - self.tail = self.head; - } - self.length++; - } - function Node(value, prev, next, list) { - if (!(this instanceof Node)) { - return new Node(value, prev, next, list); - } - this.list = list; - this.value = value; - if (prev) { - prev.next = this; - this.prev = prev; - } else { - this.prev = null; - } - if (next) { - next.prev = this; - this.next = next; - } else { - this.next = null; - } - } - try { - requireIterator()(Yallist$1); - } catch (er) {} - getDefaultExportFromCjs(yallist); - - var Yallist = yallist; - var MAX = Symbol('max'); - var LENGTH = Symbol('length'); - var LENGTH_CALCULATOR = Symbol('lengthCalculator'); - var ALLOW_STALE = Symbol('allowStale'); - var MAX_AGE = Symbol('maxAge'); - var DISPOSE = Symbol('dispose'); - var NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet'); - var LRU_LIST = Symbol('lruList'); - var CACHE = Symbol('cache'); - var UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet'); - var naiveLength = function naiveLength() { - return 1; - }; var LRUCache = function () { - function LRUCache(options) { + function LRUCache() { _classCallCheck(this, LRUCache); - if (typeof options === 'number') options = { - max: options - }; - if (!options) options = {}; - if (options.max && (typeof options.max !== 'number' || options.max < 0)) throw new TypeError('max must be a non-negative number'); - this[MAX] = options.max || Infinity; - var lc = options.length || naiveLength; - this[LENGTH_CALCULATOR] = typeof lc !== 'function' ? naiveLength : lc; - this[ALLOW_STALE] = options.stale || false; - if (options.maxAge && typeof options.maxAge !== 'number') throw new TypeError('maxAge must be a number'); - this[MAX_AGE] = options.maxAge || 0; - this[DISPOSE] = options.dispose; - this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false; - this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false; - this.reset(); + this.max = 1000; + this.map = new Map(); } - _createClass(LRUCache, [{ - key: "max", - get: function get() { - return this[MAX]; - }, - set: function set(mL) { - if (typeof mL !== 'number' || mL < 0) throw new TypeError('max must be a non-negative number'); - this[MAX] = mL || Infinity; - trim(this); - } - }, { - key: "allowStale", - get: function get() { - return this[ALLOW_STALE]; - }, - set: function set(allowStale) { - this[ALLOW_STALE] = !!allowStale; - } - }, { - key: "maxAge", - get: function get() { - return this[MAX_AGE]; - }, - set: function set(mA) { - if (typeof mA !== 'number') throw new TypeError('maxAge must be a non-negative number'); - this[MAX_AGE] = mA; - trim(this); - } - }, { - key: "lengthCalculator", - get: function get() { - return this[LENGTH_CALCULATOR]; - }, - set: function set(lC) { - var _this = this; - if (typeof lC !== 'function') lC = naiveLength; - if (lC !== this[LENGTH_CALCULATOR]) { - this[LENGTH_CALCULATOR] = lC; - this[LENGTH] = 0; - this[LRU_LIST].forEach(function (hit) { - hit.length = _this[LENGTH_CALCULATOR](hit.value, hit.key); - _this[LENGTH] += hit.length; - }); - } - trim(this); - } - }, { - key: "length", - get: function get() { - return this[LENGTH]; - } - }, { - key: "itemCount", - get: function get() { - return this[LRU_LIST].length; - } - }, { - key: "rforEach", - value: function rforEach(fn, thisp) { - thisp = thisp || this; - for (var walker = this[LRU_LIST].tail; walker !== null;) { - var prev = walker.prev; - forEachStep(this, fn, walker, thisp); - walker = prev; - } - } - }, { - key: "forEach", - value: function forEach(fn, thisp) { - thisp = thisp || this; - for (var walker = this[LRU_LIST].head; walker !== null;) { - var next = walker.next; - forEachStep(this, fn, walker, thisp); - walker = next; - } - } - }, { - key: "keys", - value: function keys() { - return this[LRU_LIST].toArray().map(function (k) { - return k.key; - }); - } - }, { - key: "values", - value: function values() { - return this[LRU_LIST].toArray().map(function (k) { - return k.value; - }); - } - }, { - key: "reset", - value: function reset() { - var _this2 = this; - if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { - this[LRU_LIST].forEach(function (hit) { - return _this2[DISPOSE](hit.key, hit.value); - }); + return _createClass(LRUCache, [{ + key: "get", + value: function get(key) { + var value = this.map.get(key); + if (value === undefined) { + return undefined; + } else { + this.map.delete(key); + this.map.set(key, value); + return value; } - this[CACHE] = new Map(); - this[LRU_LIST] = new Yallist(); - this[LENGTH] = 0; - } - }, { - key: "dump", - value: function dump() { - var _this3 = this; - return this[LRU_LIST].map(function (hit) { - return isStale(_this3, hit) ? false : { - k: hit.key, - v: hit.value, - e: hit.now + (hit.maxAge || 0) - }; - }).toArray().filter(function (h) { - return h; - }); - } - }, { - key: "dumpLru", - value: function dumpLru() { - return this[LRU_LIST]; } }, { - key: "set", - value: function set(key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE]; - if (maxAge && typeof maxAge !== 'number') throw new TypeError('maxAge must be a number'); - var now = maxAge ? Date.now() : 0; - var len = this[LENGTH_CALCULATOR](value, key); - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - _del(this, this[CACHE].get(key)); - return false; - } - var node = this[CACHE].get(key); - var item = node.value; - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) this[DISPOSE](key, item.value); - } - item.now = now; - item.maxAge = maxAge; - item.value = value; - this[LENGTH] += len - item.length; - item.length = len; - this.get(key); - trim(this); + key: "delete", + value: function _delete(key) { + if (this.map.has(key)) { + this.map.delete(key); return true; - } - var hit = new Entry(key, value, len, now, maxAge); - if (hit.length > this[MAX]) { - if (this[DISPOSE]) this[DISPOSE](key, value); + } else { return false; } - this[LENGTH] += hit.length; - this[LRU_LIST].unshift(hit); - this[CACHE].set(key, this[LRU_LIST].head); - trim(this); - return true; - } - }, { - key: "has", - value: function has(key) { - if (!this[CACHE].has(key)) return false; - var hit = this[CACHE].get(key).value; - return !isStale(this, hit); - } - }, { - key: "get", - value: function get(key) { - return _get(this, key, true); - } - }, { - key: "peek", - value: function peek(key) { - return _get(this, key, false); - } - }, { - key: "pop", - value: function pop() { - var node = this[LRU_LIST].tail; - if (!node) return null; - _del(this, node); - return node.value; - } - }, { - key: "del", - value: function del(key) { - _del(this, this[CACHE].get(key)); } }, { - key: "load", - value: function load(arr) { - this.reset(); - var now = Date.now(); - for (var l = arr.length - 1; l >= 0; l--) { - var hit = arr[l]; - var expiresAt = hit.e || 0; - if (expiresAt === 0) this.set(hit.k, hit.v);else { - var maxAge = expiresAt - now; - if (maxAge > 0) { - this.set(hit.k, hit.v, maxAge); - } + key: "set", + value: function set(key, value) { + var deleted = this.delete(key); + if (!deleted && value !== undefined) { + if (this.map.size >= this.max) { + var firstKey = this.map.keys().next().value; + this.delete(firstKey); } + this.map.set(key, value); } - } - }, { - key: "prune", - value: function prune() { - var _this4 = this; - this[CACHE].forEach(function (value, key) { - return _get(_this4, key, false); - }); + return this; } }]); - return LRUCache; }(); - var _get = function _get(self, key, doUse) { - var node = self[CACHE].get(key); - if (node) { - var hit = node.value; - if (isStale(self, hit)) { - _del(self, node); - if (!self[ALLOW_STALE]) return undefined; - } else { - if (doUse) { - if (self[UPDATE_AGE_ON_GET]) node.value.now = Date.now(); - self[LRU_LIST].unshiftNode(node); - } - } - return hit.value; - } - }; - var isStale = function isStale(self, hit) { - if (!hit || !hit.maxAge && !self[MAX_AGE]) return false; - var diff = Date.now() - hit.now; - return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && diff > self[MAX_AGE]; - }; - var trim = function trim(self) { - if (self[LENGTH] > self[MAX]) { - for (var walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null;) { - var prev = walker.prev; - _del(self, walker); - walker = prev; - } - } - }; - var _del = function _del(self, node) { - if (node) { - var hit = node.value; - if (self[DISPOSE]) self[DISPOSE](hit.key, hit.value); - self[LENGTH] -= hit.length; - self[CACHE].delete(hit.key); - self[LRU_LIST].removeNode(node); - } - }; - var Entry = _createClass(function Entry(key, value, length, now, maxAge) { - _classCallCheck(this, Entry); - this.key = key; - this.value = value; - this.length = length; - this.now = now; - this.maxAge = maxAge || 0; - }); - var forEachStep = function forEachStep(self, fn, node, thisp) { - var hit = node.value; - if (isStale(self, hit)) { - _del(self, node); - if (!self[ALLOW_STALE]) hit = undefined; - } - if (hit) fn.call(thisp, hit.value, hit.key, self); - }; - var lruCache = LRUCache; - getDefaultExportFromCjs(lruCache); + var lrucache = LRUCache; + getDefaultExportFromCjs(lrucache); var SemVer = semver$1; var compare$6 = function compare(a, b, loose) { @@ -9727,7 +8748,7 @@ var spine = (function (pc) { } debug('comp', this); } - _createClass(Comparator, [{ + return _createClass(Comparator, [{ key: "parse", value: function parse(comp) { var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; @@ -9813,7 +8834,6 @@ var spine = (function (pc) { return ANY; } }]); - return Comparator; }(); comparator = Comparator; var parseOptions = parseOptions_1; @@ -9888,7 +8908,7 @@ var spine = (function (pc) { } this.format(); } - _createClass(Range, [{ + return _createClass(Range, [{ key: "format", value: function format() { this.range = this.set.map(function (comps) { @@ -9996,13 +9016,10 @@ var spine = (function (pc) { return false; } }]); - return Range; }(); range = Range; - var LRU = lruCache; - var cache = new LRU({ - max: 1000 - }); + var LRU = lrucache; + var cache = new LRU(); var parseOptions = parseOptions_1; var Comparator = requireComparator(); var debug = debug_1; @@ -10192,7 +9209,7 @@ var spine = (function (pc) { return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ''); }; var hyphenReplace = function hyphenReplace(incPr) { - return function ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { + return function ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) { if (isX(fM)) { from = ''; } else if (isX(fm)) { @@ -10334,7 +9351,7 @@ var spine = (function (pc) { this.init(); this._hidden = false; } - _createClass(Spine, [{ + return _createClass(Spine, [{ key: "destroy", value: function destroy() { this.removeFromLayers(); @@ -10729,25 +9746,37 @@ var spine = (function (pc) { this.addToLayers(); } }]); - return Spine; }(); + function _callSuper$1(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var SpineComponent = function (_Component) { - _inherits(SpineComponent, _Component); - var _super = _createSuper(SpineComponent); function SpineComponent(system, entity) { - var _this; + var _this2; _classCallCheck(this, SpineComponent); - _this = _super.call(this, system, entity); - _this.on('set_atlasAsset', _this.onSetAsset, _assertThisInitialized(_this)); - _this.on('set_textureAssets', _this.onSetAssets, _assertThisInitialized(_this)); - _this.on('set_skeletonAsset', _this.onSetAsset, _assertThisInitialized(_this)); - _this.on('set_atlasData', _this.onSetResource, _assertThisInitialized(_this)); - _this.on('set_textures', _this.onSetResource, _assertThisInitialized(_this)); - _this.on('set_skeletonData', _this.onSetResource, _assertThisInitialized(_this)); - return _this; + _this2 = _callSuper$1(this, SpineComponent, [system, entity]); + _this2.on('set_atlasAsset', _this2.onSetAsset, _this2); + _this2.on('set_textureAssets', _this2.onSetAssets, _this2); + _this2.on('set_skeletonAsset', _this2.onSetAsset, _this2); + _this2.on('set_atlasData', _this2.onSetResource, _this2); + _this2.on('set_textures', _this2.onSetResource, _this2); + _this2.on('set_skeletonData', _this2.onSetResource, _this2); + return _this2; } - _createClass(SpineComponent, [{ + _inherits(SpineComponent, _Component); + return _createClass(SpineComponent, [{ key: "_createSpine", value: function _createSpine() { if (this.data.spine) { @@ -10929,7 +9958,6 @@ var spine = (function (pc) { } } }]); - return SpineComponent; }(pc.Component); var SpineComponentData = _createClass(function SpineComponentData() { @@ -10945,26 +9973,39 @@ var spine = (function (pc) { this.skeletonData = null; }); + function _callSuper(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var SpineComponentSystem = function (_ComponentSystem) { - _inherits(SpineComponentSystem, _ComponentSystem); - var _super = _createSuper(SpineComponentSystem); function SpineComponentSystem(app) { - var _this; + var _this2; _classCallCheck(this, SpineComponentSystem); - _this = _super.call(this, app); - _this.id = 'spine'; - _this.ComponentType = SpineComponent; - _this.DataType = SpineComponentData; - _this.schema = ['enabled', 'atlasAsset', 'textureAssets', 'skeletonAsset', 'atlasData', 'textures', 'skeletonData', 'speed', 'spine']; - _this.on('beforeremove', _this.onBeforeRemove, _assertThisInitialized(_this)); - _this.app.systems.on('update', _this.onUpdate, _assertThisInitialized(_this)); - return _this; + _this2 = _callSuper(this, SpineComponentSystem, [app]); + _this2.id = 'spine'; + _this2.ComponentType = SpineComponent; + _this2.DataType = SpineComponentData; + _this2.schema = ['enabled', 'atlasAsset', 'textureAssets', 'skeletonAsset', 'atlasData', 'textures', 'skeletonData', 'speed', 'spine']; + _this2.on('beforeremove', _this2.onBeforeRemove, _this2); + _this2.app.systems.on('update', _this2.onUpdate, _this2); + return _this2; } - _createClass(SpineComponentSystem, [{ + _inherits(SpineComponentSystem, _ComponentSystem); + return _createClass(SpineComponentSystem, [{ key: "initializeComponentData", value: function initializeComponentData(component, data, properties) { properties = ['enabled', 'atlasAsset', 'textureAssets', 'skeletonAsset', 'atlasData', 'textures', 'skeletonData', 'spine']; - _get$1(_getPrototypeOf(SpineComponentSystem.prototype), "initializeComponentData", this).call(this, component, data, properties); + _get(_getPrototypeOf(SpineComponentSystem.prototype), "initializeComponentData", this).call(this, component, data, properties); } }, { key: "onBeforeRemove", @@ -10993,7 +10034,6 @@ var spine = (function (pc) { } } }]); - return SpineComponentSystem; }(pc.ComponentSystem); (function () { diff --git a/build/playcanvas-spine.3.8.min.js b/build/playcanvas-spine.3.8.min.js index 439c7fe..6e204f9 100644 --- a/build/playcanvas-spine.3.8.min.js +++ b/build/playcanvas-spine.3.8.min.js @@ -1 +1 @@ -var spine=function(t){"use strict";function e(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var n,r,a,i=e(t),o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function s(){s=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",h=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,o=Object.create(i.prototype),s=new k(r||[]);return a(o,"_invoke",{value:R(t,n,s)}),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var d="suspendedStart",p="suspendedYield",m="executing",v="completed",g={};function y(){}function E(){}function w(){}var x={};u(x,o,(function(){return this}));var T=Object.getPrototypeOf,A=T&&T(T(N([])));A&&A!==n&&r.call(A,o)&&(x=A);var M=w.prototype=y.prototype=Object.create(x);function I(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function n(a,i,o,s){var h=f(t[a],t,i);if("throw"!==h.type){var l=h.arg,u=l.value;return u&&"object"==typeof u&&r.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,o,s)}),(function(t){n("throw",t,o,s)})):e.resolve(u).then((function(t){l.value=t,o(l)}),(function(t){return n("throw",t,o,s)}))}s(h.arg)}var i;a(this,"_invoke",{value:function(t,r){function a(){return new e((function(e,a){n(t,r,e,a)}))}return i=i?i.then(a,a):a()}})}function R(e,n,r){var a=d;return function(i,o){if(a===m)throw new Error("Generator is already running");if(a===v){if("throw"===i)throw o;return{value:t,done:!0}}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var h=S(s,r);if(h){if(h===g)continue;return h}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===d)throw a=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=m;var l=f(e,n,r);if("normal"===l.type){if(a=r.done?v:p,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(a=v,r.method="throw",r.arg=l.arg)}}}function S(e,n){var r=n.method,a=e.iterator[r];if(a===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,S(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=f(a,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function N(e){if(e||""===e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function n(){for(;++a=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var h=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(h&&l){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;P(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:N(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function M(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}!function(t){var e,n,r,a=function(){function t(t,e,n){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var r=0;r0&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;l>>1;;){if(t[(i+1)*n]<=e?r=i+1:a=i,r==a)return(r+1)*n;i=r+a>>>1}},t.linearSearch=function(t,e,n){for(var r=0,a=t.length-n;r<=a;r+=n)if(t[r]>e)return r;return-1},t}();t.Animation=a,function(t){t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add"}(e=t.MixBlend||(t.MixBlend={})),function(t){t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut"}(n=t.MixDirection||(t.MixDirection={})),function(t){t[t.rotate=0]="rotate",t[t.translate=1]="translate",t[t.scale=2]="scale",t[t.shear=3]="shear",t[t.attachment=4]="attachment",t[t.color=5]="color",t[t.deform=6]="deform",t[t.event=7]="event",t[t.drawOrder=8]="drawOrder",t[t.ikConstraint=9]="ikConstraint",t[t.transformConstraint=10]="transformConstraint",t[t.pathConstraintPosition=11]="pathConstraintPosition",t[t.pathConstraintSpacing=12]="pathConstraintSpacing",t[t.pathConstraintMix=13]="pathConstraintMix",t[t.twoColor=14]="twoColor"}(r=t.TimelineType||(t.TimelineType={}));var i=function(){function e(n){if(n<=0)throw new Error("frameCount must be > 0: "+n);this.curves=t.Utils.newFloatArray((n-1)*e.BEZIER_SIZE)}return e.prototype.getFrameCount=function(){return this.curves.length/e.BEZIER_SIZE+1},e.prototype.setLinear=function(t){this.curves[t*e.BEZIER_SIZE]=e.LINEAR},e.prototype.setStepped=function(t){this.curves[t*e.BEZIER_SIZE]=e.STEPPED},e.prototype.getCurveType=function(t){var n=t*e.BEZIER_SIZE;if(n==this.curves.length)return e.LINEAR;var r=this.curves[n];return r==e.LINEAR?e.LINEAR:r==e.STEPPED?e.STEPPED:e.BEZIER},e.prototype.setCurve=function(t,n,r,a,i){var o=.03*(2*-n+a),s=.03*(2*-r+i),h=.006*(3*(n-a)+1),l=.006*(3*(r-i)+1),u=2*o+h,c=2*s+l,f=.3*n+o+.16666667*h,d=.3*r+s+.16666667*l,p=t*e.BEZIER_SIZE,m=this.curves;m[p++]=e.BEZIER;for(var v=f,g=d,y=p+e.BEZIER_SIZE-1;p=r){var u=void 0,c=void 0;return i==h?(u=0,c=0):(u=a[i-2],c=a[i-1]),c+(a[i+1]-c)*(r-u)/(s-u)}var f=a[i-1];return f+(1-f)*(r-s)/(1-s)},e.LINEAR=0,e.STEPPED=1,e.BEZIER=2,e.BEZIER_SIZE=19,e}();t.CurveTimeline=i;var s=function(n){function i(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e<<1),r}return o(i,n),i.prototype.getPropertyId=function(){return(r.rotate<<24)+this.boneIndex},i.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+i.ROTATION]=n},i.prototype.apply=function(t,n,r,o,s,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(r=u[u.length-i.ENTRIES]){var d=u[u.length+i.PREV_ROTATION];switch(h){case e.setup:c.rotation=c.data.rotation+d*s;break;case e.first:case e.replace:d+=c.data.rotation-c.rotation,d-=360*(16384-(16384.499999999996-d/360|0));case e.add:c.rotation+=d*s}}else{var p=a.binarySearch(u,r,i.ENTRIES),m=u[p+i.PREV_ROTATION],v=u[p],g=this.getCurvePercent((p>>1)-1,1-(r-v)/(u[p+i.PREV_TIME]-v)),y=u[p+i.ROTATION]-m;switch(y=m+(y-360*(16384-(16384.499999999996-y/360|0)))*g,h){case e.setup:c.rotation=c.data.rotation+(y-360*(16384-(16384.499999999996-y/360|0)))*s;break;case e.first:case e.replace:y+=c.data.rotation-c.rotation;case e.add:c.rotation+=(y-360*(16384-(16384.499999999996-y/360|0)))*s}}},i.ENTRIES=2,i.PREV_TIME=-2,i.PREV_ROTATION=-1,i.ROTATION=1,i}(i);t.RotateTimeline=s;var h=function(n){function i(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*i.ENTRIES),r}return o(i,n),i.prototype.getPropertyId=function(){return(r.translate<<24)+this.boneIndex},i.prototype.setFrame=function(t,e,n,r){t*=i.ENTRIES,this.frames[t]=e,this.frames[t+i.X]=n,this.frames[t+i.Y]=r},i.prototype.apply=function(t,n,r,o,s,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(r=u[u.length-i.ENTRIES])f=u[u.length+i.PREV_X],d=u[u.length+i.PREV_Y];else{var p=a.binarySearch(u,r,i.ENTRIES);f=u[p+i.PREV_X],d=u[p+i.PREV_Y];var m=u[p],v=this.getCurvePercent(p/i.ENTRIES-1,1-(r-m)/(u[p+i.PREV_TIME]-m));f+=(u[p+i.X]-f)*v,d+=(u[p+i.Y]-d)*v}switch(h){case e.setup:c.x=c.data.x+f*s,c.y=c.data.y+d*s;break;case e.first:case e.replace:c.x+=(c.data.x+f-c.x)*s,c.y+=(c.data.y+d-c.y)*s;break;case e.add:c.x+=f*s,c.y+=d*s}}},i.ENTRIES=3,i.PREV_TIME=-3,i.PREV_X=-2,i.PREV_Y=-1,i.X=1,i.Y=2,i}(i);t.TranslateTimeline=h;var l=function(i){function s(t){return i.call(this,t)||this}return o(s,i),s.prototype.getPropertyId=function(){return(r.scale<<24)+this.boneIndex},s.prototype.apply=function(r,i,o,h,l,u,c){var f=this.frames,d=r.bones[this.boneIndex];if(d.active)if(o=f[f.length-s.ENTRIES])p=f[f.length+s.PREV_X]*d.data.scaleX,m=f[f.length+s.PREV_Y]*d.data.scaleY;else{var v=a.binarySearch(f,o,s.ENTRIES);p=f[v+s.PREV_X],m=f[v+s.PREV_Y];var g=f[v],y=this.getCurvePercent(v/s.ENTRIES-1,1-(o-g)/(f[v+s.PREV_TIME]-g));p=(p+(f[v+s.X]-p)*y)*d.data.scaleX,m=(m+(f[v+s.Y]-m)*y)*d.data.scaleY}if(1==l)u==e.add?(d.scaleX+=p-d.data.scaleX,d.scaleY+=m-d.data.scaleY):(d.scaleX=p,d.scaleY=m);else{var E=0,w=0;if(c==n.mixOut)switch(u){case e.setup:E=d.data.scaleX,w=d.data.scaleY,d.scaleX=E+(Math.abs(p)*t.MathUtils.signum(E)-E)*l,d.scaleY=w+(Math.abs(m)*t.MathUtils.signum(w)-w)*l;break;case e.first:case e.replace:E=d.scaleX,w=d.scaleY,d.scaleX=E+(Math.abs(p)*t.MathUtils.signum(E)-E)*l,d.scaleY=w+(Math.abs(m)*t.MathUtils.signum(w)-w)*l;break;case e.add:E=d.scaleX,w=d.scaleY,d.scaleX=E+(Math.abs(p)*t.MathUtils.signum(E)-d.data.scaleX)*l,d.scaleY=w+(Math.abs(m)*t.MathUtils.signum(w)-d.data.scaleY)*l}else switch(u){case e.setup:E=Math.abs(d.data.scaleX)*t.MathUtils.signum(p),w=Math.abs(d.data.scaleY)*t.MathUtils.signum(m),d.scaleX=E+(p-E)*l,d.scaleY=w+(m-w)*l;break;case e.first:case e.replace:E=Math.abs(d.scaleX)*t.MathUtils.signum(p),w=Math.abs(d.scaleY)*t.MathUtils.signum(m),d.scaleX=E+(p-E)*l,d.scaleY=w+(m-w)*l;break;case e.add:E=t.MathUtils.signum(p),w=t.MathUtils.signum(m),d.scaleX=Math.abs(d.scaleX)*E+(p-Math.abs(d.data.scaleX)*E)*l,d.scaleY=Math.abs(d.scaleY)*w+(m-Math.abs(d.data.scaleY)*w)*l}}}},s}(h);t.ScaleTimeline=l;var u=function(t){function n(e){return t.call(this,e)||this}return o(n,t),n.prototype.getPropertyId=function(){return(r.shear<<24)+this.boneIndex},n.prototype.apply=function(t,r,i,o,s,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(i=u[u.length-n.ENTRIES])f=u[u.length+n.PREV_X],d=u[u.length+n.PREV_Y];else{var p=a.binarySearch(u,i,n.ENTRIES);f=u[p+n.PREV_X],d=u[p+n.PREV_Y];var m=u[p],v=this.getCurvePercent(p/n.ENTRIES-1,1-(i-m)/(u[p+n.PREV_TIME]-m));f+=(u[p+n.X]-f)*v,d+=(u[p+n.Y]-d)*v}switch(h){case e.setup:c.shearX=c.data.shearX+f*s,c.shearY=c.data.shearY+d*s;break;case e.first:case e.replace:c.shearX+=(c.data.shearX+f-c.shearX)*s,c.shearY+=(c.data.shearY+d-c.shearY)*s;break;case e.add:c.shearX+=f*s,c.shearY+=d*s}}},n}(h);t.ShearTimeline=u;var c=function(n){function i(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*i.ENTRIES),r}return o(i,n),i.prototype.getPropertyId=function(){return(r.color<<24)+this.slotIndex},i.prototype.setFrame=function(t,e,n,r,a,o){t*=i.ENTRIES,this.frames[t]=e,this.frames[t+i.R]=n,this.frames[t+i.G]=r,this.frames[t+i.B]=a,this.frames[t+i.A]=o},i.prototype.apply=function(t,n,r,o,s,h,l){var u=t.slots[this.slotIndex];if(u.bone.active){var c=this.frames;if(r=c[c.length-i.ENTRIES]){var y=c.length;p=c[y+i.PREV_R],m=c[y+i.PREV_G],v=c[y+i.PREV_B],g=c[y+i.PREV_A]}else{var E=a.binarySearch(c,r,i.ENTRIES);p=c[E+i.PREV_R],m=c[E+i.PREV_G],v=c[E+i.PREV_B],g=c[E+i.PREV_A];var w=c[E],x=this.getCurvePercent(E/i.ENTRIES-1,1-(r-w)/(c[E+i.PREV_TIME]-w));p+=(c[E+i.R]-p)*x,m+=(c[E+i.G]-m)*x,v+=(c[E+i.B]-v)*x,g+=(c[E+i.A]-g)*x}if(1==s)u.color.set(p,m,v,g);else{f=u.color;h==e.setup&&f.setFromColor(u.data.color),f.add((p-f.r)*s,(m-f.g)*s,(v-f.b)*s,(g-f.a)*s)}}}},i.ENTRIES=5,i.PREV_TIME=-5,i.PREV_R=-4,i.PREV_G=-3,i.PREV_B=-2,i.PREV_A=-1,i.R=1,i.G=2,i.B=3,i.A=4,i}(i);t.ColorTimeline=c;var f=function(n){function i(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*i.ENTRIES),r}return o(i,n),i.prototype.getPropertyId=function(){return(r.twoColor<<24)+this.slotIndex},i.prototype.setFrame=function(t,e,n,r,a,o,s,h,l){t*=i.ENTRIES,this.frames[t]=e,this.frames[t+i.R]=n,this.frames[t+i.G]=r,this.frames[t+i.B]=a,this.frames[t+i.A]=o,this.frames[t+i.R2]=s,this.frames[t+i.G2]=h,this.frames[t+i.B2]=l},i.prototype.apply=function(t,n,r,o,s,h,l){var u=t.slots[this.slotIndex];if(u.bone.active){var c=this.frames;if(r=c[c.length-i.ENTRIES]){var A=c.length;v=c[A+i.PREV_R],g=c[A+i.PREV_G],y=c[A+i.PREV_B],E=c[A+i.PREV_A],w=c[A+i.PREV_R2],x=c[A+i.PREV_G2],T=c[A+i.PREV_B2]}else{var M=a.binarySearch(c,r,i.ENTRIES);v=c[M+i.PREV_R],g=c[M+i.PREV_G],y=c[M+i.PREV_B],E=c[M+i.PREV_A],w=c[M+i.PREV_R2],x=c[M+i.PREV_G2],T=c[M+i.PREV_B2];var I=c[M],b=this.getCurvePercent(M/i.ENTRIES-1,1-(r-I)/(c[M+i.PREV_TIME]-I));v+=(c[M+i.R]-v)*b,g+=(c[M+i.G]-g)*b,y+=(c[M+i.B]-y)*b,E+=(c[M+i.A]-E)*b,w+=(c[M+i.R2]-w)*b,x+=(c[M+i.G2]-x)*b,T+=(c[M+i.B2]-T)*b}if(1==s)u.color.set(v,g,y,E),u.darkColor.set(w,x,T,1);else{f=u.color,d=u.darkColor;h==e.setup&&(f.setFromColor(u.data.color),d.setFromColor(u.data.darkColor)),f.add((v-f.r)*s,(g-f.g)*s,(y-f.b)*s,(E-f.a)*s),d.add((w-d.r)*s,(x-d.g)*s,(T-d.b)*s,0)}}}},i.ENTRIES=8,i.PREV_TIME=-8,i.PREV_R=-7,i.PREV_G=-6,i.PREV_B=-5,i.PREV_A=-4,i.PREV_R2=-3,i.PREV_G2=-2,i.PREV_B2=-1,i.R=1,i.G=2,i.B=3,i.A=4,i.R2=5,i.G2=6,i.B2=7,i}(i);t.TwoColorTimeline=f;var d=function(){function i(e){this.frames=t.Utils.newFloatArray(e),this.attachmentNames=new Array(e)}return i.prototype.getPropertyId=function(){return(r.attachment<<24)+this.slotIndex},i.prototype.getFrameCount=function(){return this.frames.length},i.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},i.prototype.apply=function(t,r,i,o,s,h,l){var u=t.slots[this.slotIndex];if(u.bone.active)if(l!=n.mixOut){var c=this.frames;if(i=c[c.length-1]?c.length-1:a.binarySearch(c,i,1)-1;var d=this.attachmentNames[f];t.slots[this.slotIndex].setAttachment(null==d?null:t.getAttachment(this.slotIndex,d))}}else h==e.setup&&this.setAttachment(t,u,u.data.attachmentName)},i.prototype.setAttachment=function(t,e,n){e.setAttachment(null==n?null:t.getAttachment(this.slotIndex,n))},i}();t.AttachmentTimeline=d;var p=null,m=function(n){function i(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e),r.frameVertices=new Array(e),null==p&&(p=t.Utils.newFloatArray(64)),r}return o(i,n),i.prototype.getPropertyId=function(){return(r.deform<<27)+ +this.attachment.id+this.slotIndex},i.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},i.prototype.apply=function(n,r,i,o,s,h,l){var u=n.slots[this.slotIndex];if(u.bone.active){var c=u.getAttachment();if(c instanceof t.VertexAttachment&&c.deformAttachment==this.attachment){var f=u.deform;0==f.length&&(h=e.setup);var d=this.frameVertices,p=d[0].length,m=this.frames;if(i=m[m.length-1]){var x=d[m.length-1];if(1==s)if(h==e.add)if(null==(v=c).bones){y=v.vertices;for(var T=0;Tn)this.apply(t,e,Number.MAX_VALUE,r,i,o,s),e=-1;else if(e>=h[l-1])return;if(!(n0&&h[u-1]==c;)u--;for(;u=h[u];u++)r.push(this.events[u])}}},e}();t.EventTimeline=v;var g=function(){function i(e){this.frames=t.Utils.newFloatArray(e),this.drawOrders=new Array(e)}return i.prototype.getPropertyId=function(){return r.drawOrder<<24},i.prototype.getFrameCount=function(){return this.frames.length},i.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},i.prototype.apply=function(r,i,o,s,h,l,u){var c=r.drawOrder,f=r.slots;if(u!=n.mixOut){var d=this.frames;if(o=d[d.length-1]?d.length-1:a.binarySearch(d,o)-1;var m=this.drawOrders[p];if(null==m)t.Utils.arrayCopy(f,0,c,0,f.length);else for(var v=0,g=m.length;v=c[c.length-s.ENTRIES])l==e.setup?(f.mix=f.data.mix+(c[c.length+s.PREV_MIX]-f.data.mix)*h,f.softness=f.data.softness+(c[c.length+s.PREV_SOFTNESS]-f.data.softness)*h,u==n.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=c[c.length+s.PREV_BEND_DIRECTION],f.compress=0!=c[c.length+s.PREV_COMPRESS],f.stretch=0!=c[c.length+s.PREV_STRETCH])):(f.mix+=(c[c.length+s.PREV_MIX]-f.mix)*h,f.softness+=(c[c.length+s.PREV_SOFTNESS]-f.softness)*h,u==n.mixIn&&(f.bendDirection=c[c.length+s.PREV_BEND_DIRECTION],f.compress=0!=c[c.length+s.PREV_COMPRESS],f.stretch=0!=c[c.length+s.PREV_STRETCH]));else{var d=a.binarySearch(c,i,s.ENTRIES),p=c[d+s.PREV_MIX],m=c[d+s.PREV_SOFTNESS],v=c[d],g=this.getCurvePercent(d/s.ENTRIES-1,1-(i-v)/(c[d+s.PREV_TIME]-v));l==e.setup?(f.mix=f.data.mix+(p+(c[d+s.MIX]-p)*g-f.data.mix)*h,f.softness=f.data.softness+(m+(c[d+s.SOFTNESS]-m)*g-f.data.softness)*h,u==n.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=c[d+s.PREV_BEND_DIRECTION],f.compress=0!=c[d+s.PREV_COMPRESS],f.stretch=0!=c[d+s.PREV_STRETCH])):(f.mix+=(p+(c[d+s.MIX]-p)*g-f.mix)*h,f.softness+=(m+(c[d+s.SOFTNESS]-m)*g-f.softness)*h,u==n.mixIn&&(f.bendDirection=c[d+s.PREV_BEND_DIRECTION],f.compress=0!=c[d+s.PREV_COMPRESS],f.stretch=0!=c[d+s.PREV_STRETCH]))}},s.ENTRIES=6,s.PREV_TIME=-6,s.PREV_MIX=-5,s.PREV_SOFTNESS=-4,s.PREV_BEND_DIRECTION=-3,s.PREV_COMPRESS=-2,s.PREV_STRETCH=-1,s.MIX=1,s.SOFTNESS=2,s.BEND_DIRECTION=3,s.COMPRESS=4,s.STRETCH=5,s}(i);t.IkConstraintTimeline=y;var E=function(n){function i(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*i.ENTRIES),r}return o(i,n),i.prototype.getPropertyId=function(){return(r.transformConstraint<<24)+this.transformConstraintIndex},i.prototype.setFrame=function(t,e,n,r,a,o){t*=i.ENTRIES,this.frames[t]=e,this.frames[t+i.ROTATE]=n,this.frames[t+i.TRANSLATE]=r,this.frames[t+i.SCALE]=a,this.frames[t+i.SHEAR]=o},i.prototype.apply=function(t,n,r,o,s,h,l){var u=this.frames,c=t.transformConstraints[this.transformConstraintIndex];if(c.active)if(r=u[u.length-i.ENTRIES]){var g=u.length;d=u[g+i.PREV_ROTATE],p=u[g+i.PREV_TRANSLATE],m=u[g+i.PREV_SCALE],v=u[g+i.PREV_SHEAR]}else{var y=a.binarySearch(u,r,i.ENTRIES);d=u[y+i.PREV_ROTATE],p=u[y+i.PREV_TRANSLATE],m=u[y+i.PREV_SCALE],v=u[y+i.PREV_SHEAR];var E=u[y],w=this.getCurvePercent(y/i.ENTRIES-1,1-(r-E)/(u[y+i.PREV_TIME]-E));d+=(u[y+i.ROTATE]-d)*w,p+=(u[y+i.TRANSLATE]-p)*w,m+=(u[y+i.SCALE]-m)*w,v+=(u[y+i.SHEAR]-v)*w}if(h==e.setup){f=c.data;c.rotateMix=f.rotateMix+(d-f.rotateMix)*s,c.translateMix=f.translateMix+(p-f.translateMix)*s,c.scaleMix=f.scaleMix+(m-f.scaleMix)*s,c.shearMix=f.shearMix+(v-f.shearMix)*s}else c.rotateMix+=(d-c.rotateMix)*s,c.translateMix+=(p-c.translateMix)*s,c.scaleMix+=(m-c.scaleMix)*s,c.shearMix+=(v-c.shearMix)*s}},i.ENTRIES=5,i.PREV_TIME=-5,i.PREV_ROTATE=-4,i.PREV_TRANSLATE=-3,i.PREV_SCALE=-2,i.PREV_SHEAR=-1,i.ROTATE=1,i.TRANSLATE=2,i.SCALE=3,i.SHEAR=4,i}(i);t.TransformConstraintTimeline=E;var w=function(n){function i(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*i.ENTRIES),r}return o(i,n),i.prototype.getPropertyId=function(){return(r.pathConstraintPosition<<24)+this.pathConstraintIndex},i.prototype.setFrame=function(t,e,n){t*=i.ENTRIES,this.frames[t]=e,this.frames[t+i.VALUE]=n},i.prototype.apply=function(t,n,r,o,s,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(r=u[u.length-i.ENTRIES])f=u[u.length+i.PREV_VALUE];else{var d=a.binarySearch(u,r,i.ENTRIES);f=u[d+i.PREV_VALUE];var p=u[d],m=this.getCurvePercent(d/i.ENTRIES-1,1-(r-p)/(u[d+i.PREV_TIME]-p));f+=(u[d+i.VALUE]-f)*m}h==e.setup?c.position=c.data.position+(f-c.data.position)*s:c.position+=(f-c.position)*s}},i.ENTRIES=2,i.PREV_TIME=-2,i.PREV_VALUE=-1,i.VALUE=1,i}(i);t.PathConstraintPositionTimeline=w;var x=function(t){function n(e){return t.call(this,e)||this}return o(n,t),n.prototype.getPropertyId=function(){return(r.pathConstraintSpacing<<24)+this.pathConstraintIndex},n.prototype.apply=function(t,r,i,o,s,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(i=u[u.length-n.ENTRIES])f=u[u.length+n.PREV_VALUE];else{var d=a.binarySearch(u,i,n.ENTRIES);f=u[d+n.PREV_VALUE];var p=u[d],m=this.getCurvePercent(d/n.ENTRIES-1,1-(i-p)/(u[d+n.PREV_TIME]-p));f+=(u[d+n.VALUE]-f)*m}h==e.setup?c.spacing=c.data.spacing+(f-c.data.spacing)*s:c.spacing+=(f-c.spacing)*s}},n}(w);t.PathConstraintSpacingTimeline=x;var T=function(n){function i(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*i.ENTRIES),r}return o(i,n),i.prototype.getPropertyId=function(){return(r.pathConstraintMix<<24)+this.pathConstraintIndex},i.prototype.setFrame=function(t,e,n,r){t*=i.ENTRIES,this.frames[t]=e,this.frames[t+i.ROTATE]=n,this.frames[t+i.TRANSLATE]=r},i.prototype.apply=function(t,n,r,o,s,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(r=u[u.length-i.ENTRIES])f=u[u.length+i.PREV_ROTATE],d=u[u.length+i.PREV_TRANSLATE];else{var p=a.binarySearch(u,r,i.ENTRIES);f=u[p+i.PREV_ROTATE],d=u[p+i.PREV_TRANSLATE];var m=u[p],v=this.getCurvePercent(p/i.ENTRIES-1,1-(r-m)/(u[p+i.PREV_TIME]-m));f+=(u[p+i.ROTATE]-f)*v,d+=(u[p+i.TRANSLATE]-d)*v}h==e.setup?(c.rotateMix=c.data.rotateMix+(f-c.data.rotateMix)*s,c.translateMix=c.data.translateMix+(d-c.data.translateMix)*s):(c.rotateMix+=(f-c.rotateMix)*s,c.translateMix+=(d-c.translateMix)*s)}},i.ENTRIES=3,i.PREV_TIME=-3,i.PREV_ROTATE=-2,i.PREV_TRANSLATE=-1,i.ROTATE=1,i.TRANSLATE=2,i}(i);t.PathConstraintMixTimeline=T}(a||(a={})),function(t){var e=function(){function e(e){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new a(this),this.propertyIDs=new t.IntSet,this.animationsChanged=!1,this.trackEntryPool=new t.Pool((function(){return new n})),this.data=e}return e.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,r=e.length;n0){if(a.delay-=i,a.delay>0)continue;i=-a.delay,a.delay=0}var o=a.next;if(null!=o){var s=a.trackLast-o.delay;if(s>=0){for(o.delay=0,o.trackTime+=0==a.timeScale?0:(s/a.timeScale+t)*o.timeScale,a.trackTime+=i,this.setCurrent(n,o,!0);null!=o.mixingFrom;)o.mixTime+=t,o=o.mixingFrom;continue}}else if(a.trackLast>=a.trackEnd&&null==a.mixingFrom){e[n]=null,this.queue.end(a),this.disposeNext(a);continue}if(null!=a.mixingFrom&&this.updateMixingFrom(a,t)){var h=a.mixingFrom;for(a.mixingFrom=null,null!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}a.trackTime+=i}}this.queue.drain()},e.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(null==n)return!0;var r=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,null!=n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),r):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)},e.prototype.apply=function(n){if(null==n)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var r=this.events,a=this.tracks,i=!1,o=0,s=a.length;o0)){i=!0;var l=0==o?t.MixBlend.first:h.mixBlend,u=h.alpha;null!=h.mixingFrom?u*=this.applyMixingFrom(h,n,l):h.trackTime>=h.trackEnd&&null==h.next&&(u=0);var c=h.animationLast,f=h.getAnimationTime(),d=h.animation.timelines.length,p=h.animation.timelines;if(0==o&&1==u||l==t.MixBlend.add)for(var m=0;m1&&(o=1),a!=t.MixBlend.first&&(a=i.mixBlend));var s=o0&&this.queueEvents(i,c),this.events.length=0,i.nextAnimationLast=c,i.nextTrackLast=i.trackTime,o},e.prototype.applyAttachmentTimeline=function(n,r,a,i,o){var s=r.slots[n.slotIndex];if(s.bone.active){var h,l=n.frames;if(a=l[l.length-1]?l.length-1:t.Animation.binarySearch(l,a)-1,this.setAttachment(r,s,n.attachmentNames[h],o);s.attachmentState<=this.unkeyedState&&(s.attachmentState=this.unkeyedState+e.SETUP)}},e.prototype.setAttachment=function(t,n,r,a){n.setAttachment(null==r?null:t.getAttachment(n.data.index,r)),a&&(n.attachmentState=this.unkeyedState+e.CURRENT)},e.prototype.applyRotateTimeline=function(e,n,r,a,i,o,s,h){if(h&&(o[s]=0),1!=a){var l=e,u=l.frames,c=n.bones[l.boneIndex];if(c.active){var f=0,d=0;if(r=u[u.length-t.RotateTimeline.ENTRIES])d=c.data.rotation+u[u.length+t.RotateTimeline.PREV_ROTATION];else{var p=t.Animation.binarySearch(u,r,t.RotateTimeline.ENTRIES),m=u[p+t.RotateTimeline.PREV_ROTATION],v=u[p],g=l.getCurvePercent((p>>1)-1,1-(r-v)/(u[p+t.RotateTimeline.PREV_TIME]-v));d=u[p+t.RotateTimeline.ROTATION]-m,d=m+(d-=360*(16384-(16384.499999999996-d/360|0)))*g+c.data.rotation,d-=360*(16384-(16384.499999999996-d/360|0))}var y=0,E=d-f;if(0==(E-=360*(16384-(16384.499999999996-E/360|0))))y=o[s];else{var w=0,x=0;h?(w=0,x=E):(w=o[s],x=o[s+1]);var T=E>0,A=w>=0;t.MathUtils.signum(x)!=t.MathUtils.signum(E)&&Math.abs(x)<=90&&(Math.abs(w)>180&&(w+=360*t.MathUtils.signum(w)),A=T),y=E+w-w%360,A!=T&&(y+=360*t.MathUtils.signum(w)),o[s]=y}o[s+1]=E,f+=y*a,c.rotation=f-360*(16384-(16384.499999999996-f/360|0))}}else e.apply(n,0,r,null,1,i,t.MixDirection.mixIn)},e.prototype.queueEvents=function(t,e){for(var n=t.animationStart,r=t.animationEnd,a=r-n,i=t.trackLast%a,o=this.events,s=0,h=o.length;sr||this.queue.event(t,l)}for((t.loop?0==a||i>t.trackTime%a:e>=r&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var n=e;;){var r=n.mixingFrom;if(null==r)break;this.queue.end(r),n.mixingFrom=null,n.mixingTo=null,n=r}this.tracks[e.trackIndex]=null,this.queue.drain()}}},e.prototype.setCurrent=function(t,e,n){var r=this.expandToIndex(t);this.tracks[t]=e,null!=r&&(n&&this.queue.interrupt(r),e.mixingFrom=r,r.mixingTo=e,e.mixTime=0,null!=r.mixingFrom&&r.mixDuration>0&&(e.interruptAlpha*=Math.min(1,r.mixTime/r.mixDuration)),r.timelinesRotation.length=0),this.queue.start(e)},e.prototype.setAnimation=function(t,e,n){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,r,n)},e.prototype.setAnimationWith=function(t,e,n){if(null==e)throw new Error("animation cannot be null.");var r=!0,a=this.expandToIndex(t);null!=a&&(-1==a.nextTrackLast?(this.tracks[t]=a.mixingFrom,this.queue.interrupt(a),this.queue.end(a),this.disposeNext(a),a=a.mixingFrom,r=!1):this.disposeNext(a));var i=this.trackEntry(t,e,n,a);return this.setCurrent(t,i,r),this.queue.drain(),i},e.prototype.addAnimation=function(t,e,n,r){var a=this.data.skeletonData.findAnimation(e);if(null==a)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,a,n,r)},e.prototype.addAnimationWith=function(t,e,n,r){if(null==e)throw new Error("animation cannot be null.");var a=this.expandToIndex(t);if(null!=a)for(;null!=a.next;)a=a.next;var i=this.trackEntry(t,e,n,a);if(null==a)this.setCurrent(t,i,!0),this.queue.drain();else if(a.next=i,r<=0){var o=a.animationEnd-a.animationStart;0!=o?(a.loop?r+=o*(1+(a.trackTime/o|0)):r+=Math.max(o,a.trackTime),r-=this.data.getMix(a.animation,e)):r=a.trackTime}return i.delay=r,i},e.prototype.setEmptyAnimation=function(t,n){var r=this.setAnimationWith(t,e.emptyAnimation,!1);return r.mixDuration=n,r.trackEnd=n,r},e.prototype.addEmptyAnimation=function(t,n,r){r<=0&&(r-=n);var a=this.addAnimationWith(t,e.emptyAnimation,!1,r);return a.mixDuration=n,a.trackEnd=n,a},e.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,r=this.tracks.length;n0){o[l]=e.HOLD_MIX,s[l]=f;continue t}break}o[l]=e.HOLD_FIRST}else o[l]=e.SUBSEQUENT}},e.prototype.getCurrent=function(t){return t>=this.tracks.length?null:this.tracks[t]},e.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},e.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)},e.prototype.clearListeners=function(){this.listeners.length=0},e.prototype.clearListenerNotifications=function(){this.queue.clear()},e.emptyAnimation=new t.Animation("",[],0),e.SUBSEQUENT=0,e.FIRST=1,e.HOLD_SUBSEQUENT=2,e.HOLD_FIRST=3,e.HOLD_MIX=4,e.SETUP=1,e.CURRENT=2,e}();t.AnimationState=e;var n=function(){function e(){this.mixBlend=t.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return e.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},e.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},e.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},e.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},e.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},e}();t.TrackEntry=n;var r,a=function(){function t(t){this.objects=[],this.drainDisabled=!1,this.animState=t}return t.prototype.start=function(t){this.objects.push(r.start),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.interrupt=function(t){this.objects.push(r.interrupt),this.objects.push(t)},t.prototype.end=function(t){this.objects.push(r.end),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.dispose=function(t){this.objects.push(r.dispose),this.objects.push(t)},t.prototype.complete=function(t){this.objects.push(r.complete),this.objects.push(t)},t.prototype.event=function(t,e){this.objects.push(r.event),this.objects.push(t),this.objects.push(e)},t.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,n=0;n=0?e.substring(0,e.lastIndexOf("/")):"";e=this.pathPrefix+e,this.toLoad++,this.downloadText(e,(function(o){var s={count:0},h=new Array;try{new t.TextureAtlas(o,(function(e){h.push(""==i?e:i+"/"+e);var n=document.createElement("img");return n.width=16,n.height=16,new t.FakeTexture(n)}))}catch(t){var l=t;return a.errors[e]="Couldn't load texture atlas "+e+": "+l.message,r&&r(e,"Couldn't load texture atlas "+e+": "+l.message),a.toLoad--,void a.loaded++}for(var u=function(l){var u=!1;a.loadTexture(l,(function(l,c){if(s.count++,s.count==h.length)if(u)a.errors[e]="Couldn't load texture atlas page "+l+"} of atlas "+e,r&&r(e,"Couldn't load texture atlas page "+l+" of atlas "+e),a.toLoad--,a.loaded++;else try{var f=new t.TextureAtlas(o,(function(t){return a.get(""==i?t:i+"/"+t)}));a.assets[e]=f,n&&n(e,f),a.toLoad--,a.loaded++}catch(t){var d=t;a.errors[e]="Couldn't load texture atlas "+e+": "+d.message,r&&r(e,"Couldn't load texture atlas "+e+": "+d.message),a.toLoad--,a.loaded++}}),(function(t,n){u=!0,s.count++,s.count==h.length&&(a.errors[e]="Couldn't load texture atlas page "+t+"} of atlas "+e,r&&r(e,"Couldn't load texture atlas page "+t+" of atlas "+e),a.toLoad--,a.loaded++)}))},c=0,f=h;c0},e.prototype.getErrors=function(){return this.errors},e}();t.AssetManager=e}(a||(a={})),function(t){var e=function(){function e(t){this.atlas=t}return e.prototype.newRegionAttachment=function(e,n,r){var a=this.atlas.findRegion(r);if(null==a)throw new Error("Region not found in atlas: "+r+" (region attachment: "+n+")");a.renderObject=a;var i=new t.RegionAttachment(n);return i.setRegion(a),i},e.prototype.newMeshAttachment=function(e,n,r){var a=this.atlas.findRegion(r);if(null==a)throw new Error("Region not found in atlas: "+r+" (mesh attachment: "+n+")");a.renderObject=a;var i=new t.MeshAttachment(n);return i.region=a,i},e.prototype.newBoundingBoxAttachment=function(e,n){return new t.BoundingBoxAttachment(n)},e.prototype.newPathAttachment=function(e,n){return new t.PathAttachment(n)},e.prototype.newPointAttachment=function(e,n){return new t.PointAttachment(n)},e.prototype.newClippingAttachment=function(e,n){return new t.ClippingAttachment(n)},e}();t.AtlasAttachmentLoader=e}(a||(a={})),function(t){var e;(e=t.BlendMode||(t.BlendMode={}))[e.Normal=0]="Normal",e[e.Additive=1]="Additive",e[e.Multiply=2]="Multiply",e[e.Screen=3]="Screen"}(a||(a={})),function(t){var e=function(){function e(t,e,n){if(this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.appliedValid=!1,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=n,this.setToSetupPose()}return e.prototype.isActive=function(){return this.active},e.prototype.update=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransformWith=function(e,n,r,a,i,o,s){this.ax=e,this.ay=n,this.arotation=r,this.ascaleX=a,this.ascaleY=i,this.ashearX=o,this.ashearY=s,this.appliedValid=!0;var h=this.parent;if(null==h){var l=this.skeleton,u=r+90+s,c=l.scaleX,f=l.scaleY;return this.a=t.MathUtils.cosDeg(r+o)*a*c,this.b=t.MathUtils.cosDeg(u)*i*c,this.c=t.MathUtils.sinDeg(r+o)*a*f,this.d=t.MathUtils.sinDeg(u)*i*f,this.worldX=e*c+l.x,void(this.worldY=n*f+l.y)}var d=h.a,p=h.b,m=h.c,v=h.d;switch(this.worldX=d*e+p*n+h.worldX,this.worldY=m*e+v*n+h.worldY,this.data.transformMode){case t.TransformMode.Normal:u=r+90+s;var g=t.MathUtils.cosDeg(r+o)*a,y=t.MathUtils.cosDeg(u)*i,E=t.MathUtils.sinDeg(r+o)*a,w=t.MathUtils.sinDeg(u)*i;return this.a=d*g+p*E,this.b=d*y+p*w,this.c=m*g+v*E,void(this.d=m*y+v*w);case t.TransformMode.OnlyTranslation:u=r+90+s;this.a=t.MathUtils.cosDeg(r+o)*a,this.b=t.MathUtils.cosDeg(u)*i,this.c=t.MathUtils.sinDeg(r+o)*a,this.d=t.MathUtils.sinDeg(u)*i;break;case t.TransformMode.NoRotationOrReflection:var x=0;(M=d*d+m*m)>1e-4?(M=Math.abs(d*v-p*m)/M,d/=this.skeleton.scaleX,p=(m/=this.skeleton.scaleY)*M,v=d*M,x=Math.atan2(m,d)*t.MathUtils.radDeg):(d=0,m=0,x=90-Math.atan2(v,p)*t.MathUtils.radDeg);var T=r+o-x,A=r+s-x+90;g=t.MathUtils.cosDeg(T)*a,y=t.MathUtils.cosDeg(A)*i,E=t.MathUtils.sinDeg(T)*a,w=t.MathUtils.sinDeg(A)*i;this.a=d*g-p*E,this.b=d*y-p*w,this.c=m*g+v*E,this.d=m*y+v*w;break;case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:var M,I=t.MathUtils.cosDeg(r),b=t.MathUtils.sinDeg(r),R=(d*I+p*b)/this.skeleton.scaleX,S=(m*I+v*b)/this.skeleton.scaleY;(M=Math.sqrt(R*R+S*S))>1e-5&&(M=1/M),R*=M,S*=M,M=Math.sqrt(R*R+S*S),this.data.transformMode==t.TransformMode.NoScale&&d*v-p*m<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(M=-M);var C=Math.PI/2+Math.atan2(S,R),P=Math.cos(C)*M,k=Math.sin(C)*M;g=t.MathUtils.cosDeg(o)*a,y=t.MathUtils.cosDeg(90+s)*i,E=t.MathUtils.sinDeg(o)*a,w=t.MathUtils.sinDeg(90+s)*i;this.a=R*g+P*E,this.b=R*y+P*w,this.c=S*g+k*E,this.d=S*y+k*w}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY},e.prototype.setToSetupPose=function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY},e.prototype.getWorldRotationX=function(){return Math.atan2(this.c,this.a)*t.MathUtils.radDeg},e.prototype.getWorldRotationY=function(){return Math.atan2(this.d,this.b)*t.MathUtils.radDeg},e.prototype.getWorldScaleX=function(){return Math.sqrt(this.a*this.a+this.c*this.c)},e.prototype.getWorldScaleY=function(){return Math.sqrt(this.b*this.b+this.d*this.d)},e.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var e=this.parent;if(null==e)return this.ax=this.worldX,this.ay=this.worldY,this.arotation=Math.atan2(this.c,this.a)*t.MathUtils.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*t.MathUtils.radDeg);var n=e.a,r=e.b,a=e.c,i=e.d,o=1/(n*i-r*a),s=this.worldX-e.worldX,h=this.worldY-e.worldY;this.ax=s*i*o-h*r*o,this.ay=h*n*o-s*a*o;var l=o*i,u=o*n,c=o*r,f=o*a,d=l*this.a-c*this.c,p=l*this.b-c*this.d,m=u*this.c-f*this.a,v=u*this.d-f*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(d*d+m*m),this.ascaleX>1e-4){var g=d*v-p*m;this.ascaleY=g/this.ascaleX,this.ashearY=Math.atan2(d*p+m*v,g)*t.MathUtils.radDeg,this.arotation=Math.atan2(m,d)*t.MathUtils.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+v*v),this.ashearY=0,this.arotation=90-Math.atan2(v,p)*t.MathUtils.radDeg},e.prototype.worldToLocal=function(t){var e=this.a,n=this.b,r=this.c,a=this.d,i=1/(e*a-n*r),o=t.x-this.worldX,s=t.y-this.worldY;return t.x=o*a*i-s*n*i,t.y=s*e*i-o*r*i,t},e.prototype.localToWorld=function(t){var e=t.x,n=t.y;return t.x=e*this.a+n*this.b+this.worldX,t.y=e*this.c+n*this.d+this.worldY,t},e.prototype.worldToLocalRotation=function(e){var n=t.MathUtils.sinDeg(e),r=t.MathUtils.cosDeg(e);return Math.atan2(this.a*n-this.c*r,this.d*r-this.b*n)*t.MathUtils.radDeg+this.rotation-this.shearX},e.prototype.localToWorldRotation=function(e){e-=this.rotation-this.shearX;var n=t.MathUtils.sinDeg(e),r=t.MathUtils.cosDeg(e);return Math.atan2(r*this.c+n*this.d,r*this.a+n*this.b)*t.MathUtils.radDeg},e.prototype.rotateWorld=function(e){var n=this.a,r=this.b,a=this.c,i=this.d,o=t.MathUtils.cosDeg(e),s=t.MathUtils.sinDeg(e);this.a=o*n-s*a,this.b=o*r-s*i,this.c=s*n+o*a,this.d=s*r+o*i,this.appliedValid=!1},e}();t.Bone=e}(a||(a={})),function(t){var e,n=function(n,r,a){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=e.Normal,this.skinRequired=!1,this.color=new t.Color,n<0)throw new Error("index must be >= 0.");if(null==r)throw new Error("name cannot be null.");this.index=n,this.name=r,this.parent=a};t.BoneData=n,function(t){t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection"}(e=t.TransformMode||(t.TransformMode={}))}(a||(a={})),function(t){var e=function(t,e,n){this.name=t,this.order=e,this.skinRequired=n};t.ConstraintData=e}(a||(a={})),function(t){var e=function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e};t.Event=e}(a||(a={})),function(t){var e=function(t){this.name=t};t.EventData=e}(a||(a={})),function(t){var e=function(){function e(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var n=0;n180?d-=360:d<-180&&(d+=360);var T=e.ascaleX,A=e.ascaleY;if(a||i){switch(e.data.transformMode){case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:p=n-e.worldX,m=r-e.worldY}var M=e.data.length*T,I=Math.sqrt(p*p+m*m);if(a&&IM&&M>1e-4)T*=v=(I/M-1)*s+1,o&&(A*=v)}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+d*s,T,A,e.ashearX,e.ashearY)},e.prototype.apply2=function(e,n,r,a,i,o,s,h){if(0!=h){e.appliedValid||e.updateAppliedTransform(),n.appliedValid||n.updateAppliedTransform();var l=e.ax,u=e.ay,c=e.ascaleX,f=c,d=e.ascaleY,p=n.ascaleX,m=0,v=0,g=0;c<0?(c=-c,m=180,g=-1):(m=0,g=1),d<0&&(d=-d,g=-g),p<0?(p=-p,v=180):v=0;var y=n.ax,E=0,w=0,x=0,T=e.a,A=e.b,M=e.c,I=e.d,b=Math.abs(c-d)<=1e-4;b?(w=T*y+A*(E=n.ay)+e.worldX,x=M*y+I*E+e.worldY):(E=0,w=T*y+e.worldX,x=M*y+e.worldY);var R=e.parent;T=R.a,A=R.b,M=R.c;var S,C,P=1/(T*(I=R.d)-A*M),k=w-R.worldX,N=x-R.worldY,_=(k*I-N*A)*P-l,V=(N*T-k*M)*P-u,L=Math.sqrt(_*_+V*V),O=n.data.length*p;if(L<1e-4)return this.apply1(e,r,a,!1,o,!1,h),void n.updateWorldTransformWith(y,E,0,n.ascaleX,n.ascaleY,n.ashearX,n.ashearY);var F=((k=r-R.worldX)*I-(N=a-R.worldY)*A)*P-l,D=(N*T-k*M)*P-u,U=F*F+D*D;if(0!=s){s*=c*(p+1)/2;var B=Math.sqrt(U),X=B-L-O*c+s;if(X>0){var Y=Math.min(1,X/(2*s))-1;U=(F-=(Y=(X-s*(1-Y*Y))/B)*F)*F+(D-=Y*D)*D}}t:if(b){var W=(U-L*L-(O*=c)*O)/(2*L*O);W<-1?W=-1:W>1&&(W=1,o&&(f*=(Math.sqrt(U)/(L+O)-1)*h+1)),C=Math.acos(W)*i,T=L+O*W,A=O*Math.sin(C),S=Math.atan2(D*T-F*A,F*T+D*A)}else{var j=(T=c*O)*T,G=(A=d*O)*A,q=Math.atan2(D,F),H=-2*G*L,z=G-j;if((I=H*H-4*z*(M=G*L*L+j*U-j*G))>=0){var Z=Math.sqrt(I);H<0&&(Z=-Z);var $=(Z=-(H+Z)/2)/z,Q=M/Z,J=Math.abs($)=-1&&M<=1&&(M=Math.acos(M),(I=(k=T*Math.cos(M)+L)*k+(N=A*Math.sin(M))*N)it&&(rt=M,it=I,at=k,ot=N)),U<=(et+it)/2?(S=q-Math.atan2(nt*i,tt),C=K*i):(S=q-Math.atan2(ot*i,at),C=rt*i)}var st=Math.atan2(E,y)*g,ht=e.arotation;(S=(S-st)*t.MathUtils.radDeg+m-ht)>180?S-=360:S<-180&&(S+=360),e.updateWorldTransformWith(l,u,ht+S*h,f,e.ascaleY,0,0),ht=n.arotation,(C=((C+st)*t.MathUtils.radDeg-n.ashearX)*g+v-ht)>180?C-=360:C<-180&&(C+=360),n.updateWorldTransformWith(y,E,ht+C*h,n.ascaleX,n.ascaleY,n.ashearX,n.ashearY)}else n.updateWorldTransform()},e}();t.IkConstraint=e}(a||(a={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,0,!1)||this;return n.bones=new Array,n.bendDirection=1,n.compress=!1,n.stretch=!1,n.uniform=!1,n.mix=1,n.softness=0,n}return o(e,t),e}(t.ConstraintData);t.IkConstraintData=e}(a||(a={})),function(t){var e=function(){function e(t,e){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(var n=0,r=t.bones.length;n0;if(a>0||i){var o=this.data,s=o.spacingMode==t.SpacingMode.Percent,h=o.rotateMode,l=h==t.RotateMode.Tangent,u=h==t.RotateMode.ChainScale,c=this.bones.length,f=l?c:c+1,d=this.bones,p=t.Utils.setArraySize(this.spaces,f),m=null,v=this.spacing;if(u||!s){u&&(m=t.Utils.setArraySize(this.lengths,c));for(var g=o.spacingMode==t.SpacingMode.Length,y=0,E=f-1;y0?t.MathUtils.degRad:-t.MathUtils.degRad;y=0;for(var P=3;yt.MathUtils.PI?B-=t.MathUtils.PI2:B<-t.MathUtils.PI&&(B+=t.MathUtils.PI2),B*=r,X=Math.cos(B),Y=Math.sin(B),k.a=X*O-Y*D,k.b=X*F-Y*U,k.c=Y*O+X*D,k.d=Y*F+X*U}k.appliedValid=!1}}}},e.prototype.computeWorldPositions=function(n,r,a,i,o){var s=this.target,h=this.position,l=this.spaces,u=t.Utils.setArraySize(this.positions,3*r+2),c=null,f=n.closed,d=n.worldVerticesLength,p=d/6,m=e.NONE;if(!n.constantSpeed){var v=n.lengths,g=v[p-=f?1:2];if(i&&(h*=g),o)for(var y=1;yg){m!=e.AFTER&&(m=e.AFTER,n.computeWorldVertices(s,d-6,4,c,0,2)),this.addAfterPosition(x-g,c,0,u,E);continue}}for(;;w++){var T=v[w];if(!(x>T)){if(0==w)x/=T;else x=(x-(Z=v[w-1]))/(T-Z);break}}w!=m&&(m=w,f&&w==p?(n.computeWorldVertices(s,d-4,4,c,0,2),n.computeWorldVertices(s,0,4,c,4,2)):n.computeWorldVertices(s,6*w+2,8,c,0,2)),this.addCurvePosition(x,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],u,E,a||y>0&&0==G)}return u}f?(d+=2,c=t.Utils.setArraySize(this.world,d),n.computeWorldVertices(s,2,d-4,c,0,2),n.computeWorldVertices(s,0,2,c,d-4,2),c[d-2]=c[0],c[d-1]=c[1]):(p--,d-=4,c=t.Utils.setArraySize(this.world,d),n.computeWorldVertices(s,2,d,c,0,2));for(var A=t.Utils.setArraySize(this.curves,p),M=0,I=c[0],b=c[1],R=0,S=0,C=0,P=0,k=0,N=0,_=0,V=0,L=0,O=0,F=0,D=0,U=0,B=0,X=(y=0,2);yM){this.addAfterPosition(x-M,c,d-4,u,E);continue}}for(;;w++){var q=A[w];if(!(x>q)){if(0==w)x/=q;else x=(x-(Z=A[w-1]))/(q-Z);break}}if(w!=m){m=w;var H=6*w;for(I=c[H],b=c[H+1],R=c[H+2],S=c[H+3],C=c[H+4],P=c[H+5],F=2*(_=.03*(I-2*R+C))+(L=.006*(3*(R-C)-I+(k=c[H+6]))),D=2*(V=.03*(b-2*S+P))+(O=.006*(3*(S-P)-b+(N=c[H+7]))),U=.3*(R-I)+_+.16666667*L,B=.3*(S-b)+V+.16666667*O,W=Math.sqrt(U*U+B*B),Y[0]=W,H=1;H<8;H++)U+=F,B+=D,F+=L,D+=O,W+=Math.sqrt(U*U+B*B),Y[H]=W;U+=F,B+=D,W+=Math.sqrt(U*U+B*B),Y[8]=W,U+=F+L,B+=D+O,W+=Math.sqrt(U*U+B*B),Y[9]=W,j=0}for(x*=W;;j++){var z=Y[j];if(!(x>z)){var Z;if(0==j)x/=z;else x=j+(x-(Z=Y[j-1]))/(z-Z);break}}this.addCurvePosition(.1*x,I,b,R,S,C,P,k,N,u,E,a||y>0&&0==G)}return u},e.prototype.addBeforePosition=function(t,e,n,r,a){var i=e[n],o=e[n+1],s=e[n+2]-i,h=e[n+3]-o,l=Math.atan2(h,s);r[a]=i+t*Math.cos(l),r[a+1]=o+t*Math.sin(l),r[a+2]=l},e.prototype.addAfterPosition=function(t,e,n,r,a){var i=e[n+2],o=e[n+3],s=i-e[n],h=o-e[n+1],l=Math.atan2(h,s);r[a]=i+t*Math.cos(l),r[a+1]=o+t*Math.sin(l),r[a+2]=l},e.prototype.addCurvePosition=function(t,e,n,r,a,i,o,s,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=n,void(l[u+2]=Math.atan2(a-n,r-e));var f=t*t,d=f*t,p=1-t,m=p*p,v=m*p,g=p*t,y=3*g,E=p*y,w=y*t,x=e*v+r*E+i*w+s*d,T=n*v+a*E+o*w+h*d;l[u]=x,l[u+1]=T,c&&(l[u+2]=t<.001?Math.atan2(a-n,r-e):Math.atan2(T-(n*m+a*g*2+o*f),x-(e*m+r*g*2+i*f)))},e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e.epsilon=1e-5,e}();t.PathConstraint=e}(a||(a={})),function(t){var e,n,r,a=function(t){function e(e){var n=t.call(this,e,0,!1)||this;return n.bones=new Array,n}return o(e,t),e}(t.ConstraintData);t.PathConstraintData=a,(e=t.PositionMode||(t.PositionMode={}))[e.Fixed=0]="Fixed",e[e.Percent=1]="Percent",(n=t.SpacingMode||(t.SpacingMode={}))[n.Length=0]="Length",n[n.Fixed=1]="Fixed",n[n.Percent=2]="Percent",(r=t.RotateMode||(t.RotateMode={}))[r.Tangent=0]="Tangent",r[r.Chain=1]="Chain",r[r.ChainScale=2]="ChainScale"}(a||(a={})),function(t){var e=function(){function t(t){this.toLoad=new Array,this.assets={},this.clientId=t}return t.prototype.loaded=function(){var t=0;for(var e in this.assets)t++;return t},t}(),n=function(){function t(t){void 0===t&&(t=""),this.clientAssets={},this.queuedAssets={},this.rawAssets={},this.errors={},this.pathPrefix=t}return t.prototype.queueAsset=function(t,n,r){var a=this.clientAssets[t];return null==a&&(a=new e(t),this.clientAssets[t]=a),null!==n&&(a.textureLoader=n),a.toLoad.push(r),this.queuedAssets[r]!==r&&(this.queuedAssets[r]=r,!0)},t.prototype.loadText=function(t,e){var n=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var r=new XMLHttpRequest;r.overrideMimeType("text/html"),r.onreadystatechange=function(){r.readyState==XMLHttpRequest.DONE&&(r.status>=200&&r.status<300?n.rawAssets[e]=r.responseText:n.errors[e]="Couldn't load text "+e+": status "+r.status+", "+r.responseText)},r.open("GET",e,!0),r.send()}},t.prototype.loadJson=function(t,e){var n=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var r=new XMLHttpRequest;r.overrideMimeType("text/html"),r.onreadystatechange=function(){r.readyState==XMLHttpRequest.DONE&&(r.status>=200&&r.status<300?n.rawAssets[e]=JSON.parse(r.responseText):n.errors[e]="Couldn't load text "+e+": status "+r.status+", "+r.responseText)},r.open("GET",e,!0),r.send()}},t.prototype.loadTexture=function(t,e,n){var r=this;if(n=this.pathPrefix+n,this.queueAsset(t,e,n))if(!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document)&&"undefined"!=typeof importScripts){fetch(n,{mode:"cors"}).then((function(t){return t.ok||(r.errors[n]="Couldn't load image "+n),t.blob()})).then((function(t){return createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"})})).then((function(t){r.rawAssets[n]=t}))}else{var a=new Image;a.crossOrigin="anonymous",a.onload=function(t){r.rawAssets[n]=a},a.onerror=function(t){r.errors[n]="Couldn't load image "+n},a.src=n}},t.prototype.get=function(t,e){e=this.pathPrefix+e;var n=this.clientAssets[t];return null==n||n.assets[e]},t.prototype.updateClientAssets=function(t){for(var e=!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document)&&"undefined"!=typeof importScripts,n=0;n0},t.prototype.getErrors=function(){return this.errors},t}();t.SharedAssetManager=n}(a||(a={})),function(t){var e=function(){function e(e){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,null==e)throw new Error("data cannot be null.");this.data=e,this.bones=new Array;for(var n=0;n1){var i=r[r.length-1];this._updateCache.indexOf(i)>-1||this.updateCacheReset.push(i)}this._updateCache.push(e),this.sortReset(a.children),r[r.length-1].sorted=!0}},e.prototype.sortPathConstraint=function(e){if(e.active=e.target.bone.isActive()&&(!e.data.skinRequired||null!=this.skin&&t.Utils.contains(this.skin.constraints,e.data,!0)),e.active){var n=e.target,r=n.data.index,a=n.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,r,a),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,r,a);for(var i=0,o=this.data.skins.length;i-1||this.updateCacheReset.push(i)}else for(a=0;a0){w=new t.DrawOrderTimeline(O);var F=a.slots.length;for(u=0;u=0;d--)U[d]=-1;var B=t.Utils.newArray(F-D,0),X=0,Y=0;for(d=0;d=0;d--)-1==U[d]&&(U[d]=B[--Y]);w.setFrame(u,y,U)}i.push(w),s=Math.max(s,w.frames[O-1])}var W=n.readInt(!0);if(W>0){for(w=new t.EventTimeline(W),u=0;u>>1^-(1&n)},t.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},t.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n>4){case 12:case 13:e+=String.fromCharCode((31&r)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&r)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(r),n++}}return e},t.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},t.prototype.readBoolean=function(){return 0!=this.readByte()},t}(),r=function(t,e,n,r,a){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=r,this.inheritDeform=a},a=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(a||(a={})),function(t){var e=function(){function e(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new t.Pool((function(){return t.Utils.newFloatArray(16)}))}return e.prototype.update=function(e,n){if(null==e)throw new Error("skeleton cannot be null.");var r=this.boundingBoxes,a=this.polygons,i=this.polygonPool,o=e.slots,s=o.length;r.length=0,i.freeAll(a),a.length=0;for(var h=0;h=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},e.prototype.aabbIntersectsSegment=function(t,e,n,r){var a=this.minX,i=this.minY,o=this.maxX,s=this.maxY;if(t<=a&&n<=a||e<=i&&r<=i||t>=o&&n>=o||e>=s&&r>=s)return!1;var h=(r-e)/(n-t),l=h*(a-t)+e;if(l>i&&li&&la&&ua&&ut.minX&&this.minYt.minY},e.prototype.containsPoint=function(t,e){for(var n=this.polygons,r=0,a=n.length;r=n||l=n){var u=r[s];u+(n-h)/(l-h)*(r[i]-u)=u&&E<=d||E>=d&&E<=u)&&(E>=e&&E<=r||E>=r&&E<=e)){var w=(l*g-h*m)/y;if((w>=c&&w<=p||w>=p&&w<=c)&&(w>=n&&w<=a||w>=a&&w<=n))return!0}u=d,c=p}return!1},e.prototype.getPolygon=function(t){if(null==t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},e.prototype.getWidth=function(){return this.maxX-this.minX},e.prototype.getHeight=function(){return this.maxY-this.minY},e}();t.SkeletonBounds=e}(a||(a={})),function(t){var e=function(){function e(){this.triangulator=new t.Triangulator,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array}return e.prototype.clipStart=function(n,r){if(null!=this.clipAttachment)return 0;this.clipAttachment=r;var a=r.worldVerticesLength,i=t.Utils.setArraySize(this.clippingPolygon,a);r.computeWorldVertices(n,0,a,i,0,2);var o=this.clippingPolygon;e.makeClockwise(o);for(var s=this.clippingPolygons=this.triangulator.decompose(o,this.triangulator.triangulate(o)),h=0,l=s.length;h>1,U=this.clipOutput,B=t.Utils.setArraySize(u,k+D*p),X=0;X=2?(u=s,s=this.scratch):u=this.scratch,u.length=0,u.push(t),u.push(e),u.push(n),u.push(r),u.push(a),u.push(i),u.push(t),u.push(e),s.length=0;for(var c=o,f=o.length-4,d=0;;d+=2){for(var p=c[d],m=c[d+1],v=c[d+2],g=c[d+3],y=p-v,E=m-g,w=u,x=u.length-2,T=s.length,A=0;A0;if(y*(I-g)-E*(M-v)>0){if(S){s.push(b),s.push(R);continue}var C=(k=R-I)*(v-p)-(N=b-M)*(g-m);if(Math.abs(C)>1e-6){var P=(N*(m-I)-k*(p-M))/C;s.push(p+(v-p)*P),s.push(m+(g-m)*P)}else s.push(p),s.push(m)}else if(S){var k,N;C=(k=R-I)*(v-p)-(N=b-M)*(g-m);if(Math.abs(C)>1e-6){P=(N*(m-I)-k*(p-M))/C;s.push(p+(v-p)*P),s.push(m+(g-m)*P)}else s.push(p),s.push(m);s.push(b),s.push(R)}l=!0}if(T==s.length)return h.length=0,!0;if(s.push(s[0]),s.push(s[1]),d==f)break;var _=s;(s=u).length=0,u=_}if(h!=s){h.length=0;d=0;for(var V=s.length-2;d>1;s=0;f--)-1==G[f]&&(G[f]=H[--Z])}w.setFrame(c++,this.getValue(j,"time",0),G)}i.push(w),o=Math.max(o,w.frames[w.getFrameCount()-1])}if(e.events){for(w=new t.EventTimeline(e.events.length),c=0,f=0;f=r.length&&(r.length=t+1),r[t]||(r[t]={}),r[t][e]=n},n.prototype.addSkin=function(t){for(var e=0;e= 0.");if(null==n)throw new Error("name cannot be null.");if(null==r)throw new Error("boneData cannot be null.");this.index=e,this.name=n,this.boneData=r};t.SlotData=e}(a||(a={})),function(t){var e,n,r=function(){function t(t){this._image=t}return t.prototype.getImage=function(){return this._image},t.filterFromString=function(t){switch(t.toLowerCase()){case"nearest":return e.Nearest;case"linear":return e.Linear;case"mipmap":return e.MipMap;case"mipmapnearestnearest":return e.MipMapNearestNearest;case"mipmaplinearnearest":return e.MipMapLinearNearest;case"mipmapnearestlinear":return e.MipMapNearestLinear;case"mipmaplinearlinear":return e.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}},t.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return n.MirroredRepeat;case"clamptoedge":return n.ClampToEdge;case"repeat":return n.Repeat;default:throw new Error("Unknown texture wrap "+t)}},t}();t.Texture=r,function(t){t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear"}(e=t.TextureFilter||(t.TextureFilter={})),function(t){t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat"}(n=t.TextureWrap||(t.TextureWrap={}));var a=function(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.rotate=!1,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0};t.TextureRegion=a;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.setFilters=function(t,e){},e.prototype.setWraps=function(t,e){},e.prototype.dispose=function(){},e}(r);t.FakeTexture=i}(a||(a={})),function(t){var e=function(){function e(t,e){this.pages=new Array,this.regions=new Array,this.load(t,e)}return e.prototype.load=function(e,i){if(null==i)throw new Error("textureLoader cannot be null.");for(var o=new n(e),s=new Array(4),h=null;;){var l=o.readLine();if(null==l)break;if(0==(l=l.trim()).length)h=null;else if(h){var u=new a;u.name=l,u.page=h;var c=o.readValue();"true"==c.toLocaleLowerCase()?u.degrees=90:"false"==c.toLocaleLowerCase()?u.degrees=0:u.degrees=parseFloat(c),u.rotate=90==u.degrees,o.readTuple(s);var f=parseInt(s[0]),d=parseInt(s[1]);o.readTuple(s);var p=parseInt(s[0]),m=parseInt(s[1]);u.u=f/h.width,u.v=d/h.height,u.rotate?(u.u2=(f+m)/h.width,u.v2=(d+p)/h.height):(u.u2=(f+p)/h.width,u.v2=(d+m)/h.height),u.x=f,u.y=d,u.width=Math.abs(p),u.height=Math.abs(m),4==o.readTuple(s)&&4==o.readTuple(s)&&o.readTuple(s),u.originalWidth=parseInt(s[0]),u.originalHeight=parseInt(s[1]),o.readTuple(s),u.offsetX=parseInt(s[0]),u.offsetY=parseInt(s[1]),u.index=parseInt(o.readValue()),u.texture=h.texture,this.regions.push(u)}else{(h=new r).name=l,2==o.readTuple(s)&&(h.width=parseInt(s[0]),h.height=parseInt(s[1]),o.readTuple(s)),o.readTuple(s),h.minFilter=t.Texture.filterFromString(s[0]),h.magFilter=t.Texture.filterFromString(s[1]);var v=o.readValue();h.uWrap=t.TextureWrap.ClampToEdge,h.vWrap=t.TextureWrap.ClampToEdge,"x"==v?h.uWrap=t.TextureWrap.Repeat:"y"==v?h.vWrap=t.TextureWrap.Repeat:"xy"==v&&(h.uWrap=h.vWrap=t.TextureWrap.Repeat),h.texture=i(l),h.texture.setFilters(h.minFilter,h.magFilter),h.texture.setWraps(h.uWrap,h.vWrap),h.width=h.texture.getImage().width,h.height=h.texture.getImage().height,this.pages.push(h)}}},e.prototype.findRegion=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},t.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},t.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw new Error("Invalid line: "+e);for(var r=0,a=n+1;r<3;r++){var i=e.indexOf(",",a);if(-1==i)break;t[r]=e.substr(a,i-a).trim(),a=i+1}return t[r]=e.substring(a).trim(),r+1},t}(),r=function(){};t.TextureAtlasPage=r;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(t.TextureRegion);t.TextureAtlasRegion=a}(a||(a={})),function(t){var e=function(){function e(e,n){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new t.Vector2,this.active=!1,null==e)throw new Error("data cannot be null.");if(null==n)throw new Error("skeleton cannot be null.");this.data=e,this.rotateMix=e.rotateMix,this.translateMix=e.translateMix,this.scaleMix=e.scaleMix,this.shearMix=e.shearMix,this.bones=new Array;for(var r=0;r0?t.MathUtils.degRad:-t.MathUtils.degRad,c=this.data.offsetRotation*u,f=this.data.offsetShearY*u,d=this.bones,p=0,m=d.length;pt.MathUtils.PI?R-=t.MathUtils.PI2:R<-t.MathUtils.PI&&(R+=t.MathUtils.PI2),R*=e;var T=Math.cos(R),A=Math.sin(R);v.a=T*y-A*w,v.b=T*E-A*x,v.c=A*y+T*w,v.d=A*E+T*x,g=!0}if(0!=n){var M=this.temp;i.localToWorld(M.set(this.data.offsetX,this.data.offsetY)),v.worldX+=(M.x-v.worldX)*n,v.worldY+=(M.y-v.worldY)*n,g=!0}if(r>0){var I=Math.sqrt(v.a*v.a+v.c*v.c),b=Math.sqrt(o*o+h*h);I>1e-5&&(I=(I+(b-I+this.data.offsetScaleX)*r)/I),v.a*=I,v.c*=I,I=Math.sqrt(v.b*v.b+v.d*v.d),b=Math.sqrt(s*s+l*l),I>1e-5&&(I=(I+(b-I+this.data.offsetScaleY)*r)/I),v.b*=I,v.d*=I,g=!0}if(a>0){E=v.b,x=v.d;var R,S=Math.atan2(x,E);(R=Math.atan2(l,s)-Math.atan2(h,o)-(S-Math.atan2(v.c,v.a)))>t.MathUtils.PI?R-=t.MathUtils.PI2:R<-t.MathUtils.PI&&(R+=t.MathUtils.PI2),R=S+(R+f)*a;I=Math.sqrt(E*E+x*x);v.b=Math.cos(R)*I,v.d=Math.sin(R)*I,g=!0}g&&(v.appliedValid=!1)}},e.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,n=this.translateMix,r=this.scaleMix,a=this.shearMix,i=this.target,o=i.a,s=i.b,h=i.c,l=i.d,u=o*l-s*h>0?t.MathUtils.degRad:-t.MathUtils.degRad,c=this.data.offsetRotation*u,f=this.data.offsetShearY*u,d=this.bones,p=0,m=d.length;pt.MathUtils.PI?b-=t.MathUtils.PI2:b<-t.MathUtils.PI&&(b+=t.MathUtils.PI2),b*=e;var T=Math.cos(b),A=Math.sin(b);v.a=T*y-A*w,v.b=T*E-A*x,v.c=A*y+T*w,v.d=A*E+T*x,g=!0}if(0!=n){var M=this.temp;i.localToWorld(M.set(this.data.offsetX,this.data.offsetY)),v.worldX+=M.x*n,v.worldY+=M.y*n,g=!0}if(r>0){var I=(Math.sqrt(o*o+h*h)-1+this.data.offsetScaleX)*r+1;v.a*=I,v.c*=I,I=(Math.sqrt(s*s+l*l)-1+this.data.offsetScaleY)*r+1,v.b*=I,v.d*=I,g=!0}if(a>0){var b;(b=Math.atan2(l,s)-Math.atan2(h,o))>t.MathUtils.PI?b-=t.MathUtils.PI2:b<-t.MathUtils.PI&&(b+=t.MathUtils.PI2);E=v.b,x=v.d;b=Math.atan2(x,E)+(b-t.MathUtils.PI/2+f)*a;I=Math.sqrt(E*E+x*x);v.b=Math.cos(b)*I,v.d=Math.sin(b)*I,g=!0}g&&(v.appliedValid=!1)}},e.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,r=this.shearMix,a=this.target;a.appliedValid||a.updateAppliedTransform();for(var i=this.bones,o=0,s=i.length;o1e-5&&(d=(d+(a.ascaleX-d+this.data.offsetScaleX)*n)/d),p>1e-5&&(p=(p+(a.ascaleY-p+this.data.offsetScaleY)*n)/p));var m=h.ashearY;if(0!=r){u=a.ashearY-m+this.data.offsetShearY;u-=360*(16384-(16384.499999999996-u/360|0)),h.shearY+=u*r}h.updateWorldTransformWith(c,f,l,d,p,h.ashearX,m)}},e.prototype.applyRelativeLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,r=this.shearMix,a=this.target;a.appliedValid||a.updateAppliedTransform();for(var i=this.bones,o=0,s=i.length;o1e-5&&(f*=(a.ascaleX-1+this.data.offsetScaleX)*n+1),d>1e-5&&(d*=(a.ascaleY-1+this.data.offsetScaleY)*n+1));var p=h.ashearY;0!=r&&(p+=(a.ashearY+this.data.offsetShearY)*r),h.updateWorldTransformWith(u,c,l,f,d,h.ashearX,p)}},e}();t.TransformConstraint=e}(a||(a={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,0,!1)||this;return n.bones=new Array,n.rotateMix=0,n.translateMix=0,n.scaleMix=0,n.shearMix=0,n.offsetRotation=0,n.offsetX=0,n.offsetY=0,n.offsetScaleX=0,n.offsetScaleY=0,n.offsetShearY=0,n.relative=!1,n.local=!1,n}return o(e,t),e}(t.ConstraintData);t.TransformConstraintData=e}(a||(a={})),function(t){var e=function(){function e(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new t.Pool((function(){return new Array})),this.polygonIndicesPool=new t.Pool((function(){return new Array}))}return e.prototype.triangulate=function(t){var n=t,r=t.length>>1,a=this.indicesArray;a.length=0;for(var i=0;i3;){for(var l=r-1,u=(i=0,1);;){t:if(!o[i]){for(var c=a[l]<<1,f=a[i]<<1,d=a[u]<<1,p=n[c],m=n[c+1],v=n[f],g=n[f+1],y=n[d],E=n[d+1],w=(u+1)%r;w!=l;w=(w+1)%r)if(o[w]){var x=a[w]<<1,T=n[x],A=n[x+1];if(e.positiveArea(y,E,p,m,T,A)&&e.positiveArea(p,m,v,g,T,A)&&e.positiveArea(v,g,y,E,T,A))break t}break}if(0==u){do{if(!o[i])break;i--}while(i>0);break}l=i,i=u,u=(u+1)%r}h.push(a[(r+i-1)%r]),h.push(a[i]),h.push(a[(i+1)%r]),a.splice(i,1),o.splice(i,1);var M=(--r+i-1)%r,I=i==r?0:i;o[M]=e.isConcave(M,r,n,a),o[I]=e.isConcave(I,r,n,a)}return 3==r&&(h.push(a[2]),h.push(a[0]),h.push(a[1])),h},e.prototype.decompose=function(t,n){var r=t,a=this.convexPolygons;this.polygonPool.freeAll(a),a.length=0;var i=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(i),i.length=0;var o=this.polygonIndicesPool.obtain();o.length=0;var s=this.polygonPool.obtain();s.length=0;for(var h=-1,l=0,u=0,c=n.length;u0?(a.push(s),i.push(o)):(this.polygonPool.free(s),this.polygonIndicesPool.free(o)),(s=this.polygonPool.obtain()).length=0,s.push(m),s.push(v),s.push(g),s.push(y),s.push(E),s.push(w),(o=this.polygonIndicesPool.obtain()).length=0,o.push(f),o.push(d),o.push(p),l=e.winding(m,v,g,y,E,w),h=f)}s.length>0&&(a.push(s),i.push(o));for(u=0,c=a.length;u=0;u--)0==(s=a[u]).length&&(a.splice(u,1),this.polygonPool.free(s),o=i[u],i.splice(u,1),this.polygonIndicesPool.free(o));return a},e.isConcave=function(t,e,n,r){var a=r[(e+t-1)%e]<<1,i=r[t]<<1,o=r[(t+1)%e]<<1;return!this.positiveArea(n[a],n[a+1],n[i],n[i+1],n[o],n[o+1])},e.positiveArea=function(t,e,n,r,a,i){return t*(i-r)+n*(e-i)+a*(r-e)>=0},e.winding=function(t,e,n,r,a,i){var o=n-t,s=r-e;return a*s-i*o+o*e-t*s>=0?1:-1},e}();t.Triangulator=e}(a||(a={})),function(t){var e=function(){function t(){this.array=new Array}return t.prototype.add=function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e},t.prototype.contains=function(t){return null!=this.array[0|t]},t.prototype.remove=function(t){this.array[0|t]=void 0},t.prototype.clear=function(){this.array.length=0},t}();t.IntSet=e;var n=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.r=t,this.g=e,this.b=n,this.a=r}return t.prototype.set=function(t,e,n,r){return this.r=t,this.g=e,this.b=n,this.a=r,this.clamp(),this},t.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},t.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=(8!=t.length?255:parseInt(t.substr(6,2),16))/255,this},t.prototype.add=function(t,e,n,r){return this.r+=t,this.g+=e,this.b+=n,this.a+=r,this.clamp(),this},t.prototype.clamp=function(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this},t.rgba8888ToColor=function(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},t.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},t.WHITE=new t(1,1,1,1),t.RED=new t(1,0,0,1),t.GREEN=new t(0,1,0,1),t.BLUE=new t(0,0,1,1),t.MAGENTA=new t(1,0,1,1),t}();t.Color=n;var r=function(){function t(){}return t.clamp=function(t,e,n){return tn?n:t},t.cosDeg=function(e){return Math.cos(e*t.degRad)},t.sinDeg=function(e){return Math.sin(e*t.degRad)},t.signum=function(t){return t>0?1:t<0?-1:0},t.toInt=function(t){return t>0?Math.floor(t):Math.ceil(t)},t.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},t.randomTriangular=function(e,n){return t.randomTriangularWith(e,n,.5*(e+n))},t.randomTriangularWith=function(t,e,n){var r=Math.random(),a=e-t;return r<=(n-t)/a?t+Math.sqrt(r*a*(n-t)):e-Math.sqrt((1-r)*a*(e-n))},t.PI=3.1415927,t.PI2=2*t.PI,t.radiansToDegrees=180/t.PI,t.radDeg=t.radiansToDegrees,t.degreesToRadians=t.PI/180,t.degRad=t.degreesToRadians,t}();t.MathUtils=r;var a=function(){function t(){}return t.prototype.apply=function(t,e,n){return t+(e-t)*this.applyInternal(n)},t}();t.Interpolation=a;var i=function(t){function e(e){var n=t.call(this)||this;return n.power=2,n.power=e,n}return o(e,t),e.prototype.applyInternal=function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1},e}(a);t.Pow=i;var s=function(t){function e(e){return t.call(this,e)||this}return o(e,t),e.prototype.applyInternal=function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1},e}(i);t.PowOut=s;var h=function(){function t(){}return t.arrayCopy=function(t,e,n,r,a){for(var i=e,o=r;i=n?e:t.setArraySize(e,n,r)},t.newArray=function(t,e){for(var n=new Array(t),r=0;r0?this.items.pop():this.instantiator()},t.prototype.free=function(t){t.reset&&t.reset(),this.items.push(t)},t.prototype.freeAll=function(t){for(var e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)},t}();t.TimeKeeper=f;var d=function(){function t(t){void 0===t&&(t=32),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}return t.prototype.hasEnoughData=function(){return this.addedValues>=this.values.length},t.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},t.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*i;var o=t.bone.skeleton,s=t.deform,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,f=0;f0&&(h=s);for(var w,x=(w=t.bone).worldX,T=w.worldY,A=w.a,M=w.b,I=w.c,b=w.d,R=e,S=a;S)?=?)"),d("XRANGEIDENTIFIERLOOSE","".concat(h[l.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),d("XRANGEIDENTIFIER","".concat(h[l.NUMERICIDENTIFIER],"|x|X|\\*")),d("XRANGEPLAIN","[v=\\s]*(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:".concat(h[l.PRERELEASE],")?").concat(h[l.BUILD],"?")+")?)?"),d("XRANGEPLAINLOOSE","[v=\\s]*(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(h[l.PRERELEASELOOSE],")?").concat(h[l.BUILD],"?")+")?)?"),d("XRANGE","^".concat(h[l.GTLT],"\\s*").concat(h[l.XRANGEPLAIN],"$")),d("XRANGELOOSE","^".concat(h[l.GTLT],"\\s*").concat(h[l.XRANGEPLAINLOOSE],"$")),d("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(n,"})")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:$|[^\\d])"),d("COERCERTL",h[l.COERCE],!0),d("LONETILDE","(?:~>?)"),d("TILDETRIM","(\\s*)".concat(h[l.LONETILDE],"\\s+"),!0),e.tildeTrimReplace="$1~",d("TILDE","^".concat(h[l.LONETILDE]).concat(h[l.XRANGEPLAIN],"$")),d("TILDELOOSE","^".concat(h[l.LONETILDE]).concat(h[l.XRANGEPLAINLOOSE],"$")),d("LONECARET","(?:\\^)"),d("CARETTRIM","(\\s*)".concat(h[l.LONECARET],"\\s+"),!0),e.caretTrimReplace="$1^",d("CARET","^".concat(h[l.LONECARET]).concat(h[l.XRANGEPLAIN],"$")),d("CARETLOOSE","^".concat(h[l.LONECARET]).concat(h[l.XRANGEPLAINLOOSE],"$")),d("COMPARATORLOOSE","^".concat(h[l.GTLT],"\\s*(").concat(h[l.LOOSEPLAIN],")$|^$")),d("COMPARATOR","^".concat(h[l.GTLT],"\\s*(").concat(h[l.FULLPLAIN],")$|^$")),d("COMPARATORTRIM","(\\s*)".concat(h[l.GTLT],"\\s*(").concat(h[l.LOOSEPLAIN],"|").concat(h[l.XRANGEPLAIN],")"),!0),e.comparatorTrimReplace="$1$2$3",d("HYPHENRANGE","^\\s*(".concat(h[l.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(h[l.XRANGEPLAIN],")")+"\\s*$"),d("HYPHENRANGELOOSE","^\\s*(".concat(h[l.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(h[l.XRANGEPLAINLOOSE],")")+"\\s*$"),d("STAR","(<|>)?=?\\s*\\*"),d("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),d("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(_,_.exports);var V=_.exports;S(V);var L=Object.freeze({loose:!0}),O=Object.freeze({}),F=function(t){return t?"object"!==h(t)?L:t:O};S(F);var D=/^[0-9]+$/,U=function(t,e){var n=D.test(t),r=D.test(e);return n&&r&&(t=+t,e=+e),t===e?0:n&&!r?-1:r&&!n?1:tY)throw new TypeError("version is longer than ".concat(Y," characters"));X("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;var r=e.trim().match(n.loose?j[G.LOOSE]:j[G.FULL]);if(!r)throw new TypeError("Invalid Version: ".concat(e));if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>W||this.major<0)throw new TypeError("Invalid major version");if(this.minor>W||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>W||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((function(t){if(/^[0-9]+$/.test(t)){var e=+t;if(e>=0&&e=0;)"number"==typeof this.prerelease[a]&&(this.prerelease[a]++,a=-2);if(-1===a){if(e===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(e){var i=[e,r];!1===n&&(i=[e]),0===H(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break;default:throw new Error("invalid increment argument: ".concat(t))}return this.raw=this.format(),this.build.length&&(this.raw+="+".concat(this.build.join("."))),this}}]),t}(),Z=z;S(Z);var $=Z,Q=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t instanceof $)return t;try{return new $(t,e)}catch(t){if(!n)return null;throw t}};S(Q);var J,K,tt=Q,et=S((function(t,e){var n=tt(t,e);return n?n.version:null})),nt=Z,rt=Q,at=V.safeRe,it=V.t,ot=S((function(t,e){if(t instanceof nt)return t;if("number"==typeof t&&(t=String(t)),"string"!=typeof t)return null;var n=null;if((e=e||{}).rtl){for(var r;(r=at[it.COERCERTL].exec(t))&&(!n||n.index+n[0].length!==t.length);)n&&r.index+r[0].length===n.index+n[0].length||(n=r),at[it.COERCERTL].lastIndex=r.index+r[1].length+r[2].length;at[it.COERCERTL].lastIndex=-1}else n=t.match(at[it.COERCE]);return null===n?null:rt("".concat(n[2],".").concat(n[3]||"0",".").concat(n[4]||"0"),e)}));var st=ht;function ht(t){var e=this;if(e instanceof ht||(e=new ht),e.tail=null,e.head=null,e.length=0,t&&"function"==typeof t.forEach)t.forEach((function(t){e.push(t)}));else if(arguments.length>0)for(var n=0,r=arguments.length;n1)n=e;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var a=0;null!==r;a++)n=t(n,r.value,a),r=r.next;return n},ht.prototype.reduceReverse=function(t,e){var n,r=this.tail;if(arguments.length>1)n=e;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var a=this.length-1;null!==r;a--)n=t(n,r.value,a),r=r.prev;return n},ht.prototype.toArray=function(){for(var t=new Array(this.length),e=0,n=this.head;null!==n;e++)t[e]=n.value,n=n.next;return t},ht.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,n=this.tail;null!==n;e++)t[e]=n.value,n=n.prev;return t},ht.prototype.slice=function(t,e){(e=e||this.length)<0&&(e+=this.length),(t=t||0)<0&&(t+=this.length);var n=new ht;if(ethis.length&&(e=this.length);for(var r=0,a=this.head;null!==a&&rthis.length&&(e=this.length);for(var r=this.length,a=this.tail;null!==a&&r>e;r--)a=a.prev;for(;null!==a&&r>t;r--,a=a.prev)n.push(a.value);return n},ht.prototype.splice=function(t,e){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var n=0,r=this.head;null!==r&&nthis[pt])return Ct(this,this[Tt].get(t)),!1;var i=this[Tt].get(t).value;return this[Et]&&(this[wt]||this[Et](t,i.value)),i.now=r,i.maxAge=n,i.value=e,this[mt]+=a-i.length,i.length=a,this.get(t),St(this),!0}var o=new Pt(t,e,a,r,n);return o.length>this[pt]?(this[Et]&&this[Et](t,e),!1):(this[mt]+=o.length,this[xt].unshift(o),this[Tt].set(t,this[xt].head),St(this),!0)}},{key:"has",value:function(t){if(!this[Tt].has(t))return!1;var e=this[Tt].get(t).value;return!Rt(this,e)}},{key:"get",value:function(t){return bt(this,t,!0)}},{key:"peek",value:function(t){return bt(this,t,!1)}},{key:"pop",value:function(){var t=this[xt].tail;return t?(Ct(this,t),t.value):null}},{key:"del",value:function(t){Ct(this,this[Tt].get(t))}},{key:"load",value:function(t){this.reset();for(var e=Date.now(),n=t.length-1;n>=0;n--){var r=t[n],a=r.e||0;if(0===a)this.set(r.k,r.v);else{var i=a-e;i>0&&this.set(r.k,r.v,i)}}}},{key:"prune",value:function(){var t=this;this[Tt].forEach((function(e,n){return bt(t,n,!1)}))}}]),t}(),bt=function(t,e,n){var r=t[Tt].get(e);if(r){var a=r.value;if(Rt(t,a)){if(Ct(t,r),!t[gt])return}else n&&(t[At]&&(r.value.now=Date.now()),t[xt].unshiftNode(r));return a.value}},Rt=function(t,e){if(!e||!e.maxAge&&!t[yt])return!1;var n=Date.now()-e.now;return e.maxAge?n>e.maxAge:t[yt]&&n>t[yt]},St=function(t){if(t[mt]>t[pt])for(var e=t[xt].tail;t[mt]>t[pt]&&null!==e;){var n=e.prev;Ct(t,e),e=n}},Ct=function(t,e){if(e){var n=e.value;t[Et]&&t[Et](n.key,n.value),t[mt]-=n.length,t[Tt].delete(n.key),t[xt].removeNode(e)}},Pt=c((function t(e,n,r,a,i){l(this,t),this.key=e,this.value=n,this.length=r,this.now=a,this.maxAge=i||0})),kt=function(t,e,n,r){var a=n.value;Rt(t,a)&&(Ct(t,n),t[gt]||(a=void 0)),a&&e.call(r,a.value,a.key,t)},Nt=It;S(Nt);var _t=Z,Vt=function(t,e,n){return new _t(t,n).compare(new _t(e,n))};S(Vt);var Lt=Vt,Ot=function(t,e,n){return 0===Lt(t,e,n)};S(Ot);var Ft=Vt,Dt=function(t,e,n){return 0!==Ft(t,e,n)};S(Dt);var Ut=Vt,Bt=function(t,e,n){return Ut(t,e,n)>0};S(Bt);var Xt=Vt,Yt=function(t,e,n){return Xt(t,e,n)>=0};S(Yt);var Wt=Vt,jt=function(t,e,n){return Wt(t,e,n)<0};S(jt);var Gt=Vt,qt=function(t,e,n){return Gt(t,e,n)<=0};S(qt);var Ht,zt,Zt,$t,Qt=Ot,Jt=Dt,Kt=Bt,te=Yt,ee=jt,ne=qt,re=function(t,e,n,r){switch(e){case"===":return"object"===h(t)&&(t=t.version),"object"===h(n)&&(n=n.version),t===n;case"!==":return"object"===h(t)&&(t=t.version),"object"===h(n)&&(n=n.version),t!==n;case"":case"=":case"==":return Qt(t,n,r);case"!=":return Jt(t,n,r);case">":return Kt(t,n,r);case">=":return te(t,n,r);case"<":return ee(t,n,r);case"<=":return ne(t,n,r);default:throw new TypeError("Invalid operator: ".concat(e))}};function ae(){if($t)return Zt;$t=1;var t=function(){function t(e,a){var i=this;if(l(this,t),a=n(a),e instanceof t)return e.loose===!!a.loose&&e.includePrerelease===!!a.includePrerelease?e:new t(e.raw,a);if(e instanceof r)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=a,this.loose=!!a.loose,this.includePrerelease=!!a.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((function(t){return i.parseRange(t.trim())})).filter((function(t){return t.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(this.raw));if(this.set.length>1){var o=this.set[0];if(this.set=this.set.filter((function(t){return!m(t[0])})),0===this.set.length)this.set=[o];else if(this.set.length>1){var s,h=A(this.set);try{for(h.s();!(s=h.n()).done;){var u=s.value;if(1===u.length&&v(u[0])){this.set=[u];break}}}catch(t){h.e(t)}finally{h.f()}}}this.format()}return c(t,[{key:"format",value:function(){return this.range=this.set.map((function(t){return t.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(t){var n=this,i=((this.options.includePrerelease&&d)|(this.options.loose&&p))+":"+t,l=e.get(i);if(l)return l;var c=this.options.loose,v=c?o[s.HYPHENRANGELOOSE]:o[s.HYPHENRANGE];t=t.replace(v,k(this.options.includePrerelease)),a("hyphen replace",t),t=t.replace(o[s.COMPARATORTRIM],h),a("comparator trim",t),t=t.replace(o[s.TILDETRIM],u),a("tilde trim",t),t=t.replace(o[s.CARETTRIM],f),a("caret trim",t);var g=t.split(" ").map((function(t){return y(t,n.options)})).join(" ").split(/\s+/).map((function(t){return P(t,n.options)}));c&&(g=g.filter((function(t){return a("loose invalid filter",t,n.options),!!t.match(o[s.COMPARATORLOOSE])}))),a("range list",g);var E,x=new Map,T=g.map((function(t){return new r(t,n.options)})),M=A(T);try{for(M.s();!(E=M.n()).done;){var I=E.value;if(m(I))return[I];x.set(I.value,I)}}catch(t){M.e(t)}finally{M.f()}x.size>1&&x.has("")&&x.delete("");var b=w(x.values());return e.set(i,b),b}},{key:"intersects",value:function(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((function(t){return g(t,n)&&e.set.some((function(e){return g(e,n)&&t.every((function(t){return e.every((function(e){return t.intersects(e,n)}))}))}))}))}},{key:"test",value:function(t){if(!t)return!1;if("string"==typeof t)try{t=new i(t,this.options)}catch(t){return!1}for(var e=0;e")||!t.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!t.operator.startsWith("<"))&&(this.semver.version!==t.semver.version||!this.operator.includes("=")||!t.operator.includes("="))&&!(i(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<"))&&!(i(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}}],[{key:"ANY",get:function(){return t}}]),e}();Ht=e;var n=F,r=V.safeRe,a=V.t,i=re,o=N,s=Z,h=ae();return Ht}(),a=N,i=Z,o=V.safeRe,s=V.t,h=V.comparatorTrimReplace,u=V.tildeTrimReplace,f=V.caretTrimReplace,d=C.FLAG_INCLUDE_PRERELEASE,p=C.FLAG_LOOSE,m=function(t){return"<0.0.0-0"===t.value},v=function(t){return""===t.value},g=function(t,e){for(var n=!0,r=t.slice(),a=r.pop();n&&r.length;)n=r.every((function(t){return a.intersects(t,e)})),a=r.pop();return n},y=function(t,e){return a("comp",t,e),t=M(t,e),a("caret",t),t=x(t,e),a("tildes",t),t=b(t,e),a("xrange",t),t=S(t,e),a("stars",t),t},E=function(t){return!t||"x"===t.toLowerCase()||"*"===t},x=function(t,e){return t.trim().split(/\s+/).map((function(t){return T(t,e)})).join(" ")},T=function(t,e){var n=e.loose?o[s.TILDELOOSE]:o[s.TILDE];return t.replace(n,(function(e,n,r,i,o){var s;return a("tilde",t,e,n,r,i,o),E(n)?s="":E(r)?s=">=".concat(n,".0.0 <").concat(+n+1,".0.0-0"):E(i)?s=">=".concat(n,".").concat(r,".0 <").concat(n,".").concat(+r+1,".0-0"):o?(a("replaceTilde pr",o),s=">=".concat(n,".").concat(r,".").concat(i,"-").concat(o," <").concat(n,".").concat(+r+1,".0-0")):s=">=".concat(n,".").concat(r,".").concat(i," <").concat(n,".").concat(+r+1,".0-0"),a("tilde return",s),s}))},M=function(t,e){return t.trim().split(/\s+/).map((function(t){return I(t,e)})).join(" ")},I=function(t,e){a("caret",t,e);var n=e.loose?o[s.CARETLOOSE]:o[s.CARET],r=e.includePrerelease?"-0":"";return t.replace(n,(function(e,n,i,o,s){var h;return a("caret",t,e,n,i,o,s),E(n)?h="":E(i)?h=">=".concat(n,".0.0").concat(r," <").concat(+n+1,".0.0-0"):E(o)?h="0"===n?">=".concat(n,".").concat(i,".0").concat(r," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".0").concat(r," <").concat(+n+1,".0.0-0"):s?(a("replaceCaret pr",s),h="0"===n?"0"===i?">=".concat(n,".").concat(i,".").concat(o,"-").concat(s," <").concat(n,".").concat(i,".").concat(+o+1,"-0"):">=".concat(n,".").concat(i,".").concat(o,"-").concat(s," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".").concat(o,"-").concat(s," <").concat(+n+1,".0.0-0")):(a("no pr"),h="0"===n?"0"===i?">=".concat(n,".").concat(i,".").concat(o).concat(r," <").concat(n,".").concat(i,".").concat(+o+1,"-0"):">=".concat(n,".").concat(i,".").concat(o).concat(r," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".").concat(o," <").concat(+n+1,".0.0-0")),a("caret return",h),h}))},b=function(t,e){return a("replaceXRanges",t,e),t.split(/\s+/).map((function(t){return R(t,e)})).join(" ")},R=function(t,e){t=t.trim();var n=e.loose?o[s.XRANGELOOSE]:o[s.XRANGE];return t.replace(n,(function(n,r,i,o,s,h){a("xRange",t,n,r,i,o,s,h);var l=E(i),u=l||E(o),c=u||E(s),f=c;return"="===r&&f&&(r=""),h=e.includePrerelease?"-0":"",l?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&f?(u&&(o=0),s=0,">"===r?(r=">=",u?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",u?i=+i+1:o=+o+1),"<"===r&&(h="-0"),n="".concat(r+i,".").concat(o,".").concat(s).concat(h)):u?n=">=".concat(i,".0.0").concat(h," <").concat(+i+1,".0.0-0"):c&&(n=">=".concat(i,".").concat(o,".0").concat(h," <").concat(i,".").concat(+o+1,".0-0")),a("xRange return",n),n}))},S=function(t,e){return a("replaceStars",t,e),t.trim().replace(o[s.STAR],"")},P=function(t,e){return a("replaceGTE0",t,e),t.trim().replace(o[e.includePrerelease?s.GTE0PRE:s.GTE0],"")},k=function(t){return function(e,n,r,a,i,o,s,h,l,u,c,f,d){return n=E(r)?"":E(a)?">=".concat(r,".0.0").concat(t?"-0":""):E(i)?">=".concat(r,".").concat(a,".0").concat(t?"-0":""):o?">=".concat(n):">=".concat(n).concat(t?"-0":""),h=E(l)?"":E(u)?"<".concat(+l+1,".0.0-0"):E(c)?"<".concat(l,".").concat(+u+1,".0-0"):f?"<=".concat(l,".").concat(u,".").concat(c,"-").concat(f):t?"<".concat(l,".").concat(u,".").concat(+c+1,"-0"):"<=".concat(h),"".concat(n," ").concat(h).trim()}},_=function(t,e,n){for(var i=0;i0){var s=t[o].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0};return Zt}S(re);var ie,oe,se=ae(),he=function(t,e,n){try{e=new se(e,n)}catch(t){return!1}return e.test(t)},le={valid:et,coerce:ot,satisfies:S(he),SEMVER_SPEC_VERSION:P.SEMVER_SPEC_VERSION},ue=0,ce=1,fe=2,de=[0,1,2,2,3,0],pe=function(){function t(e,n,r,o){var s;if(l(this,t),f(this,"autoUpdate",!0),f(this,"skeleton",void 0),f(this,"states",void 0),this._app=e,this._position=new i.Vec3,1===a.TextureAtlas.length){var h,u=A((s=new a.TextureAtlas(n)).pages);try{for(u.s();!(h=u.n()).done;){var c=h.value;c.setTexture(new R(o[c.name]))}}catch(t){u.e(t)}finally{u.f()}}else s=new a.TextureAtlas(n,(function(t){return new R(o[t])}));var d=new a.SkeletonJson(new a.AtlasAttachmentLoader(s));d.scale*=.01;var p=d.readSkeletonData(r);this.skeletonVersion=le.valid(le.coerce(p.version)),this._spine_3_6_0=le.satisfies(this.skeletonVersion,"<=3.6.0"),this._spine_3_7_99=le.satisfies(this.skeletonVersion,"<=3.7.99"),this._spine_4_0_X=le.satisfies(this.skeletonVersion,"~4.0.0"),this._spine_4_1_X=le.satisfies(this.skeletonVersion,"~4.1.23"),this.skeleton=new a.Skeleton(p),this.skeleton.updateWorldTransform(),this.stateData=new a.AnimationStateData(this.skeleton.data),this.states=[new a.AnimationState(this.stateData)],this.clipper=new a.SkeletonClipping,this._node=new i.GraphNode,this._meshes=[],this._meshInstances=[],this._materials={},this._tint={},this._aabb=new i.BoundingBox,this._aabbTempArray=[],this._aabbTempOffset=new i.Vec2,this._aabbTempSize=new i.Vec2,this._renderCounts={vertexCount:0,indexCount:0},this._vertexFormat=null,this._vertexBuffer=null,this._indexBuffer=null,this._priority=0,this._timeScale=1,this._layers=[i.LAYERID_UI],this.init(),this._hidden=!1}return c(t,[{key:"destroy",value:function(){this.removeFromLayers();for(var t=0;t0&&this._renderCounts.vertexCount>0){this.skeleton.getBounds(this._aabbTempOffset,this._aabbTempSize,this._aabbTempArray),this._aabb.center=new i.Vec3(this._aabbTempOffset.x,this._aabbTempOffset.y,0),this._aabb.halfExtents=new i.Vec3(.5*this._aabbTempSize.x,.5*this._aabbTempSize.y,0),(!this._vertexBuffer||this._vertexBuffer.getNumVertices()0&&c.indices.length>0){t&&t!==c.material&&(this.SubmitBatch(e,n,t),t=c.material,e=o,n=0),t=c.material;var f=c.positions,d=c.vertexColor.r,p=c.vertexColor.g,m=c.vertexColor.b,v=c.vertexColor.a,g=c.uvs,y=void 0,E=f.length/2;for(y=0;y0){var r=new i.Mesh(this._app.graphicsDevice);r.vertexBuffer=this._vertexBuffer,r.indexBuffer[0]=this._indexBuffer,r.primitive[0].type=i.PRIMITIVE_TRIANGLES,r.primitive[0].base=t,r.primitive[0].count=e,r.primitive[0].indexed=!0,r.aabb=this._aabb,this._meshes.push(r);var a=new i.MeshInstance(r,this._materials[n],this._node);a.drawOrder=this.priority+this._meshInstances.length,a.visible=!this._hidden,this._meshInstances.push(a)}}},{key:"update",value:function(t){if(!this._hidden){var e;t*=this._timeScale;var n=this.states.length;for(e=0;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){o=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function A(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:String(e)}!function(t){var e,n,r,a=function(){function t(t,e,n){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var r=0;r0&&(e%=this.duration));for(var l=this.timelines,h=0,c=l.length;h>>1;;){if(t[(i+1)*n]<=e?r=i+1:a=i,r==a)return(r+1)*n;i=r+a>>>1}},t.linearSearch=function(t,e,n){for(var r=0,a=t.length-n;r<=a;r+=n)if(t[r]>e)return r;return-1},t}();t.Animation=a,function(t){t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add"}(e=t.MixBlend||(t.MixBlend={})),function(t){t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut"}(n=t.MixDirection||(t.MixDirection={})),function(t){t[t.rotate=0]="rotate",t[t.translate=1]="translate",t[t.scale=2]="scale",t[t.shear=3]="shear",t[t.attachment=4]="attachment",t[t.color=5]="color",t[t.deform=6]="deform",t[t.event=7]="event",t[t.drawOrder=8]="drawOrder",t[t.ikConstraint=9]="ikConstraint",t[t.transformConstraint=10]="transformConstraint",t[t.pathConstraintPosition=11]="pathConstraintPosition",t[t.pathConstraintSpacing=12]="pathConstraintSpacing",t[t.pathConstraintMix=13]="pathConstraintMix",t[t.twoColor=14]="twoColor"}(r=t.TimelineType||(t.TimelineType={}));var i=function(){function e(n){if(n<=0)throw new Error("frameCount must be > 0: "+n);this.curves=t.Utils.newFloatArray((n-1)*e.BEZIER_SIZE)}return e.prototype.getFrameCount=function(){return this.curves.length/e.BEZIER_SIZE+1},e.prototype.setLinear=function(t){this.curves[t*e.BEZIER_SIZE]=e.LINEAR},e.prototype.setStepped=function(t){this.curves[t*e.BEZIER_SIZE]=e.STEPPED},e.prototype.getCurveType=function(t){var n=t*e.BEZIER_SIZE;if(n==this.curves.length)return e.LINEAR;var r=this.curves[n];return r==e.LINEAR?e.LINEAR:r==e.STEPPED?e.STEPPED:e.BEZIER},e.prototype.setCurve=function(t,n,r,a,i){var s=.03*(2*-n+a),o=.03*(2*-r+i),l=.006*(3*(n-a)+1),h=.006*(3*(r-i)+1),c=2*s+l,u=2*o+h,f=.3*n+s+.16666667*l,d=.3*r+o+.16666667*h,p=t*e.BEZIER_SIZE,m=this.curves;m[p++]=e.BEZIER;for(var v=f,g=d,y=p+e.BEZIER_SIZE-1;p=r){var c=void 0,u=void 0;return i==l?(c=0,u=0):(c=a[i-2],u=a[i-1]),u+(a[i+1]-u)*(r-c)/(o-c)}var f=a[i-1];return f+(1-f)*(r-o)/(1-o)},e.LINEAR=0,e.STEPPED=1,e.BEZIER=2,e.BEZIER_SIZE=19,e}();t.CurveTimeline=i;var o=function(n){function i(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e<<1),r}return s(i,n),i.prototype.getPropertyId=function(){return(r.rotate<<24)+this.boneIndex},i.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+i.ROTATION]=n},i.prototype.apply=function(t,n,r,s,o,l,h){var c=this.frames,u=t.bones[this.boneIndex];if(u.active)if(r=c[c.length-i.ENTRIES]){var d=c[c.length+i.PREV_ROTATION];switch(l){case e.setup:u.rotation=u.data.rotation+d*o;break;case e.first:case e.replace:d+=u.data.rotation-u.rotation,d-=360*(16384-(16384.499999999996-d/360|0));case e.add:u.rotation+=d*o}}else{var p=a.binarySearch(c,r,i.ENTRIES),m=c[p+i.PREV_ROTATION],v=c[p],g=this.getCurvePercent((p>>1)-1,1-(r-v)/(c[p+i.PREV_TIME]-v)),y=c[p+i.ROTATION]-m;switch(y=m+(y-360*(16384-(16384.499999999996-y/360|0)))*g,l){case e.setup:u.rotation=u.data.rotation+(y-360*(16384-(16384.499999999996-y/360|0)))*o;break;case e.first:case e.replace:y+=u.data.rotation-u.rotation;case e.add:u.rotation+=(y-360*(16384-(16384.499999999996-y/360|0)))*o}}},i.ENTRIES=2,i.PREV_TIME=-2,i.PREV_ROTATION=-1,i.ROTATION=1,i}(i);t.RotateTimeline=o;var l=function(n){function i(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*i.ENTRIES),r}return s(i,n),i.prototype.getPropertyId=function(){return(r.translate<<24)+this.boneIndex},i.prototype.setFrame=function(t,e,n,r){t*=i.ENTRIES,this.frames[t]=e,this.frames[t+i.X]=n,this.frames[t+i.Y]=r},i.prototype.apply=function(t,n,r,s,o,l,h){var c=this.frames,u=t.bones[this.boneIndex];if(u.active)if(r=c[c.length-i.ENTRIES])f=c[c.length+i.PREV_X],d=c[c.length+i.PREV_Y];else{var p=a.binarySearch(c,r,i.ENTRIES);f=c[p+i.PREV_X],d=c[p+i.PREV_Y];var m=c[p],v=this.getCurvePercent(p/i.ENTRIES-1,1-(r-m)/(c[p+i.PREV_TIME]-m));f+=(c[p+i.X]-f)*v,d+=(c[p+i.Y]-d)*v}switch(l){case e.setup:u.x=u.data.x+f*o,u.y=u.data.y+d*o;break;case e.first:case e.replace:u.x+=(u.data.x+f-u.x)*o,u.y+=(u.data.y+d-u.y)*o;break;case e.add:u.x+=f*o,u.y+=d*o}}},i.ENTRIES=3,i.PREV_TIME=-3,i.PREV_X=-2,i.PREV_Y=-1,i.X=1,i.Y=2,i}(i);t.TranslateTimeline=l;var h=function(i){function o(t){return i.call(this,t)||this}return s(o,i),o.prototype.getPropertyId=function(){return(r.scale<<24)+this.boneIndex},o.prototype.apply=function(r,i,s,l,h,c,u){var f=this.frames,d=r.bones[this.boneIndex];if(d.active)if(s=f[f.length-o.ENTRIES])p=f[f.length+o.PREV_X]*d.data.scaleX,m=f[f.length+o.PREV_Y]*d.data.scaleY;else{var v=a.binarySearch(f,s,o.ENTRIES);p=f[v+o.PREV_X],m=f[v+o.PREV_Y];var g=f[v],y=this.getCurvePercent(v/o.ENTRIES-1,1-(s-g)/(f[v+o.PREV_TIME]-g));p=(p+(f[v+o.X]-p)*y)*d.data.scaleX,m=(m+(f[v+o.Y]-m)*y)*d.data.scaleY}if(1==h)c==e.add?(d.scaleX+=p-d.data.scaleX,d.scaleY+=m-d.data.scaleY):(d.scaleX=p,d.scaleY=m);else{var E=0,w=0;if(u==n.mixOut)switch(c){case e.setup:E=d.data.scaleX,w=d.data.scaleY,d.scaleX=E+(Math.abs(p)*t.MathUtils.signum(E)-E)*h,d.scaleY=w+(Math.abs(m)*t.MathUtils.signum(w)-w)*h;break;case e.first:case e.replace:E=d.scaleX,w=d.scaleY,d.scaleX=E+(Math.abs(p)*t.MathUtils.signum(E)-E)*h,d.scaleY=w+(Math.abs(m)*t.MathUtils.signum(w)-w)*h;break;case e.add:E=d.scaleX,w=d.scaleY,d.scaleX=E+(Math.abs(p)*t.MathUtils.signum(E)-d.data.scaleX)*h,d.scaleY=w+(Math.abs(m)*t.MathUtils.signum(w)-d.data.scaleY)*h}else switch(c){case e.setup:E=Math.abs(d.data.scaleX)*t.MathUtils.signum(p),w=Math.abs(d.data.scaleY)*t.MathUtils.signum(m),d.scaleX=E+(p-E)*h,d.scaleY=w+(m-w)*h;break;case e.first:case e.replace:E=Math.abs(d.scaleX)*t.MathUtils.signum(p),w=Math.abs(d.scaleY)*t.MathUtils.signum(m),d.scaleX=E+(p-E)*h,d.scaleY=w+(m-w)*h;break;case e.add:E=t.MathUtils.signum(p),w=t.MathUtils.signum(m),d.scaleX=Math.abs(d.scaleX)*E+(p-Math.abs(d.data.scaleX)*E)*h,d.scaleY=Math.abs(d.scaleY)*w+(m-Math.abs(d.data.scaleY)*w)*h}}}},o}(l);t.ScaleTimeline=h;var c=function(t){function n(e){return t.call(this,e)||this}return s(n,t),n.prototype.getPropertyId=function(){return(r.shear<<24)+this.boneIndex},n.prototype.apply=function(t,r,i,s,o,l,h){var c=this.frames,u=t.bones[this.boneIndex];if(u.active)if(i=c[c.length-n.ENTRIES])f=c[c.length+n.PREV_X],d=c[c.length+n.PREV_Y];else{var p=a.binarySearch(c,i,n.ENTRIES);f=c[p+n.PREV_X],d=c[p+n.PREV_Y];var m=c[p],v=this.getCurvePercent(p/n.ENTRIES-1,1-(i-m)/(c[p+n.PREV_TIME]-m));f+=(c[p+n.X]-f)*v,d+=(c[p+n.Y]-d)*v}switch(l){case e.setup:u.shearX=u.data.shearX+f*o,u.shearY=u.data.shearY+d*o;break;case e.first:case e.replace:u.shearX+=(u.data.shearX+f-u.shearX)*o,u.shearY+=(u.data.shearY+d-u.shearY)*o;break;case e.add:u.shearX+=f*o,u.shearY+=d*o}}},n}(l);t.ShearTimeline=c;var u=function(n){function i(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*i.ENTRIES),r}return s(i,n),i.prototype.getPropertyId=function(){return(r.color<<24)+this.slotIndex},i.prototype.setFrame=function(t,e,n,r,a,s){t*=i.ENTRIES,this.frames[t]=e,this.frames[t+i.R]=n,this.frames[t+i.G]=r,this.frames[t+i.B]=a,this.frames[t+i.A]=s},i.prototype.apply=function(t,n,r,s,o,l,h){var c=t.slots[this.slotIndex];if(c.bone.active){var u=this.frames;if(r=u[u.length-i.ENTRIES]){var y=u.length;p=u[y+i.PREV_R],m=u[y+i.PREV_G],v=u[y+i.PREV_B],g=u[y+i.PREV_A]}else{var E=a.binarySearch(u,r,i.ENTRIES);p=u[E+i.PREV_R],m=u[E+i.PREV_G],v=u[E+i.PREV_B],g=u[E+i.PREV_A];var w=u[E],T=this.getCurvePercent(E/i.ENTRIES-1,1-(r-w)/(u[E+i.PREV_TIME]-w));p+=(u[E+i.R]-p)*T,m+=(u[E+i.G]-m)*T,v+=(u[E+i.B]-v)*T,g+=(u[E+i.A]-g)*T}if(1==o)c.color.set(p,m,v,g);else{f=c.color;l==e.setup&&f.setFromColor(c.data.color),f.add((p-f.r)*o,(m-f.g)*o,(v-f.b)*o,(g-f.a)*o)}}}},i.ENTRIES=5,i.PREV_TIME=-5,i.PREV_R=-4,i.PREV_G=-3,i.PREV_B=-2,i.PREV_A=-1,i.R=1,i.G=2,i.B=3,i.A=4,i}(i);t.ColorTimeline=u;var f=function(n){function i(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*i.ENTRIES),r}return s(i,n),i.prototype.getPropertyId=function(){return(r.twoColor<<24)+this.slotIndex},i.prototype.setFrame=function(t,e,n,r,a,s,o,l,h){t*=i.ENTRIES,this.frames[t]=e,this.frames[t+i.R]=n,this.frames[t+i.G]=r,this.frames[t+i.B]=a,this.frames[t+i.A]=s,this.frames[t+i.R2]=o,this.frames[t+i.G2]=l,this.frames[t+i.B2]=h},i.prototype.apply=function(t,n,r,s,o,l,h){var c=t.slots[this.slotIndex];if(c.bone.active){var u=this.frames;if(r=u[u.length-i.ENTRIES]){var x=u.length;v=u[x+i.PREV_R],g=u[x+i.PREV_G],y=u[x+i.PREV_B],E=u[x+i.PREV_A],w=u[x+i.PREV_R2],T=u[x+i.PREV_G2],A=u[x+i.PREV_B2]}else{var M=a.binarySearch(u,r,i.ENTRIES);v=u[M+i.PREV_R],g=u[M+i.PREV_G],y=u[M+i.PREV_B],E=u[M+i.PREV_A],w=u[M+i.PREV_R2],T=u[M+i.PREV_G2],A=u[M+i.PREV_B2];var I=u[M],R=this.getCurvePercent(M/i.ENTRIES-1,1-(r-I)/(u[M+i.PREV_TIME]-I));v+=(u[M+i.R]-v)*R,g+=(u[M+i.G]-g)*R,y+=(u[M+i.B]-y)*R,E+=(u[M+i.A]-E)*R,w+=(u[M+i.R2]-w)*R,T+=(u[M+i.G2]-T)*R,A+=(u[M+i.B2]-A)*R}if(1==o)c.color.set(v,g,y,E),c.darkColor.set(w,T,A,1);else{f=c.color,d=c.darkColor;l==e.setup&&(f.setFromColor(c.data.color),d.setFromColor(c.data.darkColor)),f.add((v-f.r)*o,(g-f.g)*o,(y-f.b)*o,(E-f.a)*o),d.add((w-d.r)*o,(T-d.g)*o,(A-d.b)*o,0)}}}},i.ENTRIES=8,i.PREV_TIME=-8,i.PREV_R=-7,i.PREV_G=-6,i.PREV_B=-5,i.PREV_A=-4,i.PREV_R2=-3,i.PREV_G2=-2,i.PREV_B2=-1,i.R=1,i.G=2,i.B=3,i.A=4,i.R2=5,i.G2=6,i.B2=7,i}(i);t.TwoColorTimeline=f;var d=function(){function i(e){this.frames=t.Utils.newFloatArray(e),this.attachmentNames=new Array(e)}return i.prototype.getPropertyId=function(){return(r.attachment<<24)+this.slotIndex},i.prototype.getFrameCount=function(){return this.frames.length},i.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},i.prototype.apply=function(t,r,i,s,o,l,h){var c=t.slots[this.slotIndex];if(c.bone.active)if(h!=n.mixOut){var u=this.frames;if(i=u[u.length-1]?u.length-1:a.binarySearch(u,i,1)-1;var d=this.attachmentNames[f];t.slots[this.slotIndex].setAttachment(null==d?null:t.getAttachment(this.slotIndex,d))}}else l==e.setup&&this.setAttachment(t,c,c.data.attachmentName)},i.prototype.setAttachment=function(t,e,n){e.setAttachment(null==n?null:t.getAttachment(this.slotIndex,n))},i}();t.AttachmentTimeline=d;var p=null,m=function(n){function i(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e),r.frameVertices=new Array(e),null==p&&(p=t.Utils.newFloatArray(64)),r}return s(i,n),i.prototype.getPropertyId=function(){return(r.deform<<27)+ +this.attachment.id+this.slotIndex},i.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},i.prototype.apply=function(n,r,i,s,o,l,h){var c=n.slots[this.slotIndex];if(c.bone.active){var u=c.getAttachment();if(u instanceof t.VertexAttachment&&u.deformAttachment==this.attachment){var f=c.deform;0==f.length&&(l=e.setup);var d=this.frameVertices,p=d[0].length,m=this.frames;if(i=m[m.length-1]){var T=d[m.length-1];if(1==o)if(l==e.add)if(null==(v=u).bones){y=v.vertices;for(var A=0;An)this.apply(t,e,Number.MAX_VALUE,r,i,s,o),e=-1;else if(e>=l[h-1])return;if(!(n0&&l[c-1]==u;)c--;for(;c=l[c];c++)r.push(this.events[c])}}},e}();t.EventTimeline=v;var g=function(){function i(e){this.frames=t.Utils.newFloatArray(e),this.drawOrders=new Array(e)}return i.prototype.getPropertyId=function(){return r.drawOrder<<24},i.prototype.getFrameCount=function(){return this.frames.length},i.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},i.prototype.apply=function(r,i,s,o,l,h,c){var u=r.drawOrder,f=r.slots;if(c!=n.mixOut){var d=this.frames;if(s=d[d.length-1]?d.length-1:a.binarySearch(d,s)-1;var m=this.drawOrders[p];if(null==m)t.Utils.arrayCopy(f,0,u,0,f.length);else for(var v=0,g=m.length;v=u[u.length-o.ENTRIES])h==e.setup?(f.mix=f.data.mix+(u[u.length+o.PREV_MIX]-f.data.mix)*l,f.softness=f.data.softness+(u[u.length+o.PREV_SOFTNESS]-f.data.softness)*l,c==n.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=u[u.length+o.PREV_BEND_DIRECTION],f.compress=0!=u[u.length+o.PREV_COMPRESS],f.stretch=0!=u[u.length+o.PREV_STRETCH])):(f.mix+=(u[u.length+o.PREV_MIX]-f.mix)*l,f.softness+=(u[u.length+o.PREV_SOFTNESS]-f.softness)*l,c==n.mixIn&&(f.bendDirection=u[u.length+o.PREV_BEND_DIRECTION],f.compress=0!=u[u.length+o.PREV_COMPRESS],f.stretch=0!=u[u.length+o.PREV_STRETCH]));else{var d=a.binarySearch(u,i,o.ENTRIES),p=u[d+o.PREV_MIX],m=u[d+o.PREV_SOFTNESS],v=u[d],g=this.getCurvePercent(d/o.ENTRIES-1,1-(i-v)/(u[d+o.PREV_TIME]-v));h==e.setup?(f.mix=f.data.mix+(p+(u[d+o.MIX]-p)*g-f.data.mix)*l,f.softness=f.data.softness+(m+(u[d+o.SOFTNESS]-m)*g-f.data.softness)*l,c==n.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=u[d+o.PREV_BEND_DIRECTION],f.compress=0!=u[d+o.PREV_COMPRESS],f.stretch=0!=u[d+o.PREV_STRETCH])):(f.mix+=(p+(u[d+o.MIX]-p)*g-f.mix)*l,f.softness+=(m+(u[d+o.SOFTNESS]-m)*g-f.softness)*l,c==n.mixIn&&(f.bendDirection=u[d+o.PREV_BEND_DIRECTION],f.compress=0!=u[d+o.PREV_COMPRESS],f.stretch=0!=u[d+o.PREV_STRETCH]))}},o.ENTRIES=6,o.PREV_TIME=-6,o.PREV_MIX=-5,o.PREV_SOFTNESS=-4,o.PREV_BEND_DIRECTION=-3,o.PREV_COMPRESS=-2,o.PREV_STRETCH=-1,o.MIX=1,o.SOFTNESS=2,o.BEND_DIRECTION=3,o.COMPRESS=4,o.STRETCH=5,o}(i);t.IkConstraintTimeline=y;var E=function(n){function i(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*i.ENTRIES),r}return s(i,n),i.prototype.getPropertyId=function(){return(r.transformConstraint<<24)+this.transformConstraintIndex},i.prototype.setFrame=function(t,e,n,r,a,s){t*=i.ENTRIES,this.frames[t]=e,this.frames[t+i.ROTATE]=n,this.frames[t+i.TRANSLATE]=r,this.frames[t+i.SCALE]=a,this.frames[t+i.SHEAR]=s},i.prototype.apply=function(t,n,r,s,o,l,h){var c=this.frames,u=t.transformConstraints[this.transformConstraintIndex];if(u.active)if(r=c[c.length-i.ENTRIES]){var g=c.length;d=c[g+i.PREV_ROTATE],p=c[g+i.PREV_TRANSLATE],m=c[g+i.PREV_SCALE],v=c[g+i.PREV_SHEAR]}else{var y=a.binarySearch(c,r,i.ENTRIES);d=c[y+i.PREV_ROTATE],p=c[y+i.PREV_TRANSLATE],m=c[y+i.PREV_SCALE],v=c[y+i.PREV_SHEAR];var E=c[y],w=this.getCurvePercent(y/i.ENTRIES-1,1-(r-E)/(c[y+i.PREV_TIME]-E));d+=(c[y+i.ROTATE]-d)*w,p+=(c[y+i.TRANSLATE]-p)*w,m+=(c[y+i.SCALE]-m)*w,v+=(c[y+i.SHEAR]-v)*w}if(l==e.setup){f=u.data;u.rotateMix=f.rotateMix+(d-f.rotateMix)*o,u.translateMix=f.translateMix+(p-f.translateMix)*o,u.scaleMix=f.scaleMix+(m-f.scaleMix)*o,u.shearMix=f.shearMix+(v-f.shearMix)*o}else u.rotateMix+=(d-u.rotateMix)*o,u.translateMix+=(p-u.translateMix)*o,u.scaleMix+=(m-u.scaleMix)*o,u.shearMix+=(v-u.shearMix)*o}},i.ENTRIES=5,i.PREV_TIME=-5,i.PREV_ROTATE=-4,i.PREV_TRANSLATE=-3,i.PREV_SCALE=-2,i.PREV_SHEAR=-1,i.ROTATE=1,i.TRANSLATE=2,i.SCALE=3,i.SHEAR=4,i}(i);t.TransformConstraintTimeline=E;var w=function(n){function i(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*i.ENTRIES),r}return s(i,n),i.prototype.getPropertyId=function(){return(r.pathConstraintPosition<<24)+this.pathConstraintIndex},i.prototype.setFrame=function(t,e,n){t*=i.ENTRIES,this.frames[t]=e,this.frames[t+i.VALUE]=n},i.prototype.apply=function(t,n,r,s,o,l,h){var c=this.frames,u=t.pathConstraints[this.pathConstraintIndex];if(u.active)if(r=c[c.length-i.ENTRIES])f=c[c.length+i.PREV_VALUE];else{var d=a.binarySearch(c,r,i.ENTRIES);f=c[d+i.PREV_VALUE];var p=c[d],m=this.getCurvePercent(d/i.ENTRIES-1,1-(r-p)/(c[d+i.PREV_TIME]-p));f+=(c[d+i.VALUE]-f)*m}l==e.setup?u.position=u.data.position+(f-u.data.position)*o:u.position+=(f-u.position)*o}},i.ENTRIES=2,i.PREV_TIME=-2,i.PREV_VALUE=-1,i.VALUE=1,i}(i);t.PathConstraintPositionTimeline=w;var T=function(t){function n(e){return t.call(this,e)||this}return s(n,t),n.prototype.getPropertyId=function(){return(r.pathConstraintSpacing<<24)+this.pathConstraintIndex},n.prototype.apply=function(t,r,i,s,o,l,h){var c=this.frames,u=t.pathConstraints[this.pathConstraintIndex];if(u.active)if(i=c[c.length-n.ENTRIES])f=c[c.length+n.PREV_VALUE];else{var d=a.binarySearch(c,i,n.ENTRIES);f=c[d+n.PREV_VALUE];var p=c[d],m=this.getCurvePercent(d/n.ENTRIES-1,1-(i-p)/(c[d+n.PREV_TIME]-p));f+=(c[d+n.VALUE]-f)*m}l==e.setup?u.spacing=u.data.spacing+(f-u.data.spacing)*o:u.spacing+=(f-u.spacing)*o}},n}(w);t.PathConstraintSpacingTimeline=T;var A=function(n){function i(e){var r=n.call(this,e)||this;return r.frames=t.Utils.newFloatArray(e*i.ENTRIES),r}return s(i,n),i.prototype.getPropertyId=function(){return(r.pathConstraintMix<<24)+this.pathConstraintIndex},i.prototype.setFrame=function(t,e,n,r){t*=i.ENTRIES,this.frames[t]=e,this.frames[t+i.ROTATE]=n,this.frames[t+i.TRANSLATE]=r},i.prototype.apply=function(t,n,r,s,o,l,h){var c=this.frames,u=t.pathConstraints[this.pathConstraintIndex];if(u.active)if(r=c[c.length-i.ENTRIES])f=c[c.length+i.PREV_ROTATE],d=c[c.length+i.PREV_TRANSLATE];else{var p=a.binarySearch(c,r,i.ENTRIES);f=c[p+i.PREV_ROTATE],d=c[p+i.PREV_TRANSLATE];var m=c[p],v=this.getCurvePercent(p/i.ENTRIES-1,1-(r-m)/(c[p+i.PREV_TIME]-m));f+=(c[p+i.ROTATE]-f)*v,d+=(c[p+i.TRANSLATE]-d)*v}l==e.setup?(u.rotateMix=u.data.rotateMix+(f-u.data.rotateMix)*o,u.translateMix=u.data.translateMix+(d-u.data.translateMix)*o):(u.rotateMix+=(f-u.rotateMix)*o,u.translateMix+=(d-u.translateMix)*o)}},i.ENTRIES=3,i.PREV_TIME=-3,i.PREV_ROTATE=-2,i.PREV_TRANSLATE=-1,i.ROTATE=1,i.TRANSLATE=2,i}(i);t.PathConstraintMixTimeline=A}(a||(a={})),function(t){var e=function(){function e(e){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new a(this),this.propertyIDs=new t.IntSet,this.animationsChanged=!1,this.trackEntryPool=new t.Pool((function(){return new n})),this.data=e}return e.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,r=e.length;n0){if(a.delay-=i,a.delay>0)continue;i=-a.delay,a.delay=0}var s=a.next;if(null!=s){var o=a.trackLast-s.delay;if(o>=0){for(s.delay=0,s.trackTime+=0==a.timeScale?0:(o/a.timeScale+t)*s.timeScale,a.trackTime+=i,this.setCurrent(n,s,!0);null!=s.mixingFrom;)s.mixTime+=t,s=s.mixingFrom;continue}}else if(a.trackLast>=a.trackEnd&&null==a.mixingFrom){e[n]=null,this.queue.end(a),this.disposeNext(a);continue}if(null!=a.mixingFrom&&this.updateMixingFrom(a,t)){var l=a.mixingFrom;for(a.mixingFrom=null,null!=l&&(l.mixingTo=null);null!=l;)this.queue.end(l),l=l.mixingFrom}a.trackTime+=i}}this.queue.drain()},e.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(null==n)return!0;var r=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,null!=n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),r):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)},e.prototype.apply=function(n){if(null==n)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var r=this.events,a=this.tracks,i=!1,s=0,o=a.length;s0)){i=!0;var h=0==s?t.MixBlend.first:l.mixBlend,c=l.alpha;null!=l.mixingFrom?c*=this.applyMixingFrom(l,n,h):l.trackTime>=l.trackEnd&&null==l.next&&(c=0);var u=l.animationLast,f=l.getAnimationTime(),d=l.animation.timelines.length,p=l.animation.timelines;if(0==s&&1==c||h==t.MixBlend.add)for(var m=0;m1&&(s=1),a!=t.MixBlend.first&&(a=i.mixBlend));var o=s0&&this.queueEvents(i,u),this.events.length=0,i.nextAnimationLast=u,i.nextTrackLast=i.trackTime,s},e.prototype.applyAttachmentTimeline=function(n,r,a,i,s){var o=r.slots[n.slotIndex];if(o.bone.active){var l,h=n.frames;if(a=h[h.length-1]?h.length-1:t.Animation.binarySearch(h,a)-1,this.setAttachment(r,o,n.attachmentNames[l],s);o.attachmentState<=this.unkeyedState&&(o.attachmentState=this.unkeyedState+e.SETUP)}},e.prototype.setAttachment=function(t,n,r,a){n.setAttachment(null==r?null:t.getAttachment(n.data.index,r)),a&&(n.attachmentState=this.unkeyedState+e.CURRENT)},e.prototype.applyRotateTimeline=function(e,n,r,a,i,s,o,l){if(l&&(s[o]=0),1!=a){var h=e,c=h.frames,u=n.bones[h.boneIndex];if(u.active){var f=0,d=0;if(r=c[c.length-t.RotateTimeline.ENTRIES])d=u.data.rotation+c[c.length+t.RotateTimeline.PREV_ROTATION];else{var p=t.Animation.binarySearch(c,r,t.RotateTimeline.ENTRIES),m=c[p+t.RotateTimeline.PREV_ROTATION],v=c[p],g=h.getCurvePercent((p>>1)-1,1-(r-v)/(c[p+t.RotateTimeline.PREV_TIME]-v));d=c[p+t.RotateTimeline.ROTATION]-m,d=m+(d-=360*(16384-(16384.499999999996-d/360|0)))*g+u.data.rotation,d-=360*(16384-(16384.499999999996-d/360|0))}var y=0,E=d-f;if(0==(E-=360*(16384-(16384.499999999996-E/360|0))))y=s[o];else{var w=0,T=0;l?(w=0,T=E):(w=s[o],T=s[o+1]);var A=E>0,x=w>=0;t.MathUtils.signum(T)!=t.MathUtils.signum(E)&&Math.abs(T)<=90&&(Math.abs(w)>180&&(w+=360*t.MathUtils.signum(w)),x=A),y=E+w-w%360,x!=A&&(y+=360*t.MathUtils.signum(w)),s[o]=y}s[o+1]=E,f+=y*a,u.rotation=f-360*(16384-(16384.499999999996-f/360|0))}}else e.apply(n,0,r,null,1,i,t.MixDirection.mixIn)},e.prototype.queueEvents=function(t,e){for(var n=t.animationStart,r=t.animationEnd,a=r-n,i=t.trackLast%a,s=this.events,o=0,l=s.length;or||this.queue.event(t,h)}for((t.loop?0==a||i>t.trackTime%a:e>=r&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var n=e;;){var r=n.mixingFrom;if(null==r)break;this.queue.end(r),n.mixingFrom=null,n.mixingTo=null,n=r}this.tracks[e.trackIndex]=null,this.queue.drain()}}},e.prototype.setCurrent=function(t,e,n){var r=this.expandToIndex(t);this.tracks[t]=e,null!=r&&(n&&this.queue.interrupt(r),e.mixingFrom=r,r.mixingTo=e,e.mixTime=0,null!=r.mixingFrom&&r.mixDuration>0&&(e.interruptAlpha*=Math.min(1,r.mixTime/r.mixDuration)),r.timelinesRotation.length=0),this.queue.start(e)},e.prototype.setAnimation=function(t,e,n){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,r,n)},e.prototype.setAnimationWith=function(t,e,n){if(null==e)throw new Error("animation cannot be null.");var r=!0,a=this.expandToIndex(t);null!=a&&(-1==a.nextTrackLast?(this.tracks[t]=a.mixingFrom,this.queue.interrupt(a),this.queue.end(a),this.disposeNext(a),a=a.mixingFrom,r=!1):this.disposeNext(a));var i=this.trackEntry(t,e,n,a);return this.setCurrent(t,i,r),this.queue.drain(),i},e.prototype.addAnimation=function(t,e,n,r){var a=this.data.skeletonData.findAnimation(e);if(null==a)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,a,n,r)},e.prototype.addAnimationWith=function(t,e,n,r){if(null==e)throw new Error("animation cannot be null.");var a=this.expandToIndex(t);if(null!=a)for(;null!=a.next;)a=a.next;var i=this.trackEntry(t,e,n,a);if(null==a)this.setCurrent(t,i,!0),this.queue.drain();else if(a.next=i,r<=0){var s=a.animationEnd-a.animationStart;0!=s?(a.loop?r+=s*(1+(a.trackTime/s|0)):r+=Math.max(s,a.trackTime),r-=this.data.getMix(a.animation,e)):r=a.trackTime}return i.delay=r,i},e.prototype.setEmptyAnimation=function(t,n){var r=this.setAnimationWith(t,e.emptyAnimation,!1);return r.mixDuration=n,r.trackEnd=n,r},e.prototype.addEmptyAnimation=function(t,n,r){r<=0&&(r-=n);var a=this.addAnimationWith(t,e.emptyAnimation,!1,r);return a.mixDuration=n,a.trackEnd=n,a},e.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,r=this.tracks.length;n0){s[h]=e.HOLD_MIX,o[h]=f;continue t}break}s[h]=e.HOLD_FIRST}else s[h]=e.SUBSEQUENT}},e.prototype.getCurrent=function(t){return t>=this.tracks.length?null:this.tracks[t]},e.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},e.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)},e.prototype.clearListeners=function(){this.listeners.length=0},e.prototype.clearListenerNotifications=function(){this.queue.clear()},e.emptyAnimation=new t.Animation("",[],0),e.SUBSEQUENT=0,e.FIRST=1,e.HOLD_SUBSEQUENT=2,e.HOLD_FIRST=3,e.HOLD_MIX=4,e.SETUP=1,e.CURRENT=2,e}();t.AnimationState=e;var n=function(){function e(){this.mixBlend=t.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return e.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},e.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},e.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},e.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},e.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},e}();t.TrackEntry=n;var r,a=function(){function t(t){this.objects=[],this.drainDisabled=!1,this.animState=t}return t.prototype.start=function(t){this.objects.push(r.start),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.interrupt=function(t){this.objects.push(r.interrupt),this.objects.push(t)},t.prototype.end=function(t){this.objects.push(r.end),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.dispose=function(t){this.objects.push(r.dispose),this.objects.push(t)},t.prototype.complete=function(t){this.objects.push(r.complete),this.objects.push(t)},t.prototype.event=function(t,e){this.objects.push(r.event),this.objects.push(t),this.objects.push(e)},t.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,n=0;n=0?e.substring(0,e.lastIndexOf("/")):"";e=this.pathPrefix+e,this.toLoad++,this.downloadText(e,(function(s){var o={count:0},l=new Array;try{new t.TextureAtlas(s,(function(e){l.push(""==i?e:i+"/"+e);var n=document.createElement("img");return n.width=16,n.height=16,new t.FakeTexture(n)}))}catch(t){var h=t;return a.errors[e]="Couldn't load texture atlas "+e+": "+h.message,r&&r(e,"Couldn't load texture atlas "+e+": "+h.message),a.toLoad--,void a.loaded++}for(var c=function(h){var c=!1;a.loadTexture(h,(function(h,u){if(o.count++,o.count==l.length)if(c)a.errors[e]="Couldn't load texture atlas page "+h+"} of atlas "+e,r&&r(e,"Couldn't load texture atlas page "+h+" of atlas "+e),a.toLoad--,a.loaded++;else try{var f=new t.TextureAtlas(s,(function(t){return a.get(""==i?t:i+"/"+t)}));a.assets[e]=f,n&&n(e,f),a.toLoad--,a.loaded++}catch(t){var d=t;a.errors[e]="Couldn't load texture atlas "+e+": "+d.message,r&&r(e,"Couldn't load texture atlas "+e+": "+d.message),a.toLoad--,a.loaded++}}),(function(t,n){c=!0,o.count++,o.count==l.length&&(a.errors[e]="Couldn't load texture atlas page "+t+"} of atlas "+e,r&&r(e,"Couldn't load texture atlas page "+t+" of atlas "+e),a.toLoad--,a.loaded++)}))},u=0,f=l;u0},e.prototype.getErrors=function(){return this.errors},e}();t.AssetManager=e}(a||(a={})),function(t){var e=function(){function e(t){this.atlas=t}return e.prototype.newRegionAttachment=function(e,n,r){var a=this.atlas.findRegion(r);if(null==a)throw new Error("Region not found in atlas: "+r+" (region attachment: "+n+")");a.renderObject=a;var i=new t.RegionAttachment(n);return i.setRegion(a),i},e.prototype.newMeshAttachment=function(e,n,r){var a=this.atlas.findRegion(r);if(null==a)throw new Error("Region not found in atlas: "+r+" (mesh attachment: "+n+")");a.renderObject=a;var i=new t.MeshAttachment(n);return i.region=a,i},e.prototype.newBoundingBoxAttachment=function(e,n){return new t.BoundingBoxAttachment(n)},e.prototype.newPathAttachment=function(e,n){return new t.PathAttachment(n)},e.prototype.newPointAttachment=function(e,n){return new t.PointAttachment(n)},e.prototype.newClippingAttachment=function(e,n){return new t.ClippingAttachment(n)},e}();t.AtlasAttachmentLoader=e}(a||(a={})),function(t){var e;(e=t.BlendMode||(t.BlendMode={}))[e.Normal=0]="Normal",e[e.Additive=1]="Additive",e[e.Multiply=2]="Multiply",e[e.Screen=3]="Screen"}(a||(a={})),function(t){var e=function(){function e(t,e,n){if(this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.appliedValid=!1,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=n,this.setToSetupPose()}return e.prototype.isActive=function(){return this.active},e.prototype.update=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransformWith=function(e,n,r,a,i,s,o){this.ax=e,this.ay=n,this.arotation=r,this.ascaleX=a,this.ascaleY=i,this.ashearX=s,this.ashearY=o,this.appliedValid=!0;var l=this.parent;if(null==l){var h=this.skeleton,c=r+90+o,u=h.scaleX,f=h.scaleY;return this.a=t.MathUtils.cosDeg(r+s)*a*u,this.b=t.MathUtils.cosDeg(c)*i*u,this.c=t.MathUtils.sinDeg(r+s)*a*f,this.d=t.MathUtils.sinDeg(c)*i*f,this.worldX=e*u+h.x,void(this.worldY=n*f+h.y)}var d=l.a,p=l.b,m=l.c,v=l.d;switch(this.worldX=d*e+p*n+l.worldX,this.worldY=m*e+v*n+l.worldY,this.data.transformMode){case t.TransformMode.Normal:c=r+90+o;var g=t.MathUtils.cosDeg(r+s)*a,y=t.MathUtils.cosDeg(c)*i,E=t.MathUtils.sinDeg(r+s)*a,w=t.MathUtils.sinDeg(c)*i;return this.a=d*g+p*E,this.b=d*y+p*w,this.c=m*g+v*E,void(this.d=m*y+v*w);case t.TransformMode.OnlyTranslation:c=r+90+o;this.a=t.MathUtils.cosDeg(r+s)*a,this.b=t.MathUtils.cosDeg(c)*i,this.c=t.MathUtils.sinDeg(r+s)*a,this.d=t.MathUtils.sinDeg(c)*i;break;case t.TransformMode.NoRotationOrReflection:var T=0;(M=d*d+m*m)>1e-4?(M=Math.abs(d*v-p*m)/M,d/=this.skeleton.scaleX,p=(m/=this.skeleton.scaleY)*M,v=d*M,T=Math.atan2(m,d)*t.MathUtils.radDeg):(d=0,m=0,T=90-Math.atan2(v,p)*t.MathUtils.radDeg);var A=r+s-T,x=r+o-T+90;g=t.MathUtils.cosDeg(A)*a,y=t.MathUtils.cosDeg(x)*i,E=t.MathUtils.sinDeg(A)*a,w=t.MathUtils.sinDeg(x)*i;this.a=d*g-p*E,this.b=d*y-p*w,this.c=m*g+v*E,this.d=m*y+v*w;break;case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:var M,I=t.MathUtils.cosDeg(r),R=t.MathUtils.sinDeg(r),b=(d*I+p*R)/this.skeleton.scaleX,S=(m*I+v*R)/this.skeleton.scaleY;(M=Math.sqrt(b*b+S*S))>1e-5&&(M=1/M),b*=M,S*=M,M=Math.sqrt(b*b+S*S),this.data.transformMode==t.TransformMode.NoScale&&d*v-p*m<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(M=-M);var C=Math.PI/2+Math.atan2(S,b),P=Math.cos(C)*M,k=Math.sin(C)*M;g=t.MathUtils.cosDeg(s)*a,y=t.MathUtils.cosDeg(90+o)*i,E=t.MathUtils.sinDeg(s)*a,w=t.MathUtils.sinDeg(90+o)*i;this.a=b*g+P*E,this.b=b*y+P*w,this.c=S*g+k*E,this.d=S*y+k*w}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY},e.prototype.setToSetupPose=function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY},e.prototype.getWorldRotationX=function(){return Math.atan2(this.c,this.a)*t.MathUtils.radDeg},e.prototype.getWorldRotationY=function(){return Math.atan2(this.d,this.b)*t.MathUtils.radDeg},e.prototype.getWorldScaleX=function(){return Math.sqrt(this.a*this.a+this.c*this.c)},e.prototype.getWorldScaleY=function(){return Math.sqrt(this.b*this.b+this.d*this.d)},e.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var e=this.parent;if(null==e)return this.ax=this.worldX,this.ay=this.worldY,this.arotation=Math.atan2(this.c,this.a)*t.MathUtils.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*t.MathUtils.radDeg);var n=e.a,r=e.b,a=e.c,i=e.d,s=1/(n*i-r*a),o=this.worldX-e.worldX,l=this.worldY-e.worldY;this.ax=o*i*s-l*r*s,this.ay=l*n*s-o*a*s;var h=s*i,c=s*n,u=s*r,f=s*a,d=h*this.a-u*this.c,p=h*this.b-u*this.d,m=c*this.c-f*this.a,v=c*this.d-f*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(d*d+m*m),this.ascaleX>1e-4){var g=d*v-p*m;this.ascaleY=g/this.ascaleX,this.ashearY=Math.atan2(d*p+m*v,g)*t.MathUtils.radDeg,this.arotation=Math.atan2(m,d)*t.MathUtils.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+v*v),this.ashearY=0,this.arotation=90-Math.atan2(v,p)*t.MathUtils.radDeg},e.prototype.worldToLocal=function(t){var e=this.a,n=this.b,r=this.c,a=this.d,i=1/(e*a-n*r),s=t.x-this.worldX,o=t.y-this.worldY;return t.x=s*a*i-o*n*i,t.y=o*e*i-s*r*i,t},e.prototype.localToWorld=function(t){var e=t.x,n=t.y;return t.x=e*this.a+n*this.b+this.worldX,t.y=e*this.c+n*this.d+this.worldY,t},e.prototype.worldToLocalRotation=function(e){var n=t.MathUtils.sinDeg(e),r=t.MathUtils.cosDeg(e);return Math.atan2(this.a*n-this.c*r,this.d*r-this.b*n)*t.MathUtils.radDeg+this.rotation-this.shearX},e.prototype.localToWorldRotation=function(e){e-=this.rotation-this.shearX;var n=t.MathUtils.sinDeg(e),r=t.MathUtils.cosDeg(e);return Math.atan2(r*this.c+n*this.d,r*this.a+n*this.b)*t.MathUtils.radDeg},e.prototype.rotateWorld=function(e){var n=this.a,r=this.b,a=this.c,i=this.d,s=t.MathUtils.cosDeg(e),o=t.MathUtils.sinDeg(e);this.a=s*n-o*a,this.b=s*r-o*i,this.c=o*n+s*a,this.d=o*r+s*i,this.appliedValid=!1},e}();t.Bone=e}(a||(a={})),function(t){var e,n=function(n,r,a){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=e.Normal,this.skinRequired=!1,this.color=new t.Color,n<0)throw new Error("index must be >= 0.");if(null==r)throw new Error("name cannot be null.");this.index=n,this.name=r,this.parent=a};t.BoneData=n,function(t){t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection"}(e=t.TransformMode||(t.TransformMode={}))}(a||(a={})),function(t){var e=function(t,e,n){this.name=t,this.order=e,this.skinRequired=n};t.ConstraintData=e}(a||(a={})),function(t){var e=function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e};t.Event=e}(a||(a={})),function(t){var e=function(t){this.name=t};t.EventData=e}(a||(a={})),function(t){var e=function(){function e(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var n=0;n180?d-=360:d<-180&&(d+=360);var A=e.ascaleX,x=e.ascaleY;if(a||i){switch(e.data.transformMode){case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:p=n-e.worldX,m=r-e.worldY}var M=e.data.length*A,I=Math.sqrt(p*p+m*m);if(a&&IM&&M>1e-4)A*=v=(I/M-1)*o+1,s&&(x*=v)}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+d*o,A,x,e.ashearX,e.ashearY)},e.prototype.apply2=function(e,n,r,a,i,s,o,l){if(0!=l){e.appliedValid||e.updateAppliedTransform(),n.appliedValid||n.updateAppliedTransform();var h=e.ax,c=e.ay,u=e.ascaleX,f=u,d=e.ascaleY,p=n.ascaleX,m=0,v=0,g=0;u<0?(u=-u,m=180,g=-1):(m=0,g=1),d<0&&(d=-d,g=-g),p<0?(p=-p,v=180):v=0;var y=n.ax,E=0,w=0,T=0,A=e.a,x=e.b,M=e.c,I=e.d,R=Math.abs(u-d)<=1e-4;R?(w=A*y+x*(E=n.ay)+e.worldX,T=M*y+I*E+e.worldY):(E=0,w=A*y+e.worldX,T=M*y+e.worldY);var b=e.parent;A=b.a,x=b.b,M=b.c;var S,C,P=1/(A*(I=b.d)-x*M),k=w-b.worldX,N=T-b.worldY,_=(k*I-N*x)*P-h,V=(N*A-k*M)*P-c,O=Math.sqrt(_*_+V*V),L=n.data.length*p;if(O<1e-4)return this.apply1(e,r,a,!1,s,!1,l),void n.updateWorldTransformWith(y,E,0,n.ascaleX,n.ascaleY,n.ashearX,n.ashearY);var F=((k=r-b.worldX)*I-(N=a-b.worldY)*x)*P-h,D=(N*A-k*M)*P-c,U=F*F+D*D;if(0!=o){o*=u*(p+1)/2;var B=Math.sqrt(U),X=B-O-L*u+o;if(X>0){var Y=Math.min(1,X/(2*o))-1;U=(F-=(Y=(X-o*(1-Y*Y))/B)*F)*F+(D-=Y*D)*D}}t:if(R){var W=(U-O*O-(L*=u)*L)/(2*O*L);W<-1?W=-1:W>1&&(W=1,s&&(f*=(Math.sqrt(U)/(O+L)-1)*l+1)),C=Math.acos(W)*i,A=O+L*W,x=L*Math.sin(C),S=Math.atan2(D*A-F*x,F*A+D*x)}else{var j=(A=u*L)*A,q=(x=d*L)*x,G=Math.atan2(D,F),H=-2*q*O,z=q-j;if((I=H*H-4*z*(M=q*O*O+j*U-j*q))>=0){var Z=Math.sqrt(I);H<0&&(Z=-Z);var $=(Z=-(H+Z)/2)/z,Q=M/Z,J=Math.abs($)=-1&&M<=1&&(M=Math.acos(M),(I=(k=A*Math.cos(M)+O)*k+(N=x*Math.sin(M))*N)it&&(rt=M,it=I,at=k,st=N)),U<=(et+it)/2?(S=G-Math.atan2(nt*i,tt),C=K*i):(S=G-Math.atan2(st*i,at),C=rt*i)}var ot=Math.atan2(E,y)*g,lt=e.arotation;(S=(S-ot)*t.MathUtils.radDeg+m-lt)>180?S-=360:S<-180&&(S+=360),e.updateWorldTransformWith(h,c,lt+S*l,f,e.ascaleY,0,0),lt=n.arotation,(C=((C+ot)*t.MathUtils.radDeg-n.ashearX)*g+v-lt)>180?C-=360:C<-180&&(C+=360),n.updateWorldTransformWith(y,E,lt+C*l,n.ascaleX,n.ascaleY,n.ashearX,n.ashearY)}else n.updateWorldTransform()},e}();t.IkConstraint=e}(a||(a={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,0,!1)||this;return n.bones=new Array,n.bendDirection=1,n.compress=!1,n.stretch=!1,n.uniform=!1,n.mix=1,n.softness=0,n}return s(e,t),e}(t.ConstraintData);t.IkConstraintData=e}(a||(a={})),function(t){var e=function(){function e(t,e){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(var n=0,r=t.bones.length;n0;if(a>0||i){var s=this.data,o=s.spacingMode==t.SpacingMode.Percent,l=s.rotateMode,h=l==t.RotateMode.Tangent,c=l==t.RotateMode.ChainScale,u=this.bones.length,f=h?u:u+1,d=this.bones,p=t.Utils.setArraySize(this.spaces,f),m=null,v=this.spacing;if(c||!o){c&&(m=t.Utils.setArraySize(this.lengths,u));for(var g=s.spacingMode==t.SpacingMode.Length,y=0,E=f-1;y0?t.MathUtils.degRad:-t.MathUtils.degRad;y=0;for(var P=3;yt.MathUtils.PI?B-=t.MathUtils.PI2:B<-t.MathUtils.PI&&(B+=t.MathUtils.PI2),B*=r,X=Math.cos(B),Y=Math.sin(B),k.a=X*L-Y*D,k.b=X*F-Y*U,k.c=Y*L+X*D,k.d=Y*F+X*U}k.appliedValid=!1}}}},e.prototype.computeWorldPositions=function(n,r,a,i,s){var o=this.target,l=this.position,h=this.spaces,c=t.Utils.setArraySize(this.positions,3*r+2),u=null,f=n.closed,d=n.worldVerticesLength,p=d/6,m=e.NONE;if(!n.constantSpeed){var v=n.lengths,g=v[p-=f?1:2];if(i&&(l*=g),s)for(var y=1;yg){m!=e.AFTER&&(m=e.AFTER,n.computeWorldVertices(o,d-6,4,u,0,2)),this.addAfterPosition(T-g,u,0,c,E);continue}}for(;;w++){var A=v[w];if(!(T>A)){if(0==w)T/=A;else T=(T-(Z=v[w-1]))/(A-Z);break}}w!=m&&(m=w,f&&w==p?(n.computeWorldVertices(o,d-4,4,u,0,2),n.computeWorldVertices(o,0,4,u,4,2)):n.computeWorldVertices(o,6*w+2,8,u,0,2)),this.addCurvePosition(T,u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],c,E,a||y>0&&0==q)}return c}f?(d+=2,u=t.Utils.setArraySize(this.world,d),n.computeWorldVertices(o,2,d-4,u,0,2),n.computeWorldVertices(o,0,2,u,d-4,2),u[d-2]=u[0],u[d-1]=u[1]):(p--,d-=4,u=t.Utils.setArraySize(this.world,d),n.computeWorldVertices(o,2,d,u,0,2));for(var x=t.Utils.setArraySize(this.curves,p),M=0,I=u[0],R=u[1],b=0,S=0,C=0,P=0,k=0,N=0,_=0,V=0,O=0,L=0,F=0,D=0,U=0,B=0,X=(y=0,2);yM){this.addAfterPosition(T-M,u,d-4,c,E);continue}}for(;;w++){var G=x[w];if(!(T>G)){if(0==w)T/=G;else T=(T-(Z=x[w-1]))/(G-Z);break}}if(w!=m){m=w;var H=6*w;for(I=u[H],R=u[H+1],b=u[H+2],S=u[H+3],C=u[H+4],P=u[H+5],F=2*(_=.03*(I-2*b+C))+(O=.006*(3*(b-C)-I+(k=u[H+6]))),D=2*(V=.03*(R-2*S+P))+(L=.006*(3*(S-P)-R+(N=u[H+7]))),U=.3*(b-I)+_+.16666667*O,B=.3*(S-R)+V+.16666667*L,W=Math.sqrt(U*U+B*B),Y[0]=W,H=1;H<8;H++)U+=F,B+=D,F+=O,D+=L,W+=Math.sqrt(U*U+B*B),Y[H]=W;U+=F,B+=D,W+=Math.sqrt(U*U+B*B),Y[8]=W,U+=F+O,B+=D+L,W+=Math.sqrt(U*U+B*B),Y[9]=W,j=0}for(T*=W;;j++){var z=Y[j];if(!(T>z)){var Z;if(0==j)T/=z;else T=j+(T-(Z=Y[j-1]))/(z-Z);break}}this.addCurvePosition(.1*T,I,R,b,S,C,P,k,N,c,E,a||y>0&&0==q)}return c},e.prototype.addBeforePosition=function(t,e,n,r,a){var i=e[n],s=e[n+1],o=e[n+2]-i,l=e[n+3]-s,h=Math.atan2(l,o);r[a]=i+t*Math.cos(h),r[a+1]=s+t*Math.sin(h),r[a+2]=h},e.prototype.addAfterPosition=function(t,e,n,r,a){var i=e[n+2],s=e[n+3],o=i-e[n],l=s-e[n+1],h=Math.atan2(l,o);r[a]=i+t*Math.cos(h),r[a+1]=s+t*Math.sin(h),r[a+2]=h},e.prototype.addCurvePosition=function(t,e,n,r,a,i,s,o,l,h,c,u){if(0==t||isNaN(t))return h[c]=e,h[c+1]=n,void(h[c+2]=Math.atan2(a-n,r-e));var f=t*t,d=f*t,p=1-t,m=p*p,v=m*p,g=p*t,y=3*g,E=p*y,w=y*t,T=e*v+r*E+i*w+o*d,A=n*v+a*E+s*w+l*d;h[c]=T,h[c+1]=A,u&&(h[c+2]=t<.001?Math.atan2(a-n,r-e):Math.atan2(A-(n*m+a*g*2+s*f),T-(e*m+r*g*2+i*f)))},e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e.epsilon=1e-5,e}();t.PathConstraint=e}(a||(a={})),function(t){var e,n,r,a=function(t){function e(e){var n=t.call(this,e,0,!1)||this;return n.bones=new Array,n}return s(e,t),e}(t.ConstraintData);t.PathConstraintData=a,(e=t.PositionMode||(t.PositionMode={}))[e.Fixed=0]="Fixed",e[e.Percent=1]="Percent",(n=t.SpacingMode||(t.SpacingMode={}))[n.Length=0]="Length",n[n.Fixed=1]="Fixed",n[n.Percent=2]="Percent",(r=t.RotateMode||(t.RotateMode={}))[r.Tangent=0]="Tangent",r[r.Chain=1]="Chain",r[r.ChainScale=2]="ChainScale"}(a||(a={})),function(t){var e=function(){function t(t){this.toLoad=new Array,this.assets={},this.clientId=t}return t.prototype.loaded=function(){var t=0;for(var e in this.assets)t++;return t},t}(),n=function(){function t(t){void 0===t&&(t=""),this.clientAssets={},this.queuedAssets={},this.rawAssets={},this.errors={},this.pathPrefix=t}return t.prototype.queueAsset=function(t,n,r){var a=this.clientAssets[t];return null==a&&(a=new e(t),this.clientAssets[t]=a),null!==n&&(a.textureLoader=n),a.toLoad.push(r),this.queuedAssets[r]!==r&&(this.queuedAssets[r]=r,!0)},t.prototype.loadText=function(t,e){var n=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var r=new XMLHttpRequest;r.overrideMimeType("text/html"),r.onreadystatechange=function(){r.readyState==XMLHttpRequest.DONE&&(r.status>=200&&r.status<300?n.rawAssets[e]=r.responseText:n.errors[e]="Couldn't load text "+e+": status "+r.status+", "+r.responseText)},r.open("GET",e,!0),r.send()}},t.prototype.loadJson=function(t,e){var n=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var r=new XMLHttpRequest;r.overrideMimeType("text/html"),r.onreadystatechange=function(){r.readyState==XMLHttpRequest.DONE&&(r.status>=200&&r.status<300?n.rawAssets[e]=JSON.parse(r.responseText):n.errors[e]="Couldn't load text "+e+": status "+r.status+", "+r.responseText)},r.open("GET",e,!0),r.send()}},t.prototype.loadTexture=function(t,e,n){var r=this;if(n=this.pathPrefix+n,this.queueAsset(t,e,n))if(!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document)&&"undefined"!=typeof importScripts){fetch(n,{mode:"cors"}).then((function(t){return t.ok||(r.errors[n]="Couldn't load image "+n),t.blob()})).then((function(t){return createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"})})).then((function(t){r.rawAssets[n]=t}))}else{var a=new Image;a.crossOrigin="anonymous",a.onload=function(t){r.rawAssets[n]=a},a.onerror=function(t){r.errors[n]="Couldn't load image "+n},a.src=n}},t.prototype.get=function(t,e){e=this.pathPrefix+e;var n=this.clientAssets[t];return null==n||n.assets[e]},t.prototype.updateClientAssets=function(t){for(var e=!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document)&&"undefined"!=typeof importScripts,n=0;n0},t.prototype.getErrors=function(){return this.errors},t}();t.SharedAssetManager=n}(a||(a={})),function(t){var e=function(){function e(e){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,null==e)throw new Error("data cannot be null.");this.data=e,this.bones=new Array;for(var n=0;n1){var i=r[r.length-1];this._updateCache.indexOf(i)>-1||this.updateCacheReset.push(i)}this._updateCache.push(e),this.sortReset(a.children),r[r.length-1].sorted=!0}},e.prototype.sortPathConstraint=function(e){if(e.active=e.target.bone.isActive()&&(!e.data.skinRequired||null!=this.skin&&t.Utils.contains(this.skin.constraints,e.data,!0)),e.active){var n=e.target,r=n.data.index,a=n.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,r,a),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,r,a);for(var i=0,s=this.data.skins.length;i-1||this.updateCacheReset.push(i)}else for(a=0;a0){w=new t.DrawOrderTimeline(L);var F=a.slots.length;for(c=0;c=0;d--)U[d]=-1;var B=t.Utils.newArray(F-D,0),X=0,Y=0;for(d=0;d=0;d--)-1==U[d]&&(U[d]=B[--Y]);w.setFrame(c,y,U)}i.push(w),o=Math.max(o,w.frames[L-1])}var W=n.readInt(!0);if(W>0){for(w=new t.EventTimeline(W),c=0;c>>1^-(1&n)},t.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},t.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n>4){case 12:case 13:e+=String.fromCharCode((31&r)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&r)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(r),n++}}return e},t.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},t.prototype.readBoolean=function(){return 0!=this.readByte()},t}(),r=function(t,e,n,r,a){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=r,this.inheritDeform=a},a=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(a||(a={})),function(t){var e=function(){function e(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new t.Pool((function(){return t.Utils.newFloatArray(16)}))}return e.prototype.update=function(e,n){if(null==e)throw new Error("skeleton cannot be null.");var r=this.boundingBoxes,a=this.polygons,i=this.polygonPool,s=e.slots,o=s.length;r.length=0,i.freeAll(a),a.length=0;for(var l=0;l=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},e.prototype.aabbIntersectsSegment=function(t,e,n,r){var a=this.minX,i=this.minY,s=this.maxX,o=this.maxY;if(t<=a&&n<=a||e<=i&&r<=i||t>=s&&n>=s||e>=o&&r>=o)return!1;var l=(r-e)/(n-t),h=l*(a-t)+e;if(h>i&&hi&&ha&&ca&&ct.minX&&this.minYt.minY},e.prototype.containsPoint=function(t,e){for(var n=this.polygons,r=0,a=n.length;r=n||h=n){var c=r[o];c+(n-l)/(h-l)*(r[i]-c)=c&&E<=d||E>=d&&E<=c)&&(E>=e&&E<=r||E>=r&&E<=e)){var w=(h*g-l*m)/y;if((w>=u&&w<=p||w>=p&&w<=u)&&(w>=n&&w<=a||w>=a&&w<=n))return!0}c=d,u=p}return!1},e.prototype.getPolygon=function(t){if(null==t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},e.prototype.getWidth=function(){return this.maxX-this.minX},e.prototype.getHeight=function(){return this.maxY-this.minY},e}();t.SkeletonBounds=e}(a||(a={})),function(t){var e=function(){function e(){this.triangulator=new t.Triangulator,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array}return e.prototype.clipStart=function(n,r){if(null!=this.clipAttachment)return 0;this.clipAttachment=r;var a=r.worldVerticesLength,i=t.Utils.setArraySize(this.clippingPolygon,a);r.computeWorldVertices(n,0,a,i,0,2);var s=this.clippingPolygon;e.makeClockwise(s);for(var o=this.clippingPolygons=this.triangulator.decompose(s,this.triangulator.triangulate(s)),l=0,h=o.length;l>1,U=this.clipOutput,B=t.Utils.setArraySize(c,k+D*p),X=0;X=2?(c=o,o=this.scratch):c=this.scratch,c.length=0,c.push(t),c.push(e),c.push(n),c.push(r),c.push(a),c.push(i),c.push(t),c.push(e),o.length=0;for(var u=s,f=s.length-4,d=0;;d+=2){for(var p=u[d],m=u[d+1],v=u[d+2],g=u[d+3],y=p-v,E=m-g,w=c,T=c.length-2,A=o.length,x=0;x0;if(y*(I-g)-E*(M-v)>0){if(S){o.push(R),o.push(b);continue}var C=(k=b-I)*(v-p)-(N=R-M)*(g-m);if(Math.abs(C)>1e-6){var P=(N*(m-I)-k*(p-M))/C;o.push(p+(v-p)*P),o.push(m+(g-m)*P)}else o.push(p),o.push(m)}else if(S){var k,N;C=(k=b-I)*(v-p)-(N=R-M)*(g-m);if(Math.abs(C)>1e-6){P=(N*(m-I)-k*(p-M))/C;o.push(p+(v-p)*P),o.push(m+(g-m)*P)}else o.push(p),o.push(m);o.push(R),o.push(b)}h=!0}if(A==o.length)return l.length=0,!0;if(o.push(o[0]),o.push(o[1]),d==f)break;var _=o;(o=c).length=0,c=_}if(l!=o){l.length=0;d=0;for(var V=o.length-2;d>1;o=0;f--)-1==q[f]&&(q[f]=H[--Z])}w.setFrame(u++,this.getValue(j,"time",0),q)}i.push(w),s=Math.max(s,w.frames[w.getFrameCount()-1])}if(e.events){for(w=new t.EventTimeline(e.events.length),u=0,f=0;f=r.length&&(r.length=t+1),r[t]||(r[t]={}),r[t][e]=n},n.prototype.addSkin=function(t){for(var e=0;e= 0.");if(null==n)throw new Error("name cannot be null.");if(null==r)throw new Error("boneData cannot be null.");this.index=e,this.name=n,this.boneData=r};t.SlotData=e}(a||(a={})),function(t){var e,n,r=function(){function t(t){this._image=t}return t.prototype.getImage=function(){return this._image},t.filterFromString=function(t){switch(t.toLowerCase()){case"nearest":return e.Nearest;case"linear":return e.Linear;case"mipmap":return e.MipMap;case"mipmapnearestnearest":return e.MipMapNearestNearest;case"mipmaplinearnearest":return e.MipMapLinearNearest;case"mipmapnearestlinear":return e.MipMapNearestLinear;case"mipmaplinearlinear":return e.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}},t.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return n.MirroredRepeat;case"clamptoedge":return n.ClampToEdge;case"repeat":return n.Repeat;default:throw new Error("Unknown texture wrap "+t)}},t}();t.Texture=r,function(t){t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear"}(e=t.TextureFilter||(t.TextureFilter={})),function(t){t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat"}(n=t.TextureWrap||(t.TextureWrap={}));var a=function(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.rotate=!1,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0};t.TextureRegion=a;var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.setFilters=function(t,e){},e.prototype.setWraps=function(t,e){},e.prototype.dispose=function(){},e}(r);t.FakeTexture=i}(a||(a={})),function(t){var e=function(){function e(t,e){this.pages=new Array,this.regions=new Array,this.load(t,e)}return e.prototype.load=function(e,i){if(null==i)throw new Error("textureLoader cannot be null.");for(var s=new n(e),o=new Array(4),l=null;;){var h=s.readLine();if(null==h)break;if(0==(h=h.trim()).length)l=null;else if(l){var c=new a;c.name=h,c.page=l;var u=s.readValue();"true"==u.toLocaleLowerCase()?c.degrees=90:"false"==u.toLocaleLowerCase()?c.degrees=0:c.degrees=parseFloat(u),c.rotate=90==c.degrees,s.readTuple(o);var f=parseInt(o[0]),d=parseInt(o[1]);s.readTuple(o);var p=parseInt(o[0]),m=parseInt(o[1]);c.u=f/l.width,c.v=d/l.height,c.rotate?(c.u2=(f+m)/l.width,c.v2=(d+p)/l.height):(c.u2=(f+p)/l.width,c.v2=(d+m)/l.height),c.x=f,c.y=d,c.width=Math.abs(p),c.height=Math.abs(m),4==s.readTuple(o)&&4==s.readTuple(o)&&s.readTuple(o),c.originalWidth=parseInt(o[0]),c.originalHeight=parseInt(o[1]),s.readTuple(o),c.offsetX=parseInt(o[0]),c.offsetY=parseInt(o[1]),c.index=parseInt(s.readValue()),c.texture=l.texture,this.regions.push(c)}else{(l=new r).name=h,2==s.readTuple(o)&&(l.width=parseInt(o[0]),l.height=parseInt(o[1]),s.readTuple(o)),s.readTuple(o),l.minFilter=t.Texture.filterFromString(o[0]),l.magFilter=t.Texture.filterFromString(o[1]);var v=s.readValue();l.uWrap=t.TextureWrap.ClampToEdge,l.vWrap=t.TextureWrap.ClampToEdge,"x"==v?l.uWrap=t.TextureWrap.Repeat:"y"==v?l.vWrap=t.TextureWrap.Repeat:"xy"==v&&(l.uWrap=l.vWrap=t.TextureWrap.Repeat),l.texture=i(h),l.texture.setFilters(l.minFilter,l.magFilter),l.texture.setWraps(l.uWrap,l.vWrap),l.width=l.texture.getImage().width,l.height=l.texture.getImage().height,this.pages.push(l)}}},e.prototype.findRegion=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},t.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},t.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw new Error("Invalid line: "+e);for(var r=0,a=n+1;r<3;r++){var i=e.indexOf(",",a);if(-1==i)break;t[r]=e.substr(a,i-a).trim(),a=i+1}return t[r]=e.substring(a).trim(),r+1},t}(),r=function(){};t.TextureAtlasPage=r;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e}(t.TextureRegion);t.TextureAtlasRegion=a}(a||(a={})),function(t){var e=function(){function e(e,n){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new t.Vector2,this.active=!1,null==e)throw new Error("data cannot be null.");if(null==n)throw new Error("skeleton cannot be null.");this.data=e,this.rotateMix=e.rotateMix,this.translateMix=e.translateMix,this.scaleMix=e.scaleMix,this.shearMix=e.shearMix,this.bones=new Array;for(var r=0;r0?t.MathUtils.degRad:-t.MathUtils.degRad,u=this.data.offsetRotation*c,f=this.data.offsetShearY*c,d=this.bones,p=0,m=d.length;pt.MathUtils.PI?b-=t.MathUtils.PI2:b<-t.MathUtils.PI&&(b+=t.MathUtils.PI2),b*=e;var A=Math.cos(b),x=Math.sin(b);v.a=A*y-x*w,v.b=A*E-x*T,v.c=x*y+A*w,v.d=x*E+A*T,g=!0}if(0!=n){var M=this.temp;i.localToWorld(M.set(this.data.offsetX,this.data.offsetY)),v.worldX+=(M.x-v.worldX)*n,v.worldY+=(M.y-v.worldY)*n,g=!0}if(r>0){var I=Math.sqrt(v.a*v.a+v.c*v.c),R=Math.sqrt(s*s+l*l);I>1e-5&&(I=(I+(R-I+this.data.offsetScaleX)*r)/I),v.a*=I,v.c*=I,I=Math.sqrt(v.b*v.b+v.d*v.d),R=Math.sqrt(o*o+h*h),I>1e-5&&(I=(I+(R-I+this.data.offsetScaleY)*r)/I),v.b*=I,v.d*=I,g=!0}if(a>0){E=v.b,T=v.d;var b,S=Math.atan2(T,E);(b=Math.atan2(h,o)-Math.atan2(l,s)-(S-Math.atan2(v.c,v.a)))>t.MathUtils.PI?b-=t.MathUtils.PI2:b<-t.MathUtils.PI&&(b+=t.MathUtils.PI2),b=S+(b+f)*a;I=Math.sqrt(E*E+T*T);v.b=Math.cos(b)*I,v.d=Math.sin(b)*I,g=!0}g&&(v.appliedValid=!1)}},e.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,n=this.translateMix,r=this.scaleMix,a=this.shearMix,i=this.target,s=i.a,o=i.b,l=i.c,h=i.d,c=s*h-o*l>0?t.MathUtils.degRad:-t.MathUtils.degRad,u=this.data.offsetRotation*c,f=this.data.offsetShearY*c,d=this.bones,p=0,m=d.length;pt.MathUtils.PI?R-=t.MathUtils.PI2:R<-t.MathUtils.PI&&(R+=t.MathUtils.PI2),R*=e;var A=Math.cos(R),x=Math.sin(R);v.a=A*y-x*w,v.b=A*E-x*T,v.c=x*y+A*w,v.d=x*E+A*T,g=!0}if(0!=n){var M=this.temp;i.localToWorld(M.set(this.data.offsetX,this.data.offsetY)),v.worldX+=M.x*n,v.worldY+=M.y*n,g=!0}if(r>0){var I=(Math.sqrt(s*s+l*l)-1+this.data.offsetScaleX)*r+1;v.a*=I,v.c*=I,I=(Math.sqrt(o*o+h*h)-1+this.data.offsetScaleY)*r+1,v.b*=I,v.d*=I,g=!0}if(a>0){var R;(R=Math.atan2(h,o)-Math.atan2(l,s))>t.MathUtils.PI?R-=t.MathUtils.PI2:R<-t.MathUtils.PI&&(R+=t.MathUtils.PI2);E=v.b,T=v.d;R=Math.atan2(T,E)+(R-t.MathUtils.PI/2+f)*a;I=Math.sqrt(E*E+T*T);v.b=Math.cos(R)*I,v.d=Math.sin(R)*I,g=!0}g&&(v.appliedValid=!1)}},e.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,r=this.shearMix,a=this.target;a.appliedValid||a.updateAppliedTransform();for(var i=this.bones,s=0,o=i.length;s1e-5&&(d=(d+(a.ascaleX-d+this.data.offsetScaleX)*n)/d),p>1e-5&&(p=(p+(a.ascaleY-p+this.data.offsetScaleY)*n)/p));var m=l.ashearY;if(0!=r){c=a.ashearY-m+this.data.offsetShearY;c-=360*(16384-(16384.499999999996-c/360|0)),l.shearY+=c*r}l.updateWorldTransformWith(u,f,h,d,p,l.ashearX,m)}},e.prototype.applyRelativeLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,r=this.shearMix,a=this.target;a.appliedValid||a.updateAppliedTransform();for(var i=this.bones,s=0,o=i.length;s1e-5&&(f*=(a.ascaleX-1+this.data.offsetScaleX)*n+1),d>1e-5&&(d*=(a.ascaleY-1+this.data.offsetScaleY)*n+1));var p=l.ashearY;0!=r&&(p+=(a.ashearY+this.data.offsetShearY)*r),l.updateWorldTransformWith(c,u,h,f,d,l.ashearX,p)}},e}();t.TransformConstraint=e}(a||(a={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,0,!1)||this;return n.bones=new Array,n.rotateMix=0,n.translateMix=0,n.scaleMix=0,n.shearMix=0,n.offsetRotation=0,n.offsetX=0,n.offsetY=0,n.offsetScaleX=0,n.offsetScaleY=0,n.offsetShearY=0,n.relative=!1,n.local=!1,n}return s(e,t),e}(t.ConstraintData);t.TransformConstraintData=e}(a||(a={})),function(t){var e=function(){function e(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new t.Pool((function(){return new Array})),this.polygonIndicesPool=new t.Pool((function(){return new Array}))}return e.prototype.triangulate=function(t){var n=t,r=t.length>>1,a=this.indicesArray;a.length=0;for(var i=0;i3;){for(var h=r-1,c=(i=0,1);;){t:if(!s[i]){for(var u=a[h]<<1,f=a[i]<<1,d=a[c]<<1,p=n[u],m=n[u+1],v=n[f],g=n[f+1],y=n[d],E=n[d+1],w=(c+1)%r;w!=h;w=(w+1)%r)if(s[w]){var T=a[w]<<1,A=n[T],x=n[T+1];if(e.positiveArea(y,E,p,m,A,x)&&e.positiveArea(p,m,v,g,A,x)&&e.positiveArea(v,g,y,E,A,x))break t}break}if(0==c){do{if(!s[i])break;i--}while(i>0);break}h=i,i=c,c=(c+1)%r}l.push(a[(r+i-1)%r]),l.push(a[i]),l.push(a[(i+1)%r]),a.splice(i,1),s.splice(i,1);var M=(--r+i-1)%r,I=i==r?0:i;s[M]=e.isConcave(M,r,n,a),s[I]=e.isConcave(I,r,n,a)}return 3==r&&(l.push(a[2]),l.push(a[0]),l.push(a[1])),l},e.prototype.decompose=function(t,n){var r=t,a=this.convexPolygons;this.polygonPool.freeAll(a),a.length=0;var i=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(i),i.length=0;var s=this.polygonIndicesPool.obtain();s.length=0;var o=this.polygonPool.obtain();o.length=0;for(var l=-1,h=0,c=0,u=n.length;c0?(a.push(o),i.push(s)):(this.polygonPool.free(o),this.polygonIndicesPool.free(s)),(o=this.polygonPool.obtain()).length=0,o.push(m),o.push(v),o.push(g),o.push(y),o.push(E),o.push(w),(s=this.polygonIndicesPool.obtain()).length=0,s.push(f),s.push(d),s.push(p),h=e.winding(m,v,g,y,E,w),l=f)}o.length>0&&(a.push(o),i.push(s));for(c=0,u=a.length;c=0;c--)0==(o=a[c]).length&&(a.splice(c,1),this.polygonPool.free(o),s=i[c],i.splice(c,1),this.polygonIndicesPool.free(s));return a},e.isConcave=function(t,e,n,r){var a=r[(e+t-1)%e]<<1,i=r[t]<<1,s=r[(t+1)%e]<<1;return!this.positiveArea(n[a],n[a+1],n[i],n[i+1],n[s],n[s+1])},e.positiveArea=function(t,e,n,r,a,i){return t*(i-r)+n*(e-i)+a*(r-e)>=0},e.winding=function(t,e,n,r,a,i){var s=n-t,o=r-e;return a*o-i*s+s*e-t*o>=0?1:-1},e}();t.Triangulator=e}(a||(a={})),function(t){var e=function(){function t(){this.array=new Array}return t.prototype.add=function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e},t.prototype.contains=function(t){return null!=this.array[0|t]},t.prototype.remove=function(t){this.array[0|t]=void 0},t.prototype.clear=function(){this.array.length=0},t}();t.IntSet=e;var n=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.r=t,this.g=e,this.b=n,this.a=r}return t.prototype.set=function(t,e,n,r){return this.r=t,this.g=e,this.b=n,this.a=r,this.clamp(),this},t.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},t.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=(8!=t.length?255:parseInt(t.substr(6,2),16))/255,this},t.prototype.add=function(t,e,n,r){return this.r+=t,this.g+=e,this.b+=n,this.a+=r,this.clamp(),this},t.prototype.clamp=function(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this},t.rgba8888ToColor=function(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},t.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},t.WHITE=new t(1,1,1,1),t.RED=new t(1,0,0,1),t.GREEN=new t(0,1,0,1),t.BLUE=new t(0,0,1,1),t.MAGENTA=new t(1,0,1,1),t}();t.Color=n;var r=function(){function t(){}return t.clamp=function(t,e,n){return tn?n:t},t.cosDeg=function(e){return Math.cos(e*t.degRad)},t.sinDeg=function(e){return Math.sin(e*t.degRad)},t.signum=function(t){return t>0?1:t<0?-1:0},t.toInt=function(t){return t>0?Math.floor(t):Math.ceil(t)},t.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},t.randomTriangular=function(e,n){return t.randomTriangularWith(e,n,.5*(e+n))},t.randomTriangularWith=function(t,e,n){var r=Math.random(),a=e-t;return r<=(n-t)/a?t+Math.sqrt(r*a*(n-t)):e-Math.sqrt((1-r)*a*(e-n))},t.PI=3.1415927,t.PI2=2*t.PI,t.radiansToDegrees=180/t.PI,t.radDeg=t.radiansToDegrees,t.degreesToRadians=t.PI/180,t.degRad=t.degreesToRadians,t}();t.MathUtils=r;var a=function(){function t(){}return t.prototype.apply=function(t,e,n){return t+(e-t)*this.applyInternal(n)},t}();t.Interpolation=a;var i=function(t){function e(e){var n=t.call(this)||this;return n.power=2,n.power=e,n}return s(e,t),e.prototype.applyInternal=function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1},e}(a);t.Pow=i;var o=function(t){function e(e){return t.call(this,e)||this}return s(e,t),e.prototype.applyInternal=function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1},e}(i);t.PowOut=o;var l=function(){function t(){}return t.arrayCopy=function(t,e,n,r,a){for(var i=e,s=r;i=n?e:t.setArraySize(e,n,r)},t.newArray=function(t,e){for(var n=new Array(t),r=0;r0?this.items.pop():this.instantiator()},t.prototype.free=function(t){t.reset&&t.reset(),this.items.push(t)},t.prototype.freeAll=function(t){for(var e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)},t}();t.TimeKeeper=f;var d=function(){function t(t){void 0===t&&(t=32),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}return t.prototype.hasEnoughData=function(){return this.addedValues>=this.values.length},t.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},t.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*i;var s=t.bone.skeleton,o=t.deform,l=this.vertices,h=this.bones;if(null!=h){for(var c=0,u=0,f=0;f0&&(l=o);for(var w,T=(w=t.bone).worldX,A=w.worldY,x=w.a,M=w.b,I=w.c,R=w.d,b=e,S=a;S)?=?)"),d("XRANGEIDENTIFIERLOOSE","".concat(l[h.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),d("XRANGEIDENTIFIER","".concat(l[h.NUMERICIDENTIFIER],"|x|X|\\*")),d("XRANGEPLAIN","[v=\\s]*(".concat(l[h.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(l[h.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(l[h.XRANGEIDENTIFIER],")")+"(?:".concat(l[h.PRERELEASE],")?").concat(l[h.BUILD],"?")+")?)?"),d("XRANGEPLAINLOOSE","[v=\\s]*(".concat(l[h.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(l[h.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(l[h.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(l[h.PRERELEASELOOSE],")?").concat(l[h.BUILD],"?")+")?)?"),d("XRANGE","^".concat(l[h.GTLT],"\\s*").concat(l[h.XRANGEPLAIN],"$")),d("XRANGELOOSE","^".concat(l[h.GTLT],"\\s*").concat(l[h.XRANGEPLAINLOOSE],"$")),d("COERCEPLAIN","".concat("(^|[^\\d])(\\d{1,").concat(n,"})")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:\\.(\\d{1,".concat(n,"}))?")),d("COERCE","".concat(l[h.COERCEPLAIN],"(?:$|[^\\d])")),d("COERCEFULL",l[h.COERCEPLAIN]+"(?:".concat(l[h.PRERELEASE],")?")+"(?:".concat(l[h.BUILD],")?")+"(?:$|[^\\d])"),d("COERCERTL",l[h.COERCE],!0),d("COERCERTLFULL",l[h.COERCEFULL],!0),d("LONETILDE","(?:~>?)"),d("TILDETRIM","(\\s*)".concat(l[h.LONETILDE],"\\s+"),!0),e.tildeTrimReplace="$1~",d("TILDE","^".concat(l[h.LONETILDE]).concat(l[h.XRANGEPLAIN],"$")),d("TILDELOOSE","^".concat(l[h.LONETILDE]).concat(l[h.XRANGEPLAINLOOSE],"$")),d("LONECARET","(?:\\^)"),d("CARETTRIM","(\\s*)".concat(l[h.LONECARET],"\\s+"),!0),e.caretTrimReplace="$1^",d("CARET","^".concat(l[h.LONECARET]).concat(l[h.XRANGEPLAIN],"$")),d("CARETLOOSE","^".concat(l[h.LONECARET]).concat(l[h.XRANGEPLAINLOOSE],"$")),d("COMPARATORLOOSE","^".concat(l[h.GTLT],"\\s*(").concat(l[h.LOOSEPLAIN],")$|^$")),d("COMPARATOR","^".concat(l[h.GTLT],"\\s*(").concat(l[h.FULLPLAIN],")$|^$")),d("COMPARATORTRIM","(\\s*)".concat(l[h.GTLT],"\\s*(").concat(l[h.LOOSEPLAIN],"|").concat(l[h.XRANGEPLAIN],")"),!0),e.comparatorTrimReplace="$1$2$3",d("HYPHENRANGE","^\\s*(".concat(l[h.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(l[h.XRANGEPLAIN],")")+"\\s*$"),d("HYPHENRANGELOOSE","^\\s*(".concat(l[h.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(l[h.XRANGEPLAINLOOSE],")")+"\\s*$"),d("STAR","(<|>)?=?\\s*\\*"),d("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),d("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(k,k.exports);var N=k.exports;R(N);var _=Object.freeze({loose:!0}),V=Object.freeze({}),O=function(t){return t?"object"!==o(t)?_:t:V};R(O);var L=/^[0-9]+$/,F=function(t,e){var n=L.test(t),r=L.test(e);return n&&r&&(t=+t,e=+e),t===e?0:n&&!r?-1:r&&!n?1:tB)throw new TypeError("version is longer than ".concat(B," characters"));U("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;var r=e.trim().match(n.loose?Y[W.LOOSE]:Y[W.FULL]);if(!r)throw new TypeError("Invalid Version: ".concat(e));if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>X||this.major<0)throw new TypeError("Invalid major version");if(this.minor>X||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>X||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((function(t){if(/^[0-9]+$/.test(t)){var e=+t;if(e>=0&&e=0;)"number"==typeof this.prerelease[a]&&(this.prerelease[a]++,a=-2);if(-1===a){if(e===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(e){var i=[e,r];!1===n&&(i=[e]),0===q(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break;default:throw new Error("invalid increment argument: ".concat(t))}return this.raw=this.format(),this.build.length&&(this.raw+="+".concat(this.build.join("."))),this}}])}(),H=G;R(H);var z=H,Z=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t instanceof z)return t;try{return new z(t,e)}catch(t){if(!n)return null;throw t}};R(Z);var $=Z,Q=R((function(t,e){var n=$(t,e);return n?n.version:null})),J=H,K=Z,tt=N.safeRe,et=N.t,nt=R((function(t,e){if(t instanceof J)return t;if("number"==typeof t&&(t=String(t)),"string"!=typeof t)return null;var n=null;if((e=e||{}).rtl){for(var r,a=e.includePrerelease?tt[et.COERCERTLFULL]:tt[et.COERCERTL];(r=a.exec(t))&&(!n||n.index+n[0].length!==t.length);)n&&r.index+r[0].length===n.index+n[0].length||(n=r),a.lastIndex=r.index+r[1].length+r[2].length;a.lastIndex=-1}else n=t.match(e.includePrerelease?tt[et.COERCEFULL]:tt[et.COERCE]);if(null===n)return null;var i=n[2],s=n[3]||"0",o=n[4]||"0",l=e.includePrerelease&&n[5]?"-".concat(n[5]):"",h=e.includePrerelease&&n[6]?"+".concat(n[6]):"";return K("".concat(i,".").concat(s,".").concat(o).concat(l).concat(h),e)})),rt=c((function t(){l(this,t),this.max=1e3,this.map=new Map}),[{key:"get",value:function(t){var e=this.map.get(t);return void 0===e?void 0:(this.map.delete(t),this.map.set(t,e),e)}},{key:"delete",value:function(t){return!!this.map.has(t)&&(this.map.delete(t),!0)}},{key:"set",value:function(t,e){if(!this.delete(t)&&void 0!==e){if(this.map.size>=this.max){var n=this.map.keys().next().value;this.delete(n)}this.map.set(t,e)}return this}}]);R(rt);var at=H,it=function(t,e,n){return new at(t,n).compare(new at(e,n))};R(it);var st=it,ot=function(t,e,n){return 0===st(t,e,n)};R(ot);var lt=it,ht=function(t,e,n){return 0!==lt(t,e,n)};R(ht);var ct=it,ut=function(t,e,n){return ct(t,e,n)>0};R(ut);var ft=it,dt=function(t,e,n){return ft(t,e,n)>=0};R(dt);var pt=it,mt=function(t,e,n){return pt(t,e,n)<0};R(mt);var vt=it,gt=function(t,e,n){return vt(t,e,n)<=0};R(gt);var yt,Et,wt,Tt,At=ot,xt=ht,Mt=ut,It=dt,Rt=mt,bt=gt,St=function(t,e,n,r){switch(e){case"===":return"object"===o(t)&&(t=t.version),"object"===o(n)&&(n=n.version),t===n;case"!==":return"object"===o(t)&&(t=t.version),"object"===o(n)&&(n=n.version),t!==n;case"":case"=":case"==":return At(t,n,r);case"!=":return xt(t,n,r);case">":return Mt(t,n,r);case">=":return It(t,n,r);case"<":return Rt(t,n,r);case"<=":return bt(t,n,r);default:throw new TypeError("Invalid operator: ".concat(e))}};function Ct(){if(Tt)return wt;Tt=1;var t=function(){function t(e,a){var i=this;if(l(this,t),a=n(a),e instanceof t)return e.loose===!!a.loose&&e.includePrerelease===!!a.includePrerelease?e:new t(e.raw,a);if(e instanceof r)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=a,this.loose=!!a.loose,this.includePrerelease=!!a.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((function(t){return i.parseRange(t.trim())})).filter((function(t){return t.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(this.raw));if(this.set.length>1){var s=this.set[0];if(this.set=this.set.filter((function(t){return!m(t[0])})),0===this.set.length)this.set=[s];else if(this.set.length>1){var o,h=T(this.set);try{for(h.s();!(o=h.n()).done;){var c=o.value;if(1===c.length&&v(c[0])){this.set=[c];break}}}catch(t){h.e(t)}finally{h.f()}}}this.format()}return c(t,[{key:"format",value:function(){return this.range=this.set.map((function(t){return t.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(t){var n=this,i=((this.options.includePrerelease&&d)|(this.options.loose&&p))+":"+t,l=e.get(i);if(l)return l;var c=this.options.loose,v=c?s[o.HYPHENRANGELOOSE]:s[o.HYPHENRANGE];t=t.replace(v,_(this.options.includePrerelease)),a("hyphen replace",t),t=t.replace(s[o.COMPARATORTRIM],h),a("comparator trim",t),t=t.replace(s[o.TILDETRIM],u),a("tilde trim",t),t=t.replace(s[o.CARETTRIM],f),a("caret trim",t);var g=t.split(" ").map((function(t){return E(t,n.options)})).join(" ").split(/\s+/).map((function(t){return k(t,n.options)}));c&&(g=g.filter((function(t){return a("loose invalid filter",t,n.options),!!t.match(s[o.COMPARATORLOOSE])}))),a("range list",g);var w,A=new Map,x=g.map((function(t){return new r(t,n.options)})),M=T(x);try{for(M.s();!(w=M.n()).done;){var I=w.value;if(m(I))return[I];A.set(I.value,I)}}catch(t){M.e(t)}finally{M.f()}A.size>1&&A.has("")&&A.delete("");var R=y(A.values());return e.set(i,R),R}},{key:"intersects",value:function(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((function(t){return g(t,n)&&e.set.some((function(e){return g(e,n)&&t.every((function(t){return e.every((function(e){return t.intersects(e,n)}))}))}))}))}},{key:"test",value:function(t){if(!t)return!1;if("string"==typeof t)try{t=new i(t,this.options)}catch(t){return!1}for(var e=0;e")||!t.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!t.operator.startsWith("<"))&&(this.semver.version!==t.semver.version||!this.operator.includes("=")||!t.operator.includes("="))&&!(i(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<"))&&!(i(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}}],[{key:"ANY",get:function(){return t}}])}();yt=e;var n=O,r=N.safeRe,a=N.t,i=St,s=P,o=H,h=Ct();return yt}(),a=P,i=H,s=N.safeRe,o=N.t,h=N.comparatorTrimReplace,u=N.tildeTrimReplace,f=N.caretTrimReplace,d=b.FLAG_INCLUDE_PRERELEASE,p=b.FLAG_LOOSE,m=function(t){return"<0.0.0-0"===t.value},v=function(t){return""===t.value},g=function(t,e){for(var n=!0,r=t.slice(),a=r.pop();n&&r.length;)n=r.every((function(t){return a.intersects(t,e)})),a=r.pop();return n},E=function(t,e){return a("comp",t,e),t=M(t,e),a("caret",t),t=A(t,e),a("tildes",t),t=R(t,e),a("xrange",t),t=C(t,e),a("stars",t),t},w=function(t){return!t||"x"===t.toLowerCase()||"*"===t},A=function(t,e){return t.trim().split(/\s+/).map((function(t){return x(t,e)})).join(" ")},x=function(t,e){var n=e.loose?s[o.TILDELOOSE]:s[o.TILDE];return t.replace(n,(function(e,n,r,i,s){var o;return a("tilde",t,e,n,r,i,s),w(n)?o="":w(r)?o=">=".concat(n,".0.0 <").concat(+n+1,".0.0-0"):w(i)?o=">=".concat(n,".").concat(r,".0 <").concat(n,".").concat(+r+1,".0-0"):s?(a("replaceTilde pr",s),o=">=".concat(n,".").concat(r,".").concat(i,"-").concat(s," <").concat(n,".").concat(+r+1,".0-0")):o=">=".concat(n,".").concat(r,".").concat(i," <").concat(n,".").concat(+r+1,".0-0"),a("tilde return",o),o}))},M=function(t,e){return t.trim().split(/\s+/).map((function(t){return I(t,e)})).join(" ")},I=function(t,e){a("caret",t,e);var n=e.loose?s[o.CARETLOOSE]:s[o.CARET],r=e.includePrerelease?"-0":"";return t.replace(n,(function(e,n,i,s,o){var l;return a("caret",t,e,n,i,s,o),w(n)?l="":w(i)?l=">=".concat(n,".0.0").concat(r," <").concat(+n+1,".0.0-0"):w(s)?l="0"===n?">=".concat(n,".").concat(i,".0").concat(r," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".0").concat(r," <").concat(+n+1,".0.0-0"):o?(a("replaceCaret pr",o),l="0"===n?"0"===i?">=".concat(n,".").concat(i,".").concat(s,"-").concat(o," <").concat(n,".").concat(i,".").concat(+s+1,"-0"):">=".concat(n,".").concat(i,".").concat(s,"-").concat(o," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".").concat(s,"-").concat(o," <").concat(+n+1,".0.0-0")):(a("no pr"),l="0"===n?"0"===i?">=".concat(n,".").concat(i,".").concat(s).concat(r," <").concat(n,".").concat(i,".").concat(+s+1,"-0"):">=".concat(n,".").concat(i,".").concat(s).concat(r," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".").concat(s," <").concat(+n+1,".0.0-0")),a("caret return",l),l}))},R=function(t,e){return a("replaceXRanges",t,e),t.split(/\s+/).map((function(t){return S(t,e)})).join(" ")},S=function(t,e){t=t.trim();var n=e.loose?s[o.XRANGELOOSE]:s[o.XRANGE];return t.replace(n,(function(n,r,i,s,o,l){a("xRange",t,n,r,i,s,o,l);var h=w(i),c=h||w(s),u=c||w(o),f=u;return"="===r&&f&&(r=""),l=e.includePrerelease?"-0":"",h?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&f?(c&&(s=0),o=0,">"===r?(r=">=",c?(i=+i+1,s=0,o=0):(s=+s+1,o=0)):"<="===r&&(r="<",c?i=+i+1:s=+s+1),"<"===r&&(l="-0"),n="".concat(r+i,".").concat(s,".").concat(o).concat(l)):c?n=">=".concat(i,".0.0").concat(l," <").concat(+i+1,".0.0-0"):u&&(n=">=".concat(i,".").concat(s,".0").concat(l," <").concat(i,".").concat(+s+1,".0-0")),a("xRange return",n),n}))},C=function(t,e){return a("replaceStars",t,e),t.trim().replace(s[o.STAR],"")},k=function(t,e){return a("replaceGTE0",t,e),t.trim().replace(s[e.includePrerelease?o.GTE0PRE:o.GTE0],"")},_=function(t){return function(e,n,r,a,i,s,o,l,h,c,u,f){return n=w(r)?"":w(a)?">=".concat(r,".0.0").concat(t?"-0":""):w(i)?">=".concat(r,".").concat(a,".0").concat(t?"-0":""):s?">=".concat(n):">=".concat(n).concat(t?"-0":""),l=w(h)?"":w(c)?"<".concat(+h+1,".0.0-0"):w(u)?"<".concat(h,".").concat(+c+1,".0-0"):f?"<=".concat(h,".").concat(c,".").concat(u,"-").concat(f):t?"<".concat(h,".").concat(c,".").concat(+u+1,"-0"):"<=".concat(l),"".concat(n," ").concat(l).trim()}},V=function(t,e,n){for(var i=0;i0){var o=t[s].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0};return wt}R(St);var Pt=Ct(),kt=function(t,e,n){try{e=new Pt(e,n)}catch(t){return!1}return e.test(t)},Nt={valid:Q,coerce:nt,satisfies:R(kt),SEMVER_SPEC_VERSION:S.SEMVER_SPEC_VERSION},_t=0,Vt=1,Ot=2,Lt=[0,1,2,2,3,0],Ft=c((function t(e,n,r,s){var o;if(l(this,t),u(this,"autoUpdate",!0),u(this,"skeleton",void 0),u(this,"states",void 0),this._app=e,this._position=new i.Vec3,1===a.TextureAtlas.length){var h,c=T((o=new a.TextureAtlas(n)).pages);try{for(c.s();!(h=c.n()).done;){var f=h.value;f.setTexture(new I(s[f.name]))}}catch(t){c.e(t)}finally{c.f()}}else o=new a.TextureAtlas(n,(function(t){return new I(s[t])}));var d=new a.SkeletonJson(new a.AtlasAttachmentLoader(o));d.scale*=.01;var p=d.readSkeletonData(r);this.skeletonVersion=Nt.valid(Nt.coerce(p.version)),this._spine_3_6_0=Nt.satisfies(this.skeletonVersion,"<=3.6.0"),this._spine_3_7_99=Nt.satisfies(this.skeletonVersion,"<=3.7.99"),this._spine_4_0_X=Nt.satisfies(this.skeletonVersion,"~4.0.0"),this._spine_4_1_X=Nt.satisfies(this.skeletonVersion,"~4.1.23"),this.skeleton=new a.Skeleton(p),this.skeleton.updateWorldTransform(),this.stateData=new a.AnimationStateData(this.skeleton.data),this.states=[new a.AnimationState(this.stateData)],this.clipper=new a.SkeletonClipping,this._node=new i.GraphNode,this._meshes=[],this._meshInstances=[],this._materials={},this._tint={},this._aabb=new i.BoundingBox,this._aabbTempArray=[],this._aabbTempOffset=new i.Vec2,this._aabbTempSize=new i.Vec2,this._renderCounts={vertexCount:0,indexCount:0},this._vertexFormat=null,this._vertexBuffer=null,this._indexBuffer=null,this._priority=0,this._timeScale=1,this._layers=[i.LAYERID_UI],this.init(),this._hidden=!1}),[{key:"destroy",value:function(){this.removeFromLayers();for(var t=0;t0&&this._renderCounts.vertexCount>0){this.skeleton.getBounds(this._aabbTempOffset,this._aabbTempSize,this._aabbTempArray),this._aabb.center=new i.Vec3(this._aabbTempOffset.x,this._aabbTempOffset.y,0),this._aabb.halfExtents=new i.Vec3(.5*this._aabbTempSize.x,.5*this._aabbTempSize.y,0),(!this._vertexBuffer||this._vertexBuffer.getNumVertices()0&&u.indices.length>0){t&&t!==u.material&&(this.SubmitBatch(e,n,t),t=u.material,e=s,n=0),t=u.material;var f=u.positions,d=u.vertexColor.r,p=u.vertexColor.g,m=u.vertexColor.b,v=u.vertexColor.a,g=u.uvs,y=void 0,E=f.length/2;for(y=0;y0){var r=new i.Mesh(this._app.graphicsDevice);r.vertexBuffer=this._vertexBuffer,r.indexBuffer[0]=this._indexBuffer,r.primitive[0].type=i.PRIMITIVE_TRIANGLES,r.primitive[0].base=t,r.primitive[0].count=e,r.primitive[0].indexed=!0,r.aabb=this._aabb,this._meshes.push(r);var a=new i.MeshInstance(r,this._materials[n],this._node);a.drawOrder=this.priority+this._meshInstances.length,a.visible=!this._hidden,this._meshInstances.push(a)}}},{key:"update",value:function(t){if(!this._hidden){var e;t*=this._timeScale;var n=this.states.length;for(e=0;e= 0; --o) { - var i = this.tryEntries[o], - a = i.completion; - if ("root" === i.tryLoc) return handle("end"); - if (i.tryLoc <= this.prev) { - var c = n.call(i, "catchLoc"), - u = n.call(i, "finallyLoc"); - if (c && u) { - if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); - if (this.prev < i.finallyLoc) return handle(i.finallyLoc); - } else if (c) { - if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); - } else { - if (!u) throw new Error("try statement without catch or finally"); - if (this.prev < i.finallyLoc) return handle(i.finallyLoc); - } - } - } - }, - abrupt: function (t, e) { - for (var r = this.tryEntries.length - 1; r >= 0; --r) { - var o = this.tryEntries[r]; - if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { - var i = o; - break; - } - } - i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); - var a = i ? i.completion : {}; - return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); - }, - complete: function (t, e) { - if ("throw" === t.type) throw t.arg; - return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; - }, - finish: function (t) { - for (var e = this.tryEntries.length - 1; e >= 0; --e) { - var r = this.tryEntries[e]; - if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; - } - }, - catch: function (t) { - for (var e = this.tryEntries.length - 1; e >= 0; --e) { - var r = this.tryEntries[e]; - if (r.tryLoc === t) { - var n = r.completion; - if ("throw" === n.type) { - var o = n.arg; - resetTryEntry(r); - } - return o; - } - } - throw new Error("illegal catch attempt"); - }, - delegateYield: function (e, r, n) { - return this.delegate = { - iterator: values(e), - resultName: r, - nextLoc: n - }, "next" === this.method && (this.arg = t), y; - } - }, e; - } function _typeof(o) { "@babel/helpers - typeof"; @@ -424,17 +120,6 @@ var spine = (function (pc) { }; return _setPrototypeOf(o, p); } - function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } - } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); @@ -449,20 +134,6 @@ var spine = (function (pc) { } return _assertThisInitialized(self); } - function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - return function _createSuperInternal() { - var Super = _getPrototypeOf(Derived), - result; - if (hasNativeReflectConstruct) { - var NewTarget = _getPrototypeOf(this).constructor; - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - return _possibleConstructorReturn(this, result); - }; - } function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); @@ -470,11 +141,11 @@ var spine = (function (pc) { } return object; } - function _get$1() { + function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { - _get$1 = Reflect.get.bind(); + _get = Reflect.get.bind(); } else { - _get$1 = function _get(target, property, receiver) { + _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); @@ -484,7 +155,7 @@ var spine = (function (pc) { return desc.value; }; } - return _get$1.apply(this, arguments); + return _get.apply(this, arguments); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); @@ -523,7 +194,7 @@ var spine = (function (pc) { function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { - if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { + if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike ) { if (it) o = it; var i = 0; var F = function () {}; @@ -575,23 +246,37 @@ var spine = (function (pc) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { - var res = prim.call(input, hint || "default"); + var res = prim.call(input, hint ); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } - return (hint === "string" ? String : Number)(input); + return (String )(input); } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } + function _callSuper$f(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var IntSet = function () { function IntSet() { _classCallCheck(this, IntSet); this.array = new Array(); } - _createClass(IntSet, [{ + return _createClass(IntSet, [{ key: "add", value: function add(value) { var contains = this.contains(value); @@ -614,7 +299,6 @@ var spine = (function (pc) { this.array.length = 0; } }]); - return IntSet; }(); var StringSet = function () { function StringSet() { @@ -622,7 +306,7 @@ var spine = (function (pc) { this.entries = {}; this.size = 0; } - _createClass(StringSet, [{ + return _createClass(StringSet, [{ key: "add", value: function add(value) { var contains = this.entries[value]; @@ -652,7 +336,6 @@ var spine = (function (pc) { this.size = 0; } }]); - return StringSet; }(); var Color = function () { function Color() { @@ -666,7 +349,7 @@ var spine = (function (pc) { this.b = b; this.a = a; } - _createClass(Color, [{ + return _createClass(Color, [{ key: "set", value: function set(r, g, b, a) { this.r = r; @@ -733,7 +416,6 @@ var spine = (function (pc) { return new Color().setFromString(hex); } }]); - return Color; }(); Color.WHITE = new Color(1, 1, 1, 1); Color.RED = new Color(1, 0, 0, 1); @@ -744,7 +426,7 @@ var spine = (function (pc) { function MathUtils() { _classCallCheck(this, MathUtils); } - _createClass(MathUtils, null, [{ + return _createClass(MathUtils, null, [{ key: "clamp", value: function clamp(value, min, max) { if (value < min) return min; @@ -796,7 +478,6 @@ var spine = (function (pc) { return value && (value & value - 1) === 0; } }]); - return MathUtils; }(); MathUtils.PI = 3.1415927; MathUtils.PI2 = MathUtils.PI * 2; @@ -808,54 +489,49 @@ var spine = (function (pc) { function Interpolation() { _classCallCheck(this, Interpolation); } - _createClass(Interpolation, [{ + return _createClass(Interpolation, [{ key: "apply", value: function apply(start, end, a) { return start + (end - start) * this.applyInternal(a); } }]); - return Interpolation; }(); var Pow = function (_Interpolation) { - _inherits(Pow, _Interpolation); - var _super = _createSuper(Pow); function Pow(power) { - var _this; + var _this2; _classCallCheck(this, Pow); - _this = _super.call(this); - _this.power = 2; - _this.power = power; - return _this; + _this2 = _callSuper$f(this, Pow); + _this2.power = 2; + _this2.power = power; + return _this2; } - _createClass(Pow, [{ + _inherits(Pow, _Interpolation); + return _createClass(Pow, [{ key: "applyInternal", value: function applyInternal(a) { if (a <= 0.5) return Math.pow(a * 2, this.power) / 2; return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1; } }]); - return Pow; }(Interpolation); var PowOut = function (_Pow) { - _inherits(PowOut, _Pow); - var _super2 = _createSuper(PowOut); function PowOut(power) { _classCallCheck(this, PowOut); - return _super2.call(this, power); + return _callSuper$f(this, PowOut, [power]); } - _createClass(PowOut, [{ + _inherits(PowOut, _Pow); + return _createClass(PowOut, [{ key: "applyInternal", value: function applyInternal(a) { return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1; } }]); - return PowOut; }(Pow); var Utils = function () { function Utils() { _classCallCheck(this, Utils); } - _createClass(Utils, null, [{ + return _createClass(Utils, null, [{ key: "arrayCopy", value: function arrayCopy(source, sourceStart, dest, destStart, numElements) { for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) { @@ -936,14 +612,13 @@ var spine = (function (pc) { return type[name[0].toUpperCase() + name.slice(1)]; } }]); - return Utils; }(); Utils.SUPPORTS_TYPED_ARRAYS = typeof Float32Array !== "undefined"; var DebugUtils = function () { function DebugUtils() { _classCallCheck(this, DebugUtils); } - _createClass(DebugUtils, null, [{ + return _createClass(DebugUtils, null, [{ key: "logBones", value: function logBones(skeleton) { for (var i = 0; i < skeleton.bones.length; i++) { @@ -952,7 +627,6 @@ var spine = (function (pc) { } } }]); - return DebugUtils; }(); var Pool = function () { function Pool(instantiator) { @@ -960,7 +634,7 @@ var spine = (function (pc) { this.items = new Array(); this.instantiator = instantiator; } - _createClass(Pool, [{ + return _createClass(Pool, [{ key: "obtain", value: function obtain() { return this.items.length > 0 ? this.items.pop() : this.instantiator(); @@ -982,7 +656,6 @@ var spine = (function (pc) { this.items.length = 0; } }]); - return Pool; }(); var Vector2 = function () { function Vector2() { @@ -992,7 +665,7 @@ var spine = (function (pc) { this.x = x; this.y = y; } - _createClass(Vector2, [{ + return _createClass(Vector2, [{ key: "set", value: function set(x, y) { this.x = x; @@ -1017,7 +690,6 @@ var spine = (function (pc) { return this; } }]); - return Vector2; }(); var TimeKeeper = function () { function TimeKeeper() { @@ -1030,7 +702,7 @@ var spine = (function (pc) { this.frameCount = 0; this.frameTime = 0; } - _createClass(TimeKeeper, [{ + return _createClass(TimeKeeper, [{ key: "update", value: function update() { var now = Date.now() / 1000; @@ -1047,7 +719,6 @@ var spine = (function (pc) { } } }]); - return TimeKeeper; }(); var WindowedMean = function () { function WindowedMean() { @@ -1059,7 +730,7 @@ var spine = (function (pc) { this.dirty = true; this.values = new Array(windowSize); } - _createClass(WindowedMean, [{ + return _createClass(WindowedMean, [{ key: "hasEnoughData", value: function hasEnoughData() { return this.addedValues >= this.values.length; @@ -1087,29 +758,41 @@ var spine = (function (pc) { return 0; } }]); - return WindowedMean; }(); + function _callSuper$e(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var Attachment = _createClass(function Attachment(name) { _classCallCheck(this, Attachment); if (!name) throw new Error("name cannot be null."); this.name = name; }); var VertexAttachment = function (_Attachment) { - _inherits(VertexAttachment, _Attachment); - var _super = _createSuper(VertexAttachment); function VertexAttachment(name) { - var _this; + var _this2; _classCallCheck(this, VertexAttachment); - _this = _super.call(this, name); - _this.id = VertexAttachment.nextID++; - _this.bones = null; - _this.vertices = null; - _this.worldVerticesLength = 0; - _this.deformAttachment = _assertThisInitialized(_this); - return _this; - } - _createClass(VertexAttachment, [{ + _this2 = _callSuper$e(this, VertexAttachment, [name]); + _this2.id = VertexAttachment.nextID++; + _this2.bones = null; + _this2.vertices = null; + _this2.worldVerticesLength = 0; + _this2.deformAttachment = _this2; + return _this2; + } + _inherits(VertexAttachment, _Attachment); + return _createClass(VertexAttachment, [{ key: "computeWorldVertices", value: function computeWorldVertices(slot, start, count, worldVertices, offset, stride) { count = offset + (count >> 1) * stride; @@ -1194,10 +877,23 @@ var spine = (function (pc) { attachment.deformAttachment = this.deformAttachment; } }]); - return VertexAttachment; }(Attachment); VertexAttachment.nextID = 0; + function _callSuper$d(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var Animation = function () { function Animation(name, timelines, duration) { _classCallCheck(this, Animation); @@ -1208,7 +904,7 @@ var spine = (function (pc) { this.setTimelines(timelines); this.duration = duration; } - _createClass(Animation, [{ + return _createClass(Animation, [{ key: "setTimelines", value: function setTimelines(timelines) { if (!timelines) throw new Error("timelines cannot be null."); @@ -1234,7 +930,6 @@ var spine = (function (pc) { for (var i = 0, n = timelines.length; i < n; i++) timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction); } }]); - return Animation; }(); var MixBlend; (function (MixBlend) { @@ -1277,7 +972,7 @@ var spine = (function (pc) { this.propertyIds = propertyIds; this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries()); } - _createClass(Timeline, [{ + return _createClass(Timeline, [{ key: "getPropertyIds", value: function getPropertyIds() { return this.propertyIds; @@ -1312,21 +1007,19 @@ var spine = (function (pc) { return n - step; } }]); - return Timeline; }(); var CurveTimeline = function (_Timeline) { - _inherits(CurveTimeline, _Timeline); - var _super = _createSuper(CurveTimeline); function CurveTimeline(frameCount, bezierCount, propertyIds) { - var _this; + var _this2; _classCallCheck(this, CurveTimeline); - _this = _super.call(this, frameCount, propertyIds); - _this.curves = null; - _this.curves = Utils.newFloatArray(frameCount + bezierCount * 18); - _this.curves[frameCount - 1] = 1; - return _this; + _this2 = _callSuper$d(this, CurveTimeline, [frameCount, propertyIds]); + _this2.curves = null; + _this2.curves = Utils.newFloatArray(frameCount + bezierCount * 18); + _this2.curves[frameCount - 1] = 1; + return _this2; } - _createClass(CurveTimeline, [{ + _inherits(CurveTimeline, _Timeline); + return _createClass(CurveTimeline, [{ key: "setLinear", value: function setLinear(frame) { this.curves[frame] = 0; @@ -1396,16 +1089,14 @@ var spine = (function (pc) { return y + (time - x) / (this.frames[frameIndex] - x) * (this.frames[frameIndex + valueOffset] - y); } }]); - return CurveTimeline; }(Timeline); var CurveTimeline1 = function (_CurveTimeline) { - _inherits(CurveTimeline1, _CurveTimeline); - var _super2 = _createSuper(CurveTimeline1); function CurveTimeline1(frameCount, bezierCount, propertyId) { _classCallCheck(this, CurveTimeline1); - return _super2.call(this, frameCount, bezierCount, [propertyId]); + return _callSuper$d(this, CurveTimeline1, [frameCount, bezierCount, [propertyId]]); } - _createClass(CurveTimeline1, [{ + _inherits(CurveTimeline1, _CurveTimeline); + return _createClass(CurveTimeline1, [{ key: "getFrameEntries", value: function getFrameEntries() { return 2; @@ -1440,16 +1131,14 @@ var spine = (function (pc) { return this.getBezierValue(time, i, 1, curveType - 2); } }]); - return CurveTimeline1; }(CurveTimeline); var CurveTimeline2 = function (_CurveTimeline2) { - _inherits(CurveTimeline2, _CurveTimeline2); - var _super3 = _createSuper(CurveTimeline2); function CurveTimeline2(frameCount, bezierCount, propertyId1, propertyId2) { _classCallCheck(this, CurveTimeline2); - return _super3.call(this, frameCount, bezierCount, [propertyId1, propertyId2]); + return _callSuper$d(this, CurveTimeline2, [frameCount, bezierCount, [propertyId1, propertyId2]]); } - _createClass(CurveTimeline2, [{ + _inherits(CurveTimeline2, _CurveTimeline2); + return _createClass(CurveTimeline2, [{ key: "getFrameEntries", value: function getFrameEntries() { return 3; @@ -1463,20 +1152,18 @@ var spine = (function (pc) { this.frames[frame + 2] = value2; } }]); - return CurveTimeline2; }(CurveTimeline); var RotateTimeline = function (_CurveTimeline3) { - _inherits(RotateTimeline, _CurveTimeline3); - var _super4 = _createSuper(RotateTimeline); function RotateTimeline(frameCount, bezierCount, boneIndex) { - var _this2; + var _this3; _classCallCheck(this, RotateTimeline); - _this2 = _super4.call(this, frameCount, bezierCount, Property.rotate + "|" + boneIndex); - _this2.boneIndex = 0; - _this2.boneIndex = boneIndex; - return _this2; + _this3 = _callSuper$d(this, RotateTimeline, [frameCount, bezierCount, Property.rotate + "|" + boneIndex]); + _this3.boneIndex = 0; + _this3.boneIndex = boneIndex; + return _this3; } - _createClass(RotateTimeline, [{ + _inherits(RotateTimeline, _CurveTimeline3); + return _createClass(RotateTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -1505,20 +1192,18 @@ var spine = (function (pc) { } } }]); - return RotateTimeline; }(CurveTimeline1); var TranslateTimeline = function (_CurveTimeline4) { - _inherits(TranslateTimeline, _CurveTimeline4); - var _super5 = _createSuper(TranslateTimeline); function TranslateTimeline(frameCount, bezierCount, boneIndex) { - var _this3; + var _this4; _classCallCheck(this, TranslateTimeline); - _this3 = _super5.call(this, frameCount, bezierCount, Property.x + "|" + boneIndex, Property.y + "|" + boneIndex); - _this3.boneIndex = 0; - _this3.boneIndex = boneIndex; - return _this3; + _this4 = _callSuper$d(this, TranslateTimeline, [frameCount, bezierCount, Property.x + "|" + boneIndex, Property.y + "|" + boneIndex]); + _this4.boneIndex = 0; + _this4.boneIndex = boneIndex; + return _this4; } - _createClass(TranslateTimeline, [{ + _inherits(TranslateTimeline, _CurveTimeline4); + return _createClass(TranslateTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -1573,20 +1258,18 @@ var spine = (function (pc) { } } }]); - return TranslateTimeline; }(CurveTimeline2); var TranslateXTimeline = function (_CurveTimeline5) { - _inherits(TranslateXTimeline, _CurveTimeline5); - var _super6 = _createSuper(TranslateXTimeline); function TranslateXTimeline(frameCount, bezierCount, boneIndex) { - var _this4; + var _this5; _classCallCheck(this, TranslateXTimeline); - _this4 = _super6.call(this, frameCount, bezierCount, Property.x + "|" + boneIndex); - _this4.boneIndex = 0; - _this4.boneIndex = boneIndex; - return _this4; + _this5 = _callSuper$d(this, TranslateXTimeline, [frameCount, bezierCount, Property.x + "|" + boneIndex]); + _this5.boneIndex = 0; + _this5.boneIndex = boneIndex; + return _this5; } - _createClass(TranslateXTimeline, [{ + _inherits(TranslateXTimeline, _CurveTimeline5); + return _createClass(TranslateXTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -1616,20 +1299,18 @@ var spine = (function (pc) { } } }]); - return TranslateXTimeline; }(CurveTimeline1); var TranslateYTimeline = function (_CurveTimeline6) { - _inherits(TranslateYTimeline, _CurveTimeline6); - var _super7 = _createSuper(TranslateYTimeline); function TranslateYTimeline(frameCount, bezierCount, boneIndex) { - var _this5; + var _this6; _classCallCheck(this, TranslateYTimeline); - _this5 = _super7.call(this, frameCount, bezierCount, Property.y + "|" + boneIndex); - _this5.boneIndex = 0; - _this5.boneIndex = boneIndex; - return _this5; + _this6 = _callSuper$d(this, TranslateYTimeline, [frameCount, bezierCount, Property.y + "|" + boneIndex]); + _this6.boneIndex = 0; + _this6.boneIndex = boneIndex; + return _this6; } - _createClass(TranslateYTimeline, [{ + _inherits(TranslateYTimeline, _CurveTimeline6); + return _createClass(TranslateYTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -1659,20 +1340,18 @@ var spine = (function (pc) { } } }]); - return TranslateYTimeline; }(CurveTimeline1); var ScaleTimeline = function (_CurveTimeline7) { - _inherits(ScaleTimeline, _CurveTimeline7); - var _super8 = _createSuper(ScaleTimeline); function ScaleTimeline(frameCount, bezierCount, boneIndex) { - var _this6; + var _this7; _classCallCheck(this, ScaleTimeline); - _this6 = _super8.call(this, frameCount, bezierCount, Property.scaleX + "|" + boneIndex, Property.scaleY + "|" + boneIndex); - _this6.boneIndex = 0; - _this6.boneIndex = boneIndex; - return _this6; + _this7 = _callSuper$d(this, ScaleTimeline, [frameCount, bezierCount, Property.scaleX + "|" + boneIndex, Property.scaleY + "|" + boneIndex]); + _this7.boneIndex = 0; + _this7.boneIndex = boneIndex; + return _this7; } - _createClass(ScaleTimeline, [{ + _inherits(ScaleTimeline, _CurveTimeline7); + return _createClass(ScaleTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -1765,20 +1444,18 @@ var spine = (function (pc) { } } }]); - return ScaleTimeline; }(CurveTimeline2); var ScaleXTimeline = function (_CurveTimeline8) { - _inherits(ScaleXTimeline, _CurveTimeline8); - var _super9 = _createSuper(ScaleXTimeline); function ScaleXTimeline(frameCount, bezierCount, boneIndex) { - var _this7; + var _this8; _classCallCheck(this, ScaleXTimeline); - _this7 = _super9.call(this, frameCount, bezierCount, Property.scaleX + "|" + boneIndex); - _this7.boneIndex = 0; - _this7.boneIndex = boneIndex; - return _this7; + _this8 = _callSuper$d(this, ScaleXTimeline, [frameCount, bezierCount, Property.scaleX + "|" + boneIndex]); + _this8.boneIndex = 0; + _this8.boneIndex = boneIndex; + return _this8; } - _createClass(ScaleXTimeline, [{ + _inherits(ScaleXTimeline, _CurveTimeline8); + return _createClass(ScaleXTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -1831,20 +1508,18 @@ var spine = (function (pc) { } } }]); - return ScaleXTimeline; }(CurveTimeline1); var ScaleYTimeline = function (_CurveTimeline9) { - _inherits(ScaleYTimeline, _CurveTimeline9); - var _super10 = _createSuper(ScaleYTimeline); function ScaleYTimeline(frameCount, bezierCount, boneIndex) { - var _this8; + var _this9; _classCallCheck(this, ScaleYTimeline); - _this8 = _super10.call(this, frameCount, bezierCount, Property.scaleY + "|" + boneIndex); - _this8.boneIndex = 0; - _this8.boneIndex = boneIndex; - return _this8; + _this9 = _callSuper$d(this, ScaleYTimeline, [frameCount, bezierCount, Property.scaleY + "|" + boneIndex]); + _this9.boneIndex = 0; + _this9.boneIndex = boneIndex; + return _this9; } - _createClass(ScaleYTimeline, [{ + _inherits(ScaleYTimeline, _CurveTimeline9); + return _createClass(ScaleYTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -1897,20 +1572,18 @@ var spine = (function (pc) { } } }]); - return ScaleYTimeline; }(CurveTimeline1); var ShearTimeline = function (_CurveTimeline10) { - _inherits(ShearTimeline, _CurveTimeline10); - var _super11 = _createSuper(ShearTimeline); function ShearTimeline(frameCount, bezierCount, boneIndex) { - var _this9; + var _this10; _classCallCheck(this, ShearTimeline); - _this9 = _super11.call(this, frameCount, bezierCount, Property.shearX + "|" + boneIndex, Property.shearY + "|" + boneIndex); - _this9.boneIndex = 0; - _this9.boneIndex = boneIndex; - return _this9; + _this10 = _callSuper$d(this, ShearTimeline, [frameCount, bezierCount, Property.shearX + "|" + boneIndex, Property.shearY + "|" + boneIndex]); + _this10.boneIndex = 0; + _this10.boneIndex = boneIndex; + return _this10; } - _createClass(ShearTimeline, [{ + _inherits(ShearTimeline, _CurveTimeline10); + return _createClass(ShearTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -1965,20 +1638,18 @@ var spine = (function (pc) { } } }]); - return ShearTimeline; }(CurveTimeline2); var ShearXTimeline = function (_CurveTimeline11) { - _inherits(ShearXTimeline, _CurveTimeline11); - var _super12 = _createSuper(ShearXTimeline); function ShearXTimeline(frameCount, bezierCount, boneIndex) { - var _this10; + var _this11; _classCallCheck(this, ShearXTimeline); - _this10 = _super12.call(this, frameCount, bezierCount, Property.shearX + "|" + boneIndex); - _this10.boneIndex = 0; - _this10.boneIndex = boneIndex; - return _this10; + _this11 = _callSuper$d(this, ShearXTimeline, [frameCount, bezierCount, Property.shearX + "|" + boneIndex]); + _this11.boneIndex = 0; + _this11.boneIndex = boneIndex; + return _this11; } - _createClass(ShearXTimeline, [{ + _inherits(ShearXTimeline, _CurveTimeline11); + return _createClass(ShearXTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -2008,20 +1679,18 @@ var spine = (function (pc) { } } }]); - return ShearXTimeline; }(CurveTimeline1); var ShearYTimeline = function (_CurveTimeline12) { - _inherits(ShearYTimeline, _CurveTimeline12); - var _super13 = _createSuper(ShearYTimeline); function ShearYTimeline(frameCount, bezierCount, boneIndex) { - var _this11; + var _this12; _classCallCheck(this, ShearYTimeline); - _this11 = _super13.call(this, frameCount, bezierCount, Property.shearY + "|" + boneIndex); - _this11.boneIndex = 0; - _this11.boneIndex = boneIndex; - return _this11; + _this12 = _callSuper$d(this, ShearYTimeline, [frameCount, bezierCount, Property.shearY + "|" + boneIndex]); + _this12.boneIndex = 0; + _this12.boneIndex = boneIndex; + return _this12; } - _createClass(ShearYTimeline, [{ + _inherits(ShearYTimeline, _CurveTimeline12); + return _createClass(ShearYTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -2051,20 +1720,18 @@ var spine = (function (pc) { } } }]); - return ShearYTimeline; }(CurveTimeline1); var RGBATimeline = function (_CurveTimeline13) { - _inherits(RGBATimeline, _CurveTimeline13); - var _super14 = _createSuper(RGBATimeline); function RGBATimeline(frameCount, bezierCount, slotIndex) { - var _this12; + var _this13; _classCallCheck(this, RGBATimeline); - _this12 = _super14.call(this, frameCount, bezierCount, [Property.rgb + "|" + slotIndex, Property.alpha + "|" + slotIndex]); - _this12.slotIndex = 0; - _this12.slotIndex = slotIndex; - return _this12; + _this13 = _callSuper$d(this, RGBATimeline, [frameCount, bezierCount, [Property.rgb + "|" + slotIndex, Property.alpha + "|" + slotIndex]]); + _this13.slotIndex = 0; + _this13.slotIndex = slotIndex; + return _this13; } - _createClass(RGBATimeline, [{ + _inherits(RGBATimeline, _CurveTimeline13); + return _createClass(RGBATimeline, [{ key: "getFrameEntries", value: function getFrameEntries() { return 5; @@ -2134,20 +1801,18 @@ var spine = (function (pc) { } } }]); - return RGBATimeline; }(CurveTimeline); var RGBTimeline = function (_CurveTimeline14) { - _inherits(RGBTimeline, _CurveTimeline14); - var _super15 = _createSuper(RGBTimeline); function RGBTimeline(frameCount, bezierCount, slotIndex) { - var _this13; + var _this14; _classCallCheck(this, RGBTimeline); - _this13 = _super15.call(this, frameCount, bezierCount, [Property.rgb + "|" + slotIndex]); - _this13.slotIndex = 0; - _this13.slotIndex = slotIndex; - return _this13; + _this14 = _callSuper$d(this, RGBTimeline, [frameCount, bezierCount, [Property.rgb + "|" + slotIndex]]); + _this14.slotIndex = 0; + _this14.slotIndex = slotIndex; + return _this14; } - _createClass(RGBTimeline, [{ + _inherits(RGBTimeline, _CurveTimeline14); + return _createClass(RGBTimeline, [{ key: "getFrameEntries", value: function getFrameEntries() { return 4; @@ -2226,20 +1891,18 @@ var spine = (function (pc) { } } }]); - return RGBTimeline; }(CurveTimeline); var AlphaTimeline = function (_CurveTimeline15) { - _inherits(AlphaTimeline, _CurveTimeline15); - var _super16 = _createSuper(AlphaTimeline); function AlphaTimeline(frameCount, bezierCount, slotIndex) { - var _this14; + var _this15; _classCallCheck(this, AlphaTimeline); - _this14 = _super16.call(this, frameCount, bezierCount, Property.alpha + "|" + slotIndex); - _this14.slotIndex = 0; - _this14.slotIndex = slotIndex; - return _this14; + _this15 = _callSuper$d(this, AlphaTimeline, [frameCount, bezierCount, Property.alpha + "|" + slotIndex]); + _this15.slotIndex = 0; + _this15.slotIndex = slotIndex; + return _this15; } - _createClass(AlphaTimeline, [{ + _inherits(AlphaTimeline, _CurveTimeline15); + return _createClass(AlphaTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var slot = skeleton.slots[this.slotIndex]; @@ -2263,20 +1926,18 @@ var spine = (function (pc) { } } }]); - return AlphaTimeline; }(CurveTimeline1); var RGBA2Timeline = function (_CurveTimeline16) { - _inherits(RGBA2Timeline, _CurveTimeline16); - var _super17 = _createSuper(RGBA2Timeline); function RGBA2Timeline(frameCount, bezierCount, slotIndex) { - var _this15; + var _this16; _classCallCheck(this, RGBA2Timeline); - _this15 = _super17.call(this, frameCount, bezierCount, [Property.rgb + "|" + slotIndex, Property.alpha + "|" + slotIndex, Property.rgb2 + "|" + slotIndex]); - _this15.slotIndex = 0; - _this15.slotIndex = slotIndex; - return _this15; + _this16 = _callSuper$d(this, RGBA2Timeline, [frameCount, bezierCount, [Property.rgb + "|" + slotIndex, Property.alpha + "|" + slotIndex, Property.rgb2 + "|" + slotIndex]]); + _this16.slotIndex = 0; + _this16.slotIndex = slotIndex; + return _this16; } - _createClass(RGBA2Timeline, [{ + _inherits(RGBA2Timeline, _CurveTimeline16); + return _createClass(RGBA2Timeline, [{ key: "getFrameEntries", value: function getFrameEntries() { return 8; @@ -2386,20 +2047,18 @@ var spine = (function (pc) { } } }]); - return RGBA2Timeline; }(CurveTimeline); var RGB2Timeline = function (_CurveTimeline17) { - _inherits(RGB2Timeline, _CurveTimeline17); - var _super18 = _createSuper(RGB2Timeline); function RGB2Timeline(frameCount, bezierCount, slotIndex) { - var _this16; + var _this17; _classCallCheck(this, RGB2Timeline); - _this16 = _super18.call(this, frameCount, bezierCount, [Property.rgb + "|" + slotIndex, Property.rgb2 + "|" + slotIndex]); - _this16.slotIndex = 0; - _this16.slotIndex = slotIndex; - return _this16; + _this17 = _callSuper$d(this, RGB2Timeline, [frameCount, bezierCount, [Property.rgb + "|" + slotIndex, Property.rgb2 + "|" + slotIndex]]); + _this17.slotIndex = 0; + _this17.slotIndex = slotIndex; + return _this17; } - _createClass(RGB2Timeline, [{ + _inherits(RGB2Timeline, _CurveTimeline17); + return _createClass(RGB2Timeline, [{ key: "getFrameEntries", value: function getFrameEntries() { return 7; @@ -2514,21 +2173,19 @@ var spine = (function (pc) { } } }]); - return RGB2Timeline; }(CurveTimeline); var AttachmentTimeline = function (_Timeline2) { - _inherits(AttachmentTimeline, _Timeline2); - var _super19 = _createSuper(AttachmentTimeline); function AttachmentTimeline(frameCount, slotIndex) { - var _this17; + var _this18; _classCallCheck(this, AttachmentTimeline); - _this17 = _super19.call(this, frameCount, [Property.attachment + "|" + slotIndex]); - _this17.slotIndex = 0; - _this17.slotIndex = slotIndex; - _this17.attachmentNames = new Array(frameCount); - return _this17; + _this18 = _callSuper$d(this, AttachmentTimeline, [frameCount, [Property.attachment + "|" + slotIndex]]); + _this18.slotIndex = 0; + _this18.slotIndex = slotIndex; + _this18.attachmentNames = new Array(frameCount); + return _this18; } - _createClass(AttachmentTimeline, [{ + _inherits(AttachmentTimeline, _Timeline2); + return _createClass(AttachmentTimeline, [{ key: "getFrameCount", value: function getFrameCount() { return this.frames.length; @@ -2560,24 +2217,22 @@ var spine = (function (pc) { slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(this.slotIndex, attachmentName)); } }]); - return AttachmentTimeline; }(Timeline); var DeformTimeline = function (_CurveTimeline18) { - _inherits(DeformTimeline, _CurveTimeline18); - var _super20 = _createSuper(DeformTimeline); function DeformTimeline(frameCount, bezierCount, slotIndex, attachment) { - var _this18; + var _this19; _classCallCheck(this, DeformTimeline); - _this18 = _super20.call(this, frameCount, bezierCount, [Property.deform + "|" + slotIndex + "|" + attachment.id]); - _this18.slotIndex = 0; - _this18.attachment = null; - _this18.vertices = null; - _this18.slotIndex = slotIndex; - _this18.attachment = attachment; - _this18.vertices = new Array(frameCount); - return _this18; + _this19 = _callSuper$d(this, DeformTimeline, [frameCount, bezierCount, [Property.deform + "|" + slotIndex + "|" + attachment.id]]); + _this19.slotIndex = 0; + _this19.attachment = null; + _this19.vertices = null; + _this19.slotIndex = slotIndex; + _this19.attachment = attachment; + _this19.vertices = new Array(frameCount); + return _this19; } - _createClass(DeformTimeline, [{ + _inherits(DeformTimeline, _CurveTimeline18); + return _createClass(DeformTimeline, [{ key: "getFrameCount", value: function getFrameCount() { return this.frames.length; @@ -2793,20 +2448,18 @@ var spine = (function (pc) { } } }]); - return DeformTimeline; }(CurveTimeline); var EventTimeline = function (_Timeline3) { - _inherits(EventTimeline, _Timeline3); - var _super21 = _createSuper(EventTimeline); function EventTimeline(frameCount) { - var _this19; + var _this20; _classCallCheck(this, EventTimeline); - _this19 = _super21.call(this, frameCount, EventTimeline.propertyIds); - _this19.events = null; - _this19.events = new Array(frameCount); - return _this19; + _this20 = _callSuper$d(this, EventTimeline, [frameCount, EventTimeline.propertyIds]); + _this20.events = null; + _this20.events = new Array(frameCount); + return _this20; } - _createClass(EventTimeline, [{ + _inherits(EventTimeline, _Timeline3); + return _createClass(EventTimeline, [{ key: "getFrameCount", value: function getFrameCount() { return this.frames.length; @@ -2840,21 +2493,19 @@ var spine = (function (pc) { for (; i < frameCount && time >= frames[i]; i++) firedEvents.push(this.events[i]); } }]); - return EventTimeline; }(Timeline); EventTimeline.propertyIds = ["" + Property.event]; var DrawOrderTimeline = function (_Timeline4) { - _inherits(DrawOrderTimeline, _Timeline4); - var _super22 = _createSuper(DrawOrderTimeline); function DrawOrderTimeline(frameCount) { - var _this20; + var _this21; _classCallCheck(this, DrawOrderTimeline); - _this20 = _super22.call(this, frameCount, DrawOrderTimeline.propertyIds); - _this20.drawOrders = null; - _this20.drawOrders = new Array(frameCount); - return _this20; + _this21 = _callSuper$d(this, DrawOrderTimeline, [frameCount, DrawOrderTimeline.propertyIds]); + _this21.drawOrders = null; + _this21.drawOrders = new Array(frameCount); + return _this21; } - _createClass(DrawOrderTimeline, [{ + _inherits(DrawOrderTimeline, _Timeline4); + return _createClass(DrawOrderTimeline, [{ key: "getFrameCount", value: function getFrameCount() { return this.frames.length; @@ -2884,21 +2535,19 @@ var spine = (function (pc) { } } }]); - return DrawOrderTimeline; }(Timeline); DrawOrderTimeline.propertyIds = ["" + Property.drawOrder]; var IkConstraintTimeline = function (_CurveTimeline19) { - _inherits(IkConstraintTimeline, _CurveTimeline19); - var _super23 = _createSuper(IkConstraintTimeline); function IkConstraintTimeline(frameCount, bezierCount, ikConstraintIndex) { - var _this21; + var _this22; _classCallCheck(this, IkConstraintTimeline); - _this21 = _super23.call(this, frameCount, bezierCount, [Property.ikConstraint + "|" + ikConstraintIndex]); - _this21.ikConstraintIndex = 0; - _this21.ikConstraintIndex = ikConstraintIndex; - return _this21; + _this22 = _callSuper$d(this, IkConstraintTimeline, [frameCount, bezierCount, [Property.ikConstraint + "|" + ikConstraintIndex]]); + _this22.ikConstraintIndex = 0; + _this22.ikConstraintIndex = ikConstraintIndex; + return _this22; } - _createClass(IkConstraintTimeline, [{ + _inherits(IkConstraintTimeline, _CurveTimeline19); + return _createClass(IkConstraintTimeline, [{ key: "getFrameEntries", value: function getFrameEntries() { return 6; @@ -2982,20 +2631,18 @@ var spine = (function (pc) { } } }]); - return IkConstraintTimeline; }(CurveTimeline); var TransformConstraintTimeline = function (_CurveTimeline20) { - _inherits(TransformConstraintTimeline, _CurveTimeline20); - var _super24 = _createSuper(TransformConstraintTimeline); function TransformConstraintTimeline(frameCount, bezierCount, transformConstraintIndex) { - var _this22; + var _this23; _classCallCheck(this, TransformConstraintTimeline); - _this22 = _super24.call(this, frameCount, bezierCount, [Property.transformConstraint + "|" + transformConstraintIndex]); - _this22.transformConstraintIndex = 0; - _this22.transformConstraintIndex = transformConstraintIndex; - return _this22; + _this23 = _callSuper$d(this, TransformConstraintTimeline, [frameCount, bezierCount, [Property.transformConstraint + "|" + transformConstraintIndex]]); + _this23.transformConstraintIndex = 0; + _this23.transformConstraintIndex = transformConstraintIndex; + return _this23; } - _createClass(TransformConstraintTimeline, [{ + _inherits(TransformConstraintTimeline, _CurveTimeline20); + return _createClass(TransformConstraintTimeline, [{ key: "getFrameEntries", value: function getFrameEntries() { return 7; @@ -3094,20 +2741,18 @@ var spine = (function (pc) { } } }]); - return TransformConstraintTimeline; }(CurveTimeline); var PathConstraintPositionTimeline = function (_CurveTimeline21) { - _inherits(PathConstraintPositionTimeline, _CurveTimeline21); - var _super25 = _createSuper(PathConstraintPositionTimeline); function PathConstraintPositionTimeline(frameCount, bezierCount, pathConstraintIndex) { - var _this23; + var _this24; _classCallCheck(this, PathConstraintPositionTimeline); - _this23 = _super25.call(this, frameCount, bezierCount, Property.pathConstraintPosition + "|" + pathConstraintIndex); - _this23.pathConstraintIndex = 0; - _this23.pathConstraintIndex = pathConstraintIndex; - return _this23; + _this24 = _callSuper$d(this, PathConstraintPositionTimeline, [frameCount, bezierCount, Property.pathConstraintPosition + "|" + pathConstraintIndex]); + _this24.pathConstraintIndex = 0; + _this24.pathConstraintIndex = pathConstraintIndex; + return _this24; } - _createClass(PathConstraintPositionTimeline, [{ + _inherits(PathConstraintPositionTimeline, _CurveTimeline21); + return _createClass(PathConstraintPositionTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) { var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; @@ -3127,20 +2772,18 @@ var spine = (function (pc) { if (blend == MixBlend.setup) constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;else constraint.position += (position - constraint.position) * alpha; } }]); - return PathConstraintPositionTimeline; }(CurveTimeline1); var PathConstraintSpacingTimeline = function (_CurveTimeline22) { - _inherits(PathConstraintSpacingTimeline, _CurveTimeline22); - var _super26 = _createSuper(PathConstraintSpacingTimeline); function PathConstraintSpacingTimeline(frameCount, bezierCount, pathConstraintIndex) { - var _this24; + var _this25; _classCallCheck(this, PathConstraintSpacingTimeline); - _this24 = _super26.call(this, frameCount, bezierCount, Property.pathConstraintSpacing + "|" + pathConstraintIndex); - _this24.pathConstraintIndex = 0; - _this24.pathConstraintIndex = pathConstraintIndex; - return _this24; + _this25 = _callSuper$d(this, PathConstraintSpacingTimeline, [frameCount, bezierCount, Property.pathConstraintSpacing + "|" + pathConstraintIndex]); + _this25.pathConstraintIndex = 0; + _this25.pathConstraintIndex = pathConstraintIndex; + return _this25; } - _createClass(PathConstraintSpacingTimeline, [{ + _inherits(PathConstraintSpacingTimeline, _CurveTimeline22); + return _createClass(PathConstraintSpacingTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) { var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; @@ -3160,20 +2803,18 @@ var spine = (function (pc) { if (blend == MixBlend.setup) constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;else constraint.spacing += (spacing - constraint.spacing) * alpha; } }]); - return PathConstraintSpacingTimeline; }(CurveTimeline1); var PathConstraintMixTimeline = function (_CurveTimeline23) { - _inherits(PathConstraintMixTimeline, _CurveTimeline23); - var _super27 = _createSuper(PathConstraintMixTimeline); function PathConstraintMixTimeline(frameCount, bezierCount, pathConstraintIndex) { - var _this25; + var _this26; _classCallCheck(this, PathConstraintMixTimeline); - _this25 = _super27.call(this, frameCount, bezierCount, [Property.pathConstraintMix + "|" + pathConstraintIndex]); - _this25.pathConstraintIndex = 0; - _this25.pathConstraintIndex = pathConstraintIndex; - return _this25; + _this26 = _callSuper$d(this, PathConstraintMixTimeline, [frameCount, bezierCount, [Property.pathConstraintMix + "|" + pathConstraintIndex]]); + _this26.pathConstraintIndex = 0; + _this26.pathConstraintIndex = pathConstraintIndex; + return _this26; } - _createClass(PathConstraintMixTimeline, [{ + _inherits(PathConstraintMixTimeline, _CurveTimeline23); + return _createClass(PathConstraintMixTimeline, [{ key: "getFrameEntries", value: function getFrameEntries() { return 4; @@ -3244,7 +2885,6 @@ var spine = (function (pc) { } } }]); - return PathConstraintMixTimeline; }(CurveTimeline); var AnimationState = function () { @@ -3264,7 +2904,7 @@ var spine = (function (pc) { }); this.data = data; } - _createClass(AnimationState, [{ + return _createClass(AnimationState, [{ key: "update", value: function update(delta) { delta *= this.timeScale; @@ -3845,7 +3485,6 @@ var spine = (function (pc) { return _emptyAnimation; } }]); - return AnimationState; }(); var TrackEntry = function () { function TrackEntry() { @@ -3883,7 +3522,7 @@ var spine = (function (pc) { this.timelineHoldMix = new Array(); this.timelinesRotation = new Array(); } - _createClass(TrackEntry, [{ + return _createClass(TrackEntry, [{ key: "reset", value: function reset() { this.next = null; @@ -3933,7 +3572,6 @@ var spine = (function (pc) { return this.trackTime; } }]); - return TrackEntry; }(); var EventQueue = function () { function EventQueue(animState) { @@ -3943,7 +3581,7 @@ var spine = (function (pc) { this.animState = null; this.animState = animState; } - _createClass(EventQueue, [{ + return _createClass(EventQueue, [{ key: "start", value: function start(entry) { this.objects.push(EventType.start); @@ -4029,7 +3667,6 @@ var spine = (function (pc) { this.objects.length = 0; } }]); - return EventQueue; }(); var EventType; (function (EventType) { @@ -4044,7 +3681,7 @@ var spine = (function (pc) { function AnimationStateAdapter() { _classCallCheck(this, AnimationStateAdapter); } - _createClass(AnimationStateAdapter, [{ + return _createClass(AnimationStateAdapter, [{ key: "start", value: function start(entry) {} }, { @@ -4063,7 +3700,6 @@ var spine = (function (pc) { key: "event", value: function event(entry, _event3) {} }]); - return AnimationStateAdapter; }(); var SUBSEQUENT = 0; var FIRST = 1; @@ -4083,7 +3719,7 @@ var spine = (function (pc) { if (!skeletonData) throw new Error("skeletonData cannot be null."); this.skeletonData = skeletonData; } - _createClass(AnimationStateData, [{ + return _createClass(AnimationStateData, [{ key: "setMix", value: function setMix(fromName, toName, duration) { var from = this.skeletonData.findAnimation(fromName); @@ -4108,20 +3744,32 @@ var spine = (function (pc) { return value === undefined ? this.defaultMix : value; } }]); - return AnimationStateData; }(); + function _callSuper$c(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var BoundingBoxAttachment = function (_VertexAttachment) { - _inherits(BoundingBoxAttachment, _VertexAttachment); - var _super = _createSuper(BoundingBoxAttachment); function BoundingBoxAttachment(name) { - var _this; + var _this2; _classCallCheck(this, BoundingBoxAttachment); - _this = _super.call(this, name); - _this.color = new Color(1, 1, 1, 1); - return _this; + _this2 = _callSuper$c(this, BoundingBoxAttachment, [name]); + _this2.color = new Color(1, 1, 1, 1); + return _this2; } - _createClass(BoundingBoxAttachment, [{ + _inherits(BoundingBoxAttachment, _VertexAttachment); + return _createClass(BoundingBoxAttachment, [{ key: "copy", value: function copy() { var copy = new BoundingBoxAttachment(this.name); @@ -4130,21 +3778,33 @@ var spine = (function (pc) { return copy; } }]); - return BoundingBoxAttachment; }(VertexAttachment); + function _callSuper$b(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var ClippingAttachment = function (_VertexAttachment) { - _inherits(ClippingAttachment, _VertexAttachment); - var _super = _createSuper(ClippingAttachment); function ClippingAttachment(name) { - var _this; + var _this2; _classCallCheck(this, ClippingAttachment); - _this = _super.call(this, name); - _this.endSlot = null; - _this.color = new Color(0.2275, 0.2275, 0.8078, 1); - return _this; + _this2 = _callSuper$b(this, ClippingAttachment, [name]); + _this2.endSlot = null; + _this2.color = new Color(0.2275, 0.2275, 0.8078, 1); + return _this2; } - _createClass(ClippingAttachment, [{ + _inherits(ClippingAttachment, _VertexAttachment); + return _createClass(ClippingAttachment, [{ key: "copy", value: function copy() { var copy = new ClippingAttachment(this.name); @@ -4154,21 +3814,33 @@ var spine = (function (pc) { return copy; } }]); - return ClippingAttachment; }(VertexAttachment); + function _callSuper$a(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var Texture = function () { function Texture(image) { _classCallCheck(this, Texture); this._image = image; } - _createClass(Texture, [{ + return _createClass(Texture, [{ key: "getImage", value: function getImage() { return this._image; } }]); - return Texture; }(); var TextureFilter; (function (TextureFilter) { @@ -4201,13 +3873,12 @@ var spine = (function (pc) { this.originalHeight = 0; }); var FakeTexture = function (_Texture) { - _inherits(FakeTexture, _Texture); - var _super = _createSuper(FakeTexture); function FakeTexture() { _classCallCheck(this, FakeTexture); - return _super.apply(this, arguments); + return _callSuper$a(this, FakeTexture, arguments); } - _createClass(FakeTexture, [{ + _inherits(FakeTexture, _Texture); + return _createClass(FakeTexture, [{ key: "setFilters", value: function setFilters(minFilter, magFilter) {} }, { @@ -4217,9 +3888,22 @@ var spine = (function (pc) { key: "dispose", value: function dispose() {} }]); - return FakeTexture; }(Texture); + function _callSuper$9(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var TextureAtlas = function () { function TextureAtlas(atlasText) { _classCallCheck(this, TextureAtlas); @@ -4347,7 +4031,7 @@ var spine = (function (pc) { } } } - _createClass(TextureAtlas, [{ + return _createClass(TextureAtlas, [{ key: "findRegion", value: function findRegion(name) { for (var i = 0; i < this.regions.length; i++) { @@ -4382,7 +4066,6 @@ var spine = (function (pc) { } } }]); - return TextureAtlas; }(); var TextureAtlasReader = function () { function TextureAtlasReader(text) { @@ -4391,7 +4074,7 @@ var spine = (function (pc) { this.index = 0; this.lines = text.split(/\r\n|\r|\n/); } - _createClass(TextureAtlasReader, [{ + return _createClass(TextureAtlasReader, [{ key: "readLine", value: function readLine() { if (this.index >= this.lines.length) return null; @@ -4418,7 +4101,6 @@ var spine = (function (pc) { } } }]); - return TextureAtlasReader; }(); var TextureAtlasPage = function () { function TextureAtlasPage() { @@ -4433,7 +4115,7 @@ var spine = (function (pc) { this.height = 0; this.pma = false; } - _createClass(TextureAtlasPage, [{ + return _createClass(TextureAtlasPage, [{ key: "setTexture", value: function setTexture(texture) { this.texture = texture; @@ -4441,54 +4123,65 @@ var spine = (function (pc) { texture.setWraps(this.uWrap, this.vWrap); } }]); - return TextureAtlasPage; }(); var TextureAtlasRegion = function (_TextureRegion) { - _inherits(TextureAtlasRegion, _TextureRegion); - var _super = _createSuper(TextureAtlasRegion); function TextureAtlasRegion() { - var _this; + var _this2; _classCallCheck(this, TextureAtlasRegion); - _this = _super.apply(this, arguments); - _this.page = null; - _this.name = null; - _this.x = 0; - _this.y = 0; - _this.offsetX = 0; - _this.offsetY = 0; - _this.originalWidth = 0; - _this.originalHeight = 0; - _this.index = 0; - _this.degrees = 0; - _this.names = null; - _this.values = null; - return _this; + _this2 = _callSuper$9(this, TextureAtlasRegion, arguments); + _this2.page = null; + _this2.name = null; + _this2.x = 0; + _this2.y = 0; + _this2.offsetX = 0; + _this2.offsetY = 0; + _this2.originalWidth = 0; + _this2.originalHeight = 0; + _this2.index = 0; + _this2.degrees = 0; + _this2.names = null; + _this2.values = null; + return _this2; } + _inherits(TextureAtlasRegion, _TextureRegion); return _createClass(TextureAtlasRegion); }(TextureRegion); + function _callSuper$8(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var MeshAttachment = function (_VertexAttachment) { - _inherits(MeshAttachment, _VertexAttachment); - var _super = _createSuper(MeshAttachment); function MeshAttachment(name) { - var _this; + var _this2; _classCallCheck(this, MeshAttachment); - _this = _super.call(this, name); - _this.region = null; - _this.path = null; - _this.regionUVs = null; - _this.uvs = null; - _this.triangles = null; - _this.color = new Color(1, 1, 1, 1); - _this.width = 0; - _this.height = 0; - _this.hullLength = 0; - _this.edges = null; - _this.parentMesh = null; - _this.tempColor = new Color(0, 0, 0, 0); - return _this; - } - _createClass(MeshAttachment, [{ + _this2 = _callSuper$8(this, MeshAttachment, [name]); + _this2.region = null; + _this2.path = null; + _this2.regionUVs = null; + _this2.uvs = null; + _this2.triangles = null; + _this2.color = new Color(1, 1, 1, 1); + _this2.width = 0; + _this2.height = 0; + _this2.hullLength = 0; + _this2.edges = null; + _this2.parentMesh = null; + _this2.tempColor = new Color(0, 0, 0, 0); + return _this2; + } + _inherits(MeshAttachment, _VertexAttachment); + return _createClass(MeshAttachment, [{ key: "updateUVs", value: function updateUVs() { var regionUVs = this.regionUVs; @@ -4608,23 +4301,35 @@ var spine = (function (pc) { return copy; } }]); - return MeshAttachment; }(VertexAttachment); + function _callSuper$7(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var PathAttachment = function (_VertexAttachment) { - _inherits(PathAttachment, _VertexAttachment); - var _super = _createSuper(PathAttachment); function PathAttachment(name) { - var _this; + var _this2; _classCallCheck(this, PathAttachment); - _this = _super.call(this, name); - _this.lengths = null; - _this.closed = false; - _this.constantSpeed = false; - _this.color = new Color(1, 1, 1, 1); - return _this; - } - _createClass(PathAttachment, [{ + _this2 = _callSuper$7(this, PathAttachment, [name]); + _this2.lengths = null; + _this2.closed = false; + _this2.constantSpeed = false; + _this2.color = new Color(1, 1, 1, 1); + return _this2; + } + _inherits(PathAttachment, _VertexAttachment); + return _createClass(PathAttachment, [{ key: "copy", value: function copy() { var copy = new PathAttachment(this.name); @@ -4637,23 +4342,35 @@ var spine = (function (pc) { return copy; } }]); - return PathAttachment; }(VertexAttachment); + function _callSuper$6(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var PointAttachment = function (_VertexAttachment) { + function PointAttachment(name) { + var _this2; + _classCallCheck(this, PointAttachment); + _this2 = _callSuper$6(this, PointAttachment, [name]); + _this2.x = 0; + _this2.y = 0; + _this2.rotation = 0; + _this2.color = new Color(0.38, 0.94, 0, 1); + return _this2; + } _inherits(PointAttachment, _VertexAttachment); - var _super = _createSuper(PointAttachment); - function PointAttachment(name) { - var _this; - _classCallCheck(this, PointAttachment); - _this = _super.call(this, name); - _this.x = 0; - _this.y = 0; - _this.rotation = 0; - _this.color = new Color(0.38, 0.94, 0, 1); - return _this; - } - _createClass(PointAttachment, [{ + return _createClass(PointAttachment, [{ key: "computeWorldPosition", value: function computeWorldPosition(bone, point) { point.x = this.x * bone.a + this.y * bone.b + bone.worldX; @@ -4680,33 +4397,45 @@ var spine = (function (pc) { return copy; } }]); - return PointAttachment; }(VertexAttachment); + function _callSuper$5(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var RegionAttachment = function (_Attachment) { - _inherits(RegionAttachment, _Attachment); - var _super = _createSuper(RegionAttachment); function RegionAttachment(name) { - var _this; + var _this2; _classCallCheck(this, RegionAttachment); - _this = _super.call(this, name); - _this.x = 0; - _this.y = 0; - _this.scaleX = 1; - _this.scaleY = 1; - _this.rotation = 0; - _this.width = 0; - _this.height = 0; - _this.color = new Color(1, 1, 1, 1); - _this.path = null; - _this.rendererObject = null; - _this.region = null; - _this.offset = Utils.newFloatArray(8); - _this.uvs = Utils.newFloatArray(8); - _this.tempColor = new Color(1, 1, 1, 1); - return _this; - } - _createClass(RegionAttachment, [{ + _this2 = _callSuper$5(this, RegionAttachment, [name]); + _this2.x = 0; + _this2.y = 0; + _this2.scaleX = 1; + _this2.scaleY = 1; + _this2.rotation = 0; + _this2.width = 0; + _this2.height = 0; + _this2.color = new Color(1, 1, 1, 1); + _this2.path = null; + _this2.rendererObject = null; + _this2.region = null; + _this2.offset = Utils.newFloatArray(8); + _this2.uvs = Utils.newFloatArray(8); + _this2.tempColor = new Color(1, 1, 1, 1); + return _this2; + } + _inherits(RegionAttachment, _Attachment); + return _createClass(RegionAttachment, [{ key: "updateOffset", value: function updateOffset() { this.region; @@ -4816,7 +4545,6 @@ var spine = (function (pc) { return copy; } }]); - return RegionAttachment; }(Attachment); RegionAttachment.X1 = 0; RegionAttachment.Y1 = 1; @@ -4857,7 +4585,7 @@ var spine = (function (pc) { this.atlas = null; this.atlas = atlas; } - _createClass(AtlasAttachmentLoader, [{ + return _createClass(AtlasAttachmentLoader, [{ key: "newRegionAttachment", value: function newRegionAttachment(skin, name, path) { var region = this.atlas.findRegion(path); @@ -4898,7 +4626,6 @@ var spine = (function (pc) { return new ClippingAttachment(name); } }]); - return AtlasAttachmentLoader; }(); var BoneData = _createClass(function BoneData(index, name, parent) { @@ -4968,7 +4695,7 @@ var spine = (function (pc) { this.parent = parent; this.setToSetupPose(); } - _createClass(Bone, [{ + return _createClass(Bone, [{ key: "isActive", value: function isActive() { return this.active; @@ -5222,7 +4949,6 @@ var spine = (function (pc) { this.d = sin * b + cos * d; } }]); - return Bone; }(); var ConstraintData = _createClass(function ConstraintData(name, order, skinRequired) { @@ -5246,7 +4972,7 @@ var spine = (function (pc) { this.pathPrefix = pathPrefix; this.downloader = downloader || new Downloader(); } - _createClass(AssetManagerBase, [{ + return _createClass(AssetManagerBase, [{ key: "start", value: function start(path) { this.toLoad++; @@ -5473,7 +5199,6 @@ var spine = (function (pc) { return this.errors; } }]); - return AssetManagerBase; }(); var Downloader = function () { function Downloader() { @@ -5481,7 +5206,7 @@ var spine = (function (pc) { this.callbacks = {}; this.rawDataUris = {}; } - _createClass(Downloader, [{ + return _createClass(Downloader, [{ key: "dataUriToString", value: function dataUriToString(dataUri) { if (!dataUri.startsWith("data:")) { @@ -5594,7 +5319,6 @@ var spine = (function (pc) { for (var i = args.length - 1, n = callbacks.length; i < n; i += 2) callbacks[i].apply(null, args); } }]); - return Downloader; }(); var Event = _createClass(function Event(time, data) { @@ -5647,7 +5371,7 @@ var spine = (function (pc) { for (var i = 0; i < data.bones.length; i++) this.bones.push(skeleton.findBone(data.bones[i].name)); this.target = skeleton.findBone(data.target.name); } - _createClass(IkConstraint, [{ + return _createClass(IkConstraint, [{ key: "isActive", value: function isActive() { return this.active; @@ -5890,49 +5614,74 @@ var spine = (function (pc) { child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY); } }]); - return IkConstraint; }(); + function _callSuper$4(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var IkConstraintData = function (_ConstraintData) { - _inherits(IkConstraintData, _ConstraintData); - var _super = _createSuper(IkConstraintData); function IkConstraintData(name) { - var _this; + var _this2; _classCallCheck(this, IkConstraintData); - _this = _super.call(this, name, 0, false); - _this.bones = new Array(); - _this.target = null; - _this.bendDirection = 1; - _this.compress = false; - _this.stretch = false; - _this.uniform = false; - _this.mix = 1; - _this.softness = 0; - return _this; + _this2 = _callSuper$4(this, IkConstraintData, [name, 0, false]); + _this2.bones = new Array(); + _this2.target = null; + _this2.bendDirection = 1; + _this2.compress = false; + _this2.stretch = false; + _this2.uniform = false; + _this2.mix = 1; + _this2.softness = 0; + return _this2; } + _inherits(IkConstraintData, _ConstraintData); return _createClass(IkConstraintData); }(ConstraintData); + function _callSuper$3(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var PathConstraintData = function (_ConstraintData) { - _inherits(PathConstraintData, _ConstraintData); - var _super = _createSuper(PathConstraintData); function PathConstraintData(name) { - var _this; + var _this2; _classCallCheck(this, PathConstraintData); - _this = _super.call(this, name, 0, false); - _this.bones = new Array(); - _this.target = null; - _this.positionMode = null; - _this.spacingMode = null; - _this.rotateMode = null; - _this.offsetRotation = 0; - _this.position = 0; - _this.spacing = 0; - _this.mixRotate = 0; - _this.mixX = 0; - _this.mixY = 0; - return _this; + _this2 = _callSuper$3(this, PathConstraintData, [name, 0, false]); + _this2.bones = new Array(); + _this2.target = null; + _this2.positionMode = null; + _this2.spacingMode = null; + _this2.rotateMode = null; + _this2.offsetRotation = 0; + _this2.position = 0; + _this2.spacing = 0; + _this2.mixRotate = 0; + _this2.mixX = 0; + _this2.mixY = 0; + return _this2; } + _inherits(PathConstraintData, _ConstraintData); return _createClass(PathConstraintData); }(ConstraintData); var PositionMode; @@ -5984,7 +5733,7 @@ var spine = (function (pc) { this.mixX = data.mixX; this.mixY = data.mixY; } - _createClass(PathConstraint, [{ + return _createClass(PathConstraint, [{ key: "isActive", value: function isActive() { return this.active; @@ -6396,7 +6145,6 @@ var spine = (function (pc) { } } }]); - return PathConstraint; }(); PathConstraint.NONE = -1; PathConstraint.BEFORE = -2; @@ -6422,7 +6170,7 @@ var spine = (function (pc) { this.darkColor = !data.darkColor ? null : new Color(); this.setToSetupPose(); } - _createClass(Slot, [{ + return _createClass(Slot, [{ key: "getSkeleton", value: function getSkeleton() { return this.bone.skeleton; @@ -6463,7 +6211,6 @@ var spine = (function (pc) { } } }]); - return Slot; }(); var TransformConstraint = function () { @@ -6493,7 +6240,7 @@ var spine = (function (pc) { for (var i = 0; i < data.bones.length; i++) this.bones.push(skeleton.findBone(data.bones[i].name)); this.target = skeleton.findBone(data.target.name); } - _createClass(TransformConstraint, [{ + return _createClass(TransformConstraint, [{ key: "isActive", value: function isActive() { return this.active; @@ -6700,7 +6447,6 @@ var spine = (function (pc) { } } }]); - return TransformConstraint; }(); var Skeleton = function () { @@ -6761,7 +6507,7 @@ var spine = (function (pc) { this.color = new Color(1, 1, 1, 1); this.updateCache(); } - _createClass(Skeleton, [{ + return _createClass(Skeleton, [{ key: "updateCache", value: function updateCache() { var updateCache = this._updateCache; @@ -7195,7 +6941,6 @@ var spine = (function (pc) { this.time += delta; } }]); - return Skeleton; }(); var SkeletonData = function () { @@ -7221,7 +6966,7 @@ var spine = (function (pc) { this.imagesPath = null; this.audioPath = null; } - _createClass(SkeletonData, [{ + return _createClass(SkeletonData, [{ key: "findBone", value: function findBone(boneName) { if (!boneName) throw new Error("boneName cannot be null."); @@ -7310,7 +7055,6 @@ var spine = (function (pc) { return null; } }]); - return SkeletonData; }(); var SkinEntry = _createClass(function SkinEntry() { @@ -7332,7 +7076,7 @@ var spine = (function (pc) { if (!name) throw new Error("name cannot be null."); this.name = name; } - _createClass(Skin, [{ + return _createClass(Skin, [{ key: "setAttachment", value: function setAttachment(slotIndex, name, attachment) { if (!attachment) throw new Error("attachment cannot be null."); @@ -7477,7 +7221,6 @@ var spine = (function (pc) { } } }]); - return Skin; }(); var SlotData = _createClass(function SlotData(index, name, boneData) { @@ -7504,31 +7247,44 @@ var spine = (function (pc) { BlendMode[BlendMode["Screen"] = 3] = "Screen"; })(BlendMode || (BlendMode = {})); + function _callSuper$2(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var TransformConstraintData = function (_ConstraintData) { - _inherits(TransformConstraintData, _ConstraintData); - var _super = _createSuper(TransformConstraintData); function TransformConstraintData(name) { - var _this; + var _this2; _classCallCheck(this, TransformConstraintData); - _this = _super.call(this, name, 0, false); - _this.bones = new Array(); - _this.target = null; - _this.mixRotate = 0; - _this.mixX = 0; - _this.mixY = 0; - _this.mixScaleX = 0; - _this.mixScaleY = 0; - _this.mixShearY = 0; - _this.offsetRotation = 0; - _this.offsetX = 0; - _this.offsetY = 0; - _this.offsetScaleX = 0; - _this.offsetScaleY = 0; - _this.offsetShearY = 0; - _this.relative = false; - _this.local = false; - return _this; + _this2 = _callSuper$2(this, TransformConstraintData, [name, 0, false]); + _this2.bones = new Array(); + _this2.target = null; + _this2.mixRotate = 0; + _this2.mixX = 0; + _this2.mixY = 0; + _this2.mixScaleX = 0; + _this2.mixScaleY = 0; + _this2.mixShearY = 0; + _this2.offsetRotation = 0; + _this2.offsetX = 0; + _this2.offsetY = 0; + _this2.offsetScaleX = 0; + _this2.offsetScaleY = 0; + _this2.offsetShearY = 0; + _this2.relative = false; + _this2.local = false; + return _this2; } + _inherits(TransformConstraintData, _ConstraintData); return _createClass(TransformConstraintData); }(ConstraintData); @@ -7540,7 +7296,7 @@ var spine = (function (pc) { this.linkedMeshes = new Array(); this.attachmentLoader = attachmentLoader; } - _createClass(SkeletonBinary, [{ + return _createClass(SkeletonBinary, [{ key: "readSkeletonData", value: function readSkeletonData(binary) { var scale = this.scale; @@ -8378,7 +8134,6 @@ var spine = (function (pc) { return new Animation(name, timelines, duration); } }]); - return SkeletonBinary; }(); var BinaryInput = function () { function BinaryInput(data) { @@ -8390,7 +8145,7 @@ var spine = (function (pc) { this.index = index; this.buffer = buffer; } - _createClass(BinaryInput, [{ + return _createClass(BinaryInput, [{ key: "readByte", value: function readByte() { return this.buffer.getInt8(this.index++); @@ -8487,7 +8242,6 @@ var spine = (function (pc) { return this.readByte() != 0; } }]); - return BinaryInput; }(); var LinkedMesh$1 = _createClass(function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) { _classCallCheck(this, LinkedMesh); @@ -8596,7 +8350,7 @@ var spine = (function (pc) { return Utils.newFloatArray(16); }); } - _createClass(SkeletonBounds, [{ + return _createClass(SkeletonBounds, [{ key: "update", value: function update(skeleton, updateAabb) { if (!skeleton) throw new Error("skeleton cannot be null."); @@ -8763,7 +8517,6 @@ var spine = (function (pc) { return this.maxY - this.minY; } }]); - return SkeletonBounds; }(); var Triangulator = function () { @@ -8781,7 +8534,7 @@ var spine = (function (pc) { return new Array(); }); } - _createClass(Triangulator, [{ + return _createClass(Triangulator, [{ key: "triangulate", value: function triangulate(verticesArray) { var vertices = verticesArray; @@ -8994,7 +8747,6 @@ var spine = (function (pc) { return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1; } }]); - return Triangulator; }(); var SkeletonClipping = function () { @@ -9007,7 +8759,7 @@ var spine = (function (pc) { this.clippedTriangles = new Array(); this.scratch = new Array(); } - _createClass(SkeletonClipping, [{ + return _createClass(SkeletonClipping, [{ key: "clipStart", value: function clipStart(slot, clip) { if (this.clipAttachment) return 0; @@ -9310,7 +9062,6 @@ var spine = (function (pc) { } } }]); - return SkeletonClipping; }(); var SkeletonJson = function () { @@ -9321,7 +9072,7 @@ var spine = (function (pc) { this.linkedMeshes = new Array(); this.attachmentLoader = attachmentLoader; } - _createClass(SkeletonJson, [{ + return _createClass(SkeletonJson, [{ key: "readSkeletonData", value: function readSkeletonData(json) { var scale = this.scale; @@ -10040,7 +9791,6 @@ var spine = (function (pc) { skeletonData.animations.push(new Animation(name, timelines, duration)); } }]); - return SkeletonJson; }(); var LinkedMesh = _createClass(function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) { _classCallCheck(this, LinkedMesh); @@ -10132,7 +9882,7 @@ var spine = (function (pc) { this.jitterX = jitterX; this.jitterY = jitterY; } - _createClass(JitterEffect, [{ + return _createClass(JitterEffect, [{ key: "begin", value: function begin(skeleton) {} }, { @@ -10145,7 +9895,6 @@ var spine = (function (pc) { key: "end", value: function end() {} }]); - return JitterEffect; }(); var SwirlEffect = function () { @@ -10159,7 +9908,7 @@ var spine = (function (pc) { this.worldY = 0; this.radius = radius; } - _createClass(SwirlEffect, [{ + return _createClass(SwirlEffect, [{ key: "begin", value: function begin(skeleton) { this.worldX = skeleton.x + this.centerX; @@ -10184,7 +9933,6 @@ var spine = (function (pc) { key: "end", value: function end() {} }]); - return SwirlEffect; }(); SwirlEffect.interpolation = new PowOut(2); @@ -10320,7 +10068,7 @@ var spine = (function (pc) { }; this.pcTexture = texture; } - _createClass(SpineTextureWrapper, [{ + return _createClass(SpineTextureWrapper, [{ key: "setFilters", value: function setFilters(minFilter, magFilter) { this.pcTexture.minFilter = TO_TEXTURE_FILTER[minFilter]; @@ -10343,7 +10091,6 @@ var spine = (function (pc) { this.pcTexture.destroy(); } }]); - return SpineTextureWrapper; }(); function getDefaultExportFromCjs (x) { @@ -10433,8 +10180,11 @@ var spine = (function (pc) { createToken('XRANGEPLAINLOOSE', "[v=\\s]*(".concat(src[t.XRANGEIDENTIFIERLOOSE], ")") + "(?:\\.(".concat(src[t.XRANGEIDENTIFIERLOOSE], ")") + "(?:\\.(".concat(src[t.XRANGEIDENTIFIERLOOSE], ")") + "(?:".concat(src[t.PRERELEASELOOSE], ")?").concat(src[t.BUILD], "?") + ")?)?"); createToken('XRANGE', "^".concat(src[t.GTLT], "\\s*").concat(src[t.XRANGEPLAIN], "$")); createToken('XRANGELOOSE', "^".concat(src[t.GTLT], "\\s*").concat(src[t.XRANGEPLAINLOOSE], "$")); - createToken('COERCE', "".concat('(^|[^\\d])' + '(\\d{1,').concat(MAX_SAFE_COMPONENT_LENGTH, "})") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?") + "(?:$|[^\\d])"); + createToken('COERCEPLAIN', "".concat('(^|[^\\d])' + '(\\d{1,').concat(MAX_SAFE_COMPONENT_LENGTH, "})") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?")); + createToken('COERCE', "".concat(src[t.COERCEPLAIN], "(?:$|[^\\d])")); + createToken('COERCEFULL', src[t.COERCEPLAIN] + "(?:".concat(src[t.PRERELEASE], ")?") + "(?:".concat(src[t.BUILD], ")?") + "(?:$|[^\\d])"); createToken('COERCERTL', src[t.COERCE], true); + createToken('COERCERTLFULL', src[t.COERCEFULL], true); createToken('LONETILDE', '(?:~>?)'); createToken('TILDETRIM', "(\\s*)".concat(src[t.LONETILDE], "\\s+"), true); exports.tildeTrimReplace = '$1~'; @@ -10553,7 +10303,7 @@ var spine = (function (pc) { this.build = m[5] ? m[5].split('.') : []; this.format(); } - _createClass(SemVer, [{ + return _createClass(SemVer, [{ key: "format", value: function format() { this.version = "".concat(this.major, ".").concat(this.minor, ".").concat(this.patch); @@ -10631,7 +10381,7 @@ var spine = (function (pc) { do { var a = this.build[i]; var b = other.build[i]; - debug('prerelease compare', i, a, b); + debug('build compare', i, a, b); if (a === undefined && b === undefined) { return 0; } else if (b === undefined) { @@ -10742,7 +10492,6 @@ var spine = (function (pc) { return this; } }]); - return SemVer; }(); var semver$1 = SemVer$3; getDefaultExportFromCjs(semver$1); @@ -10790,727 +10539,76 @@ var spine = (function (pc) { options = options || {}; var match = null; if (!options.rtl) { - match = version.match(re[t.COERCE]); + match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]); } else { + var coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]; var next; - while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) { + while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next; } - re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; + coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length; } - re[t.COERCERTL].lastIndex = -1; + coerceRtlRegex.lastIndex = -1; } if (match === null) { return null; } - return parse("".concat(match[2], ".").concat(match[3] || '0', ".").concat(match[4] || '0'), options); + var major = match[2]; + var minor = match[3] || '0'; + var patch = match[4] || '0'; + var prerelease = options.includePrerelease && match[5] ? "-".concat(match[5]) : ''; + var build = options.includePrerelease && match[6] ? "+".concat(match[6]) : ''; + return parse("".concat(major, ".").concat(minor, ".").concat(patch).concat(prerelease).concat(build), options); }; var coerce_1 = coerce; var coerce$1 = getDefaultExportFromCjs(coerce_1); - var iterator; - var hasRequiredIterator; - function requireIterator() { - if (hasRequiredIterator) return iterator; - hasRequiredIterator = 1; - iterator = function iterator(Yallist) { - Yallist.prototype[Symbol.iterator] = _regeneratorRuntime().mark(function _callee() { - var walker; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - walker = this.head; - case 1: - if (!walker) { - _context.next = 7; - break; - } - _context.next = 4; - return walker.value; - case 4: - walker = walker.next; - _context.next = 1; - break; - case 7: - case "end": - return _context.stop(); - } - }, _callee, this); - }); - }; - return iterator; - } - - var yallist = Yallist$1; - Yallist$1.Node = Node; - Yallist$1.create = Yallist$1; - function Yallist$1(list) { - var self = this; - if (!(self instanceof Yallist$1)) { - self = new Yallist$1(); - } - self.tail = null; - self.head = null; - self.length = 0; - if (list && typeof list.forEach === 'function') { - list.forEach(function (item) { - self.push(item); - }); - } else if (arguments.length > 0) { - for (var i = 0, l = arguments.length; i < l; i++) { - self.push(arguments[i]); - } - } - return self; - } - Yallist$1.prototype.removeNode = function (node) { - if (node.list !== this) { - throw new Error('removing node which does not belong to this list'); - } - var next = node.next; - var prev = node.prev; - if (next) { - next.prev = prev; - } - if (prev) { - prev.next = next; - } - if (node === this.head) { - this.head = next; - } - if (node === this.tail) { - this.tail = prev; - } - node.list.length--; - node.next = null; - node.prev = null; - node.list = null; - return next; - }; - Yallist$1.prototype.unshiftNode = function (node) { - if (node === this.head) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - var head = this.head; - node.list = this; - node.next = head; - if (head) { - head.prev = node; - } - this.head = node; - if (!this.tail) { - this.tail = node; - } - this.length++; - }; - Yallist$1.prototype.pushNode = function (node) { - if (node === this.tail) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - var tail = this.tail; - node.list = this; - node.prev = tail; - if (tail) { - tail.next = node; - } - this.tail = node; - if (!this.head) { - this.head = node; - } - this.length++; - }; - Yallist$1.prototype.push = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - push(this, arguments[i]); - } - return this.length; - }; - Yallist$1.prototype.unshift = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - unshift(this, arguments[i]); - } - return this.length; - }; - Yallist$1.prototype.pop = function () { - if (!this.tail) { - return undefined; - } - var res = this.tail.value; - this.tail = this.tail.prev; - if (this.tail) { - this.tail.next = null; - } else { - this.head = null; - } - this.length--; - return res; - }; - Yallist$1.prototype.shift = function () { - if (!this.head) { - return undefined; - } - var res = this.head.value; - this.head = this.head.next; - if (this.head) { - this.head.prev = null; - } else { - this.tail = null; - } - this.length--; - return res; - }; - Yallist$1.prototype.forEach = function (fn, thisp) { - thisp = thisp || this; - for (var walker = this.head, i = 0; walker !== null; i++) { - fn.call(thisp, walker.value, i, this); - walker = walker.next; - } - }; - Yallist$1.prototype.forEachReverse = function (fn, thisp) { - thisp = thisp || this; - for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { - fn.call(thisp, walker.value, i, this); - walker = walker.prev; - } - }; - Yallist$1.prototype.get = function (n) { - for (var i = 0, walker = this.head; walker !== null && i < n; i++) { - walker = walker.next; - } - if (i === n && walker !== null) { - return walker.value; - } - }; - Yallist$1.prototype.getReverse = function (n) { - for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { - walker = walker.prev; - } - if (i === n && walker !== null) { - return walker.value; - } - }; - Yallist$1.prototype.map = function (fn, thisp) { - thisp = thisp || this; - var res = new Yallist$1(); - for (var walker = this.head; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.next; - } - return res; - }; - Yallist$1.prototype.mapReverse = function (fn, thisp) { - thisp = thisp || this; - var res = new Yallist$1(); - for (var walker = this.tail; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.prev; - } - return res; - }; - Yallist$1.prototype.reduce = function (fn, initial) { - var acc; - var walker = this.head; - if (arguments.length > 1) { - acc = initial; - } else if (this.head) { - walker = this.head.next; - acc = this.head.value; - } else { - throw new TypeError('Reduce of empty list with no initial value'); - } - for (var i = 0; walker !== null; i++) { - acc = fn(acc, walker.value, i); - walker = walker.next; - } - return acc; - }; - Yallist$1.prototype.reduceReverse = function (fn, initial) { - var acc; - var walker = this.tail; - if (arguments.length > 1) { - acc = initial; - } else if (this.tail) { - walker = this.tail.prev; - acc = this.tail.value; - } else { - throw new TypeError('Reduce of empty list with no initial value'); - } - for (var i = this.length - 1; walker !== null; i--) { - acc = fn(acc, walker.value, i); - walker = walker.prev; - } - return acc; - }; - Yallist$1.prototype.toArray = function () { - var arr = new Array(this.length); - for (var i = 0, walker = this.head; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.next; - } - return arr; - }; - Yallist$1.prototype.toArrayReverse = function () { - var arr = new Array(this.length); - for (var i = 0, walker = this.tail; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.prev; - } - return arr; - }; - Yallist$1.prototype.slice = function (from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; - } - from = from || 0; - if (from < 0) { - from += this.length; - } - var ret = new Yallist$1(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - for (var i = 0, walker = this.head; walker !== null && i < from; i++) { - walker = walker.next; - } - for (; walker !== null && i < to; i++, walker = walker.next) { - ret.push(walker.value); - } - return ret; - }; - Yallist$1.prototype.sliceReverse = function (from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; - } - from = from || 0; - if (from < 0) { - from += this.length; - } - var ret = new Yallist$1(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { - walker = walker.prev; - } - for (; walker !== null && i > from; i--, walker = walker.prev) { - ret.push(walker.value); - } - return ret; - }; - Yallist$1.prototype.splice = function (start, deleteCount) { - if (start > this.length) { - start = this.length - 1; - } - if (start < 0) { - start = this.length + start; - } - for (var i = 0, walker = this.head; walker !== null && i < start; i++) { - walker = walker.next; - } - var ret = []; - for (var i = 0; walker && i < deleteCount; i++) { - ret.push(walker.value); - walker = this.removeNode(walker); - } - if (walker === null) { - walker = this.tail; - } - if (walker !== this.head && walker !== this.tail) { - walker = walker.prev; - } - for (var i = 0; i < (arguments.length <= 2 ? 0 : arguments.length - 2); i++) { - walker = insert(this, walker, i + 2 < 2 || arguments.length <= i + 2 ? undefined : arguments[i + 2]); - } - return ret; - }; - Yallist$1.prototype.reverse = function () { - var head = this.head; - var tail = this.tail; - for (var walker = head; walker !== null; walker = walker.prev) { - var p = walker.prev; - walker.prev = walker.next; - walker.next = p; - } - this.head = tail; - this.tail = head; - return this; - }; - function insert(self, node, value) { - var inserted = node === self.head ? new Node(value, null, node, self) : new Node(value, node, node.next, self); - if (inserted.next === null) { - self.tail = inserted; - } - if (inserted.prev === null) { - self.head = inserted; - } - self.length++; - return inserted; - } - function push(self, item) { - self.tail = new Node(item, self.tail, null, self); - if (!self.head) { - self.head = self.tail; - } - self.length++; - } - function unshift(self, item) { - self.head = new Node(item, null, self.head, self); - if (!self.tail) { - self.tail = self.head; - } - self.length++; - } - function Node(value, prev, next, list) { - if (!(this instanceof Node)) { - return new Node(value, prev, next, list); - } - this.list = list; - this.value = value; - if (prev) { - prev.next = this; - this.prev = prev; - } else { - this.prev = null; - } - if (next) { - next.prev = this; - this.next = next; - } else { - this.next = null; - } - } - try { - requireIterator()(Yallist$1); - } catch (er) {} - getDefaultExportFromCjs(yallist); - - var Yallist = yallist; - var MAX = Symbol('max'); - var LENGTH = Symbol('length'); - var LENGTH_CALCULATOR = Symbol('lengthCalculator'); - var ALLOW_STALE = Symbol('allowStale'); - var MAX_AGE = Symbol('maxAge'); - var DISPOSE = Symbol('dispose'); - var NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet'); - var LRU_LIST = Symbol('lruList'); - var CACHE = Symbol('cache'); - var UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet'); - var naiveLength = function naiveLength() { - return 1; - }; var LRUCache = function () { - function LRUCache(options) { + function LRUCache() { _classCallCheck(this, LRUCache); - if (typeof options === 'number') options = { - max: options - }; - if (!options) options = {}; - if (options.max && (typeof options.max !== 'number' || options.max < 0)) throw new TypeError('max must be a non-negative number'); - this[MAX] = options.max || Infinity; - var lc = options.length || naiveLength; - this[LENGTH_CALCULATOR] = typeof lc !== 'function' ? naiveLength : lc; - this[ALLOW_STALE] = options.stale || false; - if (options.maxAge && typeof options.maxAge !== 'number') throw new TypeError('maxAge must be a number'); - this[MAX_AGE] = options.maxAge || 0; - this[DISPOSE] = options.dispose; - this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false; - this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false; - this.reset(); - } - _createClass(LRUCache, [{ - key: "max", - get: function get() { - return this[MAX]; - }, - set: function set(mL) { - if (typeof mL !== 'number' || mL < 0) throw new TypeError('max must be a non-negative number'); - this[MAX] = mL || Infinity; - trim(this); - } - }, { - key: "allowStale", - get: function get() { - return this[ALLOW_STALE]; - }, - set: function set(allowStale) { - this[ALLOW_STALE] = !!allowStale; - } - }, { - key: "maxAge", - get: function get() { - return this[MAX_AGE]; - }, - set: function set(mA) { - if (typeof mA !== 'number') throw new TypeError('maxAge must be a non-negative number'); - this[MAX_AGE] = mA; - trim(this); - } - }, { - key: "lengthCalculator", - get: function get() { - return this[LENGTH_CALCULATOR]; - }, - set: function set(lC) { - var _this = this; - if (typeof lC !== 'function') lC = naiveLength; - if (lC !== this[LENGTH_CALCULATOR]) { - this[LENGTH_CALCULATOR] = lC; - this[LENGTH] = 0; - this[LRU_LIST].forEach(function (hit) { - hit.length = _this[LENGTH_CALCULATOR](hit.value, hit.key); - _this[LENGTH] += hit.length; - }); - } - trim(this); - } - }, { - key: "length", - get: function get() { - return this[LENGTH]; - } - }, { - key: "itemCount", - get: function get() { - return this[LRU_LIST].length; - } - }, { - key: "rforEach", - value: function rforEach(fn, thisp) { - thisp = thisp || this; - for (var walker = this[LRU_LIST].tail; walker !== null;) { - var prev = walker.prev; - forEachStep(this, fn, walker, thisp); - walker = prev; - } - } - }, { - key: "forEach", - value: function forEach(fn, thisp) { - thisp = thisp || this; - for (var walker = this[LRU_LIST].head; walker !== null;) { - var next = walker.next; - forEachStep(this, fn, walker, thisp); - walker = next; - } - } - }, { - key: "keys", - value: function keys() { - return this[LRU_LIST].toArray().map(function (k) { - return k.key; - }); - } - }, { - key: "values", - value: function values() { - return this[LRU_LIST].toArray().map(function (k) { - return k.value; - }); - } - }, { - key: "reset", - value: function reset() { - var _this2 = this; - if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { - this[LRU_LIST].forEach(function (hit) { - return _this2[DISPOSE](hit.key, hit.value); - }); + this.max = 1000; + this.map = new Map(); + } + return _createClass(LRUCache, [{ + key: "get", + value: function get(key) { + var value = this.map.get(key); + if (value === undefined) { + return undefined; + } else { + this.map.delete(key); + this.map.set(key, value); + return value; } - this[CACHE] = new Map(); - this[LRU_LIST] = new Yallist(); - this[LENGTH] = 0; - } - }, { - key: "dump", - value: function dump() { - var _this3 = this; - return this[LRU_LIST].map(function (hit) { - return isStale(_this3, hit) ? false : { - k: hit.key, - v: hit.value, - e: hit.now + (hit.maxAge || 0) - }; - }).toArray().filter(function (h) { - return h; - }); - } - }, { - key: "dumpLru", - value: function dumpLru() { - return this[LRU_LIST]; } }, { - key: "set", - value: function set(key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE]; - if (maxAge && typeof maxAge !== 'number') throw new TypeError('maxAge must be a number'); - var now = maxAge ? Date.now() : 0; - var len = this[LENGTH_CALCULATOR](value, key); - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - _del(this, this[CACHE].get(key)); - return false; - } - var node = this[CACHE].get(key); - var item = node.value; - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) this[DISPOSE](key, item.value); - } - item.now = now; - item.maxAge = maxAge; - item.value = value; - this[LENGTH] += len - item.length; - item.length = len; - this.get(key); - trim(this); + key: "delete", + value: function _delete(key) { + if (this.map.has(key)) { + this.map.delete(key); return true; - } - var hit = new Entry(key, value, len, now, maxAge); - if (hit.length > this[MAX]) { - if (this[DISPOSE]) this[DISPOSE](key, value); + } else { return false; } - this[LENGTH] += hit.length; - this[LRU_LIST].unshift(hit); - this[CACHE].set(key, this[LRU_LIST].head); - trim(this); - return true; - } - }, { - key: "has", - value: function has(key) { - if (!this[CACHE].has(key)) return false; - var hit = this[CACHE].get(key).value; - return !isStale(this, hit); - } - }, { - key: "get", - value: function get(key) { - return _get(this, key, true); } }, { - key: "peek", - value: function peek(key) { - return _get(this, key, false); - } - }, { - key: "pop", - value: function pop() { - var node = this[LRU_LIST].tail; - if (!node) return null; - _del(this, node); - return node.value; - } - }, { - key: "del", - value: function del(key) { - _del(this, this[CACHE].get(key)); - } - }, { - key: "load", - value: function load(arr) { - this.reset(); - var now = Date.now(); - for (var l = arr.length - 1; l >= 0; l--) { - var hit = arr[l]; - var expiresAt = hit.e || 0; - if (expiresAt === 0) this.set(hit.k, hit.v);else { - var maxAge = expiresAt - now; - if (maxAge > 0) { - this.set(hit.k, hit.v, maxAge); - } + key: "set", + value: function set(key, value) { + var deleted = this.delete(key); + if (!deleted && value !== undefined) { + if (this.map.size >= this.max) { + var firstKey = this.map.keys().next().value; + this.delete(firstKey); } + this.map.set(key, value); } - } - }, { - key: "prune", - value: function prune() { - var _this4 = this; - this[CACHE].forEach(function (value, key) { - return _get(_this4, key, false); - }); + return this; } }]); - return LRUCache; }(); - var _get = function _get(self, key, doUse) { - var node = self[CACHE].get(key); - if (node) { - var hit = node.value; - if (isStale(self, hit)) { - _del(self, node); - if (!self[ALLOW_STALE]) return undefined; - } else { - if (doUse) { - if (self[UPDATE_AGE_ON_GET]) node.value.now = Date.now(); - self[LRU_LIST].unshiftNode(node); - } - } - return hit.value; - } - }; - var isStale = function isStale(self, hit) { - if (!hit || !hit.maxAge && !self[MAX_AGE]) return false; - var diff = Date.now() - hit.now; - return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && diff > self[MAX_AGE]; - }; - var trim = function trim(self) { - if (self[LENGTH] > self[MAX]) { - for (var walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null;) { - var prev = walker.prev; - _del(self, walker); - walker = prev; - } - } - }; - var _del = function _del(self, node) { - if (node) { - var hit = node.value; - if (self[DISPOSE]) self[DISPOSE](hit.key, hit.value); - self[LENGTH] -= hit.length; - self[CACHE].delete(hit.key); - self[LRU_LIST].removeNode(node); - } - }; - var Entry = _createClass(function Entry(key, value, length, now, maxAge) { - _classCallCheck(this, Entry); - this.key = key; - this.value = value; - this.length = length; - this.now = now; - this.maxAge = maxAge || 0; - }); - var forEachStep = function forEachStep(self, fn, node, thisp) { - var hit = node.value; - if (isStale(self, hit)) { - _del(self, node); - if (!self[ALLOW_STALE]) hit = undefined; - } - if (hit) fn.call(thisp, hit.value, hit.key, self); - }; - var lruCache = LRUCache; - getDefaultExportFromCjs(lruCache); + var lrucache = LRUCache; + getDefaultExportFromCjs(lrucache); var SemVer = semver$1; var compare$6 = function compare(a, b, loose) { @@ -11635,7 +10733,7 @@ var spine = (function (pc) { } debug('comp', this); } - _createClass(Comparator, [{ + return _createClass(Comparator, [{ key: "parse", value: function parse(comp) { var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; @@ -11721,7 +10819,6 @@ var spine = (function (pc) { return ANY; } }]); - return Comparator; }(); comparator = Comparator; var parseOptions = parseOptions_1; @@ -11796,7 +10893,7 @@ var spine = (function (pc) { } this.format(); } - _createClass(Range, [{ + return _createClass(Range, [{ key: "format", value: function format() { this.range = this.set.map(function (comps) { @@ -11904,13 +11001,10 @@ var spine = (function (pc) { return false; } }]); - return Range; }(); range = Range; - var LRU = lruCache; - var cache = new LRU({ - max: 1000 - }); + var LRU = lrucache; + var cache = new LRU(); var parseOptions = parseOptions_1; var Comparator = requireComparator(); var debug = debug_1; @@ -12100,7 +11194,7 @@ var spine = (function (pc) { return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ''); }; var hyphenReplace = function hyphenReplace(incPr) { - return function ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { + return function ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) { if (isX(fM)) { from = ''; } else if (isX(fm)) { @@ -12242,7 +11336,7 @@ var spine = (function (pc) { this.init(); this._hidden = false; } - _createClass(Spine, [{ + return _createClass(Spine, [{ key: "destroy", value: function destroy() { this.removeFromLayers(); @@ -12637,25 +11731,37 @@ var spine = (function (pc) { this.addToLayers(); } }]); - return Spine; }(); + function _callSuper$1(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var SpineComponent = function (_Component) { - _inherits(SpineComponent, _Component); - var _super = _createSuper(SpineComponent); function SpineComponent(system, entity) { - var _this; + var _this2; _classCallCheck(this, SpineComponent); - _this = _super.call(this, system, entity); - _this.on('set_atlasAsset', _this.onSetAsset, _assertThisInitialized(_this)); - _this.on('set_textureAssets', _this.onSetAssets, _assertThisInitialized(_this)); - _this.on('set_skeletonAsset', _this.onSetAsset, _assertThisInitialized(_this)); - _this.on('set_atlasData', _this.onSetResource, _assertThisInitialized(_this)); - _this.on('set_textures', _this.onSetResource, _assertThisInitialized(_this)); - _this.on('set_skeletonData', _this.onSetResource, _assertThisInitialized(_this)); - return _this; - } - _createClass(SpineComponent, [{ + _this2 = _callSuper$1(this, SpineComponent, [system, entity]); + _this2.on('set_atlasAsset', _this2.onSetAsset, _this2); + _this2.on('set_textureAssets', _this2.onSetAssets, _this2); + _this2.on('set_skeletonAsset', _this2.onSetAsset, _this2); + _this2.on('set_atlasData', _this2.onSetResource, _this2); + _this2.on('set_textures', _this2.onSetResource, _this2); + _this2.on('set_skeletonData', _this2.onSetResource, _this2); + return _this2; + } + _inherits(SpineComponent, _Component); + return _createClass(SpineComponent, [{ key: "_createSpine", value: function _createSpine() { if (this.data.spine) { @@ -12837,7 +11943,6 @@ var spine = (function (pc) { } } }]); - return SpineComponent; }(pc.Component); var SpineComponentData = _createClass(function SpineComponentData() { @@ -12853,26 +11958,39 @@ var spine = (function (pc) { this.skeletonData = null; }); + function _callSuper(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var SpineComponentSystem = function (_ComponentSystem) { - _inherits(SpineComponentSystem, _ComponentSystem); - var _super = _createSuper(SpineComponentSystem); function SpineComponentSystem(app) { - var _this; + var _this2; _classCallCheck(this, SpineComponentSystem); - _this = _super.call(this, app); - _this.id = 'spine'; - _this.ComponentType = SpineComponent; - _this.DataType = SpineComponentData; - _this.schema = ['enabled', 'atlasAsset', 'textureAssets', 'skeletonAsset', 'atlasData', 'textures', 'skeletonData', 'speed', 'spine']; - _this.on('beforeremove', _this.onBeforeRemove, _assertThisInitialized(_this)); - _this.app.systems.on('update', _this.onUpdate, _assertThisInitialized(_this)); - return _this; - } - _createClass(SpineComponentSystem, [{ + _this2 = _callSuper(this, SpineComponentSystem, [app]); + _this2.id = 'spine'; + _this2.ComponentType = SpineComponent; + _this2.DataType = SpineComponentData; + _this2.schema = ['enabled', 'atlasAsset', 'textureAssets', 'skeletonAsset', 'atlasData', 'textures', 'skeletonData', 'speed', 'spine']; + _this2.on('beforeremove', _this2.onBeforeRemove, _this2); + _this2.app.systems.on('update', _this2.onUpdate, _this2); + return _this2; + } + _inherits(SpineComponentSystem, _ComponentSystem); + return _createClass(SpineComponentSystem, [{ key: "initializeComponentData", value: function initializeComponentData(component, data, properties) { properties = ['enabled', 'atlasAsset', 'textureAssets', 'skeletonAsset', 'atlasData', 'textures', 'skeletonData', 'spine']; - _get$1(_getPrototypeOf(SpineComponentSystem.prototype), "initializeComponentData", this).call(this, component, data, properties); + _get(_getPrototypeOf(SpineComponentSystem.prototype), "initializeComponentData", this).call(this, component, data, properties); } }, { key: "onBeforeRemove", @@ -12901,7 +12019,6 @@ var spine = (function (pc) { } } }]); - return SpineComponentSystem; }(pc.ComponentSystem); (function () { diff --git a/build/playcanvas-spine.4.0.min.js b/build/playcanvas-spine.4.0.min.js index d1ca73f..4e96115 100644 --- a/build/playcanvas-spine.4.0.min.js +++ b/build/playcanvas-spine.4.0.min.js @@ -1 +1 @@ -var spine=function(t){"use strict";function e(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,n.get?n:{enumerable:!0,get:function(){return t[a]}})}})),e.default=t,Object.freeze(e)}var a=e(t);function n(){n=function(){return e};var t,e={},a=Object.prototype,r=a.hasOwnProperty,i=Object.defineProperty||function(t,e,a){t[e]=a.value},s="function"==typeof Symbol?Symbol:{},o=s.iterator||"@@iterator",h=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function u(t,e,a){return Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,a){return t[e]=a}}function c(t,e,a,n){var r=e&&e.prototype instanceof y?e:y,s=Object.create(r.prototype),o=new F(n||[]);return i(s,"_invoke",{value:T(t,a,o)}),s}function f(t,e,a){try{return{type:"normal",arg:t.call(e,a)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var d="suspendedStart",v="suspendedYield",m="executing",p="completed",g={};function y(){}function k(){}function b(){}var x={};u(x,o,(function(){return this}));var w=Object.getPrototypeOf,A=w&&w(w(Y([])));A&&A!==a&&r.call(A,o)&&(x=A);var I=b.prototype=y.prototype=Object.create(x);function E(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function a(n,i,s,o){var h=f(t[n],t,i);if("throw"!==h.type){var l=h.arg,u=l.value;return u&&"object"==typeof u&&r.call(u,"__await")?e.resolve(u.__await).then((function(t){a("next",t,s,o)}),(function(t){a("throw",t,s,o)})):e.resolve(u).then((function(t){l.value=t,s(l)}),(function(t){return a("throw",t,s,o)}))}o(h.arg)}var n;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,n){a(t,r,e,n)}))}return n=n?n.then(i,i):i()}})}function T(e,a,n){var r=d;return function(i,s){if(r===m)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw s;return{value:t,done:!0}}for(n.method=i,n.arg=s;;){var o=n.delegate;if(o){var h=R(o,n);if(h){if(h===g)continue;return h}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=m;var l=f(e,a,n);if("normal"===l.type){if(r=n.done?p:v,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=p,n.method="throw",n.arg=l.arg)}}}function R(e,a){var n=a.method,r=e.iterator[n];if(r===t)return a.delegate=null,"throw"===n&&e.iterator.return&&(a.method="return",a.arg=t,R(e,a),"throw"===a.method)||"return"!==n&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=f(r,e.iterator,a.arg);if("throw"===i.type)return a.method="throw",a.arg=i.arg,a.delegate=null,g;var s=i.arg;return s?s.done?(a[e.resultName]=s.value,a.next=e.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,g):s:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function Y(e){if(e||""===e){var a=e[o];if(a)return a.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function a(){for(;++n=0;--i){var s=this.tryEntries[i],o=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var h=r.call(s,"catchLoc"),l=r.call(s,"finallyLoc");if(h&&l){if(this.prev=0;--a){var n=this.tryEntries[a];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev=0;--e){var a=this.tryEntries[e];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),M(a),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var a=this.tryEntries[e];if(a.tryLoc===t){var n=a.completion;if("throw"===n.type){var r=n.arg;M(a)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,a,n){return this.delegate={iterator:Y(e),resultName:a,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var a=0;at.length)&&(e=t.length);for(var a=0,n=new Array(e);a=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){a=a.call(t)},n:function(){var t=a.next();return s=t.done,t},e:function(t){o=!0,i=t},f:function(){try{s||null==a.return||a.return()}finally{if(o)throw i}}}}function b(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var n=a.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var x=function(){function t(){i(this,t),this.array=new Array}return o(t,[{key:"add",value:function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e}},{key:"contains",value:function(t){return null!=this.array[0|t]}},{key:"remove",value:function(t){this.array[0|t]=void 0}},{key:"clear",value:function(){this.array.length=0}}]),t}(),w=function(){function t(){i(this,t),this.entries={},this.size=0}return o(t,[{key:"add",value:function(t){var e=this.entries[t];return this.entries[t]=!0,!e&&(this.size++,!0)}},{key:"addAll",value:function(t){for(var e=this.size,a=0,n=t.length;a0&&void 0!==arguments[0]?arguments[0]:0,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;i(this,t),this.r=e,this.g=a,this.b=n,this.a=r}return o(t,[{key:"set",value:function(t,e,a,n){return this.r=t,this.g=e,this.b=a,this.a=n,this.clamp()}},{key:"setFromColor",value:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}},{key:"setFromString",value:function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=8!=t.length?1:parseInt(t.substr(6,2),16)/255,this}},{key:"add",value:function(t,e,a,n){return this.r+=t,this.g+=e,this.b+=a,this.a+=n,this.clamp()}},{key:"clamp",value:function(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}}],[{key:"rgba8888ToColor",value:function(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255}},{key:"rgb888ToColor",value:function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255}},{key:"fromString",value:function(e){return(new t).setFromString(e)}}]),t}();A.WHITE=new A(1,1,1,1),A.RED=new A(1,0,0,1),A.GREEN=new A(0,1,0,1),A.BLUE=new A(0,0,1,1),A.MAGENTA=new A(1,0,1,1);var I=function(){function t(){i(this,t)}return o(t,null,[{key:"clamp",value:function(t,e,a){return ta?a:t}},{key:"cosDeg",value:function(e){return Math.cos(e*t.degRad)}},{key:"sinDeg",value:function(e){return Math.sin(e*t.degRad)}},{key:"signum",value:function(t){return t>0?1:t<0?-1:0}},{key:"toInt",value:function(t){return t>0?Math.floor(t):Math.ceil(t)}},{key:"cbrt",value:function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e}},{key:"randomTriangular",value:function(e,a){return t.randomTriangularWith(e,a,.5*(e+a))}},{key:"randomTriangularWith",value:function(t,e,a){var n=Math.random(),r=e-t;return n<=(a-t)/r?t+Math.sqrt(n*r*(a-t)):e-Math.sqrt((1-n)*r*(e-a))}},{key:"isPowerOfTwo",value:function(t){return t&&0==(t&t-1)}}]),t}();I.PI=3.1415927,I.PI2=2*I.PI,I.radiansToDegrees=180/I.PI,I.radDeg=I.radiansToDegrees,I.degreesToRadians=I.PI/180,I.degRad=I.degreesToRadians;var E=function(){function t(){i(this,t)}return o(t,[{key:"apply",value:function(t,e,a){return t+(e-t)*this.applyInternal(a)}}]),t}(),S=function(t){l(a,t);var e=d(a);function a(t){var n;return i(this,a),(n=e.call(this)).power=2,n.power=t,n}return o(a,[{key:"applyInternal",value:function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1}}]),a}(E),T=function(t){l(a,t);var e=d(a);function a(t){return i(this,a),e.call(this,t)}return o(a,[{key:"applyInternal",value:function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1}}]),a}(S),R=function(){function t(){i(this,t)}return o(t,null,[{key:"arrayCopy",value:function(t,e,a,n,r){for(var i=e,s=n;i2&&void 0!==arguments[2]?arguments[2]:0,n=t.length;if(n==e)return t;if(t.length=e,n2&&void 0!==arguments[2]?arguments[2]:0;return e.length>=a?e:t.setArraySize(e,a,n)}},{key:"newArray",value:function(t,e){for(var a=new Array(t),n=0;n0?this.items.pop():this.instantiator()}},{key:"free",value:function(t){t.reset&&t.reset(),this.items.push(t)}},{key:"freeAll",value:function(t){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:0,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;i(this,t),this.x=e,this.y=a}return o(t,[{key:"set",value:function(t,e){return this.x=t,this.y=e,this}},{key:"length",value:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}},{key:"normalize",value:function(){var t=this.length();return 0!=t&&(this.x/=t,this.y/=t),this}}]),t}(),Y=function(){function t(){i(this,t),this.maxDelta=.064,this.framesPerSecond=0,this.delta=0,this.totalTime=0,this.lastTime=Date.now()/1e3,this.frameCount=0,this.frameTime=0}return o(t,[{key:"update",value:function(){var t=Date.now()/1e3;this.delta=t-this.lastTime,this.frameTime+=this.delta,this.totalTime+=this.delta,this.delta>this.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)}}]),t}(),X=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;i(this,t),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(e)}return o(t,[{key:"hasEnoughData",value:function(){return this.addedValues>=this.values.length}},{key:"addValue",value:function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0}},{key:"getMean",value:function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*i;var s=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(l){for(var u=0,c=0,f=0;f0&&(h=o);for(var N=t.bone,P=N.worldX,_=N.worldY,O=N.a,B=N.b,D=N.c,V=N.d,U=e,W=r;W0&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;le)return n-1;return a-1}},{key:"search",value:function(t,e,a){for(var n=t.length,r=a;re)return r-a;return n-a}}]),t}(),it=function(t){l(a,t);var e=d(a);function a(t,n,r){var s;return i(this,a),(s=e.call(this,t,r)).curves=null,s.curves=R.newFloatArray(t+18*n),s.curves[t-1]=1,s}return o(a,[{key:"setLinear",value:function(t){this.curves[t]=0}},{key:"setStepped",value:function(t){this.curves[t]=1}},{key:"shrink",value:function(t){var e=this.getFrameCount()+18*t;if(this.curves.length>e){var a=R.newFloatArray(e);R.arrayCopy(this.curves,0,a,0,e),this.curves=a}}},{key:"setBezier",value:function(t,e,a,n,r,i,s,o,h,l,u){var c=this.curves,f=this.getFrameCount()+18*t;0==a&&(c[e]=2+f);for(var d=.03*(n-2*i+o),v=.03*(r-2*s+h),m=.006*(3*(i-o)-n+l),p=.006*(3*(s-h)-r+u),g=2*d+m,y=2*v+p,k=.3*(i-n)+d+.16666667*m,b=.3*(s-r)+v+.16666667*p,x=n+k,w=r+b,A=f+18;ft){var i=this.frames[e],s=this.frames[e+a];return s+(t-i)/(r[n]-i)*(r[n+1]-s)}var o=n+18;for(n+=2;n=t){var h=r[n-2],l=r[n-1];return l+(t-h)/(r[n]-h)*(r[n+1]-l)}e+=this.getFrameEntries();var u=r[o-2],c=r[o-1];return c+(t-u)/(this.frames[e]-u)*(this.frames[e+a]-c)}}]),a}(rt),st=function(t){l(a,t);var e=d(a);function a(t,n,r){return i(this,a),e.call(this,t,n,[r])}return o(a,[{key:"getFrameEntries",value:function(){return 2}},{key:"setFrame",value:function(t,e,a){t<<=1,this.frames[t]=e,this.frames[t+1]=a}},{key:"getCurveValue",value:function(t){for(var e=this.frames,a=e.length-2,n=2;n<=a;n+=2)if(e[n]>t){a=n-2;break}var r=this.curves[a>>1];switch(r){case 0:var i=e[a],s=e[a+1];return s+(t-i)/(e[a+2]-i)*(e[a+2+1]-s);case 1:return e[a+1]}return this.getBezierValue(t,a,1,r-2)}}]),a}(it),ot=function(t){l(a,t);var e=d(a);function a(t,n,r,s){return i(this,a),e.call(this,t,n,[r,s])}return o(a,[{key:"getFrameEntries",value:function(){return 3}},{key:"setFrame",value:function(t,e,a,n){t*=3,this.frames[t]=e,this.frames[t+1]=a,this.frames[t+2]=n}}]),a}(it),ht=function(t){l(a,t);var e=d(a);function a(t,n,r){var s;return i(this,a),(s=e.call(this,t,n,B+"|"+r)).boneIndex=0,s.boneIndex=r,s}return o(a,[{key:"apply",value:function(t,e,a,n,r,i,s){var o=t.bones[this.boneIndex];if(o.active)if(a>2];switch(m){case 0:var p=h[v];c=h[v+1],f=h[v+2],d=h[v+3];var g=(a-p)/(h[v+4]-p);c+=(h[v+4+1]-c)*g,f+=(h[v+4+2]-f)*g,d+=(h[v+4+3]-d)*g;break;case 1:c=h[v+1],f=h[v+2],d=h[v+3];break;default:c=this.getBezierValue(a,v,1,m-2),f=this.getBezierValue(a,v,2,m+18-2),d=this.getBezierValue(a,v,3,m+36-2)}if(1==r)l.r=c,l.g=f,l.b=d;else{if(i==P.setup){var y=o.data.color;l.r=y.r,l.g=y.g,l.b=y.b}l.r+=(c-l.r)*r,l.g+=(f-l.g)*r,l.b+=(d-l.b)*r}}}}}]),a}(it),bt=function(t){l(a,t);var e=d(a);function a(t,n,r){var s;return i(this,a),(s=e.call(this,t,n,z+"|"+r)).slotIndex=0,s.slotIndex=r,s}return o(a,[{key:"apply",value:function(t,e,a,n,r,i,s){var o=t.slots[this.slotIndex];if(o.bone.active){var h=o.color;if(a>3];switch(x){case 0:var w=h[b];d=h[b+1],v=h[b+2],m=h[b+3],p=h[b+4],g=h[b+5],y=h[b+6],k=h[b+7];var A=(a-w)/(h[b+8]-w);d+=(h[b+8+1]-d)*A,v+=(h[b+8+2]-v)*A,m+=(h[b+8+3]-m)*A,p+=(h[b+8+4]-p)*A,g+=(h[b+8+5]-g)*A,y+=(h[b+8+6]-y)*A,k+=(h[b+8+7]-k)*A;break;case 1:d=h[b+1],v=h[b+2],m=h[b+3],p=h[b+4],g=h[b+5],y=h[b+6],k=h[b+7];break;default:d=this.getBezierValue(a,b,1,x-2),v=this.getBezierValue(a,b,2,x+18-2),m=this.getBezierValue(a,b,3,x+36-2),p=this.getBezierValue(a,b,4,x+54-2),g=this.getBezierValue(a,b,5,x+72-2),y=this.getBezierValue(a,b,6,x+90-2),k=this.getBezierValue(a,b,7,x+108-2)}if(1==r)l.set(d,v,m,p),u.r=g,u.g=y,u.b=k;else{if(i==P.setup){l.setFromColor(o.data.color);var I=o.data.darkColor;u.r=I.r,u.g=I.g,u.b=I.b}l.add((d-l.r)*r,(v-l.g)*r,(m-l.b)*r,(p-l.a)*r),u.r+=(g-u.r)*r,u.g+=(y-u.g)*r,u.b+=(k-u.b)*r}}}}}]),a}(it),wt=function(t){l(a,t);var e=d(a);function a(t,n,r){var s;return i(this,a),(s=e.call(this,t,n,[G+"|"+r,H+"|"+r])).slotIndex=0,s.slotIndex=r,s}return o(a,[{key:"getFrameEntries",value:function(){return 7}},{key:"setFrame",value:function(t,e,a,n,r,i,s,o){t*=7,this.frames[t]=e,this.frames[t+1]=a,this.frames[t+2]=n,this.frames[t+3]=r,this.frames[t+4]=i,this.frames[t+5]=s,this.frames[t+6]=o}},{key:"apply",value:function(t,e,a,n,r,i,s){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames,l=o.color,u=o.darkColor;if(at){var i=this.frames[e];return a[n+1]*(t-i)/(a[n]-i)}var s=n+18;for(n+=2;n=t){var o=a[n-2],h=a[n-1];return h+(t-o)/(a[n]-o)*(a[n+1]-h)}var l=a[s-2],u=a[s-1];return u+(1-u)*(t-l)/(this.frames[e+this.getFrameEntries()]-l)}},{key:"apply",value:function(t,e,a,n,r,i,s){var o=t.slots[this.slotIndex];if(o.bone.active){var h=o.getAttachment();if(h instanceof N&&h.deformAttachment==this.attachment){var l=o.deform;0==l.length&&(i=P.setup);var u=this.vertices,c=u[0].length,f=this.frames;if(a=f[f.length-1]){var p=u[f.length-1];if(1==r)if(i==P.add){var g=h;if(g.bones)for(var y=0;ya)this.apply(t,e,Number.MAX_VALUE,n,r,i,s),e=-1;else if(e>=o[h-1])return;if(!(a0&&o[l-1]==u;)l--;for(;l=o[l];l++)n.push(this.events[l])}}}}]),a}(rt);Et.propertyIds=[""+Q];var St=function(t){l(a,t);var e=d(a);function a(t){var n;return i(this,a),(n=e.call(this,t,a.propertyIds)).drawOrders=null,n.drawOrders=new Array(t),n}return o(a,[{key:"getFrameCount",value:function(){return this.frames.length}},{key:"setFrame",value:function(t,e,a){this.frames[t]=e,this.drawOrders[t]=a}},{key:"apply",value:function(t,e,a,n,r,i,s){if(s!=_.mixOut)if(a>2];switch(d){case 0:var v=h[f];l=h[f+1],u=h[f+2],c=h[f+3];var m=(a-v)/(h[f+4]-v);l+=(h[f+4+1]-l)*m,u+=(h[f+4+2]-u)*m,c+=(h[f+4+3]-c)*m;break;case 1:l=h[f+1],u=h[f+2],c=h[f+3];break;default:l=this.getBezierValue(a,f,1,d-2),u=this.getBezierValue(a,f,2,d+18-2),c=this.getBezierValue(a,f,3,d+36-2)}if(i==P.setup){var p=o.data;o.mixRotate=p.mixRotate+(l-p.mixRotate)*r,o.mixX=p.mixX+(u-p.mixX)*r,o.mixY=p.mixY+(c-p.mixY)*r}else o.mixRotate+=(l-o.mixRotate)*r,o.mixX+=(u-o.mixX)*r,o.mixY+=(c-o.mixY)*r}}}}]),a}(it),Xt=function(){function t(e){i(this,t),this.data=null,this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Nt(this),this.propertyIDs=new w,this.animationsChanged=!1,this.trackEntryPool=new M((function(){return new Lt})),this.data=e}return o(t,[{key:"update",value:function(t){t*=this.timeScale;for(var e=this.tracks,a=0,n=e.length;a0){if(r.delay-=i,r.delay>0)continue;i=-r.delay,r.delay=0}var s=r.next;if(s){var o=r.trackLast-s.delay;if(o>=0){for(s.delay=0,s.trackTime+=0==r.timeScale?0:(o/r.timeScale+t)*s.timeScale,r.trackTime+=i,this.setCurrent(a,s,!0);s.mixingFrom;)s.mixTime+=t,s=s.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&!r.mixingFrom){e[a]=null,this.queue.end(r),this.clearNext(r);continue}if(r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for(r.mixingFrom=null,h&&(h.mixingTo=null);h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=i}}this.queue.drain()}},{key:"updateMixingFrom",value:function(t,e){var a=t.mixingFrom;if(!a)return!0;var n=this.updateMixingFrom(a,e);return a.animationLast=a.nextAnimationLast,a.trackLast=a.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=a.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=a.mixingFrom,a.mixingFrom&&(a.mixingFrom.mixingTo=t),t.interruptAlpha=a.interruptAlpha,this.queue.end(a)),n):(a.trackTime+=e*a.timeScale,t.mixTime+=e,!1)}},{key:"apply",value:function(t){if(!t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,a=this.tracks,n=!1,r=0,i=a.length;r0)){n=!0;var o=0==r?P.first:s.mixBlend,h=s.alpha;s.mixingFrom?h*=this.applyMixingFrom(s,t,o):s.trackTime>=s.trackEnd&&!s.next&&(h=0);var l=s.animationLast,u=s.getAnimationTime(),c=u,f=e;s.reverse&&(c=s.animation.duration-c,f=null);var d=s.animation.timelines,v=d.length;if(0==r&&1==h||o==P.add)for(var m=0;m1&&(r=1),a!=P.first&&(a=n.mixBlend));var i=r0&&this.queueEvents(n,f),this.events.length=0,n.nextAnimationLast=f,n.nextTrackLast=n.trackTime,r}},{key:"applyAttachmentTimeline",value:function(t,e,a,n,r){var i=e.slots[t.slotIndex];i.bone.active&&(a0,p=d>=0;I.signum(v)!=I.signum(f)&&Math.abs(v)<=90&&(Math.abs(d)>180&&(d+=360*I.signum(d)),p=m),c=f+d-d%360,p!=m&&(c+=360*I.signum(d)),i[s]=c}i[s+1]=f,h.rotation=l+c*n}}else t.apply(e,0,a,null,1,r,_.mixIn)}},{key:"queueEvents",value:function(t,e){for(var a=t.animationStart,n=t.animationEnd,r=n-a,i=t.trackLast%r,s=this.events,o=0,h=s.length;on||this.queue.event(t,l)}for((t.loop?0==r||i>t.trackTime%r:e>=n&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(e){this.queue.end(e),this.clearNext(e);for(var a=e;;){var n=a.mixingFrom;if(!n)break;this.queue.end(n),a.mixingFrom=null,a.mixingTo=null,a=n}this.tracks[e.trackIndex]=null,this.queue.drain()}}}},{key:"setCurrent",value:function(t,e,a){var n=this.expandToIndex(t);this.tracks[t]=e,e.previous=null,n&&(a&&this.queue.interrupt(n),e.mixingFrom=n,n.mixingTo=e,e.mixTime=0,n.mixingFrom&&n.mixDuration>0&&(e.interruptAlpha*=Math.min(1,n.mixTime/n.mixDuration)),n.timelinesRotation.length=0),this.queue.start(e)}},{key:"setAnimation",value:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.data.skeletonData.findAnimation(e);if(!n)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,n,a)}},{key:"setAnimationWith",value:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)throw new Error("animation cannot be null.");var n=!0,r=this.expandToIndex(t);r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.clearNext(r),r=r.mixingFrom,n=!1):this.clearNext(r));var i=this.trackEntry(t,e,a,r);return this.setCurrent(t,i,n),this.queue.drain(),i}},{key:"addAnimation",value:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=this.data.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,a,n)}},{key:"addAnimationWith",value:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(!e)throw new Error("animation cannot be null.");var r=this.expandToIndex(t);if(r)for(;r.next;)r=r.next;var i=this.trackEntry(t,e,a,r);return r?(r.next=i,i.previous=r,n<=0&&(n+=r.getTrackComplete()-i.mixDuration)):(this.setCurrent(t,i,!0),this.queue.drain()),i.delay=n,i}},{key:"setEmptyAnimation",value:function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.setAnimationWith(e,t.emptyAnimation(),!1);return n.mixDuration=a,n.trackEnd=a,n}},{key:"addEmptyAnimation",value:function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.addAnimationWith(e,t.emptyAnimation(),!1,n);return n<=0&&(r.delay+=r.mixDuration-a),r.mixDuration=a,r.trackEnd=a,r}},{key:"setEmptyAnimations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var a=0,n=this.tracks.length;a0){r[h]=Wt,i[h]=c;continue t}break}r[h]=Ut}else r[h]=Bt}}},{key:"getCurrent",value:function(t){return t>=this.tracks.length?null:this.tracks[t]}},{key:"addListener",value:function(t){if(!t)throw new Error("listener cannot be null.");this.listeners.push(t)}},{key:"removeListener",value:function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)}},{key:"clearListeners",value:function(){this.listeners.length=0}},{key:"clearListenerNotifications",value:function(){this.queue.clear()}}],[{key:"emptyAnimation",value:function(){return Gt||(Gt=new O("",[],0)),Gt}}]),t}(),Lt=function(){function t(){i(this,t),this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=P.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return o(t,[{key:"reset",value:function(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}},{key:"getAnimationTime",value:function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}},{key:"setAnimationLast",value:function(t){this.animationLast=t,this.nextAnimationLast=t}},{key:"isComplete",value:function(){return this.trackTime>=this.animationEnd-this.animationStart}},{key:"resetRotationDirections",value:function(){this.timelinesRotation.length=0}},{key:"getTrackComplete",value:function(){var t=this.animationEnd-this.animationStart;if(0!=t){if(this.loop)return t*(1+(this.trackTime/t|0));if(this.trackTime0&&(s.names=u,s.values=c,u=null,c=null),s.u=s.x/r.width,s.v=s.y/r.height,90==s.degrees?(s.u2=(s.x+s.height)/r.width,s.v2=(s.y+s.width)/r.height):(s.u2=(s.x+s.width)/r.width,s.v2=(s.y+s.height)/r.height),this.regions.push(s)}else{for((r=new ee).name=l.trim();0!=a.readEntry(n,l=a.readLine());){var p=o[n[0]];p&&p()}this.pages.push(r)}}return o(t,[{key:"findRegion",value:function(t){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:"",n=k(this.pages);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.setTexture(t.get(a+r.name))}}catch(t){n.e(t)}finally{n.f()}}},{key:"dispose",value:function(){for(var t=0;t=this.lines.length?null:this.lines[this.index++]}},{key:"readEntry",value:function(t,e){if(!e)return 0;if(0==(e=e.trim()).length)return 0;var a=e.indexOf(":");if(-1==a)return 0;t[0]=e.substr(0,a).trim();for(var n=1,r=a+1;;n++){var i=e.indexOf(",",r);if(-1==i)return t[n]=e.substr(r).trim(),n;if(t[n]=e.substr(r,i-r).trim(),r=i+1,4==n)return 4}}}]),t}(),ee=function(){function t(){i(this,t),this.name=null,this.minFilter=Pt.Nearest,this.magFilter=Pt.Nearest,this.uWrap=_t.ClampToEdge,this.vWrap=_t.ClampToEdge,this.texture=null,this.width=0,this.height=0,this.pma=!1}return o(t,[{key:"setTexture",value:function(t){this.texture=t,t.setFilters(this.minFilter,this.magFilter),t.setWraps(this.uWrap,this.vWrap)}}]),t}(),ae=function(t){l(a,t);var e=d(a);function a(){var t;return i(this,a),(t=e.apply(this,arguments)).page=null,t.name=null,t.x=0,t.y=0,t.offsetX=0,t.offsetY=0,t.originalWidth=0,t.originalHeight=0,t.index=0,t.degrees=0,t.names=null,t.values=null,t}return o(a)}(Qt),ne=function(t){l(a,t);var e=d(a);function a(t){var n;return i(this,a),(n=e.call(this,t)).region=null,n.path=null,n.regionUVs=null,n.uvs=null,n.triangles=null,n.color=new A(1,1,1,1),n.width=0,n.height=0,n.hullLength=0,n.edges=null,n.parentMesh=null,n.tempColor=new A(0,0,0,0),n}return o(a,[{key:"updateUVs",value:function(){var t=this.regionUVs;this.uvs&&this.uvs.length==t.length||(this.uvs=R.newFloatArray(t.length));var e=this.uvs,a=this.uvs.length,n=this.region.u,r=this.region.v,i=0,s=0;if(this.region instanceof ae){var o=this.region,h=o.page.texture.getImage(),l=h.width,u=h.height;switch(o.degrees){case 90:n-=(o.originalHeight-o.offsetY-o.height)/l,r-=(o.originalWidth-o.offsetX-o.width)/u,i=o.originalHeight/l,s=o.originalWidth/u;for(var c=0;c= 0.");if(!a)throw new Error("name cannot be null.");this.index=e,this.name=a,this.parent=n}));!function(t){t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection"}(oe||(oe={}));var ue,ce,fe,de=function(){function t(e,a,n){if(i(this,t),this.data=null,this.skeleton=null,this.parent=null,this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,!e)throw new Error("data cannot be null.");if(!a)throw new Error("skeleton cannot be null.");this.data=e,this.skeleton=a,this.parent=n,this.setToSetupPose()}return o(t,[{key:"isActive",value:function(){return this.active}},{key:"update",value:function(){this.updateWorldTransformWith(this.ax,this.ay,this.arotation,this.ascaleX,this.ascaleY,this.ashearX,this.ashearY)}},{key:"updateWorldTransform",value:function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)}},{key:"updateWorldTransformWith",value:function(t,e,a,n,r,i,s){this.ax=t,this.ay=e,this.arotation=a,this.ascaleX=n,this.ascaleY=r,this.ashearX=i,this.ashearY=s;var o=this.parent;if(!o){var h=this.skeleton,l=a+90+s,u=h.scaleX,c=h.scaleY;return this.a=I.cosDeg(a+i)*n*u,this.b=I.cosDeg(l)*r*u,this.c=I.sinDeg(a+i)*n*c,this.d=I.sinDeg(l)*r*c,this.worldX=t*u+h.x,void(this.worldY=e*c+h.y)}var f=o.a,d=o.b,v=o.c,m=o.d;switch(this.worldX=f*t+d*e+o.worldX,this.worldY=v*t+m*e+o.worldY,this.data.transformMode){case oe.Normal:var p=a+90+s,g=I.cosDeg(a+i)*n,y=I.cosDeg(p)*r,k=I.sinDeg(a+i)*n,b=I.sinDeg(p)*r;return this.a=f*g+d*k,this.b=f*y+d*b,this.c=v*g+m*k,void(this.d=v*y+m*b);case oe.OnlyTranslation:var x=a+90+s;this.a=I.cosDeg(a+i)*n,this.b=I.cosDeg(x)*r,this.c=I.sinDeg(a+i)*n,this.d=I.sinDeg(x)*r;break;case oe.NoRotationOrReflection:var w=f*f+v*v,A=0;w>1e-4?(w=Math.abs(f*m-d*v)/w,f/=this.skeleton.scaleX,d=(v/=this.skeleton.scaleY)*w,m=f*w,A=Math.atan2(v,f)*I.radDeg):(f=0,v=0,A=90-Math.atan2(m,d)*I.radDeg);var E=a+i-A,S=a+s-A+90,T=I.cosDeg(E)*n,R=I.cosDeg(S)*r,C=I.sinDeg(E)*n,M=I.sinDeg(S)*r;this.a=f*T-d*C,this.b=f*R-d*M,this.c=v*T+m*C,this.d=v*R+m*M;break;case oe.NoScale:case oe.NoScaleOrReflection:var F=I.cosDeg(a),Y=I.sinDeg(a),X=(f*F+d*Y)/this.skeleton.scaleX,L=(v*F+m*Y)/this.skeleton.scaleY,N=Math.sqrt(X*X+L*L);N>1e-5&&(N=1/N),X*=N,L*=N,N=Math.sqrt(X*X+L*L),this.data.transformMode==oe.NoScale&&f*m-d*v<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(N=-N);var P=Math.PI/2+Math.atan2(L,X),_=Math.cos(P)*N,O=Math.sin(P)*N,B=I.cosDeg(i)*n,D=I.cosDeg(90+s)*r,V=I.sinDeg(i)*n,U=I.sinDeg(90+s)*r;this.a=X*B+_*V,this.b=X*D+_*U,this.c=L*B+O*V,this.d=L*D+O*U}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY}},{key:"setToSetupPose",value:function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY}},{key:"getWorldRotationX",value:function(){return Math.atan2(this.c,this.a)*I.radDeg}},{key:"getWorldRotationY",value:function(){return Math.atan2(this.d,this.b)*I.radDeg}},{key:"getWorldScaleX",value:function(){return Math.sqrt(this.a*this.a+this.c*this.c)}},{key:"getWorldScaleY",value:function(){return Math.sqrt(this.b*this.b+this.d*this.d)}},{key:"updateAppliedTransform",value:function(){var t=this.parent;if(!t)return this.ax=this.worldX-this.skeleton.x,this.ay=this.worldY-this.skeleton.y,this.arotation=Math.atan2(this.c,this.a)*I.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*I.radDeg);var e=t.a,a=t.b,n=t.c,r=t.d,i=1/(e*r-a*n),s=this.worldX-t.worldX,o=this.worldY-t.worldY;this.ax=s*r*i-o*a*i,this.ay=o*e*i-s*n*i;var h=i*r,l=i*e,u=i*a,c=i*n,f=h*this.a-u*this.c,d=h*this.b-u*this.d,v=l*this.c-c*this.a,m=l*this.d-c*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+v*v),this.ascaleX>1e-4){var p=f*m-d*v;this.ascaleY=p/this.ascaleX,this.ashearY=Math.atan2(f*d+v*m,p)*I.radDeg,this.arotation=Math.atan2(v,f)*I.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(d*d+m*m),this.ashearY=0,this.arotation=90-Math.atan2(m,d)*I.radDeg}},{key:"worldToLocal",value:function(t){var e=1/(this.a*this.d-this.b*this.c),a=t.x-this.worldX,n=t.y-this.worldY;return t.x=a*this.d*e-n*this.b*e,t.y=n*this.a*e-a*this.c*e,t}},{key:"localToWorld",value:function(t){var e=t.x,a=t.y;return t.x=e*this.a+a*this.b+this.worldX,t.y=e*this.c+a*this.d+this.worldY,t}},{key:"worldToLocalRotation",value:function(t){var e=I.sinDeg(t),a=I.cosDeg(t);return Math.atan2(this.a*e-this.c*a,this.d*a-this.b*e)*I.radDeg+this.rotation-this.shearX}},{key:"localToWorldRotation",value:function(t){t-=this.rotation-this.shearX;var e=I.sinDeg(t),a=I.cosDeg(t);return Math.atan2(a*this.c+e*this.d,a*this.a+e*this.b)*I.radDeg}},{key:"rotateWorld",value:function(t){var e=this.a,a=this.b,n=this.c,r=this.d,i=I.cosDeg(t),s=I.sinDeg(t);this.a=i*e-s*n,this.b=i*a-s*r,this.c=s*e+i*n,this.d=s*a+i*r}}]),t}(),ve=o((function t(e,a,n){i(this,t),this.name=e,this.order=a,this.skinRequired=n})),me=function(){function t(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;i(this,t),this.pathPrefix=null,this.assets={},this.errors={},this.toLoad=0,this.loaded=0,this.textureLoader=e,this.pathPrefix=a,this.downloader=n||new pe}return o(t,[{key:"start",value:function(t){return this.toLoad++,this.pathPrefix+t}},{key:"success",value:function(t,e,a){this.toLoad--,this.loaded++,this.assets[e]=a,t&&t(e,a)}},{key:"error",value:function(t,e,a){this.toLoad--,this.loaded++,this.errors[e]=a,t&&t(e,a)}},{key:"loadAll",value:function(){var t=this;return new Promise((function(e,a){requestAnimationFrame((function n(){t.isLoadingComplete()?t.hasErrors()?a(t.errors):e(t):requestAnimationFrame(n)}))}))}},{key:"setRawDataURI",value:function(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}},{key:"loadBinary",value:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t=this.start(t),this.downloader.downloadBinary(t,(function(n){e.success(a,t,n)}),(function(a,r){e.error(n,t,"Couldn't load binary ".concat(t,": status ").concat(a,", ").concat(r))}))}},{key:"loadText",value:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t=this.start(t),this.downloader.downloadText(t,(function(n){e.success(a,t,n)}),(function(a,r){e.error(n,t,"Couldn't load text ".concat(t,": status ").concat(a,", ").concat(r))}))}},{key:"loadJson",value:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t=this.start(t),this.downloader.downloadJson(t,(function(n){e.success(a,t,n)}),(function(a,r){e.error(n,t,"Couldn't load JSON ".concat(t,": status ").concat(a,", ").concat(r))}))}},{key:"loadTexture",value:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t=this.start(t),!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document))fetch(t,{mode:"cors"}).then((function(a){return a.ok?a.blob():(e.error(n,t,"Couldn't load image: ".concat(t)),null)})).then((function(t){return t?createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null})).then((function(n){n&&e.success(a,t,e.textureLoader(n))}));else{var r=new Image;r.crossOrigin="anonymous",r.onload=function(){e.success(a,t,e.textureLoader(r))},r.onerror=function(){e.error(n,t,"Couldn't load image: ".concat(t))},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),r.src=t}}},{key:"loadTextureAtlas",value:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=t.lastIndexOf("/"),s=i>=0?t.substring(0,i+1):"";t=this.start(t),this.downloader.downloadText(t,(function(i){try{var o,h=new Kt(i),l=h.pages.length,u=!1,c=k(h.pages);try{var f=function(){var i=o.value;e.loadTexture(null==r?s+i.name:r[i.name],(function(n,r){u||(i.setTexture(r),0==--l&&e.success(a,t,h))}),(function(a,r){u||e.error(n,t,"Couldn't load texture atlas ".concat(t," page image: ").concat(a)),u=!0}))};for(c.s();!(o=c.n()).done;)f()}catch(t){c.e(t)}finally{c.f()}}catch(a){e.error(n,t,"Couldn't parse texture atlas ".concat(t,": ").concat(a.message))}}),(function(a,r){e.error(n,t,"Couldn't load texture atlas ".concat(t,": status ").concat(a,", ").concat(r))}))}},{key:"get",value:function(t){return this.assets[this.pathPrefix+t]}},{key:"require",value:function(t){t=this.pathPrefix+t;var e=this.assets[t];if(e)return e;var a=this.errors[t];throw Error("Asset not found: "+t+(a?"\n"+a:""))}},{key:"remove",value:function(t){t=this.pathPrefix+t;var e=this.assets[t];return e.dispose&&e.dispose(),delete this.assets[t],e}},{key:"removeAll",value:function(){for(var t in this.assets){var e=this.assets[t];e.dispose&&e.dispose()}this.assets={}}},{key:"isLoadingComplete",value:function(){return 0==this.toLoad}},{key:"getToLoad",value:function(){return this.toLoad}},{key:"getLoaded",value:function(){return this.loaded}},{key:"dispose",value:function(){this.removeAll()}},{key:"hasErrors",value:function(){return Object.keys(this.errors).length>0}},{key:"getErrors",value:function(){return this.errors}}]),t}(),pe=function(){function t(){i(this,t),this.callbacks={},this.rawDataUris={}}return o(t,[{key:"dataUriToString",value:function(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");var e=t.indexOf("base64,");return-1!=e?(e+=7,atob(t.substr(e))):t.substr(t.indexOf(",")+1)}},{key:"base64ToUint8Array",value:function(t){for(var e=window.atob(t),a=e.length,n=new Uint8Array(a),r=0;r180?f-=360:f<-180&&(f+=360);var x=t.ascaleX,w=t.ascaleY;if(n||r){switch(t.data.transformMode){case oe.NoScale:case oe.NoScaleOrReflection:d=e-t.worldX,v=a-t.worldY}var A=t.data.length*x,E=Math.sqrt(d*d+v*v);if(n&&EA&&A>1e-4){var S=(E/A-1)*s+1;x*=S,i&&(w*=S)}}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+f*s,x,w,t.ashearX,t.ashearY)}},{key:"apply2",value:function(t,e,a,n,r,i,s,o,h){var l=t.ax,u=t.ay,c=t.ascaleX,f=t.ascaleY,d=c,v=f,m=e.ascaleX,p=0,g=0,y=0;c<0?(c=-c,p=180,y=-1):(p=0,y=1),f<0&&(f=-f,y=-y),m<0?(m=-m,g=180):g=0;var k=e.ax,b=0,x=0,w=0,A=t.a,E=t.b,S=t.c,T=t.d,R=Math.abs(c-f)<=1e-4;!R||i?(b=0,x=A*k+t.worldX,w=S*k+t.worldY):(x=A*k+E*(b=e.ay)+t.worldX,w=S*k+T*b+t.worldY);var C=t.parent;A=C.a,E=C.b,S=C.c;var M,F,Y=1/(A*(T=C.d)-E*S),X=x-C.worldX,L=w-C.worldY,N=(X*T-L*E)*Y-l,P=(L*A-X*S)*Y-u,_=Math.sqrt(N*N+P*P),O=e.data.length*m;if(_<1e-4)return this.apply1(t,a,n,!1,i,!1,h),void e.updateWorldTransformWith(k,b,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);var B=((X=a-C.worldX)*T-(L=n-C.worldY)*E)*Y-l,D=(L*A-X*S)*Y-u,V=B*B+D*D;if(0!=o){o*=c*(m+1)*.5;var U=Math.sqrt(V),W=U-_-O*c+o;if(W>0){var j=Math.min(1,W/(2*o))-1;V=(B-=(j=(W-o*(1-j*j))/U)*B)*B+(D-=j*D)*D}}t:if(R){var q=(V-_*_-(O*=c)*O)/(2*_*O);q<-1?(q=-1,F=Math.PI*r):q>1?(q=1,F=0,i&&(d*=A=(Math.sqrt(V)/(_+O)-1)*h+1,s&&(v*=A))):F=Math.acos(q)*r,A=_+O*q,E=O*Math.sin(F),M=Math.atan2(D*A-B*E,B*A+D*E)}else{var G=(A=c*O)*A,z=(E=f*O)*E,H=Math.atan2(D,B),$=-2*z*_,J=z-G;if((T=$*$-4*J*(S=z*_*_+G*V-G*z))>=0){var Q=Math.sqrt(T);$<0&&(Q=-Q);var Z=(Q=.5*-($+Q))/J,K=S/Q,tt=Math.abs(Z)=-1&&S<=1&&(S=Math.acos(S),(T=(X=A*Math.cos(S)+_)*X+(L=E*Math.sin(S))*L)ot&&(it=S,ot=T,st=X,ht=L)),V<=.5*(nt+ot)?(M=H-Math.atan2(rt*r,at),F=et*r):(M=H-Math.atan2(ht*r,st),F=it*r)}var lt=Math.atan2(b,k)*y,ut=t.arotation;(M=(M-lt)*I.radDeg+p-ut)>180?M-=360:M<-180&&(M+=360),t.updateWorldTransformWith(l,u,ut+M*h,d,v,0,0),ut=e.arotation,(F=((F+lt)*I.radDeg-e.ashearX)*y+g-ut)>180?F-=360:F<-180&&(F+=360),e.updateWorldTransformWith(k,b,ut+F*h,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}}]),t}(),be=function(t){l(a,t);var e=d(a);function a(t){var n;return i(this,a),(n=e.call(this,t,0,!1)).bones=new Array,n.target=null,n.bendDirection=1,n.compress=!1,n.stretch=!1,n.uniform=!1,n.mix=1,n.softness=0,n}return o(a)}(ve),xe=function(t){l(a,t);var e=d(a);function a(t){var n;return i(this,a),(n=e.call(this,t,0,!1)).bones=new Array,n.target=null,n.positionMode=null,n.spacingMode=null,n.rotateMode=null,n.offsetRotation=0,n.position=0,n.spacing=0,n.mixRotate=0,n.mixX=0,n.mixY=0,n}return o(a)}(ve);!function(t){t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent"}(ue||(ue={})),function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent",t[t.Proportional=3]="Proportional"}(ce||(ce={})),function(t){t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale"}(fe||(fe={}));var we=function(){function t(e,a){if(i(this,t),this.data=null,this.bones=null,this.target=null,this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!e)throw new Error("data cannot be null.");if(!a)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(var n=0,r=e.bones.length;n0){b=u/b*d;for(var M=1;M0?I.degRad:-I.degRad}for(var q=0,G=3;q0){var tt=z.a,et=z.b,at=z.c,nt=z.d,rt=0,it=0,st=0;if(rt=s?B[G-1]:0==c[q+1]?B[G+2]:Math.atan2(Q,J),rt-=Math.atan2(at,tt),W){it=Math.cos(rt),st=Math.sin(rt);var ot=z.data.length;D+=(ot*(it*tt-st*at)-J)*a,V+=(ot*(st*tt+it*at)-Q)*a}else rt+=U;rt>I.PI?rt-=I.PI2:rt<-I.PI&&(rt+=I.PI2),rt*=a,it=Math.cos(rt),st=Math.sin(rt),z.a=it*tt-st*at,z.b=it*et-st*nt,z.c=st*tt+it*at,z.d=st*et+it*nt}z.updateAppliedTransform()}}}}},{key:"computeWorldPositions",value:function(e,a,n){var r=this.target,i=this.position,s=this.spaces,o=R.setArraySize(this.positions,3*a+2),h=null,l=e.closed,u=e.worldVerticesLength,c=u/6,f=t.NONE;if(!e.constantSpeed){var d,v=e.lengths,m=v[c-=l?1:2];switch(this.data.positionMode==ue.Percent&&(i*=m),this.data.spacingMode){case ce.Percent:d=m;break;case ce.Proportional:d=m/a;break;default:d=1}h=R.setArraySize(this.world,8);for(var p=0,g=0,y=0;pm){f!=t.AFTER&&(f=t.AFTER,e.computeWorldVertices(r,u-6,4,h,0,2)),this.addAfterPosition(b-m,h,0,o,g);continue}}for(;;y++){var x=v[y];if(!(b>x)){if(0==y)b/=x;else{var w=v[y-1];b=(b-w)/(x-w)}break}}y!=f&&(f=y,l&&y==c?(e.computeWorldVertices(r,u-4,4,h,0,2),e.computeWorldVertices(r,0,4,h,4,2)):e.computeWorldVertices(r,6*y+2,8,h,0,2)),this.addCurvePosition(b,h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],o,g,n||p>0&&0==k)}return o}l?(u+=2,h=R.setArraySize(this.world,u),e.computeWorldVertices(r,2,u-4,h,0,2),e.computeWorldVertices(r,0,2,h,u-4,2),h[u-2]=h[0],h[u-1]=h[1]):(c--,u-=4,h=R.setArraySize(this.world,u),e.computeWorldVertices(r,2,u,h,0,2));for(var A,I=R.setArraySize(this.curves,c),E=0,S=h[0],T=h[1],C=0,M=0,F=0,Y=0,X=0,L=0,N=0,P=0,_=0,O=0,B=0,D=0,V=0,U=0,W=0,j=2;WE){this.addAfterPosition(Z-E,h,u-4,o,H);continue}}for(;;$++){var K=I[$];if(!(Z>K)){if(0==$)Z/=K;else{var tt=I[$-1];Z=(Z-tt)/(K-tt)}break}}if($!=f){f=$;var et=6*$;for(S=h[et],T=h[et+1],C=h[et+2],M=h[et+3],F=h[et+4],Y=h[et+5],B=2*(N=.03*(S-2*C+F))+(_=.006*(3*(C-F)-S+(X=h[et+6]))),D=2*(P=.03*(T-2*M+Y))+(O=.006*(3*(M-Y)-T+(L=h[et+7]))),V=.3*(C-S)+N+.16666667*_,U=.3*(M-T)+P+.16666667*O,G=Math.sqrt(V*V+U*U),q[0]=G,et=1;et<8;et++)V+=B,U+=D,B+=_,D+=O,G+=Math.sqrt(V*V+U*U),q[et]=G;V+=B,U+=D,G+=Math.sqrt(V*V+U*U),q[8]=G,V+=B+_,U+=D+O,G+=Math.sqrt(V*V+U*U),q[9]=G,J=0}for(Z*=G;;J++){var at=q[J];if(!(Z>at)){if(0==J)Z/=at;else{var nt=q[J-1];Z=J+(Z-nt)/(at-nt)}break}}this.addCurvePosition(.1*Z,S,T,C,M,F,Y,X,L,o,H,n||z>0&&0==Q)}return o}},{key:"addBeforePosition",value:function(t,e,a,n,r){var i=e[a],s=e[a+1],o=e[a+2]-i,h=e[a+3]-s,l=Math.atan2(h,o);n[r]=i+t*Math.cos(l),n[r+1]=s+t*Math.sin(l),n[r+2]=l}},{key:"addAfterPosition",value:function(t,e,a,n,r){var i=e[a+2],s=e[a+3],o=i-e[a],h=s-e[a+1],l=Math.atan2(h,o);n[r]=i+t*Math.cos(l),n[r+1]=s+t*Math.sin(l),n[r+2]=l}},{key:"addCurvePosition",value:function(t,e,a,n,r,i,s,o,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=a,void(l[u+2]=Math.atan2(r-a,n-e));var f=t*t,d=f*t,v=1-t,m=v*v,p=m*v,g=v*t,y=3*g,k=v*y,b=y*t,x=e*p+n*k+i*b+o*d,w=a*p+r*k+s*b+h*d;l[u]=x,l[u+1]=w,c&&(l[u+2]=t<.001?Math.atan2(r-a,n-e):Math.atan2(w-(a*m+r*g*2+s*f),x-(e*m+n*g*2+i*f)))}}]),t}();we.NONE=-1,we.BEFORE=-2,we.AFTER=-3,we.epsilon=1e-5;var Ae,Ie=function(){function t(e,a){if(i(this,t),this.data=null,this.bone=null,this.color=null,this.darkColor=null,this.attachment=null,this.attachmentTime=0,this.attachmentState=0,this.deform=new Array,!e)throw new Error("data cannot be null.");if(!a)throw new Error("bone cannot be null.");this.data=e,this.bone=a,this.color=new A,this.darkColor=e.darkColor?new A:null,this.setToSetupPose()}return o(t,[{key:"getSkeleton",value:function(){return this.bone.skeleton}},{key:"getAttachment",value:function(){return this.attachment}},{key:"setAttachment",value:function(t){this.attachment!=t&&(t instanceof N&&this.attachment instanceof N&&t.deformAttachment==this.attachment.deformAttachment||(this.deform.length=0),this.attachment=t,this.attachmentTime=this.bone.skeleton.time)}},{key:"setAttachmentTime",value:function(t){this.attachmentTime=this.bone.skeleton.time-t}},{key:"getAttachmentTime",value:function(){return this.bone.skeleton.time-this.attachmentTime}},{key:"setToSetupPose",value:function(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}}]),t}(),Ee=function(){function t(e,a){if(i(this,t),this.data=null,this.bones=null,this.target=null,this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new F,this.active=!1,!e)throw new Error("data cannot be null.");if(!a)throw new Error("skeleton cannot be null.");this.data=e,this.mixRotate=e.mixRotate,this.mixX=e.mixX,this.mixY=e.mixY,this.mixScaleX=e.mixScaleX,this.mixScaleY=e.mixScaleY,this.mixShearY=e.mixShearY,this.bones=new Array;for(var n=0;n0?I.degRad:-I.degRad,d=this.data.offsetRotation*f,v=this.data.offsetShearY*f,m=this.bones,p=0,g=m.length;pI.PI?A-=I.PI2:A<-I.PI&&(A+=I.PI2),A*=t;var E=Math.cos(A),S=Math.sin(A);y.a=E*k-S*x,y.b=E*b-S*w,y.c=S*k+E*x,y.d=S*b+E*w}if(s){var T=this.temp;o.localToWorld(T.set(this.data.offsetX,this.data.offsetY)),y.worldX+=(T.x-y.worldX)*e,y.worldY+=(T.y-y.worldY)*a}if(0!=n){var R=Math.sqrt(y.a*y.a+y.c*y.c);0!=R&&(R=(R+(Math.sqrt(h*h+u*u)-R+this.data.offsetScaleX)*n)/R),y.a*=R,y.c*=R}if(0!=r){var C=Math.sqrt(y.b*y.b+y.d*y.d);0!=C&&(C=(C+(Math.sqrt(l*l+c*c)-C+this.data.offsetScaleY)*r)/C),y.b*=C,y.d*=C}if(i>0){var M=y.b,F=y.d,Y=Math.atan2(F,M),X=Math.atan2(c,l)-Math.atan2(u,h)-(Y-Math.atan2(y.c,y.a));X>I.PI?X-=I.PI2:X<-I.PI&&(X+=I.PI2),X=Y+(X+v)*i;var L=Math.sqrt(M*M+F*F);y.b=Math.cos(X)*L,y.d=Math.sin(X)*L}y.updateAppliedTransform()}}},{key:"applyRelativeWorld",value:function(){for(var t=this.mixRotate,e=this.mixX,a=this.mixY,n=this.mixScaleX,r=this.mixScaleY,i=this.mixShearY,s=0!=e||0!=a,o=this.target,h=o.a,l=o.b,u=o.c,c=o.d,f=h*c-l*u>0?I.degRad:-I.degRad,d=this.data.offsetRotation*f,v=this.data.offsetShearY*f,m=this.bones,p=0,g=m.length;pI.PI?A-=I.PI2:A<-I.PI&&(A+=I.PI2),A*=t;var E=Math.cos(A),S=Math.sin(A);y.a=E*k-S*x,y.b=E*b-S*w,y.c=S*k+E*x,y.d=S*b+E*w}if(s){var T=this.temp;o.localToWorld(T.set(this.data.offsetX,this.data.offsetY)),y.worldX+=T.x*e,y.worldY+=T.y*a}if(0!=n){var R=(Math.sqrt(h*h+u*u)-1+this.data.offsetScaleX)*n+1;y.a*=R,y.c*=R}if(0!=r){var C=(Math.sqrt(l*l+c*c)-1+this.data.offsetScaleY)*r+1;y.b*=C,y.d*=C}if(i>0){var M=Math.atan2(c,l)-Math.atan2(u,h);M>I.PI?M-=I.PI2:M<-I.PI&&(M+=I.PI2);var F=y.b,Y=y.d;M=Math.atan2(Y,F)+(M-I.PI/2+v)*i;var X=Math.sqrt(F*F+Y*Y);y.b=Math.cos(M)*X,y.d=Math.sin(M)*X}y.updateAppliedTransform()}}},{key:"applyAbsoluteLocal",value:function(){for(var t=this.mixRotate,e=this.mixX,a=this.mixY,n=this.mixScaleX,r=this.mixScaleY,i=this.mixShearY,s=this.target,o=this.bones,h=0,l=o.length;h2&&void 0!==arguments[2]?arguments[2]:new Array(2);if(!t)throw new Error("offset cannot be null.");if(!e)throw new Error("size cannot be null.");for(var n=this.drawOrder,r=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY,h=0,l=n.length;h0&&void 0!==arguments[0]?arguments[0]:0,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;i(this,t),this.slotIndex=e,this.name=a,this.attachment=n})),Ce=function(){function t(e){if(i(this,t),this.name=null,this.attachments=new Array,this.bones=Array(),this.constraints=new Array,!e)throw new Error("name cannot be null.");this.name=e}return o(t,[{key:"setAttachment",value:function(t,e,a){if(!a)throw new Error("attachment cannot be null.");var n=this.attachments;t>=n.length&&(n.length=t+1),n[t]||(n[t]={}),n[t][e]=a}},{key:"addSkin",value:function(t){for(var e=0;e= 0.");if(!a)throw new Error("name cannot be null.");if(!n)throw new Error("boneData cannot be null.");this.index=e,this.name=a,this.boneData=n}));!function(t){t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen"}(Ae||(Ae={}));var Fe,Ye=function(t){l(a,t);var e=d(a);function a(t){var n;return i(this,a),(n=e.call(this,t,0,!1)).bones=new Array,n.target=null,n.mixRotate=0,n.mixX=0,n.mixY=0,n.mixScaleX=0,n.mixScaleY=0,n.mixShearY=0,n.offsetRotation=0,n.offsetX=0,n.offsetY=0,n.offsetScaleX=0,n.offsetScaleY=0,n.offsetShearY=0,n.relative=!1,n.local=!1,n}return o(a)}(ve),Xe=function(){function t(e){i(this,t),this.scale=1,this.attachmentLoader=null,this.linkedMeshes=new Array,this.attachmentLoader=e}return o(t,[{key:"readSkeletonData",value:function(t){var e=this.scale,a=new Te;a.name="";var n=new Le(t),r=n.readInt32(),i=n.readInt32();a.hash=0==i&&0==r?null:i.toString(16)+r.toString(16),a.version=n.readString(),a.x=n.readFloat(),a.y=n.readFloat(),a.width=n.readFloat(),a.height=n.readFloat();var s=n.readBoolean();s&&(a.fps=n.readFloat(),a.imagesPath=n.readString(),a.audioPath=n.readString());var o=0;o=n.readInt(!0);for(var h=0;h0){for(var pn=new St(mn),gn=a.slots.length,yn=0;yn=0;wn--)xn[wn]=-1;for(var An=R.newArray(gn-bn,0),In=0,En=0,Sn=0;Sn=0;Rn--)-1==xn[Rn]&&(xn[Rn]=An[--En]);pn.setFrame(yn,kn,xn)}n.push(pn)}var Cn=t.readInt(!0);if(Cn>0){for(var Mn=new Et(Cn),Fn=0;Fn1&&void 0!==arguments[1]?arguments[1]:new Array,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new DataView(e.buffer);i(this,t),this.strings=a,this.index=n,this.buffer=r}return o(t,[{key:"readByte",value:function(){return this.buffer.getInt8(this.index++)}},{key:"readUnsignedByte",value:function(){return this.buffer.getUint8(this.index++)}},{key:"readShort",value:function(){var t=this.buffer.getInt16(this.index);return this.index+=2,t}},{key:"readInt32",value:function(){var t=this.buffer.getInt32(this.index);return this.index+=4,t}},{key:"readInt",value:function(t){var e=this.readByte(),a=127&e;return 0!=(128&e)&&(a|=(127&(e=this.readByte()))<<7,0!=(128&e)&&(a|=(127&(e=this.readByte()))<<14,0!=(128&e)&&(a|=(127&(e=this.readByte()))<<21,0!=(128&e)&&(a|=(127&(e=this.readByte()))<<28)))),t?a:a>>>1^-(1&a)}},{key:"readStringRef",value:function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]}},{key:"readString",value:function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",a=0;a>4){case 12:case 13:e+=String.fromCharCode((31&n)<<6|63&this.readByte()),a+=2;break;case 14:e+=String.fromCharCode((15&n)<<12|(63&this.readByte())<<6|63&this.readByte()),a+=3;break;default:e+=String.fromCharCode(n),a++}}return e}},{key:"readFloat",value:function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t}},{key:"readBoolean",value:function(){return 0!=this.readByte()}}]),t}(),Ne=o((function t(e,a,n,r,s){i(this,t),this.mesh=e,this.skin=a,this.slotIndex=n,this.parent=r,this.inheritDeform=s})),Pe=o((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;i(this,t),this.bones=e,this.vertices=a}));function _e(t,e,a){for(var n=t.readFloat(),r=t.readFloat()*a,i=0,s=0,o=e.getFrameCount()-1;e.setFrame(i,n,r),i!=o;i++){var h=t.readFloat(),l=t.readFloat()*a;switch(t.readByte()){case sa:e.setStepped(i);break;case oa:Be(t,e,s++,i,0,n,h,r,l,a)}n=h,r=l}return e}function Oe(t,e,a){for(var n=t.readFloat(),r=t.readFloat()*a,i=t.readFloat()*a,s=0,o=0,h=e.getFrameCount()-1;e.setFrame(s,n,r,i),s!=h;s++){var l=t.readFloat(),u=t.readFloat()*a,c=t.readFloat()*a;switch(t.readByte()){case sa:e.setStepped(s);break;case oa:Be(t,e,o++,s,0,n,l,r,u,a),Be(t,e,o++,s,1,n,l,i,c,a)}n=l,r=u,i=c}return e}function Be(t,e,a,n,r,i,s,o,h,l){e.setBezier(a,n,r,i,o,t.readFloat(),t.readFloat()*l,t.readFloat(),t.readFloat()*l,s,h)}!function(t){t[t.Region=0]="Region",t[t.BoundingBox=1]="BoundingBox",t[t.Mesh=2]="Mesh",t[t.LinkedMesh=3]="LinkedMesh",t[t.Path=4]="Path",t[t.Point=5]="Point",t[t.Clipping=6]="Clipping"}(Fe||(Fe={}));var De,Ve=0,Ue=1,We=2,je=3,qe=4,Ge=5,ze=6,He=7,$e=8,Je=9,Qe=0,Ze=1,Ke=2,ta=3,ea=4,aa=5,na=0,ra=1,ia=2,sa=1,oa=2,ha=function(){function t(){i(this,t),this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new M((function(){return R.newFloatArray(16)}))}return o(t,[{key:"update",value:function(t,e){if(!t)throw new Error("skeleton cannot be null.");var a=this.boundingBoxes,n=this.polygons,r=this.polygonPool,i=t.slots,s=i.length;a.length=0,r.freeAll(n),n.length=0;for(var o=0;o=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY}},{key:"aabbIntersectsSegment",value:function(t,e,a,n){var r=this.minX,i=this.minY,s=this.maxX,o=this.maxY;if(t<=r&&a<=r||e<=i&&n<=i||t>=s&&a>=s||e>=o&&n>=o)return!1;var h=(n-e)/(a-t),l=h*(r-t)+e;if(l>i&&li&&lr&&ur&&ut.minX&&this.minYt.minY}},{key:"containsPoint",value:function(t,e){for(var a=this.polygons,n=0,r=a.length;n=a||l=a){var u=n[o];u+(a-h)/(l-h)*(n[i]-u)=u&&k<=d||k>=d&&k<=u)&&(k>=e&&k<=n||k>=n&&k<=e)){var b=(l*g-h*m)/y;if((b>=c&&b<=v||b>=v&&b<=c)&&(b>=a&&b<=r||b>=r&&b<=a))return!0}u=d,c=v}return!1}},{key:"getPolygon",value:function(t){if(!t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]}},{key:"getWidth",value:function(){return this.maxX-this.minX}},{key:"getHeight",value:function(){return this.maxY-this.minY}}]),t}(),la=function(){function t(){i(this,t),this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new M((function(){return new Array})),this.polygonIndicesPool=new M((function(){return new Array}))}return o(t,[{key:"triangulate",value:function(e){var a=e,n=e.length>>1,r=this.indicesArray;r.length=0;for(var i=0;i3;){for(var u=n-1,c=0,f=1;;){t:if(!s[c]){for(var d=r[u]<<1,v=r[c]<<1,m=r[f]<<1,p=a[d],g=a[d+1],y=a[v],k=a[v+1],b=a[m],x=a[m+1],w=(f+1)%n;w!=u;w=(w+1)%n)if(s[w]){var A=r[w]<<1,I=a[A],E=a[A+1];if(t.positiveArea(b,x,p,g,I,E)&&t.positiveArea(p,g,y,k,I,E)&&t.positiveArea(y,k,b,x,I,E))break t}break}if(0==f){do{if(!s[c])break;c--}while(c>0);break}u=c,c=f,f=(f+1)%n}l.push(r[(n+c-1)%n]),l.push(r[c]),l.push(r[(c+1)%n]),r.splice(c,1),s.splice(c,1);var S=(--n+c-1)%n,T=c==n?0:c;s[S]=t.isConcave(S,n,a,r),s[T]=t.isConcave(T,n,a,r)}return 3==n&&(l.push(r[2]),l.push(r[0]),l.push(r[1])),l}},{key:"decompose",value:function(e,a){var n=e,r=this.convexPolygons;this.polygonPool.freeAll(r),r.length=0;var i=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(i),i.length=0;var s=this.polygonIndicesPool.obtain();s.length=0;var o=this.polygonPool.obtain();o.length=0;for(var h=-1,l=0,u=0,c=a.length;u0?(r.push(o),i.push(s)):(this.polygonPool.free(o),this.polygonIndicesPool.free(s)),(o=this.polygonPool.obtain()).length=0,o.push(m),o.push(p),o.push(g),o.push(y),o.push(k),o.push(b),(s=this.polygonIndicesPool.obtain()).length=0,s.push(f),s.push(d),s.push(v),l=t.winding(m,p,g,y,k,b),h=f)}o.length>0&&(r.push(o),i.push(s));for(var E=0,S=r.length;E=0;$--)0==(o=r[$]).length&&(r.splice($,1),this.polygonPool.free(o),s=i[$],i.splice($,1),this.polygonIndicesPool.free(s));return r}}],[{key:"isConcave",value:function(t,e,a,n){var r=n[(e+t-1)%e]<<1,i=n[t]<<1,s=n[(t+1)%e]<<1;return!this.positiveArea(a[r],a[r+1],a[i],a[i+1],a[s],a[s+1])}},{key:"positiveArea",value:function(t,e,a,n,r,i){return t*(i-n)+a*(e-i)+r*(n-e)>=0}},{key:"winding",value:function(t,e,a,n,r,i){var s=a-t,o=n-e;return r*o-i*s+s*e-t*o>=0?1:-1}}]),t}(),ua=function(){function t(){i(this,t),this.triangulator=new la,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array}return o(t,[{key:"clipStart",value:function(e,a){if(this.clipAttachment)return 0;this.clipAttachment=a;var n=a.worldVerticesLength,r=R.setArraySize(this.clippingPolygon,n);a.computeWorldVertices(e,0,n,r,0,2);var i=this.clippingPolygon;t.makeClockwise(i);for(var s=this.clippingPolygons=this.triangulator.decompose(i,this.triangulator.triangulate(i)),o=0,h=s.length;o>1,V=this.clipOutput,U=R.setArraySize(l,F+D*d),W=0;W=2?(u=o,o=this.scratch):u=this.scratch,u.length=0,u.push(t),u.push(e),u.push(a),u.push(n),u.push(r),u.push(i),u.push(t),u.push(e),o.length=0;for(var c=s,f=s.length-4,d=0;;d+=2){for(var v=c[d],m=c[d+1],p=c[d+2],g=c[d+3],y=v-p,k=m-g,b=u,x=u.length-2,w=o.length,A=0;A0;if(y*(E-g)-k*(I-p)>0){if(R){o.push(S),o.push(T);continue}var C=T-E,M=S-I,F=C*(p-v)-M*(g-m);if(Math.abs(F)>1e-6){var Y=(M*(m-E)-C*(v-I))/F;o.push(v+(p-v)*Y),o.push(m+(g-m)*Y)}else o.push(v),o.push(m)}else if(R){var X=T-E,L=S-I,N=X*(p-v)-L*(g-m);if(Math.abs(N)>1e-6){var P=(L*(m-E)-X*(v-I))/N;o.push(v+(p-v)*P),o.push(m+(g-m)*P)}else o.push(v),o.push(m);o.push(S),o.push(T)}l=!0}if(w==o.length)return h.length=0,!0;if(o.push(o[0]),o.push(o[1]),d==f)break;var _=o;(o=u).length=0,u=_}if(h!=o){h.length=0;for(var O=0,B=o.length-2;O>1;l=0;za--)-1==Ba[za]&&(Ba[za]=Va[--Wa])}La.setFrame(Pa,pa(Oa,"time",0),Ba)}r.push(La)}if(t.events){for(var Ha=new Et(t.events.length),$a=0,Ja=0;Ja)?=?)"),d("XRANGEIDENTIFIERLOOSE","".concat(h[l.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),d("XRANGEIDENTIFIER","".concat(h[l.NUMERICIDENTIFIER],"|x|X|\\*")),d("XRANGEPLAIN","[v=\\s]*(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:".concat(h[l.PRERELEASE],")?").concat(h[l.BUILD],"?")+")?)?"),d("XRANGEPLAINLOOSE","[v=\\s]*(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(h[l.PRERELEASELOOSE],")?").concat(h[l.BUILD],"?")+")?)?"),d("XRANGE","^".concat(h[l.GTLT],"\\s*").concat(h[l.XRANGEPLAIN],"$")),d("XRANGELOOSE","^".concat(h[l.GTLT],"\\s*").concat(h[l.XRANGEPLAINLOOSE],"$")),d("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(a,"})")+"(?:\\.(\\d{1,".concat(a,"}))?")+"(?:\\.(\\d{1,".concat(a,"}))?")+"(?:$|[^\\d])"),d("COERCERTL",h[l.COERCE],!0),d("LONETILDE","(?:~>?)"),d("TILDETRIM","(\\s*)".concat(h[l.LONETILDE],"\\s+"),!0),e.tildeTrimReplace="$1~",d("TILDE","^".concat(h[l.LONETILDE]).concat(h[l.XRANGEPLAIN],"$")),d("TILDELOOSE","^".concat(h[l.LONETILDE]).concat(h[l.XRANGEPLAINLOOSE],"$")),d("LONECARET","(?:\\^)"),d("CARETTRIM","(\\s*)".concat(h[l.LONECARET],"\\s+"),!0),e.caretTrimReplace="$1^",d("CARET","^".concat(h[l.LONECARET]).concat(h[l.XRANGEPLAIN],"$")),d("CARETLOOSE","^".concat(h[l.LONECARET]).concat(h[l.XRANGEPLAINLOOSE],"$")),d("COMPARATORLOOSE","^".concat(h[l.GTLT],"\\s*(").concat(h[l.LOOSEPLAIN],")$|^$")),d("COMPARATOR","^".concat(h[l.GTLT],"\\s*(").concat(h[l.FULLPLAIN],")$|^$")),d("COMPARATORTRIM","(\\s*)".concat(h[l.GTLT],"\\s*(").concat(h[l.LOOSEPLAIN],"|").concat(h[l.XRANGEPLAIN],")"),!0),e.comparatorTrimReplace="$1$2$3",d("HYPHENRANGE","^\\s*(".concat(h[l.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(h[l.XRANGEPLAIN],")")+"\\s*$"),d("HYPHENRANGELOOSE","^\\s*(".concat(h[l.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(h[l.XRANGEPLAINLOOSE],")")+"\\s*$"),d("STAR","(<|>)?=?\\s*\\*"),d("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),d("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Ra,Ra.exports);var Ca=Ra.exports;Aa(Ca);var Ma=Object.freeze({loose:!0}),Fa=Object.freeze({}),Ya=function(t){return t?"object"!==r(t)?Ma:t:Fa};Aa(Ya);var Xa=/^[0-9]+$/,La=function(t,e){var a=Xa.test(t),n=Xa.test(e);return a&&n&&(t=+t,e=+e),t===e?0:a&&!n?-1:n&&!a?1:t_a)throw new TypeError("version is longer than ".concat(_a," characters"));Pa("SemVer",e,a),this.options=a,this.loose=!!a.loose,this.includePrerelease=!!a.includePrerelease;var n=e.trim().match(a.loose?Ba[Da.LOOSE]:Ba[Da.FULL]);if(!n)throw new TypeError("Invalid Version: ".concat(e));if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Oa||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Oa||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Oa||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((function(t){if(/^[0-9]+$/.test(t)){var e=+t;if(e>=0&&e=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(e===this.prerelease.join(".")&&!1===a)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(e){var i=[e,n];!1===a&&(i=[e]),0===Ua(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break;default:throw new Error("invalid increment argument: ".concat(t))}return this.raw=this.format(),this.build.length&&(this.raw+="+".concat(this.build.join("."))),this}}]),t}(),ja=Wa;Aa(ja);var qa=ja,Ga=function(t,e){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t instanceof qa)return t;try{return new qa(t,e)}catch(t){if(!a)return null;throw t}};Aa(Ga);var za,Ha,$a=Ga,Ja=Aa((function(t,e){var a=$a(t,e);return a?a.version:null})),Qa=ja,Za=Ga,Ka=Ca.safeRe,tn=Ca.t,en=Aa((function(t,e){if(t instanceof Qa)return t;if("number"==typeof t&&(t=String(t)),"string"!=typeof t)return null;var a=null;if((e=e||{}).rtl){for(var n;(n=Ka[tn.COERCERTL].exec(t))&&(!a||a.index+a[0].length!==t.length);)a&&n.index+n[0].length===a.index+a[0].length||(a=n),Ka[tn.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Ka[tn.COERCERTL].lastIndex=-1}else a=t.match(Ka[tn.COERCE]);return null===a?null:Za("".concat(a[2],".").concat(a[3]||"0",".").concat(a[4]||"0"),e)}));var an=nn;function nn(t){var e=this;if(e instanceof nn||(e=new nn),e.tail=null,e.head=null,e.length=0,t&&"function"==typeof t.forEach)t.forEach((function(t){e.push(t)}));else if(arguments.length>0)for(var a=0,n=arguments.length;a1)a=e;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,a=this.head.value}for(var r=0;null!==n;r++)a=t(a,n.value,r),n=n.next;return a},nn.prototype.reduceReverse=function(t,e){var a,n=this.tail;if(arguments.length>1)a=e;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,a=this.tail.value}for(var r=this.length-1;null!==n;r--)a=t(a,n.value,r),n=n.prev;return a},nn.prototype.toArray=function(){for(var t=new Array(this.length),e=0,a=this.head;null!==a;e++)t[e]=a.value,a=a.next;return t},nn.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,a=this.tail;null!==a;e++)t[e]=a.value,a=a.prev;return t},nn.prototype.slice=function(t,e){(e=e||this.length)<0&&(e+=this.length),(t=t||0)<0&&(t+=this.length);var a=new nn;if(ethis.length&&(e=this.length);for(var n=0,r=this.head;null!==r&&nthis.length&&(e=this.length);for(var n=this.length,r=this.tail;null!==r&&n>e;n--)r=r.prev;for(;null!==r&&n>t;n--,r=r.prev)a.push(r.value);return a},nn.prototype.splice=function(t,e){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var a=0,n=this.head;null!==n&&athis[un])return En(this,this[yn].get(t)),!1;var i=this[yn].get(t).value;return this[mn]&&(this[pn]||this[mn](t,i.value)),i.now=n,i.maxAge=a,i.value=e,this[cn]+=r-i.length,i.length=r,this.get(t),In(this),!0}var s=new Sn(t,e,r,n,a);return s.length>this[un]?(this[mn]&&this[mn](t,e),!1):(this[cn]+=s.length,this[gn].unshift(s),this[yn].set(t,this[gn].head),In(this),!0)}},{key:"has",value:function(t){if(!this[yn].has(t))return!1;var e=this[yn].get(t).value;return!An(this,e)}},{key:"get",value:function(t){return wn(this,t,!0)}},{key:"peek",value:function(t){return wn(this,t,!1)}},{key:"pop",value:function(){var t=this[gn].tail;return t?(En(this,t),t.value):null}},{key:"del",value:function(t){En(this,this[yn].get(t))}},{key:"load",value:function(t){this.reset();for(var e=Date.now(),a=t.length-1;a>=0;a--){var n=t[a],r=n.e||0;if(0===r)this.set(n.k,n.v);else{var i=r-e;i>0&&this.set(n.k,n.v,i)}}}},{key:"prune",value:function(){var t=this;this[yn].forEach((function(e,a){return wn(t,a,!1)}))}}]),t}(),wn=function(t,e,a){var n=t[yn].get(e);if(n){var r=n.value;if(An(t,r)){if(En(t,n),!t[dn])return}else a&&(t[kn]&&(n.value.now=Date.now()),t[gn].unshiftNode(n));return r.value}},An=function(t,e){if(!e||!e.maxAge&&!t[vn])return!1;var a=Date.now()-e.now;return e.maxAge?a>e.maxAge:t[vn]&&a>t[vn]},In=function(t){if(t[cn]>t[un])for(var e=t[gn].tail;t[cn]>t[un]&&null!==e;){var a=e.prev;En(t,e),e=a}},En=function(t,e){if(e){var a=e.value;t[mn]&&t[mn](a.key,a.value),t[cn]-=a.length,t[yn].delete(a.key),t[gn].removeNode(e)}},Sn=o((function t(e,a,n,r,s){i(this,t),this.key=e,this.value=a,this.length=n,this.now=r,this.maxAge=s||0})),Tn=function(t,e,a,n){var r=a.value;An(t,r)&&(En(t,a),t[dn]||(r=void 0)),r&&e.call(n,r.value,r.key,t)},Rn=xn;Aa(Rn);var Cn=ja,Mn=function(t,e,a){return new Cn(t,a).compare(new Cn(e,a))};Aa(Mn);var Fn=Mn,Yn=function(t,e,a){return 0===Fn(t,e,a)};Aa(Yn);var Xn=Mn,Ln=function(t,e,a){return 0!==Xn(t,e,a)};Aa(Ln);var Nn=Mn,Pn=function(t,e,a){return Nn(t,e,a)>0};Aa(Pn);var _n=Mn,On=function(t,e,a){return _n(t,e,a)>=0};Aa(On);var Bn=Mn,Dn=function(t,e,a){return Bn(t,e,a)<0};Aa(Dn);var Vn=Mn,Un=function(t,e,a){return Vn(t,e,a)<=0};Aa(Un);var Wn,jn,qn,Gn,zn=Yn,Hn=Ln,$n=Pn,Jn=On,Qn=Dn,Zn=Un,Kn=function(t,e,a,n){switch(e){case"===":return"object"===r(t)&&(t=t.version),"object"===r(a)&&(a=a.version),t===a;case"!==":return"object"===r(t)&&(t=t.version),"object"===r(a)&&(a=a.version),t!==a;case"":case"=":case"==":return zn(t,a,n);case"!=":return Hn(t,a,n);case">":return $n(t,a,n);case">=":return Jn(t,a,n);case"<":return Qn(t,a,n);case"<=":return Zn(t,a,n);default:throw new TypeError("Invalid operator: ".concat(e))}};function tr(){if(Gn)return qn;Gn=1;var t=function(){function t(e,r){var s=this;if(i(this,t),r=a(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof n)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((function(t){return s.parseRange(t.trim())})).filter((function(t){return t.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(this.raw));if(this.set.length>1){var o=this.set[0];if(this.set=this.set.filter((function(t){return!m(t[0])})),0===this.set.length)this.set=[o];else if(this.set.length>1){var h,l=k(this.set);try{for(l.s();!(h=l.n()).done;){var u=h.value;if(1===u.length&&g(u[0])){this.set=[u];break}}}catch(t){l.e(t)}finally{l.f()}}}this.format()}return o(t,[{key:"format",value:function(){return this.range=this.set.map((function(t){return t.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(t){var a=this,i=((this.options.includePrerelease&&d)|(this.options.loose&&v))+":"+t,s=e.get(i);if(s)return s;var o=this.options.loose,g=o?h[l.HYPHENRANGELOOSE]:h[l.HYPHENRANGE];t=t.replace(g,M(this.options.includePrerelease)),r("hyphen replace",t),t=t.replace(h[l.COMPARATORTRIM],u),r("comparator trim",t),t=t.replace(h[l.TILDETRIM],c),r("tilde trim",t),t=t.replace(h[l.CARETTRIM],f),r("caret trim",t);var y=t.split(" ").map((function(t){return b(t,a.options)})).join(" ").split(/\s+/).map((function(t){return C(t,a.options)}));o&&(y=y.filter((function(t){return r("loose invalid filter",t,a.options),!!t.match(h[l.COMPARATORLOOSE])}))),r("range list",y);var x,w=new Map,A=y.map((function(t){return new n(t,a.options)})),I=k(A);try{for(I.s();!(x=I.n()).done;){var E=x.value;if(m(E))return[E];w.set(E.value,E)}}catch(t){I.e(t)}finally{I.f()}w.size>1&&w.has("")&&w.delete("");var S=p(w.values());return e.set(i,S),S}},{key:"intersects",value:function(e,a){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((function(t){return y(t,a)&&e.set.some((function(e){return y(e,a)&&t.every((function(t){return e.every((function(e){return t.intersects(e,a)}))}))}))}))}},{key:"test",value:function(t){if(!t)return!1;if("string"==typeof t)try{t=new s(t,this.options)}catch(t){return!1}for(var e=0;e")||!t.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!t.operator.startsWith("<"))&&(this.semver.version!==t.semver.version||!this.operator.includes("=")||!t.operator.includes("="))&&!(s(this.semver,"<",t.semver,n)&&this.operator.startsWith(">")&&t.operator.startsWith("<"))&&!(s(this.semver,">",t.semver,n)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}}],[{key:"ANY",get:function(){return t}}]),e}();Wn=e;var a=Ya,n=Ca.safeRe,r=Ca.t,s=Kn,h=Ta,l=ja,u=tr();return Wn}(),r=Ta,s=ja,h=Ca.safeRe,l=Ca.t,u=Ca.comparatorTrimReplace,c=Ca.tildeTrimReplace,f=Ca.caretTrimReplace,d=Ia.FLAG_INCLUDE_PRERELEASE,v=Ia.FLAG_LOOSE,m=function(t){return"<0.0.0-0"===t.value},g=function(t){return""===t.value},y=function(t,e){for(var a=!0,n=t.slice(),r=n.pop();a&&n.length;)a=n.every((function(t){return r.intersects(t,e)})),r=n.pop();return a},b=function(t,e){return r("comp",t,e),t=I(t,e),r("caret",t),t=w(t,e),r("tildes",t),t=S(t,e),r("xrange",t),t=R(t,e),r("stars",t),t},x=function(t){return!t||"x"===t.toLowerCase()||"*"===t},w=function(t,e){return t.trim().split(/\s+/).map((function(t){return A(t,e)})).join(" ")},A=function(t,e){var a=e.loose?h[l.TILDELOOSE]:h[l.TILDE];return t.replace(a,(function(e,a,n,i,s){var o;return r("tilde",t,e,a,n,i,s),x(a)?o="":x(n)?o=">=".concat(a,".0.0 <").concat(+a+1,".0.0-0"):x(i)?o=">=".concat(a,".").concat(n,".0 <").concat(a,".").concat(+n+1,".0-0"):s?(r("replaceTilde pr",s),o=">=".concat(a,".").concat(n,".").concat(i,"-").concat(s," <").concat(a,".").concat(+n+1,".0-0")):o=">=".concat(a,".").concat(n,".").concat(i," <").concat(a,".").concat(+n+1,".0-0"),r("tilde return",o),o}))},I=function(t,e){return t.trim().split(/\s+/).map((function(t){return E(t,e)})).join(" ")},E=function(t,e){r("caret",t,e);var a=e.loose?h[l.CARETLOOSE]:h[l.CARET],n=e.includePrerelease?"-0":"";return t.replace(a,(function(e,a,i,s,o){var h;return r("caret",t,e,a,i,s,o),x(a)?h="":x(i)?h=">=".concat(a,".0.0").concat(n," <").concat(+a+1,".0.0-0"):x(s)?h="0"===a?">=".concat(a,".").concat(i,".0").concat(n," <").concat(a,".").concat(+i+1,".0-0"):">=".concat(a,".").concat(i,".0").concat(n," <").concat(+a+1,".0.0-0"):o?(r("replaceCaret pr",o),h="0"===a?"0"===i?">=".concat(a,".").concat(i,".").concat(s,"-").concat(o," <").concat(a,".").concat(i,".").concat(+s+1,"-0"):">=".concat(a,".").concat(i,".").concat(s,"-").concat(o," <").concat(a,".").concat(+i+1,".0-0"):">=".concat(a,".").concat(i,".").concat(s,"-").concat(o," <").concat(+a+1,".0.0-0")):(r("no pr"),h="0"===a?"0"===i?">=".concat(a,".").concat(i,".").concat(s).concat(n," <").concat(a,".").concat(i,".").concat(+s+1,"-0"):">=".concat(a,".").concat(i,".").concat(s).concat(n," <").concat(a,".").concat(+i+1,".0-0"):">=".concat(a,".").concat(i,".").concat(s," <").concat(+a+1,".0.0-0")),r("caret return",h),h}))},S=function(t,e){return r("replaceXRanges",t,e),t.split(/\s+/).map((function(t){return T(t,e)})).join(" ")},T=function(t,e){t=t.trim();var a=e.loose?h[l.XRANGELOOSE]:h[l.XRANGE];return t.replace(a,(function(a,n,i,s,o,h){r("xRange",t,a,n,i,s,o,h);var l=x(i),u=l||x(s),c=u||x(o),f=c;return"="===n&&f&&(n=""),h=e.includePrerelease?"-0":"",l?a=">"===n||"<"===n?"<0.0.0-0":"*":n&&f?(u&&(s=0),o=0,">"===n?(n=">=",u?(i=+i+1,s=0,o=0):(s=+s+1,o=0)):"<="===n&&(n="<",u?i=+i+1:s=+s+1),"<"===n&&(h="-0"),a="".concat(n+i,".").concat(s,".").concat(o).concat(h)):u?a=">=".concat(i,".0.0").concat(h," <").concat(+i+1,".0.0-0"):c&&(a=">=".concat(i,".").concat(s,".0").concat(h," <").concat(i,".").concat(+s+1,".0-0")),r("xRange return",a),a}))},R=function(t,e){return r("replaceStars",t,e),t.trim().replace(h[l.STAR],"")},C=function(t,e){return r("replaceGTE0",t,e),t.trim().replace(h[e.includePrerelease?l.GTE0PRE:l.GTE0],"")},M=function(t){return function(e,a,n,r,i,s,o,h,l,u,c,f,d){return a=x(n)?"":x(r)?">=".concat(n,".0.0").concat(t?"-0":""):x(i)?">=".concat(n,".").concat(r,".0").concat(t?"-0":""):s?">=".concat(a):">=".concat(a).concat(t?"-0":""),h=x(l)?"":x(u)?"<".concat(+l+1,".0.0-0"):x(c)?"<".concat(l,".").concat(+u+1,".0-0"):f?"<=".concat(l,".").concat(u,".").concat(c,"-").concat(f):t?"<".concat(l,".").concat(u,".").concat(+c+1,"-0"):"<=".concat(h),"".concat(a," ").concat(h).trim()}},F=function(t,e,a){for(var i=0;i0){var o=t[s].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0};return qn}Aa(Kn);var er,ar,nr=tr(),rr=function(t,e,a){try{e=new nr(e,a)}catch(t){return!1}return e.test(t)},ir={valid:Ja,coerce:en,satisfies:Aa(rr),SEMVER_SPEC_VERSION:Ea.SEMVER_SPEC_VERSION},sr=0,or=1,hr=2,lr=[0,1,2,2,3,0],ur=function(){function t(e,n,r,s){var o;if(i(this,t),h(this,"autoUpdate",!0),h(this,"skeleton",void 0),h(this,"states",void 0),this._app=e,this._position=new a.Vec3,1===Kt.length){var l,u=k((o=new Kt(n)).pages);try{for(u.s();!(l=u.n()).done;){var c=l.value;c.setTexture(new wa(s[c.name]))}}catch(t){u.e(t)}finally{u.f()}}else o=new Kt(n,(function(t){return new wa(s[t])}));var f=new ca(new he(o));f.scale*=.01;var d=f.readSkeletonData(r);this.skeletonVersion=ir.valid(ir.coerce(d.version)),this._spine_3_6_0=ir.satisfies(this.skeletonVersion,"<=3.6.0"),this._spine_3_7_99=ir.satisfies(this.skeletonVersion,"<=3.7.99"),this._spine_4_0_X=ir.satisfies(this.skeletonVersion,"~4.0.0"),this._spine_4_1_X=ir.satisfies(this.skeletonVersion,"~4.1.23"),this.skeleton=new Se(d),this.skeleton.updateWorldTransform(),this.stateData=new zt(this.skeleton.data),this.states=[new Xt(this.stateData)],this.clipper=new ua,this._node=new a.GraphNode,this._meshes=[],this._meshInstances=[],this._materials={},this._tint={},this._aabb=new a.BoundingBox,this._aabbTempArray=[],this._aabbTempOffset=new a.Vec2,this._aabbTempSize=new a.Vec2,this._renderCounts={vertexCount:0,indexCount:0},this._vertexFormat=null,this._vertexBuffer=null,this._indexBuffer=null,this._priority=0,this._timeScale=1,this._layers=[a.LAYERID_UI],this.init(),this._hidden=!1}return o(t,[{key:"destroy",value:function(){this.removeFromLayers();for(var t=0;t0&&this._renderCounts.vertexCount>0){this.skeleton.getBounds(this._aabbTempOffset,this._aabbTempSize,this._aabbTempArray),this._aabb.center=new a.Vec3(this._aabbTempOffset.x,this._aabbTempOffset.y,0),this._aabb.halfExtents=new a.Vec3(.5*this._aabbTempSize.x,.5*this._aabbTempSize.y,0),(!this._vertexBuffer||this._vertexBuffer.getNumVertices()0&&c.indices.length>0){t&&t!==c.material&&(this.SubmitBatch(e,n,t),t=c.material,e=s,n=0),t=c.material;var f=c.positions,d=c.vertexColor.r,v=c.vertexColor.g,m=c.vertexColor.b,p=c.vertexColor.a,g=c.uvs,y=void 0,k=f.length/2;for(y=0;y0){var r=new a.Mesh(this._app.graphicsDevice);r.vertexBuffer=this._vertexBuffer,r.indexBuffer[0]=this._indexBuffer,r.primitive[0].type=a.PRIMITIVE_TRIANGLES,r.primitive[0].base=t,r.primitive[0].count=e,r.primitive[0].indexed=!0,r.aabb=this._aabb,this._meshes.push(r);var i=new a.MeshInstance(r,this._materials[n],this._node);i.drawOrder=this.priority+this._meshInstances.length,i.visible=!this._hidden,this._meshInstances.push(i)}}},{key:"update",value:function(t){if(!this._hidden){var e;t*=this._timeScale;var a=this.states.length;for(e=0;et.length)&&(e=t.length);for(var a=0,n=new Array(e);a=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){a=a.call(t)},n:function(){var t=a.next();return s=t.done,t},e:function(t){o=!0,i=t},f:function(){try{s||null==a.return||a.return()}finally{if(o)throw i}}}}function y(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var n=a.call(t,e);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:String(e)}function k(t,e,a){return e=l(e),u(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,a||[],l(t).constructor):e.apply(t,a))}var b=s((function t(){r(this,t),this.array=new Array}),[{key:"add",value:function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e}},{key:"contains",value:function(t){return null!=this.array[0|t]}},{key:"remove",value:function(t){this.array[0|t]=void 0}},{key:"clear",value:function(){this.array.length=0}}]),x=s((function t(){r(this,t),this.entries={},this.size=0}),[{key:"add",value:function(t){var e=this.entries[t];return this.entries[t]=!0,!e&&(this.size++,!0)}},{key:"addAll",value:function(t){for(var e=this.size,a=0,n=t.length;a0&&void 0!==arguments[0]?arguments[0]:0,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;r(this,t),this.r=e,this.g=a,this.b=n,this.a=i}return s(t,[{key:"set",value:function(t,e,a,n){return this.r=t,this.g=e,this.b=a,this.a=n,this.clamp()}},{key:"setFromColor",value:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}},{key:"setFromString",value:function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=8!=t.length?1:parseInt(t.substr(6,2),16)/255,this}},{key:"add",value:function(t,e,a,n){return this.r+=t,this.g+=e,this.b+=a,this.a+=n,this.clamp()}},{key:"clamp",value:function(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}}],[{key:"rgba8888ToColor",value:function(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255}},{key:"rgb888ToColor",value:function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255}},{key:"fromString",value:function(e){return(new t).setFromString(e)}}])}();w.WHITE=new w(1,1,1,1),w.RED=new w(1,0,0,1),w.GREEN=new w(0,1,0,1),w.BLUE=new w(0,0,1,1),w.MAGENTA=new w(1,0,1,1);var I=function(){function t(){r(this,t)}return s(t,null,[{key:"clamp",value:function(t,e,a){return ta?a:t}},{key:"cosDeg",value:function(e){return Math.cos(e*t.degRad)}},{key:"sinDeg",value:function(e){return Math.sin(e*t.degRad)}},{key:"signum",value:function(t){return t>0?1:t<0?-1:0}},{key:"toInt",value:function(t){return t>0?Math.floor(t):Math.ceil(t)}},{key:"cbrt",value:function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e}},{key:"randomTriangular",value:function(e,a){return t.randomTriangularWith(e,a,.5*(e+a))}},{key:"randomTriangularWith",value:function(t,e,a){var n=Math.random(),r=e-t;return n<=(a-t)/r?t+Math.sqrt(n*r*(a-t)):e-Math.sqrt((1-n)*r*(e-a))}},{key:"isPowerOfTwo",value:function(t){return t&&0==(t&t-1)}}])}();I.PI=3.1415927,I.PI2=2*I.PI,I.radiansToDegrees=180/I.PI,I.radDeg=I.radiansToDegrees,I.degreesToRadians=I.PI/180,I.degRad=I.degreesToRadians;var A=s((function t(){r(this,t)}),[{key:"apply",value:function(t,e,a){return t+(e-t)*this.applyInternal(a)}}]),E=function(t){function e(t){var a;return r(this,e),(a=k(this,e)).power=2,a.power=t,a}return h(e,t),s(e,[{key:"applyInternal",value:function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1}}])}(A),S=function(t){function e(t){return r(this,e),k(this,e,[t])}return h(e,t),s(e,[{key:"applyInternal",value:function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1}}])}(E),R=function(){function t(){r(this,t)}return s(t,null,[{key:"arrayCopy",value:function(t,e,a,n,r){for(var i=e,s=n;i2&&void 0!==arguments[2]?arguments[2]:0,n=t.length;if(n==e)return t;if(t.length=e,n2&&void 0!==arguments[2]?arguments[2]:0;return e.length>=a?e:t.setArraySize(e,a,n)}},{key:"newArray",value:function(t,e){for(var a=new Array(t),n=0;n0?this.items.pop():this.instantiator()}},{key:"free",value:function(t){t.reset&&t.reset(),this.items.push(t)}},{key:"freeAll",value:function(t){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:0,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;r(this,t),this.x=e,this.y=a}),[{key:"set",value:function(t,e){return this.x=t,this.y=e,this}},{key:"length",value:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}},{key:"normalize",value:function(){var t=this.length();return 0!=t&&(this.x/=t,this.y/=t),this}}]),F=s((function t(){r(this,t),this.maxDelta=.064,this.framesPerSecond=0,this.delta=0,this.totalTime=0,this.lastTime=Date.now()/1e3,this.frameCount=0,this.frameTime=0}),[{key:"update",value:function(){var t=Date.now()/1e3;this.delta=t-this.lastTime,this.frameTime+=this.delta,this.totalTime+=this.delta,this.delta>this.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)}}]),Y=s((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;r(this,t),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(e)}),[{key:"hasEnoughData",value:function(){return this.addedValues>=this.values.length}},{key:"addValue",value:function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0}},{key:"getMean",value:function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*i;var s=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(l){for(var c=0,u=0,f=0;f0&&(h=o);for(var L=t.bone,N=L.worldX,B=L.worldY,O=L.a,_=L.b,D=L.c,V=L.d,U=e,W=r;W0&&(e%=this.duration));for(var h=this.timelines,l=0,c=h.length;le)return n-1;return a-1}},{key:"search",value:function(t,e,a){for(var n=t.length,r=a;re)return r-a;return n-a}}]),it=function(t){function e(t,a,n){var i;return r(this,e),(i=L(this,e,[t,n])).curves=null,i.curves=R.newFloatArray(t+18*a),i.curves[t-1]=1,i}return h(e,t),s(e,[{key:"setLinear",value:function(t){this.curves[t]=0}},{key:"setStepped",value:function(t){this.curves[t]=1}},{key:"shrink",value:function(t){var e=this.getFrameCount()+18*t;if(this.curves.length>e){var a=R.newFloatArray(e);R.arrayCopy(this.curves,0,a,0,e),this.curves=a}}},{key:"setBezier",value:function(t,e,a,n,r,i,s,o,h,l,c){var u=this.curves,f=this.getFrameCount()+18*t;0==a&&(u[e]=2+f);for(var d=.03*(n-2*i+o),v=.03*(r-2*s+h),m=.006*(3*(i-o)-n+l),p=.006*(3*(s-h)-r+c),g=2*d+m,y=2*v+p,k=.3*(i-n)+d+.16666667*m,b=.3*(s-r)+v+.16666667*p,x=n+k,w=r+b,I=f+18;ft){var i=this.frames[e],s=this.frames[e+a];return s+(t-i)/(r[n]-i)*(r[n+1]-s)}var o=n+18;for(n+=2;n=t){var h=r[n-2],l=r[n-1];return l+(t-h)/(r[n]-h)*(r[n+1]-l)}e+=this.getFrameEntries();var c=r[o-2],u=r[o-1];return u+(t-c)/(this.frames[e]-c)*(this.frames[e+a]-u)}}])}(rt),st=function(t){function e(t,a,n){return r(this,e),L(this,e,[t,a,[n]])}return h(e,t),s(e,[{key:"getFrameEntries",value:function(){return 2}},{key:"setFrame",value:function(t,e,a){t<<=1,this.frames[t]=e,this.frames[t+1]=a}},{key:"getCurveValue",value:function(t){for(var e=this.frames,a=e.length-2,n=2;n<=a;n+=2)if(e[n]>t){a=n-2;break}var r=this.curves[a>>1];switch(r){case 0:var i=e[a],s=e[a+1];return s+(t-i)/(e[a+2]-i)*(e[a+2+1]-s);case 1:return e[a+1]}return this.getBezierValue(t,a,1,r-2)}}])}(it),ot=function(t){function e(t,a,n,i){return r(this,e),L(this,e,[t,a,[n,i]])}return h(e,t),s(e,[{key:"getFrameEntries",value:function(){return 3}},{key:"setFrame",value:function(t,e,a,n){t*=3,this.frames[t]=e,this.frames[t+1]=a,this.frames[t+2]=n}}])}(it),ht=function(t){function e(t,a,n){var i;return r(this,e),(i=L(this,e,[t,a,_+"|"+n])).boneIndex=0,i.boneIndex=n,i}return h(e,t),s(e,[{key:"apply",value:function(t,e,a,n,r,i,s){var o=t.bones[this.boneIndex];if(o.active)if(a>2];switch(m){case 0:var p=h[v];u=h[v+1],f=h[v+2],d=h[v+3];var g=(a-p)/(h[v+4]-p);u+=(h[v+4+1]-u)*g,f+=(h[v+4+2]-f)*g,d+=(h[v+4+3]-d)*g;break;case 1:u=h[v+1],f=h[v+2],d=h[v+3];break;default:u=this.getBezierValue(a,v,1,m-2),f=this.getBezierValue(a,v,2,m+18-2),d=this.getBezierValue(a,v,3,m+36-2)}if(1==r)l.r=u,l.g=f,l.b=d;else{if(i==N.setup){var y=o.data.color;l.r=y.r,l.g=y.g,l.b=y.b}l.r+=(u-l.r)*r,l.g+=(f-l.g)*r,l.b+=(d-l.b)*r}}}}}])}(it),bt=function(t){function e(t,a,n){var i;return r(this,e),(i=L(this,e,[t,a,G+"|"+n])).slotIndex=0,i.slotIndex=n,i}return h(e,t),s(e,[{key:"apply",value:function(t,e,a,n,r,i,s){var o=t.slots[this.slotIndex];if(o.bone.active){var h=o.color;if(a>3];switch(x){case 0:var w=h[b];d=h[b+1],v=h[b+2],m=h[b+3],p=h[b+4],g=h[b+5],y=h[b+6],k=h[b+7];var I=(a-w)/(h[b+8]-w);d+=(h[b+8+1]-d)*I,v+=(h[b+8+2]-v)*I,m+=(h[b+8+3]-m)*I,p+=(h[b+8+4]-p)*I,g+=(h[b+8+5]-g)*I,y+=(h[b+8+6]-y)*I,k+=(h[b+8+7]-k)*I;break;case 1:d=h[b+1],v=h[b+2],m=h[b+3],p=h[b+4],g=h[b+5],y=h[b+6],k=h[b+7];break;default:d=this.getBezierValue(a,b,1,x-2),v=this.getBezierValue(a,b,2,x+18-2),m=this.getBezierValue(a,b,3,x+36-2),p=this.getBezierValue(a,b,4,x+54-2),g=this.getBezierValue(a,b,5,x+72-2),y=this.getBezierValue(a,b,6,x+90-2),k=this.getBezierValue(a,b,7,x+108-2)}if(1==r)l.set(d,v,m,p),c.r=g,c.g=y,c.b=k;else{if(i==N.setup){l.setFromColor(o.data.color);var A=o.data.darkColor;c.r=A.r,c.g=A.g,c.b=A.b}l.add((d-l.r)*r,(v-l.g)*r,(m-l.b)*r,(p-l.a)*r),c.r+=(g-c.r)*r,c.g+=(y-c.g)*r,c.b+=(k-c.b)*r}}}}}])}(it),wt=function(t){function e(t,a,n){var i;return r(this,e),(i=L(this,e,[t,a,[z+"|"+n,H+"|"+n]])).slotIndex=0,i.slotIndex=n,i}return h(e,t),s(e,[{key:"getFrameEntries",value:function(){return 7}},{key:"setFrame",value:function(t,e,a,n,r,i,s,o){t*=7,this.frames[t]=e,this.frames[t+1]=a,this.frames[t+2]=n,this.frames[t+3]=r,this.frames[t+4]=i,this.frames[t+5]=s,this.frames[t+6]=o}},{key:"apply",value:function(t,e,a,n,r,i,s){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames,l=o.color,c=o.darkColor;if(at){var i=this.frames[e];return a[n+1]*(t-i)/(a[n]-i)}var s=n+18;for(n+=2;n=t){var o=a[n-2],h=a[n-1];return h+(t-o)/(a[n]-o)*(a[n+1]-h)}var l=a[s-2],c=a[s-1];return c+(1-c)*(t-l)/(this.frames[e+this.getFrameEntries()]-l)}},{key:"apply",value:function(t,e,a,n,r,i,s){var o=t.slots[this.slotIndex];if(o.bone.active){var h=o.getAttachment();if(h instanceof P&&h.deformAttachment==this.attachment){var l=o.deform;0==l.length&&(i=N.setup);var c=this.vertices,u=c[0].length,f=this.frames;if(a=f[f.length-1]){var p=c[f.length-1];if(1==r)if(i==N.add){var g=h;if(g.bones)for(var y=0;ya)this.apply(t,e,Number.MAX_VALUE,n,r,i,s),e=-1;else if(e>=o[h-1])return;if(!(a0&&o[l-1]==c;)l--;for(;l=o[l];l++)n.push(this.events[l])}}}}])}(rt);Et.propertyIds=[""+Q];var St=function(t){function e(t){var a;return r(this,e),(a=L(this,e,[t,e.propertyIds])).drawOrders=null,a.drawOrders=new Array(t),a}return h(e,t),s(e,[{key:"getFrameCount",value:function(){return this.frames.length}},{key:"setFrame",value:function(t,e,a){this.frames[t]=e,this.drawOrders[t]=a}},{key:"apply",value:function(t,e,a,n,r,i,s){if(s!=B.mixOut)if(a>2];switch(d){case 0:var v=h[f];l=h[f+1],c=h[f+2],u=h[f+3];var m=(a-v)/(h[f+4]-v);l+=(h[f+4+1]-l)*m,c+=(h[f+4+2]-c)*m,u+=(h[f+4+3]-u)*m;break;case 1:l=h[f+1],c=h[f+2],u=h[f+3];break;default:l=this.getBezierValue(a,f,1,d-2),c=this.getBezierValue(a,f,2,d+18-2),u=this.getBezierValue(a,f,3,d+36-2)}if(i==N.setup){var p=o.data;o.mixRotate=p.mixRotate+(l-p.mixRotate)*r,o.mixX=p.mixX+(c-p.mixX)*r,o.mixY=p.mixY+(u-p.mixY)*r}else o.mixRotate+=(l-o.mixRotate)*r,o.mixX+=(c-o.mixX)*r,o.mixY+=(u-o.mixY)*r}}}}])}(it),Xt=function(){function t(e){r(this,t),this.data=null,this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Lt(this),this.propertyIDs=new x,this.animationsChanged=!1,this.trackEntryPool=new C((function(){return new Pt})),this.data=e}return s(t,[{key:"update",value:function(t){t*=this.timeScale;for(var e=this.tracks,a=0,n=e.length;a0){if(r.delay-=i,r.delay>0)continue;i=-r.delay,r.delay=0}var s=r.next;if(s){var o=r.trackLast-s.delay;if(o>=0){for(s.delay=0,s.trackTime+=0==r.timeScale?0:(o/r.timeScale+t)*s.timeScale,r.trackTime+=i,this.setCurrent(a,s,!0);s.mixingFrom;)s.mixTime+=t,s=s.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&!r.mixingFrom){e[a]=null,this.queue.end(r),this.clearNext(r);continue}if(r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for(r.mixingFrom=null,h&&(h.mixingTo=null);h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=i}}this.queue.drain()}},{key:"updateMixingFrom",value:function(t,e){var a=t.mixingFrom;if(!a)return!0;var n=this.updateMixingFrom(a,e);return a.animationLast=a.nextAnimationLast,a.trackLast=a.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=a.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=a.mixingFrom,a.mixingFrom&&(a.mixingFrom.mixingTo=t),t.interruptAlpha=a.interruptAlpha,this.queue.end(a)),n):(a.trackTime+=e*a.timeScale,t.mixTime+=e,!1)}},{key:"apply",value:function(t){if(!t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,a=this.tracks,n=!1,r=0,i=a.length;r0)){n=!0;var o=0==r?N.first:s.mixBlend,h=s.alpha;s.mixingFrom?h*=this.applyMixingFrom(s,t,o):s.trackTime>=s.trackEnd&&!s.next&&(h=0);var l=s.animationLast,c=s.getAnimationTime(),u=c,f=e;s.reverse&&(u=s.animation.duration-u,f=null);var d=s.animation.timelines,v=d.length;if(0==r&&1==h||o==N.add)for(var m=0;m1&&(r=1),a!=N.first&&(a=n.mixBlend));var i=r0&&this.queueEvents(n,f),this.events.length=0,n.nextAnimationLast=f,n.nextTrackLast=n.trackTime,r}},{key:"applyAttachmentTimeline",value:function(t,e,a,n,r){var i=e.slots[t.slotIndex];i.bone.active&&(a0,p=d>=0;I.signum(v)!=I.signum(f)&&Math.abs(v)<=90&&(Math.abs(d)>180&&(d+=360*I.signum(d)),p=m),u=f+d-d%360,p!=m&&(u+=360*I.signum(d)),i[s]=u}i[s+1]=f,h.rotation=l+u*n}}else t.apply(e,0,a,null,1,r,B.mixIn)}},{key:"queueEvents",value:function(t,e){for(var a=t.animationStart,n=t.animationEnd,r=n-a,i=t.trackLast%r,s=this.events,o=0,h=s.length;on||this.queue.event(t,l)}for((t.loop?0==r||i>t.trackTime%r:e>=n&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(e){this.queue.end(e),this.clearNext(e);for(var a=e;;){var n=a.mixingFrom;if(!n)break;this.queue.end(n),a.mixingFrom=null,a.mixingTo=null,a=n}this.tracks[e.trackIndex]=null,this.queue.drain()}}}},{key:"setCurrent",value:function(t,e,a){var n=this.expandToIndex(t);this.tracks[t]=e,e.previous=null,n&&(a&&this.queue.interrupt(n),e.mixingFrom=n,n.mixingTo=e,e.mixTime=0,n.mixingFrom&&n.mixDuration>0&&(e.interruptAlpha*=Math.min(1,n.mixTime/n.mixDuration)),n.timelinesRotation.length=0),this.queue.start(e)}},{key:"setAnimation",value:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.data.skeletonData.findAnimation(e);if(!n)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,n,a)}},{key:"setAnimationWith",value:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)throw new Error("animation cannot be null.");var n=!0,r=this.expandToIndex(t);r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.clearNext(r),r=r.mixingFrom,n=!1):this.clearNext(r));var i=this.trackEntry(t,e,a,r);return this.setCurrent(t,i,n),this.queue.drain(),i}},{key:"addAnimation",value:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=this.data.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,a,n)}},{key:"addAnimationWith",value:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(!e)throw new Error("animation cannot be null.");var r=this.expandToIndex(t);if(r)for(;r.next;)r=r.next;var i=this.trackEntry(t,e,a,r);return r?(r.next=i,i.previous=r,n<=0&&(n+=r.getTrackComplete()-i.mixDuration)):(this.setCurrent(t,i,!0),this.queue.drain()),i.delay=n,i}},{key:"setEmptyAnimation",value:function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.setAnimationWith(e,t.emptyAnimation(),!1);return n.mixDuration=a,n.trackEnd=a,n}},{key:"addEmptyAnimation",value:function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.addAnimationWith(e,t.emptyAnimation(),!1,n);return n<=0&&(r.delay+=r.mixDuration-a),r.mixDuration=a,r.trackEnd=a,r}},{key:"setEmptyAnimations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var a=0,n=this.tracks.length;a0){r[h]=Vt,i[h]=u;continue t}break}r[h]=Dt}else r[h]=Bt}}},{key:"getCurrent",value:function(t){return t>=this.tracks.length?null:this.tracks[t]}},{key:"addListener",value:function(t){if(!t)throw new Error("listener cannot be null.");this.listeners.push(t)}},{key:"removeListener",value:function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)}},{key:"clearListeners",value:function(){this.listeners.length=0}},{key:"clearListenerNotifications",value:function(){this.queue.clear()}}],[{key:"emptyAnimation",value:function(){return jt||(jt=new O("",[],0)),jt}}])}(),Pt=s((function t(){r(this,t),this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=N.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}),[{key:"reset",value:function(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}},{key:"getAnimationTime",value:function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}},{key:"setAnimationLast",value:function(t){this.animationLast=t,this.nextAnimationLast=t}},{key:"isComplete",value:function(){return this.trackTime>=this.animationEnd-this.animationStart}},{key:"resetRotationDirections",value:function(){this.timelinesRotation.length=0}},{key:"getTrackComplete",value:function(){var t=this.animationEnd-this.animationStart;if(0!=t){if(this.loop)return t*(1+(this.trackTime/t|0));if(this.trackTime0&&(s.names=c,s.values=u,c=null,u=null),s.u=s.x/i.width,s.v=s.y/i.height,90==s.degrees?(s.u2=(s.x+s.height)/i.width,s.v2=(s.y+s.width)/i.height):(s.u2=(s.x+s.width)/i.width,s.v2=(s.y+s.height)/i.height),this.regions.push(s)}else{for((i=new ee).name=l.trim();0!=a.readEntry(n,l=a.readLine());){var p=o[n[0]];p&&p()}this.pages.push(i)}}),[{key:"findRegion",value:function(t){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:"",n=g(this.pages);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.setTexture(t.get(a+r.name))}}catch(t){n.e(t)}finally{n.f()}}},{key:"dispose",value:function(){for(var t=0;t=this.lines.length?null:this.lines[this.index++]}},{key:"readEntry",value:function(t,e){if(!e)return 0;if(0==(e=e.trim()).length)return 0;var a=e.indexOf(":");if(-1==a)return 0;t[0]=e.substr(0,a).trim();for(var n=1,r=a+1;;n++){var i=e.indexOf(",",r);if(-1==i)return t[n]=e.substr(r).trim(),n;if(t[n]=e.substr(r,i-r).trim(),r=i+1,4==n)return 4}}}]),ee=s((function t(){r(this,t),this.name=null,this.minFilter=Ht.Nearest,this.magFilter=Ht.Nearest,this.uWrap=$t.ClampToEdge,this.vWrap=$t.ClampToEdge,this.texture=null,this.width=0,this.height=0,this.pma=!1}),[{key:"setTexture",value:function(t){this.texture=t,t.setFilters(this.minFilter,this.magFilter),t.setWraps(this.uWrap,this.vWrap)}}]),ae=function(t){function e(){var t,a,n,i;return r(this,e),a=this,i=arguments,n=l(n=e),(t=u(a,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(n,i||[],l(a).constructor):n.apply(a,i))).page=null,t.name=null,t.x=0,t.y=0,t.offsetX=0,t.offsetY=0,t.originalWidth=0,t.originalHeight=0,t.index=0,t.degrees=0,t.names=null,t.values=null,t}return h(e,t),s(e)}(Qt);var ne=function(t){function e(t){var a,n,i,s;return r(this,e),n=this,s=[t],i=l(i=e),(a=u(n,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(i,s||[],l(n).constructor):i.apply(n,s))).region=null,a.path=null,a.regionUVs=null,a.uvs=null,a.triangles=null,a.color=new w(1,1,1,1),a.width=0,a.height=0,a.hullLength=0,a.edges=null,a.parentMesh=null,a.tempColor=new w(0,0,0,0),a}return h(e,t),s(e,[{key:"updateUVs",value:function(){var t=this.regionUVs;this.uvs&&this.uvs.length==t.length||(this.uvs=R.newFloatArray(t.length));var e=this.uvs,a=this.uvs.length,n=this.region.u,r=this.region.v,i=0,s=0;if(this.region instanceof ae){var o=this.region,h=o.page.texture.getImage(),l=h.width,c=h.height;switch(o.degrees){case 90:n-=(o.originalHeight-o.offsetY-o.height)/l,r-=(o.originalWidth-o.offsetX-o.width)/c,i=o.originalHeight/l,s=o.originalWidth/c;for(var u=0;u= 0.");if(!a)throw new Error("name cannot be null.");this.index=e,this.name=a,this.parent=n}));!function(t){t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection"}(oe||(oe={}));var ce=s((function t(e,a,n){if(r(this,t),this.data=null,this.skeleton=null,this.parent=null,this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,!e)throw new Error("data cannot be null.");if(!a)throw new Error("skeleton cannot be null.");this.data=e,this.skeleton=a,this.parent=n,this.setToSetupPose()}),[{key:"isActive",value:function(){return this.active}},{key:"update",value:function(){this.updateWorldTransformWith(this.ax,this.ay,this.arotation,this.ascaleX,this.ascaleY,this.ashearX,this.ashearY)}},{key:"updateWorldTransform",value:function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)}},{key:"updateWorldTransformWith",value:function(t,e,a,n,r,i,s){this.ax=t,this.ay=e,this.arotation=a,this.ascaleX=n,this.ascaleY=r,this.ashearX=i,this.ashearY=s;var o=this.parent;if(!o){var h=this.skeleton,l=a+90+s,c=h.scaleX,u=h.scaleY;return this.a=I.cosDeg(a+i)*n*c,this.b=I.cosDeg(l)*r*c,this.c=I.sinDeg(a+i)*n*u,this.d=I.sinDeg(l)*r*u,this.worldX=t*c+h.x,void(this.worldY=e*u+h.y)}var f=o.a,d=o.b,v=o.c,m=o.d;switch(this.worldX=f*t+d*e+o.worldX,this.worldY=v*t+m*e+o.worldY,this.data.transformMode){case oe.Normal:var p=a+90+s,g=I.cosDeg(a+i)*n,y=I.cosDeg(p)*r,k=I.sinDeg(a+i)*n,b=I.sinDeg(p)*r;return this.a=f*g+d*k,this.b=f*y+d*b,this.c=v*g+m*k,void(this.d=v*y+m*b);case oe.OnlyTranslation:var x=a+90+s;this.a=I.cosDeg(a+i)*n,this.b=I.cosDeg(x)*r,this.c=I.sinDeg(a+i)*n,this.d=I.sinDeg(x)*r;break;case oe.NoRotationOrReflection:var w=f*f+v*v,A=0;w>1e-4?(w=Math.abs(f*m-d*v)/w,f/=this.skeleton.scaleX,d=(v/=this.skeleton.scaleY)*w,m=f*w,A=Math.atan2(v,f)*I.radDeg):(f=0,v=0,A=90-Math.atan2(m,d)*I.radDeg);var E=a+i-A,S=a+s-A+90,R=I.cosDeg(E)*n,T=I.cosDeg(S)*r,C=I.sinDeg(E)*n,M=I.sinDeg(S)*r;this.a=f*R-d*C,this.b=f*T-d*M,this.c=v*R+m*C,this.d=v*T+m*M;break;case oe.NoScale:case oe.NoScaleOrReflection:var F=I.cosDeg(a),Y=I.sinDeg(a),X=(f*F+d*Y)/this.skeleton.scaleX,P=(v*F+m*Y)/this.skeleton.scaleY,L=Math.sqrt(X*X+P*P);L>1e-5&&(L=1/L),X*=L,P*=L,L=Math.sqrt(X*X+P*P),this.data.transformMode==oe.NoScale&&f*m-d*v<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(L=-L);var N=Math.PI/2+Math.atan2(P,X),B=Math.cos(N)*L,O=Math.sin(N)*L,_=I.cosDeg(i)*n,D=I.cosDeg(90+s)*r,V=I.sinDeg(i)*n,U=I.sinDeg(90+s)*r;this.a=X*_+B*V,this.b=X*D+B*U,this.c=P*_+O*V,this.d=P*D+O*U}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY}},{key:"setToSetupPose",value:function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY}},{key:"getWorldRotationX",value:function(){return Math.atan2(this.c,this.a)*I.radDeg}},{key:"getWorldRotationY",value:function(){return Math.atan2(this.d,this.b)*I.radDeg}},{key:"getWorldScaleX",value:function(){return Math.sqrt(this.a*this.a+this.c*this.c)}},{key:"getWorldScaleY",value:function(){return Math.sqrt(this.b*this.b+this.d*this.d)}},{key:"updateAppliedTransform",value:function(){var t=this.parent;if(!t)return this.ax=this.worldX-this.skeleton.x,this.ay=this.worldY-this.skeleton.y,this.arotation=Math.atan2(this.c,this.a)*I.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*I.radDeg);var e=t.a,a=t.b,n=t.c,r=t.d,i=1/(e*r-a*n),s=this.worldX-t.worldX,o=this.worldY-t.worldY;this.ax=s*r*i-o*a*i,this.ay=o*e*i-s*n*i;var h=i*r,l=i*e,c=i*a,u=i*n,f=h*this.a-c*this.c,d=h*this.b-c*this.d,v=l*this.c-u*this.a,m=l*this.d-u*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+v*v),this.ascaleX>1e-4){var p=f*m-d*v;this.ascaleY=p/this.ascaleX,this.ashearY=Math.atan2(f*d+v*m,p)*I.radDeg,this.arotation=Math.atan2(v,f)*I.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(d*d+m*m),this.ashearY=0,this.arotation=90-Math.atan2(m,d)*I.radDeg}},{key:"worldToLocal",value:function(t){var e=1/(this.a*this.d-this.b*this.c),a=t.x-this.worldX,n=t.y-this.worldY;return t.x=a*this.d*e-n*this.b*e,t.y=n*this.a*e-a*this.c*e,t}},{key:"localToWorld",value:function(t){var e=t.x,a=t.y;return t.x=e*this.a+a*this.b+this.worldX,t.y=e*this.c+a*this.d+this.worldY,t}},{key:"worldToLocalRotation",value:function(t){var e=I.sinDeg(t),a=I.cosDeg(t);return Math.atan2(this.a*e-this.c*a,this.d*a-this.b*e)*I.radDeg+this.rotation-this.shearX}},{key:"localToWorldRotation",value:function(t){t-=this.rotation-this.shearX;var e=I.sinDeg(t),a=I.cosDeg(t);return Math.atan2(a*this.c+e*this.d,a*this.a+e*this.b)*I.radDeg}},{key:"rotateWorld",value:function(t){var e=this.a,a=this.b,n=this.c,r=this.d,i=I.cosDeg(t),s=I.sinDeg(t);this.a=i*e-s*n,this.b=i*a-s*r,this.c=s*e+i*n,this.d=s*a+i*r}}]),ue=s((function t(e,a,n){r(this,t),this.name=e,this.order=a,this.skinRequired=n})),fe=s((function t(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;r(this,t),this.pathPrefix=null,this.assets={},this.errors={},this.toLoad=0,this.loaded=0,this.textureLoader=e,this.pathPrefix=a,this.downloader=n||new de}),[{key:"start",value:function(t){return this.toLoad++,this.pathPrefix+t}},{key:"success",value:function(t,e,a){this.toLoad--,this.loaded++,this.assets[e]=a,t&&t(e,a)}},{key:"error",value:function(t,e,a){this.toLoad--,this.loaded++,this.errors[e]=a,t&&t(e,a)}},{key:"loadAll",value:function(){var t=this;return new Promise((function(e,a){requestAnimationFrame((function n(){t.isLoadingComplete()?t.hasErrors()?a(t.errors):e(t):requestAnimationFrame(n)}))}))}},{key:"setRawDataURI",value:function(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}},{key:"loadBinary",value:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t=this.start(t),this.downloader.downloadBinary(t,(function(n){e.success(a,t,n)}),(function(a,r){e.error(n,t,"Couldn't load binary ".concat(t,": status ").concat(a,", ").concat(r))}))}},{key:"loadText",value:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t=this.start(t),this.downloader.downloadText(t,(function(n){e.success(a,t,n)}),(function(a,r){e.error(n,t,"Couldn't load text ".concat(t,": status ").concat(a,", ").concat(r))}))}},{key:"loadJson",value:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t=this.start(t),this.downloader.downloadJson(t,(function(n){e.success(a,t,n)}),(function(a,r){e.error(n,t,"Couldn't load JSON ".concat(t,": status ").concat(a,", ").concat(r))}))}},{key:"loadTexture",value:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t=this.start(t),"undefined"!=typeof window&&"undefined"!=typeof navigator&&window.document){var r=new Image;r.crossOrigin="anonymous",r.onload=function(){e.success(a,t,e.textureLoader(r))},r.onerror=function(){e.error(n,t,"Couldn't load image: ".concat(t))},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),r.src=t}else fetch(t,{mode:"cors"}).then((function(a){return a.ok?a.blob():(e.error(n,t,"Couldn't load image: ".concat(t)),null)})).then((function(t){return t?createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null})).then((function(n){n&&e.success(a,t,e.textureLoader(n))}))}},{key:"loadTextureAtlas",value:function(t){var e=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=t.lastIndexOf("/"),s=i>=0?t.substring(0,i+1):"";t=this.start(t),this.downloader.downloadText(t,(function(i){try{var o,h=new Kt(i),l=h.pages.length,c=!1,u=g(h.pages);try{var f=function(){var i=o.value;e.loadTexture(null==r?s+i.name:r[i.name],(function(n,r){c||(i.setTexture(r),0==--l&&e.success(a,t,h))}),(function(a,r){c||e.error(n,t,"Couldn't load texture atlas ".concat(t," page image: ").concat(a)),c=!0}))};for(u.s();!(o=u.n()).done;)f()}catch(t){u.e(t)}finally{u.f()}}catch(a){e.error(n,t,"Couldn't parse texture atlas ".concat(t,": ").concat(a.message))}}),(function(a,r){e.error(n,t,"Couldn't load texture atlas ".concat(t,": status ").concat(a,", ").concat(r))}))}},{key:"get",value:function(t){return this.assets[this.pathPrefix+t]}},{key:"require",value:function(t){t=this.pathPrefix+t;var e=this.assets[t];if(e)return e;var a=this.errors[t];throw Error("Asset not found: "+t+(a?"\n"+a:""))}},{key:"remove",value:function(t){t=this.pathPrefix+t;var e=this.assets[t];return e.dispose&&e.dispose(),delete this.assets[t],e}},{key:"removeAll",value:function(){for(var t in this.assets){var e=this.assets[t];e.dispose&&e.dispose()}this.assets={}}},{key:"isLoadingComplete",value:function(){return 0==this.toLoad}},{key:"getToLoad",value:function(){return this.toLoad}},{key:"getLoaded",value:function(){return this.loaded}},{key:"dispose",value:function(){this.removeAll()}},{key:"hasErrors",value:function(){return Object.keys(this.errors).length>0}},{key:"getErrors",value:function(){return this.errors}}]),de=s((function t(){r(this,t),this.callbacks={},this.rawDataUris={}}),[{key:"dataUriToString",value:function(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");var e=t.indexOf("base64,");return-1!=e?(e+=7,atob(t.substr(e))):t.substr(t.indexOf(",")+1)}},{key:"base64ToUint8Array",value:function(t){for(var e=window.atob(t),a=e.length,n=new Uint8Array(a),r=0;r180?f-=360:f<-180&&(f+=360);var x=t.ascaleX,w=t.ascaleY;if(n||r){switch(t.data.transformMode){case oe.NoScale:case oe.NoScaleOrReflection:d=e-t.worldX,v=a-t.worldY}var A=t.data.length*x,E=Math.sqrt(d*d+v*v);if(n&&EA&&A>1e-4){var S=(E/A-1)*s+1;x*=S,i&&(w*=S)}}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+f*s,x,w,t.ashearX,t.ashearY)}},{key:"apply2",value:function(t,e,a,n,r,i,s,o,h){var l=t.ax,c=t.ay,u=t.ascaleX,f=t.ascaleY,d=u,v=f,m=e.ascaleX,p=0,g=0,y=0;u<0?(u=-u,p=180,y=-1):(p=0,y=1),f<0&&(f=-f,y=-y),m<0?(m=-m,g=180):g=0;var k=e.ax,b=0,x=0,w=0,A=t.a,E=t.b,S=t.c,R=t.d,T=Math.abs(u-f)<=1e-4;!T||i?(b=0,x=A*k+t.worldX,w=S*k+t.worldY):(x=A*k+E*(b=e.ay)+t.worldX,w=S*k+R*b+t.worldY);var C=t.parent;A=C.a,E=C.b,S=C.c;var M,F,Y=1/(A*(R=C.d)-E*S),X=x-C.worldX,P=w-C.worldY,L=(X*R-P*E)*Y-l,N=(P*A-X*S)*Y-c,B=Math.sqrt(L*L+N*N),O=e.data.length*m;if(B<1e-4)return this.apply1(t,a,n,!1,i,!1,h),void e.updateWorldTransformWith(k,b,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);var _=((X=a-C.worldX)*R-(P=n-C.worldY)*E)*Y-l,D=(P*A-X*S)*Y-c,V=_*_+D*D;if(0!=o){o*=u*(m+1)*.5;var U=Math.sqrt(V),W=U-B-O*u+o;if(W>0){var j=Math.min(1,W/(2*o))-1;V=(_-=(j=(W-o*(1-j*j))/U)*_)*_+(D-=j*D)*D}}t:if(T){var q=(V-B*B-(O*=u)*O)/(2*B*O);q<-1?(q=-1,F=Math.PI*r):q>1?(q=1,F=0,i&&(d*=A=(Math.sqrt(V)/(B+O)-1)*h+1,s&&(v*=A))):F=Math.acos(q)*r,A=B+O*q,E=O*Math.sin(F),M=Math.atan2(D*A-_*E,_*A+D*E)}else{var z=(A=u*O)*A,G=(E=f*O)*E,H=Math.atan2(D,_),$=-2*G*B,J=G-z;if((R=$*$-4*J*(S=G*B*B+z*V-z*G))>=0){var Q=Math.sqrt(R);$<0&&(Q=-Q);var Z=(Q=.5*-($+Q))/J,K=S/Q,tt=Math.abs(Z)=-1&&S<=1&&(S=Math.acos(S),(R=(X=A*Math.cos(S)+B)*X+(P=E*Math.sin(S))*P)ot&&(it=S,ot=R,st=X,ht=P)),V<=.5*(nt+ot)?(M=H-Math.atan2(rt*r,at),F=et*r):(M=H-Math.atan2(ht*r,st),F=it*r)}var lt=Math.atan2(b,k)*y,ct=t.arotation;(M=(M-lt)*I.radDeg+p-ct)>180?M-=360:M<-180&&(M+=360),t.updateWorldTransformWith(l,c,ct+M*h,d,v,0,0),ct=e.arotation,(F=((F+lt)*I.radDeg-e.ashearX)*y+g-ct)>180?F-=360:F<-180&&(F+=360),e.updateWorldTransformWith(k,b,ct+F*h,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}}]);var ge=function(t){function e(t){var a,n,i,s;return r(this,e),n=this,s=[t,0,!1],i=l(i=e),(a=u(n,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(i,s||[],l(n).constructor):i.apply(n,s))).bones=new Array,a.target=null,a.bendDirection=1,a.compress=!1,a.stretch=!1,a.uniform=!1,a.mix=1,a.softness=0,a}return h(e,t),s(e)}(ue);var ye,ke,be,xe=function(t){function e(t){var a,n,i,s;return r(this,e),n=this,s=[t,0,!1],i=l(i=e),(a=u(n,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(i,s||[],l(n).constructor):i.apply(n,s))).bones=new Array,a.target=null,a.positionMode=null,a.spacingMode=null,a.rotateMode=null,a.offsetRotation=0,a.position=0,a.spacing=0,a.mixRotate=0,a.mixX=0,a.mixY=0,a}return h(e,t),s(e)}(ue);!function(t){t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent"}(ye||(ye={})),function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent",t[t.Proportional=3]="Proportional"}(ke||(ke={})),function(t){t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale"}(be||(be={}));var we=function(){function t(e,a){if(r(this,t),this.data=null,this.bones=null,this.target=null,this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!e)throw new Error("data cannot be null.");if(!a)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(var n=0,i=e.bones.length;n0){b=c/b*d;for(var M=1;M0?I.degRad:-I.degRad}for(var q=0,z=3;q0){var tt=G.a,et=G.b,at=G.c,nt=G.d,rt=0,it=0,st=0;if(rt=s?_[z-1]:0==u[q+1]?_[z+2]:Math.atan2(Q,J),rt-=Math.atan2(at,tt),W){it=Math.cos(rt),st=Math.sin(rt);var ot=G.data.length;D+=(ot*(it*tt-st*at)-J)*a,V+=(ot*(st*tt+it*at)-Q)*a}else rt+=U;rt>I.PI?rt-=I.PI2:rt<-I.PI&&(rt+=I.PI2),rt*=a,it=Math.cos(rt),st=Math.sin(rt),G.a=it*tt-st*at,G.b=it*et-st*nt,G.c=st*tt+it*at,G.d=st*et+it*nt}G.updateAppliedTransform()}}}}},{key:"computeWorldPositions",value:function(e,a,n){var r=this.target,i=this.position,s=this.spaces,o=R.setArraySize(this.positions,3*a+2),h=null,l=e.closed,c=e.worldVerticesLength,u=c/6,f=t.NONE;if(!e.constantSpeed){var d,v=e.lengths,m=v[u-=l?1:2];switch(this.data.positionMode==ye.Percent&&(i*=m),this.data.spacingMode){case ke.Percent:d=m;break;case ke.Proportional:d=m/a;break;default:d=1}h=R.setArraySize(this.world,8);for(var p=0,g=0,y=0;pm){f!=t.AFTER&&(f=t.AFTER,e.computeWorldVertices(r,c-6,4,h,0,2)),this.addAfterPosition(b-m,h,0,o,g);continue}}for(;;y++){var x=v[y];if(!(b>x)){if(0==y)b/=x;else{var w=v[y-1];b=(b-w)/(x-w)}break}}y!=f&&(f=y,l&&y==u?(e.computeWorldVertices(r,c-4,4,h,0,2),e.computeWorldVertices(r,0,4,h,4,2)):e.computeWorldVertices(r,6*y+2,8,h,0,2)),this.addCurvePosition(b,h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],o,g,n||p>0&&0==k)}return o}l?(c+=2,h=R.setArraySize(this.world,c),e.computeWorldVertices(r,2,c-4,h,0,2),e.computeWorldVertices(r,0,2,h,c-4,2),h[c-2]=h[0],h[c-1]=h[1]):(u--,c-=4,h=R.setArraySize(this.world,c),e.computeWorldVertices(r,2,c,h,0,2));for(var I,A=R.setArraySize(this.curves,u),E=0,S=h[0],T=h[1],C=0,M=0,F=0,Y=0,X=0,P=0,L=0,N=0,B=0,O=0,_=0,D=0,V=0,U=0,W=0,j=2;WE){this.addAfterPosition(Z-E,h,c-4,o,H);continue}}for(;;$++){var K=A[$];if(!(Z>K)){if(0==$)Z/=K;else{var tt=A[$-1];Z=(Z-tt)/(K-tt)}break}}if($!=f){f=$;var et=6*$;for(S=h[et],T=h[et+1],C=h[et+2],M=h[et+3],F=h[et+4],Y=h[et+5],_=2*(L=.03*(S-2*C+F))+(B=.006*(3*(C-F)-S+(X=h[et+6]))),D=2*(N=.03*(T-2*M+Y))+(O=.006*(3*(M-Y)-T+(P=h[et+7]))),V=.3*(C-S)+L+.16666667*B,U=.3*(M-T)+N+.16666667*O,z=Math.sqrt(V*V+U*U),q[0]=z,et=1;et<8;et++)V+=_,U+=D,_+=B,D+=O,z+=Math.sqrt(V*V+U*U),q[et]=z;V+=_,U+=D,z+=Math.sqrt(V*V+U*U),q[8]=z,V+=_+B,U+=D+O,z+=Math.sqrt(V*V+U*U),q[9]=z,J=0}for(Z*=z;;J++){var at=q[J];if(!(Z>at)){if(0==J)Z/=at;else{var nt=q[J-1];Z=J+(Z-nt)/(at-nt)}break}}this.addCurvePosition(.1*Z,S,T,C,M,F,Y,X,P,o,H,n||G>0&&0==Q)}return o}},{key:"addBeforePosition",value:function(t,e,a,n,r){var i=e[a],s=e[a+1],o=e[a+2]-i,h=e[a+3]-s,l=Math.atan2(h,o);n[r]=i+t*Math.cos(l),n[r+1]=s+t*Math.sin(l),n[r+2]=l}},{key:"addAfterPosition",value:function(t,e,a,n,r){var i=e[a+2],s=e[a+3],o=i-e[a],h=s-e[a+1],l=Math.atan2(h,o);n[r]=i+t*Math.cos(l),n[r+1]=s+t*Math.sin(l),n[r+2]=l}},{key:"addCurvePosition",value:function(t,e,a,n,r,i,s,o,h,l,c,u){if(0==t||isNaN(t))return l[c]=e,l[c+1]=a,void(l[c+2]=Math.atan2(r-a,n-e));var f=t*t,d=f*t,v=1-t,m=v*v,p=m*v,g=v*t,y=3*g,k=v*y,b=y*t,x=e*p+n*k+i*b+o*d,w=a*p+r*k+s*b+h*d;l[c]=x,l[c+1]=w,u&&(l[c+2]=t<.001?Math.atan2(r-a,n-e):Math.atan2(w-(a*m+r*g*2+s*f),x-(e*m+n*g*2+i*f)))}}])}();we.NONE=-1,we.BEFORE=-2,we.AFTER=-3,we.epsilon=1e-5;var Ie,Ae=s((function t(e,a){if(r(this,t),this.data=null,this.bone=null,this.color=null,this.darkColor=null,this.attachment=null,this.attachmentTime=0,this.attachmentState=0,this.deform=new Array,!e)throw new Error("data cannot be null.");if(!a)throw new Error("bone cannot be null.");this.data=e,this.bone=a,this.color=new w,this.darkColor=e.darkColor?new w:null,this.setToSetupPose()}),[{key:"getSkeleton",value:function(){return this.bone.skeleton}},{key:"getAttachment",value:function(){return this.attachment}},{key:"setAttachment",value:function(t){this.attachment!=t&&(t instanceof P&&this.attachment instanceof P&&t.deformAttachment==this.attachment.deformAttachment||(this.deform.length=0),this.attachment=t,this.attachmentTime=this.bone.skeleton.time)}},{key:"setAttachmentTime",value:function(t){this.attachmentTime=this.bone.skeleton.time-t}},{key:"getAttachmentTime",value:function(){return this.bone.skeleton.time-this.attachmentTime}},{key:"setToSetupPose",value:function(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}}]),Ee=s((function t(e,a){if(r(this,t),this.data=null,this.bones=null,this.target=null,this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new M,this.active=!1,!e)throw new Error("data cannot be null.");if(!a)throw new Error("skeleton cannot be null.");this.data=e,this.mixRotate=e.mixRotate,this.mixX=e.mixX,this.mixY=e.mixY,this.mixScaleX=e.mixScaleX,this.mixScaleY=e.mixScaleY,this.mixShearY=e.mixShearY,this.bones=new Array;for(var n=0;n0?I.degRad:-I.degRad,d=this.data.offsetRotation*f,v=this.data.offsetShearY*f,m=this.bones,p=0,g=m.length;pI.PI?A-=I.PI2:A<-I.PI&&(A+=I.PI2),A*=t;var E=Math.cos(A),S=Math.sin(A);y.a=E*k-S*x,y.b=E*b-S*w,y.c=S*k+E*x,y.d=S*b+E*w}if(s){var R=this.temp;o.localToWorld(R.set(this.data.offsetX,this.data.offsetY)),y.worldX+=(R.x-y.worldX)*e,y.worldY+=(R.y-y.worldY)*a}if(0!=n){var T=Math.sqrt(y.a*y.a+y.c*y.c);0!=T&&(T=(T+(Math.sqrt(h*h+c*c)-T+this.data.offsetScaleX)*n)/T),y.a*=T,y.c*=T}if(0!=r){var C=Math.sqrt(y.b*y.b+y.d*y.d);0!=C&&(C=(C+(Math.sqrt(l*l+u*u)-C+this.data.offsetScaleY)*r)/C),y.b*=C,y.d*=C}if(i>0){var M=y.b,F=y.d,Y=Math.atan2(F,M),X=Math.atan2(u,l)-Math.atan2(c,h)-(Y-Math.atan2(y.c,y.a));X>I.PI?X-=I.PI2:X<-I.PI&&(X+=I.PI2),X=Y+(X+v)*i;var P=Math.sqrt(M*M+F*F);y.b=Math.cos(X)*P,y.d=Math.sin(X)*P}y.updateAppliedTransform()}}},{key:"applyRelativeWorld",value:function(){for(var t=this.mixRotate,e=this.mixX,a=this.mixY,n=this.mixScaleX,r=this.mixScaleY,i=this.mixShearY,s=0!=e||0!=a,o=this.target,h=o.a,l=o.b,c=o.c,u=o.d,f=h*u-l*c>0?I.degRad:-I.degRad,d=this.data.offsetRotation*f,v=this.data.offsetShearY*f,m=this.bones,p=0,g=m.length;pI.PI?A-=I.PI2:A<-I.PI&&(A+=I.PI2),A*=t;var E=Math.cos(A),S=Math.sin(A);y.a=E*k-S*x,y.b=E*b-S*w,y.c=S*k+E*x,y.d=S*b+E*w}if(s){var R=this.temp;o.localToWorld(R.set(this.data.offsetX,this.data.offsetY)),y.worldX+=R.x*e,y.worldY+=R.y*a}if(0!=n){var T=(Math.sqrt(h*h+c*c)-1+this.data.offsetScaleX)*n+1;y.a*=T,y.c*=T}if(0!=r){var C=(Math.sqrt(l*l+u*u)-1+this.data.offsetScaleY)*r+1;y.b*=C,y.d*=C}if(i>0){var M=Math.atan2(u,l)-Math.atan2(c,h);M>I.PI?M-=I.PI2:M<-I.PI&&(M+=I.PI2);var F=y.b,Y=y.d;M=Math.atan2(Y,F)+(M-I.PI/2+v)*i;var X=Math.sqrt(F*F+Y*Y);y.b=Math.cos(M)*X,y.d=Math.sin(M)*X}y.updateAppliedTransform()}}},{key:"applyAbsoluteLocal",value:function(){for(var t=this.mixRotate,e=this.mixX,a=this.mixY,n=this.mixScaleX,r=this.mixScaleY,i=this.mixShearY,s=this.target,o=this.bones,h=0,l=o.length;h2&&void 0!==arguments[2]?arguments[2]:new Array(2);if(!t)throw new Error("offset cannot be null.");if(!e)throw new Error("size cannot be null.");for(var n=this.drawOrder,r=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY,h=0,l=n.length;h0&&void 0!==arguments[0]?arguments[0]:0,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;r(this,t),this.slotIndex=e,this.name=a,this.attachment=n})),Ce=s((function t(e){if(r(this,t),this.name=null,this.attachments=new Array,this.bones=Array(),this.constraints=new Array,!e)throw new Error("name cannot be null.");this.name=e}),[{key:"setAttachment",value:function(t,e,a){if(!a)throw new Error("attachment cannot be null.");var n=this.attachments;t>=n.length&&(n.length=t+1),n[t]||(n[t]={}),n[t][e]=a}},{key:"addSkin",value:function(t){for(var e=0;e= 0.");if(!a)throw new Error("name cannot be null.");if(!n)throw new Error("boneData cannot be null.");this.index=e,this.name=a,this.boneData=n}));!function(t){t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen"}(Ie||(Ie={}));var Fe,Ye=function(t){function e(t){var a,n,i,s;return r(this,e),n=this,s=[t,0,!1],i=l(i=e),(a=u(n,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(i,s||[],l(n).constructor):i.apply(n,s))).bones=new Array,a.target=null,a.mixRotate=0,a.mixX=0,a.mixY=0,a.mixScaleX=0,a.mixScaleY=0,a.mixShearY=0,a.offsetRotation=0,a.offsetX=0,a.offsetY=0,a.offsetScaleX=0,a.offsetScaleY=0,a.offsetShearY=0,a.relative=!1,a.local=!1,a}return h(e,t),s(e)}(ue),Xe=s((function t(e){r(this,t),this.scale=1,this.attachmentLoader=null,this.linkedMeshes=new Array,this.attachmentLoader=e}),[{key:"readSkeletonData",value:function(t){var e=this.scale,a=new Re;a.name="";var n=new Pe(t),r=n.readInt32(),i=n.readInt32();a.hash=0==i&&0==r?null:i.toString(16)+r.toString(16),a.version=n.readString(),a.x=n.readFloat(),a.y=n.readFloat(),a.width=n.readFloat(),a.height=n.readFloat();var s=n.readBoolean();s&&(a.fps=n.readFloat(),a.imagesPath=n.readString(),a.audioPath=n.readString());var o=0;o=n.readInt(!0);for(var h=0;h0){for(var pn=new St(mn),gn=a.slots.length,yn=0;yn=0;wn--)xn[wn]=-1;for(var In=R.newArray(gn-bn,0),An=0,En=0,Sn=0;Sn=0;Tn--)-1==xn[Tn]&&(xn[Tn]=In[--En]);pn.setFrame(yn,kn,xn)}n.push(pn)}var Cn=t.readInt(!0);if(Cn>0){for(var Mn=new Et(Cn),Fn=0;Fn1&&void 0!==arguments[1]?arguments[1]:new Array,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new DataView(e.buffer);r(this,t),this.strings=a,this.index=n,this.buffer=i}),[{key:"readByte",value:function(){return this.buffer.getInt8(this.index++)}},{key:"readUnsignedByte",value:function(){return this.buffer.getUint8(this.index++)}},{key:"readShort",value:function(){var t=this.buffer.getInt16(this.index);return this.index+=2,t}},{key:"readInt32",value:function(){var t=this.buffer.getInt32(this.index);return this.index+=4,t}},{key:"readInt",value:function(t){var e=this.readByte(),a=127&e;return 0!=(128&e)&&(a|=(127&(e=this.readByte()))<<7,0!=(128&e)&&(a|=(127&(e=this.readByte()))<<14,0!=(128&e)&&(a|=(127&(e=this.readByte()))<<21,0!=(128&e)&&(a|=(127&(e=this.readByte()))<<28)))),t?a:a>>>1^-(1&a)}},{key:"readStringRef",value:function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]}},{key:"readString",value:function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",a=0;a>4){case 12:case 13:e+=String.fromCharCode((31&n)<<6|63&this.readByte()),a+=2;break;case 14:e+=String.fromCharCode((15&n)<<12|(63&this.readByte())<<6|63&this.readByte()),a+=3;break;default:e+=String.fromCharCode(n),a++}}return e}},{key:"readFloat",value:function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t}},{key:"readBoolean",value:function(){return 0!=this.readByte()}}]),Le=s((function t(e,a,n,i,s){r(this,t),this.mesh=e,this.skin=a,this.slotIndex=n,this.parent=i,this.inheritDeform=s})),Ne=s((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;r(this,t),this.bones=e,this.vertices=a}));function Be(t,e,a){for(var n=t.readFloat(),r=t.readFloat()*a,i=0,s=0,o=e.getFrameCount()-1;e.setFrame(i,n,r),i!=o;i++){var h=t.readFloat(),l=t.readFloat()*a;switch(t.readByte()){case sa:e.setStepped(i);break;case oa:_e(t,e,s++,i,0,n,h,r,l,a)}n=h,r=l}return e}function Oe(t,e,a){for(var n=t.readFloat(),r=t.readFloat()*a,i=t.readFloat()*a,s=0,o=0,h=e.getFrameCount()-1;e.setFrame(s,n,r,i),s!=h;s++){var l=t.readFloat(),c=t.readFloat()*a,u=t.readFloat()*a;switch(t.readByte()){case sa:e.setStepped(s);break;case oa:_e(t,e,o++,s,0,n,l,r,c,a),_e(t,e,o++,s,1,n,l,i,u,a)}n=l,r=c,i=u}return e}function _e(t,e,a,n,r,i,s,o,h,l){e.setBezier(a,n,r,i,o,t.readFloat(),t.readFloat()*l,t.readFloat(),t.readFloat()*l,s,h)}!function(t){t[t.Region=0]="Region",t[t.BoundingBox=1]="BoundingBox",t[t.Mesh=2]="Mesh",t[t.LinkedMesh=3]="LinkedMesh",t[t.Path=4]="Path",t[t.Point=5]="Point",t[t.Clipping=6]="Clipping"}(Fe||(Fe={}));var De,Ve=0,Ue=1,We=2,je=3,qe=4,ze=5,Ge=6,He=7,$e=8,Je=9,Qe=0,Ze=1,Ke=2,ta=3,ea=4,aa=5,na=0,ra=1,ia=2,sa=1,oa=2,ha=s((function t(){r(this,t),this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new C((function(){return R.newFloatArray(16)}))}),[{key:"update",value:function(t,e){if(!t)throw new Error("skeleton cannot be null.");var a=this.boundingBoxes,n=this.polygons,r=this.polygonPool,i=t.slots,s=i.length;a.length=0,r.freeAll(n),n.length=0;for(var o=0;o=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY}},{key:"aabbIntersectsSegment",value:function(t,e,a,n){var r=this.minX,i=this.minY,s=this.maxX,o=this.maxY;if(t<=r&&a<=r||e<=i&&n<=i||t>=s&&a>=s||e>=o&&n>=o)return!1;var h=(n-e)/(a-t),l=h*(r-t)+e;if(l>i&&li&&lr&&cr&&ct.minX&&this.minYt.minY}},{key:"containsPoint",value:function(t,e){for(var a=this.polygons,n=0,r=a.length;n=a||l=a){var c=n[o];c+(a-h)/(l-h)*(n[i]-c)=c&&k<=d||k>=d&&k<=c)&&(k>=e&&k<=n||k>=n&&k<=e)){var b=(l*g-h*m)/y;if((b>=u&&b<=v||b>=v&&b<=u)&&(b>=a&&b<=r||b>=r&&b<=a))return!0}c=d,u=v}return!1}},{key:"getPolygon",value:function(t){if(!t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]}},{key:"getWidth",value:function(){return this.maxX-this.minX}},{key:"getHeight",value:function(){return this.maxY-this.minY}}]),la=function(){function t(){r(this,t),this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new C((function(){return new Array})),this.polygonIndicesPool=new C((function(){return new Array}))}return s(t,[{key:"triangulate",value:function(e){var a=e,n=e.length>>1,r=this.indicesArray;r.length=0;for(var i=0;i3;){for(var c=n-1,u=0,f=1;;){t:if(!s[u]){for(var d=r[c]<<1,v=r[u]<<1,m=r[f]<<1,p=a[d],g=a[d+1],y=a[v],k=a[v+1],b=a[m],x=a[m+1],w=(f+1)%n;w!=c;w=(w+1)%n)if(s[w]){var I=r[w]<<1,A=a[I],E=a[I+1];if(t.positiveArea(b,x,p,g,A,E)&&t.positiveArea(p,g,y,k,A,E)&&t.positiveArea(y,k,b,x,A,E))break t}break}if(0==f){do{if(!s[u])break;u--}while(u>0);break}c=u,u=f,f=(f+1)%n}l.push(r[(n+u-1)%n]),l.push(r[u]),l.push(r[(u+1)%n]),r.splice(u,1),s.splice(u,1);var S=(--n+u-1)%n,R=u==n?0:u;s[S]=t.isConcave(S,n,a,r),s[R]=t.isConcave(R,n,a,r)}return 3==n&&(l.push(r[2]),l.push(r[0]),l.push(r[1])),l}},{key:"decompose",value:function(e,a){var n=e,r=this.convexPolygons;this.polygonPool.freeAll(r),r.length=0;var i=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(i),i.length=0;var s=this.polygonIndicesPool.obtain();s.length=0;var o=this.polygonPool.obtain();o.length=0;for(var h=-1,l=0,c=0,u=a.length;c0?(r.push(o),i.push(s)):(this.polygonPool.free(o),this.polygonIndicesPool.free(s)),(o=this.polygonPool.obtain()).length=0,o.push(m),o.push(p),o.push(g),o.push(y),o.push(k),o.push(b),(s=this.polygonIndicesPool.obtain()).length=0,s.push(f),s.push(d),s.push(v),l=t.winding(m,p,g,y,k,b),h=f)}o.length>0&&(r.push(o),i.push(s));for(var E=0,S=r.length;E=0;$--)0==(o=r[$]).length&&(r.splice($,1),this.polygonPool.free(o),s=i[$],i.splice($,1),this.polygonIndicesPool.free(s));return r}}],[{key:"isConcave",value:function(t,e,a,n){var r=n[(e+t-1)%e]<<1,i=n[t]<<1,s=n[(t+1)%e]<<1;return!this.positiveArea(a[r],a[r+1],a[i],a[i+1],a[s],a[s+1])}},{key:"positiveArea",value:function(t,e,a,n,r,i){return t*(i-n)+a*(e-i)+r*(n-e)>=0}},{key:"winding",value:function(t,e,a,n,r,i){var s=a-t,o=n-e;return r*o-i*s+s*e-t*o>=0?1:-1}}])}(),ca=function(){function t(){r(this,t),this.triangulator=new la,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array}return s(t,[{key:"clipStart",value:function(e,a){if(this.clipAttachment)return 0;this.clipAttachment=a;var n=a.worldVerticesLength,r=R.setArraySize(this.clippingPolygon,n);a.computeWorldVertices(e,0,n,r,0,2);var i=this.clippingPolygon;t.makeClockwise(i);for(var s=this.clippingPolygons=this.triangulator.decompose(i,this.triangulator.triangulate(i)),o=0,h=s.length;o>1,V=this.clipOutput,U=R.setArraySize(l,F+D*d),W=0;W=2?(c=o,o=this.scratch):c=this.scratch,c.length=0,c.push(t),c.push(e),c.push(a),c.push(n),c.push(r),c.push(i),c.push(t),c.push(e),o.length=0;for(var u=s,f=s.length-4,d=0;;d+=2){for(var v=u[d],m=u[d+1],p=u[d+2],g=u[d+3],y=v-p,k=m-g,b=c,x=c.length-2,w=o.length,I=0;I0;if(y*(E-g)-k*(A-p)>0){if(T){o.push(S),o.push(R);continue}var C=R-E,M=S-A,F=C*(p-v)-M*(g-m);if(Math.abs(F)>1e-6){var Y=(M*(m-E)-C*(v-A))/F;o.push(v+(p-v)*Y),o.push(m+(g-m)*Y)}else o.push(v),o.push(m)}else if(T){var X=R-E,P=S-A,L=X*(p-v)-P*(g-m);if(Math.abs(L)>1e-6){var N=(P*(m-E)-X*(v-A))/L;o.push(v+(p-v)*N),o.push(m+(g-m)*N)}else o.push(v),o.push(m);o.push(S),o.push(R)}l=!0}if(w==o.length)return h.length=0,!0;if(o.push(o[0]),o.push(o[1]),d==f)break;var B=o;(o=c).length=0,c=B}if(h!=o){h.length=0;for(var O=0,_=o.length-2;O<_;O++)h[O]=o[O]}else h.length=h.length-2;return l}}],[{key:"makeClockwise",value:function(t){for(var e=t,a=t.length,n=e[a-2]*e[1]-e[0]*e[a-1],r=0,i=0,s=0,o=0,h=a-3;o>1;l=0;Ga--)-1==_a[Ga]&&(_a[Ga]=Va[--Wa])}Pa.setFrame(Na,pa(Oa,"time",0),_a)}r.push(Pa)}if(t.events){for(var Ha=new Et(t.events.length),$a=0,Ja=0;Ja)?=?)"),v("XRANGEIDENTIFIERLOOSE","".concat(h[l.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),v("XRANGEIDENTIFIER","".concat(h[l.NUMERICIDENTIFIER],"|x|X|\\*")),v("XRANGEPLAIN","[v=\\s]*(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:".concat(h[l.PRERELEASE],")?").concat(h[l.BUILD],"?")+")?)?"),v("XRANGEPLAINLOOSE","[v=\\s]*(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(h[l.PRERELEASELOOSE],")?").concat(h[l.BUILD],"?")+")?)?"),v("XRANGE","^".concat(h[l.GTLT],"\\s*").concat(h[l.XRANGEPLAIN],"$")),v("XRANGELOOSE","^".concat(h[l.GTLT],"\\s*").concat(h[l.XRANGEPLAINLOOSE],"$")),v("COERCEPLAIN","".concat("(^|[^\\d])(\\d{1,").concat(a,"})")+"(?:\\.(\\d{1,".concat(a,"}))?")+"(?:\\.(\\d{1,".concat(a,"}))?")),v("COERCE","".concat(h[l.COERCEPLAIN],"(?:$|[^\\d])")),v("COERCEFULL",h[l.COERCEPLAIN]+"(?:".concat(h[l.PRERELEASE],")?")+"(?:".concat(h[l.BUILD],")?")+"(?:$|[^\\d])"),v("COERCERTL",h[l.COERCE],!0),v("COERCERTLFULL",h[l.COERCEFULL],!0),v("LONETILDE","(?:~>?)"),v("TILDETRIM","(\\s*)".concat(h[l.LONETILDE],"\\s+"),!0),e.tildeTrimReplace="$1~",v("TILDE","^".concat(h[l.LONETILDE]).concat(h[l.XRANGEPLAIN],"$")),v("TILDELOOSE","^".concat(h[l.LONETILDE]).concat(h[l.XRANGEPLAINLOOSE],"$")),v("LONECARET","(?:\\^)"),v("CARETTRIM","(\\s*)".concat(h[l.LONECARET],"\\s+"),!0),e.caretTrimReplace="$1^",v("CARET","^".concat(h[l.LONECARET]).concat(h[l.XRANGEPLAIN],"$")),v("CARETLOOSE","^".concat(h[l.LONECARET]).concat(h[l.XRANGEPLAINLOOSE],"$")),v("COMPARATORLOOSE","^".concat(h[l.GTLT],"\\s*(").concat(h[l.LOOSEPLAIN],")$|^$")),v("COMPARATOR","^".concat(h[l.GTLT],"\\s*(").concat(h[l.FULLPLAIN],")$|^$")),v("COMPARATORTRIM","(\\s*)".concat(h[l.GTLT],"\\s*(").concat(h[l.LOOSEPLAIN],"|").concat(h[l.XRANGEPLAIN],")"),!0),e.comparatorTrimReplace="$1$2$3",v("HYPHENRANGE","^\\s*(".concat(h[l.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(h[l.XRANGEPLAIN],")")+"\\s*$"),v("HYPHENRANGELOOSE","^\\s*(".concat(h[l.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(h[l.XRANGEPLAINLOOSE],")")+"\\s*$"),v("STAR","(<|>)?=?\\s*\\*"),v("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),v("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Ta,Ta.exports);var Ca=Ta.exports;Ia(Ca);var Ma=Object.freeze({loose:!0}),Fa=Object.freeze({}),Ya=function(t){return t?"object"!==n(t)?Ma:t:Fa};Ia(Ya);var Xa=/^[0-9]+$/,Pa=function(t,e){var a=Xa.test(t),n=Xa.test(e);return a&&n&&(t=+t,e=+e),t===e?0:a&&!n?-1:n&&!a?1:tBa)throw new TypeError("version is longer than ".concat(Ba," characters"));Na("SemVer",e,a),this.options=a,this.loose=!!a.loose,this.includePrerelease=!!a.includePrerelease;var i=e.trim().match(a.loose?_a[Da.LOOSE]:_a[Da.FULL]);if(!i)throw new TypeError("Invalid Version: ".concat(e));if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>Oa||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Oa||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Oa||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map((function(t){if(/^[0-9]+$/.test(t)){var e=+t;if(e>=0&&e=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(e===this.prerelease.join(".")&&!1===a)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(e){var i=[e,n];!1===a&&(i=[e]),0===Ua(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break;default:throw new Error("invalid increment argument: ".concat(t))}return this.raw=this.format(),this.build.length&&(this.raw+="+".concat(this.build.join("."))),this}}])}(),ja=Wa;Ia(ja);var qa=ja,za=function(t,e){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t instanceof qa)return t;try{return new qa(t,e)}catch(t){if(!a)return null;throw t}};Ia(za);var Ga=za,Ha=Ia((function(t,e){var a=Ga(t,e);return a?a.version:null})),$a=ja,Ja=za,Qa=Ca.safeRe,Za=Ca.t,Ka=Ia((function(t,e){if(t instanceof $a)return t;if("number"==typeof t&&(t=String(t)),"string"!=typeof t)return null;var a=null;if((e=e||{}).rtl){for(var n,r=e.includePrerelease?Qa[Za.COERCERTLFULL]:Qa[Za.COERCERTL];(n=r.exec(t))&&(!a||a.index+a[0].length!==t.length);)a&&n.index+n[0].length===a.index+a[0].length||(a=n),r.lastIndex=n.index+n[1].length+n[2].length;r.lastIndex=-1}else a=t.match(e.includePrerelease?Qa[Za.COERCEFULL]:Qa[Za.COERCE]);if(null===a)return null;var i=a[2],s=a[3]||"0",o=a[4]||"0",h=e.includePrerelease&&a[5]?"-".concat(a[5]):"",l=e.includePrerelease&&a[6]?"+".concat(a[6]):"";return Ja("".concat(i,".").concat(s,".").concat(o).concat(h).concat(l),e)})),tn=s((function t(){r(this,t),this.max=1e3,this.map=new Map}),[{key:"get",value:function(t){var e=this.map.get(t);return void 0===e?void 0:(this.map.delete(t),this.map.set(t,e),e)}},{key:"delete",value:function(t){return!!this.map.has(t)&&(this.map.delete(t),!0)}},{key:"set",value:function(t,e){if(!this.delete(t)&&void 0!==e){if(this.map.size>=this.max){var a=this.map.keys().next().value;this.delete(a)}this.map.set(t,e)}return this}}]);Ia(tn);var en=ja,an=function(t,e,a){return new en(t,a).compare(new en(e,a))};Ia(an);var nn=an,rn=function(t,e,a){return 0===nn(t,e,a)};Ia(rn);var sn=an,on=function(t,e,a){return 0!==sn(t,e,a)};Ia(on);var hn=an,ln=function(t,e,a){return hn(t,e,a)>0};Ia(ln);var cn=an,un=function(t,e,a){return cn(t,e,a)>=0};Ia(un);var fn=an,dn=function(t,e,a){return fn(t,e,a)<0};Ia(dn);var vn=an,mn=function(t,e,a){return vn(t,e,a)<=0};Ia(mn);var pn,gn,yn,kn,bn=rn,xn=on,wn=ln,In=un,An=dn,En=mn,Sn=function(t,e,a,r){switch(e){case"===":return"object"===n(t)&&(t=t.version),"object"===n(a)&&(a=a.version),t===a;case"!==":return"object"===n(t)&&(t=t.version),"object"===n(a)&&(a=a.version),t!==a;case"":case"=":case"==":return bn(t,a,r);case"!=":return xn(t,a,r);case">":return wn(t,a,r);case">=":return In(t,a,r);case"<":return An(t,a,r);case"<=":return En(t,a,r);default:throw new TypeError("Invalid operator: ".concat(e))}};function Rn(){if(kn)return yn;kn=1;var t=function(){function t(e,i){var s=this;if(r(this,t),i=a(i),e instanceof t)return e.loose===!!i.loose&&e.includePrerelease===!!i.includePrerelease?e:new t(e.raw,i);if(e instanceof n)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((function(t){return s.parseRange(t.trim())})).filter((function(t){return t.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(this.raw));if(this.set.length>1){var o=this.set[0];if(this.set=this.set.filter((function(t){return!p(t[0])})),0===this.set.length)this.set=[o];else if(this.set.length>1){var h,l=g(this.set);try{for(l.s();!(h=l.n()).done;){var c=h.value;if(1===c.length&&y(c[0])){this.set=[c];break}}}catch(t){l.e(t)}finally{l.f()}}}this.format()}return s(t,[{key:"format",value:function(){return this.range=this.set.map((function(t){return t.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(t){var a=this,r=((this.options.includePrerelease&&d)|(this.options.loose&&m))+":"+t,s=e.get(r);if(s)return s;var o=this.options.loose,y=o?h[l.HYPHENRANGELOOSE]:h[l.HYPHENRANGE];t=t.replace(y,M(this.options.includePrerelease)),i("hyphen replace",t),t=t.replace(h[l.COMPARATORTRIM],c),i("comparator trim",t),t=t.replace(h[l.TILDETRIM],u),i("tilde trim",t),t=t.replace(h[l.CARETTRIM],f),i("caret trim",t);var k=t.split(" ").map((function(t){return b(t,a.options)})).join(" ").split(/\s+/).map((function(t){return C(t,a.options)}));o&&(k=k.filter((function(t){return i("loose invalid filter",t,a.options),!!t.match(h[l.COMPARATORLOOSE])}))),i("range list",k);var x,w=new Map,I=k.map((function(t){return new n(t,a.options)})),A=g(I);try{for(A.s();!(x=A.n()).done;){var E=x.value;if(p(E))return[E];w.set(E.value,E)}}catch(t){A.e(t)}finally{A.f()}w.size>1&&w.has("")&&w.delete("");var S=v(w.values());return e.set(r,S),S}},{key:"intersects",value:function(e,a){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((function(t){return k(t,a)&&e.set.some((function(e){return k(e,a)&&t.every((function(t){return e.every((function(e){return t.intersects(e,a)}))}))}))}))}},{key:"test",value:function(t){if(!t)return!1;if("string"==typeof t)try{t=new o(t,this.options)}catch(t){return!1}for(var e=0;e")||!t.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!t.operator.startsWith("<"))&&(this.semver.version!==t.semver.version||!this.operator.includes("=")||!t.operator.includes("="))&&!(o(this.semver,"<",t.semver,n)&&this.operator.startsWith(">")&&t.operator.startsWith("<"))&&!(o(this.semver,">",t.semver,n)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}}],[{key:"ANY",get:function(){return t}}])}();pn=e;var a=Ya,n=Ca.safeRe,i=Ca.t,o=Sn,h=Ra,l=ja,c=Rn();return pn}(),i=Ra,o=ja,h=Ca.safeRe,l=Ca.t,c=Ca.comparatorTrimReplace,u=Ca.tildeTrimReplace,f=Ca.caretTrimReplace,d=Aa.FLAG_INCLUDE_PRERELEASE,m=Aa.FLAG_LOOSE,p=function(t){return"<0.0.0-0"===t.value},y=function(t){return""===t.value},k=function(t,e){for(var a=!0,n=t.slice(),r=n.pop();a&&n.length;)a=n.every((function(t){return r.intersects(t,e)})),r=n.pop();return a},b=function(t,e){return i("comp",t,e),t=A(t,e),i("caret",t),t=w(t,e),i("tildes",t),t=S(t,e),i("xrange",t),t=T(t,e),i("stars",t),t},x=function(t){return!t||"x"===t.toLowerCase()||"*"===t},w=function(t,e){return t.trim().split(/\s+/).map((function(t){return I(t,e)})).join(" ")},I=function(t,e){var a=e.loose?h[l.TILDELOOSE]:h[l.TILDE];return t.replace(a,(function(e,a,n,r,s){var o;return i("tilde",t,e,a,n,r,s),x(a)?o="":x(n)?o=">=".concat(a,".0.0 <").concat(+a+1,".0.0-0"):x(r)?o=">=".concat(a,".").concat(n,".0 <").concat(a,".").concat(+n+1,".0-0"):s?(i("replaceTilde pr",s),o=">=".concat(a,".").concat(n,".").concat(r,"-").concat(s," <").concat(a,".").concat(+n+1,".0-0")):o=">=".concat(a,".").concat(n,".").concat(r," <").concat(a,".").concat(+n+1,".0-0"),i("tilde return",o),o}))},A=function(t,e){return t.trim().split(/\s+/).map((function(t){return E(t,e)})).join(" ")},E=function(t,e){i("caret",t,e);var a=e.loose?h[l.CARETLOOSE]:h[l.CARET],n=e.includePrerelease?"-0":"";return t.replace(a,(function(e,a,r,s,o){var h;return i("caret",t,e,a,r,s,o),x(a)?h="":x(r)?h=">=".concat(a,".0.0").concat(n," <").concat(+a+1,".0.0-0"):x(s)?h="0"===a?">=".concat(a,".").concat(r,".0").concat(n," <").concat(a,".").concat(+r+1,".0-0"):">=".concat(a,".").concat(r,".0").concat(n," <").concat(+a+1,".0.0-0"):o?(i("replaceCaret pr",o),h="0"===a?"0"===r?">=".concat(a,".").concat(r,".").concat(s,"-").concat(o," <").concat(a,".").concat(r,".").concat(+s+1,"-0"):">=".concat(a,".").concat(r,".").concat(s,"-").concat(o," <").concat(a,".").concat(+r+1,".0-0"):">=".concat(a,".").concat(r,".").concat(s,"-").concat(o," <").concat(+a+1,".0.0-0")):(i("no pr"),h="0"===a?"0"===r?">=".concat(a,".").concat(r,".").concat(s).concat(n," <").concat(a,".").concat(r,".").concat(+s+1,"-0"):">=".concat(a,".").concat(r,".").concat(s).concat(n," <").concat(a,".").concat(+r+1,".0-0"):">=".concat(a,".").concat(r,".").concat(s," <").concat(+a+1,".0.0-0")),i("caret return",h),h}))},S=function(t,e){return i("replaceXRanges",t,e),t.split(/\s+/).map((function(t){return R(t,e)})).join(" ")},R=function(t,e){t=t.trim();var a=e.loose?h[l.XRANGELOOSE]:h[l.XRANGE];return t.replace(a,(function(a,n,r,s,o,h){i("xRange",t,a,n,r,s,o,h);var l=x(r),c=l||x(s),u=c||x(o),f=u;return"="===n&&f&&(n=""),h=e.includePrerelease?"-0":"",l?a=">"===n||"<"===n?"<0.0.0-0":"*":n&&f?(c&&(s=0),o=0,">"===n?(n=">=",c?(r=+r+1,s=0,o=0):(s=+s+1,o=0)):"<="===n&&(n="<",c?r=+r+1:s=+s+1),"<"===n&&(h="-0"),a="".concat(n+r,".").concat(s,".").concat(o).concat(h)):c?a=">=".concat(r,".0.0").concat(h," <").concat(+r+1,".0.0-0"):u&&(a=">=".concat(r,".").concat(s,".0").concat(h," <").concat(r,".").concat(+s+1,".0-0")),i("xRange return",a),a}))},T=function(t,e){return i("replaceStars",t,e),t.trim().replace(h[l.STAR],"")},C=function(t,e){return i("replaceGTE0",t,e),t.trim().replace(h[e.includePrerelease?l.GTE0PRE:l.GTE0],"")},M=function(t){return function(e,a,n,r,i,s,o,h,l,c,u,f){return a=x(n)?"":x(r)?">=".concat(n,".0.0").concat(t?"-0":""):x(i)?">=".concat(n,".").concat(r,".0").concat(t?"-0":""):s?">=".concat(a):">=".concat(a).concat(t?"-0":""),h=x(l)?"":x(c)?"<".concat(+l+1,".0.0-0"):x(u)?"<".concat(l,".").concat(+c+1,".0-0"):f?"<=".concat(l,".").concat(c,".").concat(u,"-").concat(f):t?"<".concat(l,".").concat(c,".").concat(+u+1,"-0"):"<=".concat(h),"".concat(a," ").concat(h).trim()}},F=function(t,e,a){for(var r=0;r0){var o=t[s].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0};return yn}Ia(Sn);var Tn=Rn(),Cn=function(t,e,a){try{e=new Tn(e,a)}catch(t){return!1}return e.test(t)},Mn={valid:Ha,coerce:Ka,satisfies:Ia(Cn),SEMVER_SPEC_VERSION:Ea.SEMVER_SPEC_VERSION},Fn=0,Yn=1,Xn=2,Pn=[0,1,2,2,3,0],Ln=s((function t(e,n,i,s){var h;if(r(this,t),o(this,"autoUpdate",!0),o(this,"skeleton",void 0),o(this,"states",void 0),this._app=e,this._position=new a.Vec3,1===Kt.length){var l,c=g((h=new Kt(n)).pages);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.setTexture(new wa(s[u.name]))}}catch(t){c.e(t)}finally{c.f()}}else h=new Kt(n,(function(t){return new wa(s[t])}));var f=new ua(new he(h));f.scale*=.01;var d=f.readSkeletonData(i);this.skeletonVersion=Mn.valid(Mn.coerce(d.version)),this._spine_3_6_0=Mn.satisfies(this.skeletonVersion,"<=3.6.0"),this._spine_3_7_99=Mn.satisfies(this.skeletonVersion,"<=3.7.99"),this._spine_4_0_X=Mn.satisfies(this.skeletonVersion,"~4.0.0"),this._spine_4_1_X=Mn.satisfies(this.skeletonVersion,"~4.1.23"),this.skeleton=new Se(d),this.skeleton.updateWorldTransform(),this.stateData=new qt(this.skeleton.data),this.states=[new Xt(this.stateData)],this.clipper=new ca,this._node=new a.GraphNode,this._meshes=[],this._meshInstances=[],this._materials={},this._tint={},this._aabb=new a.BoundingBox,this._aabbTempArray=[],this._aabbTempOffset=new a.Vec2,this._aabbTempSize=new a.Vec2,this._renderCounts={vertexCount:0,indexCount:0},this._vertexFormat=null,this._vertexBuffer=null,this._indexBuffer=null,this._priority=0,this._timeScale=1,this._layers=[a.LAYERID_UI],this.init(),this._hidden=!1}),[{key:"destroy",value:function(){this.removeFromLayers();for(var t=0;t0&&this._renderCounts.vertexCount>0){this.skeleton.getBounds(this._aabbTempOffset,this._aabbTempSize,this._aabbTempArray),this._aabb.center=new a.Vec3(this._aabbTempOffset.x,this._aabbTempOffset.y,0),this._aabb.halfExtents=new a.Vec3(.5*this._aabbTempSize.x,.5*this._aabbTempSize.y,0),(!this._vertexBuffer||this._vertexBuffer.getNumVertices()0&&u.indices.length>0){t&&t!==u.material&&(this.SubmitBatch(e,n,t),t=u.material,e=s,n=0),t=u.material;var f=u.positions,d=u.vertexColor.r,v=u.vertexColor.g,m=u.vertexColor.b,p=u.vertexColor.a,g=u.uvs,y=void 0,k=f.length/2;for(y=0;y0){var r=new a.Mesh(this._app.graphicsDevice);r.vertexBuffer=this._vertexBuffer,r.indexBuffer[0]=this._indexBuffer,r.primitive[0].type=a.PRIMITIVE_TRIANGLES,r.primitive[0].base=t,r.primitive[0].count=e,r.primitive[0].indexed=!0,r.aabb=this._aabb,this._meshes.push(r);var i=new a.MeshInstance(r,this._materials[n],this._node);i.drawOrder=this.priority+this._meshInstances.length,i.visible=!this._hidden,this._meshInstances.push(i)}}},{key:"update",value:function(t){if(!this._hidden){var e;t*=this._timeScale;var a=this.states.length;for(e=0;e= 0; --o) { - var i = this.tryEntries[o], - a = i.completion; - if ("root" === i.tryLoc) return handle("end"); - if (i.tryLoc <= this.prev) { - var c = n.call(i, "catchLoc"), - u = n.call(i, "finallyLoc"); - if (c && u) { - if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); - if (this.prev < i.finallyLoc) return handle(i.finallyLoc); - } else if (c) { - if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); - } else { - if (!u) throw new Error("try statement without catch or finally"); - if (this.prev < i.finallyLoc) return handle(i.finallyLoc); - } - } - } - }, - abrupt: function (t, e) { - for (var r = this.tryEntries.length - 1; r >= 0; --r) { - var o = this.tryEntries[r]; - if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { - var i = o; - break; - } - } - i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); - var a = i ? i.completion : {}; - return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); - }, - complete: function (t, e) { - if ("throw" === t.type) throw t.arg; - return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; - }, - finish: function (t) { - for (var e = this.tryEntries.length - 1; e >= 0; --e) { - var r = this.tryEntries[e]; - if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; - } - }, - catch: function (t) { - for (var e = this.tryEntries.length - 1; e >= 0; --e) { - var r = this.tryEntries[e]; - if (r.tryLoc === t) { - var n = r.completion; - if ("throw" === n.type) { - var o = n.arg; - resetTryEntry(r); - } - return o; - } - } - throw new Error("illegal catch attempt"); - }, - delegateYield: function (e, r, n) { - return this.delegate = { - iterator: values(e), - resultName: r, - nextLoc: n - }, "next" === this.method && (this.arg = t), y; - } - }, e; - } function _typeof(o) { "@babel/helpers - typeof"; @@ -424,17 +120,6 @@ var spine = (function (pc) { }; return _setPrototypeOf(o, p); } - function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - try { - Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); - return true; - } catch (e) { - return false; - } - } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); @@ -449,20 +134,6 @@ var spine = (function (pc) { } return _assertThisInitialized(self); } - function _createSuper(Derived) { - var hasNativeReflectConstruct = _isNativeReflectConstruct(); - return function _createSuperInternal() { - var Super = _getPrototypeOf(Derived), - result; - if (hasNativeReflectConstruct) { - var NewTarget = _getPrototypeOf(this).constructor; - result = Reflect.construct(Super, arguments, NewTarget); - } else { - result = Super.apply(this, arguments); - } - return _possibleConstructorReturn(this, result); - }; - } function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); @@ -470,11 +141,11 @@ var spine = (function (pc) { } return object; } - function _get$1() { + function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { - _get$1 = Reflect.get.bind(); + _get = Reflect.get.bind(); } else { - _get$1 = function _get(target, property, receiver) { + _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); @@ -484,7 +155,7 @@ var spine = (function (pc) { return desc.value; }; } - return _get$1.apply(this, arguments); + return _get.apply(this, arguments); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); @@ -523,7 +194,7 @@ var spine = (function (pc) { function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { - if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { + if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike ) { if (it) o = it; var i = 0; var F = function () {}; @@ -575,23 +246,37 @@ var spine = (function (pc) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { - var res = prim.call(input, hint || "default"); + var res = prim.call(input, hint ); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } - return (hint === "string" ? String : Number)(input); + return (String )(input); } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } + function _callSuper$f(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var IntSet = function () { function IntSet() { _classCallCheck(this, IntSet); this.array = new Array(); } - _createClass(IntSet, [{ + return _createClass(IntSet, [{ key: "add", value: function add(value) { var contains = this.contains(value); @@ -614,7 +299,6 @@ var spine = (function (pc) { this.array.length = 0; } }]); - return IntSet; }(); var StringSet = function () { function StringSet() { @@ -622,7 +306,7 @@ var spine = (function (pc) { this.entries = {}; this.size = 0; } - _createClass(StringSet, [{ + return _createClass(StringSet, [{ key: "add", value: function add(value) { var contains = this.entries[value]; @@ -652,7 +336,6 @@ var spine = (function (pc) { this.size = 0; } }]); - return StringSet; }(); var Color = function () { function Color() { @@ -666,7 +349,7 @@ var spine = (function (pc) { this.b = b; this.a = a; } - _createClass(Color, [{ + return _createClass(Color, [{ key: "set", value: function set(r, g, b, a) { this.r = r; @@ -733,7 +416,6 @@ var spine = (function (pc) { return new Color().setFromString(hex); } }]); - return Color; }(); Color.WHITE = new Color(1, 1, 1, 1); Color.RED = new Color(1, 0, 0, 1); @@ -744,7 +426,7 @@ var spine = (function (pc) { function MathUtils() { _classCallCheck(this, MathUtils); } - _createClass(MathUtils, null, [{ + return _createClass(MathUtils, null, [{ key: "clamp", value: function clamp(value, min, max) { if (value < min) return min; @@ -796,7 +478,6 @@ var spine = (function (pc) { return value && (value & value - 1) === 0; } }]); - return MathUtils; }(); MathUtils.PI = 3.1415927; MathUtils.PI2 = MathUtils.PI * 2; @@ -808,54 +489,49 @@ var spine = (function (pc) { function Interpolation() { _classCallCheck(this, Interpolation); } - _createClass(Interpolation, [{ + return _createClass(Interpolation, [{ key: "apply", value: function apply(start, end, a) { return start + (end - start) * this.applyInternal(a); } }]); - return Interpolation; }(); var Pow = function (_Interpolation) { - _inherits(Pow, _Interpolation); - var _super = _createSuper(Pow); function Pow(power) { - var _this; + var _this2; _classCallCheck(this, Pow); - _this = _super.call(this); - _this.power = 2; - _this.power = power; - return _this; + _this2 = _callSuper$f(this, Pow); + _this2.power = 2; + _this2.power = power; + return _this2; } - _createClass(Pow, [{ + _inherits(Pow, _Interpolation); + return _createClass(Pow, [{ key: "applyInternal", value: function applyInternal(a) { if (a <= 0.5) return Math.pow(a * 2, this.power) / 2; return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1; } }]); - return Pow; }(Interpolation); var PowOut = function (_Pow) { - _inherits(PowOut, _Pow); - var _super2 = _createSuper(PowOut); function PowOut(power) { _classCallCheck(this, PowOut); - return _super2.call(this, power); + return _callSuper$f(this, PowOut, [power]); } - _createClass(PowOut, [{ + _inherits(PowOut, _Pow); + return _createClass(PowOut, [{ key: "applyInternal", value: function applyInternal(a) { return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1; } }]); - return PowOut; }(Pow); var Utils = function () { function Utils() { _classCallCheck(this, Utils); } - _createClass(Utils, null, [{ + return _createClass(Utils, null, [{ key: "arrayCopy", value: function arrayCopy(source, sourceStart, dest, destStart, numElements) { for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) { @@ -936,14 +612,13 @@ var spine = (function (pc) { return type[name[0].toUpperCase() + name.slice(1)]; } }]); - return Utils; }(); Utils.SUPPORTS_TYPED_ARRAYS = typeof Float32Array !== "undefined"; var DebugUtils = function () { function DebugUtils() { _classCallCheck(this, DebugUtils); } - _createClass(DebugUtils, null, [{ + return _createClass(DebugUtils, null, [{ key: "logBones", value: function logBones(skeleton) { for (var i = 0; i < skeleton.bones.length; i++) { @@ -952,7 +627,6 @@ var spine = (function (pc) { } } }]); - return DebugUtils; }(); var Pool = function () { function Pool(instantiator) { @@ -960,7 +634,7 @@ var spine = (function (pc) { this.items = new Array(); this.instantiator = instantiator; } - _createClass(Pool, [{ + return _createClass(Pool, [{ key: "obtain", value: function obtain() { return this.items.length > 0 ? this.items.pop() : this.instantiator(); @@ -982,7 +656,6 @@ var spine = (function (pc) { this.items.length = 0; } }]); - return Pool; }(); var Vector2 = function () { function Vector2() { @@ -992,7 +665,7 @@ var spine = (function (pc) { this.x = x; this.y = y; } - _createClass(Vector2, [{ + return _createClass(Vector2, [{ key: "set", value: function set(x, y) { this.x = x; @@ -1017,7 +690,6 @@ var spine = (function (pc) { return this; } }]); - return Vector2; }(); var TimeKeeper = function () { function TimeKeeper() { @@ -1030,7 +702,7 @@ var spine = (function (pc) { this.frameCount = 0; this.frameTime = 0; } - _createClass(TimeKeeper, [{ + return _createClass(TimeKeeper, [{ key: "update", value: function update() { var now = Date.now() / 1000; @@ -1047,7 +719,6 @@ var spine = (function (pc) { } } }]); - return TimeKeeper; }(); var WindowedMean = function () { function WindowedMean() { @@ -1059,7 +730,7 @@ var spine = (function (pc) { this.dirty = true; this.values = new Array(windowSize); } - _createClass(WindowedMean, [{ + return _createClass(WindowedMean, [{ key: "hasEnoughData", value: function hasEnoughData() { return this.addedValues >= this.values.length; @@ -1087,29 +758,41 @@ var spine = (function (pc) { return 0; } }]); - return WindowedMean; }(); + function _callSuper$e(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var Attachment = _createClass(function Attachment(name) { _classCallCheck(this, Attachment); if (!name) throw new Error("name cannot be null."); this.name = name; }); var VertexAttachment = function (_Attachment) { - _inherits(VertexAttachment, _Attachment); - var _super = _createSuper(VertexAttachment); function VertexAttachment(name) { - var _this; + var _this2; _classCallCheck(this, VertexAttachment); - _this = _super.call(this, name); - _this.id = VertexAttachment.nextID++; - _this.bones = null; - _this.vertices = []; - _this.worldVerticesLength = 0; - _this.timelineAttachment = _assertThisInitialized(_this); - return _this; - } - _createClass(VertexAttachment, [{ + _this2 = _callSuper$e(this, VertexAttachment, [name]); + _this2.id = VertexAttachment.nextID++; + _this2.bones = null; + _this2.vertices = []; + _this2.worldVerticesLength = 0; + _this2.timelineAttachment = _this2; + return _this2; + } + _inherits(VertexAttachment, _Attachment); + return _createClass(VertexAttachment, [{ key: "computeWorldVertices", value: function computeWorldVertices(slot, start, count, worldVertices, offset, stride) { count = offset + (count >> 1) * stride; @@ -1194,7 +877,6 @@ var spine = (function (pc) { attachment.timelineAttachment = this.timelineAttachment; } }]); - return VertexAttachment; }(Attachment); VertexAttachment.nextID = 0; @@ -1207,7 +889,7 @@ var spine = (function (pc) { this.setupIndex = 0; this.regions = new Array(count); } - _createClass(Sequence, [{ + return _createClass(Sequence, [{ key: "copy", value: function copy() { var copy = new Sequence(this.regions.length); @@ -1244,7 +926,6 @@ var spine = (function (pc) { return Sequence._nextID++; } }]); - return Sequence; }(); Sequence._nextID = 0; var SequenceMode; @@ -1259,6 +940,20 @@ var spine = (function (pc) { })(SequenceMode || (SequenceMode = {})); var SequenceModeValues = [SequenceMode.hold, SequenceMode.once, SequenceMode.loop, SequenceMode.pingpong, SequenceMode.onceReverse, SequenceMode.loopReverse, SequenceMode.pingpongReverse]; + function _callSuper$d(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var Animation = function () { function Animation(name, timelines, duration) { _classCallCheck(this, Animation); @@ -1269,7 +964,7 @@ var spine = (function (pc) { this.setTimelines(timelines); this.duration = duration; } - _createClass(Animation, [{ + return _createClass(Animation, [{ key: "setTimelines", value: function setTimelines(timelines) { if (!timelines) throw new Error("timelines cannot be null."); @@ -1295,7 +990,6 @@ var spine = (function (pc) { for (var i = 0, n = timelines.length; i < n; i++) timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction); } }]); - return Animation; }(); var MixBlend; (function (MixBlend) { @@ -1337,7 +1031,7 @@ var spine = (function (pc) { this.propertyIds = propertyIds; this.frames = Utils.newFloatArray(frameCount * this.getFrameEntries()); } - _createClass(Timeline, [{ + return _createClass(Timeline, [{ key: "getPropertyIds", value: function getPropertyIds() { return this.propertyIds; @@ -1372,20 +1066,18 @@ var spine = (function (pc) { return n - step; } }]); - return Timeline; }(); var CurveTimeline = function (_Timeline) { - _inherits(CurveTimeline, _Timeline); - var _super = _createSuper(CurveTimeline); function CurveTimeline(frameCount, bezierCount, propertyIds) { - var _this; + var _this2; _classCallCheck(this, CurveTimeline); - _this = _super.call(this, frameCount, propertyIds); - _this.curves = Utils.newFloatArray(frameCount + bezierCount * 18); - _this.curves[frameCount - 1] = 1; - return _this; + _this2 = _callSuper$d(this, CurveTimeline, [frameCount, propertyIds]); + _this2.curves = Utils.newFloatArray(frameCount + bezierCount * 18); + _this2.curves[frameCount - 1] = 1; + return _this2; } - _createClass(CurveTimeline, [{ + _inherits(CurveTimeline, _Timeline); + return _createClass(CurveTimeline, [{ key: "setLinear", value: function setLinear(frame) { this.curves[frame] = 0; @@ -1455,16 +1147,14 @@ var spine = (function (pc) { return y + (time - x) / (this.frames[frameIndex] - x) * (this.frames[frameIndex + valueOffset] - y); } }]); - return CurveTimeline; }(Timeline); var CurveTimeline1 = function (_CurveTimeline) { - _inherits(CurveTimeline1, _CurveTimeline); - var _super2 = _createSuper(CurveTimeline1); function CurveTimeline1(frameCount, bezierCount, propertyId) { _classCallCheck(this, CurveTimeline1); - return _super2.call(this, frameCount, bezierCount, [propertyId]); + return _callSuper$d(this, CurveTimeline1, [frameCount, bezierCount, [propertyId]]); } - _createClass(CurveTimeline1, [{ + _inherits(CurveTimeline1, _CurveTimeline); + return _createClass(CurveTimeline1, [{ key: "getFrameEntries", value: function getFrameEntries() { return 2; @@ -1499,16 +1189,14 @@ var spine = (function (pc) { return this.getBezierValue(time, i, 1, curveType - 2); } }]); - return CurveTimeline1; }(CurveTimeline); var CurveTimeline2 = function (_CurveTimeline2) { - _inherits(CurveTimeline2, _CurveTimeline2); - var _super3 = _createSuper(CurveTimeline2); function CurveTimeline2(frameCount, bezierCount, propertyId1, propertyId2) { _classCallCheck(this, CurveTimeline2); - return _super3.call(this, frameCount, bezierCount, [propertyId1, propertyId2]); + return _callSuper$d(this, CurveTimeline2, [frameCount, bezierCount, [propertyId1, propertyId2]]); } - _createClass(CurveTimeline2, [{ + _inherits(CurveTimeline2, _CurveTimeline2); + return _createClass(CurveTimeline2, [{ key: "getFrameEntries", value: function getFrameEntries() { return 3; @@ -1522,20 +1210,18 @@ var spine = (function (pc) { this.frames[frame + 2] = value2; } }]); - return CurveTimeline2; }(CurveTimeline); var RotateTimeline = function (_CurveTimeline3) { - _inherits(RotateTimeline, _CurveTimeline3); - var _super4 = _createSuper(RotateTimeline); function RotateTimeline(frameCount, bezierCount, boneIndex) { - var _this2; + var _this3; _classCallCheck(this, RotateTimeline); - _this2 = _super4.call(this, frameCount, bezierCount, Property.rotate + "|" + boneIndex); - _this2.boneIndex = 0; - _this2.boneIndex = boneIndex; - return _this2; + _this3 = _callSuper$d(this, RotateTimeline, [frameCount, bezierCount, Property.rotate + "|" + boneIndex]); + _this3.boneIndex = 0; + _this3.boneIndex = boneIndex; + return _this3; } - _createClass(RotateTimeline, [{ + _inherits(RotateTimeline, _CurveTimeline3); + return _createClass(RotateTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -1564,20 +1250,18 @@ var spine = (function (pc) { } } }]); - return RotateTimeline; }(CurveTimeline1); var TranslateTimeline = function (_CurveTimeline4) { - _inherits(TranslateTimeline, _CurveTimeline4); - var _super5 = _createSuper(TranslateTimeline); function TranslateTimeline(frameCount, bezierCount, boneIndex) { - var _this3; + var _this4; _classCallCheck(this, TranslateTimeline); - _this3 = _super5.call(this, frameCount, bezierCount, Property.x + "|" + boneIndex, Property.y + "|" + boneIndex); - _this3.boneIndex = 0; - _this3.boneIndex = boneIndex; - return _this3; + _this4 = _callSuper$d(this, TranslateTimeline, [frameCount, bezierCount, Property.x + "|" + boneIndex, Property.y + "|" + boneIndex]); + _this4.boneIndex = 0; + _this4.boneIndex = boneIndex; + return _this4; } - _createClass(TranslateTimeline, [{ + _inherits(TranslateTimeline, _CurveTimeline4); + return _createClass(TranslateTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -1632,20 +1316,18 @@ var spine = (function (pc) { } } }]); - return TranslateTimeline; }(CurveTimeline2); var TranslateXTimeline = function (_CurveTimeline5) { - _inherits(TranslateXTimeline, _CurveTimeline5); - var _super6 = _createSuper(TranslateXTimeline); function TranslateXTimeline(frameCount, bezierCount, boneIndex) { - var _this4; + var _this5; _classCallCheck(this, TranslateXTimeline); - _this4 = _super6.call(this, frameCount, bezierCount, Property.x + "|" + boneIndex); - _this4.boneIndex = 0; - _this4.boneIndex = boneIndex; - return _this4; + _this5 = _callSuper$d(this, TranslateXTimeline, [frameCount, bezierCount, Property.x + "|" + boneIndex]); + _this5.boneIndex = 0; + _this5.boneIndex = boneIndex; + return _this5; } - _createClass(TranslateXTimeline, [{ + _inherits(TranslateXTimeline, _CurveTimeline5); + return _createClass(TranslateXTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -1675,20 +1357,18 @@ var spine = (function (pc) { } } }]); - return TranslateXTimeline; }(CurveTimeline1); var TranslateYTimeline = function (_CurveTimeline6) { - _inherits(TranslateYTimeline, _CurveTimeline6); - var _super7 = _createSuper(TranslateYTimeline); function TranslateYTimeline(frameCount, bezierCount, boneIndex) { - var _this5; + var _this6; _classCallCheck(this, TranslateYTimeline); - _this5 = _super7.call(this, frameCount, bezierCount, Property.y + "|" + boneIndex); - _this5.boneIndex = 0; - _this5.boneIndex = boneIndex; - return _this5; + _this6 = _callSuper$d(this, TranslateYTimeline, [frameCount, bezierCount, Property.y + "|" + boneIndex]); + _this6.boneIndex = 0; + _this6.boneIndex = boneIndex; + return _this6; } - _createClass(TranslateYTimeline, [{ + _inherits(TranslateYTimeline, _CurveTimeline6); + return _createClass(TranslateYTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -1718,20 +1398,18 @@ var spine = (function (pc) { } } }]); - return TranslateYTimeline; }(CurveTimeline1); var ScaleTimeline = function (_CurveTimeline7) { - _inherits(ScaleTimeline, _CurveTimeline7); - var _super8 = _createSuper(ScaleTimeline); function ScaleTimeline(frameCount, bezierCount, boneIndex) { - var _this6; + var _this7; _classCallCheck(this, ScaleTimeline); - _this6 = _super8.call(this, frameCount, bezierCount, Property.scaleX + "|" + boneIndex, Property.scaleY + "|" + boneIndex); - _this6.boneIndex = 0; - _this6.boneIndex = boneIndex; - return _this6; + _this7 = _callSuper$d(this, ScaleTimeline, [frameCount, bezierCount, Property.scaleX + "|" + boneIndex, Property.scaleY + "|" + boneIndex]); + _this7.boneIndex = 0; + _this7.boneIndex = boneIndex; + return _this7; } - _createClass(ScaleTimeline, [{ + _inherits(ScaleTimeline, _CurveTimeline7); + return _createClass(ScaleTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -1824,20 +1502,18 @@ var spine = (function (pc) { } } }]); - return ScaleTimeline; }(CurveTimeline2); var ScaleXTimeline = function (_CurveTimeline8) { - _inherits(ScaleXTimeline, _CurveTimeline8); - var _super9 = _createSuper(ScaleXTimeline); function ScaleXTimeline(frameCount, bezierCount, boneIndex) { - var _this7; + var _this8; _classCallCheck(this, ScaleXTimeline); - _this7 = _super9.call(this, frameCount, bezierCount, Property.scaleX + "|" + boneIndex); - _this7.boneIndex = 0; - _this7.boneIndex = boneIndex; - return _this7; + _this8 = _callSuper$d(this, ScaleXTimeline, [frameCount, bezierCount, Property.scaleX + "|" + boneIndex]); + _this8.boneIndex = 0; + _this8.boneIndex = boneIndex; + return _this8; } - _createClass(ScaleXTimeline, [{ + _inherits(ScaleXTimeline, _CurveTimeline8); + return _createClass(ScaleXTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -1890,20 +1566,18 @@ var spine = (function (pc) { } } }]); - return ScaleXTimeline; }(CurveTimeline1); var ScaleYTimeline = function (_CurveTimeline9) { - _inherits(ScaleYTimeline, _CurveTimeline9); - var _super10 = _createSuper(ScaleYTimeline); function ScaleYTimeline(frameCount, bezierCount, boneIndex) { - var _this8; + var _this9; _classCallCheck(this, ScaleYTimeline); - _this8 = _super10.call(this, frameCount, bezierCount, Property.scaleY + "|" + boneIndex); - _this8.boneIndex = 0; - _this8.boneIndex = boneIndex; - return _this8; + _this9 = _callSuper$d(this, ScaleYTimeline, [frameCount, bezierCount, Property.scaleY + "|" + boneIndex]); + _this9.boneIndex = 0; + _this9.boneIndex = boneIndex; + return _this9; } - _createClass(ScaleYTimeline, [{ + _inherits(ScaleYTimeline, _CurveTimeline9); + return _createClass(ScaleYTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -1956,20 +1630,18 @@ var spine = (function (pc) { } } }]); - return ScaleYTimeline; }(CurveTimeline1); var ShearTimeline = function (_CurveTimeline10) { - _inherits(ShearTimeline, _CurveTimeline10); - var _super11 = _createSuper(ShearTimeline); function ShearTimeline(frameCount, bezierCount, boneIndex) { - var _this9; + var _this10; _classCallCheck(this, ShearTimeline); - _this9 = _super11.call(this, frameCount, bezierCount, Property.shearX + "|" + boneIndex, Property.shearY + "|" + boneIndex); - _this9.boneIndex = 0; - _this9.boneIndex = boneIndex; - return _this9; + _this10 = _callSuper$d(this, ShearTimeline, [frameCount, bezierCount, Property.shearX + "|" + boneIndex, Property.shearY + "|" + boneIndex]); + _this10.boneIndex = 0; + _this10.boneIndex = boneIndex; + return _this10; } - _createClass(ShearTimeline, [{ + _inherits(ShearTimeline, _CurveTimeline10); + return _createClass(ShearTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -2024,20 +1696,18 @@ var spine = (function (pc) { } } }]); - return ShearTimeline; }(CurveTimeline2); var ShearXTimeline = function (_CurveTimeline11) { - _inherits(ShearXTimeline, _CurveTimeline11); - var _super12 = _createSuper(ShearXTimeline); function ShearXTimeline(frameCount, bezierCount, boneIndex) { - var _this10; + var _this11; _classCallCheck(this, ShearXTimeline); - _this10 = _super12.call(this, frameCount, bezierCount, Property.shearX + "|" + boneIndex); - _this10.boneIndex = 0; - _this10.boneIndex = boneIndex; - return _this10; + _this11 = _callSuper$d(this, ShearXTimeline, [frameCount, bezierCount, Property.shearX + "|" + boneIndex]); + _this11.boneIndex = 0; + _this11.boneIndex = boneIndex; + return _this11; } - _createClass(ShearXTimeline, [{ + _inherits(ShearXTimeline, _CurveTimeline11); + return _createClass(ShearXTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -2067,20 +1737,18 @@ var spine = (function (pc) { } } }]); - return ShearXTimeline; }(CurveTimeline1); var ShearYTimeline = function (_CurveTimeline12) { - _inherits(ShearYTimeline, _CurveTimeline12); - var _super13 = _createSuper(ShearYTimeline); function ShearYTimeline(frameCount, bezierCount, boneIndex) { - var _this11; + var _this12; _classCallCheck(this, ShearYTimeline); - _this11 = _super13.call(this, frameCount, bezierCount, Property.shearY + "|" + boneIndex); - _this11.boneIndex = 0; - _this11.boneIndex = boneIndex; - return _this11; + _this12 = _callSuper$d(this, ShearYTimeline, [frameCount, bezierCount, Property.shearY + "|" + boneIndex]); + _this12.boneIndex = 0; + _this12.boneIndex = boneIndex; + return _this12; } - _createClass(ShearYTimeline, [{ + _inherits(ShearYTimeline, _CurveTimeline12); + return _createClass(ShearYTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var bone = skeleton.bones[this.boneIndex]; @@ -2110,20 +1778,18 @@ var spine = (function (pc) { } } }]); - return ShearYTimeline; }(CurveTimeline1); var RGBATimeline = function (_CurveTimeline13) { - _inherits(RGBATimeline, _CurveTimeline13); - var _super14 = _createSuper(RGBATimeline); function RGBATimeline(frameCount, bezierCount, slotIndex) { - var _this12; + var _this13; _classCallCheck(this, RGBATimeline); - _this12 = _super14.call(this, frameCount, bezierCount, [Property.rgb + "|" + slotIndex, Property.alpha + "|" + slotIndex]); - _this12.slotIndex = 0; - _this12.slotIndex = slotIndex; - return _this12; + _this13 = _callSuper$d(this, RGBATimeline, [frameCount, bezierCount, [Property.rgb + "|" + slotIndex, Property.alpha + "|" + slotIndex]]); + _this13.slotIndex = 0; + _this13.slotIndex = slotIndex; + return _this13; } - _createClass(RGBATimeline, [{ + _inherits(RGBATimeline, _CurveTimeline13); + return _createClass(RGBATimeline, [{ key: "getFrameEntries", value: function getFrameEntries() { return 5; @@ -2193,20 +1859,18 @@ var spine = (function (pc) { } } }]); - return RGBATimeline; }(CurveTimeline); var RGBTimeline = function (_CurveTimeline14) { - _inherits(RGBTimeline, _CurveTimeline14); - var _super15 = _createSuper(RGBTimeline); function RGBTimeline(frameCount, bezierCount, slotIndex) { - var _this13; + var _this14; _classCallCheck(this, RGBTimeline); - _this13 = _super15.call(this, frameCount, bezierCount, [Property.rgb + "|" + slotIndex]); - _this13.slotIndex = 0; - _this13.slotIndex = slotIndex; - return _this13; + _this14 = _callSuper$d(this, RGBTimeline, [frameCount, bezierCount, [Property.rgb + "|" + slotIndex]]); + _this14.slotIndex = 0; + _this14.slotIndex = slotIndex; + return _this14; } - _createClass(RGBTimeline, [{ + _inherits(RGBTimeline, _CurveTimeline14); + return _createClass(RGBTimeline, [{ key: "getFrameEntries", value: function getFrameEntries() { return 4; @@ -2285,20 +1949,18 @@ var spine = (function (pc) { } } }]); - return RGBTimeline; }(CurveTimeline); var AlphaTimeline = function (_CurveTimeline15) { - _inherits(AlphaTimeline, _CurveTimeline15); - var _super16 = _createSuper(AlphaTimeline); function AlphaTimeline(frameCount, bezierCount, slotIndex) { - var _this14; + var _this15; _classCallCheck(this, AlphaTimeline); - _this14 = _super16.call(this, frameCount, bezierCount, Property.alpha + "|" + slotIndex); - _this14.slotIndex = 0; - _this14.slotIndex = slotIndex; - return _this14; + _this15 = _callSuper$d(this, AlphaTimeline, [frameCount, bezierCount, Property.alpha + "|" + slotIndex]); + _this15.slotIndex = 0; + _this15.slotIndex = slotIndex; + return _this15; } - _createClass(AlphaTimeline, [{ + _inherits(AlphaTimeline, _CurveTimeline15); + return _createClass(AlphaTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, events, alpha, blend, direction) { var slot = skeleton.slots[this.slotIndex]; @@ -2322,20 +1984,18 @@ var spine = (function (pc) { } } }]); - return AlphaTimeline; }(CurveTimeline1); var RGBA2Timeline = function (_CurveTimeline16) { - _inherits(RGBA2Timeline, _CurveTimeline16); - var _super17 = _createSuper(RGBA2Timeline); function RGBA2Timeline(frameCount, bezierCount, slotIndex) { - var _this15; + var _this16; _classCallCheck(this, RGBA2Timeline); - _this15 = _super17.call(this, frameCount, bezierCount, [Property.rgb + "|" + slotIndex, Property.alpha + "|" + slotIndex, Property.rgb2 + "|" + slotIndex]); - _this15.slotIndex = 0; - _this15.slotIndex = slotIndex; - return _this15; + _this16 = _callSuper$d(this, RGBA2Timeline, [frameCount, bezierCount, [Property.rgb + "|" + slotIndex, Property.alpha + "|" + slotIndex, Property.rgb2 + "|" + slotIndex]]); + _this16.slotIndex = 0; + _this16.slotIndex = slotIndex; + return _this16; } - _createClass(RGBA2Timeline, [{ + _inherits(RGBA2Timeline, _CurveTimeline16); + return _createClass(RGBA2Timeline, [{ key: "getFrameEntries", value: function getFrameEntries() { return 8; @@ -2445,20 +2105,18 @@ var spine = (function (pc) { } } }]); - return RGBA2Timeline; }(CurveTimeline); var RGB2Timeline = function (_CurveTimeline17) { - _inherits(RGB2Timeline, _CurveTimeline17); - var _super18 = _createSuper(RGB2Timeline); function RGB2Timeline(frameCount, bezierCount, slotIndex) { - var _this16; + var _this17; _classCallCheck(this, RGB2Timeline); - _this16 = _super18.call(this, frameCount, bezierCount, [Property.rgb + "|" + slotIndex, Property.rgb2 + "|" + slotIndex]); - _this16.slotIndex = 0; - _this16.slotIndex = slotIndex; - return _this16; + _this17 = _callSuper$d(this, RGB2Timeline, [frameCount, bezierCount, [Property.rgb + "|" + slotIndex, Property.rgb2 + "|" + slotIndex]]); + _this17.slotIndex = 0; + _this17.slotIndex = slotIndex; + return _this17; } - _createClass(RGB2Timeline, [{ + _inherits(RGB2Timeline, _CurveTimeline17); + return _createClass(RGB2Timeline, [{ key: "getFrameEntries", value: function getFrameEntries() { return 7; @@ -2573,21 +2231,19 @@ var spine = (function (pc) { } } }]); - return RGB2Timeline; }(CurveTimeline); var AttachmentTimeline = function (_Timeline2) { - _inherits(AttachmentTimeline, _Timeline2); - var _super19 = _createSuper(AttachmentTimeline); function AttachmentTimeline(frameCount, slotIndex) { - var _this17; + var _this18; _classCallCheck(this, AttachmentTimeline); - _this17 = _super19.call(this, frameCount, [Property.attachment + "|" + slotIndex]); - _this17.slotIndex = 0; - _this17.slotIndex = slotIndex; - _this17.attachmentNames = new Array(frameCount); - return _this17; + _this18 = _callSuper$d(this, AttachmentTimeline, [frameCount, [Property.attachment + "|" + slotIndex]]); + _this18.slotIndex = 0; + _this18.slotIndex = slotIndex; + _this18.attachmentNames = new Array(frameCount); + return _this18; } - _createClass(AttachmentTimeline, [{ + _inherits(AttachmentTimeline, _Timeline2); + return _createClass(AttachmentTimeline, [{ key: "getFrameCount", value: function getFrameCount() { return this.frames.length; @@ -2619,22 +2275,20 @@ var spine = (function (pc) { slot.setAttachment(!attachmentName ? null : skeleton.getAttachment(this.slotIndex, attachmentName)); } }]); - return AttachmentTimeline; }(Timeline); var DeformTimeline = function (_CurveTimeline18) { - _inherits(DeformTimeline, _CurveTimeline18); - var _super20 = _createSuper(DeformTimeline); function DeformTimeline(frameCount, bezierCount, slotIndex, attachment) { - var _this18; + var _this19; _classCallCheck(this, DeformTimeline); - _this18 = _super20.call(this, frameCount, bezierCount, [Property.deform + "|" + slotIndex + "|" + attachment.id]); - _this18.slotIndex = 0; - _this18.slotIndex = slotIndex; - _this18.attachment = attachment; - _this18.vertices = new Array(frameCount); - return _this18; + _this19 = _callSuper$d(this, DeformTimeline, [frameCount, bezierCount, [Property.deform + "|" + slotIndex + "|" + attachment.id]]); + _this19.slotIndex = 0; + _this19.slotIndex = slotIndex; + _this19.attachment = attachment; + _this19.vertices = new Array(frameCount); + return _this19; } - _createClass(DeformTimeline, [{ + _inherits(DeformTimeline, _CurveTimeline18); + return _createClass(DeformTimeline, [{ key: "getFrameCount", value: function getFrameCount() { return this.frames.length; @@ -2851,19 +2505,17 @@ var spine = (function (pc) { } } }]); - return DeformTimeline; }(CurveTimeline); var EventTimeline = function (_Timeline3) { - _inherits(EventTimeline, _Timeline3); - var _super21 = _createSuper(EventTimeline); function EventTimeline(frameCount) { - var _this19; + var _this20; _classCallCheck(this, EventTimeline); - _this19 = _super21.call(this, frameCount, EventTimeline.propertyIds); - _this19.events = new Array(frameCount); - return _this19; + _this20 = _callSuper$d(this, EventTimeline, [frameCount, EventTimeline.propertyIds]); + _this20.events = new Array(frameCount); + return _this20; } - _createClass(EventTimeline, [{ + _inherits(EventTimeline, _Timeline3); + return _createClass(EventTimeline, [{ key: "getFrameCount", value: function getFrameCount() { return this.frames.length; @@ -2897,20 +2549,18 @@ var spine = (function (pc) { for (; i < frameCount && time >= frames[i]; i++) firedEvents.push(this.events[i]); } }]); - return EventTimeline; }(Timeline); EventTimeline.propertyIds = ["" + Property.event]; var DrawOrderTimeline = function (_Timeline4) { - _inherits(DrawOrderTimeline, _Timeline4); - var _super22 = _createSuper(DrawOrderTimeline); function DrawOrderTimeline(frameCount) { - var _this20; + var _this21; _classCallCheck(this, DrawOrderTimeline); - _this20 = _super22.call(this, frameCount, DrawOrderTimeline.propertyIds); - _this20.drawOrders = new Array(frameCount); - return _this20; + _this21 = _callSuper$d(this, DrawOrderTimeline, [frameCount, DrawOrderTimeline.propertyIds]); + _this21.drawOrders = new Array(frameCount); + return _this21; } - _createClass(DrawOrderTimeline, [{ + _inherits(DrawOrderTimeline, _Timeline4); + return _createClass(DrawOrderTimeline, [{ key: "getFrameCount", value: function getFrameCount() { return this.frames.length; @@ -2941,21 +2591,19 @@ var spine = (function (pc) { } } }]); - return DrawOrderTimeline; }(Timeline); DrawOrderTimeline.propertyIds = ["" + Property.drawOrder]; var IkConstraintTimeline = function (_CurveTimeline19) { - _inherits(IkConstraintTimeline, _CurveTimeline19); - var _super23 = _createSuper(IkConstraintTimeline); function IkConstraintTimeline(frameCount, bezierCount, ikConstraintIndex) { - var _this21; + var _this22; _classCallCheck(this, IkConstraintTimeline); - _this21 = _super23.call(this, frameCount, bezierCount, [Property.ikConstraint + "|" + ikConstraintIndex]); - _this21.ikConstraintIndex = 0; - _this21.ikConstraintIndex = ikConstraintIndex; - return _this21; + _this22 = _callSuper$d(this, IkConstraintTimeline, [frameCount, bezierCount, [Property.ikConstraint + "|" + ikConstraintIndex]]); + _this22.ikConstraintIndex = 0; + _this22.ikConstraintIndex = ikConstraintIndex; + return _this22; } - _createClass(IkConstraintTimeline, [{ + _inherits(IkConstraintTimeline, _CurveTimeline19); + return _createClass(IkConstraintTimeline, [{ key: "getFrameEntries", value: function getFrameEntries() { return 6; @@ -3039,20 +2687,18 @@ var spine = (function (pc) { } } }]); - return IkConstraintTimeline; }(CurveTimeline); var TransformConstraintTimeline = function (_CurveTimeline20) { - _inherits(TransformConstraintTimeline, _CurveTimeline20); - var _super24 = _createSuper(TransformConstraintTimeline); function TransformConstraintTimeline(frameCount, bezierCount, transformConstraintIndex) { - var _this22; + var _this23; _classCallCheck(this, TransformConstraintTimeline); - _this22 = _super24.call(this, frameCount, bezierCount, [Property.transformConstraint + "|" + transformConstraintIndex]); - _this22.transformConstraintIndex = 0; - _this22.transformConstraintIndex = transformConstraintIndex; - return _this22; + _this23 = _callSuper$d(this, TransformConstraintTimeline, [frameCount, bezierCount, [Property.transformConstraint + "|" + transformConstraintIndex]]); + _this23.transformConstraintIndex = 0; + _this23.transformConstraintIndex = transformConstraintIndex; + return _this23; } - _createClass(TransformConstraintTimeline, [{ + _inherits(TransformConstraintTimeline, _CurveTimeline20); + return _createClass(TransformConstraintTimeline, [{ key: "getFrameEntries", value: function getFrameEntries() { return 7; @@ -3151,20 +2797,18 @@ var spine = (function (pc) { } } }]); - return TransformConstraintTimeline; }(CurveTimeline); var PathConstraintPositionTimeline = function (_CurveTimeline21) { - _inherits(PathConstraintPositionTimeline, _CurveTimeline21); - var _super25 = _createSuper(PathConstraintPositionTimeline); function PathConstraintPositionTimeline(frameCount, bezierCount, pathConstraintIndex) { - var _this23; + var _this24; _classCallCheck(this, PathConstraintPositionTimeline); - _this23 = _super25.call(this, frameCount, bezierCount, Property.pathConstraintPosition + "|" + pathConstraintIndex); - _this23.pathConstraintIndex = 0; - _this23.pathConstraintIndex = pathConstraintIndex; - return _this23; + _this24 = _callSuper$d(this, PathConstraintPositionTimeline, [frameCount, bezierCount, Property.pathConstraintPosition + "|" + pathConstraintIndex]); + _this24.pathConstraintIndex = 0; + _this24.pathConstraintIndex = pathConstraintIndex; + return _this24; } - _createClass(PathConstraintPositionTimeline, [{ + _inherits(PathConstraintPositionTimeline, _CurveTimeline21); + return _createClass(PathConstraintPositionTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) { var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; @@ -3184,20 +2828,18 @@ var spine = (function (pc) { if (blend == MixBlend.setup) constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;else constraint.position += (position - constraint.position) * alpha; } }]); - return PathConstraintPositionTimeline; }(CurveTimeline1); var PathConstraintSpacingTimeline = function (_CurveTimeline22) { - _inherits(PathConstraintSpacingTimeline, _CurveTimeline22); - var _super26 = _createSuper(PathConstraintSpacingTimeline); function PathConstraintSpacingTimeline(frameCount, bezierCount, pathConstraintIndex) { - var _this24; + var _this25; _classCallCheck(this, PathConstraintSpacingTimeline); - _this24 = _super26.call(this, frameCount, bezierCount, Property.pathConstraintSpacing + "|" + pathConstraintIndex); - _this24.pathConstraintIndex = 0; - _this24.pathConstraintIndex = pathConstraintIndex; - return _this24; + _this25 = _callSuper$d(this, PathConstraintSpacingTimeline, [frameCount, bezierCount, Property.pathConstraintSpacing + "|" + pathConstraintIndex]); + _this25.pathConstraintIndex = 0; + _this25.pathConstraintIndex = pathConstraintIndex; + return _this25; } - _createClass(PathConstraintSpacingTimeline, [{ + _inherits(PathConstraintSpacingTimeline, _CurveTimeline22); + return _createClass(PathConstraintSpacingTimeline, [{ key: "apply", value: function apply(skeleton, lastTime, time, firedEvents, alpha, blend, direction) { var constraint = skeleton.pathConstraints[this.pathConstraintIndex]; @@ -3217,20 +2859,18 @@ var spine = (function (pc) { if (blend == MixBlend.setup) constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;else constraint.spacing += (spacing - constraint.spacing) * alpha; } }]); - return PathConstraintSpacingTimeline; }(CurveTimeline1); var PathConstraintMixTimeline = function (_CurveTimeline23) { - _inherits(PathConstraintMixTimeline, _CurveTimeline23); - var _super27 = _createSuper(PathConstraintMixTimeline); function PathConstraintMixTimeline(frameCount, bezierCount, pathConstraintIndex) { - var _this25; + var _this26; _classCallCheck(this, PathConstraintMixTimeline); - _this25 = _super27.call(this, frameCount, bezierCount, [Property.pathConstraintMix + "|" + pathConstraintIndex]); - _this25.pathConstraintIndex = 0; - _this25.pathConstraintIndex = pathConstraintIndex; - return _this25; + _this26 = _callSuper$d(this, PathConstraintMixTimeline, [frameCount, bezierCount, [Property.pathConstraintMix + "|" + pathConstraintIndex]]); + _this26.pathConstraintIndex = 0; + _this26.pathConstraintIndex = pathConstraintIndex; + return _this26; } - _createClass(PathConstraintMixTimeline, [{ + _inherits(PathConstraintMixTimeline, _CurveTimeline23); + return _createClass(PathConstraintMixTimeline, [{ key: "getFrameEntries", value: function getFrameEntries() { return 4; @@ -3301,20 +2941,18 @@ var spine = (function (pc) { } } }]); - return PathConstraintMixTimeline; }(CurveTimeline); var SequenceTimeline = function (_Timeline5) { - _inherits(SequenceTimeline, _Timeline5); - var _super28 = _createSuper(SequenceTimeline); function SequenceTimeline(frameCount, slotIndex, attachment) { - var _this26; + var _this27; _classCallCheck(this, SequenceTimeline); - _this26 = _super28.call(this, frameCount, [Property.sequence + "|" + slotIndex + "|" + attachment.sequence.id]); - _this26.slotIndex = slotIndex; - _this26.attachment = attachment; - return _this26; + _this27 = _callSuper$d(this, SequenceTimeline, [frameCount, [Property.sequence + "|" + slotIndex + "|" + attachment.sequence.id]]); + _this27.slotIndex = slotIndex; + _this27.attachment = attachment; + return _this27; } - _createClass(SequenceTimeline, [{ + _inherits(SequenceTimeline, _Timeline5); + return _createClass(SequenceTimeline, [{ key: "getFrameEntries", value: function getFrameEntries() { return SequenceTimeline.ENTRIES; @@ -3394,7 +3032,6 @@ var spine = (function (pc) { slot.sequenceIndex = index; } }]); - return SequenceTimeline; }(Timeline); SequenceTimeline.ENTRIES = 3; SequenceTimeline.MODE = 1; @@ -3416,7 +3053,7 @@ var spine = (function (pc) { }); this.data = data; } - _createClass(AnimationState, [{ + return _createClass(AnimationState, [{ key: "update", value: function update(delta) { delta *= this.timeScale; @@ -4001,7 +3638,6 @@ var spine = (function (pc) { return AnimationState._emptyAnimation; } }]); - return AnimationState; }(); AnimationState._emptyAnimation = new Animation("", [], 0); var TrackEntry = function () { @@ -4041,7 +3677,7 @@ var spine = (function (pc) { this.timelineHoldMix = new Array(); this.timelinesRotation = new Array(); } - _createClass(TrackEntry, [{ + return _createClass(TrackEntry, [{ key: "reset", value: function reset() { this.next = null; @@ -4091,7 +3727,6 @@ var spine = (function (pc) { return this.trackTime; } }]); - return TrackEntry; }(); var EventQueue = function () { function EventQueue(animState) { @@ -4100,7 +3735,7 @@ var spine = (function (pc) { this.drainDisabled = false; this.animState = animState; } - _createClass(EventQueue, [{ + return _createClass(EventQueue, [{ key: "start", value: function start(entry) { this.objects.push(EventType.start); @@ -4204,7 +3839,6 @@ var spine = (function (pc) { this.objects.length = 0; } }]); - return EventQueue; }(); var EventType; (function (EventType) { @@ -4219,7 +3853,7 @@ var spine = (function (pc) { function AnimationStateAdapter() { _classCallCheck(this, AnimationStateAdapter); } - _createClass(AnimationStateAdapter, [{ + return _createClass(AnimationStateAdapter, [{ key: "start", value: function start(entry) {} }, { @@ -4238,7 +3872,6 @@ var spine = (function (pc) { key: "event", value: function event(entry, _event3) {} }]); - return AnimationStateAdapter; }(); var SUBSEQUENT = 0; var FIRST = 1; @@ -4256,7 +3889,7 @@ var spine = (function (pc) { if (!skeletonData) throw new Error("skeletonData cannot be null."); this.skeletonData = skeletonData; } - _createClass(AnimationStateData, [{ + return _createClass(AnimationStateData, [{ key: "setMix", value: function setMix(fromName, toName, duration) { var from = this.skeletonData.findAnimation(fromName); @@ -4281,20 +3914,32 @@ var spine = (function (pc) { return value === undefined ? this.defaultMix : value; } }]); - return AnimationStateData; }(); + function _callSuper$c(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var BoundingBoxAttachment = function (_VertexAttachment) { - _inherits(BoundingBoxAttachment, _VertexAttachment); - var _super = _createSuper(BoundingBoxAttachment); function BoundingBoxAttachment(name) { - var _this; + var _this2; _classCallCheck(this, BoundingBoxAttachment); - _this = _super.call(this, name); - _this.color = new Color(1, 1, 1, 1); - return _this; + _this2 = _callSuper$c(this, BoundingBoxAttachment, [name]); + _this2.color = new Color(1, 1, 1, 1); + return _this2; } - _createClass(BoundingBoxAttachment, [{ + _inherits(BoundingBoxAttachment, _VertexAttachment); + return _createClass(BoundingBoxAttachment, [{ key: "copy", value: function copy() { var copy = new BoundingBoxAttachment(this.name); @@ -4303,21 +3948,33 @@ var spine = (function (pc) { return copy; } }]); - return BoundingBoxAttachment; }(VertexAttachment); + function _callSuper$b(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var ClippingAttachment = function (_VertexAttachment) { - _inherits(ClippingAttachment, _VertexAttachment); - var _super = _createSuper(ClippingAttachment); function ClippingAttachment(name) { - var _this; + var _this2; _classCallCheck(this, ClippingAttachment); - _this = _super.call(this, name); - _this.endSlot = null; - _this.color = new Color(0.2275, 0.2275, 0.8078, 1); - return _this; + _this2 = _callSuper$b(this, ClippingAttachment, [name]); + _this2.endSlot = null; + _this2.color = new Color(0.2275, 0.2275, 0.8078, 1); + return _this2; } - _createClass(ClippingAttachment, [{ + _inherits(ClippingAttachment, _VertexAttachment); + return _createClass(ClippingAttachment, [{ key: "copy", value: function copy() { var copy = new ClippingAttachment(this.name); @@ -4327,21 +3984,33 @@ var spine = (function (pc) { return copy; } }]); - return ClippingAttachment; }(VertexAttachment); + function _callSuper$a(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var Texture = function () { function Texture(image) { _classCallCheck(this, Texture); this._image = image; } - _createClass(Texture, [{ + return _createClass(Texture, [{ key: "getImage", value: function getImage() { return this._image; } }]); - return Texture; }(); var TextureFilter; (function (TextureFilter) { @@ -4374,13 +4043,12 @@ var spine = (function (pc) { this.originalHeight = 0; }); var FakeTexture = function (_Texture) { - _inherits(FakeTexture, _Texture); - var _super = _createSuper(FakeTexture); function FakeTexture() { _classCallCheck(this, FakeTexture); - return _super.apply(this, arguments); + return _callSuper$a(this, FakeTexture, arguments); } - _createClass(FakeTexture, [{ + _inherits(FakeTexture, _Texture); + return _createClass(FakeTexture, [{ key: "setFilters", value: function setFilters(minFilter, magFilter) {} }, { @@ -4390,9 +4058,22 @@ var spine = (function (pc) { key: "dispose", value: function dispose() {} }]); - return FakeTexture; }(Texture); + function _callSuper$9(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var TextureAtlas = function () { function TextureAtlas(atlasText) { _classCallCheck(this, TextureAtlas); @@ -4514,7 +4195,7 @@ var spine = (function (pc) { } } } - _createClass(TextureAtlas, [{ + return _createClass(TextureAtlas, [{ key: "findRegion", value: function findRegion(name) { for (var i = 0; i < this.regions.length; i++) { @@ -4550,7 +4231,6 @@ var spine = (function (pc) { } } }]); - return TextureAtlas; }(); var TextureAtlasReader = function () { function TextureAtlasReader(text) { @@ -4558,7 +4238,7 @@ var spine = (function (pc) { this.index = 0; this.lines = text.split(/\r\n|\r|\n/); } - _createClass(TextureAtlasReader, [{ + return _createClass(TextureAtlasReader, [{ key: "readLine", value: function readLine() { if (this.index >= this.lines.length) return null; @@ -4585,7 +4265,6 @@ var spine = (function (pc) { } } }]); - return TextureAtlasReader; }(); var TextureAtlasPage = function () { function TextureAtlasPage(name) { @@ -4601,7 +4280,7 @@ var spine = (function (pc) { this.regions = new Array(); this.name = name; } - _createClass(TextureAtlasPage, [{ + return _createClass(TextureAtlasPage, [{ key: "setTexture", value: function setTexture(texture) { this.texture = texture; @@ -4621,56 +4300,67 @@ var spine = (function (pc) { } } }]); - return TextureAtlasPage; }(); var TextureAtlasRegion = function (_TextureRegion) { - _inherits(TextureAtlasRegion, _TextureRegion); - var _super = _createSuper(TextureAtlasRegion); function TextureAtlasRegion(page, name) { - var _this; + var _this2; _classCallCheck(this, TextureAtlasRegion); - _this = _super.call(this); - _this.x = 0; - _this.y = 0; - _this.offsetX = 0; - _this.offsetY = 0; - _this.originalWidth = 0; - _this.originalHeight = 0; - _this.index = 0; - _this.degrees = 0; - _this.names = null; - _this.values = null; - _this.page = page; - _this.name = name; - page.regions.push(_assertThisInitialized(_this)); - return _this; + _this2 = _callSuper$9(this, TextureAtlasRegion); + _this2.x = 0; + _this2.y = 0; + _this2.offsetX = 0; + _this2.offsetY = 0; + _this2.originalWidth = 0; + _this2.originalHeight = 0; + _this2.index = 0; + _this2.degrees = 0; + _this2.names = null; + _this2.values = null; + _this2.page = page; + _this2.name = name; + page.regions.push(_this2); + return _this2; } + _inherits(TextureAtlasRegion, _TextureRegion); return _createClass(TextureAtlasRegion); }(TextureRegion); + function _callSuper$8(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var MeshAttachment = function (_VertexAttachment) { - _inherits(MeshAttachment, _VertexAttachment); - var _super = _createSuper(MeshAttachment); function MeshAttachment(name, path) { - var _this; + var _this2; _classCallCheck(this, MeshAttachment); - _this = _super.call(this, name); - _this.region = null; - _this.regionUVs = []; - _this.uvs = []; - _this.triangles = []; - _this.color = new Color(1, 1, 1, 1); - _this.width = 0; - _this.height = 0; - _this.hullLength = 0; - _this.edges = []; - _this.parentMesh = null; - _this.sequence = null; - _this.tempColor = new Color(0, 0, 0, 0); - _this.path = path; - return _this; - } - _createClass(MeshAttachment, [{ + _this2 = _callSuper$8(this, MeshAttachment, [name]); + _this2.region = null; + _this2.regionUVs = []; + _this2.uvs = []; + _this2.triangles = []; + _this2.color = new Color(1, 1, 1, 1); + _this2.width = 0; + _this2.height = 0; + _this2.hullLength = 0; + _this2.edges = []; + _this2.parentMesh = null; + _this2.sequence = null; + _this2.tempColor = new Color(0, 0, 0, 0); + _this2.path = path; + return _this2; + } + _inherits(MeshAttachment, _VertexAttachment); + return _createClass(MeshAttachment, [{ key: "updateRegion", value: function updateRegion() { if (!this.region) throw new Error("Region not set."); @@ -4782,7 +4472,7 @@ var spine = (function (pc) { key: "computeWorldVertices", value: function computeWorldVertices(slot, start, count, worldVertices, offset, stride) { if (this.sequence != null) this.sequence.apply(slot, this); - _get$1(_getPrototypeOf(MeshAttachment.prototype), "computeWorldVertices", this).call(this, slot, start, count, worldVertices, offset, stride); + _get(_getPrototypeOf(MeshAttachment.prototype), "computeWorldVertices", this).call(this, slot, start, count, worldVertices, offset, stride); } }, { key: "newLinkedMesh", @@ -4796,23 +4486,35 @@ var spine = (function (pc) { return copy; } }]); - return MeshAttachment; }(VertexAttachment); + function _callSuper$7(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var PathAttachment = function (_VertexAttachment) { - _inherits(PathAttachment, _VertexAttachment); - var _super = _createSuper(PathAttachment); function PathAttachment(name) { - var _this; + var _this2; _classCallCheck(this, PathAttachment); - _this = _super.call(this, name); - _this.lengths = []; - _this.closed = false; - _this.constantSpeed = false; - _this.color = new Color(1, 1, 1, 1); - return _this; - } - _createClass(PathAttachment, [{ + _this2 = _callSuper$7(this, PathAttachment, [name]); + _this2.lengths = []; + _this2.closed = false; + _this2.constantSpeed = false; + _this2.color = new Color(1, 1, 1, 1); + return _this2; + } + _inherits(PathAttachment, _VertexAttachment); + return _createClass(PathAttachment, [{ key: "copy", value: function copy() { var copy = new PathAttachment(this.name); @@ -4825,23 +4527,35 @@ var spine = (function (pc) { return copy; } }]); - return PathAttachment; }(VertexAttachment); + function _callSuper$6(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var PointAttachment = function (_VertexAttachment) { - _inherits(PointAttachment, _VertexAttachment); - var _super = _createSuper(PointAttachment); function PointAttachment(name) { - var _this; + var _this2; _classCallCheck(this, PointAttachment); - _this = _super.call(this, name); - _this.x = 0; - _this.y = 0; - _this.rotation = 0; - _this.color = new Color(0.38, 0.94, 0, 1); - return _this; - } - _createClass(PointAttachment, [{ + _this2 = _callSuper$6(this, PointAttachment, [name]); + _this2.x = 0; + _this2.y = 0; + _this2.rotation = 0; + _this2.color = new Color(0.38, 0.94, 0, 1); + return _this2; + } + _inherits(PointAttachment, _VertexAttachment); + return _createClass(PointAttachment, [{ key: "computeWorldPosition", value: function computeWorldPosition(bone, point) { point.x = this.x * bone.a + this.y * bone.b + bone.worldX; @@ -4868,33 +4582,45 @@ var spine = (function (pc) { return copy; } }]); - return PointAttachment; }(VertexAttachment); + function _callSuper$5(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var RegionAttachment = function (_Attachment) { - _inherits(RegionAttachment, _Attachment); - var _super = _createSuper(RegionAttachment); function RegionAttachment(name, path) { - var _this; + var _this2; _classCallCheck(this, RegionAttachment); - _this = _super.call(this, name); - _this.x = 0; - _this.y = 0; - _this.scaleX = 1; - _this.scaleY = 1; - _this.rotation = 0; - _this.width = 0; - _this.height = 0; - _this.color = new Color(1, 1, 1, 1); - _this.region = null; - _this.sequence = null; - _this.offset = Utils.newFloatArray(8); - _this.uvs = Utils.newFloatArray(8); - _this.tempColor = new Color(1, 1, 1, 1); - _this.path = path; - return _this; - } - _createClass(RegionAttachment, [{ + _this2 = _callSuper$5(this, RegionAttachment, [name]); + _this2.x = 0; + _this2.y = 0; + _this2.scaleX = 1; + _this2.scaleY = 1; + _this2.rotation = 0; + _this2.width = 0; + _this2.height = 0; + _this2.color = new Color(1, 1, 1, 1); + _this2.region = null; + _this2.sequence = null; + _this2.offset = Utils.newFloatArray(8); + _this2.uvs = Utils.newFloatArray(8); + _this2.tempColor = new Color(1, 1, 1, 1); + _this2.path = path; + return _this2; + } + _inherits(RegionAttachment, _Attachment); + return _createClass(RegionAttachment, [{ key: "updateRegion", value: function updateRegion() { if (!this.region) throw new Error("Region not set."); @@ -5012,7 +4738,6 @@ var spine = (function (pc) { return copy; } }]); - return RegionAttachment; }(Attachment); RegionAttachment.X1 = 0; RegionAttachment.Y1 = 1; @@ -5052,7 +4777,7 @@ var spine = (function (pc) { _classCallCheck(this, AtlasAttachmentLoader); this.atlas = atlas; } - _createClass(AtlasAttachmentLoader, [{ + return _createClass(AtlasAttachmentLoader, [{ key: "loadSequence", value: function loadSequence(name, basePath, sequence) { var regions = sequence.regions; @@ -5110,7 +4835,6 @@ var spine = (function (pc) { return new ClippingAttachment(name); } }]); - return AtlasAttachmentLoader; }(); var BoneData = _createClass(function BoneData(index, name, parent) { @@ -5177,7 +4901,7 @@ var spine = (function (pc) { this.parent = parent; this.setToSetupPose(); } - _createClass(Bone, [{ + return _createClass(Bone, [{ key: "isActive", value: function isActive() { return this.active; @@ -5431,7 +5155,6 @@ var spine = (function (pc) { this.d = sin * b + cos * d; } }]); - return Bone; }(); var ConstraintData = _createClass(function ConstraintData(name, order, skinRequired) { @@ -5455,7 +5178,7 @@ var spine = (function (pc) { this.pathPrefix = pathPrefix; this.downloader = downloader; } - _createClass(AssetManagerBase, [{ + return _createClass(AssetManagerBase, [{ key: "start", value: function start(path) { this.toLoad++; @@ -5682,7 +5405,6 @@ var spine = (function (pc) { return this.errors; } }]); - return AssetManagerBase; }(); var Downloader = function () { function Downloader() { @@ -5690,7 +5412,7 @@ var spine = (function (pc) { this.callbacks = {}; this.rawDataUris = {}; } - _createClass(Downloader, [{ + return _createClass(Downloader, [{ key: "dataUriToString", value: function dataUriToString(dataUri) { if (!dataUri.startsWith("data:")) { @@ -5803,7 +5525,6 @@ var spine = (function (pc) { for (var i = args.length - 1, n = callbacks.length; i < n; i += 2) callbacks[i].apply(null, args); } }]); - return Downloader; }(); var Event = _createClass(function Event(time, data) { @@ -5857,7 +5578,7 @@ var spine = (function (pc) { if (!target) throw new Error("Couldn't find bone ".concat(data.target.name)); this.target = target; } - _createClass(IkConstraint, [{ + return _createClass(IkConstraint, [{ key: "isActive", value: function isActive() { return this.active; @@ -6108,27 +5829,39 @@ var spine = (function (pc) { child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY); } }]); - return IkConstraint; }(); + function _callSuper$4(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var IkConstraintData = function (_ConstraintData) { - _inherits(IkConstraintData, _ConstraintData); - var _super = _createSuper(IkConstraintData); function IkConstraintData(name) { - var _this; + var _this2; _classCallCheck(this, IkConstraintData); - _this = _super.call(this, name, 0, false); - _this.bones = new Array(); - _this._target = null; - _this.bendDirection = 1; - _this.compress = false; - _this.stretch = false; - _this.uniform = false; - _this.mix = 1; - _this.softness = 0; - return _this; - } - _createClass(IkConstraintData, [{ + _this2 = _callSuper$4(this, IkConstraintData, [name, 0, false]); + _this2.bones = new Array(); + _this2._target = null; + _this2.bendDirection = 1; + _this2.compress = false; + _this2.stretch = false; + _this2.uniform = false; + _this2.mix = 1; + _this2.softness = 0; + return _this2; + } + _inherits(IkConstraintData, _ConstraintData); + return _createClass(IkConstraintData, [{ key: "target", get: function get() { if (!this._target) throw new Error("BoneData not set.");else return this._target; @@ -6137,30 +5870,42 @@ var spine = (function (pc) { this._target = boneData; } }]); - return IkConstraintData; }(ConstraintData); + function _callSuper$3(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var PathConstraintData = function (_ConstraintData) { - _inherits(PathConstraintData, _ConstraintData); - var _super = _createSuper(PathConstraintData); function PathConstraintData(name) { - var _this; + var _this2; _classCallCheck(this, PathConstraintData); - _this = _super.call(this, name, 0, false); - _this.bones = new Array(); - _this._target = null; - _this.positionMode = PositionMode.Fixed; - _this.spacingMode = SpacingMode.Fixed; - _this.rotateMode = RotateMode.Chain; - _this.offsetRotation = 0; - _this.position = 0; - _this.spacing = 0; - _this.mixRotate = 0; - _this.mixX = 0; - _this.mixY = 0; - return _this; - } - _createClass(PathConstraintData, [{ + _this2 = _callSuper$3(this, PathConstraintData, [name, 0, false]); + _this2.bones = new Array(); + _this2._target = null; + _this2.positionMode = PositionMode.Fixed; + _this2.spacingMode = SpacingMode.Fixed; + _this2.rotateMode = RotateMode.Chain; + _this2.offsetRotation = 0; + _this2.position = 0; + _this2.spacing = 0; + _this2.mixRotate = 0; + _this2.mixX = 0; + _this2.mixY = 0; + return _this2; + } + _inherits(PathConstraintData, _ConstraintData); + return _createClass(PathConstraintData, [{ key: "target", get: function get() { if (!this._target) throw new Error("SlotData not set.");else return this._target; @@ -6169,7 +5914,6 @@ var spine = (function (pc) { this._target = slotData; } }]); - return PathConstraintData; }(ConstraintData); var PositionMode; (function (PositionMode) { @@ -6223,7 +5967,7 @@ var spine = (function (pc) { this.mixX = data.mixX; this.mixY = data.mixY; } - _createClass(PathConstraint, [{ + return _createClass(PathConstraint, [{ key: "isActive", value: function isActive() { return this.active; @@ -6635,7 +6379,6 @@ var spine = (function (pc) { } } }]); - return PathConstraint; }(); PathConstraint.NONE = -1; PathConstraint.BEFORE = -2; @@ -6658,7 +6401,7 @@ var spine = (function (pc) { this.darkColor = !data.darkColor ? null : new Color(); this.setToSetupPose(); } - _createClass(Slot, [{ + return _createClass(Slot, [{ key: "getSkeleton", value: function getSkeleton() { return this.bone.skeleton; @@ -6689,7 +6432,6 @@ var spine = (function (pc) { } } }]); - return Slot; }(); var TransformConstraint = function () { @@ -6722,7 +6464,7 @@ var spine = (function (pc) { if (!target) throw new Error("Couldn't find target bone ".concat(data.target.name, ".")); this.target = target; } - _createClass(TransformConstraint, [{ + return _createClass(TransformConstraint, [{ key: "isActive", value: function isActive() { return this.active; @@ -6929,7 +6671,6 @@ var spine = (function (pc) { } } }]); - return TransformConstraint; }(); var Skeleton = function () { @@ -6981,7 +6722,7 @@ var spine = (function (pc) { this.color = new Color(1, 1, 1, 1); this.updateCache(); } - _createClass(Skeleton, [{ + return _createClass(Skeleton, [{ key: "scaleY", get: function get() { return Skeleton.yDown ? -this._scaleY : this._scaleY; @@ -7422,7 +7163,6 @@ var spine = (function (pc) { size.set(maxX - minX, maxY - minY); } }]); - return Skeleton; }(); Skeleton.yDown = false; @@ -7449,7 +7189,7 @@ var spine = (function (pc) { this.imagesPath = null; this.audioPath = null; } - _createClass(SkeletonData, [{ + return _createClass(SkeletonData, [{ key: "findBone", value: function findBone(boneName) { if (!boneName) throw new Error("boneName cannot be null."); @@ -7538,7 +7278,6 @@ var spine = (function (pc) { return null; } }]); - return SkeletonData; }(); var SkinEntry = _createClass(function SkinEntry() { @@ -7559,7 +7298,7 @@ var spine = (function (pc) { if (!name) throw new Error("name cannot be null."); this.name = name; } - _createClass(Skin, [{ + return _createClass(Skin, [{ key: "setAttachment", value: function setAttachment(slotIndex, name, attachment) { if (!attachment) throw new Error("attachment cannot be null."); @@ -7704,7 +7443,6 @@ var spine = (function (pc) { } } }]); - return Skin; }(); var SlotData = _createClass(function SlotData(index, name, boneData) { @@ -7729,32 +7467,45 @@ var spine = (function (pc) { BlendMode[BlendMode["Screen"] = 3] = "Screen"; })(BlendMode || (BlendMode = {})); + function _callSuper$2(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var TransformConstraintData = function (_ConstraintData) { - _inherits(TransformConstraintData, _ConstraintData); - var _super = _createSuper(TransformConstraintData); function TransformConstraintData(name) { - var _this; + var _this2; _classCallCheck(this, TransformConstraintData); - _this = _super.call(this, name, 0, false); - _this.bones = new Array(); - _this._target = null; - _this.mixRotate = 0; - _this.mixX = 0; - _this.mixY = 0; - _this.mixScaleX = 0; - _this.mixScaleY = 0; - _this.mixShearY = 0; - _this.offsetRotation = 0; - _this.offsetX = 0; - _this.offsetY = 0; - _this.offsetScaleX = 0; - _this.offsetScaleY = 0; - _this.offsetShearY = 0; - _this.relative = false; - _this.local = false; - return _this; - } - _createClass(TransformConstraintData, [{ + _this2 = _callSuper$2(this, TransformConstraintData, [name, 0, false]); + _this2.bones = new Array(); + _this2._target = null; + _this2.mixRotate = 0; + _this2.mixX = 0; + _this2.mixY = 0; + _this2.mixScaleX = 0; + _this2.mixScaleY = 0; + _this2.mixShearY = 0; + _this2.offsetRotation = 0; + _this2.offsetX = 0; + _this2.offsetY = 0; + _this2.offsetScaleX = 0; + _this2.offsetScaleY = 0; + _this2.offsetShearY = 0; + _this2.relative = false; + _this2.local = false; + return _this2; + } + _inherits(TransformConstraintData, _ConstraintData); + return _createClass(TransformConstraintData, [{ key: "target", get: function get() { if (!this._target) throw new Error("BoneData not set.");else return this._target; @@ -7763,7 +7514,6 @@ var spine = (function (pc) { this._target = boneData; } }]); - return TransformConstraintData; }(ConstraintData); var SkeletonBinary = function () { @@ -7773,7 +7523,7 @@ var spine = (function (pc) { this.linkedMeshes = new Array(); this.attachmentLoader = attachmentLoader; } - _createClass(SkeletonBinary, [{ + return _createClass(SkeletonBinary, [{ key: "readSkeletonData", value: function readSkeletonData(binary) { var scale = this.scale; @@ -8674,7 +8424,6 @@ var spine = (function (pc) { return new Animation(name, timelines, duration); } }]); - return SkeletonBinary; }(); var BinaryInput = function () { function BinaryInput(data) { @@ -8686,7 +8435,7 @@ var spine = (function (pc) { this.index = index; this.buffer = buffer; } - _createClass(BinaryInput, [{ + return _createClass(BinaryInput, [{ key: "readByte", value: function readByte() { return this.buffer.getInt8(this.index++); @@ -8783,7 +8532,6 @@ var spine = (function (pc) { return this.readByte() != 0; } }]); - return BinaryInput; }(); var LinkedMesh$1 = _createClass(function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) { _classCallCheck(this, LinkedMesh); @@ -8894,7 +8642,7 @@ var spine = (function (pc) { return Utils.newFloatArray(16); }); } - _createClass(SkeletonBounds, [{ + return _createClass(SkeletonBounds, [{ key: "update", value: function update(skeleton, updateAabb) { if (!skeleton) throw new Error("skeleton cannot be null."); @@ -9061,7 +8809,6 @@ var spine = (function (pc) { return this.maxY - this.minY; } }]); - return SkeletonBounds; }(); var Triangulator = function () { @@ -9079,7 +8826,7 @@ var spine = (function (pc) { return new Array(); }); } - _createClass(Triangulator, [{ + return _createClass(Triangulator, [{ key: "triangulate", value: function triangulate(verticesArray) { var vertices = verticesArray; @@ -9292,7 +9039,6 @@ var spine = (function (pc) { return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1; } }]); - return Triangulator; }(); var SkeletonClipping = function () { @@ -9307,7 +9053,7 @@ var spine = (function (pc) { this.clipAttachment = null; this.clippingPolygons = null; } - _createClass(SkeletonClipping, [{ + return _createClass(SkeletonClipping, [{ key: "clipStart", value: function clipStart(slot, clip) { if (this.clipAttachment) return 0; @@ -9610,7 +9356,6 @@ var spine = (function (pc) { } } }]); - return SkeletonClipping; }(); var SkeletonJson = function () { @@ -9620,7 +9365,7 @@ var spine = (function (pc) { this.linkedMeshes = new Array(); this.attachmentLoader = attachmentLoader; } - _createClass(SkeletonJson, [{ + return _createClass(SkeletonJson, [{ key: "readSkeletonData", value: function readSkeletonData(json) { var scale = this.scale; @@ -10428,7 +10173,6 @@ var spine = (function (pc) { skeletonData.animations.push(new Animation(name, timelines, duration)); } }]); - return SkeletonJson; }(); var LinkedMesh = _createClass(function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) { _classCallCheck(this, LinkedMesh); @@ -10643,7 +10387,7 @@ var spine = (function (pc) { }; this.pcTexture = texture; } - _createClass(SpineTextureWrapper, [{ + return _createClass(SpineTextureWrapper, [{ key: "setFilters", value: function setFilters(minFilter, magFilter) { this.pcTexture.minFilter = TO_TEXTURE_FILTER[minFilter]; @@ -10666,7 +10410,6 @@ var spine = (function (pc) { this.pcTexture.destroy(); } }]); - return SpineTextureWrapper; }(); function getDefaultExportFromCjs (x) { @@ -10756,8 +10499,11 @@ var spine = (function (pc) { createToken('XRANGEPLAINLOOSE', "[v=\\s]*(".concat(src[t.XRANGEIDENTIFIERLOOSE], ")") + "(?:\\.(".concat(src[t.XRANGEIDENTIFIERLOOSE], ")") + "(?:\\.(".concat(src[t.XRANGEIDENTIFIERLOOSE], ")") + "(?:".concat(src[t.PRERELEASELOOSE], ")?").concat(src[t.BUILD], "?") + ")?)?"); createToken('XRANGE', "^".concat(src[t.GTLT], "\\s*").concat(src[t.XRANGEPLAIN], "$")); createToken('XRANGELOOSE', "^".concat(src[t.GTLT], "\\s*").concat(src[t.XRANGEPLAINLOOSE], "$")); - createToken('COERCE', "".concat('(^|[^\\d])' + '(\\d{1,').concat(MAX_SAFE_COMPONENT_LENGTH, "})") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?") + "(?:$|[^\\d])"); + createToken('COERCEPLAIN', "".concat('(^|[^\\d])' + '(\\d{1,').concat(MAX_SAFE_COMPONENT_LENGTH, "})") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?") + "(?:\\.(\\d{1,".concat(MAX_SAFE_COMPONENT_LENGTH, "}))?")); + createToken('COERCE', "".concat(src[t.COERCEPLAIN], "(?:$|[^\\d])")); + createToken('COERCEFULL', src[t.COERCEPLAIN] + "(?:".concat(src[t.PRERELEASE], ")?") + "(?:".concat(src[t.BUILD], ")?") + "(?:$|[^\\d])"); createToken('COERCERTL', src[t.COERCE], true); + createToken('COERCERTLFULL', src[t.COERCEFULL], true); createToken('LONETILDE', '(?:~>?)'); createToken('TILDETRIM', "(\\s*)".concat(src[t.LONETILDE], "\\s+"), true); exports.tildeTrimReplace = '$1~'; @@ -10876,7 +10622,7 @@ var spine = (function (pc) { this.build = m[5] ? m[5].split('.') : []; this.format(); } - _createClass(SemVer, [{ + return _createClass(SemVer, [{ key: "format", value: function format() { this.version = "".concat(this.major, ".").concat(this.minor, ".").concat(this.patch); @@ -10954,7 +10700,7 @@ var spine = (function (pc) { do { var a = this.build[i]; var b = other.build[i]; - debug('prerelease compare', i, a, b); + debug('build compare', i, a, b); if (a === undefined && b === undefined) { return 0; } else if (b === undefined) { @@ -11065,7 +10811,6 @@ var spine = (function (pc) { return this; } }]); - return SemVer; }(); var semver$1 = SemVer$3; getDefaultExportFromCjs(semver$1); @@ -11113,727 +10858,76 @@ var spine = (function (pc) { options = options || {}; var match = null; if (!options.rtl) { - match = version.match(re[t.COERCE]); + match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]); } else { + var coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]; var next; - while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) { + while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next; } - re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; + coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length; } - re[t.COERCERTL].lastIndex = -1; + coerceRtlRegex.lastIndex = -1; } if (match === null) { return null; } - return parse("".concat(match[2], ".").concat(match[3] || '0', ".").concat(match[4] || '0'), options); + var major = match[2]; + var minor = match[3] || '0'; + var patch = match[4] || '0'; + var prerelease = options.includePrerelease && match[5] ? "-".concat(match[5]) : ''; + var build = options.includePrerelease && match[6] ? "+".concat(match[6]) : ''; + return parse("".concat(major, ".").concat(minor, ".").concat(patch).concat(prerelease).concat(build), options); }; var coerce_1 = coerce; var coerce$1 = getDefaultExportFromCjs(coerce_1); - var iterator; - var hasRequiredIterator; - function requireIterator() { - if (hasRequiredIterator) return iterator; - hasRequiredIterator = 1; - iterator = function iterator(Yallist) { - Yallist.prototype[Symbol.iterator] = _regeneratorRuntime().mark(function _callee() { - var walker; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - walker = this.head; - case 1: - if (!walker) { - _context.next = 7; - break; - } - _context.next = 4; - return walker.value; - case 4: - walker = walker.next; - _context.next = 1; - break; - case 7: - case "end": - return _context.stop(); - } - }, _callee, this); - }); - }; - return iterator; - } - - var yallist = Yallist$1; - Yallist$1.Node = Node; - Yallist$1.create = Yallist$1; - function Yallist$1(list) { - var self = this; - if (!(self instanceof Yallist$1)) { - self = new Yallist$1(); - } - self.tail = null; - self.head = null; - self.length = 0; - if (list && typeof list.forEach === 'function') { - list.forEach(function (item) { - self.push(item); - }); - } else if (arguments.length > 0) { - for (var i = 0, l = arguments.length; i < l; i++) { - self.push(arguments[i]); - } - } - return self; - } - Yallist$1.prototype.removeNode = function (node) { - if (node.list !== this) { - throw new Error('removing node which does not belong to this list'); - } - var next = node.next; - var prev = node.prev; - if (next) { - next.prev = prev; - } - if (prev) { - prev.next = next; - } - if (node === this.head) { - this.head = next; - } - if (node === this.tail) { - this.tail = prev; - } - node.list.length--; - node.next = null; - node.prev = null; - node.list = null; - return next; - }; - Yallist$1.prototype.unshiftNode = function (node) { - if (node === this.head) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - var head = this.head; - node.list = this; - node.next = head; - if (head) { - head.prev = node; - } - this.head = node; - if (!this.tail) { - this.tail = node; - } - this.length++; - }; - Yallist$1.prototype.pushNode = function (node) { - if (node === this.tail) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - var tail = this.tail; - node.list = this; - node.prev = tail; - if (tail) { - tail.next = node; - } - this.tail = node; - if (!this.head) { - this.head = node; - } - this.length++; - }; - Yallist$1.prototype.push = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - push(this, arguments[i]); - } - return this.length; - }; - Yallist$1.prototype.unshift = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - unshift(this, arguments[i]); - } - return this.length; - }; - Yallist$1.prototype.pop = function () { - if (!this.tail) { - return undefined; - } - var res = this.tail.value; - this.tail = this.tail.prev; - if (this.tail) { - this.tail.next = null; - } else { - this.head = null; - } - this.length--; - return res; - }; - Yallist$1.prototype.shift = function () { - if (!this.head) { - return undefined; - } - var res = this.head.value; - this.head = this.head.next; - if (this.head) { - this.head.prev = null; - } else { - this.tail = null; - } - this.length--; - return res; - }; - Yallist$1.prototype.forEach = function (fn, thisp) { - thisp = thisp || this; - for (var walker = this.head, i = 0; walker !== null; i++) { - fn.call(thisp, walker.value, i, this); - walker = walker.next; - } - }; - Yallist$1.prototype.forEachReverse = function (fn, thisp) { - thisp = thisp || this; - for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { - fn.call(thisp, walker.value, i, this); - walker = walker.prev; - } - }; - Yallist$1.prototype.get = function (n) { - for (var i = 0, walker = this.head; walker !== null && i < n; i++) { - walker = walker.next; - } - if (i === n && walker !== null) { - return walker.value; - } - }; - Yallist$1.prototype.getReverse = function (n) { - for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { - walker = walker.prev; - } - if (i === n && walker !== null) { - return walker.value; - } - }; - Yallist$1.prototype.map = function (fn, thisp) { - thisp = thisp || this; - var res = new Yallist$1(); - for (var walker = this.head; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.next; - } - return res; - }; - Yallist$1.prototype.mapReverse = function (fn, thisp) { - thisp = thisp || this; - var res = new Yallist$1(); - for (var walker = this.tail; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.prev; - } - return res; - }; - Yallist$1.prototype.reduce = function (fn, initial) { - var acc; - var walker = this.head; - if (arguments.length > 1) { - acc = initial; - } else if (this.head) { - walker = this.head.next; - acc = this.head.value; - } else { - throw new TypeError('Reduce of empty list with no initial value'); - } - for (var i = 0; walker !== null; i++) { - acc = fn(acc, walker.value, i); - walker = walker.next; - } - return acc; - }; - Yallist$1.prototype.reduceReverse = function (fn, initial) { - var acc; - var walker = this.tail; - if (arguments.length > 1) { - acc = initial; - } else if (this.tail) { - walker = this.tail.prev; - acc = this.tail.value; - } else { - throw new TypeError('Reduce of empty list with no initial value'); - } - for (var i = this.length - 1; walker !== null; i--) { - acc = fn(acc, walker.value, i); - walker = walker.prev; - } - return acc; - }; - Yallist$1.prototype.toArray = function () { - var arr = new Array(this.length); - for (var i = 0, walker = this.head; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.next; - } - return arr; - }; - Yallist$1.prototype.toArrayReverse = function () { - var arr = new Array(this.length); - for (var i = 0, walker = this.tail; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.prev; - } - return arr; - }; - Yallist$1.prototype.slice = function (from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; - } - from = from || 0; - if (from < 0) { - from += this.length; - } - var ret = new Yallist$1(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - for (var i = 0, walker = this.head; walker !== null && i < from; i++) { - walker = walker.next; - } - for (; walker !== null && i < to; i++, walker = walker.next) { - ret.push(walker.value); - } - return ret; - }; - Yallist$1.prototype.sliceReverse = function (from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; - } - from = from || 0; - if (from < 0) { - from += this.length; - } - var ret = new Yallist$1(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { - walker = walker.prev; - } - for (; walker !== null && i > from; i--, walker = walker.prev) { - ret.push(walker.value); - } - return ret; - }; - Yallist$1.prototype.splice = function (start, deleteCount) { - if (start > this.length) { - start = this.length - 1; - } - if (start < 0) { - start = this.length + start; - } - for (var i = 0, walker = this.head; walker !== null && i < start; i++) { - walker = walker.next; - } - var ret = []; - for (var i = 0; walker && i < deleteCount; i++) { - ret.push(walker.value); - walker = this.removeNode(walker); - } - if (walker === null) { - walker = this.tail; - } - if (walker !== this.head && walker !== this.tail) { - walker = walker.prev; - } - for (var i = 0; i < (arguments.length <= 2 ? 0 : arguments.length - 2); i++) { - walker = insert(this, walker, i + 2 < 2 || arguments.length <= i + 2 ? undefined : arguments[i + 2]); - } - return ret; - }; - Yallist$1.prototype.reverse = function () { - var head = this.head; - var tail = this.tail; - for (var walker = head; walker !== null; walker = walker.prev) { - var p = walker.prev; - walker.prev = walker.next; - walker.next = p; - } - this.head = tail; - this.tail = head; - return this; - }; - function insert(self, node, value) { - var inserted = node === self.head ? new Node(value, null, node, self) : new Node(value, node, node.next, self); - if (inserted.next === null) { - self.tail = inserted; - } - if (inserted.prev === null) { - self.head = inserted; - } - self.length++; - return inserted; - } - function push(self, item) { - self.tail = new Node(item, self.tail, null, self); - if (!self.head) { - self.head = self.tail; - } - self.length++; - } - function unshift(self, item) { - self.head = new Node(item, null, self.head, self); - if (!self.tail) { - self.tail = self.head; - } - self.length++; - } - function Node(value, prev, next, list) { - if (!(this instanceof Node)) { - return new Node(value, prev, next, list); - } - this.list = list; - this.value = value; - if (prev) { - prev.next = this; - this.prev = prev; - } else { - this.prev = null; - } - if (next) { - next.prev = this; - this.next = next; - } else { - this.next = null; - } - } - try { - requireIterator()(Yallist$1); - } catch (er) {} - getDefaultExportFromCjs(yallist); - - var Yallist = yallist; - var MAX = Symbol('max'); - var LENGTH = Symbol('length'); - var LENGTH_CALCULATOR = Symbol('lengthCalculator'); - var ALLOW_STALE = Symbol('allowStale'); - var MAX_AGE = Symbol('maxAge'); - var DISPOSE = Symbol('dispose'); - var NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet'); - var LRU_LIST = Symbol('lruList'); - var CACHE = Symbol('cache'); - var UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet'); - var naiveLength = function naiveLength() { - return 1; - }; var LRUCache = function () { - function LRUCache(options) { + function LRUCache() { _classCallCheck(this, LRUCache); - if (typeof options === 'number') options = { - max: options - }; - if (!options) options = {}; - if (options.max && (typeof options.max !== 'number' || options.max < 0)) throw new TypeError('max must be a non-negative number'); - this[MAX] = options.max || Infinity; - var lc = options.length || naiveLength; - this[LENGTH_CALCULATOR] = typeof lc !== 'function' ? naiveLength : lc; - this[ALLOW_STALE] = options.stale || false; - if (options.maxAge && typeof options.maxAge !== 'number') throw new TypeError('maxAge must be a number'); - this[MAX_AGE] = options.maxAge || 0; - this[DISPOSE] = options.dispose; - this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false; - this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false; - this.reset(); - } - _createClass(LRUCache, [{ - key: "max", - get: function get() { - return this[MAX]; - }, - set: function set(mL) { - if (typeof mL !== 'number' || mL < 0) throw new TypeError('max must be a non-negative number'); - this[MAX] = mL || Infinity; - trim(this); - } - }, { - key: "allowStale", - get: function get() { - return this[ALLOW_STALE]; - }, - set: function set(allowStale) { - this[ALLOW_STALE] = !!allowStale; - } - }, { - key: "maxAge", - get: function get() { - return this[MAX_AGE]; - }, - set: function set(mA) { - if (typeof mA !== 'number') throw new TypeError('maxAge must be a non-negative number'); - this[MAX_AGE] = mA; - trim(this); - } - }, { - key: "lengthCalculator", - get: function get() { - return this[LENGTH_CALCULATOR]; - }, - set: function set(lC) { - var _this = this; - if (typeof lC !== 'function') lC = naiveLength; - if (lC !== this[LENGTH_CALCULATOR]) { - this[LENGTH_CALCULATOR] = lC; - this[LENGTH] = 0; - this[LRU_LIST].forEach(function (hit) { - hit.length = _this[LENGTH_CALCULATOR](hit.value, hit.key); - _this[LENGTH] += hit.length; - }); - } - trim(this); - } - }, { - key: "length", - get: function get() { - return this[LENGTH]; - } - }, { - key: "itemCount", - get: function get() { - return this[LRU_LIST].length; - } - }, { - key: "rforEach", - value: function rforEach(fn, thisp) { - thisp = thisp || this; - for (var walker = this[LRU_LIST].tail; walker !== null;) { - var prev = walker.prev; - forEachStep(this, fn, walker, thisp); - walker = prev; - } - } - }, { - key: "forEach", - value: function forEach(fn, thisp) { - thisp = thisp || this; - for (var walker = this[LRU_LIST].head; walker !== null;) { - var next = walker.next; - forEachStep(this, fn, walker, thisp); - walker = next; - } - } - }, { - key: "keys", - value: function keys() { - return this[LRU_LIST].toArray().map(function (k) { - return k.key; - }); - } - }, { - key: "values", - value: function values() { - return this[LRU_LIST].toArray().map(function (k) { - return k.value; - }); - } - }, { - key: "reset", - value: function reset() { - var _this2 = this; - if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { - this[LRU_LIST].forEach(function (hit) { - return _this2[DISPOSE](hit.key, hit.value); - }); + this.max = 1000; + this.map = new Map(); + } + return _createClass(LRUCache, [{ + key: "get", + value: function get(key) { + var value = this.map.get(key); + if (value === undefined) { + return undefined; + } else { + this.map.delete(key); + this.map.set(key, value); + return value; } - this[CACHE] = new Map(); - this[LRU_LIST] = new Yallist(); - this[LENGTH] = 0; - } - }, { - key: "dump", - value: function dump() { - var _this3 = this; - return this[LRU_LIST].map(function (hit) { - return isStale(_this3, hit) ? false : { - k: hit.key, - v: hit.value, - e: hit.now + (hit.maxAge || 0) - }; - }).toArray().filter(function (h) { - return h; - }); - } - }, { - key: "dumpLru", - value: function dumpLru() { - return this[LRU_LIST]; } }, { - key: "set", - value: function set(key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE]; - if (maxAge && typeof maxAge !== 'number') throw new TypeError('maxAge must be a number'); - var now = maxAge ? Date.now() : 0; - var len = this[LENGTH_CALCULATOR](value, key); - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - _del(this, this[CACHE].get(key)); - return false; - } - var node = this[CACHE].get(key); - var item = node.value; - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) this[DISPOSE](key, item.value); - } - item.now = now; - item.maxAge = maxAge; - item.value = value; - this[LENGTH] += len - item.length; - item.length = len; - this.get(key); - trim(this); + key: "delete", + value: function _delete(key) { + if (this.map.has(key)) { + this.map.delete(key); return true; - } - var hit = new Entry(key, value, len, now, maxAge); - if (hit.length > this[MAX]) { - if (this[DISPOSE]) this[DISPOSE](key, value); + } else { return false; } - this[LENGTH] += hit.length; - this[LRU_LIST].unshift(hit); - this[CACHE].set(key, this[LRU_LIST].head); - trim(this); - return true; - } - }, { - key: "has", - value: function has(key) { - if (!this[CACHE].has(key)) return false; - var hit = this[CACHE].get(key).value; - return !isStale(this, hit); - } - }, { - key: "get", - value: function get(key) { - return _get(this, key, true); } }, { - key: "peek", - value: function peek(key) { - return _get(this, key, false); - } - }, { - key: "pop", - value: function pop() { - var node = this[LRU_LIST].tail; - if (!node) return null; - _del(this, node); - return node.value; - } - }, { - key: "del", - value: function del(key) { - _del(this, this[CACHE].get(key)); - } - }, { - key: "load", - value: function load(arr) { - this.reset(); - var now = Date.now(); - for (var l = arr.length - 1; l >= 0; l--) { - var hit = arr[l]; - var expiresAt = hit.e || 0; - if (expiresAt === 0) this.set(hit.k, hit.v);else { - var maxAge = expiresAt - now; - if (maxAge > 0) { - this.set(hit.k, hit.v, maxAge); - } + key: "set", + value: function set(key, value) { + var deleted = this.delete(key); + if (!deleted && value !== undefined) { + if (this.map.size >= this.max) { + var firstKey = this.map.keys().next().value; + this.delete(firstKey); } + this.map.set(key, value); } - } - }, { - key: "prune", - value: function prune() { - var _this4 = this; - this[CACHE].forEach(function (value, key) { - return _get(_this4, key, false); - }); + return this; } }]); - return LRUCache; }(); - var _get = function _get(self, key, doUse) { - var node = self[CACHE].get(key); - if (node) { - var hit = node.value; - if (isStale(self, hit)) { - _del(self, node); - if (!self[ALLOW_STALE]) return undefined; - } else { - if (doUse) { - if (self[UPDATE_AGE_ON_GET]) node.value.now = Date.now(); - self[LRU_LIST].unshiftNode(node); - } - } - return hit.value; - } - }; - var isStale = function isStale(self, hit) { - if (!hit || !hit.maxAge && !self[MAX_AGE]) return false; - var diff = Date.now() - hit.now; - return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && diff > self[MAX_AGE]; - }; - var trim = function trim(self) { - if (self[LENGTH] > self[MAX]) { - for (var walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null;) { - var prev = walker.prev; - _del(self, walker); - walker = prev; - } - } - }; - var _del = function _del(self, node) { - if (node) { - var hit = node.value; - if (self[DISPOSE]) self[DISPOSE](hit.key, hit.value); - self[LENGTH] -= hit.length; - self[CACHE].delete(hit.key); - self[LRU_LIST].removeNode(node); - } - }; - var Entry = _createClass(function Entry(key, value, length, now, maxAge) { - _classCallCheck(this, Entry); - this.key = key; - this.value = value; - this.length = length; - this.now = now; - this.maxAge = maxAge || 0; - }); - var forEachStep = function forEachStep(self, fn, node, thisp) { - var hit = node.value; - if (isStale(self, hit)) { - _del(self, node); - if (!self[ALLOW_STALE]) hit = undefined; - } - if (hit) fn.call(thisp, hit.value, hit.key, self); - }; - var lruCache = LRUCache; - getDefaultExportFromCjs(lruCache); + var lrucache = LRUCache; + getDefaultExportFromCjs(lrucache); var SemVer = semver$1; var compare$6 = function compare(a, b, loose) { @@ -11958,7 +11052,7 @@ var spine = (function (pc) { } debug('comp', this); } - _createClass(Comparator, [{ + return _createClass(Comparator, [{ key: "parse", value: function parse(comp) { var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; @@ -12044,7 +11138,6 @@ var spine = (function (pc) { return ANY; } }]); - return Comparator; }(); comparator = Comparator; var parseOptions = parseOptions_1; @@ -12119,7 +11212,7 @@ var spine = (function (pc) { } this.format(); } - _createClass(Range, [{ + return _createClass(Range, [{ key: "format", value: function format() { this.range = this.set.map(function (comps) { @@ -12227,13 +11320,10 @@ var spine = (function (pc) { return false; } }]); - return Range; }(); range = Range; - var LRU = lruCache; - var cache = new LRU({ - max: 1000 - }); + var LRU = lrucache; + var cache = new LRU(); var parseOptions = parseOptions_1; var Comparator = requireComparator(); var debug = debug_1; @@ -12423,7 +11513,7 @@ var spine = (function (pc) { return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ''); }; var hyphenReplace = function hyphenReplace(incPr) { - return function ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) { + return function ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) { if (isX(fM)) { from = ''; } else if (isX(fm)) { @@ -12565,7 +11655,7 @@ var spine = (function (pc) { this.init(); this._hidden = false; } - _createClass(Spine, [{ + return _createClass(Spine, [{ key: "destroy", value: function destroy() { this.removeFromLayers(); @@ -12960,25 +12050,37 @@ var spine = (function (pc) { this.addToLayers(); } }]); - return Spine; }(); + function _callSuper$1(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var SpineComponent = function (_Component) { - _inherits(SpineComponent, _Component); - var _super = _createSuper(SpineComponent); function SpineComponent(system, entity) { - var _this; + var _this2; _classCallCheck(this, SpineComponent); - _this = _super.call(this, system, entity); - _this.on('set_atlasAsset', _this.onSetAsset, _assertThisInitialized(_this)); - _this.on('set_textureAssets', _this.onSetAssets, _assertThisInitialized(_this)); - _this.on('set_skeletonAsset', _this.onSetAsset, _assertThisInitialized(_this)); - _this.on('set_atlasData', _this.onSetResource, _assertThisInitialized(_this)); - _this.on('set_textures', _this.onSetResource, _assertThisInitialized(_this)); - _this.on('set_skeletonData', _this.onSetResource, _assertThisInitialized(_this)); - return _this; - } - _createClass(SpineComponent, [{ + _this2 = _callSuper$1(this, SpineComponent, [system, entity]); + _this2.on('set_atlasAsset', _this2.onSetAsset, _this2); + _this2.on('set_textureAssets', _this2.onSetAssets, _this2); + _this2.on('set_skeletonAsset', _this2.onSetAsset, _this2); + _this2.on('set_atlasData', _this2.onSetResource, _this2); + _this2.on('set_textures', _this2.onSetResource, _this2); + _this2.on('set_skeletonData', _this2.onSetResource, _this2); + return _this2; + } + _inherits(SpineComponent, _Component); + return _createClass(SpineComponent, [{ key: "_createSpine", value: function _createSpine() { if (this.data.spine) { @@ -13160,7 +12262,6 @@ var spine = (function (pc) { } } }]); - return SpineComponent; }(pc.Component); var SpineComponentData = _createClass(function SpineComponentData() { @@ -13176,26 +12277,39 @@ var spine = (function (pc) { this.skeletonData = null; }); + function _callSuper(_this, derived, args) { + function isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + try { + return !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (e) { + return false; + } + } + derived = _getPrototypeOf(derived); + return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? Reflect.construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args)); + } var SpineComponentSystem = function (_ComponentSystem) { - _inherits(SpineComponentSystem, _ComponentSystem); - var _super = _createSuper(SpineComponentSystem); function SpineComponentSystem(app) { - var _this; + var _this2; _classCallCheck(this, SpineComponentSystem); - _this = _super.call(this, app); - _this.id = 'spine'; - _this.ComponentType = SpineComponent; - _this.DataType = SpineComponentData; - _this.schema = ['enabled', 'atlasAsset', 'textureAssets', 'skeletonAsset', 'atlasData', 'textures', 'skeletonData', 'speed', 'spine']; - _this.on('beforeremove', _this.onBeforeRemove, _assertThisInitialized(_this)); - _this.app.systems.on('update', _this.onUpdate, _assertThisInitialized(_this)); - return _this; - } - _createClass(SpineComponentSystem, [{ + _this2 = _callSuper(this, SpineComponentSystem, [app]); + _this2.id = 'spine'; + _this2.ComponentType = SpineComponent; + _this2.DataType = SpineComponentData; + _this2.schema = ['enabled', 'atlasAsset', 'textureAssets', 'skeletonAsset', 'atlasData', 'textures', 'skeletonData', 'speed', 'spine']; + _this2.on('beforeremove', _this2.onBeforeRemove, _this2); + _this2.app.systems.on('update', _this2.onUpdate, _this2); + return _this2; + } + _inherits(SpineComponentSystem, _ComponentSystem); + return _createClass(SpineComponentSystem, [{ key: "initializeComponentData", value: function initializeComponentData(component, data, properties) { properties = ['enabled', 'atlasAsset', 'textureAssets', 'skeletonAsset', 'atlasData', 'textures', 'skeletonData', 'spine']; - _get$1(_getPrototypeOf(SpineComponentSystem.prototype), "initializeComponentData", this).call(this, component, data, properties); + _get(_getPrototypeOf(SpineComponentSystem.prototype), "initializeComponentData", this).call(this, component, data, properties); } }, { key: "onBeforeRemove", @@ -13224,7 +12338,6 @@ var spine = (function (pc) { } } }]); - return SpineComponentSystem; }(pc.ComponentSystem); (function () { diff --git a/build/playcanvas-spine.4.1.min.js b/build/playcanvas-spine.4.1.min.js index d09ec1c..8496d75 100644 --- a/build/playcanvas-spine.4.1.min.js +++ b/build/playcanvas-spine.4.1.min.js @@ -1 +1 @@ -var spine=function(t){"use strict";function e(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var n=e(t);function r(){r=function(){return e};var t,e={},n=Object.prototype,a=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},s="function"==typeof Symbol?Symbol:{},o=s.iterator||"@@iterator",h=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var a=e&&e.prototype instanceof y?e:y,s=Object.create(a.prototype),o=new F(r||[]);return i(s,"_invoke",{value:T(t,n,o)}),s}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var d="suspendedStart",v="suspendedYield",m="executing",p="completed",g={};function y(){}function w(){}function k(){}var b={};u(b,o,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(Y([])));E&&E!==n&&a.call(E,o)&&(b=E);var I=k.prototype=y.prototype=Object.create(b);function A(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function n(r,i,s,o){var h=f(t[r],t,i);if("throw"!==h.type){var l=h.arg,u=l.value;return u&&"object"==typeof u&&a.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,s,o)}),(function(t){n("throw",t,s,o)})):e.resolve(u).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,o)}))}o(h.arg)}var r;i(this,"_invoke",{value:function(t,a){function i(){return new e((function(e,r){n(t,a,e,r)}))}return r=r?r.then(i,i):i()}})}function T(e,n,r){var a=d;return function(i,s){if(a===m)throw new Error("Generator is already running");if(a===p){if("throw"===i)throw s;return{value:t,done:!0}}for(r.method=i,r.arg=s;;){var o=r.delegate;if(o){var h=R(o,r);if(h){if(h===g)continue;return h}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===d)throw a=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=m;var l=f(e,n,r);if("normal"===l.type){if(a=r.done?p:v,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(a=p,r.method="throw",r.arg=l.arg)}}}function R(e,n){var r=n.method,a=e.iterator[r];if(a===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,R(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=f(a,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var s=i.arg;return s?s.done?(n[e.resultName]=s.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function Y(e){if(e||""===e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function n(){for(;++r=0;--i){var s=this.tryEntries[i],o=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var h=a.call(s,"catchLoc"),l=a.call(s,"finallyLoc");if(h&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;M(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:Y(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){o=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function k(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var b=function(){function t(){i(this,t),this.array=new Array}return o(t,[{key:"add",value:function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e}},{key:"contains",value:function(t){return null!=this.array[0|t]}},{key:"remove",value:function(t){this.array[0|t]=void 0}},{key:"clear",value:function(){this.array.length=0}}]),t}(),x=function(){function t(){i(this,t),this.entries={},this.size=0}return o(t,[{key:"add",value:function(t){var e=this.entries[t];return this.entries[t]=!0,!e&&(this.size++,!0)}},{key:"addAll",value:function(t){for(var e=this.size,n=0,r=t.length;n0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;i(this,t),this.r=e,this.g=n,this.b=r,this.a=a}return o(t,[{key:"set",value:function(t,e,n,r){return this.r=t,this.g=e,this.b=n,this.a=r,this.clamp()}},{key:"setFromColor",value:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}},{key:"setFromString",value:function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=8!=t.length?1:parseInt(t.substr(6,2),16)/255,this}},{key:"add",value:function(t,e,n,r){return this.r+=t,this.g+=e,this.b+=n,this.a+=r,this.clamp()}},{key:"clamp",value:function(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}}],[{key:"rgba8888ToColor",value:function(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255}},{key:"rgb888ToColor",value:function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255}},{key:"fromString",value:function(e){return(new t).setFromString(e)}}]),t}();E.WHITE=new E(1,1,1,1),E.RED=new E(1,0,0,1),E.GREEN=new E(0,1,0,1),E.BLUE=new E(0,0,1,1),E.MAGENTA=new E(1,0,1,1);var I=function(){function t(){i(this,t)}return o(t,null,[{key:"clamp",value:function(t,e,n){return tn?n:t}},{key:"cosDeg",value:function(e){return Math.cos(e*t.degRad)}},{key:"sinDeg",value:function(e){return Math.sin(e*t.degRad)}},{key:"signum",value:function(t){return t>0?1:t<0?-1:0}},{key:"toInt",value:function(t){return t>0?Math.floor(t):Math.ceil(t)}},{key:"cbrt",value:function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e}},{key:"randomTriangular",value:function(e,n){return t.randomTriangularWith(e,n,.5*(e+n))}},{key:"randomTriangularWith",value:function(t,e,n){var r=Math.random(),a=e-t;return r<=(n-t)/a?t+Math.sqrt(r*a*(n-t)):e-Math.sqrt((1-r)*a*(e-n))}},{key:"isPowerOfTwo",value:function(t){return t&&0==(t&t-1)}}]),t}();I.PI=3.1415927,I.PI2=2*I.PI,I.radiansToDegrees=180/I.PI,I.radDeg=I.radiansToDegrees,I.degreesToRadians=I.PI/180,I.degRad=I.degreesToRadians;var A=function(){function t(){i(this,t)}return o(t,[{key:"apply",value:function(t,e,n){return t+(e-t)*this.applyInternal(n)}}]),t}(),S=function(t){l(n,t);var e=d(n);function n(t){var r;return i(this,n),(r=e.call(this)).power=2,r.power=t,r}return o(n,[{key:"applyInternal",value:function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1}}]),n}(A),T=function(t){l(n,t);var e=d(n);function n(t){return i(this,n),e.call(this,t)}return o(n,[{key:"applyInternal",value:function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1}}]),n}(S),R=function(){function t(){i(this,t)}return o(t,null,[{key:"arrayCopy",value:function(t,e,n,r,a){for(var i=e,s=r;i2&&void 0!==arguments[2]?arguments[2]:0,r=t.length;if(r==e)return t;if(t.length=e,r2&&void 0!==arguments[2]?arguments[2]:0;return e.length>=n?e:t.setArraySize(e,n,r)}},{key:"newArray",value:function(t,e){for(var n=new Array(t),r=0;r0?this.items.pop():this.instantiator()}},{key:"free",value:function(t){t.reset&&t.reset(),this.items.push(t)}},{key:"freeAll",value:function(t){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;i(this,t),this.x=e,this.y=n}return o(t,[{key:"set",value:function(t,e){return this.x=t,this.y=e,this}},{key:"length",value:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}},{key:"normalize",value:function(){var t=this.length();return 0!=t&&(this.x/=t,this.y/=t),this}}]),t}(),Y=function(){function t(){i(this,t),this.maxDelta=.064,this.framesPerSecond=0,this.delta=0,this.totalTime=0,this.lastTime=Date.now()/1e3,this.frameCount=0,this.frameTime=0}return o(t,[{key:"update",value:function(){var t=Date.now()/1e3;this.delta=t-this.lastTime,this.frameTime+=this.delta,this.totalTime+=this.delta,this.delta>this.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)}}]),t}(),L=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;i(this,t),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(e)}return o(t,[{key:"hasEnoughData",value:function(){return this.addedValues>=this.values.length}},{key:"addValue",value:function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0}},{key:"getMean",value:function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*i;var s=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(l){for(var u=0,c=0,f=0;f0&&(h=o);for(var N=t.bone,P=N.worldX,_=N.worldY,O=N.a,B=N.b,D=N.c,V=N.d,U=e,q=a;q=this.regions.length&&(n=this.regions.length-1);var r=this.regions[n];e.region!=r&&(e.region=r,e.updateRegion())}},{key:"getPath",value:function(t,e){for(var n=t,r=(this.start+e).toString(),a=this.digits-r.length;a>0;a--)n+="0";return n+=r}}],[{key:"nextID",value:function(){return t._nextID++}}]),t}();_._nextID=0,function(t){t[t.hold=0]="hold",t[t.once=1]="once",t[t.loop=2]="loop",t[t.pingpong=3]="pingpong",t[t.onceReverse=4]="onceReverse",t[t.loopReverse=5]="loopReverse",t[t.pingpongReverse=6]="pingpongReverse"}(P||(P={}));var O,B,D=[P.hold,P.once,P.loop,P.pingpong,P.onceReverse,P.loopReverse,P.pingpongReverse],V=function(){function t(e,n,r){if(i(this,t),this.timelines=[],this.timelineIds=new x,!e)throw new Error("name cannot be null.");this.name=e,this.setTimelines(n),this.duration=r}return o(t,[{key:"setTimelines",value:function(t){if(!t)throw new Error("timelines cannot be null.");this.timelines=t,this.timelineIds.clear();for(var e=0;e0&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;le)return r-1;return n-1}},{key:"search",value:function(t,e,n){for(var r=t.length,a=n;ae)return a-n;return r-n}}]),t}(),lt=function(t){l(n,t);var e=d(n);function n(t,r,a){var s;return i(this,n),(s=e.call(this,t,a)).curves=R.newFloatArray(t+18*r),s.curves[t-1]=1,s}return o(n,[{key:"setLinear",value:function(t){this.curves[t]=0}},{key:"setStepped",value:function(t){this.curves[t]=1}},{key:"shrink",value:function(t){var e=this.getFrameCount()+18*t;if(this.curves.length>e){var n=R.newFloatArray(e);R.arrayCopy(this.curves,0,n,0,e),this.curves=n}}},{key:"setBezier",value:function(t,e,n,r,a,i,s,o,h,l,u){var c=this.curves,f=this.getFrameCount()+18*t;0==n&&(c[e]=2+f);for(var d=.03*(r-2*i+o),v=.03*(a-2*s+h),m=.006*(3*(i-o)-r+l),p=.006*(3*(s-h)-a+u),g=2*d+m,y=2*v+p,w=.3*(i-r)+d+.16666667*m,k=.3*(s-a)+v+.16666667*p,b=r+w,x=a+k,E=f+18;ft){var i=this.frames[e],s=this.frames[e+n];return s+(t-i)/(a[r]-i)*(a[r+1]-s)}var o=r+18;for(r+=2;r=t){var h=a[r-2],l=a[r-1];return l+(t-h)/(a[r]-h)*(a[r+1]-l)}e+=this.getFrameEntries();var u=a[o-2],c=a[o-1];return c+(t-u)/(this.frames[e]-u)*(this.frames[e+n]-c)}}]),n}(ht),ut=function(t){l(n,t);var e=d(n);function n(t,r,a){return i(this,n),e.call(this,t,r,[a])}return o(n,[{key:"getFrameEntries",value:function(){return 2}},{key:"setFrame",value:function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+1]=n}},{key:"getCurveValue",value:function(t){for(var e=this.frames,n=e.length-2,r=2;r<=n;r+=2)if(e[r]>t){n=r-2;break}var a=this.curves[n>>1];switch(a){case 0:var i=e[n],s=e[n+1];return s+(t-i)/(e[n+2]-i)*(e[n+2+1]-s);case 1:return e[n+1]}return this.getBezierValue(t,n,1,a-2)}}]),n}(lt),ct=function(t){l(n,t);var e=d(n);function n(t,r,a,s){return i(this,n),e.call(this,t,r,[a,s])}return o(n,[{key:"getFrameEntries",value:function(){return 3}},{key:"setFrame",value:function(t,e,n,r){t*=3,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=r}}]),n}(lt),ft=function(t){l(n,t);var e=d(n);function n(t,r,a){var s;return i(this,n),(s=e.call(this,t,r,U+"|"+a)).boneIndex=0,s.boneIndex=a,s}return o(n,[{key:"apply",value:function(t,e,n,r,a,i,s){var o=t.bones[this.boneIndex];if(o.active)if(n>2];switch(m){case 0:var p=h[v];c=h[v+1],f=h[v+2],d=h[v+3];var g=(n-p)/(h[v+4]-p);c+=(h[v+4+1]-c)*g,f+=(h[v+4+2]-f)*g,d+=(h[v+4+3]-d)*g;break;case 1:c=h[v+1],f=h[v+2],d=h[v+3];break;default:c=this.getBezierValue(n,v,1,m-2),f=this.getBezierValue(n,v,2,m+18-2),d=this.getBezierValue(n,v,3,m+36-2)}if(1==a)l.r=c,l.g=f,l.b=d;else{if(i==O.setup){var y=o.data.color;l.r=y.r,l.g=y.g,l.b=y.b}l.r+=(c-l.r)*a,l.g+=(f-l.g)*a,l.b+=(d-l.b)*a}}}}}]),n}(lt),It=function(t){l(n,t);var e=d(n);function n(t,r,a){var s;return i(this,n),(s=e.call(this,t,r,J+"|"+a)).slotIndex=0,s.slotIndex=a,s}return o(n,[{key:"apply",value:function(t,e,n,r,a,i,s){var o=t.slots[this.slotIndex];if(o.bone.active){var h=o.color;if(n>3];switch(b){case 0:var x=h[k];d=h[k+1],v=h[k+2],m=h[k+3],p=h[k+4],g=h[k+5],y=h[k+6],w=h[k+7];var E=(n-x)/(h[k+8]-x);d+=(h[k+8+1]-d)*E,v+=(h[k+8+2]-v)*E,m+=(h[k+8+3]-m)*E,p+=(h[k+8+4]-p)*E,g+=(h[k+8+5]-g)*E,y+=(h[k+8+6]-y)*E,w+=(h[k+8+7]-w)*E;break;case 1:d=h[k+1],v=h[k+2],m=h[k+3],p=h[k+4],g=h[k+5],y=h[k+6],w=h[k+7];break;default:d=this.getBezierValue(n,k,1,b-2),v=this.getBezierValue(n,k,2,b+18-2),m=this.getBezierValue(n,k,3,b+36-2),p=this.getBezierValue(n,k,4,b+54-2),g=this.getBezierValue(n,k,5,b+72-2),y=this.getBezierValue(n,k,6,b+90-2),w=this.getBezierValue(n,k,7,b+108-2)}if(1==a)l.set(d,v,m,p),u.r=g,u.g=y,u.b=w;else{if(i==O.setup){l.setFromColor(o.data.color);var I=o.data.darkColor;u.r=I.r,u.g=I.g,u.b=I.b}l.add((d-l.r)*a,(v-l.g)*a,(m-l.b)*a,(p-l.a)*a),u.r+=(g-u.r)*a,u.g+=(y-u.g)*a,u.b+=(w-u.b)*a}}}}}]),n}(lt),St=function(t){l(n,t);var e=d(n);function n(t,r,a){var s;return i(this,n),(s=e.call(this,t,r,[$+"|"+a,K+"|"+a])).slotIndex=0,s.slotIndex=a,s}return o(n,[{key:"getFrameEntries",value:function(){return 7}},{key:"setFrame",value:function(t,e,n,r,a,i,s,o){t*=7,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=r,this.frames[t+3]=a,this.frames[t+4]=i,this.frames[t+5]=s,this.frames[t+6]=o}},{key:"apply",value:function(t,e,n,r,a,i,s){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames,l=o.color,u=o.darkColor;if(nt){var i=this.frames[e];return n[r+1]*(t-i)/(n[r]-i)}var s=r+18;for(r+=2;r=t){var o=n[r-2],h=n[r-1];return h+(t-o)/(n[r]-o)*(n[r+1]-h)}var l=n[s-2],u=n[s-1];return u+(1-u)*(t-l)/(this.frames[e+this.getFrameEntries()]-l)}},{key:"apply",value:function(t,e,n,r,a,i,s){var o=t.slots[this.slotIndex];if(o.bone.active){var h=o.getAttachment();if(h&&h instanceof N&&h.timelineAttachment==this.attachment){var l=o.deform;0==l.length&&(i=O.setup);var u=this.vertices,c=u[0].length,f=this.frames;if(n=f[f.length-1]){var p=u[f.length-1];if(1==a)if(i==O.add){var g=h;if(g.bones)for(var y=0;yn)this.apply(t,e,Number.MAX_VALUE,r,a,i,s),e=-1;else if(e>=o[h-1])return;if(!(n0&&o[l-1]==u;)l--;for(;l=o[l];l++)r.push(this.events[l])}}}}]),n}(ht);Ct.propertyIds=[""+tt];var Mt=function(t){l(n,t);var e=d(n);function n(t){var r;return i(this,n),(r=e.call(this,t,n.propertyIds)).drawOrders=new Array(t),r}return o(n,[{key:"getFrameCount",value:function(){return this.frames.length}},{key:"setFrame",value:function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n}},{key:"apply",value:function(t,e,n,r,a,i,s){if(s!=B.mixOut)if(n>2];switch(d){case 0:var v=h[f];l=h[f+1],u=h[f+2],c=h[f+3];var m=(n-v)/(h[f+4]-v);l+=(h[f+4+1]-l)*m,u+=(h[f+4+2]-u)*m,c+=(h[f+4+3]-c)*m;break;case 1:l=h[f+1],u=h[f+2],c=h[f+3];break;default:l=this.getBezierValue(n,f,1,d-2),u=this.getBezierValue(n,f,2,d+18-2),c=this.getBezierValue(n,f,3,d+36-2)}if(i==O.setup){var p=o.data;o.mixRotate=p.mixRotate+(l-p.mixRotate)*a,o.mixX=p.mixX+(u-p.mixX)*a,o.mixY=p.mixY+(c-p.mixY)*a}else o.mixRotate+=(l-o.mixRotate)*a,o.mixX+=(u-o.mixX)*a,o.mixY+=(c-o.mixY)*a}}}}]),n}(lt),Pt=function(t){l(n,t);var e=d(n);function n(t,r,a){var s;return i(this,n),(s=e.call(this,t,[ot+"|"+r+"|"+a.sequence.id])).slotIndex=r,s.attachment=a,s}return o(n,[{key:"getFrameEntries",value:function(){return n.ENTRIES}},{key:"getSlotIndex",value:function(){return this.slotIndex}},{key:"getAttachment",value:function(){return this.attachment}},{key:"setFrame",value:function(t,e,r,a,i){var s=this.frames;s[t*=n.ENTRIES]=e,s[t+n.MODE]=r|a<<4,s[t+n.DELAY]=i}},{key:"apply",value:function(t,e,r,a,i,s,o){var h=t.slots[this.slotIndex];if(h.bone.active){var l=h.attachment,u=this.attachment;if(l==u||l instanceof N&&l.timelineAttachment==u){var c=this.frames;if(r>4,g=this.attachment.sequence.regions.length,y=D[15&v];if(y!=P.hold)switch(p+=(r-d)/m+1e-5|0,y){case P.once:p=Math.min(g-1,p);break;case P.loop:p%=g;break;case P.pingpong:var w=(g<<1)-2;(p=0==w?0:p%w)>=g&&(p=w-p);break;case P.onceReverse:p=Math.max(g-1-p,0);break;case P.loopReverse:p=g-1-p%g;break;case P.pingpongReverse:var k=(g<<1)-2;(p=0==k?0:(p+g-1)%k)>=g&&(p=k-p)}h.sequenceIndex=p}}}}}}]),n}(ht);Pt.ENTRIES=3,Pt.MODE=1,Pt.DELAY=2;var _t=function(){function t(e){i(this,t),this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Dt(this),this.propertyIDs=new x,this.animationsChanged=!1,this.trackEntryPool=new M((function(){return new Bt})),this.data=e}return o(t,[{key:"update",value:function(t){t*=this.timeScale;for(var e=this.tracks,n=0,r=e.length;n0){if(a.delay-=i,a.delay>0)continue;i=-a.delay,a.delay=0}var s=a.next;if(s){var o=a.trackLast-s.delay;if(o>=0){for(s.delay=0,s.trackTime+=0==a.timeScale?0:(o/a.timeScale+t)*s.timeScale,a.trackTime+=i,this.setCurrent(n,s,!0);s.mixingFrom;)s.mixTime+=t,s=s.mixingFrom;continue}}else if(a.trackLast>=a.trackEnd&&!a.mixingFrom){e[n]=null,this.queue.end(a),this.clearNext(a);continue}if(a.mixingFrom&&this.updateMixingFrom(a,t)){var h=a.mixingFrom;for(a.mixingFrom=null,h&&(h.mixingTo=null);h;)this.queue.end(h),h=h.mixingFrom}a.trackTime+=i}}this.queue.drain()}},{key:"updateMixingFrom",value:function(t,e){var n=t.mixingFrom;if(!n)return!0;var r=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),r):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)}},{key:"apply",value:function(t){if(!t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,n=this.tracks,r=!1,a=0,i=n.length;a0)){r=!0;var o=0==a?O.first:s.mixBlend,h=s.alpha;s.mixingFrom?h*=this.applyMixingFrom(s,t,o):s.trackTime>=s.trackEnd&&!s.next&&(h=0);var l=s.animationLast,u=s.getAnimationTime(),c=u,f=e;s.reverse&&(c=s.animation.duration-c,f=null);var d=s.animation.timelines,v=d.length;if(0==a&&1==h||o==O.add)for(var m=0;m1&&(a=1),n!=O.first&&(n=r.mixBlend));var i=a0&&this.queueEvents(r,f),this.events.length=0,r.nextAnimationLast=f,r.nextTrackLast=r.trackTime,a}},{key:"applyAttachmentTimeline",value:function(t,e,n,r,a){var i=e.slots[t.slotIndex];i.bone.active&&(n0,p=d>=0;I.signum(v)!=I.signum(f)&&Math.abs(v)<=90&&(Math.abs(d)>180&&(d+=360*I.signum(d)),p=m),c=f+d-d%360,p!=m&&(c+=360*I.signum(d)),i[s]=c}i[s+1]=f,h.rotation=l+c*r}}else t.apply(e,0,n,null,1,a,B.mixIn)}},{key:"queueEvents",value:function(t,e){for(var n=t.animationStart,r=t.animationEnd,a=r-n,i=t.trackLast%a,s=this.events,o=0,h=s.length;or||this.queue.event(t,l)}for((t.loop?0==a||i>t.trackTime%a:e>=r&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(e){this.queue.end(e),this.clearNext(e);for(var n=e;;){var r=n.mixingFrom;if(!r)break;this.queue.end(r),n.mixingFrom=null,n.mixingTo=null,n=r}this.tracks[e.trackIndex]=null,this.queue.drain()}}}},{key:"setCurrent",value:function(t,e,n){var r=this.expandToIndex(t);this.tracks[t]=e,e.previous=null,r&&(n&&this.queue.interrupt(r),e.mixingFrom=r,r.mixingTo=e,e.mixTime=0,r.mixingFrom&&r.mixDuration>0&&(e.interruptAlpha*=Math.min(1,r.mixTime/r.mixDuration)),r.timelinesRotation.length=0),this.queue.start(e)}},{key:"setAnimation",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.data.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,r,n)}},{key:"setAnimationWith",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)throw new Error("animation cannot be null.");var r=!0,a=this.expandToIndex(t);a&&(-1==a.nextTrackLast?(this.tracks[t]=a.mixingFrom,this.queue.interrupt(a),this.queue.end(a),this.clearNext(a),a=a.mixingFrom,r=!1):this.clearNext(a));var i=this.trackEntry(t,e,n,a);return this.setCurrent(t,i,r),this.queue.drain(),i}},{key:"addAnimation",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=this.data.skeletonData.findAnimation(e);if(!a)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,a,n,r)}},{key:"addAnimationWith",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(!e)throw new Error("animation cannot be null.");var a=this.expandToIndex(t);if(a)for(;a.next;)a=a.next;var i=this.trackEntry(t,e,n,a);return a?(a.next=i,i.previous=a,r<=0&&(r+=a.getTrackComplete()-i.mixDuration)):(this.setCurrent(t,i,!0),this.queue.drain()),i.delay=r,i}},{key:"setEmptyAnimation",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.setAnimationWith(e,t.emptyAnimation(),!1);return r.mixDuration=n,r.trackEnd=n,r}},{key:"addEmptyAnimation",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=this.addAnimationWith(e,t.emptyAnimation(),!1,r);return r<=0&&(a.delay+=a.mixDuration-n),a.mixDuration=n,a.trackEnd=n,a}},{key:"setEmptyAnimations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,r=this.tracks.length;n0){a[h]=Ht,i[h]=c;continue t}break}a[h]=zt}else a[h]=Wt}}},{key:"getCurrent",value:function(t){return t>=this.tracks.length?null:this.tracks[t]}},{key:"addListener",value:function(t){if(!t)throw new Error("listener cannot be null.");this.listeners.push(t)}},{key:"removeListener",value:function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)}},{key:"clearListeners",value:function(){this.listeners.length=0}},{key:"clearListenerNotifications",value:function(){this.queue.clear()}}],[{key:"emptyAnimation",value:function(){return t._emptyAnimation}}]),t}();_t._emptyAnimation=new V("",[],0);var Ot,Bt=function(){function t(){i(this,t),this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=O.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return o(t,[{key:"reset",value:function(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}},{key:"getAnimationTime",value:function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}},{key:"setAnimationLast",value:function(t){this.animationLast=t,this.nextAnimationLast=t}},{key:"isComplete",value:function(){return this.trackTime>=this.animationEnd-this.animationStart}},{key:"resetRotationDirections",value:function(){this.timelinesRotation.length=0}},{key:"getTrackComplete",value:function(){var t=this.animationEnd-this.animationStart;if(0!=t){if(this.loop)return t*(1+(this.trackTime/t|0));if(this.trackTime0&&u&&u.length>0&&(c.names=l,c.values=u,l=null,u=null),c.u=c.x/h.width,c.v=c.y/h.height,90==c.degrees?(c.u2=(c.x+c.height)/h.width,c.v2=(c.y+c.width)/h.height):(c.u2=(c.x+c.width)/h.width,c.v2=(c.y+c.height)/h.height),this.regions.push(c)}else{for(h=new ie(o.trim());0!=n.readEntry(r,o=n.readLine());){var p=a[r[0]];p&&p(h)}this.pages.push(h)}}return o(t,[{key:"findRegion",value:function(t){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:"",r=w(this.pages);try{for(r.s();!(e=r.n()).done;){var a=e.value;a.setTexture(t.get(n+a.name))}}catch(t){r.e(t)}finally{r.f()}}},{key:"dispose",value:function(){for(var t,e=0;e=this.lines.length?null:this.lines[this.index++]}},{key:"readEntry",value:function(t,e){if(!e)return 0;if(0==(e=e.trim()).length)return 0;var n=e.indexOf(":");if(-1==n)return 0;t[0]=e.substr(0,n).trim();for(var r=1,a=n+1;;r++){var i=e.indexOf(",",a);if(-1==i)return t[r]=e.substr(a).trim(),r;if(t[r]=e.substr(a,i-a).trim(),a=i+1,4==r)return 4}}}]),t}(),ie=function(){function t(e){i(this,t),this.minFilter=Vt.Nearest,this.magFilter=Vt.Nearest,this.uWrap=Ut.ClampToEdge,this.vWrap=Ut.ClampToEdge,this.texture=null,this.width=0,this.height=0,this.pma=!1,this.regions=new Array,this.name=e}return o(t,[{key:"setTexture",value:function(t){this.texture=t,t.setFilters(this.minFilter,this.magFilter),t.setWraps(this.uWrap,this.vWrap);var e,n=w(this.regions);try{for(n.s();!(e=n.n()).done;){e.value.texture=t}}catch(t){n.e(t)}finally{n.f()}}}]),t}(),se=function(t){l(n,t);var e=d(n);function n(t,r){var a;return i(this,n),(a=e.call(this)).x=0,a.y=0,a.offsetX=0,a.offsetY=0,a.originalWidth=0,a.originalHeight=0,a.index=0,a.degrees=0,a.names=null,a.values=null,a.page=t,a.name=r,t.regions.push(f(a)),a}return o(n)}(ee),oe=function(t){l(n,t);var e=d(n);function n(t,r){var a;return i(this,n),(a=e.call(this,t)).region=null,a.regionUVs=[],a.uvs=[],a.triangles=[],a.color=new E(1,1,1,1),a.width=0,a.height=0,a.hullLength=0,a.edges=[],a.parentMesh=null,a.sequence=null,a.tempColor=new E(0,0,0,0),a.path=r,a}return o(n,[{key:"updateRegion",value:function(){if(!this.region)throw new Error("Region not set.");var t=this.regionUVs;this.uvs&&this.uvs.length==t.length||(this.uvs=R.newFloatArray(t.length));var e=this.uvs,n=this.uvs.length,r=this.region.u,a=this.region.v,i=0,s=0;if(this.region instanceof se){var o=this.region,h=o.page.texture.getImage(),l=h.width,u=h.height;switch(o.degrees){case 90:r-=(o.originalHeight-o.offsetY-o.height)/l,a-=(o.originalWidth-o.offsetX-o.width)/u,i=o.originalHeight/l,s=o.originalWidth/u;for(var c=0;c= 0.");if(!n)throw new Error("name cannot be null.");this.index=e,this.name=n,this.parent=r}));!function(t){t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection"}(ce||(ce={}));var ve,me,pe,ge=function(){function t(e,n,r){if(i(this,t),this.parent=null,this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,!e)throw new Error("data cannot be null.");if(!n)throw new Error("skeleton cannot be null.");this.data=e,this.skeleton=n,this.parent=r,this.setToSetupPose()}return o(t,[{key:"isActive",value:function(){return this.active}},{key:"update",value:function(){this.updateWorldTransformWith(this.ax,this.ay,this.arotation,this.ascaleX,this.ascaleY,this.ashearX,this.ashearY)}},{key:"updateWorldTransform",value:function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)}},{key:"updateWorldTransformWith",value:function(t,e,n,r,a,i,s){this.ax=t,this.ay=e,this.arotation=n,this.ascaleX=r,this.ascaleY=a,this.ashearX=i,this.ashearY=s;var o=this.parent;if(!o){var h=this.skeleton,l=n+90+s,u=h.scaleX,c=h.scaleY;return this.a=I.cosDeg(n+i)*r*u,this.b=I.cosDeg(l)*a*u,this.c=I.sinDeg(n+i)*r*c,this.d=I.sinDeg(l)*a*c,this.worldX=t*u+h.x,void(this.worldY=e*c+h.y)}var f=o.a,d=o.b,v=o.c,m=o.d;switch(this.worldX=f*t+d*e+o.worldX,this.worldY=v*t+m*e+o.worldY,this.data.transformMode){case ce.Normal:var p=n+90+s,g=I.cosDeg(n+i)*r,y=I.cosDeg(p)*a,w=I.sinDeg(n+i)*r,k=I.sinDeg(p)*a;return this.a=f*g+d*w,this.b=f*y+d*k,this.c=v*g+m*w,void(this.d=v*y+m*k);case ce.OnlyTranslation:var b=n+90+s;this.a=I.cosDeg(n+i)*r,this.b=I.cosDeg(b)*a,this.c=I.sinDeg(n+i)*r,this.d=I.sinDeg(b)*a;break;case ce.NoRotationOrReflection:var x=f*f+v*v,E=0;x>1e-4?(x=Math.abs(f*m-d*v)/x,f/=this.skeleton.scaleX,d=(v/=this.skeleton.scaleY)*x,m=f*x,E=Math.atan2(v,f)*I.radDeg):(f=0,v=0,E=90-Math.atan2(m,d)*I.radDeg);var A=n+i-E,S=n+s-E+90,T=I.cosDeg(A)*r,R=I.cosDeg(S)*a,C=I.sinDeg(A)*r,M=I.sinDeg(S)*a;this.a=f*T-d*C,this.b=f*R-d*M,this.c=v*T+m*C,this.d=v*R+m*M;break;case ce.NoScale:case ce.NoScaleOrReflection:var F=I.cosDeg(n),Y=I.sinDeg(n),L=(f*F+d*Y)/this.skeleton.scaleX,X=(v*F+m*Y)/this.skeleton.scaleY,N=Math.sqrt(L*L+X*X);N>1e-5&&(N=1/N),L*=N,X*=N,N=Math.sqrt(L*L+X*X),this.data.transformMode==ce.NoScale&&f*m-d*v<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(N=-N);var P=Math.PI/2+Math.atan2(X,L),_=Math.cos(P)*N,O=Math.sin(P)*N,B=I.cosDeg(i)*r,D=I.cosDeg(90+s)*a,V=I.sinDeg(i)*r,U=I.sinDeg(90+s)*a;this.a=L*B+_*V,this.b=L*D+_*U,this.c=X*B+O*V,this.d=X*D+O*U}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY}},{key:"setToSetupPose",value:function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY}},{key:"getWorldRotationX",value:function(){return Math.atan2(this.c,this.a)*I.radDeg}},{key:"getWorldRotationY",value:function(){return Math.atan2(this.d,this.b)*I.radDeg}},{key:"getWorldScaleX",value:function(){return Math.sqrt(this.a*this.a+this.c*this.c)}},{key:"getWorldScaleY",value:function(){return Math.sqrt(this.b*this.b+this.d*this.d)}},{key:"updateAppliedTransform",value:function(){var t=this.parent;if(!t)return this.ax=this.worldX-this.skeleton.x,this.ay=this.worldY-this.skeleton.y,this.arotation=Math.atan2(this.c,this.a)*I.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*I.radDeg);var e=t.a,n=t.b,r=t.c,a=t.d,i=1/(e*a-n*r),s=this.worldX-t.worldX,o=this.worldY-t.worldY;this.ax=s*a*i-o*n*i,this.ay=o*e*i-s*r*i;var h=i*a,l=i*e,u=i*n,c=i*r,f=h*this.a-u*this.c,d=h*this.b-u*this.d,v=l*this.c-c*this.a,m=l*this.d-c*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+v*v),this.ascaleX>1e-4){var p=f*m-d*v;this.ascaleY=p/this.ascaleX,this.ashearY=Math.atan2(f*d+v*m,p)*I.radDeg,this.arotation=Math.atan2(v,f)*I.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(d*d+m*m),this.ashearY=0,this.arotation=90-Math.atan2(m,d)*I.radDeg}},{key:"worldToLocal",value:function(t){var e=1/(this.a*this.d-this.b*this.c),n=t.x-this.worldX,r=t.y-this.worldY;return t.x=n*this.d*e-r*this.b*e,t.y=r*this.a*e-n*this.c*e,t}},{key:"localToWorld",value:function(t){var e=t.x,n=t.y;return t.x=e*this.a+n*this.b+this.worldX,t.y=e*this.c+n*this.d+this.worldY,t}},{key:"worldToLocalRotation",value:function(t){var e=I.sinDeg(t),n=I.cosDeg(t);return Math.atan2(this.a*e-this.c*n,this.d*n-this.b*e)*I.radDeg+this.rotation-this.shearX}},{key:"localToWorldRotation",value:function(t){t-=this.rotation-this.shearX;var e=I.sinDeg(t),n=I.cosDeg(t);return Math.atan2(n*this.c+e*this.d,n*this.a+e*this.b)*I.radDeg}},{key:"rotateWorld",value:function(t){var e=this.a,n=this.b,r=this.c,a=this.d,i=I.cosDeg(t),s=I.sinDeg(t);this.a=i*e-s*r,this.b=i*n-s*a,this.c=s*e+i*r,this.d=s*n+i*a}}]),t}(),ye=o((function t(e,n,r){i(this,t),this.name=e,this.order=n,this.skinRequired=r})),we=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new ke;i(this,t),this.pathPrefix="",this.assets={},this.errors={},this.toLoad=0,this.loaded=0,this.textureLoader=e,this.pathPrefix=n,this.downloader=r}return o(t,[{key:"start",value:function(t){return this.toLoad++,this.pathPrefix+t}},{key:"success",value:function(t,e,n){this.toLoad--,this.loaded++,this.assets[e]=n,t&&t(e,n)}},{key:"error",value:function(t,e,n){this.toLoad--,this.loaded++,this.errors[e]=n,t&&t(e,n)}},{key:"loadAll",value:function(){var t=this;return new Promise((function(e,n){requestAnimationFrame((function r(){t.isLoadingComplete()?t.hasErrors()?n(t.errors):e(t):requestAnimationFrame(r)}))}))}},{key:"setRawDataURI",value:function(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}},{key:"loadBinary",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};t=this.start(t),this.downloader.downloadBinary(t,(function(r){e.success(n,t,r)}),(function(n,a){e.error(r,t,"Couldn't load binary ".concat(t,": status ").concat(n,", ").concat(a))}))}},{key:"loadText",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};t=this.start(t),this.downloader.downloadText(t,(function(r){e.success(n,t,r)}),(function(n,a){e.error(r,t,"Couldn't load text ".concat(t,": status ").concat(n,", ").concat(a))}))}},{key:"loadJson",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};t=this.start(t),this.downloader.downloadJson(t,(function(r){e.success(n,t,r)}),(function(n,a){e.error(r,t,"Couldn't load JSON ".concat(t,": status ").concat(n,", ").concat(a))}))}},{key:"loadTexture",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(t=this.start(t),!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document))fetch(t,{mode:"cors"}).then((function(n){return n.ok?n.blob():(e.error(r,t,"Couldn't load image: ".concat(t)),null)})).then((function(t){return t?createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null})).then((function(r){r&&e.success(n,t,e.textureLoader(r))}));else{var a=new Image;a.crossOrigin="anonymous",a.onload=function(){e.success(n,t,e.textureLoader(a))},a.onerror=function(){e.error(r,t,"Couldn't load image: ".concat(t))},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),a.src=t}}},{key:"loadTextureAtlas",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},a=arguments.length>3?arguments[3]:void 0,i=t.lastIndexOf("/"),s=i>=0?t.substring(0,i+1):"";t=this.start(t),this.downloader.downloadText(t,(function(i){try{var o,h=new re(i),l=h.pages.length,u=!1,c=w(h.pages);try{var f=function(){var i=o.value;e.loadTexture(a?a[i.name]:s+i.name,(function(r,a){u||(i.setTexture(a),0==--l&&e.success(n,t,h))}),(function(n,a){u||e.error(r,t,"Couldn't load texture atlas ".concat(t," page image: ").concat(n)),u=!0}))};for(c.s();!(o=c.n()).done;)f()}catch(t){c.e(t)}finally{c.f()}}catch(n){e.error(r,t,"Couldn't parse texture atlas ".concat(t,": ").concat(n.message))}}),(function(n,a){e.error(r,t,"Couldn't load texture atlas ".concat(t,": status ").concat(n,", ").concat(a))}))}},{key:"get",value:function(t){return this.assets[this.pathPrefix+t]}},{key:"require",value:function(t){t=this.pathPrefix+t;var e=this.assets[t];if(e)return e;var n=this.errors[t];throw Error("Asset not found: "+t+(n?"\n"+n:""))}},{key:"remove",value:function(t){t=this.pathPrefix+t;var e=this.assets[t];return e.dispose&&e.dispose(),delete this.assets[t],e}},{key:"removeAll",value:function(){for(var t in this.assets){var e=this.assets[t];e.dispose&&e.dispose()}this.assets={}}},{key:"isLoadingComplete",value:function(){return 0==this.toLoad}},{key:"getToLoad",value:function(){return this.toLoad}},{key:"getLoaded",value:function(){return this.loaded}},{key:"dispose",value:function(){this.removeAll()}},{key:"hasErrors",value:function(){return Object.keys(this.errors).length>0}},{key:"getErrors",value:function(){return this.errors}}]),t}(),ke=function(){function t(){i(this,t),this.callbacks={},this.rawDataUris={}}return o(t,[{key:"dataUriToString",value:function(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");var e=t.indexOf("base64,");return-1!=e?(e+=7,atob(t.substr(e))):t.substr(t.indexOf(",")+1)}},{key:"base64ToUint8Array",value:function(t){for(var e=window.atob(t),n=e.length,r=new Uint8Array(n),a=0;a180?f-=360:f<-180&&(f+=360);var b=t.ascaleX,x=t.ascaleY;if(r||a){switch(t.data.transformMode){case ce.NoScale:case ce.NoScaleOrReflection:d=e-t.worldX,v=n-t.worldY}var E=t.data.length*b,A=Math.sqrt(d*d+v*v);if(r&&AE&&E>1e-4){var S=(A/E-1)*s+1;b*=S,i&&(x*=S)}}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+f*s,b,x,t.ashearX,t.ashearY)}},{key:"apply2",value:function(t,e,n,r,a,i,s,o,h){var l=t.ax,u=t.ay,c=t.ascaleX,f=t.ascaleY,d=c,v=f,m=e.ascaleX,p=0,g=0,y=0;c<0?(c=-c,p=180,y=-1):(p=0,y=1),f<0&&(f=-f,y=-y),m<0?(m=-m,g=180):g=0;var w=e.ax,k=0,b=0,x=0,E=t.a,A=t.b,S=t.c,T=t.d,R=Math.abs(c-f)<=1e-4;!R||i?(k=0,b=E*w+t.worldX,x=S*w+t.worldY):(b=E*w+A*(k=e.ay)+t.worldX,x=S*w+T*k+t.worldY);var C=t.parent;if(!C)throw new Error("IK parent must itself have a parent.");E=C.a,A=C.b,S=C.c;var M,F,Y=E*(T=C.d)-A*S,L=b-C.worldX,X=x-C.worldY,N=(L*T-X*A)*(Y=Math.abs(Y)<=1e-4?0:1/Y)-l,P=(X*E-L*S)*Y-u,_=Math.sqrt(N*N+P*P),O=e.data.length*m;if(_<1e-4)return this.apply1(t,n,r,!1,i,!1,h),void e.updateWorldTransformWith(w,k,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);var B=((L=n-C.worldX)*T-(X=r-C.worldY)*A)*Y-l,D=(X*E-L*S)*Y-u,V=B*B+D*D;if(0!=o){o*=c*(m+1)*.5;var U=Math.sqrt(V),q=U-_-O*c+o;if(q>0){var W=Math.min(1,q/(2*o))-1;V=(B-=(W=(q-o*(1-W*W))/U)*B)*B+(D-=W*D)*D}}t:if(R){var j=(V-_*_-(O*=c)*O)/(2*_*O);j<-1?(j=-1,F=Math.PI*a):j>1?(j=1,F=0,i&&(d*=E=(Math.sqrt(V)/(_+O)-1)*h+1,s&&(v*=E))):F=Math.acos(j)*a,E=_+O*j,A=O*Math.sin(F),M=Math.atan2(D*E-B*A,B*E+D*A)}else{var G=(E=c*O)*E,z=(A=f*O)*A,H=Math.atan2(D,B),$=-2*z*_,J=z-G;if((T=$*$-4*J*(S=z*_*_+G*V-G*z))>=0){var K=Math.sqrt(T);$<0&&(K=-K);var Q=(K=.5*-($+K))/J,Z=S/K,tt=Math.abs(Q)=-1&&S<=1&&(S=Math.acos(S),(T=(L=E*Math.cos(S)+_)*L+(X=A*Math.sin(S))*X)ot&&(it=S,ot=T,st=L,ht=X)),V<=.5*(rt+ot)?(M=H-Math.atan2(at*a,nt),F=et*a):(M=H-Math.atan2(ht*a,st),F=it*a)}var lt=Math.atan2(k,w)*y,ut=t.arotation;(M=(M-lt)*I.radDeg+p-ut)>180?M-=360:M<-180&&(M+=360),t.updateWorldTransformWith(l,u,ut+M*h,d,v,0,0),ut=e.arotation,(F=((F+lt)*I.radDeg-e.ashearX)*y+g-ut)>180?F-=360:F<-180&&(F+=360),e.updateWorldTransformWith(w,k,ut+F*h,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}}]),t}(),Ie=function(t){l(n,t);var e=d(n);function n(t){var r;return i(this,n),(r=e.call(this,t,0,!1)).bones=new Array,r._target=null,r.bendDirection=1,r.compress=!1,r.stretch=!1,r.uniform=!1,r.mix=1,r.softness=0,r}return o(n,[{key:"target",get:function(){if(this._target)return this._target;throw new Error("BoneData not set.")},set:function(t){this._target=t}}]),n}(ye),Ae=function(t){l(n,t);var e=d(n);function n(t){var r;return i(this,n),(r=e.call(this,t,0,!1)).bones=new Array,r._target=null,r.positionMode=ve.Fixed,r.spacingMode=me.Fixed,r.rotateMode=pe.Chain,r.offsetRotation=0,r.position=0,r.spacing=0,r.mixRotate=0,r.mixX=0,r.mixY=0,r}return o(n,[{key:"target",get:function(){if(this._target)return this._target;throw new Error("SlotData not set.")},set:function(t){this._target=t}}]),n}(ye);!function(t){t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent"}(ve||(ve={})),function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent",t[t.Proportional=3]="Proportional"}(me||(me={})),function(t){t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale"}(pe||(pe={}));var Se=function(){function t(e,n){if(i(this,t),this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!e)throw new Error("data cannot be null.");if(!n)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(var r=0,a=e.bones.length;r0){k=u/k*d;for(var M=1;M0?I.degRad:-I.degRad}for(var j=0,G=3;j0){var tt=z.a,et=z.b,nt=z.c,rt=z.d,at=0,it=0,st=0;if(at=s?B[G-1]:0==c[j+1]?B[G+2]:Math.atan2(K,J),at-=Math.atan2(nt,tt),q){it=Math.cos(at),st=Math.sin(at);var ot=z.data.length;D+=(ot*(it*tt-st*nt)-J)*n,V+=(ot*(st*tt+it*nt)-K)*n}else at+=U;at>I.PI?at-=I.PI2:at<-I.PI&&(at+=I.PI2),at*=n,it=Math.cos(at),st=Math.sin(at),z.a=it*tt-st*nt,z.b=it*et-st*rt,z.c=st*tt+it*nt,z.d=st*et+it*rt}z.updateAppliedTransform()}}}}},{key:"computeWorldPositions",value:function(e,n,r){var a=this.target,i=this.position,s=this.spaces,o=R.setArraySize(this.positions,3*n+2),h=this.world,l=e.closed,u=e.worldVerticesLength,c=u/6,f=t.NONE;if(!e.constantSpeed){var d,v=e.lengths,m=v[c-=l?1:2];switch(this.data.positionMode==ve.Percent&&(i*=m),this.data.spacingMode){case me.Percent:d=m;break;case me.Proportional:d=m/n;break;default:d=1}h=R.setArraySize(this.world,8);for(var p=0,g=0,y=0;pm){f!=t.AFTER&&(f=t.AFTER,e.computeWorldVertices(a,u-6,4,h,0,2)),this.addAfterPosition(k-m,h,0,o,g);continue}}for(;;y++){var b=v[y];if(!(k>b)){if(0==y)k/=b;else{var x=v[y-1];k=(k-x)/(b-x)}break}}y!=f&&(f=y,l&&y==c?(e.computeWorldVertices(a,u-4,4,h,0,2),e.computeWorldVertices(a,0,4,h,4,2)):e.computeWorldVertices(a,6*y+2,8,h,0,2)),this.addCurvePosition(k,h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],o,g,r||p>0&&0==w)}return o}l?(u+=2,h=R.setArraySize(this.world,u),e.computeWorldVertices(a,2,u-4,h,0,2),e.computeWorldVertices(a,0,2,h,u-4,2),h[u-2]=h[0],h[u-1]=h[1]):(c--,u-=4,h=R.setArraySize(this.world,u),e.computeWorldVertices(a,2,u,h,0,2));for(var E,I=R.setArraySize(this.curves,c),A=0,S=h[0],T=h[1],C=0,M=0,F=0,Y=0,L=0,X=0,N=0,P=0,_=0,O=0,B=0,D=0,V=0,U=0,q=0,W=2;qA){this.addAfterPosition(Q-A,h,u-4,o,H);continue}}for(;;$++){var Z=I[$];if(!(Q>Z)){if(0==$)Q/=Z;else{var tt=I[$-1];Q=(Q-tt)/(Z-tt)}break}}if($!=f){f=$;var et=6*$;for(S=h[et],T=h[et+1],C=h[et+2],M=h[et+3],F=h[et+4],Y=h[et+5],B=2*(N=.03*(S-2*C+F))+(_=.006*(3*(C-F)-S+(L=h[et+6]))),D=2*(P=.03*(T-2*M+Y))+(O=.006*(3*(M-Y)-T+(X=h[et+7]))),V=.3*(C-S)+N+.16666667*_,U=.3*(M-T)+P+.16666667*O,G=Math.sqrt(V*V+U*U),j[0]=G,et=1;et<8;et++)V+=B,U+=D,B+=_,D+=O,G+=Math.sqrt(V*V+U*U),j[et]=G;V+=B,U+=D,G+=Math.sqrt(V*V+U*U),j[8]=G,V+=B+_,U+=D+O,G+=Math.sqrt(V*V+U*U),j[9]=G,J=0}for(Q*=G;;J++){var nt=j[J];if(!(Q>nt)){if(0==J)Q/=nt;else{var rt=j[J-1];Q=J+(Q-rt)/(nt-rt)}break}}this.addCurvePosition(.1*Q,S,T,C,M,F,Y,L,X,o,H,r||z>0&&0==K)}return o}},{key:"addBeforePosition",value:function(t,e,n,r,a){var i=e[n],s=e[n+1],o=e[n+2]-i,h=e[n+3]-s,l=Math.atan2(h,o);r[a]=i+t*Math.cos(l),r[a+1]=s+t*Math.sin(l),r[a+2]=l}},{key:"addAfterPosition",value:function(t,e,n,r,a){var i=e[n+2],s=e[n+3],o=i-e[n],h=s-e[n+1],l=Math.atan2(h,o);r[a]=i+t*Math.cos(l),r[a+1]=s+t*Math.sin(l),r[a+2]=l}},{key:"addCurvePosition",value:function(t,e,n,r,a,i,s,o,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=n,void(l[u+2]=Math.atan2(a-n,r-e));var f=t*t,d=f*t,v=1-t,m=v*v,p=m*v,g=v*t,y=3*g,w=v*y,k=y*t,b=e*p+r*w+i*k+o*d,x=n*p+a*w+s*k+h*d;l[u]=b,l[u+1]=x,c&&(l[u+2]=t<.001?Math.atan2(a-n,r-e):Math.atan2(x-(n*m+a*g*2+s*f),b-(e*m+r*g*2+i*f)))}}]),t}();Se.NONE=-1,Se.BEFORE=-2,Se.AFTER=-3,Se.epsilon=1e-5;var Te=function(){function t(e,n){if(i(this,t),this.darkColor=null,this.attachment=null,this.attachmentState=0,this.sequenceIndex=-1,this.deform=new Array,!e)throw new Error("data cannot be null.");if(!n)throw new Error("bone cannot be null.");this.data=e,this.bone=n,this.color=new E,this.darkColor=e.darkColor?new E:null,this.setToSetupPose()}return o(t,[{key:"getSkeleton",value:function(){return this.bone.skeleton}},{key:"getAttachment",value:function(){return this.attachment}},{key:"setAttachment",value:function(t){this.attachment!=t&&(t instanceof N&&this.attachment instanceof N&&t.timelineAttachment==this.attachment.timelineAttachment||(this.deform.length=0),this.attachment=t,this.sequenceIndex=-1)}},{key:"setToSetupPose",value:function(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}}]),t}(),Re=function(){function t(e,n){if(i(this,t),this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new F,this.active=!1,!e)throw new Error("data cannot be null.");if(!n)throw new Error("skeleton cannot be null.");this.data=e,this.mixRotate=e.mixRotate,this.mixX=e.mixX,this.mixY=e.mixY,this.mixScaleX=e.mixScaleX,this.mixScaleY=e.mixScaleY,this.mixShearY=e.mixShearY,this.bones=new Array;for(var r=0;r0?I.degRad:-I.degRad,d=this.data.offsetRotation*f,v=this.data.offsetShearY*f,m=this.bones,p=0,g=m.length;pI.PI?E-=I.PI2:E<-I.PI&&(E+=I.PI2),E*=t;var A=Math.cos(E),S=Math.sin(E);y.a=A*w-S*b,y.b=A*k-S*x,y.c=S*w+A*b,y.d=S*k+A*x}if(s){var T=this.temp;o.localToWorld(T.set(this.data.offsetX,this.data.offsetY)),y.worldX+=(T.x-y.worldX)*e,y.worldY+=(T.y-y.worldY)*n}if(0!=r){var R=Math.sqrt(y.a*y.a+y.c*y.c);0!=R&&(R=(R+(Math.sqrt(h*h+u*u)-R+this.data.offsetScaleX)*r)/R),y.a*=R,y.c*=R}if(0!=a){var C=Math.sqrt(y.b*y.b+y.d*y.d);0!=C&&(C=(C+(Math.sqrt(l*l+c*c)-C+this.data.offsetScaleY)*a)/C),y.b*=C,y.d*=C}if(i>0){var M=y.b,F=y.d,Y=Math.atan2(F,M),L=Math.atan2(c,l)-Math.atan2(u,h)-(Y-Math.atan2(y.c,y.a));L>I.PI?L-=I.PI2:L<-I.PI&&(L+=I.PI2),L=Y+(L+v)*i;var X=Math.sqrt(M*M+F*F);y.b=Math.cos(L)*X,y.d=Math.sin(L)*X}y.updateAppliedTransform()}}},{key:"applyRelativeWorld",value:function(){for(var t=this.mixRotate,e=this.mixX,n=this.mixY,r=this.mixScaleX,a=this.mixScaleY,i=this.mixShearY,s=0!=e||0!=n,o=this.target,h=o.a,l=o.b,u=o.c,c=o.d,f=h*c-l*u>0?I.degRad:-I.degRad,d=this.data.offsetRotation*f,v=this.data.offsetShearY*f,m=this.bones,p=0,g=m.length;pI.PI?E-=I.PI2:E<-I.PI&&(E+=I.PI2),E*=t;var A=Math.cos(E),S=Math.sin(E);y.a=A*w-S*b,y.b=A*k-S*x,y.c=S*w+A*b,y.d=S*k+A*x}if(s){var T=this.temp;o.localToWorld(T.set(this.data.offsetX,this.data.offsetY)),y.worldX+=T.x*e,y.worldY+=T.y*n}if(0!=r){var R=(Math.sqrt(h*h+u*u)-1+this.data.offsetScaleX)*r+1;y.a*=R,y.c*=R}if(0!=a){var C=(Math.sqrt(l*l+c*c)-1+this.data.offsetScaleY)*a+1;y.b*=C,y.d*=C}if(i>0){var M=Math.atan2(c,l)-Math.atan2(u,h);M>I.PI?M-=I.PI2:M<-I.PI&&(M+=I.PI2);var F=y.b,Y=y.d;M=Math.atan2(Y,F)+(M-I.PI/2+v)*i;var L=Math.sqrt(F*F+Y*Y);y.b=Math.cos(M)*L,y.d=Math.sin(M)*L}y.updateAppliedTransform()}}},{key:"applyAbsoluteLocal",value:function(){for(var t=this.mixRotate,e=this.mixX,n=this.mixY,r=this.mixScaleX,a=this.mixScaleY,i=this.mixShearY,s=this.target,o=this.bones,h=0,l=o.length;h2&&void 0!==arguments[2]?arguments[2]:new Array(2);if(!t)throw new Error("offset cannot be null.");if(!e)throw new Error("size cannot be null.");for(var r=this.drawOrder,a=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY,h=0,l=r.length;h0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;i(this,t),this.slotIndex=e,this.name=n,this.attachment=r})),Le=function(){function t(e){if(i(this,t),this.attachments=new Array,this.bones=Array(),this.constraints=new Array,!e)throw new Error("name cannot be null.");this.name=e}return o(t,[{key:"setAttachment",value:function(t,e,n){if(!n)throw new Error("attachment cannot be null.");var r=this.attachments;t>=r.length&&(r.length=t+1),r[t]||(r[t]={}),r[t][e]=n}},{key:"addSkin",value:function(t){for(var e=0;e= 0.");if(!n)throw new Error("name cannot be null.");if(!r)throw new Error("boneData cannot be null.");this.index=e,this.name=n,this.boneData=r}));!function(t){t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen"}(Me||(Me={}));var Ne,Pe=function(t){l(n,t);var e=d(n);function n(t){var r;return i(this,n),(r=e.call(this,t,0,!1)).bones=new Array,r._target=null,r.mixRotate=0,r.mixX=0,r.mixY=0,r.mixScaleX=0,r.mixScaleY=0,r.mixShearY=0,r.offsetRotation=0,r.offsetX=0,r.offsetY=0,r.offsetScaleX=0,r.offsetScaleY=0,r.offsetShearY=0,r.relative=!1,r.local=!1,r}return o(n,[{key:"target",get:function(){if(this._target)return this._target;throw new Error("BoneData not set.")},set:function(t){this._target=t}}]),n}(ye),_e=function(){function t(e){i(this,t),this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=e}return o(t,[{key:"readSkeletonData",value:function(t){var e=this.scale,n=new Fe;n.name="";var r=new Oe(t),a=r.readInt32(),i=r.readInt32();n.hash=0==i&&0==a?null:i.toString(16)+a.toString(16),n.version=r.readString(),n.x=r.readFloat(),n.y=r.readFloat(),n.width=r.readFloat(),n.height=r.readFloat();var s=r.readBoolean();s&&(n.fps=r.readFloat(),n.imagesPath=r.readString(),n.audioPath=r.readString());var o=0;o=r.readInt(!0);for(var h=0;h>4,t.readFloat())}r.push(br)}}var Ar=t.readInt(!0);if(Ar>0){for(var Sr=new Mt(Ar),Tr=n.slots.length,Rr=0;Rr=0;Yr--)Fr[Yr]=-1;for(var Lr=R.newArray(Tr-Mr,0),Xr=0,Nr=0,Pr=0;Pr=0;Or--)-1==Fr[Or]&&(Fr[Or]=Lr[--Nr]);Sr.setFrame(Rr,Cr,Fr)}r.push(Sr)}var Br=t.readInt(!0);if(Br>0){for(var Dr=new Ct(Br),Vr=0;Vr1&&void 0!==arguments[1]?arguments[1]:new Array,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new DataView(e.buffer);i(this,t),this.strings=n,this.index=r,this.buffer=a}return o(t,[{key:"readByte",value:function(){return this.buffer.getInt8(this.index++)}},{key:"readUnsignedByte",value:function(){return this.buffer.getUint8(this.index++)}},{key:"readShort",value:function(){var t=this.buffer.getInt16(this.index);return this.index+=2,t}},{key:"readInt32",value:function(){var t=this.buffer.getInt32(this.index);return this.index+=4,t}},{key:"readInt",value:function(t){var e=this.readByte(),n=127&e;return 0!=(128&e)&&(n|=(127&(e=this.readByte()))<<7,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<14,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<21,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<28)))),t?n:n>>>1^-(1&n)}},{key:"readStringRef",value:function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]}},{key:"readString",value:function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n>4){case 12:case 13:e+=String.fromCharCode((31&r)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&r)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(r),n++}}return e}},{key:"readFloat",value:function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t}},{key:"readBoolean",value:function(){return 0!=this.readByte()}}]),t}(),Be=o((function t(e,n,r,a,s){i(this,t),this.mesh=e,this.skin=n,this.slotIndex=r,this.parent=a,this.inheritTimeline=s})),De=o((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;i(this,t),this.bones=e,this.vertices=n}));function Ve(t,e,n){for(var r=t.readFloat(),a=t.readFloat()*n,i=0,s=0,o=e.getFrameCount()-1;e.setFrame(i,r,a),i!=o;i++){var h=t.readFloat(),l=t.readFloat()*n;switch(t.readByte()){case dn:e.setStepped(i);break;case vn:qe(t,e,s++,i,0,r,h,a,l,n)}r=h,a=l}return e}function Ue(t,e,n){for(var r=t.readFloat(),a=t.readFloat()*n,i=t.readFloat()*n,s=0,o=0,h=e.getFrameCount()-1;e.setFrame(s,r,a,i),s!=h;s++){var l=t.readFloat(),u=t.readFloat()*n,c=t.readFloat()*n;switch(t.readByte()){case dn:e.setStepped(s);break;case vn:qe(t,e,o++,s,0,r,l,a,u,n),qe(t,e,o++,s,1,r,l,i,c,n)}r=l,a=u,i=c}return e}function qe(t,e,n,r,a,i,s,o,h,l){e.setBezier(n,r,a,i,o,t.readFloat(),t.readFloat()*l,t.readFloat(),t.readFloat()*l,s,h)}!function(t){t[t.Region=0]="Region",t[t.BoundingBox=1]="BoundingBox",t[t.Mesh=2]="Mesh",t[t.LinkedMesh=3]="LinkedMesh",t[t.Path=4]="Path",t[t.Point=5]="Point",t[t.Clipping=6]="Clipping"}(Ne||(Ne={}));var We,je=0,Ge=1,ze=2,He=3,$e=4,Je=5,Ke=6,Qe=7,Ze=8,tn=9,en=0,nn=1,rn=2,an=3,sn=4,on=5,hn=0,ln=1,un=0,cn=1,fn=2,dn=1,vn=2,mn=function(){function t(){i(this,t),this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new M((function(){return R.newFloatArray(16)}))}return o(t,[{key:"update",value:function(t,e){if(!t)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,r=this.polygons,a=this.polygonPool,i=t.slots,s=i.length;n.length=0,a.freeAll(r),r.length=0;for(var o=0;o=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY}},{key:"aabbIntersectsSegment",value:function(t,e,n,r){var a=this.minX,i=this.minY,s=this.maxX,o=this.maxY;if(t<=a&&n<=a||e<=i&&r<=i||t>=s&&n>=s||e>=o&&r>=o)return!1;var h=(r-e)/(n-t),l=h*(a-t)+e;if(l>i&&li&&la&&ua&&ut.minX&&this.minYt.minY}},{key:"containsPoint",value:function(t,e){for(var n=this.polygons,r=0,a=n.length;r=n||l=n){var u=r[o];u+(n-h)/(l-h)*(r[i]-u)=u&&w<=d||w>=d&&w<=u)&&(w>=e&&w<=r||w>=r&&w<=e)){var k=(l*g-h*m)/y;if((k>=c&&k<=v||k>=v&&k<=c)&&(k>=n&&k<=a||k>=a&&k<=n))return!0}u=d,c=v}return!1}},{key:"getPolygon",value:function(t){if(!t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]}},{key:"getWidth",value:function(){return this.maxX-this.minX}},{key:"getHeight",value:function(){return this.maxY-this.minY}}]),t}(),pn=function(){function t(){i(this,t),this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new M((function(){return new Array})),this.polygonIndicesPool=new M((function(){return new Array}))}return o(t,[{key:"triangulate",value:function(e){var n=e,r=e.length>>1,a=this.indicesArray;a.length=0;for(var i=0;i3;){for(var u=r-1,c=0,f=1;;){t:if(!s[c]){for(var d=a[u]<<1,v=a[c]<<1,m=a[f]<<1,p=n[d],g=n[d+1],y=n[v],w=n[v+1],k=n[m],b=n[m+1],x=(f+1)%r;x!=u;x=(x+1)%r)if(s[x]){var E=a[x]<<1,I=n[E],A=n[E+1];if(t.positiveArea(k,b,p,g,I,A)&&t.positiveArea(p,g,y,w,I,A)&&t.positiveArea(y,w,k,b,I,A))break t}break}if(0==f){do{if(!s[c])break;c--}while(c>0);break}u=c,c=f,f=(f+1)%r}l.push(a[(r+c-1)%r]),l.push(a[c]),l.push(a[(c+1)%r]),a.splice(c,1),s.splice(c,1);var S=(--r+c-1)%r,T=c==r?0:c;s[S]=t.isConcave(S,r,n,a),s[T]=t.isConcave(T,r,n,a)}return 3==r&&(l.push(a[2]),l.push(a[0]),l.push(a[1])),l}},{key:"decompose",value:function(e,n){var r=e,a=this.convexPolygons;this.polygonPool.freeAll(a),a.length=0;var i=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(i),i.length=0;var s=this.polygonIndicesPool.obtain();s.length=0;var o=this.polygonPool.obtain();o.length=0;for(var h=-1,l=0,u=0,c=n.length;u0?(a.push(o),i.push(s)):(this.polygonPool.free(o),this.polygonIndicesPool.free(s)),(o=this.polygonPool.obtain()).length=0,o.push(m),o.push(p),o.push(g),o.push(y),o.push(w),o.push(k),(s=this.polygonIndicesPool.obtain()).length=0,s.push(f),s.push(d),s.push(v),l=t.winding(m,p,g,y,w,k),h=f)}o.length>0&&(a.push(o),i.push(s));for(var A=0,S=a.length;A=0;$--)0==(o=a[$]).length&&(a.splice($,1),this.polygonPool.free(o),s=i[$],i.splice($,1),this.polygonIndicesPool.free(s));return a}}],[{key:"isConcave",value:function(t,e,n,r){var a=r[(e+t-1)%e]<<1,i=r[t]<<1,s=r[(t+1)%e]<<1;return!this.positiveArea(n[a],n[a+1],n[i],n[i+1],n[s],n[s+1])}},{key:"positiveArea",value:function(t,e,n,r,a,i){return t*(i-r)+n*(e-i)+a*(r-e)>=0}},{key:"winding",value:function(t,e,n,r,a,i){var s=n-t,o=r-e;return a*o-i*s+s*e-t*o>=0?1:-1}}]),t}(),gn=function(){function t(){i(this,t),this.triangulator=new pn,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array,this.clipAttachment=null,this.clippingPolygons=null}return o(t,[{key:"clipStart",value:function(e,n){if(this.clipAttachment)return 0;this.clipAttachment=n;var r=n.worldVerticesLength,a=R.setArraySize(this.clippingPolygon,r);n.computeWorldVertices(e,0,r,a,0,2);var i=this.clippingPolygon;t.makeClockwise(i);for(var s=this.clippingPolygons=this.triangulator.decompose(i,this.triangulator.triangulate(i)),o=0,h=s.length;o>1,V=this.clipOutput,U=R.setArraySize(l,F+D*d),q=0;q=2?(h=o,o=this.scratch):h=this.scratch,h.length=0,h.push(t),h.push(e),h.push(n),h.push(r),h.push(a),h.push(i),h.push(t),h.push(e),o.length=0;for(var c=s,f=s.length-4,d=0;;d+=2){for(var v=c[d],m=c[d+1],p=c[d+2],g=c[d+3],y=v-p,w=m-g,k=h,b=h.length-2,x=o.length,E=0;E0;if(y*(A-g)-w*(I-p)>0){if(R){o.push(S),o.push(T);continue}var C=T-A,M=S-I,F=C*(p-v)-M*(g-m);if(Math.abs(F)>1e-6){var Y=(M*(m-A)-C*(v-I))/F;o.push(v+(p-v)*Y),o.push(m+(g-m)*Y)}else o.push(v),o.push(m)}else if(R){var L=T-A,X=S-I,N=L*(p-v)-X*(g-m);if(Math.abs(N)>1e-6){var P=(X*(m-A)-L*(v-I))/N;o.push(v+(p-v)*P),o.push(m+(g-m)*P)}else o.push(v),o.push(m);o.push(S),o.push(T)}u=!0}if(x==o.length)return l.length=0,!0;if(o.push(o[0]),o.push(o[1]),d==f)break;var _=o;(o=h).length=0,h=_}if(l!=o){l.length=0;for(var O=0,B=o.length-2;O>1;l=0;lr--)-1==tr[lr]&&(tr[lr]=nr[--ar])}$n.setFrame(Kn,En(Zn,"time",0),tr)}a.push($n)}if(t.events){for(var ur=new Ct(t.events.length),cr=0,fr=0;fr)?=?)"),d("XRANGEIDENTIFIERLOOSE","".concat(h[l.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),d("XRANGEIDENTIFIER","".concat(h[l.NUMERICIDENTIFIER],"|x|X|\\*")),d("XRANGEPLAIN","[v=\\s]*(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:".concat(h[l.PRERELEASE],")?").concat(h[l.BUILD],"?")+")?)?"),d("XRANGEPLAINLOOSE","[v=\\s]*(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(h[l.PRERELEASELOOSE],")?").concat(h[l.BUILD],"?")+")?)?"),d("XRANGE","^".concat(h[l.GTLT],"\\s*").concat(h[l.XRANGEPLAIN],"$")),d("XRANGELOOSE","^".concat(h[l.GTLT],"\\s*").concat(h[l.XRANGEPLAINLOOSE],"$")),d("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(n,"})")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:$|[^\\d])"),d("COERCERTL",h[l.COERCE],!0),d("LONETILDE","(?:~>?)"),d("TILDETRIM","(\\s*)".concat(h[l.LONETILDE],"\\s+"),!0),e.tildeTrimReplace="$1~",d("TILDE","^".concat(h[l.LONETILDE]).concat(h[l.XRANGEPLAIN],"$")),d("TILDELOOSE","^".concat(h[l.LONETILDE]).concat(h[l.XRANGEPLAINLOOSE],"$")),d("LONECARET","(?:\\^)"),d("CARETTRIM","(\\s*)".concat(h[l.LONECARET],"\\s+"),!0),e.caretTrimReplace="$1^",d("CARET","^".concat(h[l.LONECARET]).concat(h[l.XRANGEPLAIN],"$")),d("CARETLOOSE","^".concat(h[l.LONECARET]).concat(h[l.XRANGEPLAINLOOSE],"$")),d("COMPARATORLOOSE","^".concat(h[l.GTLT],"\\s*(").concat(h[l.LOOSEPLAIN],")$|^$")),d("COMPARATOR","^".concat(h[l.GTLT],"\\s*(").concat(h[l.FULLPLAIN],")$|^$")),d("COMPARATORTRIM","(\\s*)".concat(h[l.GTLT],"\\s*(").concat(h[l.LOOSEPLAIN],"|").concat(h[l.XRANGEPLAIN],")"),!0),e.comparatorTrimReplace="$1$2$3",d("HYPHENRANGE","^\\s*(".concat(h[l.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(h[l.XRANGEPLAIN],")")+"\\s*$"),d("HYPHENRANGELOOSE","^\\s*(".concat(h[l.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(h[l.XRANGEPLAINLOOSE],")")+"\\s*$"),d("STAR","(<|>)?=?\\s*\\*"),d("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),d("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Ln,Ln.exports);var Xn=Ln.exports;Rn(Xn);var Nn=Object.freeze({loose:!0}),Pn=Object.freeze({}),_n=function(t){return t?"object"!==a(t)?Nn:t:Pn};Rn(_n);var On=/^[0-9]+$/,Bn=function(t,e){var n=On.test(t),r=On.test(e);return n&&r&&(t=+t,e=+e),t===e?0:n&&!r?-1:r&&!n?1:tUn)throw new TypeError("version is longer than ".concat(Un," characters"));Vn("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;var r=e.trim().match(n.loose?Wn[jn.LOOSE]:Wn[jn.FULL]);if(!r)throw new TypeError("Invalid Version: ".concat(e));if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>qn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>qn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>qn||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((function(t){if(/^[0-9]+$/.test(t)){var e=+t;if(e>=0&&e=0;)"number"==typeof this.prerelease[a]&&(this.prerelease[a]++,a=-2);if(-1===a){if(e===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(e){var i=[e,r];!1===n&&(i=[e]),0===zn(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break;default:throw new Error("invalid increment argument: ".concat(t))}return this.raw=this.format(),this.build.length&&(this.raw+="+".concat(this.build.join("."))),this}}]),t}(),$n=Hn;Rn($n);var Jn=$n,Kn=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t instanceof Jn)return t;try{return new Jn(t,e)}catch(t){if(!n)return null;throw t}};Rn(Kn);var Qn,Zn,tr=Kn,er=Rn((function(t,e){var n=tr(t,e);return n?n.version:null})),nr=$n,rr=Kn,ar=Xn.safeRe,ir=Xn.t,sr=Rn((function(t,e){if(t instanceof nr)return t;if("number"==typeof t&&(t=String(t)),"string"!=typeof t)return null;var n=null;if((e=e||{}).rtl){for(var r;(r=ar[ir.COERCERTL].exec(t))&&(!n||n.index+n[0].length!==t.length);)n&&r.index+r[0].length===n.index+n[0].length||(n=r),ar[ir.COERCERTL].lastIndex=r.index+r[1].length+r[2].length;ar[ir.COERCERTL].lastIndex=-1}else n=t.match(ar[ir.COERCE]);return null===n?null:rr("".concat(n[2],".").concat(n[3]||"0",".").concat(n[4]||"0"),e)}));var or=hr;function hr(t){var e=this;if(e instanceof hr||(e=new hr),e.tail=null,e.head=null,e.length=0,t&&"function"==typeof t.forEach)t.forEach((function(t){e.push(t)}));else if(arguments.length>0)for(var n=0,r=arguments.length;n1)n=e;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var a=0;null!==r;a++)n=t(n,r.value,a),r=r.next;return n},hr.prototype.reduceReverse=function(t,e){var n,r=this.tail;if(arguments.length>1)n=e;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var a=this.length-1;null!==r;a--)n=t(n,r.value,a),r=r.prev;return n},hr.prototype.toArray=function(){for(var t=new Array(this.length),e=0,n=this.head;null!==n;e++)t[e]=n.value,n=n.next;return t},hr.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,n=this.tail;null!==n;e++)t[e]=n.value,n=n.prev;return t},hr.prototype.slice=function(t,e){(e=e||this.length)<0&&(e+=this.length),(t=t||0)<0&&(t+=this.length);var n=new hr;if(ethis.length&&(e=this.length);for(var r=0,a=this.head;null!==a&&rthis.length&&(e=this.length);for(var r=this.length,a=this.tail;null!==a&&r>e;r--)a=a.prev;for(;null!==a&&r>t;r--,a=a.prev)n.push(a.value);return n},hr.prototype.splice=function(t,e){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var n=0,r=this.head;null!==r&&nthis[vr])return Cr(this,this[xr].get(t)),!1;var i=this[xr].get(t).value;return this[wr]&&(this[kr]||this[wr](t,i.value)),i.now=r,i.maxAge=n,i.value=e,this[mr]+=a-i.length,i.length=a,this.get(t),Rr(this),!0}var s=new Mr(t,e,a,r,n);return s.length>this[vr]?(this[wr]&&this[wr](t,e),!1):(this[mr]+=s.length,this[br].unshift(s),this[xr].set(t,this[br].head),Rr(this),!0)}},{key:"has",value:function(t){if(!this[xr].has(t))return!1;var e=this[xr].get(t).value;return!Tr(this,e)}},{key:"get",value:function(t){return Sr(this,t,!0)}},{key:"peek",value:function(t){return Sr(this,t,!1)}},{key:"pop",value:function(){var t=this[br].tail;return t?(Cr(this,t),t.value):null}},{key:"del",value:function(t){Cr(this,this[xr].get(t))}},{key:"load",value:function(t){this.reset();for(var e=Date.now(),n=t.length-1;n>=0;n--){var r=t[n],a=r.e||0;if(0===a)this.set(r.k,r.v);else{var i=a-e;i>0&&this.set(r.k,r.v,i)}}}},{key:"prune",value:function(){var t=this;this[xr].forEach((function(e,n){return Sr(t,n,!1)}))}}]),t}(),Sr=function(t,e,n){var r=t[xr].get(e);if(r){var a=r.value;if(Tr(t,a)){if(Cr(t,r),!t[gr])return}else n&&(t[Er]&&(r.value.now=Date.now()),t[br].unshiftNode(r));return a.value}},Tr=function(t,e){if(!e||!e.maxAge&&!t[yr])return!1;var n=Date.now()-e.now;return e.maxAge?n>e.maxAge:t[yr]&&n>t[yr]},Rr=function(t){if(t[mr]>t[vr])for(var e=t[br].tail;t[mr]>t[vr]&&null!==e;){var n=e.prev;Cr(t,e),e=n}},Cr=function(t,e){if(e){var n=e.value;t[wr]&&t[wr](n.key,n.value),t[mr]-=n.length,t[xr].delete(n.key),t[br].removeNode(e)}},Mr=o((function t(e,n,r,a,s){i(this,t),this.key=e,this.value=n,this.length=r,this.now=a,this.maxAge=s||0})),Fr=function(t,e,n,r){var a=n.value;Tr(t,a)&&(Cr(t,n),t[gr]||(a=void 0)),a&&e.call(r,a.value,a.key,t)},Yr=Ar;Rn(Yr);var Lr=$n,Xr=function(t,e,n){return new Lr(t,n).compare(new Lr(e,n))};Rn(Xr);var Nr=Xr,Pr=function(t,e,n){return 0===Nr(t,e,n)};Rn(Pr);var _r=Xr,Or=function(t,e,n){return 0!==_r(t,e,n)};Rn(Or);var Br=Xr,Dr=function(t,e,n){return Br(t,e,n)>0};Rn(Dr);var Vr=Xr,Ur=function(t,e,n){return Vr(t,e,n)>=0};Rn(Ur);var qr=Xr,Wr=function(t,e,n){return qr(t,e,n)<0};Rn(Wr);var jr=Xr,Gr=function(t,e,n){return jr(t,e,n)<=0};Rn(Gr);var zr,Hr,$r,Jr,Kr=Pr,Qr=Or,Zr=Dr,ta=Ur,ea=Wr,na=Gr,ra=function(t,e,n,r){switch(e){case"===":return"object"===a(t)&&(t=t.version),"object"===a(n)&&(n=n.version),t===n;case"!==":return"object"===a(t)&&(t=t.version),"object"===a(n)&&(n=n.version),t!==n;case"":case"=":case"==":return Kr(t,n,r);case"!=":return Qr(t,n,r);case">":return Zr(t,n,r);case">=":return ta(t,n,r);case"<":return ea(t,n,r);case"<=":return na(t,n,r);default:throw new TypeError("Invalid operator: ".concat(e))}};function aa(){if(Jr)return $r;Jr=1;var t=function(){function t(e,a){var s=this;if(i(this,t),a=n(a),e instanceof t)return e.loose===!!a.loose&&e.includePrerelease===!!a.includePrerelease?e:new t(e.raw,a);if(e instanceof r)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=a,this.loose=!!a.loose,this.includePrerelease=!!a.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((function(t){return s.parseRange(t.trim())})).filter((function(t){return t.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(this.raw));if(this.set.length>1){var o=this.set[0];if(this.set=this.set.filter((function(t){return!m(t[0])})),0===this.set.length)this.set=[o];else if(this.set.length>1){var h,l=w(this.set);try{for(l.s();!(h=l.n()).done;){var u=h.value;if(1===u.length&&g(u[0])){this.set=[u];break}}}catch(t){l.e(t)}finally{l.f()}}}this.format()}return o(t,[{key:"format",value:function(){return this.range=this.set.map((function(t){return t.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(t){var n=this,i=((this.options.includePrerelease&&d)|(this.options.loose&&v))+":"+t,s=e.get(i);if(s)return s;var o=this.options.loose,g=o?h[l.HYPHENRANGELOOSE]:h[l.HYPHENRANGE];t=t.replace(g,M(this.options.includePrerelease)),a("hyphen replace",t),t=t.replace(h[l.COMPARATORTRIM],u),a("comparator trim",t),t=t.replace(h[l.TILDETRIM],c),a("tilde trim",t),t=t.replace(h[l.CARETTRIM],f),a("caret trim",t);var y=t.split(" ").map((function(t){return k(t,n.options)})).join(" ").split(/\s+/).map((function(t){return C(t,n.options)}));o&&(y=y.filter((function(t){return a("loose invalid filter",t,n.options),!!t.match(h[l.COMPARATORLOOSE])}))),a("range list",y);var b,x=new Map,E=y.map((function(t){return new r(t,n.options)})),I=w(E);try{for(I.s();!(b=I.n()).done;){var A=b.value;if(m(A))return[A];x.set(A.value,A)}}catch(t){I.e(t)}finally{I.f()}x.size>1&&x.has("")&&x.delete("");var S=p(x.values());return e.set(i,S),S}},{key:"intersects",value:function(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((function(t){return y(t,n)&&e.set.some((function(e){return y(e,n)&&t.every((function(t){return e.every((function(e){return t.intersects(e,n)}))}))}))}))}},{key:"test",value:function(t){if(!t)return!1;if("string"==typeof t)try{t=new s(t,this.options)}catch(t){return!1}for(var e=0;e")||!t.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!t.operator.startsWith("<"))&&(this.semver.version!==t.semver.version||!this.operator.includes("=")||!t.operator.includes("="))&&!(s(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<"))&&!(s(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}}],[{key:"ANY",get:function(){return t}}]),e}();zr=e;var n=_n,r=Xn.safeRe,a=Xn.t,s=ra,h=Yn,l=$n,u=aa();return zr}(),a=Yn,s=$n,h=Xn.safeRe,l=Xn.t,u=Xn.comparatorTrimReplace,c=Xn.tildeTrimReplace,f=Xn.caretTrimReplace,d=Cn.FLAG_INCLUDE_PRERELEASE,v=Cn.FLAG_LOOSE,m=function(t){return"<0.0.0-0"===t.value},g=function(t){return""===t.value},y=function(t,e){for(var n=!0,r=t.slice(),a=r.pop();n&&r.length;)n=r.every((function(t){return a.intersects(t,e)})),a=r.pop();return n},k=function(t,e){return a("comp",t,e),t=I(t,e),a("caret",t),t=x(t,e),a("tildes",t),t=S(t,e),a("xrange",t),t=R(t,e),a("stars",t),t},b=function(t){return!t||"x"===t.toLowerCase()||"*"===t},x=function(t,e){return t.trim().split(/\s+/).map((function(t){return E(t,e)})).join(" ")},E=function(t,e){var n=e.loose?h[l.TILDELOOSE]:h[l.TILDE];return t.replace(n,(function(e,n,r,i,s){var o;return a("tilde",t,e,n,r,i,s),b(n)?o="":b(r)?o=">=".concat(n,".0.0 <").concat(+n+1,".0.0-0"):b(i)?o=">=".concat(n,".").concat(r,".0 <").concat(n,".").concat(+r+1,".0-0"):s?(a("replaceTilde pr",s),o=">=".concat(n,".").concat(r,".").concat(i,"-").concat(s," <").concat(n,".").concat(+r+1,".0-0")):o=">=".concat(n,".").concat(r,".").concat(i," <").concat(n,".").concat(+r+1,".0-0"),a("tilde return",o),o}))},I=function(t,e){return t.trim().split(/\s+/).map((function(t){return A(t,e)})).join(" ")},A=function(t,e){a("caret",t,e);var n=e.loose?h[l.CARETLOOSE]:h[l.CARET],r=e.includePrerelease?"-0":"";return t.replace(n,(function(e,n,i,s,o){var h;return a("caret",t,e,n,i,s,o),b(n)?h="":b(i)?h=">=".concat(n,".0.0").concat(r," <").concat(+n+1,".0.0-0"):b(s)?h="0"===n?">=".concat(n,".").concat(i,".0").concat(r," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".0").concat(r," <").concat(+n+1,".0.0-0"):o?(a("replaceCaret pr",o),h="0"===n?"0"===i?">=".concat(n,".").concat(i,".").concat(s,"-").concat(o," <").concat(n,".").concat(i,".").concat(+s+1,"-0"):">=".concat(n,".").concat(i,".").concat(s,"-").concat(o," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".").concat(s,"-").concat(o," <").concat(+n+1,".0.0-0")):(a("no pr"),h="0"===n?"0"===i?">=".concat(n,".").concat(i,".").concat(s).concat(r," <").concat(n,".").concat(i,".").concat(+s+1,"-0"):">=".concat(n,".").concat(i,".").concat(s).concat(r," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".").concat(s," <").concat(+n+1,".0.0-0")),a("caret return",h),h}))},S=function(t,e){return a("replaceXRanges",t,e),t.split(/\s+/).map((function(t){return T(t,e)})).join(" ")},T=function(t,e){t=t.trim();var n=e.loose?h[l.XRANGELOOSE]:h[l.XRANGE];return t.replace(n,(function(n,r,i,s,o,h){a("xRange",t,n,r,i,s,o,h);var l=b(i),u=l||b(s),c=u||b(o),f=c;return"="===r&&f&&(r=""),h=e.includePrerelease?"-0":"",l?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&f?(u&&(s=0),o=0,">"===r?(r=">=",u?(i=+i+1,s=0,o=0):(s=+s+1,o=0)):"<="===r&&(r="<",u?i=+i+1:s=+s+1),"<"===r&&(h="-0"),n="".concat(r+i,".").concat(s,".").concat(o).concat(h)):u?n=">=".concat(i,".0.0").concat(h," <").concat(+i+1,".0.0-0"):c&&(n=">=".concat(i,".").concat(s,".0").concat(h," <").concat(i,".").concat(+s+1,".0-0")),a("xRange return",n),n}))},R=function(t,e){return a("replaceStars",t,e),t.trim().replace(h[l.STAR],"")},C=function(t,e){return a("replaceGTE0",t,e),t.trim().replace(h[e.includePrerelease?l.GTE0PRE:l.GTE0],"")},M=function(t){return function(e,n,r,a,i,s,o,h,l,u,c,f,d){return n=b(r)?"":b(a)?">=".concat(r,".0.0").concat(t?"-0":""):b(i)?">=".concat(r,".").concat(a,".0").concat(t?"-0":""):s?">=".concat(n):">=".concat(n).concat(t?"-0":""),h=b(l)?"":b(u)?"<".concat(+l+1,".0.0-0"):b(c)?"<".concat(l,".").concat(+u+1,".0-0"):f?"<=".concat(l,".").concat(u,".").concat(c,"-").concat(f):t?"<".concat(l,".").concat(u,".").concat(+c+1,"-0"):"<=".concat(h),"".concat(n," ").concat(h).trim()}},F=function(t,e,n){for(var i=0;i0){var o=t[s].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0};return $r}Rn(ra);var ia,sa,oa=aa(),ha=function(t,e,n){try{e=new oa(e,n)}catch(t){return!1}return e.test(t)},la={valid:er,coerce:sr,satisfies:Rn(ha),SEMVER_SPEC_VERSION:Mn.SEMVER_SPEC_VERSION},ua=0,ca=1,fa=2,da=[0,1,2,2,3,0],va=function(){function t(e,r,a,s){var o;if(i(this,t),h(this,"autoUpdate",!0),h(this,"skeleton",void 0),h(this,"states",void 0),this._app=e,this._position=new n.Vec3,1===re.length){var l,u=w((o=new re(r)).pages);try{for(u.s();!(l=u.n()).done;){var c=l.value;c.setTexture(new Tn(s[c.name]))}}catch(t){u.e(t)}finally{u.f()}}else o=new re(r,(function(t){return new Tn(s[t])}));var f=new yn(new fe(o));f.scale*=.01;var d=f.readSkeletonData(a);this.skeletonVersion=la.valid(la.coerce(d.version)),this._spine_3_6_0=la.satisfies(this.skeletonVersion,"<=3.6.0"),this._spine_3_7_99=la.satisfies(this.skeletonVersion,"<=3.7.99"),this._spine_4_0_X=la.satisfies(this.skeletonVersion,"~4.0.0"),this._spine_4_1_X=la.satisfies(this.skeletonVersion,"~4.1.23"),this.skeleton=new Ce(d),this.skeleton.updateWorldTransform(),this.stateData=new Kt(this.skeleton.data),this.states=[new _t(this.stateData)],this.clipper=new gn,this._node=new n.GraphNode,this._meshes=[],this._meshInstances=[],this._materials={},this._tint={},this._aabb=new n.BoundingBox,this._aabbTempArray=[],this._aabbTempOffset=new n.Vec2,this._aabbTempSize=new n.Vec2,this._renderCounts={vertexCount:0,indexCount:0},this._vertexFormat=null,this._vertexBuffer=null,this._indexBuffer=null,this._priority=0,this._timeScale=1,this._layers=[n.LAYERID_UI],this.init(),this._hidden=!1}return o(t,[{key:"destroy",value:function(){this.removeFromLayers();for(var t=0;t0&&this._renderCounts.vertexCount>0){this.skeleton.getBounds(this._aabbTempOffset,this._aabbTempSize,this._aabbTempArray),this._aabb.center=new n.Vec3(this._aabbTempOffset.x,this._aabbTempOffset.y,0),this._aabb.halfExtents=new n.Vec3(.5*this._aabbTempSize.x,.5*this._aabbTempSize.y,0),(!this._vertexBuffer||this._vertexBuffer.getNumVertices()0&&c.indices.length>0){t&&t!==c.material&&(this.SubmitBatch(e,r,t),t=c.material,e=s,r=0),t=c.material;var f=c.positions,d=c.vertexColor.r,v=c.vertexColor.g,m=c.vertexColor.b,p=c.vertexColor.a,g=c.uvs,y=void 0,w=f.length/2;for(y=0;y0){var a=new n.Mesh(this._app.graphicsDevice);a.vertexBuffer=this._vertexBuffer,a.indexBuffer[0]=this._indexBuffer,a.primitive[0].type=n.PRIMITIVE_TRIANGLES,a.primitive[0].base=t,a.primitive[0].count=e,a.primitive[0].indexed=!0,a.aabb=this._aabb,this._meshes.push(a);var i=new n.MeshInstance(a,this._materials[r],this._node);i.drawOrder=this.priority+this._meshInstances.length,i.visible=!this._hidden,this._meshInstances.push(i)}}},{key:"update",value:function(t){if(!this._hidden){var e;t*=this._timeScale;var n=this.states.length;for(e=0;et.length)&&(e=t.length);for(var n=0,a=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,o=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){o=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function y(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var a=n.call(t,e);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:String(e)}function w(t,e,n){return e=l(e),u(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],l(t).constructor):e.apply(t,n))}var k=s((function t(){r(this,t),this.array=new Array}),[{key:"add",value:function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e}},{key:"contains",value:function(t){return null!=this.array[0|t]}},{key:"remove",value:function(t){this.array[0|t]=void 0}},{key:"clear",value:function(){this.array.length=0}}]),b=s((function t(){r(this,t),this.entries={},this.size=0}),[{key:"add",value:function(t){var e=this.entries[t];return this.entries[t]=!0,!e&&(this.size++,!0)}},{key:"addAll",value:function(t){for(var e=this.size,n=0,a=t.length;n0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;r(this,t),this.r=e,this.g=n,this.b=a,this.a=i}return s(t,[{key:"set",value:function(t,e,n,a){return this.r=t,this.g=e,this.b=n,this.a=a,this.clamp()}},{key:"setFromColor",value:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}},{key:"setFromString",value:function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=8!=t.length?1:parseInt(t.substr(6,2),16)/255,this}},{key:"add",value:function(t,e,n,a){return this.r+=t,this.g+=e,this.b+=n,this.a+=a,this.clamp()}},{key:"clamp",value:function(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}}],[{key:"rgba8888ToColor",value:function(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255}},{key:"rgb888ToColor",value:function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255}},{key:"fromString",value:function(e){return(new t).setFromString(e)}}])}();x.WHITE=new x(1,1,1,1),x.RED=new x(1,0,0,1),x.GREEN=new x(0,1,0,1),x.BLUE=new x(0,0,1,1),x.MAGENTA=new x(1,0,1,1);var I=function(){function t(){r(this,t)}return s(t,null,[{key:"clamp",value:function(t,e,n){return tn?n:t}},{key:"cosDeg",value:function(e){return Math.cos(e*t.degRad)}},{key:"sinDeg",value:function(e){return Math.sin(e*t.degRad)}},{key:"signum",value:function(t){return t>0?1:t<0?-1:0}},{key:"toInt",value:function(t){return t>0?Math.floor(t):Math.ceil(t)}},{key:"cbrt",value:function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e}},{key:"randomTriangular",value:function(e,n){return t.randomTriangularWith(e,n,.5*(e+n))}},{key:"randomTriangularWith",value:function(t,e,n){var a=Math.random(),r=e-t;return a<=(n-t)/r?t+Math.sqrt(a*r*(n-t)):e-Math.sqrt((1-a)*r*(e-n))}},{key:"isPowerOfTwo",value:function(t){return t&&0==(t&t-1)}}])}();I.PI=3.1415927,I.PI2=2*I.PI,I.radiansToDegrees=180/I.PI,I.radDeg=I.radiansToDegrees,I.degreesToRadians=I.PI/180,I.degRad=I.degreesToRadians;var E=s((function t(){r(this,t)}),[{key:"apply",value:function(t,e,n){return t+(e-t)*this.applyInternal(n)}}]),A=function(t){function e(t){var n;return r(this,e),(n=w(this,e)).power=2,n.power=t,n}return h(e,t),s(e,[{key:"applyInternal",value:function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1}}])}(E),S=function(t){function e(t){return r(this,e),w(this,e,[t])}return h(e,t),s(e,[{key:"applyInternal",value:function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1}}])}(A),R=function(){function t(){r(this,t)}return s(t,null,[{key:"arrayCopy",value:function(t,e,n,a,r){for(var i=e,s=a;i2&&void 0!==arguments[2]?arguments[2]:0,a=t.length;if(a==e)return t;if(t.length=e,a2&&void 0!==arguments[2]?arguments[2]:0;return e.length>=n?e:t.setArraySize(e,n,a)}},{key:"newArray",value:function(t,e){for(var n=new Array(t),a=0;a0?this.items.pop():this.instantiator()}},{key:"free",value:function(t){t.reset&&t.reset(),this.items.push(t)}},{key:"freeAll",value:function(t){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;r(this,t),this.x=e,this.y=n}),[{key:"set",value:function(t,e){return this.x=t,this.y=e,this}},{key:"length",value:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}},{key:"normalize",value:function(){var t=this.length();return 0!=t&&(this.x/=t,this.y/=t),this}}]),F=s((function t(){r(this,t),this.maxDelta=.064,this.framesPerSecond=0,this.delta=0,this.totalTime=0,this.lastTime=Date.now()/1e3,this.frameCount=0,this.frameTime=0}),[{key:"update",value:function(){var t=Date.now()/1e3;this.delta=t-this.lastTime,this.frameTime+=this.delta,this.totalTime+=this.delta,this.delta>this.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)}}]),Y=s((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;r(this,t),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(e)}),[{key:"hasEnoughData",value:function(){return this.addedValues>=this.values.length}},{key:"addValue",value:function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0}},{key:"getMean",value:function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*i;var s=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(l){for(var c=0,u=0,f=0;f0&&(h=o);for(var L=t.bone,N=L.worldX,B=L.worldY,_=L.a,O=L.b,D=L.c,V=L.d,U=e,q=r;q=this.regions.length&&(n=this.regions.length-1);var a=this.regions[n];e.region!=a&&(e.region=a,e.updateRegion())}},{key:"getPath",value:function(t,e){for(var n=t,a=(this.start+e).toString(),r=this.digits-a.length;r>0;r--)n+="0";return n+=a}}],[{key:"nextID",value:function(){return t._nextID++}}])}();N._nextID=0,function(t){t[t.hold=0]="hold",t[t.once=1]="once",t[t.loop=2]="loop",t[t.pingpong=3]="pingpong",t[t.onceReverse=4]="onceReverse",t[t.loopReverse=5]="loopReverse",t[t.pingpongReverse=6]="pingpongReverse"}(L||(L={}));var B=[L.hold,L.once,L.loop,L.pingpong,L.onceReverse,L.loopReverse,L.pingpongReverse];function _(t,e,n){return e=l(e),u(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],l(t).constructor):e.apply(t,n))}var O,D,V=s((function t(e,n,a){if(r(this,t),this.timelines=[],this.timelineIds=new b,!e)throw new Error("name cannot be null.");this.name=e,this.setTimelines(n),this.duration=a}),[{key:"setTimelines",value:function(t){if(!t)throw new Error("timelines cannot be null.");this.timelines=t,this.timelineIds.clear();for(var e=0;e0&&(e%=this.duration));for(var h=this.timelines,l=0,c=h.length;le)return a-1;return n-1}},{key:"search",value:function(t,e,n){for(var a=t.length,r=n;re)return r-n;return a-n}}]),lt=function(t){function e(t,n,a){var i;return r(this,e),(i=_(this,e,[t,a])).curves=R.newFloatArray(t+18*n),i.curves[t-1]=1,i}return h(e,t),s(e,[{key:"setLinear",value:function(t){this.curves[t]=0}},{key:"setStepped",value:function(t){this.curves[t]=1}},{key:"shrink",value:function(t){var e=this.getFrameCount()+18*t;if(this.curves.length>e){var n=R.newFloatArray(e);R.arrayCopy(this.curves,0,n,0,e),this.curves=n}}},{key:"setBezier",value:function(t,e,n,a,r,i,s,o,h,l,c){var u=this.curves,f=this.getFrameCount()+18*t;0==n&&(u[e]=2+f);for(var d=.03*(a-2*i+o),v=.03*(r-2*s+h),m=.006*(3*(i-o)-a+l),p=.006*(3*(s-h)-r+c),g=2*d+m,y=2*v+p,w=.3*(i-a)+d+.16666667*m,k=.3*(s-r)+v+.16666667*p,b=a+w,x=r+k,I=f+18;ft){var i=this.frames[e],s=this.frames[e+n];return s+(t-i)/(r[a]-i)*(r[a+1]-s)}var o=a+18;for(a+=2;a=t){var h=r[a-2],l=r[a-1];return l+(t-h)/(r[a]-h)*(r[a+1]-l)}e+=this.getFrameEntries();var c=r[o-2],u=r[o-1];return u+(t-c)/(this.frames[e]-c)*(this.frames[e+n]-u)}}])}(ht),ct=function(t){function e(t,n,a){return r(this,e),_(this,e,[t,n,[a]])}return h(e,t),s(e,[{key:"getFrameEntries",value:function(){return 2}},{key:"setFrame",value:function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+1]=n}},{key:"getCurveValue",value:function(t){for(var e=this.frames,n=e.length-2,a=2;a<=n;a+=2)if(e[a]>t){n=a-2;break}var r=this.curves[n>>1];switch(r){case 0:var i=e[n],s=e[n+1];return s+(t-i)/(e[n+2]-i)*(e[n+2+1]-s);case 1:return e[n+1]}return this.getBezierValue(t,n,1,r-2)}}])}(lt),ut=function(t){function e(t,n,a,i){return r(this,e),_(this,e,[t,n,[a,i]])}return h(e,t),s(e,[{key:"getFrameEntries",value:function(){return 3}},{key:"setFrame",value:function(t,e,n,a){t*=3,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=a}}])}(lt),ft=function(t){function e(t,n,a){var i;return r(this,e),(i=_(this,e,[t,n,U+"|"+a])).boneIndex=0,i.boneIndex=a,i}return h(e,t),s(e,[{key:"apply",value:function(t,e,n,a,r,i,s){var o=t.bones[this.boneIndex];if(o.active)if(n>2];switch(m){case 0:var p=h[v];u=h[v+1],f=h[v+2],d=h[v+3];var g=(n-p)/(h[v+4]-p);u+=(h[v+4+1]-u)*g,f+=(h[v+4+2]-f)*g,d+=(h[v+4+3]-d)*g;break;case 1:u=h[v+1],f=h[v+2],d=h[v+3];break;default:u=this.getBezierValue(n,v,1,m-2),f=this.getBezierValue(n,v,2,m+18-2),d=this.getBezierValue(n,v,3,m+36-2)}if(1==r)l.r=u,l.g=f,l.b=d;else{if(i==O.setup){var y=o.data.color;l.r=y.r,l.g=y.g,l.b=y.b}l.r+=(u-l.r)*r,l.g+=(f-l.g)*r,l.b+=(d-l.b)*r}}}}}])}(lt),Et=function(t){function e(t,n,a){var i;return r(this,e),(i=_(this,e,[t,n,J+"|"+a])).slotIndex=0,i.slotIndex=a,i}return h(e,t),s(e,[{key:"apply",value:function(t,e,n,a,r,i,s){var o=t.slots[this.slotIndex];if(o.bone.active){var h=o.color;if(n>3];switch(b){case 0:var x=h[k];d=h[k+1],v=h[k+2],m=h[k+3],p=h[k+4],g=h[k+5],y=h[k+6],w=h[k+7];var I=(n-x)/(h[k+8]-x);d+=(h[k+8+1]-d)*I,v+=(h[k+8+2]-v)*I,m+=(h[k+8+3]-m)*I,p+=(h[k+8+4]-p)*I,g+=(h[k+8+5]-g)*I,y+=(h[k+8+6]-y)*I,w+=(h[k+8+7]-w)*I;break;case 1:d=h[k+1],v=h[k+2],m=h[k+3],p=h[k+4],g=h[k+5],y=h[k+6],w=h[k+7];break;default:d=this.getBezierValue(n,k,1,b-2),v=this.getBezierValue(n,k,2,b+18-2),m=this.getBezierValue(n,k,3,b+36-2),p=this.getBezierValue(n,k,4,b+54-2),g=this.getBezierValue(n,k,5,b+72-2),y=this.getBezierValue(n,k,6,b+90-2),w=this.getBezierValue(n,k,7,b+108-2)}if(1==r)l.set(d,v,m,p),c.r=g,c.g=y,c.b=w;else{if(i==O.setup){l.setFromColor(o.data.color);var E=o.data.darkColor;c.r=E.r,c.g=E.g,c.b=E.b}l.add((d-l.r)*r,(v-l.g)*r,(m-l.b)*r,(p-l.a)*r),c.r+=(g-c.r)*r,c.g+=(y-c.g)*r,c.b+=(w-c.b)*r}}}}}])}(lt),St=function(t){function e(t,n,a){var i;return r(this,e),(i=_(this,e,[t,n,[$+"|"+a,K+"|"+a]])).slotIndex=0,i.slotIndex=a,i}return h(e,t),s(e,[{key:"getFrameEntries",value:function(){return 7}},{key:"setFrame",value:function(t,e,n,a,r,i,s,o){t*=7,this.frames[t]=e,this.frames[t+1]=n,this.frames[t+2]=a,this.frames[t+3]=r,this.frames[t+4]=i,this.frames[t+5]=s,this.frames[t+6]=o}},{key:"apply",value:function(t,e,n,a,r,i,s){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames,l=o.color,c=o.darkColor;if(nt){var i=this.frames[e];return n[a+1]*(t-i)/(n[a]-i)}var s=a+18;for(a+=2;a=t){var o=n[a-2],h=n[a-1];return h+(t-o)/(n[a]-o)*(n[a+1]-h)}var l=n[s-2],c=n[s-1];return c+(1-c)*(t-l)/(this.frames[e+this.getFrameEntries()]-l)}},{key:"apply",value:function(t,e,n,a,r,i,s){var o=t.slots[this.slotIndex];if(o.bone.active){var h=o.getAttachment();if(h&&h instanceof X&&h.timelineAttachment==this.attachment){var l=o.deform;0==l.length&&(i=O.setup);var c=this.vertices,u=c[0].length,f=this.frames;if(n=f[f.length-1]){var p=c[f.length-1];if(1==r)if(i==O.add){var g=h;if(g.bones)for(var y=0;yn)this.apply(t,e,Number.MAX_VALUE,a,r,i,s),e=-1;else if(e>=o[h-1])return;if(!(n0&&o[l-1]==c;)l--;for(;l=o[l];l++)a.push(this.events[l])}}}}])}(ht);Ct.propertyIds=[""+tt];var Mt=function(t){function e(t){var n;return r(this,e),(n=_(this,e,[t,e.propertyIds])).drawOrders=new Array(t),n}return h(e,t),s(e,[{key:"getFrameCount",value:function(){return this.frames.length}},{key:"setFrame",value:function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n}},{key:"apply",value:function(t,e,n,a,r,i,s){if(s!=D.mixOut)if(n>2];switch(d){case 0:var v=h[f];l=h[f+1],c=h[f+2],u=h[f+3];var m=(n-v)/(h[f+4]-v);l+=(h[f+4+1]-l)*m,c+=(h[f+4+2]-c)*m,u+=(h[f+4+3]-u)*m;break;case 1:l=h[f+1],c=h[f+2],u=h[f+3];break;default:l=this.getBezierValue(n,f,1,d-2),c=this.getBezierValue(n,f,2,d+18-2),u=this.getBezierValue(n,f,3,d+36-2)}if(i==O.setup){var p=o.data;o.mixRotate=p.mixRotate+(l-p.mixRotate)*r,o.mixX=p.mixX+(c-p.mixX)*r,o.mixY=p.mixY+(u-p.mixY)*r}else o.mixRotate+=(l-o.mixRotate)*r,o.mixX+=(c-o.mixX)*r,o.mixY+=(u-o.mixY)*r}}}}])}(lt),Nt=function(t){function e(t,n,a){var i;return r(this,e),(i=_(this,e,[t,[ot+"|"+n+"|"+a.sequence.id]])).slotIndex=n,i.attachment=a,i}return h(e,t),s(e,[{key:"getFrameEntries",value:function(){return e.ENTRIES}},{key:"getSlotIndex",value:function(){return this.slotIndex}},{key:"getAttachment",value:function(){return this.attachment}},{key:"setFrame",value:function(t,n,a,r,i){var s=this.frames;s[t*=e.ENTRIES]=n,s[t+e.MODE]=a|r<<4,s[t+e.DELAY]=i}},{key:"apply",value:function(t,n,a,r,i,s,o){var h=t.slots[this.slotIndex];if(h.bone.active){var l=h.attachment,c=this.attachment;if(l==c||l instanceof X&&l.timelineAttachment==c){var u=this.frames;if(a>4,g=this.attachment.sequence.regions.length,y=B[15&v];if(y!=L.hold)switch(p+=(a-d)/m+1e-5|0,y){case L.once:p=Math.min(g-1,p);break;case L.loop:p%=g;break;case L.pingpong:var w=(g<<1)-2;(p=0==w?0:p%w)>=g&&(p=w-p);break;case L.onceReverse:p=Math.max(g-1-p,0);break;case L.loopReverse:p=g-1-p%g;break;case L.pingpongReverse:var k=(g<<1)-2;(p=0==k?0:(p+g-1)%k)>=g&&(p=k-p)}h.sequenceIndex=p}}}}}}])}(ht);Nt.ENTRIES=3,Nt.MODE=1,Nt.DELAY=2;var Bt=function(){function t(e){r(this,t),this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Dt(this),this.propertyIDs=new b,this.animationsChanged=!1,this.trackEntryPool=new C((function(){return new Ot})),this.data=e}return s(t,[{key:"update",value:function(t){t*=this.timeScale;for(var e=this.tracks,n=0,a=e.length;n0){if(r.delay-=i,r.delay>0)continue;i=-r.delay,r.delay=0}var s=r.next;if(s){var o=r.trackLast-s.delay;if(o>=0){for(s.delay=0,s.trackTime+=0==r.timeScale?0:(o/r.timeScale+t)*s.timeScale,r.trackTime+=i,this.setCurrent(n,s,!0);s.mixingFrom;)s.mixTime+=t,s=s.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&!r.mixingFrom){e[n]=null,this.queue.end(r),this.clearNext(r);continue}if(r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for(r.mixingFrom=null,h&&(h.mixingTo=null);h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=i}}this.queue.drain()}},{key:"updateMixingFrom",value:function(t,e){var n=t.mixingFrom;if(!n)return!0;var a=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),a):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)}},{key:"apply",value:function(t){if(!t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,n=this.tracks,a=!1,r=0,i=n.length;r0)){a=!0;var o=0==r?O.first:s.mixBlend,h=s.alpha;s.mixingFrom?h*=this.applyMixingFrom(s,t,o):s.trackTime>=s.trackEnd&&!s.next&&(h=0);var l=s.animationLast,c=s.getAnimationTime(),u=c,f=e;s.reverse&&(u=s.animation.duration-u,f=null);var d=s.animation.timelines,v=d.length;if(0==r&&1==h||o==O.add)for(var m=0;m1&&(r=1),n!=O.first&&(n=a.mixBlend));var i=r0&&this.queueEvents(a,f),this.events.length=0,a.nextAnimationLast=f,a.nextTrackLast=a.trackTime,r}},{key:"applyAttachmentTimeline",value:function(t,e,n,a,r){var i=e.slots[t.slotIndex];i.bone.active&&(n0,p=d>=0;I.signum(v)!=I.signum(f)&&Math.abs(v)<=90&&(Math.abs(d)>180&&(d+=360*I.signum(d)),p=m),u=f+d-d%360,p!=m&&(u+=360*I.signum(d)),i[s]=u}i[s+1]=f,h.rotation=l+u*a}}else t.apply(e,0,n,null,1,r,D.mixIn)}},{key:"queueEvents",value:function(t,e){for(var n=t.animationStart,a=t.animationEnd,r=a-n,i=t.trackLast%r,s=this.events,o=0,h=s.length;oa||this.queue.event(t,l)}for((t.loop?0==r||i>t.trackTime%r:e>=a&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(e){this.queue.end(e),this.clearNext(e);for(var n=e;;){var a=n.mixingFrom;if(!a)break;this.queue.end(a),n.mixingFrom=null,n.mixingTo=null,n=a}this.tracks[e.trackIndex]=null,this.queue.drain()}}}},{key:"setCurrent",value:function(t,e,n){var a=this.expandToIndex(t);this.tracks[t]=e,e.previous=null,a&&(n&&this.queue.interrupt(a),e.mixingFrom=a,a.mixingTo=e,e.mixTime=0,a.mixingFrom&&a.mixDuration>0&&(e.interruptAlpha*=Math.min(1,a.mixTime/a.mixDuration)),a.timelinesRotation.length=0),this.queue.start(e)}},{key:"setAnimation",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=this.data.skeletonData.findAnimation(e);if(!a)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,a,n)}},{key:"setAnimationWith",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)throw new Error("animation cannot be null.");var a=!0,r=this.expandToIndex(t);r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.clearNext(r),r=r.mixingFrom,a=!1):this.clearNext(r));var i=this.trackEntry(t,e,n,r);return this.setCurrent(t,i,a),this.queue.drain(),i}},{key:"addAnimation",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=this.data.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,n,a)}},{key:"addAnimationWith",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(!e)throw new Error("animation cannot be null.");var r=this.expandToIndex(t);if(r)for(;r.next;)r=r.next;var i=this.trackEntry(t,e,n,r);return r?(r.next=i,i.previous=r,a<=0&&(a+=r.getTrackComplete()-i.mixDuration)):(this.setCurrent(t,i,!0),this.queue.drain()),i.delay=a,i}},{key:"setEmptyAnimation",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=this.setAnimationWith(e,t.emptyAnimation(),!1);return a.mixDuration=n,a.trackEnd=n,a}},{key:"addEmptyAnimation",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.addAnimationWith(e,t.emptyAnimation(),!1,a);return a<=0&&(r.delay+=r.mixDuration-n),r.mixDuration=n,r.trackEnd=n,r}},{key:"setEmptyAnimations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,a=this.tracks.length;n0){r[h]=jt,i[h]=u;continue t}break}r[h]=zt}else r[h]=Ut}}},{key:"getCurrent",value:function(t){return t>=this.tracks.length?null:this.tracks[t]}},{key:"addListener",value:function(t){if(!t)throw new Error("listener cannot be null.");this.listeners.push(t)}},{key:"removeListener",value:function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)}},{key:"clearListeners",value:function(){this.listeners.length=0}},{key:"clearListenerNotifications",value:function(){this.queue.clear()}}],[{key:"emptyAnimation",value:function(){return t._emptyAnimation}}])}();Bt._emptyAnimation=new V("",[],0);var _t,Ot=s((function t(){r(this,t),this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=O.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}),[{key:"reset",value:function(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}},{key:"getAnimationTime",value:function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}},{key:"setAnimationLast",value:function(t){this.animationLast=t,this.nextAnimationLast=t}},{key:"isComplete",value:function(){return this.trackTime>=this.animationEnd-this.animationStart}},{key:"resetRotationDirections",value:function(){this.timelinesRotation.length=0}},{key:"getTrackComplete",value:function(){var t=this.animationEnd-this.animationStart;if(0!=t){if(this.loop)return t*(1+(this.trackTime/t|0));if(this.trackTime0&&c&&c.length>0&&(u.names=l,u.values=c,l=null,c=null),u.u=u.x/h.width,u.v=u.y/h.height,90==u.degrees?(u.u2=(u.x+u.height)/h.width,u.v2=(u.y+u.width)/h.height):(u.u2=(u.x+u.width)/h.width,u.v2=(u.y+u.height)/h.height),this.regions.push(u)}else{for(h=new ie(o.trim());0!=n.readEntry(a,o=n.readLine());){var p=i[a[0]];p&&p(h)}this.pages.push(h)}}),[{key:"findRegion",value:function(t){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:"",a=g(this.pages);try{for(a.s();!(e=a.n()).done;){var r=e.value;r.setTexture(t.get(n+r.name))}}catch(t){a.e(t)}finally{a.f()}}},{key:"dispose",value:function(){for(var t,e=0;e=this.lines.length?null:this.lines[this.index++]}},{key:"readEntry",value:function(t,e){if(!e)return 0;if(0==(e=e.trim()).length)return 0;var n=e.indexOf(":");if(-1==n)return 0;t[0]=e.substr(0,n).trim();for(var a=1,r=n+1;;a++){var i=e.indexOf(",",r);if(-1==i)return t[a]=e.substr(r).trim(),a;if(t[a]=e.substr(r,i-r).trim(),r=i+1,4==a)return 4}}}]),ie=s((function t(e){r(this,t),this.minFilter=Qt.Nearest,this.magFilter=Qt.Nearest,this.uWrap=Zt.ClampToEdge,this.vWrap=Zt.ClampToEdge,this.texture=null,this.width=0,this.height=0,this.pma=!1,this.regions=new Array,this.name=e}),[{key:"setTexture",value:function(t){this.texture=t,t.setFilters(this.minFilter,this.magFilter),t.setWraps(this.uWrap,this.vWrap);var e,n=g(this.regions);try{for(n.s();!(e=n.n()).done;)e.value.texture=t}catch(t){n.e(t)}finally{n.f()}}}]),se=function(t){function e(t,n){var a,i,s,o;return r(this,e),i=this,s=l(s=e),(a=u(i,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(s,[],l(i).constructor):s.apply(i,o))).x=0,a.y=0,a.offsetX=0,a.offsetY=0,a.originalWidth=0,a.originalHeight=0,a.index=0,a.degrees=0,a.names=null,a.values=null,a.page=t,a.name=n,t.regions.push(a),a}return h(e,t),s(e)}(ee);var oe=function(t){function e(t,n){var a,i,s,o;return r(this,e),i=this,o=[t],s=l(s=e),(a=u(i,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(s,o||[],l(i).constructor):s.apply(i,o))).region=null,a.regionUVs=[],a.uvs=[],a.triangles=[],a.color=new x(1,1,1,1),a.width=0,a.height=0,a.hullLength=0,a.edges=[],a.parentMesh=null,a.sequence=null,a.tempColor=new x(0,0,0,0),a.path=n,a}return h(e,t),s(e,[{key:"updateRegion",value:function(){if(!this.region)throw new Error("Region not set.");var t=this.regionUVs;this.uvs&&this.uvs.length==t.length||(this.uvs=R.newFloatArray(t.length));var e=this.uvs,n=this.uvs.length,a=this.region.u,r=this.region.v,i=0,s=0;if(this.region instanceof se){var o=this.region,h=o.page.texture.getImage(),l=h.width,c=h.height;switch(o.degrees){case 90:a-=(o.originalHeight-o.offsetY-o.height)/l,r-=(o.originalWidth-o.offsetX-o.width)/c,i=o.originalHeight/l,s=o.originalWidth/c;for(var u=0;u= 0.");if(!n)throw new Error("name cannot be null.");this.index=e,this.name=n,this.parent=a}));!function(t){t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection"}(ue||(ue={}));var ve=s((function t(e,n,a){if(r(this,t),this.parent=null,this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,!e)throw new Error("data cannot be null.");if(!n)throw new Error("skeleton cannot be null.");this.data=e,this.skeleton=n,this.parent=a,this.setToSetupPose()}),[{key:"isActive",value:function(){return this.active}},{key:"update",value:function(){this.updateWorldTransformWith(this.ax,this.ay,this.arotation,this.ascaleX,this.ascaleY,this.ashearX,this.ashearY)}},{key:"updateWorldTransform",value:function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)}},{key:"updateWorldTransformWith",value:function(t,e,n,a,r,i,s){this.ax=t,this.ay=e,this.arotation=n,this.ascaleX=a,this.ascaleY=r,this.ashearX=i,this.ashearY=s;var o=this.parent;if(!o){var h=this.skeleton,l=n+90+s,c=h.scaleX,u=h.scaleY;return this.a=I.cosDeg(n+i)*a*c,this.b=I.cosDeg(l)*r*c,this.c=I.sinDeg(n+i)*a*u,this.d=I.sinDeg(l)*r*u,this.worldX=t*c+h.x,void(this.worldY=e*u+h.y)}var f=o.a,d=o.b,v=o.c,m=o.d;switch(this.worldX=f*t+d*e+o.worldX,this.worldY=v*t+m*e+o.worldY,this.data.transformMode){case ue.Normal:var p=n+90+s,g=I.cosDeg(n+i)*a,y=I.cosDeg(p)*r,w=I.sinDeg(n+i)*a,k=I.sinDeg(p)*r;return this.a=f*g+d*w,this.b=f*y+d*k,this.c=v*g+m*w,void(this.d=v*y+m*k);case ue.OnlyTranslation:var b=n+90+s;this.a=I.cosDeg(n+i)*a,this.b=I.cosDeg(b)*r,this.c=I.sinDeg(n+i)*a,this.d=I.sinDeg(b)*r;break;case ue.NoRotationOrReflection:var x=f*f+v*v,E=0;x>1e-4?(x=Math.abs(f*m-d*v)/x,f/=this.skeleton.scaleX,d=(v/=this.skeleton.scaleY)*x,m=f*x,E=Math.atan2(v,f)*I.radDeg):(f=0,v=0,E=90-Math.atan2(m,d)*I.radDeg);var A=n+i-E,S=n+s-E+90,R=I.cosDeg(A)*a,T=I.cosDeg(S)*r,C=I.sinDeg(A)*a,M=I.sinDeg(S)*r;this.a=f*R-d*C,this.b=f*T-d*M,this.c=v*R+m*C,this.d=v*T+m*M;break;case ue.NoScale:case ue.NoScaleOrReflection:var F=I.cosDeg(n),Y=I.sinDeg(n),P=(f*F+d*Y)/this.skeleton.scaleX,X=(v*F+m*Y)/this.skeleton.scaleY,L=Math.sqrt(P*P+X*X);L>1e-5&&(L=1/L),P*=L,X*=L,L=Math.sqrt(P*P+X*X),this.data.transformMode==ue.NoScale&&f*m-d*v<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(L=-L);var N=Math.PI/2+Math.atan2(X,P),B=Math.cos(N)*L,_=Math.sin(N)*L,O=I.cosDeg(i)*a,D=I.cosDeg(90+s)*r,V=I.sinDeg(i)*a,U=I.sinDeg(90+s)*r;this.a=P*O+B*V,this.b=P*D+B*U,this.c=X*O+_*V,this.d=X*D+_*U}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY}},{key:"setToSetupPose",value:function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY}},{key:"getWorldRotationX",value:function(){return Math.atan2(this.c,this.a)*I.radDeg}},{key:"getWorldRotationY",value:function(){return Math.atan2(this.d,this.b)*I.radDeg}},{key:"getWorldScaleX",value:function(){return Math.sqrt(this.a*this.a+this.c*this.c)}},{key:"getWorldScaleY",value:function(){return Math.sqrt(this.b*this.b+this.d*this.d)}},{key:"updateAppliedTransform",value:function(){var t=this.parent;if(!t)return this.ax=this.worldX-this.skeleton.x,this.ay=this.worldY-this.skeleton.y,this.arotation=Math.atan2(this.c,this.a)*I.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*I.radDeg);var e=t.a,n=t.b,a=t.c,r=t.d,i=1/(e*r-n*a),s=this.worldX-t.worldX,o=this.worldY-t.worldY;this.ax=s*r*i-o*n*i,this.ay=o*e*i-s*a*i;var h=i*r,l=i*e,c=i*n,u=i*a,f=h*this.a-c*this.c,d=h*this.b-c*this.d,v=l*this.c-u*this.a,m=l*this.d-u*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+v*v),this.ascaleX>1e-4){var p=f*m-d*v;this.ascaleY=p/this.ascaleX,this.ashearY=Math.atan2(f*d+v*m,p)*I.radDeg,this.arotation=Math.atan2(v,f)*I.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(d*d+m*m),this.ashearY=0,this.arotation=90-Math.atan2(m,d)*I.radDeg}},{key:"worldToLocal",value:function(t){var e=1/(this.a*this.d-this.b*this.c),n=t.x-this.worldX,a=t.y-this.worldY;return t.x=n*this.d*e-a*this.b*e,t.y=a*this.a*e-n*this.c*e,t}},{key:"localToWorld",value:function(t){var e=t.x,n=t.y;return t.x=e*this.a+n*this.b+this.worldX,t.y=e*this.c+n*this.d+this.worldY,t}},{key:"worldToLocalRotation",value:function(t){var e=I.sinDeg(t),n=I.cosDeg(t);return Math.atan2(this.a*e-this.c*n,this.d*n-this.b*e)*I.radDeg+this.rotation-this.shearX}},{key:"localToWorldRotation",value:function(t){t-=this.rotation-this.shearX;var e=I.sinDeg(t),n=I.cosDeg(t);return Math.atan2(n*this.c+e*this.d,n*this.a+e*this.b)*I.radDeg}},{key:"rotateWorld",value:function(t){var e=this.a,n=this.b,a=this.c,r=this.d,i=I.cosDeg(t),s=I.sinDeg(t);this.a=i*e-s*a,this.b=i*n-s*r,this.c=s*e+i*a,this.d=s*n+i*r}}]),me=s((function t(e,n,a){r(this,t),this.name=e,this.order=n,this.skinRequired=a})),pe=s((function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new ge;r(this,t),this.pathPrefix="",this.assets={},this.errors={},this.toLoad=0,this.loaded=0,this.textureLoader=e,this.pathPrefix=n,this.downloader=a}),[{key:"start",value:function(t){return this.toLoad++,this.pathPrefix+t}},{key:"success",value:function(t,e,n){this.toLoad--,this.loaded++,this.assets[e]=n,t&&t(e,n)}},{key:"error",value:function(t,e,n){this.toLoad--,this.loaded++,this.errors[e]=n,t&&t(e,n)}},{key:"loadAll",value:function(){var t=this;return new Promise((function(e,n){requestAnimationFrame((function a(){t.isLoadingComplete()?t.hasErrors()?n(t.errors):e(t):requestAnimationFrame(a)}))}))}},{key:"setRawDataURI",value:function(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}},{key:"loadBinary",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};t=this.start(t),this.downloader.downloadBinary(t,(function(a){e.success(n,t,a)}),(function(n,r){e.error(a,t,"Couldn't load binary ".concat(t,": status ").concat(n,", ").concat(r))}))}},{key:"loadText",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};t=this.start(t),this.downloader.downloadText(t,(function(a){e.success(n,t,a)}),(function(n,r){e.error(a,t,"Couldn't load text ".concat(t,": status ").concat(n,", ").concat(r))}))}},{key:"loadJson",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};t=this.start(t),this.downloader.downloadJson(t,(function(a){e.success(n,t,a)}),(function(n,r){e.error(a,t,"Couldn't load JSON ".concat(t,": status ").concat(n,", ").concat(r))}))}},{key:"loadTexture",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(t=this.start(t),"undefined"!=typeof window&&"undefined"!=typeof navigator&&window.document){var r=new Image;r.crossOrigin="anonymous",r.onload=function(){e.success(n,t,e.textureLoader(r))},r.onerror=function(){e.error(a,t,"Couldn't load image: ".concat(t))},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),r.src=t}else fetch(t,{mode:"cors"}).then((function(n){return n.ok?n.blob():(e.error(a,t,"Couldn't load image: ".concat(t)),null)})).then((function(t){return t?createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null})).then((function(a){a&&e.success(n,t,e.textureLoader(a))}))}},{key:"loadTextureAtlas",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=arguments.length>3?arguments[3]:void 0,i=t.lastIndexOf("/"),s=i>=0?t.substring(0,i+1):"";t=this.start(t),this.downloader.downloadText(t,(function(i){try{var o,h=new ae(i),l=h.pages.length,c=!1,u=g(h.pages);try{var f=function(){var i=o.value;e.loadTexture(r?r[i.name]:s+i.name,(function(a,r){c||(i.setTexture(r),0==--l&&e.success(n,t,h))}),(function(n,r){c||e.error(a,t,"Couldn't load texture atlas ".concat(t," page image: ").concat(n)),c=!0}))};for(u.s();!(o=u.n()).done;)f()}catch(t){u.e(t)}finally{u.f()}}catch(n){e.error(a,t,"Couldn't parse texture atlas ".concat(t,": ").concat(n.message))}}),(function(n,r){e.error(a,t,"Couldn't load texture atlas ".concat(t,": status ").concat(n,", ").concat(r))}))}},{key:"get",value:function(t){return this.assets[this.pathPrefix+t]}},{key:"require",value:function(t){t=this.pathPrefix+t;var e=this.assets[t];if(e)return e;var n=this.errors[t];throw Error("Asset not found: "+t+(n?"\n"+n:""))}},{key:"remove",value:function(t){t=this.pathPrefix+t;var e=this.assets[t];return e.dispose&&e.dispose(),delete this.assets[t],e}},{key:"removeAll",value:function(){for(var t in this.assets){var e=this.assets[t];e.dispose&&e.dispose()}this.assets={}}},{key:"isLoadingComplete",value:function(){return 0==this.toLoad}},{key:"getToLoad",value:function(){return this.toLoad}},{key:"getLoaded",value:function(){return this.loaded}},{key:"dispose",value:function(){this.removeAll()}},{key:"hasErrors",value:function(){return Object.keys(this.errors).length>0}},{key:"getErrors",value:function(){return this.errors}}]),ge=s((function t(){r(this,t),this.callbacks={},this.rawDataUris={}}),[{key:"dataUriToString",value:function(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");var e=t.indexOf("base64,");return-1!=e?(e+=7,atob(t.substr(e))):t.substr(t.indexOf(",")+1)}},{key:"base64ToUint8Array",value:function(t){for(var e=window.atob(t),n=e.length,a=new Uint8Array(n),r=0;r180?f-=360:f<-180&&(f+=360);var b=t.ascaleX,x=t.ascaleY;if(a||r){switch(t.data.transformMode){case ue.NoScale:case ue.NoScaleOrReflection:d=e-t.worldX,v=n-t.worldY}var E=t.data.length*b,A=Math.sqrt(d*d+v*v);if(a&&AE&&E>1e-4){var S=(A/E-1)*s+1;b*=S,i&&(x*=S)}}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+f*s,b,x,t.ashearX,t.ashearY)}},{key:"apply2",value:function(t,e,n,a,r,i,s,o,h){var l=t.ax,c=t.ay,u=t.ascaleX,f=t.ascaleY,d=u,v=f,m=e.ascaleX,p=0,g=0,y=0;u<0?(u=-u,p=180,y=-1):(p=0,y=1),f<0&&(f=-f,y=-y),m<0?(m=-m,g=180):g=0;var w=e.ax,k=0,b=0,x=0,E=t.a,A=t.b,S=t.c,R=t.d,T=Math.abs(u-f)<=1e-4;!T||i?(k=0,b=E*w+t.worldX,x=S*w+t.worldY):(b=E*w+A*(k=e.ay)+t.worldX,x=S*w+R*k+t.worldY);var C=t.parent;if(!C)throw new Error("IK parent must itself have a parent.");E=C.a,A=C.b,S=C.c;var M,F,Y=E*(R=C.d)-A*S,P=b-C.worldX,X=x-C.worldY,L=(P*R-X*A)*(Y=Math.abs(Y)<=1e-4?0:1/Y)-l,N=(X*E-P*S)*Y-c,B=Math.sqrt(L*L+N*N),_=e.data.length*m;if(B<1e-4)return this.apply1(t,n,a,!1,i,!1,h),void e.updateWorldTransformWith(w,k,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);var O=((P=n-C.worldX)*R-(X=a-C.worldY)*A)*Y-l,D=(X*E-P*S)*Y-c,V=O*O+D*D;if(0!=o){o*=u*(m+1)*.5;var U=Math.sqrt(V),q=U-B-_*u+o;if(q>0){var W=Math.min(1,q/(2*o))-1;V=(O-=(W=(q-o*(1-W*W))/U)*O)*O+(D-=W*D)*D}}t:if(T){var z=(V-B*B-(_*=u)*_)/(2*B*_);z<-1?(z=-1,F=Math.PI*r):z>1?(z=1,F=0,i&&(d*=E=(Math.sqrt(V)/(B+_)-1)*h+1,s&&(v*=E))):F=Math.acos(z)*r,E=B+_*z,A=_*Math.sin(F),M=Math.atan2(D*E-O*A,O*E+D*A)}else{var j=(E=u*_)*E,G=(A=f*_)*A,H=Math.atan2(D,O),$=-2*G*B,J=G-j;if((R=$*$-4*J*(S=G*B*B+j*V-j*G))>=0){var K=Math.sqrt(R);$<0&&(K=-K);var Q=(K=.5*-($+K))/J,Z=S/K,tt=Math.abs(Q)=-1&&S<=1&&(S=Math.acos(S),(R=(P=E*Math.cos(S)+B)*P+(X=A*Math.sin(S))*X)ot&&(it=S,ot=R,st=P,ht=X)),V<=.5*(at+ot)?(M=H-Math.atan2(rt*r,nt),F=et*r):(M=H-Math.atan2(ht*r,st),F=it*r)}var lt=Math.atan2(k,w)*y,ct=t.arotation;(M=(M-lt)*I.radDeg+p-ct)>180?M-=360:M<-180&&(M+=360),t.updateWorldTransformWith(l,c,ct+M*h,d,v,0,0),ct=e.arotation,(F=((F+lt)*I.radDeg-e.ashearX)*y+g-ct)>180?F-=360:F<-180&&(F+=360),e.updateWorldTransformWith(w,k,ct+F*h,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}}]);var be=function(t){function e(t){var n,a,i,s;return r(this,e),a=this,s=[t,0,!1],i=l(i=e),(n=u(a,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(i,s||[],l(a).constructor):i.apply(a,s))).bones=new Array,n._target=null,n.bendDirection=1,n.compress=!1,n.stretch=!1,n.uniform=!1,n.mix=1,n.softness=0,n}return h(e,t),s(e,[{key:"target",get:function(){if(this._target)return this._target;throw new Error("BoneData not set.")},set:function(t){this._target=t}}])}(me);var xe,Ie,Ee,Ae=function(t){function e(t){var n,a,i,s;return r(this,e),a=this,s=[t,0,!1],i=l(i=e),(n=u(a,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(i,s||[],l(a).constructor):i.apply(a,s))).bones=new Array,n._target=null,n.positionMode=xe.Fixed,n.spacingMode=Ie.Fixed,n.rotateMode=Ee.Chain,n.offsetRotation=0,n.position=0,n.spacing=0,n.mixRotate=0,n.mixX=0,n.mixY=0,n}return h(e,t),s(e,[{key:"target",get:function(){if(this._target)return this._target;throw new Error("SlotData not set.")},set:function(t){this._target=t}}])}(me);!function(t){t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent"}(xe||(xe={})),function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent",t[t.Proportional=3]="Proportional"}(Ie||(Ie={})),function(t){t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale"}(Ee||(Ee={}));var Se=function(){function t(e,n){if(r(this,t),this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!e)throw new Error("data cannot be null.");if(!n)throw new Error("skeleton cannot be null.");this.data=e,this.bones=new Array;for(var a=0,i=e.bones.length;a0){k=c/k*d;for(var M=1;M0?I.degRad:-I.degRad}for(var z=0,j=3;z0){var tt=G.a,et=G.b,nt=G.c,at=G.d,rt=0,it=0,st=0;if(rt=s?O[j-1]:0==u[z+1]?O[j+2]:Math.atan2(K,J),rt-=Math.atan2(nt,tt),q){it=Math.cos(rt),st=Math.sin(rt);var ot=G.data.length;D+=(ot*(it*tt-st*nt)-J)*n,V+=(ot*(st*tt+it*nt)-K)*n}else rt+=U;rt>I.PI?rt-=I.PI2:rt<-I.PI&&(rt+=I.PI2),rt*=n,it=Math.cos(rt),st=Math.sin(rt),G.a=it*tt-st*nt,G.b=it*et-st*at,G.c=st*tt+it*nt,G.d=st*et+it*at}G.updateAppliedTransform()}}}}},{key:"computeWorldPositions",value:function(e,n,a){var r=this.target,i=this.position,s=this.spaces,o=R.setArraySize(this.positions,3*n+2),h=this.world,l=e.closed,c=e.worldVerticesLength,u=c/6,f=t.NONE;if(!e.constantSpeed){var d,v=e.lengths,m=v[u-=l?1:2];switch(this.data.positionMode==xe.Percent&&(i*=m),this.data.spacingMode){case Ie.Percent:d=m;break;case Ie.Proportional:d=m/n;break;default:d=1}h=R.setArraySize(this.world,8);for(var p=0,g=0,y=0;pm){f!=t.AFTER&&(f=t.AFTER,e.computeWorldVertices(r,c-6,4,h,0,2)),this.addAfterPosition(k-m,h,0,o,g);continue}}for(;;y++){var b=v[y];if(!(k>b)){if(0==y)k/=b;else{var x=v[y-1];k=(k-x)/(b-x)}break}}y!=f&&(f=y,l&&y==u?(e.computeWorldVertices(r,c-4,4,h,0,2),e.computeWorldVertices(r,0,4,h,4,2)):e.computeWorldVertices(r,6*y+2,8,h,0,2)),this.addCurvePosition(k,h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],o,g,a||p>0&&0==w)}return o}l?(c+=2,h=R.setArraySize(this.world,c),e.computeWorldVertices(r,2,c-4,h,0,2),e.computeWorldVertices(r,0,2,h,c-4,2),h[c-2]=h[0],h[c-1]=h[1]):(u--,c-=4,h=R.setArraySize(this.world,c),e.computeWorldVertices(r,2,c,h,0,2));for(var I,E=R.setArraySize(this.curves,u),A=0,S=h[0],T=h[1],C=0,M=0,F=0,Y=0,P=0,X=0,L=0,N=0,B=0,_=0,O=0,D=0,V=0,U=0,q=0,W=2;qA){this.addAfterPosition(Q-A,h,c-4,o,H);continue}}for(;;$++){var Z=E[$];if(!(Q>Z)){if(0==$)Q/=Z;else{var tt=E[$-1];Q=(Q-tt)/(Z-tt)}break}}if($!=f){f=$;var et=6*$;for(S=h[et],T=h[et+1],C=h[et+2],M=h[et+3],F=h[et+4],Y=h[et+5],O=2*(L=.03*(S-2*C+F))+(B=.006*(3*(C-F)-S+(P=h[et+6]))),D=2*(N=.03*(T-2*M+Y))+(_=.006*(3*(M-Y)-T+(X=h[et+7]))),V=.3*(C-S)+L+.16666667*B,U=.3*(M-T)+N+.16666667*_,j=Math.sqrt(V*V+U*U),z[0]=j,et=1;et<8;et++)V+=O,U+=D,O+=B,D+=_,j+=Math.sqrt(V*V+U*U),z[et]=j;V+=O,U+=D,j+=Math.sqrt(V*V+U*U),z[8]=j,V+=O+B,U+=D+_,j+=Math.sqrt(V*V+U*U),z[9]=j,J=0}for(Q*=j;;J++){var nt=z[J];if(!(Q>nt)){if(0==J)Q/=nt;else{var at=z[J-1];Q=J+(Q-at)/(nt-at)}break}}this.addCurvePosition(.1*Q,S,T,C,M,F,Y,P,X,o,H,a||G>0&&0==K)}return o}},{key:"addBeforePosition",value:function(t,e,n,a,r){var i=e[n],s=e[n+1],o=e[n+2]-i,h=e[n+3]-s,l=Math.atan2(h,o);a[r]=i+t*Math.cos(l),a[r+1]=s+t*Math.sin(l),a[r+2]=l}},{key:"addAfterPosition",value:function(t,e,n,a,r){var i=e[n+2],s=e[n+3],o=i-e[n],h=s-e[n+1],l=Math.atan2(h,o);a[r]=i+t*Math.cos(l),a[r+1]=s+t*Math.sin(l),a[r+2]=l}},{key:"addCurvePosition",value:function(t,e,n,a,r,i,s,o,h,l,c,u){if(0==t||isNaN(t))return l[c]=e,l[c+1]=n,void(l[c+2]=Math.atan2(r-n,a-e));var f=t*t,d=f*t,v=1-t,m=v*v,p=m*v,g=v*t,y=3*g,w=v*y,k=y*t,b=e*p+a*w+i*k+o*d,x=n*p+r*w+s*k+h*d;l[c]=b,l[c+1]=x,u&&(l[c+2]=t<.001?Math.atan2(r-n,a-e):Math.atan2(x-(n*m+r*g*2+s*f),b-(e*m+a*g*2+i*f)))}}])}();Se.NONE=-1,Se.BEFORE=-2,Se.AFTER=-3,Se.epsilon=1e-5;var Re=s((function t(e,n){if(r(this,t),this.darkColor=null,this.attachment=null,this.attachmentState=0,this.sequenceIndex=-1,this.deform=new Array,!e)throw new Error("data cannot be null.");if(!n)throw new Error("bone cannot be null.");this.data=e,this.bone=n,this.color=new x,this.darkColor=e.darkColor?new x:null,this.setToSetupPose()}),[{key:"getSkeleton",value:function(){return this.bone.skeleton}},{key:"getAttachment",value:function(){return this.attachment}},{key:"setAttachment",value:function(t){this.attachment!=t&&(t instanceof X&&this.attachment instanceof X&&t.timelineAttachment==this.attachment.timelineAttachment||(this.deform.length=0),this.attachment=t,this.sequenceIndex=-1)}},{key:"setToSetupPose",value:function(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}}]),Te=s((function t(e,n){if(r(this,t),this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new M,this.active=!1,!e)throw new Error("data cannot be null.");if(!n)throw new Error("skeleton cannot be null.");this.data=e,this.mixRotate=e.mixRotate,this.mixX=e.mixX,this.mixY=e.mixY,this.mixScaleX=e.mixScaleX,this.mixScaleY=e.mixScaleY,this.mixShearY=e.mixShearY,this.bones=new Array;for(var a=0;a0?I.degRad:-I.degRad,d=this.data.offsetRotation*f,v=this.data.offsetShearY*f,m=this.bones,p=0,g=m.length;pI.PI?E-=I.PI2:E<-I.PI&&(E+=I.PI2),E*=t;var A=Math.cos(E),S=Math.sin(E);y.a=A*w-S*b,y.b=A*k-S*x,y.c=S*w+A*b,y.d=S*k+A*x}if(s){var R=this.temp;o.localToWorld(R.set(this.data.offsetX,this.data.offsetY)),y.worldX+=(R.x-y.worldX)*e,y.worldY+=(R.y-y.worldY)*n}if(0!=a){var T=Math.sqrt(y.a*y.a+y.c*y.c);0!=T&&(T=(T+(Math.sqrt(h*h+c*c)-T+this.data.offsetScaleX)*a)/T),y.a*=T,y.c*=T}if(0!=r){var C=Math.sqrt(y.b*y.b+y.d*y.d);0!=C&&(C=(C+(Math.sqrt(l*l+u*u)-C+this.data.offsetScaleY)*r)/C),y.b*=C,y.d*=C}if(i>0){var M=y.b,F=y.d,Y=Math.atan2(F,M),P=Math.atan2(u,l)-Math.atan2(c,h)-(Y-Math.atan2(y.c,y.a));P>I.PI?P-=I.PI2:P<-I.PI&&(P+=I.PI2),P=Y+(P+v)*i;var X=Math.sqrt(M*M+F*F);y.b=Math.cos(P)*X,y.d=Math.sin(P)*X}y.updateAppliedTransform()}}},{key:"applyRelativeWorld",value:function(){for(var t=this.mixRotate,e=this.mixX,n=this.mixY,a=this.mixScaleX,r=this.mixScaleY,i=this.mixShearY,s=0!=e||0!=n,o=this.target,h=o.a,l=o.b,c=o.c,u=o.d,f=h*u-l*c>0?I.degRad:-I.degRad,d=this.data.offsetRotation*f,v=this.data.offsetShearY*f,m=this.bones,p=0,g=m.length;pI.PI?E-=I.PI2:E<-I.PI&&(E+=I.PI2),E*=t;var A=Math.cos(E),S=Math.sin(E);y.a=A*w-S*b,y.b=A*k-S*x,y.c=S*w+A*b,y.d=S*k+A*x}if(s){var R=this.temp;o.localToWorld(R.set(this.data.offsetX,this.data.offsetY)),y.worldX+=R.x*e,y.worldY+=R.y*n}if(0!=a){var T=(Math.sqrt(h*h+c*c)-1+this.data.offsetScaleX)*a+1;y.a*=T,y.c*=T}if(0!=r){var C=(Math.sqrt(l*l+u*u)-1+this.data.offsetScaleY)*r+1;y.b*=C,y.d*=C}if(i>0){var M=Math.atan2(u,l)-Math.atan2(c,h);M>I.PI?M-=I.PI2:M<-I.PI&&(M+=I.PI2);var F=y.b,Y=y.d;M=Math.atan2(Y,F)+(M-I.PI/2+v)*i;var P=Math.sqrt(F*F+Y*Y);y.b=Math.cos(M)*P,y.d=Math.sin(M)*P}y.updateAppliedTransform()}}},{key:"applyAbsoluteLocal",value:function(){for(var t=this.mixRotate,e=this.mixX,n=this.mixY,a=this.mixScaleX,r=this.mixScaleY,i=this.mixShearY,s=this.target,o=this.bones,h=0,l=o.length;h2&&void 0!==arguments[2]?arguments[2]:new Array(2);if(!t)throw new Error("offset cannot be null.");if(!e)throw new Error("size cannot be null.");for(var a=this.drawOrder,r=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY,h=0,l=a.length;h0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0;r(this,t),this.slotIndex=e,this.name=n,this.attachment=a})),Pe=s((function t(e){if(r(this,t),this.attachments=new Array,this.bones=Array(),this.constraints=new Array,!e)throw new Error("name cannot be null.");this.name=e}),[{key:"setAttachment",value:function(t,e,n){if(!n)throw new Error("attachment cannot be null.");var a=this.attachments;t>=a.length&&(a.length=t+1),a[t]||(a[t]={}),a[t][e]=n}},{key:"addSkin",value:function(t){for(var e=0;e= 0.");if(!n)throw new Error("name cannot be null.");if(!a)throw new Error("boneData cannot be null.");this.index=e,this.name=n,this.boneData=a}));!function(t){t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen"}(Me||(Me={}));var Le,Ne=function(t){function e(t){var n,a,i,s;return r(this,e),a=this,s=[t,0,!1],i=l(i=e),(n=u(a,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(i,s||[],l(a).constructor):i.apply(a,s))).bones=new Array,n._target=null,n.mixRotate=0,n.mixX=0,n.mixY=0,n.mixScaleX=0,n.mixScaleY=0,n.mixShearY=0,n.offsetRotation=0,n.offsetX=0,n.offsetY=0,n.offsetScaleX=0,n.offsetScaleY=0,n.offsetShearY=0,n.relative=!1,n.local=!1,n}return h(e,t),s(e,[{key:"target",get:function(){if(this._target)return this._target;throw new Error("BoneData not set.")},set:function(t){this._target=t}}])}(me),Be=s((function t(e){r(this,t),this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=e}),[{key:"readSkeletonData",value:function(t){var e=this.scale,n=new Fe;n.name="";var a=new _e(t),r=a.readInt32(),i=a.readInt32();n.hash=0==i&&0==r?null:i.toString(16)+r.toString(16),n.version=a.readString(),n.x=a.readFloat(),n.y=a.readFloat(),n.width=a.readFloat(),n.height=a.readFloat();var s=a.readBoolean();s&&(n.fps=a.readFloat(),n.imagesPath=a.readString(),n.audioPath=a.readString());var o=0;o=a.readInt(!0);for(var h=0;h>4,t.readFloat())}a.push(ba)}}var Aa=t.readInt(!0);if(Aa>0){for(var Sa=new Mt(Aa),Ra=n.slots.length,Ta=0;Ta=0;Ya--)Fa[Ya]=-1;for(var Pa=R.newArray(Ra-Ma,0),Xa=0,La=0,Na=0;Na=0;_a--)-1==Fa[_a]&&(Fa[_a]=Pa[--La]);Sa.setFrame(Ta,Ca,Fa)}a.push(Sa)}var Oa=t.readInt(!0);if(Oa>0){for(var Da=new Ct(Oa),Va=0;Va1&&void 0!==arguments[1]?arguments[1]:new Array,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new DataView(e.buffer);r(this,t),this.strings=n,this.index=a,this.buffer=i}),[{key:"readByte",value:function(){return this.buffer.getInt8(this.index++)}},{key:"readUnsignedByte",value:function(){return this.buffer.getUint8(this.index++)}},{key:"readShort",value:function(){var t=this.buffer.getInt16(this.index);return this.index+=2,t}},{key:"readInt32",value:function(){var t=this.buffer.getInt32(this.index);return this.index+=4,t}},{key:"readInt",value:function(t){var e=this.readByte(),n=127&e;return 0!=(128&e)&&(n|=(127&(e=this.readByte()))<<7,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<14,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<21,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<28)))),t?n:n>>>1^-(1&n)}},{key:"readStringRef",value:function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]}},{key:"readString",value:function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n>4){case 12:case 13:e+=String.fromCharCode((31&a)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&a)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(a),n++}}return e}},{key:"readFloat",value:function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t}},{key:"readBoolean",value:function(){return 0!=this.readByte()}}]),Oe=s((function t(e,n,a,i,s){r(this,t),this.mesh=e,this.skin=n,this.slotIndex=a,this.parent=i,this.inheritTimeline=s})),De=s((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;r(this,t),this.bones=e,this.vertices=n}));function Ve(t,e,n){for(var a=t.readFloat(),r=t.readFloat()*n,i=0,s=0,o=e.getFrameCount()-1;e.setFrame(i,a,r),i!=o;i++){var h=t.readFloat(),l=t.readFloat()*n;switch(t.readByte()){case dn:e.setStepped(i);break;case vn:qe(t,e,s++,i,0,a,h,r,l,n)}a=h,r=l}return e}function Ue(t,e,n){for(var a=t.readFloat(),r=t.readFloat()*n,i=t.readFloat()*n,s=0,o=0,h=e.getFrameCount()-1;e.setFrame(s,a,r,i),s!=h;s++){var l=t.readFloat(),c=t.readFloat()*n,u=t.readFloat()*n;switch(t.readByte()){case dn:e.setStepped(s);break;case vn:qe(t,e,o++,s,0,a,l,r,c,n),qe(t,e,o++,s,1,a,l,i,u,n)}a=l,r=c,i=u}return e}function qe(t,e,n,a,r,i,s,o,h,l){e.setBezier(n,a,r,i,o,t.readFloat(),t.readFloat()*l,t.readFloat(),t.readFloat()*l,s,h)}!function(t){t[t.Region=0]="Region",t[t.BoundingBox=1]="BoundingBox",t[t.Mesh=2]="Mesh",t[t.LinkedMesh=3]="LinkedMesh",t[t.Path=4]="Path",t[t.Point=5]="Point",t[t.Clipping=6]="Clipping"}(Le||(Le={}));var We,ze=0,je=1,Ge=2,He=3,$e=4,Je=5,Ke=6,Qe=7,Ze=8,tn=9,en=0,nn=1,an=2,rn=3,sn=4,on=5,hn=0,ln=1,cn=0,un=1,fn=2,dn=1,vn=2,mn=s((function t(){r(this,t),this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new C((function(){return R.newFloatArray(16)}))}),[{key:"update",value:function(t,e){if(!t)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,a=this.polygons,r=this.polygonPool,i=t.slots,s=i.length;n.length=0,r.freeAll(a),a.length=0;for(var o=0;o=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY}},{key:"aabbIntersectsSegment",value:function(t,e,n,a){var r=this.minX,i=this.minY,s=this.maxX,o=this.maxY;if(t<=r&&n<=r||e<=i&&a<=i||t>=s&&n>=s||e>=o&&a>=o)return!1;var h=(a-e)/(n-t),l=h*(r-t)+e;if(l>i&&li&&lr&&cr&&ct.minX&&this.minYt.minY}},{key:"containsPoint",value:function(t,e){for(var n=this.polygons,a=0,r=n.length;a=n||l=n){var c=a[o];c+(n-h)/(l-h)*(a[i]-c)=c&&w<=d||w>=d&&w<=c)&&(w>=e&&w<=a||w>=a&&w<=e)){var k=(l*g-h*m)/y;if((k>=u&&k<=v||k>=v&&k<=u)&&(k>=n&&k<=r||k>=r&&k<=n))return!0}c=d,u=v}return!1}},{key:"getPolygon",value:function(t){if(!t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]}},{key:"getWidth",value:function(){return this.maxX-this.minX}},{key:"getHeight",value:function(){return this.maxY-this.minY}}]),pn=function(){function t(){r(this,t),this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new C((function(){return new Array})),this.polygonIndicesPool=new C((function(){return new Array}))}return s(t,[{key:"triangulate",value:function(e){var n=e,a=e.length>>1,r=this.indicesArray;r.length=0;for(var i=0;i3;){for(var c=a-1,u=0,f=1;;){t:if(!s[u]){for(var d=r[c]<<1,v=r[u]<<1,m=r[f]<<1,p=n[d],g=n[d+1],y=n[v],w=n[v+1],k=n[m],b=n[m+1],x=(f+1)%a;x!=c;x=(x+1)%a)if(s[x]){var I=r[x]<<1,E=n[I],A=n[I+1];if(t.positiveArea(k,b,p,g,E,A)&&t.positiveArea(p,g,y,w,E,A)&&t.positiveArea(y,w,k,b,E,A))break t}break}if(0==f){do{if(!s[u])break;u--}while(u>0);break}c=u,u=f,f=(f+1)%a}l.push(r[(a+u-1)%a]),l.push(r[u]),l.push(r[(u+1)%a]),r.splice(u,1),s.splice(u,1);var S=(--a+u-1)%a,R=u==a?0:u;s[S]=t.isConcave(S,a,n,r),s[R]=t.isConcave(R,a,n,r)}return 3==a&&(l.push(r[2]),l.push(r[0]),l.push(r[1])),l}},{key:"decompose",value:function(e,n){var a=e,r=this.convexPolygons;this.polygonPool.freeAll(r),r.length=0;var i=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(i),i.length=0;var s=this.polygonIndicesPool.obtain();s.length=0;var o=this.polygonPool.obtain();o.length=0;for(var h=-1,l=0,c=0,u=n.length;c0?(r.push(o),i.push(s)):(this.polygonPool.free(o),this.polygonIndicesPool.free(s)),(o=this.polygonPool.obtain()).length=0,o.push(m),o.push(p),o.push(g),o.push(y),o.push(w),o.push(k),(s=this.polygonIndicesPool.obtain()).length=0,s.push(f),s.push(d),s.push(v),l=t.winding(m,p,g,y,w,k),h=f)}o.length>0&&(r.push(o),i.push(s));for(var A=0,S=r.length;A=0;$--)0==(o=r[$]).length&&(r.splice($,1),this.polygonPool.free(o),s=i[$],i.splice($,1),this.polygonIndicesPool.free(s));return r}}],[{key:"isConcave",value:function(t,e,n,a){var r=a[(e+t-1)%e]<<1,i=a[t]<<1,s=a[(t+1)%e]<<1;return!this.positiveArea(n[r],n[r+1],n[i],n[i+1],n[s],n[s+1])}},{key:"positiveArea",value:function(t,e,n,a,r,i){return t*(i-a)+n*(e-i)+r*(a-e)>=0}},{key:"winding",value:function(t,e,n,a,r,i){var s=n-t,o=a-e;return r*o-i*s+s*e-t*o>=0?1:-1}}])}(),gn=function(){function t(){r(this,t),this.triangulator=new pn,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array,this.clipAttachment=null,this.clippingPolygons=null}return s(t,[{key:"clipStart",value:function(e,n){if(this.clipAttachment)return 0;this.clipAttachment=n;var a=n.worldVerticesLength,r=R.setArraySize(this.clippingPolygon,a);n.computeWorldVertices(e,0,a,r,0,2);var i=this.clippingPolygon;t.makeClockwise(i);for(var s=this.clippingPolygons=this.triangulator.decompose(i,this.triangulator.triangulate(i)),o=0,h=s.length;o>1,V=this.clipOutput,U=R.setArraySize(l,F+D*d),q=0;q=2?(h=o,o=this.scratch):h=this.scratch,h.length=0,h.push(t),h.push(e),h.push(n),h.push(a),h.push(r),h.push(i),h.push(t),h.push(e),o.length=0;for(var u=s,f=s.length-4,d=0;;d+=2){for(var v=u[d],m=u[d+1],p=u[d+2],g=u[d+3],y=v-p,w=m-g,k=h,b=h.length-2,x=o.length,I=0;I0;if(y*(A-g)-w*(E-p)>0){if(T){o.push(S),o.push(R);continue}var C=R-A,M=S-E,F=C*(p-v)-M*(g-m);if(Math.abs(F)>1e-6){var Y=(M*(m-A)-C*(v-E))/F;o.push(v+(p-v)*Y),o.push(m+(g-m)*Y)}else o.push(v),o.push(m)}else if(T){var P=R-A,X=S-E,L=P*(p-v)-X*(g-m);if(Math.abs(L)>1e-6){var N=(X*(m-A)-P*(v-E))/L;o.push(v+(p-v)*N),o.push(m+(g-m)*N)}else o.push(v),o.push(m);o.push(S),o.push(R)}c=!0}if(x==o.length)return l.length=0,!0;if(o.push(o[0]),o.push(o[1]),d==f)break;var B=o;(o=h).length=0,h=B}if(l!=o){l.length=0;for(var _=0,O=o.length-2;_>1;l=0;la--)-1==ta[la]&&(ta[la]=na[--ra])}$n.setFrame(Kn,In(Zn,"time",0),ta)}r.push($n)}if(t.events){for(var ca=new Ct(t.events.length),ua=0,fa=0;fa)?=?)"),v("XRANGEIDENTIFIERLOOSE","".concat(h[l.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),v("XRANGEIDENTIFIER","".concat(h[l.NUMERICIDENTIFIER],"|x|X|\\*")),v("XRANGEPLAIN","[v=\\s]*(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIER],")")+"(?:".concat(h[l.PRERELEASE],")?").concat(h[l.BUILD],"?")+")?)?"),v("XRANGEPLAINLOOSE","[v=\\s]*(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(h[l.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(h[l.PRERELEASELOOSE],")?").concat(h[l.BUILD],"?")+")?)?"),v("XRANGE","^".concat(h[l.GTLT],"\\s*").concat(h[l.XRANGEPLAIN],"$")),v("XRANGELOOSE","^".concat(h[l.GTLT],"\\s*").concat(h[l.XRANGEPLAINLOOSE],"$")),v("COERCEPLAIN","".concat("(^|[^\\d])(\\d{1,").concat(n,"})")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:\\.(\\d{1,".concat(n,"}))?")),v("COERCE","".concat(h[l.COERCEPLAIN],"(?:$|[^\\d])")),v("COERCEFULL",h[l.COERCEPLAIN]+"(?:".concat(h[l.PRERELEASE],")?")+"(?:".concat(h[l.BUILD],")?")+"(?:$|[^\\d])"),v("COERCERTL",h[l.COERCE],!0),v("COERCERTLFULL",h[l.COERCEFULL],!0),v("LONETILDE","(?:~>?)"),v("TILDETRIM","(\\s*)".concat(h[l.LONETILDE],"\\s+"),!0),e.tildeTrimReplace="$1~",v("TILDE","^".concat(h[l.LONETILDE]).concat(h[l.XRANGEPLAIN],"$")),v("TILDELOOSE","^".concat(h[l.LONETILDE]).concat(h[l.XRANGEPLAINLOOSE],"$")),v("LONECARET","(?:\\^)"),v("CARETTRIM","(\\s*)".concat(h[l.LONECARET],"\\s+"),!0),e.caretTrimReplace="$1^",v("CARET","^".concat(h[l.LONECARET]).concat(h[l.XRANGEPLAIN],"$")),v("CARETLOOSE","^".concat(h[l.LONECARET]).concat(h[l.XRANGEPLAINLOOSE],"$")),v("COMPARATORLOOSE","^".concat(h[l.GTLT],"\\s*(").concat(h[l.LOOSEPLAIN],")$|^$")),v("COMPARATOR","^".concat(h[l.GTLT],"\\s*(").concat(h[l.FULLPLAIN],")$|^$")),v("COMPARATORTRIM","(\\s*)".concat(h[l.GTLT],"\\s*(").concat(h[l.LOOSEPLAIN],"|").concat(h[l.XRANGEPLAIN],")"),!0),e.comparatorTrimReplace="$1$2$3",v("HYPHENRANGE","^\\s*(".concat(h[l.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(h[l.XRANGEPLAIN],")")+"\\s*$"),v("HYPHENRANGELOOSE","^\\s*(".concat(h[l.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(h[l.XRANGEPLAINLOOSE],")")+"\\s*$"),v("STAR","(<|>)?=?\\s*\\*"),v("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),v("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Pn,Pn.exports);var Xn=Pn.exports;Tn(Xn);var Ln=Object.freeze({loose:!0}),Nn=Object.freeze({}),Bn=function(t){return t?"object"!==a(t)?Ln:t:Nn};Tn(Bn);var _n=/^[0-9]+$/,On=function(t,e){var n=_n.test(t),a=_n.test(e);return n&&a&&(t=+t,e=+e),t===e?0:n&&!a?-1:a&&!n?1:tUn)throw new TypeError("version is longer than ".concat(Un," characters"));Vn("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;var i=e.trim().match(n.loose?Wn[zn.LOOSE]:Wn[zn.FULL]);if(!i)throw new TypeError("Invalid Version: ".concat(e));if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>qn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>qn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>qn||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map((function(t){if(/^[0-9]+$/.test(t)){var e=+t;if(e>=0&&e=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(e===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(e){var i=[e,a];!1===n&&(i=[e]),0===Gn(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break;default:throw new Error("invalid increment argument: ".concat(t))}return this.raw=this.format(),this.build.length&&(this.raw+="+".concat(this.build.join("."))),this}}])}(),$n=Hn;Tn($n);var Jn=$n,Kn=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t instanceof Jn)return t;try{return new Jn(t,e)}catch(t){if(!n)return null;throw t}};Tn(Kn);var Qn=Kn,Zn=Tn((function(t,e){var n=Qn(t,e);return n?n.version:null})),ta=$n,ea=Kn,na=Xn.safeRe,aa=Xn.t,ra=Tn((function(t,e){if(t instanceof ta)return t;if("number"==typeof t&&(t=String(t)),"string"!=typeof t)return null;var n=null;if((e=e||{}).rtl){for(var a,r=e.includePrerelease?na[aa.COERCERTLFULL]:na[aa.COERCERTL];(a=r.exec(t))&&(!n||n.index+n[0].length!==t.length);)n&&a.index+a[0].length===n.index+n[0].length||(n=a),r.lastIndex=a.index+a[1].length+a[2].length;r.lastIndex=-1}else n=t.match(e.includePrerelease?na[aa.COERCEFULL]:na[aa.COERCE]);if(null===n)return null;var i=n[2],s=n[3]||"0",o=n[4]||"0",h=e.includePrerelease&&n[5]?"-".concat(n[5]):"",l=e.includePrerelease&&n[6]?"+".concat(n[6]):"";return ea("".concat(i,".").concat(s,".").concat(o).concat(h).concat(l),e)})),ia=s((function t(){r(this,t),this.max=1e3,this.map=new Map}),[{key:"get",value:function(t){var e=this.map.get(t);return void 0===e?void 0:(this.map.delete(t),this.map.set(t,e),e)}},{key:"delete",value:function(t){return!!this.map.has(t)&&(this.map.delete(t),!0)}},{key:"set",value:function(t,e){if(!this.delete(t)&&void 0!==e){if(this.map.size>=this.max){var n=this.map.keys().next().value;this.delete(n)}this.map.set(t,e)}return this}}]);Tn(ia);var sa=$n,oa=function(t,e,n){return new sa(t,n).compare(new sa(e,n))};Tn(oa);var ha=oa,la=function(t,e,n){return 0===ha(t,e,n)};Tn(la);var ca=oa,ua=function(t,e,n){return 0!==ca(t,e,n)};Tn(ua);var fa=oa,da=function(t,e,n){return fa(t,e,n)>0};Tn(da);var va=oa,ma=function(t,e,n){return va(t,e,n)>=0};Tn(ma);var pa=oa,ga=function(t,e,n){return pa(t,e,n)<0};Tn(ga);var ya=oa,wa=function(t,e,n){return ya(t,e,n)<=0};Tn(wa);var ka,ba,xa,Ia,Ea=la,Aa=ua,Sa=da,Ra=ma,Ta=ga,Ca=wa,Ma=function(t,e,n,r){switch(e){case"===":return"object"===a(t)&&(t=t.version),"object"===a(n)&&(n=n.version),t===n;case"!==":return"object"===a(t)&&(t=t.version),"object"===a(n)&&(n=n.version),t!==n;case"":case"=":case"==":return Ea(t,n,r);case"!=":return Aa(t,n,r);case">":return Sa(t,n,r);case">=":return Ra(t,n,r);case"<":return Ta(t,n,r);case"<=":return Ca(t,n,r);default:throw new TypeError("Invalid operator: ".concat(e))}};function Fa(){if(Ia)return xa;Ia=1;var t=function(){function t(e,i){var s=this;if(r(this,t),i=n(i),e instanceof t)return e.loose===!!i.loose&&e.includePrerelease===!!i.includePrerelease?e:new t(e.raw,i);if(e instanceof a)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((function(t){return s.parseRange(t.trim())})).filter((function(t){return t.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(this.raw));if(this.set.length>1){var o=this.set[0];if(this.set=this.set.filter((function(t){return!p(t[0])})),0===this.set.length)this.set=[o];else if(this.set.length>1){var h,l=g(this.set);try{for(l.s();!(h=l.n()).done;){var c=h.value;if(1===c.length&&y(c[0])){this.set=[c];break}}}catch(t){l.e(t)}finally{l.f()}}}this.format()}return s(t,[{key:"format",value:function(){return this.range=this.set.map((function(t){return t.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(t){var n=this,r=((this.options.includePrerelease&&d)|(this.options.loose&&m))+":"+t,s=e.get(r);if(s)return s;var o=this.options.loose,y=o?h[l.HYPHENRANGELOOSE]:h[l.HYPHENRANGE];t=t.replace(y,M(this.options.includePrerelease)),i("hyphen replace",t),t=t.replace(h[l.COMPARATORTRIM],c),i("comparator trim",t),t=t.replace(h[l.TILDETRIM],u),i("tilde trim",t),t=t.replace(h[l.CARETTRIM],f),i("caret trim",t);var w=t.split(" ").map((function(t){return k(t,n.options)})).join(" ").split(/\s+/).map((function(t){return C(t,n.options)}));o&&(w=w.filter((function(t){return i("loose invalid filter",t,n.options),!!t.match(h[l.COMPARATORLOOSE])}))),i("range list",w);var b,x=new Map,I=w.map((function(t){return new a(t,n.options)})),E=g(I);try{for(E.s();!(b=E.n()).done;){var A=b.value;if(p(A))return[A];x.set(A.value,A)}}catch(t){E.e(t)}finally{E.f()}x.size>1&&x.has("")&&x.delete("");var S=v(x.values());return e.set(r,S),S}},{key:"intersects",value:function(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((function(t){return w(t,n)&&e.set.some((function(e){return w(e,n)&&t.every((function(t){return e.every((function(e){return t.intersects(e,n)}))}))}))}))}},{key:"test",value:function(t){if(!t)return!1;if("string"==typeof t)try{t=new o(t,this.options)}catch(t){return!1}for(var e=0;e")||!t.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!t.operator.startsWith("<"))&&(this.semver.version!==t.semver.version||!this.operator.includes("=")||!t.operator.includes("="))&&!(o(this.semver,"<",t.semver,a)&&this.operator.startsWith(">")&&t.operator.startsWith("<"))&&!(o(this.semver,">",t.semver,a)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}}],[{key:"ANY",get:function(){return t}}])}();ka=e;var n=Bn,a=Xn.safeRe,i=Xn.t,o=Ma,h=Yn,l=$n,c=Fa();return ka}(),i=Yn,o=$n,h=Xn.safeRe,l=Xn.t,c=Xn.comparatorTrimReplace,u=Xn.tildeTrimReplace,f=Xn.caretTrimReplace,d=Cn.FLAG_INCLUDE_PRERELEASE,m=Cn.FLAG_LOOSE,p=function(t){return"<0.0.0-0"===t.value},y=function(t){return""===t.value},w=function(t,e){for(var n=!0,a=t.slice(),r=a.pop();n&&a.length;)n=a.every((function(t){return r.intersects(t,e)})),r=a.pop();return n},k=function(t,e){return i("comp",t,e),t=E(t,e),i("caret",t),t=x(t,e),i("tildes",t),t=S(t,e),i("xrange",t),t=T(t,e),i("stars",t),t},b=function(t){return!t||"x"===t.toLowerCase()||"*"===t},x=function(t,e){return t.trim().split(/\s+/).map((function(t){return I(t,e)})).join(" ")},I=function(t,e){var n=e.loose?h[l.TILDELOOSE]:h[l.TILDE];return t.replace(n,(function(e,n,a,r,s){var o;return i("tilde",t,e,n,a,r,s),b(n)?o="":b(a)?o=">=".concat(n,".0.0 <").concat(+n+1,".0.0-0"):b(r)?o=">=".concat(n,".").concat(a,".0 <").concat(n,".").concat(+a+1,".0-0"):s?(i("replaceTilde pr",s),o=">=".concat(n,".").concat(a,".").concat(r,"-").concat(s," <").concat(n,".").concat(+a+1,".0-0")):o=">=".concat(n,".").concat(a,".").concat(r," <").concat(n,".").concat(+a+1,".0-0"),i("tilde return",o),o}))},E=function(t,e){return t.trim().split(/\s+/).map((function(t){return A(t,e)})).join(" ")},A=function(t,e){i("caret",t,e);var n=e.loose?h[l.CARETLOOSE]:h[l.CARET],a=e.includePrerelease?"-0":"";return t.replace(n,(function(e,n,r,s,o){var h;return i("caret",t,e,n,r,s,o),b(n)?h="":b(r)?h=">=".concat(n,".0.0").concat(a," <").concat(+n+1,".0.0-0"):b(s)?h="0"===n?">=".concat(n,".").concat(r,".0").concat(a," <").concat(n,".").concat(+r+1,".0-0"):">=".concat(n,".").concat(r,".0").concat(a," <").concat(+n+1,".0.0-0"):o?(i("replaceCaret pr",o),h="0"===n?"0"===r?">=".concat(n,".").concat(r,".").concat(s,"-").concat(o," <").concat(n,".").concat(r,".").concat(+s+1,"-0"):">=".concat(n,".").concat(r,".").concat(s,"-").concat(o," <").concat(n,".").concat(+r+1,".0-0"):">=".concat(n,".").concat(r,".").concat(s,"-").concat(o," <").concat(+n+1,".0.0-0")):(i("no pr"),h="0"===n?"0"===r?">=".concat(n,".").concat(r,".").concat(s).concat(a," <").concat(n,".").concat(r,".").concat(+s+1,"-0"):">=".concat(n,".").concat(r,".").concat(s).concat(a," <").concat(n,".").concat(+r+1,".0-0"):">=".concat(n,".").concat(r,".").concat(s," <").concat(+n+1,".0.0-0")),i("caret return",h),h}))},S=function(t,e){return i("replaceXRanges",t,e),t.split(/\s+/).map((function(t){return R(t,e)})).join(" ")},R=function(t,e){t=t.trim();var n=e.loose?h[l.XRANGELOOSE]:h[l.XRANGE];return t.replace(n,(function(n,a,r,s,o,h){i("xRange",t,n,a,r,s,o,h);var l=b(r),c=l||b(s),u=c||b(o),f=u;return"="===a&&f&&(a=""),h=e.includePrerelease?"-0":"",l?n=">"===a||"<"===a?"<0.0.0-0":"*":a&&f?(c&&(s=0),o=0,">"===a?(a=">=",c?(r=+r+1,s=0,o=0):(s=+s+1,o=0)):"<="===a&&(a="<",c?r=+r+1:s=+s+1),"<"===a&&(h="-0"),n="".concat(a+r,".").concat(s,".").concat(o).concat(h)):c?n=">=".concat(r,".0.0").concat(h," <").concat(+r+1,".0.0-0"):u&&(n=">=".concat(r,".").concat(s,".0").concat(h," <").concat(r,".").concat(+s+1,".0-0")),i("xRange return",n),n}))},T=function(t,e){return i("replaceStars",t,e),t.trim().replace(h[l.STAR],"")},C=function(t,e){return i("replaceGTE0",t,e),t.trim().replace(h[e.includePrerelease?l.GTE0PRE:l.GTE0],"")},M=function(t){return function(e,n,a,r,i,s,o,h,l,c,u,f){return n=b(a)?"":b(r)?">=".concat(a,".0.0").concat(t?"-0":""):b(i)?">=".concat(a,".").concat(r,".0").concat(t?"-0":""):s?">=".concat(n):">=".concat(n).concat(t?"-0":""),h=b(l)?"":b(c)?"<".concat(+l+1,".0.0-0"):b(u)?"<".concat(l,".").concat(+c+1,".0-0"):f?"<=".concat(l,".").concat(c,".").concat(u,"-").concat(f):t?"<".concat(l,".").concat(c,".").concat(+u+1,"-0"):"<=".concat(h),"".concat(n," ").concat(h).trim()}},F=function(t,e,n){for(var r=0;r0){var o=t[s].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0};return xa}Tn(Ma);var Ya=Fa(),Pa=function(t,e,n){try{e=new Ya(e,n)}catch(t){return!1}return e.test(t)},Xa={valid:Zn,coerce:ra,satisfies:Tn(Pa),SEMVER_SPEC_VERSION:Mn.SEMVER_SPEC_VERSION},La=0,Na=1,Ba=2,_a=[0,1,2,2,3,0],Oa=s((function t(e,a,i,s){var h;if(r(this,t),o(this,"autoUpdate",!0),o(this,"skeleton",void 0),o(this,"states",void 0),this._app=e,this._position=new n.Vec3,1===ae.length){var l,c=g((h=new ae(a)).pages);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.setTexture(new Rn(s[u.name]))}}catch(t){c.e(t)}finally{c.f()}}else h=new ae(a,(function(t){return new Rn(s[t])}));var f=new yn(new fe(h));f.scale*=.01;var d=f.readSkeletonData(i);this.skeletonVersion=Xa.valid(Xa.coerce(d.version)),this._spine_3_6_0=Xa.satisfies(this.skeletonVersion,"<=3.6.0"),this._spine_3_7_99=Xa.satisfies(this.skeletonVersion,"<=3.7.99"),this._spine_4_0_X=Xa.satisfies(this.skeletonVersion,"~4.0.0"),this._spine_4_1_X=Xa.satisfies(this.skeletonVersion,"~4.1.23"),this.skeleton=new Ce(d),this.skeleton.updateWorldTransform(),this.stateData=new $t(this.skeleton.data),this.states=[new Bt(this.stateData)],this.clipper=new gn,this._node=new n.GraphNode,this._meshes=[],this._meshInstances=[],this._materials={},this._tint={},this._aabb=new n.BoundingBox,this._aabbTempArray=[],this._aabbTempOffset=new n.Vec2,this._aabbTempSize=new n.Vec2,this._renderCounts={vertexCount:0,indexCount:0},this._vertexFormat=null,this._vertexBuffer=null,this._indexBuffer=null,this._priority=0,this._timeScale=1,this._layers=[n.LAYERID_UI],this.init(),this._hidden=!1}),[{key:"destroy",value:function(){this.removeFromLayers();for(var t=0;t0&&this._renderCounts.vertexCount>0){this.skeleton.getBounds(this._aabbTempOffset,this._aabbTempSize,this._aabbTempArray),this._aabb.center=new n.Vec3(this._aabbTempOffset.x,this._aabbTempOffset.y,0),this._aabb.halfExtents=new n.Vec3(.5*this._aabbTempSize.x,.5*this._aabbTempSize.y,0),(!this._vertexBuffer||this._vertexBuffer.getNumVertices()0&&u.indices.length>0){t&&t!==u.material&&(this.SubmitBatch(e,a,t),t=u.material,e=s,a=0),t=u.material;var f=u.positions,d=u.vertexColor.r,v=u.vertexColor.g,m=u.vertexColor.b,p=u.vertexColor.a,g=u.uvs,y=void 0,w=f.length/2;for(y=0;y0){var r=new n.Mesh(this._app.graphicsDevice);r.vertexBuffer=this._vertexBuffer,r.indexBuffer[0]=this._indexBuffer,r.primitive[0].type=n.PRIMITIVE_TRIANGLES,r.primitive[0].base=t,r.primitive[0].count=e,r.primitive[0].indexed=!0,r.aabb=this._aabb,this._meshes.push(r);var i=new n.MeshInstance(r,this._materials[a],this._node);i.drawOrder=this.priority+this._meshInstances.length,i.visible=!this._hidden,this._meshInstances.push(i)}}},{key:"update",value:function(t){if(!this._hidden){var e;t*=this._timeScale;var n=this.states.length;for(e=0;e=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz", - "integrity": "sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz", + "integrity": "sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -140,26 +140,26 @@ } }, "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.10.tgz", - "integrity": "sha512-Av0qubwDQxC56DoUReVDeLfMEjYYSN1nZrTUrWkXd7hpU73ymRANkbuDm3yni9npkn+RXy9nNbEJZEzXr7xrfQ==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.15.tgz", + "integrity": "sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==", "dev": true, "dependencies": { - "@babel/types": "^7.22.10" + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", - "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz", + "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.15", - "browserslist": "^4.21.9", + "@babel/compat-data": "^7.23.5", + "@babel/helper-validator-option": "^7.23.5", + "browserslist": "^4.22.2", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -177,19 +177,19 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.11.tgz", - "integrity": "sha512-y1grdYL4WzmUDBRGK0pDbIoFd7UZKoDurDzWEoNMYoj1EL+foGRQNyPWDcC+YyegN5y1DUsFFmzjGijB3nSVAQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.5.tgz", + "integrity": "sha512-uRc4Cv8UQWnE4NXlYTIIdM7wfFkOqlFztcC/gVXDKohKoVB3OyonfelUBaJzSwpBntZ2KYGF/9S7asCHsXwW6g==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-member-expression-to-functions": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-member-expression-to-functions": "^7.24.5", "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.9", + "@babel/helper-replace-supers": "^7.24.1", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-split-export-declaration": "^7.24.5", "semver": "^6.3.1" }, "engines": { @@ -209,9 +209,9 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.9.tgz", - "integrity": "sha512-+svjVa/tFwsNSG4NEy1h85+HQ5imbT92Q5/bgtS7P0GTQlP8WuFdqsiABmQouhiFGyV66oGxZFpeYHza1rNsKw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.15.tgz", + "integrity": "sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", @@ -235,9 +235,9 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.2.tgz", - "integrity": "sha512-k0qnnOqHn5dK9pZpfD5XXZ9SojAITdCKRn2Lp6rnDGzIbaP0rHyMPk/4wsSxVBVz4RfN0q6VpXWP2pDGIoQ7hw==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz", + "integrity": "sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ==", "dev": true, "dependencies": { "@babel/helper-compilation-targets": "^7.22.6", @@ -251,22 +251,22 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" @@ -285,40 +285,40 @@ } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.22.5.tgz", - "integrity": "sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.5.tgz", + "integrity": "sha512-4owRteeihKWKamtqg4JmWSsEZU445xpFRXPEwp44HbgbxdWlUV1b4Agg4lkA806Lil5XM/e+FJyS0vj5T6vmcA==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", - "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "version": "7.24.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", + "integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==", "dev": true, "dependencies": { - "@babel/types": "^7.22.15" + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.22.19", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.19.tgz", - "integrity": "sha512-m6h1cJvn+OJ+R3jOHp30faq5xKJ7VbjwDj5RGgHuRlU9hrMeKsGC+JpihkR5w1g7IfseCPPtZ0r7/hB4UKaYlA==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.5.tgz", + "integrity": "sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.15", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.19" + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.24.3", + "@babel/helper-simple-access": "^7.24.5", + "@babel/helper-split-export-declaration": "^7.24.5", + "@babel/helper-validator-identifier": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -340,23 +340,23 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.5.tgz", + "integrity": "sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.9.tgz", - "integrity": "sha512-8WWC4oR4Px+tr+Fp0X3RHDVfINGpF3ad1HIbrc8A77epiR6eMMc6jsgozkzT2uDiOOdoS9cLIQ+XD2XvI2WSmQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz", + "integrity": "sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-wrap-function": "^7.22.9" + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-wrap-function": "^7.22.20" }, "engines": { "node": ">=6.9.0" @@ -366,13 +366,13 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.9.tgz", - "integrity": "sha512-LJIKvvpgPOPUThdYqcX6IXRuIcTkcAub0IaDRGCZH0p5GPUp7PhRU9QVgFcDDd51BaPkk77ZjqFwh6DZTAEmGg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.24.1.tgz", + "integrity": "sha512-QCR1UqC9BzG5vZl8BMicmZ28RuUBnHhAMddD8yHFHDRH9lLTZ9uUPehX8ctVPT8l0TKblJidqcgUUKGVrePleQ==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-member-expression-to-functions": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-member-expression-to-functions": "^7.23.0", "@babel/helper-optimise-call-expression": "^7.22.5" }, "engines": { @@ -383,12 +383,12 @@ } }, "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.5.tgz", + "integrity": "sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -407,53 +407,53 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz", + "integrity": "sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", + "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.19", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.19.tgz", - "integrity": "sha512-Tinq7ybnEPFFXhlYOYFiSjespWQk0dq2dRNAiMdRTOYQzEGqnnNyrTxPYHP5r6wGjlF1rFgABdDV0g8EwD6Qbg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", + "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", - "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.10.tgz", - "integrity": "sha512-OnMhjWjuGYtdoO3FmsEFWvBStBAe2QOgwOLsLNDjN+aaiMD8InJk1/O3HSD8lkqTjCgg5YI34Tz15KNNA3p+nQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.24.5.tgz", + "integrity": "sha512-/xxzuNvgRl4/HLNKvnFwdhdgN3cpLxgLROeLDl83Yx0AJ1SGvq1ak0OszTOjDfiB8Vx03eJbeDWh9r+jCCWttw==", "dev": true, "dependencies": { - "@babel/helper-function-name": "^7.22.5", - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.10" + "@babel/helper-function-name": "^7.23.0", + "@babel/template": "^7.24.0", + "@babel/types": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -475,23 +475,24 @@ } }, "node_modules/@babel/highlight": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz", - "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz", + "integrity": "sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.24.5", "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.11.tgz", - "integrity": "sha512-R5zb8eJIBPJriQtbH/htEQy4k7E2dHWlD2Y2VT07JCzwYZHBxV5ZYtM0UhXSNMT74LyxuM+b1jdL7pSesXbC/g==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz", + "integrity": "sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -500,13 +501,29 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.24.5.tgz", + "integrity": "sha512-LdXRi1wEMTrHVR4Zc9F8OewC3vdm5h4QB6L71zy6StmYeqGi1b3ttIO8UC+BfZKcH9jdr4aI249rBkm+3+YvHw==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-plugin-utils": "^7.24.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.15.tgz", - "integrity": "sha512-FB9iYlz7rURmRJyXRKEnalYPPdn87H5no108cyuQQyMwlpJ2SJtpIUBI27kdTin956pz+LPypkPVPUTlxOmrsg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.24.1.tgz", + "integrity": "sha512-y4HqEnkelJIOQGd+3g1bTeKsA5c6qM7eOn7VggGVbBc0y8MLSKHacwcIE2PplNlQSj0PqS9rrXL/nkPVK+kUNg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -516,14 +533,14 @@ } }, "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.15.tgz", - "integrity": "sha512-Hyph9LseGvAeeXzikV88bczhsrLrIZqDPxO+sSmAunMPaGrBGhfMWzCPYTtiW9t+HzSE2wtV8e5cc5P6r1xMDQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.24.1.tgz", + "integrity": "sha512-Hj791Ii4ci8HqnaKHAlLNs+zaLXb0EzSDhiAWp5VNlyvCNymYfacs64pxTxbH1znW/NcArSmwpmG9IKE/TUVVQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/plugin-transform-optional-chaining": "^7.22.15" + "@babel/plugin-transform-optional-chaining": "^7.24.1" }, "engines": { "node": ">=6.9.0" @@ -532,6 +549,22 @@ "@babel/core": "^7.13.0" } }, + "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.24.1.tgz", + "integrity": "sha512-m9m/fXsXLiHfwdgydIFnpk+7jlVbnvlK5B2EKiPdLUb6WX654ZaaEWJUjk8TftRbZpK0XibovlLWX4KIZhV6jw==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-plugin-utils": "^7.24.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/@babel/plugin-proposal-private-property-in-object": { "version": "7.21.0-placeholder-for-preset-env.2", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", @@ -608,12 +641,12 @@ } }, "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.22.5.tgz", - "integrity": "sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.1.tgz", + "integrity": "sha512-IuwnI5XnuF189t91XbxmXeCDz3qs6iDRO7GJ++wcfgeXNs/8FmIlKcpDSXNVyuLQxlwvskmI3Ct73wUODkJBlQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -623,12 +656,12 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.22.5.tgz", - "integrity": "sha512-KwvoWDeNKPETmozyFE0P2rOLqh39EoQHNjqizrI5B8Vt0ZNS7M56s7dAiAqbYfiAYOuIzIh96z3iR2ktgu3tEg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.1.tgz", + "integrity": "sha512-zhQTMH0X2nVLnb04tz+s7AMuasX8U0FnpE+nHTOhSOINjWMnopoZTxtIKsd45n4GQ/HIZLyfIpoul8e2m0DnRA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -780,12 +813,12 @@ } }, "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.22.5.tgz", - "integrity": "sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.24.1.tgz", + "integrity": "sha512-ngT/3NkRhsaep9ck9uj2Xhv9+xB1zShY3tM3g6om4xxCELwCDN4g4Aq5dRn48+0hasAql7s2hdBOysCfNpr4fw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -795,14 +828,14 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.22.15.tgz", - "integrity": "sha512-jBm1Es25Y+tVoTi5rfd5t1KLmL8ogLKpXszboWOTTtGFGz2RKnQe2yn7HbZ+kb/B8N0FVSGQo874NSlOU1T4+w==", + "version": "7.24.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.24.3.tgz", + "integrity": "sha512-Qe26CMYVjpQxJ8zxM1340JFNjZaF+ISWpr1Kt/jGo+ZTUzKkfw/pphEWbRCb+lmSM6k/TOgfYLvmbHkUQ0asIg==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-remap-async-to-generator": "^7.22.9", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-remap-async-to-generator": "^7.22.20", "@babel/plugin-syntax-async-generators": "^7.8.4" }, "engines": { @@ -813,14 +846,14 @@ } }, "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.22.5.tgz", - "integrity": "sha512-b1A8D8ZzE/VhNDoV1MSJTnpKkCG5bJo+19R4o4oy03zM7ws8yEMK755j61Dc3EyvdysbqH5BOOTquJ7ZX9C6vQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.24.1.tgz", + "integrity": "sha512-AawPptitRXp1y0n4ilKcGbRYWfbbzFWz2NqNu7dacYDtFtz0CMjG64b3LQsb3KIgnf4/obcUL78hfaOS7iCUfw==", "dev": true, "dependencies": { - "@babel/helper-module-imports": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-remap-async-to-generator": "^7.22.5" + "@babel/helper-module-imports": "^7.24.1", + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-remap-async-to-generator": "^7.22.20" }, "engines": { "node": ">=6.9.0" @@ -830,12 +863,12 @@ } }, "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.22.5.tgz", - "integrity": "sha512-tdXZ2UdknEKQWKJP1KMNmuF5Lx3MymtMN/pvA+p/VEkhK8jVcQ1fzSy8KM9qRYhAf2/lV33hoMPKI/xaI9sADA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.24.1.tgz", + "integrity": "sha512-TWWC18OShZutrv9C6mye1xwtam+uNi2bnTOCBUd5sZxyHOiWbU6ztSROofIMrK84uweEZC219POICK/sTYwfgg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -845,12 +878,12 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.22.15.tgz", - "integrity": "sha512-G1czpdJBZCtngoK1sJgloLiOHUnkb/bLZwqVZD8kXmq0ZnVfTTWUcs9OWtp0mBtYJ+4LQY1fllqBkOIPhXmFmw==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.24.5.tgz", + "integrity": "sha512-sMfBc3OxghjC95BkYrYocHL3NaOplrcaunblzwXhGmlPwpmfsxr4vK+mBBt49r+S240vahmv+kUxkeKgs+haCw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -860,13 +893,13 @@ } }, "node_modules/@babel/plugin-transform-class-properties": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.22.5.tgz", - "integrity": "sha512-nDkQ0NfkOhPTq8YCLiWNxp1+f9fCobEjCb0n8WdbNUBc4IB5V7P1QnX9IjpSoquKrXF5SKojHleVNs2vGeHCHQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.24.1.tgz", + "integrity": "sha512-OMLCXi0NqvJfORTaPQBwqLXHhb93wkBKZ4aNwMl6WtehO7ar+cmp+89iPEQPqxAnxsOKTaMcs3POz3rKayJ72g==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-class-features-plugin": "^7.24.1", + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -876,13 +909,13 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.11.tgz", - "integrity": "sha512-GMM8gGmqI7guS/llMFk1bJDkKfn3v3C4KHK9Yg1ey5qcHcOlKb0QvcMrgzvxo+T03/4szNh5lghY+fEC98Kq9g==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.4.tgz", + "integrity": "sha512-B8q7Pz870Hz/q9UgP8InNpY01CSLDSCyqX7zcRuv3FcPl87A2G17lASroHWaCtbdIcbYzOZ7kWmXFKbijMSmFg==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.22.11", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.24.4", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-class-static-block": "^7.14.5" }, "engines": { @@ -893,19 +926,18 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.15.tgz", - "integrity": "sha512-VbbC3PGjBdE0wAWDdHM9G8Gm977pnYI0XpqMd6LrKISj8/DJXEsWqgRuTYaNE9Bv0JGhTZUzHDlMk18IpOuoqw==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.24.5.tgz", + "integrity": "sha512-gWkLP25DFj2dwe9Ck8uwMOpko4YsqyfZJrOmqqcegeDYEbp7rmn4U6UQZNj08UF6MaX39XenSpKRCvpDRBtZ7Q==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.9", - "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-plugin-utils": "^7.24.5", + "@babel/helper-replace-supers": "^7.24.1", + "@babel/helper-split-export-declaration": "^7.24.5", "globals": "^11.1.0" }, "engines": { @@ -916,13 +948,13 @@ } }, "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.22.5.tgz", - "integrity": "sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.24.1.tgz", + "integrity": "sha512-5pJGVIUfJpOS+pAqBQd+QMaTD2vCL/HcePooON6pDpHgRp4gNRmzyHTPIkXntwKsq3ayUFVfJaIKPw2pOkOcTw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/template": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/template": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -932,12 +964,12 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.22.15.tgz", - "integrity": "sha512-HzG8sFl1ZVGTme74Nw+X01XsUTqERVQ6/RLHo3XjGRzm7XD6QTtfS3NJotVgCGy8BzkDqRjRBD8dAyJn5TuvSQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.5.tgz", + "integrity": "sha512-SZuuLyfxvsm+Ah57I/i1HVjveBENYK9ue8MJ7qkc7ndoNjqquJiElzA7f5yaAXjyW2hKojosOTAQQRX50bPSVg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -947,13 +979,13 @@ } }, "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.22.5.tgz", - "integrity": "sha512-5/Yk9QxCQCl+sOIB1WelKnVRxTJDSAIxtJLL2/pqL14ZVlbH0fUQUZa/T5/UnQtBNgghR7mfB8ERBKyKPCi7Vw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.24.1.tgz", + "integrity": "sha512-p7uUxgSoZwZ2lPNMzUkqCts3xlp8n+o05ikjy7gbtFJSt9gdU88jAmtfmOxHM14noQXBxfgzf2yRWECiNVhTCw==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-regexp-features-plugin": "^7.22.15", + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -963,12 +995,12 @@ } }, "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.22.5.tgz", - "integrity": "sha512-dEnYD+9BBgld5VBXHnF/DbYGp3fqGMsyxKbtD1mDyIA7AkTSpKXFhCVuj/oQVOoALfBs77DudA0BE4d5mcpmqw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.24.1.tgz", + "integrity": "sha512-msyzuUnvsjsaSaocV6L7ErfNsa5nDWL1XKNnDePLgmz+WdU4w/J8+AxBMrWfi9m4IxfL5sZQKUPQKDQeeAT6lA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -978,12 +1010,12 @@ } }, "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.11.tgz", - "integrity": "sha512-g/21plo58sfteWjaO0ZNVb+uEOkJNjAaHhbejrnBmu011l/eNDScmkbjCC3l4FKb10ViaGU4aOkFznSu2zRHgA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.1.tgz", + "integrity": "sha512-av2gdSTyXcJVdI+8aFZsCAtR29xJt0S5tas+Ef8NvBNmD1a+N/3ecMLeMBgfcK+xzsjdLDT6oHt+DFPyeqUbDA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-dynamic-import": "^7.8.3" }, "engines": { @@ -994,13 +1026,13 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.22.5.tgz", - "integrity": "sha512-vIpJFNM/FjZ4rh1myqIya9jXwrwwgFRHPjT3DkUA9ZLHuzox8jiXkOLvwm1H+PQIP3CqfC++WPKeuDi0Sjdj1g==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.24.1.tgz", + "integrity": "sha512-U1yX13dVBSwS23DEAqU+Z/PkwE9/m7QQy8Y9/+Tdb8UWYaGNDYwTLi19wqIAiROr8sXVum9A/rtiH5H0boUcTw==", "dev": true, "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.15", + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1010,12 +1042,12 @@ } }, "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.11.tgz", - "integrity": "sha512-xa7aad7q7OiT8oNZ1mU7NrISjlSkVdMbNxn9IuLZyL9AJEhs1Apba3I+u5riX1dIkdptP5EKDG5XDPByWxtehw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.24.1.tgz", + "integrity": "sha512-Ft38m/KFOyzKw2UaJFkWG9QnHPG/Q/2SkOrRk4pNBPg5IPZ+dOxcmkK5IyuBcxiNPyyYowPGUReyBvrvZs7IlQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" }, "engines": { @@ -1026,12 +1058,13 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.15.tgz", - "integrity": "sha512-me6VGeHsx30+xh9fbDLLPi0J1HzmeIIyenoOQHuw2D4m2SAU3NrspX5XxJLBpqn5yrLzrlw2Iy3RA//Bx27iOA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.24.1.tgz", + "integrity": "sha512-OxBdcnF04bpdQdR3i4giHZNZQn7cm8RQKcSwA17wAAqEELo1ZOwp5FFgeptWUQXFyT9kwHo10aqqauYkRZPCAg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1041,14 +1074,14 @@ } }, "node_modules/@babel/plugin-transform-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.22.5.tgz", - "integrity": "sha512-UIzQNMS0p0HHiQm3oelztj+ECwFnj+ZRV4KnguvlsD2of1whUeM6o7wGNj6oLwcDoAXQ8gEqfgC24D+VdIcevg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.24.1.tgz", + "integrity": "sha512-BXmDZpPlh7jwicKArQASrj8n22/w6iymRnvHYYd2zO30DbE277JO20/7yXJT3QxDPtiQiOxQBbZH4TpivNXIxA==", "dev": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1058,12 +1091,12 @@ } }, "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.11.tgz", - "integrity": "sha512-CxT5tCqpA9/jXFlme9xIBCc5RPtdDq3JpkkhgHQqtDdiTnTI0jtZ0QzXhr5DILeYifDPp2wvY2ad+7+hLMW5Pw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.24.1.tgz", + "integrity": "sha512-U7RMFmRvoasscrIFy5xA4gIp8iWnWubnKkKuUGJjsuOH7GfbMkB+XZzeslx2kLdEGdOJDamEmCqOks6e8nv8DQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-json-strings": "^7.8.3" }, "engines": { @@ -1074,12 +1107,12 @@ } }, "node_modules/@babel/plugin-transform-literals": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.22.5.tgz", - "integrity": "sha512-fTLj4D79M+mepcw3dgFBTIDYpbcB9Sm0bpm4ppXPaO+U+PKFFyV9MGRvS0gvGw62sd10kT5lRMKXAADb9pWy8g==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.24.1.tgz", + "integrity": "sha512-zn9pwz8U7nCqOYIiBaOxoQOtYmMODXTJnkxG4AtX8fPmnCRYWBOHD0qcpwS9e2VDSp1zNJYpdnFMIKb8jmwu6g==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1089,12 +1122,12 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.11.tgz", - "integrity": "sha512-qQwRTP4+6xFCDV5k7gZBF3C31K34ut0tbEcTKxlX/0KXxm9GLcO14p570aWxFvVzx6QAfPgq7gaeIHXJC8LswQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.24.1.tgz", + "integrity": "sha512-OhN6J4Bpz+hIBqItTeWJujDOfNP+unqv/NJgyhlpSqgBTPm37KkMmZV6SYcOj+pnDbdcl1qRGV/ZiIjX9Iy34w==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" }, "engines": { @@ -1105,12 +1138,12 @@ } }, "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.22.5.tgz", - "integrity": "sha512-RZEdkNtzzYCFl9SE9ATaUMTj2hqMb4StarOJLrZRbqqU4HSBE7UlBw9WBWQiDzrJZJdUWiMTVDI6Gv/8DPvfew==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.24.1.tgz", + "integrity": "sha512-4ojai0KysTWXzHseJKa1XPNXKRbuUrhkOPY4rEGeR+7ChlJVKxFa3H3Bz+7tWaGKgJAXUWKOGmltN+u9B3+CVg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1120,13 +1153,13 @@ } }, "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.22.5.tgz", - "integrity": "sha512-R+PTfLTcYEmb1+kK7FNkhQ1gP4KgjpSO6HfH9+f8/yfp2Nt3ggBjiVpRwmwTlfqZLafYKJACy36yDXlEmI9HjQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.24.1.tgz", + "integrity": "sha512-lAxNHi4HVtjnHd5Rxg3D5t99Xm6H7b04hUS7EHIXcUl2EV4yl1gWdqZrNzXnSrHveL9qMdbODlLF55mvgjAfaQ==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1136,13 +1169,13 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.22.15.tgz", - "integrity": "sha512-jWL4eh90w0HQOTKP2MoXXUpVxilxsB2Vl4ji69rSjS3EcZ/v4sBmn+A3NpepuJzBhOaEBbR7udonlHHn5DWidg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.1.tgz", + "integrity": "sha512-szog8fFTUxBfw0b98gEWPaEqF42ZUD/T3bkynW/wtgx2p/XCP55WEsb+VosKceRSd6njipdZvNogqdtI4Q0chw==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/helper-simple-access": "^7.22.5" }, "engines": { @@ -1153,15 +1186,15 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.22.11.tgz", - "integrity": "sha512-rIqHmHoMEOhI3VkVf5jQ15l539KrwhzqcBO6wdCNWPWc/JWt9ILNYNUssbRpeq0qWns8svuw8LnMNCvWBIJ8wA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.24.1.tgz", + "integrity": "sha512-mqQ3Zh9vFO1Tpmlt8QPnbwGHzNz3lpNEMxQb1kAemn/erstyqw1r9KeOlOfo3y6xAnFEcOv2tSyrXfmMk+/YZA==", "dev": true, "dependencies": { "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-module-transforms": "^7.22.9", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5" + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-validator-identifier": "^7.22.20" }, "engines": { "node": ">=6.9.0" @@ -1171,13 +1204,13 @@ } }, "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.22.5.tgz", - "integrity": "sha512-+S6kzefN/E1vkSsKx8kmQuqeQsvCKCd1fraCM7zXm4SFoggI099Tr4G8U81+5gtMdUeMQ4ipdQffbKLX0/7dBQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.24.1.tgz", + "integrity": "sha512-tuA3lpPj+5ITfcCluy6nWonSL7RvaG0AOTeAuvXqEKS34lnLzXpDb0dcP6K8jD0zWZFNDVly90AGFJPnm4fOYg==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1203,12 +1236,12 @@ } }, "node_modules/@babel/plugin-transform-new-target": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.22.5.tgz", - "integrity": "sha512-AsF7K0Fx/cNKVyk3a+DW0JLo+Ua598/NxMRvxDnkpCIGFh43+h/v2xyhRUYf6oD8gE4QtL83C7zZVghMjHd+iw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.24.1.tgz", + "integrity": "sha512-/rurytBM34hYy0HKZQyA0nHbQgQNFm4Q/BOc9Hflxi2X3twRof7NaE5W46j4kQitm7SvACVRXsa6N/tSZxvPug==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1218,12 +1251,12 @@ } }, "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.11.tgz", - "integrity": "sha512-YZWOw4HxXrotb5xsjMJUDlLgcDXSfO9eCmdl1bgW4+/lAGdkjaEvOnQ4p5WKKdUgSzO39dgPl0pTnfxm0OAXcg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.24.1.tgz", + "integrity": "sha512-iQ+caew8wRrhCikO5DrUYx0mrmdhkaELgFa+7baMcVuhxIkN7oxt06CZ51D65ugIb1UWRQ8oQe+HXAVM6qHFjw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" }, "engines": { @@ -1234,12 +1267,12 @@ } }, "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.11.tgz", - "integrity": "sha512-3dzU4QGPsILdJbASKhF/V2TVP+gJya1PsueQCxIPCEcerqF21oEcrob4mzjsp2Py/1nLfF5m+xYNMDpmA8vffg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.24.1.tgz", + "integrity": "sha512-7GAsGlK4cNL2OExJH1DzmDeKnRv/LXq0eLUSvudrehVA5Rgg4bIrqEUW29FbKMBRT0ztSqisv7kjP+XIC4ZMNw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-numeric-separator": "^7.10.4" }, "engines": { @@ -1250,16 +1283,15 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.15.tgz", - "integrity": "sha512-fEB+I1+gAmfAyxZcX1+ZUwLeAuuf8VIg67CTznZE0MqVFumWkh8xWtn58I4dxdVf080wn7gzWoF8vndOViJe9Q==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.5.tgz", + "integrity": "sha512-7EauQHszLGM3ay7a161tTQH7fj+3vVM/gThlz5HpFtnygTxjrlvoeq7MPVA1Vy9Q555OB8SnAOsMkLShNkkrHA==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-plugin-utils": "^7.24.5", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.22.15" + "@babel/plugin-transform-parameters": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -1269,13 +1301,13 @@ } }, "node_modules/@babel/plugin-transform-object-super": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.22.5.tgz", - "integrity": "sha512-klXqyaT9trSjIUrcsYIfETAzmOEZL3cBYqOYLJxBHfMFFggmXOv+NYSX/Jbs9mzMVESw/WycLFPRx8ba/b2Ipw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.24.1.tgz", + "integrity": "sha512-oKJqR3TeI5hSLRxudMjFQ9re9fBVUU0GICqM3J1mi8MqlhVr6hC/ZN4ttAyMuQR6EZZIY6h/exe5swqGNNIkWQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-replace-supers": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-replace-supers": "^7.24.1" }, "engines": { "node": ">=6.9.0" @@ -1285,12 +1317,12 @@ } }, "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.11.tgz", - "integrity": "sha512-rli0WxesXUeCJnMYhzAglEjLWVDF6ahb45HuprcmQuLidBJFWjNnOzssk2kuc6e33FlLaiZhG/kUIzUMWdBKaQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.24.1.tgz", + "integrity": "sha512-oBTH7oURV4Y+3EUrf6cWn1OHio3qG/PVwO5J03iSJmBg6m2EhKjkAu/xuaXaYwWW9miYtvbWv4LNf0AmR43LUA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" }, "engines": { @@ -1301,12 +1333,12 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.22.15.tgz", - "integrity": "sha512-ngQ2tBhq5vvSJw2Q2Z9i7ealNkpDMU0rGWnHPKqRZO0tzZ5tlaoz4hDvhXioOoaE0X2vfNss1djwg0DXlfu30A==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.5.tgz", + "integrity": "sha512-xWCkmwKT+ihmA6l7SSTpk8e4qQl/274iNbSKRRS8mpqFR32ksy36+a+LWY8OXCCEefF8WFlnOHVsaDI2231wBg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.5", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", "@babel/plugin-syntax-optional-chaining": "^7.8.3" }, @@ -1318,12 +1350,12 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.15.tgz", - "integrity": "sha512-hjk7qKIqhyzhhUvRT683TYQOFa/4cQKwQy7ALvTpODswN40MljzNDa0YldevS6tGbxwaEKVn502JmY0dP7qEtQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.24.5.tgz", + "integrity": "sha512-9Co00MqZ2aoky+4j2jhofErthm6QVLKbpQrvz20c3CH9KQCLHyNB+t2ya4/UrRpQGR+Wrwjg9foopoeSdnHOkA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -1333,13 +1365,13 @@ } }, "node_modules/@babel/plugin-transform-private-methods": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.22.5.tgz", - "integrity": "sha512-PPjh4gyrQnGe97JTalgRGMuU4icsZFnWkzicB/fUtzlKUqvsWBKEpPPfr5a2JiyirZkHxnAqkQMO5Z5B2kK3fA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.24.1.tgz", + "integrity": "sha512-tGvisebwBO5em4PaYNqt4fkw56K2VALsAbAakY0FjTYqJp7gfdrgr7YX76Or8/cpik0W6+tj3rZ0uHU9Oil4tw==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-class-features-plugin": "^7.24.1", + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1349,14 +1381,14 @@ } }, "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.11.tgz", - "integrity": "sha512-sSCbqZDBKHetvjSwpyWzhuHkmW5RummxJBVbYLkGkaiTOWGxml7SXt0iWa03bzxFIx7wOj3g/ILRd0RcJKBeSQ==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.24.5.tgz", + "integrity": "sha512-JM4MHZqnWR04jPMujQDTBVRnqxpLLpx2tkn7iPn+Hmsc0Gnb79yvRWOkvqFOx3Z7P7VxiRIR22c4eGSNj87OBQ==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-create-class-features-plugin": "^7.22.11", - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.24.5", + "@babel/helper-plugin-utils": "^7.24.5", "@babel/plugin-syntax-private-property-in-object": "^7.14.5" }, "engines": { @@ -1367,12 +1399,12 @@ } }, "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.22.5.tgz", - "integrity": "sha512-TiOArgddK3mK/x1Qwf5hay2pxI6wCZnvQqrFSqbtg1GLl2JcNMitVH/YnqjP+M31pLUeTfzY1HAXFDnUBV30rQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.24.1.tgz", + "integrity": "sha512-LetvD7CrHmEx0G442gOomRr66d7q8HzzGGr4PMHGr+5YIm6++Yke+jxj246rpvsbyhJwCLxcTn6zW1P1BSenqA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1382,12 +1414,12 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.10.tgz", - "integrity": "sha512-F28b1mDt8KcT5bUyJc/U9nwzw6cV+UmTeRlXYIl2TNqMMJif0Jeey9/RQ3C4NOd2zp0/TRsDns9ttj2L523rsw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.24.1.tgz", + "integrity": "sha512-sJwZBCzIBE4t+5Q4IGLaaun5ExVMRY0lYwos/jNecjMrVCygCdph3IKv0tkP5Fc87e/1+bebAmEAGBfnRD+cnw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "regenerator-transform": "^0.15.2" }, "engines": { @@ -1398,12 +1430,12 @@ } }, "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.22.5.tgz", - "integrity": "sha512-DTtGKFRQUDm8svigJzZHzb/2xatPc6TzNvAIJ5GqOKDsGFYgAskjRulbR/vGsPKq3OPqtexnz327qYpP57RFyA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.24.1.tgz", + "integrity": "sha512-JAclqStUfIwKN15HrsQADFgeZt+wexNQ0uLhuqvqAUFoqPMjEcFCYZBhq0LUdz6dZK/mD+rErhW71fbx8RYElg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1413,12 +1445,12 @@ } }, "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.22.5.tgz", - "integrity": "sha512-vM4fq9IXHscXVKzDv5itkO1X52SmdFBFcMIBZ2FRn2nqVYqw6dBexUgMvAjHW+KXpPPViD/Yo3GrDEBaRC0QYA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.24.1.tgz", + "integrity": "sha512-LyjVB1nsJ6gTTUKRjRWx9C1s9hE7dLfP/knKdrfeH9UPtAGjYGgxIbFfx7xyLIEWs7Xe1Gnf8EWiUqfjLhInZA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1428,12 +1460,12 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.22.5.tgz", - "integrity": "sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.24.1.tgz", + "integrity": "sha512-KjmcIM+fxgY+KxPVbjelJC6hrH1CgtPmTvdXAfn3/a9CnWGSTY7nH4zm5+cjmWJybdcPSsD0++QssDsjcpe47g==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-plugin-utils": "^7.24.0", "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" }, "engines": { @@ -1444,12 +1476,12 @@ } }, "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.22.5.tgz", - "integrity": "sha512-zf7LuNpHG0iEeiyCNwX4j3gDg1jgt1k3ZdXBKbZSoA3BbGQGvMiSvfbZRR3Dr3aeJe3ooWFZxOOG3IRStYp2Bw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.24.1.tgz", + "integrity": "sha512-9v0f1bRXgPVcPrngOQvLXeGNNVLc8UjMVfebo9ka0WF3/7+aVUHmaJVT3sa0XCzEFioPfPHZiOcYG9qOsH63cw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1459,12 +1491,12 @@ } }, "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.22.5.tgz", - "integrity": "sha512-5ciOehRNf+EyUeewo8NkbQiUs4d6ZxiHo6BcBcnFlgiJfu16q0bQUw9Jvo0b0gBKFG1SMhDSjeKXSYuJLeFSMA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.1.tgz", + "integrity": "sha512-WRkhROsNzriarqECASCNu/nojeXCDTE/F2HmRgOzi7NGvyfYGq1NEjKBK3ckLfRgGc6/lPAqP0vDOSw3YtG34g==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1474,12 +1506,12 @@ } }, "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.22.5.tgz", - "integrity": "sha512-bYkI5lMzL4kPii4HHEEChkD0rkc+nvnlR6+o/qdqR6zrm0Sv/nodmyLhlq2DO0YKLUNd2VePmPRjJXSBh9OIdA==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.5.tgz", + "integrity": "sha512-UTGnhYVZtTAjdwOTzT+sCyXmTn8AhaxOS/MjG9REclZ6ULHWF9KoCZur0HSGU7hk8PdBFKKbYe6+gqdXWz84Jg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.5" }, "engines": { "node": ">=6.9.0" @@ -1489,12 +1521,12 @@ } }, "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.22.10.tgz", - "integrity": "sha512-lRfaRKGZCBqDlRU3UIFovdp9c9mEvlylmpod0/OatICsSfuQ9YFthRo1tpTkGsklEefZdqlEFdY4A2dwTb6ohg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.24.1.tgz", + "integrity": "sha512-RlkVIcWT4TLI96zM660S877E7beKlQw7Ig+wqkKBiWfj0zH5Q4h50q6er4wzZKRNSYpfo6ILJ+hrJAGSX2qcNw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1504,13 +1536,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-property-regex": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.22.5.tgz", - "integrity": "sha512-HCCIb+CbJIAE6sXn5CjFQXMwkCClcOfPCzTlilJ8cUatfzwHlWQkbtV0zD338u9dZskwvuOYTuuaMaA8J5EI5A==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.24.1.tgz", + "integrity": "sha512-Ss4VvlfYV5huWApFsF8/Sq0oXnGO+jB+rijFEFugTd3cwSObUSnUi88djgR5528Csl0uKlrI331kRqe56Ov2Ng==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-regexp-features-plugin": "^7.22.15", + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1520,13 +1552,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.22.5.tgz", - "integrity": "sha512-028laaOKptN5vHJf9/Arr/HiJekMd41hOEZYvNsrsXqJ7YPYuX2bQxh31fkZzGmq3YqHRJzYFFAVYvKfMPKqyg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.24.1.tgz", + "integrity": "sha512-2A/94wgZgxfTsiLaQ2E36XAOdcZmGAaEEgVmxQWwZXWkGhvoHbaqXcKnU8zny4ycpu3vNqg0L/PcCiYtHtA13g==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-regexp-features-plugin": "^7.22.15", + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1536,13 +1568,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-sets-regex": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.22.5.tgz", - "integrity": "sha512-lhMfi4FC15j13eKrh3DnYHjpGj6UKQHtNKTbtc1igvAhRy4+kLhV07OpLcsN0VgDEw/MjAvJO4BdMJsHwMhzCg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.24.1.tgz", + "integrity": "sha512-fqj4WuzzS+ukpgerpAoOnMfQXwUHFxXUZUE84oL2Kao2N8uSlvcpnAidKASgsNgzZHBsHWvcm8s9FPWUhAb8fA==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.22.5", - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-create-regexp-features-plugin": "^7.22.15", + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1552,25 +1584,27 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.22.15.tgz", - "integrity": "sha512-tZFHr54GBkHk6hQuVA8w4Fmq+MSPsfvMG0vPnOYyTnJpyfMqybL8/MbNCPRT9zc2KBO2pe4tq15g6Uno4Jpoag==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-plugin-utils": "^7.22.5", - "@babel/helper-validator-option": "^7.22.15", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.22.15", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.22.15", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.24.5.tgz", + "integrity": "sha512-UGK2ifKtcC8i5AI4cH+sbLLuLc2ktYSFJgBAXorKAsHUZmrQ1q6aQ6i3BvU24wWs2AAKqQB6kq3N9V9Gw1HiMQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.24.4", + "@babel/helper-compilation-targets": "^7.23.6", + "@babel/helper-plugin-utils": "^7.24.5", + "@babel/helper-validator-option": "^7.23.5", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.24.5", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.24.1", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.24.1", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.24.1", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", "@babel/plugin-syntax-class-static-block": "^7.14.5", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.22.5", - "@babel/plugin-syntax-import-attributes": "^7.22.5", + "@babel/plugin-syntax-import-assertions": "^7.24.1", + "@babel/plugin-syntax-import-attributes": "^7.24.1", "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", @@ -1582,59 +1616,58 @@ "@babel/plugin-syntax-private-property-in-object": "^7.14.5", "@babel/plugin-syntax-top-level-await": "^7.14.5", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", - "@babel/plugin-transform-arrow-functions": "^7.22.5", - "@babel/plugin-transform-async-generator-functions": "^7.22.15", - "@babel/plugin-transform-async-to-generator": "^7.22.5", - "@babel/plugin-transform-block-scoped-functions": "^7.22.5", - "@babel/plugin-transform-block-scoping": "^7.22.15", - "@babel/plugin-transform-class-properties": "^7.22.5", - "@babel/plugin-transform-class-static-block": "^7.22.11", - "@babel/plugin-transform-classes": "^7.22.15", - "@babel/plugin-transform-computed-properties": "^7.22.5", - "@babel/plugin-transform-destructuring": "^7.22.15", - "@babel/plugin-transform-dotall-regex": "^7.22.5", - "@babel/plugin-transform-duplicate-keys": "^7.22.5", - "@babel/plugin-transform-dynamic-import": "^7.22.11", - "@babel/plugin-transform-exponentiation-operator": "^7.22.5", - "@babel/plugin-transform-export-namespace-from": "^7.22.11", - "@babel/plugin-transform-for-of": "^7.22.15", - "@babel/plugin-transform-function-name": "^7.22.5", - "@babel/plugin-transform-json-strings": "^7.22.11", - "@babel/plugin-transform-literals": "^7.22.5", - "@babel/plugin-transform-logical-assignment-operators": "^7.22.11", - "@babel/plugin-transform-member-expression-literals": "^7.22.5", - "@babel/plugin-transform-modules-amd": "^7.22.5", - "@babel/plugin-transform-modules-commonjs": "^7.22.15", - "@babel/plugin-transform-modules-systemjs": "^7.22.11", - "@babel/plugin-transform-modules-umd": "^7.22.5", + "@babel/plugin-transform-arrow-functions": "^7.24.1", + "@babel/plugin-transform-async-generator-functions": "^7.24.3", + "@babel/plugin-transform-async-to-generator": "^7.24.1", + "@babel/plugin-transform-block-scoped-functions": "^7.24.1", + "@babel/plugin-transform-block-scoping": "^7.24.5", + "@babel/plugin-transform-class-properties": "^7.24.1", + "@babel/plugin-transform-class-static-block": "^7.24.4", + "@babel/plugin-transform-classes": "^7.24.5", + "@babel/plugin-transform-computed-properties": "^7.24.1", + "@babel/plugin-transform-destructuring": "^7.24.5", + "@babel/plugin-transform-dotall-regex": "^7.24.1", + "@babel/plugin-transform-duplicate-keys": "^7.24.1", + "@babel/plugin-transform-dynamic-import": "^7.24.1", + "@babel/plugin-transform-exponentiation-operator": "^7.24.1", + "@babel/plugin-transform-export-namespace-from": "^7.24.1", + "@babel/plugin-transform-for-of": "^7.24.1", + "@babel/plugin-transform-function-name": "^7.24.1", + "@babel/plugin-transform-json-strings": "^7.24.1", + "@babel/plugin-transform-literals": "^7.24.1", + "@babel/plugin-transform-logical-assignment-operators": "^7.24.1", + "@babel/plugin-transform-member-expression-literals": "^7.24.1", + "@babel/plugin-transform-modules-amd": "^7.24.1", + "@babel/plugin-transform-modules-commonjs": "^7.24.1", + "@babel/plugin-transform-modules-systemjs": "^7.24.1", + "@babel/plugin-transform-modules-umd": "^7.24.1", "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", - "@babel/plugin-transform-new-target": "^7.22.5", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.22.11", - "@babel/plugin-transform-numeric-separator": "^7.22.11", - "@babel/plugin-transform-object-rest-spread": "^7.22.15", - "@babel/plugin-transform-object-super": "^7.22.5", - "@babel/plugin-transform-optional-catch-binding": "^7.22.11", - "@babel/plugin-transform-optional-chaining": "^7.22.15", - "@babel/plugin-transform-parameters": "^7.22.15", - "@babel/plugin-transform-private-methods": "^7.22.5", - "@babel/plugin-transform-private-property-in-object": "^7.22.11", - "@babel/plugin-transform-property-literals": "^7.22.5", - "@babel/plugin-transform-regenerator": "^7.22.10", - "@babel/plugin-transform-reserved-words": "^7.22.5", - "@babel/plugin-transform-shorthand-properties": "^7.22.5", - "@babel/plugin-transform-spread": "^7.22.5", - "@babel/plugin-transform-sticky-regex": "^7.22.5", - "@babel/plugin-transform-template-literals": "^7.22.5", - "@babel/plugin-transform-typeof-symbol": "^7.22.5", - "@babel/plugin-transform-unicode-escapes": "^7.22.10", - "@babel/plugin-transform-unicode-property-regex": "^7.22.5", - "@babel/plugin-transform-unicode-regex": "^7.22.5", - "@babel/plugin-transform-unicode-sets-regex": "^7.22.5", + "@babel/plugin-transform-new-target": "^7.24.1", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.24.1", + "@babel/plugin-transform-numeric-separator": "^7.24.1", + "@babel/plugin-transform-object-rest-spread": "^7.24.5", + "@babel/plugin-transform-object-super": "^7.24.1", + "@babel/plugin-transform-optional-catch-binding": "^7.24.1", + "@babel/plugin-transform-optional-chaining": "^7.24.5", + "@babel/plugin-transform-parameters": "^7.24.5", + "@babel/plugin-transform-private-methods": "^7.24.1", + "@babel/plugin-transform-private-property-in-object": "^7.24.5", + "@babel/plugin-transform-property-literals": "^7.24.1", + "@babel/plugin-transform-regenerator": "^7.24.1", + "@babel/plugin-transform-reserved-words": "^7.24.1", + "@babel/plugin-transform-shorthand-properties": "^7.24.1", + "@babel/plugin-transform-spread": "^7.24.1", + "@babel/plugin-transform-sticky-regex": "^7.24.1", + "@babel/plugin-transform-template-literals": "^7.24.1", + "@babel/plugin-transform-typeof-symbol": "^7.24.5", + "@babel/plugin-transform-unicode-escapes": "^7.24.1", + "@babel/plugin-transform-unicode-property-regex": "^7.24.1", + "@babel/plugin-transform-unicode-regex": "^7.24.1", + "@babel/plugin-transform-unicode-sets-regex": "^7.24.1", "@babel/preset-modules": "0.1.6-no-external-plugins", - "@babel/types": "^7.22.15", - "babel-plugin-polyfill-corejs2": "^0.4.5", - "babel-plugin-polyfill-corejs3": "^0.8.3", - "babel-plugin-polyfill-regenerator": "^0.5.2", + "babel-plugin-polyfill-corejs2": "^0.4.10", + "babel-plugin-polyfill-corejs3": "^0.10.4", + "babel-plugin-polyfill-regenerator": "^0.6.1", "core-js-compat": "^3.31.0", "semver": "^6.3.1" }, @@ -1675,9 +1708,9 @@ "dev": true }, "node_modules/@babel/runtime": { - "version": "7.22.11", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.11.tgz", - "integrity": "sha512-ee7jVNlWN09+KftVOu9n7S8gQzD/Z6hN/I8VBRXW4P1+Xe7kJGXMwu8vds4aGIMHZnNbdpSWCfZZtinytpcAvA==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.5.tgz", + "integrity": "sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g==", "dev": true, "dependencies": { "regenerator-runtime": "^0.14.0" @@ -1687,14 +1720,14 @@ } }, "node_modules/@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -1723,13 +1756,13 @@ } }, "node_modules/@babel/types": { - "version": "7.22.19", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.19.tgz", - "integrity": "sha512-P7LAw/LbojPzkgp5oznjE6tQEIWbp4PkkfrZDINTro9zgBRtI324/EYsiSI7lhPbpIQ+DCeR2NNmMWANGGfZsg==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.5.tgz", + "integrity": "sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.19", + "@babel/helper-string-parser": "^7.24.1", + "@babel/helper-validator-identifier": "^7.24.5", "to-fast-properties": "^2.0.0" }, "engines": { @@ -1973,9 +2006,9 @@ } }, "node_modules/@rollup/plugin-alias": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-5.0.0.tgz", - "integrity": "sha512-l9hY5chSCjuFRPsnRm16twWBiSApl2uYFLsepQYwtBuAxNMQ/1dJqADld40P0Jkqm65GRTLy/AC6hnpVebtLsA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-5.1.0.tgz", + "integrity": "sha512-lpA3RZ9PdIG7qqhEfv79tBffNaoDuukFDrmhLqg9ifv99u/ehn+lOg30x2zmhf8AQqQUZaMk/B9fZraQ6/acDQ==", "dev": true, "dependencies": { "slash": "^4.0.0" @@ -1984,7 +2017,7 @@ "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -1993,9 +2026,9 @@ } }, "node_modules/@rollup/plugin-babel": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-6.0.3.tgz", - "integrity": "sha512-fKImZKppa1A/gX73eg4JGo+8kQr/q1HBQaCGKECZ0v4YBBv3lFqi14+7xyApECzvkLTHCifx+7ntcrvtBIRcpg==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-6.0.4.tgz", + "integrity": "sha512-YF7Y52kFdFT/xVSuVdjkV5ZdX/3YtmX0QulG+x0taQOtJdHYzVU61aSSkAgVJ7NOv6qPkIYiJSgSWWN/DM5sGw==", "dev": true, "dependencies": { "@babel/helper-module-imports": "^7.18.6", @@ -2007,7 +2040,7 @@ "peerDependencies": { "@babel/core": "^7.0.0", "@types/babel__core": "^7.1.9", - "rollup": "^1.20.0||^2.0.0||^3.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "peerDependenciesMeta": { "@types/babel__core": { @@ -2019,9 +2052,9 @@ } }, "node_modules/@rollup/plugin-commonjs": { - "version": "25.0.4", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.4.tgz", - "integrity": "sha512-L92Vz9WUZXDnlQQl3EwbypJR4+DM2EbsO+/KOcEkP4Mc6Ct453EeDB2uH9lgRwj4w5yflgNpq9pHOiY8aoUXBQ==", + "version": "25.0.7", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz", + "integrity": "sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==", "dev": true, "dependencies": { "@rollup/pluginutils": "^5.0.1", @@ -2029,13 +2062,13 @@ "estree-walker": "^2.0.2", "glob": "^8.0.3", "is-reference": "1.2.1", - "magic-string": "^0.27.0" + "magic-string": "^0.30.3" }, "engines": { "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^2.68.0||^3.0.0" + "rollup": "^2.68.0||^3.0.0||^4.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -2044,9 +2077,9 @@ } }, "node_modules/@rollup/plugin-node-resolve": { - "version": "15.2.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.1.tgz", - "integrity": "sha512-nsbUg588+GDSu8/NS8T4UAshO6xeaOfINNuXeVHcKV02LJtoRaM1SiOacClw4kws1SFiNhdLGxlbMY9ga/zs/w==", + "version": "15.2.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", + "integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==", "dev": true, "dependencies": { "@rollup/pluginutils": "^5.0.1", @@ -2060,7 +2093,7 @@ "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^2.78.0||^3.0.0" + "rollup": "^2.78.0||^3.0.0||^4.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -2069,9 +2102,9 @@ } }, "node_modules/@rollup/plugin-terser": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.3.tgz", - "integrity": "sha512-EF0oejTMtkyhrkwCdg0HJ0IpkcaVg1MMSf2olHb2Jp+1mnLM04OhjpJWGma4HobiDTF0WCyViWuvadyE9ch2XA==", + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz", + "integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==", "dev": true, "dependencies": { "serialize-javascript": "^6.0.1", @@ -2082,7 +2115,7 @@ "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^2.x || ^3.x" + "rollup": "^2.0.0||^3.0.0||^4.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -2091,9 +2124,9 @@ } }, "node_modules/@rollup/pluginutils": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.4.tgz", - "integrity": "sha512-0KJnIoRI8A+a1dqOYLxH8vBf8bphDmty5QvIm2hqm7oFCFYKCAZWWd2hXgMibaPsNDhI0AtpYfQZJG47pt/k4g==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", + "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", "dev": true, "dependencies": { "@types/estree": "^1.0.0", @@ -2104,7 +2137,7 @@ "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "peerDependenciesMeta": { "rollup": { @@ -2112,10 +2145,218 @@ } } }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.17.2.tgz", + "integrity": "sha512-NM0jFxY8bB8QLkoKxIQeObCaDlJKewVlIEkuyYKm5An1tdVZ966w2+MPQ2l8LBZLjR+SgyV+nRkTIunzOYBMLQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.17.2.tgz", + "integrity": "sha512-yeX/Usk7daNIVwkq2uGoq2BYJKZY1JfyLTaHO/jaiSwi/lsf8fTFoQW/n6IdAsx5tx+iotu2zCJwz8MxI6D/Bw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.17.2.tgz", + "integrity": "sha512-kcMLpE6uCwls023+kknm71ug7MZOrtXo+y5p/tsg6jltpDtgQY1Eq5sGfHcQfb+lfuKwhBmEURDga9N0ol4YPw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.17.2.tgz", + "integrity": "sha512-AtKwD0VEx0zWkL0ZjixEkp5tbNLzX+FCqGG1SvOu993HnSz4qDI6S4kGzubrEJAljpVkhRSlg5bzpV//E6ysTQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.17.2.tgz", + "integrity": "sha512-3reX2fUHqN7sffBNqmEyMQVj/CKhIHZd4y631duy0hZqI8Qoqf6lTtmAKvJFYa6bhU95B1D0WgzHkmTg33In0A==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.17.2.tgz", + "integrity": "sha512-uSqpsp91mheRgw96xtyAGP9FW5ChctTFEoXP0r5FAzj/3ZRv3Uxjtc7taRQSaQM/q85KEKjKsZuiZM3GyUivRg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.17.2.tgz", + "integrity": "sha512-EMMPHkiCRtE8Wdk3Qhtciq6BndLtstqZIroHiiGzB3C5LDJmIZcSzVtLRbwuXuUft1Cnv+9fxuDtDxz3k3EW2A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.17.2.tgz", + "integrity": "sha512-NMPylUUZ1i0z/xJUIx6VUhISZDRT+uTWpBcjdv0/zkp7b/bQDF+NfnfdzuTiB1G6HTodgoFa93hp0O1xl+/UbA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.17.2.tgz", + "integrity": "sha512-T19My13y8uYXPw/L/k0JYaX1fJKFT/PWdXiHr8mTbXWxjVF1t+8Xl31DgBBvEKclw+1b00Chg0hxE2O7bTG7GQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.17.2.tgz", + "integrity": "sha512-BOaNfthf3X3fOWAB+IJ9kxTgPmMqPPH5f5k2DcCsRrBIbWnaJCgX2ll77dV1TdSy9SaXTR5iDXRL8n7AnoP5cg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.17.2.tgz", + "integrity": "sha512-W0UP/x7bnn3xN2eYMql2T/+wpASLE5SjObXILTMPUBDB/Fg/FxC+gX4nvCfPBCbNhz51C+HcqQp2qQ4u25ok6g==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.17.2.tgz", + "integrity": "sha512-Hy7pLwByUOuyaFC6mAr7m+oMC+V7qyifzs/nW2OJfC8H4hbCzOX07Ov0VFk/zP3kBsELWNFi7rJtgbKYsav9QQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.17.2.tgz", + "integrity": "sha512-h1+yTWeYbRdAyJ/jMiVw0l6fOOm/0D1vNLui9iPuqgRGnXA0u21gAqOyB5iHjlM9MMfNOm9RHCQ7zLIzT0x11Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.17.2.tgz", + "integrity": "sha512-tmdtXMfKAjy5+IQsVtDiCfqbynAQE/TQRpWdVataHmhMb9DCoJxp9vLcCBjEQWMiUYxO1QprH/HbY9ragCEFLA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.17.2.tgz", + "integrity": "sha512-7II/QCSTAHuE5vdZaQEwJq2ZACkBpQDOmQsE6D6XUbnBHW8IAhm4eTufL6msLJorzrHDFv3CF8oCA/hSIRuZeQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.17.2.tgz", + "integrity": "sha512-TGGO7v7qOq4CYmSBVEYpI1Y5xDuCEnbVC5Vth8mOsW0gDSzxNrVERPc790IGHsrT2dQSimgMr9Ub3Y1Jci5/8w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@types/estree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", - "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, "node_modules/@types/json5": { @@ -2130,10 +2371,22 @@ "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", "dev": true }, + "node_modules/@types/webxr": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/@types/webxr/-/webxr-0.5.16.tgz", + "integrity": "sha512-0E0Cl84FECtzrB4qG19TNTqpunw0F1YF0QZZnFMF6pDw1kNKJtrlTKlVB34stGIsHbZsYQ7H0tNjPfZftkHHoA==", + "dev": true + }, + "node_modules/@webgpu/types": { + "version": "0.1.40", + "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.40.tgz", + "integrity": "sha512-/BBkHLS6/eQjyWhY2H7Dx5DHcVrS2ICj9owvSRdgtQT6KcafLZA86tPze0xAOsd4FbsYKCUBUQyNi87q7gV7kw==", + "dev": true + }, "node_modules/@zeit/schemas": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.29.0.tgz", - "integrity": "sha512-g5QiLIfbg3pLuYUJPlisNKY+epQJTcMDsOnVNkscrDP1oi7vmJnzOANYJI/1pZcVJ6umUkBv3aFtlg1UvUHGzA==", + "version": "2.36.0", + "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-2.36.0.tgz", + "integrity": "sha512-7kjMwcChYEzMKjeex9ZFXkt1AyNov9R5HZtjBKVsmVpw7pa7ZtlCGvCBC2vnnXctaYN+aRI61HjIqeetZW5ROg==", "dev": true }, "node_modules/accepts": { @@ -2397,13 +2650,13 @@ } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.5.tgz", - "integrity": "sha512-19hwUH5FKl49JEsvyTcoHakh6BE0wgXLLptIyKZ3PijHc/Ci521wygORCUCCred+E/twuqRyAkE02BAWPmsHOg==", + "version": "0.4.11", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz", + "integrity": "sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q==", "dev": true, "dependencies": { "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.4.2", + "@babel/helper-define-polyfill-provider": "^0.6.2", "semver": "^6.3.1" }, "peerDependencies": { @@ -2420,25 +2673,25 @@ } }, "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.3.tgz", - "integrity": "sha512-z41XaniZL26WLrvjy7soabMXrfPWARN25PZoriDEiLMxAp50AUW3t35BGQUMg5xK3UrpVTtagIDklxYa+MhiNA==", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.4.tgz", + "integrity": "sha512-25J6I8NGfa5YkCDogHRID3fVCadIR8/pGl1/spvCkzb6lVn6SR3ojpx9nOn9iEBcUsjY24AmdKm5khcfKdylcg==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.4.2", - "core-js-compat": "^3.31.0" + "@babel/helper-define-polyfill-provider": "^0.6.1", + "core-js-compat": "^3.36.1" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.2.tgz", - "integrity": "sha512-tAlOptU0Xj34V1Y2PNTL4Y0FOJMDB6bZmoW39FeCQIhigGLkqu3Fj6uiXpxIf6Ij274ENdYx64y6Au+ZKlb1IA==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.2.tgz", + "integrity": "sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.4.2" + "@babel/helper-define-polyfill-provider": "^0.6.2" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" @@ -2495,9 +2748,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.10", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", - "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, "funding": [ { @@ -2514,10 +2767,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001517", - "electron-to-chromium": "^1.4.477", - "node-releases": "^2.0.13", - "update-browserslist-db": "^1.0.11" + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" }, "bin": { "browserslist": "cli.js" @@ -2588,9 +2841,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001524", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001524.tgz", - "integrity": "sha512-Jj917pJtYg9HSJBF95HVX3Cdr89JUyLT4IZ8SvM5aDRni95swKgYi3TgYLH5hnGfPE/U1dg6IfZ50UsIlLkwSA==", + "version": "1.0.30001616", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001616.tgz", + "integrity": "sha512-RHVYKov7IcdNjVHJFNY/78RdG4oGVjbayxv8u5IO74Wv7Hlq4PnJE6mo/OjFijjVFNy5ijnCt6H3IIo4t+wfEw==", "dev": true, "funding": [ { @@ -2845,12 +3098,12 @@ "peer": true }, "node_modules/core-js-compat": { - "version": "3.32.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.32.1.tgz", - "integrity": "sha512-GSvKDv4wE0bPnQtjklV101juQ85g6H3rm5PDP20mqlS5j0kXF3pP97YvAu5hl+uFHqMictp3b2VxOHljWMAtuA==", + "version": "3.37.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.37.0.tgz", + "integrity": "sha512-vYq4L+T8aS5UuFg4UwDhc7YNRWVeVZwltad9C/jV3R2LgVOpS9BDr7l/WL6BN0dbV3k1XejPTHqqEzJgsa0frA==", "dev": true, "dependencies": { - "browserslist": "^4.21.10" + "browserslist": "^4.23.0" }, "funding": { "type": "opencollective", @@ -2947,9 +3200,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.503", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.503.tgz", - "integrity": "sha512-LF2IQit4B0VrUHFeQkWhZm97KuJSGF2WJqq1InpY+ECpFRkXd8yTIaTtJxsO0OKDmiBYwWqcrNaXOurn2T2wiA==", + "version": "1.4.758", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.758.tgz", + "integrity": "sha512-/o9x6TCdrYZBMdGeTifAP3wlF/gVT+TtWJe3BSmtNh92Mw81U9hrYwW9OAGUh+sEOX/yz5e34sksqRruZbjYrw==", "dev": true }, "node_modules/emoji-regex": { @@ -3052,9 +3305,9 @@ } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, "engines": { "node": ">=6" @@ -4398,15 +4651,12 @@ } }, "node_modules/magic-string": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz", - "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==", + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", "dev": true, "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.13" - }, - "engines": { - "node": ">=12" + "@jridgewell/sourcemap-codec": "^1.4.15" } }, "node_modules/merge-stream": { @@ -4488,9 +4738,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "node_modules/npm-run-path": { @@ -4743,10 +4993,14 @@ } }, "node_modules/playcanvas": { - "version": "1.65.4", - "resolved": "https://registry.npmjs.org/playcanvas/-/playcanvas-1.65.4.tgz", - "integrity": "sha512-awWalFBYXjNv3xFd0vBn8fmMtd3u8vNwOwa9+3bvZfEQ9KvWzj0EcrjlRFoONa3uVs6dmAaq2x3huKB2Vw0BpA==", - "dev": true + "version": "1.70.2", + "resolved": "https://registry.npmjs.org/playcanvas/-/playcanvas-1.70.2.tgz", + "integrity": "sha512-QqczwLiH3HwigLd2ADtZPujIjsl/09Ge7Z9PCGfVm5XO1VCyVh6eUy6pc1SkZmWmlNY2/fu2TO/LcpUFLvTfOw==", + "dev": true, + "dependencies": { + "@types/webxr": "^0.5.14", + "@webgpu/types": "^0.1.40" + } }, "node_modules/prelude-ls": { "version": "1.2.1", @@ -4844,9 +5098,9 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", - "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", "dev": true }, "node_modules/regenerator-transform": { @@ -5016,18 +5270,37 @@ } }, "node_modules/rollup": { - "version": "3.29.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.1.tgz", - "integrity": "sha512-c+ebvQz0VIH4KhhCpDsI+Bik0eT8ZFEVZEYw0cGMVqIP8zc+gnwl7iXCamTw7vzv2MeuZFZfdx5JJIq+ehzDlg==", + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.17.2.tgz", + "integrity": "sha512-/9ClTJPByC0U4zNLowV1tMBe8yMEAxewtR3cUNX5BoEpGH3dQEWpJLr6CLp0fPdYRF/fzVOgvDb1zXuakwF5kQ==", "dev": true, + "dependencies": { + "@types/estree": "1.0.5" + }, "bin": { "rollup": "dist/bin/rollup" }, "engines": { - "node": ">=14.18.0", + "node": ">=18.0.0", "npm": ">=8.0.0" }, "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.17.2", + "@rollup/rollup-android-arm64": "4.17.2", + "@rollup/rollup-darwin-arm64": "4.17.2", + "@rollup/rollup-darwin-x64": "4.17.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.17.2", + "@rollup/rollup-linux-arm-musleabihf": "4.17.2", + "@rollup/rollup-linux-arm64-gnu": "4.17.2", + "@rollup/rollup-linux-arm64-musl": "4.17.2", + "@rollup/rollup-linux-powerpc64le-gnu": "4.17.2", + "@rollup/rollup-linux-riscv64-gnu": "4.17.2", + "@rollup/rollup-linux-s390x-gnu": "4.17.2", + "@rollup/rollup-linux-x64-gnu": "4.17.2", + "@rollup/rollup-linux-x64-musl": "4.17.2", + "@rollup/rollup-win32-arm64-msvc": "4.17.2", + "@rollup/rollup-win32-ia32-msvc": "4.17.2", + "@rollup/rollup-win32-x64-msvc": "4.17.2", "fsevents": "~2.3.2" } }, @@ -5107,13 +5380,10 @@ } }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.1.tgz", + "integrity": "sha512-f/vbBsu+fOiYt+lmwZV0rVwJScl46HppnOA1ZvIuBWKOTlllpyJ3bfVax76/OrhCH38dyxoDIA8K7uB963IYgA==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -5121,24 +5391,6 @@ "node": ">=10" } }, - "node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/serialize-javascript": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", @@ -5149,13 +5401,13 @@ } }, "node_modules/serve": { - "version": "14.2.1", - "resolved": "https://registry.npmjs.org/serve/-/serve-14.2.1.tgz", - "integrity": "sha512-48er5fzHh7GCShLnNyPBRPEjs2I6QBozeGr02gaacROiyS/8ARADlj595j39iZXAqBbJHH/ivJJyPRWY9sQWZA==", + "version": "14.2.3", + "resolved": "https://registry.npmjs.org/serve/-/serve-14.2.3.tgz", + "integrity": "sha512-VqUFMC7K3LDGeGnJM9h56D3XGKb6KGgOw0cVNtA26yYXHCcpxf3xwCTUaQoWlVS7i8Jdh3GjQkOB23qsXyjoyQ==", "dev": true, "dependencies": { - "@zeit/schemas": "2.29.0", - "ajv": "8.11.0", + "@zeit/schemas": "2.36.0", + "ajv": "8.12.0", "arg": "5.0.2", "boxen": "7.0.0", "chalk": "5.0.1", @@ -5211,9 +5463,9 @@ } }, "node_modules/serve/node_modules/ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", @@ -5715,9 +5967,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.15.tgz", + "integrity": "sha512-K9HWH62x3/EalU1U6sjSZiylm9C8tgq2mSvshZpqc7QE69RaA2qjhkW2HlNA0tFpEbtyFz7HTqbSdN4MSwUodA==", "dev": true, "funding": [ { @@ -5734,7 +5986,7 @@ } ], "dependencies": { - "escalade": "^3.1.1", + "escalade": "^3.1.2", "picocolors": "^1.0.0" }, "bin": { diff --git a/package.json b/package.json index b9d55b4..2c41092 100644 --- a/package.json +++ b/package.json @@ -29,18 +29,18 @@ } }, "devDependencies": { - "@babel/preset-env": "^7.22.15", + "@babel/preset-env": "^7.24.5", "@playcanvas/eslint-config": "^1.7.1", - "@rollup/plugin-alias": "^5.0.0", - "@rollup/plugin-babel": "^6.0.3", - "@rollup/plugin-commonjs": "^25.0.4", - "@rollup/plugin-node-resolve": "^15.2.1", - "@rollup/plugin-terser": "^0.4.3", + "@rollup/plugin-alias": "^5.1.0", + "@rollup/plugin-babel": "^6.0.4", + "@rollup/plugin-commonjs": "^25.0.7", + "@rollup/plugin-node-resolve": "^15.2.3", + "@rollup/plugin-terser": "^0.4.4", "eslint": "^8.49.0", - "playcanvas": "^1.65.4", - "rollup": "^3.29.1", - "semver": "^7.5.4", - "serve": "^14.2.1", + "playcanvas": "^1.70.2", + "rollup": "^4.17.2", + "semver": "^7.6.1", + "serve": "^14.2.3", "spine40": "npm:@esotericsoftware/spine-core@4.0", "spine41": "npm:@esotericsoftware/spine-core@4.1" },