import { normalize as e } from "./normalize.js";
import { Info as t } from "./util/info.js";
import { DefinedInfo as n } from "./util/defined-info.js";
//#region ../../node_modules/property-information/lib/find.js
var r = /[A-Z]/g, i = /-[a-z]/g, a = /^data[-\w.:]+$/i;
function o(o, l) {
	let u = e(l), d = l, f = t;
	if (u in o.normal) return o.property[o.normal[u]];
	if (u.length > 4 && u.slice(0, 4) === "data" && a.test(l)) {
		if (l.charAt(4) === "-") {
			let e = l.slice(5).replace(i, c);
			d = "data" + e.charAt(0).toUpperCase() + e.slice(1);
		} else {
			let e = l.slice(4);
			if (!i.test(e)) {
				let t = e.replace(r, s);
				t.charAt(0) !== "-" && (t = "-" + t), l = "data" + t;
			}
		}
		f = n;
	}
	return new f(d, l);
}
function s(e) {
	return "-" + e.toLowerCase();
}
function c(e) {
	return e.charAt(1).toUpperCase();
}
//#endregion
export { o as find };
