@codingfactory/mediables-vue 2.18.2 → 2.19.0
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/{PixiFrameExporter-CVa0D6mr.js → PixiFrameExporter-CL1sPbnw.js} +2 -2
- package/dist/{PixiFrameExporter-CVa0D6mr.js.map → PixiFrameExporter-CL1sPbnw.js.map} +1 -1
- package/dist/{PixiFrameExporter-C8Ty9X-z.cjs → PixiFrameExporter-nFehBjPQ.cjs} +2 -2
- package/dist/{PixiFrameExporter-C8Ty9X-z.cjs.map → PixiFrameExporter-nFehBjPQ.cjs.map} +1 -1
- package/dist/components/MediaAlbumPickerModal.vue.d.ts +6 -0
- package/dist/components/MediaLibraryShell.vue.d.ts +5 -0
- package/dist/editor-D85y_zTO.cjs +2 -0
- package/dist/editor-D85y_zTO.cjs.map +1 -0
- package/dist/{editor-4KRKCBKe.js → editor-DAJxTvzM.js} +216 -183
- package/dist/editor-DAJxTvzM.js.map +1 -0
- package/dist/{index-ZHcVI7XG.js → index-BR0szJau.js} +11005 -10797
- package/dist/{index-ZHcVI7XG.js.map → index-BR0szJau.js.map} +1 -1
- package/dist/index-CKYVSPfs.cjs +357 -0
- package/dist/{index-Boyt6ME1.cjs.map → index-CKYVSPfs.cjs.map} +1 -1
- package/dist/mediables-vanilla.cjs +1 -1
- package/dist/mediables-vanilla.mjs +1 -1
- package/dist/mediables-vue.cjs +1 -1
- package/dist/mediables-vue.mjs +2 -2
- package/dist/style.css +1 -1
- package/dist/vanilla-editor/renderer/CropManager.d.ts +9 -1
- package/package.json +1 -1
- package/dist/editor-4KRKCBKe.js.map +0 -1
- package/dist/editor-HgfBAw_0.cjs +0 -2
- package/dist/editor-HgfBAw_0.cjs.map +0 -1
- package/dist/index-Boyt6ME1.cjs +0 -357
|
@@ -1593,9 +1593,9 @@ class ut extends de {
|
|
|
1593
1593
|
t.filters = g ? [g] : null;
|
|
1594
1594
|
}
|
|
1595
1595
|
_fitTextDisplayObjectToRect(e, t, r) {
|
|
1596
|
-
var g,
|
|
1596
|
+
var g, _;
|
|
1597
1597
|
const i = this._normalizeTextBox(t), s = r.x + i.x * r.width, n = r.y + i.y * r.height, o = i.width * r.width, l = i.height * r.height, c = Number((g = this.originalTexture) == null ? void 0 : g.width) || r.width, d = c > 0 ? r.width / c : 1, h = this._textEffectsForLayer(t);
|
|
1598
|
-
e.x = s, e.y = n, e.rotation = this._normalizeDegrees(Number((
|
|
1598
|
+
e.x = s, e.y = n, e.rotation = this._normalizeDegrees(Number((_ = t == null ? void 0 : t.transform) == null ? void 0 : _.rotation) || 0) * Math.PI / 180, e.blendMode = this._textBlendMode(t), e.__textBox = i, e.__textLayout = { x: s, y: n, width: o, height: l, scale: d };
|
|
1599
1599
|
const u = e.__textObject || e, p = e.__textMask || null, m = e.__textEffectMask || null;
|
|
1600
1600
|
if (u.text = this._textContentForLayer(t), u.style = this._textStyleForLayer(t, d, o), u.x = 0, u.y = 0, u.rotation = 0, p && typeof p.clear == "function" && typeof p.rect == "function" && typeof p.fill == "function" && (p.clear(), p.rect(0, 0, o, l).fill(16777215), u.mask = p), m && typeof m.clear == "function" && typeof m.rect == "function" && typeof m.fill == "function") {
|
|
1601
1601
|
const C = this._textEffectPadding(h, d);
|
|
@@ -1604,7 +1604,7 @@ class ut extends de {
|
|
|
1604
1604
|
this._syncTextBackdrop(window.PIXI, e.__textBackdrop, h, d, o, l, m), this._syncTextEffectPrimitive(window.PIXI, e.__textShadow, t, h, "shadow", d, o, m), this._syncTextEffectPrimitive(window.PIXI, e.__textGlow, t, h, "glow", d, o, m);
|
|
1605
1605
|
}
|
|
1606
1606
|
_fitDisplayObjectToRect(e, t, r) {
|
|
1607
|
-
var h, u, p, m, g,
|
|
1607
|
+
var h, u, p, m, g, _, C, k;
|
|
1608
1608
|
const i = this._backgroundFillForLayer(t), s = (i == null ? void 0 : i.fit) || "cover";
|
|
1609
1609
|
if (e.__isTilingBackground) {
|
|
1610
1610
|
e.x = r.x, e.y = r.y, e.width = r.width, e.height = r.height, (u = (h = e.tilePosition) == null ? void 0 : h.set) == null || u.call(h, 0, 0), (m = (p = e.tileScale) == null ? void 0 : p.set) == null || m.call(p, 1, 1);
|
|
@@ -1614,7 +1614,7 @@ class ut extends de {
|
|
|
1614
1614
|
e.x = r.x, e.y = r.y, e.width = r.width, e.height = r.height;
|
|
1615
1615
|
return;
|
|
1616
1616
|
}
|
|
1617
|
-
const n = Number(e.__sourceWidth || ((g = i == null ? void 0 : i.source) == null ? void 0 : g.originalWidth) || ((
|
|
1617
|
+
const n = Number(e.__sourceWidth || ((g = i == null ? void 0 : i.source) == null ? void 0 : g.originalWidth) || ((_ = e.texture) == null ? void 0 : _.width) || r.width), o = Number(e.__sourceHeight || ((C = i == null ? void 0 : i.source) == null ? void 0 : C.originalHeight) || ((k = e.texture) == null ? void 0 : k.height) || r.height);
|
|
1618
1618
|
if (!Number.isFinite(n) || !Number.isFinite(o) || n <= 0 || o <= 0) {
|
|
1619
1619
|
e.x = r.x, e.y = r.y, e.width = r.width, e.height = r.height;
|
|
1620
1620
|
return;
|
|
@@ -1685,7 +1685,7 @@ class ut extends de {
|
|
|
1685
1685
|
* @returns {boolean}
|
|
1686
1686
|
*/
|
|
1687
1687
|
rotateBy(e) {
|
|
1688
|
-
var g,
|
|
1688
|
+
var g, _, C;
|
|
1689
1689
|
const t = this._normalizeDegrees(e);
|
|
1690
1690
|
if (t === 0) return !0;
|
|
1691
1691
|
if (!((g = this.app) != null && g.renderer) || !this.originalTexture || !this.sprite)
|
|
@@ -1693,7 +1693,7 @@ class ut extends de {
|
|
|
1693
1693
|
const r = window.PIXI, i = Math.round(this.originalTexture.width), s = Math.round(this.originalTexture.height);
|
|
1694
1694
|
if (i <= 0 || s <= 0) return !1;
|
|
1695
1695
|
const { width: n, height: o } = this.getRotatedBounds(i, s, t), l = t * Math.PI / 180, c = new r.Container(), d = new r.Sprite(this.originalTexture);
|
|
1696
|
-
(C = (
|
|
1696
|
+
(C = (_ = d.anchor) == null ? void 0 : _.set) == null || C.call(_, 0.5), d.x = n / 2, d.y = o / 2, d.rotation = l, c.addChild(d);
|
|
1697
1697
|
const h = r.RenderTexture.create({ width: n, height: o, resolution: 1 });
|
|
1698
1698
|
try {
|
|
1699
1699
|
this.app.renderer.render({
|
|
@@ -1744,21 +1744,21 @@ class ut extends de {
|
|
|
1744
1744
|
} else
|
|
1745
1745
|
g.push(x);
|
|
1746
1746
|
}
|
|
1747
|
-
let
|
|
1747
|
+
let _ = 0;
|
|
1748
1748
|
for (const x of g) {
|
|
1749
1749
|
const S = typeof x.getExportPadding == "function" ? Number(x.getExportPadding()) || 0 : typeof x._exportPadding == "number" ? x._exportPadding : typeof x.padding == "number" ? x.padding : 0;
|
|
1750
|
-
S > 0 && (
|
|
1750
|
+
S > 0 && (_ += S);
|
|
1751
1751
|
}
|
|
1752
|
-
const C = Math.max(Math.ceil(
|
|
1752
|
+
const C = Math.max(Math.ceil(_), 64), k = (x) => {
|
|
1753
1753
|
var pe, fe, D, me;
|
|
1754
|
-
const S = Math.ceil(o + 2 * x), T = Math.ceil(l + 2 * x), F = new n.Container(),
|
|
1754
|
+
const S = Math.ceil(o + 2 * x), T = Math.ceil(l + 2 * x), F = new n.Container(), L = [], V = (b = null) => {
|
|
1755
1755
|
const w = new n.Sprite(this.originalTexture);
|
|
1756
1756
|
w.x = x, w.y = x, w.scale.set(1, 1), w.alpha = b ? this._layerOpacity(b) : 1, b && this._applyLayerFilterInstances(w, b, {
|
|
1757
1757
|
forExport: !0,
|
|
1758
1758
|
previewToNativeScale: u,
|
|
1759
1759
|
sourceWidth: o,
|
|
1760
1760
|
sourceHeight: l
|
|
1761
|
-
}), g.length > 0 && (w.filters = g, w.filterArea = new n.Rectangle(0, 0, o, l)), F.addChild(w),
|
|
1761
|
+
}), g.length > 0 && (w.filters = g, w.filterArea = new n.Rectangle(0, 0, o, l)), F.addChild(w), L.push(w);
|
|
1762
1762
|
}, M = (b) => {
|
|
1763
1763
|
var z, le, ce;
|
|
1764
1764
|
const w = (z = this._layerDisplayObjects.get(b.id)) == null ? void 0 : z.displayObject, G = (w == null ? void 0 : w.texture) || (this._isSubjectLayer(b) ? this.originalTexture : null);
|
|
@@ -1769,8 +1769,8 @@ class ut extends de {
|
|
|
1769
1769
|
previewToNativeScale: u,
|
|
1770
1770
|
sourceWidth: o,
|
|
1771
1771
|
sourceHeight: l
|
|
1772
|
-
}), F.addChild(O),
|
|
1773
|
-
},
|
|
1772
|
+
}), F.addChild(O), L.push(O), !0;
|
|
1773
|
+
}, R = (b) => {
|
|
1774
1774
|
var le, ce, Te;
|
|
1775
1775
|
const w = this._backgroundFillForLayer(b), G = this._backgroundColorForLayer(b), O = { x, y: x, width: o, height: l };
|
|
1776
1776
|
let z = null;
|
|
@@ -1790,10 +1790,10 @@ class ut extends de {
|
|
|
1790
1790
|
previewToNativeScale: u,
|
|
1791
1791
|
sourceWidth: o,
|
|
1792
1792
|
sourceHeight: l
|
|
1793
|
-
}), F.addChild(z),
|
|
1793
|
+
}), F.addChild(z), L.push(z), !0) : !1;
|
|
1794
1794
|
}, X = (b) => {
|
|
1795
1795
|
const w = this._createTextDisplayObjectForLayer(n, b);
|
|
1796
|
-
return w ? (this._fitTextDisplayObjectToRect(w, b, { x, y: x, width: o, height: l }), w.alpha = this._layerOpacity(b), F.addChild(w),
|
|
1796
|
+
return w ? (this._fitTextDisplayObjectToRect(w, b, { x, y: x, width: o, height: l }), w.alpha = this._layerOpacity(b), F.addChild(w), L.push(w), !0) : !1;
|
|
1797
1797
|
}, ee = p, ne = m;
|
|
1798
1798
|
if (ne) {
|
|
1799
1799
|
for (const b of ee.layers)
|
|
@@ -1810,7 +1810,7 @@ class ut extends de {
|
|
|
1810
1810
|
M(b) || V(b);
|
|
1811
1811
|
continue;
|
|
1812
1812
|
}
|
|
1813
|
-
|
|
1813
|
+
R(b);
|
|
1814
1814
|
}
|
|
1815
1815
|
} else
|
|
1816
1816
|
V();
|
|
@@ -1830,42 +1830,42 @@ class ut extends de {
|
|
|
1830
1830
|
const b = (me = (D = this.app.renderer.extract) == null ? void 0 : D.canvas) == null ? void 0 : me.call(D, oe);
|
|
1831
1831
|
return b ? { canvas: b, width: S, height: T, margin: x, childCount: we } : null;
|
|
1832
1832
|
} finally {
|
|
1833
|
-
for (const b of
|
|
1833
|
+
for (const b of L)
|
|
1834
1834
|
b.filters = null;
|
|
1835
1835
|
F.removeChildren();
|
|
1836
|
-
for (const b of
|
|
1836
|
+
for (const b of L) {
|
|
1837
1837
|
const w = (b == null ? void 0 : b.__ownsTexture) === !0;
|
|
1838
1838
|
b.destroy({ children: !1, texture: w, textureSource: w });
|
|
1839
1839
|
}
|
|
1840
1840
|
F.destroy({ children: !1 }), oe.destroy(!0);
|
|
1841
1841
|
}
|
|
1842
|
-
},
|
|
1842
|
+
}, P = (x, S, T) => {
|
|
1843
1843
|
const F = typeof x.getContext == "function" ? x.getContext("2d") : null;
|
|
1844
1844
|
if (!F) return null;
|
|
1845
|
-
let
|
|
1845
|
+
let L;
|
|
1846
1846
|
try {
|
|
1847
|
-
|
|
1847
|
+
L = F.getImageData(0, 0, S, T).data;
|
|
1848
1848
|
} catch {
|
|
1849
1849
|
return null;
|
|
1850
1850
|
}
|
|
1851
1851
|
const V = 1;
|
|
1852
|
-
let M = S,
|
|
1852
|
+
let M = S, R = T, X = -1, ee = -1;
|
|
1853
1853
|
const ne = 4, oe = S * ne;
|
|
1854
1854
|
for (let D = 0; D < T; D++) {
|
|
1855
1855
|
const me = D * oe;
|
|
1856
1856
|
for (let b = 0; b < S; b++)
|
|
1857
|
-
|
|
1857
|
+
L[me + b * ne + 3] >= V && (b < M && (M = b), b > X && (X = b), D < R && (R = D), D > ee && (ee = D));
|
|
1858
1858
|
}
|
|
1859
1859
|
if (X < 0) return null;
|
|
1860
|
-
const we = X - M + 1, pe = ee -
|
|
1861
|
-
return { x: M, y:
|
|
1860
|
+
const we = X - M + 1, pe = ee - R + 1, fe = M === 0 || R === 0 || X === S - 1 || ee === T - 1;
|
|
1861
|
+
return { x: M, y: R, width: we, height: pe, touchesEdge: fe };
|
|
1862
1862
|
};
|
|
1863
|
-
let
|
|
1863
|
+
let A = null;
|
|
1864
1864
|
try {
|
|
1865
1865
|
let x = k(C);
|
|
1866
1866
|
if (!x)
|
|
1867
1867
|
return null;
|
|
1868
|
-
let S =
|
|
1868
|
+
let S = P(x.canvas, x.width, x.height);
|
|
1869
1869
|
if (!S)
|
|
1870
1870
|
if (m && x.childCount === 0)
|
|
1871
1871
|
S = {
|
|
@@ -1878,25 +1878,25 @@ class ut extends de {
|
|
|
1878
1878
|
else
|
|
1879
1879
|
return null;
|
|
1880
1880
|
if (S.touchesEdge && C < o && C < l) {
|
|
1881
|
-
const M = Math.max(C * 4, 256),
|
|
1882
|
-
if (
|
|
1883
|
-
const X =
|
|
1884
|
-
X && !X.touchesEdge ? (x =
|
|
1881
|
+
const M = Math.max(C * 4, 256), R = k(M);
|
|
1882
|
+
if (R) {
|
|
1883
|
+
const X = P(R.canvas, R.width, R.height);
|
|
1884
|
+
X && !X.touchesEdge ? (x = R, S = X) : (x = R, S = X ?? S);
|
|
1885
1885
|
}
|
|
1886
1886
|
}
|
|
1887
1887
|
let T = S.width, F = S.height;
|
|
1888
1888
|
if (r > 0) {
|
|
1889
1889
|
const M = Math.max(T, F);
|
|
1890
|
-
let
|
|
1891
|
-
i && (
|
|
1890
|
+
let R = r / M;
|
|
1891
|
+
i && (R = Math.min(1, R)), T = Math.max(1, Math.round(T * R)), F = Math.max(1, Math.round(F * R));
|
|
1892
1892
|
}
|
|
1893
1893
|
if (s > 0 && T * F > s) {
|
|
1894
1894
|
const M = Math.sqrt(s / (T * F));
|
|
1895
1895
|
T = Math.max(1, Math.floor(T * M)), F = Math.max(1, Math.floor(F * M));
|
|
1896
1896
|
}
|
|
1897
|
-
const
|
|
1898
|
-
|
|
1899
|
-
const V =
|
|
1897
|
+
const L = document.createElement("canvas");
|
|
1898
|
+
L.width = T, L.height = F;
|
|
1899
|
+
const V = L.getContext("2d");
|
|
1900
1900
|
return V ? (V.drawImage(
|
|
1901
1901
|
x.canvas,
|
|
1902
1902
|
S.x,
|
|
@@ -1907,7 +1907,7 @@ class ut extends de {
|
|
|
1907
1907
|
0,
|
|
1908
1908
|
T,
|
|
1909
1909
|
F
|
|
1910
|
-
),
|
|
1910
|
+
), A = L.toDataURL(`image/${e}`, t), this._lastExportDimensions = { width: T, height: F }, A || null) : null;
|
|
1911
1911
|
} catch {
|
|
1912
1912
|
return null;
|
|
1913
1913
|
}
|
|
@@ -2011,7 +2011,7 @@ class ut extends de {
|
|
|
2011
2011
|
this.sprite = null, this.originalTexture = null, this.baseTexture = null, this._container = null, this.removeAllListeners();
|
|
2012
2012
|
}
|
|
2013
2013
|
}
|
|
2014
|
-
const $e = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M328 112L184 256l144 144"/></svg>', Ge = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M184 112l144 144-144 144"/></svg>', $r = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M338.29 338.29L448 448M256 184v74m-37-37h74"/></svg>', Gr = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M338.29 338.29L448 448M184 221h74"/></svg>', Zr = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M432 320v112H320M80 192V80h112M320 80h112v112M192 432H80V320"/></svg>', pt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M262.29 192.31a64 64 0 1057.4 57.4 64.13 64.13 0 00-57.4-57.4z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M416.39 256a154.34 154.34 0 01-1.53 20.79l45.21 35.46a10.81 10.81 0 012.45 13.75l-42.77 74a10.81 10.81 0 01-13.14 4.59l-44.9-18.08a16.11 16.11 0 00-15.17 1.75A164.48 164.48 0 01325 400.8a15.94 15.94 0 00-8.82 12.14l-6.73 47.89a11.08 11.08 0 01-10.68 9.17h-85.54a11.11 11.11 0 01-10.69-8.87l-6.72-47.82a16.07 16.07 0 00-9-12.22 155.3 155.3 0 01-21.46-12.57 16 16 0 00-15.11-1.71l-44.89 18.07a10.81 10.81 0 01-13.14-4.58l-42.77-74a10.8 10.8 0 012.45-13.75l38.21-30a16.05 16.05 0 006-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 00-6.07-13.94l-38.19-30A10.81 10.81 0 0149.48 186l42.77-74a10.81 10.81 0 0113.14-4.59l44.9 18.08a16.11 16.11 0 0015.17-1.75A164.48 164.48 0 01187 111.2a15.94 15.94 0 008.82-12.14l6.73-47.89A11.08 11.08 0 01213.23 42h85.54a11.11 11.11 0 0110.69 8.87l6.72 47.82a16.07 16.07 0 009 12.22 155.3 155.3 0 0121.46 12.57 16 16 0 0015.11 1.71l44.89-18.07a10.81 10.81 0 0113.14 4.58l42.77 74a10.8 10.8 0 01-2.45 13.75l-38.21 30a16.05 16.05 0 00-6.05 14.08c.33 4.14.55 8.3.55 12.47z"/></svg>', ft = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M400 320c0 88.37-55.63 144-144 144s-144-55.63-144-144c0-94.83 103.23-222.85 134.89-259.88a12 12 0 0118.23 0C296.77 97.15 400 225.17 400 320z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M344 328a72 72 0 01-72 72"/></svg>', mt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32" d="M430.11 347.9c-6.6-6.1-16.3-7.6-24.6-9-11.5-1.9-15.9-4-22.6-10-14.3-12.7-14.3-31.1 0-43.8l30.3-26.9c46.4-41 46.4-108.2 0-149.2-34.2-30.1-80.1-45-127.8-45-55.7 0-113.9 20.3-158.8 60.1-83.5 73.8-83.5 194.7 0 268.5 41.5 36.7 97.5 55 152.9 55.4h1.7c55.4 0 110-17.9 148.8-52.4 14.4-12.7 11.99-36.6.1-47.7z"/><circle cx="144" cy="208" r="32"/><circle cx="152" cy="311" r="32"/><circle cx="224" cy="144" r="32"/><circle cx="256" cy="367" r="32"/><circle cx="328" cy="144" r="32"/></svg>', gt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M259.92 262.91L216.4 149.77a9 9 0 00-16.8 0l-43.52 113.14a9 9 0 01-5.17 5.17L37.77 311.6a9 9 0 000 16.8l113.14 43.52a9 9 0 015.17 5.17l43.52 113.14a9 9 0 0016.8 0l43.52-113.14a9 9 0 015.17-5.17l113.14-43.52a9 9 0 000-16.8l-113.14-43.52a9 9 0 01-5.17-5.17zM108 68L88 16 68 68 16 88l52 20 20 52 20-52 52-20-52-20zM426.67 117.33L400 48l-26.67 69.33L304 144l69.33 26.67L400 240l26.67-69.33L496 144l-69.33-26.67z"/></svg>', bt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M176 112l80-80 80 80M255.98 32l.02 448M176 400l80 80 80-80M400 176l80 80-80 80M112 176l-80 80 80 80M32 256h448"/></svg>', yt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M452.37 59.63h0a40.49 40.49 0 00-57.26 0L184 294.74c23.08 4.7 46.12 27.29 49.26 49.26l219.11-227.11a40.49 40.49 0 000-57.26z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M138 336c-29.88 0-54 24.5-54 54.86 0 23.95-20.67 36.57-34 44.78 15.08 8.08 32.23 12.36 50 12.36 48.49 0 88-38.89 88-88 0-30.36-24.12-54-50-54z"/></svg>', _t = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M315.27 33L96 304h128l-31.51 173.23a2.36 2.36 0 002.33 2.77h0a2.36 2.36 0 001.89-.95L416 208H288l31.66-173.25a2.45 2.45 0 00-2.44-2.75h0a2.42 2.42 0 00-1.95 1z"/></svg>', Ze = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M144 48v272a48 48 0 0048 48h272"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M368 464V192a48 48 0 00-48-48H48"/></svg>', xt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M380.93 57.37A32 32 0 00358.3 48H94.22A46.21 46.21 0 0048 94.22v323.56A46.21 46.21 0 0094.22 464h323.56A46.36 46.36 0 00464 417.78V153.7a32 32 0 00-9.37-22.63zM256 416a64 64 0 1164-64 63.92 63.92 0 01-64 64zm48-224H112a16 16 0 01-16-16v-64a16 16 0 0116-16h192a16 16 0 0116 16v64a16 16 0 01-16 16z"/></svg>', Ae = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M368 368L144 144M368 144L144 368"/></svg>', Ke = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M320 146s24.36-12-64-12a160 160 0 10160 160"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M256 58l80 80-80 80"/></svg>', wt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M176 112l-64 64 64 64"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M112 176h176a112 112 0 110 224H160"/></svg>', vt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M336 112l64 64-64 64"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M400 176H224a112 112 0 100 224h128"/></svg>', Ct = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M112 112l20 320c.95 18.49 14.4 32 32 32h184c17.67 0 30.87-13.51 32-32l20-320"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M80 112h352"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M192 112V72h0a23.93 23.93 0 0124-24h80a23.93 23.93 0 0124 24h0v40M256 176v224M184 176l8 224M328 176l-8 224"/></svg>', kt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M64 192v-72a40 40 0 0140-40h75.89a40 40 0 0122.19 6.72l27.84 18.56a40 40 0 0022.19 6.72H408a40 40 0 0140 40v40"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M479.9 226.55L463.68 392a40 40 0 01-39.93 40H88.25a40 40 0 01-39.93-40L32.1 226.55A32 32 0 0164 192h384.1a32 32 0 0131.8 34.55z"/></svg>', Me = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M416 128L192 384l-96-96"/></svg>', St = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32" d="M48 256l208 112 208-112-208-112L48 256z"/><path fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32" d="M48 336l208 112 208-112M48 176L256 64l208 112"/></svg>', Kr = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32" d="M48 256s80-144 208-144 208 144 208 144-80 144-208 144S48 256 48 256z"/><circle cx="256" cy="256" r="64" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/></svg>', Jr = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M432 448L80 64M160 160c-67.2 36.8-112 96-112 96s80 144 208 144c35.8 0 68.4-11.3 96-28.1M224.4 113.8A199.6 199.6 0 01256 112c128 0 208 144 208 144a334.2 334.2 0 01-65.1 78.6"/><path fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32" d="M213.3 213.3A64 64 0 10298.7 298.7"/></svg>', Qr = '<svg viewBox="0 0 512 512" width="20" height="20"><rect x="96" y="208" width="320" height="240" rx="32" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M160 208v-64a96 96 0 01192 0v64"/></svg>', ei = '<svg viewBox="0 0 512 512" width="20" height="20"><rect x="96" y="208" width="320" height="240" rx="32" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M160 208v-64a96 96 0 01168-63.7"/></svg>', ti = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32" d="M96 352l-32 96 96-32L421.5 154.5a45.3 45.3 0 000-64h0a45.3 45.3 0 00-64 0L96 352z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M320 128l64 64"/></svg>', ri = '<svg viewBox="0 0 512 512" width="20" height="20"><rect x="144" y="144" width="288" height="288" rx="32" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32" d="M80 368V112a32 32 0 0132-32h256"/></svg>', Ft = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M96 112V80h320v32M256 80v352M184 432h144"/></svg>', Mt = '<svg viewBox="0 0 512 512" width="20" height="20"><rect x="64" y="64" width="384" height="384" rx="48" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/></svg>', Pt = '<svg viewBox="0 0 512 512" width="20" height="20"><circle cx="256" cy="256" r="208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>', At = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M80 96h64l64 320h64l64-160h96"/></svg>', Le = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M256 48v48M256 416v48M403.08 108.92l-33.94 33.94M142.86 369.14l-33.94 33.94M464 256h-48M96 256H48M403.08 403.08l-33.94-33.94M142.86 142.86l-33.94-33.94"/><circle cx="256" cy="256" r="80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"/></svg>', Re = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M160 136c0-30.62 4.51-61.61 16-88C99.57 81.27 48 159.32 48 248c0 119.29 96.71 216 216 216 88.68 0 166.73-51.57 200-128-26.39 11.49-57.38 16-88 16-119.29 0-216-96.71-216-216z"/></svg>', Nt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M436 80H76a44.05 44.05 0 00-44 44v264a44.05 44.05 0 0044 44h360a44.05 44.05 0 0044-44V124a44.05 44.05 0 00-44-44z"/><circle cx="256" cy="256" r="80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M220 80v56M292 80v56M220 376v56M292 376v56M80 144h56M80 224h56M80 304h56M376 144h56M376 224h56M376 304h56"/></svg>', Tt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M344 144c-3.92 52.87-44 96-88 96s-84.15-43.12-88-96c-4-55 35-96 88-96s92 42 88 96z"/><path fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32" d="M256 304c-87 0-175.3 48-191.64 138.6C62.39 453.52 68.57 464 80 464h352c11.44 0 17.62-10.48 15.65-21.4C431.3 352 343 304 256 304z"/></svg>', Ne = [
|
|
2014
|
+
const $e = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M328 112L184 256l144 144"/></svg>', Ge = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M184 112l144 144-144 144"/></svg>', $r = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M338.29 338.29L448 448M256 184v74m-37-37h74"/></svg>', Gr = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M338.29 338.29L448 448M184 221h74"/></svg>', Zr = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M432 320v112H320M80 192V80h112M320 80h112v112M192 432H80V320"/></svg>', pt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M262.29 192.31a64 64 0 1057.4 57.4 64.13 64.13 0 00-57.4-57.4z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M416.39 256a154.34 154.34 0 01-1.53 20.79l45.21 35.46a10.81 10.81 0 012.45 13.75l-42.77 74a10.81 10.81 0 01-13.14 4.59l-44.9-18.08a16.11 16.11 0 00-15.17 1.75A164.48 164.48 0 01325 400.8a15.94 15.94 0 00-8.82 12.14l-6.73 47.89a11.08 11.08 0 01-10.68 9.17h-85.54a11.11 11.11 0 01-10.69-8.87l-6.72-47.82a16.07 16.07 0 00-9-12.22 155.3 155.3 0 01-21.46-12.57 16 16 0 00-15.11-1.71l-44.89 18.07a10.81 10.81 0 01-13.14-4.58l-42.77-74a10.8 10.8 0 012.45-13.75l38.21-30a16.05 16.05 0 006-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 00-6.07-13.94l-38.19-30A10.81 10.81 0 0149.48 186l42.77-74a10.81 10.81 0 0113.14-4.59l44.9 18.08a16.11 16.11 0 0015.17-1.75A164.48 164.48 0 01187 111.2a15.94 15.94 0 008.82-12.14l6.73-47.89A11.08 11.08 0 01213.23 42h85.54a11.11 11.11 0 0110.69 8.87l6.72 47.82a16.07 16.07 0 009 12.22 155.3 155.3 0 0121.46 12.57 16 16 0 0015.11 1.71l44.89-18.07a10.81 10.81 0 0113.14 4.58l42.77 74a10.8 10.8 0 01-2.45 13.75l-38.21 30a16.05 16.05 0 00-6.05 14.08c.33 4.14.55 8.3.55 12.47z"/></svg>', ft = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M400 320c0 88.37-55.63 144-144 144s-144-55.63-144-144c0-94.83 103.23-222.85 134.89-259.88a12 12 0 0118.23 0C296.77 97.15 400 225.17 400 320z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M344 328a72 72 0 01-72 72"/></svg>', mt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32" d="M430.11 347.9c-6.6-6.1-16.3-7.6-24.6-9-11.5-1.9-15.9-4-22.6-10-14.3-12.7-14.3-31.1 0-43.8l30.3-26.9c46.4-41 46.4-108.2 0-149.2-34.2-30.1-80.1-45-127.8-45-55.7 0-113.9 20.3-158.8 60.1-83.5 73.8-83.5 194.7 0 268.5 41.5 36.7 97.5 55 152.9 55.4h1.7c55.4 0 110-17.9 148.8-52.4 14.4-12.7 11.99-36.6.1-47.7z"/><circle cx="144" cy="208" r="32"/><circle cx="152" cy="311" r="32"/><circle cx="224" cy="144" r="32"/><circle cx="256" cy="367" r="32"/><circle cx="328" cy="144" r="32"/></svg>', gt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M259.92 262.91L216.4 149.77a9 9 0 00-16.8 0l-43.52 113.14a9 9 0 01-5.17 5.17L37.77 311.6a9 9 0 000 16.8l113.14 43.52a9 9 0 015.17 5.17l43.52 113.14a9 9 0 0016.8 0l43.52-113.14a9 9 0 015.17-5.17l113.14-43.52a9 9 0 000-16.8l-113.14-43.52a9 9 0 01-5.17-5.17zM108 68L88 16 68 68 16 88l52 20 20 52 20-52 52-20-52-20zM426.67 117.33L400 48l-26.67 69.33L304 144l69.33 26.67L400 240l26.67-69.33L496 144l-69.33-26.67z"/></svg>', bt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M176 112l80-80 80 80M255.98 32l.02 448M176 400l80 80 80-80M400 176l80 80-80 80M112 176l-80 80 80 80M32 256h448"/></svg>', _t = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M452.37 59.63h0a40.49 40.49 0 00-57.26 0L184 294.74c23.08 4.7 46.12 27.29 49.26 49.26l219.11-227.11a40.49 40.49 0 000-57.26z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M138 336c-29.88 0-54 24.5-54 54.86 0 23.95-20.67 36.57-34 44.78 15.08 8.08 32.23 12.36 50 12.36 48.49 0 88-38.89 88-88 0-30.36-24.12-54-50-54z"/></svg>', yt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M315.27 33L96 304h128l-31.51 173.23a2.36 2.36 0 002.33 2.77h0a2.36 2.36 0 001.89-.95L416 208H288l31.66-173.25a2.45 2.45 0 00-2.44-2.75h0a2.42 2.42 0 00-1.95 1z"/></svg>', Ze = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M144 48v272a48 48 0 0048 48h272"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M368 464V192a48 48 0 00-48-48H48"/></svg>', xt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M380.93 57.37A32 32 0 00358.3 48H94.22A46.21 46.21 0 0048 94.22v323.56A46.21 46.21 0 0094.22 464h323.56A46.36 46.36 0 00464 417.78V153.7a32 32 0 00-9.37-22.63zM256 416a64 64 0 1164-64 63.92 63.92 0 01-64 64zm48-224H112a16 16 0 01-16-16v-64a16 16 0 0116-16h192a16 16 0 0116 16v64a16 16 0 01-16 16z"/></svg>', Pe = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M368 368L144 144M368 144L144 368"/></svg>', Ke = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M320 146s24.36-12-64-12a160 160 0 10160 160"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M256 58l80 80-80 80"/></svg>', wt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M176 112l-64 64 64 64"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M112 176h176a112 112 0 110 224H160"/></svg>', vt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M336 112l64 64-64 64"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M400 176H224a112 112 0 100 224h128"/></svg>', Ct = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M112 112l20 320c.95 18.49 14.4 32 32 32h184c17.67 0 30.87-13.51 32-32l20-320"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M80 112h352"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M192 112V72h0a23.93 23.93 0 0124-24h80a23.93 23.93 0 0124 24h0v40M256 176v224M184 176l8 224M328 176l-8 224"/></svg>', kt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M64 192v-72a40 40 0 0140-40h75.89a40 40 0 0122.19 6.72l27.84 18.56a40 40 0 0022.19 6.72H408a40 40 0 0140 40v40"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M479.9 226.55L463.68 392a40 40 0 01-39.93 40H88.25a40 40 0 01-39.93-40L32.1 226.55A32 32 0 0164 192h384.1a32 32 0 0131.8 34.55z"/></svg>', Me = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M416 128L192 384l-96-96"/></svg>', St = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32" d="M48 256l208 112 208-112-208-112L48 256z"/><path fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32" d="M48 336l208 112 208-112M48 176L256 64l208 112"/></svg>', Kr = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32" d="M48 256s80-144 208-144 208 144 208 144-80 144-208 144S48 256 48 256z"/><circle cx="256" cy="256" r="64" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/></svg>', Jr = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M432 448L80 64M160 160c-67.2 36.8-112 96-112 96s80 144 208 144c35.8 0 68.4-11.3 96-28.1M224.4 113.8A199.6 199.6 0 01256 112c128 0 208 144 208 144a334.2 334.2 0 01-65.1 78.6"/><path fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32" d="M213.3 213.3A64 64 0 10298.7 298.7"/></svg>', Qr = '<svg viewBox="0 0 512 512" width="20" height="20"><rect x="96" y="208" width="320" height="240" rx="32" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M160 208v-64a96 96 0 01192 0v64"/></svg>', ei = '<svg viewBox="0 0 512 512" width="20" height="20"><rect x="96" y="208" width="320" height="240" rx="32" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M160 208v-64a96 96 0 01168-63.7"/></svg>', ti = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32" d="M96 352l-32 96 96-32L421.5 154.5a45.3 45.3 0 000-64h0a45.3 45.3 0 00-64 0L96 352z"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M320 128l64 64"/></svg>', ri = '<svg viewBox="0 0 512 512" width="20" height="20"><rect x="144" y="144" width="288" height="288" rx="32" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32" d="M80 368V112a32 32 0 0132-32h256"/></svg>', Ft = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M96 112V80h320v32M256 80v352M184 432h144"/></svg>', Mt = '<svg viewBox="0 0 512 512" width="20" height="20"><rect x="64" y="64" width="384" height="384" rx="48" fill="none" stroke="currentColor" stroke-linejoin="round" stroke-width="32"/></svg>', At = '<svg viewBox="0 0 512 512" width="20" height="20"><circle cx="256" cy="256" r="208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/></svg>', Pt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M80 96h64l64 320h64l64-160h96"/></svg>', Re = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M256 48v48M256 416v48M403.08 108.92l-33.94 33.94M142.86 369.14l-33.94 33.94M464 256h-48M96 256H48M403.08 403.08l-33.94-33.94M142.86 142.86l-33.94-33.94"/><circle cx="256" cy="256" r="80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"/></svg>', Le = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M160 136c0-30.62 4.51-61.61 16-88C99.57 81.27 48 159.32 48 248c0 119.29 96.71 216 216 216 88.68 0 166.73-51.57 200-128-26.39 11.49-57.38 16-88 16-119.29 0-216-96.71-216-216z"/></svg>', Nt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M436 80H76a44.05 44.05 0 00-44 44v264a44.05 44.05 0 0044 44h360a44.05 44.05 0 0044-44V124a44.05 44.05 0 00-44-44z"/><circle cx="256" cy="256" r="80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M220 80v56M292 80v56M220 376v56M292 376v56M80 144h56M80 224h56M80 304h56M376 144h56M376 224h56M376 304h56"/></svg>', Tt = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M344 144c-3.92 52.87-44 96-88 96s-84.15-43.12-88-96c-4-55 35-96 88-96s92 42 88 96z"/><path fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32" d="M256 304c-87 0-175.3 48-191.64 138.6C62.39 453.52 68.57 464 80 464h352c11.44 0 17.62-10.48 15.65-21.4C431.3 352 343 304 256 304z"/></svg>', Ne = [
|
|
2015
2015
|
{
|
|
2016
2016
|
id: "adjust",
|
|
2017
2017
|
name: "Adjust",
|
|
@@ -2046,7 +2046,7 @@ const $e = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none"
|
|
|
2046
2046
|
{
|
|
2047
2047
|
id: "light",
|
|
2048
2048
|
name: "Light",
|
|
2049
|
-
icon:
|
|
2049
|
+
icon: yt,
|
|
2050
2050
|
registryCategories: ["light"]
|
|
2051
2051
|
},
|
|
2052
2052
|
{
|
|
@@ -2063,7 +2063,7 @@ const $e = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none"
|
|
|
2063
2063
|
{
|
|
2064
2064
|
id: "background",
|
|
2065
2065
|
name: "Background",
|
|
2066
|
-
icon:
|
|
2066
|
+
icon: _t
|
|
2067
2067
|
},
|
|
2068
2068
|
{
|
|
2069
2069
|
id: "layers",
|
|
@@ -2077,10 +2077,10 @@ const $e = '<svg viewBox="0 0 512 512" width="20" height="20"><path fill="none"
|
|
|
2077
2077
|
}
|
|
2078
2078
|
], zt = Object.fromEntries(
|
|
2079
2079
|
Ne.filter((a) => Array.isArray(a.registryCategories) && a.registryCategories.length > 0).map((a) => [a.id, a.registryCategories])
|
|
2080
|
-
),
|
|
2080
|
+
), Rt = Object.fromEntries(
|
|
2081
2081
|
Ne.filter((a) => Array.isArray(a.registryCategories)).flatMap((a) => a.registryCategories.map((e) => [e, a.id]))
|
|
2082
2082
|
);
|
|
2083
|
-
function
|
|
2083
|
+
function Lt(a) {
|
|
2084
2084
|
return zt[a] || [a];
|
|
2085
2085
|
}
|
|
2086
2086
|
class Bt extends de {
|
|
@@ -2119,7 +2119,7 @@ class Bt extends de {
|
|
|
2119
2119
|
*/
|
|
2120
2120
|
getFiltersByCategory(e) {
|
|
2121
2121
|
if (!this._filterRegistry) return [];
|
|
2122
|
-
const t =
|
|
2122
|
+
const t = Lt(e), r = [], i = /* @__PURE__ */ new Set();
|
|
2123
2123
|
for (const s of t) {
|
|
2124
2124
|
const n = this._filterRegistry.getFiltersByCategory(s) || [];
|
|
2125
2125
|
for (const o of n)
|
|
@@ -2358,18 +2358,18 @@ class Bt extends de {
|
|
|
2358
2358
|
const m = this.getFilterDef(p);
|
|
2359
2359
|
if (!m || !m.createFilter || typeof m.createFilter != "function")
|
|
2360
2360
|
return;
|
|
2361
|
-
const g = this.state.getFilterValues(p),
|
|
2361
|
+
const g = this.state.getFilterValues(p), _ = m.defaultParams ? { ...m.defaultParams } : {};
|
|
2362
2362
|
m.controls && Array.isArray(m.controls) && m.controls.forEach((N) => {
|
|
2363
2363
|
const ue = N.property || N.id;
|
|
2364
|
-
|
|
2364
|
+
_[ue] = g[N.id] ?? N.default;
|
|
2365
2365
|
});
|
|
2366
2366
|
const C = new Set((m.controls || []).map((N) => N.id));
|
|
2367
2367
|
for (const [N, ue] of Object.entries(g))
|
|
2368
|
-
C.has(N) || (
|
|
2369
|
-
const k = this.renderer.sprite,
|
|
2370
|
-
|
|
2371
|
-
const
|
|
2372
|
-
|
|
2368
|
+
C.has(N) || (_[N] = ue);
|
|
2369
|
+
const k = this.renderer.sprite, P = this.renderer.originalTexture;
|
|
2370
|
+
_._sourceWidth = Math.round((P == null ? void 0 : P.width) || (k == null ? void 0 : k.width) || 0), _._sourceHeight = Math.round((P == null ? void 0 : P.height) || (k == null ? void 0 : k.height) || 0);
|
|
2371
|
+
const A = m.createFilter(_);
|
|
2372
|
+
A && (r.push(A), this.instances[p] = A);
|
|
2373
2373
|
} catch {
|
|
2374
2374
|
i.push(p);
|
|
2375
2375
|
}
|
|
@@ -2440,15 +2440,28 @@ const J = class J extends de {
|
|
|
2440
2440
|
return null;
|
|
2441
2441
|
}
|
|
2442
2442
|
/**
|
|
2443
|
-
*
|
|
2443
|
+
* Return the numeric aspect ratio that the crop rect must obey, accounting
|
|
2444
|
+
* for both the shape (circle/square force 1:1) and the explicit aspect
|
|
2445
|
+
* setting. Returns null when the crop is free-form.
|
|
2446
|
+
*/
|
|
2447
|
+
_getEffectiveTargetAspect() {
|
|
2448
|
+
const e = this.state.get("crop.shape");
|
|
2449
|
+
if (e === "circle" || e === "square") return 1;
|
|
2450
|
+
const t = this.state.get("crop.aspect");
|
|
2451
|
+
return !t || t === "free" ? null : this._getAspectRatio(t);
|
|
2452
|
+
}
|
|
2453
|
+
/**
|
|
2454
|
+
* Apply aspect ratio constraint to crop rect. Honours shape (circle/square
|
|
2455
|
+
* force 1:1) so the post-drag correction agrees with the effective ratio
|
|
2456
|
+
* the edge-handle drag code targets.
|
|
2444
2457
|
*/
|
|
2445
2458
|
applyAspectRatio() {
|
|
2446
|
-
const e = this.state.get("crop.rect")
|
|
2447
|
-
if (!e
|
|
2448
|
-
const
|
|
2449
|
-
if (!
|
|
2450
|
-
const
|
|
2451
|
-
Math.abs(
|
|
2459
|
+
const e = this.state.get("crop.rect");
|
|
2460
|
+
if (!e) return;
|
|
2461
|
+
const t = this._getEffectiveTargetAspect();
|
|
2462
|
+
if (!t) return;
|
|
2463
|
+
const r = e.width / e.height;
|
|
2464
|
+
Math.abs(r - t) < 0.01 || (r > t ? e.width = e.height * t : e.height = e.width / t, this.state.set("crop.rect", e));
|
|
2452
2465
|
}
|
|
2453
2466
|
/**
|
|
2454
2467
|
* Constrain crop rect to bounds
|
|
@@ -2533,8 +2546,8 @@ const J = class J extends de {
|
|
|
2533
2546
|
if (!l) return;
|
|
2534
2547
|
const c = this.state.get("crop.shape");
|
|
2535
2548
|
if (o.save(), c === "circle") {
|
|
2536
|
-
const
|
|
2537
|
-
o.beginPath(), o.arc(
|
|
2549
|
+
const _ = l.x + l.width / 2, C = l.y + l.height / 2, k = Math.min(l.width, l.height) / 2;
|
|
2550
|
+
o.beginPath(), o.arc(_, C, k, 0, Math.PI * 2), o.clip();
|
|
2538
2551
|
} else
|
|
2539
2552
|
o.beginPath(), o.rect(l.x, l.y, l.width, l.height), o.clip();
|
|
2540
2553
|
o.clearRect(l.x, l.y, l.width, l.height), o.restore(), o.strokeStyle = "#ffffff", o.lineWidth = 2, o.setLineDash([5, 5]), c === "circle" ? (o.beginPath(), o.arc(
|
|
@@ -2545,8 +2558,8 @@ const J = class J extends de {
|
|
|
2545
2558
|
Math.PI * 2
|
|
2546
2559
|
), o.stroke()) : o.strokeRect(l.x, l.y, l.width, l.height), o.setLineDash([]), o.strokeStyle = "rgba(255,255,255,0.3)", o.lineWidth = 1;
|
|
2547
2560
|
const d = l.width / 3, h = l.height / 3;
|
|
2548
|
-
for (let
|
|
2549
|
-
o.beginPath(), o.moveTo(l.x + d *
|
|
2561
|
+
for (let _ = 1; _ <= 2; _++)
|
|
2562
|
+
o.beginPath(), o.moveTo(l.x + d * _, l.y), o.lineTo(l.x + d * _, l.y + l.height), o.stroke(), o.beginPath(), o.moveTo(l.x, l.y + h * _), o.lineTo(l.x + l.width, l.y + h * _), o.stroke();
|
|
2550
2563
|
const u = this.HANDLE_SIZE, p = [
|
|
2551
2564
|
{ x: l.x, y: l.y, m: "resize-nw" },
|
|
2552
2565
|
{ x: l.x + l.width, y: l.y, m: "resize-ne" },
|
|
@@ -2558,9 +2571,9 @@ const J = class J extends de {
|
|
|
2558
2571
|
{ x: l.x, y: l.y + l.height / 2, m: "w" },
|
|
2559
2572
|
{ x: l.x + l.width, y: l.y + l.height / 2, m: "e" }
|
|
2560
2573
|
], g = [...p, ...m];
|
|
2561
|
-
for (const
|
|
2562
|
-
const C = this._hoverMode ===
|
|
2563
|
-
o.beginPath(), o.rect(
|
|
2574
|
+
for (const _ of g) {
|
|
2575
|
+
const C = this._hoverMode === _.m, k = C ? u + 4 : u;
|
|
2576
|
+
o.beginPath(), o.rect(_.x - k / 2, _.y - k / 2, k, k), o.fillStyle = C ? "#4da3ff" : "#ffffff", o.strokeStyle = "rgba(0,0,0,0.6)", o.lineWidth = 1, o.fill(), o.stroke();
|
|
2564
2577
|
}
|
|
2565
2578
|
}
|
|
2566
2579
|
/**
|
|
@@ -2588,33 +2601,53 @@ const J = class J extends de {
|
|
|
2588
2601
|
* Handle pointer move event
|
|
2589
2602
|
*/
|
|
2590
2603
|
_handlePointerMove(e) {
|
|
2591
|
-
var
|
|
2604
|
+
var c, d, h, u;
|
|
2592
2605
|
const t = this.renderer.app;
|
|
2593
2606
|
if (!t) return;
|
|
2594
2607
|
const r = e.global;
|
|
2595
2608
|
if (!this._isDragging || !this._dragStart || !this._startRect) {
|
|
2596
|
-
this._hoverMode = this._hitHandle(r.x, r.y), t.stage.cursor = this._hoverMode === "move" ? "move" : this._hoverMode === "n" || this._hoverMode === "s" ? "ns-resize" : this._hoverMode === "e" || this._hoverMode === "w" ? "ew-resize" : (
|
|
2609
|
+
this._hoverMode = this._hitHandle(r.x, r.y), t.stage.cursor = this._hoverMode === "move" ? "move" : this._hoverMode === "n" || this._hoverMode === "s" ? "ns-resize" : this._hoverMode === "e" || this._hoverMode === "w" ? "ew-resize" : (c = this._hoverMode) != null && c.endsWith("nw") || (d = this._hoverMode) != null && d.endsWith("se") ? "nwse-resize" : (h = this._hoverMode) != null && h.endsWith("ne") || (u = this._hoverMode) != null && u.endsWith("sw") ? "nesw-resize" : "crosshair", this.drawOverlay();
|
|
2597
2610
|
return;
|
|
2598
2611
|
}
|
|
2599
2612
|
const i = this.state.get("crop.rect");
|
|
2600
2613
|
if (!i) return;
|
|
2601
|
-
const s = r.x - this._dragStart.x, n = r.y - this._dragStart.y;
|
|
2614
|
+
const s = r.x - this._dragStart.x, n = r.y - this._dragStart.y, o = this._getEffectiveTargetAspect();
|
|
2602
2615
|
switch (this._dragMode) {
|
|
2603
2616
|
case "move":
|
|
2604
2617
|
i.x = this._startRect.x + s, i.y = this._startRect.y + n;
|
|
2605
2618
|
break;
|
|
2606
|
-
case "n":
|
|
2607
|
-
|
|
2619
|
+
case "n": {
|
|
2620
|
+
const p = this._startRect.height - n;
|
|
2621
|
+
if (i.y = this._startRect.y + n, i.height = p, o) {
|
|
2622
|
+
const m = p * o;
|
|
2623
|
+
i.x = this._startRect.x + (this._startRect.width - m) / 2, i.width = m;
|
|
2624
|
+
}
|
|
2608
2625
|
break;
|
|
2609
|
-
|
|
2610
|
-
|
|
2626
|
+
}
|
|
2627
|
+
case "s": {
|
|
2628
|
+
const p = this._startRect.height + n;
|
|
2629
|
+
if (i.height = p, o) {
|
|
2630
|
+
const m = p * o;
|
|
2631
|
+
i.x = this._startRect.x + (this._startRect.width - m) / 2, i.width = m;
|
|
2632
|
+
}
|
|
2611
2633
|
break;
|
|
2612
|
-
|
|
2613
|
-
|
|
2634
|
+
}
|
|
2635
|
+
case "w": {
|
|
2636
|
+
const p = this._startRect.width - s;
|
|
2637
|
+
if (i.x = this._startRect.x + s, i.width = p, o) {
|
|
2638
|
+
const m = p / o;
|
|
2639
|
+
i.y = this._startRect.y + (this._startRect.height - m) / 2, i.height = m;
|
|
2640
|
+
}
|
|
2614
2641
|
break;
|
|
2615
|
-
|
|
2616
|
-
|
|
2642
|
+
}
|
|
2643
|
+
case "e": {
|
|
2644
|
+
const p = this._startRect.width + s;
|
|
2645
|
+
if (i.width = p, o) {
|
|
2646
|
+
const m = p / o;
|
|
2647
|
+
i.y = this._startRect.y + (this._startRect.height - m) / 2, i.height = m;
|
|
2648
|
+
}
|
|
2617
2649
|
break;
|
|
2650
|
+
}
|
|
2618
2651
|
case "resize-nw":
|
|
2619
2652
|
i.x = this._startRect.x + s, i.y = this._startRect.y + n, i.width = this._startRect.width - s, i.height = this._startRect.height - n;
|
|
2620
2653
|
break;
|
|
@@ -2684,24 +2717,24 @@ const J = class J extends de {
|
|
|
2684
2717
|
const s = window.PIXI, n = this.renderer.zoom, o = r.width / t.width, l = r.height / t.height, c = (i.x - t.x) * o, d = (i.y - t.y) * l;
|
|
2685
2718
|
let h = Math.round(Math.max(1, i.width * o)), u = Math.round(Math.max(1, i.height * l)), p = Math.round(c), m = Math.round(d);
|
|
2686
2719
|
if (h <= 0 || u <= 0) return null;
|
|
2687
|
-
const g = new s.Container(),
|
|
2720
|
+
const g = new s.Container(), _ = new s.Sprite(r);
|
|
2688
2721
|
if (this.state.get("crop.shape") === "circle") {
|
|
2689
|
-
const F = Math.round(Math.max(h, u)),
|
|
2690
|
-
p = Math.round(
|
|
2722
|
+
const F = Math.round(Math.max(h, u)), L = p + h / 2, V = m + u / 2;
|
|
2723
|
+
p = Math.round(L - F / 2), m = Math.round(V - F / 2), h = u = F;
|
|
2691
2724
|
const M = new s.Graphics();
|
|
2692
|
-
typeof M.circle == "function" && typeof M.fill == "function" ? M.circle(h / 2, u / 2, h / 2).fill(16777215) : (M.beginFill(16777215, 1), M.drawCircle(h / 2, u / 2, h / 2), M.endFill()),
|
|
2725
|
+
typeof M.circle == "function" && typeof M.fill == "function" ? M.circle(h / 2, u / 2, h / 2).fill(16777215) : (M.beginFill(16777215, 1), M.drawCircle(h / 2, u / 2, h / 2), M.endFill()), _.mask = M, g.addChild(M);
|
|
2693
2726
|
}
|
|
2694
|
-
|
|
2727
|
+
_.x = -p, _.y = -m, g.addChild(_);
|
|
2695
2728
|
const k = s.RenderTexture.create({ width: h, height: u });
|
|
2696
2729
|
e.renderer.render({
|
|
2697
2730
|
container: g,
|
|
2698
2731
|
target: k,
|
|
2699
2732
|
clear: !0
|
|
2700
2733
|
}), g.destroy({ children: !0 });
|
|
2701
|
-
const
|
|
2702
|
-
|
|
2703
|
-
const
|
|
2704
|
-
e.stage.addChild(
|
|
2734
|
+
const P = this.renderer.originalTexture;
|
|
2735
|
+
P && P !== this.renderer.baseTexture && P.destroy(!0), this.renderer.originalTexture = k, e.stage.removeChild(t), t.destroy();
|
|
2736
|
+
const A = new s.Sprite(k);
|
|
2737
|
+
e.stage.addChild(A), this.renderer.sprite = A, this.renderer.fitScale = this.renderer.getFitScaleFor(k), this.renderer.setZoom(n, { keepCenter: !1 }), this.renderer.applyViewTransform(), this.renderer.render();
|
|
2705
2738
|
const N = this.state.get("crop.appliedRect"), x = N && Number.isFinite(N.x) && Number.isFinite(N.y) && Number.isFinite(N.width) && Number.isFinite(N.height) ? {
|
|
2706
2739
|
x: Math.round(N.x + p),
|
|
2707
2740
|
y: Math.round(N.y + m),
|
|
@@ -2725,18 +2758,18 @@ const J = class J extends de {
|
|
|
2725
2758
|
if (l <= 0 || c <= 0) return null;
|
|
2726
2759
|
const u = new n.Container(), p = new n.Sprite(s);
|
|
2727
2760
|
if (t === "circle") {
|
|
2728
|
-
const C = Math.round(Math.max(l, c)), k = d + l / 2,
|
|
2729
|
-
d = Math.round(k - C / 2), h = Math.round(
|
|
2730
|
-
const
|
|
2731
|
-
typeof
|
|
2761
|
+
const C = Math.round(Math.max(l, c)), k = d + l / 2, P = h + c / 2;
|
|
2762
|
+
d = Math.round(k - C / 2), h = Math.round(P - C / 2), l = c = C;
|
|
2763
|
+
const A = new n.Graphics();
|
|
2764
|
+
typeof A.circle == "function" && typeof A.fill == "function" ? A.circle(l / 2, c / 2, l / 2).fill(16777215) : (A.beginFill(16777215, 1), A.drawCircle(l / 2, c / 2, l / 2), A.endFill()), p.mask = A, u.addChild(A);
|
|
2732
2765
|
}
|
|
2733
2766
|
p.x = -d, p.y = -h, u.addChild(p);
|
|
2734
2767
|
const m = n.RenderTexture.create({ width: l, height: c });
|
|
2735
2768
|
r.renderer.render({ container: u, target: m, clear: !0 }), u.destroy({ children: !0 });
|
|
2736
2769
|
const g = this.renderer.originalTexture;
|
|
2737
2770
|
g && g !== this.renderer.baseTexture && g.destroy(!0), this.renderer.originalTexture = m, r.stage.removeChild(i), i.destroy();
|
|
2738
|
-
const
|
|
2739
|
-
return r.stage.addChild(
|
|
2771
|
+
const _ = new n.Sprite(m);
|
|
2772
|
+
return r.stage.addChild(_), this.renderer.sprite = _, this.renderer.fitScale = this.renderer.getFitScaleFor(m), this.renderer.setZoom(o, { keepCenter: !1 }), this.renderer.applyViewTransform(), this.renderer.render(), { texture: m, preservedZoom: o };
|
|
2740
2773
|
}
|
|
2741
2774
|
/**
|
|
2742
2775
|
* Cancel crop
|
|
@@ -2772,7 +2805,7 @@ ve(J, "AUTO_ZOOM_PADDING", 1.1), /**
|
|
|
2772
2805
|
* Minimum interval (ms) between auto-zoom adjustments during drag.
|
|
2773
2806
|
*/
|
|
2774
2807
|
ve(J, "AUTO_ZOOM_THROTTLE_MS", 100);
|
|
2775
|
-
let
|
|
2808
|
+
let Ae = J;
|
|
2776
2809
|
class Et {
|
|
2777
2810
|
/**
|
|
2778
2811
|
* Create a new RemoveBgManager
|
|
@@ -2873,8 +2906,8 @@ class Et {
|
|
|
2873
2906
|
if (!c.ok) {
|
|
2874
2907
|
let g = `Background removal failed (HTTP ${c.status})`;
|
|
2875
2908
|
try {
|
|
2876
|
-
const
|
|
2877
|
-
|
|
2909
|
+
const _ = await c.text();
|
|
2910
|
+
_ && (g += `: ${_}`);
|
|
2878
2911
|
} catch {
|
|
2879
2912
|
}
|
|
2880
2913
|
throw new Error(g);
|
|
@@ -3163,7 +3196,7 @@ function Y({ icon: a, title: e, className: t = "", onClick: r, disabled: i = !1,
|
|
|
3163
3196
|
const c = l.querySelector("svg");
|
|
3164
3197
|
return c && c.setAttribute("aria-hidden", "true"), l;
|
|
3165
3198
|
}
|
|
3166
|
-
function
|
|
3199
|
+
function ye({ label: a, icon: e, active: t = !1, onClick: r }) {
|
|
3167
3200
|
const i = f("button", {
|
|
3168
3201
|
type: "button",
|
|
3169
3202
|
className: `chip ${t ? "active" : ""}`.trim(),
|
|
@@ -3200,7 +3233,7 @@ class It {
|
|
|
3200
3233
|
e.appendChild(t);
|
|
3201
3234
|
const r = f("div", { className: "toolbar-section toolbar-right" });
|
|
3202
3235
|
this._themeBtn = Y({
|
|
3203
|
-
icon: this.state.get("isDarkMode") ?
|
|
3236
|
+
icon: this.state.get("isDarkMode") ? Re : Le,
|
|
3204
3237
|
title: "Toggle Theme",
|
|
3205
3238
|
className: "toolbar-btn toolbar-btn-theme",
|
|
3206
3239
|
testId: "btn-toggle-theme",
|
|
@@ -3278,7 +3311,7 @@ class It {
|
|
|
3278
3311
|
const l = o.querySelector("svg");
|
|
3279
3312
|
l && l.setAttribute("aria-hidden", "true"), n.appendChild(o), n.appendChild(f("span", { className: "toolbar-save-label" }, "Save"));
|
|
3280
3313
|
const c = Y({
|
|
3281
|
-
icon:
|
|
3314
|
+
icon: Pe,
|
|
3282
3315
|
title: "Close",
|
|
3283
3316
|
className: "toolbar-btn",
|
|
3284
3317
|
testId: "btn-cancel-edit",
|
|
@@ -3292,7 +3325,7 @@ class It {
|
|
|
3292
3325
|
*/
|
|
3293
3326
|
_subscribeToState() {
|
|
3294
3327
|
const e = this.state.on("change:isDarkMode", ({ value: c }) => {
|
|
3295
|
-
this._themeBtn.innerHTML = c ?
|
|
3328
|
+
this._themeBtn.innerHTML = c ? Re : Le;
|
|
3296
3329
|
});
|
|
3297
3330
|
this._unsubscribers.push(e);
|
|
3298
3331
|
const t = this.state.on("change:mode", ({ value: c }) => {
|
|
@@ -3351,7 +3384,7 @@ class Dt {
|
|
|
3351
3384
|
className: "carousel-nav carousel-nav-left",
|
|
3352
3385
|
onClick: () => this._scrollLeft()
|
|
3353
3386
|
}), this._carousel = f("div", { className: "category-carousel" }), be.forEach((r) => {
|
|
3354
|
-
const i =
|
|
3387
|
+
const i = ye({
|
|
3355
3388
|
label: r.name,
|
|
3356
3389
|
icon: r.icon,
|
|
3357
3390
|
active: this.state.get("selectedCategory") === r.id,
|
|
@@ -3890,7 +3923,7 @@ class Yt {
|
|
|
3890
3923
|
this._currentFilterId && ((h = this._onRemove) == null || h.call(this, this._currentFilterId), this.close());
|
|
3891
3924
|
}
|
|
3892
3925
|
}), d = Y({
|
|
3893
|
-
icon:
|
|
3926
|
+
icon: Pe,
|
|
3894
3927
|
title: "Close",
|
|
3895
3928
|
className: "btn-icon-sm",
|
|
3896
3929
|
ariaLabel: "Close drawer",
|
|
@@ -4160,9 +4193,9 @@ class Ut {
|
|
|
4160
4193
|
}
|
|
4161
4194
|
}
|
|
4162
4195
|
const Xt = [
|
|
4163
|
-
{ id: "free", name: "Free", icon:
|
|
4196
|
+
{ id: "free", name: "Free", icon: Pt },
|
|
4164
4197
|
{ id: "square", name: "Square", icon: Mt },
|
|
4165
|
-
{ id: "circle", name: "Circle", icon:
|
|
4198
|
+
{ id: "circle", name: "Circle", icon: At }
|
|
4166
4199
|
], Vt = [
|
|
4167
4200
|
{ id: "free", name: "Free" },
|
|
4168
4201
|
{ id: "1:1", name: "1:1" },
|
|
@@ -4206,7 +4239,7 @@ class Wt {
|
|
|
4206
4239
|
e.appendChild(f("label", { className: "section-label" }, "Shape"));
|
|
4207
4240
|
const t = f("div", { className: "chip-row" }), r = this.state.get("crop.shape");
|
|
4208
4241
|
Xt.forEach((c) => {
|
|
4209
|
-
const d =
|
|
4242
|
+
const d = ye({
|
|
4210
4243
|
label: c.name,
|
|
4211
4244
|
icon: c.icon,
|
|
4212
4245
|
active: r === c.id,
|
|
@@ -4216,7 +4249,7 @@ class Wt {
|
|
|
4216
4249
|
}), e.appendChild(t), this.element.appendChild(e), this.state.get("lockCropShape") && (e.style.display = "none"), this._shapeSection = e, this._aspectSection = f("div", { className: "crop-section" }), this._aspectSection.appendChild(f("label", { className: "section-label" }, "Aspect Ratio"));
|
|
4217
4250
|
const i = f("div", { className: "chip-row aspect-row" }), s = this.state.get("crop.aspect");
|
|
4218
4251
|
Vt.forEach((c) => {
|
|
4219
|
-
const d =
|
|
4252
|
+
const d = ye({
|
|
4220
4253
|
label: c.name,
|
|
4221
4254
|
active: s === c.id,
|
|
4222
4255
|
onClick: () => this._selectAspect(c.id)
|
|
@@ -4226,7 +4259,7 @@ class Wt {
|
|
|
4226
4259
|
const n = f("div", { className: "crop-actions" }), o = j({
|
|
4227
4260
|
label: "Cancel",
|
|
4228
4261
|
className: "btn-secondary crop-cancel-btn",
|
|
4229
|
-
icon:
|
|
4262
|
+
icon: Pe,
|
|
4230
4263
|
onClick: () => this.cropManager.cancel()
|
|
4231
4264
|
});
|
|
4232
4265
|
o.dataset.testid = "cancel-crop";
|
|
@@ -4269,7 +4302,7 @@ class Wt {
|
|
|
4269
4302
|
n.dataset.testid = "rotate-270", t.appendChild(r), t.appendChild(i), t.appendChild(s), t.appendChild(n), e.appendChild(t);
|
|
4270
4303
|
const o = f("div", { className: "chip-row rotation-preset-row" }), l = te(this.state.get("transform.rotation") ?? 0);
|
|
4271
4304
|
Ht.forEach((p) => {
|
|
4272
|
-
const m =
|
|
4305
|
+
const m = ye({
|
|
4273
4306
|
label: p.label,
|
|
4274
4307
|
active: Math.round(l) === p.angle,
|
|
4275
4308
|
onClick: () => this._setRotation(p.angle)
|
|
@@ -4721,7 +4754,7 @@ class ii extends de {
|
|
|
4721
4754
|
},
|
|
4722
4755
|
...i,
|
|
4723
4756
|
...t
|
|
4724
|
-
}, this._preset = r, this._state = ht(), this._state.set("theme", this._options.theme), this._state.set("crop.shape", this._options.cropShape), this._state.set("crop.aspect", this._options.initialAspectRatio), this._preset && (this._state.set("lockCropShape", !!this._preset.lockCropShape), this._state.set("lockAspectRatio", !!this._preset.lockAspectRatio), this._state.set("showFilters", this._preset.showFilters !== !1), this._state.set("showCropControls", this._preset.showCropControls !== !1), this._state.set("autoZoomOnCropOverflow", !!this._preset.autoZoomOnCropOverflow)), this._renderer = new ut(), this._filterManager = new Bt(this._state, this._renderer), this._cropManager = new
|
|
4757
|
+
}, this._preset = r, this._state = ht(), this._state.set("theme", this._options.theme), this._state.set("crop.shape", this._options.cropShape), this._state.set("crop.aspect", this._options.initialAspectRatio), this._preset && (this._state.set("lockCropShape", !!this._preset.lockCropShape), this._state.set("lockAspectRatio", !!this._preset.lockAspectRatio), this._state.set("showFilters", this._preset.showFilters !== !1), this._state.set("showCropControls", this._preset.showCropControls !== !1), this._state.set("autoZoomOnCropOverflow", !!this._preset.autoZoomOnCropOverflow)), this._renderer = new ut(), this._filterManager = new Bt(this._state, this._renderer), this._cropManager = new Ae(this._state, this._renderer), this._removeBgManager = null, this._backgroundRemovalAvailable = !1, ((s = this._options.backgroundRemoval) == null ? void 0 : s.enabled) !== !1 && (this._removeBgManager = new Et({
|
|
4725
4758
|
endpoint: (n = this._options.backgroundRemoval) == null ? void 0 : n.endpoint,
|
|
4726
4759
|
optionsEndpoint: (o = this._options.backgroundRemoval) == null ? void 0 : o.optionsEndpoint,
|
|
4727
4760
|
fallbackEndpoint: (l = this._options.backgroundRemoval) == null ? void 0 : l.fallbackEndpoint
|
|
@@ -4964,7 +4997,7 @@ class ii extends de {
|
|
|
4964
4997
|
this._state.set("selectedFilter", i);
|
|
4965
4998
|
const s = this._filterManager.getFilterDef(i);
|
|
4966
4999
|
if (typeof (s == null ? void 0 : s.category) == "string") {
|
|
4967
|
-
const n =
|
|
5000
|
+
const n = Rt[s.category] ?? s.category;
|
|
4968
5001
|
this._state.set("selectedCategory", n);
|
|
4969
5002
|
}
|
|
4970
5003
|
}
|
|
@@ -5249,7 +5282,7 @@ const U = /* @__PURE__ */ new Map(), Q = /* @__PURE__ */ new Map();
|
|
|
5249
5282
|
function Zt(a, e) {
|
|
5250
5283
|
return !Array.isArray(a.mediaTargets) || a.mediaTargets.length === 0 ? !0 : a.mediaTargets.includes(e);
|
|
5251
5284
|
}
|
|
5252
|
-
function
|
|
5285
|
+
function y(a) {
|
|
5253
5286
|
var e;
|
|
5254
5287
|
return U.has(a.id), U.set(a.id, a), Q.has(a.category) || Q.set(a.category, []), (e = Q.get(a.category)) == null || e.push(a.id), a;
|
|
5255
5288
|
}
|
|
@@ -5264,7 +5297,7 @@ function Jt() {
|
|
|
5264
5297
|
(t) => /Filter$/.test(t[0]) && typeof t[1] == "function"
|
|
5265
5298
|
).forEach(([t, r]) => {
|
|
5266
5299
|
const i = t.replace(/Filter$/, "").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
5267
|
-
U.has(i) ||
|
|
5300
|
+
U.has(i) || y({
|
|
5268
5301
|
id: i,
|
|
5269
5302
|
name: t.replace(/Filter$/, ""),
|
|
5270
5303
|
category: "unlisted",
|
|
@@ -5318,7 +5351,7 @@ function rr() {
|
|
|
5318
5351
|
}
|
|
5319
5352
|
if (typeof window < "u") {
|
|
5320
5353
|
window.__DEBUG_FILTERS_LIST = Array.from(U.keys()), window.getAllFilters = xe, window.getFilter = Kt, window.getFiltersByCategory = Qt, window.getRegisteredFilters = rr;
|
|
5321
|
-
const a =
|
|
5354
|
+
const a = y;
|
|
5322
5355
|
window.registerFilter = (e) => {
|
|
5323
5356
|
const t = a(e);
|
|
5324
5357
|
return window.__DEBUG_FILTERS_LIST = Array.from(U.keys()), t;
|
|
@@ -5374,7 +5407,7 @@ function nr(a) {
|
|
|
5374
5407
|
function Ee(a, e) {
|
|
5375
5408
|
a.reset(), a.brightness(e.brightness, !0), a.contrast(e.contrast, !0), a.saturate(e.saturation, !0);
|
|
5376
5409
|
}
|
|
5377
|
-
|
|
5410
|
+
y({
|
|
5378
5411
|
id: "adjustment",
|
|
5379
5412
|
name: "Adjustment",
|
|
5380
5413
|
category: "adjust",
|
|
@@ -5559,7 +5592,7 @@ function hr(a) {
|
|
|
5559
5592
|
function Ie(a, e) {
|
|
5560
5593
|
a.reset(), e.brightness !== 1 && a.brightness(e.brightness, !0), e.contrast !== 1 && a.contrast(e.contrast, !0), e.saturation !== 1 && a.saturate(e.saturation, !0), e.hue !== 0 && a.hue(e.hue, !0), e.sepia > 0 && a.sepia(!0), e.negative && a.negative(!0);
|
|
5561
5594
|
}
|
|
5562
|
-
|
|
5595
|
+
y({
|
|
5563
5596
|
id: "adjustment-advanced",
|
|
5564
5597
|
name: "Advanced Adjustment",
|
|
5565
5598
|
category: "adjust",
|
|
@@ -5658,7 +5691,7 @@ _({
|
|
|
5658
5691
|
]
|
|
5659
5692
|
});
|
|
5660
5693
|
const De = (a) => Math.max(0, Math.min(1, a));
|
|
5661
|
-
|
|
5694
|
+
y({
|
|
5662
5695
|
id: "alpha",
|
|
5663
5696
|
name: "Alpha",
|
|
5664
5697
|
category: "adjust",
|
|
@@ -5685,7 +5718,7 @@ _({
|
|
|
5685
5718
|
}
|
|
5686
5719
|
]
|
|
5687
5720
|
});
|
|
5688
|
-
|
|
5721
|
+
y({
|
|
5689
5722
|
id: "blur",
|
|
5690
5723
|
name: "Blur",
|
|
5691
5724
|
category: "blur",
|
|
@@ -5761,7 +5794,7 @@ function je(a) {
|
|
|
5761
5794
|
negative: !!a.negative
|
|
5762
5795
|
};
|
|
5763
5796
|
}
|
|
5764
|
-
|
|
5797
|
+
y({
|
|
5765
5798
|
id: "color-matrix",
|
|
5766
5799
|
name: "Color Matrix",
|
|
5767
5800
|
category: "advanced",
|
|
@@ -5857,7 +5890,7 @@ _({
|
|
|
5857
5890
|
]
|
|
5858
5891
|
});
|
|
5859
5892
|
const { ColorOverlayFilter: dr } = v;
|
|
5860
|
-
|
|
5893
|
+
y({
|
|
5861
5894
|
id: "colorOverlay",
|
|
5862
5895
|
name: "Color Overlay",
|
|
5863
5896
|
category: "color",
|
|
@@ -5921,7 +5954,7 @@ _({
|
|
|
5921
5954
|
}
|
|
5922
5955
|
]
|
|
5923
5956
|
});
|
|
5924
|
-
|
|
5957
|
+
y({
|
|
5925
5958
|
id: "drop-shadow",
|
|
5926
5959
|
name: "Drop Shadow",
|
|
5927
5960
|
category: "effects",
|
|
@@ -5947,8 +5980,8 @@ _({
|
|
|
5947
5980
|
y: a.pixelSizeY !== void 0 ? a.pixelSizeY : 1
|
|
5948
5981
|
}
|
|
5949
5982
|
}), l = (h, u, p, m) => {
|
|
5950
|
-
const g = h * u * 2,
|
|
5951
|
-
return Math.ceil(g +
|
|
5983
|
+
const g = h * u * 2, _ = Math.sqrt(p * p + m * m);
|
|
5984
|
+
return Math.ceil(g + _ + 2);
|
|
5952
5985
|
};
|
|
5953
5986
|
o._exportPadding = l(i, s, n.x, n.y), o.padding = Math.max(o.padding ?? 0, o._exportPadding), o._customParams = {
|
|
5954
5987
|
...a,
|
|
@@ -5958,22 +5991,22 @@ _({
|
|
|
5958
5991
|
_angle: r
|
|
5959
5992
|
};
|
|
5960
5993
|
const c = (h, u) => {
|
|
5961
|
-
const p = Number(h._distance ?? h.distance ?? 5) * u, m = Number(h._angle ?? h.angle ?? 90), g = Number(h.blur ?? 2) * u,
|
|
5994
|
+
const p = Number(h._distance ?? h.distance ?? 5) * u, m = Number(h._angle ?? h.angle ?? 90), g = Number(h.blur ?? 2) * u, _ = Number(h.quality ?? 3), C = {
|
|
5962
5995
|
x: p * Math.cos(m * Math.PI / 180),
|
|
5963
5996
|
y: p * Math.sin(m * Math.PI / 180)
|
|
5964
|
-
}, k = h.color ? String(h.color).replace("#", "0x") : "0x000000",
|
|
5997
|
+
}, k = h.color ? String(h.color).replace("#", "0x") : "0x000000", P = new v.DropShadowFilter({
|
|
5965
5998
|
offset: C,
|
|
5966
5999
|
color: parseInt(k, 16),
|
|
5967
6000
|
alpha: h.alpha !== void 0 ? Number(h.alpha) : 0.5,
|
|
5968
6001
|
blur: g,
|
|
5969
|
-
quality:
|
|
6002
|
+
quality: _,
|
|
5970
6003
|
shadowOnly: h.shadowOnly !== void 0 ? !!h.shadowOnly : !1,
|
|
5971
6004
|
pixelSize: {
|
|
5972
6005
|
x: h.pixelSizeX !== void 0 ? Number(h.pixelSizeX) : 1,
|
|
5973
6006
|
y: h.pixelSizeY !== void 0 ? Number(h.pixelSizeY) : 1
|
|
5974
6007
|
}
|
|
5975
|
-
}),
|
|
5976
|
-
return
|
|
6008
|
+
}), A = l(g, _, C.x, C.y);
|
|
6009
|
+
return P._exportPadding = A, P.padding = Math.max(P.padding ?? 0, A), P;
|
|
5977
6010
|
};
|
|
5978
6011
|
o.createExportFilter = function(h = {}) {
|
|
5979
6012
|
const u = Number.isFinite(h.previewToNativeScale) ? Math.max(1, Number(h.previewToNativeScale)) : 1, p = this._customParams || a;
|
|
@@ -5982,8 +6015,8 @@ _({
|
|
|
5982
6015
|
return Number(this._exportPadding || this.padding || 0);
|
|
5983
6016
|
};
|
|
5984
6017
|
const d = (h) => {
|
|
5985
|
-
var
|
|
5986
|
-
const u = ((
|
|
6018
|
+
var _;
|
|
6019
|
+
const u = ((_ = h._customParams) == null ? void 0 : _._offset) ?? { x: 0, y: 0 }, p = Number(h.blur ?? 0), m = Number(h.quality ?? 1), g = l(p, m, u.x, u.y);
|
|
5987
6020
|
h._exportPadding = g, h.padding = Math.max(h.padding ?? 0, g);
|
|
5988
6021
|
};
|
|
5989
6022
|
return o.updateUIParam = function(h, u) {
|
|
@@ -6135,7 +6168,7 @@ _({
|
|
|
6135
6168
|
]
|
|
6136
6169
|
});
|
|
6137
6170
|
const { ColorMatrixFilter: ur } = I;
|
|
6138
|
-
|
|
6171
|
+
y({
|
|
6139
6172
|
id: "grayscale",
|
|
6140
6173
|
name: "Grayscale",
|
|
6141
6174
|
category: "color",
|
|
@@ -6188,7 +6221,7 @@ function Ye(a, e) {
|
|
|
6188
6221
|
a.reset(), a.greyscale(e);
|
|
6189
6222
|
}
|
|
6190
6223
|
const { HslAdjustmentFilter: pr } = v;
|
|
6191
|
-
|
|
6224
|
+
y({
|
|
6192
6225
|
id: "hsl-adjustment",
|
|
6193
6226
|
name: "HSL Adjustment",
|
|
6194
6227
|
category: "color",
|
|
@@ -6298,7 +6331,7 @@ _({
|
|
|
6298
6331
|
]
|
|
6299
6332
|
});
|
|
6300
6333
|
const { KawaseBlurFilter: fr } = v;
|
|
6301
|
-
|
|
6334
|
+
y({
|
|
6302
6335
|
id: "kawase-blur",
|
|
6303
6336
|
name: "Kawase Blur",
|
|
6304
6337
|
category: "blur",
|
|
@@ -6416,7 +6449,7 @@ _({
|
|
|
6416
6449
|
]
|
|
6417
6450
|
});
|
|
6418
6451
|
const { MotionBlurFilter: mr } = v;
|
|
6419
|
-
|
|
6452
|
+
y({
|
|
6420
6453
|
id: "motion-blur",
|
|
6421
6454
|
name: "Motion Blur",
|
|
6422
6455
|
category: "blur",
|
|
@@ -6524,7 +6557,7 @@ _({
|
|
|
6524
6557
|
]
|
|
6525
6558
|
});
|
|
6526
6559
|
const { RadialBlurFilter: gr } = v;
|
|
6527
|
-
|
|
6560
|
+
y({
|
|
6528
6561
|
id: "radial-blur",
|
|
6529
6562
|
name: "Radial Blur",
|
|
6530
6563
|
category: "blur",
|
|
@@ -6648,7 +6681,7 @@ _({
|
|
|
6648
6681
|
]
|
|
6649
6682
|
});
|
|
6650
6683
|
const { TiltShiftFilter: br } = v;
|
|
6651
|
-
|
|
6684
|
+
y({
|
|
6652
6685
|
id: "tilt-shift",
|
|
6653
6686
|
name: "Tilt Shift",
|
|
6654
6687
|
category: "blur",
|
|
@@ -6775,8 +6808,8 @@ _({
|
|
|
6775
6808
|
}
|
|
6776
6809
|
]
|
|
6777
6810
|
});
|
|
6778
|
-
const { ZoomBlurFilter:
|
|
6779
|
-
|
|
6811
|
+
const { ZoomBlurFilter: _r } = v;
|
|
6812
|
+
y({
|
|
6780
6813
|
id: "zoom-blur",
|
|
6781
6814
|
name: "Zoom Blur",
|
|
6782
6815
|
category: "blur",
|
|
@@ -6788,7 +6821,7 @@ _({
|
|
|
6788
6821
|
*/
|
|
6789
6822
|
createFilter: (a) => {
|
|
6790
6823
|
try {
|
|
6791
|
-
const e = new
|
|
6824
|
+
const e = new _r({
|
|
6792
6825
|
strength: a.strength || 0.1,
|
|
6793
6826
|
center: {
|
|
6794
6827
|
x: a.centerX !== void 0 ? a.centerX : 0.5,
|
|
@@ -6906,7 +6939,7 @@ const { ColorGradientFilter: Ue } = v;
|
|
|
6906
6939
|
function st(a) {
|
|
6907
6940
|
return parseInt(a.replace("#", "0x"), 16);
|
|
6908
6941
|
}
|
|
6909
|
-
function
|
|
6942
|
+
function yr(a) {
|
|
6910
6943
|
return "#" + a.toString(16).padStart(6, "0");
|
|
6911
6944
|
}
|
|
6912
6945
|
function Xe(a) {
|
|
@@ -6919,11 +6952,11 @@ function Xe(a) {
|
|
|
6919
6952
|
function Ve(a) {
|
|
6920
6953
|
return {
|
|
6921
6954
|
offset: a.offset,
|
|
6922
|
-
color: typeof a.color == "number" ?
|
|
6955
|
+
color: typeof a.color == "number" ? yr(a.color) : a.color,
|
|
6923
6956
|
alpha: a.alpha
|
|
6924
6957
|
};
|
|
6925
6958
|
}
|
|
6926
|
-
|
|
6959
|
+
y({
|
|
6927
6960
|
id: "color-gradient",
|
|
6928
6961
|
name: "Color Gradient",
|
|
6929
6962
|
category: "color",
|
|
@@ -7130,7 +7163,7 @@ _({
|
|
|
7130
7163
|
}
|
|
7131
7164
|
]
|
|
7132
7165
|
});
|
|
7133
|
-
|
|
7166
|
+
y({
|
|
7134
7167
|
id: "color-map",
|
|
7135
7168
|
name: "Color Map",
|
|
7136
7169
|
category: "color",
|
|
@@ -7214,7 +7247,7 @@ _({
|
|
|
7214
7247
|
]
|
|
7215
7248
|
});
|
|
7216
7249
|
const xr = v.ColorReplaceFilter;
|
|
7217
|
-
|
|
7250
|
+
y({
|
|
7218
7251
|
id: "color-replace",
|
|
7219
7252
|
name: "Color Replace",
|
|
7220
7253
|
category: "color",
|
|
@@ -7295,7 +7328,7 @@ _({
|
|
|
7295
7328
|
]
|
|
7296
7329
|
});
|
|
7297
7330
|
const wr = v.MultiColorReplaceFilter;
|
|
7298
|
-
|
|
7331
|
+
y({
|
|
7299
7332
|
id: "multi-color-replace",
|
|
7300
7333
|
name: "Multi-Color Replace",
|
|
7301
7334
|
category: "color",
|
|
@@ -7432,7 +7465,7 @@ _({
|
|
|
7432
7465
|
]
|
|
7433
7466
|
});
|
|
7434
7467
|
const { RGBSplitFilter: vr } = v;
|
|
7435
|
-
|
|
7468
|
+
y({
|
|
7436
7469
|
id: "rgb-split",
|
|
7437
7470
|
name: "RGB Split",
|
|
7438
7471
|
category: "color",
|
|
@@ -7566,7 +7599,7 @@ _({
|
|
|
7566
7599
|
]
|
|
7567
7600
|
});
|
|
7568
7601
|
const { AdvancedBloomFilter: Cr } = v;
|
|
7569
|
-
|
|
7602
|
+
y({
|
|
7570
7603
|
id: "advanced-bloom",
|
|
7571
7604
|
name: "Advanced Bloom",
|
|
7572
7605
|
category: "light",
|
|
@@ -7722,7 +7755,7 @@ _({
|
|
|
7722
7755
|
]
|
|
7723
7756
|
});
|
|
7724
7757
|
const kr = v.AsciiFilter;
|
|
7725
|
-
|
|
7758
|
+
y({
|
|
7726
7759
|
id: "ascii",
|
|
7727
7760
|
name: "ASCII",
|
|
7728
7761
|
category: "stylize",
|
|
@@ -7801,7 +7834,7 @@ _({
|
|
|
7801
7834
|
]
|
|
7802
7835
|
});
|
|
7803
7836
|
const Sr = v.BackdropBlurFilter;
|
|
7804
|
-
|
|
7837
|
+
y({
|
|
7805
7838
|
id: "backdrop-blur",
|
|
7806
7839
|
name: "Backdrop Blur",
|
|
7807
7840
|
category: "blur",
|
|
@@ -7908,7 +7941,7 @@ _({
|
|
|
7908
7941
|
]
|
|
7909
7942
|
});
|
|
7910
7943
|
const { BevelFilter: Fr } = v;
|
|
7911
|
-
|
|
7944
|
+
y({
|
|
7912
7945
|
id: "bevel",
|
|
7913
7946
|
name: "Bevel",
|
|
7914
7947
|
category: "effects",
|
|
@@ -8036,7 +8069,7 @@ _({
|
|
|
8036
8069
|
]
|
|
8037
8070
|
});
|
|
8038
8071
|
const { BloomFilter: Mr } = v;
|
|
8039
|
-
|
|
8072
|
+
y({
|
|
8040
8073
|
id: "bloom",
|
|
8041
8074
|
name: "Bloom/Glow",
|
|
8042
8075
|
category: "light",
|
|
@@ -8151,7 +8184,7 @@ const { BulgePinchFilter: He } = v, Se = (a) => {
|
|
|
8151
8184
|
const e = Math.max(0, Number(a) || 0);
|
|
8152
8185
|
return Math.ceil(e + 2);
|
|
8153
8186
|
};
|
|
8154
|
-
|
|
8187
|
+
y({
|
|
8155
8188
|
id: "bulge-pinch",
|
|
8156
8189
|
name: "Bulge/Pinch",
|
|
8157
8190
|
category: "distortion",
|
|
@@ -8255,7 +8288,7 @@ _({
|
|
|
8255
8288
|
}
|
|
8256
8289
|
]
|
|
8257
8290
|
});
|
|
8258
|
-
const { ConvolutionFilter:
|
|
8291
|
+
const { ConvolutionFilter: Ar } = v, re = {
|
|
8259
8292
|
normal: [0, 0, 0, 0, 1, 0, 0, 0, 0],
|
|
8260
8293
|
gaussianBlur: [0.045, 0.122, 0.045, 0.122, 0.332, 0.122, 0.045, 0.122, 0.045],
|
|
8261
8294
|
boxBlur: [1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9],
|
|
@@ -8266,7 +8299,7 @@ const { ConvolutionFilter: Pr } = v, re = {
|
|
|
8266
8299
|
sobelHorizontal: [1, 2, 1, 0, 0, 0, -1, -2, -1],
|
|
8267
8300
|
sobelVertical: [1, 0, -1, 2, 0, -2, 1, 0, -1]
|
|
8268
8301
|
};
|
|
8269
|
-
|
|
8302
|
+
y({
|
|
8270
8303
|
id: "convolution",
|
|
8271
8304
|
name: "Convolution Matrix",
|
|
8272
8305
|
category: "effects",
|
|
@@ -8290,7 +8323,7 @@ _({
|
|
|
8290
8323
|
const r = a.preset;
|
|
8291
8324
|
e = re[r] || re.normal;
|
|
8292
8325
|
}
|
|
8293
|
-
const t = new
|
|
8326
|
+
const t = new Ar(e, a.width || 200, a.height || 200);
|
|
8294
8327
|
return t._customParams = { ...a }, t.updateUIParam = function(r, i) {
|
|
8295
8328
|
const s = this._customParams || {};
|
|
8296
8329
|
switch (this._customParams = s, s[r] = i, r) {
|
|
@@ -8501,8 +8534,8 @@ _({
|
|
|
8501
8534
|
}
|
|
8502
8535
|
]
|
|
8503
8536
|
});
|
|
8504
|
-
const { CrossHatchFilter:
|
|
8505
|
-
|
|
8537
|
+
const { CrossHatchFilter: Pr } = v;
|
|
8538
|
+
y({
|
|
8506
8539
|
id: "cross-hatch",
|
|
8507
8540
|
name: "Cross Hatch",
|
|
8508
8541
|
category: "stylize",
|
|
@@ -8511,7 +8544,7 @@ _({
|
|
|
8511
8544
|
// Note: CrossHatchFilter has NO parameters according to PixiJS examples
|
|
8512
8545
|
createFilter: (a) => {
|
|
8513
8546
|
try {
|
|
8514
|
-
const e = new
|
|
8547
|
+
const e = new Pr();
|
|
8515
8548
|
return e.updateUIParam = function(t, r) {
|
|
8516
8549
|
return !0;
|
|
8517
8550
|
}, e;
|
|
@@ -8524,7 +8557,7 @@ _({
|
|
|
8524
8557
|
// No UI controls since CrossHatchFilter has no parameters
|
|
8525
8558
|
controls: []
|
|
8526
8559
|
});
|
|
8527
|
-
|
|
8560
|
+
y({
|
|
8528
8561
|
id: "crt",
|
|
8529
8562
|
name: "CRT Screen",
|
|
8530
8563
|
category: "stylize",
|
|
@@ -8709,7 +8742,7 @@ _({
|
|
|
8709
8742
|
]
|
|
8710
8743
|
});
|
|
8711
8744
|
const Nr = I.DisplacementFilter, Tr = I.Sprite, Fe = I.Texture;
|
|
8712
|
-
|
|
8745
|
+
y({
|
|
8713
8746
|
id: "displacement",
|
|
8714
8747
|
// ID must match what the application expects
|
|
8715
8748
|
name: "Displacement Map",
|
|
@@ -8807,7 +8840,7 @@ _({
|
|
|
8807
8840
|
}
|
|
8808
8841
|
]
|
|
8809
8842
|
});
|
|
8810
|
-
|
|
8843
|
+
y({
|
|
8811
8844
|
id: "dot",
|
|
8812
8845
|
name: "Dot Screen",
|
|
8813
8846
|
category: "stylize",
|
|
@@ -8882,7 +8915,7 @@ _({
|
|
|
8882
8915
|
]
|
|
8883
8916
|
});
|
|
8884
8917
|
const { EmbossFilter: zr } = v;
|
|
8885
|
-
|
|
8918
|
+
y({
|
|
8886
8919
|
id: "emboss",
|
|
8887
8920
|
name: "Emboss",
|
|
8888
8921
|
category: "stylize",
|
|
@@ -8930,21 +8963,21 @@ _({
|
|
|
8930
8963
|
}
|
|
8931
8964
|
]
|
|
8932
8965
|
});
|
|
8933
|
-
const { GlitchFilter:
|
|
8966
|
+
const { GlitchFilter: Rr } = v, Z = {
|
|
8934
8967
|
TRANSPARENT: 0,
|
|
8935
8968
|
ORIGINAL: 1,
|
|
8936
8969
|
LOOP: 2,
|
|
8937
8970
|
CLAMP: 3,
|
|
8938
8971
|
MIRROR: 4
|
|
8939
8972
|
};
|
|
8940
|
-
|
|
8973
|
+
y({
|
|
8941
8974
|
id: "glitch",
|
|
8942
8975
|
name: "Glitch",
|
|
8943
8976
|
category: "effects",
|
|
8944
8977
|
description: "Apply digital distortion and glitch effects",
|
|
8945
8978
|
createFilter: (a) => {
|
|
8946
8979
|
try {
|
|
8947
|
-
const e = { x: a.redX, y: a.redY }, t = { x: a.greenX, y: a.greenY }, r = { x: a.blueX, y: a.blueY }, i = new
|
|
8980
|
+
const e = { x: a.redX, y: a.redY }, t = { x: a.greenX, y: a.greenY }, r = { x: a.blueX, y: a.blueY }, i = new Rr({
|
|
8948
8981
|
slices: a.slices,
|
|
8949
8982
|
offset: a.offset,
|
|
8950
8983
|
direction: a.direction,
|
|
@@ -9185,8 +9218,8 @@ _({
|
|
|
9185
9218
|
}
|
|
9186
9219
|
]
|
|
9187
9220
|
});
|
|
9188
|
-
const { GlowFilter:
|
|
9189
|
-
|
|
9221
|
+
const { GlowFilter: Lr } = v;
|
|
9222
|
+
y({
|
|
9190
9223
|
id: "glow",
|
|
9191
9224
|
name: "Glow",
|
|
9192
9225
|
category: "light",
|
|
@@ -9194,7 +9227,7 @@ _({
|
|
|
9194
9227
|
// Create an instance of the GlowFilter with the provided parameters
|
|
9195
9228
|
createFilter: (a) => {
|
|
9196
9229
|
try {
|
|
9197
|
-
const e = parseInt(a.color.replace("#", "0x"), 16), t = new
|
|
9230
|
+
const e = parseInt(a.color.replace("#", "0x"), 16), t = new Lr({
|
|
9198
9231
|
distance: a.distance || 10,
|
|
9199
9232
|
outerStrength: a.outerStrength || 4,
|
|
9200
9233
|
innerStrength: a.innerStrength || 0,
|
|
@@ -9321,7 +9354,7 @@ _({
|
|
|
9321
9354
|
]
|
|
9322
9355
|
});
|
|
9323
9356
|
const { GodrayFilter: Br } = v;
|
|
9324
|
-
|
|
9357
|
+
y({
|
|
9325
9358
|
id: "godray",
|
|
9326
9359
|
name: "Godray",
|
|
9327
9360
|
category: "light",
|
|
@@ -9483,7 +9516,7 @@ _({
|
|
|
9483
9516
|
]
|
|
9484
9517
|
});
|
|
9485
9518
|
const Er = v.SimpleLightmapFilter, We = I.Texture;
|
|
9486
|
-
|
|
9519
|
+
y({
|
|
9487
9520
|
id: "lightmap",
|
|
9488
9521
|
name: "Lightmap",
|
|
9489
9522
|
category: "light",
|
|
@@ -9614,7 +9647,7 @@ _({
|
|
|
9614
9647
|
]
|
|
9615
9648
|
});
|
|
9616
9649
|
const { NoiseFilter: Ir } = I;
|
|
9617
|
-
|
|
9650
|
+
y({
|
|
9618
9651
|
id: "noise",
|
|
9619
9652
|
name: "Noise",
|
|
9620
9653
|
category: "effects",
|
|
@@ -9699,7 +9732,7 @@ _({
|
|
|
9699
9732
|
]
|
|
9700
9733
|
});
|
|
9701
9734
|
const { OldFilmFilter: Dr } = v;
|
|
9702
|
-
|
|
9735
|
+
y({
|
|
9703
9736
|
id: "old-film",
|
|
9704
9737
|
name: "Old Film",
|
|
9705
9738
|
category: "effects",
|
|
@@ -9888,7 +9921,7 @@ _({
|
|
|
9888
9921
|
]
|
|
9889
9922
|
});
|
|
9890
9923
|
const { OutlineFilter: Or } = v;
|
|
9891
|
-
|
|
9924
|
+
y({
|
|
9892
9925
|
id: "outline",
|
|
9893
9926
|
name: "Outline",
|
|
9894
9927
|
category: "effects",
|
|
@@ -9988,7 +10021,7 @@ _({
|
|
|
9988
10021
|
]
|
|
9989
10022
|
});
|
|
9990
10023
|
const { PixelateFilter: jr } = v;
|
|
9991
|
-
|
|
10024
|
+
y({
|
|
9992
10025
|
id: "pixelate",
|
|
9993
10026
|
name: "Pixelate",
|
|
9994
10027
|
category: "effects",
|
|
@@ -10079,7 +10112,7 @@ _({
|
|
|
10079
10112
|
]
|
|
10080
10113
|
});
|
|
10081
10114
|
const { ReflectionFilter: Yr } = v;
|
|
10082
|
-
|
|
10115
|
+
y({
|
|
10083
10116
|
id: "reflection",
|
|
10084
10117
|
// ID must match what the application expects
|
|
10085
10118
|
name: "Reflection",
|
|
@@ -10247,7 +10280,7 @@ _({
|
|
|
10247
10280
|
]
|
|
10248
10281
|
});
|
|
10249
10282
|
const { ShockwaveFilter: Ur } = v;
|
|
10250
|
-
|
|
10283
|
+
y({
|
|
10251
10284
|
id: "shockwave",
|
|
10252
10285
|
// ID must match what the application expects
|
|
10253
10286
|
name: "Shockwave",
|
|
@@ -10399,7 +10432,7 @@ _({
|
|
|
10399
10432
|
]
|
|
10400
10433
|
});
|
|
10401
10434
|
const { SimplexNoiseFilter: Xr } = v;
|
|
10402
|
-
|
|
10435
|
+
y({
|
|
10403
10436
|
id: "simplex-noise",
|
|
10404
10437
|
name: "Simplex Noise",
|
|
10405
10438
|
category: "effects",
|
|
@@ -10561,7 +10594,7 @@ const { TwistFilter: Vr } = v, at = (a) => Math.ceil(Math.max(0, Number(a) || 0)
|
|
|
10561
10594
|
}), p = at(h);
|
|
10562
10595
|
return u.padding = Math.max(u.padding ?? 0, p), u._exportPadding = p, u;
|
|
10563
10596
|
};
|
|
10564
|
-
|
|
10597
|
+
y({
|
|
10565
10598
|
id: "twist",
|
|
10566
10599
|
name: "Twist",
|
|
10567
10600
|
category: "distortion",
|
|
@@ -10648,7 +10681,7 @@ _({
|
|
|
10648
10681
|
]
|
|
10649
10682
|
});
|
|
10650
10683
|
const { AdjustmentFilter: Hr } = v;
|
|
10651
|
-
function
|
|
10684
|
+
function _e(a) {
|
|
10652
10685
|
const e = typeof a == "string" ? parseInt(a.replace("#", "0x"), 16) : a;
|
|
10653
10686
|
return [
|
|
10654
10687
|
(e >> 16 & 255) / 255,
|
|
@@ -10663,7 +10696,7 @@ class Wr extends Hr {
|
|
|
10663
10696
|
contrast: 1,
|
|
10664
10697
|
saturation: 1,
|
|
10665
10698
|
alpha: 1
|
|
10666
|
-
}), this._radius = 0.8, this._strength = 1, this._colorRgb = [0, 0, 0], this._colorValue = "#000000", this._radius = e.radius ?? 0.8, this._strength = e.strength ?? 1, e.color !== void 0 && (typeof e.color == "string" ? (this._colorValue = e.color, this._colorRgb =
|
|
10699
|
+
}), this._radius = 0.8, this._strength = 1, this._colorRgb = [0, 0, 0], this._colorValue = "#000000", this._radius = e.radius ?? 0.8, this._strength = e.strength ?? 1, e.color !== void 0 && (typeof e.color == "string" ? (this._colorValue = e.color, this._colorRgb = _e(e.color)) : (this._colorValue = "#" + e.color.toString(16).padStart(6, "0"), this._colorRgb = _e(e.color))), this.updateVignette();
|
|
10667
10700
|
}
|
|
10668
10701
|
/**
|
|
10669
10702
|
* Updates the filter parameters to simulate a vignette effect
|
|
@@ -10689,10 +10722,10 @@ class Wr extends Hr {
|
|
|
10689
10722
|
return this._colorValue;
|
|
10690
10723
|
}
|
|
10691
10724
|
set color(e) {
|
|
10692
|
-
typeof e == "string" ? (this._colorValue = e, this._colorRgb =
|
|
10725
|
+
typeof e == "string" ? (this._colorValue = e, this._colorRgb = _e(e)) : (this._colorValue = "#" + e.toString(16).padStart(6, "0"), this._colorRgb = _e(e)), this.updateVignette();
|
|
10693
10726
|
}
|
|
10694
10727
|
}
|
|
10695
|
-
|
|
10728
|
+
y({
|
|
10696
10729
|
id: "vignette",
|
|
10697
10730
|
name: "Vignette",
|
|
10698
10731
|
category: "effects",
|
|
@@ -10798,10 +10831,10 @@ export {
|
|
|
10798
10831
|
$t as H,
|
|
10799
10832
|
ht as I,
|
|
10800
10833
|
Bt as J,
|
|
10801
|
-
|
|
10834
|
+
Ae as K,
|
|
10802
10835
|
It as L,
|
|
10803
10836
|
Wt as M,
|
|
10804
|
-
|
|
10837
|
+
Rt as N,
|
|
10805
10838
|
xt as O,
|
|
10806
10839
|
ut as P,
|
|
10807
10840
|
Jt as Q,
|
|
@@ -10825,9 +10858,9 @@ export {
|
|
|
10825
10858
|
et as m,
|
|
10826
10859
|
Qe as n,
|
|
10827
10860
|
Je as o,
|
|
10828
|
-
|
|
10861
|
+
Pe as p,
|
|
10829
10862
|
Kr as q,
|
|
10830
|
-
|
|
10863
|
+
y as r,
|
|
10831
10864
|
Jr as s,
|
|
10832
10865
|
Qr as t,
|
|
10833
10866
|
ei as u,
|
|
@@ -10837,4 +10870,4 @@ export {
|
|
|
10837
10870
|
Ct as y,
|
|
10838
10871
|
St as z
|
|
10839
10872
|
};
|
|
10840
|
-
//# sourceMappingURL=editor-
|
|
10873
|
+
//# sourceMappingURL=editor-DAJxTvzM.js.map
|