@annotorious/annotorious 3.3.1 → 3.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/annotorious.es.js
CHANGED
|
@@ -418,7 +418,7 @@ const ft = (e) => lt(e.target), lt = (e) => {
|
|
|
418
418
|
var t, n;
|
|
419
419
|
return (e == null ? void 0 : e.annotation) !== void 0 && ((n = (t = e == null ? void 0 : e.selector) == null ? void 0 : t.geometry) == null ? void 0 : n.bounds) !== void 0;
|
|
420
420
|
}, _i = (e, t = !1) => {
|
|
421
|
-
const n = typeof e == "string" ? e : e.value, i =
|
|
421
|
+
const n = typeof e == "string" ? e : e.value, i = /(xywh)=(pixel|percent)?:?(.+?),(.+?),(.+?),(.+)*/g, o = [...n.matchAll(i)][0], [r, s, a, l, u, c, f] = o;
|
|
422
422
|
if (s !== "xywh") throw new Error("Unsupported MediaFragment: " + n);
|
|
423
423
|
if (a && a !== "pixel") throw new Error(`Unsupported MediaFragment unit: ${a}`);
|
|
424
424
|
const [d, p, g, y] = [l, u, c, f].map(parseFloat);
|
|
@@ -2020,7 +2020,7 @@ const us = (e, t = { strict: !0, invertY: !1 }) => ({ parse: (o) => Io(o, t), se
|
|
|
2020
2020
|
modified: r,
|
|
2021
2021
|
body: s,
|
|
2022
2022
|
...a
|
|
2023
|
-
} = e, l = Ro(s || [], n), u = Array.isArray(e.target) ? e.target[0] : e.target, c = Array.isArray(u.selector) ? u.selector[0] : u.selector, f = (c == null ? void 0 : c.type) === "FragmentSelector" ? _i(c, t.invertY) : (c == null ? void 0 : c.type) === "SvgSelector" ? zi(c) : void 0;
|
|
2023
|
+
} = e, l = Ro(s || [], n), u = Array.isArray(e.target) ? e.target[0] : e.target, c = typeof u == "string" ? u : Array.isArray(u.selector) ? u.selector[0] : u.selector, f = typeof c == "string" || (c == null ? void 0 : c.type) === "FragmentSelector" ? _i(c, t.invertY) : (c == null ? void 0 : c.type) === "SvgSelector" ? zi(c) : void 0;
|
|
2024
2024
|
return f || !t.strict ? {
|
|
2025
2025
|
parsed: {
|
|
2026
2026
|
...a,
|