import { n as f } from "./normalize.mjs";
import { d as c } from "./lib/util/defined-info.mjs";
import { i as s } from "./lib/util/info.mjs";
var p = f, d = c, l = s, e = "data", I = u, m = /^data[-\w.:]+$/i, o = /-[a-z]/g, v = /[A-Z]/g;
function u(a, r) {
  var t = p(r), n = r, i = l;
  return t in a.normal ? a.property[a.normal[t]] : (t.length > 4 && t.slice(0, 4) === e && m.test(r) && (r.charAt(4) === "-" ? n = A(r) : r = h(r), i = d), new i(n, r));
}
function A(a) {
  var r = a.slice(5).replace(o, g);
  return e + r.charAt(0).toUpperCase() + r.slice(1);
}
function h(a) {
  var r = a.slice(4);
  return o.test(r) ? a : (r = r.replace(v, b), r.charAt(0) !== "-" && (r = "-" + r), e + r);
}
function b(a) {
  return "-" + a.toLowerCase();
}
function g(a) {
  return a.charAt(1).toUpperCase();
}
export {
  I as f
};
