buildfiles

This commit is contained in:
2026-04-13 08:19:53 +08:00
parent 273c8e8153
commit 51615a6859
54130 changed files with 6270898 additions and 30 deletions

48
node_modules/jsbarcode/src/barcodes/MSI/MSI.js generated vendored Normal file
View File

@@ -0,0 +1,48 @@
// Encoding documentation
// https://en.wikipedia.org/wiki/MSI_Barcode#Character_set_and_binary_lookup
import Barcode from "../Barcode.js";
class MSI extends Barcode{
constructor(data, options){
super(data, options);
}
encode(){
// Start bits
var ret = "110";
for(var i = 0; i < this.data.length; i++){
// Convert the character to binary (always 4 binary digits)
var digit = parseInt(this.data[i]);
var bin = digit.toString(2);
bin = addZeroes(bin, 4 - bin.length);
// Add 100 for every zero and 110 for every 1
for(var b = 0; b < bin.length; b++){
ret += bin[b] == "0" ? "100" : "110";
}
}
// End bits
ret += "1001";
return {
data: ret,
text: this.text
};
}
valid(){
return this.data.search(/^[0-9]+$/) !== -1;
}
}
function addZeroes(number, n){
for(var i = 0; i < n; i++){
number = "0" + number;
}
return number;
}
export default MSI;

10
node_modules/jsbarcode/src/barcodes/MSI/MSI10.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
import MSI from './MSI.js';
import {mod10} from './checksums.js';
class MSI10 extends MSI{
constructor(data, options){
super(data + mod10(data), options);
}
}
export default MSI10;

12
node_modules/jsbarcode/src/barcodes/MSI/MSI1010.js generated vendored Normal file
View File

@@ -0,0 +1,12 @@
import MSI from './MSI.js';
import {mod10} from './checksums.js';
class MSI1010 extends MSI{
constructor(data, options){
data += mod10(data);
data += mod10(data);
super(data, options);
}
}
export default MSI1010;

10
node_modules/jsbarcode/src/barcodes/MSI/MSI11.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
import MSI from './MSI.js';
import {mod11} from './checksums.js';
class MSI11 extends MSI{
constructor(data, options){
super(data + mod11(data), options);
}
}
export default MSI11;

12
node_modules/jsbarcode/src/barcodes/MSI/MSI1110.js generated vendored Normal file
View File

@@ -0,0 +1,12 @@
import MSI from './MSI.js';
import {mod10, mod11} from './checksums.js';
class MSI1110 extends MSI{
constructor(data, options){
data += mod11(data);
data += mod10(data);
super(data, options);
}
}
export default MSI1110;

23
node_modules/jsbarcode/src/barcodes/MSI/checksums.js generated vendored Normal file
View File

@@ -0,0 +1,23 @@
export function mod10(number){
var sum = 0;
for(var i = 0; i < number.length; i++){
var n = parseInt(number[i]);
if((i + number.length) % 2 === 0){
sum += n;
}
else{
sum += (n * 2) % 10 + Math.floor((n * 2) / 10);
}
}
return (10 - (sum % 10)) % 10;
}
export function mod11(number){
var sum = 0;
var weights = [2, 3, 4, 5, 6, 7];
for(var i = 0; i < number.length; i++){
var n = parseInt(number[number.length - 1 - i]);
sum += weights[i % weights.length] * n;
}
return (11 - (sum % 11)) % 11;
}

7
node_modules/jsbarcode/src/barcodes/MSI/index.js generated vendored Normal file
View File

@@ -0,0 +1,7 @@
import MSI from './MSI.js';
import MSI10 from './MSI10.js';
import MSI11 from './MSI11.js';
import MSI1010 from './MSI1010.js';
import MSI1110 from './MSI1110.js';
export {MSI, MSI10, MSI11, MSI1010, MSI1110};