@springmicro/auth 0.1.9 → 0.2.0-alpha.1
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/Index-652aeb8c-BTQ1rBi7.js +2818 -0
- package/dist/Index-c419311f-BOZhAAW3.js +1054 -0
- package/dist/Web3Auth-hACKSouN.js +32769 -0
- package/dist/alphawallet-B7eovdf-.js +26 -0
- package/dist/apexwallet-ysP20G9D.js +93 -0
- package/dist/atoken-BBnNTzcz.js +27 -0
- package/dist/bifrostwallet-CNNBO92h.js +11 -0
- package/dist/binance-DvPgAzCw.js +14 -0
- package/dist/bitget-DZOUrwgy.js +4 -0
- package/dist/bitpie-C_uxmEzw.js +25 -0
- package/dist/bitski-DpzkHNkv.js +4 -0
- package/dist/blockwallet-BL69cqkA.js +8 -0
- package/dist/brave-DnRzMQYW.js +35 -0
- package/dist/ccip-c78d2f16-DLcRlwod.js +165 -0
- package/dist/coin98wallet-CkFdOvXt.js +4 -0
- package/dist/coinbase-CaGNx5if.js +9 -0
- package/dist/core-9rK8tWud.js +7 -0
- package/dist/defiwallet-0AsgJBSy.js +10 -0
- package/dist/detected-CX_JZaUk.js +6 -0
- package/dist/echooo-CmaetT_Z.js +14 -0
- package/dist/enkrypt-BibtwvK7.js +20 -0
- package/dist/exodus-BxzkDWWP.js +4 -0
- package/dist/fordefi-CvKyVwhI.js +6 -0
- package/dist/foxwallet-D7c_LDTf.js +4 -0
- package/dist/frame-CDfNmjUy.js +7 -0
- package/dist/frontier-DqKNSj2z.js +8 -0
- package/dist/huobiwallet-CxSwqa5L.js +14 -0
- package/dist/hyperpay-nmHE3WqM.js +7 -0
- package/dist/icon-2Zqy7pqQ.js +8 -0
- package/dist/icon-CGWI1Ies.js +43 -0
- package/dist/icon-C_O4nprO.js +9 -0
- package/dist/icon-DbgmZCnU.js +9 -0
- package/dist/icon-cAd7RhSC.js +9 -0
- package/dist/icon-duCa3gfT.js +11 -0
- package/dist/imtoken-yENtOTS3.js +17 -0
- package/dist/index-021f6a62-Zz543EDB.js +2583 -0
- package/dist/index-40a497ea-Bn2mC0r7.js +1010 -0
- package/dist/index-BHkXn9Ss.js +4010 -0
- package/dist/index-BaYEABY7.js +7089 -0
- package/dist/index-BtLU53lm.js +6023 -0
- package/dist/index-CynP9H3X.js +6188 -0
- package/dist/index-Dg8m-Szw.js +31 -0
- package/dist/index-Dt6M8ha9.js +161 -0
- package/dist/index-DtJfAdfq.js +5822 -0
- package/dist/index-klU8YB0c.js +1983 -0
- package/dist/index.d.ts +124 -0
- package/dist/index.js +5 -43
- package/dist/index.umd.cjs +1937 -1
- package/dist/infinitywallet-C8J4FUYw.js +42 -0
- package/dist/kayros-AIrUK1za.js +27 -0
- package/dist/lif3wallet-C5D6r8pg.js +41 -0
- package/dist/liquality-nbCtErVq.js +16 -0
- package/dist/mathwallet-CWkivCXo.js +50 -0
- package/dist/meetone-kKmvI8md.js +13 -0
- package/dist/metamask-BN7yiDV1.js +64 -0
- package/dist/mykey-CQZ6UcLH.js +13 -0
- package/dist/number-BXHWhlom.js +1529 -0
- package/dist/okxwallet-CJLVogh2.js +8 -0
- package/dist/oneInch-CciyZ4Pz.js +72 -0
- package/dist/onekey-Dal8kYjU.js +9 -0
- package/dist/opera-DnKg-TJU.js +24 -0
- package/dist/ownbit-BshJUVuW.js +18 -0
- package/dist/phantom-CJ8dIcov.js +35 -0
- package/dist/rabby-D4thTcd6.js +27 -0
- package/dist/rainbow-mXld6yWV.js +69 -0
- package/dist/roninwallet-ZyYrd-D1.js +9 -0
- package/dist/safeheron-Eg1Jb29V.js +23 -0
- package/dist/safepal-DVIKy94N.js +105 -0
- package/dist/sequence-BS2IbtDg.js +70 -0
- package/dist/stablewallet-jyB079Wb.js +20 -0
- package/dist/status-FrAvQjfn.js +4 -0
- package/dist/subwallet-DMvFqKyY.js +25 -0
- package/dist/talisman-Bp8zUXqB.js +16 -0
- package/dist/tallywallet-B4OS9nIr.js +16 -0
- package/dist/tokenary-C7jjcbQa.js +18 -0
- package/dist/tokenpocket-9ZRPmAFA.js +28 -0
- package/dist/tp-V2em5bdl.js +13 -0
- package/dist/transactionRequest-be6a8ea9-CUKWo5mx.js +1117 -0
- package/dist/trust-gPypS1O7.js +11 -0
- package/dist/xdefi-COVIyGz4.js +38 -0
- package/dist/zeal-DxHbDqm0.js +9 -0
- package/dist/zerion-BfW0UElc.js +8 -0
- package/dist/zodiacpilot-CrId6F4w.js +6 -0
- package/package.json +35 -15
- package/src/auth/config.ts +0 -2
- package/src/components/SignUp.tsx +442 -0
- package/src/components/forms/AgreementModal.tsx +88 -0
- package/src/components/forms/CaptchaController.tsx +94 -0
- package/src/components/forms/CaptchaModal.jsx +171 -0
- package/src/components/forms/CaptchaWidget.jsx +146 -0
- package/src/components/forms/PasswordChecker.ts +88 -0
- package/src/components/forms/SendCodeInput.tsx +149 -0
- package/src/components/forms/SignUpFormItem.tsx +704 -0
- package/src/components/forms/util/application-api.ts +155 -0
- package/src/components/forms/util/auth-api.ts +198 -0
- package/src/components/forms/util/auth-util.tsx +346 -0
- package/src/components/forms/util/core.ts +493 -0
- package/src/components/forms/util/invitation-api.ts +132 -0
- package/src/components/forms/util/provider.tsx +603 -0
- package/src/components/forms/util/user-api.ts +303 -0
- package/src/components/provider/AdfsLoginButton.jsx +38 -0
- package/src/components/provider/AlipayLoginButton.jsx +38 -0
- package/src/components/provider/AppleLoginButton.jsx +38 -0
- package/src/components/provider/AzureADB2CLoginButton.jsx +38 -0
- package/src/components/provider/AzureADLoginButton.jsx +38 -0
- package/src/components/provider/BaiduLoginButton.jsx +38 -0
- package/src/components/provider/BilibiliLoginButton.jsx +37 -0
- package/src/components/provider/CasdoorLoginButton.jsx +38 -0
- package/src/components/provider/DingTalkLoginButton.jsx +37 -0
- package/src/components/provider/DouyinLoginButton.jsx +38 -0
- package/src/components/provider/FacebookLoginButton.jsx +37 -0
- package/src/components/provider/GitHubLoginButton.jsx +37 -0
- package/src/components/provider/GitLabLoginButton.jsx +38 -0
- package/src/components/provider/GiteeLoginButton.jsx +34 -0
- package/src/components/provider/GoogleLoginButton.jsx +68 -0
- package/src/components/provider/InfoflowLoginButton.jsx +38 -0
- package/src/components/provider/LarkLoginButton.jsx +38 -0
- package/src/components/provider/LinkedInLoginButton.jsx +37 -0
- package/src/components/provider/LoginButton.jsx +33 -0
- package/src/components/provider/OktaLoginButton.jsx +38 -0
- package/src/components/provider/Provider.jsx +3 -0
- package/src/components/provider/ProviderButton.jsx +327 -0
- package/src/components/provider/QqLoginButton.jsx +31 -0
- package/src/components/provider/SelfLoginButton.jsx +47 -0
- package/src/components/provider/SlackLoginButton.jsx +38 -0
- package/src/components/provider/SteamLoginButton.jsx +38 -0
- package/src/components/provider/WeComLoginButton.jsx +34 -0
- package/src/components/provider/Web3Auth.jsx +365 -0
- package/src/components/provider/WechatLoginButton.jsx +37 -0
- package/src/components/provider/WeiboLoginButton.jsx +34 -0
- package/src/components/util.tsx +173 -0
- package/src/i18n/en/signup.json +48 -0
- package/src/i18n/index.ts +17 -0
- package/src/index.tsx +6 -1
- package/vite.config.ts +33 -25
|
@@ -0,0 +1,1054 @@
|
|
|
1
|
+
import { $ as R, a0 as N, a1 as M, a2 as O, ao as me, a6 as _, a9 as w, aa as A, ab as T, ac as G, ad as C, ae as Y, af as _e, ag as we, ah as $, a3 as h, a5 as m, aC as Ce, aj as F, a4 as L, b9 as B, ak as D, a7 as g, a8 as S, aA as be, bi as ze, bj as Te, bk as je, aF as xe, aW as Le, aI as Pe, aY as Se, al as H, aQ as Z, aT as Ee, bl as Ie, bm as ye, aX as Re, aB as Ne, bn as J, bo as W, ay as V, aJ as he, ap as Me, aq as ge, bp as Oe, ai as ke, bq as Q, br as U, an as I, bs as X, aw as E, aE as K, bt as ee, bu as $e, bv as te, bw as P, av as Fe, aZ as q, bx as De } from "./Web3Auth-hACKSouN.js";
|
|
2
|
+
function He(i, { from: e, to: t }, n = {}) {
|
|
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
|
+
return {
|
|
5
|
+
delay: c,
|
|
6
|
+
duration: Ne(d) ? d(Math.sqrt(s * s + r * r)) : d,
|
|
7
|
+
easing: v,
|
|
8
|
+
css: (u, y) => {
|
|
9
|
+
const p = y * s, b = y * r, z = u + y * e.width / t.width, j = u + y * e.height / t.height;
|
|
10
|
+
return `transform: ${a} translate(${p}px, ${b}px) scale(${z}, ${j});`;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function Ae(i) {
|
|
15
|
+
O(i, "svelte-13cuwwo", "div.svelte-13cuwwo{box-sizing:content-box}.border.svelte-13cuwwo{border:2px solid;border-radius:120px;overflow:hidden}");
|
|
16
|
+
}
|
|
17
|
+
function Ge(i) {
|
|
18
|
+
let e, t;
|
|
19
|
+
return {
|
|
20
|
+
c() {
|
|
21
|
+
e = h("div"), m(e, "class", "border svelte-13cuwwo"), m(e, "style", t = `
|
|
22
|
+
width: ${/*size*/
|
|
23
|
+
i[2] - /*padding*/
|
|
24
|
+
i[3] * 2}px;
|
|
25
|
+
height: ${/*size*/
|
|
26
|
+
i[2] - /*padding*/
|
|
27
|
+
i[3] * 2}px;
|
|
28
|
+
border-color: var(${/*borderColorVar*/
|
|
29
|
+
i[1]});
|
|
30
|
+
padding: ${/*padding*/
|
|
31
|
+
i[3]}px;
|
|
32
|
+
background-color: ${/*background*/
|
|
33
|
+
i[4]};
|
|
34
|
+
border-radius: 50%;
|
|
35
|
+
display: flex;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
`);
|
|
38
|
+
},
|
|
39
|
+
m(n, o) {
|
|
40
|
+
_(n, e, o), e.innerHTML = /*icon*/
|
|
41
|
+
i[0];
|
|
42
|
+
},
|
|
43
|
+
p(n, [o]) {
|
|
44
|
+
o & /*icon*/
|
|
45
|
+
1 && (e.innerHTML = /*icon*/
|
|
46
|
+
n[0]), o & /*size, padding, borderColorVar, background*/
|
|
47
|
+
30 && t !== (t = `
|
|
48
|
+
width: ${/*size*/
|
|
49
|
+
n[2] - /*padding*/
|
|
50
|
+
n[3] * 2}px;
|
|
51
|
+
height: ${/*size*/
|
|
52
|
+
n[2] - /*padding*/
|
|
53
|
+
n[3] * 2}px;
|
|
54
|
+
border-color: var(${/*borderColorVar*/
|
|
55
|
+
n[1]});
|
|
56
|
+
padding: ${/*padding*/
|
|
57
|
+
n[3]}px;
|
|
58
|
+
background-color: ${/*background*/
|
|
59
|
+
n[4]};
|
|
60
|
+
border-radius: 50%;
|
|
61
|
+
display: flex;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
`) && m(e, "style", t);
|
|
64
|
+
},
|
|
65
|
+
i: I,
|
|
66
|
+
o: I,
|
|
67
|
+
d(n) {
|
|
68
|
+
n && C(e);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function Ve(i, e, t) {
|
|
73
|
+
let { icon: n } = e, { borderColorVar: o } = e, { size: a } = e, { padding: f = 0 } = e, { background: l = "transparent" } = e;
|
|
74
|
+
return i.$$set = (s) => {
|
|
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
|
+
}, [n, o, a, f, l];
|
|
77
|
+
}
|
|
78
|
+
class Be extends R {
|
|
79
|
+
constructor(e) {
|
|
80
|
+
super(), N(
|
|
81
|
+
this,
|
|
82
|
+
e,
|
|
83
|
+
Ve,
|
|
84
|
+
Ge,
|
|
85
|
+
M,
|
|
86
|
+
{
|
|
87
|
+
icon: 0,
|
|
88
|
+
borderColorVar: 1,
|
|
89
|
+
size: 2,
|
|
90
|
+
padding: 3,
|
|
91
|
+
background: 4
|
|
92
|
+
},
|
|
93
|
+
Ae
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function We(i) {
|
|
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
|
+
}
|
|
100
|
+
function ne(i) {
|
|
101
|
+
let e, t, n, o, a = P[
|
|
102
|
+
/*notification*/
|
|
103
|
+
i[1].type
|
|
104
|
+
].eventIcon + "", f, l, s, r = !/*notification*/
|
|
105
|
+
i[1].id.includes("customNotification") && !/*notification*/
|
|
106
|
+
i[1].id.includes("preflight"), c, d = (
|
|
107
|
+
/*notification*/
|
|
108
|
+
i[1].type === "pending" && ie()
|
|
109
|
+
), v = r && oe(i);
|
|
110
|
+
return {
|
|
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 = B(`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:${P[
|
|
114
|
+
/*notification*/
|
|
115
|
+
i[1].type
|
|
116
|
+
].backgroundColor}; color: ${P[
|
|
117
|
+
/*notification*/
|
|
118
|
+
i[1].type
|
|
119
|
+
].iconColor || ""}; ${/*notification*/
|
|
120
|
+
i[1].type === "pending" ? "height: 28px; width: 28px; margin: 2px;" : `border: 2px solid ${P[
|
|
121
|
+
/*notification*/
|
|
122
|
+
i[1].type
|
|
123
|
+
].borderColor}`}; `), m(e, "class", "relative");
|
|
124
|
+
},
|
|
125
|
+
m(u, y) {
|
|
126
|
+
_(u, e, y), d && d.m(e, null), g(e, t), g(e, n), g(n, o), o.innerHTML = a, g(e, s), v && v.m(e, null), c = !0;
|
|
127
|
+
},
|
|
128
|
+
p(u, y) {
|
|
129
|
+
/*notification*/
|
|
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 = P[
|
|
132
|
+
/*notification*/
|
|
133
|
+
u[1].type
|
|
134
|
+
].eventIcon + "") && (o.innerHTML = a), (!c || y & /*notification*/
|
|
135
|
+
2 && f !== (f = B(`notification-icon flex items-center justify-center ${/*notification*/
|
|
136
|
+
u[1].type === "pending" ? "pending-icon" : ""}`) + " svelte-jvic9v")) && m(o, "class", f), (!c || y & /*notification*/
|
|
137
|
+
2 && l !== (l = `background:${P[
|
|
138
|
+
/*notification*/
|
|
139
|
+
u[1].type
|
|
140
|
+
].backgroundColor}; color: ${P[
|
|
141
|
+
/*notification*/
|
|
142
|
+
u[1].type
|
|
143
|
+
].iconColor || ""}; ${/*notification*/
|
|
144
|
+
u[1].type === "pending" ? "height: 28px; width: 28px; margin: 2px;" : `border: 2px solid ${P[
|
|
145
|
+
/*notification*/
|
|
146
|
+
u[1].type
|
|
147
|
+
].borderColor}`}; `)) && m(n, "style", l), y & /*notification*/
|
|
148
|
+
2 && (r = !/*notification*/
|
|
149
|
+
u[1].id.includes("customNotification") && !/*notification*/
|
|
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 && (A(), T(v, 1, 1, () => {
|
|
152
|
+
v = null;
|
|
153
|
+
}), G());
|
|
154
|
+
},
|
|
155
|
+
i(u) {
|
|
156
|
+
c || (w(v), c = !0);
|
|
157
|
+
},
|
|
158
|
+
o(u) {
|
|
159
|
+
T(v), c = !1;
|
|
160
|
+
},
|
|
161
|
+
d(u) {
|
|
162
|
+
u && C(e), d && d.d(), v && v.d();
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
function ie(i) {
|
|
167
|
+
let e;
|
|
168
|
+
return {
|
|
169
|
+
c() {
|
|
170
|
+
e = h("div"), m(e, "class", "border-action absolute svelte-jvic9v");
|
|
171
|
+
},
|
|
172
|
+
m(t, n) {
|
|
173
|
+
_(t, e, n);
|
|
174
|
+
},
|
|
175
|
+
d(t) {
|
|
176
|
+
t && C(e);
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
function oe(i) {
|
|
181
|
+
let e, t, n;
|
|
182
|
+
return t = new Be({
|
|
183
|
+
props: {
|
|
184
|
+
icon: (
|
|
185
|
+
/*chainStyles*/
|
|
186
|
+
i[0].icon
|
|
187
|
+
),
|
|
188
|
+
size: 16,
|
|
189
|
+
background: (
|
|
190
|
+
/*chainStyles*/
|
|
191
|
+
i[0].color
|
|
192
|
+
),
|
|
193
|
+
borderColorVar: "--notify-onboard-background, var(--onboard-gray-600, var(--gray-600))",
|
|
194
|
+
padding: 3
|
|
195
|
+
}
|
|
196
|
+
}), {
|
|
197
|
+
c() {
|
|
198
|
+
e = h("div"), F(t.$$.fragment), m(e, "class", "absolute chain-icon-container svelte-jvic9v");
|
|
199
|
+
},
|
|
200
|
+
m(o, a) {
|
|
201
|
+
_(o, e, a), D(t, e, null), n = !0;
|
|
202
|
+
},
|
|
203
|
+
p(o, a) {
|
|
204
|
+
const f = {};
|
|
205
|
+
a & /*chainStyles*/
|
|
206
|
+
1 && (f.icon = /*chainStyles*/
|
|
207
|
+
o[0].icon), a & /*chainStyles*/
|
|
208
|
+
1 && (f.background = /*chainStyles*/
|
|
209
|
+
o[0].color), t.$set(f);
|
|
210
|
+
},
|
|
211
|
+
i(o) {
|
|
212
|
+
n || (w(t.$$.fragment, o), n = !0);
|
|
213
|
+
},
|
|
214
|
+
o(o) {
|
|
215
|
+
T(t.$$.fragment, o), n = !1;
|
|
216
|
+
},
|
|
217
|
+
d(o) {
|
|
218
|
+
o && C(e), H(t);
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
function qe(i) {
|
|
223
|
+
let e, t, n = (
|
|
224
|
+
/*notification*/
|
|
225
|
+
i[1].type && ne(i)
|
|
226
|
+
);
|
|
227
|
+
return {
|
|
228
|
+
c() {
|
|
229
|
+
n && n.c(), e = me();
|
|
230
|
+
},
|
|
231
|
+
m(o, a) {
|
|
232
|
+
n && n.m(o, a), _(o, e, a), t = !0;
|
|
233
|
+
},
|
|
234
|
+
p(o, [a]) {
|
|
235
|
+
/*notification*/
|
|
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 && (A(), T(n, 1, 1, () => {
|
|
238
|
+
n = null;
|
|
239
|
+
}), G());
|
|
240
|
+
},
|
|
241
|
+
i(o) {
|
|
242
|
+
t || (w(n), t = !0);
|
|
243
|
+
},
|
|
244
|
+
o(o) {
|
|
245
|
+
T(n), t = !1;
|
|
246
|
+
},
|
|
247
|
+
d(o) {
|
|
248
|
+
n && n.d(o), o && C(e);
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
function Ke(i, e, t) {
|
|
253
|
+
let { chainStyles: n = Fe } = e, { notification: o } = e;
|
|
254
|
+
return i.$$set = (a) => {
|
|
255
|
+
"chainStyles" in a && t(0, n = a.chainStyles), "notification" in a && t(1, o = a.notification);
|
|
256
|
+
}, [n, o];
|
|
257
|
+
}
|
|
258
|
+
class Ye extends R {
|
|
259
|
+
constructor(e) {
|
|
260
|
+
super(), N(this, e, Ke, qe, M, { chainStyles: 0, notification: 1 }, We);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
function Ze(i) {
|
|
264
|
+
O(i, "svelte-pm7idu", `div.svelte-pm7idu{display:flex;justify-content:center;font-size:inherit;font-family:inherit;margin:0 1.5rem 0 0.75rem}span.svelte-pm7idu{font-family:inherit;display:flex;align-items:center;margin:0 2px}.time.svelte-pm7idu{color:var(
|
|
265
|
+
--notify-onboard-timer-color,
|
|
266
|
+
var(--onboard-gray-300, var(--gray-300))
|
|
267
|
+
);margin-left:4px}`);
|
|
268
|
+
}
|
|
269
|
+
function ae(i) {
|
|
270
|
+
let e, t, n = (
|
|
271
|
+
/*timeString*/
|
|
272
|
+
i[2](
|
|
273
|
+
/*currentTime*/
|
|
274
|
+
i[1] - /*startTime*/
|
|
275
|
+
i[0]
|
|
276
|
+
) + ""
|
|
277
|
+
), o, a;
|
|
278
|
+
return {
|
|
279
|
+
c() {
|
|
280
|
+
e = E(`-
|
|
281
|
+
`), t = h("span"), o = E(n), a = E(`
|
|
282
|
+
ago`), m(t, "class", "svelte-pm7idu");
|
|
283
|
+
},
|
|
284
|
+
m(f, l) {
|
|
285
|
+
_(f, e, l), _(f, t, l), g(t, o), _(f, a, l);
|
|
286
|
+
},
|
|
287
|
+
p(f, l) {
|
|
288
|
+
l & /*currentTime, startTime*/
|
|
289
|
+
3 && n !== (n = /*timeString*/
|
|
290
|
+
f[2](
|
|
291
|
+
/*currentTime*/
|
|
292
|
+
f[1] - /*startTime*/
|
|
293
|
+
f[0]
|
|
294
|
+
) + "") && K(o, n);
|
|
295
|
+
},
|
|
296
|
+
d(f) {
|
|
297
|
+
f && C(e), f && C(t), f && C(a);
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
function Je(i) {
|
|
302
|
+
let e, t = (
|
|
303
|
+
/*startTime*/
|
|
304
|
+
i[0] && ae(i)
|
|
305
|
+
);
|
|
306
|
+
return {
|
|
307
|
+
c() {
|
|
308
|
+
e = h("div"), t && t.c(), m(e, "class", "time svelte-pm7idu");
|
|
309
|
+
},
|
|
310
|
+
m(n, o) {
|
|
311
|
+
_(n, e, o), t && t.m(e, null);
|
|
312
|
+
},
|
|
313
|
+
p(n, [o]) {
|
|
314
|
+
/*startTime*/
|
|
315
|
+
n[0] ? t ? t.p(n, o) : (t = ae(n), t.c(), t.m(e, null)) : t && (t.d(1), t = null);
|
|
316
|
+
},
|
|
317
|
+
i: I,
|
|
318
|
+
o: I,
|
|
319
|
+
d(n) {
|
|
320
|
+
n && C(e), t && t.d();
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
function Qe(i, e, t) {
|
|
325
|
+
let n, o;
|
|
326
|
+
$(i, ge, (r) => t(3, n = r)), $(i, De, (r) => t(4, o = r));
|
|
327
|
+
let { startTime: a } = e;
|
|
328
|
+
function f(r) {
|
|
329
|
+
const c = Math.floor(r / 1e3), d = c < 0 ? 0 : c;
|
|
330
|
+
return d >= 60 ? `${Math.floor(d / 60).toLocaleString(o)} ${n("notify.time.minutes")}` : `${d.toLocaleString(o)} ${n("notify.time.seconds")}`;
|
|
331
|
+
}
|
|
332
|
+
let l = Date.now();
|
|
333
|
+
const s = setInterval(
|
|
334
|
+
() => {
|
|
335
|
+
t(1, l = Date.now());
|
|
336
|
+
},
|
|
337
|
+
1e3
|
|
338
|
+
);
|
|
339
|
+
return ke(() => {
|
|
340
|
+
clearInterval(s);
|
|
341
|
+
}), i.$$set = (r) => {
|
|
342
|
+
"startTime" in r && t(0, a = r.startTime);
|
|
343
|
+
}, [a, l, f];
|
|
344
|
+
}
|
|
345
|
+
class Ue extends R {
|
|
346
|
+
constructor(e) {
|
|
347
|
+
super(), N(this, e, Qe, Je, M, { startTime: 0 }, Ze);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
function Xe(i) {
|
|
351
|
+
O(i, "svelte-1otz6tt", `div.notify-transaction-data.svelte-1otz6tt{font-size:var(
|
|
352
|
+
--notify-onboard-transaction-font-size,
|
|
353
|
+
var(--onboard-font-size-6, var(--font-size-6))
|
|
354
|
+
);font-family:inherit;margin:0px 20px 0px 8px;justify-content:center}.hash-time.svelte-1otz6tt{display:inline-flex;margin-top:4px;font-size:var(
|
|
355
|
+
--notify-onboard-hash-time-font-size,
|
|
356
|
+
var(--onboard-font-size-7, var(--font-size-7))
|
|
357
|
+
);line-height:var(
|
|
358
|
+
--notify-onboard-hash-time-font-line-height,
|
|
359
|
+
var(--onboard-font-line-height-4, var(--font-line-height-4))
|
|
360
|
+
)}.address-hash.svelte-1otz6tt{color:var(
|
|
361
|
+
--notify-onboard-address-hash-color,
|
|
362
|
+
var(--onboard-primary-200, var(--primary-200))
|
|
363
|
+
)}a.address-hash.svelte-1otz6tt{color:var(
|
|
364
|
+
--notify-onboard-anchor-color,
|
|
365
|
+
var(--onboard-primary-400, var(--primary-400))
|
|
366
|
+
)}a.svelte-1otz6tt{display:flex;text-decoration:none;color:inherit}.transaction-status.svelte-1otz6tt{color:var(--notify-onboard-transaction-status, inherit);line-height:var(
|
|
367
|
+
--notify-onboard-font-size-5,
|
|
368
|
+
var(--onboard-font-size-5, var(--font-size-5))
|
|
369
|
+
);font-weight:400;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}`);
|
|
370
|
+
}
|
|
371
|
+
function re(i) {
|
|
372
|
+
let e, t, n, o;
|
|
373
|
+
function a(s, r) {
|
|
374
|
+
return (
|
|
375
|
+
/*notification*/
|
|
376
|
+
s[0].link ? tt : et
|
|
377
|
+
);
|
|
378
|
+
}
|
|
379
|
+
let f = a(i), l = f(i);
|
|
380
|
+
return n = new Ue({
|
|
381
|
+
props: {
|
|
382
|
+
startTime: (
|
|
383
|
+
/*notification*/
|
|
384
|
+
i[0].startTime
|
|
385
|
+
)
|
|
386
|
+
}
|
|
387
|
+
}), {
|
|
388
|
+
c() {
|
|
389
|
+
e = h("span"), l.c(), t = L(), F(n.$$.fragment), m(e, "class", "hash-time svelte-1otz6tt");
|
|
390
|
+
},
|
|
391
|
+
m(s, r) {
|
|
392
|
+
_(s, e, r), l.m(e, null), g(e, t), D(n, e, null), o = !0;
|
|
393
|
+
},
|
|
394
|
+
p(s, r) {
|
|
395
|
+
f === (f = a(s)) && l ? l.p(s, r) : (l.d(1), l = f(s), l && (l.c(), l.m(e, t)));
|
|
396
|
+
const c = {};
|
|
397
|
+
r & /*notification*/
|
|
398
|
+
1 && (c.startTime = /*notification*/
|
|
399
|
+
s[0].startTime), n.$set(c);
|
|
400
|
+
},
|
|
401
|
+
i(s) {
|
|
402
|
+
o || (w(n.$$.fragment, s), o = !0);
|
|
403
|
+
},
|
|
404
|
+
o(s) {
|
|
405
|
+
T(n.$$.fragment, s), o = !1;
|
|
406
|
+
},
|
|
407
|
+
d(s) {
|
|
408
|
+
s && C(e), l.d(), H(n);
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
function et(i) {
|
|
413
|
+
let e, t = q(
|
|
414
|
+
/*notification*/
|
|
415
|
+
i[0].id
|
|
416
|
+
) + "", n;
|
|
417
|
+
return {
|
|
418
|
+
c() {
|
|
419
|
+
e = h("div"), n = E(t), m(e, "class", "address-hash svelte-1otz6tt");
|
|
420
|
+
},
|
|
421
|
+
m(o, a) {
|
|
422
|
+
_(o, e, a), g(e, n);
|
|
423
|
+
},
|
|
424
|
+
p(o, a) {
|
|
425
|
+
a & /*notification*/
|
|
426
|
+
1 && t !== (t = q(
|
|
427
|
+
/*notification*/
|
|
428
|
+
o[0].id
|
|
429
|
+
) + "") && K(n, t);
|
|
430
|
+
},
|
|
431
|
+
d(o) {
|
|
432
|
+
o && C(e);
|
|
433
|
+
}
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
function tt(i) {
|
|
437
|
+
let e, t = q(
|
|
438
|
+
/*notification*/
|
|
439
|
+
i[0].id
|
|
440
|
+
) + "", n, o;
|
|
441
|
+
return {
|
|
442
|
+
c() {
|
|
443
|
+
e = h("a"), n = E(t), m(e, "class", "address-hash svelte-1otz6tt"), m(e, "href", o = /*notification*/
|
|
444
|
+
i[0].link), m(e, "target", "_blank"), m(e, "rel", "noreferrer noopener");
|
|
445
|
+
},
|
|
446
|
+
m(a, f) {
|
|
447
|
+
_(a, e, f), g(e, n);
|
|
448
|
+
},
|
|
449
|
+
p(a, f) {
|
|
450
|
+
f & /*notification*/
|
|
451
|
+
1 && t !== (t = q(
|
|
452
|
+
/*notification*/
|
|
453
|
+
a[0].id
|
|
454
|
+
) + "") && K(n, t), f & /*notification*/
|
|
455
|
+
1 && o !== (o = /*notification*/
|
|
456
|
+
a[0].link) && m(e, "href", o);
|
|
457
|
+
},
|
|
458
|
+
d(a) {
|
|
459
|
+
a && C(e);
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
function nt(i) {
|
|
464
|
+
let e, t, n = (
|
|
465
|
+
/*notification*/
|
|
466
|
+
i[0].message + ""
|
|
467
|
+
), o, a, f = (
|
|
468
|
+
/*notification*/
|
|
469
|
+
i[0].id && !/*notification*/
|
|
470
|
+
i[0].id.includes("customNotification") && !/*notification*/
|
|
471
|
+
i[0].id.includes("preflight")
|
|
472
|
+
), l, s = f && re(i);
|
|
473
|
+
return {
|
|
474
|
+
c() {
|
|
475
|
+
e = h("div"), t = h("span"), o = E(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
|
+
},
|
|
477
|
+
m(r, c) {
|
|
478
|
+
_(r, e, c), g(e, t), g(t, o), g(e, a), s && s.m(e, null), l = !0;
|
|
479
|
+
},
|
|
480
|
+
p(r, [c]) {
|
|
481
|
+
(!l || c & /*notification*/
|
|
482
|
+
1) && n !== (n = /*notification*/
|
|
483
|
+
r[0].message + "") && K(o, n), c & /*notification*/
|
|
484
|
+
1 && (f = /*notification*/
|
|
485
|
+
r[0].id && !/*notification*/
|
|
486
|
+
r[0].id.includes("customNotification") && !/*notification*/
|
|
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 && (A(), T(s, 1, 1, () => {
|
|
489
|
+
s = null;
|
|
490
|
+
}), G());
|
|
491
|
+
},
|
|
492
|
+
i(r) {
|
|
493
|
+
l || (w(s), l = !0);
|
|
494
|
+
},
|
|
495
|
+
o(r) {
|
|
496
|
+
T(s), l = !1;
|
|
497
|
+
},
|
|
498
|
+
d(r) {
|
|
499
|
+
r && C(e), s && s.d();
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
function it(i, e, t) {
|
|
504
|
+
let { notification: n } = e;
|
|
505
|
+
return i.$$set = (o) => {
|
|
506
|
+
"notification" in o && t(0, n = o.notification);
|
|
507
|
+
}, [n];
|
|
508
|
+
}
|
|
509
|
+
class ot extends R {
|
|
510
|
+
constructor(e) {
|
|
511
|
+
super(), N(this, e, it, nt, M, { notification: 0 }, Xe);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
var at = `
|
|
515
|
+
<svg width="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
516
|
+
<path d="M10 0C4.47 0 0 4.47 0 10C0 15.53 4.47 20 10 20C15.53 20 20 15.53 20 10C20 4.47 15.53 0 10 0ZM15 13.59L13.59 15L10 11.41L6.41 15L5 13.59L8.59 10L5 6.41L6.41 5L10 8.59L13.59 5L15 6.41L11.41 10L15 13.59Z" fill="currentColor"/>
|
|
517
|
+
</svg>
|
|
518
|
+
`;
|
|
519
|
+
const rt = ["txPool"], lt = ["main", "matic-main"], st = [
|
|
520
|
+
"Ledger",
|
|
521
|
+
"Trezor",
|
|
522
|
+
"Keystone",
|
|
523
|
+
"KeepKey",
|
|
524
|
+
"D'CENT"
|
|
525
|
+
], le = (i) => rt.includes(i), se = (i) => lt.includes(i), ce = (i) => i && st.includes(i.label);
|
|
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 = W[r], { gasPriceProbability: d } = Y.get().notify.replacement, { gas: v, apiKey: u } = Z;
|
|
528
|
+
if (!v)
|
|
529
|
+
return;
|
|
530
|
+
const [y] = await v.get({
|
|
531
|
+
chains: [W[r]],
|
|
532
|
+
endpoint: "blockPrices",
|
|
533
|
+
apiKey: u
|
|
534
|
+
}), { maxFeePerGas: p, maxPriorityFeePerGas: b } = y.blockPrices[0].estimatedPrices.find(({ confidence: x }) => x === (i === "speedup" ? d == null ? void 0 : d.speedup : d == null ? void 0 : d.cancel)) || {};
|
|
535
|
+
if (!p || !b)
|
|
536
|
+
return;
|
|
537
|
+
const z = ee(p), j = ee(b), k = o === "0x" ? {} : { data: o };
|
|
538
|
+
return e.provider.request({
|
|
539
|
+
method: "eth_sendTransaction",
|
|
540
|
+
params: [
|
|
541
|
+
Object.assign({ type: "0x2", from: n, to: i === "cancel" ? n : f, chainId: parseInt(c), value: $e(BigInt(a)), nonce: te(l), gasLimit: te(s), maxFeePerGas: z, maxPriorityFeePerGas: j }, k)
|
|
542
|
+
]
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
function ct(i) {
|
|
546
|
+
O(i, "svelte-ftkynd", `.bn-notify-notification.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{--backround-color:var(--notify-onboard-background, var(--w3o-backround-color, var(--gray-700)));--foreground-color:var(--w3o-foreground-color, var(--gray-600));--text-color:var(--w3o-text-color, #FFF);--border-color:var(--w3o-border-color);font-family:inherit;transition:background 300ms ease-in-out, color 300ms ease-in-out;pointer-events:all;backdrop-filter:blur(5px);width:100%;min-height:56px;display:flex;flex-direction:column;position:relative;overflow:hidden;border:1px solid transparent;border-radius:var(
|
|
547
|
+
--notify-onboard-border-radius,
|
|
548
|
+
var(--onboard-border-radius-4, var(--border-radius-4))
|
|
549
|
+
);background:var(--foreground-color);color:var(--text-color)}.bn-notify-notification-inner.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{padding:0.75rem}.bn-notify-notification.svelte-ftkynd:hover>div.bn-notify-notification-inner.svelte-ftkynd>div.notify-close-btn-desktop.svelte-ftkynd{visibility:visible;opacity:1}div.notify-close-btn.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{margin-left:auto;margin-bottom:auto;height:24px;width:24px;position:absolute;top:8px;right:8px;justify-content:center;align-items:center}div.notify-close-btn-desktop.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{visibility:hidden;transition:visibility 0.15s linear, opacity 0.15s linear;opacity:0}.notify-close-btn.svelte-ftkynd .close-icon.svelte-ftkynd.svelte-ftkynd{width:20px;margin:auto;color:var(--text-color)}.notify-close-btn.svelte-ftkynd>.close-icon.svelte-ftkynd.svelte-ftkynd{color:var(--notify-onboard-close-icon-color)}.notify-close-btn.svelte-ftkynd:hover>.close-icon.svelte-ftkynd.svelte-ftkynd{color:var(--notify-onboard-close-icon-hover)}.transaction-status.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{color:var(
|
|
550
|
+
--notify-onboard-transaction-status-color,
|
|
551
|
+
var(--onboard-primary-100, var(--primary-100))
|
|
552
|
+
);line-height:14px}.dropdown.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{height:0px;overflow:hidden;transition:height 150ms ease-in-out}.dropdown-visible.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{height:48px}.dropdown-buttons.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{background-color:var(
|
|
553
|
+
--notify-onboard-dropdown-background,
|
|
554
|
+
var(--onboard-gray-700, var(--gray-700))
|
|
555
|
+
);width:100%;padding:8px}.dropdown-button.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{padding:4px 12px;border-radius:var(
|
|
556
|
+
--notify-onboard-dropdown-border-radius,
|
|
557
|
+
var(--onboard-border-radius-5, var(--border-radius-5))
|
|
558
|
+
);background-color:transparent;font-size:var(
|
|
559
|
+
--notify-onboard-dropdown-font-size,
|
|
560
|
+
var(--onboard-font-size-6, var(--font-size-6))
|
|
561
|
+
);color:var(
|
|
562
|
+
--notify-onboard-dropdown-text-color,
|
|
563
|
+
var(--onboard-primary-400, var(--primary-400))
|
|
564
|
+
);transition:all 150ms ease-in-out;cursor:pointer}.dropdown-button.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd:hover{background:var(
|
|
565
|
+
--notify-onboard-dropdown-btn-hover-background,
|
|
566
|
+
rgba(146, 155, 237, 0.2)
|
|
567
|
+
)}`);
|
|
568
|
+
}
|
|
569
|
+
function de(i) {
|
|
570
|
+
let e, t, n, o, a, f;
|
|
571
|
+
return {
|
|
572
|
+
c() {
|
|
573
|
+
e = h("div"), t = h("button"), t.textContent = "Cancel", n = L(), o = h("button"), o.textContent = "Speed-up", m(t, "class", "dropdown-button svelte-ftkynd"), m(o, "class", "dropdown-button svelte-ftkynd"), m(e, "class", "dropdown-buttons flex items-center justify-end svelte-ftkynd");
|
|
574
|
+
},
|
|
575
|
+
m(l, s) {
|
|
576
|
+
_(l, e, s), g(e, t), g(e, n), g(e, o), a || (f = [
|
|
577
|
+
S(
|
|
578
|
+
t,
|
|
579
|
+
"click",
|
|
580
|
+
/*click_handler_1*/
|
|
581
|
+
i[10]
|
|
582
|
+
),
|
|
583
|
+
S(
|
|
584
|
+
o,
|
|
585
|
+
"click",
|
|
586
|
+
/*click_handler_2*/
|
|
587
|
+
i[11]
|
|
588
|
+
)
|
|
589
|
+
], a = !0);
|
|
590
|
+
},
|
|
591
|
+
p: I,
|
|
592
|
+
d(l) {
|
|
593
|
+
l && C(e), a = !1, he(f);
|
|
594
|
+
}
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
function ft(i) {
|
|
598
|
+
let e, t, n, o, a, f, l, s, r, c, d, v, u, y;
|
|
599
|
+
n = new Ye({
|
|
600
|
+
props: {
|
|
601
|
+
notification: (
|
|
602
|
+
/*notification*/
|
|
603
|
+
i[0]
|
|
604
|
+
),
|
|
605
|
+
chainStyles: J[W[
|
|
606
|
+
/*notification*/
|
|
607
|
+
i[0].network
|
|
608
|
+
]]
|
|
609
|
+
}
|
|
610
|
+
}), a = new ot({
|
|
611
|
+
props: { notification: (
|
|
612
|
+
/*notification*/
|
|
613
|
+
i[0]
|
|
614
|
+
) }
|
|
615
|
+
});
|
|
616
|
+
let p = (
|
|
617
|
+
/*notification*/
|
|
618
|
+
i[0].eventCode === "txPool" && de(i)
|
|
619
|
+
);
|
|
620
|
+
return {
|
|
621
|
+
c() {
|
|
622
|
+
e = h("div"), t = h("div"), F(n.$$.fragment), o = L(), F(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*/
|
|
623
|
+
i[4].type + " pointer flex svelte-ftkynd"), m(t, "class", "flex bn-notify-notification-inner svelte-ftkynd"), m(c, "class", "dropdown svelte-ftkynd"), V(
|
|
624
|
+
c,
|
|
625
|
+
"dropdown-visible",
|
|
626
|
+
/*hovered*/
|
|
627
|
+
i[2] && /*gas*/
|
|
628
|
+
i[5] && le(
|
|
629
|
+
/*notification*/
|
|
630
|
+
i[0].eventCode
|
|
631
|
+
) && se(
|
|
632
|
+
/*notification*/
|
|
633
|
+
i[0].network
|
|
634
|
+
) && ce(
|
|
635
|
+
/*wallet*/
|
|
636
|
+
i[7]
|
|
637
|
+
)
|
|
638
|
+
), m(e, "class", d = "bn-notify-notification bn-notify-notification-" + /*notification*/
|
|
639
|
+
i[0].type + "} svelte-ftkynd"), V(
|
|
640
|
+
e,
|
|
641
|
+
"bn-notify-clickable",
|
|
642
|
+
/*notification*/
|
|
643
|
+
i[0].onClick
|
|
644
|
+
);
|
|
645
|
+
},
|
|
646
|
+
m(b, z) {
|
|
647
|
+
_(b, e, z), g(e, t), D(n, t, null), g(t, o), D(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
|
+
S(l, "click", be(
|
|
649
|
+
/*click_handler*/
|
|
650
|
+
i[9]
|
|
651
|
+
)),
|
|
652
|
+
S(
|
|
653
|
+
e,
|
|
654
|
+
"mouseenter",
|
|
655
|
+
/*mouseenter_handler*/
|
|
656
|
+
i[12]
|
|
657
|
+
),
|
|
658
|
+
S(
|
|
659
|
+
e,
|
|
660
|
+
"mouseleave",
|
|
661
|
+
/*mouseleave_handler*/
|
|
662
|
+
i[13]
|
|
663
|
+
),
|
|
664
|
+
S(
|
|
665
|
+
e,
|
|
666
|
+
"click",
|
|
667
|
+
/*handleClick*/
|
|
668
|
+
i[8]
|
|
669
|
+
)
|
|
670
|
+
], u = !0);
|
|
671
|
+
},
|
|
672
|
+
p(b, [z]) {
|
|
673
|
+
const j = {};
|
|
674
|
+
z & /*notification*/
|
|
675
|
+
1 && (j.notification = /*notification*/
|
|
676
|
+
b[0]), z & /*notification*/
|
|
677
|
+
1 && (j.chainStyles = J[W[
|
|
678
|
+
/*notification*/
|
|
679
|
+
b[0].network
|
|
680
|
+
]]), n.$set(j);
|
|
681
|
+
const k = {};
|
|
682
|
+
z & /*notification*/
|
|
683
|
+
1 && (k.notification = /*notification*/
|
|
684
|
+
b[0]), a.$set(k), /*notification*/
|
|
685
|
+
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) && V(
|
|
687
|
+
c,
|
|
688
|
+
"dropdown-visible",
|
|
689
|
+
/*hovered*/
|
|
690
|
+
b[2] && /*gas*/
|
|
691
|
+
b[5] && le(
|
|
692
|
+
/*notification*/
|
|
693
|
+
b[0].eventCode
|
|
694
|
+
) && se(
|
|
695
|
+
/*notification*/
|
|
696
|
+
b[0].network
|
|
697
|
+
) && ce(
|
|
698
|
+
/*wallet*/
|
|
699
|
+
b[7]
|
|
700
|
+
)
|
|
701
|
+
), (!v || z & /*notification*/
|
|
702
|
+
1 && d !== (d = "bn-notify-notification bn-notify-notification-" + /*notification*/
|
|
703
|
+
b[0].type + "} svelte-ftkynd")) && m(e, "class", d), (!v || z & /*notification, notification*/
|
|
704
|
+
1) && V(
|
|
705
|
+
e,
|
|
706
|
+
"bn-notify-clickable",
|
|
707
|
+
/*notification*/
|
|
708
|
+
b[0].onClick
|
|
709
|
+
);
|
|
710
|
+
},
|
|
711
|
+
i(b) {
|
|
712
|
+
v || (w(n.$$.fragment, b), w(a.$$.fragment, b), v = !0);
|
|
713
|
+
},
|
|
714
|
+
o(b) {
|
|
715
|
+
T(n.$$.fragment, b), T(a.$$.fragment, b), v = !1;
|
|
716
|
+
},
|
|
717
|
+
d(b) {
|
|
718
|
+
b && C(e), H(n), H(a), p && p.d(), u = !1, he(y);
|
|
719
|
+
}
|
|
720
|
+
};
|
|
721
|
+
}
|
|
722
|
+
function dt(i, e, t) {
|
|
723
|
+
let n, o;
|
|
724
|
+
$(i, Me, (k) => t(15, n = k)), $(i, ge, (k) => t(3, o = k));
|
|
725
|
+
const { device: a, gas: f } = Z;
|
|
726
|
+
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: x }) => x.toLowerCase() === d.from.toLowerCase()));
|
|
728
|
+
function u(k) {
|
|
729
|
+
l != null && l.onClick && l.onClick(k);
|
|
730
|
+
}
|
|
731
|
+
ke(() => {
|
|
732
|
+
clearTimeout(r);
|
|
733
|
+
});
|
|
734
|
+
const y = () => {
|
|
735
|
+
Q(l.id), U(l.id), s();
|
|
736
|
+
}, p = async () => {
|
|
737
|
+
try {
|
|
738
|
+
await fe({ type: "cancel", wallet: v, transaction: d });
|
|
739
|
+
} catch {
|
|
740
|
+
const x = `${d.hash.slice(0, 9)}:txReplaceError${d.hash.slice(-5)}`;
|
|
741
|
+
X({
|
|
742
|
+
id: x,
|
|
743
|
+
type: "hint",
|
|
744
|
+
eventCode: "txError",
|
|
745
|
+
message: o("notify.transaction.txReplaceError"),
|
|
746
|
+
key: x,
|
|
747
|
+
autoDismiss: 4e3
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
}, b = async () => {
|
|
751
|
+
try {
|
|
752
|
+
await fe({ type: "speedup", wallet: v, transaction: d });
|
|
753
|
+
} catch {
|
|
754
|
+
const x = `${d.hash.slice(0, 9)}:txReplaceError${d.hash.slice(-5)}`;
|
|
755
|
+
X({
|
|
756
|
+
id: x,
|
|
757
|
+
type: "hint",
|
|
758
|
+
eventCode: "txError",
|
|
759
|
+
message: o("notify.transaction.txReplaceError"),
|
|
760
|
+
key: x,
|
|
761
|
+
autoDismiss: 4e3
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
}, z = () => t(2, c = !0), j = () => t(2, c = !1);
|
|
765
|
+
return i.$$set = (k) => {
|
|
766
|
+
"notification" in k && t(0, l = k.notification), "updateParentOnRemove" in k && t(1, s = k.updateParentOnRemove);
|
|
767
|
+
}, i.$$.update = () => {
|
|
768
|
+
i.$$.dirty & /*notification*/
|
|
769
|
+
1 && l.autoDismiss && (r = setTimeout(
|
|
770
|
+
() => {
|
|
771
|
+
Q(l.id), U(l.id);
|
|
772
|
+
},
|
|
773
|
+
l.autoDismiss
|
|
774
|
+
));
|
|
775
|
+
}, [
|
|
776
|
+
l,
|
|
777
|
+
s,
|
|
778
|
+
c,
|
|
779
|
+
o,
|
|
780
|
+
a,
|
|
781
|
+
f,
|
|
782
|
+
d,
|
|
783
|
+
v,
|
|
784
|
+
u,
|
|
785
|
+
y,
|
|
786
|
+
p,
|
|
787
|
+
b,
|
|
788
|
+
z,
|
|
789
|
+
j
|
|
790
|
+
];
|
|
791
|
+
}
|
|
792
|
+
class ut extends R {
|
|
793
|
+
constructor(e) {
|
|
794
|
+
super(), N(this, e, dt, ft, M, { notification: 0, updateParentOnRemove: 1 }, ct);
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
function vt(i) {
|
|
798
|
+
O(i, "svelte-1h8mmo3", `ul.svelte-1h8mmo3{padding-left:0;display:flex;flex-flow:column nowrap;font-size:var(
|
|
799
|
+
--notify-onboard-font-size,
|
|
800
|
+
var(--onboard-font-size-5, var(--font-size-5))
|
|
801
|
+
);list-style-type:none;overflow:visible;scrollbar-width:none;box-sizing:border-box;z-index:var(--notify-onboard-z-index, 300);font-family:var(
|
|
802
|
+
--notify-onboard-font-family,
|
|
803
|
+
var(--onboard-font-family-normal, inherit)
|
|
804
|
+
);margin:8px 0;pointer-events:all}.y-scroll.svelte-1h8mmo3{overflow-y:scroll}.y-visible.svelte-1h8mmo3{overflow-y:visible}li.notification-list-top.svelte-1h8mmo3:not(:first-child){margin-top:8px}li.notification-list-bottom.svelte-1h8mmo3:not(:first-child){margin-bottom:8px}ul.bn-notify-bottomLeft.svelte-1h8mmo3,ul.bn-notify-bottomRight.svelte-1h8mmo3{flex-direction:column-reverse}@media only screen and (max-width: 450px){ul.svelte-1h8mmo3{width:100%}}.bn-notify-clickable:hover{cursor:pointer}.svelte-1h8mmo3::-webkit-scrollbar{display:none}`);
|
|
805
|
+
}
|
|
806
|
+
function ue(i, e, t) {
|
|
807
|
+
const n = i.slice();
|
|
808
|
+
return n[12] = e[t], n;
|
|
809
|
+
}
|
|
810
|
+
function ve(i) {
|
|
811
|
+
let e, t = [], n = /* @__PURE__ */ new Map(), o, a, f, l = (
|
|
812
|
+
/*notifications*/
|
|
813
|
+
i[2]
|
|
814
|
+
);
|
|
815
|
+
const s = (r) => (
|
|
816
|
+
/*notification*/
|
|
817
|
+
r[12].key
|
|
818
|
+
);
|
|
819
|
+
for (let r = 0; r < l.length; r += 1) {
|
|
820
|
+
let c = ue(i, l, r), d = s(c);
|
|
821
|
+
n.set(d, t[r] = pe(d, c));
|
|
822
|
+
}
|
|
823
|
+
return {
|
|
824
|
+
c() {
|
|
825
|
+
e = h("ul");
|
|
826
|
+
for (let r = 0; r < t.length; r += 1)
|
|
827
|
+
t[r].c();
|
|
828
|
+
m(e, "class", o = "bn-notify-" + /*position*/
|
|
829
|
+
i[0] + " " + /*overflowY*/
|
|
830
|
+
i[5] + " svelte-1h8mmo3"), m(e, "style", a = `${/*position*/
|
|
831
|
+
i[0].includes("top") ? "justify-content:flex-start;" : ""}; max-height: calc(100vh - ${/*$accountCenter$*/
|
|
832
|
+
i[6].expanded ? "412px" : (
|
|
833
|
+
/*sharedContainer*/
|
|
834
|
+
i[1] && /*device*/
|
|
835
|
+
i[7].type !== "mobile" ? "82px" : !/*sharedContainer*/
|
|
836
|
+
i[1] && /*device*/
|
|
837
|
+
i[7].type === "mobile" ? "108px" : "24px"
|
|
838
|
+
)})`);
|
|
839
|
+
},
|
|
840
|
+
m(r, c) {
|
|
841
|
+
_(r, e, c);
|
|
842
|
+
for (let d = 0; d < t.length; d += 1)
|
|
843
|
+
t[d] && t[d].m(e, null);
|
|
844
|
+
f = !0;
|
|
845
|
+
},
|
|
846
|
+
p(r, c) {
|
|
847
|
+
if (c & /*position, cubicOut, notifications, updateScrollYOnRemove*/
|
|
848
|
+
517) {
|
|
849
|
+
l = /*notifications*/
|
|
850
|
+
r[2], A();
|
|
851
|
+
for (let d = 0; d < t.length; d += 1) t[d].r();
|
|
852
|
+
t = Ce(t, c, s, 1, r, l, n, e, Ie, pe, null, ue);
|
|
853
|
+
for (let d = 0; d < t.length; d += 1) t[d].a();
|
|
854
|
+
G();
|
|
855
|
+
}
|
|
856
|
+
(!f || c & /*position, overflowY*/
|
|
857
|
+
33 && o !== (o = "bn-notify-" + /*position*/
|
|
858
|
+
r[0] + " " + /*overflowY*/
|
|
859
|
+
r[5] + " svelte-1h8mmo3")) && m(e, "class", o), (!f || c & /*position, $accountCenter$, sharedContainer*/
|
|
860
|
+
67 && a !== (a = `${/*position*/
|
|
861
|
+
r[0].includes("top") ? "justify-content:flex-start;" : ""}; max-height: calc(100vh - ${/*$accountCenter$*/
|
|
862
|
+
r[6].expanded ? "412px" : (
|
|
863
|
+
/*sharedContainer*/
|
|
864
|
+
r[1] && /*device*/
|
|
865
|
+
r[7].type !== "mobile" ? "82px" : !/*sharedContainer*/
|
|
866
|
+
r[1] && /*device*/
|
|
867
|
+
r[7].type === "mobile" ? "108px" : "24px"
|
|
868
|
+
)})`)) && m(e, "style", a);
|
|
869
|
+
},
|
|
870
|
+
i(r) {
|
|
871
|
+
if (!f) {
|
|
872
|
+
for (let c = 0; c < l.length; c += 1)
|
|
873
|
+
w(t[c]);
|
|
874
|
+
f = !0;
|
|
875
|
+
}
|
|
876
|
+
},
|
|
877
|
+
o(r) {
|
|
878
|
+
for (let c = 0; c < t.length; c += 1)
|
|
879
|
+
T(t[c]);
|
|
880
|
+
f = !1;
|
|
881
|
+
},
|
|
882
|
+
d(r) {
|
|
883
|
+
r && C(e);
|
|
884
|
+
for (let c = 0; c < t.length; c += 1)
|
|
885
|
+
t[c].d();
|
|
886
|
+
}
|
|
887
|
+
};
|
|
888
|
+
}
|
|
889
|
+
function pe(i, e) {
|
|
890
|
+
let t, n, o, a, f, l, s, r = I, c, d, v;
|
|
891
|
+
return n = new ut({
|
|
892
|
+
props: {
|
|
893
|
+
notification: (
|
|
894
|
+
/*notification*/
|
|
895
|
+
e[12]
|
|
896
|
+
),
|
|
897
|
+
updateParentOnRemove: (
|
|
898
|
+
/*updateScrollYOnRemove*/
|
|
899
|
+
e[9]
|
|
900
|
+
)
|
|
901
|
+
}
|
|
902
|
+
}), {
|
|
903
|
+
key: i,
|
|
904
|
+
first: null,
|
|
905
|
+
c() {
|
|
906
|
+
t = h("li"), F(n.$$.fragment), o = L(), m(t, "class", a = B(`bn-notify-li-${/*position*/
|
|
907
|
+
e[0]} ${/*position*/
|
|
908
|
+
e[0].includes("top") ? "notification-list-top" : "notification-list-bottom"}`) + " svelte-1h8mmo3"), this.first = t;
|
|
909
|
+
},
|
|
910
|
+
m(u, y) {
|
|
911
|
+
_(u, t, y), D(n, t, null), g(t, o), c = !0, d || (v = S(t, "click", be(
|
|
912
|
+
/*click_handler*/
|
|
913
|
+
e[10]
|
|
914
|
+
)), d = !0);
|
|
915
|
+
},
|
|
916
|
+
p(u, y) {
|
|
917
|
+
e = u;
|
|
918
|
+
const p = {};
|
|
919
|
+
y & /*notifications*/
|
|
920
|
+
4 && (p.notification = /*notification*/
|
|
921
|
+
e[12]), n.$set(p), (!c || y & /*position*/
|
|
922
|
+
1 && a !== (a = B(`bn-notify-li-${/*position*/
|
|
923
|
+
e[0]} ${/*position*/
|
|
924
|
+
e[0].includes("top") ? "notification-list-top" : "notification-list-bottom"}`) + " svelte-1h8mmo3")) && m(t, "class", a);
|
|
925
|
+
},
|
|
926
|
+
r() {
|
|
927
|
+
s = t.getBoundingClientRect();
|
|
928
|
+
},
|
|
929
|
+
f() {
|
|
930
|
+
ze(t), r(), Te(t, s);
|
|
931
|
+
},
|
|
932
|
+
a() {
|
|
933
|
+
r(), r = je(t, s, He, { duration: 500 });
|
|
934
|
+
},
|
|
935
|
+
i(u) {
|
|
936
|
+
c || (w(n.$$.fragment, u), u && xe(() => {
|
|
937
|
+
c && (l && l.end(1), f = Le(t, Pe, {
|
|
938
|
+
duration: 1200,
|
|
939
|
+
delay: 300,
|
|
940
|
+
x: (
|
|
941
|
+
/*x*/
|
|
942
|
+
e[3]
|
|
943
|
+
),
|
|
944
|
+
y: (
|
|
945
|
+
/*y*/
|
|
946
|
+
e[4]
|
|
947
|
+
),
|
|
948
|
+
easing: mt
|
|
949
|
+
}), f.start());
|
|
950
|
+
}), c = !0);
|
|
951
|
+
},
|
|
952
|
+
o(u) {
|
|
953
|
+
T(n.$$.fragment, u), f && f.invalidate(), l = Se(t, Re, { duration: 300, easing: ye }), c = !1;
|
|
954
|
+
},
|
|
955
|
+
d(u) {
|
|
956
|
+
u && C(t), H(n), u && l && l.end(), d = !1, v();
|
|
957
|
+
}
|
|
958
|
+
};
|
|
959
|
+
}
|
|
960
|
+
function pt(i) {
|
|
961
|
+
let e, t, n = (
|
|
962
|
+
/*notifications*/
|
|
963
|
+
i[2].length && ve(i)
|
|
964
|
+
);
|
|
965
|
+
return {
|
|
966
|
+
c() {
|
|
967
|
+
n && n.c(), e = me();
|
|
968
|
+
},
|
|
969
|
+
m(o, a) {
|
|
970
|
+
n && n.m(o, a), _(o, e, a), t = !0;
|
|
971
|
+
},
|
|
972
|
+
p(o, [a]) {
|
|
973
|
+
/*notifications*/
|
|
974
|
+
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 && (A(), T(n, 1, 1, () => {
|
|
976
|
+
n = null;
|
|
977
|
+
}), G());
|
|
978
|
+
},
|
|
979
|
+
i(o) {
|
|
980
|
+
t || (w(n), t = !0);
|
|
981
|
+
},
|
|
982
|
+
o(o) {
|
|
983
|
+
T(n), t = !1;
|
|
984
|
+
},
|
|
985
|
+
d(o) {
|
|
986
|
+
n && n.d(o), o && C(e);
|
|
987
|
+
}
|
|
988
|
+
};
|
|
989
|
+
}
|
|
990
|
+
function mt(i) {
|
|
991
|
+
return Math.sin(-13 * (i + 1) * Math.PI / 2) * Math.pow(2, -35 * i) + 1;
|
|
992
|
+
}
|
|
993
|
+
function bt(i, e, t) {
|
|
994
|
+
let n;
|
|
995
|
+
const { device: o } = Z, a = Y.select("accountCenter").pipe(_e(Y.get().accountCenter), we(1));
|
|
996
|
+
$(i, a, (p) => t(6, n = p));
|
|
997
|
+
let { position: f } = e, { sharedContainer: l } = e, { notifications: s } = e, r, c;
|
|
998
|
+
r = 0, c = 0;
|
|
999
|
+
let d = "y-scroll";
|
|
1000
|
+
const v = () => {
|
|
1001
|
+
d !== "y-visible" && t(5, d = "y-visible"), u(
|
|
1002
|
+
function() {
|
|
1003
|
+
t(5, d = "y-scroll");
|
|
1004
|
+
},
|
|
1005
|
+
1e3
|
|
1006
|
+
);
|
|
1007
|
+
}, u = /* @__PURE__ */ function() {
|
|
1008
|
+
let p = null;
|
|
1009
|
+
return (b, z) => {
|
|
1010
|
+
clearTimeout(p), p = setTimeout(b, z);
|
|
1011
|
+
};
|
|
1012
|
+
}();
|
|
1013
|
+
function y(p) {
|
|
1014
|
+
Ee.call(this, i, p);
|
|
1015
|
+
}
|
|
1016
|
+
return i.$$set = (p) => {
|
|
1017
|
+
"position" in p && t(0, f = p.position), "sharedContainer" in p && t(1, l = p.sharedContainer), "notifications" in p && t(2, s = p.notifications);
|
|
1018
|
+
}, i.$$.update = () => {
|
|
1019
|
+
i.$$.dirty & /*position*/
|
|
1020
|
+
1 && (f.includes("top") ? t(4, c = -50) : t(4, c = 50));
|
|
1021
|
+
}, [
|
|
1022
|
+
f,
|
|
1023
|
+
l,
|
|
1024
|
+
s,
|
|
1025
|
+
r,
|
|
1026
|
+
c,
|
|
1027
|
+
d,
|
|
1028
|
+
n,
|
|
1029
|
+
o,
|
|
1030
|
+
a,
|
|
1031
|
+
v,
|
|
1032
|
+
y
|
|
1033
|
+
];
|
|
1034
|
+
}
|
|
1035
|
+
class ht extends R {
|
|
1036
|
+
constructor(e) {
|
|
1037
|
+
super(), N(
|
|
1038
|
+
this,
|
|
1039
|
+
e,
|
|
1040
|
+
bt,
|
|
1041
|
+
pt,
|
|
1042
|
+
M,
|
|
1043
|
+
{
|
|
1044
|
+
position: 0,
|
|
1045
|
+
sharedContainer: 1,
|
|
1046
|
+
notifications: 2
|
|
1047
|
+
},
|
|
1048
|
+
vt
|
|
1049
|
+
);
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
export {
|
|
1053
|
+
ht as default
|
|
1054
|
+
};
|