"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.displayVersion = displayVersion;
exports.isDeveloperBuild = isDeveloperBuild;
exports.versionNumber = versionNumber;
const path = __importStar(require("path"));
const directories_1 = require("./directories");
function displayVersion() {
    return `${versionNumber()} (build ${commit()})`;
}
function isDeveloperBuild() {
    return versionNumber() === '0.0.0';
}
function versionNumber() {
    // eslint-disable-next-line @typescript-eslint/no-require-imports
    return require(path.join((0, directories_1.bundledPackageRootDir)(__dirname), 'package.json')).version.replace(/\+[0-9a-f]+$/, '');
}
function commit() {
    // eslint-disable-next-line @typescript-eslint/no-require-imports
    return require(path.join((0, directories_1.bundledPackageRootDir)(__dirname), 'build-info.json')).commit;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFja2FnZS1pbmZvLmpzIiwic291cmNlUm9vdCI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