bfg-common 1.0.26 → 1.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,8 +41,8 @@ const isFullScreen = ref<boolean>(false)
41
41
  const chart = ref<any>(null)
42
42
  const chartHelper = ref<number>(0)
43
43
 
44
- const fullScreenCallBack = (newValue: any): void => {
45
- typeof newValue === 'boolean' && (isFullScreen.value = newValue)
44
+ const fullScreenCallBack = (newValue: boolean): void => {
45
+ isFullScreen.value = newValue
46
46
  }
47
47
 
48
48
  const chartCallback = (newValue: any): void => {
@@ -36,7 +36,7 @@ import {
36
36
  T_ChartVm,
37
37
  } from '~/components/common/monitor/advanced/tools/chartOptionsModal/models/types'
38
38
  import { UI_T_AdvancedType } from '~/components/common/monitor/advanced/models/types'
39
- import { countersItemsFunc } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/items'
39
+ import { countersItemsFunc } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/utils'
40
40
 
41
41
  const props = defineProps<{
42
42
  chart: T_ChartHost | T_ChartVm
@@ -623,10 +623,7 @@ export const countersItemsFunc = (
623
623
 
624
624
  switch (type) {
625
625
  case 'host':
626
- result = hostItemsFunc(
627
- <'cpu' | 'memory' | 'network' | 'disk'>chart,
628
- localization
629
- )
626
+ if (chart !== 'datastore') result = hostItemsFunc(chart, localization)
630
627
  break
631
628
  case 'vm':
632
629
  result = vmItemsFunc(chart, localization)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.0.26",
4
+ "version": "1.0.28",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",
@@ -485,7 +485,7 @@ Application = $.spcExtend(wdi.DomainObject, {
485
485
  },
486
486
 
487
487
  sendCtrlAltDelete: function() {
488
- this._sendCtrlKey(225, 46);
488
+ this._sendCtrlKey(18, 46);
489
489
  },
490
490
 
491
491
  _sendCtrlKey: function (keycode, keycode2){
@@ -1 +1 @@
1
- Application=$.spcExtend(wdi.DomainObject,{spiceConnection:null,clientGui:null,agent:null,externalCallback:null,keyboardEnabled:!0,packetProcess:null,inputProcess:null,multimediaTime:null,lastMultimediaTime:null,busConnection:null,busProcess:null,timeLapseDetector:null,connectionInfo:null,reconnecting:null,checkActivity:null,configs:null,init:function(e){this.disposed=!1,e?this.configs=e:e=this.configs||{},wdi.spiceClientPath=e.spiceClientPath||"",wdi.Debug.log("application init"),wdi.GlobalPool.init(),this.spiceConnection=e.spiceConnection||new wdi.SpiceConnection,this.clientGui=e.clientGui||new wdi.ClientGui({app:this}),this.agent=e.agent||new wdi.Agent({app:this}),this.inputProcess=e.inputProcess||new wdi.InputProcess({clientGui:this.clientGui,spiceConnection:this.spiceConnection}),this.packetProcess=e.packetProcess,this.busConnection=e.busConnection||new wdi.BusConnection,this.busProcess=e.busProcess||new wdi.BusProcess({clientGui:this.clientGui,busConnection:this.busConnection}),this.timeLapseDetector=e.timeLapseDetector||new wdi.TimeLapseDetector,this.checkActivity=e.checkActivity,this.setup(),e.supportHighDPI?(this.clientGui.pixelRatio=window.devicePixelRatio,this.pixelRatio=window.devicePixelRatio):(this.clientGui.pixelRatio=1,this.pixelRatio=1)},run:function(e){if(this.runParams=e,e.hasOwnProperty("seamlessDesktopIntegration")&&(wdi.SeamlessIntegration=e.seamlessDesktopIntegration),!this.packetProcess){var t=!1;!1===e.useWorkers&&(t=new wdi.DisplayProcess({clientGui:this.clientGui,disableMessageBuffering:e.disableMessageBuffering})),this.packetProcess=new wdi.PacketProcess({app:this,clientGui:this.clientGui,agent:this.agent,spiceConnection:this.spiceConnection,inputsProcess:this.inputProcess,displayProcess:t,disableMessageBuffering:e.disableMessageBuffering})}if(this.checkActivity||(this.checkActivity=new wdi.CheckActivity(e.checkActivityInterval),this.checkActivity.addListener("activityLost",this.onActivityLost,this)),window.vdiLoadTest?this.spiceConnection.addListener("message",this.onMessage,this):this.spiceConnection.addListener("message",this.packetProcess.process,this.packetProcess),this.busConnection.connect(e),this.timeLapseDetector.startTimer(),e.canvasMargin&&this.clientGui.setCanvasMargin(e.canvasMargin),e.disableClipboard&&(this.agent.disableClipboard(),this.clientGui.disableClipboard(),this.enableCtrlC(),this.enableCtrlV()),e.layer&&this.clientGui.setLayer(e.layer),this.clientGui.checkFeatures()){wdi.SeamlessIntegration&&this.disableKeyboard(),wdi.Keymap.loadKeyMap(e.layout,this.clientGui.getStuckKeysHandler()),this.setExternalCallback(e.callback,e.context);try{this.connect({host:e.host,port:e.port,protocol:e.protocol,vmHost:e.vmHost,vmPort:e.vmPort,vmid:e.vmid,vmInfoToken:e.vmInfoToken,busHost:e.busHost,token:e.token,connectionControl:e.connectionControl,heartbeatToken:e.heartbeatToken,heartbeatTimeout:e.heartbeatTimeout})}catch(e){this.executeExternalCallback("error",1)}this.clientGui.setClientOffset(e.clientOffset.x,e.clientOffset.y)}e.hasOwnProperty("externalClipboardHandling")&&(this.externalClipoardHandling=e.externalClipboardHandling)},end:function(){},setup:function(){this.spiceConnection.addListener("mouseMode",this.onMouseMode,this),this.spiceConnection.addListener("initAgent",this.onInitAgent,this),this.spiceConnection.addListener("error",this.onDisconnect,this),this.spiceConnection.addListener("channelConnected",this.onChannelConnected,this),this.clientGui.addListener("input",this.onClientInput,this),this.clientGui.addListener("resolution",this.onResolution,this),this.clientGui.addListener("paste",this.onPaste,this),this.clientGui.addListener("startAudio",this.onStartAudio,this),this.clientGui.addListener("eventLayerCreated",this.onEventLayerCreated,this),this.busProcess.addListener("windowCreated",this.onWindowCreated,this),this.busProcess.addListener("windowClosed",this.onWindowClosed,this),this.busProcess.addListener("windowMoved",this.onWindowMoved,this),this.busProcess.addListener("windowResized",this.onWindowResized,this),this.busProcess.addListener("windowFocused",this.onWindowFocused,this),this.busProcess.addListener("windowMinimized",this.onWindowMinimized,this),this.busProcess.addListener("windowRestored",this.onWindowRestored,this),this.busProcess.addListener("windowMaximized",this.onWindowMaximized,this),this.busProcess.addListener("busConnected",this.onBusConnected,this),this.busProcess.addListener("menuResponse",this.onMenuResponse,this),this.busProcess.addListener("networkDriveResponse",this.onNetworkDriveResponse,this),this.busProcess.addListener("wrongPathError",this.onWrongPathError,this),this.busProcess.addListener("applicationLaunchedSuccessfully",this.onApplicationLaunchedSuccessfully,this),this.busProcess.addListener("selectedText",this.onRemoteSelectedText,this),this.busProcess.addListener("copiedText",this.onRemoteCopiedText,this),this.agent.addListener("clipBoardData",this.onClipBoardData,this),this.busConnection.addListener("busMessage",this.onBusMessage,this),this.busConnection.addListener("error",this.onDisconnect,this),this.timeLapseDetector.addListener("timeLapseDetected",this.onTimeLapseDetected,this),this.busProcess.addListener("defaultTypeEvent",this.onDefaultTypeEvent,this)},onChannelConnected:function(e){e===wdi.SpiceVars.SPICE_CHANNEL_INPUTS&&this.clientGui.releaseAllKeys()},onDefaultTypeEvent:function(e){this.executeExternalCallback(e.event,e)},onNetworkDriveResponse:function(e){this.executeExternalCallback("networkDriveResponse",e)},onDisconnect:function(e){var t=e;this.executeExternalCallback("error",t)},onResolution:function(e){this.executeExternalCallback("resolution",e)},onClipBoardData:function(e){this.externalClipoardHandling?this.executeExternalCallback("clipboardEvent",e):this.clientGui.setClipBoardData(e)},onRemoteCopiedText:function(e){this.clientGui.setToLocalClipboard(e)},onRemoteSelectedText:function(e){this.clientGui.setToLocalClipboard(e)},onWindowMinimized:function(e){var t=e;e=this.clientGui.resizeSubCanvas(t);this.executeExternalCallback("windowMinimized",e)},onWindowFocused:function(e){this.executeExternalCallback("windowFocused",e)},onWindowRestored:function(e){var t=e;e=this.clientGui.resizeSubCanvas(t);this.executeExternalCallback("windowRestored",e)},onWindowMaximized:function(e){var t=e;e=this.clientGui.resizeSubCanvas(t);this.executeExternalCallback("windowMaximized",e)},onWindowResized:function(e){var t=e;e=this.clientGui.resizeSubCanvas(t);this.executeExternalCallback("windowResized",e)},onWindowMoved:function(e){var t=e;e=this.clientGui.moveSubCanvas(t);this.executeExternalCallback("windowMoved",e)},onWindowClosed:function(e){var t=e;e=this.clientGui.deleteSubCanvas(t);this.executeExternalCallback("windowClosed",e)},onWindowCreated:function(e){var t=e;e=this.clientGui.createNewSubCanvas(t);this.executeExternalCallback("windowCreated",e)},onMenuResponse:function(e){var t=e;this.executeExternalCallback("menuResponse",t)},onClientInput:function(e){var t=e,i=t[0],n=t[1][0];this.inputProcess.isKeyboardShortcut(i,n)?this._sendCtrlKey(n.keyCode):this.inputProcess.send(t,i)},onMessage:function(e){var t=e;this.packetProcess.process(t);var i=this;window.checkResultsTimer&&clearTimeout(window.checkResultsTimer),window.checkResultsTimer=window.setTimeout((function(){i.executeExternalCallback("checkResults"),window.vdiLoadTest=!1}),5e3)},onBusConnected:function(e){wdi.SeamlessIntegration&&this.busProcess.requestWindowList()},onBusMessage:function(e){var t=e;this.busProcess.process(t)},onInitAgent:function(e){this.agent.setClientTokens(e),this.agent.sendInitMessage(this),this.reconnecting=!1,this.executeExternalCallback("ready",e)},onMouseMode:function(e){this.clientGui.setMouseMode(e)},onPaste:function(e){this.agent.setClipboard(e)},onStartAudio:function(){this.packetProcess.processors[wdi.SpiceVars.SPICE_CHANNEL_PLAYBACK].startAudio()},onEventLayerCreated:function(e){this.executeExternalCallback("eventLayerCreated",e)},onTimeLapseDetected:function(e){var t=e;this.executeExternalCallback("timeLapseDetected",t)},connect:function(e){wdi.Debug.log("application connect"),this.connectionInfo=e;try{this.spiceConnection.connect(e)}catch(e){wdi.Debug.error("application connect error",e),this.clientGui.showError(e.message)}},reconnect:function(e){this.reconnecting=!0,e.freeze&&this.freeze(),this.dispose(),this.init(),this.run(this.runParams)},freeze:function(){this.clientGui.freeze()},cancelFreeze:function(){this.clientGui.cancelFreeze()},setReconnecting:function(e){this.reconnecting=e},getReconnecting:function(){return this.reconnecting},setExternalCallback:function(e,t){this.externalCallback=[e,t]},executeExternalCallback:function(e,t){this.externalCallback[0].call(this.externalCallback[1],e,t)},sendCommand:function(e,t){switch(e){case"close":this.busProcess.closeWindow(t.hwnd);break;case"move":this.busProcess.moveWindow(t.hwnd,t.x,t.y);break;case"minimize":this.busProcess.minimizeWindow(t.hwnd);break;case"maximize":this.busProcess.maximizeWindow(t.hwnd);break;case"restore":this.busProcess.restoreWindow(t.hwnd);break;case"focus":this.busProcess.focusWindow(t.hwnd);break;case"resize":this.busProcess.resizeWindow(t.hwnd,t.width,t.height);break;case"run":this.busProcess.executeCommand(t.cmd);break;case"setResolution":this.agent.setResolution(t.width,t.height);break;case"getMenu":this.busProcess.getMenu();break;case"reMountNetworkDrive":this.busProcess.reMountNetworkDrive(t.host,t.username,t.password);break;case"refreshFileSystem":this.busProcess.refreshFileSystem();break;default:this.busProcess.sendGenericMessage(e,t)}},enableKeyboard:function(){this.clientGui.enableKeyboard()},disableKeyboard:function(){this.clientGui.disableKeyboard()},enableCtrlC:function(){wdi.KeymapES.setCtrlKey(67,46),wdi.KeymapUS.setCtrlKey(67,46)},enableCtrlV:function(){wdi.KeymapES.setCtrlKey(86,47),wdi.KeymapUS.setCtrlKey(86,47)},disconnect:function(){this.busConnection.disconnect(),this.spiceConnection.disconnect()},setMultimediaTime:function(e){this.multimediaTime=e,this.lastMultimediaTime=Date.now()},sendShortcut:function(e){e===wdi.keyShortcutsHandled.CTRLV?this._sendCtrlKey(86):e===wdi.keyShortcutsHandled.CTRLC&&this._sendCtrlKey(67)},sendCtrlAltDelete:function(){this._sendCtrlKey(225,46)},_sendCtrlKey:function(e,t){this.inputProcess.send(["keydown",[{generated:!0,type:"keydown",keyCode:17,charCode:0}]],"keydown"),this.inputProcess.send(["keydown",[{generated:!0,type:"keydown",keyCode:e,charCode:0}]],"keydown"),t&&this.inputProcess.send(["keydown",[{generated:!0,type:"keydown",keyCode:t,charCode:0}]],"keydown"),this.inputProcess.send(["keyup",[{generated:!0,type:"keyup",keyCode:e,charCode:0}]],"keyup"),t&&this.inputProcess.send(["keyup",[{generated:!0,type:"keyup",keyCode:t,charCode:0}]],"keyup"),this.inputProcess.send(["keyup",[{generated:!0,type:"keyup",keyCode:17,charCode:0}]],"keyup")},dispose:function(){this.disposed=!0,wdi.Debug.log("application dispose"),wdi.ExecutionControl.runQ.clear(),wdi.ExecutionControl.currentProxy=null,wdi.ExecutionControl.sync=!0,this.disableKeyboard(),this.disconnect(),this.packetProcess.dispose(),this.clientGui.dispose(),this.busProcess.clearEvents(),this.busProcess.dispose(),this.busConnection.clearEvents(),this.agent.clearEvents(),this.agent.dispose(),this.timeLapseDetector.clearEvents(),this.timeLapseDetector.dispose(),this.checkActivity.dispose()},onWrongPathError:function(e){this.executeExternalCallback("wrongPathError",e)},onApplicationLaunchedSuccessfully:function(e){this.executeExternalCallback("applicationLaunchedSuccessfully",e)},getKeyboardHandler:function(){return this.clientGui.handleKey},getClientGui:function(){return this.clientGui},setCurrentWindow:function(e){this.clientGui.inputManager.setCurrentWindow(e)},onActivityLost:function(e){this.executeExternalCallback("activityLost",e)},resetActivity:function(){this.checkActivity.resetActivity()},toSpiceResolution:function(e){return{width:e.width*this.pixelRatio,height:e.height*this.pixelRatio,scaleFactor:this.pixelRatio}}}),window.Application=Application,Application.prototype.run=Application.prototype.run,Application.prototype.sendCommand=Application.prototype.sendCommand,Application.prototype.enableKeyboard=Application.prototype.enableKeyboard,Application.prototype.disableKeyboard=Application.prototype.disableKeyboard,Application.prototype.dispose=Application.prototype.dispose,Application.prototype.getKeyboardHandler=Application.prototype.getKeyboardHandler,Application.prototype.getClientGui=Application.prototype.getClientGui,Application.prototype.setCurrentWindow=Application.prototype.setCurrentWindow,Application.prototype.reconnect=Application.prototype.reconnect,Application.prototype.freeze=Application.prototype.freeze,Application.prototype.cancelFreeze=Application.prototype.cancelFreeze,Application.prototype.setReconnecting=Application.prototype.setReconnecting,Application.prototype.getReconnecting=Application.prototype.getReconnecting;
1
+ Application=$.spcExtend(wdi.DomainObject,{spiceConnection:null,clientGui:null,agent:null,externalCallback:null,keyboardEnabled:!0,packetProcess:null,inputProcess:null,multimediaTime:null,lastMultimediaTime:null,busConnection:null,busProcess:null,timeLapseDetector:null,connectionInfo:null,reconnecting:null,checkActivity:null,configs:null,init:function(e){this.disposed=!1,e?this.configs=e:e=this.configs||{},wdi.spiceClientPath=e.spiceClientPath||"",wdi.Debug.log("application init"),wdi.GlobalPool.init(),this.spiceConnection=e.spiceConnection||new wdi.SpiceConnection,this.clientGui=e.clientGui||new wdi.ClientGui({app:this}),this.agent=e.agent||new wdi.Agent({app:this}),this.inputProcess=e.inputProcess||new wdi.InputProcess({clientGui:this.clientGui,spiceConnection:this.spiceConnection}),this.packetProcess=e.packetProcess,this.busConnection=e.busConnection||new wdi.BusConnection,this.busProcess=e.busProcess||new wdi.BusProcess({clientGui:this.clientGui,busConnection:this.busConnection}),this.timeLapseDetector=e.timeLapseDetector||new wdi.TimeLapseDetector,this.checkActivity=e.checkActivity,this.setup(),e.supportHighDPI?(this.clientGui.pixelRatio=window.devicePixelRatio,this.pixelRatio=window.devicePixelRatio):(this.clientGui.pixelRatio=1,this.pixelRatio=1)},run:function(e){if(this.runParams=e,e.hasOwnProperty("seamlessDesktopIntegration")&&(wdi.SeamlessIntegration=e.seamlessDesktopIntegration),!this.packetProcess){var t=!1;!1===e.useWorkers&&(t=new wdi.DisplayProcess({clientGui:this.clientGui,disableMessageBuffering:e.disableMessageBuffering})),this.packetProcess=new wdi.PacketProcess({app:this,clientGui:this.clientGui,agent:this.agent,spiceConnection:this.spiceConnection,inputsProcess:this.inputProcess,displayProcess:t,disableMessageBuffering:e.disableMessageBuffering})}if(this.checkActivity||(this.checkActivity=new wdi.CheckActivity(e.checkActivityInterval),this.checkActivity.addListener("activityLost",this.onActivityLost,this)),window.vdiLoadTest?this.spiceConnection.addListener("message",this.onMessage,this):this.spiceConnection.addListener("message",this.packetProcess.process,this.packetProcess),this.busConnection.connect(e),this.timeLapseDetector.startTimer(),e.canvasMargin&&this.clientGui.setCanvasMargin(e.canvasMargin),e.disableClipboard&&(this.agent.disableClipboard(),this.clientGui.disableClipboard(),this.enableCtrlC(),this.enableCtrlV()),e.layer&&this.clientGui.setLayer(e.layer),this.clientGui.checkFeatures()){wdi.SeamlessIntegration&&this.disableKeyboard(),wdi.Keymap.loadKeyMap(e.layout,this.clientGui.getStuckKeysHandler()),this.setExternalCallback(e.callback,e.context);try{this.connect({host:e.host,port:e.port,protocol:e.protocol,vmHost:e.vmHost,vmPort:e.vmPort,vmid:e.vmid,vmInfoToken:e.vmInfoToken,busHost:e.busHost,token:e.token,connectionControl:e.connectionControl,heartbeatToken:e.heartbeatToken,heartbeatTimeout:e.heartbeatTimeout})}catch(e){this.executeExternalCallback("error",1)}this.clientGui.setClientOffset(e.clientOffset.x,e.clientOffset.y)}e.hasOwnProperty("externalClipboardHandling")&&(this.externalClipoardHandling=e.externalClipboardHandling)},end:function(){},setup:function(){this.spiceConnection.addListener("mouseMode",this.onMouseMode,this),this.spiceConnection.addListener("initAgent",this.onInitAgent,this),this.spiceConnection.addListener("error",this.onDisconnect,this),this.spiceConnection.addListener("channelConnected",this.onChannelConnected,this),this.clientGui.addListener("input",this.onClientInput,this),this.clientGui.addListener("resolution",this.onResolution,this),this.clientGui.addListener("paste",this.onPaste,this),this.clientGui.addListener("startAudio",this.onStartAudio,this),this.clientGui.addListener("eventLayerCreated",this.onEventLayerCreated,this),this.busProcess.addListener("windowCreated",this.onWindowCreated,this),this.busProcess.addListener("windowClosed",this.onWindowClosed,this),this.busProcess.addListener("windowMoved",this.onWindowMoved,this),this.busProcess.addListener("windowResized",this.onWindowResized,this),this.busProcess.addListener("windowFocused",this.onWindowFocused,this),this.busProcess.addListener("windowMinimized",this.onWindowMinimized,this),this.busProcess.addListener("windowRestored",this.onWindowRestored,this),this.busProcess.addListener("windowMaximized",this.onWindowMaximized,this),this.busProcess.addListener("busConnected",this.onBusConnected,this),this.busProcess.addListener("menuResponse",this.onMenuResponse,this),this.busProcess.addListener("networkDriveResponse",this.onNetworkDriveResponse,this),this.busProcess.addListener("wrongPathError",this.onWrongPathError,this),this.busProcess.addListener("applicationLaunchedSuccessfully",this.onApplicationLaunchedSuccessfully,this),this.busProcess.addListener("selectedText",this.onRemoteSelectedText,this),this.busProcess.addListener("copiedText",this.onRemoteCopiedText,this),this.agent.addListener("clipBoardData",this.onClipBoardData,this),this.busConnection.addListener("busMessage",this.onBusMessage,this),this.busConnection.addListener("error",this.onDisconnect,this),this.timeLapseDetector.addListener("timeLapseDetected",this.onTimeLapseDetected,this),this.busProcess.addListener("defaultTypeEvent",this.onDefaultTypeEvent,this)},onChannelConnected:function(e){e===wdi.SpiceVars.SPICE_CHANNEL_INPUTS&&this.clientGui.releaseAllKeys()},onDefaultTypeEvent:function(e){this.executeExternalCallback(e.event,e)},onNetworkDriveResponse:function(e){this.executeExternalCallback("networkDriveResponse",e)},onDisconnect:function(e){var t=e;this.executeExternalCallback("error",t)},onResolution:function(e){this.executeExternalCallback("resolution",e)},onClipBoardData:function(e){this.externalClipoardHandling?this.executeExternalCallback("clipboardEvent",e):this.clientGui.setClipBoardData(e)},onRemoteCopiedText:function(e){this.clientGui.setToLocalClipboard(e)},onRemoteSelectedText:function(e){this.clientGui.setToLocalClipboard(e)},onWindowMinimized:function(e){var t=e;e=this.clientGui.resizeSubCanvas(t);this.executeExternalCallback("windowMinimized",e)},onWindowFocused:function(e){this.executeExternalCallback("windowFocused",e)},onWindowRestored:function(e){var t=e;e=this.clientGui.resizeSubCanvas(t);this.executeExternalCallback("windowRestored",e)},onWindowMaximized:function(e){var t=e;e=this.clientGui.resizeSubCanvas(t);this.executeExternalCallback("windowMaximized",e)},onWindowResized:function(e){var t=e;e=this.clientGui.resizeSubCanvas(t);this.executeExternalCallback("windowResized",e)},onWindowMoved:function(e){var t=e;e=this.clientGui.moveSubCanvas(t);this.executeExternalCallback("windowMoved",e)},onWindowClosed:function(e){var t=e;e=this.clientGui.deleteSubCanvas(t);this.executeExternalCallback("windowClosed",e)},onWindowCreated:function(e){var t=e;e=this.clientGui.createNewSubCanvas(t);this.executeExternalCallback("windowCreated",e)},onMenuResponse:function(e){var t=e;this.executeExternalCallback("menuResponse",t)},onClientInput:function(e){var t=e,i=t[0],n=t[1][0];this.inputProcess.isKeyboardShortcut(i,n)?this._sendCtrlKey(n.keyCode):this.inputProcess.send(t,i)},onMessage:function(e){var t=e;this.packetProcess.process(t);var i=this;window.checkResultsTimer&&clearTimeout(window.checkResultsTimer),window.checkResultsTimer=window.setTimeout((function(){i.executeExternalCallback("checkResults"),window.vdiLoadTest=!1}),5e3)},onBusConnected:function(e){wdi.SeamlessIntegration&&this.busProcess.requestWindowList()},onBusMessage:function(e){var t=e;this.busProcess.process(t)},onInitAgent:function(e){this.agent.setClientTokens(e),this.agent.sendInitMessage(this),this.reconnecting=!1,this.executeExternalCallback("ready",e)},onMouseMode:function(e){this.clientGui.setMouseMode(e)},onPaste:function(e){this.agent.setClipboard(e)},onStartAudio:function(){this.packetProcess.processors[wdi.SpiceVars.SPICE_CHANNEL_PLAYBACK].startAudio()},onEventLayerCreated:function(e){this.executeExternalCallback("eventLayerCreated",e)},onTimeLapseDetected:function(e){var t=e;this.executeExternalCallback("timeLapseDetected",t)},connect:function(e){wdi.Debug.log("application connect"),this.connectionInfo=e;try{this.spiceConnection.connect(e)}catch(e){wdi.Debug.error("application connect error",e),this.clientGui.showError(e.message)}},reconnect:function(e){this.reconnecting=!0,e.freeze&&this.freeze(),this.dispose(),this.init(),this.run(this.runParams)},freeze:function(){this.clientGui.freeze()},cancelFreeze:function(){this.clientGui.cancelFreeze()},setReconnecting:function(e){this.reconnecting=e},getReconnecting:function(){return this.reconnecting},setExternalCallback:function(e,t){this.externalCallback=[e,t]},executeExternalCallback:function(e,t){this.externalCallback[0].call(this.externalCallback[1],e,t)},sendCommand:function(e,t){switch(e){case"close":this.busProcess.closeWindow(t.hwnd);break;case"move":this.busProcess.moveWindow(t.hwnd,t.x,t.y);break;case"minimize":this.busProcess.minimizeWindow(t.hwnd);break;case"maximize":this.busProcess.maximizeWindow(t.hwnd);break;case"restore":this.busProcess.restoreWindow(t.hwnd);break;case"focus":this.busProcess.focusWindow(t.hwnd);break;case"resize":this.busProcess.resizeWindow(t.hwnd,t.width,t.height);break;case"run":this.busProcess.executeCommand(t.cmd);break;case"setResolution":this.agent.setResolution(t.width,t.height);break;case"getMenu":this.busProcess.getMenu();break;case"reMountNetworkDrive":this.busProcess.reMountNetworkDrive(t.host,t.username,t.password);break;case"refreshFileSystem":this.busProcess.refreshFileSystem();break;default:this.busProcess.sendGenericMessage(e,t)}},enableKeyboard:function(){this.clientGui.enableKeyboard()},disableKeyboard:function(){this.clientGui.disableKeyboard()},enableCtrlC:function(){wdi.KeymapES.setCtrlKey(67,46),wdi.KeymapUS.setCtrlKey(67,46)},enableCtrlV:function(){wdi.KeymapES.setCtrlKey(86,47),wdi.KeymapUS.setCtrlKey(86,47)},disconnect:function(){this.busConnection.disconnect(),this.spiceConnection.disconnect()},setMultimediaTime:function(e){this.multimediaTime=e,this.lastMultimediaTime=Date.now()},sendShortcut:function(e){e===wdi.keyShortcutsHandled.CTRLV?this._sendCtrlKey(86):e===wdi.keyShortcutsHandled.CTRLC&&this._sendCtrlKey(67)},sendCtrlAltDelete:function(){this._sendCtrlKey(18,46)},_sendCtrlKey:function(e,t){this.inputProcess.send(["keydown",[{generated:!0,type:"keydown",keyCode:17,charCode:0}]],"keydown"),this.inputProcess.send(["keydown",[{generated:!0,type:"keydown",keyCode:e,charCode:0}]],"keydown"),t&&this.inputProcess.send(["keydown",[{generated:!0,type:"keydown",keyCode:t,charCode:0}]],"keydown"),this.inputProcess.send(["keyup",[{generated:!0,type:"keyup",keyCode:e,charCode:0}]],"keyup"),t&&this.inputProcess.send(["keyup",[{generated:!0,type:"keyup",keyCode:t,charCode:0}]],"keyup"),this.inputProcess.send(["keyup",[{generated:!0,type:"keyup",keyCode:17,charCode:0}]],"keyup")},dispose:function(){this.disposed=!0,wdi.Debug.log("application dispose"),wdi.ExecutionControl.runQ.clear(),wdi.ExecutionControl.currentProxy=null,wdi.ExecutionControl.sync=!0,this.disableKeyboard(),this.disconnect(),this.packetProcess.dispose(),this.clientGui.dispose(),this.busProcess.clearEvents(),this.busProcess.dispose(),this.busConnection.clearEvents(),this.agent.clearEvents(),this.agent.dispose(),this.timeLapseDetector.clearEvents(),this.timeLapseDetector.dispose(),this.checkActivity.dispose()},onWrongPathError:function(e){this.executeExternalCallback("wrongPathError",e)},onApplicationLaunchedSuccessfully:function(e){this.executeExternalCallback("applicationLaunchedSuccessfully",e)},getKeyboardHandler:function(){return this.clientGui.handleKey},getClientGui:function(){return this.clientGui},setCurrentWindow:function(e){this.clientGui.inputManager.setCurrentWindow(e)},onActivityLost:function(e){this.executeExternalCallback("activityLost",e)},resetActivity:function(){this.checkActivity.resetActivity()},toSpiceResolution:function(e){return{width:e.width*this.pixelRatio,height:e.height*this.pixelRatio,scaleFactor:this.pixelRatio}}}),window.Application=Application,Application.prototype.run=Application.prototype.run,Application.prototype.sendCommand=Application.prototype.sendCommand,Application.prototype.enableKeyboard=Application.prototype.enableKeyboard,Application.prototype.disableKeyboard=Application.prototype.disableKeyboard,Application.prototype.dispose=Application.prototype.dispose,Application.prototype.getKeyboardHandler=Application.prototype.getKeyboardHandler,Application.prototype.getClientGui=Application.prototype.getClientGui,Application.prototype.setCurrentWindow=Application.prototype.setCurrentWindow,Application.prototype.reconnect=Application.prototype.reconnect,Application.prototype.freeze=Application.prototype.freeze,Application.prototype.cancelFreeze=Application.prototype.cancelFreeze,Application.prototype.setReconnecting=Application.prototype.setReconnecting,Application.prototype.getReconnecting=Application.prototype.getReconnecting;