✨ MAJOR FEATURES: • Auto-zoom intelligence với smart bounds fitting • Enhanced 3D GPS markers với pulsing effects • Professional route display với 6-layer rendering • Status-based parking icons với availability indicators • Production-ready build optimizations 🗺️ AUTO-ZOOM FEATURES: • Smart bounds fitting cho GPS + selected parking • Adaptive padding (50px) cho visual balance • Max zoom control (level 16) để tránh quá gần • Dynamic centering khi không có selection 🎨 ENHANCED VISUALS: • 3D GPS marker với multi-layer pulse effects • Advanced parking icons với status colors • Selection highlighting với animation • Dimming system cho non-selected items 🛣️ ROUTE SYSTEM: • OpenRouteService API integration • Multi-layer route rendering (glow, shadow, main, animated) • Real-time distance & duration calculation • Visual route info trong popup 📱 PRODUCTION READY: • SSR safe với dynamic imports • Build errors resolved • Global deployment via Vercel • Optimized performance 🌍 DEPLOYMENT: • Vercel: https://whatever-ctk2auuxr-phong12hexdockworks-projects.vercel.app • Bundle size: 22.8 kB optimized • Global CDN distribution • HTTPS enabled 💾 VERSION CONTROL: • MapView-v2.0.tsx backup created • MAPVIEW_VERSIONS.md documentation • Full version history tracking
56 lines
1.7 KiB
JavaScript
56 lines
1.7 KiB
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = isISBN;
|
|
var _assertString = _interopRequireDefault(require("./util/assertString"));
|
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
var possibleIsbn10 = /^(?:[0-9]{9}X|[0-9]{10})$/;
|
|
var possibleIsbn13 = /^(?:[0-9]{13})$/;
|
|
var factor = [1, 3];
|
|
function isISBN(isbn, options) {
|
|
(0, _assertString.default)(isbn);
|
|
|
|
// For backwards compatibility:
|
|
// isISBN(str [, version]), i.e. `options` could be used as argument for the legacy `version`
|
|
var version = String((options === null || options === void 0 ? void 0 : options.version) || options);
|
|
if (!(options !== null && options !== void 0 && options.version || options)) {
|
|
return isISBN(isbn, {
|
|
version: 10
|
|
}) || isISBN(isbn, {
|
|
version: 13
|
|
});
|
|
}
|
|
var sanitizedIsbn = isbn.replace(/[\s-]+/g, '');
|
|
var checksum = 0;
|
|
if (version === '10') {
|
|
if (!possibleIsbn10.test(sanitizedIsbn)) {
|
|
return false;
|
|
}
|
|
for (var i = 0; i < version - 1; i++) {
|
|
checksum += (i + 1) * sanitizedIsbn.charAt(i);
|
|
}
|
|
if (sanitizedIsbn.charAt(9) === 'X') {
|
|
checksum += 10 * 10;
|
|
} else {
|
|
checksum += 10 * sanitizedIsbn.charAt(9);
|
|
}
|
|
if (checksum % 11 === 0) {
|
|
return true;
|
|
}
|
|
} else if (version === '13') {
|
|
if (!possibleIsbn13.test(sanitizedIsbn)) {
|
|
return false;
|
|
}
|
|
for (var _i = 0; _i < 12; _i++) {
|
|
checksum += factor[_i % 2] * sanitizedIsbn.charAt(_i);
|
|
}
|
|
if (sanitizedIsbn.charAt(12) - (10 - checksum % 10) % 10 === 0) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
module.exports = exports.default;
|
|
module.exports.default = exports.default; |