import { splice as e } from "../micromark-util-chunked/index.js";
//#region ../../node_modules/micromark-util-combine-extensions/index.js
var t = {}.hasOwnProperty;
function n(e) {
	let t = {}, n = -1;
	for (; ++n < e.length;) r(t, e[n]);
	return t;
}
function r(e, n) {
	let r;
	for (r in n) {
		let a = (t.call(e, r) ? e[r] : void 0) || (e[r] = {}), o = n[r], s;
		if (o) for (s in o) {
			t.call(a, s) || (a[s] = []);
			let e = o[s];
			i(a[s], Array.isArray(e) ? e : e ? [e] : []);
		}
	}
}
function i(t, n) {
	let r = -1, i = [];
	for (; ++r < n.length;) (n[r].add === "after" ? t : i).push(n[r]);
	e(t, 0, 0, i);
}
//#endregion
export { n as combineExtensions };
