@directcryptopay/sdk 0.2.4 → 0.3.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.
- package/README.md +51 -87
- package/dist/core/config.d.ts +9 -46
- package/dist/core/iframe.d.ts +16 -0
- package/dist/dcp-sdk.umd.js +1 -12811
- package/dist/dcp.d.ts +12 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +219 -2
- package/dist/types.d.ts +26 -164
- package/package.json +3 -13
- package/dist/ExchangeController-CbO41bcH.js +0 -217
- package/dist/HelpersUtil-DHm6EVSE.js +0 -120
- package/dist/NavigationUtil-kj9LEOOd.js +0 -8
- package/dist/PhArrowCircleDown-lsK25DCk.js +0 -73
- package/dist/PhArrowClockwise-NeKHZ1co.js +0 -73
- package/dist/PhArrowDown-C9AkNvLs.js +0 -73
- package/dist/PhArrowLeft-RNfIQP1X.js +0 -73
- package/dist/PhArrowRight-DM1tna0G.js +0 -73
- package/dist/PhArrowSquareOut-S5XYbAZj.js +0 -73
- package/dist/PhArrowUp-DmktzOWy.js +0 -73
- package/dist/PhArrowUpRight-BkNeW_5i.js +0 -73
- package/dist/PhArrowsClockwise-CQ4pG76b.js +0 -73
- package/dist/PhArrowsDownUp-H6gxaNM6.js +0 -73
- package/dist/PhArrowsLeftRight-DZSsfMR6.js +0 -73
- package/dist/PhBank-4_9QzqIB.js +0 -73
- package/dist/PhBrowser-B-JSznId.js +0 -73
- package/dist/PhCaretDown-vV5oHMNi.js +0 -73
- package/dist/PhCaretLeft-BLo6Y_f4.js +0 -73
- package/dist/PhCaretRight-CqQN4TT3.js +0 -73
- package/dist/PhCaretUp-Df7UCAHy.js +0 -73
- package/dist/PhCheck-gtpfK4ed.js +0 -73
- package/dist/PhCircleHalf-Uq7dwDYw.js +0 -73
- package/dist/PhClock-SDCW-NmF.js +0 -73
- package/dist/PhCompass-B7hgtdx-.js +0 -73
- package/dist/PhCopy-BcnhyXCy.js +0 -73
- package/dist/PhCreditCard-BJjByVgu.js +0 -73
- package/dist/PhCurrencyDollar-B7ZXqXBy.js +0 -73
- package/dist/PhDesktop-B3VKPuJx.js +0 -73
- package/dist/PhDeviceMobile-Bnd0TYEH.js +0 -73
- package/dist/PhDotsThree-yyMWyZ-R.js +0 -73
- package/dist/PhEnvelope-67uzHbI9.js +0 -73
- package/dist/PhFunnelSimple-B-DCsloI.js +0 -73
- package/dist/PhGlobe-TMm_6qGk.js +0 -73
- package/dist/PhIdentificationCard-CePPD2xc.js +0 -73
- package/dist/PhImage-gY96WtHR.js +0 -73
- package/dist/PhInfo-DRQM_ZDP.js +0 -73
- package/dist/PhLightbulb-B0TxPfZ1.js +0 -73
- package/dist/PhMagnifyingGlass-B8si5_6W.js +0 -73
- package/dist/PhPaperPlaneRight-DVu5PLYd.js +0 -73
- package/dist/PhPlus-BfTsQnUz.js +0 -73
- package/dist/PhPower-CxYUGOWn.js +0 -73
- package/dist/PhPuzzlePiece-CQ4wh0gV.js +0 -73
- package/dist/PhQrCode-BuJ97NYJ.js +0 -73
- package/dist/PhQuestion-kJoP8Mja.js +0 -73
- package/dist/PhQuestionMark-C46ZkFpu.js +0 -73
- package/dist/PhSealCheck-Eh8jVqSN.js +0 -73
- package/dist/PhSignOut-jk97OSVt.js +0 -73
- package/dist/PhSpinner-CiYOhwMg.js +0 -73
- package/dist/PhTrash-pxerMqzd.js +0 -73
- package/dist/PhUser-BMg0VV4A.js +0 -73
- package/dist/PhVault-DYQvx5A-.js +0 -73
- package/dist/PhWarning-NLC5Mj87.js +0 -73
- package/dist/PhWarningCircle-Ch2jU9fA.js +0 -73
- package/dist/PhX-Bx4wpwm3.js +0 -73
- package/dist/SwapController-Ch0FFTEt.js +0 -457
- package/dist/ccip-BrGhNXIM.js +0 -150
- package/dist/core/api.d.ts +0 -39
- package/dist/core/logic.d.ts +0 -2
- package/dist/core/wallet.d.ts +0 -55
- package/dist/data-capture-CpafmuCb.js +0 -490
- package/dist/email-Dcg4jlai.js +0 -344
- package/dist/embedded-wallet-DeoRdAPw.js +0 -820
- package/dist/features-B9Nde43h.js +0 -274
- package/dist/hashTypedData-a7b8tdkO.js +0 -197
- package/dist/if-defined-k21LutCn.js +0 -10
- package/dist/index-9vLw53Xl.js +0 -228
- package/dist/index-B5wUyynz.js +0 -107
- package/dist/index-B8LkUrww.js +0 -86
- package/dist/index-BA0VwKg0.js +0 -8189
- package/dist/index-BB9JJ24N.js +0 -125
- package/dist/index-BCkEvPQ6.js +0 -172
- package/dist/index-BDeO_csr.js +0 -171
- package/dist/index-Bb7babLF.js +0 -1281
- package/dist/index-BjOhprVS.js +0 -199
- package/dist/index-BjyMgZsf.js +0 -218
- package/dist/index-BkThIDLX.js +0 -159
- package/dist/index-BmFs6nb7.js +0 -209
- package/dist/index-C1QEJL-2.js +0 -572
- package/dist/index-C4qc4PdD.js +0 -387
- package/dist/index-CAPvUh14.js +0 -1750
- package/dist/index-CBMU3PTE.js +0 -65
- package/dist/index-CGwPkJLF.js +0 -355
- package/dist/index-CNGEqX3D.js +0 -153
- package/dist/index-CRlCq6IB.js +0 -7981
- package/dist/index-Cg_o-i9X.js +0 -118
- package/dist/index-D1BvhCbI.js +0 -62
- package/dist/index-DFi8TiHc.js +0 -128
- package/dist/index-DLwuveL9.js +0 -555
- package/dist/index-DMn7ktUQ.js +0 -56
- package/dist/index-DOXwtuwa.js +0 -117
- package/dist/index-DPPOW_Tp.js +0 -118
- package/dist/index-DQpzHpW-.js +0 -517
- package/dist/index-DXHg5C-W.js +0 -276
- package/dist/index-DcYjZV4H.js +0 -110
- package/dist/index-DeL88Lwc.js +0 -41655
- package/dist/index-DrWVlf8b.js +0 -46
- package/dist/index-Dsfuc4rB.js +0 -123
- package/dist/index-DuTny38n.js +0 -1175
- package/dist/index-Nfjb6bV0.js +0 -21991
- package/dist/index-WwwdQSN2.js +0 -85
- package/dist/index-Yha9Afch.js +0 -174
- package/dist/index-cbQHN7GC.js +0 -100
- package/dist/index-hyG3cYsv.js +0 -1083
- package/dist/index-qLxmmPaL.js +0 -257
- package/dist/localBatchGatewayRequest-vfcvRH0G.js +0 -91
- package/dist/onramp-BSiyOX4L.js +0 -855
- package/dist/parseSignature-CdCMAPZN.js +0 -3304
- package/dist/pay-with-exchange-CduNoMEz.js +0 -525
- package/dist/property-Bd8U3_QP.js +0 -618
- package/dist/receive-CrmptJlq.js +0 -232
- package/dist/ref-SOwYtCZb.js +0 -107
- package/dist/send-oMcHMEr6.js +0 -1166
- package/dist/socials-C0A4-FbY.js +0 -620
- package/dist/swaps-CbJJ9Ciu.js +0 -1760
- package/dist/transactions-BDfCoBS5.js +0 -37
- package/dist/ui/Modal.d.ts +0 -9
- package/dist/ui/index.d.ts +0 -6
- package/dist/w3m-modal-BjsTkny7.js +0 -1706
package/dist/index-WwwdQSN2.js
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { c_ as p, cX as u, d0 as f, df as g, cY as a } from "./index-DeL88Lwc.js";
|
|
2
|
-
import { n as b, r as m, c as w } from "./index-DuTny38n.js";
|
|
3
|
-
import { T as l } from "./index-BkThIDLX.js";
|
|
4
|
-
const C = {
|
|
5
|
-
interpolate(r, e, t) {
|
|
6
|
-
if (r.length !== 2 || e.length !== 2)
|
|
7
|
-
throw new Error("inputRange and outputRange must be an array of length 2");
|
|
8
|
-
const n = r[0] || 0, i = r[1] || 0, o = e[0] || 0, s = e[1] || 0;
|
|
9
|
-
return t < n ? o : t > i ? s : (s - o) / (i - n) * (t - n) + o;
|
|
10
|
-
}
|
|
11
|
-
}, v = p`
|
|
12
|
-
:host {
|
|
13
|
-
width: 100%;
|
|
14
|
-
display: block;
|
|
15
|
-
}
|
|
16
|
-
`;
|
|
17
|
-
var d = function(r, e, t, n) {
|
|
18
|
-
var i = arguments.length, o = i < 3 ? e : n === null ? n = Object.getOwnPropertyDescriptor(e, t) : n, s;
|
|
19
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(r, e, t, n);
|
|
20
|
-
else for (var h = r.length - 1; h >= 0; h--) (s = r[h]) && (o = (i < 3 ? s(o) : i > 3 ? s(e, t, o) : s(e, t)) || o);
|
|
21
|
-
return i > 3 && o && Object.defineProperty(e, t, o), o;
|
|
22
|
-
};
|
|
23
|
-
let c = class extends u {
|
|
24
|
-
constructor() {
|
|
25
|
-
super(), this.unsubscribe = [], this.text = "", this.open = l.state.open, this.unsubscribe.push(f.subscribeKey("view", () => {
|
|
26
|
-
l.hide();
|
|
27
|
-
}), g.subscribeKey("open", (e) => {
|
|
28
|
-
e || l.hide();
|
|
29
|
-
}), l.subscribeKey("open", (e) => {
|
|
30
|
-
this.open = e;
|
|
31
|
-
}));
|
|
32
|
-
}
|
|
33
|
-
disconnectedCallback() {
|
|
34
|
-
this.unsubscribe.forEach((e) => e()), l.hide();
|
|
35
|
-
}
|
|
36
|
-
render() {
|
|
37
|
-
return a`
|
|
38
|
-
<div
|
|
39
|
-
@pointermove=${this.onMouseEnter.bind(this)}
|
|
40
|
-
@pointerleave=${this.onMouseLeave.bind(this)}
|
|
41
|
-
>
|
|
42
|
-
${this.renderChildren()}
|
|
43
|
-
</div>
|
|
44
|
-
`;
|
|
45
|
-
}
|
|
46
|
-
renderChildren() {
|
|
47
|
-
return a`<slot></slot> `;
|
|
48
|
-
}
|
|
49
|
-
onMouseEnter() {
|
|
50
|
-
const e = this.getBoundingClientRect();
|
|
51
|
-
if (!this.open) {
|
|
52
|
-
const t = document.querySelector("w3m-modal"), n = {
|
|
53
|
-
width: e.width,
|
|
54
|
-
height: e.height,
|
|
55
|
-
left: e.left,
|
|
56
|
-
top: e.top
|
|
57
|
-
};
|
|
58
|
-
if (t) {
|
|
59
|
-
const i = t.getBoundingClientRect();
|
|
60
|
-
n.left = e.left - (window.innerWidth - i.width) / 2, n.top = e.top - (window.innerHeight - i.height) / 2;
|
|
61
|
-
}
|
|
62
|
-
l.showTooltip({
|
|
63
|
-
message: this.text,
|
|
64
|
-
triggerRect: n,
|
|
65
|
-
variant: "shade"
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
onMouseLeave(e) {
|
|
70
|
-
this.contains(e.relatedTarget) || l.hide();
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
c.styles = [v];
|
|
74
|
-
d([
|
|
75
|
-
b()
|
|
76
|
-
], c.prototype, "text", void 0);
|
|
77
|
-
d([
|
|
78
|
-
m()
|
|
79
|
-
], c.prototype, "open", void 0);
|
|
80
|
-
c = d([
|
|
81
|
-
w("w3m-tooltip-trigger")
|
|
82
|
-
], c);
|
|
83
|
-
export {
|
|
84
|
-
C as M
|
|
85
|
-
};
|
package/dist/index-Yha9Afch.js
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { cE as l, cF as g, d0 as h, d8 as m, cH as w, cG as s, dm as E, dn as _, d2 as R, cU as y, cV as b, cX as v, cY as C, cW as O } from "./index-DeL88Lwc.js";
|
|
2
|
-
import { n as d, c as x } from "./index-DuTny38n.js";
|
|
3
|
-
import { o as $ } from "./if-defined-k21LutCn.js";
|
|
4
|
-
function U() {
|
|
5
|
-
try {
|
|
6
|
-
return s.returnOpenHref(`${R.SECURE_SITE_SDK_ORIGIN}/loading`, "popupWindow", "width=600,height=800,scrollbars=yes");
|
|
7
|
-
} catch {
|
|
8
|
-
throw new Error("Could not open social popup");
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
async function I() {
|
|
12
|
-
h.push("ConnectingFarcaster");
|
|
13
|
-
const e = m.getAuthConnector();
|
|
14
|
-
if (e) {
|
|
15
|
-
const o = l.getAccountData();
|
|
16
|
-
if (!(o != null && o.farcasterUrl))
|
|
17
|
-
try {
|
|
18
|
-
const { url: t } = await e.provider.getFarcasterUri();
|
|
19
|
-
l.setAccountProp("farcasterUrl", t, l.state.activeChain);
|
|
20
|
-
} catch (t) {
|
|
21
|
-
h.goBack(), w.showError(t);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
async function L(e) {
|
|
26
|
-
h.push("ConnectingSocial");
|
|
27
|
-
const o = m.getAuthConnector();
|
|
28
|
-
let t = null;
|
|
29
|
-
try {
|
|
30
|
-
const i = setTimeout(() => {
|
|
31
|
-
throw new Error("Social login timed out. Please try again.");
|
|
32
|
-
}, 45e3);
|
|
33
|
-
if (o && e) {
|
|
34
|
-
if (s.isTelegram() || (t = U()), t)
|
|
35
|
-
l.setAccountProp("socialWindow", E(t), l.state.activeChain);
|
|
36
|
-
else if (!s.isTelegram())
|
|
37
|
-
throw new Error("Could not create social popup");
|
|
38
|
-
const { uri: n } = await o.provider.getSocialRedirectUri({
|
|
39
|
-
provider: e
|
|
40
|
-
});
|
|
41
|
-
if (!n)
|
|
42
|
-
throw t == null || t.close(), new Error("Could not fetch the social redirect uri");
|
|
43
|
-
if (t && (t.location.href = n), s.isTelegram()) {
|
|
44
|
-
_.setTelegramSocialProvider(e);
|
|
45
|
-
const r = s.formatTelegramSocialLoginUrl(n);
|
|
46
|
-
s.openHref(r, "_top");
|
|
47
|
-
}
|
|
48
|
-
clearTimeout(i);
|
|
49
|
-
}
|
|
50
|
-
} catch (i) {
|
|
51
|
-
t == null || t.close();
|
|
52
|
-
const n = s.parseError(i);
|
|
53
|
-
w.showError(n), g.sendEvent({
|
|
54
|
-
type: "track",
|
|
55
|
-
event: "SOCIAL_LOGIN_ERROR",
|
|
56
|
-
properties: { provider: e, message: n }
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
async function D(e) {
|
|
61
|
-
l.setAccountProp("socialProvider", e, l.state.activeChain), g.sendEvent({
|
|
62
|
-
type: "track",
|
|
63
|
-
event: "SOCIAL_LOGIN_STARTED",
|
|
64
|
-
properties: { provider: e }
|
|
65
|
-
}), e === "farcaster" ? await I() : await L(e);
|
|
66
|
-
}
|
|
67
|
-
const T = y`
|
|
68
|
-
:host {
|
|
69
|
-
display: flex;
|
|
70
|
-
justify-content: center;
|
|
71
|
-
align-items: center;
|
|
72
|
-
width: 40px;
|
|
73
|
-
height: 40px;
|
|
74
|
-
border-radius: ${({ borderRadius: e }) => e[20]};
|
|
75
|
-
overflow: hidden;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
wui-icon {
|
|
79
|
-
width: 100%;
|
|
80
|
-
height: 100%;
|
|
81
|
-
}
|
|
82
|
-
`;
|
|
83
|
-
var S = function(e, o, t, i) {
|
|
84
|
-
var n = arguments.length, r = n < 3 ? o : i === null ? i = Object.getOwnPropertyDescriptor(o, t) : i, a;
|
|
85
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") r = Reflect.decorate(e, o, t, i);
|
|
86
|
-
else for (var c = e.length - 1; c >= 0; c--) (a = e[c]) && (r = (n < 3 ? a(r) : n > 3 ? a(o, t, r) : a(o, t)) || r);
|
|
87
|
-
return n > 3 && r && Object.defineProperty(o, t, r), r;
|
|
88
|
-
};
|
|
89
|
-
let p = class extends v {
|
|
90
|
-
constructor() {
|
|
91
|
-
super(...arguments), this.logo = "google";
|
|
92
|
-
}
|
|
93
|
-
render() {
|
|
94
|
-
return C`<wui-icon color="inherit" size="inherit" name=${this.logo}></wui-icon> `;
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
p.styles = [b, T];
|
|
98
|
-
S([
|
|
99
|
-
d()
|
|
100
|
-
], p.prototype, "logo", void 0);
|
|
101
|
-
p = S([
|
|
102
|
-
x("wui-logo")
|
|
103
|
-
], p);
|
|
104
|
-
const A = y`
|
|
105
|
-
:host {
|
|
106
|
-
width: 100%;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
button {
|
|
110
|
-
display: flex;
|
|
111
|
-
align-items: center;
|
|
112
|
-
justify-content: space-between;
|
|
113
|
-
padding: ${({ spacing: e }) => e[3]};
|
|
114
|
-
width: 100%;
|
|
115
|
-
background-color: transparent;
|
|
116
|
-
border-radius: ${({ borderRadius: e }) => e[4]};
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
wui-text {
|
|
120
|
-
text-transform: capitalize;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
@media (hover: hover) {
|
|
124
|
-
button:hover:enabled {
|
|
125
|
-
background-color: ${({ tokens: e }) => e.theme.foregroundPrimary};
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
button:disabled {
|
|
130
|
-
opacity: 0.5;
|
|
131
|
-
cursor: not-allowed;
|
|
132
|
-
}
|
|
133
|
-
`;
|
|
134
|
-
var f = function(e, o, t, i) {
|
|
135
|
-
var n = arguments.length, r = n < 3 ? o : i === null ? i = Object.getOwnPropertyDescriptor(o, t) : i, a;
|
|
136
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") r = Reflect.decorate(e, o, t, i);
|
|
137
|
-
else for (var c = e.length - 1; c >= 0; c--) (a = e[c]) && (r = (n < 3 ? a(r) : n > 3 ? a(o, t, r) : a(o, t)) || r);
|
|
138
|
-
return n > 3 && r && Object.defineProperty(o, t, r), r;
|
|
139
|
-
};
|
|
140
|
-
let u = class extends v {
|
|
141
|
-
constructor() {
|
|
142
|
-
super(...arguments), this.logo = "google", this.name = "Continue with google", this.disabled = !1;
|
|
143
|
-
}
|
|
144
|
-
render() {
|
|
145
|
-
return C`
|
|
146
|
-
<button ?disabled=${this.disabled} tabindex=${$(this.tabIdx)}>
|
|
147
|
-
<wui-flex gap="2" alignItems="center">
|
|
148
|
-
<wui-image ?boxed=${!0} logo=${this.logo}></wui-image>
|
|
149
|
-
<wui-text variant="lg-regular" color="primary">${this.name}</wui-text>
|
|
150
|
-
</wui-flex>
|
|
151
|
-
<wui-icon name="chevronRight" size="lg" color="default"></wui-icon>
|
|
152
|
-
</button>
|
|
153
|
-
`;
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
u.styles = [b, O, A];
|
|
157
|
-
f([
|
|
158
|
-
d()
|
|
159
|
-
], u.prototype, "logo", void 0);
|
|
160
|
-
f([
|
|
161
|
-
d()
|
|
162
|
-
], u.prototype, "name", void 0);
|
|
163
|
-
f([
|
|
164
|
-
d()
|
|
165
|
-
], u.prototype, "tabIdx", void 0);
|
|
166
|
-
f([
|
|
167
|
-
d({ type: Boolean })
|
|
168
|
-
], u.prototype, "disabled", void 0);
|
|
169
|
-
u = f([
|
|
170
|
-
x("wui-list-social")
|
|
171
|
-
], u);
|
|
172
|
-
export {
|
|
173
|
-
D as e
|
|
174
|
-
};
|
package/dist/index-cbQHN7GC.js
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { cU as h, cV as f, cX as u, cY as v } from "./index-DeL88Lwc.js";
|
|
2
|
-
import { n as d, c as m, U as p } from "./index-DuTny38n.js";
|
|
3
|
-
import "./index-DFi8TiHc.js";
|
|
4
|
-
const x = h`
|
|
5
|
-
:host {
|
|
6
|
-
display: block;
|
|
7
|
-
width: var(--local-width);
|
|
8
|
-
height: var(--local-height);
|
|
9
|
-
border-radius: ${({ borderRadius: l }) => l[16]};
|
|
10
|
-
overflow: hidden;
|
|
11
|
-
position: relative;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
:host([data-variant='generated']) {
|
|
15
|
-
--mixed-local-color-1: var(--local-color-1);
|
|
16
|
-
--mixed-local-color-2: var(--local-color-2);
|
|
17
|
-
--mixed-local-color-3: var(--local-color-3);
|
|
18
|
-
--mixed-local-color-4: var(--local-color-4);
|
|
19
|
-
--mixed-local-color-5: var(--local-color-5);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
:host([data-variant='generated']) {
|
|
23
|
-
background: radial-gradient(
|
|
24
|
-
var(--local-radial-circle),
|
|
25
|
-
#fff 0.52%,
|
|
26
|
-
var(--mixed-local-color-5) 31.25%,
|
|
27
|
-
var(--mixed-local-color-3) 51.56%,
|
|
28
|
-
var(--mixed-local-color-2) 65.63%,
|
|
29
|
-
var(--mixed-local-color-1) 82.29%,
|
|
30
|
-
var(--mixed-local-color-4) 100%
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
:host([data-variant='default']) {
|
|
35
|
-
background: radial-gradient(
|
|
36
|
-
75.29% 75.29% at 64.96% 24.36%,
|
|
37
|
-
#fff 0.52%,
|
|
38
|
-
#f5ccfc 31.25%,
|
|
39
|
-
#dba4f5 51.56%,
|
|
40
|
-
#9a8ee8 65.63%,
|
|
41
|
-
#6493da 82.29%,
|
|
42
|
-
#6ebdea 100%
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
`;
|
|
46
|
-
var o = function(l, a, r, i) {
|
|
47
|
-
var s = arguments.length, e = s < 3 ? a : i === null ? i = Object.getOwnPropertyDescriptor(a, r) : i, c;
|
|
48
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") e = Reflect.decorate(l, a, r, i);
|
|
49
|
-
else for (var n = l.length - 1; n >= 0; n--) (c = l[n]) && (e = (s < 3 ? c(e) : s > 3 ? c(a, r, e) : c(a, r)) || e);
|
|
50
|
-
return s > 3 && e && Object.defineProperty(a, r, e), e;
|
|
51
|
-
};
|
|
52
|
-
let t = class extends u {
|
|
53
|
-
constructor() {
|
|
54
|
-
super(...arguments), this.imageSrc = void 0, this.alt = void 0, this.address = void 0, this.size = "xl";
|
|
55
|
-
}
|
|
56
|
-
render() {
|
|
57
|
-
const a = {
|
|
58
|
-
inherit: "inherit",
|
|
59
|
-
xxs: "3",
|
|
60
|
-
xs: "5",
|
|
61
|
-
sm: "6",
|
|
62
|
-
md: "8",
|
|
63
|
-
mdl: "8",
|
|
64
|
-
lg: "10",
|
|
65
|
-
xl: "16",
|
|
66
|
-
xxl: "20"
|
|
67
|
-
};
|
|
68
|
-
return this.style.cssText = `
|
|
69
|
-
--local-width: var(--apkt-spacing-${a[this.size ?? "xl"]});
|
|
70
|
-
--local-height: var(--apkt-spacing-${a[this.size ?? "xl"]});
|
|
71
|
-
`, v`${this.visualTemplate()}`;
|
|
72
|
-
}
|
|
73
|
-
visualTemplate() {
|
|
74
|
-
if (this.imageSrc)
|
|
75
|
-
return this.dataset.variant = "image", v`<wui-image src=${this.imageSrc} alt=${this.alt ?? "avatar"}></wui-image>`;
|
|
76
|
-
if (this.address) {
|
|
77
|
-
this.dataset.variant = "generated";
|
|
78
|
-
const a = p.generateAvatarColors(this.address);
|
|
79
|
-
return this.style.cssText += `
|
|
80
|
-
${a}`, null;
|
|
81
|
-
}
|
|
82
|
-
return this.dataset.variant = "default", null;
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
t.styles = [f, x];
|
|
86
|
-
o([
|
|
87
|
-
d()
|
|
88
|
-
], t.prototype, "imageSrc", void 0);
|
|
89
|
-
o([
|
|
90
|
-
d()
|
|
91
|
-
], t.prototype, "alt", void 0);
|
|
92
|
-
o([
|
|
93
|
-
d()
|
|
94
|
-
], t.prototype, "address", void 0);
|
|
95
|
-
o([
|
|
96
|
-
d()
|
|
97
|
-
], t.prototype, "size", void 0);
|
|
98
|
-
t = o([
|
|
99
|
-
m("wui-avatar")
|
|
100
|
-
], t);
|