@springmicro/auth 0.3.0 → 0.3.5
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/.eslintrc.cjs +0 -0
- package/README.md +60 -60
- package/dist/{Index-c419311f-DolmVisI.js → Index-64ac63ff-mcEPPGzJ.js} +101 -102
- package/dist/{Index-652aeb8c-Cr1mbyJJ.js → Index-6c094240-D4xpr8fA.js} +70 -71
- package/dist/{Web3Auth-C5tucK1E.js → Web3Auth-DB9s-qbl.js} +12454 -12511
- package/dist/alphawallet-B7eovdf-.js +0 -0
- package/dist/apexwallet-ysP20G9D.js +0 -0
- package/dist/atoken-BBnNTzcz.js +0 -0
- package/dist/bifrostwallet-CNNBO92h.js +0 -0
- package/dist/binance-DvPgAzCw.js +0 -0
- package/dist/bitget-DZOUrwgy.js +0 -0
- package/dist/bitpie-C_uxmEzw.js +0 -0
- package/dist/bitski-DpzkHNkv.js +0 -0
- package/dist/blockwallet-BL69cqkA.js +0 -0
- package/dist/brave-DnRzMQYW.js +0 -0
- package/dist/ccip-c78d2f16-DLcRlwod.js +0 -0
- package/dist/coin98wallet-CkFdOvXt.js +0 -0
- package/dist/coinbase-CaGNx5if.js +0 -0
- package/dist/core-9rK8tWud.js +0 -0
- package/dist/defiwallet-0AsgJBSy.js +0 -0
- package/dist/detected-CX_JZaUk.js +0 -0
- package/dist/echooo-CmaetT_Z.js +0 -0
- package/dist/enkrypt-BibtwvK7.js +0 -0
- package/dist/exodus-BxzkDWWP.js +0 -0
- package/dist/fordefi-CvKyVwhI.js +0 -0
- package/dist/foxwallet-D7c_LDTf.js +0 -0
- package/dist/frame-CDfNmjUy.js +0 -0
- package/dist/frontier-DqKNSj2z.js +0 -0
- package/dist/hashMessage-Dw0KdqMZ.js +2101 -0
- package/dist/huobiwallet-CxSwqa5L.js +0 -0
- package/dist/hyperpay-nmHE3WqM.js +0 -0
- package/dist/icon-2Zqy7pqQ.js +0 -0
- package/dist/icon-CGWI1Ies.js +0 -0
- package/dist/icon-C_O4nprO.js +0 -0
- package/dist/icon-DbgmZCnU.js +0 -0
- package/dist/icon-Dbjb6jc5.js +20 -0
- package/dist/icon-cAd7RhSC.js +0 -0
- package/dist/imtoken-yENtOTS3.js +0 -0
- package/dist/index-021f6a62-Zz543EDB.js +0 -0
- package/dist/index-40a497ea-Bn2mC0r7.js +0 -0
- package/dist/{index-YKlm7xSx.js → index-C0yeApwY.js} +750 -751
- package/dist/{index-C4uVsW-I.js → index-CDaoza_m.js} +2 -2
- package/dist/index-CiwBcaZ0.js +384 -0
- package/dist/{index-DOUI-2vv.js → index-CroNOC7e.js} +27 -29
- package/dist/{index-Boi-WcMK.js → index-Df5ie3cE.js} +2 -2
- package/dist/{index-DzOmdGpF.js → index-F-gl3DJX.js} +8 -10
- package/dist/index-wNV8PBAh.js +11412 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +327 -291
- package/dist/infinitywallet-C8J4FUYw.js +0 -0
- package/dist/kayros-AIrUK1za.js +0 -0
- package/dist/keplr-CyLTca9B.js +36 -0
- package/dist/lif3wallet-C5D6r8pg.js +0 -0
- package/dist/liquality-nbCtErVq.js +0 -0
- package/dist/mathwallet-CWkivCXo.js +0 -0
- package/dist/meetone-kKmvI8md.js +0 -0
- package/dist/metamask-BN7yiDV1.js +0 -0
- package/dist/mykey-CQZ6UcLH.js +0 -0
- package/dist/native-FDN9oNjc.js +15 -0
- package/dist/{number-UhidYs-H.js → number-ByqdQYDu.js} +1 -1
- package/dist/okxwallet-CJLVogh2.js +0 -0
- package/dist/oneInch-CciyZ4Pz.js +0 -0
- package/dist/onekey-Dal8kYjU.js +0 -0
- package/dist/opera-DnKg-TJU.js +0 -0
- package/dist/ownbit-BshJUVuW.js +0 -0
- package/dist/phantom-CJ8dIcov.js +0 -0
- package/dist/rabby-D4thTcd6.js +0 -0
- package/dist/rainbow-mXld6yWV.js +0 -0
- package/dist/roninwallet-ZyYrd-D1.js +0 -0
- package/dist/safeheron-Eg1Jb29V.js +0 -0
- package/dist/safepal-DVIKy94N.js +0 -0
- package/dist/sequence-BS2IbtDg.js +0 -0
- package/dist/stablewallet-jyB079Wb.js +0 -0
- package/dist/status-FrAvQjfn.js +0 -0
- package/dist/subwallet-DMvFqKyY.js +0 -0
- package/dist/talisman-Bp8zUXqB.js +0 -0
- package/dist/tallywallet-B4OS9nIr.js +0 -0
- package/dist/tokenary-C7jjcbQa.js +0 -0
- package/dist/tokenpocket-9ZRPmAFA.js +0 -0
- package/dist/tp-V2em5bdl.js +0 -0
- package/dist/transactionRequest-be6a8ea9-CUKWo5mx.js +0 -0
- package/dist/trust-SgHubMq7.js +20 -0
- package/dist/xdefi-COVIyGz4.js +0 -0
- package/dist/zeal-DxHbDqm0.js +0 -0
- package/dist/zerion-BfW0UElc.js +0 -0
- package/dist/zodiacpilot-CrId6F4w.js +0 -0
- package/index.html +0 -0
- package/package.json +2 -2
- package/src/auth/config.ts +91 -91
- package/src/components/SignUp.tsx +442 -442
- package/src/components/forms/AgreementModal.tsx +88 -88
- package/src/components/forms/CaptchaController.tsx +94 -94
- package/src/components/forms/CaptchaModal.jsx +171 -171
- package/src/components/forms/CaptchaWidget.jsx +146 -146
- package/src/components/forms/PasswordChecker.ts +88 -88
- package/src/components/forms/SendCodeInput.tsx +149 -149
- package/src/components/forms/SignUpFormItem.tsx +704 -704
- package/src/components/forms/util/application-api.ts +155 -155
- package/src/components/forms/util/auth-api.ts +198 -198
- package/src/components/forms/util/auth-util.tsx +346 -346
- package/src/components/forms/util/core.ts +493 -493
- package/src/components/forms/util/invitation-api.ts +132 -132
- package/src/components/forms/util/provider.tsx +603 -603
- package/src/components/forms/util/user-api.ts +303 -303
- package/src/components/provider/AdfsLoginButton.jsx +38 -38
- package/src/components/provider/AlipayLoginButton.jsx +38 -38
- package/src/components/provider/AppleLoginButton.jsx +38 -38
- package/src/components/provider/AzureADB2CLoginButton.jsx +38 -38
- package/src/components/provider/AzureADLoginButton.jsx +38 -38
- package/src/components/provider/BaiduLoginButton.jsx +38 -38
- package/src/components/provider/BilibiliLoginButton.jsx +37 -37
- package/src/components/provider/CasdoorLoginButton.jsx +38 -38
- package/src/components/provider/DingTalkLoginButton.jsx +37 -37
- package/src/components/provider/DouyinLoginButton.jsx +38 -38
- package/src/components/provider/FacebookLoginButton.jsx +37 -37
- package/src/components/provider/GitHubLoginButton.jsx +37 -37
- package/src/components/provider/GitLabLoginButton.jsx +38 -38
- package/src/components/provider/GiteeLoginButton.jsx +34 -34
- package/src/components/provider/GoogleLoginButton.jsx +68 -68
- package/src/components/provider/InfoflowLoginButton.jsx +38 -38
- package/src/components/provider/LarkLoginButton.jsx +38 -38
- package/src/components/provider/LinkedInLoginButton.jsx +37 -37
- package/src/components/provider/LoginButton.jsx +33 -33
- package/src/components/provider/OktaLoginButton.jsx +38 -38
- package/src/components/provider/Provider.jsx +3 -3
- package/src/components/provider/ProviderButton.jsx +327 -327
- package/src/components/provider/QqLoginButton.jsx +31 -31
- package/src/components/provider/SelfLoginButton.jsx +47 -47
- package/src/components/provider/SlackLoginButton.jsx +38 -38
- package/src/components/provider/SteamLoginButton.jsx +38 -38
- package/src/components/provider/WeComLoginButton.jsx +34 -34
- package/src/components/provider/Web3Auth.jsx +365 -365
- package/src/components/provider/WechatLoginButton.jsx +37 -37
- package/src/components/provider/WeiboLoginButton.jsx +34 -34
- package/src/components/util.tsx +173 -173
- package/src/i18n/en/signup.json +48 -48
- package/src/i18n/index.ts +17 -17
- package/src/index.tsx +8 -8
- package/src/vite-env.d.ts +0 -0
- package/tsconfig.json +0 -0
- package/tsconfig.node.json +0 -0
- package/vite.config.ts +33 -33
- package/dist/icon-duCa3gfT.js +0 -11
- package/dist/index-BtLU53lm.js +0 -6023
- package/dist/index-CLfsMiG4.js +0 -2021
- package/dist/index-DPq81SIn.js +0 -161
- package/dist/trust-gPypS1O7.js +0 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
function
|
|
1
|
+
import { Y as I, Z as N, $ as M, a0 as O, am as me, a4 as _, a7 as w, a8 as G, a9 as T, aa as V, ab as C, ac as Y, ad as _e, ae as we, af as D, a1 as h, a3 as m, aA as Ce, ah as H, a2 as L, b7 as W, ai as $, a5 as g, a6 as S, ay as be, bg as ze, bh as Te, bi as je, aD as Le, aU as xe, aG as Pe, aW as Se, aj as F, aO as Z, aR as Re, bj as Ee, bk as ye, aV as Ie, az as Ne, bl as U, bm as B, aw as A, aH as he, an as Me, ao as ge, bn as Oe, ag as ke, bo as X, bp as J, al as E, bq as Q, au as R, aC as K, br as ee, bs as De, bt as te, bu as x, at as He, aX as q, bv as $e } from "./Web3Auth-DB9s-qbl.js";
|
|
2
|
+
function Fe(i, { from: e, to: t }, n = {}) {
|
|
3
3
|
const o = getComputedStyle(i), a = o.transform === "none" ? "" : o.transform, [f, l] = o.transformOrigin.split(" ").map(parseFloat), s = e.left + e.width * f / t.width - (t.left + f), r = e.top + e.height * l / t.height - (t.top + l), { delay: c = 0, duration: d = (u) => Math.sqrt(u) * 120, easing: v = ye } = n;
|
|
4
4
|
return {
|
|
5
5
|
delay: c,
|
|
@@ -11,10 +11,10 @@ function He(i, { from: e, to: t }, n = {}) {
|
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function Ge(i) {
|
|
15
15
|
O(i, "svelte-13cuwwo", "div.svelte-13cuwwo{box-sizing:content-box}.border.svelte-13cuwwo{border:2px solid;border-radius:120px;overflow:hidden}");
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function Ve(i) {
|
|
18
18
|
let e, t;
|
|
19
19
|
return {
|
|
20
20
|
c() {
|
|
@@ -62,26 +62,26 @@ function Ge(i) {
|
|
|
62
62
|
justify-content: center;
|
|
63
63
|
`) && m(e, "style", t);
|
|
64
64
|
},
|
|
65
|
-
i:
|
|
66
|
-
o:
|
|
65
|
+
i: E,
|
|
66
|
+
o: E,
|
|
67
67
|
d(n) {
|
|
68
68
|
n && C(e);
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Ae(i, e, t) {
|
|
73
73
|
let { icon: n } = e, { borderColorVar: o } = e, { size: a } = e, { padding: f = 0 } = e, { background: l = "transparent" } = e;
|
|
74
74
|
return i.$$set = (s) => {
|
|
75
75
|
"icon" in s && t(0, n = s.icon), "borderColorVar" in s && t(1, o = s.borderColorVar), "size" in s && t(2, a = s.size), "padding" in s && t(3, f = s.padding), "background" in s && t(4, l = s.background);
|
|
76
76
|
}, [n, o, a, f, l];
|
|
77
77
|
}
|
|
78
|
-
class
|
|
78
|
+
class We extends I {
|
|
79
79
|
constructor(e) {
|
|
80
80
|
super(), N(
|
|
81
81
|
this,
|
|
82
82
|
e,
|
|
83
|
+
Ae,
|
|
83
84
|
Ve,
|
|
84
|
-
Ge,
|
|
85
85
|
M,
|
|
86
86
|
{
|
|
87
87
|
icon: 0,
|
|
@@ -90,15 +90,15 @@ class Be extends R {
|
|
|
90
90
|
padding: 3,
|
|
91
91
|
background: 4
|
|
92
92
|
},
|
|
93
|
-
|
|
93
|
+
Ge
|
|
94
94
|
);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function Be(i) {
|
|
98
98
|
O(i, "svelte-jvic9v", "div.notification-icons-wrapper.svelte-jvic9v{height:32px;width:32px}.border.svelte-jvic9v{border-radius:8px}div.notification-icon.svelte-jvic9v{padding:6px}div.pending-icon.svelte-jvic9v{animation:svelte-jvic9v-blink 2s ease-in infinite;height:100%;width:100%;padding:7px}@keyframes svelte-jvic9v-blink{from,to{opacity:1}50%{opacity:0.2}}div.border-action.svelte-jvic9v{height:32px;min-width:32px;border-radius:8px;overflow:hidden;will-change:transform}div.border-action.svelte-jvic9v:before{content:'';background-image:conic-gradient(#b1b7f2 20deg, #6370e5 120deg);height:140%;width:140%;position:absolute;left:-25%;top:-25%;animation:svelte-jvic9v-rotate 2s infinite linear}div.chain-icon-container.svelte-jvic9v{left:18px;top:18px}@keyframes svelte-jvic9v-rotate{100%{transform:rotate(-360deg)}}");
|
|
99
99
|
}
|
|
100
100
|
function ne(i) {
|
|
101
|
-
let e, t, n, o, a =
|
|
101
|
+
let e, t, n, o, a = x[
|
|
102
102
|
/*notification*/
|
|
103
103
|
i[1].type
|
|
104
104
|
].eventIcon + "", f, l, s, r = !/*notification*/
|
|
@@ -109,15 +109,15 @@ function ne(i) {
|
|
|
109
109
|
), v = r && oe(i);
|
|
110
110
|
return {
|
|
111
111
|
c() {
|
|
112
|
-
e = h("div"), d && d.c(), t = L(), n = h("div"), o = h("div"), s = L(), v && v.c(), m(o, "class", f =
|
|
113
|
-
i[1].type === "pending" ? "pending-icon" : ""}`) + " svelte-jvic9v"), m(n, "class", "flex items-center justify-center border relative notification-icons-wrapper svelte-jvic9v"), m(n, "style", l = `background:${
|
|
112
|
+
e = h("div"), d && d.c(), t = L(), n = h("div"), o = h("div"), s = L(), v && v.c(), m(o, "class", f = W(`notification-icon flex items-center justify-center ${/*notification*/
|
|
113
|
+
i[1].type === "pending" ? "pending-icon" : ""}`) + " svelte-jvic9v"), m(n, "class", "flex items-center justify-center border relative notification-icons-wrapper svelte-jvic9v"), m(n, "style", l = `background:${x[
|
|
114
114
|
/*notification*/
|
|
115
115
|
i[1].type
|
|
116
|
-
].backgroundColor}; color: ${
|
|
116
|
+
].backgroundColor}; color: ${x[
|
|
117
117
|
/*notification*/
|
|
118
118
|
i[1].type
|
|
119
119
|
].iconColor || ""}; ${/*notification*/
|
|
120
|
-
i[1].type === "pending" ? "height: 28px; width: 28px; margin: 2px;" : `border: 2px solid ${
|
|
120
|
+
i[1].type === "pending" ? "height: 28px; width: 28px; margin: 2px;" : `border: 2px solid ${x[
|
|
121
121
|
/*notification*/
|
|
122
122
|
i[1].type
|
|
123
123
|
].borderColor}`}; `), m(e, "class", "relative");
|
|
@@ -128,29 +128,29 @@ function ne(i) {
|
|
|
128
128
|
p(u, y) {
|
|
129
129
|
/*notification*/
|
|
130
130
|
u[1].type === "pending" ? d || (d = ie(), d.c(), d.m(e, t)) : d && (d.d(1), d = null), (!c || y & /*notification*/
|
|
131
|
-
2) && a !== (a =
|
|
131
|
+
2) && a !== (a = x[
|
|
132
132
|
/*notification*/
|
|
133
133
|
u[1].type
|
|
134
134
|
].eventIcon + "") && (o.innerHTML = a), (!c || y & /*notification*/
|
|
135
|
-
2 && f !== (f =
|
|
135
|
+
2 && f !== (f = W(`notification-icon flex items-center justify-center ${/*notification*/
|
|
136
136
|
u[1].type === "pending" ? "pending-icon" : ""}`) + " svelte-jvic9v")) && m(o, "class", f), (!c || y & /*notification*/
|
|
137
|
-
2 && l !== (l = `background:${
|
|
137
|
+
2 && l !== (l = `background:${x[
|
|
138
138
|
/*notification*/
|
|
139
139
|
u[1].type
|
|
140
|
-
].backgroundColor}; color: ${
|
|
140
|
+
].backgroundColor}; color: ${x[
|
|
141
141
|
/*notification*/
|
|
142
142
|
u[1].type
|
|
143
143
|
].iconColor || ""}; ${/*notification*/
|
|
144
|
-
u[1].type === "pending" ? "height: 28px; width: 28px; margin: 2px;" : `border: 2px solid ${
|
|
144
|
+
u[1].type === "pending" ? "height: 28px; width: 28px; margin: 2px;" : `border: 2px solid ${x[
|
|
145
145
|
/*notification*/
|
|
146
146
|
u[1].type
|
|
147
147
|
].borderColor}`}; `)) && m(n, "style", l), y & /*notification*/
|
|
148
148
|
2 && (r = !/*notification*/
|
|
149
149
|
u[1].id.includes("customNotification") && !/*notification*/
|
|
150
150
|
u[1].id.includes("preflight")), r ? v ? (v.p(u, y), y & /*notification*/
|
|
151
|
-
2 && w(v, 1)) : (v = oe(u), v.c(), w(v, 1), v.m(e, null)) : v && (
|
|
151
|
+
2 && w(v, 1)) : (v = oe(u), v.c(), w(v, 1), v.m(e, null)) : v && (G(), T(v, 1, 1, () => {
|
|
152
152
|
v = null;
|
|
153
|
-
}),
|
|
153
|
+
}), V());
|
|
154
154
|
},
|
|
155
155
|
i(u) {
|
|
156
156
|
c || (w(v), c = !0);
|
|
@@ -179,7 +179,7 @@ function ie(i) {
|
|
|
179
179
|
}
|
|
180
180
|
function oe(i) {
|
|
181
181
|
let e, t, n;
|
|
182
|
-
return t = new
|
|
182
|
+
return t = new We({
|
|
183
183
|
props: {
|
|
184
184
|
icon: (
|
|
185
185
|
/*chainStyles*/
|
|
@@ -195,10 +195,10 @@ function oe(i) {
|
|
|
195
195
|
}
|
|
196
196
|
}), {
|
|
197
197
|
c() {
|
|
198
|
-
e = h("div"),
|
|
198
|
+
e = h("div"), H(t.$$.fragment), m(e, "class", "absolute chain-icon-container svelte-jvic9v");
|
|
199
199
|
},
|
|
200
200
|
m(o, a) {
|
|
201
|
-
_(o, e, a),
|
|
201
|
+
_(o, e, a), $(t, e, null), n = !0;
|
|
202
202
|
},
|
|
203
203
|
p(o, a) {
|
|
204
204
|
const f = {};
|
|
@@ -215,7 +215,7 @@ function oe(i) {
|
|
|
215
215
|
T(t.$$.fragment, o), n = !1;
|
|
216
216
|
},
|
|
217
217
|
d(o) {
|
|
218
|
-
o && C(e),
|
|
218
|
+
o && C(e), F(t);
|
|
219
219
|
}
|
|
220
220
|
};
|
|
221
221
|
}
|
|
@@ -234,9 +234,9 @@ function qe(i) {
|
|
|
234
234
|
p(o, [a]) {
|
|
235
235
|
/*notification*/
|
|
236
236
|
o[1].type ? n ? (n.p(o, a), a & /*notification*/
|
|
237
|
-
2 && w(n, 1)) : (n = ne(o), n.c(), w(n, 1), n.m(e.parentNode, e)) : n && (
|
|
237
|
+
2 && w(n, 1)) : (n = ne(o), n.c(), w(n, 1), n.m(e.parentNode, e)) : n && (G(), T(n, 1, 1, () => {
|
|
238
238
|
n = null;
|
|
239
|
-
}),
|
|
239
|
+
}), V());
|
|
240
240
|
},
|
|
241
241
|
i(o) {
|
|
242
242
|
t || (w(n), t = !0);
|
|
@@ -250,14 +250,14 @@ function qe(i) {
|
|
|
250
250
|
};
|
|
251
251
|
}
|
|
252
252
|
function Ke(i, e, t) {
|
|
253
|
-
let { chainStyles: n =
|
|
253
|
+
let { chainStyles: n = He } = e, { notification: o } = e;
|
|
254
254
|
return i.$$set = (a) => {
|
|
255
255
|
"chainStyles" in a && t(0, n = a.chainStyles), "notification" in a && t(1, o = a.notification);
|
|
256
256
|
}, [n, o];
|
|
257
257
|
}
|
|
258
|
-
class Ye extends
|
|
258
|
+
class Ye extends I {
|
|
259
259
|
constructor(e) {
|
|
260
|
-
super(), N(this, e, Ke, qe, M, { chainStyles: 0, notification: 1 },
|
|
260
|
+
super(), N(this, e, Ke, qe, M, { chainStyles: 0, notification: 1 }, Be);
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
function Ze(i) {
|
|
@@ -277,8 +277,8 @@ function ae(i) {
|
|
|
277
277
|
), o, a;
|
|
278
278
|
return {
|
|
279
279
|
c() {
|
|
280
|
-
e =
|
|
281
|
-
`), t = h("span"), o =
|
|
280
|
+
e = R(`-
|
|
281
|
+
`), t = h("span"), o = R(n), a = R(`
|
|
282
282
|
ago`), m(t, "class", "svelte-pm7idu");
|
|
283
283
|
},
|
|
284
284
|
m(f, l) {
|
|
@@ -298,7 +298,7 @@ function ae(i) {
|
|
|
298
298
|
}
|
|
299
299
|
};
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function Ue(i) {
|
|
302
302
|
let e, t = (
|
|
303
303
|
/*startTime*/
|
|
304
304
|
i[0] && ae(i)
|
|
@@ -314,16 +314,16 @@ function Je(i) {
|
|
|
314
314
|
/*startTime*/
|
|
315
315
|
n[0] ? t ? t.p(n, o) : (t = ae(n), t.c(), t.m(e, null)) : t && (t.d(1), t = null);
|
|
316
316
|
},
|
|
317
|
-
i:
|
|
318
|
-
o:
|
|
317
|
+
i: E,
|
|
318
|
+
o: E,
|
|
319
319
|
d(n) {
|
|
320
320
|
n && C(e), t && t.d();
|
|
321
321
|
}
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function Xe(i, e, t) {
|
|
325
325
|
let n, o;
|
|
326
|
-
|
|
326
|
+
D(i, ge, (r) => t(3, n = r)), D(i, $e, (r) => t(4, o = r));
|
|
327
327
|
let { startTime: a } = e;
|
|
328
328
|
function f(r) {
|
|
329
329
|
const c = Math.floor(r / 1e3), d = c < 0 ? 0 : c;
|
|
@@ -342,12 +342,12 @@ function Qe(i, e, t) {
|
|
|
342
342
|
"startTime" in r && t(0, a = r.startTime);
|
|
343
343
|
}, [a, l, f];
|
|
344
344
|
}
|
|
345
|
-
class
|
|
345
|
+
class Je extends I {
|
|
346
346
|
constructor(e) {
|
|
347
|
-
super(), N(this, e,
|
|
347
|
+
super(), N(this, e, Xe, Ue, M, { startTime: 0 }, Ze);
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function Qe(i) {
|
|
351
351
|
O(i, "svelte-1otz6tt", `div.notify-transaction-data.svelte-1otz6tt{font-size:var(
|
|
352
352
|
--notify-onboard-transaction-font-size,
|
|
353
353
|
var(--onboard-font-size-6, var(--font-size-6))
|
|
@@ -377,7 +377,7 @@ function re(i) {
|
|
|
377
377
|
);
|
|
378
378
|
}
|
|
379
379
|
let f = a(i), l = f(i);
|
|
380
|
-
return n = new
|
|
380
|
+
return n = new Je({
|
|
381
381
|
props: {
|
|
382
382
|
startTime: (
|
|
383
383
|
/*notification*/
|
|
@@ -386,10 +386,10 @@ function re(i) {
|
|
|
386
386
|
}
|
|
387
387
|
}), {
|
|
388
388
|
c() {
|
|
389
|
-
e = h("span"), l.c(), t = L(),
|
|
389
|
+
e = h("span"), l.c(), t = L(), H(n.$$.fragment), m(e, "class", "hash-time svelte-1otz6tt");
|
|
390
390
|
},
|
|
391
391
|
m(s, r) {
|
|
392
|
-
_(s, e, r), l.m(e, null), g(e, t),
|
|
392
|
+
_(s, e, r), l.m(e, null), g(e, t), $(n, e, null), o = !0;
|
|
393
393
|
},
|
|
394
394
|
p(s, r) {
|
|
395
395
|
f === (f = a(s)) && l ? l.p(s, r) : (l.d(1), l = f(s), l && (l.c(), l.m(e, t)));
|
|
@@ -405,7 +405,7 @@ function re(i) {
|
|
|
405
405
|
T(n.$$.fragment, s), o = !1;
|
|
406
406
|
},
|
|
407
407
|
d(s) {
|
|
408
|
-
s && C(e), l.d(),
|
|
408
|
+
s && C(e), l.d(), F(n);
|
|
409
409
|
}
|
|
410
410
|
};
|
|
411
411
|
}
|
|
@@ -416,7 +416,7 @@ function et(i) {
|
|
|
416
416
|
) + "", n;
|
|
417
417
|
return {
|
|
418
418
|
c() {
|
|
419
|
-
e = h("div"), n =
|
|
419
|
+
e = h("div"), n = R(t), m(e, "class", "address-hash svelte-1otz6tt");
|
|
420
420
|
},
|
|
421
421
|
m(o, a) {
|
|
422
422
|
_(o, e, a), g(e, n);
|
|
@@ -440,7 +440,7 @@ function tt(i) {
|
|
|
440
440
|
) + "", n, o;
|
|
441
441
|
return {
|
|
442
442
|
c() {
|
|
443
|
-
e = h("a"), n =
|
|
443
|
+
e = h("a"), n = R(t), m(e, "class", "address-hash svelte-1otz6tt"), m(e, "href", o = /*notification*/
|
|
444
444
|
i[0].link), m(e, "target", "_blank"), m(e, "rel", "noreferrer noopener");
|
|
445
445
|
},
|
|
446
446
|
m(a, f) {
|
|
@@ -472,7 +472,7 @@ function nt(i) {
|
|
|
472
472
|
), l, s = f && re(i);
|
|
473
473
|
return {
|
|
474
474
|
c() {
|
|
475
|
-
e = h("div"), t = h("span"), o =
|
|
475
|
+
e = h("div"), t = h("span"), o = R(n), a = L(), s && s.c(), m(t, "class", "transaction-status svelte-1otz6tt"), m(e, "class", "flex flex-column notify-transaction-data svelte-1otz6tt");
|
|
476
476
|
},
|
|
477
477
|
m(r, c) {
|
|
478
478
|
_(r, e, c), g(e, t), g(t, o), g(e, a), s && s.m(e, null), l = !0;
|
|
@@ -485,9 +485,9 @@ function nt(i) {
|
|
|
485
485
|
r[0].id && !/*notification*/
|
|
486
486
|
r[0].id.includes("customNotification") && !/*notification*/
|
|
487
487
|
r[0].id.includes("preflight")), f ? s ? (s.p(r, c), c & /*notification*/
|
|
488
|
-
1 && w(s, 1)) : (s = re(r), s.c(), w(s, 1), s.m(e, null)) : s && (
|
|
488
|
+
1 && w(s, 1)) : (s = re(r), s.c(), w(s, 1), s.m(e, null)) : s && (G(), T(s, 1, 1, () => {
|
|
489
489
|
s = null;
|
|
490
|
-
}),
|
|
490
|
+
}), V());
|
|
491
491
|
},
|
|
492
492
|
i(r) {
|
|
493
493
|
l || (w(s), l = !0);
|
|
@@ -506,9 +506,9 @@ function it(i, e, t) {
|
|
|
506
506
|
"notification" in o && t(0, n = o.notification);
|
|
507
507
|
}, [n];
|
|
508
508
|
}
|
|
509
|
-
class ot extends
|
|
509
|
+
class ot extends I {
|
|
510
510
|
constructor(e) {
|
|
511
|
-
super(), N(this, e, it, nt, M, { notification: 0 },
|
|
511
|
+
super(), N(this, e, it, nt, M, { notification: 0 }, Qe);
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
514
|
var at = `
|
|
@@ -524,21 +524,20 @@ const rt = ["txPool"], lt = ["main", "matic-main"], st = [
|
|
|
524
524
|
"D'CENT"
|
|
525
525
|
], le = (i) => rt.includes(i), se = (i) => lt.includes(i), ce = (i) => i && st.includes(i.label);
|
|
526
526
|
async function fe({ type: i, wallet: e, transaction: t }) {
|
|
527
|
-
const { from: n, input: o, value: a, to: f, nonce: l, gas: s, network: r } = t, c =
|
|
527
|
+
const { from: n, input: o, value: a, to: f, nonce: l, gas: s, network: r } = t, c = B[r], { gasPriceProbability: d } = Y.get().notify.replacement, { gas: v } = Z;
|
|
528
528
|
if (!v)
|
|
529
529
|
return;
|
|
530
|
-
const [
|
|
531
|
-
chains: [
|
|
532
|
-
endpoint: "blockPrices"
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
if (!p || !b)
|
|
530
|
+
const [u] = await v.get({
|
|
531
|
+
chains: [B[r]],
|
|
532
|
+
endpoint: "blockPrices"
|
|
533
|
+
}), { maxFeePerGas: y, maxPriorityFeePerGas: p } = u.blockPrices[0].estimatedPrices.find(({ confidence: k }) => k === (i === "speedup" ? d == null ? void 0 : d.speedup : d == null ? void 0 : d.cancel)) || {};
|
|
534
|
+
if (!y || !p)
|
|
536
535
|
return;
|
|
537
|
-
const
|
|
536
|
+
const b = ee(y), z = ee(p), j = o === "0x" ? {} : { data: o };
|
|
538
537
|
return e.provider.request({
|
|
539
538
|
method: "eth_sendTransaction",
|
|
540
539
|
params: [
|
|
541
|
-
Object.assign({ type: "0x2", from: n, to: i === "cancel" ? n : f, chainId: parseInt(c), value:
|
|
540
|
+
Object.assign({ type: "0x2", from: n, to: i === "cancel" ? n : f, chainId: parseInt(c), value: De(BigInt(a)), nonce: te(l), gasLimit: te(s), maxFeePerGas: b, maxPriorityFeePerGas: z }, j)
|
|
542
541
|
]
|
|
543
542
|
});
|
|
544
543
|
}
|
|
@@ -588,7 +587,7 @@ function de(i) {
|
|
|
588
587
|
)
|
|
589
588
|
], a = !0);
|
|
590
589
|
},
|
|
591
|
-
p:
|
|
590
|
+
p: E,
|
|
592
591
|
d(l) {
|
|
593
592
|
l && C(e), a = !1, he(f);
|
|
594
593
|
}
|
|
@@ -602,7 +601,7 @@ function ft(i) {
|
|
|
602
601
|
/*notification*/
|
|
603
602
|
i[0]
|
|
604
603
|
),
|
|
605
|
-
chainStyles:
|
|
604
|
+
chainStyles: U[B[
|
|
606
605
|
/*notification*/
|
|
607
606
|
i[0].network
|
|
608
607
|
]]
|
|
@@ -619,8 +618,8 @@ function ft(i) {
|
|
|
619
618
|
);
|
|
620
619
|
return {
|
|
621
620
|
c() {
|
|
622
|
-
e = h("div"), t = h("div"),
|
|
623
|
-
i[4].type + " pointer flex svelte-ftkynd"), m(t, "class", "flex bn-notify-notification-inner svelte-ftkynd"), m(c, "class", "dropdown svelte-ftkynd"),
|
|
621
|
+
e = h("div"), t = h("div"), H(n.$$.fragment), o = L(), H(a.$$.fragment), f = L(), l = h("div"), s = h("div"), r = L(), c = h("div"), p && p.c(), m(s, "class", "flex items-center close-icon svelte-ftkynd"), m(l, "class", "notify-close-btn notify-close-btn-" + /*device*/
|
|
622
|
+
i[4].type + " pointer flex svelte-ftkynd"), m(t, "class", "flex bn-notify-notification-inner svelte-ftkynd"), m(c, "class", "dropdown svelte-ftkynd"), A(
|
|
624
623
|
c,
|
|
625
624
|
"dropdown-visible",
|
|
626
625
|
/*hovered*/
|
|
@@ -636,7 +635,7 @@ function ft(i) {
|
|
|
636
635
|
i[7]
|
|
637
636
|
)
|
|
638
637
|
), m(e, "class", d = "bn-notify-notification bn-notify-notification-" + /*notification*/
|
|
639
|
-
i[0].type + "} svelte-ftkynd"),
|
|
638
|
+
i[0].type + "} svelte-ftkynd"), A(
|
|
640
639
|
e,
|
|
641
640
|
"bn-notify-clickable",
|
|
642
641
|
/*notification*/
|
|
@@ -644,7 +643,7 @@ function ft(i) {
|
|
|
644
643
|
);
|
|
645
644
|
},
|
|
646
645
|
m(b, z) {
|
|
647
|
-
_(b, e, z), g(e, t),
|
|
646
|
+
_(b, e, z), g(e, t), $(n, t, null), g(t, o), $(a, t, null), g(t, f), g(t, l), g(l, s), s.innerHTML = at, g(e, r), g(e, c), p && p.m(c, null), v = !0, u || (y = [
|
|
648
647
|
S(l, "click", be(
|
|
649
648
|
/*click_handler*/
|
|
650
649
|
i[9]
|
|
@@ -674,7 +673,7 @@ function ft(i) {
|
|
|
674
673
|
z & /*notification*/
|
|
675
674
|
1 && (j.notification = /*notification*/
|
|
676
675
|
b[0]), z & /*notification*/
|
|
677
|
-
1 && (j.chainStyles =
|
|
676
|
+
1 && (j.chainStyles = U[B[
|
|
678
677
|
/*notification*/
|
|
679
678
|
b[0].network
|
|
680
679
|
]]), n.$set(j);
|
|
@@ -683,7 +682,7 @@ function ft(i) {
|
|
|
683
682
|
1 && (k.notification = /*notification*/
|
|
684
683
|
b[0]), a.$set(k), /*notification*/
|
|
685
684
|
b[0].eventCode === "txPool" ? p ? p.p(b, z) : (p = de(b), p.c(), p.m(c, null)) : p && (p.d(1), p = null), (!v || z & /*hovered, gas, actionableEventCode, notification, validGasNetwork, walletSupportsReplacement, wallet*/
|
|
686
|
-
165) &&
|
|
685
|
+
165) && A(
|
|
687
686
|
c,
|
|
688
687
|
"dropdown-visible",
|
|
689
688
|
/*hovered*/
|
|
@@ -701,7 +700,7 @@ function ft(i) {
|
|
|
701
700
|
), (!v || z & /*notification*/
|
|
702
701
|
1 && d !== (d = "bn-notify-notification bn-notify-notification-" + /*notification*/
|
|
703
702
|
b[0].type + "} svelte-ftkynd")) && m(e, "class", d), (!v || z & /*notification, notification*/
|
|
704
|
-
1) &&
|
|
703
|
+
1) && A(
|
|
705
704
|
e,
|
|
706
705
|
"bn-notify-clickable",
|
|
707
706
|
/*notification*/
|
|
@@ -715,16 +714,16 @@ function ft(i) {
|
|
|
715
714
|
T(n.$$.fragment, b), T(a.$$.fragment, b), v = !1;
|
|
716
715
|
},
|
|
717
716
|
d(b) {
|
|
718
|
-
b && C(e),
|
|
717
|
+
b && C(e), F(n), F(a), p && p.d(), u = !1, he(y);
|
|
719
718
|
}
|
|
720
719
|
};
|
|
721
720
|
}
|
|
722
721
|
function dt(i, e, t) {
|
|
723
722
|
let n, o;
|
|
724
|
-
|
|
723
|
+
D(i, Me, (k) => t(15, n = k)), D(i, ge, (k) => t(3, o = k));
|
|
725
724
|
const { device: a, gas: f } = Z;
|
|
726
725
|
let { notification: l } = e, { updateParentOnRemove: s } = e, r, c = !1;
|
|
727
|
-
const d = Oe.getValue().find(({ hash: k }) => k === l.id), v = d && n.find(({ accounts: k }) => !!k.find(({ address:
|
|
726
|
+
const d = Oe.getValue().find(({ hash: k }) => k === l.id), v = d && n.find(({ accounts: k }) => !!k.find(({ address: P }) => P.toLowerCase() === d.from.toLowerCase()));
|
|
728
727
|
function u(k) {
|
|
729
728
|
l != null && l.onClick && l.onClick(k);
|
|
730
729
|
}
|
|
@@ -732,18 +731,18 @@ function dt(i, e, t) {
|
|
|
732
731
|
clearTimeout(r);
|
|
733
732
|
});
|
|
734
733
|
const y = () => {
|
|
735
|
-
|
|
734
|
+
X(l.id), J(l.id), s();
|
|
736
735
|
}, p = async () => {
|
|
737
736
|
try {
|
|
738
737
|
await fe({ type: "cancel", wallet: v, transaction: d });
|
|
739
738
|
} catch {
|
|
740
|
-
const
|
|
741
|
-
|
|
742
|
-
id:
|
|
739
|
+
const P = `${d.hash.slice(0, 9)}:txReplaceError${d.hash.slice(-5)}`;
|
|
740
|
+
Q({
|
|
741
|
+
id: P,
|
|
743
742
|
type: "hint",
|
|
744
743
|
eventCode: "txError",
|
|
745
744
|
message: o("notify.transaction.txReplaceError"),
|
|
746
|
-
key:
|
|
745
|
+
key: P,
|
|
747
746
|
autoDismiss: 4e3
|
|
748
747
|
});
|
|
749
748
|
}
|
|
@@ -751,13 +750,13 @@ function dt(i, e, t) {
|
|
|
751
750
|
try {
|
|
752
751
|
await fe({ type: "speedup", wallet: v, transaction: d });
|
|
753
752
|
} catch {
|
|
754
|
-
const
|
|
755
|
-
|
|
756
|
-
id:
|
|
753
|
+
const P = `${d.hash.slice(0, 9)}:txReplaceError${d.hash.slice(-5)}`;
|
|
754
|
+
Q({
|
|
755
|
+
id: P,
|
|
757
756
|
type: "hint",
|
|
758
757
|
eventCode: "txError",
|
|
759
758
|
message: o("notify.transaction.txReplaceError"),
|
|
760
|
-
key:
|
|
759
|
+
key: P,
|
|
761
760
|
autoDismiss: 4e3
|
|
762
761
|
});
|
|
763
762
|
}
|
|
@@ -768,7 +767,7 @@ function dt(i, e, t) {
|
|
|
768
767
|
i.$$.dirty & /*notification*/
|
|
769
768
|
1 && l.autoDismiss && (r = setTimeout(
|
|
770
769
|
() => {
|
|
771
|
-
|
|
770
|
+
X(l.id), J(l.id);
|
|
772
771
|
},
|
|
773
772
|
l.autoDismiss
|
|
774
773
|
));
|
|
@@ -789,7 +788,7 @@ function dt(i, e, t) {
|
|
|
789
788
|
j
|
|
790
789
|
];
|
|
791
790
|
}
|
|
792
|
-
class ut extends
|
|
791
|
+
class ut extends I {
|
|
793
792
|
constructor(e) {
|
|
794
793
|
super(), N(this, e, dt, ft, M, { notification: 0, updateParentOnRemove: 1 }, ct);
|
|
795
794
|
}
|
|
@@ -847,11 +846,11 @@ function ve(i) {
|
|
|
847
846
|
if (c & /*position, cubicOut, notifications, updateScrollYOnRemove*/
|
|
848
847
|
517) {
|
|
849
848
|
l = /*notifications*/
|
|
850
|
-
r[2],
|
|
849
|
+
r[2], G();
|
|
851
850
|
for (let d = 0; d < t.length; d += 1) t[d].r();
|
|
852
|
-
t = Ce(t, c, s, 1, r, l, n, e,
|
|
851
|
+
t = Ce(t, c, s, 1, r, l, n, e, Ee, pe, null, ue);
|
|
853
852
|
for (let d = 0; d < t.length; d += 1) t[d].a();
|
|
854
|
-
|
|
853
|
+
V();
|
|
855
854
|
}
|
|
856
855
|
(!f || c & /*position, overflowY*/
|
|
857
856
|
33 && o !== (o = "bn-notify-" + /*position*/
|
|
@@ -887,7 +886,7 @@ function ve(i) {
|
|
|
887
886
|
};
|
|
888
887
|
}
|
|
889
888
|
function pe(i, e) {
|
|
890
|
-
let t, n, o, a, f, l, s, r =
|
|
889
|
+
let t, n, o, a, f, l, s, r = E, c, d, v;
|
|
891
890
|
return n = new ut({
|
|
892
891
|
props: {
|
|
893
892
|
notification: (
|
|
@@ -903,12 +902,12 @@ function pe(i, e) {
|
|
|
903
902
|
key: i,
|
|
904
903
|
first: null,
|
|
905
904
|
c() {
|
|
906
|
-
t = h("li"),
|
|
905
|
+
t = h("li"), H(n.$$.fragment), o = L(), m(t, "class", a = W(`bn-notify-li-${/*position*/
|
|
907
906
|
e[0]} ${/*position*/
|
|
908
907
|
e[0].includes("top") ? "notification-list-top" : "notification-list-bottom"}`) + " svelte-1h8mmo3"), this.first = t;
|
|
909
908
|
},
|
|
910
909
|
m(u, y) {
|
|
911
|
-
_(u, t, y),
|
|
910
|
+
_(u, t, y), $(n, t, null), g(t, o), c = !0, d || (v = S(t, "click", be(
|
|
912
911
|
/*click_handler*/
|
|
913
912
|
e[10]
|
|
914
913
|
)), d = !0);
|
|
@@ -919,7 +918,7 @@ function pe(i, e) {
|
|
|
919
918
|
y & /*notifications*/
|
|
920
919
|
4 && (p.notification = /*notification*/
|
|
921
920
|
e[12]), n.$set(p), (!c || y & /*position*/
|
|
922
|
-
1 && a !== (a =
|
|
921
|
+
1 && a !== (a = W(`bn-notify-li-${/*position*/
|
|
923
922
|
e[0]} ${/*position*/
|
|
924
923
|
e[0].includes("top") ? "notification-list-top" : "notification-list-bottom"}`) + " svelte-1h8mmo3")) && m(t, "class", a);
|
|
925
924
|
},
|
|
@@ -930,11 +929,11 @@ function pe(i, e) {
|
|
|
930
929
|
ze(t), r(), Te(t, s);
|
|
931
930
|
},
|
|
932
931
|
a() {
|
|
933
|
-
r(), r = je(t, s,
|
|
932
|
+
r(), r = je(t, s, Fe, { duration: 500 });
|
|
934
933
|
},
|
|
935
934
|
i(u) {
|
|
936
|
-
c || (w(n.$$.fragment, u), u &&
|
|
937
|
-
c && (l && l.end(1), f =
|
|
935
|
+
c || (w(n.$$.fragment, u), u && Le(() => {
|
|
936
|
+
c && (l && l.end(1), f = xe(t, Pe, {
|
|
938
937
|
duration: 1200,
|
|
939
938
|
delay: 300,
|
|
940
939
|
x: (
|
|
@@ -950,10 +949,10 @@ function pe(i, e) {
|
|
|
950
949
|
}), c = !0);
|
|
951
950
|
},
|
|
952
951
|
o(u) {
|
|
953
|
-
T(n.$$.fragment, u), f && f.invalidate(), l = Se(t,
|
|
952
|
+
T(n.$$.fragment, u), f && f.invalidate(), l = Se(t, Ie, { duration: 300, easing: ye }), c = !1;
|
|
954
953
|
},
|
|
955
954
|
d(u) {
|
|
956
|
-
u && C(t),
|
|
955
|
+
u && C(t), F(n), u && l && l.end(), d = !1, v();
|
|
957
956
|
}
|
|
958
957
|
};
|
|
959
958
|
}
|
|
@@ -972,9 +971,9 @@ function pt(i) {
|
|
|
972
971
|
p(o, [a]) {
|
|
973
972
|
/*notifications*/
|
|
974
973
|
o[2].length ? n ? (n.p(o, a), a & /*notifications*/
|
|
975
|
-
4 && w(n, 1)) : (n = ve(o), n.c(), w(n, 1), n.m(e.parentNode, e)) : n && (
|
|
974
|
+
4 && w(n, 1)) : (n = ve(o), n.c(), w(n, 1), n.m(e.parentNode, e)) : n && (G(), T(n, 1, 1, () => {
|
|
976
975
|
n = null;
|
|
977
|
-
}),
|
|
976
|
+
}), V());
|
|
978
977
|
},
|
|
979
978
|
i(o) {
|
|
980
979
|
t || (w(n), t = !0);
|
|
@@ -993,7 +992,7 @@ function mt(i) {
|
|
|
993
992
|
function bt(i, e, t) {
|
|
994
993
|
let n;
|
|
995
994
|
const { device: o } = Z, a = Y.select("accountCenter").pipe(_e(Y.get().accountCenter), we(1));
|
|
996
|
-
|
|
995
|
+
D(i, a, (p) => t(6, n = p));
|
|
997
996
|
let { position: f } = e, { sharedContainer: l } = e, { notifications: s } = e, r, c;
|
|
998
997
|
r = 0, c = 0;
|
|
999
998
|
let d = "y-scroll";
|
|
@@ -1011,7 +1010,7 @@ function bt(i, e, t) {
|
|
|
1011
1010
|
};
|
|
1012
1011
|
}();
|
|
1013
1012
|
function y(p) {
|
|
1014
|
-
|
|
1013
|
+
Re.call(this, i, p);
|
|
1015
1014
|
}
|
|
1016
1015
|
return i.$$set = (p) => {
|
|
1017
1016
|
"position" in p && t(0, f = p.position), "sharedContainer" in p && t(1, l = p.sharedContainer), "notifications" in p && t(2, s = p.notifications);
|
|
@@ -1032,7 +1031,7 @@ function bt(i, e, t) {
|
|
|
1032
1031
|
y
|
|
1033
1032
|
];
|
|
1034
1033
|
}
|
|
1035
|
-
class ht extends
|
|
1034
|
+
class ht extends I {
|
|
1036
1035
|
constructor(e) {
|
|
1037
1036
|
super(), N(
|
|
1038
1037
|
this,
|