@sythos/js_barcode_universal 1.5.13 → 1.5.15
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 +22 -4
- package/NOTICE.md +10 -1
- package/README.md +416 -22
- package/bundle/sythos-barcode.esm.js +22176 -11991
- package/bundle/sythos-barcode.js +22059 -11991
- package/licenses/README.md +12 -1
- package/licenses/codablockf.license +51 -0
- package/licenses/code16k.license +52 -0
- package/licenses/code25.license +58 -0
- package/licenses/code32.license +51 -0
- package/licenses/dotcode.license +66 -0
- package/licenses/gs1-composite.license +106 -0
- package/licenses/gs1-databar.license +21 -14
- package/licenses/hanxin.license +95 -0
- package/licenses/maxicode.license +62 -0
- package/licenses/postal.license +61 -0
- package/licenses/pzn.license +53 -0
- package/licenses/telepen.license +73 -0
- package/llms.txt +62 -6
- package/package.json +47 -3
- package/src/index.d.ts +111 -6
- package/src/index.js +362 -13
- package/src/js/codablockf/decoder.js +198 -0
- package/src/js/codablockf/encoder.js +97 -0
- package/src/js/codablockf/index.js +3 -0
- package/src/js/code16k/decoder.js +303 -0
- package/src/js/code16k/detector.js +187 -0
- package/src/js/code16k/encoder.js +153 -0
- package/src/js/code16k/index.js +14 -0
- package/src/js/code16k/tables.js +152 -0
- package/src/js/composite/index.js +570 -0
- package/src/js/core/detection-contract.js +185 -0
- package/src/js/core/symbol-layout.js +155 -0
- package/src/js/databar/expanded.js +968 -0
- package/src/js/databar/index.js +4 -0
- package/src/js/databar/layout.js +192 -0
- package/src/js/databar/limited.js +533 -0
- package/src/js/databar/stacked-omnidirectional.js +548 -0
- package/src/js/databar/stacked.js +528 -0
- package/src/js/dotcode/decoder.js +548 -0
- package/src/js/dotcode/detector.js +251 -0
- package/src/js/dotcode/encoder.js +453 -0
- package/src/js/dotcode/index.js +34 -0
- package/src/js/dotcode/tables.js +168 -0
- package/src/js/hanxin/decoder.js +299 -0
- package/src/js/hanxin/detector.js +122 -0
- package/src/js/hanxin/encoder.js +259 -0
- package/src/js/hanxin/index.js +16 -0
- package/src/js/hanxin/tables.js +316 -0
- package/src/js/image/height-coded.js +164 -0
- package/src/js/maxicode/decoder.js +275 -0
- package/src/js/maxicode/detector.js +118 -0
- package/src/js/maxicode/encoder.js +438 -0
- package/src/js/maxicode/index.js +34 -0
- package/src/js/maxicode/tables.js +132 -0
- package/src/js/oned/code25.js +148 -0
- package/src/js/oned/index.js +21 -3
- package/src/js/oned/postal.js +889 -0
- package/src/js/oned/reader.js +272 -7
- package/src/js/oned/telepen.js +361 -0
- package/src/js/oned/writers.js +186 -12
- package/src/js/stacked128/common.js +208 -0
- package/src/ts/codablockf/decoder.ts +212 -0
- package/src/ts/codablockf/encoder.ts +128 -0
- package/src/ts/codablockf/index.d.ts +31 -0
- package/src/ts/codablockf/index.ts +6 -0
- package/src/ts/code16k/decoder.d.ts +25 -0
- package/src/ts/code16k/decoder.ts +313 -0
- package/src/ts/code16k/detector.d.ts +21 -0
- package/src/ts/code16k/detector.ts +203 -0
- package/src/ts/code16k/encoder.d.ts +26 -0
- package/src/ts/code16k/encoder.ts +198 -0
- package/src/ts/code16k/index.d.ts +10 -0
- package/src/ts/code16k/index.ts +47 -0
- package/src/ts/code16k/tables.d.ts +54 -0
- package/src/ts/code16k/tables.ts +195 -0
- package/src/ts/composite/index.d.ts +74 -0
- package/src/ts/composite/index.ts +547 -0
- package/src/ts/core/detection-contract.d.ts +119 -0
- package/src/ts/core/detection-contract.ts +267 -0
- package/src/ts/core/symbol-layout.d.ts +108 -0
- package/src/ts/core/symbol-layout.ts +236 -0
- package/src/ts/databar/expanded.d.ts +40 -0
- package/src/ts/databar/expanded.ts +948 -0
- package/src/ts/databar/index.d.ts +48 -0
- package/src/ts/databar/index.ts +48 -0
- package/src/ts/databar/layout.d.ts +122 -0
- package/src/ts/databar/layout.ts +275 -0
- package/src/ts/databar/limited.d.ts +85 -0
- package/src/ts/databar/limited.ts +553 -0
- package/src/ts/databar/stacked-omnidirectional.d.ts +128 -0
- package/src/ts/databar/stacked-omnidirectional.ts +559 -0
- package/src/ts/databar/stacked.d.ts +96 -0
- package/src/ts/databar/stacked.ts +549 -0
- package/src/ts/dotcode/decoder.d.ts +58 -0
- package/src/ts/dotcode/decoder.ts +467 -0
- package/src/ts/dotcode/detector.d.ts +63 -0
- package/src/ts/dotcode/detector.ts +263 -0
- package/src/ts/dotcode/encoder.d.ts +69 -0
- package/src/ts/dotcode/encoder.ts +427 -0
- package/src/ts/dotcode/index.d.ts +37 -0
- package/src/ts/dotcode/index.ts +72 -0
- package/src/ts/dotcode/tables.d.ts +74 -0
- package/src/ts/dotcode/tables.ts +174 -0
- package/src/ts/hanxin/decoder.d.ts +48 -0
- package/src/ts/hanxin/decoder.ts +314 -0
- package/src/ts/hanxin/detector.d.ts +45 -0
- package/src/ts/hanxin/detector.ts +124 -0
- package/src/ts/hanxin/encoder.d.ts +41 -0
- package/src/ts/hanxin/encoder.ts +290 -0
- package/src/ts/hanxin/index.d.ts +16 -0
- package/src/ts/hanxin/index.ts +18 -0
- package/src/ts/hanxin/tables.d.ts +80 -0
- package/src/ts/hanxin/tables.ts +348 -0
- package/src/ts/image/height-coded.d.ts +101 -0
- package/src/ts/image/height-coded.ts +227 -0
- package/src/ts/index.d.ts +46 -2
- package/src/ts/index.ts +380 -13
- package/src/ts/maxicode/decoder.ts +265 -0
- package/src/ts/maxicode/detector.ts +109 -0
- package/src/ts/maxicode/encoder.ts +414 -0
- package/src/ts/maxicode/index.d.ts +96 -0
- package/src/ts/maxicode/index.ts +44 -0
- package/src/ts/maxicode/tables.ts +136 -0
- package/src/ts/oned/code25.d.ts +42 -0
- package/src/ts/oned/code25.ts +170 -0
- package/src/ts/oned/index.d.ts +7 -2
- package/src/ts/oned/index.ts +45 -3
- package/src/ts/oned/postal.d.ts +44 -0
- package/src/ts/oned/postal.ts +819 -0
- package/src/ts/oned/reader.d.ts +35 -0
- package/src/ts/oned/reader.ts +261 -7
- package/src/ts/oned/telepen.d.ts +65 -0
- package/src/ts/oned/telepen.ts +368 -0
- package/src/ts/oned/writers.d.ts +32 -0
- package/src/ts/oned/writers.ts +184 -13
- package/src/ts/stacked128/common.ts +225 -0
|
@@ -0,0 +1,559 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Sythos Barcode Suite
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2026 Sythos
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* SPDX-License-Identifier: MIT
|
|
27
|
+
*
|
|
28
|
+
* Original work. No code from any other barcode implementation.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/** GS1 DataBar Stacked Omnidirectional writer, reader and clean-raster detector. */
|
|
32
|
+
|
|
33
|
+
import { BitMatrix } from '../core/bit-matrix.js';
|
|
34
|
+
import { ChecksumError, EncodeError, FormatError } from '../core/errors.js';
|
|
35
|
+
import { createDetectionCandidate } from '../core/detection-contract.js';
|
|
36
|
+
import { decodeDataBar14 } from './decoder.js';
|
|
37
|
+
import { encodeDataBar14GTIN } from './codec.js';
|
|
38
|
+
import {
|
|
39
|
+
DATABAR14_CHECKSUM_WEIGHTS,
|
|
40
|
+
DATABAR14_FINDERS,
|
|
41
|
+
dataBar14CharacterWidths,
|
|
42
|
+
} from './patterns.js';
|
|
43
|
+
|
|
44
|
+
const ROW_MODULES = 50;
|
|
45
|
+
const LINEAR_MODULES = 96;
|
|
46
|
+
const MIN_ROW_HEIGHT = 33;
|
|
47
|
+
const SEPARATOR_MODULES = 3;
|
|
48
|
+
const MAX_DIMENSION = 32_768;
|
|
49
|
+
const MAX_MODULES = 16_777_216;
|
|
50
|
+
|
|
51
|
+
// These two public DataBar separator fragments are the only fixed geometry
|
|
52
|
+
// beyond the four symbol characters. They are expressed as module values so
|
|
53
|
+
// the same code serves the writer and the strict reader.
|
|
54
|
+
const FINDER_SEPARATOR = Object.freeze([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0]);
|
|
55
|
+
const FINDER_SEPARATOR_TRIGGER = Object.freeze([1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1]);
|
|
56
|
+
|
|
57
|
+
function isRecord(value) {
|
|
58
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function isSafeDimension(value) {
|
|
62
|
+
return Number.isSafeInteger(value) && value > 0 && value <= MAX_DIMENSION;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function isDark(value) {
|
|
66
|
+
return Boolean(value);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function normalizedOptions(options, errorType) {
|
|
70
|
+
if (options === undefined) return {};
|
|
71
|
+
if (!isRecord(options)) throw new errorType('GS1 DataBar Stacked Omnidirectional options must be an object');
|
|
72
|
+
return options;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function resolveRowHeight(options, errorType) {
|
|
76
|
+
const values = [];
|
|
77
|
+
for (const name of ['rowHeight', 'barHeight', 'height']) {
|
|
78
|
+
if (options[name] !== undefined) {
|
|
79
|
+
if (!Number.isSafeInteger(options[name])) {
|
|
80
|
+
throw new errorType(`GS1 DataBar Stacked Omnidirectional ${name} must be a safe integer`);
|
|
81
|
+
}
|
|
82
|
+
values.push({ name, value: options[name] });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
const rowHeight = values.length === 0 ? MIN_ROW_HEIGHT : values[0].value;
|
|
86
|
+
for (const entry of values) {
|
|
87
|
+
if (entry.value !== rowHeight) {
|
|
88
|
+
throw new errorType('GS1 DataBar Stacked Omnidirectional row height options disagree');
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (rowHeight < MIN_ROW_HEIGHT || 2 * rowHeight + SEPARATOR_MODULES > MAX_DIMENSION) {
|
|
92
|
+
throw new errorType('GS1 DataBar Stacked Omnidirectional row height is outside the safe range');
|
|
93
|
+
}
|
|
94
|
+
return rowHeight;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function validateVariant(options) {
|
|
98
|
+
if (options.variant === undefined) return;
|
|
99
|
+
if (options.variant !== 'stacked-omnidirectional'
|
|
100
|
+
&& options.variant !== 'stacked-omni'
|
|
101
|
+
&& options.variant !== 'stackedomni') {
|
|
102
|
+
throw new EncodeError('GS1 DataBar physical encoder only supports stacked omnidirectional');
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function validateSeparatorOption(options, errorType) {
|
|
107
|
+
if (options.separatorModules !== undefined
|
|
108
|
+
&& options.separatorModules !== SEPARATOR_MODULES) {
|
|
109
|
+
throw new errorType('GS1 DataBar Stacked Omnidirectional requires a three-module separator');
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function runsToBits(runs, darkFirst) {
|
|
114
|
+
const bits = [];
|
|
115
|
+
let dark = darkFirst;
|
|
116
|
+
for (const width of runs) {
|
|
117
|
+
if (!Number.isSafeInteger(width) || width < 1) {
|
|
118
|
+
throw new EncodeError('GS1 DataBar Stacked Omnidirectional contains an invalid element width');
|
|
119
|
+
}
|
|
120
|
+
for (let i = 0; i < width; i++) bits.push(dark ? 1 : 0);
|
|
121
|
+
dark = !dark;
|
|
122
|
+
}
|
|
123
|
+
return bits;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function checksumAndFinders(characters) {
|
|
127
|
+
const widths = characters.map((value, index) => dataBar14CharacterWidths(
|
|
128
|
+
value,
|
|
129
|
+
index === 0 || index === 3 ? 'outside' : 'inside',
|
|
130
|
+
));
|
|
131
|
+
const offsets = [0, 8, 24, 16];
|
|
132
|
+
let checksum = 0;
|
|
133
|
+
for (let character = 0; character < widths.length; character++) {
|
|
134
|
+
for (let element = 0; element < widths[character].length; element++) {
|
|
135
|
+
checksum += widths[character][element]
|
|
136
|
+
* DATABAR14_CHECKSUM_WEIGHTS[offsets[character] + element];
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
checksum %= 79;
|
|
140
|
+
if (checksum >= 8) checksum++;
|
|
141
|
+
if (checksum >= 72) checksum++;
|
|
142
|
+
return {
|
|
143
|
+
checksum,
|
|
144
|
+
left: Math.floor(checksum / 9),
|
|
145
|
+
right: checksum % 9,
|
|
146
|
+
widths,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function separatorRows(top, bottom) {
|
|
151
|
+
if (top.length !== ROW_MODULES || bottom.length !== ROW_MODULES) {
|
|
152
|
+
throw new FormatError('GS1 DataBar Stacked Omnidirectional rows must contain 50 modules');
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// The first separator row follows the top row edge and is forced light at
|
|
156
|
+
// both outer four-module pads. The centre transition follows the edge rule
|
|
157
|
+
// defined for the omnidirectional stacked symbol.
|
|
158
|
+
const first = top.map((value) => 1 - value);
|
|
159
|
+
first.fill(0, 0, 4);
|
|
160
|
+
first.fill(0, 46, 50);
|
|
161
|
+
for (let index = 18; index <= 30; index++) {
|
|
162
|
+
if (top[index] === 0) {
|
|
163
|
+
first[index] = top[index - 1] === 1 ? 1 : 1 - first[index - 1];
|
|
164
|
+
} else {
|
|
165
|
+
first[index] = 0;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// The middle separator row is a fixed alternating clock pattern with four
|
|
170
|
+
// light modules at each end.
|
|
171
|
+
const second = new Array(ROW_MODULES).fill(0);
|
|
172
|
+
for (let index = 4; index < 46; index++) second[index] = (index - 4) % 2;
|
|
173
|
+
|
|
174
|
+
const third = bottom.map((value) => 1 - value);
|
|
175
|
+
third.fill(0, 0, 4);
|
|
176
|
+
third.fill(0, 46, 50);
|
|
177
|
+
for (let index = 19; index <= 31; index++) {
|
|
178
|
+
if (bottom[index] === 0) {
|
|
179
|
+
third[index] = bottom[index - 1] === 1 ? 1 : 1 - third[index - 1];
|
|
180
|
+
} else {
|
|
181
|
+
third[index] = 0;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
let isFinderEdge = true;
|
|
185
|
+
for (let index = 0; index < FINDER_SEPARATOR_TRIGGER.length; index++) {
|
|
186
|
+
if (bottom[index + 19] !== FINDER_SEPARATOR_TRIGGER[index]) {
|
|
187
|
+
isFinderEdge = false;
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
if (isFinderEdge) third.splice(19, FINDER_SEPARATOR.length, ...FINDER_SEPARATOR);
|
|
192
|
+
|
|
193
|
+
return [first, second, third];
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function physicalRows(compacted) {
|
|
197
|
+
const [outerLeft, innerLeft, innerRight, outerRight] = compacted.physicalCharacters;
|
|
198
|
+
const check = checksumAndFinders([outerLeft, innerLeft, innerRight, outerRight]);
|
|
199
|
+
const topRuns = [
|
|
200
|
+
1, 1,
|
|
201
|
+
...check.widths[0],
|
|
202
|
+
...DATABAR14_FINDERS[check.left],
|
|
203
|
+
...check.widths[1].slice().reverse(),
|
|
204
|
+
1, 1,
|
|
205
|
+
];
|
|
206
|
+
const bottomRuns = [
|
|
207
|
+
1, 1,
|
|
208
|
+
...check.widths[2],
|
|
209
|
+
...DATABAR14_FINDERS[check.right].slice().reverse(),
|
|
210
|
+
...check.widths[3].slice().reverse(),
|
|
211
|
+
1, 1,
|
|
212
|
+
];
|
|
213
|
+
const top = runsToBits(topRuns, false);
|
|
214
|
+
const bottom = runsToBits(bottomRuns, true);
|
|
215
|
+
if (top.length !== ROW_MODULES || bottom.length !== ROW_MODULES) {
|
|
216
|
+
throw new EncodeError('GS1 DataBar Stacked Omnidirectional row width is not 50 modules');
|
|
217
|
+
}
|
|
218
|
+
return Object.freeze({
|
|
219
|
+
top: Object.freeze(top),
|
|
220
|
+
bottom: Object.freeze(bottom),
|
|
221
|
+
separator: Object.freeze(separatorRows(top, bottom).map((row) => Object.freeze(row))),
|
|
222
|
+
checksum: check.checksum,
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
function setRow(matrix, bits, y) {
|
|
227
|
+
for (let x = 0; x < bits.length; x++) if (bits[x]) matrix.set(x, y);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
function matrixForRows(rows, rowHeight, compacted) {
|
|
231
|
+
const height = 2 * rowHeight + SEPARATOR_MODULES;
|
|
232
|
+
if (!isSafeDimension(ROW_MODULES) || !isSafeDimension(height)
|
|
233
|
+
|| ROW_MODULES > MAX_MODULES / height) {
|
|
234
|
+
throw new EncodeError('GS1 DataBar Stacked Omnidirectional matrix exceeds the safe allocation budget');
|
|
235
|
+
}
|
|
236
|
+
const matrix = new BitMatrix(ROW_MODULES, height);
|
|
237
|
+
for (let y = 0; y < rowHeight; y++) setRow(matrix, rows.top, y);
|
|
238
|
+
for (let separator = 0; separator < SEPARATOR_MODULES; separator++) {
|
|
239
|
+
setRow(matrix, rows.separator[separator], rowHeight + separator);
|
|
240
|
+
}
|
|
241
|
+
for (let y = 0; y < rowHeight; y++) setRow(matrix, rows.bottom, rowHeight + SEPARATOR_MODULES + y);
|
|
242
|
+
matrix.databar = Object.freeze({
|
|
243
|
+
variant: 'stacked-omnidirectional',
|
|
244
|
+
gtin: compacted.gtin,
|
|
245
|
+
linkage: compacted.linkage,
|
|
246
|
+
checksum: rows.checksum,
|
|
247
|
+
rowHeight,
|
|
248
|
+
separatorModules: SEPARATOR_MODULES,
|
|
249
|
+
});
|
|
250
|
+
return matrix;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/** Encode a checked GTIN as a GS1 DataBar Stacked Omnidirectional matrix. */
|
|
254
|
+
export function encodeDataBarStackedOmnidirectional(value, options = {}) {
|
|
255
|
+
const opts = normalizedOptions(options, TypeError);
|
|
256
|
+
validateVariant(opts);
|
|
257
|
+
validateSeparatorOption(opts, EncodeError);
|
|
258
|
+
const rowHeight = resolveRowHeight(opts, EncodeError);
|
|
259
|
+
if (opts.linkage !== undefined && typeof opts.linkage !== 'boolean') {
|
|
260
|
+
throw new EncodeError('GS1 DataBar linkage must be a boolean');
|
|
261
|
+
}
|
|
262
|
+
const compacted = encodeDataBar14GTIN(value, { linkage: opts.linkage });
|
|
263
|
+
return matrixForRows(physicalRows(compacted), rowHeight, compacted);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
function checkedMatrix(matrix) {
|
|
267
|
+
if (!isRecord(matrix) || typeof matrix.get !== 'function') {
|
|
268
|
+
throw new TypeError('GS1 DataBar Stacked Omnidirectional decoder expects a BitMatrix-like value');
|
|
269
|
+
}
|
|
270
|
+
if (!isSafeDimension(matrix.width) || !isSafeDimension(matrix.height)
|
|
271
|
+
|| matrix.width * matrix.height > MAX_MODULES) {
|
|
272
|
+
throw new FormatError('GS1 DataBar Stacked Omnidirectional matrix dimensions are unsafe');
|
|
273
|
+
}
|
|
274
|
+
if (matrix.width % ROW_MODULES !== 0) {
|
|
275
|
+
throw new FormatError('GS1 DataBar Stacked Omnidirectional matrix width must be a multiple of 50 modules');
|
|
276
|
+
}
|
|
277
|
+
const scale = matrix.width / ROW_MODULES;
|
|
278
|
+
const logicalHeight = matrix.height / scale;
|
|
279
|
+
if (!Number.isSafeInteger(logicalHeight)
|
|
280
|
+
|| logicalHeight < 2 * MIN_ROW_HEIGHT + SEPARATOR_MODULES
|
|
281
|
+
|| (logicalHeight - SEPARATOR_MODULES) % 2 !== 0) {
|
|
282
|
+
throw new FormatError('GS1 DataBar Stacked Omnidirectional matrix height is invalid');
|
|
283
|
+
}
|
|
284
|
+
const rowHeight = (logicalHeight - SEPARATOR_MODULES) / 2;
|
|
285
|
+
if (rowHeight < MIN_ROW_HEIGHT) {
|
|
286
|
+
throw new FormatError('GS1 DataBar Stacked Omnidirectional row height is below the normative minimum');
|
|
287
|
+
}
|
|
288
|
+
return { scale, rowHeight };
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
function readLogicalRow(matrix, y, scale) {
|
|
292
|
+
const row = new Array(ROW_MODULES);
|
|
293
|
+
const firstY = y * scale;
|
|
294
|
+
for (let x = 0; x < ROW_MODULES; x++) {
|
|
295
|
+
const firstX = x * scale;
|
|
296
|
+
const value = isDark(matrix.get(firstX + Math.floor(scale / 2), firstY + Math.floor(scale / 2))) ? 1 : 0;
|
|
297
|
+
row[x] = value;
|
|
298
|
+
for (let dy = 0; dy < scale; dy++) {
|
|
299
|
+
for (let dx = 0; dx < scale; dx++) {
|
|
300
|
+
const sampled = isDark(matrix.get(firstX + dx, firstY + dy)) ? 1 : 0;
|
|
301
|
+
if (sampled !== value) {
|
|
302
|
+
throw new FormatError('GS1 DataBar Stacked Omnidirectional module contains an internal transition');
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
return row;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
function rowsFromMatrix(matrix, rowHeight, scale) {
|
|
311
|
+
try {
|
|
312
|
+
const top = readLogicalRow(matrix, Math.floor(rowHeight / 2), scale);
|
|
313
|
+
for (let y = 0; y < rowHeight; y++) {
|
|
314
|
+
if (!sameBits(top, readLogicalRow(matrix, y, scale))) {
|
|
315
|
+
throw new FormatError('GS1 DataBar Stacked Omnidirectional top row is inconsistent');
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
const bottom = readLogicalRow(matrix, rowHeight + SEPARATOR_MODULES + Math.floor(rowHeight / 2), scale);
|
|
319
|
+
for (let y = 0; y < rowHeight; y++) {
|
|
320
|
+
if (!sameBits(bottom, readLogicalRow(matrix, rowHeight + SEPARATOR_MODULES + y, scale))) {
|
|
321
|
+
throw new FormatError('GS1 DataBar Stacked Omnidirectional bottom row is inconsistent');
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
const separator = [
|
|
325
|
+
readLogicalRow(matrix, rowHeight, scale),
|
|
326
|
+
readLogicalRow(matrix, rowHeight + 1, scale),
|
|
327
|
+
readLogicalRow(matrix, rowHeight + 2, scale),
|
|
328
|
+
];
|
|
329
|
+
return { top, bottom, separator };
|
|
330
|
+
} catch (error) {
|
|
331
|
+
throw new FormatError('GS1 DataBar Stacked Omnidirectional matrix could not be sampled');
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
function sameBits(actual, expected) {
|
|
336
|
+
if (actual.length !== expected.length) return false;
|
|
337
|
+
for (let index = 0; index < actual.length; index++) if (actual[index] !== expected[index]) return false;
|
|
338
|
+
return true;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
function linearMatrix(top, bottom) {
|
|
342
|
+
// The top row carries the first 48 modules of the linear symbol and the
|
|
343
|
+
// bottom row carries the final 48. Each row contributes two guard modules
|
|
344
|
+
// adjacent to the separator; those four modules are not data and are
|
|
345
|
+
// intentionally omitted here.
|
|
346
|
+
const bits = top.slice(0, 48).concat(bottom.slice(2));
|
|
347
|
+
if (bits.length !== LINEAR_MODULES) {
|
|
348
|
+
throw new FormatError('GS1 DataBar Stacked Omnidirectional rows cannot form a 96-module symbol');
|
|
349
|
+
}
|
|
350
|
+
const matrix = new BitMatrix(LINEAR_MODULES, 1);
|
|
351
|
+
for (let x = 0; x < bits.length; x++) if (bits[x]) matrix.set(x, 0);
|
|
352
|
+
return matrix;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
function decodedResult(decoded, rows, rowHeight) {
|
|
356
|
+
const element = Object.freeze({ ai: '01', value: decoded.gtin, fixed: true });
|
|
357
|
+
return Object.freeze({
|
|
358
|
+
format: 'databar-stacked-omnidirectional',
|
|
359
|
+
variant: 'stacked-omnidirectional',
|
|
360
|
+
text: decoded.gtin,
|
|
361
|
+
gtin: decoded.gtin,
|
|
362
|
+
gs1: true,
|
|
363
|
+
linkage: decoded.linkage,
|
|
364
|
+
symbologyIdentifier: ']e0',
|
|
365
|
+
checksum: rows.checksum,
|
|
366
|
+
checksumValid: true,
|
|
367
|
+
rows: 2,
|
|
368
|
+
rowHeight,
|
|
369
|
+
separatorModules: SEPARATOR_MODULES,
|
|
370
|
+
elements: Object.freeze([element]),
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/** Decode a clean, upright GS1 DataBar Stacked Omnidirectional matrix. */
|
|
375
|
+
export function decodeDataBarStackedOmnidirectional(matrix, options = {}) {
|
|
376
|
+
const opts = normalizedOptions(options, TypeError);
|
|
377
|
+
validateSeparatorOption(opts, FormatError);
|
|
378
|
+
const geometry = checkedMatrix(matrix);
|
|
379
|
+
const requestedHeight = opts.rowHeight ?? opts.barHeight ?? opts.height;
|
|
380
|
+
if (requestedHeight !== undefined && requestedHeight !== geometry.rowHeight) {
|
|
381
|
+
throw new FormatError('GS1 DataBar Stacked Omnidirectional row height does not match the matrix');
|
|
382
|
+
}
|
|
383
|
+
const sampled = rowsFromMatrix(matrix, geometry.rowHeight, geometry.scale);
|
|
384
|
+
let decoded;
|
|
385
|
+
try {
|
|
386
|
+
decoded = decodeDataBar14(linearMatrix(sampled.top, sampled.bottom));
|
|
387
|
+
} catch (error) {
|
|
388
|
+
if (error instanceof ChecksumError || error instanceof FormatError) throw error;
|
|
389
|
+
throw new FormatError('GS1 DataBar Stacked Omnidirectional payload is invalid');
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
const expected = physicalRows(encodeDataBar14GTIN(decoded.gtin, { linkage: decoded.linkage }));
|
|
393
|
+
if (!sameBits(sampled.top, expected.top) || !sameBits(sampled.bottom, expected.bottom)) {
|
|
394
|
+
throw new FormatError('GS1 DataBar Stacked Omnidirectional row structure is invalid');
|
|
395
|
+
}
|
|
396
|
+
for (let row = 0; row < SEPARATOR_MODULES; row++) {
|
|
397
|
+
if (!sameBits(sampled.separator[row], expected.separator[row])) {
|
|
398
|
+
throw new FormatError('GS1 DataBar Stacked Omnidirectional separator is invalid');
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
return decodedResult(decoded, expected, geometry.rowHeight);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
function boundsFor(image) {
|
|
405
|
+
if (typeof image.getBounds === 'function') {
|
|
406
|
+
const bounds = image.getBounds();
|
|
407
|
+
if (bounds === null) return null;
|
|
408
|
+
if (isRecord(bounds)
|
|
409
|
+
&& Number.isSafeInteger(bounds.x) && Number.isSafeInteger(bounds.y)
|
|
410
|
+
&& Number.isSafeInteger(bounds.width) && Number.isSafeInteger(bounds.height)
|
|
411
|
+
&& bounds.x >= 0 && bounds.y >= 0 && bounds.width > 0 && bounds.height > 0
|
|
412
|
+
&& bounds.x + bounds.width <= image.width && bounds.y + bounds.height <= image.height
|
|
413
|
+
&& bounds.width * bounds.height <= MAX_MODULES) {
|
|
414
|
+
return {
|
|
415
|
+
minX: bounds.x,
|
|
416
|
+
minY: bounds.y,
|
|
417
|
+
maxX: bounds.x + bounds.width - 1,
|
|
418
|
+
maxY: bounds.y + bounds.height - 1,
|
|
419
|
+
width: bounds.width,
|
|
420
|
+
height: bounds.height,
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
let minX = image.width;
|
|
426
|
+
let minY = image.height;
|
|
427
|
+
let maxX = -1;
|
|
428
|
+
let maxY = -1;
|
|
429
|
+
for (let y = 0; y < image.height; y++) {
|
|
430
|
+
for (let x = 0; x < image.width; x++) {
|
|
431
|
+
if (!isDark(image.get(x, y))) continue;
|
|
432
|
+
if (x < minX) minX = x;
|
|
433
|
+
if (x > maxX) maxX = x;
|
|
434
|
+
if (y < minY) minY = y;
|
|
435
|
+
if (y > maxY) maxY = y;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
if (maxX < 0) return null;
|
|
439
|
+
return { minX, minY, maxX, maxY, width: maxX - minX + 1, height: maxY - minY + 1 };
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
function rotateClockwise(source) {
|
|
443
|
+
const out = new BitMatrix(source.height, source.width);
|
|
444
|
+
for (let y = 0; y < source.height; y++) {
|
|
445
|
+
for (let x = 0; x < source.width; x++) {
|
|
446
|
+
if (isDark(source.get(x, y))) out.set(source.height - 1 - y, x);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
return out;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
function sampledCandidate(image, bounds, scale) {
|
|
453
|
+
const logicalHeight = bounds.height / scale;
|
|
454
|
+
const rowHeight = (logicalHeight - SEPARATOR_MODULES) / 2;
|
|
455
|
+
if (!Number.isSafeInteger(scale) || scale < 1
|
|
456
|
+
|| !Number.isSafeInteger(logicalHeight)
|
|
457
|
+
|| logicalHeight < 2 * MIN_ROW_HEIGHT + SEPARATOR_MODULES
|
|
458
|
+
|| (logicalHeight - SEPARATOR_MODULES) % 2 !== 0
|
|
459
|
+
|| rowHeight < MIN_ROW_HEIGHT) return null;
|
|
460
|
+
const matrix = new BitMatrix(ROW_MODULES, logicalHeight);
|
|
461
|
+
for (let y = 0; y < logicalHeight; y++) {
|
|
462
|
+
const sampleY = bounds.minY + y * scale + Math.floor(scale / 2);
|
|
463
|
+
for (let x = 0; x < ROW_MODULES; x++) {
|
|
464
|
+
const sampleX = bounds.minX + x * scale + Math.floor(scale / 2);
|
|
465
|
+
if (isDark(image.get(sampleX, sampleY))) matrix.set(x, y);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
return { matrix, rowHeight, scale };
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
function cornersFor(bounds) {
|
|
472
|
+
return [
|
|
473
|
+
{ x: bounds.minX, y: bounds.minY },
|
|
474
|
+
{ x: bounds.minX + bounds.width, y: bounds.minY },
|
|
475
|
+
{ x: bounds.minX + bounds.width, y: bounds.minY + bounds.height },
|
|
476
|
+
{ x: bounds.minX, y: bounds.minY + bounds.height },
|
|
477
|
+
];
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Detect and decode one clean, integer-scaled Stacked Omnidirectional symbol.
|
|
482
|
+
*
|
|
483
|
+
* The detector intentionally accepts only a complete dark bounding box whose
|
|
484
|
+
* dimensions are a legal 50-module symbol. This keeps ordinary one-row
|
|
485
|
+
* DataBar symbols and arbitrary two-row artwork out of the result.
|
|
486
|
+
*/
|
|
487
|
+
export function detectDataBarStackedOmnidirectional(binaryImage, options = {}) {
|
|
488
|
+
if (!isRecord(binaryImage) || typeof binaryImage.get !== 'function'
|
|
489
|
+
|| !isSafeDimension(binaryImage.width) || !isSafeDimension(binaryImage.height)
|
|
490
|
+
|| binaryImage.width * binaryImage.height > MAX_MODULES) return null;
|
|
491
|
+
if (!isRecord(options)) return null;
|
|
492
|
+
|
|
493
|
+
let oriented = binaryImage;
|
|
494
|
+
let toOriginal = (point) => ({ x: point.x, y: point.y });
|
|
495
|
+
for (let rotation = 0; rotation < 4; rotation++) {
|
|
496
|
+
try {
|
|
497
|
+
const bounds = boundsFor(oriented);
|
|
498
|
+
if (bounds && bounds.width % ROW_MODULES === 0) {
|
|
499
|
+
const scale = bounds.width / ROW_MODULES;
|
|
500
|
+
const candidate = sampledCandidate(oriented, bounds, scale);
|
|
501
|
+
if (candidate) {
|
|
502
|
+
const decoded = decodeDataBarStackedOmnidirectional(candidate.matrix, options);
|
|
503
|
+
const corners = cornersFor(bounds).map((point) => toOriginal(point));
|
|
504
|
+
const geometry = createDetectionCandidate({
|
|
505
|
+
corners,
|
|
506
|
+
moduleSize: scale,
|
|
507
|
+
rotation: rotation * 90,
|
|
508
|
+
matrix: candidate.matrix,
|
|
509
|
+
confidence: 1,
|
|
510
|
+
}, {
|
|
511
|
+
result: decoded,
|
|
512
|
+
quality: {
|
|
513
|
+
quietZone: bounds.minX > 0 && bounds.minY > 0
|
|
514
|
+
&& bounds.maxX < oriented.width - 1 && bounds.maxY < oriented.height - 1,
|
|
515
|
+
checksum: true,
|
|
516
|
+
rows: 2,
|
|
517
|
+
consistency: 1,
|
|
518
|
+
},
|
|
519
|
+
score: 1,
|
|
520
|
+
});
|
|
521
|
+
return Object.freeze({
|
|
522
|
+
...decoded,
|
|
523
|
+
...geometry,
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
} catch (error) {
|
|
528
|
+
// A geometric candidate is not necessarily a valid symbol. Continue
|
|
529
|
+
// with the next orientation without leaking implementation errors.
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
const previous = oriented;
|
|
533
|
+
const previousToOriginal = toOriginal;
|
|
534
|
+
try {
|
|
535
|
+
oriented = rotateClockwise(previous);
|
|
536
|
+
} catch (error) {
|
|
537
|
+
return null;
|
|
538
|
+
}
|
|
539
|
+
toOriginal = (point) => previousToOriginal({ x: point.y, y: previous.height - point.x });
|
|
540
|
+
}
|
|
541
|
+
return null;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
/** Detect-and-decode alias matching the other matrix-format modules. */
|
|
545
|
+
export const detectAndDecodeDataBarStackedOmnidirectional = detectDataBarStackedOmnidirectional;
|
|
546
|
+
|
|
547
|
+
// Short and DataBar-14 spellings keep direct module consumers compatible with
|
|
548
|
+
// the naming used by the existing DataBar-14 helpers without widening package
|
|
549
|
+
// facades or changing the public index in this focused milestone.
|
|
550
|
+
export const encodeDataBarStackedOmni = encodeDataBarStackedOmnidirectional;
|
|
551
|
+
export const decodeDataBarStackedOmni = decodeDataBarStackedOmnidirectional;
|
|
552
|
+
export const detectDataBarStackedOmni = detectDataBarStackedOmnidirectional;
|
|
553
|
+
export const detectAndDecodeDataBarStackedOmni = detectDataBarStackedOmnidirectional;
|
|
554
|
+
export const encodeDataBar14StackedOmnidirectional = encodeDataBarStackedOmnidirectional;
|
|
555
|
+
export const decodeDataBar14StackedOmnidirectional = decodeDataBarStackedOmnidirectional;
|
|
556
|
+
export const detectDataBar14StackedOmnidirectional = detectDataBarStackedOmnidirectional;
|
|
557
|
+
export const encodeDataBar14StackedOmni = encodeDataBarStackedOmnidirectional;
|
|
558
|
+
export const decodeDataBar14StackedOmni = decodeDataBarStackedOmnidirectional;
|
|
559
|
+
export const detectDataBar14StackedOmni = detectDataBarStackedOmnidirectional;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Sythos Barcode Suite
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2026 Sythos
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* SPDX-License-Identifier: MIT
|
|
27
|
+
*
|
|
28
|
+
* Original work. No code from any other barcode implementation.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
import type { BitMatrix } from '../core/bit-matrix.js';
|
|
32
|
+
|
|
33
|
+
export interface DataBarStackedEncodeOptions {
|
|
34
|
+
linkage?: boolean;
|
|
35
|
+
/** Total height; must be an integer multiple of the 13-module profile. */
|
|
36
|
+
height?: number;
|
|
37
|
+
/** Integer nearest-neighbour scale for the 50-module symbol width. */
|
|
38
|
+
moduleScale?: number;
|
|
39
|
+
/** Alias for moduleScale. */
|
|
40
|
+
scale?: number;
|
|
41
|
+
/** Explicit output height of the top row, in modules. */
|
|
42
|
+
topHeight?: number;
|
|
43
|
+
/** Explicit output height of the separator, in modules. */
|
|
44
|
+
separatorHeight?: number;
|
|
45
|
+
/** Explicit output height of the bottom row, in modules. */
|
|
46
|
+
bottomHeight?: number;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface DataBarStackedDecodeResult {
|
|
50
|
+
readonly format: 'databar-stacked';
|
|
51
|
+
readonly variant: 'stacked';
|
|
52
|
+
readonly text: string;
|
|
53
|
+
readonly gtin: string;
|
|
54
|
+
readonly gs1: true;
|
|
55
|
+
readonly linkage: boolean;
|
|
56
|
+
readonly checksum: number;
|
|
57
|
+
readonly rows: 2;
|
|
58
|
+
readonly topHeight: number;
|
|
59
|
+
readonly separatorHeight: number;
|
|
60
|
+
readonly bottomHeight: number;
|
|
61
|
+
readonly moduleScale: number;
|
|
62
|
+
readonly symbologyIdentifier: ']e0';
|
|
63
|
+
readonly elements: ReadonlyArray<{ readonly ai: '01'; readonly value: string; readonly fixed: true }>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface DataBarStackedDetection extends DataBarStackedDecodeResult {
|
|
67
|
+
readonly result: DataBarStackedDecodeResult;
|
|
68
|
+
readonly matrix: BitMatrix;
|
|
69
|
+
readonly corners: ReadonlyArray<{ readonly x: number; readonly y: number }>;
|
|
70
|
+
readonly rotation: 0 | 90 | 180 | 270;
|
|
71
|
+
readonly moduleSize: number;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** Encode a checked 14-digit GTIN as GS1 DataBar Stacked. */
|
|
75
|
+
export declare function encodeDataBar14Stacked(
|
|
76
|
+
value: string | number,
|
|
77
|
+
options?: DataBarStackedEncodeOptions,
|
|
78
|
+
): BitMatrix;
|
|
79
|
+
|
|
80
|
+
/** Decode a clean or integer-scaled GS1 DataBar Stacked matrix. */
|
|
81
|
+
export declare function decodeDataBar14Stacked(matrix: BitMatrix): DataBarStackedDecodeResult;
|
|
82
|
+
|
|
83
|
+
/** Detect one clean axis-aligned or quarter-turned Stacked symbol. */
|
|
84
|
+
export declare function detectDataBar14Stacked(binaryImage: BitMatrix): DataBarStackedDetection | null;
|
|
85
|
+
|
|
86
|
+
/** Detect and decode one clean Stacked symbol, or return null. */
|
|
87
|
+
export declare function detectAndDecodeDataBar14Stacked(binaryImage: BitMatrix): DataBarStackedDetection | null;
|
|
88
|
+
|
|
89
|
+
export declare const encodeDataBarStacked: typeof encodeDataBar14Stacked;
|
|
90
|
+
export declare const decodeDataBarStacked: typeof decodeDataBar14Stacked;
|
|
91
|
+
export declare const detectDataBarStacked: typeof detectDataBar14Stacked;
|
|
92
|
+
export declare const detectAndDecodeDataBarStacked: typeof detectAndDecodeDataBar14Stacked;
|
|
93
|
+
export declare const encodeGS1DataBarStacked: typeof encodeDataBar14Stacked;
|
|
94
|
+
export declare const decodeGS1DataBarStacked: typeof decodeDataBar14Stacked;
|
|
95
|
+
export declare const detectGS1DataBarStacked: typeof detectDataBar14Stacked;
|
|
96
|
+
export declare const detectAndDecodeGS1DataBarStacked: typeof detectAndDecodeDataBar14Stacked;
|