const c = () => ({
  top: Number.NEGATIVE_INFINITY,
  right: Number.NEGATIVE_INFINITY,
  bottom: Number.POSITIVE_INFINITY,
  left: Number.POSITIVE_INFINITY
}), E = (t) => t.top !== Number.NEGATIVE_INFINITY && t.bottom !== Number.POSITIVE_INFINITY && t.left !== Number.POSITIVE_INFINITY && t.right !== Number.NEGATIVE_INFINITY, h = (t) => t.reduce(
  (n, e) => ({
    top: Math.max(n.top, e.lat),
    right: Math.max(n.right, e.lng),
    bottom: Math.min(n.bottom, e.lat),
    left: Math.min(n.left, e.lng)
  }),
  c()
), T = /^\s*(-?\d+(\.\d+)?)\s*[,\s]\s*(-?\d+(\.\d+)?)\s*$/, V = (t) => {
  const n = T.exec(t);
  if (n) {
    const e = Number.parseFloat(n[1]), I = Number.parseFloat(n[3]);
    if (e >= -90 && e <= 90 && I >= -180 && I <= 180)
      return {
        lat: e,
        lng: I
      };
  }
}, F = (t = { lat: 0, lng: 0 }, n = { lat: 1, lng: 1 }, e = 200, I = (a) => {
}, r = () => {
}) => {
  const a = window.requestAnimationFrame, s = e / 16, i = (n.lat - t.lat) / s, u = (n.lng - t.lng) / s, g = Math.PI / s;
  let N = t.lat, o = t.lng, l = 0;
  const m = () => {
    l += g, N += i * Math.sin(l) ** 2 * 2, o += u * Math.sin(l) ** 2 * 2, l < Math.PI ? (I({ lat: N, lng: o }), a(m)) : (I(n), r());
  };
  a(m);
};
export {
  h as calculateBoundingBox,
  F as ease,
  E as isValidBoundingBox,
  V as parsePositionFromString
};
//# sourceMappingURL=positions.js.map
