@incodetech/web 2.0.0-alpha.5 → 2.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base.css +230 -0
- package/dist/email/email.es.js +3 -3
- package/dist/flow/flow.es.js +555 -7
- package/dist/flow/styles.css +419 -189
- package/dist/{incodeModule-DFQUQvfY.js → incodeModule-BuCBWati.js} +47 -46
- package/dist/index.es.js +4 -99
- package/dist/{title-ng7q7YDh.js → instance-B-q0ZREN.js} +194 -215
- package/dist/{otpInput-BUrV4IAF.js → otpInput-cq1THeRd.js} +1 -1
- package/dist/phone/phone.es.js +3 -4
- package/dist/{button-DeMZ_34N.js → preact-custom-element.esm-BGQkPkOv.js} +145 -166
- package/dist/selfie/selfie.es.js +63 -63
- package/dist/selfie/styles.css +267 -787
- package/dist/setup-wNL83jmW.js +20 -0
- package/dist/title-XSxhaBDx.js +25 -0
- package/dist/types/email/email.d.ts +1 -1
- package/dist/types/email/styles.d.ts +1 -0
- package/dist/types/email.d.ts +1 -1
- package/dist/types/flow/flow.d.ts +1 -1
- package/dist/types/flow/styles.d.ts +1 -0
- package/dist/types/flow.d.ts +2 -2
- package/dist/types/index.d.ts +4 -99
- package/dist/types/phone/phone.d.ts +1 -1
- package/dist/types/phone/styles.d.ts +1 -0
- package/dist/types/phone.d.ts +1 -1
- package/dist/types/selfie/selfie.d.ts +1 -1
- package/dist/types/selfie/styles.d.ts +1 -0
- package/dist/types/selfie.d.ts +1 -1
- package/dist/types/styles.d.ts +1 -0
- package/dist/uiConfig-CQ1W9cUD.js +23 -0
- package/package.json +6 -5
- package/dist/button.css +0 -335
- package/dist/flow-ZK6OBsa3.js +0 -568
- package/dist/incodeModule.css +0 -119
- package/dist/otpInput.css +0 -167
- package/dist/successIcon.css +0 -4
- package/dist/title.css +0 -38
|
@@ -1,111 +1,33 @@
|
|
|
1
|
-
import { l as m,
|
|
2
|
-
var
|
|
3
|
-
function s(e,
|
|
4
|
-
|
|
5
|
-
var a, i, l =
|
|
6
|
-
if ("ref" in l) for (i in l = {},
|
|
7
|
-
var d = { type: e, props: l, key:
|
|
1
|
+
import { l as m, d as S, y as w, _ as p, J as H, G as h, K as _, k as V } from "./vendor-preact-CK0WeTOR.js";
|
|
2
|
+
var z = 0;
|
|
3
|
+
function s(e, n, t, r, c, o) {
|
|
4
|
+
n || (n = {});
|
|
5
|
+
var a, i, l = n;
|
|
6
|
+
if ("ref" in l) for (i in l = {}, n) i == "ref" ? a = n[i] : l[i] = n[i];
|
|
7
|
+
var d = { type: e, props: l, key: t, ref: a, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --z, __i: -1, __u: 0, __source: c, __self: o };
|
|
8
8
|
if (typeof e == "function" && (a = e.defaultProps)) for (i in a) l[i] === void 0 && (l[i] = a[i]);
|
|
9
9
|
return m.vnode && m.vnode(d), d;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
14
|
-
var n = arguments[t];
|
|
15
|
-
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
16
|
-
}
|
|
17
|
-
return e;
|
|
18
|
-
}, p.apply(this, arguments);
|
|
19
|
-
}
|
|
20
|
-
function g(e, t) {
|
|
21
|
-
if (e == null) return {};
|
|
22
|
-
var n, r, c = {}, o = Object.keys(e);
|
|
23
|
-
for (r = 0; r < o.length; r++) t.indexOf(n = o[r]) >= 0 || (c[n] = e[n]);
|
|
24
|
-
return c;
|
|
25
|
-
}
|
|
26
|
-
var O = ["context", "children"], j = ["useFragment"];
|
|
27
|
-
function K(e, t, n, r) {
|
|
28
|
-
function c() {
|
|
29
|
-
var o, a = Reflect.construct(HTMLElement, [], c);
|
|
30
|
-
return a._vdomComponent = e, r && r.shadow ? (a._root = a.attachShadow({ mode: r.mode || "open", serializable: (o = r.serializable) != null && o }), r.adoptedStyleSheets && (a._root.adoptedStyleSheets = r.adoptedStyleSheets)) : a._root = a, a;
|
|
31
|
-
}
|
|
32
|
-
return (c.prototype = Object.create(HTMLElement.prototype)).constructor = c, c.prototype.connectedCallback = function() {
|
|
33
|
-
B.call(this, r);
|
|
34
|
-
}, c.prototype.attributeChangedCallback = E, c.prototype.disconnectedCallback = P, n = n || e.observedAttributes || Object.keys(e.propTypes || {}), c.observedAttributes = n, e.formAssociated && (c.formAssociated = !0), n.forEach(function(o) {
|
|
35
|
-
Object.defineProperty(c.prototype, o, { get: function() {
|
|
36
|
-
return this._vdom ? this._vdom.props[o] : this._props[o];
|
|
37
|
-
}, set: function(a) {
|
|
38
|
-
this._vdom ? this.attributeChangedCallback(o, null, a) : (this._props || (this._props = {}), this._props[o] = a);
|
|
39
|
-
var i = typeof a;
|
|
40
|
-
a != null && i !== "string" && i !== "boolean" && i !== "number" || this.setAttribute(o, a);
|
|
41
|
-
} });
|
|
42
|
-
}), customElements.define(t || e.tagName || e.displayName || e.name, c), c;
|
|
43
|
-
}
|
|
44
|
-
function $(e) {
|
|
45
|
-
this.getChildContext = function() {
|
|
46
|
-
return e.context;
|
|
47
|
-
};
|
|
48
|
-
var t = e.children, n = g(e, O);
|
|
49
|
-
return b(t, n);
|
|
50
|
-
}
|
|
51
|
-
function B(e) {
|
|
52
|
-
var t = new CustomEvent("_preact", { detail: {}, bubbles: !0, cancelable: !0 });
|
|
53
|
-
this.dispatchEvent(t), this._vdom = u($, p({}, this._props, { context: t.detail.context }), C(this, this._vdomComponent, e)), (this.hasAttribute("hydrate") ? V : h)(this._vdom, this._root);
|
|
54
|
-
}
|
|
55
|
-
function y(e) {
|
|
56
|
-
return e.replace(/-(\w)/g, function(t, n) {
|
|
57
|
-
return n ? n.toUpperCase() : "";
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
function E(e, t, n) {
|
|
61
|
-
if (this._vdom) {
|
|
62
|
-
var r = {};
|
|
63
|
-
r[e] = n = n ?? void 0, r[y(e)] = n, this._vdom = b(this._vdom, r), h(this._vdom, this._root);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
function P() {
|
|
67
|
-
h(this._vdom = null, this._root);
|
|
68
|
-
}
|
|
69
|
-
function _(e, t) {
|
|
70
|
-
var n = this, r = e.useFragment, c = g(e, j);
|
|
71
|
-
return u(r ? z : "slot", p({}, c, { ref: function(o) {
|
|
72
|
-
o ? (n.ref = o, n._listener || (n._listener = function(a) {
|
|
73
|
-
a.stopPropagation(), a.detail.context = t;
|
|
74
|
-
}, o.addEventListener("_preact", n._listener))) : n.ref.removeEventListener("_preact", n._listener);
|
|
75
|
-
} }));
|
|
76
|
-
}
|
|
77
|
-
function C(e, t, n) {
|
|
78
|
-
if (e.nodeType === 3) return e.data;
|
|
79
|
-
if (e.nodeType !== 1) return null;
|
|
80
|
-
var r = [], c = {}, o = 0, a = e.attributes, i = e.childNodes;
|
|
81
|
-
for (o = a.length; o--; ) a[o].name !== "slot" && (c[a[o].name] = a[o].value, c[y(a[o].name)] = a[o].value);
|
|
82
|
-
for (o = i.length; o--; ) {
|
|
83
|
-
var l = C(i[o], null, n), d = i[o].slot;
|
|
84
|
-
d ? c[d] = u(_, { name: d }, l) : r[o] = l;
|
|
85
|
-
}
|
|
86
|
-
var S = !(!n || !n.shadow), H = t ? u(_, { useFragment: !S }, r) : r;
|
|
87
|
-
return !S && t && (e.innerHTML = ""), u(t || e.nodeName.toLowerCase(), c, H);
|
|
88
|
-
}
|
|
89
|
-
function R(e, t = {}) {
|
|
90
|
-
const { autoLoad: n = !0 } = t, [r] = I(e), [c, o] = I(
|
|
11
|
+
function F(e, n = {}) {
|
|
12
|
+
const { autoLoad: t = !0 } = n, [r] = S(e), [c, o] = S(
|
|
91
13
|
() => r.getState()
|
|
92
14
|
);
|
|
93
|
-
return
|
|
94
|
-
}
|
|
95
|
-
const
|
|
96
|
-
const
|
|
97
|
-
for (const
|
|
98
|
-
if (
|
|
99
|
-
if (typeof
|
|
100
|
-
|
|
101
|
-
else if (typeof
|
|
102
|
-
for (const [r, c] of Object.entries(
|
|
103
|
-
c &&
|
|
15
|
+
return w(() => (t && r.load && r.load(), r.subscribe(o)), [r, t]), [c, r];
|
|
16
|
+
}
|
|
17
|
+
const f = (...e) => {
|
|
18
|
+
const n = [];
|
|
19
|
+
for (const t of e)
|
|
20
|
+
if (t) {
|
|
21
|
+
if (typeof t == "string")
|
|
22
|
+
n.push(t);
|
|
23
|
+
else if (typeof t == "object")
|
|
24
|
+
for (const [r, c] of Object.entries(t))
|
|
25
|
+
c && n.push(r);
|
|
104
26
|
}
|
|
105
|
-
return
|
|
106
|
-
},
|
|
27
|
+
return n.join(" ");
|
|
28
|
+
}, L = ({
|
|
107
29
|
size: e,
|
|
108
|
-
className:
|
|
30
|
+
className: n
|
|
109
31
|
}) => /* @__PURE__ */ s(
|
|
110
32
|
"svg",
|
|
111
33
|
{
|
|
@@ -114,15 +36,15 @@ const v = (...e) => {
|
|
|
114
36
|
viewBox: "0 0 31 31",
|
|
115
37
|
fill: "none",
|
|
116
38
|
xmlns: "http://www.w3.org/2000/svg",
|
|
117
|
-
class:
|
|
39
|
+
class: f("IncodeLoadingIconPrimaryIcon", n),
|
|
118
40
|
children: [
|
|
119
41
|
/* @__PURE__ */ s("title", { children: "Spinner Inner part" }),
|
|
120
42
|
/* @__PURE__ */ s("path", { d: "M28.1614 15.2837C29.453 15.2837 30.5186 14.2304 30.3181 12.9545C30.1344 11.7862 29.8129 10.6411 29.3582 9.54344C28.6044 7.72356 27.4995 6.06997 26.1066 4.67709C24.7137 3.28421 23.0601 2.17932 21.2403 1.4255C20.1426 0.970841 18.9974 0.649265 17.8292 0.46563C16.5533 0.265073 15.5 1.33073 15.5 2.62232C15.5 3.91391 16.5601 4.93461 17.8187 5.22473C18.3748 5.35291 18.9206 5.52729 19.4503 5.74672C20.7028 6.26548 21.8407 7.02585 22.7993 7.98441C23.7578 8.94296 24.5182 10.0809 25.037 11.3333C25.2564 11.8631 25.4308 12.4089 25.559 12.965C25.8491 14.2236 26.8698 15.2837 28.1614 15.2837Z" })
|
|
121
43
|
]
|
|
122
44
|
}
|
|
123
|
-
),
|
|
45
|
+
), k = ({
|
|
124
46
|
size: e,
|
|
125
|
-
className:
|
|
47
|
+
className: n
|
|
126
48
|
}) => /* @__PURE__ */ s(
|
|
127
49
|
"svg",
|
|
128
50
|
{
|
|
@@ -131,20 +53,48 @@ const v = (...e) => {
|
|
|
131
53
|
viewBox: "0 0 31 31",
|
|
132
54
|
fill: "none",
|
|
133
55
|
xmlns: "http://www.w3.org/2000/svg",
|
|
134
|
-
class:
|
|
56
|
+
class: f("IncodeLoadingIconSecondaryIcon", n),
|
|
135
57
|
children: [
|
|
136
58
|
/* @__PURE__ */ s("title", { children: "Spinner Outer part" }),
|
|
137
59
|
/* @__PURE__ */ s("path", { d: "M30.5 15.2837C30.5 23.568 23.7843 30.2837 15.5 30.2837C7.21573 30.2837 0.5 23.568 0.5 15.2837C0.5 6.99942 7.21573 0.283691 15.5 0.283691C23.7843 0.283691 30.5 6.99942 30.5 15.2837ZM5.17725 15.2837C5.17725 20.9848 9.7989 25.6064 15.5 25.6064C21.2011 25.6064 25.8227 20.9848 25.8227 15.2837C25.8227 9.5826 21.2011 4.96095 15.5 4.96095C9.7989 4.96095 5.17725 9.5826 5.17725 15.2837Z" })
|
|
138
60
|
]
|
|
139
61
|
}
|
|
140
|
-
),
|
|
62
|
+
), x = ({
|
|
141
63
|
size: e = 30,
|
|
142
|
-
secondaryClass:
|
|
143
|
-
primaryClass:
|
|
64
|
+
secondaryClass: n,
|
|
65
|
+
primaryClass: t
|
|
144
66
|
}) => /* @__PURE__ */ s("div", { class: "IncodeLoadingIcon", children: [
|
|
145
|
-
/* @__PURE__ */ s(
|
|
146
|
-
/* @__PURE__ */ s("div", { class: "IncodeLoadingIconPrimary", children: /* @__PURE__ */ s(
|
|
147
|
-
] }),
|
|
67
|
+
/* @__PURE__ */ s(k, { size: e, className: n }),
|
|
68
|
+
/* @__PURE__ */ s("div", { class: "IncodeLoadingIconPrimary", children: /* @__PURE__ */ s(L, { size: e, className: t }) })
|
|
69
|
+
] }), O = {
|
|
70
|
+
primary: "IncodeButtonPrimary",
|
|
71
|
+
link: "IncodeButtonLink"
|
|
72
|
+
}, Z = (e) => {
|
|
73
|
+
const {
|
|
74
|
+
isLoading: n = !1,
|
|
75
|
+
variant: t = "primary",
|
|
76
|
+
class: r,
|
|
77
|
+
type: c = "button",
|
|
78
|
+
children: o,
|
|
79
|
+
disabled: a,
|
|
80
|
+
...i
|
|
81
|
+
} = e;
|
|
82
|
+
return /* @__PURE__ */ s(
|
|
83
|
+
"button",
|
|
84
|
+
{
|
|
85
|
+
...i,
|
|
86
|
+
class: f(
|
|
87
|
+
"IncodeButton",
|
|
88
|
+
n ? "IncodeButtonLoading" : "",
|
|
89
|
+
O[t],
|
|
90
|
+
r
|
|
91
|
+
),
|
|
92
|
+
disabled: a || n,
|
|
93
|
+
type: c,
|
|
94
|
+
children: n ? /* @__PURE__ */ s(x, { size: 30 }) : o
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
}, j = /* @__PURE__ */ new Set([
|
|
148
98
|
0,
|
|
149
99
|
2,
|
|
150
100
|
4,
|
|
@@ -163,7 +113,7 @@ const v = (...e) => {
|
|
|
163
113
|
120,
|
|
164
114
|
160,
|
|
165
115
|
200
|
|
166
|
-
]),
|
|
116
|
+
]), $ = (e, n) => n === "horizontal" ? {
|
|
167
117
|
0: "IncodeSpacerHorizontal0",
|
|
168
118
|
2: "IncodeSpacerHorizontal2",
|
|
169
119
|
4: "IncodeSpacerHorizontal4",
|
|
@@ -201,66 +151,95 @@ const v = (...e) => {
|
|
|
201
151
|
120: "IncodeSpacerVertical120",
|
|
202
152
|
160: "IncodeSpacerVertical160",
|
|
203
153
|
200: "IncodeSpacerVertical200"
|
|
204
|
-
}[e],
|
|
154
|
+
}[e], G = ({
|
|
205
155
|
size: e,
|
|
206
|
-
className:
|
|
207
|
-
direction:
|
|
208
|
-
}) => e === void 0 ? /* @__PURE__ */ s("div", { class: `IncodeSpacerFlex ${
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
156
|
+
className: n,
|
|
157
|
+
direction: t = "vertical"
|
|
158
|
+
}) => e === void 0 ? /* @__PURE__ */ s("div", { class: `IncodeSpacerFlex ${n || ""}` }) : (t === "horizontal" ? "w" : t === "vertical" ? "h" : void 0) ? typeof e == "number" && j.has(e) ? /* @__PURE__ */ s("div", { class: `${$(e, t)} ${n || ""}` }) : /* @__PURE__ */ s("div", { class: `${n || ""}` }) : /* @__PURE__ */ s("div", { class: `${n || ""}` });
|
|
159
|
+
function u() {
|
|
160
|
+
return u = Object.assign ? Object.assign.bind() : function(e) {
|
|
161
|
+
for (var n = 1; n < arguments.length; n++) {
|
|
162
|
+
var t = arguments[n];
|
|
163
|
+
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
|
|
164
|
+
}
|
|
165
|
+
return e;
|
|
166
|
+
}, u.apply(this, arguments);
|
|
167
|
+
}
|
|
168
|
+
function b(e, n) {
|
|
169
|
+
if (e == null) return {};
|
|
170
|
+
var t, r, c = {}, o = Object.keys(e);
|
|
171
|
+
for (r = 0; r < o.length; r++) n.indexOf(t = o[r]) >= 0 || (c[t] = e[t]);
|
|
172
|
+
return c;
|
|
173
|
+
}
|
|
174
|
+
var B = ["context", "children"], E = ["useFragment"];
|
|
175
|
+
function J(e, n, t, r) {
|
|
176
|
+
function c() {
|
|
177
|
+
var o, a = Reflect.construct(HTMLElement, [], c);
|
|
178
|
+
return a._vdomComponent = e, r && r.shadow ? (a._root = a.attachShadow({ mode: r.mode || "open", serializable: (o = r.serializable) != null && o }), r.adoptedStyleSheets && (a._root.adoptedStyleSheets = r.adoptedStyleSheets)) : a._root = a, a;
|
|
179
|
+
}
|
|
180
|
+
return (c.prototype = Object.create(HTMLElement.prototype)).constructor = c, c.prototype.connectedCallback = function() {
|
|
181
|
+
T.call(this, r);
|
|
182
|
+
}, c.prototype.attributeChangedCallback = M, c.prototype.disconnectedCallback = A, t = t || e.observedAttributes || Object.keys(e.propTypes || {}), c.observedAttributes = t, e.formAssociated && (c.formAssociated = !0), t.forEach(function(o) {
|
|
183
|
+
Object.defineProperty(c.prototype, o, { get: function() {
|
|
184
|
+
return this._vdom ? this._vdom.props[o] : this._props[o];
|
|
185
|
+
}, set: function(a) {
|
|
186
|
+
this._vdom ? this.attributeChangedCallback(o, null, a) : (this._props || (this._props = {}), this._props[o] = a);
|
|
187
|
+
var i = typeof a;
|
|
188
|
+
a != null && i !== "string" && i !== "boolean" && i !== "number" || this.setAttribute(o, a);
|
|
189
|
+
} });
|
|
190
|
+
}), customElements.define(n || e.tagName || e.displayName || e.name, c), c;
|
|
191
|
+
}
|
|
192
|
+
function P(e) {
|
|
193
|
+
this.getChildContext = function() {
|
|
194
|
+
return e.context;
|
|
214
195
|
};
|
|
196
|
+
var n = e.children, t = b(e, B);
|
|
197
|
+
return _(n, t);
|
|
215
198
|
}
|
|
216
|
-
function
|
|
217
|
-
|
|
199
|
+
function T(e) {
|
|
200
|
+
var n = new CustomEvent("_preact", { detail: {}, bubbles: !0, cancelable: !0 });
|
|
201
|
+
this.dispatchEvent(n), this._vdom = p(P, u({}, this._props, { context: n.detail.context }), y(this, this._vdomComponent, e)), (this.hasAttribute("hydrate") ? H : h)(this._vdom, this._root);
|
|
218
202
|
}
|
|
219
|
-
function
|
|
220
|
-
w
|
|
221
|
-
|
|
222
|
-
|
|
203
|
+
function g(e) {
|
|
204
|
+
return e.replace(/-(\w)/g, function(n, t) {
|
|
205
|
+
return t ? t.toUpperCase() : "";
|
|
206
|
+
});
|
|
223
207
|
}
|
|
224
|
-
function
|
|
225
|
-
|
|
208
|
+
function M(e, n, t) {
|
|
209
|
+
if (this._vdom) {
|
|
210
|
+
var r = {};
|
|
211
|
+
r[e] = t = t ?? void 0, r[g(e)] = t, this._vdom = _(this._vdom, r), h(this._vdom, this._root);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
function A() {
|
|
215
|
+
h(this._vdom = null, this._root);
|
|
216
|
+
}
|
|
217
|
+
function I(e, n) {
|
|
218
|
+
var t = this, r = e.useFragment, c = b(e, E);
|
|
219
|
+
return p(r ? V : "slot", u({}, c, { ref: function(o) {
|
|
220
|
+
o ? (t.ref = o, t._listener || (t._listener = function(a) {
|
|
221
|
+
a.stopPropagation(), a.detail.context = n;
|
|
222
|
+
}, o.addEventListener("_preact", t._listener))) : t.ref.removeEventListener("_preact", t._listener);
|
|
223
|
+
} }));
|
|
224
|
+
}
|
|
225
|
+
function y(e, n, t) {
|
|
226
|
+
if (e.nodeType === 3) return e.data;
|
|
227
|
+
if (e.nodeType !== 1) return null;
|
|
228
|
+
var r = [], c = {}, o = 0, a = e.attributes, i = e.childNodes;
|
|
229
|
+
for (o = a.length; o--; ) a[o].name !== "slot" && (c[a[o].name] = a[o].value, c[g(a[o].name)] = a[o].value);
|
|
230
|
+
for (o = i.length; o--; ) {
|
|
231
|
+
var l = y(i[o], null, t), d = i[o].slot;
|
|
232
|
+
d ? c[d] = p(I, { name: d }, l) : r[o] = l;
|
|
233
|
+
}
|
|
234
|
+
var v = !(!t || !t.shadow), C = n ? p(I, { useFragment: !v }, r) : r;
|
|
235
|
+
return !v && n && (e.innerHTML = ""), p(n || e.nodeName.toLowerCase(), c, C);
|
|
226
236
|
}
|
|
227
|
-
const G = {
|
|
228
|
-
primary: "IncodeButtonPrimary",
|
|
229
|
-
link: "IncodeButtonLink"
|
|
230
|
-
}, W = (e) => {
|
|
231
|
-
const {
|
|
232
|
-
isLoading: t = !1,
|
|
233
|
-
variant: n = "primary",
|
|
234
|
-
class: r,
|
|
235
|
-
type: c = "button",
|
|
236
|
-
children: o,
|
|
237
|
-
disabled: a,
|
|
238
|
-
...i
|
|
239
|
-
} = e;
|
|
240
|
-
return /* @__PURE__ */ s(
|
|
241
|
-
"button",
|
|
242
|
-
{
|
|
243
|
-
...i,
|
|
244
|
-
class: v(
|
|
245
|
-
"IncodeButton",
|
|
246
|
-
t ? "IncodeButtonLoading" : "",
|
|
247
|
-
G[n],
|
|
248
|
-
r
|
|
249
|
-
),
|
|
250
|
-
disabled: a || t,
|
|
251
|
-
type: c,
|
|
252
|
-
children: t ? /* @__PURE__ */ s(A, { size: 30 }) : o
|
|
253
|
-
}
|
|
254
|
-
);
|
|
255
|
-
};
|
|
256
237
|
export {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
Q as d,
|
|
264
|
-
D as s,
|
|
238
|
+
Z as B,
|
|
239
|
+
x as L,
|
|
240
|
+
G as S,
|
|
241
|
+
F as a,
|
|
242
|
+
f as b,
|
|
243
|
+
J as c,
|
|
265
244
|
s as u
|
|
266
245
|
};
|
package/dist/selfie/selfie.es.js
CHANGED
|
@@ -1,11 +1,32 @@
|
|
|
1
|
-
import { u as e, S as c, B as C, b as _, L as w, a as O } from "../
|
|
1
|
+
import { u as e, S as c, B as C, b as _, L as w, a as O } from "../preact-custom-element.esm-BGQkPkOv.js";
|
|
2
2
|
import { createSelfieManager as M } from "@incodetech/core/selfie";
|
|
3
|
-
import { u as d, T as y } from "../title-
|
|
4
|
-
import { P as u, g as A,
|
|
3
|
+
import { u as d, T as y } from "../title-XSxhaBDx.js";
|
|
4
|
+
import { P as u, g as A, a as P, r as b, I as x } from "../incodeModule-BuCBWati.js";
|
|
5
5
|
import { getBrowser as B, getDeviceClass as N } from "@incodetech/core";
|
|
6
6
|
import { k as E, g as K, d as v, A as T, y as I } from "../vendor-preact-CK0WeTOR.js";
|
|
7
|
-
|
|
8
|
-
const F =
|
|
7
|
+
import "../instance-B-q0ZREN.js";
|
|
8
|
+
const F = ({ size: i = 64 }) => /* @__PURE__ */ e(
|
|
9
|
+
"svg",
|
|
10
|
+
{
|
|
11
|
+
width: i,
|
|
12
|
+
height: i,
|
|
13
|
+
viewBox: "0 0 16 17",
|
|
14
|
+
fill: "none",
|
|
15
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16
|
+
class: "IncodeSuccessIcon",
|
|
17
|
+
"aria-hidden": "true",
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ e("title", { children: "status" }),
|
|
20
|
+
/* @__PURE__ */ e(
|
|
21
|
+
"path",
|
|
22
|
+
{
|
|
23
|
+
d: "M8 0.5C12.4182 0.500064 16 4.0818 16 8.5C16 12.9182 12.4181 16.4999 8 16.5C3.58181 16.5 3.68521e-05 12.9182 0 8.5C0 4.08176 3.58179 0.5 8 0.5ZM11.1748 6.11621C10.9423 5.88373 10.5747 5.86781 10.3242 6.06934L10.3203 6.07324L10.2764 6.1123L6.85742 9.53125L5.72656 8.40039C5.47758 8.1514 5.0732 8.1514 4.82422 8.40039C4.59169 8.63292 4.57673 9.00038 4.77832 9.25098L4.78125 9.25488L4.82031 9.29883L6.40625 10.8848C6.63867 11.117 7.00542 11.1319 7.25586 10.9307L7.26074 10.9277L7.30371 10.8877L11.1748 7.01758C11.4235 6.76863 11.4234 6.36521 11.1748 6.11621Z",
|
|
24
|
+
fill: "var(--icon-status-positive-static)"
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
), V = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.6/assets/permissions-img-83924a96.svg", k = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.6/assets/android-dots-icon-846d605c.svg", H = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.6/assets/android-settings-icon-8bd49c8d.svg", U = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.6/assets/android-toggle-icon-03e22d7a.svg", z = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.6/assets/chrome-icon-4c3b130c.svg", Z = () => /* @__PURE__ */ e(
|
|
9
30
|
"svg",
|
|
10
31
|
{
|
|
11
32
|
class: "IncodeBoldWithArrowIcon",
|
|
@@ -23,35 +44,35 @@ const F = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.5/assets/permis
|
|
|
23
44
|
}
|
|
24
45
|
)
|
|
25
46
|
}
|
|
26
|
-
),
|
|
47
|
+
), W = ({ i18nKey: i }) => {
|
|
27
48
|
const { t: n } = d(), s = n(i).split(/<arrow\s*\/?>/gi);
|
|
28
49
|
return /* @__PURE__ */ e("span", { class: "IncodeBoldWithArrow", children: s.map((o, r) => /* @__PURE__ */ e("span", { children: [
|
|
29
50
|
o,
|
|
30
|
-
r < s.length - 1 ? /* @__PURE__ */ e(
|
|
51
|
+
r < s.length - 1 ? /* @__PURE__ */ e(Z, {}) : null
|
|
31
52
|
] }, r)) });
|
|
32
|
-
}, D = ({ icon: i, title: n }) => /* @__PURE__ */ e("div", { class: "IncodeIconWrapper", children: /* @__PURE__ */ e("img", { src: i, alt: n, class: "IncodeIconWrapperImage" }) }),
|
|
53
|
+
}, D = ({ icon: i, title: n }) => /* @__PURE__ */ e("div", { class: "IncodeIconWrapper", children: /* @__PURE__ */ e("img", { src: i, alt: n, class: "IncodeIconWrapperImage" }) }), $ = () => {
|
|
33
54
|
const { t: i } = d(), n = [
|
|
34
55
|
{
|
|
35
|
-
icon:
|
|
56
|
+
icon: k,
|
|
36
57
|
iconTitle: i("idv2.permissions.denied.settings"),
|
|
37
58
|
instructionKey: "tap",
|
|
38
59
|
boldKey: "idv2.permissions.denied.dots",
|
|
39
60
|
additionalText: ` ${i("idv2.permissions.denied.topRight")}`
|
|
40
61
|
},
|
|
41
62
|
{
|
|
42
|
-
icon:
|
|
63
|
+
icon: H,
|
|
43
64
|
iconTitle: i("idv2.permissions.denied.browser"),
|
|
44
65
|
instructionKey: "tap",
|
|
45
66
|
boldKey: "idv2.permissions.denied.siteSettings"
|
|
46
67
|
},
|
|
47
68
|
{
|
|
48
|
-
icon:
|
|
69
|
+
icon: U,
|
|
49
70
|
iconTitle: i("idv2.permissions.denied.camera"),
|
|
50
71
|
instructionKey: "tap",
|
|
51
72
|
boldKey: "idv2.permissions.denied.cameraAllow"
|
|
52
73
|
},
|
|
53
74
|
{
|
|
54
|
-
icon:
|
|
75
|
+
icon: z,
|
|
55
76
|
iconTitle: i("idv2.permissions.denied.toggle"),
|
|
56
77
|
instructionKey: "returnPress",
|
|
57
78
|
boldKey: "idv2.permissions.denied.refreshPage"
|
|
@@ -62,11 +83,11 @@ const F = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.5/assets/permis
|
|
|
62
83
|
/* @__PURE__ */ e("p", { class: "IncodeDeniedStepText", children: [
|
|
63
84
|
i(`idv2.permissions.denied.${t.instructionKey}`),
|
|
64
85
|
" ",
|
|
65
|
-
/* @__PURE__ */ e(
|
|
86
|
+
/* @__PURE__ */ e(W, { i18nKey: t.boldKey }),
|
|
66
87
|
t.additionalText ? t.additionalText : null
|
|
67
88
|
] })
|
|
68
89
|
] }, t.boldKey)) }) });
|
|
69
|
-
},
|
|
90
|
+
}, Q = ({ number: i }) => /* @__PURE__ */ e("div", { class: "IncodeNumberedStep", children: /* @__PURE__ */ e("span", { class: "IncodeNumberedStepText", children: i }) }), Y = (i) => {
|
|
70
91
|
const n = [
|
|
71
92
|
`idv2.permissions.denied.${i}.firstStep`,
|
|
72
93
|
`idv2.permissions.denied.${i}.secondStep`,
|
|
@@ -75,25 +96,25 @@ const F = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.5/assets/permis
|
|
|
75
96
|
`idv2.permissions.denied.${i}.fifthStep`
|
|
76
97
|
];
|
|
77
98
|
return i === "safari" && n.push(`idv2.permissions.denied.${i}.sixthStep`), n;
|
|
78
|
-
},
|
|
99
|
+
}, G = (i, n) => i(n).split(/(<strong>[^<]+<\/strong>)/g).map((o, r) => {
|
|
79
100
|
if (o.startsWith("<strong>") && o.endsWith("</strong>")) {
|
|
80
101
|
const a = o.slice(8, -9);
|
|
81
102
|
return /* @__PURE__ */ e("span", { class: "IncodeDeniedStepTextBold", children: a }, r);
|
|
82
103
|
}
|
|
83
104
|
return o;
|
|
84
|
-
}),
|
|
85
|
-
const { t: i } = d(), n = B(), t =
|
|
105
|
+
}), j = () => {
|
|
106
|
+
const { t: i } = d(), n = B(), t = Y(n);
|
|
86
107
|
return /* @__PURE__ */ e("div", { class: "IncodeDeniedInstructionsContainer", children: /* @__PURE__ */ e("div", { class: "IncodeDeniedDesktopContainer", children: t.map((s, o) => /* @__PURE__ */ e(E, { children: [
|
|
87
108
|
/* @__PURE__ */ e("div", { class: "IncodeDeniedDesktopStep", children: [
|
|
88
|
-
/* @__PURE__ */ e(
|
|
89
|
-
/* @__PURE__ */ e("p", { class: "IncodeDeniedStepText", children:
|
|
109
|
+
/* @__PURE__ */ e(Q, { number: o + 1 }),
|
|
110
|
+
/* @__PURE__ */ e("p", { class: "IncodeDeniedStepText", children: G(i, s) })
|
|
90
111
|
] }),
|
|
91
112
|
o < t.length - 1 ? /* @__PURE__ */ e("div", { class: "IncodeNumberedStepConnector" }) : null
|
|
92
113
|
] }, s)) }) });
|
|
93
|
-
},
|
|
114
|
+
}, q = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.6/assets/camera-ios-9eac3be1.svg", R = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.6/assets/safari-icon-7823d73d.svg", X = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.6/assets/settings-icon-9743cbda.svg", J = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.6/assets/toggle-icon-351f86ce.svg", ee = () => {
|
|
94
115
|
const { t: i } = d(), n = [
|
|
95
116
|
{
|
|
96
|
-
icon:
|
|
117
|
+
icon: X,
|
|
97
118
|
iconTitle: i("idv2.permissions.denied.settings"),
|
|
98
119
|
instructionKey: "open",
|
|
99
120
|
boldKey: "settings"
|
|
@@ -105,13 +126,13 @@ const F = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.5/assets/permis
|
|
|
105
126
|
boldKey: "yourBrowser"
|
|
106
127
|
},
|
|
107
128
|
{
|
|
108
|
-
icon:
|
|
129
|
+
icon: q,
|
|
109
130
|
iconTitle: i("idv2.permissions.denied.camera"),
|
|
110
131
|
instructionKey: "tap",
|
|
111
132
|
boldKey: "camera"
|
|
112
133
|
},
|
|
113
134
|
{
|
|
114
|
-
icon:
|
|
135
|
+
icon: J,
|
|
115
136
|
iconTitle: i("idv2.permissions.denied.toggle"),
|
|
116
137
|
instructionKey: "changeTo",
|
|
117
138
|
boldKey: "allow",
|
|
@@ -140,36 +161,36 @@ const F = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.5/assets/permis
|
|
|
140
161
|
] }) : null
|
|
141
162
|
] })
|
|
142
163
|
] }, t.boldKey)) }) });
|
|
143
|
-
},
|
|
164
|
+
}, ie = () => {
|
|
144
165
|
const i = N();
|
|
145
|
-
return i === "ios" ? /* @__PURE__ */ e(
|
|
146
|
-
},
|
|
166
|
+
return i === "ios" ? /* @__PURE__ */ e(ee, {}) : i === "android" ? /* @__PURE__ */ e($, {}) : /* @__PURE__ */ e(j, {});
|
|
167
|
+
}, ne = ({ onRefresh: i }) => {
|
|
147
168
|
const { t: n } = d();
|
|
148
169
|
return /* @__PURE__ */ e(u, { hideHeader: !0, className: "IncodeDeniedPage", children: [
|
|
149
170
|
/* @__PURE__ */ e(c, { size: 24 }),
|
|
150
171
|
/* @__PURE__ */ e("p", { class: "IncodeDeniedTitle", children: n("idv2.permissions.denied.title") }),
|
|
151
172
|
/* @__PURE__ */ e(c, { size: 64 }),
|
|
152
|
-
/* @__PURE__ */ e(
|
|
173
|
+
/* @__PURE__ */ e(ie, {}),
|
|
153
174
|
/* @__PURE__ */ e("div", { class: "IncodeDeniedActions", children: /* @__PURE__ */ e(C, { onClick: i, children: n("idv2.permissions.denied.refreshPage") }) })
|
|
154
175
|
] });
|
|
155
|
-
},
|
|
176
|
+
}, te = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.6/assets/bank-card-icon-6af62350.svg", se = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.6/assets/camera-icon-b2fc4c1c.svg", oe = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.6/assets/check-icon-b1d1ddd8.svg", re = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.6/assets/password-icon-f5257b0b.svg", ce = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.6/assets/warning-icon-f3eadd0b.svg", ae = [
|
|
156
177
|
{
|
|
157
|
-
icon:
|
|
178
|
+
icon: se,
|
|
158
179
|
textKey: "idv2.permissions.learnMorePage.instructions.1"
|
|
159
180
|
},
|
|
160
181
|
{
|
|
161
|
-
icon:
|
|
182
|
+
icon: te,
|
|
162
183
|
textKey: "idv2.permissions.learnMorePage.instructions.2"
|
|
163
184
|
},
|
|
164
185
|
{
|
|
165
|
-
icon:
|
|
186
|
+
icon: re,
|
|
166
187
|
textKey: "idv2.permissions.learnMorePage.instructions.3"
|
|
167
188
|
},
|
|
168
189
|
{
|
|
169
|
-
icon:
|
|
190
|
+
icon: oe,
|
|
170
191
|
textKey: "idv2.permissions.learnMorePage.instructions.4"
|
|
171
192
|
}
|
|
172
|
-
],
|
|
193
|
+
], de = ({
|
|
173
194
|
onAllowPermissions: i,
|
|
174
195
|
onQuitProcess: n
|
|
175
196
|
}) => {
|
|
@@ -180,7 +201,7 @@ const F = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.5/assets/permis
|
|
|
180
201
|
/* @__PURE__ */ e(
|
|
181
202
|
"img",
|
|
182
203
|
{
|
|
183
|
-
src:
|
|
204
|
+
src: ce,
|
|
184
205
|
alt: t("idv2.permissions.learnMorePage.warning"),
|
|
185
206
|
class: "IncodeLearnMoreImage"
|
|
186
207
|
}
|
|
@@ -188,7 +209,7 @@ const F = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.5/assets/permis
|
|
|
188
209
|
/* @__PURE__ */ e(c, { size: 12 }),
|
|
189
210
|
/* @__PURE__ */ e("p", { class: "IncodeLearnMoreTitle", children: t("idv2.permissions.learnMorePage.title") }),
|
|
190
211
|
/* @__PURE__ */ e(c, { size: 32 }),
|
|
191
|
-
/* @__PURE__ */ e("div", { class: "IncodeLearnMoreInstructions", children:
|
|
212
|
+
/* @__PURE__ */ e("div", { class: "IncodeLearnMoreInstructions", children: ae.map((s) => /* @__PURE__ */ e("div", { class: "IncodeLearnMoreInstruction", children: [
|
|
192
213
|
/* @__PURE__ */ e("div", { class: "IncodeLearnMoreInstructionIcon", children: /* @__PURE__ */ e(
|
|
193
214
|
"img",
|
|
194
215
|
{
|
|
@@ -206,18 +227,18 @@ const F = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.5/assets/permis
|
|
|
206
227
|
/* @__PURE__ */ e(C, { variant: "link", onClick: n, children: t("idv2.permissions.learnMorePage.quitProcess") })
|
|
207
228
|
] })
|
|
208
229
|
] });
|
|
209
|
-
},
|
|
230
|
+
}, le = ({
|
|
210
231
|
manager: i,
|
|
211
232
|
permissionStatus: n
|
|
212
233
|
}) => {
|
|
213
234
|
const { t } = d();
|
|
214
235
|
return n === "requesting" ? /* @__PURE__ */ e(u, { className: "IncodePermissionsRequestingPage", hideHeader: !0 }) : n === "learnMore" ? /* @__PURE__ */ e(
|
|
215
|
-
|
|
236
|
+
de,
|
|
216
237
|
{
|
|
217
238
|
onAllowPermissions: () => i.requestPermission(),
|
|
218
239
|
onQuitProcess: () => i.close()
|
|
219
240
|
}
|
|
220
|
-
) : n === "denied" ? /* @__PURE__ */ e(
|
|
241
|
+
) : n === "denied" ? /* @__PURE__ */ e(ne, { onRefresh: () => window.location.reload() }) : /* @__PURE__ */ e(
|
|
221
242
|
u,
|
|
222
243
|
{
|
|
223
244
|
className: "IncodePermissionsPage",
|
|
@@ -229,7 +250,7 @@ const F = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.5/assets/permis
|
|
|
229
250
|
/* @__PURE__ */ e("div", { class: "IncodePermissionsImageContainer", children: /* @__PURE__ */ e(
|
|
230
251
|
"img",
|
|
231
252
|
{
|
|
232
|
-
src:
|
|
253
|
+
src: V,
|
|
233
254
|
alt: t("idv2.permissions.alertAlt"),
|
|
234
255
|
class: "IncodePermissionsImage"
|
|
235
256
|
}
|
|
@@ -244,28 +265,7 @@ const F = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.5/assets/permis
|
|
|
244
265
|
]
|
|
245
266
|
}
|
|
246
267
|
);
|
|
247
|
-
},
|
|
248
|
-
"svg",
|
|
249
|
-
{
|
|
250
|
-
width: i,
|
|
251
|
-
height: i,
|
|
252
|
-
viewBox: "0 0 16 17",
|
|
253
|
-
fill: "none",
|
|
254
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
255
|
-
class: "IncodeSuccessIcon",
|
|
256
|
-
"aria-hidden": "true",
|
|
257
|
-
children: [
|
|
258
|
-
/* @__PURE__ */ e("title", { children: "status" }),
|
|
259
|
-
/* @__PURE__ */ e(
|
|
260
|
-
"path",
|
|
261
|
-
{
|
|
262
|
-
d: "M8 0.5C12.4182 0.500064 16 4.0818 16 8.5C16 12.9182 12.4181 16.4999 8 16.5C3.58181 16.5 3.68521e-05 12.9182 0 8.5C0 4.08176 3.58179 0.5 8 0.5ZM11.1748 6.11621C10.9423 5.88373 10.5747 5.86781 10.3242 6.06934L10.3203 6.07324L10.2764 6.1123L6.85742 9.53125L5.72656 8.40039C5.47758 8.1514 5.0732 8.1514 4.82422 8.40039C4.59169 8.63292 4.57673 9.00038 4.77832 9.25098L4.78125 9.25488L4.82031 9.29883L6.40625 10.8848C6.63867 11.117 7.00542 11.1319 7.25586 10.9307L7.26074 10.9277L7.30371 10.8877L11.1748 7.01758C11.4235 6.76863 11.4234 6.36521 11.1748 6.11621Z",
|
|
263
|
-
fill: "var(--icon-status-positive-static)"
|
|
264
|
-
}
|
|
265
|
-
)
|
|
266
|
-
]
|
|
267
|
-
}
|
|
268
|
-
), S = ({
|
|
268
|
+
}, S = ({
|
|
269
269
|
title: i,
|
|
270
270
|
description: n,
|
|
271
271
|
attemptsText: t,
|
|
@@ -750,7 +750,7 @@ const F = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.5/assets/permis
|
|
|
750
750
|
}
|
|
751
751
|
) : s === "success" ? /* @__PURE__ */ e(u, { className: "IncodeCaptureSuccessPage", children: /* @__PURE__ */ e("div", { class: "IncodeCaptureSuccessContainer", children: [
|
|
752
752
|
/* @__PURE__ */ e(c, { size: 160 }),
|
|
753
|
-
/* @__PURE__ */ e(
|
|
753
|
+
/* @__PURE__ */ e(F, { size: 64 }),
|
|
754
754
|
/* @__PURE__ */ e(c, { size: 16 }),
|
|
755
755
|
/* @__PURE__ */ e(y, { children: f("idv2.capture.processing.success") })
|
|
756
756
|
] }) }) : null;
|
|
@@ -880,7 +880,7 @@ const Me = ({
|
|
|
880
880
|
}) => {
|
|
881
881
|
const [s, o] = O(() => M({ config: i }));
|
|
882
882
|
return s.status === "idle" || s.status === "loading" ? null : s.status === "tutorial" ? /* @__PURE__ */ e(ye, { manager: o }) : s.status === "permissions" ? /* @__PURE__ */ e(
|
|
883
|
-
|
|
883
|
+
le,
|
|
884
884
|
{
|
|
885
885
|
manager: o,
|
|
886
886
|
permissionStatus: s.permissionStatus
|