var tab = 9, space = 32;
function trimLines(e) {
	let t = String(e), n = /\r?\n|\r/g, i = n.exec(t), a = 0, o = [];
	for (; i;) o.push(trimLine(t.slice(a, i.index), a > 0, !0), i[0]), a = i.index + i[0].length, i = n.exec(t);
	return o.push(trimLine(t.slice(a), a > 0, !1)), o.join("");
}
function trimLine(n, r, i) {
	let a = 0, o = n.length;
	if (r) {
		let r = n.codePointAt(a);
		for (; r === tab || r === space;) a++, r = n.codePointAt(a);
	}
	if (i) {
		let r = n.codePointAt(o - 1);
		for (; r === tab || r === space;) o--, r = n.codePointAt(o - 1);
	}
	return o > a ? n.slice(a, o) : "";
}
export { trimLines };
