@iotize/device-com-ble.cordova 3.7.2 → 4.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/CHANGELOG.md +143 -0
  2. package/package.json +7 -21
  3. package/plugin.cjs +35 -0
  4. package/plugin.js +35 -0
  5. package/plugin.xml +8 -3
  6. package/src/android/build.gradle +2 -11
  7. package/src/android/libs/iotize-device-com-ble-1.0.0-alpha.9.aar +0 -0
  8. package/{lib → src/lib}/ble-com-protocol.d.ts +20 -20
  9. package/{lib → src/lib}/cordova-ble-error.d.ts +29 -29
  10. package/{lib → src/lib}/cordova-interface.d.ts +5 -5
  11. package/{lib → src/lib}/cordova-service-adapter.d.ts +58 -58
  12. package/{lib → src/lib}/definitions.d.ts +43 -43
  13. package/{lib → src/lib}/iotize-ble-cordova-plugin.d.ts +27 -27
  14. package/src/lib/logger.d.ts +2 -0
  15. package/{lib → src/lib}/scanner.d.ts +55 -55
  16. package/{lib → src/lib}/utility.d.ts +6 -6
  17. package/src/plugin.d.ts +8 -0
  18. package/src/windows/iotize-ble-com.js +11 -11
  19. package/LICENSE +0 -23
  20. package/README.md +0 -174
  21. package/bundles/iotize-device-com-ble.cordova.umd.js +0 -1418
  22. package/bundles/iotize-device-com-ble.cordova.umd.js.map +0 -1
  23. package/bundles/iotize-device-com-ble.cordova.umd.min.js +0 -2
  24. package/bundles/iotize-device-com-ble.cordova.umd.min.js.map +0 -1
  25. package/esm2015/iotize-device-com-ble.cordova.js +0 -6
  26. package/esm2015/iotize-device-com-ble.cordova.js.map +0 -1
  27. package/esm2015/iotize-device-com-ble.cordova.metadata.json +0 -1
  28. package/esm2015/iotize-device-com-ble.cordova.ngsummary.json +0 -1
  29. package/esm2015/lib/ble-com-protocol.js +0 -76
  30. package/esm2015/lib/ble-com-protocol.js.map +0 -1
  31. package/esm2015/lib/ble-com-protocol.metadata.json +0 -1
  32. package/esm2015/lib/ble-com-protocol.ngsummary.json +0 -1
  33. package/esm2015/lib/cordova-ble-error.js +0 -36
  34. package/esm2015/lib/cordova-ble-error.js.map +0 -1
  35. package/esm2015/lib/cordova-ble-error.metadata.json +0 -1
  36. package/esm2015/lib/cordova-ble-error.ngsummary.json +0 -1
  37. package/esm2015/lib/cordova-interface.js +0 -2
  38. package/esm2015/lib/cordova-interface.js.map +0 -1
  39. package/esm2015/lib/cordova-interface.metadata.json +0 -1
  40. package/esm2015/lib/cordova-interface.ngsummary.json +0 -1
  41. package/esm2015/lib/cordova-service-adapter.js +0 -214
  42. package/esm2015/lib/cordova-service-adapter.js.map +0 -1
  43. package/esm2015/lib/cordova-service-adapter.metadata.json +0 -1
  44. package/esm2015/lib/cordova-service-adapter.ngsummary.json +0 -1
  45. package/esm2015/lib/definitions.js +0 -2
  46. package/esm2015/lib/definitions.js.map +0 -1
  47. package/esm2015/lib/definitions.metadata.json +0 -1
  48. package/esm2015/lib/definitions.ngsummary.json +0 -1
  49. package/esm2015/lib/iotize-ble-cordova-plugin.js +0 -170
  50. package/esm2015/lib/iotize-ble-cordova-plugin.js.map +0 -1
  51. package/esm2015/lib/iotize-ble-cordova-plugin.metadata.json +0 -1
  52. package/esm2015/lib/iotize-ble-cordova-plugin.ngsummary.json +0 -1
  53. package/esm2015/lib/logger.js +0 -3
  54. package/esm2015/lib/logger.js.map +0 -1
  55. package/esm2015/lib/logger.metadata.json +0 -1
  56. package/esm2015/lib/logger.ngsummary.json +0 -1
  57. package/esm2015/lib/scanner.js +0 -151
  58. package/esm2015/lib/scanner.js.map +0 -1
  59. package/esm2015/lib/scanner.metadata.json +0 -1
  60. package/esm2015/lib/scanner.ngsummary.json +0 -1
  61. package/esm2015/lib/utility.js +0 -26
  62. package/esm2015/lib/utility.js.map +0 -1
  63. package/esm2015/lib/utility.metadata.json +0 -1
  64. package/esm2015/lib/utility.ngsummary.json +0 -1
  65. package/esm2015/public_api.js +0 -5
  66. package/esm2015/public_api.js.map +0 -1
  67. package/esm2015/public_api.metadata.json +0 -1
  68. package/esm2015/public_api.ngsummary.json +0 -1
  69. package/fesm2015/iotize-device-com-ble.cordova.js +0 -660
  70. package/fesm2015/iotize-device-com-ble.cordova.js.map +0 -1
  71. package/iotize-device-com-ble.cordova.d.ts +0 -6
  72. package/iotize-device-com-ble.cordova.metadata.json +0 -1
  73. package/lib/logger.d.ts +0 -1
  74. package/public_api.d.ts +0 -5
  75. package/src/android/.gradle/4.8.1/fileChanges/last-build.bin +0 -0
  76. package/src/android/.gradle/4.8.1/fileHashes/fileHashes.bin +0 -0
  77. package/src/android/.gradle/4.8.1/fileHashes/fileHashes.lock +0 -0
  78. package/src/android/.gradle/6.8.2/fileChanges/last-build.bin +0 -0
  79. package/src/android/.gradle/6.8.2/fileHashes/fileHashes.lock +0 -0
  80. package/src/android/.gradle/6.8.2/gc.properties +0 -0
  81. package/src/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  82. package/src/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  83. package/src/android/.gradle/checksums/checksums.lock +0 -0
  84. package/src/android/.gradle/configuration-cache/gc.properties +0 -0
  85. package/src/android/.gradle/vcs-1/gc.properties +0 -0
  86. package/src/android/.gradle/vcsWorkingDirs/gc.properties +0 -0
  87. package/src/android/.idea/android.iml +0 -9
  88. package/src/android/.idea/gradle.xml +0 -16
  89. package/src/android/.idea/modules.xml +0 -8
  90. package/src/android/.idea/vcs.xml +0 -6
  91. package/www/plugin.js +0 -2
  92. package/www/plugin.js.LICENSE.txt +0 -14
@@ -1 +0,0 @@
1
- {"version":3,"file":"iotize-device-com-ble.cordova.js","sources":["../../../../src/lib/cordova-ble-error.ts","../../../../src/lib/logger.ts","../../../../src/lib/utility.ts","../../../../src/lib/ble-com-protocol.ts","../../../../src/lib/cordova-service-adapter.ts","../../../../src/lib/scanner.ts","../../../../src/lib/iotize-ble-cordova-plugin.ts","../../../../src/iotize-device-com-ble.cordova.ts"],"sourcesContent":["import { CodeError } from '@iotize/common/error';\n\nexport class CordovaBLEError extends CodeError {\n static invalidErrorResult(errObject: {\n code?: string | undefined;\n message?: string | undefined;\n }): CordovaBLEError {\n return new CordovaBLEError(\n `Internal error: ble cordova plugin returned an unexpected error object`,\n CordovaBLEError.Code.InternalError\n );\n }\n\n static invalidErrorCode(errObject: {\n code?: string | undefined;\n message?: string | undefined;\n }): CordovaBLEError {\n return new CordovaBLEError(\n `Internal error: ble cordova plugin returned an invalid error code ${errObject.code} with message ${errObject.message}`,\n CordovaBLEError.Code.InternalError\n );\n }\n\n static invalidNativeCallResult(result: any, cause: Error): CordovaBLEError {\n return new CordovaBLEError(\n `Internal error: native call returned an invalid data type. ${cause.message}`,\n CordovaBLEError.Code.InternalError\n );\n }\n\n static isValidErrorCode(\n code: string\n ): code is keyof typeof CordovaBLEError.Code {\n return code in CordovaBLEError.Code;\n }\n\n static iotizeBLEMissing() {\n return new CordovaBLEError(\n `iotizeBLE global variable does not exist. Are you sure app is running inside a Cordova application ?`,\n CordovaBLEError.Code.InternalError\n );\n }\n}\n\n/* istanbul ignore next */\nexport namespace CordovaBLEError {\n export enum Code {\n InternalError = 'CordovaBLEErrorInternalError',\n IllegalArgument = 'CordovaBLEErrorIllegalArgument',\n BLENotAvailable = 'CordovaBLEErrorBLENotAvailable',\n InvalidMacAddress = 'InvalidMacAddressInvalidMacAddress',\n ConnectionError = 'CordovaBLEErrorConnectionError',\n RequestError = 'CordovaBLEErrorRequestError',\n LocationServiceDisabled = 'CordovaBLEErrorLocationServiceDisabled',\n DisconnectError = 'CordovaBLEErrorDisconnectError',\n IllegalAction = 'CordovaBLEErrorIllegalAction',\n NotConnectedError = 'CordovaBLEErrorNotConnectedError',\n StatusCodeError = 'CordovaBLEErrorStatusCodeError',\n }\n}\n","import { createDebugger } from \"@iotize/common/debug\";\n\nexport const debug = createDebugger(`@iotize/device-com-ble.cordova`);\n","import { CordovaBLEError } from \"./cordova-ble-error\";\nimport { IoTizeBleCordovaPlugin } from \"./iotize-ble-cordova-plugin\";\n\ndeclare var iotizeBLE: IoTizeBleCordovaPlugin;\n\nexport function getIoTizeBleCordovaPlugin(): IoTizeBleCordovaPlugin {\n if (typeof iotizeBLE !== \"object\") {\n throw CordovaBLEError.iotizeBLEMissing();\n }\n return iotizeBLE;\n}\n\nexport function getScanRecordsFromBytes(bytes: Uint8Array): {type: number; data: Uint8Array}[] {\n //LTV encoding\n const records: {type: number; data: Uint8Array}[] = [];\n for (let i = 0; i < bytes.length; i++) {\n //first byte is length\n let size = bytes[i];\n if (size == 0) {\n break;\n }\n let type = bytes[i+1];\n records.push({\n type,\n data: bytes.slice(i+2, i + size + 1)\n })\n i += size;\n }\n return records;\n}","//\n// Copyright 2018 IoTize SAS Inc. Licensed under the MIT license.\n//\n// ble-com-protocol.ts\n// device-com-ble.cordova BLE Cordova Plugin\n//\nimport {\n ComProtocolConnectOptions,\n ComProtocolDisconnectOptions,\n ComProtocolOptions,\n ComProtocolSendOptions,\n ConnectionState,\n} from '@iotize/tap/protocol/api';\nimport { QueueComProtocol } from '@iotize/tap/protocol/core';\nimport { defer, Observable, of, throwError } from 'rxjs';\nimport { catchError, filter, first, tap } from 'rxjs/operators';\nimport { CordovaBLEError } from './cordova-ble-error';\nimport { IoTizeBleCordovaPlugin } from './iotize-ble-cordova-plugin';\nimport { debug } from './logger';\nimport { getIoTizeBleCordovaPlugin } from './utility';\n\nexport class BLEComProtocol extends QueueComProtocol {\n /**\n * Lazy reference to iotizeBLE.\n * We don't want to reference iotizeBLE in constructor as it may be referenced\n * before cordova plugin is loaded\n */\n private get pluginInterface(): IoTizeBleCordovaPlugin {\n return this.cordovaInterfaceOverwrite || getIoTizeBleCordovaPlugin();\n }\n\n constructor(\n private deviceId: string,\n comProtocolOptions?: ComProtocolOptions,\n public readonly cordovaInterfaceOverwrite?: IoTizeBleCordovaPlugin\n ) {\n super();\n if (comProtocolOptions) {\n this.options = comProtocolOptions;\n } else {\n this.options.connect.timeout = 60000;\n }\n }\n\n _connect(options?: ComProtocolConnectOptions): Observable<any> {\n debug('_connect', options);\n return this.pluginInterface\n .connectAndDiscoverTapServices(this.deviceId)\n .pipe(\n tap((state) => {\n this.setConnectionState(state);\n }),\n filter((state) => state === ConnectionState.CONNECTED),\n first()\n );\n }\n\n _disconnect(options?: ComProtocolDisconnectOptions): Observable<any> {\n debug('_disconnect', options);\n return defer(() => this.pluginInterface.disConnect(this.deviceId));\n }\n\n async write(data: Uint8Array): Promise<any> {\n throw new Error('Method not implemented.');\n }\n\n async read(): Promise<Uint8Array> {\n throw new Error('Method not implemented.');\n }\n\n send(\n data: Uint8Array,\n options?: ComProtocolSendOptions\n ): Observable<Uint8Array> {\n return defer(() => this.pluginInterface.send(this.deviceId, data)).pipe(\n catchError((err) => {\n if (\n (err as CordovaBLEError)?.code ===\n CordovaBLEError.Code.NotConnectedError\n ) {\n this.setConnectionState(ConnectionState.DISCONNECTED);\n }\n return throwError(err);\n })\n );\n }\n}\n","import { ConnectionState } from \"@iotize/tap/protocol/api\";\nimport {\n CharacteristicAdapterInterface,\n PeripheralAdapterInterface,\n ServiceAdapterInterface,\n DescriptorAdapterInterface,\n BleComError,\n CharacteristicProperties,\n} from \"@iotize/tap/protocol/ble/common\";\nimport { BehaviorSubject, Observable, Subscription } from \"rxjs\";\nimport {\n distinctUntilChanged,\n filter,\n first,\n map,\n shareReplay,\n} from \"rxjs/operators\";\nimport {\n CharacteristicDescription,\n DescriptorDescription,\n ServiceDescription,\n ServiceList,\n} from \"./definitions\";\nimport { IoTizeBleCordovaPlugin } from \"./iotize-ble-cordova-plugin\";\nimport { getIoTizeBleCordovaPlugin } from \"./utility\";\n\nexport class CordovaPeripheralAdapter\n implements PeripheralAdapterInterface<CordovaServiceAdapter>\n{\n private _stateChange = new BehaviorSubject<ConnectionState>(\n ConnectionState.DISCONNECTED\n );\n private connectionStateSubscription?: Subscription;\n private serviceListCache?: ServiceList;\n\n get stateChange() {\n return this._stateChange.asObservable().pipe(distinctUntilChanged());\n }\n\n get name() {\n // TODO device name ?\n return this.id;\n }\n\n get id() {\n return this.deviceId;\n }\n\n constructor(\n public readonly deviceId: string,\n public readonly cordovaPlugin: IoTizeBleCordovaPlugin = getIoTizeBleCordovaPlugin()\n ) {}\n\n get state(): string {\n return ConnectionState[this._stateChange.value];\n }\n\n async discoverServices<Key extends string = string>(\n serviceUUIDs?: Key[]\n ): Promise<Partial<Record<Key, CordovaServiceAdapter>>> {\n this.serviceListCache = await this.cordovaPlugin.discoverServices(\n this.deviceId\n );\n const result: Partial<Record<Key, CordovaServiceAdapter>> = {};\n if (serviceUUIDs) {\n for (const uuid of serviceUUIDs) {\n const servicDefinition = this.serviceListCache.find(\n (def) => def.uuid === uuid\n );\n if (servicDefinition) {\n result[uuid] = new CordovaServiceAdapter(servicDefinition, this);\n }\n }\n } else {\n for (const serviceDefinition of this.serviceListCache) {\n result[serviceDefinition.uuid as Key] = new CordovaServiceAdapter(\n serviceDefinition,\n this\n );\n }\n }\n return result;\n }\n\n async connect(): Promise<void> {\n this.connectionStateSubscription?.unsubscribe();\n const connectObservable = this.cordovaPlugin\n .connect(this.deviceId)\n .pipe(shareReplay());\n this.connectionStateSubscription = connectObservable.subscribe((state) => {\n this._stateChange.next(state);\n });\n await connectObservable\n .pipe(\n filter((state) => state === ConnectionState.CONNECTED),\n first()\n )\n .toPromise();\n }\n\n async disconnect(): Promise<void> {\n await this.cordovaPlugin.disConnect(this.deviceId);\n this._stateChange.next(ConnectionState.DISCONNECTED);\n this.connectionStateSubscription?.unsubscribe();\n }\n\n async close(): Promise<void> {\n await this.cordovaPlugin.close(this.deviceId);\n this._stateChange.next(ConnectionState.DISCONNECTED);\n this.connectionStateSubscription?.unsubscribe();\n }\n\n async getService(uuid: string): Promise<CordovaServiceAdapter> {\n if (!this.serviceListCache) {\n await this.discoverServices([uuid]);\n }\n const serviceDefinition = this.serviceListCache!.find(\n (s) => s.uuid === uuid\n );\n if (!serviceDefinition) {\n throw BleComError.serviceNotFound(uuid);\n }\n return new CordovaServiceAdapter(serviceDefinition, this);\n }\n}\n\nexport class CordovaServiceAdapter implements ServiceAdapterInterface {\n get uuid() {\n return this.config.uuid;\n }\n\n constructor(\n private readonly config: ServiceDescription,\n public readonly peripheral: CordovaPeripheralAdapter\n ) {}\n\n async getCharacteristic(\n charcUUID: string\n ): Promise<CordovaCharacteristicAdapter> {\n const characteristicDescription = this.config.characteristics?.find(\n (c) => c.uuid === charcUUID\n );\n if (!characteristicDescription) {\n throw BleComError.charcacteristicNotFound(charcUUID);\n }\n return new CordovaCharacteristicAdapter(this, characteristicDescription);\n }\n\n async getCharacteristics(): Promise<CordovaCharacteristicAdapter[]> {\n if (!this.config.characteristics) {\n return [];\n }\n return this.config.characteristics.map(\n (c) => new CordovaCharacteristicAdapter(this, c)\n );\n }\n}\n\nexport class CordovaCharacteristicAdapter\n implements CharacteristicAdapterInterface\n{\n private _dataStream?: Observable<Uint8Array>;\n\n get uuid() {\n return this.config.uuid;\n }\n\n constructor(\n public readonly service: CordovaServiceAdapter,\n public readonly config: CharacteristicDescription\n ) {}\n\n get properties(): CharacteristicProperties {\n return this.config.properties;\n }\n\n get data(): Observable<{ data: Uint8Array; isNotification: boolean }> {\n return this.setupDataStreamIfRequired().pipe(\n map((data) => ({\n data,\n isNotification: true,\n }))\n );\n }\n\n protected get deviceId() {\n return this.service.peripheral.deviceId;\n }\n\n protected get pluginInterface() {\n return this.service.peripheral.cordovaPlugin;\n }\n\n async read(): Promise<Uint8Array> {\n return this.pluginInterface.characteristicReadValue(\n this.deviceId,\n this.service.uuid,\n this.uuid\n );\n }\n\n async getDescriptor(): Promise<CordovaDescriptorAdapter> {\n throw new Error(`Not implemented yet`);\n }\n\n async getDescriptors(): Promise<DescriptorAdapterInterface[]> {\n if (!this.config.descriptors) {\n return [];\n }\n return this.config.descriptors.map(\n (descriptor) => new CordovaDescriptorAdapter(descriptor, this)\n );\n }\n\n async write(\n data: Uint8Array,\n writeWithoutResponse: boolean\n ): Promise<Uint8Array> {\n if (writeWithoutResponse) {\n await this.pluginInterface.characteristicWriteWithoutResponse(\n this.deviceId,\n this.service.uuid,\n this.uuid,\n data\n );\n } else {\n await this.pluginInterface.characteristicWrite(\n this.deviceId,\n this.service.uuid,\n this.uuid,\n data\n );\n }\n return data;\n }\n\n async enableNotifications(enabled?: boolean): Promise<void> {\n if (enabled) {\n this.setupDataStreamIfRequired();\n await this.pluginInterface.characteristicStartNotification(\n this.deviceId,\n this.service.uuid,\n this.uuid\n );\n } else {\n await this.pluginInterface.characteristicStopNotification(\n this.deviceId,\n this.service.uuid,\n this.uuid\n );\n }\n }\n\n setupDataStreamIfRequired() {\n if (!this._dataStream) {\n this._dataStream = this.pluginInterface.characteristicChanged(\n this.deviceId,\n this.service.uuid,\n this.uuid\n );\n }\n return this._dataStream;\n }\n}\n\nexport class CordovaDescriptorAdapter implements DescriptorAdapterInterface {\n get uuid() {\n return this.config.uuid;\n }\n\n constructor(\n public readonly config: DescriptorDescription,\n public readonly characteristic: CordovaCharacteristicAdapter\n ) {}\n\n async readValue(): Promise<Uint8Array> {\n throw new Error(`Reading descriptor value is not implemented yet`);\n }\n\n async writeValue(data: Uint8Array): Promise<void> {\n throw new Error(`Writing descriptor value is not implemented yet`);\n }\n}\n","//\n// Copyright 2018 IoTize SAS Inc. Licensed under the MIT license.\n//\n// scanner.ts\n// device-com-ble.cordova BLE Cordova Plugin\n//\n\nimport { BleComError } from \"@iotize/tap/protocol/ble/common\";\nimport { DeviceScanner, DeviceScannerOptions } from \"@iotize/tap/scanner/api\";\nimport { BehaviorSubject, Observable, Subscription } from \"rxjs\";\nimport { CordovaBLEScanResult, RequestDeviceOptions } from \"./definitions\";\nimport { IoTizeBleCordovaPlugin } from \"./iotize-ble-cordova-plugin\";\nimport { debug } from \"./logger\";\nimport { getIoTizeBleCordovaPlugin } from \"./utility\";\n\n/**\n * BLE Tap scanner for cordova apps\n */\nexport class BLEScanner implements DeviceScanner<CordovaBLEScanResult> {\n private _results = new BehaviorSubject<CordovaBLEScanResult[]>([]);\n private _scanning$ = new BehaviorSubject<boolean>(false);\n private scanSubscription?: Subscription;\n\n /**\n * Lazy reference to iotizeBLE.\n * We don't want to reference iotizeBLE in constructor as it may be referenced\n * before cordova plugin is loaded\n */\n private get cordovaInterface(): IoTizeBleCordovaPlugin {\n return this.cordovaInterfaceOverwrite || getIoTizeBleCordovaPlugin();\n }\n\n /**\n *\n * @param cordovaInterfaceOverwrite overwrite cordova interface. Used for testing\n */\n constructor(\n private cordovaInterfaceOverwrite?: IoTizeBleCordovaPlugin,\n /**\n * Request device options used to filter scan results\n */\n readonly requestDeviceOptions?: RequestDeviceOptions\n ) {}\n\n get scanning(): Observable<boolean> {\n return this._scanning$.asObservable();\n }\n\n get isScanning(): boolean {\n return this._scanning$.value;\n }\n\n /**\n * Gets the observable on the devices$ Subject\n * @return\n */\n get results(): Observable<CordovaBLEScanResult[]> {\n return this._results.asObservable();\n }\n\n /**\n * Launches the scan for BLE devices\n * Throws if BLE is not available\n */\n async start(options?: DeviceScannerOptions): Promise<void> {\n this.scanSubscription?.unsubscribe();\n this.scanSubscription = undefined;\n this.clearResults();\n const isAvailable = await this.checkAvailable();\n if (!isAvailable) {\n throw BleComError.bleNotAvailable(\n `BLE is not available. Make sure that BLE is enabled on your device`\n );\n }\n debug(\"Start Scanning ...\");\n this._scanning$.next(true);\n return new Promise<void>((resolve, reject) => {\n this.scanSubscription = this.cordovaInterface\n .startScan(this.requestDeviceOptions)\n .subscribe(\n (result) => {\n if (result == \"Ok\") {\n resolve();\n return;\n }\n this.addOrRefreshDevice(result);\n },\n (error) => {\n debug(\"Start scan failed with error: \", error);\n this.cordovaInterface\n .getLastError()\n .then((lasterror) => {\n debug(\"Last BLE error \" + lasterror);\n })\n .catch((err) => {\n debug(\"Cannot get last BLE error: \", err);\n });\n reject(error);\n this._scanning$.next(false);\n }\n );\n });\n }\n\n /**\n *\n */\n async stop(): Promise<void> {\n debug(\"Stop Scanning ...\");\n try {\n this.scanSubscription?.unsubscribe();\n this.scanSubscription = undefined;\n await this.cordovaInterface.stopScan();\n this._scanning$.next(false);\n return;\n } catch (err) {\n this._scanning$.next(false);\n throw err;\n }\n }\n\n /**\n * Returns true if this scanner is available\n */\n checkAvailable(): Promise<boolean> {\n return this.cordovaInterface.checkAvailable();\n }\n\n private get devices() {\n return this._results.value;\n }\n\n private clearResults() {\n this._results.next([]);\n }\n\n private addOrRefreshDevice(newDevice: CordovaBLEScanResult) {\n let storedDeviceIndex = this.devices.findIndex(\n (entry) => entry.address == newDevice.address\n );\n if (storedDeviceIndex >= 0) {\n let storedDevice = this.devices[storedDeviceIndex];\n if (\n storedDevice.name != newDevice.name ||\n storedDevice.rssi != newDevice.rssi\n ) {\n debug(\n `Updating device at index ${storedDeviceIndex}, name=${storedDevice.name} with rssi=${storedDevice.rssi}`\n );\n this.devices[storedDeviceIndex] = newDevice;\n // this.devices = [...this.devices];\n this._results.next(this.devices);\n }\n } else {\n debug(\n `Adding new device name=${newDevice.name} with rssi=${newDevice.rssi}`\n );\n this.devices.push(newDevice);\n this._results.next(this.devices);\n }\n }\n}\n","import {\n bufferToHexString,\n hexStringToBuffer as hexStringToBufferCore,\n} from \"@iotize/common/byte-converter\";\nimport { safeEnumValue } from \"@iotize/common/utility\";\nimport { ConnectionState } from \"@iotize/tap/protocol/api\";\nimport { Observable, Subject, defer } from \"rxjs\";\nimport { switchMap } from \"rxjs/operators\";\nimport { map } from \"rxjs/operators\";\nimport { CordovaInterface } from \"./cordova-interface\";\nimport {\n CordovaBLEScanResult,\n RequestDeviceOptions,\n ServiceList,\n} from \"./definitions\";\nimport { CordovaBLEError } from \"./cordova-ble-error\";\n\nfunction hexStringToBuffer(str: string): Uint8Array {\n try {\n return hexStringToBufferCore(str);\n } catch (err) {\n throw CordovaBLEError.invalidNativeCallResult(str, err as Error);\n }\n}\n\ndeclare var cordova: CordovaInterface;\n\nexport class IoTizeBleCordovaPlugin {\n checkAvailable(): Promise<boolean> {\n return this.execSingleResult<boolean>(\"checkAvailable\", []);\n }\n\n requestEnableBle(): Promise<\"OK\"> {\n return this.execSingleResult<\"OK\">(\"enable\", []);\n }\n\n startScan(\n requestDeviceOptions: RequestDeviceOptions | undefined\n ): Observable<CordovaBLEScanResult | \"Ok\"> {\n return this.execMultipleResult<CordovaBLEScanResult | \"Ok\">(\"startScan\", [\n JSON.stringify(requestDeviceOptions),\n ]);\n }\n\n stopScan() {\n return this.execSingleResult<\"OK\">(\"stopScan\", []);\n }\n\n connect(\n deviceId: string,\n enableBleIfNot: boolean = true\n ): Observable<ConnectionState> {\n return this.askBleEnable(enableBleIfNot).pipe(\n switchMap(() => {\n return this.execMultipleResult<string>(\"connect\", [deviceId]).pipe(\n map((state) => {\n if (!(state in ConnectionState)) {\n console.warn(\n `Plugin native code returned an invalid connection state: \"${state}\".`\n );\n }\n return safeEnumValue(ConnectionState, state);\n })\n );\n })\n );\n }\n\n askBleEnable(askEnable: boolean): Observable<void> {\n return defer(async () => {\n if (askEnable) {\n if (!(await this.checkAvailable())) {\n await this.requestEnableBle();\n }\n }\n });\n }\n\n requestMTU(deviceId: string, mtu: number) {\n return this.execSingleResult<\"OK\">(\"requestMTU\", [deviceId, mtu]);\n }\n\n connectAndDiscoverTapServices(\n deviceId: string,\n enableBleIfNot: boolean = true\n ): Observable<ConnectionState> {\n return this.askBleEnable(enableBleIfNot).pipe(\n switchMap(() => {\n return this.execMultipleResult<string>(\n \"connectAndDiscoverTapServices\",\n [deviceId]\n ).pipe(\n map((state) => {\n if (!(state in ConnectionState)) {\n console.warn(\n `Plugin native code returned an invalid connection state: \"${state}\".`\n );\n }\n return safeEnumValue(ConnectionState, state);\n })\n );\n })\n );\n }\n\n disConnect(deviceId: string) {\n return this.execSingleResult<\"OK\">(\"disConnect\", [deviceId]);\n }\n\n close(deviceId: string) {\n return this.execSingleResult<\"OK\">(\"close\", [deviceId]);\n }\n\n isConnected(deviceId: string) {\n return this.execSingleResult<boolean>(\"isConnected\", [deviceId]);\n }\n\n async send(deviceId: string, data: Uint8Array) {\n const hexString = await this.execSingleResult<string>(\"sendRequest\", [\n deviceId,\n bufferToHexString(data),\n ]);\n return hexStringToBuffer(hexString);\n }\n\n getLastError() {\n return this.execSingleResult<string>(\"getLastError\", []);\n }\n\n characteristicStartNotification(\n deviceId: string,\n serviceId: string,\n characId: string\n ) {\n return this.execSingleResult<\"OK\">(\"characteristicStartNotification\", [\n deviceId,\n serviceId,\n characId,\n ]);\n }\n\n characteristicChanged(\n deviceId: string,\n serviceId: string,\n characId: string\n ): Observable<Uint8Array> {\n return this.execMultipleResult<string>(\"characteristicChanged\", [\n deviceId,\n serviceId,\n characId,\n ]).pipe(\n map((hexString) => {\n return hexStringToBuffer(hexString);\n })\n );\n }\n\n characteristicStopNotification(\n deviceId: string,\n serviceId: string,\n characId: string\n ) {\n return this.execSingleResult<\"OK\">(\"characteristicStopNotification\", [\n deviceId,\n serviceId,\n characId,\n ]);\n }\n\n async characteristicReadValue(\n deviceId: string,\n serviceId: string,\n characId: string\n ): Promise<Uint8Array> {\n const hexString = await this.execSingleResult<string>(\n \"characteristicRead\",\n [deviceId, serviceId, characId]\n );\n return hexStringToBuffer(hexString);\n }\n\n characteristicWrite(\n deviceId: string,\n serviceId: string,\n characId: string,\n data: Uint8Array\n ) {\n return this.execSingleResult<\"OK\">(\"characteristicWrite\", [\n deviceId,\n serviceId,\n characId,\n bufferToHexString(data),\n ]);\n }\n\n characteristicWriteWithoutResponse(\n deviceId: string,\n serviceId: string,\n characId: string,\n data: Uint8Array\n ) {\n return this.execSingleResult<\"OK\">(\"characteristicWriteWithoutResponse\", [\n deviceId,\n serviceId,\n characId,\n bufferToHexString(data),\n ]);\n }\n\n async discoverServices(deviceId: string): Promise<ServiceList> {\n const services = await this.execSingleResult<ServiceList>(\n \"discoverServices\",\n [deviceId]\n );\n return services;\n }\n\n private execSingleResult<T extends string | void | boolean | Object>(\n methodName: string,\n args: any[]\n ): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n cordova.exec(\n resolve,\n (errObject: { code?: string; message?: string }) => {\n reject(objectErrorToError(errObject));\n },\n \"BLECom\",\n methodName,\n args\n );\n });\n }\n\n private execMultipleResult<T>(\n methodName: string,\n args: any[]\n ): Observable<T> {\n const subject = new Subject<T>();\n cordova.exec<T>(\n (data) => {\n subject.next(data);\n },\n (err) => {\n subject.error(objectErrorToError(err));\n },\n \"BLECom\",\n methodName,\n args\n );\n return subject.asObservable();\n }\n}\n\nfunction objectErrorToError(errObject: { code?: string; message?: string }) {\n if (typeof errObject !== \"object\" || !errObject.code || !errObject.message) {\n return CordovaBLEError.invalidErrorResult(errObject);\n }\n if (!CordovaBLEError.isValidErrorCode(errObject.code)) {\n return CordovaBLEError.invalidErrorCode(errObject);\n }\n return new CordovaBLEError(\n errObject.message,\n CordovaBLEError.Code[errObject.code]\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n\nexport {CharacteristicDescription as ɵb,ServiceDescription as ɵa} from './lib/definitions';\nexport {IoTizeBleCordovaPlugin as ɵc} from './lib/iotize-ble-cordova-plugin';"],"names":["hexStringToBufferCore"],"mappings":";;;;;;;;;;AAEM,MAAO,eAAgB,SAAQ,SAAS,CAAA;IAC5C,OAAO,kBAAkB,CAAC,SAGzB,EAAA;QACC,OAAO,IAAI,eAAe,CACxB,CAAwE,sEAAA,CAAA,EACxE,eAAe,CAAC,IAAI,CAAC,aAAa,CACnC,CAAC;KACH;IAED,OAAO,gBAAgB,CAAC,SAGvB,EAAA;AACC,QAAA,OAAO,IAAI,eAAe,CACxB,qEAAqE,SAAS,CAAC,IAAI,CAAiB,cAAA,EAAA,SAAS,CAAC,OAAO,CAAA,CAAE,EACvH,eAAe,CAAC,IAAI,CAAC,aAAa,CACnC,CAAC;KACH;AAED,IAAA,OAAO,uBAAuB,CAAC,MAAW,EAAE,KAAY,EAAA;AACtD,QAAA,OAAO,IAAI,eAAe,CACxB,CAAA,2DAAA,EAA8D,KAAK,CAAC,OAAO,CAAE,CAAA,EAC7E,eAAe,CAAC,IAAI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AAI,CACL,CAAC;AACF,QAAA,OAAO,OAAO,CAAC,YAAY,EAAE,CAAC;KAC/B;AACF,CAAA;AAED,SAAS,kBAAkB,CAAC,SAA8C,EAAA;AACxE,IAAA,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE;AAC1E,QAAA,OAAO,eAAe,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;AACtD,KAAA;IACD,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;AACrD,QAAA,OAAO,eAAe,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;AACpD,KAAA;AACD,IAAA,OAAO,IAAI,eAAe,CACxB,SAAS,CAAC,OAAO,EACjB,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CACrC,CAAC;AACJ;;ACzQA;;AAEG;;;;"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './public_api';
5
- export { CharacteristicDescription as ɵb, ServiceDescription as ɵa } from './lib/definitions';
6
- export { IoTizeBleCordovaPlugin as ɵc } from './lib/iotize-ble-cordova-plugin';
@@ -1 +0,0 @@
1
- {"__symbolic":"module","version":4,"metadata":{"BLEComProtocol":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@iotize/tap/protocol/core","name":"QueueComProtocol","line":21,"character":36},"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@iotize/tap/protocol/api","name":"ComProtocolOptions","line":33,"character":25},{"__symbolic":"reference","name":"ɵc"}]}],"_connect":[{"__symbolic":"method"}],"_disconnect":[{"__symbolic":"method"}],"write":[{"__symbolic":"method"}],"read":[{"__symbolic":"method"}],"send":[{"__symbolic":"method"}]}},"CordovaCharacteristicAdapter":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"CordovaServiceAdapter"},{"__symbolic":"reference","name":"ɵb"}]}],"read":[{"__symbolic":"method"}],"getDescriptor":[{"__symbolic":"method"}],"getDescriptors":[{"__symbolic":"method"}],"write":[{"__symbolic":"method"}],"enableNotifications":[{"__symbolic":"method"}],"setupDataStreamIfRequired":[{"__symbolic":"method"}]}},"CordovaPeripheralAdapter":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"ɵc"}]}],"discoverServices":[{"__symbolic":"method"}],"connect":[{"__symbolic":"method"}],"disconnect":[{"__symbolic":"method"}],"close":[{"__symbolic":"method"}],"getService":[{"__symbolic":"method"}]}},"CordovaServiceAdapter":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"CordovaPeripheralAdapter"}]}],"getCharacteristic":[{"__symbolic":"method"}],"getCharacteristics":[{"__symbolic":"method"}]}},"ɵa":{"__symbolic":"interface"},"ɵb":{"__symbolic":"interface"},"CordovaBLEScanResult":{"__symbolic":"interface"},"RequestDeviceOptions":{"__symbolic":"interface"},"BLEScanner":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵc"},{"__symbolic":"reference","name":"RequestDeviceOptions"}]}],"start":[{"__symbolic":"method"}],"stop":[{"__symbolic":"method"}],"checkAvailable":[{"__symbolic":"method"}],"clearResults":[{"__symbolic":"method"}],"addOrRefreshDevice":[{"__symbolic":"method"}]}},"getIoTizeBleCordovaPlugin":{"__symbolic":"function"},"getScanRecordsFromBytes":{"__symbolic":"function"},"ɵc":{"__symbolic":"class","members":{"checkAvailable":[{"__symbolic":"method"}],"requestEnableBle":[{"__symbolic":"method"}],"startScan":[{"__symbolic":"method"}],"stopScan":[{"__symbolic":"method"}],"connect":[{"__symbolic":"method"}],"askBleEnable":[{"__symbolic":"method"}],"requestMTU":[{"__symbolic":"method"}],"connectAndDiscoverTapServices":[{"__symbolic":"method"}],"disConnect":[{"__symbolic":"method"}],"close":[{"__symbolic":"method"}],"isConnected":[{"__symbolic":"method"}],"send":[{"__symbolic":"method"}],"getLastError":[{"__symbolic":"method"}],"characteristicStartNotification":[{"__symbolic":"method"}],"characteristicChanged":[{"__symbolic":"method"}],"characteristicStopNotification":[{"__symbolic":"method"}],"characteristicReadValue":[{"__symbolic":"method"}],"characteristicWrite":[{"__symbolic":"method"}],"characteristicWriteWithoutResponse":[{"__symbolic":"method"}],"discoverServices":[{"__symbolic":"method"}],"execSingleResult":[{"__symbolic":"method"}],"execMultipleResult":[{"__symbolic":"method"}]}}},"origins":{"BLEComProtocol":"./lib/ble-com-protocol","CordovaCharacteristicAdapter":"./lib/cordova-service-adapter","CordovaPeripheralAdapter":"./lib/cordova-service-adapter","CordovaServiceAdapter":"./lib/cordova-service-adapter","ɵa":"./lib/definitions","ɵb":"./lib/definitions","CordovaBLEScanResult":"./lib/definitions","RequestDeviceOptions":"./lib/definitions","BLEScanner":"./lib/scanner","getIoTizeBleCordovaPlugin":"./lib/utility","getScanRecordsFromBytes":"./lib/utility","ɵc":"./lib/iotize-ble-cordova-plugin"},"importAs":"@iotize/device-com-ble.cordova"}
package/lib/logger.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare const debug: any;
package/public_api.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export { BLEComProtocol } from "./lib/ble-com-protocol";
2
- export { CordovaCharacteristicAdapter, CordovaPeripheralAdapter, CordovaServiceAdapter, } from "./lib/cordova-service-adapter";
3
- export { CordovaBLEScanResult, RequestDeviceOptions } from "./lib/definitions";
4
- export { BLEScanner } from "./lib/scanner";
5
- export { getIoTizeBleCordovaPlugin, getScanRecordsFromBytes } from "./lib/utility";
File without changes
@@ -1,2 +0,0 @@
1
- #Thu Feb 25 19:02:25 CET 2021
2
- gradle.version=6.8.2
File without changes
File without changes
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" inherit-compiler-output="true">
4
- <exclude-output />
5
- <content url="file://$MODULE_DIR$" />
6
- <orderEntry type="inheritedJdk" />
7
- <orderEntry type="sourceFolder" forTests="false" />
8
- </component>
9
- </module>
@@ -1,16 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="GradleMigrationSettings" migrationVersion="1" />
4
- <component name="GradleSettings">
5
- <option name="linkedExternalProjectsSettings">
6
- <GradleProjectSettings>
7
- <option name="testRunner" value="GRADLE" />
8
- <option name="distributionType" value="DEFAULT_WRAPPED" />
9
- <option name="externalProjectPath" value="$PROJECT_DIR$" />
10
- <option name="gradleHome" value="$PROJECT_DIR$/../../../../../../../../../MyPrograms/Gradle/gradle-6.8.2" />
11
- <option name="gradleJvm" value="#JAVA_HOME" />
12
- <option name="resolveModulePerSourceSet" value="false" />
13
- </GradleProjectSettings>
14
- </option>
15
- </component>
16
- </project>
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/android.iml" filepath="$PROJECT_DIR$/.idea/android.iml" />
6
- </modules>
7
- </component>
8
- </project>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
5
- </component>
6
- </project>
package/www/plugin.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see plugin.js.LICENSE.txt */
2
- (()=>{"use strict";var t={34:(t,e,n)=>{n.d(e,{M:()=>r});var r=function(){function t(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return t.prototype=Object.create(Error.prototype),t}()},252:(t,e,n)=>{n.d(e,{c:()=>r});var r=function(){return Array.isArray||function(t){return t&&"number"==typeof t.length}}()},293:(t,e,n)=>{n.d(e,{Y:()=>i});var r=n(7272),i=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return r.C6(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(n(9147).y)},298:(t,e,n)=>{n.d(e,{gn:()=>c,tS:()=>a,zA:()=>u});var r=n(7272),i=n(2968),o=n(9664),s=n(8777),u=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,n}return r.C6(e,t),e.prototype._next=function(t){this.parent.notifyNext(t)},e.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},e}(i.v),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.C6(e,t),e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(){this.destination.complete()},e}(i.v);function a(t,e){if(!e.closed){if(t instanceof o.c)return t.subscribe(e);var n;try{n=(0,s.i)(t)(e)}catch(t){e.error(t)}return n}}},464:(t,e,n)=>{n.d(e,{g:()=>s,T:()=>o});var r=n(7272),i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.C6(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(n(6027).R),o=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.C6(e,t),e}(n(4881).q))(i),s=o},538:(t,e,n)=>{n.d(e,{F:()=>u});var r=n(7272),i=function(t){function e(e,n,r){var i=t.call(this)||this;return i.parent=e,i.outerValue=n,i.outerIndex=r,i.index=0,i}return r.C6(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(n(2968).v),o=n(8777),s=n(9664);function u(t,e,n,r,u){if(void 0===u&&(u=new i(t,n,r)),!u.closed)return e instanceof s.c?e.subscribe(u):(0,o.i)(e)(u)}},560:(t,e,n)=>{n.d(e,{v:()=>s});var r=n(9664),i=n(7046),o=n(4833);function s(t){return new r.c((function(e){var n;try{n=t()}catch(t){return void e.error(t)}return(n?(0,i.H)(n):(0,o.I)()).subscribe(e)}))}},692:(t,e,n)=>{n.d(e,{k:()=>r});var r=function(){function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t}()},731:(t,e,n)=>{n.d(e,{P:()=>r});var r=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}()},806:(t,e,n)=>{function r(t){return null!==t&&"object"==typeof t}n.d(e,{G:()=>r})},926:(t,e,n)=>{n.d(e,{x:()=>o});var r=n(8927),i=n(7125);function o(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,i.K)()(r.of.apply(void 0,t))}},957:(t,e,n)=>{n.d(e,{_:()=>r});var r=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}()},1015:(t,e,n)=>{function r(t){return t}n.d(e,{D:()=>r})},1075:(t,e,n)=>{n.d(e,{H:()=>i});var r=n(2968);function i(t){for(;t;){var e=t,n=e.closed,i=e.destination,o=e.isStopped;if(n||o)return!1;t=i&&i instanceof r.v?i:null}return!0}},1133:(t,e,n)=>{n.d(e,{O:()=>u});var r=n(9664),i=n(6346),o=n(6290),s=n(4576);function u(t,e,n){void 0===t&&(t=0);var u=-1;return(0,o.k)(e)?u=Number(e)<1?1:Number(e):(0,s.m)(e)&&(n=e),(0,s.m)(n)||(n=i.b),new r.c((function(e){var r=(0,o.k)(t)?t:+t-n.now();return n.schedule(c,r,{index:0,period:u,subscriber:e})}))}function c(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}}},1164:(t,e,n)=>{function r(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,{y:()=>r})},1193:(t,e,n)=>{function r(){}n.d(e,{l:()=>r})},1261:(t,e,n)=>{const r=new(n(6769).IoTizeBleCordovaPlugin);t.exports=r},1413:(t,e,n)=>{n.d(e,{c:()=>h});var r=n(9664),i=n(9147),o=n(3656),s=n(5890),u=n(3991),c=n(1164),a=n(9923);function h(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[o.s]}(t))return function(t,e){return new r.c((function(n){var r=new i.y;return r.add(e.schedule((function(){var i=t[o.s]();r.add(i.subscribe({next:function(t){r.add(e.schedule((function(){return n.next(t)})))},error:function(t){r.add(e.schedule((function(){return n.error(t)})))},complete:function(){r.add(e.schedule((function(){return n.complete()})))}}))}))),r}))}(t,e);if((0,c.y)(t))return function(t,e){return new r.c((function(n){var r=new i.y;return r.add(e.schedule((function(){return t.then((function(t){r.add(e.schedule((function(){n.next(t),r.add(e.schedule((function(){return n.complete()})))})))}),(function(t){r.add(e.schedule((function(){return n.error(t)})))}))}))),r}))}(t,e);if((0,a.X)(t))return(0,s.V)(t,e);if(function(t){return t&&"function"==typeof t[u.lJ]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new r.c((function(n){var r,o=new i.y;return o.add((function(){r&&"function"==typeof r.return&&r.return()})),o.add(e.schedule((function(){r=t[u.lJ](),o.add(e.schedule((function(){if(!n.closed){var t,e;try{var i=r.next();t=i.value,e=i.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}})))}))),o}))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}},1732:(t,e,n)=>{n.d(e,{$:()=>i});var r=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack,r=t},get useDeprecatedSynchronousErrorHandling(){return r}}},1764:(t,e,n)=>{n.d(e,{B:()=>o});var r=n(7272),i=n(2968);function o(){return function(t){return t.lift(new s(t))}}var s=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new u(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),u=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.C6(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(i.v)},1934:(t,e,n)=>{n.d(e,{h:()=>s});var r=n(7272),i=n(6988),o=n(9147),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}return r.C6(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),o.y.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),o.y.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(i.B7)},2063:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CordovaBLEError=void 0;const r=n(4594);class i extends r.CodeError{static invalidErrorResult(t){return new i("Internal error: ble cordova plugin returned an unexpected error object",i.Code.InternalError)}static invalidErrorCode(t){return new i(`Internal error: ble cordova plugin returned an invalid error code ${t.code} with message ${t.message}`,i.Code.InternalError)}static invalidNativeCallResult(t,e){return new i(`Internal error: native call returned an invalid data type. ${e.message}`,i.Code.InternalError)}static isValidErrorCode(t){return t in i.Code}static iotizeBLEMissing(){return new i("iotizeBLE global variable does not exist. Are you sure app is running inside a Cordova application ?",i.Code.InternalError)}}e.CordovaBLEError=i,function(t){let e;!function(t){t.InternalError="CordovaBLEErrorInternalError",t.IllegalArgument="CordovaBLEErrorIllegalArgument",t.BLENotAvailable="CordovaBLEErrorBLENotAvailable",t.InvalidMacAddress="InvalidMacAddressInvalidMacAddress",t.ConnectionError="CordovaBLEErrorConnectionError",t.RequestError="CordovaBLEErrorRequestError",t.LocationServiceDisabled="CordovaBLEErrorLocationServiceDisabled",t.DisconnectError="CordovaBLEErrorDisconnectError",t.IllegalAction="CordovaBLEErrorIllegalAction",t.NotConnectedError="CordovaBLEErrorNotConnectedError",t.StatusCodeError="CordovaBLEErrorStatusCodeError"}(e=t.Code||(t.Code={}))}(i=e.CordovaBLEError||(e.CordovaBLEError={}))},2281:(t,e,n)=>{n.d(e,{E:()=>u,I:()=>r});var r,i=n(4833),o=n(8927),s=n(7404);r||(r={});var u=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return(0,o.of)(this.value);case"E":return(0,s.$)(this.error);case"C":return(0,i.I)()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}()},2430:(t,e,n)=>{n.d(e,{t:()=>s});var r=n(7272),i=n(6988),o=n(731),s=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return r.C6(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.P;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(i.B7)},2968:(t,e,n)=>{n.d(e,{v:()=>h});var r=n(7272),i=n(9029),o=n(6708),s=n(9147),u=n(3089),c=n(1732),a=n(9199),h=function(t){function e(n,r,i){var s=t.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=o.I;break;case 1:if(!n){s.destination=o.I;break}if("object"==typeof n){n instanceof e?(s.syncErrorThrowable=n.syncErrorThrowable,s.destination=n,n.add(s)):(s.syncErrorThrowable=!0,s.destination=new l(s,n));break}default:s.syncErrorThrowable=!0,s.destination=new l(s,n,r,i)}return s}return r.C6(e,t),e.prototype[u.D]=function(){return this},e.create=function(t,n,r){var i=new e(t,n,r);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(s.y),l=function(t){function e(e,n,r,s){var u,c=t.call(this)||this;c._parentSubscriber=e;var a=c;return(0,i.T)(n)?u=n:n&&(u=n.next,r=n.error,s=n.complete,n!==o.I&&(a=Object.create(n),(0,i.T)(a.unsubscribe)&&c.add(a.unsubscribe.bind(a)),a.unsubscribe=c.unsubscribe.bind(c))),c._context=a,c._next=u,c._error=r,c._complete=s,c}return r.C6(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;c.$.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=c.$.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):(0,a.T)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;(0,a.T)(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};c.$.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),c.$.useDeprecatedSynchronousErrorHandling)throw t;(0,a.T)(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!c.$.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return c.$.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):((0,a.T)(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(h)},3089:(t,e,n)=>{n.d(e,{D:()=>r});var r=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},3108:(t,e,n)=>{n.d(e,{$:()=>c,k:()=>f});var r=n(7272),i=n(2968),o=n(9147),s=n(9664),u=n(6988);function c(t,e,n,r){return function(i){return i.lift(new a(t,e,n,r))}}var a=function(){function t(t,e,n,r){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=r}return t.prototype.call=function(t,e){return e.subscribe(new h(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),h=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.keySelector=n,s.elementSelector=r,s.durationSelector=i,s.subjectSelector=o,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return r.C6(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var r,i=n.get(e);if(this.elementSelector)try{r=this.elementSelector(t)}catch(t){this.error(t)}else r=t;if(!i){i=this.subjectSelector?this.subjectSelector():new u.B7,n.set(e,i);var o=new f(e,i,this);if(this.destination.next(o),this.durationSelector){var s=void 0;try{s=this.durationSelector(new f(e,i))}catch(t){return void this.error(t)}this.add(s.subscribe(new l(e,i,this)))}}i.closed||i.next(r)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach((function(e,n){e.error(t)})),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach((function(t,e){t.complete()})),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))},e}(i.v),l=function(t){function e(e,n,r){var i=t.call(this,n)||this;return i.key=e,i.group=n,i.parent=r,i}return r.C6(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(i.v),f=function(t){function e(e,n,r){var i=t.call(this)||this;return i.key=e,i.groupSubject=n,i.refCountSubscription=r,i}return r.C6(e,t),e.prototype._subscribe=function(t){var e=new o.y,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new p(n)),e.add(r.subscribe(t)),e},e}(s.c),p=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return r.C6(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(o.y)},3229:(t,e,n)=>{var r,i;n.r(e),n.d(e,{ComProtocol:()=>i,ConnectionState:()=>r}),function(t){t[t.DISCONNECTED=0]="DISCONNECTED",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED",t[t.DISCONNECTING=3]="DISCONNECTING"}(r||(r={})),function(t){class e extends Error{constructor(t,e){super(e),this.code=t}static operationCanceled(){return new e(n.OperationCancelled,"Communication protocol operation cancelled")}static notConnected(t){return new e(n.ProtocolNotConnected,"Communication protocol is not connected")}static timeoutError(t){return new e(n.TimeoutError,t.msg||"Communication protocol timeout")}static operationInProgress(t){return new e(n.OperationInProgress,t)}static unknownError(){return new e(n.UnknownError,"Unnown communication protocol error")}}let n;t.Errors=e,function(t){t.ProtocolNotConnected="ProtocolNotConnected",t.TimeoutError="TimeoutError",t.UnknownError="UnknownError",t.OperationCancelled="OperationCancelled",t.OperationInProgress="ComProtocolOperationInProgress"}(n=t.ErrorCode||(t.ErrorCode={}))}(i||(i={}))},3428:(t,e,n)=>{function r(t,e){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=t,n.thisArg=e,n}n.d(e,{A:()=>r})},3656:(t,e,n)=>{n.d(e,{s:()=>r});var r=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}()},3700:(t,e,n)=>{n.d(e,{G:()=>r});var r=function(){function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t}()},3947:(t,e,n)=>{n.d(e,{QE:()=>s,YZ:()=>c});var r=n(7272),i=n(2968),o=n(2281);function s(t,e){return void 0===e&&(e=0),function(n){return n.lift(new u(t,e))}}var u=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.scheduler,this.delay))},t}(),c=function(t){function e(e,n,r){void 0===r&&(r=0);var i=t.call(this,e)||this;return i.scheduler=n,i.delay=r,i}return r.C6(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new a(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(o.E.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(o.E.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(o.E.createComplete()),this.unsubscribe()},e}(i.v),a=function(){return function(t,e){this.notification=t,this.destination=e}}()},3991:(t,e,n)=>{function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(e,{lJ:()=>i});var i=r()},4046:(t,e,n)=>{n.r(e),n.d(e,{ArgumentOutOfRangeError:()=>V.k,AsyncSubject:()=>h.h,BehaviorSubject:()=>c.t,ConnectableObservable:()=>i.G,EMPTY:()=>G.w,EmptyError:()=>A.G,GroupedObservable:()=>o.k,NEVER:()=>lt,Notification:()=>E.E,NotificationKind:()=>E.I,ObjectUnsubscribedError:()=>j.P,Observable:()=>r.c,ReplaySubject:()=>a.m,Scheduler:()=>_._,Subject:()=>u.B7,Subscriber:()=>C.v,Subscription:()=>S.y,TimeoutError:()=>B.M,UnsubscriptionError:()=>k.Z,VirtualAction:()=>g,VirtualTimeScheduler:()=>x,animationFrame:()=>m,animationFrameScheduler:()=>w,asap:()=>l.I,asapScheduler:()=>l.$,async:()=>f.b,asyncScheduler:()=>f.E,bindCallback:()=>D,bindNodeCallback:()=>L,combineLatest:()=>H.zV,concat:()=>$.x,config:()=>Ot.$,defer:()=>Z.v,empty:()=>G.I,forkJoin:()=>X,from:()=>K.H,fromEvent:()=>et,fromEventPattern:()=>rt,generate:()=>it,identity:()=>N.D,iif:()=>st,interval:()=>ct,isObservable:()=>O,merge:()=>ht.h,never:()=>ft,noop:()=>I.l,observable:()=>s.s,of:()=>pt.of,onErrorResumeNext:()=>dt,pairs:()=>bt,partition:()=>xt,pipe:()=>T.F,queue:()=>p.g,queueScheduler:()=>p.T,race:()=>gt.O4,range:()=>_t,scheduled:()=>Nt.c,throwError:()=>Ct.$,timer:()=>Et.O,using:()=>Tt,zip:()=>It.yU});var r=n(9664),i=n(4491),o=n(3108),s=n(3656),u=n(6988),c=n(2430),a=n(8977),h=n(1934),l=n(9081),f=n(6346),p=n(464),d=n(7272),b=n(6027),v=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return d.C6(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0)},e}(b.R),y=n(4881),w=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d.C6(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(y.q))(v),m=w,x=function(t){function e(e,n){void 0===e&&(e=g),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=t.call(this,e,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return d.C6(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n[0])&&e.delay<=r&&(n.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10,e}(y.q),g=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.index=r,i.active=!0,i.index=e.index=r,i}return d.C6(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(n,r)},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var i=t.actions;return i.push(this),i.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){void 0===n&&(n=0)},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(b.R),_=n(957),S=n(9147),C=n(2968),E=n(2281),T=n(6833),I=n(1193),N=n(1015);function O(t){return!!t&&(t instanceof r.c||"function"==typeof t.lift&&"function"==typeof t.subscribe)}var V=n(692),A=n(3700),j=n(731),k=n(9857),B=n(34),P=n(8100),R=n(1075),F=n(252),z=n(4576);function D(t,e,n){if(e){if(!(0,z.m)(e))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return D(t,n).apply(void 0,r).pipe((0,P.T)((function(t){return(0,F.c)(t)?e.apply(void 0,t):e(t)})))};n=e}return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var o,s=this,u={context:s,subject:o,callbackFunc:t,scheduler:n};return new r.c((function(r){if(n){var i={args:e,subscriber:r,params:u};return n.schedule(W,0,i)}if(!o){o=new h.h;try{t.apply(s,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];o.next(t.length<=1?t[0]:t),o.complete()}]))}catch(t){(0,R.H)(o)?o.error(t):console.warn(t)}}return o.subscribe(r)}))}}function W(t){var e=this,n=t.args,r=t.subscriber,i=t.params,o=i.callbackFunc,s=i.context,u=i.scheduler,c=i.subject;if(!c){c=i.subject=new h.h;try{o.apply(s,n.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.length<=1?t[0]:t;e.add(u.schedule(M,0,{value:r,subject:c}))}]))}catch(t){c.error(t)}}this.add(c.subscribe(r))}function M(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function L(t,e,n){if(e){if(!(0,z.m)(e))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return L(t,n).apply(void 0,r).pipe((0,P.T)((function(t){return(0,F.c)(t)?e.apply(void 0,t):e(t)})))};n=e}return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var o={subject:void 0,args:e,callbackFunc:t,scheduler:n,context:this};return new r.c((function(r){var i=o.context,s=o.subject;if(n)return n.schedule(U,0,{params:o,subscriber:r,context:i});if(!s){s=o.subject=new h.h;try{t.apply(i,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.shift();n?s.error(n):(s.next(t.length<=1?t[0]:t),s.complete())}]))}catch(t){(0,R.H)(s)?s.error(t):console.warn(t)}}return s.subscribe(r)}))}}function U(t){var e=this,n=t.params,r=t.subscriber,i=t.context,o=n.callbackFunc,s=n.args,u=n.scheduler,c=n.subject;if(!c){c=n.subject=new h.h;try{o.apply(i,s.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.shift();if(r)e.add(u.schedule(Y,0,{err:r,subject:c}));else{var i=t.length<=1?t[0]:t;e.add(u.schedule(q,0,{value:i,subject:c}))}}]))}catch(t){this.add(u.schedule(Y,0,{err:t,subject:c}))}}this.add(c.subscribe(r))}function q(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function Y(t){var e=t.err;t.subject.error(e)}var H=n(8890),$=n(926),Z=n(560),G=n(4833),J=n(806),K=n(7046);function X(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){var n=t[0];if((0,F.c)(n))return Q(n,null);if((0,J.G)(n)&&Object.getPrototypeOf(n)===Object.prototype){var r=Object.keys(n);return Q(r.map((function(t){return n[t]})),r)}}if("function"==typeof t[t.length-1]){var i=t.pop();return Q(t=1===t.length&&(0,F.c)(t[0])?t[0]:t,null).pipe((0,P.T)((function(t){return i.apply(void 0,t)})))}return Q(t,null)}function Q(t,e){return new r.c((function(n){var r=t.length;if(0!==r)for(var i=new Array(r),o=0,s=0,u=function(u){var c=(0,K.H)(t[u]),a=!1;n.add(c.subscribe({next:function(t){a||(a=!0,s++),i[u]=t},error:function(t){return n.error(t)},complete:function(){++o!==r&&a||(s===r&&n.next(e?e.reduce((function(t,e,n){return t[e]=i[n],t}),{}):i),n.complete())}}))},c=0;c<r;c++)u(c);else n.complete()}))}var tt=n(9029);function et(t,e,n,i){return(0,tt.T)(n)&&(i=n,n=void 0),i?et(t,e,n).pipe((0,P.T)((function(t){return(0,F.c)(t)?i.apply(void 0,t):i(t)}))):new r.c((function(r){nt(t,e,(function(t){arguments.length>1?r.next(Array.prototype.slice.call(arguments)):r.next(t)}),r,n)}))}function nt(t,e,n,r,i){var o;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){var s=t;t.addEventListener(e,n,i),o=function(){return s.removeEventListener(e,n,i)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){var u=t;t.on(e,n),o=function(){return u.off(e,n)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){var c=t;t.addListener(e,n),o=function(){return c.removeListener(e,n)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var a=0,h=t.length;a<h;a++)nt(t[a],e,n,r,i)}r.add(o)}function rt(t,e,n){return n?rt(t,e).pipe((0,P.T)((function(t){return(0,F.c)(t)?n.apply(void 0,t):n(t)}))):new r.c((function(n){var r,i=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.next(1===t.length?t[0]:t)};try{r=t(i)}catch(t){return void n.error(t)}if((0,tt.T)(e))return function(){return e(i,r)}}))}function it(t,e,n,i,o){var s,u;if(1==arguments.length){var c=t;u=c.initialState,e=c.condition,n=c.iterate,s=c.resultSelector||N.D,o=c.scheduler}else void 0===i||(0,z.m)(i)?(u=t,s=N.D,o=i):(u=t,s=i);return new r.c((function(t){var r=u;if(o)return o.schedule(ot,0,{subscriber:t,iterate:n,condition:e,resultSelector:s,state:r});for(;;){if(e){var i=void 0;try{i=e(r)}catch(e){return void t.error(e)}if(!i){t.complete();break}}var c=void 0;try{c=s(r)}catch(e){return void t.error(e)}if(t.next(c),t.closed)break;try{r=n(r)}catch(e){return void t.error(e)}}}))}function ot(t){var e=t.subscriber,n=t.condition;if(!e.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(t){return void e.error(t)}else t.needIterate=!0;if(n){var r=void 0;try{r=n(t.state)}catch(t){return void e.error(t)}if(!r)return void e.complete();if(e.closed)return}var i;try{i=t.resultSelector(t.state)}catch(t){return void e.error(t)}if(!e.closed&&(e.next(i),!e.closed))return this.schedule(t)}}function st(t,e,n){return void 0===e&&(e=G.w),void 0===n&&(n=G.w),(0,Z.v)((function(){return t()?e:n}))}var ut=n(6290);function ct(t,e){return void 0===t&&(t=0),void 0===e&&(e=f.b),(!(0,ut.k)(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=f.b),new r.c((function(n){return n.add(e.schedule(at,t,{subscriber:n,counter:0,period:t})),n}))}function at(t){var e=t.subscriber,n=t.counter,r=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:r},r)}var ht=n(6148),lt=new r.c(I.l);function ft(){return lt}var pt=n(8927);function dt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return G.w;var n=t[0],i=t.slice(1);return 1===t.length&&(0,F.c)(n)?dt.apply(void 0,n):new r.c((function(t){var e=function(){return t.add(dt.apply(void 0,i).subscribe(t))};return(0,K.H)(n).subscribe({next:function(e){t.next(e)},error:e,complete:e})}))}function bt(t,e){return e?new r.c((function(n){var r=Object.keys(t),i=new S.y;return i.add(e.schedule(vt,0,{keys:r,index:0,subscriber:n,subscription:i,obj:t})),i})):new r.c((function(e){for(var n=Object.keys(t),r=0;r<n.length&&!e.closed;r++){var i=n[r];t.hasOwnProperty(i)&&e.next([i,t[i]])}e.complete()}))}function vt(t){var e=t.keys,n=t.index,r=t.subscriber,i=t.subscription,o=t.obj;if(!r.closed)if(n<e.length){var s=e[n];r.next([s,o[s]]),i.add(this.schedule({keys:e,index:n+1,subscriber:r,subscription:i,obj:o}))}else r.complete()}var yt=n(3428),wt=n(8777),mt=n(9610);function xt(t,e,n){return[(0,mt.p)(e,n)(new r.c((0,wt.i)(t))),(0,mt.p)((0,yt.A)(e,n))(new r.c((0,wt.i)(t)))]}var gt=n(8071);function _t(t,e,n){return void 0===t&&(t=0),new r.c((function(r){void 0===e&&(e=t,t=0);var i=0,o=t;if(n)return n.schedule(St,0,{index:i,count:e,start:t,subscriber:r});for(;;){if(i++>=e){r.complete();break}if(r.next(o++),r.closed)break}}))}function St(t){var e=t.start,n=t.index,r=t.count,i=t.subscriber;n>=r?i.complete():(i.next(e),i.closed||(t.index=n+1,t.start=e+1,this.schedule(t)))}var Ct=n(7404),Et=n(1133);function Tt(t,e){return new r.c((function(n){var r,i;try{r=t()}catch(t){return void n.error(t)}try{i=e(r)}catch(t){return void n.error(t)}var o=(i?(0,K.H)(i):G.w).subscribe(n);return function(){o.unsubscribe(),r&&r.unsubscribe()}}))}var It=n(4219),Nt=n(1413),Ot=n(1732)},4219:(t,e,n)=>{n.d(e,{ee:()=>h,yU:()=>a});var r=n(7272),i=n(4601),o=n(252),s=n(2968),u=n(3991),c=n(298);function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return"function"==typeof n&&t.pop(),(0,i.c)(t,void 0).lift(new h(n))}var h=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.resultSelector))},t}(),l=function(t){function e(e,n,r){void 0===r&&(r=Object.create(null));var i=t.call(this,e)||this;return i.resultSelector=n,i.iterators=[],i.active=0,i.resultSelector="function"==typeof n?n:void 0,i}return r.C6(e,t),e.prototype._next=function(t){var e=this.iterators;(0,o.c)(t)?e.push(new p(t)):"function"==typeof t[u.lJ]?e.push(new f(t[u.lJ]())):e.push(new d(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var n=0;n<e;n++){var r=t[n];r.stillUnsubscribed?this.destination.add(r.subscribe()):this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,n=this.destination,r=0;r<e;r++)if("function"==typeof(s=t[r]).hasValue&&!s.hasValue())return;var i=!1,o=[];for(r=0;r<e;r++){var s,u=(s=t[r]).next();if(s.hasCompleted()&&(i=!0),u.done)return void n.complete();o.push(u.value)}this.resultSelector?this._tryresultSelector(o):n.next(o),i&&n.complete()},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(s.v),f=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return Boolean(t&&t.done)},t}(),p=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[u.lJ]=function(){return this},t.prototype.next=function(t){var e=this.index++,n=this.array;return e<this.length?{value:n[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),d=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.parent=n,i.observable=r,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return r.C6(e,t),e.prototype[u.lJ]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t){this.buffer.push(t),this.parent.checkIterators()},e.prototype.subscribe=function(){return(0,c.tS)(this.observable,new c.zA(this))},e}(c.gn)},4490:(t,e,n)=>{n.d(e,{ZZ:()=>u,qI:()=>h});var r=n(7272),i=n(8100),o=n(7046),s=n(298);function u(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(r){return r.pipe(u((function(n,r){return(0,o.H)(t(n,r)).pipe((0,i.T)((function(t,i){return e(n,t,r,i)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new c(t,n))})}var c=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.project,this.concurrent))},t}(),a=function(t){function e(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this,e)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return r.C6(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e)},e.prototype._innerSub=function(t){var e=new s.zA(this),n=this.destination;n.add(e);var r=(0,s.tS)(t,e);r!==e&&n.add(r)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(s.gn),h=u},4491:(t,e,n)=>{n.d(e,{G:()=>c,f:()=>a});var r=n(7272),i=n(6988),o=n(9664),s=n(9147),u=n(1764),c=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.C6(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new s.y).add(this.source.subscribe(new h(this.getSubject(),this))),t.closed&&(this._connection=null,t=s.y.EMPTY)),t},e.prototype.refCount=function(){return(0,u.B)()(this)},e}(o.c),a=function(){var t=c.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),h=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.C6(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(i.PJ)},4576:(t,e,n)=>{function r(t){return t&&"function"==typeof t.schedule}n.d(e,{m:()=>r})},4594:(t,e,n)=>{n.r(e),n.d(e,{BaseError:()=>r,CodeError:()=>i,isCodeError:()=>o});class r extends Error{constructor(t){super(t),this.message=t,Object.defineProperty(this,"name",{get:()=>this.constructor.name,set:()=>{}}),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class i extends r{constructor(t,e){super(t),this.code=e}}function o(t,e){return e.code===t}},4601:(t,e,n)=>{n.d(e,{c:()=>s});var r=n(9664),i=n(6239),o=n(5890);function s(t,e){return e?(0,o.V)(t,e):new r.c((0,i.v)(t))}},4833:(t,e,n)=>{n.d(e,{I:()=>o,w:()=>i});var r=n(9664),i=new r.c((function(t){return t.complete()}));function o(t){return t?function(t){return new r.c((function(e){return t.schedule((function(){return e.complete()}))}))}(t):i}},4881:(t,e,n)=>{n.d(e,{q:()=>o});var r=n(7272),i=n(957),o=function(t){function e(n,r){void 0===r&&(r=i._.now);var o=t.call(this,n,(function(){return e.delegate&&e.delegate!==o?e.delegate.now():r()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return r.C6(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(i._)},5758:(t,e,n)=>{n.r(e),n.d(e,{audit:()=>o,auditTime:()=>h,buffer:()=>l,bufferCount:()=>b,bufferTime:()=>x,bufferToggle:()=>V,bufferWhen:()=>k,catchError:()=>R,combineAll:()=>W,combineLatest:()=>U,concat:()=>Y,concatAll:()=>H.K,concatMap:()=>Z,concatMapTo:()=>G,count:()=>J,debounce:()=>Q,debounceTime:()=>nt,defaultIfEmpty:()=>st,delay:()=>lt,delayWhen:()=>vt,dematerialize:()=>gt,distinct:()=>Ct,distinctUntilChanged:()=>It,distinctUntilKeyChanged:()=>Vt,elementAt:()=>Lt,endWith:()=>qt,every:()=>Yt,exhaust:()=>Zt,exhaustMap:()=>Xt,expand:()=>ee,filter:()=>jt.p,finalize:()=>ie,find:()=>ue,findIndex:()=>he,first:()=>fe,flatMap:()=>$.qI,groupBy:()=>pe.$,ignoreElements:()=>de,isEmpty:()=>ye,last:()=>Se,map:()=>Kt.T,mapTo:()=>Ce,materialize:()=>Ie,max:()=>Pe,merge:()=>Fe,mergeAll:()=>ze.U,mergeMap:()=>$.ZZ,mergeMapTo:()=>De,mergeScan:()=>We,min:()=>Ue,multicast:()=>Ye,observeOn:()=>$e.QE,onErrorResumeNext:()=>Ze,pairwise:()=>Ke,partition:()=>en,pluck:()=>nn,publish:()=>on,publishBehavior:()=>un,publishLast:()=>an,publishReplay:()=>ln,race:()=>pn,reduce:()=>Be,refCount:()=>Tn.B,repeat:()=>dn,repeatWhen:()=>yn,retry:()=>xn,retryWhen:()=>Sn,sample:()=>In,sampleTime:()=>Vn,scan:()=>Ve,sequenceEqual:()=>Bn,share:()=>Dn,shareReplay:()=>Wn,single:()=>Mn,skip:()=>qn,skipLast:()=>$n,skipUntil:()=>Jn,skipWhile:()=>Qn,startWith:()=>nr,subscribeOn:()=>sr,switchAll:()=>lr,switchMap:()=>cr,switchMapTo:()=>fr,take:()=>Dt,takeLast:()=>xe,takeUntil:()=>pr,takeWhile:()=>vr,tap:()=>gr,throttle:()=>Er,throttleTime:()=>Nr,throwIfEmpty:()=>Bt,timeInterval:()=>kr,timeout:()=>Wr,timeoutWith:()=>Rr,timestamp:()=>Mr,toArray:()=>qr,window:()=>Yr,windowCount:()=>Zr,windowTime:()=>Kr,windowToggle:()=>ii,windowWhen:()=>ui,withLatestFrom:()=>hi,zip:()=>di,zipAll:()=>bi});var r=n(7272),i=n(298);function o(t){return function(e){return e.lift(new s(t))}}var s=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.durationSelector))},t}(),u=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.C6(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t)}catch(t){return this.destination.error(t)}var n=(0,i.tS)(e,new i.zA(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},e.prototype.clearThrottle=function(){var t=this,e=t.value,n=t.hasValue,r=t.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),n&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))},e.prototype.notifyNext=function(){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(i.gn),c=n(6346),a=n(1133);function h(t,e){return void 0===e&&(e=c.b),o((function(){return(0,a.O)(t,e)}))}function l(t){return function(e){return e.lift(new f(t))}}var f=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new p(t,this.closingNotifier))},t}(),p=function(t){function e(e,n){var r=t.call(this,e)||this;return r.buffer=[],r.add((0,i.tS)(n,new i.zA(r))),r}return r.C6(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(){var t=this.buffer;this.buffer=[],this.destination.next(t)},e}(i.gn),d=n(2968);function b(t,e){return void 0===e&&(e=null),function(n){return n.lift(new v(t,e))}}var v=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?w:y}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),y=function(t){function e(e,n){var r=t.call(this,e)||this;return r.bufferSize=n,r.buffer=[],r}return r.C6(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(d.v),w=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.bufferSize=n,i.startBufferEvery=r,i.buffers=[],i.count=0,i}return r.C6(e,t),e.prototype._next=function(t){var e=this,n=e.bufferSize,r=e.startBufferEvery,i=e.buffers,o=e.count;this.count++,o%r===0&&i.push([]);for(var s=i.length;s--;){var u=i[s];u.push(t),u.length===n&&(i.splice(s,1),this.destination.next(u))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var r=e.shift();r.length>0&&n.next(r)}t.prototype._complete.call(this)},e}(d.v),m=n(4576);function x(t){var e=arguments.length,n=c.b;(0,m.m)(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var r=null;e>=2&&(r=arguments[1]);var i=Number.POSITIVE_INFINITY;return e>=3&&(i=arguments[2]),function(e){return e.lift(new g(t,r,i,n))}}var g=function(){function t(t,e,n,r){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new S(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),_=function(){return function(){this.buffer=[]}}(),S=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=r,s.maxBufferSize=i,s.scheduler=o,s.contexts=[];var u=s.openContext();if(s.timespanOnly=null==r||r<0,s.timespanOnly){var c={subscriber:s,context:u,bufferTimeSpan:n};s.add(u.closeAction=o.schedule(C,n,c))}else{var a={subscriber:s,context:u},h={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:s,scheduler:o};s.add(u.closeAction=o.schedule(T,n,a)),s.add(o.schedule(E,r,h))}return s}return r.C6(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,r=n.length,i=0;i<r;i++){var o=n[i],s=o.buffer;s.push(t),s.length==this.maxBufferSize&&(e=o)}e&&this.onBufferFull(e)},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts,n=this.destination;e.length>0;){var r=e.shift();n.next(r.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(C,n,r))}},e.prototype.openContext=function(){var t=new _;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)},e}(d.v);function C(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function E(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,r=t.subscriber,i=t.scheduler,o=r.openContext();r.closed||(r.add(o.closeAction=i.schedule(T,n,{subscriber:r,context:o})),this.schedule(t,e))}function T(t){var e=t.subscriber,n=t.context;e.closeContext(n)}var I=n(9147),N=n(538),O=n(7069);function V(t,e){return function(n){return n.lift(new A(t,e))}}var A=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new j(t,this.openings,this.closingSelector))},t}(),j=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.closingSelector=r,i.contexts=[],i.add((0,N.F)(i,n)),i}return r.C6(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,r=0;r<n;r++)e[r].buffer.push(t)},e.prototype._error=function(e){for(var n=this.contexts;n.length>0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(t){this._error(t)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.buffer,r=t.subscription;this.destination.next(n),e.splice(e.indexOf(t),1),this.remove(r),r.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new I.y,r={buffer:[],subscription:n};e.push(r);var i=(0,N.F)(this,t,r);!i||i.closed?this.closeBuffer(r):(i.context=r,this.add(i),n.add(i))},e}(O.E);function k(t){return function(e){return e.lift(new B(t))}}var B=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new P(t,this.closingSelector))},t}(),P=function(t){function e(e,n){var r=t.call(this,e)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return r.C6(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},e.prototype.notifyNext=function(){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)()}catch(t){return this.error(t)}t=new I.y,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add((0,i.tS)(e,new i.zA(this))),this.subscribing=!1},e}(i.gn);function R(t){return function(e){var n=new F(t),r=e.lift(n);return n.caught=r}}var F=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new z(t,this.selector,this.caught))},t}(),z=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.selector=n,i.caught=r,i}return r.C6(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var r=new i.zA(this);this.add(r);var o=(0,i.tS)(n,r);o!==r&&this.add(o)}},e}(i.gn),D=n(8890);function W(t){return function(e){return e.lift(new D.ZS(t))}}var M=n(252),L=n(7046);function U(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null;return"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&(0,M.c)(t[0])&&(t=t[0].slice()),function(e){return e.lift.call((0,L.H)([e].concat(t)),new D.ZS(n))}}var q=n(926);function Y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(q.x.apply(void 0,[e].concat(t)))}}var H=n(7125),$=n(4490);function Z(t,e){return(0,$.ZZ)(t,e,1)}function G(t,e){return Z((function(){return t}),e)}function J(t){return function(e){return e.lift(new K(t,e))}}var K=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new X(t,this.predicate,this.source))},t}(),X=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.count=0,i.index=0,i}return r.C6(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(d.v);function Q(t){return function(e){return e.lift(new tt(t))}}var tt=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new et(t,this.durationSelector))},t}(),et=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.C6(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,e){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=(0,i.tS)(e,new i.zA(this)))&&!n.closed&&this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,n=this.durationSubscription;n&&(this.durationSubscription=void 0,n.unsubscribe(),this.remove(n)),this.value=void 0,this.hasValue=!1,t.prototype._next.call(this,e)}},e}(i.gn);function nt(t,e){return void 0===e&&(e=c.b),function(n){return n.lift(new rt(t,e))}}var rt=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new it(t,this.dueTime,this.scheduler))},t}(),it=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.dueTime=n,i.scheduler=r,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}return r.C6(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(ot,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(d.v);function ot(t){t.debouncedNext()}function st(t){return void 0===t&&(t=null),function(e){return e.lift(new ut(t))}}var ut=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new ct(t,this.defaultValue))},t}(),ct=function(t){function e(e,n){var r=t.call(this,e)||this;return r.defaultValue=n,r.isEmpty=!0,r}return r.C6(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(d.v);function at(t){return t instanceof Date&&!isNaN(+t)}var ht=n(2281);function lt(t,e){void 0===e&&(e=c.b);var n=at(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new ft(n,e))}}var ft=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new pt(t,this.delay,this.scheduler))},t}(),pt=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.delay=n,i.scheduler=r,i.queue=[],i.active=!1,i.errored=!1,i}return r.C6(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,r=t.scheduler,i=t.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var o=Math.max(0,n[0].time-r.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new dt(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(ht.E.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(ht.E.createComplete()),this.unsubscribe()},e}(d.v),dt=function(){return function(t,e){this.time=t,this.notification=e}}(),bt=n(9664);function vt(t,e){return e?function(n){return new mt(n,e).lift(new yt(t))}:function(e){return e.lift(new yt(t))}}var yt=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new wt(t,this.delayDurationSelector))},t}(),wt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return r.C6(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(t),this.removeSubscription(i),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=(0,N.F)(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},e}(O.E),mt=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subscriptionDelay=n,r}return r.C6(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new xt(t,this.source))},e}(bt.c),xt=function(t){function e(e,n){var r=t.call(this)||this;return r.parent=e,r.source=n,r.sourceSubscribed=!1,r}return r.C6(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(d.v);function gt(){return function(t){return t.lift(new _t)}}var _t=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new St(t))},t}(),St=function(t){function e(e){return t.call(this,e)||this}return r.C6(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(d.v);function Ct(t,e){return function(n){return n.lift(new Et(t,e))}}var Et=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new Tt(t,this.keySelector,this.flushes))},t}(),Tt=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.keySelector=n,o.values=new Set,r&&o.add((0,i.tS)(r,new i.zA(o))),o}return r.C6(e,t),e.prototype.notifyNext=function(){this.values.clear()},e.prototype.notifyError=function(t){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t)}catch(t){return void n.error(t)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e))},e}(i.gn);function It(t,e){return function(n){return n.lift(new Nt(t,e))}}var Nt=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Ot(t,this.compare,this.keySelector))},t}(),Ot=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=r,i.hasKey=!1,"function"==typeof n&&(i.compare=n),i}return r.C6(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(t){return this.destination.error(t)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;r||(this.key=e,this.destination.next(t))},e}(d.v);function Vt(t,e){return It((function(n,r){return e?e(n[t],r[t]):n[t]===r[t]}))}var At=n(692),jt=n(9610),kt=n(3700);function Bt(t){return void 0===t&&(t=Ft),function(e){return e.lift(new Pt(t))}}var Pt=function(){function t(t){this.errorFactory=t}return t.prototype.call=function(t,e){return e.subscribe(new Rt(t,this.errorFactory))},t}(),Rt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.errorFactory=n,r.hasValue=!1,r}return r.C6(e,t),e.prototype._next=function(t){this.hasValue=!0,this.destination.next(t)},e.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var t=void 0;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)},e}(d.v);function Ft(){return new kt.G}var zt=n(4833);function Dt(t){return function(e){return 0===t?(0,zt.I)():e.lift(new Wt(t))}}var Wt=function(){function t(t){if(this.total=t,this.total<0)throw new At.k}return t.prototype.call=function(t,e){return e.subscribe(new Mt(t,this.total))},t}(),Mt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.C6(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(d.v);function Lt(t,e){if(t<0)throw new At.k;var n=arguments.length>=2;return function(r){return r.pipe((0,jt.p)((function(e,n){return n===t})),Dt(1),n?st(e):Bt((function(){return new At.k})))}}var Ut=n(8927);function qt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return(0,q.x)(e,Ut.of.apply(void 0,t))}}function Yt(t,e){return function(n){return n.lift(new Ht(t,e,n))}}var Ht=function(){function t(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}return t.prototype.call=function(t,e){return e.subscribe(new $t(t,this.predicate,this.thisArg,this.source))},t}(),$t=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.predicate=n,o.thisArg=r,o.source=i,o.index=0,o.thisArg=r||o,o}return r.C6(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(t){return void this.destination.error(t)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(d.v);function Zt(){return function(t){return t.lift(new Gt)}}var Gt=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Jt(t))},t}(),Jt=function(t){function e(e){var n=t.call(this,e)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return r.C6(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add((0,i.tS)(t,new i.zA(this))))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(i.gn),Kt=n(8100);function Xt(t,e){return e?function(n){return n.pipe(Xt((function(n,r){return(0,L.H)(t(n,r)).pipe((0,Kt.T)((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new Qt(t))}}var Qt=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new te(t,this.project))},t}(),te=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}return r.C6(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.hasSubscription=!0,this._innerSub(e)},e.prototype._innerSub=function(t){var e=new i.zA(this),n=this.destination;n.add(e);var r=(0,i.tS)(t,e);r!==e&&n.add(r)},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(i.gn);function ee(t,e,n){return void 0===e&&(e=Number.POSITIVE_INFINITY),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(r){return r.lift(new ne(t,e,n))}}var ne=function(){function t(t,e,n){this.project=t,this.concurrent=e,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new re(t,this.project,this.concurrent,this.scheduler))},t}(),re=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.project=n,o.concurrent=r,o.scheduler=i,o.index=0,o.active=0,o.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(o.buffer=[]),o}return r.C6(e,t),e.dispatch=function(t){var e=t.subscriber,n=t.result,r=t.value,i=t.index;e.subscribeToProjection(n,r,i)},e.prototype._next=function(t){var n=this.destination;if(n.closed)this._complete();else{var r=this.index++;if(this.active<this.concurrent){n.next(t);try{var i=(0,this.project)(t,r);if(this.scheduler){var o={subscriber:this,result:i,value:t,index:r};this.destination.add(this.scheduler.schedule(e.dispatch,0,o))}else this.subscribeToProjection(i,t,r)}catch(t){n.error(t)}}else this.buffer.push(t)}},e.prototype.subscribeToProjection=function(t,e,n){this.active++,this.destination.add((0,i.tS)(t,new i.zA(this)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this._next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t&&t.length>0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(i.gn);function ie(t){return function(e){return e.lift(new oe(t))}}var oe=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new se(t,this.callback))},t}(),se=function(t){function e(e,n){var r=t.call(this,e)||this;return r.add(new I.y(n)),r}return r.C6(e,t),e}(d.v);function ue(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new ce(t,n,!1,e))}}var ce=function(){function t(t,e,n,r){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=r}return t.prototype.call=function(t,e){return e.subscribe(new ae(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),ae=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.predicate=n,s.source=r,s.yieldIndex=i,s.thisArg=o,s.index=0,s}return r.C6(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,r=this.index++;try{e.call(n||this,t,r,this.source)&&this.notifyComplete(this.yieldIndex?r:t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(d.v);function he(t,e){return function(n){return n.lift(new ce(t,n,!0,e))}}var le=n(1015);function fe(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?(0,jt.p)((function(e,n){return t(e,n,r)})):le.D,Dt(1),n?st(e):Bt((function(){return new kt.G})))}}var pe=n(3108);function de(){return function(t){return t.lift(new be)}}var be=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ve(t))},t}(),ve=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.C6(e,t),e.prototype._next=function(t){},e}(d.v);function ye(){return function(t){return t.lift(new we)}}var we=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new me(t))},t}(),me=function(t){function e(e){return t.call(this,e)||this}return r.C6(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(d.v);function xe(t){return function(e){return 0===t?(0,zt.I)():e.lift(new ge(t))}}var ge=function(){function t(t){if(this.total=t,this.total<0)throw new At.k}return t.prototype.call=function(t,e){return e.subscribe(new _e(t,this.total))},t}(),_e=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.ring=new Array,r.count=0,r}return r.C6(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,r=this.count++;e.length<n?e.push(t):e[r%n]=t},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i<n;i++){var o=e++%n;t.next(r[o])}t.complete()},e}(d.v);function Se(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?(0,jt.p)((function(e,n){return t(e,n,r)})):le.D,xe(1),n?st(e):Bt((function(){return new kt.G})))}}function Ce(t){return function(e){return e.lift(new Ee(t))}}var Ee=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new Te(t,this.value))},t}(),Te=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return r.C6(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(d.v);function Ie(){return function(t){return t.lift(new Ne)}}var Ne=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Oe(t))},t}(),Oe=function(t){function e(e){return t.call(this,e)||this}return r.C6(e,t),e.prototype._next=function(t){this.destination.next(ht.E.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(ht.E.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(ht.E.createComplete()),t.complete()},e}(d.v);function Ve(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new Ae(t,e,n))}}var Ae=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new je(t,this.accumulator,this.seed,this.hasSeed))},t}(),je=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}return r.C6(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(d.v),ke=n(6833);function Be(t,e){return arguments.length>=2?function(n){return(0,ke.F)(Ve(t,e),xe(1),st(e))(n)}:function(e){return(0,ke.F)(Ve((function(e,n,r){return t(e,n,r+1)})),xe(1))(e)}}function Pe(t){return Be("function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}var Re=n(6148);function Fe(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Re.h.apply(void 0,[e].concat(t)))}}var ze=n(6723);function De(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?(0,$.ZZ)((function(){return t}),e,n):("number"==typeof e&&(n=e),(0,$.ZZ)((function(){return t}),n))}function We(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(r){return r.lift(new Me(t,e,n))}}var Me=function(){function t(t,e,n){this.accumulator=t,this.seed=e,this.concurrent=n}return t.prototype.call=function(t,e){return e.subscribe(new Le(t,this.accumulator,this.seed,this.concurrent))},t}(),Le=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o.acc=r,o.concurrent=i,o.hasValue=!1,o.hasCompleted=!1,o.buffer=[],o.active=0,o.index=0,o}return r.C6(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,n=this.destination,r=void 0;try{r=(0,this.accumulator)(this.acc,t,e)}catch(t){return n.error(t)}this.active++,this._innerSub(r)}else this.buffer.push(t)},e.prototype._innerSub=function(t){var e=new i.zA(this),n=this.destination;n.add(e);var r=(0,i.tS)(t,e);r!==e&&n.add(r)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},e.prototype.notifyNext=function(t){var e=this.destination;this.acc=t,this.hasValue=!0,e.next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(i.gn);function Ue(t){return Be("function"==typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t<e?t:e})}var qe=n(4491);function Ye(t,e){return function(n){var r;if(r="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new He(r,e));var i=Object.create(n,qe.f);return i.source=n,i.subjectFactory=r,i}}var He=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),i=n(r).subscribe(t);return i.add(e.subscribe(r)),i},t}(),$e=n(3947);function Ze(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&(0,M.c)(t[0])&&(t=t[0]),function(e){return e.lift(new Ge(t))}}var Ge=function(){function t(t){this.nextSources=t}return t.prototype.call=function(t,e){return e.subscribe(new Je(t,this.nextSources))},t}(),Je=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.nextSources=n,r}return r.C6(e,t),e.prototype.notifyError=function(){this.subscribeToNextSource()},e.prototype.notifyComplete=function(){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe()},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();if(t){var e=new i.zA(this),n=this.destination;n.add(e);var r=(0,i.tS)(t,e);r!==e&&n.add(r)}else this.destination.complete()},e}(i.gn);function Ke(){return function(t){return t.lift(new Xe)}}var Xe=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Qe(t))},t}(),Qe=function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}return r.C6(e,t),e.prototype._next=function(t){var e;this.hasPrev?e=[this.prev,t]:this.hasPrev=!0,this.prev=t,e&&this.destination.next(e)},e}(d.v),tn=n(3428);function en(t,e){return function(n){return[(0,jt.p)(t,e)(n),(0,jt.p)((0,tn.A)(t,e))(n)]}}function nn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return(0,Kt.T)(function(t,e){return function(n){for(var r=n,i=0;i<e;i++){var o=null!=r?r[t[i]]:void 0;if(void 0===o)return;r=o}return r}}(t,n))(e)}}var rn=n(6988);function on(t){return t?Ye((function(){return new rn.B7}),t):Ye(new rn.B7)}var sn=n(2430);function un(t){return function(e){return Ye(new sn.t(t))(e)}}var cn=n(1934);function an(){return function(t){return Ye(new cn.h)(t)}}var hn=n(8977);function ln(t,e,n,r){n&&"function"!=typeof n&&(r=n);var i="function"==typeof n?n:void 0,o=new hn.m(t,e,r);return function(t){return Ye((function(){return o}),i)(t)}}var fn=n(8071);function pn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return 1===t.length&&(0,M.c)(t[0])&&(t=t[0]),e.lift.call(fn.O4.apply(void 0,[e].concat(t)))}}function dn(t){return void 0===t&&(t=-1),function(e){return 0===t?(0,zt.I)():t<0?e.lift(new bn(-1,e)):e.lift(new bn(t-1,e))}}var bn=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new vn(t,this.count,this.source))},t}(),vn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.C6(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,n=this.count;if(0===n)return t.prototype.complete.call(this);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(d.v);function yn(t){return function(e){return e.lift(new wn(t))}}var wn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new mn(t,this.notifier,e))},t}(),mn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i.sourceIsBeingSubscribedTo=!0,i}return r.C6(e,t),e.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new rn.B7;try{e=(0,this.notifier)(this.notifications)}catch(e){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=(0,i.tS)(e,new i.zA(this))},e}(i.gn);function xn(t){return void 0===t&&(t=-1),function(e){return e.lift(new gn(t,e))}}var gn=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new _n(t,this.count,this.source))},t}(),_n=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.C6(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return t.prototype.error.call(this,e);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(d.v);function Sn(t){return function(e){return e.lift(new Cn(t,e))}}var Cn=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new En(t,this.notifier,this.source))},t}(),En=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i}return r.C6(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,r=this.retries,o=this.retriesSubscription;if(r)this.errors=void 0,this.retriesSubscription=void 0;else{n=new rn.B7;try{r=(0,this.notifier)(n)}catch(e){return t.prototype.error.call(this,e)}o=(0,i.tS)(r,new i.zA(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=o,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype.notifyNext=function(){var t=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=t,this.source.subscribe(this)},e}(i.gn),Tn=n(1764);function In(t){return function(e){return e.lift(new Nn(t))}}var Nn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new On(t),r=e.subscribe(n);return r.add((0,i.tS)(this.notifier,new i.zA(n))),r},t}(),On=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return r.C6(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(i.gn);function Vn(t,e){return void 0===e&&(e=c.b),function(n){return n.lift(new An(t,e))}}var An=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new jn(t,this.period,this.scheduler))},t}(),jn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.period=n,i.scheduler=r,i.hasValue=!1,i.add(r.schedule(kn,n,{subscriber:i,period:n})),i}return r.C6(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(d.v);function kn(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}function Bn(t,e){return function(n){return n.lift(new Pn(t,e))}}var Pn=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new Rn(t,this.compareTo,this.comparator))},t}(),Rn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.compareTo=n,i.comparator=r,i._a=[],i._b=[],i._oneComplete=!1,i.destination.add(n.subscribe(new Fn(e,i))),i}return r.C6(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var t=this,e=t._a,n=t._b,r=t.comparator;e.length>0&&n.length>0;){var i=e.shift(),o=n.shift(),s=!1;try{s=r?r(i,o):i===o}catch(t){this.destination.error(t)}s||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},e}(d.v),Fn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.parent=n,r}return r.C6(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(d.v);function zn(){return new rn.B7}function Dn(){return function(t){return(0,Tn.B)()(Ye(zn)(t))}}function Wn(t,e,n){var r;return r=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,r=t.bufferSize,i=void 0===r?Number.POSITIVE_INFINITY:r,o=t.windowTime,s=void 0===o?Number.POSITIVE_INFINITY:o,u=t.refCount,c=t.scheduler,a=0,h=!1,l=!1;return function(t){var r;a++,!e||h?(h=!1,e=new hn.m(i,s,c),r=e.subscribe(this),n=t.subscribe({next:function(t){e.next(t)},error:function(t){h=!0,e.error(t)},complete:function(){l=!0,n=void 0,e.complete()}}),l&&(n=void 0)):r=e.subscribe(this),this.add((function(){a--,r.unsubscribe(),r=void 0,n&&!l&&u&&0===a&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(r))}}function Mn(t){return function(e){return e.lift(new Ln(t,e))}}var Ln=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Un(t,this.predicate,this.source))},t}(),Un=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.seenValue=!1,i.index=0,i}return r.C6(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new kt.G)},e}(d.v);function qn(t){return function(e){return e.lift(new Yn(t))}}var Yn=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new Hn(t,this.total))},t}(),Hn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.C6(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(d.v);function $n(t){return function(e){return e.lift(new Zn(t))}}var Zn=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new At.k}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new d.v(t)):e.subscribe(new Gn(t,this._skipCount))},t}(),Gn=function(t){function e(e,n){var r=t.call(this,e)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}return r.C6(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n<e)this._ring[n]=t;else{var r=n%e,i=this._ring,o=i[r];i[r]=t,this.destination.next(o)}},e}(d.v);function Jn(t){return function(e){return e.lift(new Kn(t))}}var Kn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new Xn(t,this.notifier))},t}(),Xn=function(t){function e(e,n){var r=t.call(this,e)||this;r.hasValue=!1;var o=new i.zA(r);r.add(o),r.innerSubscription=o;var s=(0,i.tS)(n,o);return s!==o&&(r.add(s),r.innerSubscription=s),r}return r.C6(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e)},e.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},e.prototype.notifyComplete=function(){},e}(i.gn);function Qn(t){return function(e){return e.lift(new tr(t))}}var tr=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new er(t,this.predicate))},t}(),er=function(t){function e(e,n){var r=t.call(this,e)||this;return r.predicate=n,r.skipping=!0,r.index=0,r}return r.C6(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(t){this.destination.error(t)}},e}(d.v);function nr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return(0,m.m)(n)?(t.pop(),function(e){return(0,q.x)(t,e,n)}):function(e){return(0,q.x)(t,e)}}var rr=n(9081),ir=n(6290),or=function(t){function e(e,n,r){void 0===n&&(n=0),void 0===r&&(r=rr.I);var i=t.call(this)||this;return i.source=e,i.delayTime=n,i.scheduler=r,(!(0,ir.k)(n)||n<0)&&(i.delayTime=0),r&&"function"==typeof r.schedule||(i.scheduler=rr.I),i}return r.C6(e,t),e.create=function(t,n,r){return void 0===n&&(n=0),void 0===r&&(r=rr.I),new e(t,n,r)},e.dispatch=function(t){var e=t.source,n=t.subscriber;return this.add(e.subscribe(n))},e.prototype._subscribe=function(t){var n=this.delayTime,r=this.source;return this.scheduler.schedule(e.dispatch,n,{source:r,subscriber:t})},e}(bt.c);function sr(t,e){return void 0===e&&(e=0),function(n){return n.lift(new ur(t,e))}}var ur=function(){function t(t,e){this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return new or(e,this.delay,this.scheduler).subscribe(t)},t}();function cr(t,e){return"function"==typeof e?function(n){return n.pipe(cr((function(n,r){return(0,L.H)(t(n,r)).pipe((0,Kt.T)((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new ar(t))}}var ar=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new hr(t,this.project))},t}(),hr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}return r.C6(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e)},e.prototype._innerSub=function(t){var e=this.innerSubscription;e&&e.unsubscribe();var n=new i.zA(this),r=this.destination;r.add(n),this.innerSubscription=(0,i.tS)(t,n),this.innerSubscription!==n&&r.add(this.innerSubscription)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=void 0},e.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t){this.destination.next(t)},e}(i.gn);function lr(){return cr(le.D)}function fr(t,e){return e?cr((function(){return t}),e):cr((function(){return t}))}function pr(t){return function(e){return e.lift(new dr(t))}}var dr=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new br(t),r=(0,i.tS)(this.notifier,new i.zA(n));return r&&!n.seenValue?(n.add(r),e.subscribe(n)):n},t}(),br=function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}return r.C6(e,t),e.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(i.gn);function vr(t,e){return void 0===e&&(e=!1),function(n){return n.lift(new yr(t,e))}}var yr=function(){function t(t,e){this.predicate=t,this.inclusive=e}return t.prototype.call=function(t,e){return e.subscribe(new wr(t,this.predicate,this.inclusive))},t}(),wr=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.inclusive=r,i.index=0,i}return r.C6(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(t){return void n.error(t)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())},e}(d.v),mr=n(1193),xr=n(9029);function gr(t,e,n){return function(r){return r.lift(new _r(t,e,n))}}var _r=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new Sr(t,this.nextOrObserver,this.error,this.complete))},t}(),Sr=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o._tapNext=mr.l,o._tapError=mr.l,o._tapComplete=mr.l,o._tapError=r||mr.l,o._tapComplete=i||mr.l,(0,xr.T)(n)?(o._context=o,o._tapNext=n):n&&(o._context=n,o._tapNext=n.next||mr.l,o._tapError=n.error||mr.l,o._tapComplete=n.complete||mr.l),o}return r.C6(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(d.v),Cr={leading:!0,trailing:!1};function Er(t,e){return void 0===e&&(e=Cr),function(n){return n.lift(new Tr(t,!!e.leading,!!e.trailing))}}var Tr=function(){function t(t,e,n){this.durationSelector=t,this.leading=e,this.trailing=n}return t.prototype.call=function(t,e){return e.subscribe(new Ir(t,this.durationSelector,this.leading,this.trailing))},t}(),Ir=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.destination=e,o.durationSelector=n,o._leading=r,o._trailing=i,o._hasValue=!1,o}return r.C6(e,t),e.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},e.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=void 0},e.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=(0,i.tS)(e,new i.zA(this)))},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(t){return this.destination.error(t),null}},e.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=void 0,e&&this.send()},e.prototype.notifyNext=function(){this.throttlingDone()},e.prototype.notifyComplete=function(){this.throttlingDone()},e}(i.gn);function Nr(t,e,n){return void 0===e&&(e=c.b),void 0===n&&(n=Cr),function(r){return r.lift(new Or(t,e,n.leading,n.trailing))}}var Or=function(){function t(t,e,n,r){this.duration=t,this.scheduler=e,this.leading=n,this.trailing=r}return t.prototype.call=function(t,e){return e.subscribe(new Vr(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),Vr=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.duration=n,s.scheduler=r,s.leading=i,s.trailing=o,s._hasTrailingValue=!1,s._trailingValue=null,s}return r.C6(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(Ar,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(d.v);function Ar(t){t.subscriber.clearThrottle()}var jr=n(560);function kr(t){return void 0===t&&(t=c.b),function(e){return(0,jr.v)((function(){return e.pipe(Ve((function(e,n){var r=e.current;return{value:n,current:t.now(),last:r}}),{current:t.now(),value:void 0,last:void 0}),(0,Kt.T)((function(t){var e=t.current,n=t.last,r=t.value;return new Br(r,e-n)})))}))}}var Br=function(){return function(t,e){this.value=t,this.interval=e}}(),Pr=n(34);function Rr(t,e,n){return void 0===n&&(n=c.b),function(r){var i=at(t),o=i?+t-n.now():Math.abs(t);return r.lift(new Fr(o,i,e,n))}}var Fr=function(){function t(t,e,n,r){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new zr(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),zr=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.absoluteTimeout=n,s.waitFor=r,s.withObservable=i,s.scheduler=o,s.scheduleTimeout(),s}return r.C6(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add((0,i.tS)(e,new i.zA(t)))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},e}(i.gn),Dr=n(7404);function Wr(t,e){return void 0===e&&(e=c.b),Rr(t,(0,Dr.$)(new Pr.M),e)}function Mr(t){return void 0===t&&(t=c.b),(0,Kt.T)((function(e){return new Lr(e,t.now())}))}var Lr=function(){return function(t,e){this.value=t,this.timestamp=e}}();function Ur(t,e,n){return 0===n?[e]:(t.push(e),t)}function qr(){return Be(Ur,[])}function Yr(t){return function(e){return e.lift(new Hr(t))}}var Hr=function(){function t(t){this.windowBoundaries=t}return t.prototype.call=function(t,e){var n=new $r(t),r=e.subscribe(n);return r.closed||n.add((0,i.tS)(this.windowBoundaries,new i.zA(n))),r},t}(),$r=function(t){function e(e){var n=t.call(this,e)||this;return n.window=new rn.B7,e.next(n.window),n}return r.C6(e,t),e.prototype.notifyNext=function(){this.openWindow()},e.prototype.notifyError=function(t){this._error(t)},e.prototype.notifyComplete=function(){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,n=this.window=new rn.B7;e.next(n)},e}(i.gn);function Zr(t,e){return void 0===e&&(e=0),function(n){return n.lift(new Gr(t,e))}}var Gr=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e}return t.prototype.call=function(t,e){return e.subscribe(new Jr(t,this.windowSize,this.startWindowEvery))},t}(),Jr=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.destination=e,i.windowSize=n,i.startWindowEvery=r,i.windows=[new rn.B7],i.count=0,e.next(i.windows[0]),i}return r.C6(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,i=this.windows,o=i.length,s=0;s<o&&!this.closed;s++)i[s].next(t);var u=this.count-r+1;if(u>=0&&u%e===0&&!this.closed&&i.shift().complete(),++this.count%e===0&&!this.closed){var c=new rn.B7;i.push(c),n.next(c)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(d.v);function Kr(t){var e=c.b,n=null,r=Number.POSITIVE_INFINITY;return(0,m.m)(arguments[3])&&(e=arguments[3]),(0,m.m)(arguments[2])?e=arguments[2]:(0,ir.k)(arguments[2])&&(r=Number(arguments[2])),(0,m.m)(arguments[1])?e=arguments[1]:(0,ir.k)(arguments[1])&&(n=Number(arguments[1])),function(i){return i.lift(new Xr(t,n,r,e))}}var Xr=function(){function t(t,e,n,r){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new ti(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),Qr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return r.C6(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(rn.B7),ti=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;s.destination=e,s.windowTimeSpan=n,s.windowCreationInterval=r,s.maxWindowSize=i,s.scheduler=o,s.windows=[];var u=s.openWindow();if(null!==r&&r>=0){var c={subscriber:s,window:u,context:null},a={windowTimeSpan:n,windowCreationInterval:r,subscriber:s,scheduler:o};s.add(o.schedule(ri,n,c)),s.add(o.schedule(ni,r,a))}else{var h={subscriber:s,window:u,windowTimeSpan:n};s.add(o.schedule(ei,n,h))}return s}return r.C6(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,r=0;r<n;r++){var i=e[r];i.closed||(i.next(t),i.numberOfNextedValues>=this.maxWindowSize&&this.closeWindow(i))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new Qr;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},e}(d.v);function ei(t){var e=t.subscriber,n=t.windowTimeSpan,r=t.window;r&&e.closeWindow(r),t.window=e.openWindow(),this.schedule(t,n)}function ni(t){var e=t.windowTimeSpan,n=t.subscriber,r=t.scheduler,i=t.windowCreationInterval,o=n.openWindow(),s=this,u={action:s,subscription:null},c={subscriber:n,window:o,context:u};u.subscription=r.schedule(ri,e,c),s.add(u.subscription),s.schedule(t,i)}function ri(t){var e=t.subscriber,n=t.window,r=t.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),e.closeWindow(n)}function ii(t,e){return function(n){return n.lift(new oi(t,e))}}var oi=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new si(t,this.openings,this.closingSelector))},t}(),si=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.openings=n,i.closingSelector=r,i.contexts=[],i.add(i.openSubscription=(0,N.F)(i,n,n)),i}return r.C6(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,r=0;r<n;r++)e[r].window.next(t)},e.prototype._error=function(e){var n=this.contexts;if(this.contexts=null,n)for(var r=n.length,i=-1;++i<r;){var o=n[i];o.window.error(e),o.subscription.unsubscribe()}t.prototype._error.call(this,e)},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var n=e.length,r=-1;++r<n;){var i=e[r];i.window.complete(),i.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,n=-1;++n<e;){var r=t[n];r.window.unsubscribe(),r.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,e,n,r,i){if(t===this.openings){var o=void 0;try{o=(0,this.closingSelector)(e)}catch(t){return this.error(t)}var s=new rn.B7,u=new I.y,c={window:s,subscription:u};this.contexts.push(c);var a=(0,N.F)(this,o,c);a.closed?this.closeWindow(this.contexts.length-1):(a.context=c,u.add(a)),this.destination.next(s)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,n=e[t],r=n.window,i=n.subscription;e.splice(t,1),r.complete(),i.unsubscribe()}},e}(O.E);function ui(t){return function(e){return e.lift(new ci(t))}}var ci=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new ai(t,this.closingSelector))},t}(),ai=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.closingSelector=n,r.openWindow(),r}return r.C6(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.openWindow(i)},e.prototype.notifyError=function(t){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var n,r=this.window=new rn.B7;this.destination.next(r);try{n=(0,this.closingSelector)()}catch(t){return this.destination.error(t),void this.window.error(t)}this.add(this.closingNotification=(0,N.F)(this,n))},e}(O.E);function hi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n;"function"==typeof t[t.length-1]&&(n=t.pop());var r=t;return e.lift(new li(r,n))}}var li=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new fi(t,this.observables,this.project))},t}(),fi=function(t){function e(e,n,r){var i=t.call(this,e)||this;i.observables=n,i.project=r,i.toRespond=[];var o=n.length;i.values=new Array(o);for(var s=0;s<o;s++)i.toRespond.push(s);for(s=0;s<o;s++){var u=n[s];i.add((0,N.F)(i,u,void 0,s))}return i}return r.C6(e,t),e.prototype.notifyNext=function(t,e,n){this.values[n]=e;var r=this.toRespond;if(r.length>0){var i=r.indexOf(n);-1!==i&&r.splice(i,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(O.E),pi=n(4219);function di(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(pi.yU.apply(void 0,[e].concat(t)))}}function bi(t){return function(e){return e.lift(new pi.ee(t))}}},5890:(t,e,n)=>{n.d(e,{V:()=>o});var r=n(9664),i=n(9147);function o(t,e){return new r.c((function(n){var r=new i.y,o=0;return r.add(e.schedule((function(){o!==t.length?(n.next(t[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}},6027:(t,e,n)=>{n.d(e,{R:()=>i});var r=n(7272),i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return r.C6(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,n){return t.call(this)||this}return r.C6(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(n(9147).y))},6148:(t,e,n)=>{n.d(e,{h:()=>u});var r=n(9664),i=n(4576),o=n(6723),s=n(4601);function u(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,u=null,c=t[t.length-1];return(0,i.m)(c)?(u=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof c&&(n=t.pop()),null===u&&1===t.length&&t[0]instanceof r.c?t[0]:(0,o.U)(n)((0,s.c)(t,u))}},6239:(t,e,n)=>{n.d(e,{v:()=>r});var r=function(t){return function(e){for(var n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.complete()}}},6290:(t,e,n)=>{n.d(e,{k:()=>i});var r=n(252);function i(t){return!(0,r.c)(t)&&t-parseFloat(t)+1>=0}},6346:(t,e,n)=>{n.d(e,{E:()=>i,b:()=>o});var r=n(6027),i=new(n(4881).q)(r.R),o=i},6708:(t,e,n)=>{n.d(e,{I:()=>o});var r=n(1732),i=n(9199),o={closed:!0,next:function(t){},error:function(t){if(r.$.useDeprecatedSynchronousErrorHandling)throw t;(0,i.T)(t)},complete:function(){}}},6723:(t,e,n)=>{n.d(e,{U:()=>o});var r=n(4490),i=n(1015);function o(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),(0,r.ZZ)(i.D,t)}},6769:function(t,e,n){var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function u(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,u)}c((r=r.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.IoTizeBleCordovaPlugin=void 0;const i=n(8393),o=n(7124),s=n(3229),u=n(4046),c=n(5758),a=n(5758),h=n(2063);function l(t){try{return(0,i.hexStringToBuffer)(t)}catch(e){throw h.CordovaBLEError.invalidNativeCallResult(t,e)}}function f(t){return"object"==typeof t&&t.code&&t.message?h.CordovaBLEError.isValidErrorCode(t.code)?new h.CordovaBLEError(t.message,h.CordovaBLEError.Code[t.code]):h.CordovaBLEError.invalidErrorCode(t):h.CordovaBLEError.invalidErrorResult(t)}e.IoTizeBleCordovaPlugin=class{checkAvailable(){return this.execSingleResult("checkAvailable",[])}requestEnableBle(){return this.execSingleResult("enable",[])}startScan(t){return this.execMultipleResult("startScan",[JSON.stringify(t)])}stopScan(){return this.execSingleResult("stopScan",[])}connect(t,e=!0){return this.askBleEnable(e).pipe((0,c.switchMap)((()=>this.execMultipleResult("connect",[t]).pipe((0,a.map)((t=>(t in s.ConnectionState||console.warn(`Plugin native code returned an invalid connection state: "${t}".`),(0,o.safeEnumValue)(s.ConnectionState,t))))))))}askBleEnable(t){return(0,u.defer)((()=>r(this,void 0,void 0,(function*(){t&&((yield this.checkAvailable())||(yield this.requestEnableBle()))}))))}requestMTU(t,e){return this.execSingleResult("requestMTU",[t,e])}connectAndDiscoverTapServices(t,e=!0){return this.askBleEnable(e).pipe((0,c.switchMap)((()=>this.execMultipleResult("connectAndDiscoverTapServices",[t]).pipe((0,a.map)((t=>(t in s.ConnectionState||console.warn(`Plugin native code returned an invalid connection state: "${t}".`),(0,o.safeEnumValue)(s.ConnectionState,t))))))))}disConnect(t){return this.execSingleResult("disConnect",[t])}close(t){return this.execSingleResult("close",[t])}isConnected(t){return this.execSingleResult("isConnected",[t])}send(t,e){return r(this,void 0,void 0,(function*(){return l(yield this.execSingleResult("sendRequest",[t,(0,i.bufferToHexString)(e)]))}))}getLastError(){return this.execSingleResult("getLastError",[])}characteristicStartNotification(t,e,n){return this.execSingleResult("characteristicStartNotification",[t,e,n])}characteristicChanged(t,e,n){return this.execMultipleResult("characteristicChanged",[t,e,n]).pipe((0,a.map)((t=>l(t))))}characteristicStopNotification(t,e,n){return this.execSingleResult("characteristicStopNotification",[t,e,n])}characteristicReadValue(t,e,n){return r(this,void 0,void 0,(function*(){return l(yield this.execSingleResult("characteristicRead",[t,e,n]))}))}characteristicWrite(t,e,n,r){return this.execSingleResult("characteristicWrite",[t,e,n,(0,i.bufferToHexString)(r)])}characteristicWriteWithoutResponse(t,e,n,r){return this.execSingleResult("characteristicWriteWithoutResponse",[t,e,n,(0,i.bufferToHexString)(r)])}discoverServices(t){return r(this,void 0,void 0,(function*(){return yield this.execSingleResult("discoverServices",[t])}))}execSingleResult(t,e){return new Promise(((n,r)=>{cordova.exec(n,(t=>{r(f(t))}),"BLECom",t,e)}))}execMultipleResult(t,e){const n=new u.Subject;return cordova.exec((t=>{n.next(t)}),(t=>{n.error(f(t))}),"BLECom",t,e),n.asObservable()}}},6833:(t,e,n)=>{n.d(e,{F:()=>i,m:()=>o});var r=n(1015);function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t)}function o(t){return 0===t.length?r.D:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}},6988:(t,e,n)=>{n.d(e,{B7:()=>l,PJ:()=>h});var r=n(7272),i=n(9664),o=n(2968),s=n(9147),u=n(731),c=n(293),a=n(3089),h=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return r.C6(e,t),e}(o.v),l=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return r.C6(e,t),e.prototype[a.D]=function(){return new h(this)},e.prototype.lift=function(t){var e=new f(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new u.P;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].next(t)},e.prototype.error=function(t){if(this.closed)throw new u.P;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new u.P;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new u.P;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new u.P;return this.hasError?(t.error(this.thrownError),s.y.EMPTY):this.isStopped?(t.complete(),s.y.EMPTY):(this.observers.push(t),new c.Y(this,t))},e.prototype.asObservable=function(){var t=new i.c;return t.source=this,t},e.create=function(t,e){return new f(t,e)},e}(i.c),f=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return r.C6(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):s.y.EMPTY},e}(l)},7046:(t,e,n)=>{n.d(e,{H:()=>s});var r=n(9664),i=n(8777),o=n(1413);function s(t,e){return e?(0,o.c)(t,e):t instanceof r.c?t:new r.c((0,i.i)(t))}},7069:(t,e,n)=>{n.d(e,{E:()=>i});var r=n(7272),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.C6(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(n(2968).v)},7124:(t,e,n)=>{function r(t,e,n=new WeakMap){if(t===e)return!0;if("object"==typeof t&&null!=t&&"object"==typeof e&&null!=e){const i=n.get(t);if(void 0!==i)return i;if(n.set(t,!0),Object.keys(t).length!==Object.keys(e).length)return n.set(t,!1),!1;for(const i in t){if(!e.hasOwnProperty(i))return n.set(t,!1),!1;if(!r(t[i],e[i],n))return!1}return n.set(t,!0),!0}return!1}function i(t){return new Promise(((e,n)=>{setTimeout((()=>{e()}),t)}))}function o(t,e){if(!(e in t))throw new Error(`Enum key "${e}" does not exist`);return t[e]}function s(t){let e=Object.keys(t);return e=e.filter((e=>"number"==typeof t[e]||isNaN(parseInt(e,10))&&isNaN(parseInt(t[e],10)))),0===e.length&&(e=Object.keys(t)),e}function u(t){return s(t).map((e=>t[e]))}function c(t){throw new Error(`Internal error: ${t}`)}n.r(e),n.d(e,{assertError:()=>c,deepCopy:()=>a,deepEqual:()=>r,listEnumKeys:()=>s,listEnumValues:()=>u,safeEnumValue:()=>o,sleep:()=>i});const a=(t,e=new WeakMap)=>{if(null===t)return t;if(t instanceof Date)return new Date(t.getTime());if(e.has(t))return e.get(t);if(t instanceof Array){const n=[];return e.set(t,n),t.forEach((t=>{n.push(t)})),n.map((t=>a(t,e)))}if(t instanceof Uint8Array)return new Uint8Array(t);if("object"==typeof t){const n=Object.assign({},t);return e.set(t,n),Object.keys(n).forEach((t=>{n[t]=a(n[t],e)})),n}return t}},7125:(t,e,n)=>{n.d(e,{K:()=>i});var r=n(6723);function i(){return(0,r.U)(1)}},7272:(t,e,n)=>{n.d(e,{C6:()=>i});var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}},7404:(t,e,n)=>{n.d(e,{$:()=>i});var r=n(9664);function i(t,e){return e?new r.c((function(n){return e.schedule(o,0,{error:t,subscriber:n})})):new r.c((function(e){return e.error(t)}))}function o(t){var e=t.error;t.subscriber.error(e)}},8071:(t,e,n)=>{n.d(e,{O4:()=>c});var r=n(7272),i=n(252),o=n(4601),s=n(7069),u=n(538);function c(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!(0,i.c)(t[0]))return t[0];t=t[0]}return(0,o.c)(t,void 0).lift(new a)}var a=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new h(t))},t}(),h=function(t){function e(e){var n=t.call(this,e)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return r.C6(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var n=0;n<e&&!this.hasFirst;n++){var r=t[n],i=(0,u.F)(this,r,void 0,n);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}},e.prototype.notifyNext=function(t,e,n){if(!this.hasFirst){this.hasFirst=!0;for(var r=0;r<this.subscriptions.length;r++)if(r!==n){var i=this.subscriptions[r];i.unsubscribe(),this.remove(i)}this.subscriptions=null}this.destination.next(e)},e}(s.E)},8100:(t,e,n)=>{n.d(e,{T:()=>o});var r=n(7272),i=n(2968);function o(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new s(t,e))}}var s=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.project,this.thisArg))},t}(),u=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return r.C6(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(i.v)},8393:(t,e,n)=>{function r(t){const e=new Uint8Array(t.length);for(let n=0,r=t.length;n<r;n++)e[n]=t.charCodeAt(n);return e}function i(t){return t.buffer.slice(t.byteOffset,t.byteLength+t.byteOffset)}function o(t){return t?Array.prototype.map.call(t,(t=>("00"+t.toString(16)).slice(-2))).join("").toUpperCase():""}function s(t){return Array.prototype.map.call(t,(t=>{let e="";for(let n=7;n>=0;n--)e+=(1<<n&t)>0?"1":"0";return e})).join("")}function u(t){let e,n=(t=t.trim()).startsWith("0x")?2:0;const r=[];for(;n<t.length;n++)switch(t[n]){case" ":case"\t":continue;default:if(void 0!==e){const i=parseInt(e+t[n],16);if(isNaN(i))throw new Error(`Invalid hexadecimal string format for input string "${t}"`);r.push(i),e=void 0}else e=t[n]}return void 0!==e&&r.push(parseInt(e,16)),Uint8Array.from(r)}function c(t){return String.fromCharCode.apply(null,t)}n.r(e),n.d(e,{asciiStringToByteBuffer:()=>r,bufferToAsciiString:()=>c,bufferToBinaryString:()=>s,bufferToHexString:()=>o,hexStringToBuffer:()=>u,typedArrayToBuffer:()=>i})},8777:(t,e,n)=>{n.d(e,{i:()=>h});var r=n(6239),i=n(9199),o=n(3991),s=n(3656),u=n(9923),c=n(1164),a=n(806),h=function(t){if(t&&"function"==typeof t[s.s])return h=t,function(t){var e=h[s.s]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if((0,u.X)(t))return(0,r.v)(t);if((0,c.y)(t))return n=t,function(t){return n.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,i.T),t};if(t&&"function"==typeof t[o.lJ])return e=t,function(t){for(var n=e[o.lJ]();;){var r=void 0;try{r=n.next()}catch(e){return t.error(e),t}if(r.done){t.complete();break}if(t.next(r.value),t.closed)break}return"function"==typeof n.return&&t.add((function(){n.return&&n.return()})),t};var e,n,h,l=(0,a.G)(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+l+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},8890:(t,e,n)=>{n.d(e,{ZS:()=>l,zV:()=>h});var r=n(7272),i=n(4576),o=n(252),s=n(7069),u=n(538),c=n(4601),a={};function h(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=void 0,r=void 0;return(0,i.m)(t[t.length-1])&&(r=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&(0,o.c)(t[0])&&(t=t[0]),(0,c.c)(t,r).lift(new l(n))}var l=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.resultSelector))},t}(),f=function(t){function e(e,n){var r=t.call(this,e)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return r.C6(e,t),e.prototype._next=function(t){this.values.push(a),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var r=t[n];this.add((0,u.F)(this,r,void 0,n))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n){var r=this.values,i=r[n],o=this.toRespond?i===a?--this.toRespond:this.toRespond:0;r[n]=e,0===o&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()))},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(s.E)},8927:(t,e,n)=>{n.d(e,{of:()=>s});var r=n(4576),i=n(4601),o=n(5890);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return(0,r.m)(n)?(t.pop(),(0,o.V)(t,n)):(0,i.c)(t)}},8977:(t,e,n)=>{n.d(e,{m:()=>h});var r=n(7272),i=n(6988),o=n(464),s=n(9147),u=n(3947),c=n(731),a=n(293),h=function(t){function e(e,n,r){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=t.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=e<1?1:e,i._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return r.C6(e,t),e.prototype.nextInfiniteTimeWindow=function(e){if(!this.isStopped){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift()}t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this.isStopped||(this._events.push(new l(this._getNow(),e)),this._trimBufferThenGetEvents()),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new c.P;if(this.isStopped||this.hasError?e=s.y.EMPTY:(this.observers.push(t),e=new a.Y(this,t)),i&&t.add(t=new u.YZ(t,i)),n)for(var h=0;h<o&&!t.closed;h++)t.next(r[h]);else for(h=0;h<o&&!t.closed;h++)t.next(r[h].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||o.g).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,r=this._events,i=r.length,o=0;o<i&&!(t-r[o].time<n);)o++;return i>e&&(o=Math.max(o,i-e)),o>0&&r.splice(0,o),r},e}(i.B7),l=function(){return function(t,e){this.time=t,this.value=e}}()},9029:(t,e,n)=>{function r(t){return"function"==typeof t}n.d(e,{T:()=>r})},9081:(t,e,n)=>{n.d(e,{I:()=>h,$:()=>a});var r=n(7272),i=1,o=function(){return Promise.resolve()}(),s={};function u(t){return t in s&&(delete s[t],!0)}var c=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.C6(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=(c=e.flush.bind(e,null),a=i++,s[a]=!0,o.then((function(){return u(a)&&c()})),a)));var c,a},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(u(n),e.scheduled=void 0)},e}(n(6027).R),a=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.C6(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(n(4881).q))(c),h=a},9147:(t,e,n)=>{n.d(e,{y:()=>u});var r=n(252),i=n(806),o=n(9029),s=n(9857),u=function(){function t(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var e;if(!this.closed){var n=this,u=n._parentOrParents,a=n._ctorUnsubscribe,h=n._unsubscribe,l=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,u instanceof t)u.remove(this);else if(null!==u)for(var f=0;f<u.length;++f)u[f].remove(this);if((0,o.T)(h)){a&&(this._unsubscribe=void 0);try{h.call(this)}catch(t){e=t instanceof s.Z?c(t.errors):[t]}}if((0,r.c)(l)){f=-1;for(var p=l.length;++f<p;){var d=l[f];if((0,i.G)(d))try{d.unsubscribe()}catch(t){e=e||[],t instanceof s.Z?e=e.concat(c(t.errors)):e.push(t)}}}if(e)throw new s.Z(e)}},t.prototype.add=function(e){var n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var i=n._parentOrParents;if(null===i)n._parentOrParents=this;else if(i instanceof t){if(i===this)return n;n._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return n;i.push(this)}var o=this._subscriptions;return null===o?this._subscriptions=[n]:o.push(n),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.EMPTY=((e=new t).closed=!0,e),t}();function c(t){return t.reduce((function(t,e){return t.concat(e instanceof s.Z?e.errors:e)}),[])}},9199:(t,e,n)=>{function r(t){setTimeout((function(){throw t}),0)}n.d(e,{T:()=>r})},9610:(t,e,n)=>{n.d(e,{p:()=>o});var r=n(7272),i=n(2968);function o(t,e){return function(n){return n.lift(new s(t,e))}}var s=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.predicate,this.thisArg))},t}(),u=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return r.C6(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(i.v)},9664:(t,e,n)=>{n.d(e,{c:()=>h});var r=n(1075),i=n(2968),o=n(3089),s=n(6708),u=n(3656),c=n(6833),a=n(1732),h=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,u=function(t,e,n){if(t){if(t instanceof i.v)return t;if(t[o.D])return t[o.D]()}return t||e||n?new i.v(t,e,n):new i.v(s.I)}(t,e,n);if(r?u.add(r.call(u,this.source)):u.add(this.source||a.$.useDeprecatedSynchronousErrorHandling&&!u.syncErrorThrowable?this._subscribe(u):this._trySubscribe(u)),a.$.useDeprecatedSynchronousErrorHandling&&u.syncErrorThrowable&&(u.syncErrorThrowable=!1,u.syncErrorThrown))throw u.syncErrorValue;return u},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){a.$.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),(0,r.H)(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=l(e))((function(e,r){var i;i=n.subscribe((function(e){try{t(e)}catch(t){r(t),i&&i.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[u.s]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:(0,c.m)(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=l(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function l(t){if(t||(t=a.$.Promise||Promise),!t)throw new Error("no Promise impl found");return t}},9857:(t,e,n)=>{n.d(e,{Z:()=>r});var r=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}()},9923:(t,e,n)=>{n.d(e,{X:()=>r});var r=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r=n(1261);module.exports=r})();
@@ -1,14 +0,0 @@
1
- /*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation.
3
-
4
- Permission to use, copy, modify, and/or distribute this software for any
5
- purpose with or without fee is hereby granted.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
- PERFORMANCE OF THIS SOFTWARE.
14
- ***************************************************************************** */