Path: blob/main/projects/push-your-luck/js/pushyourluck.js
1834 views
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Game",[],e):"object"==typeof exports?exports.Game=e():t.Game=e()}(window,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=83)}([function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[i]}})}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),r=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||e.hasOwnProperty(i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(i(51),e),r(i(88),e),r(i(89),e),r(i(90),e),r(i(91),e),r(i(92),e),r(i(52),e),r(i(93),e),r(i(94),e),r(i(95),e)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Config=void 0;var n=function(){function t(){}return t.GAME_WIDTH=1280,t.GAME_HEIGHT=800,t.SAVE_KEY="pushyourluck_save",t.FIRE_SPONSOR_EVENTS=!0,t.DEBUG_ON=!1,t.DEBUG_FIXED_RESOLUTION=!0,t.WIN_SCORE=100,t.TIE_WIN_SCORE_STEP=30,t.PLAYERS_MAX=8,t.ODDS_CYCLE_DURATION=750,t.TICKER_SPEED=300,t.TICKER_WHEN_PLAYER_OUT_GAME=!0,t.NUMBERS_MAX=13,t.SPINNER_NUMBERS_ORDER=[1,9,4,11,6,8,2,13,5,10,3,7,12],t.SPINNER_NUMBERS_RARE_MIN=5,t.SPINNER_DURATION_MIN=5e3,t.SPINNER_DURATION_MAX=7e3,t.SPINNER_ANGLE_MIN=3,t.SPINNER_ANGLE_MAX=4,t.REVEAL_PLAYERS_DURATION=1e3,t.REVEAL_SORT_DELAY=1200,t.SORT_MOVEMENT_DELAY=500,t.SORT_MOVEMENT_TIME=500,t.IN_PLAY_OFFSET=20,t.IN_PLAY_OFFSET_DURATION=400,t.IN_PLAY_OFFSET_DELAY=750,t.INACTIVE_PLAYER_ALPHA=.3,t.PLAYERS_WIPEOUT_COUNT=3,t.WIPEOUT_ANIM_LOOPS_MIN=2,t.BOTS_PLAYING_MULTIPLIER=4,t.USE_ROUND_NUMS=!0,t.USE_TIE_ROUND_NUMS=!0,t.SCORE_PARTICLES_LOCAL_SPACE=!0,t.SCORE_PARTICLES_WORLD_SPACE_DURATION=.75,t.SCORE_PARTICLES_LOCAL_SPACE_DURATION=2.25,t.WHEEL_X_OFFSET=135,t.WHEEL_Y_OFFSET=-14,t.TICKER_X_OFFSET=t.WHEEL_X_OFFSET,t.TICKER_Y_OFFSET=42,t.CHOICE_BUTTONS_X_OFFSET=t.WHEEL_X_OFFSET,t.CHOICE_BUTTONS_Y_OFFSET=71,t.TITLE_BUTTONS_X_OFFSET=t.WHEEL_X_OFFSET,t.TITLE_BUTTONS_Y_OFFSET=71,t.MUSIC_VOLUME_SPIN=.24,t.MUSIC_VOLUME_CHOOSE=.24,t.MUSIC_VOLUME_TITLE=.24,t.VOLUME_BUSTED=1,t.VOLUME_CORRECT=1,t.VOLUME_GAME_END_ENDSCREEN_REVEAL=1,t.VOLUME_GAME_END_RATING_GOES_DOWN=1,t.VOLUME_GAME_END_RATING_GOES_UP=1,t.VOLUME_NUMBER_ARRIVES_AT_WHEEL_CENTER=1,t.VOLUME_NUMBER_LEAVES_WHEEL=1,t.VOLUME_NUMBER_MOVES_FROM_CENTER_TO_BANK=1,t.VOLUME_PLAYER_BANKS=1,t.VOLUME_PLAYER_FREE_SPIN=1,t.VOLUME_PLAYER_GUESS_HIGHER=1,t.VOLUME_PLAYER_GUESS_LOWER=1,t.VOLUME_PUSH_YOUR_LUCK_INTRO_CHEERS=1,t.VOLUME_PUSH_YOUR_LUCK_INTRO_DING=1,t.VOLUME_RAN_THE_WHEEL=1,t.VOLUME_RESULTS_SCREEN_DING=1,t.VOLUME_ROUND_END_TRANSITION=1,t.VOLUME_ROUND_START_TRANSITION=1,t.VOLUME_WHEELTICK=1,t.VOLUME_WIPEOUT=1,t.VOLUME_YOU_WIN=1,t.VOLUME_FINAL_ROUND_START=1,t.SKILL_SCORE_HISTORY_LENGTH=10,t}();e.Config=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Defs=void 0;var n=i(19),r=function(){function t(){}return t.COLOR_BG=921905,t.COLOR_BG_RED=3149085,t.COLOR_TEXT_TICKER=7171051,t.COLOR_LOWER=16763433,t.COLOR_HIGHER=10116351,t.COLOR_LANDED=3785539,t.COLOR_OUT_OF_GAME=4210752,t.TEXT_COLORS=[2599406,15717688,8814070,13300844],t.ANIM_PULSE_FRAMES=["frame_shine0001","frame_shine0002","frame_shine0003","frame_shine0004","frame_shine0005","frame_shine0006","frame_shine0007","frame_shine0008","frame_shine0009","frame_shine0010","frame_shine0011","frame_shine0012","frame_shine0013","frame_shine0014","frame_shine0015","frame_shine0016","frame_shine0017","frame_shine0018","frame_shine0019","frame_shine0020","frame_shine0021","frame_shine0022","frame_shine0023","frame_shine0024","frame_shine0025"],t.SPRITER_ANIM_ROUNDS=null,t.SPRITER_ANIM_START_BUTTON=null,t.SPRITER_ANIM_POOF=null,t.INTER_GAME_START=[{attachTo:"point_left",font:"SlantBig",size:72,textId:"INTER_GAME_START_1",offsetX:0,offsetY:-45},{attachTo:"point_right",font:"SlantBig",size:72,textId:"INTER_GAME_START_20",offsetX:-364,offsetY:45,align:"left"}],t.INTER_GAME_START_TEXT_IDS=["INTER_GAME_START_20","INTER_GAME_START_21","INTER_GAME_START_22","INTER_GAME_START_23"],t.INTER_NEW_ROUND=[{attachTo:"point_left",font:"SlantBig",size:72,textId:"INTER_NEW_ROUND",offsetX:0,offsetY:0}],t.INTER_NEW_ROUND_NUMS=[{attachTo:"point_left",font:"SlantBig",size:72,textId:"INTER_NEW_ROUND_NUM",offsetX:0,offsetY:0,parameters:[0]}],t.INTER_TIE_ROUND=[{attachTo:"point_left",font:"SlantBig",size:72,textId:"INTER_TIE_ROUND",offsetX:0,offsetY:-45},{attachTo:"point_right",font:"SlantSmall",size:50,textId:"INTER_TIE_ROUND_NEW_SCORE",offsetX:0,offsetY:50,parameters:[0]}],t.INTER_TIE_ROUND_NUMS=[{attachTo:"point_left",font:"SlantBig",size:72,textId:"INTER_TIE_ROUND_NUM",offsetX:0,offsetY:-45,parameters:[0]},{attachTo:"point_right",font:"SlantSmall",size:50,textId:"INTER_TIE_ROUND_NEW_SCORE",offsetX:0,offsetY:50,parameters:[0]}],t.INTER_WIPEOUT=[{attachTo:"point_left",font:"SlantBig",size:72,textId:"INTER_WIPEOUT",offsetX:0,offsetY:0}],t.INTER_BUSTED=[{attachTo:"point_left",font:"SlantBig",size:72,textId:"INTER_BUSTED_YOU",offsetX:0,offsetY:-45},{attachTo:"point_right",font:"SlantBig",size:72,textId:"INTER_BUSTED_BUSTED",offsetX:0,offsetY:50}],t.INTER_UNLUCKY=[{attachTo:"point_left",font:"SlantBig",size:72,textId:"INTER_UNLUCKY",offsetX:0,offsetY:0}],t.INTER_ROUND_END_PLACE_IDS=["PLACE_LONG_1ST","PLACE_LONG_2ND","PLACE_LONG_3RD","PLACE_LONG_4TH","PLACE_LONG_5TH","PLACE_LONG_6TH","PLACE_LONG_7TH","PLACE_LONG_8TH"],t.INTER_ROUND_END=[{attachTo:"point_left",font:"SlantBig",size:72,textId:"INTER_ROUND_OVER",offsetX:0,offsetY:-45},{attachTo:"point_right",font:"SlantSmall",size:36,textId:null,offsetX:0,offsetY:35}],t.INTER_GAME_END=[{attachTo:"point_left",font:"SlantBig",size:72,textId:"INTER_GAME_OVER_1",offsetX:0,offsetY:-45},{attachTo:"point_right",font:"SlantBig",size:90,textId:"INTER_GAME_OVER_2",offsetX:0,offsetY:45}],t.INTER_GAME_END_YOU=[{attachTo:"point_left",font:"SlantBig",size:72,textId:"INTER_GAME_OVER_YOU_1",offsetX:0,offsetY:-45},{attachTo:"point_right",font:"SlantBig",size:90,textId:"INTER_GAME_OVER_YOU_2",offsetX:0,offsetY:45}],t.INTER_PERFECT_ROUND=[{attachTo:"point_left",font:"SlantBig",size:72,textId:"INTER_PERFECT_ROUND",offsetX:0,offsetY:0,parameters:[0]}],t.INTER_STRIKE_1=[{attachTo:"point_left",font:"SlantBig",size:72,textId:"INTER_ROUND_STRIKE_1",offsetX:0,offsetY:0}],t.INTER_STRIKE_2=[{attachTo:"point_left",font:"SlantBig",size:72,textId:"INTER_ROUND_STRIKE_2",offsetX:0,offsetY:0}],t.INTER_STRIKE_3=[{attachTo:"point_left",font:"SlantBig",size:72,textId:"INTER_ROUND_STRIKE_31",offsetX:0,offsetY:-40},{attachTo:"point_left",font:"SlantBig",size:72,textId:"INTER_ROUND_STRIKE_33",offsetX:0,offsetY:50},{attachTo:"point_left",font:"SlantBig",size:50,textId:"INTER_ROUND_STRIKE_32",offsetX:0,offsetY:0}],t.INTER_STRIKE_4=[{attachTo:"point_left",font:"SlantBig",size:72,textId:"INTER_ROUND_STRIKE_4",offsetX:0,offsetY:0}],t.INTER_STRIKE_5=[{attachTo:"point_left",font:"SlantBig",size:72,textId:"INTER_ROUND_STRIKE_5",offsetX:0,offsetY:0}],t.INTER_STRIKES=[t.INTER_STRIKE_1,t.INTER_STRIKE_2,t.INTER_STRIKE_3,t.INTER_STRIKE_4,t.INTER_STRIKE_5],t.INTER_LUCKY=[{attachTo:"point_left",font:"SlantBig",size:72,textId:"INTER_LUCKY",offsetX:0,offsetY:0}],t.PLACE_TEXTS_SHORT=["PLACE_SHORT_1ST","PLACE_SHORT_2ND","PLACE_SHORT_3RD","PLACE_SHORT_4TH","PLACE_SHORT_5TH","PLACE_SHORT_6TH","PLACE_SHORT_7TH","PLACE_SHORT_8TH"],t.PLACE_TEXTS_LONG=["PLACE_LONG_1ST","PLACE_LONG_2ND","PLACE_LONG_3RD","PLACE_LONG_4TH","PLACE_LONG_5TH","PLACE_LONG_6TH","PLACE_LONG_7TH","PLACE_LONG_8TH"],t.TICKER_YOU_WIN_IDS=["TXT_TICKER_WIN_PLAYER_1","TXT_TICKER_WIN_PLAYER_2","TXT_TICKER_WIN_PLAYER_3"],t.TICKER_IDLE_IDS=["TXT_TICKER_IDLE_0","TXT_TICKER_IDLE_1","TXT_TICKER_IDLE_2","TXT_TICKER_IDLE_3"],t.NUM_FRAMES_LOWER=["ny1","ny2","ny3","ny4","ny5","ny6","ny7","ny8","ny9","ny10","ny11","ny12","ny13"],t.NUM_FRAMES_HIGHER=["np1","np2","np3","np4","np5","np6","np7","np8","np9","np10","np11","np12","np13"],t.NUM_FRAMES_CENTER=["n1","n2","n3","n4","n5","n6","n7","n8","n9","n10","n11","n12","n13"],t.BULB_RED={frame:"bulb_wb",tint:14695550,lightFrame:"wheel_bulb_light_red",lightTint:16777215},t.BULB_GREEN={frame:"bulb_wb",tint:9174858,lightFrame:"wheel_bulb_light_green",lightTint:16777215},t.BULB_BLUE={frame:"bulb_wb",tint:10216959,lightFrame:"wheel_bulb_light_blue",lightTint:16777215},t.BULB_YELLOW={frame:"bulb_wb",tint:16776876,lightFrame:"wheel_bulb_light_yellow",lightTint:16777215},t.BULB_PURPLE={frame:"bulb_wb",tint:16165375,lightFrame:"wheel_bulb_light_purple",lightTint:16777215},t.BULB_WEDGE_YELLOW={frame:"bulb_wb",tint:16571518,lightFrame:"bulb_light_y",lightTint:16777215},t.BULB_WEDGE_PURPLE={frame:"bulb_wb",tint:12491263,lightFrame:"bulb_light_p",lightTint:16777215},t.INNER_BULBS=[t.BULB_BLUE,t.BULB_YELLOW,t.BULB_GREEN,t.BULB_BLUE,t.BULB_RED,t.BULB_YELLOW,t.BULB_RED,t.BULB_PURPLE,t.BULB_YELLOW,t.BULB_BLUE,t.BULB_BLUE,t.BULB_GREEN,t.BULB_YELLOW,t.BULB_RED,t.BULB_PURPLE,t.BULB_RED],t.OUTER_BULBS=[t.BULB_BLUE,t.BULB_YELLOW,t.BULB_GREEN,t.BULB_RED,t.BULB_RED,t.BULB_YELLOW,t.BULB_RED,t.BULB_GREEN,t.BULB_YELLOW,t.BULB_RED,t.BULB_BLUE,t.BULB_GREEN,t.BULB_YELLOW,t.BULB_GREEN,t.BULB_PURPLE,t.BULB_RED],t.RODS=[{angle:-9.5,frameOn:"wheel_lightbar_1_on",frameOff:"wheel_lightbar_1_off"},{angle:22,frameOn:"wheel_lightbar_2_on",frameOff:"wheel_lightbar_2_off"},{angle:47,frameOn:"wheel_lightbar_1_on",frameOff:"wheel_lightbar_1_off"},{angle:68,frameOn:"wheel_lightbar_2_on",frameOff:"wheel_lightbar_2_off"},{angle:83,frameOn:"wheel_lightbar_1_on",frameOff:"wheel_lightbar_1_off"},{angle:116,frameOn:"wheel_lightbar_1_on",frameOff:"wheel_lightbar_1_off"},{angle:142,frameOn:"wheel_lightbar_2_on",frameOff:"wheel_lightbar_2_off"},{angle:163,frameOn:"wheel_lightbar_1_on",frameOff:"wheel_lightbar_1_off"},{angle:-167,frameOn:"wheel_lightbar_1_on",frameOff:"wheel_lightbar_1_off"},{angle:-140,frameOn:"wheel_lightbar_1_on",frameOff:"wheel_lightbar_1_off"},{angle:-132,frameOn:"wheel_lightbar_2_on",frameOff:"wheel_lightbar_2_off"},{angle:-112,frameOn:"wheel_lightbar_1_on",frameOff:"wheel_lightbar_1_off"},{angle:-67,frameOn:"wheel_lightbar_2_on",frameOff:"wheel_lightbar_2_off"},{angle:-50,frameOn:"wheel_lightbar_1_on",frameOff:"wheel_lightbar_1_off"}],t.ROD_PURPLE={angle:0,frameOn:"wheel_lightbar_p_on",frameOff:"wheel_lightbar_p_off"},t.ROD_YELLOW={angle:0,frameOn:"wheel_lightbar_y_on",frameOff:"wheel_lightbar_y_off"},t.STATUS_FRAMES=[null,"frame_ico_higher","frame_ico_lower","frame_ico_bank","frame_ico_busted","frame_ico_pass"],t.STATUS_GLOW_FRAMES=[null,"frame_higher","frame_lower","frame_bank","frame_busted","frame_pass"],t.PLAYER_DEFS=[{id:1,name:"Reckless Rina",firstName:"Rina",iconFrame:"avatar1",aiProfile:{name:"random",riskLimit:.65,contrarian:.9,highOverLow:0}},{id:2,name:"Cautious Kristen",firstName:"Kristen",iconFrame:"avatar2",aiProfile:{name:"random",riskLimit:.25,contrarian:.2,highOverLow:0}},{id:3,name:"All-in Olga",firstName:"Olga",iconFrame:"avatar3",aiProfile:{name:"random",riskLimit:.6,contrarian:.2,highOverLow:.2}},{id:4,name:"Maverick Mike",firstName:"Mike",iconFrame:"avatar6",aiProfile:{name:"random",riskLimit:.65,contrarian:.8,highOverLow:.15}},{id:5,name:"Chill Jill",firstName:"Jill",iconFrame:"avatar11",aiProfile:{name:"random",riskLimit:.35,contrarian:.5,highOverLow:.1}},{id:6,name:"Rational Ralph",firstName:"Ralph",iconFrame:"avatar12",aiProfile:{name:"random",riskLimit:.5,contrarian:0,highOverLow:0}},{id:7,name:"Contrarian Carl",firstName:"Carl",iconFrame:"avatar7",aiProfile:{name:"careful",riskLimit:.4,contrarian:1,highOverLow:0}},{id:8,name:"Meek Megan",firstName:"Megan",iconFrame:"avatar4",aiProfile:{name:"careful",riskLimit:.3,contrarian:.2,highOverLow:0}},{id:9,name:"Big Spin Jim",firstName:"Jim",iconFrame:"avatar8",aiProfile:{name:"normal",riskLimit:.55,contrarian:.2,highOverLow:.5}},{id:10,name:"Probability Pedro",firstName:"Pedro",iconFrame:"avatar9",aiProfile:{name:"normal",riskLimit:.45,contrarian:0,highOverLow:0}},{id:11,name:"Risky Raven",firstName:"Raven",iconFrame:"avatar5",aiProfile:{name:"risky",riskLimit:.7,contrarian:.7,highOverLow:0}},{id:12,name:"Aggressive Alex",firstName:"Alex",iconFrame:"avatar10",aiProfile:{name:"risky",riskLimit:.6,contrarian:.7,highOverLow:.25}}],t.PLAYER_YOU_DEF={id:0,name:"YOU",firstName:"YOU",iconFrame:"avatar_you",aiProfile:null},t.BUTTON_SCALE_ON_DOWN=.9,t.SPINNER_CURVE={type:n.eCurveType.HERMITE,keys:[{x:.00291,y:-2e-5,slope:-.06254},{x:.25767,y:-.005,slope:.01687},{x:.50352,y:.01774,slope:.18975},{x:1.29821,y:.45817,slope:.58055},{x:1.67636,y:.63933,slope:.3703},{x:4.4,y:1,slope:0}]},t.HEARBEAT_CURVE={type:n.eCurveType.HERMITE,keys:[{x:0,y:0,slope:{in:6.60726,out:6.60726}},{x:.2,y:1,slope:{in:.19754,out:.19754}},{x:.4,y:.5,slope:{in:-2.89369,out:3.56274}},{x:.6,y:1,slope:{in:6e-5,out:6e-5}},{x:.8,y:1,slope:{in:.00203,out:.00203}},{x:1,y:0,slope:{in:-5.6497,out:-5.6497}}]},t.FLASH_BUTTONS_CURVE={type:n.eCurveType.HERMITE,keys:[{x:0,y:0,slope:{in:0,out:0}},{x:2,y:0,slope:{in:0,out:2.54881}},{x:2.15,y:.2,slope:{in:0,out:0}},{x:2.3,y:0,slope:{in:-2.71968,out:2.67163}},{x:2.45,y:.2,slope:{in:0,out:0}},{x:2.6,y:0,slope:{in:-2.19385,out:-2.19385}}]},t}();e.Defs=r},function(t,e,i){"use strict";var n=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var i,n,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{i=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.App=void 0;var o=i(18),s=i(87),a=i(31),l=i(0),h=i(1),u=i(96),_=i(171),p=i(173),c=i(176),f=function(){function t(){}return Object.defineProperty(t,"sponsorID",{get:function(){return t._sponsor},enumerable:!1,configurable:!0}),Object.defineProperty(t,"sponsor",{get:function(){return a.Utils.api},enumerable:!1,configurable:!0}),Object.defineProperty(t,"game",{get:function(){return t._game},enumerable:!1,configurable:!0}),Object.defineProperty(t,"settings",{get:function(){return t._settings},enumerable:!1,configurable:!0}),t.launch=function(){return n(this,void 0,void 0,(function(){var e,i;return r(this,(function(n){switch(n.label){case 0:if(e=p.getSponsorFeatures(t._sponsor),i=!0,t._sponsor===o.eSponsorID.NONE)new s.SponsorNone(e);else{if(t._sponsor!==o.eSponsorID.COOLMATHGAMES)return[2];new c.SponsorCoolmathGamesSDK(e)}return[4,t.loadConfigs()];case 1:return n.sent(),i&&(t._game=new u.Game,a.Utils.api.game=t._game),[2]}}))}))},t.loadConfigs=function(){return n(this,void 0,void 0,(function(){var t,e;return r(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,l.ObjectUtils.loadJson("assets/config.json")];case 1:return t=i.sent(),l.ObjectUtils.loadValuesIntoObject(t,h.Config),[3,3];case 2:throw i.sent();case 3:if(!a.Utils.isFeatureOn("hasConfig"))return[3,7];i.label=4;case 4:return i.trys.push([4,6,,7]),[4,l.ObjectUtils.loadJson("assets/sponsor/"+a.Utils.features().name+".json")];case 5:return e=i.sent(),l.ObjectUtils.loadValuesIntoObject(e,h.Config),[3,7];case 6:throw i.sent();case 7:return[2]}}))}))},t._sponsor=o.eSponsorID.COOLMATHGAMES,t._game=null,t._settings=new _.Settings(h.Config.SAVE_KEY),t}();e.App=f,window.GameConfig=h.Config,window.onload=f.launch},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Item=void 0;var n=function(){function t(t,e){this._id=t,this._name=e}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),t}();e.Item=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GameStateEventType=void 0,function(t){t[t.Button=0]="Button",t[t.Spinner=1]="Spinner",t[t.AnimationFinished=2]="AnimationFinished",t[t.ChoicesRevealed=3]="ChoicesRevealed",t[t.ChoicesSorted=4]="ChoicesSorted",t[t.ChoiceUpdatedPlayer=5]="ChoiceUpdatedPlayer",t[t.CollectFinished=6]="CollectFinished",t[t.TutorialClosed=7]="TutorialClosed"}(e.GameStateEventType||(e.GameStateEventType={}))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MathHelp=void 0;var n=function(){function t(){}return t.angleLinear=function(t,e,i){return t<e?e-t>180&&(e-=360):t-e>180&&(t-=360),t+(e-t)*i},t.moveTowards=function(t,e,i){return Math.abs(e-t)<=i?e:t+Math.sign(e-t)*i},t.movePointTowards=function(t,e,i,n){void 0===n&&(n=new Phaser.Point);var r=(n=Phaser.Point.subtract(e,t,n)).getMagnitude();if(r<=i||0==r)return n.copyFrom(e),n;var o=i/r;return n.multiply(o,o),Phaser.Point.add(t,n,n)},t.modulo=function(t,e){return(t%e+e)%e},t.repeat=function(t,e){return t-Math.floor(t/e)*e},t.repeatNormalized=function(e,i){return t.repeat(e,i)/i},t.pingPong=function(e,i){return e=t.repeat(e,2*i),i-Math.abs(e-i)},t.pingPongNormalized=function(e,i){return t.pingPong(e,i)/i},t.inverseLinear=function(t,e,i){return Math.abs(e-t)<1e-5?0:Phaser.Math.clamp((i-t)/(e-t),0,1)},t}();e.MathHelp=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GameState=void 0;var n=function(){function t(t){this._playScene=null,this._playScene=t}return Object.defineProperty(t.prototype,"playerInGame",{get:function(){return this._playScene.playersManager.player.isInGame},enumerable:!1,configurable:!0}),t.prototype.onStateEnter=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.onStateExit=function(){},t.prototype.onEvent=function(t,e){},t.prototype.onStateUpdate=function(t){},t}();e.GameState=n},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[i]}})}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),r=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||e.hasOwnProperty(i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(i(53),e),r(i(33),e),r(i(54),e),r(i(55),e),r(i(21),e),r(i(101),e),r(i(102),e)},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.Baseline=e.eTimelineType=void 0;var o,s=i(4);!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.MAIN_LINE=1]="MAIN_LINE",t[t.TIME_LINE=2]="TIME_LINE",t[t.SOUND_LINE=3]="SOUND_LINE",t[t.EVENT_LINE=4]="EVENT_LINE",t[t.TAG_LINE=5]="TAG_LINE",t[t.VAR_LINE=6]="VAR_LINE"}(o=e.eTimelineType||(e.eTimelineType={}));var a=function(t){function e(e,i){void 0===i&&(i=null);var n=t.call(this,e,i)||this;return n._type=o.UNKNOWN,n}return r(e,t),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},set:function(t){this._type=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"keys",{get:function(){return this._keys},enumerable:!1,configurable:!0}),e.prototype.add=function(t){null!==this._keys&&void 0!==this._keys||(this._keys=[]),this._keys.push(t)},e.prototype.at=function(t,e){if(void 0===e&&(e=!0),t<0)return null;var i=this._keys.length;return t>=i&&(e?t%=i:t=i-1),this._keys[t]},e}(s.Item);e.Baseline=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Key=void 0;var n=function(){function t(t,e){this._id=t,this._time=e}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"time",{get:function(){return this._time},enumerable:!1,configurable:!0}),t}();e.Key=n},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.Button=void 0;var o=i(0),s=function(t){function e(e,i,n,r,o,s,a){var l=t.call(this,e)||this;l.onClick=new Phaser.Signal,l.onDown=new Phaser.Signal,l.scaleOnOver=new Phaser.Point(1,1),l.scaleOnDown=new Phaser.Point(1,1),l.offsetOnOver=new Phaser.Point(0,0),l.offsetOnDown=new Phaser.Point(0,0),l._tinted=!1,l._normalTint=65280,l._downTint=8421504,l._overTint=16777215,l._savePosition=new Phaser.Point,l._saveScale=new Phaser.Point,l._over=!1,l._down=!1,l.name=i;var h=new Phaser.Button(e,0,0,n);return l.add(h),l._button=h,void 0!==o&&o&&(l._tinted=!0),void 0===s&&(s="string"==typeof r?r+"Down":null,(l._tinted||s&&!e.cache.getFrameByName(n,s))&&(s=r)),void 0===a&&(a="string"==typeof r?r+"Over":null,(l._tinted||a&&!e.cache.getFrameByName(n,a))&&(a=r)),h.setFrames(a,r,s,r),h.anchor.setTo(.5,.5),h.name=i,h.onInputOver.add(l.overEvent,l),h.onInputOut.add(l.outEvent,l),h.onInputDown.add(l.downEvent,l),h.onInputUp.add(l.upEvent,l),l}return r(e,t),Object.defineProperty(e.prototype,"button",{get:function(){return this._button},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"anchor",{get:function(){return this._button.anchor},enumerable:!1,configurable:!0}),e.prototype.setEnabled=function(t){this._button.inputEnabled=t},e.prototype.setHitArea=function(t){this._button.hitArea=t},e.prototype.setTint=function(t,e,i){void 0===i&&(i=0),this._normalTint=t,this._downTint=e,this._overTint=i,this.applyTint(this._normalTint)},e.prototype.overEvent=function(t,e){this.setButton(!0,this._down),this.overAction()},e.prototype.outEvent=function(t,e){this.setButton(!1,!1),this.outAction()},e.prototype.downEvent=function(t,e){this.setButton(this._over,!0),this.downAction(),this.onDown.dispatch(this)},e.prototype.upEvent=function(t,e,i){this.setButton(this._over,!1),this.upAction(),i?this.onClick.dispatch(this):this.cancelAction()},e.prototype.setButton=function(t,e){this._over||this._down||(this._saveScale.copyFrom(this._button.scale),this._savePosition.copyFrom(this._button.position)),this._down=e,this._over=t,e?(Phaser.Point.multiply(this._saveScale,this.scaleOnDown,this._button.scale),Phaser.Point.add(this._savePosition,this.offsetOnDown,this._button.position),this._tinted&&this.applyTint(this._downTint)):t?(Phaser.Point.multiply(this._saveScale,this.scaleOnOver,this._button.scale),Phaser.Point.add(this._savePosition,this.offsetOnOver,this._button.position),this._tinted&&this.applyTint(this._overTint)):(this._button.scale.copyFrom(this._saveScale),this._button.position.copyFrom(this._savePosition),this._tinted&&this.applyTint(this._normalTint))},e.prototype.applyTint=function(t){this._button.tint=t;for(var e=0;e<this._button.children.length;e++)this._button.getChildAt(e).tint=t},e.prototype.overAction=function(){},e.prototype.outAction=function(){},e.prototype.downAction=function(){o.AudioUtils.playSound("click")},e.prototype.upAction=function(){},e.prototype.cancelAction=function(){},e.prototype.reset=function(){for(var t=this._button.input._pointerData,e=0;e<10;e++)t[e]={id:e,x:0,y:0,isDown:!1,isUp:!1,isOver:!1,isOut:!1,timeOver:0,timeOut:0,timeDown:0,timeUp:0,downDuration:0,isDragged:!1};this.setButton(!1,!1)},e}(Phaser.Group);e.Button=s},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ChoiceButton=void 0;var o=i(17),s=i(0),a=function(t){function e(i,n,r,o){var a=t.call(this,i,n,"Sprites","button_inactive")||this;a._flash=null,a._glow=null,a._textBg=null,a._textFg=null,a._defaultText=null,a._frameNormal=null,a._frameHit=null,a._frameInactive=null,a._frameNormal=r+"_off",a._frameHit=r+"_hit",a._frameInactive="button_inactive",a._flash=i.add.sprite(0,0,"Sprites","button_highlight",a),a._flash.anchor.set(.5),a._flash.alpha=.5,a._flash.visible=!1;var l=r+"_light";null!==i.cache.getFrameByName("Sprites",l)&&(a._glow=i.add.sprite(0,-39,"Sprites",l,a),a._glow.anchor.set(.5,0),a.sendToBack(a._glow)),a._defaultText=s.TextUtils.getText(o);var h=new Phaser.BitmapText(i,0,6,"FontButtonsBg",a._defaultText,e.FONT_SIZE,"center");return h.anchor.set(.5,.5),a._button.addChild(h),a._textBg=h,(h=new Phaser.BitmapText(i,0,-3,"FontButtonsGlow",a._defaultText,e.FONT_SIZE,"center")).anchor.set(.5,.5),a._button.addChild(h),a._textFg=h,a.offsetOnDown.set(0,5),a}return r(e,t),Object.defineProperty(e.prototype,"glowAlpha",{set:function(t){this._glow&&(this._glow.alpha=t)},enumerable:!1,configurable:!0}),e.prototype.overAction=function(){this.glowAlpha=e.GLOW_ALPHA_ENABLED},e.prototype.outAction=function(){this.glowAlpha=e.GLOW_ALPHA_DISABLED},e.prototype.downAction=function(){t.prototype.downAction.call(this),this.glowAlpha=e.GLOW_ALPHA_ENABLED},e.prototype.upAction=function(){this.glowAlpha=e.GLOW_ALPHA_DISABLED},e.prototype.enableInput=function(t){this._button.inputEnabled=t},e.prototype.setActive=function(t){t?(this._button.setFrames(this._frameHit,this._frameNormal,this._frameHit,this._frameNormal),this._textFg.visible=!0,this._textBg.y=6,this._textBg.tint=16777215,null!==this._glow&&(this._glow.visible=!0)):(this._button.setFrames(this._frameInactive,this._frameInactive,this._frameInactive,this._frameInactive),this._textFg.visible=!1,this._textBg.y=4,this._textBg.tint=4210752,null!==this._glow&&(this._glow.visible=!1))},e.prototype.setText=function(t){void 0===t&&(t=null),null===t&&(t=this._defaultText),this._textFg.text=t,this._textBg.text=t},e.prototype.flash=function(t){this._flash.visible=t},e.GLOW_ALPHA_ENABLED=1,e.GLOW_ALPHA_DISABLED=.5,e.FONT_SIZE=23,e}(o.Button);e.ChoiceButton=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Player=e.Face=e.PlayerStatus=void 0;var n,r,o=i(1);!function(t){t[t.Nothing=0]="Nothing",t[t.Higher=1]="Higher",t[t.Lower=2]="Lower",t[t.Collect=3]="Collect",t[t.Busted=4]="Busted",t[t.Passed=5]="Passed"}(n=e.PlayerStatus||(e.PlayerStatus={})),function(t){t[t.Normal=0]="Normal",t[t.Smile=1]="Smile",t[t.Angry=2]="Angry"}(r=e.Face||(e.Face={}));var s=function(){function t(t,e){this.onChange=new Phaser.Signal,this.onFace=new Phaser.Signal,this._def=null,this._name=null,this._iconFrame=null,this._iconFrame_smile=null,this._iconFrame_angry=null,this._isPlayer=!1,this._aiProfile=null,this._riskLimit=0,this._status=n.Nothing,this._score=0,this._order=0,this._place=0,this._choice=n.Nothing,this._justBusted=!1,this._justCorrect=!1,this._justCollect=!1,this._strike=0,this._passUsed=!1,this._active=!0,this._face=r.Normal,this._dbg="",this._isPlayer=e,this._def=t,this._name=t.name,this._iconFrame=t.iconFrame,this._iconFrame_smile=t.iconFrame+"_s",this._iconFrame_angry=t.iconFrame+"_a",this._aiProfile=t.aiProfile,e||(this._riskLimit=this._aiProfile.riskLimit)}return Object.defineProperty(t.prototype,"def",{get:function(){return this._def},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPlayer",{get:function(){return this._isPlayer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iconFrame",{get:function(){return this._iconFrame},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iconFrameSmile",{get:function(){return this._iconFrame_smile},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iconFrameAngry",{get:function(){return this._iconFrame_angry},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"score",{get:function(){return this._score},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"order",{get:function(){return this._order},set:function(t){this._order=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isInGame",{get:function(){return this._status!==n.Busted&&this._status!==n.Collect&&this._active},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"justBusted",{get:function(){return this._justBusted},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"justCorrect",{get:function(){return this._justCorrect},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"justCollect",{get:function(){return this._justCollect},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"strike",{get:function(){return this._strike},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"passUsed",{get:function(){return this._passUsed},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"place",{get:function(){return this._place},set:function(t){this._place=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dbg",{get:function(){return this._dbg},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this._active},set:function(t){this._active=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"face",{get:function(){return this._face},set:function(t){this._face=t},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this.setStatusAndDispatch(n.Nothing),this._strike=0,o.Config.DEBUG_ON&&!this._isPlayer&&(this._dbg=this.basicDebugSetup())},t.prototype.resetFace=function(){this._face=r.Normal,this.onFace.dispatch(this)},t.prototype.resetJustCollect=function(){this._justCollect=!1},t.prototype.setStatusAndDispatch=function(t){this._status=t,this.onChange.dispatch(this)},t.prototype.basicDebugSetup=function(){return"AI profile: "+this._aiProfile.name+", base risk limit: "+Math.round(100*this._riskLimit)+"%\n"},t.prototype.recalcRiskToPercent=function(t){return 1-2*(t-.5)*1},t.prototype.makeChoice=function(t,e,i){var r=this._riskLimit;if(o.Config.DEBUG_ON&&(this._dbg=this.basicDebugSetup()),!this.isInGame)return this._choice=n.Nothing,void(o.Config.DEBUG_ON&&(this._dbg+="Player out of game\n=> "+n[this._choice]));var s=e.bank,a=!1,l=i.players[0],h=l!==this&&t.tie&&l.score>=t.winScore&&this.score+s<l.score;if(this._score+s>=t.winScore&&(a=!0,1===i.getPosition(this._score+s)&&1===i.playersInGameCount))return this._choice=n.Collect,void(o.Config.DEBUG_ON&&(this._dbg+="Player will collect and became 1\n=> "+n[this._choice]));var u=Math.random()<0;if(e.landedNumberLowest)return this._choice=u?n.Lower:n.Higher,void(o.Config.DEBUG_ON&&(this._dbg+="All numbers higher\n=> "+n[this._choice]));if(e.landedNumberHighest)return this._choice=u?n.Higher:n.Lower,void(o.Config.DEBUG_ON&&(this._dbg+="All numbers lower\n=> "+n[this._choice]));var _=r,p=e.probabilityOfLowerThanLanded,c=1-p,f=c>p,d=this.recalcRiskToPercent(Math.max(p,c));a&&(d*=1.5);var g=.03*(i.getAveragePosition(this.score)-1),y=-.04*(i.getPosition(this.score)-i.getPosition(this.score+s)),m=s<=9?.4:.3*-Math.log10(Math.max(1,s-12+1))+.2;if(_+=g+y+m,o.Config.DEBUG_ON){var v=Math.round(100*d),T=Math.round(100*r),b=Math.round(100*g),S=Math.round(100*y),O=Math.round(100*m);this._dbg+="Current wheel risk: "+v+"%\n",this._dbg+="Current risk limit: "+(T+b+S+O)+"% = ",this._dbg+=T+"% (base) + "+b+"% (position) + "+S+"% (bank position) + "+O+"% (bank value)\n",this._dbg+="Risk "+(d>_?"NOT acceptable":"acceptable")+" ... "}if(d>_&&!this._passUsed&&(a||h))this._choice=n.Passed,o.Config.DEBUG_ON&&(this._dbg+="but can increase win score by passing!\n");else if(d>_&&Math.random()>(r-.15)/2&&!h)!this._passUsed&&s>10&&25*Math.random()<s&&Math.random()<.6?(this._choice=n.Passed,o.Config.DEBUG_ON&&(this._dbg+="but bank worth of passing!\n")):(this._choice=n.Collect,o.Config.DEBUG_ON&&(this._dbg+="and will not try it!\n")),o.Config.DEBUG_ON&&(this._dbg+="Final choice => "+n[this._choice]);else{o.Config.DEBUG_ON&&(this._dbg+=d>_?"BUT, let's try it.":"let's try it.");var E=t.tie?1:this._aiProfile.contrarian;d>1-Math.abs(this._aiProfile.highOverLow)?(f=this._aiProfile.highOverLow>0,o.Config.DEBUG_ON&&(this._dbg+=" Low or High: I like "+(this._aiProfile.highOverLow>0?"high":"low")+" over "+(this._aiProfile.highOverLow>0?"low":"high")+" up to "+Math.round(100*Math.abs(this._aiProfile.highOverLow))+"% risk.")):Math.random()<E&&Math.random()<d/2&&(f=!f,o.Config.DEBUG_ON&&(this._dbg+=" Contrarian: up to "+Math.round(100*this._aiProfile.contrarian)+"% risk.")),o.Config.DEBUG_ON&&(this._dbg+="\n"),this._choice=f?n.Higher:n.Lower,o.Config.DEBUG_ON&&(this._dbg+="Final choice => "+n[this._choice])}},t.prototype.processChoice=function(t){if(this._justCollect=!1,this._choice!==n.Higher&&this._choice!==n.Lower&&(this._strike=0),this._choice!==n.Nothing){switch(this._choice){case n.Higher:this.higher();break;case n.Lower:this.lower();break;case n.Collect:this.collect(t.bank);break;case n.Passed:this.pass()}this._choice=n.Nothing}},t.prototype.updatePlayerItem=function(){this.onChange.dispatch(this)},t.prototype.higher=function(){this._status=n.Higher},t.prototype.lower=function(){this._status=n.Lower},t.prototype.collect=function(t){this._score+=t,this._status=n.Collect,this._justCollect=!0},t.prototype.pass=function(){this._status=n.Passed,this._passUsed=!0},t.prototype.resolveChoice=function(t){if(this._justBusted=this._justCorrect=!1,this._face=r.Normal,this._status===n.Lower||this._status===n.Higher){var e=t.isLandedNumberHigher;this._status===n.Higher&&e||this._status===n.Lower&&!e?(++this._strike,this._justCorrect=!0,this._status=n.Nothing,this._face=r.Smile):(this._justBusted=!0,this._status=n.Busted,this._face=r.Angry)}else this._status===n.Passed&&(this._status=n.Nothing)},t.prototype.toString=function(){return"Player: "+this._name+", AI: "+(this._aiProfile?this._aiProfile.name:"- player -")+", score: "+this._score+", status: "+n[this._status]},t}();e.Player=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Skill=void 0;var n=i(0),r=function(){function t(){}return t.getNextSkillLimit=function(e){for(var i=-1,n=t.SKILL_DEFS.length-1;n>=0;n--)t.SKILL_DEFS[n].limit>e&&(i=t.SKILL_DEFS[n].limit);return i},t.getCurrentSkillLimit=function(e){for(var i=0,n=0;n<t.SKILL_DEFS.length;n++)t.SKILL_DEFS[n].limit<e&&(i=t.SKILL_DEFS[n].limit);return i},t.getNameForScore=function(e){var i=t.SKILL_DEFS[t.getIndex(e)].textId;return n.TextUtils.getText(i)},t.getIconForScore=function(e){return t.SKILL_DEFS[t.getIndex(e)].icon},t.getIndex=function(e){for(var i=0,n=0;n<t.SKILL_DEFS.length;n++)e>=t.SKILL_DEFS[n].limit&&(i=n);return i},t.getSkillScoreChange=function(e,i,n){if(++e<1||e>t.SKILL_FOR_PLACE.length)return 0;if(i<1)return 0;var r=t.getPlaceSkill(e,i),o=Math.ceil((r-n)/15);return n+o<0&&(o=-n),o},t.getPlaceSkill=function(e,i){for(var n=0,r=e-1;r<e-1+i;r++)n+=t.SKILL_FOR_PLACE[r];return Math.round(n/i)},t.SKILL_DEFS=[{limit:0,textId:"SKILL_NAME_BRONZE",icon:"skill_ico_bronze"},{limit:400,textId:"SKILL_NAME_SILVER",icon:"skill_ico_silver"},{limit:600,textId:"SKILL_NAME_GOLD",icon:"skill_ico_gold"},{limit:800,textId:"SKILL_NAME_PLATINUM",icon:"skill_ico_plat"},{limit:1e3,textId:"SKILL_NAME_DIAMOND",icon:"skill_ico_diamond"}],t.SKILL_FOR_PLACE=[1400,1200,1e3,800,600,400,200,0],t}();e.Skill=r},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.SpriterFile=e.eImageNameType=e.eFileType=void 0,function(t){t[t.XML=0]="XML",t[t.JSON=1]="JSON",t[t.BIN=2]="BIN"}(e.eFileType||(e.eFileType={})),function(t){t[t.ORIGINAL=0]="ORIGINAL",t[t.NAME_ONLY=1]="NAME_ONLY",t[t.NAME_AND_EXTENSION=2]="NAME_AND_EXTENSION",t[t.FULL_PATH_NO_EXTENSION=3]="FULL_PATH_NO_EXTENSION"}(n=e.eImageNameType||(e.eImageNameType={}));var r=function(){function t(t){var e=null!=t;this._imageNameType=e&&void 0!==t.imageNameType?t.imageNameType:n.NAME_ONLY,this._minDefs=e&&void 0!==t.minDefs?t.minDefs:null}return t.prototype.processed=function(){this.popMinDefsStack()},t.prototype.setMinimized=function(t){this._minimized=t,!t||(this._minDefsStack=[],this._minDefs)},t.prototype.getFileName=function(t){var e;switch(this._imageNameType){case n.NAME_ONLY:e=t.split("\\").pop().split("/").pop().split(".")[0];break;case n.NAME_AND_EXTENSION:e=t.split("\\").pop().split("/").pop();break;case n.FULL_PATH_NO_EXTENSION:e=t.split(".")[0];break;case n.ORIGINAL:e=t}return e},t.prototype.translateElementName=function(t){if(this._minimized){if(this._minDefs.name!==t)return t;null!==this._minDefs.minName&&(t=this._minDefs.minName)}return t},t.prototype.translateChildElementName=function(t){if(this._minimized&&null!==this._minDefs){var e=this._minDefs.childElements;null!==e&&(t=null===e[t]?t:e[t].minName)}return t},t.prototype.translateAttributeName=function(t){if(this._minimized&&null!==this._minDefs){var e=this._minDefs.attributes;null!==e&&(t=null===e[t]?t:e[t])}return t},t.prototype.setMinDefsToElementName=function(t){if(this._minimized){this._minDefsStack.push(this._minDefs);var e=this._minDefs.childElements[t];this._minDefs=e}},t.prototype.popMinDefsStack=function(){this._minimized&&(this._minDefs=this._minDefsStack.pop())},t}();e.SpriterFile=r},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.Animation=e.eAnimationLooping=void 0;var o=i(4),s=i(24);!function(t){t[t.NO_LOOPING=0]="NO_LOOPING",t[t.LOOPING=1]="LOOPING"}(e.eAnimationLooping||(e.eAnimationLooping={}));var a=function(t){function e(e,i,n,r){var o=t.call(this,e,i)||this;return o._length=n,o._loopType=r,o._timelines=new s.IdNameMap,o._lines=new s.IdNameMap,o}return r(e,t),Object.defineProperty(e.prototype,"mainline",{get:function(){return this._mainline},set:function(t){this._mainline=t},enumerable:!1,configurable:!0}),e.prototype.addTimeline=function(t){this._timelines.add(t,t.id,t.name)},e.prototype.getTimelineById=function(t){return this._timelines.getById(t)},e.prototype.getTimelineByName=function(t){return this._timelines.getByName(t)},e.prototype.addLine=function(t){this._lines.add(t,this._lines.length,t.name)},e.prototype.getLineById=function(t){return this._lines.getById(t)},e.prototype.getLineByName=function(t){return this._lines.getByName(t)},Object.defineProperty(e.prototype,"linesLength",{get:function(){return this._lines.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"loopType",{get:function(){return this._loopType},enumerable:!1,configurable:!0}),e}(o.Item);e.Animation=a},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[i]}})}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),r=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||e.hasOwnProperty(i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(i(11),e),r(i(67),e),r(i(126),e),r(i(127),e)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.eSponsorID=void 0,function(t){t[t.NONE=0]="NONE",t[t.COOLMATHGAMES=1]="COOLMATHGAMES",t[t.DOCOMO=2]="DOCOMO",t[t.FBINSTANT=3]="FBINSTANT",t[t.GAMEARTER=4]="GAMEARTER",t[t.GAMEE=5]="GAMEE",t[t.FAMOBI=6]="FAMOBI",t[t.KAPOW=7]="KAPOW",t[t.MONDIA=8]="MONDIA",t[t.ORANGE_FR=9]="ORANGE_FR",t[t.PMCONNECT=10]="PMCONNECT",t[t.SBC_GAMES=11]="SBC_GAMES",t[t.WANTED5GAMES=12]="WANTED5GAMES",t[t.WKB=13]="WKB",t[t.YANDEX=14]="YANDEX",t[t.ZYGOMATIC=15]="ZYGOMATIC"}(e.eSponsorID||(e.eSponsorID={}))},function(t,e,i){"use strict";var n;function r(t,e,i,r){void 0===i&&(i=!1),void 0===r&&(r=0);var o=e.keys[0].x,s=e.keys[e.keys.length-1].x;if(t<o||t>s)throw new Error("value x ("+t+") is out of range defined with curve keys ("+o+" ... "+s+")");for(var a=e.keys.length-2;e.keys[a].x>t&&a>0;)--a;var l=e.keys[a],h=e.keys[a+1],u=(t-l.x)/(h.x-l.x),_=-1;switch(e.type){case n.LINEAR:_=function(t,e,i){return e.y+t*(i.y-e.y)}(u,l,h);break;case n.HERMITE:_=function(t,e,i){var n="number"==typeof e.slope?e.slope:e.slope.out,r="number"==typeof i.slope?i.slope:i.slope.in,o=i.x-e.x,s=n*o,a=r*o,l=t*t,h=l*t,u=h-2*l+t,_=h-l,p=-2*h+3*l;return(2*h-3*l+1)*e.y+u*s+_*a+p*i.y}(u,l,h)}if(i){var p=Math.pow(10,r);_=Math.round(_/p)*p}return _}Object.defineProperty(e,"__esModule",{value:!0}),e.duration=e.evaluate=e.drawCurve=e.eCurveType=void 0,function(t){t[t.LINEAR=0]="LINEAR",t[t.HERMITE=1]="HERMITE"}(n=e.eCurveType||(e.eCurveType={})),e.drawCurve=function(t,e,i,n,o,s,a,l,h){void 0===i&&(i=0),void 0===n&&(n=0),void 0===o&&(o=300),void 0===s&&(s=300),void 0===a&&(a=0);var u=e.keys[0].x,_=e.keys[e.keys.length-1].x;l=l||0,h=h||1;var p=new Phaser.Line;p.start.set(u+i,-r(u,e)+n);for(var c=1;c<100;c++){var f=(_-u)/100*c,d=o/(_-u)*f+i,g=s/(h-l)*-r(f,e)+n;p.end.set(d,g),t.geom(p,"RGBA(0, 255, 0, 1)"),p.start.copyFrom(p.end)}if(a>=u&&a<=_){var y=-r(a,e),m=new Phaser.Circle(o/(_-u)*a+i,s/(h-l)*y+n,8);t.geom(m,"RGBA(255, 0, 0, 1)")}},e.evaluate=r,e.duration=function(t){return t.keys[t.keys.length-1].x}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChoicesRevealer=e.ChoiceRevealerMode=void 0;var n,r=i(1);!function(t){t[t.NORMAL=0]="NORMAL",t[t.WIPEOUT=1]="WIPEOUT"}(n=e.ChoiceRevealerMode||(e.ChoiceRevealerMode={}));var o=function(){function t(t,e){this._listener=null,this._playersManager=null,this._mode=n.NORMAL,this._timeLimit=0,this._revealPlayerIndex=0,this._revealTime=0,this._allRevealed=!0,this._sortDelay=0,this._finished=!0,this._updatedCount=0,this._listener=t,this._playersManager=e}return Object.defineProperty(t.prototype,"allRevealed",{get:function(){return this._allRevealed},enumerable:!1,configurable:!0}),t.prototype.reset=function(t,e){this._sortDelay=void 0===e?r.Config.REVEAL_SORT_DELAY:e,this._mode=t,this._timeLimit=r.Config.REVEAL_PLAYERS_DURATION/r.Config.PLAYERS_MAX,t===n.WIPEOUT&&(this._timeLimit=(r.Config.REVEAL_PLAYERS_DURATION-100)/this._playersManager.justBusted),this._revealPlayerIndex=0,this._revealTime=0,this._allRevealed=!1,this._finished=!1,this._updatedCount=0},t.prototype.update=function(t){if(this._finished)return null;if(this._revealTime+=t,this._revealPlayerIndex===r.Config.PLAYERS_MAX)(this._revealTime>=this._sortDelay||0===this._updatedCount)&&(this._playersManager.sortPlayers(),this._finished=!0,this._listener.onChoicesSort());else if(this._revealTime>=this._timeLimit){this._revealTime-=this._timeLimit;var e=null;do{e=this._playersManager.updateSinglePlayerItemAtIndex(this._revealPlayerIndex++)}while(this._revealPlayerIndex<r.Config.PLAYERS_MAX&&this.skip(e));return this._revealPlayerIndex===r.Config.PLAYERS_MAX&&(this._allRevealed=!0,this._listener.onChoicesRevealed()),e}return null},t.prototype.skip=function(t){if(null===t)return!0;switch(this._mode){case n.NORMAL:if(!t.isInGame&&!t.justCollect)return!0;break;case n.WIPEOUT:if(!t.justBusted)return!0}return++this._updatedCount,!1},t}();e.ChoicesRevealer=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.SpriteParticle=void 0;var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.setFrame=function(t){var e=this._visual;"string"==typeof t?e.frameName=t:e.frame=t},e.prototype.onCreate=function(t){var e=new Phaser.Sprite(this._game,0,0,this._textureKey);e.anchor.setTo(.5,.5),this._visual=e},e}(i(55).Particle);e.SpriteParticle=o},function(t,e,i){"use strict";var n,r;Object.defineProperty(e,"__esModule",{value:!0}),e.Timeline=e.eTimelineTrim=e.eTimelinePlay=void 0,function(t){t[t.ALWAYS=0]="ALWAYS",t[t.FORWARD_ONLY=1]="FORWARD_ONLY",t[t.BACKWARD_ONLY=2]="BACKWARD_ONLY"}(n=e.eTimelinePlay||(e.eTimelinePlay={})),function(t){t[t.NO_TRIM=0]="NO_TRIM",t[t.TRIM=1]="TRIM",t[t.LEFT_TRIM=2]="LEFT_TRIM",t[t.RIGHT_TRIM=3]="RIGHT_TRIM"}(r=e.eTimelineTrim||(e.eTimelineTrim={}));var o=function(){function t(t,e){this.onFinished=new Phaser.Signal,this._isPlaying=!1,this._def=e,this._name=t}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(t){this._name=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this._currentTime},set:function(t){this._currentTime=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timeScale",{get:function(){return this._timeScale},set:function(t){this._timeScale=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"forwardDirection",{get:function(){return this._forwardDirection},set:function(t){this._forwardDirection=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"def",{get:function(){return this._def},set:function(t){this._def=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minTime",{get:function(){return this._minTime},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxTime",{get:function(){return this._maxTime},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPlaying",{get:function(){return this._isPlaying},enumerable:!1,configurable:!0}),t.prototype.clear=function(){for(var t in this._def)this._def[t].target=null},t.prototype.keyExists=function(t){return void 0!==this._def[t]},t.prototype.setTarget=function(t,e){this.keyExists(t)&&(this._def[t].target=e)},t.prototype.setProp=function(t,e,i,n){if(void 0===n&&(n=!0),this.keyExists(t)){var r=this._def[t].props[e];if(void 0!==r)if(n)for(var o in r.propTarget)r.propTarget[o]=i;else for(var o in r.propTarget)r.propStart[o]=i}},t.prototype.setPointProps=function(t,e,i,n){if(void 0===n&&(n=!0),this.keyExists(t)){var r=this._def[t].props[e];void 0!==r&&(n?(r.propTarget.x=i.x,r.propTarget.y=i.y):(r.propStart.x=i.x,r.propStart.y=i.y))}},t.prototype.start=function(t,e,i,n,o){void 0===i&&(i=0),void 0===n&&(n=1),void 0===o&&(o=r.NO_TRIM),this._delay=i,this._currentTime=0,this._timeScale=n,this._forwardDirection=e,this._minTime=0,this._maxTime=t,o!==r.NO_TRIM&&this.trim(o),this._duration=Math.ceil(this._maxTime-this._minTime),this.updateElements(this.updateTime(0)),this._isPlaying=!0},t.prototype.trim=function(t){var e=Number.MAX_VALUE,i=0;for(var n in this.def){var o=this.def[n];if(this.isDirectionValid(o.playWhen)&&null!=o.target){var s=Number.MAX_VALUE,a=0;for(var l in o.props){var h=o.props[l];this.isDirectionValid(h.playWhen)&&(void 0!==h.time&&void 0!==h.duration?(s=Math.min(s,h.time),a=Math.max(a,h.time+h.duration)):void 0!==o.time&&void 0!==o.duration&&(s=Math.min(s,o.time),a=Math.max(a,o.time+o.duration)))}e=Math.min(s,e),i=Math.max(a,i)}}t!==r.TRIM&&t!==r.LEFT_TRIM||(this._minTime=e),t!==r.TRIM&&t!==r.RIGHT_TRIM||(this._maxTime=i)},t.prototype.isDirectionValid=function(t){return void 0===t||t===n.ALWAYS||!!(t===n.FORWARD_ONLY&&this.forwardDirection||t===n.BACKWARD_ONLY&&!this.forwardDirection)},t.prototype.setAtTime=function(t){this.updateElements(t)},t.prototype.update=function(t){if(this._isPlaying&&null!==this._def)if(this._delay>0)this._delay=Math.max(0,this._delay-t);else{var e=this.updateTime(t);this.updateElements(e),this._currentTime===this._duration&&(this.onFinished.dispatch(this._name),this._isPlaying=!1)}},t.prototype.updateTime=function(t){this._currentTime=Math.min(this._duration,this._currentTime+t*this._timeScale);var e=this._currentTime;return e=this._forwardDirection?this._minTime+e:this._minTime+(this._duration-e)},t.prototype.updateElements=function(t){for(var e in this._def){var i=this._def[e];this.updateElement(i,t)}},t.prototype.updateElement=function(t,e){if(null!=t.target&&(void 0===t.playWhen||!(this._forwardDirection&&t.playWhen===n.BACKWARD_ONLY||!this._forwardDirection&&t.playWhen===n.FORWARD_ONLY))){var i=t.target,r=void 0!==t.time&&void 0!==t.duration,o=r?Phaser.Math.clamp(e,t.time,t.time+t.duration):0,s=r?(o-t.time)/t.duration:0;for(var a in t.props){var l=t.props[a];if(void 0===l.playWhen||!(this._forwardDirection&&l.playWhen===n.BACKWARD_ONLY||!this._forwardDirection&&l.playWhen===n.FORWARD_ONLY)){var h=i;if(void 0!==l.subTarget){var u=l.subTarget;do{h=h[u.target]}while(null!=(u=u.dot))}var _=void 0!==l.time&&void 0!==l.duration,p=_?Phaser.Math.clamp(e,l.time,l.time+l.duration):o,c=_?(p-l.time)/l.duration:s,f=void 0!==l.easing?l.easing(c):void 0!==t.easing?t.easing(c):Phaser.Easing.Linear.None(c);for(var d in l.propStart){var g=0;g=l.isOffset?Phaser.Math.linear(l.propTarget[d]+l.propStart[d],l.propTarget[d],f):Phaser.Math.linear(l.propStart[d],l.propTarget[d],f),h[d]=void 0!==l.clamp01?Phaser.Math.clamp(g,0,1):g}}}}},t}();e.Timeline=o},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[i]}})}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),r=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||e.hasOwnProperty(i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(i(35),e),r(i(15),e),r(i(60),e),r(i(114),e),r(i(115),e),r(i(117),e),r(i(119),e),r(i(121),e),r(i(4),e),r(i(25),e),r(i(44),e),r(i(26),e),r(i(45),e),r(i(66),e)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IdNameMap=void 0;var n=function(){function t(){this._items=[],this._itemNames=[]}return t.prototype.add=function(t,e,i){void 0===e&&(e=this._items.length),null==i&&(i="item_"+e),this._items[e]=t,this._itemNames[i]=e},t.prototype.getById=function(t){return this._items[t]},t.prototype.getByName=function(t){var e=this._itemNames[t];return"number"==typeof e?this._items[e]:null},Object.defineProperty(t.prototype,"length",{get:function(){return this._items.length},enumerable:!1,configurable:!0}),t}();e.IdNameMap=n},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=void 0;var o=i(24),s=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._objectInfos=new o.IdNameMap,n._charMaps=new o.IdNameMap,n._variables=new o.IdNameMap,n._animations=new o.IdNameMap,n}return r(e,t),e.prototype.addObjectInfo=function(t){this._objectInfos.add(t,t.id,t.name)},e.prototype.getObjectInfoById=function(t){return this._objectInfos.getById(t)},e.prototype.getObjectInfoByName=function(t){return this._objectInfos.getByName(t)},e.prototype.addCharMap=function(t){this._charMaps.add(t,t.id,t.name)},e.prototype.getCharMapById=function(t){return this._charMaps.getById(t)},e.prototype.getCharMapByName=function(t){return this._charMaps.getByName(t)},Object.defineProperty(e.prototype,"charMapsLength",{get:function(){return this._charMaps.length},enumerable:!1,configurable:!0}),e.prototype.addVariable=function(t){this._variables.add(t,t.id,t.name)},e.prototype.getVariableById=function(t){return this._variables.getById(t)},e.prototype.getVariableByName=function(t){return this._variables.getByName(t)},Object.defineProperty(e.prototype,"variablesLength",{get:function(){return this._variables.length},enumerable:!1,configurable:!0}),e.prototype.addAnimation=function(t){this._animations.add(t,t.id,t.name)},e.prototype.getAnimationById=function(t){return this._animations.getById(t)},e.prototype.getAnimationByName=function(t){return this._animations.getByName(t)},Object.defineProperty(e.prototype,"animationsLength",{get:function(){return this._animations.length},enumerable:!1,configurable:!0}),e}(i(4).Item);e.Entity=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SpatialInfo=void 0;var n=function(){this.x=0,this.y=0,this.scaleX=1,this.scaleY=1,this.pivotX=0,this.pivotY=0,this.alpha=1,this.angle=0};e.SpatialInfo=n},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.DialogBase=void 0;var o=i(46),s=function(t){function e(e){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var r=t.call(this,e)||this;return r.onDialogClosed=new Phaser.Signal,r._width=0,r._height=0,r._blocker=null,r._dialogContainer=null,r._dialogBgBmd=null,r._dialogBg=null,r._tweenInPosition=null,r._tweenInAlpha=null,r._tweenOutPosition=null,r._tweenOutAlpha=null,r._hideSourceName=null,r._blocker=new Phaser.Sprite(e,0,0,"Sprites","dia_blocker"),r._blocker.anchor.set(.5),r._blocker.width=e.width,r._blocker.height=e.height,r._blocker.tint=1185080,r._blocker.alpha=0,r._blocker.inputEnabled=!0,r._blocker.input.priorityID=r.priority,r.add(r._blocker),r._dialogContainer=new Phaser.Group(e),r._dialogContainer.position.set(0,0),r.add(r._dialogContainer),r.createBg(i),r.createTweens(e),r.activate(!1),r}return r(e,t),Object.defineProperty(e.prototype,"priority",{get:function(){return e.PRIORITY},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isActive",{get:function(){return this.visible},enumerable:!1,configurable:!0}),e.prototype.createBg=function(t){if("number"==typeof t[0])this._width=t[0],this._height=t[1],this.createBgBmd();else{var e=t[0];this._width=e.width,this._height=e.height,this._dialogBgBmd=e.bmd}this._dialogBg=new Phaser.Sprite(this.game,0,0,this._dialogBgBmd,0),this._dialogBg.anchor.set(.5),this._dialogContainer.add(this._dialogBg)},e.prototype.createBgBmd=function(){this._dialogBgBmd=o.NineImage.create(this.game,this._width,this._height,"Sprites","dia_ninepatch",40,40,40,40,!1,!0,!0),this.onDestroy.addOnce((function(){null!==this._dialogBgBmd&&this._dialogBgBmd.destroy()}),this)},e.prototype.pop=function(t){return-.746410162*t*t+.946410162*t+.8},e.prototype.createTweens=function(t){this._tweenInPosition=t.add.tween(this).to({containerScale:1,containerAlpha:1},e.TWEEN_DURATION,Phaser.Easing.Linear.None,!1,e.TWEEN_DURATION),this._tweenInPosition.onComplete.add(this.onShownComplete,this),this._tweenInAlpha=t.add.tween(this).to({blockerAlpha:.8},e.TWEEN_DURATION+100,Phaser.Easing.Cubic.Out,!1),this._tweenOutPosition=t.add.tween(this).to({containerScale:0,containerAlpha:0},e.TWEEN_DURATION,Phaser.Easing.Linear.None,!1),this._tweenOutAlpha=t.add.tween(this).to({blockerAlpha:0},e.TWEEN_DURATION+100,Phaser.Easing.Linear.None,!1,e.TWEEN_DURATION),this._tweenOutAlpha.onComplete.add(this.onHideComplete,this)},Object.defineProperty(e.prototype,"blockerAlpha",{get:function(){return this._blocker.alpha},set:function(t){this._blocker.alpha=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"containerX",{get:function(){return this._dialogContainer.x},set:function(t){this._dialogContainer.x=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"containerScale",{get:function(){return this._dialogContainer.scale.x},set:function(t){this._dialogContainer.scale.set(this.pop(t))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"containerAlpha",{get:function(){return this._dialogContainer.alpha},set:function(t){this._dialogContainer.alpha=t},enumerable:!1,configurable:!0}),e.prototype.enableInput=function(t){},e.prototype.activate=function(t){this.exists=t,this.visible=t},e.prototype.onResize=function(t,e){this._blocker.width=this.game.width,this._blocker.height=this.game.height},e.prototype.show=function(){this.onResize(this.game.width,this.game.height),this._dialogContainer.scale.set(0),this._dialogContainer.alpha=.5,this.enableInput(!1),this.activate(!0),this._tweenInPosition.resume(),this._tweenInPosition.start(),this._tweenInAlpha&&(this._tweenInAlpha.resume(),this._tweenInAlpha.start())},e.prototype.onShownComplete=function(){this.enableInput(!0)},e.prototype.hide=function(t){void 0===t&&(t=null),this._hideSourceName=t,this.enableInput(!1),this._tweenOutPosition.resume(),this._tweenOutPosition.start(),this._tweenOutAlpha&&(this._tweenOutAlpha.resume(),this._tweenOutAlpha.start())},e.prototype.onHideComplete=function(){this.activate(!1);var t=this._hideSourceName;this._hideSourceName=null,this.onDialogClosed.dispatch(t)},e.prototype.onCloseClicked=function(t){this.hide("Close")},e.PRIORITY=5,e.TWEEN_DURATION=200,e}(Phaser.Group);e.DialogBase=s},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.AdvancedBitmapText=void 0;var o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._colors=[],e._boldCount=0,e}return r(e,t),Object.defineProperty(e.prototype,"colors",{get:function(){return this._colors},set:function(t){this._colors=t},enumerable:!1,configurable:!0}),e.prototype.getTint=function(){return void 0===this._colorsStack||0===this._colorsStack.length?this.tint:this._colorsStack[this._colorsStack.length-1]},e.prototype.scanLine=function(t,e,i){for(var n=0,r=0,o=-1,s=0,a=null,l=this.maxWidth>0?this.maxWidth:null,h=[],u=0;u<i.length;u++){var _=u===i.length-1;if(/(?:\r\n|\r|\n)/.test(i.charAt(u)))return{width:r,text:i.substr(0,u),end:_,chars:h};var p,c=i.charCodeAt(u),f=t.chars[c];void 0===f&&(c=32,f=t.chars[c]);var d=a&&f.kerning[a]?f.kerning[a]:0;if(/(\s)/.test(i.charAt(u))&&(o=u,s=r),"|"!==i.charAt(u)){if(p=(d+f.texture.width+f.xOffset)*e,l&&r+p>=l&&o>-1)return{width:s||r,text:i.substr(0,u-(u-o)),end:!1,chars:h};r+=(f.xAdvance+d+this.letterSpacing)*e,h.push(n+(f.xOffset+d+this.letterSpacing)*e),n+=(f.xAdvance+d+this.letterSpacing)*e,a=c}else{var g=u+1,y=i.charAt(g),m="~"===y;m&&(y=i.charAt(++g)),"b"===y?u+=1+(m?1:0):"c"===y&&(u+=2),_=u===i.length-1}}return{width:r,text:i,end:_,chars:h}},e.prototype.updateText=function(){void 0===this._colorsStack&&(this._colorsStack=[],this._boldCount=0),this._colorsStack.length=0,this._boldCount=0;var t=this._data.font;if(t){var e=this.text,i=this.fontSize/t.size,n=[],r=0;this.textWidth=0;do{(u=this.scanLine(t,i,e)).y=r,n.push(u),u.width>this.textWidth&&(this.textWidth=u.width),r+=t.lineHeight*i,e=e.substr(u.text.length+1)}while(!1===u.end);this.textHeight=r;for(var o=0,s=0,a=this.textWidth*this.anchor.x,l=this.textHeight*this.anchor.y,h=0;h<n.length;h++){var u=n[h];"right"===this.align?s=this.textWidth-u.width:"center"===this.align&&(s=(this.textWidth-u.width)/2);for(var _=0,p=0;_<u.text.length;_++){var c=u.text.charCodeAt(_),f=t.chars[c];if(void 0===f&&(c=32,f=t.chars[c]),"|"===u.text.charAt(_)){var d=_+1,g=u.text.charAt(d),y="~"===g;if(y&&(g=u.text.charAt(++d)),"b"===g){this._boldCount+=y?-1:1,_+=1+(y?1:0);continue}if("c"===g){if(y)this._colorsStack.pop();else{var m=u.text.charCodeAt(++d)-48;this._colorsStack.push(this._colors[m])}_+=2;continue}}for(var v=0;v<=this._boldCount;v++){var T=this._glyphs[o];T?T.texture=f.texture:((T=new PIXI.Sprite(f.texture)).name=u.text[_],this._glyphs.push(T)),T.position.x=u.chars[p]+s-a+v,T.position.y=u.y+f.yOffset*i-l,T.scale.set(i,i),T.tint=this.getTint(),T.texture.requiresReTint=!0,T.cachedTint=16777215,T.parent||this.addChild(T),o++}p++}}for(h=o;h<this._glyphs.length;h++)this.removeChild(this._glyphs[h])}},e}(Phaser.BitmapText);e.AdvancedBitmapText=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.SceneBase=void 0;var o=i(2),s=i(3),a=i(0),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._inputLocked=!1,e._shouldPlayMusic=!1,e._musicName=null,e._musicVolume=0,e}return r(e,t),Object.defineProperty(e.prototype,"inputLocked",{get:function(){return this._inputLocked},set:function(t){this._inputLocked=t},enumerable:!1,configurable:!0}),e.prototype.create=function(){this.stage.backgroundColor=o.Defs.COLOR_BG,this.setView(this.game.width,this.game.height),this.doPreCreate(),this.doPostCreate(),this.onResize(this.game.width,this.game.height),this._inputLocked=!1},e.prototype.doPreCreate=function(){},e.prototype.doPostCreate=function(){},e.prototype.setView=function(t,e){this.camera.bounds=null,this.world.setBounds(-t/2,-e/2,t,e),this.camera.focusOnXY(0,0)},e.prototype.onResize=function(t,e){this.setView(t,e)},e.prototype.toggleSound=function(t){s.App.settings.soundOn=t,a.AudioUtils.playSound("click"),s.App.settings.save()},e.prototype.toggleMusic=function(t){s.App.settings.musicOn=t,a.AudioUtils.playSound("click"),s.App.settings.save(),this.onMusicChanged(t)},e.prototype.onMusicChanged=function(t){t?this._shouldPlayMusic&&this._musicName&&this.playMusic(this._musicName,this._musicVolume):a.AudioUtils.stopMusic()},e.prototype.playMusic=function(t,e){void 0===e&&(e=1),a.AudioUtils.playMusic(t),a.AudioUtils.musicVolume=e,this._shouldPlayMusic=!0,this._musicName=t,this._musicVolume=e},e.prototype.stopMusic=function(){a.AudioUtils.stopMusic(),this._shouldPlayMusic=!1},e.prototype.fadeMusicVolumeTo=function(t){var e=a.AudioUtils.currentMusicSound;null!==e&&e.fadeTo(250,t),this._musicVolume=t},e}(Phaser.State);e.SceneBase=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sponsor=void 0;i(18);var n=i(31),r=function(){function t(e){this._features=null,this._game=null,t._instance=this,this._features=e,n.Utils.api=this,n.Utils.id=e.id}return Object.defineProperty(t,"instance",{get:function(){if(null==t._instance)throw new Error("Sponsor is "+t._instance+". Sponsor must be always initialized.");return t._instance},enumerable:!1,configurable:!0}),Object.defineProperty(t,"initialized",{get:function(){return null!=t._instance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this.features.id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"features",{get:function(){return this._features},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"game",{set:function(t){this._game=t},enumerable:!1,configurable:!0}),t.prototype.startGameSession=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.endGameSession=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.submitScore=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.showAd=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.onMoreGames=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.getSponsorLogoLink=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return null},t._instance=null,t}();e.Sponsor=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=void 0;var n=function(){function t(){}return Object.defineProperty(t,"api",{get:function(){return t._api},set:function(e){t._api=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"id",{get:function(){return t._id},set:function(e){t._id=e},enumerable:!1,configurable:!0}),t.is=function(e){return t._id===e},t.features=function(){return t._api.features},t.hasFeature=function(e){return void 0!==t._api.features[e]},t.isFeatureOn=function(e){if(!t.hasFeature(e))return!1;var i=t._api.features[e];return"boolean"==typeof i&&i},t}();e.Utils=n},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.MovingNumber=e.MovingNumberType=void 0;var o,s=i(8),a=i(2),l=i(56),h=i(0),u=i(1);!function(t){t[t.Spinner=0]="Spinner",t[t.Bank=1]="Bank"}(o=e.MovingNumberType||(e.MovingNumberType={}));var _=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._particles=null,n._num=null,n._numSprite=null,n._numText=null,n._curve=null,n._delay=0,n._duration=0,n._currentTime=0,n._running=!1,n._doScale=!1,n._startAngle=0,n._type=o.Spinner,n._init=!1,n._curve=new l.BezierQuadratic,n._particles=n.createParticles(),n._num=n.createNum(),n}return r(e,t),Object.defineProperty(e.prototype,"running",{get:function(){return this._running},enumerable:!1,configurable:!0}),e.prototype.debug=function(){this._running&&this._curve.draw(this.game.debug)},e.prototype.createParticles=function(){var t=new s.ParticlesEmitter(this.game,0,0,e.PARTICLES_MAX);t.makeParticles("Sprites","particle_bank_collected",e.PARTICLES_MAX);return t.area=new Phaser.Circle(0,0,40),t.lifetime=1,t.setScale(.75,1.25),t.setAlphaChange(s.eParameterChangeType.IN_TIME,-1,1),t.setScaleChange(s.eParameterChangeType.IN_TIME,-.5,1),this.add(t),t},e.prototype.createNum=function(){var t=new Phaser.Group(this.game,this);return this._numSprite=this.createNumSprite(),t.add(this._numSprite),this._numText=this.createNumText(),t.add(this._numText),t.visible=!1,t},e.prototype.createNumSprite=function(){var t=this.game.add.sprite(0,0,"Sprites",0,this);return t.anchor.set(.5),t.visible=!1,t},e.prototype.createNumText=function(){var t=new Phaser.BitmapText(this.game,0,0,"NumsPlayers","0",e.FONT_SIZE,"center");return t.anchor.set(.5,.5),t.visible=!1,t},e.prototype.setMovement=function(t,i,n,r,s,h,u,_){this._type=t,this._currentTime=0,this._delay=h,t===o.Spinner?this._duration=e.DURATION_SPINNER:this._duration=Math.floor(Phaser.Math.mapLinear(Phaser.Point.distance(n,r),240,630,e.DURATION_BANK,e.DURATION_BANK/2)),this._num.visible=0===h,this._curve.set(n.x,n.y,r.x,r.y,t===o.Bank?l.BeziereQuadraticDirection.RIGHT:l.BeziereQuadraticDirection.RANDOM,.3,.25),this._num.scale.set(1),t===o.Spinner?(this._doScale=!0,this._numSprite.frameName=a.Defs.NUM_FRAMES_CENTER[s-1],this._numSprite.visible=!0,this._numText.visible=!1):t===o.Bank&&(this._doScale=!1,this._numText.text=s.toString(),this._numText.visible=!0,this._numSprite.visible=!1),null!==i?(this._numSprite.scale.set(.62),this._startAngle=Phaser.Math.radToDeg(i.worldRotation),this._numSprite.angle=this._startAngle,this._doScale=!1,this._num.visible=!0):(this._numSprite.scale.set(1),this._startAngle=this._numSprite.angle=0),this._callback=u,this._context=_,this._init=!0,this._running=!0,this.updateNum(0)},e.prototype.updateMovement=function(t){if(this._running&&!((this._delay-=t)>0)){this._init&&(this._init=!1,this._particles.flow(50,2,-1,!1),this._num.visible=!0),this._currentTime+=t;var e=Phaser.Math.clamp(this._currentTime/this._duration,0,1);e=Math.sin(e*Math.PI/2),this.updateNum(e),this._particles.emitAt(this._num.x,this._num.y),1===e&&(this._running=!1,this._num.visible=!1,this._particles.stopFlow(),this._type===o.Spinner&&h.AudioUtils.playSound("number_moves_from_center_to_bank",u.Config.VOLUME_NUMBER_MOVES_FROM_CENTER_TO_BANK),null!==this._callback&&this._callback.call(this._context))}},e.prototype.updateNum=function(t){var e=this._curve.at(t),i=e.x,n=e.y;this._num.visible=!0,this._num.position.set(i,n),this._doScale&&this._num.scale.set(1-.5*t),this._numSprite.visible&&(this._numSprite.angle=Phaser.Math.linear(this._startAngle,0,t))},e.DURATION_SPINNER=600,e.DURATION_BANK=1e3,e.PARTICLES_MAX=64,e.FONT_SIZE=36,e}(Phaser.Group);e.MovingNumber=_},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ParticlesEmitter=e.eParameterChangeType=void 0;var o,s,a=i(54),l=i(53),h=i(21);!function(t){t[t.NONE=0]="NONE",t[t.FLOW=1]="FLOW",t[t.EXPLODE=2]="EXPLODE"}(o||(o={})),function(t){t[t.NO_CHANGE=0]="NO_CHANGE",t[t.IN_TIME=1]="IN_TIME"}(s=e.eParameterChangeType||(e.eParameterChangeType={}));var u=function(t){function e(i,n,r,s){var l=t.call(this,i,null)||this;return l._maxParticles=e.MAX_PARTICELES,l.emitPoint=new Phaser.Point(0,0),l.emitObject=null,l.particleClass=h.SpriteParticle,l.particleBringToTop=!1,l.particleSendToBack=!1,l.frequency=100,l.forceEmit=!1,l._alternativeParams=null,l._on=!1,l._mode=o.NONE,l._flowQuantity=0,l._flowTotal=0,l._flowCounter=0,l._particlesPool=[],l._counterPool=0,l._particlesUsed=[],l._counterUsed=0,l._timer=0,l._emitPoint=new Phaser.Point(0,0),l._callback=null,l._callbackContext=null,l._params=new a.ParticleParams(i),l.position.setTo(n,r),l._maxParticles=s,l}return r(e,t),Object.defineProperty(e.prototype,"params",{get:function(){return this._params},set:function(t){this._params=t},enumerable:!1,configurable:!0}),e.prototype.clear=function(){this._params.clear()},e.prototype.setCallback=function(t,e){this._callback=t,this._callbackContext=e},e.prototype.clearCallback=function(){this._callback=this._callbackContext=null},e.prototype.update=function(){if(this._on&&this.game.time.time>=this._timer&&(this._timer=this.game.time.time+this.frequency*this.game.time.slowMotion,this._mode===o.FLOW))if(-1!==this._flowTotal&&this._flowCounter>=this._flowTotal)this.stopFlow();else for(var t=Math.max(1,this._flowQuantity),e=0;e<t&&!(this.emitParticle(this.forceEmit)&&(this._flowCounter++,-1!==this._flowTotal&&this._flowCounter>=this._flowTotal));e++);for(e=this._counterUsed-1;e>=0;e--){var i=this._particlesUsed[e];i.update()||(i.on=!1,i.remove(),i.onKill(this),this._particlesUsed[e]=this._particlesUsed[--this._counterUsed],this._particlesPool[this._counterPool++]=i)}},e.prototype.makeParticles=function(t,e,i,n){(void 0===i||i>this._maxParticles)&&(i=this._maxParticles),void 0!==e&&(this._params.frames=e);for(var r=0;r<i;r++){var o=new this.particleClass(this.game,n);o.textureKey=t,o.onCreate(this),o.on=!1,this._particlesPool[this._counterPool++]=o}},Object.defineProperty(e.prototype,"on",{set:function(t){this._on=t,this.exists=t,this.visible=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pooledParticles",{get:function(){return this._particlesPool},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pooledParticlesCount",{get:function(){return this._counterPool},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"usedParticles",{get:function(){return this._particlesUsed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"countParticles",{get:function(){return this._counterUsed},enumerable:!1,configurable:!0}),e.prototype.explode=function(t,e,i){this._mode=o.EXPLODE,this.on=!0,this.emitParticles(t,e,i)},e.prototype.flow=function(t,e,i,n,r,s){this._mode=o.FLOW,this.on=!0,void 0!==e&&0!==e||(e=1),void 0===i&&(i=-1),void 0===n&&(n=!0),e>this._maxParticles&&(e=this._maxParticles),this.frequency=t,this._flowCounter=0,this._flowQuantity=e,this._flowTotal=i,n&&(this.emitParticles(e,r,s),this._flowCounter+=e,this._timer=this.game.time.time+t*this.game.time.slowMotion)},e.prototype.stopFlow=function(){this._mode=o.NONE},e.prototype.killAllParticles=function(t){for(void 0===t&&(t=!0);this._counterUsed>0;){var e=this._particlesUsed[--this._counterUsed];e.remove(),t||e.onKill(this),this._particlesPool[this._counterPool++]=e}},e.prototype.emitParticles=function(t,e,i){for(var n=0;n<t;n++){var r=this.emitParticle(this.forceEmit);if(null===r)break;null!=e&&e.call(i,r)}},e.prototype.emitParticle=function(t,e){if(void 0===t&&(t=!1),void 0===e&&(e=!1),0===this._counterPool){if(!t)return null;var i=this._particlesUsed[0];this._particlesUsed[0]=this._particlesUsed[--this._counterUsed],i.remove(),i.onKill(this),this._particlesPool[this._counterPool++]=i}var n=this._particlesPool[--this._counterPool];this._particlesUsed[this._counterUsed++]=n,n.on=!0;var r=null!==this._alternativeParams?this._alternativeParams:this._params;if(this.randomEmitPoint(this._emitPoint,r),n.visual.position.set(this._emitPoint.x,this._emitPoint.y),n.visual.angle=0,e)n.lifetime=-1,n.visual.scale.set(1,1),n.setScaleChange(s.NO_CHANGE),n.visual.angle=0,n.alpha=1,n.setAlphaChange(s.NO_CHANGE),n.setPhysics();else{if(n.lifetime=this.game.rnd.realInRange(r.minLifetime,r.maxLifetime),n.delay=r.delay,1!==r.minScale||1!==r.maxScale){var o=this.game.rnd.realInRange(r.minScale,r.maxScale);n.visual.scale.set(o,o)}else r.advScaleMin.x!==r.advScaleMax.x||r.advScaleMin.y!==r.advScaleMax.y?n.visual.scale.set(this.game.rnd.realInRange(r.advScaleMin.x,r.advScaleMax.x),this.game.rnd.realInRange(r.advScaleMin.y,r.advScaleMax.y)):n.visual.scale.set(1,1);n.setScaleChange(r.scaleChangeType,r.scaleChange),n.visual.angle=r.minAngle===r.maxAngle?r.minAngle:this.game.rnd.realInRange(r.minAngle,r.maxAngle),n.alpha=this.game.rnd.realInRange(r.minAlpha,r.maxAlpha),n.setAlphaChange(r.alphaChangeType,r.alphaChange),n.setPhysics(this.game.rnd.realInRange(r.minSpeedX,r.maxSpeedX),this.game.rnd.realInRange(r.minSpeedY,r.maxSpeedY),this.game.rnd.realInRange(r.minAngularSpeed,r.maxAngularSpeed),r.friction,r.angularDrag,r.gravity,r.gravityX),null!==r.frames&&n.setFrame(r.randomFrame())}return n.onEmit(this),null!==this._callback&&null!==this._callbackContext&&this._callback.call(this._callbackContext,n),this.particleBringToTop?n.bringToTop():this.particleSendToBack&&n.sendToBack(),n},e.prototype.destroy=function(){l.ParticlesManager.instance.remove(this),t.prototype.destroy.call(this,!0,!1)},e.prototype.randomEmitPoint=function(t,e){return e.area instanceof Phaser.Point?t.setTo(0,0):e.area.random(t),t.x+=this.emitPoint.x,t.y+=this.emitPoint.y,null!==this.emitObject&&(t.x+=this.emitObject.x,t.y+=this.emitObject.y),t},Object.defineProperty(e.prototype,"area",{set:function(t){this._params.area=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gravity",{set:function(t){this._params.gravity=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"gravityX",{set:function(t){this._params.gravityX=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"friction",{set:function(t){this._params.friction=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"angularDrag",{set:function(t){this._params.angularDrag=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minScale",{set:function(t){this._params.minScale=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScale",{set:function(t){this._params.maxScale=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minAngle",{set:function(t){this._params.minAngle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxAngle",{set:function(t){this._params.maxAngle=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lifetime",{set:function(t){this._params.minLifetime=this._params.maxLifetime=t},enumerable:!1,configurable:!0}),e.prototype.setXSpeed=function(t,e){this._params.setXSpeed(t,e)},e.prototype.setYSpeed=function(t,e){this._params.setYSpeed(t,e)},e.prototype.setAngularSpeed=function(t,e){this._params.setAngularSpeed(t,e)},e.prototype.setAlpha=function(t,e){this._params.setAlpha(t,e)},e.prototype.setAlphaChange=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),this._params.setAlphaChange(t,e,i)},e.prototype.setScale=function(t,e){this._params.setScale(t,e)},e.prototype.setAdvScale=function(t,e,i,n){this._params.setAdvScale(t,e,i,n)},e.prototype.setScaleChange=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0),this._params.setScaleChange(t,e,i)},e.prototype.setAngle=function(t,e){this._params.setAngle(t,e)},e.prototype.emitAt=function(t,e){this.emitPoint.setTo(t,e)},e.prototype.emitAtObject=function(t){t.center?this.emitPoint.setTo(t.center.x,t.center.y):this.emitPoint.setTo(t.x,t.y)},e.MAX_PARTICELES=16,e}(Phaser.Group);e.ParticlesEmitter=u},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.SpinnerNumber=e.SpinnerNumberState=void 0,function(t){t[t.InGame=0]="InGame",t[t.OutOfGame=1]="OutOfGame"}(n=e.SpinnerNumberState||(e.SpinnerNumberState={}));var r=function(){function t(t){this._value=t}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(t){this._state=t},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this._state=n.InGame},t}();e.SpinnerNumber=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Types=void 0;var n=function(){function t(){}return t.getObjectTypeForName=function(e){var i=t.nameToObjectType[e];return i},t.getCurveTypeForName=function(e){var i=t.nameToCurveType[e];return i},t.getVariableTypeForName=function(e){var i=t.nameToVariableType[e];return i},t.nameToObjectType={sprite:0,bone:1,box:2,point:3,sound:4},t.nameToCurveType={instant:1,linear:0,quadratic:2,cubic:3,quartic:4,quintic:5,bezier:6},t.nameToVariableType={int:0,float:1,string:2},t}();e.Types=n},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.File=void 0;var o=function(t){function e(e,i,n,r){var o=t.call(this,e,i)||this;return o._pivotX=n,o._pivotY=r,o}return r(e,t),Object.defineProperty(e.prototype,"pivotX",{get:function(){return this._pivotX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pivotY",{get:function(){return this._pivotY},enumerable:!1,configurable:!0}),e}(i(4).Item);e.File=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.Folder=void 0;var o=i(4),s=i(24),a=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._files=new s.IdNameMap,n}return r(e,t),e.prototype.addFile=function(t){this._files.add(t,t.id,t.name)},e.prototype.getFileById=function(t){return this._files.getById(t)},e.prototype.getFileByName=function(t){return this._files.getByName(t)},e}(o.Item);e.Folder=a},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.KeyBone=void 0;var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(i(62).KeyTimeline);e.KeyBone=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.KeyMainline=void 0;var o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._boneRefs=[],e._objectRefs=[],e}return r(e,t),Object.defineProperty(e.prototype,"boneRefs",{get:function(){return this._boneRefs},enumerable:!1,configurable:!0}),e.prototype.addBoneRef=function(t){this._boneRefs.push(t)},Object.defineProperty(e.prototype,"objectRefs",{get:function(){return this._objectRefs},enumerable:!1,configurable:!0}),e.prototype.addObjectRef=function(t){this._objectRefs.push(t)},e}(i(10).Key);e.KeyMainline=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.KeyObject=void 0;var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.setFolderAndFile=function(t,e){this._folder=t,this._file=e},Object.defineProperty(e.prototype,"folder",{get:function(){return this._folder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"file",{get:function(){return this._file},enumerable:!1,configurable:!0}),e}(i(62).KeyTimeline);e.KeyObject=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectInfo=void 0;var o=function(t){function e(e,i,n,r,o,s,a){var l=t.call(this,e,i)||this;return l._type=n,l._width=r,l._height=o,l._pivotX=s,l._pivotY=a,l}return r(e,t),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pivotX",{get:function(){return this._pivotX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pivotY",{get:function(){return this._pivotY},enumerable:!1,configurable:!0}),e}(i(4).Item);e.ObjectInfo=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ref=void 0;var n=function(t,e,i,n,r){void 0===r&&(r=0),this.id=t,this.parent=e,this.timeline=i,this.key=n,this.z=r};e.Ref=n},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.Timeline=void 0;var o=i(9),s=function(t){function e(e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=-1);var s=t.call(this,e,i)||this;return s.type=o.eTimelineType.TIME_LINE,s._objectType=n,s._objectRef=r,s}return r(e,t),Object.defineProperty(e.prototype,"objectType",{get:function(){return this._objectType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"objectRef",{get:function(){return this._objectRef},enumerable:!1,configurable:!0}),e}(o.Baseline);e.Timeline=s},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.Variable=void 0;var o=function(t){function e(e,i,n,r){var o=t.call(this,e,i)||this;return o._type=n,o._default=r,o.reset(),o}return r(e,t),e.prototype.clone=function(){return new e(this.id,this.name,this.type,this._default)},e.prototype.reset=function(){this.value=this._default},Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(t){0===this._type?this._value=Math.floor(t):this._value=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"int",{get:function(){return this._value},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"float",{get:function(){return this._value},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"string",{get:function(){return this._value},enumerable:!1,configurable:!0}),e}(i(4).Item);e.Variable=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SpriterBone=void 0;var n=i(123),r=i(16),o=i(26),s=function(){function t(){this.timeline=-1,this.timelineKey=-1,this.transformed=new o.SpatialInfo}return t.prototype.setOn=function(t){this._on=t},Object.defineProperty(t.prototype,"on",{get:function(){return this._on},enumerable:!1,configurable:!0}),t.prototype.setKey=function(e,i,n,o){this.timeline=n,this.timelineKey=o;var s=i.getTimelineById(n);this.name=s.name,this.objectInfo=-1===s.objectRef?null:e.getObjectInfoById(s.objectRef);var a=s.at(o),l=s.at(o+1,i.loopType!==r.eAnimationLooping.NO_LOOPING);this.key=a,this.timeFrom=a.time,this.timeTo=l.time,this.timeTo<this.timeFrom&&(this.timeTo=i.length),this.from=a.info,this.to=l.info,this.updateMask=0,Math.abs(this.from.x-this.to.x)>.001&&(this.updateMask+=t.UPDATE_X),Math.abs(this.from.y-this.to.y)>.001&&(this.updateMask+=t.UPDATE_Y),Math.abs(this.from.scaleX-this.to.scaleX)>.001&&(this.updateMask+=t.UPDATE_SCALE_X),Math.abs(this.from.scaleY-this.to.scaleY)>.001&&(this.updateMask+=t.UPDATE_SCALE_Y),Math.abs(this.from.pivotX-this.to.pivotX)>.001&&(this.updateMask+=t.UPDATE_PIVOT_X),Math.abs(this.from.pivotY-this.to.pivotY)>.001&&(this.updateMask+=t.UPDATE_PIVOT_Y),Math.abs(this.from.alpha-this.to.alpha)>.001&&(this.updateMask+=t.UPDATE_ALPHA),Math.abs(this.from.angle-this.to.angle)>.001&&(this.updateMask+=t.UPDATE_ANGLE),this.transformed.x=this.from.x,this.transformed.y=this.from.y,this.transformed.scaleX=this.from.scaleX,this.transformed.scaleY=this.from.scaleY,this.transformed.pivotX=this.from.pivotX,this.transformed.pivotY=this.from.pivotY,this.transformed.angle=this.from.angle,this.transformed.alpha=this.from.alpha},t.prototype.tween=function(e){var i=this.updateMask>0?this.getTweenTime(e):0;this.transformed.x=(this.updateMask&t.UPDATE_X)>0?n.linear(this.from.x,this.to.x,i):this.from.x,this.transformed.y=(this.updateMask&t.UPDATE_Y)>0?n.linear(this.from.y,this.to.y,i):this.from.y,this.transformed.scaleX=(this.updateMask&t.UPDATE_SCALE_X)>0?n.linear(this.from.scaleX,this.to.scaleX,i):this.from.scaleX,this.transformed.scaleY=(this.updateMask&t.UPDATE_SCALE_Y)>0?n.linear(this.from.scaleY,this.to.scaleY,i):this.from.scaleY,this.transformed.pivotX=(this.updateMask&t.UPDATE_PIVOT_X)>0?n.linear(this.from.pivotX,this.to.pivotX,i):this.from.pivotX,this.transformed.pivotY=(this.updateMask&t.UPDATE_PIVOT_Y)>0?n.linear(this.from.pivotY,this.to.pivotY,i):this.from.pivotY,this.transformed.alpha=(this.updateMask&t.UPDATE_ALPHA)>0?n.linear(this.from.alpha,this.to.alpha,i):this.from.alpha,this.transformed.angle=(this.updateMask&t.UPDATE_ANGLE)>0?n.angleLinear(this.from.angle,this.to.angle,this.key.spin,i):this.from.angle},t.prototype.update=function(t){this.transformed.angle*=Phaser.Math.sign(t.scaleX)*Phaser.Math.sign(t.scaleY),this.transformed.angle+=t.angle,this.transformed.scaleX*=t.scaleX,this.transformed.scaleY*=t.scaleY,this.scalePosition(t.scaleX,t.scaleY),this.rotatePosition(t.angle),this.translatePosition(t.x,t.y),this.transformed.alpha*=t.alpha},t.prototype.scalePosition=function(t,e){this.transformed.x*=t,this.transformed.y*=e},t.prototype.rotatePosition=function(t){var e=this.transformed.x,i=this.transformed.y;if(0!==e||0!==i){var n=t*(Math.PI/180),r=Math.cos(n),o=Math.sin(n);this.transformed.x=e*r-i*o,this.transformed.y=e*o+i*r}},t.prototype.translatePosition=function(t,e){this.transformed.x+=t,this.transformed.y+=e},t.prototype.getTweenTime=function(t){if(1===this.key.curveType)return 0;var e=Phaser.Math.clamp((t-this.timeFrom)/(this.timeTo-this.timeFrom),0,1);switch(this.key.curveType){case 0:return e;case 2:return n.quadratic(0,this.key.c1,1,e);case 3:return n.cubic(0,this.key.c1,this.key.c2,1,e);case 4:return n.quartic(0,this.key.c1,this.key.c2,this.key.c3,1,e);case 5:return n.quintic(0,this.key.c1,this.key.c2,this.key.c3,this.key.c4,1,e);case 6:return n.bezier(this.key.c1,this.key.c2,this.key.c3,this.key.c4,e)}return 0},t.UPDATE_X=1,t.UPDATE_Y=2,t.UPDATE_SCALE_X=4,t.UPDATE_SCALE_Y=8,t.UPDATE_PIVOT_X=16,t.UPDATE_PIVOT_Y=32,t.UPDATE_ANGLE=64,t.UPDATE_ALPHA=128,t}();e.SpriterBone=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NineImage=void 0;var n=function(){function t(){}return t.create=function(e,i,n,r,o,s,a,l,h,u,_,p){void 0===s&&(s=0),void 0===a&&(a=0),void 0===l&&(l=0),void 0===h&&(h=0),void 0===u&&(u=!1),void 0===_&&(_=!1),void 0===p&&(p=!1);var c,f=new Phaser.Image(e,0,0,r,o);return c="string"==typeof o?e.cache.getFrameByName(r,o):e.cache.getFrameByIndex(r,o),t._scaleCenterX=_,t._scaleCenterY=p,t.calculateNineImage(c,i,n,s,a,l,h,u),t._nineImage=new Phaser.BitmapData(e,"NineImage"+t._textureKey++,t._width,t._height),t.renderNineImage(f),t._nineImage},t.calculateNineImage=function(e,i,n,r,o,s,a,l){if(t._centralWidth=e.width-o-a,t._centralHeight=e.height-r-s,l)t._horizontalRepeats=i,t._verticalRepeats=n,t._width=o+a+t._centralWidth*i,t._height=r+s+t._centralHeight*n,t._lastWidth=0,t._lastHeight=0;else{var h=i-o-a;t._horizontalRepeats=Math.floor(h/t._centralWidth),t._lastWidth=h%t._centralWidth;var u=n-r-s;t._verticalRepeats=Math.floor(u/t._centralHeight),t._lastHeight=u%t._centralHeight,t._width=i,t._height=n}t._leftWidth=o,t._rightWidth=a,t._topHeight=r,t._bottomHeight=s},t.renderNineImage=function(e){var i=0,n=0;if(t._topHeight>0&&(t.renderNineImageRow(e,i,n,t._topHeight),i+=t._topHeight,n+=t._topHeight),t._scaleCenterY){var r=t._verticalRepeats*t._centralHeight+t._lastHeight;t.renderNineImageRow(e,i,n,t._centralHeight,r),n+=r}else{for(var o=0;o<t._verticalRepeats;o++)t.renderNineImageRow(e,i,n,t._centralHeight),n+=t._centralHeight;t._lastHeight>0&&(t.renderNineImageRow(e,i,n,t._lastHeight),n+=t._lastHeight)}i+=t._centralHeight,t._bottomHeight>0&&t.renderNineImageRow(e,i,n,t._bottomHeight)},t.renderNineImageRow=function(e,i,n,r,o){var s=0,a=0;if(o=o||r,t._leftWidth>0&&(t._nineImage.copy(e,s,i,t._leftWidth,r,a,n,t._leftWidth,o),a+=t._leftWidth,s+=t._leftWidth),t._scaleCenterX){var l=t._horizontalRepeats*t._centralWidth+t._lastWidth;t._nineImage.copy(e,s,i,t._centralWidth,r,a,n,l,o),a+=l}else{for(var h=0;h<t._horizontalRepeats;h++)t._nineImage.copy(e,s,i,t._centralWidth,r,a,n,t._centralWidth,o),a+=t._centralWidth;t._lastWidth>0&&(t._nineImage.copy(e,s,i,t._lastWidth,r,a,n,t._lastWidth,o),a+=t._lastWidth)}s+=t._centralWidth,t._rightWidth>0&&t._nineImage.copy(e,s,i,t._rightWidth,r,a,n,t._rightWidth,o)},t._textureKey=0,t}();e.NineImage=n},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.SkillPanel=void 0;var o=i(3),s=i(0),a=i(14),l=function(t){function e(e,i,n,r){var s=t.call(this,e,i)||this;s.onChange=new Phaser.Signal,s._title=null,s._score=null,s._icon=null,s._name=null,s._oldSkillScore=-1,s._title=s.createTitle(r),s._score=s.createScore(n),s._icon=s.createIcon(),s._name=s.createName(r),s.setPositions();var a=o.App.settings.data.skillScore;return s.setScore(a,!0),s}return r(e,t),e.prototype.createTitle=function(t){var i=new Phaser.BitmapText(this.game,0,0,"FontTiny",s.TextUtils.getText("SKILL_TITLE"),e.SKILL_FONT_SIZE,"center");return i.anchor.set(.5,.5),i.tint=t,this.add(i),i},e.prototype.createScore=function(t){var i=new Phaser.BitmapText(this.game,0,0,t,"",e.SCORE_FONT_SIZE,"center");return i.anchor.set(.5,.44),this.add(i),i},e.prototype.createIcon=function(){var t=this.game.add.sprite(0,0,"Sprites",null,this);return t.anchor.set(.5),t},e.prototype.createName=function(t){var i=new Phaser.BitmapText(this.game,0,0,"FontTiny","",e.SKILL_FONT_SIZE,"center");return i.anchor.set(.5,.5),i.tint=t,this.add(i),i},e.prototype.setPositions=function(){var t=0;this._score.position.set(-75,t),this._icon.position.set(75,t),t+=55,this._title.position.set(-75,t),this._name.position.set(75,t)},e.prototype.setScore=function(t,e){void 0===e&&(e=!1);var i=this._name.text;this._oldSkillScore!==t&&(this._score.text=t.toString(),this._oldSkillScore=t),this._icon.frameName=a.Skill.getIconForScore(t),this._name.text=a.Skill.getNameForScore(t),i===this._name.text||e||this.onChange.dispatch()},Object.defineProperty(e.prototype,"value",{get:function(){return this._oldSkillScore},set:function(t){this.setScore(Math.floor(t),!1)},enumerable:!1,configurable:!0}),e.TINT_LIGHT=10716134,e.TINT_DARK=921906,e.SKILL_FONT_SIZE=20,e.SCORE_FONT_SIZE=36,e}(Phaser.Group);e.SkillPanel=l},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollBar=void 0;var o=function(t){function e(e,i,n,r){void 0===r&&(r=!1);var o=t.call(this,e,i,n)||this;o._thumbBg=null,o._thumbSprite=null,o._onScreenEdge=!1;var s=e.device.desktop?"scrollBarDesktop":"scrollBar";return o._thumbBg=e.add.sprite(0,0,"Sprites",s,o),o._thumbBg.tint=2105376,o._thumbSprite=e.add.sprite(0,0,"Sprites",s,o),o._onScreenEdge=r,o}return r(e,t),e.prototype.resize=function(){t.prototype.resize.call(this),this.angle=this._isHorizontal?-90:0,this._thumbBg.y=this._marginStart,this._thumbBg.height=this._trackLength,this._thumbSprite.height=this._thumbLength,this._thumbSprite.y=(this._trackLength-this._thumbLength)*this._percent+this._marginStart},e.prototype.onPositionChange=function(t,e,i){var n=this.parent.toLocal(t.position,t.parent);this._isHorizontal?n.y+=t.viewSize.y+16:this._onScreenEdge?n.x=this.game.width/2-this._thumbSprite.width-11:n.x+=t.viewSize.x+30-this._thumbSprite.width,this.position.set(n.x,n.y)},e}(i(151).AbstractScrollBar);e.ScrollBar=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollBarPolicy=void 0,function(t){t[t.NEVER=0]="NEVER",t[t.ALWAYS=1]="ALWAYS",t[t.WHEN_NEEDED=2]="WHEN_NEEDED"}(e.ScrollBarPolicy||(e.ScrollBarPolicy={}))},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=this&&this.__spreadArrays||function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),r=0;for(e=0;e<i;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,r++)n[r]=o[s];return n};Object.defineProperty(e,"__esModule",{value:!0}),e.TutorialBaseDialog=void 0;var s=i(1),a=i(0),l=i(12),h=i(27),u=i(2),_=i(28),p=function(t){function e(e){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var r=t.apply(this,o([e],i))||this;return r._question=null,r._text=null,r._btnGotIt=null,r._dialogContainer.x=s.Config.WHEEL_X_OFFSET,r._dialogContainer.y=s.Config.WHEEL_Y_OFFSET-40,r.createButtons(),r}return r(e,t),e.prototype.createQuestion=function(t){this._question=new Phaser.BitmapText(this.game,0,-this._height/2+50,"SlantSmall",a.TextUtils.getText(t),e.TEXT_SIZE,"center"),this._question.anchor.set(.5,0),this._dialogContainer.add(this._question)},e.prototype.createText=function(t){var i=e.TEXT_EMPTY;null!==t&&(i=a.TextUtils.getText(t)),this._text=new _.AdvancedBitmapText(this.game,0,-this._height/2+120,e.TEXT_FONT_FACE,"",e.TEXT_FONT_SIZE,"center"),this._text.maxWidth=this._width-60,this._text.colors=u.Defs.TEXT_COLORS,this._text.text=i,this._text.anchor.set(.5,0),this._dialogContainer.add(this._text)},e.prototype.createButtons=function(){var t=this._height/2-80,e=new l.ChoiceButton(this.game,"GotIt","button_green","DIALOG_GOTIT");e.position.set(0,t),e.onClick.add(this.onCloseClicked,this),e.setActive(!0),this._dialogContainer.add(e),this._btnGotIt=e},e.prototype.enableInput=function(e){t.prototype.enableInput.call(this,e),this._btnGotIt.setEnabled(e),this._btnGotIt.button.input.priorityID=this.priority+1},e.TEXT_SIZE=36,e.TEXT_FONT_FACE="FontTiny",e.TEXT_FONT_SIZE=26,e.TEXT_EMPTY="",e}(h.DialogBase);e.TutorialBaseDialog=p},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AudioUtils=void 0;var n=i(3),r=function(){function t(){}return t.setSounds=function(e,i){void 0===i&&(i=null),t._sfx=e,t._sfxIds=i,t._isAudioSprite=null!==e&&e instanceof Phaser.AudioSprite},t.addSound=function(e,i){t._sfxs[e]=i},t.playSoundRnd=function(e,i,n){null!==e&&0!==e.length&&t.playSound(Phaser.ArrayUtils.getRandomItem(e,i,n))},t.playSound=function(e,i){void 0===i&&(i=1);var r=t.getSoundName(e);n.App.settings.soundOn&&(null!==t._sfx?t._isAudioSprite?t._sfx.play(r,i):t._sfx.play(r,0,i):void 0!==t._sfxs[r]&&t._sfxs[r].play("",0,i))},t.stopSound=function(e){var i=t.getSoundName(e);null!==t._sfx?t._isAudioSprite&&t._sfx.stop(i):void 0!==t._sfxs[i]&&t._sfxs[i].stop()},t.getSoundName=function(e){return"number"==typeof e?t._sfxIds[e]:e},Object.defineProperty(t,"currentMusic",{get:function(){return t._currentMusic},enumerable:!1,configurable:!0}),Object.defineProperty(t,"currentMusicSound",{get:function(){if(null==t._currentMusic||0===t._currentMusic.length)return null;var e=t._music[t._currentMusic];return e.isPlaying?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t,"isMusicPlaying",{get:function(){return null!==this._currentMusic&&0!==this._currentMusic.length&&t._music[t._currentMusic].isPlaying},enumerable:!1,configurable:!0}),t.addMusic=function(e,i){t._music[e]=i},t.playMusic=function(e,i){if(void 0===i&&(i=!0),t._currentMusic!==e&&(null!==t._currentMusic&&t._currentMusic.length>0&&t.stopMusic(),e in t._music&&n.App.settings.musicOn)){t._currentMusic=e;var r=t._music[e];r.loop=i,r.play(),i||r.onStop.addOnce((function(){t.onFinished.dispatch(e)}),this)}},t.stopMusic=function(){if(null!==t._currentMusic&&t._currentMusic.length>0){var e=t._music[t._currentMusic];e.isPlaying&&e.stop(),t._currentMusic=""}},t.pauseMusic=function(){if(null!==t._currentMusic&&t._currentMusic.length>0){var e=t._music[t._currentMusic];e.isPlaying&&e.pause()}},t.resumeMusic=function(){if(null!==t._currentMusic&&t._currentMusic.length>0){var e=t._music[t._currentMusic];e.paused&&e.resume()}},Object.defineProperty(t,"musicVolume",{set:function(e){if(null!=t._currentMusic&&0!==t._currentMusic.length){var i=t._music[t._currentMusic];i.isPlaying&&(i.volume=e)}},enumerable:!1,configurable:!0}),t._sfx=null,t._isAudioSprite=!1,t._sfxs={},t._music={},t._currentMusic="",t.onFinished=new Phaser.Signal,t}();e.AudioUtils=r},function(t,e,i){"use strict";var n=this&&this.__awaiter||function(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var i,n,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{i=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.StorageUtils=void 0;var o=function(){function t(){}return Object.defineProperty(t,"sponsorStorage",{set:function(e){t._sponsorStorage=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"allowMultipleRequests",{set:function(e){t._allowMultipleRequests=e},enumerable:!1,configurable:!0}),t.save=function(e,i){return n(this,void 0,void 0,(function(){var n,o,s;return r(this,(function(r){switch(r.label){case 0:if(!t._allowMultipleRequests&&t._requestsCounter>0)throw new Error("Previous load/save request was not finished yet");return++t._requestsCounter,null===(n=t._sponsorStorage)?[3,2]:[4,n.save(e,i)];case 1:if(r.sent(),!n.fallbackToStandardStorage())return--t._requestsCounter,[2];r.label=2;case 2:if(null===(o=t.getLocalStorage()))throw--t._requestsCounter,new Error("Standard storage not available");return s=JSON.stringify(i),o.setItem(e,s),--t._requestsCounter,[2]}}))}))},t.load=function(e){return n(this,void 0,void 0,(function(){var i,n,o,s;return r(this,(function(r){switch(r.label){case 0:if(!t._allowMultipleRequests&&t._requestsCounter>0)throw new Error("Previous load/save request was not finished yet");return++t._requestsCounter,i=null,null===(n=t._sponsorStorage)?[3,2]:[4,n.load(e)];case 1:if(null!=(i=r.sent())||!n.fallbackToStandardStorage())return--t._requestsCounter,[2,i];r.label=2;case 2:if(null===(o=t.getLocalStorage()))throw--t._requestsCounter,new Error("Standard storage not available");return s=o.getItem(e),i=JSON.parse(s),--t._requestsCounter,[2,i]}}))}))},t.getLocalStorage=function(){try{if("localStorage"in window&&null!=window.localStorage)return localStorage}catch(t){return null}return null},t._sponsorStorage=null,t._allowMultipleRequests=!0,t._requestsCounter=0,t}();e.StorageUtils=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParticlesManager=void 0;var n=function(){function t(){this._emitters=[],this._emittersCount=0}return Object.defineProperty(t,"instance",{get:function(){return null===t._instance&&(t._instance=new t),t._instance},enumerable:!1,configurable:!0}),t.prototype.add=function(t){this._emitters[this._emittersCount++]=t},t.prototype.remove=function(t){for(var e=this._emittersCount-1;e>=0&&this._emitters[e]!==t;e--);-1!==e&&(this._emitters[e]=this._emitters[--this._emittersCount])},t.prototype.update=function(){for(var t=0;t<this._emittersCount;t++){var e=this._emitters[t];e.exists&&e.update()}},t._instance=null,t}();e.ParticlesManager=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParticleParams=void 0;var n=i(33),r=function(){function t(t){this.area=new Phaser.Point(0,0),this.gravity=0,this.gravityX=0,this.minLifetime=1,this.maxLifetime=1,this.delay=0,this.minScale=1,this.maxScale=1,this.scaleChange=0,this.scaleChangeType=n.eParameterChangeType.NO_CHANGE,this.minAngle=0,this.maxAngle=0,this.minSpeedX=0,this.maxSpeedX=0,this.minSpeedY=0,this.maxSpeedY=0,this.friction=0,this.minAngularSpeed=0,this.maxAngularSpeed=0,this.angularDrag=0,this.minAlpha=1,this.maxAlpha=1,this.alphaChange=0,this.alphaChangeType=n.eParameterChangeType.NO_CHANGE,this.frames=null,this._minAdvScale=new Phaser.Point(1,1),this._maxAdvScale=new Phaser.Point(1,1),this._game=t}return t.readParams=function(e,i){var n={};for(var r in i){var o=new t(e);t.doReadParams(o,i,r),n[r]=o}return n},t.doReadParams=function(e,i,n){var r=i[n];if(void 0!==r.parent&&null!==r.parent){var o=r.parent;t.doReadParams(e,i,o)}for(var s in r)"parent"!==s&&(e[s],e[s]=r[s])},t.prototype.clear=function(){this.gravity=this.gravityX=0,this.setXSpeed(0,0),this.setYSpeed(0,0),this.setAngularSpeed(0)},t.prototype.randomFrame=function(){var t=null;return null!==this.frames&&(t=Array.isArray(this.frames)?(this.frames[0],this._game.rnd.pick(this.frames)):this.frames),t},t.prototype.setXSpeed=function(t,e){t=t||0,e=e||0,this.minSpeedX=t,this.maxSpeedX=e},t.prototype.setYSpeed=function(t,e){t=t||0,e=e||0,this.minSpeedY=t,this.maxSpeedY=e},t.prototype.setAngularSpeed=function(t,e){t=t||0,e=e||0,this.minAngularSpeed=t,this.maxAngularSpeed=e},t.prototype.setAlpha=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1),this.minAlpha=t,this.maxAlpha=e},t.prototype.setAlphaChange=function(t,e,i){switch(void 0===e&&(e=0),void 0===i&&(i=0),this.alphaChangeType=t,t){case n.eParameterChangeType.NO_CHANGE:this.alphaChange=0;break;case n.eParameterChangeType.IN_TIME:0===i&&(i=1),this.alphaChange=e/i}},t.prototype.setScale=function(t,e){t=t||0,e=e||0,this.minScale=t,this.maxScale=e},Object.defineProperty(t.prototype,"advScaleMin",{get:function(){return this._minAdvScale},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"advScaleMax",{get:function(){return this._maxAdvScale},enumerable:!1,configurable:!0}),t.prototype.setAdvScale=function(t,e,i,n){void 0===t&&(t=1),void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),this._minAdvScale.setTo(t,i),this._maxAdvScale.setTo(e,n)},t.prototype.setScaleChange=function(t,e,i){switch(void 0===e&&(e=0),void 0===i&&(i=0),this.scaleChangeType=t,t){case n.eParameterChangeType.NO_CHANGE:this.scaleChange=0;break;case n.eParameterChangeType.IN_TIME:0===i&&(i=1),this.scaleChange=e/i}},t.prototype.setAngle=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.minAngle=t,this.maxAngle=e},t}();e.ParticleParams=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Particle=void 0;var n=i(33),r=function(){function t(e,i){this.maxVelocity=t.MAX_VELOCITY,this._delay=0,this._velocity=new Phaser.Point(0,0),this._angularVelocity=0,this._friction=0,this._angularDrag=0,this._gravity=0,this._gravityX=0,this._alpha=1,this._scaleChange=0,this._alphaChange=0,this._game=e}return Object.defineProperty(t.prototype,"visual",{get:function(){return this._visual},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"on",{set:function(t){this._on=t,this._visual.exists=t,this._visual.visible=t},enumerable:!1,configurable:!0}),t.prototype.remove=function(){var t=this._visual.parent;null!==t&&(t instanceof Phaser.Group?t.remove(this._visual):t.removeChild(this._visual),t=null)},t.prototype.bringToTop=function(){var t=this._visual.parent;t instanceof Phaser.Group&&t.bringToTop(this._visual)},t.prototype.sendToBack=function(){var t=this._visual.parent;t instanceof Phaser.Group&&t.sendToBack(this._visual)},Object.defineProperty(t.prototype,"textureKey",{set:function(t){this._textureKey=t},enumerable:!1,configurable:!0}),t.prototype.setScaleChange=function(t,e){void 0===e&&(e=0),this._scaleChangeType=t,this._scaleChange=e},Object.defineProperty(t.prototype,"delay",{set:function(t){this._delay=t,t>0&&(this.on=!1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alpha",{set:function(t){this._alpha=t,this._visual.alpha=Phaser.Math.clamp(t,0,1)},enumerable:!1,configurable:!0}),t.prototype.setAlphaChange=function(t,e){void 0===e&&(e=0),this._alphaChangeType=t,this._alphaChange=e},t.prototype.setPhysics=function(t,e,i,n,r,o,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===o&&(o=0),void 0===s&&(s=0),this._velocity.setTo(t,e),this._angularVelocity=i,this._friction=n,this._angularDrag=r,this._gravity=o,this._gravityX=s,this._simplePhysics=0===o&&0===s&&0===n&&0===r},Object.defineProperty(t.prototype,"velocity",{get:function(){return this._velocity},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gravity",{get:function(){return this._gravity},set:function(t){this._gravity=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gravityX",{get:function(){return this._gravityX},set:function(t){this._gravityX=t},enumerable:!1,configurable:!0}),t.prototype.setFrame=function(t){},t.prototype.onEmit=function(t){t.add(this._visual)},t.prototype.onKill=function(t){},t.prototype.update=function(t){void 0===t&&(t=!0);var e=this._game.time.physicsElapsed;if(this._delay>0){if((this._delay-=e)>0)return!0;this.on=!0}if(this.lifetime>0&&(this.lifetime-=e)<=0)return!1;if(0===this._velocity.x&&0===this._velocity.y||(this._visual.x+=this._velocity.x*e,this._visual.y+=this._velocity.y*e),0!==this._angularVelocity&&(this._visual.angle+=this._angularVelocity*e),this._simplePhysics||(this._velocity.x+=(this._gravityX-this._friction*this._velocity.x)*e,this._velocity.y+=(this._gravity-this._friction*this._velocity.y)*e,this._angularVelocity+=-this._angularDrag*this._angularVelocity*e),!t)return!0;if(this._scaleChangeType!=n.eParameterChangeType.NO_CHANGE)switch(this._scaleChangeType){case n.eParameterChangeType.IN_TIME:(this._visual.scale.x+=this._scaleChange*e)<0&&(this._visual.scale.x=0,this._scaleChange<0&&(this._scaleChangeType=n.eParameterChangeType.NO_CHANGE)),(this._visual.scale.y+=this._scaleChange*e)<0&&(this._visual.scale.y=0,this._scaleChange<0&&(this._scaleChangeType=n.eParameterChangeType.NO_CHANGE))}if(this._alphaChangeType!=n.eParameterChangeType.NO_CHANGE)switch(this._alphaChangeType){case n.eParameterChangeType.IN_TIME:this._alpha+=this._alphaChange*e,this._alpha<0?(this._visual.alpha=0,this._alphaChange<0&&(this._alphaChangeType=n.eParameterChangeType.NO_CHANGE)):this._alpha>1?(this._visual.alpha=1,this._alphaChange>0&&(this._alphaChangeType=n.eParameterChangeType.NO_CHANGE)):this._visual.alpha=this._alpha}return!0},t.MAX_VELOCITY=1e3,t}();e.Particle=r},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.BezierQuadratic=e.BeziereQuadraticDirection=void 0,function(t){t[t.RANDOM=0]="RANDOM",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT"}(n=e.BeziereQuadraticDirection||(e.BeziereQuadraticDirection={}));var r=function(){function t(){this._points=[],this._result=new Phaser.Point;for(var t=0;t<3;t++)this._points.push(new Phaser.Point);this._start=this._points[0],this._mid=this._points[1],this._end=this._points[2]}return t.prototype.draw=function(t){var e=new Phaser.Line;e.start.set(this._start.x,this._start.y);for(var i=1;i<=100;i++){var n=this.at(i/100);e.end.set(n.x,n.y),t.geom(e,"RGBA(0, 255, 0, 1)"),e.start.copyFrom(e.end)}for(i=0;i<this._points.length;i++){var r=new Phaser.Circle(this._points[i].x,this._points[i].y,8);t.geom(r,"RGBA(255, 0, 0, 1)")}},t.prototype.set=function(t,e,i,r,o,s,a){void 0===o&&(o=n.RANDOM),void 0===s&&(s=.5),void 0===a&&(a=.5),this._start.set(t,e),this._end.set(i,r);var l=(i-t)*s,h=(r-e)*s;this._mid.set(h,l),o===n.RIGHT||o===n.RANDOM&&Math.random()<.5?this._mid.x*=-1:this._mid.y*=-1,this._mid.setMagnitude(Phaser.Math.distance(t,e,i,r)*a),this._mid.add(t+l,e+h)},t.prototype.at=function(t){return this._result.x=Phaser.Math.linear(Phaser.Math.linear(this._start.x,this._mid.x,t),Phaser.Math.linear(this._mid.x,this._end.x,t),t),this._result.y=Phaser.Math.linear(Phaser.Math.linear(this._start.y,this._mid.y,t),Phaser.Math.linear(this._mid.y,this._end.y,t),t),this._result},t}();e.BezierQuadratic=r},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.BulbsManager=e.BulbColors=void 0;var o,s,a=i(6),l=i(108),h=i(2);!function(t){t[t.NONE=0]="NONE",t[t.FLASH_ALL=1]="FLASH_ALL",t[t.FLASH_SEQUENCE=2]="FLASH_SEQUENCE"}(o||(o={})),function(t){t[t.DEFAULT=0]="DEFAULT",t[t.PURPLE=1]="PURPLE",t[t.YELLOW=2]="YELLOW"}(s=e.BulbColors||(e.BulbColors={}));var u=function(t){function e(e,i,n,r){var s=t.call(this,e,i)||this;s._emitter=null,s._bulbDefs=null,s._state=o.NONE,s._lifetime=0,s._delay=0,s._time=0,s._index=0,s._count=0,s._direction=1,s._bulbsCount=1,s._positions=[],s._bulbs=[],s._bulbDefs=r;for(var a=2*Math.PI/r.length,h=0;h<r.length;h++){var u=new Phaser.Point(Math.cos(a*h)*n,Math.sin(a*h)*n);s._positions.push(u);var _=new l.Bulb(e,u.x,u.y,r[h]);s.add(_),s._bulbs.push(_)}return s}return r(e,t),Object.defineProperty(e.prototype,"emitter",{set:function(t){this._emitter=t},enumerable:!1,configurable:!0}),e.prototype.clear=function(){this._state=o.NONE},e.prototype.setColors=function(t){for(var e=t===s.PURPLE?h.Defs.BULB_WEDGE_PURPLE:h.Defs.BULB_WEDGE_YELLOW,i=0;i<this._bulbs.length;i++)t===s.DEFAULT&&(e=this._bulbDefs[i]),this._bulbs[i].setDef(e)},e.prototype.flashAll=function(t,i,n){this._delay=void 0!==t?t:e.FLASH_ALL_DELAY,this._lifetime=void 0!==i?i/1e3:e.BULB_LIFETIME,this._count=void 0!==n?n:-1,this._time=this._delay,this._index=0,this._state=o.FLASH_ALL},e.prototype.flashSequence=function(t,i,n,r,s){this._delay=void 0!==t?t:e.FLASH_SEQUENCE_DELAY,this._lifetime=void 0!==i?i/1e3:e.BULB_LIFETIME,this._count=void 0!==n?n:-1,this._direction=void 0!==n&&r?-1:1,this._bulbsCount=void 0!==s?s:1,this._time=this._delay,this._index=0,this._state=o.FLASH_SEQUENCE},e.prototype.updateBulbs=function(t){if(this._state===o.NONE)return!1;this._time+=t;for(var e=!1;this._time>this._delay;){switch(this._state){case o.FLASH_ALL:e=this.doFlashAll();break;case o.FLASH_SEQUENCE:e=this.doFlashSequence()}this._time-=this._delay}return e},e.prototype.emitParticle=function(t,e,i){this._emitter.emitAt(t,e);var n=this._emitter.emitParticle();if(null!==n){n.lifetime=this._lifetime;var r=n.visual;r.frameName=i.lightFrame,r.tint=i.lightTint}return n},e.prototype.doFlashAll=function(){for(var t=0;t<this._bulbs.length;t++){var e=this._positions[t].x,i=this._positions[t].y;this.emitParticle(e,i,this._bulbs[t])}return this._count>0&&0==--this._count&&(this.clear(),!0)},e.prototype.doFlashSequence=function(){var t=this._index,e=Math.floor(this._bulbs.length/this._bulbsCount),i=0;do{var n=this._positions[t].x,r=this._positions[t].y;this.emitParticle(n,r,this._bulbs[t]),t=a.MathHelp.modulo(t+e*this._direction,this._bulbDefs.length),++i}while(i<this._bulbsCount);return this._index=a.MathHelp.modulo(this._index+this._direction,this._bulbDefs.length),this._count>0&&0===this._index&&0==--this._count&&(this.clear(),!0)},e.BULB_LIFETIME=.2,e.FLASH_ALL_DELAY=1e3,e.FLASH_SEQUENCE_DELAY=500,e}(Phaser.Group);e.BulbsManager=u},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.Rod=e.RodColor=void 0;var o,s=i(6),a=i(2);!function(t){t[t.DEFAULT=0]="DEFAULT",t[t.PURPLE=1]="PURPLE",t[t.YELLOW=2]="YELLOW"}(o=e.RodColor||(e.RodColor={}));var l=function(t){function e(i,n,r){var s=t.call(this,i,0,0,"Sprites",0)||this;s._defaultDef=null,s._def=null,s._duration=0,s._on=!1,s._minPos=null,s._maxPos=null,s._time=0,s._speed=0,s.anchor.set(0,.5),s.angle=r.angle,n.add(s),s._defaultDef=r;var a=Phaser.Math.degToRad(r.angle),l=i.rnd.integerInRange(e.MAX_RADIUS_MIN,e.MAX_RADIUS_MAX);return s._minPos=new Phaser.Point(Math.cos(a)*e.MIN_RADIUS,Math.sin(a)*e.MIN_RADIUS),s._maxPos=new Phaser.Point(Math.cos(a)*l,Math.sin(a)*l),s.randomizeSpeed(),s._time=i.rnd.integerInRange(0,s._speed),s.setColor(o.DEFAULT),s.setOff(),s.updatePosition(0),s}return r(e,t),Object.defineProperty(e.prototype,"def",{get:function(){return this._def},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"on",{get:function(){return this._on},enumerable:!1,configurable:!0}),e.prototype.setColor=function(t){switch(t){case o.DEFAULT:this._def=this._defaultDef;break;case o.PURPLE:this._def=a.Defs.ROD_PURPLE;break;case o.YELLOW:this._def=a.Defs.ROD_YELLOW}},e.prototype.setOn=function(t){this.frameName=this._def.frameOn,this._duration=t,this._on=!0},e.prototype.setOff=function(){this.frameName=this._def.frameOff,this._on=!1},e.prototype.randomizeSpeed=function(){this._speed=this.game.rnd.integerInRange(e.MOVEMENT_DURATION_MIN,e.MOVEMENT_DURATION_MAX)},e.prototype.updateFrame=function(t){this._on&&this._duration>0&&(this._duration-=t)<=0&&this.setOff()},e.prototype.updatePosition=function(t){this._time+=t;var e=s.MathHelp.pingPong(this._time,this._speed)/this._speed;e=(Math.sin(Math.PI*e-Math.PI/2)+1)/2,this.position.set(Phaser.Math.linear(this._minPos.x,this._maxPos.x,e),Phaser.Math.linear(this._minPos.y,this._maxPos.y,e))},e.MOVEMENT_DURATION_MIN=7e3,e.MOVEMENT_DURATION_MAX=11e3,e.MIN_RADIUS=20,e.MAX_RADIUS_MIN=90,e.MAX_RADIUS_MAX=130,e}(Phaser.Sprite);e.Rod=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimelineManager=void 0;var n=i(22),r=function(){function t(){this._timelines={}}return t.prototype.clear=function(){for(var t in this._timelines)this._timelines[t].clear();this._timelines={}},t.prototype.get=function(t){var e=this._timelines[t];return void 0===e?null:e},t.prototype.add=function(t,e){if(void 0!==this._timelines[t])return null;var i=new n.Timeline(t,e);return this._timelines[t]=i,i},t.prototype.remove=function(t){var e=this.get(t);return delete this._timelines[t],e},t.prototype.update=function(t){for(var e in this._timelines)this._timelines[e].update(t)},t}();e.TimelineManager=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Spriter=void 0;var n=i(24),r=function(){function t(){this._folders=new n.IdNameMap,this._tags=new n.IdNameMap,this._entities=new n.IdNameMap}return t.prototype.addFolder=function(t){this._folders.add(t,t.id,t.name)},t.prototype.getFolderById=function(t){return this._folders.getById(t)},t.prototype.getFolderByName=function(t){return this._folders.getByName(t)},t.prototype.addEntity=function(t){this._entities.add(t,t.id,t.name)},t.prototype.getEntityById=function(t){return this._entities.getById(t)},t.prototype.getEntityByName=function(t){return this._entities.getByName(t)},t.prototype.addTag=function(t){this._tags.add(t,t.id,t.name)},t.prototype.getTagById=function(t){return this._tags.getById(t)},t.prototype.getTagByName=function(t){return this._tags.getByName(t)},Object.defineProperty(t.prototype,"tagsLength",{get:function(){return this._tags.length},enumerable:!1,configurable:!0}),t}();e.Spriter=r},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.CharMap=void 0;var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.put=function(t,e){void 0===this._map&&(this._map={}),this._map[t],this._map[t]=e},e.prototype.value=function(t){return this._map[t]},e}(i(4).Item);e.CharMap=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.KeyTimeline=void 0;var o=i(10),s=i(26),a=function(t){function e(e,i,n){var r=t.call(this,e,i)||this;return r._info=new s.SpatialInfo,r._spin=n,r.setCurve(0),r}return r(e,t),e.prototype.setCurve=function(t,e,i,n,r){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=0),this._curveType=t,this._c1=e,this._c2=i,this._c3=n,this._c4=r},Object.defineProperty(e.prototype,"spin",{get:function(){return this._spin},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"curveType",{get:function(){return this._curveType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"c1",{get:function(){return this._c1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"c2",{get:function(){return this._c2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"c3",{get:function(){return this._c3},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"c4",{get:function(){return this._c4},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"info",{get:function(){return this._info},enumerable:!1,configurable:!0}),e}(o.Key);e.KeyTimeline=a},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.KeyTag=void 0;var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"tagsOn",{get:function(){return this._tagsOn},set:function(t){this._tagsOn=t},enumerable:!1,configurable:!0}),e}(i(10).Key);e.KeyTag=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.KeyVariable=void 0;var o=function(t){function e(e,i,n){var r=t.call(this,e,i)||this;return r._value=n,r}return r(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),e}(i(10).Key);e.KeyVariable=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.Varline=void 0;var o=i(9),s=function(t){function e(e,i){var n=t.call(this,e,null)||this;return n._varDefId=i,n.type=o.eTimelineType.VAR_LINE,n}return r(e,t),Object.defineProperty(e.prototype,"varDefId",{get:function(){return this._varDefId},enumerable:!1,configurable:!0}),e}(o.Baseline);e.Varline=s},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.SpriterObject=void 0;var o=function(t){function e(e,i){var n=t.call(this)||this;return n._spriter=e.spriter,n._charMapStack=e.charMapStack,n._sprite=i,n}return r(e,t),Object.defineProperty(e.prototype,"sprite",{get:function(){return this._sprite},enumerable:!1,configurable:!0}),e.prototype.setOn=function(e,i){void 0===i&&(i=!1),t.prototype.setOn.call(this,e),this._sprite.exists=e&&!i,this._sprite.visible=e&&!this._hide&&!i},e.prototype.setKey=function(e,i,n,r){if(t.prototype.setKey.call(this,e,i,n,r),0===this.type){var o=this.key,s=this._spriter.getFolderById(o.folder).getFileById(o.file);this._file=s,this.setFile(s)}else this._file=null},e.prototype.resetFile=function(){0===this.type&&this.setFile(this._file)},e.prototype.setFile=function(t){null!==(t=this._charMapStack.getFile(t))?(this._hide=!1,this._sprite.frameName=t.name):(this._hide=!0,this._sprite.visible=!1)},e.prototype.updateSprite=function(){var t=this.transformed,e=this.sprite;e.position.set(t.x,t.y),e.scale.set(t.scaleX,t.scaleY),e.anchor.set(t.pivotX,t.pivotY),e.alpha=t.alpha,e.angle=t.angle},e}(i(45).SpriterBone);e.SpriterObject=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=void 0;var o=function(t){function e(e,i,n,r,o,s){var a=t.call(this,e,i,n,r,s,o)||this;return a._toggled=!1,a._changeOnDown=!0,a._frameToggled=o,a._frameUntoggled=r,a._frameToggledDown=o,a._frameUntoggledDown=r,a.toggled=a._toggled,a}return r(e,t),e.prototype.setDownFrames=function(t,e){void 0!==e&&(this._frameToggledDown=e),void 0!==t&&(this._frameUntoggledDown=t)},Object.defineProperty(e.prototype,"toggled",{get:function(){return this._toggled},set:function(t){this._toggled=t,t?(this._button.setFrames(null,this._frameToggled,this._frameToggledDown,this._frameToggled),this._changeOnDown&&(this._button.frameName=this._frameToggled)):(this._button.setFrames(null,this._frameUntoggled,this._frameUntoggledDown,this._frameUntoggled),this._changeOnDown&&(this._button.frameName=this._frameUntoggled))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"changeOnDown",{get:function(){return this._changeOnDown},set:function(t){this._changeOnDown=t},enumerable:!1,configurable:!0}),e.prototype.downEvent=function(){this.setButton(this._over,!0),this._changeOnDown&&(this.toggled=!this.toggled),this.downAction(),this.onDown.dispatch(this,this._toggled)},e.prototype.upEvent=function(t,e,i){this.setButton(this._over,!1),this.upAction(),i&&(this._changeOnDown||(this.toggled=!this.toggled),this.onClick.dispatch(this,this._toggled))},e}(i(11).Button);e.Toggle=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.InGameHUD=void 0;var o=i(11),s=i(67),a=i(3),l=function(t){function e(e,i,n){void 0===n&&(n=!1);var r=t.call(this,e,i)||this;return r.onHUDButton=new Phaser.Signal,r._bg=null,r._sound=null,r._music=null,r._quit=null,r._help=null,r._bg=e.add.sprite(0,0,"Sprites",n?"zvuk_bg":"zvuk_exit_bg",r),r._bg.anchor.set(0,0),r._sound=r.createToggle("Sound","zvuk_exit_zvuk_off_idle","zvuk_exit_zvuk_idle","zvuk_exit_zvuk_off_hit","zvuk_exit_zvuk_hit"),r._sound.toggled=a.App.settings.soundOn,r._music=r.createToggle("Music","zvuk_exit_music_off_idle","zvuk_exit_music_idle","zvuk_exit_music_off_hit","zvuk_exit_music_hit"),r._music.toggled=a.App.settings.musicOn,n||(r._quit=r.createExitButton(),r._help=r.createHelpButton()),r.enable(!0,1),r.setPositions(),r}return r(e,t),e.prototype.createToggle=function(t,i,n,r,o){var a=new s.Toggle(this.game,t,"Sprites",i,n);return a.setDownFrames(r,o),a.downAction=function(){},a.scaleOnOver.set(e.SCALE_ON_DOWN),a.changeOnDown=!1,a.onClick.add(this.onButtonClick,this),this.add(a),a},e.prototype.createExitButton=function(){var t=new o.Button(this.game,"Exit","Sprites","zvuk_exit_exit_idle",!1,"zvuk_exit_exit_hit");return t.scaleOnOver.set(e.SCALE_ON_DOWN),t.onClick.add(this.onButtonClick,this),this.add(t),t},e.prototype.createHelpButton=function(){var t=new o.Button(this.game,"Help","Sprites","zvuk_exit_help_idle",!1,"zvuk_exit_help_hit");return t.scaleOnOver.set(e.SCALE_ON_DOWN),t.onClick.add(this.onButtonClick,this),this.add(t),t},e.prototype.setPositions=function(){null===this._quit?(this._sound.position.set(36,29),this._music.position.set(this._bg.width/2,86)):(this._quit.position.set(this._bg.width/2,29),this._sound.position.set(this._bg.width/2,86),this._music.position.set(this._bg.width/2,145),this._help.position.set(this._bg.width/2,202))},e.prototype.enable=function(t,e){null!==this._quit&&(this._quit.button.inputEnabled=t,t&&(this._quit.button.input.priorityID=e)),null!==this._sound&&(this._sound.button.inputEnabled=t,t&&(this._sound.button.input.priorityID=e)),null!==this._music&&(this._music.button.inputEnabled=t,t&&(this._music.button.input.priorityID=e)),null!==this._help&&(this._help.button.inputEnabled=t,t&&(this._help.button.input.priorityID=e))},e.prototype.onButtonClick=function(t){this.onHUDButton.dispatch(t)},e.SCALE_ON_DOWN=1.15,e}(Phaser.Group);e.InGameHUD=l},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.PlayBg=void 0;var o=i(1),s=i(70),a=i(2),l=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._stripsTop=null,n._stripsBottom=null,n._lightLeft=null,n._lightRight=null,n.createStrips(),n.createLights(),n.interpolateColor(0),n}return r(e,t),Object.defineProperty(e.prototype,"lightOffset",{set:function(t){var e=-this.game.height/2,i=-this.game.width/2,n=-368*t,r=-704*t;this._lightLeft.position.set(i+r,e+n),this._lightRight.position.set(-(i+r),e+n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stripsOffset",{set:function(t){var e=Phaser.Math.linear(o.Config.WHEEL_X_OFFSET,0,t);this._stripsTop.x=e,this._stripsBottom.x=e},enumerable:!1,configurable:!0}),e.prototype.onResize=function(t,e){var i=-e/2;this._stripsTop.position.set(o.Config.WHEEL_X_OFFSET,i),this._stripsBottom.position.set(o.Config.WHEEL_X_OFFSET,-i),this._lightLeft.position.set(-t/2,i),this._lightRight.position.set(t/2,i)},e.prototype.createStrips=function(){var t=this.game.add.sprite(0,0,"Sprites","bg_01_top",this);t.anchor.set(.5,0),this._stripsTop=t,(t=this.game.add.sprite(0,0,"Sprites","bg_01_top",this)).anchor.set(.5,0),t.scale.y=-1,this._stripsBottom=t},e.prototype.createLights=function(){var t=this.game.add.sprite(0,0,"Sprites","bg_02_reflektor_left",this);t.scale.set(4),this._lightLeft=t,(t=this.game.add.sprite(0,0,"Sprites","bg_02_reflektor_right",this)).anchor.set(1,0),t.scale.set(4),this._lightRight=t},e.prototype.interpolateColor=function(t){this.game.stage.backgroundColor=s.ColorUtils.interpolateTint(a.Defs.COLOR_BG,a.Defs.COLOR_BG_RED,t);var i=s.ColorUtils.interpolateTint(e.COLOR_FROM,e.COLOR_TO,t);this._stripsTop.tint=i,this._stripsBottom.tint=i,this._lightLeft.tint=i,this._lightRight.tint=i},e.COLOR_FROM=2304897,e.COLOR_TO=9976913,e}(Phaser.Group);e.PlayBg=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorUtils=void 0;var n=function(){function t(){}return t.interpolateTint=function(t,e,i){var n=t>>16&255,r=t>>8&255,o=255&t,s=e>>16&255,a=e>>8&255,l=255&e;return Phaser.Math.linear(n,s,i)<<16|Phaser.Math.linear(r,a,i)<<8|Phaser.Math.linear(o,l,i)},t}();e.ColorUtils=n},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.Spinner=void 0;var o=i(1),s=i(19),a=i(2),l=i(136),h=i(6),u=i(8),_=i(57),p=i(138),c=i(139),f=i(140),d=i(141),g=i(0),y=i(3),m=function(t){function e(i){var n=t.call(this,i)||this;n.onSpinResult=new Phaser.Signal,n.onSpinnerClicked=new Phaser.Signal,n.onInnerBulbsFinished=new Phaser.Signal,n.onOuterBulbsFinished=new Phaser.Signal,n.onSliceRemoved=new Phaser.Signal,n.onLandedAnimated=new Phaser.Signal,n._rods=null,n._rodsManager=null,n._bgLight=null,n._rotatingGroup=null,n._slicesGroup=null,n._numsLinesGroup=null,n._wheelFg=null,n._button=null,n._bulbParticles=null,n._innerBulbs=null,n._outerBulbs=null,n._arrow=null,n._slicesPool=null,n._numsPool=null,n._linesPool=null,n._slices=null,n._templateSlice=null,n._sliceBM=null,n._sliceUnderArrow=null,n._prevAngle=0,n._spinnerRunning=!1,n._spinnerTime=0,n._duration=0,n._startAngle=0,n._targetAngle=0,n._resultIndex=-1,n._animateShift=!1,n._shiftTime=0,n._landedValue=0,n._animateIdle=!1,n._idleIndex=0,n._idleTime=0,n._animateLanded=!1,n._animateLandedDuration=0,n._animateLandedTime=0,n._animateCenterNumber=!1,n._moveNumberIntoCenter=!0,n._fastForward=!1,n._anglePosition=0,n._oldSliceArc=0,n._sliceArc=0,n._rods=new Phaser.Group(i,n),n._rodsManager=new c.RodsManager(i,n._rods),n._bgLight=i.add.sprite(0,0,"Sprites","wheel_bg_add_light",n),n._bgLight.scale.set(1.9),n._bgLight.anchor.set(.5),n._bgLight.alpha=.5,n._rotatingGroup=new Phaser.Group(i,n),n._slicesGroup=new Phaser.Group(i,n._rotatingGroup),n._numsLinesGroup=new Phaser.Group(i,n._rotatingGroup),n._wheelFg=i.add.sprite(0,0,"Sprites","wheel_fg",n._rotatingGroup),n._wheelFg.anchor.set(.5),n._button=new f.SpinnerButton(i),n._button.onClick.add(n.onButton,n),n.add(n._button),n._innerBulbs=new _.BulbsManager(i,n._rotatingGroup,104,a.Defs.INNER_BULBS),n._outerBulbs=new _.BulbsManager(i,n._rotatingGroup,258,a.Defs.OUTER_BULBS);var r=new u.ParticlesEmitter(n.game,0,0,e.BULB_PARTICLES_MAX);return r.minScale=r.maxScale=1.25,r.makeParticles("Sprites","wheel_bulb_light_add",e.BULB_PARTICLES_MAX),n.add(r),n._bulbParticles=r,n._innerBulbs.emitter=r,n._outerBulbs.emitter=r,n._arrow=i.add.sprite(0,-280,"Sprites","wheel_arrow",n),n._arrow.anchor.set(.5,0),n._centerNumber=new d.SpinnerCenterNumber(i,n,n._button),n.createTemplateSlice(),n.createPools(i),n.onDestroy.add((function(){null!==this._sliceBM&&(this._sliceBM.destroy(),this._sliceBM=null)}),n),n}return r(e,t),Object.defineProperty(e.prototype,"resultIndex",{get:function(){return this._resultIndex},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"innerBulbs",{get:function(){return this._innerBulbs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"outerBulbs",{get:function(){return this._outerBulbs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rodsManager",{get:function(){return this._rodsManager},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isIdle",{get:function(){return this._animateIdle},enumerable:!1,configurable:!0}),Object.defineProperty(e,"instance",{get:function(){return null===e._instance&&(e._instance=new e(y.App.game)),e._instance},enumerable:!1,configurable:!0}),e.prototype.clearSignals=function(){this.onSpinResult.removeAll(),this.onSpinnerClicked.removeAll(),this.onInnerBulbsFinished.removeAll(),this.onOuterBulbsFinished.removeAll(),this.onSliceRemoved.removeAll(),this.onLandedAnimated.removeAll()},e.prototype.createTemplateSlice=function(){this._templateSlice=new Phaser.Sprite(this.game,0,0,"Sprites","wheel_wb"),this._sliceBM=this.game.make.bitmapData(this._templateSlice.width,this._templateSlice.height)},e.prototype.drawSliceTemplate=function(t){this._sliceBM.clear(),this._sliceBM.copy(this._templateSlice,null,null,null,null,this._templateSlice.width/2,0,null,null,Phaser.Math.degToRad(t),.5,1,1,1)},e.prototype.createPools=function(t){this._slicesPool=new l.Pool(p.SpinnerSlice,o.Config.NUMBERS_MAX,(function(){var e=new p.SpinnerSlice(t);return e.anchor.set(.5,0),e})),this._numsPool=new l.Pool(Phaser.Sprite,2*o.Config.NUMBERS_MAX,(function(){var e=new Phaser.Sprite(t,0,0,"Sprites");return e.anchor.set(.5,.5),e})),this._linesPool=new l.Pool(Phaser.Sprite,2*o.Config.NUMBERS_MAX,(function(){var e=new Phaser.Sprite(t,0,0,"Sprites","wheel_line");return e.anchor.set(0,.5),e}))},e.prototype.normalizeAngle=function(t){for(;t<0;)t+=360;for(;t>=360;)t-=360;return t},e.prototype.loop=function(t,e){if(!(t<0||t>=this._slices.length)){var i=t;do{if(e.call(this,i,this._slices[i]))return;i=(i+1)%this._slices.length}while(i!=t)}},e.prototype.buildWheel=function(t){this.destroyWheel();var i=360/o.Config.NUMBERS_MAX;this.drawSliceTemplate(i),this._sliceArc=this._oldSliceArc=i,this._slices=[];for(var n=0,r=0;r<o.Config.NUMBERS_MAX;r++){var s=t[r],l=this._slicesPool.spawn();this._slicesGroup.add(l),l.loadTexture(this._sliceBM),l.value=s,l.setSliceAngle(n,i),l.tint=a.Defs.COLOR_HIGHER;var h=this._linesPool.spawn();h.position.set(0,0),h.angle=l.sliceLeft,this._numsLinesGroup.add(h);var u=this._linesPool.spawn();u.position.set(0,0),u.angle=l.sliceRight,this._numsLinesGroup.add(u);var _=Phaser.Math.degToRad(n),p=this._numsPool.spawn();p.position.set(Math.cos(_)*e.NUM_OFFSET,Math.sin(_)*e.NUM_OFFSET),p.angle=n+90,p.frameName=a.Defs.NUM_FRAMES_HIGHER[s-1],p.visible=!0,p.alpha=1,p.scale.set(1),this._numsLinesGroup.add(p);var c=this._numsPool.spawn();c.scale.set(1),c.visible=!1,this._numsLinesGroup.add(c),this._slices.push({slice:l,num:p,numOver:c,lineLeft:h,lineRight:u}),n+=i}this.setWheelAngle(270),this._centerNumber.visible=!1,this._button.hideNum()},e.prototype.destroyWheel=function(){if(this._spinnerRunning=!1,this._animateCenterNumber=this._animateIdle=this._animateLanded=this._animateShift=!1,this._arrow.angle=0,this._centerNumber.visible=!1,this._slices)for(var t=this._slices.length-1;t>=0;t--)this.destroySlice(this._slices[t])},e.prototype.destroySlice=function(t){var e=t.slice;this._slicesGroup.remove(e),this._slicesPool.despawn(e);var i=t.num;this._numsLinesGroup.remove(i),this._numsPool.despawn(i);var n=t.numOver;this._numsLinesGroup.remove(n),this._numsPool.despawn(n);var r=t.lineLeft;this._numsLinesGroup.remove(r),this._linesPool.despawn(r),r=t.lineRight,this._numsLinesGroup.remove(r),this._linesPool.despawn(r)},e.prototype.removeSlice=function(){var t=this._resultIndex,e=this._slices[t].slice.sliceAngle;this._oldSliceArc=360/this._slices.length,this._sliceArc=360/(this._slices.length-1),this._anglePosition=e+this._sliceArc/2,this.destroySlice(this._slices[t]),this._slices[t]=null,this.loop(t,this.repositionSlices),this._slices.splice(t,1)},e.prototype.repositionSlices=function(t,e){return null===e||(e.slice.setTargetAngle(this._anglePosition),this._anglePosition+=this._sliceArc),!1},e.prototype.retintSlices=function(t,e){if(null===e)return!1;var i=e.slice.value===this._landedValue,n=e.slice.value>this._landedValue;e.slice.setTargetTint(i?a.Defs.COLOR_LANDED:n?a.Defs.COLOR_HIGHER:a.Defs.COLOR_LOWER);var r=e.slice.value-1,o=e.num,s=e.numOver;return s.position.copyFrom(o.position),s.angle=o.angle,s.frameName=i?a.Defs.NUM_FRAMES_CENTER[r]:n?a.Defs.NUM_FRAMES_HIGHER[r]:a.Defs.NUM_FRAMES_LOWER[r],s.alpha=0,s.visible=!0,i&&s.scale.set(.62),!1},e.prototype.setAnimateShift=function(){this._animateShift=!0,this._shiftTime=0},e.prototype.setAnimateLanded=function(t,i){this._fastForward=i;var n=this._resultIndex;this.loop(n,this.retintSlices),this._animateLanded=!0,this._animateLandedTime=0,this._animateLandedDuration=i?e.ANIMATE_LANDED_DURATION_FF:e.ANIMATE_LANDED_DURATION,this._moveNumberIntoCenter=t},e.prototype.setIdle=function(t,i){this._animateIdle||(this._animateIdle=!0,this._idleTime=e.IDLE_DELAY,this._idleIndex=0,this._innerBulbs.flashSequence(200,350,-1,!0),this._outerBulbs.flashAll(500,350),this._rodsManager.lightAll(!0),this._button.hideNum()),this._button.animEnabled=t||i,this._button.setAnimCharMap(t),this._button.setAnimIdle(),this.enableInput(!0)},e.prototype.clearIdle=function(){if(this._animateIdle){this._animateIdle=!1;for(var t=0;t<this._slices.length;t++)this._slices[t].slice.tint=a.Defs.COLOR_HIGHER;this._button.animEnabled=!1,this._button.clearAnim()}this._innerBulbs.clear(),this._outerBulbs.clear()},e.prototype.updateSpinner=function(t){this._animateCenterNumber&&(this._centerNumber.updateMovement(t)||(this._animateCenterNumber=!1,this._moveNumberIntoCenter&&this.onLandedAnimated.dispatch())),this._animateLanded&&this.animateLanded(t),this._animateShift&&this.animateShift(t),this._animateIdle&&this.animateIdle(t),this._spinnerRunning&&this.doUpdateSpinner(t),this._button.updateAnimation(),this._innerBulbs.updateBulbs(t)&&this.onInnerBulbsFinished.dispatch(),this._outerBulbs.updateBulbs(t)&&this.onOuterBulbsFinished.dispatch(),this._rodsManager.update(t)},e.prototype.animateLanded=function(t){this._animateLandedTime+=t;for(var e=Phaser.Math.clamp(this._animateLandedTime/this._animateLandedDuration,0,1),i=0;i<this._slices.length;i++){var n=this._slices[i];n.slice.interpolateTint(e),n.num.alpha=Math.min(1,1-e+.5),n.numOver.alpha=e,n.numOver.position.copyFrom(n.num.position),n.numOver.angle=n.num.angle,1===e&&(n.numOver.visible=!1,i!==this._resultIndex?(n.num.frameName=n.numOver.frameName,n.num.alpha=1,n.num.scale.copyFrom(n.numOver.scale)):(n.num.visible=!1,this._centerNumber.moveToCenter(n.numOver.world,Phaser.Math.radToDeg(n.numOver.worldRotation),n.numOver.scale.x,this._moveNumberIntoCenter?n.numOver.frameName:null,this._landedValue,this._fastForward)))}1===e&&(this._animateLanded=!1,this._animateCenterNumber=!0,this._moveNumberIntoCenter||this.onLandedAnimated.dispatch())},e.prototype.getSelectedSlice=function(){return this._slices[this._resultIndex]},e.prototype.getLastSlice=function(){return 0!==this._resultIndex?this._slices[0]:this._slices[1]},e.prototype.animateShift=function(t){this._shiftTime+=t;var i=Phaser.Math.clamp(this._shiftTime/e.SLICES_SHIFT_DURATION,0,1),n=Phaser.Math.linear(this._oldSliceArc,this._sliceArc,i);this.drawSliceTemplate(n);for(var r=0;r<this._slices.length;r++){var o=this._slices[r];o.slice.interpolateAngle(i,n);var s=Phaser.Math.degToRad(o.slice.sliceAngle);o.num.position.set(Math.cos(s)*e.NUM_OFFSET,Math.sin(s)*e.NUM_OFFSET),o.num.angle=o.slice.sliceAngle+90,o.lineLeft.angle=o.slice.sliceLeft,o.lineRight.angle=o.slice.sliceRight}1===i&&(this._animateShift=!1,this.onSliceRemoved.dispatch())},e.prototype.animateIdle=function(t){if(this._idleTime+=t,!(this._idleTime<e.IDLE_DELAY)){this._idleTime%=e.IDLE_DELAY;var i=this._slices[this._idleIndex].slice;i.tint===a.Defs.COLOR_HIGHER?i.tint=a.Defs.COLOR_LOWER:i.tint=a.Defs.COLOR_HIGHER,this._idleIndex=(this._idleIndex+1)%this._slices.length}},e.prototype.setWheelAngle=function(t){t=h.MathHelp.modulo(t,360),this._rotatingGroup.angle=t,this._bulbParticles.angle=t},e.prototype.enableInput=function(t){this._button.button.inputEnabled=t},e.prototype.spin=function(){this.setWheelAngle(this._rotatingGroup.angle),this._startAngle=this._rotatingGroup.angle,this._targetAngle=this.getTargetAngle();var t=this.getSliceForAngle(this._startAngle);this._sliceUnderArrow=t,this._prevAngle=0,this._spinnerTime=this.game.rnd.integerInRange(o.Config.SPINNER_DURATION_MIN,o.Config.SPINNER_DURATION_MAX),this._duration=0,this._spinnerRunning=!0},e.prototype.getTargetAngle=function(){if(this._resultIndex=this.game.rnd.integerInRange(0,this._slices.length-1),o.Config.DEBUG_ON){var t=this.game.state.getCurrentState(),e=t.debugPanel.selected;if(null!==e){for(var i=0;i<this._slices.length;i++)if(this._slices[i].slice.value===e.value){this._resultIndex=i;break}t.debugPanel.selected=null}}var n=this._slices[this._resultIndex];this._landedValue=n.slice.value;var r=n.slice.sliceAngle;r=270-r,r+=360;var s=Math.floor(this._sliceArc/2)-2;return r+=Math.cos(Math.random()*Math.PI)*s,r+=360*this.game.rnd.integerInRange(o.Config.SPINNER_ANGLE_MIN,o.Config.SPINNER_ANGLE_MAX)},e.prototype.getSliceForAngle=function(t){t=270-t,t=h.MathHelp.modulo(t,360);for(var e=0;e<this._slices.length;e++){var i=this._slices[e];if(i.slice.angleInside(t))return i}return null},e.prototype.doUpdateSpinner=function(t){this._duration=this._duration+t;var e=this._duration/this._spinnerTime;e=Phaser.Math.clamp(e,0,1);var i=s.evaluate(e*s.duration(a.Defs.SPINNER_CURVE),a.Defs.SPINNER_CURVE),n=Phaser.Math.linear(this._startAngle,this._targetAngle,i);this.setWheelAngle(n);var r=this.getSliceForAngle(n),l=Phaser.Math.sign(n-this._prevAngle);if(this._sliceUnderArrow!==r){this._sliceUnderArrow=r;l<0?r.slice.fromRight:r.slice.fromLeft;this._arrow.angle=-15*l,g.AudioUtils.playSound("wheelTick",o.Config.VOLUME_WHEELTICK)}else this._arrow.angle=l>0?Math.min(0,this._arrow.angle+this.game.time.elapsedMS/1e3*180):Math.max(0,this._arrow.angle-this.game.time.elapsedMS/1e3*180);1===e&&(this._arrow.angle=0),this._prevAngle=n,1===e&&(this._spinnerRunning=!1,this.onSpinResult.dispatch(this._resultIndex))},e.prototype.onButton=function(t){this.onSpinnerClicked.dispatch(t)},e.SLICES_SHIFT_DURATION=200,e.IDLE_DELAY=150,e.ANIMATE_LANDED_DURATION=187,e.ANIMATE_LANDED_DURATION_FF=250,e.NUM_OFFSET=175,e.BULB_PARTICLES_MAX=32,e._instance=null,e}(Phaser.Group);e.Spinner=m},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.SpinnerSnapshot=void 0;var o=i(3),s=function(t){function e(e){return t.call(this,e,800,800)||this}return r(e,t),Object.defineProperty(e,"instance",{get:function(){return null===e._instance&&(e._instance=new e(o.App.game)),e._instance},enumerable:!1,configurable:!0}),e._instance=null,e}(Phaser.RenderTexture);e.SpinnerSnapshot=s},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.LineGraphWithLimits=void 0;var o=i(3),s=i(14),a=function(t){function e(e,i,n,r,o){var s=t.call(this,e,i,n,r,o)||this;return s._areaGroup=null,s._areaMask=null,s._icoNext=null,s._icoCurrent=null,s._lineNext=null,s._lineCurrent=null,s}return r(e,t),e.prototype.createValues=function(){t.prototype.createValues.call(this),this._areaGroup=new Phaser.Group(this.game,this),null!=this._fill&&this._areaGroup.add(this._fill);for(var e=0;e<this._points.length;e++){var i=this._points[e];this._areaGroup.add(i.lineToNext)}for(e=0;e<this._points.length;e++){i=this._points[e];this._areaGroup.add(i.sprite),null!=i.label&&this._areaGroup.add(i.label)}this._areaMask=this.game.add.graphics(0,0,this),this._areaGroup.mask=this._areaMask},e.prototype.createSprites=function(){this._lineNext=this.game.add.sprite(0,0,"Sprites","graphSkillLevel",this),this._lineNext.width=this._width,this._lineCurrent=this.game.add.sprite(0,0,"Sprites","graphSkillLevel",this),this._lineCurrent.width=this._width,this._icoNext=this.game.add.sprite(0,0,"Sprites",0,this),this._icoNext.anchor.set(.5),this._icoNext.scale.set(e.ICO_SCALE),this._icoCurrent=this.game.add.sprite(0,0,"Sprites",0,this),this._icoCurrent.anchor.set(.5),this._icoCurrent.scale.set(e.ICO_SCALE)},e.prototype.setValues=function(i){var n=o.App.settings.data.skillScoreHistory,r=Math.min.apply(Math,n),a=Math.max.apply(Math,n),l=o.App.settings.data.skillScore,h=s.Skill.getCurrentSkillLimit(l),u=s.Skill.getNextSkillLimit(l);if(i.axisVertical.min=Math.max(Math.min(h-50,r-50),0),i.axisVertical.max=Math.max(u+50,a+50),i.values=n,t.prototype.setValues.call(this,i),this.updateMask(0),null===this._icoCurrent&&this.createSprites(),u>0){var _=Math.round(this.getYForValue(u));this._icoNext.frameName=s.Skill.getIconForScore(u),this._icoNext.position.set(e.ICO_OFFSET,_),this._lineNext.position.set(0,_)}else this._icoNext.visible=this._lineNext.visible=!1;var p=Math.round(this.getYForValue(h));this._icoCurrent.frameName=s.Skill.getIconForScore(h),this._icoCurrent.position.set(e.ICO_OFFSET,p),this._lineCurrent.position.set(0,p)},e.prototype.updateMask=function(t){this._areaMask.clear(),this._areaMask.beginFill(0,1),this._areaMask.drawRect(0,0,this._width*t,this._height),this._areaMask.endFill()},e.prototype.animateValues=function(t){this.updateMask(t)},e.ICO_SCALE=.31,e.ICO_OFFSET=-12,e}(i(144).LineGraph);e.LineGraphWithLimits=a},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.Graph=void 0;var o=i(145),s=i(146),a=function(t){function e(e,i,n,r,o){var s=t.call(this,e,o)||this;return s._width=0,s._height=0,s._style=null,s._values=null,s._verticalAxis=null,s._horizontalAxis=null,s._title=null,s._created=!1,s._rect=new Phaser.Rectangle,s._width=i,s._height=n,s._style=r,s}return r(e,t),Object.defineProperty(e.prototype,"animationRunning",{get:function(){return this._animationRunning},set:function(t){this._animationRunning=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"animationDelay",{get:function(){return this._animDelay},set:function(t){this._animDelay=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"values",{get:function(){return this._values},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this._style},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasVerticalAxis",{get:function(){return null!==this._verticalAxis&&this._verticalAxis.visible},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasVerticalAxisValues",{get:function(){return null!=this._values.axisVertical},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasHorizontalAxis",{get:function(){return null!==this._horizontalAxis&&this._horizontalAxis.visible},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasHorizontalAxisValues",{get:function(){return null!=this._values.axisHorizontal},enumerable:!1,configurable:!0}),e.prototype.getValues=function(){return this._values},e.prototype.setValues=function(t){this._values=t,this.resetValues(t)},e.prototype.createParts=function(){this._created||(this.createValues(),this.createAxes(),this.createTitle(),this._created=!0)},e.prototype.createTitle=function(){var t=this._style.titleStyle;if(void 0!==t){var e=void 0===this._style.titleAlignHorizontally?o.eAlignH.CENTER:this._style.titleAlignHorizontally,i=void 0===this._style.titleAlignVertically?o.eAlignV.TOP:this._style.titleAlignVertically;this._title=new Phaser.BitmapText(this.game,0,0,t.name,"",t.size,e===o.eAlignH.LEFT?"left":e===o.eAlignH.RIGHT?"right":"center"),this._title.anchor.x=e===o.eAlignH.LEFT?0:e===o.eAlignH.RIGHT?1:.5,this._title.anchor.y=i===o.eAlignV.TOP?0:1,this.add(this._title)}},e.prototype.createAxes=function(){null!=this._style.axisVertical&&(this._verticalAxis=new s.GraphAxis(this.game,this._style.axisVertical,!0,this)),null!=this._style.axisHorizontal&&(this._horizontalAxis=new s.GraphAxis(this.game,this._style.axisHorizontal,!1,this))},e.prototype.resetValues=function(t){this.createParts(),this._title&&this.setTitle(t.title),this.setAxes(t.axisVertical,t.axisHorizontal),this.setMainArea(t.values),this.arrange()},e.prototype.setTitle=function(t){var e=null!=t;e&&(this._title.text=t),this._title.visible=e},e.prototype.setAxes=function(t,e){null!==this._verticalAxis&&(null!=t?(this._verticalAxis.values=t,this._verticalAxis.visible=!0):this._verticalAxis.visible=!1),null!==this._horizontalAxis&&(null!=e?(this._horizontalAxis.values=e,this._horizontalAxis.visible=!0):this._horizontalAxis.visible=!1)},e.prototype.arrange=function(){var t=this._rect;t.setTo(0,0,this._width,this._height),t=this.arrangeMargin(t),t=this.arrangeTitle(t),t=this.arrangeAxes(t),this.arrangeValues(t),this.setAnimation(),this.animateValues(this._animationRunning?0:1)},e.prototype.arrangeMargin=function(t){var e=this.style.margin;return null==e||(t.x+=e.left,t.y+=e.top,t.width-=e.left+e.right,t.height-=e.bottom+e.top),t},e.prototype.arrangeTitle=function(t){if(!this._title||!this._title.visible)return t;var e=void 0===this._style.titleAlignHorizontally?o.eAlignH.CENTER:this._style.titleAlignHorizontally;this._title.x=e===o.eAlignH.LEFT?t.x:e===o.eAlignH.CENTER?t.x+t.width/2:t.x+t.width;var i=void 0===this._style.titleAlignVertically?o.eAlignV.TOP:this._style.titleAlignVertically,n=this._title.textHeight+(void 0===this._style.titleSpace?0:this._style.titleSpace);switch(n=Math.floor(n),i){case o.eAlignV.TOP:this._title.y=t.y,t.height-=n,t.y+=n;break;case o.eAlignV.CENTER:this._title.y=t.y+t.height/2;break;case o.eAlignV.BOTTOM:this._title.y=t.y+t.height,t.height-=n}return t},e.prototype.arrangeAxes=function(t){var e=this.hasVerticalAxis?this._verticalAxis.spaceTaken:0,i=this.hasHorizontalAxis?this._horizontalAxis.spaceTaken:0;return t.height-=i,t.x+=e,t.width-=e,this.hasVerticalAxis&&this._verticalAxis.arrangeAxis(t.x,t.y+t.height,t.height),this.hasHorizontalAxis&&this._horizontalAxis.arrangeAxis(t.x,t.y+t.height,t.width),t},e.prototype.setAnimation=function(){var t=this._style;this._animationRunning=void 0!==t.animated&&t.animated,this._animationRunning&&(this._animDelay=void 0===t.animationDelay?0:t.animationDelay,this._animDuration=void 0===t.animationDuration?e.DEFAULT_ANIMATION_DURATION:t.animationDuration,this._animElapsed=0)},e.prototype.update=function(){this._animationRunning&&this.updateAnimation()},e.prototype.updateAnimation=function(){var t=this.game.time.elapsedMS;this._animDelay>0?this._animDelay=Math.max(0,this._animDelay-t):(this._animElapsed=this._animElapsed+t,this._animDuration,this.animateValues(Phaser.Math.clamp(this._animElapsed/this._animDuration,0,1)),this._animElapsed>=this._animDuration&&(this._animationRunning=!1))},e.prototype.getValueString=function(t){var e=this.style,i=t.toFixed(void 0===e.decimalPlaces?0:e.decimalPlaces);return null!=e.appendCharacter&&(i+=e.appendCharacter),i},e.DEFAULT_ANIMATION_DURATION=1e3,e}(Phaser.Group);e.Graph=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphDefs=void 0;var n=i(76),r=function(){function t(){}return t.lineGraphValues={axisVertical:{min:0,max:1400},axisHorizontal:{min:0,max:200},values:[500,600,500,500,300,600,500]},t.lineGraphStyle={atlas:"Sprites",fontStyle:{name:"FontTiny",size:20},margin:{left:5,top:0,right:5,bottom:0},showLabels:!1,decimalPlaces:0,appendCharacter:null,animated:!0,animationDelay:0,animationDuration:750,pointSprite:"graphDot",lineSprite:"graphLine",minPointsHorizontally:10,fillArea:!0,fillColor:10812296},t.POSITION_STYLE={atlas:"Sprites",fontStyle:{name:"FontTiny",size:17},axisVertical:null,axisHorizontal:{atlas:"Sprites",fontStyle:{name:"FontTiny",size:17,tint:10708991},axisSprite:"graphAxis",axisOverflow:-3.5,showSteps:!1,stepsSprite:"graphStep",stepsCount:8,shiftStepsByPercent:0,stepAtOrigin:!0,showValues:!0,decimalPlaces:0,appendCharacter:null,shiftValuesByPercent:-.5,valueAtOrigin:!1,customValues:["1st","2nd","3rd","4th","5th","6th","7th","8th"],tint:7493068,offsetValuesY:-196},showLabels:!0,decimalPlaces:0,appendCharacter:"%",barSpacingPercent:.45,barSprites:"graphBar",barTints:[16763977,14013909,15492909,6049173,6049173,6049173,6049173,2171992],animated:!0,animationDelay:300,animationDuration:1e3,animationStyle:n.VerticalBarGraphAnimationStyle.SAME_SPEED},t.POSITION_VALUES={title:null,axisHorizontal:{min:1,max:9},values:[10,20,30,100,50,60,70,80]},t}();e.GraphDefs=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VerticalBarGraphAnimationStyle=void 0,function(t){t[t.SAME_SPEED=0]="SAME_SPEED",t[t.SAME_DURATION=1]="SAME_DURATION"}(e.VerticalBarGraphAnimationStyle||(e.VerticalBarGraphAnimationStyle={}))},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.RulesDialog=void 0;var o=i(3),s=i(2),a=i(0),l=i(28),h=i(78),u=i(48),_=i(79),p=i(80),c=i(152),f=i(49),d=function(t){function e(i){var n=t.call(this,i,e.WIDTH,e.HEIGHT)||this;return n._scroller=null,n._tabs=[],n._dialogContainer.y=20,n.createContent(),n._blocker.events.onInputDown.add((function(){this.hide()}),n),n}return r(e,t),Object.defineProperty(e,"instance",{get:function(){return e._instance||(e._instance=new e(o.App.game)),e._instance},enumerable:!1,configurable:!0}),e.prototype.show=function(){this.onTabDown(this._tabs[0].tab,!0),t.prototype.show.call(this)},e.prototype.createContent=function(){this._scroller=new h.Scroller(this.game,e.SCROLLER_WIDTH,e.SCROLLER_HEIGHT,this._dialogContainer,{useMask:!0,onlyMouseWheel:this.game.device.desktop}),this._scroller.inputEnabled=!1,this._scroller.setPosition(-e.WIDTH/2+e.SCROLLER_OFFSET_X,-e.HEIGHT/2+e.SCROLLER_OFFSET_Y);var t=this._scroller.area;t.width=e.SCROLLER_WIDTH,this._scroller.area=t;var i=this.game.add.sprite(0,this._height/2-6,"Sprites","stats_bottom_fade_out",this._dialogContainer);i.scale.y=2,i.anchor.set(.5,1),i.width=this._width-24,(i=this.game.add.sprite(0,-this._height/2+5,"Sprites","stats_bottom_fade_out",this._dialogContainer)).scale.y=-1,i.anchor.set(.5,1),i.width=this._width-24;var n=this.game.device.desktop?new _.ScrollBarActive(this.game,this._scroller,this._dialogContainer,!1,!1):new u.ScrollBar(this.game,this._dialogContainer,!1,!1);n.policy=f.ScrollBarPolicy.WHEN_NEEDED,n.setMargin(6,2),this._scroller.addListener(n),this._tabs.push(this.createTab0()),this._tabs.push(this.createTab1()),this._tabs.push(this.createTab2());var r=-this._height/2-39,o=-this._width/2;this._tabs[0].tab.position.set(o,r),this._tabs[1].tab.position.set(o+134-20,r),this._tabs[2].tab.position.set(o+134+320-20-20,r)},e.prototype.enableInput=function(e){if(t.prototype.enableInput.call(this,e),this._tabs)for(var i=0;i<this._tabs.length;i++){var n=this._tabs[i].tab;n&&(n.setEnabled(e),n.button.input.priorityID=this.priority+2)}this._dialogBg.inputEnabled=!0,this._dialogBg.input.priorityID=this.priority+1,this._scroller.inputEnabled=e},e.prototype.createTab0=function(){var t=new c.DialogTab(this.game,"Tab0","tab_left","DIALOG_RULES_TAB0_TITLE",-6);this._dialogContainer.add(t),t.onDown.add(this.onTabDown,this);var i=new Phaser.Group(this.game,this._scroller.view),n=new l.AdvancedBitmapText(this.game,0,0,e.TEXT_FONT_FACE,"",e.TEXT_FONT_SIZE,"left");return n.maxWidth=e.SCROLLER_WIDTH,n.colors=s.Defs.TEXT_COLORS,n.text=a.TextUtils.getText("DIALOG_RULES_TAB0_CONTENT"),n.y=e.TOP_OFFSET,i.add(n),{tab:t,content:i,contentHeight:Math.max(e.SCROLLER_HEIGHT,n.textHeight+2*e.TOP_OFFSET)}},e.prototype.createTab1=function(){var t=new c.DialogTab(this.game,"Tab1","tab_mid","DIALOG_RULES_TAB1_TITLE");this._dialogContainer.add(t),t.onDown.add(this.onTabDown,this);var i=new Phaser.Group(this.game,this._scroller.view),n=new l.AdvancedBitmapText(this.game,0,0,e.TEXT_FONT_FACE,"",e.TEXT_FONT_SIZE,"left");return n.maxWidth=e.SCROLLER_WIDTH,n.colors=s.Defs.TEXT_COLORS,n.text=a.TextUtils.getText("DIALOG_RULES_TAB1_CONTENT"),n.y=e.TOP_OFFSET,i.add(n),{tab:t,content:i,contentHeight:Math.max(e.SCROLLER_HEIGHT,n.textHeight+2*e.TOP_OFFSET)}},e.prototype.createTab2=function(){var t=new c.DialogTab(this.game,"Tab2","tab_right","DIALOG_RULES_TAB2_TITLE");this._dialogContainer.add(t),t.onDown.add(this.onTabDown,this);var i=new Phaser.Group(this.game,this._scroller.view),n=new l.AdvancedBitmapText(this.game,0,0,e.TEXT_FONT_FACE,"",e.TEXT_FONT_SIZE,"left");return n.maxWidth=e.SCROLLER_WIDTH,n.colors=s.Defs.TEXT_COLORS,n.text=a.TextUtils.getText("DIALOG_RULES_TAB2_CONTENT"),n.y=e.TOP_OFFSET,i.add(n),{tab:t,content:i,contentHeight:Math.max(e.SCROLLER_HEIGHT,n.textHeight+2*e.TOP_OFFSET+20)}},e.prototype.onTabDown=function(t,e){for(var i=0;i<this._tabs.length;i++){var n=this._tabs[i];if(n.tab===t){n.tab.setTabToggled(!0),this._dialogContainer.bringToTop(n.tab),n.content.visible=!0;var r=this._scroller.area;r.height=n.contentHeight,this._scroller.area=r,this._scroller.setViewPosition(0,0)}else n.tab.setTabToggled(!1),this._dialogContainer.sendToBack(n.tab),n.content.visible=!1}},e.WIDTH=750,e.HEIGHT=710,e.SCROLLER_OFFSET_X=20,e.SCROLLER_OFFSET_Y=5,e.SCROLLER_WIDTH=e.WIDTH-2*e.SCROLLER_OFFSET_X-26,e.SCROLLER_HEIGHT=e.HEIGHT-11,e.TOP_OFFSET=16,e.TEXT_FONT_FACE="FontTiny",e.TEXT_FONT_SIZE=23,e._instance=null,e}(p.BackDialog);e.RulesDialog=d},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Scroller=void 0;var s=i(147),a=i(148),l=i(150),h={useMask:!0,onlyMouseWheel:!1,allowHorizontal:!1,allowVertical:!0,keepViewInArea:!0,scrollUpToCenterX:!1,scrollUpToCenterY:!1,scrollUpToCenterItemSize:{x:0,y:0},scrollCutOff:.2,scrollMaxVelocity:1500},u=function(t){function e(i,n,r,u,_,p){var c=t.call(this,i,u)||this;return c.onScrollUpdate=new Phaser.Signal,c.onScrollUpdateFinished=new Phaser.Signal,c._options=null,c._listenersList=null,c._area=new Phaser.Rectangle(0,0,e.DEFAULT_AREA_SIZE,e.DEFAULT_AREA_SIZE),c._view=null,c._viewSize=new Phaser.Point,c._viewMask=null,c._viewMaskSize=new Phaser.Point(-1,-1),c._horizontalViewPercent=0,c._verticalViewPercent=0,c._horizontalScreens=0,c._verticalScreens=0,c._scrollerUpdater=null,c._scrollSnapper=null,c._inputEnabled=!1,c._inputDown=!1,c._inputTime=0,c._inputStartPos=new Phaser.Point,c._inputEndPos=new Phaser.Point,c._inputScrollPrevPos=new Phaser.Point,c._inputScrollVelocity=new Phaser.Point,c._inputScrollTarget=new Phaser.Point,c._inputDownWhileScrolling=!1,c._inputScrollerLastDelta=new Phaser.Point,c._mouseWheelStep=50,c._debug=!1,c._debugView=null,c._debugArea=null,null==_&&(_={}),c._options=o(o({},h),_),c._listenersList=new s.ListenerList,c._scrollerUpdater=null!=p?p:new a.KineticScrollerUpdater(i),c._scrollSnapper=new l.DefaultScrollSnapper,c.createView(n,r),c.inputEnabled=!0,c}return r(e,t),Object.defineProperty(e.prototype,"area",{get:function(){return this._area},set:function(t){this._area=t,this.recalc()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"view",{get:function(){return this._view},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewSize",{get:function(){return this._viewSize},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"horizontalViewPercent",{get:function(){return this._horizontalViewPercent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticalViewPercent",{get:function(){return this._verticalViewPercent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"horizontalScreens",{get:function(){return this._horizontalScreens},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticalScreens",{get:function(){return this._verticalScreens},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"inputEnabled",{get:function(){return this._inputEnabled},set:function(t){this.removeInputCallbacks(),t&&this.addInputCallbacks(),this._inputEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scrollingInProgress",{get:function(){return!this._scrollerUpdater.finished},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"inputDownWhileScrolling",{get:function(){return this._inputDownWhileScrolling},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scrollVelocityMagnitudeSq",{get:function(){return this._inputScrollVelocity.getMagnitudeSq()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scrollDeltaMagnitudeSq",{get:function(){return this._inputScrollerLastDelta.getMagnitudeSq()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"inputMovedDistanceSq",{get:function(){var t=this._inputEndPos.x-this._inputStartPos.x,e=this._inputEndPos.y-this._inputStartPos.y;return t*t+e*e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scrollSnapper",{set:function(t){this._scrollSnapper=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewTopInArea",{get:function(){return-this._view.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewCenterYInArea",{get:function(){return this._area.height<this._viewSize.y?this._area.height/2:-this._view.y+this._viewSize.y/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewBottomInArea",{get:function(){return-this._view.y+this._viewSize.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewLeftInArea",{get:function(){return-this._view.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewCenterXInArea",{get:function(){return this._area.width<this._viewSize.x?this._area.width/2:-this._view.x+this._viewSize.x/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewRightInArea",{get:function(){return-this._view.x+this._viewSize.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mouseWheelStep",{get:function(){return this._mouseWheelStep},set:function(t){this._mouseWheelStep=t},enumerable:!1,configurable:!0}),e.prototype.setDebug=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1),this._debug=t,t&&e||null!==this._debugView&&(this.remove(this._debugView),this._debugView.destroy(),this._debugView=null),t&&i||null!==this._debugArea&&(this.view.remove(this._debugArea),this._debugArea.destroy(),this._debugArea=null),t&&e&&null===this._debugView&&(this._debugView=this.game.add.graphics(0,0,this),this.view.sendToBack(this._debugView)),null!==this._debugView&&(this._debugView.clear(),this._debugView.lineStyle(1,16711680,1),this._debugView.drawRect(0,0,this.viewSize.x,this.viewSize.y)),t&&i&&null===this._debugArea&&(this._debugArea=this.game.add.graphics(0,0,this.view),this.view.sendToBack(this._debugArea)),null!==this._debugArea&&(this._debugArea.clear(),this._debugArea.beginFill(65280,.25),this._debugArea.drawRect(this.area.x,this.area.y,this.area.width,this.area.height),this._debugArea.endFill)},e.prototype.createView=function(t,e){this._view=new Phaser.Group(this.game,this),this._options.useMask&&(this._viewMask=this.game.add.graphics(0,0,this),this._view.mask=this._viewMask),this.setViewSize(t,e)},e.prototype.setViewSize=function(t,e){this._viewSize.set(t,e),this.updateMask(),this.recalc()},e.prototype.setViewPosition=function(t,e,i){void 0===i&&(i=!1),this._view.x=-t,this._view.y=-e,i&&(this._view.x+=this._viewSize.x/2,this._view.y+=this._viewSize.y/2),this._inputScrollVelocity.set(0,0),this.setScrollUpdater()},e.prototype.setPosition=function(t,e){this.position.set(t,e),this.onPositionChange()},e.prototype.recalc=function(){this.calculateScreens(),this.onDimensionsChange(),this.updatePosition(0,0),this._debug&&this.setDebug(this._debug,null!==this._debugView,null!==this._debugArea)},e.prototype.calculateScreens=function(){this._horizontalScreens=Math.max(1,this._area.width/this._viewSize.x),this._verticalScreens=Math.max(1,this._area.height/this._viewSize.y)},e.prototype.updateMask=function(){this._options.useMask&&(this._viewMaskSize.x===this._viewSize.x&&this._viewMaskSize.y===this._viewSize.y||(this._viewMask.clear(),this._viewMask.beginFill(0,1),this._viewMask.drawRect(0,0,this._viewSize.x,this._viewSize.y),this._viewMask.endFill()))},e.prototype.addInputCallbacks=function(){this._options.onlyMouseWheel||(this.game.input.onDown.add(this.onMoveStart,this),this.game.input.addMoveCallback(this.onMove,this),this.game.input.onUp.add(this.onMoveEnd,this)),this.game.input.mouseWheel.callback=this.onMouseWheel.bind(this)},e.prototype.removeInputCallbacks=function(){this._options.onlyMouseWheel||(this.game.input.onDown.remove(this.onMoveStart,this),this.game.input.deleteMoveCallback(this.onMove,this),this.game.input.onUp.remove(this.onMoveEnd,this)),this.game.input.mouseWheel.callback=null},e.prototype.onMoveStart=function(t){this._inputDown||this.insideView(t.worldX,t.worldY)&&(this._inputStartPos.set(t.x,t.y),this._inputEndPos.set(t.x,t.y),this._inputScrollPrevPos.set(t.x,t.y),this._inputDownWhileScrolling=!this._scrollerUpdater.finished&&this.scrollDeltaMagnitudeSq>2500,this._scrollerUpdater.reset(0,0),this._inputDown=!0,this._inputTime=t.timeDown,this._inputScrollVelocity.set(0,0))},e.prototype.onMove=function(t,e,i,n){if(this._inputDown)if(this.insideView(t.worldX,t.worldY)){this._inputEndPos.set(t.x,t.y);var r=this.game.time.time,o=Math.max(1,r-this._inputTime)/1e3,s=0,a=0;if(this._options.allowVertical){var l=(a=t.y-this._inputScrollPrevPos.y)/o;this._inputScrollVelocity.y=this._inputScrollVelocity.y*this._options.scrollCutOff+l*(1-this._options.scrollCutOff)}if(this._options.allowHorizontal){l=(s=t.x-this._inputScrollPrevPos.x)/o;this._inputScrollVelocity.x=this._inputScrollVelocity.x*this._options.scrollCutOff+l*(1-this._options.scrollCutOff)}this._inputScrollPrevPos.set(t.x,t.y),this._inputTime=r,this.updatePosition(s,a)}else this.onMoveEnd(t)},e.prototype.onMoveEnd=function(t){if(this._inputDown&&(this._inputDown=!1,this._inputEndPos.set(t.x,t.y),!(this.game.time.time-this._inputTime>30&&(this._inputScrollVelocity.set(0,0),this._scrollSnapper.ignoreWhenLongDelay)||this.inputMovedDistanceSq<900&&(this._inputScrollVelocity.set(0,0),this._scrollSnapper.ignoreSmallDistances)))){var e=this._options.scrollMaxVelocity,i=this._inputScrollVelocity.x,n=this._inputScrollVelocity.y;this._inputScrollVelocity.set(e*(1-Math.exp(-Math.abs(i)/e))*Phaser.Math.sign(i),e*(1-Math.exp(-Math.abs(n)/e))*Phaser.Math.sign(n)),this.setScrollUpdater()}},e.prototype.onMouseWheel=function(t){this.updatePosition(0,this.game.input.mouseWheel.delta*this._mouseWheelStep)},e.prototype.insideView=function(t,e){var i=this.game.camera.x+this.worldTransform.tx,n=this.game.camera.y+this.worldTransform.ty;return!(t<i||t>=i+this._viewSize.x||e<n||e>=n+this._viewSize.y)},e.prototype.setScrollUpdater=function(){this._inputScrollVelocity=this._scrollSnapper.snapOffset(this._view.position,this._inputScrollVelocity),(!this._options.allowHorizontal||this._viewSize.x>this._area.width)&&(this._inputScrollVelocity.x=0),(!this._options.allowVertical||this._viewSize.y>this._area.height)&&(this._inputScrollVelocity.y=0),this._inputScrollTarget.set(Math.round(this._view.x+this._inputScrollVelocity.x),Math.round(this._view.y+this._inputScrollVelocity.y)),this._scrollerUpdater.reset(this._inputScrollVelocity.x,this._inputScrollVelocity.y),this._scrollerUpdater.finished&&(this.updatePosition(0,0),this.onScrollUpdateFinished.dispatch(this))},e.prototype.update=function(){var e=this.game.time.elapsedMS;if(this._scrollerUpdater.finished)this._inputScrollerLastDelta.set(0,0);else{var i=this._scrollerUpdater.update(e),n=this._inputScrollTarget.x-this._view.x-i.x,r=this._inputScrollTarget.y-this._view.y-i.y;e>0&&this._inputScrollerLastDelta.set(1e3*n/e,1e3*r/e),this.updatePosition(n,r),this._scrollerUpdater.finished&&this.onScrollUpdateFinished.dispatch(this)}t.prototype.update.call(this)},e.prototype.updatePosition=function(t,e){this._view.x+=t,this._view.y+=e,this._options.keepViewInArea&&this.keepViewInArea(),this.onViewMove()},e.prototype.keepViewInArea=function(){var t=this._area.x,e=this._area.y,i=this._area.x+this._area.width-this._viewSize.x,n=this._area.y+this._area.height-this._viewSize.y;this._options.scrollUpToCenterX&&(t-=this._viewSize.x/2-this._options.scrollUpToCenterItemSize.x/2,i+=this._viewSize.x/2-this._options.scrollUpToCenterItemSize.x/2),this._options.scrollUpToCenterY&&(e-=this._viewSize.y/2-this._options.scrollUpToCenterItemSize.y/2,n+=this._viewSize.y/2-this._options.scrollUpToCenterItemSize.y/2);var r=!1,o=!1;this._area.width<this._viewSize.x?(this._view.x=-t+(this._viewSize.x-this._area.width)/2,this._horizontalViewPercent=1,r=!0):(this._view.x=Phaser.Math.clamp(this._view.x,-i,-t),this._view.x!==-i&&this._view.x!==-t||(r=!0),this._horizontalViewPercent=i>t?(-this.view.x-t)/(i-t):1),this._area.height<this._viewSize.y?(this._view.y=-e+(this._viewSize.y-this._area.height)/2,this._verticalViewPercent=1,o=!0):(this._view.y=Phaser.Math.clamp(this._view.y,-n,-e),this._view.y!==-n&&this._view.y!==-e||(o=!0),this._verticalViewPercent=n>e?(-this.view.y-e)/(n-e):1),r&&o&&this._scrollerUpdater.reset(0,0)},e.prototype.addListener=function(t){this._listenersList.add(t),t.onPositionChange(this,this.x,this.y),t.onDimensionsChange(this),t.onViewMove(this,this._horizontalViewPercent,this._verticalViewPercent)},e.prototype.removeListener=function(t){this._listenersList.remove(t)},e.prototype.removeAllListeners=function(){this._listenersList.removeAll()},e.prototype.onDimensionsChange=function(){for(var t=this._listenersList.listeners,e=0;e<t.length;e++)t[e].onDimensionsChange(this)},e.prototype.onPositionChange=function(){for(var t=this._listenersList.listeners,e=0;e<t.length;e++)t[e].onPositionChange(this,this.x,this.y)},e.prototype.onViewMove=function(){for(var t=this._listenersList.listeners,e=0;e<t.length;e++)t[e].onViewMove(this,this._horizontalViewPercent,this._verticalViewPercent);this.onScrollUpdate.dispatch(this)},e.prototype.isCoordinateInView=function(t,e){return!(t<this.viewLeftInArea||t>this.viewRightInArea||e<this.viewTopInArea||e>this.viewBottomInArea)},e.prototype.isPositionInView=function(t){return this.isCoordinateInView(t.x,t.y)},e.prototype.isPointInView=function(t){return this.isCoordinateInView(t.x,t.y)},e.prototype.isAreaInView=function(t,e,i,n){return this.isCoordinateInView(t,e)&&this.isCoordinateInView(t+i,e+n)},e.prototype.isRectangleInView=function(t){return this.isAreaInView(t.x,t.y,t.width,t.height)},e.DEFAULT_AREA_SIZE=1e3,e}(Phaser.Group);e.Scroller=u},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollBarActive=void 0;var o=function(t){function e(e,i,n,r,o){void 0===o&&(o=!1);var s=t.call(this,e,n,r,o)||this;return s._thumbBounds=new Phaser.Rectangle,s._dragging=!1,s._scroller=i,s.enableThumbInput(),s}return r(e,t),e.prototype.setMargin=function(e,i){t.prototype.setMargin.call(this,e,i),this.setThumbBounds(0,this._marginStart,20,this._scroller.viewSize.y-this._marginStart-this._marginEnd)},e.prototype.enableThumbInput=function(){var t=this._thumbSprite;t.inputEnabled=!0,t.input.priorityID=100,t.input.enableDrag(),t.input.allowHorizontalDrag=!1,t.events.onDragStart.add(this.onDragStart,this),t.events.onDragStop.add(this.onDragStop,this),t.events.onDragUpdate.add(this.onDragUpdate,this),t.input.boundsRect=this._thumbBounds,this.setThumbBounds(0,this._marginStart,20,this._scroller.viewSize.y-this._marginStart-this._marginEnd)},e.prototype.setThumbBounds=function(t,e,i,n){this._thumbBounds.setTo(t,e,i,n)},e.prototype.onDragStart=function(){this._dragging=!0},e.prototype.onDragStop=function(){this._dragging=!1},e.prototype.onDragUpdate=function(t,e,i,n,r,o,s,a){var l=this._thumbBounds.height-this._thumbLength,h=(t.y-this._thumbBounds.y)/l;this._scroller.setViewPosition(0,(this._scroller.area.height-this._scroller.viewSize.y)*h)},e.prototype.onViewMove=function(e,i,n){this._dragging||t.prototype.onViewMove.call(this,e,i,n)},e}(i(48).ScrollBar);e.ScrollBarActive=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=this&&this.__spreadArrays||function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),r=0;for(e=0;e<i;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,r++)n[r]=o[s];return n};Object.defineProperty(e,"__esModule",{value:!0}),e.BackDialog=void 0;var s=i(11),a=function(t){function e(e){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var r=t.apply(this,o([e],i))||this;return r._btnBack=null,r.createBackButton(),r._dialogContainer.x=0,r}return r(e,t),e.prototype.createTitle=function(t){var i=new Phaser.BitmapText(this.game,0,0,"SlantSmall",t,e.TITLE_FONT_SIZE,"center");return i.anchor.set(.5,0),i},e.prototype.createBackButton=function(){var t=new s.Button(this.game,"Exit","Sprites","zvuk_exit_exit_idle",!1,"zvuk_exit_exit_hit");t.position.set(this._width/2-24+6,-this._height/2-19),t.scaleOnOver.set(1.15),t.onClick.add(this.onCloseClicked,this),this._dialogContainer.add(t),this._btnBack=t},e.prototype.pop=function(t){return-.523606798*t*t+.723606798*t+.8},e.prototype.enableInput=function(e){t.prototype.enableInput.call(this,e),this._btnBack.setEnabled(e),this._btnBack.button.input.priorityID=this.priority+2},e.TITLE_FONT_SIZE=36,e}(i(27).DialogBase);e.BackDialog=a},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.StatsDialog=void 0;var o=i(3),s=i(75),a=i(0),l=i(28),h=i(73),u=i(49),_=i(78),p=i(48),c=i(79),f=i(154),d=i(155),g=i(156),y=i(80),m=i(47),v=i(158),T=i(12),b=function(t){function e(i){var n=t.call(this,i,e.WIDTH,e.HEIGHT)||this;return n.onStartGame=new Phaser.Signal,n._noStatsPanel=null,n._noStatsText=null,n._startGameButton=null,n._skillPanel=null,n._lineGraph=null,n._gamesPlayed=null,n._gamesWon=null,n._averagePlace=null,n._positionsGraph=null,n._topCompetitor=null,n._highestScore=null,n._highestRating=null,n._pieGraph=null,n._perfectRounds=null,n._pointsFromFreeSpin=null,n._scroller=null,n._scrollBar=null,n._startAnimList=[],n._dialogContainer.y=20,n.createContent(),n._blocker.events.onInputDown.add((function(){this.hide()}),n),n}return r(e,t),Object.defineProperty(e,"instance",{get:function(){return e._instance||(e._instance=new e(o.App.game)),e._instance},enumerable:!1,configurable:!0}),e.prototype.enableInput=function(e){t.prototype.enableInput.call(this,e),this._dialogBg.inputEnabled=!0,this._dialogBg.input.priorityID=this.priority+1;var i=o.App.settings.data.gamesFinished>0;this._scroller.inputEnabled=e&&i,this._startGameButton.setEnabled(e&&!i),this._startGameButton.button.input.priorityID=this.priority+2},e.prototype.createContent=function(){this._scroller=new _.Scroller(this.game,e.SCROLLER_WIDTH,e.SCROLLER_HEIGHT,this._dialogContainer,{useMask:!0,onlyMouseWheel:this.game.device.desktop}),this._scroller.inputEnabled=!1,this._scroller.setPosition(-e.WIDTH/2+e.SCROLLER_OFFSET_X,-e.HEIGHT/2+e.SCROLLER_OFFSET_Y);var t=this._scroller.area;t.width=e.SCROLLER_WIDTH,t.height=1640,this._scroller.area=t;var i=this.game.add.sprite(0,this._height/2-6,"Sprites","stats_bottom_fade_out",this._dialogContainer);i.scale.y=2,i.anchor.set(.5,1),i.width=this._width-24,(i=this.game.add.sprite(0,-this._height/2+5,"Sprites","stats_bottom_fade_out",this._dialogContainer)).scale.y=-1,i.anchor.set(.5,1),i.width=this._width-24;var n=this.game.device.desktop?new c.ScrollBarActive(this.game,this._scroller,this._dialogContainer,!1,!1):new p.ScrollBar(this.game,this._dialogContainer,!1,!1);n.policy=u.ScrollBarPolicy.WHEN_NEEDED,n.setMargin(6,2),this._scroller.addListener(n),this._scrollBar=n;var r=this.game.add.sprite(-this._width/2,-this._height/2-39,"Sprites","tab_stats",this._dialogContainer),o=new l.AdvancedBitmapText(this.game,0,0,"FontTiny",a.TextUtils.getText("DIALOG_STATS_TAB_TITLE"),26,"center");o.position.set(r.width/2-6,26),o.anchor.set(.5,.5),r.addChild(o),this.addNoStatsPanel(),this.addStats()},e.prototype.addNoStatsPanel=function(){var t=this.game.add.group(this._dialogContainer);this._noStatsPanel=t;var e=new Phaser.BitmapText(this.game,0,0,"FontTiny",a.TextUtils.getText("STATS_NO_STATS_TEXT"),26,"center");e.anchor.set(.5,1),e.y=-50,t.add(e),this._noStatsText=e;var i=new T.ChoiceButton(this.game,"Play","button_green","STATS_NO_STATS_BUTTON");i.y=50,i.onClick.add(this.onPlayButtonClick,this),i.setActive(!0),t.add(i),this._startGameButton=i},e.prototype.onPlayButtonClick=function(t){this.onDialogClosed.addOnce((function(e){this.onStartGame.dispatch(t)}),this),this.hide()},e.prototype.addStats=function(){var t,i=this._scroller.view,n=this._scroller.viewSize.x/2,r=n-203,o=n+203,u=98;this._skillPanel=new m.SkillPanel(this.game,i,"SlantSmall",m.SkillPanel.TINT_LIGHT),this._skillPanel.position.set(n,u),u+=110,this._lineGraph=new h.LineGraphWithLimits(this.game,e.LINE_GRAPH_WIDTH,e.LINE_GRAPH_HEIGHT,s.GraphDefs.lineGraphStyle,i),this._lineGraph.position.set(n-e.LINE_GRAPH_WIDTH/2,u),u+=210,this._gamesPlayed=new v.StatsTile(this.game,i,"TILE_GAMES_PLAYED"),this._gamesPlayed.position.set(r,u),this._gamesWon=new v.StatsTile(this.game,i,"TILE_WINS"),this._gamesWon.position.set(n,u),this._averagePlace=new v.StatsTile(this.game,i,"TILE_AVERAGE_PLACE"),this._averagePlace.position.set(o,u),u+=200,(t=new Phaser.BitmapText(this.game,n,u-65,"FontTiny",a.TextUtils.getText("STATS_HEADER_BAR_GRAPH"),e.HEADER_FONT_SIZE,"center")).anchor.set(.5,0),i.add(t),this._positionsGraph=new g.VerticalBarsGraphWithShadows(this.game,e.POSITIONS_GRAPH_WIDTH,e.POSITIONS_GRAPH_HEIGHT,s.GraphDefs.POSITION_STYLE,i),this._positionsGraph.position.set(n-e.POSITIONS_GRAPH_WIDTH/2,u),u+=321,(t=new l.AdvancedBitmapText(this.game,n,u-85,"FontTiny",a.TextUtils.getText("STATS_HEADER_TOP_COMPETITOR"),e.HEADER_FONT_SIZE,"center")).anchor.set(.5,0),i.add(t),this._topCompetitor=new d.TopCompetitor(this.game,i),this._topCompetitor.position.set(n,u),u+=120,this._highestScore=new v.StatsTile(this.game,i,"TILE_HIGH_SCORE"),this._highestScore.position.set(n-102,u),this._highestRating=new v.StatsTile(this.game,i,"TILE_HIGH_RATING"),this._highestRating.position.set(n+102,u),u+=245,this._pieGraph=new f.PieGraph(this.game,82,i),this._pieGraph.position.set(n,u),u+=210,this._perfectRounds=new v.StatsTile(this.game,i,"TILE_PERFECT_ROUNDS"),this._perfectRounds.position.set(n-102,u),this._pointsFromFreeSpin=new v.StatsTile(this.game,i,"TILE_POINTS_FROM_FREE_SPIN"),this._pointsFromFreeSpin.position.set(n+102,u)},e.prototype.setValues=function(){var t=o.App.settings.data;this._startAnimList.length=0,this._skillPanel.setScore(t.skillScore,!0),this._lineGraph.setValues(s.GraphDefs.lineGraphValues),this._lineGraph.animationRunning=!1,this._lineGraph.animationDelay=500,this._startAnimList.push(this._lineGraph),this._gamesPlayed.setValue(t.gamesFinished.toString()),this._gamesWon.setValue(t.gamesWon.toString()),this._averagePlace.setValue(t.averagePlace.toFixed(2));for(var e=o.App.settings.data.playerPlace,i=o.App.settings.data.gamesFinished,n=s.GraphDefs.POSITION_VALUES.values,r=0;r<n.length;r++)n[r]=e[r]/i*100;this._positionsGraph.setValues(s.GraphDefs.POSITION_VALUES),this._topCompetitor.setCompetitor(o.App.settings.getBestCompetitorId()),this._highestScore.setValue(t.highScore.toString()),this._highestRating.setValue(t.highRating.toString());var a=t.higher+t.lower+t.bank;0===a?this._pieGraph.values=[0,0,0]:(this._pieGraph.values=[t.higher/a,t.bank/a,t.lower/a],this._pieGraph.animationRunning=!1,this._startAnimList.push(this._pieGraph)),this._perfectRounds.setValue(t.perfectRounds.toString()),this._pointsFromFreeSpin.setValue(t.averageFreeSpinPoints.toFixed(1))},e.prototype.show=function(){var e=o.App.settings.data.gamesFinished>0;this._noStatsPanel.visible=!e,this._scroller.visible=e,this._scrollBar.visible=e,e&&(this.setValues(),this._scroller.setViewPosition(0,0)),t.prototype.show.call(this)},e.prototype.fillTileValue=function(t,e,i,n){return t.value=e,void 0!==t.smallText&&(t.smallText=a.TextUtils.getText(i)),void 0!==t.bigText&&(t.bigText=a.TextUtils.getText(n)),t},e.prototype.update=function(){t.prototype.update.call(this),this.visible&&this._startAnimList.length>0&&this.startAnimations()},e.prototype.startAnimations=function(){for(var t=this._startAnimList.length-1;t>=0;t--){if(this._scroller.isPositionInView(this._startAnimList[t]))this._startAnimList[t].animationRunning=!0,this._startAnimList[t]=this._startAnimList[this._startAnimList.length-1],this._startAnimList.length=this._startAnimList.length-1}},e.WIDTH=750,e.HEIGHT=710,e.SCROLLER_OFFSET_X=20,e.SCROLLER_OFFSET_Y=5,e.SCROLLER_WIDTH=e.WIDTH-2*e.SCROLLER_OFFSET_X-26,e.SCROLLER_HEIGHT=e.HEIGHT-11,e.LINE_GRAPH_WIDTH=250,e.LINE_GRAPH_HEIGHT=128,e.POSITIONS_GRAPH_WIDTH=430,e.POSITIONS_GRAPH_HEIGHT=191,e.HEADER_FONT_SIZE=18,e._instance=null,e}(y.BackDialog);e.StatsDialog=b},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimelineDefs=void 0;var n=i(22),r=i(1),o=function(){function t(){}return t.TITLE_TIMELINE_DURATION=2e3,t.TITLE_TIMELINE={logoPanel:{target:null,time:.4*t.TITLE_TIMELINE_DURATION,duration:.4*t.TITLE_TIMELINE_DURATION,easing:Phaser.Easing.Quadratic.Out,props:{pos:{propTarget:{x:0,y:0},propStart:{x:-300,y:0},isOffset:!0},alpha:{propTarget:{alpha:1},propStart:{alpha:0},isOffset:!1,clamp01:!0}}},bg:{target:null,easing:Phaser.Easing.Quadratic.InOut,playWhen:n.eTimelinePlay.FORWARD_ONLY,props:{lights:{time:0*t.TITLE_TIMELINE_DURATION,duration:1*t.TITLE_TIMELINE_DURATION,propTarget:{lightOffset:0},propStart:{lightOffset:1},isOffset:!1}}},bg2:{target:null,easing:Phaser.Easing.Quadratic.InOut,playWhen:n.eTimelinePlay.FORWARD_ONLY,props:{strips:{time:.05*t.TITLE_TIMELINE_DURATION,duration:.55*t.TITLE_TIMELINE_DURATION,propTarget:{stripsOffset:0},propStart:{stripsOffset:1},isOffset:!1}}},spinnerSnapshot:{target:null,time:.2*t.TITLE_TIMELINE_DURATION,duration:.6*t.TITLE_TIMELINE_DURATION,easing:Phaser.Easing.Linear.None,playWhen:n.eTimelinePlay.FORWARD_ONLY,props:{alpha:{propTarget:{alpha:1},propStart:{alpha:0},isOffset:!1,clamp01:!0}}}},t.PLAY_TIMELINE_DURATION=1500,t.PLAY_TIMELINE={leaderboard:{target:null,time:.4*t.PLAY_TIMELINE_DURATION,duration:.5*t.PLAY_TIMELINE_DURATION,easing:Phaser.Easing.Quadratic.Out,props:{pos:{propTarget:{x:0,y:0},propStart:{x:-300,y:0},isOffset:!0},alpha:{propTarget:{alpha:1},propStart:{alpha:0},isOffset:!1,clamp01:!0}}},bg:{target:null,easing:Phaser.Easing.Quadratic.InOut,props:{lights:{time:0*t.PLAY_TIMELINE_DURATION,duration:1*t.PLAY_TIMELINE_DURATION,propTarget:{lightOffset:0},propStart:{lightOffset:1},isOffset:!1}}},logo:{target:null,time:.55*t.PLAY_TIMELINE_DURATION,duration:.25*t.PLAY_TIMELINE_DURATION,easing:Phaser.Easing.Linear.None,props:{alpha:{propTarget:{alpha:1},propStart:{alpha:0},isOffset:!1,clamp01:!0}}},spinnerSnapshot:{target:null,time:.4*t.PLAY_TIMELINE_DURATION,duration:.3*t.PLAY_TIMELINE_DURATION,easing:Phaser.Easing.Linear.None,props:{alpha:{propTarget:{alpha:1},propStart:{alpha:0},isOffset:!1,clamp01:!0}}},ticker:{target:null,time:.55*t.PLAY_TIMELINE_DURATION,duration:.25*t.PLAY_TIMELINE_DURATION,easing:Phaser.Easing.Quadratic.Out,props:{pos:{propTarget:{x:0,y:0},propStart:{x:0,y:-r.Config.TICKER_Y_OFFSET-50},isOffset:!0},alpha:{propTarget:{alpha:2},propStart:{alpha:0},isOffset:!1,clamp01:!0}}},buttons:{target:null,time:.55*t.PLAY_TIMELINE_DURATION,duration:.25*t.PLAY_TIMELINE_DURATION,easing:Phaser.Easing.Quadratic.Out,playWhen:n.eTimelinePlay.FORWARD_ONLY,props:{pos:{propTarget:{x:0,y:0},propStart:{x:0,y:r.Config.TITLE_BUTTONS_Y_OFFSET+50},isOffset:!0},alpha:{propTarget:{alpha:2},propStart:{alpha:0},isOffset:!1,clamp01:!0}}}},t.PLAY_TIMELINE_BUTTONS_OUT_DURATION=450,t.PLAY_TIMELINE_BUTTONS_OUT={buttons:{target:null,time:0*t.PLAY_TIMELINE_BUTTONS_OUT_DURATION,duration:1*t.PLAY_TIMELINE_BUTTONS_OUT_DURATION,easing:Phaser.Easing.Quadratic.Out,playWhen:n.eTimelinePlay.BACKWARD_ONLY,props:{pos:{propTarget:{x:0,y:0},propStart:{x:0,y:r.Config.TITLE_BUTTONS_Y_OFFSET+50},isOffset:!0},alpha:{propTarget:{alpha:2},propStart:{alpha:0},isOffset:!1,clamp01:!0}}}},t}();e.TimelineDefs=o},function(t,e,i){i(84),t.exports=i(3)},function(t,e,i){(function(e,i){var n;n=function(){"use strict";function t(t){return"function"==typeof t}var n=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},r=0,o=void 0,s=void 0,a=function(t,e){f[r]=t,f[r+1]=e,2===(r+=2)&&(s?s(d):T())},l="undefined"!=typeof window?window:void 0,h=l||{},u=h.MutationObserver||h.WebKitMutationObserver,_="undefined"==typeof self&&void 0!==e&&"[object process]"==={}.toString.call(e),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function c(){var t=setTimeout;return function(){return t(d,1)}}var f=new Array(1e3);function d(){for(var t=0;t<r;t+=2)(0,f[t])(f[t+1]),f[t]=void 0,f[t+1]=void 0;r=0}var g,y,m,v,T=void 0;function b(t,e){var i=this,n=new this.constructor(E);void 0===n[O]&&D(n);var r=i._state;if(r){var o=arguments[r-1];a((function(){return x(r,n,o,i._result)}))}else M(i,n,t,e);return n}function S(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(E);return I(e,t),e}_?T=function(){return e.nextTick(d)}:u?(y=0,m=new u(d),v=document.createTextNode(""),m.observe(v,{characterData:!0}),T=function(){v.data=y=++y%2}):p?((g=new MessageChannel).port1.onmessage=d,T=function(){return g.port2.postMessage(0)}):T=void 0===l?function(){try{var t=Function("return this")().require("vertx");return void 0!==(o=t.runOnLoop||t.runOnContext)?function(){o(d)}:c()}catch(t){return c()}}():c();var O=Math.random().toString(36).substring(2);function E(){}var P={error:null};function A(t){try{return t.then}catch(t){return P.error=t,P}}function N(e,i,n){i.constructor===e.constructor&&n===b&&i.constructor.resolve===S?function(t,e){1===e._state?R(t,e._result):2===e._state?w(t,e._result):M(e,void 0,(function(e){return I(t,e)}),(function(e){return w(t,e)}))}(e,i):n===P?(w(e,P.error),P.error=null):void 0===n?R(e,i):t(n)?function(t,e,i){a((function(t){var n=!1,r=function(t,e,i,n){try{t.call(e,i,n)}catch(t){return t}}(i,e,(function(i){n||(n=!0,e!==i?I(t,i):R(t,i))}),(function(e){n||(n=!0,w(t,e))}),t._label);!n&&r&&(n=!0,w(t,r))}),t)}(e,i,n):R(e,i)}function I(t,e){var i,n;t===e?w(t,new TypeError("You cannot resolve a promise with itself")):(n=typeof(i=e),null===i||"object"!==n&&"function"!==n?R(t,e):N(t,e,A(e)))}function L(t){t._onerror&&t._onerror(t._result),C(t)}function R(t,e){void 0===t._state&&(t._result=e,t._state=1,0!==t._subscribers.length&&a(C,t))}function w(t,e){void 0===t._state&&(t._state=2,t._result=e,a(L,t))}function M(t,e,i,n){var r=t._subscribers,o=r.length;t._onerror=null,r[o]=e,r[o+1]=i,r[o+2]=n,0===o&&t._state&&a(C,t)}function C(t){var e=t._subscribers,i=t._state;if(0!==e.length){for(var n=void 0,r=void 0,o=t._result,s=0;s<e.length;s+=3)n=e[s],r=e[s+i],n?x(i,n,r,o):r(o);t._subscribers.length=0}}function x(e,i,n,r){var o=t(n),s=void 0,a=void 0,l=void 0,h=void 0;if(o){if((s=function(t,e){try{return t(e)}catch(t){return P.error=t,P}}(n,r))===P?(h=!0,a=s.error,s.error=null):l=!0,i===s)return void w(i,new TypeError("A promises callback cannot return that same promise."))}else s=r,l=!0;void 0!==i._state||(o&&l?I(i,s):h?w(i,a):1===e?R(i,s):2===e&&w(i,s))}var B=0;function D(t){t[O]=B++,t._state=void 0,t._result=void 0,t._subscribers=[]}var F=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(E),this.promise[O]||D(this.promise),n(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?R(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&R(this.promise,this._result))):w(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;void 0===this._state&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var i=this._instanceConstructor,n=i.resolve;if(n===S){var r=A(t);if(r===b&&void 0!==t._state)this._settledAt(t._state,e,t._result);else if("function"!=typeof r)this._remaining--,this._result[e]=t;else if(i===U){var o=new i(E);N(o,t,r),this._willSettleAt(o,e)}else this._willSettleAt(new i((function(e){return e(t)})),e)}else this._willSettleAt(n(t),e)},t.prototype._settledAt=function(t,e,i){var n=this.promise;void 0===n._state&&(this._remaining--,2===t?w(n,i):this._result[e]=i),0===this._remaining&&R(n,this._result)},t.prototype._willSettleAt=function(t,e){var i=this;M(t,void 0,(function(t){return i._settledAt(1,e,t)}),(function(t){return i._settledAt(2,e,t)}))},t}(),U=function(){function t(e){this[O]=B++,this._result=this._state=void 0,this._subscribers=[],E!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(t,e){try{e((function(e){I(t,e)}),(function(e){w(t,e)}))}catch(e){w(t,e)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(t){return this.then(null,t)},t.prototype.finally=function(t){var e=this.constructor;return this.then((function(i){return e.resolve(t()).then((function(){return i}))}),(function(i){return e.resolve(t()).then((function(){throw i}))}))},t}();return U.prototype.then=b,U.all=function(t){return new F(this,t).promise},U.race=function(t){var e=this;return n(t)?new e((function(i,n){for(var r=t.length,o=0;o<r;o++)e.resolve(t[o]).then(i,n)})):new e((function(t,e){return e(new TypeError("You must pass an array to race."))}))},U.resolve=S,U.reject=function(t){var e=new this(E);return w(e,t),e},U._setScheduler=function(t){s=t},U._setAsap=function(t){a=t},U._asap=a,U.polyfill=function(){var t=void 0;if(void 0!==i)t=i;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var n=null;try{n=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===n&&!e.cast)return}t.Promise=U},U.Promise=U,U.polyfill(),U},t.exports=n()}).call(this,i(85),i(86))},function(t,e){var i,n,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===o||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:o}catch(t){i=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var l,h=[],u=!1,_=-1;function p(){u&&l&&(u=!1,l.length?h=l.concat(h):_=-1,h.length&&c())}function c(){if(!u){var t=a(p);u=!0;for(var e=h.length;e;){for(l=h,h=[];++_<e;)l&&l[_].run();_=-1,e=h.length}l=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function d(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];h.push(new f(t,e)),1!==h.length||u||a(c)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=d,r.addListener=d,r.once=d,r.off=d,r.removeListener=d,r.removeAllListeners=d,r.emit=d,r.prependListener=d,r.prependOnceListener=d,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.SponsorNone=void 0;i(18);var o=function(t){function e(e){return t.call(this,e)||this}return r(e,t),e.prototype.onMoreGames=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=t.length>0&&null!=t[0]&&void 0!==t[0].none?t[0].none:this.features.moreGamesLink;null!=i&&window.open("http://"+i,"_blank")},e.prototype.getSponsorLogoLink=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return"assets/sponsor/logo/LogoNone.png"},e}(i(30).Sponsor);e.SponsorNone=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileUtils=void 0;var n=function(){function t(){}return t.fileExists=function(t){var e=new XMLHttpRequest;return e.open("HEAD",t,!1),e.send(),404!==e.status},t.saveTextAsFile=function(e,i){var n=new Blob([e],{type:"text/plain"});null!==t._textFile&&window.URL.revokeObjectURL(t._textFile),t._textFile=window.URL.createObjectURL(n);var r=document.createElement("a");r.download=i,r.href=t._textFile,r.onclick=function(t){document.body.removeChild(t.target)},r.style.display="none",document.body.appendChild(r),r.click()},t._textFile=null,t}();e.FileUtils=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FullscreenUtils=void 0;var n=i(3),r=function(){function t(){}return t.supported=function(){return n.App.game.scale.compatibility.supportsFullScreen},t.isFullscreen=function(){return n.App.game.scale.isFullScreen},t.changeFullscreen=function(){var t=n.App.game;t.scale.isFullScreen?t.scale.stopFullScreen():t.scale.startFullScreen(!1,!1)},t}();e.FullscreenUtils=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectUtils=void 0;var n=function(){function t(){}return t.loadJson=function(t){return new Promise((function(e,i){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="text",n.onload=function(){if(4===n.readyState&&n.status>=400&&n.status<=599)i(new Error("Error loading "+t+": "+n.statusText));else{var r=n.responseText;r=JSON.parse(r),e(r)}},n.onerror=function(){i(new Error("Network error while loading "+t))},n.send()}))},t.loadValuesIntoObject=function(t,e){for(var i in t)e[i]=t[i]},t}();e.ObjectUtils=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PhaserUtils=void 0;var n=function(){function t(){}return t.ChangeAnimationPhaserJSONData=function(t){Phaser.AnimationParser.myCallback=t,Phaser.AnimationParser.JSONData=function(t,e){if(!e.frames)return null;for(var i=new Phaser.FrameData,n=e.frames,r=0;r<n.length;r++){var o=i.addFrame(new Phaser.Frame(r,n[r].frame.x,n[r].frame.y,n[r].frame.w,n[r].frame.h,n[r].filename));n[r].trimmed&&o.setTrim(n[r].trimmed,n[r].sourceSize.w,n[r].sourceSize.h,n[r].spriteSourceSize.x,n[r].spriteSourceSize.y,n[r].spriteSourceSize.w,n[r].spriteSourceSize.h),Phaser.AnimationParser.myCallback(o,n[r])}return i}},t.AdjustTweenFunctions=function(){Phaser.TweenManager.prototype.removeFromUpdateQueue=function(t){var e=this._tweens.indexOf(t);-1!==e?this._tweens.splice(e,1):-1!==(e=this._add.indexOf(t))&&this._add.splice(e,1)},Phaser.Tween.prototype.stopAndRemoveFromUpdateQueue=function(t){var e=this.stop(t);return this.manager.removeFromUpdateQueue(this),this.pendingDelete=!1,e}},t.AddBitmapFontAddMethod=function(){Phaser.Cache.prototype.addBitmapFontFromImage=function(t,e,i,n,r,o,s){var a=this.getImage(i,!0),l={url:e,data:a.data,font:null,base:a.base};void 0===o&&(o=0),void 0===s&&(s=0),l.font="json"===r?Phaser.LoaderParser.jsonBitmapFont(n,l.base,o,s):Phaser.LoaderParser.xmlBitmapFont(n,l.base,o,s),this._cache.bitmapFont[t]=l,this._resolveURL(e,l)}},t}();e.PhaserUtils=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScreenUtils=e.eOrientation=e.ScreenMetrics=void 0;var n,r=function(){};e.ScreenMetrics=r,function(t){t[t.PORTRAIT=0]="PORTRAIT",t[t.LANDSCAPE=1]="LANDSCAPE"}(n=e.eOrientation||(e.eOrientation={}));var o=function(){function t(){}return t.calculateScreenMetrics=function(t,e,i,o,s,a){var l,h;if(void 0===i&&(i=n.LANDSCAPE),((l=window.innerWidth)<(h=window.innerHeight)&&i===n.LANDSCAPE||h<l&&i===n.PORTRAIT)&&!o){var u=l;l=h,h=u}void 0!==s&&void 0!==a||(i===n.LANDSCAPE?(s=Math.round(1024*t/960),a=Math.round(720*e/600)):(s=Math.round(720*t/600),a=Math.round(1024*e/960)));var _=l/h,p=0,c=0,f=0,d=0;_>t/e?(d=e,f=2*Math.ceil(d*_/2),p=((f=Math.min(f,s))-t)/2,c=0):(f=t,d=2*Math.ceil(f/_/2),p=0,c=((d=Math.min(d,a))-e)/2);var g=(l+.01)/f,y=(h+.01)/d;return o&&i===n.LANDSCAPE&&(g=y),this.screenMetrics=new r,this.screenMetrics.windowWidth=l,this.screenMetrics.windowHeight=h,this.screenMetrics.defaultGameWidth=t,this.screenMetrics.defaultGameHeight=e,this.screenMetrics.maxGameWidth=s,this.screenMetrics.maxGameHeight=a,this.screenMetrics.gameWidth=f,this.screenMetrics.gameHeight=d,this.screenMetrics.scaleX=g,this.screenMetrics.scaleY=y,this.screenMetrics.offsetX=p,this.screenMetrics.offsetY=c,this.screenMetrics},t}();e.ScreenUtils=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringUtils=void 0;var n=function(){function t(){}return t.padNumber=function(t,e,i){void 0===i&&(i="0");var n=t+"";return n.length>=e?n:new Array(e-n.length+1).join(i)+n},t.addSpacingToNumber=function(t,e){return void 0===e&&(e=" "),(""+t).replace(/\B(?=(\d{3})+(?!\d))/g,e)},t.formatTime=function(e,i,n,r){void 0===n&&(n=-1),void 0===r&&(r=":");var o=!1,s="";if((e=Math.floor(e))>3600||0===i){var a=Math.floor(e/3600);s+=(-1!==n?t.padNumber(a,n):a)+r,e%=3600,o=!0}if(!0===o||e>60||1===i){var l=Math.floor(e/60);s+=(-1!==n?t.padNumber(l,n):l)+r,e%=60,o=!0}var h=e;return s+=-1!==n?t.padNumber(h,n):h},t.format=function(e){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];if(0===i.length)return e;for(var r=e,o=0;o<i.length;o++){var s="string"==typeof i[o]?i[o]:i[o].toString(),a=o<t.SEARCH_TEXTS.length?t.SEARCH_TEXTS[o]:"{"+o+"}";r=r.replace(a,s)}return r},t.SEARCH_TEXTS=["{0}","{1}","{2}","{3}","{4}","{5}","{6}","{7}","{8}","{9}"],t}();e.StringUtils=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextUtils=void 0;var n=i(3),r=function(){function t(){}return t.setTexts=function(e){t._texts=e},Object.defineProperty(t,"sponsorText",{set:function(e){t._sponsorText=e},enumerable:!1,configurable:!0}),t.getLanguage=function(){var t=null;return navigator&&navigator.userAgent&&(t=navigator.userAgent.match(/android.*\W(\w\w)-(\w\w)\W/i))&&(t=t[1]),!t&&navigator?(navigator.language?t=navigator.language:navigator.languages&&navigator.languages.length>0?t=navigator.languages[0]:navigator.browserLanguage?t=navigator.browserLanguage:navigator.systemLanguage?t=navigator.systemLanguage:navigator.userLanguage&&(t=navigator.userLanguage),t=t.substr(0,2).toLowerCase()):t="en",t},t.getText=function(e,i){if(null!==t._sponsorText)return t._sponsorText.getText(e,i);if(null===t._texts)throw new Error("Texts are not set.");void 0===i&&(i=n.App.settings.currentLanguage);var r=t._texts[i];if(void 0===r)throw new Error("Invalid language ID "+i+".");var o=r[e];if(void 0===o)throw new Error("Text with text id: "+e+" for language "+i+" is missing.");return o},t._texts=null,t._sponsorText=null,t}();e.TextUtils=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Host=e.Device=void 0;var n=function(){function t(){}return t.isAndroidStockBrowser=function(){var t=window.navigator.userAgent.match(/Android.*AppleWebKit\/([\d.]+)/);return t&&parseFloat(t[1])<537},t.androidVersion=function(){var t=navigator.userAgent.match(/Android\s([0-9\.]*)/);return t?parseFloat(t[1]):-1},t.androidUnlockAudio=function(t){t.device.android&&t.device.chrome&&t.device.chromeVersion>=55&&(t.sound.touchLocked=!0,t.input.addTouchLockCallback((function(){if(this.noAudio||!this.touchLocked||null!==this._unlockSource)return!0;if(this.usingWebAudio){var t=this.context.createBuffer(1,1,22050);this._unlockSource=this.context.createBufferSource(),this._unlockSource.buffer=t,this._unlockSource.connect(this.context.destination),void 0===this._unlockSource.start?this._unlockSource.noteOn(0):this._unlockSource.start(0),"suspended"===this._unlockSource.context.state&&this._unlockSource.context.resume()}return!0}),t.sound,!0))},t}();e.Device=n;var r=function(){function t(){}return t.isLocal=function(){var t=window.location.hostname;return!("localhost"!==t&&"127.0.0.1"!==t&&""!==t&&!t.match(/192.168.[0-9.]+$/))},t}();e.Host=r},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.Game=void 0;var o=i(1),s=i(97),a=i(98),l=i(165),h=i(167),u=i(168),_=function(t){function e(){var i=this,n=Phaser.AUTO;return i=t.call(this,{width:o.Config.GAME_WIDTH,height:o.Config.GAME_HEIGHT,renderer:n,parent:"sbc_game_content",transparent:!1,antialias:!0,physicsConfig:null,mouseWheel:!0,preserveDrawingBuffer:!1})||this,e.game=i,i.state.add("Boot",s.BootScene),i.state.add("Preloader",l.PreloaderScene),i.state.add("Title",u.TitleScene),i.state.add("Stats",h.StatsScene),i.state.add("Play",a.PlayScene),i.state.start("Boot"),i}return r(e,t),e}(Phaser.Game);e.Game=_},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.BootScene=void 0;var o=i(1),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._userScale=new Phaser.Point(1,1),e._gameDims=new Phaser.Point,e._pendingResizeCheck=!1,e}return r(e,t),e.prototype.init=function(){this.calcGameDims(),this.stage.disableVisibilityChange=!0,this.scale.scaleMode=Phaser.ScaleManager.USER_SCALE,this.scale.setUserScale(this._userScale.x,this._userScale.y),this.scale.pageAlignHorizontally=!0,this.scale.pageAlignVertically=!0,this.scale.setResizeCallback(this.gameResized,this),this.game.device.desktop||(this.scale.forceOrientation(!0,!1),this.scale.onOrientationChange.add(this.orientationChange,this))},e.prototype.preload=function(){this.load.image("LoadingBg","assets/background/Bg.jpg")},e.prototype.create=function(){this.game.state.start("Preloader")},e.prototype.calcGameDims=function(){var t=window.innerWidth,e=window.innerHeight,i=1,n=1,r=t,s=e;r=(t+.01)/(n=i=e/o.Config.GAME_HEIGHT),s=o.Config.GAME_HEIGHT,r<o.Config.GAME_WIDTH&&(i=n=t/o.Config.GAME_WIDTH,r=o.Config.GAME_WIDTH,s=e/i),o.Config.DEBUG_FIXED_RESOLUTION&&(n=i=1,r=o.Config.GAME_WIDTH,s=o.Config.GAME_HEIGHT),this._userScale.set(n,i),this._gameDims.set(r,s)},e.prototype.gameResized=function(t,e){if(!t.incorrectOrientation){if(this._pendingResizeCheck)return;this.doResize()}},e.prototype.doResize=function(){var t=this._userScale.x,e=this._userScale.y;this.calcGameDims();var i=this._gameDims,n=this._userScale;if(i.x!==this.game.width||i.y!==this.game.height||Math.abs(n.x-t)>.001||Math.abs(n.y-e)>.001){this.scale.setGameSize(i.x,i.y),this.scale.setUserScale(n.x,n.y);var r=this.game.state.getCurrentState();"function"==typeof r.onResize&&r.onResize(i.x,i.y),this.game.device.mobileSafari&&window.scrollTo(0,-1)}},e.prototype.orientationChange=function(t,e,i){t.isLandscape?this.leaveIncorrectOrientation():this.enterIncorrectOrientation()},e.prototype.enterIncorrectOrientation=function(){document.getElementById("sbc_orientation").style.display="block";var t=this.game.state.getCurrentState();"function"==typeof t.onPause&&t.onPause(),setTimeout((function(){var t=document.getElementById("sbc_orientation");t.style.width=window.innerWidth+"px",t.style.height=window.innerHeight+"px"}),300)},e.prototype.leaveIncorrectOrientation=function(){document.getElementById("sbc_orientation").style.display="none";var t=this.game.state.getCurrentState();"function"==typeof t.onResume&&t.onResume()},e}(Phaser.State);e.BootScene=s},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=this&&this.__spreadArrays||function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),r=0;for(e=0;e<i;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,r++)n[r]=o[s];return n};Object.defineProperty(e,"__esModule",{value:!0}),e.PlayScene=void 0;var s=i(3),a=i(1),l=i(2),h=i(20),u=i(5),_=i(99),p=i(100),c=i(103),f=i(104),d=i(105),g=i(106),y=i(107),m=i(109),v=i(110),T=i(111),b=i(112),S=i(14),O=i(22),E=i(59),P=i(113),A=i(128),N=i(68),I=i(130),L=i(131),R=i(132),w=i(32),M=i(69),C=i(71),x=i(72),B=i(142),D=i(143),F=i(77),U=i(153),k=i(81),j=i(159),G=i(160),H=i(161),V=i(162),Y=i(0),W=i(51),X=i(82),K=i(29),z=i(6),J=i(164),Z=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._isRestart=!1,e._gameWasQuitAfterRoundX=!1,e._timelineManager=null,e._playersManager=null,e._roundData=null,e._choicesRevealer=null,e._totalRound=0,e._round=0,e._spinCounter=0,e._tie=!1,e._askTieQuestion=!1,e._askTieQuestionAsked=!1,e._perfectRound=!1,e._perfectPlayersCount=0,e._perfectPlayer=null,e._bg=null,e._topLeftLogo=null,e._leaderboard=null,e._ticker=null,e._inGameHud=null,e._choiceButtons=null,e._spinner=null,e._movingNumber=null,e._interAnim=null,e._interAnimParticles=null,e._sharedDialogBg=null,e._yesNoDialog=null,e._gameResultDialog=null,e._tutorialBigDialog=null,e._tutorialSmallDialog=null,e._tutorialTieDialog=null,e._statsDialog=null,e._rulesDialog=null,e._spinnerSnapshot=null,e._currentState=null,e._states=null,e._winScore=0,e._topPlayerOverWinScore=null,e._animLoops=0,e._currentColor=0,e._targetColor=0,e._playFinalRoundSound=!0,e._bankPosition=new Phaser.Point,e._showBigTutorial=!0,e._showSmallTutorial=!0,e._showTieTutorial=!1,e._showToolTip=!0,e._showToolTipPass=!0,e._freeSpinWatch=!1,e._freeSpinBank=0,e._debugPanel=null,e}return r(e,t),Object.defineProperty(e.prototype,"playersManager",{get:function(){return this._playersManager},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"roundData",{get:function(){return this._roundData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"choicesRevealer",{get:function(){return this._choicesRevealer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"spinner",{get:function(){return this._spinner},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"choiceButtons",{get:function(){return this._choiceButtons},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ticker",{get:function(){return this._ticker},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leaderboard",{get:function(){return this._leaderboard},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movingNumber",{get:function(){return this._movingNumber},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tie",{get:function(){return this._tie},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"spinCounter",{get:function(){return this._spinCounter},set:function(t){this._spinCounter=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"round",{get:function(){return this._round},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalRound",{get:function(){return this._totalRound},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"winScore",{get:function(){return this._winScore},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"askTieQuestion",{get:function(){return this._askTieQuestion},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bankPosition",{get:function(){return this._bankPosition},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showBigTutorial",{get:function(){return this._showBigTutorial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showSmallTutorial",{get:function(){return this._showSmallTutorial},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tutorialBigDialog",{get:function(){return this._tutorialBigDialog},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tutorialSmallDialog",{get:function(){return this._tutorialSmallDialog},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tutorialTieDialog",{get:function(){return this._tutorialTieDialog},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showTieTutorial",{get:function(){return this._showTieTutorial},set:function(t){this._showTieTutorial=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"perfectRound",{get:function(){return this._perfectRound},set:function(t){this._perfectRound=t,t&&(this._perfectPlayersCount=this._playersManager.playersInGameCount,this._perfectPlayer=this._playersManager.firstPlayerStillInGame.def)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isFastForward",{get:function(){return!this._playersManager.player.isInGame&&!this._playersManager.isWipeout},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topPlayerOverWinScore",{get:function(){return this._topPlayerOverWinScore},set:function(t){this._topPlayerOverWinScore=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetColor",{set:function(t){this._targetColor=t,1===t&&this._playFinalRoundSound&&(W.AudioUtils.playSound("final_round_start",a.Config.VOLUME_FINAL_ROUND_START),this._playFinalRoundSound=!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showToolTip",{get:function(){return this._showToolTip},set:function(t){this._showToolTip=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showToolTipPass",{get:function(){return this._showToolTipPass},set:function(t){this._showToolTipPass=t},enumerable:!1,configurable:!0}),e.prototype.init=function(t){this._isRestart=t,this._currentState=null,this._round=this._totalRound=0,this._spinCounter=0,this._tie=!1,this._askTieQuestion=this._askTieQuestionAsked=!1,this._statsDialog=null,this._playFinalRoundSound=!0,this._winScore=a.Config.WIN_SCORE,s.App.settings.startGame(),s.App.settings.save(),s.App.sponsor.startEvent(this._gameWasQuitAfterRoundX?"restart":"start"),this._gameWasQuitAfterRoundX=!1},e.prototype.doPreCreate=function(){this._timelineManager=new E.TimelineManager,this._playersManager=new T.PlayersManager(a.Config.PLAYERS_MAX-1),this._roundData=new b.RoundData,this._choicesRevealer=new h.ChoicesRevealer(this,this._playersManager),this._bg=new M.PlayBg(this.game,this.world),this._topLeftLogo=new J.TopLeftLogo(this.game,this.world),this._spinner=C.Spinner.instance,this.world.add(this._spinner),this._spinner.onSpinnerClicked.add(this.onSpinnerClicked,this),this._interAnimParticles=new L.InterAnimParticles(this.game,this.world),this._ticker=new B.Ticker(this.game,this.world),this._inGameHud=new N.InGameHUD(this.game,this.world),this._inGameHud.onHUDButton.add(this.onHUDButton,this),this._choiceButtons=new P.ChoiceButtons(this.game,this),this._choiceButtons.onChoiceButton.add(this.onChoiceButton,this),this._leaderboard=new R.Leaderboard(this.game,this.world,this),this._movingNumber=new w.MovingNumber(this.game,this.world),this._interAnim=new I.InterAnim(this.game),this._interAnim.onFinish.add(this.onAnimationFinish,this),this._interAnim.onLoop.add(this.onAnimationLoop,this),this.world.add(this._interAnim),this._sharedDialogBg=new U.SharedDialogBg(this.game,540,392),this._gameResultDialog=new D.GameResultDialog(this.game,0,0),this._gameResultDialog.onButtonClicked.add(this.onGameResultButton,this),this._showBigTutorial&&(this._tutorialBigDialog=new j.TutorialBigDialog(this.game,740,430),this._tutorialBigDialog.onDialogClosed.add((function(){this._showBigTutorial=!1,this._currentState.onEvent(u.GameStateEventType.TutorialClosed)}),this)),this._showSmallTutorial&&(this._tutorialSmallDialog=new G.TutorialSmallDialog(this.game,460,360),this._tutorialSmallDialog.onDialogClosed.add((function(){this._showSmallTutorial=!1,this._currentState.onEvent(u.GameStateEventType.TutorialClosed)}),this)),this._tutorialTieDialog=new H.TutorialTieDialog(this.game,this._sharedDialogBg),this._tutorialTieDialog.onDialogClosed.add((function(){this._currentState.onEvent(u.GameStateEventType.TutorialClosed)}),this),this._yesNoDialog=new V.YesNoDialog(this.game,this._sharedDialogBg),this._yesNoDialog.onMenuButtonClicked.add(this.onDialogButton,this),this._rulesDialog=F.RulesDialog.instance,this.world.add(this._rulesDialog),this._statsDialog=k.StatsDialog.instance,this.world.add(this._statsDialog),this._roundData.onBankChanged.add(this._choiceButtons.bank.onBankChanged,this._choiceButtons.bank),this.createStates(),this._inGameHud.visible=!1,this._ticker.text(Y.TextUtils.getText("TXT_TICKER_START"),100)},e.prototype.doPostCreate=function(){this.setStateByName("Reset",!1),this._spinnerSnapshot=this.createSpinnerSnapshot(),this._spinnerSnapshot.visible=this._isRestart,this._spinner.visible=!this._isRestart,this.createEndGameTimeline(),this.createTimeline().start(X.TimelineDefs.PLAY_TIMELINE_DURATION,!0,0,1,O.eTimelineTrim.TRIM)},e.prototype.createSpinnerSnapshot=function(){this._spinner.visible=!0;var t=x.SpinnerSnapshot.instance;t.renderXY(this._spinner,400,400,!0);var e=this.game.add.sprite(0,0,t);return e.anchor.set(.5),this.world.setChildIndex(e,1),e},e.prototype.createEndGameTimeline=function(){this._timelineManager.add("buttons",X.TimelineDefs.PLAY_TIMELINE_BUTTONS_OUT).setTarget("buttons",this._choiceButtons)},e.prototype.createTimeline=function(){var t=this._timelineManager.add("basic",X.TimelineDefs.PLAY_TIMELINE);return t.setTarget("bg",this._isRestart?this._bg:null),t.setTarget("leaderboard",this._leaderboard),t.setTarget("spinnerSnapshot",this._spinnerSnapshot),t.setTarget("ticker",this._ticker),t.setTarget("buttons",this._choiceButtons),t.setTarget("logo",this._topLeftLogo),t.onFinished.addOnce((function(){this._spinner.visible=!0,this._spinnerSnapshot.visible=!1,this.playGameStartAnimation(),this._inGameHud.visible=!0}),this),t},e.prototype.onResize=function(e,i){t.prototype.onResize.call(this,e,i),this._bg.onResize(e,i),this._topLeftLogo.onResize(e,i);var n=0;this._topLeftLogo.visible&&(n=120+(i-120-25)/2-i/2),this._leaderboard.position.set(-e/2+14,n),this._ticker.position.set(a.Config.TICKER_X_OFFSET,-i/2+a.Config.TICKER_Y_OFFSET),this._ticker.onResize(e,i),this._inGameHud.position.set(e/2-77,-i/2+11),this._choiceButtons.position.set(a.Config.CHOICE_BUTTONS_X_OFFSET,i/2-a.Config.CHOICE_BUTTONS_Y_OFFSET),this._spinner.position.set(a.Config.WHEEL_X_OFFSET,a.Config.WHEEL_Y_OFFSET),this._interAnim.position.copyFrom(this._spinner.position),this._spinnerSnapshot.position.copyFrom(this._spinner.position);var r=this._timelineManager.get("basic");r.setPointProps("leaderboard","pos",this._leaderboard.position),r.setPointProps("ticker","pos",this._ticker.position),r.setPointProps("buttons","pos",this._choiceButtons.position),this._timelineManager.get("buttons").setPointProps("buttons","pos",this._choiceButtons.position),this._bankPosition.copyFrom(this._choiceButtons.position),this._bankPosition.x-=290,this._bankPosition.y-=78},e.prototype.createStates=function(){this._states={};var t=new v.StateWaitForSpin(this),e=new g.StateSpin(this),i=new y.StateSpinResult(this),n=new p.StateChoice(this),r=new c.StateReset(this),o=new f.StateRoundEnd(this),s=new m.StateTieTutorial(this);this._spinner.onSpinResult.add(e.onSpinResult,e),this._states.WaitForSpin=t,this._states.Spin=e,this._states.SpinResult=i,this._states.Choice=n,this._states.Reset=r,this._states.RoundEnd=o,this._showBigTutorial&&(this._states.BigTutorial=new _.StateBigTutorial(this)),this._showSmallTutorial&&(this._states.SmallTutorial=new d.StateSmallTutorial(this)),this._states.TieTutorial=s},e.prototype.setStateByName=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var n=this._states[t];void 0!==n&&this.setState.apply(this,o([n],e))},e.prototype.setState=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];null!==this._currentState&&this._currentState.onStateExit(),t.onStateEnter.apply(t,e),this._currentState=t},e.prototype.update=function(){this.debugPanel;var t=this.game.time.elapsedMS;if(this.updateColor(t),!this._yesNoDialog.isActive){this.isFastForward&&(t*=a.Config.BOTS_PLAYING_MULTIPLIER),null!==this._currentState&&this._currentState.onStateUpdate(t),this._spinner.visible&&this._spinner.updateSpinner(t),this._choiceButtons.updateAnimation(t);var e=this._choicesRevealer.update(t);null!==e&&this._currentState.onEvent(u.GameStateEventType.ChoiceUpdatedPlayer,e),this._interAnim.updateAnimation(),this._timelineManager.update(this.game.time.elapsedMS),this._timelineManager.get("basic").isPlaying||this._ticker.updateTicker(t)}},e.prototype.shutdown=function(){null!==this._sharedDialogBg&&(this._sharedDialogBg.destory(),this._sharedDialogBg=null),null!=this._rulesDialog&&(this.world.remove(this._rulesDialog),this._rulesDialog=null),null!=this._statsDialog&&(this.world.remove(this._statsDialog),this._statsDialog=null),this._timelineManager=null,this._spinner.clearIdle(),this._spinner.clearSignals(),this.world.remove(this._spinner),this._debugPanel=null},e.prototype.onChoiceButton=function(t){null!==this._currentState&&this._currentState.onEvent(u.GameStateEventType.Button,t)},e.prototype.onSpinnerClicked=function(t){null!==this._currentState&&this._currentState.onEvent(u.GameStateEventType.Spinner)},e.prototype.endRoundOrGame=function(t){var e=this._playersManager;return e.highScore<this._winScore?(++this._round,++this._totalRound,void this.setStateByName("RoundEnd","Reset",t)):(this._topPlayerOverWinScore=null,e.updatePlayerItems(),e.tiePlayersCount>1?(e.deactivateNonTiePlayers(),this._round=0,this._tie=!0,this._askTieQuestion=!this._askTieQuestionAsked&&!this._playersManager.player.active,this.calculateNewWinScore(),this._showTieTutorial=!0,this._ticker.text(Y.StringUtils.format(Y.TextUtils.getText("TXT_TICKER_START_TIE"),this._winScore),100),this.targetColor=1,void this.setStateByName("RoundEnd","Reset",t)):(e.activateAll(),this.targetColor=0,void this.setStateByName("RoundEnd",null,t)))},e.prototype.calculateNewWinScore=function(){var t=this._playersManager.highScore+a.Config.TIE_WIN_SCORE_STEP;this._winScore=10*Math.round(t/10)},e.prototype.showTieDialog=function(){this._askTieQuestion=!1,this._askTieQuestionAsked=!0,this._yesNoDialog.setDialog(V.DialogContext.Tie),this._yesNoDialog.show()},e.prototype.fastTieResolution=function(){for(var t=this._playersManager.activePlayers,e=this._playersManager.players;e[0].score<this._winScore;){for(var i=0;i<t;i++)e[i].collect(this.game.rnd.integerInRange(0,20));this._playersManager.sortPlayers(!0),e[0].score>this._winScore&&e[0].score===e[1].score&&this.calculateNewWinScore()}for(i=0;i<t;i++)e[i].updatePlayerItem();this._playersManager.sortPlayers()},e.prototype.onEndOfGame=function(){this.targetColor=0;var t=this._leaderboard.getPlayerItem(this._playersManager.player);t.keepMaximumAlpha=!0,t.topAlpha=1,this._currentState=null,s.App.settings.finishGame(this._playersManager.player,this._playersManager.players[0]);var e=this._playersManager.player.place,i=this._playersManager.countPlayersAtPlace(e),n=s.App.settings.data.skillScore,r=S.Skill.getSkillScoreChange(e,i,n);this.saveNewSkillScore(r),s.App.sponsor.startEvent("end",this._playersManager);var o=this._timelineManager.get("buttons");o.onFinished.addOnce((function(){this._inGameHud.enable(!0,10),this._gameResultDialog.setPlaceAndScore(e,i>1,n,r),this._gameResultDialog.show(),this.playMusic("Result",a.Config.MUSIC_VOLUME_TITLE)}),this),o.start(X.TimelineDefs.PLAY_TIMELINE_BUTTONS_OUT_DURATION,!1)},e.prototype.saveNewSkillScore=function(t){s.App.settings.addSkillScore(t),s.App.settings.save()},e.prototype.onHUDButton=function(t){switch(t.name){case"Sound":this.toggleSound(t.toggled);break;case"Music":this.toggleMusic(t.toggled);break;case"Exit":if(!this._interAnim.finished)return;this._gameResultDialog.visible?this.endScene(this.onGameQuit):(this._yesNoDialog.setDialog(V.DialogContext.Quit),this._yesNoDialog.show());break;case"Help":this._rulesDialog.show()}},e.prototype.onDialogButton=function(t,e){switch(e){case V.DialogContext.Quit:"Yes"===t.name&&(this._gameWasQuitAfterRoundX=this._round>=3,this._yesNoDialog.onDialogClosed.addOnce((function(){this.endScene(this.onGameQuit)}),this));break;case V.DialogContext.Tie:"Yes"===t.name?this.setStateByName("Reset"):(this.fastTieResolution(),this.onEndOfGame())}this._yesNoDialog.hide()},e.prototype.onGameQuit=function(){this.state.start("Title",!0,!1,!1)},e.prototype.onGameRestart=function(){this._spinner.buildWheel(a.Config.SPINNER_NUMBERS_ORDER),this._spinner.setIdle(!1,!0),this.game.state.start("Play",!0,!1,!0)},e.prototype.onGameResultButton=function(t){"Exit"===t.name?(this._gameResultDialog.onDialogClosed.addOnce((function(){this.endScene(this.onGameQuit)}),this),this._gameResultDialog.hideDialog(),this._interAnimParticles.stop()):"Stats"===t.name?this._statsDialog.show():"Replay"===t.name&&(this._gameResultDialog.onDialogClosed.addOnce((function(){this.endScene(this.onGameRestart)}),this),this._gameResultDialog.hideDialog(),this._interAnimParticles.stop())},e.prototype.endScene=function(t){this._inGameHud.visible=!1,x.SpinnerSnapshot.instance.renderXY(this._spinner,400,400,!0),this._spinner.visible=!1,this._spinnerSnapshot.visible=!0,this._gameResultDialog.visible&&(this._gameResultDialog.hideDialog(),this._interAnimParticles.stop());var e=this._timelineManager.get("basic");(e.setTarget("bg",this._bg),e.start(X.TimelineDefs.PLAY_TIMELINE_DURATION,!1,0,1,O.eTimelineTrim.TRIM),e.onFinished.addOnce((function(){t.call(this)}),this),this._choiceButtons.y<this.game.height/2)&&this._timelineManager.get("buttons").start(X.TimelineDefs.PLAY_TIMELINE_BUTTONS_OUT_DURATION,!1,.2*X.TimelineDefs.PLAY_TIMELINE_DURATION)},e.prototype.playGameStartAnimation=function(){this._animLoops=0,this._interAnim.playGameStartAnim(l.Defs.INTER_GAME_START)},e.prototype.playRoundAnimation=function(){var t,e=!1;this._tie?(t=(e=a.Config.USE_TIE_ROUND_NUMS)?l.Defs.INTER_TIE_ROUND_NUMS:l.Defs.INTER_TIE_ROUND)[1].parameters[0]=this._winScore:t=(e=a.Config.USE_ROUND_NUMS)?l.Defs.INTER_NEW_ROUND_NUMS:l.Defs.INTER_NEW_ROUND,e&&(t[0].parameters[0]=this._round+1),this._interAnim.playRoundAnim(t),W.AudioUtils.playSound("round_start_transition",a.Config.VOLUME_ROUND_START_TRANSITION)},e.prototype.playWipeoutAnimation=function(){this._animLoops=0,this._interAnim.playWipeoutAnim(),W.AudioUtils.playSound("wipeout",a.Config.VOLUME_WIPEOUT)},e.prototype.playBustedAnimation=function(t){var e=t?l.Defs.INTER_UNLUCKY:l.Defs.INTER_BUSTED;this._interAnim.playBustedAnim(e),W.AudioUtils.playSound("busted",a.Config.VOLUME_BUSTED)},e.prototype.playRoundEndAnimation=function(){var t=l.Defs.INTER_ROUND_END;t[1].textId=l.Defs.INTER_ROUND_END_PLACE_IDS[this._playersManager.player.place],this._interAnim.playRoundAnim(t),W.AudioUtils.playSound("round_end_transition",a.Config.VOLUME_ROUND_END_TRANSITION)},e.prototype.playGameEndAnimation=function(){this.stopMusic(),this._animLoops=0;var t=this._playersManager.players[0].def===l.Defs.PLAYER_YOU_DEF;W.AudioUtils.playSound("game_end_endscreen_reveal",a.Config.VOLUME_GAME_END_ENDSCREEN_REVEAL),this._interAnim.playGameEndAnim(l.Defs.INTER_GAME_END,t)},e.prototype.playGameEndYouWinAnimation=function(){this._animLoops=0,this._ticker.text(Y.TextUtils.getText(l.Defs.TICKER_YOU_WIN_IDS[this.rnd.integerInRange(0,2)]),100),W.AudioUtils.playSound("you_win",a.Config.VOLUME_YOU_WIN),this._interAnim.playGameEndAnim(l.Defs.INTER_GAME_END_YOU,!1),this._interAnimParticles.startConfetti(this._spinner.x,-this.game.height/2)},e.prototype.playPerfectRoundAnimation=function(){var t=l.Defs.INTER_PERFECT_ROUND;1===this._perfectPlayersCount?(t[0].textId="INTER_PERFECT_ROUND",t[0].parameters[0]=this._perfectPlayer.name):(t[0].textId="INTER_PERFECT_ROUND_MORE_PLAYERS",t[0].parameters[0]=this._perfectPlayersCount),this._animLoops=0,this._interAnim.playPerfectAnim(t),this._interAnimParticles.startStars(this._spinner.x,this._spinner.y),W.AudioUtils.playSound("ran_the_wheel",a.Config.VOLUME_RAN_THE_WHEEL)},e.prototype.playCorrectAnimation=function(t,e){var i=e?l.Defs.INTER_LUCKY:l.Defs.INTER_STRIKES[Math.min(t-1,4)];this._interAnim.playCorrectAnim(i),W.AudioUtils.playSound("correct",a.Config.VOLUME_CORRECT)},e.prototype.onAnimationFinish=function(t){if("wipeout_start_n"===t.currentAnimationName)return this._interAnim.playAnimationByName("wipeout_loop_n"),void(this._interAnim.playingAnim===I.PlayingAnim.Wipeout&&this._choicesRevealer.reset(h.ChoiceRevealerMode.WIPEOUT));if("wipeout_loop_perfect_start"!==t.currentAnimationName){if("We Have A Winner_start"===t.currentAnimationName)return this._interAnim.playAnimationByName("We Have A Winner_loop"),this._interAnim.playingAnim,I.PlayingAnim.NewGame,void this._interAnim.setAnimationSpeedPercent(100);if("We Have A Winner_end"===t.currentAnimationName)if(this._interAnim.playingAnim===I.PlayingAnim.NewGame)this.playMusic("Loop",a.Config.MUSIC_VOLUME_CHOOSE);else{if(this._interAnim.playingAnim===I.PlayingAnim.EndGamePlayer)return void this.playGameEndYouWinAnimation();if(this._interAnim.playingAnim===I.PlayingAnim.EndGame){var e=this._playersManager.players[0].def;e===l.Defs.PLAYER_YOU_DEF?this._ticker.text(Y.TextUtils.getText("TXT_TICKER_WIN_YOU"),100):this._ticker.text(Y.StringUtils.format(Y.TextUtils.getText("TXT_TICKER_WIN"),e.name),100)}}this._interAnim.visible=!1,null!==this._currentState&&this._currentState.onEvent(u.GameStateEventType.AnimationFinished)}else this._interAnim.playAnimationByName("wipeout_loop_perfect_loop")},e.prototype.onAnimationLoop=function(t){++this._animLoops,"wipeout_loop_n"===t.currentAnimationName?(this._interAnim.playingAnim===I.PlayingAnim.Wipeout&&this._choicesRevealer.allRevealed||this._interAnim.playingAnim===I.PlayingAnim.NewGame&&this._animLoops>=1||this._interAnim.playingAnim===I.PlayingAnim.EndGame&&this._animLoops>=1)&&this._interAnim.playAnimationByName("wipeout_end_n"):"wipeout_loop_perfect_loop"===t.currentAnimationName?1===this._animLoops&&(this._interAnim.playAnimationByName("wipeout_loop_perfect_end"),this._interAnimParticles.stop()):"We Have A Winner_loop"===t.currentAnimationName&&(1===this._animLoops&&this._interAnim.playAnimationByName("We Have A Winner_end"),this._interAnim.setAnimationSpeedPercent(100))},e.prototype.animateCollect=function(t){this.choiceButtons.disableButtons();var e=this._playersManager.player,i=this._leaderboard.getPlayerItem(e);null===e&&this.onAnimateCollectFinished(),this._movingNumber.setMovement(t,null,this._bankPosition,i.scoreWorldPosition,this._roundData.bank,100,this.onAnimateCollectFinished,this)},e.prototype.onAnimateCollectFinished=function(){var t=this._playersManager.player;this._freeSpinWatch&&s.App.settings.addFreeSpinScore(this._roundData.bank-this._freeSpinBank),t.collect(this._roundData.bank),t.updatePlayerItem(),this._currentState.onEvent(u.GameStateEventType.CollectFinished)},e.prototype.setFreeSpinWatch=function(t){this._freeSpinWatch=!0,this._freeSpinBank=t,s.App.settings.increaseFreeSpin()},e.prototype.resetFreeSpinWatch=function(){this._freeSpinWatch=!1,this._freeSpinBank=0},e.prototype.onChoicesRevealed=function(){this._currentState.onEvent(u.GameStateEventType.ChoicesRevealed)},e.prototype.onChoicesSort=function(){this._currentState.onEvent(u.GameStateEventType.ChoicesSorted)},e.prototype.updateColor=function(t){this._currentColor!==this._targetColor&&(t*=1/e.COLOR_CHANGE_DURATION,this._currentColor=z.MathHelp.moveTowards(this._currentColor,this._targetColor,t),this._bg.interpolateColor(this._currentColor),this._ticker.interpolateColor(this._currentColor))},Object.defineProperty(e.prototype,"debugPanel",{get:function(){return a.Config.DEBUG_ON?(null===this._debugPanel&&(this._debugPanel=new A.DebugPanel(this.game,this),this.debugPanel.position.set(this.game.width/2-70,-240)),this._debugPanel.exists=this._debugPanel.visible=!0):null!==this._debugPanel&&(this._debugPanel.exists=this._debugPanel.visible=!1),this._debugPanel},enumerable:!1,configurable:!0}),e.COLOR_CHANGE_DURATION=1e3,e}(K.SceneBase);e.PlayScene=Z},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.StateBigTutorial=void 0;var o=i(7),s=i(5),a=function(t){function e(e){var i=t.call(this,e)||this;return i._choice=null,i._saveChoiceIndex=0,i._rt=null,i._player=null,i._rt=new Phaser.RenderTexture(e.game,250,93),i._player=e.game.add.sprite(0,0,i._rt,0,e.world),i._player.visible=!1,i}return r(e,t),e.prototype.onStateEnter=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=this._playScene.game.world;this._choice=this._playScene.choiceButtons,this._choice.activateButtons(),this._saveChoiceIndex=i.getIndex(this._choice),i.bringToTop(this._choice);var n=this._playScene.leaderboard.getPlayerItem(this._playScene.playersManager.player);this._rt.renderXY(n,-20,0),this._player.visible=!0;var r=this._playScene.leaderboard.x+n.x+20,o=this._playScene.leaderboard.y+n.y;this._player.position.set(r,o),i.bringToTop(this._player),this._playScene.tutorialBigDialog.show()},e.prototype.onStateExit=function(){var t=this._playScene.game.world;t.remove(this._choice),t.addAt(this._choice,this._saveChoiceIndex),this._player.visible=!1},e.prototype.onEvent=function(t,e){t===s.GameStateEventType.TutorialClosed&&this._playScene.setStateByName("Choice")},e}(o.GameState);e.StateBigTutorial=a},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.StateChoice=void 0;var o=i(1),s=i(2),a=i(32),l=i(0),h=i(7),u=i(5),_=i(13),p=i(3),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._stateChanged=!1,e._playersBankedOverWinScore=0,e._defs=[],e}return r(e,t),e.prototype.onStateEnter=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._playScene.playersManager.resetFaces(),this._stateChanged=!1,this.updateTickerText(),this._playersBankedOverWinScore=this.getPlayersBankedOverWinScore().length,this._playScene.playersManager.makeAiChoice(this._playScene,this._playScene.roundData),this._playScene.playersManager.processAiChoices(this._playScene.roundData);var i=this._playScene.choiceButtons;if(this.playerInGame){i.enableButtons(this._playScene.playersManager.player.passUsed,this._playScene.roundData);var n=this._playScene.spinner;n.innerBulbs.flashSequence(350,200,-1,!1),n.outerBulbs.flashSequence(350,200,-1,!0)}else i.disableButtons(!0);this.playerInGame&&this._playScene.fadeMusicVolumeTo(o.Config.MUSIC_VOLUME_CHOOSE)},e.prototype.updateTopPlayerOverWinScore=function(){var t=this._playScene.playersManager.getTopPlayerOverWinScore(this._playScene.winScore);this._playScene.topPlayerOverWinScore=t},e.prototype.onStateUpdate=function(t){this.playerInGame||this._stateChanged||this.nextState(),this.playerInGame&&this._playScene.choiceButtons.flashButtons(this._playScene.playersManager.player.passUsed),this._playScene.movingNumber.updateMovement(t)},e.prototype.onEvent=function(t,e){if(t===u.GameStateEventType.Button){var i=e;this.statsAndEvents(i.name);var n=this._playScene.playersManager.player;switch(i.name){case"Higher":n.higher(),l.AudioUtils.playSound("player_guess_higher",o.Config.VOLUME_PLAYER_GUESS_HIGHER),this.nextState();break;case"Lower":n.lower(),l.AudioUtils.playSound("player_guess_lower",o.Config.VOLUME_PLAYER_GUESS_LOWER),this.nextState();break;case"Bank":this._playScene.animateCollect(a.MovingNumberType.Bank),l.AudioUtils.playSound("player_banks",o.Config.VOLUME_PLAYER_BANKS);break;case"Pass":n.pass(),this._playScene.setFreeSpinWatch(this._playScene.roundData.bank),l.AudioUtils.playSound("player_free_spin",o.Config.VOLUME_PLAYER_FREE_SPIN),this.nextState()}}else t===u.GameStateEventType.CollectFinished&&this.nextState()},e.prototype.nextState=function(){if(this.updateTopPlayerOverWinScore(),this._playScene.ticker.clear(),this.updateTickerText(),this._stateChanged=!0,this._playScene.choiceButtons.disableButtons(),this._playScene.spinner.clearIdle(),!this._playScene.playersManager.hasPlayersInGame)return this._playScene.playersManager.sortPlayers(),void this._playScene.endRoundOrGame(!0);this.removeSlice()},e.prototype.removeSlice=function(){var t=this._playScene.spinner;t.removeSlice(),t.setAnimateShift(),t.onSliceRemoved.addOnce(this.onSliceRemoved,this)},e.prototype.onSliceRemoved=function(){this._playScene.setStateByName("Spin")},e.prototype.updateTickerText=function(){if(this._playScene.tie)this._playScene.ticker.text(l.StringUtils.format(l.TextUtils.getText("TXT_TICKER_START_TIE"),this._playScene.winScore),100);else{var t,e=this._playScene.ticker,i=this._playScene.roundData,n=this._playScene.playersManager,r=null;if(this._playScene.playersManager.playersInGameCount>0&&null!==(t=this._playScene.playersManager.getTopPlayerOverWinScore(this._playScene.winScore))){var a=t;return r=l.StringUtils.format(l.TextUtils.getText("TXT_TICKER_FINAL_ROUND_PLAYER"),a.def.name,a.score),void this._playScene.ticker.text(r,1e3,!0)}if(this.playerInGame||o.Config.TICKER_WHEN_PLAYER_OUT_GAME){if(this.playerInGame){var h=this._playScene.winScore;if(n.updatePlayersOverWinScore(h,this._playScene.roundData.bank,this._playScene.tie,!0),1===n.playersOverWinScoreCount){var u,_=n.playersOverWinScore[0];u=_===s.Defs.PLAYER_YOU_DEF?l.StringUtils.format(l.TextUtils.getText("TXT_TICKER_YOU_OVER_SCORE"),h):l.StringUtils.format(l.TextUtils.getText("TXT_TICKER_PLAYER_OVER_SCORE"),_.name,h),this._playScene.ticker.text(u,100)}else if(n.playersOverWinScoreCount>1){var p=l.StringUtils.format(l.TextUtils.getText("TXT_TICKER_MORE_PLAYER_OVER_SCORE"),n.playersOverWinScoreCount,h);this._playScene.ticker.text(p,100)}else r=i.landedNumberLowest||i.landedNumberHighest?l.TextUtils.getText("TXT_TICKER_NO_BRAINER"):l.StringUtils.format(l.TextUtils.getText("TXT_TICKER_NEXT"),this._playScene.roundData.landedNumber.value)}else if(n.playersInGameCount>0)if(n.player.score>this._playScene.winScore)r=l.TextUtils.getText("TXT_TICKER_FINAL_ROUND");else if((t=this.getPlayersBankedOverWinScore()).length>0){var c=t;r=1===c.length?l.StringUtils.format(l.TextUtils.getText("TXT_TICKER_BANKED_OVER_100"),c[0].name):l.StringUtils.format(l.TextUtils.getText("TXT_TICKER_MORE_BANKED_OVER_100"),c.length)}else r=this.outOfRound()?l.TextUtils.getText("TXT_TICKER_OUT_THIS"):l.TextUtils.getText("TXT_TICKER_OUT");e.text(r,0)}}},e.prototype.outOfRound=function(){for(var t=this._playScene.playersManager,e=t.players,i=this._playScene.roundData.bank,n=0;n<t.activePlayers;n++){var r=e[n];if(r.isInGame&&(r.score>60||r.score+i>90))return!0}return!1},e.prototype.getPlayersBankedOverWinScore=function(){this._defs.length=0;for(var t=this._playScene.playersManager,e=t.players,i=0;i<t.activePlayers;i++){var n=e[i];n!==t.player&&n.score>=this._playScene.winScore&&this._defs.push(n.def)}return this._defs},e.prototype.statsAndEvents=function(t){var e=this._playScene.roundData,i=this._playScene.playersManager,n=e.probabilityOfLowerThanLanded,r=e.landedNumberHighest||e.landedNumberLowest;if(!r&&("Higher"===t||"Lower"===t)){var o=Math.round(100*n),s=o<50&&"Lower"===t||100-o<50&&"Higher"===t;p.App.settings.addGuess(s)}p.App.settings.addChoice(t),p.App.sponsor.dataEvent(p.App.settings.data.gamesFinished,this._playScene.totalRound,n,t,i.player.status===_.PlayerStatus.Collect,r,this._playersBankedOverWinScore>0)},e}(h.GameState);e.StateChoice=c},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.AnimatedParticle=void 0;var o=function(t){function e(e,i){var n=t.call(this,e,i)||this;return void 0!==i&&null===i||(n._anims=i[0]),n}return r(e,t),e.prototype.onCreate=function(e){t.prototype.onCreate.call(this,e);for(var i=this._visual,n=0;n<this._anims.length;n++){var r=this._anims[n],o=i.animations.add(r.name,r.frames,r.frameRate,r.loop);!r.loop&&r.killOnComplete&&(o.killOnComplete=!0)}},e.prototype.update=function(e){void 0===e&&(e=!0);var i=this._delay,n=t.prototype.update.call(this,e);return i>0&&this._delay<=0&&this._visual.animations.currentAnim.play(),n},e.prototype.setFrame=function(t){this.setAnim(t)},e.prototype.setAnim=function(t){var e=this._visual;e.animations.stop(null,!0),this._delay<=0?e.animations.play(t):(e.animations.currentAnim=e.animations.getAnimation(t),e.frame=e.animations.currentAnim._frames[0])},e.prototype.setRandomAnim=function(){this._visual;var t=this._anims[this._game.rnd.integerInRange(0,this._anims.length-1)].name;this.setAnim(t)},e}(i(21).SpriteParticle);e.AnimatedParticle=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParticleChain=void 0;var n=function(){function t(t,e,i,n){void 0===i&&(i=null),void 0===n&&(n=null),this._emitter=null,this._game=t,this._emitter=e,this._animEmitter=i,this._params=n}return t.prototype.emit=function(t,e,i,n,r){for(this._emitter.emitAt(t,e),null!==this._animEmitter&&this._animEmitter.emitAt(t,e);null!==i;){var o=i.animated?this._animEmitter:this._emitter;if(null===this._params&&i.paramsName,null!==this._params){var s=this._params[i.paramsName];void 0===s||(o.params=s)}o.explode(this._game.rnd.integerInRange(i.countMin,i.countMax),n,r),i=i.next}},t}();e.ParticleChain=n},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.StateReset=void 0;var o=i(7),s=i(5),a=i(1),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.onStateEnter=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=this._playScene;i.playersManager.clearState(),i.roundData.reset(),this._playScene.resetFreeSpinWatch(),this._playScene.spinCounter=0;var n=i.spinner;this._playScene.spinner.isIdle||n.buildWheel(a.Config.SPINNER_NUMBERS_ORDER),this._playScene.choiceButtons.disableButtons(!0),this._playScene.fadeMusicVolumeTo(a.Config.MUSIC_VOLUME_CHOOSE),void 0!==t&&0!==t.length&&!0!==t[0]||this._playScene.playRoundAnimation(),!this._playScene.tie&&this.playerInGame&&this._playScene.ticker.clear(),a.Config.DEBUG_ON&&this._playScene.debugPanel.updateButtons()},e.prototype.onEvent=function(t,e){t===s.GameStateEventType.AnimationFinished&&(this._playScene.spinner.setIdle(!1,this.playerInGame),this._playScene.tie&&this.playerInGame&&this._playScene.showTieTutorial?this._playScene.setStateByName("TieTutorial"):this._playScene.setStateByName("WaitForSpin"))},e}(o.GameState);e.StateReset=l},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.StateRoundEnd=void 0;var o=i(7),s=i(5),a=i(20),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._nextStateName=null,e._playGameEndAnimation=!1,e}return r(e,t),e.prototype.onStateEnter=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];t.length,this._nextStateName=t[0];var i=t[1];this._playGameEndAnimation=null===this._nextStateName,i?this._playScene.choicesRevealer.reset(a.ChoiceRevealerMode.NORMAL):this.playAnimation()},e.prototype.onEvent=function(t,e){t===s.GameStateEventType.AnimationFinished?null!==this._nextStateName?this._playScene.askTieQuestion?this._playScene.showTieDialog():this._playScene.showSmallTutorial?this._playScene.setStateByName("SmallTutorial"):this._playScene.setStateByName(this._nextStateName):this._playScene.onEndOfGame():t===s.GameStateEventType.ChoicesSorted&&this.playAnimation()},e.prototype.playAnimation=function(){this._playGameEndAnimation?(this._playScene.ticker.clear(),this._playScene.playGameEndAnimation()):this._playScene.playRoundEndAnimation()},e}(o.GameState);e.StateRoundEnd=l},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.StateSmallTutorial=void 0;var o=i(7),s=i(5),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.onStateEnter=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._playScene.tutorialSmallDialog.show()},e.prototype.onEvent=function(t,e){t===s.GameStateEventType.TutorialClosed&&this._playScene.setStateByName("Reset")},e}(o.GameState);e.StateSmallTutorial=a},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.StateSpin=void 0;var o=i(1),s=i(2),a=i(0),l=i(20),h=i(13),u=i(34),_=i(7),p=i(5),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._highlightPlayer=null,e._defs=[],e}return r(e,t),e.prototype.onStateEnter=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._playScene.choiceButtons.setTexts(this._playScene.roundData),this._highlightPlayer=this._playScene.leaderboard.getLastStandingPlayer(),this._playScene.tie||this.updateTickerTextInGame(!1),this._playScene.choicesRevealer.reset(l.ChoiceRevealerMode.NORMAL);var i=this._playScene.spinner;i.rodsManager.flashSequence(500,500,-1,!1,4),i.spin(),++this._playScene.spinCounter,this._playScene.fadeMusicVolumeTo(o.Config.MUSIC_VOLUME_SPIN)},e.prototype.onStateUpdate=function(t){this._playScene.choiceButtons.updateButtonsText()},e.prototype.onEvent=function(t,e){if(t===p.GameStateEventType.ChoiceUpdatedPlayer){null!==e&&e===this._highlightPlayer&&this._playScene.leaderboard.highlightPlayer(this._highlightPlayer)}},e.prototype.onSpinResult=function(t){!this._playScene.tie&&this.playerInGame&&(this._playScene.ticker.clear(),this.updateTickerTextInGame(!0)),this._playScene.choiceButtons.resetTexts(),this.processSpinResult(t),this.resolveChoices(),this.changeState(),this._playScene.leaderboard.highlightLastStandingOff()},e.prototype.processSpinResult=function(t){var e=this._playScene.roundData;e.getSpinnerNumberAt(t).state=u.SpinnerNumberState.OutOfGame,e.setLandedNumberToSpinnerIndex(t),e.removeSpinnerNumberAt(t),o.Config.DEBUG_ON&&this._playScene.debugPanel.updateButtons()},e.prototype.resolveChoices=function(){var t=this._playScene.playersManager;t.resolveChoices(this._playScene.roundData),t.isWipeout||t.updatePlayerItems()},e.prototype.changeState=function(){this._playScene.setStateByName("SpinResult")},e.prototype.updateTickerTextInGame=function(t){var e,i=null;if(null!==(e=this._playScene.playersManager.getTopPlayerOverWinScore(this._playScene.winScore))){var n=e;return i=a.StringUtils.format(a.TextUtils.getText("TXT_TICKER_FINAL_ROUND_PLAYER"),n.def.name,n.score),void this._playScene.ticker.text(i,1e3,!0)}if(this.playerInGame&&!t){this._playScene.ticker.clear();var r=-1;if(this.lastOneSpinning())r=1,i=a.TextUtils.getText("TXT_TICKER_YOU_LAST");else if(this.riskyChoice())r=2,i=a.TextUtils.getText("TXT_TICKER_RISKY_CHOICE");else if((e=this.freeSpin()).length>0){r=3;var o=e;i=1===o.length?o[0]===this._playScene.playersManager.player.def?a.TextUtils.getText("TXT_TICKER_USED_FREE_SPIN_YOU"):a.StringUtils.format(a.TextUtils.getText("TXT_TICKER_USED_FREE_SPIN"),o[0].name):a.StringUtils.format(a.TextUtils.getText("TXT_TICKER_USED_FREE_SPIN_X"),o.length)}else if(null!==(e=this.playedItSafe()))r=4,i=a.StringUtils.format(a.TextUtils.getText("TXT_TICKER_PLAYED_SAFE"),e.name);else if(null!==(e=this.vsEveryoneElse()))r=5,i=a.StringUtils.format(a.TextUtils.getText("TXT_TICKER_VS_EVERYONE_ELSE"),e.name);else if(0!==(e=this.everyonePickedTheSame()))r=6,i=a.TextUtils.getText(e<0?"TXT_TICKER_EVERYONE_PICKED_LOWER":"TXT_TICKER_EVERYONE_PICKED_HIGHER");else{r=7;var l=s.Defs.TICKER_IDLE_IDS.length-1,h=this._playScene.roundData;null!=h.landedNumber&&(h.landedNumberHighest||h.landedNumberLowest)&&--l,i=a.TextUtils.getText(s.Defs.TICKER_IDLE_IDS[this._playScene.rnd.integerInRange(0,l)])}this._playScene.ticker.text(i,r)}},e.prototype.lastOneSpinning=function(){var t=this._playScene.playersManager;return 1===t.playersInGameCount&&t.firstPlayerStillInGame.def===s.Defs.PLAYER_YOU_DEF},e.prototype.riskyChoice=function(){var t=this._playScene.roundData,e=this._playScene.playersManager.player;if(!this.playerInGame||null===t.landedNumber)return!1;var i=t.probabilityOfLowerThanLanded;return e.status===h.PlayerStatus.Lower&&i<.3||e.status===h.PlayerStatus.Higher&&1-i<.3},e.prototype.freeSpin=function(){this._defs.length=0;for(var t=this._playScene.playersManager,e=t.players,i=0;i<t.activePlayers;i++){var n=e[i];n.isInGame&&n.status===h.PlayerStatus.Passed&&this._defs.push(n.def)}return this._defs},e.prototype.playedItSafe=function(){for(var t=null,e=this._playScene.playersManager,i=e.players,n=0,r=0,o=0;o<e.activePlayers;o++){var s=i[o];if(!s.isInGame||s.status!==h.PlayerStatus.Higher&&s.status!==h.PlayerStatus.Lower){if(s.justCollect){if(r>0)return null;++r,t=s.def}}else++n}return 1===r&&n>=3?t:null},e.prototype.vsEveryoneElse=function(){for(var t=null,e=0,i=null,n=0,r=this._playScene.playersManager,o=r.players,s=0;s<r.activePlayers;s++){var a=o[s];a.isInGame&&(a.status===h.PlayerStatus.Lower?(++e,t=a.def):a.status===h.PlayerStatus.Higher&&(++n,i=a.def))}return 1===e&&n>=3?t:1===n&&e>=3?i:null},e.prototype.everyonePickedTheSame=function(){var t=this._playScene.roundData;if(null===t.landedNumber||t.landedNumberLowest||t.landedNumberHighest)return 0;for(var e=this._playScene.playersManager,i=e.players,n=0,r=0,o=0;o<e.activePlayers;o++){var s=i[o];s.isInGame&&(s.status===h.PlayerStatus.Lower?++n:s.status===h.PlayerStatus.Higher&&++r)}return 0===n&&r>=3?1:0===r&&n>=3?-1:0},e}(_.GameState);e.StateSpin=c},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.StateSpinResult=void 0;var o=i(2),s=i(57),a=i(32),l=i(58),h=i(0),u=i(7),_=i(5),p=i(20),c=i(3),f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._animateLastNumber=!1,e._bankValue=0,e._nextStateLock=0,e._perfectAnim=!1,e}return r(e,t),e.prototype.onStateEnter=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._nextStateLock=0,this._perfectAnim=!1;var i=this._playScene.spinner;if(!this._playScene.roundData.isFirstSpin){var n=this._playScene.roundData.isLandedNumberHigher?s.BulbColors.PURPLE:s.BulbColors.YELLOW;i.innerBulbs.setColors(n),i.outerBulbs.setColors(n),i.rodsManager.setColor(this._playScene.roundData.isLandedNumberHigher?l.RodColor.PURPLE:l.RodColor.YELLOW)}var r=this._playScene.playersManager.player.isInGame?1:.5;i.innerBulbs.flashAll(350*r,200*r,3),i.outerBulbs.flashAll(350*r,200*r,3),i.rodsManager.lightAll(!0),i.onInnerBulbsFinished.addOnce(this.onBulbsFinished,this)},e.prototype.onBulbsFinished=function(){var t=this._playScene.playersManager,e=t.player,i=this._playScene.roundData;t.isWipeout?this._playScene.playWipeoutAnimation():e.active&&e.justBusted?this._playScene.playBustedAnimation(i.IsLandedNumberRare):e.active&&e.justCorrect?this._playScene.playCorrectAnimation(e.strike,i.IsLandedNumberSuperRare):this.animateLanded()},e.prototype.animateLanded=function(){if(this._playScene.playersManager.hasPlayersInGame){this._playScene.roundData.isOutOfNumbers&&(this._playScene.perfectRound=!0,this._animateLastNumber=!0,this.playerInGame&&c.App.settings.perfectRound()),this._bankValue=this._playScene.roundData.landedNumber.value;var t=this._playScene.spinner;t.setAnimateLanded(!this._playScene.perfectRound,this._playScene.isFastForward),t.onLandedAnimated.add(this.onLandedAnimated,this)}else this.nextState()},e.prototype.onLandedAnimated=function(){if(this._playScene.perfectRound){var t=this._playScene.spinner.getSelectedSlice().num;this.setMovingNumber(t,t.world,200)}else this.setMovingNumber(null,this._playScene.spinner.position,250)},e.prototype.onMovingNumberFinished=function(){if(this.increaseBank(this._bankValue),this._animateLastNumber){this._animateLastNumber=!1;var t=this._playScene.spinner.getLastSlice(),e=t.num;this._bankValue=t.slice.value,this.setMovingNumber(e,e.world,200),t.num.visible=t.numOver.visible=!1}else this._playScene.spinner.onLandedAnimated.removeAll(),this.checkAutoCollect()},e.prototype.setMovingNumber=function(t,e,i){this._playScene.movingNumber.setMovement(a.MovingNumberType.Spinner,t,e,this._playScene.bankPosition,this._bankValue,i,this.onMovingNumberFinished,this)},e.prototype.checkAutoCollect=function(){if(this._playScene.perfectRound)return this._playScene.perfectRound=!1,this._perfectAnim=!0,++this._nextStateLock,this._playScene.playPerfectRoundAnimation(),void(this.playerInGame?(++this._nextStateLock,this._playScene.animateCollect(a.MovingNumberType.Bank)):this.autocollectPlayers());this.nextState()},e.prototype.autocollectPlayers=function(){var t=this._playScene.playersManager,e=this._playScene.roundData;t.autoCollect(e.bank),this._playScene.choicesRevealer.reset(p.ChoiceRevealerMode.NORMAL),t.sortPlayers()},e.prototype.onStateUpdate=function(t){this._playScene.movingNumber.updateMovement(t)},e.prototype.onEvent=function(t,e){t===_.GameStateEventType.AnimationFinished&&this._perfectAnim||t===_.GameStateEventType.CollectFinished?(--this._nextStateLock,t===_.GameStateEventType.CollectFinished&&this.autocollectPlayers(),this._nextStateLock<=0&&this.nextState()):t===_.GameStateEventType.AnimationFinished&&this.animateLanded()},e.prototype.nextState=function(){var t=this._playScene.spinner;t.innerBulbs.setColors(s.BulbColors.DEFAULT),t.outerBulbs.setColors(s.BulbColors.DEFAULT),t.rodsManager.setColor(l.RodColor.DEFAULT),t.rodsManager.lightAll(!0);var e=this._playScene.roundData,i=this._playScene.playersManager;e.isOutOfNumbers||!i.hasPlayersInGame?this._playScene.endRoundOrGame(!0):this.timeForTutorial()?this._playScene.setStateByName("BigTutorial"):this._playScene.setStateByName("Choice")},e.prototype.timeForTutorial=function(){if(!this._playScene.showBigTutorial)return!1;if(!this.playerInGame)return!1;if(this._playScene.spinCounter<2)return!1;var t=this._playScene.roundData;return!t.landedNumberLowest&&!t.landedNumberHighest},e.prototype.updateTickerText=function(){var t=this._playScene.playersManager,e=this._playScene.winScore;if(t.updatePlayersOverWinScore(e,this._playScene.roundData.bank,this._playScene.tie,!0),1===t.playersOverWinScoreCount){var i=t.playersOverWinScore[0],n=void 0;n=i===o.Defs.PLAYER_YOU_DEF?h.StringUtils.format(h.TextUtils.getText("TXT_TICKER_YOU_OVER_SCORE"),e):h.StringUtils.format(h.TextUtils.getText("TXT_TICKER_PLAYER_OVER_SCORE"),i.name,e),this._playScene.ticker.text(n,100)}else if(t.playersOverWinScoreCount>1){n=h.StringUtils.format(h.TextUtils.getText("TXT_TICKER_MORE_PLAYER_OVER_SCORE"),t.playersOverWinScoreCount,e);this._playScene.ticker.text(n,100)}else this._playScene.ticker.clear()},e.prototype.increaseBank=function(t){this._playScene.roundData.increaseBank(t)},e}(u.GameState);e.StateSpinResult=f},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.Bulb=void 0;var o=function(t){function e(e,i,n,r){var o=t.call(this,e,i,n,"Sprites",0)||this;return o._def=null,o.anchor.set(.5),o.setDef(r),o}return r(e,t),Object.defineProperty(e.prototype,"lightFrame",{get:function(){return this._def.lightFrame},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lightTint",{get:function(){return this._def.lightTint},enumerable:!1,configurable:!0}),e.prototype.setDef=function(t){this._def=t,this.frameName=t.frame,this.tint=t.tint},e}(Phaser.Sprite);e.Bulb=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.StateTieTutorial=void 0;var o=i(7),s=i(5),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.onStateEnter=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._playScene.showTieTutorial=!1,this._playScene.tutorialTieDialog.setTextAndShow(this._playScene.winScore)},e.prototype.onEvent=function(t,e){t===s.GameStateEventType.TutorialClosed&&this._playScene.setStateByName("WaitForSpin")},e}(o.GameState);e.StateTieTutorial=a},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.StateWaitForSpin=void 0;var o=i(7),s=i(5),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.onStateEnter=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._playScene.playersManager.resetFaces();var i=this._playScene.spinner;i.enableInput(!0)},e.prototype.onStateExit=function(){this._playScene.tie||0===this._playScene.round||this._playScene.ticker.clear(),this._playScene.spinner.enableInput(!1)},e.prototype.onEvent=function(t,e){t===s.GameStateEventType.Spinner&&this.startSpinning()},e.prototype.onStateUpdate=function(t){this.playerInGame||this.startSpinning()},e.prototype.startSpinning=function(){var t=this._playScene;t.spinner.clearIdle(),t.setStateByName("Spin")},e}(o.GameState);e.StateWaitForSpin=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PlayersManager=void 0;var n=i(13),r=i(1),o=i(2),s=function(){function t(t){this.onSorted=new Phaser.Signal,this.onActiveCountChanged=new Phaser.Signal,this._players=[],this._player=null,this._activePlayers=0,this._justBusted=0,this._playersOverWinScore=[],this._player=this.createPlayer(),this._players.push(this._player),this.createOpponents(t),this._activePlayers=this._players.length}return Object.defineProperty(t.prototype,"players",{get:function(){return this._players},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"player",{get:function(){return this._player},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"justBusted",{get:function(){return this._justBusted},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isWipeout",{get:function(){return!this.hasPlayersInGame&&this.justBusted>=r.Config.PLAYERS_WIPEOUT_COUNT},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activePlayers",{get:function(){return this._activePlayers},enumerable:!1,configurable:!0}),t.prototype.createPlayer=function(){return new n.Player(o.Defs.PLAYER_YOU_DEF,!0)},t.prototype.createOpponents=function(t){for(var e=[],i=0;i<t;i++){var r=null,s=Math.floor(Math.random()*o.Defs.PLAYER_DEFS.length);do{-1===e.indexOf(s)?(r=o.Defs.PLAYER_DEFS[s],e.push(s)):s=(s+1)%o.Defs.PLAYER_DEFS.length}while(null===r);var a=new n.Player(r,!1);a.order=i+1,this._players.push(a)}},t.prototype.allPlayersHaveScoreZero=function(){for(var t=0;t<this._players.length;t++)if(this._players[t].score>0)return!1;return!0},t.prototype.sortPlayers=function(t){void 0===t&&(t=!1),this._players.sort(this.scoreSortFunction);for(var e=this._players[0].score,i=0,n=0;n<this._players.length;n++)this._players[n].order=n,this._players[n].score<e&&(i=n,e=this._players[n].score),this._players[n].place=i;t||this.onSorted.dispatch(this)},t.prototype.scoreSortFunction=function(t,e){var i=t.score,r=e.score;return i===r&&(t.status===n.PlayerStatus.Collect||t.status===n.PlayerStatus.Busted?t.isPlayer?i-=1:t.status===n.PlayerStatus.Collect?i-=2:i-=4:t.isPlayer&&(i+=1),e.status===n.PlayerStatus.Collect||e.status===n.PlayerStatus.Busted?e.isPlayer?r-=1:e.status===n.PlayerStatus.Collect?r-=2:r-=4:e.isPlayer&&(r+=1)),-(i-r)},t.prototype.getTopPlayerOverWinScore=function(t){for(var e=null,i=this._players,n=0;n<this._activePlayers;n++){var r=i[n];r.score>=t&&(null===e||e.score<r.score)&&(e=r)}return e},Object.defineProperty(t.prototype,"hasPlayersInGame",{get:function(){for(var t=0;t<this._activePlayers;t++)if(this._players[t].isInGame)return!0;return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playersInGameCount",{get:function(){for(var t=0,e=0;e<this._activePlayers;e++)this._players[e].isInGame&&++t;return t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"firstPlayerStillInGame",{get:function(){for(var t=0;t<this._activePlayers;t++)if(this._players[t].isInGame)return this._players[t];return null},enumerable:!1,configurable:!0}),t.prototype.autoCollect=function(t){for(var e=0;e<this._activePlayers;e++){var i=this._players[e];i.status===n.PlayerStatus.Nothing&&i.collect(t)}},t.prototype.clearState=function(){for(var t=0;t<this._activePlayers;t++)this._players[t].reset();this._justBusted=0},Object.defineProperty(t.prototype,"highScore",{get:function(){return this._players[0].score},enumerable:!1,configurable:!0}),t.prototype.getAveragePosition=function(t){return(this.getPosition(t)+this.getPositionLowerInGroup(t))/2},t.prototype.getPosition=function(t){for(var e=0,i=0;i<this._activePlayers;i++)t<this._players[i].score&&++e;return e+1},t.prototype.getPositionLowerInGroup=function(t){for(var e=0,i=0;i<this._activePlayers;i++)t<=this._players[i].score&&++e;return e+1},t.prototype.getScoreAtPosition=function(t){return t=Math.min(t,this._activePlayers-1),this._players[t].score},Object.defineProperty(t.prototype,"tiePlayersCount",{get:function(){for(var t=0,e=0;e<this._activePlayers;e++)this._players[e].score===this._players[0].score&&++t;return t},enumerable:!1,configurable:!0}),t.prototype.makeAiChoice=function(t,e){for(var i=0;i<this._activePlayers;i++){var n=this._players[i];n.isPlayer||n.makeChoice(t,e,this)}},t.prototype.processAiChoices=function(t){for(var e=0;e<this._activePlayers;e++){var i=this._players[e];i.isPlayer||i.processChoice(t)}},t.prototype.resetFaces=function(){for(var t=0;t<this._activePlayers;t++)this._players[t].resetFace()},t.prototype.updatePlayerItems=function(){for(var t=0;t<this._activePlayers;t++){this._players[t].updatePlayerItem()}},t.prototype.updateSinglePlayerItemAtIndex=function(t){var e=this._players[t];return e.updatePlayerItem(),e},t.prototype.resolveChoices=function(t){this._justBusted=0;for(var e=0;e<this._activePlayers;e++){var i=this._players[e];i.resolveChoice(t),i.justBusted&&++this._justBusted}},t.prototype.deactivateNonTiePlayers=function(){this._activePlayers=this.tiePlayersCount;for(var t=this._activePlayers;t<this._players.length;t++)this._players[t].active=!1;this.onActiveCountChanged.dispatch(this._activePlayers)},t.prototype.activateAll=function(){this._activePlayers=this._players.length;for(var t=0;t<this._players.length;t++)this._players[t].active=!0;this.onActiveCountChanged.dispatch(this._activePlayers)},Object.defineProperty(t.prototype,"playersOverWinScore",{get:function(){return this._playersOverWinScore},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playersOverWinScoreCount",{get:function(){return this._playersOverWinScore.length},enumerable:!1,configurable:!0}),t.prototype.updatePlayersOverWinScore=function(t,e,i,n){if(this._playersOverWinScore.length=0,!i)for(var r=0;r<this._activePlayers;r++){var o=this._players[r];o.isInGame&&o.score+e>=t&&this._playersOverWinScore.push(o.def)}},t.prototype.countPlayersAtPlace=function(t){for(var e=0,i=0;i<this._players.length;i++)this._players[i].place===t&&++e;return e},t}();e.PlayersManager=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RoundData=void 0;var n=i(34),r=i(1),o=function(){function t(){this.onBankChanged=new Phaser.Signal,this.onLandedNumberChanged=new Phaser.Signal,this._spinnerNumbers=null,this._landedNumber=null,this._previousNumber=null,this._isLandedNumberRare=!1,this._isLandedNumberSuperRare=!1,this._bank=0,null===t._allNumbers&&this.createAllNumbers(),this.reset()}return Object.defineProperty(t.prototype,"numbers",{get:function(){return t._allNumbers},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"spinnerNumbers",{get:function(){return this._spinnerNumbers},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"spinnerNumbersLength",{get:function(){return this._spinnerNumbers.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"spinnerNumbersSum",{get:function(){for(var t=0,e=0;e<this._spinnerNumbers.length;e++)t+=this._spinnerNumbers[e].value;return t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"landedNumber",{get:function(){return this._landedNumber},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLandedNumberHigher",{get:function(){return null!==this._landedNumber&&null!==this._previousNumber&&this._landedNumber.value>this._previousNumber.value},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bank",{get:function(){return this._bank},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOutOfNumbers",{get:function(){return 1===this._spinnerNumbers.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFirstSpin",{get:function(){return null===this._previousNumber},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"IsLandedNumberSuperRare",{get:function(){return this._isLandedNumberSuperRare},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"IsLandedNumberRare",{get:function(){return this._isLandedNumberRare},enumerable:!1,configurable:!0}),t.prototype.createAllNumbers=function(){t._allNumbers=[];for(var e=1;e<=r.Config.NUMBERS_MAX;e++)t._allNumbers.push(new n.SpinnerNumber(e))},t.prototype.createSpinnerNumbers=function(){this._spinnerNumbers=[];for(var e=0;e<r.Config.NUMBERS_MAX;e++){var i=r.Config.SPINNER_NUMBERS_ORDER[e]-1;this._spinnerNumbers.push(t._allNumbers[i])}},t.prototype.resetSpinnerNumbers=function(){for(var t=0;t<this._spinnerNumbers.length;t++)this._spinnerNumbers[t].reset()},t.prototype.reset=function(){this.createSpinnerNumbers(),this.resetSpinnerNumbers(),this.setLandedNumber(null),this._previousNumber=null,this.setBankValue(0)},Object.defineProperty(t.prototype,"landedNumberHighest",{get:function(){return this.countLower(this._landedNumber.value)===this._spinnerNumbers.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"landedNumberLowest",{get:function(){return 0===this.countLower(this._landedNumber.value)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"probabilityOfLowerThanLanded",{get:function(){return this.countLower(this._landedNumber.value)/this._spinnerNumbers.length},enumerable:!1,configurable:!0}),t.prototype.getCountOfLower=function(){return this.countLower(this._landedNumber.value)},t.prototype.countLower=function(t){for(var e=0,i=0;i<this._spinnerNumbers.length;i++)this._spinnerNumbers[i].value<t&&++e;return e},t.prototype.getNumberAt=function(e){return t._allNumbers[e]},t.prototype.getSpinnerNumberAt=function(t){return this.spinnerNumbersIndexValid(t)?this._spinnerNumbers[t]:null},t.prototype.removeSpinnerNumberAt=function(t){this.spinnerNumbersIndexValid(t)&&this._spinnerNumbers.splice(t,1)},t.prototype.spinnerNumbersIndexValid=function(t){return!(t>=this._spinnerNumbers.length)},t.prototype.setLandedNumberToSpinnerIndex=function(t){this.spinnerNumbersIndexValid(t)&&this.setLandedNumber(this._spinnerNumbers[t])},t.prototype.increaseBank=function(t){this.setBankValue(this._bank+t)},t.prototype.setLandedNumber=function(t){this._previousNumber=this._landedNumber,this._landedNumber=t,this.setLandedNumberRarity(),this.onLandedNumberChanged.dispatch(t,this.numbers)},t.prototype.setLandedNumberRarity=function(){if(this._isLandedNumberSuperRare=this._isLandedNumberRare=!1,null!==this._landedNumber&&null!==this._previousNumber){var t=this.countLower(this._previousNumber.value)/this._spinnerNumbers.length,e=1-t;(t<.25&&this._landedNumber.value<this._previousNumber.value||e<.25&&this._landedNumber.value>this._previousNumber.value)&&(this._isLandedNumberRare=!0),this._spinnerNumbers.length<r.Config.SPINNER_NUMBERS_RARE_MIN||(1===this.countLower(this._previousNumber.value)&&this._landedNumber.value<this._previousNumber.value||this._spinnerNumbers.length-this.countLower(this._previousNumber.value)==1&&this._landedNumber.value>this._previousNumber.value)&&(this._isLandedNumberSuperRare=!0)}},t.prototype.setBankValue=function(t){this._bank=t,this.onBankChanged.dispatch(this._bank)},t.prototype.toString=function(){for(var t="Current spinner numbers - ",e=0;e<this._spinnerNumbers.length;e++)t+=e+": "+this._spinnerNumbers[e].value+(e<this._spinnerNumbers.length-1?", ":"");return t},t._allNumbers=null,t}();e.RoundData=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ChoiceButtons=void 0;var o=i(1),s=i(19),a=i(2),l=i(23),h=i(11),u=i(0),_=i(125),p=i(12),c=function(t){function e(i,n){var r=t.call(this,i,n.world)||this;return r.onChoiceButton=new Phaser.Signal,r._playScene=null,r._bank=null,r._lower=null,r._higher=null,r._pass=null,r._bankObj=null,r._passPoofAnim=null,r._toolTipBank=null,r._toolTipOdds=null,r._toolTipPass=null,r._lastPressed=null,r._textCycleTime=0,r._textsHigher=[null,null],r._textsLower=[null,null],r._timeSinceEnabled=0,r._ignoreTextChanges=!1,r._playScene=n,r._bankObj=new _.Bank(r.game,r),r._bank=r.createButton("Bank","button_bank","TXT_BUTTON_BANK"),r._higher=r.createButton("Higher","button_higher","TXT_BUTTON_HIGHER"),r._lower=r.createButton("Lower","button_lower","TXT_BUTTON_LOWER"),r._pass=r.createPassButton(),r._passPoofAnim=new l.SpriterGroup(i,a.Defs.SPRITER_ANIM_POOF,"Sprites","free button"),r.add(r._passPoofAnim),r._passPoofAnim.visible=!1,r._toolTipBank=new Phaser.BitmapText(i,0,0,"ToolTip",u.TextUtils.getText("TOOLTIP_BANK"),e.TOOLTIP_FONT_SIZE,"center"),r.add(r._toolTipBank),r._toolTipBank.anchor.set(.5,0),r._toolTipBank.visible=!1,r._toolTipOdds=new Phaser.BitmapText(i,0,0,"ToolTip",u.TextUtils.getText("TOOLTIP_ODDS"),e.TOOLTIP_FONT_SIZE,"center"),r.add(r._toolTipOdds),r._toolTipOdds.anchor.set(.5,0),r._toolTipOdds.visible=!1,r._toolTipPass=new Phaser.BitmapText(i,0,0,"ToolTip",u.TextUtils.getText("TOOLTIP_PASS"),e.TOOLTIP_FONT_SIZE,"center"),r.add(r._toolTipPass),r._toolTipPass.anchor.set(.5,0),r._toolTipPass.angle=e.PASS_BUTTON_ANGLE,r._toolTipPass.visible=!1,r.setPositions(),r.disableButtons(),r}return r(e,t),Object.defineProperty(e.prototype,"bank",{get:function(){return this._bankObj},enumerable:!1,configurable:!0}),e.prototype.createButton=function(t,e,i){var n=new p.ChoiceButton(this.game,t,e,i);return n.downAction=function(){},n.onClick.add(this.onButtonClick,this),this.add(n),n},e.prototype.createPassButton=function(){var t=new h.Button(this.game,"Pass","Sprites","button_freespin",!1,"button_freespin_hit","button_freespin_mo");return t.downAction=function(){},t.onClick.add(this.onButtonClick,this),t.angle=e.PASS_BUTTON_ANGLE,this.add(t),t},e.prototype.setPositions=function(){this._bankObj.position.set(-290,-30),this._bank.position.set(-290,0),this._lower.position.set(-85,0),this._higher.position.set(85,0),this._pass.position.set(290,-20),this._toolTipBank.position.set(this._bank.x,this._bank.y+50),this._toolTipOdds.position.set(0,this._bank.y+50),this._toolTipPass.position.set(this._pass.x+45*Math.cos(this._pass.rotation+Math.PI/2),this._pass.y+45*Math.sin(this._pass.rotation+Math.PI/2))},e.prototype.disableButtons=function(t){void 0===t&&(t=!1),this._bank.enableInput(!1),this._bank.setActive(this._lastPressed===this._bank&&!t),this._higher.enableInput(!1),this._higher.setActive(this._lastPressed===this._higher&&!t),this._lower.enableInput(!1),this._lower.setActive(this._lastPressed===this._lower&&!t),this._pass.button.inputEnabled=!1,this.setPassButtonActive(this._lastPressed===this._pass&&!t),this._bankObj.setActive(!1),this._lastPressed=null,this._bank.flash(!1),this._lower.flash(!1),this._higher.flash(!1),this._toolTipBank.visible=this._toolTipOdds.visible=this._toolTipPass.visible=!1},e.prototype.enableButtons=function(t,e){this._bank.enableInput(!0),this._bank.setActive(!0);var i=!e.landedNumberHighest;this._higher.enableInput(i),this._higher.setActive(i),i=!e.landedNumberLowest,this._lower.enableInput(i),this._lower.setActive(i),t?this._pass.button.inputEnabled=!1:(this._pass.button.inputEnabled=!0,this.setPassButtonActive(!0)),this._bankObj.setActive(!0),this._toolTipBank.visible=this._toolTipOdds.visible=this._playScene.showToolTip,this._toolTipPass.visible=this._playScene.showToolTipPass&&!t,this._timeSinceEnabled=0},e.prototype.activateButtons=function(){this._bank.setActive(!0),this._higher.setActive(!0),this._lower.setActive(!0),this.setPassButtonActive(!0),this._bankObj.setActive(!0),this._toolTipBank.visible=this._toolTipOdds.visible=this._playScene.showToolTip,this._toolTipPass.visible=this._playScene.showToolTipPass&&this._pass.visible},e.prototype.setPassButtonActive=function(t){var e=this._pass.button;t?e.setFrames("button_freespin_mo","button_freespin","button_freespin_hit","button_freespin"):e.setFrames("button_freespin_inactive","button_freespin_inactive","button_freespin_inactive","button_freespin_inactive")},e.prototype.onButtonClick=function(t){this._lastPressed=t,t===this._pass&&this.animatePassButtonRemove(),"Bank"===t.name?this._playScene.showToolTip=!1:"Pass"===t.name&&(this._playScene.showToolTipPass=!1),this.onChoiceButton.dispatch(t)},e.prototype.flashButtons=function(t){if(this._bank.button.inputEnabled){this._timeSinceEnabled+=this.game.time.elapsedMS;var e=this._timeSinceEnabled%(1e3*s.duration(a.Defs.FLASH_BUTTONS_CURVE)),i=s.evaluate(e/1e3,a.Defs.FLASH_BUTTONS_CURVE)>.15;this._bank.button.inputEnabled&&this._bank.flash(i),this._lower.button.inputEnabled&&this._lower.flash(i),this._higher.button.inputEnabled&&this._higher.flash(i),t||(i?this._pass.button.setFrames("button_freespin_mo","button_freespin_flash","button_freespin_hit","button_freespin_flash"):this._pass.button.setFrames("button_freespin_mo","button_freespin","button_freespin_hit","button_freespin"))}},e.prototype.setTexts=function(t){if(this._ignoreTextChanges=null===t.landedNumber,!this._ignoreTextChanges){var e=t.spinnerNumbersLength,i=t.getCountOfLower(),n=Math.round(i/e*100),r=u.TextUtils.getText("TXT_BUTTON_ODDS");this._textsHigher[0]=""+r+(e-i)+"/"+e,this._textsHigher[1]=""+r+(100-n)+"%",this._textsLower[0]=""+r+i+"/"+e,this._textsLower[1]=""+r+n+"%",this._textCycleTime=0}},e.prototype.resetTexts=function(){this._higher.setText(),this._lower.setText()},e.prototype.updateButtonsText=function(){if(!this._ignoreTextChanges){this._textCycleTime+=this.game.time.elapsedMS;var t=Math.floor(this._textCycleTime/o.Config.ODDS_CYCLE_DURATION)%2;this._higher.setText(this._textsHigher[t]),this._lower.setText(this._textsLower[t])}},e.prototype.animatePassButtonRemove=function(){this._pass.visible=!1,this._passPoofAnim.position.copyFrom(this._pass.position),this._passPoofAnim.angle=this._pass.angle,this._passPoofAnim.visible=!0,this._passPoofAnim.onFinish.addOnce((function(t){this._passPoofAnim.visible=!1}),this),this._passPoofAnim.playAnimationByName("poof")},e.prototype.updateAnimation=function(t){this._bankObj.updateBank(t),this.animatePassRemoving(t)},e.prototype.animatePassRemoving=function(t){this._passPoofAnim.visible&&this._passPoofAnim.updateAnimation()},e.PASS_BUTTON_ANGLE=-35,e.EMPTY_STRING="",e.TOOLTIP_FONT_SIZE=16,e}(Phaser.Group);e.ChoiceButtons=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Loader=void 0;var n=i(60),r=i(15),o=i(9),s=function(){function t(){}return t.prototype.load=function(t){this._spriter=new n.Spriter,this._fileType=t.getType();var e=t.getNodes("folder");this.loadFolders(this._spriter,e),e.processed();var i=t.getNodes("tag_list");this.loadTags(this._spriter,i),i.processed();var r=t.getNodes("entity");return this.loadEntities(this._spriter,r),r.processed(),this._spriter},t.prototype.loadFolders=function(t,e){for(var i=0;i<e.length();i++){var n=e.getFolder(i),r=e.getChildNodes(i,"file");this.loadFiles(n,r),r.processed(),t.addFolder(n)}},t.prototype.loadFiles=function(t,e){for(var i=0;i<e.length();i++){var n=e.getFile(i);null!==n&&t.addFile(n)}},t.prototype.loadTags=function(t,e){if(0!==e.length()){var i;i=this._fileType!==r.eFileType.JSON?e.getChildNodes(0,"i"):e;for(var n=0;n<i.length();n++){var o=i.getTag(n);t.addTag(o)}this._fileType!==r.eFileType.JSON&&i.processed()}},t.prototype.loadEntities=function(t,e){for(var i=0;i<e.length();i++){var n=e.getEntity(i),r=e.getChildNodes(i,"obj_info");this.loadObjInfo(n,r),r.processed();var o=e.getChildNodes(i,"character_map");this.loadCharMaps(n,o),o.processed();var s=e.getChildNodes(i,"var_defs");this.loadVariables(n,s),s.processed();var a=e.getChildNodes(i,"animation");this.loadAnimations(n,a),a.processed(),t.addEntity(n)}},t.prototype.loadObjInfo=function(t,e){for(var i=0;i<e.length();i++){var n=e.getObjectInfo(i);t.addObjectInfo(n)}},t.prototype.loadCharMaps=function(t,e){for(var i=0;i<e.length();i++){var n=e.getCharMap(i),r=e.getChildNodes(i,"map");this.loadCharMapEntries(n,r),r.processed(),t.addCharMap(n)}},t.prototype.loadCharMapEntries=function(t,e){for(var i=0;i<e.length();i++)e.getCharMapEntry(i,t,this._spriter)},t.prototype.loadVariables=function(t,e){if(0!==e.length()){var i;i=this._fileType!==r.eFileType.JSON?e.getChildNodes(0,"i"):e;for(var n=0;n<i.length();n++){var o=i.getVariable(n);t.addVariable(o)}this._fileType!==r.eFileType.JSON&&i.processed()}},t.prototype.loadAnimations=function(t,e){for(var i=0;i<e.length();i++){var n=e.getAnimation(i),o=e.getChildNodes(i,"mainline");this.loadMainline(n,o),o.processed();var s=e.getChildNodes(i,"timeline");this.loadTimelines(n,s),s.processed();var a=e.getChildNodes(i,"soundline");this.loadSoundlines(n,a),a.processed();var l=e.getChildNodes(i,"eventline");this.loadEventlines(n,l),l.processed();var h=e.getChildNodes(i,"meta");if(h.length()>0){var u=h.getChildNodes(0,this._fileType!==r.eFileType.JSON?"varline":"valline");this.loadVarlines(t,n,u),u.processed();var _=h.getChildNodes(0,"tagline");this.loadTaglines(n,_),_.processed()}h.processed(),t.addAnimation(n)}},t.prototype.loadMainline=function(t,e){var i=e.getMainline(0);i.type=o.eTimelineType.MAIN_LINE;var n=e.getChildNodes(0,"key");this.loadMainlineKeys(i,n),n.processed(),t.mainline=i},t.prototype.loadMainlineKeys=function(t,e){for(var i=0;i<e.length();i++){for(var n=e.getMainlineKey(i),r=e.getChildNodes(i,"bone_ref"),o=0;o<r.length();o++)n.addBoneRef(r.getRef(o));r.processed();for(var s=e.getChildNodes(i,"object_ref"),a=0;a<s.length();a++)n.addObjectRef(s.getRef(a));s.processed(),t.add(n)}},t.prototype.loadTimelines=function(t,e){for(var i=0;i<e.length();i++){var n=e.getTimeline(i),r=e.getChildNodes(i,"key");this.loadTimelineKeys(n,r),r.processed(),t.addTimeline(n)}},t.prototype.loadTimelineKeys=function(t,e){for(var i=0;i<e.length();i++){var n=e.getTimelineKey(i,this._spriter);t.add(n)}},t.prototype.loadSoundlines=function(t,e){for(var i=0;i<e.length();i++){var n=e.getSoundline(i);n.type=o.eTimelineType.SOUND_LINE;var r=e.getChildNodes(i,"key");this.loadKeys(n,r),r.processed(),t.addLine(n)}},t.prototype.loadKeys=function(t,e){for(var i=0;i<e.length();i++){var n=e.getKey(i);t.add(n)}},t.prototype.loadEventlines=function(t,e){for(var i=0;i<e.length();i++){var n=e.getEventline(i);n.type=o.eTimelineType.EVENT_LINE;var r=e.getChildNodes(i,"key");this.loadKeys(n,r),r.processed(),t.addLine(n)}},t.prototype.loadTaglines=function(t,e){for(var i=0;i<e.length();i++){var n=e.getTagline(i);n.type=o.eTimelineType.TAG_LINE;var r=e.getChildNodes(i,"key");this.loadTagKeys(n,r),r.processed(),t.addLine(n)}},t.prototype.loadTagKeys=function(t,e){for(var i=0;i<e.length();i++){var n=e.getTagKey(i),r=e.getChildNodes(i,"tag"),o=r.getTagChanges(this._spriter);r.processed(),n.tagsOn=o,t.add(n)}},t.prototype.loadVarlines=function(t,e,i){for(var n=0;n<i.length();n++){var r=i.getVarline(n),o=t.getVariableById(r.varDefId).type,s=i.getChildNodes(n,"key");this.loadVariableKeys(r,s,o),s.processed(),e.addLine(r)}},t.prototype.loadVariableKeys=function(t,e,i){for(var n=0;n<e.length();n++){var r=e.getVariableKey(n,i);t.add(r)}},t}();e.Loader=s},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.SpriterJSON=void 0;var o=i(16),s=i(9),a=i(61),l=i(25),h=i(36),u=i(37),_=i(4),p=i(10),c=i(38),f=i(39),d=i(40),g=i(63),y=i(64),m=i(41),v=i(42),T=i(43),b=i(35),S=i(44),O=i(65),E=i(116),P=i(15),A=function(t){function e(e,i){var n=t.call(this,i)||this;n._json=e;var r=void 0!==e.min;return n.setMinimized(r),n}return r(e,t),e.prototype.getType=function(){return P.eFileType.JSON},e.prototype.parseInt=function(t,e,i){void 0===i&&(i=0);var n=t[this.translateAttributeName(e)];return void 0===n?i:"number"==typeof n?n:parseInt(n)},e.prototype.parseFloat=function(t,e,i){void 0===i&&(i=0);var n=t[this.translateAttributeName(e)];return void 0===n?i:"number"==typeof n?n:parseFloat(n)},e.prototype.parseBoolean=function(t,e,i){void 0===i&&(i=!1);var n=t[this.translateAttributeName(e)];return void 0===n?i:"boolean"==typeof n?n:"true"===n},e.prototype.parseString=function(t,e,i){void 0===i&&(i="");var n=t[this.translateAttributeName(e)];return void 0===n?i:n},e.prototype.getNodes=function(t){this.setMinDefsToElementName(t);var e=this.translateElementName(t);return new E.NodeListJSON(this,void 0!==this._json[e]?this._json[e]:[])},e.prototype.getNodesForElement=function(t,e){this.setMinDefsToElementName(e);var i=this.translateElementName(e);return new E.NodeListJSON(this,void 0!==t[i]?t[i]:[])},e.prototype.getFolder=function(t){return new u.Folder(this.parseInt(t,"id"),this.parseString(t,"name"))},e.prototype.getFile=function(t){return void 0!==t.type&&"sound"===t.type?null:new h.File(this.parseInt(t,"id"),this.getFileName(this.parseString(t,"name")),this.parseFloat(t,"pivot_x"),1-this.parseFloat(t,"pivot_y"))},e.prototype.getTag=function(t){return new _.Item(this.parseInt(t,"id"),this.parseString(t,"name"))},e.prototype.getEntity=function(t){return new l.Entity(this.parseInt(t,"id"),this.parseString(t,"name"))},e.prototype.getObjectInfo=function(t,e){return new m.ObjectInfo(e,this.parseString(t,"name"),b.Types.getObjectTypeForName(this.parseString(t,"type")),this.parseFloat(t,"w"),this.parseFloat(t,"h"),this.parseFloat(t,"pivot_x"),this.parseFloat(t,"pivot_y"))},e.prototype.getCharMap=function(t){return new a.CharMap(this.parseInt(t,"id"),this.parseString(t,"name"))},e.prototype.getCharMapEntry=function(t,e,i){var n=i.getFolderById(this.parseInt(t,"folder")).getFileById(this.parseInt(t,"file")).name,r=null;void 0!==t.target_folder&&void 0!==t.target_file&&(r=i.getFolderById(this.parseInt(t,"target_folder")).getFileById(this.parseInt(t,"target_file"))),e.put(n,r)},e.prototype.getVariable=function(t){var e=b.Types.getVariableTypeForName(this.parseString(t,"type"));return new S.Variable(this.parseInt(t,"id"),this.parseString(t,"name"),e,2===e?this.parseString(t,"default"):this.parseFloat(t,"default",0))},e.prototype.getAnimation=function(t){return new o.Animation(this.parseInt(t,"id"),this.parseString(t,"name"),this.parseFloat(t,"length"),!0===this.parseBoolean(t,"looping",!0)?o.eAnimationLooping.LOOPING:o.eAnimationLooping.NO_LOOPING)},e.prototype.getMainlineKey=function(t){return new f.KeyMainline(this.parseInt(t,"id"),this.parseFloat(t,"time"))},e.prototype.getRef=function(t){return new v.Ref(this.parseInt(t,"id"),this.parseInt(t,"parent",-1),this.parseInt(t,"timeline"),this.parseInt(t,"key"),this.parseInt(t,"z_index"))},e.prototype.getTimeline=function(t){return new T.Timeline(this.parseInt(t,"id"),this.parseString(t,"name"),b.Types.getObjectTypeForName(this.parseString(t,"object_type","sprite")),this.parseInt(t,"obj",-1))},e.prototype.getBaseline=function(t){return new s.Baseline(this.parseInt(t,"id"),this.parseString(t,"name",null))},e.prototype.getVarline=function(t){return new O.Varline(this.parseInt(t,"id"),this.parseInt(t,"def"))},e.prototype.getKey=function(t){return new p.Key(this.parseInt(t,"id"),this.parseInt(t,"time"))},e.prototype.getTagKey=function(t){return new g.KeyTag(this.parseInt(t,"id"),this.parseInt(t,"time"))},e.prototype.getVariableKey=function(t,e){return new y.KeyVariable(this.parseInt(t,"id"),this.parseInt(t,"time"),2===e?this.parseString(t,"val"):this.parseFloat(t,"val"))},e.prototype.getTimelineKey=function(t,e,i){var n=this.parseInt(t,"time"),r=this.parseInt(t,"spin",1),o=this.parseString(t,"curve_type","linear"),s=this.parseFloat(t,"c1",0),a=this.parseFloat(t,"c2",0),l=this.parseFloat(t,"c3",0),h=this.parseFloat(t,"c4",0),u=this.translateChildElementName("bone"),_=this.translateChildElementName("object"),p=null,f=null,g=!1;void 0!==t[u]?(f=t[u],p=new c.KeyBone(e,n,r),this.setMinDefsToElementName("bone")):void 0!==t[_]&&(f=t[_],p=new d.KeyObject(e,n,r),this.setMinDefsToElementName("object"),g=!0),"linear"!==o&&p.setCurve(b.Types.getCurveTypeForName(o),s,a,l,h);var y=p.info;if(y.x=this.parseFloat(f,"x"),y.y=-this.parseFloat(f,"y"),y.scaleX=this.parseFloat(f,"scale_x",1),y.scaleY=this.parseFloat(f,"scale_y",1),y.angle=360-this.parseFloat(f,"angle"),y.alpha=this.parseFloat(f,"a",1),g){var m=this.parseInt(f,"folder"),v=this.parseInt(f,"file");p.setFolderAndFile(m,v);var T=i.getFolderById(m).getFileById(v);y.pivotX=this.parseFloat(f,"pivot_x",T.pivotX),y.pivotY=1-this.parseFloat(f,"pivot_y",1-T.pivotY)}return this.popMinDefsStack(),p},e.prototype.getTagChange=function(t){return this.parseInt(t,"t")},e}(P.SpriterFile);e.SpriterJSON=A},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeListJSON=void 0;var n=function(){function t(t,e){this._file=t,this._nodeList=e,Array.isArray(e)||(e.length=1)}return t.prototype.length=function(){return this._nodeList.length},t.prototype.processed=function(){this._file.processed()},t.prototype.getNode=function(t){return Array.isArray(this._nodeList)?this._nodeList[t]:this._nodeList},t.prototype.getChildNodes=function(t,e){return this._file.getNodesForElement(this.getNode(t),e)},t.prototype.getFolder=function(t){return this._file.getFolder(this.getNode(t))},t.prototype.getFile=function(t){return this._file.getFile(this.getNode(t))},t.prototype.getTag=function(t){return this._file.getTag(this.getNode(t))},t.prototype.getEntity=function(t){return this._file.getEntity(this.getNode(t))},t.prototype.getObjectInfo=function(t){return this._file.getObjectInfo(this.getNode(t),t)},t.prototype.getCharMap=function(t){return this._file.getCharMap(this.getNode(t))},t.prototype.getCharMapEntry=function(t,e,i){this._file.getCharMapEntry(this.getNode(t),e,i)},t.prototype.getVariable=function(t){return this._file.getVariable(this.getNode(t))},t.prototype.getAnimation=function(t){return this._file.getAnimation(this.getNode(t))},t.prototype.getMainline=function(t){return this._file.getBaseline(this.getNode(t))},t.prototype.getMainlineKey=function(t){return this._file.getMainlineKey(this.getNode(t))},t.prototype.getRef=function(t){return this._file.getRef(this.getNode(t))},t.prototype.getTimeline=function(t){return this._file.getTimeline(this.getNode(t))},t.prototype.getSoundline=function(t){return this._file.getBaseline(this.getNode(t))},t.prototype.getEventline=function(t){return this._file.getBaseline(this.getNode(t))},t.prototype.getTagline=function(t){return this._file.getBaseline(this.getNode(t))},t.prototype.getVarline=function(t){return this._file.getVarline(this.getNode(t))},t.prototype.getKey=function(t){return this._file.getKey(this.getNode(t))},t.prototype.getTagKey=function(t){return this._file.getTagKey(this.getNode(t))},t.prototype.getVariableKey=function(t,e){return this._file.getVariableKey(this.getNode(t),e)},t.prototype.getTimelineKey=function(t,e){return this._file.getTimelineKey(this.getNode(t),t,e)},t.prototype.getTagChanges=function(t){for(var e=0,i=0;i<this.length();i++){e|=1<<this._file.getTagChange(this.getNode(i))}return e},t}();e.NodeListJSON=n},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.SpriterXml=void 0;var o=i(16),s=i(9),a=i(61),l=i(25),h=i(36),u=i(37),_=i(4),p=i(10),c=i(38),f=i(39),d=i(40),g=i(63),y=i(64),m=i(41),v=i(42),T=i(43),b=i(35),S=i(44),O=i(65),E=i(118),P=i(15),A=function(t){function e(e,i){var n=t.call(this,i)||this;n._xml=e;var r=e.documentElement.hasAttribute("min");return n.setMinimized(r),n}return r(e,t),e.prototype.getType=function(){return P.eFileType.XML},e.prototype.parseInt=function(t,e,i){void 0===i&&(i=0);var n=t.getAttribute(this.translateAttributeName(e));return null!==n?parseInt(n):i},e.prototype.parseFloat=function(t,e,i){void 0===i&&(i=0);var n=t.getAttribute(this.translateAttributeName(e));return null!==n?parseFloat(n):i},e.prototype.parseString=function(t,e,i){void 0===i&&(i="");var n=t.getAttribute(this.translateAttributeName(e));return null!==n?n:i},e.prototype.getNodes=function(t){this.setMinDefsToElementName(t);var e=this.translateElementName(t);return new E.NodeListXml(this,this._xml.documentElement.getElementsByTagName(e))},e.prototype.getNodesForElement=function(t,e){this.setMinDefsToElementName(e);var i=this.translateElementName(e);return new E.NodeListXml(this,t.getElementsByTagName(i))},e.prototype.getFolder=function(t){return new u.Folder(this.parseInt(t,"id"),this.parseString(t,"name"))},e.prototype.getFile=function(t){return t.hasAttribute("type")&&"sound"===t.getAttribute("type")?null:new h.File(this.parseInt(t,"id"),this.getFileName(this.parseString(t,"name")),this.parseFloat(t,"pivot_x"),1-this.parseFloat(t,"pivot_y"))},e.prototype.getTag=function(t){return new _.Item(this.parseInt(t,"id"),this.parseString(t,"name"))},e.prototype.getEntity=function(t){return new l.Entity(this.parseInt(t,"id"),this.parseString(t,"name"))},e.prototype.getObjectInfo=function(t,e){return new m.ObjectInfo(e,this.parseString(t,"name"),b.Types.getObjectTypeForName(this.parseString(t,"type")),this.parseFloat(t,"w"),this.parseFloat(t,"h"),this.parseFloat(t,"pivot_x"),this.parseFloat(t,"pivot_y"))},e.prototype.getCharMap=function(t){return new a.CharMap(this.parseInt(t,"id"),this.parseString(t,"name"))},e.prototype.getCharMapEntry=function(t,e,i){var n=i.getFolderById(this.parseInt(t,"folder")).getFileById(this.parseInt(t,"file")).name,r=null;t.hasAttribute("target_folder")&&t.hasAttribute("target_file")&&(r=i.getFolderById(this.parseInt(t,"target_folder")).getFileById(this.parseInt(t,"target_file"))),e.put(n,r)},e.prototype.getVariable=function(t){var e=b.Types.getVariableTypeForName(this.parseString(t,"type"));return new S.Variable(this.parseInt(t,"id"),this.parseString(t,"name"),e,2===e?this.parseString(t,"default"):this.parseFloat(t,"default",0))},e.prototype.getAnimation=function(t){return new o.Animation(this.parseInt(t,"id"),this.parseString(t,"name"),this.parseFloat(t,"length"),"true"===this.parseString(t,"looping","true")?o.eAnimationLooping.LOOPING:o.eAnimationLooping.NO_LOOPING)},e.prototype.getMainlineKey=function(t){return new f.KeyMainline(this.parseInt(t,"id"),this.parseFloat(t,"time"))},e.prototype.getRef=function(t){return new v.Ref(this.parseInt(t,"id"),this.parseInt(t,"parent",-1),this.parseInt(t,"timeline"),this.parseInt(t,"key"),this.parseInt(t,"z_index"))},e.prototype.getTimeline=function(t){return new T.Timeline(this.parseInt(t,"id"),this.parseString(t,"name"),b.Types.getObjectTypeForName(this.parseString(t,"object_type","sprite")),this.parseInt(t,"obj",-1))},e.prototype.getBaseline=function(t){return new s.Baseline(this.parseInt(t,"id"),this.parseString(t,"name",null))},e.prototype.getVarline=function(t){return new O.Varline(this.parseInt(t,"id"),this.parseInt(t,"def"))},e.prototype.getKey=function(t){return new p.Key(this.parseInt(t,"id"),this.parseInt(t,"time"))},e.prototype.getTagKey=function(t){return new g.KeyTag(this.parseInt(t,"id"),this.parseInt(t,"time"))},e.prototype.getVariableKey=function(t,e){return new y.KeyVariable(this.parseInt(t,"id"),this.parseInt(t,"time"),2===e?this.parseString(t,"val"):this.parseFloat(t,"val"))},e.prototype.getTimelineKey=function(t,e,i){var n=this.parseInt(t,"time"),r=this.parseInt(t,"spin",1),o=this.parseString(t,"curve_type","linear"),s=this.parseFloat(t,"c1",0),a=this.parseFloat(t,"c2",0),l=this.parseFloat(t,"c3",0),h=this.parseFloat(t,"c4",0),u=this.translateChildElementName("bone"),_=this.translateChildElementName("object"),p=null,f=t.firstElementChild,g=!1;f.tagName===u?(p=new c.KeyBone(e,n,r),this.setMinDefsToElementName("bone")):f.tagName===_&&(this.setMinDefsToElementName("object"),p=new d.KeyObject(e,n,r),g=!0),"linear"!==o&&p.setCurve(b.Types.getCurveTypeForName(o),s,a,l,h);var y=p.info;if(y.x=this.parseFloat(f,"x"),y.y=-this.parseFloat(f,"y"),y.scaleX=this.parseFloat(f,"scale_x",1),y.scaleY=this.parseFloat(f,"scale_y",1),y.angle=360-this.parseFloat(f,"angle"),y.alpha=this.parseFloat(f,"a",1),g){var m=this.parseInt(f,"folder"),v=this.parseInt(f,"file");p.setFolderAndFile(m,v);var T=i.getFolderById(m).getFileById(v);y.pivotX=this.parseFloat(f,"pivot_x",T.pivotX),y.pivotY=1-this.parseFloat(f,"pivot_y",1-T.pivotY)}return this.popMinDefsStack(),p},e.prototype.getTagChange=function(t){return this.parseInt(t,"t")},e}(P.SpriterFile);e.SpriterXml=A},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeListXml=void 0;var n=function(){function t(t,e){this._file=t,this._nodeList=e}return t.prototype.length=function(){return this._nodeList.length},t.prototype.processed=function(){this._file.processed()},t.prototype.getChildNodes=function(t,e){return this._file.getNodesForElement(this._nodeList.item(t),e)},t.prototype.getFolder=function(t){return this._file.getFolder(this._nodeList.item(t))},t.prototype.getFile=function(t){return this._file.getFile(this._nodeList.item(t))},t.prototype.getTag=function(t){return this._file.getTag(this._nodeList.item(t))},t.prototype.getEntity=function(t){return this._file.getEntity(this._nodeList.item(t))},t.prototype.getObjectInfo=function(t){return this._file.getObjectInfo(this._nodeList.item(t),t)},t.prototype.getCharMap=function(t){return this._file.getCharMap(this._nodeList.item(t))},t.prototype.getCharMapEntry=function(t,e,i){this._file.getCharMapEntry(this._nodeList.item(t),e,i)},t.prototype.getVariable=function(t){return this._file.getVariable(this._nodeList.item(t))},t.prototype.getAnimation=function(t){return this._file.getAnimation(this._nodeList.item(t))},t.prototype.getMainline=function(t){return this._file.getBaseline(this._nodeList.item(t))},t.prototype.getMainlineKey=function(t){return this._file.getMainlineKey(this._nodeList.item(t))},t.prototype.getRef=function(t){return this._file.getRef(this._nodeList.item(t))},t.prototype.getTimeline=function(t){return this._file.getTimeline(this._nodeList.item(t))},t.prototype.getSoundline=function(t){return this._file.getBaseline(this._nodeList.item(t))},t.prototype.getEventline=function(t){return this._file.getBaseline(this._nodeList.item(t))},t.prototype.getTagline=function(t){return this._file.getBaseline(this._nodeList.item(t))},t.prototype.getVarline=function(t){return this._file.getVarline(this._nodeList.item(t))},t.prototype.getKey=function(t){return this._file.getKey(this._nodeList.item(t))},t.prototype.getTagKey=function(t){return this._file.getTagKey(this._nodeList.item(t))},t.prototype.getVariableKey=function(t,e){return this._file.getVariableKey(this._nodeList.item(t),e)},t.prototype.getTimelineKey=function(t,e){return this._file.getTimelineKey(this._nodeList.item(t),t,e)},t.prototype.getTagChanges=function(t){for(var e=0,i=0;i<this.length();i++){e|=1<<this._file.getTagChange(this._nodeList.item(i))}return e},t}();e.NodeListXml=n},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.SpriterBin=void 0;var o=i(16),s=i(25),a=i(36),l=i(37),h=i(38),u=i(39),_=i(40),p=i(41),c=i(42),f=i(43),d=i(120),g=i(15),y=function(t){function e(e){var i=t.call(this,null)||this;return i._elements={spriter_data:1,folder:2,file:3,entity:4,obj_info:5,frames:6,i:7,animation:8,mainline:9,key:10,bone_ref:11,object_ref:12,timeline:13,bone:14,object:15},i._smallOffset=!1,i._bin=new DataView(e),i._smallOffset=1===i._bin.getUint8(0),i}return r(e,t),e.prototype.getType=function(){return g.eFileType.BIN},e.prototype.readUint8=function(){return this._bin.getUint8(this._tmpPosition++)},e.prototype.readInt8=function(){return this._bin.getInt8(this._tmpPosition++)},e.prototype.readUint16=function(){var t=this._bin.getUint16(this._tmpPosition,!0);return this._tmpPosition+=2,t},e.prototype.readInt16=function(){var t=this._bin.getInt16(this._tmpPosition,!0);return this._tmpPosition+=2,t},e.prototype.readUint32=function(){var t=this._bin.getUint32(this._tmpPosition,!0);return this._tmpPosition+=4,t},e.prototype.readInt32=function(){var t=this._bin.getInt32(this._tmpPosition,!0);return this._tmpPosition+=4,t},e.prototype.readFixed16_16=function(){var t=this._bin.getInt32(this._tmpPosition,!0);return this._tmpPosition+=4,t/65536},e.prototype.readFixed1_7=function(){return(255&this._bin.getInt8(this._tmpPosition++))/128},e.prototype.readString=function(){for(var t=[],e=this._bin.getUint8(this._tmpPosition++)-1;e>=0;e--)t.push(this._bin.getUint8(this._tmpPosition++));return String.fromCharCode.apply(null,t)},e.prototype.getNodes=function(t){return new d.NodeListBin(this,this.getSubNodesOfElementType(1,this._elements[t]))},e.prototype.getNodesForElement=function(t,e){return new d.NodeListBin(this,this.getSubNodesOfElementType(t,this._elements[e]))},e.prototype.getSubNodesOfElementType=function(t,e){var i=[],n=this._bin.getUint8(t+1);t+=2;for(var r=0;r<n;r++){var o=this._smallOffset?this._bin.getUint16(t+2*r,!0):this._bin.getUint32(t+4*r,!0);this._bin.getUint8(t+o)===e&&i.push(t+o)}return i},e.prototype.getAttribsPosition=function(t){return t+2+this._bin.getUint8(t+1)*(this._smallOffset?2:4)},e.prototype.getFolder=function(t){this._tmpPosition=this.getAttribsPosition(t);for(var i=0,n="",r=this._bin.getUint8(this._tmpPosition++)-1;r>=0;r--)switch(this._bin.getUint8(this._tmpPosition++)){case e.ATTR_FOLDER_ID:i=this.readUint8();break;case e.ATTR_FOLDER_NAME:n=this.readString()}return new l.Folder(i,n)},e.prototype.getFile=function(t){this._tmpPosition=this.getAttribsPosition(t);for(var i=0,n="",r=0,o=0,s=this._bin.getUint8(this._tmpPosition++)-1;s>=0;s--)switch(this._bin.getUint8(this._tmpPosition++)){case e.ATTR_FILE_ID:i=this.readUint8();break;case e.ATTR_FILE_NAME:n=this.readString();break;case e.ATTR_FILE_PIVOT_X:r=this.readFixed16_16();break;case e.ATTR_FILE_PIVOT_Y:o=this.readFixed16_16();break;case e.ATTR_FILE_WIDTH:case e.ATTR_FILE_HEIGHT:this._tmpPosition+=2}return new a.File(i,this.getFileName(n),r,1-o)},e.prototype.getTag=function(t){return null},e.prototype.getEntity=function(t){this._tmpPosition=this.getAttribsPosition(t);for(var i=0,n="",r=this._bin.getUint8(this._tmpPosition++)-1;r>=0;r--)switch(this._bin.getUint8(this._tmpPosition++)){case e.ATTR_ENTITY_ID:i=this.readUint8();break;case e.ATTR_ENTITY_NAME:n=this.readString()}return new s.Entity(i,n)},e.prototype.getObjectInfo=function(t,i){this._tmpPosition=this.getAttribsPosition(t);for(var n="",r=0,o=0,s=0,a=this._bin.getUint8(this._tmpPosition++)-1;a>=0;a--)switch(this._bin.getUint8(this._tmpPosition++)){case e.ATTR_OBJ_INFO_NAME:n=this.readString();break;case e.ATTR_OBJ_INFO_TYPE:1===this.readUint8()&&(r=1);break;case e.ATTR_OBJ_INFO_WIDTH:o=this.readFixed16_16();break;case e.ATTR_OBJ_INFO_HEIGHT:s=this.readFixed16_16()}return new p.ObjectInfo(i,n,r,o,s,0,0)},e.prototype.getCharMap=function(t){return null},e.prototype.getCharMapEntry=function(t,e,i){return null},e.prototype.getVariable=function(t){return null},e.prototype.getAnimation=function(t){this._tmpPosition=this.getAttribsPosition(t);for(var i=0,n="",r=0,s=o.eAnimationLooping.LOOPING,a=this._bin.getUint8(this._tmpPosition++)-1;a>=0;a--)switch(this._bin.getUint8(this._tmpPosition++)){case e.ATTR_ANIMATION_ID:i=this.readUint8();break;case e.ATTR_ANIMATION_NAME:n=this.readString();break;case e.ATTR_ANIMATION_LENGTH:r=this.readUint32();break;case e.ATTR_ANIMATION_INTERVAL:this._tmpPosition+=2;break;case e.ATTR_ANIMATION_LOOPING:s=1===this.readUint8()?o.eAnimationLooping.LOOPING:o.eAnimationLooping.NO_LOOPING}return new o.Animation(i,n,r,s)},e.prototype.getMainlineKey=function(t){this._tmpPosition=this.getAttribsPosition(t);for(var i=0,n=0,r=this._bin.getUint8(this._tmpPosition++)-1;r>=0;r--)switch(this._bin.getUint8(this._tmpPosition++)){case e.ATTR_MAINLINE_KEY_ID:i=this.readUint8();break;case e.ATTR_MAINLINE_KEY_TIME:n=this.readUint32()}return new u.KeyMainline(i,n)},e.prototype.getRef=function(t){this._tmpPosition=this.getAttribsPosition(t);for(var i=0,n=-1,r=0,o=0,s=0,a=this._bin.getUint8(this._tmpPosition++)-1;a>=0;a--)switch(this._bin.getUint8(this._tmpPosition++)){case e.ATTR_BONE_REF_ID:case e.ATTR_OBJ_REF_ID:i=this.readUint8();break;case e.ATTR_BONE_REF_PARENT:case e.ATTR_OBJ_REF_PARENT:n=this.readUint8();break;case e.ATTR_BONE_REF_TIMELINE:case e.ATTR_OBJ_REF_TIMELINE:r=this.readUint8();break;case e.ATTR_BONE_REF_KEY:case e.ATTR_OBJ_REF_KEY:o=this.readUint8();break;case e.ATTR_OBJ_REF_Z:s=this.readUint8();break;case e.ATTR_OBJ_REF_NAME:this.readString();break;case e.ATTR_OBJ_REF_FOLDER:case e.ATTR_OBJ_REF_FILE:++this._tmpPosition;break;case e.ATTR_OBJ_REF_ABS_X:case e.ATTR_OBJ_REF_ABS_Y:case e.ATTR_OBJ_REF_ABS_PIVOT_X:case e.ATTR_OBJ_REF_ABS_PIVOT_Y:case e.ATTR_OBJ_REF_ABS_SCALE_X:case e.ATTR_OBJ_REF_ABS_SCALE_Y:case e.ATTR_OBJ_REF_ANGLE:this._tmpPosition+=4;break;case e.ATTR_OBJ_REF_ALPHA:++this._tmpPosition}return new c.Ref(i,n,r,o,s)},e.prototype.getTimeline=function(t){this._tmpPosition=this.getAttribsPosition(t);for(var i=0,n="",r=0,o=0,s=this._bin.getUint8(this._tmpPosition++)-1;s>=0;s--)switch(this._bin.getUint8(this._tmpPosition++)){case e.ATTR_TIMELINE_ID:i=this.readUint8();break;case e.ATTR_TIMELINE_NAME:n=this.readString();break;case e.ATTR_TIMELINE_OBJ:r=this.readUint8();break;case e.ATTR_TIMELINE_OBJ_TYPE:1===this.readUint8()&&(o=1)}return new f.Timeline(i,n,o,r)},e.prototype.getBaseline=function(t){return null},e.prototype.getVarline=function(t){return null},e.prototype.getKey=function(t){return null},e.prototype.getTagKey=function(t){return null},e.prototype.getVariableKey=function(t,e){return null},e.prototype.getTimelineKey=function(t,i,n){this._tmpPosition=this.getAttribsPosition(t);for(var r=0,o=1,s=0,a=0,l=0,u=this._bin.getUint8(this._tmpPosition++)-1;u>=0;u--)switch(this._bin.getUint8(this._tmpPosition++)){case e.ATTR_TIMELINE_KEY_ID:++this._tmpPosition;break;case e.ATTR_TIMELINE_KEY_TIME:r=this.readUint32();break;case e.ATTR_TIMELINE_KEY_SPIN:o=this.readInt8();break;case e.ATTR_TIMELINE_KEY_CURVE:s=this.readUint8();break;case e.ATTR_TIMELINE_KEY_C1:a=this.readFixed1_7();break;case e.ATTR_TIMELINE_KEY_C2:l=this.readFixed1_7()}var p=(t+=2)+(this._smallOffset?this._bin.getUint16(t,!0):this._bin.getUint32(t,!0)),c=this._bin.getUint8(p),f=null,d=!1;14===c?f=new h.KeyBone(i,r,o):15===c&&(f=new _.KeyObject(i,r,o),d=!0),0!==s&&f.setCurve(s,a,l,0,0),this._tmpPosition=this.getAttribsPosition(p);var g=f.info;g.x=0,g.y=0,g.scaleX=1,g.scaleY=1,g.angle=0,g.alpha=1;var y=0,m=!1,v=0,T=!1,b=0,S=0;for(u=this._bin.getUint8(this._tmpPosition++)-1;u>=0;u--)switch(this._bin.getUint8(this._tmpPosition++)){case e.ATTR_BONE_X:case e.ATTR_OBJ_X:g.x=this.readFixed16_16();break;case e.ATTR_BONE_Y:case e.ATTR_OBJ_Y:g.y=-this.readFixed16_16();break;case e.ATTR_BONE_ANGLE:case e.ATTR_OBJ_ANGLE:g.angle=360-this.readFixed16_16();break;case e.ATTR_BONE_SCALE_X:case e.ATTR_OBJ_SCALE_X:g.scaleX=this.readFixed16_16();break;case e.ATTR_BONE_SCALE_Y:case e.ATTR_OBJ_SCALE_Y:g.scaleY=this.readFixed16_16();break;case e.ATTR_OBJ_FOLDER:b=this.readUint8();break;case e.ATTR_OBJ_FILE:S=this.readUint8();break;case e.ATTR_OBJ_PIVOT_X:y=this.readFixed16_16(),m=!0;break;case e.ATTR_OBJ_PIVOT_Y:v=this.readFixed16_16(),T=!0;break;case e.ATTR_OBJ_ALPHA:g.alpha=this.readFixed1_7()}if(d){f.setFolderAndFile(b,S);var O=n.getFolderById(b).getFileById(S);g.pivotX=m?y:O.pivotX,g.pivotY=1-(T?v:1-O.pivotY)}return f},e.prototype.getTagChange=function(t){return null},e.ATTR_VERSION=0,e.ATTR_GENERATOR=1,e.ATTR_GENERATOR_VERSION=2,e.ATTR_FOLDER_ID=0,e.ATTR_FOLDER_NAME=1,e.ATTR_FILE_ID=0,e.ATTR_FILE_NAME=1,e.ATTR_FILE_WIDTH=2,e.ATTR_FILE_HEIGHT=3,e.ATTR_FILE_PIVOT_X=4,e.ATTR_FILE_PIVOT_Y=5,e.ATTR_ENTITY_ID=0,e.ATTR_ENTITY_NAME=1,e.ATTR_OBJ_INFO_NAME=0,e.ATTR_OBJ_INFO_TYPE=1,e.ATTR_OBJ_INFO_WIDTH=2,e.ATTR_OBJ_INFO_HEIGHT=3,e.ATTR_FRAMES_I_FOLDER=0,e.ATTR_FRAMES_I_FILE=1,e.ATTR_ANIMATION_ID=0,e.ATTR_ANIMATION_NAME=1,e.ATTR_ANIMATION_LENGTH=2,e.ATTR_ANIMATION_INTERVAL=3,e.ATTR_ANIMATION_LOOPING=4,e.ATTR_MAINLINE_KEY_ID=0,e.ATTR_MAINLINE_KEY_TIME=1,e.ATTR_BONE_REF_ID=0,e.ATTR_BONE_REF_PARENT=1,e.ATTR_BONE_REF_TIMELINE=2,e.ATTR_BONE_REF_KEY=3,e.ATTR_OBJ_REF_ID=4,e.ATTR_OBJ_REF_PARENT=5,e.ATTR_OBJ_REF_TIMELINE=6,e.ATTR_OBJ_REF_KEY=7,e.ATTR_OBJ_REF_NAME=8,e.ATTR_OBJ_REF_Z=9,e.ATTR_OBJ_REF_FOLDER=10,e.ATTR_OBJ_REF_FILE=11,e.ATTR_OBJ_REF_ABS_X=12,e.ATTR_OBJ_REF_ABS_Y=13,e.ATTR_OBJ_REF_ABS_PIVOT_X=14,e.ATTR_OBJ_REF_ABS_PIVOT_Y=15,e.ATTR_OBJ_REF_ABS_SCALE_X=16,e.ATTR_OBJ_REF_ABS_SCALE_Y=17,e.ATTR_OBJ_REF_ANGLE=18,e.ATTR_OBJ_REF_ALPHA=19,e.ATTR_TIMELINE_ID=0,e.ATTR_TIMELINE_NAME=1,e.ATTR_TIMELINE_OBJ=2,e.ATTR_TIMELINE_OBJ_TYPE=3,e.ATTR_TIMELINE_KEY_ID=0,e.ATTR_TIMELINE_KEY_TIME=1,e.ATTR_TIMELINE_KEY_SPIN=2,e.ATTR_TIMELINE_KEY_CURVE=3,e.ATTR_TIMELINE_KEY_C1=4,e.ATTR_TIMELINE_KEY_C2=5,e.ATTR_BONE_X=0,e.ATTR_BONE_Y=1,e.ATTR_BONE_ANGLE=2,e.ATTR_BONE_SCALE_X=3,e.ATTR_BONE_SCALE_Y=4,e.ATTR_OBJ_FOLDER=5,e.ATTR_OBJ_FILE=6,e.ATTR_OBJ_X=7,e.ATTR_OBJ_Y=8,e.ATTR_OBJ_SCALE_X=9,e.ATTR_OBJ_SCALE_Y=10,e.ATTR_OBJ_PIVOT_X=11,e.ATTR_OBJ_PIVOT_Y=12,e.ATTR_OBJ_ANGLE=13,e.ATTR_OBJ_ALPHA=14,e}(g.SpriterFile);e.SpriterBin=y},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeListBin=void 0;var n=function(){function t(t,e){this._file=t,this._nodeList=e}return t.prototype.length=function(){return this._nodeList.length},t.prototype.processed=function(){this._file.processed()},t.prototype.getChildNodes=function(t,e){return this._file.getNodesForElement(this._nodeList[t],e)},t.prototype.getFolder=function(t){return this._file.getFolder(this._nodeList[t])},t.prototype.getFile=function(t){return this._file.getFile(this._nodeList[t])},t.prototype.getTag=function(t){return this._file.getTag(this._nodeList[t])},t.prototype.getEntity=function(t){return this._file.getEntity(this._nodeList[t])},t.prototype.getObjectInfo=function(t){return this._file.getObjectInfo(this._nodeList[t],t)},t.prototype.getCharMap=function(t){return this._file.getCharMap(this._nodeList[t])},t.prototype.getCharMapEntry=function(t,e,i){this._file.getCharMapEntry(this._nodeList[t],e,i)},t.prototype.getVariable=function(t){return this._file.getVariable(this._nodeList[t])},t.prototype.getAnimation=function(t){return this._file.getAnimation(this._nodeList[t])},t.prototype.getMainline=function(t){return this._file.getBaseline(this._nodeList[t])},t.prototype.getMainlineKey=function(t){return this._file.getMainlineKey(this._nodeList[t])},t.prototype.getRef=function(t){return this._file.getRef(this._nodeList[t])},t.prototype.getTimeline=function(t){return this._file.getTimeline(this._nodeList[t])},t.prototype.getSoundline=function(t){return this._file.getBaseline(this._nodeList[t])},t.prototype.getEventline=function(t){return this._file.getBaseline(this._nodeList[t])},t.prototype.getTagline=function(t){return this._file.getBaseline(this._nodeList[t])},t.prototype.getVarline=function(t){return this._file.getVarline(this._nodeList[t])},t.prototype.getKey=function(t){return this._file.getKey(this._nodeList[t])},t.prototype.getTagKey=function(t){return this._file.getTagKey(this._nodeList[t])},t.prototype.getVariableKey=function(t,e){return this._file.getVariableKey(this._nodeList[t],e)},t.prototype.getTimelineKey=function(t,e){return this._file.getTimelineKey(this._nodeList[t],t,e)},t.prototype.getTagChanges=function(t){for(var e=0,i=0;i<this.length();i++){e|=1<<this._file.getTagChange(this._nodeList[i])}return e},t}();e.NodeListBin=n},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.SpriterGroup=void 0;var o=i(122),s=i(45),a=i(66),l=i(16),h=i(9),u=i(124),_=i(26),p=function(t){function e(e,i,n,r,s,a){var l=t.call(this,e,null)||this;l.onLoop=new Phaser.Signal,l.onFinish=new Phaser.Signal,l.onSound=new Phaser.Signal,l.onEvent=new Phaser.Signal,l.onTagChange=new Phaser.Signal,l.onVariableSet=new Phaser.Signal,l.onBoxUpdated=new Phaser.Signal,l.onPointUpdated=new Phaser.Signal,l._mainlineStepper=new o.LineStepper,l._lineSteppers=[],l._lineSteppersCount=0,l._bones=[],l._objects=[],l._tags=0,l._vars=[],l._paused=!1,l._finished=!0,l._spriter=i,l._entityName=r,l._entity=i.getEntityByName(r),l._textureKey=n,l._root=new _.SpatialInfo;for(var h=0;h<l._entity.variablesLength;h++)l._vars[h]=l._entity.getVariableById(h).clone();return l._charMapStack=new u.CharMapStack(l._entity),void 0===a&&(a=100),l.setAnimationSpeedPercent(a),null==s?l.playAnimationById(0):"number"==typeof s?l.playAnimationById(s):l.playAnimationByName(s),l}return r(e,t),Object.defineProperty(e.prototype,"finished",{get:function(){return this._finished},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"spriter",{get:function(){return this._spriter},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"entity",{get:function(){return this._entity},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"charMapStack",{get:function(){return this._charMapStack},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return this._paused},set:function(t){this._paused=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"animationsCount",{get:function(){return this._entity.animationsLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentAnimationName",{get:function(){return this._animationName},enumerable:!1,configurable:!0}),e.prototype.pushCharMap=function(t){this._charMapStack.push(t),this.resetSprites()},e.prototype.removeCharMap=function(t){this._charMapStack.remove(t),this.resetSprites()},e.prototype.clearCharMaps=function(){this._charMapStack.reset(),this.resetSprites()},e.prototype.resetSprites=function(){for(var t=0;t<this._objects.length;t++)this._objects[t].resetFile()},e.prototype.isTagOn=function(t){return this.isTagOnById(this._spriter.getTagByName(t).id)},e.prototype.isTagOnById=function(t){return(this._tags&1<<t)>0},e.prototype.getVariable=function(t){return this.getVariableById(this._entity.getVariableByName(t).id)},e.prototype.getVariableById=function(t){return this._vars[t]},e.prototype.getObject=function(t){for(var e=0;e<this._objects.length;e++){var i=this._objects[e];if(i.name===t)return i}return null},e.prototype.setAnimationSpeedPercent=function(t){void 0===t&&(t=100),this._animationSpeed=t/100},e.prototype.playAnimationById=function(t){var e=this._entity.getAnimationById(t);null!=e&&this.playAnimation(e)},e.prototype.playAnimationByName=function(t){var e=this._entity.getAnimationByName(t);null!=e&&this.playAnimation(e)},e.prototype.playAnimation=function(t){this._animationName=t.name,this._animation=t,this._finished=!1,this._mainlineStepper.reset(),this._mainlineStepper.line=this._animation.mainline,this._time=0,this.resetLines(),this._tags=0;for(var e=0;e<this._vars.length;e++)this._vars[e].reset();this.loadKeys(this._animation.mainline.at(0),!0),this.updateCharacter()},e.prototype.stopAnimation=function(){this._finished=!0},e.prototype.resetLines=function(){this._lineSteppersCount=0;for(var t=0;t<this._animation.linesLength;t++){var e=this._animation.getLineById(t);this._lineSteppersCount>=this._lineSteppers.length&&(this._lineSteppers[this._lineSteppersCount]=new o.LineStepper);var i=this._lineSteppers[this._lineSteppersCount++];i.reset(),i.line=e}},e.prototype.setBones=function(t,e){void 0===e&&(e=!1);for(var i=0;i<this._bones.length;i++)void 0!==this._bones[i]&&this._bones[i].setOn(!1);for(i=0;i<t.length;i++){var n=t[i];if(void 0===this._bones[n.id]){var r=new s.SpriterBone;r.type=1,this._bones[n.id]=r}var o=this._bones[n.id];o.setOn(!0),o.parent=n.parent,(o.timelineKey!==n.key||o.timeline!==n.timeline||e)&&o.setKey(this._entity,this._animation,n.timeline,n.key)}},e.prototype.setObjects=function(t,e){void 0===e&&(e=!1);for(var i=0;i<this._objects.length;i++)void 0!==this._objects[i]&&this._objects[i].setOn(!1);var n=!1;for(i=0;i<t.length;i++){var r=t[i],o=null,s=null;void 0===this._objects[r.id]?(s=new Phaser.Sprite(this.game,0,0,this._textureKey),o=new a.SpriterObject(this,s),this._objects[r.id]=o,this.add(s)):s=(o=this._objects[r.id]).sprite,o.parent=r.parent,o.type=this._animation.getTimelineById(r.timeline).objectType,0===o.type?(o.setOn(!0),o.sprite.z!==r.z&&(o.sprite.z=r.z,n=!0)):o.setOn(!0,!0),(o.timelineKey!==r.key||o.timeline!==r.timeline||e)&&o.setKey(this._entity,this._animation,r.timeline,r.key)}n&&this.sort()},e.prototype.loadKeys=function(t,e){void 0===e&&(e=!1),this.setBones(t.boneRefs,e),this.setObjects(t.objectRefs,e)},e.prototype.updateAnimation=function(){if(!this._paused&&!this._finished){var t,e=this._mainlineStepper;for(this._time>this._animation.length&&(this._animation.loopType===l.eAnimationLooping.NO_LOOPING?(this._time=this._animation.length,this._finished=!0):(this._time-=this._animation.length,this.onLoop.dispatch(this)));null!==(t=e.step(this._time));)this.loadKeys(t),e.lastTime=t.time;this.updateCharacter(),this.updateLines(),this._finished&&this.onFinish.dispatch(this),this._time+=this.game.time.physicsElapsedMS*this._animationSpeed}},e.prototype.updateCharacter=function(){for(var t=0;t<this._bones.length;t++){var e=this._bones[t];if(e.on){var i=-1===e.parent?this._root:this._bones[e.parent].transformed;e.tween(this._time),e.update(i)}}for(t=0;t<this._objects.length;t++){var n=this._objects[t];if(n.on){i=-1===n.parent?this._root:this._bones[n.parent].transformed;n.tween(this._time),n.update(i),0===n.type?n.updateSprite():2===n.type?this.onBoxUpdated.dispatch(this,n):3===n.type&&this.onPointUpdated.dispatch(this,n)}}},e.prototype.updateLines=function(){for(var t=this._lineSteppersCount-1;t>=0;t--)for(var e,i=this._lineSteppers[t],n=i.line;null!==(e=i.step(this._time));){switch(n.type){case h.eTimelineType.SOUND_LINE:this.onSound.dispatch(this,n.name);break;case h.eTimelineType.EVENT_LINE:this.onEvent.dispatch(this,n.name);break;case h.eTimelineType.TAG_LINE:var r=e.tagsOn,o=this._tags^r;this._tags=r;for(var s=0;s<this._spriter.tagsLength;s++){var a=1<<s;o&a&&this.onTagChange.dispatch(this,this._spriter.getTagById(s).name,(r&a)>0)}break;case h.eTimelineType.VAR_LINE:var l=e.value,u=this._vars[n.varDefId];u.value=l,this.onVariableSet.dispatch(this,u)}i.lastTime=e.time}},e}(Phaser.Group);e.SpriterGroup=p},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineStepper=void 0;var n=function(){function t(){this.reset()}return Object.defineProperty(t.prototype,"current",{get:function(){return this._line.at(this._currentIndex)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentIndex",{get:function(){return this._currentIndex},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"next",{get:function(){return this._line.at(this._nextIndex)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextIndex",{get:function(){return this._nextIndex},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastTime",{set:function(t){this._lastTime=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"line",{get:function(){return this._line},set:function(t){this._line=t},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this._lastTime=-1,this._currentIndex=-1,this._nextIndex=0},t.prototype.step=function(t){var e=this._nextIndex,i=this._line.keys[e],n=i.time,r=t<this._lastTime;return!r&&n>this._lastTime&&n<=t||r&&(n>this._lastTime||n<=t)?(this._lastTime=n,this._currentIndex=e,++e>=this._line.keys.length&&(e=0),this._nextIndex=e,i):(r&&(this._lastTime=-1),null)},t}();e.LineStepper=n},function(t,e,i){"use strict";function n(t,e,i){return(e-t)*i+t}function r(t,e,i,r){return n(n(t,e,r),n(e,i,r),r)}function o(t,e,i,o,s){return n(r(t,e,i,s),r(e,i,o,s),s)}function s(t,e,i,r,s,a){return n(o(t,e,i,r,a),o(e,i,r,s,a),a)}function a(t,e,i){var n=1-i,r=i*i,o=n*n;return 0+3*o*i*t+3*n*r*e+1*(r*i)}Object.defineProperty(e,"__esModule",{value:!0}),e.angleLinear=e.bezier=e.quintic=e.quartic=e.cubic=e.quadratic=e.linear=void 0,e.linear=n,e.quadratic=r,e.cubic=o,e.quartic=s,e.quintic=function(t,e,i,r,o,a,l){return n(s(t,e,i,r,o,l),s(e,i,r,o,a,l),l)},e.bezier=function(t,e,i,n,r){for(var o=0,s=1,l=(s+o)/2,h=a(t,i,l),u=0;Math.abs(r-h)>.001&&u<10;)r>h?o=l:s=l,h=a(t,i,l=(s+o)/2),++u;return a(e,n,l)},e.angleLinear=function(t,e,i,n){return 0===i?t:(i>0?e>t&&(e-=360):e<t&&(e+=360),this.linear(t,e,n))}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharMapStack=void 0;var n=function(){function t(t){this._stack=[],this._length=0,this._entity=t}return t.prototype.reset=function(){this._length=0},t.prototype.push=function(t){var e=this.getCharMap(t);this._stack[this._length++]=e},t.prototype.remove=function(t){var e=this.getCharMap(t),i=this.findCharMap(e);if(-1!==i){for(var n=i;n<this._length-2;n++)this._stack[n]=this._stack[n+1];this._stack[--this._length]=null}},t.prototype.getFile=function(t){for(var e=this._length-1;e>=0;e--){var i=this._stack[e].value(t.name);if(void 0!==i)return i}return t},t.prototype.getCharMap=function(t){return this._entity.getCharMapByName(t)},t.prototype.findCharMap=function(t){for(var e=0;e<this._length;e++)if(this._stack[e]===t)return e;return-1},t}();e.CharMapStack=n},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.Bank=void 0;var o=i(6),s=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._bg=null,n._textGroup=null,n._text=null,n._glow=null,n._value=0,n.createBg(),n._textGroup=new Phaser.Group(e,n),n.createValue(),n}return r(e,t),e.prototype.createBg=function(){this._bg=this.game.add.sprite(0,0,"Sprites","button_bank_numbers",this),this._bg.anchor.set(.5)},e.prototype.createValue=function(){this._bg.width;var t=new Phaser.BitmapText(this.game,0,-53.5,"NumsBankGlow","0",e.FONT_SIZE_BANK,"center");t.anchor.set(.5),this._textGroup.add(t),this._glow=t,this._glow.alpha=1;var i=new Phaser.BitmapText(this.game,0,-47,"NumsBank","0",e.FONT_SIZE_BANK,"center");i.anchor.set(.5),this._textGroup.add(i),this._text=i},e.prototype.onBankChanged=function(t){this._value=t;var e=t.toString();this._text.text=e,this._glow.text=e},e.prototype.setActive=function(t){this._bg.frameName="button_bank_numbers"},e.prototype.updateBank=function(t){var i=0;this._value>=20&&(i=Phaser.Math.mapLinear(this._value,20,60,.15,.3),i=Phaser.Math.clamp(i,.1,1));var n=1+i,r=this._value/60,s=o.MathHelp.repeatNormalized(this.game.time.time,e.PULSE_SCORE_DURATION),a=-4*s*s+4*s,l=n*(1+(a*=e.PULSE_STRENGTH*i)),h=Math.min(1,r+a);this._text.scale.set(l,l),this._glow.scale.set(l,l),this._glow.alpha=h},e.FONT_SIZE_BANK=41,e.PULSE_SCORE_DURATION=750,e.PULSE_STRENGTH=.25,e}(Phaser.Group);e.Bank=s},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.CheckBox=void 0;var o=function(t){function e(e,i,n,r,o,s,a,l){var h=t.call(this,e,i,n,r,s,a,l)||this;h._changeOnDown=!1,h._checkFramePosition=new Phaser.Point,h._checked=!1;var u=o+"On";h.game.cache.getFrameByName(n,u),h._frameChecked=u;var _=o+"Off";h.game.cache.getFrameByName(n,u)||(_=null),h._frameUnchecked=_;var p=new Phaser.Sprite(e,0,0,n);return p.anchor.set(.5,.5),h.addChild(p),h._checkSprite=p,h.checked=!1,h}return r(e,t),Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(t){if(this._checked=t,t)this._checkSprite.frameName=this._frameChecked,this._checkSprite.visible=!0;else{var e=null!==this._frameUnchecked;e&&(this._checkSprite.frameName=this._frameUnchecked),this._checkSprite.visible=e}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"changeOnDown",{get:function(){return this._changeOnDown},set:function(t){this._changeOnDown=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"checkSprite",{get:function(){return this._checkSprite},enumerable:!1,configurable:!0}),e.prototype.setCheckPosition=function(t,e){this._checkSprite.position.set(t,e)},e.prototype.downEvent=function(){this.setButton(this._over,!0),this._changeOnDown&&(this.checked=!this.checked),this.downAction(),this.onDown.dispatch(this,this._checked)},e.prototype.upEvent=function(t,e,i){this.setButton(this._over,!1),this.upAction(),i&&(this._changeOnDown||(this.checked=!this.checked),this.onClick.dispatch(this,this._checked))},e}(i(11).Button);e.CheckBox=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.UILayer=e.eGroupPlacement=void 0,function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP=1]="TOP",t[t.TOP_RIGHT=2]="TOP_RIGHT",t[t.LEFT=3]="LEFT",t[t.CENTER=4]="CENTER",t[t.RIGHT=5]="RIGHT",t[t.BOTTOM_LEFT=6]="BOTTOM_LEFT",t[t.BOTTOM=7]="BOTTOM",t[t.BOTTOM_RIGHT=8]="BOTTOM_RIGHT"}(e.eGroupPlacement||(e.eGroupPlacement={}));var o=function(t){function e(e,i){void 0===i&&(i=null);var n=t.call(this,e,i)||this;return n._groups=[],n}return r(e,t),e.prototype.hasGroupAt=function(t){var e=this._groups[t];return null!=e},e.prototype.groupAt=function(t,e){void 0===e&&(e=!0);var i=this._groups[t];return null==i&&e&&((i=new Phaser.Group(this.game,this)).fixedToCamera=!0,this._groups[t]=i,this.arrangeGroup(t)),i},e.prototype.arrangeGroups=function(){for(var t=0;t<this._groups.length;t++){var e=this._groups[t];null!=e&&this.arrangeGroup(t)}},e.prototype.arrangeGroup=function(t){var e=t%3,i=Math.floor(t/3),n=this._groups[t];if(null!=n){var r=this.game.width*e/2,o=this.game.height*i/2;n.cameraOffset.set(r,o)}},e}(Phaser.Group);e.UILayer=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.DebugPanel=void 0;var o=i(34),s=i(129),a=i(17),l=function(t){function e(e,i){var n=t.call(this,e,i.world)||this;return n._playScene=null,n._roundData=null,n._numsToggle=null,n._aiToggle=null,n._numsPanel=null,n._nums=[],n._text=null,n._selected=null,n._debugRect=new Phaser.Rectangle(0,0,64,64),n._playScene=i,n._roundData=i.roundData,n.createToggles(),n._numsPanel=n.createNumsPanel(),n._numsPanel.visible=!1,n}return r(e,t),Object.defineProperty(e.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected=t,this.updateText()},enumerable:!1,configurable:!0}),e.prototype.createToggles=function(){this._numsToggle=new a.Toggle(this.game,"Nums","Sprites","debug_nums_off","debug_nums_on"),this.add(this._numsToggle),this._numsToggle.x=-30,this._numsToggle.onClick.add((function(t){this._numsPanel.visible=t.toggled}),this),this._aiToggle=new a.Toggle(this.game,"AI","Sprites","debug_ai_off","debug_ai_on"),this.add(this._aiToggle),this._aiToggle.x=30,this._aiToggle.onClick.add((function(t){var e=this;t.toggled?this._playScene.state.onRenderCallback=function(){e.doRender()}:(this._playScene.state.onRenderCallback=function(){},this.game.debug.reset())}),this)},e.prototype.createNumsPanel=function(){var t=new Phaser.Group(this.game,this);return t.y=40,this.createButtons(t),this.createText(t),t},e.prototype.createButtons=function(t){for(var e=this._roundData.numbers,i=0;i<e.length;i++){var n=e[i],r=n.value.toString(),o=new s.ButtonWithText(this.game,r,r,50,20);o.spinnerNumber=n,o.onClick.add(this.onButton,this),o.y=25*n.value,t.add(o),this._nums.push(o)}},e.prototype.createText=function(t){var e=new Phaser.BitmapText(this.game,-25,350,"FontSmall","sel: -",16,"left");t.add(e),this._text=e},e.prototype.updateButtons=function(){for(var t=0;t<this._nums.length;t++){var e=this._nums[t];e.spinnerNumber.state===o.SpinnerNumberState.InGame?e.alpha=1:e.alpha=.35}},e.prototype.updateText=function(){this._text.text="sel: "+(this._selected?this._selected.value:" -")},e.prototype.onButton=function(t){this._selected=t.spinnerNumber,this.updateText()},e.prototype.doRender=function(){this.doRenderAIInfo()},e.prototype.doRenderAIInfo=function(){var t=this.game,e=this._playScene.leaderboard,i=e._items,n=this._debugRect;n.setTo(e.position.x+280,e.position.y-390,700,780),t.debug.geom(n,"rgba(0,0,0,0.5)",!0);for(var r=0;r<i.length;r++){var o=i[r],s=o.player;if(!s.isPlayer)for(var a=o.position.x+e.position.x+280,l=o.position.y+e.position.y,h=a+this.game.width/2,u=l+this.game.height/2+16,_=s.dbg.split("\n"),p=0;p<_.length;p++)t.debug.text(_[p],h,u,"#00FF00"),u+=16}},e}(Phaser.Group);e.DebugPanel=l},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonWithText=void 0;var o=function(t){function e(e,i,n,r,o){void 0===r&&(r=100),void 0===o&&(o=50);var s=t.call(this,e,i,"Sprites","WhiteBlock",!1)||this;return s._text=null,s._button.width=r,s._button.height=o,s._text=new Phaser.BitmapText(e,0,0,"FontSmall",n,16,"center"),s._text.anchor.set(.5),s._text.tint=4210752,s.add(s._text),s}return r(e,t),Object.defineProperty(e.prototype,"fontSize",{set:function(t){this._text.fontSize=t},enumerable:!1,configurable:!0}),e}(i(17).Button);e.ButtonWithText=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.InterAnim=e.PlayingAnim=e.InterAnimType=void 0;var o,s,a=i(2),l=i(23),h=i(0),u=i(1);!function(t){t[t.Round=0]="Round",t[t.Busted=1]="Busted",t[t.Correct=2]="Correct",t[t.Perfect=3]="Perfect",t[t.StartEnd=4]="StartEnd"}(o=e.InterAnimType||(e.InterAnimType={})),function(t){t[t.None=0]="None",t[t.Perfect=1]="Perfect",t[t.Wipeout=2]="Wipeout",t[t.NewGame=3]="NewGame",t[t.EndGame=4]="EndGame",t[t.EndGamePlayer=5]="EndGamePlayer"}(s=e.PlayingAnim||(e.PlayingAnim={}));var _=function(t){function e(e){var i=t.call(this,e,a.Defs.SPRITER_ANIM_ROUNDS,"Sprites","text")||this;i._texts=[],i._leftTexts=[],i._rightTexts=[],i._changeTexts=!1,i.stopAnimation();for(var n=0;n<3;n++){var r=new Phaser.BitmapText(e,0,0,"SlantBig","",72,"center");r.anchor.set(.5,.5),i.add(r),i._texts.push(r)}return i.onPointUpdated.add(i.updateTextPosition,i),i.onVariableSet.add(i.updateTextVariable,i),i}return r(e,t),Object.defineProperty(e.prototype,"playingAnim",{get:function(){return this._playingAnim},enumerable:!1,configurable:!0}),e.prototype.playWipeoutAnim=function(){this.setCharMapForType(o.Busted),this.setTexts(a.Defs.INTER_WIPEOUT),this.playAnimationByName("wipeout_start_n"),this.setAnimationSpeedPercent(80),this.visible=!0,this._playingAnim=s.Wipeout},e.prototype.playPerfectAnim=function(t){this.setCharMapForType(o.Perfect),this.setTexts(t),this.playAnimationByName("wipeout_loop_perfect_start"),this.setAnimationSpeedPercent(100),this.visible=!0,this._playingAnim=s.Perfect},e.prototype.playGameStartAnim=function(t){this._changeTexts=!0,this.setCharMapForType(o.StartEnd),this.setTexts(t),this.playAnimationByName("We Have A Winner_start"),this.setAnimationSpeedPercent(100),this.visible=!0,this._playingAnim=s.NewGame},e.prototype.playGameEndAnim=function(t,e){this._changeTexts=!1,this.setCharMapForType(o.StartEnd),this.setTexts(t),this.playAnimationByName("We Have A Winner_start"),this.setAnimationSpeedPercent(100),this.visible=!0,this._playingAnim=e?s.EndGamePlayer:s.EndGame},e.prototype.playRoundAnim=function(t){this.playMidRoundAnimation("Round",o.Round,t)},e.prototype.playBustedAnim=function(t){this.playMidRoundAnimation("Round_short",o.Busted,t)},e.prototype.playCorrectAnim=function(t){this.playMidRoundAnimation("Round_short",o.Correct,t)},e.prototype.playMidRoundAnimation=function(t,e,i){this.setCharMapForType(e),this.setTexts(i),this.playAnimationByName(t),this.setAnimationSpeedPercent(80),this.visible=!0,this._playingAnim=s.None},e.prototype.setCharMapForType=function(t){this.clearCharMaps(),t===o.Busted?this.pushCharMap("Busted"):t===o.Correct?this.pushCharMap("Correct"):t===o.Perfect?this.pushCharMap("perfect round"):t===o.StartEnd&&this.pushCharMap("StartEnd")},e.prototype.setTexts=function(t){this._leftTexts.length=0,this._rightTexts.length=0;for(var e=0;e<this._texts.length;e++)this._texts[e].visible=!1;for(e=0;e<t.length;e++){var i=t[e],n=this._texts[e];n.font=i.font,n.fontSize=i.size,void 0!==i.align?(n.align=i.align,n.anchor.x="left"===i.align?0:"center"===i.align?.5:1):(n.align="center",n.anchor.x=.5),void 0!==i.parameters?n.text=h.StringUtils.format(h.TextUtils.getText(i.textId),i.parameters):n.text=h.TextUtils.getText(i.textId),void 0===n.textOffset&&(n.textOffset=new Phaser.Point),n.textOffset.set(i.offsetX,i.offsetY),"point_left"===i.attachTo?this._leftTexts.push(n):"point_right"===i.attachTo&&this._rightTexts.push(n),n.visible=!0}},e.prototype.updateTextPosition=function(t,e){for(var i=e.transformed,n="point_left"===e.name?this._leftTexts:this._rightTexts,r=0;r<n.length;r++){var o=n[r],s=o.textOffset;o.position.set(i.x+s.x,i.y+s.y),o.alpha=i.alpha}},e.prototype.updateTextVariable=function(t,e){this._changeTexts&&(this._rightTexts[0].text=h.TextUtils.getText(a.Defs.INTER_GAME_START_TEXT_IDS[e.value]),h.AudioUtils.playSound("push_your_luck_intro_ding",u.Config.VOLUME_PUSH_YOUR_LUCK_INTRO_DING),3===e.value&&h.AudioUtils.playSound("push_your_luck_intro_cheers",u.Config.VOLUME_PUSH_YOUR_LUCK_INTRO_CHEERS))},e}(l.SpriterGroup);e.InterAnim=_},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.InterAnimParticles=void 0;var o=i(8),s=i(8),a=function(t){function e(i,n){var r=t.call(this,i,0,0,e.PARTICLES_MAX)||this;r._stars=null,r._confetti=null,n.add(r),r.makeParticles("Sprites",null,e.PARTICLES_MAX);var a=new o.ParticleParams(i);a.frames=["StarPtc1"],a.area=new Phaser.Circle(0,0,900);var l=1;a.maxLifetime=a.minLifetime=l,a.setAngularSpeed(-45,45),a.setScale(.01),a.setAlpha(3),a.setScaleChange(s.eParameterChangeType.IN_TIME,3,l),a.setAlphaChange(s.eParameterChangeType.IN_TIME,-3,l),r._stars=a;var h=new o.ParticleParams(i);return h.frames=["conf1","conf2","conf3","conf4","conf1","conf2","conf3","conf4","conf1","conf2","conf3","conf4","StarPtc1","StarPtc2","StarPtc3","StarPtc4"],h.area=new Phaser.Line(-450,0,450,0),l=3,h.maxLifetime=h.minLifetime=l,h.setXSpeed(-50,50),h.setYSpeed(370,425),h.setAngularSpeed(-90,90),h.setScale(.75,1.25),r._confetti=h,r}return r(e,t),e.prototype.startStars=function(t,e){this.position.set(t,e),this.params=this._stars,this.flow(75,6,-1)},e.prototype.startConfetti=function(t,e){this.position.set(t,e),this.params=this._confetti,this.flow(100,3,-1)},e.prototype.stop=function(){this.stopFlow()},e.PARTICLES_MAX=200,e}(o.ParticlesEmitter);e.InterAnimParticles=a},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.Leaderboard=void 0;var o=i(133),s=i(13),a=i(8),l=i(135),h=i(1),u=function(t){function e(e,i,n){var r=t.call(this,e,i)||this;r._playScene=null,r._playersManager=null,r._roundData=null,r._items=[],r._topLayer=null,r._scoreEmitter=null,r._playScene=n,r._playersManager=n.playersManager,r._roundData=n.roundData;var s=r._playersManager.players;r._topLayer=new Phaser.Group(e,r);for(var a=0;a<s.length;a++){var l=new o.PlayerItem(e,r,s[a]);r._items.push(l)}return r.createScoreParticlesEmitter(),r.bringToTop(r._topLayer),r.onSorted(),r.snapItemsToTargetY(),r._playersManager.onSorted.add(r.onSorted,r),r._playersManager.onActiveCountChanged.add(r.onActiveCountChanged,r),r}return r(e,t),Object.defineProperty(e.prototype,"playScene",{get:function(){return this._playScene},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topLayer",{get:function(){return this._topLayer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"roundData",{get:function(){return this._roundData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"winScore",{get:function(){return this._playScene.winScore},enumerable:!1,configurable:!0}),e.prototype.createScoreParticlesEmitter=function(){var t=new a.ParticlesEmitter(this.game,0,0,e.SCORE_PARTICLES_MAX);t.particleClass=l.ScoreParticle,t.makeParticles("Sprites",null,e.SCORE_PARTICLES_MAX);var i=h.Config.SCORE_PARTICLES_LOCAL_SPACE?h.Config.SCORE_PARTICLES_LOCAL_SPACE_DURATION:h.Config.SCORE_PARTICLES_WORLD_SPACE_DURATION;t.lifetime=i,h.Config.SCORE_PARTICLES_LOCAL_SPACE||t.setYSpeed(-10,-10);var n=h.Config.SCORE_PARTICLES_LOCAL_SPACE?6:2;t.setAlpha(n,n),t.setAlphaChange(a.eParameterChangeType.IN_TIME,-n,i),this._topLayer.add(t),this._scoreEmitter=t},e.prototype.emitScoreParticle=function(t,e){var i=h.Config.SCORE_PARTICLES_LOCAL_SPACE;i?this._scoreEmitter.emitAt(295,14):this._scoreEmitter.emitAt(t.x+312,t.y+t.heightHalf+16);var n=this._scoreEmitter.emitParticle();null!==n&&(n.text=e,i&&t.topGroup.add(n.visual))},e.prototype.onSorted=function(){var t=!this._playersManager.allPlayersHaveScoreZero(),e=this._items[0].backgroundHeight,i=-this._items.length*o.PlayerItem.HEIGHT/2;i+=(o.PlayerItem.HEIGHT-e)/2,i=Math.floor(i);for(var n=0;n<this._items.length;n++){var r=this._items[n];r.setTargetY(o.PlayerItem.HEIGHT*r.player.order+i),t&&r.setPlace()}this.customSort(this.distanceToTargetSortHandler,this)},e.prototype.distanceToTargetSortHandler=function(t,e){return void 0===t.player?1:void 0===e.player?-1:t.player.isPlayer?1:e.player.isPlayer?-1:t.yDistance!==e.yDistance?t.yDistance-e.yDistance:t.player.order-e.player.order},e.prototype.snapItemsToTargetY=function(){for(var t=0;t<this._items.length;t++)this._items[t].snapYToTarget()},e.prototype.onActiveCountChanged=function(t){for(var e=0;e<this._items.length;e++){var i=this._items[e];i.isActive=i.player.order<t}},e.prototype.getLastStandingPlayer=function(){for(var t=null,e=0;e<this._items.length;e++){var i=this._items[e].player;if(i.status===s.PlayerStatus.Lower||i.status===s.PlayerStatus.Higher||i.status===s.PlayerStatus.Passed){if(null!==t)return null;t=i}}return t},e.prototype.highlightPlayer=function(t){for(var e=0;e<this._items.length;e++)if(this._items[e].player===t)return void this._items[e].setHighlight(!0)},e.prototype.highlightLastStandingOff=function(){for(var t=0;t<this._items.length;t++)this._items[t].setHighlight(!1)},e.prototype.getPlayerItem=function(t){for(var e=0;e<this._items.length;e++)if(this._items[e].player===t)return this._items[e];return null},e.SCORE_PARTICLES_MAX=10,e}(Phaser.Group);e.Leaderboard=u},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.PlayerItem=void 0;var o=i(13),s=i(2),a=i(0),l=i(8),h=i(134),u=i(6),_=i(1),p=i(19),c=function(t){function e(e,i,n){var r=t.call(this,e,i)||this;return r._player=null,r._leaderboard=null,r._top=null,r._background=null,r._icon=null,r._name=null,r._place=null,r._passIcon=null,r._status=null,r._score=null,r._scoreGlow=null,r._glow=null,r._highlight=null,r._particles=null,r._lastScoreValue=-1,r._lastStatus=o.PlayerStatus.Nothing,r._targetOffsetDelay=0,r._offsetTime=0,r._targetOffset=0,r._startY=0,r._targetY=0,r._moveToTargetYTime=0,r._moveToTargetYDelay=0,r._keepMaximumAlpha=!1,r._player=n,r._leaderboard=i,r._top=new Phaser.Group(e,r),r.createBackground(n.isPlayer),r.createIcon(n.iconFrame),r.createName(n.name),r.createPlace(),r.createPassIcon(),r.createStatus(),r.createScore(),r.createGlow(),r.createHighlight(),r.createParticles(),r.onChange(n),r._top.x=r._targetOffset=_.Config.IN_PLAY_OFFSET,n.onChange.add(r.onChange,r),n.onFace.add(r.onFace,r),r}return r(e,t),Object.defineProperty(e.prototype,"backgroundHeight",{get:function(){return this._background.height},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"player",{get:function(){return this._player},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isActive",{set:function(t){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yDistance",{get:function(){return Math.abs(this._targetY-this._startY)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scoreWorldPosition",{get:function(){return this._score.world},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"keepMaximumAlpha",{get:function(){return this._keepMaximumAlpha},set:function(t){this._keepMaximumAlpha=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topAlpha",{set:function(t){this._top.alpha=this._keepMaximumAlpha?1:t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topGroup",{get:function(){return this._top},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"heightHalf",{get:function(){return Math.floor(this._background.height/2)},enumerable:!1,configurable:!0}),e.prototype.createBackground=function(t){var e=t?"frame_player_you":"frame_player_ai";this._background=this.game.add.sprite(0,0,"Sprites",e,this._top)},e.prototype.createIcon=function(t){this._icon=this.game.add.sprite(0,0,"Sprites",t,this._top),this._icon.anchor.set(0,1)},e.prototype.createName=function(t){this._name=new Phaser.BitmapText(this.game,0,0,"FontSmall",t,e.FONT_SIZE_NAME,"left"),this._top.add(this._name)},e.prototype.createPlace=function(){this._place=new Phaser.BitmapText(this.game,0,0,"FontSmall","",e.FONT_SIZE_NAME,"right"),this._place.anchor.set(1,0),this._top.add(this._place)},e.prototype.createPassIcon=function(){this._passIcon=this.game.add.sprite(0,0,"Sprites","frame_ico_name_ticket",this._top),this._passIcon.anchor.set(.5)},e.prototype.createStatus=function(){this._status=this.game.add.sprite(0,0,"Sprites",0,this._top),this._status.anchor.set(.5,.5),this._status.visible=!1},e.prototype.createScore=function(){var t=new Phaser.BitmapText(this.game,0,0,"NumsBankGlow","0",e.FONT_SIZE_SCORE,"center");t.anchor.set(.5,.5),this._top.add(t),t.visible=!1,this._scoreGlow=t;var i=new Phaser.BitmapText(this.game,0,0,"NumsPlayers","0",e.FONT_SIZE_SCORE,"center");i.anchor.set(.5,.5),this._top.add(i),this._score=i},e.prototype.createGlow=function(){this._glow=this.game.add.sprite(0,0,"Sprites",0,this._top),this._glow.visible=!1},e.prototype.createHighlight=function(){this._highlight=this.game.add.sprite(0,0,"Sprites",0,this._top),this._highlight.animations.add("highlight",s.Defs.ANIM_PULSE_FRAMES,35,!0),this._highlight.visible=!1},e.prototype.createParticles=function(){var t=new l.ParticlesEmitter(this.game,0,0,e.PARTICLES_MAX);t.particleClass=h.OtherParentParticle,t.makeParticles("Sprites","particle_bank_collected",e.PARTICLES_MAX,[this._leaderboard.topLayer]);t.lifetime=1,t.setScale(.75,1.25),t.friction=.95,t.setAlphaChange(l.eParameterChangeType.IN_TIME,-1,1),this._top.add(t),this._particles=t},e.prototype.emitParticles=function(){this._particles.emitAt(this.x+this._top.x+this._status.x,this.y+this._top.y+this._status.y),this._particles.flow(50,2,e.PARTICLES_MAX)},e.prototype.setLayout=function(){var t=this.heightHalf;this._top.y=t,this._background.position.set(0,-t),this._icon.position.set(15,-t+this._background.height-7),this._name.position.set(17,8-t),this._place.position.set(this._background.width-17,8-t),this._passIcon.position.set(this._place.x-50,20-t),this._status.position.set(125,60-t),this._score.position.set(this._background.width-20-this._score.textWidth/2,60-t),this._scoreGlow.position.set(this._background.width-20-this._score.textWidth/2,60-t-6.5),this._glow.position.set(0,-t),this._highlight.position.set(0,-t),this._particles.position.copyFrom(this._status.position)},e.prototype.onChange=function(t){this.onFace(t);var e=t.status!==o.PlayerStatus.Nothing;if(this._status.visible=e,this._glow.visible=e,this._status.visible){var i=this._status.frameName;this._lastStatus=t.status,this._status.frameName=s.Defs.STATUS_FRAMES[t.status],this._glow.frameName=s.Defs.STATUS_GLOW_FRAMES[t.status],i!==this._status.frameName&&t.status===o.PlayerStatus.Collect&&(this.emitParticles(),this._leaderboard.emitScoreParticle(this,this._leaderboard.roundData.bank),t.resetJustCollect()),this.setTargetOffset(this._player.isInGame?_.Config.IN_PLAY_OFFSET:0)}else this._lastStatus=o.PlayerStatus.Nothing,this._status.frame=0,this.setTargetOffset(_.Config.IN_PLAY_OFFSET);if(this._lastScoreValue!==t.score){this._lastScoreValue=t.score;var n=t.score.toString();this._score.text=n,this._scoreGlow.text=n;var r=this._background.width-20-this._score.textWidth/2;this._score.position.x=r,this._scoreGlow.position.x=r}this._passIcon.visible=!t.passUsed,this.playerOverWinScore(this._leaderboard.playScene.topPlayerOverWinScore===t),this.setLayout()},e.prototype.onFace=function(t){t.isPlayer||(t.face===o.Face.Smile?this._icon.frameName=t.iconFrameSmile:t.face===o.Face.Angry?this._icon.frameName=t.iconFrameAngry:this._icon.frameName=t.iconFrame)},e.prototype.setPlace=function(){var t=s.Defs.PLACE_TEXTS_SHORT[this._player.place];this._place.text=a.TextUtils.getText(t)},e.prototype.setTargetOffset=function(t,e){void 0===e&&(e=_.Config.IN_PLAY_OFFSET_DELAY),this._targetOffset!==t&&(this._targetOffset=t,this._targetOffsetDelay=e)},e.prototype.setTargetY=function(t){this._startY=this.y,this._targetY!==t&&(this._targetY=t,this._moveToTargetYTime=0,this._moveToTargetYDelay=_.Config.SORT_MOVEMENT_DELAY)},e.prototype.snapYToTarget=function(){this.y=this._targetY},e.prototype.setHighlight=function(t){this._highlight.visible=t,t?this._highlight.animations.play("highlight"):this._highlight.animations.stop()},e.prototype.playerOverWinScore=function(t){this._score.font=t?e.FONT_SCORE_RED:e.FONT_SCORE,t&&(this._glow.frameName=e.FRAME_RED,this._leaderboard.playScene.targetColor=1)},e.prototype.update=function(){this._particles.update(),this.pulseAlphaFinalRound(),this.y!==this._targetY?this.updateY():this.updateOffset(),this.pulseScoreOverWinScore()},e.prototype.updateOffset=function(){if(this._targetOffsetDelay>0)this._targetOffsetDelay-=this.game.time.elapsedMS;else if(this._top.x!==this._targetOffset){var t;if(this._targetOffset>this._top.x){this._offsetTime=Phaser.Math.clamp(this._offsetTime-this.game.time.elapsedMS,0,_.Config.IN_PLAY_OFFSET_DURATION);var e=this._offsetTime/_.Config.IN_PLAY_OFFSET_DURATION;t=1-Math.cos(Math.PI/2*(1-e))}else{this._offsetTime=Phaser.Math.clamp(this._offsetTime+this.game.time.elapsedMS,0,_.Config.IN_PLAY_OFFSET_DURATION);e=this._offsetTime/_.Config.IN_PLAY_OFFSET_DURATION;t=1-Math.sin(Math.PI/2*e)}this._top.x=Phaser.Math.linear(0,_.Config.IN_PLAY_OFFSET,t),this.topAlpha=_.Config.INACTIVE_PLAYER_ALPHA+t*(1-_.Config.INACTIVE_PLAYER_ALPHA),this._top.scale.set(.9+.1*t)}},e.prototype.pulseScoreOverWinScore=function(){if(this._score.alpha=1,this._scoreGlow.alpha=0,this._scoreGlow.visible=!1,0!==this._leaderboard.roundData.bank)if(!(this._lastStatus!==o.PlayerStatus.Busted&&this._lastStatus!==o.PlayerStatus.Collect)||this._lastScoreValue+this._leaderboard.roundData.bank<this._leaderboard.winScore)this._score.scale.set(1,1);else{var t=u.MathHelp.repeatNormalized(this.game.time.time,e.PULSE_SCORE_DURATION),i=p.evaluate(t,s.Defs.HEARBEAT_CURVE);this._scoreGlow.visible=!0,this._scoreGlow.alpha=this._score.alpha=i<.1?0:i;var n=1+.35*i;this._score.scale.set(n,n),this._scoreGlow.scale.set(n,n)}},e.prototype.updateY=function(){if(this._moveToTargetYDelay>0)this._moveToTargetYDelay-=this.game.time.elapsedMS;else{this._moveToTargetYTime+=this.game.time.elapsedMS;var t=Phaser.Math.clamp(this._moveToTargetYTime/_.Config.SORT_MOVEMENT_TIME,0,1),e=(1-Math.cos(Math.PI*t))/2;this.y=Phaser.Math.linear(this._startY,this._targetY,e)}},e.prototype.pulseAlphaFinalRound=function(){var t=0,e=1;this._leaderboard.playScene.topPlayerOverWinScore===this._player?(t=Math.sin(Math.PI*u.MathHelp.pingPongNormalized(this.game.time.time,1e3)),e=_.Config.INACTIVE_PLAYER_ALPHA+.45*t):(t=this._top.x/_.Config.IN_PLAY_OFFSET,e=_.Config.INACTIVE_PLAYER_ALPHA+(1-_.Config.INACTIVE_PLAYER_ALPHA)*t),this.topAlpha=e},e.HEIGHT=98,e.FONT_SIZE_NAME=16,e.FONT_SIZE_SCORE=36,e.PARTICLES_MAX=16,e.PULSE_SCORE_DURATION=750,e.FONT_SCORE="NumsPlayers",e.FONT_SCORE_RED="NumsPlayersRed",e.FRAME_RED="frame_red",e}(Phaser.Group);e.PlayerItem=c},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.OtherParentParticle=void 0;var o=function(t){function e(e,i){var n=t.call(this,e,i)||this;return void 0!==i&&null===i||(n._parent=i[0]),n}return r(e,t),e.prototype.onEmit=function(t){this._parent.add(this._visual);var e=Math.random()*Math.PI*2,i=Math.sin(e),n=Math.cos(e),r=this._visual.position;r.set(r.x+18*n,r.y+18*i);var o=25+50*Math.random();this._velocity.set(n*o,i*o)},e}(i(21).SpriteParticle);e.OtherParentParticle=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.ScoreParticle=void 0;var o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._glow=null,e._score=null,e}return r(e,t),e.prototype.onCreate=function(){var t=new Phaser.BitmapText(this._game,0,-5,"NumsBankGlow","0",e.FONT_SIZE,"center");t.anchor.set(.5,.5),this._glow=t;var i=new Phaser.BitmapText(this._game,0,0,"NumsPlayers","0",e.FONT_SIZE,"center");i.anchor.set(.5,.5),this._score=i;var n=new Phaser.Group(this._game,null);n.add(this._glow),n.add(this._score),this._visual=n},Object.defineProperty(e.prototype,"text",{set:function(t){var i;i=t<0||t>=e.NUM_TEXTS.length?(t>0?"+":"-")+t.toString():e.NUM_TEXTS[t],this._glow.text=i,this._score.text=i},enumerable:!1,configurable:!0}),e.FONT_SIZE=36,e.NUM_TEXTS=["+0","+1","+2","+3","+4","+5","+6","+7","+8","+9","+10","+11","+12","+13","+14","+15","+16","+17","+18","+19","+20","+21","+22","+23","+24","+25","+26","+27","+28","+29","+30","+31","+32","+33","+34","+35","+36","+37","+38","+39","+40","+41","+42","+43","+44","+45","+46","+47","+48","+49","+50","+51","+52","+53","+54","+55","+56","+57","+58","+59","+60","+61","+62","+63","+64","+65","+66","+67","+68","+69","+70","+71","+72","+73","+74","+75","+76","+77","+78","+79","+80","+81","+82","+83","+84","+85","+86","+87","+88","+89","+90","+91","+92","+93","+94","+95","+96","+97","+98","+99"],e}(i(8).Particle);e.ScoreParticle=o},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[i]}})}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),r=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||e.hasOwnProperty(i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(i(137),e)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Pool=void 0;var n=function(){function t(t,e,i){void 0===i&&(i=null),this.name="<no name>",this.debug=0,this._newFunction=null,this._count=0,this._pool=[],this._canGrow=!1,this._poolSize=0,this._classType=t,this._newFunction=i;for(var n=0;n<e;n++){var r=this.newItem();this._pool[this._count++]=r}this._poolSize=e}return t.prototype.spawn=function(){return 0===this._count?(this.debug,t.DEBUG_ALLOCATION,this._canGrow?this.newItem():null):(this.debug,t.DEBUG_CREATE,this._pool[--this._count])},t.prototype.despawn=function(e){this.debug,t.DEBUG_DESTROY,this._pool[this._count++]=e},Object.defineProperty(t.prototype,"newFunction",{set:function(t){this._newFunction=t},enumerable:!1,configurable:!0}),t.prototype.newItem=function(){return null!==this._newFunction?this._newFunction():new this._classType},Object.defineProperty(t.prototype,"canGrow",{set:function(t){this._canGrow=t},enumerable:!1,configurable:!0}),t.DEBUG_ALLOCATION=1,t.DEBUG_CREATE=2,t.DEBUG_DESTROY=4,t.DEBUG_ALL=7,t}();e.Pool=n},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.SpinnerSlice=void 0;var o=i(6),s=i(70),a=function(t){function e(e){var i=t.call(this,e,0,0)||this;return i._startAngle=0,i._targetAngle=0,i._startTint=16777215,i._targetTint=16777215,i._sliceAngle=0,i._sliceLeft=0,i._sliceRight=0,i._value=0,i._fromLeft=0,i._fromRight=0,i}return r(e,t),Object.defineProperty(e.prototype,"sliceAngle",{get:function(){return this._sliceAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliceLeft",{get:function(){return this._sliceLeft},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sliceRight",{get:function(){return this._sliceRight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(t){this._value=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fromLeft",{get:function(){return this._fromLeft},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fromRight",{get:function(){return this._fromRight},enumerable:!1,configurable:!0}),e.prototype.setSliceAngle=function(t,e){t=o.MathHelp.modulo(t,360),this._sliceAngle=t;var i=e/2;this.angle=t-i,this._sliceLeft=t-i,this._sliceRight=t+i},e.prototype.angleInside=function(t){var e=this._sliceLeft,i=this._sliceRight;return t>=e&&t<=i?(this._fromLeft=e-t,this._fromRight=i-t,!0):t>=e+360&&t<=i+360?(this._fromLeft=e+360-t,this._fromRight=i+360-t,!0):t>=e-360&&t<=i-360&&(this._fromLeft=e-360-t,this._fromRight=i-360-t,!0)},e.prototype.setTargetAngle=function(t){t=o.MathHelp.modulo(t,360),this._startAngle=this._sliceAngle,this._targetAngle=t},e.prototype.setTargetTint=function(t){this._startTint=this.tint,this._targetTint=t},e.prototype.interpolateAngle=function(t,e){var i=o.MathHelp.angleLinear(this._startAngle,this._targetAngle,t);this.setSliceAngle(i,e)},e.prototype.interpolateTint=function(t){this.tint=s.ColorUtils.interpolateTint(this._startTint,this._targetTint,t)},e}(Phaser.Sprite);e.SpinnerSlice=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RodsManager=void 0;var n,r=i(58),o=i(2),s=i(6);!function(t){t[t.NONE=0]="NONE",t[t.FLASH_SEQUENCE=1]="FLASH_SEQUENCE"}(n||(n={}));var a=function(){function t(t,e){this._rods=[],this._blueRods=[],this._purpleRods=[],this._state=n.NONE,this._duration=0,this._delay=0,this._time=0,this._index=0,this._count=0,this._direction=1,this._rodsCount=1;for(var i=o.Defs.RODS,s=0;s<i.length;s++){var a=new r.Rod(t,e,i[s]);this._rods.push(a),"wheel_lightbar_1_on"===i[s].frameOn?this._blueRods.push(a):this._purpleRods.push(a)}}return t.prototype.clear=function(){this._state=n.NONE},t.prototype.flashSequence=function(e,i,r,o,s){this.lightAll(!1),this._delay=void 0!==e?e:t.FLASH_SEQUENCE_DELAY,this._duration=void 0!==i?i:t.RODS_DURATION,this._count=void 0!==r?r:-1,this._direction=void 0!==r&&o?-1:1,this._rodsCount=void 0!==s?s:1,this._time=this._delay,this._index=0,this._state=n.FLASH_SEQUENCE},t.prototype.update=function(t){for(var e=0;e<this._rods.length;e++){var i=this._rods[e];i.updateFrame(t),i.updatePosition(t)}if(this._state!==n.NONE)for(this._time+=t;this._time>this._delay;){switch(this._state){case n.FLASH_SEQUENCE:this.doFlashSequence()}this._time-=this._delay}},t.prototype.setColor=function(t){for(var e=0;e<this._rods.length;e++)this._rods[e].setColor(t)},t.prototype.lightAll=function(t){this.clear();for(var e=0;e<this._rods.length;e++)t?this._rods[e].setOn(-1):this._rods[e].setOff()},t.prototype.doFlashSequence=function(){var t=this._index,e=Math.floor(this._rods.length/this._rodsCount),i=0;do{this._rods[t].setOn(this._duration),t=s.MathHelp.modulo(t+e*this._direction,this._rods.length),++i}while(i<this._rodsCount);this._index=s.MathHelp.modulo(this._index+this._direction,this._rods.length),this._count>0&&0===this._index&&0==--this._count&&this.clear()},t.RODS_DURATION=200,t.FLASH_SEQUENCE_DELAY=500,t}();e.RodsManager=a},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.SpinnerButton=void 0;var o=i(2),s=i(23),a=function(t){function e(e){var i=t.call(this,e,"Center","Sprites","wheel_button_off",!1,"wheel_button_on","wheel_button_on")||this;i._num=null,i._anim=null,i._animEnabled=!1;var n=e.cache.getFrameByName("Sprites","wheel_fg").sourceSizeW;i.setHitArea(new Phaser.Circle(0,0,.83*n)),i.scaleOnDown.set(.95);var r=e.add.sprite(0,0,"Sprites",0);return r.anchor.set(.5),i.button.addChild(r),i._num=r,i._anim=new s.SpriterGroup(e,o.Defs.SPRITER_ANIM_START_BUTTON,"Sprites","tts"),i.add(i._anim),i.hideNum(),i._anim.visible=!1,i}return r(e,t),Object.defineProperty(e.prototype,"animEnabled",{get:function(){return this._animEnabled},set:function(t){this._animEnabled=t},enumerable:!1,configurable:!0}),e.prototype.setNum=function(t){this._num.visible=!0,this._num.alpha=1,this._num.frameName=o.Defs.NUM_FRAMES_CENTER[t-1]},e.prototype.setNumAlpha=function(t){this._num.alpha=t},e.prototype.hideNum=function(){this._num.visible=!1},e.prototype.updateAnimation=function(){this._anim.visible&&this._anim.updateAnimation()},e.prototype.setAnimCharMap=function(t){this._anim.clearCharMaps(),t&&this._anim.pushCharMap("taptostart")},e.prototype.setAnimIdle=function(){this.setAnim("tts_idle")},e.prototype.clearAnim=function(){this._anim.visible=!1},e.prototype.setAnim=function(t){this._anim.visible=this._animEnabled,this._animEnabled&&this._anim.playAnimationByName(t)},e.prototype.overAction=function(){this.setAnim("tts_idle_mo")},e.prototype.outAction=function(){this.setAnimIdle()},e.prototype.downAction=function(){t.prototype.downAction.call(this),this.setAnim("tts_idle_mo_hit")},e.prototype.upAction=function(){this._anim.visible=!1,this._animEnabled=!1},e.prototype.cancelAction=function(){this.setAnimIdle()},e}(i(17).Button);e.SpinnerButton=a},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.SpinnerCenterNumber=void 0;var o=i(6),s=i(56),a=i(0),l=i(1),h=function(t){function e(e,i,n){var r=t.call(this,e,0,0,"Sprites")||this;return r._centerButton=null,r._value=0,r._delay=0,r._time=0,r._duration=0,r._savePosition=new Phaser.Point,r._saveAngle=0,r._saveScale=0,r._curve=null,r._doOnlyAlpha=!1,i.add(r),r._centerButton=n,r._curve=new s.BezierQuadratic,r.anchor.set(.5),r.visible=!1,r}return r(e,t),e.prototype.moveToCenter=function(t,i,n,r,a,l){this._value=a,null===r?this._doOnlyAlpha=!0:(this._doOnlyAlpha=!1,this.frameName=r),i=o.MathHelp.modulo(i,360),this._savePosition.set(t.x-this.parent.x,t.y-this.parent.y),this._saveAngle=i,this._saveScale=n,this.position.copyFrom(this._savePosition),this.angle=i,this.scale.set(n),this._curve.set(this._savePosition.x,this._savePosition.y,0,0,s.BeziereQuadraticDirection.RANDOM,.3,.25),this.visible=!this._doOnlyAlpha,this._time=0,this._duration=l?e.DURATION_FF:e.DURATION,this._delay=l?e.DELAY_FF:e.DELAY},e.prototype.updateMovement=function(t){if(this._delay>0)return this._delay-=t,this._delay<=0&&a.AudioUtils.playSound("number_leaves_wheel",l.Config.VOLUME_NUMBER_LEAVES_WHEEL),!0;this._time+=t;var e=Phaser.Math.clamp(this._time/this._duration,0,1),i=1===e;return this._doOnlyAlpha||this.updateMovingNumber(e),this.updateCenterAlpha(e),!i},e.prototype.updateMovingNumber=function(t){var e=this._curve.at(t);this.position.copyFrom(e),this.angle=o.MathHelp.angleLinear(this._saveAngle,0,t),this.scale.set(Phaser.Math.linear(this._saveScale,1,t))},e.prototype.updateCenterAlpha=function(t){var e=Phaser.Math.clamp(1-1.5*t,0,1);this._centerButton.setNumAlpha(e),1===t&&(this.visible=!1,this._doOnlyAlpha||this._centerButton.setNum(this._value),a.AudioUtils.playSound("number_arrives_at_wheel_center",l.Config.VOLUME_NUMBER_ARRIVES_AT_WHEEL_CENTER))},e.DELAY=375,e.DELAY_FF=500,e.DURATION=280,e.DURATION_FF=375,e}(Phaser.Sprite);e.SpinnerCenterNumber=h},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.Ticker=void 0;var o=i(1),s=i(6),a=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._bgLeft=null,n._bgCenter=null,n._bgRight=null,n._textGroup=null,n._text=null,n._textMask=null,n._bgLeftRed=null,n._bgCenterRed=null,n._bgRightRed=null,n._width=0,n._visibleWidth=0,n._startX=0,n._endX=0,n._currentX=0,n._isStatic=!1,n._running=!1,n._priority=-1,n._pulseAlpha=!1,n.createBg(),n._textGroup=new Phaser.Group(e,n),n.createText(),n.createMask(),n._textGroup.mask=n._textMask,n.onResize(e.width,e.height),n.interpolateColor(0),n}return r(e,t),Object.defineProperty(e.prototype,"running",{get:function(){return this._running},enumerable:!1,configurable:!0}),e.prototype.createBg=function(){this._bgLeft=this.game.add.sprite(0,0,"Sprites","ticker_bg_left",this),this._bgLeft.anchor.set(0,.5),this._bgCenter=this.game.add.sprite(0,0,"Sprites","ticker_bg_middle",this),this._bgCenter.anchor.set(0,.5),this._bgRight=this.game.add.sprite(0,0,"Sprites","ticker_bg_right",this),this._bgRight.anchor.set(0,.5),this._bgLeftRed=this.game.add.sprite(0,0,"Sprites","ticker_bg_left_red",this),this._bgLeftRed.anchor.set(0,.5),this._bgCenterRed=this.game.add.sprite(0,0,"Sprites","ticker_bg_middle_red",this),this._bgCenterRed.anchor.set(0,.5),this._bgRightRed=this.game.add.sprite(0,0,"Sprites","ticker_bg_right_red",this),this._bgRightRed.anchor.set(0,.5)},e.prototype.createText=function(){var t=new Phaser.BitmapText(this.game,0,0,"Ticker","",e.FONT_SIZE_TICKER,"left");t.anchor.set(0,.5),t.y=2,this._textGroup.add(t),this._text=t},e.prototype.createMask=function(){var t=this.game.add.graphics(0,0,this._textGroup);this._textMask=t},e.prototype.onResize=function(t,i){var n=2*(Math.floor(t/2)-o.Config.TICKER_X_OFFSET-82),r=n-2*this._bgLeft.width,s=-n/2;this._bgLeft.x=s,this._bgLeftRed.x=s,s+=this._bgLeft.width,this._bgCenter.x=s,this._bgCenter.width=r,this._bgCenterRed.x=s,this._bgCenterRed.width=r,s+=r,this._bgRight.x=s,this._bgRightRed.x=s,this.updateMask(n),this._width=n,this._visibleWidth=n-2*e.TICKER_BORDER,this._startX=n/2,this._endX=-n/2-this._text.textWidth},e.prototype.updateMask=function(t){var i=this._textMask;i.clear(),i.beginFill(16711680,1),i.drawRect(-t/2+e.TICKER_BORDER,-this._bgCenter.height/2,t-2*e.TICKER_BORDER,this._bgCenter.height),i.endFill()},e.prototype.text=function(t,i,n){if(void 0===n&&(n=!1),null===t&&(t=e.EMPTY,i=-1,this._pulseAlpha=!1),!(i<this._priority)){this._priority=i,this._pulseAlpha=n,this._text.scale.set(1,1),this._text.text=t;var r=this._text.textWidth;r<this._visibleWidth?this._isStatic=!0:r*e.SCALE_DOWN<this._visibleWidth?(this._text.scale.set(.688,.688),this._isStatic=!0):this._isStatic=!1,this._isStatic?this._text.x=-this._text.textWidth*this._text.scale.x/2:(this._endX=-this._width/2-this._text.textWidth,this._currentX=this._startX),this._running=!0,this.updateTicker(0)}},e.prototype.clear=function(){this._text.text=e.EMPTY,this._priority=-1,this._running=!1,this._pulseAlpha=!1},e.prototype.updateTicker=function(t){if(this._pulseAlpha){var e=Math.sin(Math.PI*s.MathHelp.pingPongNormalized(this.game.time.time,1e3));this._text.alpha=o.Config.INACTIVE_PLAYER_ALPHA+(1-o.Config.INACTIVE_PLAYER_ALPHA)*e}else this._text.alpha=1;null==this._text.text||0===this._text.text.length||this._isStatic||(this._currentX<this._endX&&(this._currentX=this._startX),this._currentX-=o.Config.TICKER_SPEED*t/1e3,this._text.x=this._currentX)},e.prototype.interpolateColor=function(t){var e=0===t,i=1===t;this._bgLeft.visible=this._bgCenter.visible=this._bgRight.visible=!i,this._bgLeftRed.visible=this._bgCenterRed.visible=this._bgRightRed.visible=!e;var n=Phaser.Math.clamp(1.25*(1-t),0,1),r=Phaser.Math.clamp(1.25*t,0,1);this._bgLeft.alpha=this._bgCenter.alpha=this._bgRight.alpha=n,this._bgLeftRed.alpha=this._bgCenterRed.alpha=this._bgRightRed.alpha=r},e.FONT_SIZE_TICKER=45,e.EMPTY="",e.TICKER_BORDER=22,e.SCALE_DOWN=.7,e}(Phaser.Group);e.Ticker=a},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=this&&this.__spreadArrays||function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),r=0;for(e=0;e<i;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,r++)n[r]=o[s];return n};Object.defineProperty(e,"__esModule",{value:!0}),e.GameResultDialog=void 0;var s=i(1),a=i(2),l=i(0),h=i(12),u=i(27),_=i(47),p=i(14),c=i(73),f=i(75),d=function(t){function e(e){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var r=t.apply(this,o([e],i))||this;return r.onButtonClicked=new Phaser.Signal,r._title=null,r._bg=null,r._place=null,r._skillChange=null,r._skillPanel=null,r._graph=null,r._nextSkill=null,r._showNextSkill=!1,r._buttonsCointainer=null,r._btnStats=null,r._btnReplay=null,r._currentSkillScore=0,r._newSkillScore=0,r._title=r.createTitle(l.TextUtils.getText("DIALOG_RESULTS_TITLE")),r._bg=e.add.sprite(0,0,"Sprites","results_bgbox",r._dialogContainer),r._bg.anchor.set(.5,.5),r._place=r.createPlace(),r._skillChange=r.createSkillChange(),r._skillPanel=new _.SkillPanel(e,r._dialogContainer,"SlantPure",_.SkillPanel.TINT_DARK),r._skillPanel.scale.set(.77),r._graph=r.createGraph(),r._nextSkill=r.createNextSkillText(),r._buttonsCointainer=new Phaser.Group(e,r),r._btnStats=r.createButton("Stats","dia_button","BUTTON_STATS"),r._btnReplay=r.createButton("Replay","button_green","DIALOG_REPLAY"),r.setPositions(),r.activateButtons(!1,!1),r}return r(e,t),e.prototype.createBg=function(t){this._dialogBg=new Phaser.Sprite(this.game,0,0,"Bg"),this._dialogBg.anchor.set(.5),this._dialogContainer.add(this._dialogBg),this._height=this._dialogBg.height,this._width=this._dialogBg.width},e.prototype.createTitle=function(t){var i=new Phaser.BitmapText(this.game,0,0,"SlantPure",t,e.TITLE_FONT_SIZE,"center");return i.anchor.set(.5,0),this._dialogContainer.add(i),i},e.prototype.createPlace=function(){var t=new Phaser.BitmapText(this.game,0,0,e.RESULT_FONT,"",e.RESULT_FONT_SIZE,"center");return t.anchor.set(.5,0),this._dialogContainer.add(t),t},e.prototype.createSkillChange=function(){var t=new Phaser.BitmapText(this.game,0,0,e.RESULT_FONT_SMALL,"",e.RESULT_FONT_SIZE_SMALL,"center");return t.anchor.set(.5,0),this._dialogContainer.add(t),t},e.prototype.createGraph=function(){return new c.LineGraphWithLimits(this.game,e.GRAPH_WIDTH,e.GRAPH_HEIGHT,f.GraphDefs.lineGraphStyle,this._dialogContainer)},e.prototype.createNextSkillText=function(){var t=new Phaser.BitmapText(this.game,0,0,e.RESULT_FONT_SMALL,"",e.RESULT_FONT_NEXT_SKILL,"center");return t.anchor.set(.5,0),this._dialogContainer.add(t),t},e.prototype.createButton=function(t,e,i){var n=new h.ChoiceButton(this.game,t,e,i);return n.onClick.add(this.onBtnClick,this),this._buttonsCointainer.add(n),n},e.prototype.setPositions=function(){var t=-Math.floor(this._height/2);this._dialogContainer.x=s.Config.WHEEL_X_OFFSET,this._dialogContainer.y=s.Config.WHEEL_Y_OFFSET,this._bg.y=-96,this._graph.x=-e.GRAPH_WIDTH/2;var i=t+70;this._title.position.y=i,i+=67,this._place.y=i,i+=40,this._skillChange.y=i,i+=86,this._skillPanel.y=i,i+=60,this._graph.y=i,i+=e.GRAPH_HEIGHT+10,this._nextSkill.y=i,this._buttonsCointainer.x=this._dialogContainer.x,this._buttonsCointainer.y=this.game.height/2+70,this._btnStats.position.x=95,this._btnReplay.position.x=-95},e.prototype.pop=function(t){return-.523606798*t*t+.723606798*t+.8},e.prototype.createTweens=function(t){this._tweenInPosition=t.add.tween(this).to({containerScale:1,containerAlpha:1},u.DialogBase.TWEEN_DURATION,Phaser.Easing.Linear.None,!1,u.DialogBase.TWEEN_DURATION),this._tweenInPosition.onComplete.add(this.onShownComplete,this),this._tweenOutPosition=t.add.tween(this).to({containerScale:0,containerAlpha:0},u.DialogBase.TWEEN_DURATION,Phaser.Easing.Linear.None,!1),this._tweenOutPosition.onComplete.add(this.onHideComplete,this)},e.prototype.activateButtons=function(t,e){this.enableInput(t),this._btnStats.setActive(e),this._btnReplay.setActive(e)},e.prototype.onBtnClick=function(t){this.onButtonClicked.dispatch(t)},e.prototype.setPlaceAndScore=function(t,i,n,r){var o=l.TextUtils.getText("DIALOG_RESULTS_RESULT"),h=(i?l.TextUtils.getText("PLACE_TIE"):"")+l.TextUtils.getText(a.Defs.PLACE_TEXTS_SHORT[t]),u=(r>0?"+":"")+r;this._place.text=l.StringUtils.format(o,h);var _=l.TextUtils.getText(r>=0?"DIALOG_RESULTS_GAINED":"DIALOG_RESULTS_LOST");this._skillChange.text=l.StringUtils.format(_,u),this._skillPanel.setScore(n,!1),this._graph.setValues(f.GraphDefs.lineGraphValues),this._graph.animationRunning=!1,this._currentSkillScore=n,this._newSkillScore=n+r;var c=p.Skill.getNextSkillLimit(this._newSkillScore);this._showNextSkill=-1!==c,this._showNextSkill&&(this._nextSkill.text=l.StringUtils.format(l.TextUtils.getText("DIALOG_RESULTS_NEXT_LIMIT"),c-this._newSkillScore,p.Skill.getNameForScore(c))),this._place.visible=!1,this._skillPanel.visible=!1,this._skillChange.visible=!1,this._graph.visible=!1,this._nextSkill.visible=!1,l.AudioUtils.playSound("results_screen_ding",s.Config.VOLUME_RESULTS_SCREEN_DING),this.game.time.events.add(e.RESULT_DELAY,this.onResultDelay,this)},e.prototype.onResultDelay=function(){this._place.visible=!0,this._skillChange.visible=!0,this.game.time.events.add(e.SKILL_DELAY,this.onSkillDelay,this)},e.prototype.onSkillDelay=function(){this._skillPanel.visible=!0,l.AudioUtils.playSound("results_screen_ding",s.Config.VOLUME_RESULTS_SCREEN_DING);this._newSkillScore!==this._currentSkillScore&&this.game.time.events.add(500,(function(){this._newSkillScore>this._currentSkillScore?l.AudioUtils.playSound("game_end_rating_goes_up",s.Config.VOLUME_GAME_END_RATING_GOES_UP):l.AudioUtils.playSound("game_end_rating_goes_down",s.Config.VOLUME_GAME_END_RATING_GOES_DOWN)}),this),this.game.add.tween(this._skillPanel).to({value:this._newSkillScore},e.SKILL_DURATION,Phaser.Easing.Linear.None,!0,500).onComplete.addOnce((function(){this.game.time.events.add(e.GRAPH_DELAY,(function(){this.animateGraph()}),this)}),this)},e.prototype.animateGraph=function(){var t=this._height/2+50;this._graph.visible=!0,this._graph.animationRunning=!0,this._nextSkill.visible=!0,l.AudioUtils.playSound("results_screen_ding",s.Config.VOLUME_RESULTS_SCREEN_DING),this.game.time.events.add(750,(function(){this.activateButtons(!0,!0),this.tweenButtons(t)}),this)},e.prototype.tweenButtons=function(t,e){return void 0===e&&(e=0),this.game.add.tween(this._buttonsCointainer).to({y:t},450,Phaser.Easing.Quadratic.Out,!0,e)},e.prototype.hideDialog=function(){this.enableInput(!1),this.tweenButtons(this.game.height/2+70,150).onComplete.addOnce((function(){this.hide()}),this)},e.prototype.enableInput=function(e){t.prototype.enableInput.call(this,e),this._btnStats.setEnabled(e),this._btnStats.button.input.priorityID=this.priority+1,this._btnReplay.setEnabled(e),this._btnReplay.button.input.priorityID=this.priority+1},e.TITLE_FONT_SIZE=36,e.RESULT_FONT="FontButtonsBg",e.RESULT_FONT_SMALL="FontButtonsBg",e.RESULT_FONT_SIZE=30,e.RESULT_FONT_SIZE_SMALL=24,e.RESULT_FONT_NEXT_SKILL=16,e.GRAPH_WIDTH=260,e.GRAPH_HEIGHT=120,e.RESULT_DELAY=375,e.SKILL_DELAY=375,e.SKILL_DURATION=500,e.GRAPH_DELAY=375,e}(u.DialogBase);e.GameResultDialog=d},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.LineGraph=void 0;var o=function(t){function e(e,i,n,r,o){var s=t.call(this,e,i,n,r,o)||this;return s._points=[],s._fill=null,s._graphRect=new Phaser.Rectangle,s._minYRange=0,s._maxYRange=0,s}return r(e,t),e.prototype.createValues=function(){var t=this.style;void 0!==t.fillArea&&(this._fill=this.game.add.graphics(0,0,this));for(var i=[],n=0;n<e.POINTS_MAX;n++){var r=this.game.add.sprite(0,0,t.atlas,t.lineSprite,this);r.anchor.set(0,.5),r.tint=void 0===t.lineTint?16777215:t.lineTint,i.push(r)}for(n=0;n<e.POINTS_MAX;n++){var o=this.game.add.sprite(0,0,t.atlas,t.pointSprite,this);o.anchor.set(.5),o.tint=void 0===t.pointTint?16777215:t.pointTint;var s=i[n],a=null;t.showLabels&&((a=new Phaser.BitmapText(this.game,0,0,t.fontStyle.name,"",t.fontStyle.size,"center")).anchor.set(.5,1),this.add(a)),this._points.push({sprite:o,lineToNext:s,label:a,value:0})}},e.prototype.setMainArea=function(t){for(var e=this.style,i=0;i<this._points.length;i++){var n=this._points[i].label;n&&(n.visible=e.showLabels)}},e.prototype.getYForValue=function(t){var e=this._graphRect;return Phaser.Math.mapLinear(t,this._minYRange,this._maxYRange,e.y+e.height,e.y)},e.prototype.arrangeValues=function(t){this._graphRect.copyFrom(t),this._minYRange=this.hasVerticalAxisValues?this.values.axisVertical.min:0,this._maxYRange=this.hasVerticalAxisValues?this.values.axisVertical.max:this.getMaxValue(),this.hasHorizontalAxis&&this.sendToBack(this._horizontalAxis),this.hasVerticalAxis&&this.sendToBack(this._verticalAxis);for(var i=this.style,n=this.calculateXStep(t.width,this._points.length),r=t.x,o=0;o<this.values.values.length;o++){var s=this._points[o],a=r+n*o,l=this.getYForValue(this.values.values[o]);s.sprite.position.set(a,l),s.sprite.visible=!0,s.value=l,i.showLabels&&(s.label.position.set(a,l),s.label.text=this.getValueString(this.values.values[o]),s.label.visible=!0)}for(o=0;o<this.values.values.length;o++){s=this._points[o];if(o<this.values.values.length-1){var h=s.sprite.position,u=this._points[o+1].sprite.position,_=s.lineToNext;_.position.copyFrom(h),_.rotation=Phaser.Math.angleBetweenPoints(h,u),_.width=Phaser.Math.distance(h.x,h.y,u.x,u.y),_.visible=!0}else s.lineToNext.visible=!1}for(o=this.values.values.length;o<e.POINTS_MAX;o++){(s=this._points[o]).label&&(s.label.visible=!1),s.lineToNext.visible=s.sprite.visible=!1}return void 0!==i.fillArea&&i.fillArea&&this.arrangeAreaUnderLine(),t},e.prototype.arrangeAreaUnderLine=function(){var t=this.style.fillColor;void 0===t&&(t=8421504);var e=Math.ceil(this._graphRect.y+this._graphRect.height),i=this._fill;i.clear(),i.beginFill(t),i.moveTo(this._points[0].sprite.x,e);for(var n=0;n<this.values.values.length;n++){var r=this._points[n].sprite;i.lineTo(r.x,r.y)}i.lineTo(this._points[this.values.values.length-1].sprite.x,e),i.endFill()},e.prototype.calculateXStep=function(t,e){var i=this.style;return void 0!==i.minPointsHorizontally&&(e=Math.max(i.minPointsHorizontally,e)),t/Math.max(1,e-1)},e.prototype.getMaxValue=function(){for(var t=this.values.values,e=Number.MIN_VALUE,i=0;i<t.length;i++)t[i]>e&&(e=t[i]);return e},e.prototype.animateValues=function(t){},e.POINTS_MAX=10,e}(i(74).Graph);e.LineGraph=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.eUnit=e.eAlignV=e.eAlignH=void 0,function(t){t[t.LEFT=0]="LEFT",t[t.CENTER=1]="CENTER",t[t.RIGHT=2]="RIGHT"}(e.eAlignH||(e.eAlignH={})),function(t){t[t.TOP=0]="TOP",t[t.CENTER=1]="CENTER",t[t.BOTTOM=2]="BOTTOM"}(e.eAlignV||(e.eAlignV={})),function(t){t[t.PX=0]="PX",t[t.PERCENT=1]="PERCENT"}(e.eUnit||(e.eUnit={}))},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.GraphAxis=void 0;var o=function(t){function e(e,i,n,r){var o=t.call(this,e,r)||this;return o._vertical=!1,o._style=null,o._values=null,o._axisSprite=null,o._stepSprites=[],o._stepValues=[],o._style=i,o._vertical=n,o.createSteps(),o.createAxisSprite(),o}return r(e,t),Object.defineProperty(e.prototype,"stepAtOrigin",{get:function(){return void 0!==this._style.stepAtOrigin&&this._style.stepAtOrigin},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"valueAtOrigin",{get:function(){return void 0!==this._style.valueAtOrigin&&this._style.valueAtOrigin},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"values",{get:function(){return this._values},set:function(t){this._values=t,this.resetValues(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"axisLength",{get:function(){return this._axisLength},enumerable:!1,configurable:!0}),e.prototype.createSteps=function(){for(var t=this._style,e=0;e<=t.stepsCount;e++){var i;i=this.createStepSprite(t,void 0!==t.tint?t.tint:16777215),this._stepSprites.push(i);var n;n=this.createStepValue(t.fontStyle),this._stepValues.push(n)}},e.prototype.createStepSprite=function(t,e){var i=this.game.add.sprite(0,0,t.atlas,t.stepsSprite,this);return i.anchor.x=.5,this._vertical&&(i.anchor.y=1,i.angle=-90),i},e.prototype.createStepValue=function(t){var e=this._vertical,i=new Phaser.BitmapText(this.game,0,0,t.name,"",t.size,e?"right":"center");return e?i.anchor.set(1,.5):i.anchor.set(.5,0),i.tint=void 0!==t.tint?t.tint:16777215,this.add(i),i},e.prototype.createAxisSprite=function(){var t=this._style,e=this._vertical;this._axisSprite=this.game.add.sprite(0,0,t.atlas,t.axisSprite,this),this._axisSprite.tint=void 0!==t.tint?t.tint:16777215,e&&(this._axisSprite.anchor.y=1,this._axisSprite.angle=-90)},e.prototype.resetValues=function(t){for(var e=this._style,i=(t.max-t.min)/e.stepsCount,n=null!=e.customValues,r=0;r<this._stepValues.length;r++){var o=void 0;if(n)o=r>0?e.customValues[r-1]:"";else o=(i*r).toFixed(e.decimalPlaces),null!=e.appendCharacter&&(o+=e.appendCharacter);this._stepValues[r].text=o}},Object.defineProperty(e.prototype,"spaceTaken",{get:function(){for(var t=0,i=0,n=0;n<this._stepValues.length;n++){var r=this._stepValues[n];r.textWidth>t&&(t=r.textWidth),r.textHeight>i&&(i=r.textHeight)}var o=this._vertical?t:i;return o+=this.game.cache.getFrameByName(this._style.atlas,this._style.stepsSprite).sourceSizeH,o+=this.game.cache.getFrameByName(this._style.atlas,this._style.axisSprite).sourceSizeH,this._vertical&&(o+=e.VERTICAL_VALUES_SPACING),Math.ceil(o)},enumerable:!1,configurable:!0}),e.prototype.arrangeAxis=function(t,e,i){this._axisLength=i,this._vertical?this.arrangeVerticalAxis(t,e,i):this.arrangeHorizontalAxis(t,e,i)},e.prototype.arrangeVerticalAxis=function(t,i,n){var r=this._style,o=this.game.cache.getFrameByName(r.atlas,r.stepsSprite).sourceSizeH,s=this.game.cache.getFrameByName(r.atlas,r.stepsSprite).sourceSizeW,a=this.game.cache.getFrameByName(r.atlas,r.axisSprite).sourceSizeH,l=r.axisOverflow||0;this._axisSprite.position.set(t,i+l+a),this._axisSprite.width=l+a+n+s/2;for(var h=t-a,u=h-o-e.VERTICAL_VALUES_SPACING,_=r.shiftStepsByPercent||0,p=r.shiftValuesByPercent||0,c=r.offsetValuesX||0,f=r.offsetValuesY||0,d=0;d<=r.stepsCount;d++){var g=i-n/r.stepsCount*d,y=this._stepSprites[d];y.position.set(h,g-n/r.stepsCount*_),0===d&&!this.stepAtOrigin||!r.showSteps?y.visible=!1:y.visible=!0;var m=this._stepValues[d];m.position.set(u+c,g-n/r.stepsCount*p+f),0===d&&!this.valueAtOrigin||!r.showValues?m.visible=!1:m.visible=!0}},e.prototype.arrangeHorizontalAxis=function(t,e,i){var n=this._style,r=this.game.cache.getFrameByName(n.atlas,n.stepsSprite).sourceSizeH,o=this.game.cache.getFrameByName(n.atlas,n.stepsSprite).sourceSizeW,s=this.game.cache.getFrameByName(n.atlas,n.axisSprite).sourceSizeH,a=n.axisOverflow||0;this._axisSprite.position.set(t-a-s,e),this._axisSprite.width=a+s+i+o/2;for(var l=e+s,h=l+r,u=n.shiftStepsByPercent||0,_=n.shiftValuesByPercent||0,p=n.offsetValuesX||0,c=n.offsetValuesY||0,f=0;f<=n.stepsCount;f++){var d=t+i/n.stepsCount*f,g=this._stepSprites[f];g.position.set(d+i/n.stepsCount*u,l),0===f&&!this.stepAtOrigin||!n.showSteps?g.visible=!1:g.visible=!0;var y=this._stepValues[f];y.position.set(d+i/n.stepsCount*_+p,h+c),0===f&&!this.valueAtOrigin||!n.showValues?y.visible=!1:y.visible=!0}},e.VERTICAL_VALUES_SPACING=2,e}(Phaser.Group);e.GraphAxis=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListenerList=void 0;var n=function(){function t(){this._listeners=[]}return Object.defineProperty(t.prototype,"listeners",{get:function(){return this._listeners},enumerable:!1,configurable:!0}),t.prototype.add=function(t){this.has(t)||this._listeners.push(t)},t.prototype.remove=function(t){for(var e=this._listeners.length-1;e>=0;e--)this._listeners[e]===t&&(this._listeners[e]=this._listeners[this._listeners.length-1],--this._listeners.length)},t.prototype.removeAll=function(){this._listeners.length=0},t.prototype.has=function(t){for(var e=0;e<this._listeners.length;e++)if(this._listeners[e]===t)return!0;return!1},t}();e.ListenerList=n},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.KineticScrollerUpdater=void 0;var o=function(t){function e(e,i){void 0===i&&(i=325);var n=t.call(this,e)||this;return n._timeConstant=325,n._timeConstant=i,n}return r(e,t),e.prototype.calculateCurrentOffset=function(t){var e=this._game.time.time-this._startTime;return this._currentOffset.set(this._initialOffset.x*Math.exp(-e/this._timeConstant),this._initialOffset.y*Math.exp(-e/this._timeConstant)),Math.abs(this._currentOffset.x)<.5&&Math.abs(this._currentOffset.y)<.5&&(this._currentOffset.set(0,0),this._finished=!0),this._currentOffset},e}(i(149).AbstractScrollerUpdater);e.KineticScrollerUpdater=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractScrollerUpdater=void 0;var n=function(){function t(t){this._game=null,this._finished=!0,this._startTime=0,this._initialOffset=new Phaser.Point,this._currentOffset=new Phaser.Point,this._game=t}return Object.defineProperty(t.prototype,"finished",{get:function(){return this._finished},set:function(t){this._finished=t},enumerable:!1,configurable:!0}),t.prototype.reset=function(t,e){this._initialOffset.set(t,e),this._startTime=this._game.time.time,this._finished=0===t&&0===e},t.prototype.update=function(t){return this._finished?(this._currentOffset.set(0,0),this._currentOffset):this.calculateCurrentOffset(t)},t}();e.AbstractScrollerUpdater=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultScrollSnapper=void 0;var n=function(){function t(){}return Object.defineProperty(t.prototype,"ignoreSmallDistances",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ignoreWhenLongDelay",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.snapOffset=function(t,e){return e},t}();e.DefaultScrollSnapper=n},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractScrollBar=void 0;var o=i(49),s=function(t){function e(i,n,r,s){var a=t.call(this,i,n)||this;return a._isHorizontal=!0,a._policy=o.ScrollBarPolicy.ALWAYS,a._minThumbLength=0,a._trackLength=0,a._thumbLength=0,a._screens=1,a._percent=0,a._marginStart=0,a._marginEnd=0,void 0===s&&(s=e.MIN_THUMB_LENGTH),a._minThumbLength=s,a._isHorizontal=r,a}return r(e,t),Object.defineProperty(e.prototype,"isHorizontal",{get:function(){return this._isHorizontal},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"policy",{get:function(){return this._policy},set:function(t){this._policy=t,this.resize()},enumerable:!1,configurable:!0}),e.prototype.setMargin=function(t,e){this._marginStart=t,this._marginEnd=e},e.prototype.resize=function(){var t;switch(this._policy){case o.ScrollBarPolicy.ALWAYS:t=!0;break;case o.ScrollBarPolicy.NEVER:t=!1;break;case o.ScrollBarPolicy.WHEN_NEEDED:t=this._screens>1}this.exists=this.visible=t},e.prototype.onDimensionsChange=function(t){this._isHorizontal?(this._trackLength=t.viewSize.x-this._marginStart-this._marginEnd,this._thumbLength=Math.max(this._minThumbLength,this._trackLength/t.horizontalScreens),this._screens=t.horizontalScreens):(this._trackLength=t.viewSize.y-this._marginStart-this._marginEnd,this._thumbLength=Math.max(this._minThumbLength,this._trackLength/t.verticalScreens),this._screens=t.verticalScreens),this.resize()},e.prototype.onPositionChange=function(t,e,i){},e.prototype.onViewMove=function(t,e,i){this._percent=this._isHorizontal?e:i,this.resize()},e.MIN_THUMB_LENGTH=128,e}(Phaser.Group);e.AbstractScrollBar=s},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.DialogTab=void 0;var o=i(17),s=i(0),a=i(28),l=function(t){function e(i,n,r,o,l){void 0===l&&(l=0);var h=t.call(this,i,n,"Sprites",r,r)||this;return h._title=null,h._normalText=null,h._boldText=null,h._button.anchor.set(0,0),h._normalText=s.TextUtils.getText(o),h._boldText="|b"+h._normalText+"|~b",h._title=new a.AdvancedBitmapText(i,0,0,e.TEXT_FONT_FACE,h._normalText,e.TEXT_FONT_SIZE,"center"),h._title.position.set(h._button.width/2+l,26),h._title.anchor.set(.5,.5),h.add(h._title),h.setHitArea(new Phaser.Rectangle(0,-h.button.height,h.button.width,2*h.button.height)),h.setToggleTint(),h}return r(e,t),e.prototype.downEvent=function(){this.setButton(this._over,!0),this.toggled||this.downAction(),this.changeOnDown&&(this.toggled=!0),this.onDown.dispatch(this,this.toggled),this.setToggleTint()},e.prototype.setToggleTint=function(){this._button.tint=this.toggled?16777215:8421504,this._title.tint=this.toggled?16777215:8421504},e.prototype.setBold=function(){this.toggled?this._title.text=this._boldText:this._title.text=this._normalText},e.prototype.setTabToggled=function(t){this.toggled=t,this.setToggleTint(),this.setBold()},e.TEXT_FONT_FACE="FontTiny",e.TEXT_FONT_SIZE=26,e}(o.Toggle);e.DialogTab=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedDialogBg=void 0;var n=i(46),r=function(){function t(t,e,i){this._bmd=null,this._width=e,this._height=i,this._bmd=n.NineImage.create(t,e,i,"Sprites","dia_ninepatch",40,40,40,40,!1,!0,!0)}return Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bmd",{get:function(){return this._bmd},enumerable:!1,configurable:!0}),t.prototype.destory=function(){null!==this._bmd&&(this._bmd.destroy(),this._bmd=null)},t}();e.SharedDialogBg=r},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.PieGraph=void 0;var o=function(t){function e(e,i,n){var r=t.call(this,e,n)||this;return r._graph=null,r._bmd=null,r._lines=[],r._labels=[],r._radius=0,r._radius=i,r.createParts(),r.onDestroy.add((function(){null!==this._bmd&&(this._bmd.destroy(),this._bmd=null)}),r),r}return r(e,t),Object.defineProperty(e.prototype,"animationRunning",{get:function(){return this._animationRunning},set:function(t){this._animationRunning=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"animationDelay",{get:function(){return this._animDelay},set:function(t){this._animDelay=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"values",{get:function(){return this._values},set:function(t){this._values=t,this.resetValues(t)},enumerable:!1,configurable:!0}),e.prototype.createParts=function(){this._bmd=this.game.make.bitmapData(2*this._radius,2*this._radius),this._graph=this.game.add.sprite(0,0,this._bmd,0,this),this._graph.anchor.set(.5,.5);for(var t=0;t<3;t++){var i=this.game.add.sprite(0,0,"Sprites","graphAxis",this);i.anchor.set(0,.5),i.tint=7493068,this._lines.push(i);var n=new Phaser.BitmapText(this.game,0,0,"FontTiny",e.LABELS[t],18,"center");n.anchor.set(.5,.5),this.add(n),this._labels.push(n)}},e.prototype.resetValues=function(t){this._bmd.clear;var i=this._bmd.context,n=this._radius,r=2*Math.PI/1080,o=-Math.PI/2;if(t[0]+t[1]+t[2]!==0){var s=0;for(O=0;O<t.length;O++){var a=this._labels[O],l=this._lines[O],h=t[O]*Math.PI*2;if(h<1e-4)l.visible=!1,a.visible=!1;else{i.fillStyle=e.COLORS[O],i.beginPath(),i.moveTo(n,n),i.arc(n,n,n,o-r,o+h+2*r,!1),i.closePath(),i.fill(),l.visible=!0,a.visible=!0;var u=Math.round(100*t[O]);O!==t.length-1?s+=u:u=100-s,a.text=e.LABELS[O]+" ("+u+"%)";var _=a.textWidth,p=o+h/2,c=Math.cos(p),f=Math.sin(p),d=c*(n+7),g=f*(n+7),y=2*d,m=2*g,v=y-d,T=m-g,b=void 0,S=void 0;_*Math.abs(T)<14*Math.abs(v)?S=T*(b=Phaser.Math.sign(v)*_/2)/v:b=v*(S=14*Phaser.Math.sign(T)/2)/T,y=d+c*(e.LINE_LENGTH+8)+b,m=g+f*(e.LINE_LENGTH+8)+S,l.rotation=p,l.height=2,l.width=e.LINE_LENGTH,l.position.set(d,g),a.position.set(d+(20+_/2)*Math.cos(p),g+31*Math.sin(p)),o+=h}}this.drawCircle(i,n,n,n/2,e.COLOR_INNER),this._bmd.dirty=!0,this.setAnimation(),this.animateValues(this._animationRunning?0:1)}else{this.drawCircle(i,n,n,n,e.COLOR_OUTER),this.drawCircle(i,n,n,n/2,e.COLOR_INNER);for(var O=0;O<t.length;O++)this._lines[O].visible=this._labels[O].visible=!1;this._bmd.dirty=!0}},e.prototype.drawCircle=function(t,e,i,n,r){t.fillStyle=r,t.beginPath(),t.arc(e,i,n,0,2*Math.PI,!1),t.closePath(),t.fill()},e.prototype.animateValues=function(t){},e.prototype.setAnimation=function(){this._animationRunning=!0,this._animationRunning&&(this._animDelay=300,this._animDuration=300,this._animElapsed=0)},e.prototype.update=function(){this._animationRunning&&this.updateAnimation()},e.prototype.updateAnimation=function(){var t=this.game.time.elapsedMS;if(this._animDelay>0)this._animDelay=Math.max(0,this._animDelay-t);else{this._animElapsed=this._animElapsed+t,this._animDuration;var e=Phaser.Math.clamp(this._animElapsed/this._animDuration,0,1),i=-.4*e*e+.4*e+1;this.scale.set(i,i),this._animElapsed>=this._animDuration&&(this._animationRunning=!1)}},e.DEFAULT_ANIMATION_DURATION=1e3,e.COLORS=["#867DF6","#27A9EE","#EFD538"],e.LABELS=["HIGHER","BANK","LOWER"],e.LINE_LENGTH=15,e.COLOR_OUTER="#0D0E27",e.COLOR_INNER="#15173A",e}(Phaser.Group);e.PieGraph=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.TopCompetitor=void 0;var o=i(0),s=i(2),a=i(3),l=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._portraitGroup=null,n._portraitBg=null,n._portrait=null,n._portraitFrame=null,n._name=null,n._winsNum=null,n._winsLabel=null,n.createElements(),n}return r(e,t),e.prototype.createElements=function(){this._portraitGroup=new Phaser.Group(this.game,this),this._portraitBg=this.game.add.sprite(0,0,"Sprites","stats_portrait_bg",this._portraitGroup),this._portraitBg.anchor.set(.5),this._portrait=this.game.add.sprite(0,3,"Sprites",0,this._portraitGroup),this._portrait.anchor.set(.5),this._portraitFrame=this.game.add.sprite(0,0,"Sprites","stats_portrait_fg",this._portraitGroup),this._portraitFrame.anchor.set(.5),this._name=new Phaser.BitmapText(this.game,0,0,e.TEXT_FONT,"",e.TEXT_FONT_SIZE,"center"),this._name.anchor.set(.5,0),this._name.tint=10577919,this.add(this._name),this._winsLabel=new Phaser.BitmapText(this.game,0,0,e.TEXT_FONT,o.TextUtils.getText("COMPETITOR_WINS"),e.TEXT_FONT_SIZE,"center"),this._winsLabel.anchor.set(.5,0),this.add(this._winsLabel),this._winsNum=new Phaser.BitmapText(this.game,0,0,e.WIN_FONT,"",e.WIN_FONT_SIZE,"center"),this.add(this._winsNum)},e.prototype.setCompetitor=function(t){-1===t?this.setEmpty():this.setElements(t)},e.prototype.setEmpty=function(){this._portraitGroup.visible=!1,this._name.visible=!1,this._winsLabel.visible=!1,this._winsNum.text=o.TextUtils.getText("COMPETITOR_NONE"),this._winsNum.anchor.set(.5,.5),this._winsNum.position.set(0,0),this._winsNum.tint=10577919},e.prototype.setElements=function(t){var e=s.Defs.PLAYER_DEFS[t-1];this._portrait.frameName=e.iconFrame,this._portraitGroup.visible=!0,this._name.visible=!0,this._name.text=e.name,this._winsLabel.visible=!0,this._winsLabel.text=1===a.App.settings.data.playerWins[t]?o.TextUtils.getText("COMPETITOR_WINS_ONE"):o.TextUtils.getText("COMPETITOR_WINS"),this._winsNum.text=a.App.settings.data.playerWins[t].toString(),this._winsNum.tint=16763977,this._winsNum.anchor.set(.5,1);var i=this._portraitFrame.width,n=Math.max(this._winsLabel.textWidth,this._winsNum.textWidth),r=-(i+16+n)/2;this._portraitGroup.position.set(r+i/2,-13),this._name.position.set(0,24),r+=i+16+n/2,this._winsLabel.position.set(r,-1),this._winsNum.position.set(r,8)},e.TEXT_FONT="FontTiny",e.TEXT_FONT_SIZE=18,e.WIN_FONT="FontMedium",e.WIN_FONT_SIZE=40,e}(Phaser.Group);e.TopCompetitor=l},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.VerticalBarsGraphWithShadows=void 0;var o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._shadows=[],e}return r(e,t),e.prototype.createValues=function(){for(var e=0;e<8;e++){var i=this.game.add.sprite(0,0,"Sprites","graphBar",this);i.tint=855591,i.anchor.set(.5,1),this._shadows.push(i)}t.prototype.createValues.call(this)},e.prototype.arrangeValues=function(e){t.prototype.arrangeValues.call(this,e);for(var i=0;i<this._shadows.length;i++){var n=this._shadows[i],r=this._bars[i].sprite;n.position.copyFrom(r.position),n.y-=.5,n.x+=.5,n.height=e.height-1,n.width=r.width-1}return e},e.prototype.setLabelPosition=function(t,e,i){t.position.set(e,this._height-4)},e}(i(157).VerticalBarsGraph);e.VerticalBarsGraphWithShadows=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.VerticalBarsGraph=void 0;var o=i(74),s=i(76),a=function(t){function e(e,i,n,r,o){var s=t.call(this,e,i,n,r,o)||this;return s._bars=[],s}return r(e,t),e.prototype.createValues=function(){for(var t=this.style,e=0;e<this.values.values.length;e++){var i=this.game.add.sprite(0,0,t.atlas,this.getBarSpriteFrame(t,e),this);i.tint=this.getBarSpriteTint(t,e),i.anchor.set(.5,1);var n=new Phaser.BitmapText(this.game,0,0,t.fontStyle.name,"",t.fontStyle.size,"center");n.anchor.set(.5,1),this.add(n),this._bars.push({sprite:i,label:n,height:0})}},e.prototype.getBarSpriteFrame=function(t,e){return"string"==typeof t.barSprites?t.barSprites:t.barSprites[e]},e.prototype.getBarSpriteTint=function(t,e){return null==t.barTints||e>=t.barTints.length?16777215:t.barTints[e]},e.prototype.setMainArea=function(t){for(var e=this.style,i=0;i<this._bars.length;i++){this._bars[i].label.visible=e.showLabels}},e.prototype.arrangeValues=function(t){var e=this.style,i=t.width/this._bars.length,n=t.x+i/2,r=i*(1-e.barSpacingPercent),o=t.y+t.height,s=this.hasVerticalAxisValues?this.values.axisVertical.min:0,a=this.hasVerticalAxisValues?this.values.axisVertical.max:this.getMaxValue();this._minBarY=0,this._maxBarY=t.height;for(var l=0;l<this._bars.length;l++){var h=this._bars[l],u=n+i*l,_=h.sprite;_.position.set(u,o),_.width=r,_.height=0;var p=this.calculateBarHeightRatio(this.values.values[l],s,a)*t.height;h.height=Math.round(p),e.showLabels&&this.setLabelPosition(h.label,u,o)}return t},e.prototype.setLabelPosition=function(t,e,i){t.position.set(e,i)},e.prototype.animateValues=function(t){for(var e=0;e<this._bars.length;e++)this.animateBar(this._bars[e],this.values.values[e],t)},e.prototype.animateBar=function(t,e,i){var n=this.style;t.sprite.height=this.getBarHeight(t.height,i),n.showLabels&&(t.label.text=this.getValueString(0===t.height?0:e*(t.sprite.height/t.height)),this.setLabelPosition(t.label,t.label.x,t.sprite.y-t.sprite.height))},e.prototype.calculateBarHeightRatio=function(t,e,i){var n=(t-e)/(i-e);return Phaser.Math.clamp(n,0,1)},e.prototype.getMaxValue=function(){var t=this.style;if(void 0!==t.barMaxHeightValue)return t.barMaxHeightValue;for(var e=this.values.values,i=Number.MIN_VALUE,n=0;n<e.length;n++)e[n]>i&&(i=e[n]);return i},e.prototype.getBarHeight=function(t,e){var i=this.style.animationStyle;void 0===i&&(i=s.VerticalBarGraphAnimationStyle.SAME_DURATION);var n=0;switch(i){case s.VerticalBarGraphAnimationStyle.SAME_DURATION:n=t*e;break;case s.VerticalBarGraphAnimationStyle.SAME_SPEED:n=Math.min(t,(this._maxBarY-this._minBarY)*e)}return n},e}(o.Graph);e.VerticalBarsGraph=a},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.StatsTile=void 0;var o=i(0),s=function(t){function e(i,n,r){var s=t.call(this,i,n)||this;return s._bg=null,s._value=null,s._title=null,s._bg=i.add.sprite(0,0,"Sprites","infoTile",s),s._bg.anchor.set(.5,0),s._bg.tint=10708991,s._value=new Phaser.BitmapText(i,0,s._bg.height/2+3,e.VALUE_FONT,"",e.VALUE_FONT_SIZE,"center"),s._value.anchor.set(.5,.38),s._value.tint=1382202,s.add(s._value),s._title=new Phaser.BitmapText(i,0,0,e.TITLE_FONT,o.TextUtils.getText(r),e.TITLE_FONT_SIZE,"center"),s._title.anchor.set(.5,1),s.add(s._title),s}return r(e,t),e.prototype.setValue=function(t){this._value.text=t},e.VALUE_FONT="FontMedium",e.VALUE_FONT_SIZE=40,e.TITLE_FONT="FontTiny",e.TITLE_FONT_SIZE=18,e}(Phaser.Group);e.StatsTile=s},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=this&&this.__spreadArrays||function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),r=0;for(e=0;e<i;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,r++)n[r]=o[s];return n};Object.defineProperty(e,"__esModule",{value:!0}),e.TutorialBigDialog=void 0;var s=function(t){function e(e){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var r=t.apply(this,o([e],i))||this;return r.createQuestion("DIALOG_TUTORIAL_BIG_TITLE"),r.createText("DIALOG_TUTORIAL_BIG"),r}return r(e,t),e.prototype.createText=function(e){t.prototype.createText.call(this,e)},e}(i(50).TutorialBaseDialog);e.TutorialBigDialog=s},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=this&&this.__spreadArrays||function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),r=0;for(e=0;e<i;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,r++)n[r]=o[s];return n};Object.defineProperty(e,"__esModule",{value:!0}),e.TutorialSmallDialog=void 0;var s=function(t){function e(e){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var r=t.apply(this,o([e],i))||this;return r.createQuestion("DIALOG_TUTORIAL_SMALL_TITLE"),r.createText("DIALOG_TUTORIAL_SMALL"),r}return r(e,t),e}(i(50).TutorialBaseDialog);e.TutorialSmallDialog=s},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=this&&this.__spreadArrays||function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),r=0;for(e=0;e<i;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,r++)n[r]=o[s];return n};Object.defineProperty(e,"__esModule",{value:!0}),e.TutorialTieDialog=void 0;var s=i(50),a=i(0),l=function(t){function e(e){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var r=t.apply(this,o([e],i))||this;return r.createQuestion("DIALOG_TUTORIAL_TIE_TITLE"),r.createText(null),r}return r(e,t),e.prototype.setTextAndShow=function(t){this._text.text=a.StringUtils.format(a.TextUtils.getText("DIALOG_TUTORIAL_TIE"),t),this.show()},e}(s.TutorialBaseDialog);e.TutorialTieDialog=l},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),o=this&&this.__spreadArrays||function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),r=0;for(e=0;e<i;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,r++)n[r]=o[s];return n};Object.defineProperty(e,"__esModule",{value:!0}),e.YesNoDialog=e.DialogContext=void 0;var s,a=i(0),l=i(12),h=i(27),u=i(163);!function(t){t[t.Quit=0]="Quit",t[t.Tie=1]="Tie"}(s=e.DialogContext||(e.DialogContext={}));var _=function(t){function e(i){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var s=t.apply(this,o([i],n))||this;s.onMenuButtonClicked=new Phaser.Signal,s._question=null,s._text=null,s._btnYes=null,s._btnNo=null,s._question=new Phaser.BitmapText(i,0,-s._height/2+50,"SlantSmall","",e.TEXT_SIZE,"center"),s._question.anchor.set(.5,0),s._dialogContainer.add(s._question),s._text=new Phaser.BitmapText(s.game,0,-s._height/2+120,e.TEXT_FONT_FACE,"",e.TEXT_FONT_SIZE,"center"),s._text.anchor.set(.5,0),s._dialogContainer.add(s._text);var a=s._height/2-80,h=new l.ChoiceButton(i,"Yes","dia_button","DIALOG_YES");h.position.set(-120,a),h.onClick.add(s.onMenuButtonClick,s),h.setActive(!0),s._dialogContainer.add(h),s._btnYes=h;var u=new l.ChoiceButton(i,"No","dia_button","DIALOG_NO");return u.position.set(120,a),u.onClick.add(s.onMenuButtonClick,s),u.setActive(!0),s._dialogContainer.add(u),s._btnNo=u,s}return r(e,t),e.prototype.enableInput=function(e){t.prototype.enableInput.call(this,e),this._btnYes.setEnabled(e),this._btnYes.button.input.priorityID=this.priority+1,this._btnNo.setEnabled(e),this._btnNo.button.input.priorityID=this.priority+1},e.prototype.onMenuButtonClick=function(t){this.onMenuButtonClicked.dispatch(t,this._context)},e.prototype.setDialog=function(t){switch(this._context=t,t){case s.Quit:this._question.text=a.TextUtils.getText("DIALOG_QUIT_QUESTION"),this._text.visible=!1,this._btnYes.setText(a.TextUtils.getText("DIALOG_YES")),this._btnNo.setText(a.TextUtils.getText("DIALOG_NO"));break;case s.Tie:this._question.text=a.TextUtils.getText("DIALOG_TIE_QUESTION"),this._text.visible=!0,this._text.text=u.TextWrapper.wrapText(this.game,a.TextUtils.getText("DIALOG_TIE_TEXT"),this._width-60,1e3,e.TEXT_FONT_FACE,e.TEXT_FONT_SIZE)[0],this._btnYes.setText(a.TextUtils.getText("DIALOG_WATCH")),this._btnNo.setText(a.TextUtils.getText("DIALOG_SKIP"))}},e.TEXT_SIZE=36,e.TEXT_FONT_FACE="FontTiny",e.TEXT_FONT_SIZE=26,e}(h.DialogBase);e.YesNoDialog=_},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.TextWrapper=void 0,function(t){t[t.UNDEFINED=-1]="UNDEFINED",t[t.SPACE=1]="SPACE",t[t.NEWLINE=2]="NEWLINE",t[t.CHARACTER=3]="CHARACTER"}(n||(n={}));var r=function(){function t(){}return t.hasNext=function(){return t.textPosition<t.text.length},t.getChar=function(){return t.text.charAt(t.textPosition++)},t.peekChar=function(){return t.text.charAt(t.textPosition)},t.getPosition=function(){return t.textPosition},t.setPosition=function(e){t.textPosition=e},t.getCharAdvance=function(e,i){var n=t.fontData.chars[e];if(!n)return 0;var r=n.xAdvance;return i>0&&n.kerning[i]&&(r+=n.kerning[i]),r},t.getCharType=function(t){return" "===t?n.SPACE:/(?:\r\n|\r|\n)/.test(t)?n.NEWLINE:n.CHARACTER},t.wrapText=function(e,i,r,o,s,a,l){void 0===l&&(l=!1),t.text=i,t.setPosition(0),t.fontData=e.cache.getBitmapFont(s).font,void 0===a&&(a=t.fontData.size);var h=a/t.fontData.size,u=t.fontData.lineHeight*h,_=r/h,p=[],c=[],f=[],d=0,g=0,y=0;p[d]=y,f[g++]=0;for(var m=o,v=!1;t.hasNext();){for(var T=0,b=0,S=-1,O=n.UNDEFINED,E=n.UNDEFINED,P=_,A=-1;t.hasNext();){y=t.getPosition();var N=t.getChar();O=t.getCharType(N);var I=N.charCodeAt(0);if(O===n.SPACE)E!==n.SPACE&&(b=T),++T,P-=t.getCharAdvance(I,A);else if(O===n.CHARACTER){if(E!==n.CHARACTER&&(S=y),(P-=t.getCharAdvance(I,A))<0){l&&(b=T+1,y=S=t.getPosition(),P=-1,O=n.CHARACTER,v=!0);break}++T}else if(O===n.NEWLINE){var L=!1;if(!t.hasNext()||this.wrapText&&v||(L=!0,b=T,y=S=t.getPosition(),P=-1,O=n.CHARACTER),L){v=!1;break}}E=O,A=I,v=!1}(m-=u)<0&&(f[g++]=d),P<0&&O===n.CHARACTER?(c[d]=0!==b?b:T,!1,m<0&&(!0,m=o-u),0!==b?(p[++d]=S,t.setPosition(S)):(p[++d]=y,t.setPosition(y))):t.hasNext()||(O===n.CHARACTER?c[d]=T:O===n.SPACE&&(c[d]=b))}f[g]=d+1;for(var R=[],w=1;w<=g;w++){for(var M=f[w-1],C=f[w],x=[],B=M;B<C;B++)x.push(t.text.substr(p[B],c[B]));R.push(x.join("\n"))}return R},t}();e.TextWrapper=r},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.TopLeftLogo=void 0;var o=function(t){function e(e,i){var n=t.call(this,e,0,0,"Sprites","topLeftLogo")||this;return n.anchor.set(.5),n.angle=-10,i.add(n),n}return r(e,t),e.prototype.onResize=function(t,e){var i=e>=930;this.visible=i,i&&this.position.set(-t/2+22+this.width/2,-e/2+60)},e}(Phaser.Sprite);e.TopLeftLogo=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.PreloaderScene=void 0;var o=i(3),s=i(166),a=i(23),l=i(0),h=i(29),u=i(2),_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._transitionToNextScene=!1,e._loadSettingsPending=!1,e._topBg=null,e._bottomBg=null,e._barGroup=null,e._loadingBar=null,e._loadingBarBg=null,e}return r(e,t),e.prototype.preload=function(){this.stage.backgroundColor=u.Defs.COLOR_BG,this.createLoadingBar(),this.onResize(this.game.width,this.game.height),this.preloadSounds(),this.load.atlas("Sprites","assets/atlas/Sprites.png","assets/atlas/Sprites.json"),this.load.image("Bg","assets/atlas/Bg.png"),this.load.xml("FontTinyXML","assets/font/Font_26.xml"),this.load.xml("FontMediumXML","assets/font/Font_40.xml"),this.load.xml("FontSmallXML","assets/font/FontSmall.xml"),this.load.xml("NumsBankXML","assets/font/NumsBank.xml"),this.load.xml("NumsBankGlowXML","assets/font/NumsBankGlow.xml"),this.load.xml("NumsPlayersXML","assets/font/NumsPlayers.xml"),this.load.xml("NumsPlayersRedXML","assets/font/NumsPlayersRed.xml"),this.load.xml("TickerXML","assets/font/Ticker.xml"),this.load.xml("SlantBigXML","assets/font/SlantBig.xml"),this.load.xml("SlantSmallXML","assets/font/SlantSmall.xml"),this.load.xml("SlantPureXML","assets/font/SlantPure.xml"),this.load.xml("FontButtonsBgXML","assets/font/FontButtonsBg.xml"),this.load.xml("FontButtonsGlowXML","assets/font/FontButtonsGlow.xml"),this.load.xml("ToolTipXML","assets/font/ToolTip.xml"),this.load.xml("AnimRounds","assets/animation/animace.xml"),this.load.xml("AnimStartButton","assets/animation/taptospin.xml"),this.load.xml("AnimPoof","assets/animation/poof.xml"),this.load.json("Texts","assets/text/text.json")},e.prototype.preloadSounds=function(){var t="assets/sound/";if(this.game.device.ie||Phaser.Device.isAndroidStockBrowser()){for(var e in s.Sounds.AUDIO_JSON.spritemap)this.load.audio(e,t+e+".mp3");this.load.audio("Loop",t+"Loop.mp3"),this.load.audio("Result",t+"Result.mp3")}else{var i=0;this.game.device.iOS&&(i=.1);var n=0;for(var e in s.Sounds.AUDIO_JSON.spritemap){var r=s.Sounds.AUDIO_JSON.spritemap[e];0!==n&&(r.start-=i),++n}this.load.audiosprite("Sfx",s.Sounds.AUDIO_JSON.resources,null,s.Sounds.AUDIO_JSON),this.load.audio("Loop",[t+"Loop.ogg",t+"Loop.m4a"]),this.load.audio("Result",[t+"Result.ogg",t+"Result.m4a"])}},e.prototype.doPostCreate=function(){this.finalizeFonts(),this.finalizeSounds();var t=new a.Loader;u.Defs.SPRITER_ANIM_ROUNDS=t.load(new a.SpriterXml(this.cache.getXML("AnimRounds"))),u.Defs.SPRITER_ANIM_START_BUTTON=t.load(new a.SpriterXml(this.cache.getXML("AnimStartButton"))),u.Defs.SPRITER_ANIM_POOF=t.load(new a.SpriterXml(this.cache.getXML("AnimPoof"))),l.TextUtils.setTexts(this.game.cache.getJSON("Texts")),this.loadSettings()},e.prototype.finalizeFonts=function(){void 0===this.cache.addBitmapFontFromImage&&l.PhaserUtils.AddBitmapFontAddMethod(),this.cache.addBitmapFontFromImage("FontTiny",null,"Sprites",this.cache.getXML("FontTinyXML"),"xml"),this.cache.addBitmapFontFromImage("FontMedium",null,"Sprites",this.cache.getXML("FontMediumXML"),"xml"),this.cache.addBitmapFontFromImage("FontSmall",null,"Sprites",this.cache.getXML("FontSmallXML"),"xml"),this.cache.addBitmapFontFromImage("NumsBank",null,"Sprites",this.cache.getXML("NumsBankXML"),"xml"),this.cache.addBitmapFontFromImage("NumsBankGlow",null,"Sprites",this.cache.getXML("NumsBankGlowXML"),"xml"),this.cache.addBitmapFontFromImage("NumsPlayers",null,"Sprites",this.cache.getXML("NumsPlayersXML"),"xml"),this.cache.addBitmapFontFromImage("NumsPlayersRed",null,"Sprites",this.cache.getXML("NumsPlayersRedXML"),"xml"),this.cache.addBitmapFontFromImage("Ticker",null,"Sprites",this.cache.getXML("TickerXML"),"xml"),this.cache.addBitmapFontFromImage("SlantBig",null,"Sprites",this.cache.getXML("SlantBigXML"),"xml"),this.cache.addBitmapFontFromImage("SlantSmall",null,"Sprites",this.cache.getXML("SlantSmallXML"),"xml"),this.cache.addBitmapFontFromImage("SlantPure",null,"Sprites",this.cache.getXML("SlantPureXML"),"xml"),this.cache.addBitmapFontFromImage("FontButtonsBg",null,"Sprites",this.cache.getXML("FontButtonsBgXML"),"xml"),this.cache.addBitmapFontFromImage("FontButtonsGlow",null,"Sprites",this.cache.getXML("FontButtonsGlowXML"),"xml"),this.cache.addBitmapFontFromImage("ToolTip",null,"Sprites",this.cache.getXML("ToolTipXML"),"xml")},e.prototype.finalizeSounds=function(){var t=this.add.audio("Loop");if(t.volume=1,l.AudioUtils.addMusic("Loop",t),(t=this.add.audio("Result")).volume=1,l.AudioUtils.addMusic("Result",t),this.game.device.ie||Phaser.Device.isAndroidStockBrowser())for(var e in l.AudioUtils.setSounds(null),s.Sounds.AUDIO_JSON.spritemap){(n=this.add.audio(e)).allowMultiple=!0,l.AudioUtils.addSound(e,n)}else{var i=this.add.audioSprite("Sfx");for(var e in s.Sounds.AUDIO_JSON.spritemap){var n;(n=i.sounds[e]).allowMultiple=!0}l.AudioUtils.setSounds(i)}},e.prototype.loadSettings=function(){var t=this;this._loadSettingsPending=!0,o.App.settings.load((function(){t._loadSettingsPending=!1}))},e.prototype.update=function(){this._transitionToNextScene||this._loadSettingsPending||(this._transitionToNextScene=!0,this.game.add.tween(this._barGroup).to({alpha:0},500,Phaser.Easing.Linear.None,!0,500).onComplete.add((function(){this.state.start("Title",!0,!1,!0)}),this))},e.prototype.createLoadingBar=function(){var t=this.game.add.sprite(0,0,"LoadingBg",0,this.world);t.anchor.set(.5,0),this._topBg=t,(t=this.game.add.sprite(0,0,"LoadingBg",0,this.world)).anchor.set(.5,0),t.scale.y=-1,this._bottomBg=t;var i=e.LOADING_BAR_WIDTH,n=e.LOADING_BAR_HEIGHT,r=this.add.graphics(-i/2,0);r.beginFill(197644),r.drawRect(0,-n/2,i,n),this._loadingBarBg=r,(r=this.add.graphics(-i/2,0)).beginFill(2502281),r.drawRect(0,-n/2-.5,i,n+1),this._loadingBar=r,this._loadingBar.width=0,this._barGroup=new Phaser.Group(this.game,this.world),this._barGroup.add(this._loadingBarBg),this._barGroup.add(this._loadingBar)},e.prototype.loadUpdate=function(){this._loadingBar.width=e.LOADING_BAR_WIDTH*this.load.progress/100},e.prototype.onResize=function(e,i){t.prototype.onResize.call(this,e,i);var n=-i/2;this._topBg.position.set(0,n),this._bottomBg.position.set(0,-n)},e.LOADING_BAR_WIDTH=400,e.LOADING_BAR_HEIGHT=50,e}(h.SceneBase);e.PreloaderScene=_},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sounds=void 0;var n=function(){function t(){}return t.AUDIO_JSON={resources:["assets\\sound\\Sfx.ogg","assets\\sound\\Sfx.m4a"],spritemap:{click:{start:0,end:.10868480725623583,loop:!1},busted:{start:2,end:2.849138321995465,loop:!1},correct:{start:4,end:5.330952380952381,loop:!1},wheelTick:{start:7,end:7.060430839002268,loop:!1},game_end_endscreen_reveal:{start:9,end:13.598798185941043,loop:!1},you_win:{start:15,end:18.761632653061223,loop:!1},game_end_rating_goes_down:{start:20,end:21.358367346938774,loop:!1},game_end_rating_goes_up:{start:23,end:24.32251700680272,loop:!1},number_leaves_wheel:{start:26,end:26.28625850340136,loop:!1},number_arrives_at_wheel_center:{start:28,end:28.478027210884353,loop:!1},number_moves_from_center_to_bank:{start:30,end:31.159909297052153,loop:!1},player_banks:{start:33,end:34.16390022675737,loop:!1},player_free_spin:{start:36,end:36.93922902494331,loop:!1},player_guess_higher:{start:38,end:38.79036281179138,loop:!1},player_guess_lower:{start:40,end:40.67192743764172,loop:!1},ran_the_wheel:{start:42,end:45.70065759637188,loop:!1},round_end_transition:{start:47,end:48.53251700680272,loop:!1},round_start_transition:{start:50,end:51.54993197278912,loop:!1},wipeout:{start:53,end:55.82757369614512,loop:!1},push_your_luck_intro_ding:{start:57,end:58.2930612244898,loop:!1},results_screen_ding:{start:60,end:61.2930612244898,loop:!1},push_your_luck_intro_cheers:{start:63,end:66.83684807256236,loop:!1},final_round_start:{start:68,end:68.68630385487528,loop:!1}}},t}();e.Sounds=n},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.StatsScene=void 0;var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.doPreCreate=function(){},e.prototype.doPostCreate=function(){},e.prototype.onResize=function(e,i){t.prototype.onResize.call(this,e,i)},e}(i(29).SceneBase);e.StatsScene=o},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.TitleScene=void 0;var o=i(1),s=i(22),a=i(59),l=i(68),h=i(69),u=i(71),_=i(72),p=i(169),c=i(170),f=i(77),d=i(81),g=i(82),y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._timelineManager=null,e._bg=null,e._spinner=null,e._buttons=null,e._logoPanel=null,e._hud=null,e._spinnerSnapshot=null,e._rulesDialog=null,e._statsDialog=null,e._firstTime=!1,e}return r(e,t),e.prototype.init=function(t){this._firstTime=t},e.prototype.doPreCreate=function(){this._timelineManager=new a.TimelineManager,this._bg=new h.PlayBg(this.game,this.world),this._spinner=u.Spinner.instance,this.world.add(this._spinner),this._spinner.onSpinnerClicked.add(this.onSpinnerClicked,this),this._logoPanel=new c.LogoPanel(this.game,this.world),this._buttons=new p.TitleButtons(this.game,this._logoPanel),this._buttons.onClick.add(this.onButtonClicked,this),this._buttons.disableButtons(),this._hud=new l.InGameHUD(this.game,this.world,!0),this._hud.onHUDButton.add(this.onHUDButton,this),this._hud.visible=!1,this._rulesDialog=f.RulesDialog.instance,this.world.add(this._rulesDialog),this._statsDialog=d.StatsDialog.instance,this.world.add(this._statsDialog),this._statsDialog.onStartGame.add(this.onSpinnerClicked,this)},e.prototype.doPostCreate=function(){this._spinner.buildWheel(o.Config.SPINNER_NUMBERS_ORDER),this._spinner.setIdle(!0,!1),this._spinnerSnapshot=this.createSpinnerSnapshot(),this._spinner.visible=!1,this.createTimeline().start(g.TimelineDefs.TITLE_TIMELINE_DURATION,!0),this.playMusic("Result",o.Config.MUSIC_VOLUME_TITLE)},e.prototype.createSpinnerSnapshot=function(){this._spinner.visible=!0;var t=_.SpinnerSnapshot.instance;t.renderXY(this._spinner,400,400,!0);var e=this.game.add.sprite(0,0,t);return e.anchor.set(.5),this.world.setChildIndex(e,1),e},e.prototype.createTimeline=function(){var t=this._timelineManager.add("basic",g.TimelineDefs.TITLE_TIMELINE);return t.setTarget("bg",this._bg),t.setTarget("bg2",this._firstTime?this._bg:null),t.setTarget("logoPanel",this._logoPanel),t.setTarget("spinnerSnapshot",this._spinnerSnapshot),t.onFinished.addOnce((function(){this._spinner.visible=!0,this._spinnerSnapshot.visible=!1,this._buttons.enableButtons(),this._hud.visible=!0}),this),t},e.prototype.onResize=function(e,i){t.prototype.onResize.call(this,e,i),this._bg.onResize(e,i),this._spinner.position.set(o.Config.WHEEL_X_OFFSET,-14),this._logoPanel.position.set(-e/2+220,o.Config.WHEEL_Y_OFFSET),this._buttons.position.set(0,300-o.Config.TITLE_BUTTONS_Y_OFFSET),this._hud.position.set(e/2-77,-i/2+11),this._spinnerSnapshot.position.copyFrom(this._spinner.position),this._timelineManager.get("basic").setPointProps("logoPanel","pos",this._logoPanel.position)},e.prototype.onSpinnerClicked=function(t){var e=this._timelineManager.get("basic");e.isPlaying||(this._hud.visible=!1,e.start(g.TimelineDefs.TITLE_TIMELINE_DURATION,!1,0,2,s.eTimelineTrim.TRIM),e.onFinished.addOnce((function(){this.state.start("Play",!0,!1,!1)}),this))},e.prototype.onButtonClicked=function(t){"Rules"===t.name?this._rulesDialog.show():(t.name="Stats")&&this._statsDialog.show()},e.prototype.onHUDButton=function(t){switch(t.name){case"Sound":this.toggleSound(t.toggled);break;case"Music":this.toggleMusic(t.toggled)}},e.prototype.update=function(){var t=this.game.time.elapsedMS;this._spinner.visible&&this._spinner.updateSpinner(t),this._timelineManager.update(this.game.time.elapsedMS)},e.prototype.shutdown=function(){null!=this._rulesDialog&&(this.world.remove(this._rulesDialog),this._rulesDialog=null),null!=this._statsDialog&&(this._statsDialog.onStartGame.removeAll(),this.world.remove(this._statsDialog),this._statsDialog=null),this._timelineManager=null,this._spinner.clearSignals(),this.world.remove(this._spinner)},e}(i(29).SceneBase);e.TitleScene=y},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.TitleButtons=void 0;var o=i(12),s=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n.onClick=new Phaser.Signal,n._rules=null,n._stats=null,n._rules=n.createButton("Rules","BUTTON_RULES"),n._stats=n.createButton("Stats","BUTTON_STATS"),n.setPositions(),n}return r(e,t),e.prototype.createButton=function(t,e){var i=new o.ChoiceButton(this.game,t,"dia_button",e);return i.onClick.add(this.onButtonClick,this),i.setActive(!0),this.add(i),i},e.prototype.onButtonClick=function(t){this.onClick.dispatch(t)},e.prototype.setPositions=function(){this._rules.position.x=-90,this._stats.position.x=90},e.prototype.disableButtons=function(){this._rules.button.inputEnabled=!1,this._stats.button.inputEnabled=!1},e.prototype.enableButtons=function(){this._rules.button.inputEnabled=!0,this._stats.button.inputEnabled=!0},e}(Phaser.Group);e.TitleButtons=s},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.LogoPanel=void 0;var o=i(46),s=i(47),a=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n._bgBmd=null,n._bg=null,n._logo=null,n._skillPanel=null,n.createBg(),n.createLogo(),n._skillPanel=new s.SkillPanel(n.game,n,"SlantSmall",s.SkillPanel.TINT_LIGHT),n.setPositions(),n}return r(e,t),e.prototype.createBg=function(){this._bgBmd=o.NineImage.create(this.game,400,600,"Sprites","dia_ninepatch",40,40,40,40,!1,!0,!0),this._bg=new Phaser.Sprite(this.game,0,0,this._bgBmd,0),this._bg.anchor.set(.5),this.add(this._bg),this.onDestroy.addOnce((function(){null!==this._bgBmd&&this._bgBmd.destroy()}),this)},e.prototype.createLogo=function(){var t=this.game.add.sprite(0,0,"Sprites","logo",this);t.anchor.set(.5,1),t.scale.set(1.2),this._logo=t},e.prototype.setPositions=function(){this._logo.y=30,this._skillPanel.y=75},e}(Phaser.Group);e.LogoPanel=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Settings=void 0;var n=i(172),r=i(52),o=i(1),s=function(){function t(t){this._data=null,this._saveKey=null,this._saveKey=t,this._data=new n.SettingsData}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"soundOn",{get:function(){return this._data.soundOn},set:function(t){this._data.soundOn=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"musicOn",{get:function(){return this._data.musicOn},set:function(t){this._data.musicOn=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentLanguage",{get:function(){return this._data.currentLanguage},set:function(t){this._data.currentLanguage=t},enumerable:!1,configurable:!0}),t.prototype.load=function(t){var e=this;r.StorageUtils.load(this._saveKey).then((function(i){null!=i&&(e._data=i),t&&t()}))},t.prototype.save=function(t){r.StorageUtils.save(this._saveKey,this._data).then((function(){t&&t()}))},t.prototype.startGame=function(){var t=this.data;++t.gamesStarted,t.lastPlayed=Date.now()},t.prototype.finishGame=function(t,e){var i=this.data,n=e.def.id;++i.playerWins[n],i.playerBestScore[n]=Math.max(i.playerBestScore[n],e.score),i.averagePlace=(i.averagePlace*i.gamesFinished+(t.place+1))/(i.gamesFinished+1),0===t.place&&++i.gamesWon,++i.playerPlace[t.place],++i.gamesFinished,i.highScore=Math.max(i.highScore,t.score)},t.prototype.addSkillScore=function(t){var e=this.data;e.skillScore+=t;var i=e.skillScoreHistory;if(i.length===o.Config.SKILL_SCORE_HISTORY_LENGTH){for(var n=1;n<i.length;n++)i[n-1]=i[n];i[i.length-1]=e.skillScore}else i.push(e.skillScore);e.highRating=Math.max(e.highRating,e.skillScore)},t.prototype.perfectRound=function(){++this.data.perfectRounds},t.prototype.addGuess=function(t){var e=this.data;++e.guessTotal,t&&++e.guessAgainstOdds},t.prototype.increaseFreeSpin=function(){++this.data.freeSpins},t.prototype.addFreeSpinScore=function(t){var e=this.data;e.averageFreeSpinPoints=(e.averageFreeSpinPoints*(e.freeSpins-1)+t)/e.freeSpins},t.prototype.addChoice=function(t){var e=this.data;"Higher"===t?++e.higher:"Lower"===t?++e.lower:"Bank"===t&&++e.bank},t.prototype.getBestCompetitorId=function(){for(var t=this.data.playerWins,e=this.data.playerBestScore,i=-1,n=-1,r=0,o=1;o<t.length;o++)(t[o]>n||t[o]===n&&e[o]>r)&&(n=t[o],r=e[o],i=o);return n<=0?-1:i},t}();e.Settings=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SettingsData=void 0;var n=function(){function t(){this.musicOn=!0,this.soundOn=!0,this.currentLanguage="en",this.skillScore=t.INITIAL_SKILL_SCORE,this.skillScoreHistory=[t.INITIAL_SKILL_SCORE],this.lastPlayed=0,this.gamesStarted=0,this.gamesFinished=0,this.gamesWon=0,this.averagePlace=0,this.highScore=0,this.highRating=t.INITIAL_SKILL_SCORE,this.perfectRounds=0,this.guessTotal=0,this.guessAgainstOdds=0,this.freeSpins=0,this.averageFreeSpinPoints=0,this.playerWins=[0,0,0,0,0,0,0,0,0,0,0,0,0],this.playerBestScore=[0,0,0,0,0,0,0,0,0,0,0,0,0],this.playerPlace=[0,0,0,0,0,0,0,0],this.higher=0,this.lower=0,this.bank=0}return t.INITIAL_SKILL_SCORE=300,t}();e.SettingsData=n},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.getSponsorFeatures=e.SPONSOR_FEATURES=void 0;var r=i(174);e.SPONSOR_FEATURES=((n={})[r.eSponsorID.NONE]={id:r.eSponsorID.NONE,name:"none",hasConfig:!1,defaultLanguage:"cs"},n[r.eSponsorID.SBC_GAMES]={id:r.eSponsorID.SBC_GAMES,name:"sbc_games",hasConfig:!0,defaultLanguage:"en"},n[r.eSponsorID.COOLMATHGAMES]={id:r.eSponsorID.COOLMATHGAMES,name:"coolmathgames",hasConfig:!1,defaultLanguage:"en"},n),e.getSponsorFeatures=function(t){if(null==e.SPONSOR_FEATURES[t])throw new Error("Features for sponsor "+r.eSponsorID[t]+" are not in SPONSOR_FEATURES list.");return e.SPONSOR_FEATURES[t]}},function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[i]}})}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),r=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||e.hasOwnProperty(i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(i(175),e),r(i(18),e),r(i(30),e),r(i(31),e)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.SponsorCoolmathGamesSDK=void 0;var o=i(177),s=i(0),a=i(14),l=i(3),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.startEvent=function(t,e){void 0===e&&(e=null);var i=0;switch(t){case"start":i=0;break;case"restart":i=s.StringUtils.padNumber(5,2);break;case"end":i=e.player.place+1,i*=10,i+=a.Skill.getIndex(l.App.settings.data.skillScore)+1,i*=1e3;var n=l.App.settings.data.gamesFinished;i+=n>=999?999:n>=100?100*Math.floor(n/100):n>=11?10*Math.floor(n/10):n,i*=100,i+=e.players[0].def.id,i=s.StringUtils.padNumber(i,7)}this.sendGameEvent("start",i)},e.prototype.dataEvent=function(t,e,i,n,r,o,a){var l,h=0;h=++t>49?5:t>=11?4:t>=3?3:t>=2?2:1,h*=10,h+=Math.min(e+1,9),h*=10,h+="Bank"===n?0:"Lower"===n?1:"Higher"===n?2:3,h*=10;var u=Math.round(100*i);o?l=4:r||"Bank"===n||"Pass"===n?l=3:50===u?l=2:u<50&&"Lower"===n||100-u<50&&"Higher"===n?l=1:(u<50&&"Higher"===n||100-u<50&&"Lower"===n)&&(l=0),h+=l,h*=10,h+=a?1:0,this.sendDataEvent("data",s.StringUtils.padNumber(h,5))},e}(o.SponsorCoolmathGames);e.SponsorCoolmathGamesSDK=h},function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0}),e.SponsorCoolmathGames=void 0;var o=function(t){function e(e){return t.call(this,e)||this}return r(e,t),e.prototype.startGameSession=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=t[0];void 0!==i.eventValue?void 0!==parent.cmgGameEvent&&parent.cmgGameEvent(i.eventName,""+i.eventValue):void 0!==parent.cmgGameEvent&&parent.cmgGameEvent(i.eventName)},e.prototype.sendGameEvent=function(t,e){parent&&parent.cmgGameEvent&&(void 0===e?parent.cmgGameEvent(t):parent.cmgGameEvent(t,e))},e.prototype.sendDataEvent=function(t,e){parent&&parent.cmgDataEvent&&(void 0===e?parent.cmgDataEvent(t):parent.cmgDataEvent(t,e))},e}(i(30).Sponsor);e.SponsorCoolmathGames=o}])}));12