"use strict";(self.webpackChunkfxdk_app=self.webpackChunkfxdk_app||[]).push([[8403],{80802:function(e,t,r){var s=this&&this.__decorate||function(e,t,r,s){var n,u=arguments.length,i=u<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,r):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(i=(u<3?n(i):u>3?n(t,r,i):n(t,r))||i);return u>3&&i&&Object.defineProperty(t,r,i),i};Object.defineProperty(t,"__esModule",{value:!0}),t.FxdkDataService=t.SingleEventEmitter=t.GameStates=void 0;var n,u=r(9825),i=r(71053);!function(e){e[e.NOT_RUNNING=0]="NOT_RUNNING",e[e.READY=1]="READY",e[e.LOADING=2]="LOADING",e[e.CONNECTED=3]="CONNECTED",e[e.UNLOADING=4]="UNLOADING"}(n=t.GameStates||(t.GameStates={}));var a=function(){function e(){this.listeners=new Set}return e.prototype.on=function(e){var t=this;return this.listeners.add(e),u.Disposable.create((function(){return t.listeners.delete(e)}))},e.prototype.emit=function(e){this.listeners.forEach((function(t){return t(e)}))},e}();t.SingleEventEmitter=a;var o=function(){function e(){this.data={},this.clientResourcesData=[],this.serverResourcesData=[],this.bufferedServerOutput="",this.structuredServerMessages=[],this.bufferedServerOutputChanged=new a,this.structuredServerMessageReceivedEvent=new a,this.clearAllServerOutputsEvent=new a,this.clientResourcesDataEvent=new a,this.serverResourcesDataEvent=new a,this.structuredGameMessages=[],this.structuredGameMessageReceivedEvent=new a,this.clearGameOutputEvent=new a,this.theiaIsActive=!1,this.theiaIsActiveEvent=new a,this.gameState=n.NOT_RUNNING,this.gameStateChangeEvent=new a}return e.prototype.onBufferedServerOutputChanged=function(e){return this.bufferedServerOutputChanged.on(e)},e.prototype.onStructuredServerMessageReceived=function(e){return this.structuredServerMessageReceivedEvent.on(e)},e.prototype.onClearAllServerOutputs=function(e){return this.clearAllServerOutputsEvent.on(e)},e.prototype.onClientResourcesData=function(e){return this.clientResourcesDataEvent.on(e)},e.prototype.getClientResourcesData=function(){return this.clientResourcesData},e.prototype.setClientResourcesData=function(e){this.clientResourcesData=e,this.clientResourcesDataEvent.emit(e)},e.prototype.onServerResourcesData=function(e){return this.serverResourcesDataEvent.on(e)},e.prototype.getServerResourcesData=function(){return this.serverResourcesData},e.prototype.setServerResourcesData=function(e){this.serverResourcesData=e,this.serverResourcesDataEvent.emit(e)},e.prototype.getBufferedServerOutput=function(){return this.bufferedServerOutput},e.prototype.getStructuredServerMessages=function(){return this.structuredServerMessages},e.prototype.clearAllServerOutputs=function(){this.bufferedServerOutput="",this.structuredServerMessages=[],this.clearAllServerOutputsEvent.emit()},e.prototype.setBufferedServerOutput=function(e){this.bufferedServerOutput=e,this.bufferedServerOutputChanged.emit(this.bufferedServerOutput)},e.prototype.receiveStructuredServerMessage=function(e){this.structuredServerMessages.push(e),this.structuredServerMessageReceivedEvent.emit(e)},e.prototype.onStructuredGameMessageReceived=function(e){return this.structuredGameMessageReceivedEvent.on(e)},e.prototype.onClearGameOutput=function(e){return this.clearGameOutputEvent.on(e)},e.prototype.getStructuredGameMessage=function(){return this.structuredGameMessages},e.prototype.receiveStructuredGameMessage=function(e){this.structuredGameMessages.push(e),this.structuredGameMessageReceivedEvent.emit(e)},e.prototype.clearGameOutput=function(){this.structuredGameMessages=[],this.clearGameOutputEvent.emit()},e.prototype.sendMessageToShell=function(e,t){window.parent.postMessage({type:e,data:t},"*")},e.prototype.onTheiaIsActiveChange=function(e){return this.theiaIsActiveEvent.on(e)},e.prototype.setTheiaIsActive=function(e){this.theiaIsActive=e,this.theiaIsActiveEvent.emit(e)},e.prototype.getTheiaIsActive=function(){return this.theiaIsActive},e.prototype.onGameStateChange=function(e){return this.gameStateChangeEvent.on(e)},e.prototype.getGameState=function(){return this.gameState},e.prototype.setGameState=function(e){this.gameState=e,this.gameStateChangeEvent.emit(this.gameState)},s([i.injectable()],e)}();t.FxdkDataService=o},58403:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var s=r(71053),n=r(80802);t.default=new s.ContainerModule((function(e,t,r,s){e(n.FxdkDataService).toSelf().inSingletonScope()}))}}]);
//# sourceMappingURL=8403.bundle.js.map