hm-tracking-sdk 0.1.9 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +449 -449
- package/dist/browser/index.es.js +28 -27
- package/dist/browser/index.umd.js +36 -36
- package/dist/sdk/telegram.js +29 -28
- package/dist/sdk/telegram.js.map +1 -1
- package/dist/sdk/types.d.ts +10 -10
- package/dist/sdk/types.js.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.es.js
CHANGED
|
@@ -4374,19 +4374,19 @@ function getTelegramUserUnsafe() {
|
|
|
4374
4374
|
return !r.user || !r.user.id ? null : {
|
|
4375
4375
|
user: {
|
|
4376
4376
|
id: r.user.id,
|
|
4377
|
-
|
|
4378
|
-
|
|
4377
|
+
firstName: r.user.first_name || "",
|
|
4378
|
+
lastName: r.user.last_name || "",
|
|
4379
4379
|
username: r.user.username,
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4380
|
+
photoUrl: r.user.photo_url || "",
|
|
4381
|
+
languageCode: r.user.language_code,
|
|
4382
|
+
isPremium: r.user.is_premium || !1,
|
|
4383
|
+
allowsWriteToPm: r.user.allows_write_to_pm || !1
|
|
4384
4384
|
},
|
|
4385
|
-
|
|
4385
|
+
authDate: Math.floor(Date.now() / 1e3),
|
|
4386
4386
|
hash: r.hash || "",
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4387
|
+
startParam: r.start_param,
|
|
4388
|
+
chatType: r.chat_type,
|
|
4389
|
+
chatInstance: r.chat_instance
|
|
4390
4390
|
};
|
|
4391
4391
|
} catch {
|
|
4392
4392
|
return null;
|
|
@@ -4426,35 +4426,36 @@ function getAnonymousBrowserUser(r = "tg_tracking_uid") {
|
|
|
4426
4426
|
return {
|
|
4427
4427
|
user: {
|
|
4428
4428
|
id: d,
|
|
4429
|
-
|
|
4430
|
-
|
|
4429
|
+
firstName: "Guest",
|
|
4430
|
+
lastName: "",
|
|
4431
4431
|
username: `guest_${f.slice(-6)}`,
|
|
4432
|
-
|
|
4433
|
-
|
|
4432
|
+
languageCode: m.toLowerCase(),
|
|
4433
|
+
isPremium: !1,
|
|
4434
|
+
allowsWriteToPm: !1
|
|
4434
4435
|
},
|
|
4435
|
-
|
|
4436
|
+
authDate: Math.floor(Date.now() / 1e3),
|
|
4436
4437
|
hash: "anonymous_cookie_user",
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4438
|
+
startParam: "browser_guest",
|
|
4439
|
+
chatType: "sender",
|
|
4440
|
+
chatInstance: ""
|
|
4440
4441
|
};
|
|
4441
4442
|
}
|
|
4442
4443
|
function getDefaultMockUser() {
|
|
4443
4444
|
return {
|
|
4444
4445
|
user: {
|
|
4445
4446
|
id: 2077220643,
|
|
4446
|
-
|
|
4447
|
-
|
|
4447
|
+
firstName: "Mock",
|
|
4448
|
+
lastName: "User",
|
|
4448
4449
|
username: "mock_user_demo",
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4450
|
+
languageCode: "zh-hans",
|
|
4451
|
+
isPremium: !0,
|
|
4452
|
+
allowsWriteToPm: !0
|
|
4452
4453
|
},
|
|
4453
|
-
|
|
4454
|
+
authDate: Math.floor(Date.now() / 1e3),
|
|
4454
4455
|
hash: "mock_hash_for_demo_purpose",
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4456
|
+
startParam: "demo_start_param",
|
|
4457
|
+
chatType: "sender",
|
|
4458
|
+
chatInstance: "-245769840322609948"
|
|
4458
4459
|
};
|
|
4459
4460
|
}
|
|
4460
4461
|
var naclUtil$1 = { exports: {} }, naclUtil = naclUtil$1.exports, hasRequiredNaclUtil;
|