@scandit/web-datacapture-label 8.0.0-beta.2 → 8.0.1
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/LICENSE +1 -1
- package/THIRD_PARTY.txt +201 -71
- package/build/js/chunks/chunk-CDEJRN4Z.js +2 -0
- package/build/js/chunks/{chunk-BNFBKOTV.js → chunk-PJ54AAG7.js} +1 -1
- package/build/js/chunks/chunk-QC2XEDNW.js +1 -0
- package/build/js/chunks/{chunk-W3UA3KE7.js → chunk-RT5OKQNM.js} +1 -1
- package/build/js/index.js +1 -1
- package/build/js/moduleLoader.js +1 -1
- package/build/js/private/viewfinderTranslator.js +1 -1
- package/build/js/worker/LabelCaptureWorkerManager.js +1 -1
- package/build/js/worker/WorkerMain.js +1 -1
- package/build/js/worker/dataCaptureEngine.js +1 -1
- package/build/js/worker/labelCapture.inlineWorker.js +1 -1
- package/build/js/worker/proxies/AimerViewfinderProxy.js +1 -1
- package/build/js/worker/proxies/BarcodeFieldProxy.js +1 -1
- package/build/js/worker/proxies/CapturedLabelProxy.js +1 -1
- package/build/js/worker/proxies/CustomBarcodeProxy.js +1 -1
- package/build/js/worker/proxies/CustomTextProxy.js +1 -1
- package/build/js/worker/proxies/DateTextProxy.js +1 -1
- package/build/js/worker/proxies/ExpiryDateTextProxy.js +1 -1
- package/build/js/worker/proxies/ImeiOneBarcodeProxy.js +1 -1
- package/build/js/worker/proxies/ImeiTwoBarcodeProxy.js +1 -1
- package/build/js/worker/proxies/LabelCaptureAdvancedOverlayProxy.js +1 -1
- package/build/js/worker/proxies/LabelCaptureBasicOverlayProxy.js +1 -1
- package/build/js/worker/proxies/LabelCaptureHelperProxy.js +1 -1
- package/build/js/worker/proxies/LabelCaptureOverlayHelperProxy.js +1 -1
- package/build/js/worker/proxies/LabelCaptureProxy.js +1 -1
- package/build/js/worker/proxies/LabelCaptureSessionProxy.js +1 -1
- package/build/js/worker/proxies/LabelCaptureSettingsProxy.js +1 -1
- package/build/js/worker/proxies/LabelDefinitionProxy.js +1 -1
- package/build/js/worker/proxies/LabelFieldDefinitionProxy.js +1 -1
- package/build/js/worker/proxies/LabelFieldLocationProxy.js +1 -1
- package/build/js/worker/proxies/LabelFieldProxy.js +1 -1
- package/build/js/worker/proxies/NativeProxy.js +1 -1
- package/build/js/worker/proxies/NoViewfinderProxy.js +1 -1
- package/build/js/worker/proxies/PackingDateTextProxy.js +1 -1
- package/build/js/worker/proxies/PartNumberBarcodeProxy.js +1 -1
- package/build/js/worker/proxies/RectangularViewfinderAnimationProxy.js +1 -1
- package/build/js/worker/proxies/RectangularViewfinderProxy.js +1 -1
- package/build/js/worker/proxies/SerialNumberBarcodeProxy.js +1 -1
- package/build/js/worker/proxies/TotalPriceTextProxy.js +1 -1
- package/build/js/worker/proxies/UnitPriceTextProxy.js +1 -1
- package/build/js/worker/proxies/ValidationFlowOverlayProxy.js +1 -1
- package/build/js/worker/proxies/ValidationFlowSettingsProxy.js +1 -1
- package/build/js/worker/proxies/WeightTextProxy.js +1 -1
- package/package.json +2 -2
- package/sdc-lib/resources/models/barcode_label_localization_mslc_model_s.77afd87bb1ae.model +0 -0
- package/sdc-lib/scandit-datacapture-sdk-label-pthreads.js +1 -1
- package/sdc-lib/scandit-datacapture-sdk-label-pthreads.wasm +0 -0
- package/sdc-lib/scandit-datacapture-sdk-label-simd-pthreads.js +1 -1
- package/sdc-lib/scandit-datacapture-sdk-label-simd-pthreads.wasm +0 -0
- package/sdc-lib/scandit-datacapture-sdk-label-simd.js +1 -1
- package/sdc-lib/scandit-datacapture-sdk-label-simd.wasm +0 -0
- package/sdc-lib/scandit-datacapture-sdk-label.js +1 -1
- package/sdc-lib/scandit-datacapture-sdk-label.wasm +0 -0
- package/build/js/chunks/chunk-SHLS2WMS.js +0 -2
- package/build/js/chunks/chunk-YSXXNA74.js +0 -1
package/LICENSE
CHANGED
package/THIRD_PARTY.txt
CHANGED
|
@@ -1,73 +1,203 @@
|
|
|
1
|
-
Apache License, Version 2.0 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
|
|
2
1
|
|
|
3
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
3
|
+
Apache License
|
|
4
|
+
Version 2.0, January 2004
|
|
5
|
+
http://www.apache.org/licenses/
|
|
6
|
+
|
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
|
+
|
|
9
|
+
1. Definitions.
|
|
10
|
+
|
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
12
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
13
|
+
|
|
14
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
15
|
+
the copyright owner that is granting the License.
|
|
16
|
+
|
|
17
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
18
|
+
other entities that control, are controlled by, or are under common
|
|
19
|
+
control with that entity. For the purposes of this definition,
|
|
20
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
21
|
+
direction or management of such entity, whether by contract or
|
|
22
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
23
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
24
|
+
|
|
25
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
26
|
+
exercising permissions granted by this License.
|
|
27
|
+
|
|
28
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
29
|
+
including but not limited to software source code, documentation
|
|
30
|
+
source, and configuration files.
|
|
31
|
+
|
|
32
|
+
"Object" form shall mean any form resulting from mechanical
|
|
33
|
+
transformation or translation of a Source form, including but
|
|
34
|
+
not limited to compiled object code, generated documentation,
|
|
35
|
+
and conversions to other media types.
|
|
36
|
+
|
|
37
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
38
|
+
Object form, made available under the License, as indicated by a
|
|
39
|
+
copyright notice that is included in or attached to the work
|
|
40
|
+
(an example is provided in the Appendix below).
|
|
41
|
+
|
|
42
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
43
|
+
form, that is based on (or derived from) the Work and for which the
|
|
44
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
45
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
46
|
+
of this License, Derivative Works shall not include works that remain
|
|
47
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
48
|
+
the Work and Derivative Works thereof.
|
|
49
|
+
|
|
50
|
+
"Contribution" shall mean any work of authorship, including
|
|
51
|
+
the original version of the Work and any modifications or additions
|
|
52
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
53
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
54
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
55
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
56
|
+
means any form of electronic, verbal, or written communication sent
|
|
57
|
+
to the Licensor or its representatives, including but not limited to
|
|
58
|
+
communication on electronic mailing lists, source code control systems,
|
|
59
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
60
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
61
|
+
excluding communication that is conspicuously marked or otherwise
|
|
62
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
63
|
+
|
|
64
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
65
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
66
|
+
subsequently incorporated within the Work.
|
|
67
|
+
|
|
68
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
69
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
70
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
71
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
72
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
73
|
+
Work and such Derivative Works in Source or Object form.
|
|
74
|
+
|
|
75
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
76
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
77
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
78
|
+
(except as stated in this section) patent license to make, have made,
|
|
79
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
80
|
+
where such license applies only to those patent claims licensable
|
|
81
|
+
by such Contributor that are necessarily infringed by their
|
|
82
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
83
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
84
|
+
institute patent litigation against any entity (including a
|
|
85
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
86
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
87
|
+
or contributory patent infringement, then any patent licenses
|
|
88
|
+
granted to You under this License for that Work shall terminate
|
|
89
|
+
as of the date such litigation is filed.
|
|
90
|
+
|
|
91
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
92
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
93
|
+
modifications, and in Source or Object form, provided that You
|
|
94
|
+
meet the following conditions:
|
|
95
|
+
|
|
96
|
+
(a) You must give any other recipients of the Work or
|
|
97
|
+
Derivative Works a copy of this License; and
|
|
98
|
+
|
|
99
|
+
(b) You must cause any modified files to carry prominent notices
|
|
100
|
+
stating that You changed the files; and
|
|
101
|
+
|
|
102
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
103
|
+
that You distribute, all copyright, patent, trademark, and
|
|
104
|
+
attribution notices from the Source form of the Work,
|
|
105
|
+
excluding those notices that do not pertain to any part of
|
|
106
|
+
the Derivative Works; and
|
|
107
|
+
|
|
108
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
109
|
+
distribution, then any Derivative Works that You distribute must
|
|
110
|
+
include a readable copy of the attribution notices contained
|
|
111
|
+
within such NOTICE file, excluding those notices that do not
|
|
112
|
+
pertain to any part of the Derivative Works, in at least one
|
|
113
|
+
of the following places: within a NOTICE text file distributed
|
|
114
|
+
as part of the Derivative Works; within the Source form or
|
|
115
|
+
documentation, if provided along with the Derivative Works; or,
|
|
116
|
+
within a display generated by the Derivative Works, if and
|
|
117
|
+
wherever such third-party notices normally appear. The contents
|
|
118
|
+
of the NOTICE file are for informational purposes only and
|
|
119
|
+
do not modify the License. You may add Your own attribution
|
|
120
|
+
notices within Derivative Works that You distribute, alongside
|
|
121
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
122
|
+
that such additional attribution notices cannot be construed
|
|
123
|
+
as modifying the License.
|
|
124
|
+
|
|
125
|
+
You may add Your own copyright statement to Your modifications and
|
|
126
|
+
may provide additional or different license terms and conditions
|
|
127
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
128
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
129
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
130
|
+
the conditions stated in this License.
|
|
131
|
+
|
|
132
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
133
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
134
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
135
|
+
this License, without any additional terms or conditions.
|
|
136
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
137
|
+
the terms of any separate license agreement you may have executed
|
|
138
|
+
with Licensor regarding such Contributions.
|
|
139
|
+
|
|
140
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
141
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
142
|
+
except as required for reasonable and customary use in describing the
|
|
143
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
144
|
+
|
|
145
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
146
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
147
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
148
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
149
|
+
implied, including, without limitation, any warranties or conditions
|
|
150
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
151
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
152
|
+
appropriateness of using or redistributing the Work and assume any
|
|
153
|
+
risks associated with Your exercise of permissions under this License.
|
|
154
|
+
|
|
155
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
156
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
157
|
+
unless required by applicable law (such as deliberate and grossly
|
|
158
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
159
|
+
liable to You for damages, including any direct, indirect, special,
|
|
160
|
+
incidental, or consequential damages of any character arising as a
|
|
161
|
+
result of this License or out of the use or inability to use the
|
|
162
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
163
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
164
|
+
other commercial damages or losses), even if such Contributor
|
|
165
|
+
has been advised of the possibility of such damages.
|
|
166
|
+
|
|
167
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
168
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
169
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
170
|
+
or other liability obligations and/or rights consistent with this
|
|
171
|
+
License. However, in accepting such obligations, You may act only
|
|
172
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
173
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
174
|
+
defend, and hold each Contributor harmless for any liability
|
|
175
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
176
|
+
of your accepting any such warranty or additional liability.
|
|
177
|
+
|
|
178
|
+
END OF TERMS AND CONDITIONS
|
|
179
|
+
|
|
180
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
181
|
+
|
|
182
|
+
To apply the Apache License to your work, attach the following
|
|
183
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
184
|
+
replaced with your own identifying information. (Don't include
|
|
185
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
186
|
+
comment syntax for the file format. We also recommend that a
|
|
187
|
+
file or class name and description of purpose be included on the
|
|
188
|
+
same "printed page" as the copyright notice for easier
|
|
189
|
+
identification within third-party archives.
|
|
190
|
+
|
|
191
|
+
Copyright [yyyy] [name of copyright owner]
|
|
192
|
+
|
|
193
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
194
|
+
you may not use this file except in compliance with the License.
|
|
195
|
+
You may obtain a copy of the License at
|
|
196
|
+
|
|
197
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
198
|
+
|
|
199
|
+
Unless required by applicable law or agreed to in writing, software
|
|
200
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
201
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
202
|
+
See the License for the specific language governing permissions and
|
|
203
|
+
limitations under the License.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {DataCaptureLoader,Logger}from'@scandit/web-datacapture-core';function s(n){let i=URL.createObjectURL(new Blob(['"use strict";(()=>{var da=(i,a)=>()=>(i&&(a=i(i=0)),a);var p,o=da(()=>{p={"scandit-datacapture-sdk-label-pthreads.wasm":{bytes:8395229},"scandit-datacapture-sdk-label.wasm":{bytes:8272633},"scandit-datacapture-sdk-label-simd.wasm":{bytes:8208235},"scandit-datacapture-sdk-label-simd-pthreads.wasm":{bytes:8331192}}});o();o();o();o();o();function K(i){return typeof i=="object"&&i!=null}function Z(i){if(typeof i=="string")return i;if(K(i)){if(typeof i.message=="string")return i.message}else if(typeof(i==null?void 0:i.toString)=="function")return i.toString();return"unknown error"}o();o();var c;(i=>{(u=>(u.Debug="debug",u.Info="info",u.Warn="warn",u.Error="error",u.Quiet="quiet"))(i.Level||(i.Level={}));let a=new Map([["debug",1],["info",2],["warn",3],["error",4],["quiet",5]]),e="debug";function t(u){e=u}i.setLevel=t;function r(u,...m){if(!(a.get(e)>a.get(u)))switch(u){case"debug":{console.debug(...m);break}case"info":{console.log(...m);break}case"warn":{console.warn(...m);break}case"error":{console.error(...m);break}}}i.log=r;function n(...u){r("warn",...u)}i.warn=n;function s(...u){r("debug",...u)}i.debug=s;function l(...u){r("info",...u)}i.info=l;function d(...u){r("error",...u)}i.error=d})(c||(c={}));o();o();var pa=class{constructor(i){if(typeof i!="function")throw new TypeError("FinalizationRegistry callback must be a function")}register(i,a,e){}unregister(i){return!1}};function Pt(i){typeof i.FinalizationRegistry>"u"&&(i.FinalizationRegistry=pa)}o();o();o();var ce=class xt extends Error{constructor(a){super(a.message),Object.setPrototypeOf(this,xt.prototype),this.name=a.name}toString(){return`${this.name}: ${this.message}`}};var ue=Promise.resolve(),Fe=!1,He=!1,ee,Se={writableDataPath:""};async function wt(i){if(ee==null)return;Fe=!0;let a=new Promise((e,t)=>{setTimeout(()=>{t(new ce({name:"BlockedIndexedDB",message:"IndexedDB database is blocked"}))},1500)});try{await Promise.race([new Promise((e,t)=>{ee==null||ee(i,r=>{if(r!=null){t(r);return}e()})}),a])}finally{Fe=!1}}async function Nt(i){return He||(Fe?(He=!0,ue=ue.then(async()=>(He=!1,wt(i)))):ue=wt(i)),ue}async function Ht(i){Se=i,ee=FS.syncfs,FS.syncfs=((a,e)=>{let t=e,r=()=>{t()},n=s=>{t(s)};Nt(a).then(r).catch(n)});try{FS.mkdir(Se.writableDataPath)}catch(a){if(a.code!=="EEXIST")throw ee=void 0,a}return FS.mount(IDBFS,{},Se.writableDataPath),Nt(!0)}o();o();o();var St={};function ca(i){return[...new Uint8Array(i)].map(a=>{let e=a.toString(16);return e.length===1?`0${e}`:e}).join("")}async function*ua(i){let a=i.getReader();try{for(;;){let{done:e,value:t}=await a.read();if(e)return;yield t}}finally{a.releaseLock()}}async function ha(i){let a=[],e=0,t=0;for await(let n of ua(i))a.push(n),e+=n.length;let r=new Uint8Array(e);for(let n of a)r.set(n,t),t+=n.length;return r.buffer}var ya=(i=>(i.VALID="VALID",i.INVALID="INVALID",i.NOT_VERIFIABLE="NOT_VERIFIABLE",i))(ya||{});async function va(i,a,e){if(typeof crypto.subtle.digest!="function")return c.log(c.Level.Warn,`Insecure context (see https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts): The hash of the Scandit Data Capture library WASM file found at ${e} could not be verified`),"NOT_VERIFIABLE";try{let t=i instanceof Promise?await i:i,r=await crypto.subtle.digest("SHA-256",t),n=ca(r);return a==null?(c.log(c.Level.Warn,"The library hash is not defined or empty, cannot correctly verify integrity."),"NOT_VERIFIABLE"):n===a?(c.log(c.Level.Debug,`Data Capture library WASM integrity found at ${e} has been verified correctly.`),"VALID"):(c.log(c.Level.Warn,`The Scandit Data Capture library WASM file found at ${e} seems invalid: expected file hash doesn\'t match (received: ${n}, expected: ${a}). Please ensure the correct Scandit Data Capture file (with correct version) is retrieved.`),"INVALID")}catch(t){return c.log(c.Level.Warn,"Wasm response could not be verified",t),"NOT_VERIFIABLE"}}var Ce=new Map([["br",4.4],["gzip",2.9],["none",1]]);function ga(i){var a;let e="content-encoding";if(i==null||i.get(e)==null)return Ce.get("none");let t=new Set(((a=i.get(e))!=null?a:"").split(",").map(r=>r.trim()));for(let[r,n]of Ce)if(t.has(r))return n;return Ce.get("none")}function ba(i){var a,e;if(i==null)return 0;let t=(a=ga(i))!=null?a:1,r=Number.parseInt((e=i.get("content-length"))!=null?e:"0",10);return Number.isNaN(r)?0:Math.floor(r*t*100)/100}function fa(i){let{pathname:a}=new URL(i);for(let[e,t]of Object.entries(St))if(a.endsWith(e))return t.bytes;return 0}function Ft(i){St=i}var Pa=(i,a)=>{let e=ba(a);return e===0?fa(i):e};function xa(i,a,e,{onProgress:t,onError:r,onComplete:n}){if(!a.body)return[a];let s=Pa(i,a.headers),l=0,d=0;if(typeof TransformStream>"u")return c.warn("TransformStream is not supported in this environment. Progress tracking will be disabled."),[a];let[u,m]=e?a.body.tee():[a.body],b=u.pipeThrough(new TransformStream({async transform(v,F){try{l+=v.length,d=Number((l/s*100).toFixed(2)),s>0&&v.length>0&&d<100?t==null||t({percentage:d,loadedBytes:l,privateUri:i}):s===0&&v.length>0&&(t==null||t({percentage:null,loadedBytes:l,privateUri:i})),F.enqueue(v)}catch(J){F.error(J),r==null||r({error:J})}},flush(v){t==null||t({percentage:100,loadedBytes:l,privateUri:i}),n==null||n({percentage:100,loadedBytes:l,privateUri:i}),v.terminate()}}));return[new Response(b,{headers:new Headers(a.headers),status:a.status,statusText:a.statusText}),m]}async function Ie({wasmURI:i,expectedHash:a,verifyResponseHash:e,onProgress:t,onComplete:r,onError:n,referredOrigin:s}){let l=await fetch(i,{referrerPolicy:"origin",referrer:s!=null?s:""});if(!l.ok)throw new Error(`HTTP status code is not ok: ${l.status}, ${l.statusText}`);let[d,u]=xa(i,l,e,{onProgress:t,onError:n,onComplete:r});return u!=null&&va(ha(u),a,i),d}function Ct({wasmURI:i,expectedHash:a,verifyResponseHash:e,progressCallback:t,successCallback:r,errorCallback:n,importObject:s,referredOrigin:l}){async function d(m){try{let b=await Ie({wasmURI:i,expectedHash:a,verifyResponseHash:e,onProgress:t,referredOrigin:l}),v=await(m!=null?m:b).arrayBuffer(),F=await self.WebAssembly.instantiate(v,s);r(F.instance,F.module)}catch(b){c.log(c.Level.Error,b),c.log(c.Level.Error,`Couldn\'t instantiate Scandit SDK DataCapture library at ${i}, did you configure the path for it correctly?`),n==null||n(b)}}async function u(){let m;try{m=await Ie({wasmURI:i,expectedHash:a,verifyResponseHash:e,onProgress:t,referredOrigin:l});let b=await self.WebAssembly.instantiateStreaming(m,s);r(b.instance,b.module)}catch(b){c.log(c.Level.Warn,b),c.log(c.Level.Warn,"WebAssembly streaming compile failed. Falling back to ArrayBuffer instantiation (this will make things slower)"),d((m==null?void 0:m.bodyUsed)===!0?void 0:m)}}typeof self.WebAssembly.instantiateStreaming=="function"?u():d()}async function Oe(i,a,e,t){return new Promise((r,n)=>{i().then(r).catch(s=>{let l=a*2;if(l>e){n(s);return}t(s),self.setTimeout(()=>{Oe(i,l,e,t).then(r).catch(n)},a)})})}function Ae(i){var a,e;let t="unknown";if((a=i.href)!=null&&a.startsWith("blob:null/"))t="localhost";else{let r=((e=i.pathname)==null?void 0:e.length)>1&&!i.pathname.startsWith("/");t=new URL(r?i.pathname:i.origin).hostname}return t.startsWith("[")&&t.endsWith("]")?(t=t.slice(1,-1),t):(/^(\\d{1,3}\\.){3}\\d{1,3}$/.test(t)&&(t=t.split(".").map(r=>Number.parseInt(r,10).toString()).join(".")),t)}async function It(i,a){async function e(){return importScripts(i)}try{await Oe(e,250,4e3,r=>{c.log(c.Level.Warn,r),c.log(c.Level.Warn,`Couldn\'t retrieve Scandit Data Capture library at ${i}, retrying...`)}),self.Module.mainScriptUrlOrBlob=i;let t=self.SDC_WASM_JS_VERSION;return t!==a&&c.log(c.Level.Warn,`The Scandit Data Capture library JS file found at ${i} seems invalid: expected version doesn\'t match (received: ${t}, expected: ${a}). Please ensure the correct Scandit Data Capture file (with correct version) is retrieved.`),!0}catch(t){return c.log(c.Level.Error,t),!1}}o();o();var he=class{constructor(){this.promise=new Promise((i,a)=>{this.reject=a,this.resolve=i})}};var Le=class{constructor(i,a){this.workerFunctions=i,this.options=a,this.imageIdCounter=0,this.conversions=new Map}convertToJpeg(i,a){let e=this.imageIdCounter++,t=new he;this.conversions.set(e,t);let r=i.toBitmap();return this.workerFunctions.postMessage({type:"convertToJPEG",imageId:e,width:i.getWidth(),height:i.getHeight(),data:r,planes:i.getPlanes(),orientation:a,quality:this.options.quality},Array.from(new Set([r.buffer]))),t.promise}onConvertToJPEGResult(i,a){let e=this.conversions.get(i);e?(e.resolve(a),this.conversions.delete(i)):c.warn(`AsyncImageConverterForwarder: Conversion for imageId ${i} not found in Map`)}};o();o();var ye=class{constructor(i){this.options=i}get quality(){return this.options.quality}async convertToJpeg(i,a){try{let{width:e,height:t,planes:r}=this.validateAndExtractImageData(i);this.prepareCanvas(e,t);let n=this.processImageData(i,r,e,t);return await this.convertToJpegBytes(n,a)}catch(e){throw c.warn(`Failed to convert image to JPEG: ${e}`),e instanceof Error?e:new Error("Failed to convert image to JPEG")}}validateAndExtractImageData(i){let a=i.getWidth(),e=i.getHeight(),t=i.getPlanes();if(a<=0||e<=0)throw c.warn(`Invalid image dimensions: ${a}x${e}`),new Error(`Invalid image dimensions: ${a}x${e}`);if(!t||t.length===0)throw c.warn("ImageBuffer has no planes"),new Error("ImageBuffer has no planes");return{width:a,height:e,planes:t}}prepareCanvas(i,a){if(!this.ensureCanvas(i,a))throw new Error("Failed to create OffscreenCanvas");if(!this.canvas||!this.context)throw new Error("Canvas or context not properly initialized")}processImageData(i,a,e,t){let r=this.createImageDataFromBuffer(i,a,e,t);if(r===null)throw new Error("Failed to create ImageData");return this.validateImageData(r,e,t),r}validateImageData(i,a,e){var t;if(i.width!==a||i.height!==e)throw c.warn(`ImageData dimensions mismatch: expected ${a}x${e}, got ${i.width}x${i.height}`),new Error("ImageData dimensions mismatch");if(!i.data||i.data.length!==a*e*4)throw c.warn(`ImageData has invalid data length: expected ${a*e*4}, got ${((t=i.data)==null?void 0:t.length)||0}`),new Error("ImageData has invalid data length")}async convertToJpegBytes(i,a){if(!this.context||!this.canvas)throw new Error("Canvas or context not available");try{this.context.putImageData(i,0,0)}catch(n){throw c.warn(`Failed to put image data on canvas: ${n}`),new Error(`Failed to put image data on canvas: ${n}`)}let e=a!==0?this.applyRotation(this.canvas,a):this.canvas,t;try{t=await this.canvasToBlob(e)}catch(n){throw c.warn(`Failed to convert canvas to blob: ${n}`),new Error(`Failed to convert canvas to blob: ${n}`)}if(!t||t.size===0)throw c.warn("Canvas convertToBlob returned empty or null blob"),new Error("Failed to create JPEG blob");let r;try{r=await t.arrayBuffer()}catch(n){throw c.warn(`Failed to get array buffer from blob: ${n}`),new Error(`Failed to get array buffer from blob: ${n}`)}if(!r||r.byteLength===0)throw c.warn("Blob arrayBuffer returned empty or null buffer"),new Error("Failed to get array buffer from blob");return new Uint8Array(r)}ensureCanvas(i,a){try{return(!this.canvas||this.canvas.width!==i||this.canvas.height!==a)&&(this.canvas=this.getNewCanvas(i,a),this.context=this.canvas.getContext("2d")),this.context!==null}catch(e){return c.warn("Failed to create HTMLCanvasElement",e),!1}}createImageDataFromBuffer(i,a,e,t){let r=new Set(a.map(n=>n.channel));try{if(this.isYUVFormat(r)){let l=i.toBitmap();return!l||l.length!==e*t*4?(c.warn(`Invalid bitmap data from toBitmap(): expected ${e*t*4} bytes, got ${(l==null?void 0:l.length)||0}`),null):new ImageData(new Uint8ClampedArray(l),e,t)}if(this.isRGBAFormat(r))return this.createImageDataFromRGBAPlanes(a,e,t);if(this.isRGBFormat(r))return this.createImageDataFromRGBPlanes(a,e,t);if(this.isGrayscaleFormat(r))return this.createImageDataFromGrayscalePlanes(a,e,t);c.warn(`Unknown image format with channels: ${Array.from(r).join(", ")}, falling back to toBitmap()`);let n=i.toBitmap();if(!n||n.length===0)return c.warn("toBitmap() returned empty or null data"),null;let s=n.length/(e*t);return s===4?new ImageData(new Uint8ClampedArray(n),e,t):(c.warn(`Unsupported format: ${s} bytes per pixel`),null)}catch(n){return c.warn(`Failed to create ImageData: ${n}`),null}}isYUVFormat(i){return i.has(0)&&i.has(1)&&i.has(2)}isRGBAFormat(i){return i.has(3)&&i.has(4)&&i.has(5)&&i.has(6)}isRGBFormat(i){return i.has(3)&&i.has(4)&&i.has(5)&&!i.has(6)}isGrayscaleFormat(i){return i.has(0)&&!i.has(1)&&!i.has(2)}createImageDataFromRGBAPlanes(i,a,e){let t=i.find(d=>d.channel===3),r=i.find(d=>d.channel===4),n=i.find(d=>d.channel===5),s=i.find(d=>d.channel===6);if(!t||!r||!n||!s)return c.warn("Missing RGBA planes"),null;let l=new Uint8ClampedArray(a*e*4);for(let d=0;d<e;d++)for(let u=0;u<a;u++){let m=(d*a+u)*4;l[m]=this.getPixelFromPlane(t,u,d),l[m+1]=this.getPixelFromPlane(r,u,d),l[m+2]=this.getPixelFromPlane(n,u,d),l[m+3]=this.getPixelFromPlane(s,u,d)}return new ImageData(l,a,e)}createImageDataFromRGBPlanes(i,a,e){let t=i.find(l=>l.channel===3),r=i.find(l=>l.channel===4),n=i.find(l=>l.channel===5);if(!t||!r||!n)return c.warn("Missing RGB planes"),null;let s=new Uint8ClampedArray(a*e*4);for(let l=0;l<e;l++)for(let d=0;d<a;d++){let u=(l*a+d)*4;s[u]=this.getPixelFromPlane(t,d,l),s[u+1]=this.getPixelFromPlane(r,d,l),s[u+2]=this.getPixelFromPlane(n,d,l),s[u+3]=255}return new ImageData(s,a,e)}createImageDataFromGrayscalePlanes(i,a,e){let t=i.find(n=>n.channel===0);if(!t)return c.warn("Missing Y plane for grayscale"),null;let r=new Uint8ClampedArray(a*e*4);for(let n=0;n<e;n++)for(let s=0;s<a;s++){let l=(n*a+s)*4,d=this.getPixelFromPlane(t,s,n);r[l]=d,r[l+1]=d,r[l+2]=d,r[l+3]=255}return new ImageData(r,a,e)}getPixelFromPlane(i,a,e){let t=Math.floor(a/(i.subsamplingX||1)),r=Math.floor(e/(i.subsamplingY||1)),n=i.rowStride,s=i.pixelStride,l=r*n+t*s,d=i.data;return l<d.length?d[l]:0}applyRotation(i,a){let e=a*Math.PI/180,t=a===90||a===270||a===-90||a===-270,r=t?i.height:i.width,n=t?i.width:i.height,s=this.getNewCanvas(r,n),l=s.getContext("2d");if(!l)throw new Error("Failed to get 2D context for rotated canvas");return l.translate(r/2,n/2),l.rotate(e),l.translate(-i.width/2,-i.height/2),l.drawImage(i,0,0),s}};ye.JPEG_IMAGE_MIME_TYPE="image/jpeg";var Ot=class extends ye{getNewCanvas(i,a){return new OffscreenCanvas(i,a)}canvasToBlob(i){return i.convertToBlob({type:ye.JPEG_IMAGE_MIME_TYPE,quality:this.options.quality})}};o();var ve;(i=>{function a(){return"8.0.1"}i.sdkVersion=a})(ve||(ve={}));o();function wa(i){return/^https?:\\/\\/(?:[^./]*\\.)*cdn.jsdelivr.net\\//.test(i)?{result:!0,cdnBaseURL:"https://cdn.jsdelivr.net/npm/"}:/^https?:\\/\\/(?:[^./]*\\.)*unpkg.com\\//.test(i)?{result:!0,cdnBaseURL:"https://unpkg.com/"}:{result:!1,cdnBaseURL:""}}function Na(i){let a=/@scandit\\/web-datacapture-[a-z]+/i.exec(i);return a?a[0]:null}function At(i,a,e){let t=a,r=wa(t);if(r.result){let s=Na(t);s!=null&&(t=`${r.cdnBaseURL}${s}@${i}/sdc-lib/`)}let n=e.replace(".wasm","");return r.result?{jsURI:`${t}${n}.js`,wasmURI:`${t}${n}.wasm`}:{jsURI:`${t}${n}.js?v=${i}`,wasmURI:`${t}${n}.wasm?v=${i}`}}o();var Ha=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),Sa=()=>(async i=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(i)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));function Fa(){return typeof crossOriginIsolated>"u"?!1:crossOriginIsolated}function Ca(){try{return new WebAssembly.Memory({initial:1,maximum:1,shared:!0}).buffer.constructor.name==="SharedArrayBuffer"}catch{return!1}}async function Lt(){return Ha()}async function Ia(){if(!await Sa())return!1;let i=null;try{i=new Worker(URL.createObjectURL(new Blob([\'postMessage("Worker" in self);\'],{type:"text/javascript"})),{name:"nestedWorkerTest"})}catch{return!1}return new Promise(a=>{if(i==null){a(!1);return}i.onmessage=e=>{i==null||i.terminate(),a(e.data)}})}async function Tt(){let i=await Ia();return Fa()&&Ca()&&i}var Dt=class Mt{constructor(a,e){this.hintPresenterV2=null,this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL=10,this.redrawInterval=1e3/30,this.redrawRequests=[],this._isDrawLoopRunning=!1,this.frameDataPool=new Map,this.lastFrameCounter=-1,this.poorMansBenchmarkLogs=!1,this.writableDataPathStandard="/scandit_sync_folder",this.resourceFilesSubfolder="resources",this.performanceMetricsReporterTimer=void 0,this.performanceMetrics={frameDataPoolSize:0,processedFramesCount:0,redrawRequestsCount:0,actualRedrawsCount:0},this.gestureListener=null,this.webPlatformHintPresenter=null,this.moduleHandler=a,this.workerFunctions=e,this._loadProgressCallback=this._loadProgressCallback.bind(this),Ft(this.getWasmMetadata())}get Module(){return this.moduleHandler.get()}set isDrawLoopRunning(a){this._isDrawLoopRunning=a,!a&&typeof this.loopTimeoutId=="number"&&(clearTimeout(this.loopTimeoutId),this.loopTimeoutId=void 0)}get isDrawLoopRunning(){return this._isDrawLoopRunning}convertToLoadableFrameData(a){let e=this.getNextFrameId();this.frameDataPool.set(e,new Uint8ClampedArray(a.getFrameData()));let t=this.lastUsedModuleMirrorAxis==null?!1:this.lastUsedModuleMirrorAxis!==this.Module.Axis.None;return{frameId:e,width:a.getWidth(),height:a.getHeight(),isFrameSourceMirrored:t}}createContext(a){var e,t,r,n,s;let l=this.getModeDeserializers(),d=Ae(location);(d==="localhost"||d==="127.0.0.1")&&navigator.userAgent.includes("Electron")&&a.appName!=null&&(d+=`-${a.appName}`),this.parentDomain=a.parentDomain,this.contextDeserializer=new this.Module.DataCaptureContextDeserializer(this.writableDataPath,a.deviceId,a.context.deviceModelName,d,this.parentDomain,l,a.delayedRegistration,a.highEndBlurryRecognition,this.resourcePath);let u=this.contextDeserializer.contextFromJson(JSON.stringify(a.context));if(u==null){let y=this.contextDeserializer.getLastError();throw new Error(`Could not create the context: ${y}`)}let m=u.getView();this.context=u.getContext(),u.delete();let b=this.Module.DataCaptureContextListener.extend("DataCaptureContextListener",{didChangeStatus:(y,O)=>{this.contextDidChangeStatus(JSON.parse(O.toJson())),y.delete()},didStartObservingContext:y=>{this.didStartObservingContext(),y.delete()},didStopObservingContext:y=>{y.delete()}}),v=this.Module.DataCaptureContextFrameListener.extend("DataCaptureContextFrameListener",{onObservationStarted:y=>{y.delete()},onObservationStopped:y=>{y.delete()},onFrameProcessingStarted:(y,O)=>{this.workerFunctions.postMessage({type:"onFrameProcessingStarted"}),O.delete(),y.delete()},onFrameProcessingFinished:(y,O)=>{this.workerFunctions.postMessage({type:"onFrameProcessingFinished"}),O.delete(),y.delete()},onFrameSkipped:(y,O)=>{this.workerFunctions.postMessage({type:"onFrameSkipped"}),O.delete(),y.delete()}}),F=this.Module.GestureRecognizer.extend("GestureRecognizer",{setGestureListener:(y,O)=>{var me;(me=this.gestureListener)==null||me.delete(),this.gestureListener=y.clone(),y.delete()}});(e=this.gestureRecognizer)==null||e.delete(),this.gestureRecognizer=new F;let J=new b;this.context.addListener(J),J.delete();let q=new v;this.context.addFrameListener(q),q.delete(),this.setView(m),(t=this.view)==null||t.setGestureRecognizer(this.gestureRecognizer);let Y=this.Module.PlatformHintPresenter.extend("PlatformHintPresenter",{setHintPresenter:y=>{y.delete()},showToast:y=>{this.workerFunctions.postMessage({type:"showToast",payload:JSON.parse(y)})},hideToast:y=>{this.workerFunctions.postMessage({type:"hideToast",payload:JSON.parse(y)})},showGuidance:y=>{this.workerFunctions.postMessage({type:"showGuidance",payload:JSON.parse(y)})},hideGuidance:y=>{this.workerFunctions.postMessage({type:"hideGuidance",payload:JSON.parse(y)})},startUpdateTimer:y=>{this.workerFunctions.postMessage({type:"startUpdateTimer",payload:{duration:{unit:"ms",value:y}}})},stopUpdateTimer:()=>{this.workerFunctions.postMessage({type:"stopUpdateTimer"})}});(r=this.hintPresenterV2)==null||r.delete(),this.hintPresenterV2=null,(n=this.webPlatformHintPresenter)==null||n.delete(),this.webPlatformHintPresenter=null,this.webPlatformHintPresenter=new Y,this.view&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter),(s=this.view)==null||s.setHintPresenterV2(this.hintPresenterV2)),this.webAsyncImageConverterInstance=this.getAsyncImageConverterInstance({quality:1}),this.Module.ImageConverter.setAsyncInstance(this.webAsyncImageConverterInstance)}convertToJPEGResult(a,e){this.webAsyncImageConverterInstance instanceof Le&&this.webAsyncImageConverterInstance.onConvertToJPEGResult(a,e)}getAsyncImageConverterInstance(a){return this.workerFunctions.getOffscreenCanvas()!=null?new Ot(a):new Le(this.workerFunctions,a)}onTap(a){var e;(e=this.gestureListener)==null||e.onTap(JSON.stringify(a))}hintPresenterV2Update(){var a;(a=this.hintPresenterV2)==null||a.update()}startReportingPerformanceMetrics(){this.performanceMetricsReporterTimer==null&&(this.performanceMetricsReporterTimer=setInterval(()=>{this.reportPerformanceMetrics();for(let a of Object.keys(this.performanceMetrics))this.performanceMetrics[a]=0},1e3))}async reportPerformanceMetrics(){this.workerFunctions.postMessage({type:"performanceMetricsReport",payload:{...this.performanceMetrics}})}deleteFrameData(a){this.frameDataPool.delete(a)}dispose(){var a,e,t,r;this.context.dispose(),this.frameDataPool.clear(),this.isDrawLoopRunning=!1,this.lastFrameCounter=-1,(a=this.gestureRecognizer)==null||a.delete(),this.gestureRecognizer=null,(e=this.gestureListener)==null||e.delete(),this.gestureListener=null,(t=this.hintPresenterV2)==null||t.delete(),this.hintPresenterV2=null,(r=this.webPlatformHintPresenter)==null||r.delete(),this.webPlatformHintPresenter=null}flushAnalytics(){this.context.flushAnalytics()}extractCentaurusLicense(a){return{payload:{centaurus:{licenseKey:this.Module.LicenseUtils[Mt.get3dPartyLicenseKeyMethodName](a)}}}}getModeDeserializers(){return new this.Module.VectorDataCaptureModeDeserializer}loadLibrary(a){return this.libraryLoadingPromise!=null?this.libraryLoadingPromise:(this.libraryLoadingPromise=this.setup(a),this.libraryLoadingPromise)}processFrame(a){var e;if(this.context==null)return{payload:a,transferables:[a.data.buffer]};let t=a.data,r=a.colorType==="GRAYSCALE"?this.Module.ImageBufferFormat.Grayscale8:this.Module.ImageBufferFormat.Rgba8888,n=this.Module.allocateUint8Array(t.byteLength);return this.Module.HEAPU8.set(t,n),(e=this.imageFrameSource)==null||e.outputFrame(n,a.width,a.height,r),{payload:a,transferables:[a.data.buffer]}}reportCameraProperties(a){this.context.setCameraProperties(a.deviceId,a.isFrontFacing,a.hasAutofocus)}requestFrameData(a){let e=this.frameDataPool.get(a);return e==null?{payload:{data:null}}:{payload:{data:e},transferables:[e.buffer]}}scheduleRedraw(a,e){this.addRedrawRequest(e),this.isDrawLoopRunning||this.startDrawLoop(a)}sendViewRefreshCommands(a){this.workerFunctions.postMessage({type:"draw",payload:a},[a.buffer])}setFrameSource(a,e){var t;this.lastUsedModuleMirrorAxis=this.mapMirrorAxisOnModule(a),(t=this.imageFrameSource)==null||t.delete(),this.imageFrameSource=new this.Module.ImageBufferFrameSource(this.lastUsedModuleMirrorAxis,e,0),this.context.setFrameSource(this.imageFrameSource)}startDrawLoop(a){this.isDrawLoopRunning=!0;let e=n=>this.redrawRequests.length>0&&this.redrawRequests[0]<=n,t=n=>{for(;this.redrawRequests.length>0&&this.redrawRequests[0]<=n;)this.redrawRequests.shift()},r=()=>{this.loopTimeoutId=setTimeout(()=>{if(!this.isDrawLoopRunning)return;let n=performance.now();if(e(n)){t(n),a.draw();let s=a.getDrawCommands();this.sendViewRefreshCommands(new Uint8Array(s))}r()},this.redrawInterval)};r()}updateContext(a){if(this.context!=null&&this.contextDeserializer!=null){a.view!=null&&!a.view.visible&&this.context.flushAnalytics();let e=this.onBeforeUpdateContextHook(a),t=this.contextDeserializer.updateContextFromJson(this.context,this.view,JSON.stringify(e.context));if(t==null){let n=this.contextDeserializer.getLastError();throw new Error(`Could not update the context: ${n}`)}this.context.delete(),this.context=t.getContext();let r=t.getView();t.delete(),r!=null&&e.view!=null&&r.setViewSize(e.view.width,e.view.height,e.view.orientation),!this.hintPresenterV2&&this.webPlatformHintPresenter&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter)),r!=null&&this.hintPresenterV2&&r.setHintPresenterV2(this.hintPresenterV2),this.gestureRecognizer!=null&&(r==null||r.setGestureRecognizer(this.gestureRecognizer)),this.setView(r),c.debug("context updated",e)}}onBeforeUpdateContextHook(a){return a}onDocumentVisibilityChange(a){a==="hidden"&&this.context.flushAnalytics()}isFeatureSupported(a){return{payload:{supported:this.context.isFeatureSupported(a)}}}getViewfinderInfo(){var a,e;return{payload:{isDisplayingViewfinder:(e=(a=this.view)==null?void 0:a.isDisplayingViewfinder())!=null?e:!1,rect:JSON.parse(this.view.getViewfinderRect())}}}getOpenSourceSoftwareLicenseInfo(){return{payload:{licenseText:this.Module.OpenSourceSoftwareLicenseInfo.getLicenseText()}}}getNextFrameId(){return this.lastFrameCounter++,this.lastFrameCounter>=this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL&&(this.lastFrameCounter=0),this.lastFrameCounter}getWasmDynamicLibraries(a){return this.getWasmSideModuleFileName()==null?[]:[`${a.replace(/\\/[^/]*$/,"/")}${this.getWasmSideModuleFileName()}`]}getWasmCoreExpectedHash(a,e){return e?a?"7471fdf305eefbfb41cb63ef4e23423ca9186d85eff61f1980c5e7fbbd509818":"1d47e6e618f038926aed670caeb9c6f01f4e1408ee788b26cc0399f5a24c8574":a?"6dd410bdb7c4593f5394af485a50f0a0cec7e6e537c33ed83dd7f54af7807cbd":""}getWasmCoreFileName(a,e){return e?a?"scandit-datacapture-sdk-label-simd-pthreads.wasm":"scandit-datacapture-sdk-label-pthreads.wasm":a?"scandit-datacapture-sdk-label-simd.wasm":""}getWasmMetadata(){return p}getWasmSideModuleFileName(){return""}_loadProgressCallback(a){this.workerFunctions.postMessage({type:"loadLibraryProgress",payload:a})}addRedrawRequest(a){this.redrawRequests.push(Math.round(performance.now())+a),this.redrawRequests.sort((e,t)=>e-t)}contextDidChangeStatus(a){a.code===260?a.message=a.message.replace("domain name",`domain name (${Ae(location)})`):a.code===265&&(a.message=a.message.replace("domain name",`domain name (${this.parentDomain})`)),this.workerFunctions.postMessage({type:"contextDidChangeStatus",payload:a})}didStartObservingContext(){this.workerFunctions.postMessage({type:"didStartObservingContext"})}mapMirrorAxisOnModule(a){switch(a){case"None":return this.Module.Axis.None;case"X":return this.Module.Axis.X;case"Y":return this.Module.Axis.Y;default:return this.Module.Axis.None}}setView(a){this.view=a,this.setViewRefreshHandler(a),a==null&&(this.isDrawLoopRunning=!1,this.sendViewRefreshCommands(new Uint8Array([])))}addNativeOverlay(a){c.warn("addNativeOverlay has not been implemented for this module",a)}removeNativeOverlay(a){c.warn("removeNativeOverlay has not been implemented for this module",a)}setViewRefreshHandler(a){if(a==null||a.isViewRefreshHandlerSet)return;let e=this.Module.NeedsRedrawDelegate.extend("NeedsRedrawDelegate",{setNeedsRedrawIn:this.scheduleRedraw.bind(this,a)}),t=new e;a.setNeedsRedrawDelegate(t),a.isViewRefreshHandlerSet=!0}setupDataDecoding(){let a=this.moduleHandler.get(),e=a.DataDecoding.extend("DataDecoding",{decode(t,r){try{let n=JSON.parse(r),s=[];for(let l of n){let d=new TextDecoder(l.ianaName,{fatal:!0});s.push(d.decode(t.slice(l.startIndex,l.endIndex)))}return s.join("")}catch{return""}}});a.setDataDecoding(new e)}start(a,e,t){a&&e&&(this.setupDataDecoding(),this.moduleHandler.get().callMain(),this.moduleHandler.get().__emscripten_proxy_main!==void 0||t())}getWritableDataPath(a){return a!=null?(c.debug(`IndexedDB database name override in use to recover from blocked standard database: ${a}`),a):this.writableDataPathStandard}numOfMBToPages(a){return Math.ceil(1024*a*1024/64/1024)}async setup({libraryLocation:a,locationPath:e,writableDataPathOverride:t,overrideThreadsSupport:r,overrideSimdSupport:n,verifyResponseHash:s,referredOrigin:l,fixedWasmMemory:d}){var u;let m=!1,b=!1;this.writableDataPath=this.getWritableDataPath(t),this.resourcePath=`${a}${this.resourceFilesSubfolder}/`,self.path=e;let{resolve:v,reject:F,promise:J}=new he,q=ve.sdkVersion();if(q==="")throw new ce({name:"Invalid library version",message:"Library version is not defined or empty, cannot generate proper path to library files."});let[Y,y]=await Promise.all([Lt(),Tt()]);r!=="auto"&&(y=r==="on"),n!=="auto"&&(Y=n==="on");let O=this.getWasmCoreFileName(Y,y),me=At(q,a,O),{jsURI:Ne,wasmURI:ft}=me,oa={instantiateWasm:(T,sa)=>(Ct({importObject:T,wasmURI:ft,expectedHash:this.getWasmCoreExpectedHash(Y,y),verifyResponseHash:s,successCallback:sa,progressCallback:this._loadProgressCallback,errorCallback:la=>{F(la)},referredOrigin:l}),{})},pe=d===null?null:new WebAssembly.Memory({initial:this.numOfMBToPages(d),maximum:this.numOfMBToPages(300),shared:y});return pe!==null&&c.log(c.Level.Debug,"Fixed wasmMemory set",pe),this.moduleHandler.set({...pe?{wasmMemory:pe}:{},mainScriptUrlOrBlob:Ne,canvas:(u=this.workerFunctions.getOffscreenCanvas())!=null?u:{getContext:()=>null},...oa,dynamicLibraries:this.getWasmDynamicLibraries(ft),locateFile:T=>a+T,noInitialRun:!0,preRun:[async()=>{try{await Ht({writableDataPath:this.writableDataPath})}catch(T){if(T.name==="BlockedIndexedDB"){F(T.toString());return}c.log(c.Level.Debug,"No IndexedDB support, some data will not be persisted:",T)}b=!0,this.start(b,m,v)}],onMainComplete:()=>{if([m,b].includes(!1)){c.log(c.Level.Warn,{runtimeLoaded:m,fileSystemSynced:b},"Both runtimeLoaded and fileSystemSynced should be true when calling onMainComplete"),F("onMainComplete has been called but runtime or file system was not ready.");return}v()},onRuntimeInitialized:()=>{m=!0,this.start(b,m,v)},print:T=>{c.log(c.Level.Info,T)}}),await It(Ne,q)||F(`Couldn\'t retrieve Scandit Data Capture library at ${Ne}, did you configure the path for it correctly?`),J}};Dt.get3dPartyLicenseKeyMethodName=atob("Z2V0QmxpbmtJZExpY2Vuc2VLZXk=");var te=Dt;o();function Rt(i){return typeof i=="object"&&i!=null&&i.document==null&&"addEventListener"in i&&typeof i.importScripts=="function"}o();function Bt(i){console.warn("Reached unexpected case",i)}var Te=class{constructor(i,a){this.onMessageListener=this.onMessage.bind(this),this.workerSelf=i,this.dataCaptureInstance=new te(a,{postMessage:this.postMessage.bind(this),getOffscreenCanvas:this.getOffscreenCanvas.bind(this)}),Rt(i)&&(Pt(i),this.listenToMessages())}listenToMessages(){this.workerSelf.addEventListener("message",this.onMessageListener),this.workerSelf.addEventListener("error",i=>{c.log(c.Level.Error,i)}),this.workerSelf.addEventListener("messageerror",i=>{c.log(c.Level.Error,i)})}postMessage(i,a){this.workerSelf.postMessage(i,a!=null?a:[])}getOffscreenCanvas(){if(this.isOffscreenCanvasSupported())return new this.workerSelf.OffscreenCanvas(32,32)}isOffscreenCanvasSupported(){return typeof this.workerSelf.OffscreenCanvas=="function"}hasPayload(i){return K(i)&&"payload"in i}hasTransferables(i){return K(i)&&Array.isArray(i.transferables)}async respondWith(i,a,e){let t=null,r;try{r=e(),r instanceof Promise&&(r=await r)}catch(s){r=void 0,t=Z(s)}let n={type:"workerTaskId",command:i,id:a,payload:this.hasPayload(r)?r.payload:void 0};t!=null&&(n.error=t),this.postMessage(n,this.hasTransferables(r)?r.transferables:[])}onMessage(i){switch(i.data.command){case"loadLibrary":{{let{data:a}=i;this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.loadLibrary({libraryLocation:a.libraryLocation,locationPath:a.locationPath,referredOrigin:a.referredOrigin,writableDataPathOverride:a.writableDataPathOverride,overrideThreadsSupport:a.overrideThreadsSupport,overrideSimdSupport:a.overrideSimdSupport,verifyResponseHash:a.verifyResponseHash,fixedWasmMemory:a.fixedWasmMemory}))}break}case"onTap":{{let{data:a}=i;this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.onTap(a.point)})}break}case"hintPresenterV2update":{{let{data:a}=i;this.respondWith(a.command,a.id,async()=>{this.dataCaptureInstance.hintPresenterV2Update()})}break}case"createContext":{{let{data:a}=i;this.respondWith(a.command,a.id,()=>this.dataCaptureInstance.createContext({context:a.context,deviceId:a.deviceId,delayedRegistration:a.delayedRegistration,highEndBlurryRecognition:a.highEndBlurryRecognition,appName:a.appName,parentDomain:a.parentDomain}))}break}case"setFrameSource":{{let{data:a}=i;this.respondWith(a.command,a.id,()=>this.dataCaptureInstance.setFrameSource(a.mirrorAxis,a.isCameraFrameSource))}break}case"processFrame":{{let{data:a}=i;this.respondWith(a.command,a.id,()=>this.dataCaptureInstance.processFrame({data:a.data,width:a.width,height:a.height,colorType:a.colorType}))}break}case"requestFrameData":{{let{data:a}=i;this.respondWith(a.command,a.id,()=>this.dataCaptureInstance.requestFrameData(a.frameId))}break}case"deleteFrameData":{{let{data:a}=i;this.respondWith(a.command,a.id,()=>{this.dataCaptureInstance.deleteFrameData(a.frameId)})}break}case"updateContext":{{let{data:a}=i;this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.updateContext(a))}break}case"dispose":{this.respondWith(i.data.command,i.data.id,()=>this.dataCaptureInstance.dispose());break}case"flushAnalytics":{this.respondWith(i.data.command,i.data.id,()=>{this.dataCaptureInstance.flushAnalytics()});break}case"reportCameraProperties":{{let{data:a}=i;this.respondWith(a.command,a.id,async()=>this.dataCaptureInstance.reportCameraProperties(a))}break}case"setLogLevel":{{let{data:a}=i;this.respondWith(a.command,a.id,()=>{c.setLevel(a.level)})}break}case"extractCentaurusLicense":{{let{data:a}=i;this.respondWith(a.command,a.id,()=>this.dataCaptureInstance.extractCentaurusLicense(a.licenseKey))}break}case"documentVisibility":{{let{data:a}=i;this.respondWith(a.command,a.id,()=>{this.dataCaptureInstance.onDocumentVisibilityChange(a.state)})}break}case"isFeatureSupported":{{let{data:a}=i;this.respondWith(a.command,a.id,()=>this.dataCaptureInstance.isFeatureSupported(a.feature))}break}case"getViewfinderInfo":{{let{data:a}=i;this.respondWith(a.command,a.id,()=>this.dataCaptureInstance.getViewfinderInfo())}break}case"getOpenSourceSoftwareLicenseInfo":{{let{data:a}=i;this.respondWith(a.command,a.id,()=>this.dataCaptureInstance.getOpenSourceSoftwareLicenseInfo())}break}case"addNativeOverlay":this.dataCaptureInstance.addNativeOverlay(i);break;case"removeNativeOverlay":this.dataCaptureInstance.removeNativeOverlay(i);break;case"convertToJPEGResult":{{let{data:a}=i;this.dataCaptureInstance.convertToJPEGResult(a.imageId,a.result)}break}default:return Bt(i.data),!1}return!0}};o();o();o();var h=class{constructor(){this.handleToNativeImplementationMap=new Map;this.nativeImplementationToHandleMap=new WeakMap}get Module(){return Et.Module}mapNativeImplementationToHandle(a){this.handleToNativeImplementationMap.set(this.handle.id,a),this.nativeImplementationToHandleMap.set(a,this.handle);let e={...this.handle};return this.handle={...e,id:e.id+1},e}nativeImplementationFromHandle(a){let e=this.handleToNativeImplementationMap.get(a.id);if(!e)throw new Error("Invalid handle.");return e}handleFromNativeImplementation(a){let e=this.nativeImplementationToHandleMap.get(a);if(e==null)throw new Error("Invalid native implementation.");return e}};o();o();o();o();function Wt(i){return{off:0,auto:1}[i]}o();o();o();var De=class extends h{constructor(){super(...arguments);this.handle={className:"LabelFieldLocation",id:0}}async createWithType(e){let t=this.Module.LabelFieldLocation.createWithType(e);return this.mapNativeImplementationToHandle(t)}async createWithRect(e){let t=this.Module.LabelFieldLocation.createWithRect(e);return this.mapNativeImplementationToHandle(t)}async getLabelFieldLocationType(e){throw new Error("This method must be implemented manually.")}async getRect(e){throw new Error("This method must be implemented manually.")}},D=new De;var Me=class extends h{constructor(){super(...arguments);this.handle={className:"CustomBarcode",id:0}}async create(e,t){let r=this.Module.CustomBarcode.create(e,t);return this.mapNativeImplementationToHandle(r)}async getName(e){return this.nativeImplementationFromHandle(e).getName()}async isOptional(e){return this.nativeImplementationFromHandle(e).isOptional()}async setOptional(e,t){this.nativeImplementationFromHandle(e).setOptional(t)}async getValueRegexes(e){return this.nativeImplementationFromHandle(e).getPatterns()}async setValueRegexes(e,t){this.nativeImplementationFromHandle(e).setPatterns(t)}async getLocation(e){throw new Error("This method must be implemented manually.")}async getSymbologies(e){return this.nativeImplementationFromHandle(e).getSymbologies()}async setSymbologies(e,t){throw new Error("This method must be implemented manually.")}async setLocation(e,t){this.nativeImplementationFromHandle(e).setLocation(D.nativeImplementationFromHandle(t))}async getAnchorRegexes(e){return this.nativeImplementationFromHandle(e).getDataTypePatterns()}async setAnchorRegexes(e,t){this.nativeImplementationFromHandle(e).setDataTypePatterns(t)}async getHiddenProperties(e){return this.nativeImplementationFromHandle(e).getHiddenProperties()}async setHiddenProperties(e,t){this.nativeImplementationFromHandle(e).setHiddenProperties(t)}async asLabelFieldDefinition(e){throw new Error("This method must be implemented manually.")}},ae=new Me;o();var Re=class extends h{constructor(){super(...arguments);this.handle={className:"CustomText",id:0}}async create(e){let t=this.Module.CustomText.create(e);return this.mapNativeImplementationToHandle(t)}async getName(e){return this.nativeImplementationFromHandle(e).getName()}async isOptional(e){return this.nativeImplementationFromHandle(e).isOptional()}async setOptional(e,t){this.nativeImplementationFromHandle(e).setOptional(t)}async getValueRegexes(e){return this.nativeImplementationFromHandle(e).getPatterns()}async setValueRegexes(e,t){this.nativeImplementationFromHandle(e).setPatterns(t)}async getLocation(e){throw new Error("This method must be implemented manually.")}async setLocation(e,t){this.nativeImplementationFromHandle(e).setLocation(D.nativeImplementationFromHandle(t))}async getAnchorRegexes(e){return this.nativeImplementationFromHandle(e).getDataTypePatterns()}async setAnchorRegexes(e,t){this.nativeImplementationFromHandle(e).setDataTypePatterns(t)}async getHiddenProperties(e){return this.nativeImplementationFromHandle(e).getHiddenProperties()}async setHiddenProperties(e,t){this.nativeImplementationFromHandle(e).setHiddenProperties(t)}async asLabelFieldDefinition(e){throw new Error("This method must be implemented manually.")}},ie=new Re;o();var Be=class extends h{constructor(){super(...arguments);this.handle={className:"ExpiryDateText",id:0}}async create(e){let t=this.Module.ExpiryDateText.create(e);return this.mapNativeImplementationToHandle(t)}async getName(e){return this.nativeImplementationFromHandle(e).getName()}async isOptional(e){return this.nativeImplementationFromHandle(e).isOptional()}async setOptional(e,t){this.nativeImplementationFromHandle(e).setOptional(t)}async getValueRegexes(e){return this.nativeImplementationFromHandle(e).getPatterns()}async setValueRegexes(e,t){this.nativeImplementationFromHandle(e).setPatterns(t)}async getHiddenProperties(e){return this.nativeImplementationFromHandle(e).getHiddenProperties()}async setHiddenProperties(e,t){this.nativeImplementationFromHandle(e).setHiddenProperties(t)}async asLabelFieldDefinition(e){return this.nativeImplementationFromHandle(e).asLabelFieldDefinition()}async setLabelDateFormat(e,t){this.nativeImplementationFromHandle(e).setLabelDateFormat(t)}async getLabelDateFormat(e){return this.nativeImplementationFromHandle(e).getLabelDateFormat()}async getLocation(e){return this.nativeImplementationFromHandle(e).getLocation()}async setLocation(e,t){this.nativeImplementationFromHandle(e).setLocation(t)}async getAnchorRegexes(e){return this.nativeImplementationFromHandle(e).getDataTypePatterns()}async setAnchorRegexes(e,t){this.nativeImplementationFromHandle(e).setDataTypePatterns(t)}async resetDataTypePatterns(e){this.nativeImplementationFromHandle(e).resetDataTypePatterns()}},re=new Be;o();var Ee=class extends h{constructor(){super(...arguments);this.handle={className:"ImeiOneBarcode",id:0}}async create(e){let t=this.Module.ImeiOneBarcode.create(e);return this.mapNativeImplementationToHandle(t)}async getName(e){return this.nativeImplementationFromHandle(e).getName()}async isOptional(e){return this.nativeImplementationFromHandle(e).isOptional()}async setOptional(e,t){this.nativeImplementationFromHandle(e).setOptional(t)}async getValueRegexes(e){return this.nativeImplementationFromHandle(e).getPatterns()}async setValueRegexes(e,t){this.nativeImplementationFromHandle(e).setPatterns(t)}async getSymbologies(e){return this.nativeImplementationFromHandle(e).getSymbologies()}async setSymbologies(e,t){this.nativeImplementationFromHandle(e).setSymbologies(t)}async getHiddenProperties(e){return this.nativeImplementationFromHandle(e).getHiddenProperties()}async setHiddenProperties(e,t){this.nativeImplementationFromHandle(e).setHiddenProperties(t)}async getLocation(e){throw new Error("This method must be implemented manually.")}async setLocation(e,t){throw new Error("This method must be implemented manually.")}async getAnchorRegexes(e){return this.nativeImplementationFromHandle(e).getDataTypePatterns()}async setAnchorRegexes(e,t){this.nativeImplementationFromHandle(e).setDataTypePatterns(t)}async asLabelFieldDefinition(e){throw new Error("This method must be implemented manually.")}},M=new Ee;o();var We=class extends h{constructor(){super(...arguments);this.handle={className:"ImeiTwoBarcode",id:0}}async create(e){let t=this.Module.ImeiTwoBarcode.create(e);return this.mapNativeImplementationToHandle(t)}async getName(e){return this.nativeImplementationFromHandle(e).getName()}async isOptional(e){return this.nativeImplementationFromHandle(e).isOptional()}async setOptional(e,t){this.nativeImplementationFromHandle(e).setOptional(t)}async getValueRegexes(e){return this.nativeImplementationFromHandle(e).getPatterns()}async setValueRegexes(e,t){this.nativeImplementationFromHandle(e).setPatterns(t)}async getSymbologies(e){return this.nativeImplementationFromHandle(e).getSymbologies()}async setSymbologies(e,t){this.nativeImplementationFromHandle(e).setSymbologies(t)}async getHiddenProperties(e){return this.nativeImplementationFromHandle(e).getHiddenProperties()}async setHiddenProperties(e,t){this.nativeImplementationFromHandle(e).setHiddenProperties(t)}async getLocation(e){throw new Error("This method must be implemented manually.")}async setLocation(e,t){throw new Error("This method must be implemented manually.")}async getAnchorRegexes(e){return this.nativeImplementationFromHandle(e).getDataTypePatterns()}async setAnchorRegexes(e,t){this.nativeImplementationFromHandle(e).setDataTypePatterns(t)}async asLabelFieldDefinition(e){throw new Error("This method must be implemented manually.")}},R=new We;o();var ke=class extends h{constructor(){super(...arguments);this.handle={className:"PackingDateText",id:0}}async create(e){let t=this.Module.PackingDateText.create(e);return this.mapNativeImplementationToHandle(t)}async getName(e){return this.nativeImplementationFromHandle(e).getName()}async isOptional(e){return this.nativeImplementationFromHandle(e).isOptional()}async setOptional(e,t){this.nativeImplementationFromHandle(e).setOptional(t)}async getValueRegexes(e){return this.nativeImplementationFromHandle(e).getPatterns()}async setValueRegexes(e,t){this.nativeImplementationFromHandle(e).setPatterns(t)}async getHiddenProperties(e){return this.nativeImplementationFromHandle(e).getHiddenProperties()}async setHiddenProperties(e,t){this.nativeImplementationFromHandle(e).setHiddenProperties(t)}async asLabelFieldDefinition(e){throw new Error("This method must be implemented manually.")}async setLabelDateFormat(e,t){throw new Error("setLabelDateFormat must be implemented manually.")}async getLabelDateFormat(e){throw new Error("getLabelDateFormat must be implemented manually.")}async getLocation(e){throw new Error("This method must be implemented manually.")}async setLocation(e,t){throw new Error("This method must be implemented manually.")}async getAnchorRegexes(e){return this.nativeImplementationFromHandle(e).getDataTypePatterns()}async setAnchorRegexes(e,t){this.nativeImplementationFromHandle(e).setDataTypePatterns(t)}async resetDataTypePatterns(e){throw new Error("resetDataTypePatterns must be implemented manually.")}},ne=new ke;o();var Ve=class extends h{constructor(){super(...arguments);this.handle={className:"PartNumberBarcode",id:0}}async create(e){let t=this.Module.PartNumberBarcode.create(e);return this.mapNativeImplementationToHandle(t)}async getName(e){return this.nativeImplementationFromHandle(e).getName()}async isOptional(e){return this.nativeImplementationFromHandle(e).isOptional()}async setOptional(e,t){this.nativeImplementationFromHandle(e).setOptional(t)}async getValueRegexes(e){return this.nativeImplementationFromHandle(e).getPatterns()}async setValueRegexes(e,t){this.nativeImplementationFromHandle(e).setPatterns(t)}async getSymbologies(e){return this.nativeImplementationFromHandle(e).getSymbologies()}async setSymbologies(e,t){this.nativeImplementationFromHandle(e).setSymbologies(t)}async getHiddenProperties(e){return this.nativeImplementationFromHandle(e).getHiddenProperties()}async setHiddenProperties(e,t){this.nativeImplementationFromHandle(e).setHiddenProperties(t)}async getLocation(e){throw new Error("This method must be implemented manually.")}async setLocation(e,t){throw new Error("This method must be implemented manually.")}async getAnchorRegexes(e){return this.nativeImplementationFromHandle(e).getDataTypePatterns()}async setAnchorRegexes(e,t){this.nativeImplementationFromHandle(e).setDataTypePatterns(t)}async asLabelFieldDefinition(e){throw new Error("This method must be implemented manually.")}},B=new Ve;o();var _e=class extends h{constructor(){super(...arguments);this.handle={className:"SerialNumberBarcode",id:0}}async create(e){let t=this.Module.SerialNumberBarcode.create(e);return this.mapNativeImplementationToHandle(t)}async getName(e){return this.nativeImplementationFromHandle(e).getName()}async isOptional(e){return this.nativeImplementationFromHandle(e).isOptional()}async setOptional(e,t){this.nativeImplementationFromHandle(e).setOptional(t)}async getValueRegexes(e){return this.nativeImplementationFromHandle(e).getPatterns()}async setValueRegexes(e,t){this.nativeImplementationFromHandle(e).setPatterns(t)}async getSymbologies(e){return this.nativeImplementationFromHandle(e).getSymbologies()}async setSymbologies(e,t){this.nativeImplementationFromHandle(e).setSymbologies(t)}async getHiddenProperties(e){return this.nativeImplementationFromHandle(e).getHiddenProperties()}async setHiddenProperties(e,t){this.nativeImplementationFromHandle(e).setHiddenProperties(t)}async getLocation(e){throw new Error("This method must be implemented manually.")}async setLocation(e,t){throw new Error("This method must be implemented manually.")}async getAnchorRegexes(e){return this.nativeImplementationFromHandle(e).getDataTypePatterns()}async setAnchorRegexes(e,t){this.nativeImplementationFromHandle(e).setDataTypePatterns(t)}async asLabelFieldDefinition(e){throw new Error("This method must be implemented manually.")}},E=new _e;o();var Je=class extends h{constructor(){super(...arguments);this.handle={className:"TotalPriceText",id:0}}async create(e){let t=this.Module.TotalPriceText.create(e);return this.mapNativeImplementationToHandle(t)}async getName(e){return this.nativeImplementationFromHandle(e).getName()}async isOptional(e){return this.nativeImplementationFromHandle(e).isOptional()}async setOptional(e,t){this.nativeImplementationFromHandle(e).setOptional(t)}async getValueRegexes(e){return this.nativeImplementationFromHandle(e).getPatterns()}async setValueRegexes(e,t){this.nativeImplementationFromHandle(e).setPatterns(t)}async getHiddenProperties(e){return this.nativeImplementationFromHandle(e).getHiddenProperties()}async setHiddenProperties(e,t){this.nativeImplementationFromHandle(e).setHiddenProperties(t)}async getLocation(e){throw new Error("This method must be implemented manually.")}async setLocation(e,t){throw new Error("This method must be implemented manually.")}async getAnchorRegexes(e){return this.nativeImplementationFromHandle(e).getDataTypePatterns()}async setAnchorRegexes(e,t){this.nativeImplementationFromHandle(e).setDataTypePatterns(t)}async resetDataTypePatterns(e){this.nativeImplementationFromHandle(e).resetDataTypePatterns()}async asLabelFieldDefinition(e){throw new Error("This method must be implemented manually.")}},W=new Je;o();var Ue=class extends h{constructor(){super(...arguments);this.handle={className:"UnitPriceText",id:0}}async create(e){let t=this.Module.UnitPriceText.create(e);return this.mapNativeImplementationToHandle(t)}async getName(e){return this.nativeImplementationFromHandle(e).getName()}async isOptional(e){return this.nativeImplementationFromHandle(e).isOptional()}async setOptional(e,t){this.nativeImplementationFromHandle(e).setOptional(t)}async getValueRegexes(e){return this.nativeImplementationFromHandle(e).getPatterns()}async setValueRegexes(e,t){this.nativeImplementationFromHandle(e).setPatterns(t)}async getHiddenProperties(e){return this.nativeImplementationFromHandle(e).getHiddenProperties()}async setHiddenProperties(e,t){this.nativeImplementationFromHandle(e).setHiddenProperties(t)}async getLocation(e){throw new Error("This method must be implemented manually.")}async setLocation(e,t){throw new Error("This method must be implemented manually.")}async getAnchorRegexes(e){return this.nativeImplementationFromHandle(e).getDataTypePatterns()}async setAnchorRegexes(e,t){this.nativeImplementationFromHandle(e).setDataTypePatterns(t)}async resetDataTypePatterns(e){this.nativeImplementationFromHandle(e).resetDataTypePatterns()}async asLabelFieldDefinition(e){throw new Error("This method must be implemented manually.")}},k=new Ue;o();var je=class extends h{constructor(){super(...arguments);this.handle={className:"WeightText",id:0}}async create(e){let t=this.Module.WeightText.create(e);return this.mapNativeImplementationToHandle(t)}async getName(e){return this.nativeImplementationFromHandle(e).getName()}async isOptional(e){return this.nativeImplementationFromHandle(e).isOptional()}async setOptional(e,t){this.nativeImplementationFromHandle(e).setOptional(t)}async getValueRegexes(e){return this.nativeImplementationFromHandle(e).getPatterns()}async setValueRegexes(e,t){this.nativeImplementationFromHandle(e).setPatterns(t)}async getHiddenProperties(e){return this.nativeImplementationFromHandle(e).getHiddenProperties()}async setHiddenProperties(e,t){this.nativeImplementationFromHandle(e).setHiddenProperties(t)}async getLocation(e){throw new Error("This method must be implemented manually.")}async setLocation(e,t){throw new Error("This method must be implemented manually.")}async getAnchorRegexes(e){return this.nativeImplementationFromHandle(e).getDataTypePatterns()}async setAnchorRegexes(e,t){this.nativeImplementationFromHandle(e).setDataTypePatterns(t)}async resetDataTypePatterns(e){this.nativeImplementationFromHandle(e).resetDataTypePatterns()}async asLabelFieldDefinition(e){throw new Error("This method must be implemented manually.")}},V=new je;var Ge=class extends h{constructor(){super(...arguments);this.handle={className:"LabelFieldDefinition",id:0};this.concreteImplementationRegistry=new Map([["CustomBarcode",ae],["CustomText",ie],["ExpiryDateText",re],["ImeiOneBarcode",M],["ImeiTwoBarcode",R],["PackingDateText",ne],["PartNumberBarcode",B],["SerialNumberBarcode",E],["TotalPriceText",W],["UnitPriceText",k],["WeightText",V]])}nativeImplementationFromHandle(e){let t=this.concreteImplementationRegistry.get(e.className);if(!t)throw new Error("Handle doesn\'t point to a concrete implementation of LabelFieldDefinition.");return t.nativeImplementationFromHandle(e)}async getName(e){return this.nativeImplementationFromHandle(e).getName()}async isOptional(e){return this.nativeImplementationFromHandle(e).isOptional()}async setOptional(e,t){throw new Error("This method must be implemented manually.")}async getValueRegexes(e){return this.nativeImplementationFromHandle(e).getPatterns()}async setValueRegexes(e,t){throw new Error("This method must be implemented manually.")}async getHiddenProperties(e){throw new Error("This method must be implemented manually.")}async setHiddenProperties(e,t){throw new Error("This method must be implemented manually.")}async getLocation(e){throw new Error("This method must be implemented manually.")}async setLocation(e,t){throw new Error("This method must be implemented manually.")}async getAnchorRegexes(e){throw new Error("This method must be implemented manually.")}async setAnchorRegexes(e,t){throw new Error("This method must be implemented manually.")}},kt=new Ge;var ze=class extends h{constructor(){super(...arguments);this.handle={className:"LabelDefinition",id:0}}async create(e,t){let r=this.Module.LabelDefinition.create(e,t.map(n=>kt.nativeImplementationFromHandle(n)));return this.mapNativeImplementationToHandle(r)}async getName(e){return this.nativeImplementationFromHandle(e).getName()}async getFieldDefinitions(e){return this.nativeImplementationFromHandle(e).getFieldDefinitions()}async createVinLabelDefinition(e){let t=this.Module.LabelDefinition.createVinLabelDefinition(e);return this.mapNativeImplementationToHandle(t)}async createPriceCaptureDefinition(e){let t=this.Module.LabelDefinition.createPriceCaptureDefinition(e);return this.mapNativeImplementationToHandle(t)}async getHiddenProperties(e){return this.nativeImplementationFromHandle(e).getHiddenProperties()}async setHiddenProperties(e,t){this.nativeImplementationFromHandle(e).setHiddenProperties(t)}async setAdaptiveRecognitionMode(e,t){let r=this.nativeImplementationFromHandle(e),n=Wt(t);r.setAdaptiveRecognitionMode(n)}},H=new ze;var qe=i=>i.result!=null&&i.error==null,$e=class extends h{constructor(){super(...arguments);this.handle={className:"LabelCaptureSettings",id:0}}async loadFromString(e){let t=this.Module.LabelCaptureSettings.loadFromString(e);if(!qe(t))throw new Error(t.error);let r=t.result;return this.mapNativeImplementationToHandle(r)}async createFromLabelDefinitions(e){let t=this.Module.LabelCaptureSettings.createFromLabelDefinitions(e.map(n=>H.nativeImplementationFromHandle(n)));if(!qe(t))throw new Error(t.error);let r=t.result;return this.mapNativeImplementationToHandle(r)}async create(e,t,r){let n=this.Module.LabelCaptureSettings.create(e.map(l=>H.nativeImplementationFromHandle(l)),t,r);if(!qe(n))throw new Error(n.error);let s=n.result;return this.mapNativeImplementationToHandle(s)}async setLocationSelection(e,t){this.nativeImplementationFromHandle(e).setLocationSelection(t)}async getLocationSelection(e){throw new Error("This method must be implemented manually.")}async getLicenseKey(e){return this.nativeImplementationFromHandle(e).getLicenseKey()}async setLicenseKey(e,t){this.nativeImplementationFromHandle(e).setLicenseKey(t)}async getLicensee(e){return this.nativeImplementationFromHandle(e).getLicensee()}async setLicensee(e,t){this.nativeImplementationFromHandle(e).setLicensee(t)}async getIntProperty(e,t){return this.nativeImplementationFromHandle(e).getIntProperty(t)}async setIntProperty(e,t,r){this.nativeImplementationFromHandle(e).setIntProperty(t,r)}async getBlueprintJson(e){return this.nativeImplementationFromHandle(e).getBlueprintJson()}},A=new $e;o();function Vt(i,a){return new Promise((e,t)=>{i.then({run:r=>{r?e(r):t(new Error(a))}})})}var Xe=class extends h{constructor(){super(...arguments);this.handle={className:"LabelCapture",id:0}}async create(e,t){let r=A.nativeImplementationFromHandle(t),n=this.Module.LabelCapture.create(e,r);return this.mapNativeImplementationToHandle(n)}async isEnabled(e){return this.nativeImplementationFromHandle(e).isEnabled()}async setEnabled(e,t){this.nativeImplementationFromHandle(e).setEnabled(t)}async isAttachedToContext(e){return this.nativeImplementationFromHandle(e).isAttachedToContext()}async addListenerAsync(e,t,r){this.nativeImplementationFromHandle(e).addListenerAsync(t,r)}async removeListenerAsync(e,t){this.nativeImplementationFromHandle(e).removeListenerAsync(t)}async getSession(e){throw new Error("This method must be implemented manually.")}async shouldUseEngineDrivenAnimations(e){return this.nativeImplementationFromHandle(e).shouldUseEngineDrivenAnimations()}async applySettingsWrapped(e,t){let r=this.nativeImplementationFromHandle(e).applySettingsWrapped(t);await Vt(r,"Failed to apply settings")}async getContext(e){return this.nativeImplementationFromHandle(e).getContext()}async registerExternalOcrBackend(e,t){this.nativeImplementationFromHandle(e).registerExternalOcrBackend(t)}},f=new Xe;var Qe=class extends h{constructor(){super(...arguments);this.handle={className:"LabelCaptureAdvancedOverlay",id:0}}async setShouldShowScanAreaGuides(e,t){return this.nativeImplementationFromHandle(e).setShouldShowScanAreaGuides(t)}async getShouldShowScanAreaGuides(e){return this.nativeImplementationFromHandle(e).getShouldShowScanAreaGuides()}async requireArFeatureAvailabilityFromContext(e){return this.nativeImplementationFromHandle(e).requireArFeatureAvailabilityFromContext()}create(e){let t=f.nativeImplementationFromHandle(e),r=this.Module.LabelCaptureAdvancedOverlay.create(t);return this.mapNativeImplementationToHandle(r)}},U=new Qe;o();var Ye=class extends h{constructor(){super(...arguments);this.handle={className:"LabelCaptureBasicOverlay",id:0}}async create(e){let t=f.nativeImplementationFromHandle(e),r=this.Module.LabelCaptureBasicOverlay.create(t);return this.mapNativeImplementationToHandle(r)}async setDefaultFieldBrush(e,t,r){this.nativeImplementationFromHandle(e).setDefaultFieldBrush(t,r)}async getDefaultFieldBrush(e,t){return this.nativeImplementationFromHandle(e).getDefaultFieldBrush(t)}async setDefaultLabelBrush(e,t){this.nativeImplementationFromHandle(e).setDefaultLabelBrush(t)}async getDefaultLabelBrush(e){return this.nativeImplementationFromHandle(e).getDefaultLabelBrush()}async setBrushForField(e,t,r,n){this.nativeImplementationFromHandle(e).setBrushForField(t,r,n)}async setBrushForLabel(e,t,r){this.nativeImplementationFromHandle(e).setBrushForLabel(t,r)}async setListener(e,t){this.nativeImplementationFromHandle(e).setListener(t)}async getListener(e){return this.nativeImplementationFromHandle(e).getListener()}async setShouldShowScanAreaGuides(e,t){this.nativeImplementationFromHandle(e).setShouldShowScanAreaGuides(t)}async getShouldShowScanAreaGuides(e){return this.nativeImplementationFromHandle(e).getShouldShowScanAreaGuides()}async getViewfinder(e){return this.nativeImplementationFromHandle(e).getViewfinder()}async setViewfinder(e,t){this.nativeImplementationFromHandle(e).setViewfinder(t)}},N=new Ye;o();var Ke=class extends h{constructor(){super(...arguments);this.handle={className:"LabelCaptureOverlayHelper",id:0}}addBasicOverlay(e,t){this.Module.LabelCaptureOverlayHelper.addBasicOverlay(e,t)}removeBasicOverlay(e,t){this.Module.LabelCaptureOverlayHelper.removeBasicOverlay(e,t)}addAdvancedOverlay(e,t){this.Module.LabelCaptureOverlayHelper.addAdvancedOverlay(e,t)}removeAdvancedOverlay(e,t){this.Module.LabelCaptureOverlayHelper.removeAdvancedOverlay(e,t)}addValidationFlowOverlay(e,t){this.Module.LabelCaptureOverlayHelper.addValidationFlowOverlay(e,t)}removeValidationFlowOverlay(e,t){this.Module.LabelCaptureOverlayHelper.removeValidationFlowOverlay(e,t)}},j=new Ke;o();o();var Ze=class extends h{constructor(){super(...arguments);this.handle={className:"ValidationFlowSettings",id:0}}setMissingFieldsHintText(e,t){return this.nativeImplementationFromHandle(e).setMissingFieldsHintText(t),Promise.resolve()}getMissingFieldsHintText(e){return Promise.resolve(this.nativeImplementationFromHandle(e).getMissingFieldsHintText())}setStandbyHintText(e,t){return this.nativeImplementationFromHandle(e).setStandbyHintText(t),Promise.resolve()}getStandbyHintText(e){return Promise.resolve(this.nativeImplementationFromHandle(e).getStandbyHintText())}setValidationHintText(e,t){return this.nativeImplementationFromHandle(e).setValidationHintText(t),Promise.resolve()}getValidationHintText(e){return Promise.resolve(this.nativeImplementationFromHandle(e).getValidationHintText())}setValidationErrorText(e,t){return this.nativeImplementationFromHandle(e).setValidationErrorText(t),Promise.resolve()}getValidationErrorText(e){return Promise.resolve(this.nativeImplementationFromHandle(e).getValidationErrorText())}setRequiredFieldErrorText(e,t){return this.nativeImplementationFromHandle(e).setRequiredFieldErrorText(t),Promise.resolve()}getRequiredFieldErrorText(e){return Promise.resolve(this.nativeImplementationFromHandle(e).getRequiredFieldErrorText())}setManualInputButtonText(e,t){return this.nativeImplementationFromHandle(e).setManualInputButtonText(t),Promise.resolve()}getManualInputButtonText(e){return Promise.resolve(this.nativeImplementationFromHandle(e).getManualInputButtonText())}async create(){let e=this.Module.ValidationFlowSettings.create();return this.mapNativeImplementationToHandle(e)}},w=new Ze;var et=class extends h{constructor(){super(...arguments);this.handle={className:"ValidationFlowOverlay",id:0}}async create(e){let t=f.nativeImplementationFromHandle(e),r=this.Module.ValidationFlowOverlay.create(t);return this.mapNativeImplementationToHandle(r)}getLabelViewfinder(e){return Promise.resolve(this.nativeImplementationFromHandle(e).getLabelViewfinder())}getTargetViewfinder(e){return Promise.resolve(this.nativeImplementationFromHandle(e).getTargetViewfinder())}async applySettings(e){let t=w.nativeImplementationFromHandle(e);this.nativeImplementationFromHandle(this.handle).applySettings(t)}},$=new et;var ge=class extends te{constructor(a,e){super(a,e)}getModeDeserializers(){return super.getModeDeserializers()}getWasmSideModuleFileName(){return""}getWasmCoreFileName(a,e){return e?a?"scandit-datacapture-sdk-label-simd-pthreads.wasm":"scandit-datacapture-sdk-label-pthreads.wasm":a?"scandit-datacapture-sdk-label-simd.wasm":"scandit-datacapture-sdk-label.wasm"}getWasmCoreExpectedHash(a,e){return e?a?"7471fdf305eefbfb41cb63ef4e23423ca9186d85eff61f1980c5e7fbbd509818":"1d47e6e618f038926aed670caeb9c6f01f4e1408ee788b26cc0399f5a24c8574":a?"6dd410bdb7c4593f5394af485a50f0a0cec7e6e537c33ed83dd7f54af7807cbd":"42c93e10f58308d8914e03633d3a50a64c741fdca66bbf3e57724346c8b5d1d2"}onBeforeUpdateContextHook(a){var e;return((e=a.context.view)==null?void 0:e.overlays)!=null&&(a.context.view.overlays=void 0),a}addNativeOverlay(a){if(!this.view)throw new Error("View is not set");a.data.overlayHandle.className==="LabelCaptureBasicOverlay"?j.addBasicOverlay(N.nativeImplementationFromHandle(a.data.overlayHandle),this.view):a.data.overlayHandle.className==="LabelCaptureAdvancedOverlay"?j.addAdvancedOverlay(U.nativeImplementationFromHandle(a.data.overlayHandle),this.view):a.data.overlayHandle.className==="ValidationFlowOverlay"&&j.addValidationFlowOverlay($.nativeImplementationFromHandle(a.data.overlayHandle),this.view)}removeNativeOverlay(a){if(!this.view)throw new Error("View is not set");a.data.overlayHandle.className==="LabelCaptureBasicOverlay"?j.removeBasicOverlay(N.nativeImplementationFromHandle(a.data.overlayHandle),this.view):a.data.overlayHandle.className==="LabelCaptureAdvancedOverlay"?j.removeAdvancedOverlay(U.nativeImplementationFromHandle(a.data.overlayHandle),this.view):a.data.overlayHandle.className==="ValidationFlowOverlay"&&j.removeValidationFlowOverlay($.nativeImplementationFromHandle(a.data.overlayHandle),this.view)}getWasmMetadata(){return p}};o();o();o();function _t(){if(typeof self=="object")return!1;let i=(()=>{if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;if(typeof self<"u")return self;throw new Error("No global object found")})();return Object.defineProperty(i,"globalThis",{value:i,writable:!0,configurable:!0}),!0}o();var I=(i=>(i.Pixel="pixel",i.Fraction="fraction",i))(I||{}),P=class Jt{constructor(a,e){this._value=a,this._unit=e}get value(){return this._value}get unit(){return this._unit}static fromJSON(a){return new Jt(a.value,a.unit)}toJSONObject(){return{unit:this.unit,value:this.value}}},fe=class tt{constructor(a,e){this._x=a,this._y=e}static get zero(){return new tt(new P(0,"pixel"),new P(0,"pixel"))}get x(){return this._x}get y(){return this._y}static fromJSON(a){return new tt(P.fromJSON(a.x),P.fromJSON(a.y))}toJSONObject(){return{x:this.x.toJSONObject(),y:this.y.toJSONObject()}}};var Ut=class jt{constructor(a,e){this._width=a,this._height=e}get width(){return this._width}get height(){return this._height}static fromJSON(a){return new jt(P.fromJSON(a.width),P.fromJSON(a.height))}isSameAs(a){return JSON.stringify(this.toJSONObject())===JSON.stringify(a.toJSONObject())}toJSONObject(){return{width:this.width.toJSONObject(),height:this.height.toJSONObject()}}};var be=class{constructor(i,a){this._size=i,this._aspect=a}get size(){return this._size}get aspect(){return this._aspect}},Gt=(i=>(i.WidthAndHeight="widthAndHeight",i.WidthAndAspectRatio="widthAndAspectRatio",i.HeightAndAspectRatio="heightAndAspectRatio",i.ShorterDimensionAndAspectRatio="shorterDimensionAndAspectRatio",i))(Gt||{}),it=class _{constructor(){this._shorterDimensionAndAspectRatio=null}get widthAndHeight(){return this._widthAndHeight}get widthAndAspectRatio(){return this._widthAndAspectRatio}get heightAndAspectRatio(){return this._heightAndAspectRatio}get shorterDimensionAndAspectRatio(){return this._shorterDimensionAndAspectRatio}get sizingMode(){return this.widthAndAspectRatio?"widthAndAspectRatio":this.heightAndAspectRatio?"heightAndAspectRatio":this.shorterDimensionAndAspectRatio?"shorterDimensionAndAspectRatio":"widthAndHeight"}static sizeWithWidthAndHeight(a){let e=new _;return e._widthAndHeight=a,e}static sizeWithWidthAndAspectRatio(a,e){let t=new _;return t._widthAndAspectRatio=new be(a,e),t}static sizeWithHeightAndAspectRatio(a,e){let t=new _;return t._heightAndAspectRatio=new be(a,e),t}static sizeWithShorterDimensionAndAspectRatio(a,e){let t=new _;return t._shorterDimensionAndAspectRatio=new be(a,e),t}static fromJSON(a){if(a.width&&a.height)return _.sizeWithWidthAndHeight(new Ut(P.fromJSON(a.width),P.fromJSON(a.height)));if(a.width&&typeof a.aspect=="number")return _.sizeWithWidthAndAspectRatio(P.fromJSON(a.width),a.aspect);if(a.height&&typeof a.aspect=="number")return _.sizeWithHeightAndAspectRatio(P.fromJSON(a.height),a.aspect);if(a.shorterDimension&&typeof a.aspect=="number")return _.sizeWithShorterDimensionAndAspectRatio(P.fromJSON(a.shorterDimension),a.aspect);throw new Error(`SizeWithUnitAndAspectJSON is malformed: ${JSON.stringify(a)}`)}toJSONObject(){var a,e,t,r,n,s,l,d;switch(this.sizingMode){case"widthAndAspectRatio":return{width:(a=this.widthAndAspectRatio)==null?void 0:a.size.toJSONObject(),aspect:(e=this.widthAndAspectRatio)==null?void 0:e.aspect};case"heightAndAspectRatio":return{height:(t=this.heightAndAspectRatio)==null?void 0:t.size.toJSONObject(),aspect:(r=this.heightAndAspectRatio)==null?void 0:r.aspect};case"shorterDimensionAndAspectRatio":return{shorterDimension:(n=this.shorterDimensionAndAspectRatio)==null?void 0:n.size.toJSONObject(),aspect:(s=this.shorterDimensionAndAspectRatio)==null?void 0:s.aspect};default:return{width:(l=this.widthAndHeight)==null?void 0:l.width.toJSONObject(),height:(d=this.widthAndHeight)==null?void 0:d.height.toJSONObject()}}}},rt=class at{constructor(a,e,t,r){this._left=a,this._top=e,this._right=t,this._bottom=r}static get zero(){return new at(new P(0,"pixel"),new P(0,"pixel"),new P(0,"pixel"),new P(0,"pixel"))}get left(){return this._left}get right(){return this._right}get top(){return this._top}get bottom(){return this._bottom}static fromJSON(a){return new at(P.fromJSON(a.left),P.fromJSON(a.top),P.fromJSON(a.right),P.fromJSON(a.bottom))}toJSONObject(){return{left:this.left.toJSONObject(),right:this.right.toJSONObject(),top:this.top.toJSONObject(),bottom:this.bottom.toJSONObject()}}},x=class S{constructor(a){this.hexadecimalString=a}get redComponent(){return this.hexadecimalString.slice(0,2)}get greenComponent(){return this.hexadecimalString.slice(2,4)}get blueComponent(){return this.hexadecimalString.slice(4,6)}get alphaComponent(){return this.hexadecimalString.slice(6,8)}get red(){return S.hexToNumber(this.redComponent)}get green(){return S.hexToNumber(this.greenComponent)}get blue(){return S.hexToNumber(this.blueComponent)}get alpha(){return S.hexToNumber(this.alphaComponent)}static fromHex(a){return new S(S.normalizeHex(a))}static fromRGBA(a,e,t,r=1){let n=[a,e,t,S.normalizeAlpha(r)].reduce((s,l)=>s+S.numberToHex(l),"");return new S(n)}static areEquals(a,e){return a==null||e==null?!1:a.hexadecimalString===e.hexadecimalString}static hexToNumber(a){return Number.parseInt(a,16)}static fromJSON(a){return S.fromHex(a)}static numberToHex(a){let e=Math.round(a).toString(16);return e.length===1&&(e=`0${e}`),e.toUpperCase()}static normalizeHex(a){let e=a;return e.startsWith("#")&&(e=e.slice(1)),e.length<6&&(e=[...e].map(t=>t+t).join("")),e.length===6&&(e+="FF"),e.toUpperCase()}static normalizeAlpha(a){return a>0&&a<=1?255*a:a}withAlpha(a){let e=this.hexadecimalString.slice(0,6)+S.numberToHex(S.normalizeAlpha(a));return S.fromHex(e)}toJSON(){return this.hexadecimalString}},zt=(i=>(i.Unknown="unknown",i.Portrait="portrait",i.PortraitUpsideDown="portraitUpsideDown",i.LandscapeRight="landscapeRight",i.LandscapeLeft="landscapeLeft",i))(zt||{}),qt=(i=>(i.None="none",i.Horizontal="horizontal",i.LeftToRight="leftToRight",i.RightToLeft="rightToLeft",i.Vertical="vertical",i.TopToBottom="topToBottom",i.BottomToTop="bottomToTop",i))(qt||{}),$t=(i=>(i.TopLeft="topLeft",i.TopCenter="topCenter",i.TopRight="topRight",i.CenterLeft="centerLeft",i.Center="center",i.CenterRight="centerRight",i.BottomLeft="bottomLeft",i.BottomCenter="bottomCenter",i.BottomRight="bottomRight",i))($t||{});o();o();var Xt="PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNTQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTU4IDEwSDI4LjZMMjIuOS41QTEgMSAwIDAgMCAyMiAwSDJhMiAyIDAgMCAwLTIgMnY0NmE2IDYgMCAwIDAgNiA2aDQ4YTYgNiAwIDAgMCA2LTZWMTJhMiAyIDAgMCAwLTItMlptLTM3LjUgOGE0LjUgNC41IDAgMSAxIDAgOSA0LjUgNC41IDAgMCAxIDAtOVptMjcuNCAyNy41YTEgMSAwIDAgMS0uOS41SDEzYTEgMSAwIDAgMS0uOC0xLjVsNy0xMWExIDEgMCAwIDEgMS42LS4xbDUgNiA5LjQtMTVhMSAxIDAgMCAxIDEuMy0uM2wuNC40IDExIDIwYTEgMSAwIDAgMSAwIDFaIi8+PC9zdmc+";o();var Oa=(i=>(i.Rounded="rounded",i.Square="square",i))(Oa||{}),Aa=(i=>(i.Light="light",i.Bold="bold",i))(Aa||{}),Qt=class Yt{constructor(a){this._isLooping=!1,this._isLooping=a}get isLooping(){return this._isLooping}static fromJSON(a){return a===null?null:new Yt(a.looping)}toJSONObject(){return{looping:this.isLooping}}};o();var La=(i=>(i.Minimal="minimal",i.Extended="extended",i))(La||{}),Kt=class{constructor(){this.type="tapToFocus"}toJSONObject(){return{type:this.type}}},Zt=class{constructor(){this.type="swipeToZoom"}toJSONObject(){return{type:this.type}}};var Ta=class{static fromJSON(i){return(i==null?void 0:i.type)==="tapToFocus"?new Kt:null}},Da=class{static fromJSON(i){return(i==null?void 0:i.type)==="swipeToZoom"?new Zt:null}};function nt(i){let a="document"in self?self.document:void 0,e=a==null?void 0:a.createRange().createContextualFragment(i);if(e)return e.firstElementChild}function Ma(i){var a;return{Camera:{Settings:{preferredResolution:i.Camera.Settings.preferredResolution,zoomFactor:i.Camera.Settings.zoomFactor,zoomGestureZoomFactor:i.Camera.Settings.zoomGestureZoomFactor,focusGestureStrategy:i.Camera.Settings.focusGestureStrategy},defaultPosition:(a=i.Camera.defaultPosition)!=null?a:null,availablePositions:i.Camera.availablePositions},SingleImageUploader:{Settings:{iconElement:nt(i.SingleImageUploader.Settings.iconElement),informationElement:nt(i.SingleImageUploader.Settings.informationElement),buttonElement:nt(i.SingleImageUploader.Settings.buttonElement),containerStyle:i.SingleImageUploader.Settings.containerStyle,iconStyle:i.SingleImageUploader.Settings.iconStyle,informationStyle:i.SingleImageUploader.Settings.informationStyle,buttonStyle:i.SingleImageUploader.Settings.buttonStyle,onlyCameraCapture:i.SingleImageUploader.Settings.onlyCameraCapture}},DataCaptureView:{scanAreaMargins:rt.fromJSON(JSON.parse(i.DataCaptureView.scanAreaMargins)),pointOfInterest:fe.fromJSON(JSON.parse(i.DataCaptureView.pointOfInterest)),logoStyle:i.DataCaptureView.logoStyle,logoAnchor:i.DataCaptureView.logoAnchor,logoOffset:fe.fromJSON(JSON.parse(i.DataCaptureView.logoOffset)),focusGesture:Ta.fromJSON(JSON.parse(i.DataCaptureView.focusGesture)),zoomGesture:Da.fromJSON(JSON.parse(i.DataCaptureView.zoomGesture)),cameraRecoveryText:i.DataCaptureView.cameraRecoveryText},LaserlineViewfinder:{width:P.fromJSON(JSON.parse(i.LaserlineViewfinder.width)),enabledColor:x.fromJSON(i.LaserlineViewfinder.enabledColor),disabledColor:x.fromJSON(i.LaserlineViewfinder.disabledColor)},RectangularViewfinder:Object.keys(i.RectangularViewfinder.styles).reduce((e,t)=>{let r=i.RectangularViewfinder.styles[t];return e.styles[t]={size:it.fromJSON(JSON.parse(r.size)),color:x.fromJSON(r.color),style:r.style,lineStyle:r.lineStyle,dimming:Number.parseFloat(r.dimming.toString()),animation:Qt.fromJSON(JSON.parse(r.animation))},e},{defaultStyle:i.RectangularViewfinder.defaultStyle,styles:{}}),AimerViewfinder:{frameColor:x.fromJSON(i.AimerViewfinder.frameColor),dotColor:x.fromJSON(i.AimerViewfinder.dotColor)},Brush:{fillColor:x.fromJSON(i.Brush.fillColor),strokeColor:x.fromJSON(i.Brush.strokeColor),strokeWidth:i.Brush.strokeWidth},Feedback:{defaultVibrationPattern:i.Feedback.defaultVibrationPattern}}}var Pe=Ma({DataCaptureView:{focusGesture:"null",zoomGesture:"null",logoAnchor:"bottomRight",logoStyle:"extended",logoOffset:JSON.stringify({x:{value:0,unit:"fraction"},y:{value:0,unit:"fraction"}}),pointOfInterest:JSON.stringify({x:{value:.5,unit:"fraction"},y:{value:.5,unit:"fraction"}}),scanAreaMargins:JSON.stringify({left:{value:0,unit:"fraction"},right:{value:0,unit:"fraction"},top:{value:0,unit:"fraction"},bottom:{value:0,unit:"fraction"}}),cameraRecoveryText:"(This text is updated from translations)"},Camera:{Settings:{preferredResolution:"hd",zoomFactor:1,focusGestureStrategy:"manualUntilCapture",zoomGestureZoomFactor:2},defaultPosition:"worldFacing",availablePositions:["worldFacing","userFacing"]},SingleImageUploader:{Settings:{iconElement:atob(Xt),informationElement:"<p data-scandit-default>(This text is updated from translations)</p>",buttonElement:"<div data-scandit-default>(This text is updated from translations)</div>",containerStyle:{backgroundColor:"#FFFFFF"},iconStyle:{fill:"#121619"},informationStyle:{color:"#121619",marginBottom:"2em"},buttonStyle:{color:"#FFFFFF",backgroundColor:"#121619",fontWeight:"bold",padding:"1.25em",width:"12em",textAlign:"center",textTransform:"uppercase"},onlyCameraCapture:!1}},LaserlineViewfinder:{width:JSON.stringify({unit:"fraction",value:.8}),enabledColor:"#FFFFFFFF",disabledColor:"#00000000"},AimerViewfinder:{frameColor:"#FFFFFFFF",dotColor:"#FFFFFFCC"},RectangularViewfinder:{defaultStyle:"rounded",styles:{rounded:{size:JSON.stringify({aspect:1,shorterDimension:{unit:"fraction",value:.75}}),color:"#FFFFFFFF",style:"rounded",lineStyle:"light",dimming:0,animation:JSON.stringify({looping:!0})},square:{size:JSON.stringify({aspect:1,shorterDimension:{unit:"fraction",value:.75}}),color:"#FFFFFFFF",style:"square",lineStyle:"light",dimming:0,animation:JSON.stringify({looping:!0})}}},Brush:{fillColor:"#00000000",strokeColor:"#00000000",strokeWidth:0},Feedback:{defaultVibrationPattern:[300]}});o();var oe=class ot{constructor(a=Pe.Brush.fillColor,e=Pe.Brush.strokeColor,t=Pe.Brush.strokeWidth){this.fill={color:a},this.stroke={color:e,width:t}}static get transparent(){let a=x.fromRGBA(255,255,255,0);return new ot(a,a,0)}get fillColor(){return this.fill.color}get strokeColor(){return this.stroke.color}get strokeWidth(){return this.stroke.width}static areEquals(a,e){return a==null||e==null?!1:x.areEquals(a.fill.color,e.fill.color)&&x.areEquals(a.stroke.color,e.stroke.color)&&a.stroke.width===e.stroke.width}toJSONObject(){return{fill:{color:this.fillColor.toJSON()},stroke:{width:this.strokeWidth,color:this.strokeColor.toJSON()}}}static fromJSONObject(a){return new ot(x.fromJSON(a.fill.color),x.fromJSON(a.stroke.color),a.stroke.width)}};_t();function ea(i){return x.fromRGBA(i.r*255,i.g*255,i.b*255,i.a*255)}function G(i){return{r:i.red/255,g:i.green/255,b:i.blue/255,a:i.alpha/255}}function st(i){return oe.fromJSONObject({fill:{color:ea(i.fillColor).toJSON()},stroke:{color:ea(i.strokeColor).toJSON(),width:i.strokeWidth}})}function z(i){let a=i instanceof oe?i:oe.fromJSONObject(i);return{fillColor:G(a.fillColor),strokeColor:G(a.strokeColor),strokeWidth:a.strokeWidth}}o();o();var C=(m=>(m[m.TopLeft=0]="TopLeft",m[m.TopRight=1]="TopRight",m[m.BottomRight=2]="BottomRight",m[m.BottomLeft=3]="BottomLeft",m[m.Top=4]="Top",m[m.Right=5]="Right",m[m.Bottom=6]="Bottom",m[m.Left=7]="Left",m[m.Center=8]="Center",m[m.WholeLabel=9]="WholeLabel",m))(C||{});function ta(i){return{[C.Bottom]:6,[C.BottomLeft]:3,[C.BottomRight]:2,[C.Center]:8,[C.Left]:7,[C.Right]:5,[C.Top]:4,[C.TopLeft]:0,[C.TopRight]:1,[C.WholeLabel]:9}[i]}o();function Ra(i){return{[I.Fraction]:2,[I.Pixel]:0}[i]}function se(i){return{value:i.value,unit:Ra(i.unit)}}o();o();o();var g=(i=>(i.EAN13UPCA="ean13Upca",i.UPCE="upce",i.EAN8="ean8",i.Code39="code39",i.Code93="code93",i.Code128="code128",i.Code11="code11",i.Code25="code25",i.Codabar="codabar",i.InterleavedTwoOfFive="interleavedTwoOfFive",i.MSIPlessey="msiPlessey",i.QR="qr",i.DataMatrix="dataMatrix",i.Aztec="aztec",i.MaxiCode="maxicode",i.DotCode="dotcode",i.KIX="kix",i.RoyalMail4state="royal-mail-4state",i.GS1Databar="databar",i.GS1DatabarExpanded="databarExpanded",i.GS1DatabarLimited="databarLimited",i.PDF417="pdf417",i.MicroPDF417="microPdf417",i.MicroQR="microQr",i.Code32="code32",i.Lapa4SC="lapa4sc",i.IATATwoOfFive="iata2of5",i.MatrixTwoOfFive="matrix2of5",i.USPSIntelligentMail="uspsIntelligentMail",i.ArUco="aruco",i))(g||{}),aa=(i=>(i.A="A",i.B="B",i.C="C",i))(aa||{}),ia=(i=>(i.Mod10="mod10",i.Mod11="mod11",i.Mod16="mod16",i.Mod43="mod43",i.Mod47="mod47",i.Mod103="mod103",i.Mod10AndMod11="mod1110",i.Mod10AndMod10="mod1010",i))(ia||{}),ra=(i=>(i.None="none",i.Unknown="unknown",i.Linked="linked",i.GS1TypeA="gs1TypeA",i.GS1TypeB="gs1TypeB",i.GS1TypeC="gs1TypeC",i))(ra||{});function X(i){return{[g.Aztec]:13,[g.Codabar]:8,[g.Code11]:6,[g.Code128]:5,[g.Code25]:7,[g.Code32]:24,[g.Code39]:3,[g.Code93]:4,[g.DataMatrix]:12,[g.DotCode]:15,[g.EAN13UPCA]:0,[g.EAN8]:2,[g.GS1Databar]:18,[g.GS1DatabarExpanded]:19,[g.GS1DatabarLimited]:20,[g.IATATwoOfFive]:26,[g.InterleavedTwoOfFive]:9,[g.KIX]:16,[g.Lapa4SC]:25,[g.MSIPlessey]:10,[g.MatrixTwoOfFive]:27,[g.MaxiCode]:14,[g.MicroPDF417]:22,[g.MicroQR]:23,[g.PDF417]:21,[g.QR]:11,[g.RoyalMail4state]:17,[g.UPCE]:1,[g.USPSIntelligentMail]:28,[g.ArUco]:29}[i]}o();o();var Ba={[I.Pixel]:0,[I.Fraction]:2},ds={0:I.Pixel,2:I.Fraction,1:I.Pixel};function le(i){let a=Ba[i.unit];return{value:i.value,unit:a}}o();var lt=class extends h{constructor(){super(...arguments);this.handle={className:"AimerViewfinder",id:0}}create(){let e=this.Module.AimerViewfinder.create();return this.mapNativeImplementationToHandle(e)}async setFrameColor(e,t){this.nativeImplementationFromHandle(e).setFrameColor(t)}async getFrameColor(e){return this.nativeImplementationFromHandle(e).getFrameColor()}async setDotColor(e,t){this.nativeImplementationFromHandle(e).setDotColor(t)}async getDotColor(e){return this.nativeImplementationFromHandle(e).getDotColor()}async getDotColorDefault(){return this.Module.AimerViewfinder.getDotColorDefault()}async getFrameColorDefault(){return this.Module.AimerViewfinder.getFrameColorDefault()}},de=new lt;o();var dt=class extends h{constructor(){super(...arguments);this.handle={className:"NoViewfinder",id:0}}create(){let e=this.Module.NoViewfinder.create();return this.mapNativeImplementationToHandle(e)}},mt=new dt;o();var pt=class extends h{constructor(){super(...arguments);this.handle={className:"RectangularViewfinderAnimation",id:0}}create(e){let t=this.Module.RectangularViewfinderAnimation.create(e);return this.mapNativeImplementationToHandle(t)}async isLooping(e){return this.nativeImplementationFromHandle(e).isLooping()}async toJson(e){return this.nativeImplementationFromHandle(e).toJson()}getNativeImplementation(e){return this.nativeImplementationFromHandle(e)}},ct=new pt;o();var ut=class extends h{constructor(){super(...arguments);this.handle={className:"RectangularViewfinder",id:0}}create(){let e=this.Module.RectangularViewfinder.create();return this.mapNativeImplementationToHandle(e)}createForStyles(e,t){let r=this.Module.RectangularViewfinder.createForStyles(e,t);return this.mapNativeImplementationToHandle(r)}async setWidthAndHeight(e,t,r){this.nativeImplementationFromHandle(e).setWidthAndHeight(t,r)}async setWidthAndAspectRatio(e,t,r){this.nativeImplementationFromHandle(e).setWidthAndAspectRatio(t,r)}async setHeightAndAspectRatio(e,t,r){this.nativeImplementationFromHandle(e).setHeightAndAspectRatio(t,r)}async setShorterDimensionAndAspectRatio(e,t,r){this.nativeImplementationFromHandle(e).setShorterDimensionAndAspectRatio(t,r)}async getSizeWithUnitAndAspect(e){return this.nativeImplementationFromHandle(e).getSizeWithUnitAndAspect()}async setColor(e,t){this.nativeImplementationFromHandle(e).setColor(t)}async getColor(e){return this.nativeImplementationFromHandle(e).getColor()}async setDisabledColor(e,t){this.nativeImplementationFromHandle(e).setDisabledColor(t)}async getDisabledColor(e){return this.nativeImplementationFromHandle(e).getDisabledColor()}async getStyle(e){return this.nativeImplementationFromHandle(e).getStyle()}async setAnimation(e,t){this.nativeImplementationFromHandle(e).setAnimation(t)}async getAnimation(e){return this.nativeImplementationFromHandle(e).getAnimation()}async setDimming(e,t){this.nativeImplementationFromHandle(e).setDimming(t)}async getDimming(e){return this.nativeImplementationFromHandle(e).getDimming()}async setDisabledDimming(e,t){this.nativeImplementationFromHandle(e).setDisabledDimming(t)}async getDisabledDimming(e){return this.nativeImplementationFromHandle(e).getDisabledDimming()}async getLineStyle(e){return this.nativeImplementationFromHandle(e).getLineStyle()}},L=new ut;async function na(i){var a,e;if(i.type==="rectangular"){let t=L.createForStyles(i.style==="rounded"?1:0,i.lineStyle==="light"?1:0),r=[];i.size.width&&i.size.height?r.push(L.setWidthAndHeight(t,le(i.size.width),le(i.size.height))):i.size.width&&i.size.aspect?r.push(L.setWidthAndAspectRatio(t,le(i.size.width),i.size.aspect)):i.size.height&&i.size.aspect&&r.push(L.setHeightAndAspectRatio(t,le(i.size.height),i.size.aspect)),r.push(L.setColor(t,G(x.fromJSON(i.color)))),r.push(L.setDisabledColor(t,G(x.fromJSON(i.disabledColor)))),r.push(L.setDimming(t,i.dimming));let n=ct.create((e=(a=i.animation)==null?void 0:a.looping)!=null?e:!1);return r.push(L.setAnimation(t,ct.getNativeImplementation(n))),await Promise.all(r),L.nativeImplementationFromHandle(t)}if(i.type==="aimer"){let t=de.create(),r=[];return r.push(de.setFrameColor(t,G(x.fromJSON(i.frameColor)))),r.push(de.setDotColor(t,G(x.fromJSON(i.dotColor)))),await Promise.all(r),de.nativeImplementationFromHandle(t)}return mt.nativeImplementationFromHandle(mt.create())}o();var ht=class extends h{constructor(){super(...arguments);this.handle={className:"BarcodeField",id:0}}async defaultSymbologies(e){return this.Module.BarcodeField.defaultSymbologies(e)}async getSymbologies(e){throw new Error("This method must be implemented manually.")}async setSymbologies(e,t){throw new Error("This method must be implemented manually.")}async getName(e){throw new Error("This method must be implemented manually.")}async isOptional(e){throw new Error("This method must be implemented manually.")}async setOptional(e,t){throw new Error("This method must be implemented manually.")}async getPatterns(e){throw new Error("This method must be implemented manually.")}async setPatterns(e,t){throw new Error("This method must be implemented manually.")}async getDataTypePatterns(e){throw new Error("This method must be implemented manually.")}async setDataTypePatterns(e,t){throw new Error("This method must be implemented manually.")}async getHiddenProperties(e){throw new Error("This method must be implemented manually.")}async setHiddenProperties(e,t){throw new Error("This method must be implemented manually.")}async getLocation(e){throw new Error("This method must be implemented manually.")}async setLocation(e,t){throw new Error("This method must be implemented manually.")}},Q=new ht;o();var yt=class extends h{constructor(){super(...arguments);this.handle={className:"DateText",id:0}}async create(e,t){let r=this.Module.DateText.create(e,t);return this.mapNativeImplementationToHandle(r)}async getName(e){return this.nativeImplementationFromHandle(e).getName()}async isOptional(e){return this.nativeImplementationFromHandle(e).isOptional()}async setOptional(e,t){this.nativeImplementationFromHandle(e).setOptional(t)}async getValueRegexes(e){return this.nativeImplementationFromHandle(e).getPatterns()}async setValueRegexes(e,t){this.nativeImplementationFromHandle(e).setPatterns(t)}async getHiddenProperties(e){return this.nativeImplementationFromHandle(e).getHiddenProperties()}async setHiddenProperties(e,t){this.nativeImplementationFromHandle(e).setHiddenProperties(t)}async asLabelFieldDefinition(e){return this.nativeImplementationFromHandle(e).asLabelFieldDefinition()}async getLabelDateFormat(e){return this.nativeImplementationFromHandle(e).getLabelDateFormat()}async getAnchorRegexes(e){return this.nativeImplementationFromHandle(e).getDataTypePatterns()}async setAnchorRegexes(e,t){this.nativeImplementationFromHandle(e).setDataTypePatterns(t)}async resetDataTypePatterns(e){this.nativeImplementationFromHandle(e).resetDataTypePatterns()}},vt=new yt;o();var gt=class extends h{constructor(){super(...arguments);this.handle={className:"LabelCaptureHelper",id:0}}async addLabelCaptureToContext(e,t){this.Module.LabelCaptureHelper.addLabelCaptureToContext(e,t)}async removeLabelCaptureFromContext(e,t){this.Module.LabelCaptureHelper.removeLabelCaptureFromContext(e,t)}},bt=new gt;o();var xe=class{constructor(a){this.workerMain=a}onFieldsScanned(a){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnFieldsScanned",payload:{fields:a.map(e=>({labelField:JSON.parse(e.getLabelField().toJson()),valid:e.isValid()}))}})}onScanTimeout(){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnScanTimeout"})}onLabelIsMissingRequiredField(a){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnLabelIsMissingRequiredField",payload:{fields:a.map(e=>({labelField:JSON.parse(e.getLabelField().toJson()),valid:e.isValid()}))}})}onCloudBackupServiceStartedForFields(a){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnCloudBackupServiceStartedForFields",payload:{fields:a.map(e=>({labelField:JSON.parse(e.getLabelField().toJson()),valid:e.isValid()}))}})}onCloudBackupServiceFailedForFields(a){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnCloudBackupServiceFailedForFields",payload:{fields:a.map(e=>({labelField:JSON.parse(e.getLabelField().toJson()),valid:e.isValid()}))}})}onStateChanged(a){this.workerMain.postCallbackMessage({type:"validationFlowListenerOnStateChanged",payload:{state:a}})}};var we=class extends Te{constructor(e,t){super(e,t);this.overlayListenerAdded=!1;this.labelBrushMap=new Map;this.fieldBrushMap=new Map;this.dataCaptureInstance=new ge(t,{postMessage:this.postMessage.bind(this),getOffscreenCanvas:this.getOffscreenCanvas.bind(this)}),this.labelCaptureBasicOverlayListener={onLabelTapped:(r,n)=>{this.postCallbackMessage({type:"labelCaptureBasicOverlayOnLabelTapped",payload:{labelJSON:JSON.parse(n.toJson())}})},brushForField:(r,n,s)=>{this.postCallbackMessage({type:"labelCaptureBasicOverlayBrushForField",payload:{fieldJSON:JSON.parse(n.toJson()),labelJSON:JSON.parse(s.toJson())}});let l=this.getFieldIdentifier(s,n);return this.fieldBrushMap.get(l)},brushForLabel:(r,n)=>{this.postCallbackMessage({type:"labelCaptureBasicOverlayBrushForLabel",payload:{labelJSON:JSON.parse(n.toJson())}});let s=this.getLabelIdentifier(n);return this.labelBrushMap.get(s)}},this.validationFlowHandlerListener=new xe(this)}get Module(){return this.dataCaptureInstance.Module}async respondWith(e,t,r){let n=null,s;try{s=r(),s instanceof Promise&&(s=await s)}catch(d){s=void 0,n=Z(d)}let l={type:"workerTaskId",command:e,id:t,payload:this.hasPayload(s)?s.payload:void 0};n!=null&&(l.error=n),this.postMessage(l,this.hasTransferables(s)?s.transferables:[])}postCallbackMessage(e,t){this.postMessage(e,t)}onMessage(e){switch(e.data.command){case"labelCaptureCreate":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>({payload:await f.create(this.dataCaptureInstance.context,t.payload.settingsHandle)})),!0}case"labelCaptureAddToContext":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{await bt.addLabelCaptureToContext(f.nativeImplementationFromHandle(t.payload.labelCaptureHandle),this.dataCaptureInstance.context)}),!0}case"labelCaptureRemoveFromContext":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{await bt.removeLabelCaptureFromContext(f.nativeImplementationFromHandle(t.payload.labelCaptureHandle),this.dataCaptureInstance.context)}),!0}case"labelCaptureIsEnabled":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>({payload:await f.isEnabled(t.payload.labelCaptureHandle)})),!0}case"labelCaptureSetEnabled":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{await f.setEnabled(t.payload.labelCaptureHandle,t.payload.enabled)}),!0}case"labelCaptureApplySettings":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{await f.applySettingsWrapped(t.payload.labelCaptureHandle,A.nativeImplementationFromHandle(t.payload.settingsHandle))}),!0}case"labelCaptureAddListener":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{await f.nativeImplementationFromHandle(t.payload.labelCaptureHandle).addListenerAsync(this,1)}),!0}case"labelCaptureRemoveListener":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{await f.nativeImplementationFromHandle(t.payload.labelCaptureHandle).removeListenerAsync(this)}),!0}case"labelCaptureBuildLabelCaptureSettings":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let{hiddenProperties:r,labelDefinitionHandles:n,labelProperties:s}=t.payload;return{payload:await A.create(n,JSON.stringify(r),s?JSON.stringify(s):"")}}),!0}case"labelCaptureBuildLabelDefinition":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let r=await H.create(t.payload.name,t.payload.fieldDefinitionHandles);return Object.keys(t.payload.hiddenProperties).length>0&&await H.setHiddenProperties(r,JSON.stringify(t.payload.hiddenProperties)),typeof t.payload.adaptiveRecognitionMode<"u"&&await H.setAdaptiveRecognitionMode(r,t.payload.adaptiveRecognitionMode),{payload:r}}),!0}case"labelCaptureBuildVinLabelDefinition":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let r=await H.createVinLabelDefinition(t.payload.name);typeof t.payload.adaptiveRecognitionMode<"u"&&await H.setAdaptiveRecognitionMode(r,t.payload.adaptiveRecognitionMode);let n=H.nativeImplementationFromHandle(r),s=n.getHiddenProperties(),l=n.getFieldDefinitions().map(d=>({name:d.getName(),patterns:d.getPatterns(),isOptional:d.isOptional()}));return{payload:{handle:r,name:n.getName(),hiddenProperties:s,fields:l}}}),!0}case"labelCaptureBuildPriceCaptureDefinition":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let r=await H.createPriceCaptureDefinition(t.payload.name);typeof t.payload.adaptiveRecognitionMode<"u"&&await H.setAdaptiveRecognitionMode(r,t.payload.adaptiveRecognitionMode);let n=H.nativeImplementationFromHandle(r),s=await n.getHiddenProperties(),l=n.getFieldDefinitions().map(d=>({name:d.getName(),patterns:d.getPatterns(),isOptional:d.isOptional()}));return{payload:{handle:r,name:n.getName(),hiddenProperties:s,fields:l}}}),!0}case"labelCaptureBuildCustomBarcode":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let r=await ae.create(t.payload.name,await Q.defaultSymbologies(t.payload.symbologies.map(s=>X(s)))),n=ae.nativeImplementationFromHandle(r);if(n.setOptional(t.payload.isOptional),t.payload.patterns.length>0&&n.setPatterns(t.payload.patterns),t.payload.locationHandle){let s=D.nativeImplementationFromHandle(t.payload.locationHandle);n.setLocation(s)}return t.payload.dataTypePatterns.length>0&&n.setDataTypePatterns(t.payload.dataTypePatterns),Object.keys(t.payload.hiddenProperties).length>0&&n.setHiddenProperties(JSON.stringify(t.payload.hiddenProperties)),{payload:r}}),!0}case"labelCaptureBuildCustomText":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let r=await ie.create(t.payload.name),n=ie.nativeImplementationFromHandle(r);if(n.setOptional(t.payload.isOptional),t.payload.patterns.length>0&&n.setPatterns(t.payload.patterns),t.payload.locationHandle){let s=D.nativeImplementationFromHandle(t.payload.locationHandle);n.setLocation(s)}return t.payload.dataTypePatterns.length>0&&n.setDataTypePatterns(t.payload.dataTypePatterns),Object.keys(t.payload.hiddenProperties).length>0&&n.setHiddenProperties(JSON.stringify(t.payload.hiddenProperties)),{payload:r}}),!0}case"labelCaptureBuildDateText":{let{data:t}=e,{name:r,isOptional:n,patterns:s,labelDateFormat:l,hiddenProperties:d,dataTypePatterns:u,shouldResetDataTypePatterns:m}=t.payload;return this.respondWith(t.command,t.id,async()=>{let b=await vt.create(r,l),v=vt.nativeImplementationFromHandle(b);return v.setOptional(n),s.length>0&&v.setPatterns(s),m?v.resetDataTypePatterns():u&&u.length>0&&v.setDataTypePatterns(u),Object.keys(d).length>0&&v.setHiddenProperties(JSON.stringify(d)),{payload:b}}),!0}case"labelCaptureBuildExpiryDateText":{let{data:t}=e,{name:r,isOptional:n,patterns:s,labelDateFormat:l,hiddenProperties:d,dataTypePatterns:u,shouldResetDataTypePatterns:m}=t.payload;return this.respondWith(t.command,t.id,async()=>{let b=await re.create(r),v=re.nativeImplementationFromHandle(b);return v.setOptional(n),l&&v.setLabelDateFormat(l),s.length>0&&v.setPatterns(s),m?v.resetDataTypePatterns():u&&u.length>0&&v.setDataTypePatterns(u),Object.keys(d).length>0&&v.setHiddenProperties(JSON.stringify(d)),{payload:b}}),!0}case"labelCaptureBuildImeiOneBarcode":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let r=await M.create(t.payload.name);return Object.keys(t.payload.hiddenProperties).length>0&&await M.setHiddenProperties(r,JSON.stringify(t.payload.hiddenProperties)),await M.setOptional(r,t.payload.isOptional),t.payload.patterns.length>0&&await M.setValueRegexes(r,t.payload.patterns),t.payload.dataTypePatterns.length>0&&await M.setAnchorRegexes(r,t.payload.dataTypePatterns),await M.setSymbologies(r,await Q.defaultSymbologies(t.payload.symbologies.map(n=>X(n)))),{payload:r}}),!0}case"labelCaptureBuildImeiTwoBarcode":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let r=await R.create(t.payload.name);return Object.keys(t.payload.hiddenProperties).length>0&&await R.setHiddenProperties(r,JSON.stringify(t.payload.hiddenProperties)),await R.setOptional(r,t.payload.isOptional),t.payload.patterns.length>0&&await R.setValueRegexes(r,t.payload.patterns),t.payload.dataTypePatterns.length>0&&await R.setAnchorRegexes(r,t.payload.dataTypePatterns),await R.setSymbologies(r,await Q.defaultSymbologies(t.payload.symbologies.map(n=>X(n)))),{payload:r}}),!0}case"labelCaptureBuildPackingDateText":{let{data:t}=e,{name:r,isOptional:n,patterns:s,labelDateFormat:l,hiddenProperties:d,dataTypePatterns:u,shouldResetDataTypePatterns:m}=t.payload;return this.respondWith(t.command,t.id,async()=>{let b=await ne.create(r),v=ne.nativeImplementationFromHandle(b);return v.setOptional(n),l&&v.setLabelDateFormat(l),s.length>0&&v.setPatterns(s),m?v.resetDataTypePatterns():u&&u.length>0&&v.setDataTypePatterns(u),Object.keys(d).length>0&&v.setHiddenProperties(JSON.stringify(d)),{payload:b}}),!0}case"labelCaptureBuildPartNumberBarcode":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let r=await B.create(t.payload.name);return Object.keys(t.payload.hiddenProperties).length>0&&await B.setHiddenProperties(r,JSON.stringify(t.payload.hiddenProperties)),await B.setOptional(r,t.payload.isOptional),t.payload.patterns.length>0&&await B.setValueRegexes(r,t.payload.patterns),t.payload.dataTypePatterns.length>0&&await B.setAnchorRegexes(r,t.payload.dataTypePatterns),await B.setSymbologies(r,await Q.defaultSymbologies(t.payload.symbologies.map(n=>X(n)))),{payload:r}}),!0}case"labelCaptureBuildSerialNumberBarcode":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let r=await E.create(t.payload.name);return Object.keys(t.payload.hiddenProperties).length>0&&await E.setHiddenProperties(r,JSON.stringify(t.payload.hiddenProperties)),await E.setOptional(r,t.payload.isOptional),t.payload.patterns.length>0&&await E.setValueRegexes(r,t.payload.patterns),t.payload.dataTypePatterns.length>0&&await E.setAnchorRegexes(r,t.payload.dataTypePatterns),await E.setSymbologies(r,await Q.defaultSymbologies(t.payload.symbologies.map(n=>X(n)))),{payload:r}}),!0}case"labelCaptureBuildTotalPriceText":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let{name:r,isOptional:n,patterns:s,hiddenProperties:l,dataTypePatterns:d,shouldResetDataTypePatterns:u}=t.payload,m=await W.create(r);return Object.keys(l).length>0&&await W.setHiddenProperties(m,JSON.stringify(l)),await W.setOptional(m,n),s.length>0&&await W.setValueRegexes(m,s),u?await W.resetDataTypePatterns(m):d&&d.length>0&&await W.setAnchorRegexes(m,d),{payload:m}}),!0}case"labelCaptureBuildUnitPriceText":{let{data:t}=e,{name:r,isOptional:n,patterns:s,hiddenProperties:l,dataTypePatterns:d,shouldResetDataTypePatterns:u}=t.payload;return this.respondWith(t.command,t.id,async()=>{let m=await k.create(r);return Object.keys(l).length>0&&await k.setHiddenProperties(m,JSON.stringify(l)),await k.setOptional(m,n),s.length>0&&await k.setValueRegexes(m,s),u?await k.resetDataTypePatterns(m):d&&d.length>0&&await k.setAnchorRegexes(m,d),{payload:m}}),!0}case"labelCaptureBuildWeightText":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let{name:r,isOptional:n,patterns:s,hiddenProperties:l,dataTypePatterns:d,shouldResetDataTypePatterns:u}=t.payload,m=await V.create(r);return Object.keys(l).length>0&&await V.setHiddenProperties(m,JSON.stringify(l)),await V.setOptional(m,n),s.length>0&&await V.setValueRegexes(m,s),u?await V.resetDataTypePatterns(m):d&&d.length>0&&await V.setAnchorRegexes(m,d),{payload:m}}),!0}case"labelCaptureSettingsGetLocationSelection":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let n=await A.nativeImplementationFromHandle(t.payload.settingsHandle).getLocationSelection();return{payload:n?JSON.parse(n.toJson()):void 0}}),!0}case"labelCaptureSettingsSetLocationSelection":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{if(t.payload.locationSelection.type==="rectangular"){let r=t.payload.locationSelection,n=this.Module.RectangularLocationSelection.create();if(r.size.width&&r.size.aspect){let l=se(r.size.width);n.setWidthAndAspectRatio(l,r.size.aspect)}if(r.size.height&&r.size.aspect){let l=se(r.size.height);n.setHeightAndAspectRatio(l,r.size.aspect)}if(r.size.width&&r.size.height){let l=se(r.size.width),d=se(r.size.height);n.setWidthAndHeight(l,d)}A.nativeImplementationFromHandle(t.payload.settingsHandle).setLocationSelection(n)}}),!0}case"labelCaptureSettingsGetProperty":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let r=A.nativeImplementationFromHandle(t.payload.settingsHandle);return{payload:(()=>{switch(t.payload.key){case"licenseKey":return r.getLicenseKey();case"licensee":return r.getLicensee();default:return r.getIntProperty(t.payload.key)}})()}}),!0}case"labelCaptureSettingsSetProperty":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let r=A.nativeImplementationFromHandle(t.payload.settingsHandle);switch(t.payload.key){case"licenseKey":typeof t.payload.value=="string"&&await r.setLicenseKey(t.payload.value);break;case"licensee":typeof t.payload.value=="string"&&await r.setLicensee(t.payload.value);break;default:typeof t.payload.value=="number"&&Number.isInteger(t.payload.value)&&await r.setIntProperty(t.payload.key,t.payload.value);break}}),!0}case"labelCaptureSettingsGetBlueprintJson":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>({payload:await A.nativeImplementationFromHandle(t.payload.settingsHandle).getBlueprintJson()})),!0}case"labelCaptureBuildLabelFieldLocation":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let r;if(t.payload.rect)r=await D.createWithRect(t.payload.rect);else if(t.payload.locationType)r=await D.createWithType(ta(t.payload.locationType));else throw new Error("Cannot build a LabelFieldLocation without specifying a rect or locationType");return{payload:r}}),!0}case"labelDefinitionSetAdaptiveRecognitionMode":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{await H.setAdaptiveRecognitionMode(t.payload.labelDefinitionHandle,t.payload.adaptiveRecognitionMode)}),!0}case"labelCaptureBasicOverlayForLabelCapture":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>({payload:await N.create(t.payload.labelCaptureHandle)})),!0}case"labelCaptureBasicOverlaySetDefaultFieldBrush":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{N.setDefaultFieldBrush(t.payload.labelCaptureBasicOverlayHandle,t.payload.labelFieldState,t.payload.brush?z(t.payload.brush):void 0)}),!0}case"labelCaptureBasicOverlayGetDefaultFieldBrush":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let r=await N.getDefaultFieldBrush(t.payload.labelCaptureBasicOverlayHandle,t.payload.labelFieldState);return{payload:r?st(r):void 0}}),!0}case"labelCaptureBasicOverlaySetDefaultLabelBrush":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{N.setDefaultLabelBrush(t.payload.labelCaptureBasicOverlayHandle,t.payload.brush?z(t.payload.brush):void 0)}),!0}case"labelCaptureBasicOverlayGetDefaultLabelBrush":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let r=await N.getDefaultLabelBrush(t.payload.labelCaptureBasicOverlayHandle);return{payload:r?st(r):void 0}}),!0}case"labelCaptureBasicOverlaySetBrushForField":{let{data:t}=e,{brush:r,fieldJSON:n,labelCaptureBasicOverlayHandle:s,labelJSON:l}=t.payload;return this.respondWith(t.command,t.id,async()=>{if(this.overlayListenerAdded){let d=this.getFieldIdentifierFromJSON(l,n);if(r){let u=z(r);this.fieldBrushMap.set(d,u)}else this.fieldBrushMap.delete(d);return}await N.setBrushForField(s,r?z(r):void 0,n,l)}),!0}case"labelCaptureBasicOverlaySetBrushForLabel":{let{data:t}=e,{brush:r,labelCaptureBasicOverlayHandle:n,labelJSON:s}=t.payload;return this.respondWith(t.command,t.id,async()=>{if(this.overlayListenerAdded){let l=this.getLabelIdentifierFromJSON(s);if(r){let d=z(r);this.labelBrushMap.set(l,d)}else this.labelBrushMap.delete(l);return}await N.setBrushForLabel(n,r?z(r):void 0,s)}),!0}case"labelCaptureBasicOverlaySetListener":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{await N.setListener(t.payload.labelCaptureBasicOverlayHandle,this.labelCaptureBasicOverlayListener),this.overlayListenerAdded=!0}),!0}case"labelCaptureBasicOverlaySetShouldShowScanAreaGuides":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{await N.setShouldShowScanAreaGuides(t.payload.labelCaptureBasicOverlayHandle,t.payload.show)}),!0}case"labelCaptureBasicOverlayGetShouldShowScanAreaGuides":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>({payload:await N.getShouldShowScanAreaGuides(t.payload.labelCaptureBasicOverlayHandle)})),!0}case"labelCaptureBasicOverlayGetViewfinder":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>({payload:await N.getViewfinder(t.payload.labelCaptureBasicOverlayHandle)})),!0}case"labelCaptureBasicOverlayUpdateViewfinder":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let r=await na(t.payload.viewfinderJSON);await N.setViewfinder(t.payload.labelCaptureBasicOverlayHandle,r)}),!0}case"addNativeOverlay":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{this.dataCaptureInstance.addNativeOverlay(e)}),!0}case"removeNativeOverlay":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{this.dataCaptureInstance.removeNativeOverlay(e)}),!0}case"labelCaptureAdvancedOverlayForLabelCapture":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>({payload:await U.create(t.payload.labelCaptureHandle)})),!0}case"labelCaptureAdvancedOverlaySetShouldShowScanAreaGuides":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{await U.setShouldShowScanAreaGuides(t.payload.labelCaptureAdvancedOverlayHandle,t.payload.show)}),!0}case"labelCaptureAdvancedOverlayGetShouldShowScanAreaGuides":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>({payload:await U.getShouldShowScanAreaGuides(t.payload.labelCaptureAdvancedOverlayHandle)})),!0}case"validationFlowOverlayForLabelCapture":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>({payload:await $.create(t.payload.labelCaptureHandle)})),!0}case"validationFlowOverlayApplySettings":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let r=$.nativeImplementationFromHandle(t.payload.overlayHandle),n=w.nativeImplementationFromHandle(t.payload.settingsHandle);r.applySettings(n)}),!0}case"validationFlowHandlerCreate":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>(f.nativeImplementationFromHandle(t.payload.labelCaptureHandle).validationFlowHandler().addListener(this.validationFlowHandlerListener),{payload:t.payload.labelCaptureHandle})),!0}case"validationFlowHandlerStartCompleteLabelScan":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{f.nativeImplementationFromHandle(t.payload.labelCaptureHandle).validationFlowHandler().startCompleteLabelScan(t.payload.labelName)}),!0}case"validationFlowHandlerStartPartialLabelScan":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{f.nativeImplementationFromHandle(t.payload.labelCaptureHandle).validationFlowHandler().startPartialLabelScan(t.payload.fieldNames)}),!0}case"validationFlowHandlerUpdateFieldValue":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>({payload:f.nativeImplementationFromHandle(t.payload.labelCaptureHandle).validationFlowHandler().updateFieldValue(t.payload.fieldName,t.payload.value)})),!0}case"validationFlowHandlerFinishFlow":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{let s=f.nativeImplementationFromHandle(t.payload.labelCaptureHandle).validationFlowHandler().finishFlow();return s.type==="error"?{payload:s}:{payload:{type:"result",result:s.result.map(l=>({labelField:JSON.parse(l.getLabelField().toJson()),valid:l.isValid()}))}}}),!0}case"validationFlowHandlerPauseScan":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{f.nativeImplementationFromHandle(t.payload.labelCaptureHandle).validationFlowHandler().pauseScan()}),!0}case"validationFlowHandlerResumeScan":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{f.nativeImplementationFromHandle(t.payload.labelCaptureHandle).validationFlowHandler().resumeScan()}),!0}case"validationFlowHandlerGetValidationFlowFields":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>({payload:f.nativeImplementationFromHandle(t.payload.labelCaptureHandle).validationFlowHandler().validationFlowFields().map(l=>({labelField:JSON.parse(l.getLabelField().toJson()),valid:l.isValid()}))})),!0}case"validationFlowHandlerCancelCloudBackupTaskForField":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{f.nativeImplementationFromHandle(t.payload.labelCaptureHandle).validationFlowHandler().cancelCloudBackupTaskForField(t.payload.fieldName)}),!0}case"validationFlowHandlerUncancelCloudBackupTaskForField":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{f.nativeImplementationFromHandle(t.payload.labelCaptureHandle).validationFlowHandler().uncancelCloudBackupTaskForField(t.payload.fieldName)}),!0}case"validationFlowSettingsCreate":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>({payload:await w.create()})),!0}case"validationFlowSettingsSetMissingFieldsHintText":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{w.nativeImplementationFromHandle(t.payload.settingsHandle).setMissingFieldsHintText(t.payload.text)}),!0}case"validationFlowSettingsGetMissingFieldsHintText":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>({payload:w.nativeImplementationFromHandle(t.payload.settingsHandle).getMissingFieldsHintText()})),!0}case"validationFlowSettingsSetStandbyHintText":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{w.nativeImplementationFromHandle(t.payload.settingsHandle).setStandbyHintText(t.payload.text)}),!0}case"validationFlowSettingsGetStandbyHintText":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>({payload:w.nativeImplementationFromHandle(t.payload.settingsHandle).getStandbyHintText()})),!0}case"validationFlowSettingsSetValidationHintText":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{w.nativeImplementationFromHandle(t.payload.settingsHandle).setValidationHintText(t.payload.text)}),!0}case"validationFlowSettingsGetValidationHintText":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>({payload:w.nativeImplementationFromHandle(t.payload.settingsHandle).getValidationHintText()})),!0}case"validationFlowSettingsSetValidationErrorText":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{w.nativeImplementationFromHandle(t.payload.settingsHandle).setValidationErrorText(t.payload.text)}),!0}case"validationFlowSettingsGetValidationErrorText":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>({payload:w.nativeImplementationFromHandle(t.payload.settingsHandle).getValidationErrorText()})),!0}case"validationFlowSettingsSetRequiredFieldErrorText":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{w.nativeImplementationFromHandle(t.payload.settingsHandle).setRequiredFieldErrorText(t.payload.text)}),!0}case"validationFlowSettingsGetRequiredFieldErrorText":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>({payload:w.nativeImplementationFromHandle(t.payload.settingsHandle).getRequiredFieldErrorText()})),!0}case"validationFlowSettingsSetManualInputButtonText":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>{w.nativeImplementationFromHandle(t.payload.settingsHandle).setManualInputButtonText(t.payload.text)}),!0}case"validationFlowSettingsGetManualInputButtonText":{let{data:t}=e;return this.respondWith(t.command,t.id,async()=>({payload:w.nativeImplementationFromHandle(t.payload.settingsHandle).getManualInputButtonText()})),!0}default:return super.onMessage(e)}}onObservationStarted(){this.postCallbackMessage({type:"labelCaptureOnObservationStarted"})}onObservationStopped(){this.postCallbackMessage({type:"labelCaptureOnObservationStopped"})}onSessionUpdated(e,t,r){this.postCallbackMessage({type:"labelCaptureOnSessionUpdated",payload:{session:JSON.parse(t.toJson()),data:this.dataCaptureInstance.convertToLoadableFrameData(r)}}),r.delete()}getFieldIdentifier(e,t){var r;return`${e.getTrackingId()}-${t.getName()}-${(r=t.getText())!=null?r:""}`}getFieldIdentifierFromJSON(e,t){var r;return`${e.trackingId}-${t.name}-${(r=t.text)!=null?r:""}`}getLabelIdentifier(e){return e.getTrackingId()}getLabelIdentifierFromJSON(e){return e.trackingId}};var Et=new we(self,{get:()=>self.Module,set:i=>{self.Module=i}});function Hl(i){}})();\n'],{type:"application/javascript"})),e=new Worker(i,n);return URL.revokeObjectURL(i),e}var o=class n extends DataCaptureLoader{constructor(){super(...arguments);this._name="BarcodeCapture";}get dataCaptureWorker(){return (this._dataCaptureWorker)!=null||(this._dataCaptureWorker=s({name:this.name})),this._dataCaptureWorker}get name(){return this._name}static async create(e){var a;let t=new n(e);return await t.workerCommand("setLogLevel",{level:(a=e.logLevel)!=null?a:Logger.Level.Debug}),await t.load(),t}async workerCommand(e,t,a){return new Promise((l,d)=>{let r=this.workerCommandId++;this.workerTasks.set(r,{resolve:l,reject:d,command:e});let m={...t,command:e,id:r};this.dataCaptureWorker.postMessage(m,a);})}};
|
|
2
|
+
export{o as a};
|