dbf-mirador 4.3.0-testing3 → 4.3.1

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.
@@ -1,23 +1,29 @@
1
1
  import { G as e, K as t, Q as n, S as r, U as i, Z as a, a as o, at as s, b as c, dt as l, ft as u, g as d, i as f, m as p, rt as m, st as h, ut as g } from "./getters-B4oepJRC.js";
2
- import { At as _, I as v, It as y, Ut as b, _ as x, a as S, bt as C, c as w, fn as T, in as ee, m as E, mt as D, on as te, tn as ne, un as re, y as O } from "./canvases-DTR37lo-.js";
3
- import { O as k, c as A, h as ie, k as ae, n as oe, r as j, t as M } from "./FailedImageContext-BhA0TpVp.js";
4
- import { d as N, f as P, l as F, m as I, n as L, o as R, t as z, u as se } from "./index.module-CgUBfaXx.js";
2
+ import { At as _, I as v, It as y, Pt as b, Ut as x, _ as S, a as C, bt as w, c as T, fn as ee, in as E, m as D, mt as O, on as te, tn as ne, un as k, y as A } from "./canvases-DTR37lo-.js";
3
+ import { O as j, c as re, h as ie, k as ae, n as M, r as N, t as P } from "./FailedImageContext-BhA0TpVp.js";
4
+ import { d as F, f as I, l as oe, m as se, n as L, o as R, t as z, u as B } from "./index.module-CgUBfaXx.js";
5
5
  import { i as ce } from "./canvas-2ACcnS9Y.js";
6
- import { i as le, r as B, t as V } from "./PluginHook-DWFCXIIp.js";
7
- import { Children as ue, cloneElement as H, createContext as U, useCallback as W, useContext as G, useEffect as K, useId as de, useMemo as q, useReducer as fe, useRef as J, useState as Y } from "react";
8
- import { jsx as X, jsxs as pe } from "react/jsx-runtime";
9
- import { useTranslation as me } from "react-i18next";
10
- import { styled as he } from "@mui/material/styles";
11
- import ge from "@mui/material/Typography";
12
- import _e from "react-dom";
13
- import ve from "@mui/material/Box";
6
+ import { i as V, r as H, t as le } from "./PluginHook-DWFCXIIp.js";
7
+ import { Children as U, cloneElement as W, createContext as ue, useCallback as G, useContext as K, useEffect as q, useId as de, useMemo as J, useReducer as fe, useRef as Y, useState as pe } from "react";
8
+ import { jsx as X, jsxs as me } from "react/jsx-runtime";
9
+ import { useTranslation as he } from "react-i18next";
10
+ import { styled as ge } from "@mui/material/styles";
11
+ import _e from "@mui/material/Typography";
12
+ import ve from "react-dom";
13
+ import ye from "@mui/material/Box";
14
14
  //#region src/state/selectors/viewer.js
15
- var ye = p([
16
- x,
15
+ var be = p([
16
+ S,
17
17
  R,
18
18
  v,
19
19
  y
20
- ], (e, t, n, r) => new L(e.map(r), t, n)), be = /* @__PURE__ */ g(((e, t) => {
20
+ ], (e, t, n, r) => new L(e.map(r), t, n)), xe = /* @__PURE__ */ g(((e, t) => {
21
+ t.exports = b()(function(e, t, n) {
22
+ e[+!n].push(t);
23
+ }, function() {
24
+ return [[], []];
25
+ });
26
+ })), Se = /* @__PURE__ */ g(((e, t) => {
21
27
  var n = ne(), i = r();
22
28
  function a(e, t) {
23
29
  var r = -1, a = i(e) ? Array(e.length) : [];
@@ -26,14 +32,14 @@ var ye = p([
26
32
  }), a;
27
33
  }
28
34
  t.exports = a;
29
- })), xe = /* @__PURE__ */ g(((e, t) => {
35
+ })), Ce = /* @__PURE__ */ g(((e, t) => {
30
36
  function n(e, t) {
31
37
  var n = e.length;
32
38
  for (e.sort(t); n--;) e[n] = e[n].value;
33
39
  return e;
34
40
  }
35
41
  t.exports = n;
36
- })), Se = /* @__PURE__ */ g(((e, t) => {
42
+ })), we = /* @__PURE__ */ g(((e, t) => {
37
43
  var r = n();
38
44
  function i(e, t) {
39
45
  if (e !== t) {
@@ -44,8 +50,8 @@ var ye = p([
44
50
  return 0;
45
51
  }
46
52
  t.exports = i;
47
- })), Ce = /* @__PURE__ */ g(((e, t) => {
48
- var n = Se();
53
+ })), Te = /* @__PURE__ */ g(((e, t) => {
54
+ var n = we();
49
55
  function r(e, t, r) {
50
56
  for (var i = -1, a = e.criteria, o = t.criteria, s = a.length, c = r.length; ++i < s;) {
51
57
  var l = n(a[i], o[i]);
@@ -54,8 +60,8 @@ var ye = p([
54
60
  return e.index - t.index;
55
61
  }
56
62
  t.exports = r;
57
- })), we = /* @__PURE__ */ g(((t, n) => {
58
- var r = re(), i = te(), a = b(), o = be(), s = xe(), l = c(), u = Ce(), d = e(), f = m();
63
+ })), Ee = /* @__PURE__ */ g(((t, n) => {
64
+ var r = k(), i = te(), a = x(), o = Se(), s = Ce(), l = c(), u = Te(), d = e(), f = m();
59
65
  function p(e, t, n) {
60
66
  t = t.length ? r(t, function(e) {
61
67
  return f(e) ? function(t) {
@@ -76,23 +82,23 @@ var ye = p([
76
82
  });
77
83
  }
78
84
  n.exports = p;
79
- })), Te = /* @__PURE__ */ g(((e, n) => {
80
- var i = T(), o = r(), s = t(), c = a();
85
+ })), De = /* @__PURE__ */ g(((e, n) => {
86
+ var i = ee(), o = r(), s = t(), c = a();
81
87
  function l(e, t, n) {
82
88
  if (!c(n)) return !1;
83
89
  var r = typeof t;
84
90
  return (r == "number" ? o(n) && s(t, n.length) : r == "string" && t in n) ? i(n[t], e) : !1;
85
91
  }
86
92
  n.exports = l;
87
- })), Ee = /* @__PURE__ */ g(((e, t) => {
88
- var n = I(), r = we(), i = P(), a = Te();
93
+ })), Oe = /* @__PURE__ */ g(((e, t) => {
94
+ var n = se(), r = Ee(), i = I(), a = De();
89
95
  t.exports = i(function(e, t) {
90
96
  if (e == null) return [];
91
97
  var i = t.length;
92
98
  return i > 1 && a(e, t[0], t[1]) ? t = [] : i > 2 && a(t[0], t[1], t[2]) && (t = [t[0]]), r(e, n(t, 1), []);
93
99
  });
94
- })), De = /* @__PURE__ */ g(((e, t) => {
95
- var n = F(), r = I(), i = N();
100
+ })), ke = /* @__PURE__ */ g(((e, t) => {
101
+ var n = oe(), r = se(), i = F();
96
102
  function a(e, t, a) {
97
103
  var o = e.length;
98
104
  if (o < 2) return o ? i(e[0]) : [];
@@ -100,12 +106,12 @@ var ye = p([
100
106
  return i(r(c, 1), t, a);
101
107
  }
102
108
  t.exports = a;
103
- })), Oe = /* @__PURE__ */ g(((e, t) => {
104
- var n = ee(), r = P(), i = De(), a = se();
109
+ })), Ae = /* @__PURE__ */ g(((e, t) => {
110
+ var n = E(), r = I(), i = ke(), a = B();
105
111
  t.exports = r(function(e) {
106
112
  return i(n(e, a));
107
113
  });
108
- })), ke = /* @__PURE__ */ g(((e, t) => {
114
+ })), je = /* @__PURE__ */ g(((e, t) => {
109
115
  function n(e) {
110
116
  return new n.Viewer(e);
111
117
  }
@@ -1094,82 +1100,82 @@ var ye = p([
1094
1100
  E(a, e);
1095
1101
  },
1096
1102
  losecapture: function(e) {
1097
- te(a, e);
1103
+ O(a, e);
1098
1104
  },
1099
1105
  mouseenter: function(e) {
1100
- j(a, e);
1106
+ M(a, e);
1101
1107
  },
1102
1108
  mouseleave: function(e) {
1103
- M(a, e);
1109
+ N(a, e);
1104
1110
  },
1105
1111
  mouseover: function(e) {
1106
- N(a, e);
1112
+ P(a, e);
1107
1113
  },
1108
1114
  mouseout: function(e) {
1109
- P(a, e);
1115
+ F(a, e);
1110
1116
  },
1111
1117
  mousedown: function(e) {
1112
- F(a, e);
1118
+ I(a, e);
1113
1119
  },
1114
1120
  mouseup: function(e) {
1115
- I(a, e);
1121
+ oe(a, e);
1116
1122
  },
1117
1123
  mousemove: function(e) {
1118
- z(a, e);
1124
+ R(a, e);
1119
1125
  },
1120
1126
  touchstart: function(e) {
1121
- ne(a, e);
1127
+ te(a, e);
1122
1128
  },
1123
1129
  touchend: function(e) {
1124
- re(a, e);
1130
+ ne(a, e);
1125
1131
  },
1126
1132
  touchmove: function(e) {
1127
- O(a, e);
1133
+ k(a, e);
1128
1134
  },
1129
1135
  touchcancel: function(e) {
1130
- k(a, e);
1136
+ A(a, e);
1131
1137
  },
1132
1138
  gesturestart: function(e) {
1133
- A(a, e);
1139
+ j(a, e);
1134
1140
  },
1135
1141
  gesturechange: function(e) {
1136
- ie(a, e);
1142
+ re(a, e);
1137
1143
  },
1138
1144
  gotpointercapture: function(e) {
1139
- ae(a, e);
1145
+ ie(a, e);
1140
1146
  },
1141
1147
  lostpointercapture: function(e) {
1142
- oe(a, e);
1148
+ ae(a, e);
1143
1149
  },
1144
1150
  pointerenter: function(e) {
1145
- j(a, e);
1151
+ M(a, e);
1146
1152
  },
1147
1153
  pointerleave: function(e) {
1148
- M(a, e);
1154
+ N(a, e);
1149
1155
  },
1150
1156
  pointerover: function(e) {
1151
- N(a, e);
1157
+ P(a, e);
1152
1158
  },
1153
1159
  pointerout: function(e) {
1154
- P(a, e);
1160
+ F(a, e);
1155
1161
  },
1156
1162
  pointerdown: function(e) {
1157
- F(a, e);
1163
+ I(a, e);
1158
1164
  },
1159
1165
  pointerup: function(e) {
1160
- I(a, e);
1166
+ oe(a, e);
1161
1167
  },
1162
1168
  pointermove: function(e) {
1163
- z(a, e);
1169
+ R(a, e);
1164
1170
  },
1165
1171
  pointercancel: function(e) {
1166
- le(a, e);
1172
+ ce(a, e);
1167
1173
  },
1168
1174
  pointerupcaptured: function(e) {
1169
- L(a, e);
1175
+ se(a, e);
1170
1176
  },
1171
1177
  pointermovecaptured: function(e) {
1172
- se(a, e);
1178
+ z(a, e);
1173
1179
  },
1174
1180
  tracking: !1,
1175
1181
  activePointersLists: [],
@@ -1330,7 +1336,7 @@ var ye = p([
1330
1336
  var t = n[e.hash], r, i, a, o, s, c = t.activePointersLists.length;
1331
1337
  for (r = 0; r < c; r++) if (a = t.activePointersLists[r], a.getLength() > 0) {
1332
1338
  for (s = [], o = a.asArray(), i = 0; i < o.length; i++) s.push(o[i]);
1333
- for (i = 0; i < s.length; i++) V(e, a, s[i]);
1339
+ for (i = 0; i < s.length; i++) H(e, a, s[i]);
1334
1340
  }
1335
1341
  for (r = 0; r < c; r++) t.activePointersLists.pop();
1336
1342
  t.sentDragEvent = !1;
@@ -1379,7 +1385,7 @@ var ye = p([
1379
1385
  }
1380
1386
  else t.element.setCapture(!0);
1381
1387
  } else a = c(t, e.MouseTracker.havePointerEvents ? "pointerevent" : n.type), r && i(window.top) && e.addEvent(window.top, a.upName, a.upHandler, !0), e.addEvent(e.MouseTracker.captureElement, a.upName, a.upHandler, !0), e.addEvent(e.MouseTracker.captureElement, a.moveName, a.moveHandler, !0);
1382
- U(t, n, !0);
1388
+ W(t, n, !0);
1383
1389
  }
1384
1390
  function u(t, n) {
1385
1391
  var a, o, s;
@@ -1391,7 +1397,7 @@ var ye = p([
1391
1397
  } catch {}
1392
1398
  } else t.element.releaseCapture();
1393
1399
  } else a = c(t, e.MouseTracker.havePointerEvents ? "pointerevent" : n.type), r && i(window.top) && e.removeEvent(window.top, a.upName, a.upHandler, !0), e.removeEvent(e.MouseTracker.captureElement, a.moveName, a.moveHandler, !0), e.removeEvent(e.MouseTracker.captureElement, a.upName, a.upHandler, !0);
1394
- U(t, n, !1);
1400
+ W(t, n, !1);
1395
1401
  }
1396
1402
  function d(t) {
1397
1403
  return e.MouseTracker.havePointerEvents ? t.pointerId : e.MouseTracker.mousePointerId;
@@ -1422,7 +1428,7 @@ var ye = p([
1422
1428
  pointerType: "mouse",
1423
1429
  isEmulated: !1
1424
1430
  };
1425
- H(t, r), r.preventDefault && !r.defaultPrevented && e.cancelEvent(n), r.stopPropagation && e.stopEvent(n);
1431
+ U(t, r), r.preventDefault && !r.defaultPrevented && e.cancelEvent(n), r.stopPropagation && e.stopEvent(n);
1426
1432
  }
1427
1433
  function y(t, n) {
1428
1434
  var r = {
@@ -1431,7 +1437,7 @@ var ye = p([
1431
1437
  pointerType: "mouse",
1432
1438
  isEmulated: !1
1433
1439
  };
1434
- H(t, r), r.preventDefault && !r.defaultPrevented && e.cancelEvent(n), r.stopPropagation && e.stopEvent(n);
1440
+ U(t, r), r.preventDefault && !r.defaultPrevented && e.cancelEvent(n), r.stopPropagation && e.stopEvent(n);
1435
1441
  }
1436
1442
  function b(t, n) {
1437
1443
  var r = null, i = {
@@ -1440,7 +1446,7 @@ var ye = p([
1440
1446
  pointerType: "",
1441
1447
  isEmulated: !1
1442
1448
  };
1443
- H(t, i), t.keyDownHandler && !i.preventGesture && !i.defaultPrevented && (r = {
1449
+ U(t, i), t.keyDownHandler && !i.preventGesture && !i.defaultPrevented && (r = {
1444
1450
  eventSource: t,
1445
1451
  keyCode: n.keyCode ? n.keyCode : n.charCode,
1446
1452
  ctrl: n.ctrlKey,
@@ -1459,7 +1465,7 @@ var ye = p([
1459
1465
  pointerType: "",
1460
1466
  isEmulated: !1
1461
1467
  };
1462
- H(t, i), t.keyUpHandler && !i.preventGesture && !i.defaultPrevented && (r = {
1468
+ U(t, i), t.keyUpHandler && !i.preventGesture && !i.defaultPrevented && (r = {
1463
1469
  eventSource: t,
1464
1470
  keyCode: n.keyCode ? n.keyCode : n.charCode,
1465
1471
  ctrl: n.ctrlKey,
@@ -1478,7 +1484,7 @@ var ye = p([
1478
1484
  pointerType: "",
1479
1485
  isEmulated: !1
1480
1486
  };
1481
- H(t, i), t.keyHandler && !i.preventGesture && !i.defaultPrevented && (r = {
1487
+ U(t, i), t.keyHandler && !i.preventGesture && !i.defaultPrevented && (r = {
1482
1488
  eventSource: t,
1483
1489
  keyCode: n.keyCode ? n.keyCode : n.charCode,
1484
1490
  ctrl: n.ctrlKey,
@@ -1497,7 +1503,7 @@ var ye = p([
1497
1503
  pointerType: "",
1498
1504
  isEmulated: !1
1499
1505
  };
1500
- H(e, n), e.focusHandler && !n.preventGesture && e.focusHandler({
1506
+ U(e, n), e.focusHandler && !n.preventGesture && e.focusHandler({
1501
1507
  eventSource: e,
1502
1508
  originalEvent: t,
1503
1509
  userData: e.userData
@@ -1510,7 +1516,7 @@ var ye = p([
1510
1516
  pointerType: "",
1511
1517
  isEmulated: !1
1512
1518
  };
1513
- H(e, n), e.blurHandler && !n.preventGesture && e.blurHandler({
1519
+ U(e, n), e.blurHandler && !n.preventGesture && e.blurHandler({
1514
1520
  eventSource: e,
1515
1521
  originalEvent: t,
1516
1522
  userData: e.userData
@@ -1523,7 +1529,7 @@ var ye = p([
1523
1529
  pointerType: "mouse",
1524
1530
  isEmulated: !1
1525
1531
  };
1526
- H(t, i), t.contextMenuHandler && !i.preventGesture && !i.defaultPrevented && (r = {
1532
+ U(t, i), t.contextMenuHandler && !i.preventGesture && !i.defaultPrevented && (r = {
1527
1533
  eventSource: t,
1528
1534
  position: g(m(n), t.element),
1529
1535
  originalEvent: i.originalEvent,
@@ -1556,7 +1562,7 @@ var ye = p([
1556
1562
  eventType: "wheel",
1557
1563
  pointerType: "mouse",
1558
1564
  isEmulated: n !== r
1559
- }, H(t, a), t.scrollHandler && !a.preventGesture && !a.defaultPrevented && (o = {
1565
+ }, U(t, a), t.scrollHandler && !a.preventGesture && !a.defaultPrevented && (o = {
1560
1566
  eventSource: t,
1561
1567
  pointerType: "mouse",
1562
1568
  position: h(n, t.element),
@@ -1568,7 +1574,7 @@ var ye = p([
1568
1574
  userData: t.userData
1569
1575
  }, t.scrollHandler(o)), a.stopPropagation && e.stopEvent(r), (o && o.preventDefault || a.preventDefault && !a.defaultPrevented) && e.cancelEvent(r);
1570
1576
  }
1571
- function te(t, n) {
1577
+ function O(t, n) {
1572
1578
  var r = {
1573
1579
  id: e.MouseTracker.mousePointerId,
1574
1580
  type: "mouse"
@@ -1578,9 +1584,9 @@ var ye = p([
1578
1584
  pointerType: "mouse",
1579
1585
  isEmulated: !1
1580
1586
  };
1581
- H(t, i), n.target === t.element && U(t, r, !1), i.stopPropagation && e.stopEvent(n);
1587
+ U(t, i), n.target === t.element && W(t, r, !1), i.stopPropagation && e.stopEvent(n);
1582
1588
  }
1583
- function ne(t, n) {
1589
+ function te(t, n) {
1584
1590
  var r, i, a = n.changedTouches.length, o, s = t.getActivePointersListByType("touch");
1585
1591
  r = e.now(), s.getLength() > n.touches.length - a && e.console.warn("Tracked touch contact count doesn't match event.touches.length");
1586
1592
  var c = {
@@ -1589,16 +1595,16 @@ var ye = p([
1589
1595
  pointerType: "touch",
1590
1596
  isEmulated: !1
1591
1597
  };
1592
- for (H(t, c), i = 0; i < a; i++) o = {
1598
+ for (U(t, c), i = 0; i < a; i++) o = {
1593
1599
  id: n.changedTouches[i].identifier,
1594
1600
  type: "touch",
1595
1601
  isPrimary: s.getLength() === 0,
1596
1602
  currentPos: m(n.changedTouches[i]),
1597
1603
  currentTime: r
1598
- }, W(t, c, o), q(t, c, o, 0), U(t, o, !0);
1604
+ }, ue(t, c, o), de(t, c, o, 0), W(t, o, !0);
1599
1605
  c.preventDefault && !c.defaultPrevented && e.cancelEvent(n), c.stopPropagation && e.stopEvent(n);
1600
1606
  }
1601
- function re(t, n) {
1607
+ function ne(t, n) {
1602
1608
  var r, i, a = n.changedTouches.length, o;
1603
1609
  r = e.now();
1604
1610
  var s = {
@@ -1607,15 +1613,15 @@ var ye = p([
1607
1613
  pointerType: "touch",
1608
1614
  isEmulated: !1
1609
1615
  };
1610
- for (H(t, s), i = 0; i < a; i++) o = {
1616
+ for (U(t, s), i = 0; i < a; i++) o = {
1611
1617
  id: n.changedTouches[i].identifier,
1612
1618
  type: "touch",
1613
1619
  currentPos: m(n.changedTouches[i]),
1614
1620
  currentTime: r
1615
- }, fe(t, s, o, 0), U(t, o, !1), G(t, s, o);
1621
+ }, J(t, s, o, 0), W(t, o, !1), G(t, s, o);
1616
1622
  s.preventDefault && !s.defaultPrevented && e.cancelEvent(n), s.stopPropagation && e.stopEvent(n);
1617
1623
  }
1618
- function O(t, n) {
1624
+ function k(t, n) {
1619
1625
  var r, i, a = n.changedTouches.length, o;
1620
1626
  r = e.now();
1621
1627
  var s = {
@@ -1624,58 +1630,58 @@ var ye = p([
1624
1630
  pointerType: "touch",
1625
1631
  isEmulated: !1
1626
1632
  };
1627
- for (H(t, s), i = 0; i < a; i++) o = {
1633
+ for (U(t, s), i = 0; i < a; i++) o = {
1628
1634
  id: n.changedTouches[i].identifier,
1629
1635
  type: "touch",
1630
1636
  currentPos: m(n.changedTouches[i]),
1631
1637
  currentTime: r
1632
- }, J(t, s, o);
1638
+ }, fe(t, s, o);
1633
1639
  s.preventDefault && !s.defaultPrevented && e.cancelEvent(n), s.stopPropagation && e.stopEvent(n);
1634
1640
  }
1635
- function k(t, n) {
1641
+ function A(t, n) {
1636
1642
  var r = n.changedTouches.length, i, a, o = {
1637
1643
  originalEvent: n,
1638
1644
  eventType: "pointercancel",
1639
1645
  pointerType: "touch",
1640
1646
  isEmulated: !1
1641
1647
  };
1642
- for (H(t, o), i = 0; i < r; i++) a = {
1648
+ for (U(t, o), i = 0; i < r; i++) a = {
1643
1649
  id: n.changedTouches[i].identifier,
1644
1650
  type: "touch"
1645
1651
  }, Y(t, o, a);
1646
1652
  o.stopPropagation && e.stopEvent(n);
1647
1653
  }
1648
- function A(t, n) {
1654
+ function j(t, n) {
1649
1655
  return e.eventIsCanceled(n) || n.preventDefault(), !1;
1650
1656
  }
1651
- function ie(t, n) {
1657
+ function re(t, n) {
1652
1658
  return e.eventIsCanceled(n) || n.preventDefault(), !1;
1653
1659
  }
1654
- function ae(t, n) {
1660
+ function ie(t, n) {
1655
1661
  var r = {
1656
1662
  originalEvent: n,
1657
1663
  eventType: "gotpointercapture",
1658
1664
  pointerType: f(n),
1659
1665
  isEmulated: !1
1660
1666
  };
1661
- H(t, r), n.target === t.element && U(t, {
1667
+ U(t, r), n.target === t.element && W(t, {
1662
1668
  id: n.pointerId,
1663
1669
  type: f(n)
1664
1670
  }, !0), r.stopPropagation && e.stopEvent(n);
1665
1671
  }
1666
- function oe(t, n) {
1672
+ function ae(t, n) {
1667
1673
  var r = {
1668
1674
  originalEvent: n,
1669
1675
  eventType: "lostpointercapture",
1670
1676
  pointerType: f(n),
1671
1677
  isEmulated: !1
1672
1678
  };
1673
- H(t, r), n.target === t.element && U(t, {
1679
+ U(t, r), n.target === t.element && W(t, {
1674
1680
  id: n.pointerId,
1675
1681
  type: f(n)
1676
1682
  }, !1), r.stopPropagation && e.stopEvent(n);
1677
1683
  }
1678
- function j(t, n) {
1684
+ function M(t, n) {
1679
1685
  var r = {
1680
1686
  id: d(n),
1681
1687
  type: f(n),
@@ -1688,9 +1694,9 @@ var ye = p([
1688
1694
  pointerType: r.type,
1689
1695
  isEmulated: !1
1690
1696
  };
1691
- H(t, i), W(t, i, r);
1697
+ U(t, i), ue(t, i, r);
1692
1698
  }
1693
- function M(t, n) {
1699
+ function N(t, n) {
1694
1700
  var r = {
1695
1701
  id: d(n),
1696
1702
  type: f(n),
@@ -1703,9 +1709,9 @@ var ye = p([
1703
1709
  pointerType: r.type,
1704
1710
  isEmulated: !1
1705
1711
  };
1706
- H(t, i), G(t, i, r);
1712
+ U(t, i), G(t, i, r);
1707
1713
  }
1708
- function N(t, n) {
1714
+ function P(t, n) {
1709
1715
  var r = {
1710
1716
  id: d(n),
1711
1717
  type: f(n),
@@ -1718,9 +1724,9 @@ var ye = p([
1718
1724
  pointerType: r.type,
1719
1725
  isEmulated: !1
1720
1726
  };
1721
- H(t, i), K(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
1727
+ U(t, i), K(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
1722
1728
  }
1723
- function P(t, n) {
1729
+ function F(t, n) {
1724
1730
  var r = {
1725
1731
  id: d(n),
1726
1732
  type: f(n),
@@ -1733,9 +1739,9 @@ var ye = p([
1733
1739
  pointerType: r.type,
1734
1740
  isEmulated: !1
1735
1741
  };
1736
- H(t, i), de(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
1742
+ U(t, i), q(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
1737
1743
  }
1738
- function F(t, n) {
1744
+ function I(t, n) {
1739
1745
  var r = {
1740
1746
  id: d(n),
1741
1747
  type: f(n),
@@ -1748,15 +1754,15 @@ var ye = p([
1748
1754
  pointerType: r.type,
1749
1755
  isEmulated: !1
1750
1756
  };
1751
- H(t, a), q(t, a, r, n.button), a.preventDefault && !a.defaultPrevented && e.cancelEvent(n), a.stopPropagation && e.stopEvent(n), a.shouldCapture && (i ? U(t, r, !0) : l(t, r));
1757
+ U(t, a), de(t, a, r, n.button), a.preventDefault && !a.defaultPrevented && e.cancelEvent(n), a.stopPropagation && e.stopEvent(n), a.shouldCapture && (i ? W(t, r, !0) : l(t, r));
1752
1758
  }
1753
- function I(e, t) {
1754
- R(e, t);
1759
+ function oe(e, t) {
1760
+ L(e, t);
1755
1761
  }
1756
- function L(t, n) {
1757
- t.getActivePointersListByType(f(n)).getById(n.pointerId) && R(t, n), e.stopEvent(n);
1762
+ function se(t, n) {
1763
+ t.getActivePointersListByType(f(n)).getById(n.pointerId) && L(t, n), e.stopEvent(n);
1758
1764
  }
1759
- function R(t, n) {
1765
+ function L(t, n) {
1760
1766
  var r = {
1761
1767
  id: d(n),
1762
1768
  type: f(n),
@@ -1769,15 +1775,15 @@ var ye = p([
1769
1775
  pointerType: r.type,
1770
1776
  isEmulated: !1
1771
1777
  };
1772
- H(t, i), fe(t, i, r, n.button), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n), i.shouldReleaseCapture && (n.target === t.element ? u(t, r) : U(t, r, !1));
1778
+ U(t, i), J(t, i, r, n.button), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n), i.shouldReleaseCapture && (n.target === t.element ? u(t, r) : W(t, r, !1));
1773
1779
  }
1774
- function z(e, t) {
1775
- ce(e, t);
1780
+ function R(e, t) {
1781
+ B(e, t);
1776
1782
  }
1777
- function se(t, n) {
1778
- t.getActivePointersListByType(f(n)).getById(n.pointerId) && ce(t, n), e.stopEvent(n);
1783
+ function z(t, n) {
1784
+ t.getActivePointersListByType(f(n)).getById(n.pointerId) && B(t, n), e.stopEvent(n);
1779
1785
  }
1780
- function ce(t, n) {
1786
+ function B(t, n) {
1781
1787
  var r = {
1782
1788
  id: d(n),
1783
1789
  type: f(n),
@@ -1790,9 +1796,9 @@ var ye = p([
1790
1796
  pointerType: r.type,
1791
1797
  isEmulated: !1
1792
1798
  };
1793
- H(t, i), J(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
1799
+ U(t, i), fe(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
1794
1800
  }
1795
- function le(t, n) {
1801
+ function ce(t, n) {
1796
1802
  var r = {
1797
1803
  id: n.pointerId,
1798
1804
  type: f(n)
@@ -1802,16 +1808,16 @@ var ye = p([
1802
1808
  pointerType: r.type,
1803
1809
  isEmulated: !1
1804
1810
  };
1805
- H(t, i), Y(t, i, r), i.stopPropagation && e.stopEvent(n);
1811
+ U(t, i), Y(t, i, r), i.stopPropagation && e.stopEvent(n);
1806
1812
  }
1807
- function B(e, t) {
1813
+ function V(e, t) {
1808
1814
  return t.speed = 0, t.direction = 0, t.contactPos = t.currentPos, t.contactTime = t.currentTime, t.lastPos = t.currentPos, t.lastTime = t.currentTime, e.add(t);
1809
1815
  }
1810
- function V(t, n, r) {
1816
+ function H(t, n, r) {
1811
1817
  var i, a = n.getById(r.id);
1812
1818
  return a ? (a.captured && (e.console.warn("stopTrackingPointer() called on captured pointer"), u(t, a)), n.removeContact(), i = n.removeById(r.id)) : i = n.getLength(), i;
1813
1819
  }
1814
- function ue(e, t) {
1820
+ function le(e, t) {
1815
1821
  switch (t.eventType) {
1816
1822
  case "pointermove":
1817
1823
  t.isStoppable = !0, t.isCancelable = !0, t.preventDefault = !1, t.preventGesture = !e.hasGestureHandlers, t.stopPropagation = !1;
@@ -1847,16 +1853,16 @@ var ye = p([
1847
1853
  default: t.isStoppable = !1, t.isCancelable = !1, t.preventDefault = !1, t.preventGesture = !1, t.stopPropagation = !1;
1848
1854
  }
1849
1855
  }
1850
- function H(t, n) {
1851
- n.eventSource = t, n.eventPhase = n.originalEvent ? n.originalEvent.eventPhase === void 0 ? 0 : n.originalEvent.eventPhase : 0, n.defaultPrevented = e.eventIsCanceled(n.originalEvent), n.shouldCapture = !1, n.shouldReleaseCapture = !1, n.userData = t.userData, ue(t, n), t.preProcessEventHandler && t.preProcessEventHandler(n);
1856
+ function U(t, n) {
1857
+ n.eventSource = t, n.eventPhase = n.originalEvent ? n.originalEvent.eventPhase === void 0 ? 0 : n.originalEvent.eventPhase : 0, n.defaultPrevented = e.eventIsCanceled(n.originalEvent), n.shouldCapture = !1, n.shouldReleaseCapture = !1, n.userData = t.userData, le(t, n), t.preProcessEventHandler && t.preProcessEventHandler(n);
1852
1858
  }
1853
- function U(t, n, r) {
1859
+ function W(t, n, r) {
1854
1860
  var i = t.getActivePointersListByType(n.type), a = i.getById(n.id);
1855
1861
  a ? r && !a.captured ? (a.captured = !0, i.captureCount++) : !r && a.captured && (a.captured = !1, i.captureCount--, i.captureCount < 0 && (i.captureCount = 0, e.console.warn("updatePointerCaptured() - pointsList.captureCount went negative"))) : e.console.warn("updatePointerCaptured() called on untracked pointer");
1856
1862
  }
1857
- function W(e, t, n) {
1863
+ function ue(e, t, n) {
1858
1864
  var r = e.getActivePointersListByType(n.type), i = r.getById(n.id);
1859
- i ? (i.insideElement = !0, i.lastPos = i.currentPos, i.lastTime = i.currentTime, i.currentPos = n.currentPos, i.currentTime = n.currentTime, n = i) : (n.captured = !1, n.insideElementPressed = !1, n.insideElement = !0, B(r, n)), e.enterHandler && e.enterHandler({
1865
+ i ? (i.insideElement = !0, i.lastPos = i.currentPos, i.lastTime = i.currentTime, i.currentPos = n.currentPos, i.currentTime = n.currentTime, n = i) : (n.captured = !1, n.insideElementPressed = !1, n.insideElement = !0, V(r, n)), e.enterHandler && e.enterHandler({
1860
1866
  eventSource: e,
1861
1867
  pointerType: n.type,
1862
1868
  position: g(n.currentPos, e.element),
@@ -1871,7 +1877,7 @@ var ye = p([
1871
1877
  }
1872
1878
  function G(e, t, n) {
1873
1879
  var r = e.getActivePointersListByType(n.type), i = r.getById(n.id), a;
1874
- i ? (i.captured ? (i.insideElement = !1, i.lastPos = i.currentPos, i.lastTime = i.currentTime, i.currentPos = n.currentPos, i.currentTime = n.currentTime) : V(e, r, i), n = i) : (n.captured = !1, n.insideElementPressed = !1), (e.leaveHandler || e.exitHandler) && (a = {
1880
+ i ? (i.captured ? (i.insideElement = !1, i.lastPos = i.currentPos, i.lastTime = i.currentTime, i.currentPos = n.currentPos, i.currentTime = n.currentTime) : H(e, r, i), n = i) : (n.captured = !1, n.insideElementPressed = !1), (e.leaveHandler || e.exitHandler) && (a = {
1875
1881
  eventSource: e,
1876
1882
  pointerType: n.type,
1877
1883
  position: n.currentPos && g(n.currentPos, e.element),
@@ -1899,7 +1905,7 @@ var ye = p([
1899
1905
  userData: e.userData
1900
1906
  });
1901
1907
  }
1902
- function de(e, t, n) {
1908
+ function q(e, t, n) {
1903
1909
  var r = e.getActivePointersListByType(n.type), i = r.getById(n.id);
1904
1910
  i ? n = i : (n.captured = !1, n.insideElementPressed = !1), e.outHandler && e.outHandler({
1905
1911
  eventSource: e,
@@ -1914,7 +1920,7 @@ var ye = p([
1914
1920
  userData: e.userData
1915
1921
  });
1916
1922
  }
1917
- function q(t, r, i, a) {
1923
+ function de(t, r, i, a) {
1918
1924
  var o = n[t.hash], s = t.getActivePointersListByType(i.type), c;
1919
1925
  if (r.originalEvent.buttons === void 0 ? a === 0 ? s.buttons |= 1 : a === 1 ? s.buttons |= 4 : a === 2 ? s.buttons |= 2 : a === 3 ? s.buttons |= 8 : a === 4 ? s.buttons |= 16 : a === 5 && (s.buttons |= 32) : s.buttons = r.originalEvent.buttons, a !== 0) {
1920
1926
  r.shouldCapture = !1, r.shouldReleaseCapture = !1, t.nonPrimaryPressHandler && !r.preventGesture && !r.defaultPrevented && (r.preventDefault = !0, t.nonPrimaryPressHandler({
@@ -1929,7 +1935,7 @@ var ye = p([
1929
1935
  }));
1930
1936
  return;
1931
1937
  }
1932
- c = s.getById(i.id), c ? (c.insideElementPressed = !0, c.insideElement = !0, c.originalTarget = r.originalEvent.target, c.contactPos = i.currentPos, c.contactTime = i.currentTime, c.lastPos = c.currentPos, c.lastTime = c.currentTime, c.currentPos = i.currentPos, c.currentTime = i.currentTime, i = c) : (i.captured = !1, i.insideElementPressed = !0, i.insideElement = !0, i.originalTarget = r.originalEvent.target, B(s, i)), s.addContact(), !r.preventGesture && !r.defaultPrevented ? (r.shouldCapture = !0, r.shouldReleaseCapture = !1, r.preventDefault = !0, (t.dragHandler || t.dragEndHandler || t.pinchHandler) && e.MouseTracker.gesturePointVelocityTracker.addPoint(t, i), s.contacts === 1 ? t.pressHandler && !r.preventGesture && t.pressHandler({
1938
+ c = s.getById(i.id), c ? (c.insideElementPressed = !0, c.insideElement = !0, c.originalTarget = r.originalEvent.target, c.contactPos = i.currentPos, c.contactTime = i.currentTime, c.lastPos = c.currentPos, c.lastTime = c.currentTime, c.currentPos = i.currentPos, c.currentTime = i.currentTime, i = c) : (i.captured = !1, i.insideElementPressed = !0, i.insideElement = !0, i.originalTarget = r.originalEvent.target, V(s, i)), s.addContact(), !r.preventGesture && !r.defaultPrevented ? (r.shouldCapture = !0, r.shouldReleaseCapture = !1, r.preventDefault = !0, (t.dragHandler || t.dragEndHandler || t.pinchHandler) && e.MouseTracker.gesturePointVelocityTracker.addPoint(t, i), s.contacts === 1 ? t.pressHandler && !r.preventGesture && t.pressHandler({
1933
1939
  eventSource: t,
1934
1940
  pointerType: i.type,
1935
1941
  position: g(i.contactPos, t.element),
@@ -1939,7 +1945,7 @@ var ye = p([
1939
1945
  userData: t.userData
1940
1946
  }) : s.contacts === 2 && t.pinchHandler && i.type === "touch" && (o.pinchGPoints = s.asArray(), o.lastPinchDist = o.currentPinchDist = o.pinchGPoints[0].currentPos.distanceTo(o.pinchGPoints[1].currentPos), o.lastPinchCenter = o.currentPinchCenter = _(o.pinchGPoints[0].currentPos, o.pinchGPoints[1].currentPos))) : (r.shouldCapture = !1, r.shouldReleaseCapture = !1);
1941
1947
  }
1942
- function fe(t, r, i, a) {
1948
+ function J(t, r, i, a) {
1943
1949
  var o = n[t.hash], s = t.getActivePointersListByType(i.type), c, l, u, d = !1, f;
1944
1950
  if (r.originalEvent.buttons === void 0 ? a === 0 ? s.buttons ^= -2 : a === 1 ? s.buttons ^= -5 : a === 2 ? s.buttons ^= -3 : a === 3 ? s.buttons ^= -9 : a === 4 ? s.buttons ^= -17 : a === 5 && (s.buttons ^= -33) : s.buttons = r.originalEvent.buttons, r.shouldCapture = !1, a !== 0) {
1945
1951
  r.shouldReleaseCapture = !1, t.nonPrimaryReleaseHandler && !r.preventGesture && !r.defaultPrevented && (r.preventDefault = !0, t.nonPrimaryReleaseHandler({
@@ -1954,7 +1960,7 @@ var ye = p([
1954
1960
  }));
1955
1961
  return;
1956
1962
  }
1957
- u = s.getById(i.id), u ? (s.removeContact(), u.captured && (d = !0), u.lastPos = u.currentPos, u.lastTime = u.currentTime, u.currentPos = i.currentPos, u.currentTime = i.currentTime, u.insideElement || V(t, s, u), c = u.currentPos, l = u.currentTime) : (i.captured = !1, i.insideElementPressed = !1, i.insideElement = !0, B(s, i), u = i), !r.preventGesture && !r.defaultPrevented && (d ? (r.shouldReleaseCapture = !0, r.preventDefault = !0, (t.dragHandler || t.dragEndHandler || t.pinchHandler) && e.MouseTracker.gesturePointVelocityTracker.removePoint(t, u), s.contacts === 0 ? (t.releaseHandler && c && t.releaseHandler({
1963
+ u = s.getById(i.id), u ? (s.removeContact(), u.captured && (d = !0), u.lastPos = u.currentPos, u.lastTime = u.currentTime, u.currentPos = i.currentPos, u.currentTime = i.currentTime, u.insideElement || H(t, s, u), c = u.currentPos, l = u.currentTime) : (i.captured = !1, i.insideElementPressed = !1, i.insideElement = !0, V(s, i), u = i), !r.preventGesture && !r.defaultPrevented && (d ? (r.shouldReleaseCapture = !0, r.preventDefault = !0, (t.dragHandler || t.dragEndHandler || t.pinchHandler) && e.MouseTracker.gesturePointVelocityTracker.removePoint(t, u), s.contacts === 0 ? (t.releaseHandler && c && t.releaseHandler({
1958
1964
  eventSource: t,
1959
1965
  pointerType: u.type,
1960
1966
  position: g(c, t.element),
@@ -2006,12 +2012,12 @@ var ye = p([
2006
2012
  userData: t.userData
2007
2013
  }), r.preventDefault = !0)));
2008
2014
  }
2009
- function J(e, t, r) {
2015
+ function fe(e, t, r) {
2010
2016
  var i = n[e.hash], a = e.getActivePointersListByType(r.type), o, s, c;
2011
2017
  if (t.originalEvent.buttons !== void 0 && (a.buttons = t.originalEvent.buttons), o = a.getById(r.id), o) o.lastPos = o.currentPos, o.lastTime = o.currentTime, o.currentPos = r.currentPos, o.currentTime = r.currentTime;
2012
2018
  else return;
2013
2019
  t.shouldCapture = !1, t.shouldReleaseCapture = !1, e.stopHandler && r.type === "mouse" && (clearTimeout(e.stopTimeOut), e.stopTimeOut = setTimeout(function() {
2014
- X(e, t.originalEvent, r.type);
2020
+ pe(e, t.originalEvent, r.type);
2015
2021
  }, e.stopDelay)), a.contacts === 0 ? e.moveHandler && e.moveHandler({
2016
2022
  eventSource: e,
2017
2023
  pointerType: r.type,
@@ -2063,9 +2069,9 @@ var ye = p([
2063
2069
  }
2064
2070
  function Y(e, t, n) {
2065
2071
  var r = e.getActivePointersListByType(n.type), i = r.getById(n.id);
2066
- i && V(e, r, i);
2072
+ i && H(e, r, i);
2067
2073
  }
2068
- function X(e, t, n) {
2074
+ function pe(e, t, n) {
2069
2075
  e.stopHandler && e.stopHandler({
2070
2076
  eventSource: e,
2071
2077
  pointerType: n,
@@ -2331,10 +2337,10 @@ var ye = p([
2331
2337
  releaseHandler: e.delegate(this, T),
2332
2338
  nonPrimaryPressHandler: e.delegate(this, ee),
2333
2339
  nonPrimaryReleaseHandler: e.delegate(this, E),
2334
- scrollHandler: e.delegate(this, re),
2340
+ scrollHandler: e.delegate(this, ne),
2335
2341
  pinchHandler: e.delegate(this, D),
2336
- focusHandler: e.delegate(this, te),
2337
- blurHandler: e.delegate(this, ne)
2342
+ focusHandler: e.delegate(this, O),
2343
+ blurHandler: e.delegate(this, te)
2338
2344
  }), this.outerTracker = new e.MouseTracker({
2339
2345
  userData: "Viewer.outerTracker",
2340
2346
  element: this.container,
@@ -2343,12 +2349,12 @@ var ye = p([
2343
2349
  clickDistThreshold: this.clickDistThreshold,
2344
2350
  dblClickTimeThreshold: this.dblClickTimeThreshold,
2345
2351
  dblClickDistThreshold: this.dblClickDistThreshold,
2346
- enterHandler: e.delegate(this, O),
2347
- leaveHandler: e.delegate(this, k)
2352
+ enterHandler: e.delegate(this, k),
2353
+ leaveHandler: e.delegate(this, A)
2348
2354
  }), this.toolbar &&= new e.ControlDock({ element: this.toolbar }), this.bindStandardControls(), t[this.hash].prevContainerSize = i(this.container), window.ResizeObserver ? (this._autoResizePolling = !1, this._resizeObserver = new ResizeObserver(function() {
2349
2355
  t[o.hash].needsResize = !0;
2350
2356
  }), this._resizeObserver.observe(this.container, {})) : this._autoResizePolling = !0, this.world = new e.World({ viewer: this }), this.world.addHandler("add-item", function(e) {
2351
- o.source = o.world.getItemAt(0).source, t[o.hash].forceRedraw = !0, o._updateRequestId ||= c(o, A);
2357
+ o.source = o.world.getItemAt(0).source, t[o.hash].forceRedraw = !0, o._updateRequestId ||= c(o, j);
2352
2358
  }), this.world.addHandler("remove-item", function(e) {
2353
2359
  o.source = o.world.getItemCount() ? o.world.getItemAt(0).source : null, t[o.hash].forceRedraw = !0;
2354
2360
  }), this.world.addHandler("metrics-change", function(e) {
@@ -2534,7 +2540,7 @@ var ye = p([
2534
2540
  if (this.raiseEvent("pre-full-page", l), l.preventDefaultAction) return this;
2535
2541
  if (n && this.element) {
2536
2542
  for (this.elementSize = e.getElementSize(this.element), this.pageScroll = e.getPageScroll(), this.elementMargin = this.element.style.margin, this.element.style.margin = "0", this.elementPadding = this.element.style.padding, this.element.style.padding = "0", this.bodyMargin = i.margin, this.docMargin = a.margin, i.margin = "0", a.margin = "0", this.bodyPadding = i.padding, this.docPadding = a.padding, i.padding = "0", a.padding = "0", this.bodyWidth = i.width, this.docWidth = a.width, i.width = "100%", a.width = "100%", this.bodyHeight = i.height, this.docHeight = a.height, i.height = "100%", a.height = "100%", this.bodyDisplay = i.display, i.display = "block", this.previousBody = [], t[this.hash].prevElementParent = this.element.parentNode, t[this.hash].prevNextSibling = this.element.nextSibling, t[this.hash].prevElementWidth = this.element.style.width, t[this.hash].prevElementHeight = this.element.style.height, s = r.childNodes.length, c = 0; c < s; c++) this.previousBody.push(r.childNodes[0]), r.removeChild(r.childNodes[0]);
2537
- this.toolbar && this.toolbar.element && (this.toolbar.parentNode = this.toolbar.element.parentNode, this.toolbar.nextSibling = this.toolbar.element.nextSibling, r.appendChild(this.toolbar.element), e.addClass(this.toolbar.element, "fullpage")), e.addClass(this.element, "fullpage"), r.appendChild(this.element), this.element.style.height = "100vh", this.element.style.width = "100vw", this.toolbar && this.toolbar.element && (this.element.style.height = e.getElementSize(this.element).y - e.getElementSize(this.toolbar.element).y + "px"), t[this.hash].fullPage = !0, e.delegate(this, O)({});
2543
+ this.toolbar && this.toolbar.element && (this.toolbar.parentNode = this.toolbar.element.parentNode, this.toolbar.nextSibling = this.toolbar.element.nextSibling, r.appendChild(this.toolbar.element), e.addClass(this.toolbar.element, "fullpage")), e.addClass(this.element, "fullpage"), r.appendChild(this.element), this.element.style.height = "100vh", this.element.style.width = "100vw", this.toolbar && this.toolbar.element && (this.element.style.height = e.getElementSize(this.element).y - e.getElementSize(this.toolbar.element).y + "px"), t[this.hash].fullPage = !0, e.delegate(this, k)({});
2538
2544
  } else {
2539
2545
  for (this.element.style.margin = this.elementMargin, this.element.style.padding = this.elementPadding, i.margin = this.bodyMargin, a.margin = this.docMargin, i.padding = this.bodyPadding, a.padding = this.docPadding, i.width = this.bodyWidth, a.width = this.docWidth, i.height = this.bodyHeight, a.height = this.docHeight, i.display = this.bodyDisplay, r.removeChild(this.element), s = this.previousBody.length, c = 0; c < s; c++) r.appendChild(this.previousBody.shift());
2540
2546
  e.removeClass(this.element, "fullpage"), t[this.hash].prevElementParent.insertBefore(this.element, t[this.hash].prevNextSibling), this.toolbar && this.toolbar.element && (r.removeChild(this.toolbar.element), e.removeClass(this.toolbar.element, "fullpage"), this.toolbar.parentNode.insertBefore(this.toolbar.element, this.toolbar.nextSibling), delete this.toolbar.parentNode, delete this.toolbar.nextSibling), this.element.style.width = t[this.hash].prevElementWidth, this.element.style.height = t[this.hash].prevElementHeight;
@@ -2543,7 +2549,7 @@ var ye = p([
2543
2549
  var t = e.getPageScroll();
2544
2550
  u++, u < 10 && (t.x !== o.pageScroll.x || t.y !== o.pageScroll.y) && e.requestAnimationFrame(d);
2545
2551
  };
2546
- e.requestAnimationFrame(d), t[this.hash].fullPage = !1, e.delegate(this, k)({});
2552
+ e.requestAnimationFrame(d), t[this.hash].fullPage = !1, e.delegate(this, A)({});
2547
2553
  }
2548
2554
  return this.navigator && this.viewport && this.navigator.update(this.viewport), this.raiseEvent("full-page", { fullPage: n }), this;
2549
2555
  },
@@ -2720,10 +2726,10 @@ var ye = p([
2720
2726
  clickTimeThreshold: this.clickTimeThreshold,
2721
2727
  clickDistThreshold: this.clickDistThreshold,
2722
2728
  tooltip: e.getString("Tooltips.PreviousPage"),
2723
- srcRest: j(this.prefixUrl, a.previous.REST),
2724
- srcGroup: j(this.prefixUrl, a.previous.GROUP),
2725
- srcHover: j(this.prefixUrl, a.previous.HOVER),
2726
- srcDown: j(this.prefixUrl, a.previous.DOWN),
2729
+ srcRest: M(this.prefixUrl, a.previous.REST),
2730
+ srcGroup: M(this.prefixUrl, a.previous.GROUP),
2731
+ srcHover: M(this.prefixUrl, a.previous.HOVER),
2732
+ srcDown: M(this.prefixUrl, a.previous.DOWN),
2727
2733
  onRelease: i,
2728
2734
  onFocus: t,
2729
2735
  onBlur: n
@@ -2732,10 +2738,10 @@ var ye = p([
2732
2738
  clickTimeThreshold: this.clickTimeThreshold,
2733
2739
  clickDistThreshold: this.clickDistThreshold,
2734
2740
  tooltip: e.getString("Tooltips.NextPage"),
2735
- srcRest: j(this.prefixUrl, a.next.REST),
2736
- srcGroup: j(this.prefixUrl, a.next.GROUP),
2737
- srcHover: j(this.prefixUrl, a.next.HOVER),
2738
- srcDown: j(this.prefixUrl, a.next.DOWN),
2741
+ srcRest: M(this.prefixUrl, a.next.REST),
2742
+ srcGroup: M(this.prefixUrl, a.next.GROUP),
2743
+ srcHover: M(this.prefixUrl, a.next.HOVER),
2744
+ srcDown: M(this.prefixUrl, a.next.DOWN),
2739
2745
  onRelease: r,
2740
2746
  onFocus: t,
2741
2747
  onBlur: n
@@ -2746,16 +2752,16 @@ var ye = p([
2746
2752
  }), this.pagingControl = this.paging.element, this.toolbar ? this.toolbar.addControl(this.pagingControl, { anchor: e.ControlAnchor.BOTTOM_RIGHT }) : this.addControl(this.pagingControl, { anchor: this.sequenceControlAnchor || e.ControlAnchor.TOP_LEFT }))), this;
2747
2753
  },
2748
2754
  bindStandardControls: function() {
2749
- var t = e.delegate(this, M), n = e.delegate(this, P), r = e.delegate(this, L), i = e.delegate(this, N), a = e.delegate(this, R), o = e.delegate(this, se), s = e.delegate(this, ce), c = e.delegate(this, le), l = e.delegate(this, B), u = e.delegate(this, V), d = e.delegate(this, p), f = e.delegate(this, m), h = this.navImages, g = [], _ = !0;
2755
+ var t = e.delegate(this, N), n = e.delegate(this, F), r = e.delegate(this, se), i = e.delegate(this, P), a = e.delegate(this, L), o = e.delegate(this, z), s = e.delegate(this, B), c = e.delegate(this, ce), l = e.delegate(this, V), u = e.delegate(this, H), d = e.delegate(this, p), f = e.delegate(this, m), h = this.navImages, g = [], _ = !0;
2750
2756
  return this.showNavigationControl && ((this.zoomInButton || this.zoomOutButton || this.homeButton || this.fullPageButton || this.rotateLeftButton || this.rotateRightButton || this.flipButton) && (_ = !1), this.showZoomControl && (g.push(this.zoomInButton = new e.Button({
2751
2757
  element: this.zoomInButton ? e.getElement(this.zoomInButton) : null,
2752
2758
  clickTimeThreshold: this.clickTimeThreshold,
2753
2759
  clickDistThreshold: this.clickDistThreshold,
2754
2760
  tooltip: e.getString("Tooltips.ZoomIn"),
2755
- srcRest: j(this.prefixUrl, h.zoomIn.REST),
2756
- srcGroup: j(this.prefixUrl, h.zoomIn.GROUP),
2757
- srcHover: j(this.prefixUrl, h.zoomIn.HOVER),
2758
- srcDown: j(this.prefixUrl, h.zoomIn.DOWN),
2761
+ srcRest: M(this.prefixUrl, h.zoomIn.REST),
2762
+ srcGroup: M(this.prefixUrl, h.zoomIn.GROUP),
2763
+ srcHover: M(this.prefixUrl, h.zoomIn.HOVER),
2764
+ srcDown: M(this.prefixUrl, h.zoomIn.DOWN),
2759
2765
  onPress: t,
2760
2766
  onRelease: n,
2761
2767
  onClick: r,
@@ -2768,10 +2774,10 @@ var ye = p([
2768
2774
  clickTimeThreshold: this.clickTimeThreshold,
2769
2775
  clickDistThreshold: this.clickDistThreshold,
2770
2776
  tooltip: e.getString("Tooltips.ZoomOut"),
2771
- srcRest: j(this.prefixUrl, h.zoomOut.REST),
2772
- srcGroup: j(this.prefixUrl, h.zoomOut.GROUP),
2773
- srcHover: j(this.prefixUrl, h.zoomOut.HOVER),
2774
- srcDown: j(this.prefixUrl, h.zoomOut.DOWN),
2777
+ srcRest: M(this.prefixUrl, h.zoomOut.REST),
2778
+ srcGroup: M(this.prefixUrl, h.zoomOut.GROUP),
2779
+ srcHover: M(this.prefixUrl, h.zoomOut.HOVER),
2780
+ srcDown: M(this.prefixUrl, h.zoomOut.DOWN),
2775
2781
  onPress: i,
2776
2782
  onRelease: n,
2777
2783
  onClick: a,
@@ -2784,10 +2790,10 @@ var ye = p([
2784
2790
  clickTimeThreshold: this.clickTimeThreshold,
2785
2791
  clickDistThreshold: this.clickDistThreshold,
2786
2792
  tooltip: e.getString("Tooltips.Home"),
2787
- srcRest: j(this.prefixUrl, h.home.REST),
2788
- srcGroup: j(this.prefixUrl, h.home.GROUP),
2789
- srcHover: j(this.prefixUrl, h.home.HOVER),
2790
- srcDown: j(this.prefixUrl, h.home.DOWN),
2793
+ srcRest: M(this.prefixUrl, h.home.REST),
2794
+ srcGroup: M(this.prefixUrl, h.home.GROUP),
2795
+ srcHover: M(this.prefixUrl, h.home.HOVER),
2796
+ srcDown: M(this.prefixUrl, h.home.DOWN),
2791
2797
  onRelease: o,
2792
2798
  onFocus: d,
2793
2799
  onBlur: f
@@ -2796,10 +2802,10 @@ var ye = p([
2796
2802
  clickTimeThreshold: this.clickTimeThreshold,
2797
2803
  clickDistThreshold: this.clickDistThreshold,
2798
2804
  tooltip: e.getString("Tooltips.FullPage"),
2799
- srcRest: j(this.prefixUrl, h.fullpage.REST),
2800
- srcGroup: j(this.prefixUrl, h.fullpage.GROUP),
2801
- srcHover: j(this.prefixUrl, h.fullpage.HOVER),
2802
- srcDown: j(this.prefixUrl, h.fullpage.DOWN),
2805
+ srcRest: M(this.prefixUrl, h.fullpage.REST),
2806
+ srcGroup: M(this.prefixUrl, h.fullpage.GROUP),
2807
+ srcHover: M(this.prefixUrl, h.fullpage.HOVER),
2808
+ srcDown: M(this.prefixUrl, h.fullpage.DOWN),
2803
2809
  onRelease: s,
2804
2810
  onFocus: d,
2805
2811
  onBlur: f
@@ -2808,10 +2814,10 @@ var ye = p([
2808
2814
  clickTimeThreshold: this.clickTimeThreshold,
2809
2815
  clickDistThreshold: this.clickDistThreshold,
2810
2816
  tooltip: e.getString("Tooltips.RotateLeft"),
2811
- srcRest: j(this.prefixUrl, h.rotateleft.REST),
2812
- srcGroup: j(this.prefixUrl, h.rotateleft.GROUP),
2813
- srcHover: j(this.prefixUrl, h.rotateleft.HOVER),
2814
- srcDown: j(this.prefixUrl, h.rotateleft.DOWN),
2817
+ srcRest: M(this.prefixUrl, h.rotateleft.REST),
2818
+ srcGroup: M(this.prefixUrl, h.rotateleft.GROUP),
2819
+ srcHover: M(this.prefixUrl, h.rotateleft.HOVER),
2820
+ srcDown: M(this.prefixUrl, h.rotateleft.DOWN),
2815
2821
  onRelease: c,
2816
2822
  onFocus: d,
2817
2823
  onBlur: f
@@ -2820,10 +2826,10 @@ var ye = p([
2820
2826
  clickTimeThreshold: this.clickTimeThreshold,
2821
2827
  clickDistThreshold: this.clickDistThreshold,
2822
2828
  tooltip: e.getString("Tooltips.RotateRight"),
2823
- srcRest: j(this.prefixUrl, h.rotateright.REST),
2824
- srcGroup: j(this.prefixUrl, h.rotateright.GROUP),
2825
- srcHover: j(this.prefixUrl, h.rotateright.HOVER),
2826
- srcDown: j(this.prefixUrl, h.rotateright.DOWN),
2829
+ srcRest: M(this.prefixUrl, h.rotateright.REST),
2830
+ srcGroup: M(this.prefixUrl, h.rotateright.GROUP),
2831
+ srcHover: M(this.prefixUrl, h.rotateright.HOVER),
2832
+ srcDown: M(this.prefixUrl, h.rotateright.DOWN),
2827
2833
  onRelease: l,
2828
2834
  onFocus: d,
2829
2835
  onBlur: f
@@ -2832,10 +2838,10 @@ var ye = p([
2832
2838
  clickTimeThreshold: this.clickTimeThreshold,
2833
2839
  clickDistThreshold: this.clickDistThreshold,
2834
2840
  tooltip: e.getString("Tooltips.Flip"),
2835
- srcRest: j(this.prefixUrl, h.flip.REST),
2836
- srcGroup: j(this.prefixUrl, h.flip.GROUP),
2837
- srcHover: j(this.prefixUrl, h.flip.HOVER),
2838
- srcDown: j(this.prefixUrl, h.flip.DOWN),
2841
+ srcRest: M(this.prefixUrl, h.flip.REST),
2842
+ srcGroup: M(this.prefixUrl, h.flip.GROUP),
2843
+ srcHover: M(this.prefixUrl, h.flip.HOVER),
2844
+ srcDown: M(this.prefixUrl, h.flip.DOWN),
2839
2845
  onRelease: u,
2840
2846
  onFocus: d,
2841
2847
  onBlur: f
@@ -2843,7 +2849,7 @@ var ye = p([
2843
2849
  buttons: g,
2844
2850
  clickTimeThreshold: this.clickTimeThreshold,
2845
2851
  clickDistThreshold: this.clickDistThreshold
2846
- }), this.navControl = this.buttonGroup.element, this.addHandler("open", e.delegate(this, z)), this.toolbar ? this.toolbar.addControl(this.navControl, { anchor: this.navigationControlAnchor || e.ControlAnchor.TOP_LEFT }) : this.addControl(this.navControl, { anchor: this.navigationControlAnchor || e.ControlAnchor.TOP_LEFT })) : this.customButtons = g), this;
2852
+ }), this.navControl = this.buttonGroup.element, this.addHandler("open", e.delegate(this, R)), this.toolbar ? this.toolbar.addControl(this.navControl, { anchor: this.navigationControlAnchor || e.ControlAnchor.TOP_LEFT }) : this.addControl(this.navControl, { anchor: this.navigationControlAnchor || e.ControlAnchor.TOP_LEFT })) : this.customButtons = g), this;
2847
2853
  },
2848
2854
  currentPage: function() {
2849
2855
  return this._sequenceIndex;
@@ -3306,19 +3312,19 @@ var ye = p([
3306
3312
  n = this.viewport.pointFromPixel(e.center, !0), this.viewport.rotateTo(this.viewport.getRotation(!0) + (o - s) * (180 / Math.PI), n, !0);
3307
3313
  }
3308
3314
  }
3309
- function te(e) {
3315
+ function O(e) {
3310
3316
  this.raiseEvent("canvas-focus", {
3311
3317
  tracker: e.eventSource,
3312
3318
  originalEvent: e.originalEvent
3313
3319
  });
3314
3320
  }
3315
- function ne(e) {
3321
+ function te(e) {
3316
3322
  this.raiseEvent("canvas-blur", {
3317
3323
  tracker: e.eventSource,
3318
3324
  originalEvent: e.originalEvent
3319
3325
  });
3320
3326
  }
3321
- function re(t) {
3327
+ function ne(t) {
3322
3328
  var n, r, i, a = e.now();
3323
3329
  a - this._lastScrollTime > this.minScrollDeltaTime ? (this._lastScrollTime = a, n = {
3324
3330
  tracker: t.eventSource,
@@ -3330,7 +3336,7 @@ var ye = p([
3330
3336
  preventDefault: !0
3331
3337
  }, this.raiseEvent("canvas-scroll", n), !n.preventDefaultAction && this.viewport && (this.viewport.flipped && (t.position.x = this.viewport.getContainerSize().x - t.position.x), r = this.gestureSettingsByDeviceType(t.pointerType), r.scrollToZoom && (i = this.zoomPerScroll ** +t.scroll, this.viewport.zoomBy(i, r.zoomToRefPoint ? this.viewport.pointFromPixel(t.position, !0) : null), this.viewport.applyConstraints())), t.preventDefault = n.preventDefault) : t.preventDefault = !0;
3332
3338
  }
3333
- function O(e) {
3339
+ function k(e) {
3334
3340
  t[this.hash].mouseInside = !0, f(this), this.raiseEvent("container-enter", {
3335
3341
  tracker: e.eventSource,
3336
3342
  pointerType: e.pointerType,
@@ -3342,7 +3348,7 @@ var ye = p([
3342
3348
  originalEvent: e.originalEvent
3343
3349
  });
3344
3350
  }
3345
- function k(e) {
3351
+ function A(e) {
3346
3352
  e.pointers < 1 && (t[this.hash].mouseInside = !1, t[this.hash].animating || u(this)), this.raiseEvent("container-exit", {
3347
3353
  tracker: e.eventSource,
3348
3354
  pointerType: e.pointerType,
@@ -3354,10 +3360,10 @@ var ye = p([
3354
3360
  originalEvent: e.originalEvent
3355
3361
  });
3356
3362
  }
3357
- function A(e) {
3358
- ae(e), e._updateRequestId = e.isOpen() ? c(e, A) : !1;
3363
+ function j(e) {
3364
+ ie(e), e._updateRequestId = e.isOpen() ? c(e, j) : !1;
3359
3365
  }
3360
- function ie(n, r) {
3366
+ function re(n, r) {
3361
3367
  var i = n.viewport, a = i.getZoom(), o = i.getCenter();
3362
3368
  i.resize(r, n.preserveImageSizeOnResize), i.panTo(o, !0);
3363
3369
  var s;
@@ -3368,7 +3374,7 @@ var ye = p([
3368
3374
  }
3369
3375
  i.zoomTo(a * s, null, !0), t[n.hash].prevContainerSize = r, t[n.hash].forceRedraw = !0, t[n.hash].needsResize = !1, t[n.hash].forceResize = !1;
3370
3376
  }
3371
- function ae(e) {
3377
+ function ie(e) {
3372
3378
  if (!(e._opening || !t[e.hash])) {
3373
3379
  if (e.autoResize || t[e.hash].forceResize) {
3374
3380
  var n;
@@ -3377,66 +3383,66 @@ var ye = p([
3377
3383
  var r = t[e.hash].prevContainerSize;
3378
3384
  n.equals(r) || (t[e.hash].needsResize = !0);
3379
3385
  }
3380
- t[e.hash].needsResize && ie(e, n || i(e.container));
3386
+ t[e.hash].needsResize && re(e, n || i(e.container));
3381
3387
  }
3382
3388
  var a = e.viewport.update(), o = e.world.update(a) || a;
3383
3389
  a && e.raiseEvent("viewport-change"), e.referenceStrip && (o = e.referenceStrip.update(e.viewport) || o);
3384
3390
  var s = t[e.hash].animating;
3385
3391
  !s && o && (e.raiseEvent("animation-start"), f(e));
3386
3392
  var c = s && !o;
3387
- c && (t[e.hash].animating = !1), (o || c || t[e.hash].forceRedraw || e.world.needsDraw()) && (oe(e), e._drawOverlays(), e.navigator && e.navigator.update(e.viewport), t[e.hash].forceRedraw = !1, o && e.raiseEvent("animation")), c && (e.raiseEvent("animation-finish"), t[e.hash].mouseInside || u(e)), t[e.hash].animating = o;
3393
+ c && (t[e.hash].animating = !1), (o || c || t[e.hash].forceRedraw || e.world.needsDraw()) && (ae(e), e._drawOverlays(), e.navigator && e.navigator.update(e.viewport), t[e.hash].forceRedraw = !1, o && e.raiseEvent("animation")), c && (e.raiseEvent("animation-finish"), t[e.hash].mouseInside || u(e)), t[e.hash].animating = o;
3388
3394
  }
3389
3395
  }
3390
- function oe(e) {
3396
+ function ae(e) {
3391
3397
  e.imageLoader.clear(), e.world.draw(), e.raiseEvent("update-viewport", {});
3392
3398
  }
3393
- function j(e, t) {
3399
+ function M(e, t) {
3394
3400
  return e ? e + t : t;
3395
3401
  }
3396
- function M() {
3397
- t[this.hash].lastZoomTime = e.now(), t[this.hash].zoomFactor = this.zoomPerSecond, t[this.hash].zooming = !0, F(this);
3398
- }
3399
3402
  function N() {
3400
- t[this.hash].lastZoomTime = e.now(), t[this.hash].zoomFactor = 1 / this.zoomPerSecond, t[this.hash].zooming = !0, F(this);
3403
+ t[this.hash].lastZoomTime = e.now(), t[this.hash].zoomFactor = this.zoomPerSecond, t[this.hash].zooming = !0, I(this);
3401
3404
  }
3402
3405
  function P() {
3406
+ t[this.hash].lastZoomTime = e.now(), t[this.hash].zoomFactor = 1 / this.zoomPerSecond, t[this.hash].zooming = !0, I(this);
3407
+ }
3408
+ function F() {
3403
3409
  t[this.hash].zooming = !1;
3404
3410
  }
3405
- function F(t) {
3406
- e.requestAnimationFrame(e.delegate(t, I));
3411
+ function I(t) {
3412
+ e.requestAnimationFrame(e.delegate(t, oe));
3407
3413
  }
3408
- function I() {
3414
+ function oe() {
3409
3415
  var n, r, i;
3410
- t[this.hash].zooming && this.viewport && (n = e.now(), r = n - t[this.hash].lastZoomTime, i = t[this.hash].zoomFactor ** (r / 1e3), this.viewport.zoomBy(i), this.viewport.applyConstraints(), t[this.hash].lastZoomTime = n, F(this));
3416
+ t[this.hash].zooming && this.viewport && (n = e.now(), r = n - t[this.hash].lastZoomTime, i = t[this.hash].zoomFactor ** (r / 1e3), this.viewport.zoomBy(i), this.viewport.applyConstraints(), t[this.hash].lastZoomTime = n, I(this));
3411
3417
  }
3412
- function L() {
3418
+ function se() {
3413
3419
  this.viewport && (t[this.hash].zooming = !1, this.viewport.zoomBy(this.zoomPerClick / 1), this.viewport.applyConstraints());
3414
3420
  }
3415
- function R() {
3421
+ function L() {
3416
3422
  this.viewport && (t[this.hash].zooming = !1, this.viewport.zoomBy(1 / this.zoomPerClick), this.viewport.applyConstraints());
3417
3423
  }
3418
- function z() {
3424
+ function R() {
3419
3425
  this.buttonGroup && (this.buttonGroup.emulateEnter(), this.buttonGroup.emulateLeave());
3420
3426
  }
3421
- function se() {
3427
+ function z() {
3422
3428
  this.viewport && this.viewport.goHome();
3423
3429
  }
3424
- function ce() {
3430
+ function B() {
3425
3431
  this.isFullPage() && !e.isFullScreen() ? this.setFullPage(!1) : this.setFullScreen(!this.isFullPage()), this.buttonGroup && this.buttonGroup.emulateLeave(), this.fullPageButton.element.focus(), this.viewport && this.viewport.applyConstraints();
3426
3432
  }
3427
- function le() {
3433
+ function ce() {
3428
3434
  if (this.viewport) {
3429
3435
  var e = this.viewport.getRotation();
3430
3436
  this.viewport.flipped ? e += this.rotationIncrement : e -= this.rotationIncrement, this.viewport.setRotation(e);
3431
3437
  }
3432
3438
  }
3433
- function B() {
3439
+ function V() {
3434
3440
  if (this.viewport) {
3435
3441
  var e = this.viewport.getRotation();
3436
3442
  this.viewport.flipped ? e -= this.rotationIncrement : e += this.rotationIncrement, this.viewport.setRotation(e);
3437
3443
  }
3438
3444
  }
3439
- function V() {
3445
+ function H() {
3440
3446
  this.viewport.toggleFlip();
3441
3447
  }
3442
3448
  e.determineDrawer = function(t) {
@@ -7216,7 +7222,7 @@ var ye = p([
7216
7222
  }
7217
7223
  });
7218
7224
  })(n);
7219
- })), Z = /* @__PURE__ */ u(s(), 1), Ae = /* @__PURE__ */ u(le(), 1), je = /* @__PURE__ */ u(Ee(), 1), Me = /* @__PURE__ */ u(Oe(), 1), Q = /* @__PURE__ */ u(ke(), 1), Ne = class {
7225
+ })), Z = /* @__PURE__ */ u(s(), 1), Me = /* @__PURE__ */ u(V(), 1), Ne = /* @__PURE__ */ u(xe(), 1), Pe = /* @__PURE__ */ u(Oe(), 1), Fe = /* @__PURE__ */ u(Ae(), 1), Q = /* @__PURE__ */ u(je(), 1), Ie = class {
7220
7226
  constructor(e, t) {
7221
7227
  this.viewer = e, this.ref = t, this.containerWidth = 0, this.containerHeight = 0, this.imgAspectRatio = 1;
7222
7228
  }
@@ -7253,13 +7259,13 @@ var ye = p([
7253
7259
  };
7254
7260
  //#endregion
7255
7261
  //#region src/lib/svgShapesToPath.js
7256
- function Pe(e) {
7262
+ function Le(e) {
7257
7263
  let t = e.tagName.toLowerCase(), n = (t) => parseFloat(e.getAttribute(t)) || 0;
7258
7264
  if (t === "path") return new Path2D(e.getAttribute("d"));
7259
7265
  let r = new Path2D();
7260
- return Fe[t]?.(r, e, n), r;
7266
+ return Re[t]?.(r, e, n), r;
7261
7267
  }
7262
- var Fe = {
7268
+ var Re = {
7263
7269
  circle: (e, t, n) => {
7264
7270
  e.arc(n("cx"), n("cy"), n("r"), 0, 2 * Math.PI);
7265
7271
  },
@@ -7272,29 +7278,38 @@ var Fe = {
7272
7278
  line: (e, t, n) => {
7273
7279
  e.moveTo(n("x1"), n("y1")), e.lineTo(n("x2"), n("y2"));
7274
7280
  },
7275
- polygon: (e, t) => Ie(e, t, !0),
7276
- polyline: (e, t) => Ie(e, t, !1)
7281
+ polygon: (e, t) => ze(e, t, !0),
7282
+ polyline: (e, t) => ze(e, t, !1)
7277
7283
  };
7278
- function Ie(e, t, n) {
7279
- Le(t.getAttribute("points")).forEach(([t, n], r) => {
7284
+ function ze(e, t, n) {
7285
+ Be(t.getAttribute("points")).forEach(([t, n], r) => {
7280
7286
  r === 0 ? e.moveTo(t, n) : e.lineTo(t, n);
7281
7287
  }), n && e.closePath();
7282
7288
  }
7283
- function Le(e) {
7289
+ function Be(e) {
7284
7290
  let t = e.trim().split(/[\s,]+/).map(Number), n = [];
7285
7291
  for (let e = 0; e < t.length - 1; e += 2) n.push([t[e], t[e + 1]]);
7286
7292
  return n;
7287
7293
  }
7288
7294
  //#endregion
7289
7295
  //#region src/lib/CanvasAnnotationDisplay.js
7290
- var Re = "M50.002 0C30.763 0 15 15.718 15 34.902c0 7.432 2.374 14.34 6.392 20.019L45.73 96.994c3.409 4.453 5.675 3.607 8.51-.235l26.843-45.683c.542-.981.967-2.026 1.338-3.092A34.446 34.446 0 0 0 85 34.902C85 15.718 69.24 0 50.002 0zm0 16.354c10.359 0 18.597 8.218 18.597 18.548c0 10.33-8.238 18.544-18.597 18.544c-10.36 0-18.601-8.215-18.601-18.544c0-10.33 8.241-18.548 18.6-18.548z", ze = 100, Be = {
7296
+ var Ve = "M50.002 0C30.763 0 15 15.718 15 34.902c0 7.432 2.374 14.34 6.392 20.019L45.73 96.994c3.409 4.453 5.675 3.607 8.51-.235l26.843-45.683c.542-.981.967-2.026 1.338-3.092A34.446 34.446 0 0 0 85 34.902C85 15.718 69.24 0 50.002 0zm0 16.354c10.359 0 18.597 8.218 18.597 18.548c0 10.33-8.238 18.544-18.597 18.544c-10.36 0-18.601-8.215-18.601-18.544c0-10.33 8.241-18.548 18.6-18.548z", He = 100, Ue = {
7291
7297
  x: 50,
7292
- y: 97
7298
+ y: 100
7293
7299
  }, $ = {
7294
7300
  x: 50,
7295
7301
  y: 34.9,
7296
7302
  radius: 18.6
7297
- }, Ve = "#1e88e5", He = class {
7303
+ }, We = 1.6, Ge = "#1e88e5";
7304
+ function Ke(e, t, n) {
7305
+ let r = 44 / n / He;
7306
+ return {
7307
+ radius: 32 / n,
7308
+ x: e + ($.x - Ue.x) * r,
7309
+ y: t + ($.y - Ue.y) * r
7310
+ };
7311
+ }
7312
+ var qe = class {
7298
7313
  constructor({ resource: e, palette: t, zoomRatio: n, offset: r, selected: i, hovered: a }) {
7299
7314
  this.resource = e, this.palette = t, this.zoomRatio = n, this.offset = r, this.selected = i, this.hovered = a;
7300
7315
  }
@@ -7307,13 +7322,13 @@ var Re = "M50.002 0C30.763 0 15 15.718 15 34.902c0 7.432 2.374 14.34 6.392 20.01
7307
7322
  pointContext() {
7308
7323
  let { x: e, y: t } = this.resource.pointSelector, n = this.currentPalette();
7309
7324
  if (n.globalAlpha === 0) return;
7310
- let r = 32 / this.zoomRatio / ze;
7311
- this.context.save(), this.context.translate(this.offset.x + e, this.offset.y + t), this.context.scale(r, r), this.context.translate(-Be.x, -Be.y), this.context.globalAlpha = n.globalAlpha ?? 1, this.context.fillStyle = n.fillStyle || Ve, this.context.fill(new Path2D(Re));
7325
+ let r = 44 / this.zoomRatio / He;
7326
+ this.context.save(), this.context.translate(this.offset.x + e, this.offset.y + t), this.context.scale(r, r), this.context.translate(-Ue.x, -Ue.y), this.context.globalAlpha = n.globalAlpha ?? 1, this.context.fillStyle = n.fillStyle || Ge, this.context.fill(new Path2D(Ve));
7312
7327
  let { journeyOrder: i } = this.resource;
7313
7328
  i != null && this.journeyOrderBadgeContext(i), this.context.restore();
7314
7329
  }
7315
7330
  journeyOrderBadgeContext(e) {
7316
- this.context.beginPath(), this.context.arc($.x, $.y, $.radius, 0, Math.PI * 2), this.context.fillStyle = "#ffffff", this.context.fill(), this.context.fillStyle = this.currentPalette().fillStyle || Ve, this.context.font = `bold ${$.radius}px sans-serif`, this.context.textAlign = "center", this.context.textBaseline = "middle", this.context.fillText(String(e), $.x, $.y);
7331
+ this.context.beginPath(), this.context.arc($.x, $.y, $.radius, 0, Math.PI * 2), this.context.fillStyle = "#ffffff", this.context.fill(), this.context.fillStyle = this.currentPalette().fillStyle || Ge, this.context.font = `bold ${$.radius * We}px sans-serif`, this.context.textAlign = "center", this.context.textBaseline = "middle", this.context.fillText(String(e), $.x, $.y);
7317
7332
  }
7318
7333
  get svgString() {
7319
7334
  return this.resource.svgSelector.value;
@@ -7325,7 +7340,7 @@ var Re = "M50.002 0C30.763 0 15 15.718 15 34.902c0 7.432 2.374 14.34 6.392 20.01
7325
7340
  let e;
7326
7341
  e = this.hovered ? this.palette.hovered : this.selected ? this.palette.selected : this.palette.default, e.globalAlpha !== 0 && [...this.svgPaths].forEach((t) => {
7327
7342
  this.context.save(), this.context.translate(this.offset.x, this.offset.y);
7328
- let n = Pe(t);
7343
+ let n = Le(t);
7329
7344
  this.context.strokeStyle = this.color, t.getAttribute("stroke-dasharray") && this.context.setLineDash(t.getAttribute("stroke-dasharray").split(","));
7330
7345
  let r = {
7331
7346
  fill: "fillStyle",
@@ -7356,17 +7371,17 @@ var Re = "M50.002 0C30.763 0 15 15.718 15 34.902c0 7.432 2.374 14.34 6.392 20.01
7356
7371
  };
7357
7372
  //#endregion
7358
7373
  //#region src/components/AnnotationsOverlay.jsx
7359
- function Ue({ canvasWorld: e, osdCanvasOverlay: t, viewer: n }, r, i, a) {
7374
+ function Je({ canvasWorld: e, osdCanvasOverlay: t, viewer: n }, r, i, a) {
7360
7375
  let [o, s] = e.canvasToWorldCoordinates(i.id), c = a.x - o, l = a.y - s;
7361
7376
  if (r.svgSelector) {
7362
- let e = t.context2d, { svgPaths: n } = new He({ resource: r });
7363
- return [...n].some((t) => e.isPointInPath(Pe(t), c, l));
7377
+ let e = t.context2d, { svgPaths: n } = new qe({ resource: r });
7378
+ return [...n].some((t) => e.isPointInPath(Le(t), c, l));
7364
7379
  }
7365
7380
  if (r.pointSelector) {
7366
7381
  let { x: t, y: a } = r.pointSelector, o = e.canvases.findIndex((e) => e.id === i.id), s = n.world.getItemAt(o);
7367
7382
  if (!s) return !1;
7368
- let u = 16 / s.viewportToImageZoom(n.viewport.getZoom(!0)), d = c - t, f = l - a;
7369
- return d * d + f * f <= u * u;
7383
+ let u = Ke(t, a, s.viewportToImageZoom(n.viewport.getZoom(!0))), d = c - u.x, f = l - u.y;
7384
+ return d * d + f * f <= u.radius * u.radius;
7370
7385
  }
7371
7386
  if (r.fragmentSelector) {
7372
7387
  let [e, t, n, i] = r.fragmentSelector;
@@ -7374,42 +7389,40 @@ function Ue({ canvasWorld: e, osdCanvasOverlay: t, viewer: n }, r, i, a) {
7374
7389
  }
7375
7390
  return !1;
7376
7391
  }
7377
- function We(e) {
7392
+ function Ye(e) {
7378
7393
  let t = e.originalEvent?.pointerType;
7379
7394
  return (t === "touch" || t === "pen") && e.quick === !1;
7380
7395
  }
7381
- function Ge({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () => {}, drawAnnotations: r = !0, drawSearchAnnotations: i = !0, highlightAllAnnotations: a = !1, hoverAnnotation: o = () => {}, hoveredAnnotationIds: s = [], palette: c = {}, searchAnnotations: l = [], selectAnnotation: u = () => {}, selectedAnnotationId: d = null, viewer: f = null, windowId: p }) {
7382
- let m = J(), h = q(() => new Ne(f, m), [m, f]), g = W((e) => {
7396
+ function Xe({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () => {}, drawAnnotations: r = !0, drawSearchAnnotations: i = !0, highlightAllAnnotations: a = !1, hoverAnnotation: o = () => {}, hoveredAnnotationIds: s = [], palette: c = {}, searchAnnotations: l = [], selectAnnotation: u = () => {}, selectedAnnotationId: d = null, viewer: f = null, windowId: p }) {
7397
+ let m = Y(), h = J(() => new Ie(f, m), [m, f]), g = G((e) => {
7383
7398
  d === e ? n(p, e) : u(p, e);
7384
7399
  }, [
7385
7400
  d,
7386
7401
  n,
7387
7402
  u,
7388
7403
  p
7389
- ]), _ = W((e, n) => {
7390
- let r = h.context2d;
7391
- e.forEach((e) => {
7392
- e.resources.forEach((e) => {
7393
- let i = t.canvases.findIndex((t) => t.id === e.targetId);
7394
- if (i === -1) return;
7395
- let o = f.world.getItemAt(i);
7396
- if (!o) return;
7397
- let c = t.offsetByCanvas(e.targetId), l = o.viewportToImageZoom(f.viewport.getZoom(!0));
7398
- new He({
7399
- hovered: s.includes(e.id),
7400
- offset: c,
7401
- palette: {
7402
- ...n,
7403
- default: {
7404
- ...n.default,
7405
- ...!a && n.hidden
7406
- }
7407
- },
7408
- resource: e,
7409
- selected: d === e.id,
7410
- zoomRatio: l
7411
- }).toContext(r);
7412
- });
7404
+ ]), _ = G((e, n) => {
7405
+ let r = h.context2d, i = e.flatMap((e) => e.resources), [o, c] = (0, Ne.default)(i, (e) => !e.pointSelector);
7406
+ [...o, ...c].forEach((e) => {
7407
+ let i = t.canvases.findIndex((t) => t.id === e.targetId);
7408
+ if (i === -1) return;
7409
+ let o = f.world.getItemAt(i);
7410
+ if (!o) return;
7411
+ let c = t.offsetByCanvas(e.targetId), l = o.viewportToImageZoom(f.viewport.getZoom(!0));
7412
+ new qe({
7413
+ hovered: s.includes(e.id),
7414
+ offset: c,
7415
+ palette: {
7416
+ ...n,
7417
+ default: {
7418
+ ...n.default,
7419
+ ...!a && n.hidden
7420
+ }
7421
+ },
7422
+ resource: e,
7423
+ selected: d === e.id,
7424
+ zoomRatio: l
7425
+ }).toContext(r);
7413
7426
  });
7414
7427
  }, [
7415
7428
  h,
@@ -7418,7 +7431,7 @@ function Ge({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
7418
7431
  a,
7419
7432
  s,
7420
7433
  d
7421
- ]), v = W(() => {
7434
+ ]), v = G(() => {
7422
7435
  i && _(l, c.search), r && _(e, c.annotations);
7423
7436
  }, [
7424
7437
  e,
@@ -7427,9 +7440,9 @@ function Ge({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
7427
7440
  i,
7428
7441
  c,
7429
7442
  l
7430
- ]), y = W(() => {
7443
+ ]), y = G(() => {
7431
7444
  h && (h.clear(), h.resize(), h.canvasUpdate(v));
7432
- }, [h, v]), b = W((n, r) => [...e, ...l].flatMap((e) => e.resources).filter((e) => n.id === e.targetId && Ue({
7445
+ }, [h, v]), b = G((n, r) => [...e, ...l].flatMap((e) => e.resources).filter((e) => n.id === e.targetId && Je({
7433
7446
  canvasWorld: t,
7434
7447
  osdCanvasOverlay: h,
7435
7448
  viewer: f
@@ -7439,8 +7452,8 @@ function Ge({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
7439
7452
  h,
7440
7453
  l,
7441
7454
  f
7442
- ]), x = W((e) => {
7443
- if (We(e)) return;
7455
+ ]), x = G((e) => {
7456
+ if (Ye(e)) return;
7444
7457
  let { position: n, eventSource: { viewport: r } } = e, i = r.pointFromPixel(n), a = t.canvasAtPoint(i);
7445
7458
  if (!a) return;
7446
7459
  let [o, s, c, l] = t.canvasToWorldCoordinates(a.id), u = b(a, i);
@@ -7452,7 +7465,7 @@ function Ge({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
7452
7465
  let o = 0;
7453
7466
  for (let s = 0; s < 360; s += 1) {
7454
7467
  let c = Math.cos(s * n) * e + i.x, l = Math.sin(s * n) * e + i.y;
7455
- Ue({
7468
+ Je({
7456
7469
  canvasWorld: t,
7457
7470
  osdCanvasOverlay: h,
7458
7471
  viewer: f
@@ -7466,8 +7479,8 @@ function Ge({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
7466
7479
  score: o
7467
7480
  };
7468
7481
  };
7469
- }, n = 1, r = (0, je.default)(u.map(e(n)), "score");
7470
- for (; n < Math.max(c, l) && r[0].score === r[1].score;) n *= 2, r = (0, je.default)(u.map(e(n)), "score");
7482
+ }, n = 1, r = (0, Pe.default)(u.map(e(n)), "score");
7483
+ for (; n < Math.max(c, l) && r[0].score === r[1].score;) n *= 2, r = (0, Pe.default)(u.map(e(n)), "score");
7471
7484
  g(r[0].anno.id);
7472
7485
  }
7473
7486
  }, [
@@ -7476,7 +7489,7 @@ function Ge({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
7476
7489
  h,
7477
7490
  g,
7478
7491
  f
7479
- ]), S = z(W((n) => {
7492
+ ]), S = z(G((n) => {
7480
7493
  if (e.length === 0 && l.length === 0) return;
7481
7494
  let { position: r } = n, i = f.viewport.pointFromPixel(r), a = t.canvasAtPoint(i);
7482
7495
  if (!a) {
@@ -7484,7 +7497,7 @@ function Ge({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
7484
7497
  return;
7485
7498
  }
7486
7499
  let c = b(a, i);
7487
- (0, Me.default)(s, c.map((e) => e.id)).length > 0 && o(p, c.map((e) => e.id));
7500
+ (0, Fe.default)(s, c.map((e) => e.id)).length > 0 && o(p, c.map((e) => e.id));
7488
7501
  }, [
7489
7502
  e,
7490
7503
  b,
@@ -7494,16 +7507,16 @@ function Ge({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
7494
7507
  l,
7495
7508
  f,
7496
7509
  p
7497
- ]), 10), C = W(() => {
7510
+ ]), 10), C = G(() => {
7498
7511
  S.cancel(), o(p, []);
7499
7512
  }, [
7500
7513
  o,
7501
7514
  S,
7502
7515
  p
7503
- ]), w = W(() => {
7516
+ ]), w = G(() => {
7504
7517
  y();
7505
7518
  }, [y]);
7506
- return K(() => {
7519
+ return q(() => {
7507
7520
  if (f) return f.addHandler("canvas-click", x), f.addHandler("canvas-exit", C), f.addHandler("mouse-move", S), f.addHandler("update-viewport", w), () => {
7508
7521
  f.removeHandler("canvas-click", x), f.removeHandler("canvas-exit", C), f.removeHandler("mouse-move", S), f.removeHandler("update-viewport", w);
7509
7522
  };
@@ -7513,7 +7526,7 @@ function Ge({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
7513
7526
  S,
7514
7527
  w,
7515
7528
  f
7516
- ]), K(() => {
7529
+ ]), q(() => {
7517
7530
  f && f.forceRedraw();
7518
7531
  }, [
7519
7532
  e,
@@ -7524,9 +7537,9 @@ function Ge({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
7524
7537
  l,
7525
7538
  d,
7526
7539
  f
7527
- ]), K(() => {
7540
+ ]), q(() => {
7528
7541
  m.current && (s.length > 0 ? m.current.style.cursor = "pointer" : m.current.style.cursor = "");
7529
- }, [s, m]), f ? _e.createPortal(/* @__PURE__ */ X("div", {
7542
+ }, [s, m]), f ? ve.createPortal(/* @__PURE__ */ X("div", {
7530
7543
  ref: m,
7531
7544
  style: {
7532
7545
  height: "100%",
@@ -7538,7 +7551,7 @@ function Ge({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
7538
7551
  children: /* @__PURE__ */ X("canvas", {})
7539
7552
  }), f.canvas) : null;
7540
7553
  }
7541
- Ge.propTypes = {
7554
+ Xe.propTypes = {
7542
7555
  annotations: Z.default.arrayOf(Z.default.object),
7543
7556
  canvasWorld: Z.default.instanceOf(L).isRequired,
7544
7557
  deselectAnnotation: Z.default.func,
@@ -7556,7 +7569,7 @@ Ge.propTypes = {
7556
7569
  };
7557
7570
  //#endregion
7558
7571
  //#region src/components/ImageFailureMessage.jsx
7559
- var Ke = he(ve)(({ theme: e }) => ({
7572
+ var Ze = ge(ye)(({ theme: e }) => ({
7560
7573
  position: "absolute",
7561
7574
  top: e.spacing(2),
7562
7575
  left: "50%",
@@ -7568,39 +7581,39 @@ var Ke = he(ve)(({ theme: e }) => ({
7568
7581
  zIndex: 1e3,
7569
7582
  pointerEvents: "none"
7570
7583
  }));
7571
- function qe({ imageUrls: e = [] }) {
7572
- let { failedImages: t } = G(M), { t: n } = me();
7573
- return e.some((e) => t.has(e)) ? /* @__PURE__ */ X(Ke, {
7584
+ function Qe({ imageUrls: e = [] }) {
7585
+ let { failedImages: t } = K(P), { t: n } = he();
7586
+ return e.some((e) => t.has(e)) ? /* @__PURE__ */ X(Ze, {
7574
7587
  role: "status",
7575
7588
  "aria-live": "polite",
7576
- children: /* @__PURE__ */ X(ge, {
7589
+ children: /* @__PURE__ */ X(_e, {
7577
7590
  variant: "body2",
7578
7591
  children: n("imageFailedToLoad")
7579
7592
  })
7580
7593
  }) : null;
7581
7594
  }
7582
- qe.propTypes = { imageUrls: Z.default.arrayOf(Z.default.string) };
7583
- var Je = i(h((e, { windowId: t }) => ({
7584
- annotations: k(e, { windowId: t }),
7585
- canvasWorld: ye(e, { windowId: t }),
7586
- drawAnnotations: D(e).window.forceDrawAnnotations || _(e, {
7595
+ Qe.propTypes = { imageUrls: Z.default.arrayOf(Z.default.string) };
7596
+ var $e = i(h((e, { windowId: t }) => ({
7597
+ annotations: j(e, { windowId: t }),
7598
+ canvasWorld: be(e, { windowId: t }),
7599
+ drawAnnotations: O(e).window.forceDrawAnnotations || _(e, {
7587
7600
  content: "annotations",
7588
7601
  windowId: t
7589
7602
  }).length > 0,
7590
- drawSearchAnnotations: D(e).window.forceDrawAnnotations || _(e, {
7603
+ drawSearchAnnotations: O(e).window.forceDrawAnnotations || _(e, {
7591
7604
  content: "search",
7592
7605
  windowId: t
7593
7606
  }).length > 0,
7594
7607
  highlightAllAnnotations: o(e, { windowId: t }).highlightAllAnnotations,
7595
7608
  hoveredAnnotationIds: o(e, { windowId: t }).hoveredAnnotationIds,
7596
- palette: C(e).palette,
7609
+ palette: w(e).palette,
7597
7610
  searchAnnotations: ie(e, { windowId: t }),
7598
7611
  selectedAnnotationId: ae(e, { windowId: t })
7599
7612
  }), {
7600
- deselectAnnotation: oe,
7601
- hoverAnnotation: j,
7602
- selectAnnotation: A
7603
- }), d("AnnotationsOverlay"))(Ge), Ye = {
7613
+ deselectAnnotation: M,
7614
+ hoverAnnotation: N,
7615
+ selectAnnotation: re
7616
+ }), d("AnnotationsOverlay"))(Xe), et = {
7604
7617
  get(e) {
7605
7618
  return this.refs[e];
7606
7619
  },
@@ -7611,13 +7624,13 @@ var Je = i(h((e, { windowId: t }) => ({
7611
7624
  set(e, t) {
7612
7625
  this.refs[e] = t;
7613
7626
  }
7614
- }, Xe = U(void 0);
7627
+ }, tt = ue(void 0);
7615
7628
  //#endregion
7616
7629
  //#region src/components/OpenSeadragonComponent.jsx
7617
- function Ze({ children: e = void 0, Container: t = "div", osdConfig: n = {}, viewerConfig: r = {}, onUpdateViewport: i = () => {}, setViewer: a = () => {}, style: o = {}, ...s }) {
7618
- let c = de(), l = J(), [u, d] = Y(!1), f = J(void 0), p = J(!1), m = J(null), h = J(!1), [, g] = fe((e) => e + 1, 0), _ = z(W((e) => {
7630
+ function nt({ children: e = void 0, Container: t = "div", osdConfig: n = {}, viewerConfig: r = {}, onUpdateViewport: i = () => {}, setViewer: a = () => {}, style: o = {}, ...s }) {
7631
+ let c = de(), l = Y(), [u, d] = pe(!1), f = Y(void 0), p = Y(!1), m = Y(null), h = Y(!1), [, g] = fe((e) => e + 1, 0), _ = z(G((e) => {
7619
7632
  f.current?.raiseEvent("mouse-move", e);
7620
- }, [f]), 10), v = W((e) => {
7633
+ }, [f]), 10), v = G((e) => {
7621
7634
  let { viewport: t } = e.eventSource;
7622
7635
  p.current && (h.current || i({
7623
7636
  bounds: t.getBounds(),
@@ -7627,10 +7640,10 @@ function Ze({ children: e = void 0, Container: t = "div", osdConfig: n = {}, vie
7627
7640
  y: Math.round(t.centerSpringY.target.value),
7628
7641
  zoom: t.zoomSpring.target.value
7629
7642
  }));
7630
- }, [i, p]), y = W(({ viewport: e }) => {
7643
+ }, [i, p]), y = G(({ viewport: e }) => {
7631
7644
  p.current || (p.current = !0, r.x != null && r.y != null && e.panTo(new Q.default.Point(r.x, r.y), !0), r.zoom != null && e.zoomTo(r.zoom, new Q.default.Point(r.x, r.y), !0), r.rotation != null && r.rotation !== e.getRotation() && e.setRotation(r.rotation), r.flip != null && (r.flip || !1) !== e.getFlip() && e.setFlip(r.flip), !r.x && !r.y && !r.zoom && (r.bounds ? (e.fitBounds(new Q.default.Rect(...r.bounds), !0), m.current = r.bounds) : e.goHome(!0)));
7632
7645
  }, [p, r]);
7633
- K(() => {
7646
+ q(() => {
7634
7647
  let e = f.current;
7635
7648
  if (!e) return;
7636
7649
  let { viewport: t } = e;
@@ -7651,7 +7664,7 @@ function Ze({ children: e = void 0, Container: t = "div", osdConfig: n = {}, vie
7651
7664
  y,
7652
7665
  r,
7653
7666
  f
7654
- ]), K(() => {
7667
+ ]), q(() => {
7655
7668
  let e = (0, Q.default)({
7656
7669
  element: l.current,
7657
7670
  ...n
@@ -7667,19 +7680,19 @@ function Ze({ children: e = void 0, Container: t = "div", osdConfig: n = {}, vie
7667
7680
  }), e.addHandler("animation-finish", v), e.innerTracker.moveHandler = _, f.current = e, a(e), e.addOnceHandler("tile-loaded", () => {
7668
7681
  p.current = !1, y(e);
7669
7682
  }), g();
7670
- }, [l]), K(() => () => {
7683
+ }, [l]), q(() => () => {
7671
7684
  let e = f.current;
7672
7685
  e && (e.innerTracker?.moveHandler === _ && (e.innerTracker.moveHandler = () => {}), e.removeAllHandlers(), e.destroy(), f.current = void 0, a(null));
7673
7686
  }, []);
7674
- let { t: b } = me();
7675
- return K(() => {
7687
+ let { t: b } = he();
7688
+ return q(() => {
7676
7689
  let e = f?.current?.canvas?.firstElementChild;
7677
7690
  e && (e.setAttribute("role", "img"), e.setAttribute("aria-label", b("digitizedView")), e.setAttribute("aria-describedby", c));
7678
7691
  }, [
7679
7692
  f?.current?.canvas?.firstElementChild,
7680
7693
  c,
7681
7694
  b
7682
- ]), /* @__PURE__ */ X(Xe.Provider, {
7695
+ ]), /* @__PURE__ */ X(tt.Provider, {
7683
7696
  value: f,
7684
7697
  children: /* @__PURE__ */ X(t, {
7685
7698
  id: c,
@@ -7693,7 +7706,7 @@ function Ze({ children: e = void 0, Container: t = "div", osdConfig: n = {}, vie
7693
7706
  })
7694
7707
  });
7695
7708
  }
7696
- Ze.propTypes = {
7709
+ nt.propTypes = {
7697
7710
  children: Z.default.node,
7698
7711
  Container: Z.default.elementType,
7699
7712
  onUpdateViewport: Z.default.func,
@@ -7711,15 +7724,15 @@ Ze.propTypes = {
7711
7724
  };
7712
7725
  //#endregion
7713
7726
  //#region src/components/OpenSeadragonTileSource.jsx
7714
- function Qe({ index: e = void 0, opacity: t = void 0, fitBounds: n = void 0, tileSource: r = {}, url: i = void 0 }) {
7715
- let a = G(Xe), { notifyFailure: o, fallbackImage: s } = G(M), c = J(void 0);
7716
- return K(() => {
7727
+ function rt({ index: e = void 0, opacity: t = void 0, fitBounds: n = void 0, tileSource: r = {}, url: i = void 0 }) {
7728
+ let a = K(tt), { notifyFailure: o, fallbackImage: s } = K(P), c = Y(void 0);
7729
+ return q(() => {
7717
7730
  t != null && c.current?.setOpacity(t);
7718
- }, [t]), K(() => {
7731
+ }, [t]), q(() => {
7719
7732
  n && c.current?.fitBounds(new Q.default.Rect(...n));
7720
- }, [n]), K(() => {
7733
+ }, [n]), q(() => {
7721
7734
  !c.current || !a?.current || e == null || a.current.world.setItemIndex(c.current, e);
7722
- }, [e, a]), K(() => {
7735
+ }, [e, a]), q(() => {
7723
7736
  if (!a?.current) return;
7724
7737
  let l = () => {
7725
7738
  s && a.current.addTiledImage({
@@ -7760,7 +7773,7 @@ function Qe({ index: e = void 0, opacity: t = void 0, fitBounds: n = void 0, til
7760
7773
  });
7761
7774
  }, [a?.current, i]), null;
7762
7775
  }
7763
- Qe.propTypes = {
7776
+ rt.propTypes = {
7764
7777
  fitBounds: Z.default.arrayOf(Z.default.number),
7765
7778
  index: Z.default.number,
7766
7779
  opacity: Z.default.number,
@@ -7769,13 +7782,13 @@ Qe.propTypes = {
7769
7782
  };
7770
7783
  //#endregion
7771
7784
  //#region src/components/OpenSeadragonViewer.jsx
7772
- var $e = he("section")({
7785
+ var it = ge("section")({
7773
7786
  cursor: "grab",
7774
7787
  flex: 1,
7775
7788
  position: "relative"
7776
7789
  });
7777
- function et({ children: e = null, label: t = null, windowId: n, osdConfig: r = {}, viewerConfig: i = null, drawAnnotations: a = !1, infoResponses: o = [], canvasWorld: s, nonTiledImages: c = [], updateViewport: l, ...u }) {
7778
- let { t: d } = me(), f = J(), [p, m] = Y(null), h = W(({ flip: e, rotation: t, x: r, y: i, zoom: a }) => {
7790
+ function at({ children: e = null, label: t = null, windowId: n, osdConfig: r = {}, viewerConfig: i = null, drawAnnotations: a = !1, infoResponses: o = [], canvasWorld: s, nonTiledImages: c = [], updateViewport: l, ...u }) {
7791
+ let { t: d } = he(), f = Y(), [p, m] = pe(null), h = G(({ flip: e, rotation: t, x: r, y: i, zoom: a }) => {
7779
7792
  l(n, {
7780
7793
  flip: e,
7781
7794
  rotation: t,
@@ -7783,13 +7796,13 @@ function et({ children: e = null, label: t = null, windowId: n, osdConfig: r = {
7783
7796
  y: i,
7784
7797
  zoom: a
7785
7798
  });
7786
- }, [l, n]), g = W((e = !0) => {
7799
+ }, [l, n]), g = G((e = !0) => {
7787
7800
  f.current?.viewport && f.current.viewport.fitBounds(new Q.default.Rect(...s.worldBounds()), e);
7788
7801
  }, [s, f]);
7789
- K(() => (Ye.set(n, f), () => Ye.remove(n)), [f, n]), K(() => {
7802
+ q(() => (et.set(n, f), () => et.remove(n)), [f, n]), q(() => {
7790
7803
  f.current = p;
7791
7804
  }, [f, p]);
7792
- let _ = ue.map(e, (e) => H(e, { zoomToWorld: g })), v = {
7805
+ let _ = U.map(e, (e) => W(e, { zoomToWorld: g })), v = {
7793
7806
  canvasWorld: s,
7794
7807
  drawAnnotations: a,
7795
7808
  infoResponses: o,
@@ -7801,10 +7814,10 @@ function et({ children: e = null, label: t = null, windowId: n, osdConfig: r = {
7801
7814
  viewerConfig: i,
7802
7815
  windowId: n,
7803
7816
  ...u
7804
- }, y = q(() => [...o.map((e) => e.id), ...c.map((e) => e.id)], [o, c]);
7805
- return /* @__PURE__ */ pe(Ze, {
7806
- className: (0, Ae.default)(B("osd-container")),
7807
- Container: $e,
7817
+ }, y = J(() => [...o.map((e) => e.id), ...c.map((e) => e.id)], [o, c]);
7818
+ return /* @__PURE__ */ me(nt, {
7819
+ className: (0, Me.default)(H("osd-container")),
7820
+ Container: it,
7808
7821
  osdConfig: r,
7809
7822
  viewerConfig: i || (s.hasDimensions() ? { bounds: s.worldBounds() } : void 0),
7810
7823
  onUpdateViewport: h,
@@ -7816,7 +7829,7 @@ function et({ children: e = null, label: t = null, windowId: n, osdConfig: r = {
7816
7829
  let t = s.contentResource(e.id);
7817
7830
  if (!t) return null;
7818
7831
  let n = s.contentResourceToWorldCoordinates(t), r = s.layerIndexOfImageResource(t), i = s.layerOpacityOfImageResource(t);
7819
- return /* @__PURE__ */ X(Qe, {
7832
+ return /* @__PURE__ */ X(rt, {
7820
7833
  tileSource: e.json,
7821
7834
  fitBounds: n,
7822
7835
  index: r,
@@ -7827,20 +7840,20 @@ function et({ children: e = null, label: t = null, windowId: n, osdConfig: r = {
7827
7840
  let t = e.getProperty("type"), n = e.getProperty("format") || "";
7828
7841
  if (!(t === "Image" || t === "dctypes:Image" || n.startsWith("image/"))) return null;
7829
7842
  let r = s.contentResourceToWorldCoordinates(e), i = s.layerIndexOfImageResource(e), a = s.layerOpacityOfImageResource(e);
7830
- return /* @__PURE__ */ X(Qe, {
7843
+ return /* @__PURE__ */ X(rt, {
7831
7844
  url: e.id,
7832
7845
  fitBounds: r,
7833
7846
  index: i,
7834
7847
  opacity: a
7835
7848
  }, e.id);
7836
7849
  }),
7837
- a && /* @__PURE__ */ X(Je, {
7850
+ a && /* @__PURE__ */ X($e, {
7838
7851
  viewer: p,
7839
7852
  windowId: n
7840
7853
  }),
7841
7854
  _,
7842
- /* @__PURE__ */ X(qe, { imageUrls: y }),
7843
- /* @__PURE__ */ X(V, {
7855
+ /* @__PURE__ */ X(Qe, { imageUrls: y }),
7856
+ /* @__PURE__ */ X(le, {
7844
7857
  targetName: "OpenSeadragonViewer",
7845
7858
  viewer: p,
7846
7859
  ...v
@@ -7848,7 +7861,7 @@ function et({ children: e = null, label: t = null, windowId: n, osdConfig: r = {
7848
7861
  ]
7849
7862
  });
7850
7863
  }
7851
- et.propTypes = {
7864
+ at.propTypes = {
7852
7865
  canvasWorld: Z.default.instanceOf(L).isRequired,
7853
7866
  children: Z.default.node,
7854
7867
  drawAnnotations: Z.default.bool,
@@ -7862,11 +7875,11 @@ et.propTypes = {
7862
7875
  };
7863
7876
  //#endregion
7864
7877
  //#region src/containers/OpenSeadragonViewer.js
7865
- var tt = /* @__PURE__ */ l({ default: () => nt }), nt = i(h((e, { windowId: t }) => {
7866
- let n = ye(e, { windowId: t }), r = O(e), i = n.canvases.flatMap((e) => e.imageServiceIds);
7878
+ var ot = /* @__PURE__ */ l({ default: () => st }), st = i(h((e, { windowId: t }) => {
7879
+ let n = be(e, { windowId: t }), r = A(e), i = n.canvases.flatMap((e) => e.imageServiceIds);
7867
7880
  return {
7868
7881
  canvasWorld: n,
7869
- drawAnnotations: D(e).window.forceDrawAnnotations || _(e, {
7882
+ drawAnnotations: O(e).window.forceDrawAnnotations || _(e, {
7870
7883
  content: "annotations",
7871
7884
  windowId: t
7872
7885
  }).length > 0 || _(e, {
@@ -7874,16 +7887,16 @@ var tt = /* @__PURE__ */ l({ default: () => nt }), nt = i(h((e, { windowId: t })
7874
7887
  windowId: t
7875
7888
  }).length > 0,
7876
7889
  infoResponses: i.map((e) => r[e]).filter((e) => e !== void 0 && e.isFetching === !1 && e.error === void 0),
7877
- label: S(e, {
7878
- canvasId: (w(e, { windowId: t }) || {}).id,
7890
+ label: C(e, {
7891
+ canvasId: (T(e, { windowId: t }) || {}).id,
7879
7892
  windowId: t
7880
7893
  }),
7881
- nonTiledImages: E(e, { windowId: t }),
7882
- osdConfig: D(e).osdConfig,
7894
+ nonTiledImages: D(e, { windowId: t }),
7895
+ osdConfig: O(e).osdConfig,
7883
7896
  viewerConfig: f(e, { windowId: t })
7884
7897
  };
7885
- }, { updateViewport: ce }), d("OpenSeadragonViewer"))(et);
7898
+ }, { updateViewport: ce }), d("OpenSeadragonViewer"))(at);
7886
7899
  //#endregion
7887
- export { Je as a, He as c, Ye as i, Ne as l, tt as n, qe as o, et as r, Ge as s, nt as t, ye as u };
7900
+ export { $e as a, qe as c, et as i, Ie as l, ot as n, Qe as o, at as r, Xe as s, st as t, be as u };
7888
7901
 
7889
- //# sourceMappingURL=OpenSeadragonViewer-B_KV5sbU.js.map
7902
+ //# sourceMappingURL=OpenSeadragonViewer-4nw8qaVM.js.map