"use strict";
/**
 * Node.js utility functions
 * Re-exports shared utilities and adds Node.js-specific implementations
 */
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.stringToUtf16Le = exports.uint8ArrayToBase64 = exports.base64ToUint8Array = exports.bufferToString = exports.objectFromProps = exports.toSortedArray = exports.range = exports.parseBoolean = exports.isDateFmt = exports.validInt = exports.xmlEncode = exports.xmlDecode = exports.getRelsPath = exports.parsePath = exports.toIsoDateString = exports.excelToDate = exports.dateToExcel = exports.inherits = exports.nop = exports.delay = void 0;
exports.fileExists = fileExists;
const fs_1 = __importDefault(require("fs"));
// Re-export all shared utilities
var utils_base_1 = require("./utils.base.js");
Object.defineProperty(exports, "delay", { enumerable: true, get: function () { return utils_base_1.delay; } });
Object.defineProperty(exports, "nop", { enumerable: true, get: function () { return utils_base_1.nop; } });
Object.defineProperty(exports, "inherits", { enumerable: true, get: function () { return utils_base_1.inherits; } });
Object.defineProperty(exports, "dateToExcel", { enumerable: true, get: function () { return utils_base_1.dateToExcel; } });
Object.defineProperty(exports, "excelToDate", { enumerable: true, get: function () { return utils_base_1.excelToDate; } });
Object.defineProperty(exports, "toIsoDateString", { enumerable: true, get: function () { return utils_base_1.toIsoDateString; } });
Object.defineProperty(exports, "parsePath", { enumerable: true, get: function () { return utils_base_1.parsePath; } });
Object.defineProperty(exports, "getRelsPath", { enumerable: true, get: function () { return utils_base_1.getRelsPath; } });
Object.defineProperty(exports, "xmlDecode", { enumerable: true, get: function () { return utils_base_1.xmlDecode; } });
Object.defineProperty(exports, "xmlEncode", { enumerable: true, get: function () { return utils_base_1.xmlEncode; } });
Object.defineProperty(exports, "validInt", { enumerable: true, get: function () { return utils_base_1.validInt; } });
Object.defineProperty(exports, "isDateFmt", { enumerable: true, get: function () { return utils_base_1.isDateFmt; } });
Object.defineProperty(exports, "parseBoolean", { enumerable: true, get: function () { return utils_base_1.parseBoolean; } });
Object.defineProperty(exports, "range", { enumerable: true, get: function () { return utils_base_1.range; } });
Object.defineProperty(exports, "toSortedArray", { enumerable: true, get: function () { return utils_base_1.toSortedArray; } });
Object.defineProperty(exports, "objectFromProps", { enumerable: true, get: function () { return utils_base_1.objectFromProps; } });
Object.defineProperty(exports, "bufferToString", { enumerable: true, get: function () { return utils_base_1.bufferToString; } });
Object.defineProperty(exports, "base64ToUint8Array", { enumerable: true, get: function () { return utils_base_1.base64ToUint8Array; } });
Object.defineProperty(exports, "uint8ArrayToBase64", { enumerable: true, get: function () { return utils_base_1.uint8ArrayToBase64; } });
Object.defineProperty(exports, "stringToUtf16Le", { enumerable: true, get: function () { return utils_base_1.stringToUtf16Le; } });
// =============================================================================
// File system utilities (Node.js only)
// =============================================================================
async function fileExists(path) {
    try {
        await fs_1.default.promises.access(path, fs_1.default.constants.F_OK);
        return true;
    }
    catch {
        return false;
    }
}
