@annotorious/openseadragon 3.0.13 → 3.0.15

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.
@@ -310,13 +310,13 @@ let mp = (r) => crypto.getRandomValues(new Uint8Array(r)), gp = (r, t, e) => {
310
310
  return (n = t) => {
311
311
  let o = "";
312
312
  for (; ; ) {
313
- let a = e(s), l = s;
313
+ let a = e(s), l = s | 0;
314
314
  for (; l--; )
315
- if (o += r[a[l] & i] || "", o.length === n) return o;
315
+ if (o += r[a[l] & i] || "", o.length >= n) return o;
316
316
  }
317
317
  };
318
- }, yp = (r, t = 21) => gp(r, t, mp), _p = (r = 21) => {
319
- let t = "", e = crypto.getRandomValues(new Uint8Array(r));
318
+ }, yp = (r, t = 21) => gp(r, t | 0, mp), _p = (r = 21) => {
319
+ let t = "", e = crypto.getRandomValues(new Uint8Array(r |= 0));
320
320
  for (; r--; )
321
321
  t += pp[e[r] & 63];
322
322
  return t;
@@ -1074,55 +1074,55 @@ const cm = (r, t) => {
1074
1074
  }
1075
1075
  };
1076
1076
  }, dm = (r) => r.id !== void 0, fm = () => {
1077
- const r = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), e = [], i = (S, R = {}) => {
1078
- e.push({ onChange: S, options: R });
1077
+ const r = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), e = [], i = (S, P = {}) => {
1078
+ e.push({ onChange: S, options: P });
1079
1079
  }, s = (S) => {
1080
- const R = e.findIndex((E) => E.onChange == S);
1081
- R > -1 && e.splice(R, 1);
1082
- }, n = (S, R) => {
1080
+ const P = e.findIndex((E) => E.onChange == S);
1081
+ P > -1 && e.splice(P, 1);
1082
+ }, n = (S, P) => {
1083
1083
  const E = {
1084
1084
  origin: S,
1085
1085
  changes: {
1086
- created: R.created || [],
1087
- updated: R.updated || [],
1088
- deleted: R.deleted || []
1086
+ created: P.created || [],
1087
+ updated: P.updated || [],
1088
+ deleted: P.deleted || []
1089
1089
  },
1090
1090
  state: [...r.values()]
1091
1091
  };
1092
1092
  e.forEach((b) => {
1093
1093
  cm(b, E) && b.onChange(E);
1094
1094
  });
1095
- }, o = (S, R = At.LOCAL) => {
1095
+ }, o = (S, P = At.LOCAL) => {
1096
1096
  if (S.id && r.get(S.id))
1097
1097
  throw Error(`Cannot add annotation ${S.id} - exists already`);
1098
1098
  {
1099
1099
  const E = co(S);
1100
- r.set(E.id, E), E.bodies.forEach((b) => t.set(b.id, E.id)), n(R, { created: [E] });
1100
+ r.set(E.id, E), E.bodies.forEach((b) => t.set(b.id, E.id)), n(P, { created: [E] });
1101
1101
  }
1102
- }, a = (S, R) => {
1103
- const E = co(typeof S == "string" ? R : S), b = typeof S == "string" ? S : S.id, D = b && r.get(b);
1104
- if (D) {
1105
- const F = Ru(D, E);
1106
- return b === E.id ? r.set(b, E) : (r.delete(b), r.set(E.id, E)), D.bodies.forEach((G) => t.delete(G.id)), E.bodies.forEach((G) => t.set(G.id, E.id)), F;
1102
+ }, a = (S, P) => {
1103
+ const E = co(typeof S == "string" ? P : S), b = typeof S == "string" ? S : S.id, B = b && r.get(b);
1104
+ if (B) {
1105
+ const O = Ru(B, E);
1106
+ return b === E.id ? r.set(b, E) : (r.delete(b), r.set(E.id, E)), B.bodies.forEach((G) => t.delete(G.id)), E.bodies.forEach((G) => t.set(G.id, E.id)), O;
1107
1107
  } else
1108
1108
  console.warn(`Cannot update annotation ${b} - does not exist`);
1109
- }, l = (S, R = At.LOCAL, E = At.LOCAL) => {
1110
- const b = dm(R) ? E : R, D = a(S, R);
1111
- D && n(b, { updated: [D] });
1112
- }, h = (S, R = At.LOCAL) => {
1113
- const E = S.reduce((b, D) => {
1114
- const F = a(D);
1115
- return F ? [...b, F] : b;
1109
+ }, l = (S, P = At.LOCAL, E = At.LOCAL) => {
1110
+ const b = dm(P) ? E : P, B = a(S, P);
1111
+ B && n(b, { updated: [B] });
1112
+ }, h = (S, P = At.LOCAL) => {
1113
+ const E = S.reduce((b, B) => {
1114
+ const O = a(B);
1115
+ return O ? [...b, O] : b;
1116
1116
  }, []);
1117
- E.length > 0 && n(R, { updated: E });
1118
- }, c = (S, R = At.LOCAL) => {
1117
+ E.length > 0 && n(P, { updated: E });
1118
+ }, c = (S, P = At.LOCAL) => {
1119
1119
  const E = r.get(S.annotation);
1120
1120
  if (E) {
1121
1121
  const b = {
1122
1122
  ...E,
1123
1123
  bodies: [...E.bodies, S]
1124
1124
  };
1125
- r.set(E.id, b), t.set(S.id, b.id), n(R, { updated: [{
1125
+ r.set(E.id, b), t.set(S.id, b.id), n(P, { updated: [{
1126
1126
  oldValue: E,
1127
1127
  newValue: b,
1128
1128
  bodiesCreated: [S]
@@ -1130,52 +1130,52 @@ const cm = (r, t) => {
1130
1130
  } else
1131
1131
  console.warn(`Attempt to add body to missing annotation: ${S.annotation}`);
1132
1132
  }, u = () => [...r.values()], d = (S = At.LOCAL) => {
1133
- const R = [...r.values()];
1134
- r.clear(), t.clear(), n(S, { deleted: R });
1135
- }, f = (S, R = !0, E = At.LOCAL) => {
1133
+ const P = [...r.values()];
1134
+ r.clear(), t.clear(), n(S, { deleted: P });
1135
+ }, f = (S, P = !0, E = At.LOCAL) => {
1136
1136
  const b = S.map(co);
1137
- if (R) {
1138
- const D = [...r.values()];
1139
- r.clear(), t.clear(), b.forEach((F) => {
1140
- r.set(F.id, F), F.bodies.forEach((G) => t.set(G.id, F.id));
1141
- }), n(E, { created: b, deleted: D });
1137
+ if (P) {
1138
+ const B = [...r.values()];
1139
+ r.clear(), t.clear(), b.forEach((O) => {
1140
+ r.set(O.id, O), O.bodies.forEach((G) => t.set(G.id, O.id));
1141
+ }), n(E, { created: b, deleted: B });
1142
1142
  } else {
1143
- const D = S.reduce((F, G) => {
1143
+ const B = S.reduce((O, G) => {
1144
1144
  const $ = G.id && r.get(G.id);
1145
- return $ ? [...F, $] : F;
1145
+ return $ ? [...O, $] : O;
1146
1146
  }, []);
1147
- if (D.length > 0)
1148
- throw Error(`Bulk insert would overwrite the following annotations: ${D.map((F) => F.id).join(", ")}`);
1149
- b.forEach((F) => {
1150
- r.set(F.id, F), F.bodies.forEach((G) => t.set(G.id, F.id));
1147
+ if (B.length > 0)
1148
+ throw Error(`Bulk insert would overwrite the following annotations: ${B.map((O) => O.id).join(", ")}`);
1149
+ b.forEach((O) => {
1150
+ r.set(O.id, O), O.bodies.forEach((G) => t.set(G.id, O.id));
1151
1151
  }), n(E, { created: b });
1152
1152
  }
1153
1153
  }, p = (S) => {
1154
- const R = typeof S == "string" ? S : S.id, E = r.get(R);
1154
+ const P = typeof S == "string" ? S : S.id, E = r.get(P);
1155
1155
  if (E)
1156
- return r.delete(R), E.bodies.forEach((b) => t.delete(b.id)), E;
1157
- console.warn(`Attempt to delete missing annotation: ${R}`);
1158
- }, m = (S, R = At.LOCAL) => {
1156
+ return r.delete(P), E.bodies.forEach((b) => t.delete(b.id)), E;
1157
+ console.warn(`Attempt to delete missing annotation: ${P}`);
1158
+ }, m = (S, P = At.LOCAL) => {
1159
1159
  const E = p(S);
1160
- E && n(R, { deleted: [E] });
1161
- }, _ = (S, R = At.LOCAL) => {
1162
- const E = S.reduce((b, D) => {
1163
- const F = p(D);
1164
- return F ? [...b, F] : b;
1160
+ E && n(P, { deleted: [E] });
1161
+ }, _ = (S, P = At.LOCAL) => {
1162
+ const E = S.reduce((b, B) => {
1163
+ const O = p(B);
1164
+ return O ? [...b, O] : b;
1165
1165
  }, []);
1166
- E.length > 0 && n(R, { deleted: E });
1166
+ E.length > 0 && n(P, { deleted: E });
1167
1167
  }, y = (S) => {
1168
- const R = r.get(S.annotation);
1169
- if (R) {
1170
- const E = R.bodies.find((b) => b.id === S.id);
1168
+ const P = r.get(S.annotation);
1169
+ if (P) {
1170
+ const E = P.bodies.find((b) => b.id === S.id);
1171
1171
  if (E) {
1172
1172
  t.delete(E.id);
1173
1173
  const b = {
1174
- ...R,
1175
- bodies: R.bodies.filter((D) => D.id !== S.id)
1174
+ ...P,
1175
+ bodies: P.bodies.filter((B) => B.id !== S.id)
1176
1176
  };
1177
- return r.set(R.id, b), {
1178
- oldValue: R,
1177
+ return r.set(P.id, b), {
1178
+ oldValue: P,
1179
1179
  newValue: b,
1180
1180
  bodiesDeleted: [E]
1181
1181
  };
@@ -1183,61 +1183,61 @@ const cm = (r, t) => {
1183
1183
  console.warn(`Attempt to delete missing body ${S.id} from annotation ${S.annotation}`);
1184
1184
  } else
1185
1185
  console.warn(`Attempt to delete body from missing annotation ${S.annotation}`);
1186
- }, x = (S, R = At.LOCAL) => {
1186
+ }, x = (S, P = At.LOCAL) => {
1187
1187
  const E = y(S);
1188
- E && n(R, { updated: [E] });
1189
- }, g = (S, R = At.LOCAL) => {
1188
+ E && n(P, { updated: [E] });
1189
+ }, g = (S, P = At.LOCAL) => {
1190
1190
  const E = S.map((b) => y(b)).filter(Boolean);
1191
- E.length > 0 && n(R, { updated: E });
1191
+ E.length > 0 && n(P, { updated: E });
1192
1192
  }, v = (S) => {
1193
- const R = r.get(S);
1194
- return R ? { ...R } : void 0;
1193
+ const P = r.get(S);
1194
+ return P ? { ...P } : void 0;
1195
1195
  }, w = (S) => {
1196
- const R = t.get(S);
1197
- if (R) {
1198
- const E = v(R).bodies.find((b) => b.id === S);
1196
+ const P = t.get(S);
1197
+ if (P) {
1198
+ const E = v(P).bodies.find((b) => b.id === S);
1199
1199
  if (E)
1200
1200
  return E;
1201
1201
  console.error(`Store integrity error: body ${S} in index, but not in annotation`);
1202
1202
  } else
1203
1203
  console.warn(`Attempt to retrieve missing body: ${S}`);
1204
- }, I = (S, R) => {
1205
- if (S.annotation !== R.annotation)
1204
+ }, I = (S, P) => {
1205
+ if (S.annotation !== P.annotation)
1206
1206
  throw "Annotation integrity violation: annotation ID must be the same when updating bodies";
1207
1207
  const E = r.get(S.annotation);
1208
1208
  if (E) {
1209
- const b = E.bodies.find((F) => F.id === S.id), D = {
1209
+ const b = E.bodies.find((O) => O.id === S.id), B = {
1210
1210
  ...E,
1211
- bodies: E.bodies.map((F) => F.id === b.id ? R : F)
1211
+ bodies: E.bodies.map((O) => O.id === b.id ? P : O)
1212
1212
  };
1213
- return r.set(E.id, D), b.id !== R.id && (t.delete(b.id), t.set(R.id, D.id)), {
1213
+ return r.set(E.id, B), b.id !== P.id && (t.delete(b.id), t.set(P.id, B.id)), {
1214
1214
  oldValue: E,
1215
- newValue: D,
1216
- bodiesUpdated: [{ oldBody: b, newBody: R }]
1215
+ newValue: B,
1216
+ bodiesUpdated: [{ oldBody: b, newBody: P }]
1217
1217
  };
1218
1218
  } else
1219
1219
  console.warn(`Attempt to add body to missing annotation ${S.annotation}`);
1220
- }, A = (S, R, E = At.LOCAL) => {
1221
- const b = I(S, R);
1220
+ }, A = (S, P, E = At.LOCAL) => {
1221
+ const b = I(S, P);
1222
1222
  b && n(E, { updated: [b] });
1223
- }, C = (S, R = At.LOCAL) => {
1223
+ }, C = (S, P = At.LOCAL) => {
1224
1224
  const E = S.map((b) => I({ id: b.id, annotation: b.annotation }, b)).filter(Boolean);
1225
- n(R, { updated: E });
1225
+ n(P, { updated: E });
1226
1226
  }, N = (S) => {
1227
- const R = r.get(S.annotation);
1228
- if (R) {
1227
+ const P = r.get(S.annotation);
1228
+ if (P) {
1229
1229
  const E = {
1230
- ...R,
1230
+ ...P,
1231
1231
  target: {
1232
- ...R.target,
1232
+ ...P.target,
1233
1233
  ...S
1234
1234
  }
1235
1235
  };
1236
- return r.set(R.id, E), {
1237
- oldValue: R,
1236
+ return r.set(P.id, E), {
1237
+ oldValue: P,
1238
1238
  newValue: E,
1239
1239
  targetUpdated: {
1240
- oldTarget: R.target,
1240
+ oldTarget: P.target,
1241
1241
  newTarget: S
1242
1242
  }
1243
1243
  };
@@ -1253,9 +1253,9 @@ const cm = (r, t) => {
1253
1253
  bulkDeleteBodies: g,
1254
1254
  bulkUpdateAnnotation: h,
1255
1255
  bulkUpdateBodies: C,
1256
- bulkUpdateTargets: (S, R = At.LOCAL) => {
1256
+ bulkUpdateTargets: (S, P = At.LOCAL) => {
1257
1257
  const E = S.map((b) => N(b)).filter(Boolean);
1258
- E.length > 0 && n(R, { updated: E });
1258
+ E.length > 0 && n(P, { updated: E });
1259
1259
  },
1260
1260
  clear: d,
1261
1261
  deleteAnnotation: m,
@@ -1266,9 +1266,9 @@ const cm = (r, t) => {
1266
1266
  unobserve: s,
1267
1267
  updateAnnotation: l,
1268
1268
  updateBody: A,
1269
- updateTarget: (S, R = At.LOCAL) => {
1269
+ updateTarget: (S, P = At.LOCAL) => {
1270
1270
  const E = N(S);
1271
- E && n(R, { updated: [E] });
1271
+ E && n(P, { updated: [E] });
1272
1272
  }
1273
1273
  };
1274
1274
  }, pm = (r) => ({
@@ -1498,13 +1498,13 @@ let Em = (r) => crypto.getRandomValues(new Uint8Array(r)), Tm = (r, t, e) => {
1498
1498
  return (n = t) => {
1499
1499
  let o = "";
1500
1500
  for (; ; ) {
1501
- let a = e(s), l = s;
1501
+ let a = e(s), l = s | 0;
1502
1502
  for (; l--; )
1503
- if (o += r[a[l] & i] || "", o.length === n) return o;
1503
+ if (o += r[a[l] & i] || "", o.length >= n) return o;
1504
1504
  }
1505
1505
  };
1506
- }, Am = (r, t = 21) => Tm(r, t, Em), Sm = (r = 21) => {
1507
- let t = "", e = crypto.getRandomValues(new Uint8Array(r));
1506
+ }, Am = (r, t = 21) => Tm(r, t | 0, Em), Sm = (r = 21) => {
1507
+ let t = "", e = crypto.getRandomValues(new Uint8Array(r |= 0));
1508
1508
  for (; r--; )
1509
1509
  t += wm[e[r] & 63];
1510
1510
  return t;
@@ -2160,8 +2160,8 @@ class Yi extends fe {
2160
2160
  }
2161
2161
  }
2162
2162
  function Vm(r) {
2163
- let t, e, i, s, n, o, a, l, h, c, u, d, f, p, m, _, y, x, g, v, w, I, A, C, N, S, R, E, b, D, F, G, $, M, K, P, U, j, et, Q, H, X, lt;
2164
- return M = new Yi({
2163
+ let t, e, i, s, n, o, a, l, h, c, u, d, f, p, m, _, y, x, g, v, w, I, A, C, N, S, P, E, b, B, O, G, $, F, Q, R, U, z, et, J, H, X, lt;
2164
+ return F = new Yi({
2165
2165
  props: {
2166
2166
  class: "a9s-corner-handle-topleft",
2167
2167
  x: (
@@ -2177,12 +2177,12 @@ function Vm(r) {
2177
2177
  r[3]
2178
2178
  )
2179
2179
  }
2180
- }), M.$on("pointerdown", function() {
2180
+ }), F.$on("pointerdown", function() {
2181
2181
  Nt(
2182
2182
  /*grab*/
2183
2183
  r[9]("TOP_LEFT")
2184
2184
  ) && r[9]("TOP_LEFT").apply(this, arguments);
2185
- }), P = new Yi({
2185
+ }), R = new Yi({
2186
2186
  props: {
2187
2187
  class: "a9s-corner-handle-topright",
2188
2188
  x: (
@@ -2199,12 +2199,12 @@ function Vm(r) {
2199
2199
  r[3]
2200
2200
  )
2201
2201
  }
2202
- }), P.$on("pointerdown", function() {
2202
+ }), R.$on("pointerdown", function() {
2203
2203
  Nt(
2204
2204
  /*grab*/
2205
2205
  r[9]("TOP_RIGHT")
2206
2206
  ) && r[9]("TOP_RIGHT").apply(this, arguments);
2207
- }), j = new Yi({
2207
+ }), z = new Yi({
2208
2208
  props: {
2209
2209
  class: "a9s-corner-handle-bottomright",
2210
2210
  x: (
@@ -2222,12 +2222,12 @@ function Vm(r) {
2222
2222
  r[3]
2223
2223
  )
2224
2224
  }
2225
- }), j.$on("pointerdown", function() {
2225
+ }), z.$on("pointerdown", function() {
2226
2226
  Nt(
2227
2227
  /*grab*/
2228
2228
  r[9]("BOTTOM_RIGHT")
2229
2229
  ) && r[9]("BOTTOM_RIGHT").apply(this, arguments);
2230
- }), Q = new Yi({
2230
+ }), J = new Yi({
2231
2231
  props: {
2232
2232
  class: "a9s-corner-handle-bottomleft",
2233
2233
  x: (
@@ -2244,14 +2244,14 @@ function Vm(r) {
2244
2244
  r[3]
2245
2245
  )
2246
2246
  }
2247
- }), Q.$on("pointerdown", function() {
2247
+ }), J.$on("pointerdown", function() {
2248
2248
  Nt(
2249
2249
  /*grab*/
2250
2250
  r[9]("BOTTOM_LEFT")
2251
2251
  ) && r[9]("BOTTOM_LEFT").apply(this, arguments);
2252
2252
  }), {
2253
2253
  c() {
2254
- t = yt("rect"), a = _e(), l = yt("rect"), f = _e(), p = yt("rect"), x = _e(), g = yt("rect"), A = _e(), C = yt("rect"), E = _e(), b = yt("rect"), $ = _e(), he(M.$$.fragment), K = _e(), he(P.$$.fragment), U = _e(), he(j.$$.fragment), et = _e(), he(Q.$$.fragment), T(t, "class", "a9s-outer"), T(t, "style", e = /*computedStyle*/
2254
+ t = yt("rect"), a = _e(), l = yt("rect"), f = _e(), p = yt("rect"), x = _e(), g = yt("rect"), A = _e(), C = yt("rect"), E = _e(), b = yt("rect"), $ = _e(), he(F.$$.fragment), Q = _e(), he(R.$$.fragment), U = _e(), he(z.$$.fragment), et = _e(), he(J.$$.fragment), T(t, "class", "a9s-outer"), T(t, "style", e = /*computedStyle*/
2255
2255
  r[1] ? "display:none;" : void 0), T(t, "x", i = /*geom*/
2256
2256
  r[4].x), T(t, "y", s = /*geom*/
2257
2257
  r[4].y), T(t, "width", n = /*geom*/
@@ -2275,14 +2275,14 @@ function Vm(r) {
2275
2275
  r[4].h), T(g, "width", 1), T(C, "class", "a9s-edge-handle a9s-edge-handle-bottom"), T(C, "x", N = /*geom*/
2276
2276
  r[4].x), T(C, "y", S = /*geom*/
2277
2277
  r[4].y + /*geom*/
2278
- r[4].h), T(C, "height", 1), T(C, "width", R = /*geom*/
2279
- r[4].w), T(b, "class", "a9s-edge-handle a9s-edge-handle-left"), T(b, "x", D = /*geom*/
2280
- r[4].x), T(b, "y", F = /*geom*/
2278
+ r[4].h), T(C, "height", 1), T(C, "width", P = /*geom*/
2279
+ r[4].w), T(b, "class", "a9s-edge-handle a9s-edge-handle-left"), T(b, "x", B = /*geom*/
2280
+ r[4].x), T(b, "y", O = /*geom*/
2281
2281
  r[4].y), T(b, "height", G = /*geom*/
2282
2282
  r[4].h), T(b, "width", 1);
2283
2283
  },
2284
- m(L, O) {
2285
- it(L, t, O), it(L, a, O), it(L, l, O), it(L, f, O), it(L, p, O), it(L, x, O), it(L, g, O), it(L, A, O), it(L, C, O), it(L, E, O), it(L, b, O), it(L, $, O), ie(M, L, O), it(L, K, O), ie(P, L, O), it(L, U, O), ie(j, L, O), it(L, et, O), ie(Q, L, O), H = !0, X || (lt = [
2284
+ m(L, D) {
2285
+ it(L, t, D), it(L, a, D), it(L, l, D), it(L, f, D), it(L, p, D), it(L, x, D), it(L, g, D), it(L, A, D), it(L, C, D), it(L, E, D), it(L, b, D), it(L, $, D), ie(F, L, D), it(L, Q, D), ie(R, L, D), it(L, U, D), ie(z, L, D), it(L, et, D), ie(J, L, D), H = !0, X || (lt = [
2286
2286
  Dt(t, "pointerdown", function() {
2287
2287
  Nt(
2288
2288
  /*grab*/
@@ -2321,103 +2321,103 @@ function Vm(r) {
2321
2321
  })
2322
2322
  ], X = !0);
2323
2323
  },
2324
- p(L, O) {
2325
- r = L, (!H || O & /*computedStyle*/
2324
+ p(L, D) {
2325
+ r = L, (!H || D & /*computedStyle*/
2326
2326
  2 && e !== (e = /*computedStyle*/
2327
- r[1] ? "display:none;" : void 0)) && T(t, "style", e), (!H || O & /*geom*/
2327
+ r[1] ? "display:none;" : void 0)) && T(t, "style", e), (!H || D & /*geom*/
2328
2328
  16 && i !== (i = /*geom*/
2329
- r[4].x)) && T(t, "x", i), (!H || O & /*geom*/
2329
+ r[4].x)) && T(t, "x", i), (!H || D & /*geom*/
2330
2330
  16 && s !== (s = /*geom*/
2331
- r[4].y)) && T(t, "y", s), (!H || O & /*geom*/
2331
+ r[4].y)) && T(t, "y", s), (!H || D & /*geom*/
2332
2332
  16 && n !== (n = /*geom*/
2333
- r[4].w)) && T(t, "width", n), (!H || O & /*geom*/
2333
+ r[4].w)) && T(t, "width", n), (!H || D & /*geom*/
2334
2334
  16 && o !== (o = /*geom*/
2335
- r[4].h)) && T(t, "height", o), (!H || O & /*computedStyle*/
2335
+ r[4].h)) && T(t, "height", o), (!H || D & /*computedStyle*/
2336
2336
  2) && T(
2337
2337
  l,
2338
2338
  "style",
2339
2339
  /*computedStyle*/
2340
2340
  r[1]
2341
- ), (!H || O & /*geom*/
2341
+ ), (!H || D & /*geom*/
2342
2342
  16 && h !== (h = /*geom*/
2343
- r[4].x)) && T(l, "x", h), (!H || O & /*geom*/
2343
+ r[4].x)) && T(l, "x", h), (!H || D & /*geom*/
2344
2344
  16 && c !== (c = /*geom*/
2345
- r[4].y)) && T(l, "y", c), (!H || O & /*geom*/
2345
+ r[4].y)) && T(l, "y", c), (!H || D & /*geom*/
2346
2346
  16 && u !== (u = /*geom*/
2347
- r[4].w)) && T(l, "width", u), (!H || O & /*geom*/
2347
+ r[4].w)) && T(l, "width", u), (!H || D & /*geom*/
2348
2348
  16 && d !== (d = /*geom*/
2349
- r[4].h)) && T(l, "height", d), (!H || O & /*geom*/
2349
+ r[4].h)) && T(l, "height", d), (!H || D & /*geom*/
2350
2350
  16 && m !== (m = /*geom*/
2351
- r[4].x)) && T(p, "x", m), (!H || O & /*geom*/
2351
+ r[4].x)) && T(p, "x", m), (!H || D & /*geom*/
2352
2352
  16 && _ !== (_ = /*geom*/
2353
- r[4].y)) && T(p, "y", _), (!H || O & /*geom*/
2353
+ r[4].y)) && T(p, "y", _), (!H || D & /*geom*/
2354
2354
  16 && y !== (y = /*geom*/
2355
- r[4].w)) && T(p, "width", y), (!H || O & /*geom*/
2355
+ r[4].w)) && T(p, "width", y), (!H || D & /*geom*/
2356
2356
  16 && v !== (v = /*geom*/
2357
2357
  r[4].x + /*geom*/
2358
- r[4].w)) && T(g, "x", v), (!H || O & /*geom*/
2358
+ r[4].w)) && T(g, "x", v), (!H || D & /*geom*/
2359
2359
  16 && w !== (w = /*geom*/
2360
- r[4].y)) && T(g, "y", w), (!H || O & /*geom*/
2360
+ r[4].y)) && T(g, "y", w), (!H || D & /*geom*/
2361
2361
  16 && I !== (I = /*geom*/
2362
- r[4].h)) && T(g, "height", I), (!H || O & /*geom*/
2362
+ r[4].h)) && T(g, "height", I), (!H || D & /*geom*/
2363
2363
  16 && N !== (N = /*geom*/
2364
- r[4].x)) && T(C, "x", N), (!H || O & /*geom*/
2364
+ r[4].x)) && T(C, "x", N), (!H || D & /*geom*/
2365
2365
  16 && S !== (S = /*geom*/
2366
2366
  r[4].y + /*geom*/
2367
- r[4].h)) && T(C, "y", S), (!H || O & /*geom*/
2368
- 16 && R !== (R = /*geom*/
2369
- r[4].w)) && T(C, "width", R), (!H || O & /*geom*/
2370
- 16 && D !== (D = /*geom*/
2371
- r[4].x)) && T(b, "x", D), (!H || O & /*geom*/
2372
- 16 && F !== (F = /*geom*/
2373
- r[4].y)) && T(b, "y", F), (!H || O & /*geom*/
2367
+ r[4].h)) && T(C, "y", S), (!H || D & /*geom*/
2368
+ 16 && P !== (P = /*geom*/
2369
+ r[4].w)) && T(C, "width", P), (!H || D & /*geom*/
2370
+ 16 && B !== (B = /*geom*/
2371
+ r[4].x)) && T(b, "x", B), (!H || D & /*geom*/
2372
+ 16 && O !== (O = /*geom*/
2373
+ r[4].y)) && T(b, "y", O), (!H || D & /*geom*/
2374
2374
  16 && G !== (G = /*geom*/
2375
2375
  r[4].h)) && T(b, "height", G);
2376
2376
  const _t = {};
2377
- O & /*geom*/
2377
+ D & /*geom*/
2378
2378
  16 && (_t.x = /*geom*/
2379
- r[4].x), O & /*geom*/
2379
+ r[4].x), D & /*geom*/
2380
2380
  16 && (_t.y = /*geom*/
2381
- r[4].y), O & /*viewportScale*/
2381
+ r[4].y), D & /*viewportScale*/
2382
2382
  8 && (_t.scale = /*viewportScale*/
2383
- r[3]), M.$set(_t);
2383
+ r[3]), F.$set(_t);
2384
2384
  const ht = {};
2385
- O & /*geom*/
2385
+ D & /*geom*/
2386
2386
  16 && (ht.x = /*geom*/
2387
2387
  r[4].x + /*geom*/
2388
- r[4].w), O & /*geom*/
2388
+ r[4].w), D & /*geom*/
2389
2389
  16 && (ht.y = /*geom*/
2390
- r[4].y), O & /*viewportScale*/
2390
+ r[4].y), D & /*viewportScale*/
2391
2391
  8 && (ht.scale = /*viewportScale*/
2392
- r[3]), P.$set(ht);
2392
+ r[3]), R.$set(ht);
2393
2393
  const vt = {};
2394
- O & /*geom*/
2394
+ D & /*geom*/
2395
2395
  16 && (vt.x = /*geom*/
2396
2396
  r[4].x + /*geom*/
2397
- r[4].w), O & /*geom*/
2397
+ r[4].w), D & /*geom*/
2398
2398
  16 && (vt.y = /*geom*/
2399
2399
  r[4].y + /*geom*/
2400
- r[4].h), O & /*viewportScale*/
2400
+ r[4].h), D & /*viewportScale*/
2401
2401
  8 && (vt.scale = /*viewportScale*/
2402
- r[3]), j.$set(vt);
2402
+ r[3]), z.$set(vt);
2403
2403
  const xt = {};
2404
- O & /*geom*/
2404
+ D & /*geom*/
2405
2405
  16 && (xt.x = /*geom*/
2406
- r[4].x), O & /*geom*/
2406
+ r[4].x), D & /*geom*/
2407
2407
  16 && (xt.y = /*geom*/
2408
2408
  r[4].y + /*geom*/
2409
- r[4].h), O & /*viewportScale*/
2409
+ r[4].h), D & /*viewportScale*/
2410
2410
  8 && (xt.scale = /*viewportScale*/
2411
- r[3]), Q.$set(xt);
2411
+ r[3]), J.$set(xt);
2412
2412
  },
2413
2413
  i(L) {
2414
- H || (ot(M.$$.fragment, L), ot(P.$$.fragment, L), ot(j.$$.fragment, L), ot(Q.$$.fragment, L), H = !0);
2414
+ H || (ot(F.$$.fragment, L), ot(R.$$.fragment, L), ot(z.$$.fragment, L), ot(J.$$.fragment, L), H = !0);
2415
2415
  },
2416
2416
  o(L) {
2417
- mt(M.$$.fragment, L), mt(P.$$.fragment, L), mt(j.$$.fragment, L), mt(Q.$$.fragment, L), H = !1;
2417
+ mt(F.$$.fragment, L), mt(R.$$.fragment, L), mt(z.$$.fragment, L), mt(J.$$.fragment, L), H = !1;
2418
2418
  },
2419
2419
  d(L) {
2420
- L && (rt(t), rt(a), rt(l), rt(f), rt(p), rt(x), rt(g), rt(A), rt(C), rt(E), rt(b), rt($), rt(K), rt(U), rt(et)), se(M, L), se(P, L), se(j, L), se(Q, L), X = !1, ze(lt);
2420
+ L && (rt(t), rt(a), rt(l), rt(f), rt(p), rt(x), rt(g), rt(A), rt(C), rt(E), rt(b), rt($), rt(Q), rt(U), rt(et)), se(F, L), se(R, L), se(z, L), se(J, L), X = !1, ze(lt);
2421
2421
  }
2422
2422
  };
2423
2423
  }
@@ -4169,19 +4169,19 @@ function Rg(r, t, e) {
4169
4169
  r.$$.on_destroy.push(() => p());
4170
4170
  let { drawingEnabled: _ } = t, { image: y } = t, { preferredDrawingMode: x } = t, { state: g } = t, { style: v = void 0 } = t, { toolName: w = $n()[0] } = t, { user: I } = t, { visible: A = !0 } = t;
4171
4171
  const C = () => w, N = () => _;
4172
- let S, R, E;
4173
- xs(() => m(e(6, E = km(y, R))));
4174
- const { hover: b, selection: D, store: F } = g;
4175
- so(r, b, (X) => e(14, c = X)), so(r, D, (X) => e(31, u = X)), so(r, F, (X) => e(15, d = X));
4172
+ let S, P, E;
4173
+ xs(() => m(e(6, E = km(y, P))));
4174
+ const { hover: b, selection: B, store: O } = g;
4175
+ so(r, b, (X) => e(14, c = X)), so(r, B, (X) => e(31, u = X)), so(r, O, (X) => e(15, d = X));
4176
4176
  let G, $;
4177
- const M = (X) => {
4178
- G && F.unobserve(G);
4177
+ const F = (X) => {
4178
+ G && O.unobserve(G);
4179
4179
  const lt = X.filter(({ editable: L }) => L).map(({ id: L }) => L);
4180
- lt.length > 0 ? (e(7, $ = lt.map((L) => F.getAnnotation(L)).filter((L) => L && ir(L))), G = (L) => {
4181
- const { updated: O } = L.changes;
4182
- e(7, $ = O == null ? void 0 : O.map((_t) => _t.newValue));
4183
- }, F.observe(G, { annotations: lt })) : e(7, $ = void 0);
4184
- }, K = (X) => {
4180
+ lt.length > 0 ? (e(7, $ = lt.map((L) => O.getAnnotation(L)).filter((L) => L && ir(L))), G = (L) => {
4181
+ const { updated: D } = L.changes;
4182
+ e(7, $ = D == null ? void 0 : D.map((_t) => _t.newValue));
4183
+ }, O.observe(G, { annotations: lt })) : e(7, $ = void 0);
4184
+ }, Q = (X) => {
4185
4185
  const lt = Iu(), L = {
4186
4186
  id: lt,
4187
4187
  bodies: [],
@@ -4192,29 +4192,29 @@ function Rg(r, t, e) {
4192
4192
  created: /* @__PURE__ */ new Date()
4193
4193
  }
4194
4194
  };
4195
- F.addAnnotation(L), D.setSelected(L.id);
4196
- }, P = (X) => (lt) => {
4195
+ O.addAnnotation(L), B.setSelected(L.id);
4196
+ }, R = (X) => (lt) => {
4197
4197
  var L;
4198
- const { target: O } = X, _t = 10 * 60 * 1e3, ht = ((L = O.creator) == null ? void 0 : L.id) !== I.id || !O.created || (/* @__PURE__ */ new Date()).getTime() - O.created.getTime() > _t;
4199
- F.updateTarget({
4200
- ...O,
4198
+ const { target: D } = X, _t = 10 * 60 * 1e3, ht = ((L = D.creator) == null ? void 0 : L.id) !== I.id || !D.created || (/* @__PURE__ */ new Date()).getTime() - D.created.getTime() > _t;
4199
+ O.updateTarget({
4200
+ ...D,
4201
4201
  selector: lt.detail,
4202
- created: ht ? O.created : /* @__PURE__ */ new Date(),
4202
+ created: ht ? D.created : /* @__PURE__ */ new Date(),
4203
4203
  updated: ht ? /* @__PURE__ */ new Date() : void 0,
4204
4204
  updatedBy: ht ? I : void 0
4205
4205
  });
4206
4206
  }, U = (X) => {
4207
- const { x: lt, y: L } = Nu(X, R), O = F.getAt(lt, L);
4208
- O ? c !== O.id && b.set(O.id) : b.set(void 0);
4209
- }, j = (X) => Du(X), et = (X) => ir(X);
4210
- function Q(X) {
4207
+ const { x: lt, y: L } = Nu(X, P), D = O.getAt(lt, L);
4208
+ D ? c !== D.id && b.set(D.id) : b.set(void 0);
4209
+ }, z = (X) => Du(X), et = (X) => ir(X);
4210
+ function J(X) {
4211
4211
  gn[X ? "unshift" : "push"](() => {
4212
4212
  S = X, e(5, S);
4213
4213
  });
4214
4214
  }
4215
4215
  function H(X) {
4216
4216
  gn[X ? "unshift" : "push"](() => {
4217
- R = X, e(4, R);
4217
+ P = X, e(4, P);
4218
4218
  });
4219
4219
  }
4220
4220
  return r.$$set = (X) => {
@@ -4223,16 +4223,16 @@ function Rg(r, t, e) {
4223
4223
  r.$$.dirty[0] & /*toolName*/
4224
4224
  4 && e(13, { tool: i, opts: s } = Hn(w) || { tool: void 0, opts: void 0 }, i, (e(30, s), e(2, w))), r.$$.dirty[0] & /*opts, preferredDrawingMode*/
4225
4225
  1107296256 && e(12, n = (s == null ? void 0 : s.drawingMode) || x), r.$$.dirty[0] & /*svgEl*/
4226
- 16 && e(11, o = xg(R)), r.$$.dirty[0] & /*svgEl*/
4227
- 16 && e(10, { onPointerDown: a, onPointerUp: l } = wg(R, F), a, (e(9, l), e(4, R))), r.$$.dirty[1] & /*$selection*/
4226
+ 16 && e(11, o = xg(P)), r.$$.dirty[0] & /*svgEl*/
4227
+ 16 && e(10, { onPointerDown: a, onPointerUp: l } = wg(P, O), a, (e(9, l), e(4, P))), r.$$.dirty[1] & /*$selection*/
4228
4228
  1 && e(8, h = (X) => u.selected.find((lt) => lt.id === X.id && lt.editable)), r.$$.dirty[1] & /*$selection*/
4229
- 1 && M(u.selected);
4229
+ 1 && F(u.selected);
4230
4230
  }, [
4231
4231
  _,
4232
4232
  v,
4233
4233
  w,
4234
4234
  A,
4235
- R,
4235
+ P,
4236
4236
  S,
4237
4237
  E,
4238
4238
  $,
@@ -4246,12 +4246,12 @@ function Rg(r, t, e) {
4246
4246
  d,
4247
4247
  f,
4248
4248
  b,
4249
- D,
4250
- F,
4251
- K,
4252
- P,
4249
+ B,
4250
+ O,
4251
+ Q,
4252
+ R,
4253
4253
  U,
4254
- j,
4254
+ z,
4255
4255
  y,
4256
4256
  x,
4257
4257
  g,
@@ -4261,7 +4261,7 @@ function Rg(r, t, e) {
4261
4261
  s,
4262
4262
  u,
4263
4263
  et,
4264
- Q,
4264
+ J,
4265
4265
  H
4266
4266
  ];
4267
4267
  }
@@ -4703,14 +4703,14 @@ const Ug = () => {
4703
4703
  }
4704
4704
  });
4705
4705
  d.$on("click", (E) => {
4706
- const { originalEvent: b, annotation: D } = E.detail;
4707
- D ? n.userSelect(D.id, b) : n.isEmpty() || n.clear();
4706
+ const { originalEvent: b, annotation: B } = E.detail;
4707
+ B ? n.userSelect(B.id, b) : n.isEmpty() || n.clear();
4708
4708
  });
4709
4709
  const f = bm(s, a, i.adapter), p = () => {
4710
4710
  d.$set({ drawingEnabled: !1 }), setTimeout(() => d.$set({ drawingEnabled: !0 }), 1);
4711
4711
  }, m = () => {
4712
4712
  d.$destroy(), h.parentNode.insertBefore(e, h), h.parentNode.removeChild(h), c.destroy(), a.destroy();
4713
- }, _ = () => d.getDrawingTool(), y = () => u, x = () => d.isDrawingEnabled(), g = (E, b, D) => Lu(E, b, D), v = (E, b) => Ou(E, b), w = (E) => {
4713
+ }, _ = () => d.getDrawingTool(), y = () => u, x = () => d.isDrawingEnabled(), g = (E, b, B) => Lu(E, b, B), v = (E, b) => Ou(E, b), w = (E) => {
4714
4714
  if (!Hn(E))
4715
4715
  throw `No drawing tool named ${E}`;
4716
4716
  d.$set({ toolName: E });
@@ -4718,7 +4718,7 @@ const Ug = () => {
4718
4718
  console.warn("Filter not implemented yet");
4719
4719
  }, C = (E) => d.$set({ style: E }), N = (E) => dh(e, h, E), S = (E) => {
4720
4720
  u = E, d.$set({ user: E });
4721
- }, R = (E) => (
4721
+ }, P = (E) => (
4722
4722
  // @ts-ignore
4723
4723
  d.$set({ visible: E })
4724
4724
  );
@@ -4740,7 +4740,7 @@ const Ug = () => {
4740
4740
  setStyle: C,
4741
4741
  setTheme: N,
4742
4742
  setUser: S,
4743
- setVisible: R,
4743
+ setVisible: P,
4744
4744
  element: h,
4745
4745
  state: s
4746
4746
  };
@@ -4863,7 +4863,7 @@ function cr() {
4863
4863
  function zt(r, t, e, i) {
4864
4864
  return r.addEventListener(t, e, i), () => r.removeEventListener(t, e, i);
4865
4865
  }
4866
- function B(r, t, e) {
4866
+ function M(r, t, e) {
4867
4867
  e == null ? r.removeAttribute(t) : r.getAttribute(t) !== e && r.setAttribute(t, e);
4868
4868
  }
4869
4869
  function Vg(r) {
@@ -5093,7 +5093,7 @@ class ae {
5093
5093
  }
5094
5094
  const Qg = "4";
5095
5095
  typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Qg);
5096
- var Yr = /* @__PURE__ */ ((r) => (r[r.WEBGL_LEGACY = 0] = "WEBGL_LEGACY", r[r.WEBGL = 1] = "WEBGL", r[r.WEBGL2 = 2] = "WEBGL2", r))(Yr || {}), Ku = /* @__PURE__ */ ((r) => (r[r.UNKNOWN = 0] = "UNKNOWN", r[r.WEBGL = 1] = "WEBGL", r[r.CANVAS = 2] = "CANVAS", r))(Ku || {}), fa = /* @__PURE__ */ ((r) => (r[r.COLOR = 16384] = "COLOR", r[r.DEPTH = 256] = "DEPTH", r[r.STENCIL = 1024] = "STENCIL", r))(fa || {}), tt = /* @__PURE__ */ ((r) => (r[r.NORMAL = 0] = "NORMAL", r[r.ADD = 1] = "ADD", r[r.MULTIPLY = 2] = "MULTIPLY", r[r.SCREEN = 3] = "SCREEN", r[r.OVERLAY = 4] = "OVERLAY", r[r.DARKEN = 5] = "DARKEN", r[r.LIGHTEN = 6] = "LIGHTEN", r[r.COLOR_DODGE = 7] = "COLOR_DODGE", r[r.COLOR_BURN = 8] = "COLOR_BURN", r[r.HARD_LIGHT = 9] = "HARD_LIGHT", r[r.SOFT_LIGHT = 10] = "SOFT_LIGHT", r[r.DIFFERENCE = 11] = "DIFFERENCE", r[r.EXCLUSION = 12] = "EXCLUSION", r[r.HUE = 13] = "HUE", r[r.SATURATION = 14] = "SATURATION", r[r.COLOR = 15] = "COLOR", r[r.LUMINOSITY = 16] = "LUMINOSITY", r[r.NORMAL_NPM = 17] = "NORMAL_NPM", r[r.ADD_NPM = 18] = "ADD_NPM", r[r.SCREEN_NPM = 19] = "SCREEN_NPM", r[r.NONE = 20] = "NONE", r[r.SRC_OVER = 0] = "SRC_OVER", r[r.SRC_IN = 21] = "SRC_IN", r[r.SRC_OUT = 22] = "SRC_OUT", r[r.SRC_ATOP = 23] = "SRC_ATOP", r[r.DST_OVER = 24] = "DST_OVER", r[r.DST_IN = 25] = "DST_IN", r[r.DST_OUT = 26] = "DST_OUT", r[r.DST_ATOP = 27] = "DST_ATOP", r[r.ERASE = 26] = "ERASE", r[r.SUBTRACT = 28] = "SUBTRACT", r[r.XOR = 29] = "XOR", r))(tt || {}), ke = /* @__PURE__ */ ((r) => (r[r.POINTS = 0] = "POINTS", r[r.LINES = 1] = "LINES", r[r.LINE_LOOP = 2] = "LINE_LOOP", r[r.LINE_STRIP = 3] = "LINE_STRIP", r[r.TRIANGLES = 4] = "TRIANGLES", r[r.TRIANGLE_STRIP = 5] = "TRIANGLE_STRIP", r[r.TRIANGLE_FAN = 6] = "TRIANGLE_FAN", r))(ke || {}), k = /* @__PURE__ */ ((r) => (r[r.RGBA = 6408] = "RGBA", r[r.RGB = 6407] = "RGB", r[r.RG = 33319] = "RG", r[r.RED = 6403] = "RED", r[r.RGBA_INTEGER = 36249] = "RGBA_INTEGER", r[r.RGB_INTEGER = 36248] = "RGB_INTEGER", r[r.RG_INTEGER = 33320] = "RG_INTEGER", r[r.RED_INTEGER = 36244] = "RED_INTEGER", r[r.ALPHA = 6406] = "ALPHA", r[r.LUMINANCE = 6409] = "LUMINANCE", r[r.LUMINANCE_ALPHA = 6410] = "LUMINANCE_ALPHA", r[r.DEPTH_COMPONENT = 6402] = "DEPTH_COMPONENT", r[r.DEPTH_STENCIL = 34041] = "DEPTH_STENCIL", r))(k || {}), bi = /* @__PURE__ */ ((r) => (r[r.TEXTURE_2D = 3553] = "TEXTURE_2D", r[r.TEXTURE_CUBE_MAP = 34067] = "TEXTURE_CUBE_MAP", r[r.TEXTURE_2D_ARRAY = 35866] = "TEXTURE_2D_ARRAY", r[r.TEXTURE_CUBE_MAP_POSITIVE_X = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X", r[r.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X", r[r.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y", r[r.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y", r[r.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z", r[r.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z", r))(bi || {}), J = /* @__PURE__ */ ((r) => (r[r.UNSIGNED_BYTE = 5121] = "UNSIGNED_BYTE", r[r.UNSIGNED_SHORT = 5123] = "UNSIGNED_SHORT", r[r.UNSIGNED_SHORT_5_6_5 = 33635] = "UNSIGNED_SHORT_5_6_5", r[r.UNSIGNED_SHORT_4_4_4_4 = 32819] = "UNSIGNED_SHORT_4_4_4_4", r[r.UNSIGNED_SHORT_5_5_5_1 = 32820] = "UNSIGNED_SHORT_5_5_5_1", r[r.UNSIGNED_INT = 5125] = "UNSIGNED_INT", r[r.UNSIGNED_INT_10F_11F_11F_REV = 35899] = "UNSIGNED_INT_10F_11F_11F_REV", r[r.UNSIGNED_INT_2_10_10_10_REV = 33640] = "UNSIGNED_INT_2_10_10_10_REV", r[r.UNSIGNED_INT_24_8 = 34042] = "UNSIGNED_INT_24_8", r[r.UNSIGNED_INT_5_9_9_9_REV = 35902] = "UNSIGNED_INT_5_9_9_9_REV", r[r.BYTE = 5120] = "BYTE", r[r.SHORT = 5122] = "SHORT", r[r.INT = 5124] = "INT", r[r.FLOAT = 5126] = "FLOAT", r[r.FLOAT_32_UNSIGNED_INT_24_8_REV = 36269] = "FLOAT_32_UNSIGNED_INT_24_8_REV", r[r.HALF_FLOAT = 36193] = "HALF_FLOAT", r))(J || {}), z = /* @__PURE__ */ ((r) => (r[r.FLOAT = 0] = "FLOAT", r[r.INT = 1] = "INT", r[r.UINT = 2] = "UINT", r))(z || {}), Je = /* @__PURE__ */ ((r) => (r[r.NEAREST = 0] = "NEAREST", r[r.LINEAR = 1] = "LINEAR", r))(Je || {}), Er = /* @__PURE__ */ ((r) => (r[r.CLAMP = 33071] = "CLAMP", r[r.REPEAT = 10497] = "REPEAT", r[r.MIRRORED_REPEAT = 33648] = "MIRRORED_REPEAT", r))(Er || {}), Ve = /* @__PURE__ */ ((r) => (r[r.OFF = 0] = "OFF", r[r.POW2 = 1] = "POW2", r[r.ON = 2] = "ON", r[r.ON_MANUAL = 3] = "ON_MANUAL", r))(Ve || {}), ee = /* @__PURE__ */ ((r) => (r[r.NPM = 0] = "NPM", r[r.UNPACK = 1] = "UNPACK", r[r.PMA = 2] = "PMA", r[r.NO_PREMULTIPLIED_ALPHA = 0] = "NO_PREMULTIPLIED_ALPHA", r[r.PREMULTIPLY_ON_UPLOAD = 1] = "PREMULTIPLY_ON_UPLOAD", r[r.PREMULTIPLIED_ALPHA = 2] = "PREMULTIPLIED_ALPHA", r))(ee || {}), Ne = /* @__PURE__ */ ((r) => (r[r.NO = 0] = "NO", r[r.YES = 1] = "YES", r[r.AUTO = 2] = "AUTO", r[r.BLEND = 0] = "BLEND", r[r.CLEAR = 1] = "CLEAR", r[r.BLIT = 2] = "BLIT", r))(Ne || {}), _l = /* @__PURE__ */ ((r) => (r[r.AUTO = 0] = "AUTO", r[r.MANUAL = 1] = "MANUAL", r))(_l || {}), ce = /* @__PURE__ */ ((r) => (r.LOW = "lowp", r.MEDIUM = "mediump", r.HIGH = "highp", r))(ce || {}), Ft = /* @__PURE__ */ ((r) => (r[r.NONE = 0] = "NONE", r[r.SCISSOR = 1] = "SCISSOR", r[r.STENCIL = 2] = "STENCIL", r[r.SPRITE = 3] = "SPRITE", r[r.COLOR = 4] = "COLOR", r))(Ft || {}), Bt = /* @__PURE__ */ ((r) => (r[r.NONE = 0] = "NONE", r[r.LOW = 2] = "LOW", r[r.MEDIUM = 4] = "MEDIUM", r[r.HIGH = 8] = "HIGH", r))(Bt || {}), Ge = /* @__PURE__ */ ((r) => (r[r.ELEMENT_ARRAY_BUFFER = 34963] = "ELEMENT_ARRAY_BUFFER", r[r.ARRAY_BUFFER = 34962] = "ARRAY_BUFFER", r[r.UNIFORM_BUFFER = 35345] = "UNIFORM_BUFFER", r))(Ge || {});
5096
+ var Yr = /* @__PURE__ */ ((r) => (r[r.WEBGL_LEGACY = 0] = "WEBGL_LEGACY", r[r.WEBGL = 1] = "WEBGL", r[r.WEBGL2 = 2] = "WEBGL2", r))(Yr || {}), Ku = /* @__PURE__ */ ((r) => (r[r.UNKNOWN = 0] = "UNKNOWN", r[r.WEBGL = 1] = "WEBGL", r[r.CANVAS = 2] = "CANVAS", r))(Ku || {}), fa = /* @__PURE__ */ ((r) => (r[r.COLOR = 16384] = "COLOR", r[r.DEPTH = 256] = "DEPTH", r[r.STENCIL = 1024] = "STENCIL", r))(fa || {}), tt = /* @__PURE__ */ ((r) => (r[r.NORMAL = 0] = "NORMAL", r[r.ADD = 1] = "ADD", r[r.MULTIPLY = 2] = "MULTIPLY", r[r.SCREEN = 3] = "SCREEN", r[r.OVERLAY = 4] = "OVERLAY", r[r.DARKEN = 5] = "DARKEN", r[r.LIGHTEN = 6] = "LIGHTEN", r[r.COLOR_DODGE = 7] = "COLOR_DODGE", r[r.COLOR_BURN = 8] = "COLOR_BURN", r[r.HARD_LIGHT = 9] = "HARD_LIGHT", r[r.SOFT_LIGHT = 10] = "SOFT_LIGHT", r[r.DIFFERENCE = 11] = "DIFFERENCE", r[r.EXCLUSION = 12] = "EXCLUSION", r[r.HUE = 13] = "HUE", r[r.SATURATION = 14] = "SATURATION", r[r.COLOR = 15] = "COLOR", r[r.LUMINOSITY = 16] = "LUMINOSITY", r[r.NORMAL_NPM = 17] = "NORMAL_NPM", r[r.ADD_NPM = 18] = "ADD_NPM", r[r.SCREEN_NPM = 19] = "SCREEN_NPM", r[r.NONE = 20] = "NONE", r[r.SRC_OVER = 0] = "SRC_OVER", r[r.SRC_IN = 21] = "SRC_IN", r[r.SRC_OUT = 22] = "SRC_OUT", r[r.SRC_ATOP = 23] = "SRC_ATOP", r[r.DST_OVER = 24] = "DST_OVER", r[r.DST_IN = 25] = "DST_IN", r[r.DST_OUT = 26] = "DST_OUT", r[r.DST_ATOP = 27] = "DST_ATOP", r[r.ERASE = 26] = "ERASE", r[r.SUBTRACT = 28] = "SUBTRACT", r[r.XOR = 29] = "XOR", r))(tt || {}), ke = /* @__PURE__ */ ((r) => (r[r.POINTS = 0] = "POINTS", r[r.LINES = 1] = "LINES", r[r.LINE_LOOP = 2] = "LINE_LOOP", r[r.LINE_STRIP = 3] = "LINE_STRIP", r[r.TRIANGLES = 4] = "TRIANGLES", r[r.TRIANGLE_STRIP = 5] = "TRIANGLE_STRIP", r[r.TRIANGLE_FAN = 6] = "TRIANGLE_FAN", r))(ke || {}), k = /* @__PURE__ */ ((r) => (r[r.RGBA = 6408] = "RGBA", r[r.RGB = 6407] = "RGB", r[r.RG = 33319] = "RG", r[r.RED = 6403] = "RED", r[r.RGBA_INTEGER = 36249] = "RGBA_INTEGER", r[r.RGB_INTEGER = 36248] = "RGB_INTEGER", r[r.RG_INTEGER = 33320] = "RG_INTEGER", r[r.RED_INTEGER = 36244] = "RED_INTEGER", r[r.ALPHA = 6406] = "ALPHA", r[r.LUMINANCE = 6409] = "LUMINANCE", r[r.LUMINANCE_ALPHA = 6410] = "LUMINANCE_ALPHA", r[r.DEPTH_COMPONENT = 6402] = "DEPTH_COMPONENT", r[r.DEPTH_STENCIL = 34041] = "DEPTH_STENCIL", r))(k || {}), bi = /* @__PURE__ */ ((r) => (r[r.TEXTURE_2D = 3553] = "TEXTURE_2D", r[r.TEXTURE_CUBE_MAP = 34067] = "TEXTURE_CUBE_MAP", r[r.TEXTURE_2D_ARRAY = 35866] = "TEXTURE_2D_ARRAY", r[r.TEXTURE_CUBE_MAP_POSITIVE_X = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X", r[r.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X", r[r.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y", r[r.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y", r[r.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z", r[r.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z", r))(bi || {}), Z = /* @__PURE__ */ ((r) => (r[r.UNSIGNED_BYTE = 5121] = "UNSIGNED_BYTE", r[r.UNSIGNED_SHORT = 5123] = "UNSIGNED_SHORT", r[r.UNSIGNED_SHORT_5_6_5 = 33635] = "UNSIGNED_SHORT_5_6_5", r[r.UNSIGNED_SHORT_4_4_4_4 = 32819] = "UNSIGNED_SHORT_4_4_4_4", r[r.UNSIGNED_SHORT_5_5_5_1 = 32820] = "UNSIGNED_SHORT_5_5_5_1", r[r.UNSIGNED_INT = 5125] = "UNSIGNED_INT", r[r.UNSIGNED_INT_10F_11F_11F_REV = 35899] = "UNSIGNED_INT_10F_11F_11F_REV", r[r.UNSIGNED_INT_2_10_10_10_REV = 33640] = "UNSIGNED_INT_2_10_10_10_REV", r[r.UNSIGNED_INT_24_8 = 34042] = "UNSIGNED_INT_24_8", r[r.UNSIGNED_INT_5_9_9_9_REV = 35902] = "UNSIGNED_INT_5_9_9_9_REV", r[r.BYTE = 5120] = "BYTE", r[r.SHORT = 5122] = "SHORT", r[r.INT = 5124] = "INT", r[r.FLOAT = 5126] = "FLOAT", r[r.FLOAT_32_UNSIGNED_INT_24_8_REV = 36269] = "FLOAT_32_UNSIGNED_INT_24_8_REV", r[r.HALF_FLOAT = 36193] = "HALF_FLOAT", r))(Z || {}), W = /* @__PURE__ */ ((r) => (r[r.FLOAT = 0] = "FLOAT", r[r.INT = 1] = "INT", r[r.UINT = 2] = "UINT", r))(W || {}), Je = /* @__PURE__ */ ((r) => (r[r.NEAREST = 0] = "NEAREST", r[r.LINEAR = 1] = "LINEAR", r))(Je || {}), Er = /* @__PURE__ */ ((r) => (r[r.CLAMP = 33071] = "CLAMP", r[r.REPEAT = 10497] = "REPEAT", r[r.MIRRORED_REPEAT = 33648] = "MIRRORED_REPEAT", r))(Er || {}), Ve = /* @__PURE__ */ ((r) => (r[r.OFF = 0] = "OFF", r[r.POW2 = 1] = "POW2", r[r.ON = 2] = "ON", r[r.ON_MANUAL = 3] = "ON_MANUAL", r))(Ve || {}), ee = /* @__PURE__ */ ((r) => (r[r.NPM = 0] = "NPM", r[r.UNPACK = 1] = "UNPACK", r[r.PMA = 2] = "PMA", r[r.NO_PREMULTIPLIED_ALPHA = 0] = "NO_PREMULTIPLIED_ALPHA", r[r.PREMULTIPLY_ON_UPLOAD = 1] = "PREMULTIPLY_ON_UPLOAD", r[r.PREMULTIPLIED_ALPHA = 2] = "PREMULTIPLIED_ALPHA", r))(ee || {}), Ne = /* @__PURE__ */ ((r) => (r[r.NO = 0] = "NO", r[r.YES = 1] = "YES", r[r.AUTO = 2] = "AUTO", r[r.BLEND = 0] = "BLEND", r[r.CLEAR = 1] = "CLEAR", r[r.BLIT = 2] = "BLIT", r))(Ne || {}), _l = /* @__PURE__ */ ((r) => (r[r.AUTO = 0] = "AUTO", r[r.MANUAL = 1] = "MANUAL", r))(_l || {}), ce = /* @__PURE__ */ ((r) => (r.LOW = "lowp", r.MEDIUM = "mediump", r.HIGH = "highp", r))(ce || {}), Ft = /* @__PURE__ */ ((r) => (r[r.NONE = 0] = "NONE", r[r.SCISSOR = 1] = "SCISSOR", r[r.STENCIL = 2] = "STENCIL", r[r.SPRITE = 3] = "SPRITE", r[r.COLOR = 4] = "COLOR", r))(Ft || {}), Bt = /* @__PURE__ */ ((r) => (r[r.NONE = 0] = "NONE", r[r.LOW = 2] = "LOW", r[r.MEDIUM = 4] = "MEDIUM", r[r.HIGH = 8] = "HIGH", r))(Bt || {}), Ge = /* @__PURE__ */ ((r) => (r[r.ELEMENT_ARRAY_BUFFER = 34963] = "ELEMENT_ARRAY_BUFFER", r[r.ARRAY_BUFFER = 34962] = "ARRAY_BUFFER", r[r.UNIFORM_BUFFER = 35345] = "UNIFORM_BUFFER", r))(Ge || {});
5097
5097
  const ty = {
5098
5098
  /**
5099
5099
  * Creates a canvas element of the given size.
@@ -5112,7 +5112,7 @@ const ty = {
5112
5112
  getFontFaceSet: () => document.fonts,
5113
5113
  fetch: (r, t) => fetch(r, t),
5114
5114
  parseXML: (r) => new DOMParser().parseFromString(r, "text/xml")
5115
- }, W = {
5115
+ }, j = {
5116
5116
  /**
5117
5117
  * This adapter is used to call methods that are platform dependent.
5118
5118
  * For example `document.createElement` only runs on the web but fails in node environments.
@@ -5218,8 +5218,8 @@ function Ch(r) {
5218
5218
  return n.any = n.apple.device || n.android.device || n.windows.device || n.other.device, n.phone = n.apple.phone || n.android.phone || n.windows.phone, n.tablet = n.apple.tablet || n.android.tablet || n.windows.tablet, n;
5219
5219
  }
5220
5220
  const ry = Ch.default ?? Ch, Qe = ry(globalThis.navigator);
5221
- W.RETINA_PREFIX = /@([0-9\.]+)x/;
5222
- W.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = !1;
5221
+ j.RETINA_PREFIX = /@([0-9\.]+)x/;
5222
+ j.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = !1;
5223
5223
  var as = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
5224
5224
  function Zu(r) {
5225
5225
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
@@ -5620,80 +5620,80 @@ bn.exports;
5620
5620
  "not-basic": "Illegal input >= 0x80 (not a basic code point)",
5621
5621
  "invalid-input": "Invalid input"
5622
5622
  }, v = l - h, w = Math.floor, I = String.fromCharCode, A;
5623
- function C(P) {
5624
- throw new RangeError(g[P]);
5623
+ function C(R) {
5624
+ throw new RangeError(g[R]);
5625
5625
  }
5626
- function N(P, U) {
5627
- for (var j = P.length, et = []; j--; )
5628
- et[j] = U(P[j]);
5626
+ function N(R, U) {
5627
+ for (var z = R.length, et = []; z--; )
5628
+ et[z] = U(R[z]);
5629
5629
  return et;
5630
5630
  }
5631
- function S(P, U) {
5632
- var j = P.split("@"), et = "";
5633
- j.length > 1 && (et = j[0] + "@", P = j[1]), P = P.replace(x, ".");
5634
- var Q = P.split("."), H = N(Q, U).join(".");
5631
+ function S(R, U) {
5632
+ var z = R.split("@"), et = "";
5633
+ z.length > 1 && (et = z[0] + "@", R = z[1]), R = R.replace(x, ".");
5634
+ var J = R.split("."), H = N(J, U).join(".");
5635
5635
  return et + H;
5636
5636
  }
5637
- function R(P) {
5638
- for (var U = [], j = 0, et = P.length, Q, H; j < et; )
5639
- Q = P.charCodeAt(j++), Q >= 55296 && Q <= 56319 && j < et ? (H = P.charCodeAt(j++), (H & 64512) == 56320 ? U.push(((Q & 1023) << 10) + (H & 1023) + 65536) : (U.push(Q), j--)) : U.push(Q);
5637
+ function P(R) {
5638
+ for (var U = [], z = 0, et = R.length, J, H; z < et; )
5639
+ J = R.charCodeAt(z++), J >= 55296 && J <= 56319 && z < et ? (H = R.charCodeAt(z++), (H & 64512) == 56320 ? U.push(((J & 1023) << 10) + (H & 1023) + 65536) : (U.push(J), z--)) : U.push(J);
5640
5640
  return U;
5641
5641
  }
5642
- function E(P) {
5643
- return N(P, function(U) {
5644
- var j = "";
5645
- return U > 65535 && (U -= 65536, j += I(U >>> 10 & 1023 | 55296), U = 56320 | U & 1023), j += I(U), j;
5642
+ function E(R) {
5643
+ return N(R, function(U) {
5644
+ var z = "";
5645
+ return U > 65535 && (U -= 65536, z += I(U >>> 10 & 1023 | 55296), U = 56320 | U & 1023), z += I(U), z;
5646
5646
  }).join("");
5647
5647
  }
5648
- function b(P) {
5649
- return P - 48 < 10 ? P - 22 : P - 65 < 26 ? P - 65 : P - 97 < 26 ? P - 97 : l;
5648
+ function b(R) {
5649
+ return R - 48 < 10 ? R - 22 : R - 65 < 26 ? R - 65 : R - 97 < 26 ? R - 97 : l;
5650
5650
  }
5651
- function D(P, U) {
5652
- return P + 22 + 75 * (P < 26) - ((U != 0) << 5);
5651
+ function B(R, U) {
5652
+ return R + 22 + 75 * (R < 26) - ((U != 0) << 5);
5653
5653
  }
5654
- function F(P, U, j) {
5654
+ function O(R, U, z) {
5655
5655
  var et = 0;
5656
- for (P = j ? w(P / d) : P >> 1, P += w(P / U); P > v * c >> 1; et += l)
5657
- P = w(P / v);
5658
- return w(et + (v + 1) * P / (P + u));
5659
- }
5660
- function G(P) {
5661
- var U = [], j = P.length, et, Q = 0, H = p, X = f, lt, L, O, _t, ht, vt, xt, Ce, Re;
5662
- for (lt = P.lastIndexOf(m), lt < 0 && (lt = 0), L = 0; L < lt; ++L)
5663
- P.charCodeAt(L) >= 128 && C("not-basic"), U.push(P.charCodeAt(L));
5664
- for (O = lt > 0 ? lt + 1 : 0; O < j; ) {
5665
- for (_t = Q, ht = 1, vt = l; O >= j && C("invalid-input"), xt = b(P.charCodeAt(O++)), (xt >= l || xt > w((a - Q) / ht)) && C("overflow"), Q += xt * ht, Ce = vt <= X ? h : vt >= X + c ? c : vt - X, !(xt < Ce); vt += l)
5656
+ for (R = z ? w(R / d) : R >> 1, R += w(R / U); R > v * c >> 1; et += l)
5657
+ R = w(R / v);
5658
+ return w(et + (v + 1) * R / (R + u));
5659
+ }
5660
+ function G(R) {
5661
+ var U = [], z = R.length, et, J = 0, H = p, X = f, lt, L, D, _t, ht, vt, xt, Ce, Re;
5662
+ for (lt = R.lastIndexOf(m), lt < 0 && (lt = 0), L = 0; L < lt; ++L)
5663
+ R.charCodeAt(L) >= 128 && C("not-basic"), U.push(R.charCodeAt(L));
5664
+ for (D = lt > 0 ? lt + 1 : 0; D < z; ) {
5665
+ for (_t = J, ht = 1, vt = l; D >= z && C("invalid-input"), xt = b(R.charCodeAt(D++)), (xt >= l || xt > w((a - J) / ht)) && C("overflow"), J += xt * ht, Ce = vt <= X ? h : vt >= X + c ? c : vt - X, !(xt < Ce); vt += l)
5666
5666
  Re = l - Ce, ht > w(a / Re) && C("overflow"), ht *= Re;
5667
- et = U.length + 1, X = F(Q - _t, et, _t == 0), w(Q / et) > a - H && C("overflow"), H += w(Q / et), Q %= et, U.splice(Q++, 0, H);
5667
+ et = U.length + 1, X = O(J - _t, et, _t == 0), w(J / et) > a - H && C("overflow"), H += w(J / et), J %= et, U.splice(J++, 0, H);
5668
5668
  }
5669
5669
  return E(U);
5670
5670
  }
5671
- function $(P) {
5672
- var U, j, et, Q, H, X, lt, L, O, _t, ht, vt = [], xt, Ce, Re, $i;
5673
- for (P = R(P), xt = P.length, U = p, j = 0, H = f, X = 0; X < xt; ++X)
5674
- ht = P[X], ht < 128 && vt.push(I(ht));
5675
- for (et = Q = vt.length, Q && vt.push(m); et < xt; ) {
5671
+ function $(R) {
5672
+ var U, z, et, J, H, X, lt, L, D, _t, ht, vt = [], xt, Ce, Re, $i;
5673
+ for (R = P(R), xt = R.length, U = p, z = 0, H = f, X = 0; X < xt; ++X)
5674
+ ht = R[X], ht < 128 && vt.push(I(ht));
5675
+ for (et = J = vt.length, J && vt.push(m); et < xt; ) {
5676
5676
  for (lt = a, X = 0; X < xt; ++X)
5677
- ht = P[X], ht >= U && ht < lt && (lt = ht);
5678
- for (Ce = et + 1, lt - U > w((a - j) / Ce) && C("overflow"), j += (lt - U) * Ce, U = lt, X = 0; X < xt; ++X)
5679
- if (ht = P[X], ht < U && ++j > a && C("overflow"), ht == U) {
5680
- for (L = j, O = l; _t = O <= H ? h : O >= H + c ? c : O - H, !(L < _t); O += l)
5677
+ ht = R[X], ht >= U && ht < lt && (lt = ht);
5678
+ for (Ce = et + 1, lt - U > w((a - z) / Ce) && C("overflow"), z += (lt - U) * Ce, U = lt, X = 0; X < xt; ++X)
5679
+ if (ht = R[X], ht < U && ++z > a && C("overflow"), ht == U) {
5680
+ for (L = z, D = l; _t = D <= H ? h : D >= H + c ? c : D - H, !(L < _t); D += l)
5681
5681
  $i = L - _t, Re = l - _t, vt.push(
5682
- I(D(_t + $i % Re, 0))
5682
+ I(B(_t + $i % Re, 0))
5683
5683
  ), L = w($i / Re);
5684
- vt.push(I(D(L, 0))), H = F(j, Ce, et == Q), j = 0, ++et;
5684
+ vt.push(I(B(L, 0))), H = O(z, Ce, et == J), z = 0, ++et;
5685
5685
  }
5686
- ++j, ++U;
5686
+ ++z, ++U;
5687
5687
  }
5688
5688
  return vt.join("");
5689
5689
  }
5690
- function M(P) {
5691
- return S(P, function(U) {
5690
+ function F(R) {
5691
+ return S(R, function(U) {
5692
5692
  return _.test(U) ? G(U.slice(4).toLowerCase()) : U;
5693
5693
  });
5694
5694
  }
5695
- function K(P) {
5696
- return S(P, function(U) {
5695
+ function Q(R) {
5696
+ return S(R, function(U) {
5697
5697
  return y.test(U) ? "xn--" + $(U) : U;
5698
5698
  });
5699
5699
  }
@@ -5712,13 +5712,13 @@ bn.exports;
5712
5712
  * @type Object
5713
5713
  */
5714
5714
  ucs2: {
5715
- decode: R,
5715
+ decode: P,
5716
5716
  encode: E
5717
5717
  },
5718
5718
  decode: G,
5719
5719
  encode: $,
5720
- toASCII: K,
5721
- toUnicode: M
5720
+ toASCII: Q,
5721
+ toUnicode: F
5722
5722
  }, i && s)
5723
5723
  if (r.exports == i)
5724
5724
  s.exports = o;
@@ -6192,8 +6192,8 @@ var xa = b0, Yh = xa.custom, qh = fd(Yh) ? Yh : null, ud = {
6192
6192
  s = [];
6193
6193
  else if (pd(s, t) >= 0)
6194
6194
  return "[Circular]";
6195
- function d(b, D, F) {
6196
- if (D && (s = P0.call(s), s.push(D)), F) {
6195
+ function d(b, B, O) {
6196
+ if (B && (s = P0.call(s), s.push(B)), O) {
6197
6197
  var G = {
6198
6198
  depth: n.depth
6199
6199
  };
@@ -6232,8 +6232,8 @@ var xa = b0, Yh = xa.custom, qh = fd(Yh) ? Yh : null, ud = {
6232
6232
  }
6233
6233
  if (H0(t)) {
6234
6234
  var w = [];
6235
- return Gh && Gh.call(t, function(b, D) {
6236
- w.push(d(D, t, !0) + " => " + d(b, t));
6235
+ return Gh && Gh.call(t, function(b, B) {
6236
+ w.push(d(B, t, !0) + " => " + d(b, t));
6237
6237
  }), Zh("Map", Tn.call(t), w, u);
6238
6238
  }
6239
6239
  if (z0(t)) {
@@ -6261,7 +6261,7 @@ var xa = b0, Yh = xa.custom, qh = fd(Yh) ? Yh : null, ud = {
6261
6261
  if (typeof globalThis < "u" && t === globalThis || typeof as < "u" && t === as)
6262
6262
  return "{ [object globalThis] }";
6263
6263
  if (!O0(t) && !Kh(t)) {
6264
- var A = Ds(t, d), C = Wh ? Wh(t) === Object.prototype : t instanceof Object || t.constructor === Object, N = t instanceof Object ? "" : "null prototype", S = !C && Kt && Object(t) === t && Kt in t ? Tl.call(Sr(t), 8, -1) : N ? "Object" : "", R = C || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "", E = R + (S || N ? "[" + Ue.call(Vh.call([], S || [], N || []), ": ") + "] " : "");
6264
+ var A = Ds(t, d), C = Wh ? Wh(t) === Object.prototype : t instanceof Object || t.constructor === Object, N = t instanceof Object ? "" : "null prototype", S = !C && Kt && Object(t) === t && Kt in t ? Tl.call(Sr(t), 8, -1) : N ? "Object" : "", P = C || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "", E = P + (S || N ? "[" + Ue.call(Vh.call([], S || [], N || []), ": ") + "] " : "");
6265
6265
  return A.length === 0 ? E + "{}" : u ? E + "{" + wa(A, u) + "}" : E + "{ " + Ue.call(A, ", ") + " }";
6266
6266
  }
6267
6267
  return String(t);
@@ -6569,13 +6569,13 @@ var gd = Ni, Ui = _0, Z0 = B0, J0 = ws, Os = gd("%WeakMap%", !0), Fs = gd("%Map%
6569
6569
  }
6570
6570
  }
6571
6571
  }, yd = function(t, e) {
6572
- for (var i = e && e.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, s = 0; s < t.length; ++s)
6572
+ for (var i = e && e.plainObjects ? { __proto__: null } : {}, s = 0; s < t.length; ++s)
6573
6573
  typeof t[s] < "u" && (i[s] = t[s]);
6574
6574
  return i;
6575
6575
  }, f_ = function r(t, e, i) {
6576
6576
  if (!e)
6577
6577
  return t;
6578
- if (typeof e != "object") {
6578
+ if (typeof e != "object" && typeof e != "function") {
6579
6579
  if (Lr(t))
6580
6580
  t.push(e);
6581
6581
  else if (t && typeof t == "object")
@@ -6693,11 +6693,13 @@ var gd = Ni, Ui = _0, Z0 = B0, J0 = ws, Os = gd("%WeakMap%", !0), Fs = gd("%Map%
6693
6693
  arrayFormat: "indices",
6694
6694
  charset: "utf-8",
6695
6695
  charsetSentinel: !1,
6696
+ commaRoundTrip: !1,
6696
6697
  delimiter: "&",
6697
6698
  encode: !0,
6698
6699
  encodeDotInKeys: !1,
6699
6700
  encoder: on.encode,
6700
6701
  encodeValuesOnly: !1,
6702
+ filter: void 0,
6701
6703
  format: Jh,
6702
6704
  formatter: cs.formatters[Jh],
6703
6705
  // deprecated
@@ -6719,8 +6721,8 @@ var gd = Ni, Ui = _0, Z0 = B0, J0 = ws, Os = gd("%WeakMap%", !0), Fs = gd("%Map%
6719
6721
  }
6720
6722
  typeof v.get(Mo) > "u" && (w = 0);
6721
6723
  }
6722
- if (typeof c == "function" ? g = c(e, g) : g instanceof Date ? g = f(g) : i === "comma" && Le(g) && (g = on.maybeMap(g, function(P) {
6723
- return P instanceof Date ? f(P) : P;
6724
+ if (typeof c == "function" ? g = c(e, g) : g instanceof Date ? g = f(g) : i === "comma" && Le(g) && (g = on.maybeMap(g, function(R) {
6725
+ return R instanceof Date ? f(R) : R;
6724
6726
  })), g === null) {
6725
6727
  if (o)
6726
6728
  return h && !_ ? h(e, Ot.encoder, y, "key", p) : e;
@@ -6742,21 +6744,21 @@ var gd = Ni, Ui = _0, Z0 = B0, J0 = ws, Os = gd("%WeakMap%", !0), Fs = gd("%Map%
6742
6744
  else if (Le(c))
6743
6745
  S = c;
6744
6746
  else {
6745
- var R = Object.keys(g);
6746
- S = u ? R.sort(u) : R;
6747
+ var P = Object.keys(g);
6748
+ S = u ? P.sort(u) : P;
6747
6749
  }
6748
- var E = l ? e.replace(/\./g, "%2E") : e, b = s && Le(g) && g.length === 1 ? E + "[]" : E;
6750
+ var E = l ? String(e).replace(/\./g, "%2E") : String(e), b = s && Le(g) && g.length === 1 ? E + "[]" : E;
6749
6751
  if (n && Le(g) && g.length === 0)
6750
6752
  return b + "[]";
6751
- for (var D = 0; D < S.length; ++D) {
6752
- var F = S[D], G = typeof F == "object" && typeof F.value < "u" ? F.value : g[F];
6753
+ for (var B = 0; B < S.length; ++B) {
6754
+ var O = S[B], G = typeof O == "object" && O && typeof O.value < "u" ? O.value : g[O];
6753
6755
  if (!(a && G === null)) {
6754
- var $ = d && l ? F.replace(/\./g, "%2E") : F, M = Le(g) ? typeof i == "function" ? i(b, $) : b : b + (d ? "." + $ : "[" + $ + "]");
6756
+ var $ = d && l ? String(O).replace(/\./g, "%2E") : String(O), F = Le(g) ? typeof i == "function" ? i(b, $) : b : b + (d ? "." + $ : "[" + $ + "]");
6755
6757
  x.set(t, w);
6756
- var K = vd();
6757
- K.set(Mo, x), bd(N, r(
6758
+ var Q = vd();
6759
+ Q.set(Mo, x), bd(N, r(
6758
6760
  G,
6759
- M,
6761
+ F,
6760
6762
  i,
6761
6763
  s,
6762
6764
  n,
@@ -6772,7 +6774,7 @@ var gd = Ni, Ui = _0, Z0 = B0, J0 = ws, Os = gd("%WeakMap%", !0), Fs = gd("%Map%
6772
6774
  m,
6773
6775
  _,
6774
6776
  y,
6775
- K
6777
+ Q
6776
6778
  ));
6777
6779
  }
6778
6780
  }
@@ -6808,7 +6810,7 @@ var gd = Ni, Ui = _0, Z0 = B0, J0 = ws, Os = gd("%WeakMap%", !0), Fs = gd("%Map%
6808
6810
  arrayFormat: o,
6809
6811
  charset: e,
6810
6812
  charsetSentinel: typeof t.charsetSentinel == "boolean" ? t.charsetSentinel : Ot.charsetSentinel,
6811
- commaRoundTrip: t.commaRoundTrip,
6813
+ commaRoundTrip: !!t.commaRoundTrip,
6812
6814
  delimiter: typeof t.delimiter > "u" ? Ot.delimiter : t.delimiter,
6813
6815
  encode: typeof t.encode == "boolean" ? t.encode : Ot.encode,
6814
6816
  encodeDotInKeys: typeof t.encodeDotInKeys == "boolean" ? t.encodeDotInKeys : Ot.encodeDotInKeys,
@@ -6831,9 +6833,9 @@ var gd = Ni, Ui = _0, Z0 = B0, J0 = ws, Os = gd("%WeakMap%", !0), Fs = gd("%Map%
6831
6833
  var a = xd[i.arrayFormat], l = a === "comma" && i.commaRoundTrip;
6832
6834
  s || (s = Object.keys(e)), i.sort && s.sort(i.sort);
6833
6835
  for (var h = vd(), c = 0; c < s.length; ++c) {
6834
- var u = s[c];
6835
- i.skipNulls && e[u] === null || bd(o, S_(
6836
- e[u],
6836
+ var u = s[c], d = e[u];
6837
+ i.skipNulls && d === null || bd(o, S_(
6838
+ d,
6837
6839
  u,
6838
6840
  a,
6839
6841
  l,
@@ -6853,8 +6855,8 @@ var gd = Ni, Ui = _0, Z0 = B0, J0 = ws, Os = gd("%WeakMap%", !0), Fs = gd("%Map%
6853
6855
  h
6854
6856
  ));
6855
6857
  }
6856
- var d = o.join(i.delimiter), f = i.addQueryPrefix === !0 ? "?" : "";
6857
- return i.charsetSentinel && (i.charset === "iso-8859-1" ? f += "utf8=%26%2310003%3B&" : f += "utf8=%E2%9C%93&"), d.length > 0 ? f + d : "";
6858
+ var f = o.join(i.delimiter), p = i.addQueryPrefix === !0 ? "?" : "";
6859
+ return i.charsetSentinel && (i.charset === "iso-8859-1" ? p += "utf8=%26%2310003%3B&" : p += "utf8=%E2%9C%93&"), f.length > 0 ? p + f : "";
6858
6860
  }, Di = _d, Ea = Object.prototype.hasOwnProperty, R_ = Array.isArray, Pt = {
6859
6861
  allowDots: !1,
6860
6862
  allowEmptyArrays: !1,
@@ -6897,7 +6899,7 @@ var gd = Ni, Ui = _0, Z0 = B0, J0 = ws, Os = gd("%WeakMap%", !0), Fs = gd("%Map%
6897
6899
  function(_) {
6898
6900
  return e.decoder(_, Pt.decoder, h, "value");
6899
6901
  }
6900
- )), p && e.interpretNumericEntities && h === "iso-8859-1" && (p = P_(p)), c.indexOf("[]=") > -1 && (p = R_(p) ? [p] : p);
6902
+ )), p && e.interpretNumericEntities && h === "iso-8859-1" && (p = P_(String(p))), c.indexOf("[]=") > -1 && (p = R_(p) ? [p] : p);
6901
6903
  var m = Ea.call(i, f);
6902
6904
  m && e.duplicates === "combine" ? i[f] = Di.combine(i[f], p) : (!m || e.duplicates === "last") && (i[f] = p);
6903
6905
  }
@@ -6908,7 +6910,7 @@ var gd = Ni, Ui = _0, Z0 = B0, J0 = ws, Os = gd("%WeakMap%", !0), Fs = gd("%Map%
6908
6910
  if (a === "[]" && e.parseArrays)
6909
6911
  o = e.allowEmptyArrays && (s === "" || e.strictNullHandling && s === null) ? [] : [].concat(s);
6910
6912
  else {
6911
- o = e.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
6913
+ o = e.plainObjects ? { __proto__: null } : {};
6912
6914
  var l = a.charAt(0) === "[" && a.charAt(a.length - 1) === "]" ? a.slice(1, -1) : a, h = e.decodeDotInKeys ? l.replace(/%2E/g, ".") : l, c = parseInt(h, 10);
6913
6915
  !e.parseArrays && h === "" ? o = { 0: s } : !isNaN(c) && a !== h && String(c) === h && c >= 0 && e.parseArrays && c <= e.arrayLimit ? (o = [], o[c] = s) : h !== "__proto__" && (o[h] = s);
6914
6916
  }
@@ -6976,8 +6978,8 @@ var gd = Ni, Ui = _0, Z0 = B0, J0 = ws, Os = gd("%WeakMap%", !0), Fs = gd("%Map%
6976
6978
  }, N_ = function(r, t) {
6977
6979
  var e = L_(t);
6978
6980
  if (r === "" || r === null || typeof r > "u")
6979
- return e.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
6980
- for (var i = typeof r == "string" ? D_(r, e) : r, s = e.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, n = Object.keys(i), o = 0; o < n.length; ++o) {
6981
+ return e.plainObjects ? { __proto__: null } : {};
6982
+ for (var i = typeof r == "string" ? D_(r, e) : r, s = e.plainObjects ? { __proto__: null } : {}, n = Object.keys(i), o = 0; o < n.length; ++o) {
6981
6983
  var a = n[o], l = F_(a, i[a], e, typeof r == "string");
6982
6984
  s = Di.merge(s, l, e);
6983
6985
  }
@@ -7089,23 +7091,23 @@ or.prototype.parse = function(r, t, e) {
7089
7091
  }
7090
7092
  }
7091
7093
  this.hostname.length > Y_ ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), y || (this.hostname = H_.toASCII(this.hostname));
7092
- var R = this.port ? ":" + this.port : "", E = this.hostname || "";
7093
- this.host = E + R, this.href += this.host, y && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), a[0] !== "/" && (a = "/" + a));
7094
+ var P = this.port ? ":" + this.port : "", E = this.hostname || "";
7095
+ this.host = E + P, this.href += this.host, y && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), a[0] !== "/" && (a = "/" + a));
7094
7096
  }
7095
7097
  if (!K_[c])
7096
7098
  for (var f = 0, g = Ta.length; f < g; f++) {
7097
7099
  var b = Ta[f];
7098
7100
  if (a.indexOf(b) !== -1) {
7099
- var D = encodeURIComponent(b);
7100
- D === b && (D = escape(b)), a = a.split(b).join(D);
7101
+ var B = encodeURIComponent(b);
7102
+ B === b && (B = escape(b)), a = a.split(b).join(B);
7101
7103
  }
7102
7104
  }
7103
- var F = a.indexOf("#");
7104
- F !== -1 && (this.hash = a.substr(F), a = a.slice(0, F));
7105
+ var O = a.indexOf("#");
7106
+ O !== -1 && (this.hash = a.substr(O), a = a.slice(0, O));
7105
7107
  var G = a.indexOf("?");
7106
7108
  if (G !== -1 ? (this.search = a.substr(G), this.query = a.substr(G + 1), t && (this.query = Sa.parse(this.query)), a = a.slice(0, G)) : t && (this.search = "", this.query = {}), a && (this.pathname = a), Ei[c] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
7107
- var R = this.pathname || "", $ = this.search || "";
7108
- this.path = R + $;
7109
+ var P = this.pathname || "", $ = this.search || "";
7110
+ this.path = P + $;
7109
7111
  }
7110
7112
  return this.href = this.format(), this;
7111
7113
  };
@@ -7320,7 +7322,7 @@ const kt = {
7320
7322
  toAbsolute(r, t, e) {
7321
7323
  if (pe(r), this.isDataUrl(r) || this.isBlobUrl(r))
7322
7324
  return r;
7323
- const i = Vi(this.toPosix(t ?? W.ADAPTER.getBaseUrl())), s = Vi(this.toPosix(e ?? this.rootname(i)));
7325
+ const i = Vi(this.toPosix(t ?? j.ADAPTER.getBaseUrl())), s = Vi(this.toPosix(e ?? this.rootname(i)));
7324
7326
  return r = this.toPosix(r), r.startsWith("/") ? kt.join(s, r.slice(1)) : this.isAbsolute(r) ? r : this.join(i, r);
7325
7327
  },
7326
7328
  /**
@@ -7524,12 +7526,12 @@ function rv() {
7524
7526
  var t;
7525
7527
  const r = {
7526
7528
  stencil: !0,
7527
- failIfMajorPerformanceCaveat: W.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT
7529
+ failIfMajorPerformanceCaveat: j.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT
7528
7530
  };
7529
7531
  try {
7530
- if (!W.ADAPTER.getWebGLRenderingContext())
7532
+ if (!j.ADAPTER.getWebGLRenderingContext())
7531
7533
  return !1;
7532
- const e = W.ADAPTER.createCanvas();
7534
+ const e = j.ADAPTER.createCanvas();
7533
7535
  let i = e.getContext("webgl", r) || e.getContext("experimental-webgl", r);
7534
7536
  const s = !!((t = i == null ? void 0 : i.getContextAttributes()) != null && t.stencil);
7535
7537
  if (i) {
@@ -8066,7 +8068,7 @@ class yv {
8066
8068
  * @param {number} [resolution=PIXI.settings.RESOLUTION] - The resolution / device pixel ratio of the canvas
8067
8069
  */
8068
8070
  constructor(t, e, i) {
8069
- this._canvas = W.ADAPTER.createCanvas(), this._context = this._canvas.getContext("2d"), this.resolution = i || W.RESOLUTION, this.resize(t, e);
8071
+ this._canvas = j.ADAPTER.createCanvas(), this._context = this._canvas.getContext("2d"), this.resolution = i || j.RESOLUTION, this.resize(t, e);
8070
8072
  }
8071
8073
  /**
8072
8074
  * Clears the canvas that was created by the CanvasRenderTarget class.
@@ -8178,7 +8180,7 @@ function xv(r, t = globalThis.location) {
8178
8180
  }
8179
8181
  function ar(r, t = 1) {
8180
8182
  var i;
8181
- const e = (i = W.RETINA_PREFIX) == null ? void 0 : i.exec(r);
8183
+ const e = (i = j.RETINA_PREFIX) == null ? void 0 : i.exec(r);
8182
8184
  return e ? parseFloat(e[1]) : t;
8183
8185
  }
8184
8186
  var V = /* @__PURE__ */ ((r) => (r.Renderer = "renderer", r.Application = "application", r.RendererSystem = "renderer-webgl-system", r.RendererPlugin = "renderer-webgl-plugin", r.CanvasRendererSystem = "renderer-canvas-system", r.CanvasRendererPlugin = "renderer-canvas-plugin", r.Asset = "asset", r.LoadParser = "load-parser", r.ResolveParser = "resolve-parser", r.CacheParser = "cache-parser", r.DetectionParser = "detection-parser", r))(V || {});
@@ -8766,7 +8768,7 @@ const Tv = {
8766
8768
  resolution: f,
8767
8769
  resourceOptions: p
8768
8770
  } = e;
8769
- t && !(t instanceof _s) && (t = Rd(t, p), t.internal = !0), this.resolution = f || W.RESOLUTION, this.width = Math.round((a || 0) * this.resolution) / this.resolution, this.height = Math.round((l || 0) * this.resolution) / this.resolution, this._mipmap = s, this.anisotropicLevel = n, this._wrapMode = h, this._scaleMode = o, this.format = c, this.type = u, this.target = d, this.alphaMode = i, this.uid = Wr(), this.touched = 0, this.isPowerOfTwo = !1, this._refreshPOT(), this._glTextures = {}, this.dirtyId = 0, this.dirtyStyleId = 0, this.cacheId = null, this.valid = a > 0 && l > 0, this.textureCacheIds = [], this.destroyed = !1, this.resource = null, this._batchEnabled = 0, this._batchLocation = 0, this.parentTextureArray = null, this.setResource(t);
8771
+ t && !(t instanceof _s) && (t = Rd(t, p), t.internal = !0), this.resolution = f || j.RESOLUTION, this.width = Math.round((a || 0) * this.resolution) / this.resolution, this.height = Math.round((l || 0) * this.resolution) / this.resolution, this._mipmap = s, this.anisotropicLevel = n, this._wrapMode = h, this._scaleMode = o, this.format = c, this.type = u, this.target = d, this.alphaMode = i, this.uid = Wr(), this.touched = 0, this.isPowerOfTwo = !1, this._refreshPOT(), this._glTextures = {}, this.dirtyId = 0, this.dirtyStyleId = 0, this.cacheId = null, this.valid = a > 0 && l > 0, this.textureCacheIds = [], this.destroyed = !1, this.resource = null, this._batchEnabled = 0, this._batchLocation = 0, this.parentTextureArray = null, this.setResource(t);
8770
8772
  }
8771
8773
  /**
8772
8774
  * Pixel width of the source of this texture
@@ -8917,7 +8919,7 @@ const Tv = {
8917
8919
  * @param {boolean} [strict] - Enforce strict-mode, see {@link PIXI.settings.STRICT_TEXTURE_CACHE}.
8918
8920
  * @returns {PIXI.BaseTexture} The new base texture.
8919
8921
  */
8920
- static from(t, e, i = W.STRICT_TEXTURE_CACHE) {
8922
+ static from(t, e, i = j.STRICT_TEXTURE_CACHE) {
8921
8923
  const s = typeof t == "string";
8922
8924
  let n = null;
8923
8925
  if (s)
@@ -8956,7 +8958,7 @@ const Tv = {
8956
8958
  t = t || new Float32Array(e * i * 4);
8957
8959
  const n = new jn(t, { width: e, height: i, ...s == null ? void 0 : s.resourceOptions });
8958
8960
  let o, a;
8959
- return t instanceof Float32Array ? (o = k.RGBA, a = J.FLOAT) : t instanceof Int32Array ? (o = k.RGBA_INTEGER, a = J.INT) : t instanceof Uint32Array ? (o = k.RGBA_INTEGER, a = J.UNSIGNED_INT) : t instanceof Int16Array ? (o = k.RGBA_INTEGER, a = J.SHORT) : t instanceof Uint16Array ? (o = k.RGBA_INTEGER, a = J.UNSIGNED_SHORT) : t instanceof Int8Array ? (o = k.RGBA, a = J.BYTE) : (o = k.RGBA, a = J.UNSIGNED_BYTE), n.internal = !0, new ui(n, Object.assign({}, Tv, { type: a, format: o }, s));
8961
+ return t instanceof Float32Array ? (o = k.RGBA, a = Z.FLOAT) : t instanceof Int32Array ? (o = k.RGBA_INTEGER, a = Z.INT) : t instanceof Uint32Array ? (o = k.RGBA_INTEGER, a = Z.UNSIGNED_INT) : t instanceof Int16Array ? (o = k.RGBA_INTEGER, a = Z.SHORT) : t instanceof Uint16Array ? (o = k.RGBA_INTEGER, a = Z.UNSIGNED_SHORT) : t instanceof Int8Array ? (o = k.RGBA, a = Z.BYTE) : (o = k.RGBA, a = Z.UNSIGNED_BYTE), n.internal = !0, new ui(n, Object.assign({}, Tv, { type: a, format: o }, s));
8960
8962
  }
8961
8963
  /**
8962
8964
  * Adds a BaseTexture to the global BaseTextureCache. This cache is shared across the whole PIXI object.
@@ -9030,7 +9032,7 @@ Da.defaultOptions = {
9030
9032
  * @type {PIXI.TYPES}
9031
9033
  * @default PIXI.TYPES.UNSIGNED_BYTE
9032
9034
  */
9033
- type: J.UNSIGNED_BYTE
9035
+ type: Z.UNSIGNED_BYTE
9034
9036
  }, /** Global number of the texture batch, used by multi-texture renderers. */
9035
9037
  Da._globalBatch = 0;
9036
9038
  let st = Da;
@@ -9099,7 +9101,7 @@ class In {
9099
9101
  * @param [instance=false] - Whether the geometry is instanced.
9100
9102
  * @param [divisor=1] - Divisor to use when doing instanced rendering
9101
9103
  */
9102
- constructor(t, e = 0, i = !1, s = J.FLOAT, n, o, a, l = 1) {
9104
+ constructor(t, e = 0, i = !1, s = Z.FLOAT, n, o, a, l = 1) {
9103
9105
  this.buffer = t, this.size = e, this.normalized = i, this.type = s, this.stride = n, this.start = o, this.instance = a, this.divisor = l;
9104
9106
  }
9105
9107
  /** Destroys the Attribute. */
@@ -9326,7 +9328,7 @@ class Pd extends Tr {
9326
9328
  * is updated every frame, `true` doesn't change frame-to-frame.
9327
9329
  */
9328
9330
  constructor(t = !1) {
9329
- super(), this._buffer = new Mt(null, t, !1), this._indexBuffer = new Mt(null, t, !0), this.addAttribute("aVertexPosition", this._buffer, 2, !1, J.FLOAT).addAttribute("aTextureCoord", this._buffer, 2, !1, J.FLOAT).addAttribute("aColor", this._buffer, 4, !0, J.UNSIGNED_BYTE).addAttribute("aTextureId", this._buffer, 1, !0, J.FLOAT).addIndex(this._indexBuffer);
9331
+ super(), this._buffer = new Mt(null, t, !1), this._indexBuffer = new Mt(null, t, !0), this.addAttribute("aVertexPosition", this._buffer, 2, !1, Z.FLOAT).addAttribute("aTextureCoord", this._buffer, 2, !1, Z.FLOAT).addAttribute("aColor", this._buffer, 4, !0, Z.UNSIGNED_BYTE).addAttribute("aTextureId", this._buffer, 1, !0, Z.FLOAT).addIndex(this._indexBuffer);
9330
9332
  }
9331
9333
  }
9332
9334
  const Cn = Math.PI * 2, Pv = 180 / Math.PI, Mv = Math.PI / 180;
@@ -10718,9 +10720,9 @@ const Dd = {};
10718
10720
  let si = Dd;
10719
10721
  function Uv() {
10720
10722
  if (si === Dd || si != null && si.isContextLost()) {
10721
- const r = W.ADAPTER.createCanvas();
10723
+ const r = j.ADAPTER.createCanvas();
10722
10724
  let t;
10723
- W.PREFER_ENV >= Yr.WEBGL2 && (t = r.getContext("webgl2", {})), t || (t = r.getContext("webgl", {}) || r.getContext("experimental-webgl", {}), t ? t.getExtension("WEBGL_draw_buffers") : t = null), si = t;
10725
+ j.PREFER_ENV >= Yr.WEBGL2 && (t = r.getContext("webgl2", {})), t || (t = r.getContext("webgl", {}) || r.getContext("experimental-webgl", {}), t ? t.getExtension("WEBGL_draw_buffers") : t = null), si = t;
10724
10726
  }
10725
10727
  return si;
10726
10728
  }
@@ -11025,7 +11027,7 @@ function Wv() {
11025
11027
  }
11026
11028
  function jv(r) {
11027
11029
  let t = !0;
11028
- const e = W.ADAPTER.getNavigator();
11030
+ const e = j.ADAPTER.getNavigator();
11029
11031
  if (Qe.tablet || Qe.phone) {
11030
11032
  if (Qe.apple.device) {
11031
11033
  const i = e.userAgent.match(/OS (\d+)_(\d+)?/);
@@ -11175,7 +11177,7 @@ const Zi = class ge extends Zn {
11175
11177
  */
11176
11178
  contextChange() {
11177
11179
  const t = this.renderer.gl;
11178
- W.PREFER_ENV === Yr.WEBGL_LEGACY ? this.maxTextures = 1 : (this.maxTextures = Math.min(
11180
+ j.PREFER_ENV === Yr.WEBGL_LEGACY ? this.maxTextures = 1 : (this.maxTextures = Math.min(
11179
11181
  t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),
11180
11182
  ge.defaultMaxTextures
11181
11183
  ), this.maxTextures = Ev(
@@ -11679,7 +11681,7 @@ class Pn {
11679
11681
  */
11680
11682
  createContext(t, e) {
11681
11683
  let i;
11682
- if (W.PREFER_ENV >= Yr.WEBGL2 && (i = t.getContext("webgl2", e)), i)
11684
+ if (j.PREFER_ENV >= Yr.WEBGL2 && (i = t.getContext("webgl2", e)), i)
11683
11685
  this.webGLVersion = 2;
11684
11686
  else if (this.webGLVersion = 1, i = t.getContext("webgl", e) || t.getContext("experimental-webgl", e), !i)
11685
11687
  throw new Error("This browser does not support WebGL. Try using the canvas renderer");
@@ -11828,7 +11830,7 @@ class Ga {
11828
11830
  height: this.height,
11829
11831
  mipmap: Ve.OFF,
11830
11832
  format: k.DEPTH_COMPONENT,
11831
- type: J.UNSIGNED_SHORT
11833
+ type: Z.UNSIGNED_SHORT
11832
11834
  }), this.dirtyId++, this.dirtyFormat++, this;
11833
11835
  }
11834
11836
  /** Enable depth on the frame buffer. */
@@ -11997,7 +11999,7 @@ class Ud extends lr {
11997
11999
  const i = new Image();
11998
12000
  lr.crossOrigin(i, t, e.crossorigin), i.src = t, t = i;
11999
12001
  }
12000
- super(t), !t.complete && this._width && this._height && (this._width = 0, this._height = 0), this.url = t.src, this._process = null, this.preserveBitmap = !1, this.createBitmap = (e.createBitmap ?? W.CREATE_IMAGE_BITMAP) && !!globalThis.createImageBitmap, this.alphaMode = typeof e.alphaMode == "number" ? e.alphaMode : null, this.bitmap = null, this._load = null, e.autoLoad !== !1 && this.load();
12002
+ super(t), !t.complete && this._width && this._height && (this._width = 0, this._height = 0), this.url = t.src, this._process = null, this.preserveBitmap = !1, this.createBitmap = (e.createBitmap ?? j.CREATE_IMAGE_BITMAP) && !!globalThis.createImageBitmap, this.alphaMode = typeof e.alphaMode == "number" ? e.alphaMode : null, this.bitmap = null, this._load = null, e.autoLoad !== !1 && this.load();
12001
12003
  }
12002
12004
  /**
12003
12005
  * Returns a promise when image will be loaded and processed.
@@ -12204,7 +12206,7 @@ class Y extends bs {
12204
12206
  * @param {boolean} [strict] - Enforce strict-mode, see {@link PIXI.settings.STRICT_TEXTURE_CACHE}.
12205
12207
  * @returns {PIXI.Texture} The newly created texture
12206
12208
  */
12207
- static from(t, e = {}, i = W.STRICT_TEXTURE_CACHE) {
12209
+ static from(t, e = {}, i = j.STRICT_TEXTURE_CACHE) {
12208
12210
  const s = typeof t == "string";
12209
12211
  let n = null;
12210
12212
  if (s)
@@ -12362,7 +12364,7 @@ class Y extends bs {
12362
12364
  /** A white texture of 16x16 size, used for graphics and other things Can not be destroyed. */
12363
12365
  static get WHITE() {
12364
12366
  if (!Y._WHITE) {
12365
- const t = W.ADAPTER.createCanvas(16, 16), e = t.getContext("2d");
12367
+ const t = j.ADAPTER.createCanvas(16, 16), e = t.getContext("2d");
12366
12368
  t.width = 16, t.height = 16, e.fillStyle = "white", e.fillRect(0, 0, 16, 16), Y._WHITE = new Y(st.from(t)), Hs(Y._WHITE), Hs(Y._WHITE.baseTexture);
12367
12369
  }
12368
12370
  return Y._WHITE;
@@ -12846,7 +12848,7 @@ class Hd {
12846
12848
  const t = this.gl = this.renderer.gl;
12847
12849
  if (this.CONTEXT_UID = this.renderer.CONTEXT_UID, this.current = this.unknownFramebuffer, this.viewport = new at(), this.hasMRT = !0, this.writeDepthTexture = !0, this.renderer.context.webGLVersion === 1) {
12848
12850
  let e = this.renderer.context.extensions.drawBuffers, i = this.renderer.context.extensions.depthTexture;
12849
- W.PREFER_ENV === Yr.WEBGL_LEGACY && (e = null, i = null), e ? t.drawBuffers = (s) => e.drawBuffersWEBGL(s) : (this.hasMRT = !1, t.drawBuffers = () => {
12851
+ j.PREFER_ENV === Yr.WEBGL_LEGACY && (e = null, i = null), e ? t.drawBuffers = (s) => e.drawBuffersWEBGL(s) : (this.hasMRT = !1, t.drawBuffers = () => {
12850
12852
  }), i || (this.writeDepthTexture = !1);
12851
12853
  } else
12852
12854
  this.msaaSamples = t.getInternalformatParameter(t.RENDERBUFFER, t.RGBA8, t.SAMPLES);
@@ -13138,7 +13140,7 @@ class Xd {
13138
13140
  const t = this.gl = this.renderer.gl, e = this.renderer.context;
13139
13141
  if (this.CONTEXT_UID = this.renderer.CONTEXT_UID, e.webGLVersion !== 2) {
13140
13142
  let i = this.renderer.context.extensions.vertexArrayObject;
13141
- W.PREFER_ENV === Yr.WEBGL_LEGACY && (i = null), i ? (t.createVertexArray = () => i.createVertexArrayOES(), t.bindVertexArray = (s) => i.bindVertexArrayOES(s), t.deleteVertexArray = (s) => i.deleteVertexArrayOES(s)) : (this.hasVao = !1, t.createVertexArray = () => null, t.bindVertexArray = () => null, t.deleteVertexArray = () => null);
13143
+ j.PREFER_ENV === Yr.WEBGL_LEGACY && (i = null), i ? (t.createVertexArray = () => i.createVertexArrayOES(), t.bindVertexArray = (s) => i.bindVertexArrayOES(s), t.deleteVertexArray = (s) => i.deleteVertexArrayOES(s)) : (this.hasVao = !1, t.createVertexArray = () => null, t.bindVertexArray = () => null, t.deleteVertexArray = () => null);
13142
13144
  }
13143
13145
  if (e.webGLVersion !== 2) {
13144
13146
  const i = t.getExtension("ANGLE_instanced_arrays");
@@ -13652,7 +13654,7 @@ const Ac = new wt(), Sc = [], jd = class ln extends Wd {
13652
13654
  * @param {PIXI.Renderer} renderer - The renderer this System works for.
13653
13655
  */
13654
13656
  constructor(t) {
13655
- super(t), this.glConst = W.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST;
13657
+ super(t), this.glConst = j.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST;
13656
13658
  }
13657
13659
  getStackLength() {
13658
13660
  const t = this.maskStack[this.maskStack.length - 1];
@@ -13742,7 +13744,7 @@ class Yd extends Wd {
13742
13744
  * @param renderer - The renderer this System works for.
13743
13745
  */
13744
13746
  constructor(t) {
13745
- super(t), this.glConst = W.ADAPTER.getWebGLRenderingContext().STENCIL_TEST;
13747
+ super(t), this.glConst = j.ADAPTER.getWebGLRenderingContext().STENCIL_TEST;
13746
13748
  }
13747
13749
  getStackLength() {
13748
13750
  const t = this.maskStack[this.maskStack.length - 1];
@@ -14706,85 +14708,85 @@ let Fr = Qi;
14706
14708
  q.add(Fr);
14707
14709
  class Wo {
14708
14710
  constructor(t) {
14709
- this.texture = t, this.width = -1, this.height = -1, this.dirtyId = -1, this.dirtyStyleId = -1, this.mipmap = !1, this.wrapMode = 33071, this.type = J.UNSIGNED_BYTE, this.internalFormat = k.RGBA, this.samplerType = 0;
14711
+ this.texture = t, this.width = -1, this.height = -1, this.dirtyId = -1, this.dirtyStyleId = -1, this.mipmap = !1, this.wrapMode = 33071, this.type = Z.UNSIGNED_BYTE, this.internalFormat = k.RGBA, this.samplerType = 0;
14710
14712
  }
14711
14713
  }
14712
14714
  function I1(r) {
14713
14715
  let t;
14714
14716
  return "WebGL2RenderingContext" in globalThis && r instanceof globalThis.WebGL2RenderingContext ? t = {
14715
- [r.RGB]: z.FLOAT,
14716
- [r.RGBA]: z.FLOAT,
14717
- [r.ALPHA]: z.FLOAT,
14718
- [r.LUMINANCE]: z.FLOAT,
14719
- [r.LUMINANCE_ALPHA]: z.FLOAT,
14720
- [r.R8]: z.FLOAT,
14721
- [r.R8_SNORM]: z.FLOAT,
14722
- [r.RG8]: z.FLOAT,
14723
- [r.RG8_SNORM]: z.FLOAT,
14724
- [r.RGB8]: z.FLOAT,
14725
- [r.RGB8_SNORM]: z.FLOAT,
14726
- [r.RGB565]: z.FLOAT,
14727
- [r.RGBA4]: z.FLOAT,
14728
- [r.RGB5_A1]: z.FLOAT,
14729
- [r.RGBA8]: z.FLOAT,
14730
- [r.RGBA8_SNORM]: z.FLOAT,
14731
- [r.RGB10_A2]: z.FLOAT,
14732
- [r.RGB10_A2UI]: z.FLOAT,
14733
- [r.SRGB8]: z.FLOAT,
14734
- [r.SRGB8_ALPHA8]: z.FLOAT,
14735
- [r.R16F]: z.FLOAT,
14736
- [r.RG16F]: z.FLOAT,
14737
- [r.RGB16F]: z.FLOAT,
14738
- [r.RGBA16F]: z.FLOAT,
14739
- [r.R32F]: z.FLOAT,
14740
- [r.RG32F]: z.FLOAT,
14741
- [r.RGB32F]: z.FLOAT,
14742
- [r.RGBA32F]: z.FLOAT,
14743
- [r.R11F_G11F_B10F]: z.FLOAT,
14744
- [r.RGB9_E5]: z.FLOAT,
14745
- [r.R8I]: z.INT,
14746
- [r.R8UI]: z.UINT,
14747
- [r.R16I]: z.INT,
14748
- [r.R16UI]: z.UINT,
14749
- [r.R32I]: z.INT,
14750
- [r.R32UI]: z.UINT,
14751
- [r.RG8I]: z.INT,
14752
- [r.RG8UI]: z.UINT,
14753
- [r.RG16I]: z.INT,
14754
- [r.RG16UI]: z.UINT,
14755
- [r.RG32I]: z.INT,
14756
- [r.RG32UI]: z.UINT,
14757
- [r.RGB8I]: z.INT,
14758
- [r.RGB8UI]: z.UINT,
14759
- [r.RGB16I]: z.INT,
14760
- [r.RGB16UI]: z.UINT,
14761
- [r.RGB32I]: z.INT,
14762
- [r.RGB32UI]: z.UINT,
14763
- [r.RGBA8I]: z.INT,
14764
- [r.RGBA8UI]: z.UINT,
14765
- [r.RGBA16I]: z.INT,
14766
- [r.RGBA16UI]: z.UINT,
14767
- [r.RGBA32I]: z.INT,
14768
- [r.RGBA32UI]: z.UINT,
14769
- [r.DEPTH_COMPONENT16]: z.FLOAT,
14770
- [r.DEPTH_COMPONENT24]: z.FLOAT,
14771
- [r.DEPTH_COMPONENT32F]: z.FLOAT,
14772
- [r.DEPTH_STENCIL]: z.FLOAT,
14773
- [r.DEPTH24_STENCIL8]: z.FLOAT,
14774
- [r.DEPTH32F_STENCIL8]: z.FLOAT
14717
+ [r.RGB]: W.FLOAT,
14718
+ [r.RGBA]: W.FLOAT,
14719
+ [r.ALPHA]: W.FLOAT,
14720
+ [r.LUMINANCE]: W.FLOAT,
14721
+ [r.LUMINANCE_ALPHA]: W.FLOAT,
14722
+ [r.R8]: W.FLOAT,
14723
+ [r.R8_SNORM]: W.FLOAT,
14724
+ [r.RG8]: W.FLOAT,
14725
+ [r.RG8_SNORM]: W.FLOAT,
14726
+ [r.RGB8]: W.FLOAT,
14727
+ [r.RGB8_SNORM]: W.FLOAT,
14728
+ [r.RGB565]: W.FLOAT,
14729
+ [r.RGBA4]: W.FLOAT,
14730
+ [r.RGB5_A1]: W.FLOAT,
14731
+ [r.RGBA8]: W.FLOAT,
14732
+ [r.RGBA8_SNORM]: W.FLOAT,
14733
+ [r.RGB10_A2]: W.FLOAT,
14734
+ [r.RGB10_A2UI]: W.FLOAT,
14735
+ [r.SRGB8]: W.FLOAT,
14736
+ [r.SRGB8_ALPHA8]: W.FLOAT,
14737
+ [r.R16F]: W.FLOAT,
14738
+ [r.RG16F]: W.FLOAT,
14739
+ [r.RGB16F]: W.FLOAT,
14740
+ [r.RGBA16F]: W.FLOAT,
14741
+ [r.R32F]: W.FLOAT,
14742
+ [r.RG32F]: W.FLOAT,
14743
+ [r.RGB32F]: W.FLOAT,
14744
+ [r.RGBA32F]: W.FLOAT,
14745
+ [r.R11F_G11F_B10F]: W.FLOAT,
14746
+ [r.RGB9_E5]: W.FLOAT,
14747
+ [r.R8I]: W.INT,
14748
+ [r.R8UI]: W.UINT,
14749
+ [r.R16I]: W.INT,
14750
+ [r.R16UI]: W.UINT,
14751
+ [r.R32I]: W.INT,
14752
+ [r.R32UI]: W.UINT,
14753
+ [r.RG8I]: W.INT,
14754
+ [r.RG8UI]: W.UINT,
14755
+ [r.RG16I]: W.INT,
14756
+ [r.RG16UI]: W.UINT,
14757
+ [r.RG32I]: W.INT,
14758
+ [r.RG32UI]: W.UINT,
14759
+ [r.RGB8I]: W.INT,
14760
+ [r.RGB8UI]: W.UINT,
14761
+ [r.RGB16I]: W.INT,
14762
+ [r.RGB16UI]: W.UINT,
14763
+ [r.RGB32I]: W.INT,
14764
+ [r.RGB32UI]: W.UINT,
14765
+ [r.RGBA8I]: W.INT,
14766
+ [r.RGBA8UI]: W.UINT,
14767
+ [r.RGBA16I]: W.INT,
14768
+ [r.RGBA16UI]: W.UINT,
14769
+ [r.RGBA32I]: W.INT,
14770
+ [r.RGBA32UI]: W.UINT,
14771
+ [r.DEPTH_COMPONENT16]: W.FLOAT,
14772
+ [r.DEPTH_COMPONENT24]: W.FLOAT,
14773
+ [r.DEPTH_COMPONENT32F]: W.FLOAT,
14774
+ [r.DEPTH_STENCIL]: W.FLOAT,
14775
+ [r.DEPTH24_STENCIL8]: W.FLOAT,
14776
+ [r.DEPTH32F_STENCIL8]: W.FLOAT
14775
14777
  } : t = {
14776
- [r.RGB]: z.FLOAT,
14777
- [r.RGBA]: z.FLOAT,
14778
- [r.ALPHA]: z.FLOAT,
14779
- [r.LUMINANCE]: z.FLOAT,
14780
- [r.LUMINANCE_ALPHA]: z.FLOAT,
14781
- [r.DEPTH_STENCIL]: z.FLOAT
14778
+ [r.RGB]: W.FLOAT,
14779
+ [r.RGBA]: W.FLOAT,
14780
+ [r.ALPHA]: W.FLOAT,
14781
+ [r.LUMINANCE]: W.FLOAT,
14782
+ [r.LUMINANCE_ALPHA]: W.FLOAT,
14783
+ [r.DEPTH_STENCIL]: W.FLOAT
14782
14784
  }, t;
14783
14785
  }
14784
14786
  function C1(r) {
14785
14787
  let t;
14786
14788
  return "WebGL2RenderingContext" in globalThis && r instanceof globalThis.WebGL2RenderingContext ? t = {
14787
- [J.UNSIGNED_BYTE]: {
14789
+ [Z.UNSIGNED_BYTE]: {
14788
14790
  [k.RGBA]: r.RGBA8,
14789
14791
  [k.RGB]: r.RGB8,
14790
14792
  [k.RG]: r.RG8,
@@ -14797,7 +14799,7 @@ function C1(r) {
14797
14799
  [k.LUMINANCE]: r.LUMINANCE,
14798
14800
  [k.LUMINANCE_ALPHA]: r.LUMINANCE_ALPHA
14799
14801
  },
14800
- [J.BYTE]: {
14802
+ [Z.BYTE]: {
14801
14803
  [k.RGBA]: r.RGBA8_SNORM,
14802
14804
  [k.RGB]: r.RGB8_SNORM,
14803
14805
  [k.RG]: r.RG8_SNORM,
@@ -14807,85 +14809,85 @@ function C1(r) {
14807
14809
  [k.RG_INTEGER]: r.RG8I,
14808
14810
  [k.RED_INTEGER]: r.R8I
14809
14811
  },
14810
- [J.UNSIGNED_SHORT]: {
14812
+ [Z.UNSIGNED_SHORT]: {
14811
14813
  [k.RGBA_INTEGER]: r.RGBA16UI,
14812
14814
  [k.RGB_INTEGER]: r.RGB16UI,
14813
14815
  [k.RG_INTEGER]: r.RG16UI,
14814
14816
  [k.RED_INTEGER]: r.R16UI,
14815
14817
  [k.DEPTH_COMPONENT]: r.DEPTH_COMPONENT16
14816
14818
  },
14817
- [J.SHORT]: {
14819
+ [Z.SHORT]: {
14818
14820
  [k.RGBA_INTEGER]: r.RGBA16I,
14819
14821
  [k.RGB_INTEGER]: r.RGB16I,
14820
14822
  [k.RG_INTEGER]: r.RG16I,
14821
14823
  [k.RED_INTEGER]: r.R16I
14822
14824
  },
14823
- [J.UNSIGNED_INT]: {
14825
+ [Z.UNSIGNED_INT]: {
14824
14826
  [k.RGBA_INTEGER]: r.RGBA32UI,
14825
14827
  [k.RGB_INTEGER]: r.RGB32UI,
14826
14828
  [k.RG_INTEGER]: r.RG32UI,
14827
14829
  [k.RED_INTEGER]: r.R32UI,
14828
14830
  [k.DEPTH_COMPONENT]: r.DEPTH_COMPONENT24
14829
14831
  },
14830
- [J.INT]: {
14832
+ [Z.INT]: {
14831
14833
  [k.RGBA_INTEGER]: r.RGBA32I,
14832
14834
  [k.RGB_INTEGER]: r.RGB32I,
14833
14835
  [k.RG_INTEGER]: r.RG32I,
14834
14836
  [k.RED_INTEGER]: r.R32I
14835
14837
  },
14836
- [J.FLOAT]: {
14838
+ [Z.FLOAT]: {
14837
14839
  [k.RGBA]: r.RGBA32F,
14838
14840
  [k.RGB]: r.RGB32F,
14839
14841
  [k.RG]: r.RG32F,
14840
14842
  [k.RED]: r.R32F,
14841
14843
  [k.DEPTH_COMPONENT]: r.DEPTH_COMPONENT32F
14842
14844
  },
14843
- [J.HALF_FLOAT]: {
14845
+ [Z.HALF_FLOAT]: {
14844
14846
  [k.RGBA]: r.RGBA16F,
14845
14847
  [k.RGB]: r.RGB16F,
14846
14848
  [k.RG]: r.RG16F,
14847
14849
  [k.RED]: r.R16F
14848
14850
  },
14849
- [J.UNSIGNED_SHORT_5_6_5]: {
14851
+ [Z.UNSIGNED_SHORT_5_6_5]: {
14850
14852
  [k.RGB]: r.RGB565
14851
14853
  },
14852
- [J.UNSIGNED_SHORT_4_4_4_4]: {
14854
+ [Z.UNSIGNED_SHORT_4_4_4_4]: {
14853
14855
  [k.RGBA]: r.RGBA4
14854
14856
  },
14855
- [J.UNSIGNED_SHORT_5_5_5_1]: {
14857
+ [Z.UNSIGNED_SHORT_5_5_5_1]: {
14856
14858
  [k.RGBA]: r.RGB5_A1
14857
14859
  },
14858
- [J.UNSIGNED_INT_2_10_10_10_REV]: {
14860
+ [Z.UNSIGNED_INT_2_10_10_10_REV]: {
14859
14861
  [k.RGBA]: r.RGB10_A2,
14860
14862
  [k.RGBA_INTEGER]: r.RGB10_A2UI
14861
14863
  },
14862
- [J.UNSIGNED_INT_10F_11F_11F_REV]: {
14864
+ [Z.UNSIGNED_INT_10F_11F_11F_REV]: {
14863
14865
  [k.RGB]: r.R11F_G11F_B10F
14864
14866
  },
14865
- [J.UNSIGNED_INT_5_9_9_9_REV]: {
14867
+ [Z.UNSIGNED_INT_5_9_9_9_REV]: {
14866
14868
  [k.RGB]: r.RGB9_E5
14867
14869
  },
14868
- [J.UNSIGNED_INT_24_8]: {
14870
+ [Z.UNSIGNED_INT_24_8]: {
14869
14871
  [k.DEPTH_STENCIL]: r.DEPTH24_STENCIL8
14870
14872
  },
14871
- [J.FLOAT_32_UNSIGNED_INT_24_8_REV]: {
14873
+ [Z.FLOAT_32_UNSIGNED_INT_24_8_REV]: {
14872
14874
  [k.DEPTH_STENCIL]: r.DEPTH32F_STENCIL8
14873
14875
  }
14874
14876
  } : t = {
14875
- [J.UNSIGNED_BYTE]: {
14877
+ [Z.UNSIGNED_BYTE]: {
14876
14878
  [k.RGBA]: r.RGBA,
14877
14879
  [k.RGB]: r.RGB,
14878
14880
  [k.ALPHA]: r.ALPHA,
14879
14881
  [k.LUMINANCE]: r.LUMINANCE,
14880
14882
  [k.LUMINANCE_ALPHA]: r.LUMINANCE_ALPHA
14881
14883
  },
14882
- [J.UNSIGNED_SHORT_5_6_5]: {
14884
+ [Z.UNSIGNED_SHORT_5_6_5]: {
14883
14885
  [k.RGB]: r.RGB
14884
14886
  },
14885
- [J.UNSIGNED_SHORT_4_4_4_4]: {
14887
+ [Z.UNSIGNED_SHORT_4_4_4_4]: {
14886
14888
  [k.RGBA]: r.RGBA
14887
14889
  },
14888
- [J.UNSIGNED_SHORT_5_5_5_1]: {
14890
+ [Z.UNSIGNED_SHORT_5_5_5_1]: {
14889
14891
  [k.RGBA]: r.RGBA
14890
14892
  }
14891
14893
  }, t;
@@ -14960,7 +14962,7 @@ class rf {
14960
14962
  if (i)
14961
14963
  for (let n = t - 1; n >= 0; --n) {
14962
14964
  const o = e[n];
14963
- o && o._glTextures[s].samplerType !== z.FLOAT && this.renderer.texture.unbind(o);
14965
+ o && o._glTextures[s].samplerType !== W.FLOAT && this.renderer.texture.unbind(o);
14964
14966
  }
14965
14967
  }
14966
14968
  /**
@@ -14974,7 +14976,7 @@ class rf {
14974
14976
  }
14975
14977
  initTextureType(t, e) {
14976
14978
  var i;
14977
- e.internalFormat = ((i = this.internalFormats[t.type]) == null ? void 0 : i[t.format]) ?? t.format, e.samplerType = this.samplerTypes[e.internalFormat] ?? z.FLOAT, this.webGLVersion === 2 && t.type === J.HALF_FLOAT ? e.type = this.gl.HALF_FLOAT : e.type = t.type;
14979
+ e.internalFormat = ((i = this.internalFormats[t.type]) == null ? void 0 : i[t.format]) ?? t.format, e.samplerType = this.samplerTypes[e.internalFormat] ?? W.FLOAT, this.webGLVersion === 2 && t.type === Z.HALF_FLOAT ? e.type = this.gl.HALF_FLOAT : e.type = t.type;
14978
14980
  }
14979
14981
  /**
14980
14982
  * Update a texture
@@ -14988,7 +14990,7 @@ class rf {
14988
14990
  return;
14989
14991
  const i = this.renderer;
14990
14992
  if (this.initTextureType(t, e), (s = t.resource) == null ? void 0 : s.upload(i, t, e))
14991
- e.samplerType !== z.FLOAT && (this.hasIntegerTextures = !0);
14993
+ e.samplerType !== W.FLOAT && (this.hasIntegerTextures = !0);
14992
14994
  else {
14993
14995
  const n = t.realWidth, o = t.realHeight, a = i.gl;
14994
14996
  (e.width !== n || e.height !== o || e.dirtyId < 0) && (e.width = n, e.height = o, a.texImage2D(
@@ -15145,7 +15147,7 @@ class Bn {
15145
15147
  * @param {PIXI.ViewOptions} options - the options for the view
15146
15148
  */
15147
15149
  init(t) {
15148
- this.screen = new at(0, 0, t.width, t.height), this.element = t.view || W.ADAPTER.createCanvas(), this.resolution = t.resolution || W.RESOLUTION, this.autoDensity = !!t.autoDensity;
15150
+ this.screen = new at(0, 0, t.width, t.height), this.element = t.view || j.ADAPTER.createCanvas(), this.resolution = t.resolution || j.RESOLUTION, this.autoDensity = !!t.autoDensity;
15149
15151
  }
15150
15152
  /**
15151
15153
  * Resizes the screen and canvas to the specified dimensions.
@@ -15201,15 +15203,15 @@ Bn.extension = {
15201
15203
  name: "_view"
15202
15204
  };
15203
15205
  q.add(Bn);
15204
- W.PREFER_ENV = Yr.WEBGL2;
15205
- W.STRICT_TEXTURE_CACHE = !1;
15206
- W.RENDER_OPTIONS = {
15206
+ j.PREFER_ENV = Yr.WEBGL2;
15207
+ j.STRICT_TEXTURE_CACHE = !1;
15208
+ j.RENDER_OPTIONS = {
15207
15209
  ...Pn.defaultOptions,
15208
15210
  ...Rn.defaultOptions,
15209
15211
  ...Bn.defaultOptions,
15210
15212
  ...Mn.defaultOptions
15211
15213
  };
15212
- Object.defineProperties(W, {
15214
+ Object.defineProperties(j, {
15213
15215
  /**
15214
15216
  * @static
15215
15217
  * @name WRAP_MODE
@@ -15778,7 +15780,7 @@ const nf = class re {
15778
15780
  };
15779
15781
  nf.targetFPMS = 0.06;
15780
15782
  let ne = nf;
15781
- Object.defineProperties(W, {
15783
+ Object.defineProperties(j, {
15782
15784
  /**
15783
15785
  * Target frames per millisecond.
15784
15786
  * @static
@@ -16055,7 +16057,7 @@ const cn = class Ha extends S1 {
16055
16057
  * @param {PIXI.IRendererOptions} [options] - See {@link PIXI.settings.RENDER_OPTIONS} for defaults.
16056
16058
  */
16057
16059
  constructor(t) {
16058
- super(), this.type = Ku.WEBGL, t = Object.assign({}, W.RENDER_OPTIONS, t), this.gl = null, this.CONTEXT_UID = 0, this.globalUniforms = new we({
16060
+ super(), this.type = Ku.WEBGL, t = Object.assign({}, j.RENDER_OPTIONS, t), this.gl = null, this.CONTEXT_UID = 0, this.globalUniforms = new we({
16059
16061
  projectionMatrix: new wt()
16060
16062
  }, !0);
16061
16063
  const e = {
@@ -16565,7 +16567,7 @@ class yi extends lr {
16565
16567
  return;
16566
16568
  }
16567
16569
  try {
16568
- const i = await W.ADAPTER.fetch(this.url, {
16570
+ const i = await j.ADAPTER.fetch(this.url, {
16569
16571
  mode: this.crossOrigin ? "cors" : "no-cors"
16570
16572
  });
16571
16573
  if (this.destroyed)
@@ -16616,7 +16618,7 @@ class yi extends lr {
16616
16618
  * @returns The cached placeholder canvas.
16617
16619
  */
16618
16620
  static get EMPTY() {
16619
- return yi._EMPTY = yi._EMPTY ?? W.ADAPTER.createCanvas(0, 0), yi._EMPTY;
16621
+ return yi._EMPTY = yi._EMPTY ?? j.ADAPTER.createCanvas(0, 0), yi._EMPTY;
16620
16622
  }
16621
16623
  }
16622
16624
  const Xa = class un extends lr {
@@ -16629,7 +16631,7 @@ const Xa = class un extends lr {
16629
16631
  * @param {boolean} [options.autoLoad=true] - Start loading right away.
16630
16632
  */
16631
16633
  constructor(t, e) {
16632
- e = e || {}, super(W.ADAPTER.createCanvas()), this._width = 0, this._height = 0, this.svg = t, this.scale = e.scale || 1, this._overrideWidth = e.width, this._overrideHeight = e.height, this._resolve = null, this._crossorigin = e.crossorigin, this._load = null, e.autoLoad !== !1 && this.load();
16634
+ e = e || {}, super(j.ADAPTER.createCanvas()), this._width = 0, this._height = 0, this.svg = t, this.scale = e.scale || 1, this._overrideWidth = e.width, this._overrideHeight = e.height, this._resolve = null, this._crossorigin = e.crossorigin, this._load = null, e.autoLoad !== !1 && this.load();
16633
16635
  }
16634
16636
  load() {
16635
16637
  return this._load ? this._load : (this._load = new Promise((t) => {
@@ -17733,7 +17735,7 @@ const gf = class ja extends Rt {
17733
17735
  gf.defaultSortableChildren = !1;
17734
17736
  let Ae = gf;
17735
17737
  Ae.prototype.containerUpdateTransform = Ae.prototype.updateTransform;
17736
- Object.defineProperties(W, {
17738
+ Object.defineProperties(j, {
17737
17739
  /**
17738
17740
  * Sets the default value for the container property 'sortableChildren'.
17739
17741
  * @static
@@ -17761,7 +17763,7 @@ class ki extends Ae {
17761
17763
  this,
17762
17764
  t ? t.defaultAnchor.x : 0,
17763
17765
  t ? t.defaultAnchor.y : 0
17764
- ), this._texture = null, this._width = 0, this._height = 0, this._tintColor = new bt(16777215), this._tintRGB = null, this.tint = 16777215, this.blendMode = tt.NORMAL, this._cachedTint = 16777215, this.uvs = null, this.texture = t || Y.EMPTY, this.vertexData = new Float32Array(8), this.vertexTrimmedData = null, this._transformID = -1, this._textureID = -1, this._transformTrimmedID = -1, this._textureTrimmedID = -1, this.indices = G1, this.pluginName = "batch", this.isSprite = !0, this._roundPixels = W.ROUND_PIXELS;
17766
+ ), this._texture = null, this._width = 0, this._height = 0, this._tintColor = new bt(16777215), this._tintRGB = null, this.tint = 16777215, this.blendMode = tt.NORMAL, this._cachedTint = 16777215, this.uvs = null, this.texture = t || Y.EMPTY, this.vertexData = new Float32Array(8), this.vertexTrimmedData = null, this._transformID = -1, this._textureID = -1, this._transformTrimmedID = -1, this._textureTrimmedID = -1, this.indices = G1, this.pluginName = "batch", this.isSprite = !0, this._roundPixels = j.ROUND_PIXELS;
17765
17767
  }
17766
17768
  /** When the texture is updated, this event will fire to update the scale and frame. */
17767
17769
  _onTextureUpdate() {
@@ -17780,7 +17782,7 @@ class ki extends Ae {
17780
17782
  const e = this.transform.worldTransform, i = e.a, s = e.b, n = e.c, o = e.d, a = e.tx, l = e.ty, h = this.vertexData, c = t.trim, u = t.orig, d = this._anchor;
17781
17783
  let f = 0, p = 0, m = 0, _ = 0;
17782
17784
  if (c ? (p = c.x - d._x * u.width, f = p + c.width, _ = c.y - d._y * u.height, m = _ + c.height) : (p = -d._x * u.width, f = p + u.width, _ = -d._y * u.height, m = _ + u.height), h[0] = i * p + n * _ + a, h[1] = o * _ + s * p + l, h[2] = i * f + n * _ + a, h[3] = o * _ + s * f + l, h[4] = i * f + n * m + a, h[5] = o * m + s * f + l, h[6] = i * p + n * m + a, h[7] = o * m + s * p + l, this._roundPixels) {
17783
- const y = W.RESOLUTION;
17785
+ const y = j.RESOLUTION;
17784
17786
  for (let x = 0; x < h.length; ++x)
17785
17787
  h[x] = Math.round(h[x] * y) / y;
17786
17788
  }
@@ -17798,7 +17800,7 @@ class ki extends Ae {
17798
17800
  this._transformTrimmedID = this.transform._worldID, this._textureTrimmedID = this._texture._updateID;
17799
17801
  const t = this._texture, e = this.vertexTrimmedData, i = t.orig, s = this._anchor, n = this.transform.worldTransform, o = n.a, a = n.b, l = n.c, h = n.d, c = n.tx, u = n.ty, d = -s._x * i.width, f = d + i.width, p = -s._y * i.height, m = p + i.height;
17800
17802
  if (e[0] = o * d + l * p + c, e[1] = h * p + a * d + u, e[2] = o * f + l * p + c, e[3] = h * p + a * f + u, e[4] = o * f + l * m + c, e[5] = h * m + a * f + u, e[6] = o * d + l * m + c, e[7] = h * m + a * d + u, this._roundPixels) {
17801
- const _ = W.RESOLUTION;
17803
+ const _ = j.RESOLUTION;
17802
17804
  for (let y = 0; y < e.length; ++y)
17803
17805
  e[y] = Math.round(e[y] * _) / _;
17804
17806
  }
@@ -21778,7 +21780,7 @@ const Tx = ".json", Ax = "application/json", Sx = {
21778
21780
  return Gi(r, Ax) || Ir(r, Tx);
21779
21781
  },
21780
21782
  async load(r) {
21781
- return await (await W.ADAPTER.fetch(r)).json();
21783
+ return await (await j.ADAPTER.fetch(r)).json();
21782
21784
  }
21783
21785
  };
21784
21786
  q.add(Sx);
@@ -21792,7 +21794,7 @@ const Ix = ".txt", Cx = "text/plain", Rx = {
21792
21794
  return Gi(r, Cx) || Ir(r, Ix);
21793
21795
  },
21794
21796
  async load(r) {
21795
- return await (await W.ADAPTER.fetch(r)).text();
21797
+ return await (await j.ADAPTER.fetch(r)).text();
21796
21798
  }
21797
21799
  };
21798
21800
  q.add(Rx);
@@ -21840,7 +21842,7 @@ const Nx = {
21840
21842
  },
21841
21843
  async load(r, t) {
21842
21844
  var i, s, n;
21843
- const e = W.ADAPTER.getFontFaceSet();
21845
+ const e = j.ADAPTER.getFontFaceSet();
21844
21846
  if (e) {
21845
21847
  const o = [], a = ((i = t.data) == null ? void 0 : i.family) ?? Ox(r), l = ((n = (s = t.data) == null ? void 0 : s.weights) == null ? void 0 : n.filter((c) => Px.includes(c))) ?? ["normal"], h = t.data ?? {};
21846
21848
  for (let c = 0; c < l.length; c++) {
@@ -21855,7 +21857,7 @@ const Nx = {
21855
21857
  return console.warn("[loadWebFont] FontFace API is not supported. Skipping loading font"), null;
21856
21858
  },
21857
21859
  unload(r) {
21858
- (Array.isArray(r) ? r : [r]).forEach((t) => W.ADAPTER.getFontFaceSet().delete(t));
21860
+ (Array.isArray(r) ? r : [r]).forEach((t) => j.ADAPTER.getFontFaceSet().delete(t));
21859
21861
  }
21860
21862
  };
21861
21863
  q.add(Nx);
@@ -21993,7 +21995,7 @@ const $x = [".jpeg", ".jpg", ".png", ".webp", ".avif"], Hx = [
21993
21995
  "image/avif"
21994
21996
  ];
21995
21997
  async function Xx(r) {
21996
- const t = await W.ADAPTER.fetch(r);
21998
+ const t = await j.ADAPTER.fetch(r);
21997
21999
  if (!t.ok)
21998
22000
  throw new Error(`[loadImageBitmap] Failed to fetch ${r}: ${t.status} ${t.statusText}`);
21999
22001
  const e = await t.blob();
@@ -22054,7 +22056,7 @@ const Vx = ".svg", zx = "image/svg+xml", Wx = {
22054
22056
  return s.resource.src = t.src, As(s, e, t.src);
22055
22057
  },
22056
22058
  async load(r, t) {
22057
- return (await W.ADAPTER.fetch(r)).text();
22059
+ return (await j.ADAPTER.fetch(r)).text();
22058
22060
  },
22059
22061
  unload: Jn.unload
22060
22062
  };
@@ -22082,7 +22084,7 @@ const jx = [".mp4", ".m4v", ".webm", ".ogv"], Yx = [
22082
22084
  async load(r, t, e) {
22083
22085
  var o;
22084
22086
  let i;
22085
- const s = await (await W.ADAPTER.fetch(r)).blob(), n = URL.createObjectURL(s);
22087
+ const s = await (await j.ADAPTER.fetch(r)).blob(), n = URL.createObjectURL(s);
22086
22088
  try {
22087
22089
  const a = {
22088
22090
  autoPlay: this.config.defaultAutoPlay,
@@ -22926,7 +22928,7 @@ const ob = {
22926
22928
  parse: (r) => {
22927
22929
  var t;
22928
22930
  return {
22929
- resolution: parseFloat(((t = W.RETINA_PREFIX.exec(r)) == null ? void 0 : t[1]) ?? "1"),
22931
+ resolution: parseFloat(((t = j.RETINA_PREFIX.exec(r)) == null ? void 0 : t[1]) ?? "1"),
22930
22932
  format: kt.extname(r).slice(1),
22931
22933
  src: r
22932
22934
  };
@@ -23001,7 +23003,7 @@ const ab = {
23001
23003
  priority: 2
23002
23004
  },
23003
23005
  test: async () => {
23004
- const r = W.ADAPTER.createCanvas().getContext("webgl");
23006
+ const r = j.ADAPTER.createCanvas().getContext("webgl");
23005
23007
  return r ? (De = r, !0) : (console.warn("WebGL not available for compressed textures."), !1);
23006
23008
  },
23007
23009
  add: async (r) => {
@@ -23255,12 +23257,12 @@ const Uc = [171, 75, 84, 88, 32, 49, 49, 187, 13, 10, 26, 10], Sb = 67305985, me
23255
23257
  NUMBER_OF_MIPMAP_LEVELS: 56,
23256
23258
  BYTES_OF_KEY_VALUE_DATA: 60
23257
23259
  }, rl = 64, kc = {
23258
- [J.UNSIGNED_BYTE]: 1,
23259
- [J.UNSIGNED_SHORT]: 2,
23260
- [J.INT]: 4,
23261
- [J.UNSIGNED_INT]: 4,
23262
- [J.FLOAT]: 4,
23263
- [J.HALF_FLOAT]: 8
23260
+ [Z.UNSIGNED_BYTE]: 1,
23261
+ [Z.UNSIGNED_SHORT]: 2,
23262
+ [Z.INT]: 4,
23263
+ [Z.UNSIGNED_INT]: 4,
23264
+ [Z.FLOAT]: 4,
23265
+ [Z.HALF_FLOAT]: 8
23264
23266
  }, Ib = {
23265
23267
  [k.RGBA]: 4,
23266
23268
  [k.RGB]: 3,
@@ -23270,9 +23272,9 @@ const Uc = [171, 75, 84, 88, 32, 49, 49, 187, 13, 10, 26, 10], Sb = 67305985, me
23270
23272
  [k.LUMINANCE_ALPHA]: 2,
23271
23273
  [k.ALPHA]: 1
23272
23274
  }, Cb = {
23273
- [J.UNSIGNED_SHORT_4_4_4_4]: 2,
23274
- [J.UNSIGNED_SHORT_5_5_5_1]: 2,
23275
- [J.UNSIGNED_SHORT_5_6_5]: 2
23275
+ [Z.UNSIGNED_SHORT_4_4_4_4]: 2,
23276
+ [Z.UNSIGNED_SHORT_5_5_5_1]: 2,
23277
+ [Z.UNSIGNED_SHORT_5_6_5]: 2
23276
23278
  };
23277
23279
  function Rb(r, t, e = !1) {
23278
23280
  const i = new DataView(t);
@@ -23292,47 +23294,47 @@ function Rb(r, t, e = !1) {
23292
23294
  if (n !== 0 ? kc[n] ? w = kc[n] * Ib[o] : w = Cb[n] : w = Ln[a], w === void 0)
23293
23295
  throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");
23294
23296
  const I = e ? Bb(i, p, s) : null;
23295
- let A = v * w, C = l, N = h, S = y, R = x, E = rl + p;
23297
+ let A = v * w, C = l, N = h, S = y, P = x, E = rl + p;
23296
23298
  for (let b = 0; b < f; b++) {
23297
- const D = i.getUint32(E, s);
23298
- let F = E + 4;
23299
+ const B = i.getUint32(E, s);
23300
+ let O = E + 4;
23299
23301
  for (let G = 0; G < u; G++) {
23300
23302
  let $ = g[G];
23301
23303
  $ || ($ = g[G] = new Array(f)), $[b] = {
23302
23304
  levelID: b,
23303
23305
  // don't align mipWidth when texture not compressed! (glType not zero)
23304
23306
  levelWidth: f > 1 || n !== 0 ? C : S,
23305
- levelHeight: f > 1 || n !== 0 ? N : R,
23306
- levelBuffer: new Uint8Array(t, F, A)
23307
- }, F += A;
23307
+ levelHeight: f > 1 || n !== 0 ? N : P,
23308
+ levelBuffer: new Uint8Array(t, O, A)
23309
+ }, O += A;
23308
23310
  }
23309
- E += D + 4, E = E % 4 !== 0 ? E + 4 - E % 4 : E, C = C >> 1 || 1, N = N >> 1 || 1, S = C + m - 1 & ~(m - 1), R = N + _ - 1 & ~(_ - 1), A = S * R * w;
23311
+ E += B + 4, E = E % 4 !== 0 ? E + 4 - E % 4 : E, C = C >> 1 || 1, N = N >> 1 || 1, S = C + m - 1 & ~(m - 1), P = N + _ - 1 & ~(_ - 1), A = S * P * w;
23310
23312
  }
23311
23313
  return n !== 0 ? {
23312
23314
  uncompressed: g.map((b) => {
23313
- let D = b[0].levelBuffer, F = !1;
23314
- return n === J.FLOAT ? D = new Float32Array(
23315
+ let B = b[0].levelBuffer, O = !1;
23316
+ return n === Z.FLOAT ? B = new Float32Array(
23315
23317
  b[0].levelBuffer.buffer,
23316
23318
  b[0].levelBuffer.byteOffset,
23317
23319
  b[0].levelBuffer.byteLength / 4
23318
- ) : n === J.UNSIGNED_INT ? (F = !0, D = new Uint32Array(
23320
+ ) : n === Z.UNSIGNED_INT ? (O = !0, B = new Uint32Array(
23319
23321
  b[0].levelBuffer.buffer,
23320
23322
  b[0].levelBuffer.byteOffset,
23321
23323
  b[0].levelBuffer.byteLength / 4
23322
- )) : n === J.INT && (F = !0, D = new Int32Array(
23324
+ )) : n === Z.INT && (O = !0, B = new Int32Array(
23323
23325
  b[0].levelBuffer.buffer,
23324
23326
  b[0].levelBuffer.byteOffset,
23325
23327
  b[0].levelBuffer.byteLength / 4
23326
23328
  )), {
23327
23329
  resource: new jn(
23328
- D,
23330
+ B,
23329
23331
  {
23330
23332
  width: b[0].levelWidth,
23331
23333
  height: b[0].levelHeight
23332
23334
  }
23333
23335
  ),
23334
23336
  type: n,
23335
- format: F ? Mb(o) : o
23337
+ format: O ? Mb(o) : o
23336
23338
  };
23337
23339
  }),
23338
23340
  kvData: I
@@ -23404,7 +23406,7 @@ const Db = {
23404
23406
  return Ir(r, ".dds");
23405
23407
  },
23406
23408
  async load(r, t, e) {
23407
- const i = await (await W.ADAPTER.fetch(r)).arrayBuffer(), s = Ab(i).map((n) => {
23409
+ const i = await (await j.ADAPTER.fetch(r)).arrayBuffer(), s = Ab(i).map((n) => {
23408
23410
  const o = new st(n, {
23409
23411
  mipmap: Ve.OFF,
23410
23412
  alphaMode: ee.NO_PREMULTIPLIED_ALPHA,
@@ -23430,7 +23432,7 @@ const Ob = {
23430
23432
  return Ir(r, ".ktx");
23431
23433
  },
23432
23434
  async load(r, t, e) {
23433
- const i = await (await W.ADAPTER.fetch(r)).arrayBuffer(), { compressed: s, uncompressed: n, kvData: o } = Rb(r, i), a = s ?? n, l = {
23435
+ const i = await (await j.ADAPTER.fetch(r)).arrayBuffer(), { compressed: s, uncompressed: n, kvData: o } = Rb(r, i), a = s ?? n, l = {
23434
23436
  mipmap: Ve.OFF,
23435
23437
  alphaMode: ee.NO_PREMULTIPLIED_ALPHA,
23436
23438
  resolution: ar(r),
@@ -23463,13 +23465,13 @@ const Fb = ["s3tc", "s3tc_sRGB", "etc", "etc1", "pvrtc", "atc", "astc", "bptc"],
23463
23465
  const n = t.pop();
23464
23466
  if (Fb.includes(n))
23465
23467
  return {
23466
- resolution: parseFloat(((i = W.RETINA_PREFIX.exec(r)) == null ? void 0 : i[1]) ?? "1"),
23468
+ resolution: parseFloat(((i = j.RETINA_PREFIX.exec(r)) == null ? void 0 : i[1]) ?? "1"),
23467
23469
  format: n,
23468
23470
  src: r
23469
23471
  };
23470
23472
  }
23471
23473
  return {
23472
- resolution: parseFloat(((s = W.RETINA_PREFIX.exec(r)) == null ? void 0 : s[1]) ?? "1"),
23474
+ resolution: parseFloat(((s = j.RETINA_PREFIX.exec(r)) == null ? void 0 : s[1]) ?? "1"),
23473
23475
  format: e,
23474
23476
  src: r
23475
23477
  };
@@ -23801,13 +23803,13 @@ class $c {
23801
23803
  const a = o[o.length - 2], l = o[o.length - 1] - e, h = a - t, c = s - e, u = i - t, d = Math.abs(l * u - h * c);
23802
23804
  if (d < 1e-8 || n === 0)
23803
23805
  return (o[o.length - 2] !== t || o[o.length - 1] !== e) && o.push(t, e), null;
23804
- const f = l * l + h * h, p = c * c + u * u, m = l * c + h * u, _ = n * Math.sqrt(f) / d, y = n * Math.sqrt(p) / d, x = _ * m / f, g = y * m / p, v = _ * u + y * h, w = _ * c + y * l, I = h * (y + x), A = l * (y + x), C = u * (_ + g), N = c * (_ + g), S = Math.atan2(A - w, I - v), R = Math.atan2(N - w, C - v);
23806
+ const f = l * l + h * h, p = c * c + u * u, m = l * c + h * u, _ = n * Math.sqrt(f) / d, y = n * Math.sqrt(p) / d, x = _ * m / f, g = y * m / p, v = _ * u + y * h, w = _ * c + y * l, I = h * (y + x), A = l * (y + x), C = u * (_ + g), N = c * (_ + g), S = Math.atan2(A - w, I - v), P = Math.atan2(N - w, C - v);
23805
23807
  return {
23806
23808
  cx: v + t,
23807
23809
  cy: w + e,
23808
23810
  radius: n,
23809
23811
  startAngle: S,
23810
- endAngle: R,
23812
+ endAngle: P,
23811
23813
  anticlockwise: h * c > u * l
23812
23814
  };
23813
23815
  }
@@ -23986,40 +23988,40 @@ function Hb(r, t) {
23986
23988
  const n = r.lineStyle, o = new gt(i[0], i[1]), a = new gt(i[i.length - 2], i[i.length - 1]), l = e.type !== Wt.POLY || e.closeStroke, h = Math.abs(o.x - a.x) < s && Math.abs(o.y - a.y) < s;
23987
23989
  if (l) {
23988
23990
  i = i.slice(), h && (i.pop(), i.pop(), a.set(i[i.length - 2], i[i.length - 1]));
23989
- const $ = (o.x + a.x) * 0.5, M = (a.y + o.y) * 0.5;
23990
- i.unshift($, M), i.push($, M);
23991
+ const $ = (o.x + a.x) * 0.5, F = (a.y + o.y) * 0.5;
23992
+ i.unshift($, F), i.push($, F);
23991
23993
  }
23992
23994
  const c = t.points, u = i.length / 2;
23993
23995
  let d = i.length;
23994
23996
  const f = c.length / 2, p = n.width / 2, m = p * p, _ = n.miterLimit * n.miterLimit;
23995
- let y = i[0], x = i[1], g = i[2], v = i[3], w = 0, I = 0, A = -(x - v), C = y - g, N = 0, S = 0, R = Math.sqrt(A * A + C * C);
23996
- A /= R, C /= R, A *= p, C *= p;
23997
- const E = n.alignment, b = (1 - E) * 2, D = E * 2;
23997
+ let y = i[0], x = i[1], g = i[2], v = i[3], w = 0, I = 0, A = -(x - v), C = y - g, N = 0, S = 0, P = Math.sqrt(A * A + C * C);
23998
+ A /= P, C /= P, A *= p, C *= p;
23999
+ const E = n.alignment, b = (1 - E) * 2, B = E * 2;
23998
24000
  l || (n.cap === br.ROUND ? d += Rr(
23999
- y - A * (b - D) * 0.5,
24000
- x - C * (b - D) * 0.5,
24001
+ y - A * (b - B) * 0.5,
24002
+ x - C * (b - B) * 0.5,
24001
24003
  y - A * b,
24002
24004
  x - C * b,
24003
- y + A * D,
24004
- x + C * D,
24005
+ y + A * B,
24006
+ x + C * B,
24005
24007
  c,
24006
24008
  !0
24007
- ) + 2 : n.cap === br.SQUARE && (d += Hc(y, x, A, C, b, D, !0, c))), c.push(
24009
+ ) + 2 : n.cap === br.SQUARE && (d += Hc(y, x, A, C, b, B, !0, c))), c.push(
24008
24010
  y - A * b,
24009
24011
  x - C * b,
24010
- y + A * D,
24011
- x + C * D
24012
+ y + A * B,
24013
+ x + C * B
24012
24014
  );
24013
24015
  for (let $ = 1; $ < u - 1; ++$) {
24014
- y = i[($ - 1) * 2], x = i[($ - 1) * 2 + 1], g = i[$ * 2], v = i[$ * 2 + 1], w = i[($ + 1) * 2], I = i[($ + 1) * 2 + 1], A = -(x - v), C = y - g, R = Math.sqrt(A * A + C * C), A /= R, C /= R, A *= p, C *= p, N = -(v - I), S = g - w, R = Math.sqrt(N * N + S * S), N /= R, S /= R, N *= p, S *= p;
24015
- const M = g - y, K = x - v, P = g - w, U = I - v, j = M * P + K * U, et = K * P - U * M, Q = et < 0;
24016
- if (Math.abs(et) < 1e-3 * Math.abs(j)) {
24016
+ y = i[($ - 1) * 2], x = i[($ - 1) * 2 + 1], g = i[$ * 2], v = i[$ * 2 + 1], w = i[($ + 1) * 2], I = i[($ + 1) * 2 + 1], A = -(x - v), C = y - g, P = Math.sqrt(A * A + C * C), A /= P, C /= P, A *= p, C *= p, N = -(v - I), S = g - w, P = Math.sqrt(N * N + S * S), N /= P, S /= P, N *= p, S *= p;
24017
+ const F = g - y, Q = x - v, R = g - w, U = I - v, z = F * R + Q * U, et = Q * R - U * F, J = et < 0;
24018
+ if (Math.abs(et) < 1e-3 * Math.abs(z)) {
24017
24019
  c.push(
24018
24020
  g - A * b,
24019
24021
  v - C * b,
24020
- g + A * D,
24021
- v + C * D
24022
- ), j >= 0 && (n.join === le.ROUND ? d += Rr(
24022
+ g + A * B,
24023
+ v + C * B
24024
+ ), z >= 0 && (n.join === le.ROUND ? d += Rr(
24023
24025
  g,
24024
24026
  v,
24025
24027
  g - A * b,
@@ -24029,16 +24031,16 @@ function Hb(r, t) {
24029
24031
  c,
24030
24032
  !1
24031
24033
  ) + 4 : d += 2, c.push(
24032
- g - N * D,
24033
- v - S * D,
24034
+ g - N * B,
24035
+ v - S * B,
24034
24036
  g + N * b,
24035
24037
  v + S * b
24036
24038
  ));
24037
24039
  continue;
24038
24040
  }
24039
- const H = (-A + y) * (-C + v) - (-A + g) * (-C + x), X = (-N + w) * (-S + v) - (-N + g) * (-S + I), lt = (M * X - P * H) / et, L = (U * H - K * X) / et, O = (lt - g) * (lt - g) + (L - v) * (L - v), _t = g + (lt - g) * b, ht = v + (L - v) * b, vt = g - (lt - g) * D, xt = v - (L - v) * D, Ce = Math.min(M * M + K * K, P * P + U * U), Re = Q ? b : D, $i = Ce + Re * Re * m, Yf = O <= $i;
24041
+ const H = (-A + y) * (-C + v) - (-A + g) * (-C + x), X = (-N + w) * (-S + v) - (-N + g) * (-S + I), lt = (F * X - R * H) / et, L = (U * H - Q * X) / et, D = (lt - g) * (lt - g) + (L - v) * (L - v), _t = g + (lt - g) * b, ht = v + (L - v) * b, vt = g - (lt - g) * B, xt = v - (L - v) * B, Ce = Math.min(F * F + Q * Q, R * R + U * U), Re = J ? b : B, $i = Ce + Re * Re * m, Yf = D <= $i;
24040
24042
  let Ss = n.join;
24041
- if (Ss === le.MITER && O / m > _ && (Ss = le.BEVEL), Yf)
24043
+ if (Ss === le.MITER && D / m > _ && (Ss = le.BEVEL), Yf)
24042
24044
  switch (Ss) {
24043
24045
  case le.MITER: {
24044
24046
  c.push(
@@ -24050,18 +24052,18 @@ function Hb(r, t) {
24050
24052
  break;
24051
24053
  }
24052
24054
  case le.BEVEL: {
24053
- Q ? c.push(
24055
+ J ? c.push(
24054
24056
  _t,
24055
24057
  ht,
24056
24058
  // inner miter point
24057
- g + A * D,
24058
- v + C * D,
24059
+ g + A * B,
24060
+ v + C * B,
24059
24061
  // first segment's outer vertex
24060
24062
  _t,
24061
24063
  ht,
24062
24064
  // inner miter point
24063
- g + N * D,
24064
- v + S * D
24065
+ g + N * B,
24066
+ v + S * B
24065
24067
  ) : c.push(
24066
24068
  g - A * b,
24067
24069
  v - C * b,
@@ -24078,25 +24080,25 @@ function Hb(r, t) {
24078
24080
  break;
24079
24081
  }
24080
24082
  case le.ROUND: {
24081
- Q ? (c.push(
24083
+ J ? (c.push(
24082
24084
  _t,
24083
24085
  ht,
24084
- g + A * D,
24085
- v + C * D
24086
+ g + A * B,
24087
+ v + C * B
24086
24088
  ), d += Rr(
24087
24089
  g,
24088
24090
  v,
24089
- g + A * D,
24090
- v + C * D,
24091
- g + N * D,
24092
- v + S * D,
24091
+ g + A * B,
24092
+ v + C * B,
24093
+ g + N * B,
24094
+ v + S * B,
24093
24095
  c,
24094
24096
  !0
24095
24097
  ) + 4, c.push(
24096
24098
  _t,
24097
24099
  ht,
24098
- g + N * D,
24099
- v + S * D
24100
+ g + N * B,
24101
+ v + S * B
24100
24102
  )) : (c.push(
24101
24103
  g - A * b,
24102
24104
  v - C * b,
@@ -24125,11 +24127,11 @@ function Hb(r, t) {
24125
24127
  g - A * b,
24126
24128
  v - C * b,
24127
24129
  // first segment's inner vertex
24128
- g + A * D,
24129
- v + C * D
24130
+ g + A * B,
24131
+ v + C * B
24130
24132
  ), Ss) {
24131
24133
  case le.MITER: {
24132
- Q ? c.push(
24134
+ J ? c.push(
24133
24135
  vt,
24134
24136
  xt,
24135
24137
  // inner miter point
@@ -24145,13 +24147,13 @@ function Hb(r, t) {
24145
24147
  break;
24146
24148
  }
24147
24149
  case le.ROUND: {
24148
- Q ? d += Rr(
24150
+ J ? d += Rr(
24149
24151
  g,
24150
24152
  v,
24151
- g + A * D,
24152
- v + C * D,
24153
- g + N * D,
24154
- v + S * D,
24153
+ g + A * B,
24154
+ v + C * B,
24155
+ g + N * B,
24156
+ v + S * B,
24155
24157
  c,
24156
24158
  !0
24157
24159
  ) + 2 : d += Rr(
@@ -24171,29 +24173,29 @@ function Hb(r, t) {
24171
24173
  g - N * b,
24172
24174
  v - S * b,
24173
24175
  // second segment's inner vertex
24174
- g + N * D,
24175
- v + S * D
24176
+ g + N * B,
24177
+ v + S * B
24176
24178
  ), d += 2;
24177
24179
  }
24178
24180
  }
24179
- y = i[(u - 2) * 2], x = i[(u - 2) * 2 + 1], g = i[(u - 1) * 2], v = i[(u - 1) * 2 + 1], A = -(x - v), C = y - g, R = Math.sqrt(A * A + C * C), A /= R, C /= R, A *= p, C *= p, c.push(
24181
+ y = i[(u - 2) * 2], x = i[(u - 2) * 2 + 1], g = i[(u - 1) * 2], v = i[(u - 1) * 2 + 1], A = -(x - v), C = y - g, P = Math.sqrt(A * A + C * C), A /= P, C /= P, A *= p, C *= p, c.push(
24180
24182
  g - A * b,
24181
24183
  v - C * b,
24182
- g + A * D,
24183
- v + C * D
24184
+ g + A * B,
24185
+ v + C * B
24184
24186
  ), l || (n.cap === br.ROUND ? d += Rr(
24185
- g - A * (b - D) * 0.5,
24186
- v - C * (b - D) * 0.5,
24187
+ g - A * (b - B) * 0.5,
24188
+ v - C * (b - B) * 0.5,
24187
24189
  g - A * b,
24188
24190
  v - C * b,
24189
- g + A * D,
24190
- v + C * D,
24191
+ g + A * B,
24192
+ v + C * B,
24191
24193
  c,
24192
24194
  !1
24193
- ) + 2 : n.cap === br.SQUARE && (d += Hc(g, v, A, C, b, D, !1, c)));
24194
- const F = t.indices, G = Oi.epsilon * Oi.epsilon;
24195
+ ) + 2 : n.cap === br.SQUARE && (d += Hc(g, v, A, C, b, B, !1, c)));
24196
+ const O = t.indices, G = Oi.epsilon * Oi.epsilon;
24195
24197
  for (let $ = f; $ < d + f - 2; ++$)
24196
- y = c[$ * 2], x = c[$ * 2 + 1], g = c[($ + 1) * 2], v = c[($ + 1) * 2 + 1], w = c[($ + 2) * 2], I = c[($ + 2) * 2 + 1], !(Math.abs(y * (v - I) + g * (I - x) + w * (x - v)) < G) && F.push($, $ + 1, $ + 2);
24198
+ y = c[$ * 2], x = c[$ * 2 + 1], g = c[($ + 1) * 2], v = c[($ + 1) * 2 + 1], w = c[($ + 2) * 2], I = c[($ + 2) * 2 + 1], !(Math.abs(y * (v - I) + g * (I - x) + w * (x - v)) < G) && O.push($, $ + 1, $ + 2);
24197
24199
  }
24198
24200
  function Xb(r, t) {
24199
24201
  let e = 0;
@@ -25202,7 +25204,7 @@ const Qo = new gt(), zc = new Xr(), Cf = class Rf extends Ae {
25202
25204
  * @param drawMode - The drawMode, can be any of the {@link PIXI.DRAW_MODES} constants.
25203
25205
  */
25204
25206
  constructor(t, e, i, s = ke.TRIANGLES) {
25205
- super(), this.geometry = t, this.shader = e, this.state = i || Ye.for2d(), this.drawMode = s, this.start = 0, this.size = 0, this.uvs = null, this.indices = null, this.vertexData = new Float32Array(1), this.vertexDirty = -1, this._transformID = -1, this._roundPixels = W.ROUND_PIXELS, this.batchUvs = null;
25207
+ super(), this.geometry = t, this.shader = e, this.state = i || Ye.for2d(), this.drawMode = s, this.start = 0, this.size = 0, this.uvs = null, this.indices = null, this.vertexData = new Float32Array(1), this.vertexDirty = -1, this._transformID = -1, this._roundPixels = j.ROUND_PIXELS, this.batchUvs = null;
25206
25208
  }
25207
25209
  /**
25208
25210
  * Includes vertex positions, face indices, normals, colors, UVs, and
@@ -25326,7 +25328,7 @@ const Qo = new gt(), zc = new Xr(), Cf = class Rf extends Ae {
25326
25328
  u[d * 2] = n * f + a * p + h, u[d * 2 + 1] = o * f + l * p + c;
25327
25329
  }
25328
25330
  if (this._roundPixels) {
25329
- const d = W.RESOLUTION;
25331
+ const d = j.RESOLUTION;
25330
25332
  for (let f = 0; f < u.length; ++f)
25331
25333
  u[f] = Math.round(u[f] * d) / d;
25332
25334
  }
@@ -25376,7 +25378,7 @@ class Wb extends Tr {
25376
25378
  constructor(t, e, i) {
25377
25379
  super();
25378
25380
  const s = new Mt(t), n = new Mt(e, !0), o = new Mt(i, !0, !0);
25379
- this.addAttribute("aVertexPosition", s, 2, !1, J.FLOAT).addAttribute("aTextureCoord", n, 2, !1, J.FLOAT).addIndex(o), this._updateId = -1;
25381
+ this.addAttribute("aVertexPosition", s, 2, !1, Z.FLOAT).addAttribute("aTextureCoord", n, 2, !1, Z.FLOAT).addIndex(o), this._updateId = -1;
25380
25382
  }
25381
25383
  /**
25382
25384
  * If the vertex position is updated.
@@ -25493,7 +25495,7 @@ class Yc {
25493
25495
  attributeName: n.attributeName,
25494
25496
  size: n.size,
25495
25497
  uploadFunction: n.uploadFunction,
25496
- type: n.type || J.FLOAT,
25498
+ type: n.type || Z.FLOAT,
25497
25499
  offset: n.offset
25498
25500
  }, e[s] ? this.dynamicProperties.push(n) : this.staticProperties.push(n);
25499
25501
  }
@@ -25524,7 +25526,7 @@ class Yc {
25524
25526
  a.attributeName,
25525
25527
  this.dynamicBuffer,
25526
25528
  0,
25527
- a.type === J.UNSIGNED_BYTE,
25529
+ a.type === Z.UNSIGNED_BYTE,
25528
25530
  a.type,
25529
25531
  this.dynamicStride * 4,
25530
25532
  a.offset * 4
@@ -25536,7 +25538,7 @@ class Yc {
25536
25538
  a.attributeName,
25537
25539
  this.staticBuffer,
25538
25540
  0,
25539
- a.type === J.UNSIGNED_BYTE,
25541
+ a.type === Z.UNSIGNED_BYTE,
25540
25542
  a.type,
25541
25543
  this.staticStride * 4,
25542
25544
  a.offset * 4
@@ -25556,7 +25558,7 @@ class Yc {
25556
25558
  t,
25557
25559
  e,
25558
25560
  i,
25559
- n.type === J.UNSIGNED_BYTE ? this.dynamicDataUint32 : this.dynamicData,
25561
+ n.type === Z.UNSIGNED_BYTE ? this.dynamicDataUint32 : this.dynamicData,
25560
25562
  this.dynamicStride,
25561
25563
  n.offset
25562
25564
  );
@@ -25576,7 +25578,7 @@ class Yc {
25576
25578
  t,
25577
25579
  e,
25578
25580
  i,
25579
- n.type === J.UNSIGNED_BYTE ? this.staticDataUint32 : this.staticData,
25581
+ n.type === Z.UNSIGNED_BYTE ? this.staticDataUint32 : this.staticData,
25580
25582
  this.staticStride,
25581
25583
  n.offset
25582
25584
  );
@@ -25660,7 +25662,7 @@ class Pf extends Zn {
25660
25662
  {
25661
25663
  attributeName: "aColor",
25662
25664
  size: 1,
25663
- type: J.UNSIGNED_BYTE,
25665
+ type: Z.UNSIGNED_BYTE,
25664
25666
  uploadFunction: this.uploadTint,
25665
25667
  offset: 0
25666
25668
  }
@@ -25802,7 +25804,7 @@ var to = /* @__PURE__ */ ((r) => (r[r.LINEAR_VERTICAL = 0] = "LINEAR_VERTICAL",
25802
25804
  const Js = {
25803
25805
  // TextMetrics requires getImageData readback for measuring fonts.
25804
25806
  willReadFrequently: !0
25805
- }, Oe = class Z {
25807
+ }, Oe = class K {
25806
25808
  /**
25807
25809
  * Checking that we can use modern canvas 2D API.
25808
25810
  *
@@ -25812,10 +25814,10 @@ const Js = {
25812
25814
  * @see https://developer.chrome.com/origintrials/#/view_trial/3585991203293757441
25813
25815
  */
25814
25816
  static get experimentalLetterSpacingSupported() {
25815
- let t = Z._experimentalLetterSpacingSupported;
25817
+ let t = K._experimentalLetterSpacingSupported;
25816
25818
  if (t !== void 0) {
25817
- const e = W.ADAPTER.getCanvasRenderingContext2D().prototype;
25818
- t = Z._experimentalLetterSpacingSupported = "letterSpacing" in e || "textLetterSpacing" in e;
25819
+ const e = j.ADAPTER.getCanvasRenderingContext2D().prototype;
25820
+ t = K._experimentalLetterSpacingSupported = "letterSpacing" in e || "textLetterSpacing" in e;
25819
25821
  }
25820
25822
  return t;
25821
25823
  }
@@ -25841,23 +25843,23 @@ const Js = {
25841
25843
  * @param canvas - optional specification of the canvas to use for measuring.
25842
25844
  * @returns Measured width and height of the text.
25843
25845
  */
25844
- static measureText(t, e, i, s = Z._canvas) {
25846
+ static measureText(t, e, i, s = K._canvas) {
25845
25847
  i = i ?? e.wordWrap;
25846
- const n = e.toFontString(), o = Z.measureFont(n);
25848
+ const n = e.toFontString(), o = K.measureFont(n);
25847
25849
  o.fontSize === 0 && (o.fontSize = e.fontSize, o.ascent = e.fontSize);
25848
25850
  const a = s.getContext("2d", Js);
25849
25851
  a.font = n;
25850
- const l = (i ? Z.wordWrap(t, e, s) : t).split(/(?:\r\n|\r|\n)/), h = new Array(l.length);
25852
+ const l = (i ? K.wordWrap(t, e, s) : t).split(/(?:\r\n|\r|\n)/), h = new Array(l.length);
25851
25853
  let c = 0;
25852
25854
  for (let p = 0; p < l.length; p++) {
25853
- const m = Z._measureText(l[p], e.letterSpacing, a);
25855
+ const m = K._measureText(l[p], e.letterSpacing, a);
25854
25856
  h[p] = m, c = Math.max(c, m);
25855
25857
  }
25856
25858
  let u = c + e.strokeThickness;
25857
25859
  e.dropShadow && (u += e.dropShadowDistance);
25858
25860
  const d = e.lineHeight || o.fontSize + e.strokeThickness;
25859
25861
  let f = Math.max(d, o.fontSize + e.strokeThickness * 2) + e.leading + (l.length - 1) * (d + e.leading);
25860
- return e.dropShadow && (f += e.dropShadowDistance), new Z(
25862
+ return e.dropShadow && (f += e.dropShadowDistance), new K(
25861
25863
  t,
25862
25864
  e,
25863
25865
  u,
@@ -25871,9 +25873,9 @@ const Js = {
25871
25873
  }
25872
25874
  static _measureText(t, e, i) {
25873
25875
  let s = !1;
25874
- Z.experimentalLetterSpacingSupported && (Z.experimentalLetterSpacing ? (i.letterSpacing = `${e}px`, i.textLetterSpacing = `${e}px`, s = !0) : (i.letterSpacing = "0px", i.textLetterSpacing = "0px"));
25876
+ K.experimentalLetterSpacingSupported && (K.experimentalLetterSpacing ? (i.letterSpacing = `${e}px`, i.textLetterSpacing = `${e}px`, s = !0) : (i.letterSpacing = "0px", i.textLetterSpacing = "0px"));
25875
25877
  let n = i.measureText(t).width;
25876
- return n > 0 && (s ? n -= e : n += (Z.graphemeSegmenter(t).length - 1) * e), n;
25878
+ return n > 0 && (s ? n -= e : n += (K.graphemeSegmenter(t).length - 1) * e), n;
25877
25879
  }
25878
25880
  /**
25879
25881
  * Applies newlines to a string to have it optimally fit into the horizontal
@@ -25883,53 +25885,53 @@ const Js = {
25883
25885
  * @param canvas - optional specification of the canvas to use for measuring.
25884
25886
  * @returns New string with new lines applied where required
25885
25887
  */
25886
- static wordWrap(t, e, i = Z._canvas) {
25888
+ static wordWrap(t, e, i = K._canvas) {
25887
25889
  const s = i.getContext("2d", Js);
25888
25890
  let n = 0, o = "", a = "";
25889
- const l = /* @__PURE__ */ Object.create(null), { letterSpacing: h, whiteSpace: c } = e, u = Z.collapseSpaces(c), d = Z.collapseNewlines(c);
25891
+ const l = /* @__PURE__ */ Object.create(null), { letterSpacing: h, whiteSpace: c } = e, u = K.collapseSpaces(c), d = K.collapseNewlines(c);
25890
25892
  let f = !u;
25891
- const p = e.wordWrapWidth + h, m = Z.tokenize(t);
25893
+ const p = e.wordWrapWidth + h, m = K.tokenize(t);
25892
25894
  for (let _ = 0; _ < m.length; _++) {
25893
25895
  let y = m[_];
25894
- if (Z.isNewline(y)) {
25896
+ if (K.isNewline(y)) {
25895
25897
  if (!d) {
25896
- a += Z.addLine(o), f = !u, o = "", n = 0;
25898
+ a += K.addLine(o), f = !u, o = "", n = 0;
25897
25899
  continue;
25898
25900
  }
25899
25901
  y = " ";
25900
25902
  }
25901
25903
  if (u) {
25902
- const g = Z.isBreakingSpace(y), v = Z.isBreakingSpace(o[o.length - 1]);
25904
+ const g = K.isBreakingSpace(y), v = K.isBreakingSpace(o[o.length - 1]);
25903
25905
  if (g && v)
25904
25906
  continue;
25905
25907
  }
25906
- const x = Z.getFromCache(y, h, l, s);
25908
+ const x = K.getFromCache(y, h, l, s);
25907
25909
  if (x > p)
25908
- if (o !== "" && (a += Z.addLine(o), o = "", n = 0), Z.canBreakWords(y, e.breakWords)) {
25909
- const g = Z.wordWrapSplit(y);
25910
+ if (o !== "" && (a += K.addLine(o), o = "", n = 0), K.canBreakWords(y, e.breakWords)) {
25911
+ const g = K.wordWrapSplit(y);
25910
25912
  for (let v = 0; v < g.length; v++) {
25911
25913
  let w = g[v], I = w, A = 1;
25912
25914
  for (; g[v + A]; ) {
25913
25915
  const N = g[v + A];
25914
- if (!Z.canBreakChars(I, N, y, v, e.breakWords))
25916
+ if (!K.canBreakChars(I, N, y, v, e.breakWords))
25915
25917
  w += N;
25916
25918
  else
25917
25919
  break;
25918
25920
  I = N, A++;
25919
25921
  }
25920
25922
  v += A - 1;
25921
- const C = Z.getFromCache(w, h, l, s);
25922
- C + n > p && (a += Z.addLine(o), f = !1, o = "", n = 0), o += w, n += C;
25923
+ const C = K.getFromCache(w, h, l, s);
25924
+ C + n > p && (a += K.addLine(o), f = !1, o = "", n = 0), o += w, n += C;
25923
25925
  }
25924
25926
  } else {
25925
- o.length > 0 && (a += Z.addLine(o), o = "", n = 0);
25927
+ o.length > 0 && (a += K.addLine(o), o = "", n = 0);
25926
25928
  const g = _ === m.length - 1;
25927
- a += Z.addLine(y, !g), f = !1, o = "", n = 0;
25929
+ a += K.addLine(y, !g), f = !1, o = "", n = 0;
25928
25930
  }
25929
25931
  else
25930
- x + n > p && (f = !1, a += Z.addLine(o), o = "", n = 0), (o.length > 0 || !Z.isBreakingSpace(y) || f) && (o += y, n += x);
25932
+ x + n > p && (f = !1, a += K.addLine(o), o = "", n = 0), (o.length > 0 || !K.isBreakingSpace(y) || f) && (o += y, n += x);
25931
25933
  }
25932
- return a += Z.addLine(o, !1), a;
25934
+ return a += K.addLine(o, !1), a;
25933
25935
  }
25934
25936
  /**
25935
25937
  * Convienience function for logging each line added during the wordWrap method.
@@ -25938,7 +25940,7 @@ const Js = {
25938
25940
  * @returns A formatted line
25939
25941
  */
25940
25942
  static addLine(t, e = !0) {
25941
- return t = Z.trimRight(t), t = e ? `${t}
25943
+ return t = K.trimRight(t), t = e ? `${t}
25942
25944
  ` : t, t;
25943
25945
  }
25944
25946
  /**
@@ -25951,7 +25953,7 @@ const Js = {
25951
25953
  */
25952
25954
  static getFromCache(t, e, i, s) {
25953
25955
  let n = i[t];
25954
- return typeof n != "number" && (n = Z._measureText(t, e, s) + e, i[t] = n), n;
25956
+ return typeof n != "number" && (n = K._measureText(t, e, s) + e, i[t] = n), n;
25955
25957
  }
25956
25958
  /**
25957
25959
  * Determines whether we should collapse breaking spaces.
@@ -25979,7 +25981,7 @@ const Js = {
25979
25981
  return "";
25980
25982
  for (let e = t.length - 1; e >= 0; e--) {
25981
25983
  const i = t[e];
25982
- if (!Z.isBreakingSpace(i))
25984
+ if (!K.isBreakingSpace(i))
25983
25985
  break;
25984
25986
  t = t.slice(0, -1);
25985
25987
  }
@@ -25991,7 +25993,7 @@ const Js = {
25991
25993
  * @returns True if newline, False otherwise.
25992
25994
  */
25993
25995
  static isNewline(t) {
25994
- return typeof t != "string" ? !1 : Z._newlines.includes(t.charCodeAt(0));
25996
+ return typeof t != "string" ? !1 : K._newlines.includes(t.charCodeAt(0));
25995
25997
  }
25996
25998
  /**
25997
25999
  * Determines if char is a breaking whitespace.
@@ -26004,7 +26006,7 @@ const Js = {
26004
26006
  * @returns True if whitespace, False otherwise.
26005
26007
  */
26006
26008
  static isBreakingSpace(t, e) {
26007
- return typeof t != "string" ? !1 : Z._breakingSpaces.includes(t.charCodeAt(0));
26009
+ return typeof t != "string" ? !1 : K._breakingSpaces.includes(t.charCodeAt(0));
26008
26010
  }
26009
26011
  /**
26010
26012
  * Splits a string into words, breaking-spaces and newLine characters
@@ -26018,7 +26020,7 @@ const Js = {
26018
26020
  return e;
26019
26021
  for (let s = 0; s < t.length; s++) {
26020
26022
  const n = t[s], o = t[s + 1];
26021
- if (Z.isBreakingSpace(n, o) || Z.isNewline(n)) {
26023
+ if (K.isBreakingSpace(n, o) || K.isNewline(n)) {
26022
26024
  i !== "" && (e.push(i), i = ""), e.push(n);
26023
26025
  continue;
26024
26026
  }
@@ -26067,7 +26069,7 @@ const Js = {
26067
26069
  * @see TextMetrics.graphemeSegmenter
26068
26070
  */
26069
26071
  static wordWrapSplit(t) {
26070
- return Z.graphemeSegmenter(t);
26072
+ return K.graphemeSegmenter(t);
26071
26073
  }
26072
26074
  /**
26073
26075
  * Calculates the ascent, descent and fontSize of a given font-style
@@ -26075,19 +26077,19 @@ const Js = {
26075
26077
  * @returns Font properties object
26076
26078
  */
26077
26079
  static measureFont(t) {
26078
- if (Z._fonts[t])
26079
- return Z._fonts[t];
26080
+ if (K._fonts[t])
26081
+ return K._fonts[t];
26080
26082
  const e = {
26081
26083
  ascent: 0,
26082
26084
  descent: 0,
26083
26085
  fontSize: 0
26084
- }, i = Z._canvas, s = Z._context;
26086
+ }, i = K._canvas, s = K._context;
26085
26087
  s.font = t;
26086
- const n = Z.METRICS_STRING + Z.BASELINE_SYMBOL, o = Math.ceil(s.measureText(n).width);
26087
- let a = Math.ceil(s.measureText(Z.BASELINE_SYMBOL).width);
26088
- const l = Math.ceil(Z.HEIGHT_MULTIPLIER * a);
26089
- if (a = a * Z.BASELINE_MULTIPLIER | 0, o === 0 || l === 0)
26090
- return Z._fonts[t] = e, e;
26088
+ const n = K.METRICS_STRING + K.BASELINE_SYMBOL, o = Math.ceil(s.measureText(n).width);
26089
+ let a = Math.ceil(s.measureText(K.BASELINE_SYMBOL).width);
26090
+ const l = Math.ceil(K.HEIGHT_MULTIPLIER * a);
26091
+ if (a = a * K.BASELINE_MULTIPLIER | 0, o === 0 || l === 0)
26092
+ return K._fonts[t] = e, e;
26091
26093
  i.width = o, i.height = l, s.fillStyle = "#f00", s.fillRect(0, 0, o, l), s.font = t, s.textBaseline = "alphabetic", s.fillStyle = "#000", s.fillText(n, 0, a);
26092
26094
  const h = s.getImageData(0, 0, o, l).data, c = h.length, u = o * 4;
26093
26095
  let d = 0, f = 0, p = !1;
@@ -26113,14 +26115,14 @@ const Js = {
26113
26115
  else
26114
26116
  break;
26115
26117
  }
26116
- return e.descent = d - a, e.fontSize = e.ascent + e.descent, Z._fonts[t] = e, e;
26118
+ return e.descent = d - a, e.fontSize = e.ascent + e.descent, K._fonts[t] = e, e;
26117
26119
  }
26118
26120
  /**
26119
26121
  * Clear font metrics in metrics cache.
26120
26122
  * @param {string} [font] - font name. If font name not set then clear cache for all fonts.
26121
26123
  */
26122
26124
  static clearMetrics(t = "") {
26123
- t ? delete Z._fonts[t] : Z._fonts = {};
26125
+ t ? delete K._fonts[t] : K._fonts = {};
26124
26126
  }
26125
26127
  /**
26126
26128
  * Cached canvas element for measuring text
@@ -26129,26 +26131,26 @@ const Js = {
26129
26131
  */
26130
26132
  static get _canvas() {
26131
26133
  var t;
26132
- if (!Z.__canvas) {
26134
+ if (!K.__canvas) {
26133
26135
  let e;
26134
26136
  try {
26135
26137
  const i = new OffscreenCanvas(0, 0);
26136
26138
  if ((t = i.getContext("2d", Js)) != null && t.measureText)
26137
- return Z.__canvas = i, i;
26138
- e = W.ADAPTER.createCanvas();
26139
+ return K.__canvas = i, i;
26140
+ e = j.ADAPTER.createCanvas();
26139
26141
  } catch {
26140
- e = W.ADAPTER.createCanvas();
26142
+ e = j.ADAPTER.createCanvas();
26141
26143
  }
26142
- e.width = e.height = 10, Z.__canvas = e;
26144
+ e.width = e.height = 10, K.__canvas = e;
26143
26145
  }
26144
- return Z.__canvas;
26146
+ return K.__canvas;
26145
26147
  }
26146
26148
  /**
26147
26149
  * TODO: this should be private, but isn't because of backward compat, will fix later.
26148
26150
  * @ignore
26149
26151
  */
26150
26152
  static get _context() {
26151
- return Z.__context || (Z.__context = Z._canvas.getContext("2d", Js)), Z.__context;
26153
+ return K.__context || (K.__context = K._canvas.getContext("2d", Js)), K.__context;
26152
26154
  }
26153
26155
  };
26154
26156
  Oe.METRICS_STRING = "|ÉqÅ", /** Baseline symbol for calculate font metrics. */
@@ -26676,12 +26678,12 @@ const Qb = {
26676
26678
  */
26677
26679
  constructor(t, e, i) {
26678
26680
  let s = !1;
26679
- i || (i = W.ADAPTER.createCanvas(), s = !0), i.width = 3, i.height = 3;
26681
+ i || (i = j.ADAPTER.createCanvas(), s = !0), i.width = 3, i.height = 3;
26680
26682
  const n = Y.from(i);
26681
26683
  n.orig = new at(), n.trim = new at(), super(n), this._ownCanvas = s, this.canvas = i, this.context = i.getContext("2d", {
26682
26684
  // required for trimming to work without warnings
26683
26685
  willReadFrequently: !0
26684
- }), this._resolution = sl.defaultResolution ?? W.RESOLUTION, this._autoResolution = sl.defaultAutoResolution, this._text = null, this._style = null, this._styleListener = null, this._font = "", this.text = t, this.style = e, this.localStyleID = -1;
26686
+ }), this._resolution = sl.defaultResolution ?? j.RESOLUTION, this._autoResolution = sl.defaultAutoResolution, this._text = null, this._style = null, this._styleListener = null, this._font = "", this.text = t, this.style = e, this.localStyleID = -1;
26685
26687
  }
26686
26688
  /**
26687
26689
  * @see PIXI.TextMetrics.experimentalLetterSpacing
@@ -27082,7 +27084,7 @@ const Of = class Ff {
27082
27084
  };
27083
27085
  Of.uploadsPerFrame = 4;
27084
27086
  let nl = Of;
27085
- Object.defineProperties(W, {
27087
+ Object.defineProperties(j, {
27086
27088
  /**
27087
27089
  * Default number of uploads per frame using prepare plugin.
27088
27090
  * @static
@@ -27450,7 +27452,7 @@ const mw = {
27450
27452
  var e;
27451
27453
  const t = r.split(".");
27452
27454
  return {
27453
- resolution: parseFloat(((e = W.RETINA_PREFIX.exec(r)) == null ? void 0 : e[1]) ?? "1"),
27455
+ resolution: parseFloat(((e = j.RETINA_PREFIX.exec(r)) == null ? void 0 : e[1]) ?? "1"),
27454
27456
  format: t[t.length - 2],
27455
27457
  src: r
27456
27458
  };
@@ -27658,7 +27660,7 @@ class al {
27658
27660
  * @returns - True if resource could be treated as font data, false otherwise.
27659
27661
  */
27660
27662
  static test(t) {
27661
- return typeof t == "string" && t.includes("<font>") ? ol.test(W.ADAPTER.parseXML(t)) : !1;
27663
+ return typeof t == "string" && t.includes("<font>") ? ol.test(j.ADAPTER.parseXML(t)) : !1;
27662
27664
  }
27663
27665
  /**
27664
27666
  * Convert the text XML into BitmapFontData that we can use.
@@ -27666,7 +27668,7 @@ class al {
27666
27668
  * @returns - Data to use for BitmapFont
27667
27669
  */
27668
27670
  static parse(t) {
27669
- return ol.parse(W.ADAPTER.parseXML(t));
27671
+ return ol.parse(j.ADAPTER.parseXML(t));
27670
27672
  }
27671
27673
  }
27672
27674
  const ra = [
@@ -27899,18 +27901,18 @@ const dr = class Fe {
27899
27901
  let p = 0, m = 0, _, y, x, g = 0;
27900
27902
  const v = [];
27901
27903
  for (let I = 0; I < c.length; I++) {
27902
- _ || (_ = W.ADAPTER.createCanvas(), _.width = a, _.height = l, y = _.getContext("2d"), x = new st(_, { resolution: o, ...h }), v.push(new Y(x)), f.page.push({
27904
+ _ || (_ = j.ADAPTER.createCanvas(), _.width = a, _.height = l, y = _.getContext("2d"), x = new st(_, { resolution: o, ...h }), v.push(new Y(x)), f.page.push({
27903
27905
  id: v.length - 1,
27904
27906
  file: ""
27905
27907
  }));
27906
- const A = c[I], C = mr.measureText(A, u, !1, _), N = C.width, S = Math.ceil(C.height), R = Math.ceil((u.fontStyle === "italic" ? 2 : 1) * N);
27908
+ const A = c[I], C = mr.measureText(A, u, !1, _), N = C.width, S = Math.ceil(C.height), P = Math.ceil((u.fontStyle === "italic" ? 2 : 1) * N);
27907
27909
  if (m >= l - S * o) {
27908
27910
  if (m === 0)
27909
27911
  throw new Error(`[BitmapFont] textureHeight ${l}px is too small (fontFamily: '${u.fontFamily}', fontSize: ${u.fontSize}px, char: '${A}')`);
27910
27912
  --I, _ = null, y = null, x = null, m = 0, p = 0, g = 0;
27911
27913
  continue;
27912
27914
  }
27913
- if (g = Math.max(S + C.fontProperties.descent, g), R * o + p >= d) {
27915
+ if (g = Math.max(S + C.fontProperties.descent, g), P * o + p >= d) {
27914
27916
  if (p === 0)
27915
27917
  throw new Error(`[BitmapFont] textureWidth ${a}px is too small (fontFamily: '${u.fontFamily}', fontSize: ${u.fontSize}px, char: '${A}')`);
27916
27918
  --I, m += g * o, m = Math.ceil(m), p = 0, g = 0;
@@ -27923,18 +27925,18 @@ const dr = class Fe {
27923
27925
  page: v.length - 1,
27924
27926
  x: p / o,
27925
27927
  y: m / o,
27926
- width: R,
27928
+ width: P,
27927
27929
  height: S,
27928
27930
  xoffset: 0,
27929
27931
  yoffset: 0,
27930
27932
  xadvance: N - (u.dropShadow ? u.dropShadowDistance : 0) - (u.stroke ? u.strokeThickness : 0)
27931
- }), p += (R + 2 * n) * o, p = Math.ceil(p);
27933
+ }), p += (P + 2 * n) * o, p = Math.ceil(p);
27932
27934
  }
27933
27935
  if (!(i != null && i.skipKerning))
27934
27936
  for (let I = 0, A = c.length; I < A; I++) {
27935
27937
  const C = c[I];
27936
27938
  for (let N = 0; N < A; N++) {
27937
- const S = c[N], R = y.measureText(C).width, E = y.measureText(S).width, b = y.measureText(C + S).width - (R + E);
27939
+ const S = c[N], P = y.measureText(C).width, E = y.measureText(S).width, b = y.measureText(C + S).width - (P + E);
27938
27940
  b && f.kerning.push({
27939
27941
  first: pn(C),
27940
27942
  second: pn(S),
@@ -28057,25 +28059,25 @@ const Zc = [], Jc = [], Qc = [], ww = class Hf extends Ae {
28057
28059
  throw new Error(`Missing BitmapFont "${a}"`);
28058
28060
  this._activePagesMeshData = [], this._textWidth = 0, this._textHeight = 0, this._align = i, this._tintColor = new bt(s), this._font = void 0, this._fontName = a, this._fontSize = l, this.text = t, this._maxWidth = n, this._maxLineHeight = 0, this._letterSpacing = o, this._anchor = new tr(() => {
28059
28061
  this.dirty = !0;
28060
- }, this, 0, 0), this._roundPixels = W.ROUND_PIXELS, this.dirty = !0, this._resolution = W.RESOLUTION, this._autoResolution = !0, this._textureCache = {};
28062
+ }, this, 0, 0), this._roundPixels = j.ROUND_PIXELS, this.dirty = !0, this._resolution = j.RESOLUTION, this._autoResolution = !0, this._textureCache = {};
28061
28063
  }
28062
28064
  /** Renders text and updates it when needed. This should only be called if the BitmapFont is regenerated. */
28063
28065
  updateText() {
28064
- var R;
28066
+ var P;
28065
28067
  const t = fr.available[this._fontName], e = this.fontSize, i = e / t.size, s = new gt(), n = [], o = [], a = [], l = this._text.replace(/(?:\r\n|\r)/g, `
28066
28068
  `) || " ", h = $f(l), c = this._maxWidth * t.size / e, u = t.distanceFieldType === "none" ? Zc : Jc;
28067
28069
  let d = null, f = 0, p = 0, m = 0, _ = -1, y = 0, x = 0, g = 0, v = 0;
28068
28070
  for (let E = 0; E < h.length; E++) {
28069
- const b = h[E], D = pn(b);
28071
+ const b = h[E], B = pn(b);
28070
28072
  if (/(?:\s)/.test(b) && (_ = E, y = f, v++), b === "\r" || b === `
28071
28073
  `) {
28072
28074
  o.push(f), a.push(-1), p = Math.max(p, f), ++m, ++x, s.x = 0, s.y += t.lineHeight, d = null, v = 0;
28073
28075
  continue;
28074
28076
  }
28075
- const F = t.chars[D];
28076
- if (!F)
28077
+ const O = t.chars[B];
28078
+ if (!O)
28077
28079
  continue;
28078
- d && F.kerning[d] && (s.x += F.kerning[d]);
28080
+ d && O.kerning[d] && (s.x += O.kerning[d]);
28079
28081
  const G = Qc.pop() || {
28080
28082
  texture: Y.EMPTY,
28081
28083
  line: 0,
@@ -28083,7 +28085,7 @@ const Zc = [], Jc = [], Qc = [], ww = class Hf extends Ae {
28083
28085
  prevSpaces: 0,
28084
28086
  position: new gt()
28085
28087
  };
28086
- G.texture = F.texture, G.line = m, G.charCode = D, G.position.x = Math.round(s.x + F.xOffset + this._letterSpacing / 2), G.position.y = Math.round(s.y + F.yOffset), G.prevSpaces = v, n.push(G), f = G.position.x + Math.max(F.xAdvance - F.xOffset, F.texture.orig.width), s.x += F.xAdvance + this._letterSpacing, g = Math.max(g, F.yOffset + F.texture.height), d = D, _ !== -1 && c > 0 && s.x > c && (++x, Ti(n, 1 + _ - x, 1 + E - _), E = _, _ = -1, o.push(y), a.push(n.length > 0 ? n[n.length - 1].prevSpaces : 0), p = Math.max(p, y), m++, s.x = 0, s.y += t.lineHeight, d = null, v = 0);
28088
+ G.texture = O.texture, G.line = m, G.charCode = B, G.position.x = Math.round(s.x + O.xOffset + this._letterSpacing / 2), G.position.y = Math.round(s.y + O.yOffset), G.prevSpaces = v, n.push(G), f = G.position.x + Math.max(O.xAdvance - O.xOffset, O.texture.orig.width), s.x += O.xAdvance + this._letterSpacing, g = Math.max(g, O.yOffset + O.texture.height), d = B, _ !== -1 && c > 0 && s.x > c && (++x, Ti(n, 1 + _ - x, 1 + E - _), E = _, _ = -1, o.push(y), a.push(n.length > 0 ? n[n.length - 1].prevSpaces : 0), p = Math.max(p, y), m++, s.x = 0, s.y += t.lineHeight, d = null, v = 0);
28087
28089
  }
28088
28090
  const w = h[h.length - 1];
28089
28091
  w !== "\r" && w !== `
@@ -28096,34 +28098,34 @@ const Zc = [], Jc = [], Qc = [], ww = class Hf extends Ae {
28096
28098
  const A = n.length, C = {}, N = [], S = this._activePagesMeshData;
28097
28099
  u.push(...S);
28098
28100
  for (let E = 0; E < A; E++) {
28099
- const b = n[E].texture, D = b.baseTexture.uid;
28100
- if (!C[D]) {
28101
- let F = u.pop();
28102
- if (!F) {
28101
+ const b = n[E].texture, B = b.baseTexture.uid;
28102
+ if (!C[B]) {
28103
+ let O = u.pop();
28104
+ if (!O) {
28103
28105
  const $ = new Wb();
28104
- let M, K;
28105
- t.distanceFieldType === "none" ? (M = new jc(Y.EMPTY), K = tt.NORMAL) : (M = new jc(
28106
+ let F, Q;
28107
+ t.distanceFieldType === "none" ? (F = new jc(Y.EMPTY), Q = tt.NORMAL) : (F = new jc(
28106
28108
  Y.EMPTY,
28107
28109
  { program: er.from(bw, xw), uniforms: { uFWidth: 0 } }
28108
- ), K = tt.NORMAL_NPM);
28109
- const P = new Wc($, M);
28110
- P.blendMode = K, F = {
28110
+ ), Q = tt.NORMAL_NPM);
28111
+ const R = new Wc($, F);
28112
+ R.blendMode = Q, O = {
28111
28113
  index: 0,
28112
28114
  indexCount: 0,
28113
28115
  vertexCount: 0,
28114
28116
  uvsCount: 0,
28115
28117
  total: 0,
28116
- mesh: P,
28118
+ mesh: R,
28117
28119
  vertices: null,
28118
28120
  uvs: null,
28119
28121
  indices: null
28120
28122
  };
28121
28123
  }
28122
- F.index = 0, F.indexCount = 0, F.vertexCount = 0, F.uvsCount = 0, F.total = 0;
28124
+ O.index = 0, O.indexCount = 0, O.vertexCount = 0, O.uvsCount = 0, O.total = 0;
28123
28125
  const { _textureCache: G } = this;
28124
- G[D] = G[D] || new Y(b.baseTexture), F.mesh.texture = G[D], F.mesh.tint = this._tintColor.value, N.push(F), C[D] = F;
28126
+ G[B] = G[B] || new Y(b.baseTexture), O.mesh.texture = G[B], O.mesh.tint = this._tintColor.value, N.push(O), C[B] = O;
28125
28127
  }
28126
- C[D].total++;
28128
+ C[B].total++;
28127
28129
  }
28128
28130
  for (let E = 0; E < S.length; E++)
28129
28131
  N.includes(S[E]) || this.removeChild(S[E].mesh);
@@ -28131,35 +28133,35 @@ const Zc = [], Jc = [], Qc = [], ww = class Hf extends Ae {
28131
28133
  N[E].mesh.parent !== this && this.addChild(N[E].mesh);
28132
28134
  this._activePagesMeshData = N;
28133
28135
  for (const E in C) {
28134
- const b = C[E], D = b.total;
28135
- if (!(((R = b.indices) == null ? void 0 : R.length) > 6 * D) || b.vertices.length < Wc.BATCHABLE_SIZE * 2)
28136
- b.vertices = new Float32Array(4 * 2 * D), b.uvs = new Float32Array(4 * 2 * D), b.indices = new Uint16Array(6 * D);
28136
+ const b = C[E], B = b.total;
28137
+ if (!(((P = b.indices) == null ? void 0 : P.length) > 6 * B) || b.vertices.length < Wc.BATCHABLE_SIZE * 2)
28138
+ b.vertices = new Float32Array(4 * 2 * B), b.uvs = new Float32Array(4 * 2 * B), b.indices = new Uint16Array(6 * B);
28137
28139
  else {
28138
- const F = b.total, G = b.vertices;
28139
- for (let $ = F * 4 * 2; $ < G.length; $++)
28140
+ const O = b.total, G = b.vertices;
28141
+ for (let $ = O * 4 * 2; $ < G.length; $++)
28140
28142
  G[$] = 0;
28141
28143
  }
28142
- b.mesh.size = 6 * D;
28144
+ b.mesh.size = 6 * B;
28143
28145
  }
28144
28146
  for (let E = 0; E < A; E++) {
28145
28147
  const b = n[E];
28146
- let D = b.position.x + I[b.line] * (this._align === "justify" ? b.prevSpaces : 1);
28147
- this._roundPixels && (D = Math.round(D));
28148
- const F = D * i, G = b.position.y * i, $ = b.texture, M = C[$.baseTexture.uid], K = $.frame, P = $._uvs, U = M.index++;
28149
- M.indices[U * 6 + 0] = 0 + U * 4, M.indices[U * 6 + 1] = 1 + U * 4, M.indices[U * 6 + 2] = 2 + U * 4, M.indices[U * 6 + 3] = 0 + U * 4, M.indices[U * 6 + 4] = 2 + U * 4, M.indices[U * 6 + 5] = 3 + U * 4, M.vertices[U * 8 + 0] = F, M.vertices[U * 8 + 1] = G, M.vertices[U * 8 + 2] = F + K.width * i, M.vertices[U * 8 + 3] = G, M.vertices[U * 8 + 4] = F + K.width * i, M.vertices[U * 8 + 5] = G + K.height * i, M.vertices[U * 8 + 6] = F, M.vertices[U * 8 + 7] = G + K.height * i, M.uvs[U * 8 + 0] = P.x0, M.uvs[U * 8 + 1] = P.y0, M.uvs[U * 8 + 2] = P.x1, M.uvs[U * 8 + 3] = P.y1, M.uvs[U * 8 + 4] = P.x2, M.uvs[U * 8 + 5] = P.y2, M.uvs[U * 8 + 6] = P.x3, M.uvs[U * 8 + 7] = P.y3;
28148
+ let B = b.position.x + I[b.line] * (this._align === "justify" ? b.prevSpaces : 1);
28149
+ this._roundPixels && (B = Math.round(B));
28150
+ const O = B * i, G = b.position.y * i, $ = b.texture, F = C[$.baseTexture.uid], Q = $.frame, R = $._uvs, U = F.index++;
28151
+ F.indices[U * 6 + 0] = 0 + U * 4, F.indices[U * 6 + 1] = 1 + U * 4, F.indices[U * 6 + 2] = 2 + U * 4, F.indices[U * 6 + 3] = 0 + U * 4, F.indices[U * 6 + 4] = 2 + U * 4, F.indices[U * 6 + 5] = 3 + U * 4, F.vertices[U * 8 + 0] = O, F.vertices[U * 8 + 1] = G, F.vertices[U * 8 + 2] = O + Q.width * i, F.vertices[U * 8 + 3] = G, F.vertices[U * 8 + 4] = O + Q.width * i, F.vertices[U * 8 + 5] = G + Q.height * i, F.vertices[U * 8 + 6] = O, F.vertices[U * 8 + 7] = G + Q.height * i, F.uvs[U * 8 + 0] = R.x0, F.uvs[U * 8 + 1] = R.y0, F.uvs[U * 8 + 2] = R.x1, F.uvs[U * 8 + 3] = R.y1, F.uvs[U * 8 + 4] = R.x2, F.uvs[U * 8 + 5] = R.y2, F.uvs[U * 8 + 6] = R.x3, F.uvs[U * 8 + 7] = R.y3;
28150
28152
  }
28151
28153
  this._textWidth = p * i, this._textHeight = (s.y + t.lineHeight) * i;
28152
28154
  for (const E in C) {
28153
28155
  const b = C[E];
28154
28156
  if (this.anchor.x !== 0 || this.anchor.y !== 0) {
28155
28157
  let $ = 0;
28156
- const M = this._textWidth * this.anchor.x, K = this._textHeight * this.anchor.y;
28157
- for (let P = 0; P < b.total; P++)
28158
- b.vertices[$++] -= M, b.vertices[$++] -= K, b.vertices[$++] -= M, b.vertices[$++] -= K, b.vertices[$++] -= M, b.vertices[$++] -= K, b.vertices[$++] -= M, b.vertices[$++] -= K;
28158
+ const F = this._textWidth * this.anchor.x, Q = this._textHeight * this.anchor.y;
28159
+ for (let R = 0; R < b.total; R++)
28160
+ b.vertices[$++] -= F, b.vertices[$++] -= Q, b.vertices[$++] -= F, b.vertices[$++] -= Q, b.vertices[$++] -= F, b.vertices[$++] -= Q, b.vertices[$++] -= F, b.vertices[$++] -= Q;
28159
28161
  }
28160
28162
  this._maxLineHeight = g * i;
28161
- const D = b.mesh.geometry.getBuffer("aVertexPosition"), F = b.mesh.geometry.getBuffer("aTextureCoord"), G = b.mesh.geometry.getIndex();
28162
- D.data = b.vertices, F.data = b.uvs, G.data = b.indices, D.update(), F.update(), G.update();
28163
+ const B = b.mesh.geometry.getBuffer("aVertexPosition"), O = b.mesh.geometry.getBuffer("aTextureCoord"), G = b.mesh.geometry.getIndex();
28164
+ B.data = b.vertices, O.data = b.uvs, G.data = b.indices, B.update(), O.update(), G.update();
28163
28165
  }
28164
28166
  for (let E = 0; E < n.length; E++)
28165
28167
  Qc.push(n[E]);
@@ -28367,7 +28369,7 @@ const Ew = [".xml", ".fnt"], Tw = {
28367
28369
  return fr.install(i, l, !0);
28368
28370
  },
28369
28371
  async load(r, t) {
28370
- return (await W.ADAPTER.fetch(r)).text();
28372
+ return (await j.ADAPTER.fetch(r)).text();
28371
28373
  },
28372
28374
  unload(r) {
28373
28375
  r.destroy();
@@ -28409,7 +28411,7 @@ const ll = class pi extends Ar {
28409
28411
  const s = i[t];
28410
28412
  return this._fonts.push(s), s.refs++, this.styleID++, this.fontsDirty = !0, Promise.resolve();
28411
28413
  }
28412
- return W.ADAPTER.fetch(t).then((s) => s.blob()).then(async (s) => new Promise((n, o) => {
28414
+ return j.ADAPTER.fetch(t).then((s) => s.blob()).then(async (s) => new Promise((n, o) => {
28413
28415
  const a = URL.createObjectURL(s), l = new FileReader();
28414
28416
  l.onload = () => n([a, l.result]), l.onerror = o, l.readAsDataURL(s);
28415
28417
  })).then(async ([s, n]) => {
@@ -28543,7 +28545,7 @@ const ll = class pi extends Ar {
28543
28545
  * @ignore
28544
28546
  */
28545
28547
  get isSafari() {
28546
- const { userAgent: t } = W.ADAPTER.getNavigator();
28548
+ const { userAgent: t } = j.ADAPTER.getNavigator();
28547
28549
  return /^((?!chrome|android).)*safari/i.test(t);
28548
28550
  }
28549
28551
  set fillGradientStops(t) {
@@ -28654,14 +28656,14 @@ const tn = class mi extends ki {
28654
28656
  constructor(t = "", e = {}) {
28655
28657
  super(Y.EMPTY), this._text = null, this._style = null, this._autoResolution = !0, this.localStyleID = -1, this.dirty = !1, this._updateID = 0, this.ownsStyle = !1;
28656
28658
  const i = new Image(), s = Y.from(i, {
28657
- scaleMode: W.SCALE_MODE,
28659
+ scaleMode: j.SCALE_MODE,
28658
28660
  resourceOptions: {
28659
28661
  autoLoad: !1
28660
28662
  }
28661
28663
  });
28662
28664
  s.orig = new at(), s.trim = new at(), this.texture = s;
28663
28665
  const n = "http://www.w3.org/2000/svg", o = "http://www.w3.org/1999/xhtml", a = document.createElementNS(n, "svg"), l = document.createElementNS(n, "foreignObject"), h = document.createElementNS(o, "div"), c = document.createElementNS(o, "style");
28664
- l.setAttribute("width", "10000"), l.setAttribute("height", "10000"), l.style.overflow = "hidden", a.appendChild(l), this.maxWidth = mi.defaultMaxWidth, this.maxHeight = mi.defaultMaxHeight, this._domElement = h, this._styleElement = c, this._svgRoot = a, this._foreignObject = l, this._foreignObject.appendChild(c), this._foreignObject.appendChild(h), this._image = i, this._loadImage = new Image(), this._autoResolution = mi.defaultAutoResolution, this._resolution = mi.defaultResolution ?? W.RESOLUTION, this.text = t, this.style = e;
28666
+ l.setAttribute("width", "10000"), l.setAttribute("height", "10000"), l.style.overflow = "hidden", a.appendChild(l), this.maxWidth = mi.defaultMaxWidth, this.maxHeight = mi.defaultMaxHeight, this._domElement = h, this._styleElement = c, this._svgRoot = a, this._foreignObject = l, this._foreignObject.appendChild(c), this._foreignObject.appendChild(h), this._image = i, this._loadImage = new Image(), this._autoResolution = mi.defaultAutoResolution, this._resolution = mi.defaultResolution ?? j.RESOLUTION, this.text = t, this.style = e;
28665
28667
  }
28666
28668
  /**
28667
28669
  * Calculate the size of the output text without actually drawing it.
@@ -28938,8 +28940,8 @@ const hl = (r) => {
28938
28940
  const N = {
28939
28941
  selected: n.has(v.id),
28940
28942
  hovered: o === v.id
28941
- }, { fillStyle: S, strokeStyle: R } = hl(g(v, N));
28942
- w.tint = S.tint, w.alpha = S.alpha, I.tint = R.tint || 16777215, I.alpha = R.alpha, s.set(v.id, { annotation: v, fill: w, stroke: I, strokeWidth: R.lineWidth });
28943
+ }, { fillStyle: S, strokeStyle: P } = hl(g(v, N));
28944
+ w.tint = S.tint, w.alpha = S.alpha, I.tint = P.tint || 16777215, I.alpha = P.alpha, s.set(v.id, { annotation: v, fill: w, stroke: I, strokeWidth: P.lineWidth });
28943
28945
  });
28944
28946
  else {
28945
28947
  const { fillStyle: v, strokeStyle: w } = hl(g);
@@ -28982,48 +28984,48 @@ function Dw(r, t, e) {
28982
28984
  S && (!n || n(S)) ? (I.classList.add("hover"), i !== S.id && (u.set(S.id), m.setHovered(S.id))) : (I.classList.remove("hover"), i && (u.set(void 0), m.setHovered(void 0)));
28983
28985
  }, v = (I) => {
28984
28986
  if (!_) return;
28985
- const A = I.originalEvent, { x: C, y: N } = I.position, S = C - _.x, R = N - _.y;
28986
- if (Math.sqrt(S * S + R * R) < 5) {
28987
- const { x: b, y: D } = y(I.position), F = c.getAt(b, D);
28988
- F ? p("click", { originalEvent: A, annotation: F }) : p("click", { originalEvent: A });
28987
+ const A = I.originalEvent, { x: C, y: N } = I.position, S = C - _.x, P = N - _.y;
28988
+ if (Math.sqrt(S * S + P * P) < 5) {
28989
+ const { x: b, y: B } = y(I.position), O = c.getAt(b, B);
28990
+ O ? p("click", { originalEvent: A, annotation: O }) : p("click", { originalEvent: A });
28989
28991
  }
28990
28992
  _ = void 0;
28991
28993
  };
28992
28994
  let w;
28993
28995
  return Xn(() => {
28994
- var F;
28996
+ var O;
28995
28997
  const { offsetWidth: I, offsetHeight: A } = l.canvas, C = document.createElement("canvas");
28996
- C.width = I, C.height = A, C.className = "a9s-gl-canvas", (F = l.element.querySelector(".openseadragon-canvas")) == null || F.appendChild(C), e(7, m = Bw(l, C));
28998
+ C.width = I, C.height = A, C.className = "a9s-gl-canvas", (O = l.element.querySelector(".openseadragon-canvas")) == null || O.appendChild(C), e(7, m = Bw(l, C));
28997
28999
  const N = g(C);
28998
29000
  C.addEventListener("pointermove", N);
28999
29001
  const S = new ResizeObserver((G) => {
29000
29002
  try {
29001
- const { width: $, height: M } = G[0].contentRect;
29002
- C.width = $, C.height = M, m.resize($, M);
29003
+ const { width: $, height: F } = G[0].contentRect;
29004
+ C.width = $, C.height = F, m.resize($, F);
29003
29005
  } catch {
29004
29006
  console.warn("WebGL canvas already disposed");
29005
29007
  }
29006
29008
  });
29007
29009
  S.observe(C);
29008
- const R = () => {
29010
+ const P = () => {
29009
29011
  const G = l.viewport.getBounds();
29010
29012
  w = l.viewport.viewportToImageRectangle(G);
29011
- const { x: $, y: M, width: K, height: P } = w, U = c.getIntersecting($, M, K, P);
29012
- f.set(U.map((j) => j.id));
29013
+ const { x: $, y: F, width: Q, height: R } = w, U = c.getIntersecting($, F, Q, R);
29014
+ f.set(U.map((z) => z.id));
29013
29015
  };
29014
- l.addHandler("canvas-press", x), l.addHandler("canvas-release", v), l.addHandler("update-viewport", m.redraw), l.addHandler("animation-finish", R);
29015
- const E = (G) => G.filter(($) => ir($)), b = (G) => ir(G.oldValue) && ir(G.newValue), D = (G) => {
29016
- const { created: $, updated: M, deleted: K } = G.changes;
29017
- if (E($ || []).forEach((P) => m.addAnnotation(P)), E(K || []).forEach((P) => m.removeAnnotation(P)), (M || []).filter((P) => b(P)).forEach(({ oldValue: P, newValue: U }) => m.updateAnnotation(P, U)), w) {
29018
- const { x: P, y: U, width: j, height: et } = w, Q = c.getIntersecting(P, U, j, et);
29019
- f.set(Q.map((H) => H.id));
29016
+ l.addHandler("canvas-press", x), l.addHandler("canvas-release", v), l.addHandler("update-viewport", m.redraw), l.addHandler("animation-finish", P);
29017
+ const E = (G) => G.filter(($) => ir($)), b = (G) => ir(G.oldValue) && ir(G.newValue), B = (G) => {
29018
+ const { created: $, updated: F, deleted: Q } = G.changes;
29019
+ if (E($ || []).forEach((R) => m.addAnnotation(R)), E(Q || []).forEach((R) => m.removeAnnotation(R)), (F || []).filter((R) => b(R)).forEach(({ oldValue: R, newValue: U }) => m.updateAnnotation(R, U)), w) {
29020
+ const { x: R, y: U, width: z, height: et } = w, J = c.getIntersecting(R, U, z, et);
29021
+ f.set(J.map((H) => H.id));
29020
29022
  } else
29021
- f.set(c.all().map((P) => P.id));
29023
+ f.set(c.all().map((R) => R.id));
29022
29024
  m.redraw();
29023
29025
  };
29024
- return c.observe(D), () => {
29026
+ return c.observe(B), () => {
29025
29027
  var G;
29026
- C.removeEventListener("pointermove", N), S.disconnect(), l.removeHandler("canvas-press", x), l.removeHandler("canvas-release", v), l.removeHandler("update-viewport", m.redraw), l.removeHandler("animation-finish", R), c.unobserve(D), m.destroy(), (G = C.parentNode) == null || G.removeChild(C);
29028
+ C.removeEventListener("pointermove", N), S.disconnect(), l.removeHandler("canvas-press", x), l.removeHandler("canvas-release", v), l.removeHandler("update-viewport", m.redraw), l.removeHandler("animation-finish", P), c.unobserve(B), m.destroy(), (G = C.parentNode) == null || G.removeChild(C);
29027
29029
  };
29028
29030
  }), r.$$set = (I) => {
29029
29031
  "filter" in I && e(2, n = I.filter), "state" in I && e(3, o = I.state), "style" in I && e(4, a = I.style), "viewer" in I && e(5, l = I.viewer), "visible" in I && e(6, h = I.visible);
@@ -29180,14 +29182,14 @@ function Vw(r) {
29180
29182
  t = Et("polygon"), s = ve(), n = Et("polygon"), a = ve();
29181
29183
  for (let m = 0; m < f.length; m += 1)
29182
29184
  f[m].c();
29183
- l = cr(), B(t, "class", "a9s-outer"), B(t, "style", e = /*computedStyle*/
29184
- r[1] ? "display:none;" : void 0), B(t, "points", i = /*geom*/
29185
- r[4].points.map(su).join(" ")), B(n, "class", "a9s-inner a9s-shape-handle"), B(
29185
+ l = cr(), M(t, "class", "a9s-outer"), M(t, "style", e = /*computedStyle*/
29186
+ r[1] ? "display:none;" : void 0), M(t, "points", i = /*geom*/
29187
+ r[4].points.map(su).join(" ")), M(n, "class", "a9s-inner a9s-shape-handle"), M(
29186
29188
  n,
29187
29189
  "style",
29188
29190
  /*computedStyle*/
29189
29191
  r[1]
29190
- ), B(n, "points", o = /*geom*/
29192
+ ), M(n, "points", o = /*geom*/
29191
29193
  r[4].points.map(nu).join(" "));
29192
29194
  },
29193
29195
  m(m, _) {
@@ -29212,17 +29214,17 @@ function Vw(r) {
29212
29214
  p(m, _) {
29213
29215
  if (r = m, (!h || _ & /*computedStyle*/
29214
29216
  2 && e !== (e = /*computedStyle*/
29215
- r[1] ? "display:none;" : void 0)) && B(t, "style", e), (!h || _ & /*geom*/
29217
+ r[1] ? "display:none;" : void 0)) && M(t, "style", e), (!h || _ & /*geom*/
29216
29218
  16 && i !== (i = /*geom*/
29217
- r[4].points.map(su).join(" "))) && B(t, "points", i), (!h || _ & /*computedStyle*/
29218
- 2) && B(
29219
+ r[4].points.map(su).join(" "))) && M(t, "points", i), (!h || _ & /*computedStyle*/
29220
+ 2) && M(
29219
29221
  n,
29220
29222
  "style",
29221
29223
  /*computedStyle*/
29222
29224
  r[1]
29223
29225
  ), (!h || _ & /*geom*/
29224
29226
  16 && o !== (o = /*geom*/
29225
- r[4].points.map(nu).join(" "))) && B(n, "points", o), _ & /*geom, viewportScale, grab*/
29227
+ r[4].points.map(nu).join(" "))) && M(n, "points", o), _ & /*geom, viewportScale, grab*/
29226
29228
  536) {
29227
29229
  d = Pi(
29228
29230
  /*geom*/
@@ -29372,17 +29374,17 @@ function qw(r) {
29372
29374
  let t, e, i, s, n, o;
29373
29375
  return {
29374
29376
  c() {
29375
- t = Et("rect"), B(t, "class", e = _n(`a9s-handle ${/*$$props*/
29376
- r[8].class || ""}`.trim()) + " svelte-1sgkh33"), B(t, "x", i = /*x*/
29377
+ t = Et("rect"), M(t, "class", e = _n(`a9s-handle ${/*$$props*/
29378
+ r[8].class || ""}`.trim()) + " svelte-1sgkh33"), M(t, "x", i = /*x*/
29377
29379
  r[0] - /*handleSize*/
29378
- r[5] / 2), B(t, "y", s = /*y*/
29380
+ r[5] / 2), M(t, "y", s = /*y*/
29379
29381
  r[1] - /*handleSize*/
29380
- r[5] / 2), B(
29382
+ r[5] / 2), M(
29381
29383
  t,
29382
29384
  "width",
29383
29385
  /*handleSize*/
29384
29386
  r[5]
29385
- ), B(
29387
+ ), M(
29386
29388
  t,
29387
29389
  "height",
29388
29390
  /*handleSize*/
@@ -29400,20 +29402,20 @@ function qw(r) {
29400
29402
  p(a, l) {
29401
29403
  l & /*$$props*/
29402
29404
  256 && e !== (e = _n(`a9s-handle ${/*$$props*/
29403
- a[8].class || ""}`.trim()) + " svelte-1sgkh33") && B(t, "class", e), l & /*x, handleSize*/
29405
+ a[8].class || ""}`.trim()) + " svelte-1sgkh33") && M(t, "class", e), l & /*x, handleSize*/
29404
29406
  33 && i !== (i = /*x*/
29405
29407
  a[0] - /*handleSize*/
29406
- a[5] / 2) && B(t, "x", i), l & /*y, handleSize*/
29408
+ a[5] / 2) && M(t, "x", i), l & /*y, handleSize*/
29407
29409
  34 && s !== (s = /*y*/
29408
29410
  a[1] - /*handleSize*/
29409
- a[5] / 2) && B(t, "y", s), l & /*handleSize*/
29410
- 32 && B(
29411
+ a[5] / 2) && M(t, "y", s), l & /*handleSize*/
29412
+ 32 && M(
29411
29413
  t,
29412
29414
  "width",
29413
29415
  /*handleSize*/
29414
29416
  a[5]
29415
29417
  ), l & /*handleSize*/
29416
- 32 && B(
29418
+ 32 && M(
29417
29419
  t,
29418
29420
  "height",
29419
29421
  /*handleSize*/
@@ -29429,39 +29431,39 @@ function Kw(r) {
29429
29431
  let t, e, i, s, n, o, a, l, h;
29430
29432
  return {
29431
29433
  c() {
29432
- t = Et("g"), e = Et("circle"), s = Et("rect"), B(
29434
+ t = Et("g"), e = Et("circle"), s = Et("rect"), M(
29433
29435
  e,
29434
29436
  "cx",
29435
29437
  /*x*/
29436
29438
  r[0]
29437
- ), B(
29439
+ ), M(
29438
29440
  e,
29439
29441
  "cy",
29440
29442
  /*y*/
29441
29443
  r[1]
29442
- ), B(e, "r", i = /*radius*/
29444
+ ), M(e, "r", i = /*radius*/
29443
29445
  r[3] / /*scale*/
29444
- r[2]), B(e, "class", "a9s-touch-halo svelte-1sgkh33"), vn(
29446
+ r[2]), M(e, "class", "a9s-touch-halo svelte-1sgkh33"), vn(
29445
29447
  e,
29446
29448
  "touched",
29447
29449
  /*touched*/
29448
29450
  r[4]
29449
- ), B(s, "class", n = _n(`a9s-handle ${/*$$props*/
29450
- r[8].class || ""}`.trim()) + " svelte-1sgkh33"), B(s, "x", o = /*x*/
29451
+ ), M(s, "class", n = _n(`a9s-handle ${/*$$props*/
29452
+ r[8].class || ""}`.trim()) + " svelte-1sgkh33"), M(s, "x", o = /*x*/
29451
29453
  r[0] - /*handleSize*/
29452
- r[5] / 2), B(s, "y", a = /*y*/
29454
+ r[5] / 2), M(s, "y", a = /*y*/
29453
29455
  r[1] - /*handleSize*/
29454
- r[5] / 2), B(
29456
+ r[5] / 2), M(
29455
29457
  s,
29456
29458
  "width",
29457
29459
  /*handleSize*/
29458
29460
  r[5]
29459
- ), B(
29461
+ ), M(
29460
29462
  s,
29461
29463
  "height",
29462
29464
  /*handleSize*/
29463
29465
  r[5]
29464
- ), B(t, "class", "a9s-touch-handle");
29466
+ ), M(t, "class", "a9s-touch-handle");
29465
29467
  },
29466
29468
  m(c, u) {
29467
29469
  pt(c, t, u), sr(t, e), sr(t, s), l || (h = [
@@ -29505,13 +29507,13 @@ function Kw(r) {
29505
29507
  },
29506
29508
  p(c, u) {
29507
29509
  u & /*x*/
29508
- 1 && B(
29510
+ 1 && M(
29509
29511
  e,
29510
29512
  "cx",
29511
29513
  /*x*/
29512
29514
  c[0]
29513
29515
  ), u & /*y*/
29514
- 2 && B(
29516
+ 2 && M(
29515
29517
  e,
29516
29518
  "cy",
29517
29519
  /*y*/
@@ -29519,7 +29521,7 @@ function Kw(r) {
29519
29521
  ), u & /*radius, scale*/
29520
29522
  12 && i !== (i = /*radius*/
29521
29523
  c[3] / /*scale*/
29522
- c[2]) && B(e, "r", i), u & /*touched*/
29524
+ c[2]) && M(e, "r", i), u & /*touched*/
29523
29525
  16 && vn(
29524
29526
  e,
29525
29527
  "touched",
@@ -29527,20 +29529,20 @@ function Kw(r) {
29527
29529
  c[4]
29528
29530
  ), u & /*$$props*/
29529
29531
  256 && n !== (n = _n(`a9s-handle ${/*$$props*/
29530
- c[8].class || ""}`.trim()) + " svelte-1sgkh33") && B(s, "class", n), u & /*x, handleSize*/
29532
+ c[8].class || ""}`.trim()) + " svelte-1sgkh33") && M(s, "class", n), u & /*x, handleSize*/
29531
29533
  33 && o !== (o = /*x*/
29532
29534
  c[0] - /*handleSize*/
29533
- c[5] / 2) && B(s, "x", o), u & /*y, handleSize*/
29535
+ c[5] / 2) && M(s, "x", o), u & /*y, handleSize*/
29534
29536
  34 && a !== (a = /*y*/
29535
29537
  c[1] - /*handleSize*/
29536
- c[5] / 2) && B(s, "y", a), u & /*handleSize*/
29537
- 32 && B(
29538
+ c[5] / 2) && M(s, "y", a), u & /*handleSize*/
29539
+ 32 && M(
29538
29540
  s,
29539
29541
  "width",
29540
29542
  /*handleSize*/
29541
29543
  c[5]
29542
29544
  ), u & /*handleSize*/
29543
- 32 && B(
29545
+ 32 && M(
29544
29546
  s,
29545
29547
  "height",
29546
29548
  /*handleSize*/
@@ -29615,8 +29617,8 @@ class ss extends ae {
29615
29617
  }
29616
29618
  }
29617
29619
  function Qw(r) {
29618
- let t, e, i, s, n, o, a, l, h, c, u, d, f, p, m, _, y, x, g, v, w, I, A, C, N, S, R, E, b, D, F, G, $, M, K, P, U, j, et, Q, H, X, lt;
29619
- return M = new ss({
29620
+ let t, e, i, s, n, o, a, l, h, c, u, d, f, p, m, _, y, x, g, v, w, I, A, C, N, S, P, E, b, B, O, G, $, F, Q, R, U, z, et, J, H, X, lt;
29621
+ return F = new ss({
29620
29622
  props: {
29621
29623
  class: "a9s-corner-handle-topleft",
29622
29624
  x: (
@@ -29632,12 +29634,12 @@ function Qw(r) {
29632
29634
  r[3]
29633
29635
  )
29634
29636
  }
29635
- }), M.$on("pointerdown", function() {
29637
+ }), F.$on("pointerdown", function() {
29636
29638
  jt(
29637
29639
  /*grab*/
29638
29640
  r[9]("TOP_LEFT")
29639
29641
  ) && r[9]("TOP_LEFT").apply(this, arguments);
29640
- }), P = new ss({
29642
+ }), R = new ss({
29641
29643
  props: {
29642
29644
  class: "a9s-corner-handle-topright",
29643
29645
  x: (
@@ -29654,12 +29656,12 @@ function Qw(r) {
29654
29656
  r[3]
29655
29657
  )
29656
29658
  }
29657
- }), P.$on("pointerdown", function() {
29659
+ }), R.$on("pointerdown", function() {
29658
29660
  jt(
29659
29661
  /*grab*/
29660
29662
  r[9]("TOP_RIGHT")
29661
29663
  ) && r[9]("TOP_RIGHT").apply(this, arguments);
29662
- }), j = new ss({
29664
+ }), z = new ss({
29663
29665
  props: {
29664
29666
  class: "a9s-corner-handle-bottomright",
29665
29667
  x: (
@@ -29677,12 +29679,12 @@ function Qw(r) {
29677
29679
  r[3]
29678
29680
  )
29679
29681
  }
29680
- }), j.$on("pointerdown", function() {
29682
+ }), z.$on("pointerdown", function() {
29681
29683
  jt(
29682
29684
  /*grab*/
29683
29685
  r[9]("BOTTOM_RIGHT")
29684
29686
  ) && r[9]("BOTTOM_RIGHT").apply(this, arguments);
29685
- }), Q = new ss({
29687
+ }), J = new ss({
29686
29688
  props: {
29687
29689
  class: "a9s-corner-handle-bottomleft",
29688
29690
  x: (
@@ -29699,45 +29701,45 @@ function Qw(r) {
29699
29701
  r[3]
29700
29702
  )
29701
29703
  }
29702
- }), Q.$on("pointerdown", function() {
29704
+ }), J.$on("pointerdown", function() {
29703
29705
  jt(
29704
29706
  /*grab*/
29705
29707
  r[9]("BOTTOM_LEFT")
29706
29708
  ) && r[9]("BOTTOM_LEFT").apply(this, arguments);
29707
29709
  }), {
29708
29710
  c() {
29709
- t = Et("rect"), a = ve(), l = Et("rect"), f = ve(), p = Et("rect"), x = ve(), g = Et("rect"), A = ve(), C = Et("rect"), E = ve(), b = Et("rect"), $ = ve(), Jt(M.$$.fragment), K = ve(), Jt(P.$$.fragment), U = ve(), Jt(j.$$.fragment), et = ve(), Jt(Q.$$.fragment), B(t, "class", "a9s-outer"), B(t, "style", e = /*computedStyle*/
29710
- r[1] ? "display:none;" : void 0), B(t, "x", i = /*geom*/
29711
- r[4].x), B(t, "y", s = /*geom*/
29712
- r[4].y), B(t, "width", n = /*geom*/
29713
- r[4].w), B(t, "height", o = /*geom*/
29714
- r[4].h), B(l, "class", "a9s-inner a9s-shape-handle"), B(
29711
+ t = Et("rect"), a = ve(), l = Et("rect"), f = ve(), p = Et("rect"), x = ve(), g = Et("rect"), A = ve(), C = Et("rect"), E = ve(), b = Et("rect"), $ = ve(), Jt(F.$$.fragment), Q = ve(), Jt(R.$$.fragment), U = ve(), Jt(z.$$.fragment), et = ve(), Jt(J.$$.fragment), M(t, "class", "a9s-outer"), M(t, "style", e = /*computedStyle*/
29712
+ r[1] ? "display:none;" : void 0), M(t, "x", i = /*geom*/
29713
+ r[4].x), M(t, "y", s = /*geom*/
29714
+ r[4].y), M(t, "width", n = /*geom*/
29715
+ r[4].w), M(t, "height", o = /*geom*/
29716
+ r[4].h), M(l, "class", "a9s-inner a9s-shape-handle"), M(
29715
29717
  l,
29716
29718
  "style",
29717
29719
  /*computedStyle*/
29718
29720
  r[1]
29719
- ), B(l, "x", h = /*geom*/
29720
- r[4].x), B(l, "y", c = /*geom*/
29721
- r[4].y), B(l, "width", u = /*geom*/
29722
- r[4].w), B(l, "height", d = /*geom*/
29723
- r[4].h), B(p, "class", "a9s-edge-handle a9s-edge-handle-top"), B(p, "x", m = /*geom*/
29724
- r[4].x), B(p, "y", _ = /*geom*/
29725
- r[4].y), B(p, "height", 1), B(p, "width", y = /*geom*/
29726
- r[4].w), B(g, "class", "a9s-edge-handle a9s-edge-handle-right"), B(g, "x", v = /*geom*/
29721
+ ), M(l, "x", h = /*geom*/
29722
+ r[4].x), M(l, "y", c = /*geom*/
29723
+ r[4].y), M(l, "width", u = /*geom*/
29724
+ r[4].w), M(l, "height", d = /*geom*/
29725
+ r[4].h), M(p, "class", "a9s-edge-handle a9s-edge-handle-top"), M(p, "x", m = /*geom*/
29726
+ r[4].x), M(p, "y", _ = /*geom*/
29727
+ r[4].y), M(p, "height", 1), M(p, "width", y = /*geom*/
29728
+ r[4].w), M(g, "class", "a9s-edge-handle a9s-edge-handle-right"), M(g, "x", v = /*geom*/
29727
29729
  r[4].x + /*geom*/
29728
- r[4].w), B(g, "y", w = /*geom*/
29729
- r[4].y), B(g, "height", I = /*geom*/
29730
- r[4].h), B(g, "width", 1), B(C, "class", "a9s-edge-handle a9s-edge-handle-bottom"), B(C, "x", N = /*geom*/
29731
- r[4].x), B(C, "y", S = /*geom*/
29730
+ r[4].w), M(g, "y", w = /*geom*/
29731
+ r[4].y), M(g, "height", I = /*geom*/
29732
+ r[4].h), M(g, "width", 1), M(C, "class", "a9s-edge-handle a9s-edge-handle-bottom"), M(C, "x", N = /*geom*/
29733
+ r[4].x), M(C, "y", S = /*geom*/
29732
29734
  r[4].y + /*geom*/
29733
- r[4].h), B(C, "height", 1), B(C, "width", R = /*geom*/
29734
- r[4].w), B(b, "class", "a9s-edge-handle a9s-edge-handle-left"), B(b, "x", D = /*geom*/
29735
- r[4].x), B(b, "y", F = /*geom*/
29736
- r[4].y), B(b, "height", G = /*geom*/
29737
- r[4].h), B(b, "width", 1);
29738
- },
29739
- m(L, O) {
29740
- pt(L, t, O), pt(L, a, O), pt(L, l, O), pt(L, f, O), pt(L, p, O), pt(L, x, O), pt(L, g, O), pt(L, A, O), pt(L, C, O), pt(L, E, O), pt(L, b, O), pt(L, $, O), Yt(M, L, O), pt(L, K, O), Yt(P, L, O), pt(L, U, O), Yt(j, L, O), pt(L, et, O), Yt(Q, L, O), H = !0, X || (lt = [
29735
+ r[4].h), M(C, "height", 1), M(C, "width", P = /*geom*/
29736
+ r[4].w), M(b, "class", "a9s-edge-handle a9s-edge-handle-left"), M(b, "x", B = /*geom*/
29737
+ r[4].x), M(b, "y", O = /*geom*/
29738
+ r[4].y), M(b, "height", G = /*geom*/
29739
+ r[4].h), M(b, "width", 1);
29740
+ },
29741
+ m(L, D) {
29742
+ pt(L, t, D), pt(L, a, D), pt(L, l, D), pt(L, f, D), pt(L, p, D), pt(L, x, D), pt(L, g, D), pt(L, A, D), pt(L, C, D), pt(L, E, D), pt(L, b, D), pt(L, $, D), Yt(F, L, D), pt(L, Q, D), Yt(R, L, D), pt(L, U, D), Yt(z, L, D), pt(L, et, D), Yt(J, L, D), H = !0, X || (lt = [
29741
29743
  zt(t, "pointerdown", function() {
29742
29744
  jt(
29743
29745
  /*grab*/
@@ -29776,103 +29778,103 @@ function Qw(r) {
29776
29778
  })
29777
29779
  ], X = !0);
29778
29780
  },
29779
- p(L, O) {
29780
- r = L, (!H || O & /*computedStyle*/
29781
+ p(L, D) {
29782
+ r = L, (!H || D & /*computedStyle*/
29781
29783
  2 && e !== (e = /*computedStyle*/
29782
- r[1] ? "display:none;" : void 0)) && B(t, "style", e), (!H || O & /*geom*/
29784
+ r[1] ? "display:none;" : void 0)) && M(t, "style", e), (!H || D & /*geom*/
29783
29785
  16 && i !== (i = /*geom*/
29784
- r[4].x)) && B(t, "x", i), (!H || O & /*geom*/
29786
+ r[4].x)) && M(t, "x", i), (!H || D & /*geom*/
29785
29787
  16 && s !== (s = /*geom*/
29786
- r[4].y)) && B(t, "y", s), (!H || O & /*geom*/
29788
+ r[4].y)) && M(t, "y", s), (!H || D & /*geom*/
29787
29789
  16 && n !== (n = /*geom*/
29788
- r[4].w)) && B(t, "width", n), (!H || O & /*geom*/
29790
+ r[4].w)) && M(t, "width", n), (!H || D & /*geom*/
29789
29791
  16 && o !== (o = /*geom*/
29790
- r[4].h)) && B(t, "height", o), (!H || O & /*computedStyle*/
29791
- 2) && B(
29792
+ r[4].h)) && M(t, "height", o), (!H || D & /*computedStyle*/
29793
+ 2) && M(
29792
29794
  l,
29793
29795
  "style",
29794
29796
  /*computedStyle*/
29795
29797
  r[1]
29796
- ), (!H || O & /*geom*/
29798
+ ), (!H || D & /*geom*/
29797
29799
  16 && h !== (h = /*geom*/
29798
- r[4].x)) && B(l, "x", h), (!H || O & /*geom*/
29800
+ r[4].x)) && M(l, "x", h), (!H || D & /*geom*/
29799
29801
  16 && c !== (c = /*geom*/
29800
- r[4].y)) && B(l, "y", c), (!H || O & /*geom*/
29802
+ r[4].y)) && M(l, "y", c), (!H || D & /*geom*/
29801
29803
  16 && u !== (u = /*geom*/
29802
- r[4].w)) && B(l, "width", u), (!H || O & /*geom*/
29804
+ r[4].w)) && M(l, "width", u), (!H || D & /*geom*/
29803
29805
  16 && d !== (d = /*geom*/
29804
- r[4].h)) && B(l, "height", d), (!H || O & /*geom*/
29806
+ r[4].h)) && M(l, "height", d), (!H || D & /*geom*/
29805
29807
  16 && m !== (m = /*geom*/
29806
- r[4].x)) && B(p, "x", m), (!H || O & /*geom*/
29808
+ r[4].x)) && M(p, "x", m), (!H || D & /*geom*/
29807
29809
  16 && _ !== (_ = /*geom*/
29808
- r[4].y)) && B(p, "y", _), (!H || O & /*geom*/
29810
+ r[4].y)) && M(p, "y", _), (!H || D & /*geom*/
29809
29811
  16 && y !== (y = /*geom*/
29810
- r[4].w)) && B(p, "width", y), (!H || O & /*geom*/
29812
+ r[4].w)) && M(p, "width", y), (!H || D & /*geom*/
29811
29813
  16 && v !== (v = /*geom*/
29812
29814
  r[4].x + /*geom*/
29813
- r[4].w)) && B(g, "x", v), (!H || O & /*geom*/
29815
+ r[4].w)) && M(g, "x", v), (!H || D & /*geom*/
29814
29816
  16 && w !== (w = /*geom*/
29815
- r[4].y)) && B(g, "y", w), (!H || O & /*geom*/
29817
+ r[4].y)) && M(g, "y", w), (!H || D & /*geom*/
29816
29818
  16 && I !== (I = /*geom*/
29817
- r[4].h)) && B(g, "height", I), (!H || O & /*geom*/
29819
+ r[4].h)) && M(g, "height", I), (!H || D & /*geom*/
29818
29820
  16 && N !== (N = /*geom*/
29819
- r[4].x)) && B(C, "x", N), (!H || O & /*geom*/
29821
+ r[4].x)) && M(C, "x", N), (!H || D & /*geom*/
29820
29822
  16 && S !== (S = /*geom*/
29821
29823
  r[4].y + /*geom*/
29822
- r[4].h)) && B(C, "y", S), (!H || O & /*geom*/
29823
- 16 && R !== (R = /*geom*/
29824
- r[4].w)) && B(C, "width", R), (!H || O & /*geom*/
29825
- 16 && D !== (D = /*geom*/
29826
- r[4].x)) && B(b, "x", D), (!H || O & /*geom*/
29827
- 16 && F !== (F = /*geom*/
29828
- r[4].y)) && B(b, "y", F), (!H || O & /*geom*/
29824
+ r[4].h)) && M(C, "y", S), (!H || D & /*geom*/
29825
+ 16 && P !== (P = /*geom*/
29826
+ r[4].w)) && M(C, "width", P), (!H || D & /*geom*/
29827
+ 16 && B !== (B = /*geom*/
29828
+ r[4].x)) && M(b, "x", B), (!H || D & /*geom*/
29829
+ 16 && O !== (O = /*geom*/
29830
+ r[4].y)) && M(b, "y", O), (!H || D & /*geom*/
29829
29831
  16 && G !== (G = /*geom*/
29830
- r[4].h)) && B(b, "height", G);
29832
+ r[4].h)) && M(b, "height", G);
29831
29833
  const _t = {};
29832
- O & /*geom*/
29834
+ D & /*geom*/
29833
29835
  16 && (_t.x = /*geom*/
29834
- r[4].x), O & /*geom*/
29836
+ r[4].x), D & /*geom*/
29835
29837
  16 && (_t.y = /*geom*/
29836
- r[4].y), O & /*viewportScale*/
29838
+ r[4].y), D & /*viewportScale*/
29837
29839
  8 && (_t.scale = /*viewportScale*/
29838
- r[3]), M.$set(_t);
29840
+ r[3]), F.$set(_t);
29839
29841
  const ht = {};
29840
- O & /*geom*/
29842
+ D & /*geom*/
29841
29843
  16 && (ht.x = /*geom*/
29842
29844
  r[4].x + /*geom*/
29843
- r[4].w), O & /*geom*/
29845
+ r[4].w), D & /*geom*/
29844
29846
  16 && (ht.y = /*geom*/
29845
- r[4].y), O & /*viewportScale*/
29847
+ r[4].y), D & /*viewportScale*/
29846
29848
  8 && (ht.scale = /*viewportScale*/
29847
- r[3]), P.$set(ht);
29849
+ r[3]), R.$set(ht);
29848
29850
  const vt = {};
29849
- O & /*geom*/
29851
+ D & /*geom*/
29850
29852
  16 && (vt.x = /*geom*/
29851
29853
  r[4].x + /*geom*/
29852
- r[4].w), O & /*geom*/
29854
+ r[4].w), D & /*geom*/
29853
29855
  16 && (vt.y = /*geom*/
29854
29856
  r[4].y + /*geom*/
29855
- r[4].h), O & /*viewportScale*/
29857
+ r[4].h), D & /*viewportScale*/
29856
29858
  8 && (vt.scale = /*viewportScale*/
29857
- r[3]), j.$set(vt);
29859
+ r[3]), z.$set(vt);
29858
29860
  const xt = {};
29859
- O & /*geom*/
29861
+ D & /*geom*/
29860
29862
  16 && (xt.x = /*geom*/
29861
- r[4].x), O & /*geom*/
29863
+ r[4].x), D & /*geom*/
29862
29864
  16 && (xt.y = /*geom*/
29863
29865
  r[4].y + /*geom*/
29864
- r[4].h), O & /*viewportScale*/
29866
+ r[4].h), D & /*viewportScale*/
29865
29867
  8 && (xt.scale = /*viewportScale*/
29866
- r[3]), Q.$set(xt);
29868
+ r[3]), J.$set(xt);
29867
29869
  },
29868
29870
  i(L) {
29869
- H || (nt(M.$$.fragment, L), nt(P.$$.fragment, L), nt(j.$$.fragment, L), nt(Q.$$.fragment, L), H = !0);
29871
+ H || (nt(F.$$.fragment, L), nt(R.$$.fragment, L), nt(z.$$.fragment, L), nt(J.$$.fragment, L), H = !0);
29870
29872
  },
29871
29873
  o(L) {
29872
- dt(M.$$.fragment, L), dt(P.$$.fragment, L), dt(j.$$.fragment, L), dt(Q.$$.fragment, L), H = !1;
29874
+ dt(F.$$.fragment, L), dt(R.$$.fragment, L), dt(z.$$.fragment, L), dt(J.$$.fragment, L), H = !1;
29873
29875
  },
29874
29876
  d(L) {
29875
- L && (ct(t), ct(a), ct(l), ct(f), ct(p), ct(x), ct(g), ct(A), ct(C), ct(E), ct(b), ct($), ct(K), ct(U), ct(et)), qt(M, L), qt(P, L), qt(j, L), qt(Q, L), X = !1, hr(lt);
29877
+ L && (ct(t), ct(a), ct(l), ct(f), ct(p), ct(x), ct(g), ct(A), ct(C), ct(E), ct(b), ct($), ct(Q), ct(U), ct(et)), qt(F, L), qt(R, L), qt(z, L), qt(J, L), X = !1, hr(lt);
29876
29878
  }
29877
29879
  };
29878
29880
  }
@@ -30050,7 +30052,7 @@ function sE(r) {
30050
30052
  );
30051
30053
  return {
30052
30054
  c() {
30053
- t = Et("g"), o && o.c(), B(t, "class", "a9s-annotation selected");
30055
+ t = Et("g"), o && o.c(), M(t, "class", "a9s-annotation selected");
30054
30056
  },
30055
30057
  m(a, l) {
30056
30058
  pt(a, t, l), o && o.m(t, null), e = !0, i || (s = [
@@ -30645,8 +30647,8 @@ function gE(r) {
30645
30647
  }
30646
30648
  return ~(i = h(r)) && (s = l[i] = a[i](r)), {
30647
30649
  c() {
30648
- t = Et("svg"), e = Et("g"), s && s.c(), B(e, "transform", n = /*transform*/
30649
- r[31]), B(e, "class", "svelte-190cqdf"), B(t, "class", "a9s-annotationlayer a9s-osd-drawinglayer svelte-190cqdf"), vn(
30650
+ t = Et("svg"), e = Et("g"), s && s.c(), M(e, "transform", n = /*transform*/
30651
+ r[31]), M(e, "class", "svelte-190cqdf"), M(t, "class", "a9s-annotationlayer a9s-osd-drawinglayer svelte-190cqdf"), vn(
30650
30652
  t,
30651
30653
  "drawing",
30652
30654
  /*drawingEnabled*/
@@ -30662,7 +30664,7 @@ function gE(r) {
30662
30664
  l[d] = null;
30663
30665
  }), je()), ~i ? (s = l[i], s ? s.p(c, u) : (s = l[i] = a[i](c), s.c()), nt(s, 1), s.m(e, null)) : s = null), (!o || u[1] & /*transform*/
30664
30666
  1 && n !== (n = /*transform*/
30665
- c[31])) && B(e, "transform", n), (!o || u[0] & /*drawingEnabled*/
30667
+ c[31])) && M(e, "transform", n), (!o || u[0] & /*drawingEnabled*/
30666
30668
  1) && vn(
30667
30669
  t,
30668
30670
  "drawing",
@@ -30729,61 +30731,61 @@ function _E(r, t, e) {
30729
30731
  const m = () => d, _ = () => a, y = navigator.userAgent.match(/firefox|fxios/i);
30730
30732
  let x;
30731
30733
  const { store: g, selection: v, hover: w } = c;
30732
- ca(r, v, (M) => e(22, o = M));
30734
+ ca(r, v, (F) => e(22, o = F));
30733
30735
  let I, A, C;
30734
- const N = (M) => {
30736
+ const N = (F) => {
30735
30737
  g.unobserve(I);
30736
- const K = M.filter(({ editable: P }) => P).map(({ id: P }) => P);
30737
- if (K.length > 0) {
30738
- if (e(6, A = K.map((P) => g.getAnnotation(P))), I = (P) => {
30739
- const { updated: U } = P.changes;
30740
- e(6, A = (U || []).map((j) => j.newValue));
30741
- }, g.observe(I, { annotations: K }), y) {
30742
- const { width: P } = p.viewport.viewerElementToViewportRectangle(new _i.Rect(0, 0, 1, 1));
30743
- p.viewport.panBy(new _i.Point(Math.abs(P / 10), 0));
30738
+ const Q = F.filter(({ editable: R }) => R).map(({ id: R }) => R);
30739
+ if (Q.length > 0) {
30740
+ if (e(6, A = Q.map((R) => g.getAnnotation(R))), I = (R) => {
30741
+ const { updated: U } = R.changes;
30742
+ e(6, A = (U || []).map((z) => z.newValue));
30743
+ }, g.observe(I, { annotations: Q }), y) {
30744
+ const { width: R } = p.viewport.viewerElementToViewportRectangle(new _i.Rect(0, 0, 1, 1));
30745
+ p.viewport.panBy(new _i.Point(Math.abs(R / 10), 0));
30744
30746
  }
30745
30747
  } else
30746
30748
  e(6, A = void 0);
30747
- }, S = (M, K) => {
30748
- const { x: P, y: U } = p.viewport.viewerElementToImageCoordinates(new _i.Point(M, K));
30749
- return [P, U];
30750
- }, R = (M) => {
30751
- p.setMouseNavEnabled(!1), C = M.timeStamp;
30752
- }, E = (M) => {
30749
+ }, S = (F, Q) => {
30750
+ const { x: R, y: U } = p.viewport.viewerElementToImageCoordinates(new _i.Point(F, Q));
30751
+ return [R, U];
30752
+ }, P = (F) => {
30753
+ p.setMouseNavEnabled(!1), C = F.timeStamp;
30754
+ }, E = (F) => {
30753
30755
  if (p.setMouseNavEnabled(!0), performance.now() - (C || 0) < 300) {
30754
- const { offsetX: P, offsetY: U } = M.detail, [j, et] = S(P, U), Q = g.getAt(j, et);
30755
- Q && (!l || l(Q)) && !A.find((X) => X.id === Q.id) && (w.set(Q.id), v.setSelected(Q.id));
30756
+ const { offsetX: R, offsetY: U } = F.detail, [z, et] = S(R, U), J = g.getAt(z, et);
30757
+ J && (!l || l(J)) && !A.find((X) => X.id === J.id) && (w.set(J.id), v.setSelected(J.id));
30756
30758
  }
30757
- }, b = (M) => (K) => {
30759
+ }, b = (F) => (Q) => {
30758
30760
  var et;
30759
- const { target: P } = M, U = 10 * 60 * 1e3, j = ((et = P.creator) == null ? void 0 : et.id) !== f.id || !P.created || (/* @__PURE__ */ new Date()).getTime() - P.created.getTime() > U;
30761
+ const { target: R } = F, U = 10 * 60 * 1e3, z = ((et = R.creator) == null ? void 0 : et.id) !== f.id || !R.created || (/* @__PURE__ */ new Date()).getTime() - R.created.getTime() > U;
30760
30762
  g.updateTarget({
30761
- ...P,
30762
- selector: K.detail,
30763
- created: j ? P.created : /* @__PURE__ */ new Date(),
30764
- updated: j ? /* @__PURE__ */ new Date() : void 0,
30765
- updatedBy: j ? f : void 0
30763
+ ...R,
30764
+ selector: Q.detail,
30765
+ created: z ? R.created : /* @__PURE__ */ new Date(),
30766
+ updated: z ? /* @__PURE__ */ new Date() : void 0,
30767
+ updatedBy: z ? f : void 0
30766
30768
  });
30767
- }, D = (M) => {
30768
- const K = kw(), P = {
30769
- id: K,
30769
+ }, B = (F) => {
30770
+ const Q = kw(), R = {
30771
+ id: Q,
30770
30772
  bodies: [],
30771
30773
  target: {
30772
- annotation: K,
30773
- selector: M.detail,
30774
+ annotation: Q,
30775
+ selector: F.detail,
30774
30776
  creator: f,
30775
30777
  created: /* @__PURE__ */ new Date()
30776
30778
  }
30777
30779
  };
30778
- g.addAnnotation(P), v.setSelected(P.id), p.setMouseNavEnabled(!0);
30779
- }, F = (M) => Du(M), G = (M) => ir(M);
30780
- function $(M) {
30781
- xn[M ? "unshift" : "push"](() => {
30782
- x = M, e(5, x);
30780
+ g.addAnnotation(R), v.setSelected(R.id), p.setMouseNavEnabled(!0);
30781
+ }, O = (F) => Du(F), G = (F) => ir(F);
30782
+ function $(F) {
30783
+ xn[F ? "unshift" : "push"](() => {
30784
+ x = F, e(5, x);
30783
30785
  });
30784
30786
  }
30785
- return r.$$set = (M) => {
30786
- "drawingEnabled" in M && e(0, a = M.drawingEnabled), "filter" in M && e(15, l = M.filter), "preferredDrawingMode" in M && e(16, h = M.preferredDrawingMode), "state" in M && e(17, c = M.state), "style" in M && e(1, u = M.style), "toolName" in M && e(2, d = M.toolName), "user" in M && e(18, f = M.user), "viewer" in M && e(3, p = M.viewer);
30787
+ return r.$$set = (F) => {
30788
+ "drawingEnabled" in F && e(0, a = F.drawingEnabled), "filter" in F && e(15, l = F.filter), "preferredDrawingMode" in F && e(16, h = F.preferredDrawingMode), "state" in F && e(17, c = F.state), "style" in F && e(1, u = F.style), "toolName" in F && e(2, d = F.toolName), "user" in F && e(18, f = F.user), "viewer" in F && e(3, p = F.viewer);
30787
30789
  }, r.$$.update = () => {
30788
30790
  r.$$.dirty[0] & /*toolName*/
30789
30791
  4 && e(7, { tool: i, opts: s } = Hn(d) || { tool: void 0, opts: void 0 }, i, (e(21, s), e(2, d))), r.$$.dirty[0] & /*opts, preferredDrawingMode*/
@@ -30803,11 +30805,11 @@ function _E(r, t, e) {
30803
30805
  i,
30804
30806
  v,
30805
30807
  S,
30806
- R,
30808
+ P,
30807
30809
  E,
30808
30810
  b,
30809
- D,
30810
- F,
30811
+ B,
30812
+ O,
30811
30813
  l,
30812
30814
  h,
30813
30815
  c,
@@ -30858,29 +30860,29 @@ function xE(r) {
30858
30860
  ), h, c, u, d;
30859
30861
  return {
30860
30862
  c() {
30861
- t = Et("g"), e = Et("rect"), a = Et("text"), h = gl(l), B(e, "class", "a9s-presence-label-bg svelte-1rehw2p"), B(
30863
+ t = Et("g"), e = Et("rect"), a = Et("text"), h = gl(l), M(e, "class", "a9s-presence-label-bg svelte-1rehw2p"), M(
30862
30864
  e,
30863
30865
  "x",
30864
30866
  /*x*/
30865
30867
  r[0]
30866
- ), B(e, "y", i = /*y*/
30868
+ ), M(e, "y", i = /*y*/
30867
30869
  r[1] - 18 / /*scale*/
30868
- r[3]), B(e, "height", s = 18 / /*scale*/
30869
- r[3]), B(e, "fill", n = /*user*/
30870
- r[2].appearance.color), B(e, "stroke", o = /*user*/
30871
- r[2].appearance.color), B(a, "font-size", c = 12 / /*scale*/
30872
- r[3]), B(a, "x", u = /*x*/
30870
+ r[3]), M(e, "height", s = 18 / /*scale*/
30871
+ r[3]), M(e, "fill", n = /*user*/
30872
+ r[2].appearance.color), M(e, "stroke", o = /*user*/
30873
+ r[2].appearance.color), M(a, "font-size", c = 12 / /*scale*/
30874
+ r[3]), M(a, "x", u = /*x*/
30873
30875
  r[0] + Math.round(5 / /*scale*/
30874
- r[3])), B(a, "y", d = /*y*/
30876
+ r[3])), M(a, "y", d = /*y*/
30875
30877
  r[1] - 5 / /*scale*/
30876
- r[3]), B(a, "class", "svelte-1rehw2p"), B(t, "class", "a9s-presence-label");
30878
+ r[3]), M(a, "class", "svelte-1rehw2p"), M(t, "class", "a9s-presence-label");
30877
30879
  },
30878
30880
  m(f, p) {
30879
30881
  pt(f, t, p), sr(t, e), sr(t, a), sr(a, h), r[6](t);
30880
30882
  },
30881
30883
  p(f, [p]) {
30882
30884
  p & /*x*/
30883
- 1 && B(
30885
+ 1 && M(
30884
30886
  e,
30885
30887
  "x",
30886
30888
  /*x*/
@@ -30888,23 +30890,23 @@ function xE(r) {
30888
30890
  ), p & /*y, scale*/
30889
30891
  10 && i !== (i = /*y*/
30890
30892
  f[1] - 18 / /*scale*/
30891
- f[3]) && B(e, "y", i), p & /*scale*/
30893
+ f[3]) && M(e, "y", i), p & /*scale*/
30892
30894
  8 && s !== (s = 18 / /*scale*/
30893
- f[3]) && B(e, "height", s), p & /*user*/
30895
+ f[3]) && M(e, "height", s), p & /*user*/
30894
30896
  4 && n !== (n = /*user*/
30895
- f[2].appearance.color) && B(e, "fill", n), p & /*user*/
30897
+ f[2].appearance.color) && M(e, "fill", n), p & /*user*/
30896
30898
  4 && o !== (o = /*user*/
30897
- f[2].appearance.color) && B(e, "stroke", o), p & /*user*/
30899
+ f[2].appearance.color) && M(e, "stroke", o), p & /*user*/
30898
30900
  4 && l !== (l = /*user*/
30899
30901
  f[2].appearance.label + "") && zg(h, l), p & /*scale*/
30900
30902
  8 && c !== (c = 12 / /*scale*/
30901
- f[3]) && B(a, "font-size", c), p & /*x, scale*/
30903
+ f[3]) && M(a, "font-size", c), p & /*x, scale*/
30902
30904
  9 && u !== (u = /*x*/
30903
30905
  f[0] + Math.round(5 / /*scale*/
30904
- f[3])) && B(a, "x", u), p & /*y, scale*/
30906
+ f[3])) && M(a, "x", u), p & /*y, scale*/
30905
30907
  10 && d !== (d = /*y*/
30906
30908
  f[1] - 5 / /*scale*/
30907
- f[3]) && B(a, "y", d);
30909
+ f[3]) && M(a, "y", d);
30908
30910
  },
30909
30911
  i: Xe,
30910
30912
  o: Xe,
@@ -30960,9 +30962,9 @@ function wE(r) {
30960
30962
  }
30961
30963
  }), {
30962
30964
  c() {
30963
- t = Et("g"), Jt(e.$$.fragment), i = Et("polygon"), B(i, "class", "a9s-presence-shape a9s-presence-polygon svelte-fgq4n0"), B(i, "stroke", s = /*user*/
30964
- r[0].appearance.color), B(i, "fill", "transparent"), B(i, "points", n = /*geom*/
30965
- r[2].points.map(fu).join(" ")), B(t, "class", "a9s-presence-overlay");
30965
+ t = Et("g"), Jt(e.$$.fragment), i = Et("polygon"), M(i, "class", "a9s-presence-shape a9s-presence-polygon svelte-fgq4n0"), M(i, "stroke", s = /*user*/
30966
+ r[0].appearance.color), M(i, "fill", "transparent"), M(i, "points", n = /*geom*/
30967
+ r[2].points.map(fu).join(" ")), M(t, "class", "a9s-presence-overlay");
30966
30968
  },
30967
30969
  m(a, l) {
30968
30970
  pt(a, t, l), Yt(e, t, null), sr(t, i), o = !0;
@@ -30979,9 +30981,9 @@ function wE(r) {
30979
30981
  8 && (h.y = /*origin*/
30980
30982
  a[3][1]), e.$set(h), (!o || l & /*user*/
30981
30983
  1 && s !== (s = /*user*/
30982
- a[0].appearance.color)) && B(i, "stroke", s), (!o || l & /*geom*/
30984
+ a[0].appearance.color)) && M(i, "stroke", s), (!o || l & /*geom*/
30983
30985
  4 && n !== (n = /*geom*/
30984
- a[2].points.map(fu).join(" "))) && B(i, "points", n);
30986
+ a[2].points.map(fu).join(" "))) && M(i, "points", n);
30985
30987
  },
30986
30988
  i(a) {
30987
30989
  o || (nt(e.$$.fragment, a), o = !0);
@@ -31039,12 +31041,12 @@ function AE(r) {
31039
31041
  }
31040
31042
  }), {
31041
31043
  c() {
31042
- t = Et("g"), Jt(e.$$.fragment), i = Et("rect"), B(i, "class", "a9s-presence-shape a9s-presence-rectangle svelte-gze948"), B(i, "stroke", s = /*user*/
31043
- r[0].appearance.color), B(i, "fill", "transparent"), B(i, "x", n = /*geom*/
31044
- r[2].x), B(i, "y", o = /*geom*/
31045
- r[2].y), B(i, "width", a = /*geom*/
31046
- r[2].w), B(i, "height", l = /*geom*/
31047
- r[2].h), B(t, "class", "a9s-presence-overlay");
31044
+ t = Et("g"), Jt(e.$$.fragment), i = Et("rect"), M(i, "class", "a9s-presence-shape a9s-presence-rectangle svelte-gze948"), M(i, "stroke", s = /*user*/
31045
+ r[0].appearance.color), M(i, "fill", "transparent"), M(i, "x", n = /*geom*/
31046
+ r[2].x), M(i, "y", o = /*geom*/
31047
+ r[2].y), M(i, "width", a = /*geom*/
31048
+ r[2].w), M(i, "height", l = /*geom*/
31049
+ r[2].h), M(t, "class", "a9s-presence-overlay");
31048
31050
  },
31049
31051
  m(c, u) {
31050
31052
  pt(c, t, u), Yt(e, t, null), sr(t, i), h = !0;
@@ -31061,15 +31063,15 @@ function AE(r) {
31061
31063
  4 && (d.y = /*geom*/
31062
31064
  c[2].y), e.$set(d), (!h || u & /*user*/
31063
31065
  1 && s !== (s = /*user*/
31064
- c[0].appearance.color)) && B(i, "stroke", s), (!h || u & /*geom*/
31066
+ c[0].appearance.color)) && M(i, "stroke", s), (!h || u & /*geom*/
31065
31067
  4 && n !== (n = /*geom*/
31066
- c[2].x)) && B(i, "x", n), (!h || u & /*geom*/
31068
+ c[2].x)) && M(i, "x", n), (!h || u & /*geom*/
31067
31069
  4 && o !== (o = /*geom*/
31068
- c[2].y)) && B(i, "y", o), (!h || u & /*geom*/
31070
+ c[2].y)) && M(i, "y", o), (!h || u & /*geom*/
31069
31071
  4 && a !== (a = /*geom*/
31070
- c[2].w)) && B(i, "width", a), (!h || u & /*geom*/
31072
+ c[2].w)) && M(i, "width", a), (!h || u & /*geom*/
31071
31073
  4 && l !== (l = /*geom*/
31072
- c[2].h)) && B(i, "height", l);
31074
+ c[2].h)) && M(i, "height", l);
31073
31075
  },
31074
31076
  i(c) {
31075
31077
  h || (nt(e.$$.fragment, c), h = !0);
@@ -31332,8 +31334,8 @@ function ME(r) {
31332
31334
  );
31333
31335
  return {
31334
31336
  c() {
31335
- t = Et("svg"), e = Et("g"), n && n.c(), B(e, "transform", i = /*transform*/
31336
- r[6]), B(t, "class", "a9s-osd-presencelayer svelte-1krwc4m");
31337
+ t = Et("svg"), e = Et("g"), n && n.c(), M(e, "transform", i = /*transform*/
31338
+ r[6]), M(t, "class", "a9s-osd-presencelayer svelte-1krwc4m");
31337
31339
  },
31338
31340
  m(o, a) {
31339
31341
  pt(o, t, a), sr(t, e), n && n.m(e, null), s = !0;
@@ -31345,7 +31347,7 @@ function ME(r) {
31345
31347
  n = null;
31346
31348
  }), je()), (!s || a & /*transform*/
31347
31349
  64 && i !== (i = /*transform*/
31348
- o[6])) && B(e, "transform", i);
31350
+ o[6])) && M(e, "transform", i);
31349
31351
  },
31350
31352
  i(o) {
31351
31353
  s || (nt(n), s = !0);
@@ -31455,8 +31457,8 @@ const _u = (r, t) => {
31455
31457
  e.adapter,
31456
31458
  e.autoSave
31457
31459
  );
31458
- let h = vp(), c = e.drawingEnabled, u = e.drawingMode;
31459
- const d = Hu(a, r.element), f = new Ow({
31460
+ let h = vp(), c = e.drawingEnabled, u = e.drawingMode, d = e.modalSelect;
31461
+ const f = Hu(a, r.element), p = new Ow({
31460
31462
  target: r.element,
31461
31463
  props: {
31462
31464
  state: i,
@@ -31464,14 +31466,14 @@ const _u = (r, t) => {
31464
31466
  style: e.style,
31465
31467
  filter: void 0
31466
31468
  }
31467
- }), p = new OE({
31469
+ }), m = new OE({
31468
31470
  target: r.element.querySelector(".openseadragon-canvas"),
31469
31471
  props: {
31470
31472
  provider: void 0,
31471
31473
  store: o,
31472
31474
  viewer: r
31473
31475
  }
31474
- }), m = new vE({
31476
+ }), _ = new vE({
31475
31477
  target: r.element.querySelector(".openseadragon-canvas"),
31476
31478
  props: {
31477
31479
  drawingEnabled: !!c,
@@ -31483,60 +31485,63 @@ const _u = (r, t) => {
31483
31485
  viewer: r
31484
31486
  }
31485
31487
  });
31486
- f.$on("click", (M) => {
31487
- const { originalEvent: K, annotation: P } = M.detail;
31488
- e.modalSelect ? n.isEmpty() && P && n.userSelect(P.id, K) : P && !(u === "click" && c) ? n.userSelect(P.id, K) : n.isEmpty() || n.clear();
31489
- }), r.element.addEventListener("pointerdown", (M) => {
31488
+ p.$on("click", (R) => {
31489
+ const { originalEvent: U, annotation: z } = R.detail;
31490
+ d ? n.isEmpty() && z && n.userSelect(z.id, U) : z && !(u === "click" && c) ? n.userSelect(z.id, U) : n.isEmpty() || n.clear();
31491
+ }), r.element.addEventListener("pointerdown", (R) => {
31490
31492
  if (s.current) {
31491
- const K = o.getAnnotation(s.current);
31492
- l.emit("clickAnnotation", K, M);
31493
+ const U = o.getAnnotation(s.current);
31494
+ l.emit("clickAnnotation", U, R);
31493
31495
  }
31494
31496
  }), _u(r, e.theme);
31495
- const _ = fp(i, a, e.adapter), y = () => {
31496
- m.$set({ drawingEnabled: !1 }), setTimeout(() => m.$set({ drawingEnabled: !0 }), 1);
31497
- }, x = () => {
31498
- f.$destroy(), p.$destroy(), m.$destroy(), d.destroy(), a.destroy();
31499
- }, g = FE(r, o), v = LE(r, o), w = () => m.getDrawingTool(), I = () => h, A = () => m.isDrawingEnabled(), C = (M, K, P) => Lu(M, K, P), N = (M, K) => Ou(M, K), S = (M) => {
31500
- if (!Hn(M))
31501
- throw `No drawing tool named ${M}`;
31502
- m.$set({ toolName: M });
31503
- }, R = (M) => {
31504
- c = M, m.$set({ drawingEnabled: c });
31505
- }, E = (M) => {
31506
- f.$set({ filter: M }), m.$set({ filter: M });
31507
- }, b = (M) => {
31508
- f.$set({ style: M }), m.$set({ style: M });
31509
- }, D = (M) => (
31497
+ const y = fp(i, a, e.adapter), x = () => {
31498
+ _.$set({ drawingEnabled: !1 }), setTimeout(() => _.$set({ drawingEnabled: !0 }), 1);
31499
+ }, g = () => {
31500
+ p.$destroy(), m.$destroy(), _.$destroy(), f.destroy(), a.destroy();
31501
+ }, v = FE(r, o), w = LE(r, o), I = () => _.getDrawingTool(), A = () => h, C = () => _.isDrawingEnabled(), N = (R, U, z) => Lu(R, U, z), S = (R, U) => Ou(R, U), P = (R) => {
31502
+ if (!Hn(R))
31503
+ throw `No drawing tool named ${R}`;
31504
+ _.$set({ toolName: R });
31505
+ }, E = (R) => {
31506
+ c = R, _.$set({ drawingEnabled: c });
31507
+ }, b = (R) => {
31508
+ p.$set({ filter: R }), _.$set({ filter: R });
31509
+ }, B = (R) => {
31510
+ d = R;
31511
+ }, O = (R) => {
31512
+ p.$set({ style: R }), _.$set({ style: R });
31513
+ }, G = (R) => (
31510
31514
  // @ts-ignore
31511
- p.$set({ provider: M })
31512
- ), F = (M) => _u(r, M), G = (M) => {
31513
- h = M, m.$set({ user: M });
31514
- }, $ = (M) => (
31515
+ m.$set({ provider: R })
31516
+ ), $ = (R) => _u(r, R), F = (R) => {
31517
+ h = R, _.$set({ user: R });
31518
+ }, Q = (R) => (
31515
31519
  // @ts-ignore
31516
- f.$set({ visible: M })
31520
+ p.$set({ visible: R })
31517
31521
  );
31518
31522
  return {
31519
- ..._,
31520
- cancelDrawing: y,
31521
- destroy: x,
31522
- fitBounds: g,
31523
- fitBoundsWithConstraints: v,
31524
- getDrawingTool: w,
31525
- getUser: I,
31526
- isDrawingEnabled: A,
31523
+ ...y,
31524
+ cancelDrawing: x,
31525
+ destroy: g,
31526
+ fitBounds: v,
31527
+ fitBoundsWithConstraints: w,
31528
+ getDrawingTool: I,
31529
+ getUser: A,
31530
+ isDrawingEnabled: C,
31527
31531
  listDrawingTools: $n,
31528
31532
  on: l.on,
31529
31533
  off: l.off,
31530
- registerDrawingTool: C,
31531
- registerShapeEditor: N,
31532
- setDrawingEnabled: R,
31533
- setDrawingTool: S,
31534
- setFilter: E,
31535
- setPresenceProvider: D,
31536
- setStyle: b,
31537
- setTheme: F,
31538
- setUser: G,
31539
- setVisible: $,
31534
+ registerDrawingTool: N,
31535
+ registerShapeEditor: S,
31536
+ setDrawingEnabled: E,
31537
+ setDrawingTool: P,
31538
+ setFilter: b,
31539
+ setModalSelect: B,
31540
+ setPresenceProvider: G,
31541
+ setStyle: O,
31542
+ setTheme: $,
31543
+ setUser: F,
31544
+ setVisible: Q,
31540
31545
  state: i,
31541
31546
  viewer: r
31542
31547
  };