Socket
Socket
Sign inDemoInstall

qcloud-iotexplorer-appdev-plugin-wificonf-blecombo

Package Overview
Dependencies
18
Maintainers
5
Versions
172
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.24 to 2.3.25

2

lib/index.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var tslib_1=require("tslib"),iotexplorer_ui_dev_config_1=require("iotexplorer-ui-dev-config"),qcloud_iotexplorer_appdev_plugin_wificonf_core_1=require("qcloud-iotexplorer-appdev-plugin-wificonf-core"),qcloud_iotexplorer_appdev_sdk_1=require("qcloud-iotexplorer-appdev-sdk"),protocols_1=require("./protocols"),delay=qcloud_iotexplorer_appdev_sdk_1.AppDevSdk.utils.delay,WifiConfStepCode=qcloud_iotexplorer_appdev_plugin_wificonf_core_1.constants.WifiConfStepCode,WifiConfStepDesp=qcloud_iotexplorer_appdev_plugin_wificonf_core_1.constants.WifiConfStepDesp,WifiConfErrorMsg=qcloud_iotexplorer_appdev_plugin_wificonf_core_1.constants.WifiConfErrorMsg,protocols_2=require("./protocols");Object.defineProperty(exports,"BleComboDualModeDeviceAdapter",{enumerable:!0,get:function(){return protocols_2.BleComboDualModeDeviceAdapter}}),Object.defineProperty(exports,"BleComboDualModeDeviceAdapter4H5",{enumerable:!0,get:function(){return protocols_2.BleComboDualModeDeviceAdapter4H5}}),Object.defineProperty(exports,"BleComboEspDeviceAdapter",{enumerable:!0,get:function(){return protocols_2.BleComboEspDeviceAdapter}}),Object.defineProperty(exports,"BleComboLLSyncDeviceAdapter",{enumerable:!0,get:function(){return protocols_2.BleComboLLSyncDeviceAdapter}});var getBleComboProtoHandler=function(e){switch(e.wifiConfType){case iotexplorer_ui_dev_config_1.WifiConfType.BLEComboEsp:return new protocols_1.BleComboEspTask(e);case iotexplorer_ui_dev_config_1.WifiConfType.BLEComboLLSync:case iotexplorer_ui_dev_config_1.WifiConfType.DualMode:return new protocols_1.BleComboLLSyncTask(e);default:console.warn("没有找到 wifiConfType 对应的 bleComboHandler:",e.wifiConfType)}},BleComboPlugin=function(){function e(){}return e.install=function(e){e.plugins.wifiConfBleCombo={start:function(o){return tslib_1.__awaiter(this,void 0,void 0,(function(){var r,t,i,n,s,d,c,_,l,a,p,f,u,C,b,S,v,T,E=this;return tslib_1.__generator(this,(function(m){switch(m.label){case 0:r=o.onError,t=o.onProgress,i=o.onComplete,n=o.wifiConfToken,s=o.familyId,d=o.roomId,c=void 0===d?"":d,_=function(e){return void 0===e&&(e=1e3),tslib_1.__awaiter(E,void 0,void 0,(function(){return tslib_1.__generator(this,(function(o){switch(o.label){case 0:return[4,delay(e)];case 1:return o.sent(),[2]}}))}))},t({code:WifiConfStepCode.PROTOCOL_START,reportEvents:["配网","发送wifi"]}),m.label=1;case 1:m.trys.push([1,22,,23]),l=Date.now(),a=getBleComboProtoHandler(tslib_1.__assign(tslib_1.__assign({},o),{reporter:{info:function(e,o){void 0===o&&(o={}),t({code:WifiConfStepCode.PROTOCOL_DETAIL,detail:{message:WifiConfStepCode.PROTOCOL_DETAIL+"("+WifiConfStepDesp[WifiConfStepCode.PROTOCOL_DETAIL]+": "+e+")",data:o}})},error:function(e){r({code:"PROTOCOL_FAIL",detail:{error:e}})}}})),m.label=2;case 2:return m.trys.push([2,4,,5]),[4,a.start()];case 3:return m.sent(),[3,5];case 4:throw p=m.sent(),console.error(p),tslib_1.__assign({code:"PROTOCOL_FAIL"},p);case 5:return t({code:WifiConfStepCode.PROTOCOL_SUCCESS,detail:{timeCost:Date.now()-l},reportEvents:["发送wifi"]}),[4,_()];case 6:m.sent(),t({code:WifiConfStepCode.BUSINESS_START}),t({code:"BLE_SEND_TOKEN_START",detail:{data:{wifiConfToken:n}},reportEvents:["bleSendToken"]}),f=Date.now(),u=void 0,m.label=7;case 7:return m.trys.push([7,9,,10]),[4,a.sendToken()];case 8:return u=m.sent(),[3,10];case 9:throw C=m.sent(),tslib_1.__assign({code:"BLE_SEND_TOKEN_ERROR"},C);case 10:return[4,t({code:"BLE_SEND_TOKEN_SUCCESS",detail:{timeCost:Date.now()-f,response:u},reportEvents:["bleSendToken"]})];case 11:if(m.sent(),b=u.productId,S=u.deviceName,o.wifiConfType!==iotexplorer_ui_dev_config_1.WifiConfType.DualMode)return[3,17];m.label=12;case 12:return m.trys.push([12,15,,16]),[4,qcloud_iotexplorer_appdev_plugin_wificonf_core_1.queryTokenStateAndBind({token:o.wifiConfToken,productId:b,deviceName:S,familyId:s,roomId:c,onProgress:t,sdk:e,skipBind:!0,newTokenVersion:!1})];case 13:return m.sent(),[4,o.deviceAdapter.bindDevice({familyId:s,roomId:c})];case 14:return m.sent(),[3,16];case 15:throw v=m.sent(),tslib_1.__assign({code:"BLE_BIND_DEVICE_ERROR"},v);case 16:return[3,19];case 17:return[4,qcloud_iotexplorer_appdev_plugin_wificonf_core_1.queryTokenStateAndBind({token:o.wifiConfToken,productId:b,deviceName:S,familyId:s,roomId:c,onProgress:t,sdk:e,newTokenVersion:o.newTokenVersion})];case 18:m.sent(),m.label=19;case 19:return[4,t({code:WifiConfStepCode.BUSINESS_QUERY_TOKEN_STATE_SUCCESS,detail:{timeCost:Date.now()-f,response:u}})];case 20:return m.sent(),[4,_()];case 21:return m.sent(),i({productId:b,deviceName:S}),a.interrupt(),t({code:WifiConfStepCode.WIFI_CONF_SUCCESS,detail:{timeCost:Date.now()-l},reportEvents:["配网"]}),[3,23];case 22:return(T=m.sent())&&T.code in WifiConfErrorMsg&&(T.uiMsg=WifiConfErrorMsg[T.code]),t({code:WifiConfStepCode.WIFI_CONF_FAIL,detail:{error:T}}),r({code:WifiConfStepCode.WIFI_CONF_FAIL,detail:{error:T}}),[3,23];case 23:return[2]}}))}))}}},e}();exports.default=BleComboPlugin;
"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0});var tslib_1=require("tslib"),iotexplorer_ui_dev_config_1=require("iotexplorer-ui-dev-config"),qcloud_iotexplorer_appdev_plugin_wificonf_core_1=require("qcloud-iotexplorer-appdev-plugin-wificonf-core"),qcloud_iotexplorer_appdev_sdk_1=require("qcloud-iotexplorer-appdev-sdk"),protocols_1=require("./protocols"),qcloud_iotexplorer_common_libs_1=require("qcloud-iotexplorer-common-libs"),delay=qcloud_iotexplorer_appdev_sdk_1.AppDevSdk.utils.delay,WifiConfStepCode=qcloud_iotexplorer_appdev_plugin_wificonf_core_1.constants.WifiConfStepCode,WifiConfStepDesp=qcloud_iotexplorer_appdev_plugin_wificonf_core_1.constants.WifiConfStepDesp,WifiConfErrorMsg=qcloud_iotexplorer_appdev_plugin_wificonf_core_1.constants.WifiConfErrorMsg,protocols_2=require("./protocols");Object.defineProperty(exports,"BleComboDualModeDeviceAdapter",{enumerable:!0,get:function(){return protocols_2.BleComboDualModeDeviceAdapter}}),Object.defineProperty(exports,"BleComboDualModeDeviceAdapter4H5",{enumerable:!0,get:function(){return protocols_2.BleComboDualModeDeviceAdapter4H5}}),Object.defineProperty(exports,"BleComboEspDeviceAdapter",{enumerable:!0,get:function(){return protocols_2.BleComboEspDeviceAdapter}}),Object.defineProperty(exports,"BleComboLLSyncDeviceAdapter",{enumerable:!0,get:function(){return protocols_2.BleComboLLSyncDeviceAdapter}});var getBleComboProtoHandler=function(e){switch(e.wifiConfType){case iotexplorer_ui_dev_config_1.WifiConfType.BLEComboEsp:return new protocols_1.BleComboEspTask(e);case iotexplorer_ui_dev_config_1.WifiConfType.BLEComboLLSync:case iotexplorer_ui_dev_config_1.WifiConfType.DualMode:return new protocols_1.BleComboLLSyncTask(e);default:console.warn("没有找到 wifiConfType 对应的 bleComboHandler:",e.wifiConfType)}},protocolNameMap=((_a={})[iotexplorer_ui_dev_config_1.WifiConfType.BLEComboEsp]="ESP",_a[iotexplorer_ui_dev_config_1.WifiConfType.BLEComboLLSync]="LLSync",_a[iotexplorer_ui_dev_config_1.WifiConfType.DualMode]="LLSync Dualmode",_a),BleComboPlugin=function(){function e(){}return e.install=function(e){e.plugins.wifiConfBleCombo={start:function(o){var r,i;return tslib_1.__awaiter(this,void 0,void 0,(function(){var t,n,d,l,s,c,p,_,a,f,u,C,v,b,m,S,T,w,E,g,y=this;return tslib_1.__generator(this,(function(L){switch(L.label){case 0:t=o.onError,n=o.onProgress,d=o.onComplete,l=o.wifiConfToken,s=o.familyId,c=o.roomId,p=void 0===c?"":c,_=o.wifiConfType,a=function(e){return void 0===e&&(e=1e3),tslib_1.__awaiter(y,void 0,void 0,(function(){return tslib_1.__generator(this,(function(o){switch(o.label){case 0:return[4,delay(e)];case 1:return o.sent(),[2]}}))}))},f=new qcloud_iotexplorer_common_libs_1.FlowLogger("ble.combo").flow(o.wifiConfType,(protocolNameMap[_]||_)+" BLE Combo 配网"),(null===(r=o.deviceAdapter)||void 0===r?void 0:r.flowId)&&(f.context.flowId=null===(i=o.deviceAdapter)||void 0===i?void 0:i.flowId),f.externalContextGetter=function(){var e,r,i;return{productId:null===(e=o.deviceAdapter)||void 0===e?void 0:e.productId,deviceName:null===(r=o.deviceAdapter)||void 0===r?void 0:r.deviceName,bleDeviceId:null===(i=o.deviceAdapter)||void 0===i?void 0:i.deviceId}},f.start(),n({code:WifiConfStepCode.PROTOCOL_START,reportEvents:["配网","发送wifi"]}),L.label=1;case 1:L.trys.push([1,22,,23]),u=Date.now(),C=getBleComboProtoHandler(tslib_1.__assign(tslib_1.__assign({},o),{reporter:{info:function(e,o){void 0===o&&(o={}),n({code:WifiConfStepCode.PROTOCOL_DETAIL,detail:{message:WifiConfStepCode.PROTOCOL_DETAIL+"("+WifiConfStepDesp[WifiConfStepCode.PROTOCOL_DETAIL]+": "+e+")",data:o}})},error:function(e){t({code:"PROTOCOL_FAIL",detail:{error:e}})}},flowLogger:f})),L.label=2;case 2:return L.trys.push([2,4,,5]),[4,f.step("bleSendWifiInfo","蓝牙发送 WiFi 信息",!0).wrap(C.start())];case 3:return L.sent(),[3,5];case 4:throw v=L.sent(),console.error(v),tslib_1.__assign({code:"PROTOCOL_FAIL"},v);case 5:return n({code:WifiConfStepCode.PROTOCOL_SUCCESS,detail:{timeCost:Date.now()-u},reportEvents:["发送wifi"]}),[4,a()];case 6:L.sent(),n({code:WifiConfStepCode.BUSINESS_START}),n({code:"BLE_SEND_TOKEN_START",detail:{data:{wifiConfToken:l}},reportEvents:["bleSendToken"]}),b=Date.now(),m=void 0,L.label=7;case 7:return L.trys.push([7,9,,10]),[4,f.step("bleSendToken","蓝牙发送配网 Token",!0).wrap(C.sendToken())];case 8:return m=L.sent(),[3,10];case 9:throw S=L.sent(),tslib_1.__assign({code:"BLE_SEND_TOKEN_ERROR"},S);case 10:return[4,n({code:"BLE_SEND_TOKEN_SUCCESS",detail:{timeCost:Date.now()-b,response:m},reportEvents:["bleSendToken"]})];case 11:if(L.sent(),T=m.productId,w=m.deviceName,o.wifiConfType!==iotexplorer_ui_dev_config_1.WifiConfType.DualMode)return[3,17];L.label=12;case 12:return L.trys.push([12,15,,16]),[4,f.step("queryToken","轮询配网 Token",!0).wrap(qcloud_iotexplorer_appdev_plugin_wificonf_core_1.queryTokenStateAndBind({token:o.wifiConfToken,productId:T,deviceName:w,familyId:s,roomId:p,onProgress:n,sdk:e,skipBind:!0,newTokenVersion:!1}))];case 13:return L.sent(),[4,f.step("bleBindDevice","蓝牙绑定设备",!0).wrap(o.deviceAdapter.bindDevice({familyId:s,roomId:p}))];case 14:return L.sent(),[3,16];case 15:throw E=L.sent(),tslib_1.__assign({code:"BLE_BIND_DEVICE_ERROR"},E);case 16:return[3,19];case 17:return[4,f.step("queryToken","轮询配网 Token",!0).wrap(qcloud_iotexplorer_appdev_plugin_wificonf_core_1.queryTokenStateAndBind({token:o.wifiConfToken,productId:T,deviceName:w,familyId:s,roomId:p,onProgress:n,sdk:e,newTokenVersion:o.newTokenVersion}))];case 18:L.sent(),L.label=19;case 19:return[4,n({code:WifiConfStepCode.BUSINESS_QUERY_TOKEN_STATE_SUCCESS,detail:{timeCost:Date.now()-b,response:m}})];case 20:return L.sent(),[4,a()];case 21:return L.sent(),d({productId:T,deviceName:w}),f.success(),C.interrupt(),n({code:WifiConfStepCode.WIFI_CONF_SUCCESS,detail:{timeCost:Date.now()-u},reportEvents:["配网"]}),[3,23];case 22:return g=L.sent(),f.fail(null,g),g&&g.code in WifiConfErrorMsg&&(g.uiMsg=WifiConfErrorMsg[g.code]),n({code:WifiConfStepCode.WIFI_CONF_FAIL,detail:{error:g}}),t({code:WifiConfStepCode.WIFI_CONF_FAIL,detail:{error:g}}),[3,23];case 23:return[2]}}))}))}}},e}();exports.default=BleComboPlugin;
//# sourceMappingURL=index.js.map

@@ -114,3 +114,11 @@ import { BleComboLLSyncDeviceAdapterBase } from '../BleComboLLSync';

mtu: number;
}): any;
}): Promise<{
mtu: number;
}>;
getBLEMTU(params?: {
deviceId?: string;
writeType?: "write" | "writeNoResponse";
}): Promise<{
mtu: number;
}>;
getBLEDeviceRSSI(): any;

@@ -223,3 +231,11 @@ destroy(): void;

mtu: number;
}): any;
}): Promise<{
mtu: number;
}>;
getBLEMTU(params?: {
deviceId?: string;
writeType?: "write" | "writeNoResponse";
}): Promise<{
mtu: number;
}>;
getBLEDeviceRSSI(): any;

@@ -226,0 +242,0 @@ destroy(): void;

@@ -38,3 +38,5 @@ import { DeviceFilterFunction, DeviceAdapter4Mp } from 'qcloud-iotexplorer-bluetooth-adapter';

connectDevice(params: any): Promise<void>;
setMtu(mtu: any): Promise<any>;
setMtu(mtu: any): Promise<{
mtu: number;
}>;
buildBleData({ mode, subType, data, }: {

@@ -41,0 +43,0 @@ mode: any;

@@ -20,2 +20,4 @@ import { Reporter } from 'qcloud-iotexplorer-appdev-sdk';

reporter: Reporter;
flowId: string;
protected comboLogger: import("qcloud-iotexplorer-logger").InsightLogger;
notifyMessage({ type, data }?: any): Promise<any>;

@@ -60,2 +62,3 @@ connectDevice(params: any): Promise<void>;

}>;
protected tryGetMtu(): Promise<number | null>;
}

@@ -149,3 +152,11 @@ export declare const BleComboLLSyncDeviceAdapter: (new (...args: any[]) => {

mtu: number;
}): any;
}): Promise<{
mtu: number;
}>;
getBLEMTU(params?: {
deviceId?: string;
writeType?: "write" | "writeNoResponse";
}): Promise<{
mtu: number;
}>;
getBLEDeviceRSSI(): any;

@@ -258,3 +269,11 @@ destroy(): void;

mtu: number;
}): any;
}): Promise<{
mtu: number;
}>;
getBLEMTU(params?: {
deviceId?: string;
writeType?: "write" | "writeNoResponse";
}): Promise<{
mtu: number;
}>;
getBLEDeviceRSSI(): any;

@@ -261,0 +280,0 @@ destroy(): void;

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BleComboLLSyncDeviceAdapter4H5=exports.BleComboLLSyncDeviceAdapter=exports.BleComboLLSyncDeviceAdapterBase=exports.LLSyncComboConfig=void 0;var tslib_1=require("tslib"),qcloud_iotexplorer_appdev_sdk_1=require("qcloud-iotexplorer-appdev-sdk"),qcloud_iotexplorer_bluetooth_adapter_1=require("qcloud-iotexplorer-bluetooth-adapter"),qcloud_iotexplorer_bluetooth_adapter_llsync_1=require("qcloud-iotexplorer-bluetooth-adapter-llsync"),constants_1=require("./constants"),hex2str=qcloud_iotexplorer_bluetooth_adapter_llsync_1.utils.hex2str,U16ToHexString=qcloud_iotexplorer_bluetooth_adapter_llsync_1.utils.U16ToHexString,U8ToHexString=qcloud_iotexplorer_bluetooth_adapter_llsync_1.utils.U8ToHexString,arrayBufferToHexStringArray=qcloud_iotexplorer_bluetooth_adapter_1.blueToothHelper.arrayBufferToHexStringArray,byteUtil=qcloud_iotexplorer_appdev_sdk_1.AppDevSdk.utils.byteUtil;exports.LLSyncComboConfig={waitGetDeviceInfoTime:1e4,waitSetWiFiModeTime:1e4,waitSetWiFiInfoTime:1e4,waitSetWiFiConnectTime:7e4,waitSetWiFiTokenTime:6e4,waitDevLogInfoTime:1e4};var BleComboLLSyncDeviceAdapterBase=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.reporter={info:function(e,o){var r;void 0===e&&(e=""),void 0===o&&(o={});var _=o.message,n=void 0===_?"":_,l=tslib_1.__rest(o,["message"]),i=t,s=i.explorerDeviceId,a=i.deviceId,c=i.isConnected;null===(r=exports.BleComboLLSyncDeviceAdapter.options)||void 0===r||r.appDevSdk.reporter.info(qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.REPORT_EVENT_TYPE,{serviceId:exports.BleComboLLSyncDeviceAdapter.serviceId,message:n||(e&&qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.ACTION_DESC[e]?e+"("+qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.ACTION_DESC[e]+")":e),timeCost:l.timeCost||0,action:e,data:tslib_1.__assign({deviceId:s,bleDeviceId:a,isConnected:c},l)})},error:function(e,o){var r;void 0===e&&(e=""),void 0===o&&(o={});var _=o.error,n=tslib_1.__rest(o,["error"]),l=t,i=l.explorerDeviceId,s=l.deviceId,a=l.isConnected;_.code&&qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.ERROR_MESSAGES[_.code]&&(_.msg=qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.ERROR_MESSAGES[_.code]),null===(r=exports.BleComboLLSyncDeviceAdapter.options)||void 0===r||r.appDevSdk.reporter.error(qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.REPORT_EVENT_TYPE,{message:e&&qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.ERROR_MESSAGES[e]&&e+"("+qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.ERROR_MESSAGES[e]+":"+(_&&(_.message||_.errMsg||_.msg||_.code))+")",timeCost:n.timeCost||0,action:e,error:_,data:tslib_1.__assign(tslib_1.__assign({deviceId:i,bleDeviceId:s,isConnected:a},n),_)})}},t}return tslib_1.__extends(t,e),t.injectOptions=function(e){exports.BleComboLLSyncDeviceAdapter.options=e},t.prototype.notifyMessage=function(e){var t=void 0===e?{}:e,o=t.type,r=t.data;if("unknown"!==o)return console.log("check this in notifyMessage",this,{type:o,data:r}),this.emit(o,{type:o,data:r})},t.prototype.connectDevice=function(t){return tslib_1.__awaiter(this,void 0,void 0,(function(){return tslib_1.__generator(this,(function(o){switch(o.label){case 0:return[4,e.prototype.connectDevice.call(this,t)];case 1:return o.sent(),[4,this.afterConnectDevice()];case 2:return o.sent(),[2]}}))}))},t.prototype.afterConnectDevice=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){var e,t,o,r,_,n;return tslib_1.__generator(this,(function(l){switch(l.label){case 0:return[4,this.getDeviceInfo()];case 1:if(e=l.sent(),t=e.version,o=e.mtu,r=e.needSetMtu,_=e.deviceName,this.deviceName=_,this.bleVersion=t,this.mtu=Math.max(constants_1.MIN_ATT_MTU,o)-constants_1.ATT_MTU_TO_LLSYNC_MTU_DELTA,this.reporter.info("CONNECT_DEVICE",{data:{version:t,mtu:o,needSetMtu:r,deviceName:_}}),!r)return[3,5];l.label=2;case 2:return l.trys.push([2,4,,5]),[4,this.setMtu(o)];case 3:return l.sent(),this.reporter.info("SET_MTU_SUCCESS",{data:{mtu:o}}),this.writeMtuResult("success"),[3,5];case 4:return n=l.sent(),this.reporter.error("SET_MTU_FAIL",{error:n,data:{mtu:o}}),this.mtu=constants_1.MIN_ATT_MTU-constants_1.ATT_MTU_TO_LLSYNC_MTU_DELTA,this.writeMtuResult("fail"),[3,5];case 5:return[2,_]}}))}))},t.prototype.getDeviceInfo=function(){return this.writeAndWait4Response(qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_PREFIX[qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.GET_DEVICE_INFO],qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO,(function(e){if(!e.length)throw{code:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_INVALID};var t=parseInt(e.slice(2,3).join(""),16),o=parseInt(e.slice(3,5).join(""),16),r=!!(o>>15),_=8191&o,n=parseInt(e[5],16),l=hex2str(e.slice(6).join(""));if(n!==l.length)throw{code:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_INVALID};return{version:t,mtu:_,needSetMtu:r,deviceName:l}}),{timeout:exports.LLSyncComboConfig.waitGetDeviceInfoTime,timeoutCode:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.WAIT_GET_DEVICE_INFO_TIMEOUT,writeId:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_ID})},t.prototype.setWiFiMode=function(e){void 0===e&&(e=qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.STA_WIFI_MODE);var t=""+qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_PREFIX[qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_MODE]+U8ToHexString(qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.WIFI_MODE_MAP[e]);return this.writeAndWait4Response(t,qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_MODE_RESULT,(function(e){if(!e.length)throw{code:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_MODE_RESULT_INVALID};return!parseInt(e.slice(2,3).join(""),16)}),{timeout:exports.LLSyncComboConfig.waitSetWiFiModeTime,timeoutCode:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_MODE_RESULT_TIMEOUT,writeId:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_ID})},t.prototype.setWiFiInfo=function(e){var t=e.ssid,o=e.password,r=byteUtil.hexString2hexArray(byteUtil.byteArrayToHex(byteUtil.getBytesByString(t)))||[],_=byteUtil.hexString2hexArray(byteUtil.byteArrayToHex(byteUtil.getBytesByString(o)))||[];console.log("----data----",{ssid:t,password:o,ssidHexArray:r,passwordHexArray:_});var n=this.sliceData(tslib_1.__spread([qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_PREFIX[qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_INFO],U16ToHexString(r.length+_.length),U8ToHexString(r.length)],r,[U8ToHexString(_.length)],_),[tslib_1.__spread([U8ToHexString(r.length)],r),tslib_1.__spread([U8ToHexString(_.length)],_)],qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_INFO);return this.writeAndWait4Response(n,qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_INFO_RESULT,(function(e){if(!e.length)throw{code:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_INFO_RESULT_INVALID};return!parseInt(e.slice(2,3).join(""),16)}),{timeout:exports.LLSyncComboConfig.waitSetWiFiInfoTime,timeoutCode:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_INFO_RESULT_TIMEOUT,writeId:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_ID})},t.prototype.sendConnectWiFiAndGetWiFiConnectState=function(){var e=""+qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_PREFIX[qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_CONNECT];return this.writeAndWait4Response(e,qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_CONNECT_RESULT,(function(e){if(!e.length)throw{code:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_CONNECT_RESULT_INVALID};var t=parseInt(e.slice(3,4).join(""),16),o=parseInt(e.slice(5,6).join(""),16),r="";return o&&(r=hex2str(e.slice(6,6+o))),{connected:!t,ssid:r}}),{timeout:exports.LLSyncComboConfig.waitSetWiFiConnectTime,timeoutCode:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_CONNECT_RESULT_TIMEOUT,writeId:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_ID})},t.prototype.sendToken=function(e){var t=e.token,o=byteUtil.hexString2hexArray(byteUtil.byteArrayToHex(byteUtil.getBytesByString(t)));console.log("----data----",{token:t,tokenHexArray:o});var r=this.sliceData(tslib_1.__spread([qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_PREFIX[qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_TOKEN],U16ToHexString(o.length)],o),[o],qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_TOKEN);return this.writeAndWait4Response(r,qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_TOKEN_RESULT,(function(e){if(!e.length)throw{code:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_TOKEN_RESULT_INVALID};return!parseInt(e.slice(2,3).join(""),16)}),{timeout:exports.LLSyncComboConfig.waitSetWiFiTokenTime,timeoutCode:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_TOKEN_RESULT_TIMEOUT,writeId:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_ID})},t.prototype.getModuleLog=function(){var e=""+qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_PREFIX[qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.GET_DEV_LOG];return this.writeAndWait4Response(e,qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.GET_DEV_LOG_INFO,(function(e){if(!e.length)throw{code:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.GET_DEV_LOG_INFO_INVALID};var t=parseInt(e.slice(1,3).join(""),16);return{logStr:hex2str(e.slice(4,4+t))}}),{timeout:exports.LLSyncComboConfig.waitDevLogInfoTime,timeoutCode:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.GET_DEV_LOG_INFO_TIMEOUT,writeId:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_ID})},t.options=null,t.serviceId16="0000FFF0-0000-1000-8000-00805F9B34FB",t.serviceId="0000FFF0-65D0-4E20-B56A-E493541BA4E2",t.deviceFilter=function(e){var t,o,r;if(!e.advertisServiceUUIDs||!e.advertisServiceUUIDs.find((function(e){return e===exports.BleComboLLSyncDeviceAdapter.serviceId16}))||!e.advertisData)return null;try{var _=Math.floor(10*Math.random())%10==1||!0,n=arrayBufferToHexStringArray(e.advertisData);_&&(null===(t=exports.BleComboLLSyncDeviceAdapter.options)||void 0===t||t.appDevSdk.reporter.info(qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.REPORT_EVENT_TYPE,{message:"收到广播",serviceId:exports.BleComboLLSyncDeviceAdapter.serviceId,hexArr:n.join(",")}));var l,i=parseInt(n[2],16)>>4,s=n.slice(3,9),a=e.localName||e.name;return a&&-1===a.indexOf("_")&&(a=a+"_"+s.slice(0,2).join("")),l=hex2str(n.slice(9)),_&&(null===(o=exports.BleComboLLSyncDeviceAdapter.options)||void 0===o||o.appDevSdk.reporter.info(qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.REPORT_EVENT_TYPE,{message:"解析广播",serviceId:exports.BleComboLLSyncDeviceAdapter.serviceId,data:{deviceProductId:l||"x"}})),tslib_1.__assign(tslib_1.__assign({},e),{standardBleCombo:!0,serviceId:exports.BleComboLLSyncDeviceAdapter.serviceId,deviceName:"",productId:l,extendInfo:{moduleVersion:i},name:a})}catch(e){null===(r=exports.BleComboLLSyncDeviceAdapter.options)||void 0===r||r.appDevSdk.reporter.error(qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.REPORT_EVENT_TYPE,{message:"协议广播出错",error:e})}},t}(qcloud_iotexplorer_bluetooth_adapter_llsync_1.LLSyncDeviceAdapterBase);exports.BleComboLLSyncDeviceAdapterBase=BleComboLLSyncDeviceAdapterBase,exports.BleComboLLSyncDeviceAdapter=qcloud_iotexplorer_bluetooth_adapter_1.AdapterDeviceAdapter4Mp(BleComboLLSyncDeviceAdapterBase),exports.BleComboLLSyncDeviceAdapter4H5=qcloud_iotexplorer_bluetooth_adapter_1.AdapterDeviceAdapter4H5(BleComboLLSyncDeviceAdapterBase);
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BleComboLLSyncDeviceAdapter4H5=exports.BleComboLLSyncDeviceAdapter=exports.BleComboLLSyncDeviceAdapterBase=exports.LLSyncComboConfig=void 0;var tslib_1=require("tslib"),qcloud_iotexplorer_appdev_sdk_1=require("qcloud-iotexplorer-appdev-sdk"),qcloud_iotexplorer_bluetooth_adapter_1=require("qcloud-iotexplorer-bluetooth-adapter"),qcloud_iotexplorer_bluetooth_adapter_llsync_1=require("qcloud-iotexplorer-bluetooth-adapter-llsync"),qcloud_iotexplorer_logger_1=tslib_1.__importDefault(require("qcloud-iotexplorer-logger")),shortid_for_miniprogram_1=tslib_1.__importDefault(require("shortid-for-miniprogram")),constants_1=require("./constants"),hex2str=qcloud_iotexplorer_bluetooth_adapter_llsync_1.utils.hex2str,U16ToHexString=qcloud_iotexplorer_bluetooth_adapter_llsync_1.utils.U16ToHexString,U8ToHexString=qcloud_iotexplorer_bluetooth_adapter_llsync_1.utils.U8ToHexString,arrayBufferToHexStringArray=qcloud_iotexplorer_bluetooth_adapter_1.blueToothHelper.arrayBufferToHexStringArray,_a=qcloud_iotexplorer_appdev_sdk_1.AppDevSdk.utils,byteUtil=_a.byteUtil,envDetect=_a.envDetect;exports.LLSyncComboConfig={waitGetDeviceInfoTime:1e4,waitSetWiFiModeTime:1e4,waitSetWiFiInfoTime:1e4,waitSetWiFiConnectTime:7e4,waitSetWiFiTokenTime:6e4,waitDevLogInfoTime:1e4};var BleComboLLSyncDeviceAdapterBase=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.reporter={info:function(e,o){var r;void 0===e&&(e=""),void 0===o&&(o={});var _=o.message,n=void 0===_?"":_,i=tslib_1.__rest(o,["message"]),s=t,l=s.explorerDeviceId,a=s.deviceId,c=s.isConnected;null===(r=exports.BleComboLLSyncDeviceAdapter.options)||void 0===r||r.appDevSdk.reporter.info(qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.REPORT_EVENT_TYPE,{serviceId:exports.BleComboLLSyncDeviceAdapter.serviceId,message:n||(e&&qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.ACTION_DESC[e]?e+"("+qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.ACTION_DESC[e]+")":e),timeCost:i.timeCost||0,action:e,data:tslib_1.__assign({deviceId:l,bleDeviceId:a,isConnected:c},i)})},error:function(e,o){var r;void 0===e&&(e=""),void 0===o&&(o={});var _=o.error,n=tslib_1.__rest(o,["error"]),i=t,s=i.explorerDeviceId,l=i.deviceId,a=i.isConnected;_.code&&qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.ERROR_MESSAGES[_.code]&&(_.msg=qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.ERROR_MESSAGES[_.code]),null===(r=exports.BleComboLLSyncDeviceAdapter.options)||void 0===r||r.appDevSdk.reporter.error(qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.REPORT_EVENT_TYPE,{message:e&&qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.ERROR_MESSAGES[e]&&e+"("+qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.ERROR_MESSAGES[e]+":"+(_&&(_.message||_.errMsg||_.msg||_.code))+")",timeCost:n.timeCost||0,action:e,error:_,data:tslib_1.__assign(tslib_1.__assign({deviceId:s,bleDeviceId:l,isConnected:a},n),_)})}},t.flowId="",t.comboLogger=qcloud_iotexplorer_logger_1.default.derive((function(){return{event:"ble.combo.llsyncble.*",context:{productId:t.productId,deviceName:t.deviceName,bleDeviceId:t.deviceId,flowId:t.flowId}}})),t}return tslib_1.__extends(t,e),t.injectOptions=function(e){exports.BleComboLLSyncDeviceAdapter.options=e},t.prototype.notifyMessage=function(e){var t=void 0===e?{}:e,o=t.type,r=t.data;if("unknown"!==o)return console.log("check this in notifyMessage",this,{type:o,data:r}),this.emit(o,{type:o,data:r})},t.prototype.connectDevice=function(t){return tslib_1.__awaiter(this,void 0,void 0,(function(){return tslib_1.__generator(this,(function(o){switch(o.label){case 0:return this.flowId=shortid_for_miniprogram_1.default(),[4,e.prototype.connectDevice.call(this,t)];case 1:return o.sent(),[4,this.afterConnectDevice()];case 2:return o.sent(),[2]}}))}))},t.prototype.afterConnectDevice=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){var e,t,o,r,_,n,i,s,l,a;return tslib_1.__generator(this,(function(c){switch(c.label){case 0:return[4,this.getDeviceInfo()];case 1:return e=c.sent(),t=e.version,o=e.mtu,r=e.needSetMtu,_=e.deviceName,this.deviceName=_,this.bleVersion=t,n=Math.max(constants_1.MIN_ATT_MTU,o),this.mtu=constants_1.attMtuToLLSyncMtu(n),this.comboLogger.info("connectDevice",{data:{version:t,mtu:o,needSetMtu:r,deviceName:_}}),[4,this.tryGetMtu()];case 2:if(i=c.sent(),s=null,l=void 0,!r||envDetect.isIOS)return[3,8];c.label=3;case 3:return c.trys.push([3,5,,6]),[4,this.setMtu(n)];case 4:return c.sent(),this.reporter.info("mtu.set",{message:"设置 MTU = "+n+" 成功",data:{mtu:n},metric:{type:"success"}}),[3,6];case 5:return a=c.sent(),l=a,this.reporter.error("mtu.set",{message:"设置 MTU = "+n+" 失败",error:a,data:{mtu:n},metric:{type:"fail"}}),null!==a.mtu||1500104!==a.errno&&-1!==a.errCode?this.mtu=constants_1.attMtuToLLSyncMtu(constants_1.MIN_ATT_MTU):this.mtu=constants_1.attMtuToLLSyncMtu(n),[3,6];case 6:return[4,this.tryGetMtu()];case 7:return s=c.sent(),this.comboLogger.info("mtu.negotiate",{message:["MTU 协商结果: 期望值 = "+n+"; 过程 "+i+" -> "+s+";","最终值 = "+constants_1.llSyncMtuToAttMtu(this.mtu)].join(" "),data:{mtuBeforeSet:i,mtuAfterSet:s,desiredMtu:n,actualMtu:constants_1.llSyncMtuToAttMtu(this.mtu)},error:l}),[3,9];case 8:this.comboLogger.info("mtu.direct",{message:"直接使用设备提供的 MTU = "+n+"; 实际 MTU = "+i,data:{desiredMtu:n,actualMtu:i}}),c.label=9;case 9:return r&&this.writeMtuResult(l?"fail":"success"),[2,_]}}))}))},t.prototype.getDeviceInfo=function(){return this.writeAndWait4Response(qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_PREFIX[qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.GET_DEVICE_INFO],qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO,(function(e){if(!e.length)throw{code:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_INVALID};var t=parseInt(e.slice(2,3).join(""),16),o=parseInt(e.slice(3,5).join(""),16),r=!!(o>>15),_=8191&o,n=parseInt(e[5],16),i=hex2str(e.slice(6).join(""));if(n!==i.length)throw{code:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_INVALID};return{version:t,mtu:_,needSetMtu:r,deviceName:i}}),{timeout:exports.LLSyncComboConfig.waitGetDeviceInfoTime,timeoutCode:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.WAIT_GET_DEVICE_INFO_TIMEOUT,writeId:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_ID})},t.prototype.setWiFiMode=function(e){void 0===e&&(e=qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.STA_WIFI_MODE);var t=""+qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_PREFIX[qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_MODE]+U8ToHexString(qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.WIFI_MODE_MAP[e]);return this.writeAndWait4Response(t,qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_MODE_RESULT,(function(e){if(!e.length)throw{code:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_MODE_RESULT_INVALID};return!parseInt(e.slice(2,3).join(""),16)}),{timeout:exports.LLSyncComboConfig.waitSetWiFiModeTime,timeoutCode:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_MODE_RESULT_TIMEOUT,writeId:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_ID})},t.prototype.setWiFiInfo=function(e){var t=e.ssid,o=e.password,r=byteUtil.hexString2hexArray(byteUtil.byteArrayToHex(byteUtil.getBytesByString(t)))||[],_=byteUtil.hexString2hexArray(byteUtil.byteArrayToHex(byteUtil.getBytesByString(o)))||[];console.log("----data----",{ssid:t,password:o,ssidHexArray:r,passwordHexArray:_});var n=this.sliceData(tslib_1.__spread([qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_PREFIX[qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_INFO],U16ToHexString(r.length+_.length),U8ToHexString(r.length)],r,[U8ToHexString(_.length)],_),[tslib_1.__spread([U8ToHexString(r.length)],r),tslib_1.__spread([U8ToHexString(_.length)],_)],qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_INFO);return this.writeAndWait4Response(n,qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_INFO_RESULT,(function(e){if(!e.length)throw{code:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_INFO_RESULT_INVALID};return!parseInt(e.slice(2,3).join(""),16)}),{timeout:exports.LLSyncComboConfig.waitSetWiFiInfoTime,timeoutCode:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_INFO_RESULT_TIMEOUT,writeId:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_ID})},t.prototype.sendConnectWiFiAndGetWiFiConnectState=function(){var e=""+qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_PREFIX[qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_CONNECT];return this.writeAndWait4Response(e,qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_CONNECT_RESULT,(function(e){if(!e.length)throw{code:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_CONNECT_RESULT_INVALID};var t=parseInt(e.slice(3,4).join(""),16),o=parseInt(e.slice(5,6).join(""),16),r="";return o&&(r=hex2str(e.slice(6,6+o))),{connected:!t,ssid:r}}),{timeout:exports.LLSyncComboConfig.waitSetWiFiConnectTime,timeoutCode:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_CONNECT_RESULT_TIMEOUT,writeId:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_ID})},t.prototype.sendToken=function(e){var t=e.token,o=byteUtil.hexString2hexArray(byteUtil.byteArrayToHex(byteUtil.getBytesByString(t)));console.log("----data----",{token:t,tokenHexArray:o});var r=this.sliceData(tslib_1.__spread([qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_PREFIX[qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_TOKEN],U16ToHexString(o.length)],o),[o],qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_TOKEN);return this.writeAndWait4Response(r,qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_TOKEN_RESULT,(function(e){if(!e.length)throw{code:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_TOKEN_RESULT_INVALID};return!parseInt(e.slice(2,3).join(""),16)}),{timeout:exports.LLSyncComboConfig.waitSetWiFiTokenTime,timeoutCode:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.SET_WIFI_TOKEN_RESULT_TIMEOUT,writeId:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_ID})},t.prototype.getModuleLog=function(){var e=""+qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_PREFIX[qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.GET_DEV_LOG];return this.writeAndWait4Response(e,qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.GET_DEV_LOG_INFO,(function(e){if(!e.length)throw{code:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.GET_DEV_LOG_INFO_INVALID};var t=parseInt(e.slice(1,3).join(""),16);return{logStr:hex2str(e.slice(4,4+t))}}),{timeout:exports.LLSyncComboConfig.waitDevLogInfoTime,timeoutCode:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.GET_DEV_LOG_INFO_TIMEOUT,writeId:qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.DEVICE_INFO_WRITE_ID})},t.prototype.tryGetMtu=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){return tslib_1.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.getBLEMTU()];case 1:return[2,e.sent().mtu];case 2:return e.sent(),[2,null];case 3:return[2]}}))}))},t.options=null,t.serviceId16="0000FFF0-0000-1000-8000-00805F9B34FB",t.serviceId="0000FFF0-65D0-4E20-B56A-E493541BA4E2",t.deviceFilter=function(e){var t,o,r;if(!e.advertisServiceUUIDs||!e.advertisServiceUUIDs.find((function(e){return e===exports.BleComboLLSyncDeviceAdapter.serviceId16}))||!e.advertisData)return null;try{var _=Math.floor(10*Math.random())%10==1||!0,n=arrayBufferToHexStringArray(e.advertisData);_&&(null===(t=exports.BleComboLLSyncDeviceAdapter.options)||void 0===t||t.appDevSdk.reporter.info(qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.REPORT_EVENT_TYPE,{message:"收到广播",serviceId:exports.BleComboLLSyncDeviceAdapter.serviceId,hexArr:n.join(",")}));var i,s=parseInt(n[2],16)>>4,l=n.slice(3,9),a=e.localName||e.name;return a&&-1===a.indexOf("_")&&(a=a+"_"+l.slice(0,2).join("")),i=hex2str(n.slice(9)),_&&(null===(o=exports.BleComboLLSyncDeviceAdapter.options)||void 0===o||o.appDevSdk.reporter.info(qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.REPORT_EVENT_TYPE,{message:"解析广播",serviceId:exports.BleComboLLSyncDeviceAdapter.serviceId,data:{deviceProductId:i||"x"}})),tslib_1.__assign(tslib_1.__assign({},e),{standardBleCombo:!0,serviceId:exports.BleComboLLSyncDeviceAdapter.serviceId,deviceName:"",productId:i,extendInfo:{moduleVersion:s},name:a})}catch(e){null===(r=exports.BleComboLLSyncDeviceAdapter.options)||void 0===r||r.appDevSdk.reporter.error(qcloud_iotexplorer_bluetooth_adapter_llsync_1.constants.REPORT_EVENT_TYPE,{message:"协议广播出错",error:e})}},t}(qcloud_iotexplorer_bluetooth_adapter_llsync_1.LLSyncDeviceAdapterBase);exports.BleComboLLSyncDeviceAdapterBase=BleComboLLSyncDeviceAdapterBase,exports.BleComboLLSyncDeviceAdapter=qcloud_iotexplorer_bluetooth_adapter_1.AdapterDeviceAdapter4Mp(BleComboLLSyncDeviceAdapterBase),exports.BleComboLLSyncDeviceAdapter4H5=qcloud_iotexplorer_bluetooth_adapter_1.AdapterDeviceAdapter4H5(BleComboLLSyncDeviceAdapterBase);
//# sourceMappingURL=BleComboLLSyncDeviceAdapter.js.map

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BleComboLLSyncTask=void 0;var tslib_1=require("tslib"),constants_1=require("./constants"),BleComboTask_1=require("../BleComboTask"),BleComboLLSyncTask=function(e){function t(t){return e.call(this,t)||this}return tslib_1.__extends(t,e),t.prototype.setWiFiMode=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){var e;return tslib_1.__generator(this,(function(t){switch(t.label){case 0:if(!this.deviceAdapter)throw new Error("deviceAdapter option is not provided to this plugin");return[4,this.deviceAdapter.setWiFiMode()];case 1:if(e=t.sent(),this.logger.info("setWiFiModeSucc",{success:e}),!e)throw{code:"BLE_SET_WIFI_MODE_ERROR"};return[2]}}))}))},t.prototype.sendWiFiInfo=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){var e;return tslib_1.__generator(this,(function(t){switch(t.label){case 0:return[4,this.deviceAdapter.setWiFiInfo({ssid:this.ssid,password:this.password})];case 1:if(e=t.sent(),this.logger.info("sendWiFiInfo",{ssid:this.ssid,password:this.password,success:e}),!e)throw{code:"BLE_SEND_WIFI_INFO_ERROR",data:{ssid:this.ssid,password:this.password}};return[2]}}))}))},t.prototype.connectWifi=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){var e,t,s,i;return tslib_1.__generator(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.deviceAdapter.sendConnectWiFiAndGetWiFiConnectState()];case 1:if(e=o.sent(),t=e.connected,s=e.ssid,console.log("----ssidData",s),t&&s.length&&s===this.ssid)return[2,s];throw{code:"BLE_WIFI_CONNECTION_ERROR",connected:t,ssidData:s};case 2:return i=o.sent(),console.error(i),[2,Promise.reject(tslib_1.__assign({msg:constants_1.BLE_COMBO_ERRORS[i.code]||""},i))];case 3:return[2]}}))}))},t.prototype.sendToken=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){var e,t;return tslib_1.__generator(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,this.deviceAdapter.sendToken({token:this.token})];case 1:if(e=s.sent(),this.logger.info("sendTokenSuccess",{success:e,token:this.token,productId:this.deviceAdapter.productId,deviceName:this.deviceAdapter.deviceName}),!e)throw{code:"BLE_SEND_TOKEN_ERROR",token:this.token};return[2,{productId:this.deviceAdapter.productId,deviceName:this.deviceAdapter.deviceName}];case 2:return t=s.sent(),console.error(t),[2,Promise.reject(tslib_1.__assign({msg:constants_1.BLE_COMBO_ERRORS[t.code]||""},t))];case 3:return[2]}}))}))},t}(BleComboTask_1.BleComboTask);exports.BleComboLLSyncTask=BleComboLLSyncTask;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BleComboLLSyncTask=void 0;var tslib_1=require("tslib"),constants_1=require("./constants"),BleComboTask_1=require("../BleComboTask"),BleComboLLSyncTask=function(e){function t(t){return e.call(this,t)||this}return tslib_1.__extends(t,e),t.prototype.setWiFiMode=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){return tslib_1.__generator(this,(function(e){switch(e.label){case 0:if(!this.deviceAdapter)throw new Error("deviceAdapter option is not provided to this plugin");return[4,this.deviceAdapter.setWiFiMode()];case 1:if(!e.sent())throw{code:"BLE_SET_WIFI_MODE_ERROR"};return[2]}}))}))},t.prototype.sendWiFiInfo=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){return tslib_1.__generator(this,(function(e){switch(e.label){case 0:return[4,this.deviceAdapter.setWiFiInfo({ssid:this.ssid,password:this.password})];case 1:if(!e.sent())throw{code:"BLE_SEND_WIFI_INFO_ERROR",data:{ssid:this.ssid,password:this.password}};return[2]}}))}))},t.prototype.connectWifi=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){var e,t,s,i;return tslib_1.__generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.deviceAdapter.sendConnectWiFiAndGetWiFiConnectState()];case 1:if(e=r.sent(),t=e.connected,s=e.ssid,console.log("----ssidData",s),t&&s.length&&s===this.ssid)return[2,s];throw{code:"BLE_WIFI_CONNECTION_ERROR",connected:t,ssidData:s};case 2:return i=r.sent(),console.error(i),[2,Promise.reject(tslib_1.__assign({msg:constants_1.BLE_COMBO_ERRORS[i.code]||""},i))];case 3:return[2]}}))}))},t.prototype.sendToken=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){var e;return tslib_1.__generator(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.deviceAdapter.sendToken({token:this.token})];case 1:if(!t.sent())throw{code:"BLE_SEND_TOKEN_ERROR",token:this.token};return[2,{productId:this.deviceAdapter.productId,deviceName:this.deviceAdapter.deviceName}];case 2:return e=t.sent(),console.error(e),[2,Promise.reject(tslib_1.__assign({msg:constants_1.BLE_COMBO_ERRORS[e.code]||""},e))];case 3:return[2]}}))}))},t}(BleComboTask_1.BleComboTask);exports.BleComboLLSyncTask=BleComboLLSyncTask;
//# sourceMappingURL=BleComboLLSyncTask.js.map

@@ -25,1 +25,3 @@ export declare const SET_WIFI_MODE_RESULT_INVALID = "SET_WIFI_MODE_RESULT_INVALID";

export declare const ATT_MTU_TO_LLSYNC_MTU_DELTA = 3;
export declare const attMtuToLLSyncMtu: (attMtu: number) => number;
export declare const llSyncMtuToAttMtu: (attMtu: number) => number;

@@ -1,2 +0,2 @@

"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ATT_MTU_TO_LLSYNC_MTU_DELTA=exports.MIN_ATT_MTU=exports.BLE_COMBO_ERRORS=exports.GET_DEV_LOG_INFO_TIMEOUT=exports.GET_DEV_LOG_INFO_INVALID=exports.SET_WIFI_TOKEN_RESULT_TIMEOUT=exports.SET_WIFI_TOKEN_RESULT_INVALID=exports.SET_WIFI_CONNECT_RESULT_TIMEOUT=exports.SET_WIFI_CONNECT_RESULT_INVALID=exports.SET_WIFI_INFO_RESULT_TIMEOUT=exports.SET_WIFI_INFO_RESULT_INVALID=exports.SET_WIFI_MODE_RESULT_TIMEOUT=exports.SET_WIFI_MODE_RESULT_INVALID=void 0,exports.SET_WIFI_MODE_RESULT_INVALID="SET_WIFI_MODE_RESULT_INVALID",exports.SET_WIFI_MODE_RESULT_TIMEOUT="SET_WIFI_MODE_RESULT_TIMEOUT",exports.SET_WIFI_INFO_RESULT_INVALID="SET_WIFI_INFO_INVALID",exports.SET_WIFI_INFO_RESULT_TIMEOUT="SET_WIFI_INFO_TIMEOUT",exports.SET_WIFI_CONNECT_RESULT_INVALID="SET_WIFI_CONNECT_RESULT_INVALID",exports.SET_WIFI_CONNECT_RESULT_TIMEOUT="SET_WIFI_CONNECT_RESULT_TIMEOUT",exports.SET_WIFI_TOKEN_RESULT_INVALID="SET_WIFI_TOKEN_RESULT_INVALID",exports.SET_WIFI_TOKEN_RESULT_TIMEOUT="SET_WIFI_TOKEN_RESULT_TIMEOUT",exports.GET_DEV_LOG_INFO_INVALID="GET_DEV_LOG_INFO_INVALID",exports.GET_DEV_LOG_INFO_TIMEOUT="GET_DEV_LOG_INFO_TIMEOUT",exports.BLE_COMBO_ERRORS=((_a={})[exports.SET_WIFI_MODE_RESULT_INVALID]="设置WiFi模式返回格式错误",_a[exports.SET_WIFI_MODE_RESULT_TIMEOUT]="设置WiFi模式返回超时,请稍后再试",_a[exports.SET_WIFI_INFO_RESULT_INVALID]="WiFi信息传输返回格式错误",_a[exports.SET_WIFI_INFO_RESULT_TIMEOUT]="WiFi信息传输返回超时,请稍后再试",_a[exports.SET_WIFI_CONNECT_RESULT_INVALID]="WiFi连接失败",_a[exports.SET_WIFI_CONNECT_RESULT_TIMEOUT]="获取WiFi连接状态超时",_a[exports.SET_WIFI_TOKEN_RESULT_INVALID]="发送配网token结果非法",_a[exports.SET_WIFI_TOKEN_RESULT_TIMEOUT]="发送配网token结果超时,请稍后再试",_a[exports.GET_DEV_LOG_INFO_INVALID]="获取配网日志格式错误",_a[exports.GET_DEV_LOG_INFO_TIMEOUT]="获取配网日志超时,请稍后再试",_a),exports.MIN_ATT_MTU=23,exports.ATT_MTU_TO_LLSYNC_MTU_DELTA=3;
"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.llSyncMtuToAttMtu=exports.attMtuToLLSyncMtu=exports.ATT_MTU_TO_LLSYNC_MTU_DELTA=exports.MIN_ATT_MTU=exports.BLE_COMBO_ERRORS=exports.GET_DEV_LOG_INFO_TIMEOUT=exports.GET_DEV_LOG_INFO_INVALID=exports.SET_WIFI_TOKEN_RESULT_TIMEOUT=exports.SET_WIFI_TOKEN_RESULT_INVALID=exports.SET_WIFI_CONNECT_RESULT_TIMEOUT=exports.SET_WIFI_CONNECT_RESULT_INVALID=exports.SET_WIFI_INFO_RESULT_TIMEOUT=exports.SET_WIFI_INFO_RESULT_INVALID=exports.SET_WIFI_MODE_RESULT_TIMEOUT=exports.SET_WIFI_MODE_RESULT_INVALID=void 0,exports.SET_WIFI_MODE_RESULT_INVALID="SET_WIFI_MODE_RESULT_INVALID",exports.SET_WIFI_MODE_RESULT_TIMEOUT="SET_WIFI_MODE_RESULT_TIMEOUT",exports.SET_WIFI_INFO_RESULT_INVALID="SET_WIFI_INFO_INVALID",exports.SET_WIFI_INFO_RESULT_TIMEOUT="SET_WIFI_INFO_TIMEOUT",exports.SET_WIFI_CONNECT_RESULT_INVALID="SET_WIFI_CONNECT_RESULT_INVALID",exports.SET_WIFI_CONNECT_RESULT_TIMEOUT="SET_WIFI_CONNECT_RESULT_TIMEOUT",exports.SET_WIFI_TOKEN_RESULT_INVALID="SET_WIFI_TOKEN_RESULT_INVALID",exports.SET_WIFI_TOKEN_RESULT_TIMEOUT="SET_WIFI_TOKEN_RESULT_TIMEOUT",exports.GET_DEV_LOG_INFO_INVALID="GET_DEV_LOG_INFO_INVALID",exports.GET_DEV_LOG_INFO_TIMEOUT="GET_DEV_LOG_INFO_TIMEOUT",exports.BLE_COMBO_ERRORS=((_a={})[exports.SET_WIFI_MODE_RESULT_INVALID]="设置WiFi模式返回格式错误",_a[exports.SET_WIFI_MODE_RESULT_TIMEOUT]="设置WiFi模式返回超时,请稍后再试",_a[exports.SET_WIFI_INFO_RESULT_INVALID]="WiFi信息传输返回格式错误",_a[exports.SET_WIFI_INFO_RESULT_TIMEOUT]="WiFi信息传输返回超时,请稍后再试",_a[exports.SET_WIFI_CONNECT_RESULT_INVALID]="WiFi连接失败",_a[exports.SET_WIFI_CONNECT_RESULT_TIMEOUT]="获取WiFi连接状态超时",_a[exports.SET_WIFI_TOKEN_RESULT_INVALID]="发送配网token结果非法",_a[exports.SET_WIFI_TOKEN_RESULT_TIMEOUT]="发送配网token结果超时,请稍后再试",_a[exports.GET_DEV_LOG_INFO_INVALID]="获取配网日志格式错误",_a[exports.GET_DEV_LOG_INFO_TIMEOUT]="获取配网日志超时,请稍后再试",_a),exports.MIN_ATT_MTU=23,exports.ATT_MTU_TO_LLSYNC_MTU_DELTA=3,exports.attMtuToLLSyncMtu=function(_){return _-exports.ATT_MTU_TO_LLSYNC_MTU_DELTA},exports.llSyncMtuToAttMtu=function(_){return _+exports.ATT_MTU_TO_LLSYNC_MTU_DELTA};
//# sourceMappingURL=constants.js.map
import { AppDevSdk, Reporter } from 'qcloud-iotexplorer-appdev-sdk';
import { WifiConfOption } from 'qcloud-iotexplorer-appdev-plugin-wificonf-core';
import { DeviceAdapter } from 'qcloud-iotexplorer-bluetooth-adapter';
import { WifiConfType } from 'iotexplorer-ui-dev-config';
import type { FlowLogger } from 'qcloud-iotexplorer-common-libs';
export interface BleComboTaskOptions<T extends DeviceAdapter> extends WifiConfOption {
deviceAdapter: T;
reporter: Reporter;
flowLogger: FlowLogger;
}

@@ -17,3 +20,5 @@ export declare abstract class BleComboTask<T extends DeviceAdapter> extends AppDevSdk.utils.EventEmitter {

processing: boolean;
constructor({ targetWifiInfo, wifiConfToken, deviceAdapter, reporter, }: BleComboTaskOptions<T>);
wifiConfType: WifiConfType;
protected flowLogger: FlowLogger;
constructor({ targetWifiInfo, wifiConfToken, deviceAdapter, reporter, wifiConfType, flowLogger, }: BleComboTaskOptions<T>);
start(): Promise<never>;

@@ -20,0 +25,0 @@ interrupt(): void;

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BleComboTask=void 0;var tslib_1=require("tslib"),qcloud_iotexplorer_appdev_sdk_1=require("qcloud-iotexplorer-appdev-sdk"),delay=qcloud_iotexplorer_appdev_sdk_1.AppDevSdk.utils.delay,BleComboTask=function(e){function t(t){var r=t.targetWifiInfo,s=t.wifiConfToken,i=void 0===s?"":s,o=t.deviceAdapter,n=t.reporter,a=e.call(this)||this;a.sequence=0,a.sendDataInterval=300;var d=r.SSID,c=r.password;return a.ssid=d,a.password=c||"",a.token=i,a.deviceAdapter=o,a.logger=n,a.processing=!1,a.logger.info("ssid/password",{data:d+"/"+c.replace(/^\w{3}/,"***")}),a}return tslib_1.__extends(t,e),t.prototype.start=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){var e;return tslib_1.__generator(this,(function(t){switch(t.label){case 0:if(this.processing)return[2,Promise.reject({code:"PROCESSING_PLEASE_WAIT"})];this.processing=!0,t.label=1;case 1:return t.trys.push([1,8,,9]),console.info("[plugin]: start to set wifi mode"),[4,this.setWiFiMode()];case 2:return t.sent(),[4,delay(this.sendDataInterval)];case 3:return t.sent(),console.info("[plugin]: start to send wifi info"),[4,this.sendWiFiInfo()];case 4:return t.sent(),[4,delay(this.sendDataInterval)];case 5:return t.sent(),console.info("[plugin]: start to connect wifi"),[4,this.connectWifi()];case 6:return t.sent(),[4,delay(this.sendDataInterval)];case 7:return t.sent(),[3,9];case 8:return e=t.sent(),console.error(e),[2,Promise.reject({error:e})];case 9:return[2]}}))}))},t.prototype.interrupt=function(){this.processing=!1,this.deviceAdapter.disconnectDevice()},t}(qcloud_iotexplorer_appdev_sdk_1.AppDevSdk.utils.EventEmitter);exports.BleComboTask=BleComboTask;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BleComboTask=void 0;var tslib_1=require("tslib"),qcloud_iotexplorer_appdev_sdk_1=require("qcloud-iotexplorer-appdev-sdk"),delay=qcloud_iotexplorer_appdev_sdk_1.AppDevSdk.utils.delay,BleComboTask=function(e){function t(t){var s=t.targetWifiInfo,i=t.wifiConfToken,o=void 0===i?"":i,r=t.deviceAdapter,n=t.reporter,d=t.wifiConfType,a=t.flowLogger,p=e.call(this)||this;p.sequence=0,p.sendDataInterval=300;var c=s.SSID,l=s.password;return p.ssid=c,p.password=l||"",p.token=o,p.deviceAdapter=r,p.logger=n,p.processing=!1,p.wifiConfType=d,p.flowLogger=a,p.flowLogger.info("ssid","ssid = "+c,{ssid:c,password:l.replace(/^\w{3}/,"***")}),p}return tslib_1.__extends(t,e),t.prototype.start=function(){return tslib_1.__awaiter(this,void 0,void 0,(function(){return tslib_1.__generator(this,(function(e){switch(e.label){case 0:return this.processing?[2,Promise.reject({code:"PROCESSING_PLEASE_WAIT"})]:(this.processing=!0,[4,this.flowLogger.step("setWiFiMode","setWiFiMode",!0).wrap(this.setWiFiMode())]);case 1:case 3:case 5:return e.sent(),[4,delay(this.sendDataInterval)];case 2:return e.sent(),[4,this.flowLogger.step("sendWiFiInfo","sendWiFiInfo",!0).wrap(this.sendWiFiInfo())];case 4:return e.sent(),[4,this.flowLogger.step("connectWifi","connectWifi",!0).wrap(this.connectWifi())];case 6:return e.sent(),[2]}}))}))},t.prototype.interrupt=function(){this.processing=!1,this.deviceAdapter.disconnectDevice()},t}(qcloud_iotexplorer_appdev_sdk_1.AppDevSdk.utils.EventEmitter);exports.BleComboTask=BleComboTask;
//# sourceMappingURL=BleComboTask.js.map
{
"name": "qcloud-iotexplorer-appdev-plugin-wificonf-blecombo",
"version": "2.3.24",
"version": "2.3.25",
"description": "",

@@ -20,6 +20,9 @@ "main": "lib/index.js",

"iotexplorer-ui-dev-config": "^1.8.6",
"qcloud-iotexplorer-appdev-plugin-wificonf-core": "^2.3.14",
"qcloud-iotexplorer-appdev-sdk": "^2.3.12",
"qcloud-iotexplorer-bluetooth-adapter": "^0.12.19",
"qcloud-iotexplorer-bluetooth-adapter-llsync": "^2.3.23",
"qcloud-iotexplorer-appdev-plugin-wificonf-core": "^2.3.15",
"qcloud-iotexplorer-appdev-sdk": "^2.3.13",
"qcloud-iotexplorer-bluetooth-adapter": "^0.12.20",
"qcloud-iotexplorer-bluetooth-adapter-llsync": "^2.3.24",
"qcloud-iotexplorer-common-libs": "^0.12.15",
"qcloud-iotexplorer-logger": "^0.0.11",
"shortid-for-miniprogram": "^2.2.15",
"spark-md5": "^3.0.1",

@@ -36,3 +39,3 @@ "tslib": "^2.0.1"

},
"gitHead": "bb1bad2ea0f91ce15b1dadc287a0bb25d17feb07"
"gitHead": "d208071b4debbdfa750bbe038599f9151748bf0b"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc