@uziee/document-scanner 1.1.5 → 1.1.7
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/index.es.js +606 -444
- package/dist/index.umd.js +11 -11
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Ye, { useRef as
|
|
2
|
-
var
|
|
1
|
+
import Ye, { useRef as Q, useState as ie, useEffect as ht } from "react";
|
|
2
|
+
var ge = { exports: {} }, Z = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -9,25 +9,25 @@ var Re = { exports: {} }, re = {};
|
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
if (
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
for (
|
|
22
|
-
|
|
23
|
-
if (
|
|
24
|
-
for (
|
|
25
|
-
|
|
26
|
-
return { $$typeof:
|
|
12
|
+
var We;
|
|
13
|
+
function vt() {
|
|
14
|
+
if (We)
|
|
15
|
+
return Z;
|
|
16
|
+
We = 1;
|
|
17
|
+
var A = Ye, r = Symbol.for("react.element"), o = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, c = A.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function u(l, i, b) {
|
|
19
|
+
var s, p = {}, m = null, d = null;
|
|
20
|
+
b !== void 0 && (m = "" + b), i.key !== void 0 && (m = "" + i.key), i.ref !== void 0 && (d = i.ref);
|
|
21
|
+
for (s in i)
|
|
22
|
+
a.call(i, s) && !g.hasOwnProperty(s) && (p[s] = i[s]);
|
|
23
|
+
if (l && l.defaultProps)
|
|
24
|
+
for (s in i = l.defaultProps, i)
|
|
25
|
+
p[s] === void 0 && (p[s] = i[s]);
|
|
26
|
+
return { $$typeof: r, type: l, key: m, ref: d, props: p, _owner: c.current };
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return Z.Fragment = o, Z.jsx = u, Z.jsxs = u, Z;
|
|
29
29
|
}
|
|
30
|
-
var
|
|
30
|
+
var ee = {};
|
|
31
31
|
/**
|
|
32
32
|
* @license React
|
|
33
33
|
* react-jsx-runtime.development.js
|
|
@@ -37,91 +37,91 @@ var te = {};
|
|
|
37
37
|
* This source code is licensed under the MIT license found in the
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
|
39
39
|
*/
|
|
40
|
-
var
|
|
41
|
-
function
|
|
42
|
-
return
|
|
43
|
-
var
|
|
44
|
-
function
|
|
40
|
+
var $e;
|
|
41
|
+
function pt() {
|
|
42
|
+
return $e || ($e = 1, {}.NODE_ENV !== "production" && function() {
|
|
43
|
+
var A = Ye, r = Symbol.for("react.element"), o = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), l = Symbol.for("react.context"), i = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), s = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), d = Symbol.for("react.offscreen"), _ = Symbol.iterator, P = "@@iterator";
|
|
44
|
+
function y(e) {
|
|
45
45
|
if (e === null || typeof e != "object")
|
|
46
46
|
return null;
|
|
47
|
-
var
|
|
48
|
-
return typeof
|
|
47
|
+
var t = _ && e[_] || e[P];
|
|
48
|
+
return typeof t == "function" ? t : null;
|
|
49
49
|
}
|
|
50
|
-
var
|
|
51
|
-
function
|
|
50
|
+
var v = A.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
|
+
function f(e) {
|
|
52
52
|
{
|
|
53
|
-
for (var
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), h = 1; h < t; h++)
|
|
54
|
+
n[h - 1] = arguments[h];
|
|
55
|
+
C("error", e, n);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function C(e, t, n) {
|
|
59
59
|
{
|
|
60
|
-
var
|
|
61
|
-
|
|
62
|
-
var
|
|
63
|
-
return String(
|
|
60
|
+
var h = v.ReactDebugCurrentFrame, E = h.getStackAddendum();
|
|
61
|
+
E !== "" && (t += "%s", n = n.concat([E]));
|
|
62
|
+
var S = n.map(function(R) {
|
|
63
|
+
return String(R);
|
|
64
64
|
});
|
|
65
|
-
|
|
65
|
+
S.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, S);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
function
|
|
71
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
68
|
+
var F = !1, $ = !1, M = !1, Y = !1, z = !1, te;
|
|
69
|
+
te = Symbol.for("react.module.reference");
|
|
70
|
+
function L(e) {
|
|
71
|
+
return !!(typeof e == "string" || typeof e == "function" || e === a || e === g || z || e === c || e === b || e === s || Y || e === d || F || $ || M || typeof e == "object" && e !== null && (e.$$typeof === m || e.$$typeof === p || e.$$typeof === u || e.$$typeof === l || e.$$typeof === i || // This needs to include all possible module reference object
|
|
72
72
|
// types supported by any Flight configuration anywhere since
|
|
73
73
|
// we don't know which Flight build this will end up being used
|
|
74
74
|
// with.
|
|
75
|
-
e.$$typeof ===
|
|
75
|
+
e.$$typeof === te || e.getModuleId !== void 0));
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
var
|
|
79
|
-
if (
|
|
80
|
-
return
|
|
81
|
-
var
|
|
82
|
-
return
|
|
77
|
+
function q(e, t, n) {
|
|
78
|
+
var h = e.displayName;
|
|
79
|
+
if (h)
|
|
80
|
+
return h;
|
|
81
|
+
var E = t.displayName || t.name || "";
|
|
82
|
+
return E !== "" ? n + "(" + E + ")" : n;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function W(e) {
|
|
85
85
|
return e.displayName || "Context";
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function O(e) {
|
|
88
88
|
if (e == null)
|
|
89
89
|
return null;
|
|
90
|
-
if (typeof e.tag == "number" &&
|
|
90
|
+
if (typeof e.tag == "number" && f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
91
91
|
return e.displayName || e.name || null;
|
|
92
92
|
if (typeof e == "string")
|
|
93
93
|
return e;
|
|
94
94
|
switch (e) {
|
|
95
|
-
case
|
|
95
|
+
case a:
|
|
96
96
|
return "Fragment";
|
|
97
|
-
case
|
|
97
|
+
case o:
|
|
98
98
|
return "Portal";
|
|
99
|
-
case
|
|
99
|
+
case g:
|
|
100
100
|
return "Profiler";
|
|
101
|
-
case
|
|
101
|
+
case c:
|
|
102
102
|
return "StrictMode";
|
|
103
|
-
case
|
|
103
|
+
case b:
|
|
104
104
|
return "Suspense";
|
|
105
|
-
case
|
|
105
|
+
case s:
|
|
106
106
|
return "SuspenseList";
|
|
107
107
|
}
|
|
108
108
|
if (typeof e == "object")
|
|
109
109
|
switch (e.$$typeof) {
|
|
110
|
-
case
|
|
111
|
-
var r = e;
|
|
112
|
-
return U(r) + ".Consumer";
|
|
113
|
-
case I:
|
|
110
|
+
case l:
|
|
114
111
|
var t = e;
|
|
115
|
-
return
|
|
116
|
-
case
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
return
|
|
121
|
-
case
|
|
122
|
-
var
|
|
112
|
+
return W(t) + ".Consumer";
|
|
113
|
+
case u:
|
|
114
|
+
var n = e;
|
|
115
|
+
return W(n._context) + ".Provider";
|
|
116
|
+
case i:
|
|
117
|
+
return q(e, e.render, "ForwardRef");
|
|
118
|
+
case p:
|
|
119
|
+
var h = e.displayName || null;
|
|
120
|
+
return h !== null ? h : O(e.type) || "Memo";
|
|
121
|
+
case m: {
|
|
122
|
+
var E = e, S = E._payload, R = E._init;
|
|
123
123
|
try {
|
|
124
|
-
return
|
|
124
|
+
return O(R(S));
|
|
125
125
|
} catch {
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
@@ -129,18 +129,18 @@ function hr() {
|
|
|
129
129
|
}
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
|
-
var
|
|
133
|
-
function
|
|
132
|
+
var U = Object.assign, V = 0, N, H, be, ye, me, xe, Re;
|
|
133
|
+
function Ce() {
|
|
134
134
|
}
|
|
135
|
-
|
|
135
|
+
Ce.__reactDisabledLog = !0;
|
|
136
136
|
function Ue() {
|
|
137
137
|
{
|
|
138
|
-
if (
|
|
139
|
-
|
|
138
|
+
if (V === 0) {
|
|
139
|
+
N = console.log, H = console.info, be = console.warn, ye = console.error, me = console.group, xe = console.groupCollapsed, Re = console.groupEnd;
|
|
140
140
|
var e = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
143
|
-
value:
|
|
143
|
+
value: Ce,
|
|
144
144
|
writable: !0
|
|
145
145
|
};
|
|
146
146
|
Object.defineProperties(console, {
|
|
@@ -153,208 +153,208 @@ function hr() {
|
|
|
153
153
|
groupEnd: e
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
V++;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
function Le() {
|
|
160
160
|
{
|
|
161
|
-
if (
|
|
161
|
+
if (V--, V === 0) {
|
|
162
162
|
var e = {
|
|
163
163
|
configurable: !0,
|
|
164
164
|
enumerable: !0,
|
|
165
165
|
writable: !0
|
|
166
166
|
};
|
|
167
167
|
Object.defineProperties(console, {
|
|
168
|
-
log:
|
|
169
|
-
value:
|
|
168
|
+
log: U({}, e, {
|
|
169
|
+
value: N
|
|
170
170
|
}),
|
|
171
|
-
info:
|
|
172
|
-
value:
|
|
171
|
+
info: U({}, e, {
|
|
172
|
+
value: H
|
|
173
173
|
}),
|
|
174
|
-
warn:
|
|
175
|
-
value:
|
|
174
|
+
warn: U({}, e, {
|
|
175
|
+
value: be
|
|
176
176
|
}),
|
|
177
|
-
error:
|
|
178
|
-
value:
|
|
177
|
+
error: U({}, e, {
|
|
178
|
+
value: ye
|
|
179
179
|
}),
|
|
180
|
-
group:
|
|
181
|
-
value:
|
|
180
|
+
group: U({}, e, {
|
|
181
|
+
value: me
|
|
182
182
|
}),
|
|
183
|
-
groupCollapsed:
|
|
184
|
-
value:
|
|
183
|
+
groupCollapsed: U({}, e, {
|
|
184
|
+
value: xe
|
|
185
185
|
}),
|
|
186
|
-
groupEnd:
|
|
187
|
-
value:
|
|
186
|
+
groupEnd: U({}, e, {
|
|
187
|
+
value: Re
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
V < 0 && f("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
var
|
|
195
|
-
function
|
|
194
|
+
var se = v.ReactCurrentDispatcher, le;
|
|
195
|
+
function re(e, t, n) {
|
|
196
196
|
{
|
|
197
|
-
if (
|
|
197
|
+
if (le === void 0)
|
|
198
198
|
try {
|
|
199
199
|
throw Error();
|
|
200
|
-
} catch (
|
|
201
|
-
var
|
|
202
|
-
|
|
200
|
+
} catch (E) {
|
|
201
|
+
var h = E.stack.trim().match(/\n( *(at )?)/);
|
|
202
|
+
le = h && h[1] || "";
|
|
203
203
|
}
|
|
204
204
|
return `
|
|
205
|
-
` +
|
|
205
|
+
` + le + e;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
var
|
|
208
|
+
var ce = !1, ne;
|
|
209
209
|
{
|
|
210
|
-
var
|
|
211
|
-
|
|
210
|
+
var ze = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
|
+
ne = new ze();
|
|
212
212
|
}
|
|
213
|
-
function
|
|
214
|
-
if (!e ||
|
|
213
|
+
function Ee(e, t) {
|
|
214
|
+
if (!e || ce)
|
|
215
215
|
return "";
|
|
216
216
|
{
|
|
217
|
-
var
|
|
218
|
-
if (
|
|
219
|
-
return
|
|
217
|
+
var n = ne.get(e);
|
|
218
|
+
if (n !== void 0)
|
|
219
|
+
return n;
|
|
220
220
|
}
|
|
221
|
-
var
|
|
222
|
-
|
|
223
|
-
var
|
|
221
|
+
var h;
|
|
222
|
+
ce = !0;
|
|
223
|
+
var E = Error.prepareStackTrace;
|
|
224
224
|
Error.prepareStackTrace = void 0;
|
|
225
|
-
var
|
|
226
|
-
|
|
225
|
+
var S;
|
|
226
|
+
S = se.current, se.current = null, Ue();
|
|
227
227
|
try {
|
|
228
|
-
if (
|
|
229
|
-
var
|
|
228
|
+
if (t) {
|
|
229
|
+
var R = function() {
|
|
230
230
|
throw Error();
|
|
231
231
|
};
|
|
232
|
-
if (Object.defineProperty(
|
|
232
|
+
if (Object.defineProperty(R.prototype, "props", {
|
|
233
233
|
set: function() {
|
|
234
234
|
throw Error();
|
|
235
235
|
}
|
|
236
236
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
237
|
try {
|
|
238
|
-
Reflect.construct(
|
|
239
|
-
} catch (
|
|
240
|
-
|
|
238
|
+
Reflect.construct(R, []);
|
|
239
|
+
} catch (k) {
|
|
240
|
+
h = k;
|
|
241
241
|
}
|
|
242
|
-
Reflect.construct(e, [],
|
|
242
|
+
Reflect.construct(e, [], R);
|
|
243
243
|
} else {
|
|
244
244
|
try {
|
|
245
|
-
|
|
246
|
-
} catch (
|
|
247
|
-
|
|
245
|
+
R.call();
|
|
246
|
+
} catch (k) {
|
|
247
|
+
h = k;
|
|
248
248
|
}
|
|
249
|
-
e.call(
|
|
249
|
+
e.call(R.prototype);
|
|
250
250
|
}
|
|
251
251
|
} else {
|
|
252
252
|
try {
|
|
253
253
|
throw Error();
|
|
254
|
-
} catch (
|
|
255
|
-
|
|
254
|
+
} catch (k) {
|
|
255
|
+
h = k;
|
|
256
256
|
}
|
|
257
257
|
e();
|
|
258
258
|
}
|
|
259
|
-
} catch (
|
|
260
|
-
if (
|
|
261
|
-
for (var
|
|
262
|
-
`),
|
|
263
|
-
`),
|
|
264
|
-
|
|
265
|
-
for (;
|
|
266
|
-
if (
|
|
267
|
-
if (
|
|
259
|
+
} catch (k) {
|
|
260
|
+
if (k && h && typeof k.stack == "string") {
|
|
261
|
+
for (var x = k.stack.split(`
|
|
262
|
+
`), D = h.stack.split(`
|
|
263
|
+
`), T = x.length - 1, w = D.length - 1; T >= 1 && w >= 0 && x[T] !== D[w]; )
|
|
264
|
+
w--;
|
|
265
|
+
for (; T >= 1 && w >= 0; T--, w--)
|
|
266
|
+
if (x[T] !== D[w]) {
|
|
267
|
+
if (T !== 1 || w !== 1)
|
|
268
268
|
do
|
|
269
|
-
if (
|
|
270
|
-
var
|
|
271
|
-
` +
|
|
272
|
-
return e.displayName &&
|
|
269
|
+
if (T--, w--, w < 0 || x[T] !== D[w]) {
|
|
270
|
+
var I = `
|
|
271
|
+
` + x[T].replace(" at new ", " at ");
|
|
272
|
+
return e.displayName && I.includes("<anonymous>") && (I = I.replace("<anonymous>", e.displayName)), typeof e == "function" && ne.set(e, I), I;
|
|
273
273
|
}
|
|
274
|
-
while (
|
|
274
|
+
while (T >= 1 && w >= 0);
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
} finally {
|
|
279
|
-
|
|
279
|
+
ce = !1, se.current = S, Le(), Error.prepareStackTrace = E;
|
|
280
280
|
}
|
|
281
|
-
var
|
|
282
|
-
return typeof e == "function" &&
|
|
281
|
+
var K = e ? e.displayName || e.name : "", B = K ? re(K) : "";
|
|
282
|
+
return typeof e == "function" && ne.set(e, B), B;
|
|
283
283
|
}
|
|
284
|
-
function Ve(e,
|
|
285
|
-
return
|
|
284
|
+
function Ve(e, t, n) {
|
|
285
|
+
return Ee(e, !1);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
var
|
|
289
|
-
return !!(
|
|
287
|
+
function Ne(e) {
|
|
288
|
+
var t = e.prototype;
|
|
289
|
+
return !!(t && t.isReactComponent);
|
|
290
290
|
}
|
|
291
|
-
function oe(e,
|
|
291
|
+
function oe(e, t, n) {
|
|
292
292
|
if (e == null)
|
|
293
293
|
return "";
|
|
294
294
|
if (typeof e == "function")
|
|
295
|
-
return
|
|
295
|
+
return Ee(e, Ne(e));
|
|
296
296
|
if (typeof e == "string")
|
|
297
|
-
return
|
|
297
|
+
return re(e);
|
|
298
298
|
switch (e) {
|
|
299
|
-
case
|
|
300
|
-
return
|
|
301
|
-
case
|
|
302
|
-
return
|
|
299
|
+
case b:
|
|
300
|
+
return re("Suspense");
|
|
301
|
+
case s:
|
|
302
|
+
return re("SuspenseList");
|
|
303
303
|
}
|
|
304
304
|
if (typeof e == "object")
|
|
305
305
|
switch (e.$$typeof) {
|
|
306
|
-
case
|
|
306
|
+
case i:
|
|
307
307
|
return Ve(e.render);
|
|
308
|
-
case
|
|
309
|
-
return oe(e.type,
|
|
310
|
-
case
|
|
311
|
-
var
|
|
308
|
+
case p:
|
|
309
|
+
return oe(e.type, t, n);
|
|
310
|
+
case m: {
|
|
311
|
+
var h = e, E = h._payload, S = h._init;
|
|
312
312
|
try {
|
|
313
|
-
return oe(
|
|
313
|
+
return oe(S(E), t, n);
|
|
314
314
|
} catch {
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
return "";
|
|
319
319
|
}
|
|
320
|
-
var
|
|
321
|
-
function
|
|
320
|
+
var X = Object.prototype.hasOwnProperty, _e = {}, Se = v.ReactDebugCurrentFrame;
|
|
321
|
+
function ae(e) {
|
|
322
322
|
if (e) {
|
|
323
|
-
var
|
|
324
|
-
|
|
323
|
+
var t = e._owner, n = oe(e.type, e._source, t ? t.type : null);
|
|
324
|
+
Se.setExtraStackFrame(n);
|
|
325
325
|
} else
|
|
326
|
-
|
|
326
|
+
Se.setExtraStackFrame(null);
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function Be(e, t, n, h, E) {
|
|
329
329
|
{
|
|
330
|
-
var
|
|
331
|
-
for (var
|
|
332
|
-
if (
|
|
333
|
-
var
|
|
330
|
+
var S = Function.call.bind(X);
|
|
331
|
+
for (var R in e)
|
|
332
|
+
if (S(e, R)) {
|
|
333
|
+
var x = void 0;
|
|
334
334
|
try {
|
|
335
|
-
if (typeof e[
|
|
336
|
-
var
|
|
337
|
-
throw
|
|
335
|
+
if (typeof e[R] != "function") {
|
|
336
|
+
var D = Error((h || "React class") + ": " + n + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
|
+
throw D.name = "Invariant Violation", D;
|
|
338
338
|
}
|
|
339
|
-
|
|
340
|
-
} catch (
|
|
341
|
-
|
|
339
|
+
x = e[R](t, R, h, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
+
} catch (T) {
|
|
341
|
+
x = T;
|
|
342
342
|
}
|
|
343
|
-
|
|
343
|
+
x && !(x instanceof Error) && (ae(E), f("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", h || "React class", n, R, typeof x), ae(null)), x instanceof Error && !(x.message in _e) && (_e[x.message] = !0, ae(E), f("Failed %s type: %s", n, x.message), ae(null));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
347
|
var qe = Array.isArray;
|
|
348
|
-
function
|
|
348
|
+
function ue(e) {
|
|
349
349
|
return qe(e);
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function He(e) {
|
|
352
352
|
{
|
|
353
|
-
var
|
|
354
|
-
return
|
|
353
|
+
var t = typeof Symbol == "function" && Symbol.toStringTag, n = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
354
|
+
return n;
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function Je(e) {
|
|
358
358
|
try {
|
|
359
359
|
return je(e), !1;
|
|
360
360
|
} catch {
|
|
@@ -365,124 +365,124 @@ function hr() {
|
|
|
365
365
|
return "" + e;
|
|
366
366
|
}
|
|
367
367
|
function Te(e) {
|
|
368
|
-
if (
|
|
369
|
-
return
|
|
368
|
+
if (Je(e))
|
|
369
|
+
return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", He(e)), je(e);
|
|
370
370
|
}
|
|
371
|
-
var
|
|
371
|
+
var G = v.ReactCurrentOwner, Ke = {
|
|
372
372
|
key: !0,
|
|
373
373
|
ref: !0,
|
|
374
374
|
__self: !0,
|
|
375
375
|
__source: !0
|
|
376
|
-
},
|
|
377
|
-
|
|
378
|
-
function
|
|
379
|
-
if (
|
|
380
|
-
var
|
|
381
|
-
if (
|
|
376
|
+
}, we, Oe, fe;
|
|
377
|
+
fe = {};
|
|
378
|
+
function Xe(e) {
|
|
379
|
+
if (X.call(e, "ref")) {
|
|
380
|
+
var t = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
381
|
+
if (t && t.isReactWarning)
|
|
382
382
|
return !1;
|
|
383
383
|
}
|
|
384
384
|
return e.ref !== void 0;
|
|
385
385
|
}
|
|
386
|
-
function
|
|
387
|
-
if (
|
|
388
|
-
var
|
|
389
|
-
if (
|
|
386
|
+
function Ge(e) {
|
|
387
|
+
if (X.call(e, "key")) {
|
|
388
|
+
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
389
|
+
if (t && t.isReactWarning)
|
|
390
390
|
return !1;
|
|
391
391
|
}
|
|
392
392
|
return e.key !== void 0;
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
if (typeof e.ref == "string" &&
|
|
396
|
-
var
|
|
397
|
-
|
|
394
|
+
function Qe(e, t) {
|
|
395
|
+
if (typeof e.ref == "string" && G.current && t && G.current.stateNode !== t) {
|
|
396
|
+
var n = O(G.current.type);
|
|
397
|
+
fe[n] || (f('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', O(G.current.type), e.ref), fe[n] = !0);
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
-
function
|
|
400
|
+
function Ze(e, t) {
|
|
401
401
|
{
|
|
402
|
-
var
|
|
403
|
-
|
|
402
|
+
var n = function() {
|
|
403
|
+
we || (we = !0, f("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
|
|
404
404
|
};
|
|
405
|
-
|
|
406
|
-
get:
|
|
405
|
+
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
406
|
+
get: n,
|
|
407
407
|
configurable: !0
|
|
408
408
|
});
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function et(e, t) {
|
|
412
412
|
{
|
|
413
|
-
var
|
|
414
|
-
Oe || (Oe = !0,
|
|
413
|
+
var n = function() {
|
|
414
|
+
Oe || (Oe = !0, f("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
|
|
415
415
|
};
|
|
416
|
-
|
|
417
|
-
get:
|
|
416
|
+
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
417
|
+
get: n,
|
|
418
418
|
configurable: !0
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
var
|
|
423
|
-
var
|
|
422
|
+
var tt = function(e, t, n, h, E, S, R) {
|
|
423
|
+
var x = {
|
|
424
424
|
// This tag allows us to uniquely identify this as a React Element
|
|
425
|
-
$$typeof:
|
|
425
|
+
$$typeof: r,
|
|
426
426
|
// Built-in properties that belong on the element
|
|
427
427
|
type: e,
|
|
428
|
-
key:
|
|
429
|
-
ref:
|
|
430
|
-
props:
|
|
428
|
+
key: t,
|
|
429
|
+
ref: n,
|
|
430
|
+
props: R,
|
|
431
431
|
// Record the component responsible for creating this element.
|
|
432
|
-
_owner:
|
|
432
|
+
_owner: S
|
|
433
433
|
};
|
|
434
|
-
return
|
|
434
|
+
return x._store = {}, Object.defineProperty(x._store, "validated", {
|
|
435
435
|
configurable: !1,
|
|
436
436
|
enumerable: !1,
|
|
437
437
|
writable: !0,
|
|
438
438
|
value: !1
|
|
439
|
-
}), Object.defineProperty(
|
|
439
|
+
}), Object.defineProperty(x, "_self", {
|
|
440
440
|
configurable: !1,
|
|
441
441
|
enumerable: !1,
|
|
442
442
|
writable: !1,
|
|
443
|
-
value:
|
|
444
|
-
}), Object.defineProperty(
|
|
443
|
+
value: h
|
|
444
|
+
}), Object.defineProperty(x, "_source", {
|
|
445
445
|
configurable: !1,
|
|
446
446
|
enumerable: !1,
|
|
447
447
|
writable: !1,
|
|
448
|
-
value:
|
|
449
|
-
}), Object.freeze && (Object.freeze(
|
|
448
|
+
value: E
|
|
449
|
+
}), Object.freeze && (Object.freeze(x.props), Object.freeze(x)), x;
|
|
450
450
|
};
|
|
451
|
-
function
|
|
451
|
+
function rt(e, t, n, h, E) {
|
|
452
452
|
{
|
|
453
|
-
var
|
|
454
|
-
|
|
455
|
-
for (
|
|
456
|
-
|
|
453
|
+
var S, R = {}, x = null, D = null;
|
|
454
|
+
n !== void 0 && (Te(n), x = "" + n), Ge(t) && (Te(t.key), x = "" + t.key), Xe(t) && (D = t.ref, Qe(t, E));
|
|
455
|
+
for (S in t)
|
|
456
|
+
X.call(t, S) && !Ke.hasOwnProperty(S) && (R[S] = t[S]);
|
|
457
457
|
if (e && e.defaultProps) {
|
|
458
|
-
var
|
|
459
|
-
for (
|
|
460
|
-
|
|
458
|
+
var T = e.defaultProps;
|
|
459
|
+
for (S in T)
|
|
460
|
+
R[S] === void 0 && (R[S] = T[S]);
|
|
461
461
|
}
|
|
462
|
-
if (
|
|
463
|
-
var
|
|
464
|
-
|
|
462
|
+
if (x || D) {
|
|
463
|
+
var w = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
464
|
+
x && Ze(R, w), D && et(R, w);
|
|
465
465
|
}
|
|
466
|
-
return
|
|
466
|
+
return tt(e, x, D, E, h, G.current, R);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
var
|
|
470
|
-
function
|
|
469
|
+
var de = v.ReactCurrentOwner, Pe = v.ReactDebugCurrentFrame;
|
|
470
|
+
function J(e) {
|
|
471
471
|
if (e) {
|
|
472
|
-
var
|
|
473
|
-
Pe.setExtraStackFrame(
|
|
472
|
+
var t = e._owner, n = oe(e.type, e._source, t ? t.type : null);
|
|
473
|
+
Pe.setExtraStackFrame(n);
|
|
474
474
|
} else
|
|
475
475
|
Pe.setExtraStackFrame(null);
|
|
476
476
|
}
|
|
477
|
-
var
|
|
478
|
-
|
|
479
|
-
function
|
|
480
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
477
|
+
var he;
|
|
478
|
+
he = !1;
|
|
479
|
+
function ve(e) {
|
|
480
|
+
return typeof e == "object" && e !== null && e.$$typeof === r;
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function De() {
|
|
483
483
|
{
|
|
484
|
-
if (
|
|
485
|
-
var e =
|
|
484
|
+
if (de.current) {
|
|
485
|
+
var e = O(de.current.type);
|
|
486
486
|
if (e)
|
|
487
487
|
return `
|
|
488
488
|
|
|
@@ -491,259 +491,421 @@ Check the render method of \`` + e + "`.";
|
|
|
491
491
|
return "";
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function nt(e) {
|
|
495
495
|
{
|
|
496
496
|
if (e !== void 0) {
|
|
497
|
-
var
|
|
497
|
+
var t = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
|
|
498
498
|
return `
|
|
499
499
|
|
|
500
|
-
Check your code at ` +
|
|
500
|
+
Check your code at ` + t + ":" + n + ".";
|
|
501
501
|
}
|
|
502
502
|
return "";
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
var
|
|
506
|
-
function
|
|
505
|
+
var ke = {};
|
|
506
|
+
function ot(e) {
|
|
507
507
|
{
|
|
508
|
-
var
|
|
509
|
-
if (!
|
|
510
|
-
var
|
|
511
|
-
|
|
508
|
+
var t = De();
|
|
509
|
+
if (!t) {
|
|
510
|
+
var n = typeof e == "string" ? e : e.displayName || e.name;
|
|
511
|
+
n && (t = `
|
|
512
512
|
|
|
513
|
-
Check the top-level render call using <` +
|
|
513
|
+
Check the top-level render call using <` + n + ">.");
|
|
514
514
|
}
|
|
515
|
-
return
|
|
515
|
+
return t;
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
|
-
function Fe(e,
|
|
518
|
+
function Fe(e, t) {
|
|
519
519
|
{
|
|
520
520
|
if (!e._store || e._store.validated || e.key != null)
|
|
521
521
|
return;
|
|
522
522
|
e._store.validated = !0;
|
|
523
|
-
var
|
|
524
|
-
if (
|
|
523
|
+
var n = ot(t);
|
|
524
|
+
if (ke[n])
|
|
525
525
|
return;
|
|
526
|
-
|
|
527
|
-
var
|
|
528
|
-
e && e._owner && e._owner !==
|
|
526
|
+
ke[n] = !0;
|
|
527
|
+
var h = "";
|
|
528
|
+
e && e._owner && e._owner !== de.current && (h = " It was passed a child from " + O(e._owner.type) + "."), J(e), f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, h), J(null);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
|
-
function Ie(e,
|
|
531
|
+
function Ie(e, t) {
|
|
532
532
|
{
|
|
533
533
|
if (typeof e != "object")
|
|
534
534
|
return;
|
|
535
|
-
if (
|
|
536
|
-
for (var
|
|
537
|
-
var
|
|
538
|
-
|
|
535
|
+
if (ue(e))
|
|
536
|
+
for (var n = 0; n < e.length; n++) {
|
|
537
|
+
var h = e[n];
|
|
538
|
+
ve(h) && Fe(h, t);
|
|
539
539
|
}
|
|
540
|
-
else if (
|
|
540
|
+
else if (ve(e))
|
|
541
541
|
e._store && (e._store.validated = !0);
|
|
542
542
|
else if (e) {
|
|
543
|
-
var
|
|
544
|
-
if (typeof
|
|
545
|
-
for (var
|
|
546
|
-
|
|
543
|
+
var E = y(e);
|
|
544
|
+
if (typeof E == "function" && E !== e.entries)
|
|
545
|
+
for (var S = E.call(e), R; !(R = S.next()).done; )
|
|
546
|
+
ve(R.value) && Fe(R.value, t);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function at(e) {
|
|
551
551
|
{
|
|
552
|
-
var
|
|
553
|
-
if (
|
|
552
|
+
var t = e.type;
|
|
553
|
+
if (t == null || typeof t == "string")
|
|
554
554
|
return;
|
|
555
|
-
var
|
|
556
|
-
if (typeof
|
|
557
|
-
|
|
558
|
-
else if (typeof
|
|
555
|
+
var n;
|
|
556
|
+
if (typeof t == "function")
|
|
557
|
+
n = t.propTypes;
|
|
558
|
+
else if (typeof t == "object" && (t.$$typeof === i || // Note: Memo only checks outer props here.
|
|
559
559
|
// Inner props are checked in the reconciler.
|
|
560
|
-
|
|
561
|
-
|
|
560
|
+
t.$$typeof === p))
|
|
561
|
+
n = t.propTypes;
|
|
562
562
|
else
|
|
563
563
|
return;
|
|
564
|
-
if (
|
|
565
|
-
var
|
|
566
|
-
|
|
567
|
-
} else if (
|
|
568
|
-
|
|
569
|
-
var
|
|
570
|
-
|
|
564
|
+
if (n) {
|
|
565
|
+
var h = O(t);
|
|
566
|
+
Be(n, e.props, "prop", h, e);
|
|
567
|
+
} else if (t.PropTypes !== void 0 && !he) {
|
|
568
|
+
he = !0;
|
|
569
|
+
var E = O(t);
|
|
570
|
+
f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
|
|
571
571
|
}
|
|
572
|
-
typeof
|
|
572
|
+
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function it(e) {
|
|
576
576
|
{
|
|
577
|
-
for (var
|
|
578
|
-
var
|
|
579
|
-
if (
|
|
580
|
-
|
|
577
|
+
for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
|
|
578
|
+
var h = t[n];
|
|
579
|
+
if (h !== "children" && h !== "key") {
|
|
580
|
+
J(e), f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", h), J(null);
|
|
581
581
|
break;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
e.ref !== null && (
|
|
584
|
+
e.ref !== null && (J(e), f("Invalid attribute `ref` supplied to `React.Fragment`."), J(null));
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
587
|
var Ae = {};
|
|
588
|
-
function
|
|
588
|
+
function Me(e, t, n, h, E, S) {
|
|
589
589
|
{
|
|
590
|
-
var
|
|
591
|
-
if (!
|
|
592
|
-
var
|
|
593
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
594
|
-
var
|
|
595
|
-
|
|
596
|
-
var
|
|
597
|
-
e === null ?
|
|
590
|
+
var R = L(e);
|
|
591
|
+
if (!R) {
|
|
592
|
+
var x = "";
|
|
593
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (x += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
594
|
+
var D = nt(E);
|
|
595
|
+
D ? x += D : x += De();
|
|
596
|
+
var T;
|
|
597
|
+
e === null ? T = "null" : ue(e) ? T = "array" : e !== void 0 && e.$$typeof === r ? (T = "<" + (O(e.type) || "Unknown") + " />", x = " Did you accidentally export a JSX literal instead of a component?") : T = typeof e, f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", T, x);
|
|
598
598
|
}
|
|
599
|
-
var
|
|
600
|
-
if (
|
|
601
|
-
return
|
|
602
|
-
if (
|
|
603
|
-
var
|
|
604
|
-
if (
|
|
605
|
-
if (
|
|
606
|
-
if (
|
|
607
|
-
for (var
|
|
608
|
-
Ie(
|
|
609
|
-
Object.freeze && Object.freeze(
|
|
599
|
+
var w = rt(e, t, n, E, S);
|
|
600
|
+
if (w == null)
|
|
601
|
+
return w;
|
|
602
|
+
if (R) {
|
|
603
|
+
var I = t.children;
|
|
604
|
+
if (I !== void 0)
|
|
605
|
+
if (h)
|
|
606
|
+
if (ue(I)) {
|
|
607
|
+
for (var K = 0; K < I.length; K++)
|
|
608
|
+
Ie(I[K], e);
|
|
609
|
+
Object.freeze && Object.freeze(I);
|
|
610
610
|
} else
|
|
611
|
-
|
|
611
|
+
f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
612
612
|
else
|
|
613
|
-
Ie(
|
|
613
|
+
Ie(I, e);
|
|
614
614
|
}
|
|
615
|
-
if (
|
|
616
|
-
var
|
|
617
|
-
return
|
|
618
|
-
}),
|
|
619
|
-
if (!Ae[
|
|
620
|
-
var
|
|
621
|
-
|
|
615
|
+
if (X.call(t, "key")) {
|
|
616
|
+
var B = O(e), k = Object.keys(t).filter(function(dt) {
|
|
617
|
+
return dt !== "key";
|
|
618
|
+
}), pe = k.length > 0 ? "{key: someKey, " + k.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
619
|
+
if (!Ae[B + pe]) {
|
|
620
|
+
var ft = k.length > 0 ? "{" + k.join(": ..., ") + ": ...}" : "{}";
|
|
621
|
+
f(`A props object containing a "key" prop is being spread into JSX:
|
|
622
622
|
let props = %s;
|
|
623
623
|
<%s {...props} />
|
|
624
624
|
React keys must be passed directly to JSX without using spread:
|
|
625
625
|
let props = %s;
|
|
626
|
-
<%s key={someKey} {...props} />`,
|
|
626
|
+
<%s key={someKey} {...props} />`, pe, B, ft, B), Ae[B + pe] = !0;
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
|
-
return e ===
|
|
629
|
+
return e === a ? it(w) : at(w), w;
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
|
-
function
|
|
633
|
-
return
|
|
632
|
+
function st(e, t, n) {
|
|
633
|
+
return Me(e, t, n, !0);
|
|
634
634
|
}
|
|
635
|
-
function
|
|
636
|
-
return
|
|
635
|
+
function lt(e, t, n) {
|
|
636
|
+
return Me(e, t, n, !1);
|
|
637
637
|
}
|
|
638
|
-
var
|
|
639
|
-
|
|
640
|
-
}()),
|
|
638
|
+
var ct = lt, ut = st;
|
|
639
|
+
ee.Fragment = a, ee.jsx = ct, ee.jsxs = ut;
|
|
640
|
+
}()), ee;
|
|
641
641
|
}
|
|
642
|
-
({}).NODE_ENV === "production" ?
|
|
643
|
-
var
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
642
|
+
({}).NODE_ENV === "production" ? ge.exports = vt() : ge.exports = pt();
|
|
643
|
+
var j = ge.exports;
|
|
644
|
+
class gt {
|
|
645
|
+
constructor() {
|
|
646
|
+
this.procCanvas = document.createElement("canvas"), this.procCtx = this.procCanvas.getContext("2d", { willReadFrequently: !0 }), this.smoothCorners = null, this.missCount = 0;
|
|
647
|
+
}
|
|
648
|
+
detect(r, o = 0.18) {
|
|
649
|
+
const a = Math.floor(r.videoWidth * o), c = Math.floor(r.videoHeight * o);
|
|
650
|
+
if (!a || !c)
|
|
651
|
+
return null;
|
|
652
|
+
this.procCanvas.width = a, this.procCanvas.height = c, this.procCtx.drawImage(r, 0, 0, a, c);
|
|
653
|
+
const u = this.procCtx.getImageData(0, 0, a, c).data, { brightness: l, saturation: i, avgBright: b, isTexturedBackground: s } = this.analyzeImage(u, a, c), p = this.createPaperMask(u, l, i, a, c, b, s);
|
|
654
|
+
this.cleanMask(p, a, c, s);
|
|
655
|
+
const m = this.findLargestBlob(p, a, c);
|
|
656
|
+
if (!m || m.size < a * c * 0.06)
|
|
657
|
+
return this.handleMiss();
|
|
658
|
+
const d = this.findRegionCorners(m.pixels, a, c);
|
|
659
|
+
if (!d)
|
|
660
|
+
return this.handleMiss();
|
|
661
|
+
if (!this.validateQuad(d, a, c))
|
|
662
|
+
return this.handleMiss();
|
|
663
|
+
const _ = {
|
|
664
|
+
tl: [d.tl[0] / o, d.tl[1] / o],
|
|
665
|
+
tr: [d.tr[0] / o, d.tr[1] / o],
|
|
666
|
+
br: [d.br[0] / o, d.br[1] / o],
|
|
667
|
+
bl: [d.bl[0] / o, d.bl[1] / o]
|
|
668
|
+
};
|
|
669
|
+
return this.missCount = 0, this.smooth(_);
|
|
670
|
+
}
|
|
671
|
+
analyzeImage(r, o, a) {
|
|
672
|
+
const c = new Float32Array(o * a), g = new Float32Array(o * a);
|
|
673
|
+
let u = 0, l = 0;
|
|
674
|
+
for (let p = 0, m = 0; p < r.length; p += 4, m++) {
|
|
675
|
+
const d = r[p], _ = r[p + 1], P = r[p + 2], y = (d + _ + P) / 3;
|
|
676
|
+
c[m] = y, u += y, y > 150 && l++;
|
|
677
|
+
const v = Math.max(d, _, P), f = Math.min(d, _, P);
|
|
678
|
+
g[m] = v > 0 ? (v - f) / v : 0;
|
|
679
|
+
}
|
|
680
|
+
const i = u / (o * a), s = l / (o * a) > 0.5 || i > 160;
|
|
681
|
+
return { brightness: c, saturation: g, avgBright: i, isTexturedBackground: s };
|
|
682
|
+
}
|
|
683
|
+
createPaperMask(r, o, a, c, g, u, l) {
|
|
684
|
+
const i = new Uint8Array(c * g), b = l ? this.calcLocalVariance(o, c, g) : null;
|
|
685
|
+
let s;
|
|
686
|
+
l ? s = u + 15 : s = Math.max(120, u);
|
|
687
|
+
const p = 0.3, m = l ? 400 : 9999;
|
|
688
|
+
for (let d = 0; d < c * g; d++) {
|
|
689
|
+
const _ = o[d], P = a[d];
|
|
690
|
+
if (_ < s || P > p)
|
|
691
|
+
continue;
|
|
692
|
+
const y = d * 4, v = r[y], f = r[y + 1], C = r[y + 2];
|
|
693
|
+
Math.abs(v - f) + Math.abs(f - C) + Math.abs(v - C) > 80 || l && b && b[d] > m || (i[d] = 1);
|
|
694
|
+
}
|
|
695
|
+
return i;
|
|
696
|
+
}
|
|
697
|
+
calcLocalVariance(r, o, a) {
|
|
698
|
+
const c = new Float32Array(o * a), u = Math.floor(3 / 2);
|
|
699
|
+
for (let l = u; l < a - u; l++)
|
|
700
|
+
for (let i = u; i < o - u; i++) {
|
|
701
|
+
let b = 0, s = 0, p = 0;
|
|
702
|
+
for (let d = -u; d <= u; d++)
|
|
703
|
+
for (let _ = -u; _ <= u; _++) {
|
|
704
|
+
const P = r[(l + d) * o + (i + _)];
|
|
705
|
+
b += P, s += P * P, p++;
|
|
706
|
+
}
|
|
707
|
+
const m = b / p;
|
|
708
|
+
c[l * o + i] = s / p - m * m;
|
|
709
|
+
}
|
|
710
|
+
return c;
|
|
711
|
+
}
|
|
712
|
+
cleanMask(r, o, a, c) {
|
|
713
|
+
const g = c ? 2 : 1;
|
|
714
|
+
for (let u = 0; u < g; u++) {
|
|
715
|
+
const l = new Uint8Array(o * a);
|
|
716
|
+
for (let i = 1; i < a - 1; i++)
|
|
717
|
+
for (let b = 1; b < o - 1; b++) {
|
|
718
|
+
const s = i * o + b;
|
|
719
|
+
r[s] && r[s - 1] && r[s + 1] && r[s - o] && r[s + o] && (l[s] = 1);
|
|
720
|
+
}
|
|
721
|
+
for (let i = 0; i < o * a; i++)
|
|
722
|
+
r[i] = l[i];
|
|
723
|
+
}
|
|
724
|
+
for (let u = 0; u < g; u++) {
|
|
725
|
+
const l = new Uint8Array(o * a);
|
|
726
|
+
for (let i = 1; i < a - 1; i++)
|
|
727
|
+
for (let b = 1; b < o - 1; b++) {
|
|
728
|
+
const s = i * o + b;
|
|
729
|
+
(r[s] || r[s - 1] || r[s + 1] || r[s - o] || r[s + o]) && (l[s] = 1);
|
|
730
|
+
}
|
|
731
|
+
for (let i = 0; i < o * a; i++)
|
|
732
|
+
r[i] = l[i];
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
findLargestBlob(r, o, a) {
|
|
736
|
+
const c = new Uint8Array(o * a);
|
|
737
|
+
let g = null, u = 0;
|
|
738
|
+
for (let l = 0; l < a; l++)
|
|
739
|
+
for (let i = 0; i < o; i++) {
|
|
740
|
+
const b = l * o + i;
|
|
741
|
+
if (!r[b] || c[b])
|
|
742
|
+
continue;
|
|
743
|
+
const s = /* @__PURE__ */ new Set(), p = [[i, l]];
|
|
744
|
+
for (; p.length > 0; ) {
|
|
745
|
+
const [m, d] = p.pop();
|
|
746
|
+
if (m < 0 || m >= o || d < 0 || d >= a)
|
|
747
|
+
continue;
|
|
748
|
+
const _ = d * o + m;
|
|
749
|
+
c[_] || !r[_] || (c[_] = 1, s.add(_), p.push([m - 1, d], [m + 1, d], [m, d - 1], [m, d + 1]));
|
|
750
|
+
}
|
|
751
|
+
s.size > u && (u = s.size, g = { pixels: s, size: s.size });
|
|
752
|
+
}
|
|
753
|
+
return g;
|
|
754
|
+
}
|
|
755
|
+
findRegionCorners(r, o, a) {
|
|
756
|
+
let c = 0, g = 0;
|
|
757
|
+
for (const y of r) {
|
|
758
|
+
const v = y % o, f = Math.floor(y / o);
|
|
759
|
+
c += v, g += f;
|
|
760
|
+
}
|
|
761
|
+
const u = c / r.size, l = g / r.size;
|
|
762
|
+
let i = null, b = 1 / 0, s = null, p = -1 / 0, m = null, d = -1 / 0, _ = null, P = -1 / 0;
|
|
763
|
+
for (const y of r) {
|
|
764
|
+
const v = y % o, f = Math.floor(y / o);
|
|
765
|
+
if (v <= u && f <= l) {
|
|
766
|
+
const C = v + f;
|
|
767
|
+
C < b && (b = C, i = [v, f]);
|
|
768
|
+
}
|
|
769
|
+
if (v >= u && f <= l) {
|
|
770
|
+
const C = v - f;
|
|
771
|
+
C > p && (p = C, s = [v, f]);
|
|
772
|
+
}
|
|
773
|
+
if (v >= u && f >= l) {
|
|
774
|
+
const C = v + f;
|
|
775
|
+
C > d && (d = C, m = [v, f]);
|
|
776
|
+
}
|
|
777
|
+
if (v <= u && f >= l) {
|
|
778
|
+
const C = f - v;
|
|
779
|
+
C > P && (P = C, _ = [v, f]);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
return !i || !s || !m || !_ ? null : { tl: i, tr: s, br: m, bl: _ };
|
|
783
|
+
}
|
|
784
|
+
validateQuad(r, o, a) {
|
|
785
|
+
const { tl: c, tr: g, br: u, bl: l } = r;
|
|
786
|
+
for (const y of [c, g, u, l])
|
|
787
|
+
if (!y || y[0] < 0 || y[0] >= o || y[1] < 0 || y[1] >= a)
|
|
788
|
+
return !1;
|
|
789
|
+
if (c[0] >= g[0] - 5 || l[0] >= u[0] - 5 || c[1] >= l[1] - 5 || g[1] >= u[1] - 5)
|
|
790
|
+
return !1;
|
|
791
|
+
const i = Math.hypot(g[0] - c[0], g[1] - c[1]), b = Math.hypot(u[0] - l[0], u[1] - l[1]), s = Math.hypot(l[0] - c[0], l[1] - c[1]), p = Math.hypot(u[0] - g[0], u[1] - g[1]), m = (i + b) / 2, d = (s + p) / 2;
|
|
792
|
+
if (m < 10 || d < 10)
|
|
793
|
+
return !1;
|
|
794
|
+
const _ = m / d;
|
|
795
|
+
return !(_ < 0.3 || _ > 3.5 || i / b > 2.5 || b / i > 2.5 || s / p > 2.5 || p / s > 2.5 || 0.5 * Math.abs(
|
|
796
|
+
(g[0] - l[0]) * (c[1] - u[1]) - (c[0] - u[0]) * (g[1] - l[1])
|
|
797
|
+
) < o * a * 0.05);
|
|
798
|
+
}
|
|
799
|
+
smooth(r) {
|
|
800
|
+
if (!this.smoothCorners)
|
|
801
|
+
return this.smoothCorners = r, r;
|
|
802
|
+
if (this.cornerDistance(this.smoothCorners, r) > 50)
|
|
803
|
+
return this.smoothCorners = r, r;
|
|
804
|
+
const a = 0.35;
|
|
805
|
+
return this.smoothCorners = {
|
|
806
|
+
tl: this.lerp(this.smoothCorners.tl, r.tl, a),
|
|
807
|
+
tr: this.lerp(this.smoothCorners.tr, r.tr, a),
|
|
808
|
+
br: this.lerp(this.smoothCorners.br, r.br, a),
|
|
809
|
+
bl: this.lerp(this.smoothCorners.bl, r.bl, a)
|
|
810
|
+
}, this.smoothCorners;
|
|
811
|
+
}
|
|
812
|
+
cornerDistance(r, o) {
|
|
813
|
+
let a = 0;
|
|
814
|
+
for (const c of ["tl", "tr", "br", "bl"]) {
|
|
815
|
+
const g = r[c][0] - o[c][0], u = r[c][1] - o[c][1];
|
|
816
|
+
a += Math.sqrt(g * g + u * u);
|
|
817
|
+
}
|
|
818
|
+
return a / 4;
|
|
819
|
+
}
|
|
820
|
+
lerp(r, o, a) {
|
|
821
|
+
return [
|
|
822
|
+
r[0] + a * (o[0] - r[0]),
|
|
823
|
+
r[1] + a * (o[1] - r[1])
|
|
824
|
+
];
|
|
825
|
+
}
|
|
826
|
+
handleMiss() {
|
|
827
|
+
return this.missCount++, this.missCount < 8 && this.smoothCorners ? this.smoothCorners : null;
|
|
828
|
+
}
|
|
829
|
+
reset() {
|
|
830
|
+
this.smoothCorners = null, this.missCount = 0;
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
const bt = ({ onCapture: A }) => {
|
|
834
|
+
const r = Q(null), o = Q(null), [a, c] = ie(!1), [g, u] = ie(null), [l, i] = ie([]), b = Q(null), s = Q(null), p = Q(0);
|
|
835
|
+
ht(() => {
|
|
836
|
+
b.current || (b.current = new gt());
|
|
837
|
+
let y = null;
|
|
649
838
|
async function v() {
|
|
650
839
|
try {
|
|
651
|
-
const
|
|
840
|
+
const C = await navigator.mediaDevices.getUserMedia({
|
|
652
841
|
video: { facingMode: "environment", width: { ideal: 1920 } }
|
|
653
842
|
});
|
|
654
|
-
|
|
655
|
-
} catch (
|
|
656
|
-
console.error("Camera access error:",
|
|
843
|
+
r.current && (r.current.srcObject = C, r.current.play(), y = requestAnimationFrame(f));
|
|
844
|
+
} catch (C) {
|
|
845
|
+
console.error("Camera access error:", C);
|
|
657
846
|
}
|
|
658
847
|
}
|
|
659
|
-
function
|
|
660
|
-
var
|
|
661
|
-
if (((
|
|
662
|
-
const
|
|
663
|
-
if (
|
|
848
|
+
function f() {
|
|
849
|
+
var C;
|
|
850
|
+
if (((C = r.current) == null ? void 0 : C.readyState) >= 2) {
|
|
851
|
+
const F = r.current, $ = o.current;
|
|
852
|
+
if (!$)
|
|
664
853
|
return;
|
|
665
|
-
const
|
|
666
|
-
|
|
667
|
-
const
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
}
|
|
675
|
-
c = requestAnimationFrame(l);
|
|
676
|
-
}
|
|
677
|
-
return v(), () => cancelAnimationFrame(c);
|
|
678
|
-
}, []);
|
|
679
|
-
const H = (c, v) => Math.abs(c.tl[0] - v.tl[0]) + Math.abs(c.tl[1] - v.tl[1]) < 50, ne = (c) => {
|
|
680
|
-
const l = Math.floor(c.videoWidth * 0.15), s = Math.floor(c.videoHeight * 0.15), T = O.current.getContext("2d");
|
|
681
|
-
O.current.width = l, O.current.height = s, T.drawImage(c, 0, 0, l, s);
|
|
682
|
-
const k = T.getImageData(0, 0, l, s).data;
|
|
683
|
-
let g = [l, s], _ = [0, s], E = [l, 0], U = [0, 0], b = 0;
|
|
684
|
-
for (let p = 10; p < s - 10; p++)
|
|
685
|
-
for (let C = 10; C < l - 10; C++) {
|
|
686
|
-
const z = (p * l + C) * 4, L = k[z], N = k[z + 1], Z = k[z + 2];
|
|
687
|
-
L > 180 && N > 180 && Z > 170 && Math.abs(L - N) < 25 && Math.abs(N - Z) < 25 && (b++, C + p < g[0] + g[1] && (g = [C, p]), C - p > _[0] - _[1] && (_ = [C, p]), C - p < E[0] - E[1] && (E = [C, p]), C + p > U[0] + U[1] && (U = [C, p]));
|
|
688
|
-
}
|
|
689
|
-
const D = _[0] - g[0], w = E[1] - g[1];
|
|
690
|
-
return b < l * s * 0.08 || D < l * 0.3 || w < s * 0.3 ? null : {
|
|
691
|
-
tl: [g[0] / 0.15, g[1] / 0.15],
|
|
692
|
-
tr: [_[0] / 0.15, _[1] / 0.15],
|
|
693
|
-
bl: [E[0] / 0.15, E[1] / 0.15],
|
|
694
|
-
br: [U[0] / 0.15, U[1] / 0.15]
|
|
854
|
+
const M = $.getContext("2d");
|
|
855
|
+
$.width !== F.videoWidth && ($.width = F.videoWidth, $.height = F.videoHeight), M.drawImage(F, 0, 0);
|
|
856
|
+
const Y = b.current.detect(F, 0.18);
|
|
857
|
+
Y ? (s.current && m(Y, s.current) ? p.current = Math.min(15, p.current + 1) : p.current = 0, s.current = Y, p.current > 5 && (c(!0), u(Y))) : (p.current = Math.max(0, p.current - 2), p.current === 0 && (s.current = null, c(!1), u(null)));
|
|
858
|
+
}
|
|
859
|
+
y = requestAnimationFrame(f);
|
|
860
|
+
}
|
|
861
|
+
return v(), () => {
|
|
862
|
+
cancelAnimationFrame(y), b.current && b.current.reset();
|
|
695
863
|
};
|
|
696
|
-
},
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
v[s][0] += l[s][0] / c.length, v[s][1] += l[s][1] / c.length;
|
|
701
|
-
});
|
|
702
|
-
}), v;
|
|
703
|
-
}, ue = () => {
|
|
704
|
-
const c = m.current, v = x.current;
|
|
705
|
-
if (!c || !v)
|
|
864
|
+
}, []);
|
|
865
|
+
const m = (y, v) => Math.abs(y.tl[0] - v.tl[0]) + Math.abs(y.tl[1] - v.tl[1]) < 50, d = () => {
|
|
866
|
+
const y = r.current, v = s.current;
|
|
867
|
+
if (!y || !v)
|
|
706
868
|
return;
|
|
707
|
-
const
|
|
708
|
-
|
|
709
|
-
const
|
|
710
|
-
|
|
711
|
-
const
|
|
712
|
-
for (let
|
|
713
|
-
for (let
|
|
714
|
-
const
|
|
715
|
-
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
const
|
|
719
|
-
|
|
720
|
-
},
|
|
721
|
-
|
|
722
|
-
},
|
|
723
|
-
if (!
|
|
869
|
+
const f = 1240, C = 1754, F = document.createElement("canvas");
|
|
870
|
+
F.width = f, F.height = C;
|
|
871
|
+
const $ = F.getContext("2d"), M = document.createElement("canvas");
|
|
872
|
+
M.width = y.videoWidth, M.height = y.videoHeight, M.getContext("2d").drawImage(y, 0, 0);
|
|
873
|
+
const Y = M.getContext("2d").getImageData(0, 0, M.width, M.height), z = $.createImageData(f, C);
|
|
874
|
+
for (let L = 0; L < C; L++)
|
|
875
|
+
for (let q = 0; q < f; q++) {
|
|
876
|
+
const W = q / f, O = L / C, U = Math.floor((1 - W) * (1 - O) * v.tl[0] + W * (1 - O) * v.tr[0] + (1 - W) * O * v.bl[0] + W * O * v.br[0]), V = Math.floor((1 - W) * (1 - O) * v.tl[1] + W * (1 - O) * v.tr[1] + (1 - W) * O * v.bl[1] + W * O * v.br[1]), N = (L * f + q) * 4, H = (V * M.width + U) * 4;
|
|
877
|
+
z.data[N] = Y.data[H], z.data[N + 1] = Y.data[H + 1], z.data[N + 2] = Y.data[H + 2], z.data[N + 3] = 255;
|
|
878
|
+
}
|
|
879
|
+
$.putImageData(z, 0, 0);
|
|
880
|
+
const te = F.toDataURL("image/jpeg", 0.92);
|
|
881
|
+
i((L) => [...L, te]);
|
|
882
|
+
}, _ = () => {
|
|
883
|
+
l.length > 0 && A(l);
|
|
884
|
+
}, P = () => {
|
|
885
|
+
if (!g || !r.current)
|
|
724
886
|
return "";
|
|
725
|
-
const
|
|
726
|
-
return `${
|
|
887
|
+
const y = r.current.videoWidth, v = r.current.videoHeight, f = (C) => `${C[0] / y * 100},${C[1] / v * 100}`;
|
|
888
|
+
return `${f(g.tl)} ${f(g.tr)} ${f(g.br)} ${f(g.bl)}`;
|
|
727
889
|
};
|
|
728
|
-
return /* @__PURE__ */
|
|
890
|
+
return /* @__PURE__ */ j.jsxs("div", { style: {
|
|
729
891
|
position: "fixed",
|
|
730
892
|
inset: 0,
|
|
731
893
|
backgroundColor: "#000",
|
|
732
894
|
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
733
895
|
overflow: "hidden"
|
|
734
896
|
}, children: [
|
|
735
|
-
/* @__PURE__ */
|
|
736
|
-
/* @__PURE__ */
|
|
737
|
-
/* @__PURE__ */
|
|
897
|
+
/* @__PURE__ */ j.jsx("video", { ref: r, style: { display: "none" }, playsInline: !0, muted: !0 }),
|
|
898
|
+
/* @__PURE__ */ j.jsx("canvas", { ref: o, style: { width: "100vw", height: "100vh", objectFit: "cover" } }),
|
|
899
|
+
/* @__PURE__ */ j.jsx(
|
|
738
900
|
"svg",
|
|
739
901
|
{
|
|
740
902
|
viewBox: "0 0 100 100",
|
|
741
903
|
preserveAspectRatio: "none",
|
|
742
904
|
style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%", pointerEvents: "none", zIndex: 10 },
|
|
743
|
-
children:
|
|
905
|
+
children: g && /* @__PURE__ */ j.jsx(
|
|
744
906
|
"polygon",
|
|
745
907
|
{
|
|
746
|
-
points:
|
|
908
|
+
points: P(),
|
|
747
909
|
fill: "rgba(0, 255, 70, 0.15)",
|
|
748
910
|
stroke: "#00FF46",
|
|
749
911
|
strokeWidth: "0.5",
|
|
@@ -752,56 +914,56 @@ const gr = ({ onCapture: $ }) => {
|
|
|
752
914
|
)
|
|
753
915
|
}
|
|
754
916
|
),
|
|
755
|
-
/* @__PURE__ */
|
|
756
|
-
/* @__PURE__ */
|
|
757
|
-
/* @__PURE__ */
|
|
917
|
+
/* @__PURE__ */ j.jsx("div", { style: { position: "absolute", top: 0, width: "100%", padding: "40px 0 20px", background: "linear-gradient(rgba(0,0,0,0.6), transparent)", textAlign: "center", zIndex: 20 }, children: /* @__PURE__ */ j.jsx("div", { style: { display: "inline-block", padding: "6px 16px", borderRadius: "20px", backgroundColor: a ? "#00FF46" : "rgba(255,255,255,0.2)", color: a ? "#000" : "#fff", fontSize: "12px", fontWeight: "bold" }, children: a ? "READY TO SCAN" : "POSITION DOCUMENT" }) }),
|
|
918
|
+
/* @__PURE__ */ j.jsxs("div", { style: { position: "absolute", bottom: 0, width: "100%", height: "160px", background: "linear-gradient(transparent, rgba(0,0,0,0.8))", display: "flex", alignItems: "center", justifyContent: "space-around", zIndex: 20 }, children: [
|
|
919
|
+
/* @__PURE__ */ j.jsxs(
|
|
758
920
|
"div",
|
|
759
921
|
{
|
|
760
|
-
onClick:
|
|
922
|
+
onClick: _,
|
|
761
923
|
style: {
|
|
762
924
|
width: "64px",
|
|
763
925
|
height: "64px",
|
|
764
926
|
position: "relative",
|
|
765
|
-
cursor:
|
|
766
|
-
opacity:
|
|
927
|
+
cursor: l.length > 0 ? "pointer" : "default",
|
|
928
|
+
opacity: l.length > 0 ? 1 : 0.4,
|
|
767
929
|
transition: "transform 0.2s"
|
|
768
930
|
},
|
|
769
|
-
onMouseDown: (
|
|
770
|
-
onMouseUp: (
|
|
931
|
+
onMouseDown: (y) => l.length > 0 && (y.currentTarget.style.transform = "scale(0.9)"),
|
|
932
|
+
onMouseUp: (y) => y.currentTarget.style.transform = "scale(1)",
|
|
771
933
|
children: [
|
|
772
|
-
|
|
773
|
-
/* @__PURE__ */
|
|
774
|
-
/* @__PURE__ */
|
|
775
|
-
] }) : /* @__PURE__ */
|
|
776
|
-
/* @__PURE__ */
|
|
934
|
+
l.length > 0 ? /* @__PURE__ */ j.jsxs(j.Fragment, { children: [
|
|
935
|
+
/* @__PURE__ */ j.jsx("img", { src: l[l.length - 1], style: { width: "100%", height: "100%", objectFit: "cover", border: "2px solid #fff", borderRadius: "4px" }, alt: "preview" }),
|
|
936
|
+
/* @__PURE__ */ j.jsx("div", { style: { position: "absolute", top: "-8px", right: "-8px", background: "#00FF46", color: "#000", width: "22px", height: "22px", borderRadius: "50%", fontSize: "12px", fontWeight: "bold", display: "flex", alignItems: "center", justifyContent: "center", border: "2px solid #000" }, children: l.length })
|
|
937
|
+
] }) : /* @__PURE__ */ j.jsx("div", { style: { width: "100%", height: "100%", borderRadius: "4px", backgroundColor: "rgba(255,255,255,0.1)", border: "1px dashed #555" } }),
|
|
938
|
+
/* @__PURE__ */ j.jsx("span", { style: { fontSize: "10px", display: "block", textAlign: "center", marginTop: "4px", color: "#fff" }, children: "DONE" })
|
|
777
939
|
]
|
|
778
940
|
}
|
|
779
941
|
),
|
|
780
|
-
/* @__PURE__ */
|
|
781
|
-
/* @__PURE__ */
|
|
942
|
+
/* @__PURE__ */ j.jsx("button", { onClick: d, disabled: !a, style: { width: "84px", height: "84px", borderRadius: "50%", border: `4px solid ${a ? "#00FF46" : "#555"}`, backgroundColor: "transparent", cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ j.jsx("div", { style: { width: "68px", height: "68px", borderRadius: "50%", backgroundColor: a ? "#fff" : "#444" } }) }),
|
|
943
|
+
/* @__PURE__ */ j.jsx("div", { style: { width: "64px" } })
|
|
782
944
|
] })
|
|
783
945
|
] });
|
|
784
946
|
};
|
|
785
|
-
function
|
|
786
|
-
const [
|
|
787
|
-
return /* @__PURE__ */
|
|
788
|
-
/* @__PURE__ */
|
|
789
|
-
|
|
790
|
-
/* @__PURE__ */
|
|
791
|
-
|
|
947
|
+
function mt() {
|
|
948
|
+
const [A, r] = ie(null);
|
|
949
|
+
return /* @__PURE__ */ j.jsxs("div", { style: { textAlign: "center", padding: "20px", fontFamily: "sans-serif" }, children: [
|
|
950
|
+
/* @__PURE__ */ j.jsx("h1", { children: "JS Doc Scanner" }),
|
|
951
|
+
A ? /* @__PURE__ */ j.jsxs("div", { children: [
|
|
952
|
+
/* @__PURE__ */ j.jsx("h3", { children: "Scanned Result:" }),
|
|
953
|
+
A == null ? void 0 : A.map((o, a) => /* @__PURE__ */ j.jsx(
|
|
792
954
|
"img",
|
|
793
955
|
{
|
|
794
|
-
src:
|
|
956
|
+
src: o,
|
|
795
957
|
style: { width: "100%", maxWidth: "400px", border: "2px solid #ccc", margin: "10px" }
|
|
796
958
|
},
|
|
797
|
-
|
|
959
|
+
a
|
|
798
960
|
)),
|
|
799
|
-
/* @__PURE__ */
|
|
800
|
-
/* @__PURE__ */
|
|
801
|
-
] }) : /* @__PURE__ */
|
|
961
|
+
/* @__PURE__ */ j.jsx("br", {}),
|
|
962
|
+
/* @__PURE__ */ j.jsx("button", { onClick: () => r(null), children: "Scan Again" })
|
|
963
|
+
] }) : /* @__PURE__ */ j.jsx(bt, { onCapture: (o) => r(o) })
|
|
802
964
|
] });
|
|
803
965
|
}
|
|
804
966
|
export {
|
|
805
|
-
|
|
806
|
-
|
|
967
|
+
mt as App,
|
|
968
|
+
bt as DocumentScanner
|
|
807
969
|
};
|