{"version":3,"file":"utils.mjs","names":[],"sources":["../../src/internal/utils.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Creates a const map from the given values\n * @param values - An array of values to be used as keys and values in the map.\n * @returns A populated version of the map with the values and keys derived from the values.\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function createConstMap<T>(values: Array<T[keyof T]>): T {\n  // eslint-disable-next-line prefer-const, @typescript-eslint/no-explicit-any\n  let res: any = {};\n  const len = values.length;\n  for (let lp = 0; lp < len; lp++) {\n    const val = values[lp];\n    if (val) {\n      res[String(val).toUpperCase().replace(/[-.]/g, '_')] = val;\n    }\n  }\n\n  return res as T;\n}\n"],"mappings":";;;;;;;AAWA,SAAgB,eAAkB,QAA8B;CAE9D,IAAI,MAAW,CAAC;CAChB,MAAM,MAAM,OAAO;CACnB,KAAK,IAAI,KAAK,GAAG,KAAK,KAAK,MAAM;EAC/B,MAAM,MAAM,OAAO;EACnB,IAAI,KACF,IAAI,OAAO,GAAG,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,SAAS,GAAG,KAAK;CAE3D;CAEA,OAAO;AACT"}