const pointEnd = point("end"), pointStart = point("start");
function point(e) {
	return t;
	function t(t) {
		let n = t && t.position && t.position[e] || {};
		if (typeof n.line == "number" && n.line > 0 && typeof n.column == "number" && n.column > 0) return {
			line: n.line,
			column: n.column,
			offset: typeof n.offset == "number" && n.offset > -1 ? n.offset : void 0
		};
	}
}
function position(n) {
	let r = pointStart(n), i = pointEnd(n);
	if (r && i) return {
		start: r,
		end: i
	};
}
export { pointEnd, pointStart, position };
