//#region ../../node_modules/@iconify/utils/lib/svg/id.js
var e = /\sid="(\S+)"/g, t = /* @__PURE__ */ new Map();
function n(e) {
	e = e.replace(/[0-9]+$/, "") || "a";
	let n = t.get(e) || 0;
	return t.set(e, n + 1), n ? `${e}${n}` : e;
}
function r(t) {
	let r = [], i;
	for (; i = e.exec(t);) r.push(i[1]);
	if (!r.length) return t;
	let a = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
	return r.forEach((e) => {
		let r = n(e), i = e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
		t = t.replace(RegExp("([#;\"])(" + i + ")([\")]|\\.[a-z])", "g"), "$1" + r + a + "$3");
	}), t = t.replace(new RegExp(a, "g"), ""), t;
}
//#endregion
export { r as replaceIDs };
