function normalizeCustomFieldValues(values) {
  const result = {};
  for (const [key, value] of Object.entries(values)) {
    if (Array.isArray(value)) {
      result[key] = value.map((entry) => normalizePrimitive(entry));
    } else {
      result[key] = normalizePrimitive(value);
    }
  }
  return result;
}
function normalizePrimitive(value) {
  if (value === null || value === void 0 || typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
    return value;
  }
  return String(value);
}
function normalizeCustomFieldResponse(values) {
  if (!values) return void 0;
  const entries = {};
  for (const [key, value] of Object.entries(values)) {
    if (value === void 0) continue;
    if (key.startsWith("cf_") || key.startsWith("cf:")) {
      const normalized = key.slice(3);
      if (normalized) entries[normalized] = value;
      continue;
    }
    entries[key] = value;
  }
  return Object.keys(entries).length ? entries : void 0;
}
export {
  normalizeCustomFieldResponse,
  normalizeCustomFieldValues
};
//# sourceMappingURL=normalize.js.map
