@codingfactory/mediables-vue 2.4.20 → 2.4.21
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-NQy9Zz24.cjs → PixiFrameExporter-C_Ga17dU.cjs} +2 -2
- package/dist/{PixiFrameExporter-NQy9Zz24.cjs.map → PixiFrameExporter-C_Ga17dU.cjs.map} +1 -1
- package/dist/{PixiFrameExporter-DCDcutJ1.js → PixiFrameExporter-FqchRwLH.js} +2 -2
- package/dist/{PixiFrameExporter-DCDcutJ1.js.map → PixiFrameExporter-FqchRwLH.js.map} +1 -1
- package/dist/components/ExistingMediaSelector.vue.d.ts +40 -0
- package/dist/components/form/MediaAttachmentMetadataFields.vue.d.ts +2 -0
- package/dist/components/form/index.d.ts +1 -0
- package/dist/composables/useFloatingPills.d.ts +1 -1
- package/dist/composables/useVideoPlayer.d.ts +1 -1
- package/dist/editor-DKRFjaUq.cjs +42 -0
- package/dist/editor-DKRFjaUq.cjs.map +1 -0
- package/dist/{editor-BkyoXXiA.js → editor-DWDUrVRz.js} +182 -135
- package/dist/editor-DWDUrVRz.js.map +1 -0
- package/dist/index-BNKYj_dh.cjs +342 -0
- package/dist/index-BNKYj_dh.cjs.map +1 -0
- package/dist/{index-DAD3xVPE.js → index-D6Bzhz_r.js} +7360 -7097
- package/dist/index-D6Bzhz_r.js.map +1 -0
- package/dist/index.d.ts +3 -0
- 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 +73 -71
- package/dist/style.css +1 -1
- package/dist/types/media.d.ts +37 -0
- package/package.json +1 -1
- package/dist/editor--q100BnG.cjs +0 -42
- package/dist/editor--q100BnG.cjs.map +0 -1
- package/dist/editor-BkyoXXiA.js.map +0 -1
- package/dist/index-CeRnmg4f.cjs +0 -342
- package/dist/index-CeRnmg4f.cjs.map +0 -1
- package/dist/index-DAD3xVPE.js.map +0 -1
|
@@ -224,6 +224,29 @@ class Pe extends U {
|
|
|
224
224
|
} catch {
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
|
+
/**
|
|
228
|
+
* Wait for the next animation frame, with a timeout fallback for environments
|
|
229
|
+
* where the frame callback never arrives while the editor is open.
|
|
230
|
+
* @param {number} timeoutMs
|
|
231
|
+
* @returns {Promise<void>}
|
|
232
|
+
*/
|
|
233
|
+
_waitForNextFrame(e = 32) {
|
|
234
|
+
return new Promise((t) => {
|
|
235
|
+
if (typeof window > "u") {
|
|
236
|
+
t();
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
let i = !1, r = 0;
|
|
240
|
+
const a = () => {
|
|
241
|
+
i || (i = !0, window.clearTimeout(r), t());
|
|
242
|
+
};
|
|
243
|
+
if (r = window.setTimeout(a, e), typeof window.requestAnimationFrame == "function") {
|
|
244
|
+
window.requestAnimationFrame(() => a());
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
a();
|
|
248
|
+
});
|
|
249
|
+
}
|
|
227
250
|
/**
|
|
228
251
|
* Calculate fit scale for a texture
|
|
229
252
|
* @param {PIXI.Texture} tex
|
|
@@ -300,7 +323,7 @@ class Pe extends U {
|
|
|
300
323
|
return !1;
|
|
301
324
|
this.originalTexture = r, this.baseTexture = r, this.sprite && (this.app.stage.removeChild(this.sprite), this.sprite.destroy()), this.sprite = new t.Sprite(r), this.app.stage.addChild(this.sprite), this.fitScale = this.getFitScaleFor(r), this.zoom = 1;
|
|
302
325
|
const { w: a, h: o } = this._getCssSize();
|
|
303
|
-
if (this.applyViewTransform({ center: { x: a / 2, y: o / 2 } }), await
|
|
326
|
+
if (this.applyViewTransform({ center: { x: a / 2, y: o / 2 } }), await this._waitForNextFrame(), !((d = this.app) != null && d.renderer)) return !1;
|
|
304
327
|
const n = this.getFitScaleFor(r);
|
|
305
328
|
return Math.abs(n - this.fitScale) / Math.max(1e-6, n) > 0.02 && (this.fitScale = n, this.applyViewTransform({ center: { x: a / 2, y: o / 2 } })), this.render(), this.emit("textureLoaded", { width: r.width, height: r.height }), !0;
|
|
306
329
|
}
|
|
@@ -974,7 +997,12 @@ const X = class X extends U {
|
|
|
974
997
|
* @param {'free'|'1:1'|'4:3'|'16:9'|'3:2'|'2:3'|string} aspect
|
|
975
998
|
*/
|
|
976
999
|
setAspect(e) {
|
|
977
|
-
this.state.get("lockAspectRatio")
|
|
1000
|
+
if (this.state.get("lockAspectRatio")) return;
|
|
1001
|
+
if (this.state.get("crop.shape") !== "free") {
|
|
1002
|
+
if (this.state.get("lockCropShape")) return;
|
|
1003
|
+
this.state.set("crop.shape", "free");
|
|
1004
|
+
}
|
|
1005
|
+
this.state.set("crop.aspect", e), this.applyAspectRatio(), this.constrainCropRect(), this.drawOverlay();
|
|
978
1006
|
}
|
|
979
1007
|
};
|
|
980
1008
|
/**
|
|
@@ -1379,8 +1407,18 @@ const j = [
|
|
|
1379
1407
|
{ id: "stylize", name: "Stylize", icon: qe },
|
|
1380
1408
|
// ascii, crt, crossHatch, dot, emboss
|
|
1381
1409
|
{ id: "crop", name: "Crop", icon: ge }
|
|
1382
|
-
]
|
|
1383
|
-
|
|
1410
|
+
], $e = {
|
|
1411
|
+
adjust: "adjust",
|
|
1412
|
+
blur: "blur",
|
|
1413
|
+
color: "color",
|
|
1414
|
+
effects: "effects",
|
|
1415
|
+
distortion: "distortion",
|
|
1416
|
+
light: "light",
|
|
1417
|
+
stylize: "stylize",
|
|
1418
|
+
advanced: "adjust"
|
|
1419
|
+
// colorMatrix goes to adjust category
|
|
1420
|
+
};
|
|
1421
|
+
class We {
|
|
1384
1422
|
constructor(e, t) {
|
|
1385
1423
|
this.state = e, this.editor = t, this.element = null, this._chips = /* @__PURE__ */ new Map(), this._scrollIndex = 0, this._unsubscribers = [];
|
|
1386
1424
|
}
|
|
@@ -1519,7 +1557,7 @@ class $e {
|
|
|
1519
1557
|
this._unsubscribers.forEach((t) => t()), this._unsubscribers = [], this._chips.clear(), (e = this.element) == null || e.remove(), this.element = null;
|
|
1520
1558
|
}
|
|
1521
1559
|
}
|
|
1522
|
-
class
|
|
1560
|
+
class Ze {
|
|
1523
1561
|
constructor(e, t) {
|
|
1524
1562
|
this.state = e, this.filterManager = t, this.element = null, this._filterCards = /* @__PURE__ */ new Map(), this._scrollIndex = 0, this._unsubscribers = [], this._onToggle = null, this._onSelect = null;
|
|
1525
1563
|
}
|
|
@@ -1676,7 +1714,7 @@ class We {
|
|
|
1676
1714
|
this._unsubscribers.forEach((t) => t()), this._unsubscribers = [], this._filterCards.clear(), (e = this.element) == null || e.remove(), this.element = null;
|
|
1677
1715
|
}
|
|
1678
1716
|
}
|
|
1679
|
-
class
|
|
1717
|
+
class Ge {
|
|
1680
1718
|
constructor(e, t) {
|
|
1681
1719
|
this.state = e, this.filterManager = t, this.element = null, this._controls = /* @__PURE__ */ new Map(), this._onChange = null, this._onReset = null, this._onAction = null, this._unsubscribers = [];
|
|
1682
1720
|
}
|
|
@@ -1879,7 +1917,7 @@ class Ze {
|
|
|
1879
1917
|
this._unsubscribers.forEach((t) => t()), this._unsubscribers = [], this._controls.clear(), (e = this.element) == null || e.remove(), this.element = null;
|
|
1880
1918
|
}
|
|
1881
1919
|
}
|
|
1882
|
-
class
|
|
1920
|
+
class Ke {
|
|
1883
1921
|
constructor(e, t) {
|
|
1884
1922
|
this.state = e, this.filterManager = t, this._drawer = null, this._body = null, this._titleEl = null, this._isOpen = !1, this._currentFilterId = null, this._controls = /* @__PURE__ */ new Map(), this._onChange = null, this._onReset = null, this._onRemove = null, this._onAction = null, this._container = null;
|
|
1885
1923
|
}
|
|
@@ -2075,7 +2113,7 @@ class Ge {
|
|
|
2075
2113
|
this._controls.clear(), (e = this._drawer) == null || e.remove(), this._drawer = null, this._isOpen = !1, this._currentFilterId = null, this._container = null;
|
|
2076
2114
|
}
|
|
2077
2115
|
}
|
|
2078
|
-
class
|
|
2116
|
+
class Qe {
|
|
2079
2117
|
constructor(e, t) {
|
|
2080
2118
|
this.state = e, this.filterManager = t, this.element = null, this._scrollContainer = null, this._chips = /* @__PURE__ */ new Map(), this._unsubscribers = [], this._onToggle = null, this._onSelect = null;
|
|
2081
2119
|
}
|
|
@@ -2148,11 +2186,11 @@ class Ke {
|
|
|
2148
2186
|
this._unsubscribers.forEach((t) => t()), this._unsubscribers = [], this._chips.clear(), (e = this.element) == null || e.remove(), this.element = null;
|
|
2149
2187
|
}
|
|
2150
2188
|
}
|
|
2151
|
-
const
|
|
2189
|
+
const Je = [
|
|
2152
2190
|
{ id: "free", name: "Free", icon: je },
|
|
2153
2191
|
{ id: "square", name: "Square", icon: Ue },
|
|
2154
2192
|
{ id: "circle", name: "Circle", icon: Ve }
|
|
2155
|
-
],
|
|
2193
|
+
], et = [
|
|
2156
2194
|
{ id: "free", name: "Free" },
|
|
2157
2195
|
{ id: "1:1", name: "1:1" },
|
|
2158
2196
|
{ id: "4:3", name: "4:3" },
|
|
@@ -2160,7 +2198,7 @@ const Qe = [
|
|
|
2160
2198
|
{ id: "3:2", name: "3:2" },
|
|
2161
2199
|
{ id: "2:3", name: "2:3" }
|
|
2162
2200
|
];
|
|
2163
|
-
class
|
|
2201
|
+
class tt {
|
|
2164
2202
|
constructor(e, t) {
|
|
2165
2203
|
this.state = e, this.cropManager = t, this.element = null, this._shapeChips = /* @__PURE__ */ new Map(), this._aspectChips = /* @__PURE__ */ new Map(), this._unsubscribers = [];
|
|
2166
2204
|
}
|
|
@@ -2184,7 +2222,7 @@ class et {
|
|
|
2184
2222
|
const e = u("div", { className: "crop-section" });
|
|
2185
2223
|
e.appendChild(u("label", { className: "section-label" }, "Shape"));
|
|
2186
2224
|
const t = u("div", { className: "chip-row" }), i = this.state.get("crop.shape");
|
|
2187
|
-
|
|
2225
|
+
Je.forEach((c) => {
|
|
2188
2226
|
const d = J({
|
|
2189
2227
|
label: c.name,
|
|
2190
2228
|
icon: c.icon,
|
|
@@ -2194,7 +2232,7 @@ class et {
|
|
|
2194
2232
|
d.dataset.shape = c.id, d.dataset.testid = `crop-shape-${c.id}`, this._shapeChips.set(c.id, d), t.appendChild(d);
|
|
2195
2233
|
}), e.appendChild(t), this.element.appendChild(e), this.state.get("lockCropShape") && (e.style.display = "none"), this._shapeSection = e, this._aspectSection = u("div", { className: "crop-section" }), this._aspectSection.appendChild(u("label", { className: "section-label" }, "Aspect Ratio"));
|
|
2196
2234
|
const r = u("div", { className: "chip-row aspect-row" }), a = this.state.get("crop.aspect");
|
|
2197
|
-
|
|
2235
|
+
et.forEach((c) => {
|
|
2198
2236
|
const d = J({
|
|
2199
2237
|
label: c.name,
|
|
2200
2238
|
active: a === c.id,
|
|
@@ -2275,7 +2313,7 @@ class et {
|
|
|
2275
2313
|
this._unsubscribers.forEach((t) => t()), this._unsubscribers = [], this._shapeChips.clear(), this._aspectChips.clear(), (e = this.element) == null || e.remove(), this.element = null;
|
|
2276
2314
|
}
|
|
2277
2315
|
}
|
|
2278
|
-
class
|
|
2316
|
+
class it {
|
|
2279
2317
|
constructor(e, t) {
|
|
2280
2318
|
this.state = e, this.filterManager = t, this.element = null, this._filterItems = /* @__PURE__ */ new Map(), this._unsubscribers = [], this._onRemove = null, this._onReset = null, this._onClearAll = null, this._onUpdateValue = null, this._onSelect = null;
|
|
2281
2319
|
}
|
|
@@ -2533,7 +2571,7 @@ const L = {
|
|
|
2533
2571
|
lockAspectRatio: !1
|
|
2534
2572
|
}
|
|
2535
2573
|
};
|
|
2536
|
-
function
|
|
2574
|
+
function rt(s) {
|
|
2537
2575
|
if (!s)
|
|
2538
2576
|
return { ...G.free };
|
|
2539
2577
|
if (typeof s == "object" && s !== null)
|
|
@@ -2541,7 +2579,7 @@ function it(s) {
|
|
|
2541
2579
|
const e = G[s];
|
|
2542
2580
|
return e ? { ...e } : { ...G.free };
|
|
2543
2581
|
}
|
|
2544
|
-
class
|
|
2582
|
+
class ri extends U {
|
|
2545
2583
|
/**
|
|
2546
2584
|
* Create a new VanillaImageEditor
|
|
2547
2585
|
* @param {HTMLElement} container - Container element to mount the editor
|
|
@@ -2552,7 +2590,7 @@ class ii extends U {
|
|
|
2552
2590
|
if (super(), !e)
|
|
2553
2591
|
throw new Error("VanillaImageEditor: container element is required");
|
|
2554
2592
|
this._container = e, this._destroyed = !1, this._loadVersion = 0, this._objectUrls = /* @__PURE__ */ new Set();
|
|
2555
|
-
const i = t.preset ?
|
|
2593
|
+
const i = t.preset ? rt(t.preset) : null, r = i ? {
|
|
2556
2594
|
initialMode: i.initialMode === "crop" ? "crop" : "adjust",
|
|
2557
2595
|
cropShape: i.cropShape,
|
|
2558
2596
|
initialAspectRatio: i.aspectRatio
|
|
@@ -2606,31 +2644,31 @@ class ii extends U {
|
|
|
2606
2644
|
* Initialize UI components
|
|
2607
2645
|
*/
|
|
2608
2646
|
_initUI() {
|
|
2609
|
-
this._toolbar = new He(this._state, this), this._toolbarContainer.appendChild(this._toolbar.render()), this._filterControlsEl = u("div", { className: "filter-controls-container" }), this._categoryCarousel = new
|
|
2647
|
+
this._toolbar = new He(this._state, this), this._toolbarContainer.appendChild(this._toolbar.render()), this._filterControlsEl = u("div", { className: "filter-controls-container" }), this._categoryCarousel = new We(this._state, this), this._filterControlsEl.appendChild(this._categoryCarousel.render((r) => {
|
|
2610
2648
|
}));
|
|
2611
2649
|
const e = u("div", { className: "filter-layout" }), t = u("div", { className: "filter-left-column" });
|
|
2612
|
-
this._filterCarousel = new
|
|
2650
|
+
this._filterCarousel = new Ze(this._state, this._filterManager), t.appendChild(this._filterCarousel.render({
|
|
2613
2651
|
onToggle: (r, a) => this._handleFilterToggle(r, a),
|
|
2614
2652
|
onSelect: (r) => {
|
|
2615
2653
|
this._handleFilterSelect(r), this._isMobile && this._mobileFilterDrawer && this._mobileFilterDrawer.open(r);
|
|
2616
2654
|
}
|
|
2617
|
-
})), this._filterAdjustments = new
|
|
2655
|
+
})), this._filterAdjustments = new Ge(this._state, this._filterManager), t.appendChild(this._filterAdjustments.render({
|
|
2618
2656
|
onChange: (r, a, o) => this._handleFilterChange(r, a, o),
|
|
2619
2657
|
onReset: (r) => this._handleFilterReset(r),
|
|
2620
2658
|
onAction: (r, a) => this._handleFilterAction(r, a)
|
|
2621
2659
|
})), e.appendChild(t);
|
|
2622
2660
|
const i = u("div", { className: "filter-right-column" });
|
|
2623
|
-
this._activeFiltersPanel = new
|
|
2661
|
+
this._activeFiltersPanel = new it(this._state, this._filterManager), i.appendChild(this._activeFiltersPanel.render({
|
|
2624
2662
|
onRemove: (r) => this._handleFilterToggle(r, !1),
|
|
2625
2663
|
onReset: (r) => this._handleFilterReset(r),
|
|
2626
2664
|
onClearAll: () => this.resetAll(),
|
|
2627
2665
|
onSelect: (r) => this._handleFilterSelect(r)
|
|
2628
|
-
})), e.appendChild(i), this._filterControlsEl.appendChild(e), this._mobileActiveFilters = new
|
|
2666
|
+
})), e.appendChild(i), this._filterControlsEl.appendChild(e), this._mobileActiveFilters = new Qe(this._state, this._filterManager), this._filterControlsEl.appendChild(this._mobileActiveFilters.render({
|
|
2629
2667
|
onToggle: (r, a) => this._handleFilterToggle(r, a),
|
|
2630
2668
|
onSelect: (r) => {
|
|
2631
2669
|
this._handleFilterSelect(r), this._isMobile && this._mobileFilterDrawer && this._mobileFilterDrawer.open(r);
|
|
2632
2670
|
}
|
|
2633
|
-
})), this._cropControls = new
|
|
2671
|
+
})), this._cropControls = new tt(this._state, this._cropManager), this._cropControlsEl = this._cropControls.render(), this._cropControlsEl.style.display = "none", this._controlsSection.appendChild(this._filterControlsEl), this._controlsSection.appendChild(this._cropControlsEl), this._mobileFilterDrawer = new Ke(this._state, this._filterManager), this._mobileFilterDrawer.build(this._controlsSection, {
|
|
2634
2672
|
onChange: (r, a, o) => this._handleFilterChange(r, a, o),
|
|
2635
2673
|
onReset: (r) => this._handleFilterReset(r),
|
|
2636
2674
|
onRemove: (r) => {
|
|
@@ -2782,10 +2820,19 @@ class ii extends U {
|
|
|
2782
2820
|
e.crop.rect && (this._cropManager.applyFromPixelRect(e.crop.rect, t), this._state.set("crop.appliedRect", { ...e.crop.rect }), this._state.set("crop.appliedShape", t), this._state.set("crop.appliedAspect", i)), this._state.set("crop.shape", t), this._state.set("crop.aspect", i);
|
|
2783
2821
|
}
|
|
2784
2822
|
if (Array.isArray(e.filters)) {
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2823
|
+
let t = null;
|
|
2824
|
+
for (const i of e.filters)
|
|
2825
|
+
if (i.enabled && (t === null && (t = i.id), this._state.toggleFilter(i.id, !0), this._filterManager.initializeValues(i.id), i.values))
|
|
2826
|
+
for (const [r, a] of Object.entries(i.values))
|
|
2827
|
+
this._state.setFilterValue(i.id, r, a);
|
|
2828
|
+
if (t !== null) {
|
|
2829
|
+
this._state.set("selectedFilter", t);
|
|
2830
|
+
const i = this._filterManager.getFilterDef(t);
|
|
2831
|
+
if (typeof (i == null ? void 0 : i.category) == "string") {
|
|
2832
|
+
const r = $e[i.category] ?? i.category;
|
|
2833
|
+
this._state.set("selectedCategory", r);
|
|
2834
|
+
}
|
|
2835
|
+
}
|
|
2789
2836
|
this._filterManager.applyFilters();
|
|
2790
2837
|
}
|
|
2791
2838
|
}
|
|
@@ -2988,20 +3035,20 @@ class ii extends U {
|
|
|
2988
3035
|
}
|
|
2989
3036
|
}
|
|
2990
3037
|
const k = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new Map();
|
|
2991
|
-
function
|
|
3038
|
+
function st(s, e) {
|
|
2992
3039
|
return !Array.isArray(s.mediaTargets) || s.mediaTargets.length === 0 ? !0 : s.mediaTargets.includes(e);
|
|
2993
3040
|
}
|
|
2994
3041
|
function m(s) {
|
|
2995
3042
|
var e;
|
|
2996
3043
|
return k.has(s.id), k.set(s.id, s), Y.has(s.category) || Y.set(s.category, []), (e = Y.get(s.category)) == null || e.push(s.id), s;
|
|
2997
3044
|
}
|
|
2998
|
-
function
|
|
3045
|
+
function at(s) {
|
|
2999
3046
|
return k.get(s);
|
|
3000
3047
|
}
|
|
3001
3048
|
function H() {
|
|
3002
3049
|
return Array.from(k.values());
|
|
3003
3050
|
}
|
|
3004
|
-
function
|
|
3051
|
+
function ot() {
|
|
3005
3052
|
H().map((t) => t.id), Object.entries(b).filter(
|
|
3006
3053
|
(t) => /Filter$/.test(t[0]) && typeof t[1] == "function"
|
|
3007
3054
|
).forEach(([t, i]) => {
|
|
@@ -3025,16 +3072,16 @@ function at() {
|
|
|
3025
3072
|
});
|
|
3026
3073
|
});
|
|
3027
3074
|
}
|
|
3028
|
-
function
|
|
3075
|
+
function nt(s) {
|
|
3029
3076
|
return (Y.get(s) || []).map((t) => k.get(t)).filter(Boolean);
|
|
3030
3077
|
}
|
|
3031
|
-
function
|
|
3078
|
+
function lt() {
|
|
3032
3079
|
return Array.from(Y.keys());
|
|
3033
3080
|
}
|
|
3034
|
-
function
|
|
3081
|
+
function si(s) {
|
|
3035
3082
|
return k.has(s);
|
|
3036
3083
|
}
|
|
3037
|
-
function
|
|
3084
|
+
function ct(s) {
|
|
3038
3085
|
const e = k.get(s);
|
|
3039
3086
|
if (!e)
|
|
3040
3087
|
return !1;
|
|
@@ -3046,11 +3093,11 @@ function lt(s) {
|
|
|
3046
3093
|
}
|
|
3047
3094
|
return !0;
|
|
3048
3095
|
}
|
|
3049
|
-
function
|
|
3096
|
+
function ai(s, e) {
|
|
3050
3097
|
const t = k.get(s);
|
|
3051
|
-
return t ?
|
|
3098
|
+
return t ? st(t, e) : !1;
|
|
3052
3099
|
}
|
|
3053
|
-
function
|
|
3100
|
+
function ht() {
|
|
3054
3101
|
return Array.from(k.values()).map((s) => ({
|
|
3055
3102
|
id: s.id,
|
|
3056
3103
|
name: s.name,
|
|
@@ -3059,7 +3106,7 @@ function ct() {
|
|
|
3059
3106
|
}));
|
|
3060
3107
|
}
|
|
3061
3108
|
if (typeof window < "u") {
|
|
3062
|
-
window.__DEBUG_FILTERS_LIST = Array.from(k.keys()), window.getAllFilters = H, window.getFilter =
|
|
3109
|
+
window.__DEBUG_FILTERS_LIST = Array.from(k.keys()), window.getAllFilters = H, window.getFilter = at, window.getFiltersByCategory = nt, window.getRegisteredFilters = ht;
|
|
3063
3110
|
const s = m;
|
|
3064
3111
|
window.registerFilter = (e) => {
|
|
3065
3112
|
const t = s(e);
|
|
@@ -3069,7 +3116,7 @@ if (typeof window < "u") {
|
|
|
3069
3116
|
typeof window < "u" && (window.initializeFilterRegistry = window.initializeFilterRegistry || function() {
|
|
3070
3117
|
return [];
|
|
3071
3118
|
});
|
|
3072
|
-
const { AdjustmentFilter:
|
|
3119
|
+
const { AdjustmentFilter: dt } = b, { ColorMatrixFilter: ut } = w, A = {
|
|
3073
3120
|
gamma: 1,
|
|
3074
3121
|
saturation: 1,
|
|
3075
3122
|
contrast: 1,
|
|
@@ -3078,7 +3125,7 @@ const { AdjustmentFilter: ht } = b, { ColorMatrixFilter: dt } = w, A = {
|
|
|
3078
3125
|
green: 1,
|
|
3079
3126
|
blue: 1,
|
|
3080
3127
|
alpha: 1
|
|
3081
|
-
},
|
|
3128
|
+
}, pt = /* @__PURE__ */ new Set([
|
|
3082
3129
|
"gamma",
|
|
3083
3130
|
"saturation",
|
|
3084
3131
|
"contrast",
|
|
@@ -3099,9 +3146,9 @@ function z(s, e) {
|
|
|
3099
3146
|
return e;
|
|
3100
3147
|
}
|
|
3101
3148
|
function se(s) {
|
|
3102
|
-
return
|
|
3149
|
+
return pt.has(s);
|
|
3103
3150
|
}
|
|
3104
|
-
function
|
|
3151
|
+
function ft(s) {
|
|
3105
3152
|
return {
|
|
3106
3153
|
gamma: z(s.gamma, A.gamma),
|
|
3107
3154
|
saturation: z(s.saturation, A.saturation),
|
|
@@ -3124,9 +3171,9 @@ m({
|
|
|
3124
3171
|
// Create an instance of the AdjustmentFilter with the provided parameters
|
|
3125
3172
|
createFilter: (s) => {
|
|
3126
3173
|
try {
|
|
3127
|
-
const e =
|
|
3174
|
+
const e = ft(s ?? {}), t = { ...e };
|
|
3128
3175
|
try {
|
|
3129
|
-
const i = new
|
|
3176
|
+
const i = new dt(t), r = i;
|
|
3130
3177
|
return r._customParams = { ...e }, r.updateUIParam = function(o, n) {
|
|
3131
3178
|
try {
|
|
3132
3179
|
if (!se(o))
|
|
@@ -3139,7 +3186,7 @@ m({
|
|
|
3139
3186
|
}
|
|
3140
3187
|
}, i;
|
|
3141
3188
|
} catch {
|
|
3142
|
-
const r = new
|
|
3189
|
+
const r = new ut(), a = r;
|
|
3143
3190
|
return a._customParams = { ...e }, ae(r, e), a.updateUIParam = function(n, l) {
|
|
3144
3191
|
try {
|
|
3145
3192
|
if (!se(n))
|
|
@@ -3249,14 +3296,14 @@ m({
|
|
|
3249
3296
|
}
|
|
3250
3297
|
]
|
|
3251
3298
|
});
|
|
3252
|
-
const { ColorMatrixFilter:
|
|
3299
|
+
const { ColorMatrixFilter: mt } = w, E = {
|
|
3253
3300
|
brightness: 1,
|
|
3254
3301
|
contrast: 1,
|
|
3255
3302
|
saturation: 1,
|
|
3256
3303
|
hue: 0,
|
|
3257
3304
|
sepia: 0,
|
|
3258
3305
|
negative: !1
|
|
3259
|
-
},
|
|
3306
|
+
}, gt = /* @__PURE__ */ new Set([
|
|
3260
3307
|
"brightness",
|
|
3261
3308
|
"contrast",
|
|
3262
3309
|
"saturation",
|
|
@@ -3264,8 +3311,8 @@ const { ColorMatrixFilter: ft } = w, E = {
|
|
|
3264
3311
|
"sepia",
|
|
3265
3312
|
"negative"
|
|
3266
3313
|
]);
|
|
3267
|
-
function
|
|
3268
|
-
return
|
|
3314
|
+
function bt(s) {
|
|
3315
|
+
return gt.has(s);
|
|
3269
3316
|
}
|
|
3270
3317
|
function D(s, e) {
|
|
3271
3318
|
if (typeof s == "number" && Number.isFinite(s))
|
|
@@ -3288,7 +3335,7 @@ function ye(s, e) {
|
|
|
3288
3335
|
}
|
|
3289
3336
|
return e;
|
|
3290
3337
|
}
|
|
3291
|
-
function
|
|
3338
|
+
function yt(s) {
|
|
3292
3339
|
return {
|
|
3293
3340
|
brightness: D(s.brightness, E.brightness),
|
|
3294
3341
|
contrast: D(s.contrast, E.contrast),
|
|
@@ -3309,10 +3356,10 @@ m({
|
|
|
3309
3356
|
// Create an instance of the ColorMatrixFilter with the provided parameters
|
|
3310
3357
|
createFilter: (s) => {
|
|
3311
3358
|
try {
|
|
3312
|
-
const e =
|
|
3359
|
+
const e = yt(s ?? {}), t = new mt(), i = t;
|
|
3313
3360
|
return i._customParams = { ...e }, oe(t, e), i.updateUIParam = function(a, o) {
|
|
3314
3361
|
try {
|
|
3315
|
-
if (!
|
|
3362
|
+
if (!bt(a))
|
|
3316
3363
|
return;
|
|
3317
3364
|
const n = this._customParams ?? { ...E };
|
|
3318
3365
|
if (a === "negative")
|
|
@@ -3593,7 +3640,7 @@ m({
|
|
|
3593
3640
|
}
|
|
3594
3641
|
]
|
|
3595
3642
|
});
|
|
3596
|
-
const { ColorOverlayFilter:
|
|
3643
|
+
const { ColorOverlayFilter: _t } = b;
|
|
3597
3644
|
m({
|
|
3598
3645
|
id: "colorOverlay",
|
|
3599
3646
|
name: "Color Overlay",
|
|
@@ -3608,7 +3655,7 @@ m({
|
|
|
3608
3655
|
try {
|
|
3609
3656
|
let e = 16711680;
|
|
3610
3657
|
s.color && (typeof s.color == "string" ? e = parseInt(s.color.replace("#", "0x"), 16) : typeof s.color == "number" && (e = s.color));
|
|
3611
|
-
const t = new
|
|
3658
|
+
const t = new _t({
|
|
3612
3659
|
color: e,
|
|
3613
3660
|
alpha: s.alpha || 0.5
|
|
3614
3661
|
});
|
|
@@ -3840,7 +3887,7 @@ m({
|
|
|
3840
3887
|
}
|
|
3841
3888
|
]
|
|
3842
3889
|
});
|
|
3843
|
-
const { ColorMatrixFilter:
|
|
3890
|
+
const { ColorMatrixFilter: xt } = w;
|
|
3844
3891
|
m({
|
|
3845
3892
|
id: "grayscale",
|
|
3846
3893
|
name: "Grayscale",
|
|
@@ -3853,7 +3900,7 @@ m({
|
|
|
3853
3900
|
*/
|
|
3854
3901
|
createFilter: (s) => {
|
|
3855
3902
|
try {
|
|
3856
|
-
const e = new
|
|
3903
|
+
const e = new xt();
|
|
3857
3904
|
e._customParams = { ...s };
|
|
3858
3905
|
const t = s.intensity !== void 0 ? s.intensity : 1;
|
|
3859
3906
|
return ne(e, t), e.updateUIParam = function(i, r) {
|
|
@@ -3893,7 +3940,7 @@ m({
|
|
|
3893
3940
|
function ne(s, e) {
|
|
3894
3941
|
s.reset(), s.greyscale(e);
|
|
3895
3942
|
}
|
|
3896
|
-
const { HslAdjustmentFilter:
|
|
3943
|
+
const { HslAdjustmentFilter: Ct } = b;
|
|
3897
3944
|
m({
|
|
3898
3945
|
id: "hsl-adjustment",
|
|
3899
3946
|
name: "HSL Adjustment",
|
|
@@ -3905,7 +3952,7 @@ m({
|
|
|
3905
3952
|
*/
|
|
3906
3953
|
createFilter: (s) => {
|
|
3907
3954
|
try {
|
|
3908
|
-
const e = new
|
|
3955
|
+
const e = new Ct({
|
|
3909
3956
|
hue: s.hue !== void 0 ? s.hue : 0,
|
|
3910
3957
|
saturation: s.saturation !== void 0 ? s.saturation : 0,
|
|
3911
3958
|
lightness: s.lightness !== void 0 ? s.lightness : 0,
|
|
@@ -4003,7 +4050,7 @@ m({
|
|
|
4003
4050
|
}
|
|
4004
4051
|
]
|
|
4005
4052
|
});
|
|
4006
|
-
const { KawaseBlurFilter:
|
|
4053
|
+
const { KawaseBlurFilter: wt } = b;
|
|
4007
4054
|
m({
|
|
4008
4055
|
id: "kawase-blur",
|
|
4009
4056
|
name: "Kawase Blur",
|
|
@@ -4016,7 +4063,7 @@ m({
|
|
|
4016
4063
|
*/
|
|
4017
4064
|
createFilter: (s) => {
|
|
4018
4065
|
try {
|
|
4019
|
-
const e = new
|
|
4066
|
+
const e = new wt({
|
|
4020
4067
|
strength: s.strength || 4,
|
|
4021
4068
|
quality: s.quality || 3,
|
|
4022
4069
|
clamp: s.clamp || !1,
|
|
@@ -4121,7 +4168,7 @@ m({
|
|
|
4121
4168
|
}
|
|
4122
4169
|
]
|
|
4123
4170
|
});
|
|
4124
|
-
const { MotionBlurFilter:
|
|
4171
|
+
const { MotionBlurFilter: St } = b;
|
|
4125
4172
|
m({
|
|
4126
4173
|
id: "motion-blur",
|
|
4127
4174
|
name: "Motion Blur",
|
|
@@ -4134,7 +4181,7 @@ m({
|
|
|
4134
4181
|
*/
|
|
4135
4182
|
createFilter: (s) => {
|
|
4136
4183
|
try {
|
|
4137
|
-
const e = new
|
|
4184
|
+
const e = new St({
|
|
4138
4185
|
velocity: {
|
|
4139
4186
|
x: s.velocityX !== void 0 ? s.velocityX : 0,
|
|
4140
4187
|
y: s.velocityY !== void 0 ? s.velocityY : 0
|
|
@@ -4229,7 +4276,7 @@ m({
|
|
|
4229
4276
|
}
|
|
4230
4277
|
]
|
|
4231
4278
|
});
|
|
4232
|
-
const { RadialBlurFilter:
|
|
4279
|
+
const { RadialBlurFilter: vt } = b;
|
|
4233
4280
|
m({
|
|
4234
4281
|
id: "radial-blur",
|
|
4235
4282
|
name: "Radial Blur",
|
|
@@ -4238,7 +4285,7 @@ m({
|
|
|
4238
4285
|
// Create an instance of the RadialBlurFilter with the provided parameters
|
|
4239
4286
|
createFilter: (s) => {
|
|
4240
4287
|
try {
|
|
4241
|
-
const e = new
|
|
4288
|
+
const e = new vt({
|
|
4242
4289
|
angle: s.angle ?? 20,
|
|
4243
4290
|
center: { x: s.centerX ?? 0, y: s.centerY ?? 0 },
|
|
4244
4291
|
kernelSize: s.kernelSize ?? 15,
|
|
@@ -4353,7 +4400,7 @@ m({
|
|
|
4353
4400
|
}
|
|
4354
4401
|
]
|
|
4355
4402
|
});
|
|
4356
|
-
const { TiltShiftFilter:
|
|
4403
|
+
const { TiltShiftFilter: kt } = b;
|
|
4357
4404
|
m({
|
|
4358
4405
|
id: "tilt-shift",
|
|
4359
4406
|
name: "Tilt Shift",
|
|
@@ -4362,7 +4409,7 @@ m({
|
|
|
4362
4409
|
// Create an instance of the TiltShiftFilter with the provided parameters
|
|
4363
4410
|
createFilter: (s) => {
|
|
4364
4411
|
try {
|
|
4365
|
-
const e = typeof s.blur == "number" ? s.blur : 100, t = typeof s.gradientBlur == "number" ? s.gradientBlur : 600, i = typeof s.startX == "number" ? s.startX : 0, r = typeof s.startY == "number" ? s.startY : 0.5, a = typeof s.endX == "number" ? s.endX : 1, o = typeof s.endY == "number" ? s.endY : 0.5, n = new
|
|
4412
|
+
const e = typeof s.blur == "number" ? s.blur : 100, t = typeof s.gradientBlur == "number" ? s.gradientBlur : 600, i = typeof s.startX == "number" ? s.startX : 0, r = typeof s.startY == "number" ? s.startY : 0.5, a = typeof s.endX == "number" ? s.endX : 1, o = typeof s.endY == "number" ? s.endY : 0.5, n = new kt({
|
|
4366
4413
|
blur: Number(e),
|
|
4367
4414
|
gradientBlur: Number(t),
|
|
4368
4415
|
start: { x: Number(i), y: Number(r) },
|
|
@@ -4481,7 +4528,7 @@ m({
|
|
|
4481
4528
|
}
|
|
4482
4529
|
]
|
|
4483
4530
|
});
|
|
4484
|
-
const { ZoomBlurFilter:
|
|
4531
|
+
const { ZoomBlurFilter: Pt } = b;
|
|
4485
4532
|
m({
|
|
4486
4533
|
id: "zoom-blur",
|
|
4487
4534
|
name: "Zoom Blur",
|
|
@@ -4494,7 +4541,7 @@ m({
|
|
|
4494
4541
|
*/
|
|
4495
4542
|
createFilter: (s) => {
|
|
4496
4543
|
try {
|
|
4497
|
-
const e = new
|
|
4544
|
+
const e = new Pt({
|
|
4498
4545
|
strength: s.strength || 0.1,
|
|
4499
4546
|
center: {
|
|
4500
4547
|
x: s.centerX !== void 0 ? s.centerX : 0.5,
|
|
@@ -4935,7 +4982,7 @@ m({
|
|
|
4935
4982
|
}
|
|
4936
4983
|
]
|
|
4937
4984
|
});
|
|
4938
|
-
const
|
|
4985
|
+
const Mt = b.ColorReplaceFilter;
|
|
4939
4986
|
m({
|
|
4940
4987
|
id: "color-replace",
|
|
4941
4988
|
name: "Color Replace",
|
|
@@ -4952,7 +4999,7 @@ m({
|
|
|
4952
4999
|
s.originalColor && (typeof s.originalColor == "string" ? e = parseInt(s.originalColor.replace("#", "0x"), 16) : typeof s.originalColor == "number" && (e = s.originalColor));
|
|
4953
5000
|
let t = 255;
|
|
4954
5001
|
s.targetColor && (typeof s.targetColor == "string" ? t = parseInt(s.targetColor.replace("#", "0x"), 16) : typeof s.targetColor == "number" && (t = s.targetColor));
|
|
4955
|
-
const i = new
|
|
5002
|
+
const i = new Mt({
|
|
4956
5003
|
originalColor: e,
|
|
4957
5004
|
targetColor: t,
|
|
4958
5005
|
tolerance: s.tolerance || 0.4
|
|
@@ -5016,7 +5063,7 @@ m({
|
|
|
5016
5063
|
}
|
|
5017
5064
|
]
|
|
5018
5065
|
});
|
|
5019
|
-
const
|
|
5066
|
+
const Ft = b.MultiColorReplaceFilter;
|
|
5020
5067
|
m({
|
|
5021
5068
|
id: "multi-color-replace",
|
|
5022
5069
|
name: "Multi-Color Replace",
|
|
@@ -5042,7 +5089,7 @@ m({
|
|
|
5042
5089
|
const i = typeof s.originalColor3 == "string" ? parseInt(s.originalColor3.replace("#", "0x"), 16) : s.originalColor3, r = typeof s.targetColor3 == "string" ? parseInt(s.targetColor3.replace("#", "0x"), 16) : s.targetColor3;
|
|
5043
5090
|
e.push([i, r]);
|
|
5044
5091
|
}
|
|
5045
|
-
const t = new
|
|
5092
|
+
const t = new Ft(
|
|
5046
5093
|
e,
|
|
5047
5094
|
s.tolerance || 0.05,
|
|
5048
5095
|
3
|
|
@@ -5153,7 +5200,7 @@ m({
|
|
|
5153
5200
|
}
|
|
5154
5201
|
]
|
|
5155
5202
|
});
|
|
5156
|
-
const { RGBSplitFilter:
|
|
5203
|
+
const { RGBSplitFilter: At } = b;
|
|
5157
5204
|
m({
|
|
5158
5205
|
id: "rgb-split",
|
|
5159
5206
|
name: "RGB Split",
|
|
@@ -5174,7 +5221,7 @@ m({
|
|
|
5174
5221
|
}, i = {
|
|
5175
5222
|
x: s.blueX !== void 0 ? s.blueX : 0,
|
|
5176
5223
|
y: s.blueY !== void 0 ? s.blueY : 0
|
|
5177
|
-
}, r = new
|
|
5224
|
+
}, r = new At({
|
|
5178
5225
|
red: e,
|
|
5179
5226
|
green: t,
|
|
5180
5227
|
blue: i
|
|
@@ -5287,7 +5334,7 @@ m({
|
|
|
5287
5334
|
}
|
|
5288
5335
|
]
|
|
5289
5336
|
});
|
|
5290
|
-
const { AdvancedBloomFilter:
|
|
5337
|
+
const { AdvancedBloomFilter: zt } = b;
|
|
5291
5338
|
m({
|
|
5292
5339
|
id: "advanced-bloom",
|
|
5293
5340
|
name: "Advanced Bloom",
|
|
@@ -5296,7 +5343,7 @@ m({
|
|
|
5296
5343
|
// Create an instance of the AdvancedBloomFilter with the provided parameters
|
|
5297
5344
|
createFilter: (s) => {
|
|
5298
5345
|
try {
|
|
5299
|
-
const e = new
|
|
5346
|
+
const e = new zt({
|
|
5300
5347
|
threshold: s.threshold || 0.5,
|
|
5301
5348
|
bloomScale: s.bloomScale || 1,
|
|
5302
5349
|
brightness: s.brightness || 1,
|
|
@@ -5443,7 +5490,7 @@ m({
|
|
|
5443
5490
|
}
|
|
5444
5491
|
]
|
|
5445
5492
|
});
|
|
5446
|
-
const
|
|
5493
|
+
const Rt = b.AsciiFilter;
|
|
5447
5494
|
m({
|
|
5448
5495
|
id: "ascii",
|
|
5449
5496
|
name: "ASCII",
|
|
@@ -5455,7 +5502,7 @@ m({
|
|
|
5455
5502
|
const e = typeof s.size == "number" ? s.size : 8;
|
|
5456
5503
|
let t = s.color;
|
|
5457
5504
|
typeof t == "string" && t.startsWith("#") && (t = parseInt(t.replace("#", "0x"), 16));
|
|
5458
|
-
const i = s.replaceColor === !0, r = new
|
|
5505
|
+
const i = s.replaceColor === !0, r = new Rt({
|
|
5459
5506
|
size: e,
|
|
5460
5507
|
color: t,
|
|
5461
5508
|
replaceColor: i
|
|
@@ -5522,7 +5569,7 @@ m({
|
|
|
5522
5569
|
}
|
|
5523
5570
|
]
|
|
5524
5571
|
});
|
|
5525
|
-
const
|
|
5572
|
+
const Nt = b.BackdropBlurFilter;
|
|
5526
5573
|
m({
|
|
5527
5574
|
id: "backdrop-blur",
|
|
5528
5575
|
name: "Backdrop Blur",
|
|
@@ -5531,7 +5578,7 @@ m({
|
|
|
5531
5578
|
// Create an instance of the BackdropBlurFilter with the provided parameters
|
|
5532
5579
|
createFilter: (s) => {
|
|
5533
5580
|
try {
|
|
5534
|
-
const e = new
|
|
5581
|
+
const e = new Nt({
|
|
5535
5582
|
// Higher strength values (20-50) make the effect more noticeable
|
|
5536
5583
|
strength: s.strength || 20,
|
|
5537
5584
|
quality: s.quality || 4,
|
|
@@ -5629,7 +5676,7 @@ m({
|
|
|
5629
5676
|
}
|
|
5630
5677
|
]
|
|
5631
5678
|
});
|
|
5632
|
-
const { BevelFilter:
|
|
5679
|
+
const { BevelFilter: Tt } = b;
|
|
5633
5680
|
m({
|
|
5634
5681
|
id: "bevel",
|
|
5635
5682
|
name: "Bevel",
|
|
@@ -5641,7 +5688,7 @@ m({
|
|
|
5641
5688
|
*/
|
|
5642
5689
|
createFilter: (s) => {
|
|
5643
5690
|
try {
|
|
5644
|
-
const e = s.lightColor ? s.lightColor.replace("#", "0x") : "0xffffff", t = s.shadowColor ? s.shadowColor.replace("#", "0x") : "0x000000", i = new
|
|
5691
|
+
const e = s.lightColor ? s.lightColor.replace("#", "0x") : "0xffffff", t = s.shadowColor ? s.shadowColor.replace("#", "0x") : "0x000000", i = new Tt({
|
|
5645
5692
|
rotation: s.rotation !== void 0 ? s.rotation : 45,
|
|
5646
5693
|
thickness: s.thickness !== void 0 ? s.thickness : 2,
|
|
5647
5694
|
lightColor: parseInt(e, 16),
|
|
@@ -5757,7 +5804,7 @@ m({
|
|
|
5757
5804
|
}
|
|
5758
5805
|
]
|
|
5759
5806
|
});
|
|
5760
|
-
const { BloomFilter:
|
|
5807
|
+
const { BloomFilter: It } = b;
|
|
5761
5808
|
m({
|
|
5762
5809
|
id: "bloom",
|
|
5763
5810
|
name: "Bloom/Glow",
|
|
@@ -5766,7 +5813,7 @@ m({
|
|
|
5766
5813
|
// Create an instance of the BloomFilter with the provided parameters
|
|
5767
5814
|
createFilter: (s) => {
|
|
5768
5815
|
try {
|
|
5769
|
-
const e = typeof s.strengthX == "number" ? s.strengthX : 2, t = typeof s.strengthY == "number" ? s.strengthY : 2, i = typeof s.quality == "number" ? s.quality : 4, r = typeof s.resolution == "number" ? s.resolution : 1, a = typeof s.kernelSize == "number" ? s.kernelSize : 5, o = new
|
|
5816
|
+
const e = typeof s.strengthX == "number" ? s.strengthX : 2, t = typeof s.strengthY == "number" ? s.strengthY : 2, i = typeof s.quality == "number" ? s.quality : 4, r = typeof s.resolution == "number" ? s.resolution : 1, a = typeof s.kernelSize == "number" ? s.kernelSize : 5, o = new It({
|
|
5770
5817
|
strength: {
|
|
5771
5818
|
x: Number(e),
|
|
5772
5819
|
y: Number(t)
|
|
@@ -5869,7 +5916,7 @@ m({
|
|
|
5869
5916
|
}
|
|
5870
5917
|
]
|
|
5871
5918
|
});
|
|
5872
|
-
const { BulgePinchFilter:
|
|
5919
|
+
const { BulgePinchFilter: Et } = b;
|
|
5873
5920
|
m({
|
|
5874
5921
|
id: "bulge-pinch",
|
|
5875
5922
|
// ID must match what the application expects
|
|
@@ -5879,7 +5926,7 @@ m({
|
|
|
5879
5926
|
// Create an instance of the BulgePinchFilter with the provided parameters
|
|
5880
5927
|
createFilter: (s) => {
|
|
5881
5928
|
try {
|
|
5882
|
-
const e = s.centerX ?? 0.5, t = s.centerY ?? 0.5, i = s.radius ?? 100, r = s.strength ?? 1, a = new
|
|
5929
|
+
const e = s.centerX ?? 0.5, t = s.centerY ?? 0.5, i = s.radius ?? 100, r = s.strength ?? 1, a = new Et({
|
|
5883
5930
|
center: {
|
|
5884
5931
|
x: e,
|
|
5885
5932
|
y: t
|
|
@@ -5961,7 +6008,7 @@ m({
|
|
|
5961
6008
|
}
|
|
5962
6009
|
]
|
|
5963
6010
|
});
|
|
5964
|
-
const { ConvolutionFilter:
|
|
6011
|
+
const { ConvolutionFilter: Xt } = b, O = {
|
|
5965
6012
|
normal: [0, 0, 0, 0, 1, 0, 0, 0, 0],
|
|
5966
6013
|
gaussianBlur: [0.045, 0.122, 0.045, 0.122, 0.332, 0.122, 0.045, 0.122, 0.045],
|
|
5967
6014
|
boxBlur: [1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9],
|
|
@@ -5996,7 +6043,7 @@ m({
|
|
|
5996
6043
|
const i = s.preset;
|
|
5997
6044
|
e = O[i] || O.normal;
|
|
5998
6045
|
}
|
|
5999
|
-
const t = new
|
|
6046
|
+
const t = new Xt(e, s.width || 200, s.height || 200);
|
|
6000
6047
|
return t._customParams = { ...s }, t.updateUIParam = function(i, r) {
|
|
6001
6048
|
const a = this._customParams || {};
|
|
6002
6049
|
switch (this._customParams = a, a[i] = r, i) {
|
|
@@ -6207,7 +6254,7 @@ m({
|
|
|
6207
6254
|
}
|
|
6208
6255
|
]
|
|
6209
6256
|
});
|
|
6210
|
-
const { CrossHatchFilter:
|
|
6257
|
+
const { CrossHatchFilter: Yt } = b;
|
|
6211
6258
|
m({
|
|
6212
6259
|
id: "cross-hatch",
|
|
6213
6260
|
name: "Cross Hatch",
|
|
@@ -6217,7 +6264,7 @@ m({
|
|
|
6217
6264
|
// Note: CrossHatchFilter has NO parameters according to PixiJS examples
|
|
6218
6265
|
createFilter: (s) => {
|
|
6219
6266
|
try {
|
|
6220
|
-
const e = new
|
|
6267
|
+
const e = new Yt();
|
|
6221
6268
|
return e.updateUIParam = function(t, i) {
|
|
6222
6269
|
return !0;
|
|
6223
6270
|
}, e;
|
|
@@ -6414,7 +6461,7 @@ m({
|
|
|
6414
6461
|
}
|
|
6415
6462
|
]
|
|
6416
6463
|
});
|
|
6417
|
-
const
|
|
6464
|
+
const Bt = w.DisplacementFilter, Ot = w.Sprite, K = w.Texture;
|
|
6418
6465
|
m({
|
|
6419
6466
|
id: "displacement",
|
|
6420
6467
|
// ID must match what the application expects
|
|
@@ -6440,7 +6487,7 @@ m({
|
|
|
6440
6487
|
}
|
|
6441
6488
|
t = K.from(o);
|
|
6442
6489
|
}
|
|
6443
|
-
const i = new
|
|
6490
|
+
const i = new Ot(t), r = new Bt(i, s.scale || 50);
|
|
6444
6491
|
return r.scale.x = s.scaleX || 50, r.scale.y = s.scaleY || 50, r._customParams = { ...s }, r._displacementSprite = i, r.updateUIParam = function(a, o) {
|
|
6445
6492
|
const n = this._customParams || {};
|
|
6446
6493
|
switch (this._customParams = n, n[a] = o, a) {
|
|
@@ -6587,7 +6634,7 @@ m({
|
|
|
6587
6634
|
}
|
|
6588
6635
|
]
|
|
6589
6636
|
});
|
|
6590
|
-
const { EmbossFilter:
|
|
6637
|
+
const { EmbossFilter: Lt } = b;
|
|
6591
6638
|
m({
|
|
6592
6639
|
id: "emboss",
|
|
6593
6640
|
name: "Emboss",
|
|
@@ -6596,7 +6643,7 @@ m({
|
|
|
6596
6643
|
// Create an instance of the Emboss filter with the provided parameters
|
|
6597
6644
|
createFilter: (s) => {
|
|
6598
6645
|
try {
|
|
6599
|
-
const e = typeof s.strength == "number" ? s.strength : 5, t = new
|
|
6646
|
+
const e = typeof s.strength == "number" ? s.strength : 5, t = new Lt(e);
|
|
6600
6647
|
return t._customParams = {
|
|
6601
6648
|
strength: e
|
|
6602
6649
|
}, t.updateUIParam = function(i, r) {
|
|
@@ -6636,7 +6683,7 @@ m({
|
|
|
6636
6683
|
}
|
|
6637
6684
|
]
|
|
6638
6685
|
});
|
|
6639
|
-
const { GlitchFilter:
|
|
6686
|
+
const { GlitchFilter: Dt } = b, I = {
|
|
6640
6687
|
TRANSPARENT: 0,
|
|
6641
6688
|
ORIGINAL: 1,
|
|
6642
6689
|
LOOP: 2,
|
|
@@ -6650,7 +6697,7 @@ m({
|
|
|
6650
6697
|
description: "Apply digital distortion and glitch effects",
|
|
6651
6698
|
createFilter: (s) => {
|
|
6652
6699
|
try {
|
|
6653
|
-
const e = { x: s.redX, y: s.redY }, t = { x: s.greenX, y: s.greenY }, i = { x: s.blueX, y: s.blueY }, r = new
|
|
6700
|
+
const e = { x: s.redX, y: s.redY }, t = { x: s.greenX, y: s.greenY }, i = { x: s.blueX, y: s.blueY }, r = new Dt({
|
|
6654
6701
|
slices: s.slices,
|
|
6655
6702
|
offset: s.offset,
|
|
6656
6703
|
direction: s.direction,
|
|
@@ -6891,7 +6938,7 @@ m({
|
|
|
6891
6938
|
}
|
|
6892
6939
|
]
|
|
6893
6940
|
});
|
|
6894
|
-
const { GlowFilter:
|
|
6941
|
+
const { GlowFilter: Ut } = b;
|
|
6895
6942
|
m({
|
|
6896
6943
|
id: "glow",
|
|
6897
6944
|
name: "Glow",
|
|
@@ -6900,7 +6947,7 @@ m({
|
|
|
6900
6947
|
// Create an instance of the GlowFilter with the provided parameters
|
|
6901
6948
|
createFilter: (s) => {
|
|
6902
6949
|
try {
|
|
6903
|
-
const e = parseInt(s.color.replace("#", "0x"), 16), t = new
|
|
6950
|
+
const e = parseInt(s.color.replace("#", "0x"), 16), t = new Ut({
|
|
6904
6951
|
distance: s.distance || 10,
|
|
6905
6952
|
outerStrength: s.outerStrength || 4,
|
|
6906
6953
|
innerStrength: s.innerStrength || 0,
|
|
@@ -7026,7 +7073,7 @@ m({
|
|
|
7026
7073
|
}
|
|
7027
7074
|
]
|
|
7028
7075
|
});
|
|
7029
|
-
const { GodrayFilter:
|
|
7076
|
+
const { GodrayFilter: Vt } = b;
|
|
7030
7077
|
m({
|
|
7031
7078
|
id: "godray",
|
|
7032
7079
|
name: "Godray",
|
|
@@ -7035,7 +7082,7 @@ m({
|
|
|
7035
7082
|
// Create an instance of the GodrayFilter with the provided parameters
|
|
7036
7083
|
createFilter: (s) => {
|
|
7037
7084
|
try {
|
|
7038
|
-
const e = new
|
|
7085
|
+
const e = new Vt({
|
|
7039
7086
|
angle: s.angle || 30,
|
|
7040
7087
|
parallel: s.parallel ?? !0,
|
|
7041
7088
|
center: {
|
|
@@ -7188,7 +7235,7 @@ m({
|
|
|
7188
7235
|
}
|
|
7189
7236
|
]
|
|
7190
7237
|
});
|
|
7191
|
-
const
|
|
7238
|
+
const jt = b.SimpleLightmapFilter, ce = w.Texture;
|
|
7192
7239
|
m({
|
|
7193
7240
|
id: "lightmap",
|
|
7194
7241
|
name: "Lightmap",
|
|
@@ -7220,7 +7267,7 @@ m({
|
|
|
7220
7267
|
} catch {
|
|
7221
7268
|
n = 0;
|
|
7222
7269
|
}
|
|
7223
|
-
const l = new
|
|
7270
|
+
const l = new jt(o, n, i);
|
|
7224
7271
|
return l._customParams = {
|
|
7225
7272
|
textureType: e,
|
|
7226
7273
|
color: t,
|
|
@@ -7319,7 +7366,7 @@ m({
|
|
|
7319
7366
|
}
|
|
7320
7367
|
]
|
|
7321
7368
|
});
|
|
7322
|
-
const { NoiseFilter:
|
|
7369
|
+
const { NoiseFilter: qt } = w;
|
|
7323
7370
|
m({
|
|
7324
7371
|
id: "noise",
|
|
7325
7372
|
name: "Noise",
|
|
@@ -7327,7 +7374,7 @@ m({
|
|
|
7327
7374
|
description: "Add random noise to the image",
|
|
7328
7375
|
createFilter: (s) => {
|
|
7329
7376
|
try {
|
|
7330
|
-
const e = new
|
|
7377
|
+
const e = new qt({
|
|
7331
7378
|
noise: s.noise || 0.5,
|
|
7332
7379
|
seed: s.seed || Math.random()
|
|
7333
7380
|
});
|
|
@@ -7404,7 +7451,7 @@ m({
|
|
|
7404
7451
|
}
|
|
7405
7452
|
]
|
|
7406
7453
|
});
|
|
7407
|
-
const { OldFilmFilter:
|
|
7454
|
+
const { OldFilmFilter: Ht } = b;
|
|
7408
7455
|
m({
|
|
7409
7456
|
id: "old-film",
|
|
7410
7457
|
name: "Old Film",
|
|
@@ -7412,7 +7459,7 @@ m({
|
|
|
7412
7459
|
description: "Apply a vintage film effect with scratches and grain",
|
|
7413
7460
|
createFilter: (s) => {
|
|
7414
7461
|
try {
|
|
7415
|
-
const e = new
|
|
7462
|
+
const e = new Ht({
|
|
7416
7463
|
sepia: s.sepia,
|
|
7417
7464
|
noise: s.noise,
|
|
7418
7465
|
noiseSize: s.noiseSize,
|
|
@@ -7593,7 +7640,7 @@ m({
|
|
|
7593
7640
|
}
|
|
7594
7641
|
]
|
|
7595
7642
|
});
|
|
7596
|
-
const { OutlineFilter:
|
|
7643
|
+
const { OutlineFilter: $t } = b;
|
|
7597
7644
|
m({
|
|
7598
7645
|
id: "outline",
|
|
7599
7646
|
name: "Outline",
|
|
@@ -7603,7 +7650,7 @@ m({
|
|
|
7603
7650
|
try {
|
|
7604
7651
|
let e = s.color;
|
|
7605
7652
|
typeof e == "string" && (e = parseInt(e.replace("#", "0x"), 16));
|
|
7606
|
-
const t = new
|
|
7653
|
+
const t = new $t({
|
|
7607
7654
|
thickness: s.thickness || 4,
|
|
7608
7655
|
color: e,
|
|
7609
7656
|
alpha: s.alpha || 1,
|
|
@@ -7693,7 +7740,7 @@ m({
|
|
|
7693
7740
|
}
|
|
7694
7741
|
]
|
|
7695
7742
|
});
|
|
7696
|
-
const { PixelateFilter:
|
|
7743
|
+
const { PixelateFilter: Wt } = b;
|
|
7697
7744
|
m({
|
|
7698
7745
|
id: "pixelate",
|
|
7699
7746
|
name: "Pixelate",
|
|
@@ -7701,7 +7748,7 @@ m({
|
|
|
7701
7748
|
description: "Create a pixelated or mosaic effect",
|
|
7702
7749
|
createFilter: (s) => {
|
|
7703
7750
|
try {
|
|
7704
|
-
const e = new
|
|
7751
|
+
const e = new Wt(
|
|
7705
7752
|
s.useUniform ? Math.max(4, s.size || 10) : [Math.max(4, s.sizeX || 10), Math.max(4, s.sizeY || 10)]
|
|
7706
7753
|
);
|
|
7707
7754
|
return e._customParams = { ...s }, e.updateUIParam = function(t, i) {
|
|
@@ -7784,7 +7831,7 @@ m({
|
|
|
7784
7831
|
}
|
|
7785
7832
|
]
|
|
7786
7833
|
});
|
|
7787
|
-
const { ReflectionFilter:
|
|
7834
|
+
const { ReflectionFilter: Zt } = b;
|
|
7788
7835
|
m({
|
|
7789
7836
|
id: "reflection",
|
|
7790
7837
|
// ID must match what the application expects
|
|
@@ -7801,7 +7848,7 @@ m({
|
|
|
7801
7848
|
waveLength: new Float32Array([s.wavelengthStart ?? 30, s.wavelengthEnd ?? 100]),
|
|
7802
7849
|
alpha: new Float32Array([s.alphaStart ?? 1, s.alphaEnd ?? 1]),
|
|
7803
7850
|
time: s.time ?? 0
|
|
7804
|
-
}, t = new
|
|
7851
|
+
}, t = new Zt(e);
|
|
7805
7852
|
return t._customParams = { ...s }, t.animating = s.animating ?? !1, t.updateUIParam = function(i, r) {
|
|
7806
7853
|
const a = this._customParams || {};
|
|
7807
7854
|
switch (this._customParams = a, a[i] = r, i) {
|
|
@@ -7952,7 +7999,7 @@ m({
|
|
|
7952
7999
|
}
|
|
7953
8000
|
]
|
|
7954
8001
|
});
|
|
7955
|
-
const { ShockwaveFilter:
|
|
8002
|
+
const { ShockwaveFilter: Gt } = b;
|
|
7956
8003
|
m({
|
|
7957
8004
|
id: "shockwave",
|
|
7958
8005
|
// ID must match what the application expects
|
|
@@ -7962,7 +8009,7 @@ m({
|
|
|
7962
8009
|
// Create an instance of the ShockwaveFilter with the provided parameters
|
|
7963
8010
|
createFilter: (s) => {
|
|
7964
8011
|
try {
|
|
7965
|
-
const e = s.centerX ?? 0.5, t = s.centerY ?? 0.5, i = { x: e, y: t }, r = s.amplitude ?? 30, a = s.wavelength ?? 160, o = s.speed ?? 500, n = s.brightness ?? 1, l = s.radius ?? -1, c = s.time ?? 0, d = new
|
|
8012
|
+
const e = s.centerX ?? 0.5, t = s.centerY ?? 0.5, i = { x: e, y: t }, r = s.amplitude ?? 30, a = s.wavelength ?? 160, o = s.speed ?? 500, n = s.brightness ?? 1, l = s.radius ?? -1, c = s.time ?? 0, d = new Gt({
|
|
7966
8013
|
center: i,
|
|
7967
8014
|
amplitude: r,
|
|
7968
8015
|
wavelength: a,
|
|
@@ -8104,7 +8151,7 @@ m({
|
|
|
8104
8151
|
}
|
|
8105
8152
|
]
|
|
8106
8153
|
});
|
|
8107
|
-
const { SimplexNoiseFilter:
|
|
8154
|
+
const { SimplexNoiseFilter: Kt } = b;
|
|
8108
8155
|
m({
|
|
8109
8156
|
id: "simplex-noise",
|
|
8110
8157
|
name: "Simplex Noise",
|
|
@@ -8112,7 +8159,7 @@ m({
|
|
|
8112
8159
|
description: "Apply procedural noise to create texture effects",
|
|
8113
8160
|
createFilter: (s) => {
|
|
8114
8161
|
try {
|
|
8115
|
-
const e = s.animating ? 0 : s.offsetZ || 0, t = new
|
|
8162
|
+
const e = s.animating ? 0 : s.offsetZ || 0, t = new Kt({
|
|
8116
8163
|
strength: s.strength,
|
|
8117
8164
|
noiseScale: s.noiseScale,
|
|
8118
8165
|
offsetX: s.offsetX,
|
|
@@ -8259,7 +8306,7 @@ m({
|
|
|
8259
8306
|
}
|
|
8260
8307
|
]
|
|
8261
8308
|
});
|
|
8262
|
-
class
|
|
8309
|
+
class Qt extends w.Filter {
|
|
8263
8310
|
constructor(e) {
|
|
8264
8311
|
const t = Se.from({
|
|
8265
8312
|
vertex: `
|
|
@@ -8370,7 +8417,7 @@ m({
|
|
|
8370
8417
|
description: "Creates a twisting distortion effect around a central point",
|
|
8371
8418
|
createFilter: (s) => {
|
|
8372
8419
|
try {
|
|
8373
|
-
const e = new
|
|
8420
|
+
const e = new Qt({
|
|
8374
8421
|
centerX: s.centerX ?? 0.5,
|
|
8375
8422
|
centerY: s.centerY ?? 0.5,
|
|
8376
8423
|
radius: s.radius ?? 0.25,
|
|
@@ -8440,7 +8487,7 @@ m({
|
|
|
8440
8487
|
}
|
|
8441
8488
|
]
|
|
8442
8489
|
});
|
|
8443
|
-
const { AdjustmentFilter:
|
|
8490
|
+
const { AdjustmentFilter: Jt } = b;
|
|
8444
8491
|
function q(s) {
|
|
8445
8492
|
const e = typeof s == "string" ? parseInt(s.replace("#", "0x"), 16) : s;
|
|
8446
8493
|
return [
|
|
@@ -8449,7 +8496,7 @@ function q(s) {
|
|
|
8449
8496
|
(e & 255) / 255
|
|
8450
8497
|
];
|
|
8451
8498
|
}
|
|
8452
|
-
class
|
|
8499
|
+
class ei extends Jt {
|
|
8453
8500
|
constructor(e = {}) {
|
|
8454
8501
|
super({
|
|
8455
8502
|
brightness: 1,
|
|
@@ -8492,7 +8539,7 @@ m({
|
|
|
8492
8539
|
description: "Add a classic darkened border effect to the image",
|
|
8493
8540
|
createFilter: (s) => {
|
|
8494
8541
|
try {
|
|
8495
|
-
const e = new
|
|
8542
|
+
const e = new ei({
|
|
8496
8543
|
radius: s.radius || 0.8,
|
|
8497
8544
|
strength: s.strength || 1,
|
|
8498
8545
|
color: s.color || "#000000"
|
|
@@ -8556,22 +8603,22 @@ m({
|
|
|
8556
8603
|
}
|
|
8557
8604
|
]
|
|
8558
8605
|
});
|
|
8559
|
-
function
|
|
8606
|
+
function oi(s) {
|
|
8560
8607
|
try {
|
|
8561
8608
|
let e = [], t = [];
|
|
8562
8609
|
try {
|
|
8563
|
-
e = H(), e.length === 0 &&
|
|
8610
|
+
e = H(), e.length === 0 && ot();
|
|
8564
8611
|
} catch {
|
|
8565
8612
|
}
|
|
8566
8613
|
const i = s == null ? void 0 : s.disabled;
|
|
8567
8614
|
if (Array.isArray(i) && i.length > 0) {
|
|
8568
8615
|
let r = 0;
|
|
8569
8616
|
for (const a of i)
|
|
8570
|
-
|
|
8617
|
+
ct(a) && r++;
|
|
8571
8618
|
r > 0;
|
|
8572
8619
|
}
|
|
8573
8620
|
try {
|
|
8574
|
-
e = H(), t =
|
|
8621
|
+
e = H(), t = lt();
|
|
8575
8622
|
} catch {
|
|
8576
8623
|
e || (e = []), t || (t = []);
|
|
8577
8624
|
}
|
|
@@ -8581,16 +8628,16 @@ function ai(s) {
|
|
|
8581
8628
|
}
|
|
8582
8629
|
}
|
|
8583
8630
|
export {
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8587
|
-
|
|
8588
|
-
|
|
8589
|
-
|
|
8590
|
-
|
|
8631
|
+
ri as V,
|
|
8632
|
+
at as a,
|
|
8633
|
+
nt as b,
|
|
8634
|
+
lt as c,
|
|
8635
|
+
ot as d,
|
|
8636
|
+
ai as e,
|
|
8637
|
+
ht as f,
|
|
8591
8638
|
H as g,
|
|
8592
|
-
|
|
8593
|
-
|
|
8639
|
+
si as h,
|
|
8640
|
+
oi as i,
|
|
8594
8641
|
m as r
|
|
8595
8642
|
};
|
|
8596
|
-
//# sourceMappingURL=editor-
|
|
8643
|
+
//# sourceMappingURL=editor-DWDUrVRz.js.map
|