@lnfi-network/nodeflow-sdk 1.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/README.md +276 -0
  2. package/dist/SwapController-C-2g6oSP.js +447 -0
  3. package/dist/add-DDBnz1-Q.js +19 -0
  4. package/dist/all-wallets-XTwjZKGg.js +10 -0
  5. package/dist/app-store-sCzhkWOo.js +21 -0
  6. package/dist/apple-C4IG4u61.js +22 -0
  7. package/dist/arrow-bottom-D5KjiSxX.js +12 -0
  8. package/dist/arrow-bottom-circle-BwWTHJky.js +15 -0
  9. package/dist/arrow-left-hn1Ftfvb.js +12 -0
  10. package/dist/arrow-right-CkV03q5Q.js +12 -0
  11. package/dist/arrow-top-BFm9X5g1.js +12 -0
  12. package/dist/bank-BUCrVHdo.js +18 -0
  13. package/dist/bin-BKleaahE.js +8 -0
  14. package/dist/bitcoin-C7iWQVuy.js +17 -0
  15. package/dist/browser-CpOtTIku.js +18 -0
  16. package/dist/build-info.json +1 -0
  17. package/dist/card-CJ3tg2Ri.js +18 -0
  18. package/dist/ccip-DyUNuvL1.js +239 -0
  19. package/dist/checkmark-CvSC6zeV.js +15 -0
  20. package/dist/checkmark-bold-DyZJqlJ7.js +12 -0
  21. package/dist/chevron-bottom-T9v1OvPA.js +12 -0
  22. package/dist/chevron-left-B4I8A8BR.js +12 -0
  23. package/dist/chevron-right-DGcVStvL.js +12 -0
  24. package/dist/chevron-top-BtD7BPVB.js +12 -0
  25. package/dist/chrome-store-BTKxY14m.js +65 -0
  26. package/dist/circle-DLLZtCBf.js +8 -0
  27. package/dist/clock-BNIDUPYZ.js +12 -0
  28. package/dist/close-BscNWH3j.js +12 -0
  29. package/dist/coinPlaceholder-JCYCAADZ.js +12 -0
  30. package/dist/compass-D7B-kHmZ.js +12 -0
  31. package/dist/copy-DHBc9gJO.js +19 -0
  32. package/dist/cursor-DKduK293.js +7 -0
  33. package/dist/cursor-transparent-8DkjrHTm.js +16 -0
  34. package/dist/desktop-ChlWl7Ma.js +13 -0
  35. package/dist/disconnect-CML_GEin.js +12 -0
  36. package/dist/discord-CgAM6i7H.js +21 -0
  37. package/dist/email-8mepCwp-.js +10 -0
  38. package/dist/embedded-wallet-scU49N5X.js +464 -0
  39. package/dist/ethereum-CA-_7cWX.js +14 -0
  40. package/dist/etherscan-B4h2i8Uc.js +10 -0
  41. package/dist/exclamation-triangle-ftOWMqSf.js +8 -0
  42. package/dist/extension-7iqlSonF.js +12 -0
  43. package/dist/external-link-DAvuMfW6.js +12 -0
  44. package/dist/facebook-CsyBIxMB.js +30 -0
  45. package/dist/farcaster-DfetCk1r.js +16 -0
  46. package/dist/filters-CsU-LYSd.js +12 -0
  47. package/dist/font/ClashDisplay-Variable.ttf +0 -0
  48. package/dist/font/ClashDisplay-Variable.woff +0 -0
  49. package/dist/font/ClashDisplay-Variable.woff2 +0 -0
  50. package/dist/github-DjxwfOOF.js +22 -0
  51. package/dist/google--g4VSi6h.js +22 -0
  52. package/dist/help-circle-BPA985E7.js +16 -0
  53. package/dist/id-BCUBMri8.js +16 -0
  54. package/dist/image-gYCDO7su.js +8 -0
  55. package/dist/index-B9q3HG5u.js +709 -0
  56. package/dist/index-BEm1bPeX.js +63547 -0
  57. package/dist/index-CCgAY-U4.js +70 -0
  58. package/dist/index-CRbuhHbe.js +33 -0
  59. package/dist/index-DYL5OPkx.js +1060 -0
  60. package/dist/info-CIaFQJ_e.js +7 -0
  61. package/dist/info-circle-BPz5hFQa.js +16 -0
  62. package/dist/lightbulb-BDmHvdbq.js +7 -0
  63. package/dist/mail-DQiXQ-4_.js +12 -0
  64. package/dist/mobile-CG_8sNWZ.js +13 -0
  65. package/dist/more-B1H_I3-I.js +15 -0
  66. package/dist/network-placeholder-1RWeD7Yp.js +18 -0
  67. package/dist/nftPlaceholder-Cg-f-eaw.js +12 -0
  68. package/dist/nodeflow-sdk.es.js +15 -0
  69. package/dist/off-DB-2L-AT.js +8 -0
  70. package/dist/onramp-DI5eQmAC.js +917 -0
  71. package/dist/play-store-DKJRWbqp.js +36 -0
  72. package/dist/plus-By1Ef8nV.js +17 -0
  73. package/dist/qr-code-DGuZgP-9.js +10 -0
  74. package/dist/receive-BEsZr88v.js +179 -0
  75. package/dist/recycle-horizontal-DubwRDbc.js +13 -0
  76. package/dist/refresh-Dwfvwy6t.js +12 -0
  77. package/dist/reown-logo-oDEjOrqY.js +16 -0
  78. package/dist/search-DX_QdW9h.js +12 -0
  79. package/dist/send-Bd5bwLNJ.js +1039 -0
  80. package/dist/send-Dq4B7ftm.js +19 -0
  81. package/dist/socials-BnnwB5_t.js +589 -0
  82. package/dist/solana-B7Ds9KBT.js +17 -0
  83. package/dist/swapHorizontal-CF6_7qU-.js +12 -0
  84. package/dist/swapHorizontalBold-C-YFgVbc.js +12 -0
  85. package/dist/swapHorizontalMedium-BGOdc8_e.js +20 -0
  86. package/dist/swapHorizontalRoundedBold-D_vYgwwO.js +12 -0
  87. package/dist/swapVertical-j2pWqia1.js +12 -0
  88. package/dist/swaps-Bh2kuHjL.js +1713 -0
  89. package/dist/telegram-bh_htnzP.js +20 -0
  90. package/dist/three-dots-B31D_Ocu.js +9 -0
  91. package/dist/transactions-Ch56TR3p.js +35 -0
  92. package/dist/twitch-DUloatpE.js +22 -0
  93. package/dist/twitterIcon-CNo6b91J.js +10 -0
  94. package/dist/ui-C7PJmqHY.js +812 -0
  95. package/dist/user-DqFnAlKR.js +7 -0
  96. package/dist/verify-BmaaygAV.js +12 -0
  97. package/dist/verify-filled-BwLeEdJj.js +12 -0
  98. package/dist/vite.svg +1 -0
  99. package/dist/w3m-modal-BijXCMl6.js +1041 -0
  100. package/dist/wallet-DyP6_6JN.js +12 -0
  101. package/dist/wallet-placeholder-BZC82rR0.js +18 -0
  102. package/dist/walletconnect-DT69luRK.js +36 -0
  103. package/dist/warning-circle-CGbg6QZn.js +16 -0
  104. package/dist/x-BfEtqtAc.js +16 -0
  105. package/dist/x-mark-CSmIdhvb.js +7 -0
  106. package/package.json +53 -0
@@ -0,0 +1,19 @@
1
+ import { D as C } from "./index-BEm1bPeX.js";
2
+ const l = C`<svg fill="none" viewBox="0 0 21 20">
3
+ <path
4
+ fill="currentColor"
5
+ fill-rule="evenodd"
6
+ d="M14.3808 4.34812C13.72 4.47798 12.8501 4.7587 11.5748 5.17296L9.00869 6.00646C6.90631 6.68935 5.40679 7.17779 4.38121 7.63178C3.87166 7.85734 3.5351 8.05091 3.32022 8.22035C3.11183 8.38466 3.07011 8.48486 3.05969 8.51817C2.98058 8.77103 2.98009 9.04195 3.05831 9.29509C3.06861 9.32844 3.10998 9.42878 3.31777 9.59384C3.53205 9.76404 3.86792 9.95881 4.37667 10.1862C5.29287 10.5957 6.58844 11.0341 8.35529 11.6164L10.8876 8.59854C11.2426 8.17547 11.8733 8.12028 12.2964 8.47528C12.7195 8.83029 12.7746 9.46104 12.4196 9.88412L9.88738 12.9019C10.7676 14.5408 11.4244 15.7406 11.9867 16.5718C12.299 17.0333 12.5491 17.3303 12.7539 17.5117C12.9526 17.6877 13.0586 17.711 13.0932 17.7154C13.3561 17.7484 13.6228 17.7009 13.8581 17.5791C13.8891 17.563 13.9805 17.5046 14.1061 17.2708C14.2357 17.0298 14.3679 16.6647 14.5015 16.1237C14.7705 15.0349 14.9912 13.4733 15.2986 11.2843L15.6738 8.61249C15.8603 7.28456 15.9857 6.37917 15.9989 5.7059C16.012 5.03702 15.9047 4.8056 15.8145 4.69183C15.7044 4.55297 15.5673 4.43792 15.4114 4.35365C15.2837 4.28459 15.0372 4.2191 14.3808 4.34812ZM7.99373 13.603C6.11919 12.9864 4.6304 12.4902 3.5606 12.0121C2.98683 11.7557 2.4778 11.4808 2.07383 11.1599C1.66337 10.8339 1.31312 10.4217 1.14744 9.88551C0.949667 9.24541 0.950886 8.56035 1.15094 7.92096C1.31852 7.38534 1.67024 6.97442 2.08185 6.64985C2.48697 6.33041 2.99697 6.05734 3.57166 5.80295C4.70309 5.3021 6.30179 4.78283 8.32903 4.12437L11.0196 3.25042C12.2166 2.86159 13.2017 2.54158 13.9951 2.38566C14.8065 2.22618 15.6202 2.19289 16.3627 2.59437C16.7568 2.80747 17.1035 3.09839 17.3818 3.4495C17.9062 4.111 18.0147 4.91815 17.9985 5.74496C17.9827 6.55332 17.8386 7.57903 17.6636 8.82534L17.2701 11.6268C16.9737 13.7376 16.7399 15.4022 16.4432 16.6034C16.2924 17.2135 16.1121 17.7632 15.8678 18.2176C15.6197 18.6794 15.2761 19.0971 14.7777 19.3551C14.1827 19.6632 13.5083 19.7833 12.8436 19.6997C12.2867 19.6297 11.82 19.3563 11.4277 19.0087C11.0415 18.6666 10.6824 18.213 10.3302 17.6925C9.67361 16.722 8.92648 15.342 7.99373 13.603Z"
7
+ clip-rule="evenodd"
8
+ />
9
+ <svg
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ width="21"
12
+ height="20"
13
+ viewBox="0 0 21 20"
14
+ fill="none"
15
+ ></svg></svg
16
+ >`;
17
+ export {
18
+ l as sendSvg
19
+ };
@@ -0,0 +1,589 @@
1
+ import { E as L, H as U, aa as c, I, J as _, a3 as E, aA as u, R as m, a1 as F, K as l, aB as N, Y as P, aC as D, $ as j, aD as W, a9 as y, _ as d, O as $, V as b, aE as q, Q as p, aF as T, S as v, aG as M, aH as O, a8 as S } from "./index-BEm1bPeX.js";
2
+ const z = L`
3
+ :host {
4
+ margin-top: var(--wui-spacing-3xs);
5
+ }
6
+ wui-separator {
7
+ margin: var(--wui-spacing-m) calc(var(--wui-spacing-m) * -1) var(--wui-spacing-xs)
8
+ calc(var(--wui-spacing-m) * -1);
9
+ width: calc(100% + var(--wui-spacing-s) * 2);
10
+ }
11
+ `;
12
+ var x = function(a, e, t, o) {
13
+ var r = arguments.length, i = r < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, t) : o, s;
14
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(a, e, t, o);
15
+ else for (var n = a.length - 1; n >= 0; n--) (s = a[n]) && (i = (r < 3 ? s(i) : r > 3 ? s(e, t, i) : s(e, t)) || i);
16
+ return r > 3 && i && Object.defineProperty(e, t, i), i;
17
+ };
18
+ let w = class extends _ {
19
+ constructor() {
20
+ super(), this.unsubscribe = [], this.tabIdx = void 0, this.connectors = E.state.connectors, this.authConnector = this.connectors.find((e) => e.type === "AUTH"), this.remoteFeatures = u.state.remoteFeatures, this.isPwaLoading = !1, this.unsubscribe.push(E.subscribeKey("connectors", (e) => {
21
+ this.connectors = e, this.authConnector = this.connectors.find((t) => t.type === "AUTH");
22
+ }), u.subscribeKey("remoteFeatures", (e) => this.remoteFeatures = e));
23
+ }
24
+ connectedCallback() {
25
+ super.connectedCallback(), this.handlePwaFrameLoad();
26
+ }
27
+ disconnectedCallback() {
28
+ this.unsubscribe.forEach((e) => e());
29
+ }
30
+ render() {
31
+ var i;
32
+ let e = ((i = this.remoteFeatures) == null ? void 0 : i.socials) || [];
33
+ const t = !!this.authConnector, o = e == null ? void 0 : e.length, r = m.state.view === "ConnectSocials";
34
+ return (!t || !o) && !r ? null : (r && !o && (e = F.DEFAULT_SOCIALS), l` <wui-flex flexDirection="column" gap="xs">
35
+ ${e.map((s) => l`<wui-list-social
36
+ @click=${() => {
37
+ this.onSocialClick(s);
38
+ }}
39
+ data-testid=${`social-selector-${s}`}
40
+ name=${s}
41
+ logo=${s}
42
+ ?disabled=${this.isPwaLoading}
43
+ ></wui-list-social>`)}
44
+ </wui-flex>`);
45
+ }
46
+ async onSocialClick(e) {
47
+ e && await N(e);
48
+ }
49
+ async handlePwaFrameLoad() {
50
+ var e;
51
+ if (P.isPWA()) {
52
+ this.isPwaLoading = !0;
53
+ try {
54
+ ((e = this.authConnector) == null ? void 0 : e.provider) instanceof D && await this.authConnector.provider.init();
55
+ } catch (t) {
56
+ j.open({
57
+ displayMessage: "Error loading embedded wallet in PWA",
58
+ debugMessage: t.message
59
+ }, "error");
60
+ } finally {
61
+ this.isPwaLoading = !1;
62
+ }
63
+ }
64
+ }
65
+ };
66
+ w.styles = z;
67
+ x([
68
+ U()
69
+ ], w.prototype, "tabIdx", void 0);
70
+ x([
71
+ c()
72
+ ], w.prototype, "connectors", void 0);
73
+ x([
74
+ c()
75
+ ], w.prototype, "authConnector", void 0);
76
+ x([
77
+ c()
78
+ ], w.prototype, "remoteFeatures", void 0);
79
+ x([
80
+ c()
81
+ ], w.prototype, "isPwaLoading", void 0);
82
+ w = x([
83
+ I("w3m-social-login-list")
84
+ ], w);
85
+ const B = L`
86
+ wui-flex {
87
+ max-height: clamp(360px, 540px, 80vh);
88
+ overflow: scroll;
89
+ scrollbar-width: none;
90
+ transition: opacity var(--wui-ease-out-power-1) var(--wui-duration-md);
91
+ will-change: opacity;
92
+ }
93
+ wui-flex::-webkit-scrollbar {
94
+ display: none;
95
+ }
96
+ wui-flex.disabled {
97
+ opacity: 0.3;
98
+ pointer-events: none;
99
+ user-select: none;
100
+ }
101
+ `;
102
+ var A = function(a, e, t, o) {
103
+ var r = arguments.length, i = r < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, t) : o, s;
104
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(a, e, t, o);
105
+ else for (var n = a.length - 1; n >= 0; n--) (s = a[n]) && (i = (r < 3 ? s(i) : r > 3 ? s(e, t, i) : s(e, t)) || i);
106
+ return r > 3 && i && Object.defineProperty(e, t, i), i;
107
+ };
108
+ let k = class extends _ {
109
+ constructor() {
110
+ super(), this.unsubscribe = [], this.checked = W.state.isLegalCheckboxChecked, this.unsubscribe.push(W.subscribeKey("isLegalCheckboxChecked", (e) => {
111
+ this.checked = e;
112
+ }));
113
+ }
114
+ disconnectedCallback() {
115
+ this.unsubscribe.forEach((e) => e());
116
+ }
117
+ render() {
118
+ var R;
119
+ const { termsConditionsUrl: e, privacyPolicyUrl: t } = u.state, o = (R = u.state.features) == null ? void 0 : R.legalCheckbox, i = !!(e || t) && !!o, s = i && !this.checked, n = s ? -1 : void 0;
120
+ return l`
121
+ <w3m-legal-checkbox></w3m-legal-checkbox>
122
+ <wui-flex
123
+ flexDirection="column"
124
+ .padding=${i ? ["0", "s", "s", "s"] : "s"}
125
+ gap="xs"
126
+ class=${y(s ? "disabled" : void 0)}
127
+ >
128
+ <w3m-social-login-list tabIdx=${y(n)}></w3m-social-login-list>
129
+ </wui-flex>
130
+ <w3m-legal-footer></w3m-legal-footer>
131
+ `;
132
+ }
133
+ };
134
+ k.styles = B;
135
+ A([
136
+ c()
137
+ ], k.prototype, "checked", void 0);
138
+ k = A([
139
+ I("w3m-connect-socials-view")
140
+ ], k);
141
+ const V = L`
142
+ wui-logo {
143
+ width: 80px;
144
+ height: 80px;
145
+ border-radius: var(--wui-border-radius-m);
146
+ }
147
+ @keyframes shake {
148
+ 0% {
149
+ transform: translateX(0);
150
+ }
151
+ 25% {
152
+ transform: translateX(3px);
153
+ }
154
+ 50% {
155
+ transform: translateX(-3px);
156
+ }
157
+ 75% {
158
+ transform: translateX(3px);
159
+ }
160
+ 100% {
161
+ transform: translateX(0);
162
+ }
163
+ }
164
+ wui-flex:first-child:not(:only-child) {
165
+ position: relative;
166
+ }
167
+ wui-loading-thumbnail {
168
+ position: absolute;
169
+ }
170
+ wui-icon-box {
171
+ position: absolute;
172
+ right: calc(var(--wui-spacing-3xs) * -1);
173
+ bottom: calc(var(--wui-spacing-3xs) * -1);
174
+ opacity: 0;
175
+ transform: scale(0.5);
176
+ transition: all var(--wui-ease-out-power-2) var(--wui-duration-lg);
177
+ }
178
+ wui-text[align='center'] {
179
+ width: 100%;
180
+ padding: 0px var(--wui-spacing-l);
181
+ }
182
+ [data-error='true'] wui-icon-box {
183
+ opacity: 1;
184
+ transform: scale(1);
185
+ }
186
+ [data-error='true'] > wui-flex:first-child {
187
+ animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
188
+ }
189
+ .capitalize {
190
+ text-transform: capitalize;
191
+ }
192
+ `;
193
+ var g = function(a, e, t, o) {
194
+ var r = arguments.length, i = r < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, t) : o, s;
195
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(a, e, t, o);
196
+ else for (var n = a.length - 1; n >= 0; n--) (s = a[n]) && (i = (r < 3 ? s(i) : r > 3 ? s(e, t, i) : s(e, t)) || i);
197
+ return r > 3 && i && Object.defineProperty(e, t, i), i;
198
+ };
199
+ let h = class extends _ {
200
+ constructor() {
201
+ super(), this.unsubscribe = [], this.socialProvider = d.state.socialProvider, this.socialWindow = d.state.socialWindow, this.error = !1, this.connecting = !1, this.message = "Connect in the provider window", this.remoteFeatures = u.state.remoteFeatures, this.address = d.state.address, this.connectionsByNamespace = $.getConnections(b.state.activeChain), this.hasMultipleConnections = this.connectionsByNamespace.length > 0, this.authConnector = E.getAuthConnector(), this.handleSocialConnection = async (t) => {
202
+ var o, r;
203
+ if ((o = t.data) != null && o.resultUri)
204
+ if (t.origin === q.SECURE_SITE_ORIGIN) {
205
+ window.removeEventListener("message", this.handleSocialConnection, !1);
206
+ try {
207
+ if (this.authConnector && !this.connecting) {
208
+ this.socialWindow && (this.socialWindow.close(), d.setSocialWindow(void 0, b.state.activeChain)), this.connecting = !0, this.updateMessage();
209
+ const i = t.data.resultUri;
210
+ this.socialProvider && p.sendEvent({
211
+ type: "track",
212
+ event: "SOCIAL_LOGIN_REQUEST_USER_DATA",
213
+ properties: { provider: this.socialProvider }
214
+ }), await $.connectExternal({
215
+ id: this.authConnector.id,
216
+ type: this.authConnector.type,
217
+ socialUri: i
218
+ }, this.authConnector.chain), this.socialProvider && (T.setConnectedSocialProvider(this.socialProvider), p.sendEvent({
219
+ type: "track",
220
+ event: "SOCIAL_LOGIN_SUCCESS",
221
+ properties: {
222
+ provider: this.socialProvider,
223
+ caipNetworkId: (r = b.getActiveCaipNetwork()) == null ? void 0 : r.caipNetworkId
224
+ }
225
+ }));
226
+ }
227
+ } catch {
228
+ this.error = !0, this.updateMessage(), this.socialProvider && p.sendEvent({
229
+ type: "track",
230
+ event: "SOCIAL_LOGIN_ERROR",
231
+ properties: { provider: this.socialProvider }
232
+ });
233
+ }
234
+ } else
235
+ m.goBack(), v.showError("Untrusted Origin"), this.socialProvider && p.sendEvent({
236
+ type: "track",
237
+ event: "SOCIAL_LOGIN_ERROR",
238
+ properties: { provider: this.socialProvider }
239
+ });
240
+ }, M.EmbeddedWalletAbortController.signal.addEventListener("abort", () => {
241
+ this.socialWindow && (this.socialWindow.close(), d.setSocialWindow(void 0, b.state.activeChain));
242
+ }), this.unsubscribe.push(d.subscribe((t) => {
243
+ t.socialProvider && (this.socialProvider = t.socialProvider), t.socialWindow && (this.socialWindow = t.socialWindow);
244
+ }), u.subscribeKey("remoteFeatures", (t) => {
245
+ this.remoteFeatures = t;
246
+ }), d.subscribeKey("address", (t) => {
247
+ var r;
248
+ const o = (r = this.remoteFeatures) == null ? void 0 : r.multiWallet;
249
+ t && t !== this.address && (this.hasMultipleConnections && o ? (m.replace("ProfileWallets"), v.showSuccess("New Wallet Added")) : (O.state.open || u.state.enableEmbedded) && O.close());
250
+ })), this.authConnector && this.connectSocial();
251
+ }
252
+ disconnectedCallback() {
253
+ var e;
254
+ this.unsubscribe.forEach((t) => t()), window.removeEventListener("message", this.handleSocialConnection, !1), (e = this.socialWindow) == null || e.close(), d.setSocialWindow(void 0, b.state.activeChain);
255
+ }
256
+ render() {
257
+ return l`
258
+ <wui-flex
259
+ data-error=${y(this.error)}
260
+ flexDirection="column"
261
+ alignItems="center"
262
+ .padding=${["3xl", "xl", "xl", "xl"]}
263
+ gap="xl"
264
+ >
265
+ <wui-flex justifyContent="center" alignItems="center">
266
+ <wui-logo logo=${y(this.socialProvider)}></wui-logo>
267
+ ${this.error ? null : this.loaderTemplate()}
268
+ <wui-icon-box
269
+ backgroundColor="error-100"
270
+ background="opaque"
271
+ iconColor="error-100"
272
+ icon="close"
273
+ size="sm"
274
+ border
275
+ borderColor="wui-color-bg-125"
276
+ ></wui-icon-box>
277
+ </wui-flex>
278
+ <wui-flex flexDirection="column" alignItems="center" gap="xs">
279
+ <wui-text align="center" variant="paragraph-500" color="fg-100"
280
+ >Log in with
281
+ <span class="capitalize">${this.socialProvider ?? "Social"}</span></wui-text
282
+ >
283
+ <wui-text align="center" variant="small-400" color=${this.error ? "error-100" : "fg-200"}
284
+ >${this.message}</wui-text
285
+ ></wui-flex
286
+ >
287
+ </wui-flex>
288
+ `;
289
+ }
290
+ loaderTemplate() {
291
+ const e = S.state.themeVariables["--w3m-border-radius-master"], t = e ? parseInt(e.replace("px", ""), 10) : 4;
292
+ return l`<wui-loading-thumbnail radius=${t * 9}></wui-loading-thumbnail>`;
293
+ }
294
+ connectSocial() {
295
+ const e = setInterval(() => {
296
+ var t;
297
+ (t = this.socialWindow) != null && t.closed && (!this.connecting && m.state.view === "ConnectingSocial" && (this.socialProvider && p.sendEvent({
298
+ type: "track",
299
+ event: "SOCIAL_LOGIN_CANCELED",
300
+ properties: { provider: this.socialProvider }
301
+ }), m.goBack()), clearInterval(e));
302
+ }, 1e3);
303
+ window.addEventListener("message", this.handleSocialConnection, !1);
304
+ }
305
+ updateMessage() {
306
+ this.error ? this.message = "Something went wrong" : this.connecting ? this.message = "Retrieving user data" : this.message = "Connect in the provider window";
307
+ }
308
+ };
309
+ h.styles = V;
310
+ g([
311
+ c()
312
+ ], h.prototype, "socialProvider", void 0);
313
+ g([
314
+ c()
315
+ ], h.prototype, "socialWindow", void 0);
316
+ g([
317
+ c()
318
+ ], h.prototype, "error", void 0);
319
+ g([
320
+ c()
321
+ ], h.prototype, "connecting", void 0);
322
+ g([
323
+ c()
324
+ ], h.prototype, "message", void 0);
325
+ g([
326
+ c()
327
+ ], h.prototype, "remoteFeatures", void 0);
328
+ h = g([
329
+ I("w3m-connecting-social-view")
330
+ ], h);
331
+ const G = L`
332
+ @keyframes fadein {
333
+ from {
334
+ opacity: 0;
335
+ }
336
+ to {
337
+ opacity: 1;
338
+ }
339
+ }
340
+
341
+ wui-shimmer {
342
+ width: 100%;
343
+ aspect-ratio: 1 / 1;
344
+ border-radius: clamp(0px, var(--wui-border-radius-l), 40px) !important;
345
+ }
346
+
347
+ wui-qr-code {
348
+ opacity: 0;
349
+ animation-duration: 200ms;
350
+ animation-timing-function: ease;
351
+ animation-name: fadein;
352
+ animation-fill-mode: forwards;
353
+ }
354
+
355
+ wui-logo {
356
+ width: 80px;
357
+ height: 80px;
358
+ border-radius: var(--wui-border-radius-m);
359
+ }
360
+
361
+ wui-flex:first-child:not(:only-child) {
362
+ position: relative;
363
+ }
364
+ wui-loading-thumbnail {
365
+ position: absolute;
366
+ }
367
+ wui-icon-box {
368
+ position: absolute;
369
+ right: calc(var(--wui-spacing-3xs) * -1);
370
+ bottom: calc(var(--wui-spacing-3xs) * -1);
371
+ opacity: 0;
372
+ transform: scale(0.5);
373
+ transition: all var(--wui-ease-out-power-2) var(--wui-duration-lg);
374
+ }
375
+ `;
376
+ var C = function(a, e, t, o) {
377
+ var r = arguments.length, i = r < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, t) : o, s;
378
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(a, e, t, o);
379
+ else for (var n = a.length - 1; n >= 0; n--) (s = a[n]) && (i = (r < 3 ? s(i) : r > 3 ? s(e, t, i) : s(e, t)) || i);
380
+ return r > 3 && i && Object.defineProperty(e, t, i), i;
381
+ };
382
+ let f = class extends _ {
383
+ constructor() {
384
+ super(), this.unsubscribe = [], this.timeout = void 0, this.socialProvider = d.state.socialProvider, this.uri = d.state.farcasterUrl, this.ready = !1, this.loading = !1, this.remoteFeatures = u.state.remoteFeatures, this.authConnector = E.getAuthConnector(), this.forceUpdate = () => {
385
+ this.requestUpdate();
386
+ }, this.unsubscribe.push(d.subscribeKey("farcasterUrl", (e) => {
387
+ e && (this.uri = e, this.connectFarcaster());
388
+ }), d.subscribeKey("socialProvider", (e) => {
389
+ e && (this.socialProvider = e);
390
+ }), u.subscribeKey("remoteFeatures", (e) => {
391
+ this.remoteFeatures = e;
392
+ })), window.addEventListener("resize", this.forceUpdate);
393
+ }
394
+ disconnectedCallback() {
395
+ super.disconnectedCallback(), clearTimeout(this.timeout), window.removeEventListener("resize", this.forceUpdate);
396
+ }
397
+ render() {
398
+ return this.onRenderProxy(), l`${this.platformTemplate()}`;
399
+ }
400
+ platformTemplate() {
401
+ return P.isMobile() ? l`${this.mobileTemplate()}` : l`${this.desktopTemplate()}`;
402
+ }
403
+ desktopTemplate() {
404
+ return this.loading ? l`${this.loadingTemplate()}` : l`${this.qrTemplate()}`;
405
+ }
406
+ qrTemplate() {
407
+ return l` <wui-flex
408
+ flexDirection="column"
409
+ alignItems="center"
410
+ .padding=${["0", "xl", "xl", "xl"]}
411
+ gap="xl"
412
+ >
413
+ <wui-shimmer borderRadius="l" width="100%"> ${this.qrCodeTemplate()} </wui-shimmer>
414
+
415
+ <wui-text variant="paragraph-500" color="fg-100">
416
+ Scan this QR Code with your phone
417
+ </wui-text>
418
+ ${this.copyTemplate()}
419
+ </wui-flex>`;
420
+ }
421
+ loadingTemplate() {
422
+ return l`
423
+ <wui-flex
424
+ flexDirection="column"
425
+ alignItems="center"
426
+ .padding=${["xl", "xl", "xl", "xl"]}
427
+ gap="xl"
428
+ >
429
+ <wui-flex justifyContent="center" alignItems="center">
430
+ <wui-logo logo="farcaster"></wui-logo>
431
+ ${this.loaderTemplate()}
432
+ <wui-icon-box
433
+ backgroundColor="error-100"
434
+ background="opaque"
435
+ iconColor="error-100"
436
+ icon="close"
437
+ size="sm"
438
+ border
439
+ borderColor="wui-color-bg-125"
440
+ ></wui-icon-box>
441
+ </wui-flex>
442
+ <wui-flex flexDirection="column" alignItems="center" gap="xs">
443
+ <wui-text align="center" variant="paragraph-500" color="fg-100">
444
+ Loading user data
445
+ </wui-text>
446
+ <wui-text align="center" variant="small-400" color="fg-200">
447
+ Please wait a moment while we load your data.
448
+ </wui-text>
449
+ </wui-flex>
450
+ </wui-flex>
451
+ `;
452
+ }
453
+ mobileTemplate() {
454
+ return l` <wui-flex
455
+ flexDirection="column"
456
+ alignItems="center"
457
+ .padding=${["3xl", "xl", "xl", "xl"]}
458
+ gap="xl"
459
+ >
460
+ <wui-flex justifyContent="center" alignItems="center">
461
+ <wui-logo logo="farcaster"></wui-logo>
462
+ ${this.loaderTemplate()}
463
+ <wui-icon-box
464
+ backgroundColor="error-100"
465
+ background="opaque"
466
+ iconColor="error-100"
467
+ icon="close"
468
+ size="sm"
469
+ border
470
+ borderColor="wui-color-bg-125"
471
+ ></wui-icon-box>
472
+ </wui-flex>
473
+ <wui-flex flexDirection="column" alignItems="center" gap="xs">
474
+ <wui-text align="center" variant="paragraph-500" color="fg-100"
475
+ >Continue in Farcaster</span></wui-text
476
+ >
477
+ <wui-text align="center" variant="small-400" color="fg-200"
478
+ >Accept connection request in the app</wui-text
479
+ ></wui-flex
480
+ >
481
+ ${this.mobileLinkTemplate()}
482
+ </wui-flex>`;
483
+ }
484
+ loaderTemplate() {
485
+ const e = S.state.themeVariables["--w3m-border-radius-master"], t = e ? parseInt(e.replace("px", ""), 10) : 4;
486
+ return l`<wui-loading-thumbnail radius=${t * 9}></wui-loading-thumbnail>`;
487
+ }
488
+ async connectFarcaster() {
489
+ var e, t, o;
490
+ if (this.authConnector)
491
+ try {
492
+ await ((e = this.authConnector) == null ? void 0 : e.provider.connectFarcaster()), this.socialProvider && (T.setConnectedSocialProvider(this.socialProvider), p.sendEvent({
493
+ type: "track",
494
+ event: "SOCIAL_LOGIN_REQUEST_USER_DATA",
495
+ properties: { provider: this.socialProvider }
496
+ })), this.loading = !0;
497
+ const i = $.getConnections(this.authConnector.chain).length > 0;
498
+ await $.connectExternal(this.authConnector, this.authConnector.chain);
499
+ const s = (t = this.remoteFeatures) == null ? void 0 : t.multiWallet;
500
+ this.socialProvider && p.sendEvent({
501
+ type: "track",
502
+ event: "SOCIAL_LOGIN_SUCCESS",
503
+ properties: {
504
+ provider: this.socialProvider,
505
+ caipNetworkId: (o = b.getActiveCaipNetwork()) == null ? void 0 : o.caipNetworkId
506
+ }
507
+ }), this.loading = !1, i && s ? (m.replace("ProfileWallets"), v.showSuccess("New Wallet Added")) : O.close();
508
+ } catch (r) {
509
+ this.socialProvider && p.sendEvent({
510
+ type: "track",
511
+ event: "SOCIAL_LOGIN_ERROR",
512
+ properties: { provider: this.socialProvider }
513
+ }), m.goBack(), v.showError(r);
514
+ }
515
+ }
516
+ mobileLinkTemplate() {
517
+ return l`<wui-button
518
+ size="md"
519
+ ?loading=${this.loading}
520
+ ?disabled=${!this.uri || this.loading}
521
+ @click=${() => {
522
+ this.uri && P.openHref(this.uri, "_blank");
523
+ }}
524
+ >
525
+ Open farcaster</wui-button
526
+ >`;
527
+ }
528
+ onRenderProxy() {
529
+ !this.ready && this.uri && (this.timeout = setTimeout(() => {
530
+ this.ready = !0;
531
+ }, 200));
532
+ }
533
+ qrCodeTemplate() {
534
+ if (!this.uri || !this.ready)
535
+ return null;
536
+ const e = this.getBoundingClientRect().width - 40;
537
+ return l` <wui-qr-code
538
+ size=${e}
539
+ theme=${S.state.themeMode}
540
+ uri=${this.uri}
541
+ ?farcaster=${!0}
542
+ data-testid="wui-qr-code"
543
+ color=${y(S.state.themeVariables["--w3m-qr-color"])}
544
+ ></wui-qr-code>`;
545
+ }
546
+ copyTemplate() {
547
+ const e = !this.uri || !this.ready;
548
+ return l`<wui-link
549
+ .disabled=${e}
550
+ @click=${this.onCopyUri}
551
+ color="fg-200"
552
+ data-testid="copy-wc2-uri"
553
+ >
554
+ <wui-icon size="xs" color="fg-200" slot="iconLeft" name="copy"></wui-icon>
555
+ Copy link
556
+ </wui-link>`;
557
+ }
558
+ onCopyUri() {
559
+ try {
560
+ this.uri && (P.copyToClopboard(this.uri), v.showSuccess("Link copied"));
561
+ } catch {
562
+ v.showError("Failed to copy");
563
+ }
564
+ }
565
+ };
566
+ f.styles = G;
567
+ C([
568
+ c()
569
+ ], f.prototype, "socialProvider", void 0);
570
+ C([
571
+ c()
572
+ ], f.prototype, "uri", void 0);
573
+ C([
574
+ c()
575
+ ], f.prototype, "ready", void 0);
576
+ C([
577
+ c()
578
+ ], f.prototype, "loading", void 0);
579
+ C([
580
+ c()
581
+ ], f.prototype, "remoteFeatures", void 0);
582
+ f = C([
583
+ I("w3m-connecting-farcaster-view")
584
+ ], f);
585
+ export {
586
+ k as W3mConnectSocialsView,
587
+ f as W3mConnectingFarcasterView,
588
+ h as W3mConnectingSocialView
589
+ };
@@ -0,0 +1,17 @@
1
+ import { D as C } from "./index-BEm1bPeX.js";
2
+ const i = C`
3
+ <svg width="13" height="12" viewBox="0 0 13 12" fill="none" xmlns="http://www.w3.org/2000/svg">
4
+ <g clip-path="url(#clip0_24458_3940)">
5
+ <path d="M6.49987 12C9.81351 12 12.4997 9.31371 12.4997 6C12.4997 2.68629 9.81351 0 6.49987 0C3.18623 0 0.5 2.68629 0.5 6C0.5 9.31371 3.18623 12 6.49987 12Z" fill="var(--wui-color-gray-glass-005)"/>
6
+ <path d="M9.89298 7.73057L8.76102 8.91828C8.73642 8.94408 8.70664 8.96465 8.67356 8.97871C8.64047 8.99277 8.60478 9.00002 8.56872 9H3.2027C3.1771 9 3.15205 8.99268 3.13064 8.97895C3.10923 8.96521 3.09239 8.94565 3.08218 8.92268C3.07197 8.8997 3.06885 8.87431 3.07319 8.84963C3.07753 8.82494 3.08915 8.80203 3.10662 8.78371L4.23943 7.596C4.26397 7.57027 4.29365 7.54974 4.32662 7.53569C4.3596 7.52163 4.39518 7.51435 4.43115 7.51428H9.79688C9.82248 7.51428 9.84752 7.52161 9.86895 7.53534C9.89033 7.54908 9.90717 7.56864 9.91742 7.59161C9.92761 7.61459 9.93073 7.63997 9.92638 7.66466C9.92204 7.68935 9.91043 7.71226 9.89298 7.73057ZM8.76102 5.33885C8.73642 5.31305 8.70664 5.29248 8.67356 5.27843C8.64047 5.26437 8.60478 5.25713 8.56872 5.25715H3.2027C3.1771 5.25715 3.15205 5.26446 3.13064 5.2782C3.10923 5.29194 3.09239 5.31149 3.08218 5.33446C3.07197 5.35744 3.06885 5.38283 3.07319 5.40752C3.07753 5.4322 3.08915 5.45511 3.10662 5.47343L4.23943 6.66115C4.26397 6.68688 4.29365 6.7074 4.32662 6.72146C4.3596 6.73551 4.39518 6.7428 4.43115 6.74285H9.79688C9.82248 6.74285 9.84752 6.73554 9.86895 6.7218C9.89033 6.70806 9.90717 6.68851 9.91742 6.66554C9.92761 6.64256 9.93073 6.61717 9.92638 6.59248C9.92204 6.5678 9.91043 6.54489 9.89298 6.52657L8.76102 5.33885ZM3.2027 4.48572H8.56872C8.60478 4.48573 8.64047 4.47849 8.67356 4.46443C8.70664 4.45037 8.73642 4.4298 8.76102 4.404L9.89298 3.21629C9.91043 3.19797 9.92204 3.17506 9.92638 3.15037C9.93073 3.12569 9.92761 3.1003 9.91742 3.07732C9.90717 3.05435 9.89033 3.03479 9.86895 3.02106C9.84752 3.00732 9.82248 3 9.79688 3H4.43115C4.39518 3.00006 4.3596 3.00734 4.32662 3.0214C4.29365 3.03545 4.26397 3.05598 4.23943 3.08171L3.10691 4.26943C3.08946 4.28772 3.07785 4.31061 3.0735 4.33527C3.06914 4.35993 3.07224 4.3853 3.08241 4.40826C3.09258 4.43122 3.10938 4.45078 3.13075 4.46454C3.15212 4.4783 3.17712 4.48565 3.2027 4.48572Z" fill="var(--wui-color-gray-glass-090)"/>
7
+ </g>
8
+ <defs>
9
+ <clipPath id="clip0_24458_3940">
10
+ <rect width="11.9997" height="12" fill="white" transform="translate(0.5)"/>
11
+ </clipPath>
12
+ </defs>
13
+ </svg>
14
+ `;
15
+ export {
16
+ i as solanaSvg
17
+ };
@@ -0,0 +1,12 @@
1
+ import { D as l } from "./index-BEm1bPeX.js";
2
+ const o = l`<svg fill="none" viewBox="0 0 20 20">
3
+ <path
4
+ fill="currentColor"
5
+ fill-rule="evenodd"
6
+ d="M6.76.3a1 1 0 0 1 0 1.4L4.07 4.4h9a1 1 0 1 1 0 2h-9l2.69 2.68a1 1 0 1 1-1.42 1.42L.95 6.09a1 1 0 0 1 0-1.4l4.4-4.4a1 1 0 0 1 1.4 0Zm6.49 9.21a1 1 0 0 1 1.41 0l4.39 4.4a1 1 0 0 1 0 1.4l-4.39 4.4a1 1 0 0 1-1.41-1.42l2.68-2.68h-9a1 1 0 0 1 0-2h9l-2.68-2.68a1 1 0 0 1 0-1.42Z"
7
+ clip-rule="evenodd"
8
+ />
9
+ </svg>`;
10
+ export {
11
+ o as swapHorizontalSvg
12
+ };
@@ -0,0 +1,12 @@
1
+ import { D as C } from "./index-BEm1bPeX.js";
2
+ const e = C`<svg width="10" height="10" viewBox="0 0 10 10">
3
+ <path
4
+ fill="currentColor"
5
+ fill-rule="evenodd"
6
+ d="M3.77986 0.566631C4.0589 0.845577 4.0589 1.29784 3.77986 1.57678L3.08261 2.2738H6.34184C6.73647 2.2738 7.05637 2.5936 7.05637 2.98808C7.05637 3.38257 6.73647 3.70237 6.34184 3.70237H3.08261L3.77986 4.39938C4.0589 4.67833 4.0589 5.13059 3.77986 5.40954C3.50082 5.68848 3.04841 5.68848 2.76937 5.40954L0.852346 3.49316C0.573306 3.21421 0.573306 2.76195 0.852346 2.48301L2.76937 0.566631C3.04841 0.287685 3.50082 0.287685 3.77986 0.566631ZM6.22 4.59102C6.49904 4.31208 6.95145 4.31208 7.23049 4.59102L9.14751 6.5074C9.42655 6.78634 9.42655 7.23861 9.14751 7.51755L7.23049 9.43393C6.95145 9.71287 6.49904 9.71287 6.22 9.43393C5.94096 9.15498 5.94096 8.70272 6.22 8.42377L6.91725 7.72676L3.65802 7.72676C3.26339 7.72676 2.94349 7.40696 2.94349 7.01247C2.94349 6.61798 3.26339 6.29819 3.65802 6.29819L6.91725 6.29819L6.22 5.60117C5.94096 5.32223 5.94096 4.86997 6.22 4.59102Z"
7
+ clip-rule="evenodd"
8
+ />
9
+ </svg>`;
10
+ export {
11
+ e as swapHorizontalBoldSvg
12
+ };
@@ -0,0 +1,20 @@
1
+ import { D as C } from "./index-BEm1bPeX.js";
2
+ const e = C`<svg
3
+ width="14"
4
+ height="14"
5
+ viewBox="0 0 14 14"
6
+ fill="none"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ >
9
+ <path
10
+ fill-rule="evenodd"
11
+ clip-rule="evenodd"
12
+ d="M13.7306 3.24213C14.0725 3.58384 14.0725 4.13786 13.7306 4.47957L10.7418 7.46737C10.4 7.80908 9.84581 7.80908 9.50399 7.46737C9.16216 7.12567 9.16216 6.57165 9.50399 6.22994L10.9986 4.73585H5.34082C4.85741 4.73585 4.46553 4.3441 4.46553 3.86085C4.46553 3.3776 4.85741 2.98585 5.34082 2.98585L10.9986 2.98585L9.50399 1.49177C9.16216 1.15006 9.16216 0.596037 9.50399 0.254328C9.84581 -0.0873803 10.4 -0.0873803 10.7418 0.254328L13.7306 3.24213ZM9.52515 10.1352C9.52515 10.6185 9.13327 11.0102 8.64986 11.0102L2.9921 11.0102L4.48669 12.5043C4.82852 12.846 4.82852 13.4001 4.48669 13.7418C4.14487 14.0835 3.59066 14.0835 3.24884 13.7418L0.26003 10.754C0.0958806 10.5899 0.0036621 10.3673 0.00366211 10.1352C0.00366212 9.90318 0.0958806 9.68062 0.26003 9.51652L3.24884 6.52872C3.59066 6.18701 4.14487 6.18701 4.48669 6.52872C4.82851 6.87043 4.82851 7.42445 4.48669 7.76616L2.9921 9.26024L8.64986 9.26024C9.13327 9.26024 9.52515 9.65199 9.52515 10.1352Z"
13
+ fill="currentColor"
14
+ />
15
+ </svg>
16
+
17
+ `;
18
+ export {
19
+ e as swapHorizontalMediumSvg
20
+ };