{"version":3,"file":"guacamole-gateway-client.mjs","sources":["../../../projects/remote-desktop/src/lib/managed-filesystem.ts","../../../projects/remote-desktop/src/lib/managed-file-upload.ts","../../../projects/remote-desktop/src/lib/tunnel-rest-api.service.ts","../../../projects/remote-desktop/src/lib/managed-filesystem.service.ts","../../../projects/remote-desktop/src/lib/remote-desktop.service.ts","../../../projects/remote-desktop/src/lib/messages/connecting-message.component.ts","../../../projects/remote-desktop/src/lib/messages/disconnected-message.component.ts","../../../projects/remote-desktop/src/lib/messages/error-message.component.ts","../../../projects/remote-desktop/src/lib/file-manager/file-manager.component.ts","../../../projects/remote-desktop/src/lib/file-manager/file-manager.component.html","../../../projects/remote-desktop/src/lib/message/message.component.ts","../../../projects/remote-desktop/src/lib/display/display.component.ts","../../../projects/remote-desktop/src/lib/file-transfer/file-transfer.component.ts","../../../projects/remote-desktop/src/lib/file-transfer/file-transfer.component.html","../../../projects/remote-desktop/src/lib/file-transfer-manager/file-transfer-manager.component.ts","../../../projects/remote-desktop/src/lib/file-transfer-manager/file-transfer-manager.component.html","../../../projects/remote-desktop/src/lib/remote-desktop/remote-desktop.component.ts","../../../projects/remote-desktop/src/lib/status-bar/status-bar.component.ts","../../../projects/remote-desktop/src/lib/status-bar-item/status-bar-item.component.ts","../../../projects/remote-desktop/src/lib/toolbar-item/toolbar-item.component.ts","../../../projects/remote-desktop/src/lib/remote-desktop.module.ts","../../../projects/remote-desktop/src/public-api.ts","../../../projects/remote-desktop/src/guacamole-gateway-client.ts"],"sourcesContent":["import { Client, Object, Tunnel } from \"guacamole-common-ts\";\r\n\r\n/**\r\n * Object which serves as a surrogate interface, encapsulating a Guacamole\r\n * filesystem object while it is active, allowing it to be detached and\r\n * reattached from different client views.\r\n *\r\n * @param [template={}]\r\n *     The object whose properties should be copied within the new\r\n *     ManagedFilesystem.\r\n */\r\nexport class ManagedFilesystem {\r\n  /**\r\n   * The client that originally received the \"filesystem\" instruction\r\n   * that resulted in the creation of this ManagedFilesystem.\r\n   */\r\n  client: Client | undefined;\r\n\r\n  tunnel: Tunnel | undefined\r\n\r\n  /**\r\n   * The Guacamole filesystem object, as received via a \"filesystem\"\r\n   * instruction.\r\n   */\r\n  object: Object | undefined;\r\n\r\n  /**\r\n   * The declared, human-readable name of the filesystem\r\n   *\r\n   * @type String\r\n   */\r\n  name: string | undefined;\r\n\r\n  /**\r\n   * The root directory of the filesystem.\r\n   */\r\n  root: File | undefined;\r\n\r\n  /**\r\n   * The current directory being viewed or manipulated within the\r\n   * filesystem.\r\n   */\r\n  currentDirectory: File | undefined;\r\n\r\n  constructor(template: Partial<ManagedFilesystem>) {\r\n    template = template || {};\r\n    this.tunnel = template.tunnel;\r\n    this.client = template.client;\r\n    this.object = template.object;\r\n    this.name = template.name;\r\n    this.root = template.root;\r\n    this.currentDirectory = template.currentDirectory;\r\n  }\r\n}\r\n\r\n/**\r\n * A file within a ManagedFilesystem. Each ManagedFilesystem.File provides\r\n * sufficient information for retrieval or replacement of the file's\r\n * contents, as well as the file's name and type.\r\n *\r\n * @param [template={}]\r\n *     The object whose properties should be copied within the new\r\n *     ManagedFilesystem.File.\r\n */\r\nexport class File {\r\n  /**\r\n   * The mimetype of the data contained within this file.\r\n   */\r\n  mimetype: string;\r\n\r\n  /**\r\n   * The name of the stream representing this files contents within its\r\n   * associated filesystem object.\r\n   */\r\n  streamName: string;\r\n\r\n  /**\r\n   * The type of this file. All legal file type strings are defined\r\n   * within FileType.\r\n   */\r\n  type: string;\r\n\r\n  /**\r\n   * The name of this file.\r\n   */\r\n  name: string;\r\n\r\n  /**\r\n   * The parent directory of this file. In the case of the root\r\n   * directory, this will be null.\r\n   */\r\n  parent: File;\r\n\r\n  /**\r\n   * Map of all known files containined within this file by name. This is\r\n   * only applicable to directories.\r\n   */\r\n  files: { [key: string]: File };\r\n\r\n  constructor(template: Partial<File>) {\r\n    this.mimetype = template.mimetype;\r\n    this.streamName = template.streamName;\r\n    this.type = template.type;\r\n    this.name = template.name;\r\n    this.parent = template.parent;\r\n    this.files = template.files;\r\n  }\r\n}\r\n\r\nexport const FileType = {\r\n\r\n  /**\r\n   * A normal file. As ManagedFilesystem does not currently represent any\r\n   * other non-directory types of files, like symbolic links, this type\r\n   * string may be used for any non-directory file.\r\n   *\r\n   * @type String\r\n   */\r\n  NORMAL: 'NORMAL',\r\n\r\n  /**\r\n   * A directory.\r\n   *\r\n   * @type String\r\n   */\r\n  DIRECTORY: 'DIRECTORY'\r\n\r\n};\r\n","import { Status } from \"guacamole-common-ts\";\r\n\r\n\r\n/**\r\n * Object which serves as a surrogate interface, encapsulating a Guacamole\r\n * file upload while it is active, allowing it to be detached and\r\n * reattached from different client views.\r\n *\r\n * @constructor\r\n * @param [template={}]\r\n *     The object whose properties should be copied within the new\r\n *     ManagedFileUpload.\r\n */\r\nexport class ManagedFileUpload {\r\n  /**\r\n   * The mimetype of the file being transferred.\r\n   */\r\n  mimetype: string;\r\n\r\n  /**\r\n   * The filename of the file being transferred.\r\n   */\r\n  filename: string;\r\n\r\n  /**\r\n   * The number of bytes transferred so far.\r\n   */\r\n  progress: number;\r\n\r\n  /**\r\n   * The total number of bytes in the file.\r\n   */\r\n  length: number;\r\n\r\n  /**\r\n   * The current state of the file transfer stream.\r\n   */\r\n  transferState: ManagedFileTransferState;\r\n\r\n  constructor(template: Partial<ManagedFileUpload>) {\r\n    template = template || {};\r\n    this.mimetype = template.mimetype;\r\n    this.filename = template.filename;\r\n    this.progress = template.progress;\r\n    this.length = template.length;\r\n    this.transferState = template.transferState || new ManagedFileTransferState(null);\r\n  }\r\n\r\n  isCompleted(): boolean {\r\n    return this.transferState?.streamState === StreamState.CLOSED;\r\n  }\r\n}\r\n\r\n/**\r\n * Object which represents the state of a Guacamole stream, including any\r\n * error conditions.\r\n *\r\n * @constructor\r\n * @param [template={}]\r\n *     The object whose properties should be copied within the new\r\n *     ManagedFileTransferState.\r\n */\r\nexport class ManagedFileTransferState {\r\n  /**\r\n   * The current stream state. Valid values are described by StreamState.\r\n   * @default StreamState.IDLE\r\n   */\r\n  streamState: string;\r\n\r\n  /**\r\n   * The status code of the current error condition, if streamState\r\n   * is ERROR. For all other streamState values, this will be\r\n   * @link{Status.Code.SUCCESS}.\r\n   *\r\n   * @default Status.Code.SUCCESS\r\n   */\r\n  statusCode: number;\r\n\r\n  constructor(template: Partial<ManagedFileTransferState>) {\r\n    template = template || {};\r\n    this.streamState = template.streamState || StreamState.IDLE;\r\n    this.statusCode = template.statusCode || Status.Code.SUCCESS;\r\n  }\r\n\r\n  /**\r\n   * Sets the current transfer state and, if given, the associated status\r\n   * code. If an error is already represented, this function has no effect.\r\n   *\r\n   * @param streamState\r\n   *     The stream state to assign to the given ManagedFileTransferState, as\r\n   *     listed within StreamState.\r\n   *\r\n   * @param [statusCode]\r\n   *     The status code to assign to the given ManagedFileTransferState, if\r\n   *     any, as listed within Status.Code. If no status code is\r\n   *     specified, the status code of the ManagedFileTransferState is not\r\n   *     touched.\r\n   */\r\n  setStreamState(streamState: string, statusCode: number) {\r\n\r\n    // Do not set state after an error is registered\r\n    if (this.streamState === StreamState.ERROR)\r\n      return;\r\n\r\n    // Update stream state\r\n    this.streamState = streamState;\r\n\r\n    // Set status code, if given\r\n    if (statusCode)\r\n      this.statusCode = statusCode;\r\n\r\n  };\r\n}\r\n\r\n/**\r\n * Valid stream state strings. Each state string is associated with a\r\n * specific state of a Guacamole stream.\r\n */\r\nexport const StreamState = {\r\n  /**\r\n   * The stream has not yet been opened.\r\n   *\r\n   * @type String\r\n   */\r\n  IDLE: 'IDLE',\r\n\r\n  /**\r\n   * The stream has been successfully established. Data can be sent or\r\n   * received.\r\n   *\r\n   * @type String\r\n   */\r\n  OPEN: 'OPEN',\r\n\r\n  /**\r\n   * The stream has terminated successfully. No errors are indicated.\r\n   *\r\n   * @type String\r\n   */\r\n  CLOSED: 'CLOSED',\r\n\r\n  /**\r\n   * The stream has terminated due to an error. The associated error code\r\n   * is stored in statusCode.\r\n   *\r\n   * @type String\r\n   */\r\n  ERROR: 'ERROR'\r\n}\r\n","import {Inject, Injectable} from '@angular/core';\r\nimport {DOCUMENT} from '@angular/common';\r\nimport {HttpClient} from '@angular/common/http';\r\nimport {take} from 'rxjs/operators';\r\nimport { InputStream, OutputStream, Status } from 'guacamole-common-ts';\r\n\r\n/**\r\n * The number of milliseconds to wait after a stream download has completed\r\n * before cleaning up related DOM resources, if the browser does not\r\n * otherwise notify us that cleanup is safe.\r\n */\r\nconst DOWNLOAD_CLEANUP_WAIT = 5000;\r\n\r\n/**\r\n * Service for operating on the tunnels of in-progress connections (and their\r\n * underlying objects) via the REST API.\r\n */\r\n@Injectable({\r\n  providedIn: 'root'\r\n})\r\nexport class TunnelRestApiService {\r\n  private apiUrl: string;\r\n  private token: string;\r\n  private window: Window;\r\n\r\n  constructor(\r\n    @Inject(DOCUMENT) private document: Document,\r\n    private http: HttpClient,\r\n  ) {\r\n    this.window = this.document.defaultView;\r\n  }\r\n\r\n  initialize(apiUrl: string) {\r\n    this.apiUrl = apiUrl;\r\n  }\r\n\r\n  setToken(token: string) {\r\n    this.token = token;\r\n  }\r\n\r\n  /**\r\n   * Makes a request to the REST API to get the list of all tunnels\r\n   * associated with in-progress connections, returning a promise that\r\n   * provides an array of their UUIDs (strings) if successful.\r\n   *\r\n   * @returns {Promise.<String[]>>}\r\n   *     A promise which will resolve with an array of UUID strings, uniquely\r\n   *     identifying each active tunnel.\r\n   */\r\n  getTunnels() {\r\n    this.checkServiceState();\r\n    return this.http.get(this.apiUrl + '/api/session/tunnels', {\r\n      headers: {'Guacamole-Token': this.token},\r\n    }).pipe(take(1)).toPromise();\r\n  };\r\n\r\n  /**\r\n   * Makes a request to the REST API to retrieve the underlying protocol of\r\n   * the connection associated with a particular tunnel, returning a promise\r\n   * that provides a @link{Protocol} object if successful.\r\n   *\r\n   * @param {String} tunnel\r\n   *     The UUID of the tunnel associated with the Guacamole connection\r\n   *     whose underlying protocol is being retrieved.\r\n   *\r\n   * @returns {Promise.<Protocol>}\r\n   *     A promise which will resolve with a @link{Protocol} object upon\r\n   *     success.\r\n   */\r\n  getProtocol(tunnel: string) {\r\n    this.checkServiceState();\r\n    return this.http.get(this.apiUrl + '/api/session/tunnels/' + encodeURIComponent(tunnel) + '/protocol', {\r\n      params: {\r\n        token: this.token\r\n      }\r\n    }).pipe(take(1)).toPromise();\r\n  };\r\n\r\n  /**\r\n   * Retrieves the set of sharing profiles that the current user can use to\r\n   * share the active connection of the given tunnel.\r\n   *\r\n   * @param {String} tunnel\r\n   *     The UUID of the tunnel associated with the Guacamole connection\r\n   *     whose sharing profiles are being retrieved.\r\n   *\r\n   * @returns {Promise.<Object.<String, SharingProfile>>}\r\n   *     A promise which will resolve with a map of @link{SharingProfile}\r\n   *     objects where each key is the identifier of the corresponding\r\n   *     sharing profile.\r\n   */\r\n  getSharingProfiles(tunnel: string) {\r\n    this.checkServiceState();\r\n    return this.http.get(this.apiUrl + '/api/session/tunnels/' + encodeURIComponent(tunnel)\r\n      + '/activeConnection/connection/sharingProfiles', {\r\n      headers: {'Guacamole-Token': this.token},\r\n    }).pipe(take(1)).toPromise();\r\n  };\r\n\r\n  /**\r\n   * Makes a request to the REST API to generate credentials which have\r\n   * access strictly to the active connection associated with the given\r\n   * tunnel, using the restrictions defined by the given sharing profile,\r\n   * returning a promise that provides the resulting @link{UserCredentials}\r\n   * object if successful.\r\n   *\r\n   * @param {String} tunnel\r\n   *     The UUID of the tunnel associated with the Guacamole connection\r\n   *     being shared.\r\n   *\r\n   * @param {String} sharingProfile\r\n   *     The identifier of the connection object dictating the\r\n   *     semantics/restrictions which apply to the shared session.\r\n   *\r\n   * @returns {Promise.<UserCredentials>}\r\n   *     A promise which will resolve with a @link{UserCredentials} object\r\n   *     upon success.\r\n   */\r\n  getSharingCredentials(tunnel: string, sharingProfile: string) {\r\n    this.checkServiceState();\r\n    return this.http.get(this.apiUrl + '/api/session/tunnels/' + encodeURIComponent(tunnel)\r\n      + '/activeConnection/sharingCredentials/'\r\n      + encodeURIComponent(sharingProfile), {\r\n      headers: {'Guacamole-Token': this.token},\r\n    }).pipe(take(1)).toPromise();\r\n  };\r\n\r\n  /**\r\n   * Sanitize a filename, replacing all URL path seperators with safe\r\n   * characters.\r\n   *\r\n   * @param filename\r\n   *     An unsanitized filename that may need cleanup.\r\n   *\r\n   * @returns\r\n   *     The sanitized filename.\r\n   */\r\n  static sanitizeFilename(filename: string) {\r\n    return filename.replace(/[\\\\\\/]+/g, '_');\r\n  };\r\n\r\n  /**\r\n   * Makes a request to the REST API to retrieve the contents of a stream\r\n   * which has been created within the active Guacamole connection associated\r\n   * with the given tunnel. The contents of the stream will automatically be\r\n   * downloaded by the browser.\r\n   *\r\n   * WARNING: Like Guacamole's various reader implementations, this function\r\n   * relies on assigning an \"onend\" handler to the stream object for the sake\r\n   * of cleaning up resources after the stream closes. If the \"onend\" handler\r\n   * is overwritten after this function returns, resources may not be\r\n   * properly cleaned up.\r\n   *\r\n   * @param {String} tunnelUuid\r\n   *     The UUID of the tunnel associated with the Guacamole connection\r\n   *     whose stream should be downloaded as a file.\r\n   *\r\n   * @param {InputStream} stream\r\n   *     The stream whose contents should be downloaded.\r\n   *\r\n   * @param {String} mimetype\r\n   *     The mimetype of the stream being downloaded. This is currently\r\n   *     ignored, with the download forced by using\r\n   *     \"application/octet-stream\".\r\n   *\r\n   * @param {String} filename\r\n   *     The filename that should be given to the downloaded file.\r\n   */\r\n  downloadStream(tunnelUuid: string, stream: InputStream, mimetype: string, filename: string) {\r\n    this.checkServiceState();\r\n    const w = this.window;\r\n\r\n    // Build download URL\r\n    var url = this.apiUrl\r\n      + '/api/session/tunnels/' + encodeURIComponent(tunnelUuid)\r\n      + '/streams/' + encodeURIComponent(stream.index)\r\n      + '/' + encodeURIComponent(TunnelRestApiService.sanitizeFilename(filename))\r\n      + '?token=' + encodeURIComponent(this.token);\r\n\r\n    // Create temporary hidden iframe to facilitate download\r\n    var iframe = document.createElement('iframe');\r\n    iframe.style.position = 'fixed';\r\n    iframe.style.border = 'none';\r\n    iframe.style.width = '1px';\r\n    iframe.style.height = '1px';\r\n    iframe.style.left = '-1px';\r\n    iframe.style.top = '-1px';\r\n\r\n    // The iframe MUST be part of the DOM for the download to occur\r\n    document.body.appendChild(iframe);\r\n\r\n    // Automatically remove iframe from DOM when download completes, if\r\n    // browser supports tracking of iframe downloads via the \"load\" event\r\n    iframe.onload = function downloadComplete() {\r\n      document.body.removeChild(iframe);\r\n    };\r\n\r\n    // Acknowledge (and ignore) any received blobs\r\n    stream.onblob = function acknowledgeData() {\r\n      stream.sendAck('OK', Status.Code.SUCCESS);\r\n    };\r\n\r\n    // Automatically remove iframe from DOM a few seconds after the stream\r\n    // ends, in the browser does NOT fire the \"load\" event for downloads\r\n    stream.onend = function downloadComplete() {\r\n      w.setTimeout(function cleanupIframe() {\r\n        if (iframe.parentElement) {\r\n          document.body.removeChild(iframe);\r\n        }\r\n      }, DOWNLOAD_CLEANUP_WAIT);\r\n    };\r\n\r\n    // Begin download\r\n    iframe.src = url;\r\n  }\r\n\r\n  /**\r\n   * Makes a request to the REST API to send the contents of the given file\r\n   * along a stream which has been created within the active Guacamole\r\n   * connection associated with the given tunnel. The contents of the file\r\n   * will automatically be split into individual \"blob\" instructions, as if\r\n   * sent by the connected Guacamole client.\r\n   *\r\n   * @param {String} tunnel\r\n   *     The UUID of the tunnel associated with the Guacamole connection\r\n   *     whose stream should receive the given file.\r\n   *\r\n   * @param {OutputStream} stream\r\n   *     The stream that should receive the given file.\r\n   *\r\n   * @param {File} file\r\n   *     The file that should be sent along the given stream.\r\n   *\r\n   * @param {Function} [progressCallback]\r\n   *     An optional callback which, if provided, will be invoked as the\r\n   *     file upload progresses. The current position within the file, in\r\n   *     bytes, will be provided to the callback as the sole argument.\r\n   *\r\n   * @return {Promise}\r\n   *     A promise which resolves when the upload has completed, and is\r\n   *     rejected with an Error if the upload fails. The Guacamole protocol\r\n   *     status code describing the failure will be included in the Error if\r\n   *     available. If the status code is available, the type of the Error\r\n   *     will be STREAM_ERROR.\r\n   */\r\n  uploadToStream(tunnel: string, stream: OutputStream, file: File, progressCallback: (a: any) => void) {\r\n    return new Promise<void>((resolve, reject) => {\r\n\r\n      // Build upload URL\r\n      var url = this.apiUrl\r\n        + '/api/session/tunnels/' + encodeURIComponent(tunnel)\r\n        + '/streams/' + encodeURIComponent(stream.index)\r\n        + '/' + encodeURIComponent(TunnelRestApiService.sanitizeFilename(file.name))\r\n        + '?token=' + encodeURIComponent(this.token);\r\n\r\n      var xhr = new XMLHttpRequest();\r\n\r\n      // Invoke provided callback if upload tracking is supported\r\n      if (progressCallback && xhr.upload) {\r\n        xhr.upload.addEventListener('progress', function updateProgress(e) {\r\n          progressCallback(e.loaded);\r\n        });\r\n      }\r\n\r\n      // Resolve/reject promise once upload has stopped\r\n      xhr.onreadystatechange = function uploadStatusChanged() {\r\n\r\n        // Ignore state changes prior to completion\r\n        if (xhr.readyState !== 4)\r\n          return;\r\n\r\n        // Resolve if HTTP status code indicates success\r\n        if (xhr.status >= 200 && xhr.status < 300) {\r\n          resolve();\r\n        }\r\n        // Parse and reject with resulting JSON error\r\n        else if (xhr.getResponseHeader('Content-Type') === 'application/json') {\r\n          reject(JSON.parse(xhr.responseText));\r\n        }\r\n        // Warn of lack of permission of a proxy rejects the upload\r\n        else if (xhr.status >= 400 && xhr.status < 500) {\r\n          reject({\r\n            'type': 'STREAM_ERROR',\r\n            'statusCode': Status.Code.CLIENT_FORBIDDEN,\r\n            'message': 'HTTP ' + xhr.status\r\n          });\r\n        }\r\n        // Assume internal error for all other cases\r\n        else {\r\n          reject({\r\n            'type': 'STREAM_ERROR',\r\n            'statusCode': Status.Code.INTERNAL_ERROR,\r\n            'message': 'HTTP ' + xhr.status\r\n          });\r\n        }\r\n      };\r\n\r\n      // Perform upload\r\n      xhr.open('POST', url, true);\r\n      xhr.send(file);\r\n    });\r\n  };\r\n\r\n  private checkServiceState() {\r\n    if (!this.apiUrl) {\r\n      throw new Error('TunnelRestApiService not initialized yet');\r\n    }\r\n    if (!this.token) {\r\n      throw new Error('Token not yet set in TunnelRestApiService')\r\n    }\r\n  }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {File, FileType, ManagedFilesystem} from './managed-filesystem';\r\nimport {TunnelRestApiService} from './tunnel-rest-api.service';\r\nimport { Client, JSONReader, Object, Status, Tunnel } from 'guacamole-common-ts';\r\n\r\n@Injectable({\r\n  providedIn: 'root'\r\n})\r\nexport class ManagedFilesystemService {\r\n\r\n  constructor(\r\n    private tunnelService: TunnelRestApiService,\r\n  ) {\r\n  }\r\n\r\n  /**\r\n   * Creates a new ManagedFilesystem instance from the given Object\r\n   * and human-readable name. Upon creation, a request to populate the\r\n   * contents of the root directory will be automatically dispatched.\r\n   *\r\n   * @param tunnel\r\n   * @param client\r\n   *     The client that originally received the \"filesystem\" instruction\r\n   *     that resulted in the creation of this ManagedFilesystem.\r\n   *\r\n   * @param object\r\n   *     The Object defining the filesystem.\r\n   *\r\n   * @param name\r\n   *     A human-readable name for the filesystem.\r\n   *\r\n   * @returns\r\n   *     The newly-created ManagedFilesystem.\r\n   */\r\n  async createInstance(\r\n    tunnel: Tunnel,\r\n    client: Client,\r\n    object: Object,\r\n    name: string,\r\n  ): Promise<ManagedFilesystem> {\r\n    const fs = new ManagedFilesystem({\r\n      tunnel: tunnel,\r\n      client: client,\r\n      object: object,\r\n      name: name,\r\n      root: new File({\r\n        mimetype: Object.STREAM_INDEX_MIMETYPE,\r\n        streamName: Object.ROOT_STREAM,\r\n        type: FileType.DIRECTORY\r\n      }),\r\n    });\r\n\r\n    await this.refresh(fs, fs.root);\r\n    return fs;\r\n  }\r\n\r\n\r\n  /**\r\n   * Refreshes the contents of the given file, if that file is a directory.\r\n   * Only the immediate children of the file are refreshed. Files further\r\n   * down the directory tree are not refreshed.\r\n   *\r\n   * @param fs\r\n   *     The filesystem associated with the file being refreshed.\r\n   *\r\n   * @param file\r\n   *     The file being refreshed.\r\n   */\r\n  async refresh(fs: ManagedFilesystem, file: File) {\r\n    return new Promise<void>((resolve, reject) => {\r\n      // Do not attempt to refresh the contents of directories (you mean files? misleading comment?)\r\n      if (file.mimetype !== Object.STREAM_INDEX_MIMETYPE) {\r\n        reject(new Error('mimetype of requested file is not STREAM_INDEX_MIMETYPE'));\r\n      }\r\n\r\n      // Request contents of given file\r\n      fs.object.requestInputStream(file.streamName, function handleStream(stream, mimetype) {\r\n\r\n        // Ignore stream if mimetype is wrong\r\n        if (mimetype !== Object.STREAM_INDEX_MIMETYPE) {\r\n          stream.sendAck('Unexpected mimetype', Status.Code.UNSUPPORTED);\r\n          reject(new Error('mimetype of returned file is not STREAM_INDEX_MIMETYPE'));\r\n        }\r\n\r\n        // Signal server that data is ready to be received\r\n        stream.sendAck('Ready', Status.Code.SUCCESS);\r\n\r\n        // Read stream as JSON\r\n        var reader = new JSONReader(stream);\r\n\r\n        // Acknowledge received JSON blobs\r\n        reader.onprogress = function onprogress() {\r\n          stream.sendAck('Received', Status.Code.SUCCESS);\r\n        };\r\n\r\n        // Reset contents of directory\r\n        reader.onend = function jsonReady() {\r\n          file.files = {};\r\n\r\n          // Determine the expected filename prefix of each stream\r\n          var expectedPrefix = file.streamName;\r\n          if (expectedPrefix.charAt(expectedPrefix.length - 1) !== '/')\r\n            expectedPrefix += '/';\r\n\r\n          // For each received stream name\r\n          var mimetypes = reader.getJSON();\r\n          for (var name in mimetypes) {\r\n\r\n            // Assert prefix is correct\r\n            if (name.substring(0, expectedPrefix.length) !== expectedPrefix)\r\n              continue;\r\n\r\n            // Extract filename from stream name\r\n            var filename = name.substring(expectedPrefix.length);\r\n\r\n            // Deduce type from mimetype\r\n            var type = FileType.NORMAL;\r\n            if (mimetypes[name] === Object.STREAM_INDEX_MIMETYPE)\r\n              type = FileType.DIRECTORY;\r\n\r\n            // Add file entry\r\n            file.files[filename] = new File({\r\n              mimetype: mimetypes[name],\r\n              streamName: name,\r\n              type: type,\r\n              parent: file,\r\n              name: filename\r\n            });\r\n          }\r\n\r\n          resolve();\r\n        };\r\n      })\r\n    });\r\n  }\r\n\r\n  /**\r\n   * Downloads the given file from the server using the given Guacamole\r\n   * client and filesystem. The browser will automatically start the\r\n   * download upon completion of this function.\r\n   *\r\n   * @param fs\r\n   *     The ManagedFilesystem from which the file is to be downloaded. Any\r\n   *     path information provided must be relative to this filesystem.\r\n   *\r\n   * @param path\r\n   *     The full, absolute path of the file to download, retrieved from file.streamName.\r\n   */\r\n  startFileDownload(fs: ManagedFilesystem, path: string) {\r\n    // Request download\r\n    const tunnel = fs.tunnel;\r\n    const tunnelService = this.tunnelService;\r\n    fs.object.requestInputStream(path, function downloadStreamReceived(stream, mimetype) {\r\n\r\n      // Parse filename from string\r\n      var filename = path.match(/(.*[\\\\/])?(.*)/)[2];\r\n\r\n      // Start download\r\n      tunnelService.downloadStream(tunnel.uuid, stream, mimetype, filename);\r\n    });\r\n  }\r\n\r\n  /**\r\n   * Changes the current directory of the given filesystem, automatically\r\n   * refreshing the contents of that directory.\r\n   *\r\n   * @param fs\r\n   *     The filesystem whose current directory should be changed.\r\n   *\r\n   * @param file\r\n   *     The directory to change to.\r\n   */\r\n  async changeDirectory(fs: ManagedFilesystem, file: File) {\r\n    // Refresh contents\r\n    await this.refresh(fs, file);\r\n\r\n    // Set current directory\r\n    fs.currentDirectory = file;\r\n  }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {HttpParams} from '@angular/common/http';\r\nimport {BehaviorSubject, ReplaySubject, Subject, Observable} from 'rxjs';\r\nimport {File as ManagedFile, FileType, ManagedFilesystem} from './managed-filesystem';\r\nimport {ManagedFilesystemService} from './managed-filesystem.service';\r\nimport {ManagedFileTransferState, ManagedFileUpload, StreamState} from './managed-file-upload';\r\nimport { TunnelRestApiService } from './tunnel-rest-api.service';\r\nimport { Client, Tunnel, Object, Status, StringReader, InputStream } from 'guacamole-common-ts';\r\nexport * as Guacamole from 'guacamole-common-ts';\r\n\r\n/**\r\n * Manages the connection to the remote desktop\r\n */\r\n@Injectable({\r\n  providedIn: 'root',\r\n})\r\nexport class RemoteDesktopService {\r\n  static STATE = {\r\n    /**\r\n     * The machine connection has not yet been attempted.\r\n     */\r\n    IDLE: 'IDLE',\r\n\r\n    /**\r\n     * The machine connection is being established.\r\n     */\r\n    CONNECTING: 'CONNECTING',\r\n\r\n    /**\r\n     * The machine connection has been successfully established, and the\r\n     * client is now waiting for receipt of initial graphical data.\r\n     */\r\n    WAITING: 'WAITING',\r\n\r\n    /**\r\n     * The Guacamole connection has been successfully established, and\r\n     * initial graphical data has been received.\r\n     */\r\n    CONNECTED: 'CONNECTED',\r\n\r\n    /**\r\n     * The machine connection has terminated successfully. No errors are\r\n     * indicated.\r\n     */\r\n    DISCONNECTED: 'DISCONNECTED',\r\n\r\n    /**\r\n     * The machine connection has terminated due to an error reported by\r\n     * the client. The associated error code is stored in statusCode.\r\n     *\r\n     */\r\n    CLIENT_ERROR: 'CLIENT_ERROR',\r\n\r\n    /**\r\n     * The machine connection has terminated due to an error reported by\r\n     * the tunnel. The associated error code is stored in statusCode.\r\n     */\r\n    TUNNEL_ERROR: 'TUNNEL_ERROR',\r\n  };\r\n\r\n  /**\r\n   * Remote desktop connection state observable\r\n   * Subscribe to this if you want to be notified when the connection state changes\r\n   */\r\n  public onStateChange = new BehaviorSubject(RemoteDesktopService.STATE.IDLE);\r\n\r\n  /**\r\n   * Remote desktop clipboard observable.\r\n   * Subscribe to this if you want to be notified if text has been cut/copied within\r\n   * the remote desktop.\r\n   */\r\n  public onRemoteClipboardData = new ReplaySubject(1);\r\n\r\n  public onKeyboardReset = new BehaviorSubject<boolean>(true);\r\n\r\n  public onFocused = new BehaviorSubject<boolean>(true);\r\n\r\n  public onFullScreen = new BehaviorSubject<boolean>(false);\r\n\r\n  public onReconnect = new Subject<boolean>();\r\n\r\n  /**\r\n   * When an instruction is received from the tunnel\r\n   */\r\n  public onTunnelInstruction = new BehaviorSubject<{\r\n    opcode: string;\r\n    parameters: any;\r\n  }>(null);\r\n\r\n  /**\r\n   * The actual underlying remote desktop client\r\n   */\r\n  private client: Client;\r\n\r\n  /**\r\n   * The tunnel being used by the underlying remote desktop client\r\n   */\r\n  private tunnel: Tunnel;\r\n\r\n  /**\r\n   * All currently-exposed filesystems. When the Guacamole server exposes\r\n   * a filesystem object, that object will be made available as a\r\n   * ManagedFilesystem within this array.\r\n   */\r\n  private filesystems: ManagedFilesystem[] = [];\r\n\r\n  private subjectFilesystems = new ReplaySubject<ManagedFilesystem>();\r\n\r\n  /**\r\n   * All uploaded files. As files are uploaded, their progress can be\r\n   * observed through the elements of this array. It is intended that\r\n   * this array be manipulated externally as needed.\r\n   */\r\n  private uploads: ManagedFileUpload[] = [];\r\n\r\n  constructor(\r\n    private filesystemService: ManagedFilesystemService,\r\n    private tunnelRestApiService: TunnelRestApiService,\r\n  ) {\r\n  }\r\n\r\n  /**\r\n   * Set up the manager\r\n   * @param t  WebsocketTunnel, HTTPTunnel or ChainedTunnel\r\n   */\r\n  public initialize(t: Tunnel) {\r\n    this.tunnel = t;\r\n    this.client = new Client(this.tunnel);\r\n  }\r\n\r\n  /**\r\n   * Get the guacamole connection state\r\n   */\r\n  public getState() {\r\n    return this.onStateChange.getValue();\r\n  }\r\n\r\n  /**\r\n   * Check to see if the given state equals the current state\r\n   * @param state\r\n   */\r\n  public isState(state: string): boolean {\r\n    return state === this.onStateChange.getValue();\r\n  }\r\n\r\n  /**\r\n   * Set the display focus\r\n   * @param newFocused\r\n   */\r\n  public setFocused(newFocused: boolean) {\r\n    this.onFocused.next(newFocused);\r\n  }\r\n\r\n  /**\r\n   * Set full screen\r\n   * @param newFullScreen\r\n   */\r\n  public setFullScreen(newFullScreen: boolean) {\r\n    this.onFullScreen.next(newFullScreen);\r\n  }\r\n\r\n  /**\r\n   * Is the display full screen?\r\n   */\r\n  public isFullScreen(): boolean {\r\n    return this.onFullScreen.getValue();\r\n  }\r\n\r\n  /**\r\n   * Is the tunnel connected?\r\n   */\r\n  public isConnected(): boolean {\r\n    return (\r\n      this.onStateChange.getValue() === RemoteDesktopService.STATE.CONNECTED\r\n    );\r\n  }\r\n\r\n  /**\r\n   * Get the guacamole client\r\n   */\r\n  public getClient(): Client {\r\n    return this.client;\r\n  }\r\n\r\n  /**\r\n   * Get the guacamole tunnel\r\n   */\r\n  public getTunnel(): Tunnel {\r\n    return this.tunnel;\r\n  }\r\n\r\n  /**\r\n   * Get the filesystems published by guacamole\r\n   */\r\n  public getFilesystems(): Observable<ManagedFilesystem> {\r\n    return this.subjectFilesystems.asObservable();\r\n  }\r\n\r\n  /**\r\n   * Generate a thumbnail\r\n   * @param {number} width  The width of the thumbnail\r\n   * @param {number} height The height of the thumbnail\r\n   * @returns {string} An image data url\r\n   */\r\n  public createThumbnail(width: number = 340, height: number = 240): string {\r\n    const display = this.client.getDisplay();\r\n    if (display && display.getWidth() > 0 && display.getHeight() > 0) {\r\n      // Get screenshot\r\n      const canvas = display.flatten();\r\n      const scale = Math.min(width / canvas.width, height / canvas.height, 1);\r\n\r\n      // Create thumbnail canvas\r\n      const thumbnail = document.createElement('canvas');\r\n      thumbnail.width = canvas.width * scale;\r\n      thumbnail.height = canvas.height * scale;\r\n\r\n      // Scale screenshot to thumbnail\r\n      const context = thumbnail.getContext('2d');\r\n      context.drawImage(\r\n        canvas,\r\n        0,\r\n        0,\r\n        canvas.width,\r\n        canvas.height,\r\n        0,\r\n        0,\r\n        thumbnail.width,\r\n        thumbnail.height\r\n      );\r\n      return thumbnail.toDataURL('image/png');\r\n    }\r\n    return null;\r\n  }\r\n\r\n  /**\r\n   * Generate a screenshot\r\n   * @param {blob} done Callback with the screenshot blob data\r\n   */\r\n  public createScreenshot(done: any): void {\r\n    const display = this.client.getDisplay();\r\n    if (display && display.getWidth() > 0 && display.getHeight() > 0) {\r\n      const canvas = display.flatten();\r\n      return canvas.toBlob(done);\r\n    }\r\n    done(null);\r\n  }\r\n\r\n  /**\r\n   * Send text to the remote clipboard\r\n   * @param {string} text Clipboard text to send\r\n   */\r\n  public sendRemoteClipboardData(text: string) {\r\n    if (text) {\r\n      this.onRemoteClipboardData.next(text);\r\n      this.client.setClipboard(text);\r\n    }\r\n  }\r\n\r\n  /**\r\n   * Reset the keyboard\r\n   * This will release all keys\r\n   */\r\n  public resetKeyboard(): void {\r\n    this.onKeyboardReset.next(true);\r\n  }\r\n\r\n  /**\r\n   * Disconnect from the remote desktop\r\n   */\r\n  public disconnect(): void {\r\n    this.client.disconnect();\r\n  }\r\n\r\n  /**\r\n   * Connect to the remote desktop\r\n   */\r\n  public connect(parameters: guac_params): void {\r\n    const configuration = this.buildParameters(parameters);\r\n    this.client.connect(configuration);\r\n    this.bindEventHandlers();\r\n  }\r\n\r\n  /**\r\n   * Uploads the given file to the server through this client.\r\n   * The file transfer can be monitored through the corresponding entry in\r\n   * the uploads array of the given managedClient.\r\n   *\r\n   * @param file\r\n   *     The file to upload.\r\n   *\r\n   * @param [fs]\r\n   *     The filesystem to upload the file to, if any. If not specified, the\r\n   *     file will be sent as a generic Guacamole file stream.\r\n   *\r\n   * @param [directory=fs.currentDirectory]\r\n   *     The directory within the given filesystem to upload the file to. If\r\n   *     not specified, but a filesystem is given, the current directory of\r\n   *     that filesystem will be used.\r\n   */\r\n  public uploadFile(file: File, fs: ManagedFilesystem, directory: ManagedFile): ManagedFileUpload {\r\n    if (directory.type !== FileType.DIRECTORY) {\r\n      throw new Error('upload destination is not a directory')\r\n    }\r\n\r\n    // Use generic Guacamole file streams by default\r\n    let object: Object = null;\r\n    let streamName: string = null;\r\n\r\n    // If a filesystem is given, determine the destination object and stream\r\n    if (fs) {\r\n      object = fs.object;\r\n      streamName = (directory || fs.currentDirectory).streamName + '/' + file.name;\r\n    }\r\n\r\n    // Start and manage file upload\r\n    const instance = this.createUploadInstance(file, object, streamName)\r\n    this.uploads.push(instance);\r\n    return instance;\r\n  }\r\n\r\n  /**\r\n   * Returns the current uploads.\r\n   */\r\n  public getUploads(): ManagedFileUpload[] {\r\n    return this.uploads;\r\n  };\r\n\r\n  /**\r\n   * Removes completed or failed uploads from the list.\r\n   */\r\n  public clearCompletedUploads() {\r\n    this.uploads = this.uploads.filter(function isUploadInProgress(upload) {\r\n      return RemoteDesktopService.isTransferInProgress(upload.transferState);\r\n    });\r\n  }\r\n\r\n  /**\r\n   * Creates a new ManagedFileUpload which uploads the given file to the\r\n   * server through the given Guacamole client.\r\n   *\r\n   * @param file\r\n   *     The file to upload.\r\n   *\r\n   * @param [object]\r\n   *     The object to upload the file to, if any, such as a filesystem\r\n   *     object.\r\n   *\r\n   * @param [streamName]\r\n   *     The name of the stream to upload the file to. If an object is given,\r\n   *     this must be specified.\r\n   *\r\n   * @return\r\n   *     A new ManagedFileUpload object which can be used to track the\r\n   *     progress of the upload.\r\n   */\r\n  private createUploadInstance(file: File, object: Object, streamName: string): ManagedFileUpload {\r\n    var managedFileUpload = new ManagedFileUpload(null);\r\n\r\n    // Open file for writing\r\n    var stream;\r\n    if (!object) {\r\n      stream = this.client.createFileStream(file.type, file.name);\r\n    } else {\r\n      // If object/streamName specified, upload to that instead of a file stream\r\n      stream = object.createOutputStream(file.type, streamName);\r\n    }\r\n\r\n    // Init managed upload\r\n    managedFileUpload.filename = file.name;\r\n    managedFileUpload.mimetype = file.type;\r\n    managedFileUpload.progress = 0;\r\n    managedFileUpload.length = file.size;\r\n\r\n    // Notify that stream is open\r\n    managedFileUpload.transferState.setStreamState(StreamState.OPEN, null)\r\n\r\n    // Begin uploading file once stream is acknowledged\r\n    stream.onack = (status) => {\r\n\r\n      // Notify of any errors from the Guacamole server\r\n      if (status.isError()) {\r\n        managedFileUpload.transferState.setStreamState(StreamState.ERROR, status.code)\r\n        stream.sendEnd();\r\n        return;\r\n      }\r\n\r\n      // Begin upload\r\n      this.tunnelRestApiService.uploadToStream(\r\n        this.tunnel.uuid,\r\n        stream,\r\n        file,\r\n        (length) => {\r\n          managedFileUpload.progress = length;\r\n        }\r\n      ).then(() => {\r\n        // Upload complete\r\n        managedFileUpload.progress = file.size;\r\n        managedFileUpload.transferState.setStreamState(StreamState.CLOSED, null)\r\n      },\r\n\r\n        (error) => {\r\n          if (error.type === 'STREAM_ERROR') {\r\n            // Use provide status code if the error is coming from the stream\r\n            managedFileUpload.transferState.setStreamState(StreamState.ERROR, error.statusCode)\r\n          } else {\r\n            // Fail with internal error for all other causes\r\n            managedFileUpload.transferState.setStreamState(StreamState.ERROR, Status.Code.INTERNAL_ERROR)\r\n          }\r\n        }\r\n      );\r\n\r\n      // Ignore all further acks\r\n      stream.onack = null;\r\n    };\r\n\r\n    return managedFileUpload;\r\n  }\r\n\r\n  /**\r\n   * Set the connection state and emit the new state to any subscribers\r\n   * @param state Connection state\r\n   */\r\n  private setState(state: string): void {\r\n    this.onStateChange.next(state);\r\n  }\r\n\r\n  /**\r\n   * Receive clipboard data from the remote desktop and emit an event to the client\r\n   * @param stream\r\n   * @param mimetype\r\n   */\r\n  private handleClipboard(stream: any, mimetype: string): void {\r\n    // If the received data is text, read it as a simple string\r\n    if (/^text\\//.exec(mimetype)) {\r\n      const reader = new StringReader(stream);\r\n\r\n      // Assemble received data into a single string\r\n      let data = '';\r\n      reader.ontext = (text: string) => (data += text);\r\n\r\n      // Set clipboard contents once stream is finished\r\n      reader.onend = () => this.onRemoteClipboardData.next(data);\r\n    }\r\n  }\r\n\r\n  /**\r\n   * Receive published filesystems and store them\r\n   * @param object\r\n   * @param name\r\n   * @private\r\n   */\r\n  private handleFilesystem(object: Object, name: string): void {\r\n    this.filesystemService.createInstance(this.tunnel, this.client, object, name).then(fs => {\r\n      this.filesystems.push(fs);\r\n      this.subjectFilesystems.next(fs);\r\n    }).catch(err => this.handleTunnelError(err.message))\r\n  }\r\n\r\n  /**\r\n   * Handle any received file\r\n   * @param stream\r\n   * @param mimetype\r\n   * @param filename\r\n   * @private\r\n   */\r\n  private handleFileReceived(stream: InputStream, mimetype: string, filename: string): void {\r\n    this.tunnelRestApiService.downloadStream(this.tunnel.uuid, stream, mimetype, filename);\r\n\r\n  }\r\n\r\n  /**\r\n   * Build the URL query parameters to send to the tunnel connection\r\n   * @param parameters guacamole-gateway-ts format\r\n   *\r\n   */\r\n  private buildParameters(parameters: guac_params): string {\r\n    let params = new HttpParams({ fromObject: parameters });\r\n    return params.toString();\r\n  }\r\n\r\n  /**\r\n   * Bind the client and tunnel event handlers\r\n   */\r\n  private bindEventHandlers(): void {\r\n     console.log('Binding events');\r\n    this.client.onerror = this.handleClientError.bind(this);\r\n    this.client.onstatechange = this.handleClientStateChange.bind(this);\r\n    this.client.onclipboard = this.handleClipboard.bind(this);\r\n    this.client.onfilesystem = this.handleFilesystem.bind(this);\r\n    this.client.onfile = this.handleFileReceived.bind(this);\r\n    this.tunnel.onerror = this.handleTunnelError.bind(this);\r\n    this.tunnel.onstatechange = this.handleTunnelStateChange.bind(this);\r\n    /*\r\n     * Override tunnel instruction message\r\n     */\r\n    this.tunnel.oninstruction = ((oninstruction) => {\r\n      return (opcode: string, parameters: any) => {\r\n        oninstruction(opcode, parameters);\r\n        this.onTunnelInstruction.next({ opcode, parameters });\r\n      };\r\n    })(this.tunnel.oninstruction);\r\n  }\r\n\r\n  /**\r\n   * Handle any client errors by disconnecting and updating the connection state\r\n   * @param state State received from the client\r\n   */\r\n  private handleClientError(status: any): void {\r\n    // Disconnect if connected\r\n    this.disconnect();\r\n    this.setState(RemoteDesktopService.STATE.CLIENT_ERROR);\r\n  }\r\n\r\n  /**\r\n   * Update the connection state when the client state changes\r\n   * @param state State received from the client\r\n   */\r\n  private handleClientStateChange(state: number): void {\r\n    switch (state) {\r\n      // Idle\r\n      case 0:\r\n        this.setState(RemoteDesktopService.STATE.IDLE);\r\n        break;\r\n      // Ignore \"connecting\" state\r\n      case 1: // Connecting\r\n        break;\r\n      // Connected + waiting\r\n      case 2:\r\n        this.setState(RemoteDesktopService.STATE.WAITING);\r\n        break;\r\n      // Connected\r\n      case 3:\r\n        this.setState(RemoteDesktopService.STATE.CONNECTED);\r\n        break;\r\n      // Update history when disconnecting\r\n      case 4: // Disconnecting\r\n      case 5: // Disconnected\r\n        break;\r\n    }\r\n  }\r\n\r\n  /**\r\n   * Handle any tunnel errors by disconnecting and updating the connection state\r\n   * @param status Status received from the tunnel\r\n   * See https://apache.org/doc/gug/protocol-reference.html for error reference\r\n   */\r\n  private handleTunnelError(status: any): void {\r\n    this.disconnect();\r\n    this.setState(RemoteDesktopService.STATE.TUNNEL_ERROR);\r\n    console.error('Tunnel error', status);\r\n  }\r\n\r\n  /**\r\n   * Update the connection state when the tunnel state changes\r\n   * @param state State received from the tunnel\r\n   */\r\n  private handleTunnelStateChange(state: number): void {\r\n    switch (state) {\r\n      // Connection is being established\r\n      case 1:\r\n        this.setState(RemoteDesktopService.STATE.CONNECTING);\r\n        break;\r\n      // Connection has closed\r\n      case 2:\r\n        this.setState(RemoteDesktopService.STATE.DISCONNECTED);\r\n        break;\r\n    }\r\n  }\r\n\r\n  /**\r\n   * Determines whether the given file transfer state indicates an\r\n   * in-progress transfer.\r\n   *\r\n   * @param transferState\r\n   *     The file transfer state to check.\r\n   */\r\n  private static isTransferInProgress(transferState: ManagedFileTransferState): boolean {\r\n    switch (transferState.streamState) {\r\n\r\n      // IDLE or OPEN file transfers are active\r\n      case StreamState.IDLE:\r\n      case StreamState.OPEN:\r\n        return true;\r\n\r\n      // All others are not active\r\n      default:\r\n        return false;\r\n\r\n    }\r\n  };\r\n\r\n}\r\n\r\nexport enum logLevel {\r\n  QUIET = 0,\r\n  ERRORS = 10,\r\n  NORMAL = 20,\r\n  VERBOSE = 30,\r\n  DEBUG = 40,\r\n}\r\n\r\nexport type connection_type = \"rdp\" | \"vnc\" | \"ssh\" | \"telnet\" | \"kubernetes\";\r\n\r\nexport const commonUnencryptOptions: commonUnencryptOption[] = ['disable-copy', 'disable-paste', 'enable-sftp', 'sftp-disable-download', 'sftp-disable-upload', 'recording-name', 'recording-exclude-output', 'recording-exclude-mouse', 'recording-include-keys', 'typescript-name', 'backspace', 'terminal-type', 'color-scheme', 'font-name', 'font-size', 'scrollback', 'wol-send-packet']\r\nconst vncPartUnencryptOptions: vncUnencryptOption[] = ['autoretry', 'color-depth', 'swap-red-blue', 'cursor', 'encodings', 'read-only', 'force-lossless', 'dest-host', 'reverse-connect', 'listen-timeout', 'enable-audio', 'audio-servername', 'clipboard-encoding']\r\nconst rdpPartUnencryptOptions: rdpUnencryptOption[] = ['normalize-clipboard', 'server-layout', 'timezone', 'color-depth', 'width', 'height', 'dpi', 'resize-method', 'force-lossless', 'disable-audio', 'enable-audio-input', 'enable-touch', 'enable-printing', 'enable-drive', 'disable-download', 'disable-upload', 'enable-wallpaper', 'enable-theming', 'enable-font-smoothing', 'enable-full-window-drag', 'enable-desktop-composition', 'enable-menu-animations', 'disable-bitmap-caching', 'disable-offscreen-caching', 'disable-glyph-caching'];\r\nconst sshPartUnencryptOptions: sshUnencryptOption[] = ['locale', 'timezone', 'enable-sftp', 'sftp-disable-download', 'sftp-disable-upload'];\r\nconst telnetPartUnencryptOptions: telnetUnencryptOption[] = [];\r\nconst kubernetesPartUnencryptOptions: kubernetesUnencryptOption[] = ['namespace'];\r\n\r\nexport const vncUnencryptOptions: vncUnencryptOption[] = [...vncPartUnencryptOptions, ...commonUnencryptOptions]\r\nexport const rdpUnencryptOptions: rdpUnencryptOption[] = [...rdpPartUnencryptOptions, ...commonUnencryptOptions];\r\nexport const sshUnencryptOptions: sshUnencryptOption[] = [...sshPartUnencryptOptions, ...commonUnencryptOptions];\r\nexport const telnetUnencryptOptions: telnetUnencryptOption[] = [...telnetPartUnencryptOptions, ...commonUnencryptOptions];\r\nexport const kubernetesUnencryptOptions: kubernetesUnencryptOption[] = [...kubernetesPartUnencryptOptions, ...commonUnencryptOptions];\r\n\r\nexport type vncUnencryptOption = 'autoretry' | 'color-depth' | 'swap-red-blue' | 'cursor' | 'encodings' | 'read-only' | 'force-lossless' | 'dest-host' | 'reverse-connect' | 'listen-timeout' | 'enable-audio' | 'audio-servername' | 'clipboard-encoding' | & commonUnencryptOption;\r\nexport type rdpUnencryptOption = 'normalize-clipboard' | 'server-layout' | 'timezone' | 'color-depth' | 'width' | 'height' | 'dpi' | 'resize-method' | 'force-lossless' | 'disable-audio' | 'enable-audio-input' | 'enable-touch' | 'enable-printing' | 'enable-drive' | 'disable-download' | 'disable-upload' | 'enable-wallpaper' | 'enable-theming' | 'enable-font-smoothing' | 'enable-full-window-drag' | 'enable-desktop-composition' | 'enable-menu-animations' | 'disable-bitmap-caching' | 'disable-offscreen-caching' | 'disable-glyph-caching' | & commonUnencryptOption;\r\nexport type sshUnencryptOption = 'locale' | 'timezone' | 'enable-sftp' | 'sftp-disable-download' | 'sftp-disable-upload' | & commonUnencryptOption;\r\nexport type telnetUnencryptOption = '' | & commonUnencryptOption;\r\nexport type kubernetesUnencryptOption = 'namespace' | & commonUnencryptOption;\r\n\r\nexport type commonUnencryptOption = 'disable-copy' | 'disable-paste' | 'enable-sftp' | 'sftp-disable-download' | 'sftp-disable-upload' | 'recording-name' | 'recording-exclude-output' | 'recording-exclude-mouse' | 'recording-include-keys' | 'typescript-name' | 'backspace' | 'terminal-type' | 'color-scheme' | 'font-name' | 'font-size' | 'scrollback' | 'wol-send-packet';\r\n\r\nexport interface vnc_settings extends common_setting, vnc_unencrypted_settings {\r\n  /**\r\n   * The hostname or IP address of the VNC server Guacamole should connect to.\r\n   */\r\n  hostname: string;\r\n  /**\r\n   * The username to use when attempting authentication, if any. This parameter is optional.\r\n   */\r\n  username?: string;\r\n  /**\r\n   * The password to use when attempting authentication, if any. This parameter is optional.\r\n   */\r\n  password?: string;\r\n  /**\r\n   * The port the VNC server is listening on, usually 5900 or 5900 + display number. For example, if your VNC server is serving display number 1 (sometimes written as :1), your port number here would be 5901.\r\n   */\r\n  port: string;\r\n  /**\r\n   * The destination port to request when connecting to a VNC proxy such as UltraVNC Repeater. This is only necessary if the VNC proxy in use requires the connecting user to specify which VNC server to connect to. If the VNC proxy automatically connects to a specific server, this parameter is not necessary.\r\n   */\r\n  \"dest-port\"?: number | string;\r\n}\r\n\r\nexport interface rdp_settings extends common_setting, rdp_unencrypted_settings {\r\n  /**\r\n   * The hostname or IP address of the RDP server Guacamole should connect to.\r\n  */\r\n  hostname: string;\r\n  /**\r\n   * The port the RDP server is listening on. This parameter is optional. If this is not specified, the standard port for RDP (3389) or Hyper-V’s default port for VMConnect (2179) will be used, depending on the security mode selected.\r\n  */\r\n  port?: string;\r\n  /**\r\n   * The username to use when attempting authentication, if any. This parameter is optional.\r\n   */\r\n  username?: string;\r\n  /**\r\n   * The password to use when attempting authentication, if any. This parameter is optional.\r\n   */\r\n  password?: string;\r\n  /**\r\n   * The domain to use when attempting authentication, if any. This parameter is optional.\r\n   */\r\n  dommain?: string;\r\n  /**\r\n   * The security mode to use for the RDP connection. This mode dictates how data will be encrypted and what type of authentication will be performed, if any. By default, a security mode is selected based on a negotiation process which determines what both the client and the server support.\r\n   \r\n      Possible values are:\r\n  \r\n      any\r\n      Automatically select the security mode based on the security protocols supported by both the client and the server. This is the default.\r\n  \r\n      nla\r\n      Network Level Authentication, sometimes also referred to as “hybrid” or CredSSP (the protocol that drives NLA). This mode uses TLS encryption and requires the username and password to be given in advance. Unlike RDP mode, the authentication step is performed before the remote desktop session actually starts, avoiding the need for the Windows server to allocate significant resources for users that may not be authorized.\r\n  \r\n      If the versions of guacd and Guacamole Client in use support prompting and the username, password, and domain are not specified, the user will be interactively prompted to enter credentials to complete NLA and continue the connection. Otherwise, when prompting is not supported and credentials are not provided, NLA connections will fail.\r\n  \r\n      nla-ext\r\n      Extended Network Level Authentication. This mode is identical to NLA except that an additional “Early User Authorization Result” is required to be sent from the server to the client immediately after the NLA handshake is completed.\r\n  \r\n      tls\r\n      RDP authentication and encryption implemented via TLS (Transport Layer Security). Also referred to as RDSTLS, the TLS security mode is primarily used in load balanced configurations where the initial RDP server may redirect the connection to a different RDP server.\r\n  \r\n      vmconnect\r\n      Automatically select the security mode based on the security protocols supported by both the client and the server, limiting that negotiation to only the protocols known to be supported by Hyper-V / VMConnect.\r\n  \r\n      rdp\r\n      Legacy RDP encryption. This mode is generally only used for older Windows servers or in cases where a standard Windows login screen is desired. Newer versions of Windows have this mode disabled by default and will only accept NLA unless explicitly configured otherwise.\r\n      * \r\n      */\r\n  security?: \"any\" | \"nla\" | \"nla-ext\" | \"tls\" | \"vmconnect\" | \"rdp\";\r\n  /**\r\n   *  If set to “true”, the certificate returned by the server will be ignored, even if that certificate cannot be validated. This is useful if you universally trust the server and your connection to the server, and you know that the server’s certificate cannot be validated (for example, if it is self-signed)\r\n   */\r\n  \"ignore-cert\"?: boolean;\r\n  /**\r\n   * If set to “true”, authentication will be disabled. Note that this refers to authentication that takes place while connecting. Any authentication enforced by the server over the remote desktop session (such as a login dialog) will still take place. By default, authentication is enabled and only used when requested by the server.\r\n   \r\n      If you are using NLA, authentication must be enabled by definition.\r\n      * \r\n      */\r\n  \"disable-auth\"?: boolean;\r\n  /**\r\n   * When connecting to the RDP server, Guacamole will normally provide its own hostname as the name of the client. If this parameter is specified, Guacamole will use its value instead.\r\n   \r\n      On Windows RDP servers, this value is exposed within the session as the CLIENTNAME environment variable.\r\n      */\r\n  \"client-name\"?: string;\r\n  /**\r\n   * If set to “true”, you will be connected to the console (admin) session of the RDP server.\r\n   */\r\n  console?: boolean;\r\n\r\n  /**\r\n  * The name of the redirected printer device that is passed through to the RDP session. This is the name that the user will see in, for example, the Devices and Printers control panel.\r\n  * \r\n  * If printer redirection is not enabled, this option has no effect.\r\n  */\r\n  \"printer-name\"?: string;\r\n\r\n  /**\r\n   * The name of the filesystem used when passed through to the RDP session. This is the name that users will see in their Computer/My Computer area along with client name (for example, “Guacamole on Guacamole RDP”), and is also the name of the share when accessing the special \\\\tsclient network location.\r\n   *\r\n   * If file transfer is not enabled, this parameter is ignored.\r\n  */\r\n  \"drive-name\"?: string;\r\n  /**\r\n   * The directory on the Guacamole server in which transferred files should be stored. This directory must be accessible by guacd and both readable and writable by the user that runs guacd. This parameter does not refer to a directory on the RDP server.\r\n   * \r\n   * If file transfer is not enabled, this parameter is ignored.\r\n  */\r\n  \"drive-path\"?: string;\r\n  /**\r\n   * If set to “true”, and file transfer is enabled, the directory specified by the drive-path parameter will automatically be created if it does not yet exist. Only the final directory in the path will be created - if other directories earlier in the path do not exist, automatic creation will fail, and an error will be logged.\r\n   * \r\n   * By default, the directory specified by the drive-path parameter will not automatically be created, and attempts to transfer files to a non-existent directory will be logged as errors.\r\n   * \r\n   * If file transfer is not enabled, this parameter is ignored.\r\n  */\r\n  \"create-drive-path\"?: boolean;\r\n  /**\r\n   * If set to “true”, audio will be explicitly enabled in the console (admin) session of the RDP server. Setting this option to “true” only makes sense if the console parameter is also set to “true”.\r\n  */\r\n  \"console-audio\"?: boolean;\r\n  /**\r\n   * A comma-separated list of static channel names to open and expose as pipes. If you wish to communicate between an application running on the remote desktop and JavaScript, this is the best way to do it. Guacamole will open an outbound pipe with the name of the static channel. If JavaScript needs to communicate back in the other direction, it should respond by opening another pipe with the same name.\r\n   * \r\n   * Guacamole allows any number of static channels to be opened, but protocol restrictions of RDP limit the size of each channel name to 7 characters.\r\n  */\r\n  \"static-channels\"?: string;\r\n  /**\r\n   * The numeric ID of the RDP source. This is a non-negative integer value dictating which of potentially several logical RDP connections should be used. This parameter is optional, and is only required if the RDP server is documented as requiring it. If using Hyper-V, this should be left blank.\r\n   */\r\n  \"preconnection-id\"?: string;\r\n  /**\r\n   * An arbitrary string which identifies the RDP source - one of potentially several logical RDP connections hosted by the same RDP server. This parameter is optional, and is only required if the RDP server is documented as requiring it, such as Hyper-V. In all cases, the meaning of this parameter is opaque to the RDP protocol itself and is dictated by the RDP server. For Hyper-V, this will be the ID of the destination virtual machine.\r\n   */\r\n  \"preconnection-blob\"?: string;\r\n  /**\r\n   * The hostname of the remote desktop gateway that should be used as an intermediary for the remote desktop connection. If omitted, a gateway will not be used.\r\n  */\r\n  \"gateway-hostname\"?: string;\r\n\r\n  /**\r\n  * The port of the remote desktop gateway that should be used as an intermediary for the remote desktop connection. By default, this will be “443”.\r\n  */\r\n  \"gateway-port\"?: number;\r\n\r\n  /**\r\n  * The username of the user authenticating with the remote desktop gateway, if a gateway is being used. This is not necessarily the same as the user actually using the remote desktop connection.\r\n  */\r\n  \"gateway-username\"?: string;\r\n  /**\r\n  * The password to provide when authenticating with the remote desktop gateway, if a gateway is being used.\r\n  */\r\n  \"gateway-password\"?: string;\r\n  /** \r\n  * The domain of the user authenticating with the remote desktop gateway, if a gateway is being used. This is not necessarily the same domain as the user actually using the remote desktop connection.\r\n  */\r\n  \"gateway-domain\"?: string;\r\n  /**\r\n  * The load balancing information or cookie which should be provided to the connection broker. If no connection broker is being used, this should be left blank.\r\n  */\r\n  \"load-balance-info\"?: string;\r\n  /**\r\n   * Specifies the RemoteApp to start on the remote desktop. If supported by your remote desktop server, this application, and only this application, will be visible to the user.\r\n   * \r\n   * Windows requires a special notation for the names of remote applications. The names of remote applications must be prefixed with two vertical bars. For example, if you have created a remote application on your server for notepad.exe and have assigned it the name “notepad”, you would set this parameter to: “||notepad”.\r\n  */\r\n  \"remote-app\"?: string;\r\n  /**\r\n   * The working directory, if any, for the remote application. This parameter has no effect if RemoteApp is not in use.\r\n  */\r\n  \"remote-app-dir\"?: string;\r\n  /**\r\n   * The command-line arguments, if any, for the remote application. This parameter has no effect if RemoteApp is not in use.\r\n  */\r\n  \"remote-app-args\"?: string;\r\n}\r\n\r\nexport interface ssh_settings extends common_setting, ssh_unencrypted_settings {\r\n  /**\r\n   * The hostname or IP address of the SSH server Guacamole should connect to.\r\n   */\r\n  hostname: string;\r\n  /**\r\n   * The port the SSH server is listening on, usually 22. This parameter is optional. If this is not specified, the default of 22 will be used.\r\n   */\r\n  port?: number\r\n\r\n  /**\r\n   * The known hosts entry for the SSH server. This parameter is optional, and, if not provided, no verification of host identity will be done. If the parameter is provided the identity of the server will be checked against the data.\r\n   * \r\n   * The format of this parameter is that of a single entry from an OpenSSH known_hosts file.\r\n   * \r\n   * For more information, please see SSH Host Verification.\r\n  */\r\n  \"host-key\"?: string;\r\n  /**\r\n   * By default the SSH client does not send keepalive requests to the server. This parameter allows you to configure the the interval in seconds at which the client connection sends keepalive packets to the server. The default is 0, which disables sending the packets. The minimum value is 2.\r\n  */\r\n  \"server-alive-interval\"?: number;\r\n  /**\r\n   * The username to use to authenticate, if any. This parameter is optional. If not specified, you will be prompted for the username upon connecting.\r\n  */\r\n  username?: string;\r\n  /**\r\n   * The password to use when attempting authentication, if any. This parameter is optional. If not specified, you will be prompted for your password upon connecting.\r\n  */\r\n  password?: string;\r\n  /**\r\n   * The entire contents of the private key to use for public key authentication. If this parameter is not specified, public key authentication will not be used. The private key must be in OpenSSH format, as would be generated by the OpenSSH ssh-keygen utility.\r\n  */\r\n  \"private-key\"?: string;\r\n  /**\r\n   * The passphrase to use to decrypt the private key for use in public key authentication. This parameter is not needed if the private key does not require a passphrase. If the private key requires a passphrase, but this parameter is not provided, the user will be prompted for the passphrase upon connecting.\r\n  */\r\n  passphrase?: string;\r\n  /**\r\n   * The command to execute over the SSH session, if any. This parameter is optional. If not specified, the SSH session will use the user’s default shell.\r\n  */\r\n  command?: string;\r\n\r\n  /**\r\n   * The directory to expose to connected users via Guacamole’s file browser. If omitted, the root directory will be used by default.\r\n  */\r\n  \"sftp-root-directory\"?: string;\r\n\r\n}\r\n\r\nexport interface telnet_settings extends common_setting, telnet_unencrypted_settings {\r\n  /**\r\n   * The hostname or IP address of the telnet server Guacamole should connect to.\r\n   */\r\n  hostname: string;\r\n  /**\r\n   * The port the telnet server is listening on, usually 23. This parameter is optional. If this is not specified, the default of 23 will be used.\r\n  */\r\n  port?: number;\r\n  /**\r\n   * The username to use to authenticate, if any. This parameter is optional. If not specified, or not supported by the telnet server, the login process on the telnet server will prompt you for your credentials. For this to work, your telnet server must support the NEW-ENVIRON option, and the telnet login process must pay attention to the USER environment variable. Most telnet servers satisfy this criteria.\r\n  */\r\n  username?: string;\r\n  /**\r\n   * The password to use when attempting authentication, if any. This parameter is optional. If specified, your password will be typed on your behalf when the password prompt is detected.\r\n  */\r\n  password?: string;\r\n  /**\r\n   * The regular expression to use when waiting for the username prompt. This parameter is optional. If not specified, a reasonable default built into Guacamole will be used. The regular expression must be written in the POSIX ERE dialect (the dialect typically used by egrep).\r\n  */\r\n  \"username-regex\"?: string;\r\n  /**\r\n   * The regular expression to use when waiting for the password prompt. This parameter is optional. If not specified, a reasonable default built into Guacamole will be used. The regular expression must be written in the POSIX ERE dialect (the dialect typically used by egrep).\r\n  */\r\n  \"password-regex\"?: string;\r\n  /**\r\n   * The regular expression to use when detecting that the login attempt has succeeded. This parameter is optional. If specified, the terminal display will not be shown to the user until text matching this regular expression has been received from the telnet server. The regular expression must be written in the POSIX ERE dialect (the dialect typically used by egrep).\r\n  */\r\n  \"login-success-regex\"?: string;\r\n  /**\r\n   * The regular expression to use when detecting that the login attempt has failed. This parameter is optional. If specified, the connection will be closed with an explicit login failure error if text matching this regular expression has been received from the telnet server. The regular expression must be written in the POSIX ERE dialect (the dialect typically used by egrep).\r\n   */\r\n  \"login-failure-regex\"?: string;\r\n}\r\n\r\nexport interface kubernetes_settings extends common_setting, kubernetes_unencrypted_settings {\r\n  /**\r\n   * The hostname or IP address of the Kubernetes server that Guacamole should connect to.\r\n   */\r\n  hostname: string;\r\n  /**\r\n   * The port the Kubernetes server is listening on for API connections. This parameter is optional. If omitted, port 8080 will be used by default.\r\n  */\r\n  port: number;\r\n  /**\r\n   * The name of the Kubernetes pod containing with the container being attached to.\r\n  */\r\n  pod?: string;\r\n  /**\r\n   * The name of the container to attach to. This parameter is optional. If omitted, the first container in the pod will be used.\r\n  */\r\n  container?: string\r\n  /**\r\n   * The command to run within the container, with input and output attached to this command’s process. This parameter is optional. If omitted, no command will be run, and input/output will instead be attached to the main process of the container.\r\n   *\r\n   * When this parameter is specified, the behavior of the connection is analogous to running kubectl exec. When omitted, the behavior is analogous to running kubectl attach.\r\n  */\r\n  \"exec-command\"?: string;\r\n  /**\r\n   * If set to “true”, SSL/TLS will be used to connect to the Kubernetes server. This parameter is optional. By default, SSL/TLS will not be used.\r\n  */\r\n  \"use-ssl\"?: boolean;\r\n  /**\r\n   * The certificate to use if performing SSL/TLS client authentication to authenticate with the Kubernetes server, in PEM format. This parameter is optional. If omitted, SSL client authentication will not be performed.\r\n  */\r\n  \"client-cert\"?: string;\r\n  /**\r\n   * The key to use if performing SSL/TLS client authentication to authenticate with the Kubernetes server, in PEM format. This parameter is optional. If omitted, SSL client authentication will not be performed.\r\n  */\r\n  \"client-key\"?: string;\r\n  /**\r\n   * The certificate of the certificate authority that signed the certificate of the Kubernetes server, in PEM format. This parameter is optional. If omitted, verification of the Kubernetes server certificate will use only system-wide certificate authorities.\r\n  */\r\n  \"ca-cert\"?: string;\r\n  /**\r\n   * If set to “true”, the validity of the SSL/TLS certificate used by the Kubernetes server will be ignored if it cannot be validated. This parameter is optional. By default, SSL/TLS certificates are validated.\r\n  */\r\n  \"ignore-cert\"?: boolean;\r\n}\r\n\r\n\r\nexport interface common_setting {\r\n  /**\r\n       Guacamole provides bidirectional access to the clipboard by default for all supported protocols. \r\n      For protocols that don’t inherently provide a clipboard, Guacamole implements its own clipboard. \r\n      This behavior can be overridden on a per-connection basis with the disable-copy and disable-paste parameters.\r\n  */\r\n\r\n  /**\r\n   * If set to “true”, text copied within the remote desktop session will not be accessible by the user at the browser side of the Guacamole session, and will be usable only within the remote desktop. This parameter is optional. By default, the user will be given access to the copied text.\r\n  */\r\n  \"disable-copy\"?: boolean;\r\n  /**\r\n   * If set to “true”, text copied at the browser side of the Guacamole session will not be accessible within the remote ddesktop session. This parameter is optional. By default, the user will be able to paste data from outside the browser within the remote desktop session.\r\n   * */\r\n  \"disable-paste\"?: boolean;\r\n\r\n  /**\r\n  \r\n      Guacamole can provide file transfer over SFTP even when the remote desktop is otherwise being accessed through a different protocol, \r\n      like VNC or RDP. If SFTP is enabled on a Guacamole RDP connection, users will be able to upload and download files as described in Using \r\n      \r\n\r\n      This support is independent of the file transfer that may be provided by the protocol in use, like RDP’s own “drive redirection” (RDPDR), \r\n      and is particularly useful for remote desktop servers which do not support file transfer features.\r\n\r\n  */\r\n\r\n\r\n  /**\r\n   * Whether file transfer should be enabled. If set to “true”, the user will be allowed to upload or download files from the specified server using SFTP. If omitted, SFTP will be disabled.\r\n  */\r\n  \"enable-sftp\"?: boolean;\r\n  /**\r\n   * The hostname or IP address of the server hosting SFTP. This parameter is optional. If omitted, the hostname of the remote desktop server associated with the connection will be used.\r\n  */\r\n  \"sftp-hostname\"?: string;\r\n  /**\r\n   * The port the SSH server providing SFTP is listening on, usually 22. This parameter is optional. If omitted, the standard port of 22 will be used.\r\n  */\r\n  \"sftp-port\"?: number;\r\n  /**\r\n   * The known hosts entry for the SFTP server. This parameter is optional, and, if not provided, no verification of SFTP host identity will be done. If the parameter is provided the identity of the server will be checked against the data.\r\n   *\r\n   * The format of this parameter is that of a single entry from an OpenSSH known_hosts file.\r\n   * For more information, please see [SSH Host Verification](https://incubator.apache.org/doc/gug/configuring-html#ssh-host-verification).\r\n  */\r\n  \"sftp-host-key\"?: string;\r\n  /**\r\n   * The username to authenticate as when connecting to the specified SSH server for SFTP. This parameter is optional if a username is specified for the remote desktop connection. If omitted, the username specified for the remote desktop connection will be used.\r\n  */\r\n  \"sftp-username\"?: string;\r\n  /**\r\n   * The password to use when authenticating with the specified SSH server for SFTP.\r\n  */\r\n  \"sftp-password\"?: string;\r\n  /**\r\n   * The entire contents of the private key to use for public key authentication. If this parameter is not specified, public key authentication will not be used. The private key must be in OpenSSH format, as would be generated by the OpenSSH ssh-keygen utility.\r\n  */\r\n  \"sftp-private-key\"?: string;\r\n  /**\r\n   * The passphrase to use to decrypt the private key for use in public key authentication. This parameter is not needed if the private key does not require a passphrase.\r\n  */\r\n  \"sftp-passphrase\"?: string;\r\n  /**\r\n   * The directory to upload files to if they are simply dragged and dropped, and thus otherwise lack a specific upload location. This parameter is optional. If omitted, the default upload location of the SSH server providing SFTP will be used.\r\n  */\r\n  \"sftp-directory\"?: string;\r\n  /**\r\n   * The directory to expose to connected users via Guacamole’s [Using the file browser](https://incubator.apache.org/doc/gug/using-html#file-browser). If omitted, the root directory will be used by default.\r\n  */\r\n  \"sftp-root-directory\"?: string;\r\n  /**\r\n   * The interval in seconds at which to send keepalive packets to the SSH server for the SFTP connection. This parameter is optional. If omitted, the default of 0 will be used, disabling sending keepalive packets. The minimum value is 2.\r\n  */\r\n  \"sftp-server-alive-interval\"?: number;\r\n  /**\r\n   * If set to true downloads from the remote system to the client (browser) will be disabled. The default is false, which means that downloads will be enabled.\r\n   * If sftp is not enabled, this parameter will be ignored.\r\n  */\r\n  \"sftp-disable-download\"?: boolean;\r\n  /**\r\n   * If set to true uploads from the client (browser) to the remote system will be disabled. The default is false, which means that uploads will be enabled.\r\n   * If sftp is not enabled, this parameter will be ignored.\r\n   * */\r\n  \"sftp-disable-upload\"?: boolean;\r\n\r\n  /** \r\n      Sessions of all supported protocols can be recorded graphically. These recordings take the form of Guacamole protocol dumps and are \r\n      recorded automatically to a specified directory. Recordings can be subsequently played back directly in the browser from the connection \r\n      history screen or translated to a normal video stream using the guacenc utility provided with guacamole-server.\r\n      \r\n      For example, to produce a video called NAME.m4v from the recording “NAME”, you would run:\r\n\r\n      ```console\r\n          guacenc /path/to/recording/NAME\r\n          The guacenc utility has additional options for overriding default behavior, including tweaking the output format, which are documented in \r\n          detail within the manpage:\r\n      ```\r\n\r\n      ```console\r\n          man guacenc\r\n      ```\r\n      If recording of key events is explicitly enabled using the recording-include-keys parameter, recordings can also be translated into \r\n      human-readable interpretations of the keys pressed during the session using the guaclog utility. The usage of guaclog is analogous to \r\n      guacenc, and results in the creation of a new text file containing the interpreted events:\r\n\r\n      ```console\r\n          guaclog /path/to/recording/NAME\r\n          guaclog: INFO: Guacamole input log interpreter (guaclog) version 1.5.3\r\n          guaclog: INFO: 1 input file(s) provided.\r\n          guaclog: INFO: Writing input events from \"/path/to/recording/NAME\" to \"/path/to/recording/NAME.txt\" ...\r\n          guaclog: INFO: All files interpreted successfully.\r\n      ```\r\n      \r\n      Guacamole will never overwrite an existing recording. If necessary, a numeric suffix like “.1”, “.2”, “.3”, etc. will be appended to to \r\n      avoid overwriting an existing recording. If even appending a numeric suffix does not help, the session will simply not be recorded.\r\n  */\r\n\r\n  /**\r\n   * The directory in which screen recording files should be created. If a graphical recording needs to be created, then this parameter is required. Specifying this parameter enables graphical screen recording. If this parameter is omitted, no graphical recording will be created.\r\n  */\r\n  \"recording-path\"?: string;\r\n  /**\r\n   * If set to “true”, the directory specified by the recording-path parameter will automatically be created if it does not yet exist. Only the final directory in the path will be created - if other directories earlier in the path do not exist, automatic creation will fail, and an error will be logged.\r\n   *\r\n   * This parameter is optional. By default, the directory specified by the recording-path parameter will not automatically be created, and attempts to create recordings within a non-existent directory will be logged as errors.\r\n   *\r\n   * This parameter only has an effect if graphical recording is enabled. If the recording-path is not specified, graphical session recording will be disabled, and this parameter will be ignored.\r\n  */\r\n  \"create-recording-path\"?: boolean;\r\n  /**\r\n   * The filename to use for any created recordings. This parameter is optional. If omitted, the value “recording” will be used instead.\r\n   *\r\n   * This parameter only has an effect if graphical recording is enabled. If the recording-path is not specified, graphical session recording will be disabled, and this parameter will be ignored.\r\n  */\r\n  \"recording-name\"?: string;\r\n  /**\r\n   * If set to “true”, graphical output and other data normally streamed from server to client will be excluded from the recording, producing a recording which contains only user input events. This parameter is optional. If omitted, graphical output will be included in the recording.\r\n   *\r\n   * This parameter only has an effect if graphical recording is enabled. If the recording-path is not specified, graphical session recording will be disabled, and this parameter will be ignored.\r\n  */\r\n  \"recording-exclude-output\"?: boolean;\r\n  /**\r\n   * If set to “true”, user mouse events will be excluded from the recording, producing a recording which lacks a visible mouse cursor. This parameter is optional. If omitted, mouse events will be included in the recording.\r\n   *\r\n   * This parameter only has an effect if graphical recording is enabled. If the recording-path is not specified, graphical session recording will be disabled, and this parameter will be ignored.\r\n  */\r\n  \"recording-exclude-mouse\"?: boolean;\r\n  /**\r\n   * If set to “true”, user key events will be included in the recording. The recording can subsequently be passed through the guaclog utility to produce a human-readable interpretation of the keys pressed during the session. This parameter is optional. If omitted, key events will be not included in the recording.\r\n   *\r\n   * This parameter only has an effect if graphical recording is enabled. If the recording-path is not specified, graphical session recording will be disabled, and this parameter will be ignored.\r\n   *\r\n   */\r\n  \"recording-include-keys\"?: boolean;\r\n\r\n  /**\r\n      The full, raw text content of SSH sessions, including timing information, can be recorded automatically to a specified directory. \r\n      This recording, also known as a “typescript”, will be written to two files within the directory specified by typescript-path: NAME, \r\n      which contains the raw text data, and NAME.timing, which contains timing information, where NAME is the value provided for the \r\n      typescript-name parameter.\r\n\r\n      This format is compatible with the format used by the standard UNIX script command, and can be replayed using scriptreplay (if installed). \r\n      For example, to replay a typescript called “NAME”, you would run:\r\n\r\n      ```console\r\n      scriptreplay NAME.timing NAME\r\n      ```\r\n\r\n      Important\r\n      Guacamole will never overwrite an existing recording. If necessary, a numeric suffix like “.1”, “.2”, “.3”, etc. will be appended to \r\n      NAME to avoid overwriting an existing recording. If even appending a numeric suffix does not help, the session will simply not be recorded.\r\n  */\r\n\r\n  /**\r\n   * The directory in which typescript files should be created. If a typescript needs to be recorded, this parameter is required. Specifying this parameter enables typescript recording. If this parameter is omitted, no typescript will be recorded.\r\n  */\r\n  \"typescript-path\"?: string;\r\n  /**\r\n   * If set to “true”, the directory specified by the typescript-path parameter will automatically be created if it does not yet exist. Only the final directory in the path will be created - if other directories earlier in the path do not exist, automatic creation will fail, and an error will be logged.\r\n   *\r\n   * This parameter is optional. By default, the directory specified by the typescript-path parameter will not automatically be created, and attempts to record typescripts in a non-existent directory will be logged as errors.\r\n   *\r\n   * This parameter only has an effect if typescript recording is enabled. If the typescript-path is not specified, recording of typescripts will be disabled, and this parameter will be ignored.\r\n  */\r\n  \"create-typescript-path\"?: boolean;\r\n  /**\r\n   * The base filename to use when determining the names for the data and timing files of the typescript. This parameter is optional. If omitted, the value “typescript” will be used instead.\r\n   *\r\n   * Each typescript consists of two files which are created within the directory specified by typescript-path: NAME, which contains the raw text data, and NAME.timing, which contains timing information, where NAME is the value provided for the typescript-name parameter.\r\n   *\r\n   * This parameter only has an effect if typescript recording is enabled. If the typescript-path is not specified, recording of typescripts will be disabled, and this parameter will be ignored.\r\n  */\r\n  \"typescript-name\"?: string;\r\n\r\n  /**\r\n      In most cases, the default behavior for a terminal works without modification. However, when connecting to certain systems, \r\n      particularly operating systems other than Linux, the terminal behavior may need to be tweaked to allow it to operate properly. \r\n      The settings in this section control that behavior.\r\n  */\r\n\r\n\r\n  /**\r\n   * This parameter controls the ASCII code that the backspace key sends to the remote system. Under most circumstances this should not need to be adjusted; however, if, when pressing the backspace key, you see control characters (often either ^? or ^H) instead of seeing the text erased, you may need to adjust this parameter. By default the terminal sends ASCII code 127 (Delete) if this option is not set.\r\n  */\r\n  backspace?: string;\r\n  /**\r\n   * This parameter sets the terminal emulator type string that is passed to the server. This parameter is optional. If not specified, “linux” is used as the terminal emulator type by default.\r\n  */\r\n  \"terminal-type\"?: string;\r\n\r\n  /**\r\n  \r\n      If Guacamole is being used in part to automate an SSH, telnet, or other terminal session, it can be useful to provide \r\n      input directly from JavaScript as a raw stream of data, rather than attempting to translate data into keystrokes. \r\n      This can be done through opening a pipe stream named “STDIN” within the connection using the createPipeStream() \r\n      function of Client:\r\n\r\n      ```\r\n      var outputStream = client.createPipeStream('text/plain', 'STDIN');\r\n      ```\r\n\r\n      The resulting OutputStream can then be used to stream data directly to the input of the terminal session, as if typed by the user:\r\n\r\n      ```\r\n      // Wrap output stream in writer\r\n      var writer = new StringWriter(outputStream);\r\n\r\n      // Send text\r\n      writer.sendText(\"hello\");\r\n\r\n      // Send more text\r\n      writer.sendText(\"world\");\r\n\r\n      // Close writer and stream\r\n      writer.sendEnd();\r\n      ```\r\n  */\r\n\r\n  /**\r\n   * The color scheme to use for the terminal session. It consists of a semicolon-separated series of name-value pairs. Each name-value pair is separated by a colon and assigns a value to a color in the terminal emulator palette. For example, to use blue text on white background by default, and change the red color to a purple shade, you would specify:\r\n   *\r\n   * \r\n   *   ```\r\n   *   foreground: rgb:00/00/ff;\r\n   *   background: rgb:ff/ff/ff;\r\n   *   color9: rgb:80/00/80\r\n   *   ```\r\n   * This format is similar to the color configuration format used by Xterm, so Xterm color configurations can be easily adapted for  This parameter is optional. If not specified, Guacamole will render text as gray over a black background.\r\n   * \r\n   * Possible color names are:\r\n   *   foreground\r\n   *   Set the default foreground color.\r\n   *\r\n   *   background\r\n   *   Set the default background color.\r\n   *\r\n   *   colorN\r\n   *   Set the color at index N on the Xterm 256-color palette. For example, color9 refers to the red color.\r\n   *\r\n   *   Possible color values are:\r\n   *\r\n   *       rgb:RR/GG/BB\r\n   *       Use the specified color in RGB format, with each component in hexadecimal. For example, rgb:ff/00/00 specifies the color red. Note that each hexadecimal component can be one to four digits, but the effective values are always zero-extended or truncated to two digits; for example, rgb:f/8/0, rgb:f0/80/00, and rgb:f0f/808/00f all refer to the same effective color.\r\n   *\r\n   *       colorN\r\n   *       Use the color currently assigned to index N on the Xterm 256-color palette. For example, color9 specifies the current red color. Note that the color value is used rather than the color reference, so if color9 is changed later in the color scheme configuration, that new color will not be reflected in this assignment.\r\n   *\r\n   *   For backward compatibility, Guacamole will also accept four special values as the color scheme parameter:\r\n   *\r\n   *   black-white\r\n   *   Black text over a white background.\r\n   *\r\n   *   gray-black\r\n   *   Gray text over a black background. This is the default color scheme.\r\n   *\r\n   *   green-black\r\n   *   Green text over a black background.\r\n   *\r\n   *   white-black\r\n   *   White text over a black background.\r\n   */\r\n  \"color-scheme\"?: string;\r\n\r\n  /**\r\n   * The name of the font to use. This parameter is optional. If not specified, the default of “monospace” will be used instead.\r\n  */\r\n  \"font-name\"?: string;\r\n  /**\r\n   * The size of the font to use, in points. This parameter is optional. If not specified, the default of 12 will be used instead.\r\n  */\r\n  \"font-size\"?: number;\r\n  /**\r\n   * The maximum number of rows to allow within the terminal scrollback buffer. This parameter is optional. If not specified, the scrollback buffer will be limited to a maximum of 1000 rows.\r\n  */\r\n  scrollback?: number;\r\n  /**\r\n  Guacamole implements the support to send a “magic wake-on-lan packet” to a remote host prior to attempting to establish a connection with the host. The below parameters control the behavior of this functionality, which is disabled by default.\r\n  \r\n  Important\r\n  There are several factors that can impact the ability of Wake-on-LAN (WoL) to function correctly, many of which are outside the scope of Guacamole configuration. If you are configuring WoL within Guacamole you should also be familiar with the other components that need to be configured in order for it to function correctly.\r\n  */\r\n\r\n  /**\r\n   * If set to “true”, Guacamole will attempt to send the Wake-On-LAN packet prior to establishing a connection. This parameter is optional. By default, Guacamole will not send the WoL packet. Enabling this option requires that the wol-mac-addr parameter also be configured, otherwise the WoL packet will not be sent.\r\n  */\r\n  \"wol-send-packet\"?: boolean;\r\n  /**\r\n   * This parameter configures the MAC address that Guacamole will use in the magic WoL packet to attempt to wake the remote system. If wol-send-packet is enabled, this parameter is required or else the WoL packet will not be sent.\r\n  */\r\n  \"wol-mac-addr\"?: string;\r\n  /**\r\n   * This parameter configures the IPv4 broadcast address or IPv6 multicast address that Guacamole will send the WoL packet to in order to wake the host. This parameter is optional. If no value is provided, the default local IPv4 broadcast address (255.255.255.255) will be used.\r\n  */\r\n  \"wol-broadcast-addr\"?: string;\r\n  /**\r\n   * This parameter configures the UDP port that will be set in the WoL packet. In most cases the UDP port isn’t processed by the system that will be woken up; however, there are certain cases where it is useful for the port to be set, as in situations where a router is listening for the packet and can make routing decisions depending upon the port that is used. If not configured the default UDP port 9 will be used.\r\n  */\r\n  \"wol-udp-port\"?: number;\r\n  /**\r\n   * By default after the WoL packet is sent Guacamole will attempt immediately to connect to the remote host. It may be desirable in certain scenarios to have Guacamole wait before the initial connection in order to give the remote system time to boot. Setting this parameter to a positive value will cause Guacamole to wait the specified number of seconds before attempting the initial connection. This parameter is optional.\r\n  */\r\n  \"wol-wait-time\"?: number;\r\n}\r\n\r\nexport interface vnc_unencrypted_settings {\r\n  /**\r\n * The number of times to retry connecting before giving up and returning an error. In the case of a reverse connection, this is the number of times the connection process is allowed to time out.\r\n */\r\n  autoretry?: number;\r\n  /**\r\n   * The color depth to request, in bits-per-pixel. This parameter is optional. If specified, this must be either 8, 16, 24, or 32. Regardless of what value is chosen here, if a particular update uses less than 256 colors, Guacamole will always send that update as a 256-color PNG.\r\n   */\r\n  \"color-depth\"?: 8 | 16 | 24 | 32;\r\n  /**\r\n   * If the colors of your display appear wrong (blues appear orange or red, etc.), it may be that your VNC server is sending image data incorrectly, and the red and blue components of each color are swapped. If this is the case, set this parameter to “true” to work around the problem. This parameter is optional.\r\n   */\r\n  \"swap-red-blue\"?: boolean;\r\n  /**\r\n   * If set to “remote”, the mouse pointer will be rendered remotely, and the local position of the mouse pointer will be indicated by a small dot. A remote mouse cursor will feel slower than a local cursor, but may be necessary if the VNC server does not support sending the cursor image to the client.\r\n   */\r\n  cursor?: \"remote\";\r\n  /**\r\n   * A space-delimited list of VNC encodings to use. The format of this parameter is dictated by libvncclient and thus doesn’t really follow the form of other Guacamole parameters. This parameter is optional, and libguac-client-vnc will use any supported encoding by default.\r\n \r\n      Beware that this parameter is intended to be replaced with individual, encoding-specific parameters in a future release.\r\n      */\r\n  encodings?: string;\r\n  /**\r\n   * Whether this connection should be read-only. If set to “true”, no input will be accepted on the connection at all. Users will only see the desktop and whatever other users using that same desktop are doing. This parameter is optional.\r\n   */\r\n  \"read-only\"?: boolean;\r\n  /**\r\n   * Whether this connection should only use lossless compression for graphical updates. If set to “true”, lossy compression will not be used. This parameter is optional. By default, lossy compression will be used when heuristics determine that it would likely outperform lossless compression.\r\n   */\r\n  \"force-lossless\"?: boolean;\r\n  /**\r\n   * The destination host to request when connecting to a VNC proxy such as UltraVNC Repeater. This is only necessary if the VNC proxy in use requires the connecting user to specify which VNC server to connect to. If the VNC proxy automatically connects to a specific server, this parameter is not necessary.\r\n   */\r\n  \"dest-host\"?: string;\r\n  /**\r\n   * Whether reverse connection should be used. If set to “true”, instead of connecting to a server at a given hostname and port, guacd will listen on the given port for inbound connections from a VNC server.\r\n   */\r\n  \"reverse-connect\"?: boolean;\r\n  /**\r\n   * If reverse connection is in use, the maximum amount of time to wait for an inbound connection from a VNC server, in milliseconds. If blank, the default value is 5000 (five seconds).\r\n   */\r\n  \"listen-timeout\"?: number;\r\n  /**\r\n   * If set to “true”, audio support will be enabled, and a second connection for PulseAudio will be made in addition to the VNC connection. By default, audio support within VNC is disabled.\r\n   */\r\n  \"enable-audio\"?: boolean;\r\n  /**\r\n   * The name of the PulseAudio server to connect to. This will be the hostname of the computer providing audio for your connection via PulseAudio, most likely the same as the value given for the hostname parameter.\r\n \r\n      If this parameter is omitted, the default PulseAudio device will be used, which will be the PulseAudio server running on the same machine as guacd.\r\n      */\r\n  \"audio-servername\"?: string;\r\n  /**\r\n   * The encoding to assume for the VNC clipboard. This parameter is optional. By default, the standard encoding ISO 8859-1 will be used. Only use this parameter if you are sure your VNC server supports other encodings beyond the standard ISO 8859-1.\r\n \r\n      Possible values are:\r\n \r\n      ISO8859-1\r\n      ISO 8859-1 is the clipboard encoding mandated by the VNC standard, and supports only basic Latin characters. Unless your VNC server specifies otherwise, this encoding is the only encoding guaranteed to work.\r\n \r\n      UTF-8\r\n      UTF-8 - the most common encoding used for Unicode. Using this encoding for the VNC clipboard violates the VNC specification, but some servers do support this. This parameter value should only be used if you know your VNC server supports this encoding.\r\n \r\n      UTF-16\r\n      UTF-16 - a 16-bit encoding for Unicode which is not as common as UTF-8, but still widely used. Using this encoding for the VNC clipboard violates the VNC specification. This parameter value should only be used if you know your VNC server supports this encoding.\r\n \r\n      CP1252\r\n      Code page 1252 - a Windows-specific encoding for Latin characters which is mostly a superset of ISO 8859-1, mapping some additional displayable characters onto what would otherwise be control characters. Using this encoding for the VNC clipboard violates the VNC specification. This parameter value should only be used if you know your VNC server supports this encoding.\r\n      * \r\n      */\r\n  \"clipboard-encoding\"?: \"ISO8859-1\" | \"UTF-8\" | \"UTF-16\" | \"CP1252\"\r\n}\r\n\r\nexport interface rdp_unencrypted_settings {\r\n  /**\r\n   * The type of line ending normalization to apply to text within the clipboard, if any. By default, line ending normalization is not applied.\r\n   \r\n      Possible values are:\r\n  \r\n      preserve\r\n      Preserve all line endings within the clipboard exactly as they are, performing no normalization whatsoever. This is the default.\r\n  \r\n      unix\r\n      Automatically transform all line endings within the clipboard to Unix-style line endings (LF). This format of line ending is the format used by both Linux and Mac.\r\n  \r\n      windows\r\n      Automatically transform all line endings within the clipboard to Windows-style line endings (CRLF).\r\n      */\r\n  \"normalize-clipboard\"?: \"preserve\" | \"unix\" | \"windows\";\r\n  /**\r\n   * The server-side keyboard layout. This is the layout of the RDP server and has nothing to do with the keyboard layout in use on the client. The Guacamole client is independent of keyboard layout. The RDP protocol, however, is not independent of keyboard layout, and Guacamole needs to know the keyboard layout of the server in order to send the proper keys when a user is typing.\r\n   \r\n      Possible values are generally in the format LANGUAGE-REGION-VARIANT, where LANGUAGE is the standard two-letter language code for the primary language associated with the layout, REGION is a standard representation of the location that the keyboard is used (the two-letter country code, when possible), and VARIANT is the specific keyboard layout variant (such as “qwerty”, “qwertz”, or “azerty”):\r\n  \r\n      | Keyboard layout\t\t\t    | Parameter value   | \r\n      | ------------------------------| -----------------:|\r\n      | Brazilian (Portuguese)        | pt-br-qwerty      |\r\n      | English (UK)                  | en-gb-qwerty      |\r\n      | English (US)                  | en-us-qwerty      |\r\n      | French                        | fr-fr-azerty      |\r\n      | French (Belgian)              | fr-be-azerty      |\r\n      | French (Swiss)                | fr-ch-qwertz      |\r\n      | German                        | de-de-qwertz      |\r\n      | German (Swiss)                | de-ch-qwertz      |\r\n      | Hungarian                     | hu-hu-qwertz      |\r\n      | Italian                       | it-it-qwerty      |\r\n      | Japanese                      | ja-jp-qwerty      |\r\n      | Norwegian                     | no-no-qwerty      |\r\n      | Spanish                       | es-es-qwerty      |\r\n      | Spanish (Latin American)      | es-latam-qwerty   |\r\n      | Swedish                       | sv-se-qwerty      |\r\n      | Turkish-Q                     | tr-tr-qwerty      |\r\n  \r\n      If you server’s keyboard layout is not yet supported, and it is not possible to set your server to use a supported layout, the failsafe layout may be used to force Unicode events to be used for all input, however beware that doing so may prevent keyboard shortcuts from working as expected.\r\n      * \r\n      */\r\n  \"server-layout\"?: string;\r\n  /**\r\n   * The timezone that the client should send to the server for configuring the local time display of that server. The format of the timezone is in the standard IANA key zone format, which is the format used in UNIX/Linux. This will be converted by RDP into the correct format for Windows.\r\n   \r\n      The timezone is detected and will be passed to the server during the handshake phase of the connection, and may used by protocols, like RDP, that support it. This parameter can be used to override the value detected and passed during the handshake, or can be used in situations where guacd does not support passing the timezone parameter during the handshake phase (guacd versions prior to 1.3.0).\r\n  \r\n      Support for forwarding the client timezone varies by RDP server implementation. For example, with Windows, support for forwarding timezones is only present in Windows Server with Remote Desktop Services (RDS, formerly known as Terminal Services) installed. Windows Server installations in admin mode, along with Windows workstation versions, do not allow the timezone to be forwarded. Other server implementations, for example, xrdp, may not implement this feature at all. Consult the documentation for the RDP server to determine whether or not this feature is supported.\r\n      */\r\n  timezone?: string;\r\n  /**\r\n   * The color depth to request, in bits-per-pixel. This parameter is optional. If specified, this must be either 8, 16, 24, or 32. Regardless of what value is chosen here, if a particular update uses less than 256 colors, Guacamole will always send that update as a 256-color PNG.\r\n   */\r\n  \"color-depth\"?: 8 | 16 | 24 | 32;\r\n  /**\r\n   * The width of the display to request, in pixels. This parameter is optional. If this value is not specified, the width of the connecting client display will be used instead.\r\n   */\r\n  width?: number;\r\n  /**\r\n   * The height of the display to request, in pixels. This parameter is optional. If this value is not specified, the height of the connecting client display will be used instead.\r\n   */\r\n  height?: number;\r\n  /**\r\n   * The desired effective resolution of the client display, in DPI. This parameter is optional. If this value is not specified, the resolution and size of the client display will be used together to determine, heuristically, an appropriate resolution for the RDP session.\r\n   */\r\n  dpi?: number;\r\n  /**\r\n   * The method to use to update the RDP server when the width or height of the client display changes. This parameter is optional. If this value is not specified, no action will be taken when the client display changes size.\r\n   \r\n      Normally, the display size of an RDP session is constant and can only be changed when initially connecting. As of RDP 8.1, the “Display Update” channel can be used to request that the server change the display size. For older RDP servers, the only option is to disconnect and reconnect with the new size.\r\n  \r\n      Possible values are:\r\n  \r\n      display-update\r\n      Uses the “Display Update” channel added with RDP 8.1 to signal the server when the client display size has changed.\r\n  \r\n      reconnect\r\n      Automatically disconnects the RDP session when the client display size has changed, and reconnects with the new size.\r\n      * \r\n      */\r\n  \"resize-method\"?: \"display-update\" | \"reconnect\";\r\n  /**\r\n   * Whether this connection should only use lossless compression for graphical updates. If set to “true”, lossy compression will not be used. This parameter is optional. By default, lossy compression will be used when heuristics determine that it would likely outperform lossless compression.\r\n   * \r\n   */\r\n  \"force-lossless\"?: boolean;\r\n  /**\r\n   * Audio is enabled by default in both the client and in libguac-client-rdp. If you are concerned about bandwidth usage, or sound is causing problems, you can explicitly disable sound by setting this parameter to “true”.\r\n  */\r\n  \"disable-audio\"?: boolean;\r\n  /** \r\n   * If set to “true”, audio input support (microphone) will be enabled, leveraging the standard “AUDIO_INPUT” channel of RDP. By default, audio input support within RDP is disabled.\r\n  */\r\n  \"enable-audio-input\"?: boolean;\r\n  /**\r\n   * If set to “true”, support for multi-touch events will be enabled, leveraging the standard “RDPEI” channel of RDP. By default, direct RDP support for multi-touch events is disabled.\r\n   * \r\n   * Enabling support for multi-touch allows touch interaction with applications inside the RDP session, however the touch gestures available will depend on the level of touch support of those applications and the OS.\r\n   * \r\n   * If multi-touch support is not enabled, pointer-type interaction with applications inside the RDP session will be limited to mouse or emulated mouse events.\r\n  */\r\n  \"enable-touch\"?: boolean;\r\n  /**\r\n   * Printing is disabled by default, but with printing enabled, RDP users can print to a virtual printer that sends a PDF containing the document printed to the Guacamole client. Enable printing by setting this parameter to “true”.\r\n   * \r\n   * Printing support requires GhostScript to be installed. If guacd cannot find the gs executable when printing, the print attempt will fail.\r\n  */\r\n  \"enable-printing\"?: boolean;\r\n  /**\r\n  * File transfer is disabled by default, but with file transfer enabled, RDP users can transfer files to and from a virtual drive which persists on the Guacamole server. Enable file transfer support by setting this parameter to “true”.\r\n  * \r\n  * Files will be stored in the directory specified by the “drive-path” parameter, which is required if file transfer is enabled.\r\n  */\r\n  \"enable-drive\"?: boolean;\r\n  /**\r\n   * If set to true downloads from the remote server to client (browser) will be disabled. This includes both downloads done via the hidden Guacamole menu, as well as using the special “Download” folder presented to the remote server. The default is false, which means that downloads will be allowed.\r\n  * \r\n  * If file transfer is not enabled, this parameter is ignored.\r\n  */\r\n  \"disable-download\"?: boolean;\r\n  /**\r\n   * If set to true, uploads from the client (browser) to the remote server location will be disabled. The default is false, which means uploads will be allowed if file transfer is enabled.\r\n  *\r\n  * If file transfer is not enabled, this parameter is ignored.\r\n  */\r\n  \"disable-upload\"?: boolean;\r\n  /**\r\n   * If set to “true”, enables rendering of the desktop wallpaper. By default, wallpaper will be disabled, such that unnecessary bandwidth need not be spent redrawing the desktop.\r\n   */\r\n  \"enable-wallpaper\"?: boolean;\r\n  /**\r\n   * If set to “true”, enables use of theming of windows and controls. By default, theming within RDP sessions is disabled.\r\n  */\r\n  \"enable-theming\"?: boolean;\r\n  /**\r\n   * If set to “true”, text will be rendered with smooth edges. Text over RDP is rendered with rough edges by default, as this reduces the number of colors used by text, and thus reduces the bandwidth required for the connection.\r\n  */\r\n  \"enable-font-smoothing\"?: boolean;\r\n  /**\r\n   * If set to “true”, the contents of windows will be displayed as windows are moved. By default, the RDP server will only draw the window border while windows are being dragged.\r\n  */\r\n  \"enable-full-window-drag\"?: boolean;\r\n  /**\r\n   * If set to “true”, graphical effects such as transparent windows and shadows will be allowed. By default, such effects, if available, are disabled.\r\n  */\r\n  \"enable-desktop-composition\"?: boolean;\r\n  /*\r\n  * If set to “true”, menu open and close animations will be allowed. Menu animations are disabled by default.\r\n  */\r\n  \"enable-menu-animations\"?: boolean;\r\n  /**\r\n   * In certain situations, particularly with RDP server implementations with known bugs, it is necessary to disable RDP’s built-in bitmap caching functionality. This parameter allows that to be controlled in a Guacamole session. If set to “true” the RDP bitmap cache will not be used.\r\n  */\r\n  \"disable-bitmap-caching\"?: boolean;\r\n  /**\r\n   * RDP normally maintains caches of regions of the screen that are currently not visible in the client in order to accelerate retrieval of those regions when they come into view. This parameter, when set to “true,” will disable caching of those regions. This is usually only useful when dealing with known bugs in RDP server implementations and should remain enabled in most circumstances.\r\n  */\r\n  \"disable-offscreen-caching\"?: boolean;\r\n  /**\r\n   * In addition to screen regions, RDP maintains caches of frequently used symbols or fonts, collectively known as “glyphs.” As with bitmap and offscreen caching, certain known bugs in RDP implementations can cause performance issues with this enabled, and setting this parameter to “true” will disable that glyph caching in the RDP session.\r\n   * \r\n   * Glyph caching is currently universally disabled, regardless of the value of this parameter, as glyph caching support is not considered stable by FreeRDP as of the FreeRDP 2.0.0 release. See: GUACAMOLE-1191.\r\n  */\r\n  \"disable-glyph-caching\"?: boolean;\r\n}\r\n\r\nexport interface ssh_unencrypted_settings {\r\n  /**\r\n   * The specific locale to request for the SSH session. This parameter is optional and may be any value accepted by the LANG environment variable of the SSH server. If not specified, the SSH server’s default locale will be used.\r\n   * \r\n   * As this parameter is sent to the SSH server using the LANG environment variable, the parameter will only have an effect if the SSH server allows the LANG environment variable to be set by SSH clients.\r\n  */\r\n  locale?: string;\r\n  /**\r\n   * This parameter allows you to control the timezone that is sent to the server over the SSH connection, which will change the way local time is displayed on the server.\r\n   * \r\n   * The mechanism used to do this over SSH connections is by setting the TZ variable on the SSH connection to the timezone specified by this parameter. This means that the SSH server must allow the TZ variable to be set/overriden - many SSH server implementations have this disabled by default. To get this to work, you may need to modify the configuration of the SSH server and explicitly allow for TZ to be set/overriden.\r\n   * \r\n   * The available values of this parameter are standard IANA key zone format timezones, and the value will be sent directly to the server in this format.\r\n  */\r\n  timezone?: string;\r\n  /**\r\n   * Whether file transfer should be enabled. If set to “true”, the user will be allowed to upload or download files from the SSH server using SFTP. Guacamole includes the guacctl utility which controls file downloads and uploads when run on the SSH server by the user over the SSH connection.\r\n  */\r\n  \"enable-sftp\"?: boolean;\r\n  /**\r\n   * If set to true downloads from the remote system to the client (browser) will be disabled. The default is false, which means that downloads will be enabled.\r\n   * \r\n   * If SFTP is not enabled, this parameter will be ignored.\r\n  */\r\n  \"sftp-disable-download\"?: boolean;\r\n  /**\r\n   * If set to true uploads from the client (browser) to the remote system will be disabled. The default is false, which means that uploads will be enabled.\r\n   * \r\n   * If SFTP is not enabled, this parameter will be ignored.\r\n  */\r\n  \"sftp-disable-upload\"?: boolean;\r\n}\r\n\r\nexport interface telnet_unencrypted_settings {\r\n\r\n}\r\n\r\nexport interface kubernetes_unencrypted_settings {\r\n  /**\r\n   * The name of the Kubernetes namespace of the pod containing the container being attached to. This parameter is optional. If omitted, the namespace “default” will be used.\r\n  */\r\n  namespace?: string;\r\n}\r\n\r\nexport interface vnc_optional_settings extends Omit<vnc_settings, 'hostname' | 'port'> {\r\n  /**\r\n   * The hostname or IP address of the VNC server Guacamole should connect to.\r\n   */\r\n  hostname?: string;\r\n  /**\r\n   * The port the VNC server is listening on, usually 5900 or 5900 + display number. For example, if your VNC server is serving display number 1 (sometimes written as :1), your port number here would be 5901.\r\n   */\r\n  port?: string;\r\n}\r\n\r\nexport interface rdp_optional_settings extends Omit<rdp_settings, 'hostname'> {\r\n  /**\r\n   * The hostname or IP address of the VNC server Guacamole should connect to.\r\n   */\r\n  hostname?: string;\r\n}\r\n\r\nexport interface ssh_optional_settings extends Omit<ssh_settings, 'hostname'> {\r\n  /**\r\n   * The hostname or IP address of the VNC server Guacamole should connect to.\r\n   */\r\n  hostname?: string;\r\n}\r\n\r\nexport interface telnet_optional_settings extends Omit<telnet_settings, 'hostname'> {\r\n  /**\r\n   * The hostname or IP address of the VNC server Guacamole should connect to.\r\n   */\r\n  hostname?: string;\r\n}\r\n\r\nexport interface kubernetes_optional_settings extends Omit<telnet_settings, 'hostname'> {\r\n  /**\r\n   * The hostname or IP address of the Kubernetes server that Guacamole should connect to.\r\n   */\r\n  hostname?: string;\r\n  /**\r\n   * The port the Kubernetes server is listening on for API connections. This parameter is optional. If omitted, port 8080 will be used by default.\r\n  */\r\n  port?: number;\r\n}\r\n\r\nexport interface vncGuacLiteOptions {\r\n  type: 'vnc';\r\n  settings: vnc_settings;\r\n  maxInactivityTime?: number;\r\n}\r\n\r\nexport interface rdpGuacLiteOptions {\r\n  type: 'rdp';\r\n  settings: rdp_settings;\r\n  maxInactivityTime?: number;\r\n}\r\n\r\nexport interface sshGuacLiteOptions {\r\n  type: 'ssh';\r\n  settings: ssh_settings;\r\n  maxInactivityTime?: number;\r\n}\r\n\r\nexport interface telnetGuacLiteOptions {\r\n  type: 'telnet';\r\n  settings: telnet_settings;\r\n  maxInactivityTime?: number;\r\n}\r\n\r\nexport interface kubernetesGuacLiteOptions {\r\n  type: 'kubernetes';\r\n  settings: kubernetes_settings;\r\n  maxInactivityTime?: number;\r\n}\r\n\r\nexport type guac_token_params = vncGuacLiteOptions | rdpGuacLiteOptions | sshGuacLiteOptions | telnetGuacLiteOptions | kubernetesGuacLiteOptions;\r\n\r\nexport interface guac_params extends vnc_unencrypted_settings,  ssh_unencrypted_settings, rdp_unencrypted_settings, telnet_unencrypted_settings, kubernetes_unencrypted_settings {\r\n  /** For all custom fields.\r\n   * Typically these fields would be used in the callback function on guacamole-gateway-ts server\r\n   */\r\n  [x: string]: any;  \r\n}\r\n","import {Component} from '@angular/core';\r\n\r\n@Component({\r\n    selector: 'guacamole-gateway-client-connecting-message',\r\n    host: { class: 'guacamole-gateway-client-message'},\r\n    template: `\r\n        <ng-content></ng-content>\r\n    `\r\n})\r\nexport class ConnectingMessageComponent {\r\n}\r\n","import {Component} from '@angular/core';\r\n\r\n@Component({\r\n    selector: 'guacamole-gateway-client-disconnected-message',\r\n    host: { class: 'guacamole-gateway-client-message'},\r\n    template: `\r\n        <ng-content></ng-content>\r\n    `\r\n})\r\nexport class DisconnectedMessageComponent {\r\n}\r\n","import {Component} from '@angular/core';\r\n\r\n@Component({\r\n    selector: 'guacamole-gateway-client-error-message',\r\n    host: { class: 'guacamole-gateway-client-message'},\r\n    template: `\r\n        <ng-content></ng-content>\r\n    `\r\n})\r\nexport class ErrorMessageComponent {\r\n}\r\n","import {Component, ElementRef, OnDestroy, OnInit, ViewChild} from '@angular/core';\r\nimport {RemoteDesktopService} from '../remote-desktop.service';\r\nimport {File, FileType, ManagedFilesystem} from '../managed-filesystem';\r\nimport {ManagedFilesystemService} from '../managed-filesystem.service';\r\nimport {Subscription, timer} from 'rxjs';\r\nimport {finalize, takeWhile} from 'rxjs/operators';\r\n\r\n/**\r\n * The main file manager UI, kept as an independent component that has to be manually\r\n * included in the template, so it can be used without a VNC connection\r\n */\r\n@Component({\r\n  selector: 'guacamole-gateway-client-file-manager',\r\n  templateUrl: './file-manager.component.html',\r\n  styleUrls: ['./file-manager.component.scss']\r\n})\r\nexport class FileManagerComponent implements OnInit, OnDestroy {\r\n  filesystems: ManagedFilesystem[];\r\n  fs: ManagedFilesystem;\r\n\r\n  FileType = FileType;\r\n\r\n  @ViewChild('fileInput') fileInput: ElementRef;\r\n\r\n  constructor(\r\n    public manager: RemoteDesktopService,\r\n    private fsService: ManagedFilesystemService,\r\n  ) {\r\n  }\r\n\r\n  private subscriptions: Subscription[] = [];\r\n\r\n  ngOnInit(): void {\r\n    this.subscriptions.push(\r\n      this.manager.getFilesystems().subscribe(fs => {\r\n        this.loadFilesystem(fs);\r\n      })\r\n    );\r\n  }\r\n\r\n  ngOnDestroy(): void {\r\n    this.subscriptions.forEach(subscription => {\r\n      subscription.unsubscribe()\r\n    });\r\n  }\r\n\r\n  get currentDirFiles(): File[] {\r\n    if (!this.fs.currentDirectory.files) {\r\n      return [];\r\n    } else {\r\n      return Object.keys(this.fs.currentDirectory.files)\r\n        .map(e => this.fs.currentDirectory.files[e])\r\n        .sort((a, b) => a.name > b.name ? 1 : -1);\r\n    }\r\n  }\r\n\r\n  loadFilesystem(fs: ManagedFilesystem) {\r\n    this.fs = fs;\r\n    this.cd(this.fs.root)\r\n  }\r\n\r\n  cd(f: File) {\r\n    this.fsService.changeDirectory(this.fs, f).catch(err => {\r\n      console.error(err)\r\n    })\r\n  }\r\n\r\n  download(f: File) {\r\n    this.fsService.startFileDownload(this.fs, f.streamName);\r\n  }\r\n\r\n  selectForUpload() {\r\n    this.fileInput.nativeElement.click();\r\n  }\r\n\r\n  handleFileInput(files: FileList) {\r\n    // Upload each file\r\n    for (var i = 0; i < files.length; i++) {\r\n      const ul = this.manager.uploadFile(files[i], this.fs, this.fs.currentDirectory)\r\n\r\n      // Refresh filesystem when it's complete\r\n      timer(0, 100).pipe(\r\n        takeWhile(() => !ul.isCompleted()),\r\n        finalize(() => {\r\n          console.log('Refreshing FS')\r\n          this.fsService.refresh(this.fs, this.fs.currentDirectory).then()\r\n        })\r\n      ).subscribe()\r\n    }\r\n  }\r\n}\r\n","<!-- We import SVGs like this to avoid complicating the library setup at the expense of some redundancy -->\r\n\r\n<div class=\"file-manager-container\">\r\n  <div class=\"select-filesystem\">\r\n    <!--  In the future we might want to select the filesystem, usually we got one only -->\r\n  </div>\r\n  <div class=\"current-filesystem\" *ngIf=\"fs && fs.currentDirectory\">\r\n    <!-- Top bar -->\r\n    <div class=\"cwd\">\r\n      <div class=\"fs-element\">\r\n        <i class=\"fm-icon\" title=\"Current directory\">\r\n          <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\">\r\n            <path\r\n              d=\"M527.9 224H480v-48c0-26.5-21.5-48-48-48H272l-64-64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h400c16.5 0 31.9-8.5 40.7-22.6l79.9-128c20-31.9-3-73.4-40.7-73.4zM48 118c0-3.3 2.7-6 6-6h134.1l64 64H426c3.3 0 6 2.7 6 6v42H152c-16.8 0-32.4 8.8-41.1 23.2L48 351.4zm400 282H72l77.2-128H528z\"/>\r\n          </svg>\r\n        </i>\r\n        <span>{{fs.currentDirectory.streamName}}</span>\r\n      </div>\r\n\r\n      <div style=\"flex-grow: 1\"></div>\r\n\r\n      <button class=\"guacamole-gateway-client-button refresh-button\" [disabled]=\"!fs.currentDirectory\"\r\n              (click)=\"cd(fs.currentDirectory)\">\r\n        <i>\r\n          <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\r\n            <path\r\n              d=\"M500 8h-27.711c-6.739 0-12.157 5.548-11.997 12.286l2.347 98.568C418.075 51.834 341.788 7.73 255.207 8.001 118.82 8.428 7.787 120.009 8 256.396 8.214 393.181 119.165 504 256 504c63.926 0 122.202-24.187 166.178-63.908 5.113-4.618 5.354-12.561.482-17.433l-19.738-19.738c-4.498-4.498-11.753-4.785-16.501-.552C351.787 433.246 306.105 452 256 452c-108.322 0-196-87.662-196-196 0-108.322 87.662-196 196-196 79.545 0 147.941 47.282 178.675 115.302l-126.389-3.009c-6.737-.16-12.286 5.257-12.286 11.997V212c0 6.627 5.373 12 12 12h192c6.627 0 12-5.373 12-12V20c0-6.627-5.373-12-12-12z\"/>\r\n          </svg>\r\n        </i>\r\n      </button>\r\n      <button class=\"guacamole-gateway-client-button up-button\" [disabled]=\"!fs.currentDirectory.parent\"\r\n              (click)=\"cd(fs.currentDirectory.parent)\">\r\n        <i>\r\n          <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\">\r\n            <path\r\n              d=\"M19.716 184.485l19.626 19.626c4.753 4.753 12.484 4.675 17.14-.173L134 123.22V468c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12V123.22l77.518 80.717c4.656 4.849 12.387 4.927 17.14.173l19.626-19.626c4.686-4.686 4.686-12.284 0-16.971L168.485 35.716c-4.686-4.686-12.284-4.686-16.971 0L19.716 167.515c-4.686 4.686-4.686 12.284 0 16.97z\"/>\r\n          </svg>\r\n        </i>\r\n        <span>Up</span>\r\n      </button>\r\n    </div>\r\n\r\n    <div class=\"files-list-container\">\r\n      <table>\r\n        <tbody>\r\n        <tr *ngFor=\"let f of currentDirFiles\">\r\n          <td class=\"node\" *ngIf=\"f.type === FileType.DIRECTORY\">\r\n            <div class=\"fs-element directory\">\r\n              <i class=\"fm-icon\">\r\n                <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\r\n                  <path\r\n                    d=\"M464 128H272l-54.63-54.63c-6-6-14.14-9.37-22.63-9.37H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48zm0 272H48V112h140.12l54.63 54.63c6 6 14.14 9.37 22.63 9.37H464v224z\"/>\r\n                </svg>\r\n              </i>\r\n              <span (click)=\"cd(f)\">{{f.name}}</span>\r\n            </div>\r\n          </td>\r\n          <td class=\"node\" *ngIf=\"f.type === FileType.NORMAL\">\r\n            <div class=\"fs-element file\">\r\n              <i class=\"fm-icon\">\r\n                <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\">\r\n                  <path\r\n                    d=\"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z\"/>\r\n                </svg>\r\n              </i>\r\n              <span>{{f.name}}</span>\r\n            </div>\r\n          </td>\r\n          <td class=\"actions\">\r\n            <div>\r\n              <button class=\"guacamole-gateway-client-button\" *ngIf=\"f.type === FileType.NORMAL\"\r\n                      title=\"Download file\"\r\n                      (click)=\"download(f)\">\r\n                <i>\r\n                  <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\">\r\n                    <path\r\n                      d=\"M528 288h-92.1l46.1-46.1c30.1-30.1 8.8-81.9-33.9-81.9h-64V48c0-26.5-21.5-48-48-48h-96c-26.5 0-48 21.5-48 48v112h-64c-42.6 0-64.2 51.7-33.9 81.9l46.1 46.1H48c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V336c0-26.5-21.5-48-48-48zm-400-80h112V48h96v160h112L288 368 128 208zm400 256H48V336h140.1l65.9 65.9c18.8 18.8 49.1 18.7 67.9 0l65.9-65.9H528v128zm-88-64c0-13.3 10.7-24 24-24s24 10.7 24 24-10.7 24-24 24-24-10.7-24-24z\"/>\r\n                  </svg>\r\n                </i>\r\n              </button>\r\n            </div>\r\n          </td>\r\n        </tr>\r\n        </tbody>\r\n      </table>\r\n    </div>\r\n\r\n    <!-- Buttons -->\r\n    <div class=\"actions\">\r\n      <button class=\"guacamole-gateway-client-button\" [disabled]=\"!fs.currentDirectory\" (click)=\"selectForUpload()\">\r\n        <i class=\"upload-button\">\r\n          <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\">\r\n            <path\r\n              d=\"M528 288H384v-32h64c42.6 0 64.2-51.7 33.9-81.9l-160-160c-18.8-18.8-49.1-18.7-67.9 0l-160 160c-30.1 30.1-8.7 81.9 34 81.9h64v32H48c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V336c0-26.5-21.5-48-48-48zm-400-80L288 48l160 160H336v160h-96V208H128zm400 256H48V336h144v32c0 26.5 21.5 48 48 48h96c26.5 0 48-21.5 48-48v-32h144v128zm-40-64c0 13.3-10.7 24-24 24s-24-10.7-24-24 10.7-24 24-24 24 10.7 24 24z\"/>\r\n          </svg>\r\n        </i>\r\n        <span>Upload</span>\r\n      </button>\r\n      <input type=\"file\" [multiple]=\"true\" style=\"display: none\" (change)=\"handleFileInput($any($event.target).files)\"\r\n             #fileInput>\r\n    </div>\r\n  </div>\r\n</div>\r\n","import {Component, Input} from '@angular/core';\r\n\r\n/**\r\n * Message component for showing error or success messages for when the connection\r\n * state changes\r\n */\r\n@Component({\r\n  selector: 'guacamole-gateway-client-message',\r\n  template: `\r\n    <div class=\"guacamole-gateway-client-message\">\r\n      <div\r\n        class=\"guacamole-gateway-client-message-title\"\r\n        [class.guacamole-gateway-client-message-title-success]=\"type === 'success'\"\r\n        [class.guacamole-gateway-client-message-title-error]=\"type === 'error'\"\r\n      >\r\n        {{ title | uppercase }}\r\n      </div>\r\n      <div class=\"guacamole-gateway-client-message-body\">\r\n        <p>{{ message }}</p>\r\n        <ng-content></ng-content>\r\n      </div>\r\n    </div>\r\n  `,\r\n})\r\nexport class MessageComponent {\r\n  /**\r\n   * Title of the message to display\r\n   */\r\n  @Input()\r\n  public title: string = '';\r\n\r\n  /**\r\n   * Content of the message to display\r\n   */\r\n  @Input()\r\n  public message: string = '';\r\n\r\n  /**\r\n   * Message type. Can be 'success' or 'error'\r\n   */\r\n  @Input()\r\n  public type = 'success';\r\n}\r\n","import {\r\n  AfterViewChecked,\r\n  ChangeDetectionStrategy,\r\n  Component,\r\n  ElementRef,\r\n  HostListener,\r\n  Input,\r\n  OnDestroy,\r\n  OnInit,\r\n  Output,\r\n  Renderer2,\r\n  ViewChild,\r\n} from '@angular/core';\r\nimport {BehaviorSubject, Subscription} from 'rxjs';\r\nimport {RemoteDesktopService} from '../remote-desktop.service';\r\nimport { Client, Display, Keyboard, Mouse } from 'guacamole-common-ts';\r\n\r\n@Component({\r\n  selector: 'guacamole-gateway-client-display',\r\n  host: { class: 'guacamole-gateway-client-viewport' },\r\n  template: `\r\n      <div class=\"guacamole-gateway-client-display\" #display>\r\n      </div>\r\n  `,\r\n  changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class DisplayComponent implements OnInit, OnDestroy, AfterViewChecked {\r\n\r\n  /**\r\n   * Emit the mouse move events to any subscribers\r\n   */\r\n  @Output()\r\n  public onMouseMove = new BehaviorSubject(null);\r\n\r\n  /**\r\n   * Remote desktop manager\r\n   */\r\n  @Input()\r\n  public manager: RemoteDesktopService;\r\n\r\n  @ViewChild('display', { static: true})\r\n  private display: ElementRef;\r\n\r\n  /**\r\n   * Remote desktop keyboard\r\n   */\r\n  private keyboard: Keyboard;\r\n\r\n  /**\r\n   * Remote desktop mouse\r\n   */\r\n  private mouse: Mouse;\r\n  private touch: Mouse.Touchscreen;\r\n\r\n  /**\r\n   * Subscriptions\r\n   */\r\n  private subscriptions: Subscription[] = [];\r\n\r\n  constructor(\r\n    private viewport: ElementRef,\r\n    private renderer: Renderer2,\r\n    ) {\r\n  }\r\n\r\n  /**\r\n   * Create the display canvas when initialising the component\r\n   */\r\n  ngOnInit(): void {\r\n      this.createDisplayCanvas();\r\n      this.bindSubscriptions();\r\n  }\r\n\r\n  /**\r\n   * Unbind all display input listeners when destroying the component\r\n   */\r\n  ngOnDestroy(): void {\r\n      this.removeDisplay();\r\n      this.removeDisplayInputListeners();\r\n      this.unbindSubscriptions();\r\n  }\r\n\r\n  ngAfterViewChecked(): void {\r\n      this.setDisplayScale();\r\n  }\r\n\r\n  /**\r\n   * Bind all subscriptions\r\n   */\r\n  private bindSubscriptions(): void {\r\n      this.subscriptions.push(this.manager.onKeyboardReset.subscribe(_ => this.resetKeyboard()));\r\n      this.subscriptions.push(this.manager.onFocused.subscribe(this.handleFocused.bind(this)));\r\n  }\r\n\r\n  /**\r\n   * Unbind all subscriptions\r\n   */\r\n  private unbindSubscriptions(): void {\r\n      this.subscriptions.forEach(subscription => subscription.unsubscribe());\r\n  }\r\n\r\n  /**\r\n   * Bind input listeners if display is focused, otherwise, unbind\r\n   */\r\n  private handleFocused(newFocused: boolean): void {\r\n      if (newFocused) {\r\n          this.bindDisplayInputListeners();\r\n      } else {\r\n          this.removeDisplayInputListeners();\r\n      }\r\n  }\r\n\r\n  /**\r\n   * Release all the keyboards when the window loses focus\r\n   * @param event\r\n   */\r\n  @HostListener('window:blur', ['$event'])\r\n  private onWindowBlur(event: any): void {\r\n      this.resetKeyboard();\r\n  }\r\n\r\n  /**\r\n   * Resize the display scale when the window is resized\r\n   * @param event\r\n   */\r\n  @HostListener('window:resize', ['$event'])\r\n  private onWindowResize(event: any): void {\r\n      this.setDisplayScale();\r\n  }\r\n\r\n  /**\r\n   * Create the remote desktop display and bind the event handlers\r\n   */\r\n  private createDisplayCanvas(): void {\r\n      this.createDisplay();\r\n      this.createDisplayInputs();\r\n      this.bindDisplayInputListeners();\r\n  }\r\n\r\n  /**\r\n   * Get the remote desktop display and set the scale\r\n   */\r\n  private setDisplayScale() {\r\n      const display = this.getDisplay();\r\n      const scale = this.calculateDisplayScale(display);\r\n      display.scale(scale);\r\n  }\r\n\r\n  /**\r\n   * Get the remote desktop display\r\n   */\r\n  private getDisplay(): Display {\r\n      return this.manager.getClient().getDisplay();\r\n  }\r\n\r\n  /**\r\n   * Get the remote desktop client\r\n   */\r\n  private getClient(): Client {\r\n      return this.manager.getClient();\r\n  }\r\n\r\n  /**\r\n   * Calculate the scale for the display\r\n   */\r\n  private calculateDisplayScale(display: Display): number {\r\n      const viewportElement = this.viewport.nativeElement;\r\n      const scale = Math.min(viewportElement.clientWidth / display.getWidth(),\r\n          viewportElement.clientHeight / display.getHeight());\r\n      return scale;\r\n  }\r\n\r\n  /**\r\n   * Assign the display to the client\r\n   */\r\n  private createDisplay(): void {\r\n      const element = this.display.nativeElement;\r\n      const display = this.getDisplay();\r\n      this.renderer.appendChild(element, display.getElement());\r\n  }\r\n\r\n  /**\r\n   * Remove the display\r\n   */\r\n  private removeDisplay(): void {\r\n      const element = this.display.nativeElement;\r\n      const display = this.getDisplay();\r\n      this.renderer.removeChild(element, display.getElement());\r\n  }\r\n\r\n  /**\r\n   * Bind input listeners for keyboard and mouse\r\n   */\r\n  private bindDisplayInputListeners(): void {\r\n      this.removeDisplayInputListeners();\r\n      this.touch.onmousedown = this.touch.onmousemove = this.touch.onmouseup =\r\n      this.mouse.onmousedown = this.mouse.onmouseup = this.mouse.onmousemove = this.handleMouseState.bind(this);\r\n      this.keyboard.onkeyup = this.handleKeyUp.bind(this);\r\n      this.keyboard.onkeydown = this.handleKeyDown.bind(this);\r\n  }\r\n\r\n  /**\r\n   * Remove all input listeners\r\n   */\r\n  private removeDisplayInputListeners(): void {\r\n      if (this.keyboard) {\r\n          this.keyboard.onkeydown = null;\r\n          this.keyboard.onkeyup = null;\r\n      }\r\n      if (this.mouse) {\r\n          this.mouse.onmousedown = this.mouse.onmouseup = this.mouse.onmousemove = null;\r\n      }\r\n      if (this.touch) {\r\n          this.touch.onmousedown = this.touch.onmouseup = this.touch.onmousemove = null;\r\n      }\r\n  }\r\n\r\n  /**\r\n   * Create the keyboard and mouse inputs\r\n   */\r\n  private createDisplayInputs(): void {\r\n      const display = this.display.nativeElement.children[0];\r\n    this.mouse = new Mouse(display);\r\n    this.touch = new Mouse.Touchscreen(display);\r\n    this.keyboard = new Keyboard(window.document);\r\n  }\r\n\r\n  /**\r\n   * Send mouse events to the remote desktop\r\n   * @param mouseState\r\n   */\r\n  private handleMouseState(mouseState: any): void {\r\n      const display = this.getDisplay();\r\n      const scale = display.getScale();\r\n    const scaledState = new Mouse.State(\r\n          mouseState.x / scale,\r\n          mouseState.y / scale,\r\n          mouseState.left,\r\n          mouseState.middle,\r\n          mouseState.right,\r\n          mouseState.up,\r\n          mouseState.down);\r\n      this.getClient().sendMouseState(scaledState);\r\n      this.onMouseMove.next(mouseState);\r\n  }\r\n\r\n  /**\r\n   * Resetting the keyboard will release all keys\r\n   */\r\n  private resetKeyboard(): void {\r\n      if (this.keyboard) {\r\n          this.keyboard.reset();\r\n      }\r\n  }\r\n\r\n  /**\r\n   * Send key down event to the remote desktop\r\n   * @param key\r\n   */\r\n  private handleKeyDown(key: any): void {\r\n      this.getClient().sendKeyEvent(1, key);\r\n  }\r\n\r\n  /**\r\n   * Send key up event to the remote desktop\r\n   * @param key\r\n   */\r\n  private handleKeyUp(key: any): void {\r\n      this.getClient().sendKeyEvent(0, key);\r\n  }\r\n\r\n}\r\n","import {Component, Input, OnInit} from '@angular/core';\r\nimport {ManagedFileUpload, StreamState} from '../managed-file-upload';\r\n\r\n@Component({\r\n  selector: 'ngx-file-transfer',\r\n  templateUrl: './file-transfer.component.html',\r\n  styleUrls: ['./file-transfer.component.scss']\r\n})\r\nexport class FileTransferComponent implements OnInit {\r\n  /**\r\n   * The file transfer to display.\r\n   */\r\n  @Input() transfer: ManagedFileUpload;\r\n\r\n  constructor() {\r\n  }\r\n\r\n  ngOnInit(): void {\r\n  }\r\n\r\n  /**\r\n   * Returns the unit string that is most appropriate for the\r\n   * number of bytes transferred thus far - either 'GB', 'MB', 'KB',\r\n   * or 'B'.\r\n   *\r\n   * @returns {String}\r\n   *     The unit string that is most appropriate for the number of\r\n   *     bytes transferred thus far.\r\n   */\r\n  getProgressUnit() {\r\n    var bytes = this.transfer.progress;\r\n\r\n    // Gigabytes\r\n    if (bytes > 1000000000)\r\n      return 'GB';\r\n\r\n    // Megabytes\r\n    if (bytes > 1000000)\r\n      return 'MB';\r\n\r\n    // Kilobytes\r\n    if (bytes > 1000)\r\n      return 'KB';\r\n\r\n    // Bytes\r\n    return 'B';\r\n\r\n  };\r\n\r\n  /**\r\n   * Returns the amount of data transferred thus far, in the units\r\n   * returned by getProgressUnit().\r\n   *\r\n   * @returns {Number}\r\n   *     The amount of data transferred thus far, in the units\r\n   *     returned by getProgressUnit().\r\n   */\r\n  getProgressValue() {\r\n    var bytes = this.transfer.progress;\r\n    if (!bytes)\r\n      return bytes;\r\n\r\n    // Convert bytes to necessary units\r\n    switch (this.getProgressUnit()) {\r\n\r\n      // Gigabytes\r\n      case 'GB':\r\n        return (bytes / 1000000000).toFixed(1);\r\n\r\n      // Megabytes\r\n      case 'MB':\r\n        return (bytes / 1000000).toFixed(1);\r\n\r\n      // Kilobytes\r\n      case 'KB':\r\n        return (bytes / 1000).toFixed(1);\r\n\r\n      // Bytes\r\n      case 'B':\r\n      default:\r\n        return bytes;\r\n\r\n    }\r\n\r\n  };\r\n\r\n  /**\r\n   * Returns the percentage of bytes transferred thus far, if the\r\n   * overall length of the file is known.\r\n   *\r\n   * @returns {Number}\r\n   *     The percentage of bytes transferred thus far, if the\r\n   *     overall length of the file is known.\r\n   */\r\n  getPercentDone() {\r\n    return this.transfer.progress / this.transfer.length * 100;\r\n  };\r\n\r\n  /**\r\n   * Determines whether the associated file transfer is in progress.\r\n   *\r\n   * @returns {Boolean}\r\n   *     true if the file transfer is in progress, false othherwise.\r\n   */\r\n  isInProgress() {\r\n\r\n    // Not in progress if there is no transfer\r\n    if (!this.transfer)\r\n      return false;\r\n\r\n    // Determine in-progress status based on stream state\r\n    switch (this.transfer.transferState.streamState) {\r\n\r\n      // IDLE or OPEN file transfers are active\r\n      case StreamState.IDLE:\r\n      case StreamState.OPEN:\r\n        return true;\r\n\r\n      // All others are not active\r\n      default:\r\n        return false;\r\n\r\n    }\r\n\r\n  };\r\n\r\n  /**\r\n   * Returns whether an error has occurred. If an error has occurred,\r\n   * the transfer is no longer active, and the text of the error can\r\n   * be read from getErrorText().\r\n   *\r\n   * @returns {Boolean}\r\n   *     true if an error has occurred during transfer, false\r\n   *     otherwise.\r\n   */\r\n  hasError() {\r\n    return this.transfer.transferState.streamState === StreamState.ERROR;\r\n  };\r\n\r\n  /**\r\n   * Returns the text of the current error as a translation string.\r\n   *\r\n   * @returns {String}\r\n   *     The name of the translation string containing the text\r\n   *     associated with the current error.\r\n   */\r\n  getErrorText() {\r\n\r\n    // Determine translation name of error\r\n    var status = this.transfer.transferState.statusCode;\r\n    var errorName = (status in UPLOAD_ERRORS) ? status.toString(16).toUpperCase() : \"DEFAULT\";\r\n\r\n    // Return translation string\r\n    return ERROR_DESCRIPTIONS[errorName];\r\n\r\n  };\r\n}\r\n\r\n/**\r\n * All upload error codes handled and passed off for translation.\r\n * Any error code not present in this list will be represented by\r\n * the \"DEFAULT\" translation.\r\n */\r\nvar UPLOAD_ERRORS = {\r\n  0x0100: true,\r\n  0x0201: true,\r\n  0x0202: true,\r\n  0x0203: true,\r\n  0x0204: true,\r\n  0x0205: true,\r\n  0x0301: true,\r\n  0x0303: true,\r\n  0x0308: true,\r\n  0x031D: true\r\n};\r\n\r\nvar ERROR_DESCRIPTIONS = {\r\n  \"100\"     : \"File transfer is either not supported or not enabled. Please contact your system administrator, or check your system logs.\",\r\n  \"201\"     : \"Too many files are currently being transferred. Please wait for existing transfers to complete, and then try again.\",\r\n  \"202\"     : \"The file cannot be transferred because the remote desktop server is taking too long to respond. Please try again or contact your system administrator.\",\r\n  \"203\"     : \"The remote desktop server encountered an error during transfer. Please try again or contact your system administrator.\",\r\n  \"204\"     : \"The destination for the file transfer does not exist. Please check that the destination exists and try again.\",\r\n  \"205\"     : \"The destination for the file transfer is currently locked. Please wait for any in-progress tasks to complete and try again.\",\r\n  \"301\"     : \"You do not have permission to upload this file because you are not logged in. Please log in and try again.\",\r\n  \"303\"     : \"You do not have permission to upload this file. If you require access, please check your system settings, or check with your system administrator.\",\r\n  \"308\"     : \"The file transfer has stalled. This is commonly caused by network problems, such as spotty wireless signal, or simply very slow network speeds. Please check your network and try again.\",\r\n  \"31D\"     : \"Too many files are currently being transferred. Please wait for existing transfers to complete, and then try again.\",\r\n  \"DEFAULT\" : \"An internal error has occurred within the Guacamole server, and the connection has been terminated. If the problem persists, please notify your system administrator, or check your system logs.\",\r\n}\r\n","<div class=\"transfer\"\r\n     [class.in-progress]=\"isInProgress()\"\r\n     [class.error]=\"hasError()\">\r\n\r\n  <!-- Overall status of transfer -->\r\n  <div class=\"transfer-status\">\r\n\r\n    <!-- Filename and progress bar -->\r\n    <div class=\"filename\">\r\n      <div class=\"progress\">\r\n        <div [style]=\"{'width': getPercentDone() + '%'}\" class=\"bar\"></div>\r\n      </div>\r\n      <span>{{transfer.filename}}</span>\r\n    </div>\r\n\r\n    <!-- Error text -->\r\n    <p class=\"error-text\">{{getErrorText()}}</p>\r\n\r\n  </div>\r\n\r\n  <!-- Progress/status text -->\r\n  <div class=\"text\">{{getProgressValue()}} {{getProgressUnit()}}</div>\r\n</div>\r\n","import {Component, OnInit} from '@angular/core';\r\nimport {RemoteDesktopService} from '../remote-desktop.service';\r\n\r\n@Component({\r\n  selector: 'ngx-file-transfer-manager',\r\n  templateUrl: './file-transfer-manager.component.html',\r\n  styleUrls: ['./file-transfer-manager.component.scss']\r\n})\r\nexport class FileTransferManagerComponent implements OnInit {\r\n\r\n  constructor(\r\n    public remoteDesktopService: RemoteDesktopService,\r\n  ) {\r\n  }\r\n\r\n  ngOnInit(): void {\r\n  }\r\n\r\n  /**\r\n   * Returns whether the given client has any associated file transfers,\r\n   * regardless of those file transfers' state.\r\n   */\r\n  public hasTransfers(): boolean  {\r\n    const u = this.remoteDesktopService.getUploads();\r\n    return !!(u && u.length);\r\n  };\r\n}\r\n","<div class=\"transfer-manager\">\r\n\r\n  <!-- File transfer manager header -->\r\n  <div class=\"header\">\r\n    <h2>Uploads</h2>\r\n    <button class=\"guacamole-gateway-client-button\" (click)=\"remoteDesktopService.clearCompletedUploads()\">Clear Completed</button>\r\n  </div>\r\n\r\n  <!-- Sent/received files -->\r\n  <div class=\"transfer-manager-body\" *ngIf=\"hasTransfers()\">\r\n    <div class=\"transfer-manager-body-section\">\r\n      <div class=\"transfers\">\r\n        <ngx-file-transfer\r\n          *ngFor=\"let upload of remoteDesktopService.getUploads()\"\r\n          [transfer]=\"upload\"\r\n        >\r\n        </ngx-file-transfer>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</div>\r\n","import {animate, state, style, transition, trigger,} from '@angular/animations';\r\nimport {\r\n  ChangeDetectionStrategy,\r\n  Component,\r\n  ContentChild,\r\n  ElementRef,\r\n  HostBinding,\r\n  HostListener,\r\n  Input,\r\n  OnDestroy,\r\n  OnInit,\r\n  ViewChild,\r\n  ViewEncapsulation,\r\n} from '@angular/core';\r\nimport {BehaviorSubject, Subscription, timer} from 'rxjs';\r\nimport * as screenfull from 'screenfull';\r\n\r\nimport {RemoteDesktopService} from '../remote-desktop.service';\r\nimport {ConnectingMessageComponent} from '../messages/connecting-message.component';\r\nimport {DisconnectedMessageComponent} from '../messages/disconnected-message.component';\r\nimport {ErrorMessageComponent} from '../messages/error-message.component';\r\nimport {FileManagerComponent} from '../file-manager/file-manager.component';\r\nimport {finalize, takeWhile} from 'rxjs/operators';\r\nimport {ManagedFilesystemService} from '../managed-filesystem.service';\r\n\r\n/**\r\n * The main component for displaying a remote desktop\r\n */\r\n@Component({\r\n  selector: 'guacamole-gateway-client',\r\n  template: `\r\n    <div class=\"guacamole-gateway-client\" #container>\r\n      <!-- Toolbar items template -->\r\n      <ng-template #toolbarItems>\r\n        <ul class=\"guacamole-gateway-client-toolbar-items\">\r\n          <ng-content\r\n            select=\"guacamole-gateway-client-toolbar-item[align=left]\"\r\n          ></ng-content>\r\n        </ul>\r\n        <ul class=\"guacamole-gateway-client-toolbar-items\">\r\n          <ng-content\r\n            select=\"guacamole-gateway-client-toolbar-item[align=right]\"\r\n          ></ng-content>\r\n        </ul>\r\n      </ng-template>\r\n\r\n      <!-- Normal toolbar -->\r\n      <nav class=\"guacamole-gateway-client-toolbar\" *ngIf=\"!remoteDesktopService.isFullScreen()\">\r\n        <template [ngTemplateOutlet]=\"toolbarItems\"></template>\r\n      </nav>\r\n\r\n      <!-- Full screen toolbar -->\r\n      <nav\r\n        class=\"guacamole-gateway-client-toolbar guacamole-gateway-client-toolbar-fullscreen\"\r\n        *ngIf=\"remoteDesktopService.isFullScreen()\"\r\n        [@toolbarAnimation]=\"toolbarVisible\"\r\n        #toolbar\r\n      >\r\n        <template [ngTemplateOutlet]=\"toolbarItems\"></template>\r\n      </nav>\r\n\r\n      <section class=\"guacamole-gateway-client-container\">\r\n        <!-- Connecting message -->\r\n        <div *ngIf=\"(state | async) === states.CONNECTING\">\r\n          <div class=\"guacamole-gateway-client-message\" *ngIf=\"connectingMessage\">\r\n            <ng-content\r\n              select=\"guacamole-gateway-client-connecting-message\"\r\n            ></ng-content>\r\n          </div>\r\n          <guacamole-gateway-client-message\r\n            *ngIf=\"!connectingMessage\"\r\n            title=\"Connecting to remote desktop\"\r\n            message=\"Attempting to connect to the remote desktop. Waiting for response...\"\r\n            type=\"success\"\r\n          >\r\n          </guacamole-gateway-client-message>\r\n        </div>\r\n\r\n        <!-- Disconnected message -->\r\n        <div *ngIf=\"(state | async) === states.DISCONNECTED\">\r\n          <div class=\"guacamole-gateway-client-message\" *ngIf=\"disconnectedMessage\">\r\n            <ng-content\r\n              select=\"guacamole-gateway-client-disconnected-message\"\r\n            ></ng-content>\r\n          </div>\r\n          <guacamole-gateway-client-message\r\n            *ngIf=\"!disconnectedMessage\"\r\n            title=\"Disconnected\"\r\n            message=\"The connection to the remote desktop terminated successfully\"\r\n            type=\"error\"\r\n          >\r\n            <button\r\n              (click)=\"remoteDesktopService.onReconnect.next(true)\"\r\n              class=\"guacamole-gateway-client-message-body-btn\"\r\n            >\r\n              Reconnect\r\n            </button>\r\n          </guacamole-gateway-client-message>\r\n        </div>\r\n\r\n        <!-- Error message -->\r\n        <div *ngIf=\"(state | async) === states.ERROR\">\r\n          <div class=\"guacamole-gateway-client-message\" *ngIf=\"errorMessage\">\r\n            <ng-content select=\"guacamole-gateway-client-error-message\"></ng-content>\r\n          </div>\r\n\r\n          <guacamole-gateway-client-message\r\n            *ngIf=\"!errorMessage\"\r\n            title=\"Connection error\"\r\n            message=\"The remote desktop server is currently unreachable.\"\r\n            type=\"error\"\r\n          >\r\n            <button\r\n              (click)=\"remoteDesktopService.onReconnect.next(true)\"\r\n              class=\"guacamole-gateway-client-message-body-btn\"\r\n            >\r\n              Connect\r\n            </button>\r\n          </guacamole-gateway-client-message>\r\n        </div>\r\n\r\n        <!-- Display -->\r\n        <guacamole-gateway-client-display\r\n          *ngIf=\"(state | async) === states.CONNECTED\"\r\n          [manager]=\"remoteDesktopService\"\r\n          (onMouseMove)=\"handleDisplayMouseMove($event)\"\r\n        >\r\n        </guacamole-gateway-client-display>\r\n\r\n        <!-- File manager -->\r\n        <div class=\"file-manager-dialog\" [class.show]=\"showFileManager\">\r\n          <ng-content select=\"guacamole-gateway-client-file-manager\"></ng-content>\r\n        </div>\r\n\r\n        <!-- File transfers -->\r\n        <div id=\"file-transfer-dialog\" *ngIf=\"hasTransfers()\">\r\n          <ngx-file-transfer-manager></ngx-file-transfer-manager>\r\n        </div>\r\n      </section>\r\n\r\n\r\n\r\n      <section\r\n        [class.guacamole-gateway-client-status-bar-hidden]=\"remoteDesktopService.isFullScreen()\"\r\n      >\r\n\r\n      </section>\r\n    </div>\r\n  `,\r\n  styleUrls: ['./remote-desktop.component.scss'],\r\n  encapsulation: ViewEncapsulation.None,\r\n  changeDetection: ChangeDetectionStrategy.Default,\r\n  animations: [\r\n    trigger('toolbarAnimation', [\r\n      state('1', style({transform: 'translateX(0%)'})),\r\n      state('0', style({transform: 'translateX(-100%)'})),\r\n      transition('1 => 0', animate('200ms 200ms ease-out')),\r\n      transition('0 => 1', animate('225ms ease-in')),\r\n    ]),\r\n  ],\r\n})\r\nexport class GuacamoleRemoteDesktopComponent implements OnInit, OnDestroy {\r\n  /**\r\n   * Guacamole has more states than the list below however for the component we are only interested\r\n   * in managing four states.\r\n   */\r\n  public states = {\r\n    CONNECTING: 'CONNECTING',\r\n    CONNECTED: 'CONNECTED',\r\n    DISCONNECTED: 'DISCONNECTED',\r\n    ERROR: 'ERROR',\r\n  };\r\n\r\n  /**\r\n   * Manage the component state\r\n   */\r\n  public state: BehaviorSubject<string> = new BehaviorSubject<string>(\r\n    this.states.CONNECTING\r\n  );\r\n\r\n  @Input() showFileManager: boolean;\r\n\r\n  @ContentChild(ConnectingMessageComponent, {static: true})\r\n  public connectingMessage: ConnectingMessageComponent;\r\n\r\n  @ContentChild(DisconnectedMessageComponent, {static: true})\r\n  public disconnectedMessage: DisconnectedMessageComponent;\r\n\r\n  @ContentChild(ErrorMessageComponent, {static: true})\r\n  public errorMessage: ErrorMessageComponent;\r\n\r\n  @ViewChild('container', {static: true})\r\n  private container: ElementRef;\r\n\r\n  @ViewChild('toolbar', {static: true})\r\n  private toolbar: ElementRef;\r\n\r\n  @ContentChild(FileManagerComponent)\r\n  private fileManager: FileManagerComponent\r\n\r\n  /**\r\n   * Subscriptions\r\n   */\r\n  private subscriptions: Subscription[] = [];\r\n\r\n  /**\r\n   * Hide or show elements\r\n   */\r\n  public toolbarVisible: boolean = true;\r\n\r\n  /**\r\n   * Whether a drag/drop operation is currently in progress (the user has\r\n   * dragged a file over the Guacamole connection but has not yet dropped it).\r\n   */\r\n  @HostBinding('class.drop-zone-active')\r\n  public dropPending: boolean;\r\n\r\n  constructor(\r\n    public remoteDesktopService: RemoteDesktopService,\r\n    private fsService: ManagedFilesystemService,\r\n  ) {\r\n  }\r\n\r\n  /**\r\n   * Subscribe to the connection state  and full screen state when the component is initialised\r\n   */\r\n  ngOnInit(): void {\r\n    this.bindSubscriptions();\r\n  }\r\n\r\n  /**\r\n   * Remove all subscriptions when the component is destroyed\r\n   */\r\n  ngOnDestroy(): void {\r\n    this.unbindSubscriptions();\r\n  }\r\n\r\n  public hasTransfers(): boolean {\r\n    const u = this.remoteDesktopService.getUploads();\r\n    return !!(u && u.length);\r\n  };\r\n\r\n  /**\r\n   * Bind the subscriptions\r\n   */\r\n  private bindSubscriptions(): void {\r\n    this.subscriptions.push(\r\n      this.remoteDesktopService.onStateChange.subscribe(this.handleState.bind(this))\r\n    );\r\n    this.subscriptions.push(\r\n      this.remoteDesktopService.onFullScreen.subscribe(this.handleFullScreen.bind(this))\r\n    );\r\n  }\r\n\r\n  /**\r\n   * Unbind the subscriptions\r\n   */\r\n  private unbindSubscriptions(): void {\r\n    this.subscriptions.forEach((subscription) => subscription.unsubscribe());\r\n  }\r\n\r\n  /**\r\n   * Set the component state to the new guacamole state\r\n   * @param newState\r\n   */\r\n  private setState(newState: string): void {\r\n    this.state.next(newState);\r\n  }\r\n\r\n  /**\r\n   * Receive the state from the desktop client and update this components state\r\n   * @param newState - state received from the guacamole client\r\n   */\r\n  private handleState(newState: string) {\r\n    switch (newState) {\r\n      case RemoteDesktopService.STATE.CONNECTED:\r\n        this.setState(this.states.CONNECTED);\r\n        break;\r\n      case RemoteDesktopService.STATE.DISCONNECTED:\r\n        this.exitFullScreen();\r\n        this.setState(this.states.DISCONNECTED);\r\n        break;\r\n      case RemoteDesktopService.STATE.CONNECTING:\r\n      case RemoteDesktopService.STATE.WAITING:\r\n        this.setState(this.states.CONNECTING);\r\n        break;\r\n      case RemoteDesktopService.STATE.CLIENT_ERROR:\r\n      case RemoteDesktopService.STATE.TUNNEL_ERROR:\r\n        this.exitFullScreen();\r\n        this.setState(this.states.ERROR);\r\n        break;\r\n    }\r\n  }\r\n\r\n  /**\r\n   * Exit full screen and show the toolbar\r\n   */\r\n  private exitFullScreen(): void {\r\n    if (!screenfull.isEnabled) {\r\n      return\r\n    }\r\n\r\n    if (!screenfull.isFullscreen) {\r\n      return;\r\n    }\r\n\r\n    screenfull.exit();\r\n  }\r\n\r\n  /**\r\n   * Enter full screen mode and auto hide the toolbar\r\n   */\r\n  private enterFullScreen(): void {\r\n    if (!screenfull.isEnabled) {\r\n      return;\r\n    }\r\n\r\n    if (screenfull.isFullscreen) {\r\n      return;\r\n    }\r\n\r\n    const containerElement = this.container.nativeElement;\r\n    if (screenfull.isEnabled) {\r\n      screenfull.on('change', (change: any) => {\r\n        if (!screenfull.isEnabled) {\r\n          return;\r\n        }\r\n        if (!screenfull.isFullscreen) {\r\n          this.remoteDesktopService.setFullScreen(false);\r\n        }\r\n        this.handleToolbar();\r\n      });\r\n    }\r\n  }\r\n\r\n  /**\r\n   * Go in and out of full screen\r\n   */\r\n  private handleFullScreen(newFullScreen: boolean): void {\r\n    if (newFullScreen) {\r\n      this.enterFullScreen();\r\n    } else {\r\n      this.exitFullScreen();\r\n    }\r\n  }\r\n\r\n  private handleToolbar(): void {\r\n    this.toolbarVisible = this.remoteDesktopService.isFullScreen() ? false : true;\r\n  }\r\n\r\n  /**\r\n   * Handle the display mouse movement\r\n   * @param event Mouse event\r\n   */\r\n  public handleDisplayMouseMove($event: any): void {\r\n    if (!this.remoteDesktopService.isFullScreen()) {\r\n      return;\r\n    }\r\n    const toolbarWidth = this.toolbar.nativeElement.clientWidth;\r\n    if ($event.x >= toolbarWidth) {\r\n      this.toolbarVisible = false;\r\n    }\r\n  }\r\n\r\n  @HostListener('document:mousemove', ['$event'])\r\n  private onDocumentMousemove($event: MouseEvent) {\r\n    if (!this.remoteDesktopService.isFullScreen()) {\r\n      return;\r\n    }\r\n    const toolbarWidth = this.toolbar.nativeElement.clientWidth;\r\n    const x = $event.x;\r\n    if (x >= -1 && x <= 0) {\r\n      this.toolbarVisible = true;\r\n    }\r\n    if (x >= toolbarWidth) {\r\n      this.toolbarVisible = false;\r\n    }\r\n  }\r\n\r\n  @HostListener('dragenter', ['$event'])\r\n  @HostListener('dragover', ['$event'])\r\n  /**\r\n   * Displays a visual indication that dropping the file currently\r\n   * being dragged is possible. Further propagation and default behavior\r\n   * of the given event is automatically prevented.\r\n   */\r\n  notifyDragStart(e) {\r\n\r\n    e.preventDefault();\r\n    e.stopPropagation();\r\n\r\n    this.dropPending = true;\r\n  };\r\n\r\n  @HostListener('dragleave', ['$event'])\r\n  /**\r\n   * Removes the visual indication that dropping the file currently\r\n   * being dragged is possible. Further propagation and default behavior\r\n   * of the given event is automatically prevented.\r\n   */\r\n  notifyDragEnd(e) {\r\n\r\n    e.preventDefault();\r\n    e.stopPropagation();\r\n\r\n    this.dropPending = false;\r\n  };\r\n\r\n  @HostListener('drop', ['$event'])\r\n  dropFile(e) {\r\n    this.notifyDragEnd(e)\r\n\r\n    // Upload each file\r\n    const files = e.dataTransfer.files;\r\n    for (let i = 0; i < files.length; i++) {\r\n      const ul = this.remoteDesktopService.uploadFile(files[i], this.fileManager.fs, this.fileManager.fs.currentDirectory);\r\n\r\n      // Refresh filesystem when it's complete\r\n      timer(0, 100).pipe(\r\n        takeWhile(() => !ul.isCompleted()),\r\n        finalize(() => {\r\n          console.log('Refreshing FS')\r\n          this.fsService.refresh(this.fileManager.fs, this.fileManager.fs.currentDirectory).then()\r\n        })\r\n      ).subscribe()\r\n    }\r\n  };\r\n}\r\n","import {Component} from '@angular/core';\r\n\r\n@Component({\r\n  selector: 'guacamole-gateway-client-status-bar',\r\n  template: `<ng-content\r\n    select=\"guacamole-gateway-client-status-bar-item\"\r\n  ></ng-content>`,\r\n  host: {\r\n    class: 'guacamole-gateway-client-status-bar',\r\n  },\r\n})\r\nexport class StatusBarComponent {}\r\n","import {Component} from '@angular/core';\r\n\r\n/**\r\n * Status bar item component\r\n */\r\n@Component({\r\n  selector: 'guacamole-gateway-client-status-bar-item',\r\n  template: `<ng-content></ng-content>`,\r\n  host: {\r\n    class: 'guacamole-gateway-client-status-bar-item',\r\n  },\r\n})\r\nexport class StatusBarItemComponent {}\r\n","import {Component} from '@angular/core';\r\n\r\n/**\r\n * Toolbar item inside the toolbar\r\n */\r\n@Component({\r\n  selector: 'guacamole-gateway-client-toolbar-item',\r\n  template: `<li class=\"guacamole-gateway-client-toolbar-item\">\r\n    <ng-content></ng-content>\r\n  </li>`,\r\n})\r\nexport class ToolbarItemComponent {}\r\n","import {CommonModule} from '@angular/common';\r\nimport {NgModule} from '@angular/core';\r\nimport {BrowserAnimationsModule} from '@angular/platform-browser/animations';\r\n\r\nimport {HttpClientModule} from '@angular/common/http';\r\n\r\nimport { GuacamoleRemoteDesktopComponent } from './remote-desktop/remote-desktop.component';\r\nimport {StatusBarComponent} from './status-bar/status-bar.component';\r\nimport {MessageComponent} from './message/message.component';\r\nimport {StatusBarItemComponent} from './status-bar-item/status-bar-item.component';\r\nimport {DisplayComponent} from './display/display.component';\r\nimport {ErrorMessageComponent} from './messages/error-message.component';\r\nimport {DisconnectedMessageComponent} from './messages/disconnected-message.component';\r\nimport {ConnectingMessageComponent} from './messages/connecting-message.component';\r\nimport {ToolbarItemComponent} from './toolbar-item/toolbar-item.component';\r\nimport {FileManagerComponent} from './file-manager/file-manager.component';\r\nimport {FileTransferManagerComponent} from './file-transfer-manager/file-transfer-manager.component';\r\nimport {FileTransferComponent} from './file-transfer/file-transfer.component';\r\n\r\n@NgModule({\r\n  declarations: [\r\n    GuacamoleRemoteDesktopComponent,\r\n    ToolbarItemComponent,\r\n    MessageComponent,\r\n    DisplayComponent,\r\n    ErrorMessageComponent,\r\n    DisconnectedMessageComponent,\r\n    ConnectingMessageComponent,\r\n    StatusBarComponent,\r\n    StatusBarItemComponent,\r\n    FileManagerComponent,\r\n    FileTransferManagerComponent,\r\n    FileTransferComponent,\r\n  ],\r\n  imports: [CommonModule, BrowserAnimationsModule, HttpClientModule],\r\n  exports: [\r\n    GuacamoleRemoteDesktopComponent,\r\n    ToolbarItemComponent,\r\n    ErrorMessageComponent,\r\n    DisconnectedMessageComponent,\r\n    ConnectingMessageComponent,\r\n    StatusBarComponent,\r\n    StatusBarItemComponent,\r\n    FileManagerComponent,\r\n  ],\r\n})\r\nexport class GuacamoleRemoteDesktopModule {}\r\n","/*\r\n * Public API Surface of remote-desktop\r\n */\r\n\r\nexport * from './lib/remote-desktop.module';\r\nexport * from './lib/remote-desktop.service';\r\nexport * from './lib/tunnel-rest-api.service';\r\nexport * from './lib/toolbar-item/toolbar-item.component';\r\nexport * from './lib/file-manager/file-manager.component';\r\nexport * from './lib/remote-desktop/remote-desktop.component';\r\nexport * from './lib/status-bar-item/status-bar-item.component';\r\nexport * from './lib/status-bar/status-bar.component';\r\nexport * from './lib/messages/connecting-message.component';\r\nexport * from './lib/messages/error-message.component';\r\nexport * from './lib/messages/disconnected-message.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["Object","i1.TunnelRestApiService","i1.ManagedFilesystemService","i2.TunnelRestApiService","i1.RemoteDesktopService","i2.ManagedFilesystemService","i1","i2","i3.FileTransferComponent","i4.MessageComponent","i5.DisplayComponent","i6.FileTransferManagerComponent"],"mappings":";;;;;;;;;;;;;;;AAEA;;;;;;;;AAQG;MACU,iBAAiB,CAAA;AAiC5B,IAAA,WAAA,CAAY,QAAoC,EAAA;AAC9C,QAAA,QAAQ,GAAG,QAAQ,IAAI,EAAE,CAAC;AAC1B,QAAA,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AAC9B,QAAA,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AAC9B,QAAA,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AAC9B,QAAA,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC1B,QAAA,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC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