@annotorious/openseadragon 3.0.13 → 3.0.14

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.
@@ -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) => ({
@@ -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);
@@ -6719,8 +6719,8 @@ var gd = Ni, Ui = _0, Z0 = B0, J0 = ws, Os = gd("%WeakMap%", !0), Fs = gd("%Map%
6719
6719
  }
6720
6720
  typeof v.get(Mo) > "u" && (w = 0);
6721
6721
  }
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;
6722
+ if (typeof c == "function" ? g = c(e, g) : g instanceof Date ? g = f(g) : i === "comma" && Le(g) && (g = on.maybeMap(g, function(R) {
6723
+ return R instanceof Date ? f(R) : R;
6724
6724
  })), g === null) {
6725
6725
  if (o)
6726
6726
  return h && !_ ? h(e, Ot.encoder, y, "key", p) : e;
@@ -6742,21 +6742,21 @@ var gd = Ni, Ui = _0, Z0 = B0, J0 = ws, Os = gd("%WeakMap%", !0), Fs = gd("%Map%
6742
6742
  else if (Le(c))
6743
6743
  S = c;
6744
6744
  else {
6745
- var R = Object.keys(g);
6746
- S = u ? R.sort(u) : R;
6745
+ var P = Object.keys(g);
6746
+ S = u ? P.sort(u) : P;
6747
6747
  }
6748
6748
  var E = l ? e.replace(/\./g, "%2E") : e, b = s && Le(g) && g.length === 1 ? E + "[]" : E;
6749
6749
  if (n && Le(g) && g.length === 0)
6750
6750
  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];
6751
+ for (var B = 0; B < S.length; ++B) {
6752
+ var O = S[B], G = typeof O == "object" && typeof O.value < "u" ? O.value : g[O];
6753
6753
  if (!(a && G === null)) {
6754
- var $ = d && l ? F.replace(/\./g, "%2E") : F, M = Le(g) ? typeof i == "function" ? i(b, $) : b : b + (d ? "." + $ : "[" + $ + "]");
6754
+ var $ = d && l ? O.replace(/\./g, "%2E") : O, F = Le(g) ? typeof i == "function" ? i(b, $) : b : b + (d ? "." + $ : "[" + $ + "]");
6755
6755
  x.set(t, w);
6756
- var K = vd();
6757
- K.set(Mo, x), bd(N, r(
6756
+ var Q = vd();
6757
+ Q.set(Mo, x), bd(N, r(
6758
6758
  G,
6759
- M,
6759
+ F,
6760
6760
  i,
6761
6761
  s,
6762
6762
  n,
@@ -6772,7 +6772,7 @@ var gd = Ni, Ui = _0, Z0 = B0, J0 = ws, Os = gd("%WeakMap%", !0), Fs = gd("%Map%
6772
6772
  m,
6773
6773
  _,
6774
6774
  y,
6775
- K
6775
+ Q
6776
6776
  ));
6777
6777
  }
6778
6778
  }
@@ -7089,23 +7089,23 @@ or.prototype.parse = function(r, t, e) {
7089
7089
  }
7090
7090
  }
7091
7091
  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));
7092
+ var P = this.port ? ":" + this.port : "", E = this.hostname || "";
7093
+ this.host = E + P, this.href += this.host, y && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), a[0] !== "/" && (a = "/" + a));
7094
7094
  }
7095
7095
  if (!K_[c])
7096
7096
  for (var f = 0, g = Ta.length; f < g; f++) {
7097
7097
  var b = Ta[f];
7098
7098
  if (a.indexOf(b) !== -1) {
7099
- var D = encodeURIComponent(b);
7100
- D === b && (D = escape(b)), a = a.split(b).join(D);
7099
+ var B = encodeURIComponent(b);
7100
+ B === b && (B = escape(b)), a = a.split(b).join(B);
7101
7101
  }
7102
7102
  }
7103
- var F = a.indexOf("#");
7104
- F !== -1 && (this.hash = a.substr(F), a = a.slice(0, F));
7103
+ var O = a.indexOf("#");
7104
+ O !== -1 && (this.hash = a.substr(O), a = a.slice(0, O));
7105
7105
  var G = a.indexOf("?");
7106
7106
  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 + $;
7107
+ var P = this.pathname || "", $ = this.search || "";
7108
+ this.path = P + $;
7109
7109
  }
7110
7110
  return this.href = this.format(), this;
7111
7111
  };
@@ -7320,7 +7320,7 @@ const kt = {
7320
7320
  toAbsolute(r, t, e) {
7321
7321
  if (pe(r), this.isDataUrl(r) || this.isBlobUrl(r))
7322
7322
  return r;
7323
- const i = Vi(this.toPosix(t ?? W.ADAPTER.getBaseUrl())), s = Vi(this.toPosix(e ?? this.rootname(i)));
7323
+ const i = Vi(this.toPosix(t ?? j.ADAPTER.getBaseUrl())), s = Vi(this.toPosix(e ?? this.rootname(i)));
7324
7324
  return r = this.toPosix(r), r.startsWith("/") ? kt.join(s, r.slice(1)) : this.isAbsolute(r) ? r : this.join(i, r);
7325
7325
  },
7326
7326
  /**
@@ -7524,12 +7524,12 @@ function rv() {
7524
7524
  var t;
7525
7525
  const r = {
7526
7526
  stencil: !0,
7527
- failIfMajorPerformanceCaveat: W.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT
7527
+ failIfMajorPerformanceCaveat: j.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT
7528
7528
  };
7529
7529
  try {
7530
- if (!W.ADAPTER.getWebGLRenderingContext())
7530
+ if (!j.ADAPTER.getWebGLRenderingContext())
7531
7531
  return !1;
7532
- const e = W.ADAPTER.createCanvas();
7532
+ const e = j.ADAPTER.createCanvas();
7533
7533
  let i = e.getContext("webgl", r) || e.getContext("experimental-webgl", r);
7534
7534
  const s = !!((t = i == null ? void 0 : i.getContextAttributes()) != null && t.stencil);
7535
7535
  if (i) {
@@ -8066,7 +8066,7 @@ class yv {
8066
8066
  * @param {number} [resolution=PIXI.settings.RESOLUTION] - The resolution / device pixel ratio of the canvas
8067
8067
  */
8068
8068
  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);
8069
+ this._canvas = j.ADAPTER.createCanvas(), this._context = this._canvas.getContext("2d"), this.resolution = i || j.RESOLUTION, this.resize(t, e);
8070
8070
  }
8071
8071
  /**
8072
8072
  * Clears the canvas that was created by the CanvasRenderTarget class.
@@ -8178,7 +8178,7 @@ function xv(r, t = globalThis.location) {
8178
8178
  }
8179
8179
  function ar(r, t = 1) {
8180
8180
  var i;
8181
- const e = (i = W.RETINA_PREFIX) == null ? void 0 : i.exec(r);
8181
+ const e = (i = j.RETINA_PREFIX) == null ? void 0 : i.exec(r);
8182
8182
  return e ? parseFloat(e[1]) : t;
8183
8183
  }
8184
8184
  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 +8766,7 @@ const Tv = {
8766
8766
  resolution: f,
8767
8767
  resourceOptions: p
8768
8768
  } = 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);
8769
+ 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
8770
  }
8771
8771
  /**
8772
8772
  * Pixel width of the source of this texture
@@ -8917,7 +8917,7 @@ const Tv = {
8917
8917
  * @param {boolean} [strict] - Enforce strict-mode, see {@link PIXI.settings.STRICT_TEXTURE_CACHE}.
8918
8918
  * @returns {PIXI.BaseTexture} The new base texture.
8919
8919
  */
8920
- static from(t, e, i = W.STRICT_TEXTURE_CACHE) {
8920
+ static from(t, e, i = j.STRICT_TEXTURE_CACHE) {
8921
8921
  const s = typeof t == "string";
8922
8922
  let n = null;
8923
8923
  if (s)
@@ -8956,7 +8956,7 @@ const Tv = {
8956
8956
  t = t || new Float32Array(e * i * 4);
8957
8957
  const n = new jn(t, { width: e, height: i, ...s == null ? void 0 : s.resourceOptions });
8958
8958
  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));
8959
+ 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
8960
  }
8961
8961
  /**
8962
8962
  * Adds a BaseTexture to the global BaseTextureCache. This cache is shared across the whole PIXI object.
@@ -9030,7 +9030,7 @@ Da.defaultOptions = {
9030
9030
  * @type {PIXI.TYPES}
9031
9031
  * @default PIXI.TYPES.UNSIGNED_BYTE
9032
9032
  */
9033
- type: J.UNSIGNED_BYTE
9033
+ type: Z.UNSIGNED_BYTE
9034
9034
  }, /** Global number of the texture batch, used by multi-texture renderers. */
9035
9035
  Da._globalBatch = 0;
9036
9036
  let st = Da;
@@ -9099,7 +9099,7 @@ class In {
9099
9099
  * @param [instance=false] - Whether the geometry is instanced.
9100
9100
  * @param [divisor=1] - Divisor to use when doing instanced rendering
9101
9101
  */
9102
- constructor(t, e = 0, i = !1, s = J.FLOAT, n, o, a, l = 1) {
9102
+ constructor(t, e = 0, i = !1, s = Z.FLOAT, n, o, a, l = 1) {
9103
9103
  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
9104
  }
9105
9105
  /** Destroys the Attribute. */
@@ -9326,7 +9326,7 @@ class Pd extends Tr {
9326
9326
  * is updated every frame, `true` doesn't change frame-to-frame.
9327
9327
  */
9328
9328
  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);
9329
+ 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
9330
  }
9331
9331
  }
9332
9332
  const Cn = Math.PI * 2, Pv = 180 / Math.PI, Mv = Math.PI / 180;
@@ -10718,9 +10718,9 @@ const Dd = {};
10718
10718
  let si = Dd;
10719
10719
  function Uv() {
10720
10720
  if (si === Dd || si != null && si.isContextLost()) {
10721
- const r = W.ADAPTER.createCanvas();
10721
+ const r = j.ADAPTER.createCanvas();
10722
10722
  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;
10723
+ 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
10724
  }
10725
10725
  return si;
10726
10726
  }
@@ -11025,7 +11025,7 @@ function Wv() {
11025
11025
  }
11026
11026
  function jv(r) {
11027
11027
  let t = !0;
11028
- const e = W.ADAPTER.getNavigator();
11028
+ const e = j.ADAPTER.getNavigator();
11029
11029
  if (Qe.tablet || Qe.phone) {
11030
11030
  if (Qe.apple.device) {
11031
11031
  const i = e.userAgent.match(/OS (\d+)_(\d+)?/);
@@ -11175,7 +11175,7 @@ const Zi = class ge extends Zn {
11175
11175
  */
11176
11176
  contextChange() {
11177
11177
  const t = this.renderer.gl;
11178
- W.PREFER_ENV === Yr.WEBGL_LEGACY ? this.maxTextures = 1 : (this.maxTextures = Math.min(
11178
+ j.PREFER_ENV === Yr.WEBGL_LEGACY ? this.maxTextures = 1 : (this.maxTextures = Math.min(
11179
11179
  t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),
11180
11180
  ge.defaultMaxTextures
11181
11181
  ), this.maxTextures = Ev(
@@ -11679,7 +11679,7 @@ class Pn {
11679
11679
  */
11680
11680
  createContext(t, e) {
11681
11681
  let i;
11682
- if (W.PREFER_ENV >= Yr.WEBGL2 && (i = t.getContext("webgl2", e)), i)
11682
+ if (j.PREFER_ENV >= Yr.WEBGL2 && (i = t.getContext("webgl2", e)), i)
11683
11683
  this.webGLVersion = 2;
11684
11684
  else if (this.webGLVersion = 1, i = t.getContext("webgl", e) || t.getContext("experimental-webgl", e), !i)
11685
11685
  throw new Error("This browser does not support WebGL. Try using the canvas renderer");
@@ -11828,7 +11828,7 @@ class Ga {
11828
11828
  height: this.height,
11829
11829
  mipmap: Ve.OFF,
11830
11830
  format: k.DEPTH_COMPONENT,
11831
- type: J.UNSIGNED_SHORT
11831
+ type: Z.UNSIGNED_SHORT
11832
11832
  }), this.dirtyId++, this.dirtyFormat++, this;
11833
11833
  }
11834
11834
  /** Enable depth on the frame buffer. */
@@ -11997,7 +11997,7 @@ class Ud extends lr {
11997
11997
  const i = new Image();
11998
11998
  lr.crossOrigin(i, t, e.crossorigin), i.src = t, t = i;
11999
11999
  }
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();
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 ?? 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
12001
  }
12002
12002
  /**
12003
12003
  * Returns a promise when image will be loaded and processed.
@@ -12204,7 +12204,7 @@ class Y extends bs {
12204
12204
  * @param {boolean} [strict] - Enforce strict-mode, see {@link PIXI.settings.STRICT_TEXTURE_CACHE}.
12205
12205
  * @returns {PIXI.Texture} The newly created texture
12206
12206
  */
12207
- static from(t, e = {}, i = W.STRICT_TEXTURE_CACHE) {
12207
+ static from(t, e = {}, i = j.STRICT_TEXTURE_CACHE) {
12208
12208
  const s = typeof t == "string";
12209
12209
  let n = null;
12210
12210
  if (s)
@@ -12362,7 +12362,7 @@ class Y extends bs {
12362
12362
  /** A white texture of 16x16 size, used for graphics and other things Can not be destroyed. */
12363
12363
  static get WHITE() {
12364
12364
  if (!Y._WHITE) {
12365
- const t = W.ADAPTER.createCanvas(16, 16), e = t.getContext("2d");
12365
+ const t = j.ADAPTER.createCanvas(16, 16), e = t.getContext("2d");
12366
12366
  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
12367
  }
12368
12368
  return Y._WHITE;
@@ -12846,7 +12846,7 @@ class Hd {
12846
12846
  const t = this.gl = this.renderer.gl;
12847
12847
  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
12848
  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 = () => {
12849
+ j.PREFER_ENV === Yr.WEBGL_LEGACY && (e = null, i = null), e ? t.drawBuffers = (s) => e.drawBuffersWEBGL(s) : (this.hasMRT = !1, t.drawBuffers = () => {
12850
12850
  }), i || (this.writeDepthTexture = !1);
12851
12851
  } else
12852
12852
  this.msaaSamples = t.getInternalformatParameter(t.RENDERBUFFER, t.RGBA8, t.SAMPLES);
@@ -13138,7 +13138,7 @@ class Xd {
13138
13138
  const t = this.gl = this.renderer.gl, e = this.renderer.context;
13139
13139
  if (this.CONTEXT_UID = this.renderer.CONTEXT_UID, e.webGLVersion !== 2) {
13140
13140
  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);
13141
+ 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
13142
  }
13143
13143
  if (e.webGLVersion !== 2) {
13144
13144
  const i = t.getExtension("ANGLE_instanced_arrays");
@@ -13652,7 +13652,7 @@ const Ac = new wt(), Sc = [], jd = class ln extends Wd {
13652
13652
  * @param {PIXI.Renderer} renderer - The renderer this System works for.
13653
13653
  */
13654
13654
  constructor(t) {
13655
- super(t), this.glConst = W.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST;
13655
+ super(t), this.glConst = j.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST;
13656
13656
  }
13657
13657
  getStackLength() {
13658
13658
  const t = this.maskStack[this.maskStack.length - 1];
@@ -13742,7 +13742,7 @@ class Yd extends Wd {
13742
13742
  * @param renderer - The renderer this System works for.
13743
13743
  */
13744
13744
  constructor(t) {
13745
- super(t), this.glConst = W.ADAPTER.getWebGLRenderingContext().STENCIL_TEST;
13745
+ super(t), this.glConst = j.ADAPTER.getWebGLRenderingContext().STENCIL_TEST;
13746
13746
  }
13747
13747
  getStackLength() {
13748
13748
  const t = this.maskStack[this.maskStack.length - 1];
@@ -14706,85 +14706,85 @@ let Fr = Qi;
14706
14706
  q.add(Fr);
14707
14707
  class Wo {
14708
14708
  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;
14709
+ 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
14710
  }
14711
14711
  }
14712
14712
  function I1(r) {
14713
14713
  let t;
14714
14714
  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
14715
+ [r.RGB]: W.FLOAT,
14716
+ [r.RGBA]: W.FLOAT,
14717
+ [r.ALPHA]: W.FLOAT,
14718
+ [r.LUMINANCE]: W.FLOAT,
14719
+ [r.LUMINANCE_ALPHA]: W.FLOAT,
14720
+ [r.R8]: W.FLOAT,
14721
+ [r.R8_SNORM]: W.FLOAT,
14722
+ [r.RG8]: W.FLOAT,
14723
+ [r.RG8_SNORM]: W.FLOAT,
14724
+ [r.RGB8]: W.FLOAT,
14725
+ [r.RGB8_SNORM]: W.FLOAT,
14726
+ [r.RGB565]: W.FLOAT,
14727
+ [r.RGBA4]: W.FLOAT,
14728
+ [r.RGB5_A1]: W.FLOAT,
14729
+ [r.RGBA8]: W.FLOAT,
14730
+ [r.RGBA8_SNORM]: W.FLOAT,
14731
+ [r.RGB10_A2]: W.FLOAT,
14732
+ [r.RGB10_A2UI]: W.FLOAT,
14733
+ [r.SRGB8]: W.FLOAT,
14734
+ [r.SRGB8_ALPHA8]: W.FLOAT,
14735
+ [r.R16F]: W.FLOAT,
14736
+ [r.RG16F]: W.FLOAT,
14737
+ [r.RGB16F]: W.FLOAT,
14738
+ [r.RGBA16F]: W.FLOAT,
14739
+ [r.R32F]: W.FLOAT,
14740
+ [r.RG32F]: W.FLOAT,
14741
+ [r.RGB32F]: W.FLOAT,
14742
+ [r.RGBA32F]: W.FLOAT,
14743
+ [r.R11F_G11F_B10F]: W.FLOAT,
14744
+ [r.RGB9_E5]: W.FLOAT,
14745
+ [r.R8I]: W.INT,
14746
+ [r.R8UI]: W.UINT,
14747
+ [r.R16I]: W.INT,
14748
+ [r.R16UI]: W.UINT,
14749
+ [r.R32I]: W.INT,
14750
+ [r.R32UI]: W.UINT,
14751
+ [r.RG8I]: W.INT,
14752
+ [r.RG8UI]: W.UINT,
14753
+ [r.RG16I]: W.INT,
14754
+ [r.RG16UI]: W.UINT,
14755
+ [r.RG32I]: W.INT,
14756
+ [r.RG32UI]: W.UINT,
14757
+ [r.RGB8I]: W.INT,
14758
+ [r.RGB8UI]: W.UINT,
14759
+ [r.RGB16I]: W.INT,
14760
+ [r.RGB16UI]: W.UINT,
14761
+ [r.RGB32I]: W.INT,
14762
+ [r.RGB32UI]: W.UINT,
14763
+ [r.RGBA8I]: W.INT,
14764
+ [r.RGBA8UI]: W.UINT,
14765
+ [r.RGBA16I]: W.INT,
14766
+ [r.RGBA16UI]: W.UINT,
14767
+ [r.RGBA32I]: W.INT,
14768
+ [r.RGBA32UI]: W.UINT,
14769
+ [r.DEPTH_COMPONENT16]: W.FLOAT,
14770
+ [r.DEPTH_COMPONENT24]: W.FLOAT,
14771
+ [r.DEPTH_COMPONENT32F]: W.FLOAT,
14772
+ [r.DEPTH_STENCIL]: W.FLOAT,
14773
+ [r.DEPTH24_STENCIL8]: W.FLOAT,
14774
+ [r.DEPTH32F_STENCIL8]: W.FLOAT
14775
14775
  } : 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
14776
+ [r.RGB]: W.FLOAT,
14777
+ [r.RGBA]: W.FLOAT,
14778
+ [r.ALPHA]: W.FLOAT,
14779
+ [r.LUMINANCE]: W.FLOAT,
14780
+ [r.LUMINANCE_ALPHA]: W.FLOAT,
14781
+ [r.DEPTH_STENCIL]: W.FLOAT
14782
14782
  }, t;
14783
14783
  }
14784
14784
  function C1(r) {
14785
14785
  let t;
14786
14786
  return "WebGL2RenderingContext" in globalThis && r instanceof globalThis.WebGL2RenderingContext ? t = {
14787
- [J.UNSIGNED_BYTE]: {
14787
+ [Z.UNSIGNED_BYTE]: {
14788
14788
  [k.RGBA]: r.RGBA8,
14789
14789
  [k.RGB]: r.RGB8,
14790
14790
  [k.RG]: r.RG8,
@@ -14797,7 +14797,7 @@ function C1(r) {
14797
14797
  [k.LUMINANCE]: r.LUMINANCE,
14798
14798
  [k.LUMINANCE_ALPHA]: r.LUMINANCE_ALPHA
14799
14799
  },
14800
- [J.BYTE]: {
14800
+ [Z.BYTE]: {
14801
14801
  [k.RGBA]: r.RGBA8_SNORM,
14802
14802
  [k.RGB]: r.RGB8_SNORM,
14803
14803
  [k.RG]: r.RG8_SNORM,
@@ -14807,85 +14807,85 @@ function C1(r) {
14807
14807
  [k.RG_INTEGER]: r.RG8I,
14808
14808
  [k.RED_INTEGER]: r.R8I
14809
14809
  },
14810
- [J.UNSIGNED_SHORT]: {
14810
+ [Z.UNSIGNED_SHORT]: {
14811
14811
  [k.RGBA_INTEGER]: r.RGBA16UI,
14812
14812
  [k.RGB_INTEGER]: r.RGB16UI,
14813
14813
  [k.RG_INTEGER]: r.RG16UI,
14814
14814
  [k.RED_INTEGER]: r.R16UI,
14815
14815
  [k.DEPTH_COMPONENT]: r.DEPTH_COMPONENT16
14816
14816
  },
14817
- [J.SHORT]: {
14817
+ [Z.SHORT]: {
14818
14818
  [k.RGBA_INTEGER]: r.RGBA16I,
14819
14819
  [k.RGB_INTEGER]: r.RGB16I,
14820
14820
  [k.RG_INTEGER]: r.RG16I,
14821
14821
  [k.RED_INTEGER]: r.R16I
14822
14822
  },
14823
- [J.UNSIGNED_INT]: {
14823
+ [Z.UNSIGNED_INT]: {
14824
14824
  [k.RGBA_INTEGER]: r.RGBA32UI,
14825
14825
  [k.RGB_INTEGER]: r.RGB32UI,
14826
14826
  [k.RG_INTEGER]: r.RG32UI,
14827
14827
  [k.RED_INTEGER]: r.R32UI,
14828
14828
  [k.DEPTH_COMPONENT]: r.DEPTH_COMPONENT24
14829
14829
  },
14830
- [J.INT]: {
14830
+ [Z.INT]: {
14831
14831
  [k.RGBA_INTEGER]: r.RGBA32I,
14832
14832
  [k.RGB_INTEGER]: r.RGB32I,
14833
14833
  [k.RG_INTEGER]: r.RG32I,
14834
14834
  [k.RED_INTEGER]: r.R32I
14835
14835
  },
14836
- [J.FLOAT]: {
14836
+ [Z.FLOAT]: {
14837
14837
  [k.RGBA]: r.RGBA32F,
14838
14838
  [k.RGB]: r.RGB32F,
14839
14839
  [k.RG]: r.RG32F,
14840
14840
  [k.RED]: r.R32F,
14841
14841
  [k.DEPTH_COMPONENT]: r.DEPTH_COMPONENT32F
14842
14842
  },
14843
- [J.HALF_FLOAT]: {
14843
+ [Z.HALF_FLOAT]: {
14844
14844
  [k.RGBA]: r.RGBA16F,
14845
14845
  [k.RGB]: r.RGB16F,
14846
14846
  [k.RG]: r.RG16F,
14847
14847
  [k.RED]: r.R16F
14848
14848
  },
14849
- [J.UNSIGNED_SHORT_5_6_5]: {
14849
+ [Z.UNSIGNED_SHORT_5_6_5]: {
14850
14850
  [k.RGB]: r.RGB565
14851
14851
  },
14852
- [J.UNSIGNED_SHORT_4_4_4_4]: {
14852
+ [Z.UNSIGNED_SHORT_4_4_4_4]: {
14853
14853
  [k.RGBA]: r.RGBA4
14854
14854
  },
14855
- [J.UNSIGNED_SHORT_5_5_5_1]: {
14855
+ [Z.UNSIGNED_SHORT_5_5_5_1]: {
14856
14856
  [k.RGBA]: r.RGB5_A1
14857
14857
  },
14858
- [J.UNSIGNED_INT_2_10_10_10_REV]: {
14858
+ [Z.UNSIGNED_INT_2_10_10_10_REV]: {
14859
14859
  [k.RGBA]: r.RGB10_A2,
14860
14860
  [k.RGBA_INTEGER]: r.RGB10_A2UI
14861
14861
  },
14862
- [J.UNSIGNED_INT_10F_11F_11F_REV]: {
14862
+ [Z.UNSIGNED_INT_10F_11F_11F_REV]: {
14863
14863
  [k.RGB]: r.R11F_G11F_B10F
14864
14864
  },
14865
- [J.UNSIGNED_INT_5_9_9_9_REV]: {
14865
+ [Z.UNSIGNED_INT_5_9_9_9_REV]: {
14866
14866
  [k.RGB]: r.RGB9_E5
14867
14867
  },
14868
- [J.UNSIGNED_INT_24_8]: {
14868
+ [Z.UNSIGNED_INT_24_8]: {
14869
14869
  [k.DEPTH_STENCIL]: r.DEPTH24_STENCIL8
14870
14870
  },
14871
- [J.FLOAT_32_UNSIGNED_INT_24_8_REV]: {
14871
+ [Z.FLOAT_32_UNSIGNED_INT_24_8_REV]: {
14872
14872
  [k.DEPTH_STENCIL]: r.DEPTH32F_STENCIL8
14873
14873
  }
14874
14874
  } : t = {
14875
- [J.UNSIGNED_BYTE]: {
14875
+ [Z.UNSIGNED_BYTE]: {
14876
14876
  [k.RGBA]: r.RGBA,
14877
14877
  [k.RGB]: r.RGB,
14878
14878
  [k.ALPHA]: r.ALPHA,
14879
14879
  [k.LUMINANCE]: r.LUMINANCE,
14880
14880
  [k.LUMINANCE_ALPHA]: r.LUMINANCE_ALPHA
14881
14881
  },
14882
- [J.UNSIGNED_SHORT_5_6_5]: {
14882
+ [Z.UNSIGNED_SHORT_5_6_5]: {
14883
14883
  [k.RGB]: r.RGB
14884
14884
  },
14885
- [J.UNSIGNED_SHORT_4_4_4_4]: {
14885
+ [Z.UNSIGNED_SHORT_4_4_4_4]: {
14886
14886
  [k.RGBA]: r.RGBA
14887
14887
  },
14888
- [J.UNSIGNED_SHORT_5_5_5_1]: {
14888
+ [Z.UNSIGNED_SHORT_5_5_5_1]: {
14889
14889
  [k.RGBA]: r.RGBA
14890
14890
  }
14891
14891
  }, t;
@@ -14960,7 +14960,7 @@ class rf {
14960
14960
  if (i)
14961
14961
  for (let n = t - 1; n >= 0; --n) {
14962
14962
  const o = e[n];
14963
- o && o._glTextures[s].samplerType !== z.FLOAT && this.renderer.texture.unbind(o);
14963
+ o && o._glTextures[s].samplerType !== W.FLOAT && this.renderer.texture.unbind(o);
14964
14964
  }
14965
14965
  }
14966
14966
  /**
@@ -14974,7 +14974,7 @@ class rf {
14974
14974
  }
14975
14975
  initTextureType(t, e) {
14976
14976
  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;
14977
+ 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
14978
  }
14979
14979
  /**
14980
14980
  * Update a texture
@@ -14988,7 +14988,7 @@ class rf {
14988
14988
  return;
14989
14989
  const i = this.renderer;
14990
14990
  if (this.initTextureType(t, e), (s = t.resource) == null ? void 0 : s.upload(i, t, e))
14991
- e.samplerType !== z.FLOAT && (this.hasIntegerTextures = !0);
14991
+ e.samplerType !== W.FLOAT && (this.hasIntegerTextures = !0);
14992
14992
  else {
14993
14993
  const n = t.realWidth, o = t.realHeight, a = i.gl;
14994
14994
  (e.width !== n || e.height !== o || e.dirtyId < 0) && (e.width = n, e.height = o, a.texImage2D(
@@ -15145,7 +15145,7 @@ class Bn {
15145
15145
  * @param {PIXI.ViewOptions} options - the options for the view
15146
15146
  */
15147
15147
  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;
15148
+ 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
15149
  }
15150
15150
  /**
15151
15151
  * Resizes the screen and canvas to the specified dimensions.
@@ -15201,15 +15201,15 @@ Bn.extension = {
15201
15201
  name: "_view"
15202
15202
  };
15203
15203
  q.add(Bn);
15204
- W.PREFER_ENV = Yr.WEBGL2;
15205
- W.STRICT_TEXTURE_CACHE = !1;
15206
- W.RENDER_OPTIONS = {
15204
+ j.PREFER_ENV = Yr.WEBGL2;
15205
+ j.STRICT_TEXTURE_CACHE = !1;
15206
+ j.RENDER_OPTIONS = {
15207
15207
  ...Pn.defaultOptions,
15208
15208
  ...Rn.defaultOptions,
15209
15209
  ...Bn.defaultOptions,
15210
15210
  ...Mn.defaultOptions
15211
15211
  };
15212
- Object.defineProperties(W, {
15212
+ Object.defineProperties(j, {
15213
15213
  /**
15214
15214
  * @static
15215
15215
  * @name WRAP_MODE
@@ -15778,7 +15778,7 @@ const nf = class re {
15778
15778
  };
15779
15779
  nf.targetFPMS = 0.06;
15780
15780
  let ne = nf;
15781
- Object.defineProperties(W, {
15781
+ Object.defineProperties(j, {
15782
15782
  /**
15783
15783
  * Target frames per millisecond.
15784
15784
  * @static
@@ -16055,7 +16055,7 @@ const cn = class Ha extends S1 {
16055
16055
  * @param {PIXI.IRendererOptions} [options] - See {@link PIXI.settings.RENDER_OPTIONS} for defaults.
16056
16056
  */
16057
16057
  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({
16058
+ super(), this.type = Ku.WEBGL, t = Object.assign({}, j.RENDER_OPTIONS, t), this.gl = null, this.CONTEXT_UID = 0, this.globalUniforms = new we({
16059
16059
  projectionMatrix: new wt()
16060
16060
  }, !0);
16061
16061
  const e = {
@@ -16565,7 +16565,7 @@ class yi extends lr {
16565
16565
  return;
16566
16566
  }
16567
16567
  try {
16568
- const i = await W.ADAPTER.fetch(this.url, {
16568
+ const i = await j.ADAPTER.fetch(this.url, {
16569
16569
  mode: this.crossOrigin ? "cors" : "no-cors"
16570
16570
  });
16571
16571
  if (this.destroyed)
@@ -16616,7 +16616,7 @@ class yi extends lr {
16616
16616
  * @returns The cached placeholder canvas.
16617
16617
  */
16618
16618
  static get EMPTY() {
16619
- return yi._EMPTY = yi._EMPTY ?? W.ADAPTER.createCanvas(0, 0), yi._EMPTY;
16619
+ return yi._EMPTY = yi._EMPTY ?? j.ADAPTER.createCanvas(0, 0), yi._EMPTY;
16620
16620
  }
16621
16621
  }
16622
16622
  const Xa = class un extends lr {
@@ -16629,7 +16629,7 @@ const Xa = class un extends lr {
16629
16629
  * @param {boolean} [options.autoLoad=true] - Start loading right away.
16630
16630
  */
16631
16631
  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();
16632
+ 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
16633
  }
16634
16634
  load() {
16635
16635
  return this._load ? this._load : (this._load = new Promise((t) => {
@@ -17733,7 +17733,7 @@ const gf = class ja extends Rt {
17733
17733
  gf.defaultSortableChildren = !1;
17734
17734
  let Ae = gf;
17735
17735
  Ae.prototype.containerUpdateTransform = Ae.prototype.updateTransform;
17736
- Object.defineProperties(W, {
17736
+ Object.defineProperties(j, {
17737
17737
  /**
17738
17738
  * Sets the default value for the container property 'sortableChildren'.
17739
17739
  * @static
@@ -17761,7 +17761,7 @@ class ki extends Ae {
17761
17761
  this,
17762
17762
  t ? t.defaultAnchor.x : 0,
17763
17763
  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;
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 = j.ROUND_PIXELS;
17765
17765
  }
17766
17766
  /** When the texture is updated, this event will fire to update the scale and frame. */
17767
17767
  _onTextureUpdate() {
@@ -17780,7 +17780,7 @@ class ki extends Ae {
17780
17780
  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
17781
  let f = 0, p = 0, m = 0, _ = 0;
17782
17782
  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;
17783
+ const y = j.RESOLUTION;
17784
17784
  for (let x = 0; x < h.length; ++x)
17785
17785
  h[x] = Math.round(h[x] * y) / y;
17786
17786
  }
@@ -17798,7 +17798,7 @@ class ki extends Ae {
17798
17798
  this._transformTrimmedID = this.transform._worldID, this._textureTrimmedID = this._texture._updateID;
17799
17799
  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
17800
  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;
17801
+ const _ = j.RESOLUTION;
17802
17802
  for (let y = 0; y < e.length; ++y)
17803
17803
  e[y] = Math.round(e[y] * _) / _;
17804
17804
  }
@@ -21778,7 +21778,7 @@ const Tx = ".json", Ax = "application/json", Sx = {
21778
21778
  return Gi(r, Ax) || Ir(r, Tx);
21779
21779
  },
21780
21780
  async load(r) {
21781
- return await (await W.ADAPTER.fetch(r)).json();
21781
+ return await (await j.ADAPTER.fetch(r)).json();
21782
21782
  }
21783
21783
  };
21784
21784
  q.add(Sx);
@@ -21792,7 +21792,7 @@ const Ix = ".txt", Cx = "text/plain", Rx = {
21792
21792
  return Gi(r, Cx) || Ir(r, Ix);
21793
21793
  },
21794
21794
  async load(r) {
21795
- return await (await W.ADAPTER.fetch(r)).text();
21795
+ return await (await j.ADAPTER.fetch(r)).text();
21796
21796
  }
21797
21797
  };
21798
21798
  q.add(Rx);
@@ -21840,7 +21840,7 @@ const Nx = {
21840
21840
  },
21841
21841
  async load(r, t) {
21842
21842
  var i, s, n;
21843
- const e = W.ADAPTER.getFontFaceSet();
21843
+ const e = j.ADAPTER.getFontFaceSet();
21844
21844
  if (e) {
21845
21845
  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
21846
  for (let c = 0; c < l.length; c++) {
@@ -21855,7 +21855,7 @@ const Nx = {
21855
21855
  return console.warn("[loadWebFont] FontFace API is not supported. Skipping loading font"), null;
21856
21856
  },
21857
21857
  unload(r) {
21858
- (Array.isArray(r) ? r : [r]).forEach((t) => W.ADAPTER.getFontFaceSet().delete(t));
21858
+ (Array.isArray(r) ? r : [r]).forEach((t) => j.ADAPTER.getFontFaceSet().delete(t));
21859
21859
  }
21860
21860
  };
21861
21861
  q.add(Nx);
@@ -21993,7 +21993,7 @@ const $x = [".jpeg", ".jpg", ".png", ".webp", ".avif"], Hx = [
21993
21993
  "image/avif"
21994
21994
  ];
21995
21995
  async function Xx(r) {
21996
- const t = await W.ADAPTER.fetch(r);
21996
+ const t = await j.ADAPTER.fetch(r);
21997
21997
  if (!t.ok)
21998
21998
  throw new Error(`[loadImageBitmap] Failed to fetch ${r}: ${t.status} ${t.statusText}`);
21999
21999
  const e = await t.blob();
@@ -22054,7 +22054,7 @@ const Vx = ".svg", zx = "image/svg+xml", Wx = {
22054
22054
  return s.resource.src = t.src, As(s, e, t.src);
22055
22055
  },
22056
22056
  async load(r, t) {
22057
- return (await W.ADAPTER.fetch(r)).text();
22057
+ return (await j.ADAPTER.fetch(r)).text();
22058
22058
  },
22059
22059
  unload: Jn.unload
22060
22060
  };
@@ -22082,7 +22082,7 @@ const jx = [".mp4", ".m4v", ".webm", ".ogv"], Yx = [
22082
22082
  async load(r, t, e) {
22083
22083
  var o;
22084
22084
  let i;
22085
- const s = await (await W.ADAPTER.fetch(r)).blob(), n = URL.createObjectURL(s);
22085
+ const s = await (await j.ADAPTER.fetch(r)).blob(), n = URL.createObjectURL(s);
22086
22086
  try {
22087
22087
  const a = {
22088
22088
  autoPlay: this.config.defaultAutoPlay,
@@ -22926,7 +22926,7 @@ const ob = {
22926
22926
  parse: (r) => {
22927
22927
  var t;
22928
22928
  return {
22929
- resolution: parseFloat(((t = W.RETINA_PREFIX.exec(r)) == null ? void 0 : t[1]) ?? "1"),
22929
+ resolution: parseFloat(((t = j.RETINA_PREFIX.exec(r)) == null ? void 0 : t[1]) ?? "1"),
22930
22930
  format: kt.extname(r).slice(1),
22931
22931
  src: r
22932
22932
  };
@@ -23001,7 +23001,7 @@ const ab = {
23001
23001
  priority: 2
23002
23002
  },
23003
23003
  test: async () => {
23004
- const r = W.ADAPTER.createCanvas().getContext("webgl");
23004
+ const r = j.ADAPTER.createCanvas().getContext("webgl");
23005
23005
  return r ? (De = r, !0) : (console.warn("WebGL not available for compressed textures."), !1);
23006
23006
  },
23007
23007
  add: async (r) => {
@@ -23255,12 +23255,12 @@ const Uc = [171, 75, 84, 88, 32, 49, 49, 187, 13, 10, 26, 10], Sb = 67305985, me
23255
23255
  NUMBER_OF_MIPMAP_LEVELS: 56,
23256
23256
  BYTES_OF_KEY_VALUE_DATA: 60
23257
23257
  }, 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
23258
+ [Z.UNSIGNED_BYTE]: 1,
23259
+ [Z.UNSIGNED_SHORT]: 2,
23260
+ [Z.INT]: 4,
23261
+ [Z.UNSIGNED_INT]: 4,
23262
+ [Z.FLOAT]: 4,
23263
+ [Z.HALF_FLOAT]: 8
23264
23264
  }, Ib = {
23265
23265
  [k.RGBA]: 4,
23266
23266
  [k.RGB]: 3,
@@ -23270,9 +23270,9 @@ const Uc = [171, 75, 84, 88, 32, 49, 49, 187, 13, 10, 26, 10], Sb = 67305985, me
23270
23270
  [k.LUMINANCE_ALPHA]: 2,
23271
23271
  [k.ALPHA]: 1
23272
23272
  }, 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
23273
+ [Z.UNSIGNED_SHORT_4_4_4_4]: 2,
23274
+ [Z.UNSIGNED_SHORT_5_5_5_1]: 2,
23275
+ [Z.UNSIGNED_SHORT_5_6_5]: 2
23276
23276
  };
23277
23277
  function Rb(r, t, e = !1) {
23278
23278
  const i = new DataView(t);
@@ -23292,47 +23292,47 @@ function Rb(r, t, e = !1) {
23292
23292
  if (n !== 0 ? kc[n] ? w = kc[n] * Ib[o] : w = Cb[n] : w = Ln[a], w === void 0)
23293
23293
  throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");
23294
23294
  const I = e ? Bb(i, p, s) : null;
23295
- let A = v * w, C = l, N = h, S = y, R = x, E = rl + p;
23295
+ let A = v * w, C = l, N = h, S = y, P = x, E = rl + p;
23296
23296
  for (let b = 0; b < f; b++) {
23297
- const D = i.getUint32(E, s);
23298
- let F = E + 4;
23297
+ const B = i.getUint32(E, s);
23298
+ let O = E + 4;
23299
23299
  for (let G = 0; G < u; G++) {
23300
23300
  let $ = g[G];
23301
23301
  $ || ($ = g[G] = new Array(f)), $[b] = {
23302
23302
  levelID: b,
23303
23303
  // don't align mipWidth when texture not compressed! (glType not zero)
23304
23304
  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;
23305
+ levelHeight: f > 1 || n !== 0 ? N : P,
23306
+ levelBuffer: new Uint8Array(t, O, A)
23307
+ }, O += A;
23308
23308
  }
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;
23309
+ 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
23310
  }
23311
23311
  return n !== 0 ? {
23312
23312
  uncompressed: g.map((b) => {
23313
- let D = b[0].levelBuffer, F = !1;
23314
- return n === J.FLOAT ? D = new Float32Array(
23313
+ let B = b[0].levelBuffer, O = !1;
23314
+ return n === Z.FLOAT ? B = new Float32Array(
23315
23315
  b[0].levelBuffer.buffer,
23316
23316
  b[0].levelBuffer.byteOffset,
23317
23317
  b[0].levelBuffer.byteLength / 4
23318
- ) : n === J.UNSIGNED_INT ? (F = !0, D = new Uint32Array(
23318
+ ) : n === Z.UNSIGNED_INT ? (O = !0, B = new Uint32Array(
23319
23319
  b[0].levelBuffer.buffer,
23320
23320
  b[0].levelBuffer.byteOffset,
23321
23321
  b[0].levelBuffer.byteLength / 4
23322
- )) : n === J.INT && (F = !0, D = new Int32Array(
23322
+ )) : n === Z.INT && (O = !0, B = new Int32Array(
23323
23323
  b[0].levelBuffer.buffer,
23324
23324
  b[0].levelBuffer.byteOffset,
23325
23325
  b[0].levelBuffer.byteLength / 4
23326
23326
  )), {
23327
23327
  resource: new jn(
23328
- D,
23328
+ B,
23329
23329
  {
23330
23330
  width: b[0].levelWidth,
23331
23331
  height: b[0].levelHeight
23332
23332
  }
23333
23333
  ),
23334
23334
  type: n,
23335
- format: F ? Mb(o) : o
23335
+ format: O ? Mb(o) : o
23336
23336
  };
23337
23337
  }),
23338
23338
  kvData: I
@@ -23404,7 +23404,7 @@ const Db = {
23404
23404
  return Ir(r, ".dds");
23405
23405
  },
23406
23406
  async load(r, t, e) {
23407
- const i = await (await W.ADAPTER.fetch(r)).arrayBuffer(), s = Ab(i).map((n) => {
23407
+ const i = await (await j.ADAPTER.fetch(r)).arrayBuffer(), s = Ab(i).map((n) => {
23408
23408
  const o = new st(n, {
23409
23409
  mipmap: Ve.OFF,
23410
23410
  alphaMode: ee.NO_PREMULTIPLIED_ALPHA,
@@ -23430,7 +23430,7 @@ const Ob = {
23430
23430
  return Ir(r, ".ktx");
23431
23431
  },
23432
23432
  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 = {
23433
+ const i = await (await j.ADAPTER.fetch(r)).arrayBuffer(), { compressed: s, uncompressed: n, kvData: o } = Rb(r, i), a = s ?? n, l = {
23434
23434
  mipmap: Ve.OFF,
23435
23435
  alphaMode: ee.NO_PREMULTIPLIED_ALPHA,
23436
23436
  resolution: ar(r),
@@ -23463,13 +23463,13 @@ const Fb = ["s3tc", "s3tc_sRGB", "etc", "etc1", "pvrtc", "atc", "astc", "bptc"],
23463
23463
  const n = t.pop();
23464
23464
  if (Fb.includes(n))
23465
23465
  return {
23466
- resolution: parseFloat(((i = W.RETINA_PREFIX.exec(r)) == null ? void 0 : i[1]) ?? "1"),
23466
+ resolution: parseFloat(((i = j.RETINA_PREFIX.exec(r)) == null ? void 0 : i[1]) ?? "1"),
23467
23467
  format: n,
23468
23468
  src: r
23469
23469
  };
23470
23470
  }
23471
23471
  return {
23472
- resolution: parseFloat(((s = W.RETINA_PREFIX.exec(r)) == null ? void 0 : s[1]) ?? "1"),
23472
+ resolution: parseFloat(((s = j.RETINA_PREFIX.exec(r)) == null ? void 0 : s[1]) ?? "1"),
23473
23473
  format: e,
23474
23474
  src: r
23475
23475
  };
@@ -23801,13 +23801,13 @@ class $c {
23801
23801
  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
23802
  if (d < 1e-8 || n === 0)
23803
23803
  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);
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), P = Math.atan2(N - w, C - v);
23805
23805
  return {
23806
23806
  cx: v + t,
23807
23807
  cy: w + e,
23808
23808
  radius: n,
23809
23809
  startAngle: S,
23810
- endAngle: R,
23810
+ endAngle: P,
23811
23811
  anticlockwise: h * c > u * l
23812
23812
  };
23813
23813
  }
@@ -23986,40 +23986,40 @@ function Hb(r, t) {
23986
23986
  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
23987
  if (l) {
23988
23988
  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);
23989
+ const $ = (o.x + a.x) * 0.5, F = (a.y + o.y) * 0.5;
23990
+ i.unshift($, F), i.push($, F);
23991
23991
  }
23992
23992
  const c = t.points, u = i.length / 2;
23993
23993
  let d = i.length;
23994
23994
  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;
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, P = Math.sqrt(A * A + C * C);
23996
+ A /= P, C /= P, A *= p, C *= p;
23997
+ const E = n.alignment, b = (1 - E) * 2, B = E * 2;
23998
23998
  l || (n.cap === br.ROUND ? d += Rr(
23999
- y - A * (b - D) * 0.5,
24000
- x - C * (b - D) * 0.5,
23999
+ y - A * (b - B) * 0.5,
24000
+ x - C * (b - B) * 0.5,
24001
24001
  y - A * b,
24002
24002
  x - C * b,
24003
- y + A * D,
24004
- x + C * D,
24003
+ y + A * B,
24004
+ x + C * B,
24005
24005
  c,
24006
24006
  !0
24007
- ) + 2 : n.cap === br.SQUARE && (d += Hc(y, x, A, C, b, D, !0, c))), c.push(
24007
+ ) + 2 : n.cap === br.SQUARE && (d += Hc(y, x, A, C, b, B, !0, c))), c.push(
24008
24008
  y - A * b,
24009
24009
  x - C * b,
24010
- y + A * D,
24011
- x + C * D
24010
+ y + A * B,
24011
+ x + C * B
24012
24012
  );
24013
24013
  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)) {
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, 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;
24015
+ 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;
24016
+ if (Math.abs(et) < 1e-3 * Math.abs(z)) {
24017
24017
  c.push(
24018
24018
  g - A * b,
24019
24019
  v - C * b,
24020
- g + A * D,
24021
- v + C * D
24022
- ), j >= 0 && (n.join === le.ROUND ? d += Rr(
24020
+ g + A * B,
24021
+ v + C * B
24022
+ ), z >= 0 && (n.join === le.ROUND ? d += Rr(
24023
24023
  g,
24024
24024
  v,
24025
24025
  g - A * b,
@@ -24029,16 +24029,16 @@ function Hb(r, t) {
24029
24029
  c,
24030
24030
  !1
24031
24031
  ) + 4 : d += 2, c.push(
24032
- g - N * D,
24033
- v - S * D,
24032
+ g - N * B,
24033
+ v - S * B,
24034
24034
  g + N * b,
24035
24035
  v + S * b
24036
24036
  ));
24037
24037
  continue;
24038
24038
  }
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;
24039
+ 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
24040
  let Ss = n.join;
24041
- if (Ss === le.MITER && O / m > _ && (Ss = le.BEVEL), Yf)
24041
+ if (Ss === le.MITER && D / m > _ && (Ss = le.BEVEL), Yf)
24042
24042
  switch (Ss) {
24043
24043
  case le.MITER: {
24044
24044
  c.push(
@@ -24050,18 +24050,18 @@ function Hb(r, t) {
24050
24050
  break;
24051
24051
  }
24052
24052
  case le.BEVEL: {
24053
- Q ? c.push(
24053
+ J ? c.push(
24054
24054
  _t,
24055
24055
  ht,
24056
24056
  // inner miter point
24057
- g + A * D,
24058
- v + C * D,
24057
+ g + A * B,
24058
+ v + C * B,
24059
24059
  // first segment's outer vertex
24060
24060
  _t,
24061
24061
  ht,
24062
24062
  // inner miter point
24063
- g + N * D,
24064
- v + S * D
24063
+ g + N * B,
24064
+ v + S * B
24065
24065
  ) : c.push(
24066
24066
  g - A * b,
24067
24067
  v - C * b,
@@ -24078,25 +24078,25 @@ function Hb(r, t) {
24078
24078
  break;
24079
24079
  }
24080
24080
  case le.ROUND: {
24081
- Q ? (c.push(
24081
+ J ? (c.push(
24082
24082
  _t,
24083
24083
  ht,
24084
- g + A * D,
24085
- v + C * D
24084
+ g + A * B,
24085
+ v + C * B
24086
24086
  ), d += Rr(
24087
24087
  g,
24088
24088
  v,
24089
- g + A * D,
24090
- v + C * D,
24091
- g + N * D,
24092
- v + S * D,
24089
+ g + A * B,
24090
+ v + C * B,
24091
+ g + N * B,
24092
+ v + S * B,
24093
24093
  c,
24094
24094
  !0
24095
24095
  ) + 4, c.push(
24096
24096
  _t,
24097
24097
  ht,
24098
- g + N * D,
24099
- v + S * D
24098
+ g + N * B,
24099
+ v + S * B
24100
24100
  )) : (c.push(
24101
24101
  g - A * b,
24102
24102
  v - C * b,
@@ -24125,11 +24125,11 @@ function Hb(r, t) {
24125
24125
  g - A * b,
24126
24126
  v - C * b,
24127
24127
  // first segment's inner vertex
24128
- g + A * D,
24129
- v + C * D
24128
+ g + A * B,
24129
+ v + C * B
24130
24130
  ), Ss) {
24131
24131
  case le.MITER: {
24132
- Q ? c.push(
24132
+ J ? c.push(
24133
24133
  vt,
24134
24134
  xt,
24135
24135
  // inner miter point
@@ -24145,13 +24145,13 @@ function Hb(r, t) {
24145
24145
  break;
24146
24146
  }
24147
24147
  case le.ROUND: {
24148
- Q ? d += Rr(
24148
+ J ? d += Rr(
24149
24149
  g,
24150
24150
  v,
24151
- g + A * D,
24152
- v + C * D,
24153
- g + N * D,
24154
- v + S * D,
24151
+ g + A * B,
24152
+ v + C * B,
24153
+ g + N * B,
24154
+ v + S * B,
24155
24155
  c,
24156
24156
  !0
24157
24157
  ) + 2 : d += Rr(
@@ -24171,29 +24171,29 @@ function Hb(r, t) {
24171
24171
  g - N * b,
24172
24172
  v - S * b,
24173
24173
  // second segment's inner vertex
24174
- g + N * D,
24175
- v + S * D
24174
+ g + N * B,
24175
+ v + S * B
24176
24176
  ), d += 2;
24177
24177
  }
24178
24178
  }
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(
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, P = Math.sqrt(A * A + C * C), A /= P, C /= P, A *= p, C *= p, c.push(
24180
24180
  g - A * b,
24181
24181
  v - C * b,
24182
- g + A * D,
24183
- v + C * D
24182
+ g + A * B,
24183
+ v + C * B
24184
24184
  ), l || (n.cap === br.ROUND ? d += Rr(
24185
- g - A * (b - D) * 0.5,
24186
- v - C * (b - D) * 0.5,
24185
+ g - A * (b - B) * 0.5,
24186
+ v - C * (b - B) * 0.5,
24187
24187
  g - A * b,
24188
24188
  v - C * b,
24189
- g + A * D,
24190
- v + C * D,
24189
+ g + A * B,
24190
+ v + C * B,
24191
24191
  c,
24192
24192
  !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;
24193
+ ) + 2 : n.cap === br.SQUARE && (d += Hc(g, v, A, C, b, B, !1, c)));
24194
+ const O = t.indices, G = Oi.epsilon * Oi.epsilon;
24195
24195
  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);
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) && O.push($, $ + 1, $ + 2);
24197
24197
  }
24198
24198
  function Xb(r, t) {
24199
24199
  let e = 0;
@@ -25202,7 +25202,7 @@ const Qo = new gt(), zc = new Xr(), Cf = class Rf extends Ae {
25202
25202
  * @param drawMode - The drawMode, can be any of the {@link PIXI.DRAW_MODES} constants.
25203
25203
  */
25204
25204
  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;
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 = j.ROUND_PIXELS, this.batchUvs = null;
25206
25206
  }
25207
25207
  /**
25208
25208
  * Includes vertex positions, face indices, normals, colors, UVs, and
@@ -25326,7 +25326,7 @@ const Qo = new gt(), zc = new Xr(), Cf = class Rf extends Ae {
25326
25326
  u[d * 2] = n * f + a * p + h, u[d * 2 + 1] = o * f + l * p + c;
25327
25327
  }
25328
25328
  if (this._roundPixels) {
25329
- const d = W.RESOLUTION;
25329
+ const d = j.RESOLUTION;
25330
25330
  for (let f = 0; f < u.length; ++f)
25331
25331
  u[f] = Math.round(u[f] * d) / d;
25332
25332
  }
@@ -25376,7 +25376,7 @@ class Wb extends Tr {
25376
25376
  constructor(t, e, i) {
25377
25377
  super();
25378
25378
  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;
25379
+ this.addAttribute("aVertexPosition", s, 2, !1, Z.FLOAT).addAttribute("aTextureCoord", n, 2, !1, Z.FLOAT).addIndex(o), this._updateId = -1;
25380
25380
  }
25381
25381
  /**
25382
25382
  * If the vertex position is updated.
@@ -25493,7 +25493,7 @@ class Yc {
25493
25493
  attributeName: n.attributeName,
25494
25494
  size: n.size,
25495
25495
  uploadFunction: n.uploadFunction,
25496
- type: n.type || J.FLOAT,
25496
+ type: n.type || Z.FLOAT,
25497
25497
  offset: n.offset
25498
25498
  }, e[s] ? this.dynamicProperties.push(n) : this.staticProperties.push(n);
25499
25499
  }
@@ -25524,7 +25524,7 @@ class Yc {
25524
25524
  a.attributeName,
25525
25525
  this.dynamicBuffer,
25526
25526
  0,
25527
- a.type === J.UNSIGNED_BYTE,
25527
+ a.type === Z.UNSIGNED_BYTE,
25528
25528
  a.type,
25529
25529
  this.dynamicStride * 4,
25530
25530
  a.offset * 4
@@ -25536,7 +25536,7 @@ class Yc {
25536
25536
  a.attributeName,
25537
25537
  this.staticBuffer,
25538
25538
  0,
25539
- a.type === J.UNSIGNED_BYTE,
25539
+ a.type === Z.UNSIGNED_BYTE,
25540
25540
  a.type,
25541
25541
  this.staticStride * 4,
25542
25542
  a.offset * 4
@@ -25556,7 +25556,7 @@ class Yc {
25556
25556
  t,
25557
25557
  e,
25558
25558
  i,
25559
- n.type === J.UNSIGNED_BYTE ? this.dynamicDataUint32 : this.dynamicData,
25559
+ n.type === Z.UNSIGNED_BYTE ? this.dynamicDataUint32 : this.dynamicData,
25560
25560
  this.dynamicStride,
25561
25561
  n.offset
25562
25562
  );
@@ -25576,7 +25576,7 @@ class Yc {
25576
25576
  t,
25577
25577
  e,
25578
25578
  i,
25579
- n.type === J.UNSIGNED_BYTE ? this.staticDataUint32 : this.staticData,
25579
+ n.type === Z.UNSIGNED_BYTE ? this.staticDataUint32 : this.staticData,
25580
25580
  this.staticStride,
25581
25581
  n.offset
25582
25582
  );
@@ -25660,7 +25660,7 @@ class Pf extends Zn {
25660
25660
  {
25661
25661
  attributeName: "aColor",
25662
25662
  size: 1,
25663
- type: J.UNSIGNED_BYTE,
25663
+ type: Z.UNSIGNED_BYTE,
25664
25664
  uploadFunction: this.uploadTint,
25665
25665
  offset: 0
25666
25666
  }
@@ -25802,7 +25802,7 @@ var to = /* @__PURE__ */ ((r) => (r[r.LINEAR_VERTICAL = 0] = "LINEAR_VERTICAL",
25802
25802
  const Js = {
25803
25803
  // TextMetrics requires getImageData readback for measuring fonts.
25804
25804
  willReadFrequently: !0
25805
- }, Oe = class Z {
25805
+ }, Oe = class K {
25806
25806
  /**
25807
25807
  * Checking that we can use modern canvas 2D API.
25808
25808
  *
@@ -25812,10 +25812,10 @@ const Js = {
25812
25812
  * @see https://developer.chrome.com/origintrials/#/view_trial/3585991203293757441
25813
25813
  */
25814
25814
  static get experimentalLetterSpacingSupported() {
25815
- let t = Z._experimentalLetterSpacingSupported;
25815
+ let t = K._experimentalLetterSpacingSupported;
25816
25816
  if (t !== void 0) {
25817
- const e = W.ADAPTER.getCanvasRenderingContext2D().prototype;
25818
- t = Z._experimentalLetterSpacingSupported = "letterSpacing" in e || "textLetterSpacing" in e;
25817
+ const e = j.ADAPTER.getCanvasRenderingContext2D().prototype;
25818
+ t = K._experimentalLetterSpacingSupported = "letterSpacing" in e || "textLetterSpacing" in e;
25819
25819
  }
25820
25820
  return t;
25821
25821
  }
@@ -25841,23 +25841,23 @@ const Js = {
25841
25841
  * @param canvas - optional specification of the canvas to use for measuring.
25842
25842
  * @returns Measured width and height of the text.
25843
25843
  */
25844
- static measureText(t, e, i, s = Z._canvas) {
25844
+ static measureText(t, e, i, s = K._canvas) {
25845
25845
  i = i ?? e.wordWrap;
25846
- const n = e.toFontString(), o = Z.measureFont(n);
25846
+ const n = e.toFontString(), o = K.measureFont(n);
25847
25847
  o.fontSize === 0 && (o.fontSize = e.fontSize, o.ascent = e.fontSize);
25848
25848
  const a = s.getContext("2d", Js);
25849
25849
  a.font = n;
25850
- const l = (i ? Z.wordWrap(t, e, s) : t).split(/(?:\r\n|\r|\n)/), h = new Array(l.length);
25850
+ const l = (i ? K.wordWrap(t, e, s) : t).split(/(?:\r\n|\r|\n)/), h = new Array(l.length);
25851
25851
  let c = 0;
25852
25852
  for (let p = 0; p < l.length; p++) {
25853
- const m = Z._measureText(l[p], e.letterSpacing, a);
25853
+ const m = K._measureText(l[p], e.letterSpacing, a);
25854
25854
  h[p] = m, c = Math.max(c, m);
25855
25855
  }
25856
25856
  let u = c + e.strokeThickness;
25857
25857
  e.dropShadow && (u += e.dropShadowDistance);
25858
25858
  const d = e.lineHeight || o.fontSize + e.strokeThickness;
25859
25859
  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(
25860
+ return e.dropShadow && (f += e.dropShadowDistance), new K(
25861
25861
  t,
25862
25862
  e,
25863
25863
  u,
@@ -25871,9 +25871,9 @@ const Js = {
25871
25871
  }
25872
25872
  static _measureText(t, e, i) {
25873
25873
  let s = !1;
25874
- Z.experimentalLetterSpacingSupported && (Z.experimentalLetterSpacing ? (i.letterSpacing = `${e}px`, i.textLetterSpacing = `${e}px`, s = !0) : (i.letterSpacing = "0px", i.textLetterSpacing = "0px"));
25874
+ K.experimentalLetterSpacingSupported && (K.experimentalLetterSpacing ? (i.letterSpacing = `${e}px`, i.textLetterSpacing = `${e}px`, s = !0) : (i.letterSpacing = "0px", i.textLetterSpacing = "0px"));
25875
25875
  let n = i.measureText(t).width;
25876
- return n > 0 && (s ? n -= e : n += (Z.graphemeSegmenter(t).length - 1) * e), n;
25876
+ return n > 0 && (s ? n -= e : n += (K.graphemeSegmenter(t).length - 1) * e), n;
25877
25877
  }
25878
25878
  /**
25879
25879
  * Applies newlines to a string to have it optimally fit into the horizontal
@@ -25883,53 +25883,53 @@ const Js = {
25883
25883
  * @param canvas - optional specification of the canvas to use for measuring.
25884
25884
  * @returns New string with new lines applied where required
25885
25885
  */
25886
- static wordWrap(t, e, i = Z._canvas) {
25886
+ static wordWrap(t, e, i = K._canvas) {
25887
25887
  const s = i.getContext("2d", Js);
25888
25888
  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);
25889
+ const l = /* @__PURE__ */ Object.create(null), { letterSpacing: h, whiteSpace: c } = e, u = K.collapseSpaces(c), d = K.collapseNewlines(c);
25890
25890
  let f = !u;
25891
- const p = e.wordWrapWidth + h, m = Z.tokenize(t);
25891
+ const p = e.wordWrapWidth + h, m = K.tokenize(t);
25892
25892
  for (let _ = 0; _ < m.length; _++) {
25893
25893
  let y = m[_];
25894
- if (Z.isNewline(y)) {
25894
+ if (K.isNewline(y)) {
25895
25895
  if (!d) {
25896
- a += Z.addLine(o), f = !u, o = "", n = 0;
25896
+ a += K.addLine(o), f = !u, o = "", n = 0;
25897
25897
  continue;
25898
25898
  }
25899
25899
  y = " ";
25900
25900
  }
25901
25901
  if (u) {
25902
- const g = Z.isBreakingSpace(y), v = Z.isBreakingSpace(o[o.length - 1]);
25902
+ const g = K.isBreakingSpace(y), v = K.isBreakingSpace(o[o.length - 1]);
25903
25903
  if (g && v)
25904
25904
  continue;
25905
25905
  }
25906
- const x = Z.getFromCache(y, h, l, s);
25906
+ const x = K.getFromCache(y, h, l, s);
25907
25907
  if (x > p)
25908
- if (o !== "" && (a += Z.addLine(o), o = "", n = 0), Z.canBreakWords(y, e.breakWords)) {
25909
- const g = Z.wordWrapSplit(y);
25908
+ if (o !== "" && (a += K.addLine(o), o = "", n = 0), K.canBreakWords(y, e.breakWords)) {
25909
+ const g = K.wordWrapSplit(y);
25910
25910
  for (let v = 0; v < g.length; v++) {
25911
25911
  let w = g[v], I = w, A = 1;
25912
25912
  for (; g[v + A]; ) {
25913
25913
  const N = g[v + A];
25914
- if (!Z.canBreakChars(I, N, y, v, e.breakWords))
25914
+ if (!K.canBreakChars(I, N, y, v, e.breakWords))
25915
25915
  w += N;
25916
25916
  else
25917
25917
  break;
25918
25918
  I = N, A++;
25919
25919
  }
25920
25920
  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;
25921
+ const C = K.getFromCache(w, h, l, s);
25922
+ C + n > p && (a += K.addLine(o), f = !1, o = "", n = 0), o += w, n += C;
25923
25923
  }
25924
25924
  } else {
25925
- o.length > 0 && (a += Z.addLine(o), o = "", n = 0);
25925
+ o.length > 0 && (a += K.addLine(o), o = "", n = 0);
25926
25926
  const g = _ === m.length - 1;
25927
- a += Z.addLine(y, !g), f = !1, o = "", n = 0;
25927
+ a += K.addLine(y, !g), f = !1, o = "", n = 0;
25928
25928
  }
25929
25929
  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);
25930
+ x + n > p && (f = !1, a += K.addLine(o), o = "", n = 0), (o.length > 0 || !K.isBreakingSpace(y) || f) && (o += y, n += x);
25931
25931
  }
25932
- return a += Z.addLine(o, !1), a;
25932
+ return a += K.addLine(o, !1), a;
25933
25933
  }
25934
25934
  /**
25935
25935
  * Convienience function for logging each line added during the wordWrap method.
@@ -25938,7 +25938,7 @@ const Js = {
25938
25938
  * @returns A formatted line
25939
25939
  */
25940
25940
  static addLine(t, e = !0) {
25941
- return t = Z.trimRight(t), t = e ? `${t}
25941
+ return t = K.trimRight(t), t = e ? `${t}
25942
25942
  ` : t, t;
25943
25943
  }
25944
25944
  /**
@@ -25951,7 +25951,7 @@ const Js = {
25951
25951
  */
25952
25952
  static getFromCache(t, e, i, s) {
25953
25953
  let n = i[t];
25954
- return typeof n != "number" && (n = Z._measureText(t, e, s) + e, i[t] = n), n;
25954
+ return typeof n != "number" && (n = K._measureText(t, e, s) + e, i[t] = n), n;
25955
25955
  }
25956
25956
  /**
25957
25957
  * Determines whether we should collapse breaking spaces.
@@ -25979,7 +25979,7 @@ const Js = {
25979
25979
  return "";
25980
25980
  for (let e = t.length - 1; e >= 0; e--) {
25981
25981
  const i = t[e];
25982
- if (!Z.isBreakingSpace(i))
25982
+ if (!K.isBreakingSpace(i))
25983
25983
  break;
25984
25984
  t = t.slice(0, -1);
25985
25985
  }
@@ -25991,7 +25991,7 @@ const Js = {
25991
25991
  * @returns True if newline, False otherwise.
25992
25992
  */
25993
25993
  static isNewline(t) {
25994
- return typeof t != "string" ? !1 : Z._newlines.includes(t.charCodeAt(0));
25994
+ return typeof t != "string" ? !1 : K._newlines.includes(t.charCodeAt(0));
25995
25995
  }
25996
25996
  /**
25997
25997
  * Determines if char is a breaking whitespace.
@@ -26004,7 +26004,7 @@ const Js = {
26004
26004
  * @returns True if whitespace, False otherwise.
26005
26005
  */
26006
26006
  static isBreakingSpace(t, e) {
26007
- return typeof t != "string" ? !1 : Z._breakingSpaces.includes(t.charCodeAt(0));
26007
+ return typeof t != "string" ? !1 : K._breakingSpaces.includes(t.charCodeAt(0));
26008
26008
  }
26009
26009
  /**
26010
26010
  * Splits a string into words, breaking-spaces and newLine characters
@@ -26018,7 +26018,7 @@ const Js = {
26018
26018
  return e;
26019
26019
  for (let s = 0; s < t.length; s++) {
26020
26020
  const n = t[s], o = t[s + 1];
26021
- if (Z.isBreakingSpace(n, o) || Z.isNewline(n)) {
26021
+ if (K.isBreakingSpace(n, o) || K.isNewline(n)) {
26022
26022
  i !== "" && (e.push(i), i = ""), e.push(n);
26023
26023
  continue;
26024
26024
  }
@@ -26067,7 +26067,7 @@ const Js = {
26067
26067
  * @see TextMetrics.graphemeSegmenter
26068
26068
  */
26069
26069
  static wordWrapSplit(t) {
26070
- return Z.graphemeSegmenter(t);
26070
+ return K.graphemeSegmenter(t);
26071
26071
  }
26072
26072
  /**
26073
26073
  * Calculates the ascent, descent and fontSize of a given font-style
@@ -26075,19 +26075,19 @@ const Js = {
26075
26075
  * @returns Font properties object
26076
26076
  */
26077
26077
  static measureFont(t) {
26078
- if (Z._fonts[t])
26079
- return Z._fonts[t];
26078
+ if (K._fonts[t])
26079
+ return K._fonts[t];
26080
26080
  const e = {
26081
26081
  ascent: 0,
26082
26082
  descent: 0,
26083
26083
  fontSize: 0
26084
- }, i = Z._canvas, s = Z._context;
26084
+ }, i = K._canvas, s = K._context;
26085
26085
  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;
26086
+ const n = K.METRICS_STRING + K.BASELINE_SYMBOL, o = Math.ceil(s.measureText(n).width);
26087
+ let a = Math.ceil(s.measureText(K.BASELINE_SYMBOL).width);
26088
+ const l = Math.ceil(K.HEIGHT_MULTIPLIER * a);
26089
+ if (a = a * K.BASELINE_MULTIPLIER | 0, o === 0 || l === 0)
26090
+ return K._fonts[t] = e, e;
26091
26091
  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
26092
  const h = s.getImageData(0, 0, o, l).data, c = h.length, u = o * 4;
26093
26093
  let d = 0, f = 0, p = !1;
@@ -26113,14 +26113,14 @@ const Js = {
26113
26113
  else
26114
26114
  break;
26115
26115
  }
26116
- return e.descent = d - a, e.fontSize = e.ascent + e.descent, Z._fonts[t] = e, e;
26116
+ return e.descent = d - a, e.fontSize = e.ascent + e.descent, K._fonts[t] = e, e;
26117
26117
  }
26118
26118
  /**
26119
26119
  * Clear font metrics in metrics cache.
26120
26120
  * @param {string} [font] - font name. If font name not set then clear cache for all fonts.
26121
26121
  */
26122
26122
  static clearMetrics(t = "") {
26123
- t ? delete Z._fonts[t] : Z._fonts = {};
26123
+ t ? delete K._fonts[t] : K._fonts = {};
26124
26124
  }
26125
26125
  /**
26126
26126
  * Cached canvas element for measuring text
@@ -26129,26 +26129,26 @@ const Js = {
26129
26129
  */
26130
26130
  static get _canvas() {
26131
26131
  var t;
26132
- if (!Z.__canvas) {
26132
+ if (!K.__canvas) {
26133
26133
  let e;
26134
26134
  try {
26135
26135
  const i = new OffscreenCanvas(0, 0);
26136
26136
  if ((t = i.getContext("2d", Js)) != null && t.measureText)
26137
- return Z.__canvas = i, i;
26138
- e = W.ADAPTER.createCanvas();
26137
+ return K.__canvas = i, i;
26138
+ e = j.ADAPTER.createCanvas();
26139
26139
  } catch {
26140
- e = W.ADAPTER.createCanvas();
26140
+ e = j.ADAPTER.createCanvas();
26141
26141
  }
26142
- e.width = e.height = 10, Z.__canvas = e;
26142
+ e.width = e.height = 10, K.__canvas = e;
26143
26143
  }
26144
- return Z.__canvas;
26144
+ return K.__canvas;
26145
26145
  }
26146
26146
  /**
26147
26147
  * TODO: this should be private, but isn't because of backward compat, will fix later.
26148
26148
  * @ignore
26149
26149
  */
26150
26150
  static get _context() {
26151
- return Z.__context || (Z.__context = Z._canvas.getContext("2d", Js)), Z.__context;
26151
+ return K.__context || (K.__context = K._canvas.getContext("2d", Js)), K.__context;
26152
26152
  }
26153
26153
  };
26154
26154
  Oe.METRICS_STRING = "|ÉqÅ", /** Baseline symbol for calculate font metrics. */
@@ -26676,12 +26676,12 @@ const Qb = {
26676
26676
  */
26677
26677
  constructor(t, e, i) {
26678
26678
  let s = !1;
26679
- i || (i = W.ADAPTER.createCanvas(), s = !0), i.width = 3, i.height = 3;
26679
+ i || (i = j.ADAPTER.createCanvas(), s = !0), i.width = 3, i.height = 3;
26680
26680
  const n = Y.from(i);
26681
26681
  n.orig = new at(), n.trim = new at(), super(n), this._ownCanvas = s, this.canvas = i, this.context = i.getContext("2d", {
26682
26682
  // required for trimming to work without warnings
26683
26683
  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;
26684
+ }), 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
26685
  }
26686
26686
  /**
26687
26687
  * @see PIXI.TextMetrics.experimentalLetterSpacing
@@ -27082,7 +27082,7 @@ const Of = class Ff {
27082
27082
  };
27083
27083
  Of.uploadsPerFrame = 4;
27084
27084
  let nl = Of;
27085
- Object.defineProperties(W, {
27085
+ Object.defineProperties(j, {
27086
27086
  /**
27087
27087
  * Default number of uploads per frame using prepare plugin.
27088
27088
  * @static
@@ -27450,7 +27450,7 @@ const mw = {
27450
27450
  var e;
27451
27451
  const t = r.split(".");
27452
27452
  return {
27453
- resolution: parseFloat(((e = W.RETINA_PREFIX.exec(r)) == null ? void 0 : e[1]) ?? "1"),
27453
+ resolution: parseFloat(((e = j.RETINA_PREFIX.exec(r)) == null ? void 0 : e[1]) ?? "1"),
27454
27454
  format: t[t.length - 2],
27455
27455
  src: r
27456
27456
  };
@@ -27658,7 +27658,7 @@ class al {
27658
27658
  * @returns - True if resource could be treated as font data, false otherwise.
27659
27659
  */
27660
27660
  static test(t) {
27661
- return typeof t == "string" && t.includes("<font>") ? ol.test(W.ADAPTER.parseXML(t)) : !1;
27661
+ return typeof t == "string" && t.includes("<font>") ? ol.test(j.ADAPTER.parseXML(t)) : !1;
27662
27662
  }
27663
27663
  /**
27664
27664
  * Convert the text XML into BitmapFontData that we can use.
@@ -27666,7 +27666,7 @@ class al {
27666
27666
  * @returns - Data to use for BitmapFont
27667
27667
  */
27668
27668
  static parse(t) {
27669
- return ol.parse(W.ADAPTER.parseXML(t));
27669
+ return ol.parse(j.ADAPTER.parseXML(t));
27670
27670
  }
27671
27671
  }
27672
27672
  const ra = [
@@ -27899,18 +27899,18 @@ const dr = class Fe {
27899
27899
  let p = 0, m = 0, _, y, x, g = 0;
27900
27900
  const v = [];
27901
27901
  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({
27902
+ _ || (_ = 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
27903
  id: v.length - 1,
27904
27904
  file: ""
27905
27905
  }));
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);
27906
+ 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
27907
  if (m >= l - S * o) {
27908
27908
  if (m === 0)
27909
27909
  throw new Error(`[BitmapFont] textureHeight ${l}px is too small (fontFamily: '${u.fontFamily}', fontSize: ${u.fontSize}px, char: '${A}')`);
27910
27910
  --I, _ = null, y = null, x = null, m = 0, p = 0, g = 0;
27911
27911
  continue;
27912
27912
  }
27913
- if (g = Math.max(S + C.fontProperties.descent, g), R * o + p >= d) {
27913
+ if (g = Math.max(S + C.fontProperties.descent, g), P * o + p >= d) {
27914
27914
  if (p === 0)
27915
27915
  throw new Error(`[BitmapFont] textureWidth ${a}px is too small (fontFamily: '${u.fontFamily}', fontSize: ${u.fontSize}px, char: '${A}')`);
27916
27916
  --I, m += g * o, m = Math.ceil(m), p = 0, g = 0;
@@ -27923,18 +27923,18 @@ const dr = class Fe {
27923
27923
  page: v.length - 1,
27924
27924
  x: p / o,
27925
27925
  y: m / o,
27926
- width: R,
27926
+ width: P,
27927
27927
  height: S,
27928
27928
  xoffset: 0,
27929
27929
  yoffset: 0,
27930
27930
  xadvance: N - (u.dropShadow ? u.dropShadowDistance : 0) - (u.stroke ? u.strokeThickness : 0)
27931
- }), p += (R + 2 * n) * o, p = Math.ceil(p);
27931
+ }), p += (P + 2 * n) * o, p = Math.ceil(p);
27932
27932
  }
27933
27933
  if (!(i != null && i.skipKerning))
27934
27934
  for (let I = 0, A = c.length; I < A; I++) {
27935
27935
  const C = c[I];
27936
27936
  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);
27937
+ const S = c[N], P = y.measureText(C).width, E = y.measureText(S).width, b = y.measureText(C + S).width - (P + E);
27938
27938
  b && f.kerning.push({
27939
27939
  first: pn(C),
27940
27940
  second: pn(S),
@@ -28057,25 +28057,25 @@ const Zc = [], Jc = [], Qc = [], ww = class Hf extends Ae {
28057
28057
  throw new Error(`Missing BitmapFont "${a}"`);
28058
28058
  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
28059
  this.dirty = !0;
28060
- }, this, 0, 0), this._roundPixels = W.ROUND_PIXELS, this.dirty = !0, this._resolution = W.RESOLUTION, this._autoResolution = !0, this._textureCache = {};
28060
+ }, this, 0, 0), this._roundPixels = j.ROUND_PIXELS, this.dirty = !0, this._resolution = j.RESOLUTION, this._autoResolution = !0, this._textureCache = {};
28061
28061
  }
28062
28062
  /** Renders text and updates it when needed. This should only be called if the BitmapFont is regenerated. */
28063
28063
  updateText() {
28064
- var R;
28064
+ var P;
28065
28065
  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
28066
  `) || " ", h = $f(l), c = this._maxWidth * t.size / e, u = t.distanceFieldType === "none" ? Zc : Jc;
28067
28067
  let d = null, f = 0, p = 0, m = 0, _ = -1, y = 0, x = 0, g = 0, v = 0;
28068
28068
  for (let E = 0; E < h.length; E++) {
28069
- const b = h[E], D = pn(b);
28069
+ const b = h[E], B = pn(b);
28070
28070
  if (/(?:\s)/.test(b) && (_ = E, y = f, v++), b === "\r" || b === `
28071
28071
  `) {
28072
28072
  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
28073
  continue;
28074
28074
  }
28075
- const F = t.chars[D];
28076
- if (!F)
28075
+ const O = t.chars[B];
28076
+ if (!O)
28077
28077
  continue;
28078
- d && F.kerning[d] && (s.x += F.kerning[d]);
28078
+ d && O.kerning[d] && (s.x += O.kerning[d]);
28079
28079
  const G = Qc.pop() || {
28080
28080
  texture: Y.EMPTY,
28081
28081
  line: 0,
@@ -28083,7 +28083,7 @@ const Zc = [], Jc = [], Qc = [], ww = class Hf extends Ae {
28083
28083
  prevSpaces: 0,
28084
28084
  position: new gt()
28085
28085
  };
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);
28086
+ 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
28087
  }
28088
28088
  const w = h[h.length - 1];
28089
28089
  w !== "\r" && w !== `
@@ -28096,34 +28096,34 @@ const Zc = [], Jc = [], Qc = [], ww = class Hf extends Ae {
28096
28096
  const A = n.length, C = {}, N = [], S = this._activePagesMeshData;
28097
28097
  u.push(...S);
28098
28098
  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) {
28099
+ const b = n[E].texture, B = b.baseTexture.uid;
28100
+ if (!C[B]) {
28101
+ let O = u.pop();
28102
+ if (!O) {
28103
28103
  const $ = new Wb();
28104
- let M, K;
28105
- t.distanceFieldType === "none" ? (M = new jc(Y.EMPTY), K = tt.NORMAL) : (M = new jc(
28104
+ let F, Q;
28105
+ t.distanceFieldType === "none" ? (F = new jc(Y.EMPTY), Q = tt.NORMAL) : (F = new jc(
28106
28106
  Y.EMPTY,
28107
28107
  { program: er.from(bw, xw), uniforms: { uFWidth: 0 } }
28108
- ), K = tt.NORMAL_NPM);
28109
- const P = new Wc($, M);
28110
- P.blendMode = K, F = {
28108
+ ), Q = tt.NORMAL_NPM);
28109
+ const R = new Wc($, F);
28110
+ R.blendMode = Q, O = {
28111
28111
  index: 0,
28112
28112
  indexCount: 0,
28113
28113
  vertexCount: 0,
28114
28114
  uvsCount: 0,
28115
28115
  total: 0,
28116
- mesh: P,
28116
+ mesh: R,
28117
28117
  vertices: null,
28118
28118
  uvs: null,
28119
28119
  indices: null
28120
28120
  };
28121
28121
  }
28122
- F.index = 0, F.indexCount = 0, F.vertexCount = 0, F.uvsCount = 0, F.total = 0;
28122
+ O.index = 0, O.indexCount = 0, O.vertexCount = 0, O.uvsCount = 0, O.total = 0;
28123
28123
  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;
28124
+ 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
28125
  }
28126
- C[D].total++;
28126
+ C[B].total++;
28127
28127
  }
28128
28128
  for (let E = 0; E < S.length; E++)
28129
28129
  N.includes(S[E]) || this.removeChild(S[E].mesh);
@@ -28131,35 +28131,35 @@ const Zc = [], Jc = [], Qc = [], ww = class Hf extends Ae {
28131
28131
  N[E].mesh.parent !== this && this.addChild(N[E].mesh);
28132
28132
  this._activePagesMeshData = N;
28133
28133
  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);
28134
+ const b = C[E], B = b.total;
28135
+ if (!(((P = b.indices) == null ? void 0 : P.length) > 6 * B) || b.vertices.length < Wc.BATCHABLE_SIZE * 2)
28136
+ b.vertices = new Float32Array(4 * 2 * B), b.uvs = new Float32Array(4 * 2 * B), b.indices = new Uint16Array(6 * B);
28137
28137
  else {
28138
- const F = b.total, G = b.vertices;
28139
- for (let $ = F * 4 * 2; $ < G.length; $++)
28138
+ const O = b.total, G = b.vertices;
28139
+ for (let $ = O * 4 * 2; $ < G.length; $++)
28140
28140
  G[$] = 0;
28141
28141
  }
28142
- b.mesh.size = 6 * D;
28142
+ b.mesh.size = 6 * B;
28143
28143
  }
28144
28144
  for (let E = 0; E < A; E++) {
28145
28145
  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;
28146
+ let B = b.position.x + I[b.line] * (this._align === "justify" ? b.prevSpaces : 1);
28147
+ this._roundPixels && (B = Math.round(B));
28148
+ const O = B * i, G = b.position.y * i, $ = b.texture, F = C[$.baseTexture.uid], Q = $.frame, R = $._uvs, U = F.index++;
28149
+ 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
28150
  }
28151
28151
  this._textWidth = p * i, this._textHeight = (s.y + t.lineHeight) * i;
28152
28152
  for (const E in C) {
28153
28153
  const b = C[E];
28154
28154
  if (this.anchor.x !== 0 || this.anchor.y !== 0) {
28155
28155
  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;
28156
+ const F = this._textWidth * this.anchor.x, Q = this._textHeight * this.anchor.y;
28157
+ for (let R = 0; R < b.total; R++)
28158
+ 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
28159
  }
28160
28160
  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();
28161
+ const B = b.mesh.geometry.getBuffer("aVertexPosition"), O = b.mesh.geometry.getBuffer("aTextureCoord"), G = b.mesh.geometry.getIndex();
28162
+ B.data = b.vertices, O.data = b.uvs, G.data = b.indices, B.update(), O.update(), G.update();
28163
28163
  }
28164
28164
  for (let E = 0; E < n.length; E++)
28165
28165
  Qc.push(n[E]);
@@ -28367,7 +28367,7 @@ const Ew = [".xml", ".fnt"], Tw = {
28367
28367
  return fr.install(i, l, !0);
28368
28368
  },
28369
28369
  async load(r, t) {
28370
- return (await W.ADAPTER.fetch(r)).text();
28370
+ return (await j.ADAPTER.fetch(r)).text();
28371
28371
  },
28372
28372
  unload(r) {
28373
28373
  r.destroy();
@@ -28409,7 +28409,7 @@ const ll = class pi extends Ar {
28409
28409
  const s = i[t];
28410
28410
  return this._fonts.push(s), s.refs++, this.styleID++, this.fontsDirty = !0, Promise.resolve();
28411
28411
  }
28412
- return W.ADAPTER.fetch(t).then((s) => s.blob()).then(async (s) => new Promise((n, o) => {
28412
+ return j.ADAPTER.fetch(t).then((s) => s.blob()).then(async (s) => new Promise((n, o) => {
28413
28413
  const a = URL.createObjectURL(s), l = new FileReader();
28414
28414
  l.onload = () => n([a, l.result]), l.onerror = o, l.readAsDataURL(s);
28415
28415
  })).then(async ([s, n]) => {
@@ -28543,7 +28543,7 @@ const ll = class pi extends Ar {
28543
28543
  * @ignore
28544
28544
  */
28545
28545
  get isSafari() {
28546
- const { userAgent: t } = W.ADAPTER.getNavigator();
28546
+ const { userAgent: t } = j.ADAPTER.getNavigator();
28547
28547
  return /^((?!chrome|android).)*safari/i.test(t);
28548
28548
  }
28549
28549
  set fillGradientStops(t) {
@@ -28654,14 +28654,14 @@ const tn = class mi extends ki {
28654
28654
  constructor(t = "", e = {}) {
28655
28655
  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
28656
  const i = new Image(), s = Y.from(i, {
28657
- scaleMode: W.SCALE_MODE,
28657
+ scaleMode: j.SCALE_MODE,
28658
28658
  resourceOptions: {
28659
28659
  autoLoad: !1
28660
28660
  }
28661
28661
  });
28662
28662
  s.orig = new at(), s.trim = new at(), this.texture = s;
28663
28663
  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;
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 ?? j.RESOLUTION, this.text = t, this.style = e;
28665
28665
  }
28666
28666
  /**
28667
28667
  * Calculate the size of the output text without actually drawing it.
@@ -28938,8 +28938,8 @@ const hl = (r) => {
28938
28938
  const N = {
28939
28939
  selected: n.has(v.id),
28940
28940
  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 });
28941
+ }, { fillStyle: S, strokeStyle: P } = hl(g(v, N));
28942
+ 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
28943
  });
28944
28944
  else {
28945
28945
  const { fillStyle: v, strokeStyle: w } = hl(g);
@@ -28982,48 +28982,48 @@ function Dw(r, t, e) {
28982
28982
  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
28983
  }, v = (I) => {
28984
28984
  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 });
28985
+ const A = I.originalEvent, { x: C, y: N } = I.position, S = C - _.x, P = N - _.y;
28986
+ if (Math.sqrt(S * S + P * P) < 5) {
28987
+ const { x: b, y: B } = y(I.position), O = c.getAt(b, B);
28988
+ O ? p("click", { originalEvent: A, annotation: O }) : p("click", { originalEvent: A });
28989
28989
  }
28990
28990
  _ = void 0;
28991
28991
  };
28992
28992
  let w;
28993
28993
  return Xn(() => {
28994
- var F;
28994
+ var O;
28995
28995
  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));
28996
+ 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
28997
  const N = g(C);
28998
28998
  C.addEventListener("pointermove", N);
28999
28999
  const S = new ResizeObserver((G) => {
29000
29000
  try {
29001
- const { width: $, height: M } = G[0].contentRect;
29002
- C.width = $, C.height = M, m.resize($, M);
29001
+ const { width: $, height: F } = G[0].contentRect;
29002
+ C.width = $, C.height = F, m.resize($, F);
29003
29003
  } catch {
29004
29004
  console.warn("WebGL canvas already disposed");
29005
29005
  }
29006
29006
  });
29007
29007
  S.observe(C);
29008
- const R = () => {
29008
+ const P = () => {
29009
29009
  const G = l.viewport.getBounds();
29010
29010
  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));
29011
+ const { x: $, y: F, width: Q, height: R } = w, U = c.getIntersecting($, F, Q, R);
29012
+ f.set(U.map((z) => z.id));
29013
29013
  };
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));
29014
+ l.addHandler("canvas-press", x), l.addHandler("canvas-release", v), l.addHandler("update-viewport", m.redraw), l.addHandler("animation-finish", P);
29015
+ const E = (G) => G.filter(($) => ir($)), b = (G) => ir(G.oldValue) && ir(G.newValue), B = (G) => {
29016
+ const { created: $, updated: F, deleted: Q } = G.changes;
29017
+ 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) {
29018
+ const { x: R, y: U, width: z, height: et } = w, J = c.getIntersecting(R, U, z, et);
29019
+ f.set(J.map((H) => H.id));
29020
29020
  } else
29021
- f.set(c.all().map((P) => P.id));
29021
+ f.set(c.all().map((R) => R.id));
29022
29022
  m.redraw();
29023
29023
  };
29024
- return c.observe(D), () => {
29024
+ return c.observe(B), () => {
29025
29025
  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);
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", P), c.unobserve(B), m.destroy(), (G = C.parentNode) == null || G.removeChild(C);
29027
29027
  };
29028
29028
  }), r.$$set = (I) => {
29029
29029
  "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 +29180,14 @@ function Vw(r) {
29180
29180
  t = Et("polygon"), s = ve(), n = Et("polygon"), a = ve();
29181
29181
  for (let m = 0; m < f.length; m += 1)
29182
29182
  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(
29183
+ l = cr(), M(t, "class", "a9s-outer"), M(t, "style", e = /*computedStyle*/
29184
+ r[1] ? "display:none;" : void 0), M(t, "points", i = /*geom*/
29185
+ r[4].points.map(su).join(" ")), M(n, "class", "a9s-inner a9s-shape-handle"), M(
29186
29186
  n,
29187
29187
  "style",
29188
29188
  /*computedStyle*/
29189
29189
  r[1]
29190
- ), B(n, "points", o = /*geom*/
29190
+ ), M(n, "points", o = /*geom*/
29191
29191
  r[4].points.map(nu).join(" "));
29192
29192
  },
29193
29193
  m(m, _) {
@@ -29212,17 +29212,17 @@ function Vw(r) {
29212
29212
  p(m, _) {
29213
29213
  if (r = m, (!h || _ & /*computedStyle*/
29214
29214
  2 && e !== (e = /*computedStyle*/
29215
- r[1] ? "display:none;" : void 0)) && B(t, "style", e), (!h || _ & /*geom*/
29215
+ r[1] ? "display:none;" : void 0)) && M(t, "style", e), (!h || _ & /*geom*/
29216
29216
  16 && i !== (i = /*geom*/
29217
- r[4].points.map(su).join(" "))) && B(t, "points", i), (!h || _ & /*computedStyle*/
29218
- 2) && B(
29217
+ r[4].points.map(su).join(" "))) && M(t, "points", i), (!h || _ & /*computedStyle*/
29218
+ 2) && M(
29219
29219
  n,
29220
29220
  "style",
29221
29221
  /*computedStyle*/
29222
29222
  r[1]
29223
29223
  ), (!h || _ & /*geom*/
29224
29224
  16 && o !== (o = /*geom*/
29225
- r[4].points.map(nu).join(" "))) && B(n, "points", o), _ & /*geom, viewportScale, grab*/
29225
+ r[4].points.map(nu).join(" "))) && M(n, "points", o), _ & /*geom, viewportScale, grab*/
29226
29226
  536) {
29227
29227
  d = Pi(
29228
29228
  /*geom*/
@@ -29372,17 +29372,17 @@ function qw(r) {
29372
29372
  let t, e, i, s, n, o;
29373
29373
  return {
29374
29374
  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*/
29375
+ t = Et("rect"), M(t, "class", e = _n(`a9s-handle ${/*$$props*/
29376
+ r[8].class || ""}`.trim()) + " svelte-1sgkh33"), M(t, "x", i = /*x*/
29377
29377
  r[0] - /*handleSize*/
29378
- r[5] / 2), B(t, "y", s = /*y*/
29378
+ r[5] / 2), M(t, "y", s = /*y*/
29379
29379
  r[1] - /*handleSize*/
29380
- r[5] / 2), B(
29380
+ r[5] / 2), M(
29381
29381
  t,
29382
29382
  "width",
29383
29383
  /*handleSize*/
29384
29384
  r[5]
29385
- ), B(
29385
+ ), M(
29386
29386
  t,
29387
29387
  "height",
29388
29388
  /*handleSize*/
@@ -29400,20 +29400,20 @@ function qw(r) {
29400
29400
  p(a, l) {
29401
29401
  l & /*$$props*/
29402
29402
  256 && e !== (e = _n(`a9s-handle ${/*$$props*/
29403
- a[8].class || ""}`.trim()) + " svelte-1sgkh33") && B(t, "class", e), l & /*x, handleSize*/
29403
+ a[8].class || ""}`.trim()) + " svelte-1sgkh33") && M(t, "class", e), l & /*x, handleSize*/
29404
29404
  33 && i !== (i = /*x*/
29405
29405
  a[0] - /*handleSize*/
29406
- a[5] / 2) && B(t, "x", i), l & /*y, handleSize*/
29406
+ a[5] / 2) && M(t, "x", i), l & /*y, handleSize*/
29407
29407
  34 && s !== (s = /*y*/
29408
29408
  a[1] - /*handleSize*/
29409
- a[5] / 2) && B(t, "y", s), l & /*handleSize*/
29410
- 32 && B(
29409
+ a[5] / 2) && M(t, "y", s), l & /*handleSize*/
29410
+ 32 && M(
29411
29411
  t,
29412
29412
  "width",
29413
29413
  /*handleSize*/
29414
29414
  a[5]
29415
29415
  ), l & /*handleSize*/
29416
- 32 && B(
29416
+ 32 && M(
29417
29417
  t,
29418
29418
  "height",
29419
29419
  /*handleSize*/
@@ -29429,39 +29429,39 @@ function Kw(r) {
29429
29429
  let t, e, i, s, n, o, a, l, h;
29430
29430
  return {
29431
29431
  c() {
29432
- t = Et("g"), e = Et("circle"), s = Et("rect"), B(
29432
+ t = Et("g"), e = Et("circle"), s = Et("rect"), M(
29433
29433
  e,
29434
29434
  "cx",
29435
29435
  /*x*/
29436
29436
  r[0]
29437
- ), B(
29437
+ ), M(
29438
29438
  e,
29439
29439
  "cy",
29440
29440
  /*y*/
29441
29441
  r[1]
29442
- ), B(e, "r", i = /*radius*/
29442
+ ), M(e, "r", i = /*radius*/
29443
29443
  r[3] / /*scale*/
29444
- r[2]), B(e, "class", "a9s-touch-halo svelte-1sgkh33"), vn(
29444
+ r[2]), M(e, "class", "a9s-touch-halo svelte-1sgkh33"), vn(
29445
29445
  e,
29446
29446
  "touched",
29447
29447
  /*touched*/
29448
29448
  r[4]
29449
- ), B(s, "class", n = _n(`a9s-handle ${/*$$props*/
29450
- r[8].class || ""}`.trim()) + " svelte-1sgkh33"), B(s, "x", o = /*x*/
29449
+ ), M(s, "class", n = _n(`a9s-handle ${/*$$props*/
29450
+ r[8].class || ""}`.trim()) + " svelte-1sgkh33"), M(s, "x", o = /*x*/
29451
29451
  r[0] - /*handleSize*/
29452
- r[5] / 2), B(s, "y", a = /*y*/
29452
+ r[5] / 2), M(s, "y", a = /*y*/
29453
29453
  r[1] - /*handleSize*/
29454
- r[5] / 2), B(
29454
+ r[5] / 2), M(
29455
29455
  s,
29456
29456
  "width",
29457
29457
  /*handleSize*/
29458
29458
  r[5]
29459
- ), B(
29459
+ ), M(
29460
29460
  s,
29461
29461
  "height",
29462
29462
  /*handleSize*/
29463
29463
  r[5]
29464
- ), B(t, "class", "a9s-touch-handle");
29464
+ ), M(t, "class", "a9s-touch-handle");
29465
29465
  },
29466
29466
  m(c, u) {
29467
29467
  pt(c, t, u), sr(t, e), sr(t, s), l || (h = [
@@ -29505,13 +29505,13 @@ function Kw(r) {
29505
29505
  },
29506
29506
  p(c, u) {
29507
29507
  u & /*x*/
29508
- 1 && B(
29508
+ 1 && M(
29509
29509
  e,
29510
29510
  "cx",
29511
29511
  /*x*/
29512
29512
  c[0]
29513
29513
  ), u & /*y*/
29514
- 2 && B(
29514
+ 2 && M(
29515
29515
  e,
29516
29516
  "cy",
29517
29517
  /*y*/
@@ -29519,7 +29519,7 @@ function Kw(r) {
29519
29519
  ), u & /*radius, scale*/
29520
29520
  12 && i !== (i = /*radius*/
29521
29521
  c[3] / /*scale*/
29522
- c[2]) && B(e, "r", i), u & /*touched*/
29522
+ c[2]) && M(e, "r", i), u & /*touched*/
29523
29523
  16 && vn(
29524
29524
  e,
29525
29525
  "touched",
@@ -29527,20 +29527,20 @@ function Kw(r) {
29527
29527
  c[4]
29528
29528
  ), u & /*$$props*/
29529
29529
  256 && n !== (n = _n(`a9s-handle ${/*$$props*/
29530
- c[8].class || ""}`.trim()) + " svelte-1sgkh33") && B(s, "class", n), u & /*x, handleSize*/
29530
+ c[8].class || ""}`.trim()) + " svelte-1sgkh33") && M(s, "class", n), u & /*x, handleSize*/
29531
29531
  33 && o !== (o = /*x*/
29532
29532
  c[0] - /*handleSize*/
29533
- c[5] / 2) && B(s, "x", o), u & /*y, handleSize*/
29533
+ c[5] / 2) && M(s, "x", o), u & /*y, handleSize*/
29534
29534
  34 && a !== (a = /*y*/
29535
29535
  c[1] - /*handleSize*/
29536
- c[5] / 2) && B(s, "y", a), u & /*handleSize*/
29537
- 32 && B(
29536
+ c[5] / 2) && M(s, "y", a), u & /*handleSize*/
29537
+ 32 && M(
29538
29538
  s,
29539
29539
  "width",
29540
29540
  /*handleSize*/
29541
29541
  c[5]
29542
29542
  ), u & /*handleSize*/
29543
- 32 && B(
29543
+ 32 && M(
29544
29544
  s,
29545
29545
  "height",
29546
29546
  /*handleSize*/
@@ -29615,8 +29615,8 @@ class ss extends ae {
29615
29615
  }
29616
29616
  }
29617
29617
  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({
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, P, E, b, B, O, G, $, F, Q, R, U, z, et, J, H, X, lt;
29619
+ return F = new ss({
29620
29620
  props: {
29621
29621
  class: "a9s-corner-handle-topleft",
29622
29622
  x: (
@@ -29632,12 +29632,12 @@ function Qw(r) {
29632
29632
  r[3]
29633
29633
  )
29634
29634
  }
29635
- }), M.$on("pointerdown", function() {
29635
+ }), F.$on("pointerdown", function() {
29636
29636
  jt(
29637
29637
  /*grab*/
29638
29638
  r[9]("TOP_LEFT")
29639
29639
  ) && r[9]("TOP_LEFT").apply(this, arguments);
29640
- }), P = new ss({
29640
+ }), R = new ss({
29641
29641
  props: {
29642
29642
  class: "a9s-corner-handle-topright",
29643
29643
  x: (
@@ -29654,12 +29654,12 @@ function Qw(r) {
29654
29654
  r[3]
29655
29655
  )
29656
29656
  }
29657
- }), P.$on("pointerdown", function() {
29657
+ }), R.$on("pointerdown", function() {
29658
29658
  jt(
29659
29659
  /*grab*/
29660
29660
  r[9]("TOP_RIGHT")
29661
29661
  ) && r[9]("TOP_RIGHT").apply(this, arguments);
29662
- }), j = new ss({
29662
+ }), z = new ss({
29663
29663
  props: {
29664
29664
  class: "a9s-corner-handle-bottomright",
29665
29665
  x: (
@@ -29677,12 +29677,12 @@ function Qw(r) {
29677
29677
  r[3]
29678
29678
  )
29679
29679
  }
29680
- }), j.$on("pointerdown", function() {
29680
+ }), z.$on("pointerdown", function() {
29681
29681
  jt(
29682
29682
  /*grab*/
29683
29683
  r[9]("BOTTOM_RIGHT")
29684
29684
  ) && r[9]("BOTTOM_RIGHT").apply(this, arguments);
29685
- }), Q = new ss({
29685
+ }), J = new ss({
29686
29686
  props: {
29687
29687
  class: "a9s-corner-handle-bottomleft",
29688
29688
  x: (
@@ -29699,45 +29699,45 @@ function Qw(r) {
29699
29699
  r[3]
29700
29700
  )
29701
29701
  }
29702
- }), Q.$on("pointerdown", function() {
29702
+ }), J.$on("pointerdown", function() {
29703
29703
  jt(
29704
29704
  /*grab*/
29705
29705
  r[9]("BOTTOM_LEFT")
29706
29706
  ) && r[9]("BOTTOM_LEFT").apply(this, arguments);
29707
29707
  }), {
29708
29708
  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(
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(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*/
29710
+ r[1] ? "display:none;" : void 0), M(t, "x", i = /*geom*/
29711
+ r[4].x), M(t, "y", s = /*geom*/
29712
+ r[4].y), M(t, "width", n = /*geom*/
29713
+ r[4].w), M(t, "height", o = /*geom*/
29714
+ r[4].h), M(l, "class", "a9s-inner a9s-shape-handle"), M(
29715
29715
  l,
29716
29716
  "style",
29717
29717
  /*computedStyle*/
29718
29718
  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*/
29719
+ ), M(l, "x", h = /*geom*/
29720
+ r[4].x), M(l, "y", c = /*geom*/
29721
+ r[4].y), M(l, "width", u = /*geom*/
29722
+ r[4].w), M(l, "height", d = /*geom*/
29723
+ r[4].h), M(p, "class", "a9s-edge-handle a9s-edge-handle-top"), M(p, "x", m = /*geom*/
29724
+ r[4].x), M(p, "y", _ = /*geom*/
29725
+ r[4].y), M(p, "height", 1), M(p, "width", y = /*geom*/
29726
+ r[4].w), M(g, "class", "a9s-edge-handle a9s-edge-handle-right"), M(g, "x", v = /*geom*/
29727
29727
  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*/
29728
+ r[4].w), M(g, "y", w = /*geom*/
29729
+ r[4].y), M(g, "height", I = /*geom*/
29730
+ r[4].h), M(g, "width", 1), M(C, "class", "a9s-edge-handle a9s-edge-handle-bottom"), M(C, "x", N = /*geom*/
29731
+ r[4].x), M(C, "y", S = /*geom*/
29732
29732
  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 = [
29733
+ r[4].h), M(C, "height", 1), M(C, "width", P = /*geom*/
29734
+ r[4].w), M(b, "class", "a9s-edge-handle a9s-edge-handle-left"), M(b, "x", B = /*geom*/
29735
+ r[4].x), M(b, "y", O = /*geom*/
29736
+ r[4].y), M(b, "height", G = /*geom*/
29737
+ r[4].h), M(b, "width", 1);
29738
+ },
29739
+ m(L, D) {
29740
+ 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
29741
  zt(t, "pointerdown", function() {
29742
29742
  jt(
29743
29743
  /*grab*/
@@ -29776,103 +29776,103 @@ function Qw(r) {
29776
29776
  })
29777
29777
  ], X = !0);
29778
29778
  },
29779
- p(L, O) {
29780
- r = L, (!H || O & /*computedStyle*/
29779
+ p(L, D) {
29780
+ r = L, (!H || D & /*computedStyle*/
29781
29781
  2 && e !== (e = /*computedStyle*/
29782
- r[1] ? "display:none;" : void 0)) && B(t, "style", e), (!H || O & /*geom*/
29782
+ r[1] ? "display:none;" : void 0)) && M(t, "style", e), (!H || D & /*geom*/
29783
29783
  16 && i !== (i = /*geom*/
29784
- r[4].x)) && B(t, "x", i), (!H || O & /*geom*/
29784
+ r[4].x)) && M(t, "x", i), (!H || D & /*geom*/
29785
29785
  16 && s !== (s = /*geom*/
29786
- r[4].y)) && B(t, "y", s), (!H || O & /*geom*/
29786
+ r[4].y)) && M(t, "y", s), (!H || D & /*geom*/
29787
29787
  16 && n !== (n = /*geom*/
29788
- r[4].w)) && B(t, "width", n), (!H || O & /*geom*/
29788
+ r[4].w)) && M(t, "width", n), (!H || D & /*geom*/
29789
29789
  16 && o !== (o = /*geom*/
29790
- r[4].h)) && B(t, "height", o), (!H || O & /*computedStyle*/
29791
- 2) && B(
29790
+ r[4].h)) && M(t, "height", o), (!H || D & /*computedStyle*/
29791
+ 2) && M(
29792
29792
  l,
29793
29793
  "style",
29794
29794
  /*computedStyle*/
29795
29795
  r[1]
29796
- ), (!H || O & /*geom*/
29796
+ ), (!H || D & /*geom*/
29797
29797
  16 && h !== (h = /*geom*/
29798
- r[4].x)) && B(l, "x", h), (!H || O & /*geom*/
29798
+ r[4].x)) && M(l, "x", h), (!H || D & /*geom*/
29799
29799
  16 && c !== (c = /*geom*/
29800
- r[4].y)) && B(l, "y", c), (!H || O & /*geom*/
29800
+ r[4].y)) && M(l, "y", c), (!H || D & /*geom*/
29801
29801
  16 && u !== (u = /*geom*/
29802
- r[4].w)) && B(l, "width", u), (!H || O & /*geom*/
29802
+ r[4].w)) && M(l, "width", u), (!H || D & /*geom*/
29803
29803
  16 && d !== (d = /*geom*/
29804
- r[4].h)) && B(l, "height", d), (!H || O & /*geom*/
29804
+ r[4].h)) && M(l, "height", d), (!H || D & /*geom*/
29805
29805
  16 && m !== (m = /*geom*/
29806
- r[4].x)) && B(p, "x", m), (!H || O & /*geom*/
29806
+ r[4].x)) && M(p, "x", m), (!H || D & /*geom*/
29807
29807
  16 && _ !== (_ = /*geom*/
29808
- r[4].y)) && B(p, "y", _), (!H || O & /*geom*/
29808
+ r[4].y)) && M(p, "y", _), (!H || D & /*geom*/
29809
29809
  16 && y !== (y = /*geom*/
29810
- r[4].w)) && B(p, "width", y), (!H || O & /*geom*/
29810
+ r[4].w)) && M(p, "width", y), (!H || D & /*geom*/
29811
29811
  16 && v !== (v = /*geom*/
29812
29812
  r[4].x + /*geom*/
29813
- r[4].w)) && B(g, "x", v), (!H || O & /*geom*/
29813
+ r[4].w)) && M(g, "x", v), (!H || D & /*geom*/
29814
29814
  16 && w !== (w = /*geom*/
29815
- r[4].y)) && B(g, "y", w), (!H || O & /*geom*/
29815
+ r[4].y)) && M(g, "y", w), (!H || D & /*geom*/
29816
29816
  16 && I !== (I = /*geom*/
29817
- r[4].h)) && B(g, "height", I), (!H || O & /*geom*/
29817
+ r[4].h)) && M(g, "height", I), (!H || D & /*geom*/
29818
29818
  16 && N !== (N = /*geom*/
29819
- r[4].x)) && B(C, "x", N), (!H || O & /*geom*/
29819
+ r[4].x)) && M(C, "x", N), (!H || D & /*geom*/
29820
29820
  16 && S !== (S = /*geom*/
29821
29821
  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*/
29822
+ r[4].h)) && M(C, "y", S), (!H || D & /*geom*/
29823
+ 16 && P !== (P = /*geom*/
29824
+ r[4].w)) && M(C, "width", P), (!H || D & /*geom*/
29825
+ 16 && B !== (B = /*geom*/
29826
+ r[4].x)) && M(b, "x", B), (!H || D & /*geom*/
29827
+ 16 && O !== (O = /*geom*/
29828
+ r[4].y)) && M(b, "y", O), (!H || D & /*geom*/
29829
29829
  16 && G !== (G = /*geom*/
29830
- r[4].h)) && B(b, "height", G);
29830
+ r[4].h)) && M(b, "height", G);
29831
29831
  const _t = {};
29832
- O & /*geom*/
29832
+ D & /*geom*/
29833
29833
  16 && (_t.x = /*geom*/
29834
- r[4].x), O & /*geom*/
29834
+ r[4].x), D & /*geom*/
29835
29835
  16 && (_t.y = /*geom*/
29836
- r[4].y), O & /*viewportScale*/
29836
+ r[4].y), D & /*viewportScale*/
29837
29837
  8 && (_t.scale = /*viewportScale*/
29838
- r[3]), M.$set(_t);
29838
+ r[3]), F.$set(_t);
29839
29839
  const ht = {};
29840
- O & /*geom*/
29840
+ D & /*geom*/
29841
29841
  16 && (ht.x = /*geom*/
29842
29842
  r[4].x + /*geom*/
29843
- r[4].w), O & /*geom*/
29843
+ r[4].w), D & /*geom*/
29844
29844
  16 && (ht.y = /*geom*/
29845
- r[4].y), O & /*viewportScale*/
29845
+ r[4].y), D & /*viewportScale*/
29846
29846
  8 && (ht.scale = /*viewportScale*/
29847
- r[3]), P.$set(ht);
29847
+ r[3]), R.$set(ht);
29848
29848
  const vt = {};
29849
- O & /*geom*/
29849
+ D & /*geom*/
29850
29850
  16 && (vt.x = /*geom*/
29851
29851
  r[4].x + /*geom*/
29852
- r[4].w), O & /*geom*/
29852
+ r[4].w), D & /*geom*/
29853
29853
  16 && (vt.y = /*geom*/
29854
29854
  r[4].y + /*geom*/
29855
- r[4].h), O & /*viewportScale*/
29855
+ r[4].h), D & /*viewportScale*/
29856
29856
  8 && (vt.scale = /*viewportScale*/
29857
- r[3]), j.$set(vt);
29857
+ r[3]), z.$set(vt);
29858
29858
  const xt = {};
29859
- O & /*geom*/
29859
+ D & /*geom*/
29860
29860
  16 && (xt.x = /*geom*/
29861
- r[4].x), O & /*geom*/
29861
+ r[4].x), D & /*geom*/
29862
29862
  16 && (xt.y = /*geom*/
29863
29863
  r[4].y + /*geom*/
29864
- r[4].h), O & /*viewportScale*/
29864
+ r[4].h), D & /*viewportScale*/
29865
29865
  8 && (xt.scale = /*viewportScale*/
29866
- r[3]), Q.$set(xt);
29866
+ r[3]), J.$set(xt);
29867
29867
  },
29868
29868
  i(L) {
29869
- H || (nt(M.$$.fragment, L), nt(P.$$.fragment, L), nt(j.$$.fragment, L), nt(Q.$$.fragment, L), H = !0);
29869
+ H || (nt(F.$$.fragment, L), nt(R.$$.fragment, L), nt(z.$$.fragment, L), nt(J.$$.fragment, L), H = !0);
29870
29870
  },
29871
29871
  o(L) {
29872
- dt(M.$$.fragment, L), dt(P.$$.fragment, L), dt(j.$$.fragment, L), dt(Q.$$.fragment, L), H = !1;
29872
+ dt(F.$$.fragment, L), dt(R.$$.fragment, L), dt(z.$$.fragment, L), dt(J.$$.fragment, L), H = !1;
29873
29873
  },
29874
29874
  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);
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(Q), ct(U), ct(et)), qt(F, L), qt(R, L), qt(z, L), qt(J, L), X = !1, hr(lt);
29876
29876
  }
29877
29877
  };
29878
29878
  }
@@ -30050,7 +30050,7 @@ function sE(r) {
30050
30050
  );
30051
30051
  return {
30052
30052
  c() {
30053
- t = Et("g"), o && o.c(), B(t, "class", "a9s-annotation selected");
30053
+ t = Et("g"), o && o.c(), M(t, "class", "a9s-annotation selected");
30054
30054
  },
30055
30055
  m(a, l) {
30056
30056
  pt(a, t, l), o && o.m(t, null), e = !0, i || (s = [
@@ -30645,8 +30645,8 @@ function gE(r) {
30645
30645
  }
30646
30646
  return ~(i = h(r)) && (s = l[i] = a[i](r)), {
30647
30647
  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(
30648
+ t = Et("svg"), e = Et("g"), s && s.c(), M(e, "transform", n = /*transform*/
30649
+ r[31]), M(e, "class", "svelte-190cqdf"), M(t, "class", "a9s-annotationlayer a9s-osd-drawinglayer svelte-190cqdf"), vn(
30650
30650
  t,
30651
30651
  "drawing",
30652
30652
  /*drawingEnabled*/
@@ -30662,7 +30662,7 @@ function gE(r) {
30662
30662
  l[d] = null;
30663
30663
  }), 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
30664
  1 && n !== (n = /*transform*/
30665
- c[31])) && B(e, "transform", n), (!o || u[0] & /*drawingEnabled*/
30665
+ c[31])) && M(e, "transform", n), (!o || u[0] & /*drawingEnabled*/
30666
30666
  1) && vn(
30667
30667
  t,
30668
30668
  "drawing",
@@ -30729,61 +30729,61 @@ function _E(r, t, e) {
30729
30729
  const m = () => d, _ = () => a, y = navigator.userAgent.match(/firefox|fxios/i);
30730
30730
  let x;
30731
30731
  const { store: g, selection: v, hover: w } = c;
30732
- ca(r, v, (M) => e(22, o = M));
30732
+ ca(r, v, (F) => e(22, o = F));
30733
30733
  let I, A, C;
30734
- const N = (M) => {
30734
+ const N = (F) => {
30735
30735
  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));
30736
+ const Q = F.filter(({ editable: R }) => R).map(({ id: R }) => R);
30737
+ if (Q.length > 0) {
30738
+ if (e(6, A = Q.map((R) => g.getAnnotation(R))), I = (R) => {
30739
+ const { updated: U } = R.changes;
30740
+ e(6, A = (U || []).map((z) => z.newValue));
30741
+ }, g.observe(I, { annotations: Q }), y) {
30742
+ const { width: R } = p.viewport.viewerElementToViewportRectangle(new _i.Rect(0, 0, 1, 1));
30743
+ p.viewport.panBy(new _i.Point(Math.abs(R / 10), 0));
30744
30744
  }
30745
30745
  } else
30746
30746
  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) => {
30747
+ }, S = (F, Q) => {
30748
+ const { x: R, y: U } = p.viewport.viewerElementToImageCoordinates(new _i.Point(F, Q));
30749
+ return [R, U];
30750
+ }, P = (F) => {
30751
+ p.setMouseNavEnabled(!1), C = F.timeStamp;
30752
+ }, E = (F) => {
30753
30753
  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));
30754
+ const { offsetX: R, offsetY: U } = F.detail, [z, et] = S(R, U), J = g.getAt(z, et);
30755
+ J && (!l || l(J)) && !A.find((X) => X.id === J.id) && (w.set(J.id), v.setSelected(J.id));
30756
30756
  }
30757
- }, b = (M) => (K) => {
30757
+ }, b = (F) => (Q) => {
30758
30758
  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;
30759
+ 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
30760
  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
30761
+ ...R,
30762
+ selector: Q.detail,
30763
+ created: z ? R.created : /* @__PURE__ */ new Date(),
30764
+ updated: z ? /* @__PURE__ */ new Date() : void 0,
30765
+ updatedBy: z ? f : void 0
30766
30766
  });
30767
- }, D = (M) => {
30768
- const K = kw(), P = {
30769
- id: K,
30767
+ }, B = (F) => {
30768
+ const Q = kw(), R = {
30769
+ id: Q,
30770
30770
  bodies: [],
30771
30771
  target: {
30772
- annotation: K,
30773
- selector: M.detail,
30772
+ annotation: Q,
30773
+ selector: F.detail,
30774
30774
  creator: f,
30775
30775
  created: /* @__PURE__ */ new Date()
30776
30776
  }
30777
30777
  };
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);
30778
+ g.addAnnotation(R), v.setSelected(R.id), p.setMouseNavEnabled(!0);
30779
+ }, O = (F) => Du(F), G = (F) => ir(F);
30780
+ function $(F) {
30781
+ xn[F ? "unshift" : "push"](() => {
30782
+ x = F, e(5, x);
30783
30783
  });
30784
30784
  }
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);
30785
+ return r.$$set = (F) => {
30786
+ "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
30787
  }, r.$$.update = () => {
30788
30788
  r.$$.dirty[0] & /*toolName*/
30789
30789
  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 +30803,11 @@ function _E(r, t, e) {
30803
30803
  i,
30804
30804
  v,
30805
30805
  S,
30806
- R,
30806
+ P,
30807
30807
  E,
30808
30808
  b,
30809
- D,
30810
- F,
30809
+ B,
30810
+ O,
30811
30811
  l,
30812
30812
  h,
30813
30813
  c,
@@ -30858,29 +30858,29 @@ function xE(r) {
30858
30858
  ), h, c, u, d;
30859
30859
  return {
30860
30860
  c() {
30861
- t = Et("g"), e = Et("rect"), a = Et("text"), h = gl(l), B(e, "class", "a9s-presence-label-bg svelte-1rehw2p"), B(
30861
+ t = Et("g"), e = Et("rect"), a = Et("text"), h = gl(l), M(e, "class", "a9s-presence-label-bg svelte-1rehw2p"), M(
30862
30862
  e,
30863
30863
  "x",
30864
30864
  /*x*/
30865
30865
  r[0]
30866
- ), B(e, "y", i = /*y*/
30866
+ ), M(e, "y", i = /*y*/
30867
30867
  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*/
30868
+ r[3]), M(e, "height", s = 18 / /*scale*/
30869
+ r[3]), M(e, "fill", n = /*user*/
30870
+ r[2].appearance.color), M(e, "stroke", o = /*user*/
30871
+ r[2].appearance.color), M(a, "font-size", c = 12 / /*scale*/
30872
+ r[3]), M(a, "x", u = /*x*/
30873
30873
  r[0] + Math.round(5 / /*scale*/
30874
- r[3])), B(a, "y", d = /*y*/
30874
+ r[3])), M(a, "y", d = /*y*/
30875
30875
  r[1] - 5 / /*scale*/
30876
- r[3]), B(a, "class", "svelte-1rehw2p"), B(t, "class", "a9s-presence-label");
30876
+ r[3]), M(a, "class", "svelte-1rehw2p"), M(t, "class", "a9s-presence-label");
30877
30877
  },
30878
30878
  m(f, p) {
30879
30879
  pt(f, t, p), sr(t, e), sr(t, a), sr(a, h), r[6](t);
30880
30880
  },
30881
30881
  p(f, [p]) {
30882
30882
  p & /*x*/
30883
- 1 && B(
30883
+ 1 && M(
30884
30884
  e,
30885
30885
  "x",
30886
30886
  /*x*/
@@ -30888,23 +30888,23 @@ function xE(r) {
30888
30888
  ), p & /*y, scale*/
30889
30889
  10 && i !== (i = /*y*/
30890
30890
  f[1] - 18 / /*scale*/
30891
- f[3]) && B(e, "y", i), p & /*scale*/
30891
+ f[3]) && M(e, "y", i), p & /*scale*/
30892
30892
  8 && s !== (s = 18 / /*scale*/
30893
- f[3]) && B(e, "height", s), p & /*user*/
30893
+ f[3]) && M(e, "height", s), p & /*user*/
30894
30894
  4 && n !== (n = /*user*/
30895
- f[2].appearance.color) && B(e, "fill", n), p & /*user*/
30895
+ f[2].appearance.color) && M(e, "fill", n), p & /*user*/
30896
30896
  4 && o !== (o = /*user*/
30897
- f[2].appearance.color) && B(e, "stroke", o), p & /*user*/
30897
+ f[2].appearance.color) && M(e, "stroke", o), p & /*user*/
30898
30898
  4 && l !== (l = /*user*/
30899
30899
  f[2].appearance.label + "") && zg(h, l), p & /*scale*/
30900
30900
  8 && c !== (c = 12 / /*scale*/
30901
- f[3]) && B(a, "font-size", c), p & /*x, scale*/
30901
+ f[3]) && M(a, "font-size", c), p & /*x, scale*/
30902
30902
  9 && u !== (u = /*x*/
30903
30903
  f[0] + Math.round(5 / /*scale*/
30904
- f[3])) && B(a, "x", u), p & /*y, scale*/
30904
+ f[3])) && M(a, "x", u), p & /*y, scale*/
30905
30905
  10 && d !== (d = /*y*/
30906
30906
  f[1] - 5 / /*scale*/
30907
- f[3]) && B(a, "y", d);
30907
+ f[3]) && M(a, "y", d);
30908
30908
  },
30909
30909
  i: Xe,
30910
30910
  o: Xe,
@@ -30960,9 +30960,9 @@ function wE(r) {
30960
30960
  }
30961
30961
  }), {
30962
30962
  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");
30963
+ 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*/
30964
+ r[0].appearance.color), M(i, "fill", "transparent"), M(i, "points", n = /*geom*/
30965
+ r[2].points.map(fu).join(" ")), M(t, "class", "a9s-presence-overlay");
30966
30966
  },
30967
30967
  m(a, l) {
30968
30968
  pt(a, t, l), Yt(e, t, null), sr(t, i), o = !0;
@@ -30979,9 +30979,9 @@ function wE(r) {
30979
30979
  8 && (h.y = /*origin*/
30980
30980
  a[3][1]), e.$set(h), (!o || l & /*user*/
30981
30981
  1 && s !== (s = /*user*/
30982
- a[0].appearance.color)) && B(i, "stroke", s), (!o || l & /*geom*/
30982
+ a[0].appearance.color)) && M(i, "stroke", s), (!o || l & /*geom*/
30983
30983
  4 && n !== (n = /*geom*/
30984
- a[2].points.map(fu).join(" "))) && B(i, "points", n);
30984
+ a[2].points.map(fu).join(" "))) && M(i, "points", n);
30985
30985
  },
30986
30986
  i(a) {
30987
30987
  o || (nt(e.$$.fragment, a), o = !0);
@@ -31039,12 +31039,12 @@ function AE(r) {
31039
31039
  }
31040
31040
  }), {
31041
31041
  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");
31042
+ 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*/
31043
+ r[0].appearance.color), M(i, "fill", "transparent"), M(i, "x", n = /*geom*/
31044
+ r[2].x), M(i, "y", o = /*geom*/
31045
+ r[2].y), M(i, "width", a = /*geom*/
31046
+ r[2].w), M(i, "height", l = /*geom*/
31047
+ r[2].h), M(t, "class", "a9s-presence-overlay");
31048
31048
  },
31049
31049
  m(c, u) {
31050
31050
  pt(c, t, u), Yt(e, t, null), sr(t, i), h = !0;
@@ -31061,15 +31061,15 @@ function AE(r) {
31061
31061
  4 && (d.y = /*geom*/
31062
31062
  c[2].y), e.$set(d), (!h || u & /*user*/
31063
31063
  1 && s !== (s = /*user*/
31064
- c[0].appearance.color)) && B(i, "stroke", s), (!h || u & /*geom*/
31064
+ c[0].appearance.color)) && M(i, "stroke", s), (!h || u & /*geom*/
31065
31065
  4 && n !== (n = /*geom*/
31066
- c[2].x)) && B(i, "x", n), (!h || u & /*geom*/
31066
+ c[2].x)) && M(i, "x", n), (!h || u & /*geom*/
31067
31067
  4 && o !== (o = /*geom*/
31068
- c[2].y)) && B(i, "y", o), (!h || u & /*geom*/
31068
+ c[2].y)) && M(i, "y", o), (!h || u & /*geom*/
31069
31069
  4 && a !== (a = /*geom*/
31070
- c[2].w)) && B(i, "width", a), (!h || u & /*geom*/
31070
+ c[2].w)) && M(i, "width", a), (!h || u & /*geom*/
31071
31071
  4 && l !== (l = /*geom*/
31072
- c[2].h)) && B(i, "height", l);
31072
+ c[2].h)) && M(i, "height", l);
31073
31073
  },
31074
31074
  i(c) {
31075
31075
  h || (nt(e.$$.fragment, c), h = !0);
@@ -31332,8 +31332,8 @@ function ME(r) {
31332
31332
  );
31333
31333
  return {
31334
31334
  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");
31335
+ t = Et("svg"), e = Et("g"), n && n.c(), M(e, "transform", i = /*transform*/
31336
+ r[6]), M(t, "class", "a9s-osd-presencelayer svelte-1krwc4m");
31337
31337
  },
31338
31338
  m(o, a) {
31339
31339
  pt(o, t, a), sr(t, e), n && n.m(e, null), s = !0;
@@ -31345,7 +31345,7 @@ function ME(r) {
31345
31345
  n = null;
31346
31346
  }), je()), (!s || a & /*transform*/
31347
31347
  64 && i !== (i = /*transform*/
31348
- o[6])) && B(e, "transform", i);
31348
+ o[6])) && M(e, "transform", i);
31349
31349
  },
31350
31350
  i(o) {
31351
31351
  s || (nt(n), s = !0);
@@ -31455,8 +31455,8 @@ const _u = (r, t) => {
31455
31455
  e.adapter,
31456
31456
  e.autoSave
31457
31457
  );
31458
- let h = vp(), c = e.drawingEnabled, u = e.drawingMode;
31459
- const d = Hu(a, r.element), f = new Ow({
31458
+ let h = vp(), c = e.drawingEnabled, u = e.drawingMode, d = e.modalSelect;
31459
+ const f = Hu(a, r.element), p = new Ow({
31460
31460
  target: r.element,
31461
31461
  props: {
31462
31462
  state: i,
@@ -31464,14 +31464,14 @@ const _u = (r, t) => {
31464
31464
  style: e.style,
31465
31465
  filter: void 0
31466
31466
  }
31467
- }), p = new OE({
31467
+ }), m = new OE({
31468
31468
  target: r.element.querySelector(".openseadragon-canvas"),
31469
31469
  props: {
31470
31470
  provider: void 0,
31471
31471
  store: o,
31472
31472
  viewer: r
31473
31473
  }
31474
- }), m = new vE({
31474
+ }), _ = new vE({
31475
31475
  target: r.element.querySelector(".openseadragon-canvas"),
31476
31476
  props: {
31477
31477
  drawingEnabled: !!c,
@@ -31483,60 +31483,63 @@ const _u = (r, t) => {
31483
31483
  viewer: r
31484
31484
  }
31485
31485
  });
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) => {
31486
+ p.$on("click", (R) => {
31487
+ const { originalEvent: U, annotation: z } = R.detail;
31488
+ d ? n.isEmpty() && z && n.userSelect(z.id, U) : z && !(u === "click" && c) ? n.userSelect(z.id, U) : n.isEmpty() || n.clear();
31489
+ }), r.element.addEventListener("pointerdown", (R) => {
31490
31490
  if (s.current) {
31491
- const K = o.getAnnotation(s.current);
31492
- l.emit("clickAnnotation", K, M);
31491
+ const U = o.getAnnotation(s.current);
31492
+ l.emit("clickAnnotation", U, R);
31493
31493
  }
31494
31494
  }), _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) => (
31495
+ const y = fp(i, a, e.adapter), x = () => {
31496
+ _.$set({ drawingEnabled: !1 }), setTimeout(() => _.$set({ drawingEnabled: !0 }), 1);
31497
+ }, g = () => {
31498
+ p.$destroy(), m.$destroy(), _.$destroy(), f.destroy(), a.destroy();
31499
+ }, 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) => {
31500
+ if (!Hn(R))
31501
+ throw `No drawing tool named ${R}`;
31502
+ _.$set({ toolName: R });
31503
+ }, E = (R) => {
31504
+ c = R, _.$set({ drawingEnabled: c });
31505
+ }, b = (R) => {
31506
+ p.$set({ filter: R }), _.$set({ filter: R });
31507
+ }, B = (R) => {
31508
+ d = R;
31509
+ }, O = (R) => {
31510
+ p.$set({ style: R }), _.$set({ style: R });
31511
+ }, G = (R) => (
31510
31512
  // @ts-ignore
31511
- p.$set({ provider: M })
31512
- ), F = (M) => _u(r, M), G = (M) => {
31513
- h = M, m.$set({ user: M });
31514
- }, $ = (M) => (
31513
+ m.$set({ provider: R })
31514
+ ), $ = (R) => _u(r, R), F = (R) => {
31515
+ h = R, _.$set({ user: R });
31516
+ }, Q = (R) => (
31515
31517
  // @ts-ignore
31516
- f.$set({ visible: M })
31518
+ p.$set({ visible: R })
31517
31519
  );
31518
31520
  return {
31519
- ..._,
31520
- cancelDrawing: y,
31521
- destroy: x,
31522
- fitBounds: g,
31523
- fitBoundsWithConstraints: v,
31524
- getDrawingTool: w,
31525
- getUser: I,
31526
- isDrawingEnabled: A,
31521
+ ...y,
31522
+ cancelDrawing: x,
31523
+ destroy: g,
31524
+ fitBounds: v,
31525
+ fitBoundsWithConstraints: w,
31526
+ getDrawingTool: I,
31527
+ getUser: A,
31528
+ isDrawingEnabled: C,
31527
31529
  listDrawingTools: $n,
31528
31530
  on: l.on,
31529
31531
  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: $,
31532
+ registerDrawingTool: N,
31533
+ registerShapeEditor: S,
31534
+ setDrawingEnabled: E,
31535
+ setDrawingTool: P,
31536
+ setFilter: b,
31537
+ setModalSelect: B,
31538
+ setPresenceProvider: G,
31539
+ setStyle: O,
31540
+ setTheme: $,
31541
+ setUser: F,
31542
+ setVisible: Q,
31540
31543
  state: i,
31541
31544
  viewer: r
31542
31545
  };