phaser-ui-comps
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("phaser")):"function"==typeof define&&define.amd?define(["phaser"],e):"object"==typeof exports?exports.PhaserComps=e(require("phaser")):t.PhaserComps=e(t.Phaser)}(window,function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=11)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();n(2);var i,o=n(1);(i=o)&&i.__esModule;var u="event_state",a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.lockId=null,r._parent=t,r._key=n,r._clip=null,r._texts={},n&&t&&t.on(u,r._onEventState,r),r._clipUpdate(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Phaser.Events.EventEmitter),r(e,null,[{key:"EVENT_STATE",get:function(){return u}}]),r(e,[{key:"appendClip",value:function(t){this._clip!==t&&(null!==this._clip&&this.removeClip(),this._clip=t,this._clip&&this.onClipAppend(this._clip),this._clipProcess())}},{key:"onClipAppend",value:function(t){}},{key:"removeClip",value:function(){this.onClipRemove(this._clip),this._clip=null}},{key:"onClipRemove",value:function(t){}},{key:"doState",value:function(){var t=this.getStateId();this._setupState(t)}},{key:"getText",value:function(t){return this._texts[t]}},{key:"setText",value:function(t,e){if(this._texts[t]!==e&&(this._texts[t]=e,this._clip)){var n=this._clip.getChildText(t);n&&(n.text=e)}}},{key:"getStateId",value:function(){return"default"}},{key:"destroy",value:function(t){this._parent&&this._parent.removeListener(u,this._onEventState),this._clip&&this._clip.destroy(t)}},{key:"_clipUpdate",value:function(){if(this._key)if(this._parent._clip){var t=this._parent._clip.getChildClip(this._key);this.appendClip(t)}else this.appendClip(null);else;}},{key:"_clipProcess",value:function(){this._clip&&(this.doState(),this.onClipProcess())}},{key:"onClipProcess",value:function(){}},{key:"_setupState",value:function(t){if(this._clip)for(var e in this._clip.setState(t),this._texts){var n=this._clip.getChildText(e);n&&(n.text=this._texts[e])}this.emit(u)}},{key:"_onEventState",value:function(){this._clipUpdate()}}]),e}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var i=!1,o=[],u=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return r(t,null,[{key:"lock",value:function(t){this.unlock(),"string"==typeof t?o.push(t):t.forEach(function(t){return o.push(t)}),i=!0}},{key:"unlock",value:function(){o.length=0,i=!1}},{key:"check",value:function(t){return!i||-1!==o.indexOf(t)}}]),t}();e.default=u},function(e,n){e.exports=t},function(t,e,n){(function(t,n){var r;!function(){var i="object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t||this||{},o=i._,u=Array.prototype,a=Object.prototype,l="undefined"!=typeof Symbol?Symbol.prototype:null,s=u.push,c=u.slice,f=a.toString,p=a.hasOwnProperty,h=Array.isArray,_=Object.keys,v=Object.create,y=function(){},d=function(t){return t instanceof d?t:this instanceof d?void(this._wrapped=t):new d(t)};e.nodeType?i._=d:(!n.nodeType&&n.exports&&(e=n.exports=d),e._=d),d.VERSION="1.9.1";var g,b=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},m=function(t,e,n){return d.iteratee!==g?d.iteratee(t,e):null==t?d.identity:d.isFunction(t)?b(t,e,n):d.isObject(t)&&!d.isArray(t)?d.matcher(t):d.property(t)};d.iteratee=g=function(t,e){return m(t,e,1/0)};var O=function(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+e];switch(e){case 0:return t.call(this,r);case 1:return t.call(this,arguments[0],r);case 2:return t.call(this,arguments[0],arguments[1],r)}var o=Array(e+1);for(i=0;i<e;i++)o[i]=arguments[i];return o[e]=r,t.apply(this,o)}},k=function(t){if(!d.isObject(t))return{};if(v)return v(t);y.prototype=t;var e=new y;return y.prototype=null,e},w=function(t){return function(e){return null==e?void 0:e[t]}},C=function(t,e){return null!=t&&p.call(t,e)},j=function(t,e){for(var n=e.length,r=0;r<n;r++){if(null==t)return;t=t[e[r]]}return n?t:void 0},P=Math.pow(2,53)-1,S=w("length"),x=function(t){var e=S(t);return"number"==typeof e&&e>=0&&e<=P};d.each=d.forEach=function(t,e,n){var r,i;if(e=b(e,n),x(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=d.keys(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t},d.map=d.collect=function(t,e,n){e=m(e,n);for(var r=!x(t)&&d.keys(t),i=(r||t).length,o=Array(i),u=0;u<i;u++){var a=r?r[u]:u;o[u]=e(t[a],a,t)}return o};var E=function(t){var e=function(e,n,r,i){var o=!x(e)&&d.keys(e),u=(o||e).length,a=t>0?0:u-1;for(i||(r=e[o?o[a]:a],a+=t);a>=0&&a<u;a+=t){var l=o?o[a]:a;r=n(r,e[l],l,e)}return r};return function(t,n,r,i){var o=arguments.length>=3;return e(t,b(n,i,4),r,o)}};d.reduce=d.foldl=d.inject=E(1),d.reduceRight=d.foldr=E(-1),d.find=d.detect=function(t,e,n){var r=(x(t)?d.findIndex:d.findKey)(t,e,n);if(void 0!==r&&-1!==r)return t[r]},d.filter=d.select=function(t,e,n){var r=[];return e=m(e,n),d.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},d.reject=function(t,e,n){return d.filter(t,d.negate(m(e)),n)},d.every=d.all=function(t,e,n){e=m(e,n);for(var r=!x(t)&&d.keys(t),i=(r||t).length,o=0;o<i;o++){var u=r?r[o]:o;if(!e(t[u],u,t))return!1}return!0},d.some=d.any=function(t,e,n){e=m(e,n);for(var r=!x(t)&&d.keys(t),i=(r||t).length,o=0;o<i;o++){var u=r?r[o]:o;if(e(t[u],u,t))return!0}return!1},d.contains=d.includes=d.include=function(t,e,n,r){return x(t)||(t=d.values(t)),("number"!=typeof n||r)&&(n=0),d.indexOf(t,e,n)>=0},d.invoke=O(function(t,e,n){var r,i;return d.isFunction(e)?i=e:d.isArray(e)&&(r=e.slice(0,-1),e=e[e.length-1]),d.map(t,function(t){var o=i;if(!o){if(r&&r.length&&(t=j(t,r)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)})}),d.pluck=function(t,e){return d.map(t,d.property(e))},d.where=function(t,e){return d.filter(t,d.matcher(e))},d.findWhere=function(t,e){return d.find(t,d.matcher(e))},d.max=function(t,e,n){var r,i,o=-1/0,u=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var a=0,l=(t=x(t)?t:d.values(t)).length;a<l;a++)null!=(r=t[a])&&r>o&&(o=r);else e=m(e,n),d.each(t,function(t,n,r){((i=e(t,n,r))>u||i===-1/0&&o===-1/0)&&(o=t,u=i)});return o},d.min=function(t,e,n){var r,i,o=1/0,u=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var a=0,l=(t=x(t)?t:d.values(t)).length;a<l;a++)null!=(r=t[a])&&r<o&&(o=r);else e=m(e,n),d.each(t,function(t,n,r){((i=e(t,n,r))<u||i===1/0&&o===1/0)&&(o=t,u=i)});return o},d.shuffle=function(t){return d.sample(t,1/0)},d.sample=function(t,e,n){if(null==e||n)return x(t)||(t=d.values(t)),t[d.random(t.length-1)];var r=x(t)?d.clone(t):d.values(t),i=S(r);e=Math.max(Math.min(e,i),0);for(var o=i-1,u=0;u<e;u++){var a=d.random(u,o),l=r[u];r[u]=r[a],r[a]=l}return r.slice(0,e)},d.sortBy=function(t,e,n){var r=0;return e=m(e,n),d.pluck(d.map(t,function(t,n,i){return{value:t,index:r++,criteria:e(t,n,i)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index}),"value")};var I=function(t,e){return function(n,r,i){var o=e?[[],[]]:{};return r=m(r,i),d.each(n,function(e,i){var u=r(e,i,n);t(o,e,u)}),o}};d.groupBy=I(function(t,e,n){C(t,n)?t[n].push(e):t[n]=[e]}),d.indexBy=I(function(t,e,n){t[n]=e}),d.countBy=I(function(t,e,n){C(t,n)?t[n]++:t[n]=1});var T=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;d.toArray=function(t){return t?d.isArray(t)?c.call(t):d.isString(t)?t.match(T):x(t)?d.map(t,d.identity):d.values(t):[]},d.size=function(t){return null==t?0:x(t)?t.length:d.keys(t).length},d.partition=I(function(t,e,n){t[n?0:1].push(e)},!0),d.first=d.head=d.take=function(t,e,n){return null==t||t.length<1?null==e?void 0:[]:null==e||n?t[0]:d.initial(t,t.length-e)},d.initial=function(t,e,n){return c.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},d.last=function(t,e,n){return null==t||t.length<1?null==e?void 0:[]:null==e||n?t[t.length-1]:d.rest(t,Math.max(0,t.length-e))},d.rest=d.tail=d.drop=function(t,e,n){return c.call(t,null==e||n?1:e)},d.compact=function(t){return d.filter(t,Boolean)};var M=function(t,e,n,r){for(var i=(r=r||[]).length,o=0,u=S(t);o<u;o++){var a=t[o];if(x(a)&&(d.isArray(a)||d.isArguments(a)))if(e)for(var l=0,s=a.length;l<s;)r[i++]=a[l++];else M(a,e,n,r),i=r.length;else n||(r[i++]=a)}return r};d.flatten=function(t,e){return M(t,e,!1)},d.without=O(function(t,e){return d.difference(t,e)}),d.uniq=d.unique=function(t,e,n,r){d.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=m(n,r));for(var i=[],o=[],u=0,a=S(t);u<a;u++){var l=t[u],s=n?n(l,u,t):l;e&&!n?(u&&o===s||i.push(l),o=s):n?d.contains(o,s)||(o.push(s),i.push(l)):d.contains(i,l)||i.push(l)}return i},d.union=O(function(t){return d.uniq(M(t,!0,!0))}),d.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=S(t);r<i;r++){var o=t[r];if(!d.contains(e,o)){var u;for(u=1;u<n&&d.contains(arguments[u],o);u++);u===n&&e.push(o)}}return e},d.difference=O(function(t,e){return e=M(e,!0,!0),d.filter(t,function(t){return!d.contains(e,t)})}),d.unzip=function(t){for(var e=t&&d.max(t,S).length||0,n=Array(e),r=0;r<e;r++)n[r]=d.pluck(t,r);return n},d.zip=O(d.unzip),d.object=function(t,e){for(var n={},r=0,i=S(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n};var A=function(t){return function(e,n,r){n=m(n,r);for(var i=S(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}};d.findIndex=A(1),d.findLastIndex=A(-1),d.sortedIndex=function(t,e,n,r){for(var i=(n=m(n,r,1))(e),o=0,u=S(t);o<u;){var a=Math.floor((o+u)/2);n(t[a])<i?o=a+1:u=a}return o};var B=function(t,e,n){return function(r,i,o){var u=0,a=S(r);if("number"==typeof o)t>0?u=o>=0?o:Math.max(o+a,u):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(c.call(r,u,a),d.isNaN))>=0?o+u:-1;for(o=t>0?u:a-1;o>=0&&o<a;o+=t)if(r[o]===i)return o;return-1}};d.indexOf=B(1,d.findIndex,d.sortedIndex),d.lastIndexOf=B(-1,d.findLastIndex),d.range=function(t,e,n){null==e&&(e=t||0,t=0),n||(n=e<t?-1:1);for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i},d.chunk=function(t,e){if(null==e||e<1)return[];for(var n=[],r=0,i=t.length;r<i;)n.push(c.call(t,r,r+=e));return n};var F=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=k(t.prototype),u=t.apply(o,i);return d.isObject(u)?u:o};d.bind=O(function(t,e,n){if(!d.isFunction(t))throw new TypeError("Bind must be called on a function");var r=O(function(i){return F(t,r,e,this,n.concat(i))});return r}),d.partial=O(function(t,e){var n=d.partial.placeholder,r=function(){for(var i=0,o=e.length,u=Array(o),a=0;a<o;a++)u[a]=e[a]===n?arguments[i++]:e[a];for(;i<arguments.length;)u.push(arguments[i++]);return F(t,r,this,this,u)};return r}),d.partial.placeholder=d,d.bindAll=O(function(t,e){var n=(e=M(e,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=e[n];t[r]=d.bind(t[r],t)}}),d.memoize=function(t,e){var n=function(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return C(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},d.delay=O(function(t,e,n){return setTimeout(function(){return t.apply(null,n)},e)}),d.defer=d.partial(d.delay,d,1),d.throttle=function(t,e,n){var r,i,o,u,a=0;n||(n={});var l=function(){a=!1===n.leading?0:d.now(),r=null,u=t.apply(i,o),r||(i=o=null)},s=function(){var s=d.now();a||!1!==n.leading||(a=s);var c=e-(s-a);return i=this,o=arguments,c<=0||c>e?(r&&(clearTimeout(r),r=null),a=s,u=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(l,c)),u};return s.cancel=function(){clearTimeout(r),a=0,r=i=o=null},s},d.debounce=function(t,e,n){var r,i,o=function(e,n){r=null,n&&(i=t.apply(e,n))},u=O(function(u){if(r&&clearTimeout(r),n){var a=!r;r=setTimeout(o,e),a&&(i=t.apply(this,u))}else r=d.delay(o,e,this,u);return i});return u.cancel=function(){clearTimeout(r),r=null},u},d.wrap=function(t,e){return d.partial(e,t)},d.negate=function(t){return function(){return!t.apply(this,arguments)}},d.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},d.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},d.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},d.once=d.partial(d.before,2),d.restArguments=O;var D=!{toString:null}.propertyIsEnumerable("toString"),N=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],V=function(t,e){var n=N.length,r=t.constructor,i=d.isFunction(r)&&r.prototype||a,o="constructor";for(C(t,o)&&!d.contains(e,o)&&e.push(o);n--;)(o=N[n])in t&&t[o]!==i[o]&&!d.contains(e,o)&&e.push(o)};d.keys=function(t){if(!d.isObject(t))return[];if(_)return _(t);var e=[];for(var n in t)C(t,n)&&e.push(n);return D&&V(t,e),e},d.allKeys=function(t){if(!d.isObject(t))return[];var e=[];for(var n in t)e.push(n);return D&&V(t,e),e},d.values=function(t){for(var e=d.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r},d.mapObject=function(t,e,n){e=m(e,n);for(var r=d.keys(t),i=r.length,o={},u=0;u<i;u++){var a=r[u];o[a]=e(t[a],a,t)}return o},d.pairs=function(t){for(var e=d.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},d.invert=function(t){for(var e={},n=d.keys(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e},d.functions=d.methods=function(t){var e=[];for(var n in t)d.isFunction(t[n])&&e.push(n);return e.sort()};var R=function(t,e){return function(n){var r=arguments.length;if(e&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],u=t(o),a=u.length,l=0;l<a;l++){var s=u[l];e&&void 0!==n[s]||(n[s]=o[s])}return n}};d.extend=R(d.allKeys),d.extendOwn=d.assign=R(d.keys),d.findKey=function(t,e,n){e=m(e,n);for(var r,i=d.keys(t),o=0,u=i.length;o<u;o++)if(e(t[r=i[o]],r,t))return r};var U,K,L=function(t,e,n){return e in n};d.pick=O(function(t,e){var n={},r=e[0];if(null==t)return n;d.isFunction(r)?(e.length>1&&(r=b(r,e[1])),e=d.allKeys(t)):(r=L,e=M(e,!1,!1),t=Object(t));for(var i=0,o=e.length;i<o;i++){var u=e[i],a=t[u];r(a,u,t)&&(n[u]=a)}return n}),d.omit=O(function(t,e){var n,r=e[0];return d.isFunction(r)?(r=d.negate(r),e.length>1&&(n=e[1])):(e=d.map(M(e,!1,!1),String),r=function(t,n){return!d.contains(e,n)}),d.pick(t,r,n)}),d.defaults=R(d.allKeys,!0),d.create=function(t,e){var n=k(t);return e&&d.extendOwn(n,e),n},d.clone=function(t){return d.isObject(t)?d.isArray(t)?t.slice():d.extend({},t):t},d.tap=function(t,e){return e(t),t},d.isMatch=function(t,e){var n=d.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var u=n[o];if(e[u]!==i[u]||!(u in i))return!1}return!0},U=function(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var i=typeof t;return("function"===i||"object"===i||"object"==typeof e)&&K(t,e,n,r)},K=function(t,e,n,r){t instanceof d&&(t=t._wrapped),e instanceof d&&(e=e._wrapped);var i=f.call(t);if(i!==f.call(e))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return l.valueOf.call(t)===l.valueOf.call(e)}var o="[object Array]"===i;if(!o){if("object"!=typeof t||"object"!=typeof e)return!1;var u=t.constructor,a=e.constructor;if(u!==a&&!(d.isFunction(u)&&u instanceof u&&d.isFunction(a)&&a instanceof a)&&"constructor"in t&&"constructor"in e)return!1}r=r||[];for(var s=(n=n||[]).length;s--;)if(n[s]===t)return r[s]===e;if(n.push(t),r.push(e),o){if((s=t.length)!==e.length)return!1;for(;s--;)if(!U(t[s],e[s],n,r))return!1}else{var c,p=d.keys(t);if(s=p.length,d.keys(e).length!==s)return!1;for(;s--;)if(c=p[s],!C(e,c)||!U(t[c],e[c],n,r))return!1}return n.pop(),r.pop(),!0},d.isEqual=function(t,e){return U(t,e)},d.isEmpty=function(t){return null==t||(x(t)&&(d.isArray(t)||d.isString(t)||d.isArguments(t))?0===t.length:0===d.keys(t).length)},d.isElement=function(t){return!(!t||1!==t.nodeType)},d.isArray=h||function(t){return"[object Array]"===f.call(t)},d.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},d.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(t){d["is"+t]=function(e){return f.call(e)==="[object "+t+"]"}}),d.isArguments(arguments)||(d.isArguments=function(t){return C(t,"callee")});var X=i.document&&i.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof X&&(d.isFunction=function(t){return"function"==typeof t||!1}),d.isFinite=function(t){return!d.isSymbol(t)&&isFinite(t)&&!isNaN(parseFloat(t))},d.isNaN=function(t){return d.isNumber(t)&&isNaN(t)},d.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===f.call(t)},d.isNull=function(t){return null===t},d.isUndefined=function(t){return void 0===t},d.has=function(t,e){if(!d.isArray(e))return C(t,e);for(var n=e.length,r=0;r<n;r++){var i=e[r];if(null==t||!p.call(t,i))return!1;t=t[i]}return!!n},d.noConflict=function(){return i._=o,this},d.identity=function(t){return t},d.constant=function(t){return function(){return t}},d.noop=function(){},d.property=function(t){return d.isArray(t)?function(e){return j(e,t)}:w(t)},d.propertyOf=function(t){return null==t?function(){}:function(e){return d.isArray(e)?j(t,e):t[e]}},d.matcher=d.matches=function(t){return t=d.extendOwn({},t),function(e){return d.isMatch(e,t)}},d.times=function(t,e,n){var r=Array(Math.max(0,t));e=b(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},d.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},d.now=Date.now||function(){return(new Date).getTime()};var Y={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Z=d.invert(Y),H=function(t){var e=function(e){return t[e]},n="(?:"+d.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};d.escape=H(Y),d.unescape=H(Z),d.result=function(t,e,n){d.isArray(e)||(e=[e]);var r=e.length;if(!r)return d.isFunction(n)?n.call(t):n;for(var i=0;i<r;i++){var o=null==t?void 0:t[e[i]];void 0===o&&(o=n,i=r),t=d.isFunction(o)?o.call(t):o}return t};var G=0;d.uniqueId=function(t){var e=++G+"";return t?t+e:e},d.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,z={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},W=/\\|'|\r|\n|\u2028|\u2029/g,$=function(t){return"\\"+z[t]};d.template=function(t,e,n){!e&&n&&(e=n),e=d.defaults({},e,d.templateSettings);var r,i=RegExp([(e.escape||q).source,(e.interpolate||q).source,(e.evaluate||q).source].join("|")+"|$","g"),o=0,u="__p+='";t.replace(i,function(e,n,r,i,a){return u+=t.slice(o,a).replace(W,$),o=a+e.length,n?u+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?u+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(u+="';\n"+i+"\n__p+='"),e}),u+="';\n",e.variable||(u="with(obj||{}){\n"+u+"}\n"),u="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+u+"return __p;\n";try{r=new Function(e.variable||"obj","_",u)}catch(t){throw t.source=u,t}var a=function(t){return r.call(this,t,d)},l=e.variable||"obj";return a.source="function("+l+"){\n"+u+"}",a},d.chain=function(t){var e=d(t);return e._chain=!0,e};var J=function(t,e){return t._chain?d(e).chain():e};d.mixin=function(t){return d.each(d.functions(t),function(e){var n=d[e]=t[e];d.prototype[e]=function(){var t=[this._wrapped];return s.apply(t,arguments),J(this,n.apply(d,t))}}),d},d.mixin(d),d.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=u[t];d.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],J(this,n)}}),d.each(["concat","join","slice"],function(t){var e=u[t];d.prototype[t]=function(){return J(this,e.apply(this._wrapped,arguments))}}),d.prototype.value=function(){return this._wrapped},d.prototype.valueOf=d.prototype.toJSON=d.prototype.value,d.prototype.toString=function(){return String(this._wrapped)},void 0===(r=function(){return d}.apply(e,[]))||(n.exports=r)}()}).call(this,n(5),n(13)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=u(n(0)),o=u(n(1));function u(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i._enable=!0,i._isPressed=!1,i._isOver=!1,r&&(i.label=r),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),r(e,null,[{key:"EVENT_CLICK",get:function(){return"event_click"}}]),r(e,[{key:"onClipAppend",value:function(t){this._updateInteractive()}},{key:"onClipRemove",value:function(t){var e=t.getChildClip("HIT_ZONE");e&&this._removeInteractive(e)}},{key:"_setupInteractive",value:function(t){t.setInteractive({useHandCursor:!0}),t.on("pointerdown",this._onPointerDown,this),t.on("pointerup",this._onPointerUp,this),t.on("pointerover",this._onPointerOver,this),t.on("pointerout",this._onPointerOut,this)}},{key:"_removeInteractive",value:function(t){t.disableInteractive(),t.removeListener("pointerdown",this._onPointerDown,this),t.removeListener("pointerup",this._onPointerUp,this),t.removeListener("pointerover",this._onPointerOver,this),t.removeListener("pointerout",this._onPointerOut,this)}},{key:"_updateInteractive",value:function(){if(this._clip){var t=this._clip.getChildClip("HIT_ZONE");t&&(this.enable?this._setupInteractive(t):this._removeInteractive(t))}}},{key:"getStateId",value:function(){return this.enable?this._isPressed?this.STATE_DOWN:this._isOver?this.STATE_OVER:this.STATE_UP:this.STATE_DISABLE}},{key:"_onClick",value:function(){this.emit("event_click")}},{key:"_onPointerOut",value:function(){this._isOver=!1,this._isPressed=!1,this.doState()}},{key:"_onPointerOver",value:function(){this._isOver=!0,this.doState()}},{key:"_onPointerDown",value:function(){this._isPressed=!0,this.doState()}},{key:"_onPointerUp",value:function(){var t=this._isPressed&&this._isOver;this._isPressed=!1,this.doState(),t&&o.default.check(this.lockId)&&this._onClick()}},{key:"destroy",value:function(){if(this._clip){var t=this._clip.getChildClip("HIT_ZONE");t&&this._removeInteractive(t)}(function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var u=i.get;return void 0!==u?u.call(r):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"label",get:function(){return this.getText("label")},set:function(t){this.setText("label",t)}},{key:"enable",get:function(){return this._enable},set:function(t){this._enable!==t&&(this._enable=t,this._updateInteractive(),this.doState())}},{key:"STATE_UP",get:function(){return"up"}},{key:"STATE_DOWN",get:function(){return"down"}},{key:"STATE_OVER",get:function(){return"over"}},{key:"STATE_DISABLE",get:function(){return"disable"}}]),e}();e.default=a},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=u(n(2)),o=u(n(3));function u(t){return t&&t.__esModule?t:{default:t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var l=function(t){function e(t,n,r){a(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,0,0));return i.childComponentClips=[],i._config=n,i._key=n.key,i._textures=r,i.imageFramesMap={},i._stateManager=new c(i,n),i._childrenById={},i._createImagesMap(r),i._parseConfig(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default.GameObjects.Container),r(e,[{key:"getStateConfig",value:function(t){return this._stateManager.getStateConfigById(t)}},{key:"getStateIds",value:function(){return this._stateManager.stateIds}},{key:"setState",value:function(t,e){this._stateManager.setState(t,e)}},{key:"applyChildParams",value:function(t,n){this._childrenById.hasOwnProperty(t)&&e._setupCommonParams(this._childrenById[t],n)}},{key:"getChildClip",value:function(t){return this._stateManager.getActiveComponentByKey(t)}},{key:"getChildText",value:function(t){return this._stateManager.getActiveComponentByKey(t)}},{key:"destroy",value:function(t){o.default.each(this.childComponentClips,function(e){e.destroy(t)},this),function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var u=i.get;return void 0!==u?u.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this,t)}},{key:"_createImagesMap",value:function(t){var e=this;o.default.each(t,function(t){var n=e.scene.textures.get(t);if(n){var r=n.getFrameNames();o.default.each(r,function(n){e.imageFramesMap[n]=t},e)}},this)}},{key:"_parseConfig",value:function(){var t=this;this._config.hasOwnProperty("children")&&o.default.each(this._config.children,function(e){t._createChildFromConfig(e)},this)}},{key:"_createChildFromConfig",value:function(t){var n=this,r=null,i=t.childId,u=t.key,a=!0;if("image"===t.type)r=this._createImageFromConfig(t);else if("text"===t.type)r=this._createTextFromConfig(t);else if("tileSprite"===t.type)r=this._createTileSpriteFromConfig(t);else if("component"===t.type)r=new e(this.scene,t,this._textures),e._setupCommonParams(r,t);else if("zone"===t.type)r=this._createHitZoneFromConfig(t);else if("polygon"===t.type&&(r=this._createPolygonFromConfig(t),t.hasOwnProperty("masking"))){var l=r.createGeometryMask();o.default.each(t.masking,function(t){n._childrenById[t].setMask(l)},this),a=!1}null!==r&&(this._childrenById[i]=r,this.childComponentClips.push(r),a&&this.add(r),this._stateManager.addComponent(r,i,u))}},{key:"_createPolygonFromConfig",value:function(t){var n=this.scene.make.graphics();n.fillStyle(t.color,t.hasOwnProperty("alpha")?t.alpha:1),n.beginPath();for(var r=t.vertices,i=r.length,o=0;o<i;o+=2)n.lineTo(r[o],r[o+1]);return n.closePath(),n.fillPath(),e._setupCommonParams(n,t),t.hasOwnProperty("masking")||this.scene.add.existing(n),n}},{key:"_createTileSpriteFromConfig",value:function(t){var n=this.scene.add.tileSprite(0,0,t.width,t.height,this.imageFramesMap[t.image],t.image);return n.setOrigin(.5,.5),e._setupCommonParams(n,t),n}},{key:"_createImageFromConfig",value:function(t){var n=this.scene.add.image(0,0,this.imageFramesMap[t.image],t.image);return n.setOrigin(0),e._setupCommonParams(n,t),n}},{key:"_createTextFromConfig",value:function(t){var n=this.scene.add.text(0,0,t.text,t.textStyle);return"center"===t.textStyle.align?n.setOrigin(.5,0):"right"===t.textStyle.align?n.setOrigin(1,0):n.setOrigin(0),e._setupCommonParams(n,t),n}},{key:"_createHitZoneFromConfig",value:function(t){return this.scene.add.zone(t.x||0,t.y||0,t.width,t.height).setOrigin(0)}}],[{key:"_setupCommonParams",value:function(t,e){var n=e.x||0,r=e.y||0,i=e.scaleX||1,o=e.scaleY||1,u=e.angle||0,a=e.hasOwnProperty("alpha")?e.alpha:1;t.x=n,t.y=r,t.scaleX=i,t.scaleY=o,t.angle=u,t.alpha=a}}]),e}();e.default=l;var s=function t(e){a(this,t),this.config=e,this.componentIds=[],this.componentIds=Object.keys(e)},c=function(){function t(e,n){a(this,t),this._clip=e,this._dynamicChildrenIds=[],this._states={},this.stateIds=[],this._components={},this._currentState=null,this._currentStateId=null,this._componentKeys={},this._residentComponentsByKey={};var r=[];for(var i in n.states){this.stateIds.push(i);var u=new s(n.states[i]);this._states[i]=u,r.push(u.componentIds)}this._dynamicChildrenIds=o.default.uniq(o.default.flatten(r))}return r(t,[{key:"getStateConfigById",value:function(t){return this._states.hasOwnProperty(t)?this._states[t].config:null}},{key:"addComponent",value:function(t,e,n){-1===o.default.indexOf(this._dynamicChildrenIds,e)?void 0!==n&&(this._residentComponentsByKey[n]=t):(this._components[e]=t,void 0!==n&&(this._componentKeys[e]=n))}},{key:"setState",value:function(t,e){(this._currentStateId!==t||e)&&this._states.hasOwnProperty(t)&&(this._currentStateId=t,this._currentState=this._states[t],this.setupState())}},{key:"getActiveComponentByKey",value:function(t){if(this._residentComponentsByKey.hasOwnProperty(t))return this._residentComponentsByKey[t];if(null===this._currentState)return null;for(var e in this._currentState.componentIds){var n=this._currentState.componentIds[e];if(this._componentKeys[n]===t)return this._components[n]}return null}},{key:"setupState",value:function(){var t=this,e=this._currentState.componentIds,n=o.default.difference(this._dynamicChildrenIds,e);o.default.each(n,function(e){t._components[e].visible=!1},this),o.default.each(e,function(e){var n=t._components[e];n.visible=!0,l._setupCommonParams(n,t._currentState.config[e])},this)}}]),t}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var u=i.get;return void 0!==u?u.call(r):void 0},u=n(4),a=(r=u)&&r.__esModule?r:{default:r};var l=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,r));return i._select=!1,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),i(e,[{key:"getStateId",value:function(){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"getStateId",this).call(this)+(this._select?"_select":"")}},{key:"_onClick",value:function(){this._select=!this._select,this.doState(),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_onClick",this).call(this)}},{key:"select",get:function(){return this._select},set:function(t){this._select!==t&&(this._select=t,this.doState())}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var u=i.get;return void 0!==u?u.call(r):void 0},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=a(n(4)),u=a(n(1));function a(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,r));return i._dragBounds={minX:0,maxX:0,minY:0,maxY:0},i._startDragX=0,i._startDragY=0,i._dragZone=null,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),i(e,null,[{key:"EVENT_DRAG",get:function(){return"event_drag"}}]),i(e,[{key:"setDragBounds",value:function(t,e,n,r){this._dragBounds.minX=t,this._dragBounds.maxX=n,this._dragBounds.minY=e,this._dragBounds.maxY=r}},{key:"_onDragStart",value:function(t,e){this._dragZone&&this._dragZone===e&&this._clip&&(this._startDragX=this._clip.x-e.input.dragStartX,this._startDragY=this._clip.y-e.input.dragStartY)}},{key:"_onDrag",value:function(t,e,n,r){if(u.default.check(this.lockId)&&this._dragZone&&this._dragZone===e&&!this.clip){var i=this._startDragX+n,o=this._startDragY+r;i<this._dragBounds.minX?i=this._dragBounds.minX:i>this._dragBounds.maxX&&(i=this._dragBounds.maxX),o<this._dragBounds.minY?o=this._dragBounds.minY:o>this._dragBounds.maxY&&(o=this._dragBounds.maxY),this.emit("event_drag",i,o)}}},{key:"_setupInteractive",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_setupInteractive",this).call(this,t),this._dragZone=t,t.scene.input.setDraggable(t,!0),t.scene.input.on("dragstart",this._onDragStart,this),t.scene.input.on("drag",this._onDrag,this)}},{key:"_removeInteractive",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_removeInteractive",this).call(this,t),this._dragZone=null,t.scene.input.setDraggable(t,!1),t.scene.input.removeListener("dragstart",this._onDragStart),t.scene.input.removeListener("drag",this._onDrag)}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var u=i.get;return void 0!==u?u.call(r):void 0},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=s(n(0)),u=s(n(4)),a=s(n(8)),l=s(n(1));function s(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i._vertical=r||!1,i._value=0,i._minValue=0,i._maxValue=1,i._valueStep=0,i._buttonStep=.1,i.btnPrev=new u.default(i,"btn_up"),i.btnPrev.on(u.default.EVENT_CLICK,i.onPrevClick,i),i.btnNext=new u.default(i,"btn_down"),i.btnNext.on(u.default.EVENT_CLICK,i.onNextClick,i),i.thumb=new a.default(i,"thumb"),i.thumb.on(a.default.EVENT_DRAG,i._onThumbDrag,i),i._trackStart=0,i._trackLength=100,i._thumbClip=null,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),i(e,null,[{key:"EVENT_CHANGE",get:function(){return"event_change"}}]),i(e,[{key:"setValueBounds",value:function(t,e,n){this._minValue=t,this._maxValue=e,void 0!==n?(this._valueStep=n,this._buttonStep<n&&(this._buttonStep=n)):this._valueStep=0}},{key:"setButtonStep",value:function(t){this._buttonStep=t}},{key:"onClipAppend",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipAppend",this).call(this,t),this._updateClips()}},{key:"_updateClips",value:function(){if(this._clip){this._thumbClip=this.thumb._clip;var t=this._clip.getChildClip("DIMENSIONS");t&&(this._trackStart=this._vertical?t.y:t.x,this._trackLength=this._vertical?t.height:t.width,this._thumbClip&&this.thumb.setDragBounds(this._vertical?this._thumbClip.x:t.x,this._vertical?t.y:this._thumbClip.y,this._vertical?this._thumbClip.x:t.x+t.width,this._vertical?t.y+t.height:this._thumbClip.y));var e=this._clip.getChildClip("HIT_ZONE");e&&e.on("pointerdown",this._onZoneDown,this),this._updateThumbFromValue()}}},{key:"onClipProcess",value:function(){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipProcess",this).call(this),this.thumb&&this._updateClips()}},{key:"onPrevClick",value:function(){l.default.check(this.lockId)&&(this.value-=this._buttonStep)}},{key:"onNextClick",value:function(){l.default.check(this.lockId)&&(this.value+=this._buttonStep)}},{key:"_updateThumbFromValue",value:function(){if(this._thumbClip){var t=Math.round(this._trackStart+this._trackLength*this._value);this._vertical?this._thumbClip.y=t:this._thumbClip.x=t,this.emit("event_change",this.value)}}},{key:"_onThumbDrag",value:function(t,e){if(0!==this._trackLength&&l.default.check(this.lockId)){var n=((this._vertical?e:t)-this._trackStart)/this._trackLength*(this._maxValue-this._minValue);0!==this._valueStep&&(n=Math.round(n/this._valueStep)*this._valueStep),this.value=n+this._minValue}}},{key:"_onZoneDown",value:function(){}},{key:"value",get:function(){var t=this._value*(this._maxValue-this._minValue);return 0===this._valueStep?t+this._minValue:(t=Math.round(t/this._valueStep)*this._valueStep)+this._minValue},set:function(t){var e=(t-this._minValue)/(this._maxValue-this._minValue);e<0&&(e=0),e>1&&(e=1),e!==this._value&&(this._value=e,this._updateThumbFromValue())}}]),e}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=u(n(0)),o=u(n(3));function u(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i._rendererClass=r,i._items=[],i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),r(e,null,[{key:"EVENT_ITEM_CHANGE",get:function(){return"event_change"}}]),r(e,[{key:"clean",value:function(){for(;0!==this._items.length;){this._items.pop().destroy(!0)}}},{key:"_updateData",value:function(){var t=this;o.default.each(this._data,function(e,n){t._getRenderer(n).data=e},this),this.doState()}},{key:"_getRenderer",value:function(t){if(this._items.length-1<t){var n=new this._rendererClass(this,"item_"+t);this._items[t]=n,n.on(e.EVENT_ITEM_CHANGE,this.onItemChange,this)}return this._items[t]}},{key:"getStateId",value:function(){return"count_"+(this._data?this._data.length:"0")}},{key:"destroy",value:function(){this.clean(),function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var u=i.get;return void 0!==u?u.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"onItemChange",value:function(t){this.emit(e.EVENT_ITEM_CHANGE,t)}},{key:"data",get:function(){return this._data},set:function(t){this._data=t,this._updateData()}}]),e}();e.default=a},function(t,e,n){t.exports=n(12)},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var r=a(n(6)),i=a(n(14)),o=a(n(20)),u=a(n(1));function a(t){return t&&t.__esModule?t:{default:t}}var l={ComponentClip:r.default,UIComponents:i.default,Plugin:o.default,UIManager:u.default};e.default=l,t.PhaserComps=l}).call(this,n(5))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=_(n(4)),i=_(n(15)),o=_(n(0)),u=_(n(7)),a=_(n(8)),l=_(n(9)),s=_(n(16)),c=_(n(17)),f=_(n(18)),p=_(n(10)),h=_(n(19));function _(t){return t&&t.__esModule?t:{default:t}}var v={UIComponentPrototype:o.default,UIButton:r.default,UIButtonSelect:u.default,UIButtonRadio:i.default,UIButtonDraggable:a.default,UIScrollBar:l.default,UIScrollPanel:s.default,UIProgressBar:c.default,UIContainer:f.default,UIList:p.default,UIListBaseItem:h.default};e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(7),u=(r=o)&&r.__esModule?r:{default:r};var a=function(t){function e(t,n,r,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var u=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,r));return u._sibling=u,u._value=i,void 0!==o&&u.appendToRadio(o),u}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,u.default),i(e,null,[{key:"EVENT_SELECT",get:function(){return"event_select"}}]),i(e,[{key:"appendToRadio",value:function(t){this._sibling!==this&&this.removeFromSibling(),this._sibling=t._sibling,t._sibling=this}},{key:"removeFromSibling",value:function(){}},{key:"_onClick",value:function(){this.select=!0}},{key:"_broadcastSelect",value:function(){this.emit("event_select",this.value);for(var t=this._sibling;t!==this;)t.emit("event_select",this._value),t=t._sibling}},{key:"select",get:function(){return function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var u=i.get;return void 0!==u?u.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"select",this)},set:function(t){if(this._select!==t&&(function t(e,n,r,i){var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var u=Object.getPrototypeOf(e);null!==u&&t(u,n,r,i)}else if("value"in o&&o.writable)o.value=r;else{var a=o.set;void 0!==a&&a.call(i,r)}return r}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"select",t,this),t)){for(var n=this._sibling;n!==this;)n.select=!1,n=n._sibling;this._broadcastSelect()}}},{key:"value",get:function(){return this._value},set:function(t){this._value=t}},{key:"valueSelected",get:function(){if(this.select)return this.value;for(var t=this._sibling;t!==this;){if(t.select)return t.value;t=t._sibling}return null},set:function(t){if(this.value!==t){for(var e=this._sibling;e!==this;)if(e.value===t)return void(e.select=!0)}else this.select=!0}}]),e}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=u(n(0)),o=u(n(9));function u(t){return t&&t.__esModule?t:{default:t}}var a=function(){function t(e,n,r,u,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._container=e,e.on(i.default.EVENT_STATE,this._onContainerUpdate,this),this._panelKey=n,this._dimensionsKey=u,this._scrollBar=new o.default(e,r,a),this._scrollBar.on(o.default.EVENT_CHANGE,this._onScrollBar,this),this._vertical=a||!1}return r(t,[{key:"_onContainerUpdate",value:function(){var t=this._container._clip;if(t){this._panel=t.getChildClip(this._panelKey);var e=t.getChildClip(this._dimensionsKey);this._panel&&e&&(this._scrollBounds={x:e.x,y:e.y,len:this._vertical?this._panel.height-e.height:this._panel.width-e.width},this._onScrollBar(this._onScrollBar.value))}}},{key:"_onScrollBar",value:function(t){this._panel&&this._scrollBounds&&(this._vertical?this._panel.y=this._scrollBounds.y-this._scrollBounds.len*t:this._panel.x=this._scrollBounds.x-this._scrollBounds.len*t)}}]),t}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=u(n(0)),o=u(n(3));function u(t){return t&&t.__esModule?t:{default:t}}var a=/progress_(\d+)$/,l=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r._value=0,r._steps=[],r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),r(e,[{key:"onClipAppend",value:function(t){(function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var u=i.get;return void 0!==u?u.call(r):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipAppend",this).call(this,t),this._makeSteps(t),this._applyValue()}},{key:"_applyValue",value:function(){if(this._clip){var t=void 0,e=void 0,n=void 0,r=void 0,i=void 0,o=void 0,u=this._steps.length;for(t=0;t<u-1;t++){var a=this._steps[t],l=this._steps[t+1];if(a.stepValue===this._value){i=a.config;break}if(l.stepValue===this._value){i=l.config;break}if(this._value>a.stepValue&&this._value<l.stepValue){e=a.config,n=l.config,r=(this._value-a.stepValue)/(l.stepValue-a.stepValue);break}}if(!i)for(o in i={},e)if(n.hasOwnProperty(o)){var s=e[o],c=n[o];i[o]={x:s.x+(c.x-s.x)*r,y:s.y+(c.y-s.y)*r,scaleX:s.scaleX+(c.scaleX-s.scaleX)*r,scaleY:s.scaleY+(c.scaleY-s.scaleY)*r,angle:s.angle+(c.angle-s.angle)*r,alpha:s.alpha+(c.alpha-s.alpha)*r}}for(o in i)this._clip.applyChildParams(o,i[o])}}},{key:"_makeSteps",value:function(t){var n=this,r=t.getStateIds();this._steps=[],o.default.each(r,function(r){if(a.test(r)){var i={},o={stepValue:parseInt(a.exec(r)[1])/100,config:i},u=t.getStateConfig(r);for(var l in u)i[l]=e._makeFullConfig(u[l]);n._steps.push(o)}},this),o.default.sortBy(this._steps,"stepValue")}},{key:"value",get:function(){return this._value},set:function(t){this._value=t,this._applyValue()}}],[{key:"_makeFullConfig",value:function(t){return{x:t.hasOwnProperty("x")?t.x:0,y:t.hasOwnProperty("y")?t.y:0,scaleX:t.hasOwnProperty("scaleX")?t.scaleX:1,scaleY:t.hasOwnProperty("scaleY")?t.scaleY:1,angle:t.hasOwnProperty("angle")?t.angle:0,alpha:t.hasOwnProperty("alpha")?t.alpha:1}}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var u=i.get;return void 0!==u?u.call(r):void 0},o=a(n(0));n(2);var u=a(n(3));function a(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r._children=[],r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),r(e,[{key:"addChild",value:function(t){return-1!==this._children.indexOf(t)?t:(this._children.push(t),this._clip?(t._clip.visible=!0,this._addUIComponentToContainerClip(t)):t._clip.visible=!1,t)}},{key:"removeChild",value:function(t){var e=this._children.indexOf(t);return-1===e?t:(this._children.splice(e,1),this._clip&&this._removeUIComponentFromContainerClip(t),t)}},{key:"_addUIComponentToContainerClip",value:function(t){this._clip.add(t._clip),t._clip.visible=!0}},{key:"_removeUIComponentFromContainerClip",value:function(t,e){this._clip.remove(t._clip,e),t._clip.visible=!1}},{key:"onClipAppend",value:function(t){var n=this;i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipAppend",this).call(this,t),t&&u.default.each(this._children,function(t){n._addUIComponentToContainerClip(t)},this)}},{key:"onClipRemove",value:function(t){var n=this;i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipRemove",this).call(this,t),t&&u.default.each(this._children,function(t){n._removeUIComponentFromContainerClip(t)},this)}},{key:"destroy",value:function(){var t=this;u.default.each(this._children,function(e){t._clip&&t._removeUIComponentFromContainerClip(e),e.destroy()},this),this._children.length=0,i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=u(n(0)),o=u(n(10));function u(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r._data=null,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),r(e,[{key:"notifyChange",value:function(){this.emit(o.default.EVENT_ITEM_CHANGE,this)}},{key:"_commitData",value:function(){}},{key:"data",get:function(){return this._data},set:function(t){this._data=t,this._commitData()}}]),e}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();n(2);var i,o=n(6),u=(i=o)&&i.__esModule?i:{default:i};var a=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return t.registerGameObject("ui_component",n.addComponent,n.makeComponent),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Phaser.Plugins.BasePlugin),r(e,[{key:"addComponent",value:function(t,e){var n=new u.default(this.scene,t,e);return this.scene.add.existing(n),n}},{key:"makeComponent",value:function(t,e){return new u.default(this.scene,t,e)}}]),e}();e.default=a;var l={key:"UIComponents",plugin:a,start:!0};a.DefaultCfg=l}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("phaser")):"function"==typeof define&&define.amd?define(["phaser"],e):"object"==typeof exports?exports.PhaserComps=e(require("phaser")):t.PhaserComps=e(t.Phaser)}(window,function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=11)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();n(2);var i,o=n(1);(i=o)&&i.__esModule;var a="event_state",u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.lockId=null,r._parent=t,r._key=n,r._clip=null,r._texts={},n&&t&&t.on(a,r._onEventState,r),r._clipUpdate(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Phaser.Events.EventEmitter),r(e,null,[{key:"EVENT_STATE",get:function(){return a}}]),r(e,[{key:"appendClip",value:function(t){this._clip!==t&&(null!==this._clip&&this.removeClip(),this._clip=t,this._clip&&this.onClipAppend(this._clip),this._clipProcess())}},{key:"onClipAppend",value:function(t){}},{key:"removeClip",value:function(){this.onClipRemove(this._clip),this._clip=null}},{key:"onClipRemove",value:function(t){}},{key:"doState",value:function(){var t=this.getStateId();this._setupState(t)}},{key:"getText",value:function(t){return this._texts[t]}},{key:"setText",value:function(t,e){if(this._texts[t]!==e&&(this._texts[t]=e,this._clip)){var n=this._clip.getChildText(t);n&&(n.text=e)}}},{key:"getStateId",value:function(){return"default"}},{key:"destroy",value:function(t){this._parent&&this._parent.removeListener(a,this._onEventState),this._clip&&this._clip.destroy(t)}},{key:"_clipUpdate",value:function(){if(this._key)if(this._parent._clip){var t=this._parent._clip.getChildClip(this._key);this.appendClip(t)}else this.appendClip(null);else;}},{key:"_clipProcess",value:function(){this._clip&&(this.doState(),this.onClipProcess())}},{key:"onClipProcess",value:function(){}},{key:"_setupState",value:function(t){if(this._clip)for(var e in this._clip.setState(t),this._texts){var n=this._clip.getChildText(e);n&&(n.text=this._texts[e])}this.emit(a)}},{key:"_onEventState",value:function(){this._clipUpdate()}}]),e}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var i=!1,o=[],a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return r(t,null,[{key:"lock",value:function(t){this.unlock(),"string"==typeof t?o.push(t):t.forEach(function(t){return o.push(t)}),i=!0}},{key:"unlock",value:function(){o.length=0,i=!1}},{key:"check",value:function(t){return!i||-1!==o.indexOf(t)}}]),t}();e.default=a},function(e,n){e.exports=t},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(0)),o=a(n(1));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i._enable=!0,i._isPressed=!1,i._isOver=!1,r&&(i.label=r),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),r(e,null,[{key:"EVENT_CLICK",get:function(){return"event_click"}}]),r(e,[{key:"onClipAppend",value:function(t){this._updateInteractive()}},{key:"onClipRemove",value:function(t){var e=t.getChildClip("HIT_ZONE");e&&this._removeInteractive(e)}},{key:"_setupInteractive",value:function(t){t.setInteractive({useHandCursor:!0}),t.on("pointerdown",this._onPointerDown,this),t.on("pointerup",this._onPointerUp,this),t.on("pointerover",this._onPointerOver,this),t.on("pointerout",this._onPointerOut,this)}},{key:"_removeInteractive",value:function(t){t.disableInteractive(),t.removeListener(Phaser.Input.Events.GAMEOBJECT_POINTER_DOWN,this._onPointerDown,this),t.removeListener(Phaser.Input.Events.GAMEOBJECT_POINTER_UP,this._onPointerUp,this),t.removeListener(Phaser.Input.Events.GAMEOBJECT_POINTER_OVER,this._onPointerOver,this),t.removeListener(Phaser.Input.Events.GAMEOBJECT_POINTER_OUT,this._onPointerOut,this)}},{key:"_updateInteractive",value:function(){if(this._clip){var t=this._clip.getChildClip("HIT_ZONE");t&&(this.enable?this._setupInteractive(t):this._removeInteractive(t))}}},{key:"getStateId",value:function(){return this.enable?this._isPressed?this.STATE_DOWN:this._isOver?this.STATE_OVER:this.STATE_UP:this.STATE_DISABLE}},{key:"_onClick",value:function(){this.emit("event_click")}},{key:"_onPointerOut",value:function(){this._isOver=!1,this._isPressed=!1,this.doState()}},{key:"_onPointerOver",value:function(){this._isOver=!0,this.doState()}},{key:"_onPointerDown",value:function(t,e,n,r){this._isPressed=!0,this.doState(),r.stopPropagation()}},{key:"_onPointerUp",value:function(t,e,n,r){var i=this._isPressed&&this._isOver;this._isPressed=!1,this.doState(),i&&(r.stopPropagation(),o.default.check(this.lockId)&&this._onClick())}},{key:"destroy",value:function(t){if(this._clip){var n=this._clip.getChildClip("HIT_ZONE");n&&this._removeInteractive(n)}(function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this,t)}},{key:"label",get:function(){return this.getText("label")},set:function(t){this.setText("label",t)}},{key:"enable",get:function(){return this._enable},set:function(t){this._enable!==t&&(this._enable=t,this._updateInteractive(),this.doState())}},{key:"STATE_UP",get:function(){return"up"}},{key:"STATE_DOWN",get:function(){return"down"}},{key:"STATE_OVER",get:function(){return"over"}},{key:"STATE_DISABLE",get:function(){return"disable"}}]),e}();e.default=u},function(t,e,n){(function(t,n){var r;!function(){var i="object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t||this||{},o=i._,a=Array.prototype,u=Object.prototype,l="undefined"!=typeof Symbol?Symbol.prototype:null,s=a.push,c=a.slice,f=u.toString,p=u.hasOwnProperty,h=Array.isArray,v=Object.keys,_=Object.create,y=function(){},d=function(t){return t instanceof d?t:this instanceof d?void(this._wrapped=t):new d(t)};e.nodeType?i._=d:(!n.nodeType&&n.exports&&(e=n.exports=d),e._=d),d.VERSION="1.9.1";var g,b=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},m=function(t,e,n){return d.iteratee!==g?d.iteratee(t,e):null==t?d.identity:d.isFunction(t)?b(t,e,n):d.isObject(t)&&!d.isArray(t)?d.matcher(t):d.property(t)};d.iteratee=g=function(t,e){return m(t,e,1/0)};var O=function(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+e];switch(e){case 0:return t.call(this,r);case 1:return t.call(this,arguments[0],r);case 2:return t.call(this,arguments[0],arguments[1],r)}var o=Array(e+1);for(i=0;i<e;i++)o[i]=arguments[i];return o[e]=r,t.apply(this,o)}},k=function(t){if(!d.isObject(t))return{};if(_)return _(t);y.prototype=t;var e=new y;return y.prototype=null,e},w=function(t){return function(e){return null==e?void 0:e[t]}},P=function(t,e){return null!=t&&p.call(t,e)},C=function(t,e){for(var n=e.length,r=0;r<n;r++){if(null==t)return;t=t[e[r]]}return n?t:void 0},j=Math.pow(2,53)-1,S=w("length"),x=function(t){var e=S(t);return"number"==typeof e&&e>=0&&e<=j};d.each=d.forEach=function(t,e,n){var r,i;if(e=b(e,n),x(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=d.keys(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t},d.map=d.collect=function(t,e,n){e=m(e,n);for(var r=!x(t)&&d.keys(t),i=(r||t).length,o=Array(i),a=0;a<i;a++){var u=r?r[a]:a;o[a]=e(t[u],u,t)}return o};var E=function(t){var e=function(e,n,r,i){var o=!x(e)&&d.keys(e),a=(o||e).length,u=t>0?0:a-1;for(i||(r=e[o?o[u]:u],u+=t);u>=0&&u<a;u+=t){var l=o?o[u]:u;r=n(r,e[l],l,e)}return r};return function(t,n,r,i){var o=arguments.length>=3;return e(t,b(n,i,4),r,o)}};d.reduce=d.foldl=d.inject=E(1),d.reduceRight=d.foldr=E(-1),d.find=d.detect=function(t,e,n){var r=(x(t)?d.findIndex:d.findKey)(t,e,n);if(void 0!==r&&-1!==r)return t[r]},d.filter=d.select=function(t,e,n){var r=[];return e=m(e,n),d.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},d.reject=function(t,e,n){return d.filter(t,d.negate(m(e)),n)},d.every=d.all=function(t,e,n){e=m(e,n);for(var r=!x(t)&&d.keys(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(!e(t[a],a,t))return!1}return!0},d.some=d.any=function(t,e,n){e=m(e,n);for(var r=!x(t)&&d.keys(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(e(t[a],a,t))return!0}return!1},d.contains=d.includes=d.include=function(t,e,n,r){return x(t)||(t=d.values(t)),("number"!=typeof n||r)&&(n=0),d.indexOf(t,e,n)>=0},d.invoke=O(function(t,e,n){var r,i;return d.isFunction(e)?i=e:d.isArray(e)&&(r=e.slice(0,-1),e=e[e.length-1]),d.map(t,function(t){var o=i;if(!o){if(r&&r.length&&(t=C(t,r)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)})}),d.pluck=function(t,e){return d.map(t,d.property(e))},d.where=function(t,e){return d.filter(t,d.matcher(e))},d.findWhere=function(t,e){return d.find(t,d.matcher(e))},d.max=function(t,e,n){var r,i,o=-1/0,a=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var u=0,l=(t=x(t)?t:d.values(t)).length;u<l;u++)null!=(r=t[u])&&r>o&&(o=r);else e=m(e,n),d.each(t,function(t,n,r){((i=e(t,n,r))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)});return o},d.min=function(t,e,n){var r,i,o=1/0,a=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var u=0,l=(t=x(t)?t:d.values(t)).length;u<l;u++)null!=(r=t[u])&&r<o&&(o=r);else e=m(e,n),d.each(t,function(t,n,r){((i=e(t,n,r))<a||i===1/0&&o===1/0)&&(o=t,a=i)});return o},d.shuffle=function(t){return d.sample(t,1/0)},d.sample=function(t,e,n){if(null==e||n)return x(t)||(t=d.values(t)),t[d.random(t.length-1)];var r=x(t)?d.clone(t):d.values(t),i=S(r);e=Math.max(Math.min(e,i),0);for(var o=i-1,a=0;a<e;a++){var u=d.random(a,o),l=r[a];r[a]=r[u],r[u]=l}return r.slice(0,e)},d.sortBy=function(t,e,n){var r=0;return e=m(e,n),d.pluck(d.map(t,function(t,n,i){return{value:t,index:r++,criteria:e(t,n,i)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index}),"value")};var I=function(t,e){return function(n,r,i){var o=e?[[],[]]:{};return r=m(r,i),d.each(n,function(e,i){var a=r(e,i,n);t(o,e,a)}),o}};d.groupBy=I(function(t,e,n){P(t,n)?t[n].push(e):t[n]=[e]}),d.indexBy=I(function(t,e,n){t[n]=e}),d.countBy=I(function(t,e,n){P(t,n)?t[n]++:t[n]=1});var T=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;d.toArray=function(t){return t?d.isArray(t)?c.call(t):d.isString(t)?t.match(T):x(t)?d.map(t,d.identity):d.values(t):[]},d.size=function(t){return null==t?0:x(t)?t.length:d.keys(t).length},d.partition=I(function(t,e,n){t[n?0:1].push(e)},!0),d.first=d.head=d.take=function(t,e,n){return null==t||t.length<1?null==e?void 0:[]:null==e||n?t[0]:d.initial(t,t.length-e)},d.initial=function(t,e,n){return c.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},d.last=function(t,e,n){return null==t||t.length<1?null==e?void 0:[]:null==e||n?t[t.length-1]:d.rest(t,Math.max(0,t.length-e))},d.rest=d.tail=d.drop=function(t,e,n){return c.call(t,null==e||n?1:e)},d.compact=function(t){return d.filter(t,Boolean)};var M=function(t,e,n,r){for(var i=(r=r||[]).length,o=0,a=S(t);o<a;o++){var u=t[o];if(x(u)&&(d.isArray(u)||d.isArguments(u)))if(e)for(var l=0,s=u.length;l<s;)r[i++]=u[l++];else M(u,e,n,r),i=r.length;else n||(r[i++]=u)}return r};d.flatten=function(t,e){return M(t,e,!1)},d.without=O(function(t,e){return d.difference(t,e)}),d.uniq=d.unique=function(t,e,n,r){d.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=m(n,r));for(var i=[],o=[],a=0,u=S(t);a<u;a++){var l=t[a],s=n?n(l,a,t):l;e&&!n?(a&&o===s||i.push(l),o=s):n?d.contains(o,s)||(o.push(s),i.push(l)):d.contains(i,l)||i.push(l)}return i},d.union=O(function(t){return d.uniq(M(t,!0,!0))}),d.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=S(t);r<i;r++){var o=t[r];if(!d.contains(e,o)){var a;for(a=1;a<n&&d.contains(arguments[a],o);a++);a===n&&e.push(o)}}return e},d.difference=O(function(t,e){return e=M(e,!0,!0),d.filter(t,function(t){return!d.contains(e,t)})}),d.unzip=function(t){for(var e=t&&d.max(t,S).length||0,n=Array(e),r=0;r<e;r++)n[r]=d.pluck(t,r);return n},d.zip=O(d.unzip),d.object=function(t,e){for(var n={},r=0,i=S(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n};var A=function(t){return function(e,n,r){n=m(n,r);for(var i=S(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}};d.findIndex=A(1),d.findLastIndex=A(-1),d.sortedIndex=function(t,e,n,r){for(var i=(n=m(n,r,1))(e),o=0,a=S(t);o<a;){var u=Math.floor((o+a)/2);n(t[u])<i?o=u+1:a=u}return o};var B=function(t,e,n){return function(r,i,o){var a=0,u=S(r);if("number"==typeof o)t>0?a=o>=0?o:Math.max(o+u,a):u=o>=0?Math.min(o+1,u):o+u+1;else if(n&&o&&u)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(c.call(r,a,u),d.isNaN))>=0?o+a:-1;for(o=t>0?a:u-1;o>=0&&o<u;o+=t)if(r[o]===i)return o;return-1}};d.indexOf=B(1,d.findIndex,d.sortedIndex),d.lastIndexOf=B(-1,d.findLastIndex),d.range=function(t,e,n){null==e&&(e=t||0,t=0),n||(n=e<t?-1:1);for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i},d.chunk=function(t,e){if(null==e||e<1)return[];for(var n=[],r=0,i=t.length;r<i;)n.push(c.call(t,r,r+=e));return n};var F=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=k(t.prototype),a=t.apply(o,i);return d.isObject(a)?a:o};d.bind=O(function(t,e,n){if(!d.isFunction(t))throw new TypeError("Bind must be called on a function");var r=O(function(i){return F(t,r,e,this,n.concat(i))});return r}),d.partial=O(function(t,e){var n=d.partial.placeholder,r=function(){for(var i=0,o=e.length,a=Array(o),u=0;u<o;u++)a[u]=e[u]===n?arguments[i++]:e[u];for(;i<arguments.length;)a.push(arguments[i++]);return F(t,r,this,this,a)};return r}),d.partial.placeholder=d,d.bindAll=O(function(t,e){var n=(e=M(e,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=e[n];t[r]=d.bind(t[r],t)}}),d.memoize=function(t,e){var n=function(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return P(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},d.delay=O(function(t,e,n){return setTimeout(function(){return t.apply(null,n)},e)}),d.defer=d.partial(d.delay,d,1),d.throttle=function(t,e,n){var r,i,o,a,u=0;n||(n={});var l=function(){u=!1===n.leading?0:d.now(),r=null,a=t.apply(i,o),r||(i=o=null)},s=function(){var s=d.now();u||!1!==n.leading||(u=s);var c=e-(s-u);return i=this,o=arguments,c<=0||c>e?(r&&(clearTimeout(r),r=null),u=s,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(l,c)),a};return s.cancel=function(){clearTimeout(r),u=0,r=i=o=null},s},d.debounce=function(t,e,n){var r,i,o=function(e,n){r=null,n&&(i=t.apply(e,n))},a=O(function(a){if(r&&clearTimeout(r),n){var u=!r;r=setTimeout(o,e),u&&(i=t.apply(this,a))}else r=d.delay(o,e,this,a);return i});return a.cancel=function(){clearTimeout(r),r=null},a},d.wrap=function(t,e){return d.partial(e,t)},d.negate=function(t){return function(){return!t.apply(this,arguments)}},d.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},d.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},d.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},d.once=d.partial(d.before,2),d.restArguments=O;var N=!{toString:null}.propertyIsEnumerable("toString"),D=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],V=function(t,e){var n=D.length,r=t.constructor,i=d.isFunction(r)&&r.prototype||u,o="constructor";for(P(t,o)&&!d.contains(e,o)&&e.push(o);n--;)(o=D[n])in t&&t[o]!==i[o]&&!d.contains(e,o)&&e.push(o)};d.keys=function(t){if(!d.isObject(t))return[];if(v)return v(t);var e=[];for(var n in t)P(t,n)&&e.push(n);return N&&V(t,e),e},d.allKeys=function(t){if(!d.isObject(t))return[];var e=[];for(var n in t)e.push(n);return N&&V(t,e),e},d.values=function(t){for(var e=d.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r},d.mapObject=function(t,e,n){e=m(e,n);for(var r=d.keys(t),i=r.length,o={},a=0;a<i;a++){var u=r[a];o[u]=e(t[u],u,t)}return o},d.pairs=function(t){for(var e=d.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},d.invert=function(t){for(var e={},n=d.keys(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e},d.functions=d.methods=function(t){var e=[];for(var n in t)d.isFunction(t[n])&&e.push(n);return e.sort()};var R=function(t,e){return function(n){var r=arguments.length;if(e&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=t(o),u=a.length,l=0;l<u;l++){var s=a[l];e&&void 0!==n[s]||(n[s]=o[s])}return n}};d.extend=R(d.allKeys),d.extendOwn=d.assign=R(d.keys),d.findKey=function(t,e,n){e=m(e,n);for(var r,i=d.keys(t),o=0,a=i.length;o<a;o++)if(e(t[r=i[o]],r,t))return r};var U,K,L=function(t,e,n){return e in n};d.pick=O(function(t,e){var n={},r=e[0];if(null==t)return n;d.isFunction(r)?(e.length>1&&(r=b(r,e[1])),e=d.allKeys(t)):(r=L,e=M(e,!1,!1),t=Object(t));for(var i=0,o=e.length;i<o;i++){var a=e[i],u=t[a];r(u,a,t)&&(n[a]=u)}return n}),d.omit=O(function(t,e){var n,r=e[0];return d.isFunction(r)?(r=d.negate(r),e.length>1&&(n=e[1])):(e=d.map(M(e,!1,!1),String),r=function(t,n){return!d.contains(e,n)}),d.pick(t,r,n)}),d.defaults=R(d.allKeys,!0),d.create=function(t,e){var n=k(t);return e&&d.extendOwn(n,e),n},d.clone=function(t){return d.isObject(t)?d.isArray(t)?t.slice():d.extend({},t):t},d.tap=function(t,e){return e(t),t},d.isMatch=function(t,e){var n=d.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var a=n[o];if(e[a]!==i[a]||!(a in i))return!1}return!0},U=function(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var i=typeof t;return("function"===i||"object"===i||"object"==typeof e)&&K(t,e,n,r)},K=function(t,e,n,r){t instanceof d&&(t=t._wrapped),e instanceof d&&(e=e._wrapped);var i=f.call(t);if(i!==f.call(e))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return l.valueOf.call(t)===l.valueOf.call(e)}var o="[object Array]"===i;if(!o){if("object"!=typeof t||"object"!=typeof e)return!1;var a=t.constructor,u=e.constructor;if(a!==u&&!(d.isFunction(a)&&a instanceof a&&d.isFunction(u)&&u instanceof u)&&"constructor"in t&&"constructor"in e)return!1}r=r||[];for(var s=(n=n||[]).length;s--;)if(n[s]===t)return r[s]===e;if(n.push(t),r.push(e),o){if((s=t.length)!==e.length)return!1;for(;s--;)if(!U(t[s],e[s],n,r))return!1}else{var c,p=d.keys(t);if(s=p.length,d.keys(e).length!==s)return!1;for(;s--;)if(c=p[s],!P(e,c)||!U(t[c],e[c],n,r))return!1}return n.pop(),r.pop(),!0},d.isEqual=function(t,e){return U(t,e)},d.isEmpty=function(t){return null==t||(x(t)&&(d.isArray(t)||d.isString(t)||d.isArguments(t))?0===t.length:0===d.keys(t).length)},d.isElement=function(t){return!(!t||1!==t.nodeType)},d.isArray=h||function(t){return"[object Array]"===f.call(t)},d.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},d.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(t){d["is"+t]=function(e){return f.call(e)==="[object "+t+"]"}}),d.isArguments(arguments)||(d.isArguments=function(t){return P(t,"callee")});var X=i.document&&i.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof X&&(d.isFunction=function(t){return"function"==typeof t||!1}),d.isFinite=function(t){return!d.isSymbol(t)&&isFinite(t)&&!isNaN(parseFloat(t))},d.isNaN=function(t){return d.isNumber(t)&&isNaN(t)},d.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===f.call(t)},d.isNull=function(t){return null===t},d.isUndefined=function(t){return void 0===t},d.has=function(t,e){if(!d.isArray(e))return P(t,e);for(var n=e.length,r=0;r<n;r++){var i=e[r];if(null==t||!p.call(t,i))return!1;t=t[i]}return!!n},d.noConflict=function(){return i._=o,this},d.identity=function(t){return t},d.constant=function(t){return function(){return t}},d.noop=function(){},d.property=function(t){return d.isArray(t)?function(e){return C(e,t)}:w(t)},d.propertyOf=function(t){return null==t?function(){}:function(e){return d.isArray(e)?C(t,e):t[e]}},d.matcher=d.matches=function(t){return t=d.extendOwn({},t),function(e){return d.isMatch(e,t)}},d.times=function(t,e,n){var r=Array(Math.max(0,t));e=b(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},d.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},d.now=Date.now||function(){return(new Date).getTime()};var Y={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},G=d.invert(Y),Z=function(t){var e=function(e){return t[e]},n="(?:"+d.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};d.escape=Z(Y),d.unescape=Z(G),d.result=function(t,e,n){d.isArray(e)||(e=[e]);var r=e.length;if(!r)return d.isFunction(n)?n.call(t):n;for(var i=0;i<r;i++){var o=null==t?void 0:t[e[i]];void 0===o&&(o=n,i=r),t=d.isFunction(o)?o.call(t):o}return t};var H=0;d.uniqueId=function(t){var e=++H+"";return t?t+e:e},d.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,z={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},W=/\\|'|\r|\n|\u2028|\u2029/g,J=function(t){return"\\"+z[t]};d.template=function(t,e,n){!e&&n&&(e=n),e=d.defaults({},e,d.templateSettings);var r,i=RegExp([(e.escape||q).source,(e.interpolate||q).source,(e.evaluate||q).source].join("|")+"|$","g"),o=0,a="__p+='";t.replace(i,function(e,n,r,i,u){return a+=t.slice(o,u).replace(W,J),o=u+e.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(a+="';\n"+i+"\n__p+='"),e}),a+="';\n",e.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(e.variable||"obj","_",a)}catch(t){throw t.source=a,t}var u=function(t){return r.call(this,t,d)},l=e.variable||"obj";return u.source="function("+l+"){\n"+a+"}",u},d.chain=function(t){var e=d(t);return e._chain=!0,e};var $=function(t,e){return t._chain?d(e).chain():e};d.mixin=function(t){return d.each(d.functions(t),function(e){var n=d[e]=t[e];d.prototype[e]=function(){var t=[this._wrapped];return s.apply(t,arguments),$(this,n.apply(d,t))}}),d},d.mixin(d),d.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=a[t];d.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],$(this,n)}}),d.each(["concat","join","slice"],function(t){var e=a[t];d.prototype[t]=function(){return $(this,e.apply(this._wrapped,arguments))}}),d.prototype.value=function(){return this._wrapped},d.prototype.valueOf=d.prototype.toJSON=d.prototype.value,d.prototype.toString=function(){return String(this._wrapped)},void 0===(r=function(){return d}.apply(e,[]))||(n.exports=r)}()}).call(this,n(5),n(13)(t))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(2)),o=a(n(4));function a(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var l=function(t){function e(t,n,r){u(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,0,0));return i.childComponentClips=[],i._config=n,i._key=n.key,i._textures=r,i.imageFramesMap={},i._stateManager=new c(i,n),i._childrenById={},i._createImagesMap(r),i._parseConfig(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default.GameObjects.Container),r(e,[{key:"getStateConfig",value:function(t){return this._stateManager.getStateConfigById(t)}},{key:"getStateIds",value:function(){return this._stateManager.stateIds}},{key:"setState",value:function(t,e){this._stateManager.setState(t,e)}},{key:"applyChildParams",value:function(t,n){this._childrenById.hasOwnProperty(t)&&e._setupCommonParams(this._childrenById[t],n)}},{key:"getChildClip",value:function(t){return this._stateManager.getActiveComponentByKey(t)}},{key:"getChildText",value:function(t){return this._stateManager.getActiveComponentByKey(t)}},{key:"destroy",value:function(t){var n=!0,r=!1,i=void 0;try{for(var o,a=this.childComponentClips[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){o.value.destroy(t)}}catch(t){r=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}(function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this,t)}},{key:"_createImagesMap",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=t[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value,u=this.scene.textures.get(a);if(!u)return;var l=u.getFrameNames(),s=!0,c=!1,f=void 0;try{for(var p,h=l[Symbol.iterator]();!(s=(p=h.next()).done);s=!0){var v=p.value;this.imageFramesMap[v]=a}}catch(t){c=!0,f=t}finally{try{!s&&h.return&&h.return()}finally{if(c)throw f}}}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}}},{key:"_parseConfig",value:function(){if(this._config.hasOwnProperty("children")){var t=!0,e=!1,n=void 0;try{for(var r,i=this._config.children[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var o=r.value;this._createChildFromConfig(o)}}catch(t){e=!0,n=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}}}},{key:"_createChildFromConfig",value:function(t){var n=null,r=t.childId,i=t.key,o=!0;if("image"===t.type)n=this._createImageFromConfig(t);else if("text"===t.type)n=this._createTextFromConfig(t);else if("tileSprite"===t.type)n=this._createTileSpriteFromConfig(t);else if("component"===t.type)n=new e(this.scene,t,this._textures),e._setupCommonParams(n,t);else if("zone"===t.type)n=this._createHitZoneFromConfig(t);else if("polygon"===t.type&&(n=this._createPolygonFromConfig(t),t.hasOwnProperty("masking"))){var a=n.createGeometryMask(),u=!0,l=!1,s=void 0;try{for(var c,f=t.masking[Symbol.iterator]();!(u=(c=f.next()).done);u=!0){var p=c.value;this._childrenById[p].setMask(a)}}catch(t){l=!0,s=t}finally{try{!u&&f.return&&f.return()}finally{if(l)throw s}}o=!1}null!==n&&(this._childrenById[r]=n,this.childComponentClips.push(n),o&&this.add(n),this._stateManager.addComponent(n,r,i))}},{key:"_createPolygonFromConfig",value:function(t){var n=this.scene.make.graphics();n.fillStyle(t.color,t.hasOwnProperty("alpha")?t.alpha:1),n.beginPath();for(var r=t.vertices,i=r.length,o=0;o<i;o+=2)n.lineTo(r[o],r[o+1]);return n.closePath(),n.fillPath(),e._setupCommonParams(n,t),t.hasOwnProperty("masking")||this.scene.add.existing(n),n}},{key:"_createTileSpriteFromConfig",value:function(t){var n=this.scene.add.tileSprite(0,0,t.width,t.height,this.imageFramesMap[t.image],t.image);return n.setOrigin(.5,.5),e._setupCommonParams(n,t),n}},{key:"_createImageFromConfig",value:function(t){var n=this.scene.add.image(0,0,this.imageFramesMap[t.image],t.image);return n.setOrigin(0),e._setupCommonParams(n,t),n}},{key:"_createTextFromConfig",value:function(t){var n=this.scene.add.text(0,0,t.text,t.textStyle);return"center"===t.textStyle.align?n.setOrigin(.5,0):"right"===t.textStyle.align?n.setOrigin(1,0):n.setOrigin(0),e._setupCommonParams(n,t),n}},{key:"_createHitZoneFromConfig",value:function(t){return this.scene.add.zone(t.x||0,t.y||0,t.width,t.height).setOrigin(0)}}],[{key:"_setupCommonParams",value:function(t,e){var n=e.x||0,r=e.y||0,i=e.scaleX||1,o=e.scaleY||1,a=e.angle||0,u=e.hasOwnProperty("alpha")?e.alpha:1;t.x=n,t.y=r,t.scaleX=i,t.scaleY=o,t.angle=a,t.alpha=u}}]),e}();e.default=l;var s=function t(e){u(this,t),this.config=e,this.componentIds=[],this.componentIds=Object.keys(e)},c=function(){function t(e,n){u(this,t),this._clip=e,this._dynamicChildrenIds=[],this._states={},this.stateIds=[],this._components={},this._currentState=null,this._currentStateId=null,this._componentKeys={},this._residentComponentsByKey={};var r=[];for(var i in n.states){this.stateIds.push(i);var a=new s(n.states[i]);this._states[i]=a,r.push(a.componentIds)}this._dynamicChildrenIds=o.default.uniq(o.default.flatten(r))}return r(t,[{key:"getStateConfigById",value:function(t){return this._states.hasOwnProperty(t)?this._states[t].config:null}},{key:"addComponent",value:function(t,e,n){-1===o.default.indexOf(this._dynamicChildrenIds,e)?void 0!==n&&(this._residentComponentsByKey[n]=t):(this._components[e]=t,void 0!==n&&(this._componentKeys[e]=n))}},{key:"setState",value:function(t,e){(this._currentStateId!==t||e)&&this._states.hasOwnProperty(t)&&(this._currentStateId=t,this._currentState=this._states[t],this.setupState())}},{key:"getActiveComponentByKey",value:function(t){if(this._residentComponentsByKey.hasOwnProperty(t))return this._residentComponentsByKey[t];if(null===this._currentState)return null;for(var e in this._currentState.componentIds){var n=this._currentState.componentIds[e];if(this._componentKeys[n]===t)return this._components[n]}return null}},{key:"setupState",value:function(){var t=this._currentState.componentIds,e=o.default.difference(this._dynamicChildrenIds,t),n=void 0,r=!0,i=!1,a=void 0;try{for(var u,s=e[Symbol.iterator]();!(r=(u=s.next()).done);r=!0)n=u.value,this._components[n].visible=!1}catch(t){i=!0,a=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}var c=!0,f=!1,p=void 0;try{for(var h,v=t[Symbol.iterator]();!(c=(h=v.next()).done);c=!0){n=h.value;var _=this._components[n];_.visible=!0,l._setupCommonParams(_,this._currentState.config[n])}}catch(t){f=!0,p=t}finally{try{!c&&v.return&&v.return()}finally{if(f)throw p}}}}]),t}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(3),u=(r=a)&&r.__esModule?r:{default:r};var l=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,r));return i._select=!1,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,u.default),i(e,[{key:"getStateId",value:function(){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"getStateId",this).call(this)+(this._select?"_select":"")}},{key:"_onClick",value:function(){this._select=!this._select,this.doState(),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_onClick",this).call(this)}},{key:"select",get:function(){return this._select},set:function(t){this._select!==t&&(this._select=t,this.doState())}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=u(n(3)),a=u(n(1));function u(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,r));return i._dragBounds={minX:0,maxX:0,minY:0,maxY:0},i._startDragX=0,i._startDragY=0,i._dragZone=null,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),i(e,null,[{key:"EVENT_DRAG",get:function(){return"event_drag"}}]),i(e,[{key:"setDragBounds",value:function(t,e,n,r){this._dragBounds.minX=t,this._dragBounds.maxX=n,this._dragBounds.minY=e,this._dragBounds.maxY=r}},{key:"_onDragStart",value:function(t,e){this._dragZone&&this._dragZone===e&&this._clip&&(this._startDragX=this._clip.x-e.input.dragStartX,this._startDragY=this._clip.y-e.input.dragStartY)}},{key:"_onDrag",value:function(t,e,n,r){if(a.default.check(this.lockId)&&this._dragZone&&this._dragZone===e&&!this.clip){var i=this._startDragX+n,o=this._startDragY+r;i<this._dragBounds.minX?i=this._dragBounds.minX:i>this._dragBounds.maxX&&(i=this._dragBounds.maxX),o<this._dragBounds.minY?o=this._dragBounds.minY:o>this._dragBounds.maxY&&(o=this._dragBounds.maxY),this.emit("event_drag",i,o)}}},{key:"_setupInteractive",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_setupInteractive",this).call(this,t),this._dragZone=t,t.scene.input.setDraggable(t,!0),t.scene.input.on("dragstart",this._onDragStart,this),t.scene.input.on("drag",this._onDrag,this)}},{key:"_removeInteractive",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_removeInteractive",this).call(this,t),this._dragZone=null,t.scene.input.setDraggable(t,!1),t.scene.input.removeListener("dragstart",this._onDragStart),t.scene.input.removeListener("drag",this._onDrag)}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=s(n(0)),a=s(n(3)),u=s(n(8)),l=s(n(1));function s(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i._vertical=r||!1,i._value=0,i._minValue=0,i._maxValue=1,i._valueStep=0,i._buttonStep=.1,i.btnPrev=new a.default(i,"btn_up"),i.btnPrev.on(a.default.EVENT_CLICK,i.onPrevClick,i),i.btnNext=new a.default(i,"btn_down"),i.btnNext.on(a.default.EVENT_CLICK,i.onNextClick,i),i.thumb=new u.default(i,"thumb"),i.thumb.on(u.default.EVENT_DRAG,i._onThumbDrag,i),i._trackStart=0,i._trackLength=100,i._thumbClip=null,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),i(e,null,[{key:"EVENT_CHANGE",get:function(){return"event_change"}}]),i(e,[{key:"setValueBounds",value:function(t,e,n){this._minValue=t,this._maxValue=e,void 0!==n?(this._valueStep=n,this._buttonStep<n&&(this._buttonStep=n)):this._valueStep=0}},{key:"setButtonStep",value:function(t){this._buttonStep=t}},{key:"onClipAppend",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipAppend",this).call(this,t),this._updateClips()}},{key:"_updateClips",value:function(){if(this._clip){this._thumbClip=this.thumb._clip;var t=this._clip.getChildClip("DIMENSIONS");t&&(this._trackStart=this._vertical?t.y:t.x,this._trackLength=this._vertical?t.height:t.width,this._thumbClip&&this.thumb.setDragBounds(this._vertical?this._thumbClip.x:t.x,this._vertical?t.y:this._thumbClip.y,this._vertical?this._thumbClip.x:t.x+t.width,this._vertical?t.y+t.height:this._thumbClip.y));var e=this._clip.getChildClip("HIT_ZONE");e&&e.on("pointerdown",this._onZoneDown,this),this._updateThumbFromValue()}}},{key:"onClipProcess",value:function(){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipProcess",this).call(this),this.thumb&&this._updateClips()}},{key:"onPrevClick",value:function(){l.default.check(this.lockId)&&(this.value-=this._buttonStep)}},{key:"onNextClick",value:function(){l.default.check(this.lockId)&&(this.value+=this._buttonStep)}},{key:"_updateThumbFromValue",value:function(){if(this._thumbClip){var t=Math.round(this._trackStart+this._trackLength*this._value);this._vertical?this._thumbClip.y=t:this._thumbClip.x=t,this.emit("event_change",this.value)}}},{key:"_onThumbDrag",value:function(t,e){if(0!==this._trackLength&&l.default.check(this.lockId)){var n=((this._vertical?e:t)-this._trackStart)/this._trackLength*(this._maxValue-this._minValue);0!==this._valueStep&&(n=Math.round(n/this._valueStep)*this._valueStep),this.value=n+this._minValue}}},{key:"_onZoneDown",value:function(){}},{key:"value",get:function(){var t=this._value*(this._maxValue-this._minValue);return 0===this._valueStep?t+this._minValue:(t=Math.round(t/this._valueStep)*this._valueStep)+this._minValue},set:function(t){var e=(t-this._minValue)/(this._maxValue-this._minValue);e<0&&(e=0),e>1&&(e=1),e!==this._value&&(this._value=e,this._updateThumbFromValue())}}]),e}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(0)),o=a(n(4));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i._rendererClass=r,i._items=[],i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),r(e,null,[{key:"EVENT_ITEM_CHANGE",get:function(){return"event_change"}}]),r(e,[{key:"clean",value:function(){for(;0!==this._items.length;){this._items.pop().destroy(!0)}}},{key:"_updateData",value:function(){var t=this;o.default.each(this._data,function(e,n){t._getRenderer(n).data=e},this),this.doState()}},{key:"_getRenderer",value:function(t){if(this._items.length-1<t){var n=new this._rendererClass(this,"item_"+t);this._items[t]=n,n.on(e.EVENT_ITEM_CHANGE,this.onItemChange,this)}return this._items[t]}},{key:"getStateId",value:function(){return"count_"+(this._data?this._data.length:"0")}},{key:"destroy",value:function(){this.clean(),function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"onItemChange",value:function(t){this.emit(e.EVENT_ITEM_CHANGE,t)}},{key:"data",get:function(){return this._data},set:function(t){this._data=t,this._updateData()}}]),e}();e.default=u},function(t,e,n){t.exports=n(12)},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var r=u(n(6)),i=u(n(14)),o=u(n(20)),a=u(n(1));function u(t){return t&&t.__esModule?t:{default:t}}var l={ComponentClip:r.default,UIComponents:i.default,Plugin:o.default,UIManager:a.default};e.default=l,t.PhaserComps=l}).call(this,n(5))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=v(n(3)),i=v(n(15)),o=v(n(0)),a=v(n(7)),u=v(n(8)),l=v(n(9)),s=v(n(16)),c=v(n(17)),f=v(n(18)),p=v(n(10)),h=v(n(19));function v(t){return t&&t.__esModule?t:{default:t}}var _={UIComponentPrototype:o.default,UIButton:r.default,UIButtonSelect:a.default,UIButtonRadio:i.default,UIButtonDraggable:u.default,UIScrollBar:l.default,UIScrollPanel:s.default,UIProgressBar:c.default,UIContainer:f.default,UIList:p.default,UIListBaseItem:h.default};e.default=_},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(7),a=(r=o)&&r.__esModule?r:{default:r};var u=function(t){function e(t,n,r,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,r));return a._sibling=a,a._value=i,void 0!==o&&a.appendToRadio(o),a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),i(e,null,[{key:"EVENT_SELECT",get:function(){return"event_select"}}]),i(e,[{key:"appendToRadio",value:function(t){this._sibling!==this&&this.removeFromSibling(),this._sibling=t._sibling,t._sibling=this}},{key:"removeFromSibling",value:function(){}},{key:"_onClick",value:function(){this.select=!0}},{key:"_broadcastSelect",value:function(){this.emit("event_select",this.value);for(var t=this._sibling;t!==this;)t.emit("event_select",this._value),t=t._sibling}},{key:"select",get:function(){return function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"select",this)},set:function(t){if(this._select!==t&&(function t(e,n,r,i){var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var a=Object.getPrototypeOf(e);null!==a&&t(a,n,r,i)}else if("value"in o&&o.writable)o.value=r;else{var u=o.set;void 0!==u&&u.call(i,r)}return r}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"select",t,this),t)){for(var n=this._sibling;n!==this;)n.select=!1,n=n._sibling;this._broadcastSelect()}}},{key:"value",get:function(){return this._value},set:function(t){this._value=t}},{key:"valueSelected",get:function(){if(this.select)return this.value;for(var t=this._sibling;t!==this;){if(t.select)return t.value;t=t._sibling}return null},set:function(t){if(this.value!==t){for(var e=this._sibling;e!==this;)if(e.value===t)return void(e.select=!0)}else this.select=!0}}]),e}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(0)),o=a(n(9));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(e,n,r,a,u){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._container=e,e.on(i.default.EVENT_STATE,this._onContainerUpdate,this),this._panelKey=n,this._dimensionsKey=a,this._scrollBar=new o.default(e,r,u),this._scrollBar.on(o.default.EVENT_CHANGE,this._onScrollBar,this),this._vertical=u||!1}return r(t,[{key:"_onContainerUpdate",value:function(){var t=this._container._clip;if(t){this._panel=t.getChildClip(this._panelKey);var e=t.getChildClip(this._dimensionsKey);this._panel&&e&&(this._scrollBounds={x:e.x,y:e.y,len:this._vertical?this._panel.height-e.height:this._panel.width-e.width},this._onScrollBar(this._onScrollBar.value))}}},{key:"_onScrollBar",value:function(t){this._panel&&this._scrollBounds&&(this._vertical?this._panel.y=this._scrollBounds.y-this._scrollBounds.len*t:this._panel.x=this._scrollBounds.x-this._scrollBounds.len*t)}}]),t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(0)),o=a(n(4));function a(t){return t&&t.__esModule?t:{default:t}}var u=/progress_(\d+)$/,l=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r._value=0,r._steps=[],r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),r(e,[{key:"onClipAppend",value:function(t){(function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipAppend",this).call(this,t),this._makeSteps(t),this._applyValue()}},{key:"_applyValue",value:function(){if(this._clip){var t=void 0,e=void 0,n=void 0,r=void 0,i=void 0,o=void 0,a=this._steps.length;for(t=0;t<a-1;t++){var u=this._steps[t],l=this._steps[t+1];if(u.stepValue===this._value){i=u.config;break}if(l.stepValue===this._value){i=l.config;break}if(this._value>u.stepValue&&this._value<l.stepValue){e=u.config,n=l.config,r=(this._value-u.stepValue)/(l.stepValue-u.stepValue);break}}if(!i)for(o in i={},e)if(n.hasOwnProperty(o)){var s=e[o],c=n[o];i[o]={x:s.x+(c.x-s.x)*r,y:s.y+(c.y-s.y)*r,scaleX:s.scaleX+(c.scaleX-s.scaleX)*r,scaleY:s.scaleY+(c.scaleY-s.scaleY)*r,angle:s.angle+(c.angle-s.angle)*r,alpha:s.alpha+(c.alpha-s.alpha)*r}}for(o in i)this._clip.applyChildParams(o,i[o])}}},{key:"_makeSteps",value:function(t){var n=t.getStateIds();this._steps=[];var r=!0,i=!1,a=void 0;try{for(var l,s=n[Symbol.iterator]();!(r=(l=s.next()).done);r=!0){var c=l.value;if(u.test(c)){var f={},p={stepValue:parseInt(u.exec(c)[1])/100,config:f},h=t.getStateConfig(c);for(var v in h)f[v]=e._makeFullConfig(h[v]);this._steps.push(p)}}}catch(t){i=!0,a=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}o.default.sortBy(this._steps,"stepValue")}},{key:"value",get:function(){return this._value},set:function(t){this._value=t,this._applyValue()}}],[{key:"_makeFullConfig",value:function(t){return{x:t.hasOwnProperty("x")?t.x:0,y:t.hasOwnProperty("y")?t.y:0,scaleX:t.hasOwnProperty("scaleX")?t.scaleX:1,scaleY:t.hasOwnProperty("scaleY")?t.scaleY:1,angle:t.hasOwnProperty("angle")?t.angle:0,alpha:t.hasOwnProperty("alpha")?t.alpha:1}}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(0),u=(r=a)&&r.__esModule?r:{default:r};n(2);var l=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r._children=[],r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,u.default),i(e,[{key:"addChild",value:function(t){return-1!==this._children.indexOf(t)?t:(this._children.push(t),this._clip?(t._clip.visible=!0,this._addUIComponentToContainerClip(t)):t._clip.visible=!1,t)}},{key:"removeChild",value:function(t){var e=this._children.indexOf(t);return-1===e?t:(this._children.splice(e,1),this._clip&&this._removeUIComponentFromContainerClip(t),t)}},{key:"_addUIComponentToContainerClip",value:function(t){this._clip.add(t._clip),t._clip.visible=!0}},{key:"_removeUIComponentFromContainerClip",value:function(t,e){this._clip.remove(t._clip,e),t._clip.visible=!1}},{key:"onClipAppend",value:function(t){if(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipAppend",this).call(this,t),t){var n=!0,r=!1,i=void 0;try{for(var a,u=this._children[Symbol.iterator]();!(n=(a=u.next()).done);n=!0){var l=a.value;this._addUIComponentToContainerClip(l)}}catch(t){r=!0,i=t}finally{try{!n&&u.return&&u.return()}finally{if(r)throw i}}}}},{key:"onClipRemove",value:function(t){if(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipRemove",this).call(this,t),t){var n=!0,r=!1,i=void 0;try{for(var a,u=this._children[Symbol.iterator]();!(n=(a=u.next()).done);n=!0){var l=a.value;this._removeUIComponentFromContainerClip(l)}}catch(t){r=!0,i=t}finally{try{!n&&u.return&&u.return()}finally{if(r)throw i}}}}},{key:"destroy",value:function(){var t=!0,n=!1,r=void 0;try{for(var i,a=this._children[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var u=i.value;this._clip&&this._removeUIComponentFromContainerClip(u),u.destroy()}}catch(t){n=!0,r=t}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}this._children.length=0,o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(0)),o=a(n(10));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r._data=null,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),r(e,[{key:"notifyChange",value:function(){this.emit(o.default.EVENT_ITEM_CHANGE,this)}},{key:"_commitData",value:function(){}},{key:"data",get:function(){return this._data},set:function(t){this._data=t,this._commitData()}}]),e}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();n(2);var i,o=n(6),a=(i=o)&&i.__esModule?i:{default:i};var u=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return t.registerGameObject("ui_component",n.addComponent,n.makeComponent),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Phaser.Plugins.BasePlugin),r(e,[{key:"addComponent",value:function(t,e){var n=new a.default(this.scene,t,e);return this.scene.add.existing(n),n}},{key:"makeComponent",value:function(t,e){return new a.default(this.scene,t,e)}}]),e}();e.default=u;var l={key:"UIComponents",plugin:u,start:!0};u.DefaultCfg=l}])}); |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("phaser"),require("underscore")):"function"==typeof define&&define.amd?define(["phaser","underscore"],e):"object"==typeof exports?exports.PhaserComps=e(require("phaser"),require("underscore")):t.PhaserComps=e(t.Phaser,t._)}(window,function(t,e){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=10)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();n(2);var r,o=n(1);(r=o)&&r.__esModule;var a="event_state",u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return i.lockId=null,i._parent=t,i._key=n,i._clip=null,i._texts={},n&&t&&t.on(a,i._onEventState,i),i._clipUpdate(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Phaser.Events.EventEmitter),i(e,null,[{key:"EVENT_STATE",get:function(){return a}}]),i(e,[{key:"appendClip",value:function(t){this._clip!==t&&(null!==this._clip&&this.removeClip(),this._clip=t,this._clip&&this.onClipAppend(this._clip),this._clipProcess())}},{key:"onClipAppend",value:function(t){}},{key:"removeClip",value:function(){this.onClipRemove(this._clip),this._clip=null}},{key:"onClipRemove",value:function(t){}},{key:"doState",value:function(){var t=this.getStateId();this._setupState(t)}},{key:"getText",value:function(t){return this._texts[t]}},{key:"setText",value:function(t,e){if(this._texts[t]!==e&&(this._texts[t]=e,this._clip)){var n=this._clip.getChildText(t);n&&(n.text=e)}}},{key:"getStateId",value:function(){return"default"}},{key:"destroy",value:function(t){this._parent&&this._parent.removeListener(a,this._onEventState),this._clip&&this._clip.destroy(t)}},{key:"_clipUpdate",value:function(){if(this._key)if(this._parent._clip){var t=this._parent._clip.getChildClip(this._key);this.appendClip(t)}else this.appendClip(null);else;}},{key:"_clipProcess",value:function(){this._clip&&(this.doState(),this.onClipProcess())}},{key:"onClipProcess",value:function(){}},{key:"_setupState",value:function(t){if(this._clip)for(var e in this._clip.setState(t),this._texts){var n=this._clip.getChildText(e);n&&(n.text=this._texts[e])}this.emit(a)}},{key:"_onEventState",value:function(){this._clipUpdate()}}]),e}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();var r=!1,o=[],a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return i(t,null,[{key:"lock",value:function(t){this.unlock(),"string"==typeof t?o.push(t):t.forEach(function(t){return o.push(t)}),r=!0}},{key:"unlock",value:function(){o.length=0,r=!1}},{key:"check",value:function(t){return!r||-1!==o.indexOf(t)}}]),t}();e.default=a},function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=a(n(0)),o=a(n(1));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r._enable=!0,r._isPressed=!1,r._isOver=!1,i&&(r.label=i),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.default),i(e,null,[{key:"EVENT_CLICK",get:function(){return"event_click"}}]),i(e,[{key:"onClipAppend",value:function(t){this._updateInteractive()}},{key:"onClipRemove",value:function(t){var e=t.getChildClip("HIT_ZONE");e&&this._removeInteractive(e)}},{key:"_setupInteractive",value:function(t){t.setInteractive({useHandCursor:!0}),t.on("pointerdown",this._onPointerDown,this),t.on("pointerup",this._onPointerUp,this),t.on("pointerover",this._onPointerOver,this),t.on("pointerout",this._onPointerOut,this)}},{key:"_removeInteractive",value:function(t){t.disableInteractive(),t.removeListener("pointerdown",this._onPointerDown,this),t.removeListener("pointerup",this._onPointerUp,this),t.removeListener("pointerover",this._onPointerOver,this),t.removeListener("pointerout",this._onPointerOut,this)}},{key:"_updateInteractive",value:function(){if(this._clip){var t=this._clip.getChildClip("HIT_ZONE");t&&(this.enable?this._setupInteractive(t):this._removeInteractive(t))}}},{key:"getStateId",value:function(){return this.enable?this._isPressed?this.STATE_DOWN:this._isOver?this.STATE_OVER:this.STATE_UP:this.STATE_DISABLE}},{key:"_onClick",value:function(){this.emit("event_click")}},{key:"_onPointerOut",value:function(){this._isOver=!1,this._isPressed=!1,this.doState()}},{key:"_onPointerOver",value:function(){this._isOver=!0,this.doState()}},{key:"_onPointerDown",value:function(){this._isPressed=!0,this.doState()}},{key:"_onPointerUp",value:function(){var t=this._isPressed&&this._isOver;this._isPressed=!1,this.doState(),t&&o.default.check(this.lockId)&&this._onClick()}},{key:"destroy",value:function(){if(this._clip){var t=this._clip.getChildClip("HIT_ZONE");t&&this._removeInteractive(t)}(function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"label",get:function(){return this.getText("label")},set:function(t){this.setText("label",t)}},{key:"enable",get:function(){return this._enable},set:function(t){this._enable!==t&&(this._enable=t,this._updateInteractive(),this.doState())}},{key:"STATE_UP",get:function(){return"up"}},{key:"STATE_DOWN",get:function(){return"down"}},{key:"STATE_OVER",get:function(){return"over"}},{key:"STATE_DISABLE",get:function(){return"disable"}}]),e}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=a(n(2)),o=a(n(3));function a(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var s=function(t){function e(t,n,i){u(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,0,0));return r.childComponentClips=[],r._config=n,r._key=n.key,r._textures=i,r.imageFramesMap={},r._stateManager=new c(r,n),r._childrenById={},r._createImagesMap(i),r._parseConfig(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.default.GameObjects.Container),i(e,[{key:"getStateConfig",value:function(t){return this._stateManager.getStateConfigById(t)}},{key:"getStateIds",value:function(){return this._stateManager.stateIds}},{key:"setState",value:function(t,e){this._stateManager.setState(t,e)}},{key:"applyChildParams",value:function(t,n){this._childrenById.hasOwnProperty(t)&&e._setupCommonParams(this._childrenById[t],n)}},{key:"getChildClip",value:function(t){return this._stateManager.getActiveComponentByKey(t)}},{key:"getChildText",value:function(t){return this._stateManager.getActiveComponentByKey(t)}},{key:"destroy",value:function(t){o.default.each(this.childComponentClips,function(e){e.destroy(t)},this),function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this,t)}},{key:"_createImagesMap",value:function(t){var e=this;o.default.each(t,function(t){var n=e.scene.textures.get(t);if(n){var i=n.getFrameNames();o.default.each(i,function(n){e.imageFramesMap[n]=t},e)}},this)}},{key:"_parseConfig",value:function(){var t=this;this._config.hasOwnProperty("children")&&o.default.each(this._config.children,function(e){t._createChildFromConfig(e)},this)}},{key:"_createChildFromConfig",value:function(t){var n=this,i=null,r=t.childId,a=t.key,u=!0;if("image"===t.type)i=this._createImageFromConfig(t);else if("text"===t.type)i=this._createTextFromConfig(t);else if("tileSprite"===t.type)i=this._createTileSpriteFromConfig(t);else if("component"===t.type)i=new e(this.scene,t,this._textures),e._setupCommonParams(i,t);else if("zone"===t.type)i=this._createHitZoneFromConfig(t);else if("polygon"===t.type&&(i=this._createPolygonFromConfig(t),t.hasOwnProperty("masking"))){var s=i.createGeometryMask();o.default.each(t.masking,function(t){n._childrenById[t].setMask(s)},this),u=!1}null!==i&&(this._childrenById[r]=i,this.childComponentClips.push(i),u&&this.add(i),this._stateManager.addComponent(i,r,a))}},{key:"_createPolygonFromConfig",value:function(t){var n=this.scene.make.graphics();n.fillStyle(t.color,t.hasOwnProperty("alpha")?t.alpha:1),n.beginPath();for(var i=t.vertices,r=i.length,o=0;o<r;o+=2)n.lineTo(i[o],i[o+1]);return n.closePath(),n.fillPath(),e._setupCommonParams(n,t),t.hasOwnProperty("masking")||this.scene.add.existing(n),n}},{key:"_createTileSpriteFromConfig",value:function(t){var n=this.scene.add.tileSprite(0,0,t.width,t.height,this.imageFramesMap[t.image],t.image);return n.setOrigin(.5,.5),e._setupCommonParams(n,t),n}},{key:"_createImageFromConfig",value:function(t){var n=this.scene.add.image(0,0,this.imageFramesMap[t.image],t.image);return n.setOrigin(0),e._setupCommonParams(n,t),n}},{key:"_createTextFromConfig",value:function(t){var n=this.scene.add.text(0,0,t.text,t.textStyle);return"center"===t.textStyle.align?n.setOrigin(.5,0):"right"===t.textStyle.align?n.setOrigin(1,0):n.setOrigin(0),e._setupCommonParams(n,t),n}},{key:"_createHitZoneFromConfig",value:function(t){return this.scene.add.zone(t.x||0,t.y||0,t.width,t.height).setOrigin(0)}}],[{key:"_setupCommonParams",value:function(t,e){var n=e.x||0,i=e.y||0,r=e.scaleX||1,o=e.scaleY||1,a=e.angle||0,u=e.hasOwnProperty("alpha")?e.alpha:1;t.x=n,t.y=i,t.scaleX=r,t.scaleY=o,t.angle=a,t.alpha=u}}]),e}();e.default=s;var l=function t(e){u(this,t),this.config=e,this.componentIds=[],this.componentIds=Object.keys(e)},c=function(){function t(e,n){u(this,t),this._clip=e,this._dynamicChildrenIds=[],this._states={},this.stateIds=[],this._components={},this._currentState=null,this._currentStateId=null,this._componentKeys={},this._residentComponentsByKey={};var i=[];for(var r in n.states){this.stateIds.push(r);var a=new l(n.states[r]);this._states[r]=a,i.push(a.componentIds)}this._dynamicChildrenIds=o.default.uniq(o.default.flatten(i))}return i(t,[{key:"getStateConfigById",value:function(t){return this._states.hasOwnProperty(t)?this._states[t].config:null}},{key:"addComponent",value:function(t,e,n){-1===o.default.indexOf(this._dynamicChildrenIds,e)?void 0!==n&&(this._residentComponentsByKey[n]=t):(this._components[e]=t,void 0!==n&&(this._componentKeys[e]=n))}},{key:"setState",value:function(t,e){(this._currentStateId!==t||e)&&this._states.hasOwnProperty(t)&&(this._currentStateId=t,this._currentState=this._states[t],this.setupState())}},{key:"getActiveComponentByKey",value:function(t){if(this._residentComponentsByKey.hasOwnProperty(t))return this._residentComponentsByKey[t];if(null===this._currentState)return null;for(var e in this._currentState.componentIds){var n=this._currentState.componentIds[e];if(this._componentKeys[n]===t)return this._components[n]}return null}},{key:"setupState",value:function(){var t=this,e=this._currentState.componentIds,n=o.default.difference(this._dynamicChildrenIds,e);o.default.each(n,function(e){t._components[e].visible=!1},this),o.default.each(e,function(e){var n=t._components[e];n.visible=!0,s._setupCommonParams(n,t._currentState.config[e])},this)}}]),t}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},a=n(4),u=(i=a)&&i.__esModule?i:{default:i};var s=function(t){function e(t,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,i));return r._select=!1,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,u.default),r(e,[{key:"getStateId",value:function(){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"getStateId",this).call(this)+(this._select?"_select":"")}},{key:"_onClick",value:function(){this._select=!this._select,this.doState(),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_onClick",this).call(this)}},{key:"select",get:function(){return this._select},set:function(t){this._select!==t&&(this._select=t,this.doState())}}]),e}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=u(n(4)),a=u(n(1));function u(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function e(t,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,i));return r._dragBounds={minX:0,maxX:0,minY:0,maxY:0},r._startDragX=0,r._startDragY=0,r._dragZone=null,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),r(e,null,[{key:"EVENT_DRAG",get:function(){return"event_drag"}}]),r(e,[{key:"setDragBounds",value:function(t,e,n,i){this._dragBounds.minX=t,this._dragBounds.maxX=n,this._dragBounds.minY=e,this._dragBounds.maxY=i}},{key:"_onDragStart",value:function(t,e){this._dragZone&&this._dragZone===e&&this._clip&&(this._startDragX=this._clip.x-e.input.dragStartX,this._startDragY=this._clip.y-e.input.dragStartY)}},{key:"_onDrag",value:function(t,e,n,i){if(a.default.check(this.lockId)&&this._dragZone&&this._dragZone===e&&!this.clip){var r=this._startDragX+n,o=this._startDragY+i;r<this._dragBounds.minX?r=this._dragBounds.minX:r>this._dragBounds.maxX&&(r=this._dragBounds.maxX),o<this._dragBounds.minY?o=this._dragBounds.minY:o>this._dragBounds.maxY&&(o=this._dragBounds.maxY),this.emit("event_drag",r,o)}}},{key:"_setupInteractive",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_setupInteractive",this).call(this,t),this._dragZone=t,t.scene.input.setDraggable(t,!0),t.scene.input.on("dragstart",this._onDragStart,this),t.scene.input.on("drag",this._onDrag,this)}},{key:"_removeInteractive",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_removeInteractive",this).call(this,t),this._dragZone=null,t.scene.input.setDraggable(t,!1),t.scene.input.removeListener("dragstart",this._onDragStart),t.scene.input.removeListener("drag",this._onDrag)}}]),e}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=l(n(0)),a=l(n(4)),u=l(n(7)),s=l(n(1));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r._vertical=i||!1,r._value=0,r._minValue=0,r._maxValue=1,r._valueStep=0,r._buttonStep=.1,r.btnPrev=new a.default(r,"btn_up"),r.btnPrev.on(a.default.EVENT_CLICK,r.onPrevClick,r),r.btnNext=new a.default(r,"btn_down"),r.btnNext.on(a.default.EVENT_CLICK,r.onNextClick,r),r.thumb=new u.default(r,"thumb"),r.thumb.on(u.default.EVENT_DRAG,r._onThumbDrag,r),r._trackStart=0,r._trackLength=100,r._thumbClip=null,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),r(e,null,[{key:"EVENT_CHANGE",get:function(){return"event_change"}}]),r(e,[{key:"setValueBounds",value:function(t,e,n){this._minValue=t,this._maxValue=e,void 0!==n?(this._valueStep=n,this._buttonStep<n&&(this._buttonStep=n)):this._valueStep=0}},{key:"setButtonStep",value:function(t){this._buttonStep=t}},{key:"onClipAppend",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipAppend",this).call(this,t),this._updateClips()}},{key:"_updateClips",value:function(){if(this._clip){this._thumbClip=this.thumb._clip;var t=this._clip.getChildClip("DIMENSIONS");t&&(this._trackStart=this._vertical?t.y:t.x,this._trackLength=this._vertical?t.height:t.width,this._thumbClip&&this.thumb.setDragBounds(this._vertical?this._thumbClip.x:t.x,this._vertical?t.y:this._thumbClip.y,this._vertical?this._thumbClip.x:t.x+t.width,this._vertical?t.y+t.height:this._thumbClip.y));var e=this._clip.getChildClip("HIT_ZONE");e&&e.on("pointerdown",this._onZoneDown,this),this._updateThumbFromValue()}}},{key:"onClipProcess",value:function(){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipProcess",this).call(this),this.thumb&&this._updateClips()}},{key:"onPrevClick",value:function(){s.default.check(this.lockId)&&(this.value-=this._buttonStep)}},{key:"onNextClick",value:function(){s.default.check(this.lockId)&&(this.value+=this._buttonStep)}},{key:"_updateThumbFromValue",value:function(){if(this._thumbClip){var t=Math.round(this._trackStart+this._trackLength*this._value);this._vertical?this._thumbClip.y=t:this._thumbClip.x=t,this.emit("event_change",this.value)}}},{key:"_onThumbDrag",value:function(t,e){if(0!==this._trackLength&&s.default.check(this.lockId)){var n=((this._vertical?e:t)-this._trackStart)/this._trackLength*(this._maxValue-this._minValue);0!==this._valueStep&&(n=Math.round(n/this._valueStep)*this._valueStep),this.value=n+this._minValue}}},{key:"_onZoneDown",value:function(){}},{key:"value",get:function(){var t=this._value*(this._maxValue-this._minValue);return 0===this._valueStep?t+this._minValue:(t=Math.round(t/this._valueStep)*this._valueStep)+this._minValue},set:function(t){var e=(t-this._minValue)/(this._maxValue-this._minValue);e<0&&(e=0),e>1&&(e=1),e!==this._value&&(this._value=e,this._updateThumbFromValue())}}]),e}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=a(n(0)),o=a(n(3));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r._rendererClass=i,r._items=[],r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.default),i(e,null,[{key:"EVENT_ITEM_CHANGE",get:function(){return"event_change"}}]),i(e,[{key:"clean",value:function(){for(;0!==this._items.length;){this._items.pop().destroy(!0)}}},{key:"_updateData",value:function(){var t=this;o.default.each(this._data,function(e,n){t._getRenderer(n).data=e},this),this.doState()}},{key:"_getRenderer",value:function(t){if(this._items.length-1<t){var n=new this._rendererClass(this,"item_"+t);this._items[t]=n,n.on(e.EVENT_ITEM_CHANGE,this.onItemChange,this)}return this._items[t]}},{key:"getStateId",value:function(){return"count_"+(this._data?this._data.length:"0")}},{key:"destroy",value:function(){this.clean(),function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"onItemChange",value:function(t){this.emit(e.EVENT_ITEM_CHANGE,t)}},{key:"data",get:function(){return this._data},set:function(t){this._data=t,this._updateData()}}]),e}();e.default=u},function(t,e,n){t.exports=n(11)},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var i=u(n(5)),r=u(n(13)),o=u(n(19)),a=u(n(1));function u(t){return t&&t.__esModule?t:{default:t}}var s={ComponentClip:i.default,UIComponents:r.default,Plugin:o.default,UIManager:a.default};e.default=s,t.PhaserComps=s}).call(this,n(12))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=_(n(4)),r=_(n(14)),o=_(n(0)),a=_(n(6)),u=_(n(7)),s=_(n(8)),l=_(n(15)),c=_(n(16)),f=_(n(17)),p=_(n(9)),h=_(n(18));function _(t){return t&&t.__esModule?t:{default:t}}var d={UIComponentPrototype:o.default,UIButton:i.default,UIButtonSelect:a.default,UIButtonRadio:r.default,UIButtonDraggable:u.default,UIScrollBar:s.default,UIScrollPanel:l.default,UIProgressBar:c.default,UIContainer:f.default,UIList:p.default,UIListBaseItem:h.default};e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=n(6),a=(i=o)&&i.__esModule?i:{default:i};var u=function(t){function e(t,n,i,r,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,i));return a._sibling=a,a._value=r,void 0!==o&&a.appendToRadio(o),a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),r(e,null,[{key:"EVENT_SELECT",get:function(){return"event_select"}}]),r(e,[{key:"appendToRadio",value:function(t){this._sibling!==this&&this.removeFromSibling(),this._sibling=t._sibling,t._sibling=this}},{key:"removeFromSibling",value:function(){}},{key:"_onClick",value:function(){this.select=!0}},{key:"_broadcastSelect",value:function(){this.emit("event_select",this.value);for(var t=this._sibling;t!==this;)t.emit("event_select",this._value),t=t._sibling}},{key:"select",get:function(){return function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"select",this)},set:function(t){if(this._select!==t&&(function t(e,n,i,r){var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var a=Object.getPrototypeOf(e);null!==a&&t(a,n,i,r)}else if("value"in o&&o.writable)o.value=i;else{var u=o.set;void 0!==u&&u.call(r,i)}return i}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"select",t,this),t)){for(var n=this._sibling;n!==this;)n.select=!1,n=n._sibling;this._broadcastSelect()}}},{key:"value",get:function(){return this._value},set:function(t){this._value=t}},{key:"valueSelected",get:function(){if(this.select)return this.value;for(var t=this._sibling;t!==this;){if(t.select)return t.value;t=t._sibling}return null},set:function(t){if(this.value!==t){for(var e=this._sibling;e!==this;)if(e.value===t)return void(e.select=!0)}else this.select=!0}}]),e}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=a(n(0)),o=a(n(8));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(e,n,i,a,u){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._container=e,e.on(r.default.EVENT_STATE,this._onContainerUpdate,this),this._panelKey=n,this._dimensionsKey=a,this._scrollBar=new o.default(e,i,u),this._scrollBar.on(o.default.EVENT_CHANGE,this._onScrollBar,this),this._vertical=u||!1}return i(t,[{key:"_onContainerUpdate",value:function(){var t=this._container._clip;if(t){this._panel=t.getChildClip(this._panelKey);var e=t.getChildClip(this._dimensionsKey);this._panel&&e&&(this._scrollBounds={x:e.x,y:e.y,len:this._vertical?this._panel.height-e.height:this._panel.width-e.width},this._onScrollBar(this._onScrollBar.value))}}},{key:"_onScrollBar",value:function(t){this._panel&&this._scrollBounds&&(this._vertical?this._panel.y=this._scrollBounds.y-this._scrollBounds.len*t:this._panel.x=this._scrollBounds.x-this._scrollBounds.len*t)}}]),t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=a(n(0)),o=a(n(3));function a(t){return t&&t.__esModule?t:{default:t}}var u=/progress_(\d+)$/,s=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i._value=0,i._steps=[],i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.default),i(e,[{key:"onClipAppend",value:function(t){(function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipAppend",this).call(this,t),this._makeSteps(t),this._applyValue()}},{key:"_applyValue",value:function(){if(this._clip){var t=void 0,e=void 0,n=void 0,i=void 0,r=void 0,o=void 0,a=this._steps.length;for(t=0;t<a-1;t++){var u=this._steps[t],s=this._steps[t+1];if(u.stepValue===this._value){r=u.config;break}if(s.stepValue===this._value){r=s.config;break}if(this._value>u.stepValue&&this._value<s.stepValue){e=u.config,n=s.config,i=(this._value-u.stepValue)/(s.stepValue-u.stepValue);break}}if(!r)for(o in r={},e)if(n.hasOwnProperty(o)){var l=e[o],c=n[o];r[o]={x:l.x+(c.x-l.x)*i,y:l.y+(c.y-l.y)*i,scaleX:l.scaleX+(c.scaleX-l.scaleX)*i,scaleY:l.scaleY+(c.scaleY-l.scaleY)*i,angle:l.angle+(c.angle-l.angle)*i,alpha:l.alpha+(c.alpha-l.alpha)*i}}for(o in r)this._clip.applyChildParams(o,r[o])}}},{key:"_makeSteps",value:function(t){var n=this,i=t.getStateIds();this._steps=[],o.default.each(i,function(i){if(u.test(i)){var r={},o={stepValue:parseInt(u.exec(i)[1])/100,config:r},a=t.getStateConfig(i);for(var s in a)r[s]=e._makeFullConfig(a[s]);n._steps.push(o)}},this),o.default.sortBy(this._steps,"stepValue")}},{key:"value",get:function(){return this._value},set:function(t){this._value=t,this._applyValue()}}],[{key:"_makeFullConfig",value:function(t){return{x:t.hasOwnProperty("x")?t.x:0,y:t.hasOwnProperty("y")?t.y:0,scaleX:t.hasOwnProperty("scaleX")?t.scaleX:1,scaleY:t.hasOwnProperty("scaleY")?t.scaleY:1,angle:t.hasOwnProperty("angle")?t.angle:0,alpha:t.hasOwnProperty("alpha")?t.alpha:1}}}]),e}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,i)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(i):void 0},o=u(n(0));n(2);var a=u(n(3));function u(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i._children=[],i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),i(e,[{key:"addChild",value:function(t){return-1!==this._children.indexOf(t)?t:(this._children.push(t),this._clip?(t._clip.visible=!0,this._addUIComponentToContainerClip(t)):t._clip.visible=!1,t)}},{key:"removeChild",value:function(t){var e=this._children.indexOf(t);return-1===e?t:(this._children.splice(e,1),this._clip&&this._removeUIComponentFromContainerClip(t),t)}},{key:"_addUIComponentToContainerClip",value:function(t){this._clip.add(t._clip),t._clip.visible=!0}},{key:"_removeUIComponentFromContainerClip",value:function(t,e){this._clip.remove(t._clip,e),t._clip.visible=!1}},{key:"onClipAppend",value:function(t){var n=this;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipAppend",this).call(this,t),t&&a.default.each(this._children,function(t){n._addUIComponentToContainerClip(t)},this)}},{key:"onClipRemove",value:function(t){var n=this;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipRemove",this).call(this,t),t&&a.default.each(this._children,function(t){n._removeUIComponentFromContainerClip(t)},this)}},{key:"destroy",value:function(){var t=this;a.default.each(this._children,function(e){t._clip&&t._removeUIComponentFromContainerClip(e),e.destroy()},this),this._children.length=0,r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}}]),e}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=a(n(0)),o=a(n(9));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i._data=null,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.default),i(e,[{key:"notifyChange",value:function(){this.emit(o.default.EVENT_ITEM_CHANGE,this)}},{key:"_commitData",value:function(){}},{key:"data",get:function(){return this._data},set:function(t){this._data=t,this._commitData()}}]),e}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();n(2);var r,o=n(5),a=(r=o)&&r.__esModule?r:{default:r};var u=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return t.registerGameObject("ui_component",n.addComponent,n.makeComponent),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Phaser.Plugins.BasePlugin),i(e,[{key:"addComponent",value:function(t,e){var n=new a.default(this.scene,t,e);return this.scene.add.existing(n),n}},{key:"makeComponent",value:function(t,e){return new a.default(this.scene,t,e)}}]),e}();e.default=u;var s={key:"UIComponents",plugin:u,start:!0};u.DefaultCfg=s}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("phaser"),require("underscore")):"function"==typeof define&&define.amd?define(["phaser","underscore"],e):"object"==typeof exports?exports.PhaserComps=e(require("phaser"),require("underscore")):t.PhaserComps=e(t.Phaser,t._)}(window,function(t,e){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=10)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();n(2);var i,o=n(1);(i=o)&&i.__esModule;var a="event_state",u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.lockId=null,r._parent=t,r._key=n,r._clip=null,r._texts={},n&&t&&t.on(a,r._onEventState,r),r._clipUpdate(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Phaser.Events.EventEmitter),r(e,null,[{key:"EVENT_STATE",get:function(){return a}}]),r(e,[{key:"appendClip",value:function(t){this._clip!==t&&(null!==this._clip&&this.removeClip(),this._clip=t,this._clip&&this.onClipAppend(this._clip),this._clipProcess())}},{key:"onClipAppend",value:function(t){}},{key:"removeClip",value:function(){this.onClipRemove(this._clip),this._clip=null}},{key:"onClipRemove",value:function(t){}},{key:"doState",value:function(){var t=this.getStateId();this._setupState(t)}},{key:"getText",value:function(t){return this._texts[t]}},{key:"setText",value:function(t,e){if(this._texts[t]!==e&&(this._texts[t]=e,this._clip)){var n=this._clip.getChildText(t);n&&(n.text=e)}}},{key:"getStateId",value:function(){return"default"}},{key:"destroy",value:function(t){this._parent&&this._parent.removeListener(a,this._onEventState),this._clip&&this._clip.destroy(t)}},{key:"_clipUpdate",value:function(){if(this._key)if(this._parent._clip){var t=this._parent._clip.getChildClip(this._key);this.appendClip(t)}else this.appendClip(null);else;}},{key:"_clipProcess",value:function(){this._clip&&(this.doState(),this.onClipProcess())}},{key:"onClipProcess",value:function(){}},{key:"_setupState",value:function(t){if(this._clip)for(var e in this._clip.setState(t),this._texts){var n=this._clip.getChildText(e);n&&(n.text=this._texts[e])}this.emit(a)}},{key:"_onEventState",value:function(){this._clipUpdate()}}]),e}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var i=!1,o=[],a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return r(t,null,[{key:"lock",value:function(t){this.unlock(),"string"==typeof t?o.push(t):t.forEach(function(t){return o.push(t)}),i=!0}},{key:"unlock",value:function(){o.length=0,i=!1}},{key:"check",value:function(t){return!i||-1!==o.indexOf(t)}}]),t}();e.default=a},function(e,n){e.exports=t},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(0)),o=a(n(1));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i._enable=!0,i._isPressed=!1,i._isOver=!1,r&&(i.label=r),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),r(e,null,[{key:"EVENT_CLICK",get:function(){return"event_click"}}]),r(e,[{key:"onClipAppend",value:function(t){this._updateInteractive()}},{key:"onClipRemove",value:function(t){var e=t.getChildClip("HIT_ZONE");e&&this._removeInteractive(e)}},{key:"_setupInteractive",value:function(t){t.setInteractive({useHandCursor:!0}),t.on("pointerdown",this._onPointerDown,this),t.on("pointerup",this._onPointerUp,this),t.on("pointerover",this._onPointerOver,this),t.on("pointerout",this._onPointerOut,this)}},{key:"_removeInteractive",value:function(t){t.disableInteractive(),t.removeListener(Phaser.Input.Events.GAMEOBJECT_POINTER_DOWN,this._onPointerDown,this),t.removeListener(Phaser.Input.Events.GAMEOBJECT_POINTER_UP,this._onPointerUp,this),t.removeListener(Phaser.Input.Events.GAMEOBJECT_POINTER_OVER,this._onPointerOver,this),t.removeListener(Phaser.Input.Events.GAMEOBJECT_POINTER_OUT,this._onPointerOut,this)}},{key:"_updateInteractive",value:function(){if(this._clip){var t=this._clip.getChildClip("HIT_ZONE");t&&(this.enable?this._setupInteractive(t):this._removeInteractive(t))}}},{key:"getStateId",value:function(){return this.enable?this._isPressed?this.STATE_DOWN:this._isOver?this.STATE_OVER:this.STATE_UP:this.STATE_DISABLE}},{key:"_onClick",value:function(){this.emit("event_click")}},{key:"_onPointerOut",value:function(){this._isOver=!1,this._isPressed=!1,this.doState()}},{key:"_onPointerOver",value:function(){this._isOver=!0,this.doState()}},{key:"_onPointerDown",value:function(t,e,n,r){this._isPressed=!0,this.doState(),r.stopPropagation()}},{key:"_onPointerUp",value:function(t,e,n,r){var i=this._isPressed&&this._isOver;this._isPressed=!1,this.doState(),i&&(r.stopPropagation(),o.default.check(this.lockId)&&this._onClick())}},{key:"destroy",value:function(t){if(this._clip){var n=this._clip.getChildClip("HIT_ZONE");n&&this._removeInteractive(n)}(function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this,t)}},{key:"label",get:function(){return this.getText("label")},set:function(t){this.setText("label",t)}},{key:"enable",get:function(){return this._enable},set:function(t){this._enable!==t&&(this._enable=t,this._updateInteractive(),this.doState())}},{key:"STATE_UP",get:function(){return"up"}},{key:"STATE_DOWN",get:function(){return"down"}},{key:"STATE_OVER",get:function(){return"over"}},{key:"STATE_DISABLE",get:function(){return"disable"}}]),e}();e.default=u},function(t,n){t.exports=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(2)),o=a(n(4));function a(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var l=function(t){function e(t,n,r){u(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,0,0));return i.childComponentClips=[],i._config=n,i._key=n.key,i._textures=r,i.imageFramesMap={},i._stateManager=new c(i,n),i._childrenById={},i._createImagesMap(r),i._parseConfig(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default.GameObjects.Container),r(e,[{key:"getStateConfig",value:function(t){return this._stateManager.getStateConfigById(t)}},{key:"getStateIds",value:function(){return this._stateManager.stateIds}},{key:"setState",value:function(t,e){this._stateManager.setState(t,e)}},{key:"applyChildParams",value:function(t,n){this._childrenById.hasOwnProperty(t)&&e._setupCommonParams(this._childrenById[t],n)}},{key:"getChildClip",value:function(t){return this._stateManager.getActiveComponentByKey(t)}},{key:"getChildText",value:function(t){return this._stateManager.getActiveComponentByKey(t)}},{key:"destroy",value:function(t){var n=!0,r=!1,i=void 0;try{for(var o,a=this.childComponentClips[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){o.value.destroy(t)}}catch(t){r=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}(function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this,t)}},{key:"_createImagesMap",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=t[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value,u=this.scene.textures.get(a);if(!u)return;var l=u.getFrameNames(),s=!0,c=!1,f=void 0;try{for(var p,h=l[Symbol.iterator]();!(s=(p=h.next()).done);s=!0){var _=p.value;this.imageFramesMap[_]=a}}catch(t){c=!0,f=t}finally{try{!s&&h.return&&h.return()}finally{if(c)throw f}}}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}}},{key:"_parseConfig",value:function(){if(this._config.hasOwnProperty("children")){var t=!0,e=!1,n=void 0;try{for(var r,i=this._config.children[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var o=r.value;this._createChildFromConfig(o)}}catch(t){e=!0,n=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}}}},{key:"_createChildFromConfig",value:function(t){var n=null,r=t.childId,i=t.key,o=!0;if("image"===t.type)n=this._createImageFromConfig(t);else if("text"===t.type)n=this._createTextFromConfig(t);else if("tileSprite"===t.type)n=this._createTileSpriteFromConfig(t);else if("component"===t.type)n=new e(this.scene,t,this._textures),e._setupCommonParams(n,t);else if("zone"===t.type)n=this._createHitZoneFromConfig(t);else if("polygon"===t.type&&(n=this._createPolygonFromConfig(t),t.hasOwnProperty("masking"))){var a=n.createGeometryMask(),u=!0,l=!1,s=void 0;try{for(var c,f=t.masking[Symbol.iterator]();!(u=(c=f.next()).done);u=!0){var p=c.value;this._childrenById[p].setMask(a)}}catch(t){l=!0,s=t}finally{try{!u&&f.return&&f.return()}finally{if(l)throw s}}o=!1}null!==n&&(this._childrenById[r]=n,this.childComponentClips.push(n),o&&this.add(n),this._stateManager.addComponent(n,r,i))}},{key:"_createPolygonFromConfig",value:function(t){var n=this.scene.make.graphics();n.fillStyle(t.color,t.hasOwnProperty("alpha")?t.alpha:1),n.beginPath();for(var r=t.vertices,i=r.length,o=0;o<i;o+=2)n.lineTo(r[o],r[o+1]);return n.closePath(),n.fillPath(),e._setupCommonParams(n,t),t.hasOwnProperty("masking")||this.scene.add.existing(n),n}},{key:"_createTileSpriteFromConfig",value:function(t){var n=this.scene.add.tileSprite(0,0,t.width,t.height,this.imageFramesMap[t.image],t.image);return n.setOrigin(.5,.5),e._setupCommonParams(n,t),n}},{key:"_createImageFromConfig",value:function(t){var n=this.scene.add.image(0,0,this.imageFramesMap[t.image],t.image);return n.setOrigin(0),e._setupCommonParams(n,t),n}},{key:"_createTextFromConfig",value:function(t){var n=this.scene.add.text(0,0,t.text,t.textStyle);return"center"===t.textStyle.align?n.setOrigin(.5,0):"right"===t.textStyle.align?n.setOrigin(1,0):n.setOrigin(0),e._setupCommonParams(n,t),n}},{key:"_createHitZoneFromConfig",value:function(t){return this.scene.add.zone(t.x||0,t.y||0,t.width,t.height).setOrigin(0)}}],[{key:"_setupCommonParams",value:function(t,e){var n=e.x||0,r=e.y||0,i=e.scaleX||1,o=e.scaleY||1,a=e.angle||0,u=e.hasOwnProperty("alpha")?e.alpha:1;t.x=n,t.y=r,t.scaleX=i,t.scaleY=o,t.angle=a,t.alpha=u}}]),e}();e.default=l;var s=function t(e){u(this,t),this.config=e,this.componentIds=[],this.componentIds=Object.keys(e)},c=function(){function t(e,n){u(this,t),this._clip=e,this._dynamicChildrenIds=[],this._states={},this.stateIds=[],this._components={},this._currentState=null,this._currentStateId=null,this._componentKeys={},this._residentComponentsByKey={};var r=[];for(var i in n.states){this.stateIds.push(i);var a=new s(n.states[i]);this._states[i]=a,r.push(a.componentIds)}this._dynamicChildrenIds=o.default.uniq(o.default.flatten(r))}return r(t,[{key:"getStateConfigById",value:function(t){return this._states.hasOwnProperty(t)?this._states[t].config:null}},{key:"addComponent",value:function(t,e,n){-1===o.default.indexOf(this._dynamicChildrenIds,e)?void 0!==n&&(this._residentComponentsByKey[n]=t):(this._components[e]=t,void 0!==n&&(this._componentKeys[e]=n))}},{key:"setState",value:function(t,e){(this._currentStateId!==t||e)&&this._states.hasOwnProperty(t)&&(this._currentStateId=t,this._currentState=this._states[t],this.setupState())}},{key:"getActiveComponentByKey",value:function(t){if(this._residentComponentsByKey.hasOwnProperty(t))return this._residentComponentsByKey[t];if(null===this._currentState)return null;for(var e in this._currentState.componentIds){var n=this._currentState.componentIds[e];if(this._componentKeys[n]===t)return this._components[n]}return null}},{key:"setupState",value:function(){var t=this._currentState.componentIds,e=o.default.difference(this._dynamicChildrenIds,t),n=void 0,r=!0,i=!1,a=void 0;try{for(var u,s=e[Symbol.iterator]();!(r=(u=s.next()).done);r=!0)n=u.value,this._components[n].visible=!1}catch(t){i=!0,a=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}var c=!0,f=!1,p=void 0;try{for(var h,_=t[Symbol.iterator]();!(c=(h=_.next()).done);c=!0){n=h.value;var y=this._components[n];y.visible=!0,l._setupCommonParams(y,this._currentState.config[n])}}catch(t){f=!0,p=t}finally{try{!c&&_.return&&_.return()}finally{if(f)throw p}}}}]),t}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(3),u=(r=a)&&r.__esModule?r:{default:r};var l=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,r));return i._select=!1,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,u.default),i(e,[{key:"getStateId",value:function(){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"getStateId",this).call(this)+(this._select?"_select":"")}},{key:"_onClick",value:function(){this._select=!this._select,this.doState(),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_onClick",this).call(this)}},{key:"select",get:function(){return this._select},set:function(t){this._select!==t&&(this._select=t,this.doState())}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=u(n(3)),a=u(n(1));function u(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,r));return i._dragBounds={minX:0,maxX:0,minY:0,maxY:0},i._startDragX=0,i._startDragY=0,i._dragZone=null,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),i(e,null,[{key:"EVENT_DRAG",get:function(){return"event_drag"}}]),i(e,[{key:"setDragBounds",value:function(t,e,n,r){this._dragBounds.minX=t,this._dragBounds.maxX=n,this._dragBounds.minY=e,this._dragBounds.maxY=r}},{key:"_onDragStart",value:function(t,e){this._dragZone&&this._dragZone===e&&this._clip&&(this._startDragX=this._clip.x-e.input.dragStartX,this._startDragY=this._clip.y-e.input.dragStartY)}},{key:"_onDrag",value:function(t,e,n,r){if(a.default.check(this.lockId)&&this._dragZone&&this._dragZone===e&&!this.clip){var i=this._startDragX+n,o=this._startDragY+r;i<this._dragBounds.minX?i=this._dragBounds.minX:i>this._dragBounds.maxX&&(i=this._dragBounds.maxX),o<this._dragBounds.minY?o=this._dragBounds.minY:o>this._dragBounds.maxY&&(o=this._dragBounds.maxY),this.emit("event_drag",i,o)}}},{key:"_setupInteractive",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_setupInteractive",this).call(this,t),this._dragZone=t,t.scene.input.setDraggable(t,!0),t.scene.input.on("dragstart",this._onDragStart,this),t.scene.input.on("drag",this._onDrag,this)}},{key:"_removeInteractive",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_removeInteractive",this).call(this,t),this._dragZone=null,t.scene.input.setDraggable(t,!1),t.scene.input.removeListener("dragstart",this._onDragStart),t.scene.input.removeListener("drag",this._onDrag)}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=s(n(0)),a=s(n(3)),u=s(n(7)),l=s(n(1));function s(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i._vertical=r||!1,i._value=0,i._minValue=0,i._maxValue=1,i._valueStep=0,i._buttonStep=.1,i.btnPrev=new a.default(i,"btn_up"),i.btnPrev.on(a.default.EVENT_CLICK,i.onPrevClick,i),i.btnNext=new a.default(i,"btn_down"),i.btnNext.on(a.default.EVENT_CLICK,i.onNextClick,i),i.thumb=new u.default(i,"thumb"),i.thumb.on(u.default.EVENT_DRAG,i._onThumbDrag,i),i._trackStart=0,i._trackLength=100,i._thumbClip=null,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),i(e,null,[{key:"EVENT_CHANGE",get:function(){return"event_change"}}]),i(e,[{key:"setValueBounds",value:function(t,e,n){this._minValue=t,this._maxValue=e,void 0!==n?(this._valueStep=n,this._buttonStep<n&&(this._buttonStep=n)):this._valueStep=0}},{key:"setButtonStep",value:function(t){this._buttonStep=t}},{key:"onClipAppend",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipAppend",this).call(this,t),this._updateClips()}},{key:"_updateClips",value:function(){if(this._clip){this._thumbClip=this.thumb._clip;var t=this._clip.getChildClip("DIMENSIONS");t&&(this._trackStart=this._vertical?t.y:t.x,this._trackLength=this._vertical?t.height:t.width,this._thumbClip&&this.thumb.setDragBounds(this._vertical?this._thumbClip.x:t.x,this._vertical?t.y:this._thumbClip.y,this._vertical?this._thumbClip.x:t.x+t.width,this._vertical?t.y+t.height:this._thumbClip.y));var e=this._clip.getChildClip("HIT_ZONE");e&&e.on("pointerdown",this._onZoneDown,this),this._updateThumbFromValue()}}},{key:"onClipProcess",value:function(){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipProcess",this).call(this),this.thumb&&this._updateClips()}},{key:"onPrevClick",value:function(){l.default.check(this.lockId)&&(this.value-=this._buttonStep)}},{key:"onNextClick",value:function(){l.default.check(this.lockId)&&(this.value+=this._buttonStep)}},{key:"_updateThumbFromValue",value:function(){if(this._thumbClip){var t=Math.round(this._trackStart+this._trackLength*this._value);this._vertical?this._thumbClip.y=t:this._thumbClip.x=t,this.emit("event_change",this.value)}}},{key:"_onThumbDrag",value:function(t,e){if(0!==this._trackLength&&l.default.check(this.lockId)){var n=((this._vertical?e:t)-this._trackStart)/this._trackLength*(this._maxValue-this._minValue);0!==this._valueStep&&(n=Math.round(n/this._valueStep)*this._valueStep),this.value=n+this._minValue}}},{key:"_onZoneDown",value:function(){}},{key:"value",get:function(){var t=this._value*(this._maxValue-this._minValue);return 0===this._valueStep?t+this._minValue:(t=Math.round(t/this._valueStep)*this._valueStep)+this._minValue},set:function(t){var e=(t-this._minValue)/(this._maxValue-this._minValue);e<0&&(e=0),e>1&&(e=1),e!==this._value&&(this._value=e,this._updateThumbFromValue())}}]),e}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(0)),o=a(n(4));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i._rendererClass=r,i._items=[],i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),r(e,null,[{key:"EVENT_ITEM_CHANGE",get:function(){return"event_change"}}]),r(e,[{key:"clean",value:function(){for(;0!==this._items.length;){this._items.pop().destroy(!0)}}},{key:"_updateData",value:function(){var t=this;o.default.each(this._data,function(e,n){t._getRenderer(n).data=e},this),this.doState()}},{key:"_getRenderer",value:function(t){if(this._items.length-1<t){var n=new this._rendererClass(this,"item_"+t);this._items[t]=n,n.on(e.EVENT_ITEM_CHANGE,this.onItemChange,this)}return this._items[t]}},{key:"getStateId",value:function(){return"count_"+(this._data?this._data.length:"0")}},{key:"destroy",value:function(){this.clean(),function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"onItemChange",value:function(t){this.emit(e.EVENT_ITEM_CHANGE,t)}},{key:"data",get:function(){return this._data},set:function(t){this._data=t,this._updateData()}}]),e}();e.default=u},function(t,e,n){t.exports=n(11)},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var r=u(n(5)),i=u(n(13)),o=u(n(19)),a=u(n(1));function u(t){return t&&t.__esModule?t:{default:t}}var l={ComponentClip:r.default,UIComponents:i.default,Plugin:o.default,UIManager:a.default};e.default=l,t.PhaserComps=l}).call(this,n(12))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=_(n(3)),i=_(n(14)),o=_(n(0)),a=_(n(6)),u=_(n(7)),l=_(n(8)),s=_(n(15)),c=_(n(16)),f=_(n(17)),p=_(n(9)),h=_(n(18));function _(t){return t&&t.__esModule?t:{default:t}}var y={UIComponentPrototype:o.default,UIButton:r.default,UIButtonSelect:a.default,UIButtonRadio:i.default,UIButtonDraggable:u.default,UIScrollBar:l.default,UIScrollPanel:s.default,UIProgressBar:c.default,UIContainer:f.default,UIList:p.default,UIListBaseItem:h.default};e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(6),a=(r=o)&&r.__esModule?r:{default:r};var u=function(t){function e(t,n,r,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,r));return a._sibling=a,a._value=i,void 0!==o&&a.appendToRadio(o),a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),i(e,null,[{key:"EVENT_SELECT",get:function(){return"event_select"}}]),i(e,[{key:"appendToRadio",value:function(t){this._sibling!==this&&this.removeFromSibling(),this._sibling=t._sibling,t._sibling=this}},{key:"removeFromSibling",value:function(){}},{key:"_onClick",value:function(){this.select=!0}},{key:"_broadcastSelect",value:function(){this.emit("event_select",this.value);for(var t=this._sibling;t!==this;)t.emit("event_select",this._value),t=t._sibling}},{key:"select",get:function(){return function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"select",this)},set:function(t){if(this._select!==t&&(function t(e,n,r,i){var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var a=Object.getPrototypeOf(e);null!==a&&t(a,n,r,i)}else if("value"in o&&o.writable)o.value=r;else{var u=o.set;void 0!==u&&u.call(i,r)}return r}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"select",t,this),t)){for(var n=this._sibling;n!==this;)n.select=!1,n=n._sibling;this._broadcastSelect()}}},{key:"value",get:function(){return this._value},set:function(t){this._value=t}},{key:"valueSelected",get:function(){if(this.select)return this.value;for(var t=this._sibling;t!==this;){if(t.select)return t.value;t=t._sibling}return null},set:function(t){if(this.value!==t){for(var e=this._sibling;e!==this;)if(e.value===t)return void(e.select=!0)}else this.select=!0}}]),e}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(0)),o=a(n(8));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(e,n,r,a,u){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._container=e,e.on(i.default.EVENT_STATE,this._onContainerUpdate,this),this._panelKey=n,this._dimensionsKey=a,this._scrollBar=new o.default(e,r,u),this._scrollBar.on(o.default.EVENT_CHANGE,this._onScrollBar,this),this._vertical=u||!1}return r(t,[{key:"_onContainerUpdate",value:function(){var t=this._container._clip;if(t){this._panel=t.getChildClip(this._panelKey);var e=t.getChildClip(this._dimensionsKey);this._panel&&e&&(this._scrollBounds={x:e.x,y:e.y,len:this._vertical?this._panel.height-e.height:this._panel.width-e.width},this._onScrollBar(this._onScrollBar.value))}}},{key:"_onScrollBar",value:function(t){this._panel&&this._scrollBounds&&(this._vertical?this._panel.y=this._scrollBounds.y-this._scrollBounds.len*t:this._panel.x=this._scrollBounds.x-this._scrollBounds.len*t)}}]),t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(0)),o=a(n(4));function a(t){return t&&t.__esModule?t:{default:t}}var u=/progress_(\d+)$/,l=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r._value=0,r._steps=[],r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),r(e,[{key:"onClipAppend",value:function(t){(function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipAppend",this).call(this,t),this._makeSteps(t),this._applyValue()}},{key:"_applyValue",value:function(){if(this._clip){var t=void 0,e=void 0,n=void 0,r=void 0,i=void 0,o=void 0,a=this._steps.length;for(t=0;t<a-1;t++){var u=this._steps[t],l=this._steps[t+1];if(u.stepValue===this._value){i=u.config;break}if(l.stepValue===this._value){i=l.config;break}if(this._value>u.stepValue&&this._value<l.stepValue){e=u.config,n=l.config,r=(this._value-u.stepValue)/(l.stepValue-u.stepValue);break}}if(!i)for(o in i={},e)if(n.hasOwnProperty(o)){var s=e[o],c=n[o];i[o]={x:s.x+(c.x-s.x)*r,y:s.y+(c.y-s.y)*r,scaleX:s.scaleX+(c.scaleX-s.scaleX)*r,scaleY:s.scaleY+(c.scaleY-s.scaleY)*r,angle:s.angle+(c.angle-s.angle)*r,alpha:s.alpha+(c.alpha-s.alpha)*r}}for(o in i)this._clip.applyChildParams(o,i[o])}}},{key:"_makeSteps",value:function(t){var n=t.getStateIds();this._steps=[];var r=!0,i=!1,a=void 0;try{for(var l,s=n[Symbol.iterator]();!(r=(l=s.next()).done);r=!0){var c=l.value;if(u.test(c)){var f={},p={stepValue:parseInt(u.exec(c)[1])/100,config:f},h=t.getStateConfig(c);for(var _ in h)f[_]=e._makeFullConfig(h[_]);this._steps.push(p)}}}catch(t){i=!0,a=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}o.default.sortBy(this._steps,"stepValue")}},{key:"value",get:function(){return this._value},set:function(t){this._value=t,this._applyValue()}}],[{key:"_makeFullConfig",value:function(t){return{x:t.hasOwnProperty("x")?t.x:0,y:t.hasOwnProperty("y")?t.y:0,scaleX:t.hasOwnProperty("scaleX")?t.scaleX:1,scaleY:t.hasOwnProperty("scaleY")?t.scaleY:1,angle:t.hasOwnProperty("angle")?t.angle:0,alpha:t.hasOwnProperty("alpha")?t.alpha:1}}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},a=n(0),u=(r=a)&&r.__esModule?r:{default:r};n(2);var l=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r._children=[],r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,u.default),i(e,[{key:"addChild",value:function(t){return-1!==this._children.indexOf(t)?t:(this._children.push(t),this._clip?(t._clip.visible=!0,this._addUIComponentToContainerClip(t)):t._clip.visible=!1,t)}},{key:"removeChild",value:function(t){var e=this._children.indexOf(t);return-1===e?t:(this._children.splice(e,1),this._clip&&this._removeUIComponentFromContainerClip(t),t)}},{key:"_addUIComponentToContainerClip",value:function(t){this._clip.add(t._clip),t._clip.visible=!0}},{key:"_removeUIComponentFromContainerClip",value:function(t,e){this._clip.remove(t._clip,e),t._clip.visible=!1}},{key:"onClipAppend",value:function(t){if(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipAppend",this).call(this,t),t){var n=!0,r=!1,i=void 0;try{for(var a,u=this._children[Symbol.iterator]();!(n=(a=u.next()).done);n=!0){var l=a.value;this._addUIComponentToContainerClip(l)}}catch(t){r=!0,i=t}finally{try{!n&&u.return&&u.return()}finally{if(r)throw i}}}}},{key:"onClipRemove",value:function(t){if(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"onClipRemove",this).call(this,t),t){var n=!0,r=!1,i=void 0;try{for(var a,u=this._children[Symbol.iterator]();!(n=(a=u.next()).done);n=!0){var l=a.value;this._removeUIComponentFromContainerClip(l)}}catch(t){r=!0,i=t}finally{try{!n&&u.return&&u.return()}finally{if(r)throw i}}}}},{key:"destroy",value:function(){var t=!0,n=!1,r=void 0;try{for(var i,a=this._children[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var u=i.value;this._clip&&this._removeUIComponentFromContainerClip(u),u.destroy()}}catch(t){n=!0,r=t}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}this._children.length=0,o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destroy",this).call(this)}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(0)),o=a(n(9));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r._data=null,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),r(e,[{key:"notifyChange",value:function(){this.emit(o.default.EVENT_ITEM_CHANGE,this)}},{key:"_commitData",value:function(){}},{key:"data",get:function(){return this._data},set:function(t){this._data=t,this._commitData()}}]),e}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();n(2);var i,o=n(5),a=(i=o)&&i.__esModule?i:{default:i};var u=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return t.registerGameObject("ui_component",n.addComponent,n.makeComponent),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Phaser.Plugins.BasePlugin),r(e,[{key:"addComponent",value:function(t,e){var n=new a.default(this.scene,t,e);return this.scene.add.existing(n),n}},{key:"makeComponent",value:function(t,e){return new a.default(this.scene,t,e)}}]),e}();e.default=u;var l={key:"UIComponents",plugin:u,start:!0};u.DefaultCfg=l}])}); |
{ | ||
"name": "phaser-ui-comps", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Phaser 3 UI Components Framework and JSFL builder for Adobe Animate", | ||
@@ -5,0 +5,0 @@ "main": "src/phasercomps.js", |
@@ -56,3 +56,3 @@ Phaser 3 UI Components, built by Adobe Animate | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/phaser-ui-comps@1.0.3/dist/phaser-ui-comps-with-underscore.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/phaser-ui-comps@1.0.5/dist/phaser-ui-comps-with-underscore.min.js"></script> | ||
``` | ||
@@ -59,0 +59,0 @@ |
@@ -195,5 +195,5 @@ import Phaser from "phaser"; | ||
destroy(fromScene) { | ||
_.each(this.childComponentClips, child => { | ||
for (let child of this.childComponentClips) { | ||
child.destroy(fromScene); | ||
}, this); | ||
} | ||
super.destroy(fromScene) | ||
@@ -212,3 +212,3 @@ } | ||
_createImagesMap(textures) { | ||
_.each(textures, (textureName) => { | ||
for (let textureName of textures) { | ||
const texture = this.scene.textures.get(textureName); | ||
@@ -219,6 +219,6 @@ if (!texture) { | ||
const frames = texture.getFrameNames(); | ||
_.each(frames, (frameName) => { | ||
for (let frameName of frames) { | ||
this.imageFramesMap[frameName] = textureName; | ||
}, this); | ||
}, this); | ||
} | ||
} | ||
} | ||
@@ -236,5 +236,5 @@ | ||
if (this._config.hasOwnProperty("children")) { | ||
_.each(this._config.children, (childConfig) => { | ||
for (let childConfig of this._config.children) { | ||
this._createChildFromConfig(childConfig); | ||
}, this); | ||
} | ||
} | ||
@@ -270,6 +270,6 @@ } | ||
let mask = child.createGeometryMask(); | ||
_.each(config.masking, (maskedChildId) => { | ||
for (let maskedChildId of config.masking) { | ||
let maskedChild = this._childrenById[maskedChildId]; | ||
maskedChild.setMask(mask); | ||
}, this); | ||
} | ||
addAsChild = false; | ||
@@ -607,13 +607,12 @@ } | ||
let idsToHide = _.difference(this._dynamicChildrenIds, idsToShow); | ||
_.each(idsToHide, (id) => { | ||
let id; | ||
for (id of idsToHide) { | ||
this._components[id].visible = false; | ||
}, this); | ||
_.each(idsToShow, (id) => { | ||
} | ||
for (id of idsToShow) { | ||
let component = this._components[id]; | ||
component.visible = true; | ||
ComponentClip._setupCommonParams(component, this._currentState.config[id]); | ||
}, this); | ||
} | ||
} | ||
} |
@@ -5,3 +5,2 @@ import UIComponentPrototype from "./UIComponentPrototype"; | ||
const HIT_ZONE = "HIT_ZONE"; | ||
const LABEL = "label"; | ||
@@ -109,6 +108,6 @@ | ||
zone.disableInteractive(); | ||
zone.removeListener("pointerdown", this._onPointerDown, this); | ||
zone.removeListener("pointerup", this._onPointerUp, this); | ||
zone.removeListener("pointerover", this._onPointerOver, this); | ||
zone.removeListener("pointerout", this._onPointerOut, this); | ||
zone.removeListener(Phaser.Input.Events.GAMEOBJECT_POINTER_DOWN, this._onPointerDown, this); | ||
zone.removeListener(Phaser.Input.Events.GAMEOBJECT_POINTER_UP, this._onPointerUp, this); | ||
zone.removeListener(Phaser.Input.Events.GAMEOBJECT_POINTER_OVER, this._onPointerOver, this); | ||
zone.removeListener(Phaser.Input.Events.GAMEOBJECT_POINTER_OUT, this._onPointerOut, this); | ||
} | ||
@@ -192,5 +191,6 @@ | ||
*/ | ||
_onPointerDown() { | ||
_onPointerDown(pointer, localX, localY, event) { | ||
this._isPressed = true; | ||
this.doState(); | ||
event.stopPropagation(); | ||
} | ||
@@ -202,3 +202,3 @@ | ||
*/ | ||
_onPointerUp() { | ||
_onPointerUp(pointer, localX, localY, event) { | ||
let isClicked = this._isPressed && this._isOver; | ||
@@ -208,2 +208,3 @@ this._isPressed = false; | ||
if (isClicked) { | ||
event.stopPropagation(); | ||
if (UIManager.check(this.lockId)) { | ||
@@ -220,3 +221,3 @@ this._onClick(); | ||
*/ | ||
destroy() { | ||
destroy(fromScene) { | ||
if (this._clip) { | ||
@@ -228,4 +229,4 @@ let zone = this._clip.getChildClip(HIT_ZONE); | ||
} | ||
super.destroy(); | ||
super.destroy(fromScene); | ||
} | ||
} |
import UIComponentPrototype from "./UIComponentPrototype"; | ||
import 'phaser'; | ||
import _ from 'underscore'; | ||
@@ -102,5 +101,5 @@ /** | ||
if (clip) { | ||
_.each(this._children, child => { | ||
for (let child of this._children) { | ||
this._addUIComponentToContainerClip(child); | ||
}, this); | ||
} | ||
} | ||
@@ -113,5 +112,5 @@ } | ||
if (clip) { | ||
_.each(this._children, child => { | ||
for (let child of this._children) { | ||
this._removeUIComponentFromContainerClip(child); | ||
}, this); | ||
} | ||
} | ||
@@ -122,3 +121,3 @@ } | ||
// remove and destroy children | ||
_.each(this._children, child => { | ||
for (let child of this._children) { | ||
if (this._clip) { // TODO check if needed | ||
@@ -128,3 +127,3 @@ this._removeUIComponentFromContainerClip(child); | ||
child.destroy(); | ||
}, this); | ||
} | ||
this._children.length = 0; | ||
@@ -131,0 +130,0 @@ super.destroy(); |
@@ -134,5 +134,5 @@ import UIComponentPrototype from "./UIComponentPrototype"; | ||
this._steps = []; | ||
_.each(stateIds, (stateId) => { | ||
for (let stateId of stateIds) { | ||
if (!PROGRESS_STATE_REGEX.test(stateId)) { | ||
return; | ||
continue; | ||
} | ||
@@ -150,3 +150,3 @@ | ||
this._steps.push(stepObject); | ||
}, this); | ||
} | ||
_.sortBy(this._steps, "stepValue"); | ||
@@ -153,0 +153,0 @@ } |
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
192235
2330