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ACJ,MAAM,EAAiB,IAAI,SAAQ,CAAC,EAAG,KACnC,EAAgB,YAAW,KACvB,EAAO,IAAI,MAAM,yCAAyC,OAAe,GAC1E,EAAU,IAEjB,UAEU,QAAQ,KAAK,CAAC,KAAK,KAAI,GAAO,GACxC,CACA,MAAO,GACH,MAAM,EAAS,KAAK,QAAQ,SAC5B,KAAI,aAAe,OAAS,EAAI,QAAQ,SAAS,YAa7C,MADA,EAAO,MAAM,iCAAkC,GACzC,EAZN,EAAO,MAAM,2CAA2C,oCAExD,UACU,KAAK,KAAI,EACnB,CACA,MAAO,GAEH,MADA,EAAO,MAAM,+DAAgE,GACvE,CACV,CAMR,CACA,QACyB,MAAjB,GACA,aAAa,EACrB,CACJ,CACJ,EAEJ,QAAQ,SAAW,SAgBnB,QAAQ,SAAW,IAAI","file":"/npm/exiftool-vendored@35.0.0/dist/ExifTool.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/exiftool-vendored@35.0.0/dist/ExifTool.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n    o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n    var ownKeys = function(o) {\n        ownKeys = Object.getOwnPropertyNames || function (o) {\n            var ar = [];\n            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n            return ar;\n        };\n        return ownKeys(o);\n    };\n    return function (mod) {\n        if (mod && mod.__esModule) return mod;\n        var result = {};\n        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n        __setModuleDefault(result, mod);\n        return result;\n    };\n})();\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.exiftool = exports.ExifTool = exports.WriteTaskOptionFields = exports.DefaultWriteTaskOptions = exports.zoneToShortOffset = exports.validTzOffsetMinutes = exports.ValidTimezoneOffsets = exports.UnsetZoneOffsetMinutes = exports.UnsetZoneName = exports.UnsetZone = exports.TimezoneOffsetTagnames = exports.TimezoneOffsetRE = exports.parseTimezoneOffsetToMinutes = exports.parseTimezoneOffsetMatch = exports.offsetMinutesToZoneName = exports.normalizeZone = exports.isZoneValid = exports.isZoneUnset = exports.isZone = exports.isUTC = exports.inferLikelyOffsetMinutes = exports.extractZone = exports.extractTzOffsetFromUTCOffset = exports.extractTzOffsetFromTags = exports.equivalentZones = exports.defaultVideosToUTC = exports.ArchaicTimezoneOffsets = exports.strEnum = exports.Settings = exports.Setting = exports.DefaultReadTaskOptions = exports.DefaultReadRawTaskOptions = exports.parseJSON = exports.isGeolocationTag = exports.GeolocationTagNames = exports.exiftoolPath = exports.ExifToolTask = exports.ExifTime = exports.ExifDateTime = exports.ExifDate = exports.DefaultMaxProcs = exports.DefaultExiftoolArgs = exports.DefaultExifToolOptions = exports.CapturedAtTagNames = exports.BinaryField = exports.retryOnReject = void 0;\nconst bc = __importStar(require(\"batch-cluster\"));\nconst _cp = __importStar(require(\"node:child_process\"));\nconst _fs = __importStar(require(\"node:fs\"));\nconst node_process_1 = __importDefault(require(\"node:process\"));\nconst Array_1 = require(\"./Array\");\nconst AsyncRetry_1 = require(\"./AsyncRetry\");\nconst BinaryExtractionTask_1 = require(\"./BinaryExtractionTask\");\nconst BinaryToBufferTask_1 = require(\"./BinaryToBufferTask\");\nconst DefaultExifToolOptions_1 = require(\"./DefaultExifToolOptions\");\nconst DeleteAllTagsArgs_1 = require(\"./DeleteAllTagsArgs\");\nconst ExifToolOptions_1 = require(\"./ExifToolOptions\");\nconst ExiftoolPath_1 = require(\"./ExiftoolPath\");\nconst IsWin32_1 = require(\"./IsWin32\");\nconst Lazy_1 = require(\"./Lazy\");\nconst Object_1 = require(\"./Object\");\nconst Pick_1 = require(\"./Pick\");\nconst ReadRawTask_1 = require(\"./ReadRawTask\");\nconst ReadTask_1 = require(\"./ReadTask\");\nconst RewriteAllTagsTask_1 = require(\"./RewriteAllTagsTask\");\nconst Settings_1 = require(\"./Settings\");\nconst String_1 = require(\"./String\");\nconst VersionTask_1 = require(\"./VersionTask\");\nconst Which_1 = require(\"./Which\");\nconst WriteTask_1 = require(\"./WriteTask\");\nvar AsyncRetry_2 = require(\"./AsyncRetry\");\nObject.defineProperty(exports, \"retryOnReject\", { enumerable: true, get: function () { return AsyncRetry_2.retryOnReject; } });\nvar BinaryField_1 = require(\"./BinaryField\");\nObject.defineProperty(exports, \"BinaryField\", { enumerable: true, get: function () { return BinaryField_1.BinaryField; } });\nvar CapturedAtTagNames_1 = require(\"./CapturedAtTagNames\");\nObject.defineProperty(exports, \"CapturedAtTagNames\", { enumerable: true, get: function () { return CapturedAtTagNames_1.CapturedAtTagNames; } });\nvar DefaultExifToolOptions_2 = require(\"./DefaultExifToolOptions\");\nObject.defineProperty(exports, \"DefaultExifToolOptions\", { enumerable: true, get: function () { return DefaultExifToolOptions_2.DefaultExifToolOptions; } });\nvar DefaultExiftoolArgs_1 = require(\"./DefaultExiftoolArgs\");\nObject.defineProperty(exports, \"DefaultExiftoolArgs\", { enumerable: true, get: function () { return DefaultExiftoolArgs_1.DefaultExiftoolArgs; } });\nvar DefaultMaxProcs_1 = require(\"./DefaultMaxProcs\");\nObject.defineProperty(exports, \"DefaultMaxProcs\", { enumerable: true, get: function () { return DefaultMaxProcs_1.DefaultMaxProcs; } });\nvar ExifDate_1 = require(\"./ExifDate\");\nObject.defineProperty(exports, \"ExifDate\", { enumerable: true, get: function () { return ExifDate_1.ExifDate; } });\nvar ExifDateTime_1 = require(\"./ExifDateTime\");\nObject.defineProperty(exports, \"ExifDateTime\", { enumerable: true, get: function () { return ExifDateTime_1.ExifDateTime; } });\nvar ExifTime_1 = require(\"./ExifTime\");\nObject.defineProperty(exports, \"ExifTime\", { enumerable: true, get: function () { return ExifTime_1.ExifTime; } });\nvar ExifToolTask_1 = require(\"./ExifToolTask\");\nObject.defineProperty(exports, \"ExifToolTask\", { enumerable: true, get: function () { return ExifToolTask_1.ExifToolTask; } });\nvar ExiftoolPath_2 = require(\"./ExiftoolPath\");\nObject.defineProperty(exports, \"exiftoolPath\", { enumerable: true, get: function () { return ExiftoolPath_2.exiftoolPath; } });\nvar GeolocationTags_1 = require(\"./GeolocationTags\");\nObject.defineProperty(exports, \"GeolocationTagNames\", { enumerable: true, get: function () { return GeolocationTags_1.GeolocationTagNames; } });\nObject.defineProperty(exports, \"isGeolocationTag\", { enumerable: true, get: function () { return GeolocationTags_1.isGeolocationTag; } });\nvar JSON_1 = require(\"./JSON\");\nObject.defineProperty(exports, \"parseJSON\", { enumerable: true, get: function () { return JSON_1.parseJSON; } });\nvar ReadRawTask_2 = require(\"./ReadRawTask\");\nObject.defineProperty(exports, \"DefaultReadRawTaskOptions\", { enumerable: true, get: function () { return ReadRawTask_2.DefaultReadRawTaskOptions; } });\nvar ReadTask_2 = require(\"./ReadTask\");\nObject.defineProperty(exports, \"DefaultReadTaskOptions\", { enumerable: true, get: function () { return ReadTask_2.DefaultReadTaskOptions; } });\nvar Settings_2 = require(\"./Settings\");\nObject.defineProperty(exports, \"Setting\", { enumerable: true, get: function () { return Settings_2.Setting; } });\nObject.defineProperty(exports, \"Settings\", { enumerable: true, get: function () { return Settings_2.Settings; } });\nvar StrEnum_1 = require(\"./StrEnum\");\nObject.defineProperty(exports, \"strEnum\", { enumerable: true, get: function () { return StrEnum_1.strEnum; } });\nvar Timezones_1 = require(\"./Timezones\");\nObject.defineProperty(exports, \"ArchaicTimezoneOffsets\", { enumerable: true, get: function () { return Timezones_1.ArchaicTimezoneOffsets; } });\nObject.defineProperty(exports, \"defaultVideosToUTC\", { enumerable: true, get: function () { return Timezones_1.defaultVideosToUTC; } });\nObject.defineProperty(exports, \"equivalentZones\", { enumerable: true, get: function () { return Timezones_1.equivalentZones; } });\nObject.defineProperty(exports, \"extractTzOffsetFromTags\", { enumerable: true, get: function () { return Timezones_1.extractTzOffsetFromTags; } });\nObject.defineProperty(exports, \"extractTzOffsetFromUTCOffset\", { enumerable: true, get: function () { return Timezones_1.extractTzOffsetFromUTCOffset; } });\nObject.defineProperty(exports, \"extractZone\", { enumerable: true, get: function () { return Timezones_1.extractZone; } });\nObject.defineProperty(exports, \"inferLikelyOffsetMinutes\", { enumerable: true, get: function () { return Timezones_1.inferLikelyOffsetMinutes; } });\nObject.defineProperty(exports, \"isUTC\", { enumerable: true, get: function () { return Timezones_1.isUTC; } });\nObject.defineProperty(exports, \"isZone\", { enumerable: true, get: function () { return Timezones_1.isZone; } });\nObject.defineProperty(exports, \"isZoneUnset\", { enumerable: true, get: function () { return Timezones_1.isZoneUnset; } });\nObject.defineProperty(exports, \"isZoneValid\", { enumerable: true, get: function () { return Timezones_1.isZoneValid; } });\nObject.defineProperty(exports, \"normalizeZone\", { enumerable: true, get: function () { return Timezones_1.normalizeZone; } });\nObject.defineProperty(exports, \"offsetMinutesToZoneName\", { enumerable: true, get: function () { return Timezones_1.offsetMinutesToZoneName; } });\nObject.defineProperty(exports, \"parseTimezoneOffsetMatch\", { enumerable: true, get: function () { return Timezones_1.parseTimezoneOffsetMatch; } });\nObject.defineProperty(exports, \"parseTimezoneOffsetToMinutes\", { enumerable: true, get: function () { return Timezones_1.parseTimezoneOffsetToMinutes; } });\nObject.defineProperty(exports, \"TimezoneOffsetRE\", { enumerable: true, get: function () { return Timezones_1.TimezoneOffsetRE; } });\nObject.defineProperty(exports, \"TimezoneOffsetTagnames\", { enumerable: true, get: function () { return Timezones_1.TimezoneOffsetTagnames; } });\nObject.defineProperty(exports, \"UnsetZone\", { enumerable: true, get: function () { return Timezones_1.UnsetZone; } });\nObject.defineProperty(exports, \"UnsetZoneName\", { enumerable: true, get: function () { return Timezones_1.UnsetZoneName; } });\nObject.defineProperty(exports, \"UnsetZoneOffsetMinutes\", { enumerable: true, get: function () { return Timezones_1.UnsetZoneOffsetMinutes; } });\nObject.defineProperty(exports, \"ValidTimezoneOffsets\", { enumerable: true, get: function () { return Timezones_1.ValidTimezoneOffsets; } });\nObject.defineProperty(exports, \"validTzOffsetMinutes\", { enumerable: true, get: function () { return Timezones_1.validTzOffsetMinutes; } });\nObject.defineProperty(exports, \"zoneToShortOffset\", { enumerable: true, get: function () { return Timezones_1.zoneToShortOffset; } });\nvar WriteTask_2 = require(\"./WriteTask\");\nObject.defineProperty(exports, \"DefaultWriteTaskOptions\", { enumerable: true, get: function () { return WriteTask_2.DefaultWriteTaskOptions; } });\nObject.defineProperty(exports, \"WriteTaskOptionFields\", { enumerable: true, get: function () { return WriteTask_2.WriteTaskOptionFields; } });\n/**\n * This is the hardcoded path in the exiftool shebang line (#!/usr/bin/perl).\n *\n * ExifTool's vendored Perl script uses this standard shebang path, which works\n * on most Unix-like systems. However, this may fail on systems where Perl is\n * installed elsewhere (e.g., via Homebrew on macOS: /opt/homebrew/bin/perl).\n *\n * When this hardcoded path doesn't exist, the library automatically falls back\n * to using `which perl` to locate the Perl interpreter and ignores the shebang\n * line by explicitly invoking Perl with the script as an argument.\n *\n * @see _ignoreShebang for the fallback logic\n * @see whichPerl for the dynamic Perl detection\n */\nconst PERL = \"/usr/bin/perl\";\n/**\n * Is the #!/usr/bin/perl shebang line in exiftool-vendored.pl going to fail? If\n * so, we need to find `perl` ourselves, and ignore the shebang line.\n */\nconst _ignoreShebang = (0, Lazy_1.lazy)(() => !(0, IsWin32_1.isWin32)() && !_fs.existsSync(PERL));\nconst whichPerl = (0, Lazy_1.lazy)(async () => {\n    const result = await (0, Which_1.which)(PERL);\n    if (result == null) {\n        throw new Error(\"Perl must be installed. Please add perl to your $PATH and try again.\");\n    }\n    return result;\n});\n/**\n * Manages delegating calls to a cluster of ExifTool child processes.\n *\n * **NOTE: Instances are expensive!**\n *\n * * use either the default exported singleton instance of this class,\n *   {@link exiftool}, or your own singleton\n *\n * * make sure you await {@link ExifTool.end} when you're done with an instance\n *   to clean up subprocesses\n *\n * * review the {@link ExifToolOptions} for configuration options--the default\n *   values are conservative to avoid overwhelming your system.\n *\n * @see https://photostructure.github.io/exiftool-vendored.js/ for more documentation.\n */\nclass ExifTool {\n    options;\n    batchCluster;\n    constructor(options = {}) {\n        if (options != null && typeof options !== \"object\") {\n            throw new Error(\"Please update caller to the new ExifTool constructor API\");\n        }\n        const o = (0, ExifToolOptions_1.handleDeprecatedOptions)({\n            ...DefaultExifToolOptions_1.DefaultExifToolOptions,\n            ...options,\n        });\n        // Backward compatibility: if options.logger is provided, set it as the global logger\n        const options_logger = options.logger;\n        if (options_logger != null) {\n            const providedLogger = (0, Object_1.isFunction)(options_logger)\n                ? options_logger\n                : () => options_logger;\n            Settings_1.Settings.logger.value = providedLogger;\n        }\n        const ignoreShebang = o.ignoreShebang ?? _ignoreShebang();\n        const env = { ...o.exiftoolEnv, LANG: \"C\" };\n        if ((0, String_1.notBlank)(node_process_1.default.env.EXIFTOOL_HOME) && (0, String_1.blank)(env.EXIFTOOL_HOME)) {\n            env.EXIFTOOL_HOME = node_process_1.default.env.EXIFTOOL_HOME;\n        }\n        const spawnOpts = {\n            stdio: \"pipe\",\n            shell: false,\n            detached: false, // < no orphaned exiftool procs, please\n            env,\n        };\n        const processFactory = async () => ignoreShebang\n            ? _cp.spawn(await whichPerl(), [await this.exiftoolPath(), ...o.exiftoolArgs], spawnOpts)\n            : _cp.spawn(await this.exiftoolPath(), o.exiftoolArgs, spawnOpts);\n        this.options = {\n            ...o,\n            ignoreShebang,\n            processFactory,\n        };\n        this.batchCluster = new bc.BatchCluster(this.options);\n    }\n    exiftoolPath = (0, Lazy_1.lazy)(async () => {\n        const o = await this.options.exiftoolPath;\n        if ((0, String_1.isString)(o) && (0, String_1.notBlank)(o))\n            return o;\n        if ((0, Object_1.isFunction)(o))\n            return o(this.options.logger());\n        return (0, ExiftoolPath_1.exiftoolPath)(this.options.logger());\n    });\n    #taskOptions = (0, Lazy_1.lazy)(() => (0, Pick_1.pick)(this.options, \"ignoreMinorErrors\"));\n    /**\n     * Register life cycle event listeners. Delegates to BatchCluster.\n     */\n    on = (event, listener) => this.batchCluster.on(event, listener);\n    /**\n     * Unregister life cycle event listeners. Delegates to BatchCluster.\n     */\n    off = (event, listener) => this.batchCluster.off(event, listener);\n    /**\n     * @return a promise holding the version number of the vendored ExifTool\n     */\n    version() {\n        return this.enqueueTask(() => new VersionTask_1.VersionTask(this.options));\n    }\n    read(file, argsOrOptions, options) {\n        const opts = {\n            ...(0, Pick_1.pick)(this.options, ...ReadTask_1.ReadTaskOptionFields),\n            ...((0, Object_1.isObject)(argsOrOptions) ? argsOrOptions : options),\n        };\n        opts.readArgs =\n            (0, Array_1.ifArray)(argsOrOptions) ?? (0, Array_1.ifArray)(opts.readArgs) ?? this.options.readArgs;\n        return this.enqueueTask(() => ReadTask_1.ReadTask.for(file, opts)); // < no way to know at compile time if we're going to get back a T!\n    }\n    /**\n     * Read the tags from `file`, without any post-processing of ExifTool values.\n     * @deprecated use {@link ExifTool.readRaw(file: string, options?: ReadRawTaskOptions)}\n     */\n    readRaw(file, argsOrOptions, options) {\n        const opts = {\n            ...(0, Pick_1.pick)(this.options, ...ReadRawTask_1.ReadRawTaskOptionFields),\n            ...((0, Object_1.isObject)(argsOrOptions) ? argsOrOptions : options),\n        };\n        opts.readArgs =\n            (0, Array_1.ifArray)(argsOrOptions) ?? (0, Array_1.ifArray)(opts.readArgs) ?? this.options.readArgs;\n        return this.enqueueTask(() => ReadRawTask_1.ReadRawTask.for(file, opts));\n    }\n    /**\n     * Write the given `tags` to `file`.\n     *\n     * **NOTE: no input validation is done by this library.** ExifTool, however,\n     * is strict about tag names and values in the context of the format of file\n     * being written to.\n     *\n     * **IMPORTANT:** Partial dates (year-only or year-month) are only supported\n     * for XMP tags. Use group-prefixed tag names like `\"XMP:CreateDate\"` for\n     * partial date support. EXIF tags require complete dates.\n     *\n     * @param file an existing file to write `tags` to\n     *\n     * @param tags the tags to write to `file`.\n     *\n     * @param options overrides to the default ExifTool options provided to the\n     * ExifTool constructor.\n     *\n     * @returns Either the promise will be resolved if the tags are written to\n     * successfully, or the promise will be rejected if there are errors or\n     * warnings.\n     *\n     * @see https://exiftool.org/exiftool_pod.html#overwrite_original\n     */\n    write(file, tags, writeArgsOrOptions, options) {\n        const opts = {\n            ...(0, Pick_1.pick)(this.options, ...WriteTask_1.WriteTaskOptionFields),\n            ...((0, Object_1.isObject)(writeArgsOrOptions) ? writeArgsOrOptions : options),\n        };\n        opts.writeArgs =\n            (0, Array_1.ifArray)(writeArgsOrOptions) ??\n                (0, Array_1.ifArray)(opts.writeArgs) ??\n                this.options.writeArgs;\n        // don't retry because writes might not be idempotent (e.g. incrementing\n        // timestamps by an hour)\n        const retriable = false;\n        return this.enqueueTask(() => WriteTask_1.WriteTask.for(file, tags, opts), retriable);\n    }\n    /**\n     * This will strip `file` of all metadata tags. The original file (with the\n     * name `${FILENAME}_original`) will be retained. Note that some tags, like\n     * stat information and image dimensions, are intrinsic to the file and will\n     * continue to exist if you re-`read` the file.\n     *\n     * @param {string} file the file to strip of metadata\n     *\n     * @param {(keyof Tags | string)[]} opts.retain optional. If provided, this is\n     * a list of metadata keys to **not** delete.\n     */\n    deleteAllTags(file, opts) {\n        const writeArgs = [...DeleteAllTagsArgs_1.DeleteAllTagsArgs];\n        for (const ea of opts?.retain ?? []) {\n            writeArgs.push(`-${ea}<${ea}`);\n        }\n        return this.write(file, {}, { ...(0, Object_1.omit)(opts ?? {}, \"retain\"), writeArgs });\n    }\n    /**\n     * Extract the low-resolution thumbnail in `path/to/image.jpg` and write it to\n     * `path/to/thumbnail.jpg`.\n     *\n     * Note that these images can be less than .1 megapixels in size.\n     *\n     * @return a `Promise<void>`\n     *\n     * @throws if the file could not be read or the output not written\n     */\n    extractThumbnail(imageFile, thumbnailFile, opts) {\n        return this.extractBinaryTag(\"ThumbnailImage\", imageFile, thumbnailFile, opts);\n    }\n    /**\n     * Extract the \"preview\" image in `path/to/image.jpg` and write it to\n     * `path/to/preview.jpg`.\n     *\n     * The size of these images varies widely, and is present in dSLR images.\n     * Canon, Fuji, Olympus, and Sony use this tag.\n     *\n     * @return a `Promise<void>`\n     *\n     * @throws if the file could not be read or the output not written\n     */\n    extractPreview(imageFile, previewFile, opts) {\n        return this.extractBinaryTag(\"PreviewImage\", imageFile, previewFile, opts);\n    }\n    /**\n     * Extract the \"JpgFromRaw\" image in `path/to/image.jpg` and write it to\n     * `path/to/fromRaw.jpg`.\n     *\n     * This size of these images varies widely, and is not present in all RAW\n     * images. Nikon and Panasonic use this tag.\n     *\n     * @return a `Promise<void>`\n     *\n     * @throws if the file could not be read or the output not written.\n     */\n    extractJpgFromRaw(imageFile, outputFile, opts) {\n        return this.extractBinaryTag(\"JpgFromRaw\", imageFile, outputFile, opts);\n    }\n    /**\n     * Extract a given binary value from \"tagname\" tag associated to\n     * `path/to/image.jpg` and write it to `dest` (which cannot exist and whose\n     * directory must already exist).\n     *\n     * @return a `Promise<void>`\n     *\n     * @throws if the binary output cannot be written to `dest`.\n     */\n    async extractBinaryTag(tagname, src, dest, opts) {\n        // BinaryExtractionTask returns a stringified error if the output indicates\n        // the task should not be retried.\n        const maybeError = await this.enqueueTask(() => BinaryExtractionTask_1.BinaryExtractionTask.for(tagname, src, dest, {\n            ...this.#taskOptions(),\n            ...opts,\n        }));\n        if (maybeError != null) {\n            throw new Error(maybeError);\n        }\n    }\n    /**\n     * Extract a given binary value from \"tagname\" tag associated to\n     * `path/to/image.jpg` as a `Buffer`. This has the advantage of not writing to\n     * a file, but if the payload associated to `tagname` is large, this can cause\n     * out-of-memory errors.\n     *\n     * @return a `Promise<Buffer>`\n     *\n     * @throws if the file or tag is missing.\n     */\n    async extractBinaryTagToBuffer(tagname, imageFile, opts) {\n        const result = await this.enqueueTask(() => BinaryToBufferTask_1.BinaryToBufferTask.for(tagname, imageFile, {\n            ...this.#taskOptions(),\n            ...opts,\n        }));\n        if (Buffer.isBuffer(result)) {\n            return result;\n        }\n        else if (result instanceof Error) {\n            throw result;\n        }\n        else {\n            throw new Error(\"Unexpected result from BinaryToBufferTask: \" + JSON.stringify(result));\n        }\n    }\n    /**\n     * Attempt to fix metadata problems in JPEG images by deleting all metadata\n     * and rebuilding from scratch. After repairing an image you should be able to\n     * write to it without errors, but some metadata from the original image may\n     * be lost in the process.\n     *\n     * This should only be applied as a last resort to images whose metadata is\n     * not readable via {@link ExifTool.read}.\n     *\n     * @see https://exiftool.org/faq.html#Q20\n     *\n     * @param {string} inputFile the path to the problematic image\n     * @param {string} outputFile the path to write the repaired image\n     * @param {boolean} opts.allowMakerNoteRepair if there are problems with MakerNote\n     * tags, allow ExifTool to apply heuristics to recover corrupt tags. See\n     * exiftool's `-F` flag.\n     * @return {Promise<void>} resolved after the outputFile has been written.\n     */\n    rewriteAllTags(inputFile, outputFile, opts) {\n        return this.enqueueTask(() => RewriteAllTagsTask_1.RewriteAllTagsTask.for(inputFile, outputFile, {\n            allowMakerNoteRepair: false,\n            ...this.#taskOptions(),\n            ...opts,\n        }));\n    }\n    /**\n     * Shut down running ExifTool child processes. No subsequent requests will be\n     * accepted.\n     *\n     * This may need to be called in `after` or `finally` clauses in tests or\n     * scripts for them to exit cleanly.\n     */\n    end(gracefully = true) {\n        return this.batchCluster.end(gracefully).promise;\n    }\n    /**\n     * @return true if `.end()` has been invoked\n     */\n    get ended() {\n        return this.batchCluster.ended;\n    }\n    // calling whichPerl through this lazy() means we only do that task once per\n    // instance.\n    #checkForPerl = (0, Lazy_1.lazy)(async () => {\n        if (this.options.checkPerl) {\n            await whichPerl(); // < throws if perl is missing\n        }\n    });\n    /**\n     * Most users will not need to use `enqueueTask` directly. This method\n     * supports submitting custom `BatchCluster` tasks.\n     *\n     * @param task a thunk to support retries by providing new instances on retries\n     * @param retriable whether to retry the task on failure (default: true)\n     * @returns a Promise resolving to the task result\n     *\n     * @see BinaryExtractionTask for an example task implementation\n     */\n    enqueueTask(task, retriable = true) {\n        const f = async () => {\n            await this.#checkForPerl();\n            return this.batchCluster.enqueueTask(task());\n        };\n        return retriable ? (0, AsyncRetry_1.retryOnReject)(f, this.options.taskRetries) : f();\n    }\n    /**\n     * @return the currently running ExifTool processes. Note that on Windows,\n     * these are only the process IDs of the directly-spawned ExifTool wrapper,\n     * and not the actual perl vm. This should only really be relevant for\n     * integration tests that verify processes are cleaned up properly.\n     */\n    get pids() {\n        return this.batchCluster.pids();\n    }\n    /**\n     * @return the number of pending (not currently worked on) tasks\n     */\n    get pendingTasks() {\n        return this.batchCluster.pendingTaskCount;\n    }\n    /**\n     * @return the total number of child processes created by this instance\n     */\n    get spawnedProcs() {\n        return this.batchCluster.spawnedProcCount;\n    }\n    /**\n     * @return the current number of child processes currently servicing tasks\n     */\n    get busyProcs() {\n        return this.batchCluster.busyProcCount;\n    }\n    /**\n     * @return report why child processes were recycled\n     */\n    childEndCounts() {\n        return this.batchCluster.childEndCounts;\n    }\n    /**\n     * Shut down any currently-running child processes. New child processes will\n     * be started automatically to handle new tasks.\n     */\n    closeChildProcesses(gracefully = true) {\n        return this.batchCluster.closeChildProcesses(gracefully);\n    }\n    /**\n     * Implements the Disposable interface for automatic cleanup with the `using` keyword.\n     * This allows ExifTool instances to be automatically cleaned up when they go out of scope.\n     *\n     * Note: This is a synchronous disposal method that initiates graceful cleanup but doesn't\n     * wait for completion. If graceful cleanup times out, forceful cleanup is attempted.\n     * For guaranteed cleanup completion, use `await using` with the async disposal method instead.\n     *\n     * @example\n     * ```typescript\n     * {\n     *   using et = new ExifTool();\n     *   const tags = await et.read(\"photo.jpg\");\n     *   // ExifTool cleanup will be initiated when this block exits\n     * }\n     * ```\n     */\n    [Symbol.dispose]() {\n        if (!this.ended) {\n            // Start with graceful cleanup, but use timeout for safety since this is sync disposal\n            const cleanup = this.end(true);\n            // Set up a timeout to force process exit if graceful cleanup hangs\n            // This is necessary because synchronous disposal can't wait for async operations\n            const timeoutMs = this.options.disposalTimeoutMs ?? 1000;\n            const timeoutHandle = setTimeout(() => {\n                const logger = this.options.logger();\n                logger.error(`ExifTool synchronous disposal timeout after ${timeoutMs}ms, forcing cleanup`);\n                // Force immediate termination of child processes if they exist\n                try {\n                    this.batchCluster.closeChildProcesses(false);\n                }\n                catch (err) {\n                    logger.error(\"Error during forced child process cleanup during sync disposal:\", err);\n                }\n            }, timeoutMs);\n            cleanup\n                .catch((err) => {\n                // Log error but don't throw, as disposal should not fail\n                const logger = this.options.logger();\n                logger.error(\"ExifTool synchronous disposal error:\", err);\n            })\n                .finally(() => {\n                if (timeoutHandle != null)\n                    clearTimeout(timeoutHandle);\n            });\n        }\n    }\n    /**\n     * Implements the AsyncDisposable interface for automatic async cleanup with the `await using` keyword.\n     * This allows ExifTool instances to be automatically cleaned up when they go out of scope.\n     *\n     * This method provides robust cleanup with timeout protection to prevent hanging.\n     * If graceful cleanup times out, forceful cleanup is attempted automatically.\n     *\n     * @example\n     * ```typescript\n     * {\n     *   await using et = new ExifTool();\n     *   const tags = await et.read(\"photo.jpg\");\n     *   // ExifTool will be automatically ended when this block exits\n     * }\n     * ```\n     */\n    async [Symbol.asyncDispose]() {\n        if (!this.ended) {\n            // Set up a timeout to prevent hanging indefinitely during async disposal\n            const timeoutMs = this.options.asyncDisposalTimeoutMs ?? 5000;\n            let timeoutHandle = undefined;\n            const timeoutPromise = new Promise((_, reject) => {\n                timeoutHandle = setTimeout(() => {\n                    reject(new Error(`ExifTool async disposal timeout after ${timeoutMs}ms`));\n                }, timeoutMs);\n            });\n            try {\n                // Race between graceful cleanup and timeout\n                await Promise.race([this.end(true), timeoutPromise]);\n            }\n            catch (err) {\n                const logger = this.options.logger();\n                if (err instanceof Error && err.message.includes(\"timeout\")) {\n                    logger.error(`ExifTool async disposal timed out after ${timeoutMs}ms, attempting forceful cleanup`);\n                    // Attempt forceful cleanup on timeout\n                    try {\n                        await this.end(false);\n                    }\n                    catch (forcefulErr) {\n                        logger.error(\"ExifTool forceful cleanup during async disposal also failed:\", forcefulErr);\n                        throw err; // Re-throw the original timeout error\n                    }\n                }\n                else {\n                    logger.error(\"ExifTool async disposal error:\", err);\n                    throw err;\n                }\n            }\n            finally {\n                if (timeoutHandle != null)\n                    clearTimeout(timeoutHandle);\n            }\n        }\n    }\n}\nexports.ExifTool = ExifTool;\n/**\n * This is a convenience singleton.\n *\n * As of v3.0, its {@link ExifToolOptions.maxProcs} is set to 1/4 the number of\n * CPUs on the current system; no more than `maxProcs` instances of `exiftool`\n * will be spawned. You may want to experiment with smaller or larger values for\n * `maxProcs`, depending on CPU and disk speed of your system and performance\n * tradeoffs.\n *\n * Note that each child process consumes between 10 and 50 MB of RAM. If you\n * have limited system resources you may want to use a smaller `maxProcs` value.\n *\n * See the source of {@link DefaultExifToolOptions} for more details about how\n * this instance is configured.\n */\nexports.exiftool = new ExifTool();\n"]}