const require_rolldown_runtime = require('../../../../../../_virtual/rolldown_runtime.js');
const require_assertString$1 = require('./util/assertString.js');

//#region ../../node_modules/.pnpm/validator@13.12.0/node_modules/validator/lib/isLuhnNumber.js
var require_isLuhnNumber = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.pnpm/validator@13.12.0/node_modules/validator/lib/isLuhnNumber.js": ((exports, module) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.default = isLuhnNumber;
	var _assertString = _interopRequireDefault(require_assertString$1.require_assertString());
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { default: obj };
	}
	function isLuhnNumber(str) {
		(0, _assertString.default)(str);
		var sanitized = str.replace(/[- ]+/g, "");
		var sum = 0;
		var digit;
		var tmpNum;
		var shouldDouble;
		for (var i = sanitized.length - 1; i >= 0; i--) {
			digit = sanitized.substring(i, i + 1);
			tmpNum = parseInt(digit, 10);
			if (shouldDouble) {
				tmpNum *= 2;
				if (tmpNum >= 10) sum += tmpNum % 10 + 1;
				else sum += tmpNum;
			} else sum += tmpNum;
			shouldDouble = !shouldDouble;
		}
		return !!(sum % 10 === 0 ? sanitized : false);
	}
	module.exports = exports.default;
	module.exports.default = exports.default;
}) });

//#endregion
Object.defineProperty(exports, 'default', {
  enumerable: true,
  get: function () {
    return require_isLuhnNumber();
  }
});