@lumiastream/tapo-cove 3.28.3 → 3.29.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +24 -0
- package/dist/index.d.mts +48 -1
- package/dist/index.d.ts +48 -1
- package/dist/index.js +1 -31
- package/dist/index.mjs +1 -15
- package/package.json +9 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
Lumia Stream Proprietary License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lumia Stream
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Permission is NOT granted to use, copy, modify, merge, publish, distribute,
|
|
7
|
+
sublicense, and/or sell copies of this software, in whole or in part, without
|
|
8
|
+
an explicit written agreement from Lumia Stream. Use of this software is
|
|
9
|
+
restricted to the terms provided with an official Lumia Stream license or
|
|
10
|
+
subscription agreement.
|
|
11
|
+
|
|
12
|
+
This license applies to all packages, libraries, source files, build
|
|
13
|
+
artifacts, and assets contained in this repository, including but not limited
|
|
14
|
+
to the `@lumiastream/*` packages published from this monorepo.
|
|
15
|
+
|
|
16
|
+
THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
23
|
+
|
|
24
|
+
For licensing inquiries, contact: dev@lumiastream.com
|
package/dist/index.d.mts
CHANGED
|
@@ -89,6 +89,7 @@ declare class TapoApi {
|
|
|
89
89
|
device: {
|
|
90
90
|
id?: string;
|
|
91
91
|
host?: string;
|
|
92
|
+
info?: any;
|
|
92
93
|
};
|
|
93
94
|
state: LightState;
|
|
94
95
|
}) => Promise<boolean>;
|
|
@@ -101,6 +102,19 @@ declare class TapoApi {
|
|
|
101
102
|
}) => Promise<boolean>;
|
|
102
103
|
private loginDeviceByIp;
|
|
103
104
|
getDeviceInfoByIp(deviceIp: string): Promise<ITapo>;
|
|
105
|
+
getDevicesByIp(deviceIp: string): Promise<ITapo[]>;
|
|
106
|
+
/**
|
|
107
|
+
* Fetch the device's component map (`component_nego`). Returns `{ componentId: version }`.
|
|
108
|
+
* Useful for feature detection — e.g. presence of `energy_monitoring` flags a P304M/P210M
|
|
109
|
+
* strip that exposes per-outlet power draw. Pre-KLAP firmware may not implement this; in
|
|
110
|
+
* that case we return an empty map and callers should treat capability flags as unknown.
|
|
111
|
+
*/
|
|
112
|
+
getComponents(deviceIp: string): Promise<Record<string, number>>;
|
|
113
|
+
private _fetchComponents;
|
|
114
|
+
private _getOrCreateSession;
|
|
115
|
+
private _buildTapoFromDeviceInfo;
|
|
116
|
+
private _isKnownMultiSocketModel;
|
|
117
|
+
private _fetchChildDeviceList;
|
|
104
118
|
hasDeviceSession(deviceIp: string): boolean;
|
|
105
119
|
clearDeviceSession(deviceIp: string): void;
|
|
106
120
|
getSessionData(deviceIp: string): any;
|
|
@@ -121,6 +135,39 @@ declare const discover: (config: {
|
|
|
121
135
|
types?: ILumiaDeviceType[];
|
|
122
136
|
}) => Promise<any>;
|
|
123
137
|
|
|
138
|
+
type TapoLocalDiscoveryResult = {
|
|
139
|
+
ip: string;
|
|
140
|
+
mac?: string;
|
|
141
|
+
deviceId?: string;
|
|
142
|
+
deviceType?: string;
|
|
143
|
+
deviceModel?: string;
|
|
144
|
+
hwVersion?: string;
|
|
145
|
+
fwVersion?: string;
|
|
146
|
+
alias?: string;
|
|
147
|
+
owner?: string;
|
|
148
|
+
encryptType?: string;
|
|
149
|
+
httpPort?: number;
|
|
150
|
+
supportsHttps?: boolean;
|
|
151
|
+
raw?: any;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Local UDP discovery for Tapo / TP-Link SMART devices.
|
|
155
|
+
*
|
|
156
|
+
* Broadcasts a probe on UDP port 20002 across every active IPv4 interface and gathers
|
|
157
|
+
* device identity responses for `timeoutMs`. Returns an array of unique devices keyed by IP.
|
|
158
|
+
*
|
|
159
|
+
* Notes:
|
|
160
|
+
* - Requires no Tapo cloud credentials — works fully offline.
|
|
161
|
+
* - Some firmwares respond with an encrypted body we can't parse; those are filtered out.
|
|
162
|
+
* Users can still add them manually by IP. The `error_code` and `mgt_encrypt_schm` fields
|
|
163
|
+
* on parsed responses indicate whether KLAP or AES authentication is required next.
|
|
164
|
+
* - Devices that don't answer (older HS-series, deeply firewalled, on a separate VLAN, etc.)
|
|
165
|
+
* will simply not appear; the manual-IP path remains the fallback.
|
|
166
|
+
*/
|
|
167
|
+
declare const discoverLocalUdp: (opts?: {
|
|
168
|
+
timeoutMs?: number;
|
|
169
|
+
}) => Promise<TapoLocalDiscoveryResult[]>;
|
|
170
|
+
|
|
124
171
|
declare class KlapCipher {
|
|
125
172
|
private readonly key;
|
|
126
173
|
private readonly sig;
|
|
@@ -239,4 +286,4 @@ declare namespace tapo_constants {
|
|
|
239
286
|
};
|
|
240
287
|
}
|
|
241
288
|
|
|
242
|
-
export { LightState, TapoApi, TapoCloudApi, tapo_constants as TapoConstants, discover, discoverLocalDevices };
|
|
289
|
+
export { LightState, TapoApi, TapoCloudApi, tapo_constants as TapoConstants, discover, discoverLocalDevices, discoverLocalUdp };
|
package/dist/index.d.ts
CHANGED
|
@@ -89,6 +89,7 @@ declare class TapoApi {
|
|
|
89
89
|
device: {
|
|
90
90
|
id?: string;
|
|
91
91
|
host?: string;
|
|
92
|
+
info?: any;
|
|
92
93
|
};
|
|
93
94
|
state: LightState;
|
|
94
95
|
}) => Promise<boolean>;
|
|
@@ -101,6 +102,19 @@ declare class TapoApi {
|
|
|
101
102
|
}) => Promise<boolean>;
|
|
102
103
|
private loginDeviceByIp;
|
|
103
104
|
getDeviceInfoByIp(deviceIp: string): Promise<ITapo>;
|
|
105
|
+
getDevicesByIp(deviceIp: string): Promise<ITapo[]>;
|
|
106
|
+
/**
|
|
107
|
+
* Fetch the device's component map (`component_nego`). Returns `{ componentId: version }`.
|
|
108
|
+
* Useful for feature detection — e.g. presence of `energy_monitoring` flags a P304M/P210M
|
|
109
|
+
* strip that exposes per-outlet power draw. Pre-KLAP firmware may not implement this; in
|
|
110
|
+
* that case we return an empty map and callers should treat capability flags as unknown.
|
|
111
|
+
*/
|
|
112
|
+
getComponents(deviceIp: string): Promise<Record<string, number>>;
|
|
113
|
+
private _fetchComponents;
|
|
114
|
+
private _getOrCreateSession;
|
|
115
|
+
private _buildTapoFromDeviceInfo;
|
|
116
|
+
private _isKnownMultiSocketModel;
|
|
117
|
+
private _fetchChildDeviceList;
|
|
104
118
|
hasDeviceSession(deviceIp: string): boolean;
|
|
105
119
|
clearDeviceSession(deviceIp: string): void;
|
|
106
120
|
getSessionData(deviceIp: string): any;
|
|
@@ -121,6 +135,39 @@ declare const discover: (config: {
|
|
|
121
135
|
types?: ILumiaDeviceType[];
|
|
122
136
|
}) => Promise<any>;
|
|
123
137
|
|
|
138
|
+
type TapoLocalDiscoveryResult = {
|
|
139
|
+
ip: string;
|
|
140
|
+
mac?: string;
|
|
141
|
+
deviceId?: string;
|
|
142
|
+
deviceType?: string;
|
|
143
|
+
deviceModel?: string;
|
|
144
|
+
hwVersion?: string;
|
|
145
|
+
fwVersion?: string;
|
|
146
|
+
alias?: string;
|
|
147
|
+
owner?: string;
|
|
148
|
+
encryptType?: string;
|
|
149
|
+
httpPort?: number;
|
|
150
|
+
supportsHttps?: boolean;
|
|
151
|
+
raw?: any;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Local UDP discovery for Tapo / TP-Link SMART devices.
|
|
155
|
+
*
|
|
156
|
+
* Broadcasts a probe on UDP port 20002 across every active IPv4 interface and gathers
|
|
157
|
+
* device identity responses for `timeoutMs`. Returns an array of unique devices keyed by IP.
|
|
158
|
+
*
|
|
159
|
+
* Notes:
|
|
160
|
+
* - Requires no Tapo cloud credentials — works fully offline.
|
|
161
|
+
* - Some firmwares respond with an encrypted body we can't parse; those are filtered out.
|
|
162
|
+
* Users can still add them manually by IP. The `error_code` and `mgt_encrypt_schm` fields
|
|
163
|
+
* on parsed responses indicate whether KLAP or AES authentication is required next.
|
|
164
|
+
* - Devices that don't answer (older HS-series, deeply firewalled, on a separate VLAN, etc.)
|
|
165
|
+
* will simply not appear; the manual-IP path remains the fallback.
|
|
166
|
+
*/
|
|
167
|
+
declare const discoverLocalUdp: (opts?: {
|
|
168
|
+
timeoutMs?: number;
|
|
169
|
+
}) => Promise<TapoLocalDiscoveryResult[]>;
|
|
170
|
+
|
|
124
171
|
declare class KlapCipher {
|
|
125
172
|
private readonly key;
|
|
126
173
|
private readonly sig;
|
|
@@ -239,4 +286,4 @@ declare namespace tapo_constants {
|
|
|
239
286
|
};
|
|
240
287
|
}
|
|
241
288
|
|
|
242
|
-
export { LightState, TapoApi, TapoCloudApi, tapo_constants as TapoConstants, discover, discoverLocalDevices };
|
|
289
|
+
export { LightState, TapoApi, TapoCloudApi, tapo_constants as TapoConstants, discover, discoverLocalDevices, discoverLocalUdp };
|
package/dist/index.js
CHANGED
|
@@ -1,31 +1 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var lumiaRgbTypes = require('@lumiastream/lumia-rgb-types');
|
|
4
|
-
var C = require('axios');
|
|
5
|
-
var xe = require('@network-utils/arp-lookup');
|
|
6
|
-
var ie = require('local-devices');
|
|
7
|
-
var g = require('crypto');
|
|
8
|
-
var Se = require('util');
|
|
9
|
-
var lumiaRgbUtils = require('@lumiastream/lumia-rgb-utils');
|
|
10
|
-
var Le = require('http');
|
|
11
|
-
|
|
12
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
|
|
14
|
-
var C__default = /*#__PURE__*/_interopDefault(C);
|
|
15
|
-
var xe__default = /*#__PURE__*/_interopDefault(xe);
|
|
16
|
-
var ie__default = /*#__PURE__*/_interopDefault(ie);
|
|
17
|
-
var g__default = /*#__PURE__*/_interopDefault(g);
|
|
18
|
-
var Se__default = /*#__PURE__*/_interopDefault(Se);
|
|
19
|
-
var Le__default = /*#__PURE__*/_interopDefault(Le);
|
|
20
|
-
|
|
21
|
-
var ae=Object.defineProperty;var ce=(i,e)=>{for(var t in e)ae(i,t,{get:e[t],enumerable:!0});};var R=i=>Buffer.from(i,"base64").toString();var m=i=>{let e=i.error_code;if(e)switch(console.debug("[Tapo] errorCode: ",e),e){case 0:return;case-1010:throw new Error("Invalid public key length");case-1012:throw new Error("Invalid terminal UUID");case-1501:throw new Error("Invalid request or credentials");case-1002:throw new Error("Incorrect request");case-1003:throw new Error("JSON format error");case-20601:throw new Error("Incorrect email or password");case-20675:throw new Error("Cloud token expired or invalid");case 9999:throw new Error("Device token expired or invalid");default:throw new Error(`Unexpected Error Code: ${e} (${i.msg})`)}};var x=class{constructor(){this._values={};this.transition=e=>(this._values.transition_period=e,this);this.duration=this.transition;this.getValues=()=>this._values;}},w=class extends x{constructor(t){super();this.create=t=>(t&&Object.keys(t).forEach(s=>{let r;this.hasOwnProperty(s)&&(r=this[s],lumiaRgbUtils.isFunction(r)&&lumiaRgbUtils.isTruly(t[s])&&r.apply(this,[t[s]]));}),this);this.on=(t=!0)=>(this._values.device_on=t,this);this.turnOn=this.on;this.off=()=>(this.on(!1),this);this.turnOff=this.off;this.mode=(t="normal")=>(t==="normal"&&(this._values.color_temp=0),this._values.mode=t,this);this.hue=t=>(this._values.hue=t,this._values.color_temp=0,this);this.bri=t=>(this._values.brightness=t,this);this.brightness=this.bri;this.sat=t=>(this._values.saturation=t,this);this.saturation=this.sat;this.temp=t=>(this._values.color_temp=t,this);this.colorTemperature=this.temp;this.hsv=t=>{let s=[];return Array.isArray(t)?s=t:s=[t.h,t.s,t.v],this.hue(s[0]),this.sat(s[1]),this.bri(s[2]),this};this.rgb=t=>{let s;return Array.isArray(t)?s=lumiaRgbUtils.rgb2hsv(t):s=lumiaRgbUtils.rgb2hsv([t.r,t.g,t.b]),this.hsv(s)};this.color=t=>(Array.isArray(t)&&(t={r:t[0],g:t[1],b:t[2]}),t.ct?this.temp(t.ct):this.rgb({r:t.r,g:t.g,b:t.b}));t&&this.create(t);}};var $="aes-128-cbc",F=async(i,e,t)=>{let s=g.randomBytes(16),r=await C__default.default.post(`http://${t}/app/handshake1`,s,{responseType:"arraybuffer",withCredentials:!0,timeout:4e3}).catch(u=>{throw u?.response?.status===404?new Error("Klap protocol not supported"):new Error(`handshake1 failed: ${u}`)}),o=Buffer.from(r.data),n=r.headers["set-cookie"]?.[0],a=n?.substring(0,n.indexOf(";"))||"",c=o.slice(0,16),f=o.slice(16),d=ye(i,e),y=me(s,c,d);if(!Pe(y,f))throw new Error("email or password incorrect");let p=ge(s,c,d),h={};return h.Cookie=a,await C__default.default.post(`http://${t}/app/handshake2`,p,{responseType:"arraybuffer",headers:h,timeout:4e3}).catch(u=>{throw new Error(`handshake2 failed: ${u}`)}),le(t,s,c,d,a)},le=(i,e,t,s,r)=>{let o=we(e,t,s),n=ve(e,t,s),a=be(e,t,s),c=Be(n),f=h=>{let u=JSON.stringify(h),l=g.createCipheriv($,o,M(n,c));var B=l.update(A(u));return Buffer.concat([B,l.final()])},d=h=>{let u=g.createDecipheriv($,o,M(n,c));var l=u.update(h.slice(32));return JSON.parse(Buffer.concat([l,u.final()]).toString())},y=h=>{let u=f(h),l=v(Buffer.concat([a,c,u]));return Buffer.concat([l,u])};return {send:async h=>{c=ke(c);let u=y(h),l={};l.Cookie=r;let B=await C__default.default({method:"post",url:`http://${i}/app/request`,data:u,responseType:"arraybuffer",headers:l,timeout:4e3,params:{seq:c.readInt32BE()}}),_=d(B.data);return m(_),_.result},sessionCookie:r,cipher:{key:o,iv:n,seq:c}}},me=(i,e,t)=>v(Buffer.concat([i,e,t])),ge=(i,e,t)=>v(Buffer.concat([e,i,t])),ye=(i,e)=>v(Buffer.concat([N(i),N(e)])),we=(i,e,t)=>v(Buffer.concat([A("lsk"),i,e,t])).slice(0,16),ve=(i,e,t)=>v(Buffer.concat([A("iv"),i,e,t])),be=(i,e,t)=>v(Buffer.concat([A("ldk"),i,e,t])).slice(0,28),Be=i=>i.slice(i.length-4),M=(i,e)=>Buffer.concat([i.slice(0,12),e]),ke=i=>{let e=Buffer.alloc(4);return e.writeInt32BE(i.readInt32BE()+1),e},v=i=>g.createHash("sha256").update(i).digest(),N=i=>g.createHash("sha1").update(i).digest(),Pe=(i,e)=>i.compare(e)===0,A=i=>Buffer.from(i,"utf-8");var Te="rsa",W="aes-128-cbc",z="top secret",b=class{constructor(e,t){this.key=e;this.iv=t;}static toBase64(e){return Buffer.from(e.normalize("NFKC"),"utf-8").toString("base64")}static encodeUsername(e){let t=g__default.default.createHash("sha1");return t.update(e.normalize("NFKC")),t.digest("hex")}static createKeyPair(){return new Promise((e,t)=>{g__default.default.generateKeyPair("rsa",{modulusLength:1024},(s,r,o)=>{if(s)return t(s);let n=r.export({format:"pem",type:"spki"}).toString("base64"),a=o.export({format:"pem",type:"pkcs1"}).toString("base64");e({public:n,private:a});});})}encrypt(e){let t=g__default.default.createCipheriv("aes-128-cbc",this.key,this.iv);return `${t.update(e,"utf8","base64")}${t.final("base64")}`}decrypt(e){let t=g__default.default.createDecipheriv("aes-128-cbc",this.key,this.iv);return `${t.update(e,"base64","utf8")}${t.final("utf8")}`}},J=async()=>{let i={modulusLength:1024,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs1",format:"pem",cipher:"aes-256-cbc",passphrase:z}};return Se__default.default.promisify(g__default.default.generateKeyPair)(Te,i)},V=(i,e)=>{var t=g__default.default.createCipheriv(W,e.key,e.iv),s=t.update(Buffer.from(JSON.stringify(i)));return Buffer.concat([s,t.final()]).toString("base64")},j=(i,e)=>{var t=g__default.default.createDecipheriv(W,e.key,e.iv),s=t.update(Buffer.from(i,"base64"));return JSON.parse(Buffer.concat([s,t.final()]).toString())},Z=(i,e)=>{let t=Buffer.from(i,"base64");return g__default.default.privateDecrypt({key:e,padding:g__default.default.constants.RSA_PKCS1_PADDING,passphrase:z},t)},H=i=>Buffer.from(i).toString("base64");var Y=i=>{var e=g__default.default.createHash("sha1");return e.update(i),e.digest("hex")};var ee=async(i,e,t)=>{let s=await _e(t),r={method:"login_device",params:{username:H(Y(i)),password:H(e)},requestTimeMils:0},o=await X(r,s);return s.token=o.token,{send:a=>X(a,s),deviceKey:s}},_e=async i=>{let e=await J(),t={method:"handshake",params:{key:e.publicKey}},s=await C__default.default({method:"post",url:`http://${i}/app`,data:t,timeout:4e3});m(s.data);let r=s.headers["set-cookie"]?.[0],o=r?.substring(0,r.indexOf(";"))||"",n=Z(s.data.result.key,e.privateKey);return {key:n.subarray(0,16),iv:n.subarray(16,32),deviceIp:i,sessionCookie:o}},X=async(i,e)=>{let s={method:"securePassthrough",params:{request:V(i,e)}},r=await C__default.default({method:"post",url:`http://${e.deviceIp}/app?token=${e.token}`,data:s,headers:{Cookie:e.sessionCookie},timeout:4e3});m(r.data);let o=j(r.data.result.response,e);return m(o),o.result};var re=i=>typeof i?.message=="string"&&i.message.length>0?i.message:typeof i=="string"&&i.length>0?i:String(i??"Unknown error"),k=class{constructor(e){this._config={rawEmail:"",rawPassword:"",timeout:1e4,httpTimeout:4e3};this._deviceSessions=new Map;this.auth=async(e,t)=>{let s=t?.email||this._config.rawEmail,r=t?.password||this._config.rawPassword;if(this._config.rawEmail=s,this._config.rawPassword=r,!s||!r)throw new Error("Email and password are required for authentication");if(!e)throw new Error("Device IP address(es) required for authentication");return this.loginDeviceByIp(e,s,r)};this.setup=async(e,t)=>{let s=e.map(o=>o.host),r=await this.auth(s,t);return e.forEach(o=>{if(r.success.includes(o.host)){let n=this._deviceSessions.get(o.host);n&&this._deviceSessions.set(o.id,n);}}),r};this.sendState=async e=>{let t=e.device.host||e.device.id;if(!t)throw new Error("Device IP or ID is required");let s=this._deviceSessions.get(t);if(!s)throw new Error(`No session found for device ${t}. Please call auth or setup first.`);let o={method:"set_device_info",params:e.state.getValues()};s?.deviceKey&&(o.terminalUUID=lumiaRgbUtils.uuidv4());try{return await s.send(o),!0}catch{return !1}};this.sendPower=async e=>this.sendState({device:e.device,state:new w({on:e.power})});this._config={...this._config,...e},this._config.rawEmail=e?.email||"",this._config.rawPassword=e?.password||"";}async loginDeviceByIp(e,t,s){let r=t||this._config.rawEmail,o=s||this._config.rawPassword;if(!r||!o)throw new Error("Email and password are required for loginDeviceByIp");let n=Array.isArray(e)?e:[e],a={success:[],failed:[]},c=n.map(async f=>{try{try{let d=await F(r,o,f);this._deviceSessions.set(f,d),a.success.push(f);}catch(d){let y=re(d);try{let p=await ee(r,o,f);this._deviceSessions.set(f,p),a.success.push(f);}catch(p){let h=re(p),u=`Failed to login to device at ${f}. KLAP error: ${y}; Legacy error: ${h}`;a.failed.push({ip:f,error:u});}}}catch(d){a.failed.push({ip:f,error:d.message||"Unknown error"});}});if(await Promise.allSettled(c),!Array.isArray(e)&&a.failed.length>0)throw new Error(a.failed[0].error);return a}async getDeviceInfoByIp(e){let t=this._deviceSessions.get(e);if(!t){if(!(await this.auth(e,{email:this._config.rawEmail,password:this._config.rawPassword})).success.includes(e))throw new Error(`Failed to authenticate with device at ${e}. Please check your credentials.`);if(t=this._deviceSessions.get(e),!t)throw new Error(`Failed to establish session with device at ${e} after authentication.`)}let s={method:"get_device_info"};try{let r=await t.send(s),o=`Tapo Device (${e})`;return r.nickname&&(o=atob(r.nickname)),{id:r.device_id||`tapo-${e.replace(/\./g,"-")}`,name:o,address:`http://${e}`,host:e,lumiaInfo:{alias:o,identifier:r.device_id||`tapo-${e.replace(/\./g,"-")}`,serial:r.hw_id||r.mac||e,model:r.model||"Unknown Model",lumiaType:r.device_on!==void 0?lumiaRgbTypes.ILumiaDeviceType.PLUG:lumiaRgbTypes.ILumiaDeviceType.LIGHT,zonable:!1,maxZones:r.device_on!==void 0?0:1,zones:[],rgb:r.hue!==void 0||r.color_temp!==void 0,white:r.brightness!==void 0,connectionType:lumiaRgbTypes.ILumiaDeviceConnectionType.WIFI,brand:lumiaRgbTypes.ILumiaDeviceBrands.TAPO,product:r.model||"Tapo Device"},info:r}}catch(r){throw new Error(`Failed to get device info from ${e}: ${r.message}`)}}hasDeviceSession(e){return this._deviceSessions.has(e)}clearDeviceSession(e){this._deviceSessions.delete(e);}getSessionData(e){let t=this._deviceSessions.get(e);if(!t)throw new Error(`No session found for device ${e}. Please authenticate first.`);return {deviceIp:e,sessionCookie:t.sessionCookie,cipher:t.cipher,credentials:{email:this._config.rawEmail,password:this._config.rawPassword}}}};var E=class{constructor(e,t,s){let{iv:r,seq:o}=this.ivDerive(e,t,s);this.key=this.keyDerive(e,t,s),this.sig=this.sigDerive(e,t,s),this.iv=r,this.seq=o;}encrypt(e){if(this.seq+=1,typeof e=="string"&&(e=Buffer.from(e,"utf8")),!Buffer.isBuffer(e))throw new Error("msg must be a string or buffer");let t=g__default.default.createCipheriv("aes-128-cbc",this.key,this.ivSeq()),s=Buffer.concat([t.update(e),t.final()]),r=Buffer.alloc(4);r.writeInt32BE(this.seq,0);let o=g__default.default.createHash("sha256");o.update(Buffer.concat([this.sig,r,s]));let n=o.digest();return {encrypted:Buffer.concat([n,s]),seq:this.seq}}decrypt(e){if(!Buffer.isBuffer(e))return e;let t=g__default.default.createDecipheriv("aes-128-cbc",this.key,this.ivSeq());return Buffer.concat([t.update(e.subarray(32)),t.final()]).toString("utf8")}keyDerive(e,t,s){let r=Buffer.concat([Buffer.from("lsk"),e,t,s]);return g__default.default.createHash("sha256").update(r).digest().subarray(0,16)}ivDerive(e,t,s){let r=Buffer.concat([Buffer.from("iv"),e,t,s]),o=g__default.default.createHash("sha256").update(r).digest(),n=o.subarray(-4).readInt32BE(0);return {iv:o.subarray(0,12),seq:n}}sigDerive(e,t,s){let r=Buffer.concat([Buffer.from("ldk"),e,t,s]);return g__default.default.createHash("sha256").update(r).digest().subarray(0,28)}ivSeq(){let e=Buffer.alloc(4);e.writeInt32BE(this.seq,0);let t=Buffer.concat([this.iv,e]);if(t.length!==16)throw new Error("Length of iv is not 16");return t}};var S=class S{constructor(e){this._baseUrl="https://eu-wap.tplinkcloud.com/";this._config={rawEmail:"",rawPassword:"",email:"",password:"",authToken:null,timeout:1e4,httpTimeout:4e3};this._token="";this._devices=new Map;this.auth=async e=>{let t=e?.email||this._config.email,s=e?.password||this._config.password;if(!t||!s)throw new Error("Email and password are required for authentication");let r={method:"login",params:{appType:"Tapo_Ios",cloudPassword:s,cloudUserName:t,terminalUUID:lumiaRgbUtils.uuidv4()}},o=await C__default.default({method:"post",url:this._baseUrl,data:r});return m(o.data),this._token=o.data.result.token,this._token};this.setup=async(e,t)=>{let s=e.map(async o=>{let n=await this.handshake(o.host,void 0,!1,t);this._devices.set(o.id,n);}),r=[];try{r=await Promise.allSettled(s);}catch(o){console.error("tapo cloud setup err: ",o);}return {responses:r,devices:this._devices}};this.sendState=async e=>{let t=this._devices.get(e.device.id);if(!t)return Promise.resolve(!1);await this.handshake(t?.ip,t,!1);let s=e.state.getValues(),r=JSON.stringify({method:"set_device_info",params:s}),o=t.cipher.encrypt(r);if((await this.sessionPost(t.ip,"/request",o.encrypted,"arraybuffer",t.Cookie,{seq:o.seq.toString()})).status!==200)throw new Error("[KLAP] Request failed");return !0};this.sendPower=async e=>this.sendState({device:e.device,state:new w({on:e.power})});this.axiosInstance=C__default.default.create(),this.axiosInstance.defaults.timeout=e?.httpTimeout||4e3,this._config={...this._config,...e},this._config.rawEmail=this._config.email,this._config.rawPassword=this._config.password,this._config.email=b.toBase64(b.encodeUsername(this._config.email)),this._config.password=b.toBase64(this._config.password),this.terminalUUID=g__default.default.randomUUID();}async sessionPost(e,t,s,r,o,n){let a={Accept:"*/*","Content-Type":"application/octet-stream"};return o&&(process?.versions?.electron?a.BypassCookie=o:a.Cookie=o),C__default.default.post(`http://${e}/app${t}`,s,{responseType:r,params:n,headers:a,httpAgent:new Le__default.default.Agent({keepAlive:!1})})}needsNewHandshake(e){return !!(!e||!e.cipher||e.IsExpired||!e.Cookie)}async handshake(e,t,s=!1,r){if(!this.needsNewHandshake(t)&&!s)return;let{localSeed:o,remoteSeed:n,authHash:a,deviceSession:c}=await this.firstHandshake(e,void 0,r);return await this.secondHandshake(c,e,o,n,a,r)}async firstHandshake(e,t,s){let r=t||g__default.default.randomBytes(16),o=await this.sessionPost(e,"/handshake1",r,"arraybuffer");if(s?.debug("handshake1Result: ",o),o.status!==200)throw new Error("Handshake1 failed");if(o.headers["content-length"]!=="48")throw new Error("Handshake1 failed due to invalid content length");let n=o.headers["bypass-cookie"]||o.headers["set-cookie"]?.[0],a=Buffer.from(new Uint8Array(o.data)),[c,f]=n.split(";"),d=f.split("=").pop(),y=new q(d,e,c),p=a.subarray(0,16),h=a.subarray(16);s?.debug(`[KLAP] First handshake decoded successfully:
|
|
22
|
-
Remote Seed:`,p.toString("hex"),`
|
|
23
|
-
Server Hash:`,h.toString("hex"),`
|
|
24
|
-
Cookie:`,c);let u=this.hashAuth(this._config.rawEmail,this._config.rawPassword),l=this.sha256(Buffer.concat([r,p,u]));if(Buffer.compare(l,h)===0)return s?.debug("[KLAP] Local auth hash matches server hash"),{localSeed:r,remoteSeed:p,authHash:u,deviceSession:y};let B=this.sha256(Buffer.concat([r,p,this.hashAuth("","")]));if(Buffer.compare(B,h)===0)return s?.debug("[KLAP] [WARN] Empty auth hash matches server hash"),{localSeed:r,remoteSeed:p,authHash:B,deviceSession:y};let _=this.sha256(Buffer.concat([r,p,this.hashAuth(S.TP_TEST_USER,S.TP_TEST_PASSWORD)]));if(Buffer.compare(_,h)===0)return s?.debug("[KLAP] [WARN] Test auth hash matches server hash"),{localSeed:r,remoteSeed:p,authHash:_,deviceSession:y};throw new Error("Failed to verify server hash")}async secondHandshake(e,t,s,r,o,n){let a=this.sha256(Buffer.concat([r,s,o]));try{let c=await this.sessionPost(t,"/handshake2",a,"text",e.Cookie);if(c.status===200)return n?.debug("[KLAP] Second handshake successful"),e.completeHandshake(t,new E(s,r,o));n.warn("[KLAP] Second handshake failed",c.data);}catch(c){n.error("[KLAP] Second handshake failed:",c.response.data||c.message);}}sha256(e){return g__default.default.createHash("sha256").update(e).digest()}sha1(e){return g__default.default.createHash("sha1").update(e).digest()}hashAuth(e,t){return this.sha256(Buffer.concat([this.sha1(Buffer.from(e.normalize("NFKC"))),this.sha1(Buffer.from(t.normalize("NFKC")))]))}};S.TP_TEST_USER="test@tp-link.net",S.TP_TEST_PASSWORD="test";var T=S,q=class i{constructor(e,t,s,r){this.ip=t;this.cookie=s;this.cipher=r;this.handshakeCompleted=!1;this.rawTimeout=e,this.expireAt=new Date(Date.now()+parseInt(e)*1e3),r&&(this.handshakeCompleted=!0);}get IsExpired(){return this.expireAt.getTime()-Date.now()<=40*1e3}get Cookie(){return this.cookie}completeHandshake(e,t){return new i(this.rawTimeout,e,this.cookie,t)}};var Ce=["84:d8:1b","78:8c:b5","cc:ba:bd","e4:fa:c4","ac:84:c6","50:c7:bf"],He=5,U=i=>(i||"").replace(/[^a-fA-F0-9]/g,"").toLowerCase(),Ke=i=>{let e=U(i);return e.length!==12?(i||"").toLowerCase():e.match(/.{1,2}/g)?.join(":")||(i||"").toLowerCase()},qe=i=>{let e=(i||"").toLowerCase();return Ce.some(t=>e.startsWith(t))},Ue=async i=>{let e=U(i),t=Ke(i),s=0;for(;s<=He;){try{let n=await xe__default.default.toIP(t);if(n)return n}catch{}let o=(await ie__default.default({skipNameResolution:!0})).find(n=>U(n.mac)===e);if(o?.ip)return o.ip;s++;}},Oe=async i=>{let e=await ie__default.default({skipNameResolution:!0}),{email:t,password:s}=i;return e.filter(r=>qe(r.mac)).map(r=>({ip:r.ip,mac:r.mac,loginDevice:async()=>{let o=new k({email:t,password:s}),n=await o.auth(r.ip,{email:t,password:s});if(!n.success.includes(r.ip)){let a=n.failed.find(c=>c.ip===r.ip);throw new Error(a?.error||`Failed to authenticate with device ${r.ip}`)}return o}}))},$e=async i=>{let e=new T(i),t=i.token;!t&&i.email&&i.password&&(t=await e.auth({email:i.email,password:i.password}));let s={method:"getDeviceList"},r=await C__default.default({method:"post",url:`${e._baseUrl}?token=${t}`,data:s});m(r.data);let o=[];for(let n of r.data.result?.deviceList||[]){if(!n.ip){let a=await Ue(n.deviceMac);if(!a)continue;n.ip=a;}switch(n.deviceType){case"IOT.SMARTBULB":case"SMART.TAPOBULB":{if(i.types&&!i.types.includes(lumiaRgbTypes.ILumiaDeviceType.LIGHT))continue;let a=n.deviceType==="SMART.TAPOBULB",c=(a?R(n.alias):n.alias)??n.deviceName;o.push({name:c,id:n.deviceMac,address:`http://${n.ip}`,host:n.ip,lumiaInfo:{alias:c,identifier:n.deviceMac,serial:n.hwId,lumiaType:lumiaRgbTypes.ILumiaDeviceType.LIGHT,zonable:!1,maxZones:1,zones:[],rgb:!0,white:!0,connectionType:lumiaRgbTypes.ILumiaDeviceConnectionType.WIFI,brand:a?lumiaRgbTypes.ILumiaDeviceBrands.TPLINK:lumiaRgbTypes.ILumiaDeviceBrands.TPLINK,product:n?.deviceModel}});break}case"IOT.SMARTPLUGSWITCH":case"SMART.TAPOPLUG":{if(i.types&&!i.types.includes(lumiaRgbTypes.ILumiaDeviceType.PLUG))continue;let a=n.deviceType==="SMART.TAPOPLUG",c=(a?R(n.alias):n.alias)??n.deviceName;o.push({name:c,id:n.deviceMac,address:`http://${n.ip}`,host:n.ip,lumiaInfo:{alias:c,identifier:n.deviceMac,serial:n.hwId,lumiaType:lumiaRgbTypes.ILumiaDeviceType.PLUG,zonable:!1,maxZones:0,zones:[],rgb:!1,white:!1,connectionType:lumiaRgbTypes.ILumiaDeviceConnectionType.WIFI,brand:a?lumiaRgbTypes.ILumiaDeviceBrands.TPLINK:lumiaRgbTypes.ILumiaDeviceBrands.TPLINK,product:n?.deviceModel}});break}}}return o},Me=$e;var ne={};ce(ne,{DeviceResTypes:()=>Ge,DeviceSendValues:()=>Fe,ETapoDeviceTypes:()=>oe,TapoDeviceTypes:()=>Ne});var Ne={ALL:"all",BULBS:"bulb",LIGHTSTRIPS:"lightstrip",PLUGS:"plug"},oe=(r=>(r.ALL="all",r.BULBS="bulb",r.LIGHTSTRIPS="lightstrip",r.PLUGS="plug",r))(oe||{}),Ge={BULB:"IOT.SMARTPLUGSWITCH",PLUG:"IOT.SMARTPLUGSWITCH"},Fe={BULB:"smartlife.iot.smartbulb.lightingservice",LIGHTSTRIP:"smartlife.iot.lightStrip",PLUG:"system"};
|
|
25
|
-
|
|
26
|
-
exports.LightState = w;
|
|
27
|
-
exports.TapoApi = k;
|
|
28
|
-
exports.TapoCloudApi = T;
|
|
29
|
-
exports.TapoConstants = ne;
|
|
30
|
-
exports.discover = Me;
|
|
31
|
-
exports.discoverLocalDevices = Oe;
|
|
1
|
+
'use strict';const a0aH=a0d;(function(a,b){const a0cf={a:0x20e,b:0x231,c:0x148},aG=a0d,c=a();while(!![]){try{const d=parseInt(aG(0x1e0))/0x1*(-parseInt(aG(0x1b8))/0x2)+-parseInt(aG(0x226))/0x3*(-parseInt(aG(a0cf.a))/0x4)+-parseInt(aG(0x220))/0x5*(-parseInt(aG(a0cf.b))/0x6)+-parseInt(aG(0x1de))/0x7*(parseInt(aG(0x196))/0x8)+parseInt(aG(0x272))/0x9+parseInt(aG(0x188))/0xa+-parseInt(aG(a0cf.c))/0xb;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a0c,0xdfb37));function a0c(){const dU=['\x76\x61\x6c\x75\x65\x73','\x48\x61\x6e\x64\x73\x68\x61\x6b\x65\x31\x20\x66\x61\x69\x6c\x65\x64\x20\x64\x75\x65\x20\x74\x6f\x20\x69\x6e\x76\x61\x6c\x69\x64\x20\x63\x6f\x6e\x74\x65\x6e\x74\x20\x6c\x65\x6e\x67\x74\x68','\x73\x68\x61\x32\x35\x36','\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65','\x68\x74\x74\x70\x5f\x70\x6f\x72\x74','\x6b\x65\x79','\x54\x61\x70\x6f\x20\x44\x65\x76\x69\x63\x65','\x68\x61\x73\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79','\x2e\x20\x50\x6c\x65\x61\x73\x65\x20\x61\x75\x74\x68\x65\x6e\x74\x69\x63\x61\x74\x65\x20\x66\x69\x72\x73\x74\x2e','\x49\x4c\x75\x6d\x69\x61\x44\x65\x76\x69\x63\x65\x54\x79\x70\x65','\x5b\x74\x61\x70\x6f\x5d\x20\x64\x69\x73\x63\x6f\x76\x65\x72\x79\x20\x72\x65\x73\x70\x6f\x6e\x73\x65','\x67\x65\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73','\x74\x6f\x49\x50','\x6d\x61\x63','\x4e\x6f\x20\x73\x65\x73\x73\x69\x6f\x6e\x20\x66\x6f\x75\x6e\x64\x20\x66\x6f\x72\x20\x64\x65\x76\x69\x63\x65\x20','\x54\x50\x4c\x49\x4e\x4b','\x68\x75\x65','\x61\x6c\x6c','\x2d\x31\x35\x30\x31','\x73\x65\x74\x5f\x64\x65\x76\x69\x63\x65\x5f\x69\x6e\x66\x6f','\x72\x61\x77\x54\x69\x6d\x65\x6f\x75\x74','\x6c\x69\x67\x68\x74\x73\x74\x72\x69\x70','\x73\x75\x63\x63\x65\x73\x73','\x70\x6f\x77\x65\x72','\x55\x6e\x6b\x6e\x6f\x77\x6e\x20\x4d\x6f\x64\x65\x6c','\x68\x65\x78','\x69\x73\x42\x75\x66\x66\x65\x72','\x68\x77\x5f\x69\x64','\x2f\x61\x70\x70','\x73\x65\x74\x75\x70','\x61\x6c\x6c\x6f\x63','\x63\x68\x69\x6c\x64\x5f\x6e\x75\x6d','\x70\x61\x73\x73\x77\x6f\x72\x64','\x66\x69\x72\x73\x74\x48\x61\x6e\x64\x73\x68\x61\x6b\x65','\x62\x79\x70\x61\x73\x73\x2d\x63\x6f\x6f\x6b\x69\x65','\x61\x70\x70\x6c\x69\x63\x61\x74\x69\x6f\x6e\x2f\x6f\x63\x74\x65\x74\x2d\x73\x74\x72\x65\x61\x6d','\x49\x6e\x76\x61\x6c\x69\x64\x20\x74\x65\x72\x6d\x69\x6e\x61\x6c\x20\x55\x55\x49\x44','\x75\x75\x69\x64\x76\x34','\x5f\x74\x6f\x6b\x65\x6e','\x73\x69\x67\x44\x65\x72\x69\x76\x65','\x46\x61\x69\x6c\x65\x64\x20\x74\x6f\x20\x65\x73\x74\x61\x62\x6c\x69\x73\x68\x20\x73\x65\x73\x73\x69\x6f\x6e\x20\x77\x69\x74\x68\x20\x64\x65\x76\x69\x63\x65\x20\x61\x74\x20','\x64\x65\x76\x69\x63\x65\x4d\x6f\x64\x65\x6c','\x63\x6f\x6c\x6f\x72\x5f\x74\x65\x6d\x70','\x40\x6e\x65\x74\x77\x6f\x72\x6b\x2d\x75\x74\x69\x6c\x73\x2f\x61\x72\x70\x2d\x6c\x6f\x6f\x6b\x75\x70','\x64\x61\x74\x61','\x50\x32\x31\x30\x4d','\x67\x65\x74\x44\x65\x76\x69\x63\x65\x73\x42\x79\x49\x70','\x63\x72\x65\x61\x74\x65\x48\x61\x73\x68','\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68','\x68\x73\x76','\x63\x6f\x6d\x70\x6c\x65\x74\x65\x48\x61\x6e\x64\x73\x68\x61\x6b\x65','\x64\x65\x76\x69\x63\x65\x4b\x65\x79','\x38\x34\x3a\x64\x38\x3a\x31\x62','\x61\x64\x64\x72\x65\x73\x73','\x63\x68\x69\x6c\x64\x5f\x64\x65\x76\x69\x63\x65\x5f\x6c\x69\x73\x74','\x2d\x73\x6c\x6f\x74\x2d','\x5b\x54\x61\x70\x6f\x5d\x20\x65\x72\x72\x6f\x72\x43\x6f\x64\x65\x3a\x20','\x31\x30\x37\x37\x37\x35\x39\x30\x5a\x43\x76\x41\x58\x43','\x0a\x43\x6f\x6f\x6b\x69\x65\x3a','\x73\x61\x74','\x73\x65\x73\x73\x69\x6f\x6e\x50\x6f\x73\x74','\x6b\x65\x79\x44\x65\x72\x69\x76\x65','\x49\x4c\x75\x6d\x69\x61\x44\x65\x76\x69\x63\x65\x42\x72\x61\x6e\x64\x73','\x74\x6f\x70\x20\x73\x65\x63\x72\x65\x74','\x66\x75\x6e\x63\x74\x69\x6f\x6e','\x42\x55\x4c\x42\x53','\x61\x65\x73\x2d\x32\x35\x36\x2d\x63\x62\x63','\x5f\x76\x61\x6c\x75\x65\x73','\x63\x72\x79\x70\x74\x6f','\x65\x78\x70\x69\x72\x65\x41\x74','\x49\x6e\x63\x6f\x72\x72\x65\x63\x74\x20\x65\x6d\x61\x69\x6c\x20\x6f\x72\x20\x70\x61\x73\x73\x77\x6f\x72\x64','\x37\x36\x31\x32\x30\x64\x68\x72\x4c\x68\x4d','\x6e\x6f\x72\x6d\x61\x6c','\x64\x65\x76\x69\x63\x65\x5f\x6f\x6e','\x68\x74\x74\x70','\x68\x61\x73\x68\x41\x75\x74\x68','\x73\x74\x61\x74\x65','\x61\x6c\x6c\x53\x65\x74\x74\x6c\x65\x64','\x74\x6f\x53\x74\x72\x69\x6e\x67','\x6e\x75\x6d\x62\x65\x72','\x3f\x74\x6f\x6b\x65\x6e\x3d','\x73\x65\x74\x2d\x63\x6f\x6f\x6b\x69\x65','\x68\x74\x74\x70\x3a\x2f\x2f','\x74\x6f\x42\x61\x73\x65\x36\x34','\x62\x61\x73\x65\x36\x34','\x73\x6f\x6d\x65','\x69\x73\x5f\x73\x75\x70\x70\x6f\x72\x74\x5f\x68\x74\x74\x70\x73','\x73\x75\x6d','\x74\x6f\x4c\x6f\x77\x65\x72\x43\x61\x73\x65','\x62\x69\x6e\x64','\x3b\x20\x4c\x65\x67\x61\x63\x79\x20\x65\x72\x72\x6f\x72\x3a\x20','\x6d\x73\x67\x20\x6d\x75\x73\x74\x20\x62\x65\x20\x61\x20\x73\x74\x72\x69\x6e\x67\x20\x6f\x72\x20\x62\x75\x66\x66\x65\x72','\x6e\x6f\x77','\x54\x41\x50\x4f','\x67\x65\x74\x44\x65\x76\x69\x63\x65\x4c\x69\x73\x74','\x73\x70\x6c\x69\x74','\x68\x77\x49\x64','\x5b\x74\x61\x70\x6f\x5d\x20\x73\x74\x61\x72\x74\x69\x6e\x67\x20\x55\x44\x50\x20\x64\x69\x73\x63\x6f\x76\x65\x72\x79','\x70\x75\x62\x6c\x69\x63\x4b\x65\x79','\x72\x73\x61','\x63\x6f\x6e\x74\x65\x6e\x74\x2d\x6c\x65\x6e\x67\x74\x68','\x74\x69\x6d\x65\x6f\x75\x74\x4d\x73','\x6c\x65\x6e\x67\x74\x68','\x74\x79\x70\x65','\x20\x61\x66\x74\x65\x72\x20\x61\x75\x74\x68\x65\x6e\x74\x69\x63\x61\x74\x69\x6f\x6e\x2e','\x32\x62\x6b\x43\x4c\x79\x50','\x70\x6f\x70','\x67\x65\x74\x56\x61\x6c\x75\x65\x73','\x6e\x65\x65\x64\x73\x4e\x65\x77\x48\x61\x6e\x64\x73\x68\x61\x6b\x65','\x64\x65\x76\x69\x63\x65\x4c\x69\x73\x74','\x61\x6c\x69\x61\x73','\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72','\x74\x61\x62\x6c\x65','\x5b\x4b\x4c\x41\x50\x5d\x20\x4c\x6f\x63\x61\x6c\x20\x61\x75\x74\x68\x20\x68\x61\x73\x68\x20\x6d\x61\x74\x63\x68\x65\x73\x20\x73\x65\x72\x76\x65\x72\x20\x68\x61\x73\x68','\x73\x65\x73\x73\x69\x6f\x6e\x43\x6f\x6f\x6b\x69\x65','\x72\x65\x61\x64\x49\x6e\x74\x33\x32\x42\x45','\x4e\x46\x4b\x43','\x63\x6f\x6e\x73\x74\x61\x6e\x74\x73','\x6d\x6f\x64\x65\x6c','\x69\x73\x41\x72\x72\x61\x79','\x43\x6c\x6f\x75\x64\x20\x74\x6f\x6b\x65\x6e\x20\x65\x78\x70\x69\x72\x65\x64\x20\x6f\x72\x20\x69\x6e\x76\x61\x6c\x69\x64','\x6d\x6f\x64\x65','\x64\x65\x76\x69\x63\x65\x4e\x61\x6d\x65','\x65\x6d\x61\x69\x6c','\x4c\x69\x67\x68\x74\x53\x74\x61\x74\x65','\x53\x4d\x41\x52\x54\x2e\x54\x41\x50\x4f\x42\x55\x4c\x42','\x63\x6f\x6f\x6b\x69\x65','\x69\x76\x44\x65\x72\x69\x76\x65','\x74\x61\x70\x6f\x20\x63\x6c\x6f\x75\x64\x20\x73\x65\x74\x75\x70\x20\x65\x72\x72\x3a\x20','\x7b\x7d\x2e\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72\x28\x22\x72\x65\x74\x75\x72\x6e\x20\x74\x68\x69\x73\x22\x29\x28\x20\x29','\x66\x6f\x72\x45\x61\x63\x68','\x46\x61\x69\x6c\x65\x64\x20\x74\x6f\x20\x6c\x6f\x67\x69\x6e\x20\x74\x6f\x20\x64\x65\x76\x69\x63\x65\x20\x61\x74\x20','\x6c\x6f\x67\x69\x6e\x5f\x64\x65\x76\x69\x63\x65','\x73\x65\x6e\x64\x53\x74\x61\x74\x65','\x73\x65\x74','\x73\x65\x74\x42\x72\x6f\x61\x64\x63\x61\x73\x74','\x54\x61\x70\x6f\x20\x44\x65\x76\x69\x63\x65\x20\x28','\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x32\x20\x66\x61\x69\x6c\x65\x64\x3a\x20','\x65\x6e\x63\x72\x79\x70\x74','\x70\x75\x73\x68','\x73\x61\x74\x75\x72\x61\x74\x69\x6f\x6e','\x73\x65\x6e\x64\x50\x6f\x77\x65\x72','\x5f\x63\x6f\x6e\x66\x69\x67','\x34\x35\x35\x72\x7a\x54\x42\x4b\x52','\x66\x69\x6e\x61\x6c','\x31\x31\x38\x36\x38\x34\x33\x7a\x78\x45\x51\x71\x79','\x72\x61\x77\x45\x6d\x61\x69\x6c','\x62\x75\x6c\x62','\x5f\x62\x75\x69\x6c\x64\x54\x61\x70\x6f\x46\x72\x6f\x6d\x44\x65\x76\x69\x63\x65\x49\x6e\x66\x6f','\x69\x73\x46\x75\x6e\x63\x74\x69\x6f\x6e','\x6d\x67\x74\x5f\x65\x6e\x63\x72\x79\x70\x74\x5f\x73\x63\x68\x6d','\x63\x63\x3a\x62\x61\x3a\x62\x64','\x65\x78\x63\x65\x70\x74\x69\x6f\x6e','\x49\x6e\x63\x6f\x72\x72\x65\x63\x74\x20\x72\x65\x71\x75\x65\x73\x74','\x41\x4c\x4c','\x2e\x20\x4b\x4c\x41\x50\x20\x65\x72\x72\x6f\x72\x3a\x20','\x50\x33\x31\x36','\x50\x33\x30\x36','\x69\x6e\x63\x6c\x75\x64\x65\x73','\x0a\x53\x65\x72\x76\x65\x72\x20\x48\x61\x73\x68\x3a','\x64\x69\x67\x65\x73\x74','\x63\x68\x69\x6c\x64\x44\x65\x76\x69\x63\x65\x49\x64','\x4c\x49\x47\x48\x54','\x40\x6c\x75\x6d\x69\x61\x73\x74\x72\x65\x61\x6d\x2f\x6c\x75\x6d\x69\x61\x2d\x72\x67\x62\x2d\x74\x79\x70\x65\x73','\x73\x69\x67','\x45\x6d\x61\x69\x6c\x20\x61\x6e\x64\x20\x70\x61\x73\x73\x77\x6f\x72\x64\x20\x61\x72\x65\x20\x72\x65\x71\x75\x69\x72\x65\x64\x20\x66\x6f\x72\x20\x6c\x6f\x67\x69\x6e\x44\x65\x76\x69\x63\x65\x42\x79\x49\x70','\x6d\x61\x70','\x5f\x64\x65\x76\x69\x63\x65\x73','\x39\x39\x39\x39','\x66\x61\x69\x6c\x65\x64','\x63\x72\x65\x61\x74\x65\x43\x69\x70\x68\x65\x72\x69\x76','\x74\x65\x72\x6d\x69\x6e\x61\x6c\x55\x55\x49\x44','\x2e\x20\x50\x6c\x65\x61\x73\x65\x20\x63\x68\x65\x63\x6b\x20\x79\x6f\x75\x72\x20\x63\x72\x65\x64\x65\x6e\x74\x69\x61\x6c\x73\x2e','\x5f\x5f\x65\x73\x4d\x6f\x64\x75\x6c\x65','\x75\x74\x66\x2d\x38','\x69\x6e\x64\x65\x78\x4f\x66','\x70\x65\x6d','\x46\x61\x69\x6c\x65\x64\x20\x74\x6f\x20\x61\x75\x74\x68\x65\x6e\x74\x69\x63\x61\x74\x65\x20\x77\x69\x74\x68\x20\x64\x65\x76\x69\x63\x65\x20\x61\x74\x20','\x49\x4f\x54\x2e\x53\x4d\x41\x52\x54\x48\x55\x42','\x63\x72\x65\x61\x74\x65','\x64\x65\x76\x69\x63\x65\x49\x70','\x64\x65\x6c\x65\x74\x65','\x49\x4f\x54\x2e\x53\x4d\x41\x52\x54\x50\x4c\x55\x47\x53\x57\x49\x54\x43\x48','\x74\x75\x72\x6e\x4f\x66\x66','\x6c\x6f\x67','\x49\x4c\x75\x6d\x69\x61\x44\x65\x76\x69\x63\x65\x43\x6f\x6e\x6e\x65\x63\x74\x69\x6f\x6e\x54\x79\x70\x65','\x64\x65\x76\x69\x63\x65','\x68\x77\x5f\x76\x65\x72','\x54\x50\x5f\x54\x45\x53\x54\x5f\x50\x41\x53\x53\x57\x4f\x52\x44','\x44\x65\x76\x69\x63\x65\x20\x74\x6f\x6b\x65\x6e\x20\x65\x78\x70\x69\x72\x65\x64\x20\x6f\x72\x20\x69\x6e\x76\x61\x6c\x69\x64','\x6b\x65\x79\x73','\x38\x49\x78\x49\x70\x55\x51','\x49\x73\x45\x78\x70\x69\x72\x65\x64','\x63\x6f\x6c\x6f\x72\x54\x65\x6d\x70\x65\x72\x61\x74\x75\x72\x65','\x63\x69\x70\x68\x65\x72','\x54\x61\x70\x6f\x41\x70\x69','\x6d\x65\x73\x73\x61\x67\x65','\x6c\x6f\x67\x69\x6e\x44\x65\x76\x69\x63\x65\x42\x79\x49\x70','\x75\x70\x64\x61\x74\x65','\x74\x6f\x6b\x65\x6e','\x67\x65\x74\x42\x72\x6f\x61\x64\x63\x61\x73\x74\x4e\x65\x74\x77\x6f\x72\x6b\x49\x6e\x74\x65\x72\x66\x61\x63\x65\x73','\x68\x74\x74\x70\x54\x69\x6d\x65\x6f\x75\x74','\x61\x78\x69\x6f\x73','\x64\x75\x72\x61\x74\x69\x6f\x6e','\x72\x61\x6e\x64\x6f\x6d\x42\x79\x74\x65\x73','\x4b\x6c\x61\x70\x20\x70\x72\x6f\x74\x6f\x63\x6f\x6c\x20\x6e\x6f\x74\x20\x73\x75\x70\x70\x6f\x72\x74\x65\x64','\x6f\x66\x66','\x69\x76\x53\x65\x71','\x69\x73\x54\x72\x75\x6c\x79','\x35\x36\x34\x36\x30\x46\x46\x46\x49\x70\x4f','\x63\x61\x74\x63\x68','\x74\x61\x70\x6f\x2d','\x72\x61\x77\x50\x61\x73\x73\x77\x6f\x72\x64','\x6c\x6f\x63\x61\x6c\x2d\x64\x65\x76\x69\x63\x65\x73','\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79','\x35\x36\x36\x38\x31\x31\x54\x57\x52\x61\x46\x4e','\x72\x67\x62\x32\x68\x73\x76','\x74\x65\x73\x74','\x75\x74\x69\x6c','\x6d\x61\x74\x63\x68','\x46\x61\x69\x6c\x65\x64\x20\x74\x6f\x20\x76\x65\x72\x69\x66\x79\x20\x73\x65\x72\x76\x65\x72\x20\x68\x61\x73\x68','\x66\x77\x5f\x76\x65\x72','\x54\x61\x70\x6f\x43\x6f\x6e\x73\x74\x61\x6e\x74\x73','\x70\x72\x6f\x74\x6f\x74\x79\x70\x65','\x2f\x72\x65\x71\x75\x65\x73\x74','\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x5f\x6c\x69\x73\x74','\x32\x34\x36\x71\x54\x6a\x69\x76\x71','\x55\x6e\x65\x78\x70\x65\x63\x74\x65\x64\x20\x45\x72\x72\x6f\x72\x20\x43\x6f\x64\x65\x3a\x20','\x45\x6d\x61\x69\x6c\x20\x61\x6e\x64\x20\x70\x61\x73\x73\x77\x6f\x72\x64\x20\x61\x72\x65\x20\x72\x65\x71\x75\x69\x72\x65\x64\x20\x66\x6f\x72\x20\x61\x75\x74\x68\x65\x6e\x74\x69\x63\x61\x74\x69\x6f\x6e','\x61\x75\x74\x68','\x5f\x62\x61\x73\x65\x55\x72\x6c','\x40\x6c\x75\x6d\x69\x61\x73\x74\x72\x65\x61\x6d\x2f\x6e\x65\x74\x77\x6f\x72\x6b\x2d\x63\x6f\x76\x65','\x5f\x66\x65\x74\x63\x68\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73','\x73\x79\x73\x74\x65\x6d','\x64\x67\x72\x61\x6d','\x66\x69\x6e\x64','\x70\x72\x6f\x6d\x69\x73\x69\x66\x79','\x64\x65\x62\x75\x67','\x49\x4f\x54\x2e\x53\x4d\x41\x52\x54\x42\x55\x4c\x42','\x73\x65\x63\x6f\x6e\x64\x48\x61\x6e\x64\x73\x68\x61\x6b\x65','\x63\x6c\x6f\x73\x65','\x73\x6c\x69\x63\x65','\x2e\x20\x50\x6c\x65\x61\x73\x65\x20\x63\x61\x6c\x6c\x20\x61\x75\x74\x68\x20\x6f\x72\x20\x73\x65\x74\x75\x70\x20\x66\x69\x72\x73\x74\x2e','\x67\x65\x74','\x61\x78\x69\x6f\x73\x49\x6e\x73\x74\x61\x6e\x63\x65','\x73\x68\x61\x31','\x73\x65\x6e\x64','\x73\x70\x6b\x69','\x70\x6b\x63\x73\x31','\x73\x75\x62\x73\x74\x72\x69\x6e\x67','\x50\x4c\x55\x47','\x63\x6f\x6e\x74\x72\x6f\x6c\x5f\x63\x68\x69\x6c\x64','\x70\x72\x69\x76\x61\x74\x65\x44\x65\x63\x72\x79\x70\x74','\x64\x69\x73\x63\x6f\x76\x65\x72\x4c\x6f\x63\x61\x6c\x55\x64\x70','\x5b\x74\x61\x70\x6f\x5d\x20\x64\x69\x73\x63\x6f\x76\x65\x72\x79\x20\x66\x69\x6e\x69\x73\x68\x65\x64','\x66\x72\x6f\x6d','\x67\x65\x74\x44\x65\x76\x69\x63\x65\x49\x6e\x66\x6f\x42\x79\x49\x70','\x67\x65\x74\x5f\x64\x65\x76\x69\x63\x65\x5f\x69\x6e\x66\x6f','\x75\x74\x66\x38','\x61\x65\x73\x2d\x31\x32\x38\x2d\x63\x62\x63','\x63\x6f\x6c\x6f\x72','\x63\x6c\x65\x61\x72\x44\x65\x76\x69\x63\x65\x53\x65\x73\x73\x69\x6f\x6e','\x73\x74\x72\x69\x6e\x67','\x65\x6e\x63\x6f\x64\x65\x55\x73\x65\x72\x6e\x61\x6d\x65','\x2a\x2f\x2a','\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72\x69\x76','\x6a\x6f\x69\x6e','\x6c\x64\x6b','\x62\x72\x69','\x73\x65\x71','\x6e\x69\x63\x6b\x6e\x61\x6d\x65','\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x43\x6f\x6d\x70\x6c\x65\x74\x65\x64','\x65\x34\x3a\x66\x61\x3a\x63\x34','\x74\x69\x6d\x65\x6f\x75\x74','\x74\x65\x78\x74','\x2f\x61\x70\x70\x3f\x74\x6f\x6b\x65\x6e\x3d','\x62\x72\x69\x67\x68\x74\x6e\x65\x73\x73','\x68\x61\x73\x44\x65\x76\x69\x63\x65\x53\x65\x73\x73\x69\x6f\x6e','\x77\x72\x69\x74\x65\x49\x6e\x74\x33\x32\x42\x45','\x43\x6f\x6f\x6b\x69\x65','\x70\x6f\x73\x74','\x73\x74\x72\x69\x6e\x67\x69\x66\x79','\x68\x61\x6e\x64\x73\x68\x61\x6b\x65','\x4c\x65\x6e\x67\x74\x68\x20\x6f\x66\x20\x69\x76\x20\x69\x73\x20\x6e\x6f\x74\x20\x31\x36','\x70\x61\x72\x73\x65','\x44\x65\x76\x69\x63\x65\x20\x49\x50\x20\x6f\x72\x20\x49\x44\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64','\x68\x61\x73','\x69\x6e\x66\x6f','\x52\x53\x41\x5f\x50\x4b\x43\x53\x31\x5f\x50\x41\x44\x44\x49\x4e\x47','\x73\x6d\x61\x72\x74\x6c\x69\x66\x65\x2e\x69\x6f\x74\x2e\x73\x6d\x61\x72\x74\x62\x75\x6c\x62\x2e\x6c\x69\x67\x68\x74\x69\x6e\x67\x73\x65\x72\x76\x69\x63\x65','\x61\x70\x70\x6c\x79','\x38\x31\x39\x33\x36\x36\x33\x77\x44\x52\x77\x64\x52','\x50\x4c\x55\x47\x53','\x74\x65\x6d\x70','\x68\x65\x61\x64\x65\x72\x73','\x72\x65\x73\x70\x6f\x6e\x73\x65','\x5f\x64\x65\x76\x69\x63\x65\x53\x65\x73\x73\x69\x6f\x6e\x73','\x5f\x66\x65\x74\x63\x68\x43\x68\x69\x6c\x64\x44\x65\x76\x69\x63\x65\x4c\x69\x73\x74','\x35\x30\x3a\x63\x37\x3a\x62\x66','\x54\x50\x5f\x54\x45\x53\x54\x5f\x55\x53\x45\x52','\x64\x65\x76\x69\x63\x65\x54\x79\x70\x65','\x53\x4d\x41\x52\x54\x2e\x54\x41\x50\x4f\x50\x4c\x55\x47','\x72\x65\x73\x75\x6c\x74','\x74\x75\x72\x6e\x4f\x6e','\x20\x4f\x75\x74\x6c\x65\x74\x20','\x61\x72\x72\x61\x79\x62\x75\x66\x66\x65\x72','\x54\x61\x70\x6f\x43\x6c\x6f\x75\x64\x41\x70\x69','\x5b\x4b\x4c\x41\x50\x5d\x20\x5b\x57\x41\x52\x4e\x5d\x20\x45\x6d\x70\x74\x79\x20\x61\x75\x74\x68\x20\x68\x61\x73\x68\x20\x6d\x61\x74\x63\x68\x65\x73\x20\x73\x65\x72\x76\x65\x72\x20\x68\x61\x73\x68','\x5b\x4b\x4c\x41\x50\x5d\x20\x53\x65\x63\x6f\x6e\x64\x20\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6c','\x65\x6c\x65\x63\x74\x72\x6f\x6e','\x73\x74\x61\x74\x75\x73','\x74\x79\x70\x65\x73','\x64\x65\x66\x61\x75\x6c\x74','\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e','\x64\x65\x76\x69\x63\x65\x4d\x61\x63','\x64\x65\x76\x69\x63\x65\x5f\x69\x64','\x5b\x4b\x4c\x41\x50\x5d\x20\x5b\x57\x41\x52\x4e\x5d\x20\x54\x65\x73\x74\x20\x61\x75\x74\x68\x20\x68\x61\x73\x68\x20\x6d\x61\x74\x63\x68\x65\x73\x20\x73\x65\x72\x76\x65\x72\x20\x68\x61\x73\x68','\x67\x65\x74\x5f\x63\x68\x69\x6c\x64\x5f\x64\x65\x76\x69\x63\x65\x5f\x6c\x69\x73\x74','\x65\x72\x72\x6f\x72','\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x31\x20\x66\x61\x69\x6c\x65\x64\x3a\x20','\x37\x38\x3a\x38\x63\x3a\x62\x35','\x63\x6f\x6e\x73\x6f\x6c\x65','\x57\x49\x46\x49','\x63\x6f\x6e\x63\x61\x74','\x72\x67\x62','\x70\x6c\x75\x67','\x72\x61\x6e\x64\x6f\x6d\x55\x55\x49\x44','\x4a\x53\x4f\x4e\x20\x66\x6f\x72\x6d\x61\x74\x20\x65\x72\x72\x6f\x72','\x30\x32\x30\x30\x30\x30\x30\x31\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x34\x36\x33\x63\x62\x35\x64\x33','\x31\x31\x38\x31\x35\x36\x35\x62\x4b\x4f\x4e\x61\x57','\x63\x72\x65\x61\x74\x65\x53\x6f\x63\x6b\x65\x74','\x72\x65\x70\x6c\x61\x63\x65','\x68\x6f\x73\x74','\x63\x6f\x6d\x70\x61\x72\x65','\x73\x75\x62\x61\x72\x72\x61\x79','\x5f\x67\x65\x74\x4f\x72\x43\x72\x65\x61\x74\x65\x53\x65\x73\x73\x69\x6f\x6e'];a0c=function(){return dU;};return a0c();}var a0e=require(a0aH(0x1f2)),a0f=require(a0aH(0x219)),a0g=require(a0aH(0x17a)),a0h=require(a0aH(0x224)),a0i=require(a0aH(0x193)),a0j=require(a0aH(0x229)),a0k=require('\x40\x6c\x75\x6d\x69\x61\x73\x74\x72\x65\x61\x6d\x2f\x6c\x75\x6d\x69\x61\x2d\x72\x67\x62\x2d\x75\x74\x69\x6c\x73'),a0l=require(a0aH(0x199)),a0m=require('\x64\x67\x72\x61\x6d'),a0n=require(a0aH(0x236));function a0o(c){const a0ck={a:0x26e,b:0x1b5,c:0x1be,d:0x19d,e:0x1a8},aK=a0aH,d=(function(){let g=!![];return function(h,i){const k=g?function(){const aI=a0d;if(i){const l=i[aI(0x271)](h,arguments);return i=null,l;}}:function(){};return g=![],k;};}()),f=d(this,function(){const aJ=a0d;let g;try{const k=Function('\x72\x65\x74\x75\x72\x6e\x20\x28\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20'+aJ(0x1d0)+'\x29\x3b');g=k();}catch(l){g=window;}const h=g[aJ(0x140)]=g[aJ(0x140)]||{},i=[aJ(0x207),'\x77\x61\x72\x6e',aJ(a0ck.a),aJ(0x13d),aJ(0x1e7),aJ(0x1bf),'\x74\x72\x61\x63\x65'];for(let n=0x0;n<i[aJ(a0ck.b)];n++){const o=d[aJ(a0ck.c)][aJ(0x22e)]['\x62\x69\x6e\x64'](d),p=i[n],q=h[p]||o;o['\x5f\x5f\x70\x72\x6f\x74\x6f\x5f\x5f']=d[aJ(0x1a8)](d),o[aJ(0x19d)]=q[aJ(a0ck.d)][aJ(a0ck.e)](q),h[p]=o;}});return f(),c&&c[aK(0x1fc)]?c:{'\x64\x65\x66\x61\x75\x6c\x74':c};}var a0p=a0o(a0f),a0q=a0o(a0g),a0r=a0o(a0h),a0s=a0o(a0i),a0t=a0o(a0j),a0u=a0o(a0l),a0v=a0o(a0m),a0w=Object[a0aH(0x225)],a0x=(a,b)=>{for(var c in b)a0w(a,c,{'\x67\x65\x74':b[c],'\x65\x6e\x75\x6d\x65\x72\x61\x62\x6c\x65':!0x0});},a0y=a=>Buffer[a0aH(0x24e)](a,a0aH(0x1a3))[a0aH(0x19d)](),a0z=a=>{const a0cn={a:0x23c,b:0x173,c:0x1e8,d:0x146,e:0x195,f:0x20c,g:0x232},aL=a0aH;let b=a['\x65\x72\x72\x6f\x72\x5f\x63\x6f\x64\x65'];if(b)switch(console[aL(a0cn.a)](aL(0x187),b),b){case 0x0:return;case-0x3f2:throw new Error('\x49\x6e\x76\x61\x6c\x69\x64\x20\x70\x75\x62\x6c\x69\x63\x20\x6b\x65\x79\x20\x6c\x65\x6e\x67\x74\x68');case-0x3f4:throw new Error(aL(a0cn.b));case-0x5dd:throw new Error('\x49\x6e\x76\x61\x6c\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74\x20\x6f\x72\x20\x63\x72\x65\x64\x65\x6e\x74\x69\x61\x6c\x73');case-0x3ea:throw new Error(aL(a0cn.c));case-0x3eb:throw new Error(aL(a0cn.d));case-0x5079:throw new Error(aL(a0cn.e));case-0x50c3:throw new Error(aL(0x1c7));case 0x270f:throw new Error(aL(a0cn.f));default:throw new Error(aL(a0cn.g)+b+'\x20\x28'+a['\x6d\x73\x67']+'\x29');}},a0A=class{constructor(){const a0co={a:0x1ba},aM=a0aH;this[aM(0x192)]={},this[aM(0x288)]=a=>(this[aM(0x192)]['\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x5f\x70\x65\x72\x69\x6f\x64']=a,this),this[aM(0x21a)]=this['\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e'],this[aM(a0co.a)]=()=>this[aM(0x192)];}},a0B=class extends a0A{constructor(a){const a0cs={a:0x27e,b:0x206,c:0x15f,d:0x25b,e:0x18a,f:0x274},a0cr={a:0x1c6,b:0x227},a0cq={a:0x18a,b:0x25b},a0cp={a:0x1e4},aN=a0aH;super(),this[aN(0x202)]=b=>(b&&Object[aN(0x20d)](b)[aN(0x1d1)](c=>{const aO=aN;let d;this[aO(0x156)](c)&&(d=this[c],a0k[aO(a0cp.a)](d)&&a0k[aO(0x21f)](b[c])&&d[aO(0x271)](this,[b[c]]));}),this),this['\x6f\x6e']=(b=!0x0)=>(this[aN(0x192)][aN(0x198)]=b,this),this[aN(a0cs.a)]=this['\x6f\x6e'],this[aN(0x21d)]=()=>(this['\x6f\x6e'](!0x1),this),this[aN(a0cs.b)]=this[aN(0x21d)],this['\x6d\x6f\x64\x65']=(b=aN(0x197))=>(b===aN(0x197)&&(this['\x5f\x76\x61\x6c\x75\x65\x73'][aN(0x179)]=0x0),this[aN(0x192)][aN(0x1c8)]=b,this),this[aN(a0cs.c)]=b=>(this[aN(0x192)][aN(0x15f)]=b,this[aN(0x192)][aN(0x179)]=0x0,this),this[aN(0x25b)]=b=>(this[aN(0x192)][aN(0x263)]=b,this),this[aN(0x263)]=this[aN(a0cs.d)],this[aN(0x18a)]=b=>(this[aN(0x192)][aN(0x1db)]=b,this),this[aN(0x1db)]=this[aN(a0cs.e)],this[aN(a0cs.f)]=b=>(this[aN(0x192)][aN(0x179)]=b,this),this[aN(0x210)]=this[aN(0x274)],this[aN(0x180)]=b=>{const aP=aN;let c=[];return Array['\x69\x73\x41\x72\x72\x61\x79'](b)?c=b:c=[b['\x68'],b['\x73'],b['\x76']],this[aP(0x15f)](c[0x0]),this[aP(a0cq.a)](c[0x1]),this[aP(a0cq.b)](c[0x2]),this;},this[aN(0x143)]=b=>{const aQ=aN;let c;return Array[aQ(a0cr.a)](b)?c=a0k[aQ(a0cr.b)](b):c=a0k[aQ(0x227)]([b['\x72'],b['\x67'],b['\x62']]),this['\x68\x73\x76'](c);},this[aN(0x253)]=b=>(Array[aN(0x1c6)](b)&&(b={'\x72':b[0x0],'\x67':b[0x1],'\x62':b[0x2]}),b['\x63\x74']?this[aN(0x274)](b['\x63\x74']):this[aN(0x143)]({'\x72':b['\x72'],'\x67':b['\x67'],'\x62':b['\x62']})),a&&this['\x63\x72\x65\x61\x74\x65'](a);}},a0C=a0aH(0x252),a0D=0xfa0,a0E=async(k,q,v)=>{const a0cv={a:0x221,b:0x1a0,c:0x240,d:0x287},a0cu={a:0x1d8},a0ct={a:0x21c},aR=a0aH;let G=a0i[aR(0x21b)](0x10),I=await a0p['\x64\x65\x66\x61\x75\x6c\x74']['\x70\x6f\x73\x74'](aR(0x1a1)+v+'\x2f\x61\x70\x70\x2f\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x31',G,{'\x72\x65\x73\x70\x6f\x6e\x73\x65\x54\x79\x70\x65':aR(0x280),'\x77\x69\x74\x68\x43\x72\x65\x64\x65\x6e\x74\x69\x61\x6c\x73':!0x0,'\x74\x69\x6d\x65\x6f\x75\x74':a0D})[aR(a0cv.a)](a9=>{const aS=aR;throw a9?.['\x72\x65\x73\x70\x6f\x6e\x73\x65']?.[aS(0x285)]===0x194?new Error(aS(a0ct.a)):new Error(aS(0x13e)+a9);}),L=Buffer['\x66\x72\x6f\x6d'](I['\x64\x61\x74\x61']),R=I['\x68\x65\x61\x64\x65\x72\x73'][aR(a0cv.b)]?.[0x0],U=R?.[aR(0x248)](0x0,R['\x69\x6e\x64\x65\x78\x4f\x66']('\x3b'))||'',V=L[aR(a0cv.c)](0x0,0x10),a0=L['\x73\x6c\x69\x63\x65'](0x10),a1=a0K(k,q),a2=a0I(G,V,a1);if(!a0T(a2,a0))throw new Error('\x65\x6d\x61\x69\x6c\x20\x6f\x72\x20\x70\x61\x73\x73\x77\x6f\x72\x64\x20\x69\x6e\x63\x6f\x72\x72\x65\x63\x74');let a3=a0J(G,V,a1),a4={'\x43\x6f\x6f\x6b\x69\x65':U};await a0p[aR(a0cv.d)][aR(0x267)](aR(0x1a1)+v+'\x2f\x61\x70\x70\x2f\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x32',a3,{'\x72\x65\x73\x70\x6f\x6e\x73\x65\x54\x79\x70\x65':aR(0x280),'\x68\x65\x61\x64\x65\x72\x73':a4,'\x74\x69\x6d\x65\x6f\x75\x74':a0D})['\x63\x61\x74\x63\x68'](a9=>{const aT=aR;throw new Error(aT(a0cu.a)+a9);});let a5=a0L(G,V,a1),a6=a0M(G,V,a1),a7=a0N(G,V,a1),a8=a0O(a6);return{'\x6b\x65\x79':a5,'\x69\x76':a6,'\x73\x69\x67':a7,'\x73\x65\x71':a8,'\x73\x65\x73\x73\x69\x6f\x6e\x43\x6f\x6f\x6b\x69\x65':U};},a0F=async(b,c,d)=>{const a0cz={a:0x1c1},a0cx={a:0x25c,b:0x154,c:0x25c,d:0x142,e:0x287,f:0x280,g:0x1c1,h:0x25c,i:0x1c2,k:0x25c},a0cw={a:0x213,b:0x1ed},aW=a0aH;let f=await a0E(b,c,d),g=k=>{const aU=a0d;let l=k?.[aU(0x276)]?.[aU(0x285)];if(l===0x191||l===0x193)return!0x0;let p=typeof k?.[aU(0x213)]==aU(0x255)?k[aU(a0cw.a)]:'';return!!(p[aU(0x1ed)](aU(0x1f7))||p[aU(a0cw.b)]('\x44\x65\x76\x69\x63\x65\x20\x74\x6f\x6b\x65\x6e\x20\x65\x78\x70\x69\x72\x65\x64')||p[aU(a0cw.b)](aU(0x161))||p[aU(0x1ed)]('\x49\x6e\x76\x61\x6c\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74\x20\x6f\x72\x20\x63\x72\x65\x64\x65\x6e\x74\x69\x61\x6c\x73'));},h=async k=>{const aV=a0d;f[aV(a0cx.a)]=a0Q(f['\x73\x65\x71']);let q=a0G(f[aV(a0cx.b)],f['\x69\x76'],f[aV(0x25c)],k),v=a0R(Buffer['\x63\x6f\x6e\x63\x61\x74']([f[aV(0x1f3)],f[aV(a0cx.c)],q])),w=Buffer[aV(a0cx.d)]([v,q]),G=await a0p[aV(a0cx.e)]({'\x6d\x65\x74\x68\x6f\x64':aV(0x267),'\x75\x72\x6c':'\x68\x74\x74\x70\x3a\x2f\x2f'+d+'\x2f\x61\x70\x70\x2f\x72\x65\x71\x75\x65\x73\x74','\x64\x61\x74\x61':w,'\x72\x65\x73\x70\x6f\x6e\x73\x65\x54\x79\x70\x65':aV(a0cx.f),'\x68\x65\x61\x64\x65\x72\x73':{'\x43\x6f\x6f\x6b\x69\x65':f[aV(a0cx.g)]},'\x74\x69\x6d\x65\x6f\x75\x74':a0D,'\x70\x61\x72\x61\x6d\x73':{'\x73\x65\x71':f[aV(a0cx.h)][aV(a0cx.i)]()}}),I=a0H(f['\x6b\x65\x79'],f['\x69\x76'],f[aV(a0cx.k)],Buffer['\x66\x72\x6f\x6d'](G['\x64\x61\x74\x61']));return a0z(I),I[aV(0x27d)];},i={'\x73\x65\x6e\x64':async k=>{try{return await h(k);}catch(l){if(!g(l))throw l;return f=await a0E(b,c,d),h(k);}}};return Object[aW(0x225)](i,aW(a0cz.a),{'\x67\x65\x74':()=>f['\x73\x65\x73\x73\x69\x6f\x6e\x43\x6f\x6f\x6b\x69\x65']}),Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'](i,aW(0x211),{'\x67\x65\x74':()=>({'\x6b\x65\x79':f[aW(0x154)],'\x69\x76':f['\x69\x76'],'\x73\x65\x71':f[aW(0x25c)]})}),i;},a0G=(a,b,c,d)=>{const a0cA={a:0x1f9,b:0x142},aX=a0aH;let f=JSON['\x73\x74\x72\x69\x6e\x67\x69\x66\x79'](d),g=a0i[aX(a0cA.a)](a0C,a,a0P(b,c)),h=g['\x75\x70\x64\x61\x74\x65'](a0U(f));return Buffer[aX(a0cA.b)]([h,g[aX(0x1df)]()]);},a0H=(a,b,c,d)=>{const a0cB={a:0x240},aY=a0aH;let f=a0i[aY(0x258)](a0C,a,a0P(b,c)),g=f[aY(0x215)](d[aY(a0cB.a)](0x20));return JSON['\x70\x61\x72\x73\x65'](Buffer['\x63\x6f\x6e\x63\x61\x74']([g,f[aY(0x1df)]()])[aY(0x19d)]());},a0I=(a,b,c)=>a0R(Buffer[a0aH(0x142)]([a,b,c])),a0J=(a,b,c)=>a0R(Buffer[a0aH(0x142)]([b,a,c])),a0K=(a,b)=>a0R(Buffer['\x63\x6f\x6e\x63\x61\x74']([a0S(a),a0S(b)])),a0L=(a,b,c)=>a0R(Buffer[a0aH(0x142)]([a0U('\x6c\x73\x6b'),a,b,c]))[a0aH(0x240)](0x0,0x10),a0M=(a,b,c)=>a0R(Buffer[a0aH(0x142)]([a0U('\x69\x76'),a,b,c])),a0N=(a,b,c)=>a0R(Buffer[a0aH(0x142)]([a0U(a0aH(0x25a)),a,b,c]))[a0aH(0x240)](0x0,0x1c),a0O=a=>a[a0aH(0x240)](a['\x6c\x65\x6e\x67\x74\x68']-0x4),a0P=(a,b)=>Buffer[a0aH(0x142)]([a[a0aH(0x240)](0x0,0xc),b]),a0Q=a=>{const a0cC={a:0x16d},aZ=a0aH;let b=Buffer[aZ(a0cC.a)](0x4);return b[aZ(0x265)](a[aZ(0x1c2)]()+0x1),b;},a0R=a=>a0i[a0aH(0x17e)](a0aH(0x151))[a0aH(0x215)](a)[a0aH(0x1ef)](),a0S=a=>a0i[a0aH(0x17e)](a0aH(0x244))[a0aH(0x215)](a)[a0aH(0x1ef)](),a0T=(a,b)=>a[a0aH(0x14c)](b)===0x0,a0U=a=>Buffer[a0aH(0x24e)](a,a0aH(0x1fd)),a0V=a0aH(0x1b2),a0W='\x61\x65\x73\x2d\x31\x32\x38\x2d\x63\x62\x63',a0X=a0aH(0x18e),a0Y=class{constructor(a,b){const b0=a0aH;this[b0(0x154)]=a,this['\x69\x76']=b;}static[a0aH(0x1a2)](a){const a0cE={a:0x24e,b:0x152,c:0x19d},b1=a0aH;return Buffer[b1(a0cE.a)](a[b1(a0cE.b)](b1(0x1c3)),'\x75\x74\x66\x2d\x38')[b1(a0cE.c)](b1(0x1a3));}static[a0aH(0x256)](a){const a0cF={a:0x17e},b2=a0aH;let b=a0s['\x64\x65\x66\x61\x75\x6c\x74'][b2(a0cF.a)]('\x73\x68\x61\x31');return b[b2(0x215)](a[b2(0x152)](b2(0x1c3))),b[b2(0x1ef)]('\x68\x65\x78');}static['\x63\x72\x65\x61\x74\x65\x4b\x65\x79\x50\x61\x69\x72'](){const a0cG={a:0x1ff,b:0x246,c:0x19d,d:0x1a3,e:0x1ff,f:0x1a3};return new Promise((a,b)=>{const b3=a0d;a0s[b3(0x287)]['\x67\x65\x6e\x65\x72\x61\x74\x65\x4b\x65\x79\x50\x61\x69\x72'](b3(0x1b2),{'\x6d\x6f\x64\x75\x6c\x75\x73\x4c\x65\x6e\x67\x74\x68':0x400},(c,d,f)=>{const b4=b3;if(c)return b(c);let g=d['\x65\x78\x70\x6f\x72\x74']({'\x66\x6f\x72\x6d\x61\x74':b4(a0cG.a),'\x74\x79\x70\x65':b4(a0cG.b)})[b4(a0cG.c)](b4(a0cG.d)),h=f['\x65\x78\x70\x6f\x72\x74']({'\x66\x6f\x72\x6d\x61\x74':b4(a0cG.e),'\x74\x79\x70\x65':'\x70\x6b\x63\x73\x31'})[b4(0x19d)](b4(a0cG.f));a({'\x70\x75\x62\x6c\x69\x63':g,'\x70\x72\x69\x76\x61\x74\x65':h});});});}[a0aH(0x1d9)](a){const a0cJ={a:0x287,b:0x1a3},b5=a0aH;let b=a0s[b5(a0cJ.a)]['\x63\x72\x65\x61\x74\x65\x43\x69\x70\x68\x65\x72\x69\x76'](b5(0x252),this[b5(0x154)],this['\x69\x76']);return''+b['\x75\x70\x64\x61\x74\x65'](a,b5(0x251),b5(a0cJ.b))+b['\x66\x69\x6e\x61\x6c'](b5(0x1a3));}['\x64\x65\x63\x72\x79\x70\x74'](a){const a0cK={a:0x154,b:0x215,c:0x1a3,d:0x251},b6=a0aH;let b=a0s[b6(0x287)][b6(0x258)](b6(0x252),this[b6(a0cK.a)],this['\x69\x76']);return''+b[b6(a0cK.b)](a,b6(a0cK.c),b6(a0cK.d))+b['\x66\x69\x6e\x61\x6c']('\x75\x74\x66\x38');}},a0Z=async()=>{const a0cL={a:0x247,b:0x191,c:0x287,d:0x287},b7=a0aH;let a={'\x6d\x6f\x64\x75\x6c\x75\x73\x4c\x65\x6e\x67\x74\x68':0x400,'\x70\x75\x62\x6c\x69\x63\x4b\x65\x79\x45\x6e\x63\x6f\x64\x69\x6e\x67':{'\x74\x79\x70\x65':b7(0x246),'\x66\x6f\x72\x6d\x61\x74':b7(0x1ff)},'\x70\x72\x69\x76\x61\x74\x65\x4b\x65\x79\x45\x6e\x63\x6f\x64\x69\x6e\x67':{'\x74\x79\x70\x65':b7(a0cL.a),'\x66\x6f\x72\x6d\x61\x74':'\x70\x65\x6d','\x63\x69\x70\x68\x65\x72':b7(a0cL.b),'\x70\x61\x73\x73\x70\x68\x72\x61\x73\x65':a0X}};return a0t[b7(a0cL.c)][b7(0x23b)](a0s[b7(a0cL.d)]['\x67\x65\x6e\x65\x72\x61\x74\x65\x4b\x65\x79\x50\x61\x69\x72'])(a0V,a);},a0a0=(a,b)=>{const a0cM={a:0x1f9,b:0x268,c:0x1df,d:0x19d},b8=a0aH;var c=a0s[b8(0x287)][b8(a0cM.a)](a0W,b['\x6b\x65\x79'],b['\x69\x76']),d=c['\x75\x70\x64\x61\x74\x65'](Buffer['\x66\x72\x6f\x6d'](JSON[b8(a0cM.b)](a)));return Buffer[b8(0x142)]([d,c[b8(a0cM.c)]()])[b8(a0cM.d)](b8(0x1a3));},a0a1=(a,b)=>{const a0cN={a:0x26b,b:0x19d},b9=a0aH;var c=a0s['\x64\x65\x66\x61\x75\x6c\x74'][b9(0x258)](a0W,b[b9(0x154)],b['\x69\x76']),d=c['\x75\x70\x64\x61\x74\x65'](Buffer['\x66\x72\x6f\x6d'](a,'\x62\x61\x73\x65\x36\x34'));return JSON[b9(a0cN.a)](Buffer[b9(0x142)]([d,c['\x66\x69\x6e\x61\x6c']()])[b9(a0cN.b)]());},a0a2=(a,b)=>{const a0cO={a:0x287,b:0x26f},ba=a0aH;let c=Buffer[ba(0x24e)](a,'\x62\x61\x73\x65\x36\x34');return a0s[ba(a0cO.a)][ba(0x24b)]({'\x6b\x65\x79':b,'\x70\x61\x64\x64\x69\x6e\x67':a0s['\x64\x65\x66\x61\x75\x6c\x74'][ba(0x1c4)][ba(a0cO.b)],'\x70\x61\x73\x73\x70\x68\x72\x61\x73\x65':a0X},c);},a0a3=a=>Buffer[a0aH(0x24e)](a)[a0aH(0x19d)]('\x62\x61\x73\x65\x36\x34'),a0a4=a=>{const a0cP={a:0x287,b:0x17e,c:0x168},bb=a0aH;var b=a0s[bb(a0cP.a)][bb(a0cP.b)](bb(0x244));return b['\x75\x70\x64\x61\x74\x65'](a),b[bb(0x1ef)](bb(a0cP.c));},a0a5=async(a,b,c)=>{const bc=a0aH;let d=await a0a6(c),f={'\x6d\x65\x74\x68\x6f\x64':bc(0x1d3),'\x70\x61\x72\x61\x6d\x73':{'\x75\x73\x65\x72\x6e\x61\x6d\x65':a0a3(a0a4(a)),'\x70\x61\x73\x73\x77\x6f\x72\x64':a0a3(b)},'\x72\x65\x71\x75\x65\x73\x74\x54\x69\x6d\x65\x4d\x69\x6c\x73':0x0},g=await a0a7(f,d);return d['\x74\x6f\x6b\x65\x6e']=g[bc(0x216)],{'\x73\x65\x6e\x64':h=>a0a7(h,d),'\x64\x65\x76\x69\x63\x65\x4b\x65\x79':d};},a0a6=async a=>{const a0cR={a:0x1a1,b:0x17b,c:0x1a0,d:0x248,e:0x1fe,f:0x27d,g:0x154,h:0x14d},bd=a0aH;let b=await a0Z(),c={'\x6d\x65\x74\x68\x6f\x64':bd(0x269),'\x70\x61\x72\x61\x6d\x73':{'\x6b\x65\x79':b[bd(0x1b1)]}},d=await a0p[bd(0x287)]({'\x6d\x65\x74\x68\x6f\x64':'\x70\x6f\x73\x74','\x75\x72\x6c':bd(a0cR.a)+a+bd(0x16b),'\x64\x61\x74\x61':c,'\x74\x69\x6d\x65\x6f\x75\x74':0xfa0});a0z(d[bd(a0cR.b)]);let f=d[bd(0x275)][bd(a0cR.c)]?.[0x0],g=f?.[bd(a0cR.d)](0x0,f[bd(a0cR.e)]('\x3b'))||'',h=a0a2(d[bd(0x17b)][bd(a0cR.f)][bd(a0cR.g)],b['\x70\x72\x69\x76\x61\x74\x65\x4b\x65\x79']);return{'\x6b\x65\x79':h[bd(a0cR.h)](0x0,0x10),'\x69\x76':h['\x73\x75\x62\x61\x72\x72\x61\x79'](0x10,0x20),'\x64\x65\x76\x69\x63\x65\x49\x70':a,'\x73\x65\x73\x73\x69\x6f\x6e\x43\x6f\x6f\x6b\x69\x65':g};},a0a7=async(a,b)=>{const a0cS={a:0x267,b:0x203,c:0x262,d:0x17b},be=a0aH;let c={'\x6d\x65\x74\x68\x6f\x64':'\x73\x65\x63\x75\x72\x65\x50\x61\x73\x73\x74\x68\x72\x6f\x75\x67\x68','\x70\x61\x72\x61\x6d\x73':{'\x72\x65\x71\x75\x65\x73\x74':a0a0(a,b)}},d=await a0p['\x64\x65\x66\x61\x75\x6c\x74']({'\x6d\x65\x74\x68\x6f\x64':be(a0cS.a),'\x75\x72\x6c':be(0x1a1)+b[be(a0cS.b)]+be(a0cS.c)+b[be(0x216)],'\x64\x61\x74\x61':c,'\x68\x65\x61\x64\x65\x72\x73':{'\x43\x6f\x6f\x6b\x69\x65':b['\x73\x65\x73\x73\x69\x6f\x6e\x43\x6f\x6f\x6b\x69\x65']},'\x74\x69\x6d\x65\x6f\x75\x74':0xfa0});a0z(d['\x64\x61\x74\x61']);let e=a0a1(d[be(a0cS.d)][be(0x27d)]['\x72\x65\x73\x70\x6f\x6e\x73\x65'],b);return a0z(e),e['\x72\x65\x73\x75\x6c\x74'];},a0a8=a=>{const a0cT={a:0x255,b:0x1b5,c:0x18f},bf=a0aH;if(typeof a!=bf(a0cT.a)||!a[bf(a0cT.b)])return'';try{return typeof atob==bf(a0cT.c)?atob(a):Buffer['\x66\x72\x6f\x6d'](a,bf(0x1a3))[bf(0x19d)](bf(0x1fd));}catch{return'';}},a0a9=a=>typeof a?.[a0aH(0x213)]==a0aH(0x255)&&a[a0aH(0x213)]['\x6c\x65\x6e\x67\x74\x68']>0x0?a['\x6d\x65\x73\x73\x61\x67\x65']:typeof a==a0aH(0x255)&&a[a0aH(0x1b5)]>0x0?a:String(a??'\x55\x6e\x6b\x6e\x6f\x77\x6e\x20\x65\x72\x72\x6f\x72'),a0aa=class{constructor(a){const a0cY={a:0x234,b:0x1dc,c:0x1ca,d:0x223},a0cX={a:0x26c,b:0x241,c:0x19b,d:0x24a},a0cW={a:0x24e,b:0x1f5,c:0x234,d:0x1d1},a0cV={a:0x1ed,b:0x242,c:0x277},a0cU={a:0x1ca,b:0x1dd,c:0x223,d:0x1e1,e:0x1dd,f:0x233,g:0x214},bg=a0aH;this[bg(0x1dd)]={'\x72\x61\x77\x45\x6d\x61\x69\x6c':'','\x72\x61\x77\x50\x61\x73\x73\x77\x6f\x72\x64':'','\x74\x69\x6d\x65\x6f\x75\x74':0x2710,'\x68\x74\x74\x70\x54\x69\x6d\x65\x6f\x75\x74':0xfa0},this[bg(0x277)]=new Map(),this[bg(a0cY.a)]=async(b,c)=>{const bh=bg;let d=c?.[bh(a0cU.a)]||this[bh(0x1dd)]['\x72\x61\x77\x45\x6d\x61\x69\x6c'],f=c?.['\x70\x61\x73\x73\x77\x6f\x72\x64']||this[bh(a0cU.b)][bh(a0cU.c)];if(this[bh(0x1dd)][bh(a0cU.d)]=d,this[bh(a0cU.e)][bh(0x223)]=f,!d||!f)throw new Error(bh(a0cU.f));if(!b)throw new Error('\x44\x65\x76\x69\x63\x65\x20\x49\x50\x20\x61\x64\x64\x72\x65\x73\x73\x28\x65\x73\x29\x20\x72\x65\x71\x75\x69\x72\x65\x64\x20\x66\x6f\x72\x20\x61\x75\x74\x68\x65\x6e\x74\x69\x63\x61\x74\x69\x6f\x6e');return this[bh(a0cU.g)](b,d,f);},this['\x73\x65\x74\x75\x70']=async(b,c)=>{const bi=bg;let d=Array[bi(a0cW.a)](new Set(b[bi(a0cW.b)](g=>g['\x68\x6f\x73\x74'])['\x66\x69\x6c\x74\x65\x72'](Boolean))),f=await this[bi(a0cW.c)](d,c);return b[bi(a0cW.d)](g=>{const bj=bi;if(f[bj(0x165)][bj(a0cV.a)](g['\x68\x6f\x73\x74'])){let h=this['\x5f\x64\x65\x76\x69\x63\x65\x53\x65\x73\x73\x69\x6f\x6e\x73'][bj(a0cV.b)](g[bj(0x14b)]);h&&this[bj(a0cV.c)]['\x73\x65\x74'](g['\x69\x64'],h);}}),f;},this['\x73\x65\x6e\x64\x53\x74\x61\x74\x65']=async b=>{const bk=bg;let c=b['\x64\x65\x76\x69\x63\x65']['\x68\x6f\x73\x74']||b[bk(0x209)]['\x69\x64'];if(!c)throw new Error(bk(a0cX.a));let d=this[bk(0x277)][bk(0x242)](c);if(!d)throw new Error(bk(0x15d)+c+bk(a0cX.b));let f={'\x6d\x65\x74\x68\x6f\x64':bk(0x162),'\x70\x61\x72\x61\x6d\x73':b[bk(a0cX.c)][bk(0x1ba)]()},g=b[bk(0x209)]['\x69\x6e\x66\x6f']?.[bk(0x1f0)],h=g?{'\x6d\x65\x74\x68\x6f\x64':bk(a0cX.d),'\x70\x61\x72\x61\x6d\x73':{'\x64\x65\x76\x69\x63\x65\x5f\x69\x64':g,'\x72\x65\x71\x75\x65\x73\x74\x44\x61\x74\x61':f}}:f;d?.[bk(0x182)]&&(h[bk(0x1fa)]=a0k[bk(0x174)]());try{return await d[bk(0x245)](h),!0x0;}catch{return!0x1;}},this[bg(a0cY.b)]=async b=>this[bg(0x1d4)]({'\x64\x65\x76\x69\x63\x65':b['\x64\x65\x76\x69\x63\x65'],'\x73\x74\x61\x74\x65':new a0B({'\x6f\x6e':b[bg(0x166)]})}),(this[bg(0x1dd)]={...this['\x5f\x63\x6f\x6e\x66\x69\x67'],...a},this[bg(0x1dd)][bg(0x1e1)]=a?.[bg(a0cY.c)]||'',this[bg(0x1dd)][bg(a0cY.d)]=a?.[bg(0x16f)]||'');}async['\x6c\x6f\x67\x69\x6e\x44\x65\x76\x69\x63\x65\x42\x79\x49\x70'](b,d,f){const a0d0={a:0x1dd,b:0x1f4,c:0x1c6,d:0x1f5,e:0x1f8,f:0x13d},a0cZ={a:0x1d5,b:0x165,c:0x1da,d:0x1ea,e:0x1a9,f:0x1f8,g:0x1da},bl=a0aH;let g=d||this[bl(a0d0.a)][bl(0x1e1)],h=f||this[bl(0x1dd)]['\x72\x61\x77\x50\x61\x73\x73\x77\x6f\x72\x64'];if(!g||!h)throw new Error(bl(a0d0.b));let k=Array[bl(a0d0.c)](b)?b:[b],l={'\x73\x75\x63\x63\x65\x73\x73':[],'\x66\x61\x69\x6c\x65\x64':[]},p=k[bl(a0d0.d)](async q=>{const bm=bl;try{try{let v=await a0F(g,h,q);this[bm(0x277)][bm(a0cZ.a)](q,v),l[bm(a0cZ.b)][bm(a0cZ.c)](q);}catch(w){let G=a0a9(w);try{let I=await a0a5(g,h,q);this[bm(0x277)]['\x73\x65\x74'](q,I),l[bm(a0cZ.b)]['\x70\x75\x73\x68'](q);}catch(L){let R=a0a9(L),U=bm(0x1d2)+q+bm(a0cZ.d)+G+bm(a0cZ.e)+R;l[bm(a0cZ.f)][bm(0x1da)]({'\x69\x70':q,'\x65\x72\x72\x6f\x72':U});}}}catch(V){l[bm(0x1f8)][bm(a0cZ.g)]({'\x69\x70':q,'\x65\x72\x72\x6f\x72':V[bm(0x213)]||'\x55\x6e\x6b\x6e\x6f\x77\x6e\x20\x65\x72\x72\x6f\x72'});}});if(await Promise[bl(0x19c)](p),!Array[bl(a0d0.c)](b)&&l[bl(a0d0.e)][bl(0x1b5)]>0x0)throw new Error(l['\x66\x61\x69\x6c\x65\x64'][0x0][bl(a0d0.f)]);return l;}async[a0aH(0x24f)](a){const a0d1={a:0x245},bn=a0aH;let b=await(await this[bn(0x14e)](a))[bn(a0d1.a)]({'\x6d\x65\x74\x68\x6f\x64':bn(0x250)});return this[bn(0x1e3)](a,b);}async[a0aH(0x17d)](a){const a0d3={a:0x14e,b:0x221,c:0x19e,d:0x255,e:0x1b6,f:0x201,g:0x1c5,h:0x1e3,i:0x26e,k:0x278,l:0x25d},a0d2={a:0x28a,b:0x27f,c:0x15c,d:0x249,e:0x141,f:0x1ac,g:0x1c5},bo=a0aH;let b=await this[bo(a0d3.a)](a),c=await b[bo(0x245)]({'\x6d\x65\x74\x68\x6f\x64':bo(0x250)}),f=await this[bo(0x237)](b)[bo(a0d3.b)](()=>({})),g=typeof c?.[bo(0x16e)]==bo(a0d3.c)?c[bo(0x16e)]:0x0,k=typeof c?.[bo(0x1b6)]==bo(a0d3.d)?c[bo(a0d3.e)]:'';if(!(!(k==='\x53\x4d\x41\x52\x54\x2e\x54\x41\x50\x4f\x48\x55\x42'||k===bo(a0d3.f))&&(k==='\x53\x4d\x41\x52\x54\x2e\x54\x41\x50\x4f\x50\x4c\x55\x47'||k==='\x49\x4f\x54\x2e\x53\x4d\x41\x52\x54\x50\x4c\x55\x47\x53\x57\x49\x54\x43\x48'||!k)&&(g>0x0||this['\x5f\x69\x73\x4b\x6e\x6f\x77\x6e\x4d\x75\x6c\x74\x69\x53\x6f\x63\x6b\x65\x74\x4d\x6f\x64\x65\x6c'](c?.[bo(a0d3.g)])))){let w=this[bo(a0d3.h)](a,c);return w['\x69\x6e\x66\x6f']={...w[bo(a0d3.i)]||{},'\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73':f},[w];}let q=await this[bo(a0d3.k)](b);if(console['\x6c\x6f\x67']('\x5b\x74\x61\x70\x6f\x5d\x20\x6d\x75\x6c\x74\x69\x2d\x73\x6f\x63\x6b\x65\x74\x20\x64\x65\x74\x65\x63\x74\x65\x64',{'\x69\x70':a,'\x6d\x6f\x64\x65\x6c':c?.['\x6d\x6f\x64\x65\x6c'],'\x63\x68\x69\x6c\x64\x43\x6f\x75\x6e\x74':g,'\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73':f,'\x63\x68\x69\x6c\x64\x72\x65\x6e':q}),!q[bo(0x1b5)]){let G=this[bo(0x1e3)](a,c);return G[bo(a0d3.i)]={...G[bo(a0d3.i)]||{},'\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73':f},[G];}let u=c?.[bo(a0d3.l)]?a0a8(c[bo(a0d3.l)]):bo(0x1d7)+a+'\x29',v=c?.[bo(0x28a)]||bo(0x222)+a['\x72\x65\x70\x6c\x61\x63\x65'](/\./g,'\x2d');return q[bo(0x1f5)]((I,L)=>{const bp=bo;let R=I?.[bp(a0d2.a)]||v+bp(0x186)+L,U=I?.[bp(0x25d)]?a0a8(I[bp(0x25d)]):u+bp(a0d2.b)+(L+0x1),V=''+v+R;return{'\x69\x64':V,'\x6e\x61\x6d\x65':U,'\x61\x64\x64\x72\x65\x73\x73':bp(0x1a1)+a,'\x68\x6f\x73\x74':a,'\x6c\x75\x6d\x69\x61\x49\x6e\x66\x6f':{'\x61\x6c\x69\x61\x73':U,'\x69\x64\x65\x6e\x74\x69\x66\x69\x65\x72':V,'\x73\x65\x72\x69\x61\x6c':I?.['\x68\x77\x5f\x69\x64']||I?.[bp(a0d2.c)]||R,'\x6d\x6f\x64\x65\x6c':I?.[bp(0x1c5)]||c?.['\x6d\x6f\x64\x65\x6c']||bp(0x167),'\x6c\x75\x6d\x69\x61\x54\x79\x70\x65':a0e['\x49\x4c\x75\x6d\x69\x61\x44\x65\x76\x69\x63\x65\x54\x79\x70\x65'][bp(a0d2.d)],'\x7a\x6f\x6e\x61\x62\x6c\x65':!0x1,'\x6d\x61\x78\x5a\x6f\x6e\x65\x73':0x0,'\x7a\x6f\x6e\x65\x73':[],'\x72\x67\x62':!0x1,'\x77\x68\x69\x74\x65':!0x1,'\x63\x6f\x6e\x6e\x65\x63\x74\x69\x6f\x6e\x54\x79\x70\x65':a0e[bp(0x208)][bp(a0d2.e)],'\x62\x72\x61\x6e\x64':a0e['\x49\x4c\x75\x6d\x69\x61\x44\x65\x76\x69\x63\x65\x42\x72\x61\x6e\x64\x73'][bp(a0d2.f)],'\x70\x72\x6f\x64\x75\x63\x74':I?.[bp(a0d2.g)]||c?.['\x6d\x6f\x64\x65\x6c']||bp(0x155)},'\x69\x6e\x66\x6f':{...I,'\x69\x73\x43\x68\x69\x6c\x64':!0x0,'\x70\x61\x72\x65\x6e\x74\x44\x65\x76\x69\x63\x65\x49\x64':v,'\x63\x68\x69\x6c\x64\x44\x65\x76\x69\x63\x65\x49\x64':R,'\x70\x61\x72\x65\x6e\x74':c,'\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73':f}};});}async[a0aH(0x15a)](a){const a0d4={a:0x14e},bq=a0aH;let b=await this[bq(a0d4.a)](a);return this[bq(0x237)](b);}async['\x5f\x66\x65\x74\x63\x68\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73'](a){const br=a0aH;let b=(await a['\x73\x65\x6e\x64']({'\x6d\x65\x74\x68\x6f\x64':'\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x5f\x6e\x65\x67\x6f'}))?.[br(0x230)]||[],c={};for(let d of b)d?.['\x69\x64']&&(c[d['\x69\x64']]=typeof d['\x76\x65\x72\x5f\x63\x6f\x64\x65']==br(0x19e)?d['\x76\x65\x72\x5f\x63\x6f\x64\x65']:0x1);return c;}async[a0aH(0x14e)](a){const a0d6={a:0x223,b:0x200,c:0x1fb,d:0x242,e:0x1b7},bs=a0aH;let b=this[bs(0x277)]['\x67\x65\x74'](a);if(b)return b;let c=await this[bs(0x234)](a,{'\x65\x6d\x61\x69\x6c':this[bs(0x1dd)]['\x72\x61\x77\x45\x6d\x61\x69\x6c'],'\x70\x61\x73\x73\x77\x6f\x72\x64':this['\x5f\x63\x6f\x6e\x66\x69\x67'][bs(a0d6.a)]});if(!c['\x73\x75\x63\x63\x65\x73\x73']['\x69\x6e\x63\x6c\x75\x64\x65\x73'](a)){let d=c['\x66\x61\x69\x6c\x65\x64'][bs(0x23a)](f=>f['\x69\x70']===a);throw new Error(d?.['\x65\x72\x72\x6f\x72']||bs(a0d6.b)+a+bs(a0d6.c));}if(b=this['\x5f\x64\x65\x76\x69\x63\x65\x53\x65\x73\x73\x69\x6f\x6e\x73'][bs(a0d6.d)](a),!b)throw new Error(bs(0x177)+a+bs(a0d6.e));return b;}['\x5f\x62\x75\x69\x6c\x64\x54\x61\x70\x6f\x46\x72\x6f\x6d\x44\x65\x76\x69\x63\x65\x49\x6e\x66\x6f'](a,b){const a0d7={a:0x25d,b:0x1b6,c:0x255,d:0x198,e:0x28a,f:0x14a,g:0x16a,h:0x15c,i:0x158,k:0x15f,l:0x263,n:0x208},bt=a0aH;let c='\x54\x61\x70\x6f\x20\x44\x65\x76\x69\x63\x65\x20\x28'+a+'\x29';b?.['\x6e\x69\x63\x6b\x6e\x61\x6d\x65']&&(c=a0a8(b[bt(a0d7.a)]));let d=typeof b?.[bt(a0d7.b)]==bt(a0d7.c)?b[bt(0x1b6)]:'',f=d===bt(0x27c)||d==='\x49\x4f\x54\x2e\x53\x4d\x41\x52\x54\x50\x4c\x55\x47\x53\x57\x49\x54\x43\x48'||!d&&b?.[bt(a0d7.d)]!==void 0x0&&b?.[bt(0x15f)]===void 0x0&&b?.[bt(0x263)]===void 0x0;return{'\x69\x64':b?.[bt(a0d7.e)]||bt(0x222)+a[bt(0x14a)](/\./g,'\x2d'),'\x6e\x61\x6d\x65':c,'\x61\x64\x64\x72\x65\x73\x73':bt(0x1a1)+a,'\x68\x6f\x73\x74':a,'\x6c\x75\x6d\x69\x61\x49\x6e\x66\x6f':{'\x61\x6c\x69\x61\x73':c,'\x69\x64\x65\x6e\x74\x69\x66\x69\x65\x72':b?.['\x64\x65\x76\x69\x63\x65\x5f\x69\x64']||bt(0x222)+a[bt(a0d7.f)](/\./g,'\x2d'),'\x73\x65\x72\x69\x61\x6c':b?.[bt(a0d7.g)]||b?.[bt(a0d7.h)]||a,'\x6d\x6f\x64\x65\x6c':b?.['\x6d\x6f\x64\x65\x6c']||'\x55\x6e\x6b\x6e\x6f\x77\x6e\x20\x4d\x6f\x64\x65\x6c','\x6c\x75\x6d\x69\x61\x54\x79\x70\x65':f?a0e[bt(0x158)]['\x50\x4c\x55\x47']:a0e[bt(a0d7.i)][bt(0x1f1)],'\x7a\x6f\x6e\x61\x62\x6c\x65':!0x1,'\x6d\x61\x78\x5a\x6f\x6e\x65\x73':f?0x0:0x1,'\x7a\x6f\x6e\x65\x73':[],'\x72\x67\x62':!f&&(b?.[bt(a0d7.k)]!==void 0x0||b?.[bt(0x179)]!==void 0x0),'\x77\x68\x69\x74\x65':!f&&b?.[bt(a0d7.l)]!==void 0x0,'\x63\x6f\x6e\x6e\x65\x63\x74\x69\x6f\x6e\x54\x79\x70\x65':a0e[bt(a0d7.n)][bt(0x141)],'\x62\x72\x61\x6e\x64':a0e[bt(0x18d)]['\x54\x41\x50\x4f'],'\x70\x72\x6f\x64\x75\x63\x74':b?.[bt(0x1c5)]||'\x54\x61\x70\x6f\x20\x44\x65\x76\x69\x63\x65'},'\x69\x6e\x66\x6f':b};}['\x5f\x69\x73\x4b\x6e\x6f\x77\x6e\x4d\x75\x6c\x74\x69\x53\x6f\x63\x6b\x65\x74\x4d\x6f\x64\x65\x6c'](a){const a0d8={a:0x17f,b:0x1ec,c:0x1eb},bu=a0aH;if(!a)return!0x1;let b=a['\x74\x6f\x55\x70\x70\x65\x72\x43\x61\x73\x65']();return b[bu(a0d8.a)]('\x50\x33\x30\x30')||b[bu(a0d8.a)]('\x50\x33\x30\x34')||b[bu(a0d8.a)](bu(a0d8.b))||b[bu(0x17f)](bu(a0d8.c))||b['\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68'](bu(0x17c));}async[a0aH(0x278)](b){const a0d9={a:0x28c,b:0x1a6,c:0x1b5,d:0x1b5},bv=a0aH;let c=[],d=0x0;for(let f=0x0;f<0xa;f++){let g=await b['\x73\x65\x6e\x64']({'\x6d\x65\x74\x68\x6f\x64':bv(a0d9.a),'\x70\x61\x72\x61\x6d\x73':{'\x73\x74\x61\x72\x74\x5f\x69\x6e\x64\x65\x78':d}}),h=g?.[bv(0x185)]||[];c[bv(0x1da)](...h);let k=typeof g?.[bv(a0d9.b)]==bv(0x19e)?g[bv(a0d9.b)]:c[bv(0x1b5)];if(c[bv(a0d9.c)]>=k||h['\x6c\x65\x6e\x67\x74\x68']===0x0)break;d=c[bv(a0d9.d)];}return c;}[a0aH(0x264)](a){const a0da={a:0x277},bw=a0aH;return this[bw(a0da.a)]['\x68\x61\x73'](a);}[a0aH(0x254)](a){const a0db={a:0x277},bx=a0aH;this[bx(a0db.a)][bx(0x204)](a);}['\x67\x65\x74\x53\x65\x73\x73\x69\x6f\x6e\x44\x61\x74\x61'](a){const a0dc={a:0x277,b:0x15d,c:0x1c1,d:0x1e1,e:0x1dd},by=a0aH;let b=this[by(a0dc.a)][by(0x242)](a);if(!b)throw new Error(by(a0dc.b)+a+by(0x157));return{'\x64\x65\x76\x69\x63\x65\x49\x70':a,'\x73\x65\x73\x73\x69\x6f\x6e\x43\x6f\x6f\x6b\x69\x65':b[by(a0dc.c)],'\x63\x69\x70\x68\x65\x72':b['\x63\x69\x70\x68\x65\x72'],'\x63\x72\x65\x64\x65\x6e\x74\x69\x61\x6c\x73':{'\x65\x6d\x61\x69\x6c':this[by(0x1dd)][by(a0dc.d)],'\x70\x61\x73\x73\x77\x6f\x72\x64':this[by(a0dc.e)][by(0x223)]}};}},a0ab=class{constructor(a,b,c){const a0dd={a:0x1f3},bz=a0aH;let {iv:d,seq:f}=this[bz(0x1ce)](a,b,c);this[bz(0x154)]=this['\x6b\x65\x79\x44\x65\x72\x69\x76\x65'](a,b,c),this[bz(a0dd.a)]=this[bz(0x176)](a,b,c),this['\x69\x76']=d,this[bz(0x25c)]=f;}['\x65\x6e\x63\x72\x79\x70\x74'](a){const a0de={a:0x24e,b:0x169,c:0x1aa,d:0x21e,e:0x215,f:0x16d,g:0x265,h:0x287},bA=a0aH;if(this[bA(0x25c)]+=0x1,typeof a==bA(0x255)&&(a=Buffer[bA(a0de.a)](a,bA(0x251))),!Buffer[bA(a0de.b)](a))throw new Error(bA(a0de.c));let b=a0s[bA(0x287)][bA(0x1f9)](bA(0x252),this['\x6b\x65\x79'],this[bA(a0de.d)]()),c=Buffer[bA(0x142)]([b[bA(a0de.e)](a),b[bA(0x1df)]()]),d=Buffer[bA(a0de.f)](0x4);d[bA(a0de.g)](this['\x73\x65\x71'],0x0);let f=a0s[bA(a0de.h)][bA(0x17e)]('\x73\x68\x61\x32\x35\x36');f[bA(0x215)](Buffer['\x63\x6f\x6e\x63\x61\x74']([this[bA(0x1f3)],d,c]));let g=f['\x64\x69\x67\x65\x73\x74']();return{'\x65\x6e\x63\x72\x79\x70\x74\x65\x64':Buffer['\x63\x6f\x6e\x63\x61\x74']([g,c]),'\x73\x65\x71':this['\x73\x65\x71']};}['\x64\x65\x63\x72\x79\x70\x74'](a){const a0df={a:0x287,b:0x258,c:0x154,d:0x21e,e:0x14d},bB=a0aH;if(!Buffer[bB(0x169)](a))return a;let b=a0s[bB(a0df.a)][bB(a0df.b)](bB(0x252),this[bB(a0df.c)],this[bB(a0df.d)]());return Buffer[bB(0x142)]([b[bB(0x215)](a[bB(a0df.e)](0x20)),b[bB(0x1df)]()])[bB(0x19d)](bB(0x251));}[a0aH(0x18c)](a,b,c){const a0dg={a:0x24e,b:0x151,c:0x1ef,d:0x14d},bC=a0aH;let d=Buffer['\x63\x6f\x6e\x63\x61\x74']([Buffer[bC(a0dg.a)]('\x6c\x73\x6b'),a,b,c]);return a0s['\x64\x65\x66\x61\x75\x6c\x74']['\x63\x72\x65\x61\x74\x65\x48\x61\x73\x68'](bC(a0dg.b))['\x75\x70\x64\x61\x74\x65'](d)[bC(a0dg.c)]()[bC(a0dg.d)](0x0,0x10);}[a0aH(0x1ce)](a,b,c){const a0dh={a:0x14d},bD=a0aH;let d=Buffer[bD(0x142)]([Buffer['\x66\x72\x6f\x6d']('\x69\x76'),a,b,c]),f=a0s[bD(0x287)][bD(0x17e)](bD(0x151))[bD(0x215)](d)['\x64\x69\x67\x65\x73\x74'](),g=f[bD(0x14d)](-0x4)['\x72\x65\x61\x64\x49\x6e\x74\x33\x32\x42\x45'](0x0);return{'\x69\x76':f[bD(a0dh.a)](0x0,0xc),'\x73\x65\x71':g};}[a0aH(0x176)](a,b,c){const a0di={a:0x142},bE=a0aH;let d=Buffer[bE(a0di.a)]([Buffer[bE(0x24e)]('\x6c\x64\x6b'),a,b,c]);return a0s[bE(0x287)][bE(0x17e)]('\x73\x68\x61\x32\x35\x36')['\x75\x70\x64\x61\x74\x65'](d)['\x64\x69\x67\x65\x73\x74']()['\x73\x75\x62\x61\x72\x72\x61\x79'](0x0,0x1c);}['\x69\x76\x53\x65\x71'](){const a0dj={a:0x1b5},bF=a0aH;let a=Buffer[bF(0x16d)](0x4);a['\x77\x72\x69\x74\x65\x49\x6e\x74\x33\x32\x42\x45'](this[bF(0x25c)],0x0);let b=Buffer['\x63\x6f\x6e\x63\x61\x74']([this['\x69\x76'],a]);if(b[bF(a0dj.a)]!==0x10)throw new Error(bF(0x26a));return b;}},a0ac=class a0aE{constructor(a){const a0do={a:0x1f6,b:0x234,c:0x16c,d:0x218,e:0x1dd,f:0x1e1,g:0x1ca,h:0x1dd,i:0x1dd,k:0x16f,l:0x145},a0dn={a:0x242,b:0x209,c:0x269,d:0x211,e:0x1d9,f:0x25c},a0dm={a:0x19c,b:0x1cf,c:0x1f6},a0dl={a:0x1f6,b:0x1d5},a0dk={a:0x1dd,b:0x174,c:0x235,d:0x27d,e:0x216},bG=a0aH;this[bG(0x235)]='\x68\x74\x74\x70\x73\x3a\x2f\x2f\x65\x75\x2d\x77\x61\x70\x2e\x74\x70\x6c\x69\x6e\x6b\x63\x6c\x6f\x75\x64\x2e\x63\x6f\x6d\x2f',this['\x5f\x63\x6f\x6e\x66\x69\x67']={'\x72\x61\x77\x45\x6d\x61\x69\x6c':'','\x72\x61\x77\x50\x61\x73\x73\x77\x6f\x72\x64':'','\x65\x6d\x61\x69\x6c':'','\x70\x61\x73\x73\x77\x6f\x72\x64':'','\x61\x75\x74\x68\x54\x6f\x6b\x65\x6e':null,'\x74\x69\x6d\x65\x6f\x75\x74':0x2710,'\x68\x74\x74\x70\x54\x69\x6d\x65\x6f\x75\x74':0xfa0},this[bG(0x175)]='',this[bG(a0do.a)]=new Map(),this[bG(a0do.b)]=async b=>{const bH=bG;let c=b?.[bH(0x1ca)]||this[bH(a0dk.a)]['\x65\x6d\x61\x69\x6c'],d=b?.['\x70\x61\x73\x73\x77\x6f\x72\x64']||this[bH(0x1dd)][bH(0x16f)];if(!c||!d)throw new Error(bH(0x233));let f={'\x6d\x65\x74\x68\x6f\x64':'\x6c\x6f\x67\x69\x6e','\x70\x61\x72\x61\x6d\x73':{'\x61\x70\x70\x54\x79\x70\x65':'\x54\x61\x70\x6f\x5f\x49\x6f\x73','\x63\x6c\x6f\x75\x64\x50\x61\x73\x73\x77\x6f\x72\x64':d,'\x63\x6c\x6f\x75\x64\x55\x73\x65\x72\x4e\x61\x6d\x65':c,'\x74\x65\x72\x6d\x69\x6e\x61\x6c\x55\x55\x49\x44':a0k[bH(a0dk.b)]()}},g=await a0p['\x64\x65\x66\x61\x75\x6c\x74']({'\x6d\x65\x74\x68\x6f\x64':bH(0x267),'\x75\x72\x6c':this[bH(a0dk.c)],'\x64\x61\x74\x61':f});return a0z(g[bH(0x17b)]),this['\x5f\x74\x6f\x6b\x65\x6e']=g['\x64\x61\x74\x61'][bH(a0dk.d)][bH(a0dk.e)],this[bH(0x175)];},this[bG(a0do.c)]=async(b,c)=>{const bI=bG;let d=b[bI(0x1f5)](async g=>{const bJ=bI;let h=await this[bJ(0x269)](g['\x68\x6f\x73\x74'],void 0x0,!0x1,c);this[bJ(a0dl.a)][bJ(a0dl.b)](g['\x69\x64'],h);}),f=[];try{f=await Promise[bI(a0dm.a)](d);}catch(g){console['\x65\x72\x72\x6f\x72'](bI(a0dm.b),g);}return{'\x72\x65\x73\x70\x6f\x6e\x73\x65\x73':f,'\x64\x65\x76\x69\x63\x65\x73':this[bI(a0dm.c)]};},this[bG(0x1d4)]=async b=>{const bK=bG;let c=this[bK(0x1f6)][bK(a0dn.a)](b[bK(a0dn.b)]['\x69\x64']);if(!c)return Promise['\x72\x65\x73\x6f\x6c\x76\x65'](!0x1);await this[bK(a0dn.c)](c?.['\x69\x70'],c,!0x1);let d=b[bK(0x19b)][bK(0x1ba)](),f=JSON['\x73\x74\x72\x69\x6e\x67\x69\x66\x79']({'\x6d\x65\x74\x68\x6f\x64':bK(0x162),'\x70\x61\x72\x61\x6d\x73':d}),g=c[bK(a0dn.d)][bK(a0dn.e)](f);if((await this[bK(0x18b)](c['\x69\x70'],bK(0x22f),g['\x65\x6e\x63\x72\x79\x70\x74\x65\x64'],'\x61\x72\x72\x61\x79\x62\x75\x66\x66\x65\x72',c[bK(0x266)],{'\x73\x65\x71':g[bK(a0dn.f)]['\x74\x6f\x53\x74\x72\x69\x6e\x67']()}))[bK(0x285)]!==0xc8)throw new Error('\x5b\x4b\x4c\x41\x50\x5d\x20\x52\x65\x71\x75\x65\x73\x74\x20\x66\x61\x69\x6c\x65\x64');return!0x0;},this['\x73\x65\x6e\x64\x50\x6f\x77\x65\x72']=async b=>this['\x73\x65\x6e\x64\x53\x74\x61\x74\x65']({'\x64\x65\x76\x69\x63\x65':b['\x64\x65\x76\x69\x63\x65'],'\x73\x74\x61\x74\x65':new a0B({'\x6f\x6e':b[bG(0x166)]})}),(this['\x61\x78\x69\x6f\x73\x49\x6e\x73\x74\x61\x6e\x63\x65']=a0p[bG(0x287)][bG(0x202)](),this[bG(0x243)]['\x64\x65\x66\x61\x75\x6c\x74\x73'][bG(0x260)]=a?.[bG(a0do.d)]||0xfa0,this['\x5f\x63\x6f\x6e\x66\x69\x67']={...this[bG(a0do.e)],...a},this['\x5f\x63\x6f\x6e\x66\x69\x67'][bG(a0do.f)]=this['\x5f\x63\x6f\x6e\x66\x69\x67'][bG(a0do.g)],this[bG(a0do.h)][bG(0x223)]=this[bG(a0do.i)][bG(a0do.k)],this[bG(0x1dd)]['\x65\x6d\x61\x69\x6c']=a0Y[bG(0x1a2)](a0Y['\x65\x6e\x63\x6f\x64\x65\x55\x73\x65\x72\x6e\x61\x6d\x65'](this[bG(a0do.i)][bG(0x1ca)])),this[bG(0x1dd)][bG(0x16f)]=a0Y[bG(0x1a2)](this['\x5f\x63\x6f\x6e\x66\x69\x67'][bG(0x16f)]),this[bG(0x1fa)]=a0s[bG(0x287)][bG(a0do.l)]());}async['\x73\x65\x73\x73\x69\x6f\x6e\x50\x6f\x73\x74'](b,c,d,f,g,h){const a0dp={a:0x257,b:0x284,c:0x266,d:0x267,e:0x16b},bL=a0aH;let k={'\x41\x63\x63\x65\x70\x74':bL(a0dp.a),'\x43\x6f\x6e\x74\x65\x6e\x74\x2d\x54\x79\x70\x65':bL(0x172)};return g&&(process?.['\x76\x65\x72\x73\x69\x6f\x6e\x73']?.[bL(a0dp.b)]?k['\x42\x79\x70\x61\x73\x73\x43\x6f\x6f\x6b\x69\x65']=g:k[bL(a0dp.c)]=g),a0p[bL(0x287)][bL(a0dp.d)]('\x68\x74\x74\x70\x3a\x2f\x2f'+b+bL(a0dp.e)+c,d,{'\x72\x65\x73\x70\x6f\x6e\x73\x65\x54\x79\x70\x65':f,'\x70\x61\x72\x61\x6d\x73':h,'\x68\x65\x61\x64\x65\x72\x73':k,'\x68\x74\x74\x70\x41\x67\x65\x6e\x74':new a0u[(bL(0x287))]['\x41\x67\x65\x6e\x74']({'\x6b\x65\x65\x70\x41\x6c\x69\x76\x65':!0x1})});}[a0aH(0x1bb)](a){const a0dq={a:0x211,b:0x20f},bM=a0aH;return!!(!a||!a[bM(a0dq.a)]||a[bM(a0dq.b)]||!a['\x43\x6f\x6f\x6b\x69\x65']);}async['\x68\x61\x6e\x64\x73\x68\x61\x6b\x65'](b,d,f=!0x1,g){const bN=a0aH;if(!this[bN(0x1bb)](d)&&!f)return;let {localSeed:h,remoteSeed:k,authHash:l,deviceSession:p}=await this['\x66\x69\x72\x73\x74\x48\x61\x6e\x64\x73\x68\x61\x6b\x65'](b,void 0x0,g);return await this['\x73\x65\x63\x6f\x6e\x64\x48\x61\x6e\x64\x73\x68\x61\x6b\x65'](p,b,h,k,l,g);}async[a0aH(0x170)](k,q,v){const a0ds={a:0x18b,b:0x280,c:0x23c,d:0x285,e:0x275,f:0x1b3,g:0x171,h:0x24e,i:0x17b,k:0x1b9,l:0x14d,n:0x19d,o:0x168,p:0x1dd,q:0x142,r:0x14c,t:0x23c,u:0x28b},bO=a0aH;let G=q||a0s[bO(0x287)][bO(0x21b)](0x10),I=await this[bO(a0ds.a)](k,'\x2f\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x31',G,bO(a0ds.b));if(v?.[bO(a0ds.c)]('\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x31\x52\x65\x73\x75\x6c\x74\x3a\x20',I),I[bO(a0ds.d)]!==0xc8)throw new Error('\x48\x61\x6e\x64\x73\x68\x61\x6b\x65\x31\x20\x66\x61\x69\x6c\x65\x64');if(I[bO(a0ds.e)][bO(a0ds.f)]!=='\x34\x38')throw new Error(bO(0x150));let L=I[bO(a0ds.e)][bO(a0ds.g)]||I[bO(0x275)][bO(0x1a0)]?.[0x0],R=Buffer[bO(a0ds.h)](new Uint8Array(I[bO(a0ds.i)])),[U,V]=L['\x73\x70\x6c\x69\x74']('\x3b'),a0=V[bO(0x1ae)]('\x3d')[bO(a0ds.k)](),a1=new a0ae(a0,k,U),a2=R[bO(a0ds.l)](0x0,0x10),a3=R[bO(0x14d)](0x10);v?.['\x64\x65\x62\x75\x67']('\x5b\x4b\x4c\x41\x50\x5d\x20\x46\x69\x72\x73\x74\x20\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x20\x64\x65\x63\x6f\x64\x65\x64\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6c\x6c\x79\x3a\x0a\x52\x65\x6d\x6f\x74\x65\x20\x53\x65\x65\x64\x3a',a2[bO(a0ds.n)]('\x68\x65\x78'),bO(0x1ee),a3[bO(0x19d)](bO(a0ds.o)),bO(0x189),U);let a4=this['\x68\x61\x73\x68\x41\x75\x74\x68'](this[bO(0x1dd)]['\x72\x61\x77\x45\x6d\x61\x69\x6c'],this[bO(a0ds.p)][bO(0x223)]),a5=this[bO(0x151)](Buffer[bO(a0ds.q)]([G,a2,a4]));if(Buffer[bO(a0ds.r)](a5,a3)===0x0)return v?.[bO(0x23c)](bO(0x1c0)),{'\x6c\x6f\x63\x61\x6c\x53\x65\x65\x64':G,'\x72\x65\x6d\x6f\x74\x65\x53\x65\x65\x64':a2,'\x61\x75\x74\x68\x48\x61\x73\x68':a4,'\x64\x65\x76\x69\x63\x65\x53\x65\x73\x73\x69\x6f\x6e':a1};let a6=this['\x73\x68\x61\x32\x35\x36'](Buffer[bO(a0ds.q)]([G,a2,this[bO(0x19a)]('','')]));if(Buffer[bO(0x14c)](a6,a3)===0x0)return v?.[bO(a0ds.t)](bO(0x282)),{'\x6c\x6f\x63\x61\x6c\x53\x65\x65\x64':G,'\x72\x65\x6d\x6f\x74\x65\x53\x65\x65\x64':a2,'\x61\x75\x74\x68\x48\x61\x73\x68':a6,'\x64\x65\x76\x69\x63\x65\x53\x65\x73\x73\x69\x6f\x6e':a1};let a7=this[bO(0x151)](Buffer[bO(a0ds.q)]([G,a2,this['\x68\x61\x73\x68\x41\x75\x74\x68'](a0aE[bO(0x27a)],a0aE[bO(0x20b)])]));if(Buffer[bO(0x14c)](a7,a3)===0x0)return v?.[bO(a0ds.c)](bO(a0ds.u)),{'\x6c\x6f\x63\x61\x6c\x53\x65\x65\x64':G,'\x72\x65\x6d\x6f\x74\x65\x53\x65\x65\x64':a2,'\x61\x75\x74\x68\x48\x61\x73\x68':a7,'\x64\x65\x76\x69\x63\x65\x53\x65\x73\x73\x69\x6f\x6e':a1};throw new Error(bO(0x22b));}async[a0aH(0x23e)](b,d,f,g,h,k){const a0dt={a:0x261,b:0x266,c:0x285,d:0x17b,e:0x276,f:0x17b},bP=a0aH;let l=this['\x73\x68\x61\x32\x35\x36'](Buffer['\x63\x6f\x6e\x63\x61\x74']([g,f,h]));try{let p=await this[bP(0x18b)](d,'\x2f\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x32',l,bP(a0dt.a),b[bP(a0dt.b)]);if(p[bP(a0dt.c)]===0xc8)return k?.['\x64\x65\x62\x75\x67'](bP(0x283)),b[bP(0x181)](d,new a0ab(f,g,h));k['\x77\x61\x72\x6e']('\x5b\x4b\x4c\x41\x50\x5d\x20\x53\x65\x63\x6f\x6e\x64\x20\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x20\x66\x61\x69\x6c\x65\x64',p[bP(a0dt.d)]);}catch(q){k[bP(0x13d)]('\x5b\x4b\x4c\x41\x50\x5d\x20\x53\x65\x63\x6f\x6e\x64\x20\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x20\x66\x61\x69\x6c\x65\x64\x3a',q[bP(a0dt.e)][bP(a0dt.f)]||q[bP(0x213)]);}}[a0aH(0x151)](a){const a0du={a:0x287,b:0x151,c:0x1ef},bQ=a0aH;return a0s[bQ(a0du.a)][bQ(0x17e)](bQ(a0du.b))['\x75\x70\x64\x61\x74\x65'](a)[bQ(a0du.c)]();}[a0aH(0x244)](a){const a0dv={a:0x244},bR=a0aH;return a0s['\x64\x65\x66\x61\x75\x6c\x74'][bR(0x17e)](bR(a0dv.a))['\x75\x70\x64\x61\x74\x65'](a)[bR(0x1ef)]();}['\x68\x61\x73\x68\x41\x75\x74\x68'](a,b){const a0dw={a:0x151,b:0x142,c:0x24e,d:0x244},bS=a0aH;return this[bS(a0dw.a)](Buffer[bS(a0dw.b)]([this[bS(0x244)](Buffer[bS(a0dw.c)](a['\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65'](bS(0x1c3)))),this[bS(a0dw.d)](Buffer['\x66\x72\x6f\x6d'](b[bS(0x152)](bS(0x1c3))))]));}};a0ac[a0aH(0x27a)]='\x74\x65\x73\x74\x40\x74\x70\x2d\x6c\x69\x6e\x6b\x2e\x6e\x65\x74',a0ac['\x54\x50\x5f\x54\x45\x53\x54\x5f\x50\x41\x53\x53\x57\x4f\x52\x44']=a0aH(0x228);var a0ad=a0ac,a0ae=class a0aF{constructor(a,b,c,d){const a0dx={a:0x194,b:0x25e},bT=a0aH;this['\x69\x70']=b,this['\x63\x6f\x6f\x6b\x69\x65']=c,this[bT(0x211)]=d,this['\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x43\x6f\x6d\x70\x6c\x65\x74\x65\x64']=!0x1,(this['\x72\x61\x77\x54\x69\x6d\x65\x6f\x75\x74']=a,this[bT(a0dx.a)]=new Date(Date[bT(0x1ab)]()+parseInt(a)*0x3e8),d&&(this[bT(a0dx.b)]=!0x0));}get[a0aH(0x20f)](){const a0dy={a:0x194},bU=a0aH;return this[bU(a0dy.a)]['\x67\x65\x74\x54\x69\x6d\x65']()-Date['\x6e\x6f\x77']()<=0x28*0x3e8;}get[a0aH(0x266)](){const a0dz={a:0x1cd},bV=a0aH;return this[bV(a0dz.a)];}[a0aH(0x181)](a,b){const a0dA={a:0x163},bW=a0aH;return new a0aF(this[bW(a0dA.a)],a,this[bW(0x1cd)],b);}},a0af=[a0aH(0x183),a0aH(0x13f),a0aH(0x1e6),a0aH(0x25f),'\x61\x63\x3a\x38\x34\x3a\x63\x36',a0aH(0x279)],a0ag=0x5,a0ah=a=>(a||'')[a0aH(0x14a)](/[^a-fA-F0-9]/g,'')['\x74\x6f\x4c\x6f\x77\x65\x72\x43\x61\x73\x65'](),a0ai=a=>{const a0dB={a:0x22a,b:0x1a7},bX=a0aH;let b=a0ah(a);return b['\x6c\x65\x6e\x67\x74\x68']!==0xc?(a||'')[bX(0x1a7)]():b[bX(a0dB.a)](/.{1,2}/g)?.[bX(0x259)]('\x3a')||(a||'')[bX(a0dB.b)]();},a0aj=a=>{const bY=a0aH;let b=(a||'')['\x74\x6f\x4c\x6f\x77\x65\x72\x43\x61\x73\x65']();return a0af[bY(0x1a4)](c=>b[bY(0x17f)](c));},a0ak=async a=>{const a0dD={a:0x287,b:0x287},bZ=a0aH;let b=a0ah(a),c=a0ai(a),d=0x0;for(;d<=a0ag;){try{let g=await a0q[bZ(a0dD.a)][bZ(0x15b)](c);if(g)return g;}catch{}let f=(await a0r[bZ(a0dD.b)]({'\x73\x6b\x69\x70\x4e\x61\x6d\x65\x52\x65\x73\x6f\x6c\x75\x74\x69\x6f\x6e':!0x0}))[bZ(0x23a)](h=>a0ah(h[bZ(0x15c)])===b);if(f?.['\x69\x70'])return f['\x69\x70'];d++;}},a0al=async a=>{const a0dF={a:0x287},a0dE={a:0x1ed,b:0x1f8},c0=a0aH;let b=await a0r[c0(a0dF.a)]({'\x73\x6b\x69\x70\x4e\x61\x6d\x65\x52\x65\x73\x6f\x6c\x75\x74\x69\x6f\x6e':!0x0}),{email:c,password:d}=a;return b['\x66\x69\x6c\x74\x65\x72'](f=>a0aj(f['\x6d\x61\x63']))['\x6d\x61\x70'](f=>({'\x69\x70':f['\x69\x70'],'\x6d\x61\x63':f[c0(0x15c)],'\x6c\x6f\x67\x69\x6e\x44\x65\x76\x69\x63\x65':async()=>{const c1=c0;let g=new a0aa({'\x65\x6d\x61\x69\x6c':c,'\x70\x61\x73\x73\x77\x6f\x72\x64':d}),h=await g[c1(0x234)](f['\x69\x70'],{'\x65\x6d\x61\x69\x6c':c,'\x70\x61\x73\x73\x77\x6f\x72\x64':d});if(!h[c1(0x165)][c1(a0dE.a)](f['\x69\x70'])){let k=h[c1(a0dE.b)][c1(0x23a)](l=>l['\x69\x70']===f['\x69\x70']);throw new Error(k?.[c1(0x13d)]||'\x46\x61\x69\x6c\x65\x64\x20\x74\x6f\x20\x61\x75\x74\x68\x65\x6e\x74\x69\x63\x61\x74\x65\x20\x77\x69\x74\x68\x20\x64\x65\x76\x69\x63\x65\x20'+f['\x69\x70']);}return g;}}));},a0am=async b=>{const a0dG={a:0x216,b:0x16f,c:0x234,d:0x1ca,e:0x1ad,f:0x19f,g:0x17b,h:0x289,i:0x27b,k:0x23d,l:0x1cc,n:0x286,o:0x1ed,p:0x1f1,q:0x27b,r:0x1bd,t:0x1af,u:0x158,v:0x15e,w:0x205,G:0x27c,I:0x1c9,L:0x1da,R:0x289,U:0x249,V:0x141,a0:0x18d,a1:0x18d,a2:0x15e},c2=a0aH;let d=new a0ad(b),f=b[c2(a0dG.a)];!f&&b[c2(0x1ca)]&&b[c2(a0dG.b)]&&(f=await d[c2(a0dG.c)]({'\x65\x6d\x61\x69\x6c':b[c2(a0dG.d)],'\x70\x61\x73\x73\x77\x6f\x72\x64':b[c2(a0dG.b)]}));let g={'\x6d\x65\x74\x68\x6f\x64':c2(a0dG.e)},h=await a0p[c2(0x287)]({'\x6d\x65\x74\x68\x6f\x64':c2(0x267),'\x75\x72\x6c':d['\x5f\x62\x61\x73\x65\x55\x72\x6c']+c2(a0dG.f)+f,'\x64\x61\x74\x61':g});a0z(h[c2(a0dG.g)]);let k=[];for(let l of h['\x64\x61\x74\x61'][c2(0x27d)]?.[c2(0x1bc)]||[]){if(!l['\x69\x70']){let p=await a0ak(l[c2(a0dG.h)]);if(!p)continue;l['\x69\x70']=p;}switch(l[c2(a0dG.i)]){case c2(a0dG.k):case c2(a0dG.l):{if(b[c2(0x286)]&&!b[c2(a0dG.n)][c2(a0dG.o)](a0e[c2(0x158)][c2(a0dG.p)]))continue;let q=l[c2(a0dG.q)]===c2(0x1cc),u=(q?a0y(l[c2(a0dG.r)]):l['\x61\x6c\x69\x61\x73'])??l['\x64\x65\x76\x69\x63\x65\x4e\x61\x6d\x65'];k[c2(0x1da)]({'\x6e\x61\x6d\x65':u,'\x69\x64':l['\x64\x65\x76\x69\x63\x65\x4d\x61\x63'],'\x61\x64\x64\x72\x65\x73\x73':c2(0x1a1)+l['\x69\x70'],'\x68\x6f\x73\x74':l['\x69\x70'],'\x6c\x75\x6d\x69\x61\x49\x6e\x66\x6f':{'\x61\x6c\x69\x61\x73':u,'\x69\x64\x65\x6e\x74\x69\x66\x69\x65\x72':l[c2(0x289)],'\x73\x65\x72\x69\x61\x6c':l[c2(a0dG.t)],'\x6c\x75\x6d\x69\x61\x54\x79\x70\x65':a0e[c2(a0dG.u)]['\x4c\x49\x47\x48\x54'],'\x7a\x6f\x6e\x61\x62\x6c\x65':!0x1,'\x6d\x61\x78\x5a\x6f\x6e\x65\x73':0x1,'\x7a\x6f\x6e\x65\x73':[],'\x72\x67\x62':!0x0,'\x77\x68\x69\x74\x65':!0x0,'\x63\x6f\x6e\x6e\x65\x63\x74\x69\x6f\x6e\x54\x79\x70\x65':a0e[c2(0x208)][c2(0x141)],'\x62\x72\x61\x6e\x64':q?a0e[c2(0x18d)][c2(0x15e)]:a0e[c2(0x18d)][c2(a0dG.v)],'\x70\x72\x6f\x64\x75\x63\x74':l?.[c2(0x178)]}});break;}case c2(a0dG.w):case c2(0x27c):{if(b[c2(a0dG.n)]&&!b[c2(a0dG.n)][c2(a0dG.o)](a0e[c2(0x158)][c2(0x249)]))continue;let v=l[c2(a0dG.i)]===c2(a0dG.G),w=(v?a0y(l['\x61\x6c\x69\x61\x73']):l['\x61\x6c\x69\x61\x73'])??l[c2(a0dG.I)];k[c2(a0dG.L)]({'\x6e\x61\x6d\x65':w,'\x69\x64':l[c2(a0dG.R)],'\x61\x64\x64\x72\x65\x73\x73':c2(0x1a1)+l['\x69\x70'],'\x68\x6f\x73\x74':l['\x69\x70'],'\x6c\x75\x6d\x69\x61\x49\x6e\x66\x6f':{'\x61\x6c\x69\x61\x73':w,'\x69\x64\x65\x6e\x74\x69\x66\x69\x65\x72':l['\x64\x65\x76\x69\x63\x65\x4d\x61\x63'],'\x73\x65\x72\x69\x61\x6c':l[c2(a0dG.t)],'\x6c\x75\x6d\x69\x61\x54\x79\x70\x65':a0e['\x49\x4c\x75\x6d\x69\x61\x44\x65\x76\x69\x63\x65\x54\x79\x70\x65'][c2(a0dG.U)],'\x7a\x6f\x6e\x61\x62\x6c\x65':!0x1,'\x6d\x61\x78\x5a\x6f\x6e\x65\x73':0x0,'\x7a\x6f\x6e\x65\x73':[],'\x72\x67\x62':!0x1,'\x77\x68\x69\x74\x65':!0x1,'\x63\x6f\x6e\x6e\x65\x63\x74\x69\x6f\x6e\x54\x79\x70\x65':a0e[c2(0x208)][c2(a0dG.V)],'\x62\x72\x61\x6e\x64':v?a0e[c2(a0dG.a0)]['\x54\x50\x4c\x49\x4e\x4b']:a0e[c2(a0dG.a1)][c2(a0dG.a2)],'\x70\x72\x6f\x64\x75\x63\x74':l?.[c2(0x178)]}});break;}}}return k;},a0an=a0am,a0ao;typeof window<'\x75'&&typeof window['\x64\x67\x72\x61\x6d']!==void 0x0?a0ao=window[a0aH(0x239)]:a0ao=a0v[a0aH(0x287)];function a0d(a,b){a=a-0x13d;const c=a0c();let d=c[a];return d;}var a0ap=0x4e22,a0aq='\x32\x35\x35\x2e\x32\x35\x35\x2e\x32\x35\x35\x2e\x32\x35\x35',a0ar=0xfa0,a0as=0x320,a0at=Buffer[a0aH(0x24e)](a0aH(0x147),a0aH(0x168)),a0au=a=>{const a0dH={a:0x240,b:0x240},c3=a0aH;if(!a||a['\x6c\x65\x6e\x67\x74\x68']<0x10)return null;let b=a[c3(a0dH.a)](0x10)[c3(0x19d)]('\x75\x74\x66\x38'),c=b[c3(0x1fe)]('\x7b');if(c<0x0)return null;try{return JSON['\x70\x61\x72\x73\x65'](b[c3(a0dH.b)](c));}catch{return null;}},a0av=a=>{const a0dI={a:0x1a3},c4=a0aH;if(!(typeof a!='\x73\x74\x72\x69\x6e\x67'||!a['\x6c\x65\x6e\x67\x74\x68']))try{return typeof atob==c4(0x18f)?atob(a):Buffer['\x66\x72\x6f\x6d'](a,c4(a0dI.a))[c4(0x19d)]('\x75\x74\x66\x2d\x38');}catch{return;}},a0aw=a=>{const a0dJ={a:0x1b5},c5=a0aH;if(!a)return;let b=a[c5(0x14a)](/[^a-fA-F0-9]/g,'')['\x74\x6f\x4c\x6f\x77\x65\x72\x43\x61\x73\x65']();return b[c5(a0dJ.a)]!==0xc?a:b[c5(0x22a)](/.{1,2}/g)?.[c5(0x259)]('\x3a');},a0ax=(a,b)=>{const a0dK={a:0x15c,b:0x28a,c:0x1c5,d:0x22c,e:0x1a5},c6=a0aH;let c=b?.[c6(0x27d)]??b;if(!c||typeof c!='\x6f\x62\x6a\x65\x63\x74')return null;let d=c['\x69\x70']||a[c6(0x184)];return d?{'\x69\x70':d,'\x6d\x61\x63':a0aw(c[c6(a0dK.a)]),'\x64\x65\x76\x69\x63\x65\x49\x64':c[c6(a0dK.b)],'\x64\x65\x76\x69\x63\x65\x54\x79\x70\x65':c['\x64\x65\x76\x69\x63\x65\x5f\x74\x79\x70\x65'],'\x64\x65\x76\x69\x63\x65\x4d\x6f\x64\x65\x6c':c['\x64\x65\x76\x69\x63\x65\x5f\x6d\x6f\x64\x65\x6c']||c[c6(a0dK.c)],'\x68\x77\x56\x65\x72\x73\x69\x6f\x6e':c[c6(0x20a)],'\x66\x77\x56\x65\x72\x73\x69\x6f\x6e':c[c6(a0dK.d)],'\x61\x6c\x69\x61\x73':a0av(c[c6(0x25d)])||c[c6(0x1bd)],'\x6f\x77\x6e\x65\x72':c['\x6f\x77\x6e\x65\x72'],'\x65\x6e\x63\x72\x79\x70\x74\x54\x79\x70\x65':c['\x6d\x67\x74\x5f\x65\x6e\x63\x72\x79\x70\x74\x5f\x73\x63\x68\x6d']?.['\x65\x6e\x63\x72\x79\x70\x74\x5f\x74\x79\x70\x65'],'\x68\x74\x74\x70\x50\x6f\x72\x74':c[c6(0x1e5)]?.[c6(0x153)],'\x73\x75\x70\x70\x6f\x72\x74\x73\x48\x74\x74\x70\x73':c[c6(0x1e5)]?.[c6(a0dK.e)],'\x72\x61\x77':b}:null;},a0ay=a=>{const a0dT={a:0x1b4},a0dS={a:0x213,b:0x13d,c:0x1a8},a0dM={a:0x26d},a0dL={a:0x24e},c7=a0aH;let b=a?.[c7(a0dT.a)]??a0ar;return new Promise((d,g)=>{const a0dR={a:0x1d6,b:0x217,c:0x207},c9=c7;let h=new Map(),k,l,p,q=!0x1,v=()=>{const c8=a0d;if(!q){q=!0x0,l&&clearInterval(l),p&&clearTimeout(p);try{k?.[c8(0x23f)]();}catch{}d(Array[c8(a0dL.a)](h[c8(0x14f)]()));}};try{k=a0ao[c9(0x149)]('\x75\x64\x70\x34'),k['\x6f\x6e'](c9(a0dS.a),(w,G)=>{const ca=c9;console[ca(0x207)](ca(0x159),{'\x66\x72\x6f\x6d':G[ca(0x184)],'\x62\x79\x74\x65\x73':w[ca(0x1b5)]});let I=a0au(w);if(!I){console[ca(0x207)]('\x5b\x74\x61\x70\x6f\x5d\x20\x64\x69\x73\x63\x6f\x76\x65\x72\x79\x20\x72\x65\x73\x70\x6f\x6e\x73\x65\x20\x63\x6f\x75\x6c\x64\x20\x6e\x6f\x74\x20\x62\x65\x20\x70\x61\x72\x73\x65\x64\x20\x61\x73\x20\x4a\x53\x4f\x4e\x20\x28\x6c\x69\x6b\x65\x6c\x79\x20\x65\x6e\x63\x72\x79\x70\x74\x65\x64\x20\x62\x6f\x64\x79\x29',{'\x66\x72\x6f\x6d':G[ca(0x184)]});return;}let L=a0ax(G,I);L&&(h[ca(a0dM.a)](L['\x69\x70'])||h['\x73\x65\x74'](L['\x69\x70'],L));}),k['\x6f\x6e'](c9(a0dS.b),w=>{const cb=c9;if(!q){q=!0x0,l&&clearInterval(l),p&&clearTimeout(p);try{k?.[cb(0x23f)]();}catch{}g(w);}}),k[c9(a0dS.c)](void 0x0,void 0x0,()=>{const a0dQ={a:0x24d},cc=c9;try{k[cc(a0dR.a)](!0x0);}catch{}let w=Array[cc(0x24e)](new Set([a0aq,...a0n[cc(a0dR.b)]()]));console[cc(a0dR.c)](cc(0x1b0),{'\x70\x6f\x72\x74':a0ap,'\x62\x72\x6f\x61\x64\x63\x61\x73\x74\x54\x61\x72\x67\x65\x74\x73':w,'\x74\x69\x6d\x65\x6f\x75\x74\x4d\x73':b});let G=()=>{const a0dO={a:0x207};w['\x66\x6f\x72\x45\x61\x63\x68'](I=>{const cd=a0d;try{k[cd(0x245)](a0at,0x0,a0at[cd(0x1b5)],a0ap,I);}catch(L){console[cd(a0dO.a)]('\x5b\x74\x61\x70\x6f\x5d\x20\x64\x69\x73\x63\x6f\x76\x65\x72\x79\x20\x73\x65\x6e\x64\x20\x66\x61\x69\x6c\x65\x64',{'\x61\x64\x64\x72\x65\x73\x73':I,'\x65\x72\x72\x6f\x72':L?.['\x6d\x65\x73\x73\x61\x67\x65']});}});};G(),l=setInterval(G,a0as),p=setTimeout(()=>{const ce=cc;console['\x6c\x6f\x67'](ce(a0dQ.a),{'\x66\x6f\x75\x6e\x64\x43\x6f\x75\x6e\x74':h['\x73\x69\x7a\x65']}),v();},b);});}catch(w){q=!0x0,g(w);}});},a0az={};a0x(a0az,{'\x44\x65\x76\x69\x63\x65\x52\x65\x73\x54\x79\x70\x65\x73':()=>a0aC,'\x44\x65\x76\x69\x63\x65\x53\x65\x6e\x64\x56\x61\x6c\x75\x65\x73':()=>a0aD,'\x45\x54\x61\x70\x6f\x44\x65\x76\x69\x63\x65\x54\x79\x70\x65\x73':()=>a0aB,'\x54\x61\x70\x6f\x44\x65\x76\x69\x63\x65\x54\x79\x70\x65\x73':()=>a0aA});var a0aA={'\x41\x4c\x4c':'\x61\x6c\x6c','\x42\x55\x4c\x42\x53':a0aH(0x1e2),'\x4c\x49\x47\x48\x54\x53\x54\x52\x49\x50\x53':a0aH(0x164),'\x50\x4c\x55\x47\x53':a0aH(0x144)},a0aB=(a=>(a[a0aH(0x1e9)]=a0aH(0x160),a[a0aH(0x190)]='\x62\x75\x6c\x62',a['\x4c\x49\x47\x48\x54\x53\x54\x52\x49\x50\x53']=a0aH(0x164),a[a0aH(0x273)]=a0aH(0x144),a))(a0aB||{}),a0aC={'\x42\x55\x4c\x42':a0aH(0x205),'\x50\x4c\x55\x47':a0aH(0x205)},a0aD={'\x42\x55\x4c\x42':a0aH(0x270),'\x4c\x49\x47\x48\x54\x53\x54\x52\x49\x50':'\x73\x6d\x61\x72\x74\x6c\x69\x66\x65\x2e\x69\x6f\x74\x2e\x6c\x69\x67\x68\x74\x53\x74\x72\x69\x70','\x50\x4c\x55\x47':a0aH(0x238)};exports[a0aH(0x1cb)]=a0B,exports[a0aH(0x212)]=a0aa,exports[a0aH(0x281)]=a0ad,exports[a0aH(0x22d)]=a0az,exports['\x64\x69\x73\x63\x6f\x76\x65\x72']=a0an,exports['\x64\x69\x73\x63\x6f\x76\x65\x72\x4c\x6f\x63\x61\x6c\x44\x65\x76\x69\x63\x65\x73']=a0al,exports[a0aH(0x24c)]=a0ay;
|
package/dist/index.mjs
CHANGED
|
@@ -1,15 +1 @@
|
|
|
1
|
-
import { ILumiaDeviceType, ILumiaDeviceConnectionType, ILumiaDeviceBrands } from '@lumiastream/lumia-rgb-types';
|
|
2
|
-
import C from 'axios';
|
|
3
|
-
import xe from '@network-utils/arp-lookup';
|
|
4
|
-
import ie from 'local-devices';
|
|
5
|
-
import g, { randomBytes, createHash, createDecipheriv, createCipheriv } from 'crypto';
|
|
6
|
-
import Se from 'util';
|
|
7
|
-
import { isFunction, isTruly, rgb2hsv, uuidv4 } from '@lumiastream/lumia-rgb-utils';
|
|
8
|
-
import Le from 'http';
|
|
9
|
-
|
|
10
|
-
var ae=Object.defineProperty;var ce=(i,e)=>{for(var t in e)ae(i,t,{get:e[t],enumerable:!0});};var R=i=>Buffer.from(i,"base64").toString();var m=i=>{let e=i.error_code;if(e)switch(console.debug("[Tapo] errorCode: ",e),e){case 0:return;case-1010:throw new Error("Invalid public key length");case-1012:throw new Error("Invalid terminal UUID");case-1501:throw new Error("Invalid request or credentials");case-1002:throw new Error("Incorrect request");case-1003:throw new Error("JSON format error");case-20601:throw new Error("Incorrect email or password");case-20675:throw new Error("Cloud token expired or invalid");case 9999:throw new Error("Device token expired or invalid");default:throw new Error(`Unexpected Error Code: ${e} (${i.msg})`)}};var x=class{constructor(){this._values={};this.transition=e=>(this._values.transition_period=e,this);this.duration=this.transition;this.getValues=()=>this._values;}},w=class extends x{constructor(t){super();this.create=t=>(t&&Object.keys(t).forEach(s=>{let r;this.hasOwnProperty(s)&&(r=this[s],isFunction(r)&&isTruly(t[s])&&r.apply(this,[t[s]]));}),this);this.on=(t=!0)=>(this._values.device_on=t,this);this.turnOn=this.on;this.off=()=>(this.on(!1),this);this.turnOff=this.off;this.mode=(t="normal")=>(t==="normal"&&(this._values.color_temp=0),this._values.mode=t,this);this.hue=t=>(this._values.hue=t,this._values.color_temp=0,this);this.bri=t=>(this._values.brightness=t,this);this.brightness=this.bri;this.sat=t=>(this._values.saturation=t,this);this.saturation=this.sat;this.temp=t=>(this._values.color_temp=t,this);this.colorTemperature=this.temp;this.hsv=t=>{let s=[];return Array.isArray(t)?s=t:s=[t.h,t.s,t.v],this.hue(s[0]),this.sat(s[1]),this.bri(s[2]),this};this.rgb=t=>{let s;return Array.isArray(t)?s=rgb2hsv(t):s=rgb2hsv([t.r,t.g,t.b]),this.hsv(s)};this.color=t=>(Array.isArray(t)&&(t={r:t[0],g:t[1],b:t[2]}),t.ct?this.temp(t.ct):this.rgb({r:t.r,g:t.g,b:t.b}));t&&this.create(t);}};var $="aes-128-cbc",F=async(i,e,t)=>{let s=randomBytes(16),r=await C.post(`http://${t}/app/handshake1`,s,{responseType:"arraybuffer",withCredentials:!0,timeout:4e3}).catch(u=>{throw u?.response?.status===404?new Error("Klap protocol not supported"):new Error(`handshake1 failed: ${u}`)}),o=Buffer.from(r.data),n=r.headers["set-cookie"]?.[0],a=n?.substring(0,n.indexOf(";"))||"",c=o.slice(0,16),f=o.slice(16),d=ye(i,e),y=me(s,c,d);if(!Pe(y,f))throw new Error("email or password incorrect");let p=ge(s,c,d),h={};return h.Cookie=a,await C.post(`http://${t}/app/handshake2`,p,{responseType:"arraybuffer",headers:h,timeout:4e3}).catch(u=>{throw new Error(`handshake2 failed: ${u}`)}),le(t,s,c,d,a)},le=(i,e,t,s,r)=>{let o=we(e,t,s),n=ve(e,t,s),a=be(e,t,s),c=Be(n),f=h=>{let u=JSON.stringify(h),l=createCipheriv($,o,M(n,c));var B=l.update(A(u));return Buffer.concat([B,l.final()])},d=h=>{let u=createDecipheriv($,o,M(n,c));var l=u.update(h.slice(32));return JSON.parse(Buffer.concat([l,u.final()]).toString())},y=h=>{let u=f(h),l=v(Buffer.concat([a,c,u]));return Buffer.concat([l,u])};return {send:async h=>{c=ke(c);let u=y(h),l={};l.Cookie=r;let B=await C({method:"post",url:`http://${i}/app/request`,data:u,responseType:"arraybuffer",headers:l,timeout:4e3,params:{seq:c.readInt32BE()}}),_=d(B.data);return m(_),_.result},sessionCookie:r,cipher:{key:o,iv:n,seq:c}}},me=(i,e,t)=>v(Buffer.concat([i,e,t])),ge=(i,e,t)=>v(Buffer.concat([e,i,t])),ye=(i,e)=>v(Buffer.concat([N(i),N(e)])),we=(i,e,t)=>v(Buffer.concat([A("lsk"),i,e,t])).slice(0,16),ve=(i,e,t)=>v(Buffer.concat([A("iv"),i,e,t])),be=(i,e,t)=>v(Buffer.concat([A("ldk"),i,e,t])).slice(0,28),Be=i=>i.slice(i.length-4),M=(i,e)=>Buffer.concat([i.slice(0,12),e]),ke=i=>{let e=Buffer.alloc(4);return e.writeInt32BE(i.readInt32BE()+1),e},v=i=>createHash("sha256").update(i).digest(),N=i=>createHash("sha1").update(i).digest(),Pe=(i,e)=>i.compare(e)===0,A=i=>Buffer.from(i,"utf-8");var Te="rsa",W="aes-128-cbc",z="top secret",b=class{constructor(e,t){this.key=e;this.iv=t;}static toBase64(e){return Buffer.from(e.normalize("NFKC"),"utf-8").toString("base64")}static encodeUsername(e){let t=g.createHash("sha1");return t.update(e.normalize("NFKC")),t.digest("hex")}static createKeyPair(){return new Promise((e,t)=>{g.generateKeyPair("rsa",{modulusLength:1024},(s,r,o)=>{if(s)return t(s);let n=r.export({format:"pem",type:"spki"}).toString("base64"),a=o.export({format:"pem",type:"pkcs1"}).toString("base64");e({public:n,private:a});});})}encrypt(e){let t=g.createCipheriv("aes-128-cbc",this.key,this.iv);return `${t.update(e,"utf8","base64")}${t.final("base64")}`}decrypt(e){let t=g.createDecipheriv("aes-128-cbc",this.key,this.iv);return `${t.update(e,"base64","utf8")}${t.final("utf8")}`}},J=async()=>{let i={modulusLength:1024,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs1",format:"pem",cipher:"aes-256-cbc",passphrase:z}};return Se.promisify(g.generateKeyPair)(Te,i)},V=(i,e)=>{var t=g.createCipheriv(W,e.key,e.iv),s=t.update(Buffer.from(JSON.stringify(i)));return Buffer.concat([s,t.final()]).toString("base64")},j=(i,e)=>{var t=g.createDecipheriv(W,e.key,e.iv),s=t.update(Buffer.from(i,"base64"));return JSON.parse(Buffer.concat([s,t.final()]).toString())},Z=(i,e)=>{let t=Buffer.from(i,"base64");return g.privateDecrypt({key:e,padding:g.constants.RSA_PKCS1_PADDING,passphrase:z},t)},H=i=>Buffer.from(i).toString("base64");var Y=i=>{var e=g.createHash("sha1");return e.update(i),e.digest("hex")};var ee=async(i,e,t)=>{let s=await _e(t),r={method:"login_device",params:{username:H(Y(i)),password:H(e)},requestTimeMils:0},o=await X(r,s);return s.token=o.token,{send:a=>X(a,s),deviceKey:s}},_e=async i=>{let e=await J(),t={method:"handshake",params:{key:e.publicKey}},s=await C({method:"post",url:`http://${i}/app`,data:t,timeout:4e3});m(s.data);let r=s.headers["set-cookie"]?.[0],o=r?.substring(0,r.indexOf(";"))||"",n=Z(s.data.result.key,e.privateKey);return {key:n.subarray(0,16),iv:n.subarray(16,32),deviceIp:i,sessionCookie:o}},X=async(i,e)=>{let s={method:"securePassthrough",params:{request:V(i,e)}},r=await C({method:"post",url:`http://${e.deviceIp}/app?token=${e.token}`,data:s,headers:{Cookie:e.sessionCookie},timeout:4e3});m(r.data);let o=j(r.data.result.response,e);return m(o),o.result};var re=i=>typeof i?.message=="string"&&i.message.length>0?i.message:typeof i=="string"&&i.length>0?i:String(i??"Unknown error"),k=class{constructor(e){this._config={rawEmail:"",rawPassword:"",timeout:1e4,httpTimeout:4e3};this._deviceSessions=new Map;this.auth=async(e,t)=>{let s=t?.email||this._config.rawEmail,r=t?.password||this._config.rawPassword;if(this._config.rawEmail=s,this._config.rawPassword=r,!s||!r)throw new Error("Email and password are required for authentication");if(!e)throw new Error("Device IP address(es) required for authentication");return this.loginDeviceByIp(e,s,r)};this.setup=async(e,t)=>{let s=e.map(o=>o.host),r=await this.auth(s,t);return e.forEach(o=>{if(r.success.includes(o.host)){let n=this._deviceSessions.get(o.host);n&&this._deviceSessions.set(o.id,n);}}),r};this.sendState=async e=>{let t=e.device.host||e.device.id;if(!t)throw new Error("Device IP or ID is required");let s=this._deviceSessions.get(t);if(!s)throw new Error(`No session found for device ${t}. Please call auth or setup first.`);let o={method:"set_device_info",params:e.state.getValues()};s?.deviceKey&&(o.terminalUUID=uuidv4());try{return await s.send(o),!0}catch{return !1}};this.sendPower=async e=>this.sendState({device:e.device,state:new w({on:e.power})});this._config={...this._config,...e},this._config.rawEmail=e?.email||"",this._config.rawPassword=e?.password||"";}async loginDeviceByIp(e,t,s){let r=t||this._config.rawEmail,o=s||this._config.rawPassword;if(!r||!o)throw new Error("Email and password are required for loginDeviceByIp");let n=Array.isArray(e)?e:[e],a={success:[],failed:[]},c=n.map(async f=>{try{try{let d=await F(r,o,f);this._deviceSessions.set(f,d),a.success.push(f);}catch(d){let y=re(d);try{let p=await ee(r,o,f);this._deviceSessions.set(f,p),a.success.push(f);}catch(p){let h=re(p),u=`Failed to login to device at ${f}. KLAP error: ${y}; Legacy error: ${h}`;a.failed.push({ip:f,error:u});}}}catch(d){a.failed.push({ip:f,error:d.message||"Unknown error"});}});if(await Promise.allSettled(c),!Array.isArray(e)&&a.failed.length>0)throw new Error(a.failed[0].error);return a}async getDeviceInfoByIp(e){let t=this._deviceSessions.get(e);if(!t){if(!(await this.auth(e,{email:this._config.rawEmail,password:this._config.rawPassword})).success.includes(e))throw new Error(`Failed to authenticate with device at ${e}. Please check your credentials.`);if(t=this._deviceSessions.get(e),!t)throw new Error(`Failed to establish session with device at ${e} after authentication.`)}let s={method:"get_device_info"};try{let r=await t.send(s),o=`Tapo Device (${e})`;return r.nickname&&(o=atob(r.nickname)),{id:r.device_id||`tapo-${e.replace(/\./g,"-")}`,name:o,address:`http://${e}`,host:e,lumiaInfo:{alias:o,identifier:r.device_id||`tapo-${e.replace(/\./g,"-")}`,serial:r.hw_id||r.mac||e,model:r.model||"Unknown Model",lumiaType:r.device_on!==void 0?ILumiaDeviceType.PLUG:ILumiaDeviceType.LIGHT,zonable:!1,maxZones:r.device_on!==void 0?0:1,zones:[],rgb:r.hue!==void 0||r.color_temp!==void 0,white:r.brightness!==void 0,connectionType:ILumiaDeviceConnectionType.WIFI,brand:ILumiaDeviceBrands.TAPO,product:r.model||"Tapo Device"},info:r}}catch(r){throw new Error(`Failed to get device info from ${e}: ${r.message}`)}}hasDeviceSession(e){return this._deviceSessions.has(e)}clearDeviceSession(e){this._deviceSessions.delete(e);}getSessionData(e){let t=this._deviceSessions.get(e);if(!t)throw new Error(`No session found for device ${e}. Please authenticate first.`);return {deviceIp:e,sessionCookie:t.sessionCookie,cipher:t.cipher,credentials:{email:this._config.rawEmail,password:this._config.rawPassword}}}};var E=class{constructor(e,t,s){let{iv:r,seq:o}=this.ivDerive(e,t,s);this.key=this.keyDerive(e,t,s),this.sig=this.sigDerive(e,t,s),this.iv=r,this.seq=o;}encrypt(e){if(this.seq+=1,typeof e=="string"&&(e=Buffer.from(e,"utf8")),!Buffer.isBuffer(e))throw new Error("msg must be a string or buffer");let t=g.createCipheriv("aes-128-cbc",this.key,this.ivSeq()),s=Buffer.concat([t.update(e),t.final()]),r=Buffer.alloc(4);r.writeInt32BE(this.seq,0);let o=g.createHash("sha256");o.update(Buffer.concat([this.sig,r,s]));let n=o.digest();return {encrypted:Buffer.concat([n,s]),seq:this.seq}}decrypt(e){if(!Buffer.isBuffer(e))return e;let t=g.createDecipheriv("aes-128-cbc",this.key,this.ivSeq());return Buffer.concat([t.update(e.subarray(32)),t.final()]).toString("utf8")}keyDerive(e,t,s){let r=Buffer.concat([Buffer.from("lsk"),e,t,s]);return g.createHash("sha256").update(r).digest().subarray(0,16)}ivDerive(e,t,s){let r=Buffer.concat([Buffer.from("iv"),e,t,s]),o=g.createHash("sha256").update(r).digest(),n=o.subarray(-4).readInt32BE(0);return {iv:o.subarray(0,12),seq:n}}sigDerive(e,t,s){let r=Buffer.concat([Buffer.from("ldk"),e,t,s]);return g.createHash("sha256").update(r).digest().subarray(0,28)}ivSeq(){let e=Buffer.alloc(4);e.writeInt32BE(this.seq,0);let t=Buffer.concat([this.iv,e]);if(t.length!==16)throw new Error("Length of iv is not 16");return t}};var S=class S{constructor(e){this._baseUrl="https://eu-wap.tplinkcloud.com/";this._config={rawEmail:"",rawPassword:"",email:"",password:"",authToken:null,timeout:1e4,httpTimeout:4e3};this._token="";this._devices=new Map;this.auth=async e=>{let t=e?.email||this._config.email,s=e?.password||this._config.password;if(!t||!s)throw new Error("Email and password are required for authentication");let r={method:"login",params:{appType:"Tapo_Ios",cloudPassword:s,cloudUserName:t,terminalUUID:uuidv4()}},o=await C({method:"post",url:this._baseUrl,data:r});return m(o.data),this._token=o.data.result.token,this._token};this.setup=async(e,t)=>{let s=e.map(async o=>{let n=await this.handshake(o.host,void 0,!1,t);this._devices.set(o.id,n);}),r=[];try{r=await Promise.allSettled(s);}catch(o){console.error("tapo cloud setup err: ",o);}return {responses:r,devices:this._devices}};this.sendState=async e=>{let t=this._devices.get(e.device.id);if(!t)return Promise.resolve(!1);await this.handshake(t?.ip,t,!1);let s=e.state.getValues(),r=JSON.stringify({method:"set_device_info",params:s}),o=t.cipher.encrypt(r);if((await this.sessionPost(t.ip,"/request",o.encrypted,"arraybuffer",t.Cookie,{seq:o.seq.toString()})).status!==200)throw new Error("[KLAP] Request failed");return !0};this.sendPower=async e=>this.sendState({device:e.device,state:new w({on:e.power})});this.axiosInstance=C.create(),this.axiosInstance.defaults.timeout=e?.httpTimeout||4e3,this._config={...this._config,...e},this._config.rawEmail=this._config.email,this._config.rawPassword=this._config.password,this._config.email=b.toBase64(b.encodeUsername(this._config.email)),this._config.password=b.toBase64(this._config.password),this.terminalUUID=g.randomUUID();}async sessionPost(e,t,s,r,o,n){let a={Accept:"*/*","Content-Type":"application/octet-stream"};return o&&(process?.versions?.electron?a.BypassCookie=o:a.Cookie=o),C.post(`http://${e}/app${t}`,s,{responseType:r,params:n,headers:a,httpAgent:new Le.Agent({keepAlive:!1})})}needsNewHandshake(e){return !!(!e||!e.cipher||e.IsExpired||!e.Cookie)}async handshake(e,t,s=!1,r){if(!this.needsNewHandshake(t)&&!s)return;let{localSeed:o,remoteSeed:n,authHash:a,deviceSession:c}=await this.firstHandshake(e,void 0,r);return await this.secondHandshake(c,e,o,n,a,r)}async firstHandshake(e,t,s){let r=t||g.randomBytes(16),o=await this.sessionPost(e,"/handshake1",r,"arraybuffer");if(s?.debug("handshake1Result: ",o),o.status!==200)throw new Error("Handshake1 failed");if(o.headers["content-length"]!=="48")throw new Error("Handshake1 failed due to invalid content length");let n=o.headers["bypass-cookie"]||o.headers["set-cookie"]?.[0],a=Buffer.from(new Uint8Array(o.data)),[c,f]=n.split(";"),d=f.split("=").pop(),y=new q(d,e,c),p=a.subarray(0,16),h=a.subarray(16);s?.debug(`[KLAP] First handshake decoded successfully:
|
|
11
|
-
Remote Seed:`,p.toString("hex"),`
|
|
12
|
-
Server Hash:`,h.toString("hex"),`
|
|
13
|
-
Cookie:`,c);let u=this.hashAuth(this._config.rawEmail,this._config.rawPassword),l=this.sha256(Buffer.concat([r,p,u]));if(Buffer.compare(l,h)===0)return s?.debug("[KLAP] Local auth hash matches server hash"),{localSeed:r,remoteSeed:p,authHash:u,deviceSession:y};let B=this.sha256(Buffer.concat([r,p,this.hashAuth("","")]));if(Buffer.compare(B,h)===0)return s?.debug("[KLAP] [WARN] Empty auth hash matches server hash"),{localSeed:r,remoteSeed:p,authHash:B,deviceSession:y};let _=this.sha256(Buffer.concat([r,p,this.hashAuth(S.TP_TEST_USER,S.TP_TEST_PASSWORD)]));if(Buffer.compare(_,h)===0)return s?.debug("[KLAP] [WARN] Test auth hash matches server hash"),{localSeed:r,remoteSeed:p,authHash:_,deviceSession:y};throw new Error("Failed to verify server hash")}async secondHandshake(e,t,s,r,o,n){let a=this.sha256(Buffer.concat([r,s,o]));try{let c=await this.sessionPost(t,"/handshake2",a,"text",e.Cookie);if(c.status===200)return n?.debug("[KLAP] Second handshake successful"),e.completeHandshake(t,new E(s,r,o));n.warn("[KLAP] Second handshake failed",c.data);}catch(c){n.error("[KLAP] Second handshake failed:",c.response.data||c.message);}}sha256(e){return g.createHash("sha256").update(e).digest()}sha1(e){return g.createHash("sha1").update(e).digest()}hashAuth(e,t){return this.sha256(Buffer.concat([this.sha1(Buffer.from(e.normalize("NFKC"))),this.sha1(Buffer.from(t.normalize("NFKC")))]))}};S.TP_TEST_USER="test@tp-link.net",S.TP_TEST_PASSWORD="test";var T=S,q=class i{constructor(e,t,s,r){this.ip=t;this.cookie=s;this.cipher=r;this.handshakeCompleted=!1;this.rawTimeout=e,this.expireAt=new Date(Date.now()+parseInt(e)*1e3),r&&(this.handshakeCompleted=!0);}get IsExpired(){return this.expireAt.getTime()-Date.now()<=40*1e3}get Cookie(){return this.cookie}completeHandshake(e,t){return new i(this.rawTimeout,e,this.cookie,t)}};var Ce=["84:d8:1b","78:8c:b5","cc:ba:bd","e4:fa:c4","ac:84:c6","50:c7:bf"],He=5,U=i=>(i||"").replace(/[^a-fA-F0-9]/g,"").toLowerCase(),Ke=i=>{let e=U(i);return e.length!==12?(i||"").toLowerCase():e.match(/.{1,2}/g)?.join(":")||(i||"").toLowerCase()},qe=i=>{let e=(i||"").toLowerCase();return Ce.some(t=>e.startsWith(t))},Ue=async i=>{let e=U(i),t=Ke(i),s=0;for(;s<=He;){try{let n=await xe.toIP(t);if(n)return n}catch{}let o=(await ie({skipNameResolution:!0})).find(n=>U(n.mac)===e);if(o?.ip)return o.ip;s++;}},Oe=async i=>{let e=await ie({skipNameResolution:!0}),{email:t,password:s}=i;return e.filter(r=>qe(r.mac)).map(r=>({ip:r.ip,mac:r.mac,loginDevice:async()=>{let o=new k({email:t,password:s}),n=await o.auth(r.ip,{email:t,password:s});if(!n.success.includes(r.ip)){let a=n.failed.find(c=>c.ip===r.ip);throw new Error(a?.error||`Failed to authenticate with device ${r.ip}`)}return o}}))},$e=async i=>{let e=new T(i),t=i.token;!t&&i.email&&i.password&&(t=await e.auth({email:i.email,password:i.password}));let s={method:"getDeviceList"},r=await C({method:"post",url:`${e._baseUrl}?token=${t}`,data:s});m(r.data);let o=[];for(let n of r.data.result?.deviceList||[]){if(!n.ip){let a=await Ue(n.deviceMac);if(!a)continue;n.ip=a;}switch(n.deviceType){case"IOT.SMARTBULB":case"SMART.TAPOBULB":{if(i.types&&!i.types.includes(ILumiaDeviceType.LIGHT))continue;let a=n.deviceType==="SMART.TAPOBULB",c=(a?R(n.alias):n.alias)??n.deviceName;o.push({name:c,id:n.deviceMac,address:`http://${n.ip}`,host:n.ip,lumiaInfo:{alias:c,identifier:n.deviceMac,serial:n.hwId,lumiaType:ILumiaDeviceType.LIGHT,zonable:!1,maxZones:1,zones:[],rgb:!0,white:!0,connectionType:ILumiaDeviceConnectionType.WIFI,brand:a?ILumiaDeviceBrands.TPLINK:ILumiaDeviceBrands.TPLINK,product:n?.deviceModel}});break}case"IOT.SMARTPLUGSWITCH":case"SMART.TAPOPLUG":{if(i.types&&!i.types.includes(ILumiaDeviceType.PLUG))continue;let a=n.deviceType==="SMART.TAPOPLUG",c=(a?R(n.alias):n.alias)??n.deviceName;o.push({name:c,id:n.deviceMac,address:`http://${n.ip}`,host:n.ip,lumiaInfo:{alias:c,identifier:n.deviceMac,serial:n.hwId,lumiaType:ILumiaDeviceType.PLUG,zonable:!1,maxZones:0,zones:[],rgb:!1,white:!1,connectionType:ILumiaDeviceConnectionType.WIFI,brand:a?ILumiaDeviceBrands.TPLINK:ILumiaDeviceBrands.TPLINK,product:n?.deviceModel}});break}}}return o},Me=$e;var ne={};ce(ne,{DeviceResTypes:()=>Ge,DeviceSendValues:()=>Fe,ETapoDeviceTypes:()=>oe,TapoDeviceTypes:()=>Ne});var Ne={ALL:"all",BULBS:"bulb",LIGHTSTRIPS:"lightstrip",PLUGS:"plug"},oe=(r=>(r.ALL="all",r.BULBS="bulb",r.LIGHTSTRIPS="lightstrip",r.PLUGS="plug",r))(oe||{}),Ge={BULB:"IOT.SMARTPLUGSWITCH",PLUG:"IOT.SMARTPLUGSWITCH"},Fe={BULB:"smartlife.iot.smartbulb.lightingservice",LIGHTSTRIP:"smartlife.iot.lightStrip",PLUG:"system"};
|
|
14
|
-
|
|
15
|
-
export { w as LightState, k as TapoApi, T as TapoCloudApi, ne as TapoConstants, Me as discover, Oe as discoverLocalDevices };
|
|
1
|
+
const a1aA=a1d;(function(a,b){const a1c4={a:0x168,b:0x1b1,c:0x101,d:0xba,e:0x193},ax=a1d,c=a();while(!![]){try{const d=parseInt(ax(0x11c))/0x1*(parseInt(ax(0x130))/0x2)+parseInt(ax(0x15f))/0x3*(parseInt(ax(a1c4.a))/0x4)+parseInt(ax(a1c4.b))/0x5+parseInt(ax(a1c4.c))/0x6+-parseInt(ax(0xfb))/0x7*(-parseInt(ax(a1c4.d))/0x8)+parseInt(ax(a1c4.e))/0x9*(parseInt(ax(0xec))/0xa)+-parseInt(ax(0xca))/0xb;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a1c,0xa2fae));function a1c(){const dI=['\x73\x65\x6e\x64\x50\x6f\x77\x65\x72','\x72\x65\x70\x6c\x61\x63\x65','\x67\x65\x74\x5f\x64\x65\x76\x69\x63\x65\x5f\x69\x6e\x66\x6f','\x73\x69\x67','\x74\x61\x62\x6c\x65','\x5f\x67\x65\x74\x4f\x72\x43\x72\x65\x61\x74\x65\x53\x65\x73\x73\x69\x6f\x6e','\x6c\x6f\x67\x69\x6e','\x74\x61\x70\x6f\x2d','\x4e\x6f\x20\x73\x65\x73\x73\x69\x6f\x6e\x20\x66\x6f\x75\x6e\x64\x20\x66\x6f\x72\x20\x64\x65\x76\x69\x63\x65\x20','\x74\x79\x70\x65\x73','\x49\x6e\x76\x61\x6c\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74\x20\x6f\x72\x20\x63\x72\x65\x64\x65\x6e\x74\x69\x61\x6c\x73','\x35\x30\x3a\x63\x37\x3a\x62\x66','\x73\x65\x73\x73\x69\x6f\x6e\x43\x6f\x6f\x6b\x69\x65','\x6c\x64\x6b','\x72\x73\x61','\x38\x34\x3a\x64\x38\x3a\x31\x62','\x6f\x77\x6e\x65\x72','\x5f\x76\x61\x6c\x75\x65\x73','\x63\x61\x74\x63\x68','\x6a\x6f\x69\x6e','\x70\x65\x6d','\x31\x31\x32\x33\x39\x37\x30\x7a\x52\x61\x70\x62\x4a','\x67\x65\x6e\x65\x72\x61\x74\x65\x4b\x65\x79\x50\x61\x69\x72','\x64\x65\x76\x69\x63\x65\x4d\x6f\x64\x65\x6c','\x74\x6f\x6b\x65\x6e','\x63\x6f\x6e\x74\x72\x6f\x6c\x5f\x63\x68\x69\x6c\x64','\x42\x55\x4c\x42\x53','\x7b\x7d\x2e\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72\x28\x22\x72\x65\x74\x75\x72\x6e\x20\x74\x68\x69\x73\x22\x29\x28\x20\x29','\x6d\x6f\x64\x65\x6c','\x73\x65\x74\x2d\x63\x6f\x6f\x6b\x69\x65','\x5b\x4b\x4c\x41\x50\x5d\x20\x53\x65\x63\x6f\x6e\x64\x20\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x20\x66\x61\x69\x6c\x65\x64\x3a','\x63\x72\x65\x61\x74\x65','\x6e\x6f\x72\x6d\x61\x6c','\x64\x65\x76\x69\x63\x65\x4d\x61\x63','\x74\x6f\x70\x20\x73\x65\x63\x72\x65\x74','\x63\x6f\x6e\x73\x6f\x6c\x65','\x34\x32\x34\x32\x4d\x6c\x57\x78\x59\x4c','\x74\x65\x72\x6d\x69\x6e\x61\x6c\x55\x55\x49\x44','\x5f\x5f\x70\x72\x6f\x74\x6f\x5f\x5f','\x6e\x6f\x72\x6d\x61\x6c\x69\x7a\x65','\x63\x69\x70\x68\x65\x72','\x5b\x74\x61\x70\x6f\x5d\x20\x73\x74\x61\x72\x74\x69\x6e\x67\x20\x55\x44\x50\x20\x64\x69\x73\x63\x6f\x76\x65\x72\x79','\x36\x30\x38\x31\x37\x32\x30\x6f\x54\x54\x6c\x7a\x6e','\x46\x61\x69\x6c\x65\x64\x20\x74\x6f\x20\x76\x65\x72\x69\x66\x79\x20\x73\x65\x72\x76\x65\x72\x20\x68\x61\x73\x68','\x74\x69\x6d\x65\x6f\x75\x74\x4d\x73','\x73\x75\x6d','\x74\x65\x78\x74','\x37\x38\x3a\x38\x63\x3a\x62\x35','\x62\x69\x6e\x64','\x62\x72\x69\x67\x68\x74\x6e\x65\x73\x73','\x4c\x49\x47\x48\x54','\x63\x6c\x6f\x73\x65','\x68\x65\x61\x64\x65\x72\x73','\x76\x65\x72\x73\x69\x6f\x6e\x73','\x50\x33\x30\x30','\x73\x75\x63\x63\x65\x73\x73','\x73\x65\x74\x5f\x64\x65\x76\x69\x63\x65\x5f\x69\x6e\x66\x6f','\x72\x65\x74\x75\x72\x6e\x20\x28\x66\x75\x6e\x63\x74\x69\x6f\x6e\x28\x29\x20','\x50\x4c\x55\x47','\x73\x65\x6e\x64','\x6d\x73\x67','\x68\x75\x65','\x70\x61\x73\x73\x77\x6f\x72\x64','\x64\x61\x74\x61','\x2f\x61\x70\x70','\x67\x65\x74','\x67\x65\x74\x53\x65\x73\x73\x69\x6f\x6e\x44\x61\x74\x61','\x5b\x74\x61\x70\x6f\x5d\x20\x6d\x75\x6c\x74\x69\x2d\x73\x6f\x63\x6b\x65\x74\x20\x64\x65\x74\x65\x63\x74\x65\x64','\x2f\x72\x65\x71\x75\x65\x73\x74','\x32\x72\x72\x47\x71\x48\x53','\x6d\x67\x74\x5f\x65\x6e\x63\x72\x79\x70\x74\x5f\x73\x63\x68\x6d','\x6d\x6f\x64\x65','\x63\x6f\x6d\x70\x61\x72\x65','\x73\x69\x67\x44\x65\x72\x69\x76\x65','\x2f\x61\x70\x70\x3f\x74\x6f\x6b\x65\x6e\x3d','\x66\x72\x6f\x6d','\x65\x6e\x63\x72\x79\x70\x74','\x73\x65\x6e\x64\x53\x74\x61\x74\x65','\x62\x72\x69','\x72\x65\x73\x75\x6c\x74','\x65\x6d\x61\x69\x6c','\x68\x61\x73\x4f\x77\x6e\x50\x72\x6f\x70\x65\x72\x74\x79','\x61\x78\x69\x6f\x73\x49\x6e\x73\x74\x61\x6e\x63\x65','\x5f\x66\x65\x74\x63\x68\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73','\x63\x6f\x6e\x73\x74\x61\x6e\x74\x73','\x61\x65\x73\x2d\x32\x35\x36\x2d\x63\x62\x63','\x74\x75\x72\x6e\x4f\x66\x66','\x6d\x65\x73\x73\x61\x67\x65','\x64\x65\x76\x69\x63\x65\x5f\x6f\x6e','\x33\x38\x33\x38\x33\x34\x42\x76\x58\x66\x69\x78','\x68\x73\x76','\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x5f\x6e\x65\x67\x6f','\x74\x65\x73\x74','\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79','\x74\x6f\x4c\x6f\x77\x65\x72\x43\x61\x73\x65','\x74\x75\x72\x6e\x4f\x6e','\x66\x69\x72\x73\x74\x48\x61\x6e\x64\x73\x68\x61\x6b\x65','\x66\x77\x5f\x76\x65\x72','\x5b\x4b\x4c\x41\x50\x5d\x20\x5b\x57\x41\x52\x4e\x5d\x20\x54\x65\x73\x74\x20\x61\x75\x74\x68\x20\x68\x61\x73\x68\x20\x6d\x61\x74\x63\x68\x65\x73\x20\x73\x65\x72\x76\x65\x72\x20\x68\x61\x73\x68','\x61\x64\x64\x72\x65\x73\x73','\x69\x76\x44\x65\x72\x69\x76\x65','\x64\x65\x63\x72\x79\x70\x74','\x6c\x6f\x67\x69\x6e\x44\x65\x76\x69\x63\x65\x42\x79\x49\x70','\x63\x6f\x6e\x63\x61\x74','\x68\x77\x49\x64','\x54\x61\x70\x6f\x20\x44\x65\x76\x69\x63\x65\x20\x28','\x45\x6d\x61\x69\x6c\x20\x61\x6e\x64\x20\x70\x61\x73\x73\x77\x6f\x72\x64\x20\x61\x72\x65\x20\x72\x65\x71\x75\x69\x72\x65\x64\x20\x66\x6f\x72\x20\x61\x75\x74\x68\x65\x6e\x74\x69\x63\x61\x74\x69\x6f\x6e','\x53\x4d\x41\x52\x54\x2e\x54\x41\x50\x4f\x50\x4c\x55\x47','\x50\x32\x31\x30\x4d','\x44\x65\x76\x69\x63\x65\x20\x49\x50\x20\x61\x64\x64\x72\x65\x73\x73\x28\x65\x73\x29\x20\x72\x65\x71\x75\x69\x72\x65\x64\x20\x66\x6f\x72\x20\x61\x75\x74\x68\x65\x6e\x74\x69\x63\x61\x74\x69\x6f\x6e','\x68\x61\x73\x44\x65\x76\x69\x63\x65\x53\x65\x73\x73\x69\x6f\x6e','\x2e\x20\x50\x6c\x65\x61\x73\x65\x20\x61\x75\x74\x68\x65\x6e\x74\x69\x63\x61\x74\x65\x20\x66\x69\x72\x73\x74\x2e','\x64\x69\x67\x65\x73\x74','\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72\x69\x76','\x65\x34\x3a\x66\x61\x3a\x63\x34','\x5f\x62\x75\x69\x6c\x64\x54\x61\x70\x6f\x46\x72\x6f\x6d\x44\x65\x76\x69\x63\x65\x49\x6e\x66\x6f','\x55\x6e\x6b\x6e\x6f\x77\x6e\x20\x65\x72\x72\x6f\x72','\x73\x65\x73\x73\x69\x6f\x6e\x50\x6f\x73\x74','\x74\x6f\x53\x74\x72\x69\x6e\x67','\x68\x74\x74\x70\x3a\x2f\x2f','\x70\x75\x73\x68','\x70\x75\x62\x6c\x69\x63\x4b\x65\x79','\x32\x35\x35\x2e\x32\x35\x35\x2e\x32\x35\x35\x2e\x32\x35\x35','\x61\x65\x73\x2d\x31\x32\x38\x2d\x63\x62\x63','\x49\x6e\x76\x61\x6c\x69\x64\x20\x74\x65\x72\x6d\x69\x6e\x61\x6c\x20\x55\x55\x49\x44','\x68\x74\x74\x70\x73\x3a\x2f\x2f\x65\x75\x2d\x77\x61\x70\x2e\x74\x70\x6c\x69\x6e\x6b\x63\x6c\x6f\x75\x64\x2e\x63\x6f\x6d\x2f','\x68\x74\x74\x70\x5f\x70\x6f\x72\x74','\x73\x75\x62\x61\x72\x72\x61\x79','\x69\x73\x42\x75\x66\x66\x65\x72','\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x32\x20\x66\x61\x69\x6c\x65\x64\x3a\x20','\x74\x65\x73\x74\x40\x74\x70\x2d\x6c\x69\x6e\x6b\x2e\x6e\x65\x74','\x70\x6f\x77\x65\x72','\x61\x75\x74\x68','\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x31\x52\x65\x73\x75\x6c\x74\x3a\x20','\x61\x6c\x69\x61\x73','\x57\x49\x46\x49','\x31\x39\x39\x35\x57\x49\x4b\x6b\x68\x5a','\x63\x72\x65\x61\x74\x65\x48\x61\x73\x68','\x66\x75\x6e\x63\x74\x69\x6f\x6e','\x2d\x73\x6c\x6f\x74\x2d','\x74\x65\x6d\x70','\x64\x65\x76\x69\x63\x65\x5f\x69\x64','\x68\x61\x6e\x64\x73\x68\x61\x6b\x65','\x65\x78\x63\x65\x70\x74\x69\x6f\x6e','\x6b\x65\x79\x73','\x38\x38\x34\x64\x56\x6e\x6a\x73\x75','\x73\x61\x74\x75\x72\x61\x74\x69\x6f\x6e','\x64\x65\x76\x69\x63\x65\x4c\x69\x73\x74','\x61\x6c\x6c','\x41\x4c\x4c','\x5f\x66\x65\x74\x63\x68\x43\x68\x69\x6c\x64\x44\x65\x76\x69\x63\x65\x4c\x69\x73\x74','\x69\x76\x53\x65\x71','\x3b\x20\x4c\x65\x67\x61\x63\x79\x20\x65\x72\x72\x6f\x72\x3a\x20','\x73\x70\x6b\x69','\x3f\x74\x6f\x6b\x65\x6e\x3d','\x49\x4f\x54\x2e\x53\x4d\x41\x52\x54\x48\x55\x42','\x73\x61\x74','\x5b\x74\x61\x70\x6f\x5d\x20\x64\x69\x73\x63\x6f\x76\x65\x72\x79\x20\x73\x65\x6e\x64\x20\x66\x61\x69\x6c\x65\x64','\x6e\x69\x63\x6b\x6e\x61\x6d\x65','\x5b\x74\x61\x70\x6f\x5d\x20\x64\x69\x73\x63\x6f\x76\x65\x72\x79\x20\x72\x65\x73\x70\x6f\x6e\x73\x65\x20\x63\x6f\x75\x6c\x64\x20\x6e\x6f\x74\x20\x62\x65\x20\x70\x61\x72\x73\x65\x64\x20\x61\x73\x20\x4a\x53\x4f\x4e\x20\x28\x6c\x69\x6b\x65\x6c\x79\x20\x65\x6e\x63\x72\x79\x70\x74\x65\x64\x20\x62\x6f\x64\x79\x29','\x65\x72\x72\x6f\x72','\x54\x50\x4c\x49\x4e\x4b','\x74\x79\x70\x65','\x72\x61\x77\x50\x61\x73\x73\x77\x6f\x72\x64','\x64\x65\x76\x69\x63\x65','\x6d\x61\x63','\x73\x65\x63\x6f\x6e\x64\x48\x61\x6e\x64\x73\x68\x61\x6b\x65','\x6e\x65\x65\x64\x73\x4e\x65\x77\x48\x61\x6e\x64\x73\x68\x61\x6b\x65','\x5b\x4b\x4c\x41\x50\x5d\x20\x53\x65\x63\x6f\x6e\x64\x20\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6c','\x6c\x6f\x67','\x6c\x73\x6b','\x68\x6f\x73\x74','\x67\x65\x74\x44\x65\x76\x69\x63\x65\x73\x42\x79\x49\x70','\x67\x65\x74\x56\x61\x6c\x75\x65\x73','\x6d\x73\x67\x20\x6d\x75\x73\x74\x20\x62\x65\x20\x61\x20\x73\x74\x72\x69\x6e\x67\x20\x6f\x72\x20\x62\x75\x66\x66\x65\x72','\x72\x67\x62','\x4a\x53\x4f\x4e\x20\x66\x6f\x72\x6d\x61\x74\x20\x65\x72\x72\x6f\x72','\x66\x61\x69\x6c\x65\x64','\x70\x61\x72\x73\x65','\x49\x73\x45\x78\x70\x69\x72\x65\x64','\x2f\x61\x70\x70\x2f\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x32','\x44\x65\x76\x69\x63\x65\x20\x74\x6f\x6b\x65\x6e\x20\x65\x78\x70\x69\x72\x65\x64\x20\x6f\x72\x20\x69\x6e\x76\x61\x6c\x69\x64','\x5f\x63\x6f\x6e\x66\x69\x67','\x65\x6c\x65\x63\x74\x72\x6f\x6e','\x5b\x74\x61\x70\x6f\x5d\x20\x64\x69\x73\x63\x6f\x76\x65\x72\x79\x20\x66\x69\x6e\x69\x73\x68\x65\x64','\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68','\x2f\x61\x70\x70\x2f\x72\x65\x71\x75\x65\x73\x74','\x72\x61\x6e\x64\x6f\x6d\x55\x55\x49\x44','\x37\x32\x72\x44\x51\x69\x59\x72','\x52\x53\x41\x5f\x50\x4b\x43\x53\x31\x5f\x50\x41\x44\x44\x49\x4e\x47','\x43\x6c\x6f\x75\x64\x20\x74\x6f\x6b\x65\x6e\x20\x65\x78\x70\x69\x72\x65\x64\x20\x6f\x72\x20\x69\x6e\x76\x61\x6c\x69\x64','\x30\x32\x30\x30\x30\x30\x30\x31\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x34\x36\x33\x63\x62\x35\x64\x33','\x77\x72\x69\x74\x65\x49\x6e\x74\x33\x32\x42\x45','\x54\x61\x70\x6f\x20\x44\x65\x76\x69\x63\x65','\x64\x65\x6c\x65\x74\x65','\x75\x70\x64\x61\x74\x65','\x61\x6c\x6c\x53\x65\x74\x74\x6c\x65\x64','\x62\x75\x6c\x62','\x5f\x64\x65\x76\x69\x63\x65\x53\x65\x73\x73\x69\x6f\x6e\x73','\x4c\x65\x6e\x67\x74\x68\x20\x6f\x66\x20\x69\x76\x20\x69\x73\x20\x6e\x6f\x74\x20\x31\x36','\x75\x74\x66\x38','\x70\x72\x69\x76\x61\x74\x65\x4b\x65\x79','\x70\x6f\x73\x74','\x6c\x69\x67\x68\x74\x73\x74\x72\x69\x70','\x64\x65\x66\x61\x75\x6c\x74\x73','\x54\x50\x5f\x54\x45\x53\x54\x5f\x55\x53\x45\x52','\x6d\x61\x70','\x75\x64\x70\x34','\x69\x6e\x64\x65\x78\x4f\x66','\x6c\x65\x6e\x67\x74\x68','\x63\x6f\x6c\x6f\x72\x54\x65\x6d\x70\x65\x72\x61\x74\x75\x72\x65','\x73\x68\x61\x32\x35\x36','\x63\x6f\x6f\x6b\x69\x65','\x65\x78\x70\x69\x72\x65\x41\x74','\x73\x6f\x6d\x65','\x48\x61\x6e\x64\x73\x68\x61\x6b\x65\x31\x20\x66\x61\x69\x6c\x65\x64','\x65\x78\x70\x6f\x72\x74','\x74\x72\x61\x63\x65','\x35\x38\x34\x33\x36\x38\x35\x75\x43\x6c\x6f\x6f\x4e','\x70\x6f\x70','\x62\x61\x73\x65\x36\x34','\x2a\x2f\x2a','\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e\x5f\x70\x65\x72\x69\x6f\x64','\x44\x65\x76\x69\x63\x65\x20\x74\x6f\x6b\x65\x6e\x20\x65\x78\x70\x69\x72\x65\x64','\x73\x6c\x69\x63\x65','\x4b\x6c\x61\x70\x20\x70\x72\x6f\x74\x6f\x63\x6f\x6c\x20\x6e\x6f\x74\x20\x73\x75\x70\x70\x6f\x72\x74\x65\x64','\x5f\x69\x73\x4b\x6e\x6f\x77\x6e\x4d\x75\x6c\x74\x69\x53\x6f\x63\x6b\x65\x74\x4d\x6f\x64\x65\x6c','\x73\x69\x7a\x65','\x4c\x49\x47\x48\x54\x53\x54\x52\x49\x50\x53','\x73\x68\x61\x31','\x74\x61\x70\x6f\x20\x63\x6c\x6f\x75\x64\x20\x73\x65\x74\x75\x70\x20\x65\x72\x72\x3a\x20','\x76\x65\x72\x5f\x63\x6f\x64\x65','\x63\x6f\x6e\x74\x65\x6e\x74\x2d\x6c\x65\x6e\x67\x74\x68','\x61\x72\x72\x61\x79\x62\x75\x66\x66\x65\x72','\x5f\x74\x6f\x6b\x65\x6e','\x72\x65\x73\x70\x6f\x6e\x73\x65','\x63\x6f\x6c\x6f\x72\x5f\x74\x65\x6d\x70','\x64\x65\x76\x69\x63\x65\x4b\x65\x79','\x49\x4f\x54\x2e\x53\x4d\x41\x52\x54\x50\x4c\x55\x47\x53\x57\x49\x54\x43\x48','\x5b\x4b\x4c\x41\x50\x5d\x20\x52\x65\x71\x75\x65\x73\x74\x20\x66\x61\x69\x6c\x65\x64','\x54\x41\x50\x4f','\x69\x6e\x66\x6f','\x66\x69\x6e\x64','\x6e\x75\x6d\x62\x65\x72','\x73\x75\x62\x73\x74\x72\x69\x6e\x67','\x2e\x20\x4b\x4c\x41\x50\x20\x65\x72\x72\x6f\x72\x3a\x20','\x70\x72\x69\x76\x61\x74\x65\x44\x65\x63\x72\x79\x70\x74','\x73\x65\x63\x75\x72\x65\x50\x61\x73\x73\x74\x68\x72\x6f\x75\x67\x68','\x63\x72\x65\x61\x74\x65\x4b\x65\x79\x50\x61\x69\x72','\x5b\x4b\x4c\x41\x50\x5d\x20\x53\x65\x63\x6f\x6e\x64\x20\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x20\x66\x61\x69\x6c\x65\x64','\x61\x70\x70\x6c\x79','\x55\x6e\x6b\x6e\x6f\x77\x6e\x20\x4d\x6f\x64\x65\x6c','\x2f\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x31','\x6c\x6f\x67\x69\x6e\x5f\x64\x65\x76\x69\x63\x65','\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x43\x6f\x6d\x70\x6c\x65\x74\x65\x64','\x67\x65\x74\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73','\x73\x6d\x61\x72\x74\x6c\x69\x66\x65\x2e\x69\x6f\x74\x2e\x73\x6d\x61\x72\x74\x62\x75\x6c\x62\x2e\x6c\x69\x67\x68\x74\x69\x6e\x67\x73\x65\x72\x76\x69\x63\x65','\x5b\x4b\x4c\x41\x50\x5d\x20\x4c\x6f\x63\x61\x6c\x20\x61\x75\x74\x68\x20\x68\x61\x73\x68\x20\x6d\x61\x74\x63\x68\x65\x73\x20\x73\x65\x72\x76\x65\x72\x20\x68\x61\x73\x68','\x70\x6c\x75\x67','\x46\x61\x69\x6c\x65\x64\x20\x74\x6f\x20\x61\x75\x74\x68\x65\x6e\x74\x69\x63\x61\x74\x65\x20\x77\x69\x74\x68\x20\x64\x65\x76\x69\x63\x65\x20\x61\x74\x20','\x69\x6e\x63\x6c\x75\x64\x65\x73','\x5f\x62\x61\x73\x65\x55\x72\x6c','\x50\x33\x30\x34','\x54\x50\x5f\x54\x45\x53\x54\x5f\x50\x41\x53\x53\x57\x4f\x52\x44','\x67\x65\x74\x44\x65\x76\x69\x63\x65\x49\x6e\x66\x6f\x42\x79\x49\x70','\x68\x61\x73','\x69\x73\x41\x72\x72\x61\x79','\x61\x6c\x6c\x6f\x63','\x72\x65\x61\x64\x49\x6e\x74\x33\x32\x42\x45','\x65\x72\x72\x6f\x72\x5f\x63\x6f\x64\x65','\x65\x6d\x61\x69\x6c\x20\x6f\x72\x20\x70\x61\x73\x73\x77\x6f\x72\x64\x20\x69\x6e\x63\x6f\x72\x72\x65\x63\x74','\x43\x6f\x6f\x6b\x69\x65','\x66\x69\x6c\x74\x65\x72','\x66\x6f\x72\x45\x61\x63\x68','\x73\x74\x61\x74\x75\x73','\x64\x75\x72\x61\x74\x69\x6f\x6e','\x65\x6e\x63\x72\x79\x70\x74\x5f\x74\x79\x70\x65','\x64\x65\x76\x69\x63\x65\x4e\x61\x6d\x65','\x68\x65\x78','\x65\x6e\x63\x72\x79\x70\x74\x65\x64','\x73\x74\x72\x69\x6e\x67\x69\x66\x79','\x73\x65\x74','\x70\x6b\x63\x73\x31','\x6f\x62\x6a\x65\x63\x74','\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72','\x63\x72\x65\x61\x74\x65\x43\x69\x70\x68\x65\x72\x69\x76','\x72\x61\x77\x54\x69\x6d\x65\x6f\x75\x74','\x6f\x66\x66','\x66\x69\x6e\x61\x6c','\x74\x6f\x55\x70\x70\x65\x72\x43\x61\x73\x65','\x77\x61\x72\x6e','\x63\x72\x65\x61\x74\x65\x53\x6f\x63\x6b\x65\x74','\x73\x65\x74\x75\x70','\x50\x4c\x55\x47\x53','\x68\x61\x73\x68\x41\x75\x74\x68','\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x31\x20\x66\x61\x69\x6c\x65\x64\x3a\x20','\x46\x61\x69\x6c\x65\x64\x20\x74\x6f\x20\x6c\x6f\x67\x69\x6e\x20\x74\x6f\x20\x64\x65\x76\x69\x63\x65\x20\x61\x74\x20','\x63\x6f\x6d\x70\x6c\x65\x74\x65\x48\x61\x6e\x64\x73\x68\x61\x6b\x65','\x73\x65\x71','\x33\x31\x34\x34\x53\x52\x66\x56\x57\x45','\x20\x61\x66\x74\x65\x72\x20\x61\x75\x74\x68\x65\x6e\x74\x69\x63\x61\x74\x69\x6f\x6e\x2e','\x5f\x64\x65\x76\x69\x63\x65\x73','\x75\x74\x66\x2d\x38','\x64\x65\x76\x69\x63\x65\x54\x79\x70\x65','\x64\x67\x72\x61\x6d','\x4e\x46\x4b\x43','\x53\x4d\x41\x52\x54\x2e\x54\x41\x50\x4f\x42\x55\x4c\x42','\x64\x65\x62\x75\x67','\x68\x77\x5f\x69\x64','\x72\x61\x77\x45\x6d\x61\x69\x6c','\x6d\x61\x74\x63\x68','\x54\x61\x70\x6f\x5f\x49\x6f\x73','\x50\x33\x31\x36','\x64\x65\x76\x69\x63\x65\x5f\x6d\x6f\x64\x65\x6c','\x61\x70\x70\x6c\x69\x63\x61\x74\x69\x6f\x6e\x2f\x6f\x63\x74\x65\x74\x2d\x73\x74\x72\x65\x61\x6d','\x33\x35\x30\x31\x32\x31\x36\x34\x7a\x43\x6e\x75\x51\x75','\x49\x4f\x54\x2e\x53\x4d\x41\x52\x54\x42\x55\x4c\x42','\x6b\x65\x79','\x65\x6e\x63\x6f\x64\x65\x55\x73\x65\x72\x6e\x61\x6d\x65','\x46\x61\x69\x6c\x65\x64\x20\x74\x6f\x20\x61\x75\x74\x68\x65\x6e\x74\x69\x63\x61\x74\x65\x20\x77\x69\x74\x68\x20\x64\x65\x76\x69\x63\x65\x20','\x73\x70\x6c\x69\x74','\x6b\x65\x79\x44\x65\x72\x69\x76\x65','\x2f\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x32','\x68\x77\x5f\x76\x65\x72','\x62\x79\x70\x61\x73\x73\x2d\x63\x6f\x6f\x6b\x69\x65','\x68\x74\x74\x70\x54\x69\x6d\x65\x6f\x75\x74','\x73\x74\x72\x69\x6e\x67','\x73\x6d\x61\x72\x74\x6c\x69\x66\x65\x2e\x69\x6f\x74\x2e\x6c\x69\x67\x68\x74\x53\x74\x72\x69\x70'];a1c=function(){return dI;};return a1c();}const a1e=(function(){const a1c5={a:0x1d1};let a=!![];return function(b,c){const d=a?function(){const ay=a1d;if(c){const e=c[ay(a1c5.a)](b,arguments);return c=null,e;}}:function(){};return a=![],d;};}()),a1f=a1e(this,function(){const a1c9={a:0x110,b:0xfa,c:0xb1,d:0x166,e:0x1a8,f:0xab,g:0x14d},az=a1d;let a;try{const d=Function(az(a1c9.a)+az(0xf2)+'\x29\x3b');a=d();}catch(f){a=window;}const b=a[az(a1c9.b)]=a['\x63\x6f\x6e\x73\x6f\x6c\x65']||{},c=[az(0x180),az(a1c9.c),'\x69\x6e\x66\x6f',az(0x177),az(a1c9.d),az(0xdb),az(0x1b0)];for(let g=0x0;g<c[az(a1c9.e)];g++){const h=a1e[az(a1c9.f)]['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65'][az(0x107)](a1e),i=c[g],k=b[i]||h;h[az(0xfd)]=a1e[az(0x107)](a1e),h[az(0x14d)]=k[az(a1c9.g)]['\x62\x69\x6e\x64'](k),b[i]=h;}});a1f();import{ILumiaDeviceType,ILumiaDeviceConnectionType,ILumiaDeviceBrands}from'\x40\x6c\x75\x6d\x69\x61\x73\x74\x72\x65\x61\x6d\x2f\x6c\x75\x6d\x69\x61\x2d\x72\x67\x62\x2d\x74\x79\x70\x65\x73';import a1g from'\x61\x78\x69\x6f\x73';import a1h from'\x40\x6e\x65\x74\x77\x6f\x72\x6b\x2d\x75\x74\x69\x6c\x73\x2f\x61\x72\x70\x2d\x6c\x6f\x6f\x6b\x75\x70';import a1i from'\x6c\x6f\x63\x61\x6c\x2d\x64\x65\x76\x69\x63\x65\x73';import a1j,{randomBytes,createHash,createCipheriv,createDecipheriv}from'\x63\x72\x79\x70\x74\x6f';import a1k from'\x75\x74\x69\x6c';import{isFunction,isTruly,rgb2hsv,uuidv4}from'\x40\x6c\x75\x6d\x69\x61\x73\x74\x72\x65\x61\x6d\x2f\x6c\x75\x6d\x69\x61\x2d\x72\x67\x62\x2d\x75\x74\x69\x6c\x73';import a1l from'\x68\x74\x74\x70';import a1m from'\x64\x67\x72\x61\x6d';import{getBroadcastNetworkInterfaces}from'\x40\x6c\x75\x6d\x69\x61\x73\x74\x72\x65\x61\x6d\x2f\x6e\x65\x74\x77\x6f\x72\x6b\x2d\x63\x6f\x76\x65';var a1n=Object[a1aA(0x134)],a1o=(a,b)=>{for(var c in b)a1n(a,c,{'\x67\x65\x74':b[c],'\x65\x6e\x75\x6d\x65\x72\x61\x62\x6c\x65':!0x0});},a1p=a=>Buffer[a1aA(0x122)](a,a1aA(0x1b3))[a1aA(0x14d)](),a1q=a=>{const a1cb={a:0x153,b:0xe1,c:0x187,d:0x195,e:0x113},aB=a1aA;let b=a[aB(0x9c)];if(b)switch(console[aB(0xc2)]('\x5b\x54\x61\x70\x6f\x5d\x20\x65\x72\x72\x6f\x72\x43\x6f\x64\x65\x3a\x20',b),b){case 0x0:return;case-0x3f2:throw new Error('\x49\x6e\x76\x61\x6c\x69\x64\x20\x70\x75\x62\x6c\x69\x63\x20\x6b\x65\x79\x20\x6c\x65\x6e\x67\x74\x68');case-0x3f4:throw new Error(aB(a1cb.a));case-0x5dd:throw new Error(aB(a1cb.b));case-0x3ea:throw new Error('\x49\x6e\x63\x6f\x72\x72\x65\x63\x74\x20\x72\x65\x71\x75\x65\x73\x74');case-0x3eb:throw new Error(aB(a1cb.c));case-0x5079:throw new Error('\x49\x6e\x63\x6f\x72\x72\x65\x63\x74\x20\x65\x6d\x61\x69\x6c\x20\x6f\x72\x20\x70\x61\x73\x73\x77\x6f\x72\x64');case-0x50c3:throw new Error(aB(a1cb.d));case 0x270f:throw new Error(aB(0x18c));default:throw new Error('\x55\x6e\x65\x78\x70\x65\x63\x74\x65\x64\x20\x45\x72\x72\x6f\x72\x20\x43\x6f\x64\x65\x3a\x20'+b+'\x20\x28'+a[aB(a1cb.e)]+'\x29');}},a1r=class{constructor(){const a1cc={a:0xa2,b:0x184},aC=a1aA;this['\x5f\x76\x61\x6c\x75\x65\x73']={},this['\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e']=a=>(this[aC(0xe8)][aC(0x1b5)]=a,this),this[aC(a1cc.a)]=this['\x74\x72\x61\x6e\x73\x69\x74\x69\x6f\x6e'],this[aC(a1cc.b)]=()=>this['\x5f\x76\x61\x6c\x75\x65\x73'];}},a1s=class extends a1r{constructor(a){const a1cg={a:0x136,b:0x12d,c:0x11e,d:0x125,e:0x169,f:0x163,g:0x1a9,h:0xf6},a1cf={a:0x99},a1ce={a:0x99,b:0x173},aD=a1aA;super(),this['\x63\x72\x65\x61\x74\x65']=b=>(b&&Object[aD(0x167)](b)[aD(0xa0)](c=>{const aE=aD;let d;this[aE(0x128)](c)&&(d=this[c],isFunction(d)&&isTruly(b[c])&&d['\x61\x70\x70\x6c\x79'](this,[b[c]]));}),this),this['\x6f\x6e']=(b=!0x0)=>(this[aD(0xe8)][aD(0x12f)]=b,this),this[aD(a1cg.a)]=this['\x6f\x6e'],this[aD(0xae)]=()=>(this['\x6f\x6e'](!0x1),this),this[aD(a1cg.b)]=this['\x6f\x66\x66'],this[aD(a1cg.c)]=(b='\x6e\x6f\x72\x6d\x61\x6c')=>(b===aD(0xf7)&&(this[aD(0xe8)][aD(0x1c3)]=0x0),this[aD(0xe8)][aD(0x11e)]=b,this),this[aD(0x114)]=b=>(this[aD(0xe8)]['\x68\x75\x65']=b,this['\x5f\x76\x61\x6c\x75\x65\x73'][aD(0x1c3)]=0x0,this),this[aD(a1cg.d)]=b=>(this[aD(0xe8)][aD(0x108)]=b,this),this[aD(0x108)]=this[aD(0x125)],this[aD(0x173)]=b=>(this['\x5f\x76\x61\x6c\x75\x65\x73'][aD(0x169)]=b,this),this[aD(a1cg.e)]=this['\x73\x61\x74'],this[aD(a1cg.f)]=b=>(this[aD(0xe8)]['\x63\x6f\x6c\x6f\x72\x5f\x74\x65\x6d\x70']=b,this),this[aD(a1cg.g)]=this[aD(a1cg.f)],this[aD(0x131)]=b=>{const aF=aD;let c=[];return Array[aF(a1ce.a)](b)?c=b:c=[b['\x68'],b['\x73'],b['\x76']],this[aF(0x114)](c[0x0]),this[aF(a1ce.b)](c[0x1]),this['\x62\x72\x69'](c[0x2]),this;},this['\x72\x67\x62']=b=>{const aG=aD;let c;return Array[aG(a1cf.a)](b)?c=rgb2hsv(b):c=rgb2hsv([b['\x72'],b['\x67'],b['\x62']]),this[aG(0x131)](c);},this['\x63\x6f\x6c\x6f\x72']=b=>(Array['\x69\x73\x41\x72\x72\x61\x79'](b)&&(b={'\x72':b[0x0],'\x67':b[0x1],'\x62':b[0x2]}),b['\x63\x74']?this[aD(0x163)](b['\x63\x74']):this[aD(0x186)]({'\x72':b['\x72'],'\x67':b['\x67'],'\x62':b['\x62']})),a&&this[aD(a1cg.h)](a);}},a1t=a1aA(0x152),a1u=0xfa0,a1v=async(k,q,v)=>{const a1cj={a:0x1c0,b:0x10b,c:0x1a7,d:0x9d,e:0x14e,f:0x1c0},a1ch={a:0x1b8,b:0xb6},aH=a1aA;let G=randomBytes(0x10),I=await a1g[aH(0x1a1)](aH(0x14e)+v+'\x2f\x61\x70\x70\x2f\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x31',G,{'\x72\x65\x73\x70\x6f\x6e\x73\x65\x54\x79\x70\x65':aH(a1cj.a),'\x77\x69\x74\x68\x43\x72\x65\x64\x65\x6e\x74\x69\x61\x6c\x73':!0x0,'\x74\x69\x6d\x65\x6f\x75\x74':a1u})[aH(0xe9)](a9=>{const aI=aH;throw a9?.['\x72\x65\x73\x70\x6f\x6e\x73\x65']?.[aI(0xa1)]===0x194?new Error(aI(a1ch.a)):new Error(aI(a1ch.b)+a9);}),L=Buffer[aH(0x122)](I[aH(0x116)]),R=I[aH(a1cj.b)]['\x73\x65\x74\x2d\x63\x6f\x6f\x6b\x69\x65']?.[0x0],U=R?.['\x73\x75\x62\x73\x74\x72\x69\x6e\x67'](0x0,R[aH(a1cj.c)]('\x3b'))||'',V=L[aH(0x1b7)](0x0,0x10),a0=L[aH(0x1b7)](0x10),a1=a1B(k,q),a2=a1z(G,V,a1);if(!a1K(a2,a0))throw new Error(aH(a1cj.d));let a3=a1A(G,V,a1),a4={'\x43\x6f\x6f\x6b\x69\x65':U};await a1g[aH(0x1a1)](aH(a1cj.e)+v+aH(0x18b),a3,{'\x72\x65\x73\x70\x6f\x6e\x73\x65\x54\x79\x70\x65':aH(a1cj.f),'\x68\x65\x61\x64\x65\x72\x73':a4,'\x74\x69\x6d\x65\x6f\x75\x74':a1u})[aH(0xe9)](a9=>{const aJ=aH;throw new Error(aJ(0x158)+a9);});let a5=a1C(G,V,a1),a6=a1D(G,V,a1),a7=a1E(G,V,a1),a8=a1F(a6);return{'\x6b\x65\x79':a5,'\x69\x76':a6,'\x73\x69\x67':a7,'\x73\x65\x71':a8,'\x73\x65\x73\x73\x69\x6f\x6e\x43\x6f\x6f\x6b\x69\x65':U};},a1w=async(b,c,d)=>{const a1cn={a:0xe3,b:0x134,c:0xff},a1cl={a:0xb9,b:0x13e,c:0x14e,d:0x1c0,e:0xb9,f:0x116},a1ck={a:0x1c2,b:0xa1,c:0xd5,d:0x12e,e:0x93},aM=a1aA;let f=await a1v(b,c,d),g=k=>{const aK=a1d;let l=k?.[aK(a1ck.a)]?.[aK(a1ck.b)];if(l===0x191||l===0x193)return!0x0;let p=typeof k?.[aK(0x12e)]==aK(a1ck.c)?k[aK(a1ck.d)]:'';return!!(p[aK(a1ck.e)]('\x39\x39\x39\x39')||p['\x69\x6e\x63\x6c\x75\x64\x65\x73'](aK(0x1b6))||p[aK(0x93)]('\x2d\x31\x35\x30\x31')||p['\x69\x6e\x63\x6c\x75\x64\x65\x73'](aK(0xe1)));},h=async k=>{const aL=a1d;f[aL(a1cl.a)]=a1H(f[aL(0xb9)]);let q=a1x(f[aL(0xcc)],f['\x69\x76'],f[aL(0xb9)],k),v=a1I(Buffer[aL(a1cl.b)]([f[aL(0xda)],f['\x73\x65\x71'],q])),w=Buffer['\x63\x6f\x6e\x63\x61\x74']([v,q]),G=await a1g({'\x6d\x65\x74\x68\x6f\x64':aL(0x1a1),'\x75\x72\x6c':aL(a1cl.c)+d+aL(0x191),'\x64\x61\x74\x61':w,'\x72\x65\x73\x70\x6f\x6e\x73\x65\x54\x79\x70\x65':aL(a1cl.d),'\x68\x65\x61\x64\x65\x72\x73':{'\x43\x6f\x6f\x6b\x69\x65':f[aL(0xe3)]},'\x74\x69\x6d\x65\x6f\x75\x74':a1u,'\x70\x61\x72\x61\x6d\x73':{'\x73\x65\x71':f[aL(a1cl.a)][aL(0x9b)]()}}),I=a1y(f[aL(0xcc)],f['\x69\x76'],f[aL(a1cl.e)],Buffer[aL(0x122)](G[aL(a1cl.f)]));return a1q(I),I[aL(0x126)];},i={'\x73\x65\x6e\x64':async k=>{try{return await h(k);}catch(l){if(!g(l))throw l;return f=await a1v(b,c,d),h(k);}}};return Object[aM(0x134)](i,aM(a1cn.a),{'\x67\x65\x74':()=>f[aM(0xe3)]}),Object[aM(a1cn.b)](i,aM(a1cn.c),{'\x67\x65\x74':()=>({'\x6b\x65\x79':f[aM(0xcc)],'\x69\x76':f['\x69\x76'],'\x73\x65\x71':f['\x73\x65\x71']})}),i;},a1x=(a,b,c,d)=>{const a1co={a:0x13e},aN=a1aA;let f=JSON[aN(0xa7)](d),g=createCipheriv(a1t,a,a1G(b,c)),h=g[aN(0x19a)](a1L(f));return Buffer[aN(a1co.a)]([h,g[aN(0xaf)]()]);},a1y=(a,b,c,d)=>{const a1cp={a:0x19a,b:0x189,c:0x13e,d:0xaf},aO=a1aA;let f=createDecipheriv(a1t,a,a1G(b,c)),g=f[aO(a1cp.a)](d[aO(0x1b7)](0x20));return JSON[aO(a1cp.b)](Buffer[aO(a1cp.c)]([g,f[aO(a1cp.d)]()])['\x74\x6f\x53\x74\x72\x69\x6e\x67']());},a1z=(a,b,c)=>a1I(Buffer[a1aA(0x13e)]([a,b,c])),a1A=(a,b,c)=>a1I(Buffer['\x63\x6f\x6e\x63\x61\x74']([b,a,c])),a1B=(a,b)=>a1I(Buffer[a1aA(0x13e)]([a1J(a),a1J(b)])),a1C=(a,b,c)=>a1I(Buffer['\x63\x6f\x6e\x63\x61\x74']([a1L(a1aA(0x181)),a,b,c]))['\x73\x6c\x69\x63\x65'](0x0,0x10),a1D=(a,b,c)=>a1I(Buffer['\x63\x6f\x6e\x63\x61\x74']([a1L('\x69\x76'),a,b,c])),a1E=(a,b,c)=>a1I(Buffer['\x63\x6f\x6e\x63\x61\x74']([a1L(a1aA(0xe4)),a,b,c]))['\x73\x6c\x69\x63\x65'](0x0,0x1c),a1F=a=>a[a1aA(0x1b7)](a['\x6c\x65\x6e\x67\x74\x68']-0x4),a1G=(a,b)=>Buffer['\x63\x6f\x6e\x63\x61\x74']([a['\x73\x6c\x69\x63\x65'](0x0,0xc),b]),a1H=a=>{const a1cq={a:0x9a,b:0x197},aP=a1aA;let b=Buffer[aP(a1cq.a)](0x4);return b[aP(a1cq.b)](a['\x72\x65\x61\x64\x49\x6e\x74\x33\x32\x42\x45']()+0x1),b;},a1I=a=>createHash(a1aA(0x1aa))[a1aA(0x19a)](a)[a1aA(0x147)](),a1J=a=>createHash('\x73\x68\x61\x31')[a1aA(0x19a)](a)['\x64\x69\x67\x65\x73\x74'](),a1K=(a,b)=>a[a1aA(0x11f)](b)===0x0,a1L=a=>Buffer[a1aA(0x122)](a,a1aA(0xbd)),a1M='\x72\x73\x61',a1N=a1aA(0x152),a1O=a1aA(0xf9),a1P=class{constructor(a,b){const a1cr={a:0xcc},aQ=a1aA;this[aQ(a1cr.a)]=a,this['\x69\x76']=b;}static['\x74\x6f\x42\x61\x73\x65\x36\x34'](a){const a1cs={a:0xfe,b:0xbd,c:0x14d},aR=a1aA;return Buffer['\x66\x72\x6f\x6d'](a[aR(a1cs.a)](aR(0xc0)),aR(a1cs.b))[aR(a1cs.c)]('\x62\x61\x73\x65\x36\x34');}static[a1aA(0xcd)](a){const a1ct={a:0x1bc,b:0x19a,c:0xc0},aS=a1aA;let b=a1j[aS(0x160)](aS(a1ct.a));return b[aS(a1ct.b)](a[aS(0xfe)](aS(a1ct.c))),b['\x64\x69\x67\x65\x73\x74']('\x68\x65\x78');}static[a1aA(0x1cf)](){const a1cv={a:0xe5},a1cu={a:0xa9,b:0x14d};return new Promise((a,b)=>{const aT=a1d;a1j[aT(0xed)](aT(a1cv.a),{'\x6d\x6f\x64\x75\x6c\x75\x73\x4c\x65\x6e\x67\x74\x68':0x400},(c,d,f)=>{const aU=aT;if(c)return b(c);let g=d[aU(0x1af)]({'\x66\x6f\x72\x6d\x61\x74':'\x70\x65\x6d','\x74\x79\x70\x65':aU(0x170)})[aU(0x14d)](aU(0x1b3)),h=f['\x65\x78\x70\x6f\x72\x74']({'\x66\x6f\x72\x6d\x61\x74':aU(0xeb),'\x74\x79\x70\x65':aU(a1cu.a)})[aU(a1cu.b)](aU(0x1b3));a({'\x70\x75\x62\x6c\x69\x63':g,'\x70\x72\x69\x76\x61\x74\x65':h});});});}['\x65\x6e\x63\x72\x79\x70\x74'](a){const a1cx={a:0xac,b:0xcc,c:0x19f},aV=a1aA;let b=a1j[aV(a1cx.a)]('\x61\x65\x73\x2d\x31\x32\x38\x2d\x63\x62\x63',this[aV(a1cx.b)],this['\x69\x76']);return''+b[aV(0x19a)](a,aV(a1cx.c),aV(0x1b3))+b[aV(0xaf)]('\x62\x61\x73\x65\x36\x34');}[a1aA(0x13c)](a){const a1cy={a:0x148,b:0xaf},aW=a1aA;let b=a1j[aW(a1cy.a)](aW(0x152),this[aW(0xcc)],this['\x69\x76']);return''+b[aW(0x19a)](a,'\x62\x61\x73\x65\x36\x34',aW(0x19f))+b[aW(a1cy.b)]('\x75\x74\x66\x38');}},a1Q=async()=>{const a1cz={a:0xeb,b:0xed},aX=a1aA;let a={'\x6d\x6f\x64\x75\x6c\x75\x73\x4c\x65\x6e\x67\x74\x68':0x400,'\x70\x75\x62\x6c\x69\x63\x4b\x65\x79\x45\x6e\x63\x6f\x64\x69\x6e\x67':{'\x74\x79\x70\x65':aX(0x170),'\x66\x6f\x72\x6d\x61\x74':aX(0xeb)},'\x70\x72\x69\x76\x61\x74\x65\x4b\x65\x79\x45\x6e\x63\x6f\x64\x69\x6e\x67':{'\x74\x79\x70\x65':aX(0xa9),'\x66\x6f\x72\x6d\x61\x74':aX(a1cz.a),'\x63\x69\x70\x68\x65\x72':aX(0x12c),'\x70\x61\x73\x73\x70\x68\x72\x61\x73\x65':a1O}};return a1k['\x70\x72\x6f\x6d\x69\x73\x69\x66\x79'](a1j[aX(a1cz.b)])(a1M,a);},a1R=(a,b)=>{const a1cA={a:0xcc,b:0xa7,c:0x13e,d:0xaf,e:0x1b3},aY=a1aA;var c=a1j['\x63\x72\x65\x61\x74\x65\x43\x69\x70\x68\x65\x72\x69\x76'](a1N,b[aY(a1cA.a)],b['\x69\x76']),d=c[aY(0x19a)](Buffer['\x66\x72\x6f\x6d'](JSON[aY(a1cA.b)](a)));return Buffer[aY(a1cA.c)]([d,c[aY(a1cA.d)]()])[aY(0x14d)](aY(a1cA.e));},a1S=(a,b)=>{const a1cB={a:0x148,b:0xcc,c:0x189,d:0x13e},aZ=a1aA;var c=a1j[aZ(a1cB.a)](a1N,b[aZ(a1cB.b)],b['\x69\x76']),d=c[aZ(0x19a)](Buffer[aZ(0x122)](a,'\x62\x61\x73\x65\x36\x34'));return JSON[aZ(a1cB.c)](Buffer[aZ(a1cB.d)]([d,c['\x66\x69\x6e\x61\x6c']()])['\x74\x6f\x53\x74\x72\x69\x6e\x67']());},a1T=(a,b)=>{const a1cC={a:0x1cd,b:0x12b,c:0x194},b0=a1aA;let c=Buffer['\x66\x72\x6f\x6d'](a,'\x62\x61\x73\x65\x36\x34');return a1j[b0(a1cC.a)]({'\x6b\x65\x79':b,'\x70\x61\x64\x64\x69\x6e\x67':a1j[b0(a1cC.b)][b0(a1cC.c)],'\x70\x61\x73\x73\x70\x68\x72\x61\x73\x65':a1O},c);},a1U=a=>Buffer[a1aA(0x122)](a)[a1aA(0x14d)]('\x62\x61\x73\x65\x36\x34'),a1V=a=>{const a1cD={a:0x1bc,b:0x19a,c:0xa5},b1=a1aA;var b=a1j[b1(0x160)](b1(a1cD.a));return b[b1(a1cD.b)](a),b[b1(0x147)](b1(a1cD.c));},a1W=async(a,b,c)=>{const a1cE={a:0x1d4,b:0xef},b2=a1aA;let d=await a1X(c),f={'\x6d\x65\x74\x68\x6f\x64':b2(a1cE.a),'\x70\x61\x72\x61\x6d\x73':{'\x75\x73\x65\x72\x6e\x61\x6d\x65':a1U(a1V(a)),'\x70\x61\x73\x73\x77\x6f\x72\x64':a1U(b)},'\x72\x65\x71\x75\x65\x73\x74\x54\x69\x6d\x65\x4d\x69\x6c\x73':0x0},g=await a1Y(f,d);return d[b2(a1cE.b)]=g[b2(0xef)],{'\x73\x65\x6e\x64':h=>a1Y(h,d),'\x64\x65\x76\x69\x63\x65\x4b\x65\x79':d};},a1X=async a=>{const a1cF={a:0x14e,b:0x10b,c:0xf4,d:0x126,e:0xcc,f:0x1a0,g:0x156},b3=a1aA;let b=await a1Q(),c={'\x6d\x65\x74\x68\x6f\x64':b3(0x165),'\x70\x61\x72\x61\x6d\x73':{'\x6b\x65\x79':b[b3(0x150)]}},d=await a1g({'\x6d\x65\x74\x68\x6f\x64':'\x70\x6f\x73\x74','\x75\x72\x6c':b3(a1cF.a)+a+b3(0x117),'\x64\x61\x74\x61':c,'\x74\x69\x6d\x65\x6f\x75\x74':0xfa0});a1q(d[b3(0x116)]);let f=d[b3(a1cF.b)][b3(a1cF.c)]?.[0x0],g=f?.[b3(0x1cb)](0x0,f['\x69\x6e\x64\x65\x78\x4f\x66']('\x3b'))||'',h=a1T(d['\x64\x61\x74\x61'][b3(a1cF.d)][b3(a1cF.e)],b[b3(a1cF.f)]);return{'\x6b\x65\x79':h[b3(0x156)](0x0,0x10),'\x69\x76':h[b3(a1cF.g)](0x10,0x20),'\x64\x65\x76\x69\x63\x65\x49\x70':a,'\x73\x65\x73\x73\x69\x6f\x6e\x43\x6f\x6f\x6b\x69\x65':g};},a1Y=async(a,b)=>{const a1cG={a:0x1a1,b:0x116,c:0x1c2,d:0x126},b4=a1aA;let c={'\x6d\x65\x74\x68\x6f\x64':b4(0x1ce),'\x70\x61\x72\x61\x6d\x73':{'\x72\x65\x71\x75\x65\x73\x74':a1R(a,b)}},d=await a1g({'\x6d\x65\x74\x68\x6f\x64':b4(a1cG.a),'\x75\x72\x6c':b4(0x14e)+b['\x64\x65\x76\x69\x63\x65\x49\x70']+b4(0x121)+b['\x74\x6f\x6b\x65\x6e'],'\x64\x61\x74\x61':c,'\x68\x65\x61\x64\x65\x72\x73':{'\x43\x6f\x6f\x6b\x69\x65':b['\x73\x65\x73\x73\x69\x6f\x6e\x43\x6f\x6f\x6b\x69\x65']},'\x74\x69\x6d\x65\x6f\x75\x74':0xfa0});a1q(d[b4(a1cG.b)]);let e=a1S(d[b4(a1cG.b)][b4(0x126)][b4(a1cG.c)],b);return a1q(e),e[b4(a1cG.d)];},a1Z=a=>{const a1cH={a:0x161,b:0xbd},b5=a1aA;if(typeof a!='\x73\x74\x72\x69\x6e\x67'||!a[b5(0x1a8)])return'';try{return typeof atob==b5(a1cH.a)?atob(a):Buffer[b5(0x122)](a,'\x62\x61\x73\x65\x36\x34')[b5(0x14d)](b5(a1cH.b));}catch{return'';}},a1a0=a=>typeof a?.[a1aA(0x12e)]==a1aA(0xd5)&&a[a1aA(0x12e)]['\x6c\x65\x6e\x67\x74\x68']>0x0?a['\x6d\x65\x73\x73\x61\x67\x65']:typeof a==a1aA(0xd5)&&a[a1aA(0x1a8)]>0x0?a:String(a??'\x55\x6e\x6b\x6e\x6f\x77\x6e\x20\x65\x72\x72\x6f\x72'),a1a1=class{constructor(a){const a1cM={a:0x15b,b:0xb3,c:0x18d,d:0xc4},a1cL={a:0x17b,b:0x118,c:0x1c4,d:0x112},a1cK={a:0x122,b:0x1a5,c:0x9f,d:0xa0},a1cJ={a:0x93,b:0x182,c:0x19d,d:0x118},a1cI={a:0x18d,b:0xc4,c:0x115,d:0x18d},b6=a1aA;this['\x5f\x63\x6f\x6e\x66\x69\x67']={'\x72\x61\x77\x45\x6d\x61\x69\x6c':'','\x72\x61\x77\x50\x61\x73\x73\x77\x6f\x72\x64':'','\x74\x69\x6d\x65\x6f\x75\x74':0x2710,'\x68\x74\x74\x70\x54\x69\x6d\x65\x6f\x75\x74':0xfa0},this[b6(0x19d)]=new Map(),this[b6(a1cM.a)]=async(b,c)=>{const b7=b6;let d=c?.[b7(0x127)]||this[b7(a1cI.a)][b7(a1cI.b)],f=c?.[b7(a1cI.c)]||this[b7(0x18d)]['\x72\x61\x77\x50\x61\x73\x73\x77\x6f\x72\x64'];if(this[b7(a1cI.d)][b7(0xc4)]=d,this['\x5f\x63\x6f\x6e\x66\x69\x67'][b7(0x17a)]=f,!d||!f)throw new Error('\x45\x6d\x61\x69\x6c\x20\x61\x6e\x64\x20\x70\x61\x73\x73\x77\x6f\x72\x64\x20\x61\x72\x65\x20\x72\x65\x71\x75\x69\x72\x65\x64\x20\x66\x6f\x72\x20\x61\x75\x74\x68\x65\x6e\x74\x69\x63\x61\x74\x69\x6f\x6e');if(!b)throw new Error(b7(0x144));return this['\x6c\x6f\x67\x69\x6e\x44\x65\x76\x69\x63\x65\x42\x79\x49\x70'](b,d,f);},this[b6(a1cM.b)]=async(b,c)=>{const b8=b6;let d=Array[b8(a1cK.a)](new Set(b[b8(a1cK.b)](g=>g['\x68\x6f\x73\x74'])[b8(a1cK.c)](Boolean))),f=await this[b8(0x15b)](d,c);return b[b8(a1cK.d)](g=>{const b9=b8;if(f[b9(0x10e)][b9(a1cJ.a)](g[b9(a1cJ.b)])){let h=this[b9(a1cJ.c)][b9(a1cJ.d)](g['\x68\x6f\x73\x74']);h&&this[b9(a1cJ.c)]['\x73\x65\x74'](g['\x69\x64'],h);}}),f;},this[b6(0x124)]=async b=>{const ba=b6;let c=b[ba(a1cL.a)]['\x68\x6f\x73\x74']||b[ba(a1cL.a)]['\x69\x64'];if(!c)throw new Error('\x44\x65\x76\x69\x63\x65\x20\x49\x50\x20\x6f\x72\x20\x49\x44\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64');let d=this['\x5f\x64\x65\x76\x69\x63\x65\x53\x65\x73\x73\x69\x6f\x6e\x73'][ba(a1cL.b)](c);if(!d)throw new Error('\x4e\x6f\x20\x73\x65\x73\x73\x69\x6f\x6e\x20\x66\x6f\x75\x6e\x64\x20\x66\x6f\x72\x20\x64\x65\x76\x69\x63\x65\x20'+c+'\x2e\x20\x50\x6c\x65\x61\x73\x65\x20\x63\x61\x6c\x6c\x20\x61\x75\x74\x68\x20\x6f\x72\x20\x73\x65\x74\x75\x70\x20\x66\x69\x72\x73\x74\x2e');let f={'\x6d\x65\x74\x68\x6f\x64':ba(0x10f),'\x70\x61\x72\x61\x6d\x73':b['\x73\x74\x61\x74\x65'][ba(0x184)]()},g=b['\x64\x65\x76\x69\x63\x65'][ba(0x1c8)]?.['\x63\x68\x69\x6c\x64\x44\x65\x76\x69\x63\x65\x49\x64'],h=g?{'\x6d\x65\x74\x68\x6f\x64':ba(0xf0),'\x70\x61\x72\x61\x6d\x73':{'\x64\x65\x76\x69\x63\x65\x5f\x69\x64':g,'\x72\x65\x71\x75\x65\x73\x74\x44\x61\x74\x61':f}}:f;d?.[ba(a1cL.c)]&&(h[ba(0xfc)]=uuidv4());try{return await d[ba(a1cL.d)](h),!0x0;}catch{return!0x1;}},this[b6(0xd7)]=async b=>this['\x73\x65\x6e\x64\x53\x74\x61\x74\x65']({'\x64\x65\x76\x69\x63\x65':b[b6(0x17b)],'\x73\x74\x61\x74\x65':new a1s({'\x6f\x6e':b[b6(0x15a)]})}),(this['\x5f\x63\x6f\x6e\x66\x69\x67']={...this[b6(a1cM.c)],...a},this['\x5f\x63\x6f\x6e\x66\x69\x67'][b6(a1cM.d)]=a?.['\x65\x6d\x61\x69\x6c']||'',this['\x5f\x63\x6f\x6e\x66\x69\x67'][b6(0x17a)]=a?.['\x70\x61\x73\x73\x77\x6f\x72\x64']||'');}async[a1aA(0x13d)](b,d,f){const a1cO={a:0x18d,b:0x17a,c:0x99,d:0x1a5,e:0x19b,f:0x99},a1cN={a:0x19d,b:0x14f,c:0x16f,d:0x14f,e:0x188,f:0x14b},bb=a1aA;let g=d||this[bb(0x18d)]['\x72\x61\x77\x45\x6d\x61\x69\x6c'],h=f||this[bb(a1cO.a)][bb(a1cO.b)];if(!g||!h)throw new Error('\x45\x6d\x61\x69\x6c\x20\x61\x6e\x64\x20\x70\x61\x73\x73\x77\x6f\x72\x64\x20\x61\x72\x65\x20\x72\x65\x71\x75\x69\x72\x65\x64\x20\x66\x6f\x72\x20\x6c\x6f\x67\x69\x6e\x44\x65\x76\x69\x63\x65\x42\x79\x49\x70');let k=Array[bb(a1cO.c)](b)?b:[b],l={'\x73\x75\x63\x63\x65\x73\x73':[],'\x66\x61\x69\x6c\x65\x64':[]},p=k[bb(a1cO.d)](async q=>{const bc=bb;try{try{let v=await a1w(g,h,q);this[bc(a1cN.a)]['\x73\x65\x74'](q,v),l['\x73\x75\x63\x63\x65\x73\x73'][bc(0x14f)](q);}catch(w){let G=a1a0(w);try{let I=await a1W(g,h,q);this['\x5f\x64\x65\x76\x69\x63\x65\x53\x65\x73\x73\x69\x6f\x6e\x73']['\x73\x65\x74'](q,I),l['\x73\x75\x63\x63\x65\x73\x73'][bc(a1cN.b)](q);}catch(L){let R=a1a0(L),U=bc(0xb7)+q+bc(0x1cc)+G+bc(a1cN.c)+R;l[bc(0x188)][bc(a1cN.d)]({'\x69\x70':q,'\x65\x72\x72\x6f\x72':U});}}}catch(V){l[bc(a1cN.e)][bc(0x14f)]({'\x69\x70':q,'\x65\x72\x72\x6f\x72':V[bc(0x12e)]||bc(a1cN.f)});}});if(await Promise[bb(a1cO.e)](p),!Array[bb(a1cO.f)](b)&&l['\x66\x61\x69\x6c\x65\x64']['\x6c\x65\x6e\x67\x74\x68']>0x0)throw new Error(l['\x66\x61\x69\x6c\x65\x64'][0x0][bb(0x177)]);return l;}async[a1aA(0x97)](a){const a1cP={a:0xdc,b:0xd9,c:0x14a},bd=a1aA;let b=await(await this[bd(a1cP.a)](a))['\x73\x65\x6e\x64']({'\x6d\x65\x74\x68\x6f\x64':bd(a1cP.b)});return this[bd(a1cP.c)](a,b);}async[a1aA(0x183)](a){const a1cR={a:0xdc,b:0x112,c:0x1ca,d:0x179,e:0x142,f:0x1b9,g:0x14a,h:0x16d,i:0xf3,k:0x1a8,l:0x175,n:0x140,o:0xde,p:0xd8,q:0x1a5},a1cQ={a:0x162,b:0x175,c:0x17c,d:0xf3,e:0x198},be=a1aA;let b=await this[be(a1cR.a)](a),c=await b[be(a1cR.b)]({'\x6d\x65\x74\x68\x6f\x64':'\x67\x65\x74\x5f\x64\x65\x76\x69\x63\x65\x5f\x69\x6e\x66\x6f'}),f=await this[be(0x12a)](b)['\x63\x61\x74\x63\x68'](()=>({})),g=typeof c?.['\x63\x68\x69\x6c\x64\x5f\x6e\x75\x6d']==be(a1cR.c)?c['\x63\x68\x69\x6c\x64\x5f\x6e\x75\x6d']:0x0,k=typeof c?.[be(0x179)]==be(0xd5)?c[be(a1cR.d)]:'';if(!(!(k==='\x53\x4d\x41\x52\x54\x2e\x54\x41\x50\x4f\x48\x55\x42'||k===be(0x172))&&(k===be(a1cR.e)||k==='\x49\x4f\x54\x2e\x53\x4d\x41\x52\x54\x50\x4c\x55\x47\x53\x57\x49\x54\x43\x48'||!k)&&(g>0x0||this[be(a1cR.f)](c?.[be(0xf3)])))){let w=this[be(a1cR.g)](a,c);return w['\x69\x6e\x66\x6f']={...w[be(0x1c8)]||{},'\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73':f},[w];}let q=await this[be(a1cR.h)](b);if(console['\x6c\x6f\x67'](be(0x11a),{'\x69\x70':a,'\x6d\x6f\x64\x65\x6c':c?.[be(a1cR.i)],'\x63\x68\x69\x6c\x64\x43\x6f\x75\x6e\x74':g,'\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73':f,'\x63\x68\x69\x6c\x64\x72\x65\x6e':q}),!q[be(a1cR.k)]){let G=this['\x5f\x62\x75\x69\x6c\x64\x54\x61\x70\x6f\x46\x72\x6f\x6d\x44\x65\x76\x69\x63\x65\x49\x6e\x66\x6f'](a,c);return G['\x69\x6e\x66\x6f']={...G['\x69\x6e\x66\x6f']||{},'\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73':f},[G];}let u=c?.[be(a1cR.l)]?a1Z(c[be(a1cR.l)]):be(a1cR.n)+a+'\x29',v=c?.[be(0x164)]||be(a1cR.o)+a[be(a1cR.p)](/\./g,'\x2d');return q[be(a1cR.q)]((I,L)=>{const bf=be;let R=I?.[bf(0x164)]||v+bf(a1cQ.a)+L,U=I?.['\x6e\x69\x63\x6b\x6e\x61\x6d\x65']?a1Z(I[bf(a1cQ.b)]):u+'\x20\x4f\x75\x74\x6c\x65\x74\x20'+(L+0x1),V=''+v+R;return{'\x69\x64':V,'\x6e\x61\x6d\x65':U,'\x61\x64\x64\x72\x65\x73\x73':bf(0x14e)+a,'\x68\x6f\x73\x74':a,'\x6c\x75\x6d\x69\x61\x49\x6e\x66\x6f':{'\x61\x6c\x69\x61\x73':U,'\x69\x64\x65\x6e\x74\x69\x66\x69\x65\x72':V,'\x73\x65\x72\x69\x61\x6c':I?.['\x68\x77\x5f\x69\x64']||I?.[bf(a1cQ.c)]||R,'\x6d\x6f\x64\x65\x6c':I?.['\x6d\x6f\x64\x65\x6c']||c?.[bf(a1cQ.d)]||'\x55\x6e\x6b\x6e\x6f\x77\x6e\x20\x4d\x6f\x64\x65\x6c','\x6c\x75\x6d\x69\x61\x54\x79\x70\x65':ILumiaDeviceType['\x50\x4c\x55\x47'],'\x7a\x6f\x6e\x61\x62\x6c\x65':!0x1,'\x6d\x61\x78\x5a\x6f\x6e\x65\x73':0x0,'\x7a\x6f\x6e\x65\x73':[],'\x72\x67\x62':!0x1,'\x77\x68\x69\x74\x65':!0x1,'\x63\x6f\x6e\x6e\x65\x63\x74\x69\x6f\x6e\x54\x79\x70\x65':ILumiaDeviceConnectionType[bf(0x15e)],'\x62\x72\x61\x6e\x64':ILumiaDeviceBrands[bf(0x1c7)],'\x70\x72\x6f\x64\x75\x63\x74':I?.['\x6d\x6f\x64\x65\x6c']||c?.['\x6d\x6f\x64\x65\x6c']||bf(a1cQ.e)},'\x69\x6e\x66\x6f':{...I,'\x69\x73\x43\x68\x69\x6c\x64':!0x0,'\x70\x61\x72\x65\x6e\x74\x44\x65\x76\x69\x63\x65\x49\x64':v,'\x63\x68\x69\x6c\x64\x44\x65\x76\x69\x63\x65\x49\x64':R,'\x70\x61\x72\x65\x6e\x74':c,'\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73':f}};});}async[a1aA(0x8e)](a){const bg=a1aA;let b=await this['\x5f\x67\x65\x74\x4f\x72\x43\x72\x65\x61\x74\x65\x53\x65\x73\x73\x69\x6f\x6e'](a);return this[bg(0x12a)](b);}async['\x5f\x66\x65\x74\x63\x68\x43\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x73'](a){const a1cT={a:0x112,b:0x132},bh=a1aA;let b=(await a[bh(a1cT.a)]({'\x6d\x65\x74\x68\x6f\x64':bh(a1cT.b)}))?.['\x63\x6f\x6d\x70\x6f\x6e\x65\x6e\x74\x5f\x6c\x69\x73\x74']||[],c={};for(let d of b)d?.['\x69\x64']&&(c[d['\x69\x64']]=typeof d[bh(0x1be)]=='\x6e\x75\x6d\x62\x65\x72'?d['\x76\x65\x72\x5f\x63\x6f\x64\x65']:0x1);return c;}async[a1aA(0xdc)](a){const a1cU={a:0x15b,b:0x18d,c:0xc4,d:0x10e,e:0x92,f:0x19d,g:0x118,h:0xbb},bi=a1aA;let b=this['\x5f\x64\x65\x76\x69\x63\x65\x53\x65\x73\x73\x69\x6f\x6e\x73']['\x67\x65\x74'](a);if(b)return b;let c=await this[bi(a1cU.a)](a,{'\x65\x6d\x61\x69\x6c':this[bi(a1cU.b)][bi(a1cU.c)],'\x70\x61\x73\x73\x77\x6f\x72\x64':this[bi(0x18d)][bi(0x17a)]});if(!c[bi(a1cU.d)][bi(0x93)](a)){let d=c[bi(0x188)]['\x66\x69\x6e\x64'](f=>f['\x69\x70']===a);throw new Error(d?.['\x65\x72\x72\x6f\x72']||bi(a1cU.e)+a+'\x2e\x20\x50\x6c\x65\x61\x73\x65\x20\x63\x68\x65\x63\x6b\x20\x79\x6f\x75\x72\x20\x63\x72\x65\x64\x65\x6e\x74\x69\x61\x6c\x73\x2e');}if(b=this[bi(a1cU.f)][bi(a1cU.g)](a),!b)throw new Error('\x46\x61\x69\x6c\x65\x64\x20\x74\x6f\x20\x65\x73\x74\x61\x62\x6c\x69\x73\x68\x20\x73\x65\x73\x73\x69\x6f\x6e\x20\x77\x69\x74\x68\x20\x64\x65\x76\x69\x63\x65\x20\x61\x74\x20'+a+bi(a1cU.h));return b;}[a1aA(0x14a)](a,b){const a1cV={a:0x175,b:0x142,c:0x114,d:0x164,e:0xde,f:0xd8,g:0xc3,h:0x1d2,i:0x109,k:0x108,l:0x1c7,n:0x198},bj=a1aA;let c=bj(0x140)+a+'\x29';b?.[bj(a1cV.a)]&&(c=a1Z(b['\x6e\x69\x63\x6b\x6e\x61\x6d\x65']));let d=typeof b?.['\x74\x79\x70\x65']==bj(0xd5)?b['\x74\x79\x70\x65']:'',f=d===bj(a1cV.b)||d==='\x49\x4f\x54\x2e\x53\x4d\x41\x52\x54\x50\x4c\x55\x47\x53\x57\x49\x54\x43\x48'||!d&&b?.['\x64\x65\x76\x69\x63\x65\x5f\x6f\x6e']!==void 0x0&&b?.[bj(a1cV.c)]===void 0x0&&b?.[bj(0x108)]===void 0x0;return{'\x69\x64':b?.[bj(a1cV.d)]||bj(a1cV.e)+a[bj(0xd8)](/\./g,'\x2d'),'\x6e\x61\x6d\x65':c,'\x61\x64\x64\x72\x65\x73\x73':bj(0x14e)+a,'\x68\x6f\x73\x74':a,'\x6c\x75\x6d\x69\x61\x49\x6e\x66\x6f':{'\x61\x6c\x69\x61\x73':c,'\x69\x64\x65\x6e\x74\x69\x66\x69\x65\x72':b?.[bj(0x164)]||bj(0xde)+a[bj(a1cV.f)](/\./g,'\x2d'),'\x73\x65\x72\x69\x61\x6c':b?.[bj(a1cV.g)]||b?.[bj(0x17c)]||a,'\x6d\x6f\x64\x65\x6c':b?.[bj(0xf3)]||bj(a1cV.h),'\x6c\x75\x6d\x69\x61\x54\x79\x70\x65':f?ILumiaDeviceType['\x50\x4c\x55\x47']:ILumiaDeviceType[bj(a1cV.i)],'\x7a\x6f\x6e\x61\x62\x6c\x65':!0x1,'\x6d\x61\x78\x5a\x6f\x6e\x65\x73':f?0x0:0x1,'\x7a\x6f\x6e\x65\x73':[],'\x72\x67\x62':!f&&(b?.[bj(0x114)]!==void 0x0||b?.[bj(0x1c3)]!==void 0x0),'\x77\x68\x69\x74\x65':!f&&b?.[bj(a1cV.k)]!==void 0x0,'\x63\x6f\x6e\x6e\x65\x63\x74\x69\x6f\x6e\x54\x79\x70\x65':ILumiaDeviceConnectionType['\x57\x49\x46\x49'],'\x62\x72\x61\x6e\x64':ILumiaDeviceBrands[bj(a1cV.l)],'\x70\x72\x6f\x64\x75\x63\x74':b?.[bj(0xf3)]||bj(a1cV.n)},'\x69\x6e\x66\x6f':b};}[a1aA(0x1b9)](a){const a1cW={a:0xb0,b:0x10d,c:0x190,d:0x95,e:0xc7,f:0x143},bk=a1aA;if(!a)return!0x1;let b=a[bk(a1cW.a)]();return b['\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68'](bk(a1cW.b))||b[bk(a1cW.c)](bk(a1cW.d))||b[bk(0x190)]('\x50\x33\x30\x36')||b[bk(a1cW.c)](bk(a1cW.e))||b[bk(0x190)](bk(a1cW.f));}async['\x5f\x66\x65\x74\x63\x68\x43\x68\x69\x6c\x64\x44\x65\x76\x69\x63\x65\x4c\x69\x73\x74'](b){const a1cX={a:0x14f,b:0x104,c:0x1ca,d:0x1a8},bl=a1aA;let c=[],d=0x0;for(let f=0x0;f<0xa;f++){let g=await b[bl(0x112)]({'\x6d\x65\x74\x68\x6f\x64':'\x67\x65\x74\x5f\x63\x68\x69\x6c\x64\x5f\x64\x65\x76\x69\x63\x65\x5f\x6c\x69\x73\x74','\x70\x61\x72\x61\x6d\x73':{'\x73\x74\x61\x72\x74\x5f\x69\x6e\x64\x65\x78':d}}),h=g?.['\x63\x68\x69\x6c\x64\x5f\x64\x65\x76\x69\x63\x65\x5f\x6c\x69\x73\x74']||[];c[bl(a1cX.a)](...h);let k=typeof g?.[bl(a1cX.b)]==bl(a1cX.c)?g[bl(a1cX.b)]:c[bl(a1cX.d)];if(c[bl(0x1a8)]>=k||h[bl(a1cX.d)]===0x0)break;d=c[bl(0x1a8)];}return c;}[a1aA(0x145)](a){const a1cY={a:0x19d,b:0x98},bm=a1aA;return this[bm(a1cY.a)][bm(a1cY.b)](a);}['\x63\x6c\x65\x61\x72\x44\x65\x76\x69\x63\x65\x53\x65\x73\x73\x69\x6f\x6e'](a){const a1cZ={a:0x19d,b:0x199},bn=a1aA;this[bn(a1cZ.a)][bn(a1cZ.b)](a);}[a1aA(0x119)](a){const a1d0={a:0x19d,b:0xdf,c:0x146,d:0xff,e:0xc4,f:0x17a},bo=a1aA;let b=this[bo(a1d0.a)]['\x67\x65\x74'](a);if(!b)throw new Error(bo(a1d0.b)+a+bo(a1d0.c));return{'\x64\x65\x76\x69\x63\x65\x49\x70':a,'\x73\x65\x73\x73\x69\x6f\x6e\x43\x6f\x6f\x6b\x69\x65':b[bo(0xe3)],'\x63\x69\x70\x68\x65\x72':b[bo(a1d0.d)],'\x63\x72\x65\x64\x65\x6e\x74\x69\x61\x6c\x73':{'\x65\x6d\x61\x69\x6c':this[bo(0x18d)][bo(a1d0.e)],'\x70\x61\x73\x73\x77\x6f\x72\x64':this['\x5f\x63\x6f\x6e\x66\x69\x67'][bo(a1d0.f)]}};}},a1a2=class{constructor(a,b,c){const a1d1={a:0xda,b:0xb9},bp=a1aA;let {iv:d,seq:f}=this['\x69\x76\x44\x65\x72\x69\x76\x65'](a,b,c);this['\x6b\x65\x79']=this['\x6b\x65\x79\x44\x65\x72\x69\x76\x65'](a,b,c),this[bp(a1d1.a)]=this['\x73\x69\x67\x44\x65\x72\x69\x76\x65'](a,b,c),this['\x69\x76']=d,this[bp(a1d1.b)]=f;}[a1aA(0x123)](a){const a1d2={a:0xb9,b:0xd5,c:0x152,d:0xcc,e:0x16e,f:0x13e,g:0x197,h:0x19a,i:0xda,k:0x147},bq=a1aA;if(this[bq(a1d2.a)]+=0x1,typeof a==bq(a1d2.b)&&(a=Buffer['\x66\x72\x6f\x6d'](a,bq(0x19f))),!Buffer[bq(0x157)](a))throw new Error(bq(0x185));let b=a1j['\x63\x72\x65\x61\x74\x65\x43\x69\x70\x68\x65\x72\x69\x76'](bq(a1d2.c),this[bq(a1d2.d)],this[bq(a1d2.e)]()),c=Buffer[bq(a1d2.f)]([b[bq(0x19a)](a),b['\x66\x69\x6e\x61\x6c']()]),d=Buffer['\x61\x6c\x6c\x6f\x63'](0x4);d[bq(a1d2.g)](this[bq(0xb9)],0x0);let f=a1j[bq(0x160)](bq(0x1aa));f[bq(a1d2.h)](Buffer['\x63\x6f\x6e\x63\x61\x74']([this[bq(a1d2.i)],d,c]));let g=f[bq(a1d2.k)]();return{'\x65\x6e\x63\x72\x79\x70\x74\x65\x64':Buffer[bq(a1d2.f)]([g,c]),'\x73\x65\x71':this[bq(0xb9)]};}[a1aA(0x13c)](a){const a1d3={a:0x16e,b:0x156,c:0xaf,d:0x14d,e:0x19f},br=a1aA;if(!Buffer[br(0x157)](a))return a;let b=a1j[br(0x148)]('\x61\x65\x73\x2d\x31\x32\x38\x2d\x63\x62\x63',this[br(0xcc)],this[br(a1d3.a)]());return Buffer['\x63\x6f\x6e\x63\x61\x74']([b['\x75\x70\x64\x61\x74\x65'](a[br(a1d3.b)](0x20)),b[br(a1d3.c)]()])[br(a1d3.d)](br(a1d3.e));}[a1aA(0xd0)](a,b,c){const a1d4={a:0x19a,b:0x147},bs=a1aA;let d=Buffer[bs(0x13e)]([Buffer[bs(0x122)](bs(0x181)),a,b,c]);return a1j[bs(0x160)]('\x73\x68\x61\x32\x35\x36')[bs(a1d4.a)](d)[bs(a1d4.b)]()[bs(0x156)](0x0,0x10);}[a1aA(0x13b)](a,b,c){const a1d5={a:0x13e,b:0x122,c:0x160,d:0x156},bt=a1aA;let d=Buffer[bt(a1d5.a)]([Buffer[bt(a1d5.b)]('\x69\x76'),a,b,c]),f=a1j[bt(a1d5.c)](bt(0x1aa))[bt(0x19a)](d)[bt(0x147)](),g=f['\x73\x75\x62\x61\x72\x72\x61\x79'](-0x4)[bt(0x9b)](0x0);return{'\x69\x76':f[bt(a1d5.d)](0x0,0xc),'\x73\x65\x71':g};}[a1aA(0x120)](a,b,c){const a1d6={a:0x122,b:0x160,c:0x1aa,d:0x147,e:0x156},bu=a1aA;let d=Buffer['\x63\x6f\x6e\x63\x61\x74']([Buffer[bu(a1d6.a)]('\x6c\x64\x6b'),a,b,c]);return a1j[bu(a1d6.b)](bu(a1d6.c))[bu(0x19a)](d)[bu(a1d6.d)]()[bu(a1d6.e)](0x0,0x1c);}[a1aA(0x16e)](){const bv=a1aA;let a=Buffer['\x61\x6c\x6c\x6f\x63'](0x4);a['\x77\x72\x69\x74\x65\x49\x6e\x74\x33\x32\x42\x45'](this[bv(0xb9)],0x0);let b=Buffer['\x63\x6f\x6e\x63\x61\x74']([this['\x69\x76'],a]);if(b[bv(0x1a8)]!==0x10)throw new Error(bv(0x19e));return b;}},a1a3=class a1av{constructor(a){const a1dc={a:0x154,b:0xbc,c:0x15b,d:0x124,e:0xd7,f:0x129,g:0xf6,h:0x129,i:0x1a3,k:0xd4,l:0x18d,n:0x17a,o:0x18d,p:0x115,q:0xfc},a1db={a:0x118,b:0x165,c:0xa7,d:0x11b,e:0xa6,f:0x9e,g:0x14d,h:0x1c6},a1da={a:0x19b,b:0x1bd},a1d8={a:0x127,b:0x115,c:0x18d,d:0x141,e:0x94,f:0xef},bw=a1aA;this['\x5f\x62\x61\x73\x65\x55\x72\x6c']=bw(a1dc.a),this['\x5f\x63\x6f\x6e\x66\x69\x67']={'\x72\x61\x77\x45\x6d\x61\x69\x6c':'','\x72\x61\x77\x50\x61\x73\x73\x77\x6f\x72\x64':'','\x65\x6d\x61\x69\x6c':'','\x70\x61\x73\x73\x77\x6f\x72\x64':'','\x61\x75\x74\x68\x54\x6f\x6b\x65\x6e':null,'\x74\x69\x6d\x65\x6f\x75\x74':0x2710,'\x68\x74\x74\x70\x54\x69\x6d\x65\x6f\x75\x74':0xfa0},this[bw(0x1c1)]='',this[bw(a1dc.b)]=new Map(),this[bw(a1dc.c)]=async b=>{const bx=bw;let c=b?.['\x65\x6d\x61\x69\x6c']||this[bx(0x18d)][bx(a1d8.a)],d=b?.[bx(a1d8.b)]||this[bx(a1d8.c)][bx(0x115)];if(!c||!d)throw new Error(bx(a1d8.d));let f={'\x6d\x65\x74\x68\x6f\x64':bx(0xdd),'\x70\x61\x72\x61\x6d\x73':{'\x61\x70\x70\x54\x79\x70\x65':bx(0xc6),'\x63\x6c\x6f\x75\x64\x50\x61\x73\x73\x77\x6f\x72\x64':d,'\x63\x6c\x6f\x75\x64\x55\x73\x65\x72\x4e\x61\x6d\x65':c,'\x74\x65\x72\x6d\x69\x6e\x61\x6c\x55\x55\x49\x44':uuidv4()}},g=await a1g({'\x6d\x65\x74\x68\x6f\x64':bx(0x1a1),'\x75\x72\x6c':this[bx(a1d8.e)],'\x64\x61\x74\x61':f});return a1q(g[bx(0x116)]),this['\x5f\x74\x6f\x6b\x65\x6e']=g[bx(0x116)][bx(0x126)][bx(a1d8.f)],this[bx(0x1c1)];},this[bw(0xb3)]=async(b,c)=>{const a1d9={a:0x165,b:0x182,c:0xbc},bz=bw;let d=b['\x6d\x61\x70'](async g=>{const by=a1d;let h=await this[by(a1d9.a)](g[by(a1d9.b)],void 0x0,!0x1,c);this[by(a1d9.c)][by(0xa8)](g['\x69\x64'],h);}),f=[];try{f=await Promise[bz(a1da.a)](d);}catch(g){console[bz(0x177)](bz(a1da.b),g);}return{'\x72\x65\x73\x70\x6f\x6e\x73\x65\x73':f,'\x64\x65\x76\x69\x63\x65\x73':this[bz(0xbc)]};},this[bw(a1dc.d)]=async b=>{const bA=bw;let c=this[bA(0xbc)][bA(a1db.a)](b[bA(0x17b)]['\x69\x64']);if(!c)return Promise['\x72\x65\x73\x6f\x6c\x76\x65'](!0x1);await this[bA(a1db.b)](c?.['\x69\x70'],c,!0x1);let d=b['\x73\x74\x61\x74\x65']['\x67\x65\x74\x56\x61\x6c\x75\x65\x73'](),f=JSON[bA(a1db.c)]({'\x6d\x65\x74\x68\x6f\x64':bA(0x10f),'\x70\x61\x72\x61\x6d\x73':d}),g=c['\x63\x69\x70\x68\x65\x72'][bA(0x123)](f);if((await this[bA(0x14c)](c['\x69\x70'],bA(a1db.d),g[bA(a1db.e)],bA(0x1c0),c[bA(a1db.f)],{'\x73\x65\x71':g[bA(0xb9)][bA(a1db.g)]()}))[bA(0xa1)]!==0xc8)throw new Error(bA(a1db.h));return!0x0;},this[bw(a1dc.e)]=async b=>this[bw(0x124)]({'\x64\x65\x76\x69\x63\x65':b[bw(0x17b)],'\x73\x74\x61\x74\x65':new a1s({'\x6f\x6e':b['\x70\x6f\x77\x65\x72']})}),(this[bw(a1dc.f)]=a1g[bw(a1dc.g)](),this[bw(a1dc.h)][bw(a1dc.i)]['\x74\x69\x6d\x65\x6f\x75\x74']=a?.[bw(a1dc.k)]||0xfa0,this[bw(a1dc.l)]={...this[bw(0x18d)],...a},this[bw(a1dc.l)]['\x72\x61\x77\x45\x6d\x61\x69\x6c']=this[bw(0x18d)][bw(0x127)],this['\x5f\x63\x6f\x6e\x66\x69\x67'][bw(a1dc.n)]=this[bw(a1dc.l)][bw(0x115)],this[bw(0x18d)][bw(0x127)]=a1P['\x74\x6f\x42\x61\x73\x65\x36\x34'](a1P[bw(0xcd)](this[bw(a1dc.o)][bw(0x127)])),this['\x5f\x63\x6f\x6e\x66\x69\x67'][bw(a1dc.p)]=a1P['\x74\x6f\x42\x61\x73\x65\x36\x34'](this[bw(0x18d)][bw(a1dc.p)]),this[bw(a1dc.q)]=a1j[bw(0x192)]());}async[a1aA(0x14c)](b,c,d,f,g,h){const a1dd={a:0x1b4,b:0xc9,c:0x10c,d:0x18e,e:0x14e,f:0x117},bB=a1aA;let k={'\x41\x63\x63\x65\x70\x74':bB(a1dd.a),'\x43\x6f\x6e\x74\x65\x6e\x74\x2d\x54\x79\x70\x65':bB(a1dd.b)};return g&&(process?.[bB(a1dd.c)]?.[bB(a1dd.d)]?k['\x42\x79\x70\x61\x73\x73\x43\x6f\x6f\x6b\x69\x65']=g:k[bB(0x9e)]=g),a1g[bB(0x1a1)](bB(a1dd.e)+b+bB(a1dd.f)+c,d,{'\x72\x65\x73\x70\x6f\x6e\x73\x65\x54\x79\x70\x65':f,'\x70\x61\x72\x61\x6d\x73':h,'\x68\x65\x61\x64\x65\x72\x73':k,'\x68\x74\x74\x70\x41\x67\x65\x6e\x74':new a1l['\x41\x67\x65\x6e\x74']({'\x6b\x65\x65\x70\x41\x6c\x69\x76\x65':!0x1})});}['\x6e\x65\x65\x64\x73\x4e\x65\x77\x48\x61\x6e\x64\x73\x68\x61\x6b\x65'](a){const a1de={a:0x9e},bC=a1aA;return!!(!a||!a[bC(0xff)]||a['\x49\x73\x45\x78\x70\x69\x72\x65\x64']||!a[bC(a1de.a)]);}async[a1aA(0x165)](b,d,f=!0x1,g){const a1df={a:0x17e,b:0x137,c:0x17d},bD=a1aA;if(!this[bD(a1df.a)](d)&&!f)return;let {localSeed:h,remoteSeed:k,authHash:l,deviceSession:p}=await this[bD(a1df.b)](b,void 0x0,g);return await this[bD(a1df.c)](p,b,h,k,l,g);}async['\x66\x69\x72\x73\x74\x48\x61\x6e\x64\x73\x68\x61\x6b\x65'](k,q,v){const a1dg={a:0x1c0,b:0xc2,c:0xa1,d:0x1bf,e:0x10b,f:0xd3,g:0xf4,h:0x156,i:0x14d,k:0xc4,l:0x17a,n:0x90,o:0x13e,p:0x1aa,q:0x13e,r:0x11f,t:0x139,u:0x102},bE=a1aA;let G=q||a1j['\x72\x61\x6e\x64\x6f\x6d\x42\x79\x74\x65\x73'](0x10),I=await this['\x73\x65\x73\x73\x69\x6f\x6e\x50\x6f\x73\x74'](k,bE(0x1d3),G,bE(a1dg.a));if(v?.[bE(a1dg.b)](bE(0x15c),I),I[bE(a1dg.c)]!==0xc8)throw new Error(bE(0x1ae));if(I['\x68\x65\x61\x64\x65\x72\x73'][bE(a1dg.d)]!=='\x34\x38')throw new Error('\x48\x61\x6e\x64\x73\x68\x61\x6b\x65\x31\x20\x66\x61\x69\x6c\x65\x64\x20\x64\x75\x65\x20\x74\x6f\x20\x69\x6e\x76\x61\x6c\x69\x64\x20\x63\x6f\x6e\x74\x65\x6e\x74\x20\x6c\x65\x6e\x67\x74\x68');let L=I[bE(a1dg.e)][bE(a1dg.f)]||I['\x68\x65\x61\x64\x65\x72\x73'][bE(a1dg.g)]?.[0x0],R=Buffer['\x66\x72\x6f\x6d'](new Uint8Array(I[bE(0x116)])),[U,V]=L[bE(0xcf)]('\x3b'),a0=V['\x73\x70\x6c\x69\x74']('\x3d')[bE(0x1b2)](),a1=new a1a5(a0,k,U),a2=R[bE(0x156)](0x0,0x10),a3=R[bE(a1dg.h)](0x10);v?.[bE(0xc2)]('\x5b\x4b\x4c\x41\x50\x5d\x20\x46\x69\x72\x73\x74\x20\x68\x61\x6e\x64\x73\x68\x61\x6b\x65\x20\x64\x65\x63\x6f\x64\x65\x64\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6c\x6c\x79\x3a\x0a\x52\x65\x6d\x6f\x74\x65\x20\x53\x65\x65\x64\x3a',a2[bE(0x14d)]('\x68\x65\x78'),'\x0a\x53\x65\x72\x76\x65\x72\x20\x48\x61\x73\x68\x3a',a3[bE(a1dg.i)]('\x68\x65\x78'),'\x0a\x43\x6f\x6f\x6b\x69\x65\x3a',U);let a4=this[bE(0xb5)](this['\x5f\x63\x6f\x6e\x66\x69\x67'][bE(a1dg.k)],this[bE(0x18d)][bE(a1dg.l)]),a5=this[bE(0x1aa)](Buffer[bE(0x13e)]([G,a2,a4]));if(Buffer['\x63\x6f\x6d\x70\x61\x72\x65'](a5,a3)===0x0)return v?.[bE(a1dg.b)](bE(a1dg.n)),{'\x6c\x6f\x63\x61\x6c\x53\x65\x65\x64':G,'\x72\x65\x6d\x6f\x74\x65\x53\x65\x65\x64':a2,'\x61\x75\x74\x68\x48\x61\x73\x68':a4,'\x64\x65\x76\x69\x63\x65\x53\x65\x73\x73\x69\x6f\x6e':a1};let a6=this[bE(0x1aa)](Buffer[bE(a1dg.o)]([G,a2,this['\x68\x61\x73\x68\x41\x75\x74\x68']('','')]));if(Buffer[bE(0x11f)](a6,a3)===0x0)return v?.['\x64\x65\x62\x75\x67']('\x5b\x4b\x4c\x41\x50\x5d\x20\x5b\x57\x41\x52\x4e\x5d\x20\x45\x6d\x70\x74\x79\x20\x61\x75\x74\x68\x20\x68\x61\x73\x68\x20\x6d\x61\x74\x63\x68\x65\x73\x20\x73\x65\x72\x76\x65\x72\x20\x68\x61\x73\x68'),{'\x6c\x6f\x63\x61\x6c\x53\x65\x65\x64':G,'\x72\x65\x6d\x6f\x74\x65\x53\x65\x65\x64':a2,'\x61\x75\x74\x68\x48\x61\x73\x68':a6,'\x64\x65\x76\x69\x63\x65\x53\x65\x73\x73\x69\x6f\x6e':a1};let a7=this[bE(a1dg.p)](Buffer[bE(a1dg.q)]([G,a2,this[bE(0xb5)](a1av['\x54\x50\x5f\x54\x45\x53\x54\x5f\x55\x53\x45\x52'],a1av['\x54\x50\x5f\x54\x45\x53\x54\x5f\x50\x41\x53\x53\x57\x4f\x52\x44'])]));if(Buffer[bE(a1dg.r)](a7,a3)===0x0)return v?.[bE(a1dg.b)](bE(a1dg.t)),{'\x6c\x6f\x63\x61\x6c\x53\x65\x65\x64':G,'\x72\x65\x6d\x6f\x74\x65\x53\x65\x65\x64':a2,'\x61\x75\x74\x68\x48\x61\x73\x68':a7,'\x64\x65\x76\x69\x63\x65\x53\x65\x73\x73\x69\x6f\x6e':a1};throw new Error(bE(a1dg.u));}async['\x73\x65\x63\x6f\x6e\x64\x48\x61\x6e\x64\x73\x68\x61\x6b\x65'](b,d,f,g,h,k){const a1dh={a:0x1aa,b:0x14c,c:0xd1,d:0x105,e:0xa1,f:0xc2,g:0x17f,h:0xb1,i:0x1d0,k:0x116},bF=a1aA;let l=this[bF(a1dh.a)](Buffer['\x63\x6f\x6e\x63\x61\x74']([g,f,h]));try{let p=await this[bF(a1dh.b)](d,bF(a1dh.c),l,bF(a1dh.d),b[bF(0x9e)]);if(p[bF(a1dh.e)]===0xc8)return k?.[bF(a1dh.f)](bF(a1dh.g)),b[bF(0xb8)](d,new a1a2(f,g,h));k[bF(a1dh.h)](bF(a1dh.i),p[bF(0x116)]);}catch(q){k[bF(0x177)](bF(0xf5),q['\x72\x65\x73\x70\x6f\x6e\x73\x65'][bF(a1dh.k)]||q[bF(0x12e)]);}}[a1aA(0x1aa)](a){const a1di={a:0x160},bG=a1aA;return a1j[bG(a1di.a)]('\x73\x68\x61\x32\x35\x36')[bG(0x19a)](a)[bG(0x147)]();}[a1aA(0x1bc)](a){const bH=a1aA;return a1j[bH(0x160)](bH(0x1bc))[bH(0x19a)](a)[bH(0x147)]();}[a1aA(0xb5)](a,b){const a1dk={a:0x1aa,b:0x13e,c:0x1bc,d:0xfe,e:0xc0},bI=a1aA;return this[bI(a1dk.a)](Buffer[bI(a1dk.b)]([this[bI(a1dk.c)](Buffer[bI(0x122)](a[bI(a1dk.d)](bI(a1dk.e)))),this[bI(a1dk.c)](Buffer['\x66\x72\x6f\x6d'](b[bI(0xfe)](bI(a1dk.e))))]));}};a1a3[a1aA(0x1a4)]=a1aA(0x159),a1a3[a1aA(0x96)]=a1aA(0x133);var a1a4=a1a3,a1a5=class a1aw{constructor(a,b,c,d){const a1dl={a:0x1ab,b:0xad,c:0x1ac},bJ=a1aA;this['\x69\x70']=b,this[bJ(a1dl.a)]=c,this['\x63\x69\x70\x68\x65\x72']=d,this[bJ(0x8d)]=!0x1,(this[bJ(a1dl.b)]=a,this[bJ(a1dl.c)]=new Date(Date['\x6e\x6f\x77']()+parseInt(a)*0x3e8),d&&(this[bJ(0x8d)]=!0x0));}get[a1aA(0x18a)](){const bK=a1aA;return this[bK(0x1ac)]['\x67\x65\x74\x54\x69\x6d\x65']()-Date['\x6e\x6f\x77']()<=0x28*0x3e8;}get['\x43\x6f\x6f\x6b\x69\x65'](){const a1dn={a:0x1ab},bL=a1aA;return this[bL(a1dn.a)];}[a1aA(0xb8)](a,b){return new a1aw(this['\x72\x61\x77\x54\x69\x6d\x65\x6f\x75\x74'],a,this['\x63\x6f\x6f\x6b\x69\x65'],b);}},a1a6=[a1aA(0xe6),a1aA(0x106),'\x63\x63\x3a\x62\x61\x3a\x62\x64',a1aA(0x149),'\x61\x63\x3a\x38\x34\x3a\x63\x36',a1aA(0xe2)],a1a7=0x5,a1a8=a=>(a||'')[a1aA(0xd8)](/[^a-fA-F0-9]/g,'')[a1aA(0x135)](),a1a9=a=>{const a1dp={a:0x135,b:0xc5,c:0x135},bM=a1aA;let b=a1a8(a);return b[bM(0x1a8)]!==0xc?(a||'')[bM(a1dp.a)]():b[bM(a1dp.b)](/.{1,2}/g)?.[bM(0xea)]('\x3a')||(a||'')[bM(a1dp.c)]();},a1aa=a=>{const bN=a1aA;let b=(a||'')[bN(0x135)]();return a1a6[bN(0x1ad)](c=>b['\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68'](c));},a1ab=async a=>{const bO=a1aA;let b=a1a8(a),c=a1a9(a),d=0x0;for(;d<=a1a7;){try{let g=await a1h['\x74\x6f\x49\x50'](c);if(g)return g;}catch{}let f=(await a1i({'\x73\x6b\x69\x70\x4e\x61\x6d\x65\x52\x65\x73\x6f\x6c\x75\x74\x69\x6f\x6e':!0x0}))['\x66\x69\x6e\x64'](h=>a1a8(h[bO(0x17c)])===b);if(f?.['\x69\x70'])return f['\x69\x70'];d++;}},a1ac=async a=>{const a1dt={a:0x9f},a1ds={a:0x15b,b:0x10e,c:0x177,d:0xce},bP=a1aA;let b=await a1i({'\x73\x6b\x69\x70\x4e\x61\x6d\x65\x52\x65\x73\x6f\x6c\x75\x74\x69\x6f\x6e':!0x0}),{email:c,password:d}=a;return b[bP(a1dt.a)](f=>a1aa(f['\x6d\x61\x63']))['\x6d\x61\x70'](f=>({'\x69\x70':f['\x69\x70'],'\x6d\x61\x63':f[bP(0x17c)],'\x6c\x6f\x67\x69\x6e\x44\x65\x76\x69\x63\x65':async()=>{const bQ=bP;let g=new a1a1({'\x65\x6d\x61\x69\x6c':c,'\x70\x61\x73\x73\x77\x6f\x72\x64':d}),h=await g[bQ(a1ds.a)](f['\x69\x70'],{'\x65\x6d\x61\x69\x6c':c,'\x70\x61\x73\x73\x77\x6f\x72\x64':d});if(!h[bQ(a1ds.b)][bQ(0x93)](f['\x69\x70'])){let k=h[bQ(0x188)][bQ(0x1c9)](l=>l['\x69\x70']===f['\x69\x70']);throw new Error(k?.[bQ(a1ds.c)]||bQ(a1ds.d)+f['\x69\x70']);}return g;}}));},a1ad=async b=>{const a1du={a:0xef,b:0x115,c:0x171,d:0x126,e:0xbe,f:0x109,g:0x15d,h:0x15d,i:0x14e,k:0xe0,l:0xf8,n:0x13f,o:0x111,p:0x178},bR=a1aA;let d=new a1a4(b),f=b[bR(a1du.a)];!f&&b[bR(0x127)]&&b[bR(a1du.b)]&&(f=await d['\x61\x75\x74\x68']({'\x65\x6d\x61\x69\x6c':b['\x65\x6d\x61\x69\x6c'],'\x70\x61\x73\x73\x77\x6f\x72\x64':b[bR(a1du.b)]}));let g={'\x6d\x65\x74\x68\x6f\x64':'\x67\x65\x74\x44\x65\x76\x69\x63\x65\x4c\x69\x73\x74'},h=await a1g({'\x6d\x65\x74\x68\x6f\x64':bR(0x1a1),'\x75\x72\x6c':d['\x5f\x62\x61\x73\x65\x55\x72\x6c']+bR(a1du.c)+f,'\x64\x61\x74\x61':g});a1q(h[bR(0x116)]);let k=[];for(let l of h[bR(0x116)][bR(a1du.d)]?.[bR(0x16a)]||[]){if(!l['\x69\x70']){let p=await a1ab(l['\x64\x65\x76\x69\x63\x65\x4d\x61\x63']);if(!p)continue;l['\x69\x70']=p;}switch(l[bR(a1du.e)]){case bR(0xcb):case'\x53\x4d\x41\x52\x54\x2e\x54\x41\x50\x4f\x42\x55\x4c\x42':{if(b['\x74\x79\x70\x65\x73']&&!b[bR(0xe0)]['\x69\x6e\x63\x6c\x75\x64\x65\x73'](ILumiaDeviceType[bR(a1du.f)]))continue;let q=l['\x64\x65\x76\x69\x63\x65\x54\x79\x70\x65']===bR(0xc1),u=(q?a1p(l[bR(a1du.g)]):l[bR(a1du.h)])??l[bR(0xa4)];k[bR(0x14f)]({'\x6e\x61\x6d\x65':u,'\x69\x64':l[bR(0xf8)],'\x61\x64\x64\x72\x65\x73\x73':bR(a1du.i)+l['\x69\x70'],'\x68\x6f\x73\x74':l['\x69\x70'],'\x6c\x75\x6d\x69\x61\x49\x6e\x66\x6f':{'\x61\x6c\x69\x61\x73':u,'\x69\x64\x65\x6e\x74\x69\x66\x69\x65\x72':l['\x64\x65\x76\x69\x63\x65\x4d\x61\x63'],'\x73\x65\x72\x69\x61\x6c':l[bR(0x13f)],'\x6c\x75\x6d\x69\x61\x54\x79\x70\x65':ILumiaDeviceType[bR(0x109)],'\x7a\x6f\x6e\x61\x62\x6c\x65':!0x1,'\x6d\x61\x78\x5a\x6f\x6e\x65\x73':0x1,'\x7a\x6f\x6e\x65\x73':[],'\x72\x67\x62':!0x0,'\x77\x68\x69\x74\x65':!0x0,'\x63\x6f\x6e\x6e\x65\x63\x74\x69\x6f\x6e\x54\x79\x70\x65':ILumiaDeviceConnectionType[bR(0x15e)],'\x62\x72\x61\x6e\x64':q?ILumiaDeviceBrands[bR(0x178)]:ILumiaDeviceBrands['\x54\x50\x4c\x49\x4e\x4b'],'\x70\x72\x6f\x64\x75\x63\x74':l?.[bR(0xee)]}});break;}case bR(0x1c5):case bR(0x142):{if(b[bR(a1du.k)]&&!b['\x74\x79\x70\x65\x73']['\x69\x6e\x63\x6c\x75\x64\x65\x73'](ILumiaDeviceType[bR(0x111)]))continue;let v=l['\x64\x65\x76\x69\x63\x65\x54\x79\x70\x65']===bR(0x142),w=(v?a1p(l[bR(0x15d)]):l[bR(0x15d)])??l[bR(0xa4)];k[bR(0x14f)]({'\x6e\x61\x6d\x65':w,'\x69\x64':l[bR(a1du.l)],'\x61\x64\x64\x72\x65\x73\x73':bR(a1du.i)+l['\x69\x70'],'\x68\x6f\x73\x74':l['\x69\x70'],'\x6c\x75\x6d\x69\x61\x49\x6e\x66\x6f':{'\x61\x6c\x69\x61\x73':w,'\x69\x64\x65\x6e\x74\x69\x66\x69\x65\x72':l['\x64\x65\x76\x69\x63\x65\x4d\x61\x63'],'\x73\x65\x72\x69\x61\x6c':l[bR(a1du.n)],'\x6c\x75\x6d\x69\x61\x54\x79\x70\x65':ILumiaDeviceType[bR(a1du.o)],'\x7a\x6f\x6e\x61\x62\x6c\x65':!0x1,'\x6d\x61\x78\x5a\x6f\x6e\x65\x73':0x0,'\x7a\x6f\x6e\x65\x73':[],'\x72\x67\x62':!0x1,'\x77\x68\x69\x74\x65':!0x1,'\x63\x6f\x6e\x6e\x65\x63\x74\x69\x6f\x6e\x54\x79\x70\x65':ILumiaDeviceConnectionType[bR(0x15e)],'\x62\x72\x61\x6e\x64':v?ILumiaDeviceBrands[bR(a1du.p)]:ILumiaDeviceBrands[bR(0x178)],'\x70\x72\x6f\x64\x75\x63\x74':l?.[bR(0xee)]}});break;}}}return k;},a1ae=a1ad,a1af;typeof window<'\x75'&&typeof window[a1aA(0xbf)]!==void 0x0?a1af=window[a1aA(0xbf)]:a1af=a1m;var a1ag=0x4e22,a1ah=a1aA(0x151),a1ai=0xfa0,a1aj=0x320,a1ak=Buffer[a1aA(0x122)](a1aA(0x196),a1aA(0xa5)),a1al=a=>{const a1dv={a:0x1a8,b:0x1a7},bS=a1aA;if(!a||a[bS(a1dv.a)]<0x10)return null;let b=a['\x73\x6c\x69\x63\x65'](0x10)[bS(0x14d)]('\x75\x74\x66\x38'),c=b[bS(a1dv.b)]('\x7b');if(c<0x0)return null;try{return JSON[bS(0x189)](b['\x73\x6c\x69\x63\x65'](c));}catch{return null;}},a1am=a=>{const a1dw={a:0x14d,b:0xbd},bT=a1aA;if(!(typeof a!=bT(0xd5)||!a[bT(0x1a8)]))try{return typeof atob=='\x66\x75\x6e\x63\x74\x69\x6f\x6e'?atob(a):Buffer[bT(0x122)](a,'\x62\x61\x73\x65\x36\x34')[bT(a1dw.a)](bT(a1dw.b));}catch{return;}},a1an=a=>{const a1dx={a:0x135,b:0x1a8,c:0xc5},bU=a1aA;if(!a)return;let b=a[bU(0xd8)](/[^a-fA-F0-9]/g,'')[bU(a1dx.a)]();return b[bU(a1dx.b)]!==0xc?a:b[bU(a1dx.c)](/.{1,2}/g)?.[bU(0xea)]('\x3a');},a1ao=(a,b)=>{const a1dy={a:0x126,b:0xaa,c:0x13a,d:0xc8,e:0xd2,f:0x175,g:0x15d,h:0xe7,i:0x11d,k:0x11d,l:0x11d},bV=a1aA;let c=b?.[bV(a1dy.a)]??b;if(!c||typeof c!=bV(a1dy.b))return null;let d=c['\x69\x70']||a[bV(a1dy.c)];return d?{'\x69\x70':d,'\x6d\x61\x63':a1an(c['\x6d\x61\x63']),'\x64\x65\x76\x69\x63\x65\x49\x64':c['\x64\x65\x76\x69\x63\x65\x5f\x69\x64'],'\x64\x65\x76\x69\x63\x65\x54\x79\x70\x65':c['\x64\x65\x76\x69\x63\x65\x5f\x74\x79\x70\x65'],'\x64\x65\x76\x69\x63\x65\x4d\x6f\x64\x65\x6c':c[bV(a1dy.d)]||c['\x6d\x6f\x64\x65\x6c'],'\x68\x77\x56\x65\x72\x73\x69\x6f\x6e':c[bV(a1dy.e)],'\x66\x77\x56\x65\x72\x73\x69\x6f\x6e':c[bV(0x138)],'\x61\x6c\x69\x61\x73':a1am(c[bV(a1dy.f)])||c[bV(a1dy.g)],'\x6f\x77\x6e\x65\x72':c[bV(a1dy.h)],'\x65\x6e\x63\x72\x79\x70\x74\x54\x79\x70\x65':c[bV(a1dy.i)]?.[bV(0xa3)],'\x68\x74\x74\x70\x50\x6f\x72\x74':c[bV(a1dy.k)]?.[bV(0x155)],'\x73\x75\x70\x70\x6f\x72\x74\x73\x48\x74\x74\x70\x73':c[bV(a1dy.l)]?.['\x69\x73\x5f\x73\x75\x70\x70\x6f\x72\x74\x5f\x68\x74\x74\x70\x73'],'\x72\x61\x77':b}:null;},a1ap=a=>{const a1dH={a:0x103},a1dG={a:0xb2},a1dB={a:0x10a},bW=a1aA;let b=a?.[bW(a1dH.a)]??a1ai;return new Promise((d,g)=>{const a1dF={a:0x122,b:0x100},a1dE={a:0x18f,b:0x1ba},a1dA={a:0x1a8,b:0x180,c:0x176,d:0x98},bX=bW;let h=new Map(),k,l,p,q=!0x1,v=()=>{if(!q){q=!0x0,l&&clearInterval(l),p&&clearTimeout(p);try{k?.['\x63\x6c\x6f\x73\x65']();}catch{}d(Array['\x66\x72\x6f\x6d'](h['\x76\x61\x6c\x75\x65\x73']()));}};try{k=a1af[bX(a1dG.a)](bX(0x1a6)),k['\x6f\x6e'](bX(0x12e),(w,G)=>{const bY=bX;console[bY(0x180)]('\x5b\x74\x61\x70\x6f\x5d\x20\x64\x69\x73\x63\x6f\x76\x65\x72\x79\x20\x72\x65\x73\x70\x6f\x6e\x73\x65',{'\x66\x72\x6f\x6d':G[bY(0x13a)],'\x62\x79\x74\x65\x73':w[bY(a1dA.a)]});let I=a1al(w);if(!I){console[bY(a1dA.b)](bY(a1dA.c),{'\x66\x72\x6f\x6d':G['\x61\x64\x64\x72\x65\x73\x73']});return;}let L=a1ao(G,I);L&&(h[bY(a1dA.d)](L['\x69\x70'])||h[bY(0xa8)](L['\x69\x70'],L));}),k['\x6f\x6e'](bX(0x177),w=>{const bZ=bX;if(!q){q=!0x0,l&&clearInterval(l),p&&clearTimeout(p);try{k?.[bZ(a1dB.a)]();}catch{}g(w);}}),k['\x62\x69\x6e\x64'](void 0x0,void 0x0,()=>{const c0=bX;try{k['\x73\x65\x74\x42\x72\x6f\x61\x64\x63\x61\x73\x74'](!0x0);}catch{}let w=Array[c0(a1dF.a)](new Set([a1ah,...getBroadcastNetworkInterfaces()]));console[c0(0x180)](c0(a1dF.b),{'\x70\x6f\x72\x74':a1ag,'\x62\x72\x6f\x61\x64\x63\x61\x73\x74\x54\x61\x72\x67\x65\x74\x73':w,'\x74\x69\x6d\x65\x6f\x75\x74\x4d\x73':b});let G=()=>{const c1=c0;w[c1(0xa0)](I=>{const c2=c1;try{k[c2(0x112)](a1ak,0x0,a1ak['\x6c\x65\x6e\x67\x74\x68'],a1ag,I);}catch(L){console[c2(0x180)](c2(0x174),{'\x61\x64\x64\x72\x65\x73\x73':I,'\x65\x72\x72\x6f\x72':L?.['\x6d\x65\x73\x73\x61\x67\x65']});}});};G(),l=setInterval(G,a1aj),p=setTimeout(()=>{const c3=c0;console['\x6c\x6f\x67'](c3(a1dE.a),{'\x66\x6f\x75\x6e\x64\x43\x6f\x75\x6e\x74':h[c3(a1dE.b)]}),v();},b);});}catch(w){q=!0x0,g(w);}});},a1aq={};a1o(a1aq,{'\x44\x65\x76\x69\x63\x65\x52\x65\x73\x54\x79\x70\x65\x73':()=>a1at,'\x44\x65\x76\x69\x63\x65\x53\x65\x6e\x64\x56\x61\x6c\x75\x65\x73':()=>a1au,'\x45\x54\x61\x70\x6f\x44\x65\x76\x69\x63\x65\x54\x79\x70\x65\x73':()=>a1as,'\x54\x61\x70\x6f\x44\x65\x76\x69\x63\x65\x54\x79\x70\x65\x73':()=>a1ar});function a1d(a,b){a=a-0x8d;const c=a1c();let d=c[a];return d;}var a1ar={'\x41\x4c\x4c':'\x61\x6c\x6c','\x42\x55\x4c\x42\x53':a1aA(0x19c),'\x4c\x49\x47\x48\x54\x53\x54\x52\x49\x50\x53':a1aA(0x1a2),'\x50\x4c\x55\x47\x53':a1aA(0x91)},a1as=(a=>(a[a1aA(0x16c)]=a1aA(0x16b),a[a1aA(0xf1)]=a1aA(0x19c),a[a1aA(0x1bb)]=a1aA(0x1a2),a[a1aA(0xb4)]=a1aA(0x91),a))(a1as||{}),a1at={'\x42\x55\x4c\x42':a1aA(0x1c5),'\x50\x4c\x55\x47':a1aA(0x1c5)},a1au={'\x42\x55\x4c\x42':a1aA(0x8f),'\x4c\x49\x47\x48\x54\x53\x54\x52\x49\x50':a1aA(0xd6),'\x50\x4c\x55\x47':'\x73\x79\x73\x74\x65\x6d'};export{a1s as LightState,a1a1 as TapoApi,a1a4 as TapoCloudApi,a1aq as TapoConstants,a1ae as discover,a1ac as discoverLocalDevices,a1ap as discoverLocalUdp};
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumiastream/tapo-cove",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.29.2",
|
|
4
4
|
"private": false,
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"copyright": "Copyright © 2026 Lumia Stream",
|
|
6
7
|
"main": "dist/index.js",
|
|
7
8
|
"module": "dist/index.mjs",
|
|
8
9
|
"types": "dist/index.d.ts",
|
|
@@ -15,7 +16,8 @@
|
|
|
15
16
|
},
|
|
16
17
|
"files": [
|
|
17
18
|
"dist",
|
|
18
|
-
"README.md"
|
|
19
|
+
"README.md",
|
|
20
|
+
"LICENSE"
|
|
19
21
|
],
|
|
20
22
|
"sideEffects": false,
|
|
21
23
|
"scripts": {
|
|
@@ -26,8 +28,9 @@
|
|
|
26
28
|
"lint": "tsc"
|
|
27
29
|
},
|
|
28
30
|
"dependencies": {
|
|
29
|
-
"@lumiastream/lumia-rgb-types": "^3.
|
|
30
|
-
"@lumiastream/lumia-rgb-utils": "^3.
|
|
31
|
+
"@lumiastream/lumia-rgb-types": "^3.29.2",
|
|
32
|
+
"@lumiastream/lumia-rgb-utils": "^3.29.2",
|
|
33
|
+
"@lumiastream/network-cove": "^3.29.2",
|
|
31
34
|
"@network-utils/arp-lookup": "^2.1.0",
|
|
32
35
|
"axios": "1.14.0",
|
|
33
36
|
"crypto": "1.0.1",
|
|
@@ -39,5 +42,5 @@
|
|
|
39
42
|
"tsup": "7.2.0",
|
|
40
43
|
"typescript": "5.1.6"
|
|
41
44
|
},
|
|
42
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "8ba053b561ca2dc64ddb186161896194607dbd60"
|
|
43
46
|
}
|