import '../../../../../../../../_virtual/_commonjsHelpers.mjs';
import { __exports as checksums } from '../../../../../../../../_virtual/checksums2.mjs';

"use strict";

Object.defineProperty(checksums, "__esModule", {
	value: true
});
var mod10_1 = checksums.mod10 = mod10;
var mod11_1 = checksums.mod11 = mod11;
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;
}

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;
}

export { checksums as default, mod10_1 as mod10, mod11_1 as mod11 };
//# sourceMappingURL=checksums.mjs.map
