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/isISO8601.js
var require_isISO8601 = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.pnpm/validator@13.12.0/node_modules/validator/lib/isISO8601.js": ((exports, module) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports.default = isISO8601;
	var _assertString = _interopRequireDefault(require_assertString$1.require_assertString());
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { default: obj };
	}
	var iso8601 = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;
	var iso8601StrictSeparator = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;
	var isValidDate = function isValidDate$1(str) {
		var ordinalMatch = str.match(/^(\d{4})-?(\d{3})([ T]{1}\.*|$)/);
		if (ordinalMatch) {
			var oYear = Number(ordinalMatch[1]);
			var oDay = Number(ordinalMatch[2]);
			if (oYear % 4 === 0 && oYear % 100 !== 0 || oYear % 400 === 0) return oDay <= 366;
			return oDay <= 365;
		}
		var match = str.match(/(\d{4})-?(\d{0,2})-?(\d*)/).map(Number);
		var year = match[1];
		var month = match[2];
		var day = match[3];
		var monthString = month ? "0".concat(month).slice(-2) : month;
		var dayString = day ? "0".concat(day).slice(-2) : day;
		var d = new Date("".concat(year, "-").concat(monthString || "01", "-").concat(dayString || "01"));
		if (month && day) return d.getUTCFullYear() === year && d.getUTCMonth() + 1 === month && d.getUTCDate() === day;
		return true;
	};
	function isISO8601(str) {
		var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
		(0, _assertString.default)(str);
		var check = options.strictSeparator ? iso8601StrictSeparator.test(str) : iso8601.test(str);
		if (check && options.strict) return isValidDate(str);
		return check;
	}
	module.exports = exports.default;
	module.exports.default = exports.default;
}) });

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