@trifle/trifle-hub 1.0.160 → 1.0.162
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/AccountIndex-CTjOLmjP.js +144 -0
- package/dist/Earn-DMrF4S31.js +255 -0
- package/dist/{ExchangeController-BqiUJhPe.js → ExchangeController-6NjzC79Z.js} +1 -1
- package/dist/{Games-D0tCZt6c.js → Games-CLUUM0mP.js} +10 -10
- package/dist/{HelpersUtil-DjUlhZq5.js → HelpersUtil-Dj0wfodo.js} +4 -4
- package/dist/{Leaderboard-DBTdgsH9.js → Leaderboard-CuG041PJ.js} +1 -1
- package/dist/Profile-YoSRBmlN.js +1818 -0
- package/dist/QuestCard-CapG6iNR.js +318 -0
- package/dist/{ReownAuthentication-B746PWX7.js → ReownAuthentication-ClyLCgeo.js} +4 -4
- package/dist/{SocialsButtons-RNAXi88c.js → SocialsButtons-uL2_XTTy.js} +1 -1
- package/dist/SwapBalls-ChUy9GIh.js +277 -0
- package/dist/{SwapController-BWjEZ_Ff.js → SwapController-Q_rNvOur.js} +1 -1
- package/dist/{TrifleGuide-DDmlqN-_.js → TrifleGuide-Dn1FDCub.js} +1 -1
- package/dist/components/QuestCard.vue.d.ts +2 -0
- package/dist/components/ScrollMaskedX.vue.d.ts +17 -0
- package/dist/config/pointsConfig.d.ts +111 -0
- package/dist/config/socialsConfig.d.ts +44 -18
- package/dist/config/tailwindTheme.d.ts +12 -0
- package/dist/{data-capture-CYSjXV5v.js → data-capture-C1pQbx1q.js} +10 -10
- package/dist/{email-ClthbkYC.js → email-D2uCwQIX.js} +15 -15
- package/dist/{embedded-wallet-BMDA-g1R.js → embedded-wallet-C4TtNIAk.js} +20 -20
- package/dist/{features-Bvu4VlVT.js → features-p7PixpOp.js} +1 -1
- package/dist/{if-defined-C1mIu8Om.js → if-defined-Db2RYcoI.js} +1 -1
- package/dist/{index-CGtx5_5q.js → index-B7YpXXOx.js} +3 -3
- package/dist/{index-as7lY0Ly.js → index-B874HQ1C.js} +7 -7
- package/dist/{index-C-bpIric.js → index-BBZwHOZx.js} +7375 -7022
- package/dist/{index-_VA4Pnh0.js → index-BCwqn9QZ.js} +7 -7
- package/dist/{index-DhvTKq5q.js → index-BPUorytH.js} +4 -4
- package/dist/{index-Bv0pQAKm.js → index-BUYdR_2_.js} +3 -3
- package/dist/{index-dsXoPs-R.js → index-Be1ETcsd.js} +2 -2
- package/dist/{index-DzPck4KP.js → index-BgP8qyHN.js} +8 -8
- package/dist/{index-Da5d3fwp.js → index-BlHGPGWv.js} +5 -5
- package/dist/{index-DYV0hpQH.js → index-Bw4BSPxV.js} +1 -1
- package/dist/{index-C7sX8nhM.js → index-ByEuzHZx.js} +4 -4
- package/dist/{index-CaRBrIAq.js → index-Bz5RbsFD.js} +4 -4
- package/dist/{index-D0O38mRY.js → index-C5VTkzn_.js} +2 -2
- package/dist/{index-Bl7696Ip.js → index-CCLcIWvl.js} +2 -2
- package/dist/{index-CFF__n3Y.js → index-CEp7-6gC.js} +12 -12
- package/dist/{index-exMSL3SY.js → index-CG4RerkJ.js} +4 -4
- package/dist/{index-DcB-G44g.js → index-CGVqIMrP.js} +2 -2
- package/dist/{index-DBbo4s9k.js → index-CRnT53WM.js} +4 -4
- package/dist/{index-DC5RcEOc.js → index-CbMqJqgs.js} +3 -3
- package/dist/{index-C6hlHJIY.js → index-Ch8Y71PT.js} +2 -2
- package/dist/{index-DK_IewAG.js → index-CldzoQ7r.js} +4 -4
- package/dist/{index-Z728trQv.js → index-CnEa77cL.js} +23 -23
- package/dist/{index-DeJyiONQ.js → index-Cs4b_oEO.js} +4 -4
- package/dist/{index-Bcc1VqzM.js → index-D6xLy_9u.js} +3 -3
- package/dist/{index-BVbO8OpG.js → index-DCC9iWUP.js} +5 -5
- package/dist/{index-BKG8vBTH.js → index-DISZZqKI.js} +86 -86
- package/dist/{index-BI9Hw0P1.js → index-DKxX5-s9.js} +4 -4
- package/dist/{index-N4CuUhy-.js → index-DPKtJuhj.js} +7 -7
- package/dist/{index-BnLeUTrv.js → index-DT6SLq6J.js} +101 -101
- package/dist/{index-DU4LpRtI.js → index-Diei326e.js} +8 -8
- package/dist/{index-BuOKQUlP.js → index-DoLlp6XK.js} +6 -6
- package/dist/{index-BlCxko5m.js → index-Dw0RgphK.js} +3 -3
- package/dist/{index-Bjeu20pi.js → index-gICsvOhN.js} +3 -3
- package/dist/{index-ntCxzY89.js → index-iR5Uvd14.js} +3 -3
- package/dist/{index-lpaX5WXm.js → index-u4YndyyJ.js} +7 -7
- package/dist/{index-CeTMfRz9.js → index-wAnKlCQm.js} +7 -7
- package/dist/index.es.js +2 -2
- package/dist/{onramp-Bq5f4u9e.js → onramp-3E-5EGhn.js} +47 -47
- package/dist/{pay-with-exchange-FzBX0cqW.js → pay-with-exchange-DBpQTxCY.js} +17 -17
- package/dist/{receive-B-MbbToF.js → receive-DDXsTS6R.js} +5 -5
- package/dist/{ref-BwSj_fjT.js → ref-CRKmoaio.js} +2 -2
- package/dist/{send-CDGHfct9.js → send-Bp9p9m9K.js} +18 -18
- package/dist/{socials-CYMn3wsS.js → socials-C1MyEZn9.js} +20 -20
- package/dist/{swaps-xU6AjhNq.js → swaps-Hpy8DwH3.js} +11 -11
- package/dist/{transactions-VJ5y1YxP.js → transactions-BV1mkVO3.js} +7 -7
- package/dist/{w3m-modal-C6dJ0BL7.js → w3m-modal-Du6ALWMy.js} +20 -20
- package/package.json +9 -7
- package/dist/AccountIndex-DJmRjgF8.js +0 -119
- package/dist/Earn-DXAaaBgH.js +0 -521
- package/dist/Profile-CPe1Pymh.js +0 -1627
- package/dist/SwapBalls-D14eVMm3.js +0 -279
package/dist/Profile-CPe1Pymh.js
DELETED
|
@@ -1,1627 +0,0 @@
|
|
|
1
|
-
import { createElementBlock as a, openBlock as t, createElementVNode as e, renderSlot as oe, createCommentVNode as i, computed as p, inject as ie, normalizeStyle as fe, toDisplayString as m, ref as h, unref as u, Fragment as B, createTextVNode as b, watch as Be, normalizeClass as k, createBlock as E, renderList as re, withCtx as R, defineComponent as We, onMounted as we, withDirectives as _e, withKeys as ke, vModelText as Ae, resolveDynamicComponent as Qe, mergeProps as Ee, defineAsyncComponent as Ke, createSlots as Ve, createVNode as Je, vShow as Te, nextTick as Xe } from "vue";
|
|
2
|
-
import { p as De, a5 as Ne, a6 as Me, a7 as Le, a8 as je, a9 as $e, V as Oe, m as Ge } from "./index-C-bpIric.js";
|
|
3
|
-
import { storeToRefs as Ce } from "pinia";
|
|
4
|
-
import { _ as Fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
-
const Ze = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAI0AAAB1CAYAAABzn2LRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABnrSURBVHgB7V0JdFzVef5n3/d9tNmSvIDBgZpASdMAcRJoMKQNMZCwBNIkBJwTCgQ4BVIMlMU5YQkkoS5L7aSJWVMcdgIYw8FAbBYDxkACXrAxNsabLEu2pFG/b+YJhJDeaN7cNxrJ851zjwy23rvv3v/++/9fm9RQKVgSicQEh8NxIIbX7/e7mpubc7Nmzep+6qmneqWGGvpj2rRpjkgk/iObzfYB/jNntVr32O32DSCex/Hn65PJzCk+n29qKpVKTp061Scy24p/Z5EqRdVObKygqakps3Hjh1fs2dN5Si6Xc8gna/4p7mKxWDpcLtca/Jt3AoHQazabfUUu1/WW0+nc5PV6t9XX1+8CR+oZ+Hs1jCHMnDnTFo/HZ4AQVuA/c1LY7GIj98mw9IATtXs83vc8Hs9il8v9m3A4dgqIaHIgEIhPmTLFKbVDP3YArhDFRl8H0bNThk8wwyEmcpqdIKZXIOp+B6L8t2g0+rVQKNmSzWbjra2trtmz86LNVNQoVS0ssVjsoI6OjhswDu3t7TVrfT8WURBr3eA+m8Vq/cDlcKwEZ3vPZnO+2Na27U0o2xtBWNtWrFixR2qoPkCJ9QWD4XPAATaLGu5imCOBkKhstzudrjdsN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z7YO+XwTevV/uZKzzGshsn+KPe3t7pO3furI4yjU/Qy9a4iEmdt379msVS8HONbcC8nYRNUV6a2m/kFI/eKhlUdjuhXM+vygRvM6HV+47GG0JGlGDcHs9bybS5XdCrFlAyjaR17rXEol0o/3vtbu4xqezqQXNlj0xTgVEIKLvOLV6/7/pIKHTt6tWrO2UvRJ5oentztGr2uhNTCrRE9kVeb/CSDz5Yt2z71q052ZuBxTjUhHshx4w4Yt87mNKzK9p2rNrB+iGYxWbcIDLaB9uOvardnjtqErwrBWs0mji7CvJ0q2XkTelgMPyrhoaGkhoO7FVADCbt9wcW7uWEQ8uoB36XlYjUf2dMx41UgYnTTHC2WJRGe0cFsXCw4jMWS1yTzTY3Sg3DB/UbEM7NYM+btOqAsUo8eULhN+JbN8Lv8r9akLGmuxTBUGY2L284BAHGUzs7O7/Q1dXFdqJexI4c2u+MZvM8n5BltVpgETnfh1X0sN/vvW39+vV9LWFrKIJim29rampK5nLW1rZdO1o6du6KY6HTWPAwftOC5ff19PTkk6Ot1vyzeIItuVz+Z/7/8c+D/eTfD/bnwf5dH0C09vb2dr6vPzfIv7PfTxn4Z7fbu8Nut7XZbNYNOACbHA73m5FIbHlXl/29deve6EuNqGGYMMIx+nOaSnMdo+/L9ftZI5Ay8f+8FFLxg4KdeQAAAABJRU5ErkJggg==", qe = {}, et = { class: "_p-5 _w-full _flex _flex-col _gap-6 _items-center _overflow-y-scroll-masked _no-scrollbar _relative" }, tt = { class: "_absolute _top-4 _left-4 _z-10" }, at = { class: "_mt-8 _w-full _text-center" }, st = { class: "_size-24 _rounded-full _mx-auto" }, lt = { class: "_mt-5 _flex _flex-col _gap-3 _w-full" }, nt = { class: "_text-5xl _tracking-wide _w-full _text-center _min-w-0" }, ot = { class: "_w-full _flex-1 _flex _flex-col _gap-3" };
|
|
6
|
-
function rt(x, s) {
|
|
7
|
-
return t(), a("div", et, [
|
|
8
|
-
e("div", tt, [
|
|
9
|
-
oe(x.$slots, "admin-controls")
|
|
10
|
-
]),
|
|
11
|
-
e("header", at, [
|
|
12
|
-
e("div", st, [
|
|
13
|
-
oe(x.$slots, "avatar")
|
|
14
|
-
]),
|
|
15
|
-
e("div", lt, [
|
|
16
|
-
e("h2", nt, [
|
|
17
|
-
oe(x.$slots, "title")
|
|
18
|
-
]),
|
|
19
|
-
x.$slots.description ? oe(x.$slots, "description", { key: 0 }) : i("", !0)
|
|
20
|
-
])
|
|
21
|
-
]),
|
|
22
|
-
e("section", ot, [
|
|
23
|
-
oe(x.$slots, "default")
|
|
24
|
-
])
|
|
25
|
-
]);
|
|
26
|
-
}
|
|
27
|
-
const it = /* @__PURE__ */ Fe(qe, [["render", rt]]), ut = ["disabled"], ct = { class: "_size-7 _rounded-lg _overflow-hidden" }, dt = ["src"], _t = { class: "_flex-1 _min-w-0 _truncate _text-center _text-stroke-md _leading-snug" }, ft = { class: "_size-7 _flex _justify-end _items-center" }, mt = {
|
|
28
|
-
key: 0,
|
|
29
|
-
class: "_whitespace-nowrap _leading-snug _pr-[0.25em] _pl-[0.4em] _shadow-panel-inset _rounded-full _text-[0.875em] _tracking-tight"
|
|
30
|
-
}, ne = {
|
|
31
|
-
__name: "AuthButton",
|
|
32
|
-
props: {
|
|
33
|
-
platform: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: "wallet"
|
|
36
|
-
},
|
|
37
|
-
points: {
|
|
38
|
-
type: String,
|
|
39
|
-
default: void 0
|
|
40
|
-
},
|
|
41
|
-
disabled: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
default: !1
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
setup(x) {
|
|
47
|
-
const s = x, A = p(() => De[s.platform]), r = ie("TrifleHub/store");
|
|
48
|
-
let C = !1;
|
|
49
|
-
const D = async (v) => {
|
|
50
|
-
if (!C)
|
|
51
|
-
switch (C = !0, setTimeout(() => {
|
|
52
|
-
C = !1;
|
|
53
|
-
}, 1e3), v) {
|
|
54
|
-
case "discord":
|
|
55
|
-
await y();
|
|
56
|
-
break;
|
|
57
|
-
case "farcaster":
|
|
58
|
-
await z();
|
|
59
|
-
break;
|
|
60
|
-
case "wallet":
|
|
61
|
-
await o();
|
|
62
|
-
break;
|
|
63
|
-
case "twitter":
|
|
64
|
-
await T();
|
|
65
|
-
break;
|
|
66
|
-
case "telegram":
|
|
67
|
-
await w();
|
|
68
|
-
break;
|
|
69
|
-
default:
|
|
70
|
-
throw new Error(`Unsupported platform: ${v}`);
|
|
71
|
-
}
|
|
72
|
-
}, z = async () => {
|
|
73
|
-
console.log("Farcaster connect clicked");
|
|
74
|
-
try {
|
|
75
|
-
await r.connectFarcaster();
|
|
76
|
-
} catch (v) {
|
|
77
|
-
console.error("Farcaster connection failed:", v), r.addNotification({
|
|
78
|
-
type: "error",
|
|
79
|
-
message: "Farcaster login failed. Try again?"
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
}, o = async () => {
|
|
83
|
-
try {
|
|
84
|
-
await r.connectWallet();
|
|
85
|
-
} catch (v) {
|
|
86
|
-
console.error("Wallet connection failed:", v), r.addNotification({
|
|
87
|
-
type: "error",
|
|
88
|
-
message: "Wallet login failed. Try again?"
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
}, y = async () => {
|
|
92
|
-
try {
|
|
93
|
-
await r.connectDiscord();
|
|
94
|
-
} catch (v) {
|
|
95
|
-
v.message.includes("Authentication window closed") && r.addNotification({
|
|
96
|
-
type: "error",
|
|
97
|
-
message: "Discord login failed. Try again?"
|
|
98
|
-
}), console.error("Discord connection failed:", v);
|
|
99
|
-
}
|
|
100
|
-
}, T = async () => {
|
|
101
|
-
try {
|
|
102
|
-
await r.connectTwitter();
|
|
103
|
-
} catch (v) {
|
|
104
|
-
v.message.includes("Authentication window closed") && r.addNotification({
|
|
105
|
-
type: "error",
|
|
106
|
-
message: "TwitterX login failed. Try again?"
|
|
107
|
-
}), console.error("TwitterX connection failed:", v);
|
|
108
|
-
}
|
|
109
|
-
}, w = async () => {
|
|
110
|
-
try {
|
|
111
|
-
await r.connectTelegram();
|
|
112
|
-
} catch (v) {
|
|
113
|
-
console.error("Telegram connection failed:", v), r.addNotification({
|
|
114
|
-
type: "error",
|
|
115
|
-
message: "Telegram login failed. Try again?"
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
return (v, L) => (t(), a("button", {
|
|
120
|
-
class: "_platform-login-btn _bubble-btn-full _p-4.5",
|
|
121
|
-
style: fe({
|
|
122
|
-
filter: `hue-rotate(${A.value.bubbleButtonStyle.hueRotate}deg) saturate(${A.value.bubbleButtonStyle.saturate}) brightness(${A.value.bubbleButtonStyle.brightness || 1})`
|
|
123
|
-
}),
|
|
124
|
-
disabled: s.disabled,
|
|
125
|
-
onClick: L[0] || (L[0] = (M) => s.click || D(s.platform))
|
|
126
|
-
}, [
|
|
127
|
-
e("div", {
|
|
128
|
-
class: "_flex _justify-between _items-center _gap-2.5",
|
|
129
|
-
style: fe({
|
|
130
|
-
filter: `hue-rotate(${A.value.bubbleButtonStyle.hueRotate * -1}deg) saturate(${1 / A.value.bubbleButtonStyle.saturate})`
|
|
131
|
-
})
|
|
132
|
-
}, [
|
|
133
|
-
e("div", ct, [
|
|
134
|
-
e("img", {
|
|
135
|
-
src: A.value.icon,
|
|
136
|
-
class: "_w-full",
|
|
137
|
-
style: fe({ backgroundColor: A.value.iconBgColor })
|
|
138
|
-
}, null, 12, dt)
|
|
139
|
-
]),
|
|
140
|
-
e("div", _t, [
|
|
141
|
-
oe(v.$slots, "default")
|
|
142
|
-
]),
|
|
143
|
-
e("div", ft, [
|
|
144
|
-
s.points ? (t(), a("div", mt, m(s.points) + " 🪩 ", 1)) : i("", !0)
|
|
145
|
-
])
|
|
146
|
-
], 4)
|
|
147
|
-
], 12, ut));
|
|
148
|
-
}
|
|
149
|
-
}, vt = { class: "_flex _flex-col _gap-2ff _bg-metallic-linear _shadow-panel _rounded-lg _p-3 _gap-3" }, pt = { class: "_flex _items-center _justify-between _gap-3" }, gt = { class: "_flex _items-center _gap-2.5 _min-w-0" }, ht = { class: "_flex-1 _min-w-0 _leading-tight" }, yt = { class: "_flex-1 _min-w-0 _truncate _text-em-lg _text-gray-500" }, bt = ["disabled"], xt = { class: "_flex-1 _min-w-0 _truncate _text-center _text-stroke-md _leading-snug" }, wt = {
|
|
150
|
-
key: 0,
|
|
151
|
-
class: "_animate-pulse-deep"
|
|
152
|
-
}, kt = {
|
|
153
|
-
__name: "AuthenticateWalletSection",
|
|
154
|
-
props: {
|
|
155
|
-
walletAddress: String,
|
|
156
|
-
walletAvatar: String,
|
|
157
|
-
displayName: String,
|
|
158
|
-
points: String,
|
|
159
|
-
disabled: {
|
|
160
|
-
type: Boolean,
|
|
161
|
-
default: !1
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
setup(x) {
|
|
165
|
-
const s = De.wallet, A = x, r = ie("TrifleHub/store"), C = h(!1), D = async () => {
|
|
166
|
-
if (A.disabled || r.isSimulationMode) {
|
|
167
|
-
r.addNotification({
|
|
168
|
-
message: "Cannot disconnect wallet in simulation mode",
|
|
169
|
-
type: "error"
|
|
170
|
-
});
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
try {
|
|
174
|
-
await r.disconnect(), r.addNotification({ message: "Wallet disconnected" });
|
|
175
|
-
} catch (o) {
|
|
176
|
-
console.error(o), r.addNotification({ type: "error", message: "Failed to disconnect wallet" });
|
|
177
|
-
}
|
|
178
|
-
}, z = async () => {
|
|
179
|
-
if (A.disabled || r.isSimulationMode) {
|
|
180
|
-
r.addNotification({
|
|
181
|
-
message: "Cannot authenticate wallet in simulation mode",
|
|
182
|
-
type: "error"
|
|
183
|
-
});
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
C.value = !0;
|
|
187
|
-
try {
|
|
188
|
-
await r.authenticateWithWallet(A.walletAddress);
|
|
189
|
-
} catch {
|
|
190
|
-
r.addNotification({ type: "error", message: "Authentication failed" });
|
|
191
|
-
} finally {
|
|
192
|
-
C.value = !1;
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
return (o, y) => (t(), a("section", vt, [
|
|
196
|
-
e("div", pt, [
|
|
197
|
-
e("div", gt, [
|
|
198
|
-
y[0] || (y[0] = e("img", {
|
|
199
|
-
src: Ne,
|
|
200
|
-
class: "_size-7 _rounded-md",
|
|
201
|
-
style: { "background-color": "#f1584d" }
|
|
202
|
-
}, null, -1)),
|
|
203
|
-
e("div", ht, [
|
|
204
|
-
e("div", yt, m(x.displayName), 1)
|
|
205
|
-
])
|
|
206
|
-
]),
|
|
207
|
-
e("button", {
|
|
208
|
-
class: "_bubble-btn _h-10 _text-sm _text-stroke-md _px-[1em]",
|
|
209
|
-
"aria-label": "Disconnect wallet",
|
|
210
|
-
onClick: D,
|
|
211
|
-
title: "Disconnect wallet"
|
|
212
|
-
}, y[1] || (y[1] = [
|
|
213
|
-
e("span", null, "⛌", -1)
|
|
214
|
-
]))
|
|
215
|
-
]),
|
|
216
|
-
e("button", {
|
|
217
|
-
class: "_platform-login-btn _bubble-btn _p-4.5 flex-1 basis-1/2ff min-w-0",
|
|
218
|
-
style: fe({
|
|
219
|
-
filter: `hue-rotate(${u(s).bubbleButtonStyle.hueRotate}deg) saturate(${u(s).bubbleButtonStyle.saturate}) brightness(${u(s).bubbleButtonStyle.brightness || 1})`
|
|
220
|
-
}),
|
|
221
|
-
onClick: z,
|
|
222
|
-
disabled: C.value || x.disabled
|
|
223
|
-
}, [
|
|
224
|
-
e("div", xt, [
|
|
225
|
-
C.value ? (t(), a("span", wt, "Confirm in your wallet...")) : (t(), a(B, { key: 1 }, [
|
|
226
|
-
b("Finish Wallet Login")
|
|
227
|
-
], 64))
|
|
228
|
-
])
|
|
229
|
-
], 12, bt)
|
|
230
|
-
]));
|
|
231
|
-
}
|
|
232
|
-
}, At = /* @__PURE__ */ Fe(kt, [["__scopeId", "data-v-1fad0d64"]]), Ct = { class: "_flex _items-center _gap-2.5 _-mt-1.5" }, St = { class: "_text-mlg _opacity-30 _weight-bold" }, Ut = { class: "_flex _flex-col _gap-0.5" }, zt = { class: "_flex _items-center _gap-2" }, Tt = ["disabled"], Bt = ["onClick"], Dt = ["src"], Nt = {
|
|
233
|
-
key: 1,
|
|
234
|
-
class: "_w-full _flex _items-center _justify-center"
|
|
235
|
-
}, Mt = { class: "_flex-1 _min-w-0 _leading-tight" }, Lt = ["onClick"], jt = {
|
|
236
|
-
key: 0,
|
|
237
|
-
class: "_text-em-2xs _text-primary _leading-none _weight-semibold"
|
|
238
|
-
}, $t = {
|
|
239
|
-
key: 0,
|
|
240
|
-
class: "_opacity-30"
|
|
241
|
-
}, Ft = {
|
|
242
|
-
key: 1,
|
|
243
|
-
class: "_text-em-2xs _text-gray-500 _leading-none _weight-semibold"
|
|
244
|
-
}, Ht = ["onClick"], Yt = { styleff: "filter: hue-rotate(-130deg) saturate(0.5)" }, It = {
|
|
245
|
-
key: 0,
|
|
246
|
-
class: "_flex _items-center _gap-2.5 _-mt-1.5"
|
|
247
|
-
}, Pt = { class: "_space-y-0.5" }, Rt = { class: "_flex _items-center _gap-2" }, Wt = ["disabled"], Qt = ["onClick"], Et = ["src"], Kt = {
|
|
248
|
-
key: 1,
|
|
249
|
-
class: "_w-full _flex _items-center _justify-center"
|
|
250
|
-
}, Vt = { class: "_flex-1 _min-w-0 _leading-tight" }, Jt = { class: "_flex-1 _min-w-0 _truncate _text-em-lg" }, Xt = ["onClick"], Ot = { styleff: "filter: hue-rotate(-130deg) saturate(0.5)" }, Gt = {
|
|
251
|
-
key: 0,
|
|
252
|
-
class: "_flex _items-center _gap-2.5 _-mt-1.5"
|
|
253
|
-
}, Zt = { class: "_space-y-0.5" }, qt = { class: "_flex _items-center _gap-2" }, ea = ["disabled"], ta = ["onClick"], aa = ["src"], sa = {
|
|
254
|
-
key: 1,
|
|
255
|
-
class: "_w-full _flex _items-center _justify-center"
|
|
256
|
-
}, la = { class: "_flex-1 _min-w-0 _leading-tight" }, na = { class: "_flex-1 _min-w-0 _truncate _text-em-lg" }, oa = {
|
|
257
|
-
key: 0,
|
|
258
|
-
class: "_text-em-2xs _text-blue-400 _leading-none"
|
|
259
|
-
}, ra = ["onClick"], ia = { styleff: "filter: hue-rotate(-130deg) saturate(0.5)" }, ua = {
|
|
260
|
-
key: 0,
|
|
261
|
-
class: "_flex _items-center _gap-2.5 _-mt-1.5"
|
|
262
|
-
}, ca = { class: "_space-y-0.5" }, da = { class: "_flex _items-center _gap-2" }, _a = ["disabled"], fa = ["onClick"], ma = ["src"], va = {
|
|
263
|
-
key: 1,
|
|
264
|
-
class: "_w-full _flex _items-center _justify-center"
|
|
265
|
-
}, pa = { class: "_flex-1 _min-w-0 _leading-tight" }, ga = { class: "_flex-1 _min-w-0 _truncate _text-em-lg" }, ha = ["onClick"], ya = { styleff: "filter: hue-rotate(-130deg) saturate(0.5)" }, ba = {
|
|
266
|
-
key: 0,
|
|
267
|
-
class: "_flex _items-center _gap-2.5 _-mt-1.5"
|
|
268
|
-
}, xa = { class: "_space-y-0.5" }, wa = { class: "_flex _items-center _p-2 _pr-3.5 _justify-between _bg-metallic-linear _shadow-panel _rounded-lg" }, ka = { class: "_flex _items-center _gap-2" }, Aa = ["disabled"], Ca = ["onClick"], Sa = ["src"], Ua = {
|
|
269
|
-
key: 1,
|
|
270
|
-
class: "_w-full _flex _items-center _justify-center"
|
|
271
|
-
}, za = { class: "_flex-1 _min-w-0 _leading-tight" }, Ta = { class: "_flex-1 _min-w-0 _truncate _text-em-lg" }, Ba = ["onClick"], Da = { styleff: "filter: hue-rotate(-130deg) saturate(0.5)" }, Na = {
|
|
272
|
-
__name: "AccountSettings",
|
|
273
|
-
setup(x) {
|
|
274
|
-
const s = ie("TrifleHub/store"), { isAuthenticated: A, backendUrl: r } = Ce(s), C = p(() => s.isFarcaster), D = p(() => s.isSuperApp), z = async () => {
|
|
275
|
-
await s.addFrame();
|
|
276
|
-
}, o = p(() => s.getPlatformData("wallet")), y = p(() => s.getPlatformData("discord").filter((_) => _.username)), T = p(() => s.getPlatformData("farcaster")), w = p(() => s.getPlatformData("twitter").filter((_) => _.username)), v = p(() => s.getPlatformData("telegram").filter((_) => _.username)), L = p(() => y.value.length > 0), M = p(() => T.value.length > 0), P = p(() => w.value.length > 0), I = p(() => v.value.length > 0), W = p(
|
|
277
|
-
() => o.value.length + y.value.length + T.value.length + w.value.length + v.value.length
|
|
278
|
-
), N = h({ platform: null, id: null }), J = async (_, f, $) => {
|
|
279
|
-
if ($.stopPropagation(), s.isSimulationMode) {
|
|
280
|
-
s.addNotification({
|
|
281
|
-
message: "Cannot disconnect platforms in simulation mode",
|
|
282
|
-
type: "error"
|
|
283
|
-
});
|
|
284
|
-
return;
|
|
285
|
-
}
|
|
286
|
-
if (N.value.platform === _ && N.value.id === f) {
|
|
287
|
-
try {
|
|
288
|
-
await s.disconnectPlatformInstance(_, f);
|
|
289
|
-
} catch (Q) {
|
|
290
|
-
console.error(`Failed to disconnect ${_} instance:`, Q);
|
|
291
|
-
}
|
|
292
|
-
N.value = { platform: null, id: null };
|
|
293
|
-
return;
|
|
294
|
-
}
|
|
295
|
-
N.value = { platform: _, id: f };
|
|
296
|
-
}, K = () => {
|
|
297
|
-
N.value = { platform: null, id: null };
|
|
298
|
-
};
|
|
299
|
-
Be(N, (_) => {
|
|
300
|
-
_.platform ? window.addEventListener("click", K, { once: !0 }) : window.removeEventListener("click", K);
|
|
301
|
-
});
|
|
302
|
-
const ae = (_) => _ ? `0x${_.slice(2, 6).toUpperCase()}...${_.slice(-4).toUpperCase()}` : "", ue = async () => {
|
|
303
|
-
try {
|
|
304
|
-
await s.disconnect(), console.log("User logged out");
|
|
305
|
-
} catch (_) {
|
|
306
|
-
console.error("Logout failed:", _);
|
|
307
|
-
}
|
|
308
|
-
};
|
|
309
|
-
p(() => s.isWalletAuthenticated(s.accountAddress));
|
|
310
|
-
const j = p(() => s.accountAddress), q = p(() => j.value ? o.value.find((_) => {
|
|
311
|
-
var f, $;
|
|
312
|
-
return ((f = _.id) == null ? void 0 : f.toLowerCase()) === (($ = j.value) == null ? void 0 : $.toLowerCase());
|
|
313
|
-
}) : null), S = async () => {
|
|
314
|
-
try {
|
|
315
|
-
await s.openAccountModal();
|
|
316
|
-
} catch {
|
|
317
|
-
s.addNotification({ type: "error", message: "Couldn't open wallet modal" });
|
|
318
|
-
}
|
|
319
|
-
}, c = async (_, f) => {
|
|
320
|
-
if (s.isSimulationMode) {
|
|
321
|
-
s.addNotification({
|
|
322
|
-
message: "Cannot set avatar in simulation mode",
|
|
323
|
-
type: "error"
|
|
324
|
-
});
|
|
325
|
-
return;
|
|
326
|
-
}
|
|
327
|
-
try {
|
|
328
|
-
if (!(await fetch(`${r.value}/auth/update-avatar`, {
|
|
329
|
-
method: "POST",
|
|
330
|
-
headers: {
|
|
331
|
-
"Content-Type": "application/json",
|
|
332
|
-
Authorization: `Bearer ${s.authToken}`
|
|
333
|
-
},
|
|
334
|
-
body: JSON.stringify({ platform: _, platformId: f })
|
|
335
|
-
})).ok) throw new Error("Failed to set avatar");
|
|
336
|
-
await s.fetchUserStatus(), s.addNotification({ type: "success", message: "Avatar updated!" });
|
|
337
|
-
} catch ($) {
|
|
338
|
-
s.addNotification({ type: "error", message: "Oops, couldn't set avatar. Try again?" }), console.error("Failed to set avatar:", $);
|
|
339
|
-
}
|
|
340
|
-
};
|
|
341
|
-
return (_, f) => {
|
|
342
|
-
var $, Q, ee, me, ve, pe;
|
|
343
|
-
return t(), a("section", {
|
|
344
|
-
class: k(["_flex _flex-col _gap-[inherit]", _.$attrs.class])
|
|
345
|
-
}, [
|
|
346
|
-
e("section", {
|
|
347
|
-
class: k(["_bg-metallic-linear _shadow-panel _p-4 _space-y-1.5 _rounded-lg", { "_order-last": !(($ = o.value) != null && $.length) }])
|
|
348
|
-
}, [
|
|
349
|
-
e("div", Ct, [
|
|
350
|
-
e("h3", St, " wallet" + m(o.value.length > 1 ? "s" : ""), 1)
|
|
351
|
-
]),
|
|
352
|
-
e("ul", Ut, [
|
|
353
|
-
(t(!0), a(B, null, re(o.value, (l) => {
|
|
354
|
-
var F, H, Y, se, ge, ce, le, X;
|
|
355
|
-
return t(), a("li", {
|
|
356
|
-
key: l.id,
|
|
357
|
-
class: k(["_flex _items-center _p-2 _pr-3.5 _justify-between _bg-metallic-linear _shadow-panel _rounded-lg", {
|
|
358
|
-
"_order-first": u(s).accountConnected && l.id.toLowerCase() === ((F = u(s).accountAddress) == null ? void 0 : F.toLowerCase())
|
|
359
|
-
}])
|
|
360
|
-
}, [
|
|
361
|
-
e("div", zt, [
|
|
362
|
-
e("button", {
|
|
363
|
-
class: k(["_size-11 _flex _items-stretch _p-1.5 _group _rounded-md _overflow-hidden", [
|
|
364
|
-
{
|
|
365
|
-
"_shadow-panel": l.avatar,
|
|
366
|
-
"_shadow-panel-inset _bg-metallic-cone _cursor-default": l.avatar === ((H = u(s).user) == null ? void 0 : H.avatar)
|
|
367
|
-
}
|
|
368
|
-
]]),
|
|
369
|
-
disabled: !l.avatar
|
|
370
|
-
}, [
|
|
371
|
-
l.avatar ? (t(), a("div", {
|
|
372
|
-
key: 0,
|
|
373
|
-
onClick: () => c("wallet", l.id),
|
|
374
|
-
style: { background: "none" },
|
|
375
|
-
type: "button",
|
|
376
|
-
title: "Set as profile avatar"
|
|
377
|
-
}, [
|
|
378
|
-
e("img", {
|
|
379
|
-
src: `${l.avatar}`,
|
|
380
|
-
class: k(["_size-full _rounded-full _duration-150", {
|
|
381
|
-
"group-hover:_scale-[1.8]": l.avatar !== ((Y = u(s).user) == null ? void 0 : Y.avatar)
|
|
382
|
-
}])
|
|
383
|
-
}, null, 10, Dt)
|
|
384
|
-
], 8, Bt)) : (t(), a("div", Nt, f[0] || (f[0] = [
|
|
385
|
-
e("img", {
|
|
386
|
-
src: Ne,
|
|
387
|
-
class: "_size-6 _rounded",
|
|
388
|
-
style: { "background-color": "#f1584d" }
|
|
389
|
-
}, null, -1)
|
|
390
|
-
])))
|
|
391
|
-
], 10, Tt),
|
|
392
|
-
e("div", Mt, [
|
|
393
|
-
e("div", {
|
|
394
|
-
onClick: () => {
|
|
395
|
-
var V;
|
|
396
|
-
return l.id.toLowerCase() == ((V = u(s).accountAddress) == null ? void 0 : V.toLowerCase()) && S();
|
|
397
|
-
},
|
|
398
|
-
class: k(["_flex-1 _min-w-0 _truncate _text-em-lg", {
|
|
399
|
-
"_text-stroke-xl _tracking-wide": o.value.length > 1 && u(s).accountConnected && l.id.toLowerCase() === ((se = u(s).accountAddress) == null ? void 0 : se.toLowerCase()),
|
|
400
|
-
"cursor-pointer": l.id.toLowerCase() == ((ge = u(s).accountAddress) == null ? void 0 : ge.toLowerCase())
|
|
401
|
-
}])
|
|
402
|
-
}, m(l.username == l.id ? ae(l.id) : l.username), 11, Lt),
|
|
403
|
-
u(s).accountConnected && l.id.toLowerCase() === ((ce = u(s).accountAddress) == null ? void 0 : ce.toLowerCase()) ? (t(), a("div", jt, [
|
|
404
|
-
f[1] || (f[1] = b(" connected ")),
|
|
405
|
-
(le = l.metadata) != null && le.origin ? (t(), a("span", $t, " via " + m(l.metadata.origin), 1)) : i("", !0)
|
|
406
|
-
])) : (X = l.metadata) != null && X.origin ? (t(), a("div", Ft, " via " + m(l.metadata.origin), 1)) : i("", !0)
|
|
407
|
-
])
|
|
408
|
-
]),
|
|
409
|
-
W.value > 1 ? (t(), a("button", {
|
|
410
|
-
key: 0,
|
|
411
|
-
class: "_bubble-btn _h-10 _text-sm _text-stroke-md _px-[1em]",
|
|
412
|
-
onClick: (V) => J("wallet", l.id, V),
|
|
413
|
-
styleff: "filter: hue-rotate(130deg) saturate(2)",
|
|
414
|
-
"aria-label": "Remove"
|
|
415
|
-
}, [
|
|
416
|
-
e("span", Yt, [
|
|
417
|
-
N.value.platform == "wallet" && N.value.id == l.id ? (t(), a(B, { key: 0 }, [
|
|
418
|
-
b(" Confirm? ")
|
|
419
|
-
], 64)) : (t(), a(B, { key: 1 }, [
|
|
420
|
-
b(" ⛌ ")
|
|
421
|
-
], 64))
|
|
422
|
-
])
|
|
423
|
-
], 8, Ht)) : i("", !0)
|
|
424
|
-
], 2);
|
|
425
|
-
}), 128)),
|
|
426
|
-
u(A) && u(s).accountConnected && u(s).currentWalletNeedsAuth ? (t(), E(At, {
|
|
427
|
-
key: 0,
|
|
428
|
-
"wallet-address": u(s).accountAddress,
|
|
429
|
-
"wallet-avatar": (Q = q.value) == null ? void 0 : Q.avatar,
|
|
430
|
-
"display-name": ((ee = q.value) == null ? void 0 : ee.username) || j.value,
|
|
431
|
-
disabled: u(s).isSimulationMode
|
|
432
|
-
}, {
|
|
433
|
-
default: R(() => [
|
|
434
|
-
b(" Authenticate " + m(ae(u(s).accountAddress)), 1)
|
|
435
|
-
]),
|
|
436
|
-
_: 1
|
|
437
|
-
}, 8, ["wallet-address", "wallet-avatar", "display-name", "disabled"])) : i("", !0),
|
|
438
|
-
u(A) && !u(s).accountConnected ? (t(), E(ne, {
|
|
439
|
-
key: 1,
|
|
440
|
-
platform: "wallet",
|
|
441
|
-
points: o.value.length ? void 0 : "+10",
|
|
442
|
-
disabled: u(s).isSimulationMode,
|
|
443
|
-
class: "_w-full"
|
|
444
|
-
}, {
|
|
445
|
-
default: R(() => [
|
|
446
|
-
b(m(o.value.length > 0 ? "Link another Wallet" : "Link Wallet"), 1)
|
|
447
|
-
]),
|
|
448
|
-
_: 1
|
|
449
|
-
}, 8, ["points", "disabled"])) : i("", !0)
|
|
450
|
-
])
|
|
451
|
-
], 2),
|
|
452
|
-
e("section", {
|
|
453
|
-
class: k(["_bg-metallic-linear _shadow-panel _p-4 _space-y-1.5 _rounded-lg", { "_order-last": !((me = y.value) != null && me.length) }])
|
|
454
|
-
}, [
|
|
455
|
-
y.value.length ? (t(), a("div", It, f[2] || (f[2] = [
|
|
456
|
-
e("h3", { class: "_text-mlg _opacity-30 _weight-bold" }, "discord", -1)
|
|
457
|
-
]))) : i("", !0),
|
|
458
|
-
e("ul", Pt, [
|
|
459
|
-
(t(!0), a(B, null, re(y.value, (l) => {
|
|
460
|
-
var F, H;
|
|
461
|
-
return t(), a("li", {
|
|
462
|
-
key: l.id,
|
|
463
|
-
class: "_flex _items-center _p-2 _pr-3.5 _justify-between _bg-metallic-linear _shadow-panel _rounded-lg"
|
|
464
|
-
}, [
|
|
465
|
-
e("div", Rt, [
|
|
466
|
-
e("button", {
|
|
467
|
-
class: k(["_size-11 _flex _items-stretch _p-1.5 _group _overflow-hidden _rounded-md", [
|
|
468
|
-
{
|
|
469
|
-
"_shadow-panel": l.avatar,
|
|
470
|
-
"_shadow-panel-inset _bg-metallic-cone _cursor-default": l.avatar === ((F = u(s).user) == null ? void 0 : F.avatar)
|
|
471
|
-
}
|
|
472
|
-
]]),
|
|
473
|
-
disabled: !l.avatar
|
|
474
|
-
}, [
|
|
475
|
-
l.avatar ? (t(), a("div", {
|
|
476
|
-
key: 0,
|
|
477
|
-
onClick: () => c("discord", l.id),
|
|
478
|
-
style: { background: "none" },
|
|
479
|
-
type: "button",
|
|
480
|
-
title: "Set as profile avatar"
|
|
481
|
-
}, [
|
|
482
|
-
e("img", {
|
|
483
|
-
src: `${l.avatar}`,
|
|
484
|
-
class: k(["_size-full _rounded-full _duration-150", {
|
|
485
|
-
"group-hover:_scale-[1.8]": l.avatar !== ((H = u(s).user) == null ? void 0 : H.avatar)
|
|
486
|
-
}])
|
|
487
|
-
}, null, 10, Et)
|
|
488
|
-
], 8, Qt)) : (t(), a("div", Kt, f[3] || (f[3] = [
|
|
489
|
-
e("img", {
|
|
490
|
-
src: Me,
|
|
491
|
-
class: "_size-6 _rounded",
|
|
492
|
-
style: { "background-color": "#5865f2" }
|
|
493
|
-
}, null, -1)
|
|
494
|
-
])))
|
|
495
|
-
], 10, Wt),
|
|
496
|
-
e("div", Vt, [
|
|
497
|
-
e("div", Jt, m(l.username), 1)
|
|
498
|
-
])
|
|
499
|
-
]),
|
|
500
|
-
W.value > 1 ? (t(), a("button", {
|
|
501
|
-
key: 0,
|
|
502
|
-
class: "_bubble-btn _h-10 _text-sm _text-stroke-md _px-[1em]",
|
|
503
|
-
onClick: (Y) => J("discord", l.id, Y),
|
|
504
|
-
styleff: "filter: hue-rotate(130deg) saturate(2)",
|
|
505
|
-
"aria-label": "Remove"
|
|
506
|
-
}, [
|
|
507
|
-
e("span", Ot, [
|
|
508
|
-
N.value.platform == "discord" && N.value.id == l.id ? (t(), a(B, { key: 0 }, [
|
|
509
|
-
b(" Confirm? ")
|
|
510
|
-
], 64)) : (t(), a(B, { key: 1 }, [
|
|
511
|
-
b(" ⛌ ")
|
|
512
|
-
], 64))
|
|
513
|
-
])
|
|
514
|
-
], 8, Xt)) : i("", !0)
|
|
515
|
-
]);
|
|
516
|
-
}), 128)),
|
|
517
|
-
L.value ? i("", !0) : (t(), E(ne, {
|
|
518
|
-
key: 0,
|
|
519
|
-
platform: "discord",
|
|
520
|
-
points: "+10",
|
|
521
|
-
disabled: u(s).isSimulationMode,
|
|
522
|
-
class: "_w-full"
|
|
523
|
-
}, {
|
|
524
|
-
default: R(() => [
|
|
525
|
-
b(m(y.value.length > 0 ? "Link Another Discord" : "Link Discord"), 1)
|
|
526
|
-
]),
|
|
527
|
-
_: 1
|
|
528
|
-
}, 8, ["disabled"]))
|
|
529
|
-
])
|
|
530
|
-
], 2),
|
|
531
|
-
e("section", {
|
|
532
|
-
class: k(["_bg-metallic-linear _shadow-panel _p-4 _space-y-1.5 _rounded-lg", { "_order-last": !((ve = w.value) != null && ve.length) }])
|
|
533
|
-
}, [
|
|
534
|
-
w.value.length ? (t(), a("div", Gt, f[4] || (f[4] = [
|
|
535
|
-
e("h3", { class: "_text-mlg _opacity-30 _weight-bold" }, "twitter", -1)
|
|
536
|
-
]))) : i("", !0),
|
|
537
|
-
e("ul", Zt, [
|
|
538
|
-
(t(!0), a(B, null, re(w.value, (l) => {
|
|
539
|
-
var F, H, Y;
|
|
540
|
-
return t(), a("li", {
|
|
541
|
-
key: l.id,
|
|
542
|
-
class: "_flex _items-center _p-2 _pr-3.5 _justify-between _bg-metallic-linear _shadow-panel _rounded-lg"
|
|
543
|
-
}, [
|
|
544
|
-
e("div", qt, [
|
|
545
|
-
e("button", {
|
|
546
|
-
class: k(["_size-11 _flex _items-stretch _p-1.5 _group _overflow-hidden _rounded-md", [
|
|
547
|
-
{
|
|
548
|
-
"_shadow-panel": l.avatar,
|
|
549
|
-
"_shadow-panel-inset _bg-metallic-cone _cursor-default": l.avatar === ((F = u(s).user) == null ? void 0 : F.avatar)
|
|
550
|
-
}
|
|
551
|
-
]]),
|
|
552
|
-
disabled: !l.avatar
|
|
553
|
-
}, [
|
|
554
|
-
l.avatar ? (t(), a("div", {
|
|
555
|
-
key: 0,
|
|
556
|
-
onClick: () => c("twitter", l.id),
|
|
557
|
-
style: { background: "none" },
|
|
558
|
-
type: "button",
|
|
559
|
-
title: "Set as profile avatar"
|
|
560
|
-
}, [
|
|
561
|
-
e("img", {
|
|
562
|
-
src: `${l.avatar}`,
|
|
563
|
-
class: k(["_size-full _rounded-full _duration-150", {
|
|
564
|
-
"group-hover:_scale-[1.8]": l.avatar !== ((H = u(s).user) == null ? void 0 : H.avatar)
|
|
565
|
-
}])
|
|
566
|
-
}, null, 10, aa)
|
|
567
|
-
], 8, ta)) : (t(), a("div", sa, f[5] || (f[5] = [
|
|
568
|
-
e("img", {
|
|
569
|
-
src: Le,
|
|
570
|
-
class: "_size-6 _rounded",
|
|
571
|
-
style: { "background-color": "#000" }
|
|
572
|
-
}, null, -1)
|
|
573
|
-
])))
|
|
574
|
-
], 10, ea),
|
|
575
|
-
e("div", la, [
|
|
576
|
-
e("div", na, m(l.username), 1),
|
|
577
|
-
(Y = l.metadata) != null && Y.verified ? (t(), a("div", oa, " verified ✓ ")) : i("", !0)
|
|
578
|
-
])
|
|
579
|
-
]),
|
|
580
|
-
W.value > 1 ? (t(), a("button", {
|
|
581
|
-
key: 0,
|
|
582
|
-
class: "_bubble-btn _h-10 _text-sm _text-stroke-md _px-[1em]",
|
|
583
|
-
onClick: (se) => J("twitter", l.id, se),
|
|
584
|
-
styleff: "filter: hue-rotate(130deg) saturate(2)",
|
|
585
|
-
"aria-label": "Remove"
|
|
586
|
-
}, [
|
|
587
|
-
e("span", ia, [
|
|
588
|
-
N.value.platform == "twitter" && N.value.id == l.id ? (t(), a(B, { key: 0 }, [
|
|
589
|
-
b(" Confirm? ")
|
|
590
|
-
], 64)) : (t(), a(B, { key: 1 }, [
|
|
591
|
-
b(" ⛌ ")
|
|
592
|
-
], 64))
|
|
593
|
-
])
|
|
594
|
-
], 8, ra)) : i("", !0)
|
|
595
|
-
]);
|
|
596
|
-
}), 128)),
|
|
597
|
-
P.value ? i("", !0) : (t(), E(ne, {
|
|
598
|
-
key: 0,
|
|
599
|
-
platform: "twitter",
|
|
600
|
-
points: "+10",
|
|
601
|
-
disabled: u(s).isSimulationMode,
|
|
602
|
-
class: "_w-full"
|
|
603
|
-
}, {
|
|
604
|
-
default: R(() => [
|
|
605
|
-
b(m(w.value.length > 0 ? "Link Another TwitterX" : "Link TwitterX"), 1)
|
|
606
|
-
]),
|
|
607
|
-
_: 1
|
|
608
|
-
}, 8, ["disabled"]))
|
|
609
|
-
])
|
|
610
|
-
], 2),
|
|
611
|
-
e("section", {
|
|
612
|
-
class: k(["_bg-metallic-linear _shadow-panel _p-4 _space-y-1.5 _rounded-lg", { "_order-last": !((pe = v.value) != null && pe.length) }])
|
|
613
|
-
}, [
|
|
614
|
-
v.value.length ? (t(), a("div", ua, f[6] || (f[6] = [
|
|
615
|
-
e("h3", { class: "_text-mlg _opacity-30 _weight-bold" }, "telegram", -1)
|
|
616
|
-
]))) : i("", !0),
|
|
617
|
-
e("ul", ca, [
|
|
618
|
-
(t(!0), a(B, null, re(v.value, (l) => {
|
|
619
|
-
var F, H;
|
|
620
|
-
return t(), a("li", {
|
|
621
|
-
key: l.id,
|
|
622
|
-
class: "_flex _items-center _p-2 _pr-3.5 _justify-between _bg-metallic-linear _shadow-panel _rounded-lg"
|
|
623
|
-
}, [
|
|
624
|
-
e("div", da, [
|
|
625
|
-
e("button", {
|
|
626
|
-
class: k(["_size-11 _flex _items-stretch _p-1.5 _group _overflow-hidden _rounded-md", [
|
|
627
|
-
{
|
|
628
|
-
"_shadow-panel": l.avatar,
|
|
629
|
-
"_shadow-panel-inset _bg-metallic-cone _cursor-default": l.avatar === ((F = u(s).user) == null ? void 0 : F.avatar)
|
|
630
|
-
}
|
|
631
|
-
]]),
|
|
632
|
-
disabled: !l.avatar
|
|
633
|
-
}, [
|
|
634
|
-
l.avatar ? (t(), a("div", {
|
|
635
|
-
key: 0,
|
|
636
|
-
onClick: () => c("telegram", l.id),
|
|
637
|
-
style: { background: "none" },
|
|
638
|
-
type: "button",
|
|
639
|
-
title: "Set as profile avatar"
|
|
640
|
-
}, [
|
|
641
|
-
e("img", {
|
|
642
|
-
src: `${l.avatar}`,
|
|
643
|
-
class: k(["_size-full _rounded-full _duration-150", {
|
|
644
|
-
"group-hover:_scale-[1.8]": l.avatar !== ((H = u(s).user) == null ? void 0 : H.avatar)
|
|
645
|
-
}])
|
|
646
|
-
}, null, 10, ma)
|
|
647
|
-
], 8, fa)) : (t(), a("div", va, f[7] || (f[7] = [
|
|
648
|
-
e("img", {
|
|
649
|
-
src: je,
|
|
650
|
-
class: "_size-6 _rounded",
|
|
651
|
-
style: { "background-color": "#0088cc" }
|
|
652
|
-
}, null, -1)
|
|
653
|
-
])))
|
|
654
|
-
], 10, _a),
|
|
655
|
-
e("div", pa, [
|
|
656
|
-
e("div", ga, m(l.username), 1)
|
|
657
|
-
])
|
|
658
|
-
]),
|
|
659
|
-
W.value > 1 ? (t(), a("button", {
|
|
660
|
-
key: 0,
|
|
661
|
-
class: "_bubble-btn _h-10 _text-sm _text-stroke-md _px-[1em]",
|
|
662
|
-
onClick: (Y) => J("telegram", l.id, Y),
|
|
663
|
-
styleff: "filter: hue-rotate(130deg) saturate(2)",
|
|
664
|
-
"aria-label": "Remove"
|
|
665
|
-
}, [
|
|
666
|
-
e("span", ya, [
|
|
667
|
-
N.value.platform == "telegram" && N.value.id == l.id ? (t(), a(B, { key: 0 }, [
|
|
668
|
-
b(" Confirm? ")
|
|
669
|
-
], 64)) : (t(), a(B, { key: 1 }, [
|
|
670
|
-
b(" ⛌ ")
|
|
671
|
-
], 64))
|
|
672
|
-
])
|
|
673
|
-
], 8, ha)) : i("", !0)
|
|
674
|
-
]);
|
|
675
|
-
}), 128)),
|
|
676
|
-
I.value ? i("", !0) : (t(), a(B, { key: 0 }, [
|
|
677
|
-
I.value ? i("", !0) : (t(), E(ne, {
|
|
678
|
-
key: 0,
|
|
679
|
-
platform: "telegram",
|
|
680
|
-
points: "+10",
|
|
681
|
-
disabled: u(s).isSimulationMode
|
|
682
|
-
}, {
|
|
683
|
-
default: R(() => [
|
|
684
|
-
b(m(v.value.length > 0 ? "Link Another Telegram" : "Link Telegram"), 1)
|
|
685
|
-
]),
|
|
686
|
-
_: 1
|
|
687
|
-
}, 8, ["disabled"]))
|
|
688
|
-
], 64))
|
|
689
|
-
])
|
|
690
|
-
], 2),
|
|
691
|
-
e("section", {
|
|
692
|
-
class: k(["_bg-metallic-linear _shadow-panel _p-4 _space-y-1.5 _rounded-lg", { "_order-first": u(s).isFarcaster }])
|
|
693
|
-
}, [
|
|
694
|
-
T.value.length ? (t(), a("div", ba, f[8] || (f[8] = [
|
|
695
|
-
e("h3", { class: "_text-mlg _opacity-30 _weight-bold" }, "farcaster", -1)
|
|
696
|
-
]))) : i("", !0),
|
|
697
|
-
e("ul", xa, [
|
|
698
|
-
(t(!0), a(B, null, re(T.value, (l) => {
|
|
699
|
-
var F, H;
|
|
700
|
-
return t(), a("li", {
|
|
701
|
-
key: l.id
|
|
702
|
-
}, [
|
|
703
|
-
e("div", wa, [
|
|
704
|
-
e("div", ka, [
|
|
705
|
-
e("button", {
|
|
706
|
-
class: k(["_size-11 _flex _items-stretch _p-1.5 _group _overflow-hidden _rounded-md", [
|
|
707
|
-
{
|
|
708
|
-
"_shadow-panel": l.avatar,
|
|
709
|
-
"_shadow-panel-inset _bg-metallic-cone _cursor-default": l.avatar === ((F = u(s).user) == null ? void 0 : F.avatar)
|
|
710
|
-
}
|
|
711
|
-
]]),
|
|
712
|
-
disabled: !l.avatar
|
|
713
|
-
}, [
|
|
714
|
-
l.avatar ? (t(), a("div", {
|
|
715
|
-
key: 0,
|
|
716
|
-
onClick: () => c("farcaster", l.id),
|
|
717
|
-
style: { background: "none" },
|
|
718
|
-
type: "button",
|
|
719
|
-
title: "Set as profile avatar"
|
|
720
|
-
}, [
|
|
721
|
-
e("img", {
|
|
722
|
-
src: `${l.avatar}`,
|
|
723
|
-
class: k(["_size-full _rounded-full _duration-150", {
|
|
724
|
-
"group-hover:_scale-[1.8]": l.avatar !== ((H = u(s).user) == null ? void 0 : H.avatar)
|
|
725
|
-
}])
|
|
726
|
-
}, null, 10, Sa)
|
|
727
|
-
], 8, Ca)) : (t(), a("div", Ua, f[9] || (f[9] = [
|
|
728
|
-
e("img", {
|
|
729
|
-
src: $e,
|
|
730
|
-
class: "_size-6 _rounded",
|
|
731
|
-
style: { "background-color": "#000" }
|
|
732
|
-
}, null, -1)
|
|
733
|
-
])))
|
|
734
|
-
], 10, Aa),
|
|
735
|
-
e("div", za, [
|
|
736
|
-
e("div", Ta, m(l.username), 1)
|
|
737
|
-
])
|
|
738
|
-
]),
|
|
739
|
-
W.value > 1 ? (t(), a("button", {
|
|
740
|
-
key: 0,
|
|
741
|
-
class: "_bubble-btn _h-10 _text-sm _text-stroke-md _px-[1em]",
|
|
742
|
-
onClick: (Y) => J("farcaster", l.id, Y),
|
|
743
|
-
styleff: "filter: hue-rotate(130deg) saturate(2)",
|
|
744
|
-
"aria-label": "Remove"
|
|
745
|
-
}, [
|
|
746
|
-
e("span", Da, [
|
|
747
|
-
N.value.platform == "farcaster" && N.value.id == l.id ? (t(), a(B, { key: 0 }, [
|
|
748
|
-
b(" Confirm? ")
|
|
749
|
-
], 64)) : (t(), a(B, { key: 1 }, [
|
|
750
|
-
b(" ⛌ ")
|
|
751
|
-
], 64))
|
|
752
|
-
])
|
|
753
|
-
], 8, Ba)) : i("", !0)
|
|
754
|
-
])
|
|
755
|
-
]);
|
|
756
|
-
}), 128)),
|
|
757
|
-
M.value ? i("", !0) : (t(), E(ne, {
|
|
758
|
-
key: 0,
|
|
759
|
-
platform: "farcaster",
|
|
760
|
-
points: "+10",
|
|
761
|
-
disabled: u(s).isSimulationMode,
|
|
762
|
-
class: "_w-full"
|
|
763
|
-
}, {
|
|
764
|
-
default: R(() => [
|
|
765
|
-
b(m(T.value.length > 0 ? "Link Another Farcaster" : "Link Farcaster"), 1)
|
|
766
|
-
]),
|
|
767
|
-
_: 1
|
|
768
|
-
}, 8, ["disabled"])),
|
|
769
|
-
C.value && !C.value.client.added && D.value ? (t(), E(ne, {
|
|
770
|
-
key: 1,
|
|
771
|
-
platform: "farcaster",
|
|
772
|
-
points: "+10",
|
|
773
|
-
disabled: u(s).isSimulationMode,
|
|
774
|
-
class: "_w-full",
|
|
775
|
-
onClick: z
|
|
776
|
-
}, {
|
|
777
|
-
default: R(() => f[10] || (f[10] = [
|
|
778
|
-
b(" Add this Mini App ")
|
|
779
|
-
])),
|
|
780
|
-
_: 1
|
|
781
|
-
}, 8, ["disabled"])) : i("", !0)
|
|
782
|
-
])
|
|
783
|
-
], 2),
|
|
784
|
-
e("footer", { class: "_order-last _bg-metallic-cone _p-4 _rounded-lg _shadow-panel" }, [
|
|
785
|
-
e("div", { class: "_w-full" }, [
|
|
786
|
-
e("button", {
|
|
787
|
-
onClick: ue,
|
|
788
|
-
class: "_bubble-btn-full _h-16 _text-lg _bold"
|
|
789
|
-
}, f[11] || (f[11] = [
|
|
790
|
-
e("span", null, "logout 💤", -1)
|
|
791
|
-
]))
|
|
792
|
-
])
|
|
793
|
-
])
|
|
794
|
-
], 2);
|
|
795
|
-
};
|
|
796
|
-
}
|
|
797
|
-
}, Ma = { class: "_bg-metallic-linear _shadow-panel _p-4 _space-y-2 _rounded-lg" }, La = { class: "_flex _items-center _justify-between _-mt-1.5" }, ja = {
|
|
798
|
-
key: 0,
|
|
799
|
-
class: "_text-sm _text-red-400"
|
|
800
|
-
}, $a = {
|
|
801
|
-
key: 1,
|
|
802
|
-
class: "_space-y-2"
|
|
803
|
-
}, Fa = { class: "_flex _flex-col _gap-0.5" }, Ha = {
|
|
804
|
-
key: 0,
|
|
805
|
-
class: "_bg-metallic-linear _shadow-panel _p-3 _rounded-lg _flex _flex-col _gap-2.5"
|
|
806
|
-
}, Ya = { class: "_w-full _flex _flex-col _gap-2.5" }, Ia = { class: "_w-full _truncate _min-w-0" }, Pa = {
|
|
807
|
-
key: 0,
|
|
808
|
-
class: "_flex _flex-wrap _gap-[inherit] _text-center"
|
|
809
|
-
}, Ra = { class: "_flex-1 _bg-metallic-linear _shadow-panel _rounded-lg _p-3" }, Wa = { class: "_text-3xl _font-bold _text-primary _leading-tight" }, Qa = { class: "_flex-1 _bg-metallic-linear _shadow-panel _rounded-lg _p-3" }, Ea = { class: "_text-md" }, Ka = {
|
|
810
|
-
key: 0,
|
|
811
|
-
class: "_bg-metallic-linear _shadow-panel _p-3 _rounded-lg _space-y-2"
|
|
812
|
-
}, Va = { class: "_flex _items-center _gap-2" }, Ja = ["disabled"], Xa = ["disabled"], Oa = {
|
|
813
|
-
key: 0,
|
|
814
|
-
class: "_text-xs _text-red-500"
|
|
815
|
-
}, Ga = {
|
|
816
|
-
key: 1,
|
|
817
|
-
class: "_text-xs _text-emerald-300"
|
|
818
|
-
}, Za = {
|
|
819
|
-
key: 1,
|
|
820
|
-
class: "_text-xs _bg-metallic-linear _shadow-panel _px-3 _py-1 _rounded-lg _text-zinc-500"
|
|
821
|
-
}, qa = { class: "" }, es = { class: "_weight-black _text-em-xl _text-black" }, ts = /* @__PURE__ */ We({
|
|
822
|
-
__name: "ReferralSection",
|
|
823
|
-
setup(x) {
|
|
824
|
-
const s = ie("TrifleHub/store"), { backendUrl: A } = Ce(s), r = h(!0), C = h(null), D = h({
|
|
825
|
-
invited: 0,
|
|
826
|
-
qualified: 0,
|
|
827
|
-
points: 0
|
|
828
|
-
}), z = h(""), o = h(null), y = p(() => !!o.value), T = h(""), w = h(!1), v = h(""), L = h(!1), M = h(!1), P = h(!1), I = p(() => {
|
|
829
|
-
var S;
|
|
830
|
-
return ((S = s == null ? void 0 : s.user) == null ? void 0 : S.username) || "";
|
|
831
|
-
}), W = p(() => o.value ? o.value.username || o.value.displayName : "someone"), N = p(() => {
|
|
832
|
-
const S = z.value || I.value;
|
|
833
|
-
return S ? `${window.location.origin}?ref=${S}` : "";
|
|
834
|
-
});
|
|
835
|
-
p(() => N.value.replace("https://", ""));
|
|
836
|
-
const J = () => {
|
|
837
|
-
const S = {
|
|
838
|
-
"Content-Type": "application/json"
|
|
839
|
-
};
|
|
840
|
-
return s != null && s.authToken && (S.Authorization = `Bearer ${s.authToken}`), S;
|
|
841
|
-
}, K = async () => {
|
|
842
|
-
r.value = !0, C.value = null;
|
|
843
|
-
try {
|
|
844
|
-
if (!A.value || !(s != null && s.isAuthenticated)) {
|
|
845
|
-
r.value = !1;
|
|
846
|
-
return;
|
|
847
|
-
}
|
|
848
|
-
const S = await fetch(`${A.value}/profile/me`, {
|
|
849
|
-
headers: {
|
|
850
|
-
Authorization: `Bearer ${s.authToken}`
|
|
851
|
-
}
|
|
852
|
-
});
|
|
853
|
-
let c = null;
|
|
854
|
-
try {
|
|
855
|
-
c = await S.json();
|
|
856
|
-
} catch {
|
|
857
|
-
}
|
|
858
|
-
if (!S.ok) {
|
|
859
|
-
const _ = c && c.error || "";
|
|
860
|
-
if (S.status === 404 || /no route matches/i.test(_)) {
|
|
861
|
-
r.value = !1;
|
|
862
|
-
return;
|
|
863
|
-
}
|
|
864
|
-
C.value = _ || `failed to load referrals (status ${S.status})`;
|
|
865
|
-
return;
|
|
866
|
-
}
|
|
867
|
-
D.value = c.referralStats || { invited: 0, qualified: 0, points: 0 }, z.value = c.referralCode || "", o.value = c.referrer || null;
|
|
868
|
-
} catch (S) {
|
|
869
|
-
console.error("Referral profile fetch error:", S), C.value = S.message || "error loading referrals";
|
|
870
|
-
} finally {
|
|
871
|
-
r.value = !1;
|
|
872
|
-
}
|
|
873
|
-
}, ae = () => {
|
|
874
|
-
N.value && (navigator.clipboard.writeText(N.value), M.value = !0, setTimeout(() => {
|
|
875
|
-
M.value = !1;
|
|
876
|
-
}, 2e3));
|
|
877
|
-
}, ue = () => {
|
|
878
|
-
!z.value || !I.value || (navigator.clipboard.writeText(z.value || I.value), P.value = !0, setTimeout(() => {
|
|
879
|
-
P.value = !1;
|
|
880
|
-
}, 2e3));
|
|
881
|
-
}, j = (S) => {
|
|
882
|
-
const c = S.trim();
|
|
883
|
-
try {
|
|
884
|
-
const _ = new URL(c);
|
|
885
|
-
if (_.hash) {
|
|
886
|
-
const Q = new URLSearchParams(_.hash.substring(1)).get("ref");
|
|
887
|
-
if (Q) return Q;
|
|
888
|
-
}
|
|
889
|
-
const f = _.searchParams.get("ref");
|
|
890
|
-
if (f) return f;
|
|
891
|
-
} catch {
|
|
892
|
-
}
|
|
893
|
-
return c;
|
|
894
|
-
}, q = async () => {
|
|
895
|
-
const S = j(T.value);
|
|
896
|
-
if (!(!S || w.value)) {
|
|
897
|
-
w.value = !0, v.value = "", L.value = !1;
|
|
898
|
-
try {
|
|
899
|
-
const c = await fetch(`${A.value}/profile/referral`, {
|
|
900
|
-
method: "POST",
|
|
901
|
-
headers: J(),
|
|
902
|
-
body: JSON.stringify({ referralCode: S })
|
|
903
|
-
}), _ = await c.json();
|
|
904
|
-
if (!c.ok) {
|
|
905
|
-
_.error === "Already referred" ? v.value = "You already have a referrer" : _.error === "Invalid referral code" ? v.value = "Invalid referral code" : _.error === "Cannot refer yourself" ? v.value = "You can't use your own code" : v.value = _.error || "Something went wrong";
|
|
906
|
-
return;
|
|
907
|
-
}
|
|
908
|
-
L.value = !0, T.value = "", await K();
|
|
909
|
-
} catch (c) {
|
|
910
|
-
console.error("Referral submit error:", c), v.value = c.message || "Something went wrong";
|
|
911
|
-
} finally {
|
|
912
|
-
w.value = !1;
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
};
|
|
916
|
-
return we(() => {
|
|
917
|
-
K();
|
|
918
|
-
}), (S, c) => (t(), a("section", {
|
|
919
|
-
class: k(["_w-full _max-w-2xl", S.$attrs.class])
|
|
920
|
-
}, [
|
|
921
|
-
e("section", Ma, [
|
|
922
|
-
e("div", La, [
|
|
923
|
-
e("h3", {
|
|
924
|
-
class: k(["_text-mlg _weight-bold", { "_animate-pulse-deep": r.value }])
|
|
925
|
-
}, c[1] || (c[1] = [
|
|
926
|
-
e("span", { class: "_opacity-30" }, "invites", -1)
|
|
927
|
-
]), 2)
|
|
928
|
-
]),
|
|
929
|
-
C.value ? (t(), a("div", ja, m(C.value), 1)) : (t(), a("div", $a, [
|
|
930
|
-
e("section", Fa, [
|
|
931
|
-
z.value ? (t(), a("div", Ha, [
|
|
932
|
-
c[4] || (c[4] = e("div", { class: "_text-base" }, [
|
|
933
|
-
b(" Invite a friend and "),
|
|
934
|
-
e("u", null, "you both"),
|
|
935
|
-
b(" get "),
|
|
936
|
-
e("span", { class: "_font-semiboldff _whitespace-nowrap" }, "10🪩"),
|
|
937
|
-
b(" for every 100🪩 they earn ")
|
|
938
|
-
], -1)),
|
|
939
|
-
e("div", Ya, [
|
|
940
|
-
e("button", {
|
|
941
|
-
class: "_flex-1 _bubble-btn _py-4 _weight-black",
|
|
942
|
-
style: { filter: "hue-rotate(20deg) saturate(3)" },
|
|
943
|
-
onClick: ae
|
|
944
|
-
}, m(M.value ? "Copied!" : "Copy Invite Link"), 1),
|
|
945
|
-
e("button", {
|
|
946
|
-
class: "_py-0.5 _border-4 _border-dashed _border-zinc-400 _rounded-lg _px-2 _leading-relaxed _text-center _text-zinc-500 _text-em-lg _text-stroke-3xl",
|
|
947
|
-
onClick: ue
|
|
948
|
-
}, [
|
|
949
|
-
e("div", Ia, m(P.value ? "Copied!" : z.value || I.value), 1)
|
|
950
|
-
])
|
|
951
|
-
]),
|
|
952
|
-
D.value.invited > 0 ? (t(), a("div", Pa, [
|
|
953
|
-
e("div", Ra, [
|
|
954
|
-
e("div", Wa, m(D.value.invited), 1),
|
|
955
|
-
c[2] || (c[2] = e("div", { class: "_text-md" }, "invited", -1))
|
|
956
|
-
]),
|
|
957
|
-
e("div", Qa, [
|
|
958
|
-
e("div", {
|
|
959
|
-
class: k(["_text-3xl _font-bold _leading-tight", { "_text-primary": !D.value.points }])
|
|
960
|
-
}, [
|
|
961
|
-
b(m(D.value.points) + " ", 1),
|
|
962
|
-
D.value.points > 0 ? (t(), a(B, { key: 0 }, [
|
|
963
|
-
b("🪩")
|
|
964
|
-
], 64)) : i("", !0)
|
|
965
|
-
], 2),
|
|
966
|
-
e("div", Ea, [
|
|
967
|
-
D.value.points ? i("", !0) : (t(), a(B, { key: 0 }, [
|
|
968
|
-
b("🪩 ")
|
|
969
|
-
], 64)),
|
|
970
|
-
c[3] || (c[3] = b("earned"))
|
|
971
|
-
])
|
|
972
|
-
])
|
|
973
|
-
])) : i("", !0),
|
|
974
|
-
e("div", {
|
|
975
|
-
class: k(["_text-zinc-500 _text-xs _-my-0.5", { "_text-center": D.value.invited > 0, "_text-right": D.value.invited === 0 }])
|
|
976
|
-
}, " Max 100🪩 per friend ", 2)
|
|
977
|
-
])) : i("", !0)
|
|
978
|
-
]),
|
|
979
|
-
y.value ? (t(), a("div", Za, [
|
|
980
|
-
e("div", qa, [
|
|
981
|
-
c[6] || (c[6] = b(" ♡ You were invited by ")),
|
|
982
|
-
e("span", es, m(W.value), 1),
|
|
983
|
-
c[7] || (c[7] = e("br", null, null, -1)),
|
|
984
|
-
c[8] || (c[8] = b(" You BOTH earn 10🪩 every time YOU earn 100🪩 (max 100) "))
|
|
985
|
-
]),
|
|
986
|
-
c[9] || (c[9] = e("div", { class: "_text-em-2xsff _mt-0.5" }, null, -1))
|
|
987
|
-
])) : (t(), a("div", Ka, [
|
|
988
|
-
c[5] || (c[5] = e("div", { class: "_text-base" }, "Have an invite?", -1)),
|
|
989
|
-
e("div", Va, [
|
|
990
|
-
_e(e("input", {
|
|
991
|
-
"onUpdate:modelValue": c[0] || (c[0] = (_) => T.value = _),
|
|
992
|
-
type: "text",
|
|
993
|
-
placeholder: "enter code or invite link",
|
|
994
|
-
class: "_flex-1 _bg-metallic-linear _shadow-panel-inset _rounded-lg _px-3 _h-10 _text-sm _min-w-0",
|
|
995
|
-
disabled: w.value,
|
|
996
|
-
onKeyup: ke(q, ["enter"])
|
|
997
|
-
}, null, 40, Ja), [
|
|
998
|
-
[Ae, T.value]
|
|
999
|
-
]),
|
|
1000
|
-
e("button", {
|
|
1001
|
-
class: "_bubble-btn _h-12 _text-sm _text-stroke-md _px-[1.5em] _font-bold",
|
|
1002
|
-
disabled: !T.value.trim() || w.value,
|
|
1003
|
-
style: fe({
|
|
1004
|
-
filter: T.value.trim().length > 0 && !w.value ? "hue-rotate(20deg) saturate(3)" : "none"
|
|
1005
|
-
}),
|
|
1006
|
-
onClick: q
|
|
1007
|
-
}, [
|
|
1008
|
-
e("span", {
|
|
1009
|
-
class: k({ "_opacity-30": !T.value.trim() || w.value })
|
|
1010
|
-
}, m(w.value ? "Sending..." : "Apply"), 3)
|
|
1011
|
-
], 12, Xa)
|
|
1012
|
-
]),
|
|
1013
|
-
v.value ? (t(), a("div", Oa, m(v.value), 1)) : i("", !0),
|
|
1014
|
-
L.value ? (t(), a("div", Ga, "invite code applied!")) : i("", !0)
|
|
1015
|
-
]))
|
|
1016
|
-
]))
|
|
1017
|
-
])
|
|
1018
|
-
], 2));
|
|
1019
|
-
}
|
|
1020
|
-
}), as = { class: "_flex _w-full _gap-2.5 _items-stretch" }, ss = { class: "_size-9 _flex-shrink-0" }, ls = ["src"], ns = { class: "_flex-1 _flex _flex-col _gap-[0.25em] _justify-center _min-h-8 _text-left _leading-normal _min-w-0" }, os = { class: "_min-w-0 _leading-[1.1]" }, rs = {
|
|
1021
|
-
key: 0,
|
|
1022
|
-
class: "_weight-semiboldff"
|
|
1023
|
-
}, is = {
|
|
1024
|
-
key: 0,
|
|
1025
|
-
class: "_text-em-2xs _opacity-25 _leading-tight _flex _gap-[0.35em] _truncate"
|
|
1026
|
-
}, us = { class: "_flex _items-center _h-9 _text-em-sm _flex-shrink-0 sm:_text-mlg" }, cs = { class: "_rounded-full _bg-metallic-linear _shadow-panel _pl-[0.5em] _pr-[0.25em] _flex _gap-[0.15em]" }, ds = {
|
|
1027
|
-
__name: "PointCard",
|
|
1028
|
-
props: { point: Object },
|
|
1029
|
-
setup(x) {
|
|
1030
|
-
const s = x, A = p(
|
|
1031
|
-
() => Oe.find((o) => o.name === s.point.name || o.id === s.point.name)
|
|
1032
|
-
), r = (o) => {
|
|
1033
|
-
if (!o) return "";
|
|
1034
|
-
const y = /* @__PURE__ */ new Date(), T = new Date(o), w = y - T, v = Math.floor(w / (1e3 * 60)), L = Math.floor(w / (1e3 * 60 * 60)), M = Math.floor(w / (1e3 * 60 * 60 * 24)), P = Math.floor(M / 7), I = Math.floor(M / 30), W = Math.floor(M / 365);
|
|
1035
|
-
return v < 60 ? `${v}m` : L < 24 ? `${L}h` : M < 7 ? `${M}d` : P < 4 ? `${P}wk` : I < 12 ? `${I}mo` : `${W}y`;
|
|
1036
|
-
}, C = (o) => (o = Number(o), o % 1 === 0 ? o : o.toFixed(2)), D = (o) => {
|
|
1037
|
-
if (!o) return "";
|
|
1038
|
-
const y = new Date(o), T = y.toLocaleString("en-US", { month: "short" }).toUpperCase(), w = y.toLocaleString("en-US", { day: "2-digit" });
|
|
1039
|
-
return `${T} ${w}`;
|
|
1040
|
-
}, z = p(() => {
|
|
1041
|
-
var y;
|
|
1042
|
-
let o;
|
|
1043
|
-
try {
|
|
1044
|
-
o = new URL((y = A.value) == null ? void 0 : y.link), ["farcaster", "discord"].includes(o.host.split(".")[0]) && (o = { host: "trifle", origin: o.href });
|
|
1045
|
-
} catch {
|
|
1046
|
-
}
|
|
1047
|
-
return o;
|
|
1048
|
-
});
|
|
1049
|
-
return (o, y) => (t(), E(Qe(z.value ? "a" : "div"), Ee(z.value ? { href: z.value.origin, target: "_blank" } : {}, {
|
|
1050
|
-
class: ["_bg-metallic-linear _shadow-panel _w-full _p-2 _px-2.5 _pr-3 _rounded-lg _block _flex _items-center _min-h-14", { "mouse:hover:_scale-[1.01] _origin-center _duration-150 _group": z.value }]
|
|
1051
|
-
}), {
|
|
1052
|
-
default: R(() => {
|
|
1053
|
-
var T, w;
|
|
1054
|
-
return [
|
|
1055
|
-
e("header", as, [
|
|
1056
|
-
e("div", ss, [
|
|
1057
|
-
A.value && A.value.icon ? (t(), a("img", {
|
|
1058
|
-
key: 0,
|
|
1059
|
-
src: A.value.icon,
|
|
1060
|
-
class: "_w-full _h-full _rounded-lg _block"
|
|
1061
|
-
}, null, 8, ls)) : i("", !0)
|
|
1062
|
-
]),
|
|
1063
|
-
e("div", ns, [
|
|
1064
|
-
e("div", os, [
|
|
1065
|
-
x.point.name === "anybody-daily" ? (t(), a(B, { key: 0 }, [
|
|
1066
|
-
b("Solved " + m(D(x.point.createdAt)), 1)
|
|
1067
|
-
], 64)) : x.point.name === "gm" ? (t(), a(B, { key: 1 }, [
|
|
1068
|
-
b('"' + m(x.point.extra) + '"', 1)
|
|
1069
|
-
], 64)) : x.point.name === "gm-react" ? (t(), a(B, { key: 2 }, [
|
|
1070
|
-
b(m(!x.point.giver || x.point.giver === "???" ? "someone" : x.point.giver) + " ♥︎ ", 1),
|
|
1071
|
-
x.point.gmMessage ? (t(), a("span", rs, '"' + m(x.point.gmMessage) + '"', 1)) : (t(), a(B, { key: 1 }, [
|
|
1072
|
-
b("your gm")
|
|
1073
|
-
], 64))
|
|
1074
|
-
], 64)) : (t(), a(B, { key: 3 }, [
|
|
1075
|
-
b(m(((T = A.value) == null ? void 0 : T.activityText) || ((w = A.value) == null ? void 0 : w.name) || x.point.name), 1)
|
|
1076
|
-
], 64))
|
|
1077
|
-
]),
|
|
1078
|
-
z.value ? (t(), a("div", is, [
|
|
1079
|
-
e("span", null, m(r(x.point.createdAt)), 1),
|
|
1080
|
-
y[0] || (y[0] = e("span", null, "·", -1)),
|
|
1081
|
-
e("u", null, m(z.value.host), 1)
|
|
1082
|
-
])) : i("", !0)
|
|
1083
|
-
]),
|
|
1084
|
-
e("div", us, [
|
|
1085
|
-
e("div", cs, [
|
|
1086
|
-
e("span", null, m(C(x.point.value)), 1),
|
|
1087
|
-
y[1] || (y[1] = e("div", null, "🪩", -1))
|
|
1088
|
-
])
|
|
1089
|
-
])
|
|
1090
|
-
])
|
|
1091
|
-
];
|
|
1092
|
-
}),
|
|
1093
|
-
_: 1
|
|
1094
|
-
}, 16, ["class"]));
|
|
1095
|
-
}
|
|
1096
|
-
}, _s = {
|
|
1097
|
-
key: 0,
|
|
1098
|
-
class: "_flex _flex-col _gap-2"
|
|
1099
|
-
}, fs = {
|
|
1100
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1101
|
-
class: "_size-5 _opacity-60",
|
|
1102
|
-
fill: "none",
|
|
1103
|
-
viewBox: "0 0 24 24",
|
|
1104
|
-
stroke: "currentColor",
|
|
1105
|
-
style: { "pointer-events": "none" }
|
|
1106
|
-
}, ms = {
|
|
1107
|
-
key: 1,
|
|
1108
|
-
class: "_bg-metallic-linear _shadow-panel _rounded-lg _p-3 _space-y-2 _min-w-[200px]"
|
|
1109
|
-
}, vs = {
|
|
1110
|
-
key: 0,
|
|
1111
|
-
class: "_text-xs _font-semibold _text-center _bg-yellow-500/20 _border _border-yellow-500/40 _rounded _py-1"
|
|
1112
|
-
}, ps = {
|
|
1113
|
-
key: 1,
|
|
1114
|
-
class: "_space-y-2"
|
|
1115
|
-
}, gs = ["disabled"], hs = {
|
|
1116
|
-
key: 0,
|
|
1117
|
-
class: "_h-12 _flex _items-center _gap-1 _w-full _justify-center _border _border-transparent"
|
|
1118
|
-
}, ys = { class: "_text-stroke-2xl _min-w-0 _px-0.5" }, bs = {
|
|
1119
|
-
key: 1,
|
|
1120
|
-
class: "_h-12 _flex _items-center _gap-1 _w-full _justify-center _border _border-transparent"
|
|
1121
|
-
}, xs = { class: "_flex _items-center _gap-1 _w-full _justify-center _pl-[1em]" }, ws = { class: "_text-stroke-2xl _min-w-0 _truncate _px-0.5" }, ks = { class: "_relative _h-12 _flex _items-stretch _gap-0.5 _px-1 _rounded-lg _shadow-panel-inset _text-center _bg-metallic-linear" }, As = { class: "_flex _justify-center _gap-2 _h-10 _items-center" }, Cs = ["href"], Ss = ["href"], Us = ["href"], zs = ["href"], Ts = { class: "_whitespace-nowrap _overflow-x-scroll _no-scrollbar _align-top _-ml-[2px] _p-[2px]" }, Bs = { class: "_flex _justify-end _text-2xl _pl-6" }, Ds = {
|
|
1122
|
-
key: 0,
|
|
1123
|
-
class: "_text-stroke-xl _animate-pulse-deep"
|
|
1124
|
-
}, Ns = {
|
|
1125
|
-
key: 1,
|
|
1126
|
-
class: "_text-stroke-xl"
|
|
1127
|
-
}, Ms = { class: "_inline-flex _flex-col _mr-2 _bg-metallic-linear _shadow-panel _px-3 _py-2 _pb-1.5 _rounded-lg" }, Ls = { class: "_flex _justify-end _text-2xl _gap-[0.1em] _pl-6" }, js = {
|
|
1128
|
-
key: 0,
|
|
1129
|
-
class: "_text-stroke-xl _animate-pulse-deep"
|
|
1130
|
-
}, $s = {
|
|
1131
|
-
key: 1,
|
|
1132
|
-
class: "_text-stroke-xl"
|
|
1133
|
-
}, Fs = { key: 2 }, Hs = { class: "_inline-flex _flex-col _bg-metallic-linear _shadow-panel _px-3 _py-2 _pb-1.5 _rounded-lg" }, Ys = { class: "_flex _justify-end _text-2xl _gap-[0.1em] _pl-6" }, Is = {
|
|
1134
|
-
key: 0,
|
|
1135
|
-
class: "_text-stroke-xl _animate-pulse-deep"
|
|
1136
|
-
}, Ps = {
|
|
1137
|
-
key: 1,
|
|
1138
|
-
class: "_text-stroke-xl"
|
|
1139
|
-
}, Rs = { key: 2 }, Ws = { class: "_w-full _max-w-2xl" }, Qs = { class: "_bg-metallic-linear _shadow-panel _p-4 _space-y-2 _rounded-lg" }, Es = { class: "_flex _items-center _justify-between _-mt-1.5" }, Ks = {
|
|
1140
|
-
key: 0,
|
|
1141
|
-
class: "_flex _items-center _gap-2"
|
|
1142
|
-
}, Vs = {
|
|
1143
|
-
key: 0,
|
|
1144
|
-
class: "_text-xs _opacity-30 _tracking-wide"
|
|
1145
|
-
}, Js = { key: 0 }, Xs = { class: "_flex _items-center _gap-1" }, Os = ["disabled"], Gs = ["disabled"], Zs = {
|
|
1146
|
-
key: 0,
|
|
1147
|
-
class: "_text-sm _text-red-400"
|
|
1148
|
-
}, qs = {
|
|
1149
|
-
key: 1,
|
|
1150
|
-
class: "_flex _flex-col _gap-4"
|
|
1151
|
-
}, el = { class: "_space-y-0.5" }, xe = 3, tl = {
|
|
1152
|
-
__name: "Profile",
|
|
1153
|
-
setup(x) {
|
|
1154
|
-
const s = Ke(() => import("./TrifleBall-BzjRmmn0.js")), A = ie("hub"), r = ie("TrifleHub/store"), { currentProfileUsername: C, backendUrl: D, user: z } = Ce(r), o = h(null), y = h(!0), T = h(null), w = h([]), v = h(!1), L = h(null), M = h(1), P = h(!1), I = h(0), W = p(() => Math.max(1, Math.ceil(I.value / xe))), N = h(null), J = h(0), K = h(!0), ae = p(() => {
|
|
1155
|
-
const d = N.value;
|
|
1156
|
-
if (!d || isNaN(d)) return "—";
|
|
1157
|
-
const n = Number(d), g = n % 10, U = n % 100;
|
|
1158
|
-
return g === 1 && U !== 11 ? `${n}st` : g === 2 && U !== 12 ? `${n}nd` : g === 3 && U !== 13 ? `${n}rd` : `${n}th`;
|
|
1159
|
-
}), ue = p(
|
|
1160
|
-
() => Number(J.value || 0).toLocaleString("en-us")
|
|
1161
|
-
), j = p(() => {
|
|
1162
|
-
var d;
|
|
1163
|
-
return !((d = z.value) != null && d.username) || !C.value ? !1 : z.value.username === C.value;
|
|
1164
|
-
}), q = p(() => {
|
|
1165
|
-
var n, g;
|
|
1166
|
-
return (j.value ? r.getPlatformData("discord") || [] : ((g = (n = o.value) == null ? void 0 : n.linkedAccounts) == null ? void 0 : g.discord) || []).filter((U) => U.username);
|
|
1167
|
-
}), S = p(() => {
|
|
1168
|
-
var n, g;
|
|
1169
|
-
return (j.value ? r.getPlatformData("twitter") || [] : ((g = (n = o.value) == null ? void 0 : n.linkedAccounts) == null ? void 0 : g.twitter) || []).filter((U) => U.username);
|
|
1170
|
-
}), c = p(() => {
|
|
1171
|
-
var n, g;
|
|
1172
|
-
return (j.value ? r.getPlatformData("telegram") || [] : ((g = (n = o.value) == null ? void 0 : n.linkedAccounts) == null ? void 0 : g.telegram) || []).filter((U) => U.username);
|
|
1173
|
-
}), _ = p(() => {
|
|
1174
|
-
var d, n;
|
|
1175
|
-
return j.value ? r.getPlatformData("farcaster") || [] : ((n = (d = o.value) == null ? void 0 : d.linkedAccounts) == null ? void 0 : n.farcaster) || [];
|
|
1176
|
-
}), f = p(() => q.value[0] || null), $ = p(() => S.value[0] || null), Q = p(() => c.value[0] || null), ee = p(() => _.value[0] || null), me = p(
|
|
1177
|
-
() => f.value ? `https://discord.com/users/${f.value.id}` : "#"
|
|
1178
|
-
), ve = p(
|
|
1179
|
-
() => $.value ? `https://x.com/${$.value.username}` : "#"
|
|
1180
|
-
), pe = p(
|
|
1181
|
-
() => Q.value ? `https://t.me/${Q.value.username}` : "#"
|
|
1182
|
-
), l = p(
|
|
1183
|
-
() => ee.value ? `https://warpcast.com/${ee.value.username}` : "#"
|
|
1184
|
-
), F = async () => {
|
|
1185
|
-
y.value = !0, T.value = null;
|
|
1186
|
-
try {
|
|
1187
|
-
const d = await fetch(
|
|
1188
|
-
`${D.value}/auth/by-username?username=${encodeURIComponent(
|
|
1189
|
-
C.value
|
|
1190
|
-
)}`
|
|
1191
|
-
);
|
|
1192
|
-
if (!d.ok) throw new Error("Failed to fetch user");
|
|
1193
|
-
const n = await d.json();
|
|
1194
|
-
console.log({ data: n }), o.value = n.user, console.log({ user: o });
|
|
1195
|
-
} catch (d) {
|
|
1196
|
-
T.value = d.message;
|
|
1197
|
-
} finally {
|
|
1198
|
-
y.value = !1;
|
|
1199
|
-
}
|
|
1200
|
-
}, H = async () => {
|
|
1201
|
-
var d;
|
|
1202
|
-
K.value = !0;
|
|
1203
|
-
try {
|
|
1204
|
-
if (!D.value || !((d = o.value) != null && d.id)) return;
|
|
1205
|
-
const n = new URLSearchParams({
|
|
1206
|
-
sortBy: "count",
|
|
1207
|
-
sortDir: "desc",
|
|
1208
|
-
limit: "1",
|
|
1209
|
-
userId: String(o.value.id)
|
|
1210
|
-
}), g = await fetch(`${D.value}/balls/airdrop-points?${n.toString()}`);
|
|
1211
|
-
if (!g.ok) return;
|
|
1212
|
-
const U = await g.json();
|
|
1213
|
-
U.currentUser && (J.value = U.currentUser.totalBalls || 0, N.value = U.currentUser.rank || null);
|
|
1214
|
-
} catch (n) {
|
|
1215
|
-
console.error("Failed to fetch airdrop info", n);
|
|
1216
|
-
} finally {
|
|
1217
|
-
K.value = !1;
|
|
1218
|
-
}
|
|
1219
|
-
}, Y = async () => {
|
|
1220
|
-
v.value = !0, L.value = null;
|
|
1221
|
-
try {
|
|
1222
|
-
let d = `${D.value}/balls/list?page=${M.value}&limit=${xe}&username=${encodeURIComponent(C.value)}`;
|
|
1223
|
-
const n = await fetch(d);
|
|
1224
|
-
if (!n.ok) throw new Error("Failed to fetch points");
|
|
1225
|
-
const g = await n.json();
|
|
1226
|
-
w.value = g.data, P.value = g.data.length === xe, I.value = g.total || 0;
|
|
1227
|
-
} catch (d) {
|
|
1228
|
-
L.value = d.message;
|
|
1229
|
-
} finally {
|
|
1230
|
-
v.value = !1;
|
|
1231
|
-
}
|
|
1232
|
-
}, se = () => {
|
|
1233
|
-
M.value > 1 && (M.value--, Y());
|
|
1234
|
-
}, ge = () => {
|
|
1235
|
-
P.value && (M.value++, Y());
|
|
1236
|
-
}, ce = async () => {
|
|
1237
|
-
if (!C.value) {
|
|
1238
|
-
y.value = !1;
|
|
1239
|
-
return;
|
|
1240
|
-
}
|
|
1241
|
-
await F(), await Promise.all([H(), Y()]);
|
|
1242
|
-
};
|
|
1243
|
-
we(async () => {
|
|
1244
|
-
console.log("onMounted", C.value), await ce();
|
|
1245
|
-
}), Be(C, async (d, n) => {
|
|
1246
|
-
!d || d === n || (M.value = 1, await ce());
|
|
1247
|
-
});
|
|
1248
|
-
const le = h(!1);
|
|
1249
|
-
we(() => {
|
|
1250
|
-
setTimeout(() => {
|
|
1251
|
-
le.value = !0;
|
|
1252
|
-
}, 350);
|
|
1253
|
-
});
|
|
1254
|
-
const X = h(!1), V = h(""), he = h(!1), Se = async () => {
|
|
1255
|
-
var d;
|
|
1256
|
-
if (V.value) {
|
|
1257
|
-
he.value = !0;
|
|
1258
|
-
try {
|
|
1259
|
-
await r.enterSimulationMode(V.value), X.value = !1, V.value = "", r.addNotification({
|
|
1260
|
-
message: `Entered simulation mode for user: ${(d = r.user) == null ? void 0 : d.username}`,
|
|
1261
|
-
type: "success"
|
|
1262
|
-
});
|
|
1263
|
-
} catch (n) {
|
|
1264
|
-
r.addNotification({
|
|
1265
|
-
message: n.message || "Failed to enter simulation mode",
|
|
1266
|
-
type: "error"
|
|
1267
|
-
});
|
|
1268
|
-
} finally {
|
|
1269
|
-
he.value = !1;
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
}, He = () => {
|
|
1273
|
-
r.exitSimulationMode(), X.value = !1, r.addNotification({
|
|
1274
|
-
message: "Exited simulation mode",
|
|
1275
|
-
type: "success"
|
|
1276
|
-
});
|
|
1277
|
-
}, ye = h(null), de = h(!1), O = h(""), Ue = h(!1), G = h(""), ze = h(!1), te = h(!0);
|
|
1278
|
-
let be;
|
|
1279
|
-
const Ye = async (d) => {
|
|
1280
|
-
var g;
|
|
1281
|
-
if (!d) {
|
|
1282
|
-
te.value = !0, G.value = "";
|
|
1283
|
-
return;
|
|
1284
|
-
}
|
|
1285
|
-
if (d === ((g = z.value) == null ? void 0 : g.username)) {
|
|
1286
|
-
te.value = !0, G.value = "";
|
|
1287
|
-
return;
|
|
1288
|
-
}
|
|
1289
|
-
if (!/^(?!.*--)[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$/.test(d)) {
|
|
1290
|
-
G.value = "Username must be alphanumeric";
|
|
1291
|
-
return;
|
|
1292
|
-
}
|
|
1293
|
-
if (d.length > 22) {
|
|
1294
|
-
G.value = "Username must be 22 characters or less";
|
|
1295
|
-
return;
|
|
1296
|
-
}
|
|
1297
|
-
ze.value = !0;
|
|
1298
|
-
try {
|
|
1299
|
-
const U = await fetch(
|
|
1300
|
-
`${D.value}/auth/username/check?username=${encodeURIComponent(d)}`
|
|
1301
|
-
);
|
|
1302
|
-
if (!U.ok) throw new Error("Failed to check username availability");
|
|
1303
|
-
const Z = await U.json();
|
|
1304
|
-
te.value = Z.available, G.value = Z.available ? "" : "This username is already taken";
|
|
1305
|
-
} catch (U) {
|
|
1306
|
-
console.error("Failed to check username:", U), G.value = "Error checking username";
|
|
1307
|
-
} finally {
|
|
1308
|
-
ze.value = !1;
|
|
1309
|
-
}
|
|
1310
|
-
}, Ie = (d) => {
|
|
1311
|
-
const n = d.target.value.trim();
|
|
1312
|
-
O.value = n, G.value = "", be && clearTimeout(be), n ? be = setTimeout(() => Ye(n), 500) : te.value = !0;
|
|
1313
|
-
}, Pe = async () => {
|
|
1314
|
-
var d, n, g;
|
|
1315
|
-
if (j.value) {
|
|
1316
|
-
if (r.isSimulationMode) {
|
|
1317
|
-
r.addNotification({
|
|
1318
|
-
message: "Cannot edit username in simulation mode",
|
|
1319
|
-
type: "error"
|
|
1320
|
-
});
|
|
1321
|
-
return;
|
|
1322
|
-
}
|
|
1323
|
-
G.value = "", O.value = ((d = z.value) == null ? void 0 : d.username) || "", de.value = !0, te.value = !0, await Xe(), (n = ye.value) == null || n.focus(), (g = ye.value) == null || g.select();
|
|
1324
|
-
}
|
|
1325
|
-
}, Re = async () => {
|
|
1326
|
-
var d;
|
|
1327
|
-
if (!O.value.trim()) {
|
|
1328
|
-
r.addNotification({ type: "error", message: "Oops, name can't be empty!" });
|
|
1329
|
-
return;
|
|
1330
|
-
}
|
|
1331
|
-
if (!te.value) {
|
|
1332
|
-
r.addNotification({ type: "error", message: "This name is already taken" });
|
|
1333
|
-
return;
|
|
1334
|
-
}
|
|
1335
|
-
if (O.value.trim() === ((d = z.value) == null ? void 0 : d.username)) {
|
|
1336
|
-
de.value = !1;
|
|
1337
|
-
return;
|
|
1338
|
-
}
|
|
1339
|
-
Ue.value = !0;
|
|
1340
|
-
try {
|
|
1341
|
-
await r.updateUsername(O.value.trim()), de.value = !1, r.addNotification({ type: "success", message: "Name updated!" });
|
|
1342
|
-
} catch (n) {
|
|
1343
|
-
console.error("Failed to update name:", n), r.addNotification({ type: "error", message: "Hmm, something went wrong" });
|
|
1344
|
-
} finally {
|
|
1345
|
-
Ue.value = !1;
|
|
1346
|
-
}
|
|
1347
|
-
};
|
|
1348
|
-
return (d, n) => (t(), E(it, null, Ve({
|
|
1349
|
-
"admin-controls": R(() => [
|
|
1350
|
-
j.value && u(r).isAdmin ? (t(), a("div", _s, [
|
|
1351
|
-
!X.value && !u(r).isSimulationMode ? (t(), a("button", {
|
|
1352
|
-
key: 0,
|
|
1353
|
-
class: "_p-2 _bg-metallic-linear _shadow-panel _rounded-full _cursor-pointer mouse:hover:_scale-110 _duration-150",
|
|
1354
|
-
onClick: n[0] || (n[0] = (g) => X.value = !0),
|
|
1355
|
-
title: "Admin Mode"
|
|
1356
|
-
}, [
|
|
1357
|
-
(t(), a("svg", fs, n[5] || (n[5] = [
|
|
1358
|
-
e("path", {
|
|
1359
|
-
"stroke-linecap": "round",
|
|
1360
|
-
"stroke-linejoin": "round",
|
|
1361
|
-
"stroke-width": "2",
|
|
1362
|
-
d: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z",
|
|
1363
|
-
style: { "pointer-events": "none" }
|
|
1364
|
-
}, null, -1),
|
|
1365
|
-
e("path", {
|
|
1366
|
-
"stroke-linecap": "round",
|
|
1367
|
-
"stroke-linejoin": "round",
|
|
1368
|
-
"stroke-width": "2",
|
|
1369
|
-
d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z",
|
|
1370
|
-
style: { "pointer-events": "none" }
|
|
1371
|
-
}, null, -1)
|
|
1372
|
-
])))
|
|
1373
|
-
])) : i("", !0),
|
|
1374
|
-
X.value || u(r).isSimulationMode ? (t(), a("div", ms, [
|
|
1375
|
-
u(r).isSimulationMode ? (t(), a("div", vs, " SIMULATION MODE ")) : i("", !0),
|
|
1376
|
-
u(r).isSimulationMode ? i("", !0) : (t(), a("div", ps, [
|
|
1377
|
-
_e(e("input", {
|
|
1378
|
-
"onUpdate:modelValue": n[1] || (n[1] = (g) => V.value = g),
|
|
1379
|
-
type: "text",
|
|
1380
|
-
placeholder: "Username or ID",
|
|
1381
|
-
autocomplete: "off",
|
|
1382
|
-
"data-1p-ignore": "",
|
|
1383
|
-
class: "_w-full _px-2 _py-1 _text-sm _font-normal _rounded _bg-black/20 _border _border-white/10 _outline-none focus:_border-white/30",
|
|
1384
|
-
onKeyup: ke(Se, ["enter"])
|
|
1385
|
-
}, null, 544), [
|
|
1386
|
-
[Ae, V.value]
|
|
1387
|
-
]),
|
|
1388
|
-
e("button", {
|
|
1389
|
-
class: "_w-full _px-3 _py-1 _text-sm _bg-blue-500/80 _rounded mouse:hover:_bg-blue-500 _duration-150",
|
|
1390
|
-
disabled: !V.value || he.value,
|
|
1391
|
-
onClick: Se
|
|
1392
|
-
}, m(he.value ? "Loading..." : "Simulate User"), 9, gs),
|
|
1393
|
-
e("button", {
|
|
1394
|
-
class: "_w-full _px-3 _py-1 _text-xs _bg-white/10 _rounded mouse:hover:_bg-white/20 _duration-150",
|
|
1395
|
-
onClick: n[2] || (n[2] = (g) => X.value = !1)
|
|
1396
|
-
}, " Cancel ")
|
|
1397
|
-
])),
|
|
1398
|
-
u(r).isSimulationMode ? (t(), a("button", {
|
|
1399
|
-
key: 2,
|
|
1400
|
-
class: "_w-full _px-3 _py-1.5 _text-sm _bg-red-500/80 _rounded mouse:hover:_bg-red-500 _duration-150 _font-semibold",
|
|
1401
|
-
onClick: He
|
|
1402
|
-
}, " Exit Simulation ")) : i("", !0)
|
|
1403
|
-
])) : i("", !0)
|
|
1404
|
-
])) : i("", !0)
|
|
1405
|
-
]),
|
|
1406
|
-
avatar: R(() => {
|
|
1407
|
-
var g, U;
|
|
1408
|
-
return [
|
|
1409
|
-
e("div", {
|
|
1410
|
-
class: k(["_size-full _flex _items-center _justify-center _rounded-full _duration-150 _delay-50", { "_opacity-0": !le.value }]),
|
|
1411
|
-
style: { "box-shadow": "0 16px 24px 2px rgba(0, 0, 0, 0.4)" }
|
|
1412
|
-
}, [
|
|
1413
|
-
le.value ? (t(), E(u(s), {
|
|
1414
|
-
key: o.value && ((g = o.value) == null ? void 0 : g.avatar) || "smiley-face",
|
|
1415
|
-
mode: "glass-inner-wall",
|
|
1416
|
-
"image-source": o.value && ((U = o.value) == null ? void 0 : U.avatar) || u(Ge),
|
|
1417
|
-
style: { width: "175%", height: "175%" },
|
|
1418
|
-
class: "_cursor-grab"
|
|
1419
|
-
}, null, 8, ["image-source"])) : i("", !0)
|
|
1420
|
-
], 2)
|
|
1421
|
-
];
|
|
1422
|
-
}),
|
|
1423
|
-
title: R(() => {
|
|
1424
|
-
var g, U;
|
|
1425
|
-
return [
|
|
1426
|
-
j.value ? (t(), a("div", bs, [
|
|
1427
|
-
_e(e("div", xs, [
|
|
1428
|
-
e("span", ws, m(((U = u(z)) == null ? void 0 : U.username) || "Not set"), 1),
|
|
1429
|
-
e("button", {
|
|
1430
|
-
class: "_p-1 _-m-0.5 _leading-none _flex-shrink-0 _block mouse:hover:_scale-[1.2] _duration-150 _rounded-md",
|
|
1431
|
-
onClick: Pe
|
|
1432
|
-
}, n[6] || (n[6] = [
|
|
1433
|
-
e("img", {
|
|
1434
|
-
src: Ze,
|
|
1435
|
-
class: "_h-[0.72em] _opacity-20 _pointer-events-none"
|
|
1436
|
-
}, null, -1)
|
|
1437
|
-
]))
|
|
1438
|
-
], 512), [
|
|
1439
|
-
[Te, !de.value]
|
|
1440
|
-
]),
|
|
1441
|
-
_e(e("div", ks, [
|
|
1442
|
-
_e(e("input", {
|
|
1443
|
-
ref_key: "usernameInput",
|
|
1444
|
-
ref: ye,
|
|
1445
|
-
"onUpdate:modelValue": n[3] || (n[3] = (Z) => O.value = Z),
|
|
1446
|
-
type: "text",
|
|
1447
|
-
maxlength: "22",
|
|
1448
|
-
autocomplete: "off",
|
|
1449
|
-
"data-1p-ignore": "",
|
|
1450
|
-
class: k(["_flex-1 _text-stroke-2xl _bg-transparent _text-center _w-full _outline-none", { "_border-red-500": !te.value && O.value }]),
|
|
1451
|
-
placeholder: "Enter new username",
|
|
1452
|
-
onInput: Ie,
|
|
1453
|
-
onKeyup: ke(Re, ["enter"])
|
|
1454
|
-
}, null, 34), [
|
|
1455
|
-
[Ae, O.value]
|
|
1456
|
-
])
|
|
1457
|
-
], 512), [
|
|
1458
|
-
[Te, de.value]
|
|
1459
|
-
])
|
|
1460
|
-
])) : (t(), a("div", hs, [
|
|
1461
|
-
e("span", ys, m(((g = o.value) == null ? void 0 : g.username) || "..."), 1)
|
|
1462
|
-
]))
|
|
1463
|
-
];
|
|
1464
|
-
}),
|
|
1465
|
-
default: R(() => {
|
|
1466
|
-
var g, U;
|
|
1467
|
-
return [
|
|
1468
|
-
e("section", Ts, [
|
|
1469
|
-
e("section", {
|
|
1470
|
-
class: "_inline-flex _flex-col _mr-2 _bg-metallic-linear _shadow-panel _px-3 _py-2 _pb-1.5 _rounded-lg",
|
|
1471
|
-
onClick: n[4] || (n[4] = (Z) => u(A).openHub("leaderboard"))
|
|
1472
|
-
}, [
|
|
1473
|
-
n[11] || (n[11] = e("header", { class: "_flex _justify-between _items-center _opacity-30 _text-base _leading-snug" }, [
|
|
1474
|
-
e("h3", { class: "_weight-black" }, "rank")
|
|
1475
|
-
], -1)),
|
|
1476
|
-
e("div", Bs, [
|
|
1477
|
-
K.value ? (t(), a("span", Ds, "...")) : (t(), a("span", Ns, m(ae.value), 1))
|
|
1478
|
-
])
|
|
1479
|
-
]),
|
|
1480
|
-
e("section", Ms, [
|
|
1481
|
-
n[12] || (n[12] = e("header", { class: "_flex _justify-between _items-center _opacity-30 _text-base _leading-snug" }, [
|
|
1482
|
-
e("h3", { class: "_weight-black" }, "airdrop points")
|
|
1483
|
-
], -1)),
|
|
1484
|
-
e("div", Ls, [
|
|
1485
|
-
K.value ? (t(), a("span", js, "...")) : (t(), a("span", $s, m(ue.value), 1)),
|
|
1486
|
-
K.value ? i("", !0) : (t(), a("span", Fs, "🪂"))
|
|
1487
|
-
])
|
|
1488
|
-
]),
|
|
1489
|
-
e("section", Hs, [
|
|
1490
|
-
n[13] || (n[13] = e("header", { class: "_flex _justify-between _opacity-30 _text-base _leading-snug" }, [
|
|
1491
|
-
e("h3", { class: "_weight-black" }, "balance")
|
|
1492
|
-
], -1)),
|
|
1493
|
-
e("div", Ys, [
|
|
1494
|
-
y.value ? (t(), a("span", Is, "...")) : (t(), a("span", Ps, m(((U = (g = o.value) == null ? void 0 : g.totalPoints) == null ? void 0 : U.toLocaleString()) || 0), 1)),
|
|
1495
|
-
y.value ? i("", !0) : (t(), a("span", Rs, "🪩"))
|
|
1496
|
-
])
|
|
1497
|
-
])
|
|
1498
|
-
]),
|
|
1499
|
-
e("section", Ws, [
|
|
1500
|
-
e("section", Qs, [
|
|
1501
|
-
e("div", Es, [
|
|
1502
|
-
e("h3", {
|
|
1503
|
-
class: k(["_text-mlg _weight-bold", { "_animate-pulse-deep": v.value }])
|
|
1504
|
-
}, n[14] || (n[14] = [
|
|
1505
|
-
e("span", { class: "_opacity-30" }, "activity", -1)
|
|
1506
|
-
]), 2),
|
|
1507
|
-
W.value > 1 ? (t(), a("div", Ks, [
|
|
1508
|
-
M.value > 1 ? (t(), a("div", Vs, [
|
|
1509
|
-
b(" Page " + m(M.value), 1),
|
|
1510
|
-
I.value ? (t(), a("span", Js, " of " + m(W.value), 1)) : i("", !0)
|
|
1511
|
-
])) : i("", !0),
|
|
1512
|
-
e("div", Xs, [
|
|
1513
|
-
e("button", {
|
|
1514
|
-
class: k(["_size-8 _flex _items-center _justify-center _rounded-lg _bg-metallic-cone _shadow-panel _text-xl mouse:hover:_scale-[1.05] _duration-150", { "_opacity-30 _cursor-default": M.value === 1 }]),
|
|
1515
|
-
onClick: se,
|
|
1516
|
-
disabled: M.value === 1,
|
|
1517
|
-
"aria-label": "Previous page"
|
|
1518
|
-
}, " ← ", 10, Os),
|
|
1519
|
-
e("button", {
|
|
1520
|
-
class: k(["_size-8 _flex _items-center _justify-center _rounded-lg _bg-metallic-cone _shadow-panel _text-xl mouse:hover:_scale-[1.05] _duration-150", { "_opacity-30 _cursor-default": !P.value }]),
|
|
1521
|
-
onClick: ge,
|
|
1522
|
-
disabled: !P.value,
|
|
1523
|
-
"aria-label": "Next page"
|
|
1524
|
-
}, " → ", 10, Gs)
|
|
1525
|
-
])
|
|
1526
|
-
])) : i("", !0)
|
|
1527
|
-
]),
|
|
1528
|
-
L.value ? (t(), a("div", Zs, m(L.value), 1)) : w.value.length ? (t(), a("section", qs, [
|
|
1529
|
-
e("ul", el, [
|
|
1530
|
-
(t(!0), a(B, null, re(w.value, (Z) => (t(), a("li", {
|
|
1531
|
-
key: Z.id
|
|
1532
|
-
}, [
|
|
1533
|
-
Je(ds, { point: Z }, null, 8, ["point"])
|
|
1534
|
-
]))), 128))
|
|
1535
|
-
])
|
|
1536
|
-
])) : i("", !0)
|
|
1537
|
-
])
|
|
1538
|
-
]),
|
|
1539
|
-
j.value ? (t(), E(ts, {
|
|
1540
|
-
key: 0,
|
|
1541
|
-
class: "_w-full _max-w-2xl"
|
|
1542
|
-
})) : i("", !0),
|
|
1543
|
-
j.value ? (t(), E(Na, {
|
|
1544
|
-
key: 1,
|
|
1545
|
-
class: "_w-full _max-w-2xl"
|
|
1546
|
-
})) : i("", !0)
|
|
1547
|
-
];
|
|
1548
|
-
}),
|
|
1549
|
-
_: 2
|
|
1550
|
-
}, [
|
|
1551
|
-
!j.value && (f.value || $.value || Q.value || ee.value) ? {
|
|
1552
|
-
name: "description",
|
|
1553
|
-
fn: R(() => [
|
|
1554
|
-
e("div", As, [
|
|
1555
|
-
f.value ? (t(), a("a", {
|
|
1556
|
-
key: 0,
|
|
1557
|
-
href: me.value,
|
|
1558
|
-
target: "_blank",
|
|
1559
|
-
rel: "noopener noreferrer",
|
|
1560
|
-
class: "_p-1.5 _flex _items-center _justify-center _rounded-lg _bg-metallic-cone _shadow-panel",
|
|
1561
|
-
"aria-label": "View Discord profile"
|
|
1562
|
-
}, n[7] || (n[7] = [
|
|
1563
|
-
e("img", {
|
|
1564
|
-
src: Me,
|
|
1565
|
-
class: "_size-7 _rounded",
|
|
1566
|
-
style: { "background-color": "#5865f2" }
|
|
1567
|
-
}, null, -1)
|
|
1568
|
-
]), 8, Cs)) : i("", !0),
|
|
1569
|
-
$.value ? (t(), a("a", {
|
|
1570
|
-
key: 1,
|
|
1571
|
-
href: ve.value,
|
|
1572
|
-
target: "_blank",
|
|
1573
|
-
rel: "noopener noreferrer",
|
|
1574
|
-
class: "_p-1.5 _flex _items-center _justify-center _rounded-lg _bg-metallic-cone _shadow-panel",
|
|
1575
|
-
"aria-label": "View Twitter profile"
|
|
1576
|
-
}, n[8] || (n[8] = [
|
|
1577
|
-
e("img", {
|
|
1578
|
-
src: Le,
|
|
1579
|
-
class: "_size-7 _rounded",
|
|
1580
|
-
style: { "background-color": "#000" }
|
|
1581
|
-
}, null, -1)
|
|
1582
|
-
]), 8, Ss)) : i("", !0),
|
|
1583
|
-
Q.value ? (t(), a("a", {
|
|
1584
|
-
key: 2,
|
|
1585
|
-
href: pe.value,
|
|
1586
|
-
target: "_blank",
|
|
1587
|
-
rel: "noopener noreferrer",
|
|
1588
|
-
class: "_p-1.5 _flex _items-center _justify-center _rounded-lg _bg-metallic-cone _shadow-panel",
|
|
1589
|
-
"aria-label": "View Telegram profile"
|
|
1590
|
-
}, n[9] || (n[9] = [
|
|
1591
|
-
e("img", {
|
|
1592
|
-
src: je,
|
|
1593
|
-
class: "_size-7 _rounded",
|
|
1594
|
-
style: { "background-color": "#0088cc" }
|
|
1595
|
-
}, null, -1)
|
|
1596
|
-
]), 8, Us)) : i("", !0),
|
|
1597
|
-
ee.value ? (t(), a("a", {
|
|
1598
|
-
key: 3,
|
|
1599
|
-
href: l.value,
|
|
1600
|
-
target: "_blank",
|
|
1601
|
-
rel: "noopener noreferrer",
|
|
1602
|
-
class: "_p-1.5 _flex _items-center _justify-center _rounded-lg _bg-metallic-cone _shadow-panel",
|
|
1603
|
-
"aria-label": "View Farcaster profile"
|
|
1604
|
-
}, n[10] || (n[10] = [
|
|
1605
|
-
e("img", {
|
|
1606
|
-
src: $e,
|
|
1607
|
-
class: "_size-7 _rounded",
|
|
1608
|
-
style: { "background-color": "#000" }
|
|
1609
|
-
}, null, -1)
|
|
1610
|
-
]), 8, zs)) : i("", !0)
|
|
1611
|
-
])
|
|
1612
|
-
]),
|
|
1613
|
-
key: "0"
|
|
1614
|
-
} : void 0
|
|
1615
|
-
]), 1024));
|
|
1616
|
-
}
|
|
1617
|
-
}, ol = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1618
|
-
__proto__: null,
|
|
1619
|
-
default: tl
|
|
1620
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
1621
|
-
export {
|
|
1622
|
-
it as A,
|
|
1623
|
-
ol as P,
|
|
1624
|
-
At as S,
|
|
1625
|
-
ne as _,
|
|
1626
|
-
tl as a
|
|
1627
|
-
};
|