dynamsoft-barcode-reader-bundle 10.4.3100 → 10.5.1000-iv-singlewasm

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.
Files changed (66) hide show
  1. package/dynamsoft-barcode-reader@10.4.31/dist/DBR-PresetTemplates.json +628 -0
  2. package/dynamsoft-barcode-reader@10.4.31/dist/dbr.d.ts +383 -0
  3. package/dynamsoft-barcode-reader@10.4.31/dist/dbr.esm.js +11 -0
  4. package/dynamsoft-barcode-reader@10.4.31/dist/dbr.js +11 -0
  5. package/dynamsoft-barcode-reader@10.4.31/dist/dbr.mjs +11 -0
  6. package/dynamsoft-camera-enhancer@4.1.1/dist/dce.d.ts +1877 -0
  7. package/dynamsoft-camera-enhancer@4.1.1/dist/dce.esm.js +11 -0
  8. package/dynamsoft-camera-enhancer@4.1.1/dist/dce.js +11 -0
  9. package/dynamsoft-camera-enhancer@4.1.1/dist/dce.mjs +11 -0
  10. package/dynamsoft-camera-enhancer@4.1.1/dist/dce.mobile-native.ui.html +222 -0
  11. package/dynamsoft-camera-enhancer@4.1.1/dist/dce.ui.html +115 -0
  12. package/dynamsoft-capture-vision-router@2.4.33/dist/cvr.d.ts +663 -0
  13. package/dynamsoft-capture-vision-router@2.4.33/dist/cvr.esm.js +2121 -0
  14. package/dynamsoft-capture-vision-router@2.4.33/dist/cvr.js +11 -0
  15. package/dynamsoft-capture-vision-router@2.4.33/dist/cvr.mjs +2121 -0
  16. package/dynamsoft-capture-vision-router@2.4.33/dist/cvr.worker.js +21 -0
  17. package/dynamsoft-capture-vision-std@1.4.21/dist/std.js +1 -0
  18. package/dynamsoft-capture-vision-std@1.4.21/dist/std.wasm +0 -0
  19. package/dynamsoft-code-parser@2.4.32/dist/dcp.d.ts +90 -0
  20. package/dynamsoft-code-parser@2.4.32/dist/dcp.esm.js +11 -0
  21. package/dynamsoft-code-parser@2.4.32/dist/dcp.js +11 -0
  22. package/dynamsoft-code-parser@2.4.32/dist/dcp.worker.js +21 -0
  23. package/dynamsoft-code-parser@2.4.32/dist/specification/AADHAAR.data +0 -0
  24. package/dynamsoft-code-parser@2.4.32/dist/specification/AADHAAR_Map.txt +3 -0
  25. package/dynamsoft-code-parser@2.4.32/dist/specification/AAMVA_DL_ID.data +0 -0
  26. package/dynamsoft-code-parser@2.4.32/dist/specification/AAMVA_DL_ID_WITH_MAG_STRIPE.data +0 -0
  27. package/dynamsoft-code-parser@2.4.32/dist/specification/AAMVA_Map.txt +70 -0
  28. package/dynamsoft-code-parser@2.4.32/dist/specification/MRTD_Map.txt +255 -0
  29. package/dynamsoft-code-parser@2.4.32/dist/specification/MRTD_TD1_ID.data +0 -0
  30. package/dynamsoft-code-parser@2.4.32/dist/specification/MRTD_TD2_FRENCH_ID.data +0 -0
  31. package/dynamsoft-code-parser@2.4.32/dist/specification/MRTD_TD2_ID.data +0 -0
  32. package/dynamsoft-code-parser@2.4.32/dist/specification/MRTD_TD2_VISA.data +0 -0
  33. package/dynamsoft-code-parser@2.4.32/dist/specification/MRTD_TD3_PASSPORT.data +0 -0
  34. package/dynamsoft-code-parser@2.4.32/dist/specification/MRTD_TD3_VISA.data +0 -0
  35. package/dynamsoft-code-parser@2.4.32/dist/specification/SOUTH_AFRICA_DL.data +0 -0
  36. package/dynamsoft-code-parser@2.4.32/dist/specification/SouthAfricaDL_Map.txt +3 -0
  37. package/dynamsoft-code-parser@2.4.32/dist/specification/VIN.data +0 -0
  38. package/dynamsoft-code-parser@2.4.32/dist/specification/VIN_Map.txt +150 -0
  39. package/dynamsoft-core@3.4.31/dist/core.d.ts +1019 -0
  40. package/dynamsoft-core@3.4.31/dist/core.esm.js +11 -0
  41. package/dynamsoft-core@3.4.31/dist/core.js +11 -0
  42. package/dynamsoft-core@3.4.31/dist/core.mjs +11 -0
  43. package/dynamsoft-core@3.4.31/dist/core.worker.js +11 -0
  44. package/dynamsoft-license@3.4.31/dist/dls.license.dialog.html +20 -0
  45. package/dynamsoft-license@3.4.31/dist/license.d.ts +40 -0
  46. package/dynamsoft-license@3.4.31/dist/license.esm.js +11 -0
  47. package/dynamsoft-license@3.4.31/dist/license.js +11 -0
  48. package/dynamsoft-license@3.4.31/dist/license.mjs +11 -0
  49. package/dynamsoft-license@3.4.31/dist/license.worker.js +11 -0
  50. package/dynamsoft-utility@1.4.32/dist/utility.d.ts +118 -0
  51. package/dynamsoft-utility@1.4.32/dist/utility.esm.js +11 -0
  52. package/dynamsoft-utility@1.4.32/dist/utility.js +11 -0
  53. package/dynamsoft-utility@1.4.32/dist/utility.mjs +11 -0
  54. package/dynamsoft-utility@1.4.32/dist/utility.worker.js +11 -0
  55. package/package.json +9 -82
  56. package/API Reference.url +0 -2
  57. package/LEGAL.txt +0 -353
  58. package/LICENSE +0 -4
  59. package/README.html +0 -836
  60. package/README.md +0 -735
  61. package/samples.url +0 -2
  62. /package/{dist → dynamsoft-barcode-reader-bundle@10.4.3100/dist}/dbr.bundle.d.ts +0 -0
  63. /package/{dist → dynamsoft-barcode-reader-bundle@10.4.3100/dist}/dbr.bundle.esm.d.ts +0 -0
  64. /package/{dist → dynamsoft-barcode-reader-bundle@10.4.3100/dist}/dbr.bundle.js +0 -0
  65. /package/{dist → dynamsoft-barcode-reader-bundle@10.4.3100/dist}/dbr.bundle.mjs +0 -0
  66. /package/{dist → dynamsoft-barcode-reader-bundle@10.4.3100/dist}/dbr.no-content-bundle.esm.js +0 -0
@@ -0,0 +1,1019 @@
1
+ interface WorkerAutoResources {
2
+ [key: string]: {
3
+ js?: string[] | boolean;
4
+ wasm?: string[] | boolean;
5
+ deps?: string[];
6
+ };
7
+ }
8
+ interface PostMessageBody {
9
+ needLoadCore?: boolean;
10
+ bLog?: boolean;
11
+ bd?: boolean;
12
+ dm?: string;
13
+ value?: boolean;
14
+ count?: number;
15
+ engineResourcePaths?: EngineResourcePaths;
16
+ autoResources?: WorkerAutoResources;
17
+ names?: string[];
18
+ }
19
+ type PathInfo = {
20
+ version: string;
21
+ path: string;
22
+ isInternal?: boolean;
23
+ };
24
+ type DwtInfo = {
25
+ resourcesPath?: string;
26
+ serviceInstallerLocation?: string;
27
+ };
28
+ interface EngineResourcePaths {
29
+ "rootDirectory"?: string;
30
+ "std"?: string | PathInfo;
31
+ "dip"?: string | PathInfo;
32
+ "dnn"?: string | PathInfo;
33
+ "core"?: string | PathInfo;
34
+ "license"?: string | PathInfo;
35
+ "cvr"?: string | PathInfo;
36
+ "utility"?: string | PathInfo;
37
+ "dbr"?: string | PathInfo;
38
+ "dlr"?: string | PathInfo;
39
+ "ddn"?: string | PathInfo;
40
+ "dcp"?: string | PathInfo;
41
+ "dce"?: string | PathInfo;
42
+ "dlrData"?: string | PathInfo;
43
+ "ddv"?: string | PathInfo;
44
+ "dwt"?: string | DwtInfo;
45
+ }
46
+ interface InnerVersions {
47
+ [key: string]: {
48
+ worker?: string;
49
+ wasm?: string;
50
+ };
51
+ }
52
+ interface WasmVersions {
53
+ "DIP"?: string;
54
+ "DNN"?: string;
55
+ "CORE"?: string;
56
+ "LICENSE"?: string;
57
+ "CVR"?: string;
58
+ "UTILITY"?: string;
59
+ "DBR"?: string;
60
+ "DLR"?: string;
61
+ "DDN"?: string;
62
+ "DCP"?: string;
63
+ }
64
+ interface MapController {
65
+ [key: string]: ((body: any, taskID: number, instanceID?: number) => void);
66
+ }
67
+ type MimeType = "image/png" | "image/jpeg";
68
+
69
+ declare const mapAsyncDependency: {
70
+ [key: string]: any;
71
+ };
72
+ declare const waitAsyncDependency: (depName: string | string[]) => Promise<void>;
73
+ declare const doOrWaitAsyncDependency: (depName: string | string[], asyncFunc: () => Promise<void>) => Promise<void>;
74
+ declare let worker: Worker;
75
+ declare const getNextTaskID: () => number;
76
+ declare const mapTaskCallBack: {
77
+ [key: string]: Function;
78
+ };
79
+ declare let onLog: (message: string) => void | undefined;
80
+ declare const setOnLog: (value: typeof onLog) => void;
81
+ declare let bDebug: boolean;
82
+ declare const setBDebug: (value: boolean) => void;
83
+ declare const innerVersions: InnerVersions;
84
+ declare const mapPackageRegister: {
85
+ [key: string]: any;
86
+ };
87
+ declare const workerAutoResources: WorkerAutoResources;
88
+ declare const loadWasm: (names?: string[] | string) => Promise<void>;
89
+ declare class CoreModule {
90
+ static get engineResourcePaths(): EngineResourcePaths;
91
+ static set engineResourcePaths(value: EngineResourcePaths);
92
+ private static _bSupportDce4Module;
93
+ static get bSupportDce4Module(): number;
94
+ private static _bSupportIRTModule;
95
+ static get bSupportIRTModule(): number;
96
+ private static _versions;
97
+ static get versions(): any;
98
+ static get _onLog(): (message: string) => void;
99
+ static set _onLog(value: (message: string) => void);
100
+ static get _bDebug(): boolean;
101
+ static set _bDebug(value: boolean);
102
+ static _workerName: string;
103
+ /**
104
+ * Determine if the decoding module has been loaded successfully.
105
+ * @category Initialize and Destroy
106
+ */
107
+ static isModuleLoaded(name?: string): boolean;
108
+ static loadWasm(names: string[] | string): Promise<void>;
109
+ /**
110
+ * Detect environment and get a report.
111
+ */
112
+ static detectEnvironment(): Promise<any>;
113
+ /**
114
+ * modify from https://gist.github.com/2107/5529665
115
+ * @ignore
116
+ */
117
+ static browserInfo: any;
118
+ static getModuleVersion(): Promise<WasmVersions>;
119
+ static getVersion(): string;
120
+ static enableLogging(): void;
121
+ static disableLogging(): void;
122
+ static cfd(count: number): Promise<void>;
123
+ }
124
+
125
+ declare enum EnumImageTagType {
126
+ ITT_FILE_IMAGE = 0,
127
+ ITT_VIDEO_FRAME = 1
128
+ }
129
+
130
+ interface ImageTag {
131
+ imageId: number;
132
+ type: EnumImageTagType;
133
+ }
134
+
135
+ declare enum EnumImagePixelFormat {
136
+ IPF_BINARY = 0,
137
+ IPF_BINARYINVERTED = 1,
138
+ IPF_GRAYSCALED = 2,
139
+ IPF_NV21 = 3,
140
+ IPF_RGB_565 = 4,
141
+ IPF_RGB_555 = 5,
142
+ IPF_RGB_888 = 6,
143
+ IPF_ARGB_8888 = 7,
144
+ IPF_RGB_161616 = 8,
145
+ IPF_ARGB_16161616 = 9,
146
+ IPF_ABGR_8888 = 10,
147
+ IPF_ABGR_16161616 = 11,
148
+ IPF_BGR_888 = 12,
149
+ IPF_BINARY_8 = 13,
150
+ IPF_NV12 = 14,
151
+ IPF_BINARY_8_INVERTED = 15
152
+ }
153
+
154
+ interface DSImageData {
155
+ bytes: Uint8Array;
156
+ width: number;
157
+ height: number;
158
+ stride: number;
159
+ format: EnumImagePixelFormat;
160
+ tag?: ImageTag;
161
+ }
162
+
163
+ declare enum EnumBufferOverflowProtectionMode {
164
+ /** New images are blocked when the buffer is full.*/
165
+ BOPM_BLOCK = 0,
166
+ /** New images are appended at the end, and oldest images are pushed out from the beginning if the buffer is full.*/
167
+ BOPM_UPDATE = 1
168
+ }
169
+
170
+ declare enum EnumColourChannelUsageType {
171
+ CCUT_AUTO = 0,
172
+ CCUT_FULL_CHANNEL = 1,
173
+ CCUT_Y_CHANNEL_ONLY = 2,
174
+ CCUT_RGB_R_CHANNEL_ONLY = 3,
175
+ CCUT_RGB_G_CHANNEL_ONLY = 4,
176
+ CCUT_RGB_B_CHANNEL_ONLY = 5
177
+ }
178
+
179
+ declare enum EnumCapturedResultItemType {
180
+ CRIT_ORIGINAL_IMAGE = 1,
181
+ CRIT_BARCODE = 2,
182
+ CRIT_TEXT_LINE = 4,
183
+ CRIT_DETECTED_QUAD = 8,
184
+ CRIT_NORMALIZED_IMAGE = 16,
185
+ CRIT_PARSED_RESULT = 32
186
+ }
187
+
188
+ interface CapturedResultItem {
189
+ readonly type: EnumCapturedResultItemType;
190
+ readonly referenceItem: CapturedResultItem | null;
191
+ readonly targetROIDefName: string;
192
+ readonly taskName: string;
193
+ }
194
+
195
+ interface OriginalImageResultItem extends CapturedResultItem {
196
+ readonly imageData: DSImageData;
197
+ }
198
+
199
+ interface Point {
200
+ x: number;
201
+ y: number;
202
+ }
203
+
204
+ interface Contour {
205
+ points: Array<Point>;
206
+ }
207
+
208
+ declare enum EnumCornerType {
209
+ CT_NORMAL_INTERSECTED = 0,
210
+ CT_T_INTERSECTED = 1,
211
+ CT_CROSS_INTERSECTED = 2,
212
+ CT_NOT_INTERSECTED = 3
213
+ }
214
+
215
+ /**
216
+ * `ErrorCode` enumerates the specific error codes that the SDK may return, providing a systematic way to identify and handle errors encountered during its operation.
217
+ */
218
+ declare enum EnumErrorCode {
219
+ /** Operation completed successfully. */
220
+ EC_OK = 0,
221
+ /** An unspecified error occurred. */
222
+ EC_UNKNOWN = -10000,
223
+ /** The system does not have enough memory to perform the requested operation. */
224
+ EC_NO_MEMORY = -10001,
225
+ /** A null pointer was encountered where a valid pointer was required. */
226
+ EC_NULL_POINTER = -10002,
227
+ /** The provided license is not valid. */
228
+ EC_LICENSE_INVALID = -10003,
229
+ /** The provided license has expired. */
230
+ EC_LICENSE_EXPIRED = -10004,
231
+ /** The specified file could not be found. */
232
+ EC_FILE_NOT_FOUND = -10005,
233
+ /** The file type is not supported for processing. */
234
+ EC_FILE_TYPE_NOT_SUPPORTED = -10006,
235
+ /** The image's bits per pixel (BPP) is not supported. */
236
+ EC_BPP_NOT_SUPPORTED = -10007,
237
+ /** The specified index is out of the valid range. */
238
+ EC_INDEX_INVALID = -10008,
239
+ /** The specified custom region value is invalid or out of range. */
240
+ EC_CUSTOM_REGION_INVALID = -10010,
241
+ /** Failed to read the image due to an error in accessing or interpreting the image data. */
242
+ EC_IMAGE_READ_FAILED = -10012,
243
+ /** Failed to read a TIFF image, possibly due to corruption or unsupported format. */
244
+ EC_TIFF_READ_FAILED = -10013,
245
+ /** The provided DIB (Device-Independent Bitmaps) buffer is invalid or corrupted. */
246
+ EC_DIB_BUFFER_INVALID = -10018,
247
+ /** Failed to read a PDF image, possibly due to corruption or unsupported format. */
248
+ EC_PDF_READ_FAILED = -10021,
249
+ /** Required PDF processing DLL is missing. */
250
+ EC_PDF_DLL_MISSING = -10022,
251
+ /** The specified page number is invalid or out of bounds for the document. */
252
+ EC_PAGE_NUMBER_INVALID = -10023,
253
+ /** The specified custom size is invalid or not supported. */
254
+ EC_CUSTOM_SIZE_INVALID = -10024,
255
+ /** The operation timed out. */
256
+ EC_TIMEOUT = -10026,
257
+ /** Failed to parse JSON input. */
258
+ EC_JSON_PARSE_FAILED = -10030,
259
+ /** The JSON type is invalid for the expected context. */
260
+ EC_JSON_TYPE_INVALID = -10031,
261
+ /** The JSON key is invalid or unrecognized in the current context. */
262
+ EC_JSON_KEY_INVALID = -10032,
263
+ /** The JSON value is invalid for the specified key. */
264
+ EC_JSON_VALUE_INVALID = -10033,
265
+ /** The required "Name" key is missing in the JSON data. */
266
+ EC_JSON_NAME_KEY_MISSING = -10034,
267
+ /** The value of the "Name" key is duplicated and conflicts with existing data. */
268
+ EC_JSON_NAME_VALUE_DUPLICATED = -10035,
269
+ /** The template name is invalid or does not match any known template. */
270
+ EC_TEMPLATE_NAME_INVALID = -10036,
271
+ /** The reference made by the "Name" key is invalid or points to nonexistent data. */
272
+ EC_JSON_NAME_REFERENCE_INVALID = -10037,
273
+ /** The parameter value provided is invalid or out of the expected range. */
274
+ EC_PARAMETER_VALUE_INVALID = -10038,
275
+ /** The domain of the current site does not match the domain bound to the current product key. */
276
+ EC_DOMAIN_NOT_MATCH = -10039,
277
+ /** The reserved information does not match the reserved info bound to the current product key. */
278
+ EC_RESERVED_INFO_NOT_MATCH = -10040,
279
+ /** The license key does not match the license content. */
280
+ EC_LICENSE_KEY_NOT_MATCH = -10043,
281
+ /** Failed to request the license content from the server. */
282
+ EC_REQUEST_FAILED = -10044,
283
+ /** Failed to initialize the license. */
284
+ EC_LICENSE_INIT_FAILED = -10045,
285
+ /** Error setting the mode's argument, indicating invalid or incompatible arguments. */
286
+ EC_SET_MODE_ARGUMENT_ERROR = -10051,
287
+ /** The license content is invalid or corrupted. */
288
+ EC_LICENSE_CONTENT_INVALID = -10052,
289
+ /** The license key is invalid or does not match any known valid keys. */
290
+ EC_LICENSE_KEY_INVALID = -10053,
291
+ /** The license key has reached its maximum allowed usage and has no remaining quota. */
292
+ EC_LICENSE_DEVICE_RUNS_OUT = -10054,
293
+ /** Failed to retrieve the mode's argument, possibly due to invalid state or configuration. */
294
+ EC_GET_MODE_ARGUMENT_ERROR = -10055,
295
+ /** The Intermediate Result Types (IRT) license is invalid or not present. */
296
+ EC_IRT_LICENSE_INVALID = -10056,
297
+ /** Failed to save the file, possibly due to permissions, space, or an invalid path. */
298
+ EC_FILE_SAVE_FAILED = -10058,
299
+ /** The specified stage type is invalid or not supported in the current context. */
300
+ EC_STAGE_TYPE_INVALID = -10059,
301
+ /** The specified image orientation is invalid or not supported. */
302
+ EC_IMAGE_ORIENTATION_INVALID = -10060,
303
+ /** Failed to convert complex template to simplified settings, indicating a configuration or compatibility issue. */
304
+ EC_CONVERT_COMPLEX_TEMPLATE_ERROR = -10061,
305
+ /** Rejecting function call while capturing is in progress, to prevent conflicts or data corruption. */
306
+ EC_CALL_REJECTED_WHEN_CAPTURING = -10062,
307
+ /** The specified image source was not found, indicating a missing or inaccessible input source. */
308
+ EC_NO_IMAGE_SOURCE = -10063,
309
+ /** Failed to read the directory, possibly due to permissions, non-existence, or other access issues. */
310
+ EC_READ_DIRECTORY_FAILED = -10064,
311
+ /** A required module (e.g., DynamsoftBarcodeReader, DynamsoftLabelRecognizer) was not found. */
312
+ EC_MODULE_NOT_FOUND = -10065,
313
+ /** The operation does not support multi-page files; use FileFetcher for processing such files. */
314
+ EC_MULTI_PAGES_NOT_SUPPORTED = -10066,
315
+ /** Indicates an attempt to write to a file that already exists, with overwriting explicitly disabled. This error suggests the need for either enabling overwriting or ensuring unique file names to avoid conflicts. */
316
+ EC_FILE_ALREADY_EXISTS = -10067,
317
+ /** The specified file path does not exist and could not be created. This error could be due to insufficient permissions, a read-only filesystem, or other environmental constraints preventing file creation. */
318
+ EC_CREATE_FILE_FAILED = -10068,
319
+ /** The input ImageData object contains invalid parameters. This could be due to incorrect data types, out-of-range values, or improperly formatted data being passed to a function expecting ImageData. */
320
+ EC_IMGAE_DATA_INVALID = -10069,
321
+ /** The size of the input image does not meet the requirements. */
322
+ EC_IMAGE_SIZE_NOT_MATCH = -10070,
323
+ /** The pixel format of the input image does not meet the requirements. */
324
+ EC_IMAGE_PIXEL_FORMAT_NOT_MATCH = -10071,
325
+ /** The section level result is irreplaceable. */
326
+ EC_SECTION_LEVEL_RESULT_IRREPLACEABLE = -10072,
327
+ /** Incorrect axis definition. */
328
+ EC_AXIS_DEFINITION_INCORRECT = -10073,
329
+ /**The result is not replaceable due to type mismatch*/
330
+ EC_RESULT_TYPE_MISMATCH_IRREPLACEABLE = -10074,
331
+ /**Failed to load the PDF library.*/
332
+ EC_PDF_LIBRARY_LOAD_FAILED = -10075,
333
+ /** Indicates no license is available or the license is not set. */
334
+ EC_NO_LICENSE = -20000,
335
+ /** The provided Handshake Code is invalid or does not match expected format. */
336
+ EC_HANDSHAKE_CODE_INVALID = -20001,
337
+ /** Encountered failures while attempting to read or write to the license buffer. */
338
+ EC_LICENSE_BUFFER_FAILED = -20002,
339
+ /** Synchronization with the license server failed, possibly due to network issues or server unavailability. */
340
+ EC_LICENSE_SYNC_FAILED = -20003,
341
+ /** The device attempting to use the license does not match the device specified in the license buffer. */
342
+ EC_DEVICE_NOT_MATCH = -20004,
343
+ /** Binding the device to the license failed, indicating possible issues with the license or device identifier. */
344
+ EC_BIND_DEVICE_FAILED = -20005,
345
+ /** The number of instances using the license exceeds the limit allowed by the license terms. */
346
+ EC_INSTANCE_COUNT_OVER_LIMIT = -20008,
347
+ /** InitLicenseFromDLS must be called before any SDK objects are created to ensure proper license initialization. */
348
+ EC_LICENSE_INIT_SEQUENCE_FAILED = -20009,
349
+ /** Indicates the license in use is a trial version with limited functionality or usage time. */
350
+ EC_TRIAL_LICENSE = -20010,
351
+ /** The system failed to reach the License Server, likely due to network connectivity issues. */
352
+ EC_FAILED_TO_REACH_DLS = -20200,
353
+ /** Online license validation failed due to network issues. Using cached license information for validation.*/
354
+ EC_LICENSE_CACHE_USED = -20012,
355
+ /** The specified barcode format is invalid or unsupported. */
356
+ EC_BARCODE_FORMAT_INVALID = -30009,
357
+ /** The license for decoding QR Codes is invalid or not present. */
358
+ EC_QR_LICENSE_INVALID = -30016,
359
+ /** The license for decoding 1D barcodes is invalid or not present. */
360
+ EC_1D_LICENSE_INVALID = -30017,
361
+ /** The license for decoding PDF417 barcodes is invalid or not present. */
362
+ EC_PDF417_LICENSE_INVALID = -30019,
363
+ /** The license for decoding DataMatrix barcodes is invalid or not present. */
364
+ EC_DATAMATRIX_LICENSE_INVALID = -30020,
365
+ /** The specified custom module size for barcode generation is invalid or outside acceptable limits. */
366
+ EC_CUSTOM_MODULESIZE_INVALID = -30025,
367
+ /** The license for decoding Aztec barcodes is invalid or not present. */
368
+ EC_AZTEC_LICENSE_INVALID = -30041,
369
+ /** The license for decoding Patchcode barcodes is invalid or not present. */
370
+ EC_PATCHCODE_LICENSE_INVALID = -30046,
371
+ /** The license for decoding postal code formats is invalid or not present. */
372
+ EC_POSTALCODE_LICENSE_INVALID = -30047,
373
+ /** The license for Direct Part Marking (DPM) decoding is invalid or not present. */
374
+ EC_DPM_LICENSE_INVALID = -30048,
375
+ /** A frame decoding thread is already running, indicating a concurrent operation conflict. */
376
+ EC_FRAME_DECODING_THREAD_EXISTS = -30049,
377
+ /** Stopping the frame decoding thread failed, indicating potential issues with thread management. */
378
+ EC_STOP_DECODING_THREAD_FAILED = -30050,
379
+ /** The license for decoding MaxiCode barcodes is invalid or not present. */
380
+ EC_MAXICODE_LICENSE_INVALID = -30057,
381
+ /** The license for decoding GS1 DataBar barcodes is invalid or not present. */
382
+ EC_GS1_DATABAR_LICENSE_INVALID = -30058,
383
+ /** The license for decoding GS1 Composite codes is invalid or not present. */
384
+ EC_GS1_COMPOSITE_LICENSE_INVALID = -30059,
385
+ /** The license for decoding DotCode barcodes is invalid or not present. */
386
+ EC_DOTCODE_LICENSE_INVALID = -30061,
387
+ /** The license for decoding Pharmacode barcodes is invalid or not present. */
388
+ EC_PHARMACODE_LICENSE_INVALID = -30062,
389
+ /** Indicates that the required character model file was not found, possibly due to incorrect paths or missing files. */
390
+ EC_CHARACTER_MODEL_FILE_NOT_FOUND = -40100,
391
+ /**There is a conflict in the layout of TextLineGroup. */
392
+ EC_TEXT_LINE_GROUP_LAYOUT_CONFLICT = -40101,
393
+ /**There is a conflict in the regex of TextLineGroup. */
394
+ EC_TEXT_LINE_GROUP_REGEX_CONFLICT = -40102,
395
+ /** The specified quadrilateral is invalid, potentially due to incorrect points or an unprocessable shape. */
396
+ EC_QUADRILATERAL_INVALID = -50057,
397
+ /** The license for generating or processing panoramas is invalid or missing. */
398
+ EC_PANORAMA_LICENSE_INVALID = -70060,
399
+ /** The specified resource path does not exist, indicating a missing directory or incorrect path specification. */
400
+ EC_RESOURCE_PATH_NOT_EXIST = -90001,
401
+ /** Failed to load the specified resource, which might be due to missing files, access rights, or other issues preventing loading. */
402
+ EC_RESOURCE_LOAD_FAILED = -90002,
403
+ /** The code specification required for processing was not found, indicating a missing or incorrect specification. */
404
+ EC_CODE_SPECIFICATION_NOT_FOUND = -90003,
405
+ /** The full code string provided is empty, indicating no data was provided for processing. */
406
+ EC_FULL_CODE_EMPTY = -90004,
407
+ /** Preprocessing the full code string failed, possibly due to invalid format, corruption, or unsupported features. */
408
+ EC_FULL_CODE_PREPROCESS_FAILED = -90005,
409
+ /** The license required for parsing South Africa Driver License data is invalid or not present. */
410
+ EC_ZA_DL_LICENSE_INVALID = -90006,
411
+ /** The license required for parsing North America DL/ID (AAMVA) data is invalid or not present. */
412
+ EC_AAMVA_DL_ID_LICENSE_INVALID = -90007,
413
+ /** The license required for parsing Aadhaar data is invalid or not present. */
414
+ EC_AADHAAR_LICENSE_INVALID = -90008,
415
+ /** The license required for parsing Machine Readable Travel Documents (MRTD) is invalid or not present. */
416
+ EC_MRTD_LICENSE_INVALID = -90009,
417
+ /** The license required for parsing Vehicle Identification Number (VIN) data is invalid or not present. */
418
+ EC_VIN_LICENSE_INVALID = -90010,
419
+ /** The license required for parsing customized code types is invalid or not present. */
420
+ EC_CUSTOMIZED_CODE_TYPE_LICENSE_INVALID = -90011,
421
+ /**The license is initialized successfully but detected invalid content in your key.*/
422
+ EC_LICENSE_WARNING = -10076,
423
+ /** [Barcode Reader] No license found.*/
424
+ EC_BARCODE_READER_LICENSE_NOT_FOUND = -30063,
425
+ /**[Label Recognizer] No license found.*/
426
+ EC_LABEL_RECOGNIZER_LICENSE_NOT_FOUND = -40103,
427
+ /**[Document Normalizer] No license found.*/
428
+ EC_DOCUMENT_NORMALIZER_LICENSE_NOT_FOUND = -50058,
429
+ /**[Code Parser] No license found.*/
430
+ EC_CODE_PARSER_LICENSE_NOT_FOUND = -90012
431
+ }
432
+
433
+ declare enum EnumGrayscaleEnhancementMode {
434
+ /**Skips grayscale transformation. */
435
+ GEM_SKIP = 0,
436
+ /**Not supported yet. */
437
+ GEM_AUTO = 1,
438
+ /**Takes the unpreprocessed image for following operations. */
439
+ GEM_GENERAL = 2,
440
+ /**Preprocesses the image using the gray equalization algorithm. Check @ref IPM for available argument settings.*/
441
+ GEM_GRAY_EQUALIZE = 4,
442
+ /**Preprocesses the image using the gray smoothing algorithm. Check @ref IPM for available argument settings.*/
443
+ GEM_GRAY_SMOOTH = 8,
444
+ /**Preprocesses the image using the sharpening and smoothing algorithm. Check @ref IPM for available argument settings.*/
445
+ GEM_SHARPEN_SMOOTH = 16,
446
+ /**Skips image preprocessing. */
447
+ GEM_REV = -2147483648
448
+ }
449
+
450
+ declare enum EnumGrayscaleTransformationMode {
451
+ /**Skips grayscale transformation. */
452
+ GTM_SKIP = 0,
453
+ /**Transforms to inverted grayscale. Recommended for light on dark images. */
454
+ GTM_INVERTED = 1,
455
+ /**Keeps the original grayscale. Recommended for dark on light images. */
456
+ GTM_ORIGINAL = 2,
457
+ /**Lets the library choose an algorithm automatically for grayscale transformation.*/
458
+ GTM_AUTO = 4,
459
+ /**Reserved setting for grayscale transformation mode.*/
460
+ GTM_REV = -2147483648
461
+ }
462
+
463
+ declare enum EnumPDFReadingMode {
464
+ /** Outputs vector data found in the PDFs.*/
465
+ PDFRM_VECTOR = 1,
466
+ /** The default value.
467
+ * Outputs raster data found in the PDFs.
468
+ * Depending on the argument Resolution,
469
+ * the SDK may rasterize the PDF pages.
470
+ * Check the template for available argument settings.*/
471
+ PDFRM_RASTER = 2,
472
+ PDFRM_REV = -2147483648
473
+ }
474
+
475
+ declare enum EnumRasterDataSource {
476
+ /** Specifies the target type for reading a PDF. */
477
+ RDS_RASTERIZED_PAGES = 0,
478
+ RDS_EXTRACTED_IMAGES = 1
479
+ }
480
+
481
+ declare enum EnumCrossVerificationStatus {
482
+ /** The cross verification has not been performed yet. */
483
+ CVS_NOT_VERIFIED = 0,
484
+ /** The cross verification has been passed successfully. */
485
+ CVS_PASSED = 1,
486
+ /** The cross verification has failed. */
487
+ CVS_FAILED = 2
488
+ }
489
+
490
+ declare const EnumIntermediateResultUnitType: {
491
+ /** No intermediate result. */
492
+ IRUT_NULL: bigint;
493
+ /** A full-color image. */
494
+ IRUT_COLOUR_IMAGE: bigint;
495
+ /** A color image that has been scaled down for efficiency. */
496
+ IRUT_SCALED_DOWN_COLOUR_IMAGE: bigint;
497
+ /** A grayscale image derived from the original input. */
498
+ IRUT_GRAYSCALE_IMAGE: bigint;
499
+ /** A grayscale image that has undergone transformation. */
500
+ IRUT_TRANSOFORMED_GRAYSCALE_IMAGE: bigint;
501
+ /** A grayscale image enhanced for further processing. */
502
+ IRUT_ENHANCED_GRAYSCALE_IMAGE: bigint;
503
+ /** Regions pre-detected as potentially relevant for further analysis. */
504
+ IRUT_PREDETECTED_REGIONS: bigint;
505
+ /** A binary (black and white) image. */
506
+ IRUT_BINARY_IMAGE: bigint;
507
+ /** Results from detecting textures within the image. */
508
+ IRUT_TEXTURE_DETECTION_RESULT: bigint;
509
+ /** A grayscale image with textures removed to enhance subject details like text or barcodes. */
510
+ IRUT_TEXTURE_REMOVED_GRAYSCALE_IMAGE: bigint;
511
+ /** A binary image with textures removed), useful for clear detection of subjects without background noise. */
512
+ IRUT_TEXTURE_REMOVED_BINARY_IMAGE: bigint;
513
+ /** Detected contours within the image), which can help in identifying shapes and objects. */
514
+ IRUT_CONTOURS: bigint;
515
+ /** Detected line segments), useful in structural analysis of the image content. */
516
+ IRUT_LINE_SEGMENTS: bigint;
517
+ /** Identified text zones), indicating areas with potential textual content. */
518
+ IRUT_TEXT_ZONES: bigint;
519
+ /** A binary image with text regions removed. */
520
+ IRUT_TEXT_REMOVED_BINARY_IMAGE: bigint;
521
+ /** Zones identified as potential barcode areas), aiding in focused barcode detection. */
522
+ IRUT_CANDIDATE_BARCODE_ZONES: bigint;
523
+ /** Barcodes that have been localized but not yet decoded. */
524
+ IRUT_LOCALIZED_BARCODES: bigint;
525
+ /** Barcode images scaled up for improved readability or decoding accuracy. */
526
+ IRUT_SCALED_UP_BARCODE_IMAGE: bigint;
527
+ /** Images of barcodes processed to resist deformation and improve decoding success. */
528
+ IRUT_DEFORMATION_RESISTED_BARCODE_IMAGE: bigint;
529
+ /** Barcode images that have been complemented. */
530
+ IRUT_COMPLEMENTED_BARCODE_IMAGE: bigint;
531
+ /** Successfully decoded barcodes. */
532
+ IRUT_DECODED_BARCODES: bigint;
533
+ /** Detected long lines. */
534
+ IRUT_LONG_LINES: bigint;
535
+ /** Detected corners within the image. */
536
+ IRUT_CORNERS: bigint;
537
+ /** Candidate edges identified as potential components of quadrilaterals. */
538
+ IRUT_CANDIDATE_QUAD_EDGES: bigint;
539
+ /** Successfully detected quadrilaterals. */
540
+ IRUT_DETECTED_QUADS: bigint;
541
+ /** Text lines that have been localized in preparation for recognition. */
542
+ IRUT_LOCALIZED_TEXT_LINES: bigint;
543
+ /** Successfully recognized text lines. */
544
+ IRUT_RECOGNIZED_TEXT_LINES: bigint;
545
+ /** Successfully normalized images. */
546
+ IRUT_NORMALIZED_IMAGES: bigint;
547
+ /** Successfully detected short lines. */
548
+ IRUT_SHORT_LINES: bigint;
549
+ IRUT_RAW_TEXT_LINES: bigint;
550
+ /** Detected logic lines. */
551
+ IRUT_LOGIC_LINES: bigint;
552
+ /** A mask to select all types of intermediate results. */
553
+ IRUT_ALL: bigint;
554
+ };
555
+ type EnumIntermediateResultUnitType = bigint;
556
+
557
+ declare enum EnumRegionObjectElementType {
558
+ ROET_PREDETECTED_REGION = 0,
559
+ ROET_LOCALIZED_BARCODE = 1,
560
+ ROET_DECODED_BARCODE = 2,
561
+ ROET_LOCALIZED_TEXT_LINE = 3,
562
+ ROET_RECOGNIZED_TEXT_LINE = 4,
563
+ ROET_DETECTED_QUAD = 5,
564
+ ROET_NORMALIZED_IMAGE = 6,
565
+ ROET_SOURCE_IMAGE = 7,
566
+ ROET_TARGET_ROI = 8
567
+ }
568
+
569
+ declare enum EnumSectionType {
570
+ ST_NULL = 0,
571
+ ST_REGION_PREDETECTION = 1,
572
+ ST_BARCODE_LOCALIZATION = 2,
573
+ ST_BARCODE_DECODING = 3,
574
+ ST_TEXT_LINE_LOCALIZATION = 4,
575
+ ST_TEXT_LINE_RECOGNITION = 5,
576
+ ST_DOCUMENT_DETECTION = 6,
577
+ ST_DOCUMENT_NORMALIZATION = 7
578
+ }
579
+
580
+ interface LineSegment {
581
+ startPoint: Point;
582
+ endPoint: Point;
583
+ }
584
+
585
+ interface Corner {
586
+ type: EnumCornerType;
587
+ intersection: Point;
588
+ line1: LineSegment;
589
+ line2: LineSegment;
590
+ }
591
+
592
+ interface Rect {
593
+ x: number;
594
+ y: number;
595
+ width: number;
596
+ height: number;
597
+ isMeasuredInPercentage?: boolean;
598
+ }
599
+
600
+ interface Arc {
601
+ x: number;
602
+ y: number;
603
+ radius: number;
604
+ startAngle: number;
605
+ endAngle: number;
606
+ }
607
+
608
+ interface Polygon {
609
+ points: Array<Point>;
610
+ }
611
+
612
+ interface DSRect {
613
+ left: number;
614
+ right: number;
615
+ top: number;
616
+ bottom: number;
617
+ isMeasuredInPercentage: boolean;
618
+ }
619
+
620
+ interface Edge {
621
+ startCorner: Corner;
622
+ endCorner: Corner;
623
+ }
624
+
625
+ interface FileImageTag extends ImageTag {
626
+ filePath: string;
627
+ pageNumber: number;
628
+ totalPages: number;
629
+ }
630
+
631
+ interface ImageSourceErrorListener {
632
+ /**
633
+ * Called when an error is received from the image source.
634
+ *
635
+ * @param errorCode An enumeration value of type "EnumErrorCode" indicating the type of error.
636
+ * @param errorMessage A C-style string containing the error message providing
637
+ * additional information about the error.
638
+ */
639
+ onErrorReceived: (errorCode: EnumErrorCode, errorMessage: string) => void;
640
+ }
641
+
642
+ interface PDFReadingParameter {
643
+ mode: EnumPDFReadingMode;
644
+ dpi: number;
645
+ rasterDataSource: EnumRasterDataSource;
646
+ }
647
+
648
+ interface Quadrilateral {
649
+ points: [Point, Point, Point, Point];
650
+ area?: number;
651
+ }
652
+
653
+ interface DSFile extends File {
654
+ download: () => void;
655
+ }
656
+
657
+ interface Warning {
658
+ id: number;
659
+ message: string;
660
+ }
661
+
662
+ declare enum EnumTransformMatrixType {
663
+ TMT_LOCAL_TO_ORIGINAL_IMAGE = 0,
664
+ TMT_ORIGINAL_TO_LOCAL_IMAGE = 1
665
+ }
666
+
667
+ interface IntermediateResultUnit {
668
+ hashId: string;
669
+ originalImageHashId: string;
670
+ originalImageTag: ImageTag;
671
+ unitType: EnumIntermediateResultUnitType;
672
+ /**
673
+ * For the two types TMT_LOCAL_TO_ORIGINAL_IMAGE & TMT_ORIGINAL_TO_LOCAL_IMAGE, we can get both from C++ and then keep the
674
+ * information in JS. Only return the information when customer calls getTransformMatrix with a specified type.
675
+ */
676
+ getTransformMatrix: (matrixType: EnumTransformMatrixType) => Array<number>;
677
+ }
678
+
679
+ interface BinaryImageUnit extends IntermediateResultUnit {
680
+ imageData: DSImageData;
681
+ }
682
+
683
+ interface ColourImageUnit extends IntermediateResultUnit {
684
+ imageData: DSImageData;
685
+ }
686
+
687
+ interface ContoursUnit extends IntermediateResultUnit {
688
+ contours: Array<Contour>;
689
+ }
690
+
691
+ interface EnhancedGrayscaleImageUnit extends IntermediateResultUnit {
692
+ imageData: DSImageData;
693
+ }
694
+
695
+ interface GrayscaleImageUnit extends IntermediateResultUnit {
696
+ imageData: DSImageData;
697
+ }
698
+
699
+ interface IntermediateResult {
700
+ intermediateResultUnits: Array<IntermediateResultUnit>;
701
+ }
702
+
703
+ interface IntermediateResultExtraInfo {
704
+ targetROIDefName: string;
705
+ taskName: string;
706
+ isSectionLevelResult: boolean;
707
+ sectionType: EnumSectionType;
708
+ }
709
+
710
+ interface LineSegmentsUnit extends IntermediateResultUnit {
711
+ lineSegments: Array<LineSegment>;
712
+ }
713
+
714
+ interface RegionObjectElement {
715
+ /**
716
+ * location was readonly before v3.2.0
717
+ * In 3.2.0 onwards, it can be set as well
718
+ * When setting, specify the location as well as
719
+ * the matrixToOriginalImage
720
+ */
721
+ location: Quadrilateral;
722
+ referencedElement: RegionObjectElement;
723
+ elementType: EnumRegionObjectElementType;
724
+ }
725
+
726
+ interface PredetectedRegionElement extends RegionObjectElement {
727
+ modeName: string;
728
+ }
729
+
730
+ interface PredetectedRegionsUnit extends IntermediateResultUnit {
731
+ predetectedRegions: Array<PredetectedRegionElement>;
732
+ }
733
+
734
+ interface ScaledDownColourImageUnit extends IntermediateResultUnit {
735
+ imageData: DSImageData;
736
+ }
737
+
738
+ interface ShortLinesUnit extends IntermediateResultUnit {
739
+ shortLines: Array<LineSegment>;
740
+ }
741
+
742
+ interface TextRemovedBinaryImageUnit extends IntermediateResultUnit {
743
+ imageData: DSImageData;
744
+ }
745
+
746
+ interface TextureDetectionResultUnit extends IntermediateResultUnit {
747
+ xSpacing: number;
748
+ ySpacing: number;
749
+ }
750
+
751
+ interface TextureRemovedBinaryImageUnit extends IntermediateResultUnit {
752
+ imageData: DSImageData;
753
+ }
754
+
755
+ interface TextureRemovedGrayscaleImageUnit extends IntermediateResultUnit {
756
+ imageData: DSImageData;
757
+ }
758
+
759
+ interface TextZone {
760
+ location: Quadrilateral;
761
+ charContoursIndices: Array<number>;
762
+ }
763
+
764
+ interface TextZonesUnit extends IntermediateResultUnit {
765
+ textZones: Array<TextZone>;
766
+ }
767
+
768
+ interface TransformedGrayscaleImageUnit extends IntermediateResultUnit {
769
+ imageData: DSImageData;
770
+ }
771
+
772
+ /**
773
+ * The `ObservationParameters` interface represents an object used to configure intermediate result observation.
774
+ */
775
+ interface ObservationParameters {
776
+ /**
777
+ * Sets the types of intermediate result units that are observed.
778
+ * @param types The types of intermediate result units to observe.
779
+ * @returns A promise that resolves when the types have been successfully set. It does not provide any value upon resolution.
780
+ */
781
+ setObservedResultUnitTypes: (types: bigint) => void;
782
+ /**
783
+ * Retrieves the types of intermediate result units that are observed.
784
+ * @returns A promise that resolves with a number that represents the types that are observed.
785
+ */
786
+ getObservedResultUnitTypes: () => bigint;
787
+ /**
788
+ * Determines whether the specified result unit type is observed.
789
+ * @param type The result unit type to check.
790
+ * @returns Boolean indicating whether the result unit type is observed.
791
+ */
792
+ isResultUnitTypeObserved: (type: EnumIntermediateResultUnitType) => boolean;
793
+ /**
794
+ * Adds an observed task by its name.
795
+ * @param taskName The name of the task.
796
+ */
797
+ addObservedTask: (taskName: string) => void;
798
+ /**
799
+ * Removes an observed task by its name.
800
+ * @param taskName The name of the task.
801
+ */
802
+ removeObservedTask: (taskName: string) => void;
803
+ /**
804
+ * Determines whether the specified task is observed.
805
+ * @param taskName The name of the task.
806
+ * @returns Boolean indicating whether the task is observed.
807
+ */
808
+ isTaskObserved: (taskName: string) => boolean;
809
+ }
810
+
811
+ declare abstract class ImageSourceAdapter {
812
+ #private;
813
+ /**
814
+ * @ignore
815
+ */
816
+ static _onLog: (message: any) => void;
817
+ /**
818
+ * @ignore
819
+ */
820
+ get _isFetchingStarted(): boolean;
821
+ constructor();
822
+ abstract hasNextImageToFetch(): boolean;
823
+ /**
824
+ * @brief Sets the error listener for the image source.
825
+ *
826
+ * This function allows you to set an error listener object that will receive
827
+ * notifications when errors occur during image source operations.
828
+ * If an error occurs, the error information will be passed to the listener's
829
+ * OnErrorReceived method.
830
+ *
831
+ * @param listener An instance of ImageSourceErrorListener or its
832
+ * derived class, which will handle error notifications.
833
+ */
834
+ setErrorListener(listener: ImageSourceErrorListener): void;
835
+ /**
836
+ * Adds an image to the internal buffer.
837
+ *
838
+ * @param image An instance of `DSImageData` containing the image to buffer.
839
+ */
840
+ addImageToBuffer(image: DSImageData): void;
841
+ /**
842
+ * Retrieves a buffered image, of type `DSImageData`.
843
+ *
844
+ * This function retrieves the latest image added to the buffer, and removes it from the buffer in the process.
845
+ *
846
+ * @returns A `DSImageData` object retrieved from the buffer which contains the image data of the frame and related information.
847
+ */
848
+ getImage(): DSImageData;
849
+ /**
850
+ * Sets the processing priority of a specific image. This can affect the order in which images are returned by getImage.
851
+ *
852
+ * @param imageId The ID of the image to prioritize.
853
+ * @param keepInBuffer [Optional] Boolean indicating whether to keep the image in the buffer after it has been returned.
854
+ */
855
+ setNextImageToReturn(imageId: number, keepInBuffer?: boolean): void;
856
+ /**
857
+ * @ignore
858
+ */
859
+ _resetNextReturnedImage(): void;
860
+ /**
861
+ * Checks if an image with the specified ID is present in the buffer.
862
+ *
863
+ * @param imageId The ID of the image to check.
864
+ *
865
+ * @returns Boolean indicating whether the image is present in the buffer.
866
+ */
867
+ hasImage(imageId: number): boolean;
868
+ /**
869
+ * Starts the process of fetching images.
870
+ */
871
+ startFetching(): void;
872
+ /**
873
+ * Stops the process of fetching images.
874
+ * to false, indicating that image fetching has been halted.
875
+ */
876
+ stopFetching(): void;
877
+ /**
878
+ * Sets the maximum number of images that can be buffered at any time. Implementing classes should attempt to keep the buffer within this limit.
879
+ *
880
+ * @param count The maximum number of images the buffer can hold.
881
+ */
882
+ setMaxImageCount(count: number): void;
883
+ /**
884
+ * Retrieves the maximum number of images that can be buffered.
885
+ *
886
+ * @returns The maximum image count for the buffer.
887
+ */
888
+ getMaxImageCount(): number;
889
+ /**
890
+ * Retrieves the current number of images in the buffer.
891
+ *
892
+ * @returns The current image count in the buffer.
893
+ */
894
+ getImageCount(): number;
895
+ /**
896
+ * Clears all images from the buffer, resetting the state for new image fetching.
897
+ */
898
+ clearBuffer(): void;
899
+ /**
900
+ * Determines whether the buffer is currently empty.
901
+ *
902
+ * @returns Boolean indicating whether the buffer is empty.
903
+ */
904
+ isBufferEmpty(): boolean;
905
+ /**
906
+ * Sets the behavior for handling new incoming images when the buffer is full. Implementations should adhere to the specified mode to manage buffer overflow.
907
+ *
908
+ * @param mode One of the modes defined in EnumBufferOverflowProtectionMode, specifying how to handle buffer overflow.
909
+ */
910
+ setBufferOverflowProtectionMode(mode: EnumBufferOverflowProtectionMode): void;
911
+ /**
912
+ * Retrieves the current mode for handling buffer overflow.
913
+ *
914
+ * @returns The current buffer overflow protection mode.
915
+ */
916
+ getBufferOverflowProtectionMode(): EnumBufferOverflowProtectionMode;
917
+ /**
918
+ * Sets the usage type for color channels in images.
919
+ *
920
+ * @param type One of the types defined in EnumColourChannelUsageType, specifying how color channels should be used.
921
+ */
922
+ setColourChannelUsageType(type: EnumColourChannelUsageType): void;
923
+ /**
924
+ * Retrieves the current mode for handling buffer overflow.
925
+ *
926
+ * @returns The current buffer overflow protection mode.
927
+ */
928
+ getColourChannelUsageType(): EnumColourChannelUsageType;
929
+ }
930
+
931
+ /**
932
+ * Judge if the input is an object(exclude array and function). If `null` or `undefined`, return `false`.
933
+ * @param value
934
+ * @returns
935
+ */
936
+ declare const isObject: (value: any) => value is Object;
937
+ /**
938
+ * Judge is the input is a {@link Arc} object.
939
+ * @param value
940
+ * @returns
941
+ * @ignore
942
+ */
943
+ declare const isArc: (value: any) => value is Arc;
944
+ /**
945
+ * Judge is the input is a {@link Contour} object.
946
+ * @param value
947
+ * @returns
948
+ * @ignore
949
+ */
950
+ declare const isContour: (value: any) => value is Contour;
951
+ declare const isOriginalDsImageData: (value: any) => boolean;
952
+ /**
953
+ * Judge is the input is a {@link DSImageData} object.
954
+ * @param value
955
+ * @returns
956
+ * @ignore
957
+ */
958
+ declare const isDSImageData: (value: any) => value is DSImageData;
959
+ /**
960
+ * Judge is the input is a {@link DSRect} object.
961
+ * @param value
962
+ * @returns
963
+ * @ignore
964
+ */
965
+ declare const isDSRect: (value: any) => value is DSRect;
966
+ /**
967
+ * Judge is the input is a {@link ImageTag} object.
968
+ * @param value
969
+ * @returns
970
+ * @ignore
971
+ */
972
+ declare const isImageTag: (value: any) => value is ImageTag;
973
+ /**
974
+ * Judge is the input is a {@link LineSegment} object.
975
+ * @param value
976
+ * @returns
977
+ * @ignore
978
+ */
979
+ declare const isLineSegment: (value: any) => value is LineSegment;
980
+ /**
981
+ * Judge is the input is a {@link Point} object.
982
+ * @param value
983
+ * @returns
984
+ * @ignore
985
+ */
986
+ declare const isPoint: (value: any) => value is Point;
987
+ /**
988
+ * Judge is the input is a {@link Polygon} object.
989
+ * @param value
990
+ * @returns
991
+ * @ignore
992
+ */
993
+ declare const isPolygon: (value: any) => value is Polygon;
994
+ /**
995
+ * Judge is the input is a {@link Quadrilateral} object.
996
+ * @param value
997
+ * @returns
998
+ * @ignore
999
+ */
1000
+ declare const isQuad: (value: any) => value is Quadrilateral;
1001
+ /**
1002
+ * Judge is the input is a {@link Rect} object.
1003
+ * @param value
1004
+ * @returns
1005
+ * @ignore
1006
+ */
1007
+ declare const isRect: (value: any) => value is Rect;
1008
+
1009
+ declare const requestResource: (url: string, type: "text" | "blob" | "arraybuffer") => Promise<any>;
1010
+ declare const checkIsLink: (str: string) => boolean;
1011
+ declare const compareVersion: (strV1: string, strV2: string) => number;
1012
+ declare const handleEngineResourcePaths: (engineResourcePaths: EngineResourcePaths) => EngineResourcePaths;
1013
+ declare const _saveToFile: (imageData: ImageData, name: string, download?: boolean) => Promise<File>;
1014
+ declare const _toCanvas: (imageData: ImageData | DSImageData) => HTMLCanvasElement;
1015
+ declare const _toImage: (MIMEType: MimeType, imageData: ImageData | DSImageData) => HTMLImageElement;
1016
+ declare const _toBlob: (MIMEType: MimeType, imageData: ImageData | DSImageData) => Promise<Blob>;
1017
+ declare const _getNorImageData: (dsImageData: DSImageData) => ImageData;
1018
+
1019
+ export { Arc, BinaryImageUnit, CapturedResultItem, ColourImageUnit, Contour, ContoursUnit, CoreModule, Corner, DSFile, DSImageData, DSRect, DwtInfo, Edge, EngineResourcePaths, EnhancedGrayscaleImageUnit, EnumBufferOverflowProtectionMode, EnumCapturedResultItemType, EnumColourChannelUsageType, EnumCornerType, EnumCrossVerificationStatus, EnumErrorCode, EnumGrayscaleEnhancementMode, EnumGrayscaleTransformationMode, EnumImagePixelFormat, EnumImageTagType, EnumIntermediateResultUnitType, EnumPDFReadingMode, EnumRasterDataSource, EnumRegionObjectElementType, EnumSectionType, FileImageTag, GrayscaleImageUnit, ImageSourceAdapter, ImageSourceErrorListener, ImageTag, InnerVersions, IntermediateResult, IntermediateResultExtraInfo, IntermediateResultUnit, LineSegment, LineSegmentsUnit, MapController, MimeType, ObservationParameters, OriginalImageResultItem, PDFReadingParameter, PathInfo, Point, Polygon, PostMessageBody, PredetectedRegionElement, PredetectedRegionsUnit, Quadrilateral, Rect, RegionObjectElement, ScaledDownColourImageUnit, ShortLinesUnit, TextRemovedBinaryImageUnit, TextZonesUnit, TextureDetectionResultUnit, TextureRemovedBinaryImageUnit, TextureRemovedGrayscaleImageUnit, TransformedGrayscaleImageUnit, Warning, WasmVersions, WorkerAutoResources, _getNorImageData, _saveToFile, _toBlob, _toCanvas, _toImage, bDebug, checkIsLink, compareVersion, doOrWaitAsyncDependency, getNextTaskID, handleEngineResourcePaths, innerVersions, isArc, isContour, isDSImageData, isDSRect, isImageTag, isLineSegment, isObject, isOriginalDsImageData, isPoint, isPolygon, isQuad, isRect, loadWasm, mapAsyncDependency, mapPackageRegister, mapTaskCallBack, onLog, requestResource, setBDebug, setOnLog, waitAsyncDependency, worker, workerAutoResources };