"use strict";
exports.__esModule = true;
exports.compareVersion = exports.versionToCode = void 0;
var versionToCode = function (version) {
    if (!version)
        return 0;
    var _a = version.split('.').map(function (val) { return Number(val); }), _b = _a[0], p0 = _b === void 0 ? 0 : _b, _c = _a[1], p1 = _c === void 0 ? 0 : _c, _d = _a[2], p2 = _d === void 0 ? 0 : _d;
    return p0 * 10000 + p1 * 100 + p2;
};
exports.versionToCode = versionToCode;
var compareVersion = function (version1, version2) {
    return (0, exports.versionToCode)(version2) - (0, exports.versionToCode)(version1);
};
exports.compareVersion = compareVersion;
