@cryptocadet/react-crypto-pay 1.0.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 +39 -0
- package/dist/index-DQPobPMI.js +3539 -0
- package/dist/index-DQPobPMI.js.map +1 -0
- package/dist/index-iYZ_Iqex.js +421 -0
- package/dist/index-iYZ_Iqex.js.map +1 -0
- package/dist/react-crypto-pay.es.js +66400 -0
- package/dist/react-crypto-pay.es.js.map +1 -0
- package/dist/react-crypto-pay.umd.js +563 -0
- package/dist/react-crypto-pay.umd.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +59 -0
|
@@ -0,0 +1,3539 @@
|
|
|
1
|
+
import { n as _t, s as ce, T as N, o as ot, R as jo, a as C, t as W, p as K, y as gt } from "./index-iYZ_Iqex.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2019 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
const de = window, wr = de.ShadowRoot && (de.ShadyCSS === void 0 || de.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, vr = Symbol(), _r = /* @__PURE__ */ new WeakMap();
|
|
8
|
+
let no = class {
|
|
9
|
+
constructor(t, r, n) {
|
|
10
|
+
if (this._$cssResult$ = !0, n !== vr)
|
|
11
|
+
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
12
|
+
this.cssText = t, this.t = r;
|
|
13
|
+
}
|
|
14
|
+
get styleSheet() {
|
|
15
|
+
let t = this.o;
|
|
16
|
+
const r = this.t;
|
|
17
|
+
if (wr && t === void 0) {
|
|
18
|
+
const n = r !== void 0 && r.length === 1;
|
|
19
|
+
n && (t = _r.get(r)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), n && _r.set(r, t));
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
}
|
|
23
|
+
toString() {
|
|
24
|
+
return this.cssText;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const Wo = (e) => new no(typeof e == "string" ? e : e + "", void 0, vr), I = (e, ...t) => {
|
|
28
|
+
const r = e.length === 1 ? e[0] : t.reduce((n, o, i) => n + ((s) => {
|
|
29
|
+
if (s._$cssResult$ === !0)
|
|
30
|
+
return s.cssText;
|
|
31
|
+
if (typeof s == "number")
|
|
32
|
+
return s;
|
|
33
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + s + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
34
|
+
})(o) + e[i + 1], e[0]);
|
|
35
|
+
return new no(r, e, vr);
|
|
36
|
+
}, Ho = (e, t) => {
|
|
37
|
+
wr ? e.adoptedStyleSheets = t.map((r) => r instanceof CSSStyleSheet ? r : r.styleSheet) : t.forEach((r) => {
|
|
38
|
+
const n = document.createElement("style"), o = de.litNonce;
|
|
39
|
+
o !== void 0 && n.setAttribute("nonce", o), n.textContent = r.cssText, e.appendChild(n);
|
|
40
|
+
});
|
|
41
|
+
}, Or = wr ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
|
|
42
|
+
let r = "";
|
|
43
|
+
for (const n of t.cssRules)
|
|
44
|
+
r += n.cssText;
|
|
45
|
+
return Wo(r);
|
|
46
|
+
})(e) : e;
|
|
47
|
+
/**
|
|
48
|
+
* @license
|
|
49
|
+
* Copyright 2017 Google LLC
|
|
50
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
+
*/
|
|
52
|
+
var Ce;
|
|
53
|
+
const he = window, kr = he.trustedTypes, zo = kr ? kr.emptyScript : "", Ir = he.reactiveElementPolyfillSupport, sr = { toAttribute(e, t) {
|
|
54
|
+
switch (t) {
|
|
55
|
+
case Boolean:
|
|
56
|
+
e = e ? zo : null;
|
|
57
|
+
break;
|
|
58
|
+
case Object:
|
|
59
|
+
case Array:
|
|
60
|
+
e = e == null ? e : JSON.stringify(e);
|
|
61
|
+
}
|
|
62
|
+
return e;
|
|
63
|
+
}, fromAttribute(e, t) {
|
|
64
|
+
let r = e;
|
|
65
|
+
switch (t) {
|
|
66
|
+
case Boolean:
|
|
67
|
+
r = e !== null;
|
|
68
|
+
break;
|
|
69
|
+
case Number:
|
|
70
|
+
r = e === null ? null : Number(e);
|
|
71
|
+
break;
|
|
72
|
+
case Object:
|
|
73
|
+
case Array:
|
|
74
|
+
try {
|
|
75
|
+
r = JSON.parse(e);
|
|
76
|
+
} catch {
|
|
77
|
+
r = null;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return r;
|
|
81
|
+
} }, io = (e, t) => t !== e && (t == t || e == e), Ee = { attribute: !0, type: String, converter: sr, reflect: !1, hasChanged: io }, ar = "finalized";
|
|
82
|
+
let $t = class extends HTMLElement {
|
|
83
|
+
constructor() {
|
|
84
|
+
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
|
|
85
|
+
}
|
|
86
|
+
static addInitializer(t) {
|
|
87
|
+
var r;
|
|
88
|
+
this.finalize(), ((r = this.h) !== null && r !== void 0 ? r : this.h = []).push(t);
|
|
89
|
+
}
|
|
90
|
+
static get observedAttributes() {
|
|
91
|
+
this.finalize();
|
|
92
|
+
const t = [];
|
|
93
|
+
return this.elementProperties.forEach((r, n) => {
|
|
94
|
+
const o = this._$Ep(n, r);
|
|
95
|
+
o !== void 0 && (this._$Ev.set(o, n), t.push(o));
|
|
96
|
+
}), t;
|
|
97
|
+
}
|
|
98
|
+
static createProperty(t, r = Ee) {
|
|
99
|
+
if (r.state && (r.attribute = !1), this.finalize(), this.elementProperties.set(t, r), !r.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
|
100
|
+
const n = typeof t == "symbol" ? Symbol() : "__" + t, o = this.getPropertyDescriptor(t, n, r);
|
|
101
|
+
o !== void 0 && Object.defineProperty(this.prototype, t, o);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
static getPropertyDescriptor(t, r, n) {
|
|
105
|
+
return { get() {
|
|
106
|
+
return this[r];
|
|
107
|
+
}, set(o) {
|
|
108
|
+
const i = this[t];
|
|
109
|
+
this[r] = o, this.requestUpdate(t, i, n);
|
|
110
|
+
}, configurable: !0, enumerable: !0 };
|
|
111
|
+
}
|
|
112
|
+
static getPropertyOptions(t) {
|
|
113
|
+
return this.elementProperties.get(t) || Ee;
|
|
114
|
+
}
|
|
115
|
+
static finalize() {
|
|
116
|
+
if (this.hasOwnProperty(ar))
|
|
117
|
+
return !1;
|
|
118
|
+
this[ar] = !0;
|
|
119
|
+
const t = Object.getPrototypeOf(this);
|
|
120
|
+
if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
121
|
+
const r = this.properties, n = [...Object.getOwnPropertyNames(r), ...Object.getOwnPropertySymbols(r)];
|
|
122
|
+
for (const o of n)
|
|
123
|
+
this.createProperty(o, r[o]);
|
|
124
|
+
}
|
|
125
|
+
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
126
|
+
}
|
|
127
|
+
static finalizeStyles(t) {
|
|
128
|
+
const r = [];
|
|
129
|
+
if (Array.isArray(t)) {
|
|
130
|
+
const n = new Set(t.flat(1 / 0).reverse());
|
|
131
|
+
for (const o of n)
|
|
132
|
+
r.unshift(Or(o));
|
|
133
|
+
} else
|
|
134
|
+
t !== void 0 && r.push(Or(t));
|
|
135
|
+
return r;
|
|
136
|
+
}
|
|
137
|
+
static _$Ep(t, r) {
|
|
138
|
+
const n = r.attribute;
|
|
139
|
+
return n === !1 ? void 0 : typeof n == "string" ? n : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
140
|
+
}
|
|
141
|
+
_$Eu() {
|
|
142
|
+
var t;
|
|
143
|
+
this._$E_ = new Promise((r) => this.enableUpdating = r), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t = this.constructor.h) === null || t === void 0 || t.forEach((r) => r(this));
|
|
144
|
+
}
|
|
145
|
+
addController(t) {
|
|
146
|
+
var r, n;
|
|
147
|
+
((r = this._$ES) !== null && r !== void 0 ? r : this._$ES = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((n = t.hostConnected) === null || n === void 0 || n.call(t));
|
|
148
|
+
}
|
|
149
|
+
removeController(t) {
|
|
150
|
+
var r;
|
|
151
|
+
(r = this._$ES) === null || r === void 0 || r.splice(this._$ES.indexOf(t) >>> 0, 1);
|
|
152
|
+
}
|
|
153
|
+
_$Eg() {
|
|
154
|
+
this.constructor.elementProperties.forEach((t, r) => {
|
|
155
|
+
this.hasOwnProperty(r) && (this._$Ei.set(r, this[r]), delete this[r]);
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
createRenderRoot() {
|
|
159
|
+
var t;
|
|
160
|
+
const r = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
161
|
+
return Ho(r, this.constructor.elementStyles), r;
|
|
162
|
+
}
|
|
163
|
+
connectedCallback() {
|
|
164
|
+
var t;
|
|
165
|
+
this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) === null || t === void 0 || t.forEach((r) => {
|
|
166
|
+
var n;
|
|
167
|
+
return (n = r.hostConnected) === null || n === void 0 ? void 0 : n.call(r);
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
enableUpdating(t) {
|
|
171
|
+
}
|
|
172
|
+
disconnectedCallback() {
|
|
173
|
+
var t;
|
|
174
|
+
(t = this._$ES) === null || t === void 0 || t.forEach((r) => {
|
|
175
|
+
var n;
|
|
176
|
+
return (n = r.hostDisconnected) === null || n === void 0 ? void 0 : n.call(r);
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
attributeChangedCallback(t, r, n) {
|
|
180
|
+
this._$AK(t, n);
|
|
181
|
+
}
|
|
182
|
+
_$EO(t, r, n = Ee) {
|
|
183
|
+
var o;
|
|
184
|
+
const i = this.constructor._$Ep(t, n);
|
|
185
|
+
if (i !== void 0 && n.reflect === !0) {
|
|
186
|
+
const s = (((o = n.converter) === null || o === void 0 ? void 0 : o.toAttribute) !== void 0 ? n.converter : sr).toAttribute(r, n.type);
|
|
187
|
+
this._$El = t, s == null ? this.removeAttribute(i) : this.setAttribute(i, s), this._$El = null;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
_$AK(t, r) {
|
|
191
|
+
var n;
|
|
192
|
+
const o = this.constructor, i = o._$Ev.get(t);
|
|
193
|
+
if (i !== void 0 && this._$El !== i) {
|
|
194
|
+
const s = o.getPropertyOptions(i), a = typeof s.converter == "function" ? { fromAttribute: s.converter } : ((n = s.converter) === null || n === void 0 ? void 0 : n.fromAttribute) !== void 0 ? s.converter : sr;
|
|
195
|
+
this._$El = i, this[i] = a.fromAttribute(r, s.type), this._$El = null;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
requestUpdate(t, r, n) {
|
|
199
|
+
let o = !0;
|
|
200
|
+
t !== void 0 && (((n = n || this.constructor.getPropertyOptions(t)).hasChanged || io)(this[t], r) ? (this._$AL.has(t) || this._$AL.set(t, r), n.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, n))) : o = !1), !this.isUpdatePending && o && (this._$E_ = this._$Ej());
|
|
201
|
+
}
|
|
202
|
+
async _$Ej() {
|
|
203
|
+
this.isUpdatePending = !0;
|
|
204
|
+
try {
|
|
205
|
+
await this._$E_;
|
|
206
|
+
} catch (r) {
|
|
207
|
+
Promise.reject(r);
|
|
208
|
+
}
|
|
209
|
+
const t = this.scheduleUpdate();
|
|
210
|
+
return t != null && await t, !this.isUpdatePending;
|
|
211
|
+
}
|
|
212
|
+
scheduleUpdate() {
|
|
213
|
+
return this.performUpdate();
|
|
214
|
+
}
|
|
215
|
+
performUpdate() {
|
|
216
|
+
var t;
|
|
217
|
+
if (!this.isUpdatePending)
|
|
218
|
+
return;
|
|
219
|
+
this.hasUpdated, this._$Ei && (this._$Ei.forEach((o, i) => this[i] = o), this._$Ei = void 0);
|
|
220
|
+
let r = !1;
|
|
221
|
+
const n = this._$AL;
|
|
222
|
+
try {
|
|
223
|
+
r = this.shouldUpdate(n), r ? (this.willUpdate(n), (t = this._$ES) === null || t === void 0 || t.forEach((o) => {
|
|
224
|
+
var i;
|
|
225
|
+
return (i = o.hostUpdate) === null || i === void 0 ? void 0 : i.call(o);
|
|
226
|
+
}), this.update(n)) : this._$Ek();
|
|
227
|
+
} catch (o) {
|
|
228
|
+
throw r = !1, this._$Ek(), o;
|
|
229
|
+
}
|
|
230
|
+
r && this._$AE(n);
|
|
231
|
+
}
|
|
232
|
+
willUpdate(t) {
|
|
233
|
+
}
|
|
234
|
+
_$AE(t) {
|
|
235
|
+
var r;
|
|
236
|
+
(r = this._$ES) === null || r === void 0 || r.forEach((n) => {
|
|
237
|
+
var o;
|
|
238
|
+
return (o = n.hostUpdated) === null || o === void 0 ? void 0 : o.call(n);
|
|
239
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
240
|
+
}
|
|
241
|
+
_$Ek() {
|
|
242
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
243
|
+
}
|
|
244
|
+
get updateComplete() {
|
|
245
|
+
return this.getUpdateComplete();
|
|
246
|
+
}
|
|
247
|
+
getUpdateComplete() {
|
|
248
|
+
return this._$E_;
|
|
249
|
+
}
|
|
250
|
+
shouldUpdate(t) {
|
|
251
|
+
return !0;
|
|
252
|
+
}
|
|
253
|
+
update(t) {
|
|
254
|
+
this._$EC !== void 0 && (this._$EC.forEach((r, n) => this._$EO(n, this[n], r)), this._$EC = void 0), this._$Ek();
|
|
255
|
+
}
|
|
256
|
+
updated(t) {
|
|
257
|
+
}
|
|
258
|
+
firstUpdated(t) {
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
$t[ar] = !0, $t.elementProperties = /* @__PURE__ */ new Map(), $t.elementStyles = [], $t.shadowRootOptions = { mode: "open" }, Ir == null || Ir({ ReactiveElement: $t }), ((Ce = he.reactiveElementVersions) !== null && Ce !== void 0 ? Ce : he.reactiveElementVersions = []).push("1.6.3");
|
|
262
|
+
/**
|
|
263
|
+
* @license
|
|
264
|
+
* Copyright 2017 Google LLC
|
|
265
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
266
|
+
*/
|
|
267
|
+
var Ae;
|
|
268
|
+
const ue = window, Ot = ue.trustedTypes, Tr = Ot ? Ot.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, lr = "$lit$", rt = `lit$${(Math.random() + "").slice(9)}$`, so = "?" + rt, Fo = `<${so}>`, ft = document, Zt = () => ft.createComment(""), Vt = (e) => e === null || typeof e != "object" && typeof e != "function", ao = Array.isArray, Zo = (e) => ao(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", _e = `[
|
|
269
|
+
\f\r]`, Rt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Pr = /-->/g, Mr = />/g, lt = RegExp(`>|${_e}(?:([^\\s"'>=/]+)(${_e}*=${_e}*(?:[^
|
|
270
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Sr = /'/g, Rr = /"/g, lo = /^(?:script|style|textarea|title)$/i, co = (e) => (t, ...r) => ({ _$litType$: e, strings: t, values: r }), m = co(1), L = co(2), pt = Symbol.for("lit-noChange"), B = Symbol.for("lit-nothing"), Lr = /* @__PURE__ */ new WeakMap(), ut = ft.createTreeWalker(ft, 129, null, !1);
|
|
271
|
+
function ho(e, t) {
|
|
272
|
+
if (!Array.isArray(e) || !e.hasOwnProperty("raw"))
|
|
273
|
+
throw Error("invalid template strings array");
|
|
274
|
+
return Tr !== void 0 ? Tr.createHTML(t) : t;
|
|
275
|
+
}
|
|
276
|
+
const Vo = (e, t) => {
|
|
277
|
+
const r = e.length - 1, n = [];
|
|
278
|
+
let o, i = t === 2 ? "<svg>" : "", s = Rt;
|
|
279
|
+
for (let a = 0; a < r; a++) {
|
|
280
|
+
const l = e[a];
|
|
281
|
+
let c, d, b = -1, h = 0;
|
|
282
|
+
for (; h < l.length && (s.lastIndex = h, d = s.exec(l), d !== null); )
|
|
283
|
+
h = s.lastIndex, s === Rt ? d[1] === "!--" ? s = Pr : d[1] !== void 0 ? s = Mr : d[2] !== void 0 ? (lo.test(d[2]) && (o = RegExp("</" + d[2], "g")), s = lt) : d[3] !== void 0 && (s = lt) : s === lt ? d[0] === ">" ? (s = o ?? Rt, b = -1) : d[1] === void 0 ? b = -2 : (b = s.lastIndex - d[2].length, c = d[1], s = d[3] === void 0 ? lt : d[3] === '"' ? Rr : Sr) : s === Rr || s === Sr ? s = lt : s === Pr || s === Mr ? s = Rt : (s = lt, o = void 0);
|
|
284
|
+
const f = s === lt && e[a + 1].startsWith("/>") ? " " : "";
|
|
285
|
+
i += s === Rt ? l + Fo : b >= 0 ? (n.push(c), l.slice(0, b) + lr + l.slice(b) + rt + f) : l + rt + (b === -2 ? (n.push(void 0), a) : f);
|
|
286
|
+
}
|
|
287
|
+
return [ho(e, i + (e[r] || "<?>") + (t === 2 ? "</svg>" : "")), n];
|
|
288
|
+
};
|
|
289
|
+
class Kt {
|
|
290
|
+
constructor({ strings: t, _$litType$: r }, n) {
|
|
291
|
+
let o;
|
|
292
|
+
this.parts = [];
|
|
293
|
+
let i = 0, s = 0;
|
|
294
|
+
const a = t.length - 1, l = this.parts, [c, d] = Vo(t, r);
|
|
295
|
+
if (this.el = Kt.createElement(c, n), ut.currentNode = this.el.content, r === 2) {
|
|
296
|
+
const b = this.el.content, h = b.firstChild;
|
|
297
|
+
h.remove(), b.append(...h.childNodes);
|
|
298
|
+
}
|
|
299
|
+
for (; (o = ut.nextNode()) !== null && l.length < a; ) {
|
|
300
|
+
if (o.nodeType === 1) {
|
|
301
|
+
if (o.hasAttributes()) {
|
|
302
|
+
const b = [];
|
|
303
|
+
for (const h of o.getAttributeNames())
|
|
304
|
+
if (h.endsWith(lr) || h.startsWith(rt)) {
|
|
305
|
+
const f = d[s++];
|
|
306
|
+
if (b.push(h), f !== void 0) {
|
|
307
|
+
const p = o.getAttribute(f.toLowerCase() + lr).split(rt), g = /([.?@])?(.*)/.exec(f);
|
|
308
|
+
l.push({ type: 1, index: i, name: g[2], strings: p, ctor: g[1] === "." ? qo : g[1] === "?" ? Jo : g[1] === "@" ? Go : ve });
|
|
309
|
+
} else
|
|
310
|
+
l.push({ type: 6, index: i });
|
|
311
|
+
}
|
|
312
|
+
for (const h of b)
|
|
313
|
+
o.removeAttribute(h);
|
|
314
|
+
}
|
|
315
|
+
if (lo.test(o.tagName)) {
|
|
316
|
+
const b = o.textContent.split(rt), h = b.length - 1;
|
|
317
|
+
if (h > 0) {
|
|
318
|
+
o.textContent = Ot ? Ot.emptyScript : "";
|
|
319
|
+
for (let f = 0; f < h; f++)
|
|
320
|
+
o.append(b[f], Zt()), ut.nextNode(), l.push({ type: 2, index: ++i });
|
|
321
|
+
o.append(b[h], Zt());
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
} else if (o.nodeType === 8)
|
|
325
|
+
if (o.data === so)
|
|
326
|
+
l.push({ type: 2, index: i });
|
|
327
|
+
else {
|
|
328
|
+
let b = -1;
|
|
329
|
+
for (; (b = o.data.indexOf(rt, b + 1)) !== -1; )
|
|
330
|
+
l.push({ type: 7, index: i }), b += rt.length - 1;
|
|
331
|
+
}
|
|
332
|
+
i++;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
static createElement(t, r) {
|
|
336
|
+
const n = ft.createElement("template");
|
|
337
|
+
return n.innerHTML = t, n;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
function kt(e, t, r = e, n) {
|
|
341
|
+
var o, i, s, a;
|
|
342
|
+
if (t === pt)
|
|
343
|
+
return t;
|
|
344
|
+
let l = n !== void 0 ? (o = r._$Co) === null || o === void 0 ? void 0 : o[n] : r._$Cl;
|
|
345
|
+
const c = Vt(t) ? void 0 : t._$litDirective$;
|
|
346
|
+
return (l == null ? void 0 : l.constructor) !== c && ((i = l == null ? void 0 : l._$AO) === null || i === void 0 || i.call(l, !1), c === void 0 ? l = void 0 : (l = new c(e), l._$AT(e, r, n)), n !== void 0 ? ((s = (a = r)._$Co) !== null && s !== void 0 ? s : a._$Co = [])[n] = l : r._$Cl = l), l !== void 0 && (t = kt(e, l._$AS(e, t.values), l, n)), t;
|
|
347
|
+
}
|
|
348
|
+
class Ko {
|
|
349
|
+
constructor(t, r) {
|
|
350
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = r;
|
|
351
|
+
}
|
|
352
|
+
get parentNode() {
|
|
353
|
+
return this._$AM.parentNode;
|
|
354
|
+
}
|
|
355
|
+
get _$AU() {
|
|
356
|
+
return this._$AM._$AU;
|
|
357
|
+
}
|
|
358
|
+
u(t) {
|
|
359
|
+
var r;
|
|
360
|
+
const { el: { content: n }, parts: o } = this._$AD, i = ((r = t == null ? void 0 : t.creationScope) !== null && r !== void 0 ? r : ft).importNode(n, !0);
|
|
361
|
+
ut.currentNode = i;
|
|
362
|
+
let s = ut.nextNode(), a = 0, l = 0, c = o[0];
|
|
363
|
+
for (; c !== void 0; ) {
|
|
364
|
+
if (a === c.index) {
|
|
365
|
+
let d;
|
|
366
|
+
c.type === 2 ? d = new Jt(s, s.nextSibling, this, t) : c.type === 1 ? d = new c.ctor(s, c.name, c.strings, this, t) : c.type === 6 && (d = new Qo(s, this, t)), this._$AV.push(d), c = o[++l];
|
|
367
|
+
}
|
|
368
|
+
a !== (c == null ? void 0 : c.index) && (s = ut.nextNode(), a++);
|
|
369
|
+
}
|
|
370
|
+
return ut.currentNode = ft, i;
|
|
371
|
+
}
|
|
372
|
+
v(t) {
|
|
373
|
+
let r = 0;
|
|
374
|
+
for (const n of this._$AV)
|
|
375
|
+
n !== void 0 && (n.strings !== void 0 ? (n._$AI(t, n, r), r += n.strings.length - 2) : n._$AI(t[r])), r++;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
class Jt {
|
|
379
|
+
constructor(t, r, n, o) {
|
|
380
|
+
var i;
|
|
381
|
+
this.type = 2, this._$AH = B, this._$AN = void 0, this._$AA = t, this._$AB = r, this._$AM = n, this.options = o, this._$Cp = (i = o == null ? void 0 : o.isConnected) === null || i === void 0 || i;
|
|
382
|
+
}
|
|
383
|
+
get _$AU() {
|
|
384
|
+
var t, r;
|
|
385
|
+
return (r = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && r !== void 0 ? r : this._$Cp;
|
|
386
|
+
}
|
|
387
|
+
get parentNode() {
|
|
388
|
+
let t = this._$AA.parentNode;
|
|
389
|
+
const r = this._$AM;
|
|
390
|
+
return r !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = r.parentNode), t;
|
|
391
|
+
}
|
|
392
|
+
get startNode() {
|
|
393
|
+
return this._$AA;
|
|
394
|
+
}
|
|
395
|
+
get endNode() {
|
|
396
|
+
return this._$AB;
|
|
397
|
+
}
|
|
398
|
+
_$AI(t, r = this) {
|
|
399
|
+
t = kt(this, t, r), Vt(t) ? t === B || t == null || t === "" ? (this._$AH !== B && this._$AR(), this._$AH = B) : t !== this._$AH && t !== pt && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Zo(t) ? this.T(t) : this._(t);
|
|
400
|
+
}
|
|
401
|
+
k(t) {
|
|
402
|
+
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
403
|
+
}
|
|
404
|
+
$(t) {
|
|
405
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
406
|
+
}
|
|
407
|
+
_(t) {
|
|
408
|
+
this._$AH !== B && Vt(this._$AH) ? this._$AA.nextSibling.data = t : this.$(ft.createTextNode(t)), this._$AH = t;
|
|
409
|
+
}
|
|
410
|
+
g(t) {
|
|
411
|
+
var r;
|
|
412
|
+
const { values: n, _$litType$: o } = t, i = typeof o == "number" ? this._$AC(t) : (o.el === void 0 && (o.el = Kt.createElement(ho(o.h, o.h[0]), this.options)), o);
|
|
413
|
+
if (((r = this._$AH) === null || r === void 0 ? void 0 : r._$AD) === i)
|
|
414
|
+
this._$AH.v(n);
|
|
415
|
+
else {
|
|
416
|
+
const s = new Ko(i, this), a = s.u(this.options);
|
|
417
|
+
s.v(n), this.$(a), this._$AH = s;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
_$AC(t) {
|
|
421
|
+
let r = Lr.get(t.strings);
|
|
422
|
+
return r === void 0 && Lr.set(t.strings, r = new Kt(t)), r;
|
|
423
|
+
}
|
|
424
|
+
T(t) {
|
|
425
|
+
ao(this._$AH) || (this._$AH = [], this._$AR());
|
|
426
|
+
const r = this._$AH;
|
|
427
|
+
let n, o = 0;
|
|
428
|
+
for (const i of t)
|
|
429
|
+
o === r.length ? r.push(n = new Jt(this.k(Zt()), this.k(Zt()), this, this.options)) : n = r[o], n._$AI(i), o++;
|
|
430
|
+
o < r.length && (this._$AR(n && n._$AB.nextSibling, o), r.length = o);
|
|
431
|
+
}
|
|
432
|
+
_$AR(t = this._$AA.nextSibling, r) {
|
|
433
|
+
var n;
|
|
434
|
+
for ((n = this._$AP) === null || n === void 0 || n.call(this, !1, !0, r); t && t !== this._$AB; ) {
|
|
435
|
+
const o = t.nextSibling;
|
|
436
|
+
t.remove(), t = o;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
setConnected(t) {
|
|
440
|
+
var r;
|
|
441
|
+
this._$AM === void 0 && (this._$Cp = t, (r = this._$AP) === null || r === void 0 || r.call(this, t));
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
class ve {
|
|
445
|
+
constructor(t, r, n, o, i) {
|
|
446
|
+
this.type = 1, this._$AH = B, this._$AN = void 0, this.element = t, this.name = r, this._$AM = o, this.options = i, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(new String()), this.strings = n) : this._$AH = B;
|
|
447
|
+
}
|
|
448
|
+
get tagName() {
|
|
449
|
+
return this.element.tagName;
|
|
450
|
+
}
|
|
451
|
+
get _$AU() {
|
|
452
|
+
return this._$AM._$AU;
|
|
453
|
+
}
|
|
454
|
+
_$AI(t, r = this, n, o) {
|
|
455
|
+
const i = this.strings;
|
|
456
|
+
let s = !1;
|
|
457
|
+
if (i === void 0)
|
|
458
|
+
t = kt(this, t, r, 0), s = !Vt(t) || t !== this._$AH && t !== pt, s && (this._$AH = t);
|
|
459
|
+
else {
|
|
460
|
+
const a = t;
|
|
461
|
+
let l, c;
|
|
462
|
+
for (t = i[0], l = 0; l < i.length - 1; l++)
|
|
463
|
+
c = kt(this, a[n + l], r, l), c === pt && (c = this._$AH[l]), s || (s = !Vt(c) || c !== this._$AH[l]), c === B ? t = B : t !== B && (t += (c ?? "") + i[l + 1]), this._$AH[l] = c;
|
|
464
|
+
}
|
|
465
|
+
s && !o && this.j(t);
|
|
466
|
+
}
|
|
467
|
+
j(t) {
|
|
468
|
+
t === B ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
class qo extends ve {
|
|
472
|
+
constructor() {
|
|
473
|
+
super(...arguments), this.type = 3;
|
|
474
|
+
}
|
|
475
|
+
j(t) {
|
|
476
|
+
this.element[this.name] = t === B ? void 0 : t;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
const Yo = Ot ? Ot.emptyScript : "";
|
|
480
|
+
let Jo = class extends ve {
|
|
481
|
+
constructor() {
|
|
482
|
+
super(...arguments), this.type = 4;
|
|
483
|
+
}
|
|
484
|
+
j(t) {
|
|
485
|
+
t && t !== B ? this.element.setAttribute(this.name, Yo) : this.element.removeAttribute(this.name);
|
|
486
|
+
}
|
|
487
|
+
};
|
|
488
|
+
class Go extends ve {
|
|
489
|
+
constructor(t, r, n, o, i) {
|
|
490
|
+
super(t, r, n, o, i), this.type = 5;
|
|
491
|
+
}
|
|
492
|
+
_$AI(t, r = this) {
|
|
493
|
+
var n;
|
|
494
|
+
if ((t = (n = kt(this, t, r, 0)) !== null && n !== void 0 ? n : B) === pt)
|
|
495
|
+
return;
|
|
496
|
+
const o = this._$AH, i = t === B && o !== B || t.capture !== o.capture || t.once !== o.once || t.passive !== o.passive, s = t !== B && (o === B || i);
|
|
497
|
+
i && this.element.removeEventListener(this.name, this, o), s && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
498
|
+
}
|
|
499
|
+
handleEvent(t) {
|
|
500
|
+
var r, n;
|
|
501
|
+
typeof this._$AH == "function" ? this._$AH.call((n = (r = this.options) === null || r === void 0 ? void 0 : r.host) !== null && n !== void 0 ? n : this.element, t) : this._$AH.handleEvent(t);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
let Qo = class {
|
|
505
|
+
constructor(t, r, n) {
|
|
506
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = r, this.options = n;
|
|
507
|
+
}
|
|
508
|
+
get _$AU() {
|
|
509
|
+
return this._$AM._$AU;
|
|
510
|
+
}
|
|
511
|
+
_$AI(t) {
|
|
512
|
+
kt(this, t);
|
|
513
|
+
}
|
|
514
|
+
};
|
|
515
|
+
const Nr = ue.litHtmlPolyfillSupport;
|
|
516
|
+
Nr == null || Nr(Kt, Jt), ((Ae = ue.litHtmlVersions) !== null && Ae !== void 0 ? Ae : ue.litHtmlVersions = []).push("2.8.0");
|
|
517
|
+
const Xo = (e, t, r) => {
|
|
518
|
+
var n, o;
|
|
519
|
+
const i = (n = r == null ? void 0 : r.renderBefore) !== null && n !== void 0 ? n : t;
|
|
520
|
+
let s = i._$litPart$;
|
|
521
|
+
if (s === void 0) {
|
|
522
|
+
const a = (o = r == null ? void 0 : r.renderBefore) !== null && o !== void 0 ? o : null;
|
|
523
|
+
i._$litPart$ = s = new Jt(t.insertBefore(Zt(), a), a, void 0, r ?? {});
|
|
524
|
+
}
|
|
525
|
+
return s._$AI(e), s;
|
|
526
|
+
};
|
|
527
|
+
/**
|
|
528
|
+
* @license
|
|
529
|
+
* Copyright 2017 Google LLC
|
|
530
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
531
|
+
*/
|
|
532
|
+
var Oe, ke;
|
|
533
|
+
class A extends $t {
|
|
534
|
+
constructor() {
|
|
535
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
536
|
+
}
|
|
537
|
+
createRenderRoot() {
|
|
538
|
+
var t, r;
|
|
539
|
+
const n = super.createRenderRoot();
|
|
540
|
+
return (t = (r = this.renderOptions).renderBefore) !== null && t !== void 0 || (r.renderBefore = n.firstChild), n;
|
|
541
|
+
}
|
|
542
|
+
update(t) {
|
|
543
|
+
const r = this.render();
|
|
544
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Xo(r, this.renderRoot, this.renderOptions);
|
|
545
|
+
}
|
|
546
|
+
connectedCallback() {
|
|
547
|
+
var t;
|
|
548
|
+
super.connectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!0);
|
|
549
|
+
}
|
|
550
|
+
disconnectedCallback() {
|
|
551
|
+
var t;
|
|
552
|
+
super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
|
|
553
|
+
}
|
|
554
|
+
render() {
|
|
555
|
+
return pt;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
A.finalized = !0, A._$litElement$ = !0, (Oe = globalThis.litElementHydrateSupport) === null || Oe === void 0 || Oe.call(globalThis, { LitElement: A });
|
|
559
|
+
const Br = globalThis.litElementPolyfillSupport;
|
|
560
|
+
Br == null || Br({ LitElement: A });
|
|
561
|
+
((ke = globalThis.litElementVersions) !== null && ke !== void 0 ? ke : globalThis.litElementVersions = []).push("3.3.3");
|
|
562
|
+
/**
|
|
563
|
+
* @license
|
|
564
|
+
* Copyright 2017 Google LLC
|
|
565
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
566
|
+
*/
|
|
567
|
+
const k = (e) => (t) => typeof t == "function" ? ((r, n) => (customElements.define(r, n), n))(e, t) : ((r, n) => {
|
|
568
|
+
const { kind: o, elements: i } = n;
|
|
569
|
+
return { kind: o, elements: i, finisher(s) {
|
|
570
|
+
customElements.define(r, s);
|
|
571
|
+
} };
|
|
572
|
+
})(e, t);
|
|
573
|
+
/**
|
|
574
|
+
* @license
|
|
575
|
+
* Copyright 2017 Google LLC
|
|
576
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
577
|
+
*/
|
|
578
|
+
const tn = (e, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(r) {
|
|
579
|
+
r.createProperty(t.key, e);
|
|
580
|
+
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
|
|
581
|
+
typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
|
|
582
|
+
}, finisher(r) {
|
|
583
|
+
r.createProperty(t.key, e);
|
|
584
|
+
} }, en = (e, t, r) => {
|
|
585
|
+
t.constructor.createProperty(r, e);
|
|
586
|
+
};
|
|
587
|
+
function $(e) {
|
|
588
|
+
return (t, r) => r !== void 0 ? en(e, t, r) : tn(e, t);
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* @license
|
|
592
|
+
* Copyright 2017 Google LLC
|
|
593
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
594
|
+
*/
|
|
595
|
+
function H(e) {
|
|
596
|
+
return $({ ...e, state: !0 });
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* @license
|
|
600
|
+
* Copyright 2021 Google LLC
|
|
601
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
602
|
+
*/
|
|
603
|
+
var Ie;
|
|
604
|
+
((Ie = window.HTMLSlotElement) === null || Ie === void 0 ? void 0 : Ie.prototype.assignedElements) != null;
|
|
605
|
+
/**
|
|
606
|
+
* @license
|
|
607
|
+
* Copyright 2017 Google LLC
|
|
608
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
609
|
+
*/
|
|
610
|
+
const rn = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, on = (e) => (...t) => ({ _$litDirective$: e, values: t });
|
|
611
|
+
class nn {
|
|
612
|
+
constructor(t) {
|
|
613
|
+
}
|
|
614
|
+
get _$AU() {
|
|
615
|
+
return this._$AM._$AU;
|
|
616
|
+
}
|
|
617
|
+
_$AT(t, r, n) {
|
|
618
|
+
this._$Ct = t, this._$AM = r, this._$Ci = n;
|
|
619
|
+
}
|
|
620
|
+
_$AS(t, r) {
|
|
621
|
+
return this.update(t, r);
|
|
622
|
+
}
|
|
623
|
+
update(t, r) {
|
|
624
|
+
return this.render(...r);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* @license
|
|
629
|
+
* Copyright 2018 Google LLC
|
|
630
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
631
|
+
*/
|
|
632
|
+
const G = on(class extends nn {
|
|
633
|
+
constructor(e) {
|
|
634
|
+
var t;
|
|
635
|
+
if (super(e), e.type !== rn.ATTRIBUTE || e.name !== "class" || ((t = e.strings) === null || t === void 0 ? void 0 : t.length) > 2)
|
|
636
|
+
throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
637
|
+
}
|
|
638
|
+
render(e) {
|
|
639
|
+
return " " + Object.keys(e).filter((t) => e[t]).join(" ") + " ";
|
|
640
|
+
}
|
|
641
|
+
update(e, [t]) {
|
|
642
|
+
var r, n;
|
|
643
|
+
if (this.it === void 0) {
|
|
644
|
+
this.it = /* @__PURE__ */ new Set(), e.strings !== void 0 && (this.nt = new Set(e.strings.join(" ").split(/\s/).filter((i) => i !== "")));
|
|
645
|
+
for (const i in t)
|
|
646
|
+
t[i] && !(!((r = this.nt) === null || r === void 0) && r.has(i)) && this.it.add(i);
|
|
647
|
+
return this.render(t);
|
|
648
|
+
}
|
|
649
|
+
const o = e.element.classList;
|
|
650
|
+
this.it.forEach((i) => {
|
|
651
|
+
i in t || (o.remove(i), this.it.delete(i));
|
|
652
|
+
});
|
|
653
|
+
for (const i in t) {
|
|
654
|
+
const s = !!t[i];
|
|
655
|
+
s === this.it.has(i) || !((n = this.nt) === null || n === void 0) && n.has(i) || (s ? (o.add(i), this.it.add(i)) : (o.remove(i), this.it.delete(i)));
|
|
656
|
+
}
|
|
657
|
+
return pt;
|
|
658
|
+
}
|
|
659
|
+
});
|
|
660
|
+
function sn(e, t) {
|
|
661
|
+
e.indexOf(t) === -1 && e.push(t);
|
|
662
|
+
}
|
|
663
|
+
const uo = (e, t, r) => Math.min(Math.max(r, e), t), Z = {
|
|
664
|
+
duration: 0.3,
|
|
665
|
+
delay: 0,
|
|
666
|
+
endDelay: 0,
|
|
667
|
+
repeat: 0,
|
|
668
|
+
easing: "ease"
|
|
669
|
+
}, me = (e) => typeof e == "number", Et = (e) => Array.isArray(e) && !me(e[0]), an = (e, t, r) => {
|
|
670
|
+
const n = t - e;
|
|
671
|
+
return ((r - e) % n + n) % n + e;
|
|
672
|
+
};
|
|
673
|
+
function ln(e, t) {
|
|
674
|
+
return Et(e) ? e[an(0, e.length, t)] : e;
|
|
675
|
+
}
|
|
676
|
+
const mo = (e, t, r) => -r * e + r * t + e, go = () => {
|
|
677
|
+
}, it = (e) => e, br = (e, t, r) => t - e === 0 ? 1 : (r - e) / (t - e);
|
|
678
|
+
function fo(e, t) {
|
|
679
|
+
const r = e[e.length - 1];
|
|
680
|
+
for (let n = 1; n <= t; n++) {
|
|
681
|
+
const o = br(0, t, n);
|
|
682
|
+
e.push(mo(r, 1, o));
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
function cn(e) {
|
|
686
|
+
const t = [0];
|
|
687
|
+
return fo(t, e - 1), t;
|
|
688
|
+
}
|
|
689
|
+
function dn(e, t = cn(e.length), r = it) {
|
|
690
|
+
const n = e.length, o = n - t.length;
|
|
691
|
+
return o > 0 && fo(t, o), (i) => {
|
|
692
|
+
let s = 0;
|
|
693
|
+
for (; s < n - 2 && !(i < t[s + 1]); s++)
|
|
694
|
+
;
|
|
695
|
+
let a = uo(0, 1, br(t[s], t[s + 1], i));
|
|
696
|
+
return a = ln(r, s)(a), mo(e[s], e[s + 1], a);
|
|
697
|
+
};
|
|
698
|
+
}
|
|
699
|
+
const po = (e) => Array.isArray(e) && me(e[0]), cr = (e) => typeof e == "object" && !!e.createAnimation, It = (e) => typeof e == "function", hn = (e) => typeof e == "string", zt = {
|
|
700
|
+
ms: (e) => e * 1e3,
|
|
701
|
+
s: (e) => e / 1e3
|
|
702
|
+
}, wo = (e, t, r) => (((1 - 3 * r + 3 * t) * e + (3 * r - 6 * t)) * e + 3 * t) * e, un = 1e-7, mn = 12;
|
|
703
|
+
function gn(e, t, r, n, o) {
|
|
704
|
+
let i, s, a = 0;
|
|
705
|
+
do
|
|
706
|
+
s = t + (r - t) / 2, i = wo(s, n, o) - e, i > 0 ? r = s : t = s;
|
|
707
|
+
while (Math.abs(i) > un && ++a < mn);
|
|
708
|
+
return s;
|
|
709
|
+
}
|
|
710
|
+
function Ht(e, t, r, n) {
|
|
711
|
+
if (e === t && r === n)
|
|
712
|
+
return it;
|
|
713
|
+
const o = (i) => gn(i, 0, 1, e, r);
|
|
714
|
+
return (i) => i === 0 || i === 1 ? i : wo(o(i), t, n);
|
|
715
|
+
}
|
|
716
|
+
const fn = (e, t = "end") => (r) => {
|
|
717
|
+
r = t === "end" ? Math.min(r, 0.999) : Math.max(r, 1e-3);
|
|
718
|
+
const n = r * e, o = t === "end" ? Math.floor(n) : Math.ceil(n);
|
|
719
|
+
return uo(0, 1, o / e);
|
|
720
|
+
}, Dr = {
|
|
721
|
+
ease: Ht(0.25, 0.1, 0.25, 1),
|
|
722
|
+
"ease-in": Ht(0.42, 0, 1, 1),
|
|
723
|
+
"ease-in-out": Ht(0.42, 0, 0.58, 1),
|
|
724
|
+
"ease-out": Ht(0, 0, 0.58, 1)
|
|
725
|
+
}, pn = /\((.*?)\)/;
|
|
726
|
+
function Ur(e) {
|
|
727
|
+
if (It(e))
|
|
728
|
+
return e;
|
|
729
|
+
if (po(e))
|
|
730
|
+
return Ht(...e);
|
|
731
|
+
if (Dr[e])
|
|
732
|
+
return Dr[e];
|
|
733
|
+
if (e.startsWith("steps")) {
|
|
734
|
+
const t = pn.exec(e);
|
|
735
|
+
if (t) {
|
|
736
|
+
const r = t[1].split(",");
|
|
737
|
+
return fn(parseFloat(r[0]), r[1].trim());
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
return it;
|
|
741
|
+
}
|
|
742
|
+
class vo {
|
|
743
|
+
constructor(t, r = [0, 1], { easing: n, duration: o = Z.duration, delay: i = Z.delay, endDelay: s = Z.endDelay, repeat: a = Z.repeat, offset: l, direction: c = "normal", autoplay: d = !0 } = {}) {
|
|
744
|
+
if (this.startTime = null, this.rate = 1, this.t = 0, this.cancelTimestamp = null, this.easing = it, this.duration = 0, this.totalDuration = 0, this.repeat = 0, this.playState = "idle", this.finished = new Promise((h, f) => {
|
|
745
|
+
this.resolve = h, this.reject = f;
|
|
746
|
+
}), n = n || Z.easing, cr(n)) {
|
|
747
|
+
const h = n.createAnimation(r);
|
|
748
|
+
n = h.easing, r = h.keyframes || r, o = h.duration || o;
|
|
749
|
+
}
|
|
750
|
+
this.repeat = a, this.easing = Et(n) ? it : Ur(n), this.updateDuration(o);
|
|
751
|
+
const b = dn(r, l, Et(n) ? n.map(Ur) : it);
|
|
752
|
+
this.tick = (h) => {
|
|
753
|
+
var f;
|
|
754
|
+
i = i;
|
|
755
|
+
let p = 0;
|
|
756
|
+
this.pauseTime !== void 0 ? p = this.pauseTime : p = (h - this.startTime) * this.rate, this.t = p, p /= 1e3, p = Math.max(p - i, 0), this.playState === "finished" && this.pauseTime === void 0 && (p = this.totalDuration);
|
|
757
|
+
const g = p / this.duration;
|
|
758
|
+
let _ = Math.floor(g), u = g % 1;
|
|
759
|
+
!u && g >= 1 && (u = 1), u === 1 && _--;
|
|
760
|
+
const y = _ % 2;
|
|
761
|
+
(c === "reverse" || c === "alternate" && y || c === "alternate-reverse" && !y) && (u = 1 - u);
|
|
762
|
+
const w = p >= this.totalDuration ? 1 : Math.min(u, 1), v = b(this.easing(w));
|
|
763
|
+
t(v), this.pauseTime === void 0 && (this.playState === "finished" || p >= this.totalDuration + s) ? (this.playState = "finished", (f = this.resolve) === null || f === void 0 || f.call(this, v)) : this.playState !== "idle" && (this.frameRequestId = requestAnimationFrame(this.tick));
|
|
764
|
+
}, d && this.play();
|
|
765
|
+
}
|
|
766
|
+
play() {
|
|
767
|
+
const t = performance.now();
|
|
768
|
+
this.playState = "running", this.pauseTime !== void 0 ? this.startTime = t - this.pauseTime : this.startTime || (this.startTime = t), this.cancelTimestamp = this.startTime, this.pauseTime = void 0, this.frameRequestId = requestAnimationFrame(this.tick);
|
|
769
|
+
}
|
|
770
|
+
pause() {
|
|
771
|
+
this.playState = "paused", this.pauseTime = this.t;
|
|
772
|
+
}
|
|
773
|
+
finish() {
|
|
774
|
+
this.playState = "finished", this.tick(0);
|
|
775
|
+
}
|
|
776
|
+
stop() {
|
|
777
|
+
var t;
|
|
778
|
+
this.playState = "idle", this.frameRequestId !== void 0 && cancelAnimationFrame(this.frameRequestId), (t = this.reject) === null || t === void 0 || t.call(this, !1);
|
|
779
|
+
}
|
|
780
|
+
cancel() {
|
|
781
|
+
this.stop(), this.tick(this.cancelTimestamp);
|
|
782
|
+
}
|
|
783
|
+
reverse() {
|
|
784
|
+
this.rate *= -1;
|
|
785
|
+
}
|
|
786
|
+
commitStyles() {
|
|
787
|
+
}
|
|
788
|
+
updateDuration(t) {
|
|
789
|
+
this.duration = t, this.totalDuration = t * (this.repeat + 1);
|
|
790
|
+
}
|
|
791
|
+
get currentTime() {
|
|
792
|
+
return this.t;
|
|
793
|
+
}
|
|
794
|
+
set currentTime(t) {
|
|
795
|
+
this.pauseTime !== void 0 || this.rate === 0 ? this.pauseTime = t : this.startTime = performance.now() - t / this.rate;
|
|
796
|
+
}
|
|
797
|
+
get playbackRate() {
|
|
798
|
+
return this.rate;
|
|
799
|
+
}
|
|
800
|
+
set playbackRate(t) {
|
|
801
|
+
this.rate = t;
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
var dr = function() {
|
|
805
|
+
};
|
|
806
|
+
process.env.NODE_ENV !== "production" && (dr = function(e, t) {
|
|
807
|
+
if (!e)
|
|
808
|
+
throw new Error(t);
|
|
809
|
+
});
|
|
810
|
+
class wn {
|
|
811
|
+
setAnimation(t) {
|
|
812
|
+
this.animation = t, t == null || t.finished.then(() => this.clearAnimation()).catch(() => {
|
|
813
|
+
});
|
|
814
|
+
}
|
|
815
|
+
clearAnimation() {
|
|
816
|
+
this.animation = this.generator = void 0;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
const Te = /* @__PURE__ */ new WeakMap();
|
|
820
|
+
function bo(e) {
|
|
821
|
+
return Te.has(e) || Te.set(e, {
|
|
822
|
+
transforms: [],
|
|
823
|
+
values: /* @__PURE__ */ new Map()
|
|
824
|
+
}), Te.get(e);
|
|
825
|
+
}
|
|
826
|
+
function vn(e, t) {
|
|
827
|
+
return e.has(t) || e.set(t, new wn()), e.get(t);
|
|
828
|
+
}
|
|
829
|
+
const bn = ["", "X", "Y", "Z"], yn = ["translate", "scale", "rotate", "skew"], ge = {
|
|
830
|
+
x: "translateX",
|
|
831
|
+
y: "translateY",
|
|
832
|
+
z: "translateZ"
|
|
833
|
+
}, jr = {
|
|
834
|
+
syntax: "<angle>",
|
|
835
|
+
initialValue: "0deg",
|
|
836
|
+
toDefaultUnit: (e) => e + "deg"
|
|
837
|
+
}, xn = {
|
|
838
|
+
translate: {
|
|
839
|
+
syntax: "<length-percentage>",
|
|
840
|
+
initialValue: "0px",
|
|
841
|
+
toDefaultUnit: (e) => e + "px"
|
|
842
|
+
},
|
|
843
|
+
rotate: jr,
|
|
844
|
+
scale: {
|
|
845
|
+
syntax: "<number>",
|
|
846
|
+
initialValue: 1,
|
|
847
|
+
toDefaultUnit: it
|
|
848
|
+
},
|
|
849
|
+
skew: jr
|
|
850
|
+
}, qt = /* @__PURE__ */ new Map(), yr = (e) => `--motion-${e}`, fe = ["x", "y", "z"];
|
|
851
|
+
yn.forEach((e) => {
|
|
852
|
+
bn.forEach((t) => {
|
|
853
|
+
fe.push(e + t), qt.set(yr(e + t), xn[e]);
|
|
854
|
+
});
|
|
855
|
+
});
|
|
856
|
+
const $n = (e, t) => fe.indexOf(e) - fe.indexOf(t), Cn = new Set(fe), yo = (e) => Cn.has(e), En = (e, t) => {
|
|
857
|
+
ge[t] && (t = ge[t]);
|
|
858
|
+
const { transforms: r } = bo(e);
|
|
859
|
+
sn(r, t), e.style.transform = An(r);
|
|
860
|
+
}, An = (e) => e.sort($n).reduce(_n, "").trim(), _n = (e, t) => `${e} ${t}(var(${yr(t)}))`, hr = (e) => e.startsWith("--"), Wr = /* @__PURE__ */ new Set();
|
|
861
|
+
function On(e) {
|
|
862
|
+
if (!Wr.has(e)) {
|
|
863
|
+
Wr.add(e);
|
|
864
|
+
try {
|
|
865
|
+
const { syntax: t, initialValue: r } = qt.has(e) ? qt.get(e) : {};
|
|
866
|
+
CSS.registerProperty({
|
|
867
|
+
name: e,
|
|
868
|
+
inherits: !1,
|
|
869
|
+
syntax: t,
|
|
870
|
+
initialValue: r
|
|
871
|
+
});
|
|
872
|
+
} catch {
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
const Pe = (e, t) => document.createElement("div").animate(e, t), Hr = {
|
|
877
|
+
cssRegisterProperty: () => typeof CSS < "u" && Object.hasOwnProperty.call(CSS, "registerProperty"),
|
|
878
|
+
waapi: () => Object.hasOwnProperty.call(Element.prototype, "animate"),
|
|
879
|
+
partialKeyframes: () => {
|
|
880
|
+
try {
|
|
881
|
+
Pe({ opacity: [1] });
|
|
882
|
+
} catch {
|
|
883
|
+
return !1;
|
|
884
|
+
}
|
|
885
|
+
return !0;
|
|
886
|
+
},
|
|
887
|
+
finished: () => !!Pe({ opacity: [0, 1] }, { duration: 1e-3 }).finished,
|
|
888
|
+
linearEasing: () => {
|
|
889
|
+
try {
|
|
890
|
+
Pe({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
891
|
+
} catch {
|
|
892
|
+
return !1;
|
|
893
|
+
}
|
|
894
|
+
return !0;
|
|
895
|
+
}
|
|
896
|
+
}, Me = {}, Ct = {};
|
|
897
|
+
for (const e in Hr)
|
|
898
|
+
Ct[e] = () => (Me[e] === void 0 && (Me[e] = Hr[e]()), Me[e]);
|
|
899
|
+
const kn = 0.015, In = (e, t) => {
|
|
900
|
+
let r = "";
|
|
901
|
+
const n = Math.round(t / kn);
|
|
902
|
+
for (let o = 0; o < n; o++)
|
|
903
|
+
r += e(br(0, n - 1, o)) + ", ";
|
|
904
|
+
return r.substring(0, r.length - 2);
|
|
905
|
+
}, zr = (e, t) => It(e) ? Ct.linearEasing() ? `linear(${In(e, t)})` : Z.easing : po(e) ? Tn(e) : e, Tn = ([e, t, r, n]) => `cubic-bezier(${e}, ${t}, ${r}, ${n})`;
|
|
906
|
+
function Pn(e, t) {
|
|
907
|
+
for (let r = 0; r < e.length; r++)
|
|
908
|
+
e[r] === null && (e[r] = r ? e[r - 1] : t());
|
|
909
|
+
return e;
|
|
910
|
+
}
|
|
911
|
+
const Mn = (e) => Array.isArray(e) ? e : [e];
|
|
912
|
+
function ur(e) {
|
|
913
|
+
return ge[e] && (e = ge[e]), yo(e) ? yr(e) : e;
|
|
914
|
+
}
|
|
915
|
+
const Xt = {
|
|
916
|
+
get: (e, t) => {
|
|
917
|
+
t = ur(t);
|
|
918
|
+
let r = hr(t) ? e.style.getPropertyValue(t) : getComputedStyle(e)[t];
|
|
919
|
+
if (!r && r !== 0) {
|
|
920
|
+
const n = qt.get(t);
|
|
921
|
+
n && (r = n.initialValue);
|
|
922
|
+
}
|
|
923
|
+
return r;
|
|
924
|
+
},
|
|
925
|
+
set: (e, t, r) => {
|
|
926
|
+
t = ur(t), hr(t) ? e.style.setProperty(t, r) : e.style[t] = r;
|
|
927
|
+
}
|
|
928
|
+
};
|
|
929
|
+
function xo(e, t = !0) {
|
|
930
|
+
if (!(!e || e.playState === "finished"))
|
|
931
|
+
try {
|
|
932
|
+
e.stop ? e.stop() : (t && e.commitStyles(), e.cancel());
|
|
933
|
+
} catch {
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
function Sn(e, t) {
|
|
937
|
+
var r;
|
|
938
|
+
let n = (t == null ? void 0 : t.toDefaultUnit) || it;
|
|
939
|
+
const o = e[e.length - 1];
|
|
940
|
+
if (hn(o)) {
|
|
941
|
+
const i = ((r = o.match(/(-?[\d.]+)([a-z%]*)/)) === null || r === void 0 ? void 0 : r[2]) || "";
|
|
942
|
+
i && (n = (s) => s + i);
|
|
943
|
+
}
|
|
944
|
+
return n;
|
|
945
|
+
}
|
|
946
|
+
function Rn() {
|
|
947
|
+
return window.__MOTION_DEV_TOOLS_RECORD;
|
|
948
|
+
}
|
|
949
|
+
function Ln(e, t, r, n = {}, o) {
|
|
950
|
+
const i = Rn(), s = n.record !== !1 && i;
|
|
951
|
+
let a, { duration: l = Z.duration, delay: c = Z.delay, endDelay: d = Z.endDelay, repeat: b = Z.repeat, easing: h = Z.easing, persist: f = !1, direction: p, offset: g, allowWebkitAcceleration: _ = !1, autoplay: u = !0 } = n;
|
|
952
|
+
const y = bo(e), w = yo(t);
|
|
953
|
+
let v = Ct.waapi();
|
|
954
|
+
w && En(e, t);
|
|
955
|
+
const E = ur(t), M = vn(y.values, E), S = qt.get(E);
|
|
956
|
+
return xo(M.animation, !(cr(h) && M.generator) && n.record !== !1), () => {
|
|
957
|
+
const U = () => {
|
|
958
|
+
var R, Y;
|
|
959
|
+
return (Y = (R = Xt.get(e, E)) !== null && R !== void 0 ? R : S == null ? void 0 : S.initialValue) !== null && Y !== void 0 ? Y : 0;
|
|
960
|
+
};
|
|
961
|
+
let P = Pn(Mn(r), U);
|
|
962
|
+
const z = Sn(P, S);
|
|
963
|
+
if (cr(h)) {
|
|
964
|
+
const R = h.createAnimation(P, t !== "opacity", U, E, M);
|
|
965
|
+
h = R.easing, P = R.keyframes || P, l = R.duration || l;
|
|
966
|
+
}
|
|
967
|
+
if (hr(E) && (Ct.cssRegisterProperty() ? On(E) : v = !1), w && !Ct.linearEasing() && (It(h) || Et(h) && h.some(It)) && (v = !1), v) {
|
|
968
|
+
S && (P = P.map((D) => me(D) ? S.toDefaultUnit(D) : D)), P.length === 1 && (!Ct.partialKeyframes() || s) && P.unshift(U());
|
|
969
|
+
const R = {
|
|
970
|
+
delay: zt.ms(c),
|
|
971
|
+
duration: zt.ms(l),
|
|
972
|
+
endDelay: zt.ms(d),
|
|
973
|
+
easing: Et(h) ? void 0 : zr(h, l),
|
|
974
|
+
direction: p,
|
|
975
|
+
iterations: b + 1,
|
|
976
|
+
fill: "both"
|
|
977
|
+
};
|
|
978
|
+
a = e.animate({
|
|
979
|
+
[E]: P,
|
|
980
|
+
offset: g,
|
|
981
|
+
easing: Et(h) ? h.map((D) => zr(D, l)) : void 0
|
|
982
|
+
}, R), a.finished || (a.finished = new Promise((D, Uo) => {
|
|
983
|
+
a.onfinish = D, a.oncancel = Uo;
|
|
984
|
+
}));
|
|
985
|
+
const Y = P[P.length - 1];
|
|
986
|
+
a.finished.then(() => {
|
|
987
|
+
f || (Xt.set(e, E, Y), a.cancel());
|
|
988
|
+
}).catch(go), _ || (a.playbackRate = 1.000001);
|
|
989
|
+
} else if (o && w)
|
|
990
|
+
P = P.map((R) => typeof R == "string" ? parseFloat(R) : R), P.length === 1 && P.unshift(parseFloat(U())), a = new o((R) => {
|
|
991
|
+
Xt.set(e, E, z ? z(R) : R);
|
|
992
|
+
}, P, Object.assign(Object.assign({}, n), {
|
|
993
|
+
duration: l,
|
|
994
|
+
easing: h
|
|
995
|
+
}));
|
|
996
|
+
else {
|
|
997
|
+
const R = P[P.length - 1];
|
|
998
|
+
Xt.set(e, E, S && me(R) ? S.toDefaultUnit(R) : R);
|
|
999
|
+
}
|
|
1000
|
+
return s && i(e, t, P, {
|
|
1001
|
+
duration: l,
|
|
1002
|
+
delay: c,
|
|
1003
|
+
easing: h,
|
|
1004
|
+
repeat: b,
|
|
1005
|
+
offset: g
|
|
1006
|
+
}, "motion-one"), M.setAnimation(a), a && !u && a.pause(), a;
|
|
1007
|
+
};
|
|
1008
|
+
}
|
|
1009
|
+
const Nn = (e, t) => (
|
|
1010
|
+
/**
|
|
1011
|
+
* TODO: Make test for this
|
|
1012
|
+
* Always return a new object otherwise delay is overwritten by results of stagger
|
|
1013
|
+
* and this results in no stagger
|
|
1014
|
+
*/
|
|
1015
|
+
e[t] ? Object.assign(Object.assign({}, e), e[t]) : Object.assign({}, e)
|
|
1016
|
+
);
|
|
1017
|
+
function Bn(e, t) {
|
|
1018
|
+
var r;
|
|
1019
|
+
return typeof e == "string" ? t ? ((r = t[e]) !== null && r !== void 0 || (t[e] = document.querySelectorAll(e)), e = t[e]) : e = document.querySelectorAll(e) : e instanceof Element && (e = [e]), Array.from(e || []);
|
|
1020
|
+
}
|
|
1021
|
+
const Dn = (e) => e(), $o = (e, t, r = Z.duration) => new Proxy({
|
|
1022
|
+
animations: e.map(Dn).filter(Boolean),
|
|
1023
|
+
duration: r,
|
|
1024
|
+
options: t
|
|
1025
|
+
}, jn), Un = (e) => e.animations[0], jn = {
|
|
1026
|
+
get: (e, t) => {
|
|
1027
|
+
const r = Un(e);
|
|
1028
|
+
switch (t) {
|
|
1029
|
+
case "duration":
|
|
1030
|
+
return e.duration;
|
|
1031
|
+
case "currentTime":
|
|
1032
|
+
return zt.s((r == null ? void 0 : r[t]) || 0);
|
|
1033
|
+
case "playbackRate":
|
|
1034
|
+
case "playState":
|
|
1035
|
+
return r == null ? void 0 : r[t];
|
|
1036
|
+
case "finished":
|
|
1037
|
+
return e.finished || (e.finished = Promise.all(e.animations.map(Wn)).catch(go)), e.finished;
|
|
1038
|
+
case "stop":
|
|
1039
|
+
return () => {
|
|
1040
|
+
e.animations.forEach((n) => xo(n));
|
|
1041
|
+
};
|
|
1042
|
+
case "forEachNative":
|
|
1043
|
+
return (n) => {
|
|
1044
|
+
e.animations.forEach((o) => n(o, e));
|
|
1045
|
+
};
|
|
1046
|
+
default:
|
|
1047
|
+
return typeof (r == null ? void 0 : r[t]) > "u" ? void 0 : () => e.animations.forEach((n) => n[t]());
|
|
1048
|
+
}
|
|
1049
|
+
},
|
|
1050
|
+
set: (e, t, r) => {
|
|
1051
|
+
switch (t) {
|
|
1052
|
+
case "currentTime":
|
|
1053
|
+
r = zt.ms(r);
|
|
1054
|
+
case "playbackRate":
|
|
1055
|
+
for (let n = 0; n < e.animations.length; n++)
|
|
1056
|
+
e.animations[n][t] = r;
|
|
1057
|
+
return !0;
|
|
1058
|
+
}
|
|
1059
|
+
return !1;
|
|
1060
|
+
}
|
|
1061
|
+
}, Wn = (e) => e.finished;
|
|
1062
|
+
function Hn(e, t, r) {
|
|
1063
|
+
return It(e) ? e(t, r) : e;
|
|
1064
|
+
}
|
|
1065
|
+
function zn(e) {
|
|
1066
|
+
return function(r, n, o = {}) {
|
|
1067
|
+
r = Bn(r);
|
|
1068
|
+
const i = r.length;
|
|
1069
|
+
dr(!!i, "No valid element provided."), dr(!!n, "No keyframes defined.");
|
|
1070
|
+
const s = [];
|
|
1071
|
+
for (let a = 0; a < i; a++) {
|
|
1072
|
+
const l = r[a];
|
|
1073
|
+
for (const c in n) {
|
|
1074
|
+
const d = Nn(o, c);
|
|
1075
|
+
d.delay = Hn(d.delay, a, i);
|
|
1076
|
+
const b = Ln(l, c, n[c], d, e);
|
|
1077
|
+
s.push(b);
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
return $o(
|
|
1081
|
+
s,
|
|
1082
|
+
o,
|
|
1083
|
+
/**
|
|
1084
|
+
* TODO:
|
|
1085
|
+
* If easing is set to spring or glide, duration will be dynamically
|
|
1086
|
+
* generated. Ideally we would dynamically generate this from
|
|
1087
|
+
* animation.effect.getComputedTiming().duration but this isn't
|
|
1088
|
+
* supported in iOS13 or our number polyfill. Perhaps it's possible
|
|
1089
|
+
* to Proxy animations returned from animateStyle that has duration
|
|
1090
|
+
* as a getter.
|
|
1091
|
+
*/
|
|
1092
|
+
o.duration
|
|
1093
|
+
);
|
|
1094
|
+
};
|
|
1095
|
+
}
|
|
1096
|
+
const Fn = zn(vo);
|
|
1097
|
+
function Zn(e, t = {}) {
|
|
1098
|
+
return $o([
|
|
1099
|
+
() => {
|
|
1100
|
+
const r = new vo(e, [0, 1], t);
|
|
1101
|
+
return r.finished.catch(() => {
|
|
1102
|
+
}), r;
|
|
1103
|
+
}
|
|
1104
|
+
], t, t.duration);
|
|
1105
|
+
}
|
|
1106
|
+
function mt(e, t, r) {
|
|
1107
|
+
return (It(e) ? Zn : Fn)(e, t, r);
|
|
1108
|
+
}
|
|
1109
|
+
/**
|
|
1110
|
+
* @license
|
|
1111
|
+
* Copyright 2018 Google LLC
|
|
1112
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1113
|
+
*/
|
|
1114
|
+
const j = (e) => e ?? B;
|
|
1115
|
+
var Gt = {}, Vn = function() {
|
|
1116
|
+
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
1117
|
+
}, Co = {}, F = {};
|
|
1118
|
+
let xr;
|
|
1119
|
+
const Kn = [
|
|
1120
|
+
0,
|
|
1121
|
+
// Not used
|
|
1122
|
+
26,
|
|
1123
|
+
44,
|
|
1124
|
+
70,
|
|
1125
|
+
100,
|
|
1126
|
+
134,
|
|
1127
|
+
172,
|
|
1128
|
+
196,
|
|
1129
|
+
242,
|
|
1130
|
+
292,
|
|
1131
|
+
346,
|
|
1132
|
+
404,
|
|
1133
|
+
466,
|
|
1134
|
+
532,
|
|
1135
|
+
581,
|
|
1136
|
+
655,
|
|
1137
|
+
733,
|
|
1138
|
+
815,
|
|
1139
|
+
901,
|
|
1140
|
+
991,
|
|
1141
|
+
1085,
|
|
1142
|
+
1156,
|
|
1143
|
+
1258,
|
|
1144
|
+
1364,
|
|
1145
|
+
1474,
|
|
1146
|
+
1588,
|
|
1147
|
+
1706,
|
|
1148
|
+
1828,
|
|
1149
|
+
1921,
|
|
1150
|
+
2051,
|
|
1151
|
+
2185,
|
|
1152
|
+
2323,
|
|
1153
|
+
2465,
|
|
1154
|
+
2611,
|
|
1155
|
+
2761,
|
|
1156
|
+
2876,
|
|
1157
|
+
3034,
|
|
1158
|
+
3196,
|
|
1159
|
+
3362,
|
|
1160
|
+
3532,
|
|
1161
|
+
3706
|
|
1162
|
+
];
|
|
1163
|
+
F.getSymbolSize = function(t) {
|
|
1164
|
+
if (!t)
|
|
1165
|
+
throw new Error('"version" cannot be null or undefined');
|
|
1166
|
+
if (t < 1 || t > 40)
|
|
1167
|
+
throw new Error('"version" should be in range from 1 to 40');
|
|
1168
|
+
return t * 4 + 17;
|
|
1169
|
+
};
|
|
1170
|
+
F.getSymbolTotalCodewords = function(t) {
|
|
1171
|
+
return Kn[t];
|
|
1172
|
+
};
|
|
1173
|
+
F.getBCHDigit = function(e) {
|
|
1174
|
+
let t = 0;
|
|
1175
|
+
for (; e !== 0; )
|
|
1176
|
+
t++, e >>>= 1;
|
|
1177
|
+
return t;
|
|
1178
|
+
};
|
|
1179
|
+
F.setToSJISFunction = function(t) {
|
|
1180
|
+
if (typeof t != "function")
|
|
1181
|
+
throw new Error('"toSJISFunc" is not a valid function.');
|
|
1182
|
+
xr = t;
|
|
1183
|
+
};
|
|
1184
|
+
F.isKanjiModeEnabled = function() {
|
|
1185
|
+
return typeof xr < "u";
|
|
1186
|
+
};
|
|
1187
|
+
F.toSJIS = function(t) {
|
|
1188
|
+
return xr(t);
|
|
1189
|
+
};
|
|
1190
|
+
var be = {};
|
|
1191
|
+
(function(e) {
|
|
1192
|
+
e.L = { bit: 1 }, e.M = { bit: 0 }, e.Q = { bit: 3 }, e.H = { bit: 2 };
|
|
1193
|
+
function t(r) {
|
|
1194
|
+
if (typeof r != "string")
|
|
1195
|
+
throw new Error("Param is not a string");
|
|
1196
|
+
switch (r.toLowerCase()) {
|
|
1197
|
+
case "l":
|
|
1198
|
+
case "low":
|
|
1199
|
+
return e.L;
|
|
1200
|
+
case "m":
|
|
1201
|
+
case "medium":
|
|
1202
|
+
return e.M;
|
|
1203
|
+
case "q":
|
|
1204
|
+
case "quartile":
|
|
1205
|
+
return e.Q;
|
|
1206
|
+
case "h":
|
|
1207
|
+
case "high":
|
|
1208
|
+
return e.H;
|
|
1209
|
+
default:
|
|
1210
|
+
throw new Error("Unknown EC Level: " + r);
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
e.isValid = function(n) {
|
|
1214
|
+
return n && typeof n.bit < "u" && n.bit >= 0 && n.bit < 4;
|
|
1215
|
+
}, e.from = function(n, o) {
|
|
1216
|
+
if (e.isValid(n))
|
|
1217
|
+
return n;
|
|
1218
|
+
try {
|
|
1219
|
+
return t(n);
|
|
1220
|
+
} catch {
|
|
1221
|
+
return o;
|
|
1222
|
+
}
|
|
1223
|
+
};
|
|
1224
|
+
})(be);
|
|
1225
|
+
function Eo() {
|
|
1226
|
+
this.buffer = [], this.length = 0;
|
|
1227
|
+
}
|
|
1228
|
+
Eo.prototype = {
|
|
1229
|
+
get: function(e) {
|
|
1230
|
+
const t = Math.floor(e / 8);
|
|
1231
|
+
return (this.buffer[t] >>> 7 - e % 8 & 1) === 1;
|
|
1232
|
+
},
|
|
1233
|
+
put: function(e, t) {
|
|
1234
|
+
for (let r = 0; r < t; r++)
|
|
1235
|
+
this.putBit((e >>> t - r - 1 & 1) === 1);
|
|
1236
|
+
},
|
|
1237
|
+
getLengthInBits: function() {
|
|
1238
|
+
return this.length;
|
|
1239
|
+
},
|
|
1240
|
+
putBit: function(e) {
|
|
1241
|
+
const t = Math.floor(this.length / 8);
|
|
1242
|
+
this.buffer.length <= t && this.buffer.push(0), e && (this.buffer[t] |= 128 >>> this.length % 8), this.length++;
|
|
1243
|
+
}
|
|
1244
|
+
};
|
|
1245
|
+
var qn = Eo;
|
|
1246
|
+
function Qt(e) {
|
|
1247
|
+
if (!e || e < 1)
|
|
1248
|
+
throw new Error("BitMatrix size must be defined and greater than 0");
|
|
1249
|
+
this.size = e, this.data = new Uint8Array(e * e), this.reservedBit = new Uint8Array(e * e);
|
|
1250
|
+
}
|
|
1251
|
+
Qt.prototype.set = function(e, t, r, n) {
|
|
1252
|
+
const o = e * this.size + t;
|
|
1253
|
+
this.data[o] = r, n && (this.reservedBit[o] = !0);
|
|
1254
|
+
};
|
|
1255
|
+
Qt.prototype.get = function(e, t) {
|
|
1256
|
+
return this.data[e * this.size + t];
|
|
1257
|
+
};
|
|
1258
|
+
Qt.prototype.xor = function(e, t, r) {
|
|
1259
|
+
this.data[e * this.size + t] ^= r;
|
|
1260
|
+
};
|
|
1261
|
+
Qt.prototype.isReserved = function(e, t) {
|
|
1262
|
+
return this.reservedBit[e * this.size + t];
|
|
1263
|
+
};
|
|
1264
|
+
var Yn = Qt, Ao = {};
|
|
1265
|
+
(function(e) {
|
|
1266
|
+
const t = F.getSymbolSize;
|
|
1267
|
+
e.getRowColCoords = function(n) {
|
|
1268
|
+
if (n === 1)
|
|
1269
|
+
return [];
|
|
1270
|
+
const o = Math.floor(n / 7) + 2, i = t(n), s = i === 145 ? 26 : Math.ceil((i - 13) / (2 * o - 2)) * 2, a = [i - 7];
|
|
1271
|
+
for (let l = 1; l < o - 1; l++)
|
|
1272
|
+
a[l] = a[l - 1] - s;
|
|
1273
|
+
return a.push(6), a.reverse();
|
|
1274
|
+
}, e.getPositions = function(n) {
|
|
1275
|
+
const o = [], i = e.getRowColCoords(n), s = i.length;
|
|
1276
|
+
for (let a = 0; a < s; a++)
|
|
1277
|
+
for (let l = 0; l < s; l++)
|
|
1278
|
+
a === 0 && l === 0 || // top-left
|
|
1279
|
+
a === 0 && l === s - 1 || // bottom-left
|
|
1280
|
+
a === s - 1 && l === 0 || o.push([i[a], i[l]]);
|
|
1281
|
+
return o;
|
|
1282
|
+
};
|
|
1283
|
+
})(Ao);
|
|
1284
|
+
var _o = {};
|
|
1285
|
+
const Jn = F.getSymbolSize, Fr = 7;
|
|
1286
|
+
_o.getPositions = function(t) {
|
|
1287
|
+
const r = Jn(t);
|
|
1288
|
+
return [
|
|
1289
|
+
// top-left
|
|
1290
|
+
[0, 0],
|
|
1291
|
+
// top-right
|
|
1292
|
+
[r - Fr, 0],
|
|
1293
|
+
// bottom-left
|
|
1294
|
+
[0, r - Fr]
|
|
1295
|
+
];
|
|
1296
|
+
};
|
|
1297
|
+
var Oo = {};
|
|
1298
|
+
(function(e) {
|
|
1299
|
+
e.Patterns = {
|
|
1300
|
+
PATTERN000: 0,
|
|
1301
|
+
PATTERN001: 1,
|
|
1302
|
+
PATTERN010: 2,
|
|
1303
|
+
PATTERN011: 3,
|
|
1304
|
+
PATTERN100: 4,
|
|
1305
|
+
PATTERN101: 5,
|
|
1306
|
+
PATTERN110: 6,
|
|
1307
|
+
PATTERN111: 7
|
|
1308
|
+
};
|
|
1309
|
+
const t = {
|
|
1310
|
+
N1: 3,
|
|
1311
|
+
N2: 3,
|
|
1312
|
+
N3: 40,
|
|
1313
|
+
N4: 10
|
|
1314
|
+
};
|
|
1315
|
+
e.isValid = function(o) {
|
|
1316
|
+
return o != null && o !== "" && !isNaN(o) && o >= 0 && o <= 7;
|
|
1317
|
+
}, e.from = function(o) {
|
|
1318
|
+
return e.isValid(o) ? parseInt(o, 10) : void 0;
|
|
1319
|
+
}, e.getPenaltyN1 = function(o) {
|
|
1320
|
+
const i = o.size;
|
|
1321
|
+
let s = 0, a = 0, l = 0, c = null, d = null;
|
|
1322
|
+
for (let b = 0; b < i; b++) {
|
|
1323
|
+
a = l = 0, c = d = null;
|
|
1324
|
+
for (let h = 0; h < i; h++) {
|
|
1325
|
+
let f = o.get(b, h);
|
|
1326
|
+
f === c ? a++ : (a >= 5 && (s += t.N1 + (a - 5)), c = f, a = 1), f = o.get(h, b), f === d ? l++ : (l >= 5 && (s += t.N1 + (l - 5)), d = f, l = 1);
|
|
1327
|
+
}
|
|
1328
|
+
a >= 5 && (s += t.N1 + (a - 5)), l >= 5 && (s += t.N1 + (l - 5));
|
|
1329
|
+
}
|
|
1330
|
+
return s;
|
|
1331
|
+
}, e.getPenaltyN2 = function(o) {
|
|
1332
|
+
const i = o.size;
|
|
1333
|
+
let s = 0;
|
|
1334
|
+
for (let a = 0; a < i - 1; a++)
|
|
1335
|
+
for (let l = 0; l < i - 1; l++) {
|
|
1336
|
+
const c = o.get(a, l) + o.get(a, l + 1) + o.get(a + 1, l) + o.get(a + 1, l + 1);
|
|
1337
|
+
(c === 4 || c === 0) && s++;
|
|
1338
|
+
}
|
|
1339
|
+
return s * t.N2;
|
|
1340
|
+
}, e.getPenaltyN3 = function(o) {
|
|
1341
|
+
const i = o.size;
|
|
1342
|
+
let s = 0, a = 0, l = 0;
|
|
1343
|
+
for (let c = 0; c < i; c++) {
|
|
1344
|
+
a = l = 0;
|
|
1345
|
+
for (let d = 0; d < i; d++)
|
|
1346
|
+
a = a << 1 & 2047 | o.get(c, d), d >= 10 && (a === 1488 || a === 93) && s++, l = l << 1 & 2047 | o.get(d, c), d >= 10 && (l === 1488 || l === 93) && s++;
|
|
1347
|
+
}
|
|
1348
|
+
return s * t.N3;
|
|
1349
|
+
}, e.getPenaltyN4 = function(o) {
|
|
1350
|
+
let i = 0;
|
|
1351
|
+
const s = o.data.length;
|
|
1352
|
+
for (let l = 0; l < s; l++)
|
|
1353
|
+
i += o.data[l];
|
|
1354
|
+
return Math.abs(Math.ceil(i * 100 / s / 5) - 10) * t.N4;
|
|
1355
|
+
};
|
|
1356
|
+
function r(n, o, i) {
|
|
1357
|
+
switch (n) {
|
|
1358
|
+
case e.Patterns.PATTERN000:
|
|
1359
|
+
return (o + i) % 2 === 0;
|
|
1360
|
+
case e.Patterns.PATTERN001:
|
|
1361
|
+
return o % 2 === 0;
|
|
1362
|
+
case e.Patterns.PATTERN010:
|
|
1363
|
+
return i % 3 === 0;
|
|
1364
|
+
case e.Patterns.PATTERN011:
|
|
1365
|
+
return (o + i) % 3 === 0;
|
|
1366
|
+
case e.Patterns.PATTERN100:
|
|
1367
|
+
return (Math.floor(o / 2) + Math.floor(i / 3)) % 2 === 0;
|
|
1368
|
+
case e.Patterns.PATTERN101:
|
|
1369
|
+
return o * i % 2 + o * i % 3 === 0;
|
|
1370
|
+
case e.Patterns.PATTERN110:
|
|
1371
|
+
return (o * i % 2 + o * i % 3) % 2 === 0;
|
|
1372
|
+
case e.Patterns.PATTERN111:
|
|
1373
|
+
return (o * i % 3 + (o + i) % 2) % 2 === 0;
|
|
1374
|
+
default:
|
|
1375
|
+
throw new Error("bad maskPattern:" + n);
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
e.applyMask = function(o, i) {
|
|
1379
|
+
const s = i.size;
|
|
1380
|
+
for (let a = 0; a < s; a++)
|
|
1381
|
+
for (let l = 0; l < s; l++)
|
|
1382
|
+
i.isReserved(l, a) || i.xor(l, a, r(o, l, a));
|
|
1383
|
+
}, e.getBestMask = function(o, i) {
|
|
1384
|
+
const s = Object.keys(e.Patterns).length;
|
|
1385
|
+
let a = 0, l = 1 / 0;
|
|
1386
|
+
for (let c = 0; c < s; c++) {
|
|
1387
|
+
i(c), e.applyMask(c, o);
|
|
1388
|
+
const d = e.getPenaltyN1(o) + e.getPenaltyN2(o) + e.getPenaltyN3(o) + e.getPenaltyN4(o);
|
|
1389
|
+
e.applyMask(c, o), d < l && (l = d, a = c);
|
|
1390
|
+
}
|
|
1391
|
+
return a;
|
|
1392
|
+
};
|
|
1393
|
+
})(Oo);
|
|
1394
|
+
var ye = {};
|
|
1395
|
+
const nt = be, te = [
|
|
1396
|
+
// L M Q H
|
|
1397
|
+
1,
|
|
1398
|
+
1,
|
|
1399
|
+
1,
|
|
1400
|
+
1,
|
|
1401
|
+
1,
|
|
1402
|
+
1,
|
|
1403
|
+
1,
|
|
1404
|
+
1,
|
|
1405
|
+
1,
|
|
1406
|
+
1,
|
|
1407
|
+
2,
|
|
1408
|
+
2,
|
|
1409
|
+
1,
|
|
1410
|
+
2,
|
|
1411
|
+
2,
|
|
1412
|
+
4,
|
|
1413
|
+
1,
|
|
1414
|
+
2,
|
|
1415
|
+
4,
|
|
1416
|
+
4,
|
|
1417
|
+
2,
|
|
1418
|
+
4,
|
|
1419
|
+
4,
|
|
1420
|
+
4,
|
|
1421
|
+
2,
|
|
1422
|
+
4,
|
|
1423
|
+
6,
|
|
1424
|
+
5,
|
|
1425
|
+
2,
|
|
1426
|
+
4,
|
|
1427
|
+
6,
|
|
1428
|
+
6,
|
|
1429
|
+
2,
|
|
1430
|
+
5,
|
|
1431
|
+
8,
|
|
1432
|
+
8,
|
|
1433
|
+
4,
|
|
1434
|
+
5,
|
|
1435
|
+
8,
|
|
1436
|
+
8,
|
|
1437
|
+
4,
|
|
1438
|
+
5,
|
|
1439
|
+
8,
|
|
1440
|
+
11,
|
|
1441
|
+
4,
|
|
1442
|
+
8,
|
|
1443
|
+
10,
|
|
1444
|
+
11,
|
|
1445
|
+
4,
|
|
1446
|
+
9,
|
|
1447
|
+
12,
|
|
1448
|
+
16,
|
|
1449
|
+
4,
|
|
1450
|
+
9,
|
|
1451
|
+
16,
|
|
1452
|
+
16,
|
|
1453
|
+
6,
|
|
1454
|
+
10,
|
|
1455
|
+
12,
|
|
1456
|
+
18,
|
|
1457
|
+
6,
|
|
1458
|
+
10,
|
|
1459
|
+
17,
|
|
1460
|
+
16,
|
|
1461
|
+
6,
|
|
1462
|
+
11,
|
|
1463
|
+
16,
|
|
1464
|
+
19,
|
|
1465
|
+
6,
|
|
1466
|
+
13,
|
|
1467
|
+
18,
|
|
1468
|
+
21,
|
|
1469
|
+
7,
|
|
1470
|
+
14,
|
|
1471
|
+
21,
|
|
1472
|
+
25,
|
|
1473
|
+
8,
|
|
1474
|
+
16,
|
|
1475
|
+
20,
|
|
1476
|
+
25,
|
|
1477
|
+
8,
|
|
1478
|
+
17,
|
|
1479
|
+
23,
|
|
1480
|
+
25,
|
|
1481
|
+
9,
|
|
1482
|
+
17,
|
|
1483
|
+
23,
|
|
1484
|
+
34,
|
|
1485
|
+
9,
|
|
1486
|
+
18,
|
|
1487
|
+
25,
|
|
1488
|
+
30,
|
|
1489
|
+
10,
|
|
1490
|
+
20,
|
|
1491
|
+
27,
|
|
1492
|
+
32,
|
|
1493
|
+
12,
|
|
1494
|
+
21,
|
|
1495
|
+
29,
|
|
1496
|
+
35,
|
|
1497
|
+
12,
|
|
1498
|
+
23,
|
|
1499
|
+
34,
|
|
1500
|
+
37,
|
|
1501
|
+
12,
|
|
1502
|
+
25,
|
|
1503
|
+
34,
|
|
1504
|
+
40,
|
|
1505
|
+
13,
|
|
1506
|
+
26,
|
|
1507
|
+
35,
|
|
1508
|
+
42,
|
|
1509
|
+
14,
|
|
1510
|
+
28,
|
|
1511
|
+
38,
|
|
1512
|
+
45,
|
|
1513
|
+
15,
|
|
1514
|
+
29,
|
|
1515
|
+
40,
|
|
1516
|
+
48,
|
|
1517
|
+
16,
|
|
1518
|
+
31,
|
|
1519
|
+
43,
|
|
1520
|
+
51,
|
|
1521
|
+
17,
|
|
1522
|
+
33,
|
|
1523
|
+
45,
|
|
1524
|
+
54,
|
|
1525
|
+
18,
|
|
1526
|
+
35,
|
|
1527
|
+
48,
|
|
1528
|
+
57,
|
|
1529
|
+
19,
|
|
1530
|
+
37,
|
|
1531
|
+
51,
|
|
1532
|
+
60,
|
|
1533
|
+
19,
|
|
1534
|
+
38,
|
|
1535
|
+
53,
|
|
1536
|
+
63,
|
|
1537
|
+
20,
|
|
1538
|
+
40,
|
|
1539
|
+
56,
|
|
1540
|
+
66,
|
|
1541
|
+
21,
|
|
1542
|
+
43,
|
|
1543
|
+
59,
|
|
1544
|
+
70,
|
|
1545
|
+
22,
|
|
1546
|
+
45,
|
|
1547
|
+
62,
|
|
1548
|
+
74,
|
|
1549
|
+
24,
|
|
1550
|
+
47,
|
|
1551
|
+
65,
|
|
1552
|
+
77,
|
|
1553
|
+
25,
|
|
1554
|
+
49,
|
|
1555
|
+
68,
|
|
1556
|
+
81
|
|
1557
|
+
], ee = [
|
|
1558
|
+
// L M Q H
|
|
1559
|
+
7,
|
|
1560
|
+
10,
|
|
1561
|
+
13,
|
|
1562
|
+
17,
|
|
1563
|
+
10,
|
|
1564
|
+
16,
|
|
1565
|
+
22,
|
|
1566
|
+
28,
|
|
1567
|
+
15,
|
|
1568
|
+
26,
|
|
1569
|
+
36,
|
|
1570
|
+
44,
|
|
1571
|
+
20,
|
|
1572
|
+
36,
|
|
1573
|
+
52,
|
|
1574
|
+
64,
|
|
1575
|
+
26,
|
|
1576
|
+
48,
|
|
1577
|
+
72,
|
|
1578
|
+
88,
|
|
1579
|
+
36,
|
|
1580
|
+
64,
|
|
1581
|
+
96,
|
|
1582
|
+
112,
|
|
1583
|
+
40,
|
|
1584
|
+
72,
|
|
1585
|
+
108,
|
|
1586
|
+
130,
|
|
1587
|
+
48,
|
|
1588
|
+
88,
|
|
1589
|
+
132,
|
|
1590
|
+
156,
|
|
1591
|
+
60,
|
|
1592
|
+
110,
|
|
1593
|
+
160,
|
|
1594
|
+
192,
|
|
1595
|
+
72,
|
|
1596
|
+
130,
|
|
1597
|
+
192,
|
|
1598
|
+
224,
|
|
1599
|
+
80,
|
|
1600
|
+
150,
|
|
1601
|
+
224,
|
|
1602
|
+
264,
|
|
1603
|
+
96,
|
|
1604
|
+
176,
|
|
1605
|
+
260,
|
|
1606
|
+
308,
|
|
1607
|
+
104,
|
|
1608
|
+
198,
|
|
1609
|
+
288,
|
|
1610
|
+
352,
|
|
1611
|
+
120,
|
|
1612
|
+
216,
|
|
1613
|
+
320,
|
|
1614
|
+
384,
|
|
1615
|
+
132,
|
|
1616
|
+
240,
|
|
1617
|
+
360,
|
|
1618
|
+
432,
|
|
1619
|
+
144,
|
|
1620
|
+
280,
|
|
1621
|
+
408,
|
|
1622
|
+
480,
|
|
1623
|
+
168,
|
|
1624
|
+
308,
|
|
1625
|
+
448,
|
|
1626
|
+
532,
|
|
1627
|
+
180,
|
|
1628
|
+
338,
|
|
1629
|
+
504,
|
|
1630
|
+
588,
|
|
1631
|
+
196,
|
|
1632
|
+
364,
|
|
1633
|
+
546,
|
|
1634
|
+
650,
|
|
1635
|
+
224,
|
|
1636
|
+
416,
|
|
1637
|
+
600,
|
|
1638
|
+
700,
|
|
1639
|
+
224,
|
|
1640
|
+
442,
|
|
1641
|
+
644,
|
|
1642
|
+
750,
|
|
1643
|
+
252,
|
|
1644
|
+
476,
|
|
1645
|
+
690,
|
|
1646
|
+
816,
|
|
1647
|
+
270,
|
|
1648
|
+
504,
|
|
1649
|
+
750,
|
|
1650
|
+
900,
|
|
1651
|
+
300,
|
|
1652
|
+
560,
|
|
1653
|
+
810,
|
|
1654
|
+
960,
|
|
1655
|
+
312,
|
|
1656
|
+
588,
|
|
1657
|
+
870,
|
|
1658
|
+
1050,
|
|
1659
|
+
336,
|
|
1660
|
+
644,
|
|
1661
|
+
952,
|
|
1662
|
+
1110,
|
|
1663
|
+
360,
|
|
1664
|
+
700,
|
|
1665
|
+
1020,
|
|
1666
|
+
1200,
|
|
1667
|
+
390,
|
|
1668
|
+
728,
|
|
1669
|
+
1050,
|
|
1670
|
+
1260,
|
|
1671
|
+
420,
|
|
1672
|
+
784,
|
|
1673
|
+
1140,
|
|
1674
|
+
1350,
|
|
1675
|
+
450,
|
|
1676
|
+
812,
|
|
1677
|
+
1200,
|
|
1678
|
+
1440,
|
|
1679
|
+
480,
|
|
1680
|
+
868,
|
|
1681
|
+
1290,
|
|
1682
|
+
1530,
|
|
1683
|
+
510,
|
|
1684
|
+
924,
|
|
1685
|
+
1350,
|
|
1686
|
+
1620,
|
|
1687
|
+
540,
|
|
1688
|
+
980,
|
|
1689
|
+
1440,
|
|
1690
|
+
1710,
|
|
1691
|
+
570,
|
|
1692
|
+
1036,
|
|
1693
|
+
1530,
|
|
1694
|
+
1800,
|
|
1695
|
+
570,
|
|
1696
|
+
1064,
|
|
1697
|
+
1590,
|
|
1698
|
+
1890,
|
|
1699
|
+
600,
|
|
1700
|
+
1120,
|
|
1701
|
+
1680,
|
|
1702
|
+
1980,
|
|
1703
|
+
630,
|
|
1704
|
+
1204,
|
|
1705
|
+
1770,
|
|
1706
|
+
2100,
|
|
1707
|
+
660,
|
|
1708
|
+
1260,
|
|
1709
|
+
1860,
|
|
1710
|
+
2220,
|
|
1711
|
+
720,
|
|
1712
|
+
1316,
|
|
1713
|
+
1950,
|
|
1714
|
+
2310,
|
|
1715
|
+
750,
|
|
1716
|
+
1372,
|
|
1717
|
+
2040,
|
|
1718
|
+
2430
|
|
1719
|
+
];
|
|
1720
|
+
ye.getBlocksCount = function(t, r) {
|
|
1721
|
+
switch (r) {
|
|
1722
|
+
case nt.L:
|
|
1723
|
+
return te[(t - 1) * 4 + 0];
|
|
1724
|
+
case nt.M:
|
|
1725
|
+
return te[(t - 1) * 4 + 1];
|
|
1726
|
+
case nt.Q:
|
|
1727
|
+
return te[(t - 1) * 4 + 2];
|
|
1728
|
+
case nt.H:
|
|
1729
|
+
return te[(t - 1) * 4 + 3];
|
|
1730
|
+
default:
|
|
1731
|
+
return;
|
|
1732
|
+
}
|
|
1733
|
+
};
|
|
1734
|
+
ye.getTotalCodewordsCount = function(t, r) {
|
|
1735
|
+
switch (r) {
|
|
1736
|
+
case nt.L:
|
|
1737
|
+
return ee[(t - 1) * 4 + 0];
|
|
1738
|
+
case nt.M:
|
|
1739
|
+
return ee[(t - 1) * 4 + 1];
|
|
1740
|
+
case nt.Q:
|
|
1741
|
+
return ee[(t - 1) * 4 + 2];
|
|
1742
|
+
case nt.H:
|
|
1743
|
+
return ee[(t - 1) * 4 + 3];
|
|
1744
|
+
default:
|
|
1745
|
+
return;
|
|
1746
|
+
}
|
|
1747
|
+
};
|
|
1748
|
+
var ko = {}, xe = {};
|
|
1749
|
+
const Ft = new Uint8Array(512), pe = new Uint8Array(256);
|
|
1750
|
+
(function() {
|
|
1751
|
+
let t = 1;
|
|
1752
|
+
for (let r = 0; r < 255; r++)
|
|
1753
|
+
Ft[r] = t, pe[t] = r, t <<= 1, t & 256 && (t ^= 285);
|
|
1754
|
+
for (let r = 255; r < 512; r++)
|
|
1755
|
+
Ft[r] = Ft[r - 255];
|
|
1756
|
+
})();
|
|
1757
|
+
xe.log = function(t) {
|
|
1758
|
+
if (t < 1)
|
|
1759
|
+
throw new Error("log(" + t + ")");
|
|
1760
|
+
return pe[t];
|
|
1761
|
+
};
|
|
1762
|
+
xe.exp = function(t) {
|
|
1763
|
+
return Ft[t];
|
|
1764
|
+
};
|
|
1765
|
+
xe.mul = function(t, r) {
|
|
1766
|
+
return t === 0 || r === 0 ? 0 : Ft[pe[t] + pe[r]];
|
|
1767
|
+
};
|
|
1768
|
+
(function(e) {
|
|
1769
|
+
const t = xe;
|
|
1770
|
+
e.mul = function(n, o) {
|
|
1771
|
+
const i = new Uint8Array(n.length + o.length - 1);
|
|
1772
|
+
for (let s = 0; s < n.length; s++)
|
|
1773
|
+
for (let a = 0; a < o.length; a++)
|
|
1774
|
+
i[s + a] ^= t.mul(n[s], o[a]);
|
|
1775
|
+
return i;
|
|
1776
|
+
}, e.mod = function(n, o) {
|
|
1777
|
+
let i = new Uint8Array(n);
|
|
1778
|
+
for (; i.length - o.length >= 0; ) {
|
|
1779
|
+
const s = i[0];
|
|
1780
|
+
for (let l = 0; l < o.length; l++)
|
|
1781
|
+
i[l] ^= t.mul(o[l], s);
|
|
1782
|
+
let a = 0;
|
|
1783
|
+
for (; a < i.length && i[a] === 0; )
|
|
1784
|
+
a++;
|
|
1785
|
+
i = i.slice(a);
|
|
1786
|
+
}
|
|
1787
|
+
return i;
|
|
1788
|
+
}, e.generateECPolynomial = function(n) {
|
|
1789
|
+
let o = new Uint8Array([1]);
|
|
1790
|
+
for (let i = 0; i < n; i++)
|
|
1791
|
+
o = e.mul(o, new Uint8Array([1, t.exp(i)]));
|
|
1792
|
+
return o;
|
|
1793
|
+
};
|
|
1794
|
+
})(ko);
|
|
1795
|
+
const Io = ko;
|
|
1796
|
+
function $r(e) {
|
|
1797
|
+
this.genPoly = void 0, this.degree = e, this.degree && this.initialize(this.degree);
|
|
1798
|
+
}
|
|
1799
|
+
$r.prototype.initialize = function(t) {
|
|
1800
|
+
this.degree = t, this.genPoly = Io.generateECPolynomial(this.degree);
|
|
1801
|
+
};
|
|
1802
|
+
$r.prototype.encode = function(t) {
|
|
1803
|
+
if (!this.genPoly)
|
|
1804
|
+
throw new Error("Encoder not initialized");
|
|
1805
|
+
const r = new Uint8Array(t.length + this.degree);
|
|
1806
|
+
r.set(t);
|
|
1807
|
+
const n = Io.mod(r, this.genPoly), o = this.degree - n.length;
|
|
1808
|
+
if (o > 0) {
|
|
1809
|
+
const i = new Uint8Array(this.degree);
|
|
1810
|
+
return i.set(n, o), i;
|
|
1811
|
+
}
|
|
1812
|
+
return n;
|
|
1813
|
+
};
|
|
1814
|
+
var Gn = $r, To = {}, at = {}, Cr = {};
|
|
1815
|
+
Cr.isValid = function(t) {
|
|
1816
|
+
return !isNaN(t) && t >= 1 && t <= 40;
|
|
1817
|
+
};
|
|
1818
|
+
var q = {};
|
|
1819
|
+
const Po = "[0-9]+", Qn = "[A-Z $%*+\\-./:]+";
|
|
1820
|
+
let Yt = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
|
1821
|
+
Yt = Yt.replace(/u/g, "\\u");
|
|
1822
|
+
const Xn = "(?:(?![A-Z0-9 $%*+\\-./:]|" + Yt + `)(?:.|[\r
|
|
1823
|
+
]))+`;
|
|
1824
|
+
q.KANJI = new RegExp(Yt, "g");
|
|
1825
|
+
q.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
|
|
1826
|
+
q.BYTE = new RegExp(Xn, "g");
|
|
1827
|
+
q.NUMERIC = new RegExp(Po, "g");
|
|
1828
|
+
q.ALPHANUMERIC = new RegExp(Qn, "g");
|
|
1829
|
+
const ti = new RegExp("^" + Yt + "$"), ei = new RegExp("^" + Po + "$"), ri = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
|
|
1830
|
+
q.testKanji = function(t) {
|
|
1831
|
+
return ti.test(t);
|
|
1832
|
+
};
|
|
1833
|
+
q.testNumeric = function(t) {
|
|
1834
|
+
return ei.test(t);
|
|
1835
|
+
};
|
|
1836
|
+
q.testAlphanumeric = function(t) {
|
|
1837
|
+
return ri.test(t);
|
|
1838
|
+
};
|
|
1839
|
+
(function(e) {
|
|
1840
|
+
const t = Cr, r = q;
|
|
1841
|
+
e.NUMERIC = {
|
|
1842
|
+
id: "Numeric",
|
|
1843
|
+
bit: 1,
|
|
1844
|
+
ccBits: [10, 12, 14]
|
|
1845
|
+
}, e.ALPHANUMERIC = {
|
|
1846
|
+
id: "Alphanumeric",
|
|
1847
|
+
bit: 2,
|
|
1848
|
+
ccBits: [9, 11, 13]
|
|
1849
|
+
}, e.BYTE = {
|
|
1850
|
+
id: "Byte",
|
|
1851
|
+
bit: 4,
|
|
1852
|
+
ccBits: [8, 16, 16]
|
|
1853
|
+
}, e.KANJI = {
|
|
1854
|
+
id: "Kanji",
|
|
1855
|
+
bit: 8,
|
|
1856
|
+
ccBits: [8, 10, 12]
|
|
1857
|
+
}, e.MIXED = {
|
|
1858
|
+
bit: -1
|
|
1859
|
+
}, e.getCharCountIndicator = function(i, s) {
|
|
1860
|
+
if (!i.ccBits)
|
|
1861
|
+
throw new Error("Invalid mode: " + i);
|
|
1862
|
+
if (!t.isValid(s))
|
|
1863
|
+
throw new Error("Invalid version: " + s);
|
|
1864
|
+
return s >= 1 && s < 10 ? i.ccBits[0] : s < 27 ? i.ccBits[1] : i.ccBits[2];
|
|
1865
|
+
}, e.getBestModeForData = function(i) {
|
|
1866
|
+
return r.testNumeric(i) ? e.NUMERIC : r.testAlphanumeric(i) ? e.ALPHANUMERIC : r.testKanji(i) ? e.KANJI : e.BYTE;
|
|
1867
|
+
}, e.toString = function(i) {
|
|
1868
|
+
if (i && i.id)
|
|
1869
|
+
return i.id;
|
|
1870
|
+
throw new Error("Invalid mode");
|
|
1871
|
+
}, e.isValid = function(i) {
|
|
1872
|
+
return i && i.bit && i.ccBits;
|
|
1873
|
+
};
|
|
1874
|
+
function n(o) {
|
|
1875
|
+
if (typeof o != "string")
|
|
1876
|
+
throw new Error("Param is not a string");
|
|
1877
|
+
switch (o.toLowerCase()) {
|
|
1878
|
+
case "numeric":
|
|
1879
|
+
return e.NUMERIC;
|
|
1880
|
+
case "alphanumeric":
|
|
1881
|
+
return e.ALPHANUMERIC;
|
|
1882
|
+
case "kanji":
|
|
1883
|
+
return e.KANJI;
|
|
1884
|
+
case "byte":
|
|
1885
|
+
return e.BYTE;
|
|
1886
|
+
default:
|
|
1887
|
+
throw new Error("Unknown mode: " + o);
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
e.from = function(i, s) {
|
|
1891
|
+
if (e.isValid(i))
|
|
1892
|
+
return i;
|
|
1893
|
+
try {
|
|
1894
|
+
return n(i);
|
|
1895
|
+
} catch {
|
|
1896
|
+
return s;
|
|
1897
|
+
}
|
|
1898
|
+
};
|
|
1899
|
+
})(at);
|
|
1900
|
+
(function(e) {
|
|
1901
|
+
const t = F, r = ye, n = be, o = at, i = Cr, s = 7973, a = t.getBCHDigit(s);
|
|
1902
|
+
function l(h, f, p) {
|
|
1903
|
+
for (let g = 1; g <= 40; g++)
|
|
1904
|
+
if (f <= e.getCapacity(g, p, h))
|
|
1905
|
+
return g;
|
|
1906
|
+
}
|
|
1907
|
+
function c(h, f) {
|
|
1908
|
+
return o.getCharCountIndicator(h, f) + 4;
|
|
1909
|
+
}
|
|
1910
|
+
function d(h, f) {
|
|
1911
|
+
let p = 0;
|
|
1912
|
+
return h.forEach(function(g) {
|
|
1913
|
+
const _ = c(g.mode, f);
|
|
1914
|
+
p += _ + g.getBitsLength();
|
|
1915
|
+
}), p;
|
|
1916
|
+
}
|
|
1917
|
+
function b(h, f) {
|
|
1918
|
+
for (let p = 1; p <= 40; p++)
|
|
1919
|
+
if (d(h, p) <= e.getCapacity(p, f, o.MIXED))
|
|
1920
|
+
return p;
|
|
1921
|
+
}
|
|
1922
|
+
e.from = function(f, p) {
|
|
1923
|
+
return i.isValid(f) ? parseInt(f, 10) : p;
|
|
1924
|
+
}, e.getCapacity = function(f, p, g) {
|
|
1925
|
+
if (!i.isValid(f))
|
|
1926
|
+
throw new Error("Invalid QR Code version");
|
|
1927
|
+
typeof g > "u" && (g = o.BYTE);
|
|
1928
|
+
const _ = t.getSymbolTotalCodewords(f), u = r.getTotalCodewordsCount(f, p), y = (_ - u) * 8;
|
|
1929
|
+
if (g === o.MIXED)
|
|
1930
|
+
return y;
|
|
1931
|
+
const w = y - c(g, f);
|
|
1932
|
+
switch (g) {
|
|
1933
|
+
case o.NUMERIC:
|
|
1934
|
+
return Math.floor(w / 10 * 3);
|
|
1935
|
+
case o.ALPHANUMERIC:
|
|
1936
|
+
return Math.floor(w / 11 * 2);
|
|
1937
|
+
case o.KANJI:
|
|
1938
|
+
return Math.floor(w / 13);
|
|
1939
|
+
case o.BYTE:
|
|
1940
|
+
default:
|
|
1941
|
+
return Math.floor(w / 8);
|
|
1942
|
+
}
|
|
1943
|
+
}, e.getBestVersionForData = function(f, p) {
|
|
1944
|
+
let g;
|
|
1945
|
+
const _ = n.from(p, n.M);
|
|
1946
|
+
if (Array.isArray(f)) {
|
|
1947
|
+
if (f.length > 1)
|
|
1948
|
+
return b(f, _);
|
|
1949
|
+
if (f.length === 0)
|
|
1950
|
+
return 1;
|
|
1951
|
+
g = f[0];
|
|
1952
|
+
} else
|
|
1953
|
+
g = f;
|
|
1954
|
+
return l(g.mode, g.getLength(), _);
|
|
1955
|
+
}, e.getEncodedBits = function(f) {
|
|
1956
|
+
if (!i.isValid(f) || f < 7)
|
|
1957
|
+
throw new Error("Invalid QR Code version");
|
|
1958
|
+
let p = f << 12;
|
|
1959
|
+
for (; t.getBCHDigit(p) - a >= 0; )
|
|
1960
|
+
p ^= s << t.getBCHDigit(p) - a;
|
|
1961
|
+
return f << 12 | p;
|
|
1962
|
+
};
|
|
1963
|
+
})(To);
|
|
1964
|
+
var Mo = {};
|
|
1965
|
+
const mr = F, So = 1335, oi = 21522, Zr = mr.getBCHDigit(So);
|
|
1966
|
+
Mo.getEncodedBits = function(t, r) {
|
|
1967
|
+
const n = t.bit << 3 | r;
|
|
1968
|
+
let o = n << 10;
|
|
1969
|
+
for (; mr.getBCHDigit(o) - Zr >= 0; )
|
|
1970
|
+
o ^= So << mr.getBCHDigit(o) - Zr;
|
|
1971
|
+
return (n << 10 | o) ^ oi;
|
|
1972
|
+
};
|
|
1973
|
+
var Ro = {};
|
|
1974
|
+
const ni = at;
|
|
1975
|
+
function Tt(e) {
|
|
1976
|
+
this.mode = ni.NUMERIC, this.data = e.toString();
|
|
1977
|
+
}
|
|
1978
|
+
Tt.getBitsLength = function(t) {
|
|
1979
|
+
return 10 * Math.floor(t / 3) + (t % 3 ? t % 3 * 3 + 1 : 0);
|
|
1980
|
+
};
|
|
1981
|
+
Tt.prototype.getLength = function() {
|
|
1982
|
+
return this.data.length;
|
|
1983
|
+
};
|
|
1984
|
+
Tt.prototype.getBitsLength = function() {
|
|
1985
|
+
return Tt.getBitsLength(this.data.length);
|
|
1986
|
+
};
|
|
1987
|
+
Tt.prototype.write = function(t) {
|
|
1988
|
+
let r, n, o;
|
|
1989
|
+
for (r = 0; r + 3 <= this.data.length; r += 3)
|
|
1990
|
+
n = this.data.substr(r, 3), o = parseInt(n, 10), t.put(o, 10);
|
|
1991
|
+
const i = this.data.length - r;
|
|
1992
|
+
i > 0 && (n = this.data.substr(r), o = parseInt(n, 10), t.put(o, i * 3 + 1));
|
|
1993
|
+
};
|
|
1994
|
+
var ii = Tt;
|
|
1995
|
+
const si = at, Se = [
|
|
1996
|
+
"0",
|
|
1997
|
+
"1",
|
|
1998
|
+
"2",
|
|
1999
|
+
"3",
|
|
2000
|
+
"4",
|
|
2001
|
+
"5",
|
|
2002
|
+
"6",
|
|
2003
|
+
"7",
|
|
2004
|
+
"8",
|
|
2005
|
+
"9",
|
|
2006
|
+
"A",
|
|
2007
|
+
"B",
|
|
2008
|
+
"C",
|
|
2009
|
+
"D",
|
|
2010
|
+
"E",
|
|
2011
|
+
"F",
|
|
2012
|
+
"G",
|
|
2013
|
+
"H",
|
|
2014
|
+
"I",
|
|
2015
|
+
"J",
|
|
2016
|
+
"K",
|
|
2017
|
+
"L",
|
|
2018
|
+
"M",
|
|
2019
|
+
"N",
|
|
2020
|
+
"O",
|
|
2021
|
+
"P",
|
|
2022
|
+
"Q",
|
|
2023
|
+
"R",
|
|
2024
|
+
"S",
|
|
2025
|
+
"T",
|
|
2026
|
+
"U",
|
|
2027
|
+
"V",
|
|
2028
|
+
"W",
|
|
2029
|
+
"X",
|
|
2030
|
+
"Y",
|
|
2031
|
+
"Z",
|
|
2032
|
+
" ",
|
|
2033
|
+
"$",
|
|
2034
|
+
"%",
|
|
2035
|
+
"*",
|
|
2036
|
+
"+",
|
|
2037
|
+
"-",
|
|
2038
|
+
".",
|
|
2039
|
+
"/",
|
|
2040
|
+
":"
|
|
2041
|
+
];
|
|
2042
|
+
function Pt(e) {
|
|
2043
|
+
this.mode = si.ALPHANUMERIC, this.data = e;
|
|
2044
|
+
}
|
|
2045
|
+
Pt.getBitsLength = function(t) {
|
|
2046
|
+
return 11 * Math.floor(t / 2) + 6 * (t % 2);
|
|
2047
|
+
};
|
|
2048
|
+
Pt.prototype.getLength = function() {
|
|
2049
|
+
return this.data.length;
|
|
2050
|
+
};
|
|
2051
|
+
Pt.prototype.getBitsLength = function() {
|
|
2052
|
+
return Pt.getBitsLength(this.data.length);
|
|
2053
|
+
};
|
|
2054
|
+
Pt.prototype.write = function(t) {
|
|
2055
|
+
let r;
|
|
2056
|
+
for (r = 0; r + 2 <= this.data.length; r += 2) {
|
|
2057
|
+
let n = Se.indexOf(this.data[r]) * 45;
|
|
2058
|
+
n += Se.indexOf(this.data[r + 1]), t.put(n, 11);
|
|
2059
|
+
}
|
|
2060
|
+
this.data.length % 2 && t.put(Se.indexOf(this.data[r]), 6);
|
|
2061
|
+
};
|
|
2062
|
+
var ai = Pt, li = function(t) {
|
|
2063
|
+
for (var r = [], n = t.length, o = 0; o < n; o++) {
|
|
2064
|
+
var i = t.charCodeAt(o);
|
|
2065
|
+
if (i >= 55296 && i <= 56319 && n > o + 1) {
|
|
2066
|
+
var s = t.charCodeAt(o + 1);
|
|
2067
|
+
s >= 56320 && s <= 57343 && (i = (i - 55296) * 1024 + s - 56320 + 65536, o += 1);
|
|
2068
|
+
}
|
|
2069
|
+
if (i < 128) {
|
|
2070
|
+
r.push(i);
|
|
2071
|
+
continue;
|
|
2072
|
+
}
|
|
2073
|
+
if (i < 2048) {
|
|
2074
|
+
r.push(i >> 6 | 192), r.push(i & 63 | 128);
|
|
2075
|
+
continue;
|
|
2076
|
+
}
|
|
2077
|
+
if (i < 55296 || i >= 57344 && i < 65536) {
|
|
2078
|
+
r.push(i >> 12 | 224), r.push(i >> 6 & 63 | 128), r.push(i & 63 | 128);
|
|
2079
|
+
continue;
|
|
2080
|
+
}
|
|
2081
|
+
if (i >= 65536 && i <= 1114111) {
|
|
2082
|
+
r.push(i >> 18 | 240), r.push(i >> 12 & 63 | 128), r.push(i >> 6 & 63 | 128), r.push(i & 63 | 128);
|
|
2083
|
+
continue;
|
|
2084
|
+
}
|
|
2085
|
+
r.push(239, 191, 189);
|
|
2086
|
+
}
|
|
2087
|
+
return new Uint8Array(r).buffer;
|
|
2088
|
+
};
|
|
2089
|
+
const ci = li, di = at;
|
|
2090
|
+
function Mt(e) {
|
|
2091
|
+
this.mode = di.BYTE, typeof e == "string" && (e = ci(e)), this.data = new Uint8Array(e);
|
|
2092
|
+
}
|
|
2093
|
+
Mt.getBitsLength = function(t) {
|
|
2094
|
+
return t * 8;
|
|
2095
|
+
};
|
|
2096
|
+
Mt.prototype.getLength = function() {
|
|
2097
|
+
return this.data.length;
|
|
2098
|
+
};
|
|
2099
|
+
Mt.prototype.getBitsLength = function() {
|
|
2100
|
+
return Mt.getBitsLength(this.data.length);
|
|
2101
|
+
};
|
|
2102
|
+
Mt.prototype.write = function(e) {
|
|
2103
|
+
for (let t = 0, r = this.data.length; t < r; t++)
|
|
2104
|
+
e.put(this.data[t], 8);
|
|
2105
|
+
};
|
|
2106
|
+
var hi = Mt;
|
|
2107
|
+
const ui = at, mi = F;
|
|
2108
|
+
function St(e) {
|
|
2109
|
+
this.mode = ui.KANJI, this.data = e;
|
|
2110
|
+
}
|
|
2111
|
+
St.getBitsLength = function(t) {
|
|
2112
|
+
return t * 13;
|
|
2113
|
+
};
|
|
2114
|
+
St.prototype.getLength = function() {
|
|
2115
|
+
return this.data.length;
|
|
2116
|
+
};
|
|
2117
|
+
St.prototype.getBitsLength = function() {
|
|
2118
|
+
return St.getBitsLength(this.data.length);
|
|
2119
|
+
};
|
|
2120
|
+
St.prototype.write = function(e) {
|
|
2121
|
+
let t;
|
|
2122
|
+
for (t = 0; t < this.data.length; t++) {
|
|
2123
|
+
let r = mi.toSJIS(this.data[t]);
|
|
2124
|
+
if (r >= 33088 && r <= 40956)
|
|
2125
|
+
r -= 33088;
|
|
2126
|
+
else if (r >= 57408 && r <= 60351)
|
|
2127
|
+
r -= 49472;
|
|
2128
|
+
else
|
|
2129
|
+
throw new Error(
|
|
2130
|
+
"Invalid SJIS character: " + this.data[t] + `
|
|
2131
|
+
Make sure your charset is UTF-8`
|
|
2132
|
+
);
|
|
2133
|
+
r = (r >>> 8 & 255) * 192 + (r & 255), e.put(r, 13);
|
|
2134
|
+
}
|
|
2135
|
+
};
|
|
2136
|
+
var gi = St, Lo = { exports: {} };
|
|
2137
|
+
(function(e) {
|
|
2138
|
+
var t = {
|
|
2139
|
+
single_source_shortest_paths: function(r, n, o) {
|
|
2140
|
+
var i = {}, s = {};
|
|
2141
|
+
s[n] = 0;
|
|
2142
|
+
var a = t.PriorityQueue.make();
|
|
2143
|
+
a.push(n, 0);
|
|
2144
|
+
for (var l, c, d, b, h, f, p, g, _; !a.empty(); ) {
|
|
2145
|
+
l = a.pop(), c = l.value, b = l.cost, h = r[c] || {};
|
|
2146
|
+
for (d in h)
|
|
2147
|
+
h.hasOwnProperty(d) && (f = h[d], p = b + f, g = s[d], _ = typeof s[d] > "u", (_ || g > p) && (s[d] = p, a.push(d, p), i[d] = c));
|
|
2148
|
+
}
|
|
2149
|
+
if (typeof o < "u" && typeof s[o] > "u") {
|
|
2150
|
+
var u = ["Could not find a path from ", n, " to ", o, "."].join("");
|
|
2151
|
+
throw new Error(u);
|
|
2152
|
+
}
|
|
2153
|
+
return i;
|
|
2154
|
+
},
|
|
2155
|
+
extract_shortest_path_from_predecessor_list: function(r, n) {
|
|
2156
|
+
for (var o = [], i = n; i; )
|
|
2157
|
+
o.push(i), r[i], i = r[i];
|
|
2158
|
+
return o.reverse(), o;
|
|
2159
|
+
},
|
|
2160
|
+
find_path: function(r, n, o) {
|
|
2161
|
+
var i = t.single_source_shortest_paths(r, n, o);
|
|
2162
|
+
return t.extract_shortest_path_from_predecessor_list(
|
|
2163
|
+
i,
|
|
2164
|
+
o
|
|
2165
|
+
);
|
|
2166
|
+
},
|
|
2167
|
+
/**
|
|
2168
|
+
* A very naive priority queue implementation.
|
|
2169
|
+
*/
|
|
2170
|
+
PriorityQueue: {
|
|
2171
|
+
make: function(r) {
|
|
2172
|
+
var n = t.PriorityQueue, o = {}, i;
|
|
2173
|
+
r = r || {};
|
|
2174
|
+
for (i in n)
|
|
2175
|
+
n.hasOwnProperty(i) && (o[i] = n[i]);
|
|
2176
|
+
return o.queue = [], o.sorter = r.sorter || n.default_sorter, o;
|
|
2177
|
+
},
|
|
2178
|
+
default_sorter: function(r, n) {
|
|
2179
|
+
return r.cost - n.cost;
|
|
2180
|
+
},
|
|
2181
|
+
/**
|
|
2182
|
+
* Add a new item to the queue and ensure the highest priority element
|
|
2183
|
+
* is at the front of the queue.
|
|
2184
|
+
*/
|
|
2185
|
+
push: function(r, n) {
|
|
2186
|
+
var o = { value: r, cost: n };
|
|
2187
|
+
this.queue.push(o), this.queue.sort(this.sorter);
|
|
2188
|
+
},
|
|
2189
|
+
/**
|
|
2190
|
+
* Return the highest priority element in the queue.
|
|
2191
|
+
*/
|
|
2192
|
+
pop: function() {
|
|
2193
|
+
return this.queue.shift();
|
|
2194
|
+
},
|
|
2195
|
+
empty: function() {
|
|
2196
|
+
return this.queue.length === 0;
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
};
|
|
2200
|
+
e.exports = t;
|
|
2201
|
+
})(Lo);
|
|
2202
|
+
var fi = Lo.exports;
|
|
2203
|
+
(function(e) {
|
|
2204
|
+
const t = at, r = ii, n = ai, o = hi, i = gi, s = q, a = F, l = fi;
|
|
2205
|
+
function c(u) {
|
|
2206
|
+
return unescape(encodeURIComponent(u)).length;
|
|
2207
|
+
}
|
|
2208
|
+
function d(u, y, w) {
|
|
2209
|
+
const v = [];
|
|
2210
|
+
let E;
|
|
2211
|
+
for (; (E = u.exec(w)) !== null; )
|
|
2212
|
+
v.push({
|
|
2213
|
+
data: E[0],
|
|
2214
|
+
index: E.index,
|
|
2215
|
+
mode: y,
|
|
2216
|
+
length: E[0].length
|
|
2217
|
+
});
|
|
2218
|
+
return v;
|
|
2219
|
+
}
|
|
2220
|
+
function b(u) {
|
|
2221
|
+
const y = d(s.NUMERIC, t.NUMERIC, u), w = d(s.ALPHANUMERIC, t.ALPHANUMERIC, u);
|
|
2222
|
+
let v, E;
|
|
2223
|
+
return a.isKanjiModeEnabled() ? (v = d(s.BYTE, t.BYTE, u), E = d(s.KANJI, t.KANJI, u)) : (v = d(s.BYTE_KANJI, t.BYTE, u), E = []), y.concat(w, v, E).sort(function(S, U) {
|
|
2224
|
+
return S.index - U.index;
|
|
2225
|
+
}).map(function(S) {
|
|
2226
|
+
return {
|
|
2227
|
+
data: S.data,
|
|
2228
|
+
mode: S.mode,
|
|
2229
|
+
length: S.length
|
|
2230
|
+
};
|
|
2231
|
+
});
|
|
2232
|
+
}
|
|
2233
|
+
function h(u, y) {
|
|
2234
|
+
switch (y) {
|
|
2235
|
+
case t.NUMERIC:
|
|
2236
|
+
return r.getBitsLength(u);
|
|
2237
|
+
case t.ALPHANUMERIC:
|
|
2238
|
+
return n.getBitsLength(u);
|
|
2239
|
+
case t.KANJI:
|
|
2240
|
+
return i.getBitsLength(u);
|
|
2241
|
+
case t.BYTE:
|
|
2242
|
+
return o.getBitsLength(u);
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
function f(u) {
|
|
2246
|
+
return u.reduce(function(y, w) {
|
|
2247
|
+
const v = y.length - 1 >= 0 ? y[y.length - 1] : null;
|
|
2248
|
+
return v && v.mode === w.mode ? (y[y.length - 1].data += w.data, y) : (y.push(w), y);
|
|
2249
|
+
}, []);
|
|
2250
|
+
}
|
|
2251
|
+
function p(u) {
|
|
2252
|
+
const y = [];
|
|
2253
|
+
for (let w = 0; w < u.length; w++) {
|
|
2254
|
+
const v = u[w];
|
|
2255
|
+
switch (v.mode) {
|
|
2256
|
+
case t.NUMERIC:
|
|
2257
|
+
y.push([
|
|
2258
|
+
v,
|
|
2259
|
+
{ data: v.data, mode: t.ALPHANUMERIC, length: v.length },
|
|
2260
|
+
{ data: v.data, mode: t.BYTE, length: v.length }
|
|
2261
|
+
]);
|
|
2262
|
+
break;
|
|
2263
|
+
case t.ALPHANUMERIC:
|
|
2264
|
+
y.push([
|
|
2265
|
+
v,
|
|
2266
|
+
{ data: v.data, mode: t.BYTE, length: v.length }
|
|
2267
|
+
]);
|
|
2268
|
+
break;
|
|
2269
|
+
case t.KANJI:
|
|
2270
|
+
y.push([
|
|
2271
|
+
v,
|
|
2272
|
+
{ data: v.data, mode: t.BYTE, length: c(v.data) }
|
|
2273
|
+
]);
|
|
2274
|
+
break;
|
|
2275
|
+
case t.BYTE:
|
|
2276
|
+
y.push([
|
|
2277
|
+
{ data: v.data, mode: t.BYTE, length: c(v.data) }
|
|
2278
|
+
]);
|
|
2279
|
+
}
|
|
2280
|
+
}
|
|
2281
|
+
return y;
|
|
2282
|
+
}
|
|
2283
|
+
function g(u, y) {
|
|
2284
|
+
const w = {}, v = { start: {} };
|
|
2285
|
+
let E = ["start"];
|
|
2286
|
+
for (let M = 0; M < u.length; M++) {
|
|
2287
|
+
const S = u[M], U = [];
|
|
2288
|
+
for (let P = 0; P < S.length; P++) {
|
|
2289
|
+
const z = S[P], R = "" + M + P;
|
|
2290
|
+
U.push(R), w[R] = { node: z, lastCount: 0 }, v[R] = {};
|
|
2291
|
+
for (let Y = 0; Y < E.length; Y++) {
|
|
2292
|
+
const D = E[Y];
|
|
2293
|
+
w[D] && w[D].node.mode === z.mode ? (v[D][R] = h(w[D].lastCount + z.length, z.mode) - h(w[D].lastCount, z.mode), w[D].lastCount += z.length) : (w[D] && (w[D].lastCount = z.length), v[D][R] = h(z.length, z.mode) + 4 + t.getCharCountIndicator(z.mode, y));
|
|
2294
|
+
}
|
|
2295
|
+
}
|
|
2296
|
+
E = U;
|
|
2297
|
+
}
|
|
2298
|
+
for (let M = 0; M < E.length; M++)
|
|
2299
|
+
v[E[M]].end = 0;
|
|
2300
|
+
return { map: v, table: w };
|
|
2301
|
+
}
|
|
2302
|
+
function _(u, y) {
|
|
2303
|
+
let w;
|
|
2304
|
+
const v = t.getBestModeForData(u);
|
|
2305
|
+
if (w = t.from(y, v), w !== t.BYTE && w.bit < v.bit)
|
|
2306
|
+
throw new Error('"' + u + '" cannot be encoded with mode ' + t.toString(w) + `.
|
|
2307
|
+
Suggested mode is: ` + t.toString(v));
|
|
2308
|
+
switch (w === t.KANJI && !a.isKanjiModeEnabled() && (w = t.BYTE), w) {
|
|
2309
|
+
case t.NUMERIC:
|
|
2310
|
+
return new r(u);
|
|
2311
|
+
case t.ALPHANUMERIC:
|
|
2312
|
+
return new n(u);
|
|
2313
|
+
case t.KANJI:
|
|
2314
|
+
return new i(u);
|
|
2315
|
+
case t.BYTE:
|
|
2316
|
+
return new o(u);
|
|
2317
|
+
}
|
|
2318
|
+
}
|
|
2319
|
+
e.fromArray = function(y) {
|
|
2320
|
+
return y.reduce(function(w, v) {
|
|
2321
|
+
return typeof v == "string" ? w.push(_(v, null)) : v.data && w.push(_(v.data, v.mode)), w;
|
|
2322
|
+
}, []);
|
|
2323
|
+
}, e.fromString = function(y, w) {
|
|
2324
|
+
const v = b(y, a.isKanjiModeEnabled()), E = p(v), M = g(E, w), S = l.find_path(M.map, "start", "end"), U = [];
|
|
2325
|
+
for (let P = 1; P < S.length - 1; P++)
|
|
2326
|
+
U.push(M.table[S[P]].node);
|
|
2327
|
+
return e.fromArray(f(U));
|
|
2328
|
+
}, e.rawSplit = function(y) {
|
|
2329
|
+
return e.fromArray(
|
|
2330
|
+
b(y, a.isKanjiModeEnabled())
|
|
2331
|
+
);
|
|
2332
|
+
};
|
|
2333
|
+
})(Ro);
|
|
2334
|
+
const $e = F, Re = be, pi = qn, wi = Yn, vi = Ao, bi = _o, gr = Oo, fr = ye, yi = Gn, we = To, xi = Mo, $i = at, Le = Ro;
|
|
2335
|
+
function Ci(e, t) {
|
|
2336
|
+
const r = e.size, n = bi.getPositions(t);
|
|
2337
|
+
for (let o = 0; o < n.length; o++) {
|
|
2338
|
+
const i = n[o][0], s = n[o][1];
|
|
2339
|
+
for (let a = -1; a <= 7; a++)
|
|
2340
|
+
if (!(i + a <= -1 || r <= i + a))
|
|
2341
|
+
for (let l = -1; l <= 7; l++)
|
|
2342
|
+
s + l <= -1 || r <= s + l || (a >= 0 && a <= 6 && (l === 0 || l === 6) || l >= 0 && l <= 6 && (a === 0 || a === 6) || a >= 2 && a <= 4 && l >= 2 && l <= 4 ? e.set(i + a, s + l, !0, !0) : e.set(i + a, s + l, !1, !0));
|
|
2343
|
+
}
|
|
2344
|
+
}
|
|
2345
|
+
function Ei(e) {
|
|
2346
|
+
const t = e.size;
|
|
2347
|
+
for (let r = 8; r < t - 8; r++) {
|
|
2348
|
+
const n = r % 2 === 0;
|
|
2349
|
+
e.set(r, 6, n, !0), e.set(6, r, n, !0);
|
|
2350
|
+
}
|
|
2351
|
+
}
|
|
2352
|
+
function Ai(e, t) {
|
|
2353
|
+
const r = vi.getPositions(t);
|
|
2354
|
+
for (let n = 0; n < r.length; n++) {
|
|
2355
|
+
const o = r[n][0], i = r[n][1];
|
|
2356
|
+
for (let s = -2; s <= 2; s++)
|
|
2357
|
+
for (let a = -2; a <= 2; a++)
|
|
2358
|
+
s === -2 || s === 2 || a === -2 || a === 2 || s === 0 && a === 0 ? e.set(o + s, i + a, !0, !0) : e.set(o + s, i + a, !1, !0);
|
|
2359
|
+
}
|
|
2360
|
+
}
|
|
2361
|
+
function _i(e, t) {
|
|
2362
|
+
const r = e.size, n = we.getEncodedBits(t);
|
|
2363
|
+
let o, i, s;
|
|
2364
|
+
for (let a = 0; a < 18; a++)
|
|
2365
|
+
o = Math.floor(a / 3), i = a % 3 + r - 8 - 3, s = (n >> a & 1) === 1, e.set(o, i, s, !0), e.set(i, o, s, !0);
|
|
2366
|
+
}
|
|
2367
|
+
function Ne(e, t, r) {
|
|
2368
|
+
const n = e.size, o = xi.getEncodedBits(t, r);
|
|
2369
|
+
let i, s;
|
|
2370
|
+
for (i = 0; i < 15; i++)
|
|
2371
|
+
s = (o >> i & 1) === 1, i < 6 ? e.set(i, 8, s, !0) : i < 8 ? e.set(i + 1, 8, s, !0) : e.set(n - 15 + i, 8, s, !0), i < 8 ? e.set(8, n - i - 1, s, !0) : i < 9 ? e.set(8, 15 - i - 1 + 1, s, !0) : e.set(8, 15 - i - 1, s, !0);
|
|
2372
|
+
e.set(n - 8, 8, 1, !0);
|
|
2373
|
+
}
|
|
2374
|
+
function Oi(e, t) {
|
|
2375
|
+
const r = e.size;
|
|
2376
|
+
let n = -1, o = r - 1, i = 7, s = 0;
|
|
2377
|
+
for (let a = r - 1; a > 0; a -= 2)
|
|
2378
|
+
for (a === 6 && a--; ; ) {
|
|
2379
|
+
for (let l = 0; l < 2; l++)
|
|
2380
|
+
if (!e.isReserved(o, a - l)) {
|
|
2381
|
+
let c = !1;
|
|
2382
|
+
s < t.length && (c = (t[s] >>> i & 1) === 1), e.set(o, a - l, c), i--, i === -1 && (s++, i = 7);
|
|
2383
|
+
}
|
|
2384
|
+
if (o += n, o < 0 || r <= o) {
|
|
2385
|
+
o -= n, n = -n;
|
|
2386
|
+
break;
|
|
2387
|
+
}
|
|
2388
|
+
}
|
|
2389
|
+
}
|
|
2390
|
+
function ki(e, t, r) {
|
|
2391
|
+
const n = new pi();
|
|
2392
|
+
r.forEach(function(l) {
|
|
2393
|
+
n.put(l.mode.bit, 4), n.put(l.getLength(), $i.getCharCountIndicator(l.mode, e)), l.write(n);
|
|
2394
|
+
});
|
|
2395
|
+
const o = $e.getSymbolTotalCodewords(e), i = fr.getTotalCodewordsCount(e, t), s = (o - i) * 8;
|
|
2396
|
+
for (n.getLengthInBits() + 4 <= s && n.put(0, 4); n.getLengthInBits() % 8 !== 0; )
|
|
2397
|
+
n.putBit(0);
|
|
2398
|
+
const a = (s - n.getLengthInBits()) / 8;
|
|
2399
|
+
for (let l = 0; l < a; l++)
|
|
2400
|
+
n.put(l % 2 ? 17 : 236, 8);
|
|
2401
|
+
return Ii(n, e, t);
|
|
2402
|
+
}
|
|
2403
|
+
function Ii(e, t, r) {
|
|
2404
|
+
const n = $e.getSymbolTotalCodewords(t), o = fr.getTotalCodewordsCount(t, r), i = n - o, s = fr.getBlocksCount(t, r), a = n % s, l = s - a, c = Math.floor(n / s), d = Math.floor(i / s), b = d + 1, h = c - d, f = new yi(h);
|
|
2405
|
+
let p = 0;
|
|
2406
|
+
const g = new Array(s), _ = new Array(s);
|
|
2407
|
+
let u = 0;
|
|
2408
|
+
const y = new Uint8Array(e.buffer);
|
|
2409
|
+
for (let S = 0; S < s; S++) {
|
|
2410
|
+
const U = S < l ? d : b;
|
|
2411
|
+
g[S] = y.slice(p, p + U), _[S] = f.encode(g[S]), p += U, u = Math.max(u, U);
|
|
2412
|
+
}
|
|
2413
|
+
const w = new Uint8Array(n);
|
|
2414
|
+
let v = 0, E, M;
|
|
2415
|
+
for (E = 0; E < u; E++)
|
|
2416
|
+
for (M = 0; M < s; M++)
|
|
2417
|
+
E < g[M].length && (w[v++] = g[M][E]);
|
|
2418
|
+
for (E = 0; E < h; E++)
|
|
2419
|
+
for (M = 0; M < s; M++)
|
|
2420
|
+
w[v++] = _[M][E];
|
|
2421
|
+
return w;
|
|
2422
|
+
}
|
|
2423
|
+
function Ti(e, t, r, n) {
|
|
2424
|
+
let o;
|
|
2425
|
+
if (Array.isArray(e))
|
|
2426
|
+
o = Le.fromArray(e);
|
|
2427
|
+
else if (typeof e == "string") {
|
|
2428
|
+
let c = t;
|
|
2429
|
+
if (!c) {
|
|
2430
|
+
const d = Le.rawSplit(e);
|
|
2431
|
+
c = we.getBestVersionForData(d, r);
|
|
2432
|
+
}
|
|
2433
|
+
o = Le.fromString(e, c || 40);
|
|
2434
|
+
} else
|
|
2435
|
+
throw new Error("Invalid data");
|
|
2436
|
+
const i = we.getBestVersionForData(o, r);
|
|
2437
|
+
if (!i)
|
|
2438
|
+
throw new Error("The amount of data is too big to be stored in a QR Code");
|
|
2439
|
+
if (!t)
|
|
2440
|
+
t = i;
|
|
2441
|
+
else if (t < i)
|
|
2442
|
+
throw new Error(
|
|
2443
|
+
`
|
|
2444
|
+
The chosen QR Code version cannot contain this amount of data.
|
|
2445
|
+
Minimum version required to store current data is: ` + i + `.
|
|
2446
|
+
`
|
|
2447
|
+
);
|
|
2448
|
+
const s = ki(t, r, o), a = $e.getSymbolSize(t), l = new wi(a);
|
|
2449
|
+
return Ci(l, t), Ei(l), Ai(l, t), Ne(l, r, 0), t >= 7 && _i(l, t), Oi(l, s), isNaN(n) && (n = gr.getBestMask(
|
|
2450
|
+
l,
|
|
2451
|
+
Ne.bind(null, l, r)
|
|
2452
|
+
)), gr.applyMask(n, l), Ne(l, r, n), {
|
|
2453
|
+
modules: l,
|
|
2454
|
+
version: t,
|
|
2455
|
+
errorCorrectionLevel: r,
|
|
2456
|
+
maskPattern: n,
|
|
2457
|
+
segments: o
|
|
2458
|
+
};
|
|
2459
|
+
}
|
|
2460
|
+
Co.create = function(t, r) {
|
|
2461
|
+
if (typeof t > "u" || t === "")
|
|
2462
|
+
throw new Error("No input text");
|
|
2463
|
+
let n = Re.M, o, i;
|
|
2464
|
+
return typeof r < "u" && (n = Re.from(r.errorCorrectionLevel, Re.M), o = we.from(r.version), i = gr.from(r.maskPattern), r.toSJISFunc && $e.setToSJISFunction(r.toSJISFunc)), Ti(t, o, n, i);
|
|
2465
|
+
};
|
|
2466
|
+
var No = {}, Er = {};
|
|
2467
|
+
(function(e) {
|
|
2468
|
+
function t(r) {
|
|
2469
|
+
if (typeof r == "number" && (r = r.toString()), typeof r != "string")
|
|
2470
|
+
throw new Error("Color should be defined as hex string");
|
|
2471
|
+
let n = r.slice().replace("#", "").split("");
|
|
2472
|
+
if (n.length < 3 || n.length === 5 || n.length > 8)
|
|
2473
|
+
throw new Error("Invalid hex color: " + r);
|
|
2474
|
+
(n.length === 3 || n.length === 4) && (n = Array.prototype.concat.apply([], n.map(function(i) {
|
|
2475
|
+
return [i, i];
|
|
2476
|
+
}))), n.length === 6 && n.push("F", "F");
|
|
2477
|
+
const o = parseInt(n.join(""), 16);
|
|
2478
|
+
return {
|
|
2479
|
+
r: o >> 24 & 255,
|
|
2480
|
+
g: o >> 16 & 255,
|
|
2481
|
+
b: o >> 8 & 255,
|
|
2482
|
+
a: o & 255,
|
|
2483
|
+
hex: "#" + n.slice(0, 6).join("")
|
|
2484
|
+
};
|
|
2485
|
+
}
|
|
2486
|
+
e.getOptions = function(n) {
|
|
2487
|
+
n || (n = {}), n.color || (n.color = {});
|
|
2488
|
+
const o = typeof n.margin > "u" || n.margin === null || n.margin < 0 ? 4 : n.margin, i = n.width && n.width >= 21 ? n.width : void 0, s = n.scale || 4;
|
|
2489
|
+
return {
|
|
2490
|
+
width: i,
|
|
2491
|
+
scale: i ? 4 : s,
|
|
2492
|
+
margin: o,
|
|
2493
|
+
color: {
|
|
2494
|
+
dark: t(n.color.dark || "#000000ff"),
|
|
2495
|
+
light: t(n.color.light || "#ffffffff")
|
|
2496
|
+
},
|
|
2497
|
+
type: n.type,
|
|
2498
|
+
rendererOpts: n.rendererOpts || {}
|
|
2499
|
+
};
|
|
2500
|
+
}, e.getScale = function(n, o) {
|
|
2501
|
+
return o.width && o.width >= n + o.margin * 2 ? o.width / (n + o.margin * 2) : o.scale;
|
|
2502
|
+
}, e.getImageWidth = function(n, o) {
|
|
2503
|
+
const i = e.getScale(n, o);
|
|
2504
|
+
return Math.floor((n + o.margin * 2) * i);
|
|
2505
|
+
}, e.qrToImageData = function(n, o, i) {
|
|
2506
|
+
const s = o.modules.size, a = o.modules.data, l = e.getScale(s, i), c = Math.floor((s + i.margin * 2) * l), d = i.margin * l, b = [i.color.light, i.color.dark];
|
|
2507
|
+
for (let h = 0; h < c; h++)
|
|
2508
|
+
for (let f = 0; f < c; f++) {
|
|
2509
|
+
let p = (h * c + f) * 4, g = i.color.light;
|
|
2510
|
+
if (h >= d && f >= d && h < c - d && f < c - d) {
|
|
2511
|
+
const _ = Math.floor((h - d) / l), u = Math.floor((f - d) / l);
|
|
2512
|
+
g = b[a[_ * s + u] ? 1 : 0];
|
|
2513
|
+
}
|
|
2514
|
+
n[p++] = g.r, n[p++] = g.g, n[p++] = g.b, n[p] = g.a;
|
|
2515
|
+
}
|
|
2516
|
+
};
|
|
2517
|
+
})(Er);
|
|
2518
|
+
(function(e) {
|
|
2519
|
+
const t = Er;
|
|
2520
|
+
function r(o, i, s) {
|
|
2521
|
+
o.clearRect(0, 0, i.width, i.height), i.style || (i.style = {}), i.height = s, i.width = s, i.style.height = s + "px", i.style.width = s + "px";
|
|
2522
|
+
}
|
|
2523
|
+
function n() {
|
|
2524
|
+
try {
|
|
2525
|
+
return document.createElement("canvas");
|
|
2526
|
+
} catch {
|
|
2527
|
+
throw new Error("You need to specify a canvas element");
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
e.render = function(i, s, a) {
|
|
2531
|
+
let l = a, c = s;
|
|
2532
|
+
typeof l > "u" && (!s || !s.getContext) && (l = s, s = void 0), s || (c = n()), l = t.getOptions(l);
|
|
2533
|
+
const d = t.getImageWidth(i.modules.size, l), b = c.getContext("2d"), h = b.createImageData(d, d);
|
|
2534
|
+
return t.qrToImageData(h.data, i, l), r(b, c, d), b.putImageData(h, 0, 0), c;
|
|
2535
|
+
}, e.renderToDataURL = function(i, s, a) {
|
|
2536
|
+
let l = a;
|
|
2537
|
+
typeof l > "u" && (!s || !s.getContext) && (l = s, s = void 0), l || (l = {});
|
|
2538
|
+
const c = e.render(i, s, l), d = l.type || "image/png", b = l.rendererOpts || {};
|
|
2539
|
+
return c.toDataURL(d, b.quality);
|
|
2540
|
+
};
|
|
2541
|
+
})(No);
|
|
2542
|
+
var Bo = {};
|
|
2543
|
+
const Pi = Er;
|
|
2544
|
+
function Vr(e, t) {
|
|
2545
|
+
const r = e.a / 255, n = t + '="' + e.hex + '"';
|
|
2546
|
+
return r < 1 ? n + " " + t + '-opacity="' + r.toFixed(2).slice(1) + '"' : n;
|
|
2547
|
+
}
|
|
2548
|
+
function Be(e, t, r) {
|
|
2549
|
+
let n = e + t;
|
|
2550
|
+
return typeof r < "u" && (n += " " + r), n;
|
|
2551
|
+
}
|
|
2552
|
+
function Mi(e, t, r) {
|
|
2553
|
+
let n = "", o = 0, i = !1, s = 0;
|
|
2554
|
+
for (let a = 0; a < e.length; a++) {
|
|
2555
|
+
const l = Math.floor(a % t), c = Math.floor(a / t);
|
|
2556
|
+
!l && !i && (i = !0), e[a] ? (s++, a > 0 && l > 0 && e[a - 1] || (n += i ? Be("M", l + r, 0.5 + c + r) : Be("m", o, 0), o = 0, i = !1), l + 1 < t && e[a + 1] || (n += Be("h", s), s = 0)) : o++;
|
|
2557
|
+
}
|
|
2558
|
+
return n;
|
|
2559
|
+
}
|
|
2560
|
+
Bo.render = function(t, r, n) {
|
|
2561
|
+
const o = Pi.getOptions(r), i = t.modules.size, s = t.modules.data, a = i + o.margin * 2, l = o.color.light.a ? "<path " + Vr(o.color.light, "fill") + ' d="M0 0h' + a + "v" + a + 'H0z"/>' : "", c = "<path " + Vr(o.color.dark, "stroke") + ' d="' + Mi(s, i, o.margin) + '"/>', d = 'viewBox="0 0 ' + a + " " + a + '"', h = '<svg xmlns="http://www.w3.org/2000/svg" ' + (o.width ? 'width="' + o.width + '" height="' + o.width + '" ' : "") + d + ' shape-rendering="crispEdges">' + l + c + `</svg>
|
|
2562
|
+
`;
|
|
2563
|
+
return typeof n == "function" && n(null, h), h;
|
|
2564
|
+
};
|
|
2565
|
+
const Si = Vn, pr = Co, Do = No, Ri = Bo;
|
|
2566
|
+
function Ar(e, t, r, n, o) {
|
|
2567
|
+
const i = [].slice.call(arguments, 1), s = i.length, a = typeof i[s - 1] == "function";
|
|
2568
|
+
if (!a && !Si())
|
|
2569
|
+
throw new Error("Callback required as last argument");
|
|
2570
|
+
if (a) {
|
|
2571
|
+
if (s < 2)
|
|
2572
|
+
throw new Error("Too few arguments provided");
|
|
2573
|
+
s === 2 ? (o = r, r = t, t = n = void 0) : s === 3 && (t.getContext && typeof o > "u" ? (o = n, n = void 0) : (o = n, n = r, r = t, t = void 0));
|
|
2574
|
+
} else {
|
|
2575
|
+
if (s < 1)
|
|
2576
|
+
throw new Error("Too few arguments provided");
|
|
2577
|
+
return s === 1 ? (r = t, t = n = void 0) : s === 2 && !t.getContext && (n = r, r = t, t = void 0), new Promise(function(l, c) {
|
|
2578
|
+
try {
|
|
2579
|
+
const d = pr.create(r, n);
|
|
2580
|
+
l(e(d, t, n));
|
|
2581
|
+
} catch (d) {
|
|
2582
|
+
c(d);
|
|
2583
|
+
}
|
|
2584
|
+
});
|
|
2585
|
+
}
|
|
2586
|
+
try {
|
|
2587
|
+
const l = pr.create(r, n);
|
|
2588
|
+
o(null, e(l, t, n));
|
|
2589
|
+
} catch (l) {
|
|
2590
|
+
o(l);
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
Gt.create = pr.create;
|
|
2594
|
+
Gt.toCanvas = Ar.bind(null, Do.render);
|
|
2595
|
+
Gt.toDataURL = Ar.bind(null, Do.renderToDataURL);
|
|
2596
|
+
Gt.toString = Ar.bind(null, function(e, t, r) {
|
|
2597
|
+
return Ri.render(e, r);
|
|
2598
|
+
});
|
|
2599
|
+
var Li = Object.defineProperty, Kr = Object.getOwnPropertySymbols, Ni = Object.prototype.hasOwnProperty, Bi = Object.prototype.propertyIsEnumerable, qr = (e, t, r) => t in e ? Li(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, De = (e, t) => {
|
|
2600
|
+
for (var r in t || (t = {}))
|
|
2601
|
+
Ni.call(t, r) && qr(e, r, t[r]);
|
|
2602
|
+
if (Kr)
|
|
2603
|
+
for (var r of Kr(t))
|
|
2604
|
+
Bi.call(t, r) && qr(e, r, t[r]);
|
|
2605
|
+
return e;
|
|
2606
|
+
};
|
|
2607
|
+
function Di() {
|
|
2608
|
+
var e;
|
|
2609
|
+
const t = (e = _t.state.themeMode) != null ? e : "dark", r = { light: { foreground: { 1: "rgb(20,20,20)", 2: "rgb(121,134,134)", 3: "rgb(158,169,169)" }, background: { 1: "rgb(255,255,255)", 2: "rgb(241,243,243)", 3: "rgb(228,231,231)" }, overlay: "rgba(0,0,0,0.1)" }, dark: { foreground: { 1: "rgb(228,231,231)", 2: "rgb(148,158,158)", 3: "rgb(110,119,119)" }, background: { 1: "rgb(20,20,20)", 2: "rgb(39,42,42)", 3: "rgb(59,64,64)" }, overlay: "rgba(255,255,255,0.1)" } }[t];
|
|
2610
|
+
return { "--wcm-color-fg-1": r.foreground[1], "--wcm-color-fg-2": r.foreground[2], "--wcm-color-fg-3": r.foreground[3], "--wcm-color-bg-1": r.background[1], "--wcm-color-bg-2": r.background[2], "--wcm-color-bg-3": r.background[3], "--wcm-color-overlay": r.overlay };
|
|
2611
|
+
}
|
|
2612
|
+
function Yr() {
|
|
2613
|
+
return { "--wcm-accent-color": "#3396FF", "--wcm-accent-fill-color": "#FFFFFF", "--wcm-z-index": "89", "--wcm-background-color": "#3396FF", "--wcm-background-border-radius": "8px", "--wcm-container-border-radius": "30px", "--wcm-wallet-icon-border-radius": "15px", "--wcm-wallet-icon-large-border-radius": "30px", "--wcm-wallet-icon-small-border-radius": "7px", "--wcm-input-border-radius": "28px", "--wcm-button-border-radius": "10px", "--wcm-notification-border-radius": "36px", "--wcm-secondary-button-border-radius": "28px", "--wcm-icon-button-border-radius": "50%", "--wcm-button-hover-highlight-border-radius": "10px", "--wcm-text-big-bold-size": "20px", "--wcm-text-big-bold-weight": "600", "--wcm-text-big-bold-line-height": "24px", "--wcm-text-big-bold-letter-spacing": "-0.03em", "--wcm-text-big-bold-text-transform": "none", "--wcm-text-xsmall-bold-size": "10px", "--wcm-text-xsmall-bold-weight": "700", "--wcm-text-xsmall-bold-line-height": "12px", "--wcm-text-xsmall-bold-letter-spacing": "0.02em", "--wcm-text-xsmall-bold-text-transform": "uppercase", "--wcm-text-xsmall-regular-size": "12px", "--wcm-text-xsmall-regular-weight": "600", "--wcm-text-xsmall-regular-line-height": "14px", "--wcm-text-xsmall-regular-letter-spacing": "-0.03em", "--wcm-text-xsmall-regular-text-transform": "none", "--wcm-text-small-thin-size": "14px", "--wcm-text-small-thin-weight": "500", "--wcm-text-small-thin-line-height": "16px", "--wcm-text-small-thin-letter-spacing": "-0.03em", "--wcm-text-small-thin-text-transform": "none", "--wcm-text-small-regular-size": "14px", "--wcm-text-small-regular-weight": "600", "--wcm-text-small-regular-line-height": "16px", "--wcm-text-small-regular-letter-spacing": "-0.03em", "--wcm-text-small-regular-text-transform": "none", "--wcm-text-medium-regular-size": "16px", "--wcm-text-medium-regular-weight": "600", "--wcm-text-medium-regular-line-height": "20px", "--wcm-text-medium-regular-letter-spacing": "-0.03em", "--wcm-text-medium-regular-text-transform": "none", "--wcm-font-family": "-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif", "--wcm-font-feature-settings": "'tnum' on, 'lnum' on, 'case' on", "--wcm-success-color": "rgb(38,181,98)", "--wcm-error-color": "rgb(242, 90, 103)", "--wcm-overlay-background-color": "rgba(0, 0, 0, 0.3)", "--wcm-overlay-backdrop-filter": "none" };
|
|
2614
|
+
}
|
|
2615
|
+
const O = { getPreset(e) {
|
|
2616
|
+
return Yr()[e];
|
|
2617
|
+
}, setTheme() {
|
|
2618
|
+
const e = document.querySelector(":root"), { themeVariables: t } = _t.state;
|
|
2619
|
+
if (e) {
|
|
2620
|
+
const r = De(De(De({}, Di()), Yr()), t);
|
|
2621
|
+
Object.entries(r).forEach(([n, o]) => e.style.setProperty(n, o));
|
|
2622
|
+
}
|
|
2623
|
+
}, globalCss: I`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button wcm-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--wcm-accent-fill-color);background:var(--wcm-accent-color)}` }, Ui = I`button{border-radius:var(--wcm-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--wcm-accent-color)}button path{fill:var(--wcm-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--wcm-color-overlay)}button:disabled::after{background-color:transparent}.wcm-icon-left svg{margin-right:5px}.wcm-icon-right svg{margin-left:5px}button:active::after{background-color:var(--wcm-color-overlay)}.wcm-ghost,.wcm-ghost:active::after,.wcm-outline{background-color:transparent}.wcm-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}.wcm-ghost:hover::after{background-color:transparent}.wcm-ghost:hover{opacity:.5}}button:disabled{background-color:var(--wcm-color-bg-3);pointer-events:none}.wcm-ghost::after{border-color:transparent}.wcm-ghost path{fill:var(--wcm-color-fg-2)}.wcm-outline path{fill:var(--wcm-accent-color)}.wcm-outline:disabled{background-color:transparent;opacity:.5}`;
|
|
2624
|
+
var ji = Object.defineProperty, Wi = Object.getOwnPropertyDescriptor, wt = (e, t, r, n) => {
|
|
2625
|
+
for (var o = n > 1 ? void 0 : n ? Wi(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
2626
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
2627
|
+
return n && o && ji(t, r, o), o;
|
|
2628
|
+
};
|
|
2629
|
+
let Q = class extends A {
|
|
2630
|
+
constructor() {
|
|
2631
|
+
super(...arguments), this.disabled = !1, this.iconLeft = void 0, this.iconRight = void 0, this.onClick = () => null, this.variant = "default";
|
|
2632
|
+
}
|
|
2633
|
+
render() {
|
|
2634
|
+
const e = { "wcm-icon-left": this.iconLeft !== void 0, "wcm-icon-right": this.iconRight !== void 0, "wcm-ghost": this.variant === "ghost", "wcm-outline": this.variant === "outline" };
|
|
2635
|
+
let t = "inverse";
|
|
2636
|
+
return this.variant === "ghost" && (t = "secondary"), this.variant === "outline" && (t = "accent"), m`<button class="${G(e)}" ?disabled="${this.disabled}" @click="${this.onClick}">${this.iconLeft}<wcm-text variant="small-regular" color="${t}"><slot></slot></wcm-text>${this.iconRight}</button>`;
|
|
2637
|
+
}
|
|
2638
|
+
};
|
|
2639
|
+
Q.styles = [O.globalCss, Ui], wt([$({ type: Boolean })], Q.prototype, "disabled", 2), wt([$()], Q.prototype, "iconLeft", 2), wt([$()], Q.prototype, "iconRight", 2), wt([$()], Q.prototype, "onClick", 2), wt([$()], Q.prototype, "variant", 2), Q = wt([k("wcm-button")], Q);
|
|
2640
|
+
const Hi = I`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--wcm-button-border-radius);color:var(--wcm-accent-fill-color);background-color:var(--wcm-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--wcm-color-overlay)}button:active::after{background-color:var(--wcm-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--wcm-color-bg-3);color:var(--wcm-color-fg-3)}.wcm-secondary{color:var(--wcm-accent-color);background-color:transparent}.wcm-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}}`;
|
|
2641
|
+
var zi = Object.defineProperty, Fi = Object.getOwnPropertyDescriptor, Ue = (e, t, r, n) => {
|
|
2642
|
+
for (var o = n > 1 ? void 0 : n ? Fi(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
2643
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
2644
|
+
return n && o && zi(t, r, o), o;
|
|
2645
|
+
};
|
|
2646
|
+
let Lt = class extends A {
|
|
2647
|
+
constructor() {
|
|
2648
|
+
super(...arguments), this.disabled = !1, this.variant = "primary";
|
|
2649
|
+
}
|
|
2650
|
+
render() {
|
|
2651
|
+
const e = { "wcm-secondary": this.variant === "secondary" };
|
|
2652
|
+
return m`<button ?disabled="${this.disabled}" class="${G(e)}"><slot></slot></button>`;
|
|
2653
|
+
}
|
|
2654
|
+
};
|
|
2655
|
+
Lt.styles = [O.globalCss, Hi], Ue([$({ type: Boolean })], Lt.prototype, "disabled", 2), Ue([$()], Lt.prototype, "variant", 2), Lt = Ue([k("wcm-button-big")], Lt);
|
|
2656
|
+
const Zi = I`:host{background-color:var(--wcm-color-bg-2);border-top:1px solid var(--wcm-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`;
|
|
2657
|
+
var Vi = Object.defineProperty, Ki = Object.getOwnPropertyDescriptor, qi = (e, t, r, n) => {
|
|
2658
|
+
for (var o = n > 1 ? void 0 : n ? Ki(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
2659
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
2660
|
+
return n && o && Vi(t, r, o), o;
|
|
2661
|
+
};
|
|
2662
|
+
let je = class extends A {
|
|
2663
|
+
render() {
|
|
2664
|
+
return m`<div><slot></slot></div>`;
|
|
2665
|
+
}
|
|
2666
|
+
};
|
|
2667
|
+
je.styles = [O.globalCss, Zi], je = qi([k("wcm-info-footer")], je);
|
|
2668
|
+
const T = { CROSS_ICON: L`<svg width="12" height="12" viewBox="0 0 12 12"><path d="M9.94 11A.75.75 0 1 0 11 9.94L7.414 6.353a.5.5 0 0 1 0-.708L11 2.061A.75.75 0 1 0 9.94 1L6.353 4.586a.5.5 0 0 1-.708 0L2.061 1A.75.75 0 0 0 1 2.06l3.586 3.586a.5.5 0 0 1 0 .708L1 9.939A.75.75 0 1 0 2.06 11l3.586-3.586a.5.5 0 0 1 .708 0L9.939 11Z" fill="#fff"/></svg>`, WALLET_CONNECT_LOGO: L`<svg width="178" height="29" viewBox="0 0 178 29" id="wcm-wc-logo"><path d="M10.683 7.926c5.284-5.17 13.85-5.17 19.134 0l.636.623a.652.652 0 0 1 0 .936l-2.176 2.129a.343.343 0 0 1-.478 0l-.875-.857c-3.686-3.607-9.662-3.607-13.348 0l-.937.918a.343.343 0 0 1-.479 0l-2.175-2.13a.652.652 0 0 1 0-.936l.698-.683Zm23.633 4.403 1.935 1.895a.652.652 0 0 1 0 .936l-8.73 8.543a.687.687 0 0 1-.956 0L20.37 17.64a.172.172 0 0 0-.239 0l-6.195 6.063a.687.687 0 0 1-.957 0l-8.73-8.543a.652.652 0 0 1 0-.936l1.936-1.895a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .239 0l6.195-6.064a.687.687 0 0 1 .957 0l6.196 6.064a.172.172 0 0 0 .24 0l6.195-6.064a.687.687 0 0 1 .956 0ZM48.093 20.948l2.338-9.355c.139-.515.258-1.07.416-1.942.12.872.258 1.427.357 1.942l2.022 9.355h4.181l3.528-13.874h-3.21l-1.943 8.523a24.825 24.825 0 0 0-.456 2.457c-.158-.931-.317-1.625-.495-2.438l-1.883-8.542h-4.201l-2.042 8.542a41.204 41.204 0 0 0-.475 2.438 41.208 41.208 0 0 0-.476-2.438l-1.903-8.542h-3.349l3.508 13.874h4.083ZM63.33 21.304c1.585 0 2.596-.654 3.11-1.605-.059.297-.078.595-.078.892v.357h2.655V15.22c0-2.735-1.248-4.32-4.3-4.32-2.636 0-4.36 1.466-4.52 3.487h2.914c.1-.891.734-1.426 1.705-1.426.911 0 1.407.515 1.407 1.11 0 .435-.258.693-1.03.792l-1.388.159c-2.061.257-3.825 1.01-3.825 3.19 0 1.982 1.645 3.092 3.35 3.092Zm.891-2.041c-.773 0-1.348-.436-1.348-1.19 0-.733.655-1.09 1.645-1.268l.674-.119c.575-.118.892-.218 1.09-.396v.912c0 1.228-.892 2.06-2.06 2.06ZM70.398 7.074v13.874h2.874V7.074h-2.874ZM74.934 7.074v13.874h2.874V7.074h-2.874ZM84.08 21.304c2.735 0 4.5-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922H81.92ZM94.92 21.146c.633 0 1.248-.1 1.525-.179v-2.18c-.218.04-.475.06-.693.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.338v-2.24h-2.338V7.788H91.47v3.448H89.37v2.24h2.1v4.201c0 2.3 1.15 3.469 3.45 3.469ZM104.62 21.304c3.924 0 6.302-2.299 6.599-5.608h-3.111c-.238 1.803-1.506 3.032-3.369 3.032-2.2 0-3.746-1.784-3.746-4.796 0-2.953 1.605-4.638 3.805-4.638 1.883 0 2.953 1.15 3.171 2.834h3.191c-.317-3.448-2.854-5.41-6.342-5.41-3.984 0-7.036 2.695-7.036 7.214 0 4.677 2.676 7.372 6.838 7.372ZM117.449 21.304c2.993 0 5.114-1.882 5.114-5.172 0-3.23-2.121-5.233-5.114-5.233-2.972 0-5.093 2.002-5.093 5.233 0 3.29 2.101 5.172 5.093 5.172Zm0-2.22c-1.327 0-2.18-1.09-2.18-2.952 0-1.903.892-2.973 2.18-2.973 1.308 0 2.2 1.07 2.2 2.973 0 1.862-.872 2.953-2.2 2.953ZM126.569 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.229-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM137.464 20.948v-5.689c0-1.208.753-2.1 1.823-2.1 1.011 0 1.606.773 1.606 2.06v5.729h2.873v-6.144c0-2.339-1.228-3.905-3.428-3.905-1.526 0-2.458.734-2.953 1.606a5.31 5.31 0 0 0 .079-.892v-.377h-2.874v9.712h2.874ZM149.949 21.304c2.735 0 4.499-1.546 4.697-3.567h-2.893c-.139.892-.892 1.387-1.804 1.387-1.228 0-2.12-.99-2.14-2.358h6.897v-.555c0-3.21-1.764-5.312-4.816-5.312-2.933 0-4.994 2.062-4.994 5.173 0 3.37 2.12 5.232 5.053 5.232Zm-2.16-6.421c.119-1.11.932-1.922 2.081-1.922 1.11 0 1.883.772 1.903 1.922h-3.984ZM160.876 21.304c3.013 0 4.658-1.645 4.975-4.201h-2.874c-.099 1.07-.713 1.982-2.001 1.982-1.309 0-2.2-1.21-2.2-2.993 0-1.942 1.03-2.933 2.259-2.933 1.209 0 1.803.872 1.883 1.882h2.873c-.218-2.358-1.823-4.142-4.776-4.142-2.874 0-5.153 1.903-5.153 5.193 0 3.25 1.923 5.212 5.014 5.212ZM172.067 21.146c.634 0 1.248-.1 1.526-.179v-2.18c-.218.04-.476.06-.694.06-1.05 0-1.427-.595-1.427-1.566v-3.805h2.339v-2.24h-2.339V7.788h-2.854v3.448h-2.1v2.24h2.1v4.201c0 2.3 1.15 3.469 3.449 3.469Z" fill="#fff"/></svg>`, WALLET_CONNECT_ICON: L`<svg width="28" height="20" viewBox="0 0 28 20"><g clip-path="url(#a)"><path d="M7.386 6.482c3.653-3.576 9.575-3.576 13.228 0l.44.43a.451.451 0 0 1 0 .648L19.55 9.033a.237.237 0 0 1-.33 0l-.606-.592c-2.548-2.496-6.68-2.496-9.228 0l-.648.634a.237.237 0 0 1-.33 0L6.902 7.602a.451.451 0 0 1 0-.647l.483-.473Zm16.338 3.046 1.339 1.31a.451.451 0 0 1 0 .648l-6.035 5.909a.475.475 0 0 1-.662 0L14.083 13.2a.119.119 0 0 0-.166 0l-4.283 4.194a.475.475 0 0 1-.662 0l-6.035-5.91a.451.451 0 0 1 0-.647l1.338-1.31a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0l4.283 4.194c.046.044.12.044.166 0l4.283-4.194a.475.475 0 0 1 .662 0Z" fill="#000000"/></g><defs><clipPath id="a"><path fill="#ffffff" d="M0 0h28v20H0z"/></clipPath></defs></svg>`, WALLET_CONNECT_ICON_COLORED: L`<svg width="96" height="96" fill="none"><path fill="#fff" d="M25.322 33.597c12.525-12.263 32.83-12.263 45.355 0l1.507 1.476a1.547 1.547 0 0 1 0 2.22l-5.156 5.048a.814.814 0 0 1-1.134 0l-2.074-2.03c-8.737-8.555-22.903-8.555-31.64 0l-2.222 2.175a.814.814 0 0 1-1.134 0l-5.156-5.049a1.547 1.547 0 0 1 0-2.22l1.654-1.62Zm56.019 10.44 4.589 4.494a1.547 1.547 0 0 1 0 2.22l-20.693 20.26a1.628 1.628 0 0 1-2.267 0L48.283 56.632a.407.407 0 0 0-.567 0L33.03 71.012a1.628 1.628 0 0 1-2.268 0L10.07 50.75a1.547 1.547 0 0 1 0-2.22l4.59-4.494a1.628 1.628 0 0 1 2.267 0l14.687 14.38c.156.153.41.153.567 0l14.685-14.38a1.628 1.628 0 0 1 2.268 0l14.687 14.38c.156.153.41.153.567 0l14.686-14.38a1.628 1.628 0 0 1 2.268 0Z"/><path stroke="#000" d="M25.672 33.954c12.33-12.072 32.325-12.072 44.655 0l1.508 1.476a1.047 1.047 0 0 1 0 1.506l-5.157 5.048a.314.314 0 0 1-.434 0l-2.074-2.03c-8.932-8.746-23.409-8.746-32.34 0l-2.222 2.174a.314.314 0 0 1-.434 0l-5.157-5.048a1.047 1.047 0 0 1 0-1.506l1.655-1.62Zm55.319 10.44 4.59 4.494a1.047 1.047 0 0 1 0 1.506l-20.694 20.26a1.128 1.128 0 0 1-1.568 0l-14.686-14.38a.907.907 0 0 0-1.267 0L32.68 70.655a1.128 1.128 0 0 1-1.568 0L10.42 50.394a1.047 1.047 0 0 1 0-1.506l4.59-4.493a1.128 1.128 0 0 1 1.567 0l14.687 14.379a.907.907 0 0 0 1.266 0l-.35-.357.35.357 14.686-14.38a1.128 1.128 0 0 1 1.568 0l14.687 14.38a.907.907 0 0 0 1.267 0l14.686-14.38a1.128 1.128 0 0 1 1.568 0Z"/></svg>`, BACK_ICON: L`<svg width="10" height="18" viewBox="0 0 10 18"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.735.179a.75.75 0 0 1 .087 1.057L2.92 8.192a1.25 1.25 0 0 0 0 1.617l5.902 6.956a.75.75 0 1 1-1.144.97L1.776 10.78a2.75 2.75 0 0 1 0-3.559L7.678.265A.75.75 0 0 1 8.735.18Z" fill="#fff"/></svg>`, COPY_ICON: L`<svg width="24" height="24" fill="none"><path fill="#fff" fill-rule="evenodd" d="M7.01 7.01c.03-1.545.138-2.5.535-3.28A5 5 0 0 1 9.73 1.545C10.8 1 12.2 1 15 1c2.8 0 4.2 0 5.27.545a5 5 0 0 1 2.185 2.185C23 4.8 23 6.2 23 9c0 2.8 0 4.2-.545 5.27a5 5 0 0 1-2.185 2.185c-.78.397-1.735.505-3.28.534l-.001.01c-.03 1.54-.138 2.493-.534 3.27a5 5 0 0 1-2.185 2.186C13.2 23 11.8 23 9 23c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C1 19.2 1 17.8 1 15c0-2.8 0-4.2.545-5.27A5 5 0 0 1 3.73 7.545C4.508 7.149 5.46 7.04 7 7.01h.01ZM15 15.5c-1.425 0-2.403-.001-3.162-.063-.74-.06-1.139-.172-1.427-.319a3.5 3.5 0 0 1-1.53-1.529c-.146-.288-.257-.686-.318-1.427C8.501 11.403 8.5 10.425 8.5 9c0-1.425.001-2.403.063-3.162.06-.74.172-1.139.318-1.427a3.5 3.5 0 0 1 1.53-1.53c.288-.146.686-.257 1.427-.318.759-.062 1.737-.063 3.162-.063 1.425 0 2.403.001 3.162.063.74.06 1.139.172 1.427.318a3.5 3.5 0 0 1 1.53 1.53c.146.288.257.686.318 1.427.062.759.063 1.737.063 3.162 0 1.425-.001 2.403-.063 3.162-.06.74-.172 1.139-.319 1.427a3.5 3.5 0 0 1-1.529 1.53c-.288.146-.686.257-1.427.318-.759.062-1.737.063-3.162.063ZM7 8.511c-.444.009-.825.025-1.162.052-.74.06-1.139.172-1.427.318a3.5 3.5 0 0 0-1.53 1.53c-.146.288-.257.686-.318 1.427-.062.759-.063 1.737-.063 3.162 0 1.425.001 2.403.063 3.162.06.74.172 1.139.318 1.427a3.5 3.5 0 0 0 1.53 1.53c.288.146.686.257 1.427.318.759.062 1.737.063 3.162.063 1.425 0 2.403-.001 3.162-.063.74-.06 1.139-.172 1.427-.319a3.5 3.5 0 0 0 1.53-1.53c.146-.287.257-.685.318-1.426.027-.337.043-.718.052-1.162H15c-2.8 0-4.2 0-5.27-.545a5 5 0 0 1-2.185-2.185C7 13.2 7 11.8 7 9v-.489Z" clip-rule="evenodd"/></svg>`, RETRY_ICON: L`<svg width="15" height="16" viewBox="0 0 15 16"><path d="M6.464 2.03A.75.75 0 0 0 5.403.97L2.08 4.293a1 1 0 0 0 0 1.414L5.403 9.03a.75.75 0 0 0 1.06-1.06L4.672 6.177a.25.25 0 0 1 .177-.427h2.085a4 4 0 1 1-3.93 4.746c-.077-.407-.405-.746-.82-.746-.414 0-.755.338-.7.748a5.501 5.501 0 1 0 5.45-6.248H4.848a.25.25 0 0 1-.177-.427L6.464 2.03Z" fill="#fff"/></svg>`, DESKTOP_ICON: L`<svg width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 5.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C2.204 1 3.13 1 4.98 1h6.04c1.85 0 2.775 0 3.466.394a3 3 0 0 1 1.12 1.12C16 3.204 16 4.13 16 5.98v1.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C13.796 12 12.87 12 11.02 12H4.98c-1.85 0-2.775 0-3.466-.394a3 3 0 0 1-1.12-1.12C0 9.796 0 8.87 0 7.02V5.98ZM4.98 2.5h6.04c.953 0 1.568.001 2.034.043.446.04.608.108.69.154a1.5 1.5 0 0 1 .559.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033v1.04c0 .952-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.046-.243.114-.69.154-.466.042-1.08.043-2.033.043H4.98c-.952 0-1.568-.001-2.034-.043-.446-.04-.608-.108-.69-.154a1.5 1.5 0 0 1-.559-.56c-.046-.08-.114-.243-.154-.69-.042-.465-.043-1.08-.043-2.033V5.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.046.243-.114.69-.154.465-.042 1.08-.043 2.033-.043Z" fill="#fff"/><path d="M4 14.25a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`, MOBILE_ICON: L`<svg width="16" height="16" viewBox="0 0 16 16"><path d="M6.75 5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3 4.98c0-1.85 0-2.775.394-3.466a3 3 0 0 1 1.12-1.12C5.204 0 6.136 0 8 0s2.795 0 3.486.394a3 3 0 0 1 1.12 1.12C13 2.204 13 3.13 13 4.98v6.04c0 1.85 0 2.775-.394 3.466a3 3 0 0 1-1.12 1.12C10.796 16 9.864 16 8 16s-2.795 0-3.486-.394a3 3 0 0 1-1.12-1.12C3 13.796 3 12.87 3 11.02V4.98Zm8.5 0v6.04c0 .953-.001 1.568-.043 2.034-.04.446-.108.608-.154.69a1.499 1.499 0 0 1-.56.559c-.08.045-.242.113-.693.154-.47.042-1.091.043-2.05.043-.959 0-1.58-.001-2.05-.043-.45-.04-.613-.109-.693-.154a1.5 1.5 0 0 1-.56-.56c-.046-.08-.114-.243-.154-.69-.042-.466-.043-1.08-.043-2.033V4.98c0-.952.001-1.568.043-2.034.04-.446.108-.608.154-.69a1.5 1.5 0 0 1 .56-.559c.08-.045.243-.113.693-.154C6.42 1.501 7.041 1.5 8 1.5c.959 0 1.58.001 2.05.043.45.04.613.109.693.154a1.5 1.5 0 0 1 .56.56c.046.08.114.243.154.69.042.465.043 1.08.043 2.033Z" fill="#fff"/></svg>`, ARROW_DOWN_ICON: L`<svg width="14" height="14" viewBox="0 0 14 14"><path d="M2.28 7.47a.75.75 0 0 0-1.06 1.06l5.25 5.25a.75.75 0 0 0 1.06 0l5.25-5.25a.75.75 0 0 0-1.06-1.06l-3.544 3.543a.25.25 0 0 1-.426-.177V.75a.75.75 0 0 0-1.5 0v10.086a.25.25 0 0 1-.427.176L2.28 7.47Z" fill="#fff"/></svg>`, ARROW_UP_RIGHT_ICON: L`<svg width="15" height="14" fill="none"><path d="M4.5 1.75A.75.75 0 0 1 5.25 1H12a1.5 1.5 0 0 1 1.5 1.5v6.75a.75.75 0 0 1-1.5 0V4.164a.25.25 0 0 0-.427-.176L4.061 11.5A.75.75 0 0 1 3 10.44l7.513-7.513a.25.25 0 0 0-.177-.427H5.25a.75.75 0 0 1-.75-.75Z" fill="#fff"/></svg>`, ARROW_RIGHT_ICON: L`<svg width="6" height="14" viewBox="0 0 6 14"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.181 1.099a.75.75 0 0 1 1.024.279l2.433 4.258a2.75 2.75 0 0 1 0 2.729l-2.433 4.257a.75.75 0 1 1-1.303-.744L4.335 7.62a1.25 1.25 0 0 0 0-1.24L1.902 2.122a.75.75 0 0 1 .28-1.023Z" fill="#fff"/></svg>`, QRCODE_ICON: L`<svg width="25" height="24" viewBox="0 0 25 24"><path d="M23.748 9a.748.748 0 0 0 .748-.752c-.018-2.596-.128-4.07-.784-5.22a6 6 0 0 0-2.24-2.24c-1.15-.656-2.624-.766-5.22-.784a.748.748 0 0 0-.752.748c0 .414.335.749.748.752 1.015.007 1.82.028 2.494.088.995.09 1.561.256 1.988.5.7.398 1.28.978 1.679 1.678.243.427.41.993.498 1.988.061.675.082 1.479.09 2.493a.753.753 0 0 0 .75.749ZM3.527.788C4.677.132 6.152.022 8.747.004A.748.748 0 0 1 9.5.752a.753.753 0 0 1-.749.752c-1.014.007-1.818.028-2.493.088-.995.09-1.561.256-1.988.5-.7.398-1.28.978-1.679 1.678-.243.427-.41.993-.499 1.988-.06.675-.081 1.479-.088 2.493A.753.753 0 0 1 1.252 9a.748.748 0 0 1-.748-.752c.018-2.596.128-4.07.784-5.22a6 6 0 0 1 2.24-2.24ZM1.252 15a.748.748 0 0 0-.748.752c.018 2.596.128 4.07.784 5.22a6 6 0 0 0 2.24 2.24c1.15.656 2.624.766 5.22.784a.748.748 0 0 0 .752-.748.753.753 0 0 0-.749-.752c-1.014-.007-1.818-.028-2.493-.089-.995-.089-1.561-.255-1.988-.498a4.5 4.5 0 0 1-1.679-1.68c-.243-.426-.41-.992-.499-1.987-.06-.675-.081-1.479-.088-2.493A.753.753 0 0 0 1.252 15ZM22.996 15.749a.753.753 0 0 1 .752-.749c.415 0 .751.338.748.752-.018 2.596-.128 4.07-.784 5.22a6 6 0 0 1-2.24 2.24c-1.15.656-2.624.766-5.22.784a.748.748 0 0 1-.752-.748c0-.414.335-.749.748-.752 1.015-.007 1.82-.028 2.494-.089.995-.089 1.561-.255 1.988-.498a4.5 4.5 0 0 0 1.679-1.68c.243-.426.41-.992.498-1.987.061-.675.082-1.479.09-2.493Z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 4a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 11h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 4H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1ZM13.5 6.5A2.5 2.5 0 0 1 16 4h2a2.5 2.5 0 0 1 2.5 2.5v2A2.5 2.5 0 0 1 18 11h-2a2.5 2.5 0 0 1-2.5-2.5v-2Zm2.5-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1ZM7 13a2.5 2.5 0 0 0-2.5 2.5v2A2.5 2.5 0 0 0 7 20h2a2.5 2.5 0 0 0 2.5-2.5v-2A2.5 2.5 0 0 0 9 13H7Zm2 1.5H7a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1Z" fill="#fff"/><path d="M13.5 15.5c0-.465 0-.697.038-.89a2 2 0 0 1 1.572-1.572C15.303 13 15.535 13 16 13v2.5h-2.5ZM18 13c.465 0 .697 0 .89.038a2 2 0 0 1 1.572 1.572c.038.193.038.425.038.89H18V13ZM18 17.5h2.5c0 .465 0 .697-.038.89a2 2 0 0 1-1.572 1.572C18.697 20 18.465 20 18 20v-2.5ZM13.5 17.5H16V20c-.465 0-.697 0-.89-.038a2 2 0 0 1-1.572-1.572c-.038-.193-.038-.425-.038-.89Z" fill="#fff"/></svg>`, SCAN_ICON: L`<svg width="16" height="16" fill="none"><path fill="#fff" d="M10 15.216c0 .422.347.763.768.74 1.202-.064 2.025-.222 2.71-.613a5.001 5.001 0 0 0 1.865-1.866c.39-.684.549-1.507.613-2.709a.735.735 0 0 0-.74-.768.768.768 0 0 0-.76.732c-.009.157-.02.306-.032.447-.073.812-.206 1.244-.384 1.555-.31.545-.761.996-1.306 1.306-.311.178-.743.311-1.555.384-.141.013-.29.023-.447.032a.768.768 0 0 0-.732.76ZM10 .784c0 .407.325.737.732.76.157.009.306.02.447.032.812.073 1.244.206 1.555.384a3.5 3.5 0 0 1 1.306 1.306c.178.311.311.743.384 1.555.013.142.023.29.032.447a.768.768 0 0 0 .76.732.734.734 0 0 0 .74-.768c-.064-1.202-.222-2.025-.613-2.71A5 5 0 0 0 13.477.658c-.684-.39-1.507-.549-2.709-.613a.735.735 0 0 0-.768.74ZM5.232.044A.735.735 0 0 1 6 .784a.768.768 0 0 1-.732.76c-.157.009-.305.02-.447.032-.812.073-1.244.206-1.555.384A3.5 3.5 0 0 0 1.96 3.266c-.178.311-.311.743-.384 1.555-.013.142-.023.29-.032.447A.768.768 0 0 1 .784 6a.735.735 0 0 1-.74-.768c.064-1.202.222-2.025.613-2.71A5 5 0 0 1 2.523.658C3.207.267 4.03.108 5.233.044ZM5.268 14.456a.768.768 0 0 1 .732.76.734.734 0 0 1-.768.74c-1.202-.064-2.025-.222-2.71-.613a5 5 0 0 1-1.865-1.866c-.39-.684-.549-1.507-.613-2.709A.735.735 0 0 1 .784 10c.407 0 .737.325.76.732.009.157.02.306.032.447.073.812.206 1.244.384 1.555a3.5 3.5 0 0 0 1.306 1.306c.311.178.743.311 1.555.384.142.013.29.023.447.032Z"/></svg>`, CHECKMARK_ICON: L`<svg width="13" height="12" viewBox="0 0 13 12"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.155.132a.75.75 0 0 1 .232 1.035L5.821 11.535a1 1 0 0 1-1.626.09L.665 7.21a.75.75 0 1 1 1.17-.937L4.71 9.867a.25.25 0 0 0 .406-.023L11.12.364a.75.75 0 0 1 1.035-.232Z" fill="#fff"/></svg>`, SEARCH_ICON: L`<svg width="20" height="21"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.432 13.992c-.354-.353-.91-.382-1.35-.146a5.5 5.5 0 1 1 2.265-2.265c-.237.441-.208.997.145 1.35l3.296 3.296a.75.75 0 1 1-1.06 1.061l-3.296-3.296Zm.06-5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z" fill="#949E9E"/></svg>`, WALLET_PLACEHOLDER: L`<svg width="60" height="60" fill="none" viewBox="0 0 60 60"><g clip-path="url(#q)"><path id="wallet-placeholder-fill" fill="#fff" d="M0 24.9c0-9.251 0-13.877 1.97-17.332a15 15 0 0 1 5.598-5.597C11.023 0 15.648 0 24.9 0h10.2c9.252 0 13.877 0 17.332 1.97a15 15 0 0 1 5.597 5.598C60 11.023 60 15.648 60 24.9v10.2c0 9.252 0 13.877-1.97 17.332a15.001 15.001 0 0 1-5.598 5.597C48.977 60 44.352 60 35.1 60H24.9c-9.251 0-13.877 0-17.332-1.97a15 15 0 0 1-5.597-5.598C0 48.977 0 44.352 0 35.1V24.9Z"/><path id="wallet-placeholder-dash" stroke="#000" stroke-dasharray="4 4" stroke-width="1.5" d="M.04 41.708a231.598 231.598 0 0 1-.039-4.403l.75-.001L.75 35.1v-2.55H0v-5.1h.75V24.9l.001-2.204h-.75c.003-1.617.011-3.077.039-4.404l.75.016c.034-1.65.099-3.08.218-4.343l-.746-.07c.158-1.678.412-3.083.82-4.316l.713.236c.224-.679.497-1.296.827-1.875a14.25 14.25 0 0 1 1.05-1.585L3.076 5.9A15 15 0 0 1 5.9 3.076l.455.596a14.25 14.25 0 0 1 1.585-1.05c.579-.33 1.196-.603 1.875-.827l-.236-.712C10.812.674 12.217.42 13.895.262l.07.746C15.23.89 16.66.824 18.308.79l-.016-.75C19.62.012 21.08.004 22.695.001l.001.75L24.9.75h2.55V0h5.1v.75h2.55l2.204.001v-.75c1.617.003 3.077.011 4.404.039l-.016.75c1.65.034 3.08.099 4.343.218l.07-.746c1.678.158 3.083.412 4.316.82l-.236.713c.679.224 1.296.497 1.875.827a14.24 14.24 0 0 1 1.585 1.05l.455-.596A14.999 14.999 0 0 1 56.924 5.9l-.596.455c.384.502.735 1.032 1.05 1.585.33.579.602 1.196.827 1.875l.712-.236c.409 1.233.663 2.638.822 4.316l-.747.07c.119 1.264.184 2.694.218 4.343l.75-.016c.028 1.327.036 2.787.039 4.403l-.75.001.001 2.204v2.55H60v5.1h-.75v2.55l-.001 2.204h.75a231.431 231.431 0 0 1-.039 4.404l-.75-.016c-.034 1.65-.099 3.08-.218 4.343l.747.07c-.159 1.678-.413 3.083-.822 4.316l-.712-.236a10.255 10.255 0 0 1-.827 1.875 14.242 14.242 0 0 1-1.05 1.585l.596.455a14.997 14.997 0 0 1-2.824 2.824l-.455-.596c-.502.384-1.032.735-1.585 1.05-.579.33-1.196.602-1.875.827l.236.712c-1.233.409-2.638.663-4.316.822l-.07-.747c-1.264.119-2.694.184-4.343.218l.016.75c-1.327.028-2.787.036-4.403.039l-.001-.75-2.204.001h-2.55V60h-5.1v-.75H24.9l-2.204-.001v.75a231.431 231.431 0 0 1-4.404-.039l.016-.75c-1.65-.034-3.08-.099-4.343-.218l-.07.747c-1.678-.159-3.083-.413-4.316-.822l.236-.712a10.258 10.258 0 0 1-1.875-.827 14.252 14.252 0 0 1-1.585-1.05l-.455.596A14.999 14.999 0 0 1 3.076 54.1l.596-.455a14.24 14.24 0 0 1-1.05-1.585 10.259 10.259 0 0 1-.827-1.875l-.712.236C.674 49.188.42 47.783.262 46.105l.746-.07C.89 44.77.824 43.34.79 41.692l-.75.016Z"/><path fill="#fff" fill-rule="evenodd" d="M35.643 32.145c-.297-.743-.445-1.114-.401-1.275a.42.42 0 0 1 .182-.27c.134-.1.463-.1 1.123-.1.742 0 1.499.046 2.236-.05a6 6 0 0 0 5.166-5.166c.051-.39.051-.855.051-1.784 0-.928 0-1.393-.051-1.783a6 6 0 0 0-5.166-5.165c-.39-.052-.854-.052-1.783-.052h-7.72c-4.934 0-7.401 0-9.244 1.051a8 8 0 0 0-2.985 2.986C16.057 22.28 16.003 24.58 16 29 15.998 31.075 16 33.15 16 35.224A7.778 7.778 0 0 0 23.778 43H28.5c1.394 0 2.09 0 2.67-.116a6 6 0 0 0 4.715-4.714c.115-.58.115-1.301.115-2.744 0-1.31 0-1.964-.114-2.49a4.998 4.998 0 0 0-.243-.792Z" clip-rule="evenodd"/><path fill="#9EA9A9" fill-rule="evenodd" d="M37 18h-7.72c-2.494 0-4.266.002-5.647.126-1.361.122-2.197.354-2.854.728a6.5 6.5 0 0 0-2.425 2.426c-.375.657-.607 1.492-.729 2.853-.11 1.233-.123 2.777-.125 4.867 0 .7 0 1.05.097 1.181.096.13.182.181.343.2.163.02.518-.18 1.229-.581a6.195 6.195 0 0 1 3.053-.8H37c.977 0 1.32-.003 1.587-.038a4.5 4.5 0 0 0 3.874-3.874c.036-.268.039-.611.039-1.588 0-.976-.003-1.319-.038-1.587a4.5 4.5 0 0 0-3.875-3.874C38.32 18.004 37.977 18 37 18Zm-7.364 12.5h-7.414a4.722 4.722 0 0 0-4.722 4.723 6.278 6.278 0 0 0 6.278 6.278H28.5c1.466 0 1.98-.008 2.378-.087a4.5 4.5 0 0 0 3.535-3.536c.08-.397.087-.933.087-2.451 0-1.391-.009-1.843-.08-2.17a3.5 3.5 0 0 0-2.676-2.676c-.328-.072-.762-.08-2.108-.08Z" clip-rule="evenodd"/></g><defs><clipPath id="q"><path fill="#fff" d="M0 0h60v60H0z"/></clipPath></defs></svg>`, GLOBE_ICON: L`<svg width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="#fff" fill-rule="evenodd" d="M15.5 8a7.5 7.5 0 1 1-15 0 7.5 7.5 0 0 1 15 0Zm-2.113.75c.301 0 .535.264.47.558a6.01 6.01 0 0 1-2.867 3.896c-.203.116-.42-.103-.334-.32.409-1.018.691-2.274.797-3.657a.512.512 0 0 1 .507-.477h1.427Zm.47-2.058c.065.294-.169.558-.47.558H11.96a.512.512 0 0 1-.507-.477c-.106-1.383-.389-2.638-.797-3.656-.087-.217.13-.437.333-.32a6.01 6.01 0 0 1 2.868 3.895Zm-4.402.558c.286 0 .515-.24.49-.525-.121-1.361-.429-2.534-.83-3.393-.279-.6-.549-.93-.753-1.112a.535.535 0 0 0-.724 0c-.204.182-.474.513-.754 1.112-.4.859-.708 2.032-.828 3.393a.486.486 0 0 0 .49.525h2.909Zm-5.415 0c.267 0 .486-.21.507-.477.106-1.383.389-2.638.797-3.656.087-.217-.13-.437-.333-.32a6.01 6.01 0 0 0-2.868 3.895c-.065.294.169.558.47.558H4.04ZM2.143 9.308c-.065-.294.169-.558.47-.558H4.04c.267 0 .486.21.507.477.106 1.383.389 2.639.797 3.657.087.217-.13.436-.333.32a6.01 6.01 0 0 1-2.868-3.896Zm3.913-.033a.486.486 0 0 1 .49-.525h2.909c.286 0 .515.24.49.525-.121 1.361-.428 2.535-.83 3.394-.279.6-.549.93-.753 1.112a.535.535 0 0 1-.724 0c-.204-.182-.474-.513-.754-1.112-.4-.859-.708-2.033-.828-3.394Z" clip-rule="evenodd"/></svg>` }, Yi = I`.wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}`;
|
|
2669
|
+
var Ji = Object.defineProperty, Gi = Object.getOwnPropertyDescriptor, Qi = (e, t, r, n) => {
|
|
2670
|
+
for (var o = n > 1 ? void 0 : n ? Gi(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
2671
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
2672
|
+
return n && o && Ji(t, r, o), o;
|
|
2673
|
+
};
|
|
2674
|
+
let We = class extends A {
|
|
2675
|
+
render() {
|
|
2676
|
+
return m`<div class="wcm-toolbar-placeholder"></div><div class="wcm-toolbar">${T.WALLET_CONNECT_LOGO} <button @click="${ce.close}">${T.CROSS_ICON}</button></div>`;
|
|
2677
|
+
}
|
|
2678
|
+
};
|
|
2679
|
+
We.styles = [O.globalCss, Yi], We = Qi([k("wcm-modal-backcard")], We);
|
|
2680
|
+
const Xi = I`main{padding:20px;padding-top:0;width:100%}`;
|
|
2681
|
+
var ts = Object.defineProperty, es = Object.getOwnPropertyDescriptor, rs = (e, t, r, n) => {
|
|
2682
|
+
for (var o = n > 1 ? void 0 : n ? es(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
2683
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
2684
|
+
return n && o && ts(t, r, o), o;
|
|
2685
|
+
};
|
|
2686
|
+
let He = class extends A {
|
|
2687
|
+
render() {
|
|
2688
|
+
return m`<main><slot></slot></main>`;
|
|
2689
|
+
}
|
|
2690
|
+
};
|
|
2691
|
+
He.styles = [O.globalCss, Xi], He = rs([k("wcm-modal-content")], He);
|
|
2692
|
+
const os = I`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}`;
|
|
2693
|
+
var ns = Object.defineProperty, is = Object.getOwnPropertyDescriptor, ss = (e, t, r, n) => {
|
|
2694
|
+
for (var o = n > 1 ? void 0 : n ? is(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
2695
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
2696
|
+
return n && o && ns(t, r, o), o;
|
|
2697
|
+
};
|
|
2698
|
+
let ze = class extends A {
|
|
2699
|
+
render() {
|
|
2700
|
+
return m`<footer><slot></slot></footer>`;
|
|
2701
|
+
}
|
|
2702
|
+
};
|
|
2703
|
+
ze.styles = [O.globalCss, os], ze = ss([k("wcm-modal-footer")], ze);
|
|
2704
|
+
const as = I`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.wcm-border{border-bottom:1px solid var(--wcm-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.wcm-back-btn{position:absolute;left:0}.wcm-action-btn{position:absolute;right:0}path{fill:var(--wcm-accent-color)}`;
|
|
2705
|
+
var ls = Object.defineProperty, cs = Object.getOwnPropertyDescriptor, Nt = (e, t, r, n) => {
|
|
2706
|
+
for (var o = n > 1 ? void 0 : n ? cs(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
2707
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
2708
|
+
return n && o && ls(t, r, o), o;
|
|
2709
|
+
};
|
|
2710
|
+
let ct = class extends A {
|
|
2711
|
+
constructor() {
|
|
2712
|
+
super(...arguments), this.title = "", this.onAction = void 0, this.actionIcon = void 0, this.border = !1;
|
|
2713
|
+
}
|
|
2714
|
+
backBtnTemplate() {
|
|
2715
|
+
return m`<button class="wcm-back-btn" @click="${N.goBack}">${T.BACK_ICON}</button>`;
|
|
2716
|
+
}
|
|
2717
|
+
actionBtnTemplate() {
|
|
2718
|
+
return m`<button class="wcm-action-btn" @click="${this.onAction}">${this.actionIcon}</button>`;
|
|
2719
|
+
}
|
|
2720
|
+
render() {
|
|
2721
|
+
const e = { "wcm-border": this.border }, t = N.state.history.length > 1, r = this.title ? m`<wcm-text variant="big-bold">${this.title}</wcm-text>` : m`<slot></slot>`;
|
|
2722
|
+
return m`<header class="${G(e)}">${t ? this.backBtnTemplate() : null} ${r} ${this.onAction ? this.actionBtnTemplate() : null}</header>`;
|
|
2723
|
+
}
|
|
2724
|
+
};
|
|
2725
|
+
ct.styles = [O.globalCss, as], Nt([$()], ct.prototype, "title", 2), Nt([$()], ct.prototype, "onAction", 2), Nt([$()], ct.prototype, "actionIcon", 2), Nt([$({ type: Boolean })], ct.prototype, "border", 2), ct = Nt([k("wcm-modal-header")], ct);
|
|
2726
|
+
const x = { MOBILE_BREAKPOINT: 600, WCM_RECENT_WALLET_DATA: "WCM_RECENT_WALLET_DATA", EXPLORER_WALLET_URL: "https://explorer.walletconnect.com/?type=wallet", getShadowRootElement(e, t) {
|
|
2727
|
+
const r = e.renderRoot.querySelector(t);
|
|
2728
|
+
if (!r)
|
|
2729
|
+
throw new Error(`${t} not found`);
|
|
2730
|
+
return r;
|
|
2731
|
+
}, getWalletIcon({ id: e, image_id: t }) {
|
|
2732
|
+
const { walletImages: r } = gt.state;
|
|
2733
|
+
return r != null && r[e] ? r[e] : t ? W.getWalletImageUrl(t) : "";
|
|
2734
|
+
}, getWalletName(e, t = !1) {
|
|
2735
|
+
return t && e.length > 8 ? `${e.substring(0, 8)}..` : e;
|
|
2736
|
+
}, isMobileAnimation() {
|
|
2737
|
+
return window.innerWidth <= x.MOBILE_BREAKPOINT;
|
|
2738
|
+
}, async preloadImage(e) {
|
|
2739
|
+
const t = new Promise((r, n) => {
|
|
2740
|
+
const o = new Image();
|
|
2741
|
+
o.onload = r, o.onerror = n, o.crossOrigin = "anonymous", o.src = e;
|
|
2742
|
+
});
|
|
2743
|
+
return Promise.race([t, C.wait(3e3)]);
|
|
2744
|
+
}, getErrorMessage(e) {
|
|
2745
|
+
return e instanceof Error ? e.message : "Unknown Error";
|
|
2746
|
+
}, debounce(e, t = 500) {
|
|
2747
|
+
let r;
|
|
2748
|
+
return (...n) => {
|
|
2749
|
+
function o() {
|
|
2750
|
+
e(...n);
|
|
2751
|
+
}
|
|
2752
|
+
r && clearTimeout(r), r = setTimeout(o, t);
|
|
2753
|
+
};
|
|
2754
|
+
}, handleMobileLinking(e) {
|
|
2755
|
+
const { walletConnectUri: t } = K.state, { mobile: r, name: n } = e, o = r == null ? void 0 : r.native, i = r == null ? void 0 : r.universal;
|
|
2756
|
+
x.setRecentWallet(e);
|
|
2757
|
+
function s(a) {
|
|
2758
|
+
let l = "";
|
|
2759
|
+
o ? l = C.formatUniversalUrl(o, a, n) : i && (l = C.formatNativeUrl(i, a, n)), C.openHref(l, "_self");
|
|
2760
|
+
}
|
|
2761
|
+
t && s(t);
|
|
2762
|
+
}, handleAndroidLinking() {
|
|
2763
|
+
const { walletConnectUri: e } = K.state;
|
|
2764
|
+
e && (C.setWalletConnectAndroidDeepLink(e), C.openHref(e, "_self"));
|
|
2765
|
+
}, async handleUriCopy() {
|
|
2766
|
+
const { walletConnectUri: e } = K.state;
|
|
2767
|
+
if (e)
|
|
2768
|
+
try {
|
|
2769
|
+
await navigator.clipboard.writeText(e), ot.openToast("Link copied", "success");
|
|
2770
|
+
} catch {
|
|
2771
|
+
ot.openToast("Failed to copy", "error");
|
|
2772
|
+
}
|
|
2773
|
+
}, getCustomImageUrls() {
|
|
2774
|
+
const { walletImages: e } = gt.state, t = Object.values(e ?? {});
|
|
2775
|
+
return Object.values(t);
|
|
2776
|
+
}, truncate(e, t = 8) {
|
|
2777
|
+
return e.length <= t ? e : `${e.substring(0, 4)}...${e.substring(e.length - 4)}`;
|
|
2778
|
+
}, setRecentWallet(e) {
|
|
2779
|
+
try {
|
|
2780
|
+
localStorage.setItem(x.WCM_RECENT_WALLET_DATA, JSON.stringify(e));
|
|
2781
|
+
} catch {
|
|
2782
|
+
console.info("Unable to set recent wallet");
|
|
2783
|
+
}
|
|
2784
|
+
}, getRecentWallet() {
|
|
2785
|
+
try {
|
|
2786
|
+
const e = localStorage.getItem(x.WCM_RECENT_WALLET_DATA);
|
|
2787
|
+
return e ? JSON.parse(e) : void 0;
|
|
2788
|
+
} catch {
|
|
2789
|
+
console.info("Unable to get recent wallet");
|
|
2790
|
+
}
|
|
2791
|
+
}, caseSafeIncludes(e, t) {
|
|
2792
|
+
return e.toUpperCase().includes(t.toUpperCase());
|
|
2793
|
+
}, openWalletExplorerUrl() {
|
|
2794
|
+
C.openHref(x.EXPLORER_WALLET_URL, "_blank");
|
|
2795
|
+
}, getCachedRouterWalletPlatforms() {
|
|
2796
|
+
const { desktop: e, mobile: t } = C.getWalletRouterData(), r = !!(e != null && e.native), n = !!(e != null && e.universal), o = !!(t != null && t.native) || !!(t != null && t.universal);
|
|
2797
|
+
return { isDesktop: r, isMobile: o, isWeb: n };
|
|
2798
|
+
}, goToConnectingView(e) {
|
|
2799
|
+
N.setData({ Wallet: e });
|
|
2800
|
+
const t = C.isMobile(), { isDesktop: r, isWeb: n, isMobile: o } = x.getCachedRouterWalletPlatforms();
|
|
2801
|
+
t ? o ? N.push("MobileConnecting") : n ? N.push("WebConnecting") : N.push("InstallWallet") : r ? N.push("DesktopConnecting") : n ? N.push("WebConnecting") : o ? N.push("MobileQrcodeConnecting") : N.push("InstallWallet");
|
|
2802
|
+
} }, ds = I`.wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}`;
|
|
2803
|
+
var hs = Object.defineProperty, us = Object.getOwnPropertyDescriptor, Fe = (e, t, r, n) => {
|
|
2804
|
+
for (var o = n > 1 ? void 0 : n ? us(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
2805
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
2806
|
+
return n && o && hs(t, r, o), o;
|
|
2807
|
+
};
|
|
2808
|
+
let Bt = class extends A {
|
|
2809
|
+
constructor() {
|
|
2810
|
+
super(), this.view = N.state.view, this.prevView = N.state.view, this.unsubscribe = void 0, this.oldHeight = "0px", this.resizeObserver = void 0, this.unsubscribe = N.subscribe((e) => {
|
|
2811
|
+
this.view !== e.view && this.onChangeRoute();
|
|
2812
|
+
});
|
|
2813
|
+
}
|
|
2814
|
+
firstUpdated() {
|
|
2815
|
+
this.resizeObserver = new ResizeObserver(([e]) => {
|
|
2816
|
+
const t = `${e.contentRect.height}px`;
|
|
2817
|
+
this.oldHeight !== "0px" && mt(this.routerEl, { height: [this.oldHeight, t] }, { duration: 0.2 }), this.oldHeight = t;
|
|
2818
|
+
}), this.resizeObserver.observe(this.contentEl);
|
|
2819
|
+
}
|
|
2820
|
+
disconnectedCallback() {
|
|
2821
|
+
var e, t;
|
|
2822
|
+
(e = this.unsubscribe) == null || e.call(this), (t = this.resizeObserver) == null || t.disconnect();
|
|
2823
|
+
}
|
|
2824
|
+
get routerEl() {
|
|
2825
|
+
return x.getShadowRootElement(this, ".wcm-router");
|
|
2826
|
+
}
|
|
2827
|
+
get contentEl() {
|
|
2828
|
+
return x.getShadowRootElement(this, ".wcm-content");
|
|
2829
|
+
}
|
|
2830
|
+
viewTemplate() {
|
|
2831
|
+
switch (this.view) {
|
|
2832
|
+
case "ConnectWallet":
|
|
2833
|
+
return m`<wcm-connect-wallet-view></wcm-connect-wallet-view>`;
|
|
2834
|
+
case "DesktopConnecting":
|
|
2835
|
+
return m`<wcm-desktop-connecting-view></wcm-desktop-connecting-view>`;
|
|
2836
|
+
case "MobileConnecting":
|
|
2837
|
+
return m`<wcm-mobile-connecting-view></wcm-mobile-connecting-view>`;
|
|
2838
|
+
case "WebConnecting":
|
|
2839
|
+
return m`<wcm-web-connecting-view></wcm-web-connecting-view>`;
|
|
2840
|
+
case "MobileQrcodeConnecting":
|
|
2841
|
+
return m`<wcm-mobile-qr-connecting-view></wcm-mobile-qr-connecting-view>`;
|
|
2842
|
+
case "WalletExplorer":
|
|
2843
|
+
return m`<wcm-wallet-explorer-view></wcm-wallet-explorer-view>`;
|
|
2844
|
+
case "Qrcode":
|
|
2845
|
+
return m`<wcm-qrcode-view></wcm-qrcode-view>`;
|
|
2846
|
+
case "InstallWallet":
|
|
2847
|
+
return m`<wcm-install-wallet-view></wcm-install-wallet-view>`;
|
|
2848
|
+
default:
|
|
2849
|
+
return m`<div>Not Found</div>`;
|
|
2850
|
+
}
|
|
2851
|
+
}
|
|
2852
|
+
async onChangeRoute() {
|
|
2853
|
+
await mt(this.routerEl, { opacity: [1, 0], scale: [1, 1.02] }, { duration: 0.15, delay: 0.1 }).finished, this.view = N.state.view, mt(this.routerEl, { opacity: [0, 1], scale: [0.99, 1] }, { duration: 0.37, delay: 0.05 });
|
|
2854
|
+
}
|
|
2855
|
+
render() {
|
|
2856
|
+
return m`<div class="wcm-router"><div class="wcm-content">${this.viewTemplate()}</div></div>`;
|
|
2857
|
+
}
|
|
2858
|
+
};
|
|
2859
|
+
Bt.styles = [O.globalCss, ds], Fe([H()], Bt.prototype, "view", 2), Fe([H()], Bt.prototype, "prevView", 2), Bt = Fe([k("wcm-modal-router")], Bt);
|
|
2860
|
+
const ms = I`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}`;
|
|
2861
|
+
var gs = Object.defineProperty, fs = Object.getOwnPropertyDescriptor, Jr = (e, t, r, n) => {
|
|
2862
|
+
for (var o = n > 1 ? void 0 : n ? fs(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
2863
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
2864
|
+
return n && o && gs(t, r, o), o;
|
|
2865
|
+
};
|
|
2866
|
+
let re = class extends A {
|
|
2867
|
+
constructor() {
|
|
2868
|
+
super(), this.open = !1, this.unsubscribe = void 0, this.timeout = void 0, this.unsubscribe = ot.subscribe((e) => {
|
|
2869
|
+
e.open ? (this.open = !0, this.timeout = setTimeout(() => ot.closeToast(), 2200)) : (this.open = !1, clearTimeout(this.timeout));
|
|
2870
|
+
});
|
|
2871
|
+
}
|
|
2872
|
+
disconnectedCallback() {
|
|
2873
|
+
var e;
|
|
2874
|
+
(e = this.unsubscribe) == null || e.call(this), clearTimeout(this.timeout), ot.closeToast();
|
|
2875
|
+
}
|
|
2876
|
+
render() {
|
|
2877
|
+
const { message: e, variant: t } = ot.state, r = { "wcm-success": t === "success", "wcm-error": t === "error" };
|
|
2878
|
+
return this.open ? m`<div class="${G(r)}">${t === "success" ? T.CHECKMARK_ICON : null} ${t === "error" ? T.CROSS_ICON : null}<wcm-text variant="small-regular">${e}</wcm-text></div>` : null;
|
|
2879
|
+
}
|
|
2880
|
+
};
|
|
2881
|
+
re.styles = [O.globalCss, ms], Jr([H()], re.prototype, "open", 2), re = Jr([k("wcm-modal-toast")], re);
|
|
2882
|
+
const ps = 0.1, Gr = 2.5, J = 7;
|
|
2883
|
+
function Ze(e, t, r) {
|
|
2884
|
+
return e === t ? !1 : (e - t < 0 ? t - e : e - t) <= r + ps;
|
|
2885
|
+
}
|
|
2886
|
+
function ws(e, t) {
|
|
2887
|
+
const r = Array.prototype.slice.call(Gt.create(e, { errorCorrectionLevel: t }).modules.data, 0), n = Math.sqrt(r.length);
|
|
2888
|
+
return r.reduce((o, i, s) => (s % n === 0 ? o.push([i]) : o[o.length - 1].push(i)) && o, []);
|
|
2889
|
+
}
|
|
2890
|
+
const vs = { generate(e, t, r) {
|
|
2891
|
+
const n = "#141414", o = "#ffffff", i = [], s = ws(e, "Q"), a = t / s.length, l = [{ x: 0, y: 0 }, { x: 1, y: 0 }, { x: 0, y: 1 }];
|
|
2892
|
+
l.forEach(({ x: p, y: g }) => {
|
|
2893
|
+
const _ = (s.length - J) * a * p, u = (s.length - J) * a * g, y = 0.45;
|
|
2894
|
+
for (let w = 0; w < l.length; w += 1) {
|
|
2895
|
+
const v = a * (J - w * 2);
|
|
2896
|
+
i.push(L`<rect fill="${w % 2 === 0 ? n : o}" height="${v}" rx="${v * y}" ry="${v * y}" width="${v}" x="${_ + a * w}" y="${u + a * w}">`);
|
|
2897
|
+
}
|
|
2898
|
+
});
|
|
2899
|
+
const c = Math.floor((r + 25) / a), d = s.length / 2 - c / 2, b = s.length / 2 + c / 2 - 1, h = [];
|
|
2900
|
+
s.forEach((p, g) => {
|
|
2901
|
+
p.forEach((_, u) => {
|
|
2902
|
+
if (s[g][u] && !(g < J && u < J || g > s.length - (J + 1) && u < J || g < J && u > s.length - (J + 1)) && !(g > d && g < b && u > d && u < b)) {
|
|
2903
|
+
const y = g * a + a / 2, w = u * a + a / 2;
|
|
2904
|
+
h.push([y, w]);
|
|
2905
|
+
}
|
|
2906
|
+
});
|
|
2907
|
+
});
|
|
2908
|
+
const f = {};
|
|
2909
|
+
return h.forEach(([p, g]) => {
|
|
2910
|
+
f[p] ? f[p].push(g) : f[p] = [g];
|
|
2911
|
+
}), Object.entries(f).map(([p, g]) => {
|
|
2912
|
+
const _ = g.filter((u) => g.every((y) => !Ze(u, y, a)));
|
|
2913
|
+
return [Number(p), _];
|
|
2914
|
+
}).forEach(([p, g]) => {
|
|
2915
|
+
g.forEach((_) => {
|
|
2916
|
+
i.push(L`<circle cx="${p}" cy="${_}" fill="${n}" r="${a / Gr}">`);
|
|
2917
|
+
});
|
|
2918
|
+
}), Object.entries(f).filter(([p, g]) => g.length > 1).map(([p, g]) => {
|
|
2919
|
+
const _ = g.filter((u) => g.some((y) => Ze(u, y, a)));
|
|
2920
|
+
return [Number(p), _];
|
|
2921
|
+
}).map(([p, g]) => {
|
|
2922
|
+
g.sort((u, y) => u < y ? -1 : 1);
|
|
2923
|
+
const _ = [];
|
|
2924
|
+
for (const u of g) {
|
|
2925
|
+
const y = _.find((w) => w.some((v) => Ze(u, v, a)));
|
|
2926
|
+
y ? y.push(u) : _.push([u]);
|
|
2927
|
+
}
|
|
2928
|
+
return [p, _.map((u) => [u[0], u[u.length - 1]])];
|
|
2929
|
+
}).forEach(([p, g]) => {
|
|
2930
|
+
g.forEach(([_, u]) => {
|
|
2931
|
+
i.push(L`<line x1="${p}" x2="${p}" y1="${_}" y2="${u}" stroke="${n}" stroke-width="${a / (Gr / 2)}" stroke-linecap="round">`);
|
|
2932
|
+
});
|
|
2933
|
+
}), i;
|
|
2934
|
+
} }, bs = I`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.wcm-dark{background-color:#fff;border-radius:var(--wcm-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,wcm-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{width:25%;height:25%;border-radius:var(--wcm-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--wcm-accent-color)}svg:first-child path:last-child{stroke:var(--wcm-color-overlay)}`;
|
|
2935
|
+
var ys = Object.defineProperty, xs = Object.getOwnPropertyDescriptor, vt = (e, t, r, n) => {
|
|
2936
|
+
for (var o = n > 1 ? void 0 : n ? xs(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
2937
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
2938
|
+
return n && o && ys(t, r, o), o;
|
|
2939
|
+
};
|
|
2940
|
+
let X = class extends A {
|
|
2941
|
+
constructor() {
|
|
2942
|
+
super(...arguments), this.uri = "", this.size = 0, this.imageId = void 0, this.walletId = void 0, this.imageUrl = void 0;
|
|
2943
|
+
}
|
|
2944
|
+
svgTemplate() {
|
|
2945
|
+
const e = _t.state.themeMode === "light" ? this.size : this.size - 36;
|
|
2946
|
+
return L`<svg height="${e}" width="${e}">${vs.generate(this.uri, e, e / 4)}</svg>`;
|
|
2947
|
+
}
|
|
2948
|
+
render() {
|
|
2949
|
+
const e = { "wcm-dark": _t.state.themeMode === "dark" };
|
|
2950
|
+
return m`<div style="${`width: ${this.size}px`}" class="${G(e)}">${this.walletId || this.imageUrl ? m`<wcm-wallet-image walletId="${j(this.walletId)}" imageId="${j(this.imageId)}" imageUrl="${j(this.imageUrl)}"></wcm-wallet-image>` : T.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}</div>`;
|
|
2951
|
+
}
|
|
2952
|
+
};
|
|
2953
|
+
X.styles = [O.globalCss, bs], vt([$()], X.prototype, "uri", 2), vt([$({ type: Number })], X.prototype, "size", 2), vt([$()], X.prototype, "imageId", 2), vt([$()], X.prototype, "walletId", 2), vt([$()], X.prototype, "imageUrl", 2), X = vt([k("wcm-qrcode")], X);
|
|
2954
|
+
const $s = I`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}`;
|
|
2955
|
+
var Cs = Object.defineProperty, Es = Object.getOwnPropertyDescriptor, Qr = (e, t, r, n) => {
|
|
2956
|
+
for (var o = n > 1 ? void 0 : n ? Es(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
2957
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
2958
|
+
return n && o && Cs(t, r, o), o;
|
|
2959
|
+
};
|
|
2960
|
+
let oe = class extends A {
|
|
2961
|
+
constructor() {
|
|
2962
|
+
super(...arguments), this.onChange = () => null;
|
|
2963
|
+
}
|
|
2964
|
+
render() {
|
|
2965
|
+
return m`<input type="text" @input="${this.onChange}" placeholder="Search wallets"> ${T.SEARCH_ICON}`;
|
|
2966
|
+
}
|
|
2967
|
+
};
|
|
2968
|
+
oe.styles = [O.globalCss, $s], Qr([$()], oe.prototype, "onChange", 2), oe = Qr([k("wcm-search-input")], oe);
|
|
2969
|
+
const As = I`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--wcm-accent-color)}`;
|
|
2970
|
+
var _s = Object.defineProperty, Os = Object.getOwnPropertyDescriptor, ks = (e, t, r, n) => {
|
|
2971
|
+
for (var o = n > 1 ? void 0 : n ? Os(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
2972
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
2973
|
+
return n && o && _s(t, r, o), o;
|
|
2974
|
+
};
|
|
2975
|
+
let Ve = class extends A {
|
|
2976
|
+
render() {
|
|
2977
|
+
return m`<svg viewBox="0 0 50 50" width="24" height="24"><circle cx="25" cy="25" r="20" fill="none" stroke-width="4" stroke="#fff"/></svg>`;
|
|
2978
|
+
}
|
|
2979
|
+
};
|
|
2980
|
+
Ve.styles = [O.globalCss, As], Ve = ks([k("wcm-spinner")], Ve);
|
|
2981
|
+
const Is = I`span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}`;
|
|
2982
|
+
var Ts = Object.defineProperty, Ps = Object.getOwnPropertyDescriptor, Ke = (e, t, r, n) => {
|
|
2983
|
+
for (var o = n > 1 ? void 0 : n ? Ps(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
2984
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
2985
|
+
return n && o && Ts(t, r, o), o;
|
|
2986
|
+
};
|
|
2987
|
+
let Dt = class extends A {
|
|
2988
|
+
constructor() {
|
|
2989
|
+
super(...arguments), this.variant = "medium-regular", this.color = "primary";
|
|
2990
|
+
}
|
|
2991
|
+
render() {
|
|
2992
|
+
const e = { "wcm-big-bold": this.variant === "big-bold", "wcm-medium-regular": this.variant === "medium-regular", "wcm-small-regular": this.variant === "small-regular", "wcm-small-thin": this.variant === "small-thin", "wcm-xsmall-regular": this.variant === "xsmall-regular", "wcm-xsmall-bold": this.variant === "xsmall-bold", "wcm-color-primary": this.color === "primary", "wcm-color-secondary": this.color === "secondary", "wcm-color-tertiary": this.color === "tertiary", "wcm-color-inverse": this.color === "inverse", "wcm-color-accnt": this.color === "accent", "wcm-color-error": this.color === "error" };
|
|
2993
|
+
return m`<span><slot class="${G(e)}"></slot></span>`;
|
|
2994
|
+
}
|
|
2995
|
+
};
|
|
2996
|
+
Dt.styles = [O.globalCss, Is], Ke([$()], Dt.prototype, "variant", 2), Ke([$()], Dt.prototype, "color", 2), Dt = Ke([k("wcm-text")], Dt);
|
|
2997
|
+
const Ms = I`button{width:100%;height:100%;border-radius:var(--wcm-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}wcm-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}wcm-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--wcm-wallet-icon-border-radius);margin-bottom:5px}.wcm-sublabel{margin-top:2px}`;
|
|
2998
|
+
var Ss = Object.defineProperty, Rs = Object.getOwnPropertyDescriptor, tt = (e, t, r, n) => {
|
|
2999
|
+
for (var o = n > 1 ? void 0 : n ? Rs(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3000
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3001
|
+
return n && o && Ss(t, r, o), o;
|
|
3002
|
+
};
|
|
3003
|
+
let V = class extends A {
|
|
3004
|
+
constructor() {
|
|
3005
|
+
super(...arguments), this.onClick = () => null, this.name = "", this.walletId = "", this.label = void 0, this.imageId = void 0, this.installed = !1, this.recent = !1;
|
|
3006
|
+
}
|
|
3007
|
+
sublabelTemplate() {
|
|
3008
|
+
return this.recent ? m`<wcm-text class="wcm-sublabel" variant="xsmall-bold" color="tertiary">RECENT</wcm-text>` : this.installed ? m`<wcm-text class="wcm-sublabel" variant="xsmall-bold" color="tertiary">INSTALLED</wcm-text>` : null;
|
|
3009
|
+
}
|
|
3010
|
+
handleClick() {
|
|
3011
|
+
jo.click({ name: "WALLET_BUTTON", walletId: this.walletId }), this.onClick();
|
|
3012
|
+
}
|
|
3013
|
+
render() {
|
|
3014
|
+
var e;
|
|
3015
|
+
return m`<button @click="${this.handleClick.bind(this)}"><div><wcm-wallet-image walletId="${this.walletId}" imageId="${j(this.imageId)}"></wcm-wallet-image><wcm-text variant="xsmall-regular">${(e = this.label) != null ? e : x.getWalletName(this.name, !0)}</wcm-text>${this.sublabelTemplate()}</div></button>`;
|
|
3016
|
+
}
|
|
3017
|
+
};
|
|
3018
|
+
V.styles = [O.globalCss, Ms], tt([$()], V.prototype, "onClick", 2), tt([$()], V.prototype, "name", 2), tt([$()], V.prototype, "walletId", 2), tt([$()], V.prototype, "label", 2), tt([$()], V.prototype, "imageId", 2), tt([$({ type: Boolean })], V.prototype, "installed", 2), tt([$({ type: Boolean })], V.prototype, "recent", 2), V = tt([k("wcm-wallet-button")], V);
|
|
3019
|
+
const Ls = I`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--wcm-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--wcm-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;
|
|
3020
|
+
var Ns = Object.defineProperty, Bs = Object.getOwnPropertyDescriptor, ne = (e, t, r, n) => {
|
|
3021
|
+
for (var o = n > 1 ? void 0 : n ? Bs(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3022
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3023
|
+
return n && o && Ns(t, r, o), o;
|
|
3024
|
+
};
|
|
3025
|
+
let bt = class extends A {
|
|
3026
|
+
constructor() {
|
|
3027
|
+
super(...arguments), this.walletId = "", this.imageId = void 0, this.imageUrl = void 0;
|
|
3028
|
+
}
|
|
3029
|
+
render() {
|
|
3030
|
+
var e;
|
|
3031
|
+
const t = (e = this.imageUrl) != null && e.length ? this.imageUrl : x.getWalletIcon({ id: this.walletId, image_id: this.imageId });
|
|
3032
|
+
return m`${t.length ? m`<div><img crossorigin="anonymous" src="${t}" alt="${this.id}"></div>` : T.WALLET_PLACEHOLDER}`;
|
|
3033
|
+
}
|
|
3034
|
+
};
|
|
3035
|
+
bt.styles = [O.globalCss, Ls], ne([$()], bt.prototype, "walletId", 2), ne([$()], bt.prototype, "imageId", 2), ne([$()], bt.prototype, "imageUrl", 2), bt = ne([k("wcm-wallet-image")], bt);
|
|
3036
|
+
var Ds = Object.defineProperty, Us = Object.getOwnPropertyDescriptor, Xr = (e, t, r, n) => {
|
|
3037
|
+
for (var o = n > 1 ? void 0 : n ? Us(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3038
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3039
|
+
return n && o && Ds(t, r, o), o;
|
|
3040
|
+
};
|
|
3041
|
+
let qe = class extends A {
|
|
3042
|
+
constructor() {
|
|
3043
|
+
super(), this.preload = !0, this.preloadData();
|
|
3044
|
+
}
|
|
3045
|
+
async loadImages(e) {
|
|
3046
|
+
try {
|
|
3047
|
+
e != null && e.length && await Promise.all(e.map(async (t) => x.preloadImage(t)));
|
|
3048
|
+
} catch {
|
|
3049
|
+
console.info("Unsuccessful attempt at preloading some images", e);
|
|
3050
|
+
}
|
|
3051
|
+
}
|
|
3052
|
+
async preloadListings() {
|
|
3053
|
+
if (gt.state.enableExplorer) {
|
|
3054
|
+
await W.getRecomendedWallets(), K.setIsDataLoaded(!0);
|
|
3055
|
+
const { recomendedWallets: e } = W.state, t = e.map((r) => x.getWalletIcon(r));
|
|
3056
|
+
await this.loadImages(t);
|
|
3057
|
+
} else
|
|
3058
|
+
K.setIsDataLoaded(!0);
|
|
3059
|
+
}
|
|
3060
|
+
async preloadCustomImages() {
|
|
3061
|
+
const e = x.getCustomImageUrls();
|
|
3062
|
+
await this.loadImages(e);
|
|
3063
|
+
}
|
|
3064
|
+
async preloadData() {
|
|
3065
|
+
try {
|
|
3066
|
+
this.preload && (this.preload = !1, await Promise.all([this.preloadListings(), this.preloadCustomImages()]));
|
|
3067
|
+
} catch (e) {
|
|
3068
|
+
console.error(e), ot.openToast("Failed preloading", "error");
|
|
3069
|
+
}
|
|
3070
|
+
}
|
|
3071
|
+
};
|
|
3072
|
+
Xr([H()], qe.prototype, "preload", 2), qe = Xr([k("wcm-explorer-context")], qe);
|
|
3073
|
+
var js = Object.defineProperty, Ws = Object.getOwnPropertyDescriptor, Hs = (e, t, r, n) => {
|
|
3074
|
+
for (var o = n > 1 ? void 0 : n ? Ws(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3075
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3076
|
+
return n && o && js(t, r, o), o;
|
|
3077
|
+
};
|
|
3078
|
+
let to = class extends A {
|
|
3079
|
+
constructor() {
|
|
3080
|
+
super(), this.unsubscribeTheme = void 0, O.setTheme(), this.unsubscribeTheme = _t.subscribe(O.setTheme);
|
|
3081
|
+
}
|
|
3082
|
+
disconnectedCallback() {
|
|
3083
|
+
var e;
|
|
3084
|
+
(e = this.unsubscribeTheme) == null || e.call(this);
|
|
3085
|
+
}
|
|
3086
|
+
};
|
|
3087
|
+
to = Hs([k("wcm-theme-context")], to);
|
|
3088
|
+
const zs = I`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;
|
|
3089
|
+
var Fs = Object.defineProperty, Zs = Object.getOwnPropertyDescriptor, Vs = (e, t, r, n) => {
|
|
3090
|
+
for (var o = n > 1 ? void 0 : n ? Zs(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3091
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3092
|
+
return n && o && Fs(t, r, o), o;
|
|
3093
|
+
};
|
|
3094
|
+
let Ye = class extends A {
|
|
3095
|
+
onGoToQrcode() {
|
|
3096
|
+
N.push("Qrcode");
|
|
3097
|
+
}
|
|
3098
|
+
render() {
|
|
3099
|
+
const { recomendedWallets: e } = W.state, t = [...e, ...e], r = C.RECOMMENDED_WALLET_AMOUNT * 2;
|
|
3100
|
+
return m`<wcm-modal-header title="Connect your wallet" .onAction="${this.onGoToQrcode}" .actionIcon="${T.QRCODE_ICON}"></wcm-modal-header><wcm-modal-content><div class="wcm-title">${T.MOBILE_ICON}<wcm-text variant="small-regular" color="accent">WalletConnect</wcm-text></div><div class="wcm-slider"><div class="wcm-track">${[...Array(r)].map((n, o) => {
|
|
3101
|
+
const i = t[o % t.length];
|
|
3102
|
+
return i ? m`<wcm-wallet-image walletId="${i.id}" imageId="${i.image_id}"></wcm-wallet-image>` : T.WALLET_PLACEHOLDER;
|
|
3103
|
+
})}</div><wcm-button-big @click="${x.handleAndroidLinking}"><wcm-text variant="medium-regular" color="inverse">Select Wallet</wcm-text></wcm-button-big></div></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">Choose WalletConnect to see supported apps on your device</wcm-text></wcm-info-footer>`;
|
|
3104
|
+
}
|
|
3105
|
+
};
|
|
3106
|
+
Ye.styles = [O.globalCss, zs], Ye = Vs([k("wcm-android-wallet-selection")], Ye);
|
|
3107
|
+
const Ks = I`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--wcm-accent-color);animation:loading 1s linear infinite}wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:90px;height:90px}wcm-text{margin-bottom:40px}.wcm-error svg{stroke:var(--wcm-error-color)}.wcm-error use{display:none}.wcm-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.wcm-stale svg,.wcm-stale use{display:none}`;
|
|
3108
|
+
var qs = Object.defineProperty, Ys = Object.getOwnPropertyDescriptor, yt = (e, t, r, n) => {
|
|
3109
|
+
for (var o = n > 1 ? void 0 : n ? Ys(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3110
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3111
|
+
return n && o && qs(t, r, o), o;
|
|
3112
|
+
};
|
|
3113
|
+
let et = class extends A {
|
|
3114
|
+
constructor() {
|
|
3115
|
+
super(...arguments), this.walletId = void 0, this.imageId = void 0, this.isError = !1, this.isStale = !1, this.label = "";
|
|
3116
|
+
}
|
|
3117
|
+
svgLoaderTemplate() {
|
|
3118
|
+
var e, t;
|
|
3119
|
+
const r = (t = (e = _t.state.themeVariables) == null ? void 0 : e["--wcm-wallet-icon-large-border-radius"]) != null ? t : O.getPreset("--wcm-wallet-icon-large-border-radius");
|
|
3120
|
+
let n = 0;
|
|
3121
|
+
r.includes("%") ? n = 88 / 100 * parseInt(r, 10) : n = parseInt(r, 10), n *= 1.17;
|
|
3122
|
+
const o = 317 - n * 1.57, i = 425 - n * 1.8;
|
|
3123
|
+
return m`<svg viewBox="0 0 110 110" width="110" height="110"><rect id="wcm-loader" x="2" y="2" width="106" height="106" rx="${n}"/><use xlink:href="#wcm-loader" stroke-dasharray="106 ${o}" stroke-dashoffset="${i}"></use></svg>`;
|
|
3124
|
+
}
|
|
3125
|
+
render() {
|
|
3126
|
+
const e = { "wcm-error": this.isError, "wcm-stale": this.isStale };
|
|
3127
|
+
return m`<div class="${G(e)}">${this.svgLoaderTemplate()}<wcm-wallet-image walletId="${j(this.walletId)}" imageId="${j(this.imageId)}"></wcm-wallet-image></div><wcm-text variant="medium-regular" color="${this.isError ? "error" : "primary"}">${this.isError ? "Connection declined" : this.label}</wcm-text>`;
|
|
3128
|
+
}
|
|
3129
|
+
};
|
|
3130
|
+
et.styles = [O.globalCss, Ks], yt([$()], et.prototype, "walletId", 2), yt([$()], et.prototype, "imageId", 2), yt([$({ type: Boolean })], et.prototype, "isError", 2), yt([$({ type: Boolean })], et.prototype, "isStale", 2), yt([$()], et.prototype, "label", 2), et = yt([k("wcm-connector-waiting")], et);
|
|
3131
|
+
const At = { manualWallets() {
|
|
3132
|
+
var e, t;
|
|
3133
|
+
const { mobileWallets: r, desktopWallets: n } = gt.state, o = (e = At.recentWallet()) == null ? void 0 : e.id, i = C.isMobile() ? r : n, s = i == null ? void 0 : i.filter((a) => o !== a.id);
|
|
3134
|
+
return (t = C.isMobile() ? s == null ? void 0 : s.map(({ id: a, name: l, links: c }) => ({ id: a, name: l, mobile: c, links: c })) : s == null ? void 0 : s.map(({ id: a, name: l, links: c }) => ({ id: a, name: l, desktop: c, links: c }))) != null ? t : [];
|
|
3135
|
+
}, recentWallet() {
|
|
3136
|
+
return x.getRecentWallet();
|
|
3137
|
+
}, recomendedWallets(e = !1) {
|
|
3138
|
+
var t;
|
|
3139
|
+
const r = e || (t = At.recentWallet()) == null ? void 0 : t.id, { recomendedWallets: n } = W.state;
|
|
3140
|
+
return n.filter((o) => r !== o.id);
|
|
3141
|
+
} }, st = { onConnecting(e) {
|
|
3142
|
+
x.goToConnectingView(e);
|
|
3143
|
+
}, manualWalletsTemplate() {
|
|
3144
|
+
return At.manualWallets().map((e) => m`<wcm-wallet-button walletId="${e.id}" name="${e.name}" .onClick="${() => this.onConnecting(e)}"></wcm-wallet-button>`);
|
|
3145
|
+
}, recomendedWalletsTemplate(e = !1) {
|
|
3146
|
+
return At.recomendedWallets(e).map((t) => m`<wcm-wallet-button name="${t.name}" walletId="${t.id}" imageId="${t.image_id}" .onClick="${() => this.onConnecting(t)}"></wcm-wallet-button>`);
|
|
3147
|
+
}, recentWalletTemplate() {
|
|
3148
|
+
const e = At.recentWallet();
|
|
3149
|
+
if (e)
|
|
3150
|
+
return m`<wcm-wallet-button name="${e.name}" walletId="${e.id}" imageId="${j(e.image_id)}" .recent="${!0}" .onClick="${() => this.onConnecting(e)}"></wcm-wallet-button>`;
|
|
3151
|
+
} }, Js = I`.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-desktop-title,.wcm-mobile-title{display:flex;align-items:center}.wcm-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.wcm-desktop-title{margin-bottom:10px;padding:0 10px}.wcm-subtitle{display:flex;align-items:center}.wcm-subtitle:last-child path{fill:var(--wcm-color-fg-3)}.wcm-desktop-title svg,.wcm-mobile-title svg{margin-right:6px}.wcm-desktop-title path,.wcm-mobile-title path{fill:var(--wcm-accent-color)}`;
|
|
3152
|
+
var Gs = Object.defineProperty, Qs = Object.getOwnPropertyDescriptor, Xs = (e, t, r, n) => {
|
|
3153
|
+
for (var o = n > 1 ? void 0 : n ? Qs(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3154
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3155
|
+
return n && o && Gs(t, r, o), o;
|
|
3156
|
+
};
|
|
3157
|
+
let Je = class extends A {
|
|
3158
|
+
render() {
|
|
3159
|
+
const { explorerExcludedWalletIds: e, enableExplorer: t } = gt.state, r = e !== "ALL" && t, n = st.manualWalletsTemplate(), o = st.recomendedWalletsTemplate();
|
|
3160
|
+
let i = [st.recentWalletTemplate(), ...n, ...o];
|
|
3161
|
+
i = i.filter(Boolean);
|
|
3162
|
+
const s = i.length > 4 || r;
|
|
3163
|
+
let a = [];
|
|
3164
|
+
s ? a = i.slice(0, 3) : a = i;
|
|
3165
|
+
const l = !!a.length;
|
|
3166
|
+
return m`<wcm-modal-header .border="${!0}" title="Connect your wallet" .onAction="${x.handleUriCopy}" .actionIcon="${T.COPY_ICON}"></wcm-modal-header><wcm-modal-content><div class="wcm-mobile-title"><div class="wcm-subtitle">${T.MOBILE_ICON}<wcm-text variant="small-regular" color="accent">Mobile</wcm-text></div><div class="wcm-subtitle">${T.SCAN_ICON}<wcm-text variant="small-regular" color="secondary">Scan with your wallet</wcm-text></div></div><wcm-walletconnect-qr></wcm-walletconnect-qr></wcm-modal-content>${l ? m`<wcm-modal-footer><div class="wcm-desktop-title">${T.DESKTOP_ICON}<wcm-text variant="small-regular" color="accent">Desktop</wcm-text></div><div class="wcm-grid">${a} ${s ? m`<wcm-view-all-wallets-button></wcm-view-all-wallets-button>` : null}</div></wcm-modal-footer>` : null}`;
|
|
3167
|
+
}
|
|
3168
|
+
};
|
|
3169
|
+
Je.styles = [O.globalCss, Js], Je = Xs([k("wcm-desktop-wallet-selection")], Je);
|
|
3170
|
+
const ta = I`div{background-color:var(--wcm-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--wcm-color-bg-3);text-align:center}a{color:var(--wcm-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`;
|
|
3171
|
+
var ea = Object.defineProperty, ra = Object.getOwnPropertyDescriptor, oa = (e, t, r, n) => {
|
|
3172
|
+
for (var o = n > 1 ? void 0 : n ? ra(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3173
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3174
|
+
return n && o && ea(t, r, o), o;
|
|
3175
|
+
};
|
|
3176
|
+
let Ge = class extends A {
|
|
3177
|
+
render() {
|
|
3178
|
+
const { termsOfServiceUrl: e, privacyPolicyUrl: t } = gt.state;
|
|
3179
|
+
return e ?? t ? m`<div><wcm-text variant="small-regular" color="secondary">By connecting your wallet to this app, you agree to the app's ${e ? m`<a href="${e}" target="_blank" rel="noopener noreferrer">Terms of Service</a>` : null} ${e && t ? "and" : null} ${t ? m`<a href="${t}" target="_blank" rel="noopener noreferrer">Privacy Policy</a>` : null}</wcm-text></div>` : null;
|
|
3180
|
+
}
|
|
3181
|
+
};
|
|
3182
|
+
Ge.styles = [O.globalCss, ta], Ge = oa([k("wcm-legal-notice")], Ge);
|
|
3183
|
+
const na = I`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;
|
|
3184
|
+
var ia = Object.defineProperty, sa = Object.getOwnPropertyDescriptor, aa = (e, t, r, n) => {
|
|
3185
|
+
for (var o = n > 1 ? void 0 : n ? sa(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3186
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3187
|
+
return n && o && ia(t, r, o), o;
|
|
3188
|
+
};
|
|
3189
|
+
let Qe = class extends A {
|
|
3190
|
+
onQrcode() {
|
|
3191
|
+
N.push("Qrcode");
|
|
3192
|
+
}
|
|
3193
|
+
render() {
|
|
3194
|
+
const { explorerExcludedWalletIds: e, enableExplorer: t } = gt.state, r = e !== "ALL" && t, n = st.manualWalletsTemplate(), o = st.recomendedWalletsTemplate();
|
|
3195
|
+
let i = [st.recentWalletTemplate(), ...n, ...o];
|
|
3196
|
+
i = i.filter(Boolean);
|
|
3197
|
+
const s = i.length > 8 || r;
|
|
3198
|
+
let a = [];
|
|
3199
|
+
s ? a = i.slice(0, 7) : a = i;
|
|
3200
|
+
const l = !!a.length;
|
|
3201
|
+
return m`<wcm-modal-header title="Connect your wallet" .onAction="${this.onQrcode}" .actionIcon="${T.QRCODE_ICON}"></wcm-modal-header>${l ? m`<wcm-modal-content><div>${a} ${s ? m`<wcm-view-all-wallets-button></wcm-view-all-wallets-button>` : null}</div></wcm-modal-content>` : null}`;
|
|
3202
|
+
}
|
|
3203
|
+
};
|
|
3204
|
+
Qe.styles = [O.globalCss, na], Qe = aa([k("wcm-mobile-wallet-selection")], Qe);
|
|
3205
|
+
const la = I`:host{all:initial}.wcm-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--wcm-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--wcm-overlay-background-color);backdrop-filter:var(--wcm-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.wcm-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.wcm-active{pointer-events:auto}.wcm-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) var(--wcm-container-border-radius) var(--wcm-container-border-radius);border:1px solid var(--wcm-color-overlay);overflow:hidden}.wcm-card{width:100%;position:relative;border-radius:var(--wcm-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--wcm-color-overlay);background-color:var(--wcm-color-bg-1);color:var(--wcm-color-fg-1)}@media(max-width:600px){.wcm-container{max-width:440px;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) 0 0}.wcm-card{border-radius:var(--wcm-container-border-radius) var(--wcm-container-border-radius) 0 0}.wcm-overlay{align-items:flex-end}}@media(max-width:440px){.wcm-container{border:0}}`;
|
|
3206
|
+
var ca = Object.defineProperty, da = Object.getOwnPropertyDescriptor, Xe = (e, t, r, n) => {
|
|
3207
|
+
for (var o = n > 1 ? void 0 : n ? da(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3208
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3209
|
+
return n && o && ca(t, r, o), o;
|
|
3210
|
+
};
|
|
3211
|
+
let Ut = class extends A {
|
|
3212
|
+
constructor() {
|
|
3213
|
+
super(), this.open = !1, this.active = !1, this.unsubscribeModal = void 0, this.abortController = void 0, this.unsubscribeModal = ce.subscribe((e) => {
|
|
3214
|
+
e.open ? this.onOpenModalEvent() : this.onCloseModalEvent();
|
|
3215
|
+
});
|
|
3216
|
+
}
|
|
3217
|
+
disconnectedCallback() {
|
|
3218
|
+
var e;
|
|
3219
|
+
(e = this.unsubscribeModal) == null || e.call(this);
|
|
3220
|
+
}
|
|
3221
|
+
get overlayEl() {
|
|
3222
|
+
return x.getShadowRootElement(this, ".wcm-overlay");
|
|
3223
|
+
}
|
|
3224
|
+
get containerEl() {
|
|
3225
|
+
return x.getShadowRootElement(this, ".wcm-container");
|
|
3226
|
+
}
|
|
3227
|
+
toggleBodyScroll(e) {
|
|
3228
|
+
if (document.querySelector("body"))
|
|
3229
|
+
if (e) {
|
|
3230
|
+
const t = document.getElementById("wcm-styles");
|
|
3231
|
+
t == null || t.remove();
|
|
3232
|
+
} else
|
|
3233
|
+
document.head.insertAdjacentHTML("beforeend", '<style id="wcm-styles">html,body{touch-action:none;overflow:hidden;overscroll-behavior:contain;}</style>');
|
|
3234
|
+
}
|
|
3235
|
+
onCloseModal(e) {
|
|
3236
|
+
e.target === e.currentTarget && ce.close();
|
|
3237
|
+
}
|
|
3238
|
+
onOpenModalEvent() {
|
|
3239
|
+
this.toggleBodyScroll(!1), this.addKeyboardEvents(), this.open = !0, setTimeout(async () => {
|
|
3240
|
+
const e = x.isMobileAnimation() ? { y: ["50vh", "0vh"] } : { scale: [0.98, 1] }, t = 0.1, r = 0.2;
|
|
3241
|
+
await Promise.all([mt(this.overlayEl, { opacity: [0, 1] }, { delay: t, duration: r }).finished, mt(this.containerEl, e, { delay: t, duration: r }).finished]), this.active = !0;
|
|
3242
|
+
}, 0);
|
|
3243
|
+
}
|
|
3244
|
+
async onCloseModalEvent() {
|
|
3245
|
+
this.toggleBodyScroll(!0), this.removeKeyboardEvents();
|
|
3246
|
+
const e = x.isMobileAnimation() ? { y: ["0vh", "50vh"] } : { scale: [1, 0.98] }, t = 0.2;
|
|
3247
|
+
await Promise.all([mt(this.overlayEl, { opacity: [1, 0] }, { duration: t }).finished, mt(this.containerEl, e, { duration: t }).finished]), this.containerEl.removeAttribute("style"), this.active = !1, this.open = !1;
|
|
3248
|
+
}
|
|
3249
|
+
addKeyboardEvents() {
|
|
3250
|
+
this.abortController = new AbortController(), window.addEventListener("keydown", (e) => {
|
|
3251
|
+
var t;
|
|
3252
|
+
e.key === "Escape" ? ce.close() : e.key === "Tab" && ((t = e.target) != null && t.tagName.includes("wcm-") || this.containerEl.focus());
|
|
3253
|
+
}, this.abortController), this.containerEl.focus();
|
|
3254
|
+
}
|
|
3255
|
+
removeKeyboardEvents() {
|
|
3256
|
+
var e;
|
|
3257
|
+
(e = this.abortController) == null || e.abort(), this.abortController = void 0;
|
|
3258
|
+
}
|
|
3259
|
+
render() {
|
|
3260
|
+
const e = { "wcm-overlay": !0, "wcm-active": this.active };
|
|
3261
|
+
return m`<wcm-explorer-context></wcm-explorer-context><wcm-theme-context></wcm-theme-context><div id="wcm-modal" class="${G(e)}" @click="${this.onCloseModal}" role="alertdialog" aria-modal="true"><div class="wcm-container" tabindex="0">${this.open ? m`<wcm-modal-backcard></wcm-modal-backcard><div class="wcm-card"><wcm-modal-router></wcm-modal-router><wcm-modal-toast></wcm-modal-toast></div>` : null}</div></div>`;
|
|
3262
|
+
}
|
|
3263
|
+
};
|
|
3264
|
+
Ut.styles = [O.globalCss, la], Xe([H()], Ut.prototype, "open", 2), Xe([H()], Ut.prototype, "active", 2), Ut = Xe([k("wcm-modal")], Ut);
|
|
3265
|
+
const ha = I`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}`;
|
|
3266
|
+
var ua = Object.defineProperty, ma = Object.getOwnPropertyDescriptor, jt = (e, t, r, n) => {
|
|
3267
|
+
for (var o = n > 1 ? void 0 : n ? ma(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3268
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3269
|
+
return n && o && ua(t, r, o), o;
|
|
3270
|
+
};
|
|
3271
|
+
let dt = class extends A {
|
|
3272
|
+
constructor() {
|
|
3273
|
+
super(...arguments), this.isMobile = !1, this.isDesktop = !1, this.isWeb = !1, this.isRetry = !1;
|
|
3274
|
+
}
|
|
3275
|
+
onMobile() {
|
|
3276
|
+
C.isMobile() ? N.replace("MobileConnecting") : N.replace("MobileQrcodeConnecting");
|
|
3277
|
+
}
|
|
3278
|
+
onDesktop() {
|
|
3279
|
+
N.replace("DesktopConnecting");
|
|
3280
|
+
}
|
|
3281
|
+
onWeb() {
|
|
3282
|
+
N.replace("WebConnecting");
|
|
3283
|
+
}
|
|
3284
|
+
render() {
|
|
3285
|
+
return m`<div>${this.isRetry ? m`<slot></slot>` : null} ${this.isMobile ? m`<wcm-button .onClick="${this.onMobile}" .iconLeft="${T.MOBILE_ICON}" variant="outline">Mobile</wcm-button>` : null} ${this.isDesktop ? m`<wcm-button .onClick="${this.onDesktop}" .iconLeft="${T.DESKTOP_ICON}" variant="outline">Desktop</wcm-button>` : null} ${this.isWeb ? m`<wcm-button .onClick="${this.onWeb}" .iconLeft="${T.GLOBE_ICON}" variant="outline">Web</wcm-button>` : null}</div>`;
|
|
3286
|
+
}
|
|
3287
|
+
};
|
|
3288
|
+
dt.styles = [O.globalCss, ha], jt([$({ type: Boolean })], dt.prototype, "isMobile", 2), jt([$({ type: Boolean })], dt.prototype, "isDesktop", 2), jt([$({ type: Boolean })], dt.prototype, "isWeb", 2), jt([$({ type: Boolean })], dt.prototype, "isRetry", 2), dt = jt([k("wcm-platform-selection")], dt);
|
|
3289
|
+
const ga = I`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;
|
|
3290
|
+
var fa = Object.defineProperty, pa = Object.getOwnPropertyDescriptor, wa = (e, t, r, n) => {
|
|
3291
|
+
for (var o = n > 1 ? void 0 : n ? pa(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3292
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3293
|
+
return n && o && fa(t, r, o), o;
|
|
3294
|
+
};
|
|
3295
|
+
let tr = class extends A {
|
|
3296
|
+
onClick() {
|
|
3297
|
+
N.push("WalletExplorer");
|
|
3298
|
+
}
|
|
3299
|
+
render() {
|
|
3300
|
+
const { recomendedWallets: e } = W.state, t = At.manualWallets(), r = [...e, ...t].reverse().slice(0, 4);
|
|
3301
|
+
return m`<button @click="${this.onClick}"><div class="wcm-icons">${r.map((n) => {
|
|
3302
|
+
const o = x.getWalletIcon(n);
|
|
3303
|
+
if (o)
|
|
3304
|
+
return m`<img crossorigin="anonymous" src="${o}">`;
|
|
3305
|
+
const i = x.getWalletIcon({ id: n.id });
|
|
3306
|
+
return i ? m`<img crossorigin="anonymous" src="${i}">` : T.WALLET_PLACEHOLDER;
|
|
3307
|
+
})} ${[...Array(4 - r.length)].map(() => T.WALLET_PLACEHOLDER)}</div><wcm-text variant="xsmall-regular">View All</wcm-text></button>`;
|
|
3308
|
+
}
|
|
3309
|
+
};
|
|
3310
|
+
tr.styles = [O.globalCss, ga], tr = wa([k("wcm-view-all-wallets-button")], tr);
|
|
3311
|
+
const va = I`.wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;
|
|
3312
|
+
var ba = Object.defineProperty, ya = Object.getOwnPropertyDescriptor, ie = (e, t, r, n) => {
|
|
3313
|
+
for (var o = n > 1 ? void 0 : n ? ya(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3314
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3315
|
+
return n && o && ba(t, r, o), o;
|
|
3316
|
+
};
|
|
3317
|
+
let xt = class extends A {
|
|
3318
|
+
constructor() {
|
|
3319
|
+
super(), this.walletId = "", this.imageId = "", this.uri = "", setTimeout(() => {
|
|
3320
|
+
const { walletConnectUri: e } = K.state;
|
|
3321
|
+
this.uri = e;
|
|
3322
|
+
}, 0);
|
|
3323
|
+
}
|
|
3324
|
+
get overlayEl() {
|
|
3325
|
+
return x.getShadowRootElement(this, ".wcm-qr-container");
|
|
3326
|
+
}
|
|
3327
|
+
render() {
|
|
3328
|
+
return m`<div class="wcm-qr-container">${this.uri ? m`<wcm-qrcode size="${this.overlayEl.offsetWidth}" uri="${this.uri}" walletId="${j(this.walletId)}" imageId="${j(this.imageId)}"></wcm-qrcode>` : m`<wcm-spinner></wcm-spinner>`}</div>`;
|
|
3329
|
+
}
|
|
3330
|
+
};
|
|
3331
|
+
xt.styles = [O.globalCss, va], ie([$()], xt.prototype, "walletId", 2), ie([$()], xt.prototype, "imageId", 2), ie([H()], xt.prototype, "uri", 2), xt = ie([k("wcm-walletconnect-qr")], xt);
|
|
3332
|
+
var xa = Object.defineProperty, $a = Object.getOwnPropertyDescriptor, Ca = (e, t, r, n) => {
|
|
3333
|
+
for (var o = n > 1 ? void 0 : n ? $a(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3334
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3335
|
+
return n && o && xa(t, r, o), o;
|
|
3336
|
+
};
|
|
3337
|
+
let er = class extends A {
|
|
3338
|
+
viewTemplate() {
|
|
3339
|
+
return C.isAndroid() ? m`<wcm-android-wallet-selection></wcm-android-wallet-selection>` : C.isMobile() ? m`<wcm-mobile-wallet-selection></wcm-mobile-wallet-selection>` : m`<wcm-desktop-wallet-selection></wcm-desktop-wallet-selection>`;
|
|
3340
|
+
}
|
|
3341
|
+
render() {
|
|
3342
|
+
return m`${this.viewTemplate()}<wcm-legal-notice></wcm-legal-notice>`;
|
|
3343
|
+
}
|
|
3344
|
+
};
|
|
3345
|
+
er.styles = [O.globalCss], er = Ca([k("wcm-connect-wallet-view")], er);
|
|
3346
|
+
const Ea = I`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;
|
|
3347
|
+
var Aa = Object.defineProperty, _a = Object.getOwnPropertyDescriptor, eo = (e, t, r, n) => {
|
|
3348
|
+
for (var o = n > 1 ? void 0 : n ? _a(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3349
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3350
|
+
return n && o && Aa(t, r, o), o;
|
|
3351
|
+
};
|
|
3352
|
+
let se = class extends A {
|
|
3353
|
+
constructor() {
|
|
3354
|
+
super(), this.isError = !1, this.openDesktopApp();
|
|
3355
|
+
}
|
|
3356
|
+
onFormatAndRedirect(e) {
|
|
3357
|
+
const { desktop: t, name: r } = C.getWalletRouterData(), n = t == null ? void 0 : t.native;
|
|
3358
|
+
if (n) {
|
|
3359
|
+
const o = C.formatNativeUrl(n, e, r);
|
|
3360
|
+
C.openHref(o, "_self");
|
|
3361
|
+
}
|
|
3362
|
+
}
|
|
3363
|
+
openDesktopApp() {
|
|
3364
|
+
const { walletConnectUri: e } = K.state, t = C.getWalletRouterData();
|
|
3365
|
+
x.setRecentWallet(t), e && this.onFormatAndRedirect(e);
|
|
3366
|
+
}
|
|
3367
|
+
render() {
|
|
3368
|
+
const { name: e, id: t, image_id: r } = C.getWalletRouterData(), { isMobile: n, isWeb: o } = x.getCachedRouterWalletPlatforms();
|
|
3369
|
+
return m`<wcm-modal-header title="${e}" .onAction="${x.handleUriCopy}" .actionIcon="${T.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${t}" imageId="${j(r)}" label="${`Continue in ${e}...`}" .isError="${this.isError}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`Connection can continue loading if ${e} is not installed on your device`}</wcm-text><wcm-platform-selection .isMobile="${n}" .isWeb="${o}" .isRetry="${!0}"><wcm-button .onClick="${this.openDesktopApp.bind(this)}" .iconRight="${T.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection></wcm-info-footer>`;
|
|
3370
|
+
}
|
|
3371
|
+
};
|
|
3372
|
+
se.styles = [O.globalCss, Ea], eo([H()], se.prototype, "isError", 2), se = eo([k("wcm-desktop-connecting-view")], se);
|
|
3373
|
+
const Oa = I`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}wcm-button{margin-top:15px}`;
|
|
3374
|
+
var ka = Object.defineProperty, Ia = Object.getOwnPropertyDescriptor, Ta = (e, t, r, n) => {
|
|
3375
|
+
for (var o = n > 1 ? void 0 : n ? Ia(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3376
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3377
|
+
return n && o && ka(t, r, o), o;
|
|
3378
|
+
};
|
|
3379
|
+
let rr = class extends A {
|
|
3380
|
+
onInstall(e) {
|
|
3381
|
+
e && C.openHref(e, "_blank");
|
|
3382
|
+
}
|
|
3383
|
+
render() {
|
|
3384
|
+
const { name: e, id: t, image_id: r, homepage: n } = C.getWalletRouterData();
|
|
3385
|
+
return m`<wcm-modal-header title="${e}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${t}" imageId="${j(r)}" label="Not Detected" .isStale="${!0}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`Download ${e} to continue. If multiple browser extensions are installed, disable non ${e} ones and try again`}</wcm-text><wcm-button .onClick="${() => this.onInstall(n)}" .iconLeft="${T.ARROW_DOWN_ICON}">Download</wcm-button></wcm-info-footer>`;
|
|
3386
|
+
}
|
|
3387
|
+
};
|
|
3388
|
+
rr.styles = [O.globalCss, Oa], rr = Ta([k("wcm-install-wallet-view")], rr);
|
|
3389
|
+
const Pa = I`wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}wcm-info-footer{display:flex;width:100%}.wcm-app-store{justify-content:space-between}.wcm-app-store wcm-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--wcm-wallet-icon-small-border-radius)}.wcm-app-store div{display:flex;align-items:center}.wcm-app-store wcm-button{margin-right:-10px}.wcm-note{flex-direction:column;align-items:center;padding:5px 0}.wcm-note wcm-text{text-align:center}wcm-platform-selection{margin-top:-15px}.wcm-note wcm-text{margin-top:15px}.wcm-note wcm-text span{color:var(--wcm-accent-color)}`;
|
|
3390
|
+
var Ma = Object.defineProperty, Sa = Object.getOwnPropertyDescriptor, ro = (e, t, r, n) => {
|
|
3391
|
+
for (var o = n > 1 ? void 0 : n ? Sa(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3392
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3393
|
+
return n && o && Ma(t, r, o), o;
|
|
3394
|
+
};
|
|
3395
|
+
let ae = class extends A {
|
|
3396
|
+
constructor() {
|
|
3397
|
+
super(), this.isError = !1, this.openMobileApp();
|
|
3398
|
+
}
|
|
3399
|
+
onFormatAndRedirect(e, t = !1) {
|
|
3400
|
+
const { mobile: r, name: n } = C.getWalletRouterData(), o = r == null ? void 0 : r.native, i = r == null ? void 0 : r.universal;
|
|
3401
|
+
if (o && !t) {
|
|
3402
|
+
const s = C.formatNativeUrl(o, e, n);
|
|
3403
|
+
C.openHref(s, "_self");
|
|
3404
|
+
} else if (i) {
|
|
3405
|
+
const s = C.formatUniversalUrl(i, e, n);
|
|
3406
|
+
C.openHref(s, "_self");
|
|
3407
|
+
}
|
|
3408
|
+
}
|
|
3409
|
+
openMobileApp(e = !1) {
|
|
3410
|
+
const { walletConnectUri: t } = K.state, r = C.getWalletRouterData();
|
|
3411
|
+
x.setRecentWallet(r), t && this.onFormatAndRedirect(t, e);
|
|
3412
|
+
}
|
|
3413
|
+
onGoToAppStore(e) {
|
|
3414
|
+
e && C.openHref(e, "_blank");
|
|
3415
|
+
}
|
|
3416
|
+
render() {
|
|
3417
|
+
const { name: e, id: t, image_id: r, app: n, mobile: o } = C.getWalletRouterData(), { isWeb: i } = x.getCachedRouterWalletPlatforms(), s = n == null ? void 0 : n.ios, a = o == null ? void 0 : o.universal;
|
|
3418
|
+
return m`<wcm-modal-header title="${e}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${t}" imageId="${j(r)}" label="Tap 'Open' to continue…" .isError="${this.isError}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer class="wcm-note"><wcm-platform-selection .isWeb="${i}" .isRetry="${!0}"><wcm-button .onClick="${() => this.openMobileApp(!1)}" .iconRight="${T.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection>${a ? m`<wcm-text color="secondary" variant="small-thin">Still doesn't work? <span tabindex="0" @click="${() => this.openMobileApp(!0)}">Try this alternate link</span></wcm-text>` : null}</wcm-info-footer><wcm-info-footer class="wcm-app-store"><div><wcm-wallet-image walletId="${t}" imageId="${j(r)}"></wcm-wallet-image><wcm-text>${`Get ${e}`}</wcm-text></div><wcm-button .iconRight="${T.ARROW_RIGHT_ICON}" .onClick="${() => this.onGoToAppStore(s)}" variant="ghost">App Store</wcm-button></wcm-info-footer>`;
|
|
3419
|
+
}
|
|
3420
|
+
};
|
|
3421
|
+
ae.styles = [O.globalCss, Pa], ro([H()], ae.prototype, "isError", 2), ae = ro([k("wcm-mobile-connecting-view")], ae);
|
|
3422
|
+
const Ra = I`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;
|
|
3423
|
+
var La = Object.defineProperty, Na = Object.getOwnPropertyDescriptor, Ba = (e, t, r, n) => {
|
|
3424
|
+
for (var o = n > 1 ? void 0 : n ? Na(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3425
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3426
|
+
return n && o && La(t, r, o), o;
|
|
3427
|
+
};
|
|
3428
|
+
let or = class extends A {
|
|
3429
|
+
render() {
|
|
3430
|
+
const { name: e, id: t, image_id: r } = C.getWalletRouterData(), { isDesktop: n, isWeb: o } = x.getCachedRouterWalletPlatforms();
|
|
3431
|
+
return m`<wcm-modal-header title="${e}" .onAction="${x.handleUriCopy}" .actionIcon="${T.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-walletconnect-qr walletId="${t}" imageId="${j(r)}"></wcm-walletconnect-qr></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`Scan this QR Code with your phone's camera or inside ${e} app`}</wcm-text><wcm-platform-selection .isDesktop="${n}" .isWeb="${o}"></wcm-platform-selection></wcm-info-footer>`;
|
|
3432
|
+
}
|
|
3433
|
+
};
|
|
3434
|
+
or.styles = [O.globalCss, Ra], or = Ba([k("wcm-mobile-qr-connecting-view")], or);
|
|
3435
|
+
var Da = Object.defineProperty, Ua = Object.getOwnPropertyDescriptor, ja = (e, t, r, n) => {
|
|
3436
|
+
for (var o = n > 1 ? void 0 : n ? Ua(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3437
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3438
|
+
return n && o && Da(t, r, o), o;
|
|
3439
|
+
};
|
|
3440
|
+
let nr = class extends A {
|
|
3441
|
+
render() {
|
|
3442
|
+
return m`<wcm-modal-header title="Scan the code" .onAction="${x.handleUriCopy}" .actionIcon="${T.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-walletconnect-qr></wcm-walletconnect-qr></wcm-modal-content>`;
|
|
3443
|
+
}
|
|
3444
|
+
};
|
|
3445
|
+
nr.styles = [O.globalCss], nr = ja([k("wcm-qrcode-view")], nr);
|
|
3446
|
+
const Wa = I`wcm-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}wcm-modal-content::after,wcm-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}wcm-modal-content::before{box-shadow:0 -1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(var(--wcm-color-bg-1),rgba(255,255,255,0))}wcm-modal-content::after{box-shadow:0 1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--wcm-color-bg-1));top:calc(100% - 20px)}wcm-modal-content::-webkit-scrollbar{display:none}.wcm-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.wcm-empty,.wcm-loading{display:flex}.wcm-loading .wcm-placeholder-block{height:100%}.wcm-end-reached .wcm-placeholder-block{height:0;opacity:0}.wcm-empty .wcm-placeholder-block{opacity:1;height:100%}wcm-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;
|
|
3447
|
+
var Ha = Object.defineProperty, za = Object.getOwnPropertyDescriptor, Wt = (e, t, r, n) => {
|
|
3448
|
+
for (var o = n > 1 ? void 0 : n ? za(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3449
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3450
|
+
return n && o && Ha(t, r, o), o;
|
|
3451
|
+
};
|
|
3452
|
+
const ir = 40;
|
|
3453
|
+
let ht = class extends A {
|
|
3454
|
+
constructor() {
|
|
3455
|
+
super(...arguments), this.loading = !W.state.wallets.listings.length, this.firstFetch = !W.state.wallets.listings.length, this.search = "", this.endReached = !1, this.intersectionObserver = void 0, this.searchDebounce = x.debounce((e) => {
|
|
3456
|
+
e.length >= 1 ? (this.firstFetch = !0, this.endReached = !1, this.search = e, W.resetSearch(), this.fetchWallets()) : this.search && (this.search = "", this.endReached = this.isLastPage(), W.resetSearch());
|
|
3457
|
+
});
|
|
3458
|
+
}
|
|
3459
|
+
firstUpdated() {
|
|
3460
|
+
this.createPaginationObserver();
|
|
3461
|
+
}
|
|
3462
|
+
disconnectedCallback() {
|
|
3463
|
+
var e;
|
|
3464
|
+
(e = this.intersectionObserver) == null || e.disconnect();
|
|
3465
|
+
}
|
|
3466
|
+
get placeholderEl() {
|
|
3467
|
+
return x.getShadowRootElement(this, ".wcm-placeholder-block");
|
|
3468
|
+
}
|
|
3469
|
+
createPaginationObserver() {
|
|
3470
|
+
this.intersectionObserver = new IntersectionObserver(([e]) => {
|
|
3471
|
+
e.isIntersecting && !(this.search && this.firstFetch) && this.fetchWallets();
|
|
3472
|
+
}), this.intersectionObserver.observe(this.placeholderEl);
|
|
3473
|
+
}
|
|
3474
|
+
isLastPage() {
|
|
3475
|
+
const { wallets: e, search: t } = W.state, { listings: r, total: n } = this.search ? t : e;
|
|
3476
|
+
return n <= ir || r.length >= n;
|
|
3477
|
+
}
|
|
3478
|
+
async fetchWallets() {
|
|
3479
|
+
var e;
|
|
3480
|
+
const { wallets: t, search: r } = W.state, { listings: n, total: o, page: i } = this.search ? r : t;
|
|
3481
|
+
if (!this.endReached && (this.firstFetch || o > ir && n.length < o))
|
|
3482
|
+
try {
|
|
3483
|
+
this.loading = !0;
|
|
3484
|
+
const s = (e = K.state.chains) == null ? void 0 : e.join(","), { listings: a } = await W.getWallets({ page: this.firstFetch ? 1 : i + 1, entries: ir, search: this.search, version: 2, chains: s }), l = a.map((c) => x.getWalletIcon(c));
|
|
3485
|
+
await Promise.all([...l.map(async (c) => x.preloadImage(c)), C.wait(300)]), this.endReached = this.isLastPage();
|
|
3486
|
+
} catch (s) {
|
|
3487
|
+
console.error(s), ot.openToast(x.getErrorMessage(s), "error");
|
|
3488
|
+
} finally {
|
|
3489
|
+
this.loading = !1, this.firstFetch = !1;
|
|
3490
|
+
}
|
|
3491
|
+
}
|
|
3492
|
+
onConnect(e) {
|
|
3493
|
+
C.isAndroid() ? x.handleMobileLinking(e) : x.goToConnectingView(e);
|
|
3494
|
+
}
|
|
3495
|
+
onSearchChange(e) {
|
|
3496
|
+
const { value: t } = e.target;
|
|
3497
|
+
this.searchDebounce(t);
|
|
3498
|
+
}
|
|
3499
|
+
render() {
|
|
3500
|
+
const { wallets: e, search: t } = W.state, { listings: r } = this.search ? t : e, n = this.loading && !r.length, o = this.search.length >= 3;
|
|
3501
|
+
let i = st.manualWalletsTemplate(), s = st.recomendedWalletsTemplate(!0);
|
|
3502
|
+
o && (i = i.filter(({ values: c }) => x.caseSafeIncludes(c[0], this.search)), s = s.filter(({ values: c }) => x.caseSafeIncludes(c[0], this.search)));
|
|
3503
|
+
const a = !this.loading && !r.length && !s.length, l = { "wcm-loading": n, "wcm-end-reached": this.endReached || !this.loading, "wcm-empty": a };
|
|
3504
|
+
return m`<wcm-modal-header><wcm-search-input .onChange="${this.onSearchChange.bind(this)}"></wcm-search-input></wcm-modal-header><wcm-modal-content class="${G(l)}"><div class="wcm-grid">${n ? null : i} ${n ? null : s} ${n ? null : r.map((c) => m`${c ? m`<wcm-wallet-button imageId="${c.image_id}" name="${c.name}" walletId="${c.id}" .onClick="${() => this.onConnect(c)}"></wcm-wallet-button>` : null}`)}</div><div class="wcm-placeholder-block">${a ? m`<wcm-text variant="big-bold" color="secondary">No results found</wcm-text>` : null} ${!a && this.loading ? m`<wcm-spinner></wcm-spinner>` : null}</div></wcm-modal-content>`;
|
|
3505
|
+
}
|
|
3506
|
+
};
|
|
3507
|
+
ht.styles = [O.globalCss, Wa], Wt([H()], ht.prototype, "loading", 2), Wt([H()], ht.prototype, "firstFetch", 2), Wt([H()], ht.prototype, "search", 2), Wt([H()], ht.prototype, "endReached", 2), ht = Wt([k("wcm-wallet-explorer-view")], ht);
|
|
3508
|
+
const Fa = I`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;
|
|
3509
|
+
var Za = Object.defineProperty, Va = Object.getOwnPropertyDescriptor, oo = (e, t, r, n) => {
|
|
3510
|
+
for (var o = n > 1 ? void 0 : n ? Va(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
3511
|
+
(s = e[i]) && (o = (n ? s(t, r, o) : s(o)) || o);
|
|
3512
|
+
return n && o && Za(t, r, o), o;
|
|
3513
|
+
};
|
|
3514
|
+
let le = class extends A {
|
|
3515
|
+
constructor() {
|
|
3516
|
+
super(), this.isError = !1, this.openWebWallet();
|
|
3517
|
+
}
|
|
3518
|
+
onFormatAndRedirect(e) {
|
|
3519
|
+
const { desktop: t, name: r } = C.getWalletRouterData(), n = t == null ? void 0 : t.universal;
|
|
3520
|
+
if (n) {
|
|
3521
|
+
const o = C.formatUniversalUrl(n, e, r);
|
|
3522
|
+
C.openHref(o, "_blank");
|
|
3523
|
+
}
|
|
3524
|
+
}
|
|
3525
|
+
openWebWallet() {
|
|
3526
|
+
const { walletConnectUri: e } = K.state, t = C.getWalletRouterData();
|
|
3527
|
+
x.setRecentWallet(t), e && this.onFormatAndRedirect(e);
|
|
3528
|
+
}
|
|
3529
|
+
render() {
|
|
3530
|
+
const { name: e, id: t, image_id: r } = C.getWalletRouterData(), { isMobile: n, isDesktop: o } = x.getCachedRouterWalletPlatforms(), i = C.isMobile();
|
|
3531
|
+
return m`<wcm-modal-header title="${e}" .onAction="${x.handleUriCopy}" .actionIcon="${T.COPY_ICON}"></wcm-modal-header><wcm-modal-content><wcm-connector-waiting walletId="${t}" imageId="${j(r)}" label="${`Continue in ${e}...`}" .isError="${this.isError}"></wcm-connector-waiting></wcm-modal-content><wcm-info-footer><wcm-text color="secondary" variant="small-thin">${`${e} web app has opened in a new tab. Go there, accept the connection, and come back`}</wcm-text><wcm-platform-selection .isMobile="${n}" .isDesktop="${i ? !1 : o}" .isRetry="${!0}"><wcm-button .onClick="${this.openWebWallet.bind(this)}" .iconRight="${T.RETRY_ICON}">Retry</wcm-button></wcm-platform-selection></wcm-info-footer>`;
|
|
3532
|
+
}
|
|
3533
|
+
};
|
|
3534
|
+
le.styles = [O.globalCss, Fa], oo([H()], le.prototype, "isError", 2), le = oo([k("wcm-web-connecting-view")], le);
|
|
3535
|
+
export {
|
|
3536
|
+
Ut as WcmModal,
|
|
3537
|
+
X as WcmQrCode
|
|
3538
|
+
};
|
|
3539
|
+
//# sourceMappingURL=index-DQPobPMI.js.map
|