@arcblock/nft-display 3.0.8 → 3.0.10
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/es/color.js +120 -0
- package/es/index.js +843 -0
- package/lib/color.js +1 -120
- package/lib/index.js +77 -155
- package/package.json +8 -5
- /package/{lib → es}/color.d.ts +0 -0
- /package/{lib → es}/index.d.ts +0 -0
package/lib/index.js
CHANGED
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import { DEFAULT_COLORS as d, MOTIF_COLORS as h } from "./color.js";
|
|
3
|
-
import { getNftBGColor as A, getNftBGColorFromDid as _, getPassportColorFromDid as I, hslToRgb as j, rgbToHsl as E } from "./color.js";
|
|
4
|
-
const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-f]{40}$/i.test(e), w = (e) => {
|
|
5
|
-
const t = Uint8Array.from(
|
|
6
|
-
e.slice(2).match(/.{1,2}/g).map((a) => parseInt(a, 16))
|
|
7
|
-
).slice(0, 8).reduce((a, i) => a + i, 0) % h.length;
|
|
8
|
-
return h[t];
|
|
9
|
-
}, y = (e, t = 5) => e.length > 2 * t ? `${e.slice(0, t)}..${e.slice(-t)}` : e, $ = (e, t, a) => e === "did-space" ? (i, s, r) => `<svg
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("@arcblock/did-motif"),o=require("./color.js"),l=(e,t)=>[e,t].join("-"),k=228,V=258,H=e=>/^(0x)?[0-9a-f]{40}$/i.test(e),S=e=>{const t=Uint8Array.from(e.slice(2).match(/.{1,2}/g).map(a=>parseInt(a,16))).slice(0,8).reduce((a,i)=>a+i,0)%o.MOTIF_COLORS.length;return o.MOTIF_COLORS[t]},L=(e,t=5)=>e.length>2*t?`${e.slice(0,t)}..${e.slice(-t)}`:e,f=(e,t,a)=>e==="did-space"?(i,s,r)=>`<svg
|
|
10
2
|
width="${s}"
|
|
11
3
|
height="${r}"
|
|
12
4
|
viewBox="0 0 228 258"
|
|
13
5
|
fill="none"
|
|
14
6
|
xmlns="http://www.w3.org/2000/svg"
|
|
15
7
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
16
|
-
<g filter="url(#${l(t,
|
|
8
|
+
<g filter="url(#${l(t,"layout-filter")})">
|
|
17
9
|
<path
|
|
18
10
|
d="M56.9706 2C53.788 2 50.7357 3.26428 48.4853 5.51472L7.51472 46.4853C5.26428 48.7357 4 51.788 4 54.9706V240C4 246.627 9.37258 252 16 252H212C218.627 252 224 246.627 224 240V14C224 7.37258 218.627 2 212 2H56.9706Z"
|
|
19
|
-
fill="url(#${l(t,
|
|
11
|
+
fill="url(#${l(t,"header-paint")})" />
|
|
20
12
|
<mask
|
|
21
|
-
id="${l(t,
|
|
13
|
+
id="${l(t,"layout-mask")}"
|
|
22
14
|
style="mask-type: alpha"
|
|
23
15
|
maskUnits="userSpaceOnUse"
|
|
24
16
|
x="4"
|
|
@@ -29,14 +21,14 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
29
21
|
d="M56.9706 2C53.788 2 50.7357 3.26428 48.4853 5.51472L7.51472 46.4853C5.26428 48.7357 4 51.788 4 54.9706V240C4 246.627 9.37258 252 16 252H212C218.627 252 224 246.627 224 240V14C224 7.37258 218.627 2 212 2H56.9706Z"
|
|
30
22
|
fill="#D9D9D9" />
|
|
31
23
|
</mask>
|
|
32
|
-
<g mask="url(#${l(t,
|
|
24
|
+
<g mask="url(#${l(t,"layout-mask")})">
|
|
33
25
|
<rect x="4" y="2" width="220" height="125" fill="none" />
|
|
34
|
-
<rect x="4" y="127" width="220" height="125" fill="url(#${l(t,
|
|
26
|
+
<rect x="4" y="127" width="220" height="125" fill="url(#${l(t,"footer-paint")})" />
|
|
35
27
|
</g>
|
|
36
28
|
</g>
|
|
37
29
|
<defs>
|
|
38
30
|
<filter
|
|
39
|
-
id="${l(t,
|
|
31
|
+
id="${l(t,"layout-filter")}"
|
|
40
32
|
x="0"
|
|
41
33
|
y="0"
|
|
42
34
|
width="228"
|
|
@@ -57,7 +49,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
57
49
|
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1582_53235" result="shape" />
|
|
58
50
|
</filter>
|
|
59
51
|
<linearGradient
|
|
60
|
-
id="${l(t,
|
|
52
|
+
id="${l(t,"header-paint")}"
|
|
61
53
|
x1="220.071"
|
|
62
54
|
y1="252"
|
|
63
55
|
x2="-24.022"
|
|
@@ -67,7 +59,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
67
59
|
<stop offset="1" stop-color="${a.end}" />
|
|
68
60
|
</linearGradient>
|
|
69
61
|
<linearGradient
|
|
70
|
-
id="${l(t,
|
|
62
|
+
id="${l(t,"footer-paint")}"
|
|
71
63
|
x1="224"
|
|
72
64
|
y1="157.738"
|
|
73
65
|
x2="1.00001"
|
|
@@ -78,16 +70,16 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
78
70
|
</linearGradient>
|
|
79
71
|
</defs>
|
|
80
72
|
${i}
|
|
81
|
-
</svg
|
|
73
|
+
</svg>`:e==="app-space"?(i,s,r)=>`<svg
|
|
82
74
|
width="${s}"
|
|
83
75
|
height="${r}"
|
|
84
76
|
viewBox="0 0 228 258"
|
|
85
77
|
fill="none"
|
|
86
78
|
xmlns="http://www.w3.org/2000/svg"
|
|
87
79
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
88
|
-
<g filter="url(#${l(t,
|
|
80
|
+
<g filter="url(#${l(t,"layout-filter")})">
|
|
89
81
|
<mask
|
|
90
|
-
id="${l(t,
|
|
82
|
+
id="${l(t,"layout-mask")}"
|
|
91
83
|
style="mask-type: alpha"
|
|
92
84
|
maskUnits="userSpaceOnUse"
|
|
93
85
|
x="4"
|
|
@@ -98,17 +90,17 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
98
90
|
d="M187.029 2C190.212 2 193.264 3.26428 195.515 5.51472L220.485 30.4853C222.736 32.7357 224 35.788 224 38.9706V240C224 246.627 218.627 252 212 252H40.4706C37.288 252 34.2357 250.736 31.9853 248.485L7.51472 224.015C5.26428 221.764 4 218.712 4 215.529V14C4 7.37258 9.37259 2 16 2H187.029Z"
|
|
99
91
|
fill="#7D37D7" />
|
|
100
92
|
</mask>
|
|
101
|
-
<g mask="url(#${l(t,
|
|
93
|
+
<g mask="url(#${l(t,"layout-mask")})">
|
|
102
94
|
<path
|
|
103
95
|
d="M187.029 2C190.212 2 193.264 3.26428 195.515 5.51472L220.485 30.4853C222.736 32.7357 224 35.788 224 38.9706V240C224 246.627 218.627 252 212 252H40.4706C37.288 252 34.2357 250.736 31.9853 248.485L7.51472 224.015C5.26428 221.764 4 218.712 4 215.529V14C4 7.37258 9.37259 2 16 2H187.029Z"
|
|
104
|
-
fill="url(#${l(t,
|
|
96
|
+
fill="url(#${l(t,"header-paint")})" />
|
|
105
97
|
<rect x="4" y="2" width="220" height="125" fill="none" />
|
|
106
|
-
<path d="M4 127H224V252H4V127Z" fill="url(#${l(t,
|
|
98
|
+
<path d="M4 127H224V252H4V127Z" fill="url(#${l(t,"footer-paint")})" />
|
|
107
99
|
</g>
|
|
108
100
|
</g>
|
|
109
101
|
<defs>
|
|
110
102
|
<filter
|
|
111
|
-
id="${l(t,
|
|
103
|
+
id="${l(t,"layout-filter")}"
|
|
112
104
|
x="0"
|
|
113
105
|
y="0"
|
|
114
106
|
width="228"
|
|
@@ -129,7 +121,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
129
121
|
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1583_54199" result="shape" />
|
|
130
122
|
</filter>
|
|
131
123
|
<linearGradient
|
|
132
|
-
id="${l(t,
|
|
124
|
+
id="${l(t,"header-paint")}"
|
|
133
125
|
x1="211.69"
|
|
134
126
|
y1="7.13393"
|
|
135
127
|
x2="51.0187"
|
|
@@ -139,7 +131,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
139
131
|
<stop offset="1" stop-color="${a.end}" />
|
|
140
132
|
</linearGradient>
|
|
141
133
|
<linearGradient
|
|
142
|
-
id="${l(t,
|
|
134
|
+
id="${l(t,"footer-paint")}"
|
|
143
135
|
x1="224"
|
|
144
136
|
y1="157.738"
|
|
145
137
|
x2="1.00001"
|
|
@@ -150,16 +142,16 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
150
142
|
</linearGradient>
|
|
151
143
|
</defs>
|
|
152
144
|
${i}
|
|
153
|
-
</svg
|
|
145
|
+
</svg>`:e==="app-purchase"?(i,s,r)=>`<svg
|
|
154
146
|
width="${s}"
|
|
155
147
|
height="${r}"
|
|
156
148
|
viewBox="0 0 228 258"
|
|
157
149
|
fill="none"
|
|
158
150
|
xmlns="http://www.w3.org/2000/svg"
|
|
159
151
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
160
|
-
<g filter="url(#${l(t,
|
|
152
|
+
<g filter="url(#${l(t,"layout-filter")})">
|
|
161
153
|
<mask
|
|
162
|
-
id="${l(t,
|
|
154
|
+
id="${l(t,"layout-mask")}"
|
|
163
155
|
style="mask-type: alpha"
|
|
164
156
|
maskUnits="userSpaceOnUse"
|
|
165
157
|
x="4"
|
|
@@ -170,16 +162,16 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
170
162
|
d="M4 14C4 7.37258 9.37258 2 16 2H212C218.627 2 224 7.37258 224 14V240C224 246.627 218.627 252 212 252H16C9.37258 252 4 246.627 4 240V14Z"
|
|
171
163
|
fill="#7D37D7" />
|
|
172
164
|
</mask>
|
|
173
|
-
<g mask="url(#${l(t,
|
|
174
|
-
<rect x="4" y="2" width="220" height="250" rx="12" fill="url(#${l(t,
|
|
165
|
+
<g mask="url(#${l(t,"layout-mask")})">
|
|
166
|
+
<rect x="4" y="2" width="220" height="250" rx="12" fill="url(#${l(t,"header-paint")})" />
|
|
175
167
|
<rect x="4.5" y="2.5" width="219" height="249" rx="11.5" stroke="black" stroke-opacity="0.08" />
|
|
176
168
|
<rect x="4" y="2" width="220" height="125" fill="none" />
|
|
177
|
-
<rect x="4" y="127" width="220" height="125" fill="url(#${l(t,
|
|
169
|
+
<rect x="4" y="127" width="220" height="125" fill="url(#${l(t,"footer-paint")})" />
|
|
178
170
|
</g>
|
|
179
171
|
</g>
|
|
180
172
|
<defs>
|
|
181
173
|
<filter
|
|
182
|
-
id="${l(t,
|
|
174
|
+
id="${l(t,"layout-filter")}"
|
|
183
175
|
x="0"
|
|
184
176
|
y="0"
|
|
185
177
|
width="228"
|
|
@@ -200,7 +192,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
200
192
|
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1583_54637" result="shape" />
|
|
201
193
|
</filter>
|
|
202
194
|
<linearGradient
|
|
203
|
-
id="${l(t,
|
|
195
|
+
id="${l(t,"header-paint")}"
|
|
204
196
|
x1="224"
|
|
205
197
|
y1="252"
|
|
206
198
|
x2="46.7372"
|
|
@@ -210,7 +202,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
210
202
|
<stop offset="1" stop-color="${a.end}" />
|
|
211
203
|
</linearGradient>
|
|
212
204
|
<linearGradient
|
|
213
|
-
id="${l(t,
|
|
205
|
+
id="${l(t,"footer-paint")}"
|
|
214
206
|
x1="224"
|
|
215
207
|
y1="157.738"
|
|
216
208
|
x2="1.00001"
|
|
@@ -221,16 +213,16 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
221
213
|
</linearGradient>
|
|
222
214
|
</defs>
|
|
223
215
|
${i}
|
|
224
|
-
</svg
|
|
216
|
+
</svg>`:e==="app-passport"?(i,s,r)=>`<svg
|
|
225
217
|
width="${s}"
|
|
226
218
|
height="${r}"
|
|
227
219
|
viewBox="0 0 228 258"
|
|
228
220
|
fill="none"
|
|
229
221
|
xmlns="http://www.w3.org/2000/svg"
|
|
230
222
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
231
|
-
<g filter="url(#${l(t,
|
|
223
|
+
<g filter="url(#${l(t,"layout-filter")})">
|
|
232
224
|
<mask
|
|
233
|
-
id="${l(t,
|
|
225
|
+
id="${l(t,"layout-mask")}"
|
|
234
226
|
style="mask-type: alpha"
|
|
235
227
|
maskUnits="userSpaceOnUse"
|
|
236
228
|
x="4"
|
|
@@ -243,16 +235,16 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
243
235
|
d="M4 14C4 7.37258 9.37258 2 16 2H212C218.627 2 224 7.37258 224 14V115C224 117.209 222.102 118.917 220.164 119.978C217.683 121.336 216 123.972 216 127C216 130.028 217.683 132.664 220.164 134.022C222.102 135.083 224 136.791 224 139V240C224 246.627 218.627 252 212 252H16C9.37258 252 4 246.627 4 240V139C4 136.791 5.89809 135.083 7.83588 134.022C10.3173 132.664 12 130.028 12 127C12 123.972 10.3173 121.336 7.83589 119.978C5.89809 118.917 4 117.209 4 115V14Z"
|
|
244
236
|
fill="#7D37D7" />
|
|
245
237
|
</mask>
|
|
246
|
-
<g mask="url(#${l(t,
|
|
247
|
-
<rect x="4" y="2" width="220" height="250" rx="12" fill="url(#${l(t,
|
|
238
|
+
<g mask="url(#${l(t,"layout-mask")})">
|
|
239
|
+
<rect x="4" y="2" width="220" height="250" rx="12" fill="url(#${l(t,"header-paint")})" />
|
|
248
240
|
<rect x="4.5" y="2.5" width="219" height="249" rx="11.5" stroke="black" stroke-opacity="0.08" />
|
|
249
241
|
<rect x="4" y="2" width="220" height="125" fill="none" />
|
|
250
|
-
<rect x="4" y="127" width="220" height="125" fill="url(#${l(t,
|
|
242
|
+
<rect x="4" y="127" width="220" height="125" fill="url(#${l(t,"footer-paint")})" />
|
|
251
243
|
</g>
|
|
252
244
|
</g>
|
|
253
245
|
<defs>
|
|
254
246
|
<filter
|
|
255
|
-
id="${l(t,
|
|
247
|
+
id="${l(t,"layout-filter")}"
|
|
256
248
|
x="0"
|
|
257
249
|
y="0"
|
|
258
250
|
width="228"
|
|
@@ -273,7 +265,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
273
265
|
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1583_54471" result="shape" />
|
|
274
266
|
</filter>
|
|
275
267
|
<linearGradient
|
|
276
|
-
id="${l(t,
|
|
268
|
+
id="${l(t,"header-paint")}"
|
|
277
269
|
x1="224"
|
|
278
270
|
y1="252"
|
|
279
271
|
x2="46.7372"
|
|
@@ -283,7 +275,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
283
275
|
<stop offset="1" stop-color="${a.end}" />
|
|
284
276
|
</linearGradient>
|
|
285
277
|
<linearGradient
|
|
286
|
-
id="${l(t,
|
|
278
|
+
id="${l(t,"footer-paint")}"
|
|
287
279
|
x1="224"
|
|
288
280
|
y1="157.738"
|
|
289
281
|
x2="1.00001"
|
|
@@ -294,14 +286,14 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
294
286
|
</linearGradient>
|
|
295
287
|
</defs>
|
|
296
288
|
${i}
|
|
297
|
-
</svg
|
|
289
|
+
</svg>`:e==="app-kyc"?(i,s,r)=>`<svg width="${s}" height="${r}" viewBox="0 0 228 258" fill="none" xmlns="http://www.w3.org/2000/svg"
|
|
298
290
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
299
|
-
<g clip-path="url(#${l(t,
|
|
300
|
-
<g clip-path="url(#${l(t,
|
|
291
|
+
<g clip-path="url(#${l(t,"border-top")})">
|
|
292
|
+
<g clip-path="url(#${l(t,"border-bottom")})">
|
|
301
293
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
|
302
294
|
d="M224 2H4V127H224V2ZM102 12C99.7909 12 98 13.7909 98 16C98 18.2091 99.7909 20 102 20H126C128.209 20 130 18.2091 130 16C130 13.7909 128.209 12 126 12H102Z"
|
|
303
295
|
style="fill:${a.start};fill-opacity:1;" />
|
|
304
|
-
<g clip-path="url(#${l(t,
|
|
296
|
+
<g clip-path="url(#${l(t,"header-icon")})">
|
|
305
297
|
<path
|
|
306
298
|
d="M96.5 61C96.5 59.5413 97.0795 58.1424 98.1109 57.1109C99.1424 56.0795 100.541 55.5 102 55.5H104.5C105.952 55.4992 107.345 54.924 108.375 53.9L110.125 52.15C110.636 51.636 111.244 51.2281 111.913 50.9498C112.582 50.6714 113.3 50.5281 114.025 50.5281C114.75 50.5281 115.468 50.6714 116.137 50.9498C116.806 51.2281 117.414 51.636 117.925 52.15L119.675 53.9C120.705 54.925 122.1 55.5 123.55 55.5H126.05C127.509 55.5 128.908 56.0795 129.939 57.1109C130.971 58.1424 131.55 59.5413 131.55 61V63.5C131.55 64.95 132.125 66.345 133.15 67.375L134.9 69.125C135.414 69.6361 135.822 70.2438 136.1 70.9131C136.379 71.5824 136.522 72.3001 136.522 73.025C136.522 73.7499 136.379 74.4676 136.1 75.1369C135.822 75.8062 135.414 76.4139 134.9 76.925L133.15 78.675C132.126 79.7048 131.551 81.0977 131.55 82.55V85.05C131.55 86.5087 130.971 87.9076 129.939 88.9391C128.908 89.9705 127.509 90.55 126.05 90.55H123.55C122.098 90.5508 120.705 91.126 119.675 92.15L117.925 93.9C117.414 94.414 116.806 94.8219 116.137 95.1002C115.468 95.3786 114.75 95.5219 114.025 95.5219C113.3 95.5219 112.582 95.3786 111.913 95.1002C111.244 94.8219 110.636 94.414 110.125 93.9L108.375 92.15C107.345 91.126 105.952 90.5508 104.5 90.55H102C100.541 90.55 99.1424 89.9705 98.1109 88.9391C97.0795 87.9076 96.5 86.5087 96.5 85.05V82.55C96.4992 81.0977 95.924 79.7048 94.9 78.675L93.15 76.925C92.636 76.4139 92.2281 75.8062 91.9498 75.1369C91.6714 74.4676 91.5281 73.7499 91.5281 73.025C91.5281 72.3001 91.6714 71.5824 91.9498 70.9131C92.2281 70.2438 92.636 69.6361 93.15 69.125L94.9 67.375C95.924 66.3452 96.4992 64.9522 96.5 63.5V61Z"
|
|
307
299
|
stroke="white" style="stroke:white;stroke-opacity:1;" stroke-width="3" stroke-linecap="round"
|
|
@@ -310,42 +302,39 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
310
302
|
stroke-linecap="round" stroke-linejoin="round" />
|
|
311
303
|
</g>
|
|
312
304
|
</g>
|
|
313
|
-
<rect width="220" height="125" transform="translate(4 126)" fill="url(#${l(t,
|
|
305
|
+
<rect width="220" height="125" transform="translate(4 126)" fill="url(#${l(t,"body-paint")})" style="" />
|
|
314
306
|
${i}
|
|
315
307
|
</g>
|
|
316
308
|
<defs>
|
|
317
|
-
<linearGradient id="${l(t,
|
|
309
|
+
<linearGradient id="${l(t,"body-paint")}" x1="220" y1="30.7377" x2="-2.99999" y2="30.7377"
|
|
318
310
|
gradientUnits="userSpaceOnUse">
|
|
319
311
|
<stop stop-color="#101010"
|
|
320
312
|
style="stop-color:#101010;stop-color:color(display-p3 0.0625 0.0625 0.0625);stop-opacity:1;" />
|
|
321
313
|
<stop offset="1" stop-color="#272727"
|
|
322
314
|
style="stop-color:#272727;stop-color:color(display-p3 0.1542 0.1542 0.1542);stop-opacity:1;" />
|
|
323
315
|
</linearGradient>
|
|
324
|
-
<clipPath id="${l(t,
|
|
316
|
+
<clipPath id="${l(t,"border-top")}">
|
|
325
317
|
<rect x="4" y="2" width="220" height="250" rx="8" fill="white" style="fill:white;fill-opacity:1;" />
|
|
326
318
|
</clipPath>
|
|
327
|
-
<clipPath id="${l(t,
|
|
319
|
+
<clipPath id="${l(t,"border-bottom")}">
|
|
328
320
|
<rect width="220" height="125" fill="white" style="fill:white;fill-opacity:1;" transform="translate(4 2)" />
|
|
329
321
|
</clipPath>
|
|
330
|
-
<clipPath id="${l(t,
|
|
322
|
+
<clipPath id="${l(t,"header-icon")}">
|
|
331
323
|
<rect width="60" height="60" fill="white" style="fill:white;fill-opacity:1;" transform="translate(84 43)" />
|
|
332
324
|
</clipPath>
|
|
333
325
|
</defs>
|
|
334
|
-
</svg
|
|
335
|
-
const i = l(t, "header");
|
|
336
|
-
if (e === "did-space")
|
|
337
|
-
return `<g id="${i}" transform="translate(90, 42)" width="48" height="47" viewBox="0 0 48 47" fill="none">
|
|
326
|
+
</svg>`:()=>"",p=(e,t,a)=>{const i=l(t,"header");if(e==="did-space")return`<g id="${i}" transform="translate(90, 42)" width="48" height="47" viewBox="0 0 48 47" fill="none">
|
|
338
327
|
<path
|
|
339
328
|
d="M27.5999 2.53821L31.9962 0H47.9999V46.9586H31.9962L14.7939 37.0269L14.7939 9.93175L16.8325 8.75477L20.4222 10.8272L18.3836 12.0042V34.9544L32.9581 43.369H44.4103V3.58962H32.9581L31.1896 4.61068L27.5999 2.53821Z"
|
|
340
|
-
fill="url(#${l(t,
|
|
329
|
+
fill="url(#${l(t,"space-gradient1")})" />
|
|
341
330
|
<path
|
|
342
331
|
fill-rule="evenodd"
|
|
343
332
|
clip-rule="evenodd"
|
|
344
333
|
d="M29.6164 34.9544V12.0042L15.0419 3.58962H3.58962V43.369H15.0419L16.8159 42.3448L20.4055 44.4173L16.0037 46.9586H0V0H16.0037L33.206 9.93175V37.0269L31.1729 38.2007L27.5833 36.1282L29.6164 34.9544Z"
|
|
345
|
-
fill="url(#${l(t,
|
|
334
|
+
fill="url(#${l(t,"space-gradient2")})" />
|
|
346
335
|
<defs>
|
|
347
336
|
<linearGradient
|
|
348
|
-
id="${l(t,
|
|
337
|
+
id="${l(t,"space-gradient1")}"
|
|
349
338
|
x1="31.3969"
|
|
350
339
|
y1="0"
|
|
351
340
|
x2="31.3969"
|
|
@@ -355,7 +344,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
355
344
|
<stop offset="1" stop-color="white" />
|
|
356
345
|
</linearGradient>
|
|
357
346
|
<linearGradient
|
|
358
|
-
id="${l(t,
|
|
347
|
+
id="${l(t,"space-gradient2")}"
|
|
359
348
|
x1="16.603"
|
|
360
349
|
y1="0"
|
|
361
350
|
x2="16.603"
|
|
@@ -365,9 +354,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
365
354
|
<stop offset="1" stop-color="white" stop-opacity="0.4" />
|
|
366
355
|
</linearGradient>
|
|
367
356
|
</defs>
|
|
368
|
-
</g>`;
|
|
369
|
-
if (e === "app-purchase")
|
|
370
|
-
return `<g id="${i}" transform="translate(90, 42)" width="47" height="48" viewBox="0 0 47 48" fill="none">
|
|
357
|
+
</g>`;if(e==="app-purchase")return`<g id="${i}" transform="translate(90, 42)" width="47" height="48" viewBox="0 0 47 48" fill="none">
|
|
371
358
|
<path
|
|
372
359
|
opacity="0.6"
|
|
373
360
|
fill-rule="evenodd"
|
|
@@ -384,9 +371,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
384
371
|
clip-rule="evenodd"
|
|
385
372
|
d="M15.9236 25.8547V19.5111H22.2671V25.8547H15.9236ZM28.3539 19.5111H30.2908V21.448C30.2908 23.8817 28.3179 25.8547 25.8842 25.8547H23.9473V23.9177C23.9473 21.484 25.9202 19.5111 28.3539 19.5111ZM15.9236 33.8523H22.2671V27.5088H15.9236V33.8523ZM23.9473 33.8523V27.5088H30.2908V33.8523H23.9473Z"
|
|
386
373
|
fill="white" />
|
|
387
|
-
</g>`;
|
|
388
|
-
if (e === "app-space")
|
|
389
|
-
return `<g id="${i}" transform="translate(90, 42)" width="48" height="48" viewBox="0 0 48 48" fill="none">
|
|
374
|
+
</g>`;if(e==="app-space")return`<g id="${i}" transform="translate(90, 42)" width="48" height="48" viewBox="0 0 48 48" fill="none">
|
|
390
375
|
<path
|
|
391
376
|
fill-rule="evenodd"
|
|
392
377
|
clip-rule="evenodd"
|
|
@@ -397,10 +382,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
397
382
|
clip-rule="evenodd"
|
|
398
383
|
d="M37.6141 18.623L23.7901 10.6417L9.96606 18.623V34.5856L23.7901 42.5669L37.6141 34.5856V18.623ZM11.4061 19.4544L23.7901 12.3045L36.1741 19.4544V33.7542L23.7901 40.9041L11.4061 33.7542V19.4544ZM21.4098 17.2848C21.4981 16.9757 21.7806 16.7626 22.1021 16.7626H25.478C25.7995 16.7626 26.082 16.9757 26.1703 17.2848L26.8128 19.5335L28.4022 20.4511L30.6709 19.8832C30.9827 19.8051 31.3085 19.9432 31.4693 20.2216L33.1572 23.1453C33.318 23.4237 33.2747 23.7749 33.0511 24.0059L31.4249 25.6867V27.5219L33.0511 29.2027C33.2747 29.4337 33.318 29.7849 33.1572 30.0633L31.4693 32.987C31.3085 33.2654 30.9827 33.4035 30.6709 33.3254L28.4022 32.7575L26.8128 33.6751L26.1703 35.9238C26.082 36.2329 25.7995 36.446 25.478 36.446H22.1021C21.7806 36.446 21.4981 36.2329 21.4098 35.9238L20.7673 33.6751L19.1779 32.7575L16.9093 33.3254C16.5974 33.4035 16.2716 33.2654 16.1109 32.987L14.4229 30.0633C14.2622 29.7849 14.3055 29.4337 14.529 29.2027L16.1552 27.5219V25.6867L14.529 24.0059C14.3055 23.7749 14.2622 23.4237 14.4229 23.1453L16.1109 20.2216C16.2716 19.9432 16.5974 19.8051 16.9093 19.8832L19.1779 20.4511L20.7673 19.5335L21.4098 17.2848ZM21.7396 20.6349C21.9014 20.5415 22.0205 20.3888 22.0719 20.2092L22.6452 18.2026H24.9349L25.5083 20.2092C25.5596 20.3888 25.6787 20.5415 25.8406 20.6349L27.9345 21.8438C28.0963 21.9373 28.2881 21.9641 28.4693 21.9187L30.4937 21.4119L31.6386 23.3949L30.1875 24.8947C30.0576 25.029 29.9849 25.2085 29.9849 25.3954V27.8132C29.9849 28.0001 30.0576 28.1796 30.1875 28.3139L31.6386 29.8137L30.4937 31.7967L28.4693 31.2899C28.2881 31.2445 28.0963 31.2713 27.9345 31.3648L25.8406 32.5737C25.6787 32.6671 25.5596 32.8198 25.5083 32.9994L24.9349 35.006H22.6452L22.0719 32.9994C22.0205 32.8198 21.9014 32.6671 21.7396 32.5737L19.6457 31.3648C19.4839 31.2713 19.2921 31.2445 19.1108 31.2899L17.0864 31.7967L15.9415 29.8137L17.3926 28.3139C17.5226 28.1796 17.5952 28.0001 17.5952 27.8132V25.3954C17.5952 25.2085 17.5226 25.029 17.3926 24.8947L15.9415 23.3949L17.0864 21.4119L19.1108 21.9187C19.2921 21.9641 19.4839 21.9373 19.6457 21.8438L21.7396 20.6349ZM23.7901 31.2306C21.2351 31.2306 19.1638 29.1593 19.1638 26.6043C19.1638 24.0493 21.2351 21.9781 23.7901 21.9781C26.3451 21.9781 28.4163 24.0493 28.4163 26.6043C28.4163 29.1593 26.3451 31.2306 23.7901 31.2306ZM26.9763 26.6043C26.9763 28.364 25.5498 29.7906 23.7901 29.7906C22.0303 29.7906 20.6038 28.364 20.6038 26.6043C20.6038 24.8446 22.0303 23.418 23.7901 23.418C25.5498 23.418 26.9763 24.8446 26.9763 26.6043Z"
|
|
399
384
|
fill="white" />
|
|
400
|
-
</g>`;
|
|
401
|
-
if (e === "app-passport") {
|
|
402
|
-
const s = l(t, "passport-avatar-mask");
|
|
403
|
-
return a.icon ? `<g id="${i}" transform="translate(0, 30)" width="228" height="70" viewBox="0 0 228 70">
|
|
385
|
+
</g>`;if(e==="app-passport"){const s=l(t,"passport-avatar-mask");return a.icon?`<g id="${i}" transform="translate(0, 30)" width="228" height="70" viewBox="0 0 228 70">
|
|
404
386
|
<defs>
|
|
405
387
|
<clipPath id="${s}">
|
|
406
388
|
<circle cx="114" cy="20" r="20" fill="#FFFFFF" />
|
|
@@ -408,13 +390,11 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
408
390
|
</defs>
|
|
409
391
|
<image xlink:href="${a.icon}" x="94" y="0" width="40" height="40" clip-path="url(#${s})" />
|
|
410
392
|
<text x="50%" y="55" width="228" font-size="14" fill="#FFFFFF" text-anchor="middle" dominant-baseline="middle" font-family="Helvetica, Arial, sans-serif">${a.name}</text>
|
|
411
|
-
</g
|
|
393
|
+
</g>`:`<g id="${i}" transform="translate(0, 30)" width="228" height="70" viewBox="0 0 228 70">
|
|
412
394
|
<circle cx="114" cy="15" r="20" fill="#D9D9D9"/>
|
|
413
395
|
<text x="50%" y="55" width="228" font-size="14" fill="#FFFFFF" text-anchor="middle" dominant-baseline="middle" font-family="Helvetica, Arial, sans-serif">${a.name}</text>
|
|
414
|
-
</g
|
|
415
|
-
}
|
|
416
|
-
return e === "app-kyc" ? `<g id="${l(t, "holder")}" transform="translate(24, 151)" width="180" height="24">
|
|
417
|
-
<circle cx="12" cy="12" r="12" fill="url(#${l(t, "holder-image")})" />
|
|
396
|
+
</g>`}return e==="app-kyc"?`<g id="${l(t,"holder")}" transform="translate(24, 151)" width="180" height="24">
|
|
397
|
+
<circle cx="12" cy="12" r="12" fill="url(#${l(t,"holder-image")})" />
|
|
418
398
|
<foreignObject x="32" y="0" width="156" height="24">
|
|
419
399
|
<div
|
|
420
400
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
@@ -424,7 +404,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
424
404
|
</div>
|
|
425
405
|
</foreignObject>
|
|
426
406
|
<defs>
|
|
427
|
-
<pattern id="${l(t,
|
|
407
|
+
<pattern id="${l(t,"holder-image")}" width="24" height="24" patternUnits="userSpaceOnUse">
|
|
428
408
|
<image
|
|
429
409
|
xlink:href="${a.icon}"
|
|
430
410
|
x="0"
|
|
@@ -433,11 +413,8 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
433
413
|
height="24" />
|
|
434
414
|
</pattern>
|
|
435
415
|
</defs>
|
|
436
|
-
</g
|
|
437
|
-
|
|
438
|
-
const r = a === "app-kyc" ? 188 : 151;
|
|
439
|
-
return a === "app-kyc" ? `<g id="${l(t, "issuer")}" transform="translate(24, ${r})" width="180" height="14">
|
|
440
|
-
<g id="${l(t, "issuer-badge")}">
|
|
416
|
+
</g>`:""},g=(e,t,a,i=12)=>{const r=a==="app-kyc"?188:151;return a==="app-kyc"?`<g id="${l(t,"issuer")}" transform="translate(24, ${r})" width="180" height="14">
|
|
417
|
+
<g id="${l(t,"issuer-badge")}">
|
|
441
418
|
<path
|
|
442
419
|
d="M11.3727 8.65674L12.5195 10.6436C12.5667 10.7254 12.5933 10.8174 12.5972 10.9118C12.601 11.0061 12.5818 11.1 12.5414 11.1854C12.501 11.2707 12.4404 11.345 12.365 11.4018C12.2895 11.4586 12.2014 11.4963 12.1083 11.5116L12.0423 11.518L11.977 11.5174L10.2661 11.4066L9.506 12.9442C9.46474 13.0275 9.4042 13.0997 9.32941 13.1549C9.25463 13.21 9.16775 13.2465 9.07602 13.2614C8.98428 13.2762 8.89033 13.2689 8.80198 13.2402C8.71362 13.2114 8.6334 13.1619 8.568 13.0959L8.52017 13.0411L8.47817 12.9769L7.33017 10.9895C8.13831 10.939 8.92378 10.7021 9.6251 10.2974C10.3264 9.89269 10.9246 9.33115 11.3727 8.65674Z"
|
|
443
420
|
style="fill:white;fill-opacity:1;" />
|
|
@@ -456,8 +433,8 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
456
433
|
${e.name}
|
|
457
434
|
</div>
|
|
458
435
|
</foreignObject>
|
|
459
|
-
</g
|
|
460
|
-
<rect x="0" y="0" width="14" height="14" rx="2" fill="url(#${l(t,
|
|
436
|
+
</g>`:e.icon?`<g id="${l(t,"issuer")}" transform="translate(24, ${r})" width="180" height="14">
|
|
437
|
+
<rect x="0" y="0" width="14" height="14" rx="2" fill="url(#${l(t,"issuer-image")})" />
|
|
461
438
|
<foreignObject x="20" y="-2" width="156" height="18">
|
|
462
439
|
<div
|
|
463
440
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
@@ -467,7 +444,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
467
444
|
</div>
|
|
468
445
|
</foreignObject>
|
|
469
446
|
<defs>
|
|
470
|
-
<pattern id="${l(t,
|
|
447
|
+
<pattern id="${l(t,"issuer-image")}" width="14" height="14" patternUnits="userSpaceOnUse">
|
|
471
448
|
<image
|
|
472
449
|
xlink:href="${e.icon}"
|
|
473
450
|
x="0"
|
|
@@ -476,7 +453,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
476
453
|
height="14" />
|
|
477
454
|
</pattern>
|
|
478
455
|
</defs>
|
|
479
|
-
</g
|
|
456
|
+
</g>`:`<g id="${l(t,"issuer")}" transform="translate(24, ${r})" width="180" height="14">
|
|
480
457
|
<rect x="0" y="0" width="14" height="14" rx="2" fill="#6D6D6D"/>
|
|
481
458
|
<foreignObject x="0" y="-2" width="176" height="18">
|
|
482
459
|
<div
|
|
@@ -486,11 +463,8 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
486
463
|
${e.name}
|
|
487
464
|
</div>
|
|
488
465
|
</foreignObject>
|
|
489
|
-
</g
|
|
490
|
-
|
|
491
|
-
const r = a === "app-kyc" ? 211 : 181;
|
|
492
|
-
return a === "app-kyc" && e.key === "email" ? `<g id="${l(t, "extra")}" transform="translate(24, ${r})" width="180" height="15">
|
|
493
|
-
<g id="${l(t, "extra-badge")}">
|
|
466
|
+
</g>`},C=(e,t,a,i=12)=>{const r=a==="app-kyc"?211:181;return a==="app-kyc"&&e.key==="email"?`<g id="${l(t,"extra")}" transform="translate(24, ${r})" width="180" height="15">
|
|
467
|
+
<g id="${l(t,"extra-badge")}">
|
|
494
468
|
<path
|
|
495
469
|
d="M12.8333 4.89545V10.4167C12.8334 10.8631 12.6628 11.2926 12.3566 11.6173C12.0504 11.9421 11.6316 12.1376 11.186 12.1638L11.0833 12.1667H2.91666C2.47029 12.1667 2.04078 11.9962 1.71601 11.6899C1.39124 11.3837 1.19577 10.965 1.16958 10.5194L1.16666 10.4167V4.89545L6.67625 8.5687L6.74391 8.6072C6.82366 8.64616 6.91124 8.66641 7 8.66641C7.08875 8.66641 7.17634 8.64616 7.25608 8.6072L7.32375 8.5687L12.8333 4.89545Z"
|
|
496
470
|
style="fill:white;fill-opacity:1;" />
|
|
@@ -509,7 +483,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
509
483
|
dominant-baseline="middle">
|
|
510
484
|
${e.value}
|
|
511
485
|
</text>
|
|
512
|
-
</g
|
|
486
|
+
</g>`:`<g id="${l(t,"extra")}" transform="translate(24, ${r})" width="180" height="14">
|
|
513
487
|
<text
|
|
514
488
|
x="0"
|
|
515
489
|
y="8"
|
|
@@ -521,7 +495,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
521
495
|
dominant-baseline="middle">
|
|
522
496
|
${e.key}
|
|
523
497
|
<tspan
|
|
524
|
-
dx="${e.key.length
|
|
498
|
+
dx="${e.key.length?4:0}"
|
|
525
499
|
dy="0"
|
|
526
500
|
font-size="${i}"
|
|
527
501
|
font-family="Helvetica, Arial, sans-serif"
|
|
@@ -532,9 +506,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
532
506
|
${e.value}
|
|
533
507
|
</tspan>
|
|
534
508
|
</text>
|
|
535
|
-
</g
|
|
536
|
-
}, k = (e, t, a = 10) => {
|
|
537
|
-
const i = e.replace("did:abt:", ""), s = x(i), r = s ? w(i) : g(i).color, n = `<g id="${l(t, "did-prefix")}" transform="translate(24, 210)" height="14">
|
|
509
|
+
</g>`},m=(e,t,a=10)=>{const i=e.replace("did:abt:",""),s=H(i),r=s?S(i):h.getDIDMotifInfo(i).color,c=`<g id="${l(t,"did-prefix")}" transform="translate(24, 210)" height="14">
|
|
538
510
|
<text
|
|
539
511
|
x="0"
|
|
540
512
|
y="8"
|
|
@@ -554,13 +526,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
554
526
|
alignment-baseline="middle"
|
|
555
527
|
dominant-baseline="middle">ABT:</tspan>
|
|
556
528
|
</text>
|
|
557
|
-
</g>`;
|
|
558
|
-
let o = "";
|
|
559
|
-
s === !1 && (o = C(i).replace(
|
|
560
|
-
"<svg ",
|
|
561
|
-
`<g id="${l(t, "did-motif")}" transform="translate(67, 211) scale(0.12, 0.12)" width="12" height="12" `
|
|
562
|
-
).replace("</svg>", "</g>"));
|
|
563
|
-
const c = `<g id="${l(t, "did-suffix")}" transform="translate(${s ? 67 : 80}, 210)" height="14">
|
|
529
|
+
</g>`;let n="";s===!1&&(n=h.toSvg(i).replace("<svg ",`<g id="${l(t,"did-motif")}" transform="translate(67, 211) scale(0.12, 0.12)" width="12" height="12" `).replace("</svg>","</g>"));const d=`<g id="${l(t,"did-suffix")}" transform="translate(${s?67:80}, 210)" height="14">
|
|
564
530
|
<text
|
|
565
531
|
x="0"
|
|
566
532
|
y="8"
|
|
@@ -570,20 +536,18 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
570
536
|
text-anchor="start"
|
|
571
537
|
alignment-baseline="middle"
|
|
572
538
|
dominant-baseline="middle">
|
|
573
|
-
${
|
|
539
|
+
${L(i)}
|
|
574
540
|
</text>
|
|
575
|
-
</g>`;
|
|
576
|
-
return [n, o, c].filter(Boolean).join("");
|
|
577
|
-
}, V = (e) => `<g id="${l(e, "verifiable-badge")}" transform="translate(189, 206)" width="22" height="22" viewBox="0 0 22 22" fill="none">
|
|
541
|
+
</g>`;return[c,n,d].filter(Boolean).join("")},u=e=>`<g id="${l(e,"verifiable-badge")}" transform="translate(189, 206)" width="22" height="22" viewBox="0 0 22 22" fill="none">
|
|
578
542
|
<path
|
|
579
543
|
fill-rule="evenodd"
|
|
580
544
|
clip-rule="evenodd"
|
|
581
545
|
d="M9.32218 0.226122L10.6305 0.0488281L10.6849 0.437063L9.84501 0.550946L9.90971 1.03495L10.6267 0.937887L10.6797 1.32612L9.96277 1.42318L10.0715 2.22942L9.60301 2.29283L9.32218 0.226122ZM7.90771 0.615652L7.46254 0.776122L8.17301 2.74448L8.61818 2.584L7.90771 0.615652ZM4.86783 2.18153L5.50065 1.77259C5.87336 1.53189 6.26289 1.46459 6.53595 1.88259C6.71202 2.15212 6.68901 2.3969 6.55052 2.60097L7.39783 3.04471L6.95265 3.32553L6.20681 2.91365L5.99371 3.04989L6.40265 3.68271L6.00536 3.94153L4.86783 2.18153ZM5.98983 2.60342C6.19948 2.474 6.24865 2.30706 6.14254 2.13365C6.03642 1.96024 5.88371 1.97448 5.67148 2.10906L5.4683 2.23848L5.78665 2.73153L5.98983 2.60342ZM3.72771 3.16506L2.85289 4.14083L4.40971 5.53848L5.30654 4.52906L5.01148 4.27024L4.43042 4.9173L4.07195 4.59248L4.54689 4.06189L4.25183 3.80306L3.7756 4.33495L3.46371 4.04765L4.02277 3.42389L3.72771 3.16506ZM1.27018 6.79765L1.49795 6.35118L2.48018 6.57118C2.5982 6.59558 2.70984 6.62299 2.82194 6.65053L2.82197 6.65053L2.82199 6.65054C2.9299 6.67704 3.03825 6.70365 3.15313 6.72777V6.71612C3.06117 6.63161 2.97134 6.55416 2.88178 6.47695L2.88178 6.47694L2.88177 6.47694L2.88177 6.47693C2.79991 6.40636 2.71829 6.33598 2.63548 6.26059L1.87971 5.598L2.09971 5.16706L3.67465 6.68118L3.41583 7.18718L1.27018 6.79765ZM12.0668 13.0321V8.62819L9.27011 7.0135H7.07252V14.6468H9.27011L9.61052 14.4503L10.2993 14.848L9.45467 15.3356H6.3837V6.32468H9.45467L12.7556 8.2305V13.4298L12.3655 13.6551L11.6767 13.2574L12.0668 13.0321ZM11.6799 6.81176L12.5235 6.3247H15.5945V15.3356H12.7914C12.6159 15.3356 12.4435 15.2894 12.2914 15.2017L9.22253 13.4298V8.23051L9.61372 8.00466L10.3025 8.40235L9.91135 8.6282V13.0321L12.7081 14.6468H14.9057V7.01351H12.7081L12.3687 7.20944L11.6799 6.81176ZM3.02371 13.5788C2.87489 13.0612 2.35465 12.7364 1.68042 12.9318C0.997126 13.1311 0.765479 13.6642 0.915596 14.1832C0.949598 14.3085 1.01116 14.4247 1.09579 14.5232C1.18042 14.6217 1.28599 14.7001 1.40477 14.7526L1.62089 14.4174C1.54869 14.3853 1.48413 14.3383 1.43148 14.2794C1.37883 14.2205 1.33929 14.1511 1.31548 14.0758C1.23007 13.7807 1.42418 13.5115 1.83313 13.3925C2.24207 13.2734 2.55007 13.4222 2.6303 13.7005C2.64794 13.7684 2.65199 13.8392 2.64222 13.9087C2.63245 13.9782 2.60905 14.0451 2.57336 14.1055L2.9383 14.266C2.99751 14.1629 3.03556 14.049 3.05022 13.931C3.06489 13.813 3.05588 13.6933 3.02371 13.5788ZM3.50642 14.9351L3.90889 15.5821C4.14571 15.9626 4.20654 16.3586 3.77948 16.6174C3.50841 16.7817 3.2655 16.7593 3.06364 16.6238L2.59795 17.478L2.31583 17.0238L2.74969 16.2773L2.6083 16.0506L1.96124 16.4518L1.71148 16.0467L3.50642 14.9351ZM3.06124 16.0635C3.19065 16.2771 3.3563 16.334 3.5336 16.2253C3.71089 16.1166 3.69795 15.9665 3.56595 15.7491L3.43654 15.542L2.93183 15.8552L3.06124 16.0635ZM5.8863 17.8404L4.91571 16.9345L3.47536 18.4861L4.46795 19.4114L4.74877 19.1086L4.10171 18.5094L4.4343 18.1522L4.96101 18.644L5.23407 18.3502L4.70736 17.8585L4.99465 17.5531L5.61324 18.1315L5.8863 17.8404ZM6.62136 18.3761L7.15065 18.6531C7.72265 18.9507 7.94265 19.4295 7.60748 20.0766C7.2723 20.7237 6.7443 20.8285 6.1956 20.5425L5.64301 20.2539L6.62136 18.3761ZM6.32501 20.1711C6.64207 20.3367 6.93842 20.2927 7.17266 19.8449C7.40689 19.3972 7.26454 19.1448 6.94748 18.9792L6.86595 18.9365L6.24477 20.1284L6.32501 20.1711ZM10.2061 19.6871L8.91195 19.4114L8.47324 21.4678L9.79971 21.7499L9.88383 21.3617L9.02324 21.1818L9.12418 20.7055L9.82948 20.8557L9.9123 20.4674L9.2083 20.3173L9.29501 19.898L10.1232 20.0753L10.2061 19.6871ZM11.1119 19.7647L11.6011 19.7337L12.2171 20.7482L12.4552 21.1986H12.4682C12.4606 21.152 12.452 21.1022 12.443 21.0501L12.443 21.0501C12.4093 20.8548 12.3704 20.6292 12.3582 20.4351L12.3116 19.6897L12.7658 19.6612L12.8952 21.7706L12.4061 21.8017L11.7901 20.7845L11.5519 20.3367H11.539C11.5471 20.3861 11.5559 20.4378 11.5651 20.491L11.5651 20.4913C11.5986 20.6862 11.6355 20.9012 11.6477 21.0964L11.6956 21.8457L11.2414 21.8741L11.1119 19.7647ZM13.6704 19.8812L14.2191 19.6871L14.7924 21.3034L15.2428 21.1442L14.6721 19.5279L15.2234 19.3351L15.0939 18.9572L13.541 19.5033L13.6704 19.8812ZM15.8031 18.5431L16.2095 18.292L17.3224 20.0882L16.9161 20.3393L15.8031 18.5431ZM17.7132 17.0458L17.303 17.4444L18.2956 19.4244L18.6489 19.084L18.3941 18.6348L18.8557 18.1822L19.2985 18.4525L19.6622 18.1005L17.7132 17.0458ZM18.5275 17.9818L18.3551 17.8766C18.2405 17.8103 18.1169 17.7327 17.9943 17.6557C17.9135 17.605 17.8331 17.5546 17.7559 17.5078L17.7469 17.5168L17.7557 17.5312C17.8724 17.7228 18.0005 17.9331 18.1028 18.1212L18.2027 18.2974L18.5275 17.9818ZM18.5932 16.0066L18.8417 15.5989L20.3041 16.4906L20.7389 15.7788L21.0805 15.9872L20.3972 17.1079L18.5932 16.0066ZM21.1038 14.4304L21.3381 14.7888C21.5849 14.64 21.7682 14.4055 21.8531 14.1301C21.9994 13.6474 21.7936 13.2799 21.4584 13.1777C21.1737 13.0897 20.9602 13.1945 20.7855 13.4106L20.603 13.6371C20.4788 13.7924 20.3843 13.9075 20.2691 13.8726C20.1539 13.8377 20.119 13.7173 20.1669 13.5594C20.2163 13.4062 20.3174 13.275 20.4529 13.188L20.2355 12.8697C20.0129 12.992 19.8467 13.1963 19.7722 13.4391C19.6492 13.8622 19.8252 14.244 20.1604 14.3449C20.2839 14.3807 20.4155 14.3768 20.5367 14.3339C20.6579 14.2909 20.7625 14.2111 20.8359 14.1055L21.0275 13.8726L21.0309 13.8685C21.1558 13.7168 21.2382 13.6167 21.3575 13.6539C21.4778 13.6914 21.5244 13.8066 21.4662 13.9981C21.3986 14.1796 21.2707 14.3322 21.1038 14.4304ZM12.4255 0.0967106L11.9544 0.0617694L11.7991 2.14789L12.2715 2.18283L12.4255 0.0967106ZM14.2592 0.430593L14.8015 0.593652L14.8248 2.79365L14.3459 2.64871L14.3668 2.12973L13.7601 1.9465L13.4879 2.39377L13.0259 2.254L14.2592 0.430593ZM14.3899 1.55518L14.3822 1.74864L13.9585 1.62052L14.0574 1.45812C14.166 1.28796 14.2813 1.08628 14.3877 0.900319L14.3877 0.900299L14.4107 0.86024H14.4223C14.4189 0.944179 14.4136 1.03189 14.4082 1.12017L14.4082 1.12021C14.3991 1.26873 14.3899 1.41883 14.3899 1.55518ZM17.2008 1.74024L16.5964 1.352L15.4757 3.12236L16.1305 3.53906C16.5136 3.78236 16.9199 3.81471 17.1477 3.45495C17.2142 3.36233 17.2452 3.24887 17.235 3.1353C17.2248 3.02172 17.1741 2.91561 17.0921 2.83636L17.0998 2.826C17.193 2.83723 17.2874 2.82105 17.3716 2.77945C17.4557 2.73785 17.5258 2.67263 17.5735 2.59177C17.7883 2.25789 17.567 1.97318 17.2008 1.74024ZM16.7737 3.17671C16.6728 3.33459 16.511 3.34236 16.2936 3.20518L16.0645 3.06283L16.3544 2.6073L16.5822 2.74836C16.8022 2.88812 16.8747 3.01883 16.7737 3.17671ZM17.1464 2.39506C17.0649 2.52448 16.9264 2.55812 16.7336 2.42871L16.5408 2.30965L16.7996 1.91106L16.9898 2.03142C17.1762 2.14918 17.2279 2.26565 17.1464 2.39506ZM18.9918 3.13271L19.3115 3.48083L18.064 4.62871L18.6243 5.23565L18.3318 5.50483L17.4518 4.54977L18.9918 3.13271ZM21.2928 6.38612L20.6729 5.23177L18.8262 6.22177L19.4603 7.40459L19.8149 7.21695L19.4034 6.45083L19.8278 6.22306L20.1643 6.85071L20.5137 6.66306L20.1772 6.03542L20.5474 5.83612L20.9434 6.57377L21.2928 6.38612Z"
|
|
582
|
-
fill="url(#${l(e,
|
|
546
|
+
fill="url(#${l(e,"badge-gradient")})"
|
|
583
547
|
/>
|
|
584
548
|
<defs>
|
|
585
549
|
<radialGradient
|
|
586
|
-
id="${l(e,
|
|
550
|
+
id="${l(e,"badge-gradient")}"
|
|
587
551
|
cx="0"
|
|
588
552
|
cy="0"
|
|
589
553
|
r="1"
|
|
@@ -595,9 +559,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
595
559
|
<stop offset="1" stop-color="#94F0BA" />
|
|
596
560
|
</radialGradient>
|
|
597
561
|
</defs>
|
|
598
|
-
</g>`,
|
|
599
|
-
const i = l(a, "chain-badge"), s = t ? 189 : 162;
|
|
600
|
-
return e === "ethereum" ? `<g id="${i}" transform="translate(${s}, 205)" width="24" height="24" viewBox="0 0 24 24">
|
|
562
|
+
</g>`,x=(e,t,a)=>{const i=l(a,"chain-badge"),s=t?189:162;return e==="ethereum"?`<g id="${i}" transform="translate(${s}, 205)" width="24" height="24" viewBox="0 0 24 24">
|
|
601
563
|
<defs>
|
|
602
564
|
<style>
|
|
603
565
|
.cls-1,
|
|
@@ -679,7 +641,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
679
641
|
</g>
|
|
680
642
|
<path class="cls-3" d="M15,12.09l-3,1.82L9,12.09,12,7Zm-3,2.4L9,12.68,12,17l3-4.32Z" />
|
|
681
643
|
</g>
|
|
682
|
-
</g
|
|
644
|
+
</g>`:e==="arcblock"?`<g id="${i}" transform="translate(${s}, 205)" width="24" height="24" viewBox="0 0 24 24">
|
|
683
645
|
<defs>
|
|
684
646
|
<style>
|
|
685
647
|
.cls-1 {
|
|
@@ -782,20 +744,7 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
782
744
|
/>
|
|
783
745
|
</g>
|
|
784
746
|
</g>
|
|
785
|
-
</g
|
|
786
|
-
}, D = (e, t, a) => {
|
|
787
|
-
const i = e ? V(a) : "", s = H(t, !e, a);
|
|
788
|
-
return [i, s].filter(Boolean).join("");
|
|
789
|
-
}, F = (e, t, a) => {
|
|
790
|
-
const i = {
|
|
791
|
-
success: "#34BE74",
|
|
792
|
-
error: "#F16E6E",
|
|
793
|
-
info: "#0775F8",
|
|
794
|
-
warning: "#DE9E37"
|
|
795
|
-
};
|
|
796
|
-
if (e) {
|
|
797
|
-
const s = l(a, "tag-distort");
|
|
798
|
-
return `<g id="${l(a, "tag")}" transform="translate(112,-36) rotate(45)">
|
|
747
|
+
</g>`:""},y=(e,t,a)=>{const i=e?u(a):"",s=x(t,!e,a);return[i,s].filter(Boolean).join("")},w=(e,t,a)=>{const i={success:"#34BE74",error:"#F16E6E",info:"#0775F8",warning:"#DE9E37"};if(e){const s=l(a,"tag-distort");return`<g id="${l(a,"tag")}" transform="translate(112,-36) rotate(45)">
|
|
799
748
|
<rect x="60" y="0" width="95" height="30" stroke="${i[t]}" stroke-width="2" />
|
|
800
749
|
<text
|
|
801
750
|
x="104"
|
|
@@ -813,31 +762,4 @@ const l = (e, t) => [e, t].join("-"), m = 228, u = 258, x = (e) => /^(0x)?[0-9a-
|
|
|
813
762
|
<feDisplacementMap in="SourceGraphic" in2="noise" scale="10" xChannelSelector="R" yChannelSelector="R" />
|
|
814
763
|
</filter>
|
|
815
764
|
</defs>
|
|
816
|
-
</g
|
|
817
|
-
}
|
|
818
|
-
return "";
|
|
819
|
-
}, b = (e = 8) => [...Array(e)].map(() => Math.random().toString(36)[2]).join(""), U = (e) => {
|
|
820
|
-
const t = e.id || b(8), a = e.width || m, i = e.height || u, s = e.color || d[e.variant] || d["app-passport"], r = $(e.variant, t, s), n = Z(e.variant, t, e.header), o = M(e.issuer, t, e.variant), c = v(e.extra, t, e.variant), L = D(e.verifiable, e.chain, t), f = e.variant !== "app-kyc" ? k(e.did, t) : "", p = F(e.tag, e.tagVariant, t);
|
|
821
|
-
return r([n, o, c, L, f, p].filter(Boolean).join(""), a, i);
|
|
822
|
-
};
|
|
823
|
-
export {
|
|
824
|
-
d as DEFAULT_COLORS,
|
|
825
|
-
h as MOTIF_COLORS,
|
|
826
|
-
y as formatDid,
|
|
827
|
-
D as getBadgesSvg,
|
|
828
|
-
H as getChainBadge,
|
|
829
|
-
k as getDidSvg,
|
|
830
|
-
v as getExtraSvg,
|
|
831
|
-
Z as getHeaderSvg,
|
|
832
|
-
M as getIssuerSvg,
|
|
833
|
-
$ as getLayoutSvg,
|
|
834
|
-
A as getNftBGColor,
|
|
835
|
-
_ as getNftBGColorFromDid,
|
|
836
|
-
I as getPassportColorFromDid,
|
|
837
|
-
U as getSvg,
|
|
838
|
-
F as getTagSvg,
|
|
839
|
-
V as getVerifiableBadge,
|
|
840
|
-
j as hslToRgb,
|
|
841
|
-
b as nanoid,
|
|
842
|
-
E as rgbToHsl
|
|
843
|
-
};
|
|
765
|
+
</g>`}return""},$=(e=8)=>[...Array(e)].map(()=>Math.random().toString(36)[2]).join(""),D=e=>{const t=e.id||$(8),a=e.width||k,i=e.height||V,s=e.color||o.DEFAULT_COLORS[e.variant]||o.DEFAULT_COLORS["app-passport"],r=f(e.variant,t,s),c=p(e.variant,t,e.header),n=g(e.issuer,t,e.variant),d=C(e.extra,t,e.variant),M=y(e.verifiable,e.chain,t),Z=e.variant!=="app-kyc"?m(e.did,t):"",v=w(e.tag,e.tagVariant,t);return r([c,n,d,M,Z,v].filter(Boolean).join(""),a,i)};exports.DEFAULT_COLORS=o.DEFAULT_COLORS;exports.MOTIF_COLORS=o.MOTIF_COLORS;exports.getNftBGColor=o.getNftBGColor;exports.getNftBGColorFromDid=o.getNftBGColorFromDid;exports.getPassportColorFromDid=o.getPassportColorFromDid;exports.hslToRgb=o.hslToRgb;exports.rgbToHsl=o.rgbToHsl;exports.formatDid=L;exports.getBadgesSvg=y;exports.getChainBadge=x;exports.getDidSvg=m;exports.getExtraSvg=C;exports.getHeaderSvg=p;exports.getIssuerSvg=g;exports.getLayoutSvg=f;exports.getSvg=D;exports.getTagSvg=w;exports.getVerifiableBadge=u;exports.nanoid=$;
|