@neurosity/sdk 7.0.0 → 7.1.0

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 (306) hide show
  1. package/dist/examples/node/accelerometer.d.ts +5 -0
  2. package/dist/examples/node/accelerometer.d.ts.map +1 -0
  3. package/dist/examples/node/accelerometer.js +12 -0
  4. package/dist/examples/node/accelerometer.js.map +1 -0
  5. package/dist/examples/node/authApiKey.d.ts +4 -0
  6. package/dist/examples/node/authApiKey.d.ts.map +1 -0
  7. package/dist/examples/node/authApiKey.js +17 -0
  8. package/dist/examples/node/authApiKey.js.map +1 -0
  9. package/dist/examples/node/authCustomToken.d.ts +4 -0
  10. package/dist/examples/node/authCustomToken.d.ts.map +1 -0
  11. package/dist/examples/node/authCustomToken.js +11 -0
  12. package/dist/examples/node/authCustomToken.js.map +1 -0
  13. package/dist/examples/node/authEmailPassword.d.ts +5 -0
  14. package/dist/examples/node/authEmailPassword.d.ts.map +1 -0
  15. package/dist/examples/node/authEmailPassword.js +12 -0
  16. package/dist/examples/node/authEmailPassword.js.map +1 -0
  17. package/dist/examples/node/authIdToken.d.ts +5 -0
  18. package/dist/examples/node/authIdToken.d.ts.map +1 -0
  19. package/dist/examples/node/authIdToken.js +12 -0
  20. package/dist/examples/node/authIdToken.js.map +1 -0
  21. package/dist/examples/node/authInheritance.d.ts +5 -0
  22. package/dist/examples/node/authInheritance.d.ts.map +1 -0
  23. package/dist/examples/node/authInheritance.js +17 -0
  24. package/dist/examples/node/authInheritance.js.map +1 -0
  25. package/dist/examples/node/autoSelectDevice.d.ts +5 -0
  26. package/dist/examples/node/autoSelectDevice.d.ts.map +1 -0
  27. package/dist/examples/node/autoSelectDevice.js +16 -0
  28. package/dist/examples/node/autoSelectDevice.js.map +1 -0
  29. package/dist/examples/node/brainwaves.d.ts +5 -0
  30. package/dist/examples/node/brainwaves.d.ts.map +1 -0
  31. package/dist/examples/node/brainwaves.js +12 -0
  32. package/dist/examples/node/brainwaves.js.map +1 -0
  33. package/dist/examples/node/calm.d.ts +5 -0
  34. package/dist/examples/node/calm.d.ts.map +1 -0
  35. package/dist/examples/node/calm.js +12 -0
  36. package/dist/examples/node/calm.js.map +1 -0
  37. package/dist/examples/node/clients.d.ts +5 -0
  38. package/dist/examples/node/clients.d.ts.map +1 -0
  39. package/dist/examples/node/clients.js +10 -0
  40. package/dist/examples/node/clients.js.map +1 -0
  41. package/dist/examples/node/createAccount.d.ts +2 -0
  42. package/dist/examples/node/createAccount.d.ts.map +1 -0
  43. package/dist/examples/node/createAccount.js +16 -0
  44. package/dist/examples/node/createAccount.js.map +1 -0
  45. package/dist/examples/node/createApiKey.d.ts +5 -0
  46. package/dist/examples/node/createApiKey.d.ts.map +1 -0
  47. package/dist/examples/node/createApiKey.js +24 -0
  48. package/dist/examples/node/createApiKey.js.map +1 -0
  49. package/dist/examples/node/createCustomToken.d.ts +5 -0
  50. package/dist/examples/node/createCustomToken.d.ts.map +1 -0
  51. package/dist/examples/node/createCustomToken.js +17 -0
  52. package/dist/examples/node/createCustomToken.js.map +1 -0
  53. package/dist/examples/node/deleteAccount.d.ts +2 -0
  54. package/dist/examples/node/deleteAccount.d.ts.map +1 -0
  55. package/dist/examples/node/deleteAccount.js +21 -0
  56. package/dist/examples/node/deleteAccount.js.map +1 -0
  57. package/dist/examples/node/focus.d.ts +5 -0
  58. package/dist/examples/node/focus.d.ts.map +1 -0
  59. package/dist/examples/node/focus.js +12 -0
  60. package/dist/examples/node/focus.js.map +1 -0
  61. package/dist/examples/node/getDevices.d.ts +2 -0
  62. package/dist/examples/node/getDevices.d.ts.map +1 -0
  63. package/dist/examples/node/getDevices.js +27 -0
  64. package/dist/examples/node/getDevices.js.map +1 -0
  65. package/dist/examples/node/haptics.d.ts +5 -0
  66. package/dist/examples/node/haptics.d.ts.map +1 -0
  67. package/dist/examples/node/haptics.js +25 -0
  68. package/dist/examples/node/haptics.js.map +1 -0
  69. package/dist/examples/node/index.d.ts +2 -0
  70. package/dist/examples/node/index.d.ts.map +1 -0
  71. package/dist/examples/node/index.js +62 -0
  72. package/dist/examples/node/index.js.map +1 -0
  73. package/dist/examples/node/kinesis.d.ts +5 -0
  74. package/dist/examples/node/kinesis.d.ts.map +1 -0
  75. package/dist/examples/node/kinesis.js +12 -0
  76. package/dist/examples/node/kinesis.js.map +1 -0
  77. package/dist/examples/node/manuallySelectDevice.d.ts +5 -0
  78. package/dist/examples/node/manuallySelectDevice.d.ts.map +1 -0
  79. package/dist/examples/node/manuallySelectDevice.js +18 -0
  80. package/dist/examples/node/manuallySelectDevice.js.map +1 -0
  81. package/dist/examples/node/markers.d.ts +5 -0
  82. package/dist/examples/node/markers.d.ts.map +1 -0
  83. package/dist/examples/node/markers.js +27 -0
  84. package/dist/examples/node/markers.js.map +1 -0
  85. package/dist/examples/node/multipleDevices.d.ts +5 -0
  86. package/dist/examples/node/multipleDevices.d.ts.map +1 -0
  87. package/dist/examples/node/multipleDevices.js +33 -0
  88. package/dist/examples/node/multipleDevices.js.map +1 -0
  89. package/dist/examples/node/oauth.d.ts +5 -0
  90. package/dist/examples/node/oauth.d.ts.map +1 -0
  91. package/dist/examples/node/oauth.js +21 -0
  92. package/dist/examples/node/oauth.js.map +1 -0
  93. package/dist/examples/node/osVersion.d.ts +5 -0
  94. package/dist/examples/node/osVersion.d.ts.map +1 -0
  95. package/dist/examples/node/osVersion.js +12 -0
  96. package/dist/examples/node/osVersion.js.map +1 -0
  97. package/dist/examples/node/predictions.d.ts +5 -0
  98. package/dist/examples/node/predictions.d.ts.map +1 -0
  99. package/dist/examples/node/predictions.js +12 -0
  100. package/dist/examples/node/predictions.js.map +1 -0
  101. package/dist/examples/node/rawUnfiltered.d.ts +5 -0
  102. package/dist/examples/node/rawUnfiltered.d.ts.map +1 -0
  103. package/dist/examples/node/rawUnfiltered.js +12 -0
  104. package/dist/examples/node/rawUnfiltered.js.map +1 -0
  105. package/dist/examples/node/removeApiKey.d.ts +5 -0
  106. package/dist/examples/node/removeApiKey.d.ts.map +1 -0
  107. package/dist/examples/node/removeApiKey.js +17 -0
  108. package/dist/examples/node/removeApiKey.js.map +1 -0
  109. package/dist/examples/node/settings.d.ts +5 -0
  110. package/dist/examples/node/settings.d.ts.map +1 -0
  111. package/dist/examples/node/settings.js +19 -0
  112. package/dist/examples/node/settings.js.map +1 -0
  113. package/dist/examples/node/signalQuality.d.ts +5 -0
  114. package/dist/examples/node/signalQuality.d.ts.map +1 -0
  115. package/dist/examples/node/signalQuality.js +12 -0
  116. package/dist/examples/node/signalQuality.js.map +1 -0
  117. package/dist/examples/node/status.d.ts +5 -0
  118. package/dist/examples/node/status.d.ts.map +1 -0
  119. package/dist/examples/node/status.js +12 -0
  120. package/dist/examples/node/status.js.map +1 -0
  121. package/dist/examples/node/switchSelectedDevice.d.ts +5 -0
  122. package/dist/examples/node/switchSelectedDevice.d.ts.map +1 -0
  123. package/dist/examples/node/switchSelectedDevice.js +25 -0
  124. package/dist/examples/node/switchSelectedDevice.js.map +1 -0
  125. package/dist/examples/node/timesync.d.ts +5 -0
  126. package/dist/examples/node/timesync.d.ts.map +1 -0
  127. package/dist/examples/node/timesync.js +12 -0
  128. package/dist/examples/node/timesync.js.map +1 -0
  129. package/dist/examples/node/training.d.ts +5 -0
  130. package/dist/examples/node/training.d.ts.map +1 -0
  131. package/dist/examples/node/training.js +30 -0
  132. package/dist/examples/node/training.js.map +1 -0
  133. package/dist/examples/node/transferDevice.d.ts +5 -0
  134. package/dist/examples/node/transferDevice.d.ts.map +1 -0
  135. package/dist/examples/node/transferDevice.js +27 -0
  136. package/dist/examples/node/transferDevice.js.map +1 -0
  137. package/dist/index.js +2186 -979
  138. package/dist/index.js.map +1 -1
  139. package/dist/index.mjs +2186 -979
  140. package/dist/index.mjs.map +1 -1
  141. package/dist/neurosity.iife.js +2186 -979
  142. package/dist/neurosity.iife.js.map +1 -1
  143. package/dist/neurosity.umd.js +2186 -979
  144. package/dist/neurosity.umd.js.map +1 -1
  145. package/dist/types/Neurosity.d.ts +102 -0
  146. package/dist/types/Neurosity.d.ts.map +1 -0
  147. package/dist/types/api/bluetooth/BluetoothClient.d.ts +77 -0
  148. package/dist/types/api/bluetooth/BluetoothClient.d.ts.map +1 -0
  149. package/dist/types/api/bluetooth/BluetoothTransport.d.ts +31 -0
  150. package/dist/types/api/bluetooth/BluetoothTransport.d.ts.map +1 -0
  151. package/dist/types/api/bluetooth/constants.d.ts +5 -0
  152. package/dist/types/api/bluetooth/constants.d.ts.map +1 -0
  153. package/dist/types/api/bluetooth/index.d.ts +6 -0
  154. package/dist/types/api/bluetooth/index.d.ts.map +1 -0
  155. package/dist/types/api/bluetooth/react-native/ReactNativeTransport.d.ts +73 -0
  156. package/dist/types/api/bluetooth/react-native/ReactNativeTransport.d.ts.map +1 -0
  157. package/dist/types/api/bluetooth/react-native/index.d.ts +3 -0
  158. package/dist/types/api/bluetooth/react-native/index.d.ts.map +1 -0
  159. package/dist/types/api/bluetooth/react-native/types/BleManagerTypes.d.ts +64 -0
  160. package/dist/types/api/bluetooth/react-native/types/BleManagerTypes.d.ts.map +1 -0
  161. package/dist/types/api/bluetooth/react-native/types/ReactNativeTypes.d.ts +41 -0
  162. package/dist/types/api/bluetooth/react-native/types/ReactNativeTypes.d.ts.map +1 -0
  163. package/dist/types/api/bluetooth/react-native/types/index.d.ts +3 -0
  164. package/dist/types/api/bluetooth/react-native/types/index.d.ts.map +1 -0
  165. package/dist/types/api/bluetooth/types/index.d.ts +21 -0
  166. package/dist/types/api/bluetooth/types/index.d.ts.map +1 -0
  167. package/dist/types/api/bluetooth/utils/binaryBufferToEpoch.d.ts +10 -0
  168. package/dist/types/api/bluetooth/utils/binaryBufferToEpoch.d.ts.map +1 -0
  169. package/dist/types/api/bluetooth/utils/create6DigitPin.d.ts +2 -0
  170. package/dist/types/api/bluetooth/utils/create6DigitPin.d.ts.map +1 -0
  171. package/dist/types/api/bluetooth/utils/csvBufferToEpoch.d.ts +6 -0
  172. package/dist/types/api/bluetooth/utils/csvBufferToEpoch.d.ts.map +1 -0
  173. package/dist/types/api/bluetooth/utils/decodeJSONChunks.d.ts +10 -0
  174. package/dist/types/api/bluetooth/utils/decodeJSONChunks.d.ts.map +1 -0
  175. package/dist/types/api/bluetooth/utils/osHasBluetoothSupport.d.ts +3 -0
  176. package/dist/types/api/bluetooth/utils/osHasBluetoothSupport.d.ts.map +1 -0
  177. package/dist/types/api/bluetooth/utils/stitch.d.ts +6 -0
  178. package/dist/types/api/bluetooth/utils/stitch.d.ts.map +1 -0
  179. package/dist/types/api/bluetooth/utils/textCodec.d.ts +11 -0
  180. package/dist/types/api/bluetooth/utils/textCodec.d.ts.map +1 -0
  181. package/dist/types/api/bluetooth/web/WebBluetoothTransport.d.ts +48 -0
  182. package/dist/types/api/bluetooth/web/WebBluetoothTransport.d.ts.map +1 -0
  183. package/dist/types/api/bluetooth/web/isMaybeWebWorkerContext.d.ts +2 -0
  184. package/dist/types/api/bluetooth/web/isMaybeWebWorkerContext.d.ts.map +1 -0
  185. package/dist/types/api/bluetooth/web/isWebBluetoothSupported.d.ts +2 -0
  186. package/dist/types/api/bluetooth/web/isWebBluetoothSupported.d.ts.map +1 -0
  187. package/dist/types/api/firebase/FirebaseApp.d.ts +13 -0
  188. package/dist/types/api/firebase/FirebaseApp.d.ts.map +1 -0
  189. package/dist/types/api/firebase/FirebaseDevice.d.ts +35 -0
  190. package/dist/types/api/firebase/FirebaseDevice.d.ts.map +1 -0
  191. package/dist/types/api/firebase/FirebaseUser.d.ts +50 -0
  192. package/dist/types/api/firebase/FirebaseUser.d.ts.map +1 -0
  193. package/dist/types/api/firebase/config.d.ts +9 -0
  194. package/dist/types/api/firebase/config.d.ts.map +1 -0
  195. package/dist/types/api/firebase/deviceStore.d.ts +24 -0
  196. package/dist/types/api/firebase/deviceStore.d.ts.map +1 -0
  197. package/dist/types/api/firebase/index.d.ts +4 -0
  198. package/dist/types/api/firebase/index.d.ts.map +1 -0
  199. package/dist/types/api/https/config.d.ts +2 -0
  200. package/dist/types/api/https/config.d.ts.map +1 -0
  201. package/dist/types/api/https/createOAuthURL.d.ts +4 -0
  202. package/dist/types/api/https/createOAuthURL.d.ts.map +1 -0
  203. package/dist/types/api/https/getOAuthToken.d.ts +4 -0
  204. package/dist/types/api/https/getOAuthToken.d.ts.map +1 -0
  205. package/dist/types/api/https/utils.d.ts +3 -0
  206. package/dist/types/api/https/utils.d.ts.map +1 -0
  207. package/dist/types/api/index.d.ts +74 -0
  208. package/dist/types/api/index.d.ts.map +1 -0
  209. package/dist/types/index.d.ts +4 -0
  210. package/dist/types/index.d.ts.map +1 -0
  211. package/dist/types/subscriptions/SubscriptionManager.d.ts +9 -0
  212. package/dist/types/subscriptions/SubscriptionManager.d.ts.map +1 -0
  213. package/dist/types/timesync/Timesync.d.ts +21 -0
  214. package/dist/types/timesync/Timesync.d.ts.map +1 -0
  215. package/dist/types/timesync/index.d.ts +2 -0
  216. package/dist/types/timesync/index.d.ts.map +1 -0
  217. package/dist/types/types/accelerometer.d.ts +12 -0
  218. package/dist/types/types/accelerometer.d.ts.map +1 -0
  219. package/dist/types/types/actions.d.ts +11 -0
  220. package/dist/types/types/actions.d.ts.map +1 -0
  221. package/dist/types/types/apiKey.d.ts +31 -0
  222. package/dist/types/types/apiKey.d.ts.map +1 -0
  223. package/dist/types/types/awareness.d.ts +2 -0
  224. package/dist/types/types/awareness.d.ts.map +1 -0
  225. package/dist/types/types/brainwaves.d.ts +40 -0
  226. package/dist/types/types/brainwaves.d.ts.map +1 -0
  227. package/dist/types/types/calm.d.ts +7 -0
  228. package/dist/types/types/calm.d.ts.map +1 -0
  229. package/dist/types/types/client.d.ts +20 -0
  230. package/dist/types/types/client.d.ts.map +1 -0
  231. package/dist/types/types/credentials.d.ts +16 -0
  232. package/dist/types/types/credentials.d.ts.map +1 -0
  233. package/dist/types/types/deviceInfo.d.ts +20 -0
  234. package/dist/types/types/deviceInfo.d.ts.map +1 -0
  235. package/dist/types/types/epoch.d.ts +10 -0
  236. package/dist/types/types/epoch.d.ts.map +1 -0
  237. package/dist/types/types/experiment.d.ts +10 -0
  238. package/dist/types/types/experiment.d.ts.map +1 -0
  239. package/dist/types/types/focus.d.ts +7 -0
  240. package/dist/types/types/focus.d.ts.map +1 -0
  241. package/dist/types/types/hapticEffects.d.ts +126 -0
  242. package/dist/types/types/hapticEffects.d.ts.map +1 -0
  243. package/dist/types/types/index.d.ts +27 -0
  244. package/dist/types/types/index.d.ts.map +1 -0
  245. package/dist/types/types/kinesis.d.ts +7 -0
  246. package/dist/types/types/kinesis.d.ts.map +1 -0
  247. package/dist/types/types/marker.d.ts +5 -0
  248. package/dist/types/types/marker.d.ts.map +1 -0
  249. package/dist/types/types/metrics.d.ts +13 -0
  250. package/dist/types/types/metrics.d.ts.map +1 -0
  251. package/dist/types/types/oauth.d.ts +21 -0
  252. package/dist/types/types/oauth.d.ts.map +1 -0
  253. package/dist/types/types/options.d.ts +25 -0
  254. package/dist/types/types/options.d.ts.map +1 -0
  255. package/dist/types/types/recording.d.ts +26 -0
  256. package/dist/types/types/recording.d.ts.map +1 -0
  257. package/dist/types/types/sample.d.ts +10 -0
  258. package/dist/types/types/sample.d.ts.map +1 -0
  259. package/dist/types/types/settings.d.ts +8 -0
  260. package/dist/types/types/settings.d.ts.map +1 -0
  261. package/dist/types/types/signalQuality.d.ts +9 -0
  262. package/dist/types/types/signalQuality.d.ts.map +1 -0
  263. package/dist/types/types/signalQualityV2.d.ts +14 -0
  264. package/dist/types/types/signalQualityV2.d.ts.map +1 -0
  265. package/dist/types/types/skill.d.ts +45 -0
  266. package/dist/types/types/skill.d.ts.map +1 -0
  267. package/dist/types/types/status.d.ts +21 -0
  268. package/dist/types/types/status.d.ts.map +1 -0
  269. package/dist/types/types/streaming.d.ts +10 -0
  270. package/dist/types/types/streaming.d.ts.map +1 -0
  271. package/dist/types/types/subscriptions.d.ts +15 -0
  272. package/dist/types/types/subscriptions.d.ts.map +1 -0
  273. package/dist/types/types/training.d.ts +14 -0
  274. package/dist/types/types/training.d.ts.map +1 -0
  275. package/dist/types/types/user.d.ts +10 -0
  276. package/dist/types/types/user.d.ts.map +1 -0
  277. package/dist/types/utils/errors.d.ts +6 -0
  278. package/dist/types/utils/errors.d.ts.map +1 -0
  279. package/dist/types/utils/filterInternalKeys.d.ts +4 -0
  280. package/dist/types/utils/filterInternalKeys.d.ts.map +1 -0
  281. package/dist/types/utils/hapticEffects.d.ts +124 -0
  282. package/dist/types/utils/hapticEffects.d.ts.map +1 -0
  283. package/dist/types/utils/heartbeat.d.ts +5 -0
  284. package/dist/types/utils/heartbeat.d.ts.map +1 -0
  285. package/dist/types/utils/index.d.ts +14 -0
  286. package/dist/types/utils/index.d.ts.map +1 -0
  287. package/dist/types/utils/is-node.d.ts +2 -0
  288. package/dist/types/utils/is-node.d.ts.map +1 -0
  289. package/dist/types/utils/metrics.d.ts +4 -0
  290. package/dist/types/utils/metrics.d.ts.map +1 -0
  291. package/dist/types/utils/permissions.d.ts +16 -0
  292. package/dist/types/utils/permissions.d.ts.map +1 -0
  293. package/dist/types/utils/pick.d.ts +2 -0
  294. package/dist/types/utils/pick.d.ts.map +1 -0
  295. package/dist/types/utils/pipes.d.ts +18 -0
  296. package/dist/types/utils/pipes.d.ts.map +1 -0
  297. package/dist/types/utils/platform.d.ts +31 -0
  298. package/dist/types/utils/platform.d.ts.map +1 -0
  299. package/dist/types/utils/subscription.d.ts +7 -0
  300. package/dist/types/utils/subscription.d.ts.map +1 -0
  301. package/dist/types/utils/transferDevice.d.ts +10 -0
  302. package/dist/types/utils/transferDevice.d.ts.map +1 -0
  303. package/dist/types/utils/whileOnline.d.ts +9 -0
  304. package/dist/types/utils/whileOnline.d.ts.map +1 -0
  305. package/package.json +9 -9
  306. package/dist/index.d.ts +0 -1067
@@ -0,0 +1,102 @@
1
+ import { Observable } from "rxjs";
2
+ import { CloudClient } from "./api/index";
3
+ import { SDKOptions } from "./types/options";
4
+ import { STREAMING_MODE, STREAMING_TYPE } from "./types/streaming";
5
+ import { Training } from "./types/training";
6
+ import { Credentials, EmailAndPassword } from "./types/credentials";
7
+ import { CustomToken } from "./types/credentials";
8
+ import { Settings } from "./types/settings";
9
+ import { SignalQuality } from "./types/signalQuality";
10
+ import { SignalQualityV2 } from "./types/signalQualityV2";
11
+ import { Kinesis } from "./types/kinesis";
12
+ import { Calm } from "./types/calm";
13
+ import { Focus } from "./types/focus";
14
+ import { BrainwavesLabel, Epoch, PowerByBand, PSD } from "./types/brainwaves";
15
+ import { Accelerometer } from "./types/accelerometer";
16
+ import { DeviceInfo, OSVersion } from "./types/deviceInfo";
17
+ import { DeviceStatus } from "./types/status";
18
+ import { Action } from "./types/actions";
19
+ import { HapticEffects } from "./types/hapticEffects";
20
+ import { RecordingOptions, RecordingResult, StartRecordingOptions, RecordingHandle } from "./types/recording";
21
+ import { OAuthConfig, OAuthQuery } from "./types/oauth";
22
+ import { OAuthQueryResult, OAuthRemoveResponse } from "./types/oauth";
23
+ import { UserClaims } from "./types/user";
24
+ import { Experiment } from "./types/experiment";
25
+ import { TransferDeviceOptions } from "./utils/transferDevice";
26
+ import { BluetoothClient } from "./api/bluetooth";
27
+ import { ApiKeyRecord, CreateApiKeyRequest, RemoveApiKeyResponse } from "./types/apiKey";
28
+ export declare class Neurosity {
29
+ protected options: SDKOptions;
30
+ protected cloudClient: CloudClient;
31
+ protected bluetoothClient: BluetoothClient;
32
+ protected isMissingBluetoothTransport: boolean;
33
+ private streamingMode$;
34
+ static get SERVER_TIMESTAMP(): object;
35
+ constructor(options?: SDKOptions);
36
+ _initStreamingMode(streamingMode: STREAMING_MODE, hasBluetoothTransport: boolean): void;
37
+ _osHasBluetoothSupport(): Observable<any>;
38
+ streamingState(): Observable<{
39
+ connected: boolean;
40
+ activeMode: STREAMING_TYPE;
41
+ streamingMode: STREAMING_MODE;
42
+ }>;
43
+ _withStreamingModeObservable<T>(streams: {
44
+ wifi: () => Observable<T>;
45
+ bluetooth: () => Observable<T>;
46
+ }): Observable<any>;
47
+ _withStreamingModePromise<T>(promises: {
48
+ wifi: () => Promise<T>;
49
+ bluetooth: () => Promise<T>;
50
+ }): Promise<T>;
51
+ get bluetooth(): BluetoothClient;
52
+ private _getCloudMetricDependencies;
53
+ login(credentials: Credentials): Promise<void>;
54
+ logout(): Promise<void>;
55
+ __getApp(): import("@firebase/app").FirebaseApp;
56
+ onAuthStateChanged(): Observable<any>;
57
+ addDevice(deviceId: string): Promise<void>;
58
+ removeDevice(deviceId: string): Promise<void>;
59
+ transferDevice(options: TransferDeviceOptions): Promise<void>;
60
+ onUserDevicesChange(): Observable<DeviceInfo[]>;
61
+ onUserClaimsChange(): Observable<UserClaims>;
62
+ getDevices(): Promise<DeviceInfo[]>;
63
+ selectDevice(deviceSelector: (devices: DeviceInfo[]) => DeviceInfo): Promise<DeviceInfo>;
64
+ getSelectedDevice(): Promise<DeviceInfo>;
65
+ getInfo(): Promise<DeviceInfo>;
66
+ onDeviceChange(): Observable<DeviceInfo>;
67
+ disconnect(): Promise<void>;
68
+ private dispatchAction;
69
+ addMarker(label: string): Promise<Action>;
70
+ haptics(effects: any): Promise<any>;
71
+ getHapticEffects(): HapticEffects;
72
+ accelerometer(): Observable<Accelerometer>;
73
+ brainwaves(label: BrainwavesLabel): Observable<Epoch | PowerByBand | PSD>;
74
+ record(options: RecordingOptions): Promise<RecordingResult>;
75
+ startRecording(options: StartRecordingOptions): Promise<RecordingHandle>;
76
+ calm(): Observable<Calm>;
77
+ signalQuality(): Observable<SignalQuality>;
78
+ signalQualityV2(): Observable<SignalQualityV2>;
79
+ settings(): Observable<Settings>;
80
+ osVersion(): Observable<OSVersion>;
81
+ focus(): Observable<Focus>;
82
+ kinesis(label: string): Observable<Kinesis>;
83
+ predictions(label: string): Observable<any>;
84
+ status(): Observable<DeviceStatus>;
85
+ changeSettings(settings: Settings): Promise<void>;
86
+ get training(): Training;
87
+ goOffline(): void;
88
+ goOnline(): void;
89
+ createAccount(credentials: EmailAndPassword): Promise<any>;
90
+ deleteAccount(): Promise<void>;
91
+ createBluetoothToken(): Promise<string>;
92
+ createCustomToken(): Promise<CustomToken>;
93
+ createApiKey(data: CreateApiKeyRequest): Promise<ApiKeyRecord>;
94
+ removeApiKey(apiKeyId: string): Promise<RemoveApiKeyResponse>;
95
+ getTimesyncOffset(): number;
96
+ createOAuthURL(config: OAuthConfig): Promise<string>;
97
+ getOAuthToken(query: OAuthQuery): Promise<OAuthQueryResult>;
98
+ removeOAuthAccess(): Promise<OAuthRemoveResponse>;
99
+ onUserExperiments(): Observable<Experiment[]>;
100
+ deleteUserExperiment(experimentId: string): Promise<void>;
101
+ }
102
+ //# sourceMappingURL=Neurosity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Neurosity.d.ts","sourceRoot":"","sources":["../../src/Neurosity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,UAAU,EAAkB,MAAM,MAAM,CAAC;AAMjE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,WAAW,EAAE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,aAAa;IAYb,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC;IAYvC,iBAAiB,IAAI,OAAO,CAAC,WAAW,CAAC;IAmBzC,YAAY,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC;IAoB9D,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAuB7D,iBAAiB,IAAI,MAAM;IAkD3B,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;IAmDpD,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA0B3D,iBAAiB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IA6BjD,iBAAiB,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;IAgB7C,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGjE"}
@@ -0,0 +1,77 @@
1
+ import { Observable } from "rxjs";
2
+ import { ReplaySubject } from "rxjs";
3
+ import { WebBluetoothTransport } from "./web/WebBluetoothTransport";
4
+ import { ReactNativeTransport } from "./react-native/ReactNativeTransport";
5
+ import { DeviceInfo } from "../../types/deviceInfo";
6
+ import { Action } from "../../types/actions";
7
+ import { Epoch } from "../../types/epoch";
8
+ import { BLUETOOTH_CONNECTION } from "./types";
9
+ import { DeviceNicknameOrPeripheral } from "./BluetoothTransport";
10
+ import { Peripheral } from "./react-native/types/BleManagerTypes";
11
+ export type BluetoothTransport = WebBluetoothTransport | ReactNativeTransport;
12
+ type IsAuthenticated = boolean;
13
+ type ExpiresIn = number;
14
+ type IsAuthenticatedResponse = [IsAuthenticated, ExpiresIn];
15
+ type CreateBluetoothToken = () => Promise<string>;
16
+ type Options = {
17
+ transport: BluetoothTransport;
18
+ selectedDevice$: Observable<DeviceInfo>;
19
+ osHasBluetoothSupport$: Observable<boolean>;
20
+ createBluetoothToken: CreateBluetoothToken;
21
+ };
22
+ export declare class BluetoothClient {
23
+ transport: BluetoothTransport;
24
+ deviceInfo: DeviceInfo;
25
+ selectedDevice$: ReplaySubject<DeviceInfo>;
26
+ osHasBluetoothSupport$: ReplaySubject<boolean>;
27
+ isAuthenticated$: ReplaySubject<boolean>;
28
+ _focus$: Observable<any>;
29
+ _calm$: Observable<any>;
30
+ _accelerometer$: Observable<any>;
31
+ _brainwavesRaw$: Observable<any>;
32
+ _brainwavesRawUnfiltered$: Observable<any>;
33
+ _brainwavesPSD$: Observable<any>;
34
+ _brainwavesPowerByBand$: Observable<any>;
35
+ _signalQuality$: Observable<any>;
36
+ _signalQualityV2$: Observable<any>;
37
+ _status$: Observable<any>;
38
+ _settings$: Observable<any>;
39
+ _wifiNearbyNetworks$: Observable<any>;
40
+ _wifiConnections$: Observable<any>;
41
+ constructor(options: Options);
42
+ _autoAuthenticate(createBluetoothToken: CreateBluetoothToken): Observable<IsAuthenticatedResponse>;
43
+ enableAutoConnect(autoConnect: boolean): void;
44
+ _hasBluetoothSupport(): Promise<boolean>;
45
+ authenticate(token: string): Promise<IsAuthenticatedResponse>;
46
+ isAuthenticated(): Promise<IsAuthenticatedResponse>;
47
+ scan(options?: any): Observable<Peripheral[]>;
48
+ connect(deviceNicknameORPeripheral?: DeviceNicknameOrPeripheral): Promise<void>;
49
+ disconnect(): Promise<void>;
50
+ connection(): Observable<BLUETOOTH_CONNECTION>;
51
+ logs(): Observable<string>;
52
+ getDeviceId(): Promise<string>;
53
+ _withAuthentication<T>(getter: () => Promise<T>): Promise<T>;
54
+ _subscribeWhileAuthenticated(characteristicName: string, skipJSONDecoding?: boolean): Observable<any>;
55
+ focus(): Observable<any>;
56
+ calm(): Observable<any>;
57
+ accelerometer(): Observable<any>;
58
+ brainwaves(label: string): Observable<Epoch | any>;
59
+ signalQuality(): Observable<any>;
60
+ signalQualityV2(): Observable<any>;
61
+ addMarker(label: string): Promise<void>;
62
+ getInfo(): Promise<DeviceInfo>;
63
+ status(): Observable<any>;
64
+ dispatchAction(action: Action): Promise<any>;
65
+ settings(): Observable<any>;
66
+ haptics(effects: any): Promise<any>;
67
+ get wifi(): {
68
+ nearbyNetworks: () => Observable<any>;
69
+ connections: () => Observable<any>;
70
+ connect: (ssid: string, password?: string) => Promise<any>;
71
+ forgetConnection: (ssid: string) => Promise<any>;
72
+ reset: () => Promise<any>;
73
+ speedTest: () => Promise<any>;
74
+ };
75
+ }
76
+ export {};
77
+ //# sourceMappingURL=BluetoothClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BluetoothClient.d.ts","sourceRoot":"","sources":["../../../../src/api/bluetooth/BluetoothClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAS,MAAM,MAAM,CAAC;AAChD,OAAO,EAAE,aAAa,EAAyB,MAAM,MAAM,CAAC;AAG5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAElE,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,GAAG,oBAAoB,CAAC;AAE9E,KAAK,eAAe,GAAG,OAAO,CAAC;AAC/B,KAAK,SAAS,GAAG,MAAM,CAAC;AACxB,KAAK,uBAAuB,GAAG,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;AAE5D,KAAK,oBAAoB,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;AAElD,KAAK,OAAO,GAAG;IACb,SAAS,EAAE,k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AAuB,CAAC;IAoBzD,IAAI,CAAC,OAAO,CAAC,KAAA;IAeb,OAAO,CAAC,0BAA0B,CAAC,EAAE,0BAA0B;IAY/D,UAAU;IAIV,UAAU;IAIV,IAAI;IAIE,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;IAK9B,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAmBlE,4BAA4B,CAC1B,kBAAkB,EAAE,MAAM,EAC1B,gBAAgB,UAAQ,GACvB,UAAU,CAAC,GAAG,CAAC;IAkBlB,KAAK;IAIL,IAAI;IAIJ,aAAa;IAIb,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,KAAK,GAAG,GAAG,CAAC;IAyBlD,aAAa;IAIb,eAAe;IAIT,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAWvC,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;IAUpC,MAAM;IAIA,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IASlD,QAAQ;IAIR,OAAO,CAAC,OAAO,KAAA;IAaf,IAAI,IAAI;8BAEgB,UAAU,CAAC,GAAG,CAAC;2BAElB,UAAU,CAAC,GAAG,CAAC;wBAEhB,MAAM,aAAa,MAAM;iCAiBhB,MAAM,KAAG,OAAO,CAAC,GAAG,CAAC;;;MAuCjD;CACF"}
@@ -0,0 +1,31 @@
1
+ import { Observable, Subject } from "rxjs";
2
+ import { BLUETOOTH_CONNECTION, TRANSPORT_TYPE } from "./types";
3
+ import { Action } from "../../types/actions";
4
+ import { DeviceInfo, OSVersion } from "../../types/deviceInfo";
5
+ import { Peripheral } from "./react-native/types/BleManagerTypes";
6
+ export type DeviceNicknameOrPeripheral = string | Peripheral;
7
+ export interface BluetoothTransport {
8
+ type: TRANSPORT_TYPE;
9
+ connect(deviceNicknameORPeripheral?: DeviceNicknameOrPeripheral): Promise<void>;
10
+ _autoConnect(selectedDevice$: Observable<DeviceInfo>, osVersion: Observable<OSVersion>): Observable<void>;
11
+ disconnect(): Promise<void>;
12
+ connection(): Observable<BLUETOOTH_CONNECTION>;
13
+ requestDevice?(): any;
14
+ addLog: (log: string) => void;
15
+ logs$: Subject<string>;
16
+ enableAutoConnect?(value: boolean): void;
17
+ scan?(options?: {
18
+ seconds?: number;
19
+ }): Observable<Peripheral[]>;
20
+ subscribeToCharacteristic(args: {
21
+ characteristicName: string;
22
+ manageNotifications?: boolean;
23
+ }): Observable<any>;
24
+ readCharacteristic(characteristicName: string, parse?: boolean): Promise<any>;
25
+ writeCharacteristic(characteristicName: string, data: string): Promise<void>;
26
+ dispatchAction(args: {
27
+ characteristicName: string;
28
+ action: Action;
29
+ }): Promise<any>;
30
+ }
31
+ //# sourceMappingURL=BluetoothTransport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BluetoothTransport.d.ts","sourceRoot":"","sources":["../../../../src/api/bluetooth/BluetoothTransport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAElE,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG,UAAU,CAAC;AAK7D,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,CACL,0BAA0B,CAAC,EAAE,0BAA0B,GACtD,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,YAAY,CACV,eAAe,EAAE,UAAU,CAAC,UAAU,CAAC,EACvC,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC,GAC/B,UAAU,CAAC,IAAI,CAAC,CAAC;IACpB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,UAAU,IAAI,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAC/C,aAAa,CAAC,IAAI,GAAG,CAAC;IACtB,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAEvB,iBAAiB,CAAC,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAGzC,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC,CAAC;IAEhE,yBAAyB,CAAC,IAAI,EAAE;QAC9B,kBAAkB,EAAE,MAAM,CAAC;QAC3B,mBAAmB,CAAC,EAAE,OAAO,CAAC;KAC/B,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;IAEpB,kBAAkB,CAAC,kBAAkB,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAE9E,mBAAmB,CAAC,kBAAkB,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7E,cAAc,CAAC,IAAI,EAAE;QACnB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,MAAM,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;CAClB"}
@@ -0,0 +1,5 @@
1
+ export declare const ANDROID_MAX_MTU: number;
2
+ export declare const REACT_NATIVE_MAX_BYTE_SIZE: number;
3
+ export declare const DEFAULT_ACTION_RESPONSE_TIMEOUT: number;
4
+ export declare const CHARACTERISTIC_UUIDS_TO_NAMES: any;
5
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/api/bluetooth/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,EAAE,MAAY,CAAC;AAC3C,eAAO,MAAM,0BAA0B,EAAE,MAAY,CAAC;AAEtD,eAAO,MAAM,+BAA+B,EAAE,MAAkB,CAAC;AAGjE,eAAO,MAAM,6BAA6B,KAEzC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from "./BluetoothClient";
2
+ export * from "./web/WebBluetoothTransport";
3
+ export * from "./react-native/ReactNativeTransport";
4
+ export * from "./utils/osHasBluetoothSupport";
5
+ export * from "./types/index";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/bluetooth/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC"}
@@ -0,0 +1,73 @@
1
+ import { Observable, BehaviorSubject, ReplaySubject } from "rxjs";
2
+ import { BluetoothTransport } from "../BluetoothTransport";
3
+ import { TextCodec } from "../utils/textCodec";
4
+ import { ActionOptions, SubscribeOptions } from "../types";
5
+ import { TRANSPORT_TYPE, BLUETOOTH_CONNECTION } from "../types";
6
+ import { BleManager } from "./types/BleManagerTypes";
7
+ import { Peripheral } from "./types/BleManagerTypes";
8
+ import { NativeEventEmitter } from "./types/ReactNativeTypes";
9
+ import { PlatformOSType } from "./types/ReactNativeTypes";
10
+ import { DeviceInfo } from "../../../types/deviceInfo";
11
+ type Characteristic = {
12
+ characteristicUUID: string;
13
+ serviceUUID: string;
14
+ peripheralId: string;
15
+ };
16
+ type CharacteristicsByName = {
17
+ [name: string]: Characteristic;
18
+ };
19
+ type Options = {
20
+ BleManager: BleManager;
21
+ bleManagerEmitter: NativeEventEmitter;
22
+ platform: PlatformOSType;
23
+ autoConnect?: boolean;
24
+ };
25
+ type BleManagerEvents = {
26
+ stopScan$: Observable<void>;
27
+ discoverPeripheral$: Observable<Peripheral>;
28
+ connectPeripheral$: Observable<void>;
29
+ disconnectPeripheral$: Observable<void>;
30
+ didUpdateValueForCharacteristic$: Observable<any>;
31
+ didUpdateState$: Observable<any>;
32
+ };
33
+ export declare class ReactNativeTransport implements BluetoothTransport {
34
+ type: TRANSPORT_TYPE;
35
+ textCodec: TextCodec;
36
+ options: Options;
37
+ BleManager: BleManager;
38
+ bleManagerEmitter: NativeEventEmitter;
39
+ platform: PlatformOSType;
40
+ bleEvents: BleManagerEvents;
41
+ device: Peripheral;
42
+ characteristicsByName: CharacteristicsByName;
43
+ connection$: BehaviorSubject<BLUETOOTH_CONNECTION>;
44
+ pendingActions$: BehaviorSubject<any[]>;
45
+ logs$: ReplaySubject<string>;
46
+ onDisconnected$: Observable<void>;
47
+ connectionStream$: Observable<BLUETOOTH_CONNECTION>;
48
+ _isAutoConnectEnabled$: ReplaySubject<boolean>;
49
+ constructor(options: Options);
50
+ addLog(log: string): void;
51
+ isConnected(): boolean;
52
+ _autoConnect(selectedDevice$: Observable<DeviceInfo>): Observable<void>;
53
+ enableAutoConnect(autoConnect: boolean): void;
54
+ connection(): Observable<BLUETOOTH_CONNECTION>;
55
+ _fromEvent(eventName: string): Observable<any>;
56
+ scan(options?: {
57
+ seconds?: number;
58
+ once?: boolean;
59
+ skipConnectionUpdate?: boolean;
60
+ }): Observable<Peripheral[]>;
61
+ connect(peripheral: Peripheral): Promise<void>;
62
+ disconnect(): Promise<void>;
63
+ getCharacteristicByName(characteristicName: string): Characteristic;
64
+ subscribeToCharacteristic({ characteristicName, manageNotifications, skipJSONDecoding }: SubscribeOptions): Observable<any>;
65
+ readCharacteristic(characteristicName: string, parse?: boolean): Promise<any>;
66
+ writeCharacteristic(characteristicName: string, data: string): Promise<void>;
67
+ _addPendingAction(actionId: number): void;
68
+ _removePendingAction(actionId: number): void;
69
+ _autoToggleActionNotifications(): Observable<any>;
70
+ dispatchAction({ characteristicName, action }: ActionOptions): Promise<any>;
71
+ }
72
+ export {};
73
+ //# sourceMappingURL=ReactNativeTransport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReactNativeTransport.d.ts","sourceRoot":"","sources":["../../../../../src/api/bluetooth/react-native/ReactNativeTransport.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAS,MAAM,MAAM,CAAC;AAMzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAkB,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAK1D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,KAAK,cAAc,GAAG;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC3B,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAAC;CAChC,CAAC;AAEF,KAAK,OAAO,GAAG;IACb,UAAU,EAAE,UAAU,CAAC;IACvB,iBAAiB,EAAE,kBAAkB,CAAC;IACtC,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,KAAK,gBAAgB,GAAG;I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,OAAO,CAAC;QACf,oBAAoB,CAAC,EAAE,OAAO,CAAC;KAChC,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC;IA+FtB,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAuE9C,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAUjC,uBAAuB,CAAC,kBAAkB,EAAE,MAAM,GAAG,cAAc;IAUnE,yBAAyB,CAAC,EACxB,kBAAkB,EAClB,mBAA0B,EAC1B,gBAAwB,EACzB,EAAE,gBAAgB,GAAG,UAAU,CAAC,GAAG,CAAC;IA6E/B,kBAAkB,CACtB,kBAAkB,EAAE,MAAM,EAC1B,KAAK,GAAE,OAAe,GACrB,OAAO,CAAC,GAAG,CAAC;IAsCT,mBAAmB,CACvB,kBAAkB,EAAE,MAAM,EAC1B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC;IAuBhB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAKzC,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAO5C,8BAA8B,IAAI,UAAU,CAAC,GAAG,CAAC;IAsD3C,cAAc,CAAC,EACnB,kBAAkB,EAClB,MAAM,EACP,EAAE,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC;CAuDhC"}
@@ -0,0 +1,3 @@
1
+ export * from "./types";
2
+ export * from "./ReactNativeTransport";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/bluetooth/react-native/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,64 @@
1
+ export declare class BleManager {
2
+ start(options?: StartOptions): Promise<void>;
3
+ scan(serviceUUIDs: string[], seconds: number, allowDuplicates?: boolean, options?: ScanOptions): Promise<void>;
4
+ stopScan(): Promise<void>;
5
+ connect(peripheralID: string): Promise<void>;
6
+ disconnect(peripheralID: string, force?: boolean): Promise<void>;
7
+ checkState(): void;
8
+ startNotification(peripheralID: string, serviceUUID: string, characteristicUUID: string): Promise<void>;
9
+ startNotificationUseBuffer(peripheralID: string, serviceUUID: string, characteristicUUID: string, buffer: number): Promise<void>;
10
+ stopNotification(peripheralID: string, serviceUUID: string, characteristicUUID: string): Promise<void>;
11
+ read(peripheralID: string, serviceUUID: string, characteristicUUID: string): Promise<any>;
12
+ write(peripheralID: string, serviceUUID: string, characteristicUUID: string, data: any, maxByteSize?: number): Promise<void>;
13
+ writeWithoutResponse(peripheralID: string, serviceUUID: string, characteristicUUID: string, data: any, maxByteSize?: number, queueSleepTime?: number): Promise<void>;
14
+ readRSSI(peripheralID: string): Promise<void>;
15
+ getConnectedPeripherals(serviceUUIDs: string[]): Promise<Peripheral[]>;
16
+ getDiscoveredPeripherals(): Promise<Peripheral[]>;
17
+ isPeripheralConnected(peripheralID: string, serviceUUIDs: string[]): Promise<boolean>;
18
+ requestConnectionPriority(peripheralID: string, connectionPriority: ConnectionPriority): Promise<void>;
19
+ enableBluetooth(): Promise<void>;
20
+ refreshCache(peripheralID: string): Promise<void>;
21
+ requestMTU(peripheralID: string, mtu: number): Promise<void>;
22
+ createBond(peripheralID: string, peripheralPin?: string): Promise<void>;
23
+ removeBond(peripheralID: string): Promise<void>;
24
+ getBondedPeripherals(): Promise<Peripheral[]>;
25
+ removePeripheral(peripheralID: string): Promise<void>;
26
+ retrieveServices(peripheralID: string, serviceUUIDs?: string[]): Promise<PeripheralInfo>;
27
+ }
28
+ export interface Peripheral {
29
+ id: string;
30
+ rssi: number;
31
+ name?: string;
32
+ advertising: AdvertisingData;
33
+ }
34
+ export interface AdvertisingData {
35
+ isConnectable?: boolean;
36
+ localName?: string;
37
+ manufacturerData?: any;
38
+ serviceUUIDs?: string[];
39
+ txPowerLevel?: number;
40
+ }
41
+ export interface StartOptions {
42
+ showAlert?: boolean;
43
+ restoreIdentifierKey?: string;
44
+ queueIdentifierKey?: string;
45
+ forceLegacy?: boolean;
46
+ }
47
+ export interface ScanOptions {
48
+ numberOfMatches?: number;
49
+ matchMode?: number;
50
+ scanMode?: number;
51
+ reportDelay?: number;
52
+ }
53
+ export declare enum ConnectionPriority {
54
+ balanced = 0,
55
+ high = 1,
56
+ low = 2
57
+ }
58
+ export interface PeripheralInfo {
59
+ characteristics: Characteristic[];
60
+ }
61
+ export interface Characteristic {
62
+ characteristic: string;
63
+ }
64
+ //# sourceMappingURL=BleManagerTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BleManagerTypes.d.ts","sourceRoot":"","sources":["../../../../../../src/api/bluetooth/react-native/types/BleManagerTypes.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAE5C,IAAI,CACF,YAAY,EAAE,MAAM,EAAE,EACtB,OAAO,EAAE,MAAM,EACf,eAAe,CAAC,EAAE,OAAO,EACzB,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,IAAI,CAAC;IAChB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IACzB,OAAO,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAC5C,UAAU,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAChE,UAAU,IAAI,IAAI;IAClB,iBAAiB,CACf,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,EACnB,kBAAkB,EAAE,MAAM,GACzB,OAAO,CAAC,IAAI,CAAC;IAGhB,0BAA0B,CACxB,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,EACnB,kBAAkB,EAAE,MAAM,EAC1B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC;IAEhB,gBAAgB,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;AAGD,MAAM,WAAW,cAAc;IAC7B,cAAc,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,41 @@
1
+ interface EmitterSubscription extends EventSubscription {
2
+ emitter: EventEmitter;
3
+ listener: () => any;
4
+ context: any;
5
+ new (emitter: EventEmitter, subscriber: EventSubscriptionVendor, listener: () => any, context: any): EmitterSubscription;
6
+ remove(): void;
7
+ }
8
+ interface EventSubscription {
9
+ eventType: string;
10
+ key: number;
11
+ subscriber: EventSubscriptionVendor;
12
+ new (subscriber: EventSubscriptionVendor): EventSubscription;
13
+ remove(): void;
14
+ }
15
+ declare class EventSubscriptionVendor {
16
+ constructor();
17
+ addSubscription(eventType: string, subscription: EventSubscription): EventSubscription;
18
+ removeAllSubscriptions(eventType?: string): void;
19
+ removeSubscription(subscription: any): void;
20
+ getSubscriptionsForType(eventType: string): EventSubscription[];
21
+ }
22
+ declare class EventEmitter {
23
+ constructor(subscriber?: EventSubscriptionVendor | null);
24
+ addListener(eventType: string, listener: (...args: any[]) => any, context?: any): EmitterSubscription;
25
+ removeAllListeners(eventType?: string): void;
26
+ listenerCount(eventType: string): number;
27
+ emit(eventType: string, ...params: any[]): void;
28
+ }
29
+ type NativeModule = {
30
+ addListener: (eventType: string) => void;
31
+ removeListeners: (count: number) => void;
32
+ };
33
+ export declare class NativeEventEmitter extends EventEmitter {
34
+ constructor(nativeModule?: NativeModule);
35
+ addListener(eventType: string, listener: (event: any) => void, context?: Object): EmitterSubscription;
36
+ removeAllListeners(eventType: string): void;
37
+ removeSubscription(subscription: EmitterSubscription): void;
38
+ }
39
+ export type PlatformOSType = "ios" | "android" | "macos" | "windows" | "web" | "native";
40
+ export {};
41
+ //# sourceMappingURL=ReactNativeTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReactNativeTypes.d.ts","sourceRoot":"","sources":["../../../../../../src/api/bluetooth/react-native/types/ReactNativeTypes.ts"],"names":[],"mappings":"AA0DA,UAAU,mBAAoB,SAAQ,iBAAi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AAM,KAAK,IAAI,CAAC;IAQzC,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C,CAAC;AAMF,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,YAAY;gBAK9C,YAAY,CAAC,EAAE,YAAY;IAUvC,WAAW,CACT,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,EAC9B,OAAO,CAAC,EAAE,MAAM,GACf,mBAAmB;IAKtB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAM3C,kBAAkB,CAAC,YAAY,EAAE,mBAAmB,GAAG,IAAI;CAC5D;AAKD,MAAM,MAAM,cAAc,GACtB,KAAK,GACL,SAAS,GACT,OAAO,GACP,SAAS,GACT,KAAK,GACL,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./BleManagerTypes";
2
+ export * from "./ReactNativeTypes";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/bluetooth/react-native/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,21 @@
1
+ export type ActionOptions = {
2
+ characteristicName: string;
3
+ action: any;
4
+ };
5
+ export type SubscribeOptions = {
6
+ characteristicName: string;
7
+ manageNotifications?: boolean;
8
+ skipJSONDecoding?: boolean;
9
+ };
10
+ export declare enum BLUETOOTH_CONNECTION {
11
+ SCANNING = "scanning",
12
+ CONNECTED = "connected",
13
+ CONNECTING = "connecting",
14
+ DISCONNECTING = "disconnecting",
15
+ DISCONNECTED = "disconnected"
16
+ }
17
+ export declare enum TRANSPORT_TYPE {
18
+ WEB = "web",
19
+ REACT_NATIVE = "reactNative"
20
+ }
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/bluetooth/types/index.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,aAAa,GAAG;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,GAAG,CAAC;CACb,CAAC;AAKF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAKF,oBAAY,oBAAoB;IAC9B,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;CAC9B;AAKD,oBAAY,cAAc;IACxB,GAAG,QAAQ;IACX,YAAY,gBAAgB;CAC7B"}
@@ -0,0 +1,10 @@
1
+ import { Observable, UnaryFunction } from "rxjs";
2
+ import { Buffer } from "buffer/index.js";
3
+ import { Sample } from "../../../types/sample";
4
+ import { Epoch } from "../../../types/epoch";
5
+ import { DeviceInfo } from "../../../types/deviceInfo";
6
+ export declare function binaryBufferToEpoch(deviceInfo: DeviceInfo): UnaryFunction<Observable<Epoch>, any>;
7
+ export declare function binaryBufferToSamples(channelCount: number): UnaryFunction<any, any>;
8
+ export declare function decode(buffer: Buffer, channelCount: number): Array<Sample>;
9
+ export declare function encodedSampleSize(channelCount: number): number;
10
+ //# sourceMappingURL=binaryBufferToEpoch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"binaryBufferToEpoch.d.ts","sourceRoot":"","sources":["../../../../../src/api/bluetooth/utils/binaryBufferToEpoch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AAE7D,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGzC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAevD,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,UAAU,GACrB,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAmBvC;AAKD,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,MAAM,GACnB,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,CAQzB;AAoBD,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAoC1E;AAoBD,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAE9D"}
@@ -0,0 +1,2 @@
1
+ export declare function create6DigitPin(): number;
2
+ //# sourceMappingURL=create6DigitPin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create6DigitPin.d.ts","sourceRoot":"","sources":["../../../../../src/api/bluetooth/utils/create6DigitPin.ts"],"names":[],"mappings":"AACA,wBAAgB,eAAe,IAAI,MAAM,CAExC"}
@@ -0,0 +1,6 @@
1
+ import { Observable, UnaryFunction } from "rxjs";
2
+ import { Epoch } from "../../../types/epoch";
3
+ import { DeviceInfo } from "../../../types/deviceInfo";
4
+ export declare function csvBufferToEpoch(deviceInfo: DeviceInfo): UnaryFunction<Observable<Epoch>, any>;
5
+ export declare function csvBufferToSamples(): UnaryFunction<any, any>;
6
+ //# sourceMappingURL=csvBufferToEpoch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"csvBufferToEpoch.d.ts","sourceRoot":"","sources":["../../../../../src/api/bluetooth/utils/csvBufferToEpoch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AAK7D,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAQvD,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,UAAU,GACrB,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAmBvC;AAKD,wBAAgB,kBAAkB,IAAI,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,CAU5D"}
@@ -0,0 +1,10 @@
1
+ import { TextCodec } from "./textCodec";
2
+ type Options = {
3
+ textCodec: TextCodec;
4
+ characteristicName: string;
5
+ delimiter: string;
6
+ addLog: (message: string) => void;
7
+ };
8
+ export declare function decodeJSONChunks({ textCodec, characteristicName, delimiter, addLog }: Options): import("rxjs").UnaryFunction<import("rxjs").Observable<Uint8Array<ArrayBufferLike>>, import("rxjs").Observable<any>>;
9
+ export {};
10
+ //# sourceMappingURL=decodeJSONChunks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decodeJSONChunks.d.ts","sourceRoot":"","sources":["../../../../../src/api/bluetooth/utils/decodeJSONChunks.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAKxC,KAAK,OAAO,GAAG;IACb,SAAS,EAAE,SAAS,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAKF,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,kBAAkB,EAClB,SAAS,EACT,MAAM,EACP,EAAE,OAAO,wHA0BT"}
@@ -0,0 +1,3 @@
1
+ import { DeviceInfo, OSVersion } from "../../../types/deviceInfo";
2
+ export declare function osHasBluetoothSupport(selectedDevice: DeviceInfo, osVersion?: OSVersion): any;
3
+ //# sourceMappingURL=osHasBluetoothSupport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"osHasBluetoothSupport.d.ts","sourceRoot":"","sources":["../../../../../src/api/bluetooth/utils/osHasBluetoothSupport.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAElE,wBAAgB,qBAAqB,CACnC,cAAc,EAAE,UAAU,EAC1B,SAAS,CAAC,EAAE,SAAS,OAoBtB"}
@@ -0,0 +1,6 @@
1
+ type StitchChunkOptions = {
2
+ delimiter: string;
3
+ };
4
+ export declare function stitchChunks({ delimiter }: StitchChunkOptions): import("rxjs").UnaryFunction<import("rxjs").Observable<string>, import("rxjs").Observable<string>>;
5
+ export {};
6
+ //# sourceMappingURL=stitch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stitch.d.ts","sourceRoot":"","sources":["../../../../../src/api/bluetooth/utils/stitch.ts"],"names":[],"mappings":"AAGA,KAAK,kBAAkB,GAAG;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,EAAE,kBAAkB,sGA+B7D"}
@@ -0,0 +1,11 @@
1
+ import { TRANSPORT_TYPE } from "../types";
2
+ export type BufferLike = Uint8Array | number[];
3
+ export declare class TextCodec {
4
+ transportType: TRANSPORT_TYPE;
5
+ webEncoder: TextEncoder;
6
+ webDecoder: TextDecoder;
7
+ constructor(transportType: TRANSPORT_TYPE);
8
+ encode(data: string): BufferLike;
9
+ decode(arrayBuffer: Uint8Array): string;
10
+ }
11
+ //# sourceMappingURL=textCodec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textCodec.d.ts","sourceRoot":"","sources":["../../../../../src/api/bluetooth/utils/textCodec.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAM1C,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,MAAM,EAAE,CAAC;AAK/C,qBAAa,SAAS;IACpB,aAAa,EAAE,cAAc,CAAC;IAC9B,UAAU,EAAE,WAAW,CAAC;IACxB,UAAU,EAAE,WAAW,CAAC;gBAEZ,aAAa,EAAE,cAAc;IASzC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU;IAgBhC,MAAM,CAAC,WAAW,EAAE,UAAU,GAAG,MAAM;CAUxC"}