import sourceEvent_default from "./sourceEvent.js";
function pointer_default(t, n) {
	if (t = sourceEvent_default(t), n === void 0 && (n = t.currentTarget), n) {
		var r = n.ownerSVGElement || n;
		if (r.createSVGPoint) {
			var i = r.createSVGPoint();
			return i.x = t.clientX, i.y = t.clientY, i = i.matrixTransform(n.getScreenCTM().inverse()), [i.x, i.y];
		}
		if (n.getBoundingClientRect) {
			var a = n.getBoundingClientRect();
			return [t.clientX - a.left - n.clientLeft, t.clientY - a.top - n.clientTop];
		}
	}
	return [t.pageX, t.pageY];
}
export { pointer_default as default };
