@sendity/client 0.1.8 → 0.1.10
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/dist/components/sendity.d.ts +1 -0
- package/dist/i18n/index.d.ts +4 -1
- package/dist/i18n/sendity.ar.d.ts +3 -0
- package/dist/i18n/sendity.cs.d.ts +3 -0
- package/dist/i18n/sendity.da.d.ts +3 -0
- package/dist/i18n/sendity.de-he.d.ts +3 -0
- package/dist/i18n/sendity.el.d.ts +3 -0
- package/dist/i18n/sendity.es.d.ts +3 -0
- package/dist/i18n/sendity.et.d.ts +3 -0
- package/dist/i18n/sendity.fi.d.ts +3 -0
- package/dist/i18n/sendity.he.d.ts +3 -0
- package/dist/i18n/sendity.hr.d.ts +3 -0
- package/dist/i18n/sendity.hy.d.ts +3 -0
- package/dist/i18n/sendity.it.d.ts +3 -0
- package/dist/i18n/sendity.ja.d.ts +3 -0
- package/dist/i18n/sendity.ko.d.ts +3 -0
- package/dist/i18n/sendity.lt.d.ts +3 -0
- package/dist/i18n/sendity.lv.d.ts +3 -0
- package/dist/i18n/sendity.nl.d.ts +3 -0
- package/dist/i18n/sendity.pl.d.ts +3 -0
- package/dist/i18n/sendity.pt.d.ts +3 -0
- package/dist/i18n/sendity.ru.d.ts +3 -0
- package/dist/i18n/sendity.sk.d.ts +3 -0
- package/dist/i18n/sendity.sl.d.ts +3 -0
- package/dist/i18n/sendity.sq.d.ts +3 -0
- package/dist/i18n/sendity.sr.d.ts +3 -0
- package/dist/i18n/sendity.sv.d.ts +3 -0
- package/dist/i18n/sendity.tr.d.ts +3 -0
- package/dist/i18n/sendity.zh.d.ts +3 -0
- package/dist/sendity-client.js +1617 -851
- package/package.json +1 -1
package/dist/sendity-client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const ft = `<template id="sendity-tpl">
|
|
2
2
|
<div class="sendity" role="region" aria-label="Sendity authentication">
|
|
3
3
|
<div class="sendity-body">
|
|
4
4
|
<slot id="prompt">
|
|
@@ -33,7 +33,7 @@ const pt = `<template id="sendity-tpl">
|
|
|
33
33
|
</footer>
|
|
34
34
|
</div>
|
|
35
35
|
</template>
|
|
36
|
-
`,
|
|
36
|
+
`, Bi = `/* Sendity client — passwordless channel-control authentication widget.
|
|
37
37
|
Design tokens mirror the Sendity Design System (emerald accent, stone neutral,
|
|
38
38
|
Zilla Slab display / Geist UI / Geist Mono). All values are overridable via
|
|
39
39
|
CSS custom properties so the host page can theme the widget.
|
|
@@ -693,7 +693,7 @@ const pt = `<template id="sendity-tpl">
|
|
|
693
693
|
--sendity-shadow-error: 0 0 0 1px rgb(244 63 94 / 0.24), 0 18px 46px -18px rgb(244 63 94 / 0.9);
|
|
694
694
|
}
|
|
695
695
|
`;
|
|
696
|
-
class
|
|
696
|
+
class We {
|
|
697
697
|
constructor() {
|
|
698
698
|
this.notificationCreatedEvent = ".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated";
|
|
699
699
|
}
|
|
@@ -722,7 +722,7 @@ class qe {
|
|
|
722
722
|
return this.stopListening(".client-" + i, s);
|
|
723
723
|
}
|
|
724
724
|
}
|
|
725
|
-
class
|
|
725
|
+
class kt {
|
|
726
726
|
/**
|
|
727
727
|
* Create a new class instance.
|
|
728
728
|
*/
|
|
@@ -742,19 +742,19 @@ class Ct {
|
|
|
742
742
|
this.namespace = i;
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
|
-
function
|
|
745
|
+
function Di(g) {
|
|
746
746
|
try {
|
|
747
|
-
return Reflect.construct(String, [],
|
|
747
|
+
return Reflect.construct(String, [], g), !0;
|
|
748
748
|
} catch {
|
|
749
749
|
return !1;
|
|
750
750
|
}
|
|
751
751
|
}
|
|
752
|
-
class
|
|
752
|
+
class Ne extends We {
|
|
753
753
|
/**
|
|
754
754
|
* Create a new class instance.
|
|
755
755
|
*/
|
|
756
756
|
constructor(i, s, a) {
|
|
757
|
-
super(), this.name = s, this.pusher = i, this.options = a, this.eventFormatter = new
|
|
757
|
+
super(), this.name = s, this.pusher = i, this.options = a, this.eventFormatter = new kt(this.options.namespace), this.subscribe();
|
|
758
758
|
}
|
|
759
759
|
/**
|
|
760
760
|
* Subscribe to a Pusher channel.
|
|
@@ -781,11 +781,11 @@ class Ue extends qe {
|
|
|
781
781
|
return this.subscription.bind_global((s, a) => {
|
|
782
782
|
if (s.startsWith("pusher:"))
|
|
783
783
|
return;
|
|
784
|
-
let
|
|
784
|
+
let d = String(this.options.namespace ?? "").replace(
|
|
785
785
|
/\./g,
|
|
786
786
|
"\\"
|
|
787
|
-
),
|
|
788
|
-
i(
|
|
787
|
+
), l = s.startsWith(d) ? s.substring(d.length + 1) : "." + s;
|
|
788
|
+
i(l, a);
|
|
789
789
|
}), this;
|
|
790
790
|
}
|
|
791
791
|
/**
|
|
@@ -826,7 +826,7 @@ class Ue extends qe {
|
|
|
826
826
|
return this.subscription.bind(i, s), this;
|
|
827
827
|
}
|
|
828
828
|
}
|
|
829
|
-
class
|
|
829
|
+
class xt extends Ne {
|
|
830
830
|
/**
|
|
831
831
|
* Send a whisper event to other clients in the channel.
|
|
832
832
|
*/
|
|
@@ -837,7 +837,7 @@ class St extends Ue {
|
|
|
837
837
|
), this;
|
|
838
838
|
}
|
|
839
839
|
}
|
|
840
|
-
class
|
|
840
|
+
class Fi extends Ne {
|
|
841
841
|
/**
|
|
842
842
|
* Send a whisper event to other clients in the channel.
|
|
843
843
|
*/
|
|
@@ -848,7 +848,7 @@ class Di extends Ue {
|
|
|
848
848
|
), this;
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
|
-
class
|
|
851
|
+
class $i extends xt {
|
|
852
852
|
/**
|
|
853
853
|
* Register a callback to be called anytime the member list changes.
|
|
854
854
|
*/
|
|
@@ -883,12 +883,12 @@ class Wi extends St {
|
|
|
883
883
|
}), this;
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
|
-
class
|
|
886
|
+
class Et extends We {
|
|
887
887
|
/**
|
|
888
888
|
* Create a new class instance.
|
|
889
889
|
*/
|
|
890
890
|
constructor(i, s, a) {
|
|
891
|
-
super(), this.events = {}, this.listeners = {}, this.name = s, this.socket = i, this.options = a, this.eventFormatter = new
|
|
891
|
+
super(), this.events = {}, this.listeners = {}, this.name = s, this.socket = i, this.options = a, this.eventFormatter = new kt(this.options.namespace), this.subscribe();
|
|
892
892
|
}
|
|
893
893
|
/**
|
|
894
894
|
* Subscribe to a Socket.io channel.
|
|
@@ -938,8 +938,8 @@ class Tt extends qe {
|
|
|
938
938
|
* Bind the channel's socket to an event and store the callback.
|
|
939
939
|
*/
|
|
940
940
|
on(i, s) {
|
|
941
|
-
return this.listeners[i] = this.listeners[i] || [], this.events[i] || (this.events[i] = (a,
|
|
942
|
-
this.name === a && this.listeners[i] && this.listeners[i].forEach((
|
|
941
|
+
return this.listeners[i] = this.listeners[i] || [], this.events[i] || (this.events[i] = (a, d) => {
|
|
942
|
+
this.name === a && this.listeners[i] && this.listeners[i].forEach((l) => l(d));
|
|
943
943
|
}, this.socket.on(i, this.events[i])), this.listeners[i].push(s), this;
|
|
944
944
|
}
|
|
945
945
|
/**
|
|
@@ -959,7 +959,7 @@ class Tt extends qe {
|
|
|
959
959
|
)), (!s || this.listeners[i].length === 0) && (this.events[i] && (this.socket.removeListener(i, this.events[i]), delete this.events[i]), delete this.listeners[i]);
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
|
-
class
|
|
962
|
+
class Tt extends Et {
|
|
963
963
|
/**
|
|
964
964
|
* Send a whisper event to other clients in the channel.
|
|
965
965
|
*/
|
|
@@ -971,7 +971,7 @@ class Et extends Tt {
|
|
|
971
971
|
}), this;
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
|
-
class
|
|
974
|
+
class Gi extends Tt {
|
|
975
975
|
/**
|
|
976
976
|
* Register a callback to be called anytime the member list changes.
|
|
977
977
|
*/
|
|
@@ -1009,7 +1009,7 @@ class Fi extends Et {
|
|
|
1009
1009
|
), this;
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
1012
|
-
class ge extends
|
|
1012
|
+
class ge extends We {
|
|
1013
1013
|
/**
|
|
1014
1014
|
* Subscribe to a channel.
|
|
1015
1015
|
*/
|
|
@@ -1057,7 +1057,7 @@ class ge extends qe {
|
|
|
1057
1057
|
return this;
|
|
1058
1058
|
}
|
|
1059
1059
|
}
|
|
1060
|
-
class
|
|
1060
|
+
class _t extends ge {
|
|
1061
1061
|
/**
|
|
1062
1062
|
* Send a whisper event to other clients in the channel.
|
|
1063
1063
|
*/
|
|
@@ -1065,7 +1065,7 @@ class xt extends ge {
|
|
|
1065
1065
|
return this;
|
|
1066
1066
|
}
|
|
1067
1067
|
}
|
|
1068
|
-
class
|
|
1068
|
+
class Vi extends ge {
|
|
1069
1069
|
/**
|
|
1070
1070
|
* Send a whisper event to other clients in the channel.
|
|
1071
1071
|
*/
|
|
@@ -1073,7 +1073,7 @@ class Bi extends ge {
|
|
|
1073
1073
|
return this;
|
|
1074
1074
|
}
|
|
1075
1075
|
}
|
|
1076
|
-
class
|
|
1076
|
+
class Ki extends _t {
|
|
1077
1077
|
/**
|
|
1078
1078
|
* Register a callback to be called anytime the member list changes.
|
|
1079
1079
|
*/
|
|
@@ -1099,7 +1099,7 @@ class $i extends xt {
|
|
|
1099
1099
|
return this;
|
|
1100
1100
|
}
|
|
1101
1101
|
}
|
|
1102
|
-
const
|
|
1102
|
+
const At = class Pt {
|
|
1103
1103
|
/**
|
|
1104
1104
|
* Create a new class instance.
|
|
1105
1105
|
*/
|
|
@@ -1111,7 +1111,7 @@ const _t = class kt {
|
|
|
1111
1111
|
*/
|
|
1112
1112
|
setOptions(i) {
|
|
1113
1113
|
this.options = {
|
|
1114
|
-
...
|
|
1114
|
+
...Pt._defaultOptions,
|
|
1115
1115
|
...i,
|
|
1116
1116
|
broadcaster: i.broadcaster
|
|
1117
1117
|
};
|
|
@@ -1126,7 +1126,7 @@ const _t = class kt {
|
|
|
1126
1126
|
return typeof window < "u" && (i = window.Laravel) != null && i.csrfToken ? window.Laravel.csrfToken : this.options.csrfToken ? this.options.csrfToken : typeof document < "u" && typeof document.querySelector == "function" ? ((s = document.querySelector('meta[name="csrf-token"]')) == null ? void 0 : s.getAttribute("content")) ?? null : null;
|
|
1127
1127
|
}
|
|
1128
1128
|
};
|
|
1129
|
-
|
|
1129
|
+
At._defaultOptions = {
|
|
1130
1130
|
auth: {
|
|
1131
1131
|
headers: {}
|
|
1132
1132
|
},
|
|
@@ -1141,8 +1141,8 @@ _t._defaultOptions = {
|
|
|
1141
1141
|
key: null,
|
|
1142
1142
|
namespace: "App.Events"
|
|
1143
1143
|
};
|
|
1144
|
-
let
|
|
1145
|
-
class
|
|
1144
|
+
let He = At;
|
|
1145
|
+
class pe extends He {
|
|
1146
1146
|
constructor() {
|
|
1147
1147
|
super(...arguments), this.channels = {};
|
|
1148
1148
|
}
|
|
@@ -1180,7 +1180,7 @@ class fe extends Ne {
|
|
|
1180
1180
|
* Get a channel instance by name.
|
|
1181
1181
|
*/
|
|
1182
1182
|
channel(i) {
|
|
1183
|
-
return this.channels[i] || (this.channels[i] = new
|
|
1183
|
+
return this.channels[i] || (this.channels[i] = new Ne(
|
|
1184
1184
|
this.pusher,
|
|
1185
1185
|
i,
|
|
1186
1186
|
this.options
|
|
@@ -1190,7 +1190,7 @@ class fe extends Ne {
|
|
|
1190
1190
|
* Get a private channel instance by name.
|
|
1191
1191
|
*/
|
|
1192
1192
|
privateChannel(i) {
|
|
1193
|
-
return this.channels["private-" + i] || (this.channels["private-" + i] = new
|
|
1193
|
+
return this.channels["private-" + i] || (this.channels["private-" + i] = new xt(
|
|
1194
1194
|
this.pusher,
|
|
1195
1195
|
"private-" + i,
|
|
1196
1196
|
this.options
|
|
@@ -1200,7 +1200,7 @@ class fe extends Ne {
|
|
|
1200
1200
|
* Get a private encrypted channel instance by name.
|
|
1201
1201
|
*/
|
|
1202
1202
|
encryptedPrivateChannel(i) {
|
|
1203
|
-
return this.channels["private-encrypted-" + i] || (this.channels["private-encrypted-" + i] = new
|
|
1203
|
+
return this.channels["private-encrypted-" + i] || (this.channels["private-encrypted-" + i] = new Fi(
|
|
1204
1204
|
this.pusher,
|
|
1205
1205
|
"private-encrypted-" + i,
|
|
1206
1206
|
this.options
|
|
@@ -1210,7 +1210,7 @@ class fe extends Ne {
|
|
|
1210
1210
|
* Get a presence channel instance by name.
|
|
1211
1211
|
*/
|
|
1212
1212
|
presenceChannel(i) {
|
|
1213
|
-
return this.channels["presence-" + i] || (this.channels["presence-" + i] = new
|
|
1213
|
+
return this.channels["presence-" + i] || (this.channels["presence-" + i] = new $i(
|
|
1214
1214
|
this.pusher,
|
|
1215
1215
|
"presence-" + i,
|
|
1216
1216
|
this.options
|
|
@@ -1264,11 +1264,11 @@ class fe extends Ne {
|
|
|
1264
1264
|
const s = () => {
|
|
1265
1265
|
i(this.connectionStatus());
|
|
1266
1266
|
}, a = ["state_change", "connected", "disconnected"];
|
|
1267
|
-
return a.forEach((
|
|
1268
|
-
this.pusher.connection.bind(
|
|
1267
|
+
return a.forEach((d) => {
|
|
1268
|
+
this.pusher.connection.bind(d, s);
|
|
1269
1269
|
}), () => {
|
|
1270
|
-
a.forEach((
|
|
1271
|
-
this.pusher.connection.unbind(
|
|
1270
|
+
a.forEach((d) => {
|
|
1271
|
+
this.pusher.connection.unbind(d, s);
|
|
1272
1272
|
});
|
|
1273
1273
|
};
|
|
1274
1274
|
}
|
|
@@ -1279,7 +1279,7 @@ class fe extends Ne {
|
|
|
1279
1279
|
this.pusher.disconnect();
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
|
-
class
|
|
1282
|
+
class Xi extends He {
|
|
1283
1283
|
constructor() {
|
|
1284
1284
|
super(...arguments), this.channels = {};
|
|
1285
1285
|
}
|
|
@@ -1319,7 +1319,7 @@ class Vi extends Ne {
|
|
|
1319
1319
|
* Get a channel instance by name.
|
|
1320
1320
|
*/
|
|
1321
1321
|
channel(i) {
|
|
1322
|
-
return this.channels[i] || (this.channels[i] = new
|
|
1322
|
+
return this.channels[i] || (this.channels[i] = new Et(
|
|
1323
1323
|
this.socket,
|
|
1324
1324
|
i,
|
|
1325
1325
|
this.options
|
|
@@ -1329,7 +1329,7 @@ class Vi extends Ne {
|
|
|
1329
1329
|
* Get a private channel instance by name.
|
|
1330
1330
|
*/
|
|
1331
1331
|
privateChannel(i) {
|
|
1332
|
-
return this.channels["private-" + i] || (this.channels["private-" + i] = new
|
|
1332
|
+
return this.channels["private-" + i] || (this.channels["private-" + i] = new Tt(
|
|
1333
1333
|
this.socket,
|
|
1334
1334
|
"private-" + i,
|
|
1335
1335
|
this.options
|
|
@@ -1339,7 +1339,7 @@ class Vi extends Ne {
|
|
|
1339
1339
|
* Get a presence channel instance by name.
|
|
1340
1340
|
*/
|
|
1341
1341
|
presenceChannel(i) {
|
|
1342
|
-
return this.channels["presence-" + i] || (this.channels["presence-" + i] = new
|
|
1342
|
+
return this.channels["presence-" + i] || (this.channels["presence-" + i] = new Gi(
|
|
1343
1343
|
this.socket,
|
|
1344
1344
|
"presence-" + i,
|
|
1345
1345
|
this.options
|
|
@@ -1386,11 +1386,11 @@ class Vi extends Ne {
|
|
|
1386
1386
|
"reconnect_error",
|
|
1387
1387
|
"reconnect_failed"
|
|
1388
1388
|
];
|
|
1389
|
-
return a.forEach((
|
|
1390
|
-
this.socket.on(
|
|
1389
|
+
return a.forEach((d) => {
|
|
1390
|
+
this.socket.on(d, s);
|
|
1391
1391
|
}), () => {
|
|
1392
|
-
a.forEach((
|
|
1393
|
-
this.socket.off(
|
|
1392
|
+
a.forEach((d) => {
|
|
1393
|
+
this.socket.off(d, s);
|
|
1394
1394
|
});
|
|
1395
1395
|
};
|
|
1396
1396
|
}
|
|
@@ -1401,7 +1401,7 @@ class Vi extends Ne {
|
|
|
1401
1401
|
this.socket.disconnect();
|
|
1402
1402
|
}
|
|
1403
1403
|
}
|
|
1404
|
-
class mt extends
|
|
1404
|
+
class mt extends He {
|
|
1405
1405
|
constructor() {
|
|
1406
1406
|
super(...arguments), this.channels = {};
|
|
1407
1407
|
}
|
|
@@ -1426,19 +1426,19 @@ class mt extends Ne {
|
|
|
1426
1426
|
* Get a private channel instance by name.
|
|
1427
1427
|
*/
|
|
1428
1428
|
privateChannel(i) {
|
|
1429
|
-
return new
|
|
1429
|
+
return new _t();
|
|
1430
1430
|
}
|
|
1431
1431
|
/**
|
|
1432
1432
|
* Get a private encrypted channel instance by name.
|
|
1433
1433
|
*/
|
|
1434
1434
|
encryptedPrivateChannel(i) {
|
|
1435
|
-
return new
|
|
1435
|
+
return new Vi();
|
|
1436
1436
|
}
|
|
1437
1437
|
/**
|
|
1438
1438
|
* Get a presence channel instance by name.
|
|
1439
1439
|
*/
|
|
1440
1440
|
presenceChannel(i) {
|
|
1441
|
-
return new
|
|
1441
|
+
return new Ki();
|
|
1442
1442
|
}
|
|
1443
1443
|
/**
|
|
1444
1444
|
* Leave the given channel, as well as its private and presence variants.
|
|
@@ -1475,7 +1475,7 @@ class mt extends Ne {
|
|
|
1475
1475
|
disconnect() {
|
|
1476
1476
|
}
|
|
1477
1477
|
}
|
|
1478
|
-
class
|
|
1478
|
+
class Ji {
|
|
1479
1479
|
/**
|
|
1480
1480
|
* Create a new class instance.
|
|
1481
1481
|
*/
|
|
@@ -1493,23 +1493,23 @@ class Xi {
|
|
|
1493
1493
|
*/
|
|
1494
1494
|
connect() {
|
|
1495
1495
|
if (this.options.broadcaster === "reverb")
|
|
1496
|
-
this.connector = new
|
|
1496
|
+
this.connector = new pe({
|
|
1497
1497
|
...this.options,
|
|
1498
1498
|
cluster: ""
|
|
1499
1499
|
});
|
|
1500
1500
|
else if (this.options.broadcaster === "pusher")
|
|
1501
|
-
this.connector = new
|
|
1501
|
+
this.connector = new pe(this.options);
|
|
1502
1502
|
else if (this.options.broadcaster === "ably")
|
|
1503
|
-
this.connector = new
|
|
1503
|
+
this.connector = new pe({
|
|
1504
1504
|
...this.options,
|
|
1505
1505
|
cluster: "",
|
|
1506
1506
|
broadcaster: "pusher"
|
|
1507
1507
|
});
|
|
1508
1508
|
else if (this.options.broadcaster === "socket.io")
|
|
1509
|
-
this.connector = new
|
|
1509
|
+
this.connector = new Xi(this.options);
|
|
1510
1510
|
else if (this.options.broadcaster === "null")
|
|
1511
1511
|
this.connector = new mt(this.options);
|
|
1512
|
-
else if (typeof this.options.broadcaster == "function" &&
|
|
1512
|
+
else if (typeof this.options.broadcaster == "function" && Di(this.options.broadcaster))
|
|
1513
1513
|
this.connector = new this.options.broadcaster(this.options);
|
|
1514
1514
|
else
|
|
1515
1515
|
throw new Error(
|
|
@@ -1572,7 +1572,7 @@ class Xi {
|
|
|
1572
1572
|
);
|
|
1573
1573
|
}
|
|
1574
1574
|
connectorSupportsEncryptedPrivateChannels(i) {
|
|
1575
|
-
return i instanceof
|
|
1575
|
+
return i instanceof pe || i instanceof mt;
|
|
1576
1576
|
}
|
|
1577
1577
|
/**
|
|
1578
1578
|
* Get the Socket ID for the connection.
|
|
@@ -1633,203 +1633,203 @@ class Xi {
|
|
|
1633
1633
|
);
|
|
1634
1634
|
}
|
|
1635
1635
|
}
|
|
1636
|
-
function
|
|
1637
|
-
return
|
|
1636
|
+
function Yi(g) {
|
|
1637
|
+
return g && g.__esModule && Object.prototype.hasOwnProperty.call(g, "default") ? g.default : g;
|
|
1638
1638
|
}
|
|
1639
|
-
var
|
|
1639
|
+
var Le = { exports: {} };
|
|
1640
1640
|
var gt;
|
|
1641
|
-
function
|
|
1642
|
-
return gt || (gt = 1, (function(
|
|
1643
|
-
(function(a,
|
|
1644
|
-
|
|
1641
|
+
function Zi() {
|
|
1642
|
+
return gt || (gt = 1, (function(g, i) {
|
|
1643
|
+
(function(a, d) {
|
|
1644
|
+
g.exports = d();
|
|
1645
1645
|
})(self, () => (
|
|
1646
1646
|
/******/
|
|
1647
1647
|
(() => {
|
|
1648
1648
|
var s = {
|
|
1649
1649
|
/***/
|
|
1650
|
-
594(m,
|
|
1650
|
+
594(m, v) {
|
|
1651
1651
|
var y = this && this.__extends || /* @__PURE__ */ (function() {
|
|
1652
|
-
var
|
|
1653
|
-
return
|
|
1654
|
-
C.__proto__ =
|
|
1655
|
-
} || function(C,
|
|
1656
|
-
for (var
|
|
1657
|
-
},
|
|
1652
|
+
var x = function(u, p) {
|
|
1653
|
+
return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(C, P) {
|
|
1654
|
+
C.__proto__ = P;
|
|
1655
|
+
} || function(C, P) {
|
|
1656
|
+
for (var W in P) P.hasOwnProperty(W) && (C[W] = P[W]);
|
|
1657
|
+
}, x(u, p);
|
|
1658
1658
|
};
|
|
1659
|
-
return function(u,
|
|
1660
|
-
|
|
1659
|
+
return function(u, p) {
|
|
1660
|
+
x(u, p);
|
|
1661
1661
|
function C() {
|
|
1662
1662
|
this.constructor = u;
|
|
1663
1663
|
}
|
|
1664
|
-
u.prototype =
|
|
1664
|
+
u.prototype = p === null ? Object.create(p) : (C.prototype = p.prototype, new C());
|
|
1665
1665
|
};
|
|
1666
1666
|
})();
|
|
1667
|
-
Object.defineProperty(
|
|
1668
|
-
var
|
|
1667
|
+
Object.defineProperty(v, "__esModule", { value: !0 });
|
|
1668
|
+
var E = 256, S = (
|
|
1669
1669
|
/** @class */
|
|
1670
1670
|
(function() {
|
|
1671
|
-
function
|
|
1671
|
+
function x(u) {
|
|
1672
1672
|
u === void 0 && (u = "="), this._paddingCharacter = u;
|
|
1673
1673
|
}
|
|
1674
|
-
return
|
|
1674
|
+
return x.prototype.encodedLength = function(u) {
|
|
1675
1675
|
return this._paddingCharacter ? (u + 2) / 3 * 4 | 0 : (u * 8 + 5) / 6 | 0;
|
|
1676
|
-
},
|
|
1677
|
-
for (var
|
|
1678
|
-
var
|
|
1679
|
-
|
|
1676
|
+
}, x.prototype.encode = function(u) {
|
|
1677
|
+
for (var p = "", C = 0; C < u.length - 2; C += 3) {
|
|
1678
|
+
var P = u[C] << 16 | u[C + 1] << 8 | u[C + 2];
|
|
1679
|
+
p += this._encodeByte(P >>> 18 & 63), p += this._encodeByte(P >>> 12 & 63), p += this._encodeByte(P >>> 6 & 63), p += this._encodeByte(P >>> 0 & 63);
|
|
1680
1680
|
}
|
|
1681
|
-
var
|
|
1682
|
-
if (
|
|
1683
|
-
var
|
|
1684
|
-
|
|
1681
|
+
var W = u.length - C;
|
|
1682
|
+
if (W > 0) {
|
|
1683
|
+
var P = u[C] << 16 | (W === 2 ? u[C + 1] << 8 : 0);
|
|
1684
|
+
p += this._encodeByte(P >>> 18 & 63), p += this._encodeByte(P >>> 12 & 63), W === 2 ? p += this._encodeByte(P >>> 6 & 63) : p += this._paddingCharacter || "", p += this._paddingCharacter || "";
|
|
1685
1685
|
}
|
|
1686
|
-
return
|
|
1687
|
-
},
|
|
1686
|
+
return p;
|
|
1687
|
+
}, x.prototype.maxDecodedLength = function(u) {
|
|
1688
1688
|
return this._paddingCharacter ? u / 4 * 3 | 0 : (u * 6 + 7) / 8 | 0;
|
|
1689
|
-
},
|
|
1689
|
+
}, x.prototype.decodedLength = function(u) {
|
|
1690
1690
|
return this.maxDecodedLength(u.length - this._getPaddingLength(u));
|
|
1691
|
-
},
|
|
1691
|
+
}, x.prototype.decode = function(u) {
|
|
1692
1692
|
if (u.length === 0)
|
|
1693
1693
|
return new Uint8Array(0);
|
|
1694
|
-
for (var
|
|
1695
|
-
|
|
1696
|
-
if (
|
|
1694
|
+
for (var p = this._getPaddingLength(u), C = u.length - p, P = new Uint8Array(this.maxDecodedLength(C)), W = 0, z = 0, U = 0, K = 0, M = 0, q = 0, X = 0; z < C - 4; z += 4)
|
|
1695
|
+
K = this._decodeChar(u.charCodeAt(z + 0)), M = this._decodeChar(u.charCodeAt(z + 1)), q = this._decodeChar(u.charCodeAt(z + 2)), X = this._decodeChar(u.charCodeAt(z + 3)), P[W++] = K << 2 | M >>> 4, P[W++] = M << 4 | q >>> 2, P[W++] = q << 6 | X, U |= K & E, U |= M & E, U |= q & E, U |= X & E;
|
|
1696
|
+
if (z < C - 1 && (K = this._decodeChar(u.charCodeAt(z)), M = this._decodeChar(u.charCodeAt(z + 1)), P[W++] = K << 2 | M >>> 4, U |= K & E, U |= M & E), z < C - 2 && (q = this._decodeChar(u.charCodeAt(z + 2)), P[W++] = M << 4 | q >>> 2, U |= q & E), z < C - 3 && (X = this._decodeChar(u.charCodeAt(z + 3)), P[W++] = q << 6 | X, U |= X & E), U !== 0)
|
|
1697
1697
|
throw new Error("Base64Coder: incorrect characters for decoding");
|
|
1698
|
-
return
|
|
1699
|
-
},
|
|
1700
|
-
var
|
|
1701
|
-
return
|
|
1702
|
-
},
|
|
1703
|
-
var
|
|
1704
|
-
return
|
|
1705
|
-
},
|
|
1706
|
-
var
|
|
1698
|
+
return P;
|
|
1699
|
+
}, x.prototype._encodeByte = function(u) {
|
|
1700
|
+
var p = u;
|
|
1701
|
+
return p += 65, p += 25 - u >>> 8 & 6, p += 51 - u >>> 8 & -75, p += 61 - u >>> 8 & -15, p += 62 - u >>> 8 & 3, String.fromCharCode(p);
|
|
1702
|
+
}, x.prototype._decodeChar = function(u) {
|
|
1703
|
+
var p = E;
|
|
1704
|
+
return p += (42 - u & u - 44) >>> 8 & -E + u - 43 + 62, p += (46 - u & u - 48) >>> 8 & -E + u - 47 + 63, p += (47 - u & u - 58) >>> 8 & -E + u - 48 + 52, p += (64 - u & u - 91) >>> 8 & -E + u - 65 + 0, p += (96 - u & u - 123) >>> 8 & -E + u - 97 + 26, p;
|
|
1705
|
+
}, x.prototype._getPaddingLength = function(u) {
|
|
1706
|
+
var p = 0;
|
|
1707
1707
|
if (this._paddingCharacter) {
|
|
1708
1708
|
for (var C = u.length - 1; C >= 0 && u[C] === this._paddingCharacter; C--)
|
|
1709
|
-
|
|
1710
|
-
if (u.length < 4 ||
|
|
1709
|
+
p++;
|
|
1710
|
+
if (u.length < 4 || p > 2)
|
|
1711
1711
|
throw new Error("Base64Coder: incorrect padding");
|
|
1712
1712
|
}
|
|
1713
|
-
return
|
|
1714
|
-
},
|
|
1713
|
+
return p;
|
|
1714
|
+
}, x;
|
|
1715
1715
|
})()
|
|
1716
1716
|
);
|
|
1717
|
-
|
|
1718
|
-
var
|
|
1719
|
-
function
|
|
1720
|
-
return
|
|
1717
|
+
v.Coder = S;
|
|
1718
|
+
var I = new S();
|
|
1719
|
+
function k(x) {
|
|
1720
|
+
return I.encode(x);
|
|
1721
1721
|
}
|
|
1722
|
-
|
|
1723
|
-
function A(
|
|
1724
|
-
return
|
|
1722
|
+
v.encode = k;
|
|
1723
|
+
function A(x) {
|
|
1724
|
+
return I.decode(x);
|
|
1725
1725
|
}
|
|
1726
|
-
|
|
1727
|
-
var
|
|
1726
|
+
v.decode = A;
|
|
1727
|
+
var B = (
|
|
1728
1728
|
/** @class */
|
|
1729
|
-
(function(
|
|
1730
|
-
y(u,
|
|
1729
|
+
(function(x) {
|
|
1730
|
+
y(u, x);
|
|
1731
1731
|
function u() {
|
|
1732
|
-
return
|
|
1732
|
+
return x !== null && x.apply(this, arguments) || this;
|
|
1733
1733
|
}
|
|
1734
|
-
return u.prototype._encodeByte = function(
|
|
1735
|
-
var C =
|
|
1736
|
-
return C += 65, C += 25 -
|
|
1737
|
-
}, u.prototype._decodeChar = function(
|
|
1738
|
-
var C =
|
|
1739
|
-
return C += (44 -
|
|
1734
|
+
return u.prototype._encodeByte = function(p) {
|
|
1735
|
+
var C = p;
|
|
1736
|
+
return C += 65, C += 25 - p >>> 8 & 6, C += 51 - p >>> 8 & -75, C += 61 - p >>> 8 & -13, C += 62 - p >>> 8 & 49, String.fromCharCode(C);
|
|
1737
|
+
}, u.prototype._decodeChar = function(p) {
|
|
1738
|
+
var C = E;
|
|
1739
|
+
return C += (44 - p & p - 46) >>> 8 & -E + p - 45 + 62, C += (94 - p & p - 96) >>> 8 & -E + p - 95 + 63, C += (47 - p & p - 58) >>> 8 & -E + p - 48 + 52, C += (64 - p & p - 91) >>> 8 & -E + p - 65 + 0, C += (96 - p & p - 123) >>> 8 & -E + p - 97 + 26, C;
|
|
1740
1740
|
}, u;
|
|
1741
1741
|
})(S)
|
|
1742
1742
|
);
|
|
1743
|
-
|
|
1744
|
-
var
|
|
1745
|
-
function
|
|
1746
|
-
return
|
|
1743
|
+
v.URLSafeCoder = B;
|
|
1744
|
+
var H = new B();
|
|
1745
|
+
function D(x) {
|
|
1746
|
+
return H.encode(x);
|
|
1747
1747
|
}
|
|
1748
|
-
|
|
1749
|
-
function te(
|
|
1750
|
-
return
|
|
1748
|
+
v.encodeURLSafe = D;
|
|
1749
|
+
function te(x) {
|
|
1750
|
+
return H.decode(x);
|
|
1751
1751
|
}
|
|
1752
|
-
|
|
1753
|
-
return
|
|
1754
|
-
},
|
|
1755
|
-
return
|
|
1756
|
-
},
|
|
1757
|
-
return
|
|
1752
|
+
v.decodeURLSafe = te, v.encodedLength = function(x) {
|
|
1753
|
+
return I.encodedLength(x);
|
|
1754
|
+
}, v.maxDecodedLength = function(x) {
|
|
1755
|
+
return I.maxDecodedLength(x);
|
|
1756
|
+
}, v.decodedLength = function(x) {
|
|
1757
|
+
return I.decodedLength(x);
|
|
1758
1758
|
};
|
|
1759
1759
|
},
|
|
1760
1760
|
/***/
|
|
1761
|
-
978(m,
|
|
1761
|
+
978(m, v) {
|
|
1762
1762
|
var y = "utf8: invalid source encoding";
|
|
1763
|
-
function
|
|
1764
|
-
for (var
|
|
1765
|
-
var A = S[
|
|
1763
|
+
function E(S) {
|
|
1764
|
+
for (var I = [], k = 0; k < S.length; k++) {
|
|
1765
|
+
var A = S[k];
|
|
1766
1766
|
if (A & 128) {
|
|
1767
|
-
var
|
|
1767
|
+
var B = void 0;
|
|
1768
1768
|
if (A < 224) {
|
|
1769
|
-
if (
|
|
1769
|
+
if (k >= S.length)
|
|
1770
1770
|
throw new Error(y);
|
|
1771
|
-
var
|
|
1772
|
-
if ((
|
|
1771
|
+
var H = S[++k];
|
|
1772
|
+
if ((H & 192) !== 128)
|
|
1773
1773
|
throw new Error(y);
|
|
1774
|
-
A = (A & 31) << 6 |
|
|
1774
|
+
A = (A & 31) << 6 | H & 63, B = 128;
|
|
1775
1775
|
} else if (A < 240) {
|
|
1776
|
-
if (
|
|
1776
|
+
if (k >= S.length - 1)
|
|
1777
1777
|
throw new Error(y);
|
|
1778
|
-
var
|
|
1779
|
-
if ((
|
|
1778
|
+
var H = S[++k], D = S[++k];
|
|
1779
|
+
if ((H & 192) !== 128 || (D & 192) !== 128)
|
|
1780
1780
|
throw new Error(y);
|
|
1781
|
-
A = (A & 15) << 12 | (
|
|
1781
|
+
A = (A & 15) << 12 | (H & 63) << 6 | D & 63, B = 2048;
|
|
1782
1782
|
} else if (A < 248) {
|
|
1783
|
-
if (
|
|
1783
|
+
if (k >= S.length - 2)
|
|
1784
1784
|
throw new Error(y);
|
|
1785
|
-
var
|
|
1786
|
-
if ((
|
|
1785
|
+
var H = S[++k], D = S[++k], te = S[++k];
|
|
1786
|
+
if ((H & 192) !== 128 || (D & 192) !== 128 || (te & 192) !== 128)
|
|
1787
1787
|
throw new Error(y);
|
|
1788
|
-
A = (A & 15) << 18 | (
|
|
1788
|
+
A = (A & 15) << 18 | (H & 63) << 12 | (D & 63) << 6 | te & 63, B = 65536;
|
|
1789
1789
|
} else
|
|
1790
1790
|
throw new Error(y);
|
|
1791
|
-
if (A <
|
|
1791
|
+
if (A < B || A >= 55296 && A <= 57343)
|
|
1792
1792
|
throw new Error(y);
|
|
1793
1793
|
if (A >= 65536) {
|
|
1794
1794
|
if (A > 1114111)
|
|
1795
1795
|
throw new Error(y);
|
|
1796
|
-
A -= 65536,
|
|
1796
|
+
A -= 65536, I.push(String.fromCharCode(55296 | A >> 10)), A = 56320 | A & 1023;
|
|
1797
1797
|
}
|
|
1798
1798
|
}
|
|
1799
|
-
|
|
1799
|
+
I.push(String.fromCharCode(A));
|
|
1800
1800
|
}
|
|
1801
|
-
return
|
|
1801
|
+
return I.join("");
|
|
1802
1802
|
}
|
|
1803
|
-
|
|
1803
|
+
v.D4 = E;
|
|
1804
1804
|
},
|
|
1805
1805
|
/***/
|
|
1806
|
-
721(m,
|
|
1806
|
+
721(m, v, y) {
|
|
1807
1807
|
m.exports = y(207).default;
|
|
1808
1808
|
},
|
|
1809
1809
|
/***/
|
|
1810
|
-
207(m,
|
|
1811
|
-
y.d(
|
|
1810
|
+
207(m, v, y) {
|
|
1811
|
+
y.d(v, {
|
|
1812
1812
|
default: () => (
|
|
1813
1813
|
/* binding */
|
|
1814
|
-
|
|
1814
|
+
le
|
|
1815
1815
|
)
|
|
1816
1816
|
});
|
|
1817
|
-
class
|
|
1817
|
+
class E {
|
|
1818
1818
|
constructor(e, t) {
|
|
1819
1819
|
this.lastId = 0, this.prefix = e, this.name = t;
|
|
1820
1820
|
}
|
|
1821
1821
|
create(e) {
|
|
1822
1822
|
this.lastId++;
|
|
1823
|
-
var t = this.lastId, r = this.prefix + t, o = this.name + "[" + t + "]", c = !1,
|
|
1823
|
+
var t = this.lastId, r = this.prefix + t, o = this.name + "[" + t + "]", c = !1, h = function() {
|
|
1824
1824
|
c || (e.apply(null, arguments), c = !0);
|
|
1825
1825
|
};
|
|
1826
|
-
return this[t] =
|
|
1826
|
+
return this[t] = h, { number: t, id: r, name: o, callback: h };
|
|
1827
1827
|
}
|
|
1828
1828
|
remove(e) {
|
|
1829
1829
|
delete this[e.number];
|
|
1830
1830
|
}
|
|
1831
1831
|
}
|
|
1832
|
-
var S = new
|
|
1832
|
+
var S = new E("_pusher_script_", "Pusher.ScriptReceivers"), I = {
|
|
1833
1833
|
VERSION: "8.5.0",
|
|
1834
1834
|
PROTOCOL: 7,
|
|
1835
1835
|
wsPort: 80,
|
|
@@ -1857,7 +1857,7 @@ function Gi() {
|
|
|
1857
1857
|
cdn_https: "https://js.pusher.com",
|
|
1858
1858
|
dependency_suffix: ""
|
|
1859
1859
|
};
|
|
1860
|
-
const
|
|
1860
|
+
const k = I;
|
|
1861
1861
|
class A {
|
|
1862
1862
|
constructor(e) {
|
|
1863
1863
|
this.options = e, this.receivers = e.receivers || S, this.loading = {};
|
|
@@ -1868,17 +1868,17 @@ function Gi() {
|
|
|
1868
1868
|
o.loading[e].push(r);
|
|
1869
1869
|
else {
|
|
1870
1870
|
o.loading[e] = [r];
|
|
1871
|
-
var c = w.createScriptRequest(o.getPath(e, t)),
|
|
1872
|
-
if (o.receivers.remove(
|
|
1871
|
+
var c = w.createScriptRequest(o.getPath(e, t)), h = o.receivers.create(function(f) {
|
|
1872
|
+
if (o.receivers.remove(h), o.loading[e]) {
|
|
1873
1873
|
var b = o.loading[e];
|
|
1874
1874
|
delete o.loading[e];
|
|
1875
|
-
for (var
|
|
1876
|
-
|
|
1877
|
-
},
|
|
1878
|
-
b[
|
|
1875
|
+
for (var T = function(R) {
|
|
1876
|
+
R || c.cleanup();
|
|
1877
|
+
}, _ = 0; _ < b.length; _++)
|
|
1878
|
+
b[_](f, T);
|
|
1879
1879
|
}
|
|
1880
1880
|
});
|
|
1881
|
-
c.send(
|
|
1881
|
+
c.send(h);
|
|
1882
1882
|
}
|
|
1883
1883
|
}
|
|
1884
1884
|
getRoot(e) {
|
|
@@ -1889,14 +1889,14 @@ function Gi() {
|
|
|
1889
1889
|
return this.getRoot(t) + "/" + e + this.options.suffix + ".js";
|
|
1890
1890
|
}
|
|
1891
1891
|
}
|
|
1892
|
-
var
|
|
1893
|
-
cdn_http:
|
|
1894
|
-
cdn_https:
|
|
1895
|
-
version:
|
|
1896
|
-
suffix:
|
|
1897
|
-
receivers:
|
|
1892
|
+
var B = new E("_pusher_dependencies", "Pusher.DependenciesReceivers"), H = new A({
|
|
1893
|
+
cdn_http: k.cdn_http,
|
|
1894
|
+
cdn_https: k.cdn_https,
|
|
1895
|
+
version: k.VERSION,
|
|
1896
|
+
suffix: k.dependency_suffix,
|
|
1897
|
+
receivers: B
|
|
1898
1898
|
});
|
|
1899
|
-
const
|
|
1899
|
+
const D = {
|
|
1900
1900
|
baseUrl: "https://pusher.com",
|
|
1901
1901
|
urls: {
|
|
1902
1902
|
authenticationEndpoint: {
|
|
@@ -1915,18 +1915,18 @@ function Gi() {
|
|
|
1915
1915
|
fullUrl: "https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"
|
|
1916
1916
|
}
|
|
1917
1917
|
}
|
|
1918
|
-
},
|
|
1919
|
-
const e = "See:", t =
|
|
1918
|
+
}, x = { buildLogSuffix: function(n) {
|
|
1919
|
+
const e = "See:", t = D.urls[n];
|
|
1920
1920
|
if (!t)
|
|
1921
1921
|
return "";
|
|
1922
1922
|
let r;
|
|
1923
|
-
return t.fullUrl ? r = t.fullUrl : t.path && (r =
|
|
1923
|
+
return t.fullUrl ? r = t.fullUrl : t.path && (r = D.baseUrl + t.path), r ? `${e} ${r}` : "";
|
|
1924
1924
|
} };
|
|
1925
1925
|
var u;
|
|
1926
1926
|
(function(n) {
|
|
1927
1927
|
n.UserAuthentication = "user-authentication", n.ChannelAuthorization = "channel-authorization";
|
|
1928
1928
|
})(u || (u = {}));
|
|
1929
|
-
class
|
|
1929
|
+
class p extends Error {
|
|
1930
1930
|
constructor(e) {
|
|
1931
1931
|
super(e), Object.setPrototypeOf(this, new.target.prototype);
|
|
1932
1932
|
}
|
|
@@ -1936,84 +1936,84 @@ function Gi() {
|
|
|
1936
1936
|
super(e), Object.setPrototypeOf(this, new.target.prototype);
|
|
1937
1937
|
}
|
|
1938
1938
|
}
|
|
1939
|
-
class
|
|
1939
|
+
class P extends Error {
|
|
1940
1940
|
constructor(e) {
|
|
1941
1941
|
super(e), Object.setPrototypeOf(this, new.target.prototype);
|
|
1942
1942
|
}
|
|
1943
1943
|
}
|
|
1944
|
-
class
|
|
1944
|
+
class W extends Error {
|
|
1945
1945
|
constructor(e) {
|
|
1946
1946
|
super(e), Object.setPrototypeOf(this, new.target.prototype);
|
|
1947
1947
|
}
|
|
1948
1948
|
}
|
|
1949
|
-
class
|
|
1949
|
+
class z extends Error {
|
|
1950
1950
|
constructor(e) {
|
|
1951
1951
|
super(e), Object.setPrototypeOf(this, new.target.prototype);
|
|
1952
1952
|
}
|
|
1953
1953
|
}
|
|
1954
|
-
class
|
|
1954
|
+
class U extends Error {
|
|
1955
1955
|
constructor(e) {
|
|
1956
1956
|
super(e), Object.setPrototypeOf(this, new.target.prototype);
|
|
1957
1957
|
}
|
|
1958
1958
|
}
|
|
1959
|
-
class
|
|
1959
|
+
class K extends Error {
|
|
1960
1960
|
constructor(e) {
|
|
1961
1961
|
super(e), Object.setPrototypeOf(this, new.target.prototype);
|
|
1962
1962
|
}
|
|
1963
1963
|
}
|
|
1964
|
-
class
|
|
1964
|
+
class M extends Error {
|
|
1965
1965
|
constructor(e) {
|
|
1966
1966
|
super(e), Object.setPrototypeOf(this, new.target.prototype);
|
|
1967
1967
|
}
|
|
1968
1968
|
}
|
|
1969
|
-
class
|
|
1969
|
+
class q extends Error {
|
|
1970
1970
|
constructor(e, t) {
|
|
1971
1971
|
super(t), this.status = e, Object.setPrototypeOf(this, new.target.prototype);
|
|
1972
1972
|
}
|
|
1973
1973
|
}
|
|
1974
|
-
const
|
|
1974
|
+
const jt = function(n, e, t, r, o) {
|
|
1975
1975
|
const c = w.createXHR();
|
|
1976
1976
|
c.open("POST", t.endpoint, !0), c.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
|
1977
|
-
for (var
|
|
1978
|
-
c.setRequestHeader(
|
|
1977
|
+
for (var h in t.headers)
|
|
1978
|
+
c.setRequestHeader(h, t.headers[h]);
|
|
1979
1979
|
if (t.headersProvider != null) {
|
|
1980
|
-
let
|
|
1981
|
-
for (var
|
|
1982
|
-
c.setRequestHeader(
|
|
1980
|
+
let f = t.headersProvider();
|
|
1981
|
+
for (var h in f)
|
|
1982
|
+
c.setRequestHeader(h, f[h]);
|
|
1983
1983
|
}
|
|
1984
1984
|
return c.onreadystatechange = function() {
|
|
1985
1985
|
if (c.readyState === 4)
|
|
1986
1986
|
if (c.status === 200) {
|
|
1987
|
-
let
|
|
1987
|
+
let f, b = !1;
|
|
1988
1988
|
try {
|
|
1989
|
-
|
|
1989
|
+
f = JSON.parse(c.responseText), b = !0;
|
|
1990
1990
|
} catch {
|
|
1991
|
-
o(new
|
|
1991
|
+
o(new q(200, `JSON returned from ${r.toString()} endpoint was invalid, yet status code was 200. Data was: ${c.responseText}`), null);
|
|
1992
1992
|
}
|
|
1993
|
-
b && o(null,
|
|
1993
|
+
b && o(null, f);
|
|
1994
1994
|
} else {
|
|
1995
|
-
let
|
|
1995
|
+
let f = "";
|
|
1996
1996
|
switch (r) {
|
|
1997
1997
|
case u.UserAuthentication:
|
|
1998
|
-
|
|
1998
|
+
f = x.buildLogSuffix("authenticationEndpoint");
|
|
1999
1999
|
break;
|
|
2000
2000
|
case u.ChannelAuthorization:
|
|
2001
|
-
|
|
2001
|
+
f = `Clients must be authorized to join private or presence channels. ${x.buildLogSuffix("authorizationEndpoint")}`;
|
|
2002
2002
|
break;
|
|
2003
2003
|
}
|
|
2004
|
-
o(new
|
|
2004
|
+
o(new q(c.status, `Unable to retrieve auth string from ${r.toString()} endpoint - received status: ${c.status} from ${t.endpoint}. ${f}`), null);
|
|
2005
2005
|
}
|
|
2006
2006
|
}, c.send(e), c;
|
|
2007
2007
|
};
|
|
2008
|
-
function
|
|
2009
|
-
return
|
|
2008
|
+
function It(n) {
|
|
2009
|
+
return zt(Nt(n));
|
|
2010
2010
|
}
|
|
2011
|
-
var ne = String.fromCharCode, oe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
|
|
2011
|
+
var ne = String.fromCharCode, oe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Wt = function(n) {
|
|
2012
2012
|
var e = n.charCodeAt(0);
|
|
2013
2013
|
return e < 128 ? n : e < 2048 ? ne(192 | e >>> 6) + ne(128 | e & 63) : ne(224 | e >>> 12 & 15) + ne(128 | e >>> 6 & 63) + ne(128 | e & 63);
|
|
2014
|
-
},
|
|
2015
|
-
return n.replace(/[^\x00-\x7F]/g,
|
|
2016
|
-
},
|
|
2014
|
+
}, Nt = function(n) {
|
|
2015
|
+
return n.replace(/[^\x00-\x7F]/g, Wt);
|
|
2016
|
+
}, Ht = function(n) {
|
|
2017
2017
|
var e = [0, 2, 1][n.length % 3], t = n.charCodeAt(0) << 16 | (n.length > 1 ? n.charCodeAt(1) : 0) << 8 | (n.length > 2 ? n.charCodeAt(2) : 0), r = [
|
|
2018
2018
|
oe.charAt(t >>> 18),
|
|
2019
2019
|
oe.charAt(t >>> 12 & 63),
|
|
@@ -2021,10 +2021,10 @@ function Gi() {
|
|
|
2021
2021
|
e >= 1 ? "=" : oe.charAt(t & 63)
|
|
2022
2022
|
];
|
|
2023
2023
|
return r.join("");
|
|
2024
|
-
},
|
|
2025
|
-
return n.replace(/[\s\S]{1,3}/g,
|
|
2024
|
+
}, zt = window.btoa || function(n) {
|
|
2025
|
+
return n.replace(/[\s\S]{1,3}/g, Ht);
|
|
2026
2026
|
};
|
|
2027
|
-
class
|
|
2027
|
+
class Ot {
|
|
2028
2028
|
constructor(e, t, r, o) {
|
|
2029
2029
|
this.clear = t, this.timer = e(() => {
|
|
2030
2030
|
this.timer && (this.timer = o(this.timer));
|
|
@@ -2037,33 +2037,33 @@ function Gi() {
|
|
|
2037
2037
|
this.timer && (this.clear(this.timer), this.timer = null);
|
|
2038
2038
|
}
|
|
2039
2039
|
}
|
|
2040
|
-
const
|
|
2041
|
-
function
|
|
2040
|
+
const Ue = Ot;
|
|
2041
|
+
function Ut(n) {
|
|
2042
2042
|
window.clearTimeout(n);
|
|
2043
2043
|
}
|
|
2044
|
-
function
|
|
2044
|
+
function qt(n) {
|
|
2045
2045
|
window.clearInterval(n);
|
|
2046
2046
|
}
|
|
2047
|
-
class
|
|
2047
|
+
class J extends Ue {
|
|
2048
2048
|
constructor(e, t) {
|
|
2049
|
-
super(setTimeout,
|
|
2049
|
+
super(setTimeout, Ut, e, function(r) {
|
|
2050
2050
|
return t(), null;
|
|
2051
2051
|
});
|
|
2052
2052
|
}
|
|
2053
2053
|
}
|
|
2054
|
-
class
|
|
2054
|
+
class Mt extends Ue {
|
|
2055
2055
|
constructor(e, t) {
|
|
2056
|
-
super(setInterval,
|
|
2056
|
+
super(setInterval, qt, e, function(r) {
|
|
2057
2057
|
return t(), r;
|
|
2058
2058
|
});
|
|
2059
2059
|
}
|
|
2060
2060
|
}
|
|
2061
|
-
var
|
|
2061
|
+
var Bt = {
|
|
2062
2062
|
now() {
|
|
2063
2063
|
return Date.now ? Date.now() : (/* @__PURE__ */ new Date()).valueOf();
|
|
2064
2064
|
},
|
|
2065
2065
|
defer(n) {
|
|
2066
|
-
return new
|
|
2066
|
+
return new J(0, n);
|
|
2067
2067
|
},
|
|
2068
2068
|
method(n, ...e) {
|
|
2069
2069
|
var t = Array.prototype.slice.call(arguments, 1);
|
|
@@ -2072,21 +2072,21 @@ function Gi() {
|
|
|
2072
2072
|
};
|
|
2073
2073
|
}
|
|
2074
2074
|
};
|
|
2075
|
-
const
|
|
2076
|
-
function
|
|
2075
|
+
const N = Bt;
|
|
2076
|
+
function O(n, ...e) {
|
|
2077
2077
|
for (var t = 0; t < e.length; t++) {
|
|
2078
2078
|
var r = e[t];
|
|
2079
2079
|
for (var o in r)
|
|
2080
|
-
r[o] && r[o].constructor && r[o].constructor === Object ? n[o] =
|
|
2080
|
+
r[o] && r[o].constructor && r[o].constructor === Object ? n[o] = O(n[o] || {}, r[o]) : n[o] = r[o];
|
|
2081
2081
|
}
|
|
2082
2082
|
return n;
|
|
2083
2083
|
}
|
|
2084
|
-
function
|
|
2084
|
+
function Dt() {
|
|
2085
2085
|
for (var n = ["Pusher"], e = 0; e < arguments.length; e++)
|
|
2086
2086
|
typeof arguments[e] == "string" ? n.push(arguments[e]) : n.push(ae(arguments[e]));
|
|
2087
2087
|
return n.join(" : ");
|
|
2088
2088
|
}
|
|
2089
|
-
function
|
|
2089
|
+
function qe(n, e) {
|
|
2090
2090
|
var t = Array.prototype.indexOf;
|
|
2091
2091
|
if (n === null)
|
|
2092
2092
|
return -1;
|
|
@@ -2101,13 +2101,13 @@ function Gi() {
|
|
|
2101
2101
|
for (var t in n)
|
|
2102
2102
|
Object.prototype.hasOwnProperty.call(n, t) && e(n[t], t, n);
|
|
2103
2103
|
}
|
|
2104
|
-
function
|
|
2104
|
+
function Me(n) {
|
|
2105
2105
|
var e = [];
|
|
2106
2106
|
return $(n, function(t, r) {
|
|
2107
2107
|
e.push(r);
|
|
2108
2108
|
}), e;
|
|
2109
2109
|
}
|
|
2110
|
-
function
|
|
2110
|
+
function Ft(n) {
|
|
2111
2111
|
var e = [];
|
|
2112
2112
|
return $(n, function(t) {
|
|
2113
2113
|
e.push(t);
|
|
@@ -2117,18 +2117,18 @@ function Gi() {
|
|
|
2117
2117
|
for (var r = 0; r < n.length; r++)
|
|
2118
2118
|
e.call(t || window, n[r], r, n);
|
|
2119
2119
|
}
|
|
2120
|
-
function
|
|
2120
|
+
function Be(n, e) {
|
|
2121
2121
|
for (var t = [], r = 0; r < n.length; r++)
|
|
2122
2122
|
t.push(e(n[r], r, n, t));
|
|
2123
2123
|
return t;
|
|
2124
2124
|
}
|
|
2125
|
-
function
|
|
2125
|
+
function $t(n, e) {
|
|
2126
2126
|
var t = {};
|
|
2127
2127
|
return $(n, function(r, o) {
|
|
2128
2128
|
t[o] = e(r);
|
|
2129
2129
|
}), t;
|
|
2130
2130
|
}
|
|
2131
|
-
function
|
|
2131
|
+
function De(n, e) {
|
|
2132
2132
|
e = e || function(o) {
|
|
2133
2133
|
return !!o;
|
|
2134
2134
|
};
|
|
@@ -2136,13 +2136,13 @@ function Gi() {
|
|
|
2136
2136
|
e(n[r], r, n, t) && t.push(n[r]);
|
|
2137
2137
|
return t;
|
|
2138
2138
|
}
|
|
2139
|
-
function
|
|
2139
|
+
function Fe(n, e) {
|
|
2140
2140
|
var t = {};
|
|
2141
2141
|
return $(n, function(r, o) {
|
|
2142
2142
|
(e && e(r, o, n, t) || r) && (t[o] = r);
|
|
2143
2143
|
}), t;
|
|
2144
2144
|
}
|
|
2145
|
-
function
|
|
2145
|
+
function Gt(n) {
|
|
2146
2146
|
var e = [];
|
|
2147
2147
|
return $(n, function(t, r) {
|
|
2148
2148
|
e.push([r, t]);
|
|
@@ -2154,41 +2154,41 @@ function Gi() {
|
|
|
2154
2154
|
return !0;
|
|
2155
2155
|
return !1;
|
|
2156
2156
|
}
|
|
2157
|
-
function
|
|
2157
|
+
function Vt(n, e) {
|
|
2158
2158
|
for (var t = 0; t < n.length; t++)
|
|
2159
2159
|
if (!e(n[t], t, n))
|
|
2160
2160
|
return !1;
|
|
2161
2161
|
return !0;
|
|
2162
2162
|
}
|
|
2163
|
-
function
|
|
2164
|
-
return
|
|
2165
|
-
return typeof e == "object" && (e = ae(e)), encodeURIComponent(
|
|
2163
|
+
function Kt(n) {
|
|
2164
|
+
return $t(n, function(e) {
|
|
2165
|
+
return typeof e == "object" && (e = ae(e)), encodeURIComponent(It(e.toString()));
|
|
2166
2166
|
});
|
|
2167
2167
|
}
|
|
2168
|
-
function
|
|
2169
|
-
var e =
|
|
2168
|
+
function Xt(n) {
|
|
2169
|
+
var e = Fe(n, function(r) {
|
|
2170
2170
|
return r !== void 0;
|
|
2171
|
-
}), t =
|
|
2171
|
+
}), t = Be(Gt(Kt(e)), N.method("join", "=")).join("&");
|
|
2172
2172
|
return t;
|
|
2173
2173
|
}
|
|
2174
|
-
function
|
|
2174
|
+
function Jt(n) {
|
|
2175
2175
|
var e = [], t = [];
|
|
2176
2176
|
return (function r(o, c) {
|
|
2177
|
-
var
|
|
2177
|
+
var h, f, b;
|
|
2178
2178
|
switch (typeof o) {
|
|
2179
2179
|
case "object":
|
|
2180
2180
|
if (!o)
|
|
2181
2181
|
return null;
|
|
2182
|
-
for (
|
|
2183
|
-
if (e[
|
|
2184
|
-
return { $ref: t[
|
|
2182
|
+
for (h = 0; h < e.length; h += 1)
|
|
2183
|
+
if (e[h] === o)
|
|
2184
|
+
return { $ref: t[h] };
|
|
2185
2185
|
if (e.push(o), t.push(c), Object.prototype.toString.apply(o) === "[object Array]")
|
|
2186
|
-
for (b = [],
|
|
2187
|
-
b[
|
|
2186
|
+
for (b = [], h = 0; h < o.length; h += 1)
|
|
2187
|
+
b[h] = r(o[h], c + "[" + h + "]");
|
|
2188
2188
|
else {
|
|
2189
2189
|
b = {};
|
|
2190
|
-
for (
|
|
2191
|
-
Object.prototype.hasOwnProperty.call(o,
|
|
2190
|
+
for (f in o)
|
|
2191
|
+
Object.prototype.hasOwnProperty.call(o, f) && (b[f] = r(o[f], c + "[" + JSON.stringify(f) + "]"));
|
|
2192
2192
|
}
|
|
2193
2193
|
return b;
|
|
2194
2194
|
case "number":
|
|
@@ -2202,10 +2202,10 @@ function Gi() {
|
|
|
2202
2202
|
try {
|
|
2203
2203
|
return JSON.stringify(n);
|
|
2204
2204
|
} catch {
|
|
2205
|
-
return JSON.stringify(
|
|
2205
|
+
return JSON.stringify(Jt(n));
|
|
2206
2206
|
}
|
|
2207
2207
|
}
|
|
2208
|
-
class
|
|
2208
|
+
class Yt {
|
|
2209
2209
|
constructor() {
|
|
2210
2210
|
this.globalLog = (e) => {
|
|
2211
2211
|
window.console && window.console.log && window.console.log(e);
|
|
@@ -2227,26 +2227,26 @@ function Gi() {
|
|
|
2227
2227
|
window.console && window.console.error ? window.console.error(e) : this.globalLogWarn(e);
|
|
2228
2228
|
}
|
|
2229
2229
|
log(e, ...t) {
|
|
2230
|
-
var r =
|
|
2231
|
-
|
|
2230
|
+
var r = Dt.apply(this, arguments);
|
|
2231
|
+
le.log ? le.log(r) : le.logToConsole && e.bind(this)(r);
|
|
2232
2232
|
}
|
|
2233
2233
|
}
|
|
2234
|
-
const
|
|
2235
|
-
var
|
|
2236
|
-
(t.headers !== void 0 || t.headersProvider != null) &&
|
|
2234
|
+
const L = new Yt();
|
|
2235
|
+
var Zt = function(n, e, t, r, o) {
|
|
2236
|
+
(t.headers !== void 0 || t.headersProvider != null) && L.warn(`To send headers with the ${r.toString()} request, you must use AJAX, rather than JSONP.`);
|
|
2237
2237
|
var c = n.nextAuthCallbackID.toString();
|
|
2238
2238
|
n.nextAuthCallbackID++;
|
|
2239
|
-
var
|
|
2240
|
-
n.auth_callbacks[c] = function(
|
|
2241
|
-
o(null,
|
|
2239
|
+
var h = n.getDocument(), f = h.createElement("script");
|
|
2240
|
+
n.auth_callbacks[c] = function(_) {
|
|
2241
|
+
o(null, _);
|
|
2242
2242
|
};
|
|
2243
2243
|
var b = "Pusher.auth_callbacks['" + c + "']";
|
|
2244
|
-
|
|
2245
|
-
var
|
|
2246
|
-
|
|
2244
|
+
f.src = t.endpoint + "?callback=" + encodeURIComponent(b) + "&" + e;
|
|
2245
|
+
var T = h.getElementsByTagName("head")[0] || h.documentElement;
|
|
2246
|
+
T.insertBefore(f, T.firstChild);
|
|
2247
2247
|
};
|
|
2248
|
-
const
|
|
2249
|
-
class
|
|
2248
|
+
const Qt = Zt;
|
|
2249
|
+
class en {
|
|
2250
2250
|
constructor(e) {
|
|
2251
2251
|
this.src = e;
|
|
2252
2252
|
}
|
|
@@ -2266,13 +2266,13 @@ function Gi() {
|
|
|
2266
2266
|
this.script && (this.script.onload = this.script.onerror = null, this.script.onreadystatechange = null), this.script && this.script.parentNode && this.script.parentNode.removeChild(this.script), this.errorScript && this.errorScript.parentNode && this.errorScript.parentNode.removeChild(this.errorScript), this.script = null, this.errorScript = null;
|
|
2267
2267
|
}
|
|
2268
2268
|
}
|
|
2269
|
-
class
|
|
2269
|
+
class tn {
|
|
2270
2270
|
constructor(e, t) {
|
|
2271
2271
|
this.url = e, this.data = t;
|
|
2272
2272
|
}
|
|
2273
2273
|
send(e) {
|
|
2274
2274
|
if (!this.request) {
|
|
2275
|
-
var t =
|
|
2275
|
+
var t = Xt(this.data), r = this.url + "/" + e.number + "?" + t;
|
|
2276
2276
|
this.request = w.createScriptRequest(r), this.request.send(e);
|
|
2277
2277
|
}
|
|
2278
2278
|
}
|
|
@@ -2280,37 +2280,37 @@ function Gi() {
|
|
|
2280
2280
|
this.request && this.request.cleanup();
|
|
2281
2281
|
}
|
|
2282
2282
|
}
|
|
2283
|
-
var
|
|
2283
|
+
var nn = function(n, e) {
|
|
2284
2284
|
return function(t, r) {
|
|
2285
|
-
var o = "http" + (e ? "s" : "") + "://", c = o + (n.host || n.options.host) + n.options.path,
|
|
2286
|
-
S.remove(
|
|
2285
|
+
var o = "http" + (e ? "s" : "") + "://", c = o + (n.host || n.options.host) + n.options.path, h = w.createJSONPRequest(c, t), f = w.ScriptReceivers.create(function(b, T) {
|
|
2286
|
+
S.remove(f), h.cleanup(), T && T.host && (n.host = T.host), r && r(b, T);
|
|
2287
2287
|
});
|
|
2288
|
-
|
|
2288
|
+
h.send(f);
|
|
2289
2289
|
};
|
|
2290
|
-
},
|
|
2290
|
+
}, rn = {
|
|
2291
2291
|
name: "jsonp",
|
|
2292
|
-
getAgent:
|
|
2292
|
+
getAgent: nn
|
|
2293
2293
|
};
|
|
2294
|
-
const
|
|
2294
|
+
const sn = rn;
|
|
2295
2295
|
function ye(n, e, t) {
|
|
2296
2296
|
var r = n + (e.useTLS ? "s" : ""), o = e.useTLS ? e.hostTLS : e.hostNonTLS;
|
|
2297
2297
|
return r + "://" + o + t;
|
|
2298
2298
|
}
|
|
2299
2299
|
function be(n, e) {
|
|
2300
|
-
var t = "/app/" + n, r = "?protocol=" +
|
|
2300
|
+
var t = "/app/" + n, r = "?protocol=" + k.PROTOCOL + "&client=js&version=" + k.VERSION + (e ? "&" + e : "");
|
|
2301
2301
|
return t + r;
|
|
2302
2302
|
}
|
|
2303
|
-
var
|
|
2303
|
+
var on = {
|
|
2304
2304
|
getInitial: function(n, e) {
|
|
2305
2305
|
var t = (e.httpPath || "") + be(n, "flash=false");
|
|
2306
2306
|
return ye("ws", e, t);
|
|
2307
2307
|
}
|
|
2308
|
-
},
|
|
2308
|
+
}, an = {
|
|
2309
2309
|
getInitial: function(n, e) {
|
|
2310
2310
|
var t = (e.httpPath || "/pusher") + be(n);
|
|
2311
2311
|
return ye("http", e, t);
|
|
2312
2312
|
}
|
|
2313
|
-
},
|
|
2313
|
+
}, cn = {
|
|
2314
2314
|
getInitial: function(n, e) {
|
|
2315
2315
|
return ye("http", e, e.httpPath || "/pusher");
|
|
2316
2316
|
},
|
|
@@ -2318,7 +2318,7 @@ function Gi() {
|
|
|
2318
2318
|
return be(n);
|
|
2319
2319
|
}
|
|
2320
2320
|
};
|
|
2321
|
-
class
|
|
2321
|
+
class dn {
|
|
2322
2322
|
constructor() {
|
|
2323
2323
|
this._callbacks = {};
|
|
2324
2324
|
}
|
|
@@ -2337,12 +2337,12 @@ function Gi() {
|
|
|
2337
2337
|
this._callbacks = {};
|
|
2338
2338
|
return;
|
|
2339
2339
|
}
|
|
2340
|
-
var o = e ? [we(e)] :
|
|
2340
|
+
var o = e ? [we(e)] : Me(this._callbacks);
|
|
2341
2341
|
t || r ? this.removeCallback(o, t, r) : this.removeAllCallbacks(o);
|
|
2342
2342
|
}
|
|
2343
2343
|
removeCallback(e, t, r) {
|
|
2344
2344
|
ie(e, function(o) {
|
|
2345
|
-
this._callbacks[o] =
|
|
2345
|
+
this._callbacks[o] = De(this._callbacks[o] || [], function(c) {
|
|
2346
2346
|
return t && t !== c.fn || r && r !== c.context;
|
|
2347
2347
|
}), this._callbacks[o].length === 0 && delete this._callbacks[o];
|
|
2348
2348
|
}, this);
|
|
@@ -2356,9 +2356,9 @@ function Gi() {
|
|
|
2356
2356
|
function we(n) {
|
|
2357
2357
|
return "_" + n;
|
|
2358
2358
|
}
|
|
2359
|
-
class
|
|
2359
|
+
class G {
|
|
2360
2360
|
constructor(e) {
|
|
2361
|
-
this.callbacks = new
|
|
2361
|
+
this.callbacks = new dn(), this.global_callbacks = [], this.failThrough = e;
|
|
2362
2362
|
}
|
|
2363
2363
|
bind(e, t, r) {
|
|
2364
2364
|
return this.callbacks.add(e, t, r), this;
|
|
@@ -2370,7 +2370,7 @@ function Gi() {
|
|
|
2370
2370
|
return this.callbacks.remove(e, t, r), this;
|
|
2371
2371
|
}
|
|
2372
2372
|
unbind_global(e) {
|
|
2373
|
-
return e ? (this.global_callbacks =
|
|
2373
|
+
return e ? (this.global_callbacks = De(this.global_callbacks || [], (t) => t !== e), this) : (this.global_callbacks = [], this);
|
|
2374
2374
|
}
|
|
2375
2375
|
unbind_all() {
|
|
2376
2376
|
return this.unbind(), this.unbind_global(), this;
|
|
@@ -2378,15 +2378,15 @@ function Gi() {
|
|
|
2378
2378
|
emit(e, t, r) {
|
|
2379
2379
|
for (var o = 0; o < this.global_callbacks.length; o++)
|
|
2380
2380
|
this.global_callbacks[o](e, t);
|
|
2381
|
-
var c = this.callbacks.get(e),
|
|
2382
|
-
if (r ?
|
|
2381
|
+
var c = this.callbacks.get(e), h = [];
|
|
2382
|
+
if (r ? h.push(t, r) : t && h.push(t), c && c.length > 0)
|
|
2383
2383
|
for (var o = 0; o < c.length; o++)
|
|
2384
|
-
c[o].fn.apply(c[o].context || window,
|
|
2384
|
+
c[o].fn.apply(c[o].context || window, h);
|
|
2385
2385
|
else this.failThrough && this.failThrough(e, t);
|
|
2386
2386
|
return this;
|
|
2387
2387
|
}
|
|
2388
2388
|
}
|
|
2389
|
-
class
|
|
2389
|
+
class hn extends G {
|
|
2390
2390
|
constructor(e, t, r, o, c) {
|
|
2391
2391
|
super(), this.initialize = w.transportConnectionInitializer, this.hooks = e, this.name = t, this.priority = r, this.key = o, this.options = c, this.state = "new", this.timeline = c.timeline, this.activityTimeout = c.activityTimeout, this.id = this.timeline.generateUniqueID();
|
|
2392
2392
|
}
|
|
@@ -2403,17 +2403,17 @@ function Gi() {
|
|
|
2403
2403
|
try {
|
|
2404
2404
|
this.socket = this.hooks.getSocket(e, this.options);
|
|
2405
2405
|
} catch (t) {
|
|
2406
|
-
return
|
|
2406
|
+
return N.defer(() => {
|
|
2407
2407
|
this.onError(t), this.changeState("closed");
|
|
2408
2408
|
}), !1;
|
|
2409
2409
|
}
|
|
2410
|
-
return this.bindListeners(),
|
|
2410
|
+
return this.bindListeners(), L.debug("Connecting", { transport: this.name, url: e }), this.changeState("connecting"), !0;
|
|
2411
2411
|
}
|
|
2412
2412
|
close() {
|
|
2413
2413
|
return this.socket ? (this.socket.close(), !0) : !1;
|
|
2414
2414
|
}
|
|
2415
2415
|
send(e) {
|
|
2416
|
-
return this.state === "open" ? (
|
|
2416
|
+
return this.state === "open" ? (N.defer(() => {
|
|
2417
2417
|
this.socket && this.socket.send(e);
|
|
2418
2418
|
}), !0) : !1;
|
|
2419
2419
|
}
|
|
@@ -2462,7 +2462,7 @@ function Gi() {
|
|
|
2462
2462
|
})), this.emit(e, t);
|
|
2463
2463
|
}
|
|
2464
2464
|
buildTimelineMessage(e) {
|
|
2465
|
-
return
|
|
2465
|
+
return O({ cid: this.id }, e);
|
|
2466
2466
|
}
|
|
2467
2467
|
}
|
|
2468
2468
|
class ee {
|
|
@@ -2473,11 +2473,11 @@ function Gi() {
|
|
|
2473
2473
|
return this.hooks.isSupported(e);
|
|
2474
2474
|
}
|
|
2475
2475
|
createConnection(e, t, r, o) {
|
|
2476
|
-
return new
|
|
2476
|
+
return new hn(this.hooks, e, t, r, o);
|
|
2477
2477
|
}
|
|
2478
2478
|
}
|
|
2479
|
-
var
|
|
2480
|
-
urls:
|
|
2479
|
+
var ln = new ee({
|
|
2480
|
+
urls: on,
|
|
2481
2481
|
handlesActivityChecks: !1,
|
|
2482
2482
|
supportsPing: !1,
|
|
2483
2483
|
isInitialized: function() {
|
|
@@ -2489,34 +2489,34 @@ function Gi() {
|
|
|
2489
2489
|
getSocket: function(n) {
|
|
2490
2490
|
return w.createWebSocket(n);
|
|
2491
2491
|
}
|
|
2492
|
-
}),
|
|
2493
|
-
urls:
|
|
2492
|
+
}), Ge = {
|
|
2493
|
+
urls: an,
|
|
2494
2494
|
handlesActivityChecks: !1,
|
|
2495
2495
|
supportsPing: !0,
|
|
2496
2496
|
isInitialized: function() {
|
|
2497
2497
|
return !0;
|
|
2498
2498
|
}
|
|
2499
|
-
},
|
|
2499
|
+
}, Ve = O({
|
|
2500
2500
|
getSocket: function(n) {
|
|
2501
2501
|
return w.HTTPFactory.createStreamingSocket(n);
|
|
2502
2502
|
}
|
|
2503
|
-
},
|
|
2503
|
+
}, Ge), Ke = O({
|
|
2504
2504
|
getSocket: function(n) {
|
|
2505
2505
|
return w.HTTPFactory.createPollingSocket(n);
|
|
2506
2506
|
}
|
|
2507
|
-
},
|
|
2507
|
+
}, Ge), Xe = {
|
|
2508
2508
|
isSupported: function() {
|
|
2509
2509
|
return w.isXHRSupported();
|
|
2510
2510
|
}
|
|
2511
|
-
},
|
|
2512
|
-
ws:
|
|
2513
|
-
xhr_streaming:
|
|
2514
|
-
xhr_polling:
|
|
2511
|
+
}, un = new ee(O({}, Ve, Xe)), pn = new ee(O({}, Ke, Xe)), fn = {
|
|
2512
|
+
ws: ln,
|
|
2513
|
+
xhr_streaming: un,
|
|
2514
|
+
xhr_polling: pn
|
|
2515
2515
|
};
|
|
2516
|
-
const ce =
|
|
2517
|
-
var
|
|
2516
|
+
const ce = fn;
|
|
2517
|
+
var mn = new ee({
|
|
2518
2518
|
file: "sockjs",
|
|
2519
|
-
urls:
|
|
2519
|
+
urls: cn,
|
|
2520
2520
|
handlesActivityChecks: !0,
|
|
2521
2521
|
supportsPing: !1,
|
|
2522
2522
|
isSupported: function() {
|
|
@@ -2527,7 +2527,7 @@ function Gi() {
|
|
|
2527
2527
|
},
|
|
2528
2528
|
getSocket: function(n, e) {
|
|
2529
2529
|
return new window.SockJS(n, null, {
|
|
2530
|
-
js_path:
|
|
2530
|
+
js_path: H.getPath("sockjs", {
|
|
2531
2531
|
useTLS: e.useTLS
|
|
2532
2532
|
}),
|
|
2533
2533
|
ignore_null_origin: e.ignoreNullOrigin
|
|
@@ -2538,15 +2538,15 @@ function Gi() {
|
|
|
2538
2538
|
path: e
|
|
2539
2539
|
}));
|
|
2540
2540
|
}
|
|
2541
|
-
}),
|
|
2541
|
+
}), Je = {
|
|
2542
2542
|
isSupported: function(n) {
|
|
2543
2543
|
var e = w.isXDRSupported(n.useTLS);
|
|
2544
2544
|
return e;
|
|
2545
2545
|
}
|
|
2546
|
-
},
|
|
2547
|
-
ce.xdr_streaming =
|
|
2548
|
-
const
|
|
2549
|
-
class
|
|
2546
|
+
}, gn = new ee(O({}, Ve, Je)), vn = new ee(O({}, Ke, Je));
|
|
2547
|
+
ce.xdr_streaming = gn, ce.xdr_polling = vn, ce.sockjs = mn;
|
|
2548
|
+
const yn = ce;
|
|
2549
|
+
class bn extends G {
|
|
2550
2550
|
constructor() {
|
|
2551
2551
|
super();
|
|
2552
2552
|
var e = this;
|
|
@@ -2560,32 +2560,32 @@ function Gi() {
|
|
|
2560
2560
|
return window.navigator.onLine === void 0 ? !0 : window.navigator.onLine;
|
|
2561
2561
|
}
|
|
2562
2562
|
}
|
|
2563
|
-
var
|
|
2564
|
-
class
|
|
2563
|
+
var wn = new bn();
|
|
2564
|
+
class Cn {
|
|
2565
2565
|
constructor(e, t, r) {
|
|
2566
2566
|
this.manager = e, this.transport = t, this.minPingDelay = r.minPingDelay, this.maxPingDelay = r.maxPingDelay, this.pingDelay = void 0;
|
|
2567
2567
|
}
|
|
2568
2568
|
createConnection(e, t, r, o) {
|
|
2569
|
-
o =
|
|
2569
|
+
o = O({}, o, {
|
|
2570
2570
|
activityTimeout: this.pingDelay
|
|
2571
2571
|
});
|
|
2572
|
-
var c = this.transport.createConnection(e, t, r, o),
|
|
2573
|
-
c.unbind("open",
|
|
2574
|
-
}, b = (
|
|
2575
|
-
if (c.unbind("closed", b),
|
|
2572
|
+
var c = this.transport.createConnection(e, t, r, o), h = null, f = function() {
|
|
2573
|
+
c.unbind("open", f), c.bind("closed", b), h = N.now();
|
|
2574
|
+
}, b = (T) => {
|
|
2575
|
+
if (c.unbind("closed", b), T.code === 1002 || T.code === 1003)
|
|
2576
2576
|
this.manager.reportDeath();
|
|
2577
|
-
else if (!
|
|
2578
|
-
var
|
|
2579
|
-
|
|
2577
|
+
else if (!T.wasClean && h) {
|
|
2578
|
+
var _ = N.now() - h;
|
|
2579
|
+
_ < 2 * this.maxPingDelay && (this.manager.reportDeath(), this.pingDelay = Math.max(_ / 2, this.minPingDelay));
|
|
2580
2580
|
}
|
|
2581
2581
|
};
|
|
2582
|
-
return c.bind("open",
|
|
2582
|
+
return c.bind("open", f), c;
|
|
2583
2583
|
}
|
|
2584
2584
|
isSupported(e) {
|
|
2585
2585
|
return this.manager.isAlive() && this.transport.isSupported(e);
|
|
2586
2586
|
}
|
|
2587
2587
|
}
|
|
2588
|
-
const
|
|
2588
|
+
const Ye = {
|
|
2589
2589
|
decodeMessage: function(n) {
|
|
2590
2590
|
try {
|
|
2591
2591
|
var e = JSON.parse(n.data), t = e.data;
|
|
@@ -2608,7 +2608,7 @@ function Gi() {
|
|
|
2608
2608
|
return JSON.stringify(n);
|
|
2609
2609
|
},
|
|
2610
2610
|
processHandshake: function(n) {
|
|
2611
|
-
var e =
|
|
2611
|
+
var e = Ye.decodeMessage(n);
|
|
2612
2612
|
if (e.event === "pusher:connection_established") {
|
|
2613
2613
|
if (!e.data.activity_timeout)
|
|
2614
2614
|
throw "No activity timeout specified in handshake";
|
|
@@ -2638,8 +2638,8 @@ function Gi() {
|
|
|
2638
2638
|
}
|
|
2639
2639
|
} : null;
|
|
2640
2640
|
}
|
|
2641
|
-
},
|
|
2642
|
-
class
|
|
2641
|
+
}, Y = Ye;
|
|
2642
|
+
class Sn extends G {
|
|
2643
2643
|
constructor(e, t) {
|
|
2644
2644
|
super(), this.id = e, this.transport = t, this.activityTimeout = t.activityTimeout, this.bindListeners();
|
|
2645
2645
|
}
|
|
@@ -2651,7 +2651,7 @@ function Gi() {
|
|
|
2651
2651
|
}
|
|
2652
2652
|
send_event(e, t, r) {
|
|
2653
2653
|
var o = { event: e, data: t };
|
|
2654
|
-
return r && (o.channel = r),
|
|
2654
|
+
return r && (o.channel = r), L.debug("Event sent", o), this.send(Y.encodeMessage(o));
|
|
2655
2655
|
}
|
|
2656
2656
|
ping() {
|
|
2657
2657
|
this.transport.supportsPing() ? this.transport.ping() : this.send_event("pusher:ping", {});
|
|
@@ -2664,7 +2664,7 @@ function Gi() {
|
|
|
2664
2664
|
message: (r) => {
|
|
2665
2665
|
var o;
|
|
2666
2666
|
try {
|
|
2667
|
-
o =
|
|
2667
|
+
o = Y.decodeMessage(r);
|
|
2668
2668
|
} catch (c) {
|
|
2669
2669
|
this.emit("error", {
|
|
2670
2670
|
type: "MessageParseError",
|
|
@@ -2673,7 +2673,7 @@ function Gi() {
|
|
|
2673
2673
|
});
|
|
2674
2674
|
}
|
|
2675
2675
|
if (o !== void 0) {
|
|
2676
|
-
switch (
|
|
2676
|
+
switch (L.debug("Event recd", o), o.event) {
|
|
2677
2677
|
case "pusher:error":
|
|
2678
2678
|
this.emit("error", {
|
|
2679
2679
|
type: "PusherError",
|
|
@@ -2709,11 +2709,11 @@ function Gi() {
|
|
|
2709
2709
|
});
|
|
2710
2710
|
}
|
|
2711
2711
|
handleCloseEvent(e) {
|
|
2712
|
-
var t =
|
|
2712
|
+
var t = Y.getCloseAction(e), r = Y.getCloseError(e);
|
|
2713
2713
|
r && this.emit("error", r), t && this.emit(t, { action: t, error: r });
|
|
2714
2714
|
}
|
|
2715
2715
|
}
|
|
2716
|
-
class
|
|
2716
|
+
class kn {
|
|
2717
2717
|
constructor(e, t) {
|
|
2718
2718
|
this.transport = e, this.callback = t, this.bindListeners();
|
|
2719
2719
|
}
|
|
@@ -2725,18 +2725,18 @@ function Gi() {
|
|
|
2725
2725
|
this.unbindListeners();
|
|
2726
2726
|
var t;
|
|
2727
2727
|
try {
|
|
2728
|
-
t =
|
|
2728
|
+
t = Y.processHandshake(e);
|
|
2729
2729
|
} catch (r) {
|
|
2730
2730
|
this.finish("error", { error: r }), this.transport.close();
|
|
2731
2731
|
return;
|
|
2732
2732
|
}
|
|
2733
2733
|
t.action === "connected" ? this.finish("connected", {
|
|
2734
|
-
connection: new
|
|
2734
|
+
connection: new Sn(t.id, this.transport),
|
|
2735
2735
|
activityTimeout: t.activityTimeout
|
|
2736
2736
|
}) : (this.finish(t.action, { error: t.error }), this.transport.close());
|
|
2737
2737
|
}, this.onClosed = (e) => {
|
|
2738
2738
|
this.unbindListeners();
|
|
2739
|
-
var t =
|
|
2739
|
+
var t = Y.getCloseAction(e) || "backoff", r = Y.getCloseError(e);
|
|
2740
2740
|
this.finish(t, { error: r });
|
|
2741
2741
|
}, this.transport.bind("message", this.onMessage), this.transport.bind("closed", this.onClosed);
|
|
2742
2742
|
}
|
|
@@ -2744,10 +2744,10 @@ function Gi() {
|
|
|
2744
2744
|
this.transport.unbind("message", this.onMessage), this.transport.unbind("closed", this.onClosed);
|
|
2745
2745
|
}
|
|
2746
2746
|
finish(e, t) {
|
|
2747
|
-
this.callback(
|
|
2747
|
+
this.callback(O({ transport: this.transport, action: e }, t));
|
|
2748
2748
|
}
|
|
2749
2749
|
}
|
|
2750
|
-
class
|
|
2750
|
+
class xn {
|
|
2751
2751
|
constructor(e, t) {
|
|
2752
2752
|
this.timeline = e, this.options = t || {};
|
|
2753
2753
|
}
|
|
@@ -2755,10 +2755,10 @@ function Gi() {
|
|
|
2755
2755
|
this.timeline.isEmpty() || this.timeline.send(w.TimelineTransport.getAgent(this, e), t);
|
|
2756
2756
|
}
|
|
2757
2757
|
}
|
|
2758
|
-
class Ce extends
|
|
2758
|
+
class Ce extends G {
|
|
2759
2759
|
constructor(e, t) {
|
|
2760
2760
|
super(function(r, o) {
|
|
2761
|
-
|
|
2761
|
+
L.debug("No callbacks on " + e + " for " + r);
|
|
2762
2762
|
}), this.name = e, this.pusher = t, this.subscribed = !1, this.subscriptionPending = !1, this.subscriptionCancelled = !1;
|
|
2763
2763
|
}
|
|
2764
2764
|
authorize(e, t) {
|
|
@@ -2766,10 +2766,10 @@ function Gi() {
|
|
|
2766
2766
|
}
|
|
2767
2767
|
trigger(e, t) {
|
|
2768
2768
|
if (e.indexOf("client-") !== 0)
|
|
2769
|
-
throw new
|
|
2769
|
+
throw new p("Event '" + e + "' does not start with 'client-'");
|
|
2770
2770
|
if (!this.subscribed) {
|
|
2771
|
-
var r =
|
|
2772
|
-
|
|
2771
|
+
var r = x.buildLogSuffix("triggeringClientEvents");
|
|
2772
|
+
L.warn(`Client event triggered before channel 'subscription_succeeded' event . ${r}`);
|
|
2773
2773
|
}
|
|
2774
2774
|
return this.pusher.send_event(e, t, this.name);
|
|
2775
2775
|
}
|
|
@@ -2795,10 +2795,10 @@ function Gi() {
|
|
|
2795
2795
|
}
|
|
2796
2796
|
subscribe() {
|
|
2797
2797
|
this.subscribed || (this.subscriptionPending = !0, this.subscriptionCancelled = !1, this.authorize(this.pusher.connection.socket_id, (e, t) => {
|
|
2798
|
-
e ? (this.subscriptionPending = !1,
|
|
2798
|
+
e ? (this.subscriptionPending = !1, L.error(e.toString()), this.emit("pusher:subscription_error", Object.assign({}, {
|
|
2799
2799
|
type: "AuthError",
|
|
2800
2800
|
error: e.message
|
|
2801
|
-
}, e instanceof
|
|
2801
|
+
}, e instanceof q ? { status: e.status } : {}))) : this.pusher.send_event("pusher:subscribe", {
|
|
2802
2802
|
auth: t.auth,
|
|
2803
2803
|
channel_data: t.channel_data,
|
|
2804
2804
|
channel: this.name
|
|
@@ -2825,7 +2825,7 @@ function Gi() {
|
|
|
2825
2825
|
}, t);
|
|
2826
2826
|
}
|
|
2827
2827
|
}
|
|
2828
|
-
class
|
|
2828
|
+
class En {
|
|
2829
2829
|
constructor() {
|
|
2830
2830
|
this.reset();
|
|
2831
2831
|
}
|
|
@@ -2859,34 +2859,34 @@ function Gi() {
|
|
|
2859
2859
|
}
|
|
2860
2860
|
var Tn = function(n, e, t, r) {
|
|
2861
2861
|
function o(c) {
|
|
2862
|
-
return c instanceof t ? c : new t(function(
|
|
2863
|
-
|
|
2862
|
+
return c instanceof t ? c : new t(function(h) {
|
|
2863
|
+
h(c);
|
|
2864
2864
|
});
|
|
2865
2865
|
}
|
|
2866
|
-
return new (t || (t = Promise))(function(c,
|
|
2867
|
-
function
|
|
2866
|
+
return new (t || (t = Promise))(function(c, h) {
|
|
2867
|
+
function f(_) {
|
|
2868
2868
|
try {
|
|
2869
|
-
|
|
2870
|
-
} catch (
|
|
2871
|
-
|
|
2869
|
+
T(r.next(_));
|
|
2870
|
+
} catch (R) {
|
|
2871
|
+
h(R);
|
|
2872
2872
|
}
|
|
2873
2873
|
}
|
|
2874
|
-
function b(
|
|
2874
|
+
function b(_) {
|
|
2875
2875
|
try {
|
|
2876
|
-
|
|
2877
|
-
} catch (
|
|
2878
|
-
|
|
2876
|
+
T(r.throw(_));
|
|
2877
|
+
} catch (R) {
|
|
2878
|
+
h(R);
|
|
2879
2879
|
}
|
|
2880
2880
|
}
|
|
2881
|
-
function _
|
|
2882
|
-
|
|
2881
|
+
function T(_) {
|
|
2882
|
+
_.done ? c(_.value) : o(_.value).then(f, b);
|
|
2883
2883
|
}
|
|
2884
|
-
|
|
2884
|
+
T((r = r.apply(n, e || [])).next());
|
|
2885
2885
|
});
|
|
2886
2886
|
};
|
|
2887
|
-
class
|
|
2887
|
+
class _n extends Se {
|
|
2888
2888
|
constructor(e, t) {
|
|
2889
|
-
super(e, t), this.members = new
|
|
2889
|
+
super(e, t), this.members = new En();
|
|
2890
2890
|
}
|
|
2891
2891
|
authorize(e, t) {
|
|
2892
2892
|
super.authorize(e, (r, o) => Tn(this, void 0, void 0, function* () {
|
|
@@ -2897,8 +2897,8 @@ function Gi() {
|
|
|
2897
2897
|
} else if (yield this.pusher.user.signinDonePromise, this.pusher.user.user_data != null)
|
|
2898
2898
|
this.members.setMyID(this.pusher.user.user_data.id);
|
|
2899
2899
|
else {
|
|
2900
|
-
let
|
|
2901
|
-
|
|
2900
|
+
let h = x.buildLogSuffix("authorizationEndpoint");
|
|
2901
|
+
L.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${h}, or the user should be signed in.`), t("Invalid auth response");
|
|
2902
2902
|
return;
|
|
2903
2903
|
}
|
|
2904
2904
|
t(r, o);
|
|
@@ -2939,8 +2939,8 @@ function Gi() {
|
|
|
2939
2939
|
this.members.reset(), super.disconnect();
|
|
2940
2940
|
}
|
|
2941
2941
|
}
|
|
2942
|
-
var
|
|
2943
|
-
class
|
|
2942
|
+
var An = y(978), ke = y(594);
|
|
2943
|
+
class Pn extends Se {
|
|
2944
2944
|
constructor(e, t, r) {
|
|
2945
2945
|
super(e, t), this.key = null, this.nacl = r;
|
|
2946
2946
|
}
|
|
@@ -2955,11 +2955,11 @@ function Gi() {
|
|
|
2955
2955
|
t(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`), null);
|
|
2956
2956
|
return;
|
|
2957
2957
|
}
|
|
2958
|
-
this.key = (0,
|
|
2958
|
+
this.key = (0, ke.decode)(c), delete o.shared_secret, t(null, o);
|
|
2959
2959
|
});
|
|
2960
2960
|
}
|
|
2961
2961
|
trigger(e, t) {
|
|
2962
|
-
throw new
|
|
2962
|
+
throw new U("Client events are not currently supported for encrypted channels");
|
|
2963
2963
|
}
|
|
2964
2964
|
handleEvent(e) {
|
|
2965
2965
|
var t = e.event, r = e.data;
|
|
@@ -2971,32 +2971,32 @@ function Gi() {
|
|
|
2971
2971
|
}
|
|
2972
2972
|
handleEncryptedEvent(e, t) {
|
|
2973
2973
|
if (!this.key) {
|
|
2974
|
-
|
|
2974
|
+
L.debug("Received encrypted event before key has been retrieved from the authEndpoint");
|
|
2975
2975
|
return;
|
|
2976
2976
|
}
|
|
2977
2977
|
if (!t.ciphertext || !t.nonce) {
|
|
2978
|
-
|
|
2978
|
+
L.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: " + t);
|
|
2979
2979
|
return;
|
|
2980
2980
|
}
|
|
2981
|
-
let r = (0,
|
|
2981
|
+
let r = (0, ke.decode)(t.ciphertext);
|
|
2982
2982
|
if (r.length < this.nacl.secretbox.overheadLength) {
|
|
2983
|
-
|
|
2983
|
+
L.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${r.length}`);
|
|
2984
2984
|
return;
|
|
2985
2985
|
}
|
|
2986
|
-
let o = (0,
|
|
2986
|
+
let o = (0, ke.decode)(t.nonce);
|
|
2987
2987
|
if (o.length < this.nacl.secretbox.nonceLength) {
|
|
2988
|
-
|
|
2988
|
+
L.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${o.length}`);
|
|
2989
2989
|
return;
|
|
2990
2990
|
}
|
|
2991
2991
|
let c = this.nacl.secretbox.open(r, o, this.key);
|
|
2992
2992
|
if (c === null) {
|
|
2993
|
-
|
|
2994
|
-
if (
|
|
2995
|
-
|
|
2993
|
+
L.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."), this.authorize(this.pusher.connection.socket_id, (h, f) => {
|
|
2994
|
+
if (h) {
|
|
2995
|
+
L.error(`Failed to make a request to the authEndpoint: ${f}. Unable to fetch new key, so dropping encrypted event`);
|
|
2996
2996
|
return;
|
|
2997
2997
|
}
|
|
2998
2998
|
if (c = this.nacl.secretbox.open(r, o, this.key), c === null) {
|
|
2999
|
-
|
|
2999
|
+
L.error("Failed to decrypt event with new key. Dropping encrypted event");
|
|
3000
3000
|
return;
|
|
3001
3001
|
}
|
|
3002
3002
|
this.emit(e, this.getDataToEmit(c));
|
|
@@ -3006,7 +3006,7 @@ function Gi() {
|
|
|
3006
3006
|
this.emit(e, this.getDataToEmit(c));
|
|
3007
3007
|
}
|
|
3008
3008
|
getDataToEmit(e) {
|
|
3009
|
-
let t = (0,
|
|
3009
|
+
let t = (0, An.D4)(e);
|
|
3010
3010
|
try {
|
|
3011
3011
|
return JSON.parse(t);
|
|
3012
3012
|
} catch {
|
|
@@ -3014,7 +3014,7 @@ function Gi() {
|
|
|
3014
3014
|
}
|
|
3015
3015
|
}
|
|
3016
3016
|
}
|
|
3017
|
-
class
|
|
3017
|
+
class Ln extends G {
|
|
3018
3018
|
constructor(e, t) {
|
|
3019
3019
|
super(), this.state = "initialized", this.connection = null, this.key = e, this.options = t, this.timeline = this.options.timeline, this.usingTLS = this.options.useTLS, this.errorCallbacks = this.buildErrorCallbacks(), this.connectionCallbacks = this.buildConnectionCallbacks(this.errorCallbacks), this.handshakeCallbacks = this.buildHandshakeCallbacks(this.errorCallbacks);
|
|
3020
3020
|
var r = w.getNetwork();
|
|
@@ -3074,7 +3074,7 @@ function Gi() {
|
|
|
3074
3074
|
});
|
|
3075
3075
|
}
|
|
3076
3076
|
retryIn(e) {
|
|
3077
|
-
this.timeline.info({ action: "retry", delay: e }), e > 0 && this.emit("connecting_in", Math.round(e / 1e3)), this.retryTimer = new
|
|
3077
|
+
this.timeline.info({ action: "retry", delay: e }), e > 0 && this.emit("connecting_in", Math.round(e / 1e3)), this.retryTimer = new J(e || 0, () => {
|
|
3078
3078
|
this.disconnectInternally(), this.connect();
|
|
3079
3079
|
});
|
|
3080
3080
|
}
|
|
@@ -3082,7 +3082,7 @@ function Gi() {
|
|
|
3082
3082
|
this.retryTimer && (this.retryTimer.ensureAborted(), this.retryTimer = null);
|
|
3083
3083
|
}
|
|
3084
3084
|
setUnavailableTimer() {
|
|
3085
|
-
this.unavailableTimer = new
|
|
3085
|
+
this.unavailableTimer = new J(this.options.unavailableTimeout, () => {
|
|
3086
3086
|
this.updateState("unavailable");
|
|
3087
3087
|
});
|
|
3088
3088
|
}
|
|
@@ -3090,12 +3090,12 @@ function Gi() {
|
|
|
3090
3090
|
this.unavailableTimer && this.unavailableTimer.ensureAborted();
|
|
3091
3091
|
}
|
|
3092
3092
|
sendActivityCheck() {
|
|
3093
|
-
this.stopActivityCheck(), this.connection.ping(), this.activityTimer = new
|
|
3093
|
+
this.stopActivityCheck(), this.connection.ping(), this.activityTimer = new J(this.options.pongTimeout, () => {
|
|
3094
3094
|
this.timeline.error({ pong_timed_out: this.options.pongTimeout }), this.retryIn(0);
|
|
3095
3095
|
});
|
|
3096
3096
|
}
|
|
3097
3097
|
resetActivityCheck() {
|
|
3098
|
-
this.stopActivityCheck(), this.connection && !this.connection.handlesActivityChecks() && (this.activityTimer = new
|
|
3098
|
+
this.stopActivityCheck(), this.connection && !this.connection.handlesActivityChecks() && (this.activityTimer = new J(this.activityTimeout, () => {
|
|
3099
3099
|
this.sendActivityCheck();
|
|
3100
3100
|
}));
|
|
3101
3101
|
}
|
|
@@ -3103,7 +3103,7 @@ function Gi() {
|
|
|
3103
3103
|
this.activityTimer && this.activityTimer.ensureAborted();
|
|
3104
3104
|
}
|
|
3105
3105
|
buildConnectionCallbacks(e) {
|
|
3106
|
-
return
|
|
3106
|
+
return O({}, e, {
|
|
3107
3107
|
message: (t) => {
|
|
3108
3108
|
this.resetActivityCheck(), this.emit("message", t);
|
|
3109
3109
|
},
|
|
@@ -3122,7 +3122,7 @@ function Gi() {
|
|
|
3122
3122
|
});
|
|
3123
3123
|
}
|
|
3124
3124
|
buildHandshakeCallbacks(e) {
|
|
3125
|
-
return
|
|
3125
|
+
return O({}, e, {
|
|
3126
3126
|
connected: (t) => {
|
|
3127
3127
|
this.activityTimeout = Math.min(this.options.activityTimeout, t.activityTimeout, t.connection.activityTimeout || 1 / 0), this.clearUnavailableTimer(), this.setConnection(t.connection), this.socket_id = this.connection.id, this.updateState("connected", { socket_id: this.socket_id });
|
|
3128
3128
|
}
|
|
@@ -3166,22 +3166,22 @@ function Gi() {
|
|
|
3166
3166
|
var r = this.state;
|
|
3167
3167
|
if (this.state = e, r !== e) {
|
|
3168
3168
|
var o = e;
|
|
3169
|
-
o === "connected" && (o += " with new socket ID " + t.socket_id),
|
|
3169
|
+
o === "connected" && (o += " with new socket ID " + t.socket_id), L.debug("State changed", r + " -> " + o), this.timeline.info({ state: e, params: t }), this.emit("state_change", { previous: r, current: e }), this.emit(e, t);
|
|
3170
3170
|
}
|
|
3171
3171
|
}
|
|
3172
3172
|
shouldRetry() {
|
|
3173
3173
|
return this.state === "connecting" || this.state === "connected";
|
|
3174
3174
|
}
|
|
3175
3175
|
}
|
|
3176
|
-
class
|
|
3176
|
+
class Rn {
|
|
3177
3177
|
constructor() {
|
|
3178
3178
|
this.channels = {};
|
|
3179
3179
|
}
|
|
3180
3180
|
add(e, t) {
|
|
3181
|
-
return this.channels[e] || (this.channels[e] =
|
|
3181
|
+
return this.channels[e] || (this.channels[e] = jn(e, t)), this.channels[e];
|
|
3182
3182
|
}
|
|
3183
3183
|
all() {
|
|
3184
|
-
return
|
|
3184
|
+
return Ft(this.channels);
|
|
3185
3185
|
}
|
|
3186
3186
|
find(e) {
|
|
3187
3187
|
return this.channels[e];
|
|
@@ -3196,28 +3196,28 @@ function Gi() {
|
|
|
3196
3196
|
});
|
|
3197
3197
|
}
|
|
3198
3198
|
}
|
|
3199
|
-
function
|
|
3199
|
+
function jn(n, e) {
|
|
3200
3200
|
if (n.indexOf("private-encrypted-") === 0) {
|
|
3201
3201
|
if (e.config.nacl)
|
|
3202
|
-
return
|
|
3203
|
-
let t = "Tried to subscribe to a private-encrypted- channel but no nacl implementation available", r =
|
|
3204
|
-
throw new
|
|
3202
|
+
return V.createEncryptedChannel(n, e, e.config.nacl);
|
|
3203
|
+
let t = "Tried to subscribe to a private-encrypted- channel but no nacl implementation available", r = x.buildLogSuffix("encryptedChannelSupport");
|
|
3204
|
+
throw new U(`${t}. ${r}`);
|
|
3205
3205
|
} else {
|
|
3206
3206
|
if (n.indexOf("private-") === 0)
|
|
3207
|
-
return
|
|
3207
|
+
return V.createPrivateChannel(n, e);
|
|
3208
3208
|
if (n.indexOf("presence-") === 0)
|
|
3209
|
-
return
|
|
3209
|
+
return V.createPresenceChannel(n, e);
|
|
3210
3210
|
if (n.indexOf("#") === 0)
|
|
3211
3211
|
throw new C('Cannot create a channel with name "' + n + '".');
|
|
3212
|
-
return
|
|
3212
|
+
return V.createChannel(n, e);
|
|
3213
3213
|
}
|
|
3214
3214
|
}
|
|
3215
|
-
var
|
|
3215
|
+
var In = {
|
|
3216
3216
|
createChannels() {
|
|
3217
|
-
return new
|
|
3217
|
+
return new Rn();
|
|
3218
3218
|
},
|
|
3219
3219
|
createConnectionManager(n, e) {
|
|
3220
|
-
return new
|
|
3220
|
+
return new Ln(n, e);
|
|
3221
3221
|
},
|
|
3222
3222
|
createChannel(n, e) {
|
|
3223
3223
|
return new Ce(n, e);
|
|
@@ -3226,28 +3226,28 @@ function Gi() {
|
|
|
3226
3226
|
return new Se(n, e);
|
|
3227
3227
|
},
|
|
3228
3228
|
createPresenceChannel(n, e) {
|
|
3229
|
-
return new
|
|
3229
|
+
return new _n(n, e);
|
|
3230
3230
|
},
|
|
3231
3231
|
createEncryptedChannel(n, e, t) {
|
|
3232
|
-
return new
|
|
3232
|
+
return new Pn(n, e, t);
|
|
3233
3233
|
},
|
|
3234
3234
|
createTimelineSender(n, e) {
|
|
3235
|
-
return new
|
|
3235
|
+
return new xn(n, e);
|
|
3236
3236
|
},
|
|
3237
3237
|
createHandshake(n, e) {
|
|
3238
|
-
return new
|
|
3238
|
+
return new kn(n, e);
|
|
3239
3239
|
},
|
|
3240
3240
|
createAssistantToTheTransportManager(n, e, t) {
|
|
3241
|
-
return new
|
|
3241
|
+
return new Cn(n, e, t);
|
|
3242
3242
|
}
|
|
3243
3243
|
};
|
|
3244
|
-
const
|
|
3245
|
-
class
|
|
3244
|
+
const V = In;
|
|
3245
|
+
class Ze {
|
|
3246
3246
|
constructor(e) {
|
|
3247
3247
|
this.options = e || {}, this.livesLeft = this.options.lives || 1 / 0;
|
|
3248
3248
|
}
|
|
3249
3249
|
getAssistant(e) {
|
|
3250
|
-
return
|
|
3250
|
+
return V.createAssistantToTheTransportManager(this, e, {
|
|
3251
3251
|
minPingDelay: this.options.minPingDelay,
|
|
3252
3252
|
maxPingDelay: this.options.maxPingDelay
|
|
3253
3253
|
});
|
|
@@ -3259,70 +3259,70 @@ function Gi() {
|
|
|
3259
3259
|
this.livesLeft -= 1;
|
|
3260
3260
|
}
|
|
3261
3261
|
}
|
|
3262
|
-
class
|
|
3262
|
+
class Z {
|
|
3263
3263
|
constructor(e, t) {
|
|
3264
3264
|
this.strategies = e, this.loop = !!t.loop, this.failFast = !!t.failFast, this.timeout = t.timeout, this.timeoutLimit = t.timeoutLimit;
|
|
3265
3265
|
}
|
|
3266
3266
|
isSupported() {
|
|
3267
|
-
return $e(this.strategies,
|
|
3267
|
+
return $e(this.strategies, N.method("isSupported"));
|
|
3268
3268
|
}
|
|
3269
3269
|
connect(e, t) {
|
|
3270
|
-
var r = this.strategies, o = 0, c = this.timeout,
|
|
3271
|
-
|
|
3270
|
+
var r = this.strategies, o = 0, c = this.timeout, h = null, f = (b, T) => {
|
|
3271
|
+
T ? t(null, T) : (o = o + 1, this.loop && (o = o % r.length), o < r.length ? (c && (c = c * 2, this.timeoutLimit && (c = Math.min(c, this.timeoutLimit))), h = this.tryStrategy(r[o], e, { timeout: c, failFast: this.failFast }, f)) : t(!0));
|
|
3272
3272
|
};
|
|
3273
|
-
return
|
|
3273
|
+
return h = this.tryStrategy(r[o], e, { timeout: c, failFast: this.failFast }, f), {
|
|
3274
3274
|
abort: function() {
|
|
3275
|
-
|
|
3275
|
+
h.abort();
|
|
3276
3276
|
},
|
|
3277
3277
|
forceMinPriority: function(b) {
|
|
3278
|
-
e = b,
|
|
3278
|
+
e = b, h && h.forceMinPriority(b);
|
|
3279
3279
|
}
|
|
3280
3280
|
};
|
|
3281
3281
|
}
|
|
3282
3282
|
tryStrategy(e, t, r, o) {
|
|
3283
|
-
var c = null,
|
|
3284
|
-
return r.timeout > 0 && (c = new
|
|
3285
|
-
|
|
3286
|
-
})),
|
|
3287
|
-
|
|
3283
|
+
var c = null, h = null;
|
|
3284
|
+
return r.timeout > 0 && (c = new J(r.timeout, function() {
|
|
3285
|
+
h.abort(), o(!0);
|
|
3286
|
+
})), h = e.connect(t, function(f, b) {
|
|
3287
|
+
f && c && c.isRunning() && !r.failFast || (c && c.ensureAborted(), o(f, b));
|
|
3288
3288
|
}), {
|
|
3289
3289
|
abort: function() {
|
|
3290
|
-
c && c.ensureAborted(),
|
|
3290
|
+
c && c.ensureAborted(), h.abort();
|
|
3291
3291
|
},
|
|
3292
|
-
forceMinPriority: function(
|
|
3293
|
-
|
|
3292
|
+
forceMinPriority: function(f) {
|
|
3293
|
+
h.forceMinPriority(f);
|
|
3294
3294
|
}
|
|
3295
3295
|
};
|
|
3296
3296
|
}
|
|
3297
3297
|
}
|
|
3298
|
-
class
|
|
3298
|
+
class xe {
|
|
3299
3299
|
constructor(e) {
|
|
3300
3300
|
this.strategies = e;
|
|
3301
3301
|
}
|
|
3302
3302
|
isSupported() {
|
|
3303
|
-
return $e(this.strategies,
|
|
3303
|
+
return $e(this.strategies, N.method("isSupported"));
|
|
3304
3304
|
}
|
|
3305
3305
|
connect(e, t) {
|
|
3306
|
-
return
|
|
3307
|
-
return function(c,
|
|
3306
|
+
return Wn(this.strategies, e, function(r, o) {
|
|
3307
|
+
return function(c, h) {
|
|
3308
3308
|
if (o[r].error = c, c) {
|
|
3309
|
-
|
|
3309
|
+
Nn(o) && t(!0);
|
|
3310
3310
|
return;
|
|
3311
3311
|
}
|
|
3312
|
-
ie(o, function(
|
|
3313
|
-
|
|
3314
|
-
}), t(null,
|
|
3312
|
+
ie(o, function(f) {
|
|
3313
|
+
f.forceMinPriority(h.transport.priority);
|
|
3314
|
+
}), t(null, h);
|
|
3315
3315
|
};
|
|
3316
3316
|
});
|
|
3317
3317
|
}
|
|
3318
3318
|
}
|
|
3319
|
-
function
|
|
3320
|
-
var r =
|
|
3321
|
-
return o.connect(e, t(c,
|
|
3319
|
+
function Wn(n, e, t) {
|
|
3320
|
+
var r = Be(n, function(o, c, h, f) {
|
|
3321
|
+
return o.connect(e, t(c, f));
|
|
3322
3322
|
});
|
|
3323
3323
|
return {
|
|
3324
3324
|
abort: function() {
|
|
3325
|
-
ie(r,
|
|
3325
|
+
ie(r, Hn);
|
|
3326
3326
|
},
|
|
3327
3327
|
forceMinPriority: function(o) {
|
|
3328
3328
|
ie(r, function(c) {
|
|
@@ -3331,15 +3331,15 @@ function Gi() {
|
|
|
3331
3331
|
}
|
|
3332
3332
|
};
|
|
3333
3333
|
}
|
|
3334
|
-
function
|
|
3335
|
-
return
|
|
3334
|
+
function Nn(n) {
|
|
3335
|
+
return Vt(n, function(e) {
|
|
3336
3336
|
return !!e.error;
|
|
3337
3337
|
});
|
|
3338
3338
|
}
|
|
3339
|
-
function
|
|
3339
|
+
function Hn(n) {
|
|
3340
3340
|
!n.error && !n.aborted && (n.abort(), n.aborted = !0);
|
|
3341
3341
|
}
|
|
3342
|
-
class
|
|
3342
|
+
class zn {
|
|
3343
3343
|
constructor(e, t, r) {
|
|
3344
3344
|
this.strategy = e, this.transports = t, this.ttl = r.ttl || 18e5, this.usingTLS = r.useTLS, this.timeline = r.timeline;
|
|
3345
3345
|
}
|
|
@@ -3347,52 +3347,52 @@ function Gi() {
|
|
|
3347
3347
|
return this.strategy.isSupported();
|
|
3348
3348
|
}
|
|
3349
3349
|
connect(e, t) {
|
|
3350
|
-
var r = this.usingTLS, o =
|
|
3351
|
-
if (o && o.timestamp + this.ttl >=
|
|
3352
|
-
var
|
|
3353
|
-
|
|
3350
|
+
var r = this.usingTLS, o = On(r), c = o && o.cacheSkipCount ? o.cacheSkipCount : 0, h = [this.strategy];
|
|
3351
|
+
if (o && o.timestamp + this.ttl >= N.now()) {
|
|
3352
|
+
var f = this.transports[o.transport];
|
|
3353
|
+
f && (["ws", "wss"].includes(o.transport) || c > 3 ? (this.timeline.info({
|
|
3354
3354
|
cached: !0,
|
|
3355
3355
|
transport: o.transport,
|
|
3356
3356
|
latency: o.latency
|
|
3357
|
-
}),
|
|
3357
|
+
}), h.push(new Z([f], {
|
|
3358
3358
|
timeout: o.latency * 2 + 1e3,
|
|
3359
3359
|
failFast: !0
|
|
3360
3360
|
}))) : c++);
|
|
3361
3361
|
}
|
|
3362
|
-
var b =
|
|
3363
|
-
|
|
3362
|
+
var b = N.now(), T = h.pop().connect(e, function _(R, ue) {
|
|
3363
|
+
R ? (Qe(r), h.length > 0 ? (b = N.now(), T = h.pop().connect(e, _)) : t(R)) : (Un(r, ue.transport.name, N.now() - b, c), t(null, ue));
|
|
3364
3364
|
});
|
|
3365
3365
|
return {
|
|
3366
3366
|
abort: function() {
|
|
3367
|
-
|
|
3367
|
+
T.abort();
|
|
3368
3368
|
},
|
|
3369
|
-
forceMinPriority: function(
|
|
3370
|
-
e =
|
|
3369
|
+
forceMinPriority: function(_) {
|
|
3370
|
+
e = _, T && T.forceMinPriority(_);
|
|
3371
3371
|
}
|
|
3372
3372
|
};
|
|
3373
3373
|
}
|
|
3374
3374
|
}
|
|
3375
|
-
function
|
|
3375
|
+
function Ee(n) {
|
|
3376
3376
|
return "pusherTransport" + (n ? "TLS" : "NonTLS");
|
|
3377
3377
|
}
|
|
3378
|
-
function
|
|
3378
|
+
function On(n) {
|
|
3379
3379
|
var e = w.getLocalStorage();
|
|
3380
3380
|
if (e)
|
|
3381
3381
|
try {
|
|
3382
|
-
var t = e[
|
|
3382
|
+
var t = e[Ee(n)];
|
|
3383
3383
|
if (t)
|
|
3384
3384
|
return JSON.parse(t);
|
|
3385
3385
|
} catch {
|
|
3386
|
-
|
|
3386
|
+
Qe(n);
|
|
3387
3387
|
}
|
|
3388
3388
|
return null;
|
|
3389
3389
|
}
|
|
3390
|
-
function
|
|
3390
|
+
function Un(n, e, t, r) {
|
|
3391
3391
|
var o = w.getLocalStorage();
|
|
3392
3392
|
if (o)
|
|
3393
3393
|
try {
|
|
3394
|
-
o[
|
|
3395
|
-
timestamp:
|
|
3394
|
+
o[Ee(n)] = ae({
|
|
3395
|
+
timestamp: N.now(),
|
|
3396
3396
|
transport: e,
|
|
3397
3397
|
latency: t,
|
|
3398
3398
|
cacheSkipCount: r
|
|
@@ -3400,15 +3400,15 @@ function Gi() {
|
|
|
3400
3400
|
} catch {
|
|
3401
3401
|
}
|
|
3402
3402
|
}
|
|
3403
|
-
function
|
|
3403
|
+
function Qe(n) {
|
|
3404
3404
|
var e = w.getLocalStorage();
|
|
3405
3405
|
if (e)
|
|
3406
3406
|
try {
|
|
3407
|
-
delete e[
|
|
3407
|
+
delete e[Ee(n)];
|
|
3408
3408
|
} catch {
|
|
3409
3409
|
}
|
|
3410
3410
|
}
|
|
3411
|
-
class
|
|
3411
|
+
class de {
|
|
3412
3412
|
constructor(e, { delay: t }) {
|
|
3413
3413
|
this.strategy = e, this.options = { delay: t };
|
|
3414
3414
|
}
|
|
@@ -3416,15 +3416,15 @@ function Gi() {
|
|
|
3416
3416
|
return this.strategy.isSupported();
|
|
3417
3417
|
}
|
|
3418
3418
|
connect(e, t) {
|
|
3419
|
-
var r = this.strategy, o, c = new
|
|
3419
|
+
var r = this.strategy, o, c = new J(this.options.delay, function() {
|
|
3420
3420
|
o = r.connect(e, t);
|
|
3421
3421
|
});
|
|
3422
3422
|
return {
|
|
3423
3423
|
abort: function() {
|
|
3424
3424
|
c.ensureAborted(), o && o.abort();
|
|
3425
3425
|
},
|
|
3426
|
-
forceMinPriority: function(
|
|
3427
|
-
e =
|
|
3426
|
+
forceMinPriority: function(h) {
|
|
3427
|
+
e = h, o && o.forceMinPriority(h);
|
|
3428
3428
|
}
|
|
3429
3429
|
};
|
|
3430
3430
|
}
|
|
@@ -3442,7 +3442,7 @@ function Gi() {
|
|
|
3442
3442
|
return r.connect(e, t);
|
|
3443
3443
|
}
|
|
3444
3444
|
}
|
|
3445
|
-
class
|
|
3445
|
+
class qn {
|
|
3446
3446
|
constructor(e) {
|
|
3447
3447
|
this.strategy = e;
|
|
3448
3448
|
}
|
|
@@ -3461,19 +3461,19 @@ function Gi() {
|
|
|
3461
3461
|
return n.isSupported();
|
|
3462
3462
|
};
|
|
3463
3463
|
}
|
|
3464
|
-
var
|
|
3464
|
+
var Mn = function(n, e, t) {
|
|
3465
3465
|
var r = {};
|
|
3466
|
-
function o(ut, Ui,
|
|
3467
|
-
var
|
|
3468
|
-
return r[ut] =
|
|
3466
|
+
function o(ut, Oi, Ui, qi, Mi) {
|
|
3467
|
+
var pt = t(n, ut, Oi, Ui, qi, Mi);
|
|
3468
|
+
return r[ut] = pt, pt;
|
|
3469
3469
|
}
|
|
3470
3470
|
var c = Object.assign({}, e, {
|
|
3471
3471
|
hostNonTLS: n.wsHost + ":" + n.wsPort,
|
|
3472
3472
|
hostTLS: n.wsHost + ":" + n.wssPort,
|
|
3473
3473
|
httpPath: n.wsPath
|
|
3474
|
-
}),
|
|
3474
|
+
}), h = Object.assign({}, c, {
|
|
3475
3475
|
useTLS: !0
|
|
3476
|
-
}),
|
|
3476
|
+
}), f = Object.assign({}, e, {
|
|
3477
3477
|
hostNonTLS: n.httpHost + ":" + n.httpPort,
|
|
3478
3478
|
hostTLS: n.httpHost + ":" + n.httpsPort,
|
|
3479
3479
|
httpPath: n.httpPath
|
|
@@ -3481,50 +3481,50 @@ function Gi() {
|
|
|
3481
3481
|
loop: !0,
|
|
3482
3482
|
timeout: 15e3,
|
|
3483
3483
|
timeoutLimit: 6e4
|
|
3484
|
-
},
|
|
3484
|
+
}, T = new Ze({
|
|
3485
3485
|
minPingDelay: 1e4,
|
|
3486
3486
|
maxPingDelay: n.activityTimeout
|
|
3487
|
-
}),
|
|
3487
|
+
}), _ = new Ze({
|
|
3488
3488
|
lives: 2,
|
|
3489
3489
|
minPingDelay: 1e4,
|
|
3490
3490
|
maxPingDelay: n.activityTimeout
|
|
3491
|
-
}),
|
|
3492
|
-
new re(se(ot), ot,
|
|
3493
|
-
], b),
|
|
3494
|
-
new re(se(at), at,
|
|
3495
|
-
], b),
|
|
3496
|
-
new re(se(
|
|
3497
|
-
|
|
3498
|
-
new
|
|
3499
|
-
]),
|
|
3500
|
-
], b), Ae = new re(se(
|
|
3501
|
-
return e.useTLS ?
|
|
3491
|
+
}), R = o("ws", "ws", 3, c, T), ue = o("wss", "ws", 3, h, T), Ii = o("sockjs", "sockjs", 1, f), ot = o("xhr_streaming", "xhr_streaming", 1, f, _), Wi = o("xdr_streaming", "xdr_streaming", 1, f, _), at = o("xhr_polling", "xhr_polling", 1, f), Ni = o("xdr_polling", "xdr_polling", 1, f), ct = new Z([R], b), Hi = new Z([ue], b), zi = new Z([Ii], b), dt = new Z([
|
|
3492
|
+
new re(se(ot), ot, Wi)
|
|
3493
|
+
], b), ht = new Z([
|
|
3494
|
+
new re(se(at), at, Ni)
|
|
3495
|
+
], b), lt = new Z([
|
|
3496
|
+
new re(se(dt), new xe([
|
|
3497
|
+
dt,
|
|
3498
|
+
new de(ht, { delay: 4e3 })
|
|
3499
|
+
]), ht)
|
|
3500
|
+
], b), Ae = new re(se(lt), lt, zi), Pe;
|
|
3501
|
+
return e.useTLS ? Pe = new xe([
|
|
3502
3502
|
ct,
|
|
3503
|
-
new
|
|
3504
|
-
]) :
|
|
3503
|
+
new de(Ae, { delay: 2e3 })
|
|
3504
|
+
]) : Pe = new xe([
|
|
3505
3505
|
ct,
|
|
3506
|
-
new
|
|
3507
|
-
new
|
|
3508
|
-
]), new
|
|
3506
|
+
new de(Hi, { delay: 2e3 }),
|
|
3507
|
+
new de(Ae, { delay: 5e3 })
|
|
3508
|
+
]), new zn(new qn(new re(se(R), Pe, Ae)), r, {
|
|
3509
3509
|
ttl: 18e5,
|
|
3510
3510
|
timeline: e.timeline,
|
|
3511
3511
|
useTLS: e.useTLS
|
|
3512
3512
|
});
|
|
3513
3513
|
};
|
|
3514
|
-
const
|
|
3515
|
-
function
|
|
3514
|
+
const Bn = Mn;
|
|
3515
|
+
function Dn() {
|
|
3516
3516
|
var n = this;
|
|
3517
3517
|
n.timeline.info(n.buildTimelineMessage({
|
|
3518
3518
|
transport: n.name + (n.options.useTLS ? "s" : "")
|
|
3519
|
-
})), n.hooks.isInitialized() ? n.changeState("initialized") : n.hooks.file ? (n.changeState("initializing"),
|
|
3519
|
+
})), n.hooks.isInitialized() ? n.changeState("initialized") : n.hooks.file ? (n.changeState("initializing"), H.load(n.hooks.file, { useTLS: n.options.useTLS }, function(e, t) {
|
|
3520
3520
|
n.hooks.isInitialized() ? (n.changeState("initialized"), t(!0)) : (e && n.onError(e), n.onClose(), t(!1));
|
|
3521
3521
|
})) : n.onClose();
|
|
3522
3522
|
}
|
|
3523
|
-
var
|
|
3523
|
+
var Fn = {
|
|
3524
3524
|
getRequest: function(n) {
|
|
3525
3525
|
var e = new window.XDomainRequest();
|
|
3526
3526
|
return e.ontimeout = function() {
|
|
3527
|
-
n.emit("error", new
|
|
3527
|
+
n.emit("error", new P()), n.close();
|
|
3528
3528
|
}, e.onerror = function(t) {
|
|
3529
3529
|
n.emit("error", t), n.close();
|
|
3530
3530
|
}, e.onprogress = function() {
|
|
@@ -3537,8 +3537,8 @@ function Gi() {
|
|
|
3537
3537
|
n.ontimeout = n.onerror = n.onprogress = n.onload = null, n.abort();
|
|
3538
3538
|
}
|
|
3539
3539
|
};
|
|
3540
|
-
const
|
|
3541
|
-
class
|
|
3540
|
+
const $n = Fn, Gn = 256 * 1024;
|
|
3541
|
+
class Vn extends G {
|
|
3542
3542
|
constructor(e, t, r) {
|
|
3543
3543
|
super(), this.hooks = e, this.method = t, this.url = r;
|
|
3544
3544
|
}
|
|
@@ -3566,18 +3566,18 @@ function Gi() {
|
|
|
3566
3566
|
return r !== -1 ? (this.position += r + 1, t.slice(0, r)) : null;
|
|
3567
3567
|
}
|
|
3568
3568
|
isBufferTooLong(e) {
|
|
3569
|
-
return this.position === e.length && e.length >
|
|
3569
|
+
return this.position === e.length && e.length > Gn;
|
|
3570
3570
|
}
|
|
3571
3571
|
}
|
|
3572
|
-
var
|
|
3572
|
+
var Te;
|
|
3573
3573
|
(function(n) {
|
|
3574
3574
|
n[n.CONNECTING = 0] = "CONNECTING", n[n.OPEN = 1] = "OPEN", n[n.CLOSED = 3] = "CLOSED";
|
|
3575
|
-
})(
|
|
3576
|
-
const
|
|
3577
|
-
var
|
|
3578
|
-
class
|
|
3575
|
+
})(Te || (Te = {}));
|
|
3576
|
+
const Q = Te;
|
|
3577
|
+
var Kn = 1;
|
|
3578
|
+
class Xn {
|
|
3579
3579
|
constructor(e, t) {
|
|
3580
|
-
this.hooks = e, this.session = tt(1e3) + "/" +
|
|
3580
|
+
this.hooks = e, this.session = tt(1e3) + "/" + Qn(8), this.location = Jn(t), this.readyState = Q.CONNECTING, this.openStream();
|
|
3581
3581
|
}
|
|
3582
3582
|
send(e) {
|
|
3583
3583
|
return this.sendRaw(JSON.stringify([e]));
|
|
@@ -3589,9 +3589,9 @@ function Gi() {
|
|
|
3589
3589
|
this.onClose(e, t, !0);
|
|
3590
3590
|
}
|
|
3591
3591
|
sendRaw(e) {
|
|
3592
|
-
if (this.readyState ===
|
|
3592
|
+
if (this.readyState === Q.OPEN)
|
|
3593
3593
|
try {
|
|
3594
|
-
return w.createSocketRequest("POST", et(
|
|
3594
|
+
return w.createSocketRequest("POST", et(Yn(this.location, this.session))).start(e), !0;
|
|
3595
3595
|
} catch {
|
|
3596
3596
|
return !1;
|
|
3597
3597
|
}
|
|
@@ -3602,7 +3602,7 @@ function Gi() {
|
|
|
3602
3602
|
this.closeStream(), this.openStream();
|
|
3603
3603
|
}
|
|
3604
3604
|
onClose(e, t, r) {
|
|
3605
|
-
this.closeStream(), this.readyState =
|
|
3605
|
+
this.closeStream(), this.readyState = Q.CLOSED, this.onclose && this.onclose({
|
|
3606
3606
|
code: e,
|
|
3607
3607
|
reason: t,
|
|
3608
3608
|
wasClean: r
|
|
@@ -3610,7 +3610,7 @@ function Gi() {
|
|
|
3610
3610
|
}
|
|
3611
3611
|
onChunk(e) {
|
|
3612
3612
|
if (e.status === 200) {
|
|
3613
|
-
this.readyState ===
|
|
3613
|
+
this.readyState === Q.OPEN && this.onActivity();
|
|
3614
3614
|
var t, r = e.data.slice(0, 1);
|
|
3615
3615
|
switch (r) {
|
|
3616
3616
|
case "o":
|
|
@@ -3634,10 +3634,10 @@ function Gi() {
|
|
|
3634
3634
|
}
|
|
3635
3635
|
}
|
|
3636
3636
|
onOpen(e) {
|
|
3637
|
-
this.readyState ===
|
|
3637
|
+
this.readyState === Q.CONNECTING ? (e && e.hostname && (this.location.base = Zn(this.location.base, e.hostname)), this.readyState = Q.OPEN, this.onopen && this.onopen()) : this.onClose(1006, "Server lost session", !0);
|
|
3638
3638
|
}
|
|
3639
3639
|
onEvent(e) {
|
|
3640
|
-
this.readyState ===
|
|
3640
|
+
this.readyState === Q.OPEN && this.onmessage && this.onmessage({ data: e });
|
|
3641
3641
|
}
|
|
3642
3642
|
onActivity() {
|
|
3643
3643
|
this.onactivity && this.onactivity();
|
|
@@ -3656,7 +3656,7 @@ function Gi() {
|
|
|
3656
3656
|
try {
|
|
3657
3657
|
this.stream.start();
|
|
3658
3658
|
} catch (e) {
|
|
3659
|
-
|
|
3659
|
+
N.defer(() => {
|
|
3660
3660
|
this.onError(e), this.onClose(1006, "Could not start streaming", !1);
|
|
3661
3661
|
});
|
|
3662
3662
|
}
|
|
@@ -3665,34 +3665,34 @@ function Gi() {
|
|
|
3665
3665
|
this.stream && (this.stream.unbind_all(), this.stream.close(), this.stream = null);
|
|
3666
3666
|
}
|
|
3667
3667
|
}
|
|
3668
|
-
function
|
|
3668
|
+
function Jn(n) {
|
|
3669
3669
|
var e = /([^\?]*)\/*(\??.*)/.exec(n);
|
|
3670
3670
|
return {
|
|
3671
3671
|
base: e[1],
|
|
3672
3672
|
queryString: e[2]
|
|
3673
3673
|
};
|
|
3674
3674
|
}
|
|
3675
|
-
function
|
|
3675
|
+
function Yn(n, e) {
|
|
3676
3676
|
return n.base + "/" + e + "/xhr_send";
|
|
3677
3677
|
}
|
|
3678
3678
|
function et(n) {
|
|
3679
3679
|
var e = n.indexOf("?") === -1 ? "?" : "&";
|
|
3680
|
-
return n + e + "t=" + +/* @__PURE__ */ new Date() + "&n=" +
|
|
3680
|
+
return n + e + "t=" + +/* @__PURE__ */ new Date() + "&n=" + Kn++;
|
|
3681
3681
|
}
|
|
3682
|
-
function
|
|
3682
|
+
function Zn(n, e) {
|
|
3683
3683
|
var t = /(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(n);
|
|
3684
3684
|
return t[1] + e + t[3];
|
|
3685
3685
|
}
|
|
3686
3686
|
function tt(n) {
|
|
3687
3687
|
return w.randomInt(n);
|
|
3688
3688
|
}
|
|
3689
|
-
function
|
|
3689
|
+
function Qn(n) {
|
|
3690
3690
|
for (var e = [], t = 0; t < n; t++)
|
|
3691
3691
|
e.push(tt(32).toString(32));
|
|
3692
3692
|
return e.join("");
|
|
3693
3693
|
}
|
|
3694
|
-
const
|
|
3695
|
-
var
|
|
3694
|
+
const ei = Xn;
|
|
3695
|
+
var ti = {
|
|
3696
3696
|
getReceiveURL: function(n, e) {
|
|
3697
3697
|
return n.base + "/" + e + "/xhr_streaming" + n.queryString;
|
|
3698
3698
|
},
|
|
@@ -3706,8 +3706,8 @@ function Gi() {
|
|
|
3706
3706
|
n.onClose(1006, "Connection interrupted (" + e + ")", !1);
|
|
3707
3707
|
}
|
|
3708
3708
|
};
|
|
3709
|
-
const
|
|
3710
|
-
var
|
|
3709
|
+
const ni = ti;
|
|
3710
|
+
var ii = {
|
|
3711
3711
|
getReceiveURL: function(n, e) {
|
|
3712
3712
|
return n.base + "/" + e + "/xhr" + n.queryString;
|
|
3713
3713
|
},
|
|
@@ -3720,8 +3720,8 @@ function Gi() {
|
|
|
3720
3720
|
e === 200 ? n.reconnect() : n.onClose(1006, "Connection interrupted (" + e + ")", !1);
|
|
3721
3721
|
}
|
|
3722
3722
|
};
|
|
3723
|
-
const
|
|
3724
|
-
var
|
|
3723
|
+
const ri = ii;
|
|
3724
|
+
var si = {
|
|
3725
3725
|
getRequest: function(n) {
|
|
3726
3726
|
var e = w.getXHRAPI(), t = new e();
|
|
3727
3727
|
return t.onreadystatechange = t.onprogress = function() {
|
|
@@ -3739,38 +3739,38 @@ function Gi() {
|
|
|
3739
3739
|
n.onreadystatechange = null, n.abort();
|
|
3740
3740
|
}
|
|
3741
3741
|
};
|
|
3742
|
-
const
|
|
3743
|
-
var
|
|
3742
|
+
const oi = si;
|
|
3743
|
+
var ai = {
|
|
3744
3744
|
createStreamingSocket(n) {
|
|
3745
|
-
return this.createSocket(
|
|
3745
|
+
return this.createSocket(ni, n);
|
|
3746
3746
|
},
|
|
3747
3747
|
createPollingSocket(n) {
|
|
3748
|
-
return this.createSocket(
|
|
3748
|
+
return this.createSocket(ri, n);
|
|
3749
3749
|
},
|
|
3750
3750
|
createSocket(n, e) {
|
|
3751
|
-
return new
|
|
3751
|
+
return new ei(n, e);
|
|
3752
3752
|
},
|
|
3753
3753
|
createXHR(n, e) {
|
|
3754
|
-
return this.createRequest(
|
|
3754
|
+
return this.createRequest(oi, n, e);
|
|
3755
3755
|
},
|
|
3756
3756
|
createRequest(n, e, t) {
|
|
3757
|
-
return new
|
|
3757
|
+
return new Vn(n, e, t);
|
|
3758
3758
|
}
|
|
3759
3759
|
};
|
|
3760
|
-
const nt =
|
|
3760
|
+
const nt = ai;
|
|
3761
3761
|
nt.createXDR = function(n, e) {
|
|
3762
|
-
return this.createRequest(
|
|
3762
|
+
return this.createRequest($n, n, e);
|
|
3763
3763
|
};
|
|
3764
|
-
var
|
|
3764
|
+
var ci = {
|
|
3765
3765
|
nextAuthCallbackID: 1,
|
|
3766
3766
|
auth_callbacks: {},
|
|
3767
3767
|
ScriptReceivers: S,
|
|
3768
|
-
DependenciesReceivers:
|
|
3769
|
-
getDefaultStrategy:
|
|
3770
|
-
Transports:
|
|
3771
|
-
transportConnectionInitializer:
|
|
3768
|
+
DependenciesReceivers: B,
|
|
3769
|
+
getDefaultStrategy: Bn,
|
|
3770
|
+
Transports: yn,
|
|
3771
|
+
transportConnectionInitializer: Dn,
|
|
3772
3772
|
HTTPFactory: nt,
|
|
3773
|
-
TimelineTransport:
|
|
3773
|
+
TimelineTransport: sn,
|
|
3774
3774
|
getXHRAPI() {
|
|
3775
3775
|
return window.XMLHttpRequest;
|
|
3776
3776
|
},
|
|
@@ -3782,7 +3782,7 @@ function Gi() {
|
|
|
3782
3782
|
var e = () => {
|
|
3783
3783
|
this.onDocumentBody(n.ready);
|
|
3784
3784
|
};
|
|
3785
|
-
window.JSON ? e() :
|
|
3785
|
+
window.JSON ? e() : H.load("json2", {}, e);
|
|
3786
3786
|
},
|
|
3787
3787
|
getDocument() {
|
|
3788
3788
|
return document;
|
|
@@ -3791,7 +3791,7 @@ function Gi() {
|
|
|
3791
3791
|
return this.getDocument().location.protocol;
|
|
3792
3792
|
},
|
|
3793
3793
|
getAuthorizers() {
|
|
3794
|
-
return { ajax:
|
|
3794
|
+
return { ajax: jt, jsonp: Qt };
|
|
3795
3795
|
},
|
|
3796
3796
|
onDocumentBody(n) {
|
|
3797
3797
|
document.body ? n() : setTimeout(() => {
|
|
@@ -3799,10 +3799,10 @@ function Gi() {
|
|
|
3799
3799
|
}, 0);
|
|
3800
3800
|
},
|
|
3801
3801
|
createJSONPRequest(n, e) {
|
|
3802
|
-
return new
|
|
3802
|
+
return new tn(n, e);
|
|
3803
3803
|
},
|
|
3804
3804
|
createScriptRequest(n) {
|
|
3805
|
-
return new
|
|
3805
|
+
return new en(n);
|
|
3806
3806
|
},
|
|
3807
3807
|
getLocalStorage() {
|
|
3808
3808
|
try {
|
|
@@ -3822,7 +3822,7 @@ function Gi() {
|
|
|
3822
3822
|
return new ActiveXObject("Microsoft.XMLHTTP");
|
|
3823
3823
|
},
|
|
3824
3824
|
getNetwork() {
|
|
3825
|
-
return
|
|
3825
|
+
return wn;
|
|
3826
3826
|
},
|
|
3827
3827
|
createWebSocket(n) {
|
|
3828
3828
|
var e = this.getWebSocketAPI();
|
|
@@ -3855,33 +3855,33 @@ function Gi() {
|
|
|
3855
3855
|
}() * n);
|
|
3856
3856
|
}
|
|
3857
3857
|
};
|
|
3858
|
-
const w =
|
|
3859
|
-
var
|
|
3858
|
+
const w = ci;
|
|
3859
|
+
var _e;
|
|
3860
3860
|
(function(n) {
|
|
3861
3861
|
n[n.ERROR = 3] = "ERROR", n[n.INFO = 6] = "INFO", n[n.DEBUG = 7] = "DEBUG";
|
|
3862
|
-
})(
|
|
3863
|
-
const
|
|
3864
|
-
class
|
|
3862
|
+
})(_e || (_e = {}));
|
|
3863
|
+
const he = _e;
|
|
3864
|
+
class di {
|
|
3865
3865
|
constructor(e, t, r) {
|
|
3866
3866
|
this.key = e, this.session = t, this.events = [], this.options = r || {}, this.sent = 0, this.uniqueID = 0;
|
|
3867
3867
|
}
|
|
3868
3868
|
log(e, t) {
|
|
3869
|
-
e <= this.options.level && (this.events.push(
|
|
3869
|
+
e <= this.options.level && (this.events.push(O({}, t, { timestamp: N.now() })), this.options.limit && this.events.length > this.options.limit && this.events.shift());
|
|
3870
3870
|
}
|
|
3871
3871
|
error(e) {
|
|
3872
|
-
this.log(
|
|
3872
|
+
this.log(he.ERROR, e);
|
|
3873
3873
|
}
|
|
3874
3874
|
info(e) {
|
|
3875
|
-
this.log(
|
|
3875
|
+
this.log(he.INFO, e);
|
|
3876
3876
|
}
|
|
3877
3877
|
debug(e) {
|
|
3878
|
-
this.log(
|
|
3878
|
+
this.log(he.DEBUG, e);
|
|
3879
3879
|
}
|
|
3880
3880
|
isEmpty() {
|
|
3881
3881
|
return this.events.length === 0;
|
|
3882
3882
|
}
|
|
3883
3883
|
send(e, t) {
|
|
3884
|
-
var r =
|
|
3884
|
+
var r = O({
|
|
3885
3885
|
session: this.session,
|
|
3886
3886
|
bundle: this.sent + 1,
|
|
3887
3887
|
key: this.key,
|
|
@@ -3899,7 +3899,7 @@ function Gi() {
|
|
|
3899
3899
|
return this.uniqueID++, this.uniqueID;
|
|
3900
3900
|
}
|
|
3901
3901
|
}
|
|
3902
|
-
class
|
|
3902
|
+
class hi {
|
|
3903
3903
|
constructor(e, t, r, o) {
|
|
3904
3904
|
this.name = e, this.priority = t, this.transport = r, this.options = o || {};
|
|
3905
3905
|
}
|
|
@@ -3911,35 +3911,35 @@ function Gi() {
|
|
|
3911
3911
|
connect(e, t) {
|
|
3912
3912
|
if (this.isSupported()) {
|
|
3913
3913
|
if (this.priority < e)
|
|
3914
|
-
return it(new
|
|
3915
|
-
} else return it(new
|
|
3916
|
-
var r = !1, o = this.transport.createConnection(this.name, this.priority, this.options.key, this.options), c = null,
|
|
3917
|
-
o.unbind("initialized",
|
|
3918
|
-
},
|
|
3919
|
-
c =
|
|
3920
|
-
r = !0,
|
|
3914
|
+
return it(new W(), t);
|
|
3915
|
+
} else return it(new M(), t);
|
|
3916
|
+
var r = !1, o = this.transport.createConnection(this.name, this.priority, this.options.key, this.options), c = null, h = function() {
|
|
3917
|
+
o.unbind("initialized", h), o.connect();
|
|
3918
|
+
}, f = function() {
|
|
3919
|
+
c = V.createHandshake(o, function(R) {
|
|
3920
|
+
r = !0, _(), t(null, R);
|
|
3921
3921
|
});
|
|
3922
|
-
}, b = function(
|
|
3923
|
-
|
|
3922
|
+
}, b = function(R) {
|
|
3923
|
+
_(), t(R);
|
|
3924
|
+
}, T = function() {
|
|
3925
|
+
_();
|
|
3926
|
+
var R;
|
|
3927
|
+
R = ae(o), t(new z(R));
|
|
3924
3928
|
}, _ = function() {
|
|
3925
|
-
|
|
3926
|
-
var P;
|
|
3927
|
-
P = ae(o), t(new M(P));
|
|
3928
|
-
}, k = function() {
|
|
3929
|
-
o.unbind("initialized", l), o.unbind("open", p), o.unbind("error", b), o.unbind("closed", _);
|
|
3929
|
+
o.unbind("initialized", h), o.unbind("open", f), o.unbind("error", b), o.unbind("closed", T);
|
|
3930
3930
|
};
|
|
3931
|
-
return o.bind("initialized",
|
|
3931
|
+
return o.bind("initialized", h), o.bind("open", f), o.bind("error", b), o.bind("closed", T), o.initialize(), {
|
|
3932
3932
|
abort: () => {
|
|
3933
|
-
r || (
|
|
3933
|
+
r || (_(), c ? c.close() : o.close());
|
|
3934
3934
|
},
|
|
3935
|
-
forceMinPriority: (
|
|
3936
|
-
r || this.priority <
|
|
3935
|
+
forceMinPriority: (R) => {
|
|
3936
|
+
r || this.priority < R && (c ? c.close() : o.close());
|
|
3937
3937
|
}
|
|
3938
3938
|
};
|
|
3939
3939
|
}
|
|
3940
3940
|
}
|
|
3941
3941
|
function it(n, e) {
|
|
3942
|
-
return
|
|
3942
|
+
return N.defer(function() {
|
|
3943
3943
|
e(n);
|
|
3944
3944
|
}), {
|
|
3945
3945
|
abort: function() {
|
|
@@ -3948,20 +3948,20 @@ function Gi() {
|
|
|
3948
3948
|
}
|
|
3949
3949
|
};
|
|
3950
3950
|
}
|
|
3951
|
-
const { Transports:
|
|
3952
|
-
var
|
|
3953
|
-
var
|
|
3954
|
-
if (!
|
|
3955
|
-
throw new
|
|
3956
|
-
var
|
|
3957
|
-
return
|
|
3958
|
-
},
|
|
3951
|
+
const { Transports: li } = w;
|
|
3952
|
+
var ui = function(n, e, t, r, o, c) {
|
|
3953
|
+
var h = li[t];
|
|
3954
|
+
if (!h)
|
|
3955
|
+
throw new K(t);
|
|
3956
|
+
var f = (!n.enabledTransports || qe(n.enabledTransports, e) !== -1) && (!n.disabledTransports || qe(n.disabledTransports, e) === -1), b;
|
|
3957
|
+
return f ? (o = Object.assign({ ignoreNullOrigin: n.ignoreNullOrigin }, o), b = new hi(e, r, c ? c.getAssistant(h) : h, o)) : b = pi, b;
|
|
3958
|
+
}, pi = {
|
|
3959
3959
|
isSupported: function() {
|
|
3960
3960
|
return !1;
|
|
3961
3961
|
},
|
|
3962
3962
|
connect: function(n, e) {
|
|
3963
|
-
var t =
|
|
3964
|
-
e(new
|
|
3963
|
+
var t = N.defer(function() {
|
|
3964
|
+
e(new M());
|
|
3965
3965
|
});
|
|
3966
3966
|
return {
|
|
3967
3967
|
abort: function() {
|
|
@@ -3972,14 +3972,14 @@ function Gi() {
|
|
|
3972
3972
|
};
|
|
3973
3973
|
}
|
|
3974
3974
|
};
|
|
3975
|
-
function
|
|
3975
|
+
function fi(n) {
|
|
3976
3976
|
if (n == null)
|
|
3977
3977
|
throw "You must pass an options object";
|
|
3978
3978
|
if (n.cluster == null)
|
|
3979
3979
|
throw "Options object must provide a cluster";
|
|
3980
|
-
"disableStats" in n &&
|
|
3980
|
+
"disableStats" in n && L.warn("The disableStats option is deprecated in favor of enableStats");
|
|
3981
3981
|
}
|
|
3982
|
-
const
|
|
3982
|
+
const mi = (n, e) => {
|
|
3983
3983
|
var t = "socket_id=" + encodeURIComponent(n.socketId);
|
|
3984
3984
|
for (var r in e.params)
|
|
3985
3985
|
t += "&" + encodeURIComponent(r) + "=" + encodeURIComponent(e.params[r]);
|
|
@@ -3989,14 +3989,14 @@ function Gi() {
|
|
|
3989
3989
|
t += "&" + encodeURIComponent(r) + "=" + encodeURIComponent(o[r]);
|
|
3990
3990
|
}
|
|
3991
3991
|
return t;
|
|
3992
|
-
},
|
|
3992
|
+
}, gi = (n) => {
|
|
3993
3993
|
if (typeof w.getAuthorizers()[n.transport] > "u")
|
|
3994
3994
|
throw `'${n.transport}' is not a recognized auth transport`;
|
|
3995
3995
|
return (e, t) => {
|
|
3996
|
-
const r =
|
|
3996
|
+
const r = mi(e, n);
|
|
3997
3997
|
w.getAuthorizers()[n.transport](w, r, n, u.UserAuthentication, t);
|
|
3998
3998
|
};
|
|
3999
|
-
},
|
|
3999
|
+
}, vi = (n, e) => {
|
|
4000
4000
|
var t = "socket_id=" + encodeURIComponent(n.socketId);
|
|
4001
4001
|
t += "&channel_name=" + encodeURIComponent(n.channelName);
|
|
4002
4002
|
for (var r in e.params)
|
|
@@ -4007,14 +4007,14 @@ function Gi() {
|
|
|
4007
4007
|
t += "&" + encodeURIComponent(r) + "=" + encodeURIComponent(o[r]);
|
|
4008
4008
|
}
|
|
4009
4009
|
return t;
|
|
4010
|
-
},
|
|
4010
|
+
}, yi = (n) => {
|
|
4011
4011
|
if (typeof w.getAuthorizers()[n.transport] > "u")
|
|
4012
4012
|
throw `'${n.transport}' is not a recognized auth transport`;
|
|
4013
4013
|
return (e, t) => {
|
|
4014
|
-
const r =
|
|
4014
|
+
const r = vi(e, n);
|
|
4015
4015
|
w.getAuthorizers()[n.transport](w, r, n, u.ChannelAuthorization, t);
|
|
4016
4016
|
};
|
|
4017
|
-
},
|
|
4017
|
+
}, bi = (n, e, t) => {
|
|
4018
4018
|
const r = {
|
|
4019
4019
|
authTransport: e.transport,
|
|
4020
4020
|
authEndpoint: e.endpoint,
|
|
@@ -4024,73 +4024,73 @@ function Gi() {
|
|
|
4024
4024
|
}
|
|
4025
4025
|
};
|
|
4026
4026
|
return (o, c) => {
|
|
4027
|
-
const
|
|
4028
|
-
t(
|
|
4027
|
+
const h = n.channel(o.channelName);
|
|
4028
|
+
t(h, r).authorize(o.socketId, c);
|
|
4029
4029
|
};
|
|
4030
4030
|
};
|
|
4031
4031
|
function rt(n, e) {
|
|
4032
4032
|
let t = {
|
|
4033
|
-
activityTimeout: n.activityTimeout ||
|
|
4033
|
+
activityTimeout: n.activityTimeout || k.activityTimeout,
|
|
4034
4034
|
cluster: n.cluster,
|
|
4035
|
-
httpPath: n.httpPath ||
|
|
4036
|
-
httpPort: n.httpPort ||
|
|
4037
|
-
httpsPort: n.httpsPort ||
|
|
4038
|
-
pongTimeout: n.pongTimeout ||
|
|
4039
|
-
statsHost: n.statsHost ||
|
|
4040
|
-
unavailableTimeout: n.unavailableTimeout ||
|
|
4041
|
-
wsPath: n.wsPath ||
|
|
4042
|
-
wsPort: n.wsPort ||
|
|
4043
|
-
wssPort: n.wssPort ||
|
|
4044
|
-
enableStats:
|
|
4045
|
-
httpHost:
|
|
4046
|
-
useTLS:
|
|
4047
|
-
wsHost:
|
|
4048
|
-
userAuthenticator:
|
|
4049
|
-
channelAuthorizer:
|
|
4035
|
+
httpPath: n.httpPath || k.httpPath,
|
|
4036
|
+
httpPort: n.httpPort || k.httpPort,
|
|
4037
|
+
httpsPort: n.httpsPort || k.httpsPort,
|
|
4038
|
+
pongTimeout: n.pongTimeout || k.pongTimeout,
|
|
4039
|
+
statsHost: n.statsHost || k.stats_host,
|
|
4040
|
+
unavailableTimeout: n.unavailableTimeout || k.unavailableTimeout,
|
|
4041
|
+
wsPath: n.wsPath || k.wsPath,
|
|
4042
|
+
wsPort: n.wsPort || k.wsPort,
|
|
4043
|
+
wssPort: n.wssPort || k.wssPort,
|
|
4044
|
+
enableStats: xi(n),
|
|
4045
|
+
httpHost: wi(n),
|
|
4046
|
+
useTLS: ki(n),
|
|
4047
|
+
wsHost: Ci(n),
|
|
4048
|
+
userAuthenticator: Ei(n),
|
|
4049
|
+
channelAuthorizer: _i(n, e)
|
|
4050
4050
|
};
|
|
4051
4051
|
return "disabledTransports" in n && (t.disabledTransports = n.disabledTransports), "enabledTransports" in n && (t.enabledTransports = n.enabledTransports), "ignoreNullOrigin" in n && (t.ignoreNullOrigin = n.ignoreNullOrigin), "timelineParams" in n && (t.timelineParams = n.timelineParams), "nacl" in n && (t.nacl = n.nacl), t;
|
|
4052
4052
|
}
|
|
4053
|
-
function
|
|
4054
|
-
return n.httpHost ? n.httpHost : n.cluster ? `sockjs-${n.cluster}.pusher.com` :
|
|
4053
|
+
function wi(n) {
|
|
4054
|
+
return n.httpHost ? n.httpHost : n.cluster ? `sockjs-${n.cluster}.pusher.com` : k.httpHost;
|
|
4055
4055
|
}
|
|
4056
|
-
function
|
|
4057
|
-
return n.wsHost ? n.wsHost :
|
|
4056
|
+
function Ci(n) {
|
|
4057
|
+
return n.wsHost ? n.wsHost : Si(n.cluster);
|
|
4058
4058
|
}
|
|
4059
|
-
function
|
|
4059
|
+
function Si(n) {
|
|
4060
4060
|
return `ws-${n}.pusher.com`;
|
|
4061
4061
|
}
|
|
4062
|
-
function
|
|
4062
|
+
function ki(n) {
|
|
4063
4063
|
return w.getProtocol() === "https:" ? !0 : n.forceTLS !== !1;
|
|
4064
4064
|
}
|
|
4065
|
-
function
|
|
4065
|
+
function xi(n) {
|
|
4066
4066
|
return "enableStats" in n ? n.enableStats : "disableStats" in n ? !n.disableStats : !1;
|
|
4067
4067
|
}
|
|
4068
4068
|
const st = (n) => "customHandler" in n && n.customHandler != null;
|
|
4069
|
-
function
|
|
4070
|
-
const e = Object.assign(Object.assign({},
|
|
4071
|
-
return st(e) ? e.customHandler :
|
|
4069
|
+
function Ei(n) {
|
|
4070
|
+
const e = Object.assign(Object.assign({}, k.userAuthentication), n.userAuthentication);
|
|
4071
|
+
return st(e) ? e.customHandler : gi(e);
|
|
4072
4072
|
}
|
|
4073
4073
|
function Ti(n, e) {
|
|
4074
4074
|
let t;
|
|
4075
4075
|
if ("channelAuthorization" in n)
|
|
4076
|
-
t = Object.assign(Object.assign({},
|
|
4076
|
+
t = Object.assign(Object.assign({}, k.channelAuthorization), n.channelAuthorization);
|
|
4077
4077
|
else if (t = {
|
|
4078
|
-
transport: n.authTransport ||
|
|
4079
|
-
endpoint: n.authEndpoint ||
|
|
4078
|
+
transport: n.authTransport || k.authTransport,
|
|
4079
|
+
endpoint: n.authEndpoint || k.authEndpoint
|
|
4080
4080
|
}, "auth" in n && ("params" in n.auth && (t.params = n.auth.params), "headers" in n.auth && (t.headers = n.auth.headers)), "authorizer" in n)
|
|
4081
4081
|
return {
|
|
4082
|
-
customHandler:
|
|
4082
|
+
customHandler: bi(e, t, n.authorizer)
|
|
4083
4083
|
};
|
|
4084
4084
|
return t;
|
|
4085
4085
|
}
|
|
4086
|
-
function
|
|
4086
|
+
function _i(n, e) {
|
|
4087
4087
|
const t = Ti(n, e);
|
|
4088
|
-
return st(t) ? t.customHandler :
|
|
4088
|
+
return st(t) ? t.customHandler : yi(t);
|
|
4089
4089
|
}
|
|
4090
|
-
class
|
|
4090
|
+
class Ai extends G {
|
|
4091
4091
|
constructor(e) {
|
|
4092
4092
|
super(function(t, r) {
|
|
4093
|
-
|
|
4093
|
+
L.debug(`No callbacks on watchlist events for ${t}`);
|
|
4094
4094
|
}), this.pusher = e, this.bindWatchlistInternalEvent();
|
|
4095
4095
|
}
|
|
4096
4096
|
handleEvent(e) {
|
|
@@ -4105,20 +4105,20 @@ function Gi() {
|
|
|
4105
4105
|
});
|
|
4106
4106
|
}
|
|
4107
4107
|
}
|
|
4108
|
-
function
|
|
4108
|
+
function Pi() {
|
|
4109
4109
|
let n, e;
|
|
4110
4110
|
return { promise: new Promise((r, o) => {
|
|
4111
4111
|
n = r, e = o;
|
|
4112
4112
|
}), resolve: n, reject: e };
|
|
4113
4113
|
}
|
|
4114
|
-
const
|
|
4115
|
-
class
|
|
4114
|
+
const Li = Pi;
|
|
4115
|
+
class Ri extends G {
|
|
4116
4116
|
constructor(e) {
|
|
4117
4117
|
super(function(t, r) {
|
|
4118
|
-
|
|
4118
|
+
L.debug("No callbacks on user for " + t);
|
|
4119
4119
|
}), this.signin_requested = !1, this.user_data = null, this.serverToUserChannel = null, this.signinDonePromise = null, this._signinDoneResolve = null, this._onAuthorize = (t, r) => {
|
|
4120
4120
|
if (t) {
|
|
4121
|
-
|
|
4121
|
+
L.warn(`Error during signin: ${t}`), this._cleanup();
|
|
4122
4122
|
return;
|
|
4123
4123
|
}
|
|
4124
4124
|
this.pusher.send_event("pusher:signin", {
|
|
@@ -4127,7 +4127,7 @@ function Gi() {
|
|
|
4127
4127
|
});
|
|
4128
4128
|
}, this.pusher = e, this.pusher.connection.bind("state_change", ({ previous: t, current: r }) => {
|
|
4129
4129
|
t !== "connected" && r === "connected" && this._signin(), t === "connected" && r !== "connected" && (this._cleanup(), this._newSigninPromiseIfNeeded());
|
|
4130
|
-
}), this.watchlist = new
|
|
4130
|
+
}), this.watchlist = new Ai(e), this.pusher.connection.bind("message", (t) => {
|
|
4131
4131
|
var r = t.event;
|
|
4132
4132
|
r === "pusher:signin_success" && this._onSigninSuccess(t.data), this.serverToUserChannel && this.serverToUserChannel.name === t.channel && this.serverToUserChannel.handleEvent(t);
|
|
4133
4133
|
});
|
|
@@ -4144,11 +4144,11 @@ function Gi() {
|
|
|
4144
4144
|
try {
|
|
4145
4145
|
this.user_data = JSON.parse(e.user_data);
|
|
4146
4146
|
} catch {
|
|
4147
|
-
|
|
4147
|
+
L.error(`Failed parsing user data after signin: ${e.user_data}`), this._cleanup();
|
|
4148
4148
|
return;
|
|
4149
4149
|
}
|
|
4150
4150
|
if (typeof this.user_data.id != "string" || this.user_data.id === "") {
|
|
4151
|
-
|
|
4151
|
+
L.error(`user_data doesn't contain an id. user_data: ${this.user_data}`), this._cleanup();
|
|
4152
4152
|
return;
|
|
4153
4153
|
}
|
|
4154
4154
|
this._signinDoneResolve(), this._subscribeChannels();
|
|
@@ -4167,7 +4167,7 @@ function Gi() {
|
|
|
4167
4167
|
_newSigninPromiseIfNeeded() {
|
|
4168
4168
|
if (!this.signin_requested || this.signinDonePromise && !this.signinDonePromise.done)
|
|
4169
4169
|
return;
|
|
4170
|
-
const { promise: e, resolve: t } =
|
|
4170
|
+
const { promise: e, resolve: t } = Li();
|
|
4171
4171
|
e.done = !1;
|
|
4172
4172
|
const r = () => {
|
|
4173
4173
|
e.done = !0;
|
|
@@ -4175,31 +4175,31 @@ function Gi() {
|
|
|
4175
4175
|
e.then(r).catch(r), this.signinDonePromise = e, this._signinDoneResolve = t;
|
|
4176
4176
|
}
|
|
4177
4177
|
}
|
|
4178
|
-
class
|
|
4178
|
+
class j {
|
|
4179
4179
|
static ready() {
|
|
4180
|
-
|
|
4181
|
-
for (var e = 0, t =
|
|
4182
|
-
|
|
4180
|
+
j.isReady = !0;
|
|
4181
|
+
for (var e = 0, t = j.instances.length; e < t; e++)
|
|
4182
|
+
j.instances[e].connect();
|
|
4183
4183
|
}
|
|
4184
4184
|
static getClientFeatures() {
|
|
4185
|
-
return
|
|
4185
|
+
return Me(Fe({ ws: w.Transports.ws }, function(e) {
|
|
4186
4186
|
return e.isSupported({});
|
|
4187
4187
|
}));
|
|
4188
4188
|
}
|
|
4189
4189
|
constructor(e, t) {
|
|
4190
|
-
|
|
4190
|
+
ji(e), fi(t), this.key = e, this.options = t, this.config = rt(this.options, this), this.channels = V.createChannels(), this.global_emitter = new G(), this.sessionID = w.randomInt(1e9), this.timeline = new di(this.key, this.sessionID, {
|
|
4191
4191
|
cluster: this.config.cluster,
|
|
4192
|
-
features:
|
|
4192
|
+
features: j.getClientFeatures(),
|
|
4193
4193
|
params: this.config.timelineParams || {},
|
|
4194
4194
|
limit: 50,
|
|
4195
|
-
level:
|
|
4196
|
-
version:
|
|
4197
|
-
}), this.config.enableStats && (this.timelineSender =
|
|
4195
|
+
level: he.INFO,
|
|
4196
|
+
version: k.VERSION
|
|
4197
|
+
}), this.config.enableStats && (this.timelineSender = V.createTimelineSender(this.timeline, {
|
|
4198
4198
|
host: this.config.statsHost,
|
|
4199
4199
|
path: "/timeline/v2/" + w.TimelineTransport.name
|
|
4200
4200
|
}));
|
|
4201
|
-
var r = (o) => w.getDefaultStrategy(this.config, o,
|
|
4202
|
-
this.connection =
|
|
4201
|
+
var r = (o) => w.getDefaultStrategy(this.config, o, ui);
|
|
4202
|
+
this.connection = V.createConnectionManager(this.key, {
|
|
4203
4203
|
getStrategy: r,
|
|
4204
4204
|
timeline: this.timeline,
|
|
4205
4205
|
activityTimeout: this.config.activityTimeout,
|
|
@@ -4209,19 +4209,19 @@ function Gi() {
|
|
|
4209
4209
|
}), this.connection.bind("connected", () => {
|
|
4210
4210
|
this.subscribeAll(), this.timelineSender && this.timelineSender.send(this.connection.isUsingTLS());
|
|
4211
4211
|
}), this.connection.bind("message", (o) => {
|
|
4212
|
-
var c = o.event,
|
|
4212
|
+
var c = o.event, h = c.indexOf("pusher_internal:") === 0;
|
|
4213
4213
|
if (o.channel) {
|
|
4214
|
-
var
|
|
4215
|
-
|
|
4214
|
+
var f = this.channel(o.channel);
|
|
4215
|
+
f && f.handleEvent(o);
|
|
4216
4216
|
}
|
|
4217
|
-
|
|
4217
|
+
h || this.global_emitter.emit(o.event, o.data);
|
|
4218
4218
|
}), this.connection.bind("connecting", () => {
|
|
4219
4219
|
this.channels.disconnect();
|
|
4220
4220
|
}), this.connection.bind("disconnected", () => {
|
|
4221
4221
|
this.channels.disconnect();
|
|
4222
4222
|
}), this.connection.bind("error", (o) => {
|
|
4223
|
-
|
|
4224
|
-
}),
|
|
4223
|
+
L.warn(o);
|
|
4224
|
+
}), j.instances.push(this), this.timeline.info({ instances: j.instances.length }), this.user = new Ri(this), j.isReady && this.connect();
|
|
4225
4225
|
}
|
|
4226
4226
|
switchCluster(e) {
|
|
4227
4227
|
const { appKey: t, cluster: r } = e;
|
|
@@ -4236,7 +4236,7 @@ function Gi() {
|
|
|
4236
4236
|
connect() {
|
|
4237
4237
|
if (this.connection.connect(), this.timelineSender && !this.timelineSenderTimer) {
|
|
4238
4238
|
var e = this.connection.isUsingTLS(), t = this.timelineSender;
|
|
4239
|
-
this.timelineSenderTimer = new
|
|
4239
|
+
this.timelineSenderTimer = new Mt(6e4, function() {
|
|
4240
4240
|
t.send(e);
|
|
4241
4241
|
});
|
|
4242
4242
|
}
|
|
@@ -4282,20 +4282,20 @@ function Gi() {
|
|
|
4282
4282
|
this.user.signin();
|
|
4283
4283
|
}
|
|
4284
4284
|
}
|
|
4285
|
-
|
|
4286
|
-
const
|
|
4287
|
-
function
|
|
4285
|
+
j.instances = [], j.isReady = !1, j.logToConsole = !1, j.Runtime = w, j.ScriptReceivers = w.ScriptReceivers, j.DependenciesReceivers = w.DependenciesReceivers, j.auth_callbacks = w.auth_callbacks;
|
|
4286
|
+
const le = j;
|
|
4287
|
+
function ji(n) {
|
|
4288
4288
|
if (n == null)
|
|
4289
4289
|
throw "You must pass your app key when you instantiate Pusher.";
|
|
4290
4290
|
}
|
|
4291
|
-
w.setup(
|
|
4291
|
+
w.setup(j);
|
|
4292
4292
|
}
|
|
4293
4293
|
/******/
|
|
4294
4294
|
}, a = {};
|
|
4295
|
-
function
|
|
4296
|
-
var
|
|
4297
|
-
if (
|
|
4298
|
-
return
|
|
4295
|
+
function d(m) {
|
|
4296
|
+
var v = a[m];
|
|
4297
|
+
if (v !== void 0)
|
|
4298
|
+
return v.exports;
|
|
4299
4299
|
var y = a[m] = {
|
|
4300
4300
|
/******/
|
|
4301
4301
|
// no module.id needed
|
|
@@ -4305,20 +4305,20 @@ function Gi() {
|
|
|
4305
4305
|
exports: {}
|
|
4306
4306
|
/******/
|
|
4307
4307
|
};
|
|
4308
|
-
return s[m].call(y.exports, y, y.exports,
|
|
4308
|
+
return s[m].call(y.exports, y, y.exports, d), y.exports;
|
|
4309
4309
|
}
|
|
4310
|
-
|
|
4311
|
-
for (var y in
|
|
4312
|
-
|
|
4313
|
-
},
|
|
4314
|
-
var
|
|
4315
|
-
return
|
|
4310
|
+
d.d = (m, v) => {
|
|
4311
|
+
for (var y in v)
|
|
4312
|
+
d.o(v, y) && !d.o(m, y) && Object.defineProperty(m, y, { enumerable: !0, get: v[y] });
|
|
4313
|
+
}, d.o = (m, v) => Object.prototype.hasOwnProperty.call(m, v);
|
|
4314
|
+
var l = d(721);
|
|
4315
|
+
return l;
|
|
4316
4316
|
})()
|
|
4317
4317
|
));
|
|
4318
|
-
})(
|
|
4318
|
+
})(Le)), Le.exports;
|
|
4319
4319
|
}
|
|
4320
|
-
var
|
|
4321
|
-
const
|
|
4320
|
+
var Qi = Zi();
|
|
4321
|
+
const er = /* @__PURE__ */ Yi(Qi), Re = "/vendor/sendity-client/tailwind.css", Lt = {
|
|
4322
4322
|
labels: {
|
|
4323
4323
|
email: "Email",
|
|
4324
4324
|
whatsapp: "WhatsApp"
|
|
@@ -4341,7 +4341,7 @@ const Ki = /* @__PURE__ */ Ji(Yi), Pe = "/vendor/sendity-client/tailwind.css", Q
|
|
|
4341
4341
|
Code: (Code)`,
|
|
4342
4342
|
whatsappText: "Sign me into (Host) with this code: (Code)"
|
|
4343
4343
|
}
|
|
4344
|
-
},
|
|
4344
|
+
}, tr = {
|
|
4345
4345
|
labels: {
|
|
4346
4346
|
email: "E-Mail",
|
|
4347
4347
|
whatsapp: "WhatsApp"
|
|
@@ -4364,7 +4364,7 @@ Code: (Code)`,
|
|
|
4364
4364
|
Code: (Code)`,
|
|
4365
4365
|
whatsappText: "Melde mich bei (Host) mit diesem Code an: (Code)"
|
|
4366
4366
|
}
|
|
4367
|
-
},
|
|
4367
|
+
}, nr = {
|
|
4368
4368
|
labels: {
|
|
4369
4369
|
email: "E-mail",
|
|
4370
4370
|
whatsapp: "WhatsApp"
|
|
@@ -4387,57 +4387,743 @@ Code: (Code)`,
|
|
|
4387
4387
|
Code : (Code)`,
|
|
4388
4388
|
whatsappText: "Connectez-moi à (Host) avec ce code : (Code)"
|
|
4389
4389
|
}
|
|
4390
|
-
}
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4390
|
+
}, ir = {
|
|
4391
|
+
labels: {
|
|
4392
|
+
email: "Correo electrónico",
|
|
4393
|
+
whatsapp: "WhatsApp"
|
|
4394
|
+
},
|
|
4395
|
+
ui: {
|
|
4396
|
+
sendCodePrompt: "Envía este código para continuar",
|
|
4397
|
+
successGreeting: "Hola, (Name)",
|
|
4398
|
+
by: "por",
|
|
4399
|
+
toPrefix: "a",
|
|
4400
|
+
footerWaiting: "Listo para recibir tu código…",
|
|
4401
|
+
footerWaitingUntil: "Listo para recibir tu código…",
|
|
4402
|
+
footerReturnedWaiting: "Esperando a que llegue tu mensaje…",
|
|
4403
|
+
codeExpired: "El código ha caducado, solicita uno nuevo.",
|
|
4404
|
+
getNewCode: "Solicitar nuevo código"
|
|
4405
|
+
},
|
|
4406
|
+
templates: {
|
|
4407
|
+
emailSubject: "Iniciar sesión en (Host) con este código: (Code)",
|
|
4408
|
+
emailBody: `Para autenticarte en (Host), envía este correo sin hacer cambios.
|
|
4409
|
+
|
|
4410
|
+
Código: (Code)`,
|
|
4411
|
+
whatsappText: "Iniciar sesión en (Host) con este código: (Code)"
|
|
4412
|
+
}
|
|
4413
|
+
}, rr = {
|
|
4414
|
+
labels: {
|
|
4415
|
+
email: "E-mail",
|
|
4416
|
+
whatsapp: "WhatsApp"
|
|
4417
|
+
},
|
|
4418
|
+
ui: {
|
|
4419
|
+
sendCodePrompt: "Invia questo codice per continuare",
|
|
4420
|
+
successGreeting: "Ciao, (Name)",
|
|
4421
|
+
by: "via",
|
|
4422
|
+
toPrefix: "a",
|
|
4423
|
+
footerWaiting: "Pronto a ricevere il tuo codice…",
|
|
4424
|
+
footerWaitingUntil: "Pronto a ricevere il tuo codice…",
|
|
4425
|
+
footerReturnedWaiting: "In attesa che arrivi il tuo messaggio…",
|
|
4426
|
+
codeExpired: "Codice scaduto, richiedine uno nuovo.",
|
|
4427
|
+
getNewCode: "Ottieni un nuovo codice"
|
|
4428
|
+
},
|
|
4429
|
+
templates: {
|
|
4430
|
+
emailSubject: "Accedi a (Host) con questo codice: (Code)",
|
|
4431
|
+
emailBody: `Per autenticarti con (Host), invia questa e-mail senza modifiche.
|
|
4432
|
+
|
|
4433
|
+
Codice: (Code)`,
|
|
4434
|
+
whatsappText: "Accedi a (Host) con questo codice: (Code)"
|
|
4435
|
+
}
|
|
4436
|
+
}, sr = {
|
|
4437
|
+
labels: {
|
|
4438
|
+
email: "E-mail",
|
|
4439
|
+
whatsapp: "WhatsApp"
|
|
4440
|
+
},
|
|
4441
|
+
ui: {
|
|
4442
|
+
sendCodePrompt: "Wyślij ten kod, aby kontynuować",
|
|
4443
|
+
successGreeting: "Cześć, (Name)",
|
|
4444
|
+
by: "przez",
|
|
4445
|
+
toPrefix: "do",
|
|
4446
|
+
footerWaiting: "Gotowe na odebranie Twojego kodu…",
|
|
4447
|
+
footerWaitingUntil: "Gotowe na odebranie Twojego kodu…",
|
|
4448
|
+
footerReturnedWaiting: "Czekamy, aż dotrze Twoja wiadomość…",
|
|
4449
|
+
codeExpired: "Kod wygasł, poproś o nowy.",
|
|
4450
|
+
getNewCode: "Pobierz nowy kod"
|
|
4451
|
+
},
|
|
4452
|
+
templates: {
|
|
4453
|
+
emailSubject: "Zaloguj mnie do (Host) tym kodem: (Code)",
|
|
4454
|
+
emailBody: `Aby uwierzytelnić się w (Host), wyślij tę wiadomość bez zmian.
|
|
4455
|
+
|
|
4456
|
+
Kod: (Code)`,
|
|
4457
|
+
whatsappText: "Zaloguj mnie do (Host) tym kodem: (Code)"
|
|
4399
4458
|
}
|
|
4459
|
+
}, or = {
|
|
4460
|
+
labels: {
|
|
4461
|
+
email: "E-mail",
|
|
4462
|
+
whatsapp: "WhatsApp"
|
|
4463
|
+
},
|
|
4464
|
+
ui: {
|
|
4465
|
+
sendCodePrompt: "Pošli tento kód a pokračuj",
|
|
4466
|
+
successGreeting: "Ahoj, (Name)",
|
|
4467
|
+
by: "přes",
|
|
4468
|
+
toPrefix: "na",
|
|
4469
|
+
footerWaiting: "Připraveno přijmout tvůj kód…",
|
|
4470
|
+
footerWaitingUntil: "Připraveno přijmout tvůj kód…",
|
|
4471
|
+
footerReturnedWaiting: "Čekáme, až dorazí tvoje zpráva…",
|
|
4472
|
+
codeExpired: "Kód vypršel, vyžádej si nový.",
|
|
4473
|
+
getNewCode: "Získat nový kód"
|
|
4474
|
+
},
|
|
4475
|
+
templates: {
|
|
4476
|
+
emailSubject: "Přihlas mě do (Host) tímto kódem: (Code)",
|
|
4477
|
+
emailBody: `Pro ověření v (Host) odešli tento e-mail beze změn.
|
|
4478
|
+
|
|
4479
|
+
Kód: (Code)`,
|
|
4480
|
+
whatsappText: "Přihlas mě do (Host) tímto kódem: (Code)"
|
|
4481
|
+
}
|
|
4482
|
+
}, ar = {
|
|
4483
|
+
labels: {
|
|
4484
|
+
email: "E-mail",
|
|
4485
|
+
whatsapp: "WhatsApp"
|
|
4486
|
+
},
|
|
4487
|
+
ui: {
|
|
4488
|
+
sendCodePrompt: "Send denne kode for at fortsætte",
|
|
4489
|
+
successGreeting: "Hej, (Name)",
|
|
4490
|
+
by: "via",
|
|
4491
|
+
toPrefix: "til",
|
|
4492
|
+
footerWaiting: "Klar til at modtage din kode…",
|
|
4493
|
+
footerWaitingUntil: "Klar til at modtage din kode…",
|
|
4494
|
+
footerReturnedWaiting: "Venter på, at din besked ankommer…",
|
|
4495
|
+
codeExpired: "Koden er udløbet, anmod om en ny.",
|
|
4496
|
+
getNewCode: "Hent ny kode"
|
|
4497
|
+
},
|
|
4498
|
+
templates: {
|
|
4499
|
+
emailSubject: "Log mig ind på (Host) med denne kode: (Code)",
|
|
4500
|
+
emailBody: `For at godkende dig hos (Host), send denne e-mail uden ændringer.
|
|
4501
|
+
|
|
4502
|
+
Kode: (Code)`,
|
|
4503
|
+
whatsappText: "Log mig ind på (Host) med denne kode: (Code)"
|
|
4504
|
+
}
|
|
4505
|
+
}, cr = {
|
|
4506
|
+
labels: {
|
|
4507
|
+
email: "E-mail",
|
|
4508
|
+
whatsapp: "WhatsApp"
|
|
4509
|
+
},
|
|
4510
|
+
ui: {
|
|
4511
|
+
sendCodePrompt: "Stuur deze code om door te gaan",
|
|
4512
|
+
successGreeting: "Hallo, (Name)",
|
|
4513
|
+
by: "via",
|
|
4514
|
+
toPrefix: "naar",
|
|
4515
|
+
footerWaiting: "Klaar om je code te ontvangen…",
|
|
4516
|
+
footerWaitingUntil: "Klaar om je code te ontvangen…",
|
|
4517
|
+
footerReturnedWaiting: "Wachten tot je bericht aankomt…",
|
|
4518
|
+
codeExpired: "Code verlopen, vraag een nieuwe aan.",
|
|
4519
|
+
getNewCode: "Nieuwe code ophalen"
|
|
4520
|
+
},
|
|
4521
|
+
templates: {
|
|
4522
|
+
emailSubject: "Log me in bij (Host) met deze code: (Code)",
|
|
4523
|
+
emailBody: `Om je bij (Host) te authenticeren, verstuur je deze e-mail zonder wijzigingen.
|
|
4524
|
+
|
|
4525
|
+
Code: (Code)`,
|
|
4526
|
+
whatsappText: "Log me in bij (Host) met deze code: (Code)"
|
|
4527
|
+
}
|
|
4528
|
+
}, dr = {
|
|
4529
|
+
labels: {
|
|
4530
|
+
email: "E-pošta",
|
|
4531
|
+
whatsapp: "WhatsApp"
|
|
4532
|
+
},
|
|
4533
|
+
ui: {
|
|
4534
|
+
sendCodePrompt: "Pošalji ovaj kod za nastavak",
|
|
4535
|
+
successGreeting: "Bok, (Name)",
|
|
4536
|
+
by: "putem",
|
|
4537
|
+
toPrefix: "na",
|
|
4538
|
+
footerWaiting: "Spremno za primanje tvog koda…",
|
|
4539
|
+
footerWaitingUntil: "Spremno za primanje tvog koda…",
|
|
4540
|
+
footerReturnedWaiting: "Čekamo da stigne tvoja poruka…",
|
|
4541
|
+
codeExpired: "Kod je istekao, zatraži novi.",
|
|
4542
|
+
getNewCode: "Dohvati novi kod"
|
|
4543
|
+
},
|
|
4544
|
+
templates: {
|
|
4545
|
+
emailSubject: "Prijavi me u (Host) ovim kodom: (Code)",
|
|
4546
|
+
emailBody: `Za autentikaciju u (Host), pošalji ovu e-poštu bez izmjena.
|
|
4547
|
+
|
|
4548
|
+
Kod: (Code)`,
|
|
4549
|
+
whatsappText: "Prijavi me u (Host) ovim kodom: (Code)"
|
|
4550
|
+
}
|
|
4551
|
+
}, hr = {
|
|
4552
|
+
labels: {
|
|
4553
|
+
email: "Ηλεκτρονικό ταχυδρομείο",
|
|
4554
|
+
whatsapp: "WhatsApp"
|
|
4555
|
+
},
|
|
4556
|
+
ui: {
|
|
4557
|
+
sendCodePrompt: "Στείλε αυτόν τον κωδικό για να συνεχίσεις",
|
|
4558
|
+
successGreeting: "Γεια σου, (Name)",
|
|
4559
|
+
by: "μέσω",
|
|
4560
|
+
toPrefix: "προς",
|
|
4561
|
+
footerWaiting: "Έτοιμο για λήψη του κωδικού σου…",
|
|
4562
|
+
footerWaitingUntil: "Έτοιμο για λήψη του κωδικού σου…",
|
|
4563
|
+
footerReturnedWaiting: "Περιμένουμε να φτάσει το μήνυμά σου…",
|
|
4564
|
+
codeExpired: "Ο κωδικός έληξε, ζήτησε νέο.",
|
|
4565
|
+
getNewCode: "Λήψη νέου κωδικού"
|
|
4566
|
+
},
|
|
4567
|
+
templates: {
|
|
4568
|
+
emailSubject: "Σύνδεσέ με στο (Host) με αυτόν τον κωδικό: (Code)",
|
|
4569
|
+
emailBody: `Για έλεγχο ταυτότητας στο (Host), στείλε αυτό το email χωρίς αλλαγές.
|
|
4570
|
+
|
|
4571
|
+
Κωδικός: (Code)`,
|
|
4572
|
+
whatsappText: "Σύνδεσέ με στο (Host) με αυτόν τον κωδικό: (Code)"
|
|
4573
|
+
}
|
|
4574
|
+
}, lr = {
|
|
4575
|
+
labels: {
|
|
4576
|
+
email: "E-posta",
|
|
4577
|
+
whatsapp: "WhatsApp"
|
|
4578
|
+
},
|
|
4579
|
+
ui: {
|
|
4580
|
+
sendCodePrompt: "Devam etmek için bu kodu gönder",
|
|
4581
|
+
successGreeting: "Merhaba, (Name)",
|
|
4582
|
+
by: "ile",
|
|
4583
|
+
toPrefix: "şuraya",
|
|
4584
|
+
footerWaiting: "Kodunu almaya hazır…",
|
|
4585
|
+
footerWaitingUntil: "Kodunu almaya hazır…",
|
|
4586
|
+
footerReturnedWaiting: "Mesajının gelmesi bekleniyor…",
|
|
4587
|
+
codeExpired: "Kodun süresi doldu, yeni bir tane iste.",
|
|
4588
|
+
getNewCode: "Yeni kod al"
|
|
4589
|
+
},
|
|
4590
|
+
templates: {
|
|
4591
|
+
emailSubject: "(Host) oturumumu bu kodla aç: (Code)",
|
|
4592
|
+
emailBody: `(Host) ile kimlik doğrulamak için bu e-postayı değiştirmeden gönder.
|
|
4593
|
+
|
|
4594
|
+
Kod: (Code)`,
|
|
4595
|
+
whatsappText: "(Host) oturumumu bu kodla aç: (Code)"
|
|
4596
|
+
}
|
|
4597
|
+
}, ur = {
|
|
4598
|
+
labels: {
|
|
4599
|
+
email: "E-Mail",
|
|
4600
|
+
whatsapp: "WhatsApp"
|
|
4601
|
+
},
|
|
4602
|
+
ui: {
|
|
4603
|
+
sendCodePrompt: "Schick de Code, dann geht’s weider",
|
|
4604
|
+
successGreeting: "Ei Gude, (Name)",
|
|
4605
|
+
by: "per",
|
|
4606
|
+
toPrefix: "an",
|
|
4607
|
+
footerWaiting: "Bereit fer dein Code…",
|
|
4608
|
+
footerWaitingUntil: "Bereit fer dein Code…",
|
|
4609
|
+
footerReturnedWaiting: "Mir warte, bis dei Nachricht kimmt…",
|
|
4610
|
+
codeExpired: "De Code is abgelaafe, hol der en neue.",
|
|
4611
|
+
getNewCode: "Neie Code hole"
|
|
4612
|
+
},
|
|
4613
|
+
templates: {
|
|
4614
|
+
emailSubject: "Logg misch bei (Host) mit dem Code oi: (Code)",
|
|
4615
|
+
emailBody: `Zum Oilogge bei (Host) schick die E-Mail ohne ebbes zu ännere.
|
|
4616
|
+
|
|
4617
|
+
Code: (Code)`,
|
|
4618
|
+
whatsappText: "Logg misch bei (Host) mit dem Code oi: (Code)"
|
|
4619
|
+
}
|
|
4620
|
+
}, pr = {
|
|
4621
|
+
labels: {
|
|
4622
|
+
email: "Эл. почта",
|
|
4623
|
+
whatsapp: "WhatsApp"
|
|
4624
|
+
},
|
|
4625
|
+
ui: {
|
|
4626
|
+
sendCodePrompt: "Отправьте этот код, чтобы продолжить",
|
|
4627
|
+
successGreeting: "Здравствуйте, (Name)",
|
|
4628
|
+
by: "через",
|
|
4629
|
+
toPrefix: "на",
|
|
4630
|
+
footerWaiting: "Готово к получению вашего кода…",
|
|
4631
|
+
footerWaitingUntil: "Готово к получению вашего кода…",
|
|
4632
|
+
footerReturnedWaiting: "Ожидаем прибытия вашего сообщения…",
|
|
4633
|
+
codeExpired: "Срок действия кода истёк, запросите новый.",
|
|
4634
|
+
getNewCode: "Получить новый код"
|
|
4635
|
+
},
|
|
4636
|
+
templates: {
|
|
4637
|
+
emailSubject: "Войдите в (Host) с этим кодом: (Code)",
|
|
4638
|
+
emailBody: `Чтобы войти в (Host), отправьте это письмо без изменений.
|
|
4639
|
+
|
|
4640
|
+
Код: (Code)`,
|
|
4641
|
+
whatsappText: "Войдите в (Host) с этим кодом: (Code)"
|
|
4642
|
+
}
|
|
4643
|
+
}, fr = {
|
|
4644
|
+
labels: {
|
|
4645
|
+
email: "E-post",
|
|
4646
|
+
whatsapp: "WhatsApp"
|
|
4647
|
+
},
|
|
4648
|
+
ui: {
|
|
4649
|
+
sendCodePrompt: "Skicka den här koden för att fortsätta",
|
|
4650
|
+
successGreeting: "Hej, (Name)",
|
|
4651
|
+
by: "via",
|
|
4652
|
+
toPrefix: "till",
|
|
4653
|
+
footerWaiting: "Redo att ta emot din kod…",
|
|
4654
|
+
footerWaitingUntil: "Redo att ta emot din kod…",
|
|
4655
|
+
footerReturnedWaiting: "Väntar på att ditt meddelande ska komma fram…",
|
|
4656
|
+
codeExpired: "Koden har gått ut, begär en ny.",
|
|
4657
|
+
getNewCode: "Hämta ny kod"
|
|
4658
|
+
},
|
|
4659
|
+
templates: {
|
|
4660
|
+
emailSubject: "Logga in mig på (Host) med den här koden: (Code)",
|
|
4661
|
+
emailBody: `För att autentisera dig hos (Host), skicka detta e-postmeddelande utan ändringar.
|
|
4662
|
+
|
|
4663
|
+
Kod: (Code)`,
|
|
4664
|
+
whatsappText: "Logga in mig på (Host) med den här koden: (Code)"
|
|
4665
|
+
}
|
|
4666
|
+
}, mr = {
|
|
4667
|
+
labels: {
|
|
4668
|
+
email: "E-mail",
|
|
4669
|
+
whatsapp: "WhatsApp"
|
|
4670
|
+
},
|
|
4671
|
+
ui: {
|
|
4672
|
+
sendCodePrompt: "Envia este código para continuar",
|
|
4673
|
+
successGreeting: "Olá, (Name)",
|
|
4674
|
+
by: "por",
|
|
4675
|
+
toPrefix: "para",
|
|
4676
|
+
footerWaiting: "Pronto para receber o teu código…",
|
|
4677
|
+
footerWaitingUntil: "Pronto para receber o teu código…",
|
|
4678
|
+
footerReturnedWaiting: "A aguardar que a tua mensagem chegue…",
|
|
4679
|
+
codeExpired: "O código expirou, pede um novo.",
|
|
4680
|
+
getNewCode: "Obter novo código"
|
|
4681
|
+
},
|
|
4682
|
+
templates: {
|
|
4683
|
+
emailSubject: "Inicia sessão em (Host) com este código: (Code)",
|
|
4684
|
+
emailBody: `Para autenticar em (Host), envia este email sem fazer alterações.
|
|
4685
|
+
|
|
4686
|
+
Código: (Code)`,
|
|
4687
|
+
whatsappText: "Inicia sessão em (Host) com este código: (Code)"
|
|
4688
|
+
}
|
|
4689
|
+
}, gr = {
|
|
4690
|
+
labels: {
|
|
4691
|
+
email: "E-pošta",
|
|
4692
|
+
whatsapp: "WhatsApp"
|
|
4693
|
+
},
|
|
4694
|
+
ui: {
|
|
4695
|
+
sendCodePrompt: "Pošlji to kodo za nadaljevanje",
|
|
4696
|
+
successGreeting: "Pozdravljeni, (Name)",
|
|
4697
|
+
by: "prek",
|
|
4698
|
+
toPrefix: "na",
|
|
4699
|
+
footerWaiting: "Pripravljeno na prejem tvoje kode…",
|
|
4700
|
+
footerWaitingUntil: "Pripravljeno na prejem tvoje kode…",
|
|
4701
|
+
footerReturnedWaiting: "Čakamo, da prispe tvoje sporočilo…",
|
|
4702
|
+
codeExpired: "Koda je potekla, zahtevaj novo.",
|
|
4703
|
+
getNewCode: "Pridobi novo kodo"
|
|
4704
|
+
},
|
|
4705
|
+
templates: {
|
|
4706
|
+
emailSubject: "Prijavi me v (Host) s to kodo: (Code)",
|
|
4707
|
+
emailBody: `Za prijavo v (Host) pošlji to e-pošto brez sprememb.
|
|
4708
|
+
|
|
4709
|
+
Koda: (Code)`,
|
|
4710
|
+
whatsappText: "Prijavi me v (Host) s to kodo: (Code)"
|
|
4711
|
+
}
|
|
4712
|
+
}, vr = {
|
|
4713
|
+
labels: {
|
|
4714
|
+
email: "E-mail",
|
|
4715
|
+
whatsapp: "WhatsApp"
|
|
4716
|
+
},
|
|
4717
|
+
ui: {
|
|
4718
|
+
sendCodePrompt: "Pošli tento kód a pokračuj",
|
|
4719
|
+
successGreeting: "Dobrý deň, (Name)",
|
|
4720
|
+
by: "cez",
|
|
4721
|
+
toPrefix: "na",
|
|
4722
|
+
footerWaiting: "Pripravené prijať tvoj kód…",
|
|
4723
|
+
footerWaitingUntil: "Pripravené prijať tvoj kód…",
|
|
4724
|
+
footerReturnedWaiting: "Čakáme, kým dorazí tvoja správa…",
|
|
4725
|
+
codeExpired: "Kód vypršal, vyžiadaj si nový.",
|
|
4726
|
+
getNewCode: "Získať nový kód"
|
|
4727
|
+
},
|
|
4728
|
+
templates: {
|
|
4729
|
+
emailSubject: "Prihlás ma do (Host) týmto kódom: (Code)",
|
|
4730
|
+
emailBody: `Na overenie v (Host) odošli tento e-mail bez zmien.
|
|
4731
|
+
|
|
4732
|
+
Kód: (Code)`,
|
|
4733
|
+
whatsappText: "Prihlás ma do (Host) týmto kódom: (Code)"
|
|
4734
|
+
}
|
|
4735
|
+
}, yr = {
|
|
4736
|
+
labels: {
|
|
4737
|
+
email: "E-mail",
|
|
4738
|
+
whatsapp: "WhatsApp"
|
|
4739
|
+
},
|
|
4740
|
+
ui: {
|
|
4741
|
+
sendCodePrompt: "Dërgo këtë kod për të vazhduar",
|
|
4742
|
+
successGreeting: "Përshëndetje, (Name)",
|
|
4743
|
+
by: "me",
|
|
4744
|
+
toPrefix: "te",
|
|
4745
|
+
footerWaiting: "Gati për të marrë kodin tënd…",
|
|
4746
|
+
footerWaitingUntil: "Gati për të marrë kodin tënd…",
|
|
4747
|
+
footerReturnedWaiting: "Po presim që mesazhi yt të mbërrijë…",
|
|
4748
|
+
codeExpired: "Kodi skadoi, kërko një të ri.",
|
|
4749
|
+
getNewCode: "Merr kod të ri"
|
|
4750
|
+
},
|
|
4751
|
+
templates: {
|
|
4752
|
+
emailSubject: "Më identifiko në (Host) me këtë kod: (Code)",
|
|
4753
|
+
emailBody: `Për t’u autentikuar në (Host), dërgo këtë email pa ndryshime.
|
|
4754
|
+
|
|
4755
|
+
Kodi: (Code)`,
|
|
4756
|
+
whatsappText: "Më identifiko në (Host) me këtë kod: (Code)"
|
|
4757
|
+
}
|
|
4758
|
+
}, br = {
|
|
4759
|
+
labels: {
|
|
4760
|
+
email: "Էլ. փոստ",
|
|
4761
|
+
whatsapp: "WhatsApp"
|
|
4762
|
+
},
|
|
4763
|
+
ui: {
|
|
4764
|
+
sendCodePrompt: "Ուղարկեք այս կոդը՝ շարունակելու համար",
|
|
4765
|
+
successGreeting: "Բարև, (Name)",
|
|
4766
|
+
by: "միջոցով",
|
|
4767
|
+
toPrefix: "դեպի",
|
|
4768
|
+
footerWaiting: "Պատրաստ է ստանալ ձեր կոդը…",
|
|
4769
|
+
footerWaitingUntil: "Պատրաստ է ստանալ ձեր կոդը…",
|
|
4770
|
+
footerReturnedWaiting: "Սպասում ենք ձեր հաղորդագրության ժամանելուն…",
|
|
4771
|
+
codeExpired: "Կոդի ժամկետը լրացել է, խնդրեք նորը։",
|
|
4772
|
+
getNewCode: "Ստանալ նոր կոդ"
|
|
4773
|
+
},
|
|
4774
|
+
templates: {
|
|
4775
|
+
emailSubject: "Մուտք գործեք (Host) այս կոդով՝ (Code)",
|
|
4776
|
+
emailBody: `(Host)-ում նույնականացման համար ուղարկեք այս նամակը առանց փոփոխությունների։
|
|
4777
|
+
|
|
4778
|
+
Կոդ՝ (Code)`,
|
|
4779
|
+
whatsappText: "Մուտք գործեք (Host) այս կոդով՝ (Code)"
|
|
4780
|
+
}
|
|
4781
|
+
}, wr = {
|
|
4782
|
+
labels: {
|
|
4783
|
+
email: "E-pošta",
|
|
4784
|
+
whatsapp: "WhatsApp"
|
|
4785
|
+
},
|
|
4786
|
+
ui: {
|
|
4787
|
+
sendCodePrompt: "Pošalji ovaj kod za nastavak",
|
|
4788
|
+
successGreeting: "Zdravo, (Name)",
|
|
4789
|
+
by: "preko",
|
|
4790
|
+
toPrefix: "na",
|
|
4791
|
+
footerWaiting: "Spremno za prijem tvog koda…",
|
|
4792
|
+
footerWaitingUntil: "Spremno za prijem tvog koda…",
|
|
4793
|
+
footerReturnedWaiting: "Čekamo da tvoja poruka stigne…",
|
|
4794
|
+
codeExpired: "Kod je istekao, zatraži novi.",
|
|
4795
|
+
getNewCode: "Nabavi novi kod"
|
|
4796
|
+
},
|
|
4797
|
+
templates: {
|
|
4798
|
+
emailSubject: "Prijavi me na (Host) ovim kodom: (Code)",
|
|
4799
|
+
emailBody: `Za autentifikaciju na (Host), pošalji ovu e-poštu bez izmena.
|
|
4800
|
+
|
|
4801
|
+
Kod: (Code)`,
|
|
4802
|
+
whatsappText: "Prijavi me na (Host) ovim kodom: (Code)"
|
|
4803
|
+
}
|
|
4804
|
+
}, Cr = {
|
|
4805
|
+
labels: {
|
|
4806
|
+
email: "El. paštas",
|
|
4807
|
+
whatsapp: "WhatsApp"
|
|
4808
|
+
},
|
|
4809
|
+
ui: {
|
|
4810
|
+
sendCodePrompt: "Išsiųskite šį kodą, kad tęstumėte",
|
|
4811
|
+
successGreeting: "Sveiki, (Name)",
|
|
4812
|
+
by: "per",
|
|
4813
|
+
toPrefix: "į",
|
|
4814
|
+
footerWaiting: "Paruošta gauti jūsų kodą…",
|
|
4815
|
+
footerWaitingUntil: "Paruošta gauti jūsų kodą…",
|
|
4816
|
+
footerReturnedWaiting: "Laukiame, kol atvyks jūsų žinutė…",
|
|
4817
|
+
codeExpired: "Kodas nebegalioja, paprašykite naujo.",
|
|
4818
|
+
getNewCode: "Gauti naują kodą"
|
|
4819
|
+
},
|
|
4820
|
+
templates: {
|
|
4821
|
+
emailSubject: "Prisijungti prie (Host) šiuo kodu: (Code)",
|
|
4822
|
+
emailBody: `Norėdami prisijungti prie (Host), išsiųskite šį el. laišką nieko nekeisdami.
|
|
4823
|
+
|
|
4824
|
+
Kodas: (Code)`,
|
|
4825
|
+
whatsappText: "Prisijungti prie (Host) šiuo kodu: (Code)"
|
|
4826
|
+
}
|
|
4827
|
+
}, Sr = {
|
|
4828
|
+
labels: {
|
|
4829
|
+
email: "E-pasts",
|
|
4830
|
+
whatsapp: "WhatsApp"
|
|
4831
|
+
},
|
|
4832
|
+
ui: {
|
|
4833
|
+
sendCodePrompt: "Nosūtiet šo kodu, lai turpinātu",
|
|
4834
|
+
successGreeting: "Sveiki, (Name)",
|
|
4835
|
+
by: "ar",
|
|
4836
|
+
toPrefix: "uz",
|
|
4837
|
+
footerWaiting: "Gatavs saņemt jūsu kodu…",
|
|
4838
|
+
footerWaitingUntil: "Gatavs saņemt jūsu kodu…",
|
|
4839
|
+
footerReturnedWaiting: "Gaidām, kad pienāks jūsu ziņojums…",
|
|
4840
|
+
codeExpired: "Koda derīgums beidzies, pieprasiet jaunu.",
|
|
4841
|
+
getNewCode: "Saņemt jaunu kodu"
|
|
4842
|
+
},
|
|
4843
|
+
templates: {
|
|
4844
|
+
emailSubject: "Pierakstīties (Host) ar šo kodu: (Code)",
|
|
4845
|
+
emailBody: `Lai autentificētos (Host), nosūtiet šo e-pastu bez izmaiņām.
|
|
4846
|
+
|
|
4847
|
+
Kods: (Code)`,
|
|
4848
|
+
whatsappText: "Pierakstīties (Host) ar šo kodu: (Code)"
|
|
4849
|
+
}
|
|
4850
|
+
}, kr = {
|
|
4851
|
+
labels: {
|
|
4852
|
+
email: "E-post",
|
|
4853
|
+
whatsapp: "WhatsApp"
|
|
4854
|
+
},
|
|
4855
|
+
ui: {
|
|
4856
|
+
sendCodePrompt: "Jätkamiseks saada see kood",
|
|
4857
|
+
successGreeting: "Tere, (Name)",
|
|
4858
|
+
by: "kaudu",
|
|
4859
|
+
toPrefix: "aadressile",
|
|
4860
|
+
footerWaiting: "Valmis sinu koodi vastu võtma…",
|
|
4861
|
+
footerWaitingUntil: "Valmis sinu koodi vastu võtma…",
|
|
4862
|
+
footerReturnedWaiting: "Ootame, kuni sinu sõnum kohale jõuab…",
|
|
4863
|
+
codeExpired: "Kood aegus, küsi uus.",
|
|
4864
|
+
getNewCode: "Hangi uus kood"
|
|
4865
|
+
},
|
|
4866
|
+
templates: {
|
|
4867
|
+
emailSubject: "Logi mind (Host)-i selle koodiga sisse: (Code)",
|
|
4868
|
+
emailBody: `(Host)-i autentimiseks saada see e-kiri ilma muudatusteta.
|
|
4869
|
+
|
|
4870
|
+
Kood: (Code)`,
|
|
4871
|
+
whatsappText: "Logi mind (Host)-i selle koodiga sisse: (Code)"
|
|
4872
|
+
}
|
|
4873
|
+
}, xr = {
|
|
4874
|
+
labels: {
|
|
4875
|
+
email: "Sähköposti",
|
|
4876
|
+
whatsapp: "WhatsApp"
|
|
4877
|
+
},
|
|
4878
|
+
ui: {
|
|
4879
|
+
sendCodePrompt: "Lähetä tämä koodi jatkaaksesi",
|
|
4880
|
+
successGreeting: "Hei, (Name)",
|
|
4881
|
+
by: "palvelulla",
|
|
4882
|
+
toPrefix: "kohteeseen",
|
|
4883
|
+
footerWaiting: "Valmis vastaanottamaan koodisi…",
|
|
4884
|
+
footerWaitingUntil: "Valmis vastaanottamaan koodisi…",
|
|
4885
|
+
footerReturnedWaiting: "Odotetaan viestisi saapumista…",
|
|
4886
|
+
codeExpired: "Koodi vanheni, pyydä uusi.",
|
|
4887
|
+
getNewCode: "Hae uusi koodi"
|
|
4888
|
+
},
|
|
4889
|
+
templates: {
|
|
4890
|
+
emailSubject: "Kirjaa minut palveluun (Host) tällä koodilla: (Code)",
|
|
4891
|
+
emailBody: `Tunnistautuaksesi palveluun (Host), lähetä tämä sähköposti muuttamatta sitä.
|
|
4892
|
+
|
|
4893
|
+
Koodi: (Code)`,
|
|
4894
|
+
whatsappText: "Kirjaa minut palveluun (Host) tällä koodilla: (Code)"
|
|
4895
|
+
}
|
|
4896
|
+
}, Er = {
|
|
4897
|
+
labels: {
|
|
4898
|
+
email: "البريد الإلكتروني",
|
|
4899
|
+
whatsapp: "WhatsApp"
|
|
4900
|
+
},
|
|
4901
|
+
ui: {
|
|
4902
|
+
sendCodePrompt: "أرسل هذا الرمز للمتابعة",
|
|
4903
|
+
successGreeting: "مرحبًا، (Name)",
|
|
4904
|
+
by: "عبر",
|
|
4905
|
+
toPrefix: "إلى",
|
|
4906
|
+
footerWaiting: "جاهز لاستلام رمزك…",
|
|
4907
|
+
footerWaitingUntil: "جاهز لاستلام رمزك…",
|
|
4908
|
+
footerReturnedWaiting: "ننتظر وصول رسالتك…",
|
|
4909
|
+
codeExpired: "انتهت صلاحية الرمز، اطلب رمزًا جديدًا.",
|
|
4910
|
+
getNewCode: "احصل على رمز جديد"
|
|
4911
|
+
},
|
|
4912
|
+
templates: {
|
|
4913
|
+
emailSubject: "سجّل دخولي إلى (Host) بهذا الرمز: (Code)",
|
|
4914
|
+
emailBody: `للمصادقة مع (Host)، أرسل هذا البريد الإلكتروني دون أي تغييرات.
|
|
4915
|
+
|
|
4916
|
+
الرمز: (Code)`,
|
|
4917
|
+
whatsappText: "سجّل دخولي إلى (Host) بهذا الرمز: (Code)"
|
|
4918
|
+
}
|
|
4919
|
+
}, Tr = {
|
|
4920
|
+
labels: {
|
|
4921
|
+
email: "אימייל",
|
|
4922
|
+
whatsapp: "WhatsApp"
|
|
4923
|
+
},
|
|
4924
|
+
ui: {
|
|
4925
|
+
sendCodePrompt: "שלח את הקוד הזה כדי להמשיך",
|
|
4926
|
+
successGreeting: "שלום, (Name)",
|
|
4927
|
+
by: "באמצעות",
|
|
4928
|
+
toPrefix: "אל",
|
|
4929
|
+
footerWaiting: "מוכן לקבל את הקוד שלך…",
|
|
4930
|
+
footerWaitingUntil: "מוכן לקבל את הקוד שלך…",
|
|
4931
|
+
footerReturnedWaiting: "ממתינים שההודעה שלך תגיע…",
|
|
4932
|
+
codeExpired: "פג תוקף הקוד, בקש קוד חדש.",
|
|
4933
|
+
getNewCode: "קבל קוד חדש"
|
|
4934
|
+
},
|
|
4935
|
+
templates: {
|
|
4936
|
+
emailSubject: "היכנס אותי אל (Host) עם הקוד הזה: (Code)",
|
|
4937
|
+
emailBody: `כדי להזדהות מול (Host), שלח את האימייל הזה ללא שינויים.
|
|
4938
|
+
|
|
4939
|
+
קוד: (Code)`,
|
|
4940
|
+
whatsappText: "היכנס אותי אל (Host) עם הקוד הזה: (Code)"
|
|
4941
|
+
}
|
|
4942
|
+
}, _r = {
|
|
4943
|
+
labels: {
|
|
4944
|
+
email: "メール",
|
|
4945
|
+
whatsapp: "WhatsApp"
|
|
4946
|
+
},
|
|
4947
|
+
ui: {
|
|
4948
|
+
sendCodePrompt: "続行するにはこのコードを送信してください",
|
|
4949
|
+
successGreeting: "こんにちは、(Name)",
|
|
4950
|
+
by: "経由",
|
|
4951
|
+
toPrefix: "宛先",
|
|
4952
|
+
footerWaiting: "コードを受信する準備ができました…",
|
|
4953
|
+
footerWaitingUntil: "コードを受信する準備ができました…",
|
|
4954
|
+
footerReturnedWaiting: "メッセージの到着を待っています…",
|
|
4955
|
+
codeExpired: "コードの有効期限が切れました。新しいコードを取得してください。",
|
|
4956
|
+
getNewCode: "新しいコードを取得"
|
|
4957
|
+
},
|
|
4958
|
+
templates: {
|
|
4959
|
+
emailSubject: "このコードで (Host) にサインインします: (Code)",
|
|
4960
|
+
emailBody: `(Host) で認証するには、このメールを変更せずに送信してください。
|
|
4961
|
+
|
|
4962
|
+
コード: (Code)`,
|
|
4963
|
+
whatsappText: "このコードで (Host) にサインインします: (Code)"
|
|
4964
|
+
}
|
|
4965
|
+
}, Ar = {
|
|
4966
|
+
labels: {
|
|
4967
|
+
email: "이메일",
|
|
4968
|
+
whatsapp: "WhatsApp"
|
|
4969
|
+
},
|
|
4970
|
+
ui: {
|
|
4971
|
+
sendCodePrompt: "계속하려면 이 코드를 보내세요",
|
|
4972
|
+
successGreeting: "안녕하세요, (Name)",
|
|
4973
|
+
by: "수단",
|
|
4974
|
+
toPrefix: "대상",
|
|
4975
|
+
footerWaiting: "코드를 받을 준비가 되었습니다…",
|
|
4976
|
+
footerWaitingUntil: "코드를 받을 준비가 되었습니다…",
|
|
4977
|
+
footerReturnedWaiting: "메시지가 도착하기를 기다리는 중…",
|
|
4978
|
+
codeExpired: "코드가 만료되었습니다. 새 코드를 요청하세요.",
|
|
4979
|
+
getNewCode: "새 코드 받기"
|
|
4980
|
+
},
|
|
4981
|
+
templates: {
|
|
4982
|
+
emailSubject: "이 코드로 (Host)에 로그인합니다: (Code)",
|
|
4983
|
+
emailBody: `(Host)에 인증하려면 이 이메일을 변경하지 말고 보내세요.
|
|
4984
|
+
|
|
4985
|
+
코드: (Code)`,
|
|
4986
|
+
whatsappText: "이 코드로 (Host)에 로그인합니다: (Code)"
|
|
4987
|
+
}
|
|
4988
|
+
}, Pr = {
|
|
4989
|
+
labels: {
|
|
4990
|
+
email: "电子邮件",
|
|
4991
|
+
whatsapp: "WhatsApp"
|
|
4992
|
+
},
|
|
4993
|
+
ui: {
|
|
4994
|
+
sendCodePrompt: "发送此代码以继续",
|
|
4995
|
+
successGreeting: "你好,(Name)",
|
|
4996
|
+
by: "通过",
|
|
4997
|
+
toPrefix: "发送到",
|
|
4998
|
+
footerWaiting: "已准备好接收你的代码…",
|
|
4999
|
+
footerWaitingUntil: "已准备好接收你的代码…",
|
|
5000
|
+
footerReturnedWaiting: "正在等待你的消息到达…",
|
|
5001
|
+
codeExpired: "代码已过期,请获取新代码。",
|
|
5002
|
+
getNewCode: "获取新代码"
|
|
5003
|
+
},
|
|
5004
|
+
templates: {
|
|
5005
|
+
emailSubject: "使用此代码登录 (Host):(Code)",
|
|
5006
|
+
emailBody: `要在 (Host) 进行身份验证,请发送此电子邮件且不要修改。
|
|
5007
|
+
|
|
5008
|
+
代码:(Code)`,
|
|
5009
|
+
whatsappText: "使用此代码登录 (Host):(Code)"
|
|
5010
|
+
}
|
|
5011
|
+
}, Lr = [
|
|
5012
|
+
"en",
|
|
5013
|
+
"de",
|
|
5014
|
+
"fr",
|
|
5015
|
+
"es",
|
|
5016
|
+
"it",
|
|
5017
|
+
"pl",
|
|
5018
|
+
"cs",
|
|
5019
|
+
"da",
|
|
5020
|
+
"nl",
|
|
5021
|
+
"hr",
|
|
5022
|
+
"el",
|
|
5023
|
+
"tr",
|
|
5024
|
+
"de-he",
|
|
5025
|
+
"ru",
|
|
5026
|
+
"sv",
|
|
5027
|
+
"pt",
|
|
5028
|
+
"sl",
|
|
5029
|
+
"sk",
|
|
5030
|
+
"sq",
|
|
5031
|
+
"hy",
|
|
5032
|
+
"sr",
|
|
5033
|
+
"lt",
|
|
5034
|
+
"lv",
|
|
5035
|
+
"et",
|
|
5036
|
+
"fi",
|
|
5037
|
+
"ar",
|
|
5038
|
+
"he",
|
|
5039
|
+
"ja",
|
|
5040
|
+
"ko",
|
|
5041
|
+
"zh"
|
|
5042
|
+
], Rr = {
|
|
5043
|
+
en: Lt,
|
|
5044
|
+
de: tr,
|
|
5045
|
+
fr: nr,
|
|
5046
|
+
es: ir,
|
|
5047
|
+
it: rr,
|
|
5048
|
+
pl: sr,
|
|
5049
|
+
cs: or,
|
|
5050
|
+
da: ar,
|
|
5051
|
+
nl: cr,
|
|
5052
|
+
hr: dr,
|
|
5053
|
+
el: hr,
|
|
5054
|
+
tr: lr,
|
|
5055
|
+
"de-he": ur,
|
|
5056
|
+
ru: pr,
|
|
5057
|
+
sv: fr,
|
|
5058
|
+
pt: mr,
|
|
5059
|
+
sl: gr,
|
|
5060
|
+
sk: vr,
|
|
5061
|
+
sq: yr,
|
|
5062
|
+
hy: br,
|
|
5063
|
+
sr: wr,
|
|
5064
|
+
lt: Cr,
|
|
5065
|
+
lv: Sr,
|
|
5066
|
+
et: kr,
|
|
5067
|
+
fi: xr,
|
|
5068
|
+
ar: Er,
|
|
5069
|
+
he: Tr,
|
|
5070
|
+
ja: _r,
|
|
5071
|
+
ko: Ar,
|
|
5072
|
+
zh: Pr
|
|
5073
|
+
};
|
|
5074
|
+
function vt(g) {
|
|
5075
|
+
return Lr.includes(g);
|
|
5076
|
+
}
|
|
5077
|
+
function yt(g) {
|
|
5078
|
+
if (!g) return null;
|
|
5079
|
+
const i = g.trim().toLowerCase().replace("_", "-");
|
|
5080
|
+
if (vt(i)) return i;
|
|
5081
|
+
const s = i.split("-")[0];
|
|
5082
|
+
return vt(s) ? s : null;
|
|
4400
5083
|
}
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
function je(v, i) {
|
|
4404
|
-
return `sendity:auth-request:${encodeURIComponent(v)}:${encodeURIComponent(i)}`;
|
|
5084
|
+
function F(g) {
|
|
5085
|
+
return Rr[g] ?? Lt;
|
|
4405
5086
|
}
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
5087
|
+
const bt = `<svg role="img" viewBox="0 0 512 512" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><title>Email</title><path d="M64 112c-8.8 0-16 7.2-16 16l0 22.1L220.5 291.7c20.7 17 50.4 17 71.1 0L464 150.1l0-22.1c0-8.8-7.2-16-16-16L64 112zM48 212.2L48 384c0 8.8 7.2 16 16 16l384 0c8.8 0 16-7.2 16-16l0-171.8L322 328.8c-38.4 31.5-93.7 31.5-132 0L48 212.2zM0 128C0 92.7 28.7 64 64 64l384 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128z"/></svg>
|
|
5088
|
+
`, wt = '<svg role="img" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><title>WhatsApp</title><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"/></svg>', jr = '<svg viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M4.998 9.332A5.002 5.002 0 0 1 13.2 5.5H11a1 1 0 1 0 0 2h4.5a1 1 0 0 0 1-1V2a1 1 0 1 0-2 0v1.74A7.002 7.002 0 0 0 3 9.332a1 1 0 1 0 1.998 0ZM15.002 10.668A5.002 5.002 0 0 1 6.8 14.5H9a1 1 0 1 0 0-2H4.5a1 1 0 0 0-1 1V18a1 1 0 1 0 2 0v-1.74a7.002 7.002 0 0 0 11.5-5.592 1 1 0 1 0-1.998 0Z" clip-rule="evenodd" /></svg>', Ir = '<svg viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM7.22 6.22a.75.75 0 0 0-1.06 1.06L8.88 10l-2.72 2.72a.75.75 0 1 0 1.06 1.06L9.94 11.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L11 10l2.72-2.72a.75.75 0 0 0-1.06-1.06L9.94 8.94 7.22 6.22Z" clip-rule="evenodd" /></svg>', ze = "sendityAuthRequest", Wr = "https://sendity.io/api/sendity", Nr = 600 * 1e3, Hr = 5e3, zr = 15e3, Or = 1e3, je = 2e3, fe = 220, Rt = 0;
|
|
5089
|
+
function Oe(g, i) {
|
|
5090
|
+
return `sendity:auth-request:${encodeURIComponent(g)}:${encodeURIComponent(i)}`;
|
|
5091
|
+
}
|
|
5092
|
+
function Ct(g, i, s, a = Date.now()) {
|
|
5093
|
+
g.removeItem(ze);
|
|
5094
|
+
const d = Oe(i, s), l = g.getItem(d);
|
|
5095
|
+
if (!l) return null;
|
|
4410
5096
|
try {
|
|
4411
|
-
const m = JSON.parse(
|
|
5097
|
+
const m = JSON.parse(l);
|
|
4412
5098
|
if (typeof m.id != "string" || typeof m.clientSecret != "string" || typeof m.createdAt != "number")
|
|
4413
5099
|
throw new Error("invalid stored auth request");
|
|
4414
|
-
return a - m.createdAt >=
|
|
5100
|
+
return a - m.createdAt >= Nr ? (g.removeItem(d), null) : { id: m.id, clientSecret: m.clientSecret };
|
|
4415
5101
|
} catch {
|
|
4416
|
-
return
|
|
5102
|
+
return g.removeItem(d), null;
|
|
4417
5103
|
}
|
|
4418
5104
|
}
|
|
4419
|
-
function
|
|
4420
|
-
|
|
5105
|
+
function Ur(g, i, s, a, d = Date.now()) {
|
|
5106
|
+
g.setItem(Oe(i, s), JSON.stringify({ ...a, createdAt: d }));
|
|
4421
5107
|
}
|
|
4422
|
-
function
|
|
4423
|
-
|
|
5108
|
+
function St(g, i, s) {
|
|
5109
|
+
g.removeItem(Oe(i, s)), g.removeItem(ze);
|
|
4424
5110
|
}
|
|
4425
5111
|
function me() {
|
|
4426
|
-
return window.localStorage.removeItem(
|
|
5112
|
+
return window.localStorage.removeItem(ze), window.sessionStorage;
|
|
4427
5113
|
}
|
|
4428
|
-
function
|
|
4429
|
-
return
|
|
5114
|
+
function qr(g, i = window.location.origin) {
|
|
5115
|
+
return g.filter((s) => Mr(s, i));
|
|
4430
5116
|
}
|
|
4431
|
-
function
|
|
5117
|
+
function Mr(g, i) {
|
|
4432
5118
|
try {
|
|
4433
|
-
const s = new URL(
|
|
5119
|
+
const s = new URL(g, i);
|
|
4434
5120
|
return ["http:", "https:", "mailto:", "whatsapp:"].includes(s.protocol);
|
|
4435
5121
|
} catch {
|
|
4436
5122
|
return !1;
|
|
4437
5123
|
}
|
|
4438
5124
|
}
|
|
4439
|
-
function
|
|
4440
|
-
return
|
|
5125
|
+
function Br(g, i, s) {
|
|
5126
|
+
return g === "push" ? { start: !1, delayMs: 0 } : g === "polling" || !i || !s ? { start: !0, delayMs: 0 } : { start: !0, delayMs: Rt };
|
|
4441
5127
|
}
|
|
4442
5128
|
const ve = class ve extends HTMLElement {
|
|
4443
5129
|
constructor() {
|
|
@@ -4447,9 +5133,9 @@ const ve = class ve extends HTMLElement {
|
|
|
4447
5133
|
const i = this.attachShadow({ mode: "open" });
|
|
4448
5134
|
this.injectTailwind(i);
|
|
4449
5135
|
const s = document.createElement("div");
|
|
4450
|
-
s.innerHTML =
|
|
4451
|
-
const a = s.querySelector("template"),
|
|
4452
|
-
|
|
5136
|
+
s.innerHTML = ft;
|
|
5137
|
+
const a = s.querySelector("template"), d = a ? a.content.cloneNode(!0) : document.createRange().createContextualFragment(ft), l = document.createElement("style");
|
|
5138
|
+
l.textContent = Bi, i.appendChild(l), i.appendChild(d);
|
|
4453
5139
|
}
|
|
4454
5140
|
static get observedAttributes() {
|
|
4455
5141
|
return ["server-url", "public-key", "lang", "transport", "hide-footer", "footer", "authenticated-event-delay-ms", "variant", "no-card"];
|
|
@@ -4516,22 +5202,22 @@ const ve = class ve extends HTMLElement {
|
|
|
4516
5202
|
if (a.tailwindCssText)
|
|
4517
5203
|
s.textContent = a.tailwindCssText;
|
|
4518
5204
|
else {
|
|
4519
|
-
const
|
|
4520
|
-
|
|
5205
|
+
const d = document.createElement("link");
|
|
5206
|
+
d.rel = "stylesheet", d.href = Re, i.insertBefore(d, s);
|
|
4521
5207
|
}
|
|
4522
5208
|
return;
|
|
4523
5209
|
}
|
|
4524
|
-
a.tailwindLoading || (a.tailwindLoading = fetch(
|
|
4525
|
-
a.tailwindCssText =
|
|
4526
|
-
}).catch((
|
|
4527
|
-
console.warn("[sendity-auth] Failed to load Tailwind CSS for Shadow DOM",
|
|
5210
|
+
a.tailwindLoading || (a.tailwindLoading = fetch(Re).then((d) => d.ok ? d.text() : Promise.reject(new Error(`HTTP ${d.status}`))).then((d) => {
|
|
5211
|
+
a.tailwindCssText = d;
|
|
5212
|
+
}).catch((d) => {
|
|
5213
|
+
console.warn("[sendity-auth] Failed to load Tailwind CSS for Shadow DOM", d), a.tailwindCssText = "";
|
|
4528
5214
|
})), a.tailwindLoading.then(() => {
|
|
4529
5215
|
if (!this.destroyed && i)
|
|
4530
5216
|
if (a.tailwindCssText)
|
|
4531
5217
|
s.textContent = a.tailwindCssText;
|
|
4532
5218
|
else {
|
|
4533
|
-
const
|
|
4534
|
-
|
|
5219
|
+
const d = document.createElement("link");
|
|
5220
|
+
d.rel = "stylesheet", d.href = Re, i.insertBefore(d, s);
|
|
4535
5221
|
}
|
|
4536
5222
|
});
|
|
4537
5223
|
}
|
|
@@ -4550,7 +5236,7 @@ const ve = class ve extends HTMLElement {
|
|
|
4550
5236
|
scheduleBrowserReturnCheck() {
|
|
4551
5237
|
this.destroyed || this.authenticated || !this.activeAuthRequestId || !this.activeAuthRequestSecret || document.visibilityState && document.visibilityState !== "visible" || (this.returnWaitTimer !== null && clearTimeout(this.returnWaitTimer), this.returnWaitTimer = window.setTimeout(() => {
|
|
4552
5238
|
this.returnWaitTimer = null, !(this.destroyed || this.authenticated) && (this.showFooterWaitingState({ returnedFromClient: !0 }), this.step().catch((i) => console.warn("[sendity-auth] return check failed", i)));
|
|
4553
|
-
},
|
|
5239
|
+
}, Or));
|
|
4554
5240
|
}
|
|
4555
5241
|
isFooterHidden() {
|
|
4556
5242
|
const i = (this.getAttribute("footer") ?? "").trim().toLowerCase();
|
|
@@ -4564,18 +5250,18 @@ const ve = class ve extends HTMLElement {
|
|
|
4564
5250
|
scheduleFooterWaitingState() {
|
|
4565
5251
|
this.footerWaitTimer !== null || this.isFooterHidden() || (this.footerWaitTimer = window.setTimeout(() => {
|
|
4566
5252
|
this.footerWaitTimer = null, this.showFooterWaitingState();
|
|
4567
|
-
},
|
|
5253
|
+
}, zr));
|
|
4568
5254
|
}
|
|
4569
5255
|
setFooterIndicatorWaiting() {
|
|
4570
5256
|
this.footerIndicatorEl && (this.footerIndicatorEl.classList.remove("footer-indicator--error"), this.footerIndicatorEl.innerHTML = "", this.footerIndicatorEl.removeAttribute("hidden"));
|
|
4571
5257
|
}
|
|
4572
5258
|
setFooterIndicatorError() {
|
|
4573
|
-
this.footerIndicatorEl && (this.footerIndicatorEl.classList.add("footer-indicator--error"), this.footerIndicatorEl.innerHTML =
|
|
5259
|
+
this.footerIndicatorEl && (this.footerIndicatorEl.classList.add("footer-indicator--error"), this.footerIndicatorEl.innerHTML = Ir, this.footerIndicatorEl.removeAttribute("hidden"));
|
|
4574
5260
|
}
|
|
4575
5261
|
showFooterWaitingState(i = {}) {
|
|
4576
|
-
this.isFooterHidden() || (this.currentConfig && this.footerMessageEl && (this.footerMessageEl.textContent = i.returnedFromClient ?
|
|
5262
|
+
this.isFooterHidden() || (this.currentConfig && this.footerMessageEl && (this.footerMessageEl.textContent = i.returnedFromClient ? F(this.currentConfig.lang).ui.footerReturnedWaiting : this.waitingFooterMessage()), this.setFooterIndicatorWaiting(), this.footerEl?.classList.add("footer--waiting", "footer--transitioning"), this.footerBrandEl?.removeAttribute("hidden"), this.footerStatusEl?.removeAttribute("hidden"), this.footerTransitionTimer !== null && clearTimeout(this.footerTransitionTimer), this.footerTransitionTimer = window.setTimeout(() => {
|
|
4577
5263
|
this.footerTransitionTimer = null, this.footerEl?.classList.remove("footer--transitioning"), this.footerBrandEl?.setAttribute("hidden", "");
|
|
4578
|
-
},
|
|
5264
|
+
}, fe), this.startCountdown());
|
|
4579
5265
|
}
|
|
4580
5266
|
startCountdown() {
|
|
4581
5267
|
if (this.timerInterval !== null || !this.footerTimerEl) return;
|
|
@@ -4590,8 +5276,8 @@ const ve = class ve extends HTMLElement {
|
|
|
4590
5276
|
this.footerTimerEl.setAttribute("hidden", "");
|
|
4591
5277
|
return;
|
|
4592
5278
|
}
|
|
4593
|
-
const a = Math.max(0, Math.floor((s - Date.now()) / 1e3)),
|
|
4594
|
-
this.footerTimerEl.textContent = `${
|
|
5279
|
+
const a = Math.max(0, Math.floor((s - Date.now()) / 1e3)), d = Math.floor(a / 60), l = String(a % 60).padStart(2, "0");
|
|
5280
|
+
this.footerTimerEl.textContent = `${d}:${l}`, this.footerTimerEl.classList.toggle("low", a > 0 && a <= 60), this.footerTimerEl.removeAttribute("hidden"), a <= 0 && this.timerInterval !== null && (clearInterval(this.timerInterval), this.timerInterval = null, this.showExpiredState());
|
|
4595
5281
|
};
|
|
4596
5282
|
i(), this.timerInterval = window.setInterval(i, 1e3);
|
|
4597
5283
|
}
|
|
@@ -4601,28 +5287,28 @@ const ve = class ve extends HTMLElement {
|
|
|
4601
5287
|
showExpiredState() {
|
|
4602
5288
|
if (!(this.authenticated || this.destroyed || !this.currentConfig)) {
|
|
4603
5289
|
if (this.stopAuthTransports(), this.rootEl?.classList.remove("sendity--verified"), this.rootEl?.classList.add("sendity--expired"), this.codeContainerEl?.classList.remove("code--active", "code--placeholder"), this.codeContainerEl?.classList.add("code--expired"), this.spinnerEl?.setAttribute("hidden", ""), this.codeEl?.removeAttribute("hidden"), !this.isFooterHidden()) {
|
|
4604
|
-
const i =
|
|
5290
|
+
const i = F(this.currentConfig.lang);
|
|
4605
5291
|
this.footerMessageEl && (this.footerMessageEl.textContent = i.ui.codeExpired), this.setFooterIndicatorError(), this.footerEl?.classList.add("footer--waiting", "footer--transitioning"), this.footerBrandEl?.removeAttribute("hidden"), this.footerStatusEl?.removeAttribute("hidden"), this.footerTimerEl?.setAttribute("hidden", ""), this.footerTransitionTimer !== null && clearTimeout(this.footerTransitionTimer), this.footerTransitionTimer = window.setTimeout(() => {
|
|
4606
5292
|
this.footerTransitionTimer = null, this.footerEl?.classList.remove("footer--transitioning"), this.footerBrandEl?.setAttribute("hidden", "");
|
|
4607
|
-
},
|
|
5293
|
+
}, fe);
|
|
4608
5294
|
}
|
|
4609
5295
|
this.renderExpiredAction();
|
|
4610
5296
|
}
|
|
4611
5297
|
}
|
|
4612
5298
|
renderExpiredAction() {
|
|
4613
5299
|
if (!this.verifiersEl || !this.currentConfig) return;
|
|
4614
|
-
const i =
|
|
5300
|
+
const i = F(this.currentConfig.lang);
|
|
4615
5301
|
this.verifiersEl.innerHTML = "", this.verifiersEl.classList.remove("is-two", "verifiers--exiting"), this.verifiersEl.removeAttribute("aria-hidden");
|
|
4616
5302
|
const s = document.createElement("button");
|
|
4617
5303
|
s.type = "button", s.className = "chan error", s.addEventListener("click", () => {
|
|
4618
|
-
s.disabled = !0, this.requestNewAuthRequest().catch((
|
|
4619
|
-
console.warn("[sendity-auth] failed to request a new code",
|
|
5304
|
+
s.disabled = !0, this.requestNewAuthRequest().catch((l) => {
|
|
5305
|
+
console.warn("[sendity-auth] failed to request a new code", l), s.disabled = !1;
|
|
4620
5306
|
});
|
|
4621
5307
|
});
|
|
4622
5308
|
const a = document.createElement("span");
|
|
4623
|
-
a.className = "icon", a.setAttribute("aria-hidden", "true"), a.innerHTML =
|
|
4624
|
-
const
|
|
4625
|
-
|
|
5309
|
+
a.className = "icon", a.setAttribute("aria-hidden", "true"), a.innerHTML = jr, s.appendChild(a);
|
|
5310
|
+
const d = document.createElement("span");
|
|
5311
|
+
d.className = "label", d.textContent = i.ui.getNewCode, s.appendChild(d), this.verifiersEl.appendChild(s);
|
|
4626
5312
|
}
|
|
4627
5313
|
async requestNewAuthRequest() {
|
|
4628
5314
|
this.currentConfig || (this.currentConfig = this.resolveConfig());
|
|
@@ -4642,23 +5328,21 @@ const ve = class ve extends HTMLElement {
|
|
|
4642
5328
|
}
|
|
4643
5329
|
resolveConfig() {
|
|
4644
5330
|
const i = {
|
|
4645
|
-
lang:
|
|
5331
|
+
lang: yt(navigator.language) ?? "en",
|
|
4646
5332
|
transport: "auto"
|
|
4647
|
-
}, s = (
|
|
4648
|
-
if (!
|
|
5333
|
+
}, s = (E) => this.getAttribute(E) ?? void 0, a = s("server-url")?.trim() || Wr, d = s("public-key")?.trim();
|
|
5334
|
+
if (!d)
|
|
4649
5335
|
throw new Error("Missing required sendity-auth attribute: public-key");
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
const m = s("transport"), g = m === "push" || m === "polling" ? m : i.transport, y = this.parseAuthenticatedEventDelayMs(s("authenticated-event-delay-ms"));
|
|
4653
|
-
return { serverUrl: a, publicKey: h, lang: d, transport: g, authenticatedEventDelayMs: y };
|
|
5336
|
+
const l = yt(s("lang")) ?? i.lang, m = s("transport"), v = m === "push" || m === "polling" ? m : i.transport, y = this.parseAuthenticatedEventDelayMs(s("authenticated-event-delay-ms"));
|
|
5337
|
+
return { serverUrl: a, publicKey: d, lang: l, transport: v, authenticatedEventDelayMs: y };
|
|
4654
5338
|
}
|
|
4655
5339
|
parseAuthenticatedEventDelayMs(i) {
|
|
4656
|
-
if (i === void 0 || i.trim() === "") return
|
|
5340
|
+
if (i === void 0 || i.trim() === "") return je;
|
|
4657
5341
|
const s = Number(i);
|
|
4658
|
-
return !Number.isFinite(s) || s < 0 ?
|
|
5342
|
+
return !Number.isFinite(s) || s < 0 ? je : Math.round(s);
|
|
4659
5343
|
}
|
|
4660
5344
|
async createAuthRequest(i, s, a) {
|
|
4661
|
-
const
|
|
5345
|
+
const d = await fetch(this.joinUrl(i, "/auth-requests"), {
|
|
4662
5346
|
method: "POST",
|
|
4663
5347
|
mode: "cors",
|
|
4664
5348
|
headers: {
|
|
@@ -4667,52 +5351,52 @@ const ve = class ve extends HTMLElement {
|
|
|
4667
5351
|
},
|
|
4668
5352
|
body: JSON.stringify({ public_key: s })
|
|
4669
5353
|
});
|
|
4670
|
-
if (!
|
|
4671
|
-
const
|
|
4672
|
-
if (!
|
|
4673
|
-
const m = this.extractClientSecret(
|
|
5354
|
+
if (!d.ok) throw new Error(`Auth request creation failed: ${d.status}`);
|
|
5355
|
+
const l = await d.json();
|
|
5356
|
+
if (!l.id) throw new Error("Missing id from server response");
|
|
5357
|
+
const m = this.extractClientSecret(l);
|
|
4674
5358
|
if (!m) throw new Error("Missing client secret from server response");
|
|
4675
|
-
return
|
|
4676
|
-
verificationId: String(
|
|
4677
|
-
code:
|
|
5359
|
+
return Ur(a, i, s, { id: String(l.id), clientSecret: m }), this.activeAuthRequestId = String(l.id), this.activeAuthRequestSecret = m, this.updateActiveAuthRequestExpiry(l), this.applyVerifyUrlsFromResponse(l), this.updateCode(l.formattedCode ?? l.code), this.dispatchPublicEvent("sendity:challenge-created", {
|
|
5360
|
+
verificationId: String(l.id),
|
|
5361
|
+
code: l.formattedCode ?? l.code ?? "",
|
|
4678
5362
|
channel: this.primaryChannel(this.activeVerifyUrls)
|
|
4679
|
-
}),
|
|
5363
|
+
}), l;
|
|
4680
5364
|
}
|
|
4681
5365
|
async step() {
|
|
4682
5366
|
this.currentConfig || (this.currentConfig = this.resolveConfig());
|
|
4683
|
-
const { serverUrl: i, publicKey: s } = this.currentConfig, a = me(),
|
|
4684
|
-
if (!
|
|
5367
|
+
const { serverUrl: i, publicKey: s } = this.currentConfig, a = me(), d = Ct(a, i, s), l = d?.id;
|
|
5368
|
+
if (!l)
|
|
4685
5369
|
return await this.createAuthRequest(i, s, a);
|
|
4686
|
-
this.activeAuthRequestId =
|
|
5370
|
+
this.activeAuthRequestId = l, this.activeAuthRequestSecret = d.clientSecret;
|
|
4687
5371
|
const m = await fetch(
|
|
4688
|
-
this.authRequestStatusUrl(i,
|
|
4689
|
-
this.authRequestStatusInit(
|
|
5372
|
+
this.authRequestStatusUrl(i, l),
|
|
5373
|
+
this.authRequestStatusInit(d.clientSecret)
|
|
4690
5374
|
);
|
|
4691
5375
|
if (m.status !== 200)
|
|
4692
|
-
return
|
|
4693
|
-
const
|
|
4694
|
-
if (this.applyVerifyUrlsFromResponse(
|
|
4695
|
-
return this.handleAuthenticated(
|
|
4696
|
-
if (
|
|
4697
|
-
return this.updateActiveAuthRequestExpiry(
|
|
4698
|
-
|
|
4699
|
-
const y = this.extractClientSecret(
|
|
4700
|
-
return y && (this.activeAuthRequestSecret = y), this.updateActiveAuthRequestExpiry(
|
|
5376
|
+
return St(a, i, s), await this.step();
|
|
5377
|
+
const v = await m.json();
|
|
5378
|
+
if (this.applyVerifyUrlsFromResponse(v), v.status === "verified")
|
|
5379
|
+
return this.handleAuthenticated(v), v;
|
|
5380
|
+
if (v.status === "expired")
|
|
5381
|
+
return this.updateActiveAuthRequestExpiry(v), this.updateCode(v.formattedCode ?? v.code), this.showExpiredState(), v;
|
|
5382
|
+
v.id && (this.activeAuthRequestId = String(v.id));
|
|
5383
|
+
const y = this.extractClientSecret(v);
|
|
5384
|
+
return y && (this.activeAuthRequestSecret = y), this.updateActiveAuthRequestExpiry(v), this.updateCode(v.formattedCode ?? v.code), v;
|
|
4701
5385
|
}
|
|
4702
5386
|
configureRealtime(i) {
|
|
4703
5387
|
this.currentConfig || (this.currentConfig = this.resolveConfig());
|
|
4704
|
-
const { transport: s } = this.currentConfig, a = i?.broadcasting,
|
|
4705
|
-
let
|
|
4706
|
-
s !== "polling" &&
|
|
4707
|
-
const m =
|
|
5388
|
+
const { transport: s } = this.currentConfig, a = i?.broadcasting, d = !!(a?.key && a.channel && a.authEndpoint);
|
|
5389
|
+
let l = !1;
|
|
5390
|
+
s !== "polling" && d && a ? l = this.subscribeToBroadcasting(a) : s === "push" && console.warn("[sendity-auth] Push transport requested, but server response does not contain broadcasting metadata");
|
|
5391
|
+
const m = Br(s, d, l);
|
|
4708
5392
|
m.start && this.startPolling(m.delayMs);
|
|
4709
5393
|
}
|
|
4710
5394
|
subscribeToBroadcasting(i) {
|
|
4711
5395
|
if (!this.currentConfig || !i.key || !i.channel || !i.authEndpoint) return !1;
|
|
4712
5396
|
try {
|
|
4713
|
-
window.Pusher =
|
|
5397
|
+
window.Pusher = er;
|
|
4714
5398
|
const s = (i.scheme ?? "https") === "https", a = i.port ?? (s ? 443 : 80);
|
|
4715
|
-
return this.echo = new
|
|
5399
|
+
return this.echo = new Ji({
|
|
4716
5400
|
broadcaster: "reverb",
|
|
4717
5401
|
key: i.key,
|
|
4718
5402
|
wsHost: i.host ?? new URL(this.currentConfig.serverUrl).hostname,
|
|
@@ -4731,11 +5415,11 @@ const ve = class ve extends HTMLElement {
|
|
|
4731
5415
|
client_secret: this.activeAuthRequestSecret
|
|
4732
5416
|
}
|
|
4733
5417
|
}
|
|
4734
|
-
}), this.echo.private(i.channel).listen(i.event ?? ".authenticated", (
|
|
4735
|
-
this.handleAuthenticated(
|
|
5418
|
+
}), this.echo.private(i.channel).listen(i.event ?? ".authenticated", (d) => {
|
|
5419
|
+
this.handleAuthenticated(d);
|
|
4736
5420
|
}), !0;
|
|
4737
5421
|
} catch (s) {
|
|
4738
|
-
return console.warn("[sendity-auth] realtime subscription failed, falling back to polling if enabled", s), this.currentConfig.transport === "auto" && this.startPolling(
|
|
5422
|
+
return console.warn("[sendity-auth] realtime subscription failed, falling back to polling if enabled", s), this.currentConfig.transport === "auto" && this.startPolling(Rt), !1;
|
|
4739
5423
|
}
|
|
4740
5424
|
}
|
|
4741
5425
|
startPolling(i) {
|
|
@@ -4743,7 +5427,7 @@ const ve = class ve extends HTMLElement {
|
|
|
4743
5427
|
const s = () => {
|
|
4744
5428
|
this.pollTimer !== null || this.authenticated || this.destroyed || (this.pollTimer = window.setInterval(() => {
|
|
4745
5429
|
this.step().catch((a) => console.warn("[sendity-auth] poll failed", a));
|
|
4746
|
-
},
|
|
5430
|
+
}, Hr));
|
|
4747
5431
|
};
|
|
4748
5432
|
i > 0 ? this.fallbackPollTimer = window.setTimeout(() => {
|
|
4749
5433
|
this.fallbackPollTimer = null, s();
|
|
@@ -4752,13 +5436,13 @@ const ve = class ve extends HTMLElement {
|
|
|
4752
5436
|
handleAuthenticated(i) {
|
|
4753
5437
|
if (this.authenticated) return;
|
|
4754
5438
|
if (!i.authorization) {
|
|
4755
|
-
console.warn("[sendity-auth] authenticated signal did not include authorization; fetching canonical status"), this.fetchAuthorizationAfterAuthenticatedSignal().catch((
|
|
4756
|
-
console.warn("[sendity-auth] failed to fetch authorization after authenticated signal",
|
|
5439
|
+
console.warn("[sendity-auth] authenticated signal did not include authorization; fetching canonical status"), this.fetchAuthorizationAfterAuthenticatedSignal().catch((d) => {
|
|
5440
|
+
console.warn("[sendity-auth] failed to fetch authorization after authenticated signal", d);
|
|
4757
5441
|
});
|
|
4758
5442
|
return;
|
|
4759
5443
|
}
|
|
4760
|
-
this.authenticated = !0, this.currentConfig &&
|
|
4761
|
-
const s = this.toPublicAuthenticatedDetail(i), a = this.currentConfig?.authenticatedEventDelayMs ??
|
|
5444
|
+
this.authenticated = !0, this.currentConfig && St(me(), this.currentConfig.serverUrl, this.currentConfig.publicKey), this.stopAuthTransports(), this.showSuccess(i);
|
|
5445
|
+
const s = this.toPublicAuthenticatedDetail(i), a = this.currentConfig?.authenticatedEventDelayMs ?? je;
|
|
4762
5446
|
this.authenticatedEventTimer = window.setTimeout(() => {
|
|
4763
5447
|
this.authenticatedEventTimer = null, !this.destroyed && this.dispatchPublicEvent("sendity:authenticated", s);
|
|
4764
5448
|
}, a);
|
|
@@ -4770,14 +5454,14 @@ const ve = class ve extends HTMLElement {
|
|
|
4770
5454
|
this.dispatchEvent(new CustomEvent(i, { bubbles: !0, composed: !0, detail: s }));
|
|
4771
5455
|
}
|
|
4772
5456
|
toPublicAuthenticatedDetail(i) {
|
|
4773
|
-
const s = String(i.auth_request_id ?? i.authRequestId ?? this.activeAuthRequestId ?? ""), a = i.channel ?? this.primaryChannel(this.activeVerifyUrls),
|
|
5457
|
+
const s = String(i.auth_request_id ?? i.authRequestId ?? this.activeAuthRequestId ?? ""), a = i.channel ?? this.primaryChannel(this.activeVerifyUrls), d = i.expires_at ?? i.expiresAt;
|
|
4774
5458
|
return {
|
|
4775
5459
|
sessionId: s,
|
|
4776
5460
|
channel: a,
|
|
4777
5461
|
...i.identifier ? { address: i.identifier } : {},
|
|
4778
5462
|
verificationId: s,
|
|
4779
5463
|
signedResult: String(i.authorization ?? ""),
|
|
4780
|
-
...
|
|
5464
|
+
...d ? { expiresAt: String(d) } : {}
|
|
4781
5465
|
};
|
|
4782
5466
|
}
|
|
4783
5467
|
primaryChannel(i) {
|
|
@@ -4785,8 +5469,8 @@ const ve = class ve extends HTMLElement {
|
|
|
4785
5469
|
return s.startsWith("mailto:") ? "email" : s.startsWith("whatsapp:") || s.startsWith("whatsapp://") ? "whatsapp" : "unknown";
|
|
4786
5470
|
}
|
|
4787
5471
|
applyVerifyUrlsFromResponse(i) {
|
|
4788
|
-
const s = Array.isArray(i.verify_urls) ? i.verify_urls : Array.isArray(i.verifyUrls) ? i.verifyUrls : [], a = Array.isArray(i.verification_endpoints) ? i.verification_endpoints.map((
|
|
4789
|
-
|
|
5472
|
+
const s = Array.isArray(i.verify_urls) ? i.verify_urls : Array.isArray(i.verifyUrls) ? i.verifyUrls : [], a = Array.isArray(i.verification_endpoints) ? i.verification_endpoints.map((l) => typeof l.url == "string" ? l.url : typeof l.scheme == "string" && typeof l.recipient == "string" ? `${l.scheme}:${l.recipient}` : "") : [], d = qr([...s, ...a].map(String));
|
|
5473
|
+
d.length !== 0 && (this.activeVerifyUrls = [...new Set(d)], this.renderVerifiers(this.activeVerifyUrls));
|
|
4790
5474
|
}
|
|
4791
5475
|
authRequestStatusUrl(i, s) {
|
|
4792
5476
|
return new URL(this.joinUrl(i, `/auth-requests/${encodeURIComponent(s)}`)).toString();
|
|
@@ -4810,7 +5494,7 @@ const ve = class ve extends HTMLElement {
|
|
|
4810
5494
|
}
|
|
4811
5495
|
waitingFooterMessage() {
|
|
4812
5496
|
if (!this.currentConfig) return "";
|
|
4813
|
-
const i =
|
|
5497
|
+
const i = F(this.currentConfig.lang), s = this.formatExpiryTime(this.activeAuthRequestExpiresAt, this.currentConfig.lang);
|
|
4814
5498
|
return s ? i.ui.footerWaitingUntil.replace("(Time)", s) : i.ui.footerWaiting;
|
|
4815
5499
|
}
|
|
4816
5500
|
formatExpiryTime(i, s) {
|
|
@@ -4821,27 +5505,80 @@ const ve = class ve extends HTMLElement {
|
|
|
4821
5505
|
localeForLang(i) {
|
|
4822
5506
|
switch (i) {
|
|
4823
5507
|
case "de":
|
|
5508
|
+
case "de-he":
|
|
4824
5509
|
return "de-DE";
|
|
4825
5510
|
case "fr":
|
|
4826
5511
|
return "fr-FR";
|
|
5512
|
+
case "es":
|
|
5513
|
+
return "es-ES";
|
|
5514
|
+
case "it":
|
|
5515
|
+
return "it-IT";
|
|
5516
|
+
case "pl":
|
|
5517
|
+
return "pl-PL";
|
|
5518
|
+
case "cs":
|
|
5519
|
+
return "cs-CZ";
|
|
5520
|
+
case "da":
|
|
5521
|
+
return "da-DK";
|
|
5522
|
+
case "nl":
|
|
5523
|
+
return "nl-NL";
|
|
5524
|
+
case "hr":
|
|
5525
|
+
return "hr-HR";
|
|
5526
|
+
case "el":
|
|
5527
|
+
return "el-GR";
|
|
5528
|
+
case "tr":
|
|
5529
|
+
return "tr-TR";
|
|
5530
|
+
case "ru":
|
|
5531
|
+
return "ru-RU";
|
|
5532
|
+
case "sv":
|
|
5533
|
+
return "sv-SE";
|
|
5534
|
+
case "pt":
|
|
5535
|
+
return "pt-PT";
|
|
5536
|
+
case "sl":
|
|
5537
|
+
return "sl-SI";
|
|
5538
|
+
case "sk":
|
|
5539
|
+
return "sk-SK";
|
|
5540
|
+
case "sq":
|
|
5541
|
+
return "sq-AL";
|
|
5542
|
+
case "hy":
|
|
5543
|
+
return "hy-AM";
|
|
5544
|
+
case "sr":
|
|
5545
|
+
return "sr-RS";
|
|
5546
|
+
case "lt":
|
|
5547
|
+
return "lt-LT";
|
|
5548
|
+
case "lv":
|
|
5549
|
+
return "lv-LV";
|
|
5550
|
+
case "et":
|
|
5551
|
+
return "et-EE";
|
|
5552
|
+
case "fi":
|
|
5553
|
+
return "fi-FI";
|
|
5554
|
+
case "ar":
|
|
5555
|
+
return "ar-SA";
|
|
5556
|
+
case "he":
|
|
5557
|
+
return "he-IL";
|
|
5558
|
+
case "ja":
|
|
5559
|
+
return "ja-JP";
|
|
5560
|
+
case "ko":
|
|
5561
|
+
return "ko-KR";
|
|
5562
|
+
case "zh":
|
|
5563
|
+
return "zh-CN";
|
|
4827
5564
|
default:
|
|
4828
5565
|
return "en-US";
|
|
4829
5566
|
}
|
|
4830
5567
|
}
|
|
4831
5568
|
async fetchAuthorizationAfterAuthenticatedSignal() {
|
|
4832
5569
|
this.currentConfig || (this.currentConfig = this.resolveConfig());
|
|
4833
|
-
const i =
|
|
5570
|
+
const i = Ct(me(), this.currentConfig.serverUrl, this.currentConfig.publicKey), s = this.activeAuthRequestId ?? i?.id, a = this.activeAuthRequestSecret ?? i?.clientSecret;
|
|
4834
5571
|
if (!s || !a)
|
|
4835
5572
|
throw new Error("Cannot fetch authorization without an active auth request id and client secret");
|
|
4836
|
-
const
|
|
5573
|
+
const d = await fetch(
|
|
4837
5574
|
this.authRequestStatusUrl(this.currentConfig.serverUrl, s),
|
|
4838
5575
|
this.authRequestStatusInit(a)
|
|
4839
5576
|
);
|
|
4840
|
-
if (!
|
|
4841
|
-
throw new Error(`Authorization fetch failed: ${
|
|
4842
|
-
const
|
|
4843
|
-
if (
|
|
4844
|
-
this.handleAuthenticated(
|
|
5577
|
+
if (!d.ok)
|
|
5578
|
+
throw new Error(`Authorization fetch failed: ${d.status}`);
|
|
5579
|
+
const l = await d.json();
|
|
5580
|
+
if (l.status === "verified" && l.authorization) {
|
|
5581
|
+
this.handleAuthenticated(l);
|
|
4845
5582
|
return;
|
|
4846
5583
|
}
|
|
4847
5584
|
throw new Error("Verified auth request did not include authorization");
|
|
@@ -4870,7 +5607,7 @@ const ve = class ve extends HTMLElement {
|
|
|
4870
5607
|
}
|
|
4871
5608
|
showCodeState() {
|
|
4872
5609
|
if (this.spinnerEl?.setAttribute("hidden", ""), this.rootEl?.classList.remove("sendity--expired", "sendity--verified"), this.codeContainerEl?.classList.remove("code--verified", "code--placeholder"), this.codeContainerEl?.classList.remove("code--exiting"), this.codeContainerEl?.classList.add("code--active"), this.codeContainerEl?.removeAttribute("aria-hidden"), this.verifiersEl?.classList.remove("verifiers--exiting"), this.verifiersEl?.removeAttribute("aria-hidden"), this.codeEl?.removeAttribute("hidden"), this.currentConfig && this.promptEl) {
|
|
4873
|
-
const i =
|
|
5610
|
+
const i = F(this.currentConfig.lang);
|
|
4874
5611
|
this.promptEl.textContent = i.ui.sendCodePrompt, this.promptEl.classList.remove("prompt--exiting"), this.promptEl.removeAttribute("aria-hidden"), this.promptEl.removeAttribute("hidden");
|
|
4875
5612
|
}
|
|
4876
5613
|
this.successEl?.setAttribute("hidden", "");
|
|
@@ -4880,36 +5617,36 @@ const ve = class ve extends HTMLElement {
|
|
|
4880
5617
|
const s = this.isFooterHidden();
|
|
4881
5618
|
if (this.footerEl && (this.footerEl.hidden = s, this.footerEl.classList.remove("footer--leaving"), s || (this.footerEl.classList.add("footer--waiting", "footer--transitioning", "footer--verified"), window.setTimeout(() => {
|
|
4882
5619
|
this.footerEl?.classList.remove("footer--transitioning"), this.footerBrandEl && (this.footerBrandEl.hidden = !0);
|
|
4883
|
-
},
|
|
5620
|
+
}, fe))), this.footerStatusEl && (this.footerStatusEl.hidden = s), this.footerMessageEl) {
|
|
4884
5621
|
const a = i.channel ?? this.primaryChannel(this.activeVerifyUrls);
|
|
4885
5622
|
this.footerMessageEl.textContent = this.verifiedSigningInMessage(a);
|
|
4886
5623
|
}
|
|
4887
5624
|
if (this.footerTimerEl && (this.footerTimerEl.hidden = !0, this.footerTimerEl.classList.remove("low"), this.footerTimerEl.textContent = ""), this.verifiersEl?.classList.add("verifiers--exiting"), this.currentConfig && this.successEl) {
|
|
4888
|
-
const a =
|
|
5625
|
+
const a = F(this.currentConfig.lang), d = i.name && i.name.trim().length > 0 ? a.ui.successGreeting.replace("(Name)", i.name) : "You're in!";
|
|
4889
5626
|
this.successEl.innerHTML = `
|
|
4890
5627
|
<span class="success-check" aria-hidden="true">
|
|
4891
5628
|
<svg viewBox="0 0 512 512"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/></svg>
|
|
4892
5629
|
</span>
|
|
4893
|
-
<p class="success-message">${this.escapeHtml(
|
|
5630
|
+
<p class="success-message">${this.escapeHtml(d)}</p>
|
|
4894
5631
|
`, this.successEl.removeAttribute("hidden");
|
|
4895
5632
|
}
|
|
4896
5633
|
this.successTransitionTimer !== null && clearTimeout(this.successTransitionTimer), this.successTransitionTimer = window.setTimeout(() => {
|
|
4897
5634
|
this.successTransitionTimer = null, this.verifiersEl && this.verifiersEl.setAttribute("aria-hidden", "true"), this.codeContainerEl?.setAttribute("aria-hidden", "true"), this.promptEl?.setAttribute("aria-hidden", "true");
|
|
4898
|
-
},
|
|
5635
|
+
}, fe);
|
|
4899
5636
|
}
|
|
4900
5637
|
verifiedSigningInMessage(i) {
|
|
4901
5638
|
return `Verified ${i === "whatsapp" ? "your phone number" : "your email address"} · signing you in...`;
|
|
4902
5639
|
}
|
|
4903
5640
|
destinationAddressForChannel(i) {
|
|
4904
|
-
const s = this.activeVerifyUrls, a = s.find((
|
|
5641
|
+
const s = this.activeVerifyUrls, a = s.find((d) => this.channelClass(d) === i) ?? s[0];
|
|
4905
5642
|
if (!a) return null;
|
|
4906
5643
|
try {
|
|
4907
|
-
const
|
|
4908
|
-
if (
|
|
4909
|
-
return decodeURIComponent(
|
|
4910
|
-
if (
|
|
4911
|
-
const
|
|
4912
|
-
return
|
|
5644
|
+
const d = new URL(a, window.location.origin);
|
|
5645
|
+
if (d.protocol === "mailto:")
|
|
5646
|
+
return decodeURIComponent(d.pathname || d.href.replace(/^mailto:/, "").split("?")[0]) || null;
|
|
5647
|
+
if (d.protocol === "whatsapp:" || d.protocol === "whatsapp://") {
|
|
5648
|
+
const l = d.searchParams.get("phone") || d.pathname.replace(/^\/+/, "");
|
|
5649
|
+
return l ? `+${l.replace(/^\+/, "")}` : null;
|
|
4913
5650
|
}
|
|
4914
5651
|
} catch {
|
|
4915
5652
|
if (a.startsWith("mailto:")) return a.replace(/^mailto:/, "").split("?")[0] || null;
|
|
@@ -4920,36 +5657,65 @@ const ve = class ve extends HTMLElement {
|
|
|
4920
5657
|
escapeHtml(i) {
|
|
4921
5658
|
return i.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
4922
5659
|
}
|
|
5660
|
+
orLabel(i) {
|
|
5661
|
+
switch (i) {
|
|
5662
|
+
case "de":
|
|
5663
|
+
case "de-he":
|
|
5664
|
+
return "oder";
|
|
5665
|
+
case "fr":
|
|
5666
|
+
return "ou";
|
|
5667
|
+
case "es":
|
|
5668
|
+
return "o";
|
|
5669
|
+
case "it":
|
|
5670
|
+
return "o";
|
|
5671
|
+
case "pl":
|
|
5672
|
+
return "lub";
|
|
5673
|
+
case "cs":
|
|
5674
|
+
return "nebo";
|
|
5675
|
+
case "da":
|
|
5676
|
+
return "eller";
|
|
5677
|
+
case "nl":
|
|
5678
|
+
return "of";
|
|
5679
|
+
case "hr":
|
|
5680
|
+
return "ili";
|
|
5681
|
+
case "el":
|
|
5682
|
+
return "ή";
|
|
5683
|
+
case "tr":
|
|
5684
|
+
return "veya";
|
|
5685
|
+
default:
|
|
5686
|
+
return "or";
|
|
5687
|
+
}
|
|
5688
|
+
}
|
|
4923
5689
|
renderVerifiers(i) {
|
|
4924
5690
|
if (!this.verifiersEl) return;
|
|
4925
5691
|
this.verifiersEl.innerHTML = "", this.verifiersEl.classList.toggle("is-two", i.length === 2);
|
|
4926
5692
|
const s = this.currentConfig;
|
|
4927
|
-
i.forEach((a,
|
|
4928
|
-
if (
|
|
5693
|
+
i.forEach((a, d) => {
|
|
5694
|
+
if (d > 0 && i.length === 2) {
|
|
4929
5695
|
const S = document.createElement("div");
|
|
4930
5696
|
S.className = "divider", S.setAttribute("aria-hidden", "true");
|
|
4931
|
-
const
|
|
4932
|
-
|
|
5697
|
+
const I = document.createElement("span");
|
|
5698
|
+
I.textContent = this.orLabel(s.lang), S.appendChild(I), this.verifiersEl.appendChild(S);
|
|
4933
5699
|
}
|
|
4934
|
-
const
|
|
4935
|
-
|
|
5700
|
+
const l = document.createElement("div");
|
|
5701
|
+
l.className = "opt";
|
|
4936
5702
|
const m = document.createElement("a");
|
|
4937
5703
|
m.className = "chan " + this.channelClass(a), m.href = this.buildLink(a, s.lang), m.target = "_blank", m.rel = "noopener noreferrer", m.addEventListener("click", () => {
|
|
4938
5704
|
this.footerWaitTimer !== null && (clearTimeout(this.footerWaitTimer), this.footerWaitTimer = null), this.showFooterWaitingState();
|
|
4939
5705
|
});
|
|
4940
|
-
const
|
|
4941
|
-
if (
|
|
5706
|
+
const v = this.iconForUrl(a);
|
|
5707
|
+
if (v) {
|
|
4942
5708
|
const S = document.createElement("span");
|
|
4943
|
-
S.className = "icon", S.setAttribute("aria-hidden", "true"), S.innerHTML =
|
|
5709
|
+
S.className = "icon", S.setAttribute("aria-hidden", "true"), S.innerHTML = v, m.appendChild(S);
|
|
4944
5710
|
}
|
|
4945
5711
|
const y = document.createElement("span");
|
|
4946
|
-
y.className = "label", y.textContent = this.channelLabel(a, s.lang), m.appendChild(y),
|
|
4947
|
-
const
|
|
4948
|
-
if (
|
|
5712
|
+
y.className = "label", y.textContent = this.channelLabel(a, s.lang), m.appendChild(y), l.appendChild(m);
|
|
5713
|
+
const E = this.destinationText(a, s.lang);
|
|
5714
|
+
if (E) {
|
|
4949
5715
|
const S = document.createElement("a");
|
|
4950
|
-
S.className = "dest", S.href = m.href, S.target = "_blank", S.rel = "noopener noreferrer", S.textContent =
|
|
5716
|
+
S.className = "dest", S.href = m.href, S.target = "_blank", S.rel = "noopener noreferrer", S.textContent = E, l.appendChild(S);
|
|
4951
5717
|
}
|
|
4952
|
-
this.verifiersEl.appendChild(
|
|
5718
|
+
this.verifiersEl.appendChild(l);
|
|
4953
5719
|
});
|
|
4954
5720
|
}
|
|
4955
5721
|
channelClass(i) {
|
|
@@ -4964,31 +5730,31 @@ const ve = class ve extends HTMLElement {
|
|
|
4964
5730
|
return "generic";
|
|
4965
5731
|
}
|
|
4966
5732
|
channelLabel(i, s) {
|
|
4967
|
-
const a =
|
|
4968
|
-
if (
|
|
4969
|
-
if (
|
|
5733
|
+
const a = F(s), d = this.channelClass(i);
|
|
5734
|
+
if (d === "email") return a.labels.email;
|
|
5735
|
+
if (d === "whatsapp") return a.labels.whatsapp;
|
|
4970
5736
|
try {
|
|
4971
|
-
const
|
|
4972
|
-
return
|
|
5737
|
+
const l = new URL(i, window.location.origin);
|
|
5738
|
+
return l.protocol.startsWith("http") ? l.hostname : l.protocol.replace(":", "");
|
|
4973
5739
|
} catch {
|
|
4974
5740
|
return i;
|
|
4975
5741
|
}
|
|
4976
5742
|
}
|
|
4977
5743
|
destinationText(i, s) {
|
|
4978
|
-
const
|
|
5744
|
+
const d = F(s).ui.toPrefix ?? "to";
|
|
4979
5745
|
try {
|
|
4980
|
-
const
|
|
4981
|
-
if (
|
|
4982
|
-
const m = decodeURIComponent(
|
|
4983
|
-
return m ? `${
|
|
5746
|
+
const l = new URL(i, window.location.origin);
|
|
5747
|
+
if (l.protocol === "mailto:") {
|
|
5748
|
+
const m = decodeURIComponent(l.pathname || l.href.replace(/^mailto:/, "").split("?")[0]);
|
|
5749
|
+
return m ? `${d} ${m}` : null;
|
|
4984
5750
|
}
|
|
4985
|
-
if (
|
|
4986
|
-
const m =
|
|
4987
|
-
return m ? `${
|
|
5751
|
+
if (l.protocol === "whatsapp:" || l.protocol === "whatsapp://") {
|
|
5752
|
+
const m = l.searchParams.get("phone") || l.pathname.replace(/^\/+/, "");
|
|
5753
|
+
return m ? `${d} +${m.replace(/^\+/, "")}` : null;
|
|
4988
5754
|
}
|
|
4989
|
-
if (
|
|
4990
|
-
const m =
|
|
4991
|
-
return m ? `${
|
|
5755
|
+
if (l.protocol.startsWith("http") && (l.hostname === "wa.me" || l.hostname === "api.whatsapp.com")) {
|
|
5756
|
+
const m = l.pathname.replace(/^\/+/, "").replace(/[^0-9]/g, "");
|
|
5757
|
+
return m ? `${d} +${m}` : null;
|
|
4992
5758
|
}
|
|
4993
5759
|
} catch {
|
|
4994
5760
|
}
|
|
@@ -4997,35 +5763,35 @@ const ve = class ve extends HTMLElement {
|
|
|
4997
5763
|
iconForUrl(i) {
|
|
4998
5764
|
try {
|
|
4999
5765
|
const s = new URL(i, window.location.origin);
|
|
5000
|
-
if (s.protocol === "mailto:") return
|
|
5001
|
-
if (s.protocol === "whatsapp:" || s.protocol === "whatsapp://") return
|
|
5766
|
+
if (s.protocol === "mailto:") return bt;
|
|
5767
|
+
if (s.protocol === "whatsapp:" || s.protocol === "whatsapp://") return wt;
|
|
5002
5768
|
} catch {
|
|
5003
|
-
if (i.startsWith("mailto:")) return
|
|
5004
|
-
if (i.startsWith("whatsapp:") || i.startsWith("whatsapp://")) return
|
|
5769
|
+
if (i.startsWith("mailto:")) return bt;
|
|
5770
|
+
if (i.startsWith("whatsapp:") || i.startsWith("whatsapp://")) return wt;
|
|
5005
5771
|
}
|
|
5006
5772
|
return null;
|
|
5007
5773
|
}
|
|
5008
5774
|
labelForUrl(i, s) {
|
|
5009
|
-
const a =
|
|
5775
|
+
const a = F(s);
|
|
5010
5776
|
try {
|
|
5011
|
-
const
|
|
5012
|
-
return
|
|
5777
|
+
const d = new URL(i, window.location.origin);
|
|
5778
|
+
return d.protocol === "mailto:" ? `${a.ui.by} ${a.labels.email}` : d.protocol.startsWith("http") ? d.hostname : d.protocol === "whatsapp:" ? `${a.ui.by} ${a.labels.whatsapp}` : d.protocol.replace(":", "");
|
|
5013
5779
|
} catch {
|
|
5014
5780
|
return i.startsWith("mailto:") ? `${a.ui.by} ${a.labels.email}` : i.startsWith("whatsapp:") || i.startsWith("whatsapp://") ? `${a.ui.by} ${a.labels.whatsapp}` : i;
|
|
5015
5781
|
}
|
|
5016
5782
|
}
|
|
5017
5783
|
buildLink(i, s) {
|
|
5018
|
-
const a = this.lastCode,
|
|
5784
|
+
const a = this.lastCode, d = F(s), l = window.location.host;
|
|
5019
5785
|
if (!a) return i;
|
|
5020
5786
|
if (i.startsWith("mailto:")) {
|
|
5021
|
-
const [m,
|
|
5022
|
-
y.set("subject",
|
|
5023
|
-
const
|
|
5024
|
-
return `${m}?${
|
|
5787
|
+
const [m, v = ""] = i.split("?"), y = new URLSearchParams(v), E = this.applyTemplate(d.templates.emailSubject, l, a), S = this.applyTemplate(d.templates.emailBody, l, a);
|
|
5788
|
+
y.set("subject", E), y.set("body", S);
|
|
5789
|
+
const I = this.toQuery(y);
|
|
5790
|
+
return `${m}?${I}`;
|
|
5025
5791
|
}
|
|
5026
5792
|
if (i.startsWith("whatsapp:") || i.startsWith("whatsapp://")) {
|
|
5027
|
-
const [m,
|
|
5028
|
-
y.set("text",
|
|
5793
|
+
const [m, v = ""] = i.split("?"), y = new URLSearchParams(v), E = this.applyTemplate(d.templates.whatsappText, l, a);
|
|
5794
|
+
y.set("text", E);
|
|
5029
5795
|
const S = this.toQuery(y);
|
|
5030
5796
|
return `${m}?${S}`;
|
|
5031
5797
|
}
|
|
@@ -5039,9 +5805,9 @@ const ve = class ve extends HTMLElement {
|
|
|
5039
5805
|
// We use encodeURIComponent so spaces become '%20' and follow RFC 3986 style.
|
|
5040
5806
|
toQuery(i) {
|
|
5041
5807
|
const s = [];
|
|
5042
|
-
return i.forEach((a,
|
|
5043
|
-
const
|
|
5044
|
-
s.push(`${
|
|
5808
|
+
return i.forEach((a, d) => {
|
|
5809
|
+
const l = encodeURIComponent(d), m = encodeURIComponent(a);
|
|
5810
|
+
s.push(`${l}=${m}`);
|
|
5045
5811
|
}), s.join("&");
|
|
5046
5812
|
}
|
|
5047
5813
|
joinUrl(i, s) {
|
|
@@ -5049,8 +5815,8 @@ const ve = class ve extends HTMLElement {
|
|
|
5049
5815
|
}
|
|
5050
5816
|
};
|
|
5051
5817
|
ve.tailwindCssText = null, ve.tailwindLoading = null;
|
|
5052
|
-
let
|
|
5053
|
-
customElements.get("sendity-auth") || customElements.define("sendity-auth",
|
|
5818
|
+
let Ie = ve;
|
|
5819
|
+
customElements.get("sendity-auth") || customElements.define("sendity-auth", Ie);
|
|
5054
5820
|
export {
|
|
5055
|
-
|
|
5821
|
+
Ie as Sendity
|
|
5056
5822
|
};
|