@tapni/auth 0.0.53 → 0.0.54
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/.vscode/extensions.json +3 -0
- package/dist/TapniAuth.es.js +64 -64
- package/dist/TapniAuth.umd.js +10 -10
- package/package.json +1 -1
- package/src/install.js +1 -1
package/dist/TapniAuth.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { reactive as Qn, readonly as Gn, resolveComponent as de, openBlock as f, createElementBlock as k, createElementVNode as c, toDisplayString as y, createCommentVNode as T, createVNode as j, withCtx as G, createTextVNode as I, pushScopeId as pe, popScopeId as ue, createStaticVNode as Wn, nextTick as
|
|
1
|
+
import { reactive as Qn, readonly as Gn, resolveComponent as de, openBlock as f, createElementBlock as k, createElementVNode as c, toDisplayString as y, createCommentVNode as T, createVNode as j, withCtx as G, createTextVNode as I, pushScopeId as pe, popScopeId as ue, createStaticVNode as Wn, nextTick as We, withModifiers as U, normalizeStyle as ce, withDirectives as B, withKeys as te, vModelText as ae, vModelDynamic as fe, vShow as J, createBlock as Y, normalizeClass as R, unref as Yn } from "vue";
|
|
2
2
|
import { RouterView as Xn } from "vue-router";
|
|
3
3
|
import L from "await-to-js";
|
|
4
|
-
import
|
|
4
|
+
import Be from "axios";
|
|
5
5
|
import { jwtDecode as Je } from "jwt-decode";
|
|
6
6
|
import { Device as ke } from "@capacitor/device";
|
|
7
7
|
import { Capacitor as me } from "@capacitor/core";
|
|
8
|
-
import { GoogleAuth as
|
|
8
|
+
import { GoogleAuth as Ye } from "@codetrix-studio/capacitor-google-auth";
|
|
9
9
|
import { FacebookLogin as Zn } from "@capacitor-community/facebook-login";
|
|
10
10
|
import { SignInWithApple as Jn } from "@capacitor-community/apple-sign-in";
|
|
11
11
|
import { MsAuthPlugin as et } from "@recognizebv/capacitor-plugin-msauth";
|
|
@@ -13,12 +13,12 @@ import { Browser as be } from "@capacitor/browser";
|
|
|
13
13
|
import nt from "qr-code-styling";
|
|
14
14
|
import { sanitizeUrl as tt } from "@braintree/sanitize-url";
|
|
15
15
|
import "@tapni/capacitor-reactive-localstorage-vue3";
|
|
16
|
-
const at = "0.0.
|
|
16
|
+
const at = "0.0.54", z = (e, t = !1) => {
|
|
17
17
|
const r = at;
|
|
18
18
|
let u = "https://api.tapni.co/v1/";
|
|
19
19
|
const l = O.methods.apiRootGet();
|
|
20
20
|
l && (u = l);
|
|
21
|
-
let d =
|
|
21
|
+
let d = Be.create({
|
|
22
22
|
baseURL: u,
|
|
23
23
|
headers: {
|
|
24
24
|
...e ? { Authorization: `Bearer ${e.token}` } : {},
|
|
@@ -91,7 +91,7 @@ const at = "0.0.53", z = (e, t = !1) => {
|
|
|
91
91
|
loginUsingQR(e, t) {
|
|
92
92
|
return z(t).post("/users/qr/login", e);
|
|
93
93
|
}
|
|
94
|
-
},
|
|
94
|
+
}, Xe = {
|
|
95
95
|
registerDevice(e, t) {
|
|
96
96
|
return z(t).post("/devices/add", e);
|
|
97
97
|
},
|
|
@@ -158,7 +158,7 @@ const N = {
|
|
|
158
158
|
exchangeAuthCode(e, t) {
|
|
159
159
|
return z(t).post("/users/auth-code", e);
|
|
160
160
|
}
|
|
161
|
-
},
|
|
161
|
+
}, xe = {
|
|
162
162
|
getBySSOEmail(e, t) {
|
|
163
163
|
return z(t).get(`/company/sso/${e}`);
|
|
164
164
|
},
|
|
@@ -4423,7 +4423,7 @@ const O = {
|
|
|
4423
4423
|
},
|
|
4424
4424
|
async maintenance() {
|
|
4425
4425
|
const [e, t] = await L(
|
|
4426
|
-
|
|
4426
|
+
Be.get("https://status.tapni.co/data/maintenance.json")
|
|
4427
4427
|
);
|
|
4428
4428
|
if (e)
|
|
4429
4429
|
return console.error(e);
|
|
@@ -4560,19 +4560,19 @@ const O = {
|
|
|
4560
4560
|
}
|
|
4561
4561
|
};
|
|
4562
4562
|
const [u, l] = await L(
|
|
4563
|
-
|
|
4563
|
+
Xe.registerDevice(r, this.$storage)
|
|
4564
4564
|
);
|
|
4565
4565
|
return u ? this.errorHandler(u) : l;
|
|
4566
4566
|
},
|
|
4567
4567
|
async addFcmToken(e) {
|
|
4568
4568
|
const [t, r] = await L(
|
|
4569
|
-
|
|
4569
|
+
Xe.addFcmToken(e, this.$storage)
|
|
4570
4570
|
);
|
|
4571
4571
|
return t ? this.errorHandler(t) : r;
|
|
4572
4572
|
},
|
|
4573
4573
|
async acceptCompanyInvitation(e) {
|
|
4574
4574
|
const [t, r] = await L(
|
|
4575
|
-
|
|
4575
|
+
xe.acceptCompanyInvitation(e, this.$storage)
|
|
4576
4576
|
);
|
|
4577
4577
|
return t ? this.errorHandler(t) : r;
|
|
4578
4578
|
},
|
|
@@ -4585,7 +4585,7 @@ const O = {
|
|
|
4585
4585
|
},
|
|
4586
4586
|
async getCompanyBySSOEmail(e) {
|
|
4587
4587
|
const [t, r] = await L(
|
|
4588
|
-
|
|
4588
|
+
xe.getBySSOEmail(e.email, this.$storage)
|
|
4589
4589
|
);
|
|
4590
4590
|
if (t)
|
|
4591
4591
|
return this.errorHandler(t);
|
|
@@ -4732,13 +4732,13 @@ const dn = /* @__PURE__ */ $(st, [["render", bt], ["__scopeId", "data-v-c5cb659c
|
|
|
4732
4732
|
}
|
|
4733
4733
|
},
|
|
4734
4734
|
mounted() {
|
|
4735
|
-
|
|
4735
|
+
Ye.initialize();
|
|
4736
4736
|
},
|
|
4737
4737
|
methods: {
|
|
4738
4738
|
async googleLogin() {
|
|
4739
4739
|
var r;
|
|
4740
4740
|
this.googleLoad = !0;
|
|
4741
|
-
let [e, t] = await L(
|
|
4741
|
+
let [e, t] = await L(Ye.signIn());
|
|
4742
4742
|
if (e)
|
|
4743
4743
|
return this.googleLoad = !1;
|
|
4744
4744
|
if (this.referral && (t.ref = this.referral), t.authentication && (t.authentication.accessToken || t.authentication.idToken)) {
|
|
@@ -5011,7 +5011,7 @@ const ve = {
|
|
|
5011
5011
|
methods: {
|
|
5012
5012
|
async exchangeCode(e) {
|
|
5013
5013
|
var l, d;
|
|
5014
|
-
let [t, r] = await L(
|
|
5014
|
+
let [t, r] = await L(Be.post(e.domain + "/v1/token", new URLSearchParams({ code: e.code, client_id: e.clientID, grant_type: "authorization_code", redirect_uri: this.isNative ? "tapni://t.link/callback/okta" : location.origin + "/callback/okta", code_verifier: localStorage.getItem("pkce_code_verifier") })));
|
|
5015
5015
|
if (t)
|
|
5016
5016
|
return this.errorHandler(t);
|
|
5017
5017
|
localStorage.removeItem("pkce_code_verifier");
|
|
@@ -5099,9 +5099,9 @@ function Et(e) {
|
|
|
5099
5099
|
Q[t >> 10] + Q[t >> 4 & 63] + Q[t << 2 & 63] + "="
|
|
5100
5100
|
)), l.join("");
|
|
5101
5101
|
}
|
|
5102
|
-
var
|
|
5102
|
+
var Me = {};
|
|
5103
5103
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
5104
|
-
|
|
5104
|
+
Me.read = function(e, t, r, u, l) {
|
|
5105
5105
|
var d, g, m = l * 8 - u - 1, b = (1 << m) - 1, C = b >> 1, p = -7, x = r ? l - 1 : 0, W = r ? -1 : 1, D = e[t + x];
|
|
5106
5106
|
for (x += W, d = D & (1 << -p) - 1, D >>= -p, p += m; p > 0; d = d * 256 + e[t + x], x += W, p -= 8)
|
|
5107
5107
|
;
|
|
@@ -5116,7 +5116,7 @@ Re.read = function(e, t, r, u, l) {
|
|
|
5116
5116
|
}
|
|
5117
5117
|
return (D ? -1 : 1) * g * Math.pow(2, d - u);
|
|
5118
5118
|
};
|
|
5119
|
-
|
|
5119
|
+
Me.write = function(e, t, r, u, l, d) {
|
|
5120
5120
|
var g, m, b, C = d * 8 - l - 1, p = (1 << C) - 1, x = p >> 1, W = l === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, D = u ? 0 : d - 1, ee = u ? 1 : -1, Ce = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
|
|
5121
5121
|
for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (m = isNaN(t) ? 1 : 0, g = p) : (g = Math.floor(Math.log(t) / Math.LN2), t * (b = Math.pow(2, -g)) < 1 && (g--, b *= 2), g + x >= 1 ? t += W / b : t += W * Math.pow(2, 1 - x), t * b >= 2 && (g++, b /= 2), g + x >= p ? (m = 0, g = p) : g + x >= 1 ? (m = (t * b - 1) * Math.pow(2, l), g = g + x) : (m = t * Math.pow(2, x - 1) * Math.pow(2, l), g = 0)); l >= 8; e[r + D] = m & 255, D += ee, m /= 256, l -= 8)
|
|
5122
5122
|
;
|
|
@@ -5131,7 +5131,7 @@ Re.write = function(e, t, r, u, l, d) {
|
|
|
5131
5131
|
* @license MIT
|
|
5132
5132
|
*/
|
|
5133
5133
|
(function(e) {
|
|
5134
|
-
const t = we, r =
|
|
5134
|
+
const t = we, r = Me, u = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
5135
5135
|
e.Buffer = p, e.SlowBuffer = Tn, e.INSPECT_MAX_BYTES = 50;
|
|
5136
5136
|
const l = 2147483647;
|
|
5137
5137
|
e.kMaxLength = l;
|
|
@@ -5232,7 +5232,7 @@ Re.write = function(e, t, r, u, l, d) {
|
|
|
5232
5232
|
function Ce(i, n) {
|
|
5233
5233
|
if ((typeof n != "string" || n === "") && (n = "utf8"), !p.isEncoding(n))
|
|
5234
5234
|
throw new TypeError("Unknown encoding: " + n);
|
|
5235
|
-
const a =
|
|
5235
|
+
const a = Re(i, n) | 0;
|
|
5236
5236
|
let o = C(a);
|
|
5237
5237
|
const s = o.write(i, n);
|
|
5238
5238
|
return s !== a && (o = o.slice(0, s)), o;
|
|
@@ -5336,7 +5336,7 @@ Re.write = function(e, t, r, u, l, d) {
|
|
|
5336
5336
|
}
|
|
5337
5337
|
return s;
|
|
5338
5338
|
};
|
|
5339
|
-
function
|
|
5339
|
+
function Re(i, n) {
|
|
5340
5340
|
if (p.isBuffer(i))
|
|
5341
5341
|
return i.length;
|
|
5342
5342
|
if (g.isView(i) || H(i, g))
|
|
@@ -5366,14 +5366,14 @@ Re.write = function(e, t, r, u, l, d) {
|
|
|
5366
5366
|
case "hex":
|
|
5367
5367
|
return a >>> 1;
|
|
5368
5368
|
case "base64":
|
|
5369
|
-
return
|
|
5369
|
+
return Ge(i).length;
|
|
5370
5370
|
default:
|
|
5371
5371
|
if (s)
|
|
5372
5372
|
return o ? -1 : Ae(i).length;
|
|
5373
5373
|
n = ("" + n).toLowerCase(), s = !0;
|
|
5374
5374
|
}
|
|
5375
5375
|
}
|
|
5376
|
-
p.byteLength =
|
|
5376
|
+
p.byteLength = Re;
|
|
5377
5377
|
function En(i, n, a) {
|
|
5378
5378
|
let o = !1;
|
|
5379
5379
|
if ((n === void 0 || n < 0) && (n = 0), n > this.length || ((a === void 0 || a > this.length) && (a = this.length), a <= 0) || (a >>>= 0, n >>>= 0, a <= n))
|
|
@@ -5384,7 +5384,7 @@ Re.write = function(e, t, r, u, l, d) {
|
|
|
5384
5384
|
return Nn(this, n, a);
|
|
5385
5385
|
case "utf8":
|
|
5386
5386
|
case "utf-8":
|
|
5387
|
-
return
|
|
5387
|
+
return Ue(this, n, a);
|
|
5388
5388
|
case "ascii":
|
|
5389
5389
|
return Rn(this, n, a);
|
|
5390
5390
|
case "latin1":
|
|
@@ -5431,7 +5431,7 @@ Re.write = function(e, t, r, u, l, d) {
|
|
|
5431
5431
|
return this;
|
|
5432
5432
|
}, p.prototype.toString = function() {
|
|
5433
5433
|
const n = this.length;
|
|
5434
|
-
return n === 0 ? "" : arguments.length === 0 ?
|
|
5434
|
+
return n === 0 ? "" : arguments.length === 0 ? Ue(this, 0, n) : En.apply(this, arguments);
|
|
5435
5435
|
}, p.prototype.toLocaleString = p.prototype.toString, p.prototype.equals = function(n) {
|
|
5436
5436
|
if (!p.isBuffer(n))
|
|
5437
5437
|
throw new TypeError("Argument must be a Buffer");
|
|
@@ -5464,7 +5464,7 @@ Re.write = function(e, t, r, u, l, d) {
|
|
|
5464
5464
|
}
|
|
5465
5465
|
return h < w ? -1 : w < h ? 1 : 0;
|
|
5466
5466
|
};
|
|
5467
|
-
function
|
|
5467
|
+
function qe(i, n, a, o, s) {
|
|
5468
5468
|
if (i.length === 0)
|
|
5469
5469
|
return -1;
|
|
5470
5470
|
if (typeof a == "string" ? (o = a, a = 0) : a > 2147483647 ? a = 2147483647 : a < -2147483648 && (a = -2147483648), a = +a, Pe(a) && (a = s ? 0 : i.length - 1), a < 0 && (a = i.length + a), a >= i.length) {
|
|
@@ -5477,12 +5477,12 @@ Re.write = function(e, t, r, u, l, d) {
|
|
|
5477
5477
|
else
|
|
5478
5478
|
return -1;
|
|
5479
5479
|
if (typeof n == "string" && (n = p.from(n, o)), p.isBuffer(n))
|
|
5480
|
-
return n.length === 0 ? -1 :
|
|
5480
|
+
return n.length === 0 ? -1 : Ne(i, n, a, o, s);
|
|
5481
5481
|
if (typeof n == "number")
|
|
5482
|
-
return n = n & 255, typeof d.prototype.indexOf == "function" ? s ? d.prototype.indexOf.call(i, n, a) : d.prototype.lastIndexOf.call(i, n, a) :
|
|
5482
|
+
return n = n & 255, typeof d.prototype.indexOf == "function" ? s ? d.prototype.indexOf.call(i, n, a) : d.prototype.lastIndexOf.call(i, n, a) : Ne(i, [n], a, o, s);
|
|
5483
5483
|
throw new TypeError("val must be string, number or Buffer");
|
|
5484
5484
|
}
|
|
5485
|
-
function
|
|
5485
|
+
function Ne(i, n, a, o, s) {
|
|
5486
5486
|
let _ = 1, h = i.length, w = n.length;
|
|
5487
5487
|
if (o !== void 0 && (o = String(o).toLowerCase(), o === "ucs2" || o === "ucs-2" || o === "utf16le" || o === "utf-16le")) {
|
|
5488
5488
|
if (i.length < 2 || n.length < 2)
|
|
@@ -5517,9 +5517,9 @@ Re.write = function(e, t, r, u, l, d) {
|
|
|
5517
5517
|
p.prototype.includes = function(n, a, o) {
|
|
5518
5518
|
return this.indexOf(n, a, o) !== -1;
|
|
5519
5519
|
}, p.prototype.indexOf = function(n, a, o) {
|
|
5520
|
-
return
|
|
5520
|
+
return qe(this, n, a, o, !0);
|
|
5521
5521
|
}, p.prototype.lastIndexOf = function(n, a, o) {
|
|
5522
|
-
return
|
|
5522
|
+
return qe(this, n, a, o, !1);
|
|
5523
5523
|
};
|
|
5524
5524
|
function In(i, n, a, o) {
|
|
5525
5525
|
a = Number(a) || 0;
|
|
@@ -5543,7 +5543,7 @@ Re.write = function(e, t, r, u, l, d) {
|
|
|
5543
5543
|
return ge(Vn(n), i, a, o);
|
|
5544
5544
|
}
|
|
5545
5545
|
function jn(i, n, a, o) {
|
|
5546
|
-
return ge(
|
|
5546
|
+
return ge(Ge(n), i, a, o);
|
|
5547
5547
|
}
|
|
5548
5548
|
function xn(i, n, a, o) {
|
|
5549
5549
|
return ge(Kn(n, i.length - a), i, a, o);
|
|
@@ -5596,7 +5596,7 @@ Re.write = function(e, t, r, u, l, d) {
|
|
|
5596
5596
|
function Bn(i, n, a) {
|
|
5597
5597
|
return n === 0 && a === i.length ? t.fromByteArray(i) : t.fromByteArray(i.slice(n, a));
|
|
5598
5598
|
}
|
|
5599
|
-
function
|
|
5599
|
+
function Ue(i, n, a) {
|
|
5600
5600
|
a = Math.min(i.length, a);
|
|
5601
5601
|
const o = [];
|
|
5602
5602
|
let s = n;
|
|
@@ -5623,16 +5623,16 @@ Re.write = function(e, t, r, u, l, d) {
|
|
|
5623
5623
|
}
|
|
5624
5624
|
return Mn(o);
|
|
5625
5625
|
}
|
|
5626
|
-
const
|
|
5626
|
+
const Oe = 4096;
|
|
5627
5627
|
function Mn(i) {
|
|
5628
5628
|
const n = i.length;
|
|
5629
|
-
if (n <=
|
|
5629
|
+
if (n <= Oe)
|
|
5630
5630
|
return String.fromCharCode.apply(String, i);
|
|
5631
5631
|
let a = "", o = 0;
|
|
5632
5632
|
for (; o < n; )
|
|
5633
5633
|
a += String.fromCharCode.apply(
|
|
5634
5634
|
String,
|
|
5635
|
-
i.slice(o, o +=
|
|
5635
|
+
i.slice(o, o += Oe)
|
|
5636
5636
|
);
|
|
5637
5637
|
return a;
|
|
5638
5638
|
}
|
|
@@ -5796,24 +5796,24 @@ Re.write = function(e, t, r, u, l, d) {
|
|
|
5796
5796
|
}, p.prototype.writeUint32BE = p.prototype.writeUInt32BE = function(n, a, o) {
|
|
5797
5797
|
return n = +n, a = a >>> 0, o || q(this, n, a, 4, 4294967295, 0), this[a] = n >>> 24, this[a + 1] = n >>> 16, this[a + 2] = n >>> 8, this[a + 3] = n & 255, a + 4;
|
|
5798
5798
|
};
|
|
5799
|
-
function
|
|
5800
|
-
|
|
5799
|
+
function De(i, n, a, o, s) {
|
|
5800
|
+
Qe(n, o, s, i, a, 7);
|
|
5801
5801
|
let _ = Number(n & BigInt(4294967295));
|
|
5802
5802
|
i[a++] = _, _ = _ >> 8, i[a++] = _, _ = _ >> 8, i[a++] = _, _ = _ >> 8, i[a++] = _;
|
|
5803
5803
|
let h = Number(n >> BigInt(32) & BigInt(4294967295));
|
|
5804
5804
|
return i[a++] = h, h = h >> 8, i[a++] = h, h = h >> 8, i[a++] = h, h = h >> 8, i[a++] = h, a;
|
|
5805
5805
|
}
|
|
5806
|
-
function
|
|
5807
|
-
|
|
5806
|
+
function Fe(i, n, a, o, s) {
|
|
5807
|
+
Qe(n, o, s, i, a, 7);
|
|
5808
5808
|
let _ = Number(n & BigInt(4294967295));
|
|
5809
5809
|
i[a + 7] = _, _ = _ >> 8, i[a + 6] = _, _ = _ >> 8, i[a + 5] = _, _ = _ >> 8, i[a + 4] = _;
|
|
5810
5810
|
let h = Number(n >> BigInt(32) & BigInt(4294967295));
|
|
5811
5811
|
return i[a + 3] = h, h = h >> 8, i[a + 2] = h, h = h >> 8, i[a + 1] = h, h = h >> 8, i[a] = h, a + 8;
|
|
5812
5812
|
}
|
|
5813
5813
|
p.prototype.writeBigUInt64LE = Z(function(n, a = 0) {
|
|
5814
|
-
return
|
|
5814
|
+
return De(this, n, a, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
5815
5815
|
}), p.prototype.writeBigUInt64BE = Z(function(n, a = 0) {
|
|
5816
|
-
return
|
|
5816
|
+
return Fe(this, n, a, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
5817
5817
|
}), p.prototype.writeIntLE = function(n, a, o, s) {
|
|
5818
5818
|
if (n = +n, a = a >>> 0, !s) {
|
|
5819
5819
|
const A = Math.pow(2, 8 * o - 1);
|
|
@@ -5843,31 +5843,31 @@ Re.write = function(e, t, r, u, l, d) {
|
|
|
5843
5843
|
}, p.prototype.writeInt32BE = function(n, a, o) {
|
|
5844
5844
|
return n = +n, a = a >>> 0, o || q(this, n, a, 4, 2147483647, -2147483648), n < 0 && (n = 4294967295 + n + 1), this[a] = n >>> 24, this[a + 1] = n >>> 16, this[a + 2] = n >>> 8, this[a + 3] = n & 255, a + 4;
|
|
5845
5845
|
}, p.prototype.writeBigInt64LE = Z(function(n, a = 0) {
|
|
5846
|
-
return
|
|
5846
|
+
return De(this, n, a, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
5847
5847
|
}), p.prototype.writeBigInt64BE = Z(function(n, a = 0) {
|
|
5848
|
-
return
|
|
5848
|
+
return Fe(this, n, a, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
5849
5849
|
});
|
|
5850
|
-
function
|
|
5850
|
+
function Ve(i, n, a, o, s, _) {
|
|
5851
5851
|
if (a + o > i.length)
|
|
5852
5852
|
throw new RangeError("Index out of range");
|
|
5853
5853
|
if (a < 0)
|
|
5854
5854
|
throw new RangeError("Index out of range");
|
|
5855
5855
|
}
|
|
5856
|
-
function
|
|
5857
|
-
return n = +n, a = a >>> 0, s ||
|
|
5856
|
+
function Ke(i, n, a, o, s) {
|
|
5857
|
+
return n = +n, a = a >>> 0, s || Ve(i, n, a, 4), r.write(i, n, a, o, 23, 4), a + 4;
|
|
5858
5858
|
}
|
|
5859
5859
|
p.prototype.writeFloatLE = function(n, a, o) {
|
|
5860
|
-
return
|
|
5860
|
+
return Ke(this, n, a, !0, o);
|
|
5861
5861
|
}, p.prototype.writeFloatBE = function(n, a, o) {
|
|
5862
|
-
return
|
|
5862
|
+
return Ke(this, n, a, !1, o);
|
|
5863
5863
|
};
|
|
5864
|
-
function
|
|
5865
|
-
return n = +n, a = a >>> 0, s ||
|
|
5864
|
+
function $e(i, n, a, o, s) {
|
|
5865
|
+
return n = +n, a = a >>> 0, s || Ve(i, n, a, 8), r.write(i, n, a, o, 52, 8), a + 8;
|
|
5866
5866
|
}
|
|
5867
5867
|
p.prototype.writeDoubleLE = function(n, a, o) {
|
|
5868
|
-
return
|
|
5868
|
+
return $e(this, n, a, !0, o);
|
|
5869
5869
|
}, p.prototype.writeDoubleBE = function(n, a, o) {
|
|
5870
|
-
return
|
|
5870
|
+
return $e(this, n, a, !1, o);
|
|
5871
5871
|
}, p.prototype.copy = function(n, a, o, s) {
|
|
5872
5872
|
if (!p.isBuffer(n))
|
|
5873
5873
|
throw new TypeError("argument should be a Buffer");
|
|
@@ -5958,11 +5958,11 @@ Re.write = function(e, t, r, u, l, d) {
|
|
|
5958
5958
|
"ERR_OUT_OF_RANGE",
|
|
5959
5959
|
function(i, n, a) {
|
|
5960
5960
|
let o = `The value of "${i}" is out of range.`, s = a;
|
|
5961
|
-
return Number.isInteger(a) && Math.abs(a) > 2 ** 32 ? s =
|
|
5961
|
+
return Number.isInteger(a) && Math.abs(a) > 2 ** 32 ? s = He(String(a)) : typeof a == "bigint" && (s = String(a), (a > BigInt(2) ** BigInt(32) || a < -(BigInt(2) ** BigInt(32))) && (s = He(s)), s += "n"), o += ` It must be ${n}. Received ${s}`, o;
|
|
5962
5962
|
},
|
|
5963
5963
|
RangeError
|
|
5964
5964
|
);
|
|
5965
|
-
function
|
|
5965
|
+
function He(i) {
|
|
5966
5966
|
let n = "", a = i.length;
|
|
5967
5967
|
const o = i[0] === "-" ? 1 : 0;
|
|
5968
5968
|
for (; a >= o + 4; a -= 3)
|
|
@@ -5972,7 +5972,7 @@ Re.write = function(e, t, r, u, l, d) {
|
|
|
5972
5972
|
function On(i, n, a) {
|
|
5973
5973
|
oe(n, "offset"), (i[n] === void 0 || i[n + a] === void 0) && _e(n, i.length - (a + 1));
|
|
5974
5974
|
}
|
|
5975
|
-
function
|
|
5975
|
+
function Qe(i, n, a, o, s, _) {
|
|
5976
5976
|
if (i > a || i < n) {
|
|
5977
5977
|
const h = typeof n == "bigint" ? "n" : "";
|
|
5978
5978
|
let w;
|
|
@@ -6071,7 +6071,7 @@ Re.write = function(e, t, r, u, l, d) {
|
|
|
6071
6071
|
a = i.charCodeAt(h), o = a >> 8, s = a % 256, _.push(s), _.push(o);
|
|
6072
6072
|
return _;
|
|
6073
6073
|
}
|
|
6074
|
-
function
|
|
6074
|
+
function Ge(i) {
|
|
6075
6075
|
return t.toByteArray(Fn(i));
|
|
6076
6076
|
}
|
|
6077
6077
|
function ge(i, n, a, o) {
|
|
@@ -6172,7 +6172,7 @@ const It = mn.Buffer, ze = {
|
|
|
6172
6172
|
},
|
|
6173
6173
|
methods: {
|
|
6174
6174
|
async changeLoginToQr() {
|
|
6175
|
-
this.isQrCodeLogin = !0, await
|
|
6175
|
+
this.isQrCodeLogin = !0, await We(), await this.initQrCodeLogin();
|
|
6176
6176
|
},
|
|
6177
6177
|
generateRandomHash() {
|
|
6178
6178
|
const e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", t = e.length;
|
|
@@ -6212,7 +6212,7 @@ const It = mn.Buffer, ze = {
|
|
|
6212
6212
|
},
|
|
6213
6213
|
async startQrCodePooling() {
|
|
6214
6214
|
this.poolingInterval = setInterval(async () => {
|
|
6215
|
-
const [e, t] = await L(
|
|
6215
|
+
const [e, t] = await L(xe.qrCodePooling({
|
|
6216
6216
|
qrToken: this.qrCodeHash
|
|
6217
6217
|
}, this.$storage));
|
|
6218
6218
|
if (e)
|
|
@@ -6221,7 +6221,7 @@ const It = mn.Buffer, ze = {
|
|
|
6221
6221
|
}, 2e3);
|
|
6222
6222
|
},
|
|
6223
6223
|
async initQrCodeLogin() {
|
|
6224
|
-
this.refreshQrCode(), await
|
|
6224
|
+
this.refreshQrCode(), await We(), await this.startQrCodePooling(), this.qrCodeRefreshInterval = setInterval(() => {
|
|
6225
6225
|
this.refreshQrCode();
|
|
6226
6226
|
}, 6e4);
|
|
6227
6227
|
}
|
|
@@ -7875,7 +7875,7 @@ const Lr = { id: "ssoapp" }, Cr = {
|
|
|
7875
7875
|
this.applyBgStyle();
|
|
7876
7876
|
}
|
|
7877
7877
|
}
|
|
7878
|
-
},
|
|
7878
|
+
}, Ze = /* @__PURE__ */ Object.assign(Nr, {
|
|
7879
7879
|
setup(e) {
|
|
7880
7880
|
return document.addEventListener("DOMContentLoaded", function() {
|
|
7881
7881
|
const t = document.createElement("script");
|
|
@@ -7923,13 +7923,13 @@ const Lr = { id: "ssoapp" }, Cr = {
|
|
|
7923
7923
|
]));
|
|
7924
7924
|
}
|
|
7925
7925
|
}), ns = {
|
|
7926
|
-
TapniAuth:
|
|
7926
|
+
TapniAuth: Ze,
|
|
7927
7927
|
install: (e, t) => {
|
|
7928
|
-
t && t.API_ROOT &&
|
|
7928
|
+
t && t.API_ROOT && e.mixin({
|
|
7929
7929
|
created() {
|
|
7930
7930
|
this.API_ROOT = t.API_ROOT;
|
|
7931
7931
|
}
|
|
7932
|
-
}), e.component("TapniAuth",
|
|
7932
|
+
}), e.component("TapniAuth", Ze);
|
|
7933
7933
|
}
|
|
7934
7934
|
};
|
|
7935
7935
|
export {
|