var f = Object.defineProperty;
var r = (e, t) => f(e, "name", { value: t, configurable: !0 });
function l(e, t) {
  const s = c(e);
  return t ? s : b(p(s));
}
r(l, "localFieldName");
function h(e) {
  return l(e, !1);
}
r(h, "localOneofName");
const J = c;
function c(e) {
  let t = !1;
  const s = [];
  for (let a = 0; a < e.length; a++) {
    let o = e.charAt(a);
    switch (o) {
      case "_":
        t = !0;
        break;
      case "0":
      case "1":
      case "2":
      case "3":
      case "4":
      case "5":
      case "6":
      case "7":
      case "8":
      case "9":
        s.push(o), t = !1;
        break;
      default:
        t && (t = !1, o = o.toUpperCase()), s.push(o);
        break;
    }
  }
  return s.join("");
}
r(c, "protoCamelCase");
const i = /* @__PURE__ */ new Set([
  // names reserved by JavaScript
  "constructor",
  "toString",
  "toJSON",
  "valueOf"
]), u = /* @__PURE__ */ new Set([
  // names reserved by the runtime
  "getType",
  "clone",
  "equals",
  "fromBinary",
  "fromJson",
  "fromJsonString",
  "toBinary",
  "toJson",
  "toJsonString",
  // names reserved by the runtime for the future
  "toObject"
]), n = /* @__PURE__ */ r((e) => `${e}$`, "fallback"), p = /* @__PURE__ */ r((e) => u.has(e) ? n(e) : e, "safeMessageProperty"), b = /* @__PURE__ */ r((e) => i.has(e) ? n(e) : e, "safeObjectProperty");
export {
  J as fieldJsonName,
  l as localFieldName,
  h as localOneofName,
  b as safeObjectProperty
};
