@moshenguo/ms-data-sdk 0.1.10 → 0.1.12
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.
- package/build/sdk/bleConst.d.ts +17 -3
- package/build/sdk/bleSDK.d.ts +102 -3
- package/build/sdk/models.d.ts +22 -3
- package/build/sdk/resolveUtil.d.ts +16 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.min.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/BleSDK.html +107 -57
- package/docs/classes/ResolveUtil.html +73 -65
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +2 -2
- package/docs/interfaces/MyAutomaticHRMonitoring.html +10 -10
- package/docs/interfaces/MyDeviceInfo.html +16 -12
- package/docs/interfaces/MyPersonalInfo.html +7 -7
- package/docs/interfaces/MySedentaryReminderV4.html +10 -10
- package/docs/interfaces/MyWeeksV4.html +9 -9
- package/docs/modules.html +1 -1
- package/docs/variables/ANCS_MASK.html +1 -0
- package/docs/variables/BleConst.html +4 -2
- package/docs/variables/DeviceKey.html +8 -3
- package/package.json +5 -5
package/build/sdk/bleConst.d.ts
CHANGED
|
@@ -69,11 +69,11 @@ export declare const DeviceConst: {
|
|
|
69
69
|
CMD_SETTING_HRV_TIME: number;
|
|
70
70
|
CMD_CLOSE_DEVICE: number;
|
|
71
71
|
CMD_AUTO_CHECK_STATUS: number;
|
|
72
|
-
CMD_GET_BLOODSUGAR: number;
|
|
73
72
|
CMD_GET_BLOODSUGAR_DATA: number;
|
|
74
73
|
CMD_Set_ActivityAlarm: number;
|
|
75
74
|
CMD_Get_ActivityAlarm: number;
|
|
76
75
|
CMD_Get_SleepActivityData: number;
|
|
76
|
+
CMD_Get_PPG_Waveform: number;
|
|
77
77
|
};
|
|
78
78
|
/**
|
|
79
79
|
* Bluetooth Feature Constants
|
|
@@ -183,6 +183,8 @@ export declare const BleConst: {
|
|
|
183
183
|
StopMeasurementOxygenCallback: string;
|
|
184
184
|
/** Stop temperature measurement callback */
|
|
185
185
|
StopMeasurementTempCallback: string;
|
|
186
|
+
/** ECG measurement callback */
|
|
187
|
+
MeasurementECGCallback: string;
|
|
186
188
|
/** Watch face setting */
|
|
187
189
|
Braceletdial: string;
|
|
188
190
|
/** Watch face set successfully */
|
|
@@ -268,6 +270,8 @@ export declare const BleConst: {
|
|
|
268
270
|
/** Set sedentary reminder V4 */
|
|
269
271
|
SetSedentaryReminder_V4: string;
|
|
270
272
|
GetRealTimeTemperatureCorrection: string;
|
|
273
|
+
/** PPG Realtime */
|
|
274
|
+
PPGRealtime: string;
|
|
271
275
|
};
|
|
272
276
|
/**
|
|
273
277
|
* Device key constants, used for reading/writing device data.
|
|
@@ -368,6 +372,8 @@ export declare const DeviceKey: {
|
|
|
368
372
|
NightMode: string;
|
|
369
373
|
/** ANCS mode switch */
|
|
370
374
|
ANCSMode: string;
|
|
375
|
+
/** ANCS sub status */
|
|
376
|
+
ANCSSubStatus: string;
|
|
371
377
|
/** Base heart rate */
|
|
372
378
|
KBaseHeart: string;
|
|
373
379
|
/** Screen brightness (0-100) */
|
|
@@ -426,6 +432,8 @@ export declare const DeviceKey: {
|
|
|
426
432
|
TemperatureCorrectionValue: string;
|
|
427
433
|
/** HRV data */
|
|
428
434
|
HRV: string;
|
|
435
|
+
/** The number of ECG points T1 and T2 (with the higher points following) */
|
|
436
|
+
ECGPointCount: string;
|
|
429
437
|
/** ECG mood value */
|
|
430
438
|
ECGMoodValue: string;
|
|
431
439
|
/** ECG value */
|
|
@@ -436,7 +444,7 @@ export declare const DeviceKey: {
|
|
|
436
444
|
KAlarmId: string;
|
|
437
445
|
/** Alarm switch */
|
|
438
446
|
OpenOrClose: string;
|
|
439
|
-
/** Alarm type */
|
|
447
|
+
/** Alarm clock type, 0 indicates Disable; 1 is an Enable alarm clock, 2 is a reminder for taking medicine, and 3 is a reminder for drinking water. */
|
|
440
448
|
ClockType: string;
|
|
441
449
|
/** Alarm time */
|
|
442
450
|
ClockTime: string;
|
|
@@ -446,6 +454,10 @@ export declare const DeviceKey: {
|
|
|
446
454
|
KAlarmContent: string;
|
|
447
455
|
/** Alarm length */
|
|
448
456
|
KAlarmLength: string;
|
|
457
|
+
/** Total number of alarms */
|
|
458
|
+
KAlarmTotal: string;
|
|
459
|
+
/** Alarm index */
|
|
460
|
+
KAlarmIndex: string;
|
|
449
461
|
/** Axillary temperature */
|
|
450
462
|
axillaryTemperature: string;
|
|
451
463
|
/** Band number */
|
|
@@ -512,5 +524,7 @@ export declare const DeviceKey: {
|
|
|
512
524
|
displayTemp: string;
|
|
513
525
|
/** ntc temperature*/
|
|
514
526
|
ntcTemps: string;
|
|
527
|
+
/** ECG Id */
|
|
528
|
+
ECGId: string;
|
|
515
529
|
};
|
|
516
|
-
export type DeviceType = '2208' | '2208A' | 'V4' | 'V5';
|
|
530
|
+
export type DeviceType = '2208' | '2208A' | 'V4' | 'V5' | '2025' | 'V8';
|
package/build/sdk/bleSDK.d.ts
CHANGED
|
@@ -277,7 +277,7 @@ export declare class BleSDK {
|
|
|
277
277
|
*/
|
|
278
278
|
static getDeviceTime(): number[];
|
|
279
279
|
/**
|
|
280
|
-
*
|
|
280
|
+
* 2025E Device Information Settings
|
|
281
281
|
* Set device information
|
|
282
282
|
* @param {MyDeviceInfo} deviceBaseParameter
|
|
283
283
|
* @return {*} {number[]} Command packet to send to the firmware
|
|
@@ -291,14 +291,52 @@ export declare class BleSDK {
|
|
|
291
291
|
* @returns
|
|
292
292
|
*/
|
|
293
293
|
static setDeviceInfoV5(isHeart: boolean, isMotionDetection: boolean, isDay: boolean): number[];
|
|
294
|
+
/**
|
|
295
|
+
* Generate the "Set Device ID" command
|
|
296
|
+
* @param idBytes number[] 6-byte ID, high byte first
|
|
297
|
+
* @returns number[] command array ready to send
|
|
298
|
+
*/
|
|
299
|
+
static setDeviceID(idBytes: number[]): number[];
|
|
300
|
+
/**
|
|
301
|
+
* Generate reminder command
|
|
302
|
+
* @param type reminder type (0~11, 0xFF = stop call)
|
|
303
|
+
* @param message reminder content (max 60 bytes)
|
|
304
|
+
* @param contact contact content (max 15 bytes)
|
|
305
|
+
*/
|
|
306
|
+
static reminderCommand(type: number, message: string, contact: string): number[];
|
|
307
|
+
/**
|
|
308
|
+
* Generate weather update command (Hermes safe)
|
|
309
|
+
*/
|
|
310
|
+
static updateWeather(params: {
|
|
311
|
+
weatherCode: number;
|
|
312
|
+
currentTemp: number;
|
|
313
|
+
maxTemp: number;
|
|
314
|
+
minTemp: number;
|
|
315
|
+
aqi: number;
|
|
316
|
+
address: string;
|
|
317
|
+
}): number[];
|
|
318
|
+
/**
|
|
319
|
+
* Seniverse weather code → device AA
|
|
320
|
+
*/
|
|
321
|
+
static mapWeatherCode(code: number | string): number;
|
|
294
322
|
/**
|
|
295
323
|
* Health measurement control
|
|
296
324
|
*
|
|
297
|
-
* @param {number} dataType Measurement type: 0x01 - HRV, 0x02 - Heart rate, 0x03 - Blood oxygen
|
|
325
|
+
* @param {number} dataType Measurement type: 0x01 - HRV, 0x02 - Heart rate, 0x03 - Blood oxygen Ox04 - ECG,
|
|
298
326
|
* @param {boolean} open 1 to start measurement, 0 to stop measurement
|
|
327
|
+
* @param {number} measurementTime Measurement duration in seconds
|
|
299
328
|
* @return {*} {number[]} Command packet to send to the firmware
|
|
300
329
|
*/
|
|
301
|
-
static healthMeasurementWithDataType(dataType: number, open: boolean): number[];
|
|
330
|
+
static healthMeasurementWithDataType(dataType: number, open: boolean, measurementTime: number | null): number[];
|
|
331
|
+
/**
|
|
332
|
+
*
|
|
333
|
+
*
|
|
334
|
+
* @static ECG real-time waveform
|
|
335
|
+
* @param {boolean} open
|
|
336
|
+
* @return {*} {number[]}
|
|
337
|
+
* @memberof BleSDK
|
|
338
|
+
*/
|
|
339
|
+
static realECGWave(open: boolean): number[];
|
|
302
340
|
/**
|
|
303
341
|
*
|
|
304
342
|
* Set the wristband dial mode
|
|
@@ -417,6 +455,19 @@ export declare class BleSDK {
|
|
|
417
455
|
*/
|
|
418
456
|
static setAlarmClock(arrayClockAlarm: any[]): number[][];
|
|
419
457
|
/**
|
|
458
|
+
* Convert text to UTF-8 bytes safely, max 30 bytes, Chinese safe
|
|
459
|
+
* @param text Input text
|
|
460
|
+
* @param maxBytes Maximum bytes, default 30
|
|
461
|
+
* @returns number[] Byte array, automatically filled with 0
|
|
462
|
+
*/
|
|
463
|
+
static textToUtf8BytesSafe(text: string, maxBytes?: number): number[];
|
|
464
|
+
/**
|
|
465
|
+
* Encode a single character to UTF-8 bytes
|
|
466
|
+
* @param char Single character
|
|
467
|
+
* @returns number[]
|
|
468
|
+
*/
|
|
469
|
+
private static utf8EncodeChar;
|
|
470
|
+
/**
|
|
420
471
|
*
|
|
421
472
|
* Get sedentary reminder settings
|
|
422
473
|
* @return {*} {number[]} Command packet to send to the firmware
|
|
@@ -440,5 +491,53 @@ export declare class BleSDK {
|
|
|
440
491
|
* @return {*} {number[]} Command packet to send to the device
|
|
441
492
|
*/
|
|
442
493
|
static getRealTimeSleepDataWithMode(mode: number): number[];
|
|
494
|
+
/**
|
|
495
|
+
* Entering Take Photo mode
|
|
496
|
+
* @returns
|
|
497
|
+
*/
|
|
498
|
+
static enterTakePhoto(): number[];
|
|
499
|
+
/**
|
|
500
|
+
* SOS function
|
|
501
|
+
* @returns
|
|
502
|
+
*/
|
|
503
|
+
static enterSOS(): number[];
|
|
504
|
+
/**
|
|
505
|
+
*One-click clear the historical data of the wristband without putting it into sleep mode.
|
|
506
|
+
* @returns
|
|
507
|
+
*/
|
|
508
|
+
static clearBraceletData(): number[];
|
|
509
|
+
/**
|
|
510
|
+
* start PPG realtime waveform transmission
|
|
511
|
+
*/
|
|
512
|
+
static startPPGRealtime(isOpen: boolean): number[];
|
|
513
|
+
/**
|
|
514
|
+
* Confirm unbind action
|
|
515
|
+
* @param confirm true = Yes (0x81), false = No (0x80)
|
|
516
|
+
*/
|
|
517
|
+
static confirmUnbind(confirm: boolean): number[];
|
|
518
|
+
/**
|
|
519
|
+
* Set Social Distance parameters
|
|
520
|
+
* @param interval Interval value (前提是开关打开设置的参数才生效)扫描时间间隔,单位是分钟。默认是2分钟
|
|
521
|
+
* @param duration Duration value 每次扫描时长:单位是秒。现在默认是30S
|
|
522
|
+
* @param rssi RSSI threshold 报警信号值:类型是int8,现在默认是-90 单字节带符号。
|
|
523
|
+
*/
|
|
524
|
+
static setSocialSetting(interval: number, duration: number, rssi: number): number[];
|
|
525
|
+
/**
|
|
526
|
+
* Get Social Distance parameters
|
|
527
|
+
*/
|
|
528
|
+
static getSocialSetting(): number[];
|
|
529
|
+
/**
|
|
530
|
+
*
|
|
531
|
+
* Get HRV test data
|
|
532
|
+
* @param {number} index Read the data from the first read test. The range is from 0 to 9, and a total of 10 sets of waveforms are saved.
|
|
533
|
+
* @param {string} time yyyy-MM-dd HH:mm:ss
|
|
534
|
+
* @return {*} {number[]} command packet, to be sent to the firmware
|
|
535
|
+
*/
|
|
536
|
+
static getEcgHistory(index: number, time: string): number[];
|
|
537
|
+
/**
|
|
538
|
+
* Delete all HRV test data
|
|
539
|
+
* @returns {*} {number[]} command packet, to be sent to the firmware
|
|
540
|
+
*/
|
|
541
|
+
static deleteAllEcgHistory(): number[];
|
|
443
542
|
}
|
|
444
543
|
export default BleSDK;
|
package/build/sdk/models.d.ts
CHANGED
|
@@ -17,6 +17,21 @@ export interface MyWeeksV4 {
|
|
|
17
17
|
/** Whether Saturday is enabled */
|
|
18
18
|
saturday: boolean;
|
|
19
19
|
}
|
|
20
|
+
export declare const ANCS_MASK: {
|
|
21
|
+
CALL: number;
|
|
22
|
+
SMS: number;
|
|
23
|
+
WECHAT: number;
|
|
24
|
+
FACEBOOK: number;
|
|
25
|
+
INSTAGRAM: number;
|
|
26
|
+
SKYPE: number;
|
|
27
|
+
TELEGRAM: number;
|
|
28
|
+
TWITTER: number;
|
|
29
|
+
VK: number;
|
|
30
|
+
WHATSAPP: number;
|
|
31
|
+
QQ: number;
|
|
32
|
+
LINKEDIN: number;
|
|
33
|
+
ENABLE_FLAG: number;
|
|
34
|
+
};
|
|
20
35
|
/**
|
|
21
36
|
* Personal information
|
|
22
37
|
*/
|
|
@@ -36,7 +51,7 @@ export interface MyPersonalInfo {
|
|
|
36
51
|
* Device details
|
|
37
52
|
*/
|
|
38
53
|
export interface MyDeviceInfo {
|
|
39
|
-
/** Distance unit, true =
|
|
54
|
+
/** Distance unit, true = miles, false = kilometers */
|
|
40
55
|
distanceUnit: boolean;
|
|
41
56
|
/** Whether using 12-hour format, true = 12-hour, false = 24-hour */
|
|
42
57
|
is12Hour: boolean;
|
|
@@ -48,14 +63,18 @@ export interface MyDeviceInfo {
|
|
|
48
63
|
nightMode: boolean;
|
|
49
64
|
/** ancs */
|
|
50
65
|
ancs: boolean;
|
|
66
|
+
/** ANCS 子开关掩码(0~0x7FFF) */
|
|
67
|
+
ancsMask: number;
|
|
51
68
|
/** Base heart rate */
|
|
52
69
|
baseHeart: number;
|
|
53
|
-
/** Screen brightness (0-100)
|
|
70
|
+
/** Screen brightness (0-100) 屏幕亮度调节,调节范围80-8f(0为最亮,f为最暗)*/
|
|
54
71
|
screenBrightness: number;
|
|
55
|
-
/** Dial index */
|
|
72
|
+
/** Dial index 表盘界面更换80-8A */
|
|
56
73
|
indexDial: number;
|
|
57
74
|
/** Language setting, e.g., 0 = Chinese, 1 = English */
|
|
58
75
|
languages: number;
|
|
76
|
+
/** 13 MM 社交距离 */
|
|
77
|
+
socialDistance: boolean;
|
|
59
78
|
}
|
|
60
79
|
/**
|
|
61
80
|
* Automatic heart rate monitoring configuration
|
|
@@ -255,6 +255,10 @@ export declare class ResolveUtil {
|
|
|
255
255
|
* @param value
|
|
256
256
|
* @returns
|
|
257
257
|
*/
|
|
258
|
+
/**
|
|
259
|
+
* ECG History Data Analysis
|
|
260
|
+
* @param value raw BLE data
|
|
261
|
+
*/
|
|
258
262
|
static getEcgHistoryData(value: number[]): any;
|
|
259
263
|
private static getEcgDataString;
|
|
260
264
|
/**
|
|
@@ -288,6 +292,13 @@ export declare class ResolveUtil {
|
|
|
288
292
|
* @returns
|
|
289
293
|
*/
|
|
290
294
|
static measurementWithType(flag: boolean, value: number[]): any;
|
|
295
|
+
/**
|
|
296
|
+
* Measurement type handling
|
|
297
|
+
* @param flag Enable measurement. true: real-time blood glucose measurement returns
|
|
298
|
+
* @param value Data returned by the firmware
|
|
299
|
+
* @returns
|
|
300
|
+
*/
|
|
301
|
+
static measurementWithTypeV8(flag: boolean, value: number[]): any;
|
|
291
302
|
static measurementWithTypeV5(flag: boolean, value: number[]): Record<string, any>;
|
|
292
303
|
static measurementWithTypeV4(flag: boolean, value: number[]): Record<string, any>;
|
|
293
304
|
/**
|
|
@@ -414,4 +425,9 @@ export declare class ResolveUtil {
|
|
|
414
425
|
*/
|
|
415
426
|
static getOffCheckStatus(value: number[]): any;
|
|
416
427
|
static getStepCount(value: number[]): number;
|
|
428
|
+
/**
|
|
429
|
+
* Obtain the real-time waveform of PPG. (2025E-03)
|
|
430
|
+
* @param value raw BLE data
|
|
431
|
+
*/
|
|
432
|
+
static getPPGWaveformData(value: number[]): any;
|
|
417
433
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var t=1,e=65,a=2,n=66,r=3,i=4,c=5,o=9,s=11,u=75,h=19,l=34,g=39,d=18,S=46,y=54,D=61,f=62,p=42,v=43,m=35,T=77,I=81,B=82,_=83,V=84,M=96,E=102,b=85,x=87,C=92,A=86,G=100,H=25,k=24,P=71,R=56,w=6,L=7,W=32,O=22,F=16,K=131,N=170,U=171,Q=21,j=36,Y=20,q=68,z=40,J=23,X=52,Z=90,$=97,tt=254,et=98,at=101,nt=176,rt=156,it=113,ct=120,ot=28,st=30,ut=99,ht=136,lt=137,gt=138,dt=120,St=58,yt=37,Dt=38,ft=107,pt={GetDeviceTime:"get_device_time",GetPersonalInfo:"get_personal_info",GetDeviceInfo:"get_device_info",RealTimeStep:"real_time_step",GetStepGoal:"get_step_goal",GetDeviceBatteryLevel:"get_device_battery_level",GetDeviceMacAddress:"get_device_mac_address",GetDeviceVersion:"get_device_version",CMD_Reset:"cmd_reset",CMD_MCUReset:"cmd_mcu_reset",Notify:"notify",GetDeviceName:"get_device_name",SetAlarmClockWithAllClock:"set_alarm_clock_with_all_clock",Gps:"GPS",GetPPIData:"GetPPIData",GetHrvTimeValue:"GetHrvTimeValue",CloseDevices:"CloseDevices",GetOffCheckStatus:"GetOffCheckStatus",GetAutomaticHRMonitoring:"GetAutomaticHRMonitoring",GetSedentaryReminder:"GetSedentaryReminder",GetTotalActivityData:"GetTotalActivityData",GetDetailActivityData:"GetDetailActivityData",GetDetailSleepData:"GetDetailSleepData",AutoBloodOxygen:"AutoBloodOxygen",GetDynamicHR:"GetDynamicHR",ECGdata:"ECGdata",GetWomenHealth:"GetWomenHealth",CMD_Set_TemperatureCorrection:"CMD_Set_TemperatureCorrection",GetStaticHR:"GetStaticHR",Blood_oxygen:"Blood_oxygen",GetHRVData:"GetHRVData",GetAxillaryTemperatureDataWithMode:"GetAxillaryTemperatureDataWithMode",EnterQrCode:"EnterQrCode",QrCodeBandBack:"QrCodeBandBack",ExitQrCode:"ExitQrCode",Temperature_history:"Temperature_history",GetActivityModeData:"GetActivityModeData",EnterActivityMode:"EnterActivityMode",SetDeviceTime:"SetDeviceTime",GetAlarmClock:"GetAlarmClock",EcgppGstatus:"EcgppGstatus",GetEcgPpgStatus:"GetEcgPpgStatus",ENTERECG:"ENTERECG",MeasurementHrvCallback:"MeasurementHrvCallback",MeasurementHeartCallback:"MeasurementHeartCallback",MeasurementOxygenCallback:"MeasurementOxygenCallback",MeasurementTempCallback:"MeasurementTempCallback",StopMeasurementHrvCallback:"StopMeasurementHrvCallback",StopMeasurementHeartCallback:"StopMeasurementHeartCallback",StopMeasurementOxygenCallback:"StopMeasurementOxygenCallback",StopMeasurementTempCallback:"StopMeasurementTempCallback",Braceletdial:"Braceletdial",Braceletdialok:"Braceletdialok",GetSportMode:"GetSportMode",GPSControlCommand:"GPSControlCommand",SocialdistanceGetting:"SocialdistanceGetting",EcgppG:"EcgppG",DeviceSendDataToAPP:"DeviceSendDataToAPP",SetNewDeviceInfo:"SetNewDeviceInfo",GetNewDeviceInfo:"GetNewDeviceInfo",BoolsugarStatus:"BoolsugarStatus",BoolsugarValue:"BoolsugarValue",GetPregnancyCycle:"GetPregnancyCycle",SetStepGoal:"SetStepGoal",SetPersonalInfo:"SetPersonalInfo",SetMotorVibrationWithTimes:"SetMotorVibrationWithTimes",SetDeviceInfo:"SetDeviceInfo",SetAutomaticHRMonitoring:"SetAutomaticHRMonitoring",SetSedentaryReminder:"SetSedentaryReminder",EnterPhotoMode:"EnterPhotoMode",BackHomeView:"BackHomeView",Weather:"Weather",SportMode:"SportMode",Clear_Bracelet_data:"Clear_Bracelet_data",SocialdistanceSetting:"SocialdistanceSetting",Sos:"Sos",SetPregnancyCycle:"SetPregnancyCycle",DeleteECGdata:"DeleteECGdata",ECG:"ECG",SetWomenHealth:"SetWomenHealth",ppgStartSucessed:"ppgStartSucessed",ppgResult:"ppgResult",ppgStop:"ppgStop",ppgMeasurementProgress:"ppgMeasurementProgress",ppgQuit:"ppgQuit",ppgStartFailed:"ppgStartFailed",CMD_Set_Mac:"CMD_Set_Mac",CloseECG:"CloseECG",GetAlarmClock_V4:"GetAlarmClock_V4",DeleteAllAlarmClock_V4:"DeleteAllAlarmClock_V4",SetAlarmClock_V4:"SetAlarmClock_V4",GetSedentaryReminder_V4:"GetSedentaryReminder_V4",SetSedentaryReminder_V4:"SetSedentaryReminder_V4",GetRealTimeTemperatureCorrection:"GetRealTimeTemperatureCorrection"},vt={DeviceTime:"device_time",GPSTime:"gps_time",DataType:"data_type",End:"end",Data:"data",Gender:"gender",Age:"age",Height:"height",Weight:"weight",Stride:"stride",KUserDeviceId:"k_user_device_id",KClockLast:"k_clock_last",Step:"step",Calories:"calories",Distance:"distance",ExerciseMinutes:"exercise_minutes",HeartRate:"heart_rate",ActiveMinutes:"active_minutes",TempData:"temp_data",Blood_oxygen:"blood_oxygen",StepGoal:"step_goal",DistanceGoal:"distance_goal",CalorieGoal:"calorie_goal",SleepTimeGoal:"sleep_time_goal",BatteryLevel:"battery_level",MacAddress:"mac_address",DeviceVersion:"device_version",DeviceName:"device_name",Date:"date",Latitude:"latitude",Longitude:"longitude",TOTAL_ID:"totalId",PPI_ID:"ppiId",PPI_LIST:"ppiList",PPI_NUM:"ppiNum",PPI_UNIT:"ppiUnit",HRV_TIME_MODE:"hrvTimeMode",HRV_TIME_Value:"hrvTimeValue",RESULT:"result",GET_OFF_TAG:"getOffTag",GET_OFF_STATE:"getOffState",DistanceUnit:"distance_unit",TimeUnit:"time_unit",StatusOfTheRaisedHandOnscreen:"status_of_the_raised_hand_onscreen",TempUnit:"temp_unit",NightMode:"night_mode",ANCSMode:"ANCS_mode",KBaseHeart:"k_base_heart",ScreenBrightness:"screen_brightness",Dialinterface:"dial_interface",SocialDistancedwitch:"social_distance_switch",ChineseOrEnglish:"chinese_or_english",WorkMode:"work_mode",StartTime:"start_time",KHeartStartMinter:"kheart_start_minter",EndTime:"end_time",KHeartEndMinter:"kheart_end_minter",Weeks:"weeks",IntervalTime:"interval_time",StartTimeHour:"StartTimeHour",StartTimeMin:"StartTimeMin",EndTimeHour:"EndTimeHour",EndTimeMin:"EndTimeMin",LeastSteps:"LeastSteps",Week:"week",Goal:"Goal",KDetailMinterStep:"KDetailMinterStep",ArraySteps:"ArraySteps",ArraySleep:"ArraySleep",ActivityArray:"ActivityArray",sleepUnitLength:"sleepUnitLength",StaticHR:"StaticHR",WomenHealthPeriod:"WomenHealthPeriod",WomenHealthLength:"WomenHealthLength",TemperatureCorrectionValue:"TemperatureCorrectionValue",HRV:"HRV",ECGMoodValue:"ECGMoodValue",ECGValue:"ECGValue",ArrayDynamicHR:"ArrayDynamicHR",KAlarmId:"KAlarmId",OpenOrClose:"OpenOrClose",ClockType:"ClockType",ClockTime:"ClockTime",KAlarmMinter:"KAlarmMinter",KAlarmContent:"KAlarmContent",KAlarmLength:"KAlarmLength",axillaryTemperature:"axillaryTemperature",Band:"Band",temperature:"temperature",ActivityMode:"ActivityMode",Pace:"Pace",KPhoneDataLength:"KPhoneDataLength",VascularAging:"VascularAging",Stress:"Stress",highBP:"highBP",lowBP:"lowBP",EcgStatus:"ecgStatus",PPGValue:"ppgValue",ECGHrvValue:"ecgHrvValue",ECGAvBlockValue:"ecgAvBlockValue",ECGHrValue:"ecgHrValue",ECGStreesValue:"ecgStressValue",ECGhighBpValue:"ecgHighBpValue",ECGLowBpValue:"ecgLowBpValue",ECGBreathValue:"ecgBreathValue",KActivityLocationTime:"activityLocationTime",KActivityLocationLatitude:"activityLocationLatitude",KActivityLocationLongitude:"activityLocationLongitude",KActivityLocationCount:"activityLocationCount",DayOfWeek:"dayOfWeek",Text:"text",TextLength:"textLength",IsDeleteData:"isDeleteData",SportEnable:"SportEnable",HeartEnable:"HeartEnable",HeartDayEnable:"HeartDayEnable",highestTemp:"highestTemp",displayTemp:"displayTemp",ntcTemps:"ntcTemps"},mt=function(){function t(){}return t.hexByte2Int=function(t,e){return(255&t)*Math.pow(256,e)},t.bcd2String=function(t){var e=15&t;return"".concat((240&t)>>4).concat(e)},t.intList2String=function(t){return t.map(function(t){return t.toString(16).padStart(2,"0").toUpperCase()}).join(" ")},t.intList3String=function(t){return t.map(function(t){return t.toString(16).padStart(2,"0").toLowerCase()}).join(" ")},t.setMacSuccessful=function(){var t;return(t={})[vt.DataType]=pt.CMD_Set_Mac,t[vt.End]=!0,t[vt.Data]={},t},t.intBitToDouble=function(t){var e=new ArrayBuffer(8),a=new DataView(e);return a.setInt32(0,t,!1),a.getFloat32(0,!1)},t.getDeviceTime=function(t){var e,a,n="20".concat(this.bcd2String(t[1]),"-").concat(this.bcd2String(t[2]),"-").concat(this.bcd2String(t[3])," ").concat(this.bcd2String(t[4]),":").concat(this.bcd2String(t[5]),":").concat(this.bcd2String(t[6])),r="".concat(this.bcd2String(t[9]),".").concat(this.bcd2String(t[10]),".").concat(this.bcd2String(t[11]));return(e={})[vt.DataType]=pt.GetDeviceTime,e[vt.End]=!0,e[vt.Data]=((a={})[vt.DeviceTime]=n,a[vt.GPSTime]=r,a),e},t.int2Ascll=function(t){if(t<0||t>255)throw new Error("Value must be between 0 and 255");return String.fromCharCode(t)},t.getGpsTime=function(t){return"".concat(this.bcd2String(t[9]),".").concat(this.bcd2String(t[10]),".").concat(this.bcd2String(t[11]))},t.getUserInfo=function(t){for(var e,a,n=new Array(6).fill(0),r=0;r<5;r++)n[r]=this.hexByte2Int(t[r+1],0);var i="";for(r=6;r<12;r++)0!==t[r]&&(i+=String.fromCharCode(this.hexByte2Int(t[r],0)));return(e={})[vt.DataType]=pt.GetPersonalInfo,e[vt.End]=!0,e[vt.Data]=((a={})[vt.Gender]=n[0],a[vt.Age]=n[1],a[vt.Height]=n[2],a[vt.Weight]=n[3],a[vt.Stride]=n[4],a[vt.KUserDeviceId]=i,a),e},t.getDeviceInfo=function(t,e){var a,n,r,i;return void 0===e&&(e="2208"),"V5"===e?((a={})[vt.DataType]=pt.GetDeviceInfo,a[vt.End]=!0,a[vt.Data]=((n={})[vt.SportEnable]=this.hexByte2Int(t[5],0).toString(),n[vt.HeartEnable]=this.hexByte2Int(t[6],0).toString(),n[vt.HeartDayEnable]=this.hexByte2Int(t[14],0).toString(),n),a):((r={})[vt.DataType]=pt.GetDeviceInfo,r[vt.End]=!0,r[vt.Data]=((i={})[vt.DistanceUnit]=this.hexByte2Int(t[1],0).toString(),i[vt.TimeUnit]=this.hexByte2Int(t[2],0).toString(),i[vt.StatusOfTheRaisedHandOnscreen]=this.hexByte2Int(t[3],0).toString(),i[vt.TempUnit]=this.hexByte2Int(t[4],0).toString(),i[vt.NightMode]=this.hexByte2Int(t[5],0).toString(),i[vt.ANCSMode]=this.hexByte2Int(t[6],0).toString(),i[vt.KBaseHeart]=this.hexByte2Int(t[9],0).toString(),i[vt.ScreenBrightness]=this.hexByte2Int(t[11],0).toString(),i[vt.Dialinterface]=this.hexByte2Int(t[12],0).toString(),i[vt.SocialDistancedwitch]=this.hexByte2Int(t[13],0).toString(),i[vt.ChineseOrEnglish]=this.hexByte2Int(t[14],0).toString(),i),r)},t.getActivityData=function(t){for(var e,a,n=0,r=0,i=0,c=0,o=0,s=1;s<5;s++)n+=this.hexByte2Int(t[s],s-1);for(s=5;s<9;s++)r+=this.hexByte2Int(t[s],s-5);for(s=9;s<13;s++)i+=this.hexByte2Int(t[s],s-9);for(s=13;s<17;s++)c+=this.hexByte2Int(t[s],s-13);for(s=17;s<21;s++)o+=this.hexByte2Int(t[s],s-17);var u=this.hexByte2Int(t[21],0),h=0,l=0;return t.length>22&&(h=this.hexByte2Int(t[22],0)+this.hexByte2Int(t[23],1),t.length>24&&(l=this.hexByte2Int(t[24],0))),(e={})[vt.DataType]=pt.RealTimeStep,e[vt.End]=!0,e[vt.Data]=((a={})[vt.Step]=n.toString(),a[vt.Calories]=(r/100).toFixed(1),a[vt.Distance]=(i/100).toFixed(1),a[vt.ExerciseMinutes]=(c/60).toString(),a[vt.HeartRate]=u.toString(),a[vt.ActiveMinutes]=o.toString(),a[vt.TempData]=h.toFixed(1),a[vt.Blood_oxygen]=l.toString(),a),e},t.getGoal=function(t){for(var e,a,n=0,r=0,i=0,c=0,o=0;o<4;o++)n+=this.hexByte2Int(t[o+1],o);for(o=0;o<=1;o++)r+=this.hexByte2Int(t[o+7],o);for(o=0;o<=1;o++)i+=this.hexByte2Int(t[o+9],o);for(o=0;o<=1;o++)c+=this.hexByte2Int(t[o+11],o);return(e={})[vt.DataType]=pt.GetStepGoal,e[vt.End]=!0,e[vt.Data]=((a={})[vt.StepGoal]=n.toString(),a[vt.DistanceGoal]=r.toString(),a[vt.CalorieGoal]=i.toString(),a[vt.SleepTimeGoal]=c.toString(),a),e},t.getDeviceBattery=function(t){var e,a,n=this.hexByte2Int(t[1],0);return(e={})[vt.DataType]=pt.GetDeviceBatteryLevel,e[vt.End]=!0,e[vt.Data]=((a={})[vt.BatteryLevel]=n.toString(),a),e},t.getDeviceAddress=function(t){var e,a;if(0===t.length)return{};for(var n=[],r=1;r<7;r++){var i=t[r].toString(16).padStart(2,"0");n.push(i)}var c=n.join(":");return(e={})[vt.DataType]=pt.GetDeviceMacAddress,e[vt.End]=!0,e[vt.Data]=((a={})[vt.MacAddress]=c,a),e},t.getDeviceVersion=function(t){var e,a;if(0===t.length)return{};for(var n=[],r=1;r<5;r++)n.push(t[r].toString(16));var i=n.join(".");return(e={})[vt.DataType]=pt.GetDeviceVersion,e[vt.End]=!0,e[vt.Data]=((a={})[vt.DeviceVersion]=i,a),e},t.reset=function(){var t;return(t={})[vt.DataType]=pt.CMD_Reset,t[vt.End]=!0,t},t.mcuReset=function(){var t;return(t={})[vt.DataType]=pt.CMD_MCUReset,t[vt.End]=!0,t},t.notify=function(){var t;return(t={})[vt.DataType]=pt.Notify,t[vt.End]=!0,t},t.getDeviceName=function(t){for(var e,a,n="",r=1;r<15;r++){var i=this.hexByte2Int(t[r],0);0===i||i>127||(n+=String.fromCharCode(i))}return(e={})[vt.DataType]=pt.GetDeviceName,e[vt.End]=!0,e[vt.Data]=((a={})[vt.DeviceName]=n,a),e},t.getAutoHeart=function(t){var e,a,n=this.hexByte2Int(t[7],0)+this.hexByte2Int(t[8],1);return(e={})[vt.DataType]=pt.GetAutomaticHRMonitoring,e[vt.End]=!0,e[vt.Data]=((a={})[vt.WorkMode]=this.hexByte2Int(t[1],0).toString(),a[vt.StartTime]=this.bcd2String(t[2]),a[vt.KHeartStartMinter]=this.bcd2String(t[3]),a[vt.EndTime]=this.bcd2String(t[4]),a[vt.KHeartEndMinter]=this.bcd2String(t[5]),a[vt.Weeks]=this.getByteString(t[6]),a[vt.IntervalTime]=n.toString(),a),e},t.getWeekInt=function(t){for(var e=0,a=0;a<t.length;a++)1===t[a]&&(e+=Math.pow(2,a));return e},t.getByteString=function(t){for(var e=new Array(8).fill(0),a=[],n=0;n<=6;n++)e[n]=1&t,t>>=1,a.push(e[n].toString());return a.join("-")},t.getByteArray=function(t){for(var e=new Array(8).fill(0),a="",n=0;n<=7;n++)e[n]=1&t,t>>=1,a+=e[n];return a},t._hexByte2Int=function(t,e){return t<<8*e},t._bcd2String=function(t){var e=15&t;return"".concat(t>>4&15).concat(e)},t.getActivityAlarm=function(t){var e,a,n=((e={})[vt.StartTimeHour]=this._bcd2String(t[1]),e[vt.StartTimeMin]=this._bcd2String(t[2]),e[vt.EndTimeHour]=this._bcd2String(t[3]),e[vt.EndTimeMin]=this._bcd2String(t[4]),e[vt.Week]=this.getByteString(t[5]),e[vt.IntervalTime]=this._hexByte2Int(t[6],0).toString(),e[vt.LeastSteps]=this._hexByte2Int(t[7],0).toString(),e[vt.OpenOrClose]=this._hexByte2Int(t[8],0).toString(),e);return(a={})[vt.DataType]=pt.GetSedentaryReminder,a[vt.End]=!0,a[vt.Data]=n,a},t.getTotalStepData=function(t){var e,a;console.log("total:",t);var n=((e={})[vt.DataType]=pt.GetTotalActivityData,e[vt.End]=!1,e[vt.Data]=[],e),r=this.getStepCount(t),i=t.length,c=Math.floor(i/r);if(0===c)return n[vt.End]=!0,n;for(var o=0;o<c;o++){var s=1+(o+1)*r;s<i&&255===t[s]&&(n[vt.End]=!0);for(var u="20".concat(this._bcd2String(t[2+o*r]),".").concat(this._bcd2String(t[3+o*r]),".").concat(this._bcd2String(t[4+o*r])),h=0,l=0;l<4;l++)h+=this._hexByte2Int(t[5+l+o*r],l);var g=0;for(l=0;l<4;l++)g+=this._hexByte2Int(t[9+l+o*r],l);var d=0;for(l=0;l<4;l++)d+=this._hexByte2Int(t[13+l+o*r],l);var S=0;for(l=0;l<4;l++)S+=this._hexByte2Int(t[17+l+o*r],l);var y=26==r?this._hexByte2Int(t[21+o*r],0):this._hexByte2Int(t[21+o*r],0)+this._hexByte2Int(t[22+o*r],1),D=0;for(l=0;l<4;l++)D+=this._hexByte2Int(t[r-4+l+o*r],l);n[vt.Data].push(((a={})[vt.Date]=u,a[vt.Step]=h.toString(),a[vt.ExerciseMinutes]=g.toString(),a[vt.Calories]=(S/100).toFixed(1),a[vt.Distance]=(d/100).toFixed(1),a[vt.Goal]=y.toString(),a[vt.ActiveMinutes]=D,a))}return n},t.getDetailData=function(t){var e,a,n=((e={})[vt.DataType]=pt.GetDetailActivityData,e[vt.End]=!1,e[vt.Data]=[],e),r=t.length,i=Math.floor(r/25);if(0===i)return n[vt.End]=!0,n;for(var c=0;c<i;c++){255===t[r-1]&&(n[vt.End]=!0);for(var o="20".concat(this._bcd2String(t[3+25*c]),".").concat(this._bcd2String(t[4+25*c]),".").concat(this._bcd2String(t[5+25*c])," ").concat(this._bcd2String(t[6+25*c]),":").concat(this._bcd2String(t[7+25*c]),":").concat(this._bcd2String(t[8+25*c])),s=0,u=0;u<2;u++)s+=this._hexByte2Int(t[9+u+25*c],u);var h=0;for(u=0;u<2;u++)h+=this._hexByte2Int(t[11+u+25*c],u);var l=0;for(u=0;u<2;u++)l+=this._hexByte2Int(t[13+u+25*c],u);var g=[];for(u=0;u<10;u++)g.push(this._hexByte2Int(t[15+u+25*c],0).toString());n[vt.Data].push(((a={})[vt.Date]=o,a[vt.KDetailMinterStep]=s.toString(),a[vt.Calories]=(h/100).toFixed(2),a[vt.Distance]=(l/100).toFixed(2),a[vt.ArraySteps]=g.join(" "),a))}return n},t.getSleepData=function(t){var e,a,n,r=t.length,i=((e={})[vt.DataType]=pt.GetDetailSleepData,e[vt.End]=!1,e[vt.Data]=[],e),c=255===t[t.length-1]&&t[t.length-2]===_;if(c&&(i[vt.End]=!0),130===r||c&&132===r){for(var o="20".concat(this._bcd2String(t[3]),"-").concat(this._bcd2String(t[4]),"-").concat(this._bcd2String(t[5])," ").concat(this._bcd2String(t[6]),":").concat(this._bcd2String(t[7]),":").concat(this._bcd2String(t[8])),s=this._hexByte2Int(t[9],0),u=[],h=0;h<s;h++)u.push(this._hexByte2Int(t[10+h],0).toString());i[vt.Data].push(((a={})[vt.Date]=o,a[vt.ArraySleep]=u.join(" "),a[vt.sleepUnitLength]="1",a))}else{var l=Math.floor(r/34);if(0===l)return i[vt.End]=!0,i;for(var g=0;g<l;g++){for(o="20".concat(this._bcd2String(t[3+34*g]),"-").concat(this._bcd2String(t[4+34*g]),"-").concat(this._bcd2String(t[5+34*g])," ").concat(this._bcd2String(t[6+34*g]),":").concat(this._bcd2String(t[7+34*g]),":").concat(this._bcd2String(t[8+34*g])),s=this._hexByte2Int(t[9+34*g],0),u=[],h=0;h<s;h++)u.push(this._hexByte2Int(t[10+h+34*g],0).toString());i[vt.Data].push(((n={})[vt.Date]=o,n[vt.ArraySleep]=u.join(" "),n[vt.sleepUnitLength]="5",n))}}return i},t.getSleepActivityLevelsData=function(t){var e,a=t.length,n=((e={})[vt.DataType]=pt.GetRealTimeTemperatureCorrection,e),r=[];n[vt.Data]=r;var i=255===t[t.length-1]&&t[t.length-2]===ft;if(i&&(n[vt.End]=!0),130===a||i&&132===a){var c={},o="20".concat(this._bcd2String(t[3]),"-").concat(this._bcd2String(t[4]),"-").concat(this._bcd2String(t[5])," ").concat(this._bcd2String(t[6]),":").concat(this._bcd2String(t[7]),":").concat(this._bcd2String(t[8]));c[vt.Date]=o;for(var s=this._hexByte2Int(t[9],0),u=[],h=0;h<s;h++){var l=t[10+h],g=l>>4&15,d=15&l;u.push(g,d)}for(var S="",y=10+s;y<t.length;y++)S+=this._hexByte2Int(t[y],0),y!==t.length-1&&(S+=" ");var D="";for(h=0;h<u.length;h++)D+=u[h],h!==u.length-1&&(D+=" ");c[vt.ArraySleep]=D,c[vt.ActivityArray]=S,c[vt.sleepUnitLength]="1",r.push(c)}return n},t.getAutoBloodOxygen=function(t){var e,a,n=((e={})[vt.DataType]=pt.AutoBloodOxygen,e[vt.End]=!1,e[vt.Data]=[],e),r=10,i=t.length,c=Math.floor(i/r);if(0===c)return n[vt.End]=!0,n;for(var o=0;o<c;o++){255===t[i-1]&&(n[vt.End]=!0);var s="20".concat(this._bcd2String(t[3+o*r]),".").concat(this._bcd2String(t[4+o*r]),".").concat(this._bcd2String(t[5+o*r])," ").concat(this._bcd2String(t[6+o*r]),":").concat(this._bcd2String(t[7+o*r]),":").concat(this._bcd2String(t[8+o*r])),u=this._hexByte2Int(t[9+10*o],0).toString();n[vt.Data].push(((a={})[vt.Date]=s,a[vt.Blood_oxygen]=u,a))}return n},t.getBloodoxygen=function(t){var e,a,n=((e={})[vt.DataType]=pt.Blood_oxygen,e[vt.End]=!1,e[vt.Data]=[],e),r=10,i=t.length,c=Math.floor(i/r);if(0===c)return n[vt.End]=!0,n;for(var o=0;o<c;o++){255===t[i-1]&&(n[vt.End]=!0);var s="20".concat(this._bcd2String(t[3+o*r]),".").concat(this._bcd2String(t[4+o*r]),".").concat(this._bcd2String(t[5+o*r])," ").concat(this._bcd2String(t[6+o*r]),":").concat(this._bcd2String(t[7+o*r]),":").concat(this._bcd2String(t[8+o*r])),u=this._hexByte2Int(t[9+10*o],0).toString();n[vt.Data].push(((a={})[vt.Date]=s,a[vt.Blood_oxygen]=u,a))}return n},t.getHeartData=function(t){var e,a,n=((e={})[vt.DataType]=pt.GetDynamicHR,e[vt.End]=!1,e[vt.Data]=[],e),r=24,i=t.length,c=Math.floor(i/r);if(0===c)return n[vt.End]=!0,n;for(var o=0;o<c;o++){255===t[i-1]&&(n[vt.End]=!0);for(var s="20".concat(this._bcd2String(t[3+o*r]),".").concat(this._bcd2String(t[4+o*r]),".").concat(this._bcd2String(t[5+o*r])," ").concat(this._bcd2String(t[6+o*r]),":").concat(this._bcd2String(t[7+o*r]),":").concat(this._bcd2String(t[8+o*r])),u=[],h=0;h<15;h++)u.push(this._hexByte2Int(t[9+h+o*r],0).toString());n[vt.Data].push(((a={})[vt.Date]=s,a[vt.ArrayDynamicHR]=u.join(" "),a))}return n},t.getOnceHeartData=function(t){var e,a,n=((e={})[vt.DataType]=pt.GetStaticHR,e[vt.End]=!1,e[vt.Data]=[],e),r=t.length,i=Math.floor(r/10);if(0===i||1===i&&153===t[1])return n[vt.End]=!0,n;for(var c=0;c<i;c++){255===t[r-1]&&(n[vt.End]=!0);var o="20".concat(this._bcd2String(t[3+10*c]),".").concat(this._bcd2String(t[4+10*c]),".").concat(this._bcd2String(t[5+10*c])," ").concat(this._bcd2String(t[6+10*c]),":").concat(this._bcd2String(t[7+10*c]),":").concat(this._bcd2String(t[8+10*c])),s=this._hexByte2Int(t[9+10*c],0).toString();n[vt.Data].push(((a={})[vt.Date]=o,a[vt.StaticHR]=s,a))}return n},t.getHrvTestData=function(t){var e,a,n=((e={})[vt.DataType]=pt.GetHRVData,e[vt.End]=!1,e[vt.Data]=[],e),r=15,i=t.length,c=Math.floor(i/r);if(0===c)return n[vt.End]=!0,n;255===t[t.length-1]&&(n[vt.End]=!0);for(var o=0;o<c;o++){var s="20".concat(this.bcd2String(t[3+o*r]),".").concat(this.bcd2String(t[4+o*r]),".").concat(this.bcd2String(t[5+o*r])," ").concat(this.bcd2String(t[6+o*r]),":").concat(this.bcd2String(t[7+o*r]),":").concat(this.bcd2String(t[8+o*r])),u=this.hexByte2Int(t[9+o*r],0).toString(),h=this.hexByte2Int(t[10+o*r],0).toString(),l=this.hexByte2Int(t[11+o*r],0).toString(),g=this.hexByte2Int(t[12+o*r],0).toString(),d=this.hexByte2Int(t[13+o*r],0).toString(),S=this.hexByte2Int(t[14+o*r],0).toString();n[vt.Data].push(((a={})[vt.Date]=s,a[vt.HRV]=u,a[vt.VascularAging]=h,a[vt.HeartRate]=l,a[vt.Stress]=g,a[vt.highBP]=d,a[vt.lowBP]=S,a))}return n},t.getClockData=function(t){var e,a;console.log("getClockData:",t);var n=((e={})[vt.DataType]=pt.GetAlarmClock,e[vt.End]=!1,e[vt.Data]=[],e),r=41,i=t.length,c=!1,o=Math.floor(i/r);if(0===o)return n[vt.End]=!0,n;153==t[1]&&16==i&&(c=!0),n[vt.IsDeleteData]=c;for(var s=0;s<o;s++){var u=1+(s+1)*r;u<i&&255===t[u]&&(n[vt.End]=!0);for(var h=this.hexByte2Int(t[4+s*r],0).toString(),l=this.hexByte2Int(t[5+s*r],0).toString(),g=this.hexByte2Int(t[6+s*r],0).toString(),d=this.bcd2String(t[7+s*r]),S=this.bcd2String(t[8+s*r]),y=this.hexByte2Int(t[9+s*r],0),D=this.hexByte2Int(t[10+s*r],0),f="",p=0;p<D;p++){var v=t[11+p+s*r];0!==v&&(f+=this.int2Ascll(this.hexByte2Int(v,0)))}n[vt.Data].push(((a={})[vt.KAlarmId]=h,a[vt.OpenOrClose]=l,a[vt.ClockType]=g,a[vt.ClockTime]=d,a[vt.KAlarmMinter]=S,a[vt.Week]=y,a[vt.KAlarmContent]=f,a[vt.KAlarmLength]=D.toString(),a))}return n},t.getTempDataer=function(t){var e,a,n=((e={})[vt.DataType]=pt.GetAxillaryTemperatureDataWithMode,e[vt.End]=!1,e[vt.Data]=[],e),r=11,i=t.length,c=Math.floor(i/r);if(0===c||255===t[i-1])return n[vt.End]=!0,n;for(var o=0;o<c;o++){255===t[i-1]&&(n[vt.End]=!0);var s="20".concat(this.bcd2String(t[3+o*r]),".").concat(this.bcd2String(t[4+o*r]),".").concat(this.bcd2String(t[5+o*r])," ").concat(this.bcd2String(t[6+o*r]),":").concat(this.bcd2String(t[7+o*r]),":").concat(this.bcd2String(t[8+o*r])),u=this.hexByte2Int(t[9+o*r],0)+this.hexByte2Int(t[10+o*r],1);n[vt.Data].push(((a={})[vt.Date]=s,a[vt.axillaryTemperature]=(.1*u).toFixed(1),a))}return n},t.getQrCode=function(t,e){var a,n,r,i;return e?((a={})[vt.DataType]=pt.EnterQrCode,a[vt.End]=!0,a[vt.Data]={},a):128===t[1]||129===t[1]?((n={})[vt.DataType]=pt.QrCodeBandBack,n[vt.End]=!0,n[vt.Data]=((r={})[vt.Band]=129===t[1]?"1":"0",r),n):((i={})[vt.DataType]=pt.ExitQrCode,i[vt.End]=!0,i[vt.Data]={},i)},t.getTempData=function(t){var e,a,n=((e={})[vt.DataType]=pt.Temperature_history,e[vt.End]=!1,e[vt.Data]=[],e),r=11,i=t.length,c=Math.floor(i/r);if(0===c||255===t[i-1]||1===c&&153===t[1])return n[vt.End]=!0,n;for(var o=0;o<c;o++){255===t[i-1]&&(n[vt.End]=!0);var s="20".concat(this.bcd2String(t[3+o*r]),".").concat(this.bcd2String(t[4+o*r]),".").concat(this.bcd2String(t[5+o*r])," ").concat(this.bcd2String(t[6+o*r]),":").concat(this.bcd2String(t[7+o*r]),":").concat(this.bcd2String(t[8+o*r])),u=this.hexByte2Int(t[9+o*r],0)+this.hexByte2Int(t[10+o*r],1);n[vt.Data].push(((a={})[vt.Date]=s,a[vt.temperature]=(.1*u).toFixed(1),a))}return n},t.getExerciseData=function(t){var e,a,n=((e={})[vt.DataType]=pt.GetActivityModeData,e[vt.End]=!1,e[vt.Data]=[],e),r=25,i=t.length,c=Math.floor(i/r);if(0===c)return n[vt.End]=!0,n;for(var o=0;o<c;o++){var s=1+(o+1)*r;s<i&&o===c-1&&255===t[s]&&(n[vt.End]=!0);for(var u="20".concat(this.bcd2String(t[3+o*r]),".").concat(this.bcd2String(t[4+o*r]),".").concat(this.bcd2String(t[5+o*r])," ").concat(this.bcd2String(t[6+o*r]),":").concat(this.bcd2String(t[7+o*r]),":").concat(this.bcd2String(t[8+o*r])),h=this.hexByte2Int(t[9+o*r],0).toString(),l=this.hexByte2Int(t[10+o*r],0).toString(),g=this.getData(2,11+o*r,t),d=this.getData(2,13+o*r,t),S=this.hexByte2Int(t[15+o*r],0),y=this.hexByte2Int(t[16+o*r],0),D=new Array(4).fill(0),f=0;f<4;f++)D[3-f]=t[17+f+o*r];var p=new Array(4).fill(0);for(f=0;f<4;f++)p[3-f]=t[21+f+o*r];var v=this.getFloat(D,0),m=this.getFloat(p,0);n[vt.Data].push(((a={})[vt.Date]=u,a[vt.ActivityMode]=h,a[vt.HeartRate]=l,a[vt.ActiveMinutes]=g.toString(),a[vt.Step]=d.toString(),a[vt.Pace]="".concat(S.toString(16),"'").concat(y.toString(16)),a[vt.Distance]=m.toFixed(2),a[vt.Calories]=v.toFixed(1),a))}return n},t.getActivityExerciseData=function(t){for(var e,a,n=0,r=0,i=new Array(4).fill(0),c=0;c<4;c++)n+=this.hexByte2Int(t[c+2],c),i[3-c]=t[c+6],r+=this.hexByte2Int(t[c+10],c);var o=this.hexByte2Int(t[1],0),s=this.getFloat(i,0),u=0;if(t.length>=18){var h=[0,0,0,0];for(c=0;c<4;c++)h[3-c]=t[c+14];u=this.getFloat(h,0)}return(e={})[vt.DataType]=pt.EnterActivityMode,e[vt.End]=!0,e[vt.Data]=((a={})[vt.HeartRate]=o.toString(),a[vt.Step]=n.toString(),a[vt.Calories]=s.toFixed(1),a[vt.Distance]=u.toFixed(1),a[vt.ActiveMinutes]=r.toString(),a),e},t.setTimeSuccessful=function(t){var e,a;return(e={})[vt.DataType]=pt.SetDeviceTime,e[vt.End]=!0,e[vt.Data]=((a={})[vt.KPhoneDataLength]=this.hexByte2Int(t[1],0).toString(),a),e},t.getData=function(t,e,a){for(var n=0,r=0;r<t;r++)n+=this.hexByte2Int(a[r+e],r);return n},t.getFloat=function(t,e){return this.intBitToDouble(this.getInt(t,e))},t.getInt=function(t,e){return(255&t[e])<<24|(255&t[e+1])<<16|(255&t[e+2])<<8|255&t[e+3]},t.setMethodSuccessful=function(t){var e;return(e={})[vt.DataType]=t,e[vt.End]=!0,e[vt.Data]={},e},t.getRealTimeTemperatureValue=function(t){var e,a=((e={})[vt.DataType]=pt.GetRealTimeTemperatureCorrection,e[vt.End]=!0,e),n={};a[vt.Data]=n;var r=t[1],i=t[2],c=t[3],o=t[4],s=t[5],u=t[6],h=t[7],l=t[8],g=t[9],d=t[10],S=this._leToInt(r,i)/10,y=this._leToInt(c,o)/10,D=this._leToInt(s,u)/10,f=this._leToInt(h,l)/10,p=this._leToInt(g,d)/10;return n[vt.highestTemp]=S,n[vt.displayTemp]=y,n[vt.ntcTemps]=[D,f,p],a},t._leToInt=function(t,e){return e<<8|t},t.getEcgHistoryData=function(t){var e,a=((e={})[vt.DataType]=pt.ECGdata,e[vt.End]=!1,e[vt.Data]={},e),n=t.length;if(3===n||113===t[n-3]&&255===t[n-2]&&255===t[n-1])return a[vt.End]=!0,a;var r=3;if(0===this.hexByte2Int(t[1],0)+this.hexByte2Int(t[2],1)){var i="20".concat(this.bcd2String(t[3]),"-").concat(this.bcd2String(t[4]),"-").concat(this.bcd2String(t[5])," ").concat(this.bcd2String(t[6]),":").concat(this.bcd2String(t[7]),":").concat(this.bcd2String(t[8])),c=this.hexByte2Int(t[11],0).toString(),o=this.hexByte2Int(t[12],0).toString(),s=this.hexByte2Int(t[13],0).toString();a[vt.Data][vt.Date]=i,a[vt.Data][vt.HRV]=c,a[vt.Data][vt.HeartRate]=o,a[vt.Data][vt.ECGMoodValue]=s,r=27}var u=t.slice(r,n),h=this.getEcgDataString(u);return a[vt.Data][vt.ECGValue]=h,a},t.getEcgDataString=function(t){for(var e=[],a=Math.floor(t.length/2)-1,n=0;n<a;n++){var r=this.hexByte2Int(t[2*n+1],1)+this.hexByte2Int(t[2*n+2],0);r>=32768&&(r-=65536),e.push(r.toString())}return e.join(",")},t.ecgData=function(t){var e,a,n=this.hexByte2Int(t[1],0);return(e={})[vt.DataType]=pt.EcgppGstatus,e[vt.End]=!0,e[vt.Data]=((a={})[vt.EcgStatus]=n.toString(),a),e},t.ppgData=function(t){var e,a;return(e={})[vt.DataType]=pt.EcgppGstatus,e[vt.End]=!0,e[vt.Data]=((a={})[vt.PPGValue]=t,a),e},t.ecgResult=function(t){var e,a,n=((e={})[vt.DataType]=pt.GetEcgPpgStatus,e[vt.End]=!0,e[vt.Data]={},e);if(3===this.hexByte2Int(t[1],0)){var r="20".concat(this.bcd2String(t[10]),".").concat(this.bcd2String(t[11]),".").concat(this.bcd2String(t[12])," ").concat(this.bcd2String(t[13]),":").concat(this.bcd2String(t[14]),":").concat(this.bcd2String(t[15]));n[vt.Data]=((a={})[vt.Date]=r,a[vt.ECGHrvValue]=this.hexByte2Int(t[2],0).toString(),a[vt.ECGAvBlockValue]=this.hexByte2Int(t[3],0).toString(),a[vt.ECGHrValue]=this.hexByte2Int(t[4],0).toString(),a[vt.ECGStreesValue]=this.hexByte2Int(t[5],0).toString(),a[vt.ECGhighBpValue]=this.hexByte2Int(t[6],0).toString(),a[vt.ECGLowBpValue]=this.hexByte2Int(t[7],0).toString(),a[vt.ECGMoodValue]=this.hexByte2Int(t[8],0).toString(),a[vt.ECGBreathValue]=this.hexByte2Int(t[9],0).toString(),a)}return n},t.enterEcg=function(t){var e;return(e={})[vt.DataType]=pt.ENTERECG,e[vt.End]=!0,e[vt.Data]={},e},t.measurementWithType=function(t,e){var a,n,r,i,c,o,s,u;if(t)switch(e[1]){case 1:var h=this.hexByte2Int(e[6],0).toString(),l=this.hexByte2Int(e[7],0).toString();return(a={})[vt.DataType]=pt.MeasurementHrvCallback,a[vt.End]=!0,a[vt.Data]=((n={})[vt.HRV]=this.hexByte2Int(e[4],0),n[vt.highBP]=h,n[vt.lowBP]=l,n),a;case 2:return(r={})[vt.DataType]=pt.MeasurementHeartCallback,r[vt.End]=!0,r[vt.Data]=((i={})[vt.HeartRate]=this.hexByte2Int(e[2],0),i),r;case 3:return(c={})[vt.DataType]=pt.MeasurementOxygenCallback,c[vt.End]=!0,c[vt.Data]=((o={})[vt.Blood_oxygen]=this.hexByte2Int(e[3],0),o),c;case 4:var g=this.hexByte2Int(e[8],0)+this.hexByte2Int(e[9],1);return(s={})[vt.DataType]=pt.MeasurementTempCallback,s[vt.End]=!0,s[vt.Data]=((u={})[vt.temperature]=(.1*g).toFixed(1),u),s}else{var d={1:pt.StopMeasurementHrvCallback,2:pt.StopMeasurementHeartCallback,3:pt.StopMeasurementOxygenCallback,4:pt.StopMeasurementTempCallback};if(d[e[1]])return this.setMethodSuccessful(d[e[1]])}return{}},t.measurementWithTypeV5=function(t,e){if(t)switch(e[1]){case 1:return this.setMethodSuccessful(pt.MeasurementHrvCallback);case 2:return this.setMethodSuccessful(pt.MeasurementHeartCallback);case 3:return this.setMethodSuccessful(pt.MeasurementOxygenCallback)}else switch(e[1]){case 1:return this.setMethodSuccessful(pt.StopMeasurementHrvCallback);case 2:return this.setMethodSuccessful(pt.StopMeasurementHeartCallback);case 3:return this.setMethodSuccessful(pt.StopMeasurementOxygenCallback)}return{}},t.measurementWithTypeV4=function(t,e){if(t)switch(e[1]){case 1:var a={},n={};return a[vt.DataType]=pt.MeasurementHrvCallback,a[vt.End]=!0,a[vt.Data]=n,n[vt.HRV]=this.hexByte2Int(e[4],0),n[vt.Stress]=this.hexByte2Int(e[5],0),n[vt.highBP]=this.hexByte2Int(e[6],0),n[vt.lowBP]=this.hexByte2Int(e[7],0),a;case 2:var r={},i={};return r[vt.DataType]=pt.MeasurementHeartCallback,r[vt.End]=!0,r[vt.Data]=i,i[vt.HeartRate]=this.hexByte2Int(e[2],0),r;case 3:var c={},o={};return c[vt.DataType]=pt.MeasurementOxygenCallback,c[vt.End]=!0,c[vt.Data]=o,o[vt.Blood_oxygen]=this.hexByte2Int(e[3],0),c}else switch(e[1]){case 1:return this.setMethodSuccessful(pt.StopMeasurementHrvCallback);case 2:return this.setMethodSuccessful(pt.StopMeasurementHeartCallback);case 3:return this.setMethodSuccessful(pt.StopMeasurementOxygenCallback);case 4:return this.setMethodSuccessful(pt.StopMeasurementTempCallback)}return{}},t.braceletdial=function(t,e){var a,n;return t?((a={})[vt.DataType]=pt.Braceletdial,a[vt.End]=!0,a):((n={})[vt.DataType]=pt.Braceletdialok,n[vt.End]=!0,n[vt.Data]={index:e[1].toString()},n)},t.getSportMode=function(t){for(var e,a=this.hexByte2Int(t[1],0),n=[],r=0;r<a;r++)n.push(this.hexByte2Int(t[r+2],0).toString());return(e={})[vt.DataType]=pt.GetSportMode,e[vt.End]=!0,e[vt.Data]=n.join(","),e},t.gPSControlCommand=function(t){for(var e,a,n="20".concat(this.bcd2String(t[1]),"-").concat(this.bcd2String(t[2]),"-").concat(this.bcd2String(t[3])," ").concat(this.bcd2String(t[4]),":").concat(this.bcd2String(t[5]),":").concat(this.bcd2String(t[6])),r=new Array(4).fill(0),i=new Array(4).fill(0),c=0;c<4;c++)r[3-c]=t[9+c],i[3-c]=t[14+c];var o=this.getFloat(r,0).toString(),s=this.getFloat(i,0).toString(),u=this.hexByte2Int(t[18],0);return(e={})[vt.DataType]=pt.GPSControlCommand,e[vt.End]=!0,e[vt.Data]=((a={})[vt.KActivityLocationTime]=n,a[vt.KActivityLocationLatitude]=o,a[vt.KActivityLocationLongitude]=s,a[vt.KActivityLocationCount]=u.toString(),a),e},t.setSocial=function(t){var e;return(e={})[vt.DataType]=pt.SocialdistanceGetting,e[vt.End]=!0,e[vt.Data]={scanInterval:this.hexByte2Int(t[2],0).toString(),scanTime:this.hexByte2Int(t[3],0).toString(),signalStrength:t[4].toString()},e},t.ecgQuality=function(t){var e;return(e={})[vt.DataType]=pt.EcgppG,e[vt.End]=!0,e[vt.Data]={heartValue:this.hexByte2Int(t[1],0).toString(),hrvValue:this.hexByte2Int(t[2],0).toString(),Quality:this.hexByte2Int(t[3],0).toString()},e},t.enterPhotoModeback=function(t){var e,a="";switch(t[1]){case 1:a=0===t[2]?"0":"1";break;case 2:a="2";break;case 3:switch(t[2]){case 1:a="3";break;case 2:a="4";break;case 3:a="5";break;case 4:a="6";break;case 5:a="7"}break;case 4:a="8"}return(e={})[vt.DataType]=pt.DeviceSendDataToAPP,e[vt.End]=!0,e[vt.Data]={type:a},e},t.setNewDeviceInfo=function(t){var e;return(e={})[vt.DataType]=pt.SetNewDeviceInfo,e[vt.End]=!0,e[vt.Data]={},e},t.getNewDeviceInfo=function(t){var e;return(e={})[vt.DataType]=pt.GetNewDeviceInfo,e[vt.End]=!0,e[vt.Data]={KEcg:this.hexByte2Int(t[1],0).toString()},e},t.updateClockSuccessful=function(t){var e,a;return console.log("updateClockSuccessful:",t),(e={})[vt.DataType]=pt.SetAlarmClockWithAllClock,e[vt.End]=!0,e[vt.Data]=((a={})[vt.KClockLast]=this.hexByte2Int(t[t.length-1],0).toString(),a),e},t.setBoolSugarStatus=function(t){var e,a;return(e={})[vt.DataType]=pt.BoolsugarStatus,e[vt.End]=!0,e[vt.Data]=((a={})[vt.EcgStatus]=this.hexByte2Int(t[2],0),a),e},t.setBoolSugarValue=function(t){for(var e,a=t.slice(3),n=[],r=0;r<Math.floor(a.length/3);r++){var i=this.hexByte2Int(a[3*r],2)+this.hexByte2Int(a[3*r+1],1)+this.hexByte2Int(a[3*r+2],0);n.push(i)}return(e={})[vt.DataType]=pt.BoolsugarValue,e[vt.End]=!0,e[vt.Data]={timestamp:Math.floor(Date.now()/1e3),ppg:n},e},t.setMethodError=function(t){var e;return(e={})[vt.DataType]=t,e[vt.End]=!1,e[vt.Data]={},e},t.readPregnancyCycle=function(t){var e,a;return(e={})[vt.DataType]=pt.GetPregnancyCycle,e[vt.End]=!0,e[vt.Data]=((a={})[vt.Date]="20".concat(this.bcd2String(t[3]),"-").concat(this.bcd2String(t[4]),"-").concat(this.bcd2String(t[5])),a[vt.Week]=this.hexByte2Int(t[1],0),a[vt.DayOfWeek]=this.hexByte2Int(t[2],0),a),e},t.readWomenHealth=function(t){var e,a;return(e={})[vt.DataType]=pt.GetWomenHealth,e[vt.End]=!0,e[vt.Data]=((a={})[vt.Date]="".concat(this.bcd2String(t[1]),"-").concat(this.bcd2String(t[2])),a[vt.WomenHealthPeriod]=this.hexByte2Int(t[3],0),a[vt.WomenHealthLength]=this.hexByte2Int(t[4],0),a),e},t.getTemperatureCorrectionValue=function(t){var e,a,n=[t[3],t[2]],r=this.byteArrayToInt(n);return(e={})[vt.DataType]=pt.CMD_Set_TemperatureCorrection,e[vt.End]=!0,e[vt.Data]=((a={})[vt.TemperatureCorrectionValue]=r.toString(),a),e},t.byteArrayToInt=function(t){return t[0]<<8&65280|255&t[1]},t.getHistoryGpsData=function(t){var e,a=[],n=((e={})[vt.DataType]=pt.Gps,e[vt.End]=!1,e),r=59,i=t.length,c=Math.floor(i/r);if(0===c)return n;255===t[t.length-1]&&90===t[t.length-2]&&(n[vt.End]=!0);for(var o=0;o<c;o++){for(var s={},u="20".concat(this.bcd2String(t[3+o*r]),".").concat(this.bcd2String(t[4+o*r]),".").concat(this.bcd2String(t[5+o*r])," ").concat(this.bcd2String(t[6+o*r]),":").concat(this.bcd2String(t[7+o*r]),":").concat(this.bcd2String(t[8+o*r])),h=[],l=[],g=0;g<6;g++){for(var d=new Array(4).fill(0),S=new Array(4).fill(0),y=0;y<4;y++)d[3-y]=t[9+y+o*r+8*g],S[3-y]=t[13+y+o*r+8*g];var D=this.getFloat(d,0).toString(),f=this.getFloat(S,0).toString();h.push(D),l.push(f)}s[vt.Date]=17===u.length?u:"2019.01.01 00:00:00",s[vt.Latitude]=h.join(","),s[vt.Longitude]=l.join(","),a.push(s)}return n[vt.Data]=a,n},t.getPPITestData=function(t){var e,a=((e={})[vt.DataType]=pt.GetPPIData,e[vt.End]=!1,e[vt.Data]=[],e),n=123,r=t.length,i=Math.floor(r/n);if(0===i)return a[vt.End]=!0,a;255===t[t.length-1]&&(a[vt.End]=!0);for(var c=0;c<i;c++){for(var o={},s=new Array(2).fill(0),u=0;u<2;u++)s[1-u]=t[1+u+c*n];for(var h=this.getInt(s,0),l="20".concat(this.bcd2String(t[3+c*n]),".").concat(this.bcd2String(t[4+c*n]),".").concat(this.bcd2String(t[5+c*n])," ").concat(this.bcd2String(t[6+c*n]),":").concat(this.bcd2String(t[7+c*n]),":").concat(this.bcd2String(t[8+c*n])),g=this.hexByte2Int(t[9+c*n],0),d=this.hexByte2Int(t[10+c*n],0).toString(),S=[],y=0;y<56;y++){for(var D=11+2*y,f=new Array(2).fill(0),p=0;p<2;p++)f[1-p]=t[D+p+c*n];var v=this.getFloat(f,0);if(0===v)break;S.push(v)}o[vt.TOTAL_ID]=g.toString(),o[vt.PPI_ID]=d,o[vt.DeviceTime]=l,o[vt.PPI_LIST]=S,o[vt.PPI_NUM]=h,a[vt.Data].push(o)}return a},t.getPPIV5Data=function(t){var e,a,n=t.length,r=((e={})[vt.DataType]=pt.GetPPIData,e[vt.End]=!1,e),i=[];r[vt.Data]=i,t.length>1&&255===t[t.length-1]&&t[t.length-2]===ut&&(r[vt.End]=!0);for(var c=0;c<Math.floor(n/123);c++){for(var o=123*c,s="20".concat(this.bcd2String(t[o+3]),".").concat(this.bcd2String(t[o+4]),".").concat(this.bcd2String(t[o+5])," ").concat(this.bcd2String(t[o+6]),":").concat(this.bcd2String(t[o+7]),":").concat(this.bcd2String(t[o+8])),u=this.hexByte2Int(t[o+9],0),h=this.hexByte2Int(t[o+10],0),l=[],g=0;g<56;g++){var d=t[o+11+2*g],S=t[o+11+2*g+1]<<8|d;if(0===S)break;l.push(S)}i.push(((a={})[vt.Date]=s,a[vt.PPI_LIST]=l,a[vt.PPI_UNIT]="ms",a[vt.PPI_NUM]=u,a[vt.PPI_ID]=h,a))}return r},t.getHrvTimeData=function(t){var e,a;return(e={})[vt.DataType]=pt.GetHrvTimeValue,e[vt.End]=!0,e[vt.Data]=((a={})[vt.HRV_TIME_MODE]=this.hexByte2Int(t[1],0),a[vt.HRV_TIME_Value]=this.hexByte2Int(t[2],0),a),e},t.closeDevices=function(t){var e,a;return(e={})[vt.DataType]=pt.CloseDevices,e[vt.End]=!0,e[vt.Data]=((a={})[vt.RESULT]=!0,a),e},t.getOffCheckStatus=function(t){var e,a;return(e={})[vt.DataType]=pt.GetOffCheckStatus,e[vt.End]=!0,e[vt.Data]=((a={})[vt.GET_OFF_TAG]=this.hexByte2Int(t[1],0),a[vt.GET_OFF_STATE]=this.hexByte2Int(t[2],0),a),e},t.getStepCount=function(t){var e=27,a=t.length;return 2!==a&&(a%26==0?e=26:a%27==0?e=27:(a-2)%26==0?e=26:(a-2)%27==0&&(e=27)),e},t.startDeviceMeasurementWithType=!1,t}();"function"==typeof SuppressedError&&SuppressedError;var Tt=function(){function vt(){}return vt.generateValue=function(t){return new Array(t).fill(0)},vt.hexByte2Int=function(t,e){return(255&t)*Math.pow(256,e)},vt.generateInitValue=function(){return this.generateValue(16)},vt.arrayCopy=function(t,e,a,n,r){for(var i=0;i<r;i++)a[n+i]=t[e+i]},vt.crcValue=function(t){for(var e=0,a=0;a<t.length-1;a++)e+=t[a];t[t.length-1]=255&e},vt.crcDynamicValue=function(t){for(var e=0,a=0,n=t;a<n.length;a++){e+=n[a]}t[t.length-1]=255&e},vt.getBcdValue=function(t){return 16*Math.floor(t/10)+t%10},vt.dataParsingWithData=function(P,J){if(void 0===J&&(J="2208"),!P||0===P.length)return mt.setMethodError("Empty data");switch(P[0]){case s:return mt.setMethodSuccessful(pt.SetStepGoal);case a:return mt.setMethodSuccessful(pt.SetPersonalInfo);case D:break;case y:return mt.setMethodSuccessful(pt.SetMotorVibrationWithTimes);case r:return mt.setMethodSuccessful(pt.SetDeviceInfo);case p:return mt.setMethodSuccessful(pt.SetAutomaticHRMonitoring);case yt:return mt.setMethodSuccessful(pt.SetSedentaryReminder);case c:return mt.setMacSuccessful();case H:return mt.setMethodSuccessful(pt.EnterActivityMode);case R:return 0!==P[2]&&0!==P[3]?mt.getTemperatureCorrectionValue(P):mt.setMethodSuccessful(pt.CMD_Set_TemperatureCorrection);case k:return mt.getActivityExerciseData(P);case t:return mt.setTimeSuccessful(P);case C:return mt.getExerciseData(P);case e:return mt.getDeviceTime(P);case n:return mt.getUserInfo(P);case i:return mt.getDeviceInfo(P,J);case o:return mt.getActivityData(P);case u:return mt.getGoal(P);case h:return mt.getDeviceBattery(P);case l:return mt.getDeviceAddress(P);case g:return mt.getDeviceVersion(P);case f:return mt.getDeviceName(P);case v:return mt.getAutoHeart(P);case d:return mt.reset();case S:return mt.mcuReset();case T:return mt.notify();case Dt:return mt.getActivityAlarm(P);case I:return mt.getTotalStepData(P);case B:return mt.getDetailData(P);case _:return mt.getSleepData(P);case V:return mt.getHeartData(P);case b:return mt.getOnceHeartData(P);case A:return mt.getHrvTestData(P);case x:return mt.getClockData(P);case m:return mt.updateClockSuccessful(P);case w:return mt.setNewDeviceInfo(P);case L:return mt.getNewDeviceInfo(P);case O:return mt.enterPhotoModeback(P);case W:return mt.setMethodSuccessful(pt.EnterPhotoMode);case F:return mt.setMethodSuccessful(pt.BackHomeView);case K:return mt.ecgQuality(P);case N:case U:break;case Q:return mt.setMethodSuccessful(pt.Weather);case j:return mt.braceletdial(!1,P);case Y:return"V4"===J||"V5"===J?mt.getRealTimeTemperatureValue(P):mt.setMethodSuccessful(pt.SportMode);case q:return mt.getSportMode(P);case z:return"V4"===J?mt.measurementWithTypeV4(this.StartDeviceMeasurementWithType,P):"V5"===J?mt.measurementWithTypeV5(this.StartDeviceMeasurementWithType,P):mt.measurementWithType(this.StartDeviceMeasurementWithType,P);case X:return mt.gPSControlCommand(P);case Z:return mt.getHistoryGpsData(P);case $:return mt.setMethodSuccessful(pt.Clear_Bracelet_data);case E:return mt.getAutoBloodOxygen(P);case M:return mt.getBloodoxygen(P);case G:return mt.setMethodSuccessful(pt.SocialdistanceSetting);case tt:return mt.setMethodSuccessful(pt.Sos);case et:return mt.getTempData(P);case at:return mt.getTempDataer(P);case nt:return mt.getQrCode(P,!1);case dt:return mt.setBoolSugarStatus(P);case St:return mt.setBoolSugarValue(P);case rt:return mt.ecgResult(P);case st:return mt.readPregnancyCycle(P);case it:return mt.getEcgHistoryData(P);case ot:return 0===P[1]?mt.setMethodSuccessful(pt.SetWomenHealth):mt.readWomenHealth(P);case ct:var vt=this.hexByte2Int(P[1],0),Tt=this.hexByte2Int(P[2],0);if(0!==vt)return mt.setMethodSuccessful(pt.ppgStartFailed);switch(Tt){case 1:return mt.setMethodSuccessful(pt.ppgStartSucessed);case 2:return mt.setMethodSuccessful(pt.ppgResult);case 3:return mt.setMethodSuccessful(pt.ppgStop);case 4:return mt.setMethodSuccessful(pt.ppgMeasurementProgress);case 5:return mt.setMethodSuccessful(pt.ppgQuit);default:return mt.setMethodSuccessful(pt.ppgStartFailed)}case ut:return"V4"===J||"V5"===J?mt.getPPIV5Data(P):mt.getPPITestData(P);case ht:return mt.getHrvTimeData(P);case lt:return mt.closeDevices(P);case gt:return mt.getOffCheckStatus(P);case ft:return mt.getSleepActivityLevelsData(P)}return mt.setMethodError(this.getBcdValue(P[0]).toString())},vt.bloodsugarWithMode=function(t,e){var a=this.generateInitValue();return a[0]=ct,a[1]=t,2!==t&&4!==t||(a[2]=e),this.crcValue(a),a},vt.getDetailSleepDataWithMode=function(t){var e=this.generateInitValue();return e[0]=_,e[1]=99===t?153:t,this.crcValue(e),e},vt.insertDateValue=function(t,e){if(e&&!(e.length<=0)){var a=e.split(" "),n=a[0],r=a[1],i=n.split("-").map(Number),c=i[0],o=i[1],s=i[2],u=r.split(":").map(Number),h=u[0],l=u[1],g=u[2];t[4]=this.getBcdValue(c-2e3),t[5]=this.getBcdValue(o),t[6]=this.getBcdValue(s),t[7]=this.getBcdValue(h),t[8]=this.getBcdValue(l),t[9]=this.getBcdValue(g)}},vt.getHRVDataWithMode=function(t,e){var a=this.generateInitValue();return a[0]=A,a[1]=99===t?153:0===t?0:1===t?1:2,this.insertDateValue(a,e),this.crcValue(a),a},vt.getPPIDDataWithMode=function(t){var e=this.generateInitValue();return e[0]=ut,e[1]=99===t?153:0===t?0:1===t?1:2,this.crcValue(e),e},vt.getHrvTestTime=function(){var t=this.generateInitValue();return t[0]=ht,t[1]=0,this.crcValue(t),t},vt.setHrvTestTime=function(t){var e=this.generateInitValue();return e[0]=ht,e[1]=1,e[2]=t,this.crcValue(e),e},vt.closeBlueDevice=function(){var t=this.generateInitValue();return t[0]=lt,this.crcValue(t),t},vt.startBloodSugar=function(){var t=this.generateInitValue();return t[0]=dt,t[1]=1,this.crcValue(t),t},vt.progressBloodSugar=function(t){var e=this.generateInitValue();return e[0]=dt,e[1]=4,e[2]=t,this.crcValue(e),e},vt.endBloodSugar=function(){var t=this.generateInitValue();return t[0]=dt,t[1]=3,this.crcValue(t),t},vt.getTotalActivityDataWithMode=function(t){var e=this.generateInitValue();return e[0]=I,e[1]=99===t?153:0===t?0:1===t?1:2,this.crcValue(e),e},vt.getTotalActivityDataWithModeForTime=function(t,e){var a=this.generateInitValue();return a[0]=I,a[1]=99===t?153:0===t?0:1===t?1:2,this.insertDateValue(a,e),this.crcValue(a),a},vt.getDetailSleepDataWithModeForTime=function(t,e){var a=this.generateInitValue();return a[0]=_,a[1]=99===t?153:t,this.insertDateValue(a,e),this.crcValue(a),a},vt.getDetailActivityDataWithModeForTime=function(t,e){var a=this.generateInitValue();return a[0]=B,a[1]=99===t?153:t,this.insertDateValue(a,e),this.crcValue(a),a},vt.getTemperature_historyDataWithMode=function(t,e){var a=this.generateInitValue();return a[0]=et,a[1]=99===t?153:t,this.insertDateValue(a,e),this.crcValue(a),a},vt.getAxillaryTemperatureDataWithMode=function(t,e){var a=this.generateInitValue();return a[0]=at,a[1]=99===t?153:0===t?0:1===t?1:2,this.insertDateValue(a,e),this.crcValue(a),a},vt.enterActivityMode=function(t,e){var a=this.generateInitValue();return a[0]=H,a[1]=e,a[2]=t,this.crcValue(a),a},vt.sendHeartPackage=function(t,e,a){var n=this.generateInitValue(),r=255&Math.floor(e/60),i=e%60&255,c=new ArrayBuffer(4);new DataView(c).setFloat32(0,t,!0);var o=Array.from(new Uint8Array(c));return n[0]=J,this.arrayCopy(o,0,n,1,o.length),n[5]=r,n[6]=i,n[7]=255&a,this.crcValue(n),n},vt.realTimeStep=function(t,e){var a=this.generateInitValue();return a[0]=o,a[1]=t?1:0,a[2]=e?1:0,this.crcValue(a),a},vt.stopGo=function(){var t=this.generateInitValue();return t[0]=o,t[1]=0,this.crcValue(t),t},vt.setPersonalInfo=function(t){var e=this.generateInitValue();return e[0]=a,e[1]=t.sex,e[2]=t.age,e[3]=t.height,e[4]=t.weight,t.stepLength&&(e[5]=t.stepLength),this.crcValue(e),e},vt.getPersonalInfo=function(){var t=this.generateInitValue();return t[0]=n,this.crcValue(t),t},vt.enterOTA=function(){var t=this.generateInitValue();return t[0]=P,this.crcValue(t),t},vt.getDeviceVersion=function(){var t=this.generateInitValue();return t[0]=g,this.crcValue(t),t},vt.reset=function(){var t=this.generateInitValue();return t[0]=d,this.crcValue(t),t},vt.getDeviceMacAddress=function(){var t=this.generateInitValue();return t[0]=l,this.crcValue(t),t},vt.getDeviceBatteryLevel=function(){var t=this.generateInitValue();return t[0]=h,this.crcValue(t),t},vt.mcuReset=function(){var t=this.generateInitValue();return t[0]=S,this.crcValue(t),t},vt.setDeviceName=function(t){var e=this.generateInitValue(),a=Math.min(t.length,14);e[0]=D;for(var n=0;n<a;n++)e[n+1]=t.charCodeAt(n);for(n=a+1;n<6;n++)e[n]=0;return this.crcValue(e),e},vt.getDeviceName=function(){var t=this.generateInitValue();t[0]=f;for(var e=1;e<6;e++)t[e]=0;return this.crcValue(t),t},vt.setDeviceTime=function(e){var a=this.generateInitValue(),n=e.getFullYear(),r=e.getMonth()+1,i=e.getDate(),c=e.getHours(),o=e.getMinutes(),s=e.getSeconds();return a[0]=t,a[1]=this.getBcdValue(n),a[2]=this.getBcdValue(r),a[3]=this.getBcdValue(i),a[4]=this.getBcdValue(c),a[5]=this.getBcdValue(o),a[6]=this.getBcdValue(s),this.crcValue(a),a},vt.getDeviceTime=function(){var t=this.generateInitValue();return t[0]=e,this.crcValue(t),t},vt.setDeviceInfo=function(t){var e=this.generateInitValue();return e[0]=r,e[1]=t.distanceUnit?129:128,e[2]=t.is12Hour?129:128,e[3]=t.handUpLightScreenSwitch?129:128,e[4]=t.fahrenheit?128:129,e[5]=t.nightMode?129:128,e[6]=t.ancs?129:128,e[9]=128+t.baseHeart,e[11]=128+t.screenBrightness,e[12]=128+t.indexDial,e[14]=128+t.languages,this.crcValue(e),e},vt.setDeviceInfoV5=function(t,e,a){var n=this.generateInitValue();return n[0]=r,n[6]=t?129:128,n[5]=e?129:128,n[14]=a?129:128,this.crcValue(n),n},vt.healthMeasurementWithDataType=function(t,e){this.StartDeviceMeasurementWithType=e;var a=this.generateInitValue();return a[0]=z,a[1]=t,a[2]=e?1:0,this.crcValue(a),a},vt.setBraceletdial=function(t){this.isRuning=!0;var e=this.generateInitValue();return e[0]=j,e[1]=t,this.crcValue(e),e},vt.setAutomaticHRMonitoring=function(t){var e=this.generateInitValue(),a=t.time;return e[0]=p,e[1]=t.open,e[2]=this.getBcdValue(t.startHour),e[3]=this.getBcdValue(t.startMinute),e[4]=this.getBcdValue(t.endHour),e[5]=this.getBcdValue(t.endMinute),e[6]=t.week,e[7]=255&a,e[8]=a>>8&255,e[9]=t.type,this.crcValue(e),e},vt.getAutomaticHRMonitoring=function(t){var e=this.generateInitValue();return e[0]=v,e[1]=t,this.crcValue(e),e},vt.getActivityModeDataWithMode=function(t){var e=this.generateInitValue();return e[0]=C,e[1]=t,this.crcValue(e),e},vt.getStaticHRWithMode=function(t,e){var a=this.generateInitValue();return a[0]=b,a[1]=t,this.insertDateValue(a,e),this.crcValue(a),a},vt.getDynamicHRWithMode=function(t,e){var a=this.generateInitValue();return a[0]=V,a[1]=t,this.insertDateValue(a,e),this.crcValue(a),a},vt.getBloodOxygen=function(t,e){var a=this.generateInitValue();return a[0]=M,a[1]=t,this.insertDateValue(a,e),this.crcValue(a),a},vt.getAutoBloodOxygen=function(t,e){var a=this.generateInitValue();return a[0]=E,a[1]=t,this.insertDateValue(a,e),this.crcValue(a),a},vt.setStepGoal=function(t,e,a,n,r){var i=this.generateInitValue();return i[0]=s,i[4]=t>>24&255,i[3]=t>>16&255,i[2]=t>>8&255,i[1]=255&t,i[6]=e>>8&255,i[5]=255&e,i[8]=a>>8&255,i[7]=255&a,i[10]=n>>8&255,i[9]=255&n,i[12]=r>>8&255,i[11]=255&r,this.crcValue(i),i},vt.GetStepGoal=function(){var t=this.generateInitValue();return t[0]=u,this.crcValue(t),t},vt.getDeviceInfo=function(){var t=this.generateInitValue();return t[0]=i,this.crcValue(t),t},vt.sendHex=function(t,e){var a=function(t,e,a){if(a||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||(n||(n=Array.prototype.slice.call(e,0,r)),n[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))}([],t,!0);return e&&this.crcDynamicValue(a),a},vt.getAlarmClock=function(){var t=this.generateInitValue();return t[0]=x,this.crcValue(t),t},vt.deleteAllAlarmClock=function(){var t=this.generateInitValue();return t[0]=x,t[1]=153,this.crcValue(t),t},vt.setAlarmClock=function(t){var e=this,a=[],n=39*t.length+2;if(n>128)for(var r=Math.floor(128/39),i=Math.ceil(t.length/r),c=0;c<i;c++){for(var o=c===i-1,s=o?t.length-r*c:r,u=new Array(39*s+(o?2:0)).fill(0),h=0;h<s;h++){var l=t[r*c+h],g=l.openOrClose,d=l.clockType,S=l.clockTime,y=l.week,D=l.textLength,f=l.text,p=39*h;u[p]=35,u[p+1]=t.length,u[p+2]=r*c+h,u[p+3]=g,u[p+4]=d,u[p+5]=this.getBcdValue(S.substring(0,2)),u[p+6]=this.getBcdValue(S.substring(3,5)),u[p+7]=y,u[p+8]=D;for(var v=0;v<D;v++)u[p+9+v]=f.charCodeAt(v)||0}o&&(u[u.length-2]=35,u[u.length-1]=255),a.push(u)}else{var m=new Array(n).fill(0);t.forEach(function(a,n){var r=a.openOrClose,i=a.clockType,c=a.clockTime,o=a.week,s=a.textLength,u=a.text,h=39*n;m[h]=35,m[h+1]=t.length,m[h+2]=n,m[h+3]=r,m[h+4]=i,m[h+5]=e.getBcdValue(c.substring(0,2)),m[h+6]=e.getBcdValue(c.substring(3,5)),m[h+7]=o,m[h+8]=s;for(var l=0;l<s;l++)m[h+9+l]=u.charCodeAt(l)||0}),m[n-2]=35,m[n-1]=255,a.push(m)}return a},vt.getSedentaryReminder=function(){var t=this.generateInitValue();return t[0]=Dt,this.crcValue(t),t},vt.setSedentaryReminder=function(t){var e=this.generateInitValue();e[0]=yt,e[1]=this.getBcdValue(t.startTime_Hour),e[2]=this.getBcdValue(t.startTime_Minutes),e[3]=this.getBcdValue(t.endTime_Hour),e[4]=this.getBcdValue(t.endTime_Minutes);var a=(t.weeks.sunday?1:0)+(t.weeks.monday?2:0)+(t.weeks.tuesday?4:0)+(t.weeks.wednesday?8:0)+(t.weeks.thursday?16:0)+(t.weeks.friday?32:0)+(t.weeks.saturday?64:0);return e[5]=a,e[6]=t.intervalTime,e[7]=t.leastSteps,e[8]=t.mode,this.crcValue(e),e},vt.getRealTimeSleepDataWithMode=function(t){var e=this.generateInitValue();return e[0]=ft,e[1]=t,this.crcValue(e),e},vt.DATA_READ_START=0,vt.DATA_READ_CONTINUE=2,vt.DATA_DELETE=99,vt.DistanceMode_MILE=129,vt.DistanceMode_KM=128,vt.TimeMode_12h=129,vt.TimeMode_24h=128,vt.WristOn_Enable=129,vt.WristOn_DisEnable=128,vt.TempUnit_C=128,vt.TempUnit_F=129,vt.TAG="BleSDK",vt.isRuning=!1,vt.ecgopen=!1,vt.read=!1,vt.pregnancyCycleRead=!1,vt.isSettingSocial=!1,vt.StartDeviceMeasurementWithType=!1,vt}();export{pt as BleConst,Tt as BleSDK,vt as DeviceKey,mt as ResolveUtil};
|
|
1
|
+
var t=1,e=65,a=2,n=66,r=3,i=4,c=5,o=9,s=11,u=75,h=19,l=34,g=39,d=18,S=46,y=54,D=61,f=62,v=42,p=43,m=35,I=77,T=81,B=82,V=83,E=84,M=96,_=102,x=85,C=87,b=92,A=86,G=100,k=25,H=24,P=71,R=56,w=6,W=7,L=32,O=22,N=16,K=131,F=170,U=171,Q=21,j=36,q=20,Y=68,z=40,J=23,X=52,Z=90,$=97,tt=254,et=98,at=101,nt=176,rt=156,it=113,ct=120,ot=28,st=30,ut=99,ht=136,lt=137,gt=138,dt=58,St=37,yt=38,Dt=107,ft=57,vt={GetDeviceTime:"get_device_time",GetPersonalInfo:"get_personal_info",GetDeviceInfo:"get_device_info",RealTimeStep:"real_time_step",GetStepGoal:"get_step_goal",GetDeviceBatteryLevel:"get_device_battery_level",GetDeviceMacAddress:"get_device_mac_address",GetDeviceVersion:"get_device_version",CMD_Reset:"cmd_reset",CMD_MCUReset:"cmd_mcu_reset",Notify:"notify",GetDeviceName:"get_device_name",SetAlarmClockWithAllClock:"set_alarm_clock_with_all_clock",Gps:"GPS",GetPPIData:"GetPPIData",GetHrvTimeValue:"GetHrvTimeValue",CloseDevices:"CloseDevices",GetOffCheckStatus:"GetOffCheckStatus",GetAutomaticHRMonitoring:"GetAutomaticHRMonitoring",GetSedentaryReminder:"GetSedentaryReminder",GetTotalActivityData:"GetTotalActivityData",GetDetailActivityData:"GetDetailActivityData",GetDetailSleepData:"GetDetailSleepData",AutoBloodOxygen:"AutoBloodOxygen",GetDynamicHR:"GetDynamicHR",ECGdata:"ECGdata",GetWomenHealth:"GetWomenHealth",CMD_Set_TemperatureCorrection:"CMD_Set_TemperatureCorrection",GetStaticHR:"GetStaticHR",Blood_oxygen:"Blood_oxygen",GetHRVData:"GetHRVData",GetAxillaryTemperatureDataWithMode:"GetAxillaryTemperatureDataWithMode",EnterQrCode:"EnterQrCode",QrCodeBandBack:"QrCodeBandBack",ExitQrCode:"ExitQrCode",Temperature_history:"Temperature_history",GetActivityModeData:"GetActivityModeData",EnterActivityMode:"EnterActivityMode",SetDeviceTime:"SetDeviceTime",GetAlarmClock:"GetAlarmClock",EcgppGstatus:"EcgppGstatus",GetEcgPpgStatus:"GetEcgPpgStatus",ENTERECG:"ENTERECG",MeasurementHrvCallback:"MeasurementHrvCallback",MeasurementHeartCallback:"MeasurementHeartCallback",MeasurementOxygenCallback:"MeasurementOxygenCallback",MeasurementTempCallback:"MeasurementTempCallback",StopMeasurementHrvCallback:"StopMeasurementHrvCallback",StopMeasurementHeartCallback:"StopMeasurementHeartCallback",StopMeasurementOxygenCallback:"StopMeasurementOxygenCallback",StopMeasurementTempCallback:"StopMeasurementTempCallback",MeasurementECGCallback:"MeasurementECGCallback",Braceletdial:"Braceletdial",Braceletdialok:"Braceletdialok",GetSportMode:"GetSportMode",GPSControlCommand:"GPSControlCommand",SocialdistanceGetting:"SocialdistanceGetting",EcgppG:"EcgppG",DeviceSendDataToAPP:"DeviceSendDataToAPP",SetNewDeviceInfo:"SetNewDeviceInfo",GetNewDeviceInfo:"GetNewDeviceInfo",BoolsugarStatus:"BoolsugarStatus",BoolsugarValue:"BoolsugarValue",GetPregnancyCycle:"GetPregnancyCycle",SetStepGoal:"SetStepGoal",SetPersonalInfo:"SetPersonalInfo",SetMotorVibrationWithTimes:"SetMotorVibrationWithTimes",SetDeviceInfo:"SetDeviceInfo",SetAutomaticHRMonitoring:"SetAutomaticHRMonitoring",SetSedentaryReminder:"SetSedentaryReminder",EnterPhotoMode:"EnterPhotoMode",BackHomeView:"BackHomeView",Weather:"Weather",SportMode:"SportMode",Clear_Bracelet_data:"Clear_Bracelet_data",SocialdistanceSetting:"SocialdistanceSetting",Sos:"Sos",SetPregnancyCycle:"SetPregnancyCycle",DeleteECGdata:"DeleteECGdata",ECG:"ECG",SetWomenHealth:"SetWomenHealth",ppgStartSucessed:"ppgStartSucessed",ppgResult:"ppgResult",ppgStop:"ppgStop",ppgMeasurementProgress:"ppgMeasurementProgress",ppgQuit:"ppgQuit",ppgStartFailed:"ppgStartFailed",CMD_Set_Mac:"CMD_Set_Mac",CloseECG:"CloseECG",GetAlarmClock_V4:"GetAlarmClock_V4",DeleteAllAlarmClock_V4:"DeleteAllAlarmClock_V4",SetAlarmClock_V4:"SetAlarmClock_V4",GetSedentaryReminder_V4:"GetSedentaryReminder_V4",SetSedentaryReminder_V4:"SetSedentaryReminder_V4",GetRealTimeTemperatureCorrection:"GetRealTimeTemperatureCorrection",PPGRealtime:"PPGRealtime"},pt={DeviceTime:"device_time",GPSTime:"gps_time",DataType:"data_type",End:"end",Data:"data",Gender:"gender",Age:"age",Height:"height",Weight:"weight",Stride:"stride",KUserDeviceId:"k_user_device_id",KClockLast:"k_clock_last",Step:"step",Calories:"calories",Distance:"distance",ExerciseMinutes:"exercise_minutes",HeartRate:"heart_rate",ActiveMinutes:"active_minutes",TempData:"temp_data",Blood_oxygen:"blood_oxygen",StepGoal:"step_goal",DistanceGoal:"distance_goal",CalorieGoal:"calorie_goal",SleepTimeGoal:"sleep_time_goal",BatteryLevel:"battery_level",MacAddress:"mac_address",DeviceVersion:"device_version",DeviceName:"device_name",Date:"date",Latitude:"latitude",Longitude:"longitude",TOTAL_ID:"totalId",PPI_ID:"ppiId",PPI_LIST:"ppiList",PPI_NUM:"ppiNum",PPI_UNIT:"ppiUnit",HRV_TIME_MODE:"hrvTimeMode",HRV_TIME_Value:"hrvTimeValue",RESULT:"result",GET_OFF_TAG:"getOffTag",GET_OFF_STATE:"getOffState",DistanceUnit:"distance_unit",TimeUnit:"time_unit",StatusOfTheRaisedHandOnscreen:"status_of_the_raised_hand_onscreen",TempUnit:"temp_unit",NightMode:"night_mode",ANCSMode:"ANCS_mode",ANCSSubStatus:"ANCS_sub_status",KBaseHeart:"k_base_heart",ScreenBrightness:"screen_brightness",Dialinterface:"dial_interface",SocialDistancedwitch:"social_distance_switch",ChineseOrEnglish:"chinese_or_english",WorkMode:"work_mode",StartTime:"start_time",KHeartStartMinter:"kheart_start_minter",EndTime:"end_time",KHeartEndMinter:"kheart_end_minter",Weeks:"weeks",IntervalTime:"interval_time",StartTimeHour:"StartTimeHour",StartTimeMin:"StartTimeMin",EndTimeHour:"EndTimeHour",EndTimeMin:"EndTimeMin",LeastSteps:"LeastSteps",Week:"week",Goal:"Goal",KDetailMinterStep:"KDetailMinterStep",ArraySteps:"ArraySteps",ArraySleep:"ArraySleep",ActivityArray:"ActivityArray",sleepUnitLength:"sleepUnitLength",StaticHR:"StaticHR",WomenHealthPeriod:"WomenHealthPeriod",WomenHealthLength:"WomenHealthLength",TemperatureCorrectionValue:"TemperatureCorrectionValue",HRV:"HRV",ECGPointCount:"ECGPointCount",ECGMoodValue:"ECGMoodValue",ECGValue:"ECGValue",ArrayDynamicHR:"ArrayDynamicHR",KAlarmId:"KAlarmId",OpenOrClose:"OpenOrClose",ClockType:"ClockType",ClockTime:"ClockTime",KAlarmMinter:"KAlarmMinter",KAlarmContent:"KAlarmContent",KAlarmLength:"KAlarmLength",KAlarmTotal:"KAlarmTotal",KAlarmIndex:"KAlarmIndex",axillaryTemperature:"axillaryTemperature",Band:"Band",temperature:"temperature",ActivityMode:"ActivityMode",Pace:"Pace",KPhoneDataLength:"KPhoneDataLength",VascularAging:"VascularAging",Stress:"Stress",highBP:"highBP",lowBP:"lowBP",EcgStatus:"ecgStatus",PPGValue:"ppgValue",ECGHrvValue:"ecgHrvValue",ECGAvBlockValue:"ecgAvBlockValue",ECGHrValue:"ecgHrValue",ECGStreesValue:"ecgStressValue",ECGhighBpValue:"ecgHighBpValue",ECGLowBpValue:"ecgLowBpValue",ECGBreathValue:"ecgBreathValue",KActivityLocationTime:"activityLocationTime",KActivityLocationLatitude:"activityLocationLatitude",KActivityLocationLongitude:"activityLocationLongitude",KActivityLocationCount:"activityLocationCount",DayOfWeek:"dayOfWeek",Text:"text",TextLength:"textLength",IsDeleteData:"isDeleteData",SportEnable:"SportEnable",HeartEnable:"HeartEnable",HeartDayEnable:"HeartDayEnable",highestTemp:"highestTemp",displayTemp:"displayTemp",ntcTemps:"ntcTemps",ECGId:"ECGId"},mt={CALL:1,SMS:2,WECHAT:4,FACEBOOK:8,INSTAGRAM:16,SKYPE:32,TELEGRAM:64,TWITTER:128,VK:256,WHATSAPP:512,QQ:1024,LINKEDIN:2048,ENABLE_FLAG:16384},It=function(){function t(){}return t.hexByte2Int=function(t,e){return(255&t)*Math.pow(256,e)},t.bcd2String=function(t){var e=15&t;return"".concat((240&t)>>4).concat(e)},t.intList2String=function(t){return t.map(function(t){return t.toString(16).padStart(2,"0").toUpperCase()}).join(" ")},t.intList3String=function(t){return t.map(function(t){return t.toString(16).padStart(2,"0").toLowerCase()}).join(" ")},t.setMacSuccessful=function(){var t;return(t={})[pt.DataType]=vt.CMD_Set_Mac,t[pt.End]=!0,t[pt.Data]={},t},t.intBitToDouble=function(t){var e=new ArrayBuffer(8),a=new DataView(e);return a.setInt32(0,t,!1),a.getFloat32(0,!1)},t.getDeviceTime=function(t){var e,a,n="20".concat(this.bcd2String(t[1]),"-").concat(this.bcd2String(t[2]),"-").concat(this.bcd2String(t[3])," ").concat(this.bcd2String(t[4]),":").concat(this.bcd2String(t[5]),":").concat(this.bcd2String(t[6])),r="".concat(this.bcd2String(t[9]),".").concat(this.bcd2String(t[10]),".").concat(this.bcd2String(t[11]));return(e={})[pt.DataType]=vt.GetDeviceTime,e[pt.End]=!0,e[pt.Data]=((a={})[pt.DeviceTime]=n,a[pt.GPSTime]=r,a),e},t.int2Ascll=function(t){if(t<0||t>255)throw new Error("Value must be between 0 and 255");return String.fromCharCode(t)},t.getGpsTime=function(t){return"".concat(this.bcd2String(t[9]),".").concat(this.bcd2String(t[10]),".").concat(this.bcd2String(t[11]))},t.getUserInfo=function(t){for(var e,a,n=new Array(6).fill(0),r=0;r<5;r++)n[r]=this.hexByte2Int(t[r+1],0);var i="";for(r=6;r<12;r++)0!==t[r]&&(i+=String.fromCharCode(this.hexByte2Int(t[r],0)));return(e={})[pt.DataType]=vt.GetPersonalInfo,e[pt.End]=!0,e[pt.Data]=((a={})[pt.Gender]=n[0],a[pt.Age]=n[1],a[pt.Height]=n[2],a[pt.Weight]=n[3],a[pt.Stride]=n[4],a[pt.KUserDeviceId]=i,a),e},t.getDeviceInfo=function(t,e){var a,n,r,i,c,o;switch(void 0===e&&(e="2208"),e){case"2025":var s=t[8]<<8|t[7],u={enableFlag:Boolean(s&mt.ENABLE_FLAG),call:Boolean(s&mt.CALL),sms:Boolean(s&mt.SMS),wechat:Boolean(s&mt.WECHAT),facebook:Boolean(s&mt.FACEBOOK),instagram:Boolean(s&mt.INSTAGRAM),skype:Boolean(s&mt.SKYPE),telegram:Boolean(s&mt.TELEGRAM),twitter:Boolean(s&mt.TWITTER),vk:Boolean(s&mt.VK),whatsapp:Boolean(s&mt.WHATSAPP),qq:Boolean(s&mt.QQ),linkedin:Boolean(s&mt.LINKEDIN)};return(a={})[pt.DataType]=vt.GetDeviceInfo,a[pt.End]=!0,a[pt.Data]=((n={})[pt.DistanceUnit]=this.hexByte2Int(t[1],0).toString(),n[pt.TimeUnit]=this.hexByte2Int(t[2],0).toString(),n[pt.StatusOfTheRaisedHandOnscreen]=this.hexByte2Int(t[3],0).toString(),n[pt.TempUnit]=this.hexByte2Int(t[4],0).toString(),n[pt.NightMode]=this.hexByte2Int(t[5],0).toString(),n[pt.ANCSMode]=this.hexByte2Int(t[6],0).toString(),n[pt.ANCSSubStatus]=u,n[pt.KBaseHeart]=this.hexByte2Int(t[9],0).toString(),n[pt.ScreenBrightness]=this.hexByte2Int(t[11],0).toString(),n[pt.Dialinterface]=this.hexByte2Int(t[12],0).toString(),n[pt.SocialDistancedwitch]=this.hexByte2Int(t[13],0).toString(),n[pt.ChineseOrEnglish]=this.hexByte2Int(t[14],0).toString(),n),a;case"V5":return(r={})[pt.DataType]=vt.GetDeviceInfo,r[pt.End]=!0,r[pt.Data]=((i={})[pt.SportEnable]=this.hexByte2Int(t[5],0).toString(),i[pt.HeartEnable]=this.hexByte2Int(t[6],0).toString(),i[pt.HeartDayEnable]=this.hexByte2Int(t[14],0).toString(),i),r;default:return(c={})[pt.DataType]=vt.GetDeviceInfo,c[pt.End]=!0,c[pt.Data]=((o={})[pt.DistanceUnit]=this.hexByte2Int(t[1],0).toString(),o[pt.TimeUnit]=this.hexByte2Int(t[2],0).toString(),o[pt.StatusOfTheRaisedHandOnscreen]=this.hexByte2Int(t[3],0).toString(),o[pt.TempUnit]=this.hexByte2Int(t[4],0).toString(),o[pt.NightMode]=this.hexByte2Int(t[5],0).toString(),o[pt.ANCSMode]=this.hexByte2Int(t[6],0).toString(),o[pt.KBaseHeart]=this.hexByte2Int(t[9],0).toString(),o[pt.ScreenBrightness]=this.hexByte2Int(t[11],0).toString(),o[pt.Dialinterface]=this.hexByte2Int(t[12],0).toString(),o[pt.SocialDistancedwitch]=this.hexByte2Int(t[13],0).toString(),o[pt.ChineseOrEnglish]=this.hexByte2Int(t[14],0).toString(),o),c}},t.getActivityData=function(t){for(var e,a,n=0,r=0,i=0,c=0,o=0,s=1;s<5;s++)n+=this.hexByte2Int(t[s],s-1);for(s=5;s<9;s++)r+=this.hexByte2Int(t[s],s-5);for(s=9;s<13;s++)i+=this.hexByte2Int(t[s],s-9);for(s=13;s<17;s++)c+=this.hexByte2Int(t[s],s-13);for(s=17;s<21;s++)o+=this.hexByte2Int(t[s],s-17);var u=this.hexByte2Int(t[21],0),h=0,l=0;return t.length>22&&(h=this.hexByte2Int(t[22],0)+this.hexByte2Int(t[23],1),t.length>24&&(l=this.hexByte2Int(t[24],0))),(e={})[pt.DataType]=vt.RealTimeStep,e[pt.End]=!0,e[pt.Data]=((a={})[pt.Step]=n.toString(),a[pt.Calories]=(r/100).toFixed(1),a[pt.Distance]=(i/100).toFixed(1),a[pt.ExerciseMinutes]=(c/60).toString(),a[pt.HeartRate]=u.toString(),a[pt.ActiveMinutes]=o.toString(),a[pt.TempData]=h.toFixed(1),a[pt.Blood_oxygen]=l.toString(),a),e},t.getGoal=function(t){for(var e,a,n=0,r=0,i=0,c=0,o=0;o<4;o++)n+=this.hexByte2Int(t[o+1],o);for(o=0;o<=1;o++)r+=this.hexByte2Int(t[o+7],o);for(o=0;o<=1;o++)i+=this.hexByte2Int(t[o+9],o);for(o=0;o<=1;o++)c+=this.hexByte2Int(t[o+11],o);return(e={})[pt.DataType]=vt.GetStepGoal,e[pt.End]=!0,e[pt.Data]=((a={})[pt.StepGoal]=n.toString(),a[pt.DistanceGoal]=r.toString(),a[pt.CalorieGoal]=i.toString(),a[pt.SleepTimeGoal]=c.toString(),a),e},t.getDeviceBattery=function(t){var e,a,n=this.hexByte2Int(t[1],0);return(e={})[pt.DataType]=vt.GetDeviceBatteryLevel,e[pt.End]=!0,e[pt.Data]=((a={})[pt.BatteryLevel]=n.toString(),a),e},t.getDeviceAddress=function(t){var e,a;if(0===t.length)return{};for(var n=[],r=1;r<7;r++){var i=t[r].toString(16).padStart(2,"0");n.push(i)}var c=n.join(":");return(e={})[pt.DataType]=vt.GetDeviceMacAddress,e[pt.End]=!0,e[pt.Data]=((a={})[pt.MacAddress]=c,a),e},t.getDeviceVersion=function(t){var e,a;if(0===t.length)return{};for(var n=[],r=1;r<5;r++)n.push(t[r].toString(16));var i=n.join(".");return(e={})[pt.DataType]=vt.GetDeviceVersion,e[pt.End]=!0,e[pt.Data]=((a={})[pt.DeviceVersion]=i,a),e},t.reset=function(){var t;return(t={})[pt.DataType]=vt.CMD_Reset,t[pt.End]=!0,t},t.mcuReset=function(){var t;return(t={})[pt.DataType]=vt.CMD_MCUReset,t[pt.End]=!0,t},t.notify=function(){var t;return(t={})[pt.DataType]=vt.Notify,t[pt.End]=!0,t},t.getDeviceName=function(t){for(var e,a,n="",r=1;r<15;r++){var i=this.hexByte2Int(t[r],0);0===i||i>127||(n+=String.fromCharCode(i))}return(e={})[pt.DataType]=vt.GetDeviceName,e[pt.End]=!0,e[pt.Data]=((a={})[pt.DeviceName]=n,a),e},t.getAutoHeart=function(t){var e,a,n=this.hexByte2Int(t[7],0)+this.hexByte2Int(t[8],1);return(e={})[pt.DataType]=vt.GetAutomaticHRMonitoring,e[pt.End]=!0,e[pt.Data]=((a={})[pt.WorkMode]=this.hexByte2Int(t[1],0).toString(),a[pt.StartTime]=this.bcd2String(t[2]),a[pt.KHeartStartMinter]=this.bcd2String(t[3]),a[pt.EndTime]=this.bcd2String(t[4]),a[pt.KHeartEndMinter]=this.bcd2String(t[5]),a[pt.Weeks]=this.getByteString(t[6]),a[pt.IntervalTime]=n.toString(),a),e},t.getWeekInt=function(t){for(var e=0,a=0;a<t.length;a++)1===t[a]&&(e+=Math.pow(2,a));return e},t.getByteString=function(t){for(var e=new Array(8).fill(0),a=[],n=0;n<=6;n++)e[n]=1&t,t>>=1,a.push(e[n].toString());return a.join("-")},t.getByteArray=function(t){for(var e=new Array(8).fill(0),a="",n=0;n<=7;n++)e[n]=1&t,t>>=1,a+=e[n];return a},t._hexByte2Int=function(t,e){return t<<8*e},t._bcd2String=function(t){var e=15&t;return"".concat(t>>4&15).concat(e)},t.getActivityAlarm=function(t){var e,a,n=((e={})[pt.StartTimeHour]=this._bcd2String(t[1]),e[pt.StartTimeMin]=this._bcd2String(t[2]),e[pt.EndTimeHour]=this._bcd2String(t[3]),e[pt.EndTimeMin]=this._bcd2String(t[4]),e[pt.Week]=this.getByteString(t[5]),e[pt.IntervalTime]=this._hexByte2Int(t[6],0).toString(),e[pt.LeastSteps]=this._hexByte2Int(t[7],0).toString(),e[pt.OpenOrClose]=this._hexByte2Int(t[8],0).toString(),e);return(a={})[pt.DataType]=vt.GetSedentaryReminder,a[pt.End]=!0,a[pt.Data]=n,a},t.getTotalStepData=function(t){var e,a;console.log("total:",t);var n=((e={})[pt.DataType]=vt.GetTotalActivityData,e[pt.End]=!1,e[pt.Data]=[],e),r=this.getStepCount(t),i=t.length,c=Math.floor(i/r);if(0===c)return n[pt.End]=!0,n;for(var o=0;o<c;o++){var s=1+(o+1)*r;s<i&&255===t[s]&&(n[pt.End]=!0);for(var u="20".concat(this._bcd2String(t[2+o*r]),".").concat(this._bcd2String(t[3+o*r]),".").concat(this._bcd2String(t[4+o*r])),h=0,l=0;l<4;l++)h+=this._hexByte2Int(t[5+l+o*r],l);var g=0;for(l=0;l<4;l++)g+=this._hexByte2Int(t[9+l+o*r],l);var d=0;for(l=0;l<4;l++)d+=this._hexByte2Int(t[13+l+o*r],l);var S=0;for(l=0;l<4;l++)S+=this._hexByte2Int(t[17+l+o*r],l);var y=26==r?this._hexByte2Int(t[21+o*r],0):this._hexByte2Int(t[21+o*r],0)+this._hexByte2Int(t[22+o*r],1),D=0;for(l=0;l<4;l++)D+=this._hexByte2Int(t[r-4+l+o*r],l);n[pt.Data].push(((a={})[pt.Date]=u,a[pt.Step]=h.toString(),a[pt.ExerciseMinutes]=g.toString(),a[pt.Calories]=(S/100).toFixed(1),a[pt.Distance]=(d/100).toFixed(1),a[pt.Goal]=y.toString(),a[pt.ActiveMinutes]=D,a))}return n},t.getDetailData=function(t){var e,a,n=((e={})[pt.DataType]=vt.GetDetailActivityData,e[pt.End]=!1,e[pt.Data]=[],e),r=t.length,i=Math.floor(r/25);if(0===i)return n[pt.End]=!0,n;for(var c=0;c<i;c++){255===t[r-1]&&(n[pt.End]=!0);for(var o="20".concat(this._bcd2String(t[3+25*c]),".").concat(this._bcd2String(t[4+25*c]),".").concat(this._bcd2String(t[5+25*c])," ").concat(this._bcd2String(t[6+25*c]),":").concat(this._bcd2String(t[7+25*c]),":").concat(this._bcd2String(t[8+25*c])),s=0,u=0;u<2;u++)s+=this._hexByte2Int(t[9+u+25*c],u);var h=0;for(u=0;u<2;u++)h+=this._hexByte2Int(t[11+u+25*c],u);var l=0;for(u=0;u<2;u++)l+=this._hexByte2Int(t[13+u+25*c],u);var g=[];for(u=0;u<10;u++)g.push(this._hexByte2Int(t[15+u+25*c],0).toString());n[pt.Data].push(((a={})[pt.Date]=o,a[pt.KDetailMinterStep]=s.toString(),a[pt.Calories]=(h/100).toFixed(2),a[pt.Distance]=(l/100).toFixed(2),a[pt.ArraySteps]=g.join(" "),a))}return n},t.getSleepData=function(t){var e,a,n,r=t.length,i=((e={})[pt.DataType]=vt.GetDetailSleepData,e[pt.End]=!1,e[pt.Data]=[],e),c=255===t[t.length-1]&&t[t.length-2]===V;if(c&&(i[pt.End]=!0),130===r||c&&132===r){for(var o="20".concat(this._bcd2String(t[3]),"-").concat(this._bcd2String(t[4]),"-").concat(this._bcd2String(t[5])," ").concat(this._bcd2String(t[6]),":").concat(this._bcd2String(t[7]),":").concat(this._bcd2String(t[8])),s=this._hexByte2Int(t[9],0),u=[],h=0;h<s;h++)u.push(this._hexByte2Int(t[10+h],0).toString());i[pt.Data].push(((a={})[pt.Date]=o,a[pt.ArraySleep]=u.join(" "),a[pt.sleepUnitLength]="1",a))}else{var l=Math.floor(r/34);if(0===l)return i[pt.End]=!0,i;for(var g=0;g<l;g++){for(o="20".concat(this._bcd2String(t[3+34*g]),"-").concat(this._bcd2String(t[4+34*g]),"-").concat(this._bcd2String(t[5+34*g])," ").concat(this._bcd2String(t[6+34*g]),":").concat(this._bcd2String(t[7+34*g]),":").concat(this._bcd2String(t[8+34*g])),s=this._hexByte2Int(t[9+34*g],0),u=[],h=0;h<s;h++)u.push(this._hexByte2Int(t[10+h+34*g],0).toString());i[pt.Data].push(((n={})[pt.Date]=o,n[pt.ArraySleep]=u.join(" "),n[pt.sleepUnitLength]="5",n))}}return i},t.getSleepActivityLevelsData=function(t){var e,a=t.length,n=((e={})[pt.DataType]=vt.GetRealTimeTemperatureCorrection,e),r=[];n[pt.Data]=r;var i=255===t[t.length-1]&&t[t.length-2]===Dt;if(i&&(n[pt.End]=!0),130===a||i&&132===a){var c={},o="20".concat(this._bcd2String(t[3]),"-").concat(this._bcd2String(t[4]),"-").concat(this._bcd2String(t[5])," ").concat(this._bcd2String(t[6]),":").concat(this._bcd2String(t[7]),":").concat(this._bcd2String(t[8]));c[pt.Date]=o;for(var s=this._hexByte2Int(t[9],0),u=[],h=0;h<s;h++){var l=t[10+h],g=l>>4&15,d=15&l;u.push(g,d)}for(var S="",y=10+s;y<t.length;y++)S+=this._hexByte2Int(t[y],0),y!==t.length-1&&(S+=" ");var D="";for(h=0;h<u.length;h++)D+=u[h],h!==u.length-1&&(D+=" ");c[pt.ArraySleep]=D,c[pt.ActivityArray]=S,c[pt.sleepUnitLength]="1",r.push(c)}return n},t.getAutoBloodOxygen=function(t){var e,a,n=((e={})[pt.DataType]=vt.AutoBloodOxygen,e[pt.End]=!1,e[pt.Data]=[],e),r=10,i=t.length,c=Math.floor(i/r);if(0===c)return n[pt.End]=!0,n;for(var o=0;o<c;o++){255===t[i-1]&&(n[pt.End]=!0);var s="20".concat(this._bcd2String(t[3+o*r]),".").concat(this._bcd2String(t[4+o*r]),".").concat(this._bcd2String(t[5+o*r])," ").concat(this._bcd2String(t[6+o*r]),":").concat(this._bcd2String(t[7+o*r]),":").concat(this._bcd2String(t[8+o*r])),u=this._hexByte2Int(t[9+10*o],0).toString();n[pt.Data].push(((a={})[pt.Date]=s,a[pt.Blood_oxygen]=u,a))}return n},t.getBloodoxygen=function(t){var e,a,n=((e={})[pt.DataType]=vt.Blood_oxygen,e[pt.End]=!1,e[pt.Data]=[],e),r=10,i=t.length,c=Math.floor(i/r);if(0===c)return n[pt.End]=!0,n;for(var o=0;o<c;o++){255===t[i-1]&&(n[pt.End]=!0);var s="20".concat(this._bcd2String(t[3+o*r]),".").concat(this._bcd2String(t[4+o*r]),".").concat(this._bcd2String(t[5+o*r])," ").concat(this._bcd2String(t[6+o*r]),":").concat(this._bcd2String(t[7+o*r]),":").concat(this._bcd2String(t[8+o*r])),u=this._hexByte2Int(t[9+10*o],0).toString();n[pt.Data].push(((a={})[pt.Date]=s,a[pt.Blood_oxygen]=u,a))}return n},t.getHeartData=function(t){var e,a,n=((e={})[pt.DataType]=vt.GetDynamicHR,e[pt.End]=!1,e[pt.Data]=[],e),r=24,i=t.length,c=Math.floor(i/r);if(0===c)return n[pt.End]=!0,n;for(var o=0;o<c;o++){255===t[i-1]&&(n[pt.End]=!0);for(var s="20".concat(this._bcd2String(t[3+o*r]),".").concat(this._bcd2String(t[4+o*r]),".").concat(this._bcd2String(t[5+o*r])," ").concat(this._bcd2String(t[6+o*r]),":").concat(this._bcd2String(t[7+o*r]),":").concat(this._bcd2String(t[8+o*r])),u=[],h=0;h<15;h++)u.push(this._hexByte2Int(t[9+h+o*r],0).toString());n[pt.Data].push(((a={})[pt.Date]=s,a[pt.ArrayDynamicHR]=u.join(" "),a))}return n},t.getOnceHeartData=function(t){var e,a,n=((e={})[pt.DataType]=vt.GetStaticHR,e[pt.End]=!1,e[pt.Data]=[],e),r=t.length,i=Math.floor(r/10);if(0===i||1===i&&153===t[1])return n[pt.End]=!0,n;for(var c=0;c<i;c++){255===t[r-1]&&(n[pt.End]=!0);var o="20".concat(this._bcd2String(t[3+10*c]),".").concat(this._bcd2String(t[4+10*c]),".").concat(this._bcd2String(t[5+10*c])," ").concat(this._bcd2String(t[6+10*c]),":").concat(this._bcd2String(t[7+10*c]),":").concat(this._bcd2String(t[8+10*c])),s=this._hexByte2Int(t[9+10*c],0).toString();n[pt.Data].push(((a={})[pt.Date]=o,a[pt.StaticHR]=s,a))}return n},t.getHrvTestData=function(t){var e,a,n=((e={})[pt.DataType]=vt.GetHRVData,e[pt.End]=!1,e[pt.Data]=[],e),r=15,i=t.length,c=Math.floor(i/r);if(0===c)return n[pt.End]=!0,n;255===t[t.length-1]&&(n[pt.End]=!0);for(var o=0;o<c;o++){var s="20".concat(this.bcd2String(t[3+o*r]),".").concat(this.bcd2String(t[4+o*r]),".").concat(this.bcd2String(t[5+o*r])," ").concat(this.bcd2String(t[6+o*r]),":").concat(this.bcd2String(t[7+o*r]),":").concat(this.bcd2String(t[8+o*r])),u=this.hexByte2Int(t[9+o*r],0).toString(),h=this.hexByte2Int(t[10+o*r],0).toString(),l=this.hexByte2Int(t[11+o*r],0).toString(),g=this.hexByte2Int(t[12+o*r],0).toString(),d=this.hexByte2Int(t[13+o*r],0).toString(),S=this.hexByte2Int(t[14+o*r],0).toString();n[pt.Data].push(((a={})[pt.Date]=s,a[pt.HRV]=u,a[pt.VascularAging]=h,a[pt.HeartRate]=l,a[pt.Stress]=g,a[pt.highBP]=d,a[pt.lowBP]=S,a))}return n},t.getClockData=function(t){var e,a;console.log("getClockData:",t);var n=((e={})[pt.DataType]=vt.GetAlarmClock,e[pt.End]=!1,e[pt.Data]=[],e),r=41,i=t.length,c=!1,o=Math.floor(i/r);if(0===o)return n[pt.End]=!0,n;153==t[1]&&16==i&&(c=!0),n[pt.IsDeleteData]=c;for(var s=0;s<o;s++){var u=1+(s+1)*r;u<i&&255===t[u]&&(n[pt.End]=!0);for(var h=this.hexByte2Int(t[4+s*r],0).toString(),l=this.hexByte2Int(t[5+s*r],0).toString(),g=this.hexByte2Int(t[6+s*r],0).toString(),d=this.bcd2String(t[7+s*r]),S=this.bcd2String(t[8+s*r]),y=this.hexByte2Int(t[9+s*r],0),D=this.hexByte2Int(t[10+s*r],0),f="",v=0;v<D;v++){var p=t[11+v+s*r];0!==p&&(f+=this.int2Ascll(this.hexByte2Int(p,0)))}n[pt.Data].push(((a={})[pt.KAlarmId]=h,a[pt.OpenOrClose]=l,a[pt.ClockType]=g,a[pt.ClockTime]=d,a[pt.KAlarmMinter]=S,a[pt.Week]=y,a[pt.KAlarmContent]=f,a[pt.KAlarmLength]=D.toString(),a))}return n},t.getTempDataer=function(t){var e,a,n=((e={})[pt.DataType]=vt.GetAxillaryTemperatureDataWithMode,e[pt.End]=!1,e[pt.Data]=[],e),r=11,i=t.length,c=Math.floor(i/r);if(0===c||255===t[i-1])return n[pt.End]=!0,n;for(var o=0;o<c;o++){255===t[i-1]&&(n[pt.End]=!0);var s="20".concat(this.bcd2String(t[3+o*r]),".").concat(this.bcd2String(t[4+o*r]),".").concat(this.bcd2String(t[5+o*r])," ").concat(this.bcd2String(t[6+o*r]),":").concat(this.bcd2String(t[7+o*r]),":").concat(this.bcd2String(t[8+o*r])),u=this.hexByte2Int(t[9+o*r],0)+this.hexByte2Int(t[10+o*r],1);n[pt.Data].push(((a={})[pt.Date]=s,a[pt.axillaryTemperature]=(.1*u).toFixed(1),a))}return n},t.getQrCode=function(t,e){var a,n,r,i;return e?((a={})[pt.DataType]=vt.EnterQrCode,a[pt.End]=!0,a[pt.Data]={},a):128===t[1]||129===t[1]?((n={})[pt.DataType]=vt.QrCodeBandBack,n[pt.End]=!0,n[pt.Data]=((r={})[pt.Band]=129===t[1]?"1":"0",r),n):((i={})[pt.DataType]=vt.ExitQrCode,i[pt.End]=!0,i[pt.Data]={},i)},t.getTempData=function(t){var e,a,n=((e={})[pt.DataType]=vt.Temperature_history,e[pt.End]=!1,e[pt.Data]=[],e),r=11,i=t.length,c=Math.floor(i/r);if(0===c||255===t[i-1]||1===c&&153===t[1])return n[pt.End]=!0,n;for(var o=0;o<c;o++){255===t[i-1]&&(n[pt.End]=!0);var s="20".concat(this.bcd2String(t[3+o*r]),".").concat(this.bcd2String(t[4+o*r]),".").concat(this.bcd2String(t[5+o*r])," ").concat(this.bcd2String(t[6+o*r]),":").concat(this.bcd2String(t[7+o*r]),":").concat(this.bcd2String(t[8+o*r])),u=this.hexByte2Int(t[9+o*r],0)+this.hexByte2Int(t[10+o*r],1);n[pt.Data].push(((a={})[pt.Date]=s,a[pt.temperature]=(.1*u).toFixed(1),a))}return n},t.getExerciseData=function(t){var e,a,n=((e={})[pt.DataType]=vt.GetActivityModeData,e[pt.End]=!1,e[pt.Data]=[],e),r=25,i=t.length,c=Math.floor(i/r);if(0===c)return n[pt.End]=!0,n;for(var o=0;o<c;o++){var s=1+(o+1)*r;s<i&&o===c-1&&255===t[s]&&(n[pt.End]=!0);for(var u="20".concat(this.bcd2String(t[3+o*r]),".").concat(this.bcd2String(t[4+o*r]),".").concat(this.bcd2String(t[5+o*r])," ").concat(this.bcd2String(t[6+o*r]),":").concat(this.bcd2String(t[7+o*r]),":").concat(this.bcd2String(t[8+o*r])),h=this.hexByte2Int(t[9+o*r],0).toString(),l=this.hexByte2Int(t[10+o*r],0).toString(),g=this.getData(2,11+o*r,t),d=this.getData(2,13+o*r,t),S=this.hexByte2Int(t[15+o*r],0),y=this.hexByte2Int(t[16+o*r],0),D=new Array(4).fill(0),f=0;f<4;f++)D[3-f]=t[17+f+o*r];var v=new Array(4).fill(0);for(f=0;f<4;f++)v[3-f]=t[21+f+o*r];var p=this.getFloat(D,0),m=this.getFloat(v,0);n[pt.Data].push(((a={})[pt.Date]=u,a[pt.ActivityMode]=h,a[pt.HeartRate]=l,a[pt.ActiveMinutes]=g.toString(),a[pt.Step]=d.toString(),a[pt.Pace]="".concat(S.toString(16),"'").concat(y.toString(16)),a[pt.Distance]=m.toFixed(2),a[pt.Calories]=p.toFixed(1),a))}return n},t.getActivityExerciseData=function(t){for(var e,a,n=0,r=0,i=new Array(4).fill(0),c=0;c<4;c++)n+=this.hexByte2Int(t[c+2],c),i[3-c]=t[c+6],r+=this.hexByte2Int(t[c+10],c);var o=this.hexByte2Int(t[1],0),s=this.getFloat(i,0),u=0;if(t.length>=18){var h=[0,0,0,0];for(c=0;c<4;c++)h[3-c]=t[c+14];u=this.getFloat(h,0)}return(e={})[pt.DataType]=vt.EnterActivityMode,e[pt.End]=!0,e[pt.Data]=((a={})[pt.HeartRate]=o.toString(),a[pt.Step]=n.toString(),a[pt.Calories]=s.toFixed(1),a[pt.Distance]=u.toFixed(1),a[pt.ActiveMinutes]=r.toString(),a),e},t.setTimeSuccessful=function(t){var e,a;return(e={})[pt.DataType]=vt.SetDeviceTime,e[pt.End]=!0,e[pt.Data]=((a={})[pt.KPhoneDataLength]=this.hexByte2Int(t[1],0).toString(),a),e},t.getData=function(t,e,a){for(var n=0,r=0;r<t;r++)n+=this.hexByte2Int(a[r+e],r);return n},t.getFloat=function(t,e){return this.intBitToDouble(this.getInt(t,e))},t.getInt=function(t,e){return(255&t[e])<<24|(255&t[e+1])<<16|(255&t[e+2])<<8|255&t[e+3]},t.setMethodSuccessful=function(t){var e;return(e={})[pt.DataType]=t,e[pt.End]=!0,e[pt.Data]={},e},t.getRealTimeTemperatureValue=function(t){var e,a=((e={})[pt.DataType]=vt.GetRealTimeTemperatureCorrection,e[pt.End]=!0,e),n={};a[pt.Data]=n;var r=t[1],i=t[2],c=t[3],o=t[4],s=t[5],u=t[6],h=t[7],l=t[8],g=t[9],d=t[10],S=this._leToInt(r,i)/10,y=this._leToInt(c,o)/10,D=this._leToInt(s,u)/10,f=this._leToInt(h,l)/10,v=this._leToInt(g,d)/10;return n[pt.highestTemp]=S,n[pt.displayTemp]=y,n[pt.ntcTemps]=[D,f,v],a},t._leToInt=function(t,e){return e<<8|t},t.getEcgHistoryData=function(t){var e,a=((e={})[pt.DataType]=vt.ECGdata,e[pt.End]=!1,e[pt.Data]={},e),n=t.length;if(n>=3&&113===t[0]&&255===t[1]&&255===t[2])return a[pt.End]=!0,a;if(113!==t[0]||n<3)return a;var r=this.hexByte2Int(t[1],0)+this.hexByte2Int(t[2],1);a[pt.Data][pt.ECGId]=r.toString();var i=3;if(n>=27){var c="20".concat(this.bcd2String(t[i]),"-")+"".concat(this.bcd2String(t[i+1]),"-")+"".concat(this.bcd2String(t[i+2])," ")+"".concat(this.bcd2String(t[i+3]),":")+"".concat(this.bcd2String(t[i+4]),":")+"".concat(this.bcd2String(t[i+5]));a[pt.Data][pt.Date]=c,i+=6;var o=this.hexByte2Int(t[i],0)+this.hexByte2Int(t[i+1],1);a[pt.Data][pt.ECGPointCount]=o.toString(),i+=2,a[pt.Data][pt.HRV]=this.hexByte2Int(t[i++],0).toString(),a[pt.Data][pt.HeartRate]=this.hexByte2Int(t[i++],0).toString(),a[pt.Data][pt.ECGMoodValue]=this.hexByte2Int(t[i++],0).toString(),i+=13}for(var s=[];i+1<n;){var u=this.hexByte2Int(t[i],0)+this.hexByte2Int(t[i+1],1);s.push(u),i+=2}return a[pt.Data][pt.ECGValue]=s,a},t.getEcgDataString=function(t){for(var e=[],a=Math.floor(t.length/2)-1,n=0;n<a;n++){var r=this.hexByte2Int(t[2*n+1],1)+this.hexByte2Int(t[2*n+2],0);r>=32768&&(r-=65536),e.push(r.toString())}return e.join(",")},t.ecgData=function(t){var e,a,n=this.hexByte2Int(t[1],0);return(e={})[pt.DataType]=vt.EcgppGstatus,e[pt.End]=!0,e[pt.Data]=((a={})[pt.EcgStatus]=n.toString(),a),e},t.ppgData=function(t){var e,a;return(e={})[pt.DataType]=vt.EcgppGstatus,e[pt.End]=!0,e[pt.Data]=((a={})[pt.PPGValue]=t,a),e},t.ecgResult=function(t){var e,a,n=((e={})[pt.DataType]=vt.GetEcgPpgStatus,e[pt.End]=!0,e[pt.Data]={},e);if(3===this.hexByte2Int(t[1],0)){var r="20".concat(this.bcd2String(t[10]),".").concat(this.bcd2String(t[11]),".").concat(this.bcd2String(t[12])," ").concat(this.bcd2String(t[13]),":").concat(this.bcd2String(t[14]),":").concat(this.bcd2String(t[15]));n[pt.Data]=((a={})[pt.Date]=r,a[pt.ECGHrvValue]=this.hexByte2Int(t[2],0).toString(),a[pt.ECGAvBlockValue]=this.hexByte2Int(t[3],0).toString(),a[pt.ECGHrValue]=this.hexByte2Int(t[4],0).toString(),a[pt.ECGStreesValue]=this.hexByte2Int(t[5],0).toString(),a[pt.ECGhighBpValue]=this.hexByte2Int(t[6],0).toString(),a[pt.ECGLowBpValue]=this.hexByte2Int(t[7],0).toString(),a[pt.ECGMoodValue]=this.hexByte2Int(t[8],0).toString(),a[pt.ECGBreathValue]=this.hexByte2Int(t[9],0).toString(),a)}return n},t.enterEcg=function(t){var e;return(e={})[pt.DataType]=vt.ENTERECG,e[pt.End]=!0,e[pt.Data]={},e},t.measurementWithType=function(t,e){var a,n,r,i,c,o,s,u;if(t)switch(e[1]){case 1:var h=this.hexByte2Int(e[6],0).toString(),l=this.hexByte2Int(e[7],0).toString();return(a={})[pt.DataType]=vt.MeasurementHrvCallback,a[pt.End]=!0,a[pt.Data]=((n={})[pt.HRV]=this.hexByte2Int(e[4],0),n[pt.highBP]=h,n[pt.lowBP]=l,n),a;case 2:return(r={})[pt.DataType]=vt.MeasurementHeartCallback,r[pt.End]=!0,r[pt.Data]=((i={})[pt.HeartRate]=this.hexByte2Int(e[2],0),i),r;case 3:return(c={})[pt.DataType]=vt.MeasurementOxygenCallback,c[pt.End]=!0,c[pt.Data]=((o={})[pt.Blood_oxygen]=this.hexByte2Int(e[3],0),o),c;case 4:var g=this.hexByte2Int(e[8],0)+this.hexByte2Int(e[9],1);return(s={})[pt.DataType]=vt.MeasurementTempCallback,s[pt.End]=!0,s[pt.Data]=((u={})[pt.temperature]=(.1*g).toFixed(1),u),s}else{var d={1:vt.StopMeasurementHrvCallback,2:vt.StopMeasurementHeartCallback,3:vt.StopMeasurementOxygenCallback,4:vt.StopMeasurementTempCallback};if(d[e[1]])return this.setMethodSuccessful(d[e[1]])}return{}},t.measurementWithTypeV8=function(t,e){var a,n,r,i,c,o,s;if(t)switch(e[1]){case 1:var u=this.hexByte2Int(e[6],0).toString(),h=this.hexByte2Int(e[7],0).toString();return(a={})[pt.DataType]=vt.MeasurementHrvCallback,a[pt.End]=!0,a[pt.Data]=((n={})[pt.HRV]=this.hexByte2Int(e[4],0),n[pt.highBP]=u,n[pt.lowBP]=h,n),a;case 2:return(r={})[pt.DataType]=vt.MeasurementHeartCallback,r[pt.End]=!0,r[pt.Data]=((i={})[pt.HeartRate]=this.hexByte2Int(e[2],0),i),r;case 3:return(c={})[pt.DataType]=vt.MeasurementOxygenCallback,c[pt.End]=!0,c[pt.Data]=((o={})[pt.Blood_oxygen]=this.hexByte2Int(e[3],0),o),c;case 4:return(s={})[pt.DataType]=vt.MeasurementECGCallback,s[pt.End]=!0,s[pt.Data]={},s}else{var l={1:vt.StopMeasurementHrvCallback,2:vt.StopMeasurementHeartCallback,3:vt.StopMeasurementOxygenCallback,4:vt.MeasurementECGCallback};if(l[e[1]])return this.setMethodSuccessful(l[e[1]])}return{}},t.measurementWithTypeV5=function(t,e){if(t)switch(e[1]){case 1:return this.setMethodSuccessful(vt.MeasurementHrvCallback);case 2:return this.setMethodSuccessful(vt.MeasurementHeartCallback);case 3:return this.setMethodSuccessful(vt.MeasurementOxygenCallback)}else switch(e[1]){case 1:return this.setMethodSuccessful(vt.StopMeasurementHrvCallback);case 2:return this.setMethodSuccessful(vt.StopMeasurementHeartCallback);case 3:return this.setMethodSuccessful(vt.StopMeasurementOxygenCallback)}return{}},t.measurementWithTypeV4=function(t,e){if(t)switch(e[1]){case 1:var a={},n={};return a[pt.DataType]=vt.MeasurementHrvCallback,a[pt.End]=!0,a[pt.Data]=n,n[pt.HRV]=this.hexByte2Int(e[4],0),n[pt.Stress]=this.hexByte2Int(e[5],0),n[pt.highBP]=this.hexByte2Int(e[6],0),n[pt.lowBP]=this.hexByte2Int(e[7],0),a;case 2:var r={},i={};return r[pt.DataType]=vt.MeasurementHeartCallback,r[pt.End]=!0,r[pt.Data]=i,i[pt.HeartRate]=this.hexByte2Int(e[2],0),r;case 3:var c={},o={};return c[pt.DataType]=vt.MeasurementOxygenCallback,c[pt.End]=!0,c[pt.Data]=o,o[pt.Blood_oxygen]=this.hexByte2Int(e[3],0),c}else switch(e[1]){case 1:return this.setMethodSuccessful(vt.StopMeasurementHrvCallback);case 2:return this.setMethodSuccessful(vt.StopMeasurementHeartCallback);case 3:return this.setMethodSuccessful(vt.StopMeasurementOxygenCallback);case 4:return this.setMethodSuccessful(vt.StopMeasurementTempCallback)}return{}},t.braceletdial=function(t,e){var a,n;return t?((a={})[pt.DataType]=vt.Braceletdial,a[pt.End]=!0,a):((n={})[pt.DataType]=vt.Braceletdialok,n[pt.End]=!0,n[pt.Data]={index:e[1].toString()},n)},t.getSportMode=function(t){for(var e,a=this.hexByte2Int(t[1],0),n=[],r=0;r<a;r++)n.push(this.hexByte2Int(t[r+2],0).toString());return(e={})[pt.DataType]=vt.GetSportMode,e[pt.End]=!0,e[pt.Data]=n.join(","),e},t.gPSControlCommand=function(t){for(var e,a,n="20".concat(this.bcd2String(t[1]),"-").concat(this.bcd2String(t[2]),"-").concat(this.bcd2String(t[3])," ").concat(this.bcd2String(t[4]),":").concat(this.bcd2String(t[5]),":").concat(this.bcd2String(t[6])),r=new Array(4).fill(0),i=new Array(4).fill(0),c=0;c<4;c++)r[3-c]=t[9+c],i[3-c]=t[14+c];var o=this.getFloat(r,0).toString(),s=this.getFloat(i,0).toString(),u=this.hexByte2Int(t[18],0);return(e={})[pt.DataType]=vt.GPSControlCommand,e[pt.End]=!0,e[pt.Data]=((a={})[pt.KActivityLocationTime]=n,a[pt.KActivityLocationLatitude]=o,a[pt.KActivityLocationLongitude]=s,a[pt.KActivityLocationCount]=u.toString(),a),e},t.setSocial=function(t){var e;return(e={})[pt.DataType]=vt.SocialdistanceGetting,e[pt.End]=!0,e[pt.Data]={scanInterval:this.hexByte2Int(t[2],0).toString(),scanTime:this.hexByte2Int(t[3],0).toString(),signalStrength:t[4].toString()},e},t.ecgQuality=function(t){var e;return(e={})[pt.DataType]=vt.EcgppG,e[pt.End]=!0,e[pt.Data]={heartValue:this.hexByte2Int(t[1],0).toString(),hrvValue:this.hexByte2Int(t[2],0).toString(),Quality:this.hexByte2Int(t[3],0).toString()},e},t.enterPhotoModeback=function(t){var e,a="";switch(t[1]){case 1:a=0===t[2]?"0":"1";break;case 2:a="2";break;case 3:switch(t[2]){case 1:a="3";break;case 2:a="4";break;case 3:a="5";break;case 4:a="6";break;case 5:a="7"}break;case 4:a="8"}return(e={})[pt.DataType]=vt.DeviceSendDataToAPP,e[pt.End]=!0,e[pt.Data]={type:a},e},t.setNewDeviceInfo=function(t){var e;return(e={})[pt.DataType]=vt.SetNewDeviceInfo,e[pt.End]=!0,e[pt.Data]={},e},t.getNewDeviceInfo=function(t){var e;return(e={})[pt.DataType]=vt.GetNewDeviceInfo,e[pt.End]=!0,e[pt.Data]={KEcg:this.hexByte2Int(t[1],0).toString()},e},t.updateClockSuccessful=function(t){var e,a;return console.log("updateClockSuccessful:",t),(e={})[pt.DataType]=vt.SetAlarmClockWithAllClock,e[pt.End]=!0,e[pt.Data]=((a={})[pt.KClockLast]=this.hexByte2Int(t[t.length-1],0).toString(),a),e},t.setBoolSugarStatus=function(t){var e,a;return(e={})[pt.DataType]=vt.BoolsugarStatus,e[pt.End]=!0,e[pt.Data]=((a={})[pt.EcgStatus]=this.hexByte2Int(t[2],0),a),e},t.setBoolSugarValue=function(t){for(var e,a=t.slice(3),n=[],r=0;r<Math.floor(a.length/3);r++){var i=this.hexByte2Int(a[3*r],2)+this.hexByte2Int(a[3*r+1],1)+this.hexByte2Int(a[3*r+2],0);n.push(i)}return(e={})[pt.DataType]=vt.BoolsugarValue,e[pt.End]=!0,e[pt.Data]={timestamp:Math.floor(Date.now()/1e3),ppg:n},e},t.setMethodError=function(t){var e;return(e={})[pt.DataType]=t,e[pt.End]=!1,e[pt.Data]={},e},t.readPregnancyCycle=function(t){var e,a;return(e={})[pt.DataType]=vt.GetPregnancyCycle,e[pt.End]=!0,e[pt.Data]=((a={})[pt.Date]="20".concat(this.bcd2String(t[3]),"-").concat(this.bcd2String(t[4]),"-").concat(this.bcd2String(t[5])),a[pt.Week]=this.hexByte2Int(t[1],0),a[pt.DayOfWeek]=this.hexByte2Int(t[2],0),a),e},t.readWomenHealth=function(t){var e,a;return(e={})[pt.DataType]=vt.GetWomenHealth,e[pt.End]=!0,e[pt.Data]=((a={})[pt.Date]="".concat(this.bcd2String(t[1]),"-").concat(this.bcd2String(t[2])),a[pt.WomenHealthPeriod]=this.hexByte2Int(t[3],0),a[pt.WomenHealthLength]=this.hexByte2Int(t[4],0),a),e},t.getTemperatureCorrectionValue=function(t){var e,a,n=[t[3],t[2]],r=this.byteArrayToInt(n);return(e={})[pt.DataType]=vt.CMD_Set_TemperatureCorrection,e[pt.End]=!0,e[pt.Data]=((a={})[pt.TemperatureCorrectionValue]=r.toString(),a),e},t.byteArrayToInt=function(t){return t[0]<<8&65280|255&t[1]},t.getHistoryGpsData=function(t){var e,a=[],n=((e={})[pt.DataType]=vt.Gps,e[pt.End]=!1,e),r=59,i=t.length,c=Math.floor(i/r);if(0===c)return n;255===t[t.length-1]&&90===t[t.length-2]&&(n[pt.End]=!0);for(var o=0;o<c;o++){for(var s={},u="20".concat(this.bcd2String(t[3+o*r]),".").concat(this.bcd2String(t[4+o*r]),".").concat(this.bcd2String(t[5+o*r])," ").concat(this.bcd2String(t[6+o*r]),":").concat(this.bcd2String(t[7+o*r]),":").concat(this.bcd2String(t[8+o*r])),h=[],l=[],g=0;g<6;g++){for(var d=new Array(4).fill(0),S=new Array(4).fill(0),y=0;y<4;y++)d[3-y]=t[9+y+o*r+8*g],S[3-y]=t[13+y+o*r+8*g];var D=this.getFloat(d,0).toString(),f=this.getFloat(S,0).toString();h.push(D),l.push(f)}s[pt.Date]=17===u.length?u:"2019.01.01 00:00:00",s[pt.Latitude]=h.join(","),s[pt.Longitude]=l.join(","),a.push(s)}return n[pt.Data]=a,n},t.getPPITestData=function(t){var e,a=((e={})[pt.DataType]=vt.GetPPIData,e[pt.End]=!1,e[pt.Data]=[],e),n=123,r=t.length,i=Math.floor(r/n);if(0===i)return a[pt.End]=!0,a;255===t[t.length-1]&&(a[pt.End]=!0);for(var c=0;c<i;c++){for(var o={},s=new Array(2).fill(0),u=0;u<2;u++)s[1-u]=t[1+u+c*n];for(var h=this.getInt(s,0),l="20".concat(this.bcd2String(t[3+c*n]),".").concat(this.bcd2String(t[4+c*n]),".").concat(this.bcd2String(t[5+c*n])," ").concat(this.bcd2String(t[6+c*n]),":").concat(this.bcd2String(t[7+c*n]),":").concat(this.bcd2String(t[8+c*n])),g=this.hexByte2Int(t[9+c*n],0),d=this.hexByte2Int(t[10+c*n],0).toString(),S=[],y=0;y<56;y++){for(var D=11+2*y,f=new Array(2).fill(0),v=0;v<2;v++)f[1-v]=t[D+v+c*n];var p=this.getFloat(f,0);if(0===p)break;S.push(p)}o[pt.TOTAL_ID]=g.toString(),o[pt.PPI_ID]=d,o[pt.DeviceTime]=l,o[pt.PPI_LIST]=S,o[pt.PPI_NUM]=h,a[pt.Data].push(o)}return a},t.getPPIV5Data=function(t){var e,a,n=t.length,r=((e={})[pt.DataType]=vt.GetPPIData,e[pt.End]=!1,e),i=[];r[pt.Data]=i,t.length>1&&255===t[t.length-1]&&t[t.length-2]===ut&&(r[pt.End]=!0);for(var c=0;c<Math.floor(n/123);c++){for(var o=123*c,s="20".concat(this.bcd2String(t[o+3]),".").concat(this.bcd2String(t[o+4]),".").concat(this.bcd2String(t[o+5])," ").concat(this.bcd2String(t[o+6]),":").concat(this.bcd2String(t[o+7]),":").concat(this.bcd2String(t[o+8])),u=this.hexByte2Int(t[o+9],0),h=this.hexByte2Int(t[o+10],0),l=[],g=0;g<56;g++){var d=t[o+11+2*g],S=t[o+11+2*g+1]<<8|d;if(0===S)break;l.push(S)}i.push(((a={})[pt.Date]=s,a[pt.PPI_LIST]=l,a[pt.PPI_UNIT]="ms",a[pt.PPI_NUM]=u,a[pt.PPI_ID]=h,a))}return r},t.getHrvTimeData=function(t){var e,a;return(e={})[pt.DataType]=vt.GetHrvTimeValue,e[pt.End]=!0,e[pt.Data]=((a={})[pt.HRV_TIME_MODE]=this.hexByte2Int(t[1],0),a[pt.HRV_TIME_Value]=this.hexByte2Int(t[2],0),a),e},t.closeDevices=function(t){var e,a;return(e={})[pt.DataType]=vt.CloseDevices,e[pt.End]=!0,e[pt.Data]=((a={})[pt.RESULT]=!0,a),e},t.getOffCheckStatus=function(t){var e,a;return(e={})[pt.DataType]=vt.GetOffCheckStatus,e[pt.End]=!0,e[pt.Data]=((a={})[pt.GET_OFF_TAG]=this.hexByte2Int(t[1],0),a[pt.GET_OFF_STATE]=this.hexByte2Int(t[2],0),a),e},t.getStepCount=function(t){var e=27,a=t.length;return 2!==a&&(a%26==0?e=26:a%27==0?e=27:(a-2)%26==0?e=26:(a-2)%27==0&&(e=27)),e},t.getPPGWaveformData=function(t){var e,a=((e={})[pt.DataType]=vt.PPGRealtime,e[pt.End]=!1,e[pt.Data]=[],e);if(!t||t.length<4)return a;if(57!==t[0])return a;for(var n=2,r=[];n+1<t.length;){var i=this.hexByte2Int(t[n],0)+this.hexByte2Int(t[n+1],1);r.push(i),n+=2}return a[pt.Data]=r,a},t.startDeviceMeasurementWithType=!1,t}();"function"==typeof SuppressedError&&SuppressedError;var Tt=function(){function pt(){}return pt.generateValue=function(t){return new Array(t).fill(0)},pt.hexByte2Int=function(t,e){return(255&t)*Math.pow(256,e)},pt.generateInitValue=function(){return this.generateValue(16)},pt.arrayCopy=function(t,e,a,n,r){for(var i=0;i<r;i++)a[n+i]=t[e+i]},pt.crcValue=function(t){for(var e=0,a=0;a<t.length-1;a++)e+=t[a];t[t.length-1]=255&e},pt.crcDynamicValue=function(t){for(var e=0,a=0,n=t;a<n.length;a++){e+=n[a]}t[t.length-1]=255&e},pt.getBcdValue=function(t){return 16*Math.floor(t/10)+t%10},pt.dataParsingWithData=function(P,J){if(void 0===J&&(J="2208"),!P||0===P.length)return It.setMethodError("Empty data");switch(P[0]){case s:return It.setMethodSuccessful(vt.SetStepGoal);case a:return It.setMethodSuccessful(vt.SetPersonalInfo);case D:break;case y:return It.setMethodSuccessful(vt.SetMotorVibrationWithTimes);case r:return It.setMethodSuccessful(vt.SetDeviceInfo);case v:return It.setMethodSuccessful(vt.SetAutomaticHRMonitoring);case St:return It.setMethodSuccessful(vt.SetSedentaryReminder);case c:return It.setMacSuccessful();case k:return It.setMethodSuccessful(vt.EnterActivityMode);case R:return 0!==P[2]&&0!==P[3]?It.getTemperatureCorrectionValue(P):It.setMethodSuccessful(vt.CMD_Set_TemperatureCorrection);case H:return It.getActivityExerciseData(P);case t:return It.setTimeSuccessful(P);case b:return It.getExerciseData(P);case e:return It.getDeviceTime(P);case n:return It.getUserInfo(P);case i:return It.getDeviceInfo(P,J);case o:return It.getActivityData(P);case u:return It.getGoal(P);case h:return It.getDeviceBattery(P);case l:return It.getDeviceAddress(P);case g:return It.getDeviceVersion(P);case f:return It.getDeviceName(P);case p:return It.getAutoHeart(P);case d:return It.reset();case S:return It.mcuReset();case I:return It.notify();case yt:return It.getActivityAlarm(P);case T:return It.getTotalStepData(P);case B:return It.getDetailData(P);case V:return It.getSleepData(P);case E:return It.getHeartData(P);case x:return It.getOnceHeartData(P);case A:return It.getHrvTestData(P);case C:return It.getClockData(P);case m:return It.updateClockSuccessful(P);case w:return It.setNewDeviceInfo(P);case W:return It.getNewDeviceInfo(P);case O:return It.enterPhotoModeback(P);case L:return It.setMethodSuccessful(vt.EnterPhotoMode);case N:return It.setMethodSuccessful(vt.BackHomeView);case K:return It.ecgQuality(P);case F:case U:break;case Q:return It.setMethodSuccessful(vt.Weather);case j:return It.braceletdial(!1,P);case q:return"V4"===J||"V5"===J?It.getRealTimeTemperatureValue(P):It.setMethodSuccessful(vt.SportMode);case Y:return It.getSportMode(P);case z:return"V4"===J?It.measurementWithTypeV4(this.StartDeviceMeasurementWithType,P):"V5"===J||"2025"===J?It.measurementWithTypeV5(this.StartDeviceMeasurementWithType,P):"V8"===J?It.measurementWithTypeV8(this.StartDeviceMeasurementWithType,P):It.measurementWithType(this.StartDeviceMeasurementWithType,P);case X:return It.gPSControlCommand(P);case Z:return It.getHistoryGpsData(P);case $:return It.setMethodSuccessful(vt.Clear_Bracelet_data);case _:return It.getAutoBloodOxygen(P);case M:return It.getBloodoxygen(P);case G:if(this.isSettingSocial)return It.setMethodSuccessful(vt.SocialdistanceSetting);It.setSocial(P);case tt:return It.setMethodSuccessful(vt.Sos);case et:return It.getTempData(P);case at:return It.getTempDataer(P);case nt:return It.getQrCode(P,!1);case dt:return It.setBoolSugarValue(P);case rt:return It.ecgResult(P);case st:return It.readPregnancyCycle(P);case it:return It.getEcgHistoryData(P);case ot:return 0===P[1]?It.setMethodSuccessful(vt.SetWomenHealth):It.readWomenHealth(P);case ct:var pt=this.hexByte2Int(P[1],0),mt=this.hexByte2Int(P[2],0);if(0!==pt)return It.setMethodSuccessful(vt.ppgStartFailed);switch(mt){case 1:return It.setMethodSuccessful(vt.ppgStartSucessed);case 2:return It.setMethodSuccessful(vt.ppgResult);case 3:return It.setMethodSuccessful(vt.ppgStop);case 4:return It.setMethodSuccessful(vt.ppgMeasurementProgress);case 5:return It.setMethodSuccessful(vt.ppgQuit);default:return It.setMethodSuccessful(vt.ppgStartFailed)}case ut:return"V4"===J||"V5"===J?It.getPPIV5Data(P):It.getPPITestData(P);case ht:return It.getHrvTimeData(P);case lt:return It.closeDevices(P);case gt:return It.getOffCheckStatus(P);case Dt:return It.getSleepActivityLevelsData(P);case ft:return It.getPPGWaveformData(P)}return It.setMethodError(this.getBcdValue(P[0]).toString())},pt.bloodsugarWithMode=function(t,e){var a=this.generateInitValue();return a[0]=ct,a[1]=t,2!==t&&4!==t||(a[2]=e),this.crcValue(a),a},pt.getDetailSleepDataWithMode=function(t){var e=this.generateInitValue();return e[0]=V,e[1]=99===t?153:t,this.crcValue(e),e},pt.insertDateValue=function(t,e){if(e&&!(e.length<=0)){var a=e.split(" "),n=a[0],r=a[1],i=n.split("-").map(Number),c=i[0],o=i[1],s=i[2],u=r.split(":").map(Number),h=u[0],l=u[1],g=u[2];t[4]=this.getBcdValue(c-2e3),t[5]=this.getBcdValue(o),t[6]=this.getBcdValue(s),t[7]=this.getBcdValue(h),t[8]=this.getBcdValue(l),t[9]=this.getBcdValue(g)}},pt.getHRVDataWithMode=function(t,e){var a=this.generateInitValue();return a[0]=A,a[1]=99===t?153:0===t?0:1===t?1:2,this.insertDateValue(a,e),this.crcValue(a),a},pt.getPPIDDataWithMode=function(t){var e=this.generateInitValue();return e[0]=ut,e[1]=99===t?153:0===t?0:1===t?1:2,this.crcValue(e),e},pt.getHrvTestTime=function(){var t=this.generateInitValue();return t[0]=ht,t[1]=0,this.crcValue(t),t},pt.setHrvTestTime=function(t){var e=this.generateInitValue();return e[0]=ht,e[1]=1,e[2]=t,this.crcValue(e),e},pt.closeBlueDevice=function(){var t=this.generateInitValue();return t[0]=lt,this.crcValue(t),t},pt.startBloodSugar=function(){var t=this.generateInitValue();return t[0]=ct,t[1]=1,this.crcValue(t),t},pt.progressBloodSugar=function(t){var e=this.generateInitValue();return e[0]=ct,e[1]=4,e[2]=t,this.crcValue(e),e},pt.endBloodSugar=function(){var t=this.generateInitValue();return t[0]=ct,t[1]=3,this.crcValue(t),t},pt.getTotalActivityDataWithMode=function(t){var e=this.generateInitValue();return e[0]=T,e[1]=99===t?153:0===t?0:1===t?1:2,this.crcValue(e),e},pt.getTotalActivityDataWithModeForTime=function(t,e){var a=this.generateInitValue();return a[0]=T,a[1]=99===t?153:0===t?0:1===t?1:2,this.insertDateValue(a,e),this.crcValue(a),a},pt.getDetailSleepDataWithModeForTime=function(t,e){var a=this.generateInitValue();return a[0]=V,a[1]=99===t?153:t,this.insertDateValue(a,e),this.crcValue(a),a},pt.getDetailActivityDataWithModeForTime=function(t,e){var a=this.generateInitValue();return a[0]=B,a[1]=99===t?153:t,this.insertDateValue(a,e),this.crcValue(a),a},pt.getTemperature_historyDataWithMode=function(t,e){var a=this.generateInitValue();return a[0]=et,a[1]=99===t?153:t,this.insertDateValue(a,e),this.crcValue(a),a},pt.getAxillaryTemperatureDataWithMode=function(t,e){var a=this.generateInitValue();return a[0]=at,a[1]=99===t?153:0===t?0:1===t?1:2,this.insertDateValue(a,e),this.crcValue(a),a},pt.enterActivityMode=function(t,e){var a=this.generateInitValue();return a[0]=k,a[1]=e,a[2]=t,this.crcValue(a),a},pt.sendHeartPackage=function(t,e,a){var n=this.generateInitValue(),r=255&Math.floor(e/60),i=e%60&255,c=new ArrayBuffer(4);new DataView(c).setFloat32(0,t,!0);var o=Array.from(new Uint8Array(c));return n[0]=J,this.arrayCopy(o,0,n,1,o.length),n[5]=r,n[6]=i,n[7]=255&a,this.crcValue(n),n},pt.realTimeStep=function(t,e){var a=this.generateInitValue();return a[0]=o,a[1]=t?1:0,a[2]=e?1:0,this.crcValue(a),a},pt.stopGo=function(){var t=this.generateInitValue();return t[0]=o,t[1]=0,this.crcValue(t),t},pt.setPersonalInfo=function(t){var e=this.generateInitValue();return e[0]=a,e[1]=t.sex,e[2]=t.age,e[3]=t.height,e[4]=t.weight,t.stepLength&&(e[5]=t.stepLength),this.crcValue(e),e},pt.getPersonalInfo=function(){var t=this.generateInitValue();return t[0]=n,this.crcValue(t),t},pt.enterOTA=function(){var t=this.generateInitValue();return t[0]=P,this.crcValue(t),t},pt.getDeviceVersion=function(){var t=this.generateInitValue();return t[0]=g,this.crcValue(t),t},pt.reset=function(){var t=this.generateInitValue();return t[0]=d,this.crcValue(t),t},pt.getDeviceMacAddress=function(){var t=this.generateInitValue();return t[0]=l,this.crcValue(t),t},pt.getDeviceBatteryLevel=function(){var t=this.generateInitValue();return t[0]=h,this.crcValue(t),t},pt.mcuReset=function(){var t=this.generateInitValue();return t[0]=S,this.crcValue(t),t},pt.setDeviceName=function(t){var e=this.generateInitValue(),a=Math.min(t.length,14);e[0]=D;for(var n=0;n<a;n++)e[n+1]=t.charCodeAt(n);for(n=a+1;n<6;n++)e[n]=0;return this.crcValue(e),e},pt.getDeviceName=function(){var t=this.generateInitValue();t[0]=f;for(var e=1;e<6;e++)t[e]=0;return this.crcValue(t),t},pt.setDeviceTime=function(e){var a=this.generateInitValue(),n=e.getFullYear()%100,r=e.getMonth()+1,i=e.getDate(),c=e.getHours(),o=e.getMinutes(),s=e.getSeconds();return a[0]=t,a[1]=this.getBcdValue(n),a[2]=this.getBcdValue(r),a[3]=this.getBcdValue(i),a[4]=this.getBcdValue(c),a[5]=this.getBcdValue(o),a[6]=this.getBcdValue(s),this.crcValue(a),a},pt.getDeviceTime=function(){var t=this.generateInitValue();return t[0]=e,this.crcValue(t),t},pt.setDeviceInfo=function(t){var e=this.generateInitValue();return e[0]=r,e[1]=t.distanceUnit?129:128,e[2]=t.is12Hour?129:128,e[3]=t.handUpLightScreenSwitch?129:128,e[4]=t.fahrenheit?128:129,e[5]=t.nightMode?129:128,e[6]=t.ancs?129:128,e[7]=255&t.ancsMask,e[8]=t.ancsMask>>8&255,e[9]=128|t.baseHeart,e[11]=128+t.screenBrightness,e[12]=128+t.indexDial,e[13]=t.socialDistance?129:128,e[14]=128+t.languages,this.crcValue(e),e},pt.setDeviceInfoV5=function(t,e,a){var n=this.generateInitValue();return n[0]=r,n[6]=t?129:128,n[5]=e?129:128,n[14]=a?129:128,this.crcValue(n),n},pt.setDeviceID=function(t){var e=this.generateInitValue();if(e[0]=c,t.length>=6)for(var a=0;a<6;a++)e[1+a]=t[a];return this.crcValue(e),e},pt.reminderCommand=function(t,e,a){var n=this.generateValue(80);n[0]=I,n[1]=255&t;var r=new TextEncoder,i=Array.from(r.encode(e)).slice(0,60);n[2]=i.length;for(var c=0;c<i.length;c++)n[3+c]=i[c];var o=Array.from(r.encode(a)).slice(0,15);n[63]=o.length;for(c=0;c<o.length;c++)n[64+c]=o[c];return n},pt.updateWeather=function(t){var e=this.generateValue(41);e[0]=Q,e[1]=255&t.weatherCode,e[2]=255&t.currentTemp,e[3]=255&t.maxTemp,e[4]=255&t.minTemp,e[5]=255&t.aqi,e[6]=t.aqi>>8&255;var a=new TextEncoder,n=Array.from(a.encode(t.address)).slice(0,32);e[7]=n.length;for(var r=0;r<n.length;r++)e[8+r]=n[r];return e},pt.mapWeatherCode=function(t){var e=Number(t);return Number.isNaN(e)?153:e>=0&&e<=38?e:153},pt.healthMeasurementWithDataType=function(t,e,a){this.StartDeviceMeasurementWithType=e;var n=this.generateInitValue();return n[0]=z,n[1]=t,n[2]=e?1:0,!a||a<=0?(n[4]=255,n[5]=255):(n[4]=255&a,n[5]=a>>8&255),this.crcValue(n),n},pt.realECGWave=function(t){var e=this.generateInitValue();return e[0]=W,e[1]=t?1:0,this.crcValue(e),e},pt.setBraceletdial=function(t){this.isRuning=!0;var e=this.generateInitValue();return e[0]=j,e[1]=t,this.crcValue(e),e},pt.setAutomaticHRMonitoring=function(t){var e=this.generateInitValue(),a=t.time;return e[0]=v,e[1]=t.open,e[2]=this.getBcdValue(t.startHour),e[3]=this.getBcdValue(t.startMinute),e[4]=this.getBcdValue(t.endHour),e[5]=this.getBcdValue(t.endMinute),e[6]=t.week,e[7]=255&a,e[8]=a>>8&255,e[9]=t.type,this.crcValue(e),e},pt.getAutomaticHRMonitoring=function(t){var e=this.generateInitValue();return e[0]=p,e[1]=t,this.crcValue(e),e},pt.getActivityModeDataWithMode=function(t){var e=this.generateInitValue();return e[0]=b,e[1]=t,this.crcValue(e),e},pt.getStaticHRWithMode=function(t,e){var a=this.generateInitValue();return a[0]=x,a[1]=t,this.insertDateValue(a,e),this.crcValue(a),a},pt.getDynamicHRWithMode=function(t,e){var a=this.generateInitValue();return a[0]=E,a[1]=t,this.insertDateValue(a,e),this.crcValue(a),a},pt.getBloodOxygen=function(t,e){var a=this.generateInitValue();return a[0]=M,a[1]=t,this.insertDateValue(a,e),this.crcValue(a),a},pt.getAutoBloodOxygen=function(t,e){var a=this.generateInitValue();return a[0]=_,a[1]=t,this.insertDateValue(a,e),this.crcValue(a),a},pt.setStepGoal=function(t,e,a,n,r){var i=this.generateInitValue();return i[0]=s,i[4]=t>>24&255,i[3]=t>>16&255,i[2]=t>>8&255,i[1]=255&t,i[6]=e>>8&255,i[5]=255&e,i[8]=a>>8&255,i[7]=255&a,i[10]=n>>8&255,i[9]=255&n,i[12]=r>>8&255,i[11]=255&r,this.crcValue(i),i},pt.GetStepGoal=function(){var t=this.generateInitValue();return t[0]=u,this.crcValue(t),t},pt.getDeviceInfo=function(){var t=this.generateInitValue();return t[0]=i,this.crcValue(t),t},pt.sendHex=function(t,e){var a=function(t,e,a){if(a||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||(n||(n=Array.prototype.slice.call(e,0,r)),n[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))}([],t,!0);return e&&this.crcDynamicValue(a),a},pt.getAlarmClock=function(){var t=this.generateInitValue();return t[0]=C,this.crcValue(t),t},pt.deleteAllAlarmClock=function(){var t=this.generateInitValue();return t[0]=C,t[1]=153,this.crcValue(t),t},pt.setAlarmClock=function(t){var e,a=this,n=[],r=39*t.length+2;if(r>128)for(var i=Math.floor(128/39),c=Math.ceil(t.length/i),o=0;o<c;o++){for(var s=o===c-1,u=s?t.length-i*o:i,h=new Array(39*u+(s?2:0)).fill(0),l=0;l<u;l++){var g=t[i*o+l],d=g.openOrClose,S=g.clockType,y=g.clockTime,D=g.week,f=g.text,v=39*l;h[v]=35,h[v+1]=t.length,h[v+2]=i*o+l,h[v+3]=d,h[v+4]=S,h[v+5]=this.getBcdValue(y.substring(0,2)),h[v+6]=this.getBcdValue(y.substring(3,5)),h[v+7]=D;var p=this.textToUtf8BytesSafe(f),m=Math.min(p.length,30);h[v+8]=m;for(var I=0;I<m;I++)h[v+9+I]=null!==(e=p[I])&&void 0!==e?e:0}s&&(h[h.length-2]=35,h[h.length-1]=255),n.push(h)}else{var T=new Array(r).fill(0);t.forEach(function(e,n){var r,i=e.openOrClose,c=e.clockType,o=e.clockTime,s=e.week,u=e.text,h=39*n;T[h]=35,T[h+1]=t.length,T[h+2]=n,T[h+3]=i,T[h+4]=c,T[h+5]=a.getBcdValue(o.substring(0,2)),T[h+6]=a.getBcdValue(o.substring(3,5)),T[h+7]=s;var l=a.textToUtf8BytesSafe(u),g=Math.min(l.length,30);T[h+8]=g;for(var d=0;d<g;d++)T[h+9+d]=null!==(r=l[d])&&void 0!==r?r:0}),T[r-2]=35,T[r-1]=255,n.push(T)}return n},pt.textToUtf8BytesSafe=function(t,e){void 0===e&&(e=30);for(var a=[],n=0,r=0;r<t.length;r++){var i=t[r],c=this.utf8EncodeChar(i);if(n+c.length>e)break;a.push.apply(a,c),n+=c.length}for(;a.length<e;)a.push(0);return a},pt.utf8EncodeChar=function(t){var e=t.codePointAt(0);return void 0===e?[]:e<=127?[e]:e<=2047?[192|e>>6,128|63&e]:e<=65535?[224|e>>12,128|e>>6&63,128|63&e]:[240|e>>18,128|e>>12&63,128|e>>6&63,128|63&e]},pt.getSedentaryReminder=function(){var t=this.generateInitValue();return t[0]=yt,this.crcValue(t),t},pt.setSedentaryReminder=function(t){var e=this.generateInitValue();e[0]=St,e[1]=this.getBcdValue(t.startTime_Hour),e[2]=this.getBcdValue(t.startTime_Minutes),e[3]=this.getBcdValue(t.endTime_Hour),e[4]=this.getBcdValue(t.endTime_Minutes);var a=(t.weeks.sunday?1:0)+(t.weeks.monday?2:0)+(t.weeks.tuesday?4:0)+(t.weeks.wednesday?8:0)+(t.weeks.thursday?16:0)+(t.weeks.friday?32:0)+(t.weeks.saturday?64:0);return e[5]=a,e[6]=t.intervalTime,e[7]=t.leastSteps,e[8]=t.mode,this.crcValue(e),e},pt.getRealTimeSleepDataWithMode=function(t){var e=this.generateInitValue();return e[0]=Dt,e[1]=t,this.crcValue(e),e},pt.enterTakePhoto=function(){var t=this.generateInitValue();return t[0]=L,this.crcValue(t),t},pt.enterSOS=function(){var t=this.generateInitValue();return t[0]=tt,this.crcValue(t),t},pt.clearBraceletData=function(){var t=this.generateInitValue();return t[0]=$,this.crcValue(t),t},pt.startPPGRealtime=function(t){var e=this.generateInitValue();return e[0]=ft,e[1]=t?1:0,this.crcValue(e),e},pt.confirmUnbind=function(t){var e=this.generateInitValue();return e[0]=nt,e[1]=t?129:128,this.crcValue(e),e},pt.setSocialSetting=function(t,e,a){this.isSettingSocial=!0;var n=this.generateInitValue();return n[0]=G,n[1]=1,n[2]=t,n[3]=e,n[4]=a,this.crcValue(n),n},pt.getSocialSetting=function(){this.isSettingSocial=!1;var t=this.generateInitValue();return t[0]=G,t[1]=0,this.crcValue(t),t},pt.getEcgHistory=function(t,e){var a=this.generateInitValue();return a[0]=it,a[1]=t,this.insertDateValue(a,e),this.crcValue(a),a},pt.deleteAllEcgHistory=function(){var t=this.generateInitValue();return t[0]=it,this.crcValue(t),t},pt.DATA_READ_START=0,pt.DATA_READ_CONTINUE=2,pt.DATA_DELETE=99,pt.DistanceMode_MILE=129,pt.DistanceMode_KM=128,pt.TimeMode_12h=129,pt.TimeMode_24h=128,pt.WristOn_Enable=129,pt.WristOn_DisEnable=128,pt.TempUnit_C=128,pt.TempUnit_F=129,pt.TAG="BleSDK",pt.isRuning=!1,pt.ecgopen=!1,pt.read=!1,pt.pregnancyCycleRead=!1,pt.isSettingSocial=!1,pt.StartDeviceMeasurementWithType=!1,pt}();export{mt as ANCS_MASK,vt as BleConst,Tt as BleSDK,pt as DeviceKey,It as ResolveUtil};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|