{"version":3,"file":"conversions-DtNrTAb7.cjs","names":["isPlainObject","createMessage","isArray","isBigInt","isNull","filterNilArray","createMessage","getPreciseType","safeStableStringify","isNaN","isString","isNumber","isBoolean","isBigInt","isNil","isNumberObject","isBooleanObject","isStringObject","isSymbol","isFunction","isArray","isObjectOrArray","isDate","isRegExp","isError","isSet","isMap","isObject","errorMsg","getPreciseType","safeStableStringify","isArray","isEqual","isSet","isMap","createMessage","isNil","isString","isNonEmptyString","isBoolean","isNumber","isArray","isObject","isNonEmptyValue","isNil","isString","isNonEmptyString","isBoolean","isNumber","isArray","isObject","isNil","isPlainObject","isBoolean","createMessage","getPreciseType","isString","isNumber","isNil","isString","isEmptyString","isBoolean","isNumber","isArray","isString","isNaN","isNonEmptyString","isFunction","isObjectOrArray","isArray","isEmptyArray","isPlainObject","isPlainObject","isEmptyObject","safeStableStringify","isPlainObject","isUndefined","isBoolean","getPreciseType","createMessage","isPlainObject","isNil","isRegExp","isBoolean","createMessage","getPreciseType","isNumber","isNonEmptyString","isInfinityNumber","isNaN","isNumberObject","isStringObject","isBooleanObject","isDate","isBuffer","isUndefined","isEmptyArray","isTypedArray","isSet","isMap","isArray","isObject","isEmptyObject","isPlainObject","isNil","isInfinityNumber","isBoolean","createMessage","getPreciseType","isNumber","isString","isNumberObject","isNaN","isStringObject","isBooleanObject","isDate","isRegExp","isBuffer","isUndefined","isTypedArray","isEmptyArray","isSet","isMap","isArray","isObject"],"sources":["../src/conversions/arrays/casts/toNumberArrayUnRecursive.ts","../src/conversions/values/toStringDeepForce.ts","../src/conversions/arrays/transforms/dedupeArray.ts","../src/conversions/boolean/toBooleanContent.ts","../src/conversions/boolean/toBooleanContentDeep.ts","../src/conversions/boolean/toBooleanExplicit.ts","../src/conversions/boolean/toBooleanLoose.ts","../src/conversions/data-type/convert.ts","../src/conversions/object/_private/utils/deepCloneSafe.ts","../src/conversions/object/_private/utils/deleteNestedKey.ts","../src/conversions/object/_private/utils/deleteExactPathOnce.ts","../src/conversions/object/removeObjectPaths.ts","../src/conversions/values/toNumberDeep.ts","../src/conversions/values/toStringDeep.ts"],"sourcesContent":["import type {\n  NormalizeInputToNumberArrayUnRecursive,\n  ToNumberArrayUnRecursiveOptions,\n  ToNumberArrayUnRecursiveReturn\n} from \"./toNumberArrayUnRecursive.types\";\n\nimport { createMessage } from \"@/_private/logger\";\n\nimport { isNull } from \"@/predicates/is/isNull\";\nimport { isArray } from \"@/predicates/is/isArray\";\nimport { isBigInt } from \"@/predicates/is/isBigInt\";\nimport { isPlainObject } from \"@/predicates/is/isPlainObject\";\nimport { assertIsBoolean } from \"@/assertions/booleans/assertIsBoolean\";\n\nimport { filterNilArray } from \"../transforms/filterNilArray\";\n\n/** ----------------------------------------------------------------------\n * * ***Utility: `toNumberArrayUnRecursive`.***\n * -----------------------------------------------------------------------\n * **Converts a flat array of strings, numbers, nulls, or\n * undefineds into numbers.**\n *\n * ---\n * - **Behavior:**\n *     - Only supports **flat arrays** (non-recursive).\n *     - Valid inputs: `string`, `number`, `null`, `undefined`.\n *     - `BigInt` will be converted to `number`.\n *     - Other values ➔ coerced into `undefined`.\n *     - Invalid values can be **removed**\n *       (`removeInvalidValueNumber: true`) or **kept** (`false`).\n *\n * ---\n * - **Note:**\n *     - *For recursive / nested arrays,\n *       use ***`toNumberDeep` utility function*** instead.*\n *\n * ---\n * @template T - Element type of the input array.\n * @template R - Whether invalid values should be removed (`true`) or\n *               kept (`false`).\n *\n * ---\n * @param {Array<T> | readonly T[] | null | undefined} [array]\n *         The array to convert, returns `undefined` if not an array.\n * @param {ToNumberArrayUnRecursiveOptions<RemoveInvalidValue>} [options]\n *         Options to control transformation behavior,\n *         defaults to `{ removeInvalidValueNumber: true }`.\n *\n * ---\n * @returns {ToNumberArrayUnRecursiveReturn<NormalizeInput<T>, RemoveInvalidValue>}\n *         A new array of string representations, with invalid values\n *         optionally removed.\n *\n * ---\n * @example\n * ```ts\n * toNumberArrayUnRecursive(['1', 2, '3']);\n * // ➔ [1, 2, 3]\n * toNumberArrayUnRecursive([1, null, undefined, 'abc']);\n * // ➔ [1]\n * toNumberArrayUnRecursive(['1', null, undefined, 'abc'], {\n *   removeInvalidValueNumber: false\n * });\n * // ➔ [1, null, undefined, undefined]\n *\n * toNumberArrayUnRecursive(null);\n * // ➔ undefined\n * toNumberArrayUnRecursive(undefined);\n * // ➔ undefined\n * toNumberArrayUnRecursive(1);\n * // ➔ undefined\n * ```\n */\nexport function toNumberArrayUnRecursive(\n  array?: null | undefined,\n  options?: ToNumberArrayUnRecursiveOptions<boolean>\n): undefined;\nexport function toNumberArrayUnRecursive(\n  array?: Array<never>,\n  options?: ToNumberArrayUnRecursiveOptions<boolean>\n): [];\nexport function toNumberArrayUnRecursive<T, R extends boolean = true>(\n  array?: Array<T> | readonly T[] | null,\n  options?: ToNumberArrayUnRecursiveOptions<R>\n): ToNumberArrayUnRecursiveReturn<NormalizeInputToNumberArrayUnRecursive<T>, R>;\nexport function toNumberArrayUnRecursive<T = unknown>(\n  array?: T,\n  options?: ToNumberArrayUnRecursiveOptions<boolean>\n): undefined;\nexport function toNumberArrayUnRecursive<T>(\n  array?: Array<T> | readonly T[] | null,\n  options: ToNumberArrayUnRecursiveOptions<boolean> = {}\n) {\n  if (!isPlainObject(options)) options = {};\n\n  const riv = options.removeInvalidValueNumber ?? true;\n\n  assertIsBoolean(riv, {\n    message: ({ currentType, validType }) =>\n      createMessage(\n        \"toNumberArrayUnRecursive\",\n        `Parameter \\`removeInvalidValueNumber\\` property of the \\`options\\` (second parameter) must be of type \\`${validType}\\`, but received: \\`${currentType}\\`.`\n      )\n  });\n\n  if (isArray(array)) {\n    const result = Array.from(array, (x) => {\n      if (isBigInt(x)) return Number(x);\n\n      const str = String(x).trim();\n      const match = str.match(/-?\\d+(\\.\\d+)?/);\n      return match ? Number(match[0]) : isNull(x) ? null : undefined;\n    });\n\n    return riv ? filterNilArray(result) : result;\n  }\n\n  return undefined;\n}\n","import { isMap } from \"@/predicates/is/isMap\";\nimport { isNaN } from \"@/predicates/is/isNaN\";\nimport { isNil } from \"@/predicates/is/isNil\";\nimport { isSet } from \"@/predicates/is/isSet\";\nimport { isDate } from \"@/predicates/is/isDate\";\nimport { isError } from \"@/predicates/is/isError\";\nimport { isArray } from \"@/predicates/is/isArray\";\nimport { isBigInt } from \"@/predicates/is/isBigInt\";\nimport { isObject } from \"@/predicates/is/isObject\";\nimport { isRegExp } from \"@/predicates/is/isRegExp\";\nimport { isString } from \"@/predicates/is/isString\";\nimport { isNumber } from \"@/predicates/is/isNumber\";\nimport { isSymbol } from \"@/predicates/is/isSymbol\";\nimport { isBoolean } from \"@/predicates/is/isBoolean\";\nimport { isFunction } from \"@/predicates/is/isFunction\";\nimport { isNumberObject } from \"@/predicates/is/isNumberObject\";\nimport { isStringObject } from \"@/predicates/is/isStringObject\";\nimport { isBooleanObject } from \"@/predicates/is/isBooleanObject\";\nimport { isObjectOrArray } from \"@/predicates/is/isObjectOrArray\";\nimport { getPreciseType } from \"@/predicates/type/getPreciseType\";\nimport { safeStableStringify } from \"../stringify/safeStableStringify\";\nimport { createMessage } from \"@/_private/logger\";\n\n/** ----------------------------------------------------------\n * * ***Utility: `toStringDeepForce`.***\n * -----------------------------------------------------------\n * **Recursively converts a value into a string based on the `forceToString` options.**\n *\n * ---\n * - #### *Rules `forceToString` options:*\n *     - `\"stringOrNumber\"`: Converts strings and numbers to strings.\n *     - `\"primitives\"`: Converts all primitives (number, string, boolean, bigint, undefined, null, NaN) to strings.\n *     - `\"all\"`: Converts everything, including symbols, functions, Dates, RegExp, Maps, Sets, Errors, Promises,\n *        boxed primitives box (new Number, new String, new Boolean), and deeply all object properties, to strings.\n *     - `false`: Leaves everything unchanged.\n *     ---\n * - #### *Special behaviors:*\n *     - `NaN` ➔ `\"NaN\"` only in `\"primitives\"` or `\"all\"` mode.\n *     - `Date` ➔ ISO string only in `\"all\"` mode.\n *     -  ***Primitives Boxed*** (`new Number`, `new String`, `new Boolean`):\n *           - #### For `new String` we convert everything to string (behavior JS of new String):\n *                - `new String(\"hi\")` ➔ `.valueOf()` ➔ `\"hi\"`.\n *                - `new String(true)` ➔ `.valueOf()` ➔ `\"true\"`.\n *                ---\n *           - #### For `new Boolean` we convert to boolean (behavior JS of new Boolean) then convert to string:\n *                - `new Boolean(true)` ➔ `.valueOf()` ➔ `true` ➔ `true.toString()` ➔ `\"true\"`.\n *                - Special behavior JS of new Boolean, return `false` **(convert to string: `\"false\"`)**\n *                  for `false`, (`0` / `-0`), `\"\"` (empty-string), `null`, `undefined`, `NaN`, otherwise\n *                  `true` **(convert to string: `\"true\"`)**.\n *                ---\n *           - #### For `new Number`:\n *                - `new Number(42)` ➔ `.valueOf()` ➔ `42` ➔ `42.toString()` ➔ `\"42\"`.\n *                - `new Number(NaN)` ➔ `.valueOf()` ➔ `NaN` ➔ `NaN.toString()` ➔ `\"NaN\"`.\n *                - `new Number(null)` ➔ `.valueOf()` ➔ `0` (`null` is `0` behavior JS of new Number) ➔ `0.toString()` ➔ `\"0\"`.\n *                - `new Number(undefined)` ➔ `.valueOf()` ➔ `NaN` ➔ `NaN.toString()` ➔ `\"NaN\"`.\n *                - `new Number(Infinity)` ➔ `Infinity` ➔ `Infinity` ➔ `Infinity.toString()` ➔ `\"Infinity\"`.\n *                - `new Number(-Infinity)` ➔ `-Infinity` ➔ `-Infinity` ➔ `-Infinity.toString()` ➔ `\"-Infinity\"`.\n *     - `RegExp` ➔ Source string (e.g. `/abc/i`) only in `\"all\"` mode.\n *     - `Symbol` ➔ `Symbol(description)` string only in `\"all\"` mode.\n *     - `Map` ➔ Array of [key, value] pairs with keys/values stringified deeply (only in `\"all\"` mode).\n *     - `Set` ➔ Array of values stringified deeply (only in `\"all\"` mode).\n *     - `Function` ➔ Source code string (e.g. `\"() => 1\"`) only in `\"all\"` mode.\n *     - `Error`, `Promise` ➔ Stringified via `.toString()` only in `\"all\"` mode.\n *\n * ---\n * @param {*} value\n * * ***The value to process.***\n *     - ***Can be anything:***\n *         - `primitive`.\n *         - `array`.\n *         - `object`.\n *         - `function`.\n *         - `etc`.\n *\n * ---\n * @param {false | \"stringOrNumber\" | \"primitives\" | \"all\"} forceToString - ***The mode of string conversion.***\n *\n * ---\n * @returns {unknown} A new value with the conversion applied based on `forceToString`.\n *\n * ---\n * @example\n * toStringDeepForce(42, \"stringOrNumber\");\n * // ➔ \"42\"\n * toStringDeepForce(true, \"primitives\");\n * // ➔ \"true\"\n * toStringDeepForce(null, \"primitives\");\n * // ➔ \"null\"\n * toStringDeepForce(Symbol(\"x\"), \"all\");\n * // ➔ \"Symbol(x)\"\n * toStringDeepForce(new String(\"hi\"), \"all\");\n * // ➔ \"hi\"\n * toStringDeepForce(new Number(42), \"all\");\n * // ➔ \"42\"\n * toStringDeepForce(new Boolean(true), \"all\");\n * // ➔ \"true\"\n * toStringDeepForce({ a: 1, b: [2, NaN] }, \"primitives\");\n * // ➔ { a: \"1\", b: [\"2\", \"NaN\"] }\n * toStringDeepForce(new Date(\"2025-01-01\"), \"all\");\n * // ➔ \"2025-01-01T00:00:00.000Z\"\n * toStringDeepForce(() => 1, \"all\");\n * // ➔ \"() => 1\"\n * toStringDeepForce(/abc/i, \"all\");\n * // ➔ \"/abc/i\"\n * toStringDeepForce(new Map([[\"a\", 1], [\"b\", 2]]), \"all\");\n * // ➔ [[\"a\", \"1\"], [\"b\", \"2\"]]\n * toStringDeepForce(new Set([1, 2, 3]), \"all\");\n * // ➔ [\"1\", \"2\", \"3\"]\n * toStringDeepForce(new Error(\"Oops\"), \"all\");\n * // ➔ \"Error: Oops\"\n * toStringDeepForce(Promise.resolve(1), \"all\");\n * // ➔ \"[object Promise]\"\n * toStringDeepForce({ func: () => 123 }, \"all\");\n * // ➔ { func: \"() => 123\" }\n * toStringDeepForce([1, \"a\", { b: 2 }], false);\n * // ➔ [1, \"a\", { b: 2 }]\n */\nexport function toStringDeepForce<T>(\n  value: unknown,\n  forceToString: false | \"stringOrNumber\" | \"primitives\" | \"all\"\n): T;\nexport function toStringDeepForce(\n  value: unknown,\n  forceToString: false | \"stringOrNumber\" | \"primitives\" | \"all\"\n) {\n  if (\n    !(\n      forceToString === false ||\n      forceToString === \"stringOrNumber\" ||\n      forceToString === \"primitives\" ||\n      forceToString === \"all\"\n    )\n  ) {\n    throw new TypeError(\n      createMessage(\n        \"toStringDeepForce\",\n        `Second parameter \\`forceToString\\` must be of type \\`false\\` or \\`string\\` with value one of \"stringOrNumber\" | \"primitives\" | \"all\", but received: \\`${getPreciseType(\n          forceToString\n        )}\\`, with value: \\`${safeStableStringify(forceToString, {\n          keepUndefined: true\n        })}\\`.`\n      )\n    );\n  }\n\n  // NaN special\n  if (isNaN(value)) {\n    return forceToString === \"primitives\" || forceToString === \"all\"\n      ? \"NaN\"\n      : NaN;\n  }\n\n  // string or number\n  if (isString(value) || isNumber(value)) {\n    return forceToString === \"stringOrNumber\" ||\n      forceToString === \"primitives\" ||\n      forceToString === \"all\"\n      ? String(value)\n      : value;\n  }\n\n  // other primitives\n  if (isBoolean(value) || isBigInt(value) || isNil(value)) {\n    return forceToString === \"primitives\" || forceToString === \"all\"\n      ? String(value)\n      : value;\n  }\n\n  // boxed primitives box (new Number, new String, new Boolean)\n  if (\n    isNumberObject(value) ||\n    isBooleanObject(value) ||\n    isStringObject(value)\n  ) {\n    return forceToString === \"all\" ? value.valueOf().toString() : value;\n  }\n\n  // symbol\n  if (isSymbol(value)) {\n    return forceToString === \"all\" ? value.toString() : value;\n  }\n\n  // function: only convert on \"all\"\n  if (isFunction(value)) {\n    return forceToString === \"all\" ? value.toString() : value;\n  }\n\n  // array\n  if (isArray(value)) {\n    return value.map((v) => toStringDeepForce(v, forceToString));\n  }\n\n  // objects\n  if (isObjectOrArray(value)) {\n    if (isDate(value)) {\n      return forceToString === \"all\" ? value.toISOString() : value;\n    }\n    if (isRegExp(value)) {\n      return forceToString === \"all\" ? value.toString() : value;\n    }\n    if (isError(value) || value instanceof Promise) {\n      return forceToString === \"all\" ? value.toString() : value;\n    }\n\n    if (isSet(value)) {\n      return forceToString === \"all\"\n        ? [...value].map((v) => toStringDeepForce(v, forceToString))\n        : value;\n    }\n\n    if (isMap(value)) {\n      return forceToString === \"all\"\n        ? [...value.entries()].map(([k, v]) => [\n            toStringDeepForce(k, forceToString),\n            toStringDeepForce(v, forceToString)\n          ])\n        : value;\n    }\n\n    const result: Record<string, unknown> = {};\n    if (isObject(value)) {\n      for (const key of Object.keys(value)) {\n        result[key] = toStringDeepForce(value[key], forceToString);\n      }\n    }\n    return result;\n  }\n\n  return value;\n}\n","import type {\n  DedupeArrayOptions,\n  DedupeResult,\n  ForceToStringOptions\n} from \"./_private/dedupeArray.types\";\n\nimport { isSet } from \"@/predicates/is/isSet\";\nimport { isMap } from \"@/predicates/is/isMap\";\nimport { isArray } from \"@/predicates/is/isArray\";\nimport { isEqual } from \"@/predicates/is/isEqual\";\n\nimport { getPreciseType } from \"@/predicates/type/getPreciseType\";\n\nimport { assertIsArray } from \"@/assertions/objects/assertIsArray\";\nimport { assertIsBoolean } from \"@/assertions/booleans/assertIsBoolean\";\nimport { assertIsPlainObject } from \"@/assertions/objects/assertIsPlainObject\";\n\nimport { toStringDeepForce } from \"@/conversions/values/toStringDeepForce\";\nimport { safeStableStringify } from \"@/conversions/stringify/safeStableStringify\";\nimport { createMessage } from \"@/_private/logger\";\n\n/** -------------------------------------------------------------------------------------------------------------------------\n * * ***Utility: `dedupeArray`.***\n * --------------------------------------------------------------------------------------------------------------------------\n * **Deduplicates values in an array (with optional flattening and deep stringification).**\n *\n * ---\n * - Supports various modes for converting values to strings before deduplication:\n *     - `\"stringOrNumber\"`: Converts strings and numbers to strings.\n *     - `\"primitives\"`: Converts all primitives (string, number, boolean, bigint, null, undefined, NaN) to strings.\n *     - `\"all\"`: Converts all values (primitives, objects, Maps, Sets, Symbols, RegExp, Dates, Errors, Promises, functions).\n *       to strings, including nested object properties.\n *     - `false` (default): No conversion applied.\n * - Options:\n *     - `forceToString`: Enables string conversion for comparison, default is `false`.\n *     - `flatten`: If true, deeply flattens arrays, Maps, and Sets before deduplication, default is `false`.\n *\n * ---\n * @template ForceToString - `forceToString` mode.\n * @template Flattening - `flatten` mode.\n *\n * ---\n * @param {unknown[]} inputArray - The array to deduplicate, can be deeply nested and contain any mix of types.\n * @param {DedupeArrayOptions<ForceToString, Flattening>|undefined} [options] - Options to control string conversion.\n *\n * ---\n * @throws **{@link TypeError | `TypeError`}** if the input is not an array, or options is not an object, or if\n *         `forceToString` is invalid.\n *\n * ---\n * @returns {DedupeResult<ForceToString, Flattening>} Deduplicated array with optional transformations.\n *\n * ---\n * @example\n * ```ts\n * dedupeArray([\"apple\", \"banana\", \"apple\"]);\n * // ➔ [\"apple\", \"banana\"]\n * dedupeArray([[1, 2], [1, 2]], { flatten: true });\n * // ➔ [1, 2]\n * dedupeArray([new Set([1, 2]), new Set([2, 3])], { flatten: true });\n * // ➔ [1, 2, 3]\n * dedupeArray([1, \"1\", 2, \"2\"], {\n *    forceToString: \"stringOrNumber\"\n * });\n * // ➔ [\"1\", \"2\"]\n * dedupeArray([true, \"true\", false, undefined], {\n *    forceToString: \"primitives\"\n * });\n * // ➔ [\"true\", \"false\", \"undefined\"]\n * dedupeArray([1, \"1\", { a: 1 }], {\n *    forceToString: \"all\"\n * });\n * // ➔ [\"1\", { a: \"1\" }]\n * dedupeArray([1, 1, [2, 2, [3, 3]]]);\n * // ➔ [1, [2, [3]]]\n * dedupeArray([null, undefined, null]);\n * // ➔ [null, undefined]\n * dedupeArray([[], [[]], [[[]]], [[]], [[[]]]]);\n * // ➔ [[], [[]], [[[]]]]\n * const fn = () => 1;\n * dedupeArray([fn, fn, () => 1]);\n * // ➔ [fn, () => 1] cause: ref () => 1 and fn is different but ref const `fn` and `fn` is same ref.\n * dedupeArray([Symbol(\"x\"), Symbol(\"x\")]);\n * // ➔ [Symbol(\"x\")] (symbols are same by identity, so dedupe\n * dedupeArray([NaN, NaN, 1, \"1\"]);\n * // ➔ [NaN, 1, \"1\"]\n * dedupeArray([NaN, NaN, 1, \"1\"], {\n *    forceToString: \"primitives\"\n * });\n * // ➔ [\"NaN\", \"1\"]\n * dedupeArray([new Date(\"2025-01-01\"), new Date(\"2025-01-01\")]);\n * // ➔ [Date(\"2025-01-01\")] (same time, deduped)\n * dedupeArray([new Date(\"2025-01-01\"), new Date(\"2025-01-01\")], {\n *    forceToString: \"all\"\n * });\n * // ➔ [\"2025-01-01T00:00:00.000Z\"]\n * dedupeArray([/abc/, /abc/], {\n *    forceToString: \"all\"\n * });\n * // ➔ [\"/abc/\"]\n * dedupeArray([new Map(), new Set(), new Error(\"err\")], {\n *    forceToString: \"all\"\n * });\n * // ➔ [\"[object Map]\", \"[object Set]\", \"Error: err\"]\n * dedupeArray([Promise.resolve(1), Promise.resolve(1)], {\n *    forceToString: \"all\"\n * });\n * // ➔ [\"[object Promise]\"]\n * dedupeArray([{ a: 1 }, { a: 1 }, { a: 2 }], {\n *    forceToString: \"primitives\"\n * });\n * // ➔ [{ a: \"1\" }, { a: \"2\" }]\n * dedupeArray([{ a: { b: 1 } }, { a: { b: 1 } }], {\n *    forceToString: \"all\"\n * });\n * // ➔ [{ a: { b: \"1\" } }]\n * dedupeArray(\"not an array\");\n * // ➔ Throws TypeError\n * dedupeArray([1, 2, 3], {\n *    forceToString: \"invalid\"\n * });\n * // ➔ Throws TypeError\n * ```\n */\nexport const dedupeArray = <\n  ForceToString extends ForceToStringOptions = false,\n  Flattening extends boolean = false\n>(\n  inputArray: unknown[],\n  options: DedupeArrayOptions<ForceToString, Flattening> = {}\n): DedupeResult<ForceToString, Flattening> => {\n  assertIsArray(inputArray, {\n    message: ({ currentType, validType }) =>\n      errorMsg(\n        `First parameter (\\`inputArray\\`) must be of type \\`${validType}\\` (array literal or instance), but received: \\`${currentType}\\`.`\n      )\n  });\n\n  assertIsPlainObject(options, {\n    message: ({ currentType, validType }) =>\n      errorMsg(\n        `Second parameter (\\`options\\`) must be of type \\`${validType}\\`, but received: \\`${currentType}\\`.`\n      )\n  });\n\n  const flatten = options.flatten ?? false;\n  const forceToString = options.forceToString ?? false;\n\n  if (\n    !(\n      forceToString === false ||\n      forceToString === \"stringOrNumber\" ||\n      forceToString === \"primitives\" ||\n      forceToString === \"all\"\n    )\n  ) {\n    throw new TypeError(\n      errorMsg(\n        `Parameter \\`forceToString\\` property of the \\`options\\` (second parameter) must be of type \\`false\\` or \\`string\\` with value one of \"stringOrNumber\" | \"primitives\" | \"all\", but received: \\`${getPreciseType(\n          forceToString\n        )}\\`, with value: \\`${safeStableStringify(forceToString, {\n          keepUndefined: true\n        })}\\`.`\n      )\n    );\n  }\n\n  assertIsBoolean(flatten, {\n    message: ({ currentType, validType }) =>\n      errorMsg(\n        `Parameter \\`flatten\\` property of the \\`options\\` (second parameter) must be of type \\`${validType}\\`, but received: \\`${currentType}\\`.`\n      )\n  });\n\n  const process = (arr: unknown[]): unknown[] => {\n    const seen: unknown[] = [];\n    return arr.reduce<unknown[]>((acc, item) => {\n      const value = isArray(item)\n        ? process(item)\n        : toStringDeepForce(item, forceToString);\n\n      if (!seen.some((s) => isEqual(s, value))) {\n        seen.push(value);\n        acc.push(value);\n      }\n      return acc;\n    }, []);\n  };\n\n  const deepFlatten = (value: unknown): unknown[] => {\n    if (isArray(value)) {\n      return value.flatMap(deepFlatten);\n    }\n\n    if (isSet(value)) {\n      return [...value].flatMap(deepFlatten);\n    }\n\n    if (isMap(value)) {\n      return [...value.values()].flatMap(deepFlatten);\n    }\n\n    return [value];\n  };\n\n  return (\n    flatten ? process(deepFlatten(inputArray)) : process(inputArray)\n  ) as DedupeResult<ForceToString, Flattening>;\n};\n\n/**\n * @internal ***`Not part of the public API.`***\n */\nconst errorMsg = (msg: string) => createMessage(\"dedupeArray\", msg);\n","import { isNil } from \"@/predicates/is/isNil\";\nimport { isArray } from \"@/predicates/is/isArray\";\nimport { isObject } from \"@/predicates/is/isObject\";\nimport { isString } from \"@/predicates/is/isString\";\nimport { isNumber } from \"@/predicates/is/isNumber\";\nimport { isBoolean } from \"@/predicates/is/isBoolean\";\nimport { isNonEmptyValue } from \"@/predicates/is/isNonEmptyValue\";\nimport { isNonEmptyString } from \"@/predicates/is/isNonEmptyString\";\n\n/** ------------------------------------------------------------------------\n * * ***Utility: `toBooleanContent`.***\n * -------------------------------------------------------------------------\n * **Converts a given value into a boolean (***strict***).**\n *\n * ---\n * - **This is stricter than normal JS coercion:**\n *      - `null` and `undefined` return `false`.\n *      - Empty strings return `false`, non-empty strings return `true`.\n *      - Numbers: `0` is `false`, others `true`.\n *      - Booleans returned as-is.\n *      - Arrays: `[]` is `false`, non-empty is `true`.\n *      - Objects: `{}` is `false`, object with keys is `true`.\n *\n * ---\n * @param {*} value - The value to be converted.\n * @returns {boolean} Return `true` if the value is considered non-empty,\n *                    otherwise `false`.\n *\n * ---\n * @example\n * toBooleanContent(null);\n * // ➔ false\n * toBooleanContent(undefined);\n * // ➔ false\n * toBooleanContent(\"\");\n * // ➔ false\n * toBooleanContent(\"  \");\n * // ➔ false\n * toBooleanContent(\"abc\");\n * // ➔ true\n * toBooleanContent(\" asd \");\n * // ➔ true\n * toBooleanContent(0);\n * // ➔ false\n * toBooleanContent(42);\n * // ➔ true\n * toBooleanContent(NaN);\n * // ➔ true\n * toBooleanContent([]);\n * // ➔ false\n * toBooleanContent([1]);\n * // ➔ true\n * toBooleanContent({});\n * // ➔ false\n * toBooleanContent({ a: 1 });\n * // ➔ true\n * toBooleanContent({[Symbol(\"key\")]: 123});\n * // ➔ false\n */\nexport const toBooleanContent = (value: unknown): boolean => {\n  if (isNil(value)) return false;\n  if (isString(value)) return isNonEmptyString(value);\n  if (isBoolean(value)) return value;\n  if (isNumber(value, { includeNaN: true })) return value !== 0;\n  if (isArray(value) || isObject(value)) return isNonEmptyValue(value);\n  return Boolean(value);\n};\n","import { isNil } from \"@/predicates/is/isNil\";\nimport { isArray } from \"@/predicates/is/isArray\";\nimport { isObject } from \"@/predicates/is/isObject\";\nimport { isString } from \"@/predicates/is/isString\";\nimport { isNumber } from \"@/predicates/is/isNumber\";\nimport { isBoolean } from \"@/predicates/is/isBoolean\";\nimport { isNonEmptyString } from \"@/predicates/is/isNonEmptyString\";\n\n/** --------------------------------------------------------------------------------------\n * * ***Utility: `toBooleanContentDeep`.***\n * ---------------------------------------------------------------------------------------\n * **This function does a deep inspection to determine if the input\n * contains any meaningful / non-empty value.**\n *\n * ---\n * @description\n * It is stricter than JavaScript's normal truthy checks because it looks *inside*\n * nested arrays & objects (recursively checks).\n *\n * ---\n * - **Rules:**\n *      - `null` and `undefined` return `false`.\n *      - Empty strings `\"\"` return `false`.\n *      - `0` returns `false`.\n *      - Empty arrays `[]` or empty objects `{}` return `false`.\n *      - Checks deeply nested arrays/objects — if any value inside is \"non-empty\",\n *        returns `true`.\n *\n * ---\n * @param {*} value - The value to check.\n *\n * ---\n * @returns {boolean} Return `true` if the value or anything nested inside is non-empty,\n *                    otherwise `false`.\n *\n * ---\n * @example\n * toBooleanContentDeep(null);\n * // ➔ false\n * toBooleanContentDeep(\"\");\n * // ➔ false\n * toBooleanContentDeep(0);\n * // ➔ false\n * toBooleanContentDeep([]);\n * // ➔ false\n * toBooleanContentDeep({});\n * // ➔ false\n * toBooleanContentDeep([[], {}]);\n * // ➔ false\n * toBooleanContentDeep(\"abc\");\n * // ➔ true\n * toBooleanContentDeep(42);\n * // ➔ true\n * toBooleanContentDeep(NaN);\n * // ➔ true\n * toBooleanContentDeep([0, \"\", 5]);\n * // ➔ true\n * toBooleanContentDeep([NaN, \"\", 0]);\n * // ➔ true\n * toBooleanContentDeep([0, \"\", null]);\n * // ➔ false\n * toBooleanContentDeep({ a: 0 });\n * // ➔ false\n * toBooleanContentDeep({ a: 1 });\n * // ➔ true\n * toBooleanContentDeep({ a: { b: [] }});\n * // ➔ false\n * toBooleanContentDeep({ a: { b: \"x\" }});\n * // ➔ true\n * toBooleanContentDeep({[Symbol(\"key\")]: 123});\n * // ➔ false\n */\nexport const toBooleanContentDeep = (value: unknown): boolean => {\n  if (isNil(value)) return false;\n  if (isString(value)) return isNonEmptyString(value);\n  if (isBoolean(value)) return value;\n  if (isNumber(value, { includeNaN: true })) return value !== 0;\n  if (isArray(value)) return value.some(toBooleanContentDeep);\n  if (isObject(value)) return Object.values(value).some(toBooleanContentDeep);\n\n  return false;\n};\n","import { createMessage } from \"@/_private/logger\";\n\nimport { isNil } from \"@/predicates/is/isNil\";\nimport { isString } from \"@/predicates/is/isString\";\nimport { isNumber } from \"@/predicates/is/isNumber\";\nimport { isBoolean } from \"@/predicates/is/isBoolean\";\nimport { isPlainObject } from \"@/predicates/is/isPlainObject\";\nimport { getPreciseType } from \"@/predicates/type/getPreciseType\";\n\ntype ToBooleanExplicitOptions = {\n  /** -------------------------------------------------------------------------------------------------\n   * * ***Whether string comparison ignores case, _defaultValue: `false`_.***\n   * --------------------------------------------------------------------------------------------------\n   *\n   * @default false\n   */\n  caseInsensitive?: boolean;\n  /** -------------------------------------------------------------------------------------------------\n   * * ***Whether to trim whitespace before comparison, _defaultValue: `true`_.***\n   * --------------------------------------------------------------------------------------------------\n   *\n   * @default true\n   */\n  trimString?: boolean;\n  /** -------------------------------------------------------------------------------------------------\n   * * ***Whether to consider the string `\"indeterminate\"` as `true`, _defaultValue: `false`_.***\n   * --------------------------------------------------------------------------------------------------\n   *\n   * @default false\n   */\n  includeIndeterminate?: boolean;\n};\n\n/** ---------------------------------------------------------------------------------------------------\n * * ***Utility: `toBooleanExplicit`.***\n * ----------------------------------------------------------------------------------------------------\n * **Converts a value into a strict boolean.**\n *\n * ---\n * - **Behavior:**\n *     - It supports various common string representations of truthy values,\n *       including `\"true\"`, `\"on\"`, `\"yes\"`, `\"1\"`, the number `1`, the boolean `true`,\n *       and optionally the string `\"indeterminate\"` if enabled.\n *\n * ---\n * - **Note:**\n *     - Any other value, including `undefined`, `null`, `false`, `0`, and\n *       unrecognized strings will return `false`.\n *     - Supports optional `caseInsensitive` and `trimString` to customize\n *       string normalization.\n *\n * ---\n * @param {*} value - The value to convert.\n * @param {ToBooleanExplicitOptions} [options] - Options for conversion behavior.\n * @param {ToBooleanExplicitOptions[\"caseInsensitive\"]} [options.caseInsensitive=false]\n *         Whether string comparison ignores case, default: `false`.\n * @param {ToBooleanExplicitOptions[\"trimString\"]} [options.trimString=true]\n *         Whether to trim whitespace before comparison, default: `true`.\n * @param {ToBooleanExplicitOptions[\"includeIndeterminate\"]} [options.includeIndeterminate=false]\n *         If `true`, the string `\"indeterminate\"` is considered a truthy value, defaults to `false`.\n *\n * ---\n * @throws **{@link TypeError | `TypeError`}** if any option provided is not a boolean.\n *\n * ---\n * @returns {boolean} Return `true` if the value matches a truthy representation, otherwise `false`.\n *\n * ---\n * @example\n * toBooleanExplicit(1);\n * // ➔ true\n * toBooleanExplicit(true);\n * // ➔ true\n * toBooleanExplicit(\"on\");\n * // ➔ true\n * toBooleanExplicit(\"1\");\n * // ➔ true\n * toBooleanExplicit(0);\n * // ➔ false\n * toBooleanExplicit(\"off\");\n * // ➔ false\n * toBooleanExplicit(\"Yes\");\n * // ➔ false (caseInsensitive is false by default)\n * toBooleanExplicit(\" yes \");\n * // ➔ true (whitespace trimmed by default)\n * toBooleanExplicit(\"YES\", { caseInsensitive: true });\n * // ➔ true\n * toBooleanExplicit(\"YES\", { caseInsensitive: false });\n * // ➔ false\n * toBooleanExplicit(\" YES \", { trimString: false });\n * // ➔ false (whitespace not trimmed)\n * toBooleanExplicit(\" YES \", { trimString: true, caseInsensitive: true });\n * // ➔ true\n * toBooleanExplicit(\" YES \", { trimString: true, caseInsensitive: false });\n * // ➔ false\n * toBooleanExplicit(\"indeterminate\");\n * // ➔ false (default)\n * toBooleanExplicit(\"indeterminate\", { includeIndeterminate: true });\n * // ➔ true\n */\nexport const toBooleanExplicit = (\n  value: unknown,\n  options: ToBooleanExplicitOptions = {}\n): boolean => {\n  if (isNil(value)) return false;\n  if (!isPlainObject(options)) options = {};\n\n  const ci = options.caseInsensitive ?? false;\n  const ts = options.trimString ?? true;\n  const incInd = options.includeIndeterminate ?? false;\n\n  if (!isBoolean(ci) || !isBoolean(ts) || !isBoolean(incInd)) {\n    throw new TypeError(\n      createMessage(\n        \"toBooleanExplicit\",\n        `Parameters \\`caseInsensitive\\`, \\`trimString\\` and \\`includeIndeterminate\\` property of the \\`options\\` (second parameter) expected to be a \\`boolean\\` type, but received: ['caseInsensitive': \\`${getPreciseType(\n          ci\n        )}\\`, 'trimString': \\`${getPreciseType(\n          ts\n        )}\\`, 'includeIndeterminate': \\`${getPreciseType(incInd)}\\`].`\n      )\n    );\n  }\n\n  if (isString(value)) {\n    let normalized = value;\n    if (ts) normalized = normalized.trim();\n    if (ci) normalized = normalized.toLowerCase();\n\n    const validTrueStrings = [\"true\", \"on\", \"yes\", \"1\"];\n    if (incInd) validTrueStrings.push(\"indeterminate\");\n\n    return validTrueStrings.includes(normalized);\n  }\n\n  if (isNumber(value)) return value === 1;\n  if (isBoolean(value)) return value;\n\n  return false;\n};\n","import { isNil } from \"@/predicates/is/isNil\";\nimport { isArray } from \"@/predicates/is/isArray\";\nimport { isString } from \"@/predicates/is/isString\";\nimport { isNumber } from \"@/predicates/is/isNumber\";\nimport { isBoolean } from \"@/predicates/is/isBoolean\";\nimport { isEmptyString } from \"@/predicates/is/isEmptyString\";\n\n/** -----------------------------------------------------------------------------\n * * ***Utility: `toBooleanLoose`.***\n * ------------------------------------------------------------------------------\n * **Converts a given value into a boolean (loose).**\n *\n * ---\n * - **This follows JavaScript's typical truthy/falsy rules with some tweaks:**\n *     - `null` and `undefined` return `false`.\n *     - Empty strings return `false`, non-empty strings return `true`.\n *     - Numbers: `0` is `false`, others `true`.\n *     - Booleans returned as-is.\n *     - Arrays: `[]` is `false`, non-empty is `true`.\n *     - Other objects: uses `Boolean(value)`, so `{}` is `true`.\n *\n * ---\n * @param {*} value - The value to be converted.\n *\n * ---\n * @returns {boolean} Return `true` if the value is truthy, otherwise `false`.\n *\n * ---\n * @example\n * toBooleanLoose(null);\n * // ➔ false\n * toBooleanLoose(\"\");\n * // ➔ false\n * toBooleanLoose(\"abc\");\n * // ➔ true\n * toBooleanLoose(0);\n * // ➔ false\n * toBooleanLoose(42);\n * // ➔ true\n * toBooleanLoose([]);\n * // ➔ false\n * toBooleanLoose([1]);\n * // ➔ true\n * toBooleanLoose({});\n * // ➔ true\n * toBooleanLoose({ a: 1 });\n * // ➔ true\n */\nexport const toBooleanLoose = (value: unknown): boolean => {\n  if (isNil(value)) return false;\n  if (isString(value)) return !isEmptyString(value);\n  if (isBoolean(value)) return value;\n  if (isNumber(value, { includeNaN: true })) return value !== 0;\n  if (isArray(value)) return value.length > 0;\n  return Boolean(value);\n};\n","import { isNaN } from \"@/predicates/is/isNaN\";\nimport { isString } from \"@/predicates/is/isString\";\nimport { isNonEmptyString } from \"@/predicates/is/isNonEmptyString\";\n\n/** -----------------------------------------------------------------------------------------------\n * * ***Utility: `convertType`.***\n * ------------------------------------------------------------------------------------------------\n * **Converts a value from a string to its corresponding JavaScript primitive type.**\n *\n * ---\n * - **Supported conversions for string inputs (case-insensitive, trimmed):**\n *      - `\"true\"`           ➔ `true` (***boolean***).\n *      - `\"false\"`          ➔ `false` (***boolean***).\n *      - `\"null\"`           ➔ `null` (***null***).\n *      - `\"yes\"`            ➔ `true` (***boolean***).\n *      - `\"no\"`             ➔ `false` (***boolean***).\n *      - `\"nan\"` or `\"NaN\"` ➔ `NaN` (***number***).\n *      - `\"undefined\"`      ➔ `undefined` (***undefined***).\n * - Numeric strings with optional thousands separators (e.g. `\"3,567,890.14\"`) ➔ `3567890.14`\n *   ***as a `number` type***.\n * - Strings containing only whitespace are converted to empty string `\"\"`.\n * - Non-string inputs are returned unchanged.\n * - Strings not matching any special case are trimmed and returned as-is.\n *\n * ---\n * @param {*} value - The value to convert, usually a string or other type.\n *\n * ---\n * @returns {*} The converted JavaScript primitive (***`boolean`***, ***`number`***, ***`null`***,\n *              ***`undefined`***, ***`NaN`***) or the original value if no conversion applies.\n *\n * ---\n * @example\n * convertType(\"true\");\n * // ➔ true\n * convertType(\" 42 \");\n * // ➔ 42\n * convertType(\"FALSE\");\n * // ➔ false\n * convertType(\" null \");\n * // ➔ null\n * convertType(\"   \");\n * // ➔ \"\"\n * convertType(\" Hello World \");\n * // ➔ \"Hello World\"\n * convertType(\"NaN\");\n * // ➔ NaN\n * convertType(100);\n * // ➔ 100\n * convertType(NaN);\n * // ➔ NaN\n * convertType({});\n * // ➔ {}\n */\nexport const convertType = (value: unknown): unknown => {\n  const predefinedValues: Record<string, unknown> = {\n    undefined: undefined,\n    null: null,\n    nan: NaN,\n    true: true,\n    false: false,\n    yes: true,\n    no: false\n  };\n\n  if (isString(value)) {\n    const normalized = value.trim().toLowerCase();\n\n    if (Object.prototype.hasOwnProperty.call(predefinedValues, normalized)) {\n      return predefinedValues[normalized];\n    }\n\n    // Support numbers with thousand separators\n    const numericString = normalized.replace(/,/g, \"\");\n\n    const numberString = Number(numericString);\n    if (!isNaN(numberString) && isNonEmptyString(numericString)) {\n      return numberString;\n    }\n\n    return value.trim();\n  }\n\n  return value;\n};\n","import { isFunction } from \"@/predicates/is/isFunction\";\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { removeObjectPaths } from \"../../removeObjectPaths\";\n\n/** ***Util helper for {@link removeObjectPaths | `removeObjectPaths`}.***\n *\n * @internal\n */\nexport const deepCloneSafe = <U>(obj: U): U => {\n  try {\n    if (isFunction(structuredClone)) {\n      return structuredClone(obj);\n    }\n  } catch {\n    // skip\n  }\n  return JSON.parse(JSON.stringify(obj));\n};\n","import { isArray } from \"@/predicates/is/isArray\";\nimport { isEmptyArray } from \"@/predicates/is/isEmptyArray\";\nimport { isPlainObject } from \"@/predicates/is/isPlainObject\";\nimport { isObjectOrArray } from \"@/predicates/is/isObjectOrArray\";\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { removeObjectPaths } from \"../../removeObjectPaths\";\n\n/** ***Util helper for {@link removeObjectPaths | `removeObjectPaths`}.***\n *\n * @internal\n */\nexport const deleteNestedKey = <T extends Record<string, unknown> | unknown[]>(\n  obj: T,\n  path: string[]\n): T => {\n  if (!isObjectOrArray(obj)) return obj;\n\n  const [currentKey, ...rest] = path;\n\n  if (isArray(obj)) {\n    for (const item of obj) {\n      // recursive pass same path\n      if (isObjectOrArray(item)) deleteNestedKey(item, path);\n    }\n  } else if (isEmptyArray(rest) && isPlainObject(obj) && currentKey) {\n    delete obj[currentKey];\n  } else if (\n    isPlainObject(obj) &&\n    currentKey &&\n    isObjectOrArray(obj[currentKey])\n  ) {\n    deleteNestedKey(obj[currentKey], rest);\n  }\n\n  return obj;\n};\n","import { isPlainObject } from \"@/predicates/is/isPlainObject\";\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { removeObjectPaths } from \"../../removeObjectPaths\";\n\n/** ***Util helper for {@link removeObjectPaths | `removeObjectPaths`}.***\n *\n * @internal\n */\nexport const deleteExactPathOnce = <T extends Record<string, unknown>>(\n  obj: T,\n  path: string[]\n): T => {\n  if (!isPlainObject(obj)) return obj;\n\n  const [currentKey, ...rest] = path;\n\n  if (rest.length === 0 && currentKey && isPlainObject(obj)) {\n    delete obj[currentKey];\n  } else if (currentKey && isPlainObject(obj[currentKey])) {\n    deleteExactPathOnce(obj[currentKey], rest);\n  }\n\n  return obj;\n};\n","import type {\n  ConfigRemoveObjectPaths,\n  ResultRemoveObjectPaths\n} from \"./_private/removeObjectPaths.types\";\n\nimport { createMessage } from \"@/_private/logger\";\n\nimport { isBoolean } from \"@/predicates/is/isBoolean\";\nimport { isUndefined } from \"@/predicates/is/isUndefined\";\nimport { isEmptyObject } from \"@/predicates/is/isEmptyObject\";\nimport { isPlainObject } from \"@/predicates/is/isPlainObject\";\nimport { getPreciseType } from \"@/predicates/type/getPreciseType\";\n\nimport { assertIsArray } from \"@/assertions/objects/assertIsArray\";\nimport { assertIsString } from \"@/assertions/strings/assertIsString\";\n\nimport { deepCloneSafe } from \"./_private/utils/deepCloneSafe\";\nimport { deleteNestedKey } from \"./_private/utils/deleteNestedKey\";\nimport { safeStableStringify } from \"../stringify/safeStableStringify\";\nimport { deleteExactPathOnce } from \"./_private/utils/deleteExactPathOnce\";\n\n/** ----------------------------------------------------------------------------------------------------------------------\n * * ***Utility: `removeObjectPaths`.***\n * -----------------------------------------------------------------------------------------------------------------------\n * **Deletes multiple keys (shallow or deeply nested) from an object.**\n *\n * ---\n * - **Features:**\n *     - Removes one or more keys from an object based on their paths (supports dot notation for nested properties).\n *     - Can delete deeply from all matching nested levels (even inside arrays) when `deep: true`.\n *     - By default does **not mutate** the original object. Clones it first.\n *   Set `deepClone = false` to mutate in place (useful for performance on large data).\n *     - Ensures type safety on `key` paths via `DotPath<T>`, reducing accidental invalid paths.\n * - **Behavior:**\n *     - When `deep: false` (default), only deletes the direct property at the specified path.\n *     - When `deep: true`, searches deeply and recursively deletes the key from all levels,\n *   including inside arrays of objects (applies the *same* path repeatedly).\n *     - Skips deletion if the specified path does not exist — no error is thrown.\n * - **Edge Handling:**\n *     - If `object` is `null` or not an object, returns an empty object.\n *     - If `keysToDelete` is not an array of `{ key, deep? }` objects, throws a `TypeError`.\n *     - Ignores invalid intermediate paths (will skip those branches without throwing).\n *\n * ---\n * @template T - The shape of the input object, used for type-safe dot paths.\n *\n * ---\n * @param {Record<string, unknown>} object - ***The object to remove keys from, must be an object or will return `{}`.***\n * @param {ConfigRemoveObjectPaths<T>[]} keysToDelete\n *  ***An array of instructions:***\n *   - `key`: A string path using dot notation (e.g. `\"user.profile.name\"`).\n *   - `deep`: If `true`, will recursively remove all instances of the key path at any depth, defaultValue: `false`.\n * @param {boolean|undefined} [deepClone=true]\n *  ***Whether to deep clone the original object before modifying.***\n *   - `true` (default): returns a *new object* with the specified keys removed.\n *   - `false`: modifies the original object in place and returns it.\n *\n * ---\n * @throws **{@link TypeError | `TypeError`}** if `keysToDelete` is not an array of `{ key, deep? }` objects.\n *\n * ---\n * @returns {Partial<T>}\n *   - A new object with specified keys removed if `deepClone` is `true`.\n *   - The *same mutated object* if `deepClone` is `false`.\n *\n * ---\n * @example\n *\n * 1. #### Shallow deletion:\n *    ```ts\n *    removeObjectPaths(\n *      {\n *        a: 1,\n *        b: 2,\n *        c: {\n *          d: 3\n *        }\n *      },\n *      [\n *        { key: \"b\" }\n *      ]\n *    );\n *    // ➔ {\n *    //      a: 1,\n *    //      c: {\n *    //        d: 3\n *    //      }\n *    //    }\n *    ```\n *    ---\n * 2. #### Nested path deletion:\n *    ```ts\n *    removeObjectPaths(\n *      {\n *        user: {\n *          profile: {\n *            name: \"Alice\",\n *            age: 30\n *          }\n *        }\n *      },\n *      [\n *        { key: \"user.profile.age\" }\n *      ]\n *    );\n *    // ➔ {\n *    //      user: {\n *    //        profile: {\n *    //          name: \"Alice\"\n *    //        }\n *    //      }\n *    //    }\n *    ```\n *    ---\n * 3. #### Deep recursive deletion:\n *    ```ts\n *    removeObjectPaths(\n *      {\n *        items: [\n *          { price: 10 },\n *          {\n *            price: 20,\n *            details: {\n *              price: 30\n *            }\n *          }\n *        ]\n *      },\n *      [\n *        {\n *          key: \"price\",\n *          deep: true\n *        }\n *      ]\n *    );\n *    // ➔ {\n *    //      items: [\n *    //        {},\n *    //        {\n *    //          details: {}\n *    //        }\n *    //      ]\n *    //    }\n *    ```\n *    ---\n * 4. #### Mutate original object (clone disabled):\n *    ```ts\n *    const obj = {\n *      x: 1,\n *      y: 2\n *    };\n *\n *    removeObjectPaths(\n *      obj,\n *      [{ key: \"y\" }],\n *      false\n *    );\n *\n *    console.log(obj);\n *    // ➔ { x: 1 }\n *    ```\n *    ---\n * 5. #### No matching path:\n *    ```ts\n *    removeObjectPaths(\n *      {},\n *      [{ key: \"a\" }]\n *    );\n *    // ➔ {}\n *    ```\n *    ---\n * 6. #### Invalid `keysToDelete` type:\n *    ```ts\n *    removeObjectPaths(\n *      {},\n *      \"a\"\n *    );\n *    // ➔ throws TypeError\n *    ```\n *    ---\n * 7. #### Missing `key` property:\n *    ```ts\n *    removeObjectPaths(\n *      {},\n *      [{ deep: true }]\n *    );\n *    // ➔ throws TypeError\n *    ```\n */\nexport function removeObjectPaths<\n  T extends Record<string, unknown>,\n  K extends ConfigRemoveObjectPaths<T>[]\n>(\n  object: T,\n  keysToDelete: K,\n  deepClone: boolean = true\n): ResultRemoveObjectPaths<T, K> {\n  if (isEmptyObject(object, { checkSymbols: true }))\n    return {} as ResultRemoveObjectPaths<T, K>;\n\n  assertIsArray(keysToDelete, {\n    message: ({ currentType, validType }) =>\n      errorMsg(\n        `Second parameter (\\`keysToDelete\\`) must be of type \\`${validType}\\` with value of { key: string, deep?: boolean } plain-object, but received: \\`${currentType}\\`, with value: \\`${safeStableStringify(\n          keysToDelete,\n          { keepUndefined: true }\n        )}\\`.`\n      )\n  });\n\n  if (!keysToDelete.every((k) => isPlainObject(k) && \"key\" in k)) {\n    throw new TypeError(\n      errorMsg(\n        `Each element in Second Parameter (\\`keysToDelete\\`) must be of type \\`plain-object\\` with at least a \"key\" property (optionally \"deep\"), but received: \\`${safeStableStringify(\n          keysToDelete,\n          { keepUndefined: true }\n        )}\\`.`\n      )\n    );\n  }\n\n  let result = deepClone ? deepCloneSafe(object) : object;\n\n  for (const { key, deep } of keysToDelete) {\n    assertIsString(key, {\n      message: ({ currentType, validType }) =>\n        errorMsg(\n          `Parameter \\`key\\` at Second Parameter (\\`keysToDelete\\`) must be of type \\`${validType}\\`, but received: \\`${currentType}\\`.`\n        )\n    });\n\n    if (!isUndefined(deep) && !isBoolean(deep)) {\n      throw new TypeError(\n        errorMsg(\n          `Parameter \\`deep\\` at Second Parameter (\\`keysToDelete\\`) ➔ (key: \"${key}\", deep: ${deep}) must be of type \\`boolean\\` or \\`undefined\\`, but received: \\`${getPreciseType(\n            deep\n          )}\\`.`\n        )\n      );\n    }\n\n    const path = key.split(\".\");\n    result = deep\n      ? deleteNestedKey(result, path)\n      : deleteExactPathOnce(result, path);\n  }\n\n  return result as ResultRemoveObjectPaths<T, K>;\n}\n\n/**\n * @internal ***`Not part of the public API.`***\n */\nconst errorMsg = (msg: string) => createMessage(\"removeObjectPaths\", msg);\n","import type {\n  ConvertedDeepNumber,\n  ToNumberDeepOptions\n} from \"./_private/toNumberDeep.types\";\n\nimport { createMessage } from \"@/_private/logger\";\n\nimport { isNaN } from \"@/predicates/is/isNaN\";\nimport { isSet } from \"@/predicates/is/isSet\";\nimport { isMap } from \"@/predicates/is/isMap\";\nimport { isNil } from \"@/predicates/is/isNil\";\nimport { isDate } from \"@/predicates/is/isDate\";\nimport { isArray } from \"@/predicates/is/isArray\";\nimport { isBuffer } from \"@/predicates/is/isBuffer\";\nimport { isNumber } from \"@/predicates/is/isNumber\";\nimport { isRegExp } from \"@/predicates/is/isRegExp\";\nimport { isObject } from \"@/predicates/is/isObject\";\nimport { isBoolean } from \"@/predicates/is/isBoolean\";\nimport { isUndefined } from \"@/predicates/is/isUndefined\";\nimport { isEmptyArray } from \"@/predicates/is/isEmptyArray\";\nimport { isTypedArray } from \"@/predicates/is/isTypedArray\";\nimport { isPlainObject } from \"@/predicates/is/isPlainObject\";\nimport { isEmptyObject } from \"@/predicates/is/isEmptyObject\";\nimport { isNumberObject } from \"@/predicates/is/isNumberObject\";\nimport { isStringObject } from \"@/predicates/is/isStringObject\";\nimport { isBooleanObject } from \"@/predicates/is/isBooleanObject\";\nimport { getPreciseType } from \"@/predicates/type/getPreciseType\";\nimport { isInfinityNumber } from \"@/predicates/is/isInfinityNumber\";\nimport { isNonEmptyString } from \"@/predicates/is/isNonEmptyString\";\n\n/** --------------------------------------------------------------------------------------------------------------------------\n * * ***Utility: `toNumberDeep`.***\n * ---------------------------------------------------------------------------------------------------------------------------\n * **Converts deeply nested arrays, objects, buffers, sets, maps, or typed arrays into numbers while preserving structure.**\n *\n * ---\n * - **Features:**\n *     - Converts numeric strings, number to numbers:\n *       - `3.5` ➔ `3.5`.\n *       - `\"3.5\"` ➔ `3.5`.\n *     - Converts boolean to number:\n *       - `true` ➔ `1`.\n *       - `false` ➔ `0`.\n *     - Converts Date to getTime (timestamp) `Date ➔ number`, if invalid Date value will return `0`:\n *       - `new Date(\"invalid\")` ➔ `0`.\n *       - `new Date(\"11-09-2025 22:04:11\")` ➔ `1762700651000`.\n *     - Converts `Buffer`, `TypedArray`, `Set`, `Map`, and `arrays` recursively to `arrays of numbers`.\n *     - Converts boxed primitives box into their primitive equivalents then convert to number:\n *       - For `new String` we convert everything to number (behavior JS of new String):\n *         - `new String(123)` ➔ `.valueOf()` ➔ `\"123\"` ➔ `Number(\"123\")` ➔ `123`.\n *         - `new String(\"123\")` ➔ `.valueOf()` ➔ `\"123\"` ➔ `Number(\"123\")` ➔ `123`.\n *         - `new String(true)` ➔ `.valueOf()` ➔ `\"true\"` ➔ `Number(true)` ➔ `1`.\n *         - `new String(false)` ➔ `.valueOf()` ➔ `\"false\"` ➔ `Number(false)` ➔ `0`.\n *         - If result from `valueOf()` is `NaN` or `Infinity` ***(will removing)***:\n *           - `new String(\"hi\")` ➔ `.valueOf()` ➔ `\"hi\"` ➔ `Number(\"hi\")` ➔ `NaN` ***(remove)***.\n *           - `new String(()=>{})` ➔ `.valueOf()` ➔ `\"()=>{}\"` ➔ `Number(\"()=>{}\")` ➔ `NaN` ***(remove)***.\n *       - For `new Boolean` we convert to boolean (behavior JS of new Boolean) then convert to number:\n *         - `new Boolean(true)` ➔ `.valueOf()` ➔ `true` ➔ `Number(true)` ➔ `1`.\n *         - `new Boolean(false)` ➔ `.valueOf()` ➔ `false` ➔ `Number(false)` ➔ `0`.\n *         - Special behavior JS of new Boolean, return `false` **(convert to number: `0`)**\n *           for `false`, (`0` / `-0`), `\"\"` (empty-string),\n *           `null`, `undefined`, `NaN`, otherwise `true` **(convert to number: `1`)**.\n *       - For `new Number`:\n *         - `new Number(42)` ➔ `.valueOf()` ➔ `42`.\n *         - `new Number(\"42\")` ➔ `.valueOf()` ➔ `42`.\n *         - `new Number(null)` ➔ `.valueOf()` ➔ `0` (`null` is `0` behavior JS of new Number).\n *         - If result from `valueOf()` is `NaN` or `Infinity` ***(will removing)***:\n *           - `new Number(NaN)` ➔ `.valueOf()` ➔ `NaN` ***(remove)***.\n *           - `new Number(undefined)` ➔ `.valueOf()` ➔ `NaN` ***(remove)***.\n *           - `new Number(Infinity)` ➔ `.valueOf()` ➔ `Infinity` ***(remove)***.\n *           - `new Number(-Infinity)` ➔ `.valueOf()` ➔ `-Infinity` ***(remove)***.\n *     - Recursively processes `nested objects`, `arrays`, `buffers`, `sets`, `maps`, and `typed arrays`.\n *     - Removes `empty-string`, `non-numeric strings`.\n *     - Removes `null`, `undefined`, `NaN`, `Infinity`, `-Infinity`.\n *     - Removes `unsupported` types like `functions` , `RegExp`, `symbols`, and `BigInt`.\n *     - Can optionally remove empty arrays (`[]`) and/or empty objects (`{}`) **recursively**.\n *\n * ---\n * @template T - The input type.\n * @template RemoveEmptyObjects - Whether to remove empty objects.\n * @template RemoveEmptyArrays - Whether to remove empty arrays.\n *\n * ---\n * @param {*} input - The input value to convert.\n * @param {ToNumberDeepOptions<RemoveEmptyObjects, RemoveEmptyArrays>} [options] - Conversion options.\n *\n * ---\n * @returns {ConvertedDeepNumber<T, RemoveEmptyObjects, RemoveEmptyArrays>|undefined} The converted value, return `undefined` if the input is entirely empty or filtered out by options.\n *\n * ---\n * @example\n * ```ts\n * toNumberDeep(\"123\");\n * // ➔ 123\n * toNumberDeep(\"abc\");\n * // ➔ undefined\n * toNumberDeep([NaN, \"10\", \"xyz\"]);\n * // ➔ [10]\n * toNumberDeep({ a: \"1\", b: [null, \"2\"] });\n * // ➔ { a: 1, b: [2] }\n * toNumberDeep(Buffer.from([0, 1, 2]));\n * // ➔ [0, 1, 2]\n * toNumberDeep(new Set([\"1\", \"2\"]));\n * // ➔ [1, 2]\n * toNumberDeep(new Map([[\"a\", \"1\"], [\"b\", \"2\"]]));\n * // ➔ [[\"a\", 1], [\"b\", 2]]\n * toNumberDeep(new Int16Array([1, 2, 3]));\n * // ➔ [1, 2, 3]\n * toNumberDeep(new Date(\"2025-08-16T00:00:00Z\"));\n * // ➔ 1755552000000\n * toNumberDeep({ a: {}, b: [] }, { removeEmptyObjects: true });\n * // ➔ { b: [] }\n * toNumberDeep({ a: {}, b: [] }, { removeEmptyArrays: true });\n * // ➔ { a: {} }\n * toNumberDeep({ x: {}, y: [], z: [{ a: {}, b: [] }] }, {\n *    removeEmptyObjects: true, removeEmptyArrays: true\n * });\n * // ➔ { z: [] }\n * ```\n */\nexport function toNumberDeep(\n  input?: null | undefined,\n  options?: ToNumberDeepOptions<boolean, boolean>\n): undefined;\nexport function toNumberDeep<\n  T,\n  RemoveEmptyObjects extends boolean = false,\n  RemoveEmptyArrays extends boolean = false\n>(\n  input: T,\n  options?: ToNumberDeepOptions<RemoveEmptyObjects, RemoveEmptyArrays>\n): ConvertedDeepNumber<T, RemoveEmptyObjects, RemoveEmptyArrays>;\nexport function toNumberDeep<\n  T,\n  RemoveEmptyObjects extends boolean = false,\n  RemoveEmptyArrays extends boolean = false\n>(\n  input: T,\n  options?: ToNumberDeepOptions<RemoveEmptyObjects, RemoveEmptyArrays>\n) {\n  if (!isPlainObject(options)) options = {};\n\n  const removeEmptyObjects = options.removeEmptyObjects ?? false;\n  const removeEmptyArrays = options.removeEmptyArrays ?? false;\n\n  function _internal<\n    T,\n    RemoveEmptyObjects extends boolean,\n    RemoveEmptyArrays extends boolean\n  >(\n    input: T,\n    options: Required<\n      ToNumberDeepOptions<RemoveEmptyObjects, RemoveEmptyArrays>\n    > & {\n      isRoot: boolean;\n    }\n  ): unknown {\n    if (isNil(input) || isRegExp(input)) return undefined;\n\n    const { removeEmptyArrays, removeEmptyObjects, isRoot } = options;\n\n    if (!isBoolean(removeEmptyObjects) || !isBoolean(removeEmptyArrays)) {\n      throw new TypeError(\n        createMessage(\n          \"toNumberDeep\",\n          `Parameters \\`removeEmptyObjects\\` and \\`removeEmptyArrays\\` property of the \\`options\\` (second parameter) must be of type \\`boolean\\`, but received: ['removeEmptyObjects': \\`${getPreciseType(\n            removeEmptyObjects\n          )}\\`, 'removeEmptyArrays': \\`${getPreciseType(removeEmptyArrays)}\\`].`\n        )\n      );\n    }\n\n    // primitive boolean, numbers, or numeric strings\n    if (isNumber(input) || isBoolean(input) || isNonEmptyString(input)) {\n      const num = Number(input);\n      return isInfinityNumber(num) || isNaN(num) ? undefined : num;\n    }\n\n    if (\n      isNumberObject(input) ||\n      isStringObject(input) ||\n      isBooleanObject(input)\n    ) {\n      const valOf = Number(input.valueOf());\n      return isInfinityNumber(valOf) || isNaN(valOf) ? undefined : valOf;\n    }\n\n    if (isDate(input, { skipInvalidDate: true })) {\n      try {\n        return !isNaN(input.getTime()) ? input.getTime() : 0;\n      } catch {\n        return 0;\n      }\n    }\n\n    if (isBuffer(input)) {\n      const arr = Array.from(input)\n        .map((n) =>\n          _internal(n, {\n            removeEmptyObjects,\n            removeEmptyArrays,\n            isRoot: false\n          })\n        )\n        .filter((item) => !isUndefined(item));\n      if (removeEmptyArrays && isEmptyArray(arr)) return undefined;\n      return arr;\n    }\n\n    if (isTypedArray(input)) {\n      // If BigInt TypedArray\n      if (input instanceof BigInt64Array || input instanceof BigUint64Array) {\n        const newArray = Array.from(input)\n          .map((item) =>\n            _internal(item, {\n              removeEmptyObjects,\n              removeEmptyArrays,\n              isRoot: false\n            })\n          )\n          .filter((item) => !isUndefined(item));\n\n        if (removeEmptyArrays && isEmptyArray(newArray)) return undefined;\n        return newArray;\n      } else {\n        // All TypedArray based of number\n        const newArray = Array.from(input)\n          .map((item) =>\n            _internal(item, {\n              removeEmptyObjects,\n              removeEmptyArrays,\n              isRoot: false\n            })\n          )\n          .filter((item) => !isUndefined(item));\n\n        if (removeEmptyArrays && isEmptyArray(newArray)) return undefined;\n        return newArray;\n      }\n    }\n\n    if (isSet(input)) {\n      const newArray = Array.from(input)\n        .map((item) =>\n          _internal(item, {\n            removeEmptyObjects,\n            removeEmptyArrays,\n            isRoot: false\n          })\n        )\n        .filter((item) => !isUndefined(item));\n\n      if (removeEmptyArrays && isEmptyArray(newArray)) return undefined;\n      return newArray;\n    }\n\n    if (isMap(input)) {\n      let newArray = Array.from(input.entries())\n        .map(([k, v]) => {\n          const key = _internal(k, {\n            removeEmptyObjects,\n            removeEmptyArrays,\n            isRoot: false\n          });\n          const value = _internal(v, {\n            removeEmptyObjects,\n            removeEmptyArrays,\n            isRoot: false\n          });\n          return !isUndefined(key) && !isUndefined(value)\n            ? [key, value]\n            : undefined;\n        })\n        .filter((item) => !isUndefined(item));\n\n      // remove empty arrays recursively\n      if (removeEmptyArrays) {\n        newArray = newArray.filter((v) => !isEmptyArray(v));\n      }\n\n      if (removeEmptyArrays && isEmptyArray(newArray)) return undefined;\n      return newArray;\n    }\n\n    if (isArray(input)) {\n      const newArray = input\n        .map((item) =>\n          _internal(item, {\n            removeEmptyObjects,\n            removeEmptyArrays,\n            isRoot: false\n          })\n        )\n        .filter((item) => !isUndefined(item));\n\n      if (removeEmptyArrays && isEmptyArray(newArray)) return undefined;\n      return newArray;\n    }\n\n    if (isObject(input)) {\n      const newObject: Record<string, unknown> = {};\n\n      for (const [key, value] of Object.entries(input)) {\n        const convertedValue = _internal(value, {\n          removeEmptyObjects,\n          removeEmptyArrays,\n          isRoot: false\n        });\n        if (!isUndefined(convertedValue)) {\n          newObject[key] = convertedValue;\n        }\n      }\n\n      if (removeEmptyObjects && isEmptyObject(newObject)) {\n        return isRoot ? {} : undefined;\n      }\n\n      return newObject;\n    }\n\n    return undefined;\n  }\n\n  return _internal(input, {\n    removeEmptyObjects,\n    removeEmptyArrays,\n    isRoot: true\n  });\n}\n","import type {\n  ConvertedDeepString,\n  ToStringDeepOptions\n} from \"./_private/toStringDeep.types\";\n\nimport { createMessage } from \"@/_private/logger\";\n\nimport { isNaN } from \"@/predicates/is/isNaN\";\nimport { isNil } from \"@/predicates/is/isNil\";\nimport { isSet } from \"@/predicates/is/isSet\";\nimport { isMap } from \"@/predicates/is/isMap\";\nimport { isDate } from \"@/predicates/is/isDate\";\nimport { isArray } from \"@/predicates/is/isArray\";\nimport { isBuffer } from \"@/predicates/is/isBuffer\";\nimport { isObject } from \"@/predicates/is/isObject\";\nimport { isRegExp } from \"@/predicates/is/isRegExp\";\nimport { isString } from \"@/predicates/is/isString\";\nimport { isNumber } from \"@/predicates/is/isNumber\";\nimport { isBoolean } from \"@/predicates/is/isBoolean\";\nimport { isUndefined } from \"@/predicates/is/isUndefined\";\nimport { isEmptyArray } from \"@/predicates/is/isEmptyArray\";\nimport { isTypedArray } from \"@/predicates/is/isTypedArray\";\nimport { isPlainObject } from \"@/predicates/is/isPlainObject\";\nimport { isNumberObject } from \"@/predicates/is/isNumberObject\";\nimport { isStringObject } from \"@/predicates/is/isStringObject\";\nimport { isBooleanObject } from \"@/predicates/is/isBooleanObject\";\nimport { getPreciseType } from \"@/predicates/type/getPreciseType\";\nimport { isInfinityNumber } from \"@/predicates/is/isInfinityNumber\";\n\n/** ---------------------------------------------------------------------------------------------------\n * * ***Utility: `toStringDeep`.***\n * ----------------------------------------------------------------------------------------------------\n * **Converts all values in an array, object, Set, Map, or deeply nested structure to string.**\n *\n * ---\n * - **Features:**\n *      - Converts numbers and strings to string:\n *        - `3.5` ➔ `\"3.5\"`.\n *        - `\"3.5\"` ➔ `\"3.5\"`.\n *      - Converts boolean to string:\n *        - `true` ➔ `\"true\"`.\n *        - `false` ➔ `\"false\"`.\n *      - Converts Date to ISO string (`Date ➔ string`).\n *      - Converts RegExp to string (e.g., `/abc/ ➔ \"/abc/\"`).\n *      - Converts `Buffer`, `TypedArray`, `Set`, `Map`, and `arrays` recursively to `arrays of strings`.\n *      - Converts boxed primitives box into their primitive equivalents then convert to string:\n *        - For `new String` we convert everything to string (behavior JS of new String):\n *          - `new String(\"hi\")` ➔ `.valueOf()` ➔ `\"hi\"`.\n *          - `new String(true)` ➔ `.valueOf()` ➔ `\"true\"`.\n *        - For `new Boolean` we convert to boolean (behavior JS of new Boolean) then convert to string:\n *          - `new Boolean(true)` ➔ `.valueOf()` ➔ `true` ➔ `true.toString()` ➔ `\"true\"`.\n *          - Special behavior JS of new Boolean, return `false` **(convert to string: `\"false\"`)**\n *            for `false`, (`0` / `-0`), `\"\"` (empty-string), `null`, `undefined`, `NaN`, otherwise\n *            `true` **(convert to string: `\"true\"`)**.\n *        - For `new Number`:\n *          - `new Number(42)` ➔ `.valueOf()` ➔ `42` ➔ `42.toString()` ➔ `\"42\"`.\n *          - `new Number(\"42\")` ➔ `.valueOf()` ➔ `42` ➔ `42.toString()` ➔ `\"42\"`.\n *          - `new Number(null)` ➔ `.valueOf()` ➔ `0` (`null` is `0` behavior JS of new Number) ➔ `0.toString()` ➔ `\"0\"`.\n *          - If result from `valueOf()` is `NaN` or `Infinity` ***(will removing)***:\n *            - `new Number(NaN)` ➔ `.valueOf()` ➔ `NaN` ***(remove)***.\n *            - `new Number(\"abc\")` ➔ `.valueOf()` ➔ `NaN`  ***(remove)***.\n *            - `new Number(undefined)` ➔ `.valueOf()` ➔ `NaN` ***(remove)***.\n *            - `new Number(Infinity)` ➔ `.valueOf()` ➔ `Infinity` ***(remove)***.\n *            - `new Number(-Infinity)` ➔ `.valueOf()` ➔ `-Infinity` ***(remove)***.\n *      - Recursively processes `nested objects`, `arrays`, `buffers`, `sets`, `maps`, and `typed arrays`.\n *      - Removes `null`, `undefined`, `NaN`, `Infinity`, `-Infinity`.\n *      - Removes `unsupported` types like `functions`, `symbols`, and `BigInt`.\n *      - Can optionally remove empty arrays (`[]`) and/or empty objects (`{}`) **recursively**.\n *\n * ---\n * @template T - The input data type (`primitive`, `object`, `array`, `Set`, `Map`, or `any nested combination`).\n * @template RemoveEmptyObjects - If `true`, empty objects `{}` will be removed recursively.\n * @template RemoveEmptyArrays - If `true`, empty arrays `[]` will be removed recursively (including arrays nested in `objects` / `arrays` / `Sets` / `Maps`).\n *\n * ---\n * @param {*} input - The data to convert.\n * @param {ToStringDeepOptions<RemoveEmptyObjects, RemoveEmptyArrays>} [options] - Conversion options.\n *\n * ---\n * @returns {ConvertedDeepString<T, RemoveEmptyObjects, RemoveEmptyArrays>|undefined}\n * The transformed data, or `undefined` if the entire structure becomes empty after processing.\n *\n * ---\n * @example\n *\n * 1. #### Simple array conversion:\n *    ```ts\n *    toStringDeep([1, \"2\", 3]);\n *    // ➔ [\"1\", \"2\", \"3\"]\n *    ```\n *    ---\n * 2. #### Simple top-level conversion:\n *    ```ts\n *    toStringDeep(123);\n *    // ➔ \"123\"\n *\n *    toStringDeep(\"123\");\n *    // ➔ \"123\"\n *\n *    toStringDeep(true);\n *    // ➔ \"true\"\n *\n *    toStringDeep(false);\n *    // ➔ \"false\"\n *    ```\n *    ---\n * 3. #### Nested arrays:\n *    ```ts\n *    toStringDeep([\n *      1,\n *      [\"2\", [3, [null, \"4\", true, false]]]\n *    ]);\n *    // ➔ [\"1\", [\"2\", [\"3\", [\"4\", \"true\", \"false\"]]]]\n *    ```\n *    ---\n * 4. #### Object with nested values:\n *    ```ts\n *    toStringDeep({\n *      a: 1,\n *      b: \"2\",\n *      c: {\n *        d: 3,\n *        e: null,\n *        f: true,\n *        g: false\n *      }\n *    });\n *    // ➔ {\n *    //      a: \"1\",\n *    //      b: \"2\",\n *    //      c: {\n *    //        d: \"3\",\n *    //        f: \"true\",\n *    //        g: \"false\"\n *    //      }\n *    //    }\n *    ```\n *    ---\n * 5. #### Remove empty objects:\n *    ```ts\n *    toStringDeep(\n *      { a: {}, b: \"1\" },\n *      { removeEmptyObjects: true }\n *    );\n *    // ➔ { b: \"1\" }\n *    ```\n *    ---\n * 6. #### Remove empty arrays recursively:\n *    ```ts\n *    toStringDeep(\n *      [\"1\", [], { a: [] }],\n *      { removeEmptyArrays: true }\n *    );\n *    // ➔ [\"1\", { a: [] }]\n *    ```\n *    ---\n * 7. #### Remove empty objects and arrays recursively:\n *    ```ts\n *    toStringDeep(\n *      {\n *        a: {},\n *        b: [],\n *        c: [{ d: {}, e: [] }, \"1\"]\n *      },\n *      {\n *        removeEmptyObjects: true,\n *        removeEmptyArrays: true\n *      }\n *    );\n *    // ➔ { c: [\"1\"] }\n *    ```\n *    ---\n * 8. #### Fully empty structure returns undefined:\n *    ```ts\n *    toStringDeep(\n *      [null, undefined, {}],\n *      {\n *        removeEmptyObjects: true,\n *        removeEmptyArrays: true\n *      }\n *    );\n *    // ➔ undefined\n *    ```\n */\nexport function toStringDeep(\n  input?: null | undefined,\n  options?: ToStringDeepOptions<boolean, boolean>\n): undefined;\nexport function toStringDeep<\n  T,\n  RemoveEmptyObjects extends boolean = false,\n  RemoveEmptyArrays extends boolean = false\n>(\n  input: T,\n  options?: ToStringDeepOptions<RemoveEmptyObjects, RemoveEmptyArrays>\n): ConvertedDeepString<T, RemoveEmptyObjects, RemoveEmptyArrays>;\nexport function toStringDeep<\n  T,\n  RemoveEmptyObjects extends boolean = false,\n  RemoveEmptyArrays extends boolean = false\n>(\n  input: T,\n  options?: ToStringDeepOptions<RemoveEmptyObjects, RemoveEmptyArrays>\n) {\n  if (!isPlainObject(options)) options = {};\n\n  const removeEmptyObjects = options.removeEmptyObjects ?? false;\n  const removeEmptyArrays = options.removeEmptyArrays ?? false;\n\n  function _internal<\n    T,\n    RemoveEmptyObjects extends boolean,\n    RemoveEmptyArrays extends boolean\n  >(\n    input: T,\n    options: Required<\n      ToStringDeepOptions<RemoveEmptyObjects, RemoveEmptyArrays>\n    > & {\n      isRoot: boolean;\n    }\n  ): unknown {\n    if (isNil(input) || isInfinityNumber(input)) return undefined;\n\n    const { removeEmptyArrays, removeEmptyObjects, isRoot } = options;\n\n    if (!isBoolean(removeEmptyObjects) || !isBoolean(removeEmptyArrays)) {\n      throw new TypeError(\n        createMessage(\n          \"toStringDeep\",\n          `Parameters \\`removeEmptyObjects\\` and \\`removeEmptyArrays\\` property of the \\`options\\` (second parameter) must be of type \\`boolean\\`, but received: ['removeEmptyObjects': \\`${getPreciseType(\n            removeEmptyObjects\n          )}\\`, 'removeEmptyArrays': \\`${getPreciseType(removeEmptyArrays)}\\`].`\n        )\n      );\n    }\n\n    if (isNumber(input) || isString(input) || isBoolean(input))\n      return String(input);\n\n    if (isNumberObject(input)) {\n      const valOf = input.valueOf();\n      return isInfinityNumber(valOf) || isNaN(valOf)\n        ? undefined\n        : valOf.toString();\n    }\n    if (isStringObject(input)) return input.valueOf();\n    if (isBooleanObject(input)) return input.valueOf().toString();\n\n    if (isDate(input, { skipInvalidDate: true })) {\n      try {\n        return input.toISOString();\n      } catch {\n        return input.toString();\n      }\n    }\n\n    if (isRegExp(input)) return input.toString();\n\n    if (isBuffer(input)) {\n      return Array.from(input)\n        .map((v) => String(v))\n        .filter((v) => !isUndefined(v));\n    }\n\n    if (isTypedArray(input)) {\n      // If BigInt TypedArray\n      if (input instanceof BigInt64Array || input instanceof BigUint64Array) {\n        const newArray = Array.from(input)\n          .map((item) =>\n            _internal(item, {\n              removeEmptyObjects,\n              removeEmptyArrays,\n              isRoot: false\n            })\n          )\n          .map((v) => String(v))\n          .filter((item) => !isUndefined(item));\n\n        if (removeEmptyArrays && isEmptyArray(newArray)) return undefined;\n        return newArray;\n      } else {\n        // All TypedArray based of number\n        const newArray = Array.from(input)\n          .map((item) =>\n            _internal(item, {\n              removeEmptyObjects,\n              removeEmptyArrays,\n              isRoot: false\n            })\n          )\n          .map((v) => String(v))\n          .filter((item) => !isUndefined(item));\n\n        if (removeEmptyArrays && isEmptyArray(newArray)) return undefined;\n        return newArray;\n      }\n    }\n\n    if (isSet(input)) {\n      const arr = Array.from(input)\n        .map((v) =>\n          _internal(v, { removeEmptyObjects, removeEmptyArrays, isRoot: false })\n        )\n        .filter((v) => !isUndefined(v));\n      if (removeEmptyArrays && isEmptyArray(arr)) return undefined;\n      return arr;\n    }\n\n    // Map ➔ array of [key, value]\n    if (isMap(input)) {\n      const arr = Array.from(input.entries())\n        .map(([k, v]) => [\n          _internal(k, {\n            removeEmptyObjects,\n            removeEmptyArrays,\n            isRoot: false\n          }),\n          _internal(v, { removeEmptyObjects, removeEmptyArrays, isRoot: false })\n        ])\n        .filter(([k, v]) => !isUndefined(k) && !isUndefined(v));\n      if (removeEmptyArrays && isEmptyArray(arr)) return undefined;\n      return arr;\n    }\n\n    if (isArray(input)) {\n      let newArray = input\n        .map((item) =>\n          _internal(item, {\n            removeEmptyObjects,\n            removeEmptyArrays,\n            isRoot: false\n          })\n        )\n        .filter((item) => !isUndefined(item));\n\n      // remove empty arrays recursively\n      if (removeEmptyArrays) {\n        newArray = newArray.filter((v) => !(isArray(v) && v.length === 0));\n      }\n\n      if (removeEmptyArrays && isEmptyArray(newArray)) return undefined;\n      return newArray;\n    }\n\n    if (isObject(input)) {\n      const newObject: Record<string, unknown> = {};\n\n      for (const [key, value] of Object.entries(input)) {\n        const convertedValue = _internal(value, {\n          removeEmptyObjects,\n          removeEmptyArrays,\n          isRoot: false\n        });\n\n        if (!isUndefined(convertedValue)) {\n          newObject[key] = convertedValue;\n        } else if (isArray(value) && !removeEmptyArrays) {\n          // preserve empty array property\n          newObject[key] = [];\n        }\n      }\n\n      if (removeEmptyObjects && Object.keys(newObject).length === 0) {\n        return isRoot ? {} : undefined;\n      }\n\n      return newObject;\n    }\n\n    return undefined;\n  }\n\n  return _internal(input, {\n    removeEmptyObjects,\n    removeEmptyArrays,\n    isRoot: true\n  });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyFA,SAAgB,yBACd,OACA,UAAoD,CAAC,GACrD;CACA,IAAI,CAACA,6BAAc,OAAO,GAAG,UAAU,CAAC;CAExC,MAAM,MAAM,QAAQ,4BAA4B;CAEhD,+BAAgB,KAAK,EACnB,UAAU,EAAE,aAAa,gBACvBC,6BACE,4BACA,2GAA2G,UAAU,sBAAsB,YAAY,IACzJ,EACJ,CAAC;CAED,IAAIC,uBAAQ,KAAK,GAAG;EAClB,MAAM,SAAS,MAAM,KAAK,QAAQ,MAAM;GACtC,IAAIC,0BAAS,CAAC,GAAG,OAAO,OAAO,CAAC;GAGhC,MAAM,QADM,OAAO,CAAC,CAAC,CAAC,KACN,CAAC,CAAC,MAAM,eAAe;GACvC,OAAO,QAAQ,OAAO,MAAM,EAAE,IAAIC,sBAAO,CAAC,IAAI,OAAO;EACvD,CAAC;EAED,O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