{
  "version": 3,
  "sources": ["../../../src/internal-utils/array-like.ts"],
  "sourcesContent": ["import type { SingleOrArray } from '../types/array-like';\n\n/** Normalizes a SingleOrArray value as an array */\nexport const normalizeAsArray = <T>(value: SingleOrArray<T>) => (Array.isArray(value) ? value : [value]);\n\n/** Normalizes a SingleOrArray value as an array or undefined */\nexport const normalizeAsOptionalArray = <T>(value?: SingleOrArray<T>) =>\n  value === undefined ? undefined : Array.isArray(value) ? value : [value];\n\n/**\n * Returns an array by efficiently concatenating two potential arrays as needed.  If either array is unset / empty, the other array is\n * returned without copying.  If both arrays are unset / empty, a new empty array is returned.\n */\nexport const concatArrays = <T>(a?: Array<T>, b?: Array<T>): T[] => {\n  const aLength = a?.length ?? 0;\n  const bLength = b?.length ?? 0;\n  if (aLength === 0 && bLength === 0) {\n    return [];\n  } else if (bLength === 0) {\n    return a!;\n  } else if (aLength === 0) {\n    return b!;\n  } else {\n    return [...a!, ...b!];\n  }\n};\n"],
  "mappings": "AAGO,MAAM,mBAAmB,CAAI,UAA6B,MAAM,QAAQ,KAAK,IAAI,QAAQ,CAAC,KAAK;AAG/F,MAAM,2BAA2B,CAAI,UAC1C,UAAU,SAAY,SAAY,MAAM,QAAQ,KAAK,IAAI,QAAQ,CAAC,KAAK;AAMlE,MAAM,eAAe,CAAI,GAAc,MAAsB;AAClE,QAAM,UAAU,GAAG,UAAU;AAC7B,QAAM,UAAU,GAAG,UAAU;AAC7B,MAAI,YAAY,KAAK,YAAY,GAAG;AAClC,WAAO,CAAC;AAAA,EACV,WAAW,YAAY,GAAG;AACxB,WAAO;AAAA,EACT,WAAW,YAAY,GAAG;AACxB,WAAO;AAAA,EACT,OAAO;AACL,WAAO,CAAC,GAAG,GAAI,GAAG,CAAE;AAAA,EACtB;AACF;",
  "names": []
}
