@exige/web-scanner-sdk 0.2.36 → 0.2.38
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/{driver-license-CBDCGp14.js → driver-license-DC8Jb0DE.js} +673 -523
- package/dist/driver-license-DC8Jb0DE.js.map +1 -0
- package/dist/react/types.d.ts +8 -0
- package/dist/react.js +407 -379
- package/dist/react.js.map +1 -1
- package/dist/scanner-sdk.js +3 -3
- package/dist/sdk/barcode.d.ts +26 -1
- package/dist/sdk/camera.d.ts +6 -0
- package/dist/sdk/driver-license.d.ts +7 -1
- package/dist/sdk/zxing-runtime.d.ts +5 -0
- package/package.json +3 -1
- package/dist/driver-license-CBDCGp14.js.map +0 -1
package/dist/react.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { H as e,
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { Fragment as
|
|
2
|
+
import { H as e, J as t, K as n, L as r, R as i, T as a, W as o, X as s, a as c, f as l, j as u, o as d, p as f, q as p, r as m, w as ee, y as h, z as te } from "./driver-license-DC8Jb0DE.js";
|
|
3
|
+
import { createContext as g, useCallback as _, useContext as v, useEffect as y, useLayoutEffect as ne, useMemo as re, useRef as b, useState as x } from "react";
|
|
4
|
+
import { Fragment as ie, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
5
5
|
//#region src/sdk/display-quad.ts
|
|
6
|
-
function
|
|
6
|
+
function w(e) {
|
|
7
7
|
return [
|
|
8
8
|
e.topLeft,
|
|
9
9
|
e.topRight,
|
|
@@ -11,7 +11,7 @@ function C(e) {
|
|
|
11
11
|
e.bottomLeft
|
|
12
12
|
];
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function ae(e) {
|
|
15
15
|
let [t, n, r, i] = e;
|
|
16
16
|
return {
|
|
17
17
|
topLeft: t,
|
|
@@ -38,10 +38,10 @@ function w(e) {
|
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return w(
|
|
41
|
+
function oe(e) {
|
|
42
|
+
return ae(w(e).map((e) => ({ ...e })));
|
|
43
43
|
}
|
|
44
|
-
var
|
|
44
|
+
var se = class {
|
|
45
45
|
current;
|
|
46
46
|
target;
|
|
47
47
|
response;
|
|
@@ -50,11 +50,11 @@ var ae = class {
|
|
|
50
50
|
this.response = e.response ?? 14, this.snapDistance = e.snapDistance ?? .1;
|
|
51
51
|
}
|
|
52
52
|
setTarget(e, t, n) {
|
|
53
|
-
let r = Math.max(1, Math.hypot(t, n)), i = !this.current ||
|
|
54
|
-
let n =
|
|
53
|
+
let r = Math.max(1, Math.hypot(t, n)), i = !this.current || w(e).some((e, t) => {
|
|
54
|
+
let n = w(this.current)[t];
|
|
55
55
|
return Math.hypot(e.x - n.x, e.y - n.y) / r > this.snapDistance;
|
|
56
56
|
});
|
|
57
|
-
return this.target =
|
|
57
|
+
return this.target = oe(e), i && (this.current = oe(e)), {
|
|
58
58
|
quad: this.current,
|
|
59
59
|
snapped: i
|
|
60
60
|
};
|
|
@@ -62,8 +62,8 @@ var ae = class {
|
|
|
62
62
|
step(e) {
|
|
63
63
|
if (!this.current || !this.target) return this.current;
|
|
64
64
|
let t = 1 - Math.exp(-this.response * Math.max(0, e) / 1e3);
|
|
65
|
-
return this.current = w(
|
|
66
|
-
let r =
|
|
65
|
+
return this.current = ae(w(this.current).map((e, n) => {
|
|
66
|
+
let r = w(this.target)[n];
|
|
67
67
|
return {
|
|
68
68
|
x: e.x + (r.x - e.x) * t,
|
|
69
69
|
y: e.y + (r.y - e.y) * t
|
|
@@ -76,13 +76,22 @@ var ae = class {
|
|
|
76
76
|
getCurrent() {
|
|
77
77
|
return this.current;
|
|
78
78
|
}
|
|
79
|
-
},
|
|
79
|
+
}, ce = g(null);
|
|
80
80
|
//#endregion
|
|
81
81
|
//#region src/react/context.tsx
|
|
82
|
-
function
|
|
82
|
+
function le(e) {
|
|
83
83
|
e?.startsWith("blob:") && URL.revokeObjectURL(e);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function ue() {
|
|
86
|
+
return new Promise((e) => {
|
|
87
|
+
if (typeof requestAnimationFrame == "function") {
|
|
88
|
+
requestAnimationFrame(() => requestAnimationFrame(() => e()));
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
setTimeout(e, 0);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
function de(e) {
|
|
86
95
|
try {
|
|
87
96
|
let t = e.toDataURL("image/jpeg", .92);
|
|
88
97
|
return t.startsWith("data:image/") ? t : void 0;
|
|
@@ -90,180 +99,193 @@ function ce(e) {
|
|
|
90
99
|
return;
|
|
91
100
|
}
|
|
92
101
|
}
|
|
93
|
-
function
|
|
102
|
+
function fe(e, t) {
|
|
94
103
|
if (typeof e == "function") return e(t);
|
|
95
104
|
}
|
|
96
|
-
function
|
|
97
|
-
let
|
|
98
|
-
onCapture:
|
|
99
|
-
onDriverLicense:
|
|
100
|
-
onCancel:
|
|
101
|
-
onError:
|
|
102
|
-
onSettings:
|
|
103
|
-
onFinderStatus:
|
|
104
|
-
useCase:
|
|
105
|
-
}),
|
|
105
|
+
function pe({ open: m, useCase: h = "document", autoCapture: g = "defaultOn", captureMode: v = "auto", torch: ie = "defaultOff", onCapture: C, onDriverLicense: w, onCancel: ae, onError: oe, onSettings: pe, onFinderStatus: me, modelUrl: T, ortWasmPaths: E, detectionIntervalMs: he, apiRef: D, children: ge }) {
|
|
106
|
+
let O = p(v), k = b(void 0), A = b(void 0), j = b(void 0), M = b(void 0), N = b({}), P = b(new se()), F = b(!1), _e = b(!1), I = b({
|
|
107
|
+
onCapture: C,
|
|
108
|
+
onDriverLicense: w,
|
|
109
|
+
onCancel: ae,
|
|
110
|
+
onError: oe,
|
|
111
|
+
onSettings: pe,
|
|
112
|
+
onFinderStatus: me,
|
|
113
|
+
useCase: h
|
|
114
|
+
}), ve = b(void 0), ye = b(void 0), L = b(async () => void 0), R = b(!1), z = b(void 0), be = b(null), [B, xe] = x(null), [Se, V] = x(O && m ? "capturing" : O ? "ready" : "starting"), [H, U] = x(), [Ce, W] = x(), [we, G] = x(), [Te, Ee] = x({
|
|
106
115
|
width: 1,
|
|
107
116
|
height: 1
|
|
108
|
-
}), [
|
|
117
|
+
}), [De, Oe] = x(), [ke, K] = x(), [Ae, q] = x(""), [je, Me] = x(0), [Ne, J] = x(), [Pe, Y] = x(), [Fe, Ie] = x("idle"), [Le, Re] = x(), ze = b(void 0), [Be, Ve] = x("front"), He = b("front"), [Ue, We] = x(!1), [Ge, Ke] = x({
|
|
109
118
|
downloading: !1,
|
|
110
119
|
loaded: 0,
|
|
111
120
|
total: null
|
|
112
|
-
}),
|
|
113
|
-
|
|
114
|
-
}, []),
|
|
115
|
-
let n =
|
|
116
|
-
|
|
121
|
+
}), X = _(() => {
|
|
122
|
+
le(ze.current), ze.current = void 0, Re(void 0);
|
|
123
|
+
}, []), Z = _((e, t) => {
|
|
124
|
+
let n = de(e);
|
|
125
|
+
le(ze.current), ze.current = n, Re(n), t?.pause();
|
|
126
|
+
}, []), Q = _(async (e, t) => {
|
|
127
|
+
t && (G({
|
|
128
|
+
width: e.width,
|
|
129
|
+
height: e.height
|
|
130
|
+
}), W(t), await ue(), await new Promise((e) => {
|
|
131
|
+
window.setTimeout(e, 280);
|
|
132
|
+
}));
|
|
117
133
|
}, []);
|
|
118
|
-
|
|
134
|
+
ne(() => {
|
|
119
135
|
I.current = {
|
|
120
|
-
onCapture:
|
|
121
|
-
onDriverLicense:
|
|
122
|
-
onCancel:
|
|
123
|
-
onError:
|
|
124
|
-
onSettings:
|
|
125
|
-
onFinderStatus:
|
|
126
|
-
useCase:
|
|
136
|
+
onCapture: C,
|
|
137
|
+
onDriverLicense: w,
|
|
138
|
+
onCancel: ae,
|
|
139
|
+
onError: oe,
|
|
140
|
+
onSettings: pe,
|
|
141
|
+
onFinderStatus: me,
|
|
142
|
+
useCase: h
|
|
127
143
|
};
|
|
128
144
|
}, [
|
|
129
|
-
b,
|
|
130
|
-
S,
|
|
131
145
|
C,
|
|
132
146
|
w,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
147
|
+
ae,
|
|
148
|
+
oe,
|
|
149
|
+
pe,
|
|
150
|
+
me,
|
|
151
|
+
h
|
|
152
|
+
]), y(() => s(Ke), []), y(() => {
|
|
153
|
+
if (!m || h !== "drivers-license") {
|
|
154
|
+
ye.current = void 0, ve.current = void 0, R.current = !1, Ve("front"), We(!1);
|
|
139
155
|
return;
|
|
140
156
|
}
|
|
141
|
-
let e =
|
|
142
|
-
modelUrl:
|
|
143
|
-
ortWasmPaths:
|
|
157
|
+
let e = c({ scan: {
|
|
158
|
+
modelUrl: T,
|
|
159
|
+
ortWasmPaths: E
|
|
144
160
|
} });
|
|
145
|
-
return
|
|
146
|
-
|
|
161
|
+
return ye.current = e, e.then((e) => {
|
|
162
|
+
ve.current = e;
|
|
147
163
|
}), () => {
|
|
148
|
-
e.then((e) => e.cancel()),
|
|
164
|
+
e.then((e) => e.cancel()), ve.current &&= void 0, ye.current = void 0;
|
|
149
165
|
};
|
|
150
166
|
}, [
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
167
|
+
m,
|
|
168
|
+
h,
|
|
169
|
+
T,
|
|
170
|
+
E
|
|
155
171
|
]);
|
|
156
|
-
let
|
|
157
|
-
|
|
172
|
+
let qe = _((e) => {
|
|
173
|
+
xe(e);
|
|
158
174
|
}, []);
|
|
159
|
-
|
|
160
|
-
if (!
|
|
175
|
+
y(() => {
|
|
176
|
+
if (!m || !B) return;
|
|
161
177
|
let e = () => {
|
|
162
|
-
let e =
|
|
163
|
-
|
|
178
|
+
let e = B.getBoundingClientRect();
|
|
179
|
+
Ee({
|
|
164
180
|
width: e.width,
|
|
165
181
|
height: e.height
|
|
166
182
|
});
|
|
167
183
|
};
|
|
168
184
|
if (e(), typeof ResizeObserver > "u") return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
169
185
|
let t = new ResizeObserver(e);
|
|
170
|
-
return t.observe(
|
|
171
|
-
}, [
|
|
172
|
-
if (!
|
|
186
|
+
return t.observe(B), () => t.disconnect();
|
|
187
|
+
}, [m, B]), y(() => {
|
|
188
|
+
if (!m) return;
|
|
173
189
|
let e = window.setInterval(() => {
|
|
174
|
-
let e =
|
|
190
|
+
let e = k.current?.getDiagnostics();
|
|
175
191
|
e && J(e);
|
|
176
192
|
}, 500);
|
|
177
193
|
return () => window.clearInterval(e);
|
|
178
|
-
}, [
|
|
179
|
-
if (!
|
|
180
|
-
let e = 0, t = performance.now(),
|
|
181
|
-
let i = P.current.step(
|
|
182
|
-
t =
|
|
194
|
+
}, [m, je]), y(() => {
|
|
195
|
+
if (!m) return;
|
|
196
|
+
let e = 0, t = performance.now(), n = (r) => {
|
|
197
|
+
let i = P.current.step(r - t);
|
|
198
|
+
t = r, i && W(i), e = requestAnimationFrame(n);
|
|
183
199
|
};
|
|
184
|
-
return e = requestAnimationFrame(
|
|
185
|
-
}, [
|
|
186
|
-
if (!
|
|
187
|
-
let e = !1,
|
|
188
|
-
|
|
189
|
-
let
|
|
190
|
-
|
|
200
|
+
return e = requestAnimationFrame(n), () => cancelAnimationFrame(e);
|
|
201
|
+
}, [m]), y(() => {
|
|
202
|
+
if (!m || O || !B) return;
|
|
203
|
+
let e = !1, i = new AbortController();
|
|
204
|
+
z.current = i;
|
|
205
|
+
let o = () => {
|
|
206
|
+
i.abort(), z.current === i && (z.current = void 0), A.current?.stop(), A.current = void 0, k.current?.stop(), k.current = void 0, M.current = void 0, j.current = void 0, N.current = {}, X();
|
|
191
207
|
};
|
|
192
208
|
return (async () => {
|
|
193
|
-
|
|
209
|
+
o(), i = new AbortController(), z.current = i, F.current = !1, V("starting"), q(""), U(void 0), K(void 0), Y(void 0), Ie("idle"), X();
|
|
194
210
|
try {
|
|
195
|
-
let
|
|
211
|
+
let o = await t(B, { torch: ie });
|
|
196
212
|
if (e) {
|
|
197
|
-
|
|
213
|
+
o.stop();
|
|
198
214
|
return;
|
|
199
215
|
}
|
|
200
|
-
|
|
201
|
-
let
|
|
202
|
-
if (
|
|
203
|
-
W(void 0), G(void 0), P.current.clear(),
|
|
216
|
+
k.current = o;
|
|
217
|
+
let s = o.getSettings();
|
|
218
|
+
if (Oe(s), I.current.onSettings?.(s), console.info("[ScannerProvider] camera settings", s), I.current.useCase === "drivers-license" && He.current === "back") {
|
|
219
|
+
U(void 0), W(void 0), G(void 0), P.current.clear(), V("ready"), (async () => {
|
|
204
220
|
try {
|
|
205
|
-
let
|
|
221
|
+
let t = 0, a = await d(async () => {
|
|
222
|
+
t += 1;
|
|
223
|
+
let e = r();
|
|
224
|
+
if (t % 4 == 0 && n(e, "ImageCapture" in globalThis)) try {
|
|
225
|
+
let e = await o.capturePhoto();
|
|
226
|
+
if (e.frame && e.luminance > 10) return e.frame;
|
|
227
|
+
} catch {}
|
|
206
228
|
try {
|
|
207
|
-
return
|
|
229
|
+
return await o.captureLiveFrame(l);
|
|
208
230
|
} catch {
|
|
209
231
|
return;
|
|
210
232
|
}
|
|
211
233
|
}, {
|
|
212
|
-
intervalMs:
|
|
213
|
-
signal:
|
|
234
|
+
intervalMs: he ?? 140,
|
|
235
|
+
signal: i.signal
|
|
214
236
|
});
|
|
215
|
-
if (e ||
|
|
216
|
-
|
|
217
|
-
frame:
|
|
237
|
+
if (e || i.signal.aborted || R.current || (R.current = !0, Z(a.frame, B), K("live-mirror"), V("captured"), await Q(a.frame, a.quad), e || i.signal.aborted)) return;
|
|
238
|
+
await L.current({
|
|
239
|
+
frame: a.frame,
|
|
218
240
|
reason: "auto",
|
|
219
|
-
method: "
|
|
220
|
-
settings:
|
|
241
|
+
method: "live-mirror",
|
|
242
|
+
settings: o.getSettings()
|
|
221
243
|
});
|
|
222
|
-
} catch (
|
|
223
|
-
if (e ||
|
|
224
|
-
let
|
|
225
|
-
F.current = !0, q(
|
|
244
|
+
} catch (t) {
|
|
245
|
+
if (e || i.signal.aborted || t instanceof DOMException && t.name === "AbortError") return;
|
|
246
|
+
let n = t instanceof Error ? t : /* @__PURE__ */ Error("Could not read the barcode.");
|
|
247
|
+
F.current = !0, q(n.message), V("error"), I.current.onError?.(n);
|
|
226
248
|
}
|
|
227
249
|
})();
|
|
228
250
|
return;
|
|
229
251
|
}
|
|
230
|
-
|
|
231
|
-
source:
|
|
232
|
-
autoCapture:
|
|
233
|
-
intervalMs:
|
|
252
|
+
A.current = await a({
|
|
253
|
+
source: B,
|
|
254
|
+
autoCapture: g,
|
|
255
|
+
intervalMs: he,
|
|
234
256
|
detection: {
|
|
235
|
-
modelUrl:
|
|
236
|
-
ortWasmPaths:
|
|
257
|
+
modelUrl: T,
|
|
258
|
+
ortWasmPaths: E
|
|
237
259
|
},
|
|
238
260
|
onStatus: (e) => {
|
|
239
|
-
if (
|
|
261
|
+
if (j.current = e, U(e), I.current.onFinderStatus?.(e), e.quad && e.sourceWidth && e.sourceHeight) {
|
|
240
262
|
let t = P.current.setTarget(e.quad, e.sourceWidth, e.sourceHeight);
|
|
241
|
-
|
|
242
|
-
} else P.current.clear(),
|
|
243
|
-
e.state !== "captured" && !F.current &&
|
|
263
|
+
W(t.quad);
|
|
264
|
+
} else P.current.clear(), W(void 0);
|
|
265
|
+
e.state !== "captured" && !F.current && V("ready");
|
|
244
266
|
},
|
|
245
267
|
captureFrame: async () => {
|
|
246
|
-
|
|
268
|
+
V("capturing"), N.current = {
|
|
247
269
|
quad: P.current.getCurrent(),
|
|
248
|
-
sourceWidth:
|
|
249
|
-
sourceHeight:
|
|
270
|
+
sourceWidth: j.current?.sourceWidth,
|
|
271
|
+
sourceHeight: j.current?.sourceHeight
|
|
250
272
|
};
|
|
251
|
-
let e = await
|
|
273
|
+
let e = await o.capturePhoto();
|
|
252
274
|
if (M.current = e, K(e.method), Y(e.diagnostics), J(e.diagnostics), e.luminance <= 10) throw Error(`The captured frame was blank (luminance ${e.luminance.toFixed(1)} via ${e.method}). Keep the scanner visible while capturing and retake.`);
|
|
253
|
-
return
|
|
275
|
+
return Z(e.frame, B), V("captured"), e.frame;
|
|
254
276
|
},
|
|
255
277
|
onCaptureError: (e) => {
|
|
256
|
-
F.current = !0,
|
|
257
|
-
let t =
|
|
278
|
+
F.current = !0, V("error"), q(e.message);
|
|
279
|
+
let t = k.current?.getDiagnostics();
|
|
258
280
|
t && J(t), I.current.onError?.(e);
|
|
259
281
|
},
|
|
260
282
|
onCapture: async (e) => {
|
|
261
283
|
let t = M.current;
|
|
262
284
|
await new Promise((e) => window.setTimeout(e, 140));
|
|
263
|
-
let
|
|
285
|
+
let n = {
|
|
264
286
|
...e,
|
|
265
287
|
method: t?.method ?? "video-frame",
|
|
266
|
-
settings: t?.settings ??
|
|
288
|
+
settings: t?.settings ?? o.getSettings(),
|
|
267
289
|
fallbackReason: t?.fallbackReason,
|
|
268
290
|
luminance: t?.luminance,
|
|
269
291
|
diagnostics: t?.diagnostics,
|
|
@@ -272,73 +294,75 @@ function ue({ open: n, useCase: p = "document", autoCapture: m = "defaultOn", ca
|
|
|
272
294
|
displaySourceHeight: N.current.sourceHeight
|
|
273
295
|
};
|
|
274
296
|
if (I.current.useCase === "drivers-license") {
|
|
275
|
-
await
|
|
297
|
+
await L.current(n);
|
|
276
298
|
return;
|
|
277
299
|
}
|
|
278
|
-
await
|
|
300
|
+
await fe(I.current.onCapture, n);
|
|
279
301
|
}
|
|
280
302
|
});
|
|
281
303
|
} catch (t) {
|
|
282
304
|
if (e) return;
|
|
283
|
-
|
|
305
|
+
o();
|
|
284
306
|
let n = t instanceof Error ? t : /* @__PURE__ */ Error("Camera access failed.");
|
|
285
|
-
q(n.message),
|
|
307
|
+
q(n.message), V("error"), I.current.onError?.(n);
|
|
286
308
|
}
|
|
287
309
|
})(), () => {
|
|
288
|
-
e = !0,
|
|
310
|
+
e = !0, o();
|
|
289
311
|
};
|
|
290
312
|
}, [
|
|
291
|
-
n,
|
|
292
|
-
V,
|
|
293
|
-
k,
|
|
294
313
|
m,
|
|
295
|
-
|
|
314
|
+
B,
|
|
315
|
+
O,
|
|
316
|
+
g,
|
|
317
|
+
ie,
|
|
318
|
+
T,
|
|
296
319
|
E,
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
320
|
+
he,
|
|
321
|
+
je,
|
|
322
|
+
X,
|
|
300
323
|
Z,
|
|
301
324
|
Q
|
|
302
325
|
]);
|
|
303
|
-
let
|
|
304
|
-
open:
|
|
305
|
-
phase:
|
|
306
|
-
autoCapture:
|
|
307
|
-
captureMode:
|
|
308
|
-
usingSystemCamera:
|
|
309
|
-
finderStatus:
|
|
310
|
-
displayQuad:
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
326
|
+
let Je = {
|
|
327
|
+
open: m,
|
|
328
|
+
phase: Se,
|
|
329
|
+
autoCapture: g,
|
|
330
|
+
captureMode: v,
|
|
331
|
+
usingSystemCamera: O,
|
|
332
|
+
finderStatus: H,
|
|
333
|
+
displayQuad: Ce,
|
|
334
|
+
barcodeOverlay: we,
|
|
335
|
+
previewSize: Te,
|
|
336
|
+
settings: De,
|
|
337
|
+
captureMethod: ke,
|
|
338
|
+
error: Ae,
|
|
339
|
+
diagnostics: Ne,
|
|
340
|
+
shutterDiagnostics: Pe,
|
|
341
|
+
copyState: Fe,
|
|
342
|
+
guidanceHint: H ? ee(H.guidance, H.lighting) : void 0,
|
|
343
|
+
detectorStatus: h === "drivers-license" && Be === "back" && !O ? "zxing" : H?.modelStatus === "failed" ? `ML failed${H.modelError ? `: ${H.modelError}` : ""}` : H?.detector === "ml" ? `ML ${H.modelProvider ?? ""}`.trim() : "ML loading",
|
|
344
|
+
modelDownload: Ge,
|
|
345
|
+
frozenPreviewUrl: Le,
|
|
346
|
+
useCase: h,
|
|
347
|
+
licenseSide: h === "drivers-license" ? Be : void 0,
|
|
348
|
+
licenseBusy: h === "drivers-license" ? Ue : void 0
|
|
325
349
|
};
|
|
326
|
-
|
|
327
|
-
|
|
350
|
+
y(() => {
|
|
351
|
+
be.current = Je;
|
|
328
352
|
});
|
|
329
|
-
let
|
|
353
|
+
let Ye = _(() => {
|
|
330
354
|
I.current.onCancel();
|
|
331
|
-
}, []), $ =
|
|
332
|
-
if (!
|
|
333
|
-
|
|
355
|
+
}, []), $ = _(async () => {
|
|
356
|
+
if (!_e.current) {
|
|
357
|
+
_e.current = !0, F.current = !1, q(""), W(void 0), G(void 0), P.current.clear(), V("capturing");
|
|
334
358
|
try {
|
|
335
|
-
let t = await
|
|
336
|
-
|
|
359
|
+
let t = await o();
|
|
360
|
+
Z(t);
|
|
337
361
|
let n = {
|
|
338
362
|
width: t.width,
|
|
339
363
|
height: t.height
|
|
340
364
|
};
|
|
341
|
-
|
|
365
|
+
Oe(n), I.current.onSettings?.(n), K("system-camera");
|
|
342
366
|
let r;
|
|
343
367
|
try {
|
|
344
368
|
let n = t.getContext("2d", { willReadFrequently: !0 })?.getImageData(0, 0, t.width, t.height).data;
|
|
@@ -346,8 +370,10 @@ function ue({ open: n, useCase: p = "document", autoCapture: m = "defaultOn", ca
|
|
|
346
370
|
} catch {
|
|
347
371
|
r = void 0;
|
|
348
372
|
}
|
|
349
|
-
if (I.current.useCase === "drivers-license" &&
|
|
350
|
-
G(void 0), P.current.clear(), N.current = {},
|
|
373
|
+
if (I.current.useCase === "drivers-license" && He.current === "back") {
|
|
374
|
+
W(void 0), G(void 0), P.current.clear(), N.current = {}, V("captured");
|
|
375
|
+
let e = await f(t);
|
|
376
|
+
await Q(t, e?.quad), await L.current({
|
|
351
377
|
frame: t,
|
|
352
378
|
reason: "manual",
|
|
353
379
|
method: "system-camera",
|
|
@@ -356,20 +382,20 @@ function ue({ open: n, useCase: p = "document", autoCapture: m = "defaultOn", ca
|
|
|
356
382
|
});
|
|
357
383
|
return;
|
|
358
384
|
}
|
|
359
|
-
let i = await
|
|
360
|
-
modelUrl:
|
|
361
|
-
ortWasmPaths:
|
|
385
|
+
let i = await u(t, {
|
|
386
|
+
modelUrl: T,
|
|
387
|
+
ortWasmPaths: E
|
|
362
388
|
});
|
|
363
389
|
if (i.status !== "success" || !i.corners || !i.quad) {
|
|
364
|
-
F.current = !0,
|
|
390
|
+
F.current = !0, V("error"), q(i.message), I.current.onError?.(Error(i.message));
|
|
365
391
|
return;
|
|
366
392
|
}
|
|
367
393
|
N.current = {
|
|
368
394
|
quad: i.quad,
|
|
369
395
|
sourceWidth: i.sourceWidth,
|
|
370
396
|
sourceHeight: i.sourceHeight
|
|
371
|
-
}, i.quad &&
|
|
372
|
-
let
|
|
397
|
+
}, i.quad && W(i.quad), V("captured");
|
|
398
|
+
let a = {
|
|
373
399
|
frame: t,
|
|
374
400
|
detection: i,
|
|
375
401
|
reason: "manual",
|
|
@@ -381,74 +407,75 @@ function ue({ open: n, useCase: p = "document", autoCapture: m = "defaultOn", ca
|
|
|
381
407
|
displaySourceHeight: i.sourceHeight
|
|
382
408
|
};
|
|
383
409
|
if (I.current.useCase === "drivers-license") {
|
|
384
|
-
await
|
|
410
|
+
await L.current(a);
|
|
385
411
|
return;
|
|
386
412
|
}
|
|
387
|
-
await
|
|
413
|
+
await fe(I.current.onCapture, a);
|
|
388
414
|
} catch (e) {
|
|
389
415
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Could not take a photo.");
|
|
390
416
|
if (t.message === "No photo was selected.") {
|
|
391
|
-
if (
|
|
392
|
-
|
|
417
|
+
if (ze.current) {
|
|
418
|
+
V("error");
|
|
393
419
|
return;
|
|
394
420
|
}
|
|
395
421
|
I.current.onCancel();
|
|
396
422
|
return;
|
|
397
423
|
}
|
|
398
|
-
F.current = !0, q(t.message),
|
|
424
|
+
F.current = !0, q(t.message), V("error"), I.current.onError?.(t);
|
|
399
425
|
} finally {
|
|
400
|
-
|
|
426
|
+
_e.current = !1;
|
|
401
427
|
}
|
|
402
428
|
}
|
|
403
429
|
}, [
|
|
404
|
-
|
|
430
|
+
Z,
|
|
431
|
+
T,
|
|
405
432
|
E,
|
|
406
|
-
|
|
407
|
-
]),
|
|
408
|
-
let t = await
|
|
433
|
+
Q
|
|
434
|
+
]), Xe = _(async (e) => {
|
|
435
|
+
let t = await ye.current;
|
|
409
436
|
if (t) {
|
|
410
|
-
|
|
437
|
+
We(!0);
|
|
411
438
|
try {
|
|
412
439
|
let n = await t.submitStill(e.frame, e.detection);
|
|
413
440
|
if (n.kind === "need-back") {
|
|
414
|
-
if (
|
|
415
|
-
|
|
441
|
+
if (He.current = "back", R.current = !1, Ve("back"), F.current = !1, q(""), U(void 0), W(void 0), G(void 0), P.current.clear(), X(), O) {
|
|
442
|
+
V("ready");
|
|
416
443
|
return;
|
|
417
444
|
}
|
|
418
|
-
|
|
445
|
+
B?.paused && B.play(), V("starting"), Me((e) => e + 1);
|
|
419
446
|
return;
|
|
420
447
|
}
|
|
421
448
|
if (n.kind === "retry") {
|
|
422
|
-
F.current = !0, q(n.message),
|
|
449
|
+
F.current = !0, q(n.message), V("error");
|
|
423
450
|
return;
|
|
424
451
|
}
|
|
425
|
-
await
|
|
452
|
+
await fe(I.current.onDriverLicense, n.result);
|
|
426
453
|
} catch (e) {
|
|
427
454
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Driver’s license scan failed.");
|
|
428
|
-
F.current = !0, q(t.message),
|
|
455
|
+
F.current = !0, q(t.message), V("error"), I.current.onError?.(t);
|
|
429
456
|
} finally {
|
|
430
|
-
|
|
457
|
+
We(!1);
|
|
431
458
|
}
|
|
432
459
|
}
|
|
433
460
|
}, [
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
461
|
+
X,
|
|
462
|
+
B,
|
|
463
|
+
O
|
|
437
464
|
]);
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
}, [
|
|
441
|
-
let
|
|
442
|
-
if (
|
|
465
|
+
ne(() => {
|
|
466
|
+
L.current = Xe;
|
|
467
|
+
}, [Xe]);
|
|
468
|
+
let Ze = _(async () => {
|
|
469
|
+
if (O) {
|
|
443
470
|
await $();
|
|
444
471
|
return;
|
|
445
472
|
}
|
|
446
|
-
let e =
|
|
447
|
-
if (e && I.current.useCase === "drivers-license" &&
|
|
473
|
+
let e = k.current;
|
|
474
|
+
if (e && I.current.useCase === "drivers-license" && He.current === "back") {
|
|
448
475
|
try {
|
|
449
|
-
let t = await e.capturePhoto();
|
|
450
|
-
if (!
|
|
451
|
-
|
|
476
|
+
let t = await e.capturePhoto(), n = await f(t.frame);
|
|
477
|
+
if (!n?.text || R.current) return;
|
|
478
|
+
R.current = !0, z.current?.abort(), M.current = t, K(t.method), Y(t.diagnostics), J(t.diagnostics), Z(t.frame, B), V("captured"), await Q(t.frame, n.quad), await L.current({
|
|
452
479
|
frame: t.frame,
|
|
453
480
|
reason: "manual",
|
|
454
481
|
method: t.method,
|
|
@@ -460,68 +487,69 @@ function ue({ open: n, useCase: p = "document", autoCapture: m = "defaultOn", ca
|
|
|
460
487
|
} catch (e) {
|
|
461
488
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Could not capture the camera frame.");
|
|
462
489
|
F.current = !0, q(t.message);
|
|
463
|
-
let n =
|
|
464
|
-
n && J(n), M.current?.diagnostics && Y(M.current.diagnostics),
|
|
490
|
+
let n = k.current?.getDiagnostics();
|
|
491
|
+
n && J(n), M.current?.diagnostics && Y(M.current.diagnostics), V("error"), I.current.onError?.(t);
|
|
465
492
|
}
|
|
466
493
|
return;
|
|
467
494
|
}
|
|
468
495
|
try {
|
|
469
|
-
await
|
|
496
|
+
await A.current?.capture();
|
|
470
497
|
} catch (e) {
|
|
471
498
|
let t = e instanceof Error ? e : /* @__PURE__ */ Error("Could not capture the camera frame.");
|
|
472
499
|
F.current = !0, q(t.message);
|
|
473
|
-
let n =
|
|
474
|
-
n && J(n), M.current?.diagnostics && Y(M.current.diagnostics),
|
|
500
|
+
let n = k.current?.getDiagnostics();
|
|
501
|
+
n && J(n), M.current?.diagnostics && Y(M.current.diagnostics), V("error"), I.current.onError?.(t);
|
|
475
502
|
}
|
|
476
503
|
}, [
|
|
477
504
|
$,
|
|
505
|
+
Z,
|
|
506
|
+
B,
|
|
478
507
|
Q,
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
qe.current = !1;
|
|
508
|
+
O
|
|
509
|
+
]), Qe = b($);
|
|
510
|
+
Qe.current = $;
|
|
511
|
+
let $e = b(!1);
|
|
512
|
+
ne(() => {
|
|
513
|
+
if (!m || !O) {
|
|
514
|
+
$e.current = !1;
|
|
487
515
|
return;
|
|
488
516
|
}
|
|
489
|
-
if (
|
|
490
|
-
if (
|
|
491
|
-
|
|
517
|
+
if (!$e.current) {
|
|
518
|
+
if ($e.current = !0, F.current = !1, q(""), U(void 0), K(void 0), Y(void 0), Ie("idle"), W(void 0), G(void 0), P.current.clear(), X(), !te()) {
|
|
519
|
+
V("ready");
|
|
492
520
|
return;
|
|
493
521
|
}
|
|
494
|
-
|
|
522
|
+
Qe.current();
|
|
495
523
|
}
|
|
496
524
|
}, [
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
525
|
+
m,
|
|
526
|
+
O,
|
|
527
|
+
X
|
|
500
528
|
]);
|
|
501
|
-
let
|
|
502
|
-
if (F.current = !1,
|
|
529
|
+
let et = _(() => {
|
|
530
|
+
if (F.current = !1, R.current = !1, q(""), Y(void 0), Ie("idle"), U(void 0), W(void 0), G(void 0), P.current.clear(), O) {
|
|
503
531
|
$();
|
|
504
532
|
return;
|
|
505
533
|
}
|
|
506
|
-
if (
|
|
507
|
-
|
|
534
|
+
if (X(), h === "drivers-license") {
|
|
535
|
+
V("starting"), Me((e) => e + 1);
|
|
508
536
|
return;
|
|
509
537
|
}
|
|
510
|
-
let e =
|
|
511
|
-
|
|
538
|
+
let e = k.current;
|
|
539
|
+
B?.paused && B.play(), V(e ? "ready" : "starting"), e || Me((e) => e + 1);
|
|
512
540
|
}, [
|
|
513
541
|
$,
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
]),
|
|
519
|
-
let t =
|
|
542
|
+
X,
|
|
543
|
+
B,
|
|
544
|
+
h,
|
|
545
|
+
O
|
|
546
|
+
]), tt = _(async (e) => {
|
|
547
|
+
let t = k.current;
|
|
520
548
|
t && (await t.setTorch(e), J(t.getDiagnostics()));
|
|
521
|
-
}, []),
|
|
522
|
-
|
|
523
|
-
}, []),
|
|
524
|
-
let e =
|
|
549
|
+
}, []), nt = _((e) => {
|
|
550
|
+
A.current?.setAutoCapture(e);
|
|
551
|
+
}, []), rt = _(async () => {
|
|
552
|
+
let e = be.current, t = k.current?.getDiagnostics() ?? e.diagnostics, n = e.finderStatus, r = i({
|
|
525
553
|
error: e.error || void 0,
|
|
526
554
|
captureMethod: e.captureMethod,
|
|
527
555
|
luminance: M.current?.luminance,
|
|
@@ -544,62 +572,62 @@ function ue({ open: n, useCase: p = "document", autoCapture: m = "defaultOn", ca
|
|
|
544
572
|
} : void 0
|
|
545
573
|
});
|
|
546
574
|
try {
|
|
547
|
-
if (navigator.clipboard?.writeText) await navigator.clipboard.writeText(
|
|
575
|
+
if (navigator.clipboard?.writeText) await navigator.clipboard.writeText(r);
|
|
548
576
|
else {
|
|
549
577
|
let e = document.createElement("textarea");
|
|
550
|
-
e.value =
|
|
578
|
+
e.value = r, e.setAttribute("readonly", ""), e.style.position = "fixed", e.style.left = "-9999px", document.body.append(e), e.select();
|
|
551
579
|
let t = document.execCommand("copy");
|
|
552
580
|
if (e.remove(), !t) throw Error("Clipboard copy is unavailable.");
|
|
553
581
|
}
|
|
554
|
-
|
|
582
|
+
Ie("copied");
|
|
555
583
|
} catch {
|
|
556
|
-
|
|
584
|
+
Ie("failed");
|
|
557
585
|
}
|
|
558
|
-
}, []),
|
|
559
|
-
capture:
|
|
560
|
-
cancel:
|
|
561
|
-
retry:
|
|
562
|
-
setTorch:
|
|
563
|
-
setAutoCapture:
|
|
564
|
-
copyReport:
|
|
565
|
-
getState:
|
|
586
|
+
}, []), it = _(() => be.current, []), at = re(() => ({
|
|
587
|
+
capture: Ze,
|
|
588
|
+
cancel: Ye,
|
|
589
|
+
retry: et,
|
|
590
|
+
setTorch: tt,
|
|
591
|
+
setAutoCapture: nt,
|
|
592
|
+
copyReport: rt,
|
|
593
|
+
getState: it
|
|
566
594
|
}), [
|
|
567
|
-
Ge,
|
|
568
|
-
Ue,
|
|
569
|
-
Je,
|
|
570
|
-
Ye,
|
|
571
|
-
Xe,
|
|
572
595
|
Ze,
|
|
573
|
-
|
|
596
|
+
Ye,
|
|
597
|
+
et,
|
|
598
|
+
tt,
|
|
599
|
+
nt,
|
|
600
|
+
rt,
|
|
601
|
+
it
|
|
574
602
|
]);
|
|
575
|
-
|
|
576
|
-
if (
|
|
577
|
-
|
|
603
|
+
y(() => {
|
|
604
|
+
if (D) return D.current = at, () => {
|
|
605
|
+
D.current = null;
|
|
578
606
|
};
|
|
579
|
-
}, [
|
|
580
|
-
let
|
|
581
|
-
...
|
|
582
|
-
|
|
583
|
-
bindPreview:
|
|
607
|
+
}, [at, D]);
|
|
608
|
+
let ot = {
|
|
609
|
+
...Je,
|
|
610
|
+
...at,
|
|
611
|
+
bindPreview: qe
|
|
584
612
|
};
|
|
585
|
-
return /* @__PURE__ */
|
|
586
|
-
value:
|
|
587
|
-
children:
|
|
613
|
+
return /* @__PURE__ */ S(ce.Provider, {
|
|
614
|
+
value: ot,
|
|
615
|
+
children: ge
|
|
588
616
|
});
|
|
589
617
|
}
|
|
590
618
|
//#endregion
|
|
591
619
|
//#region src/react/hooks.ts
|
|
592
|
-
function
|
|
593
|
-
return
|
|
620
|
+
function me() {
|
|
621
|
+
return b(null);
|
|
594
622
|
}
|
|
595
|
-
function
|
|
596
|
-
let e =
|
|
623
|
+
function T() {
|
|
624
|
+
let e = v(ce);
|
|
597
625
|
if (!e) throw Error("useScanner must be used within ScannerProvider.");
|
|
598
626
|
return e;
|
|
599
627
|
}
|
|
600
628
|
//#endregion
|
|
601
629
|
//#region src/live-overlay-geometry.ts
|
|
602
|
-
function
|
|
630
|
+
function E(e, t, n, r, i) {
|
|
603
631
|
let a = Math.max(1, e), o = Math.max(1, t), s = Math.max(1, n), c = Math.max(1, r), l = s / a, u = c / o, d = i === "cover" ? Math.max(l, u) : Math.min(l, u), f = (s - a * d) / 2, p = (c - o * d) / 2;
|
|
604
632
|
if (i === "contain") return {
|
|
605
633
|
viewBox: `0 0 ${a} ${o}`,
|
|
@@ -608,9 +636,9 @@ function de(e, t, n, r, i) {
|
|
|
608
636
|
offsetX: f,
|
|
609
637
|
offsetY: p
|
|
610
638
|
};
|
|
611
|
-
let
|
|
639
|
+
let m = s / d, ee = c / d;
|
|
612
640
|
return {
|
|
613
|
-
viewBox: `${-f / d} ${-p / d} ${
|
|
641
|
+
viewBox: `${-f / d} ${-p / d} ${m} ${ee}`,
|
|
614
642
|
preserveAspectRatio: "none",
|
|
615
643
|
scale: d,
|
|
616
644
|
offsetX: f,
|
|
@@ -619,10 +647,10 @@ function de(e, t, n, r, i) {
|
|
|
619
647
|
}
|
|
620
648
|
//#endregion
|
|
621
649
|
//#region src/components/ModelDownloadRing.tsx
|
|
622
|
-
function
|
|
650
|
+
function he({ snapshot: e }) {
|
|
623
651
|
if (!e.downloading) return null;
|
|
624
652
|
let t = e.total && e.total > 0 ? Math.min(1, e.loaded / e.total) : null, n = t === null ? null : Math.round(t * 100), r = 2 * Math.PI * 28;
|
|
625
|
-
return /* @__PURE__ */
|
|
653
|
+
return /* @__PURE__ */ C("div", {
|
|
626
654
|
className: `model-download-ring${t === null ? " is-indeterminate" : ""}`,
|
|
627
655
|
role: "progressbar",
|
|
628
656
|
"aria-label": "Model download",
|
|
@@ -631,15 +659,15 @@ function O({ snapshot: e }) {
|
|
|
631
659
|
"aria-valuenow": n ?? void 0,
|
|
632
660
|
"data-loaded": e.loaded,
|
|
633
661
|
"data-total": e.total ?? "",
|
|
634
|
-
children: [/* @__PURE__ */
|
|
662
|
+
children: [/* @__PURE__ */ C("svg", {
|
|
635
663
|
viewBox: "0 0 72 72",
|
|
636
664
|
"aria-hidden": "true",
|
|
637
|
-
children: [/* @__PURE__ */
|
|
665
|
+
children: [/* @__PURE__ */ S("circle", {
|
|
638
666
|
className: "track",
|
|
639
667
|
cx: "36",
|
|
640
668
|
cy: "36",
|
|
641
669
|
r: 28
|
|
642
|
-
}), /* @__PURE__ */
|
|
670
|
+
}), /* @__PURE__ */ S("circle", {
|
|
643
671
|
className: "value",
|
|
644
672
|
cx: "36",
|
|
645
673
|
cy: "36",
|
|
@@ -647,20 +675,20 @@ function O({ snapshot: e }) {
|
|
|
647
675
|
strokeDasharray: t === null ? void 0 : `${r} ${r}`,
|
|
648
676
|
strokeDashoffset: t === null ? void 0 : r * (1 - t)
|
|
649
677
|
})]
|
|
650
|
-
}), n === null ? /* @__PURE__ */
|
|
678
|
+
}), n === null ? /* @__PURE__ */ S("strong", {
|
|
651
679
|
className: "model-download-ring__pending",
|
|
652
680
|
children: "…"
|
|
653
|
-
}) : /* @__PURE__ */
|
|
681
|
+
}) : /* @__PURE__ */ C("strong", { children: [n, "%"] })]
|
|
654
682
|
});
|
|
655
683
|
}
|
|
656
684
|
//#endregion
|
|
657
685
|
//#region src/react/guidance.ts
|
|
658
|
-
function
|
|
659
|
-
if (!(e.usingSystemCamera || e.licenseBusy) && e.phase !== "error") return e.phase === "starting" ? e.licenseHeadline : e.phase === "capturing" ? "Capturing full resolution…" : e.phase === "captured" ? "Document captured" : e.holdStillSeconds && e.holdStillSeconds > 0 ?
|
|
686
|
+
function D(e) {
|
|
687
|
+
if (!(e.usingSystemCamera || e.licenseBusy) && e.phase !== "error") return e.phase === "starting" ? e.licenseHeadline : e.phase === "capturing" ? "Capturing full resolution…" : e.phase === "captured" ? "Document captured" : e.holdStillSeconds && e.holdStillSeconds > 0 ? h(e.holdStillSeconds) : e.guidanceHint && e.guidanceReason && e.guidanceReason !== "place-document" ? e.guidanceHint : e.licenseHeadline ?? e.guidanceHint ?? "Place the document in the frame";
|
|
660
688
|
}
|
|
661
689
|
//#endregion
|
|
662
690
|
//#region src/react/parts.tsx
|
|
663
|
-
var
|
|
691
|
+
var ge = {
|
|
664
692
|
primaryColorHex: "--scanner-overlay-primary",
|
|
665
693
|
seekingColorHex: "--scanner-overlay-seeking",
|
|
666
694
|
detectingColorHex: "--scanner-overlay-detecting",
|
|
@@ -668,46 +696,46 @@ var k = {
|
|
|
668
696
|
readyColorHex: "--scanner-overlay-ready",
|
|
669
697
|
capturedColorHex: "--scanner-overlay-captured"
|
|
670
698
|
};
|
|
671
|
-
function
|
|
699
|
+
function O(e) {
|
|
672
700
|
if (!e) return;
|
|
673
701
|
let t = {};
|
|
674
|
-
for (let [n, r] of Object.entries(
|
|
702
|
+
for (let [n, r] of Object.entries(ge)) {
|
|
675
703
|
let i = e[n]?.trim();
|
|
676
704
|
i && (t[r] = i);
|
|
677
705
|
}
|
|
678
706
|
return Object.keys(t).length > 0 ? t : void 0;
|
|
679
707
|
}
|
|
680
|
-
function
|
|
681
|
-
let i =
|
|
708
|
+
function k({ theme: e, style: t, title: n, children: r }) {
|
|
709
|
+
let i = T();
|
|
682
710
|
if (!i.open) return null;
|
|
683
|
-
let a = n ?? (i.useCase === "drivers-license" ? "Scan a driver’s license" : "Scan a document"), o =
|
|
711
|
+
let a = n ?? (i.useCase === "drivers-license" ? "Scan a driver’s license" : "Scan a document"), o = O(e), s = o ? {
|
|
684
712
|
...t,
|
|
685
713
|
...o
|
|
686
714
|
} : t;
|
|
687
|
-
return /* @__PURE__ */
|
|
715
|
+
return /* @__PURE__ */ C("div", {
|
|
688
716
|
className: `scanner-camera-overlay ${i.phase === "captured" || i.finderStatus?.state === "captured" ? "is-captured" : ""} ${i.usingSystemCamera ? "is-system-camera" : ""}`.trim(),
|
|
689
717
|
style: s,
|
|
690
718
|
role: "dialog",
|
|
691
719
|
"aria-modal": "true",
|
|
692
720
|
"aria-label": a,
|
|
693
|
-
children: [r, /* @__PURE__ */
|
|
721
|
+
children: [r, /* @__PURE__ */ S(I, {})]
|
|
694
722
|
});
|
|
695
723
|
}
|
|
696
|
-
function
|
|
697
|
-
let { bindPreview: e, frozenPreviewUrl: t, usingSystemCamera: n } =
|
|
724
|
+
function A() {
|
|
725
|
+
let { bindPreview: e, frozenPreviewUrl: t, usingSystemCamera: n } = T(), r = b(null), i = _((t) => {
|
|
698
726
|
r.current = t, e(t);
|
|
699
727
|
}, [e]);
|
|
700
|
-
return
|
|
728
|
+
return y(() => {
|
|
701
729
|
t && r.current?.pause();
|
|
702
|
-
}, [t]), n ? t ? /* @__PURE__ */
|
|
730
|
+
}, [t]), n ? t ? /* @__PURE__ */ S("img", {
|
|
703
731
|
src: t,
|
|
704
732
|
className: "scanner-camera-overlay__video scanner-camera-overlay__still",
|
|
705
733
|
alt: "",
|
|
706
734
|
"aria-label": "Captured document"
|
|
707
|
-
}) : /* @__PURE__ */
|
|
735
|
+
}) : /* @__PURE__ */ S("div", {
|
|
708
736
|
className: "scanner-camera-overlay__video",
|
|
709
737
|
"aria-hidden": "true"
|
|
710
|
-
}) : /* @__PURE__ */
|
|
738
|
+
}) : /* @__PURE__ */ C(ie, { children: [/* @__PURE__ */ S("video", {
|
|
711
739
|
ref: i,
|
|
712
740
|
className: "scanner-camera-overlay__video",
|
|
713
741
|
muted: !0,
|
|
@@ -716,35 +744,35 @@ function pe() {
|
|
|
716
744
|
style: { objectFit: "cover" },
|
|
717
745
|
"aria-hidden": !!t,
|
|
718
746
|
"aria-label": "Rear camera preview"
|
|
719
|
-
}), t ? /* @__PURE__ */
|
|
747
|
+
}), t ? /* @__PURE__ */ S("img", {
|
|
720
748
|
src: t,
|
|
721
749
|
className: "scanner-camera-overlay__video scanner-camera-overlay__still",
|
|
722
750
|
alt: "",
|
|
723
751
|
"aria-label": "Captured document"
|
|
724
752
|
}) : null] });
|
|
725
753
|
}
|
|
726
|
-
function
|
|
727
|
-
let { finderStatus: e, displayQuad: t, previewSize: n } =
|
|
728
|
-
if (!t || !
|
|
729
|
-
let
|
|
730
|
-
return /* @__PURE__ */
|
|
731
|
-
className: `scanner-camera-overlay__quad ${
|
|
732
|
-
viewBox:
|
|
733
|
-
preserveAspectRatio:
|
|
734
|
-
"aria-label": `${e
|
|
735
|
-
children: /* @__PURE__ */
|
|
754
|
+
function j() {
|
|
755
|
+
let { finderStatus: e, displayQuad: t, previewSize: n, barcodeOverlay: r } = T(), i = e?.sourceWidth ?? r?.width, a = e?.sourceHeight ?? r?.height;
|
|
756
|
+
if (!t || !i || !a) return null;
|
|
757
|
+
let o = E(i, a, n.width, n.height, "cover"), s = r ? "ready" : e?.state;
|
|
758
|
+
return /* @__PURE__ */ S("svg", {
|
|
759
|
+
className: `scanner-camera-overlay__quad ${s ?? ""}`.trim(),
|
|
760
|
+
viewBox: o.viewBox,
|
|
761
|
+
preserveAspectRatio: o.preserveAspectRatio,
|
|
762
|
+
"aria-label": r ? "PDF417 barcode boundary" : `${e?.state ?? "document"} document boundary`,
|
|
763
|
+
children: /* @__PURE__ */ S("polygon", { points: `${t.topLeft.x},${t.topLeft.y} ${t.topRight.x},${t.topRight.y} ${t.bottomRight.x},${t.bottomRight.y} ${t.bottomLeft.x},${t.bottomLeft.y}` })
|
|
736
764
|
});
|
|
737
765
|
}
|
|
738
|
-
function
|
|
739
|
-
let { phase: t, cancel: n, usingSystemCamera: r, useCase: i, licenseSide: a, licenseBusy: o } =
|
|
740
|
-
return /* @__PURE__ */
|
|
766
|
+
function M({ title: e }) {
|
|
767
|
+
let { phase: t, cancel: n, usingSystemCamera: r, useCase: i, licenseSide: a, licenseBusy: o } = T(), s = i === "drivers-license" ? m(a ?? "front", r) : void 0, c = e ?? s?.title ?? "Scan a document";
|
|
768
|
+
return /* @__PURE__ */ C("div", {
|
|
741
769
|
className: "scanner-camera-overlay__topbar",
|
|
742
|
-
children: [/* @__PURE__ */
|
|
770
|
+
children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("strong", { children: c }), /* @__PURE__ */ C("span", {
|
|
743
771
|
"aria-live": "polite",
|
|
744
772
|
children: [
|
|
745
773
|
o && (a === "back" ? "Reading the barcode…" : "Reading the front…"),
|
|
746
774
|
!o && s && t === "error" && (a === "back" ? "Could not read the back" : "Could not read the front"),
|
|
747
|
-
!o && !s && r && /* @__PURE__ */
|
|
775
|
+
!o && !s && r && /* @__PURE__ */ C(ie, { children: [
|
|
748
776
|
t === "starting" && "Preparing the system camera…",
|
|
749
777
|
t === "ready" && "Take a photo. There is no live document guide.",
|
|
750
778
|
t === "capturing" && "Looking for a document…",
|
|
@@ -753,7 +781,7 @@ function N({ title: e }) {
|
|
|
753
781
|
] }),
|
|
754
782
|
!o && !s && !r && t === "error" && "Camera unavailable"
|
|
755
783
|
]
|
|
756
|
-
})] }), /* @__PURE__ */
|
|
784
|
+
})] }), /* @__PURE__ */ S("button", {
|
|
757
785
|
type: "button",
|
|
758
786
|
onClick: n,
|
|
759
787
|
"aria-label": "Close camera",
|
|
@@ -761,71 +789,71 @@ function N({ title: e }) {
|
|
|
761
789
|
})]
|
|
762
790
|
});
|
|
763
791
|
}
|
|
764
|
-
function
|
|
765
|
-
let { phase: e, error: t, diagnostics: n, copyState: r, retry: i, copyReport: a, cancel: o, usingSystemCamera: s, frozenPreviewUrl: c, useCase: l, licenseSide: u, licenseBusy: d } =
|
|
766
|
-
return e === "error" ? /* @__PURE__ */
|
|
792
|
+
function N() {
|
|
793
|
+
let { phase: e, error: t, diagnostics: n, copyState: r, retry: i, copyReport: a, cancel: o, usingSystemCamera: s, frozenPreviewUrl: c, useCase: l, licenseSide: u, licenseBusy: d } = T(), f = l === "drivers-license" ? m(u ?? "front", s) : void 0;
|
|
794
|
+
return e === "error" ? /* @__PURE__ */ C("div", {
|
|
767
795
|
className: "scanner-camera-overlay__message",
|
|
768
796
|
role: "alert",
|
|
769
797
|
children: [
|
|
770
|
-
/* @__PURE__ */
|
|
771
|
-
/* @__PURE__ */
|
|
772
|
-
/* @__PURE__ */
|
|
773
|
-
/* @__PURE__ */
|
|
798
|
+
/* @__PURE__ */ S("strong", { children: f ? u === "back" ? "Could not read the back" : "Could not read the front" : s ? c ? "No document found" : "Could not take a photo" : n ? "Capture failed" : "Could not open the camera" }),
|
|
799
|
+
/* @__PURE__ */ S("p", { children: t }),
|
|
800
|
+
/* @__PURE__ */ C("div", { children: [
|
|
801
|
+
/* @__PURE__ */ S("button", {
|
|
774
802
|
type: "button",
|
|
775
803
|
onClick: i,
|
|
776
804
|
children: "Try again"
|
|
777
805
|
}),
|
|
778
|
-
/* @__PURE__ */
|
|
806
|
+
/* @__PURE__ */ S("button", {
|
|
779
807
|
type: "button",
|
|
780
808
|
onClick: () => void a(),
|
|
781
809
|
children: r === "copied" ? "Copied" : r === "failed" ? "Copy failed" : "Copy report"
|
|
782
810
|
}),
|
|
783
|
-
/* @__PURE__ */
|
|
811
|
+
/* @__PURE__ */ S("button", {
|
|
784
812
|
type: "button",
|
|
785
813
|
onClick: o,
|
|
786
814
|
children: "Cancel"
|
|
787
815
|
})
|
|
788
816
|
] })
|
|
789
817
|
]
|
|
790
|
-
}) : d ? /* @__PURE__ */
|
|
818
|
+
}) : d ? /* @__PURE__ */ C("div", {
|
|
791
819
|
className: "scanner-camera-overlay__message",
|
|
792
820
|
"aria-live": "polite",
|
|
793
821
|
children: [
|
|
794
|
-
/* @__PURE__ */
|
|
795
|
-
/* @__PURE__ */
|
|
796
|
-
/* @__PURE__ */
|
|
822
|
+
/* @__PURE__ */ S("span", { className: "scanner-camera-overlay__spinner" }),
|
|
823
|
+
/* @__PURE__ */ S("strong", { children: u === "back" ? "Reading the barcode" : "Reading the front" }),
|
|
824
|
+
/* @__PURE__ */ S("p", { children: u === "back" ? "Decoding the AAMVA PDF417 on the back." : "Finding the card and reading the front with OCR." })
|
|
797
825
|
]
|
|
798
|
-
}) : s && e === "capturing" && !c ? /* @__PURE__ */
|
|
826
|
+
}) : s && e === "capturing" && !c ? /* @__PURE__ */ C("div", {
|
|
799
827
|
className: "scanner-camera-overlay__message",
|
|
800
828
|
"aria-live": "polite",
|
|
801
829
|
children: [
|
|
802
|
-
/* @__PURE__ */
|
|
803
|
-
/* @__PURE__ */
|
|
804
|
-
/* @__PURE__ */
|
|
830
|
+
/* @__PURE__ */ S("span", { className: "scanner-camera-overlay__spinner" }),
|
|
831
|
+
/* @__PURE__ */ S("strong", { children: f ? f.headline : "Opening the system camera" }),
|
|
832
|
+
/* @__PURE__ */ S("p", { children: f ? f.detail : "There is no live document guide. We find the page after you take the photo." })
|
|
805
833
|
]
|
|
806
|
-
}) : s && e === "ready" && !c ? /* @__PURE__ */
|
|
834
|
+
}) : s && e === "ready" && !c ? /* @__PURE__ */ C("div", {
|
|
807
835
|
className: "scanner-camera-overlay__message",
|
|
808
836
|
"aria-live": "polite",
|
|
809
|
-
children: [/* @__PURE__ */
|
|
810
|
-
}) : e === "starting" && !s ? /* @__PURE__ */
|
|
837
|
+
children: [/* @__PURE__ */ S("strong", { children: f ? f.headline : "System camera" }), /* @__PURE__ */ S("p", { children: f ? f.detail : "Tap the shutter to open the Camera app. There is no live document guide." })]
|
|
838
|
+
}) : e === "starting" && !s ? /* @__PURE__ */ C("div", {
|
|
811
839
|
className: "scanner-camera-overlay__message",
|
|
812
840
|
"aria-live": "polite",
|
|
813
841
|
children: [
|
|
814
|
-
/* @__PURE__ */
|
|
815
|
-
/* @__PURE__ */
|
|
816
|
-
/* @__PURE__ */
|
|
842
|
+
/* @__PURE__ */ S("span", { className: "scanner-camera-overlay__spinner" }),
|
|
843
|
+
/* @__PURE__ */ S("strong", { children: "Requesting the highest practical resolution" }),
|
|
844
|
+
/* @__PURE__ */ S("p", { children: "Allow camera access to continue." })
|
|
817
845
|
]
|
|
818
846
|
}) : null;
|
|
819
847
|
}
|
|
820
|
-
function
|
|
821
|
-
let { finderStatus: e, detectorStatus: t, settings: n, usingSystemCamera: r, captureMethod: i, phase: a, useCase: o, licenseSide: s } =
|
|
822
|
-
if (r) return /* @__PURE__ */
|
|
848
|
+
function P() {
|
|
849
|
+
let { finderStatus: e, detectorStatus: t, settings: n, usingSystemCamera: r, captureMethod: i, phase: a, useCase: o, licenseSide: s } = T(), c = n?.width, l = n?.height, u = o === "drivers-license" ? ` · ${s === "back" ? "back" : "front"}` : "";
|
|
850
|
+
if (r) return /* @__PURE__ */ S("div", {
|
|
823
851
|
className: "scanner-camera-overlay__status",
|
|
824
852
|
"aria-live": "polite",
|
|
825
|
-
children: /* @__PURE__ */
|
|
853
|
+
children: /* @__PURE__ */ C("div", {
|
|
826
854
|
className: "scanner-camera-overlay__status-line",
|
|
827
855
|
children: [
|
|
828
|
-
/* @__PURE__ */
|
|
856
|
+
/* @__PURE__ */ S("span", { className: a === "captured" ? "ready" : a === "error" ? "seeking" : "detecting" }),
|
|
829
857
|
i === "system-camera" ? "system camera" : "system camera · waiting",
|
|
830
858
|
u,
|
|
831
859
|
c && l ? ` · ${c}×${l}` : ""
|
|
@@ -833,13 +861,13 @@ function F() {
|
|
|
833
861
|
})
|
|
834
862
|
});
|
|
835
863
|
let d = o === "drivers-license" && s === "back", f = d && !e ? "reading" : e?.state ?? "detecting";
|
|
836
|
-
return /* @__PURE__ */
|
|
864
|
+
return /* @__PURE__ */ S("div", {
|
|
837
865
|
className: "scanner-camera-overlay__status",
|
|
838
866
|
"aria-live": "polite",
|
|
839
|
-
children: /* @__PURE__ */
|
|
867
|
+
children: /* @__PURE__ */ C("div", {
|
|
840
868
|
className: "scanner-camera-overlay__status-line",
|
|
841
869
|
children: [
|
|
842
|
-
/* @__PURE__ */
|
|
870
|
+
/* @__PURE__ */ S("span", { className: d && !e ? "detecting" : e?.state ?? "detecting" }),
|
|
843
871
|
f,
|
|
844
872
|
u,
|
|
845
873
|
e ? ` · ${Math.round(e.confidence * 100)}% · ${e.stableFrames}/${e.requiredStableFrames}` : "",
|
|
@@ -850,25 +878,25 @@ function F() {
|
|
|
850
878
|
})
|
|
851
879
|
});
|
|
852
880
|
}
|
|
853
|
-
function
|
|
854
|
-
let { diagnostics: e, shutterDiagnostics: t, captureMethod:
|
|
855
|
-
return /* @__PURE__ */
|
|
881
|
+
function F() {
|
|
882
|
+
let { diagnostics: e, shutterDiagnostics: t, captureMethod: n, copyState: i, copyReport: a } = T(), o = e?.engine ?? r();
|
|
883
|
+
return /* @__PURE__ */ C("dl", {
|
|
856
884
|
className: "scanner-camera-overlay__diagnostics",
|
|
857
885
|
"aria-label": "Camera diagnostics",
|
|
858
886
|
children: [
|
|
859
|
-
/* @__PURE__ */
|
|
887
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", { children: "engine" }), /* @__PURE__ */ C("dd", { children: [
|
|
860
888
|
o.engine,
|
|
861
889
|
"/",
|
|
862
890
|
o.browser,
|
|
863
891
|
o.iosWebKit ? " ios" : ""
|
|
864
892
|
] })] }),
|
|
865
|
-
/* @__PURE__ */
|
|
866
|
-
/* @__PURE__ */
|
|
867
|
-
/* @__PURE__ */
|
|
868
|
-
/* @__PURE__ */
|
|
869
|
-
/* @__PURE__ */
|
|
870
|
-
t ? /* @__PURE__ */
|
|
871
|
-
/* @__PURE__ */
|
|
893
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", { children: "video" }), /* @__PURE__ */ S("dd", { children: e ? `${e.videoWidth}×${e.videoHeight} rs${e.readyState}${e.paused ? " paused" : ""}${e.rendered ? "" : " hidden"}` : "starting" })] }),
|
|
894
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", { children: "track" }), /* @__PURE__ */ S("dd", { children: e ? `${e.trackReadyState}${e.trackMuted ? " muted" : ""}${e.trackEnabled ? "" : " disabled"}` : "—" })] }),
|
|
895
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", { children: "torch" }), /* @__PURE__ */ S("dd", { children: e ? `${e.torch.mode} · ${e.torch.supported ? e.torch.on ? "on" : "off" : "unsupported"}` : "starting" })] }),
|
|
896
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", { children: "luma" }), /* @__PURE__ */ S("dd", { children: e ? `live ${e.liveLuminance.toFixed(1)} · mirror ${e.mirrorLuminance.toFixed(1)}${Number.isFinite(e.mirrorAgeMs) ? ` (${Math.round(e.mirrorAgeMs)}ms)` : " (none)"}` : "—" })] }),
|
|
897
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", { children: "path" }), /* @__PURE__ */ S("dd", { children: n ?? "video-frame / live-mirror" })] }),
|
|
898
|
+
t ? /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", { children: "shutter" }), /* @__PURE__ */ S("dd", { children: `live ${t.liveLuminance.toFixed(1)} · mirror ${t.mirrorLuminance.toFixed(1)}${Number.isFinite(t.mirrorAgeMs) ? ` (${Math.round(t.mirrorAgeMs)}ms)` : " (none)"}` })] }) : null,
|
|
899
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", { children: "share" }), /* @__PURE__ */ S("dd", { children: /* @__PURE__ */ S("button", {
|
|
872
900
|
type: "button",
|
|
873
901
|
className: "scanner-camera-overlay__copy",
|
|
874
902
|
onClick: () => void a(),
|
|
@@ -877,50 +905,50 @@ function me() {
|
|
|
877
905
|
]
|
|
878
906
|
});
|
|
879
907
|
}
|
|
880
|
-
function
|
|
881
|
-
let { autoCapture: e, phase: t, finderStatus: n, diagnostics: r, captureMethod: i, settings: a, cancel: o, capture: s, setAutoCapture: c, setTorch: l, usingSystemCamera: u, licenseBusy: d, useCase: f, licenseSide:
|
|
908
|
+
function _e() {
|
|
909
|
+
let { autoCapture: e, phase: t, finderStatus: n, diagnostics: r, captureMethod: i, settings: a, cancel: o, capture: s, setAutoCapture: c, setTorch: l, usingSystemCamera: u, licenseBusy: d, useCase: f, licenseSide: p, guidanceHint: ee } = T(), h = a?.width, te = a?.height, g = u ? t === "ready" : e !== "only", _ = f === "drivers-license" ? m(p ?? "front", u) : void 0, v = D({
|
|
882
910
|
usingSystemCamera: u,
|
|
883
911
|
phase: t,
|
|
884
912
|
licenseBusy: d,
|
|
885
913
|
holdStillSeconds: n?.holdStillSeconds,
|
|
886
|
-
guidanceHint:
|
|
914
|
+
guidanceHint: ee,
|
|
887
915
|
guidanceReason: n?.guidance.reason,
|
|
888
|
-
licenseHeadline:
|
|
889
|
-
}),
|
|
890
|
-
return /* @__PURE__ */
|
|
916
|
+
licenseHeadline: _?.headline
|
|
917
|
+
}), y = !!n?.holdStillSeconds;
|
|
918
|
+
return /* @__PURE__ */ C("div", {
|
|
891
919
|
className: "scanner-camera-overlay__controls",
|
|
892
920
|
children: [
|
|
893
|
-
/* @__PURE__ */
|
|
921
|
+
/* @__PURE__ */ S("button", {
|
|
894
922
|
type: "button",
|
|
895
923
|
className: "scanner-camera-overlay__cancel",
|
|
896
924
|
onClick: o,
|
|
897
925
|
children: "Cancel"
|
|
898
926
|
}),
|
|
899
|
-
/* @__PURE__ */
|
|
927
|
+
/* @__PURE__ */ C("div", {
|
|
900
928
|
className: "scanner-camera-overlay__capture",
|
|
901
929
|
children: [
|
|
902
|
-
|
|
903
|
-
className: `scanner-camera-overlay__guidance${
|
|
930
|
+
v && /* @__PURE__ */ S("p", {
|
|
931
|
+
className: `scanner-camera-overlay__guidance${y ? " is-ready" : ""}`,
|
|
904
932
|
"aria-live": "polite",
|
|
905
|
-
children:
|
|
933
|
+
children: v
|
|
906
934
|
}),
|
|
907
|
-
g && /* @__PURE__ */
|
|
935
|
+
g && /* @__PURE__ */ S("button", {
|
|
908
936
|
type: "button",
|
|
909
937
|
className: "scanner-camera-overlay__shutter",
|
|
910
938
|
onClick: () => void s(),
|
|
911
939
|
disabled: t !== "ready" || !!d,
|
|
912
940
|
"aria-label": u ? "Take a photo with the system camera" : "Capture full-resolution photo",
|
|
913
|
-
children: /* @__PURE__ */
|
|
941
|
+
children: /* @__PURE__ */ S("span", {})
|
|
914
942
|
}),
|
|
915
|
-
!u && /* @__PURE__ */
|
|
943
|
+
!u && /* @__PURE__ */ C("div", {
|
|
916
944
|
className: "scanner-camera-overlay__toggles",
|
|
917
|
-
children: [n?.autoCapture.visible && /* @__PURE__ */
|
|
945
|
+
children: [n?.autoCapture.visible && /* @__PURE__ */ C("label", { children: [/* @__PURE__ */ S("input", {
|
|
918
946
|
type: "checkbox",
|
|
919
947
|
checked: n.autoCapture.checked,
|
|
920
948
|
onChange: (e) => c(e.target.checked)
|
|
921
|
-
}), "Auto-capture"] }), r?.torch.visible && /* @__PURE__ */
|
|
949
|
+
}), "Auto-capture"] }), r?.torch.visible && /* @__PURE__ */ C("label", {
|
|
922
950
|
title: r.torch.automatic ? "Torch is controlled automatically from scene brightness" : void 0,
|
|
923
|
-
children: [/* @__PURE__ */
|
|
951
|
+
children: [/* @__PURE__ */ S("input", {
|
|
924
952
|
type: "checkbox",
|
|
925
953
|
checked: r.torch.on,
|
|
926
954
|
disabled: !r.torch.mutable,
|
|
@@ -930,18 +958,18 @@ function I() {
|
|
|
930
958
|
})
|
|
931
959
|
]
|
|
932
960
|
}),
|
|
933
|
-
/* @__PURE__ */
|
|
961
|
+
/* @__PURE__ */ C("div", {
|
|
934
962
|
className: "scanner-camera-overlay__quality",
|
|
935
|
-
children: [/* @__PURE__ */
|
|
963
|
+
children: [/* @__PURE__ */ S("span", { children: u ? "System camera" : i === "live-mirror" ? "Mirror" : "Camera" }), /* @__PURE__ */ S("strong", { children: h && te ? `${h} × ${te}` : u ? "Tap to photograph" : "Measuring…" })]
|
|
936
964
|
})
|
|
937
965
|
]
|
|
938
966
|
});
|
|
939
967
|
}
|
|
940
|
-
function
|
|
941
|
-
let { modelDownload: t } =
|
|
942
|
-
return /* @__PURE__ */
|
|
968
|
+
function I({ snapshot: e }) {
|
|
969
|
+
let { modelDownload: t } = T();
|
|
970
|
+
return /* @__PURE__ */ S(he, { snapshot: e ?? t });
|
|
943
971
|
}
|
|
944
972
|
//#endregion
|
|
945
|
-
export {
|
|
973
|
+
export { _e as ScannerControls, F as ScannerDiagnostics, k as ScannerFrame, I as ScannerModelDownload, N as ScannerNotice, A as ScannerPreview, pe as ScannerProvider, j as ScannerQuad, P as ScannerStatus, M as ScannerTopBar, T as useScanner, me as useScannerRef };
|
|
946
974
|
|
|
947
975
|
//# sourceMappingURL=react.js.map
|