@annotorious/react 3.0.0-rc.18 → 3.0.0-rc.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/annotorious-react.es.js.map +1 -1
- package/dist/annotorious-react.es12.js +1 -1
- package/dist/annotorious-react.es12.js.map +1 -1
- package/dist/annotorious-react.es15.js +439 -427
- package/dist/annotorious-react.es15.js.map +1 -1
- package/dist/annotorious-react.es18.js +21 -590
- package/dist/annotorious-react.es18.js.map +1 -1
- package/dist/annotorious-react.es19.js +590 -21
- package/dist/annotorious-react.es19.js.map +1 -1
- package/dist/annotorious-react.es20.js +2 -2
- package/dist/annotorious-react.es21.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fillDefaults as Hu, isTouch as Yu, createImageAnnotatorState as Vu, initKeyboardCommands as zu, listDrawingTools as bh, detectTheme as Wu, registerTool as $u, registerEditor as qu, getTool as xh, getEditor as Ku, ShapeType as
|
|
1
|
+
import { fillDefaults as Hu, isTouch as Yu, createImageAnnotatorState as Vu, initKeyboardCommands as zu, listDrawingTools as bh, detectTheme as Wu, registerTool as $u, registerEditor as qu, getTool as xh, getEditor as Ku, ShapeType as Fr } from "@annotorious/annotorious";
|
|
2
2
|
import Xi from "openseadragon";
|
|
3
3
|
var Zu = Object.defineProperty, Ju = (r, e, t) => e in r ? Zu(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, As = (r, e, t) => (Ju(r, typeof e != "symbol" ? e + "" : e, t), t), Ss = Object.prototype.hasOwnProperty;
|
|
4
4
|
function Xe(r, e) {
|
|
@@ -134,20 +134,20 @@ const al = 250, hl = (r) => {
|
|
|
134
134
|
g && g.indexOf(v) > 0 && g.splice(g.indexOf(v), 1);
|
|
135
135
|
}, d = (m, v, g) => {
|
|
136
136
|
h.has(m) && setTimeout(() => {
|
|
137
|
-
h.get(m).forEach((
|
|
137
|
+
h.get(m).forEach((x) => {
|
|
138
138
|
if (t) {
|
|
139
|
-
const
|
|
140
|
-
b
|
|
139
|
+
const b = Array.isArray(v) ? v.map((E) => t.serialize(E)) : t.serialize(v), T = g ? g instanceof PointerEvent ? g : t.serialize(g) : void 0;
|
|
140
|
+
x(b, T);
|
|
141
141
|
} else
|
|
142
|
-
|
|
142
|
+
x(v, g);
|
|
143
143
|
});
|
|
144
144
|
}, 1);
|
|
145
145
|
}, _ = () => {
|
|
146
146
|
const { selected: m } = o, v = (m || []).map(({ id: g }) => n.getAnnotation(g));
|
|
147
147
|
v.forEach((g) => {
|
|
148
|
-
const
|
|
149
|
-
(!
|
|
150
|
-
}), u = u.map((g) => v.find(({ id:
|
|
148
|
+
const x = u.find((b) => b.id === g.id);
|
|
149
|
+
(!x || !Xe(x, g)) && d("updateAnnotation", g, x);
|
|
150
|
+
}), u = u.map((g) => v.find(({ id: x }) => x === g.id) || g);
|
|
151
151
|
};
|
|
152
152
|
o.subscribe(({ selected: m }) => {
|
|
153
153
|
if (!(u.length === 0 && m.length === 0)) {
|
|
@@ -159,15 +159,15 @@ const al = 250, hl = (r) => {
|
|
|
159
159
|
g && !Xe(g, v) && d("updateAnnotation", g, v);
|
|
160
160
|
}), u = [];
|
|
161
161
|
else {
|
|
162
|
-
const v = new Set(u.map((
|
|
163
|
-
u.filter((
|
|
164
|
-
const
|
|
165
|
-
|
|
162
|
+
const v = new Set(u.map((x) => x.id)), g = new Set(m.map(({ id: x }) => x));
|
|
163
|
+
u.filter((x) => !g.has(x.id)).forEach((x) => {
|
|
164
|
+
const b = n.getAnnotation(x.id);
|
|
165
|
+
b && !Xe(b, x) && d("updateAnnotation", b, x);
|
|
166
166
|
}), u = [
|
|
167
167
|
// Remove annotations that were deselected
|
|
168
|
-
...u.filter((
|
|
168
|
+
...u.filter((x) => g.has(x.id)),
|
|
169
169
|
// Add editable annotations that were selected
|
|
170
|
-
...m.filter(({ id:
|
|
170
|
+
...m.filter(({ id: x }) => !v.has(x)).map(({ id: x }) => n.getAnnotation(x))
|
|
171
171
|
];
|
|
172
172
|
}
|
|
173
173
|
d("selectionChanged", u);
|
|
@@ -177,23 +177,23 @@ const al = 250, hl = (r) => {
|
|
|
177
177
|
}), a == null || a.subscribe((m) => d("viewportIntersect", m.map((v) => n.getAnnotation(v)))), n.observe((m) => {
|
|
178
178
|
i && (c && clearTimeout(c), c = setTimeout(_, 1e3));
|
|
179
179
|
const { created: v, deleted: g } = m.changes;
|
|
180
|
-
(v || []).forEach((
|
|
181
|
-
...
|
|
182
|
-
...
|
|
183
|
-
...
|
|
184
|
-
].length > 0).forEach(({ oldValue:
|
|
185
|
-
const T = u.find((E) => E.id ===
|
|
186
|
-
u = u.map((E) => E.id ===
|
|
180
|
+
(v || []).forEach((x) => d("createAnnotation", x)), (g || []).forEach((x) => d("deleteAnnotation", x)), (m.changes.updated || []).filter((x) => [
|
|
181
|
+
...x.bodiesCreated || [],
|
|
182
|
+
...x.bodiesDeleted || [],
|
|
183
|
+
...x.bodiesUpdated || []
|
|
184
|
+
].length > 0).forEach(({ oldValue: x, newValue: b }) => {
|
|
185
|
+
const T = u.find((E) => E.id === x.id) || x;
|
|
186
|
+
u = u.map((E) => E.id === x.id ? b : E), d("updateAnnotation", b, T);
|
|
187
187
|
});
|
|
188
188
|
}, { origin: ge.LOCAL }), n.observe((m) => {
|
|
189
189
|
if (u) {
|
|
190
|
-
const v = new Set(u.map((
|
|
191
|
-
g.length > 0 && (u = u.map((
|
|
190
|
+
const v = new Set(u.map((x) => x.id)), g = (m.changes.updated || []).filter(({ newValue: x }) => v.has(x.id)).map(({ newValue: x }) => x);
|
|
191
|
+
g.length > 0 && (u = u.map((x) => g.find((b) => b.id === x.id) || x));
|
|
192
192
|
}
|
|
193
193
|
}, { origin: ge.REMOTE });
|
|
194
194
|
const y = (m) => (v) => {
|
|
195
|
-
const { created: g, deleted:
|
|
196
|
-
(g || []).forEach((T) => d("createAnnotation", T)), (
|
|
195
|
+
const { created: g, deleted: x, updated: b } = v;
|
|
196
|
+
(g || []).forEach((T) => d("createAnnotation", T)), (x || []).forEach((T) => d("deleteAnnotation", T)), m ? (b || []).forEach((T) => d("updateAnnotation", T.oldValue, T.newValue)) : (b || []).forEach((T) => d("updateAnnotation", T.newValue, T.oldValue));
|
|
197
197
|
};
|
|
198
198
|
return e.on("undo", y(!0)), e.on("redo", y(!1)), { on: f, off: p, emit: d };
|
|
199
199
|
}, ll = (r) => (e) => e.reduce((t, i) => {
|
|
@@ -369,7 +369,7 @@ function je(r, e) {
|
|
|
369
369
|
function zt(r, e, t) {
|
|
370
370
|
r.insertBefore(e, t || null);
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function Ft(r) {
|
|
373
373
|
r.parentNode && r.parentNode.removeChild(r);
|
|
374
374
|
}
|
|
375
375
|
function Sh(r, e) {
|
|
@@ -402,7 +402,7 @@ function Ol(r, e, { bubbles: t = !1, cancelable: i = !1 } = {}) {
|
|
|
402
402
|
return new CustomEvent(r, { detail: e, bubbles: t, cancelable: i });
|
|
403
403
|
}
|
|
404
404
|
let Xr;
|
|
405
|
-
function
|
|
405
|
+
function Nr(r) {
|
|
406
406
|
Xr = r;
|
|
407
407
|
}
|
|
408
408
|
function es() {
|
|
@@ -454,12 +454,12 @@ function Oh() {
|
|
|
454
454
|
try {
|
|
455
455
|
for (; tr < sr.length; ) {
|
|
456
456
|
const e = sr[tr];
|
|
457
|
-
tr++,
|
|
457
|
+
tr++, Nr(e), Ml(e.$$);
|
|
458
458
|
}
|
|
459
459
|
} catch (e) {
|
|
460
460
|
throw sr.length = 0, tr = 0, e;
|
|
461
461
|
}
|
|
462
|
-
for (
|
|
462
|
+
for (Nr(null), sr.length = 0, tr = 0; ji.length; )
|
|
463
463
|
ji.pop()();
|
|
464
464
|
for (let e = 0; e < fr.length; e += 1) {
|
|
465
465
|
const t = fr[e];
|
|
@@ -469,7 +469,7 @@ function Oh() {
|
|
|
469
469
|
} while (sr.length);
|
|
470
470
|
for (; ws.length; )
|
|
471
471
|
ws.pop()();
|
|
472
|
-
io = !1, _n.clear(),
|
|
472
|
+
io = !1, _n.clear(), Nr(r);
|
|
473
473
|
}
|
|
474
474
|
function Ml(r) {
|
|
475
475
|
if (r.fragment !== null) {
|
|
@@ -482,7 +482,7 @@ function Dl(r) {
|
|
|
482
482
|
const e = [], t = [];
|
|
483
483
|
fr.forEach((i) => r.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), fr = e;
|
|
484
484
|
}
|
|
485
|
-
const
|
|
485
|
+
const Ni = /* @__PURE__ */ new Set();
|
|
486
486
|
let ke;
|
|
487
487
|
function Se() {
|
|
488
488
|
ke = {
|
|
@@ -496,14 +496,14 @@ function Re() {
|
|
|
496
496
|
ke.r || Jr(ke.c), ke = ke.p;
|
|
497
497
|
}
|
|
498
498
|
function J(r, e) {
|
|
499
|
-
r && r.i && (
|
|
499
|
+
r && r.i && (Ni.delete(r), r.i(e));
|
|
500
500
|
}
|
|
501
501
|
function ot(r, e, t, i) {
|
|
502
502
|
if (r && r.o) {
|
|
503
|
-
if (
|
|
503
|
+
if (Ni.has(r))
|
|
504
504
|
return;
|
|
505
|
-
|
|
506
|
-
|
|
505
|
+
Ni.add(r), ke.c.push(() => {
|
|
506
|
+
Ni.delete(r), i && (t && r.d(1), i());
|
|
507
507
|
}), r.o(e);
|
|
508
508
|
} else
|
|
509
509
|
i && i();
|
|
@@ -530,7 +530,7 @@ function Cl(r, e) {
|
|
|
530
530
|
}
|
|
531
531
|
function fe(r, e, t, i, n, o, s = null, a = [-1]) {
|
|
532
532
|
const h = Xr;
|
|
533
|
-
|
|
533
|
+
Nr(r);
|
|
534
534
|
const u = r.$$ = {
|
|
535
535
|
fragment: null,
|
|
536
536
|
ctx: [],
|
|
@@ -560,12 +560,12 @@ function fe(r, e, t, i, n, o, s = null, a = [-1]) {
|
|
|
560
560
|
}) : [], u.update(), l = !0, Jr(u.before_update), u.fragment = i ? i(u.ctx) : !1, e.target) {
|
|
561
561
|
if (e.hydrate) {
|
|
562
562
|
const c = Sl(e.target);
|
|
563
|
-
u.fragment && u.fragment.l(c), c.forEach(
|
|
563
|
+
u.fragment && u.fragment.l(c), c.forEach(Ft);
|
|
564
564
|
} else
|
|
565
565
|
u.fragment && u.fragment.c();
|
|
566
566
|
e.intro && J(r.$$.fragment), le(r, e.target, e.anchor), Oh();
|
|
567
567
|
}
|
|
568
|
-
|
|
568
|
+
Nr(h);
|
|
569
569
|
}
|
|
570
570
|
class pe {
|
|
571
571
|
constructor() {
|
|
@@ -598,9 +598,9 @@ class pe {
|
|
|
598
598
|
this.$$set && !vl(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
|
-
const
|
|
602
|
-
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(
|
|
603
|
-
function
|
|
601
|
+
const Fl = "4";
|
|
602
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Fl);
|
|
603
|
+
function Nl(r) {
|
|
604
604
|
var e = this.constructor;
|
|
605
605
|
return this.then(
|
|
606
606
|
function(t) {
|
|
@@ -775,7 +775,7 @@ pt.prototype.then = function(r, e) {
|
|
|
775
775
|
var t = new this.constructor(Ul);
|
|
776
776
|
return Ph(this, new Xl(r, e, t)), t;
|
|
777
777
|
};
|
|
778
|
-
pt.prototype.finally =
|
|
778
|
+
pt.prototype.finally = Nl;
|
|
779
779
|
pt.all = function(r) {
|
|
780
780
|
return new pt(function(e, t) {
|
|
781
781
|
if (!Ih(r))
|
|
@@ -984,10 +984,10 @@ var Ut;
|
|
|
984
984
|
(function(r) {
|
|
985
985
|
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";
|
|
986
986
|
})(Ut || (Ut = {}));
|
|
987
|
-
var
|
|
987
|
+
var D;
|
|
988
988
|
(function(r) {
|
|
989
989
|
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";
|
|
990
|
-
})(
|
|
990
|
+
})(D || (D = {}));
|
|
991
991
|
var He;
|
|
992
992
|
(function(r) {
|
|
993
993
|
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";
|
|
@@ -1075,7 +1075,7 @@ var Zl = {
|
|
|
1075
1075
|
fetch: function(r, e) {
|
|
1076
1076
|
return fetch(r, e);
|
|
1077
1077
|
}
|
|
1078
|
-
}, gn = /iPhone/i, Ds = /iPod/i, Cs = /iPad/i,
|
|
1078
|
+
}, gn = /iPhone/i, Ds = /iPod/i, Cs = /iPad/i, Fs = /\biOS-universal(?:.+)Mac\b/i, bn = /\bAndroid(?:.+)Mobile\b/i, Ns = /Android/i, er = /(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i, si = /Silk/i, re = /Windows Phone/i, Ls = /\bWindows(?:.+)ARM\b/i, Bs = /BlackBerry/i, Gs = /BB10/i, Us = /Opera Mini/i, ks = /\b(CriOS|Chrome)(?:.+)Mobile/i, Xs = /Mobile(?:.+)Firefox\b/i, js = function(r) {
|
|
1079
1079
|
return typeof r < "u" && r.platform === "MacIntel" && typeof r.maxTouchPoints == "number" && r.maxTouchPoints > 1 && typeof MSStream > "u";
|
|
1080
1080
|
};
|
|
1081
1081
|
function Jl(r) {
|
|
@@ -1105,8 +1105,8 @@ function Ql(r) {
|
|
|
1105
1105
|
phone: n(gn) && !n(re),
|
|
1106
1106
|
ipod: n(Ds),
|
|
1107
1107
|
tablet: !n(gn) && (n(Cs) || js(e)) && !n(re),
|
|
1108
|
-
universal: n(
|
|
1109
|
-
device: (n(gn) || n(Ds) || n(Cs) || n(
|
|
1108
|
+
universal: n(Fs),
|
|
1109
|
+
device: (n(gn) || n(Ds) || n(Cs) || n(Fs) || js(e)) && !n(re)
|
|
1110
1110
|
},
|
|
1111
1111
|
amazon: {
|
|
1112
1112
|
phone: n(er),
|
|
@@ -1115,8 +1115,8 @@ function Ql(r) {
|
|
|
1115
1115
|
},
|
|
1116
1116
|
android: {
|
|
1117
1117
|
phone: !n(re) && n(er) || !n(re) && n(bn),
|
|
1118
|
-
tablet: !n(re) && !n(er) && !n(bn) && (n(si) || n(
|
|
1119
|
-
device: !n(re) && (n(er) || n(si) || n(bn) || n(
|
|
1118
|
+
tablet: !n(re) && !n(er) && !n(bn) && (n(si) || n(Ns)),
|
|
1119
|
+
device: !n(re) && (n(er) || n(si) || n(bn) || n(Ns)) || n(/\bokhttp\b/i)
|
|
1120
1120
|
},
|
|
1121
1121
|
windows: {
|
|
1122
1122
|
phone: n(re),
|
|
@@ -1161,7 +1161,7 @@ function ec(r) {
|
|
|
1161
1161
|
}
|
|
1162
1162
|
return e ? r : 4;
|
|
1163
1163
|
}
|
|
1164
|
-
var
|
|
1164
|
+
var N = {
|
|
1165
1165
|
/**
|
|
1166
1166
|
* This adapter is used to call methods that are platform dependent.
|
|
1167
1167
|
* For example `document.createElement` only runs on the web but fails in node environments.
|
|
@@ -1430,7 +1430,7 @@ var F = {
|
|
|
1430
1430
|
m[v - 1] = arguments[v];
|
|
1431
1431
|
_.fn.apply(_.context, m);
|
|
1432
1432
|
} else {
|
|
1433
|
-
var g = _.length,
|
|
1433
|
+
var g = _.length, x;
|
|
1434
1434
|
for (v = 0; v < g; v++)
|
|
1435
1435
|
switch (_[v].once && this.removeListener(h, _[v].fn, void 0, !0), y) {
|
|
1436
1436
|
case 1:
|
|
@@ -1447,8 +1447,8 @@ var F = {
|
|
|
1447
1447
|
break;
|
|
1448
1448
|
default:
|
|
1449
1449
|
if (!m)
|
|
1450
|
-
for (
|
|
1451
|
-
m[
|
|
1450
|
+
for (x = 1, m = new Array(y - 1); x < y; x++)
|
|
1451
|
+
m[x - 1] = arguments[x];
|
|
1452
1452
|
_[v].fn.apply(_[v].context, m);
|
|
1453
1453
|
}
|
|
1454
1454
|
}
|
|
@@ -1551,20 +1551,20 @@ function nc(r, e, t, i) {
|
|
|
1551
1551
|
var n = r.prev, o = r, s = r.next;
|
|
1552
1552
|
if (ft(n, o, s) >= 0)
|
|
1553
1553
|
return !1;
|
|
1554
|
-
for (var a = n.x, h = o.x, u = s.x, l = n.y, c = o.y, f = s.y, p = a < h ? a < u ? a : u : h < u ? h : u, d = l < c ? l < f ? l : f : c < f ? c : f, _ = a > h ? a > u ? a : u : h > u ? h : u, y = l > c ? l > f ? l : f : c > f ? c : f, m = ao(p, d, e, t, i), v = ao(_, y, e, t, i), g = r.prevZ,
|
|
1555
|
-
if (g.x >= p && g.x <= _ && g.y >= d && g.y <= y && g !== n && g !== s && hr(a, l, h, c, u, f, g.x, g.y) && ft(g.prev, g, g.next) >= 0 || (g = g.prevZ,
|
|
1554
|
+
for (var a = n.x, h = o.x, u = s.x, l = n.y, c = o.y, f = s.y, p = a < h ? a < u ? a : u : h < u ? h : u, d = l < c ? l < f ? l : f : c < f ? c : f, _ = a > h ? a > u ? a : u : h > u ? h : u, y = l > c ? l > f ? l : f : c > f ? c : f, m = ao(p, d, e, t, i), v = ao(_, y, e, t, i), g = r.prevZ, x = r.nextZ; g && g.z >= m && x && x.z <= v; ) {
|
|
1555
|
+
if (g.x >= p && g.x <= _ && g.y >= d && g.y <= y && g !== n && g !== s && hr(a, l, h, c, u, f, g.x, g.y) && ft(g.prev, g, g.next) >= 0 || (g = g.prevZ, x.x >= p && x.x <= _ && x.y >= d && x.y <= y && x !== n && x !== s && hr(a, l, h, c, u, f, x.x, x.y) && ft(x.prev, x, x.next) >= 0))
|
|
1556
1556
|
return !1;
|
|
1557
|
-
|
|
1557
|
+
x = x.nextZ;
|
|
1558
1558
|
}
|
|
1559
1559
|
for (; g && g.z >= m; ) {
|
|
1560
1560
|
if (g.x >= p && g.x <= _ && g.y >= d && g.y <= y && g !== n && g !== s && hr(a, l, h, c, u, f, g.x, g.y) && ft(g.prev, g, g.next) >= 0)
|
|
1561
1561
|
return !1;
|
|
1562
1562
|
g = g.prevZ;
|
|
1563
1563
|
}
|
|
1564
|
-
for (;
|
|
1565
|
-
if (
|
|
1564
|
+
for (; x && x.z <= v; ) {
|
|
1565
|
+
if (x.x >= p && x.x <= _ && x.y >= d && x.y <= y && x !== n && x !== s && hr(a, l, h, c, u, f, x.x, x.y) && ft(x.prev, x, x.next) >= 0)
|
|
1566
1566
|
return !1;
|
|
1567
|
-
|
|
1567
|
+
x = x.nextZ;
|
|
1568
1568
|
}
|
|
1569
1569
|
return !0;
|
|
1570
1570
|
}
|
|
@@ -1572,7 +1572,7 @@ function oc(r, e, t) {
|
|
|
1572
1572
|
var i = r;
|
|
1573
1573
|
do {
|
|
1574
1574
|
var n = i.prev, o = i.next.next;
|
|
1575
|
-
!cn(n, o) &&
|
|
1575
|
+
!cn(n, o) && Fh(n, i, i.next, o) && Vr(n, o) && Vr(o, n) && (e.push(n.i / t | 0), e.push(i.i / t | 0), e.push(o.i / t | 0), zr(i), zr(i.next), i = r = o), i = i.next;
|
|
1576
1576
|
} while (i !== r);
|
|
1577
1577
|
return We(i);
|
|
1578
1578
|
}
|
|
@@ -1581,7 +1581,7 @@ function sc(r, e, t, i, n, o) {
|
|
|
1581
1581
|
do {
|
|
1582
1582
|
for (var a = s.next.next; a !== s.prev; ) {
|
|
1583
1583
|
if (s.i !== a.i && _c(s, a)) {
|
|
1584
|
-
var h =
|
|
1584
|
+
var h = Nh(s, a);
|
|
1585
1585
|
s = We(s, s.next), h = We(h, h.next), Yr(s, e, t, i, n, o, 0), Yr(h, e, t, i, n, o, 0);
|
|
1586
1586
|
return;
|
|
1587
1587
|
}
|
|
@@ -1605,7 +1605,7 @@ function uc(r, e) {
|
|
|
1605
1605
|
var t = lc(r, e);
|
|
1606
1606
|
if (!t)
|
|
1607
1607
|
return e;
|
|
1608
|
-
var i =
|
|
1608
|
+
var i = Nh(t, r);
|
|
1609
1609
|
return We(i, i.next), We(t, t.next);
|
|
1610
1610
|
}
|
|
1611
1611
|
function lc(r, e) {
|
|
@@ -1676,7 +1676,7 @@ function ft(r, e, t) {
|
|
|
1676
1676
|
function cn(r, e) {
|
|
1677
1677
|
return r.x === e.x && r.y === e.y;
|
|
1678
1678
|
}
|
|
1679
|
-
function
|
|
1679
|
+
function Fh(r, e, t, i) {
|
|
1680
1680
|
var n = hi(ft(r, e, t)), o = hi(ft(r, e, i)), s = hi(ft(t, i, r)), a = hi(ft(t, i, e));
|
|
1681
1681
|
return !!(n !== o && s !== a || n === 0 && ai(r, t, e) || o === 0 && ai(r, i, e) || s === 0 && ai(t, r, i) || a === 0 && ai(t, e, i));
|
|
1682
1682
|
}
|
|
@@ -1689,7 +1689,7 @@ function hi(r) {
|
|
|
1689
1689
|
function yc(r, e) {
|
|
1690
1690
|
var t = r;
|
|
1691
1691
|
do {
|
|
1692
|
-
if (t.i !== r.i && t.next.i !== r.i && t.i !== e.i && t.next.i !== e.i &&
|
|
1692
|
+
if (t.i !== r.i && t.next.i !== r.i && t.i !== e.i && t.next.i !== e.i && Fh(t, t.next, r, e))
|
|
1693
1693
|
return !0;
|
|
1694
1694
|
t = t.next;
|
|
1695
1695
|
} while (t !== r);
|
|
@@ -1705,7 +1705,7 @@ function mc(r, e) {
|
|
|
1705
1705
|
while (t !== r);
|
|
1706
1706
|
return i;
|
|
1707
1707
|
}
|
|
1708
|
-
function
|
|
1708
|
+
function Nh(r, e) {
|
|
1709
1709
|
var t = new ho(r.i, r.x, r.y), i = new ho(e.i, e.x, e.y), n = r.next, o = e.prev;
|
|
1710
1710
|
return r.next = e, e.prev = r, t.next = n, n.prev = t, i.next = t, t.prev = i, o.next = i, i.prev = o, i;
|
|
1711
1711
|
}
|
|
@@ -1762,7 +1762,7 @@ Wi.exports;
|
|
|
1762
1762
|
overflow: "Overflow: input needs wider integers to process",
|
|
1763
1763
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
1764
1764
|
"invalid-input": "Invalid input"
|
|
1765
|
-
},
|
|
1765
|
+
}, x = h - u, b = Math.floor, T = String.fromCharCode, E;
|
|
1766
1766
|
function R(C) {
|
|
1767
1767
|
throw new RangeError(g[C]);
|
|
1768
1768
|
}
|
|
@@ -1777,12 +1777,12 @@ Wi.exports;
|
|
|
1777
1777
|
var K = C.split("."), _t = A(K, P).join(".");
|
|
1778
1778
|
return q + _t;
|
|
1779
1779
|
}
|
|
1780
|
-
function
|
|
1780
|
+
function M(C) {
|
|
1781
1781
|
for (var P = [], Y = 0, q = C.length, K, _t; Y < q; )
|
|
1782
1782
|
K = C.charCodeAt(Y++), K >= 55296 && K <= 56319 && Y < q ? (_t = C.charCodeAt(Y++), (_t & 64512) == 56320 ? P.push(((K & 1023) << 10) + (_t & 1023) + 65536) : (P.push(K), Y--)) : P.push(K);
|
|
1783
1783
|
return P;
|
|
1784
1784
|
}
|
|
1785
|
-
function
|
|
1785
|
+
function F(C) {
|
|
1786
1786
|
return A(C, function(P) {
|
|
1787
1787
|
var Y = "";
|
|
1788
1788
|
return P > 65535 && (P -= 65536, Y += T(P >>> 10 & 1023 | 55296), P = 56320 | P & 1023), Y += T(P), Y;
|
|
@@ -1796,34 +1796,34 @@ Wi.exports;
|
|
|
1796
1796
|
}
|
|
1797
1797
|
function I(C, P, Y) {
|
|
1798
1798
|
var q = 0;
|
|
1799
|
-
for (C = Y ?
|
|
1800
|
-
C =
|
|
1801
|
-
return
|
|
1799
|
+
for (C = Y ? b(C / f) : C >> 1, C += b(C / P); C > x * l >> 1; q += h)
|
|
1800
|
+
C = b(C / x);
|
|
1801
|
+
return b(q + (x + 1) * C / (C + c));
|
|
1802
1802
|
}
|
|
1803
1803
|
function w(C) {
|
|
1804
1804
|
var P = [], Y = C.length, q, K = 0, _t = d, at = p, ht, xt, St, yt, tt, it, ut, z, Mt;
|
|
1805
1805
|
for (ht = C.lastIndexOf(_), ht < 0 && (ht = 0), xt = 0; xt < ht; ++xt)
|
|
1806
1806
|
C.charCodeAt(xt) >= 128 && R("not-basic"), P.push(C.charCodeAt(xt));
|
|
1807
1807
|
for (St = ht > 0 ? ht + 1 : 0; St < Y; ) {
|
|
1808
|
-
for (yt = K, tt = 1, it = h; St >= Y && R("invalid-input"), ut = L(C.charCodeAt(St++)), (ut >= h || ut >
|
|
1809
|
-
Mt = h - z, tt >
|
|
1810
|
-
q = P.length + 1, at = I(K - yt, q, yt == 0),
|
|
1808
|
+
for (yt = K, tt = 1, it = h; St >= Y && R("invalid-input"), ut = L(C.charCodeAt(St++)), (ut >= h || ut > b((a - K) / tt)) && R("overflow"), K += ut * tt, z = it <= at ? u : it >= at + l ? l : it - at, !(ut < z); it += h)
|
|
1809
|
+
Mt = h - z, tt > b(a / Mt) && R("overflow"), tt *= Mt;
|
|
1810
|
+
q = P.length + 1, at = I(K - yt, q, yt == 0), b(K / q) > a - _t && R("overflow"), _t += b(K / q), K %= q, P.splice(K++, 0, _t);
|
|
1811
1811
|
}
|
|
1812
|
-
return
|
|
1812
|
+
return F(P);
|
|
1813
1813
|
}
|
|
1814
1814
|
function B(C) {
|
|
1815
1815
|
var P, Y, q, K, _t, at, ht, xt, St, yt, tt, it = [], ut, z, Mt, Dt;
|
|
1816
|
-
for (C =
|
|
1816
|
+
for (C = M(C), ut = C.length, P = d, Y = 0, _t = p, at = 0; at < ut; ++at)
|
|
1817
1817
|
tt = C[at], tt < 128 && it.push(T(tt));
|
|
1818
1818
|
for (q = K = it.length, K && it.push(_); q < ut; ) {
|
|
1819
1819
|
for (ht = a, at = 0; at < ut; ++at)
|
|
1820
1820
|
tt = C[at], tt >= P && tt < ht && (ht = tt);
|
|
1821
|
-
for (z = q + 1, ht - P >
|
|
1821
|
+
for (z = q + 1, ht - P > b((a - Y) / z) && R("overflow"), Y += (ht - P) * z, P = ht, at = 0; at < ut; ++at)
|
|
1822
1822
|
if (tt = C[at], tt < P && ++Y > a && R("overflow"), tt == P) {
|
|
1823
1823
|
for (xt = Y, St = h; yt = St <= _t ? u : St >= _t + l ? l : St - _t, !(xt < yt); St += h)
|
|
1824
1824
|
Dt = xt - yt, Mt = h - yt, it.push(
|
|
1825
1825
|
T(O(yt + Dt % Mt, 0))
|
|
1826
|
-
), xt =
|
|
1826
|
+
), xt = b(Dt / Mt);
|
|
1827
1827
|
it.push(T(O(xt, 0))), _t = I(Y, z, q == K), Y = 0, ++q;
|
|
1828
1828
|
}
|
|
1829
1829
|
++Y, ++P;
|
|
@@ -1855,8 +1855,8 @@ Wi.exports;
|
|
|
1855
1855
|
* @type Object
|
|
1856
1856
|
*/
|
|
1857
1857
|
ucs2: {
|
|
1858
|
-
decode:
|
|
1859
|
-
encode:
|
|
1858
|
+
decode: M,
|
|
1859
|
+
encode: F
|
|
1860
1860
|
},
|
|
1861
1861
|
decode: w,
|
|
1862
1862
|
encode: B,
|
|
@@ -1939,7 +1939,7 @@ var gc = Wi.exports, bc = function() {
|
|
|
1939
1939
|
h.prototype = e.prototype, i.prototype = new h(), h.prototype = null;
|
|
1940
1940
|
}
|
|
1941
1941
|
return i;
|
|
1942
|
-
}, Dc = Mc, os = Function.prototype.bind || Dc, Cc = Function.prototype.call,
|
|
1942
|
+
}, Dc = Mc, os = Function.prototype.bind || Dc, Cc = Function.prototype.call, Fc = Object.prototype.hasOwnProperty, Nc = os, Lc = Nc.call(Cc, Fc), V, mr = SyntaxError, Bh = Function, pr = TypeError, xn = function(r) {
|
|
1943
1943
|
try {
|
|
1944
1944
|
return Bh('"use strict"; return (' + r + ").constructor;")();
|
|
1945
1945
|
} catch {
|
|
@@ -2229,7 +2229,19 @@ var Jc = ss("%SyntaxError%"), ir = ss("%TypeError%"), qs = kh, Qc = function(r,
|
|
|
2229
2229
|
var o = Zs(r, "length");
|
|
2230
2230
|
o && !o.configurable && (i = !1), o && !o.writable && (n = !1);
|
|
2231
2231
|
}
|
|
2232
|
-
return (i || n || !t) && (tf ? Ks(
|
|
2232
|
+
return (i || n || !t) && (tf ? Ks(
|
|
2233
|
+
/** @type {Parameters<define>[0]} */
|
|
2234
|
+
r,
|
|
2235
|
+
"length",
|
|
2236
|
+
e,
|
|
2237
|
+
!0,
|
|
2238
|
+
!0
|
|
2239
|
+
) : Ks(
|
|
2240
|
+
/** @type {Parameters<define>[0]} */
|
|
2241
|
+
r,
|
|
2242
|
+
"length",
|
|
2243
|
+
e
|
|
2244
|
+
)), r;
|
|
2233
2245
|
};
|
|
2234
2246
|
(function(r) {
|
|
2235
2247
|
var e = os, t = Ze, i = rf, n = t("%TypeError%"), o = t("%Function.prototype.apply%"), s = t("%Function.prototype.call%"), a = t("%Reflect.apply%", !0) || e.call(s, o), h = t("%Object.defineProperty%", !0), u = t("%Math.max%");
|
|
@@ -2335,7 +2347,7 @@ var _o = uf, aa = _o.custom, ha = Wh(aa) ? aa : null, gf = function r(e, t, i, n
|
|
|
2335
2347
|
var _ = vr ? be.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : po.call(e);
|
|
2336
2348
|
return typeof e == "object" && !vr ? Rr(_) : _;
|
|
2337
2349
|
}
|
|
2338
|
-
if (
|
|
2350
|
+
if (Ff(e)) {
|
|
2339
2351
|
for (var y = "<" + ra.call(String(e.nodeName)), m = e.attributes || [], v = 0; v < m.length; v++)
|
|
2340
2352
|
y += " " + m[v].name + "=" + zh(bf(m[v].value), "double", o);
|
|
2341
2353
|
return y += ">", e.childNodes && e.childNodes.length && (y += "..."), y += "</" + ra.call(String(e.nodeName)) + ">", y;
|
|
@@ -2347,8 +2359,8 @@ var _o = uf, aa = _o.custom, ha = Wh(aa) ? aa : null, gf = function r(e, t, i, n
|
|
|
2347
2359
|
return c && !Lf(g) ? "[" + mo(g, c) + "]" : "[ " + qt.call(g, ", ") + " ]";
|
|
2348
2360
|
}
|
|
2349
2361
|
if (Tf(e)) {
|
|
2350
|
-
var
|
|
2351
|
-
return !("cause" in Error.prototype) && "cause" in e && !Vh.call(e, "cause") ? "{ [" + String(e) + "] " + qt.call(ia.call("[cause]: " + f(e.cause),
|
|
2362
|
+
var x = ui(e, f);
|
|
2363
|
+
return !("cause" in Error.prototype) && "cause" in e && !Vh.call(e, "cause") ? "{ [" + String(e) + "] " + qt.call(ia.call("[cause]: " + f(e.cause), x), ", ") + " }" : x.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + qt.call(x, ", ") + " }";
|
|
2352
2364
|
}
|
|
2353
2365
|
if (typeof e == "object" && s) {
|
|
2354
2366
|
if (ha && typeof e[ha] == "function" && _o)
|
|
@@ -2357,10 +2369,10 @@ var _o = uf, aa = _o.custom, ha = Wh(aa) ? aa : null, gf = function r(e, t, i, n
|
|
|
2357
2369
|
return e.inspect();
|
|
2358
2370
|
}
|
|
2359
2371
|
if (If(e)) {
|
|
2360
|
-
var
|
|
2372
|
+
var b = [];
|
|
2361
2373
|
return Qs && Qs.call(e, function(L, O) {
|
|
2362
|
-
|
|
2363
|
-
}), la("Map", Ki.call(e),
|
|
2374
|
+
b.push(f(O, e, !0) + " => " + f(L, e));
|
|
2375
|
+
}), la("Map", Ki.call(e), b, c);
|
|
2364
2376
|
}
|
|
2365
2377
|
if (Df(e)) {
|
|
2366
2378
|
var T = [];
|
|
@@ -2387,8 +2399,8 @@ var _o = uf, aa = _o.custom, ha = Wh(aa) ? aa : null, gf = function r(e, t, i, n
|
|
|
2387
2399
|
if (e === Li)
|
|
2388
2400
|
return "{ [object globalThis] }";
|
|
2389
2401
|
if (!xf(e) && !ua(e)) {
|
|
2390
|
-
var E = ui(e, f), R = oa ? oa(e) === Object.prototype : e instanceof Object || e.constructor === Object, A = e instanceof Object ? "" : "null prototype", S = !R && Pt && Object(e) === e && Pt in e ? us.call(we(e), 8, -1) : A ? "Object" : "",
|
|
2391
|
-
return E.length === 0 ?
|
|
2402
|
+
var E = ui(e, f), R = oa ? oa(e) === Object.prototype : e instanceof Object || e.constructor === Object, A = e instanceof Object ? "" : "null prototype", S = !R && Pt && Object(e) === e && Pt in e ? us.call(we(e), 8, -1) : A ? "Object" : "", M = R || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", F = M + (S || A ? "[" + qt.call(ia.call([], S || [], A || []), ": ") + "] " : "");
|
|
2403
|
+
return E.length === 0 ? F + "{}" : c ? F + "{" + mo(E, c) + "}" : F + "{ " + qt.call(E, ", ") + " }";
|
|
2392
2404
|
}
|
|
2393
2405
|
return String(e);
|
|
2394
2406
|
};
|
|
@@ -2534,7 +2546,7 @@ function Cf(r) {
|
|
|
2534
2546
|
}
|
|
2535
2547
|
return !1;
|
|
2536
2548
|
}
|
|
2537
|
-
function
|
|
2549
|
+
function Ff(r) {
|
|
2538
2550
|
return !r || typeof r != "object" ? !1 : typeof HTMLElement < "u" && r instanceof HTMLElement ? !0 : typeof r.nodeName == "string" && typeof r.getAttribute == "function";
|
|
2539
2551
|
}
|
|
2540
2552
|
function qh(r, e) {
|
|
@@ -2542,10 +2554,10 @@ function qh(r, e) {
|
|
|
2542
2554
|
var t = r.length - e.maxStringLength, i = "... " + t + " more character" + (t > 1 ? "s" : "");
|
|
2543
2555
|
return qh(us.call(r, 0, e.maxStringLength), e) + i;
|
|
2544
2556
|
}
|
|
2545
|
-
var n = be.call(be.call(r, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g,
|
|
2557
|
+
var n = be.call(be.call(r, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Nf);
|
|
2546
2558
|
return zh(n, "single", e);
|
|
2547
2559
|
}
|
|
2548
|
-
function
|
|
2560
|
+
function Nf(r) {
|
|
2549
2561
|
var e = r.charCodeAt(0), t = {
|
|
2550
2562
|
8: "b",
|
|
2551
2563
|
9: "t",
|
|
@@ -2826,12 +2838,12 @@ var ls = Ze, Ar = sf, Gf = gf, Uf = ls("%TypeError%"), li = ls("%WeakMap%", !0),
|
|
|
2826
2838
|
}, fp = function(r) {
|
|
2827
2839
|
return typeof r == "string" || typeof r == "number" || typeof r == "boolean" || typeof r == "symbol" || typeof r == "bigint";
|
|
2828
2840
|
}, In = {}, pp = function r(e, t, i, n, o, s, a, h, u, l, c, f, p, d, _, y) {
|
|
2829
|
-
for (var m = e, v = y, g = 0,
|
|
2830
|
-
var
|
|
2831
|
-
if (g += 1, typeof
|
|
2832
|
-
if (
|
|
2841
|
+
for (var m = e, v = y, g = 0, x = !1; (v = v.get(In)) !== void 0 && !x; ) {
|
|
2842
|
+
var b = v.get(e);
|
|
2843
|
+
if (g += 1, typeof b < "u") {
|
|
2844
|
+
if (b === g)
|
|
2833
2845
|
throw new RangeError("Cyclic object value");
|
|
2834
|
-
|
|
2846
|
+
x = !0;
|
|
2835
2847
|
}
|
|
2836
2848
|
typeof v.get(In) > "u" && (g = 0);
|
|
2837
2849
|
}
|
|
@@ -2861,10 +2873,10 @@ var ls = Ze, Ar = sf, Gf = gf, Uf = ls("%TypeError%"), li = ls("%WeakMap%", !0),
|
|
|
2861
2873
|
var A = Object.keys(m);
|
|
2862
2874
|
R = u ? A.sort(u) : A;
|
|
2863
2875
|
}
|
|
2864
|
-
for (var S = n && oe(m) && m.length === 1 ? t + "[]" : t,
|
|
2865
|
-
var
|
|
2876
|
+
for (var S = n && oe(m) && m.length === 1 ? t + "[]" : t, M = 0; M < R.length; ++M) {
|
|
2877
|
+
var F = R[M], L = typeof F == "object" && typeof F.value < "u" ? F.value : m[F];
|
|
2866
2878
|
if (!(s && L === null)) {
|
|
2867
|
-
var O = oe(m) ? typeof i == "function" ? i(S,
|
|
2879
|
+
var O = oe(m) ? typeof i == "function" ? i(S, F) : S : S + (l ? "." + F : "[" + F + "]");
|
|
2868
2880
|
y.set(e, g);
|
|
2869
2881
|
var I = Jh();
|
|
2870
2882
|
I.set(In, y), Qh(E, r(
|
|
@@ -3077,14 +3089,14 @@ var Pp = /^([a-z0-9.+-]+:)/i, Mp = /:[0-9]*$/, Dp = /^(\/\/?(?!\/)[^?\s]*)(\?[^\
|
|
|
3077
3089
|
`
|
|
3078
3090
|
`,
|
|
3079
3091
|
" "
|
|
3080
|
-
],
|
|
3092
|
+
], Fp = [
|
|
3081
3093
|
"{",
|
|
3082
3094
|
"}",
|
|
3083
3095
|
"|",
|
|
3084
3096
|
"\\",
|
|
3085
3097
|
"^",
|
|
3086
3098
|
"`"
|
|
3087
|
-
].concat(Cp), go = ["'"].concat(
|
|
3099
|
+
].concat(Cp), go = ["'"].concat(Fp), pa = [
|
|
3088
3100
|
"%",
|
|
3089
3101
|
"/",
|
|
3090
3102
|
"?",
|
|
@@ -3094,7 +3106,7 @@ var Pp = /^([a-z0-9.+-]+:)/i, Mp = /:[0-9]*$/, Dp = /^(\/\/?(?!\/)[^?\s]*)(\?[^\
|
|
|
3094
3106
|
"/",
|
|
3095
3107
|
"?",
|
|
3096
3108
|
"#"
|
|
3097
|
-
],
|
|
3109
|
+
], Np = 255, _a = /^[+a-z0-9A-Z_-]{0,63}$/, Lp = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, Bp = {
|
|
3098
3110
|
javascript: !0,
|
|
3099
3111
|
"javascript:": !0
|
|
3100
3112
|
}, bo = {
|
|
@@ -3154,20 +3166,20 @@ Xt.prototype.parse = function(r, e, t) {
|
|
|
3154
3166
|
var m = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
3155
3167
|
if (!m)
|
|
3156
3168
|
for (var v = this.hostname.split(/\./), p = 0, g = v.length; p < g; p++) {
|
|
3157
|
-
var
|
|
3158
|
-
if (
|
|
3159
|
-
for (var
|
|
3160
|
-
|
|
3161
|
-
if (!
|
|
3162
|
-
var R = v.slice(0, p), A = v.slice(p + 1), S =
|
|
3169
|
+
var x = v[p];
|
|
3170
|
+
if (x && !x.match(_a)) {
|
|
3171
|
+
for (var b = "", T = 0, E = x.length; T < E; T++)
|
|
3172
|
+
x.charCodeAt(T) > 127 ? b += "x" : b += x[T];
|
|
3173
|
+
if (!b.match(_a)) {
|
|
3174
|
+
var R = v.slice(0, p), A = v.slice(p + 1), S = x.match(Lp);
|
|
3163
3175
|
S && (R.push(S[1]), A.unshift(S[2])), A.length && (a = "/" + A.join(".") + a), this.hostname = R.join(".");
|
|
3164
3176
|
break;
|
|
3165
3177
|
}
|
|
3166
3178
|
}
|
|
3167
3179
|
}
|
|
3168
|
-
this.hostname.length >
|
|
3169
|
-
var
|
|
3170
|
-
this.host =
|
|
3180
|
+
this.hostname.length > Np ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), m || (this.hostname = Ip.toASCII(this.hostname));
|
|
3181
|
+
var M = this.port ? ":" + this.port : "", F = this.hostname || "";
|
|
3182
|
+
this.host = F + M, this.href += this.host, m && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), a[0] !== "/" && (a = "/" + a));
|
|
3171
3183
|
}
|
|
3172
3184
|
if (!Bp[l])
|
|
3173
3185
|
for (var p = 0, g = go.length; p < g; p++) {
|
|
@@ -3181,8 +3193,8 @@ Xt.prototype.parse = function(r, e, t) {
|
|
|
3181
3193
|
I !== -1 && (this.hash = a.substr(I), a = a.slice(0, I));
|
|
3182
3194
|
var w = a.indexOf("?");
|
|
3183
3195
|
if (w !== -1 ? (this.search = a.substr(w), this.query = a.substr(w + 1), e && (this.query = xo.parse(this.query)), a = a.slice(0, w)) : e && (this.search = "", this.query = {}), a && (this.pathname = a), dr[l] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
|
|
3184
|
-
var
|
|
3185
|
-
this.path =
|
|
3196
|
+
var M = this.pathname || "", B = this.search || "";
|
|
3197
|
+
this.path = M + B;
|
|
3186
3198
|
}
|
|
3187
3199
|
return this.href = this.format(), this;
|
|
3188
3200
|
};
|
|
@@ -3246,16 +3258,16 @@ Xt.prototype.resolveObject = function(r) {
|
|
|
3246
3258
|
}
|
|
3247
3259
|
return t.slashes = t.slashes || r.slashes, t.href = t.format(), t;
|
|
3248
3260
|
}
|
|
3249
|
-
var d = t.pathname && t.pathname.charAt(0) === "/", _ = r.host || r.pathname && r.pathname.charAt(0) === "/", y = _ || d || t.host && r.pathname, m = y, v = t.pathname && t.pathname.split("/") || [], g = r.pathname && r.pathname.split("/") || [],
|
|
3250
|
-
if (
|
|
3261
|
+
var d = t.pathname && t.pathname.charAt(0) === "/", _ = r.host || r.pathname && r.pathname.charAt(0) === "/", y = _ || d || t.host && r.pathname, m = y, v = t.pathname && t.pathname.split("/") || [], g = r.pathname && r.pathname.split("/") || [], x = t.protocol && !dr[t.protocol];
|
|
3262
|
+
if (x && (t.hostname = "", t.port = null, t.host && (v[0] === "" ? v[0] = t.host : v.unshift(t.host)), t.host = "", r.protocol && (r.hostname = null, r.port = null, r.host && (g[0] === "" ? g[0] = r.host : g.unshift(r.host)), r.host = null), y = y && (g[0] === "" || v[0] === "")), _)
|
|
3251
3263
|
t.host = r.host || r.host === "" ? r.host : t.host, t.hostname = r.hostname || r.hostname === "" ? r.hostname : t.hostname, t.search = r.search, t.query = r.query, v = g;
|
|
3252
3264
|
else if (g.length)
|
|
3253
3265
|
v || (v = []), v.pop(), v = v.concat(g), t.search = r.search, t.query = r.query;
|
|
3254
3266
|
else if (r.search != null) {
|
|
3255
|
-
if (
|
|
3267
|
+
if (x) {
|
|
3256
3268
|
t.host = v.shift(), t.hostname = t.host;
|
|
3257
|
-
var
|
|
3258
|
-
|
|
3269
|
+
var b = t.host && t.host.indexOf("@") > 0 ? t.host.split("@") : !1;
|
|
3270
|
+
b && (t.auth = b.shift(), t.hostname = b.shift(), t.host = t.hostname);
|
|
3259
3271
|
}
|
|
3260
3272
|
return t.search = r.search, t.query = r.query, (t.pathname !== null || t.search !== null) && (t.path = (t.pathname ? t.pathname : "") + (t.search ? t.search : "")), t.href = t.format(), t;
|
|
3261
3273
|
}
|
|
@@ -3268,10 +3280,10 @@ Xt.prototype.resolveObject = function(r) {
|
|
|
3268
3280
|
v.unshift("..");
|
|
3269
3281
|
y && v[0] !== "" && (!v[0] || v[0].charAt(0) !== "/") && v.unshift(""), E && v.join("/").substr(-1) !== "/" && v.push("");
|
|
3270
3282
|
var S = v[0] === "" || v[0] && v[0].charAt(0) === "/";
|
|
3271
|
-
if (
|
|
3283
|
+
if (x) {
|
|
3272
3284
|
t.hostname = S ? "" : v.length ? v.shift() : "", t.host = t.hostname;
|
|
3273
|
-
var
|
|
3274
|
-
|
|
3285
|
+
var b = t.host && t.host.indexOf("@") > 0 ? t.host.split("@") : !1;
|
|
3286
|
+
b && (t.auth = b.shift(), t.hostname = b.shift(), t.host = t.hostname);
|
|
3275
3287
|
}
|
|
3276
3288
|
return y = y || t.host && v.length, y && !S && v.unshift(""), v.length > 0 ? t.pathname = v.join("/") : (t.pathname = null, t.path = null), (t.pathname !== null || t.search !== null) && (t.path = (t.pathname ? t.pathname : "") + (t.search ? t.search : "")), t.auth = r.auth || t.auth, t.slashes = t.slashes || r.slashes, t.href = t.format(), t;
|
|
3277
3289
|
};
|
|
@@ -3292,13 +3304,13 @@ var ur = {
|
|
|
3292
3304
|
format: jp,
|
|
3293
3305
|
resolve: Xp
|
|
3294
3306
|
};
|
|
3295
|
-
|
|
3296
|
-
|
|
3307
|
+
N.RETINA_PREFIX = /@([0-9\.]+)x/;
|
|
3308
|
+
N.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = !1;
|
|
3297
3309
|
var ya = !1, ma = "6.5.10";
|
|
3298
3310
|
function Hp(r) {
|
|
3299
3311
|
var e;
|
|
3300
3312
|
if (!ya) {
|
|
3301
|
-
if (
|
|
3313
|
+
if (N.ADAPTER.getNavigator().userAgent.toLowerCase().indexOf("chrome") > -1) {
|
|
3302
3314
|
var t = [
|
|
3303
3315
|
`
|
|
3304
3316
|
%c %c %c PixiJS ` + ma + " - ✰ " + r + ` ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥
|
|
@@ -3325,12 +3337,12 @@ function Yp() {
|
|
|
3325
3337
|
return typeof Pn > "u" && (Pn = function() {
|
|
3326
3338
|
var r = {
|
|
3327
3339
|
stencil: !0,
|
|
3328
|
-
failIfMajorPerformanceCaveat:
|
|
3340
|
+
failIfMajorPerformanceCaveat: N.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT
|
|
3329
3341
|
};
|
|
3330
3342
|
try {
|
|
3331
|
-
if (!
|
|
3343
|
+
if (!N.ADAPTER.getWebGLRenderingContext())
|
|
3332
3344
|
return !1;
|
|
3333
|
-
var e =
|
|
3345
|
+
var e = N.ADAPTER.createCanvas(), t = e.getContext("webgl", r) || e.getContext("experimental-webgl", r), i = !!(t && t.getContextAttributes().stencil);
|
|
3334
3346
|
if (t) {
|
|
3335
3347
|
var n = t.getExtension("WEBGL_lose_context");
|
|
3336
3348
|
n && n.loseContext();
|
|
@@ -3341,7 +3353,7 @@ function Yp() {
|
|
|
3341
3353
|
}
|
|
3342
3354
|
}()), Pn;
|
|
3343
3355
|
}
|
|
3344
|
-
var Vp = "#f0f8ff", zp = "#faebd7", Wp = "#00ffff", $p = "#7fffd4", qp = "#f0ffff", Kp = "#f5f5dc", Zp = "#ffe4c4", Jp = "#000000", Qp = "#ffebcd", td = "#0000ff", ed = "#8a2be2", rd = "#a52a2a", id = "#deb887", nd = "#5f9ea0", od = "#7fff00", sd = "#d2691e", ad = "#ff7f50", hd = "#6495ed", ud = "#fff8dc", ld = "#dc143c", cd = "#00ffff", fd = "#00008b", pd = "#008b8b", dd = "#b8860b", _d = "#a9a9a9", yd = "#006400", md = "#a9a9a9", vd = "#bdb76b", gd = "#8b008b", bd = "#556b2f", xd = "#ff8c00", Td = "#9932cc", Ed = "#8b0000", Ad = "#e9967a", Sd = "#8fbc8f", Rd = "#483d8b", Od = "#2f4f4f", wd = "#2f4f4f", Id = "#00ced1", Pd = "#9400d3", Md = "#ff1493", Dd = "#00bfff", Cd = "#696969",
|
|
3356
|
+
var Vp = "#f0f8ff", zp = "#faebd7", Wp = "#00ffff", $p = "#7fffd4", qp = "#f0ffff", Kp = "#f5f5dc", Zp = "#ffe4c4", Jp = "#000000", Qp = "#ffebcd", td = "#0000ff", ed = "#8a2be2", rd = "#a52a2a", id = "#deb887", nd = "#5f9ea0", od = "#7fff00", sd = "#d2691e", ad = "#ff7f50", hd = "#6495ed", ud = "#fff8dc", ld = "#dc143c", cd = "#00ffff", fd = "#00008b", pd = "#008b8b", dd = "#b8860b", _d = "#a9a9a9", yd = "#006400", md = "#a9a9a9", vd = "#bdb76b", gd = "#8b008b", bd = "#556b2f", xd = "#ff8c00", Td = "#9932cc", Ed = "#8b0000", Ad = "#e9967a", Sd = "#8fbc8f", Rd = "#483d8b", Od = "#2f4f4f", wd = "#2f4f4f", Id = "#00ced1", Pd = "#9400d3", Md = "#ff1493", Dd = "#00bfff", Cd = "#696969", Fd = "#696969", Nd = "#1e90ff", Ld = "#b22222", Bd = "#fffaf0", Gd = "#228b22", Ud = "#ff00ff", kd = "#dcdcdc", Xd = "#f8f8ff", jd = "#daa520", Hd = "#ffd700", Yd = "#808080", Vd = "#008000", zd = "#adff2f", Wd = "#808080", $d = "#f0fff0", qd = "#ff69b4", Kd = "#cd5c5c", Zd = "#4b0082", Jd = "#fffff0", Qd = "#f0e68c", t_ = "#fff0f5", e_ = "#e6e6fa", r_ = "#7cfc00", i_ = "#fffacd", n_ = "#add8e6", o_ = "#f08080", s_ = "#e0ffff", a_ = "#fafad2", h_ = "#d3d3d3", u_ = "#90ee90", l_ = "#d3d3d3", c_ = "#ffb6c1", f_ = "#ffa07a", p_ = "#20b2aa", d_ = "#87cefa", __ = "#778899", y_ = "#778899", m_ = "#b0c4de", v_ = "#ffffe0", g_ = "#00ff00", b_ = "#32cd32", x_ = "#faf0e6", T_ = "#ff00ff", E_ = "#800000", A_ = "#66cdaa", S_ = "#0000cd", R_ = "#ba55d3", O_ = "#9370db", w_ = "#3cb371", I_ = "#7b68ee", P_ = "#00fa9a", M_ = "#48d1cc", D_ = "#c71585", C_ = "#191970", F_ = "#f5fffa", N_ = "#ffe4e1", L_ = "#ffe4b5", B_ = "#ffdead", G_ = "#000080", U_ = "#fdf5e6", k_ = "#808000", X_ = "#6b8e23", j_ = "#ffa500", H_ = "#ff4500", Y_ = "#da70d6", V_ = "#eee8aa", z_ = "#98fb98", W_ = "#afeeee", $_ = "#db7093", q_ = "#ffefd5", K_ = "#ffdab9", Z_ = "#cd853f", J_ = "#ffc0cb", Q_ = "#dda0dd", ty = "#b0e0e6", ey = "#800080", ry = "#663399", iy = "#ff0000", ny = "#bc8f8f", oy = "#4169e1", sy = "#8b4513", ay = "#fa8072", hy = "#f4a460", uy = "#2e8b57", ly = "#fff5ee", cy = "#a0522d", fy = "#c0c0c0", py = "#87ceeb", dy = "#6a5acd", _y = "#708090", yy = "#708090", my = "#fffafa", vy = "#00ff7f", gy = "#4682b4", by = "#d2b48c", xy = "#008080", Ty = "#d8bfd8", Ey = "#ff6347", Ay = "#40e0d0", Sy = "#ee82ee", Ry = "#f5deb3", Oy = "#ffffff", wy = "#f5f5f5", Iy = "#ffff00", Py = "#9acd32", My = {
|
|
3345
3357
|
aliceblue: Vp,
|
|
3346
3358
|
antiquewhite: zp,
|
|
3347
3359
|
aqua: Wp,
|
|
@@ -3385,8 +3397,8 @@ var Vp = "#f0f8ff", zp = "#faebd7", Wp = "#00ffff", $p = "#7fffd4", qp = "#f0fff
|
|
|
3385
3397
|
deeppink: Md,
|
|
3386
3398
|
deepskyblue: Dd,
|
|
3387
3399
|
dimgray: Cd,
|
|
3388
|
-
dimgrey:
|
|
3389
|
-
dodgerblue:
|
|
3400
|
+
dimgrey: Fd,
|
|
3401
|
+
dodgerblue: Nd,
|
|
3390
3402
|
firebrick: Ld,
|
|
3391
3403
|
floralwhite: Bd,
|
|
3392
3404
|
forestgreen: Gd,
|
|
@@ -3439,8 +3451,8 @@ var Vp = "#f0f8ff", zp = "#faebd7", Wp = "#00ffff", $p = "#7fffd4", qp = "#f0fff
|
|
|
3439
3451
|
mediumturquoise: M_,
|
|
3440
3452
|
mediumvioletred: D_,
|
|
3441
3453
|
midnightblue: C_,
|
|
3442
|
-
mintcream:
|
|
3443
|
-
mistyrose:
|
|
3454
|
+
mintcream: F_,
|
|
3455
|
+
mistyrose: N_,
|
|
3444
3456
|
moccasin: L_,
|
|
3445
3457
|
navajowhite: B_,
|
|
3446
3458
|
navy: G_,
|
|
@@ -3526,7 +3538,7 @@ function ps(r, e) {
|
|
|
3526
3538
|
function nu(r, e, t, i) {
|
|
3527
3539
|
return t = t || new Float32Array(4), t[0] = (r >> 16 & 255) / 255, t[1] = (r >> 8 & 255) / 255, t[2] = (r & 255) / 255, (i || i === void 0) && (t[0] *= e, t[1] *= e, t[2] *= e), t[3] = e, t;
|
|
3528
3540
|
}
|
|
3529
|
-
function
|
|
3541
|
+
function Fy(r, e) {
|
|
3530
3542
|
e === void 0 && (e = null);
|
|
3531
3543
|
var t = r * 6;
|
|
3532
3544
|
if (e = e || new Uint16Array(t), e.length !== t)
|
|
@@ -3570,9 +3582,9 @@ function _r(r, e, t) {
|
|
|
3570
3582
|
function lr(r) {
|
|
3571
3583
|
return r === 0 ? 0 : r < 0 ? -1 : 1;
|
|
3572
3584
|
}
|
|
3573
|
-
var
|
|
3585
|
+
var Ny = 0;
|
|
3574
3586
|
function $e() {
|
|
3575
|
-
return ++
|
|
3587
|
+
return ++Ny;
|
|
3576
3588
|
}
|
|
3577
3589
|
var ba = {};
|
|
3578
3590
|
function jt(r, e, t) {
|
|
@@ -3590,7 +3602,7 @@ var xa = {}, ne = /* @__PURE__ */ Object.create(null), Pe = /* @__PURE__ */ Obje
|
|
|
3590
3602
|
/** @class */
|
|
3591
3603
|
function() {
|
|
3592
3604
|
function r(e, t, i) {
|
|
3593
|
-
this.canvas =
|
|
3605
|
+
this.canvas = N.ADAPTER.createCanvas(), this.context = this.canvas.getContext("2d"), this.resolution = i || N.RESOLUTION, this.resize(e, t);
|
|
3594
3606
|
}
|
|
3595
3607
|
return r.prototype.clear = function() {
|
|
3596
3608
|
this.context.setTransform(1, 0, 0, 1, 0, 0), this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
|
@@ -3653,7 +3665,7 @@ function By(r, e) {
|
|
|
3653
3665
|
return t.hostname !== e.hostname || !i || t.protocol !== e.protocol ? "anonymous" : "";
|
|
3654
3666
|
}
|
|
3655
3667
|
function tn(r, e) {
|
|
3656
|
-
var t =
|
|
3668
|
+
var t = N.RETINA_PREFIX.exec(r);
|
|
3657
3669
|
return t ? parseFloat(t[1]) : e !== void 0 ? e : 1;
|
|
3658
3670
|
}
|
|
3659
3671
|
/*!
|
|
@@ -3753,11 +3765,11 @@ var nt = (
|
|
|
3753
3765
|
var _ = Math.sign(t.a * t.d - t.b * t.c);
|
|
3754
3766
|
if (_ === 0 || (t.apply(c, c), t.apply(f, f), t.apply(p, p), t.apply(d, d), Math.max(c.x, f.x, p.x, d.x) <= a || Math.min(c.x, f.x, p.x, d.x) >= h || Math.max(c.y, f.y, p.y, d.y) <= u || Math.min(c.y, f.y, p.y, d.y) >= l))
|
|
3755
3767
|
return !1;
|
|
3756
|
-
var y = _ * (f.y - c.y), m = _ * (c.x - f.x), v = y * a + m * u, g = y * h + m * u,
|
|
3757
|
-
if (Math.max(v, g,
|
|
3768
|
+
var y = _ * (f.y - c.y), m = _ * (c.x - f.x), v = y * a + m * u, g = y * h + m * u, x = y * a + m * l, b = y * h + m * l;
|
|
3769
|
+
if (Math.max(v, g, x, b) <= y * c.x + m * c.y || Math.min(v, g, x, b) >= y * d.x + m * d.y)
|
|
3758
3770
|
return !1;
|
|
3759
|
-
var T = _ * (c.y - p.y), E = _ * (p.x - c.x), R = T * a + E * u, A = T * h + E * u, S = T * a + E * l,
|
|
3760
|
-
return !(Math.max(R, A, S,
|
|
3771
|
+
var T = _ * (c.y - p.y), E = _ * (p.x - c.x), R = T * a + E * u, A = T * h + E * u, S = T * a + E * l, M = T * h + E * l;
|
|
3772
|
+
return !(Math.max(R, A, S, M) <= T * c.x + E * c.y || Math.min(R, A, S, M) >= T * d.x + E * d.y);
|
|
3761
3773
|
}, r.prototype.pad = function(e, t) {
|
|
3762
3774
|
return e === void 0 && (e = 0), t === void 0 && (t = e), this.x -= e, this.y -= t, this.width += e * 2, this.height += t * 2, this;
|
|
3763
3775
|
}, r.prototype.fit = function(e) {
|
|
@@ -3985,21 +3997,21 @@ var nt = (
|
|
|
3985
3997
|
configurable: !0
|
|
3986
3998
|
}), r;
|
|
3987
3999
|
}()
|
|
3988
|
-
),
|
|
4000
|
+
), Ne = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1], Le = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1], Be = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1], Ge = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1], To = [], su = [], di = Math.sign;
|
|
3989
4001
|
function Hy() {
|
|
3990
4002
|
for (var r = 0; r < 16; r++) {
|
|
3991
4003
|
var e = [];
|
|
3992
4004
|
To.push(e);
|
|
3993
4005
|
for (var t = 0; t < 16; t++)
|
|
3994
|
-
for (var i = di(
|
|
3995
|
-
if (
|
|
4006
|
+
for (var i = di(Ne[r] * Ne[t] + Be[r] * Le[t]), n = di(Le[r] * Ne[t] + Ge[r] * Le[t]), o = di(Ne[r] * Be[t] + Be[r] * Ge[t]), s = di(Le[r] * Be[t] + Ge[r] * Ge[t]), a = 0; a < 16; a++)
|
|
4007
|
+
if (Ne[a] === i && Le[a] === n && Be[a] === o && Ge[a] === s) {
|
|
3996
4008
|
e.push(a);
|
|
3997
4009
|
break;
|
|
3998
4010
|
}
|
|
3999
4011
|
}
|
|
4000
4012
|
for (var r = 0; r < 16; r++) {
|
|
4001
4013
|
var h = new bt();
|
|
4002
|
-
h.set(
|
|
4014
|
+
h.set(Ne[r], Le[r], Be[r], Ge[r], 0, 0), su.push(h);
|
|
4003
4015
|
}
|
|
4004
4016
|
}
|
|
4005
4017
|
Hy();
|
|
@@ -4099,7 +4111,7 @@ var ct = {
|
|
|
4099
4111
|
* after rotating the axes.
|
|
4100
4112
|
*/
|
|
4101
4113
|
uX: function(r) {
|
|
4102
|
-
return
|
|
4114
|
+
return Ne[r];
|
|
4103
4115
|
},
|
|
4104
4116
|
/**
|
|
4105
4117
|
* @memberof PIXI.groupD8
|
|
@@ -4263,7 +4275,7 @@ var ct = {
|
|
|
4263
4275
|
* @pixi/display is licensed under the MIT License.
|
|
4264
4276
|
* http://www.opensource.org/licenses/mit-license
|
|
4265
4277
|
*/
|
|
4266
|
-
|
|
4278
|
+
N.SORTABLE_CHILDREN = !1;
|
|
4267
4279
|
var rn = (
|
|
4268
4280
|
/** @class */
|
|
4269
4281
|
function() {
|
|
@@ -4300,8 +4312,8 @@ var rn = (
|
|
|
4300
4312
|
}, r.prototype.addVerticesMatrix = function(e, t, i, n, o, s) {
|
|
4301
4313
|
o === void 0 && (o = 0), s === void 0 && (s = o);
|
|
4302
4314
|
for (var a = e.a, h = e.b, u = e.c, l = e.d, c = e.tx, f = e.ty, p = this.minX, d = this.minY, _ = this.maxX, y = this.maxY, m = i; m < n; m += 2) {
|
|
4303
|
-
var v = t[m], g = t[m + 1],
|
|
4304
|
-
p = Math.min(p,
|
|
4315
|
+
var v = t[m], g = t[m + 1], x = a * v + u * g + c, b = l * g + h * v + f;
|
|
4316
|
+
p = Math.min(p, x - o), _ = Math.max(_, x + o), d = Math.min(d, b - s), y = Math.max(y, b + s);
|
|
4305
4317
|
}
|
|
4306
4318
|
this.minX = p, this.minY = d, this.maxX = _, this.maxY = y;
|
|
4307
4319
|
}, r.prototype.addBounds = function(e) {
|
|
@@ -4658,7 +4670,7 @@ var te = (
|
|
|
4658
4670
|
ds(e, r);
|
|
4659
4671
|
function e() {
|
|
4660
4672
|
var t = r.call(this) || this;
|
|
4661
|
-
return t.children = [], t.sortableChildren =
|
|
4673
|
+
return t.children = [], t.sortableChildren = N.SORTABLE_CHILDREN, t.sortDirty = !1, t;
|
|
4662
4674
|
}
|
|
4663
4675
|
return e.prototype.onChildrenChange = function(t) {
|
|
4664
4676
|
}, e.prototype.addChild = function() {
|
|
@@ -5041,7 +5053,7 @@ Object.defineProperties(Ot.prototype, {
|
|
|
5041
5053
|
* @pixi/ticker is licensed under the MIT License.
|
|
5042
5054
|
* http://www.opensource.org/licenses/mit-license
|
|
5043
5055
|
*/
|
|
5044
|
-
|
|
5056
|
+
N.TARGET_FPMS = 0.06;
|
|
5045
5057
|
var ue;
|
|
5046
5058
|
(function(r) {
|
|
5047
5059
|
r[r.INTERACTION = 50] = "INTERACTION", r[r.HIGH = 25] = "HIGH", r[r.NORMAL = 0] = "NORMAL", r[r.LOW = -25] = "LOW", r[r.UTILITY = -50] = "UTILITY";
|
|
@@ -5071,7 +5083,7 @@ var Mn = (
|
|
|
5071
5083
|
function() {
|
|
5072
5084
|
function r() {
|
|
5073
5085
|
var e = this;
|
|
5074
|
-
this.autoStart = !1, this.deltaTime = 1, this.lastTime = -1, this.speed = 1, this.started = !1, this._requestId = null, this._maxElapsedMS = 100, this._minElapsedMS = 0, this._protected = !1, this._lastFrame = -1, this._head = new Mn(null, null, 1 / 0), this.deltaMS = 1 /
|
|
5086
|
+
this.autoStart = !1, this.deltaTime = 1, this.lastTime = -1, this.speed = 1, this.started = !1, this._requestId = null, this._maxElapsedMS = 100, this._minElapsedMS = 0, this._protected = !1, this._lastFrame = -1, this._head = new Mn(null, null, 1 / 0), this.deltaMS = 1 / N.TARGET_FPMS, this.elapsedMS = 1 / N.TARGET_FPMS, this._tick = function(t) {
|
|
5075
5087
|
e._requestId = null, e.started && (e.update(t), e.started && e._requestId === null && e._head.next && (e._requestId = requestAnimationFrame(e._tick)));
|
|
5076
5088
|
};
|
|
5077
5089
|
}
|
|
@@ -5140,7 +5152,7 @@ var Mn = (
|
|
|
5140
5152
|
return;
|
|
5141
5153
|
this._lastFrame = e - i % this._minElapsedMS;
|
|
5142
5154
|
}
|
|
5143
|
-
this.deltaMS = t, this.deltaTime = this.deltaMS *
|
|
5155
|
+
this.deltaMS = t, this.deltaTime = this.deltaMS * N.TARGET_FPMS;
|
|
5144
5156
|
for (var n = this._head, o = n.next; o; )
|
|
5145
5157
|
o = o.emit(this.deltaTime);
|
|
5146
5158
|
n.next || this._cancelIfNeeded();
|
|
@@ -5177,7 +5189,7 @@ var Mn = (
|
|
|
5177
5189
|
return 1e3 / this._maxElapsedMS;
|
|
5178
5190
|
},
|
|
5179
5191
|
set: function(e) {
|
|
5180
|
-
var t = Math.min(this.maxFPS, e), i = Math.min(Math.max(0, t) / 1e3,
|
|
5192
|
+
var t = Math.min(this.maxFPS, e), i = Math.min(Math.max(0, t) / 1e3, N.TARGET_FPMS);
|
|
5181
5193
|
this._maxElapsedMS = 1 / i;
|
|
5182
5194
|
},
|
|
5183
5195
|
enumerable: !1,
|
|
@@ -5312,8 +5324,8 @@ var Mn = (
|
|
|
5312
5324
|
* @pixi/core is licensed under the MIT License.
|
|
5313
5325
|
* http://www.opensource.org/licenses/mit-license
|
|
5314
5326
|
*/
|
|
5315
|
-
|
|
5316
|
-
|
|
5327
|
+
N.PREFER_ENV = Zt.any ? he.WEBGL : he.WEBGL2;
|
|
5328
|
+
N.STRICT_TEXTURE_CACHE = !1;
|
|
5317
5329
|
var Ao = [];
|
|
5318
5330
|
function uu(r, e) {
|
|
5319
5331
|
if (!r)
|
|
@@ -5456,7 +5468,7 @@ var Wr = (
|
|
|
5456
5468
|
}(Wr)
|
|
5457
5469
|
), Wy = {
|
|
5458
5470
|
scaleMode: Kt.NEAREST,
|
|
5459
|
-
format:
|
|
5471
|
+
format: D.RGBA,
|
|
5460
5472
|
alphaMode: Yt.NPM
|
|
5461
5473
|
}, W = (
|
|
5462
5474
|
/** @class */
|
|
@@ -5467,7 +5479,7 @@ var Wr = (
|
|
|
5467
5479
|
var n = r.call(this) || this;
|
|
5468
5480
|
i = i || {};
|
|
5469
5481
|
var o = i.alphaMode, s = i.mipmap, a = i.anisotropicLevel, h = i.scaleMode, u = i.width, l = i.height, c = i.wrapMode, f = i.format, p = i.type, d = i.target, _ = i.resolution, y = i.resourceOptions;
|
|
5470
|
-
return t && !(t instanceof Wr) && (t = uu(t, y), t.internal = !0), n.resolution = _ ||
|
|
5482
|
+
return t && !(t instanceof Wr) && (t = uu(t, y), t.internal = !0), n.resolution = _ || N.RESOLUTION, n.width = Math.round((u || 0) * n.resolution) / n.resolution, n.height = Math.round((l || 0) * n.resolution) / n.resolution, n._mipmap = s !== void 0 ? s : N.MIPMAP_TEXTURES, n.anisotropicLevel = a !== void 0 ? a : N.ANISOTROPIC_LEVEL, n._wrapMode = c || N.WRAP_MODE, n._scaleMode = h !== void 0 ? h : N.SCALE_MODE, n.format = f || D.RGBA, n.type = p || G.UNSIGNED_BYTE, n.target = d || He.TEXTURE_2D, n.alphaMode = o !== void 0 ? o : Yt.UNPACK, n.uid = $e(), n.touched = 0, n.isPowerOfTwo = !1, n._refreshPOT(), n._glTextures = {}, n.dirtyId = 0, n.dirtyStyleId = 0, n.cacheId = null, n.valid = u > 0 && l > 0, n.textureCacheIds = [], n.destroyed = !1, n.resource = null, n._batchEnabled = 0, n._batchLocation = 0, n.parentTextureArray = null, n.setResource(t), n;
|
|
5471
5483
|
}
|
|
5472
5484
|
return Object.defineProperty(e.prototype, "realWidth", {
|
|
5473
5485
|
/**
|
|
@@ -5557,7 +5569,7 @@ var Wr = (
|
|
|
5557
5569
|
}, e.prototype.castToBaseTexture = function() {
|
|
5558
5570
|
return this;
|
|
5559
5571
|
}, e.from = function(t, i, n) {
|
|
5560
|
-
n === void 0 && (n =
|
|
5572
|
+
n === void 0 && (n = N.STRICT_TEXTURE_CACHE);
|
|
5561
5573
|
var o = typeof t == "string", s = null;
|
|
5562
5574
|
if (o)
|
|
5563
5575
|
s = t;
|
|
@@ -5770,7 +5782,7 @@ var Wr = (
|
|
|
5770
5782
|
var o = new Image();
|
|
5771
5783
|
Ae.crossOrigin(o, t, i.crossorigin), o.src = t, t = o;
|
|
5772
5784
|
}
|
|
5773
|
-
return n = r.call(this, t) || this, !t.complete && n._width && n._height && (n._width = 0, n._height = 0), n.url = t.src, n._process = null, n.preserveBitmap = !1, n.createBitmap = (i.createBitmap !== void 0 ? i.createBitmap :
|
|
5785
|
+
return n = r.call(this, t) || this, !t.complete && n._width && n._height && (n._width = 0, n._height = 0), n.url = t.src, n._process = null, n.preserveBitmap = !1, n.createBitmap = (i.createBitmap !== void 0 ? i.createBitmap : N.CREATE_IMAGE_BITMAP) && !!globalThis.createImageBitmap, n.alphaMode = typeof i.alphaMode == "number" ? i.alphaMode : null, n.bitmap = null, n._load = null, i.autoLoad !== !1 && n.load(), n;
|
|
5774
5786
|
}
|
|
5775
5787
|
return e.prototype.load = function(t) {
|
|
5776
5788
|
var i = this;
|
|
@@ -5831,7 +5843,7 @@ var Wr = (
|
|
|
5831
5843
|
rt(e, r);
|
|
5832
5844
|
function e(t, i) {
|
|
5833
5845
|
var n = this;
|
|
5834
|
-
return i = i || {}, n = r.call(this,
|
|
5846
|
+
return i = i || {}, n = r.call(this, N.ADAPTER.createCanvas()) || this, n._width = 0, n._height = 0, n.svg = t, n.scale = i.scale || 1, n._overrideWidth = i.width, n._overrideHeight = i.height, n._resolve = null, n._crossorigin = i.crossorigin, n._load = null, i.autoLoad !== !1 && n.load(), n;
|
|
5835
5847
|
}
|
|
5836
5848
|
return e.prototype.load = function() {
|
|
5837
5849
|
var t = this;
|
|
@@ -6013,7 +6025,7 @@ var tm = (
|
|
|
6013
6025
|
width: this.width,
|
|
6014
6026
|
height: this.height,
|
|
6015
6027
|
mipmap: Ht.OFF,
|
|
6016
|
-
format:
|
|
6028
|
+
format: D.DEPTH_COMPONENT,
|
|
6017
6029
|
type: G.UNSIGNED_SHORT
|
|
6018
6030
|
}), this.dirtyId++, this.dirtyFormat++, this;
|
|
6019
6031
|
}, r.prototype.enableDepth = function() {
|
|
@@ -6122,7 +6134,7 @@ var X = (
|
|
|
6122
6134
|
}, e.prototype.updateUvs = function() {
|
|
6123
6135
|
this._uvs === Aa && (this._uvs = new pu()), this._uvs.set(this._frame, this.baseTexture, this.rotate), this._updateID++;
|
|
6124
6136
|
}, e.from = function(t, i, n) {
|
|
6125
|
-
i === void 0 && (i = {}), n === void 0 && (n =
|
|
6137
|
+
i === void 0 && (i = {}), n === void 0 && (n = N.STRICT_TEXTURE_CACHE);
|
|
6126
6138
|
var o = typeof t == "string", s = null;
|
|
6127
6139
|
if (o)
|
|
6128
6140
|
s = t;
|
|
@@ -6152,7 +6164,7 @@ var X = (
|
|
|
6152
6164
|
return new e(W.fromBuffer(t, i, n, o));
|
|
6153
6165
|
}, e.fromLoader = function(t, i, n, o) {
|
|
6154
6166
|
var s = new W(t, Object.assign({
|
|
6155
|
-
scaleMode:
|
|
6167
|
+
scaleMode: N.SCALE_MODE,
|
|
6156
6168
|
resolution: tn(i)
|
|
6157
6169
|
}, o)), a = s.resource;
|
|
6158
6170
|
a instanceof cu && (a.url = i);
|
|
@@ -6249,7 +6261,7 @@ var X = (
|
|
|
6249
6261
|
/** A white texture of 16x16 size, used for graphics and other things Can not be destroyed. */
|
|
6250
6262
|
get: function() {
|
|
6251
6263
|
if (!e._WHITE) {
|
|
6252
|
-
var t =
|
|
6264
|
+
var t = N.ADAPTER.createCanvas(16, 16), i = t.getContext("2d");
|
|
6253
6265
|
t.width = 16, t.height = 16, i.fillStyle = "white", i.fillRect(0, 0, 16, 16), e._WHITE = new e(W.from(t)), _i(e._WHITE), _i(e._WHITE.baseTexture);
|
|
6254
6266
|
}
|
|
6255
6267
|
return e._WHITE;
|
|
@@ -6779,7 +6791,7 @@ var Ra = { 5126: 4, 5123: 2, 5121: 1 }, om = 0, sm = {
|
|
|
6779
6791
|
this.initFromContext(t);
|
|
6780
6792
|
}, r.prototype.createContext = function(e, t) {
|
|
6781
6793
|
var i;
|
|
6782
|
-
if (
|
|
6794
|
+
if (N.PREFER_ENV >= he.WEBGL2 && (i = e.getContext("webgl2", t)), i)
|
|
6783
6795
|
this.webGLVersion = 2;
|
|
6784
6796
|
else if (this.webGLVersion = 1, i = e.getContext("webgl", t) || e.getContext("experimental-webgl", t), !i)
|
|
6785
6797
|
throw new Error("This browser does not support WebGL. Try using the canvas renderer");
|
|
@@ -6849,7 +6861,7 @@ var Ra = { 5126: 4, 5123: 2, 5121: 1 }, om = 0, sm = {
|
|
|
6849
6861
|
var e = this.gl = this.renderer.gl;
|
|
6850
6862
|
if (this.CONTEXT_UID = this.renderer.CONTEXT_UID, this.current = this.unknownFramebuffer, this.viewport = new $(), this.hasMRT = !0, this.writeDepthTexture = !0, this.renderer.context.webGLVersion === 1) {
|
|
6851
6863
|
var t = this.renderer.context.extensions.drawBuffers, i = this.renderer.context.extensions.depthTexture;
|
|
6852
|
-
|
|
6864
|
+
N.PREFER_ENV === he.WEBGL_LEGACY && (t = null, i = null), t ? e.drawBuffers = function(n) {
|
|
6853
6865
|
return t.drawBuffersWEBGL(n);
|
|
6854
6866
|
} : (this.hasMRT = !1, e.drawBuffers = function() {
|
|
6855
6867
|
}), i || (this.writeDepthTexture = !1);
|
|
@@ -6988,7 +7000,7 @@ var Ra = { 5126: 4, 5123: 2, 5121: 1 }, om = 0, sm = {
|
|
|
6988
7000
|
var e = this.gl = this.renderer.gl, t = this.renderer.context;
|
|
6989
7001
|
if (this.CONTEXT_UID = this.renderer.CONTEXT_UID, t.webGLVersion !== 2) {
|
|
6990
7002
|
var i = this.renderer.context.extensions.vertexArrayObject;
|
|
6991
|
-
|
|
7003
|
+
N.PREFER_ENV === he.WEBGL_LEGACY && (i = null), i ? (e.createVertexArray = function() {
|
|
6992
7004
|
return i.createVertexArrayOES();
|
|
6993
7005
|
}, e.bindVertexArray = function(o) {
|
|
6994
7006
|
return i.bindVertexArrayOES(o);
|
|
@@ -7116,7 +7128,7 @@ var Ra = { 5126: 4, 5123: 2, 5121: 1 }, om = 0, sm = {
|
|
|
7116
7128
|
/** @class */
|
|
7117
7129
|
function() {
|
|
7118
7130
|
function r(e) {
|
|
7119
|
-
e === void 0 && (e = null), this.type = vt.NONE, this.autoDetect = !0, this.maskObject = e || null, this.pooled = !1, this.isMaskData = !0, this.resolution = null, this.multisample =
|
|
7131
|
+
e === void 0 && (e = null), this.type = vt.NONE, this.autoDetect = !0, this.maskObject = e || null, this.pooled = !1, this.isMaskData = !0, this.resolution = null, this.multisample = N.FILTER_MULTISAMPLE, this.enabled = !0, this.colorMask = 15, this._filters = null, this._stencilCounter = 0, this._scissorCounter = 0, this._scissorRect = null, this._scissorRectLocal = null, this._colorMask = 15, this._target = null;
|
|
7120
7132
|
}
|
|
7121
7133
|
return Object.defineProperty(r.prototype, "filter", {
|
|
7122
7134
|
/**
|
|
@@ -7163,7 +7175,7 @@ function Ia(r, e) {
|
|
|
7163
7175
|
function vm(r, e, t, i) {
|
|
7164
7176
|
r.getProgramParameter(e, r.LINK_STATUS) || (r.getShaderParameter(t, r.COMPILE_STATUS) || Ia(r, t), r.getShaderParameter(i, r.COMPILE_STATUS) || Ia(r, i), console.error("PixiJS Error: Could not initialize shader."), r.getProgramInfoLog(e) !== "" && console.warn("PixiJS Warning: gl.getProgramInfoLog()", r.getProgramInfoLog(e)));
|
|
7165
7177
|
}
|
|
7166
|
-
function
|
|
7178
|
+
function Fn(r) {
|
|
7167
7179
|
for (var e = new Array(r), t = 0; t < e.length; t++)
|
|
7168
7180
|
e[t] = !1;
|
|
7169
7181
|
return e;
|
|
@@ -7198,11 +7210,11 @@ function _u(r, e) {
|
|
|
7198
7210
|
case "bool":
|
|
7199
7211
|
return !1;
|
|
7200
7212
|
case "bvec2":
|
|
7201
|
-
return
|
|
7213
|
+
return Fn(2 * e);
|
|
7202
7214
|
case "bvec3":
|
|
7203
|
-
return
|
|
7215
|
+
return Fn(3 * e);
|
|
7204
7216
|
case "bvec4":
|
|
7205
|
-
return
|
|
7217
|
+
return Fn(4 * e);
|
|
7206
7218
|
case "mat2":
|
|
7207
7219
|
return new Float32Array([
|
|
7208
7220
|
1,
|
|
@@ -7247,8 +7259,8 @@ function _u(r, e) {
|
|
|
7247
7259
|
var yu = {}, Or = yu;
|
|
7248
7260
|
function gm() {
|
|
7249
7261
|
if (Or === yu || Or && Or.isContextLost()) {
|
|
7250
|
-
var r =
|
|
7251
|
-
|
|
7262
|
+
var r = N.ADAPTER.createCanvas(), e = void 0;
|
|
7263
|
+
N.PREFER_ENV >= he.WEBGL2 && (e = r.getContext("webgl2", {})), e || (e = r.getContext("webgl", {}) || r.getContext("experimental-webgl", {}), e ? e.getExtension("WEBGL_draw_buffers") : e = null), Or = e;
|
|
7252
7264
|
}
|
|
7253
7265
|
return Or;
|
|
7254
7266
|
}
|
|
@@ -7777,7 +7789,7 @@ void main(void){
|
|
|
7777
7789
|
function r(e, t, i) {
|
|
7778
7790
|
i === void 0 && (i = "pixi-shader"), this.id = Mm++, this.vertexSrc = e || r.defaultVertexSrc, this.fragmentSrc = t || r.defaultFragmentSrc, this.vertexSrc = this.vertexSrc.trim(), this.fragmentSrc = this.fragmentSrc.trim(), this.vertexSrc.substring(0, 8) !== "#version" && (i = i.replace(/\s+/g, "-"), gi[i] ? (gi[i]++, i += "-" + gi[i]) : gi[i] = 1, this.vertexSrc = "#define SHADER_NAME " + i + `
|
|
7779
7791
|
` + this.vertexSrc, this.fragmentSrc = "#define SHADER_NAME " + i + `
|
|
7780
|
-
` + this.fragmentSrc, this.vertexSrc = Pa(this.vertexSrc,
|
|
7792
|
+
` + this.fragmentSrc, this.vertexSrc = Pa(this.vertexSrc, N.PRECISION_VERTEX, Ct.HIGH), this.fragmentSrc = Pa(this.fragmentSrc, N.PRECISION_FRAGMENT, bm())), this.glPrograms = {}, this.syncUniforms = null;
|
|
7781
7793
|
}
|
|
7782
7794
|
return Object.defineProperty(r, "defaultVertexSrc", {
|
|
7783
7795
|
/**
|
|
@@ -7836,7 +7848,7 @@ void main(void){
|
|
|
7836
7848
|
return new r(n, i);
|
|
7837
7849
|
}, r;
|
|
7838
7850
|
}()
|
|
7839
|
-
),
|
|
7851
|
+
), Nn = 0, Ln = 1, Bn = 2, Gn = 3, Un = 4, kn = 5, Je = (
|
|
7840
7852
|
/** @class */
|
|
7841
7853
|
function() {
|
|
7842
7854
|
function r() {
|
|
@@ -7848,10 +7860,10 @@ void main(void){
|
|
|
7848
7860
|
* @default true
|
|
7849
7861
|
*/
|
|
7850
7862
|
get: function() {
|
|
7851
|
-
return !!(this.data & 1 <<
|
|
7863
|
+
return !!(this.data & 1 << Nn);
|
|
7852
7864
|
},
|
|
7853
7865
|
set: function(e) {
|
|
7854
|
-
!!(this.data & 1 <<
|
|
7866
|
+
!!(this.data & 1 << Nn) !== e && (this.data ^= 1 << Nn);
|
|
7855
7867
|
},
|
|
7856
7868
|
enumerable: !1,
|
|
7857
7869
|
configurable: !0
|
|
@@ -7993,7 +8005,7 @@ void main(void)
|
|
|
7993
8005
|
rt(e, r);
|
|
7994
8006
|
function e(t, i, n) {
|
|
7995
8007
|
var o = this, s = ii.from(t || e.defaultVertexSrc, i || e.defaultFragmentSrc);
|
|
7996
|
-
return o = r.call(this, s, n) || this, o.padding = 0, o.resolution =
|
|
8008
|
+
return o = r.call(this, s, n) || this, o.padding = 0, o.resolution = N.FILTER_RESOLUTION, o.multisample = N.FILTER_MULTISAMPLE, o.enabled = !0, o.autoFit = !0, o.state = new Je(), o;
|
|
7997
8009
|
}
|
|
7998
8010
|
return e.prototype.apply = function(t, i, n, o, s) {
|
|
7999
8011
|
t.applyFilter(this, i, n, o);
|
|
@@ -8045,7 +8057,7 @@ void main(void)
|
|
|
8045
8057
|
configurable: !0
|
|
8046
8058
|
}), e;
|
|
8047
8059
|
}(Te)
|
|
8048
|
-
),
|
|
8060
|
+
), Fm = `attribute vec2 aVertexPosition;
|
|
8049
8061
|
attribute vec2 aTextureCoord;
|
|
8050
8062
|
|
|
8051
8063
|
uniform mat3 projectionMatrix;
|
|
@@ -8061,7 +8073,7 @@ void main(void)
|
|
|
8061
8073
|
vTextureCoord = aTextureCoord;
|
|
8062
8074
|
vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
|
|
8063
8075
|
}
|
|
8064
|
-
`,
|
|
8076
|
+
`, Nm = `varying vec2 vMaskCoord;
|
|
8065
8077
|
varying vec2 vTextureCoord;
|
|
8066
8078
|
|
|
8067
8079
|
uniform sampler2D uSampler;
|
|
@@ -8128,7 +8140,7 @@ void main(void)
|
|
|
8128
8140
|
rt(e, r);
|
|
8129
8141
|
function e(t, i, n) {
|
|
8130
8142
|
var o = this, s = null;
|
|
8131
|
-
return typeof t != "string" && i === void 0 && n === void 0 && (s = t, t = void 0, i = void 0, n = void 0), o = r.call(this, t ||
|
|
8143
|
+
return typeof t != "string" && i === void 0 && n === void 0 && (s = t, t = void 0, i = void 0, n = void 0), o = r.call(this, t || Fm, i || Nm, n) || this, o.maskSprite = s, o.maskMatrix = new bt(), o;
|
|
8132
8144
|
}
|
|
8133
8145
|
return Object.defineProperty(e.prototype, "maskSprite", {
|
|
8134
8146
|
/**
|
|
@@ -8247,13 +8259,13 @@ void main(void)
|
|
|
8247
8259
|
this.renderer = null, this.maskStack = null;
|
|
8248
8260
|
}, r;
|
|
8249
8261
|
}()
|
|
8250
|
-
), Ca = new bt(),
|
|
8262
|
+
), Ca = new bt(), Fa = [], Gm = (
|
|
8251
8263
|
/** @class */
|
|
8252
8264
|
function(r) {
|
|
8253
8265
|
rt(e, r);
|
|
8254
8266
|
function e(t) {
|
|
8255
8267
|
var i = r.call(this, t) || this;
|
|
8256
|
-
return i.glConst =
|
|
8268
|
+
return i.glConst = N.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST, i;
|
|
8257
8269
|
}
|
|
8258
8270
|
return e.prototype.getStackLength = function() {
|
|
8259
8271
|
var t = this.maskStack[this.maskStack.length - 1];
|
|
@@ -8261,7 +8273,7 @@ void main(void)
|
|
|
8261
8273
|
}, e.prototype.calcScissorRect = function(t) {
|
|
8262
8274
|
var i;
|
|
8263
8275
|
if (!t._scissorRectLocal) {
|
|
8264
|
-
var n = t._scissorRect, o = t.maskObject, s = this.renderer, a = s.renderTexture, h = o.getBounds(!0, (i =
|
|
8276
|
+
var n = t._scissorRect, o = t.maskObject, s = this.renderer, a = s.renderTexture, h = o.getBounds(!0, (i = Fa.pop()) !== null && i !== void 0 ? i : new $());
|
|
8265
8277
|
this.roundFrameToPixels(h, a.current ? a.current.resolution : s.resolution, a.sourceFrame, a.destinationFrame, s.projection.transform), n && h.fit(n), t._scissorRectLocal = h;
|
|
8266
8278
|
}
|
|
8267
8279
|
}, e.isMatrixRotated = function(t) {
|
|
@@ -8284,7 +8296,7 @@ void main(void)
|
|
|
8284
8296
|
t._scissorRect || i.enable(i.SCISSOR_TEST), t._scissorCounter++, t._scissorRect = t._scissorRectLocal, this._useCurrent();
|
|
8285
8297
|
}, e.prototype.pop = function(t) {
|
|
8286
8298
|
var i = this.renderer.gl;
|
|
8287
|
-
t &&
|
|
8299
|
+
t && Fa.push(t._scissorRectLocal), this.getStackLength() > 0 ? this._useCurrent() : i.disable(i.SCISSOR_TEST);
|
|
8288
8300
|
}, e.prototype._useCurrent = function() {
|
|
8289
8301
|
var t = this.maskStack[this.maskStack.length - 1]._scissorRect, i;
|
|
8290
8302
|
this.renderer.renderTexture.current ? i = t.y : i = this.renderer.height - t.height - t.y, this.renderer.gl.scissor(t.x, i, t.width, t.height);
|
|
@@ -8296,7 +8308,7 @@ void main(void)
|
|
|
8296
8308
|
rt(e, r);
|
|
8297
8309
|
function e(t) {
|
|
8298
8310
|
var i = r.call(this, t) || this;
|
|
8299
|
-
return i.glConst =
|
|
8311
|
+
return i.glConst = N.ADAPTER.getWebGLRenderingContext().STENCIL_TEST, i;
|
|
8300
8312
|
}
|
|
8301
8313
|
return e.prototype.getStackLength = function() {
|
|
8302
8314
|
var t = this.maskStack[this.maskStack.length - 1];
|
|
@@ -8713,7 +8725,7 @@ var tv = 0, ev = 1, rv = 2, iv = 3, nv = 4, ov = 5, sv = (
|
|
|
8713
8725
|
/** @class */
|
|
8714
8726
|
function() {
|
|
8715
8727
|
function r(e) {
|
|
8716
|
-
this.renderer = e, this.count = 0, this.checkCount = 0, this.maxIdle =
|
|
8728
|
+
this.renderer = e, this.count = 0, this.checkCount = 0, this.maxIdle = N.GC_MAX_IDLE, this.checkCountMax = N.GC_MAX_CHECK_COUNT, this.mode = N.GC_MODE;
|
|
8717
8729
|
}
|
|
8718
8730
|
return r.prototype.postrender = function() {
|
|
8719
8731
|
this.renderer.renderingToScreen && (this.count++, this.mode !== zi.MANUAL && (this.checkCount++, this.checkCount > this.checkCountMax && (this.checkCount = 0, this.run())));
|
|
@@ -8738,14 +8750,14 @@ var tv = 0, ev = 1, rv = 2, iv = 3, nv = 4, ov = 5, sv = (
|
|
|
8738
8750
|
}()
|
|
8739
8751
|
);
|
|
8740
8752
|
function hv(r) {
|
|
8741
|
-
var e, t, i, n, o, s, a, h, u, l, c, f, p, d, _, y, m, v, g,
|
|
8742
|
-
return "WebGL2RenderingContext" in globalThis && r instanceof globalThis.WebGL2RenderingContext ? E = (e = {}, e[G.UNSIGNED_BYTE] = (t = {}, t[
|
|
8753
|
+
var e, t, i, n, o, s, a, h, u, l, c, f, p, d, _, y, m, v, g, x, b, T, E;
|
|
8754
|
+
return "WebGL2RenderingContext" in globalThis && r instanceof globalThis.WebGL2RenderingContext ? E = (e = {}, e[G.UNSIGNED_BYTE] = (t = {}, t[D.RGBA] = r.RGBA8, t[D.RGB] = r.RGB8, t[D.RG] = r.RG8, t[D.RED] = r.R8, t[D.RGBA_INTEGER] = r.RGBA8UI, t[D.RGB_INTEGER] = r.RGB8UI, t[D.RG_INTEGER] = r.RG8UI, t[D.RED_INTEGER] = r.R8UI, t[D.ALPHA] = r.ALPHA, t[D.LUMINANCE] = r.LUMINANCE, t[D.LUMINANCE_ALPHA] = r.LUMINANCE_ALPHA, t), e[G.BYTE] = (i = {}, i[D.RGBA] = r.RGBA8_SNORM, i[D.RGB] = r.RGB8_SNORM, i[D.RG] = r.RG8_SNORM, i[D.RED] = r.R8_SNORM, i[D.RGBA_INTEGER] = r.RGBA8I, i[D.RGB_INTEGER] = r.RGB8I, i[D.RG_INTEGER] = r.RG8I, i[D.RED_INTEGER] = r.R8I, i), e[G.UNSIGNED_SHORT] = (n = {}, n[D.RGBA_INTEGER] = r.RGBA16UI, n[D.RGB_INTEGER] = r.RGB16UI, n[D.RG_INTEGER] = r.RG16UI, n[D.RED_INTEGER] = r.R16UI, n[D.DEPTH_COMPONENT] = r.DEPTH_COMPONENT16, n), e[G.SHORT] = (o = {}, o[D.RGBA_INTEGER] = r.RGBA16I, o[D.RGB_INTEGER] = r.RGB16I, o[D.RG_INTEGER] = r.RG16I, o[D.RED_INTEGER] = r.R16I, o), e[G.UNSIGNED_INT] = (s = {}, s[D.RGBA_INTEGER] = r.RGBA32UI, s[D.RGB_INTEGER] = r.RGB32UI, s[D.RG_INTEGER] = r.RG32UI, s[D.RED_INTEGER] = r.R32UI, s[D.DEPTH_COMPONENT] = r.DEPTH_COMPONENT24, s), e[G.INT] = (a = {}, a[D.RGBA_INTEGER] = r.RGBA32I, a[D.RGB_INTEGER] = r.RGB32I, a[D.RG_INTEGER] = r.RG32I, a[D.RED_INTEGER] = r.R32I, a), e[G.FLOAT] = (h = {}, h[D.RGBA] = r.RGBA32F, h[D.RGB] = r.RGB32F, h[D.RG] = r.RG32F, h[D.RED] = r.R32F, h[D.DEPTH_COMPONENT] = r.DEPTH_COMPONENT32F, h), e[G.HALF_FLOAT] = (u = {}, u[D.RGBA] = r.RGBA16F, u[D.RGB] = r.RGB16F, u[D.RG] = r.RG16F, u[D.RED] = r.R16F, u), e[G.UNSIGNED_SHORT_5_6_5] = (l = {}, l[D.RGB] = r.RGB565, l), e[G.UNSIGNED_SHORT_4_4_4_4] = (c = {}, c[D.RGBA] = r.RGBA4, c), e[G.UNSIGNED_SHORT_5_5_5_1] = (f = {}, f[D.RGBA] = r.RGB5_A1, f), e[G.UNSIGNED_INT_2_10_10_10_REV] = (p = {}, p[D.RGBA] = r.RGB10_A2, p[D.RGBA_INTEGER] = r.RGB10_A2UI, p), e[G.UNSIGNED_INT_10F_11F_11F_REV] = (d = {}, d[D.RGB] = r.R11F_G11F_B10F, d), e[G.UNSIGNED_INT_5_9_9_9_REV] = (_ = {}, _[D.RGB] = r.RGB9_E5, _), e[G.UNSIGNED_INT_24_8] = (y = {}, y[D.DEPTH_STENCIL] = r.DEPTH24_STENCIL8, y), e[G.FLOAT_32_UNSIGNED_INT_24_8_REV] = (m = {}, m[D.DEPTH_STENCIL] = r.DEPTH32F_STENCIL8, m), e) : E = (v = {}, v[G.UNSIGNED_BYTE] = (g = {}, g[D.RGBA] = r.RGBA, g[D.RGB] = r.RGB, g[D.ALPHA] = r.ALPHA, g[D.LUMINANCE] = r.LUMINANCE, g[D.LUMINANCE_ALPHA] = r.LUMINANCE_ALPHA, g), v[G.UNSIGNED_SHORT_5_6_5] = (x = {}, x[D.RGB] = r.RGB, x), v[G.UNSIGNED_SHORT_4_4_4_4] = (b = {}, b[D.RGBA] = r.RGBA, b), v[G.UNSIGNED_SHORT_5_5_5_1] = (T = {}, T[D.RGBA] = r.RGBA, T), v), E;
|
|
8743
8755
|
}
|
|
8744
8756
|
var Xn = (
|
|
8745
8757
|
/** @class */
|
|
8746
8758
|
/* @__PURE__ */ function() {
|
|
8747
8759
|
function r(e) {
|
|
8748
|
-
this.texture = e, this.width = -1, this.height = -1, this.dirtyId = -1, this.dirtyStyleId = -1, this.mipmap = !1, this.wrapMode = 33071, this.type = G.UNSIGNED_BYTE, this.internalFormat =
|
|
8760
|
+
this.texture = e, this.width = -1, this.height = -1, this.dirtyId = -1, this.dirtyStyleId = -1, this.mipmap = !1, this.wrapMode = 33071, this.type = G.UNSIGNED_BYTE, this.internalFormat = D.RGBA, this.samplerType = 0;
|
|
8749
8761
|
}
|
|
8750
8762
|
return r;
|
|
8751
8763
|
}()
|
|
@@ -8852,7 +8864,7 @@ var Xn = (
|
|
|
8852
8864
|
function e(t, i) {
|
|
8853
8865
|
t === void 0 && (t = Hr.UNKNOWN);
|
|
8854
8866
|
var n = r.call(this) || this;
|
|
8855
|
-
return i = Object.assign({},
|
|
8867
|
+
return i = Object.assign({}, N.RENDER_OPTIONS, i), n.options = i, n.type = t, n.screen = new $(0, 0, i.width, i.height), n.view = i.view || N.ADAPTER.createCanvas(), n.resolution = i.resolution || N.RESOLUTION, n.useContextAlpha = i.useContextAlpha, n.autoDensity = !!i.autoDensity, n.preserveDrawingBuffer = i.preserveDrawingBuffer, n.clearBeforeRender = i.clearBeforeRender, n._backgroundColor = 0, n._backgroundColorRgba = [0, 0, 0, 1], n._backgroundColorString = "#000000", n.backgroundColor = i.backgroundColor || n._backgroundColor, n.backgroundAlpha = i.backgroundAlpha, i.transparent !== void 0 && (jt("6.0.0", "Option transparent is deprecated, please use backgroundAlpha instead."), n.useContextAlpha = i.transparent, n.backgroundAlpha = i.transparent ? 0 : 1), n._lastObjectRendered = null, n.plugins = {}, n;
|
|
8856
8868
|
}
|
|
8857
8869
|
return e.prototype.initPlugins = function(t) {
|
|
8858
8870
|
for (var i in t)
|
|
@@ -9206,11 +9218,11 @@ void main(void)
|
|
|
9206
9218
|
rt(e, r);
|
|
9207
9219
|
function e(t) {
|
|
9208
9220
|
var i = r.call(this, t) || this;
|
|
9209
|
-
return i.shaderGenerator = null, i.geometryClass = null, i.vertexSize = null, i.state = Je.for2d(), i.size =
|
|
9221
|
+
return i.shaderGenerator = null, i.geometryClass = null, i.vertexSize = null, i.state = Je.for2d(), i.size = N.SPRITE_BATCH_SIZE * 4, i._vertexCount = 0, i._indexCount = 0, i._bufferedElements = [], i._bufferedTextures = [], i._bufferSize = 0, i._shader = null, i._packedGeometries = [], i._packedGeometryPoolSize = 2, i._flushId = 0, i._aBuffers = {}, i._iBuffers = {}, i.MAX_TEXTURES = 1, i.renderer.on("prerender", i.onPrerender, i), t.runners.contextChange.add(i), i._dcIndex = 0, i._aIndex = 0, i._iIndex = 0, i._attributeBuffer = null, i._indexBuffer = null, i._tempBoundTextures = [], i;
|
|
9210
9222
|
}
|
|
9211
9223
|
return e.prototype.contextChange = function() {
|
|
9212
9224
|
var t = this.renderer.gl;
|
|
9213
|
-
|
|
9225
|
+
N.PREFER_ENV === he.WEBGL_LEGACY ? this.MAX_TEXTURES = 1 : (this.MAX_TEXTURES = Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS), N.SPRITE_MAX_TEXTURES), this.MAX_TEXTURES = Om(this.MAX_TEXTURES, t)), this._shader = this.shaderGenerator.generateShader(this.MAX_TEXTURES);
|
|
9214
9226
|
for (var i = 0; i < this._packedGeometryPoolSize; i++)
|
|
9215
9227
|
this._packedGeometries[i] = new this.geometryClass();
|
|
9216
9228
|
this.initFlushBuffers();
|
|
@@ -9250,7 +9262,7 @@ void main(void)
|
|
|
9250
9262
|
t.count = 0;
|
|
9251
9263
|
}, e.prototype.updateGeometry = function() {
|
|
9252
9264
|
var t = this, i = t._packedGeometries, n = t._attributeBuffer, o = t._indexBuffer;
|
|
9253
|
-
|
|
9265
|
+
N.CAN_UPLOAD_SAME_BUFFER ? (i[this._flushId]._buffer.update(n.rawBinaryData), i[this._flushId]._indexBuffer.update(o), this.renderer.geometry.updateBuffers()) : (this._packedGeometryPoolSize <= this._flushId && (this._packedGeometryPoolSize++, i[this._flushId] = new this.geometryClass()), i[this._flushId]._buffer.update(n.rawBinaryData), i[this._flushId]._indexBuffer.update(o), this.renderer.geometry.bind(i[this._flushId]), this.renderer.geometry.updateBuffers(), this._flushId++);
|
|
9254
9266
|
}, e.prototype.drawBatches = function() {
|
|
9255
9267
|
for (var t = this._dcIndex, i = this.renderer, n = i.gl, o = i.state, s = e._drawCallPool, a = null, h = 0; h < t; h++) {
|
|
9256
9268
|
var u = s[h], l = u.texArray, c = u.type, f = u.size, p = u.start, d = u.blend;
|
|
@@ -9259,7 +9271,7 @@ void main(void)
|
|
|
9259
9271
|
}, e.prototype.flush = function() {
|
|
9260
9272
|
this._vertexCount !== 0 && (this._attributeBuffer = this.getAttributeBuffer(this._vertexCount), this._indexBuffer = this.getIndexBuffer(this._indexCount), this._aIndex = 0, this._iIndex = 0, this._dcIndex = 0, this.buildTexturesAndDrawCalls(), this.updateGeometry(), this.drawBatches(), this._bufferSize = 0, this._vertexCount = 0, this._indexCount = 0);
|
|
9261
9273
|
}, e.prototype.start = function() {
|
|
9262
|
-
this.renderer.state.set(this.state), this.renderer.texture.ensureSamplerType(this.MAX_TEXTURES), this.renderer.shader.bind(this._shader),
|
|
9274
|
+
this.renderer.state.set(this.state), this.renderer.texture.ensureSamplerType(this.MAX_TEXTURES), this.renderer.shader.bind(this._shader), N.CAN_UPLOAD_SAME_BUFFER && this.renderer.geometry.bind(this._packedGeometries[this._flushId]);
|
|
9263
9275
|
}, e.prototype.stop = function() {
|
|
9264
9276
|
this.flush();
|
|
9265
9277
|
}, e.prototype.destroy = function() {
|
|
@@ -9333,7 +9345,7 @@ else `), i < e - 1 && (t += "if(vTextureId < " + i + ".5)"), t += `
|
|
|
9333
9345
|
}
|
|
9334
9346
|
return e;
|
|
9335
9347
|
}(ri)
|
|
9336
|
-
),
|
|
9348
|
+
), Na = `precision highp float;
|
|
9337
9349
|
attribute vec2 aVertexPosition;
|
|
9338
9350
|
attribute vec2 aTextureCoord;
|
|
9339
9351
|
attribute vec4 aColor;
|
|
@@ -9371,7 +9383,7 @@ void main(void){
|
|
|
9371
9383
|
}
|
|
9372
9384
|
return r.create = function(e) {
|
|
9373
9385
|
var t = Object.assign({
|
|
9374
|
-
vertex:
|
|
9386
|
+
vertex: Na,
|
|
9375
9387
|
fragment: La,
|
|
9376
9388
|
geometryClass: Au,
|
|
9377
9389
|
vertexSize: 6
|
|
@@ -9393,7 +9405,7 @@ void main(void){
|
|
|
9393
9405
|
* @readonly
|
|
9394
9406
|
*/
|
|
9395
9407
|
get: function() {
|
|
9396
|
-
return
|
|
9408
|
+
return Na;
|
|
9397
9409
|
},
|
|
9398
9410
|
enumerable: !1,
|
|
9399
9411
|
configurable: !0
|
|
@@ -10091,7 +10103,7 @@ var Ti = 1, Ei = {
|
|
|
10091
10103
|
* @pixi/extract is licensed under the MIT License.
|
|
10092
10104
|
* http://www.opensource.org/licenses/mit-license
|
|
10093
10105
|
*/
|
|
10094
|
-
var Dv = new $(), Cv = 4,
|
|
10106
|
+
var Dv = new $(), Cv = 4, Fv = (
|
|
10095
10107
|
/** @class */
|
|
10096
10108
|
function() {
|
|
10097
10109
|
function r(e) {
|
|
@@ -10235,7 +10247,7 @@ function Ru(r, e) {
|
|
|
10235
10247
|
a && (n[t.q.name][a] = h);
|
|
10236
10248
|
}), n;
|
|
10237
10249
|
}
|
|
10238
|
-
var Yn, Si = null,
|
|
10250
|
+
var Yn, Si = null, Nv = 0, Xa = 200, Lv = 204, Bv = 1223, Gv = 2;
|
|
10239
10251
|
function ja() {
|
|
10240
10252
|
}
|
|
10241
10253
|
function Ha(r, e, t) {
|
|
@@ -10422,7 +10434,7 @@ var dt = (
|
|
|
10422
10434
|
this.abort(Vn(e) + " Request was aborted by the user.");
|
|
10423
10435
|
}, r.prototype._xhrOnLoad = function() {
|
|
10424
10436
|
var e = this.xhr, t = "", i = typeof e.status > "u" ? Xa : e.status;
|
|
10425
|
-
(e.responseType === "" || e.responseType === "text" || typeof e.responseType > "u") && (t = e.responseText), i ===
|
|
10437
|
+
(e.responseType === "" || e.responseType === "text" || typeof e.responseType > "u") && (t = e.responseText), i === Nv && (t.length > 0 || e.responseType === r.XHR_RESPONSE_TYPE.BUFFER) ? i = Xa : i === Bv && (i = Lv);
|
|
10426
10438
|
var n = i / 100 | 0;
|
|
10427
10439
|
if (n === Gv)
|
|
10428
10440
|
if (this.xhrType === r.XHR_RESPONSE_TYPE.TEXT)
|
|
@@ -11118,8 +11130,8 @@ var Kv = (
|
|
|
11118
11130
|
t(y.error);
|
|
11119
11131
|
return;
|
|
11120
11132
|
}
|
|
11121
|
-
var m = y.texture, v = m === void 0 ? null : m, g = y.textures,
|
|
11122
|
-
Object.assign(e, { texture: v, textures:
|
|
11133
|
+
var m = y.texture, v = m === void 0 ? null : m, g = y.textures, x = g === void 0 ? {} : g;
|
|
11134
|
+
Object.assign(e, { texture: v, textures: x }), t();
|
|
11123
11135
|
});
|
|
11124
11136
|
} else
|
|
11125
11137
|
t();
|
|
@@ -11127,7 +11139,7 @@ var Kv = (
|
|
|
11127
11139
|
/** Map of available texture extensions. */
|
|
11128
11140
|
get: function() {
|
|
11129
11141
|
if (!r._textureExtensions) {
|
|
11130
|
-
var e =
|
|
11142
|
+
var e = N.ADAPTER.createCanvas(), t = e.getContext("webgl");
|
|
11131
11143
|
if (!t)
|
|
11132
11144
|
return console.warn("WebGL not available for compressed textures. Silently failing."), {};
|
|
11133
11145
|
var i = {
|
|
@@ -11181,7 +11193,7 @@ function wu(r, e, t) {
|
|
|
11181
11193
|
W.addToCache(a, h), X.addToCache(o, h), s === 0 && (W.addToCache(a, r), X.addToCache(o, r), i.texture = o), i.textures[h] = o;
|
|
11182
11194
|
}), i;
|
|
11183
11195
|
}
|
|
11184
|
-
var Pr,
|
|
11196
|
+
var Pr, Nt, $n = 4, Ri = 124, Jv = 32, Ya = 20, Qv = 542327876, Oi = {
|
|
11185
11197
|
SIZE: 1,
|
|
11186
11198
|
FLAGS: 2,
|
|
11187
11199
|
HEIGHT: 3,
|
|
@@ -11207,13 +11219,13 @@ var Pr, Ft, $n = 4, Ri = 124, Jv = 32, Ya = 20, Qv = 542327876, Oi = {
|
|
|
11207
11219
|
(function(r) {
|
|
11208
11220
|
r[r.DXGI_FORMAT_UNKNOWN = 0] = "DXGI_FORMAT_UNKNOWN", r[r.DXGI_FORMAT_R32G32B32A32_TYPELESS = 1] = "DXGI_FORMAT_R32G32B32A32_TYPELESS", r[r.DXGI_FORMAT_R32G32B32A32_FLOAT = 2] = "DXGI_FORMAT_R32G32B32A32_FLOAT", r[r.DXGI_FORMAT_R32G32B32A32_UINT = 3] = "DXGI_FORMAT_R32G32B32A32_UINT", r[r.DXGI_FORMAT_R32G32B32A32_SINT = 4] = "DXGI_FORMAT_R32G32B32A32_SINT", r[r.DXGI_FORMAT_R32G32B32_TYPELESS = 5] = "DXGI_FORMAT_R32G32B32_TYPELESS", r[r.DXGI_FORMAT_R32G32B32_FLOAT = 6] = "DXGI_FORMAT_R32G32B32_FLOAT", r[r.DXGI_FORMAT_R32G32B32_UINT = 7] = "DXGI_FORMAT_R32G32B32_UINT", r[r.DXGI_FORMAT_R32G32B32_SINT = 8] = "DXGI_FORMAT_R32G32B32_SINT", r[r.DXGI_FORMAT_R16G16B16A16_TYPELESS = 9] = "DXGI_FORMAT_R16G16B16A16_TYPELESS", r[r.DXGI_FORMAT_R16G16B16A16_FLOAT = 10] = "DXGI_FORMAT_R16G16B16A16_FLOAT", r[r.DXGI_FORMAT_R16G16B16A16_UNORM = 11] = "DXGI_FORMAT_R16G16B16A16_UNORM", r[r.DXGI_FORMAT_R16G16B16A16_UINT = 12] = "DXGI_FORMAT_R16G16B16A16_UINT", r[r.DXGI_FORMAT_R16G16B16A16_SNORM = 13] = "DXGI_FORMAT_R16G16B16A16_SNORM", r[r.DXGI_FORMAT_R16G16B16A16_SINT = 14] = "DXGI_FORMAT_R16G16B16A16_SINT", r[r.DXGI_FORMAT_R32G32_TYPELESS = 15] = "DXGI_FORMAT_R32G32_TYPELESS", r[r.DXGI_FORMAT_R32G32_FLOAT = 16] = "DXGI_FORMAT_R32G32_FLOAT", r[r.DXGI_FORMAT_R32G32_UINT = 17] = "DXGI_FORMAT_R32G32_UINT", r[r.DXGI_FORMAT_R32G32_SINT = 18] = "DXGI_FORMAT_R32G32_SINT", r[r.DXGI_FORMAT_R32G8X24_TYPELESS = 19] = "DXGI_FORMAT_R32G8X24_TYPELESS", r[r.DXGI_FORMAT_D32_FLOAT_S8X24_UINT = 20] = "DXGI_FORMAT_D32_FLOAT_S8X24_UINT", r[r.DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS = 21] = "DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS", r[r.DXGI_FORMAT_X32_TYPELESS_G8X24_UINT = 22] = "DXGI_FORMAT_X32_TYPELESS_G8X24_UINT", r[r.DXGI_FORMAT_R10G10B10A2_TYPELESS = 23] = "DXGI_FORMAT_R10G10B10A2_TYPELESS", r[r.DXGI_FORMAT_R10G10B10A2_UNORM = 24] = "DXGI_FORMAT_R10G10B10A2_UNORM", r[r.DXGI_FORMAT_R10G10B10A2_UINT = 25] = "DXGI_FORMAT_R10G10B10A2_UINT", r[r.DXGI_FORMAT_R11G11B10_FLOAT = 26] = "DXGI_FORMAT_R11G11B10_FLOAT", r[r.DXGI_FORMAT_R8G8B8A8_TYPELESS = 27] = "DXGI_FORMAT_R8G8B8A8_TYPELESS", r[r.DXGI_FORMAT_R8G8B8A8_UNORM = 28] = "DXGI_FORMAT_R8G8B8A8_UNORM", r[r.DXGI_FORMAT_R8G8B8A8_UNORM_SRGB = 29] = "DXGI_FORMAT_R8G8B8A8_UNORM_SRGB", r[r.DXGI_FORMAT_R8G8B8A8_UINT = 30] = "DXGI_FORMAT_R8G8B8A8_UINT", r[r.DXGI_FORMAT_R8G8B8A8_SNORM = 31] = "DXGI_FORMAT_R8G8B8A8_SNORM", r[r.DXGI_FORMAT_R8G8B8A8_SINT = 32] = "DXGI_FORMAT_R8G8B8A8_SINT", r[r.DXGI_FORMAT_R16G16_TYPELESS = 33] = "DXGI_FORMAT_R16G16_TYPELESS", r[r.DXGI_FORMAT_R16G16_FLOAT = 34] = "DXGI_FORMAT_R16G16_FLOAT", r[r.DXGI_FORMAT_R16G16_UNORM = 35] = "DXGI_FORMAT_R16G16_UNORM", r[r.DXGI_FORMAT_R16G16_UINT = 36] = "DXGI_FORMAT_R16G16_UINT", r[r.DXGI_FORMAT_R16G16_SNORM = 37] = "DXGI_FORMAT_R16G16_SNORM", r[r.DXGI_FORMAT_R16G16_SINT = 38] = "DXGI_FORMAT_R16G16_SINT", r[r.DXGI_FORMAT_R32_TYPELESS = 39] = "DXGI_FORMAT_R32_TYPELESS", r[r.DXGI_FORMAT_D32_FLOAT = 40] = "DXGI_FORMAT_D32_FLOAT", r[r.DXGI_FORMAT_R32_FLOAT = 41] = "DXGI_FORMAT_R32_FLOAT", r[r.DXGI_FORMAT_R32_UINT = 42] = "DXGI_FORMAT_R32_UINT", r[r.DXGI_FORMAT_R32_SINT = 43] = "DXGI_FORMAT_R32_SINT", r[r.DXGI_FORMAT_R24G8_TYPELESS = 44] = "DXGI_FORMAT_R24G8_TYPELESS", r[r.DXGI_FORMAT_D24_UNORM_S8_UINT = 45] = "DXGI_FORMAT_D24_UNORM_S8_UINT", r[r.DXGI_FORMAT_R24_UNORM_X8_TYPELESS = 46] = "DXGI_FORMAT_R24_UNORM_X8_TYPELESS", r[r.DXGI_FORMAT_X24_TYPELESS_G8_UINT = 47] = "DXGI_FORMAT_X24_TYPELESS_G8_UINT", r[r.DXGI_FORMAT_R8G8_TYPELESS = 48] = "DXGI_FORMAT_R8G8_TYPELESS", r[r.DXGI_FORMAT_R8G8_UNORM = 49] = "DXGI_FORMAT_R8G8_UNORM", r[r.DXGI_FORMAT_R8G8_UINT = 50] = "DXGI_FORMAT_R8G8_UINT", r[r.DXGI_FORMAT_R8G8_SNORM = 51] = "DXGI_FORMAT_R8G8_SNORM", r[r.DXGI_FORMAT_R8G8_SINT = 52] = "DXGI_FORMAT_R8G8_SINT", r[r.DXGI_FORMAT_R16_TYPELESS = 53] = "DXGI_FORMAT_R16_TYPELESS", r[r.DXGI_FORMAT_R16_FLOAT = 54] = "DXGI_FORMAT_R16_FLOAT", r[r.DXGI_FORMAT_D16_UNORM = 55] = "DXGI_FORMAT_D16_UNORM", r[r.DXGI_FORMAT_R16_UNORM = 56] = "DXGI_FORMAT_R16_UNORM", r[r.DXGI_FORMAT_R16_UINT = 57] = "DXGI_FORMAT_R16_UINT", r[r.DXGI_FORMAT_R16_SNORM = 58] = "DXGI_FORMAT_R16_SNORM", r[r.DXGI_FORMAT_R16_SINT = 59] = "DXGI_FORMAT_R16_SINT", r[r.DXGI_FORMAT_R8_TYPELESS = 60] = "DXGI_FORMAT_R8_TYPELESS", r[r.DXGI_FORMAT_R8_UNORM = 61] = "DXGI_FORMAT_R8_UNORM", r[r.DXGI_FORMAT_R8_UINT = 62] = "DXGI_FORMAT_R8_UINT", r[r.DXGI_FORMAT_R8_SNORM = 63] = "DXGI_FORMAT_R8_SNORM", r[r.DXGI_FORMAT_R8_SINT = 64] = "DXGI_FORMAT_R8_SINT", r[r.DXGI_FORMAT_A8_UNORM = 65] = "DXGI_FORMAT_A8_UNORM", r[r.DXGI_FORMAT_R1_UNORM = 66] = "DXGI_FORMAT_R1_UNORM", r[r.DXGI_FORMAT_R9G9B9E5_SHAREDEXP = 67] = "DXGI_FORMAT_R9G9B9E5_SHAREDEXP", r[r.DXGI_FORMAT_R8G8_B8G8_UNORM = 68] = "DXGI_FORMAT_R8G8_B8G8_UNORM", r[r.DXGI_FORMAT_G8R8_G8B8_UNORM = 69] = "DXGI_FORMAT_G8R8_G8B8_UNORM", r[r.DXGI_FORMAT_BC1_TYPELESS = 70] = "DXGI_FORMAT_BC1_TYPELESS", r[r.DXGI_FORMAT_BC1_UNORM = 71] = "DXGI_FORMAT_BC1_UNORM", r[r.DXGI_FORMAT_BC1_UNORM_SRGB = 72] = "DXGI_FORMAT_BC1_UNORM_SRGB", r[r.DXGI_FORMAT_BC2_TYPELESS = 73] = "DXGI_FORMAT_BC2_TYPELESS", r[r.DXGI_FORMAT_BC2_UNORM = 74] = "DXGI_FORMAT_BC2_UNORM", r[r.DXGI_FORMAT_BC2_UNORM_SRGB = 75] = "DXGI_FORMAT_BC2_UNORM_SRGB", r[r.DXGI_FORMAT_BC3_TYPELESS = 76] = "DXGI_FORMAT_BC3_TYPELESS", r[r.DXGI_FORMAT_BC3_UNORM = 77] = "DXGI_FORMAT_BC3_UNORM", r[r.DXGI_FORMAT_BC3_UNORM_SRGB = 78] = "DXGI_FORMAT_BC3_UNORM_SRGB", r[r.DXGI_FORMAT_BC4_TYPELESS = 79] = "DXGI_FORMAT_BC4_TYPELESS", r[r.DXGI_FORMAT_BC4_UNORM = 80] = "DXGI_FORMAT_BC4_UNORM", r[r.DXGI_FORMAT_BC4_SNORM = 81] = "DXGI_FORMAT_BC4_SNORM", r[r.DXGI_FORMAT_BC5_TYPELESS = 82] = "DXGI_FORMAT_BC5_TYPELESS", r[r.DXGI_FORMAT_BC5_UNORM = 83] = "DXGI_FORMAT_BC5_UNORM", r[r.DXGI_FORMAT_BC5_SNORM = 84] = "DXGI_FORMAT_BC5_SNORM", r[r.DXGI_FORMAT_B5G6R5_UNORM = 85] = "DXGI_FORMAT_B5G6R5_UNORM", r[r.DXGI_FORMAT_B5G5R5A1_UNORM = 86] = "DXGI_FORMAT_B5G5R5A1_UNORM", r[r.DXGI_FORMAT_B8G8R8A8_UNORM = 87] = "DXGI_FORMAT_B8G8R8A8_UNORM", r[r.DXGI_FORMAT_B8G8R8X8_UNORM = 88] = "DXGI_FORMAT_B8G8R8X8_UNORM", r[r.DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM = 89] = "DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM", r[r.DXGI_FORMAT_B8G8R8A8_TYPELESS = 90] = "DXGI_FORMAT_B8G8R8A8_TYPELESS", r[r.DXGI_FORMAT_B8G8R8A8_UNORM_SRGB = 91] = "DXGI_FORMAT_B8G8R8A8_UNORM_SRGB", r[r.DXGI_FORMAT_B8G8R8X8_TYPELESS = 92] = "DXGI_FORMAT_B8G8R8X8_TYPELESS", r[r.DXGI_FORMAT_B8G8R8X8_UNORM_SRGB = 93] = "DXGI_FORMAT_B8G8R8X8_UNORM_SRGB", r[r.DXGI_FORMAT_BC6H_TYPELESS = 94] = "DXGI_FORMAT_BC6H_TYPELESS", r[r.DXGI_FORMAT_BC6H_UF16 = 95] = "DXGI_FORMAT_BC6H_UF16", r[r.DXGI_FORMAT_BC6H_SF16 = 96] = "DXGI_FORMAT_BC6H_SF16", r[r.DXGI_FORMAT_BC7_TYPELESS = 97] = "DXGI_FORMAT_BC7_TYPELESS", r[r.DXGI_FORMAT_BC7_UNORM = 98] = "DXGI_FORMAT_BC7_UNORM", r[r.DXGI_FORMAT_BC7_UNORM_SRGB = 99] = "DXGI_FORMAT_BC7_UNORM_SRGB", r[r.DXGI_FORMAT_AYUV = 100] = "DXGI_FORMAT_AYUV", r[r.DXGI_FORMAT_Y410 = 101] = "DXGI_FORMAT_Y410", r[r.DXGI_FORMAT_Y416 = 102] = "DXGI_FORMAT_Y416", r[r.DXGI_FORMAT_NV12 = 103] = "DXGI_FORMAT_NV12", r[r.DXGI_FORMAT_P010 = 104] = "DXGI_FORMAT_P010", r[r.DXGI_FORMAT_P016 = 105] = "DXGI_FORMAT_P016", r[r.DXGI_FORMAT_420_OPAQUE = 106] = "DXGI_FORMAT_420_OPAQUE", r[r.DXGI_FORMAT_YUY2 = 107] = "DXGI_FORMAT_YUY2", r[r.DXGI_FORMAT_Y210 = 108] = "DXGI_FORMAT_Y210", r[r.DXGI_FORMAT_Y216 = 109] = "DXGI_FORMAT_Y216", r[r.DXGI_FORMAT_NV11 = 110] = "DXGI_FORMAT_NV11", r[r.DXGI_FORMAT_AI44 = 111] = "DXGI_FORMAT_AI44", r[r.DXGI_FORMAT_IA44 = 112] = "DXGI_FORMAT_IA44", r[r.DXGI_FORMAT_P8 = 113] = "DXGI_FORMAT_P8", r[r.DXGI_FORMAT_A8P8 = 114] = "DXGI_FORMAT_A8P8", r[r.DXGI_FORMAT_B4G4R4A4_UNORM = 115] = "DXGI_FORMAT_B4G4R4A4_UNORM", r[r.DXGI_FORMAT_P208 = 116] = "DXGI_FORMAT_P208", r[r.DXGI_FORMAT_V208 = 117] = "DXGI_FORMAT_V208", r[r.DXGI_FORMAT_V408 = 118] = "DXGI_FORMAT_V408", r[r.DXGI_FORMAT_SAMPLER_FEEDBACK_MIN_MIP_OPAQUE = 119] = "DXGI_FORMAT_SAMPLER_FEEDBACK_MIN_MIP_OPAQUE", r[r.DXGI_FORMAT_SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE = 120] = "DXGI_FORMAT_SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE", r[r.DXGI_FORMAT_FORCE_UINT = 121] = "DXGI_FORMAT_FORCE_UINT";
|
|
11209
11221
|
})(Bt || (Bt = {}));
|
|
11210
|
-
var
|
|
11222
|
+
var Fo;
|
|
11211
11223
|
(function(r) {
|
|
11212
11224
|
r[r.DDS_DIMENSION_TEXTURE1D = 2] = "DDS_DIMENSION_TEXTURE1D", r[r.DDS_DIMENSION_TEXTURE2D = 3] = "DDS_DIMENSION_TEXTURE2D", r[r.DDS_DIMENSION_TEXTURE3D = 6] = "DDS_DIMENSION_TEXTURE3D";
|
|
11213
|
-
})(
|
|
11214
|
-
var eg = 1, rg = 2, ig = 4, ng = 64, og = 512, sg = 131072, ag = 827611204, hg = 861165636, ug = 894720068, lg = 808540228, cg = 4, fg = (Pr = {}, Pr[ag] = H.COMPRESSED_RGBA_S3TC_DXT1_EXT, Pr[hg] = H.COMPRESSED_RGBA_S3TC_DXT3_EXT, Pr[ug] = H.COMPRESSED_RGBA_S3TC_DXT5_EXT, Pr), pg = (
|
|
11215
|
-
|
|
11216
|
-
|
|
11225
|
+
})(Fo || (Fo = {}));
|
|
11226
|
+
var eg = 1, rg = 2, ig = 4, ng = 64, og = 512, sg = 131072, ag = 827611204, hg = 861165636, ug = 894720068, lg = 808540228, cg = 4, fg = (Pr = {}, Pr[ag] = H.COMPRESSED_RGBA_S3TC_DXT1_EXT, Pr[hg] = H.COMPRESSED_RGBA_S3TC_DXT3_EXT, Pr[ug] = H.COMPRESSED_RGBA_S3TC_DXT5_EXT, Pr), pg = (Nt = {}, // WEBGL_compressed_texture_s3tc
|
|
11227
|
+
Nt[Bt.DXGI_FORMAT_BC1_TYPELESS] = H.COMPRESSED_RGBA_S3TC_DXT1_EXT, Nt[Bt.DXGI_FORMAT_BC1_UNORM] = H.COMPRESSED_RGBA_S3TC_DXT1_EXT, Nt[Bt.DXGI_FORMAT_BC2_TYPELESS] = H.COMPRESSED_RGBA_S3TC_DXT3_EXT, Nt[Bt.DXGI_FORMAT_BC2_UNORM] = H.COMPRESSED_RGBA_S3TC_DXT3_EXT, Nt[Bt.DXGI_FORMAT_BC3_TYPELESS] = H.COMPRESSED_RGBA_S3TC_DXT5_EXT, Nt[Bt.DXGI_FORMAT_BC3_UNORM] = H.COMPRESSED_RGBA_S3TC_DXT5_EXT, // WEBGL_compressed_texture_s3tc_srgb
|
|
11228
|
+
Nt[Bt.DXGI_FORMAT_BC1_UNORM_SRGB] = H.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, Nt[Bt.DXGI_FORMAT_BC2_UNORM_SRGB] = H.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, Nt[Bt.DXGI_FORMAT_BC3_UNORM_SRGB] = H.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, Nt);
|
|
11217
11229
|
function dg(r) {
|
|
11218
11230
|
var e = new Uint32Array(r), t = e[0];
|
|
11219
11231
|
if (t !== Qv)
|
|
@@ -11231,27 +11243,27 @@ function dg(r) {
|
|
|
11231
11243
|
});
|
|
11232
11244
|
return [p];
|
|
11233
11245
|
}
|
|
11234
|
-
var d = $n + Ri, _ = new Uint32Array(e.buffer, d, Ya / Uint32Array.BYTES_PER_ELEMENT), y = _[wi.DXGI_FORMAT], m = _[wi.RESOURCE_DIMENSION], v = _[wi.MISC_FLAG], g = _[wi.ARRAY_SIZE],
|
|
11235
|
-
if (
|
|
11246
|
+
var d = $n + Ri, _ = new Uint32Array(e.buffer, d, Ya / Uint32Array.BYTES_PER_ELEMENT), y = _[wi.DXGI_FORMAT], m = _[wi.RESOURCE_DIMENSION], v = _[wi.MISC_FLAG], g = _[wi.ARRAY_SIZE], x = pg[y];
|
|
11247
|
+
if (x === void 0)
|
|
11236
11248
|
throw new Error("DDSParser cannot parse texture data with DXGI format " + y);
|
|
11237
11249
|
if (v === cg)
|
|
11238
11250
|
throw new Error("DDSParser does not support cubemap textures");
|
|
11239
|
-
if (m ===
|
|
11251
|
+
if (m === Fo.DDS_DIMENSION_TEXTURE3D)
|
|
11240
11252
|
throw new Error("DDSParser does not supported 3D texture data");
|
|
11241
|
-
var
|
|
11253
|
+
var b = new Array(), T = $n + Ri + Ya;
|
|
11242
11254
|
if (g === 1)
|
|
11243
|
-
|
|
11255
|
+
b.push(new Uint8Array(r, T));
|
|
11244
11256
|
else {
|
|
11245
|
-
for (var E = on[
|
|
11246
|
-
var
|
|
11257
|
+
for (var E = on[x], R = 0, A = o, S = n, M = 0; M < s; M++) {
|
|
11258
|
+
var F = Math.max(1, A + 3 & -4), L = Math.max(1, S + 3 & -4), O = F * L * E;
|
|
11247
11259
|
R += O, A = A >>> 1, S = S >>> 1;
|
|
11248
11260
|
}
|
|
11249
|
-
for (var I = T,
|
|
11250
|
-
|
|
11261
|
+
for (var I = T, M = 0; M < g; M++)
|
|
11262
|
+
b.push(new Uint8Array(r, I, R)), I += R;
|
|
11251
11263
|
}
|
|
11252
|
-
return
|
|
11264
|
+
return b.map(function(w) {
|
|
11253
11265
|
return new Co(w, {
|
|
11254
|
-
format:
|
|
11266
|
+
format: x,
|
|
11255
11267
|
width: o,
|
|
11256
11268
|
height: n,
|
|
11257
11269
|
levels: s
|
|
@@ -11275,7 +11287,7 @@ var _e, ie, Mr, Va = [171, 75, 84, 88, 32, 49, 49, 187, 13, 10, 26, 10], _g = 67
|
|
|
11275
11287
|
NUMBER_OF_FACES: 52,
|
|
11276
11288
|
NUMBER_OF_MIPMAP_LEVELS: 56,
|
|
11277
11289
|
BYTES_OF_KEY_VALUE_DATA: 60
|
|
11278
|
-
},
|
|
11290
|
+
}, No = 64, za = (_e = {}, _e[G.UNSIGNED_BYTE] = 1, _e[G.UNSIGNED_SHORT] = 2, _e[G.INT] = 4, _e[G.UNSIGNED_INT] = 4, _e[G.FLOAT] = 4, _e[G.HALF_FLOAT] = 8, _e), yg = (ie = {}, ie[D.RGBA] = 4, ie[D.RGB] = 3, ie[D.RG] = 2, ie[D.RED] = 1, ie[D.LUMINANCE] = 1, ie[D.LUMINANCE_ALPHA] = 2, ie[D.ALPHA] = 1, ie), mg = (Mr = {}, Mr[G.UNSIGNED_SHORT_4_4_4_4] = 2, Mr[G.UNSIGNED_SHORT_5_5_5_1] = 2, Mr[G.UNSIGNED_SHORT_5_6_5] = 2, Mr);
|
|
11279
11291
|
function vg(r, e, t) {
|
|
11280
11292
|
t === void 0 && (t = !1);
|
|
11281
11293
|
var i = new DataView(e);
|
|
@@ -11288,23 +11300,23 @@ function vg(r, e, t) {
|
|
|
11288
11300
|
throw new Error("CubeTextures are not supported by KTXLoader yet!");
|
|
11289
11301
|
if (c !== 1)
|
|
11290
11302
|
throw new Error("WebGL does not support array textures");
|
|
11291
|
-
var _ = 4, y = 4, m = h + 3 & -4, v = u + 3 & -4, g = new Array(c),
|
|
11292
|
-
o === 0 && (
|
|
11293
|
-
var
|
|
11294
|
-
if (o !== 0 ? za[o] ?
|
|
11303
|
+
var _ = 4, y = 4, m = h + 3 & -4, v = u + 3 & -4, g = new Array(c), x = h * u;
|
|
11304
|
+
o === 0 && (x = m * v);
|
|
11305
|
+
var b;
|
|
11306
|
+
if (o !== 0 ? za[o] ? b = za[o] * yg[s] : b = mg[o] : b = on[a], b === void 0)
|
|
11295
11307
|
throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");
|
|
11296
|
-
for (var T = t ? xg(i, d, n) : null, E =
|
|
11308
|
+
for (var T = t ? xg(i, d, n) : null, E = x * b, R = E, A = h, S = u, M = m, F = v, L = No + d, O = 0; O < p; O++) {
|
|
11297
11309
|
for (var I = i.getUint32(L, n), w = L + 4, B = 0; B < c; B++) {
|
|
11298
11310
|
var st = g[B];
|
|
11299
11311
|
st || (st = g[B] = new Array(p)), st[O] = {
|
|
11300
11312
|
levelID: O,
|
|
11301
11313
|
// don't align mipWidth when texture not compressed! (glType not zero)
|
|
11302
|
-
levelWidth: p > 1 || o !== 0 ? A :
|
|
11303
|
-
levelHeight: p > 1 || o !== 0 ? S :
|
|
11314
|
+
levelWidth: p > 1 || o !== 0 ? A : M,
|
|
11315
|
+
levelHeight: p > 1 || o !== 0 ? S : F,
|
|
11304
11316
|
levelBuffer: new Uint8Array(e, w, R)
|
|
11305
11317
|
}, w += R;
|
|
11306
11318
|
}
|
|
11307
|
-
L += I + 4, L = L % 4 !== 0 ? L + 4 - L % 4 : L, A = A >> 1 || 1, S = S >> 1 || 1,
|
|
11319
|
+
L += I + 4, L = L % 4 !== 0 ? L + 4 - L % 4 : L, A = A >> 1 || 1, S = S >> 1 || 1, M = A + _ - 1 & ~(_ - 1), F = S + y - 1 & ~(y - 1), R = M * F * b;
|
|
11308
11320
|
}
|
|
11309
11321
|
return o !== 0 ? {
|
|
11310
11322
|
uncompressed: g.map(function(j) {
|
|
@@ -11340,21 +11352,21 @@ function gg(r, e) {
|
|
|
11340
11352
|
}
|
|
11341
11353
|
function bg(r) {
|
|
11342
11354
|
switch (r) {
|
|
11343
|
-
case
|
|
11344
|
-
return
|
|
11345
|
-
case
|
|
11346
|
-
return
|
|
11347
|
-
case
|
|
11348
|
-
return
|
|
11349
|
-
case
|
|
11350
|
-
return
|
|
11355
|
+
case D.RGBA:
|
|
11356
|
+
return D.RGBA_INTEGER;
|
|
11357
|
+
case D.RGB:
|
|
11358
|
+
return D.RGB_INTEGER;
|
|
11359
|
+
case D.RG:
|
|
11360
|
+
return D.RG_INTEGER;
|
|
11361
|
+
case D.RED:
|
|
11362
|
+
return D.RED_INTEGER;
|
|
11351
11363
|
default:
|
|
11352
11364
|
return r;
|
|
11353
11365
|
}
|
|
11354
11366
|
}
|
|
11355
11367
|
function xg(r, e, t) {
|
|
11356
11368
|
for (var i = /* @__PURE__ */ new Map(), n = 0; n < e; ) {
|
|
11357
|
-
var o = r.getUint32(
|
|
11369
|
+
var o = r.getUint32(No + n, t), s = No + n + 4, a = 3 - (o + 3) % 4;
|
|
11358
11370
|
if (o === 0 || o > e - n) {
|
|
11359
11371
|
console.error("KTXLoader: keyAndValueByteSize out of bounds");
|
|
11360
11372
|
break;
|
|
@@ -11524,7 +11536,7 @@ var Wa = (
|
|
|
11524
11536
|
}
|
|
11525
11537
|
return r.prototype.initBuffers = function() {
|
|
11526
11538
|
var e = this.geometry, t = 0;
|
|
11527
|
-
this.indexBuffer = new gt(
|
|
11539
|
+
this.indexBuffer = new gt(Fy(this.size), !0, !0), e.addIndex(this.indexBuffer), this.dynamicStride = 0;
|
|
11528
11540
|
for (var i = 0; i < this.dynamicProperties.length; ++i) {
|
|
11529
11541
|
var n = this.dynamicProperties[i];
|
|
11530
11542
|
n.offset = t, t += n.size, this.dynamicStride += n.size;
|
|
@@ -11834,19 +11846,19 @@ var Mu = {
|
|
|
11834
11846
|
}
|
|
11835
11847
|
var _ = 0, y = p * 4 + (n ? 2 : 0) + 2, m = y, v = d;
|
|
11836
11848
|
{
|
|
11837
|
-
var g = n + s,
|
|
11838
|
-
if (e[_++] =
|
|
11839
|
-
var R = i -
|
|
11840
|
-
e[m++] = T, e[m++] = R, e[--v] = R, e[--v] =
|
|
11849
|
+
var g = n + s, x = o, b = t + g, T = t - g, E = i + x;
|
|
11850
|
+
if (e[_++] = b, e[_++] = E, e[--y] = E, e[--y] = T, o) {
|
|
11851
|
+
var R = i - x;
|
|
11852
|
+
e[m++] = T, e[m++] = R, e[--v] = R, e[--v] = b;
|
|
11841
11853
|
}
|
|
11842
11854
|
}
|
|
11843
11855
|
for (var A = 1; A < p; A++) {
|
|
11844
|
-
var S = Math.PI / 2 * (A / p), g = n + Math.cos(S) * s,
|
|
11845
|
-
e[_++] =
|
|
11856
|
+
var S = Math.PI / 2 * (A / p), g = n + Math.cos(S) * s, x = o + Math.sin(S) * a, b = t + g, T = t - g, E = i + x, R = i - x;
|
|
11857
|
+
e[_++] = b, e[_++] = E, e[--y] = E, e[--y] = T, e[m++] = T, e[m++] = R, e[--v] = R, e[--v] = b;
|
|
11846
11858
|
}
|
|
11847
11859
|
{
|
|
11848
|
-
var g = n,
|
|
11849
|
-
e[_++] =
|
|
11860
|
+
var g = n, x = o + a, b = t + g, T = t - g, E = i + x, R = i - x;
|
|
11861
|
+
e[_++] = b, e[_++] = E, e[--v] = R, e[--v] = b, n && (e[_++] = T, e[_++] = E, e[--v] = R, e[--v] = T);
|
|
11850
11862
|
}
|
|
11851
11863
|
}
|
|
11852
11864
|
},
|
|
@@ -11940,23 +11952,23 @@ function Ig(r, e) {
|
|
|
11940
11952
|
var l = (s.x + a.x) * 0.5, c = (a.y + s.y) * 0.5;
|
|
11941
11953
|
i.unshift(l, c), i.push(l, c);
|
|
11942
11954
|
}
|
|
11943
|
-
var f = e.points, p = i.length / 2, d = i.length, _ = f.length / 2, y = o.width / 2, m = y * y, v = o.miterLimit * o.miterLimit, g = i[0],
|
|
11955
|
+
var f = e.points, p = i.length / 2, d = i.length, _ = f.length / 2, y = o.width / 2, m = y * y, v = o.miterLimit * o.miterLimit, g = i[0], x = i[1], b = i[2], T = i[3], E = 0, R = 0, A = -(x - T), S = g - b, M = 0, F = 0, L = Math.sqrt(A * A + S * S);
|
|
11944
11956
|
A /= L, S /= L, A *= y, S *= y;
|
|
11945
11957
|
var O = o.alignment, I = (1 - O) * 2, w = O * 2;
|
|
11946
|
-
h || (o.cap === xe.ROUND ? d += Ce(g - A * (I - w) * 0.5,
|
|
11958
|
+
h || (o.cap === xe.ROUND ? d += Ce(g - A * (I - w) * 0.5, x - S * (I - w) * 0.5, g - A * I, x - S * I, g + A * w, x + S * w, f, !0) + 2 : o.cap === xe.SQUARE && (d += qa(g, x, A, S, I, w, !0, f))), f.push(g - A * I, x - S * I), f.push(g + A * w, x + S * w);
|
|
11947
11959
|
for (var B = 1; B < p - 1; ++B) {
|
|
11948
|
-
g = i[(B - 1) * 2],
|
|
11949
|
-
var st =
|
|
11960
|
+
g = i[(B - 1) * 2], x = i[(B - 1) * 2 + 1], b = i[B * 2], T = i[B * 2 + 1], E = i[(B + 1) * 2], R = i[(B + 1) * 2 + 1], A = -(x - T), S = g - b, L = Math.sqrt(A * A + S * S), A /= L, S /= L, A *= y, S *= y, M = -(T - R), F = b - E, L = Math.sqrt(M * M + F * F), M /= L, F /= L, M *= y, F *= y;
|
|
11961
|
+
var st = b - g, j = x - T, C = b - E, P = R - T, Y = st * C + j * P, q = j * C - P * st, K = q < 0;
|
|
11950
11962
|
if (Math.abs(q) < 1e-3 * Math.abs(Y)) {
|
|
11951
|
-
f.push(
|
|
11963
|
+
f.push(b - A * I, T - S * I), f.push(b + A * w, T + S * w), Y >= 0 && (o.join === ae.ROUND ? d += Ce(b, T, b - A * I, T - S * I, b - M * I, T - F * I, f, !1) + 4 : d += 2, f.push(b - M * w, T - F * w), f.push(b + M * I, T + F * I));
|
|
11952
11964
|
continue;
|
|
11953
11965
|
}
|
|
11954
|
-
var _t = (-A + g) * (-S + T) - (-A +
|
|
11955
|
-
Z ? o.join === ae.BEVEL || St / m > v ? (K ? (f.push(yt, tt), f.push(
|
|
11966
|
+
var _t = (-A + g) * (-S + T) - (-A + b) * (-S + x), at = (-M + E) * (-F + T) - (-M + b) * (-F + R), ht = (st * at - C * _t) / q, xt = (P * _t - j * at) / q, St = (ht - b) * (ht - b) + (xt - T) * (xt - T), yt = b + (ht - b) * I, tt = T + (xt - T) * I, it = b - (ht - b) * w, ut = T - (xt - T) * w, z = Math.min(st * st + j * j, C * C + P * P), Mt = K ? I : w, Dt = z + Mt * Mt * m, Z = St <= Dt;
|
|
11967
|
+
Z ? o.join === ae.BEVEL || St / m > v ? (K ? (f.push(yt, tt), f.push(b + A * w, T + S * w), f.push(yt, tt), f.push(b + M * w, T + F * w)) : (f.push(b - A * I, T - S * I), f.push(it, ut), f.push(b - M * I, T - F * I), f.push(it, ut)), d += 2) : o.join === ae.ROUND ? K ? (f.push(yt, tt), f.push(b + A * w, T + S * w), d += Ce(b, T, b + A * w, T + S * w, b + M * w, T + F * w, f, !0) + 4, f.push(yt, tt), f.push(b + M * w, T + F * w)) : (f.push(b - A * I, T - S * I), f.push(it, ut), d += Ce(b, T, b - A * I, T - S * I, b - M * I, T - F * I, f, !1) + 4, f.push(b - M * I, T - F * I), f.push(it, ut)) : (f.push(yt, tt), f.push(it, ut)) : (f.push(b - A * I, T - S * I), f.push(b + A * w, T + S * w), o.join === ae.ROUND ? K ? d += Ce(b, T, b + A * w, T + S * w, b + M * w, T + F * w, f, !0) + 2 : d += Ce(b, T, b - A * I, T - S * I, b - M * I, T - F * I, f, !1) + 2 : o.join === ae.MITER && St / m <= v && (K ? (f.push(it, ut), f.push(it, ut)) : (f.push(yt, tt), f.push(yt, tt)), d += 2), f.push(b - M * I, T - F * I), f.push(b + M * w, T + F * w), d += 2);
|
|
11956
11968
|
}
|
|
11957
|
-
g = i[(p - 2) * 2],
|
|
11969
|
+
g = i[(p - 2) * 2], x = i[(p - 2) * 2 + 1], b = i[(p - 1) * 2], T = i[(p - 1) * 2 + 1], A = -(x - T), S = g - b, L = Math.sqrt(A * A + S * S), A /= L, S /= L, A *= y, S *= y, f.push(b - A * I, T - S * I), f.push(b + A * w, T + S * w), h || (o.cap === xe.ROUND ? d += Ce(b - A * (I - w) * 0.5, T - S * (I - w) * 0.5, b - A * I, T - S * I, b + A * w, T + S * w, f, !1) + 2 : o.cap === xe.SQUARE && (d += qa(b, T, A, S, I, w, !1, f)));
|
|
11958
11970
|
for (var Wt = e.indices, Qe = $r.epsilon * $r.epsilon, B = _; B < d + _ - 2; ++B)
|
|
11959
|
-
g = f[B * 2],
|
|
11971
|
+
g = f[B * 2], x = f[B * 2 + 1], b = f[(B + 1) * 2], T = f[(B + 1) * 2 + 1], E = f[(B + 2) * 2], R = f[(B + 2) * 2 + 1], !(Math.abs(g * (T - R) + b * (R - x) + E * (x - T)) < Qe) && Wt.push(B, B + 1, B + 2);
|
|
11960
11972
|
}
|
|
11961
11973
|
}
|
|
11962
11974
|
function Pg(r, e) {
|
|
@@ -11980,19 +11992,19 @@ var Za = (
|
|
|
11980
11992
|
var a = s[s.length - 2], h = s[s.length - 1], u = h - t, l = a - e, c = n - t, f = i - e, p = Math.abs(u * f - l * c);
|
|
11981
11993
|
if (p < 1e-8 || o === 0)
|
|
11982
11994
|
return (s[s.length - 2] !== e || s[s.length - 1] !== t) && s.push(e, t), null;
|
|
11983
|
-
var d = u * u + l * l, _ = c * c + f * f, y = u * c + l * f, m = o * Math.sqrt(d) / p, v = o * Math.sqrt(_) / p, g = m * y / d,
|
|
11995
|
+
var d = u * u + l * l, _ = c * c + f * f, y = u * c + l * f, m = o * Math.sqrt(d) / p, v = o * Math.sqrt(_) / p, g = m * y / d, x = v * y / _, b = m * f + v * l, T = m * c + v * u, E = l * (v + g), R = u * (v + g), A = f * (m + x), S = c * (m + x), M = Math.atan2(R - T, E - b), F = Math.atan2(S - T, A - b);
|
|
11984
11996
|
return {
|
|
11985
|
-
cx:
|
|
11997
|
+
cx: b + e,
|
|
11986
11998
|
cy: T + t,
|
|
11987
11999
|
radius: o,
|
|
11988
|
-
startAngle:
|
|
11989
|
-
endAngle:
|
|
12000
|
+
startAngle: M,
|
|
12001
|
+
endAngle: F,
|
|
11990
12002
|
anticlockwise: l * c > f * u
|
|
11991
12003
|
};
|
|
11992
12004
|
}, r.arc = function(e, t, i, n, o, s, a, h, u) {
|
|
11993
12005
|
for (var l = a - s, c = $r._segmentsCount(Math.abs(l) * o, Math.ceil(Math.abs(l) / en) * 40), f = l / (c * 2), p = f * 2, d = Math.cos(f), _ = Math.sin(f), y = c - 1, m = y % 1 / y, v = 0; v <= y; ++v) {
|
|
11994
|
-
var g = v + m * v,
|
|
11995
|
-
u.push((d *
|
|
12006
|
+
var g = v + m * v, x = f + s + p * g, b = Math.cos(x), T = -Math.sin(x);
|
|
12007
|
+
u.push((d * b + _ * T) * o + i, (d * -T + _ * b) * o + n);
|
|
11996
12008
|
}
|
|
11997
12009
|
}, r;
|
|
11998
12010
|
}()
|
|
@@ -12002,8 +12014,8 @@ var Za = (
|
|
|
12002
12014
|
function r() {
|
|
12003
12015
|
}
|
|
12004
12016
|
return r.curveLength = function(e, t, i, n, o, s, a, h) {
|
|
12005
|
-
for (var u = 10, l = 0, c = 0, f = 0, p = 0, d = 0, _ = 0, y = 0, m = 0, v = 0, g = 0,
|
|
12006
|
-
c = E / u, f = c * c, p = f * c, d = 1 - c, _ = d * d, y = _ * d, m = y * e + 3 * _ * c * i + 3 * d * f * o + p * a, v = y * t + 3 * _ * c * n + 3 * d * f * s + p * h, g =
|
|
12017
|
+
for (var u = 10, l = 0, c = 0, f = 0, p = 0, d = 0, _ = 0, y = 0, m = 0, v = 0, g = 0, x = 0, b = e, T = t, E = 1; E <= u; ++E)
|
|
12018
|
+
c = E / u, f = c * c, p = f * c, d = 1 - c, _ = d * d, y = _ * d, m = y * e + 3 * _ * c * i + 3 * d * f * o + p * a, v = y * t + 3 * _ * c * n + 3 * d * f * s + p * h, g = b - m, x = T - v, b = m, T = v, l += Math.sqrt(g * g + x * x);
|
|
12007
12019
|
return l;
|
|
12008
12020
|
}, r.curveTo = function(e, t, i, n, o, s, a) {
|
|
12009
12021
|
var h = a[a.length - 2], u = a[a.length - 1];
|
|
@@ -12043,7 +12055,7 @@ var Za = (
|
|
|
12043
12055
|
this.style = null, this.size = 0, this.start = 0, this.attribStart = 0, this.attribSize = 0;
|
|
12044
12056
|
}, r;
|
|
12045
12057
|
}()
|
|
12046
|
-
),
|
|
12058
|
+
), Fe, qn = (Fe = {}, Fe[At.POLY] = Mu, Fe[At.CIRC] = sn, Fe[At.ELIP] = sn, Fe[At.RECT] = Og, Fe[At.RREC] = wg, Fe), Ja = [], Pi = [], Qa = (
|
|
12047
12059
|
/** @class */
|
|
12048
12060
|
function() {
|
|
12049
12061
|
function r(e, t, i, n) {
|
|
@@ -12055,7 +12067,7 @@ var Za = (
|
|
|
12055
12067
|
this.shape = null, this.holes.length = 0, this.holes = null, this.points.length = 0, this.points = null, this.lineStyle = null, this.fillStyle = null;
|
|
12056
12068
|
}, r;
|
|
12057
12069
|
}()
|
|
12058
|
-
), or = new nt(),
|
|
12070
|
+
), or = new nt(), Fg = (
|
|
12059
12071
|
/** @class */
|
|
12060
12072
|
function(r) {
|
|
12061
12073
|
ys(e, r);
|
|
@@ -12244,7 +12256,7 @@ var Za = (
|
|
|
12244
12256
|
t[y] = (t[y] + f) * l, t[y + 1] = (t[y + 1] + p) * c;
|
|
12245
12257
|
}, e.BATCHABLE_SIZE = 100, e;
|
|
12246
12258
|
}(Au)
|
|
12247
|
-
),
|
|
12259
|
+
), Ng = (
|
|
12248
12260
|
/** @class */
|
|
12249
12261
|
function(r) {
|
|
12250
12262
|
ys(e, r);
|
|
@@ -12266,7 +12278,7 @@ var Za = (
|
|
|
12266
12278
|
function e(t) {
|
|
12267
12279
|
t === void 0 && (t = null);
|
|
12268
12280
|
var i = r.call(this) || this;
|
|
12269
|
-
return i.shader = null, i.pluginName = "batch", i.currentPath = null, i.batches = [], i.batchTint = -1, i.batchDirty = -1, i.vertexData = null, i._fillStyle = new Pu(), i._lineStyle = new
|
|
12281
|
+
return i.shader = null, i.pluginName = "batch", i.currentPath = null, i.batches = [], i.batchTint = -1, i.batchDirty = -1, i.vertexData = null, i._fillStyle = new Pu(), i._lineStyle = new Ng(), i._matrix = null, i._holeMode = !1, i.state = Je.for2d(), i._geometry = t || new Fg(), i._geometry.refCount++, i._transformID = -1, i.tint = 16777215, i.blendMode = U.NORMAL, i;
|
|
12270
12282
|
}
|
|
12271
12283
|
return Object.defineProperty(e.prototype, "geometry", {
|
|
12272
12284
|
/**
|
|
@@ -12565,7 +12577,7 @@ var Dr = new nt(), Gg = new Uint16Array([0, 1, 2, 0, 2, 3]), ni = (
|
|
|
12565
12577
|
Bg(e, r);
|
|
12566
12578
|
function e(t) {
|
|
12567
12579
|
var i = r.call(this) || this;
|
|
12568
|
-
return i._anchor = new cr(i._onAnchorUpdate, i, t ? t.defaultAnchor.x : 0, t ? t.defaultAnchor.y : 0), i._texture = null, i._width = 0, i._height = 0, i._tint = null, i._tintRGB = null, i.tint = 16777215, i.blendMode = U.NORMAL, i._cachedTint = 16777215, i.uvs = null, i.texture = t || X.EMPTY, i.vertexData = new Float32Array(8), i.vertexTrimmedData = null, i._transformID = -1, i._textureID = -1, i._transformTrimmedID = -1, i._textureTrimmedID = -1, i.indices = Gg, i.pluginName = "batch", i.isSprite = !0, i._roundPixels =
|
|
12580
|
+
return i._anchor = new cr(i._onAnchorUpdate, i, t ? t.defaultAnchor.x : 0, t ? t.defaultAnchor.y : 0), i._texture = null, i._width = 0, i._height = 0, i._tint = null, i._tintRGB = null, i.tint = 16777215, i.blendMode = U.NORMAL, i._cachedTint = 16777215, i.uvs = null, i.texture = t || X.EMPTY, i.vertexData = new Float32Array(8), i.vertexTrimmedData = null, i._transformID = -1, i._textureID = -1, i._transformTrimmedID = -1, i._textureTrimmedID = -1, i.indices = Gg, i.pluginName = "batch", i.isSprite = !0, i._roundPixels = N.ROUND_PIXELS, i;
|
|
12569
12581
|
}
|
|
12570
12582
|
return e.prototype._onTextureUpdate = function() {
|
|
12571
12583
|
this._textureID = -1, this._textureTrimmedID = -1, this._cachedTint = 16777215, this._width && (this.scale.x = lr(this.scale.x) * this._width / this._texture.orig.width), this._height && (this.scale.y = lr(this.scale.y) * this._height / this._texture.orig.height);
|
|
@@ -12577,7 +12589,7 @@ var Dr = new nt(), Gg = new Uint16Array([0, 1, 2, 0, 2, 3]), ni = (
|
|
|
12577
12589
|
this._textureID !== t._updateID && (this.uvs = this._texture._uvs.uvsFloat32), this._transformID = this.transform._worldID, this._textureID = t._updateID;
|
|
12578
12590
|
var i = this.transform.worldTransform, n = i.a, o = i.b, s = i.c, a = i.d, h = i.tx, u = i.ty, l = this.vertexData, c = t.trim, f = t.orig, p = this._anchor, d = 0, _ = 0, y = 0, m = 0;
|
|
12579
12591
|
if (c ? (_ = c.x - p._x * f.width, d = _ + c.width, m = c.y - p._y * f.height, y = m + c.height) : (_ = -p._x * f.width, d = _ + f.width, m = -p._y * f.height, y = m + f.height), l[0] = n * _ + s * m + h, l[1] = a * m + o * _ + u, l[2] = n * d + s * m + h, l[3] = a * m + o * d + u, l[4] = n * d + s * y + h, l[5] = a * y + o * d + u, l[6] = n * _ + s * y + h, l[7] = a * y + o * _ + u, this._roundPixels)
|
|
12580
|
-
for (var v =
|
|
12592
|
+
for (var v = N.RESOLUTION, g = 0; g < l.length; ++g)
|
|
12581
12593
|
l[g] = Math.round((l[g] * v | 0) / v);
|
|
12582
12594
|
}
|
|
12583
12595
|
}, e.prototype.calculateTrimmedVertices = function() {
|
|
@@ -13226,12 +13238,12 @@ var Mi = {
|
|
|
13226
13238
|
if (v && g)
|
|
13227
13239
|
continue;
|
|
13228
13240
|
}
|
|
13229
|
-
var
|
|
13230
|
-
if (
|
|
13241
|
+
var x = r.getFromCache(m, u, h, n);
|
|
13242
|
+
if (x > d)
|
|
13231
13243
|
if (s !== "" && (a += r.addLine(s), s = "", o = 0), r.canBreakWords(m, t.breakWords))
|
|
13232
|
-
for (var
|
|
13233
|
-
for (var E =
|
|
13234
|
-
var A =
|
|
13244
|
+
for (var b = r.wordWrapSplit(m), T = 0; T < b.length; T++) {
|
|
13245
|
+
for (var E = b[T], R = 1; b[T + R]; ) {
|
|
13246
|
+
var A = b[T + R], S = E[E.length - 1];
|
|
13235
13247
|
if (!r.canBreakChars(S, A, m, T, t.breakWords))
|
|
13236
13248
|
E += A;
|
|
13237
13249
|
else
|
|
@@ -13239,16 +13251,16 @@ var Mi = {
|
|
|
13239
13251
|
R++;
|
|
13240
13252
|
}
|
|
13241
13253
|
T += E.length - 1;
|
|
13242
|
-
var
|
|
13243
|
-
|
|
13254
|
+
var M = r.getFromCache(E, u, h, n);
|
|
13255
|
+
M + o > d && (a += r.addLine(s), p = !1, s = "", o = 0), s += E, o += M;
|
|
13244
13256
|
}
|
|
13245
13257
|
else {
|
|
13246
13258
|
s.length > 0 && (a += r.addLine(s), s = "", o = 0);
|
|
13247
|
-
var
|
|
13248
|
-
a += r.addLine(m, !
|
|
13259
|
+
var F = y === _.length - 1;
|
|
13260
|
+
a += r.addLine(m, !F), p = !1, s = "", o = 0;
|
|
13249
13261
|
}
|
|
13250
13262
|
else
|
|
13251
|
-
|
|
13263
|
+
x + o > d && (p = !1, a += r.addLine(s), s = "", o = 0), (s.length > 0 || !r.isBreakingSpace(m) || p) && (s += m, o += x);
|
|
13252
13264
|
}
|
|
13253
13265
|
return a += r.addLine(s, !1), a;
|
|
13254
13266
|
}, r.addLine = function(e, t) {
|
|
@@ -13348,9 +13360,9 @@ var Mi = {
|
|
|
13348
13360
|
var t = new OffscreenCanvas(0, 0), i = t.getContext("2d", Mi);
|
|
13349
13361
|
if (i && i.measureText)
|
|
13350
13362
|
return r.__canvas = t, t;
|
|
13351
|
-
e =
|
|
13363
|
+
e = N.ADAPTER.createCanvas();
|
|
13352
13364
|
} catch {
|
|
13353
|
-
e =
|
|
13365
|
+
e = N.ADAPTER.createCanvas();
|
|
13354
13366
|
}
|
|
13355
13367
|
e.width = e.height = 10, r.__canvas = e;
|
|
13356
13368
|
}
|
|
@@ -13406,12 +13418,12 @@ var jg = {
|
|
|
13406
13418
|
Ug(e, r);
|
|
13407
13419
|
function e(t, i, n) {
|
|
13408
13420
|
var o = this, s = !1;
|
|
13409
|
-
n || (n =
|
|
13421
|
+
n || (n = N.ADAPTER.createCanvas(), s = !0), n.width = 3, n.height = 3;
|
|
13410
13422
|
var a = X.from(n);
|
|
13411
13423
|
return a.orig = new $(), a.trim = new $(), o = r.call(this, a) || this, o._ownCanvas = s, o.canvas = n, o.context = n.getContext("2d", {
|
|
13412
13424
|
// required for trimming to work without warnings
|
|
13413
13425
|
willReadFrequently: !0
|
|
13414
|
-
}), o._resolution =
|
|
13426
|
+
}), o._resolution = N.RESOLUTION, o._autoResolution = !0, o._text = null, o._style = null, o._styleListener = null, o._font = "", o.text = t, o.style = i, o.localStyleID = -1, o;
|
|
13415
13427
|
}
|
|
13416
13428
|
return e.prototype.updateText = function(t) {
|
|
13417
13429
|
var i = this._style;
|
|
@@ -13423,8 +13435,8 @@ var jg = {
|
|
|
13423
13435
|
var m = i.dropShadow && y === 0, v = m ? Math.ceil(Math.max(1, a) + i.padding * 2) : 0, g = v * this._resolution;
|
|
13424
13436
|
if (m) {
|
|
13425
13437
|
n.fillStyle = "black", n.strokeStyle = "black";
|
|
13426
|
-
var
|
|
13427
|
-
n.shadowColor = "rgba(" +
|
|
13438
|
+
var x = i.dropShadowColor, b = br(typeof x == "number" ? x : Ji(x)), T = i.dropShadowBlur * this._resolution, E = i.dropShadowDistance * this._resolution;
|
|
13439
|
+
n.shadowColor = "rgba(" + b[0] * 255 + "," + b[1] * 255 + "," + b[2] * 255 + "," + i.dropShadowAlpha + ")", n.shadowBlur = T, n.shadowOffsetX = Math.cos(i.dropShadowAngle) * E, n.shadowOffsetY = Math.sin(i.dropShadowAngle) * E + g;
|
|
13428
13440
|
} else
|
|
13429
13441
|
n.fillStyle = this._generateFillStyle(i, h, o), n.strokeStyle = i.stroke, n.shadowColor = "black", n.shadowBlur = 0, n.shadowOffsetX = 0, n.shadowOffsetY = 0;
|
|
13430
13442
|
var R = (u - f.fontSize) / 2;
|
|
@@ -13482,9 +13494,9 @@ var jg = {
|
|
|
13482
13494
|
for (var _ = n.fontProperties.fontSize + t.strokeThickness, d = 0; d < i.length; d++) {
|
|
13483
13495
|
var y = n.lineHeight * (d - 1) + _, m = n.lineHeight * d, v = m;
|
|
13484
13496
|
d > 0 && y > m && (v = (m + y) / 2);
|
|
13485
|
-
var g = m + _,
|
|
13486
|
-
d + 1 < i.length &&
|
|
13487
|
-
for (var T = (
|
|
13497
|
+
var g = m + _, x = n.lineHeight * (d + 1), b = g;
|
|
13498
|
+
d + 1 < i.length && x < g && (b = (g + x) / 2);
|
|
13499
|
+
for (var T = (b - v) / l, E = 0; E < c.length; E++) {
|
|
13488
13500
|
var R = 0;
|
|
13489
13501
|
typeof f[E] == "number" ? R = f[E] : R = E / c.length;
|
|
13490
13502
|
var A = Math.min(1, Math.max(0, v / l + R * T));
|
|
@@ -13493,9 +13505,9 @@ var jg = {
|
|
|
13493
13505
|
}
|
|
13494
13506
|
} else {
|
|
13495
13507
|
s = this.context.createLinearGradient(h, l / 2, u + h, l / 2);
|
|
13496
|
-
for (var S = c.length + 1,
|
|
13497
|
-
var
|
|
13498
|
-
typeof f[d] == "number" ?
|
|
13508
|
+
for (var S = c.length + 1, M = 1, d = 0; d < c.length; d++) {
|
|
13509
|
+
var F = void 0;
|
|
13510
|
+
typeof f[d] == "number" ? F = f[d] : F = M / S, s.addColorStop(F, c[d]), M++;
|
|
13499
13511
|
}
|
|
13500
13512
|
}
|
|
13501
13513
|
return s;
|
|
@@ -13574,7 +13586,7 @@ var jg = {
|
|
|
13574
13586
|
* @pixi/prepare is licensed under the MIT License.
|
|
13575
13587
|
* http://www.opensource.org/licenses/mit-license
|
|
13576
13588
|
*/
|
|
13577
|
-
|
|
13589
|
+
N.UPLOADS_PER_FRAME = 4;
|
|
13578
13590
|
/*! *****************************************************************************
|
|
13579
13591
|
Copyright (c) Microsoft Corporation.
|
|
13580
13592
|
|
|
@@ -13668,7 +13680,7 @@ var Jg = (
|
|
|
13668
13680
|
function() {
|
|
13669
13681
|
function r(e) {
|
|
13670
13682
|
var t = this;
|
|
13671
|
-
this.limiter = new Yg(
|
|
13683
|
+
this.limiter = new Yg(N.UPLOADS_PER_FRAME), this.renderer = e, this.uploadHookHelper = null, this.queue = [], this.addHooks = [], this.uploadHooks = [], this.completes = [], this.ticking = !1, this.delayedTick = function() {
|
|
13672
13684
|
t.queue && t.prepareItems();
|
|
13673
13685
|
}, this.registerFindHook(Kg), this.registerFindHook(Zg), this.registerFindHook(Vg), this.registerFindHook(zg), this.registerFindHook(Wg), this.registerUploadHook($g), this.registerUploadHook(qg);
|
|
13674
13686
|
}
|
|
@@ -13893,7 +13905,7 @@ var Xo = function(r, e) {
|
|
|
13893
13905
|
i.hasOwnProperty(n) && (t[n] = i[n]);
|
|
13894
13906
|
}, Xo(r, e);
|
|
13895
13907
|
};
|
|
13896
|
-
function
|
|
13908
|
+
function Fu(r, e) {
|
|
13897
13909
|
Xo(r, e);
|
|
13898
13910
|
function t() {
|
|
13899
13911
|
this.constructor = r;
|
|
@@ -13902,7 +13914,7 @@ function Nu(r, e) {
|
|
|
13902
13914
|
}
|
|
13903
13915
|
var Cr = new nt();
|
|
13904
13916
|
(function(r) {
|
|
13905
|
-
|
|
13917
|
+
Fu(e, r);
|
|
13906
13918
|
function e(t, i, n) {
|
|
13907
13919
|
i === void 0 && (i = 100), n === void 0 && (n = 100);
|
|
13908
13920
|
var o = r.call(this, t) || this;
|
|
@@ -14106,7 +14118,7 @@ void main(void)
|
|
|
14106
14118
|
`, Di = new bt(), h0 = (
|
|
14107
14119
|
/** @class */
|
|
14108
14120
|
function(r) {
|
|
14109
|
-
|
|
14121
|
+
Fu(e, r);
|
|
14110
14122
|
function e(t) {
|
|
14111
14123
|
var i = r.call(this, t) || this;
|
|
14112
14124
|
return t.runners.contextChange.add(i), i.quad = new du(), i.state = Je.for2d(), i;
|
|
@@ -14186,7 +14198,7 @@ var u0 = (
|
|
|
14186
14198
|
function e(t, i, n, o) {
|
|
14187
14199
|
o === void 0 && (o = Ut.TRIANGLES);
|
|
14188
14200
|
var s = r.call(this) || this;
|
|
14189
|
-
return s.geometry = t, s.shader = i, s.state = n || Je.for2d(), s.drawMode = o, s.start = 0, s.size = 0, s.uvs = null, s.indices = null, s.vertexData = new Float32Array(1), s.vertexDirty = -1, s._transformID = -1, s._roundPixels =
|
|
14201
|
+
return s.geometry = t, s.shader = i, s.state = n || Je.for2d(), s.drawMode = o, s.start = 0, s.size = 0, s.uvs = null, s.indices = null, s.vertexData = new Float32Array(1), s.vertexDirty = -1, s._transformID = -1, s._roundPixels = N.ROUND_PIXELS, s.batchUvs = null, s;
|
|
14190
14202
|
}
|
|
14191
14203
|
return Object.defineProperty(e.prototype, "geometry", {
|
|
14192
14204
|
/**
|
|
@@ -14309,7 +14321,7 @@ var u0 = (
|
|
|
14309
14321
|
p[d * 2] = a * _ + u * y + c, p[d * 2 + 1] = h * _ + l * y + f;
|
|
14310
14322
|
}
|
|
14311
14323
|
if (this._roundPixels)
|
|
14312
|
-
for (var m =
|
|
14324
|
+
for (var m = N.RESOLUTION, d = 0; d < p.length; ++d)
|
|
14313
14325
|
p[d] = Math.round((p[d] * m | 0) / m);
|
|
14314
14326
|
this.vertexDirty = o;
|
|
14315
14327
|
}
|
|
@@ -14622,7 +14634,7 @@ var an = (
|
|
|
14622
14634
|
Yo,
|
|
14623
14635
|
d0
|
|
14624
14636
|
];
|
|
14625
|
-
function
|
|
14637
|
+
function Nu(r) {
|
|
14626
14638
|
for (var e = 0; e < eo.length; e++)
|
|
14627
14639
|
if (eo[e].test(r))
|
|
14628
14640
|
return eo[e];
|
|
@@ -14642,11 +14654,11 @@ function _0(r, e, t, i, n, o) {
|
|
|
14642
14654
|
if (f.unshift(s[0]), p.unshift(0), f.push(s[s.length - 1]), p.push(1), t.fillGradientType === qr.LINEAR_VERTICAL) {
|
|
14643
14655
|
a = e.createLinearGradient(l / 2, u, l / 2, c + u);
|
|
14644
14656
|
for (var y = 0, m = o.fontProperties.fontSize + t.strokeThickness, v = m / c, _ = 0; _ < n.length; _++)
|
|
14645
|
-
for (var g = o.lineHeight * _,
|
|
14646
|
-
var
|
|
14647
|
-
typeof p[
|
|
14648
|
-
var T = g / c +
|
|
14649
|
-
E = Math.min(E, 1), a.addColorStop(E, f[
|
|
14657
|
+
for (var g = o.lineHeight * _, x = 0; x < f.length; x++) {
|
|
14658
|
+
var b = 0;
|
|
14659
|
+
typeof p[x] == "number" ? b = p[x] : b = x / f.length;
|
|
14660
|
+
var T = g / c + b * v, E = Math.max(y, T);
|
|
14661
|
+
E = Math.min(E, 1), a.addColorStop(E, f[x]), y = E;
|
|
14650
14662
|
}
|
|
14651
14663
|
} else {
|
|
14652
14664
|
a = e.createLinearGradient(u, c / 2, l + u, c / 2);
|
|
@@ -14704,9 +14716,9 @@ var ye = (
|
|
|
14704
14716
|
c[d] = t instanceof Array ? t[f] : t[_], u != null && u.fieldType && u.fieldType !== "none" && (c[d].baseTexture.alphaMode = Yt.NO_PREMULTIPLIED_ALPHA, c[d].baseTexture.mipmap = Ht.OFF);
|
|
14705
14717
|
}
|
|
14706
14718
|
for (var f = 0; f < e.char.length; f++) {
|
|
14707
|
-
var y = e.char[f], d = y.id, m = y.page, v = e.char[f], g = v.x,
|
|
14708
|
-
g /= l,
|
|
14709
|
-
var S = new $(g + c[m].frame.x / l,
|
|
14719
|
+
var y = e.char[f], d = y.id, m = y.page, v = e.char[f], g = v.x, x = v.y, b = v.width, T = v.height, E = v.xoffset, R = v.yoffset, A = v.xadvance;
|
|
14720
|
+
g /= l, x /= l, b /= l, T /= l, E /= l, R /= l, A /= l;
|
|
14721
|
+
var S = new $(g + c[m].frame.x / l, x + c[m].frame.y / l, b, T);
|
|
14710
14722
|
this.chars[d] = {
|
|
14711
14723
|
xOffset: E,
|
|
14712
14724
|
yOffset: R,
|
|
@@ -14717,8 +14729,8 @@ var ye = (
|
|
|
14717
14729
|
};
|
|
14718
14730
|
}
|
|
14719
14731
|
for (var f = 0; f < e.kerning.length; f++) {
|
|
14720
|
-
var
|
|
14721
|
-
|
|
14732
|
+
var M = e.kerning[f], F = M.first, L = M.second, O = M.amount;
|
|
14733
|
+
F /= l, L /= l, O /= l, this.chars[L] && (this.chars[L].kerning[F] = O);
|
|
14722
14734
|
}
|
|
14723
14735
|
this.distanceFieldRange = u == null ? void 0 : u.distanceRange, this.distanceFieldType = (o = (n = u == null ? void 0 : u.fieldType) === null || n === void 0 ? void 0 : n.toLowerCase()) !== null && o !== void 0 ? o : "none";
|
|
14724
14736
|
}
|
|
@@ -14733,7 +14745,7 @@ var ye = (
|
|
|
14733
14745
|
if (e instanceof an)
|
|
14734
14746
|
n = e;
|
|
14735
14747
|
else {
|
|
14736
|
-
var o =
|
|
14748
|
+
var o = Nu(e);
|
|
14737
14749
|
if (!o)
|
|
14738
14750
|
throw new Error("Unrecognized data format for font.");
|
|
14739
14751
|
n = o.parse(e);
|
|
@@ -14756,29 +14768,29 @@ var ye = (
|
|
|
14756
14768
|
}, p.common[0] = {
|
|
14757
14769
|
lineHeight: c.fontSize
|
|
14758
14770
|
};
|
|
14759
|
-
for (var d = 0, _ = 0, y, m, v, g = 0,
|
|
14760
|
-
y || (y =
|
|
14761
|
-
id:
|
|
14771
|
+
for (var d = 0, _ = 0, y, m, v, g = 0, x = [], b = 0; b < l.length; b++) {
|
|
14772
|
+
y || (y = N.ADAPTER.createCanvas(), y.width = h, y.height = u, m = y.getContext("2d"), v = new W(y, { resolution: a }), x.push(new X(v)), p.page.push({
|
|
14773
|
+
id: x.length - 1,
|
|
14762
14774
|
file: ""
|
|
14763
14775
|
}));
|
|
14764
|
-
var T = l[
|
|
14776
|
+
var T = l[b], E = ee.measureText(T, c, !1, y), R = E.width, A = Math.ceil(E.height), S = Math.ceil((c.fontStyle === "italic" ? 2 : 1) * R);
|
|
14765
14777
|
if (_ >= u - A * a) {
|
|
14766
14778
|
if (_ === 0)
|
|
14767
14779
|
throw new Error("[BitmapFont] textureHeight " + u + "px is too small " + ("(fontFamily: '" + c.fontFamily + "', fontSize: " + c.fontSize + "px, char: '" + T + "')"));
|
|
14768
|
-
--
|
|
14780
|
+
--b, y = null, m = null, v = null, _ = 0, d = 0, g = 0;
|
|
14769
14781
|
continue;
|
|
14770
14782
|
}
|
|
14771
14783
|
if (g = Math.max(A + E.fontProperties.descent, g), S * a + d >= f) {
|
|
14772
14784
|
if (d === 0)
|
|
14773
14785
|
throw new Error("[BitmapFont] textureWidth " + h + "px is too small " + ("(fontFamily: '" + c.fontFamily + "', fontSize: " + c.fontSize + "px, char: '" + T + "')"));
|
|
14774
|
-
--
|
|
14786
|
+
--b, _ += g * a, _ = Math.ceil(_), d = 0, g = 0;
|
|
14775
14787
|
continue;
|
|
14776
14788
|
}
|
|
14777
14789
|
y0(y, m, E, d, _, a, c);
|
|
14778
|
-
var
|
|
14790
|
+
var M = ki(E.text);
|
|
14779
14791
|
p.char.push({
|
|
14780
|
-
id:
|
|
14781
|
-
page:
|
|
14792
|
+
id: M,
|
|
14793
|
+
page: x.length - 1,
|
|
14782
14794
|
x: d / a,
|
|
14783
14795
|
y: _ / a,
|
|
14784
14796
|
width: S,
|
|
@@ -14789,8 +14801,8 @@ var ye = (
|
|
|
14789
14801
|
}), d += (S + 2 * s) * a, d = Math.ceil(d);
|
|
14790
14802
|
}
|
|
14791
14803
|
if (!(i != null && i.skipKerning))
|
|
14792
|
-
for (var
|
|
14793
|
-
for (var L = l[
|
|
14804
|
+
for (var b = 0, F = l.length; b < F; b++)
|
|
14805
|
+
for (var L = l[b], O = 0; O < F; O++) {
|
|
14794
14806
|
var I = l[O], w = m.measureText(L).width, B = m.measureText(I).width, st = m.measureText(L + I).width, j = st - (w + B);
|
|
14795
14807
|
j && p.kerning.push({
|
|
14796
14808
|
first: ki(L),
|
|
@@ -14798,7 +14810,7 @@ var ye = (
|
|
|
14798
14810
|
amount: j
|
|
14799
14811
|
});
|
|
14800
14812
|
}
|
|
14801
|
-
var C = new r(p,
|
|
14813
|
+
var C = new r(p, x, !0);
|
|
14802
14814
|
return r.available[e] !== void 0 && r.uninstall(e), r.available[e] = C, C;
|
|
14803
14815
|
}, r.ALPHA = [["a", "z"], ["A", "Z"], " "], r.NUMERIC = [["0", "9"]], r.ALPHANUMERIC = [["a", "z"], ["A", "Z"], ["0", "9"], " "], r.ASCII = [[" ", "~"]], r.defaultOptions = {
|
|
14804
14816
|
resolution: 1,
|
|
@@ -14870,33 +14882,33 @@ void main(void)\r
|
|
|
14870
14882
|
throw new Error('Missing BitmapFont "' + l + '"');
|
|
14871
14883
|
return n._activePagesMeshData = [], n._textWidth = 0, n._textHeight = 0, n._align = s, n._tint = a, n._font = void 0, n._fontName = l, n._fontSize = c, n.text = t, n._maxWidth = h, n._maxLineHeight = 0, n._letterSpacing = u, n._anchor = new cr(function() {
|
|
14872
14884
|
n.dirty = !0;
|
|
14873
|
-
}, n, 0, 0), n._roundPixels =
|
|
14885
|
+
}, n, 0, 0), n._roundPixels = N.ROUND_PIXELS, n.dirty = !0, n._resolution = N.RESOLUTION, n._autoResolution = !0, n._textureCache = {}, n;
|
|
14874
14886
|
}
|
|
14875
14887
|
return e.prototype.updateText = function() {
|
|
14876
14888
|
for (var t, i = ye.available[this._fontName], n = this.fontSize, o = n / i.size, s = new nt(), a = [], h = [], u = [], l = this._text.replace(/(?:\r\n|\r)/g, `
|
|
14877
|
-
`) || " ", c = Lu(l), f = this._maxWidth * i.size / n, p = i.distanceFieldType === "none" ? ih : nh, d = null, _ = 0, y = 0, m = 0, v = -1, g = 0,
|
|
14889
|
+
`) || " ", c = Lu(l), f = this._maxWidth * i.size / n, p = i.distanceFieldType === "none" ? ih : nh, d = null, _ = 0, y = 0, m = 0, v = -1, g = 0, x = 0, b = 0, T = 0, E = 0; E < c.length; E++) {
|
|
14878
14890
|
var R = c[E], A = ki(R);
|
|
14879
14891
|
if (/(?:\s)/.test(R) && (v = E, g = _, T++), R === "\r" || R === `
|
|
14880
14892
|
`) {
|
|
14881
|
-
h.push(_), u.push(-1), y = Math.max(y, _), ++m, ++
|
|
14893
|
+
h.push(_), u.push(-1), y = Math.max(y, _), ++m, ++x, s.x = 0, s.y += i.lineHeight, d = null, T = 0;
|
|
14882
14894
|
continue;
|
|
14883
14895
|
}
|
|
14884
14896
|
var S = i.chars[A];
|
|
14885
14897
|
if (S) {
|
|
14886
14898
|
d && S.kerning[d] && (s.x += S.kerning[d]);
|
|
14887
|
-
var
|
|
14899
|
+
var M = oh.pop() || {
|
|
14888
14900
|
texture: X.EMPTY,
|
|
14889
14901
|
line: 0,
|
|
14890
14902
|
charCode: 0,
|
|
14891
14903
|
prevSpaces: 0,
|
|
14892
14904
|
position: new nt()
|
|
14893
14905
|
};
|
|
14894
|
-
|
|
14906
|
+
M.texture = S.texture, M.line = m, M.charCode = A, M.position.x = s.x + S.xOffset + this._letterSpacing / 2, M.position.y = s.y + S.yOffset, M.prevSpaces = T, a.push(M), _ = M.position.x + Math.max(S.xAdvance - S.xOffset, S.texture.orig.width), s.x += S.xAdvance + this._letterSpacing, b = Math.max(b, S.yOffset + S.texture.height), d = A, v !== -1 && f > 0 && s.x > f && (++x, _r(a, 1 + v - x, 1 + E - v), E = v, v = -1, h.push(g), u.push(a.length > 0 ? a[a.length - 1].prevSpaces : 0), y = Math.max(y, g), m++, s.x = 0, s.y += i.lineHeight, d = null, T = 0);
|
|
14895
14907
|
}
|
|
14896
14908
|
}
|
|
14897
|
-
var
|
|
14898
|
-
|
|
14899
|
-
` && (/(?:\s)/.test(
|
|
14909
|
+
var F = c[c.length - 1];
|
|
14910
|
+
F !== "\r" && F !== `
|
|
14911
|
+
` && (/(?:\s)/.test(F) && (_ = g), h.push(_), y = Math.max(y, _), u.push(-1));
|
|
14900
14912
|
for (var L = [], E = 0; E <= m; E++) {
|
|
14901
14913
|
var O = 0;
|
|
14902
14914
|
this._align === "right" ? O = y - h[E] : this._align === "center" ? O = (y - h[E]) / 2 : this._align === "justify" && (O = u[E] < 0 ? 0 : (y - h[E]) / u[E]), L.push(O);
|
|
@@ -14955,7 +14967,7 @@ void main(void)\r
|
|
|
14955
14967
|
if (this.anchor.x !== 0 || this.anchor.y !== 0)
|
|
14956
14968
|
for (var Wt = 0, Qe = this._textWidth * this.anchor.x, oi = this._textHeight * this.anchor.y, bs = 0; bs < P.total; bs++)
|
|
14957
14969
|
P.vertices[Wt++] -= Qe, P.vertices[Wt++] -= oi, P.vertices[Wt++] -= Qe, P.vertices[Wt++] -= oi, P.vertices[Wt++] -= Qe, P.vertices[Wt++] -= oi, P.vertices[Wt++] -= Qe, P.vertices[Wt++] -= oi;
|
|
14958
|
-
this._maxLineHeight =
|
|
14970
|
+
this._maxLineHeight = b * o;
|
|
14959
14971
|
var xs = P.mesh.geometry.getBuffer("aVertexPosition"), Ts = P.mesh.geometry.getBuffer("aTextureCoord"), Es = P.mesh.geometry.getIndex();
|
|
14960
14972
|
xs.data = P.vertices, Ts.data = P.uvs, Es.data = P.indices, xs.update(), Ts.update(), Es.update();
|
|
14961
14973
|
}
|
|
@@ -15182,7 +15194,7 @@ var b0 = (
|
|
|
15182
15194
|
return r.add = function() {
|
|
15183
15195
|
dt.setExtensionXhrType("fnt", dt.XHR_RESPONSE_TYPE.TEXT);
|
|
15184
15196
|
}, r.use = function(e, t) {
|
|
15185
|
-
var i =
|
|
15197
|
+
var i = Nu(e.data);
|
|
15186
15198
|
if (!i) {
|
|
15187
15199
|
t();
|
|
15188
15200
|
return;
|
|
@@ -15392,7 +15404,7 @@ var sh = (
|
|
|
15392
15404
|
function(r) {
|
|
15393
15405
|
Bu(e, r);
|
|
15394
15406
|
function e(t, i, n, o, s) {
|
|
15395
|
-
i === void 0 && (i = 8), n === void 0 && (n = 4), o === void 0 && (o =
|
|
15407
|
+
i === void 0 && (i = 8), n === void 0 && (n = 4), o === void 0 && (o = N.FILTER_RESOLUTION), s === void 0 && (s = 5);
|
|
15396
15408
|
var a = this, h = A0(s, t), u = O0(s);
|
|
15397
15409
|
return a = r.call(
|
|
15398
15410
|
this,
|
|
@@ -15448,7 +15460,7 @@ var sh = (
|
|
|
15448
15460
|
(function(r) {
|
|
15449
15461
|
Bu(e, r);
|
|
15450
15462
|
function e(t, i, n, o) {
|
|
15451
|
-
t === void 0 && (t = 8), i === void 0 && (i = 4), n === void 0 && (n =
|
|
15463
|
+
t === void 0 && (t = 8), i === void 0 && (i = 4), n === void 0 && (n = N.FILTER_RESOLUTION), o === void 0 && (o = 5);
|
|
15452
15464
|
var s = r.call(this) || this;
|
|
15453
15465
|
return s.blurXFilter = new sh(!0, t, i, n, o), s.blurYFilter = new sh(!1, t, i, n, o), s.resolution = n, s.quality = i, s.blur = t, s.repeatEdgePixels = !1, s;
|
|
15454
15466
|
}
|
|
@@ -16344,7 +16356,7 @@ function C0(r, e) {
|
|
|
16344
16356
|
}
|
|
16345
16357
|
r.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
|
|
16346
16358
|
}
|
|
16347
|
-
var
|
|
16359
|
+
var F0 = `
|
|
16348
16360
|
attribute vec2 aVertexPosition;
|
|
16349
16361
|
|
|
16350
16362
|
uniform mat3 projectionMatrix;
|
|
@@ -16386,7 +16398,7 @@ void main(void) {
|
|
|
16386
16398
|
|
|
16387
16399
|
texcoords(vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);
|
|
16388
16400
|
}
|
|
16389
|
-
`,
|
|
16401
|
+
`, N0 = `varying vec2 v_rgbNW;
|
|
16390
16402
|
varying vec2 v_rgbNE;
|
|
16391
16403
|
varying vec2 v_rgbSW;
|
|
16392
16404
|
varying vec2 v_rgbSE;
|
|
@@ -16511,7 +16523,7 @@ void main() {
|
|
|
16511
16523
|
(function(r) {
|
|
16512
16524
|
C0(e, r);
|
|
16513
16525
|
function e() {
|
|
16514
|
-
return r.call(this,
|
|
16526
|
+
return r.call(this, F0, N0) || this;
|
|
16515
16527
|
}
|
|
16516
16528
|
return e;
|
|
16517
16529
|
})(Ie);
|
|
@@ -16713,7 +16725,7 @@ mt.prototype._initCachedDisplayObject = function(r) {
|
|
|
16713
16725
|
var n = this.filters[0].padding;
|
|
16714
16726
|
i.pad(n);
|
|
16715
16727
|
}
|
|
16716
|
-
i.ceil(
|
|
16728
|
+
i.ceil(N.RESOLUTION);
|
|
16717
16729
|
var o = r.renderTexture.current, s = r.renderTexture.sourceFrame.clone(), a = r.renderTexture.destinationFrame.clone(), h = r.projection.transform, u = qe.create({
|
|
16718
16730
|
width: i.width,
|
|
16719
16731
|
height: i.height,
|
|
@@ -16735,7 +16747,7 @@ mt.prototype._initCachedDisplayObjectCanvas = function(r) {
|
|
|
16735
16747
|
var e = this.getLocalBounds(null, !0), t = this.alpha;
|
|
16736
16748
|
this.alpha = 1;
|
|
16737
16749
|
var i = r.context, n = r._projTransform;
|
|
16738
|
-
e.ceil(
|
|
16750
|
+
e.ceil(N.RESOLUTION);
|
|
16739
16751
|
var o = qe.create({ width: e.width, height: e.height }), s = "cacheAsBitmap_" + $e();
|
|
16740
16752
|
this._cacheData.textureCacheId = s, W.addToCache(o.baseTexture, s), X.addToCache(o, s);
|
|
16741
16753
|
var a = Gu;
|
|
@@ -17325,7 +17337,7 @@ function Y0(r, e) {
|
|
|
17325
17337
|
de.add(
|
|
17326
17338
|
// Install renderer plugins
|
|
17327
17339
|
Rv,
|
|
17328
|
-
|
|
17340
|
+
Fv,
|
|
17329
17341
|
Mv,
|
|
17330
17342
|
Rg,
|
|
17331
17343
|
e0,
|
|
@@ -17394,7 +17406,7 @@ const Qo = (r) => {
|
|
|
17394
17406
|
ve = !1;
|
|
17395
17407
|
const { selector: _ } = d.target, y = typeof s == "function" ? s(d) : s;
|
|
17396
17408
|
let m;
|
|
17397
|
-
_.type ===
|
|
17409
|
+
_.type === Fr.RECTANGLE ? m = q0(t, _, y) : _.type === Fr.POLYGON ? m = $0(t, _, y) : _.type === Fr.ELLIPSE ? m = W0(t, _, y) : console.warn(`Unsupported shape type: ${_.type}`), m && n.set(d.id, { annotation: d, ...m });
|
|
17398
17410
|
}, h = (d) => {
|
|
17399
17411
|
const _ = n.get(d.id);
|
|
17400
17412
|
_ && (n.delete(d.id), _.fill.destroy(), _.stroke.destroy());
|
|
@@ -17418,13 +17430,13 @@ const Qo = (r) => {
|
|
|
17418
17430
|
if (typeof d == "function")
|
|
17419
17431
|
n.forEach(({ annotation: _, fill: y, stroke: m, strokeWidth: v }, g) => {
|
|
17420
17432
|
v > 1 && (ve = !1);
|
|
17421
|
-
const { fillStyle:
|
|
17422
|
-
y.tint =
|
|
17433
|
+
const { fillStyle: x, strokeStyle: b } = Qo(d(_));
|
|
17434
|
+
y.tint = x.tint, y.alpha = x.alpha, m.tint = b.tint || 16777215, m.alpha = b.alpha, n.set(_.id, { annotation: _, fill: y, stroke: m, strokeWidth: v });
|
|
17423
17435
|
});
|
|
17424
17436
|
else {
|
|
17425
17437
|
const { fillStyle: _, strokeStyle: y } = Qo(d);
|
|
17426
|
-
y.lineWidth > 1 && (ve = !1), n.forEach(({ annotation: m, fill: v, stroke: g, strokeWidth:
|
|
17427
|
-
v.tint = _.tint, v.alpha = _.alpha, g.tint = y.tint || 16777215, g.alpha = y.alpha, n.set(m.id, { annotation: m, fill: v, stroke: g, strokeWidth:
|
|
17438
|
+
y.lineWidth > 1 && (ve = !1), n.forEach(({ annotation: m, fill: v, stroke: g, strokeWidth: x }, b) => {
|
|
17439
|
+
v.tint = _.tint, v.alpha = _.alpha, g.tint = y.tint || 16777215, g.alpha = y.alpha, n.set(m.id, { annotation: m, fill: v, stroke: g, strokeWidth: x });
|
|
17428
17440
|
});
|
|
17429
17441
|
}
|
|
17430
17442
|
s = d, i.render(t);
|
|
@@ -17444,60 +17456,60 @@ const Qo = (r) => {
|
|
|
17444
17456
|
function J0(r, e, t) {
|
|
17445
17457
|
let i, n, { filter: o } = e, { state: s } = e, { style: a } = e, { viewer: h } = e;
|
|
17446
17458
|
const { store: u, hover: l, selection: c, viewport: f } = s;
|
|
17447
|
-
ro(r, l, (
|
|
17459
|
+
ro(r, l, (b) => t(10, i = b)), ro(r, c, (b) => t(7, n = b));
|
|
17448
17460
|
const p = rs();
|
|
17449
|
-
let d, _
|
|
17450
|
-
const y = (
|
|
17451
|
-
const T = new Xi.Point(
|
|
17461
|
+
let d, _;
|
|
17462
|
+
const y = (b) => {
|
|
17463
|
+
const T = new Xi.Point(b.x, b.y), { x: E, y: R } = h.viewport.pointFromPixel(T);
|
|
17452
17464
|
return h.viewport.viewportToImageCoordinates(E, R);
|
|
17453
|
-
}, m = (
|
|
17465
|
+
}, m = (b) => {
|
|
17466
|
+
const { x: T, y: E } = b.position;
|
|
17467
|
+
_ = { x: T, y: E };
|
|
17468
|
+
}, v = (b) => (T) => {
|
|
17454
17469
|
const { x: E, y: R } = y(new Xi.Point(T.offsetX, T.offsetY)), A = u.getAt(E, R);
|
|
17455
|
-
A && (!o || o(A)) ? (
|
|
17456
|
-
},
|
|
17457
|
-
const T = x.
|
|
17458
|
-
if (
|
|
17459
|
-
const { x:
|
|
17460
|
-
|
|
17461
|
-
}
|
|
17462
|
-
_ =
|
|
17463
|
-
}, g = (x) => {
|
|
17464
|
-
const { x: T, y: E } = x.delta;
|
|
17465
|
-
_ = Math.sqrt(T * T + E * E) > 5;
|
|
17470
|
+
A && (!o || o(A)) ? (b.classList.add("hover"), i !== A.id && l.set(A.id)) : (b.classList.remove("hover"), i && l.set(void 0));
|
|
17471
|
+
}, g = (b) => {
|
|
17472
|
+
const T = b.originalEvent, { x: E, y: R } = b.position, A = E - _.x, S = R - _.y;
|
|
17473
|
+
if (Math.sqrt(A * A + S * S) < 5) {
|
|
17474
|
+
const { x: M, y: F } = y(b.position), L = u.getAt(M, F);
|
|
17475
|
+
L ? p("click", { originalEvent: T, annotation: L }) : p("click", { originalEvent: T });
|
|
17476
|
+
}
|
|
17477
|
+
_ = void 0;
|
|
17466
17478
|
};
|
|
17467
|
-
let
|
|
17479
|
+
let x;
|
|
17468
17480
|
return un(() => {
|
|
17469
|
-
var
|
|
17481
|
+
var b;
|
|
17470
17482
|
const { offsetWidth: T, offsetHeight: E } = h.canvas, R = document.createElement("canvas");
|
|
17471
|
-
R.width = T, R.height = E, R.className = "a9s-gl-canvas", (
|
|
17472
|
-
const A =
|
|
17473
|
-
R.addEventListener("pointermove", A), new ResizeObserver((
|
|
17483
|
+
R.width = T, R.height = E, R.className = "a9s-gl-canvas", (b = h.element.querySelector(".openseadragon-canvas")) == null || b.appendChild(R), t(6, d = Z0(h, R));
|
|
17484
|
+
const A = v(R);
|
|
17485
|
+
R.addEventListener("pointermove", A), new ResizeObserver((M) => {
|
|
17474
17486
|
try {
|
|
17475
|
-
const { width:
|
|
17476
|
-
R.width =
|
|
17487
|
+
const { width: F, height: L } = M[0].contentRect;
|
|
17488
|
+
R.width = F, R.height = L, d.resize(F, L);
|
|
17477
17489
|
} catch {
|
|
17478
17490
|
console.warn("WebGL canvas already disposed");
|
|
17479
17491
|
}
|
|
17480
17492
|
}).observe(R);
|
|
17481
17493
|
const S = () => {
|
|
17482
|
-
const
|
|
17483
|
-
|
|
17484
|
-
const { x:
|
|
17494
|
+
const M = h.viewport.getBounds();
|
|
17495
|
+
x = h.viewport.viewportToImageRectangle(M);
|
|
17496
|
+
const { x: F, y: L, width: O, height: I } = x, w = u.getIntersecting(F, L, O, I);
|
|
17485
17497
|
f.set(w.map((B) => B.id));
|
|
17486
17498
|
};
|
|
17487
|
-
return h.addHandler("canvas-
|
|
17488
|
-
var
|
|
17489
|
-
R.removeEventListener("pointermove", A), h.removeHandler("canvas-
|
|
17499
|
+
return h.addHandler("canvas-press", m), h.addHandler("canvas-release", g), h.addHandler("update-viewport", d.redraw), h.addHandler("animation-finish", S), () => {
|
|
17500
|
+
var M;
|
|
17501
|
+
R.removeEventListener("pointermove", A), h.removeHandler("canvas-press", m), h.removeHandler("canvas-release", g), h.removeHandler("update-viewport", d.redraw), h.removeHandler("animation-finish", S), d.destroy(), (M = R.parentNode) == null || M.removeChild(R);
|
|
17490
17502
|
};
|
|
17491
|
-
}), u.observe((
|
|
17492
|
-
const { created: T, updated: E, deleted: R } =
|
|
17493
|
-
if ((T || []).forEach((A) => d.addAnnotation(A)), (E || []).forEach(({ oldValue: A, newValue: S }) => d.updateAnnotation(A, S)), (R || []).forEach((A) => d.removeAnnotation(A)),
|
|
17494
|
-
const { x: A, y: S, width:
|
|
17503
|
+
}), u.observe((b) => {
|
|
17504
|
+
const { created: T, updated: E, deleted: R } = b.changes;
|
|
17505
|
+
if ((T || []).forEach((A) => d.addAnnotation(A)), (E || []).forEach(({ oldValue: A, newValue: S }) => d.updateAnnotation(A, S)), (R || []).forEach((A) => d.removeAnnotation(A)), x) {
|
|
17506
|
+
const { x: A, y: S, width: M, height: F } = x, L = u.getIntersecting(A, S, M, F);
|
|
17495
17507
|
f.set(L.map((O) => O.id));
|
|
17496
17508
|
} else
|
|
17497
17509
|
f.set(u.all().map((A) => A.id));
|
|
17498
17510
|
d.redraw();
|
|
17499
|
-
}), r.$$set = (
|
|
17500
|
-
"filter" in
|
|
17511
|
+
}), r.$$set = (b) => {
|
|
17512
|
+
"filter" in b && t(2, o = b.filter), "state" in b && t(3, s = b.state), "style" in b && t(4, a = b.style), "viewer" in b && t(5, h = b.viewer);
|
|
17501
17513
|
}, r.$$.update = () => {
|
|
17502
17514
|
r.$$.dirty & /*stage, filter*/
|
|
17503
17515
|
68 && (d == null || d.setFilter(o)), r.$$.dirty & /*stage, $selection*/
|
|
@@ -17510,12 +17522,12 @@ class Q0 extends pe {
|
|
|
17510
17522
|
super(), fe(this, e, J0, null, Vt, { filter: 2, state: 3, style: 4, viewer: 5 });
|
|
17511
17523
|
}
|
|
17512
17524
|
}
|
|
17513
|
-
let
|
|
17525
|
+
let Fi;
|
|
17514
17526
|
const tb = new Uint8Array(16);
|
|
17515
17527
|
function eb() {
|
|
17516
|
-
if (!
|
|
17528
|
+
if (!Fi && (Fi = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Fi))
|
|
17517
17529
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
17518
|
-
return
|
|
17530
|
+
return Fi(tb);
|
|
17519
17531
|
}
|
|
17520
17532
|
const Rt = [];
|
|
17521
17533
|
for (let r = 0; r < 256; ++r)
|
|
@@ -17712,8 +17724,8 @@ function db(r, e, t) {
|
|
|
17712
17724
|
const c = o.closest("svg"), f = [], p = (d, _, y) => {
|
|
17713
17725
|
if (c == null || c.addEventListener(d, _, y), f.push(() => c == null ? void 0 : c.removeEventListener(d, _, y)), d === "pointerup" || d === "dblclick") {
|
|
17714
17726
|
const m = (g) => {
|
|
17715
|
-
const { originalEvent:
|
|
17716
|
-
_(
|
|
17727
|
+
const { originalEvent: x } = g;
|
|
17728
|
+
_(x);
|
|
17717
17729
|
}, v = d === "pointerup" ? "canvas-click" : "canvas-double-click";
|
|
17718
17730
|
h.addHandler(v, m), f.push(() => h.removeHandler(v, m));
|
|
17719
17731
|
} else if (d === "pointermove") {
|
|
@@ -17783,7 +17795,7 @@ function yb(r) {
|
|
|
17783
17795
|
ot(n), i = !1;
|
|
17784
17796
|
},
|
|
17785
17797
|
d(o) {
|
|
17786
|
-
o &&
|
|
17798
|
+
o && Ft(t), n.d(o);
|
|
17787
17799
|
}
|
|
17788
17800
|
};
|
|
17789
17801
|
}
|
|
@@ -17839,7 +17851,7 @@ function mb(r) {
|
|
|
17839
17851
|
t = !1;
|
|
17840
17852
|
},
|
|
17841
17853
|
d(s) {
|
|
17842
|
-
s &&
|
|
17854
|
+
s && Ft(e), Sh(n, s);
|
|
17843
17855
|
}
|
|
17844
17856
|
};
|
|
17845
17857
|
}
|
|
@@ -18019,7 +18031,7 @@ function ph(r) {
|
|
|
18019
18031
|
ot(n), i = !1;
|
|
18020
18032
|
},
|
|
18021
18033
|
d(o) {
|
|
18022
|
-
o &&
|
|
18034
|
+
o && Ft(t), n.d(o);
|
|
18023
18035
|
}
|
|
18024
18036
|
};
|
|
18025
18037
|
}
|
|
@@ -18072,7 +18084,7 @@ function vb(r) {
|
|
|
18072
18084
|
ot(n), s = !1;
|
|
18073
18085
|
},
|
|
18074
18086
|
d(l) {
|
|
18075
|
-
l &&
|
|
18087
|
+
l && Ft(e), ~i && h[i].d(), r[21](null);
|
|
18076
18088
|
}
|
|
18077
18089
|
};
|
|
18078
18090
|
}
|
|
@@ -18123,23 +18135,23 @@ function bb(r, e, t) {
|
|
|
18123
18135
|
let i, n, o, s, { drawingEnabled: a } = e, { filter: h } = e, { preferredDrawingMode: u } = e, { state: l } = e, { style: c = void 0 } = e, { toolName: f = bh()[0] } = e, { user: p } = e, { viewer: d } = e, _;
|
|
18124
18136
|
const { store: y, selection: m, hover: v } = l;
|
|
18125
18137
|
ro(r, m, (O) => t(20, s = O));
|
|
18126
|
-
let g,
|
|
18138
|
+
let g, x, b;
|
|
18127
18139
|
const T = (O) => {
|
|
18128
18140
|
y.unobserve(g);
|
|
18129
18141
|
const I = O.filter(({ editable: w }) => w).map(({ id: w }) => w);
|
|
18130
|
-
I.length > 0 ? (t(6,
|
|
18142
|
+
I.length > 0 ? (t(6, x = I.map((w) => y.getAnnotation(w))), g = (w) => {
|
|
18131
18143
|
const { updated: B } = w.changes;
|
|
18132
|
-
t(6,
|
|
18133
|
-
}, y.observe(g, { annotations: I })) : t(6,
|
|
18144
|
+
t(6, x = (B || []).map((st) => st.newValue));
|
|
18145
|
+
}, y.observe(g, { annotations: I })) : t(6, x = void 0);
|
|
18134
18146
|
}, E = (O, I) => {
|
|
18135
18147
|
const { x: w, y: B } = d.viewport.viewerElementToImageCoordinates(new Xi.Point(O, I));
|
|
18136
18148
|
return [w, B];
|
|
18137
18149
|
}, R = (O) => {
|
|
18138
|
-
d.setMouseNavEnabled(!1),
|
|
18150
|
+
d.setMouseNavEnabled(!1), b = O.timeStamp;
|
|
18139
18151
|
}, A = (O) => {
|
|
18140
|
-
if (d.setMouseNavEnabled(!0), performance.now() - (
|
|
18152
|
+
if (d.setMouseNavEnabled(!0), performance.now() - (b || 0) < 300) {
|
|
18141
18153
|
const { offsetX: I, offsetY: w } = O.detail, [B, st] = E(I, w), j = y.getAt(B, st);
|
|
18142
|
-
j && (!h || h(j)) && !
|
|
18154
|
+
j && (!h || h(j)) && !x.find((C) => C.id === j.id) && (v.set(j.id), m.setSelected(j.id));
|
|
18143
18155
|
}
|
|
18144
18156
|
}, S = (O) => (I) => {
|
|
18145
18157
|
var w;
|
|
@@ -18151,7 +18163,7 @@ function bb(r, e, t) {
|
|
|
18151
18163
|
updated: j ? /* @__PURE__ */ new Date() : void 0,
|
|
18152
18164
|
updatedBy: j ? p : void 0
|
|
18153
18165
|
});
|
|
18154
|
-
},
|
|
18166
|
+
}, M = (O) => {
|
|
18155
18167
|
const I = nb(), w = {
|
|
18156
18168
|
id: I,
|
|
18157
18169
|
bodies: [],
|
|
@@ -18163,7 +18175,7 @@ function bb(r, e, t) {
|
|
|
18163
18175
|
}
|
|
18164
18176
|
};
|
|
18165
18177
|
y.addAnnotation(w), m.setSelected(w.id), d.setMouseNavEnabled(!0);
|
|
18166
|
-
},
|
|
18178
|
+
}, F = (O) => Ku(O);
|
|
18167
18179
|
function L(O) {
|
|
18168
18180
|
ji[O ? "unshift" : "push"](() => {
|
|
18169
18181
|
_ = O, t(5, _);
|
|
@@ -18186,15 +18198,15 @@ function bb(r, e, t) {
|
|
|
18186
18198
|
d,
|
|
18187
18199
|
o,
|
|
18188
18200
|
_,
|
|
18189
|
-
|
|
18201
|
+
x,
|
|
18190
18202
|
i,
|
|
18191
18203
|
m,
|
|
18192
18204
|
E,
|
|
18193
18205
|
R,
|
|
18194
18206
|
A,
|
|
18195
18207
|
S,
|
|
18196
|
-
|
|
18197
|
-
|
|
18208
|
+
M,
|
|
18209
|
+
F,
|
|
18198
18210
|
h,
|
|
18199
18211
|
u,
|
|
18200
18212
|
l,
|
|
@@ -18285,7 +18297,7 @@ function Tb(r) {
|
|
|
18285
18297
|
i: Ee,
|
|
18286
18298
|
o: Ee,
|
|
18287
18299
|
d(p) {
|
|
18288
|
-
p &&
|
|
18300
|
+
p && Ft(e), r[6](null);
|
|
18289
18301
|
}
|
|
18290
18302
|
};
|
|
18291
18303
|
}
|
|
@@ -18366,7 +18378,7 @@ function Ab(r) {
|
|
|
18366
18378
|
ot(t.$$.fragment, a), s = !1;
|
|
18367
18379
|
},
|
|
18368
18380
|
d(a) {
|
|
18369
|
-
a &&
|
|
18381
|
+
a && Ft(e), ce(t);
|
|
18370
18382
|
}
|
|
18371
18383
|
};
|
|
18372
18384
|
}
|
|
@@ -18454,7 +18466,7 @@ function Ob(r) {
|
|
|
18454
18466
|
ot(t.$$.fragment, l), u = !1;
|
|
18455
18467
|
},
|
|
18456
18468
|
d(l) {
|
|
18457
|
-
l &&
|
|
18469
|
+
l && Ft(e), ce(t);
|
|
18458
18470
|
}
|
|
18459
18471
|
};
|
|
18460
18472
|
}
|
|
@@ -18571,7 +18583,7 @@ function mh(r) {
|
|
|
18571
18583
|
t = !1;
|
|
18572
18584
|
},
|
|
18573
18585
|
d(s) {
|
|
18574
|
-
s &&
|
|
18586
|
+
s && Ft(e), Sh(n, s);
|
|
18575
18587
|
}
|
|
18576
18588
|
};
|
|
18577
18589
|
}
|
|
@@ -18671,9 +18683,9 @@ function vh(r) {
|
|
|
18671
18683
|
function a(h, u) {
|
|
18672
18684
|
return (
|
|
18673
18685
|
/*tracked*/
|
|
18674
|
-
h[8].annotation.target.selector.type ===
|
|
18686
|
+
h[8].annotation.target.selector.type === Fr.RECTANGLE ? 0 : (
|
|
18675
18687
|
/*tracked*/
|
|
18676
|
-
h[8].annotation.target.selector.type ===
|
|
18688
|
+
h[8].annotation.target.selector.type === Fr.POLYGON ? 1 : -1
|
|
18677
18689
|
)
|
|
18678
18690
|
);
|
|
18679
18691
|
}
|
|
@@ -18697,7 +18709,7 @@ function vh(r) {
|
|
|
18697
18709
|
ot(t), n = !1;
|
|
18698
18710
|
},
|
|
18699
18711
|
d(h) {
|
|
18700
|
-
h &&
|
|
18712
|
+
h && Ft(i), ~e && s[e].d(h);
|
|
18701
18713
|
}
|
|
18702
18714
|
};
|
|
18703
18715
|
}
|
|
@@ -18729,11 +18741,11 @@ function Cb(r) {
|
|
|
18729
18741
|
ot(o), n = !1;
|
|
18730
18742
|
},
|
|
18731
18743
|
d(s) {
|
|
18732
|
-
s &&
|
|
18744
|
+
s && Ft(e), o && o.d();
|
|
18733
18745
|
}
|
|
18734
18746
|
};
|
|
18735
18747
|
}
|
|
18736
|
-
function
|
|
18748
|
+
function Fb(r) {
|
|
18737
18749
|
let e = !!/*provider*/
|
|
18738
18750
|
r[1], t, i, n = e && yh(r);
|
|
18739
18751
|
return {
|
|
@@ -18758,11 +18770,11 @@ function Nb(r) {
|
|
|
18758
18770
|
ot(n), i = !1;
|
|
18759
18771
|
},
|
|
18760
18772
|
d(o) {
|
|
18761
|
-
o &&
|
|
18773
|
+
o && Ft(t), n && n.d(o);
|
|
18762
18774
|
}
|
|
18763
18775
|
};
|
|
18764
18776
|
}
|
|
18765
|
-
function
|
|
18777
|
+
function Nb(r, e, t) {
|
|
18766
18778
|
let { store: i } = e, { viewer: n } = e, { provider: o } = e, s = [], a;
|
|
18767
18779
|
const h = (u, l) => {
|
|
18768
18780
|
t(2, s = [
|
|
@@ -18796,7 +18808,7 @@ function Fb(r, e, t) {
|
|
|
18796
18808
|
}
|
|
18797
18809
|
class Lb extends pe {
|
|
18798
18810
|
constructor(e) {
|
|
18799
|
-
super(), fe(this, e,
|
|
18811
|
+
super(), fe(this, e, Nb, Fb, Vt, { store: 3, viewer: 0, provider: 1 });
|
|
18800
18812
|
}
|
|
18801
18813
|
}
|
|
18802
18814
|
const gh = (r, e) => {
|
|
@@ -18817,7 +18829,7 @@ const gh = (r, e) => {
|
|
|
18817
18829
|
const a = r.container.getBoundingClientRect(), { padding: h } = n;
|
|
18818
18830
|
let [u, l, c, f] = h ? Array.isArray(h) ? h : [h, h, h, h] : [0, 0, 0, 0];
|
|
18819
18831
|
u = u / a.height, l = l / a.width, c = c / a.height, f = f / a.width;
|
|
18820
|
-
const { minX: p, minY: d, maxX: _, maxY: y } = s.target.selector.geometry.bounds, m = _ - p, v = y - d, g = p - f * m,
|
|
18832
|
+
const { minX: p, minY: d, maxX: _, maxY: y } = s.target.selector.geometry.bounds, m = _ - p, v = y - d, g = p - f * m, x = d - u * v, b = m + (l + f) * m, T = v + (u + c) * v, E = r.viewport.imageToViewportRectangle(g, x, b, T);
|
|
18821
18833
|
r.viewport[t](E, n.immediately);
|
|
18822
18834
|
}, Bb = (r, e) => ju(r, e, "fitBounds"), Gb = (r, e) => ju(r, e, "fitBoundsWithConstraints"), Xb = (r, e = {}) => {
|
|
18823
18835
|
const t = Hu(e, {
|
|
@@ -18870,7 +18882,7 @@ const gh = (r, e) => {
|
|
|
18870
18882
|
}), gh(r, t.theme);
|
|
18871
18883
|
const y = cl(i, a, t.adapter), m = () => {
|
|
18872
18884
|
p.$destroy(), d.$destroy(), _.$destroy(), f.destroy(), a.destroy();
|
|
18873
|
-
}, v = Bb(r, s), g = Gb(r, s),
|
|
18885
|
+
}, v = Bb(r, s), g = Gb(r, s), x = () => u, b = (O, I, w) => $u(O, I, w), T = (O, I) => qu(O, I), E = (O) => {
|
|
18874
18886
|
if (!xh(O))
|
|
18875
18887
|
throw `No drawing tool named ${O}`;
|
|
18876
18888
|
_.$set({ toolName: O });
|
|
@@ -18880,10 +18892,10 @@ const gh = (r, e) => {
|
|
|
18880
18892
|
p.$set({ filter: O }), _.$set({ filter: O });
|
|
18881
18893
|
}, S = (O) => {
|
|
18882
18894
|
p.$set({ style: O }), _.$set({ style: O });
|
|
18883
|
-
},
|
|
18895
|
+
}, M = (O) => (
|
|
18884
18896
|
// @ts-ignore
|
|
18885
18897
|
d.$set({ provider: O })
|
|
18886
|
-
),
|
|
18898
|
+
), F = (O) => gh(r, O), L = (O) => {
|
|
18887
18899
|
u = O, _.$set({ user: O });
|
|
18888
18900
|
};
|
|
18889
18901
|
return {
|
|
@@ -18891,18 +18903,18 @@ const gh = (r, e) => {
|
|
|
18891
18903
|
destroy: m,
|
|
18892
18904
|
fitBounds: v,
|
|
18893
18905
|
fitBoundsWithConstraints: g,
|
|
18894
|
-
getUser:
|
|
18906
|
+
getUser: x,
|
|
18895
18907
|
listDrawingTools: bh,
|
|
18896
18908
|
on: h.on,
|
|
18897
18909
|
off: h.off,
|
|
18898
|
-
registerDrawingTool:
|
|
18910
|
+
registerDrawingTool: b,
|
|
18899
18911
|
registerShapeEditor: T,
|
|
18900
18912
|
setDrawingEnabled: R,
|
|
18901
18913
|
setDrawingTool: E,
|
|
18902
18914
|
setFilter: A,
|
|
18903
|
-
setPresenceProvider:
|
|
18915
|
+
setPresenceProvider: M,
|
|
18904
18916
|
setStyle: S,
|
|
18905
|
-
setTheme:
|
|
18917
|
+
setTheme: F,
|
|
18906
18918
|
setUser: L,
|
|
18907
18919
|
state: i,
|
|
18908
18920
|
viewer: r
|