@pixerate/editor 0.217.0 → 0.218.1
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/{chunk-WJ2RBZMM.js → chunk-HLBTRSQJ.js} +24 -0
- package/dist/{chunk-KWNMBMKG.cjs → chunk-XFYLA3ZO.cjs} +25 -1
- package/dist/image-editor/index.cjs +424 -379
- package/dist/image-editor/index.js +54 -9
- package/dist/image-editor/selection/overlay.d.cts +7 -0
- package/dist/image-editor/selection/overlay.d.ts +7 -0
- package/dist/paint/index.cjs +4 -2
- package/dist/paint/index.js +3 -1
- package/dist/paint/wet/world.d.cts +19 -0
- package/dist/paint/wet/world.d.ts +19 -0
- package/dist/paint-editor/controller.d.cts +5 -3
- package/dist/paint-editor/controller.d.ts +5 -3
- package/dist/paint-editor/index.cjs +203 -148
- package/dist/paint-editor/index.js +72 -17
- package/dist/paint-editor/wet.d.cts +14 -0
- package/dist/paint-editor/wet.d.ts +14 -0
- package/package.json +1 -1
- package/skills/pixerate-paint-editor/SKILL.md +1 -1
|
@@ -652,7 +652,8 @@ var _chunkMQDIP4CFcjs = require('../chunk-MQDIP4CF.cjs');
|
|
|
652
652
|
|
|
653
653
|
|
|
654
654
|
|
|
655
|
-
|
|
655
|
+
|
|
656
|
+
var _chunkXFYLA3ZOcjs = require('../chunk-XFYLA3ZO.cjs');
|
|
656
657
|
|
|
657
658
|
|
|
658
659
|
|
|
@@ -1038,6 +1039,44 @@ function selectionOutline(mask, threshold = 128) {
|
|
|
1038
1039
|
}
|
|
1039
1040
|
return Float32Array.from(segs);
|
|
1040
1041
|
}
|
|
1042
|
+
function selectionOutlinePaths(mask, threshold = 128) {
|
|
1043
|
+
const segs = selectionOutline(mask, threshold);
|
|
1044
|
+
const n = segs.length / 4;
|
|
1045
|
+
if (!n) return [];
|
|
1046
|
+
const stride = mask.width + 1;
|
|
1047
|
+
const key2 = (x, y) => y * stride + x;
|
|
1048
|
+
const at = /* @__PURE__ */ new Map();
|
|
1049
|
+
for (let s = 0; s < n; s++) {
|
|
1050
|
+
for (const k of [key2(segs[s * 4], segs[s * 4 + 1]), key2(segs[s * 4 + 2], segs[s * 4 + 3])]) {
|
|
1051
|
+
const list = at.get(k);
|
|
1052
|
+
if (list) list.push(s);
|
|
1053
|
+
else at.set(k, [s]);
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
const used = new Uint8Array(n);
|
|
1057
|
+
const paths = [];
|
|
1058
|
+
for (let s0 = 0; s0 < n; s0++) {
|
|
1059
|
+
if (used[s0]) continue;
|
|
1060
|
+
used[s0] = 1;
|
|
1061
|
+
const pts = [segs[s0 * 4], segs[s0 * 4 + 1], segs[s0 * 4 + 2], segs[s0 * 4 + 3]];
|
|
1062
|
+
for (const forward of [true, false]) {
|
|
1063
|
+
for (; ; ) {
|
|
1064
|
+
const x = forward ? pts[pts.length - 2] : pts[0];
|
|
1065
|
+
const y = forward ? pts[pts.length - 1] : pts[1];
|
|
1066
|
+
const next = _optionalChain([at, 'access', _2 => _2.get, 'call', _3 => _3(key2(x, y)), 'optionalAccess', _4 => _4.find, 'call', _5 => _5((t) => !used[t])]);
|
|
1067
|
+
if (next === void 0) break;
|
|
1068
|
+
used[next] = 1;
|
|
1069
|
+
const a = [segs[next * 4], segs[next * 4 + 1]];
|
|
1070
|
+
const b = [segs[next * 4 + 2], segs[next * 4 + 3]];
|
|
1071
|
+
const far = a[0] === x && a[1] === y ? b : a;
|
|
1072
|
+
if (forward) pts.push(far[0], far[1]);
|
|
1073
|
+
else pts.unshift(far[0], far[1]);
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
paths.push(Float32Array.from(pts));
|
|
1077
|
+
}
|
|
1078
|
+
return paths;
|
|
1079
|
+
}
|
|
1041
1080
|
function quickMaskPixels(mask, style = {}) {
|
|
1042
1081
|
const [r, g, b] = _nullishCoalesce(style.color, () => ( [255, 0, 0]));
|
|
1043
1082
|
const k = Math.min(1, Math.max(0, _nullishCoalesce(style.opacity, () => ( 0.5))));
|
|
@@ -1075,8 +1114,8 @@ function compareSelectionMasks(a, b, width, height, options = {}) {
|
|
|
1075
1114
|
const minArea = Math.max(1, _nullishCoalesce(options.minArea, () => ( 4)));
|
|
1076
1115
|
const maxRegions = Math.max(1, _nullishCoalesce(options.maxRegions, () => ( 10)));
|
|
1077
1116
|
const n = width * height;
|
|
1078
|
-
const ad = _optionalChain([a, 'optionalAccess',
|
|
1079
|
-
const bd = _optionalChain([b, 'optionalAccess',
|
|
1117
|
+
const ad = _optionalChain([a, 'optionalAccess', _6 => _6.data]);
|
|
1118
|
+
const bd = _optionalChain([b, 'optionalAccess', _7 => _7.data]);
|
|
1080
1119
|
const added = new Uint8Array(n);
|
|
1081
1120
|
const removed = new Uint8Array(n);
|
|
1082
1121
|
let areaA = 0;
|
|
@@ -1106,8 +1145,8 @@ function compareSelectionMasks(a, b, width, height, options = {}) {
|
|
|
1106
1145
|
const addedMask = _chunkSS53NNZOcjs.createSelectionMask.call(void 0, width, height, added);
|
|
1107
1146
|
const removedMask = _chunkSS53NNZOcjs.createSelectionMask.call(void 0, width, height, removed);
|
|
1108
1147
|
return {
|
|
1109
|
-
a: { area: areaA, bounds: _nullishCoalesce(_optionalChain([a, 'optionalAccess',
|
|
1110
|
-
b: { area: areaB, bounds: _nullishCoalesce(_optionalChain([b, 'optionalAccess',
|
|
1148
|
+
a: { area: areaA, bounds: _nullishCoalesce(_optionalChain([a, 'optionalAccess', _8 => _8.bounds]), () => ( null)) },
|
|
1149
|
+
b: { area: areaB, bounds: _nullishCoalesce(_optionalChain([b, 'optionalAccess', _9 => _9.bounds]), () => ( null)) },
|
|
1111
1150
|
added: { area: addedArea, ...pieces(added, width, height, addedMask.bounds, minArea, maxRegions) },
|
|
1112
1151
|
removed: { area: removedArea, ...pieces(removed, width, height, removedMask.bounds, minArea, maxRegions) },
|
|
1113
1152
|
iou: union ? Math.round(inter / union * 1e4) / 1e4 : 1,
|
|
@@ -1231,7 +1270,7 @@ function needsLegacyBase(input) {
|
|
|
1231
1270
|
if (!_chunkS55JFWDAcjs.isLegacyShape.call(void 0, stack)) return false;
|
|
1232
1271
|
const bg = stack.layers[0];
|
|
1233
1272
|
if (!isQuarterTurn(transform.rotate) || !isIntegerRect(region)) return true;
|
|
1234
|
-
if (_optionalChain([bg, 'access',
|
|
1273
|
+
if (_optionalChain([bg, 'access', _10 => _10.mask, 'optionalAccess', _11 => _11.source, 'optionalAccess', _12 => _12.enabled]) && bg.mask.source.maskSource) return true;
|
|
1235
1274
|
if (stack.outputOpacity < 1) return true;
|
|
1236
1275
|
const blur = _chunkS55JFWDAcjs.blurFilter.call(void 0, bg);
|
|
1237
1276
|
if (blur && blur.enabled && blur.radius > 0) {
|
|
@@ -1512,7 +1551,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1512
1551
|
`${projection.angle},${transform.flipH},${transform.flipV}`,
|
|
1513
1552
|
`${adjustments.brightness},${adjustments.contrast},${adjustments.saturation},${adjustments.exposure},${adjustments.temperature},${_nullishCoalesce(adjustments.tint, () => ( 0))},${adjustments.blur},${adjustments.opacity},p${_chunkS55JFWDAcjs.normalizeProcessVersion.call(void 0, adjustments.process)}`,
|
|
1514
1553
|
_chunkS55JFWDAcjs.adjustmentLayersKey.call(void 0, adjustments.layers),
|
|
1515
|
-
`${depthMask.enabled},${depthMask.maskSource},${_optionalChain([depthMask, 'access',
|
|
1554
|
+
`${depthMask.enabled},${depthMask.maskSource},${_optionalChain([depthMask, 'access', _13 => _13.depthRange, 'optionalAccess', _14 => _14[0]])}-${_optionalChain([depthMask, 'access', _15 => _15.depthRange, 'optionalAccess', _16 => _16[1]])},${depthMask.softness},${depthMask.invert},${depthMask.mode}`,
|
|
1516
1555
|
`d${this.displayKey}`
|
|
1517
1556
|
].join("|");
|
|
1518
1557
|
let baseCanvas = this.cachedBaseCanvas;
|
|
@@ -1520,12 +1559,12 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1520
1559
|
let histogram = null;
|
|
1521
1560
|
baseCanvas = await this.renderBaseImage(img, naturalWidth, naturalHeight, region, transform, state, (pixels) => {
|
|
1522
1561
|
histogram = computeHistogram(pixels);
|
|
1523
|
-
_optionalChain([this, 'access',
|
|
1562
|
+
_optionalChain([this, 'access', _17 => _17.display, 'optionalCall', _18 => _18(pixels.data)]);
|
|
1524
1563
|
});
|
|
1525
1564
|
this.cachedBaseCanvas = baseCanvas;
|
|
1526
1565
|
this.cachedBaseKey = baseKey;
|
|
1527
1566
|
this.previewHistogram = histogram;
|
|
1528
|
-
_optionalChain([this, 'access',
|
|
1567
|
+
_optionalChain([this, 'access', _19 => _19.onPreviewHistogram, 'optionalCall', _20 => _20(histogram)]);
|
|
1529
1568
|
}
|
|
1530
1569
|
const drawW = rotated.width * projection.scale;
|
|
1531
1570
|
const drawH = rotated.height * projection.scale;
|
|
@@ -1540,7 +1579,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1540
1579
|
const drawW = rotated.width * projection.scale;
|
|
1541
1580
|
const drawH = rotated.height * projection.scale;
|
|
1542
1581
|
ctx.drawImage(base.canvas, projection.originX - drawW / 2, projection.originY - drawH / 2, drawW, drawH);
|
|
1543
|
-
this.publishHistogram(_nullishCoalesce(_nullishCoalesce(base.histogram, () => ( _optionalChain([comp, 'optionalAccess',
|
|
1582
|
+
this.publishHistogram(_nullishCoalesce(_nullishCoalesce(base.histogram, () => ( _optionalChain([comp, 'optionalAccess', _21 => _21.histogram, 'call', _22 => _22()]))), () => ( null)));
|
|
1544
1583
|
}
|
|
1545
1584
|
}
|
|
1546
1585
|
if (overlay.length > 0 || options.draftAnnotation) {
|
|
@@ -1598,8 +1637,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1598
1637
|
}
|
|
1599
1638
|
const { width: iw, height: ih } = state.imageDimensions;
|
|
1600
1639
|
const shownSel = state.selectionPreview !== void 0 ? state.selectionPreview : state.selection;
|
|
1601
|
-
const quickMaskSel = display === "quickMask" && state.quickMaskEditing && !_optionalChain([shownSel, 'optionalAccess',
|
|
1602
|
-
if (_optionalChain([shownSel, 'optionalAccess',
|
|
1640
|
+
const quickMaskSel = display === "quickMask" && state.quickMaskEditing && !_optionalChain([shownSel, 'optionalAccess', _23 => _23.bounds]) ? this.emptyMask(Math.round(iw), Math.round(ih)) : null;
|
|
1641
|
+
if (_optionalChain([shownSel, 'optionalAccess', _24 => _24.bounds]) && display !== "none" || quickMaskSel || _optionalChain([options, 'access', _25 => _25.draftSelectionPath, 'optionalAccess', _26 => _26.length])) {
|
|
1603
1642
|
ctx.save();
|
|
1604
1643
|
try {
|
|
1605
1644
|
_chunkS55JFWDAcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
|
|
@@ -1607,9 +1646,9 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1607
1646
|
ctx.rect(region.x, region.y, region.width, region.height);
|
|
1608
1647
|
ctx.clip();
|
|
1609
1648
|
if (quickMaskSel) this.drawQuickMask(ctx, quickMaskSel);
|
|
1610
|
-
else if (_optionalChain([shownSel, 'optionalAccess',
|
|
1611
|
-
else if (_optionalChain([shownSel, 'optionalAccess',
|
|
1612
|
-
if (_optionalChain([options, 'access',
|
|
1649
|
+
else if (_optionalChain([shownSel, 'optionalAccess', _27 => _27.bounds]) && display === "quickMask") this.drawQuickMask(ctx, shownSel);
|
|
1650
|
+
else if (_optionalChain([shownSel, 'optionalAccess', _28 => _28.bounds]) && display === "ants") this.drawAnts(ctx, shownSel, projection.scale / u, _nullishCoalesce(options.antsOffset, () => ( 0)));
|
|
1651
|
+
if (_optionalChain([options, 'access', _29 => _29.draftSelectionPath, 'optionalAccess', _30 => _30.length])) this.drawDraftPath(ctx, options.draftSelectionPath, projection.scale / u);
|
|
1613
1652
|
} catch (e7) {
|
|
1614
1653
|
}
|
|
1615
1654
|
ctx.restore();
|
|
@@ -1740,7 +1779,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1740
1779
|
ctx.lineWidth = 1.5 * u;
|
|
1741
1780
|
ctx.strokeStyle = "#ffffff";
|
|
1742
1781
|
ctx.stroke();
|
|
1743
|
-
drawOverlayHandles(ctx, [...t.handles, ..._nullishCoalesce(_optionalChain([t, 'access',
|
|
1782
|
+
drawOverlayHandles(ctx, [...t.handles, ..._nullishCoalesce(_optionalChain([t, 'access', _31 => _31.warp, 'optionalAccess', _32 => _32.anchors]), () => ( []))].map(scr), u);
|
|
1744
1783
|
if (rotate) {
|
|
1745
1784
|
ctx.beginPath();
|
|
1746
1785
|
ctx.arc(rotate.x, rotate.y, 5 * u, 0, Math.PI * 2);
|
|
@@ -1750,7 +1789,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1750
1789
|
ctx.strokeStyle = OVERLAY_HANDLE_EDGE;
|
|
1751
1790
|
ctx.stroke();
|
|
1752
1791
|
}
|
|
1753
|
-
for (const h of (_nullishCoalesce(_optionalChain([t, 'access',
|
|
1792
|
+
for (const h of (_nullishCoalesce(_optionalChain([t, 'access', _33 => _33.warp, 'optionalAccess', _34 => _34.handles]), () => ( []))).map((w) => scr(w.point))) {
|
|
1754
1793
|
ctx.beginPath();
|
|
1755
1794
|
ctx.arc(h.x, h.y, 3.5 * u, 0, Math.PI * 2);
|
|
1756
1795
|
ctx.fillStyle = "#ffffff";
|
|
@@ -1895,7 +1934,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1895
1934
|
} catch (e14) {
|
|
1896
1935
|
}
|
|
1897
1936
|
}
|
|
1898
|
-
_optionalChain([onPixels, 'optionalCall',
|
|
1937
|
+
_optionalChain([onPixels, 'optionalCall', _35 => _35(imageData)]);
|
|
1899
1938
|
baseCtx.putImageData(imageData, 0, 0);
|
|
1900
1939
|
}
|
|
1901
1940
|
return baseCanvas;
|
|
@@ -1904,7 +1943,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1904
1943
|
/** Which base path renders `state` (see `needsLegacyBase`). */
|
|
1905
1944
|
chooseRoute(state, region, naturalWidth, naturalHeight) {
|
|
1906
1945
|
let route;
|
|
1907
|
-
if (!_optionalChain([state, 'access',
|
|
1946
|
+
if (!_optionalChain([state, 'access', _36 => _36.layers, 'optionalAccess', _37 => _37.length])) route = "legacy";
|
|
1908
1947
|
else if (this.baseRoute === "layers") route = "layers";
|
|
1909
1948
|
else {
|
|
1910
1949
|
const stack = { layers: state.layers, outputOpacity: _nullishCoalesce(state.outputOpacity, () => ( 1)), legacyOutputBlur: state.legacyOutputBlur };
|
|
@@ -1914,7 +1953,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1914
1953
|
region,
|
|
1915
1954
|
canvas: { width: naturalWidth, height: naturalHeight },
|
|
1916
1955
|
transform: state.transform,
|
|
1917
|
-
sourceOpaque: _nullishCoalesce(_optionalChain([this, 'access',
|
|
1956
|
+
sourceOpaque: _nullishCoalesce(_optionalChain([this, 'access', _38 => _38.layerSources, 'optionalAccess', _39 => _39.sourceIsOpaque, 'call', _40 => _40()]), () => ( true))
|
|
1918
1957
|
}) ? "legacy" : "layers";
|
|
1919
1958
|
}
|
|
1920
1959
|
this.lastBaseRoute = route;
|
|
@@ -1932,24 +1971,24 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1932
1971
|
return _nullishCoalesce(this.depthMaps.get(`${source.maskSource}|${width}x${height}`), () => ( null));
|
|
1933
1972
|
},
|
|
1934
1973
|
rasterizeAnnotation: (annotation, rect2) => this.rasterizeAnnotation(annotation, rect2),
|
|
1935
|
-
version: `${_nullishCoalesce(_optionalChain([host, 'optionalAccess',
|
|
1936
|
-
globalLight: _optionalChain([host, 'optionalAccess',
|
|
1937
|
-
pattern: _optionalChain([host, 'optionalAccess',
|
|
1974
|
+
version: `${_nullishCoalesce(_optionalChain([host, 'optionalAccess', _41 => _41.version, 'call', _42 => _42()]), () => ( ""))}:${this.assetVersion}`,
|
|
1975
|
+
globalLight: _optionalChain([host, 'optionalAccess', _43 => _43.globalLight, 'optionalCall', _44 => _44()]),
|
|
1976
|
+
pattern: _optionalChain([host, 'optionalAccess', _45 => _45.pattern]) ? (id) => host.pattern(id) : void 0
|
|
1938
1977
|
};
|
|
1939
1978
|
}
|
|
1940
1979
|
/** Loads what the compositor reads synchronously: depth maps (at canvas size) and annotation images. */
|
|
1941
1980
|
/** Loads depth maps and annotation images the compositor reads synchronously. */
|
|
1942
1981
|
async prepareLayerAssets(layers, width, height) {
|
|
1943
1982
|
for (const l of _chunkB46UQUDCcjs.flattenLayers.call(void 0, layers)) {
|
|
1944
|
-
const source = _optionalChain([l, 'access',
|
|
1945
|
-
if (_optionalChain([source, 'optionalAccess',
|
|
1983
|
+
const source = _optionalChain([l, 'access', _46 => _46.mask, 'optionalAccess', _47 => _47.source]);
|
|
1984
|
+
if (_optionalChain([source, 'optionalAccess', _48 => _48.enabled]) && source.maskSource) {
|
|
1946
1985
|
const key2 = `${source.maskSource}|${width}x${height}`;
|
|
1947
1986
|
if (this.depthMaps.has(key2)) continue;
|
|
1948
1987
|
try {
|
|
1949
1988
|
const maskImg = await this.imageCache.get(source.maskSource);
|
|
1950
1989
|
const canvas = this.createCanvas(width, height);
|
|
1951
1990
|
const mctx = canvas.getContext("2d");
|
|
1952
|
-
const data = mctx ? (mctx.drawImage(maskImg, 0, 0, width, height), _optionalChain([mctx, 'access',
|
|
1991
|
+
const data = mctx ? (mctx.drawImage(maskImg, 0, 0, width, height), _optionalChain([mctx, 'access', _49 => _49.getImageData, 'optionalCall', _50 => _50(0, 0, width, height)])) : null;
|
|
1953
1992
|
if (data) {
|
|
1954
1993
|
this.depthMaps.set(key2, { width, height, data: data.data });
|
|
1955
1994
|
this.assetVersion++;
|
|
@@ -2003,7 +2042,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2003
2042
|
if (x1 <= x0 || y1 <= y0) return;
|
|
2004
2043
|
const img = ctx.createImageData(_chunk474IQG74cjs.TILE, _chunk474IQG74cjs.TILE);
|
|
2005
2044
|
img.data.set(data);
|
|
2006
|
-
_optionalChain([this, 'access',
|
|
2045
|
+
_optionalChain([this, 'access', _51 => _51.display, 'optionalCall', _52 => _52(img.data)]);
|
|
2007
2046
|
ctx.putImageData(img, ox, oy, x0, y0, x1 - x0, y1 - y0);
|
|
2008
2047
|
}
|
|
2009
2048
|
/**
|
|
@@ -2070,7 +2109,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2070
2109
|
const opacity = _nullishCoalesce(state.outputOpacity, () => ( 1));
|
|
2071
2110
|
const blur = _nullishCoalesce(state.legacyOutputBlur, () => ( 0));
|
|
2072
2111
|
if (!(opacity < 1) && !(blur > 0)) return null;
|
|
2073
|
-
const data = _optionalChain([ctx, 'access',
|
|
2112
|
+
const data = _optionalChain([ctx, 'access', _53 => _53.getImageData, 'optionalCall', _54 => _54(0, 0, w, h)]);
|
|
2074
2113
|
if (!data) return null;
|
|
2075
2114
|
applyOutputStage(data, opacity, blur);
|
|
2076
2115
|
ctx.putImageData(data, 0, 0);
|
|
@@ -2079,7 +2118,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2079
2118
|
publishHistogram(histogram) {
|
|
2080
2119
|
if (histogram === this.previewHistogram) return;
|
|
2081
2120
|
this.previewHistogram = histogram;
|
|
2082
|
-
_optionalChain([this, 'access',
|
|
2121
|
+
_optionalChain([this, 'access', _55 => _55.onPreviewHistogram, 'optionalCall', _56 => _56(histogram)]);
|
|
2083
2122
|
}
|
|
2084
2123
|
__init21() {this.quickMaskCache = /* @__PURE__ */ new WeakMap()}
|
|
2085
2124
|
__init22() {this.diffCache = /* @__PURE__ */ new WeakMap()}
|
|
@@ -2100,7 +2139,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2100
2139
|
if (!layer.mask || layer.mask.source || width < 1 || height < 1) return null;
|
|
2101
2140
|
const key2 = `${width}x${height}:${layer.type === "pixel" ? `${layer.offset.x},${layer.offset.y}` : ""}`;
|
|
2102
2141
|
const cached = this.maskViewCache.get(layer.mask.surface);
|
|
2103
|
-
if (_optionalChain([cached, 'optionalAccess',
|
|
2142
|
+
if (_optionalChain([cached, 'optionalAccess', _57 => _57.key]) === key2) return cached.mask;
|
|
2104
2143
|
const mask = _chunkS55JFWDAcjs.layerMaskSelection.call(void 0, layer, width, height);
|
|
2105
2144
|
if (mask) this.maskViewCache.set(layer.mask.surface, { key: key2, mask });
|
|
2106
2145
|
return mask;
|
|
@@ -2121,7 +2160,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2121
2160
|
}
|
|
2122
2161
|
/** A channel's tint (colour, opacity, masked or selected area), drawn in natural image space. */
|
|
2123
2162
|
drawMaskOverlay(ctx, mask, style) {
|
|
2124
|
-
const key2 = `${_optionalChain([style, 'access',
|
|
2163
|
+
const key2 = `${_optionalChain([style, 'access', _58 => _58.color, 'optionalAccess', _59 => _59.join, 'call', _60 => _60(",")])}|${style.opacity}|${style.indicates}`;
|
|
2125
2164
|
let cached = this.overlayCache.get(mask);
|
|
2126
2165
|
if (!cached || cached.key !== key2) {
|
|
2127
2166
|
const canvas = this.createCanvas(mask.width, mask.height);
|
|
@@ -2167,17 +2206,17 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2167
2206
|
* screen pixels per natural pixel (the projection scale times the host's CSS scale).
|
|
2168
2207
|
*/
|
|
2169
2208
|
drawAnts(ctx, selection, scale, offset) {
|
|
2170
|
-
let
|
|
2171
|
-
if (!
|
|
2172
|
-
|
|
2173
|
-
this.outlineCache.set(selection,
|
|
2209
|
+
let paths = this.outlineCache.get(selection);
|
|
2210
|
+
if (!paths) {
|
|
2211
|
+
paths = selectionOutlinePaths(selection);
|
|
2212
|
+
this.outlineCache.set(selection, paths);
|
|
2174
2213
|
}
|
|
2175
|
-
if (!
|
|
2214
|
+
if (!paths.length) return;
|
|
2176
2215
|
const px2 = 1 / (scale || 1);
|
|
2177
2216
|
ctx.beginPath();
|
|
2178
|
-
for (
|
|
2179
|
-
ctx.moveTo(
|
|
2180
|
-
ctx.lineTo(
|
|
2217
|
+
for (const p of paths) {
|
|
2218
|
+
ctx.moveTo(p[0], p[1]);
|
|
2219
|
+
for (let i = 2; i < p.length; i += 2) ctx.lineTo(p[i], p[i + 1]);
|
|
2181
2220
|
}
|
|
2182
2221
|
ctx.lineWidth = px2;
|
|
2183
2222
|
ctx.strokeStyle = "#ffffff";
|
|
@@ -2552,8 +2591,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2552
2591
|
if (!ctx) return maskCanvas;
|
|
2553
2592
|
ctx.fillStyle = MASK_BLACK;
|
|
2554
2593
|
ctx.fillRect(0, 0, naturalWidth, naturalHeight);
|
|
2555
|
-
const useCrop = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2556
|
-
const useAnnotations = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2594
|
+
const useCrop = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _61 => _61.useCrop]), () => ( true));
|
|
2595
|
+
const useAnnotations = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _62 => _62.useAnnotations]), () => ( true));
|
|
2557
2596
|
if (useCrop && state.crop) {
|
|
2558
2597
|
ctx.fillStyle = MASK_WHITE;
|
|
2559
2598
|
ctx.fillRect(state.crop.x, state.crop.y, state.crop.width, state.crop.height);
|
|
@@ -2563,8 +2602,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2563
2602
|
this.drawAnnotationMask(ctx, ann);
|
|
2564
2603
|
}
|
|
2565
2604
|
}
|
|
2566
|
-
const imageData = _optionalChain([ctx, 'access',
|
|
2567
|
-
const selection = (_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2605
|
+
const imageData = _optionalChain([ctx, 'access', _63 => _63.getImageData, 'optionalCall', _64 => _64(0, 0, naturalWidth, naturalHeight)]);
|
|
2606
|
+
const selection = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _65 => _65.useSelection]), () => ( true))) && _optionalChain([state, 'access', _66 => _66.selection, 'optionalAccess', _67 => _67.bounds]) && state.selection.width === naturalWidth && state.selection.height === naturalHeight ? state.selection : null;
|
|
2568
2607
|
if (imageData) {
|
|
2569
2608
|
const d = imageData.data;
|
|
2570
2609
|
for (let i = 0; i < d.length; i += 4) {
|
|
@@ -3648,15 +3687,15 @@ function readPaths(stored, problems = []) {
|
|
|
3648
3687
|
let work = false;
|
|
3649
3688
|
for (const [i, raw] of stored.entries()) {
|
|
3650
3689
|
const r = raw;
|
|
3651
|
-
const name = typeof _optionalChain([r, 'optionalAccess',
|
|
3690
|
+
const name = typeof _optionalChain([r, 'optionalAccess', _68 => _68.name]) === "string" && r.name.trim() ? r.name.trim() : `Path ${i + 1}`;
|
|
3652
3691
|
try {
|
|
3653
|
-
const components = _chunkS55JFWDAcjs.readShapeComponents.call(void 0, _optionalChain([r, 'optionalAccess',
|
|
3654
|
-
let id = typeof _optionalChain([r, 'optionalAccess',
|
|
3692
|
+
const components = _chunkS55JFWDAcjs.readShapeComponents.call(void 0, _optionalChain([r, 'optionalAccess', _69 => _69.components]));
|
|
3693
|
+
let id = typeof _optionalChain([r, 'optionalAccess', _70 => _70.id]) === "string" && r.id ? r.id : newPathId();
|
|
3655
3694
|
if (ids.has(id)) id = newPathId();
|
|
3656
3695
|
ids.add(id);
|
|
3657
3696
|
const path = { id, name, components };
|
|
3658
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
3659
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
3697
|
+
if (_optionalChain([r, 'optionalAccess', _71 => _71.fillRule]) === "evenodd") path.fillRule = "evenodd";
|
|
3698
|
+
if (_optionalChain([r, 'optionalAccess', _72 => _72.work]) === true && !work) {
|
|
3660
3699
|
path.work = true;
|
|
3661
3700
|
work = true;
|
|
3662
3701
|
}
|
|
@@ -3780,11 +3819,11 @@ function applyShapeOptions(controller, layerId, change) {
|
|
|
3780
3819
|
const style = {};
|
|
3781
3820
|
if ("fill" in change) style.fill = _nullishCoalesce(change.fill, () => ( null));
|
|
3782
3821
|
if ("stroke" in change || "strokeWidth" in change) {
|
|
3783
|
-
const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access',
|
|
3784
|
-
style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access',
|
|
3822
|
+
const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access', _73 => _73.stroke, 'optionalAccess', _74 => _74.paint, 'access', _75 => _75.type]) === "color" ? info.stroke.paint.color : null;
|
|
3823
|
+
style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access', _76 => _76.stroke, 'optionalAccess', _77 => _77.width]))), () => ( 2)), paint: color } : null;
|
|
3785
3824
|
}
|
|
3786
3825
|
if (Object.keys(style).length) controller.setShapeStyle(layerId, style);
|
|
3787
|
-
const live = _optionalChain([info, 'access',
|
|
3826
|
+
const live = _optionalChain([info, 'access', _78 => _78.components, 'access', _79 => _79[0], 'optionalAccess', _80 => _80.live]);
|
|
3788
3827
|
if (!live) return;
|
|
3789
3828
|
const shape = {};
|
|
3790
3829
|
if (live.kind === "rect" && change.radius !== void 0) shape.radius = change.radius;
|
|
@@ -3810,7 +3849,7 @@ var TextEditSession = (_class7 = class {
|
|
|
3810
3849
|
__init39() {this.listeners = /* @__PURE__ */ new Set()}
|
|
3811
3850
|
__init40() {this.error = null}
|
|
3812
3851
|
get layer() {
|
|
3813
|
-
const l = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess',
|
|
3852
|
+
const l = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _81 => _81.layer]);
|
|
3814
3853
|
if (!l || l.type !== "type") throw new Error("The type layer being edited is gone.");
|
|
3815
3854
|
return l;
|
|
3816
3855
|
}
|
|
@@ -3825,7 +3864,7 @@ var TextEditSession = (_class7 = class {
|
|
|
3825
3864
|
}
|
|
3826
3865
|
/** Whether the layer still exists (it can be deleted or undone away while editing). */
|
|
3827
3866
|
get alive() {
|
|
3828
|
-
return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess',
|
|
3867
|
+
return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _82 => _82.layer, 'access', _83 => _83.type]) === "type";
|
|
3829
3868
|
}
|
|
3830
3869
|
subscribe(fn) {
|
|
3831
3870
|
this.listeners.add(fn);
|
|
@@ -4113,7 +4152,7 @@ var TypeToolGesture = (_class8 = class {
|
|
|
4113
4152
|
finish() {
|
|
4114
4153
|
const s = this.session;
|
|
4115
4154
|
this.session = null;
|
|
4116
|
-
_optionalChain([s, 'optionalAccess',
|
|
4155
|
+
_optionalChain([s, 'optionalAccess', _84 => _84.close, 'call', _85 => _85()]);
|
|
4117
4156
|
}
|
|
4118
4157
|
}, _class8);
|
|
4119
4158
|
|
|
@@ -4465,7 +4504,7 @@ function segmentToSelection(width, height, result) {
|
|
|
4465
4504
|
const sized = raw.width === width && raw.height === height ? raw : _chunkSS53NNZOcjs.resizeSelection.call(void 0, raw, width, height);
|
|
4466
4505
|
out = _chunkSS53NNZOcjs.combineSelections.call(void 0, out, sized, "add");
|
|
4467
4506
|
}
|
|
4468
|
-
return _optionalChain([out, 'optionalAccess',
|
|
4507
|
+
return _optionalChain([out, 'optionalAccess', _86 => _86.bounds]) ? out : null;
|
|
4469
4508
|
}
|
|
4470
4509
|
function segmentsToSelection(width, height, results) {
|
|
4471
4510
|
let out = null;
|
|
@@ -4514,7 +4553,7 @@ function deserializeChannels(value, size, problems = []) {
|
|
|
4514
4553
|
visible: v.visible === true
|
|
4515
4554
|
});
|
|
4516
4555
|
} catch (err) {
|
|
4517
|
-
problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess',
|
|
4556
|
+
problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess', _87 => _87.name]), () => ( "?")))}" could not be read: ${err instanceof Error ? err.message : String(err)}.`);
|
|
4518
4557
|
}
|
|
4519
4558
|
}
|
|
4520
4559
|
return out;
|
|
@@ -4552,16 +4591,16 @@ function checkEffectTime(time) {
|
|
|
4552
4591
|
return time;
|
|
4553
4592
|
}
|
|
4554
4593
|
function checkEffectAnimation(animate) {
|
|
4555
|
-
const duration = _optionalChain([animate, 'optionalAccess',
|
|
4594
|
+
const duration = _optionalChain([animate, 'optionalAccess', _88 => _88.duration]);
|
|
4556
4595
|
if (!(typeof duration === "number" && Number.isFinite(duration) && duration > 0 && duration <= _chunkS55JFWDAcjs.MAX_EFFECT_ANIMATION_MS)) {
|
|
4557
4596
|
throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`animate.duration must be more than 0 and at most ${_chunkS55JFWDAcjs.MAX_EFFECT_ANIMATION_MS} ms.`);
|
|
4558
4597
|
}
|
|
4559
4598
|
return { duration: Math.round(duration) };
|
|
4560
4599
|
}
|
|
4561
4600
|
function effectLayerTiming(g, d) {
|
|
4562
|
-
if (!_optionalChain([d, 'optionalAccess',
|
|
4601
|
+
if (!_optionalChain([d, 'optionalAccess', _89 => _89.duration])) return null;
|
|
4563
4602
|
const time = _nullishCoalesce(g.time, () => ( 0));
|
|
4564
|
-
return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access',
|
|
4603
|
+
return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access', _90 => _90.animate, 'optionalAccess', _91 => _91.duration]), () => ( d.duration)), loops: d.loop };
|
|
4565
4604
|
}
|
|
4566
4605
|
|
|
4567
4606
|
// src/image-editor/effects.ts
|
|
@@ -4814,14 +4853,14 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4814
4853
|
if (init.interpolation !== void 0 && !_chunkB46UQUDCcjs.isInterpolation.call(void 0, init.interpolation)) fail(`Unknown interpolation "${String(init.interpolation)}"; use nearest, bilinear or bicubic.`);
|
|
4815
4854
|
this.interp = _nullishCoalesce(init.interpolation, () => ( "bicubic"));
|
|
4816
4855
|
const sel = host.selection();
|
|
4817
|
-
const selected = Boolean(_optionalChain([sel, 'optionalAccess',
|
|
4856
|
+
const selected = Boolean(_optionalChain([sel, 'optionalAccess', _92 => _92.bounds]));
|
|
4818
4857
|
let content = _nullishCoalesce(init.content, () => ( "auto"));
|
|
4819
4858
|
if (!["auto", "layer", "selection", "selection-copy", "selection-outline"].includes(content)) {
|
|
4820
4859
|
fail(`Unknown content "${String(content)}"; use auto, layer, selection, selection-copy or selection-outline.`);
|
|
4821
4860
|
}
|
|
4822
4861
|
const targetId = _nullishCoalesce(init.layerId, () => ( host.activeLayerId()));
|
|
4823
|
-
const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess',
|
|
4824
|
-
const smartTarget = (_optionalChain([target, 'optionalAccess',
|
|
4862
|
+
const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess', _93 => _93.layer]) : void 0;
|
|
4863
|
+
const smartTarget = (_optionalChain([target, 'optionalAccess', _94 => _94.type]) === "smart" || _optionalChain([target, 'optionalAccess', _95 => _95.type]) === "shape" || _optionalChain([target, 'optionalAccess', _96 => _96.type]) === "type") && (_nullishCoalesce(init.channel, () => ( (target.id === host.activeLayerId() ? host.activeTarget() : "pixels")))) !== "mask";
|
|
4825
4864
|
if (content === "auto") content = selected && !smartTarget ? "selection" : "layer";
|
|
4826
4865
|
this.content = content;
|
|
4827
4866
|
if (content !== "layer" && !selected) fail(`Nothing is selected; ${content} needs a selection. Select first, or use content layer.`);
|
|
@@ -4845,9 +4884,9 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4845
4884
|
const mask = layer.mask && !layer.mask.source ? layer.mask : void 0;
|
|
4846
4885
|
const channel = _nullishCoalesce(init.channel, () => ( (layer.id === host.activeLayerId() ? host.activeTarget() : "pixels")));
|
|
4847
4886
|
if (channel !== "pixels" && channel !== "mask") fail(`Unknown channel "${String(channel)}"; use pixels or mask.`);
|
|
4848
|
-
const linked = _optionalChain([mask, 'optionalAccess',
|
|
4887
|
+
const linked = _optionalChain([mask, 'optionalAccess', _97 => _97.linked]) !== false;
|
|
4849
4888
|
const maskAlone = channel === "mask" && (!linked || layer.type !== "pixel");
|
|
4850
|
-
if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access',
|
|
4889
|
+
if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access', _98 => _98.mask, 'optionalAccess', _99 => _99.source]) ? `Layer "${layer.name || id}" has a depth mask, which is generated, not transformed.` : `Layer "${layer.name || id}" has no mask to transform; add one with add_layer_mask, or transform its pixels.`);
|
|
4851
4890
|
if (!maskAlone && layer.type !== "pixel" && layer.type !== "smart" && layer.type !== "shape" && layer.type !== "type") fail(`Layer "${layer.name || id}" is a ${layer.type} layer; Free Transform works on pixel, shape, type and smart object layers, layer masks (channel mask) and selections.`);
|
|
4852
4891
|
if (!layer.visible && content !== "selection-copy") fail(`Layer "${layer.name || id}" is hidden; show it before you transform it.`);
|
|
4853
4892
|
if (content !== "selection-copy") {
|
|
@@ -4950,7 +4989,7 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4950
4989
|
};
|
|
4951
4990
|
this.copyId = copy.id;
|
|
4952
4991
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, layer.id);
|
|
4953
|
-
this.startLayers = _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
4992
|
+
this.startLayers = _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _100 => _100.parent, 'optionalAccess', _101 => _101.id]), () => ( null)), loc.index + 1);
|
|
4954
4993
|
this.parts.push({ what: "pixels", offset: o, moving: lifted, base: null, reduced: /* @__PURE__ */ new Map() });
|
|
4955
4994
|
moves.push("pixels");
|
|
4956
4995
|
}
|
|
@@ -5059,7 +5098,7 @@ var FreeTransformSession = (_class10 = class {
|
|
|
5059
5098
|
moveVectorMask(layers) {
|
|
5060
5099
|
const g = this.geometryValue;
|
|
5061
5100
|
if (!this.layerId || this.copyId || !this.moves.includes("pixels") || _chunkS55JFWDAcjs.isIdentityTransform.call(void 0, g)) return layers;
|
|
5062
|
-
const vm = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess',
|
|
5101
|
+
const vm = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess', _102 => _102.layer, 'access', _103 => _103.vectorMask]);
|
|
5063
5102
|
if (!vm || vm.linked === false) return layers;
|
|
5064
5103
|
const warp = _chunkS55JFWDAcjs.hasWarp.call(void 0, g);
|
|
5065
5104
|
const f = warp ? _chunkS55JFWDAcjs.transformMap.call(void 0, g) : null;
|
|
@@ -5230,11 +5269,11 @@ var FreeTransformSession = (_class10 = class {
|
|
|
5230
5269
|
result(changed, layers, selection) {
|
|
5231
5270
|
let bounds = null;
|
|
5232
5271
|
const id = _nullishCoalesce(this.copyId, () => ( this.layerId));
|
|
5233
|
-
const layer = id ? _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, layers, id), 'optionalAccess',
|
|
5234
|
-
if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess',
|
|
5235
|
-
else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess',
|
|
5236
|
-
else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess',
|
|
5237
|
-
else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess',
|
|
5272
|
+
const layer = id ? _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _104 => _104.layer]) : void 0;
|
|
5273
|
+
if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess', _105 => _105.type]) === "pixel") bounds = toDoc(_chunk474IQG74cjs.contentBounds.call(void 0, this.host.pixelsOf(layer)), layer.offset);
|
|
5274
|
+
else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess', _106 => _106.type]) === "smart" || _optionalChain([layer, 'optionalAccess', _107 => _107.type]) === "shape" || _optionalChain([layer, 'optionalAccess', _108 => _108.type]) === "type")) bounds = _chunk474IQG74cjs.contentBounds.call(void 0, layer.surface);
|
|
5275
|
+
else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess', _109 => _109.mask])) bounds = toDoc(_chunk474IQG74cjs.contentBounds.call(void 0, layer.mask.surface), layer.type === "pixel" ? layer.offset : { x: 0, y: 0 });
|
|
5276
|
+
else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess', _110 => _110.bounds]) ? { ...selection.bounds } : null;
|
|
5238
5277
|
return {
|
|
5239
5278
|
layerId: _nullishCoalesce(this.copyId, () => ( this.layerId)),
|
|
5240
5279
|
content: this.content,
|
|
@@ -5263,7 +5302,7 @@ function deserializeColorMode(raw, problems) {
|
|
|
5263
5302
|
}
|
|
5264
5303
|
function effectiveProof(proof, mode) {
|
|
5265
5304
|
if (proof) return proof;
|
|
5266
|
-
if (_optionalChain([mode, 'optionalAccess',
|
|
5305
|
+
if (_optionalChain([mode, 'optionalAccess', _111 => _111.mode]) === "cmyk") return { ...DEFAULT_PROOF, profile: mode.profile, intent: mode.intent };
|
|
5267
5306
|
return null;
|
|
5268
5307
|
}
|
|
5269
5308
|
function colorModePlanes(doc, mode) {
|
|
@@ -5318,7 +5357,7 @@ function resolveProfile(doc) {
|
|
|
5318
5357
|
return p;
|
|
5319
5358
|
}
|
|
5320
5359
|
function profileBytes(doc) {
|
|
5321
|
-
if (_optionalChain([doc, 'optionalAccess',
|
|
5360
|
+
if (_optionalChain([doc, 'optionalAccess', _112 => _112.icc])) return doc.icc;
|
|
5322
5361
|
const p = resolveProfile(doc);
|
|
5323
5362
|
return _nullishCoalesce(p.bytes, () => ( _chunkBROJYMWUcjs.encodeProfile.call(void 0, p)));
|
|
5324
5363
|
}
|
|
@@ -5480,7 +5519,7 @@ function paintCoverageInto(base, coverage, apply, rects, depth = null) {
|
|
|
5480
5519
|
else tiles.delete(key2);
|
|
5481
5520
|
continue;
|
|
5482
5521
|
}
|
|
5483
|
-
const src = _nullishCoalesce(_optionalChain([base, 'access',
|
|
5522
|
+
const src = _nullishCoalesce(_optionalChain([base, 'access', _113 => _113.tiles, 'access', _114 => _114.get, 'call', _115 => _115(key2), 'optionalAccess', _116 => _116.data]), () => ( defaultTile(base)));
|
|
5484
5523
|
const data = _chunkPQ3H2AANcjs.applyStrokeToTile.call(void 0, coverage, src, base.channels, t.tx, t.ty, apply);
|
|
5485
5524
|
const tile = _chunk474IQG74cjs.finishTile.call(void 0, data, base.channels, base.defaultValue);
|
|
5486
5525
|
if (tile) tiles.set(key2, tile);
|
|
@@ -5593,7 +5632,7 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5593
5632
|
writeTile: (tx, ty) => {
|
|
5594
5633
|
const key2 = _chunk474IQG74cjs.tileKey.call(void 0, tx, ty);
|
|
5595
5634
|
if (!this.touched.has(key2)) {
|
|
5596
|
-
this.work.set(key2, _nullishCoalesce(_optionalChain([read, 'call',
|
|
5635
|
+
this.work.set(key2, _nullishCoalesce(_optionalChain([read, 'call', _117 => _117(key2), 'optionalAccess', _118 => _118.slice, 'call', _119 => _119()]), () => ( new Float32Array(_chunk474IQG74cjs.TILE * _chunk474IQG74cjs.TILE * 4))));
|
|
5597
5636
|
this.touched.add(key2);
|
|
5598
5637
|
}
|
|
5599
5638
|
this.fresh.add(key2);
|
|
@@ -5605,11 +5644,11 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5605
5644
|
offset: a.offset,
|
|
5606
5645
|
lockTransparency: a.lockTransparency,
|
|
5607
5646
|
selection: a.selection,
|
|
5608
|
-
readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
5647
|
+
readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access', _120 => _120.live, 'access', _121 => _121.get, 'call', _122 => _122(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _123 => _123.data]), () => ( (this.base.defaultValue ? defaultTile(this.base) : null))),
|
|
5609
5648
|
writeTile: (tx, ty) => {
|
|
5610
5649
|
const key2 = _chunk474IQG74cjs.tileKey.call(void 0, tx, ty);
|
|
5611
5650
|
if (!this.touched.has(key2)) {
|
|
5612
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
5651
|
+
const src = _nullishCoalesce(_optionalChain([this, 'access', _124 => _124.base, 'access', _125 => _125.tiles, 'access', _126 => _126.get, 'call', _127 => _127(key2), 'optionalAccess', _128 => _128.data]), () => ( defaultTile(this.base)));
|
|
5613
5652
|
this.live.set(key2, { data: new Uint8ClampedArray(src), uniform: null });
|
|
5614
5653
|
this.touched.add(key2);
|
|
5615
5654
|
}
|
|
@@ -5626,11 +5665,11 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5626
5665
|
if (this.closed || !points.length) return;
|
|
5627
5666
|
if (!this.started) {
|
|
5628
5667
|
this.started = true;
|
|
5629
|
-
if (_optionalChain([this, 'access',
|
|
5668
|
+
if (_optionalChain([this, 'access', _129 => _129.retouch, 'optionalAccess', _130 => _130.kind]) === "coverage") this.retouch.start(points[0]);
|
|
5630
5669
|
}
|
|
5631
5670
|
this.last = points[points.length - 1];
|
|
5632
5671
|
const rects = this.mixer ? this.mixer.push(points) : this.stroke.push(points);
|
|
5633
|
-
_optionalChain([this, 'access',
|
|
5672
|
+
_optionalChain([this, 'access', _131 => _131.flushView, 'optionalCall', _132 => _132()]);
|
|
5634
5673
|
this.update(rects);
|
|
5635
5674
|
}
|
|
5636
5675
|
update(rects) {
|
|
@@ -5660,7 +5699,7 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5660
5699
|
for (const [key2, { tx, ty, r }] of regions2) {
|
|
5661
5700
|
if (this.deep) {
|
|
5662
5701
|
const rt = this.retouch;
|
|
5663
|
-
const paint = _optionalChain([rt, 'optionalAccess',
|
|
5702
|
+
const paint = _optionalChain([rt, 'optionalAccess', _133 => _133.kind]) === "coverage" ? rt.paint() : null;
|
|
5664
5703
|
if (paint && paint.kind !== "tone") {
|
|
5665
5704
|
const prevWork = this.touched.has(key2) ? this.work.get(key2) : void 0;
|
|
5666
5705
|
this.touched.add(key2);
|
|
@@ -5671,13 +5710,13 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5671
5710
|
const prev2 = this.touched.has(key2) ? this.liveDeep.get(key2) : void 0;
|
|
5672
5711
|
this.touched.add(key2);
|
|
5673
5712
|
const opts = prev2 ? { into: prev2, region: r, channels: ch } : { channels: ch };
|
|
5674
|
-
const d = _optionalChain([rt, 'optionalAccess',
|
|
5713
|
+
const d = _optionalChain([rt, 'optionalAccess', _134 => _134.kind]) === "coverage" && _optionalChain([paint, 'optionalAccess', _135 => _135.kind]) === "tone" ? _chunkYF3YZZ6Gcjs.applyToneToDeepTile.call(void 0, stroke.coverage, src2, tx, ty, paint.tone, rt.apply, opts) : _chunkPQ3H2AANcjs.applyStrokeToDeepTile.call(void 0, stroke.coverage, src2, tx, ty, this.apply, opts);
|
|
5675
5714
|
this.liveDeep.set(key2, d);
|
|
5676
5715
|
this.live.set(key2, { data: _chunkOLNIPTB3cjs.proxyOf.call(void 0, d, ch), uniform: null, deep: d });
|
|
5677
5716
|
continue;
|
|
5678
5717
|
}
|
|
5679
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
5680
|
-
const prev = this.touched.has(key2) ? _optionalChain([this, 'access',
|
|
5718
|
+
const src = _nullishCoalesce(_optionalChain([this, 'access', _136 => _136.base, 'access', _137 => _137.tiles, 'access', _138 => _138.get, 'call', _139 => _139(key2), 'optionalAccess', _140 => _140.data]), () => ( defaultTile(this.base)));
|
|
5719
|
+
const prev = this.touched.has(key2) ? _optionalChain([this, 'access', _141 => _141.live, 'access', _142 => _142.get, 'call', _143 => _143(key2), 'optionalAccess', _144 => _144.data]) : void 0;
|
|
5681
5720
|
this.touched.add(key2);
|
|
5682
5721
|
const data = this.compositeTile(src, tx, ty, prev ? { into: prev, region: r } : {});
|
|
5683
5722
|
this.live.set(key2, { data, uniform: null });
|
|
@@ -5689,12 +5728,12 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5689
5728
|
if (this.closed) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("This stroke has already ended.");
|
|
5690
5729
|
const last = _nullishCoalesce(this.last, () => ( void 0));
|
|
5691
5730
|
const rects = this.mixer ? this.mixer.finish(last) : this.stroke.finish(last);
|
|
5692
|
-
_optionalChain([this, 'access',
|
|
5731
|
+
_optionalChain([this, 'access', _145 => _145.flushView, 'optionalCall', _146 => _146()]);
|
|
5693
5732
|
this.update(rects);
|
|
5694
5733
|
this.closed = true;
|
|
5695
5734
|
const ch = this.base.channels;
|
|
5696
5735
|
const r = this.retouch;
|
|
5697
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
5736
|
+
if (_optionalChain([r, 'optionalAccess', _147 => _147.kind]) === "coverage" && r.finalPaint) {
|
|
5698
5737
|
const final = r.finalPaint(this.stroke.coverage);
|
|
5699
5738
|
if (final) {
|
|
5700
5739
|
for (const key2 of this.touched) {
|
|
@@ -5703,7 +5742,7 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5703
5742
|
this.retouchDeepTile(key2, tx, ty, final, {});
|
|
5704
5743
|
continue;
|
|
5705
5744
|
}
|
|
5706
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
5745
|
+
const src = _nullishCoalesce(_optionalChain([this, 'access', _148 => _148.base, 'access', _149 => _149.tiles, 'access', _150 => _150.get, 'call', _151 => _151(key2), 'optionalAccess', _152 => _152.data]), () => ( defaultTile(this.base)));
|
|
5707
5746
|
this.live.set(key2, { data: this.compositeTile(src, tx, ty, {}, final), uniform: null });
|
|
5708
5747
|
}
|
|
5709
5748
|
}
|
|
@@ -5725,7 +5764,7 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5725
5764
|
const b = this.mixer ? this.mixer.bounds : this.stroke.coverage.bounds;
|
|
5726
5765
|
const result = { layerId: this.target.id, channel: this.target.channel, bounds: changed ? b : null, dabs: (_nullishCoalesce(this.mixer, () => ( this.stroke))).dabCount };
|
|
5727
5766
|
if (mixerLoad) result.mixerLoad = mixerLoad;
|
|
5728
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
5767
|
+
if (_optionalChain([r, 'optionalAccess', _153 => _153.result])) Object.assign(result, r.result());
|
|
5729
5768
|
return result;
|
|
5730
5769
|
}
|
|
5731
5770
|
/** Abandons the stroke and restores the layer. */
|
|
@@ -5851,14 +5890,14 @@ function migrateSerializedImageEditorState(data) {
|
|
|
5851
5890
|
const legacy = data;
|
|
5852
5891
|
const adjustments = normalizeStoredAdjustments(legacy.adjustments);
|
|
5853
5892
|
return {
|
|
5854
|
-
version: _optionalChain([adjustments, 'access',
|
|
5893
|
+
version: _optionalChain([adjustments, 'access', _154 => _154.layers, 'optionalAccess', _155 => _155.length]) ? 2 : 1,
|
|
5855
5894
|
crop: legacy.crop ? { ...legacy.crop } : null,
|
|
5856
5895
|
transform: { ...DEFAULT_TRANSFORM, ...legacy.transform },
|
|
5857
5896
|
adjustments: serializeAdjustments(adjustments),
|
|
5858
5897
|
depthMask: {
|
|
5859
5898
|
...DEFAULT_DEPTH_MASK,
|
|
5860
5899
|
...legacy.depthMask,
|
|
5861
|
-
depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access',
|
|
5900
|
+
depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _156 => _156.depthMask, 'optionalAccess', _157 => _157.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
|
|
5862
5901
|
},
|
|
5863
5902
|
annotations: JSON.parse(JSON.stringify(_nullishCoalesce(legacy.annotations, () => ( [])))),
|
|
5864
5903
|
...legacy.selection ? { selection: { ...legacy.selection } } : {}
|
|
@@ -5938,7 +5977,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5938
5977
|
sourceIsOpaque: () => this.sourceIsOpaque(),
|
|
5939
5978
|
version: () => `${this.sourceVersion()}:${this.patternsVersion()}`,
|
|
5940
5979
|
globalLight: () => this.state.globalLight,
|
|
5941
|
-
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
5980
|
+
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _158 => _158.state, 'access', _159 => _159.patterns, 'optionalAccess', _160 => _160.find, 'call', _161 => _161((p) => p.id === id)]), () => ( null))
|
|
5942
5981
|
};
|
|
5943
5982
|
this.state = {
|
|
5944
5983
|
sourceUrl: typeof options.image === "string" ? options.image : null,
|
|
@@ -5971,13 +6010,13 @@ var ImageEditorController = (_class12 = class {
|
|
|
5971
6010
|
};
|
|
5972
6011
|
}
|
|
5973
6012
|
this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
|
|
5974
|
-
if (_optionalChain([options, 'access',
|
|
6013
|
+
if (_optionalChain([options, 'access', _162 => _162.initialState, 'optionalAccess', _163 => _163.selection])) {
|
|
5975
6014
|
try {
|
|
5976
6015
|
this.state.selection = normalizeSelection(_chunkSS53NNZOcjs.deserializeSelection.call(void 0, options.initialState.selection));
|
|
5977
6016
|
} catch (e23) {
|
|
5978
6017
|
}
|
|
5979
6018
|
}
|
|
5980
|
-
if (_optionalChain([options, 'access',
|
|
6019
|
+
if (_optionalChain([options, 'access', _164 => _164.initialState, 'optionalAccess', _165 => _165.channels])) {
|
|
5981
6020
|
const channels = deserializeChannels(options.initialState.channels, this.naturalSize, this.lastLoadProblems);
|
|
5982
6021
|
if (channels.length) this.state.channels = channels;
|
|
5983
6022
|
}
|
|
@@ -6002,6 +6041,10 @@ var ImageEditorController = (_class12 = class {
|
|
|
6002
6041
|
this.state.imageDimensions = source.dimensions;
|
|
6003
6042
|
if (!this.samplePixelsOverride) this.samplePixels = null;
|
|
6004
6043
|
if (prev.width !== source.dimensions.width || prev.height !== source.dimensions.height) {
|
|
6044
|
+
const c = this.state.crop;
|
|
6045
|
+
if (c && c.x === 0 && c.y === 0 && c.width === prev.width && c.height === prev.height) {
|
|
6046
|
+
this.state.crop = { x: 0, y: 0, width: source.dimensions.width, height: source.dimensions.height };
|
|
6047
|
+
}
|
|
6005
6048
|
this.state.layers = resizeLegacyMasks(this.state.layers, prev, source.dimensions);
|
|
6006
6049
|
}
|
|
6007
6050
|
this.dropMismatchedSelection();
|
|
@@ -6061,7 +6104,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6061
6104
|
this.syncViews();
|
|
6062
6105
|
this.syncDisplay();
|
|
6063
6106
|
const currentState = { ...this.state };
|
|
6064
|
-
_optionalChain([this, 'access',
|
|
6107
|
+
_optionalChain([this, 'access', _166 => _166.onStateChange, 'optionalCall', _167 => _167(currentState)]);
|
|
6065
6108
|
this.listeners.forEach((l) => l(currentState));
|
|
6066
6109
|
if (this.effects.provider) this.queueEffectRefresh("incomplete");
|
|
6067
6110
|
}
|
|
@@ -6090,7 +6133,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6090
6133
|
if (l.type === "group") {
|
|
6091
6134
|
const children = walk(l.children);
|
|
6092
6135
|
if (children !== l.children) next2 = { ...l, children };
|
|
6093
|
-
} else if (l.type === "smart" && _optionalChain([l, 'access',
|
|
6136
|
+
} else if (l.type === "smart" && _optionalChain([l, 'access', _168 => _168.smartFilters, 'optionalAccess', _169 => _169.filters, 'access', _170 => _170.some, 'call', _171 => _171((f) => f.kind === "effect")]) && (all || _chunkS55JFWDAcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
|
|
6094
6137
|
try {
|
|
6095
6138
|
const r = _chunkS55JFWDAcjs.rerender.call(void 0, l, canvas);
|
|
6096
6139
|
if (all || !_chunkS55JFWDAcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
|
|
@@ -6119,7 +6162,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6119
6162
|
* A worker that is cancelled or fails is replaced by a fresh one on the next job.
|
|
6120
6163
|
*/
|
|
6121
6164
|
setSelectionWorker(factory) {
|
|
6122
|
-
_optionalChain([this, 'access',
|
|
6165
|
+
_optionalChain([this, 'access', _172 => _172.selectionWorker, 'optionalAccess', _173 => _173.terminate, 'call', _174 => _174()]);
|
|
6123
6166
|
this.selectionWorker = factory ? new (0, _chunkUC3PWFM3cjs.SelectionWorkerClient)(factory) : null;
|
|
6124
6167
|
}
|
|
6125
6168
|
/** Sets (or with `null` removes) how new documents are opened (see `DocumentOpener`). Not an edit. */
|
|
@@ -6145,7 +6188,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6145
6188
|
const layer = _chunkS55JFWDAcjs.requireLayer.call(void 0, this.state.layers, id).layer;
|
|
6146
6189
|
if (layer.type !== "pixel") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`A new document needs a pixel layer; "${id}" is a ${layer.type} layer.`);
|
|
6147
6190
|
const sel = _nullishCoalesce(options.selection, () => ( this.state.selection));
|
|
6148
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
6191
|
+
if (!_optionalChain([sel, 'optionalAccess', _175 => _175.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select what goes in the new document first.");
|
|
6149
6192
|
const { width, height } = this.naturalSize;
|
|
6150
6193
|
const surface = this.surfaceOf(layer);
|
|
6151
6194
|
let copy;
|
|
@@ -6196,10 +6239,10 @@ var ImageEditorController = (_class12 = class {
|
|
|
6196
6239
|
* `onProgress` hears its stages. The document is not changed.
|
|
6197
6240
|
*/
|
|
6198
6241
|
async runSelectionJob(job, pixels, options = {}) {
|
|
6199
|
-
_optionalChain([options, 'access',
|
|
6242
|
+
_optionalChain([options, 'access', _176 => _176.signal, 'optionalAccess', _177 => _177.throwIfAborted, 'call', _178 => _178()]);
|
|
6200
6243
|
if (this.selectionWorker) return this.selectionWorker.run(job, pixels, options);
|
|
6201
6244
|
const result = _chunkUC3PWFM3cjs.runSelectionJob.call(void 0, job, pixels, options.onProgress);
|
|
6202
|
-
_optionalChain([options, 'access',
|
|
6245
|
+
_optionalChain([options, 'access', _179 => _179.signal, 'optionalAccess', _180 => _180.throwIfAborted, 'call', _181 => _181()]);
|
|
6203
6246
|
return result;
|
|
6204
6247
|
}
|
|
6205
6248
|
/** Registers (or with `null` removes) the segmentation provider. Not an edit: no undo step. */
|
|
@@ -6274,8 +6317,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
6274
6317
|
*/
|
|
6275
6318
|
async updateEffectFilter(layerId, filterId, changes, commitToHistory = true) {
|
|
6276
6319
|
const layer = _chunkS55JFWDAcjs.requireSmartObject.call(void 0, this.state.layers, layerId);
|
|
6277
|
-
const was = _optionalChain([layer, 'access',
|
|
6278
|
-
if (!was || was.kind !== "effect") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access',
|
|
6320
|
+
const was = _optionalChain([layer, 'access', _182 => _182.smartFilters, 'optionalAccess', _183 => _183.filters, 'access', _184 => _184.find, 'call', _185 => _185((f) => f.id === filterId)]);
|
|
6321
|
+
if (!was || was.kind !== "effect") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access', _186 => _186.smartFilters, 'optionalAccess', _187 => _187.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
|
|
6279
6322
|
const update = {};
|
|
6280
6323
|
if (changes.values) {
|
|
6281
6324
|
const d = await this.describeEffect(was.effect);
|
|
@@ -6317,7 +6360,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6317
6360
|
const layer = {
|
|
6318
6361
|
type: "pixel",
|
|
6319
6362
|
id,
|
|
6320
|
-
name: _optionalChain([options, 'access',
|
|
6363
|
+
name: _optionalChain([options, 'access', _188 => _188.name, 'optionalAccess', _189 => _189.trim, 'call', _190 => _190()]) || d.name,
|
|
6321
6364
|
visible: true,
|
|
6322
6365
|
opacity: _nullishCoalesce(options.opacity, () => ( 1)),
|
|
6323
6366
|
blend: _nullishCoalesce(blend, () => ( "normal")),
|
|
@@ -6342,7 +6385,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6342
6385
|
*/
|
|
6343
6386
|
async updateEffectLayer(layerId, changes, commitToHistory = true) {
|
|
6344
6387
|
const found = _chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, layerId);
|
|
6345
|
-
const layer = _optionalChain([found, 'optionalAccess',
|
|
6388
|
+
const layer = _optionalChain([found, 'optionalAccess', _191 => _191.layer]);
|
|
6346
6389
|
if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
|
|
6347
6390
|
_chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
|
|
6348
6391
|
const g = layer.generator;
|
|
@@ -6371,7 +6414,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6371
6414
|
* and how long it runs, the longest of theirs (ms). Null when none animates.
|
|
6372
6415
|
*/
|
|
6373
6416
|
getAnimation() {
|
|
6374
|
-
const layers = _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access',
|
|
6417
|
+
const layers = _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access', _192 => _192.generator, 'optionalAccess', _193 => _193.animate]));
|
|
6375
6418
|
if (!layers.length) return null;
|
|
6376
6419
|
return { duration: Math.max(...layers.map((l) => l.generator.animate.duration)), layerIds: layers.map((l) => l.id) };
|
|
6377
6420
|
}
|
|
@@ -6388,7 +6431,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6388
6431
|
const { width, height } = this.naturalSize;
|
|
6389
6432
|
const surfaces = /* @__PURE__ */ new Map();
|
|
6390
6433
|
for (const l of _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers)) {
|
|
6391
|
-
if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access',
|
|
6434
|
+
if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access', _194 => _194.generator, 'optionalAccess', _195 => _195.animate])) continue;
|
|
6392
6435
|
const g = l.generator;
|
|
6393
6436
|
const pixels = await this.effectsEngine.renderLayer(g.effect, g.values, { width, height, depth: this.bitDepth, time: (_nullishCoalesce(g.time, () => ( 0))) + time });
|
|
6394
6437
|
surfaces.set(l.id, effectPixelsToSurface(pixels, this.bitDepth));
|
|
@@ -6449,8 +6492,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
6449
6492
|
transform: { ...s.transform },
|
|
6450
6493
|
outputOpacity: s.outputOpacity,
|
|
6451
6494
|
selection: _nullishCoalesce(s.selection, () => ( null)),
|
|
6452
|
-
..._optionalChain([s, 'access',
|
|
6453
|
-
..._optionalChain([s, 'access',
|
|
6495
|
+
..._optionalChain([s, 'access', _196 => _196.channels, 'optionalAccess', _197 => _197.length]) ? { channels: s.channels } : {},
|
|
6496
|
+
..._optionalChain([s, 'access', _198 => _198.paths, 'optionalAccess', _199 => _199.length]) ? { paths: s.paths } : {},
|
|
6454
6497
|
source: {
|
|
6455
6498
|
sourceUrl: s.sourceUrl,
|
|
6456
6499
|
element: this.imageElement,
|
|
@@ -6486,11 +6529,11 @@ var ImageEditorController = (_class12 = class {
|
|
|
6486
6529
|
if (entry.colorMode) s.colorMode = entry.colorMode;
|
|
6487
6530
|
else delete s.colorMode;
|
|
6488
6531
|
s.selection = entry.selection;
|
|
6489
|
-
if (_optionalChain([entry, 'access',
|
|
6532
|
+
if (_optionalChain([entry, 'access', _200 => _200.channels, 'optionalAccess', _201 => _201.length])) s.channels = entry.channels;
|
|
6490
6533
|
else delete s.channels;
|
|
6491
|
-
if (_optionalChain([entry, 'access',
|
|
6534
|
+
if (_optionalChain([entry, 'access', _202 => _202.paths, 'optionalAccess', _203 => _203.length])) s.paths = entry.paths;
|
|
6492
6535
|
else delete s.paths;
|
|
6493
|
-
if (s.activePathId && !_optionalChain([s, 'access',
|
|
6536
|
+
if (s.activePathId && !_optionalChain([s, 'access', _204 => _204.paths, 'optionalAccess', _205 => _205.some, 'call', _206 => _206((p) => p.id === s.activePathId)])) s.activePathId = null;
|
|
6494
6537
|
if (this.imageElement !== entry.source.element && !this.samplePixelsOverride) this.samplePixels = null;
|
|
6495
6538
|
this.imageElement = entry.source.element;
|
|
6496
6539
|
s.sourceUrl = entry.source.sourceUrl;
|
|
@@ -6696,7 +6739,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6696
6739
|
return this.state.layers;
|
|
6697
6740
|
}
|
|
6698
6741
|
getLayer(id) {
|
|
6699
|
-
return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess',
|
|
6742
|
+
return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _207 => _207.layer]);
|
|
6700
6743
|
}
|
|
6701
6744
|
/** The active layer, or `undefined`. */
|
|
6702
6745
|
getActiveLayer() {
|
|
@@ -6709,7 +6752,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6709
6752
|
setActiveLayer(id, target = "pixels") {
|
|
6710
6753
|
if (id !== null && !this.getLayer(id)) return false;
|
|
6711
6754
|
const layer = id ? this.getLayer(id) : void 0;
|
|
6712
|
-
const t = target === "mask" && _optionalChain([layer, 'optionalAccess',
|
|
6755
|
+
const t = target === "mask" && _optionalChain([layer, 'optionalAccess', _208 => _208.mask]) ? "mask" : target === "filter-mask" && _optionalChain([layer, 'optionalAccess', _209 => _209.type]) === "smart" && _optionalChain([layer, 'access', _210 => _210.smartFilters, 'optionalAccess', _211 => _211.mask]) ? "filter-mask" : "pixels";
|
|
6713
6756
|
if (this.state.activeLayerId === id && this.state.activeTarget === t) return true;
|
|
6714
6757
|
this.state.activeLayerId = id;
|
|
6715
6758
|
this.state.activeTarget = t;
|
|
@@ -6871,7 +6914,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6871
6914
|
surfaceOf: (l) => this.surfaceOf(l),
|
|
6872
6915
|
version: `${this.sourceVersion()}:${this.patternsVersion()}`,
|
|
6873
6916
|
globalLight: this.state.globalLight,
|
|
6874
|
-
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
6917
|
+
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _212 => _212.state, 'access', _213 => _213.patterns, 'optionalAccess', _214 => _214.find, 'call', _215 => _215((p) => p.id === id)]), () => ( null))
|
|
6875
6918
|
};
|
|
6876
6919
|
}
|
|
6877
6920
|
__init94() {this.sourceIds = /* @__PURE__ */ new WeakMap()}
|
|
@@ -6948,7 +6991,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6948
6991
|
if (!ctx || typeof ctx.getImageData !== "function") return null;
|
|
6949
6992
|
ctx.drawImage(el, 0, 0, width, height);
|
|
6950
6993
|
const data = ctx.getImageData(0, 0, width, height);
|
|
6951
|
-
if (!_optionalChain([data, 'optionalAccess',
|
|
6994
|
+
if (!_optionalChain([data, 'optionalAccess', _216 => _216.data]) || data.data.length < width * height * 4) return null;
|
|
6952
6995
|
return { width, height, data: data.data };
|
|
6953
6996
|
} catch (e27) {
|
|
6954
6997
|
return null;
|
|
@@ -6961,7 +7004,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6961
7004
|
const prev = this.state.layers;
|
|
6962
7005
|
const depth = this.bitDepth;
|
|
6963
7006
|
this.state.layers = next;
|
|
6964
|
-
_optionalChain([extra, 'optionalCall',
|
|
7007
|
+
_optionalChain([extra, 'optionalCall', _217 => _217()]);
|
|
6965
7008
|
if (depth !== 8 && this.bitDepth === depth) this.state.layers = keepDeepLayers(prev, this.state.layers);
|
|
6966
7009
|
if (this.state.activeLayerId && !_chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, this.state.activeLayerId)) {
|
|
6967
7010
|
this.state.activeLayerId = _chunkS55JFWDAcjs.activeLayerAfterRemoval.call(void 0, prev, this.state.layers, this.state.activeLayerId);
|
|
@@ -6999,7 +7042,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6999
7042
|
const layer = {
|
|
7000
7043
|
type: "pixel",
|
|
7001
7044
|
id: init.id && !ids.has(init.id) ? init.id : _chunkS55JFWDAcjs.newLayerId.call(void 0, ),
|
|
7002
|
-
name: _optionalChain([init, 'access',
|
|
7045
|
+
name: _optionalChain([init, 'access', _218 => _218.name, 'optionalAccess', _219 => _219.trim, 'call', _220 => _220()]) || this.nextLayerName(),
|
|
7003
7046
|
visible: _nullishCoalesce(init.visible, () => ( true)),
|
|
7004
7047
|
opacity: _nullishCoalesce(init.opacity, () => ( 1)),
|
|
7005
7048
|
blend: _nullishCoalesce(blend, () => ( "normal")),
|
|
@@ -7026,7 +7069,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7026
7069
|
async decodeImage(image) {
|
|
7027
7070
|
const trimmed = image.trim();
|
|
7028
7071
|
let png = null;
|
|
7029
|
-
if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkOLNIPTB3cjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess',
|
|
7072
|
+
if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkOLNIPTB3cjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _221 => _221.bytes]), () => ( null));
|
|
7030
7073
|
else if (/^[A-Za-z0-9+/=\s]+$/.test(trimmed) && trimmed.length > 16) {
|
|
7031
7074
|
try {
|
|
7032
7075
|
const bytes = _chunkOLNIPTB3cjs.base64ToBytes.call(void 0, trimmed);
|
|
@@ -7075,7 +7118,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7075
7118
|
removeLayer(id) {
|
|
7076
7119
|
const next = _chunkS55JFWDAcjs.removeLayer.call(void 0, this.state.layers, id);
|
|
7077
7120
|
this.commitLayers(next, () => {
|
|
7078
|
-
if (this.state.selectedAnnotationId && !_chunkB46UQUDCcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkS55JFWDAcjs.annotationOfLayer.call(void 0, l), 'optionalAccess',
|
|
7121
|
+
if (this.state.selectedAnnotationId && !_chunkB46UQUDCcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkS55JFWDAcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _222 => _222.id]) === this.state.selectedAnnotationId)) {
|
|
7079
7122
|
this.state.selectedAnnotationId = null;
|
|
7080
7123
|
}
|
|
7081
7124
|
});
|
|
@@ -7084,9 +7127,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
7084
7127
|
moveLayer(id, placement) {
|
|
7085
7128
|
const next = _chunkS55JFWDAcjs.moveLayer.call(void 0, this.state.layers, id, placement);
|
|
7086
7129
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, next, id);
|
|
7087
|
-
if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
7130
|
+
if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _223 => _223.parent, 'optionalAccess', _224 => _224.id]), () => ( null)), index: loc.index };
|
|
7088
7131
|
this.commitLayers(next);
|
|
7089
|
-
return { parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
7132
|
+
return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _225 => _225.parent, 'optionalAccess', _226 => _226.id]), () => ( null)), index: loc.index };
|
|
7090
7133
|
}
|
|
7091
7134
|
/** A layer's edge colour as percentages (see `setEdgeColor`). */
|
|
7092
7135
|
getEdgeColor(id) {
|
|
@@ -7182,7 +7225,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7182
7225
|
const group = {
|
|
7183
7226
|
type: "group",
|
|
7184
7227
|
id: _chunkS55JFWDAcjs.newLayerId.call(void 0, "group"),
|
|
7185
|
-
name: _optionalChain([init, 'access',
|
|
7228
|
+
name: _optionalChain([init, 'access', _227 => _227.name, 'optionalAccess', _228 => _228.trim, 'call', _229 => _229()]) || "Group",
|
|
7186
7229
|
visible: true,
|
|
7187
7230
|
opacity: 1,
|
|
7188
7231
|
blend,
|
|
@@ -7275,7 +7318,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7275
7318
|
sel = this.layerTransparency(id);
|
|
7276
7319
|
} else {
|
|
7277
7320
|
const current = this.state.selection;
|
|
7278
|
-
if (!_optionalChain([current, 'optionalAccess',
|
|
7321
|
+
if (!_optionalChain([current, 'optionalAccess', _230 => _230.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all / transparency.");
|
|
7279
7322
|
sel = from === "hide-selection" ? _chunkSS53NNZOcjs.invertSelection.call(void 0, current) : current;
|
|
7280
7323
|
}
|
|
7281
7324
|
mask = this.maskFromSelection(sel, props);
|
|
@@ -7306,7 +7349,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7306
7349
|
const layer = _chunkS55JFWDAcjs.requireLayer.call(void 0, this.state.layers, id).layer;
|
|
7307
7350
|
const name = layer.name || id;
|
|
7308
7351
|
if (layer.type === "shape") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" is a shape layer, whose path already is its vector mask; change it with set_shape_component, or rasterize the layer first.`);
|
|
7309
|
-
if (_optionalChain([layer, 'access',
|
|
7352
|
+
if (_optionalChain([layer, 'access', _231 => _231.mask, 'optionalAccess', _232 => _232.source])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which cannot be combined with a vector mask; remove the depth mask first.`);
|
|
7310
7353
|
return layer;
|
|
7311
7354
|
}
|
|
7312
7355
|
requireVectorMask(id) {
|
|
@@ -7316,10 +7359,10 @@ var ImageEditorController = (_class12 = class {
|
|
|
7316
7359
|
}
|
|
7317
7360
|
/** Components from a path spec: `components`, or one `shape` / `subpaths`. */
|
|
7318
7361
|
vectorMaskComponents(path) {
|
|
7319
|
-
if (_optionalChain([path, 'access',
|
|
7362
|
+
if (_optionalChain([path, 'access', _233 => _233.components, 'optionalAccess', _234 => _234.length]) && (path.shape !== void 0 || path.subpaths !== void 0)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
|
|
7320
7363
|
if (path.fillRule !== void 0 && path.fillRule !== "nonzero" && path.fillRule !== "evenodd") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
|
|
7321
|
-
const specs = _optionalChain([path, 'access',
|
|
7322
|
-
return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access',
|
|
7364
|
+
const specs = _optionalChain([path, 'access', _235 => _235.components, 'optionalAccess', _236 => _236.length]) ? path.components : [path];
|
|
7365
|
+
return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access', _237 => _237.components, 'optionalAccess', _238 => _238.length]) ? `components[${i}].` : ""));
|
|
7323
7366
|
}
|
|
7324
7367
|
/**
|
|
7325
7368
|
* Layer › Vector Mask: `reveal-all` (an empty path showing everything), `hide-all` (an empty path
|
|
@@ -7336,7 +7379,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7336
7379
|
vm = { components: this.vectorMaskComponents(path) };
|
|
7337
7380
|
if (path.fillRule === "evenodd") vm.fillRule = "evenodd";
|
|
7338
7381
|
} else if (from === "reveal-all" || from === "hide-all") {
|
|
7339
|
-
if (_optionalChain([path, 'access',
|
|
7382
|
+
if (_optionalChain([path, 'access', _239 => _239.components, 'optionalAccess', _240 => _240.length]) || path.shape !== void 0 || path.subpaths !== void 0) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`A ${from} vector mask starts empty; use from path to give a path.`);
|
|
7340
7383
|
vm = { components: [], ...from === "reveal-all" ? { inverted: true } : {} };
|
|
7341
7384
|
} else {
|
|
7342
7385
|
throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Unknown vector mask source "${String(from)}". Use reveal-all, hide-all, path or selection.`);
|
|
@@ -7347,7 +7390,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7347
7390
|
/** The selection's outline as subpaths; throws when nothing is selected or nothing is left to trace. */
|
|
7348
7391
|
traceSelection(options) {
|
|
7349
7392
|
const sel = this.state.selection;
|
|
7350
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
7393
|
+
if (!_optionalChain([sel, 'optionalAccess', _241 => _241.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, then make a path from the selection.");
|
|
7351
7394
|
if (options.tolerance !== void 0 && !(options.tolerance >= 0.1 && options.tolerance <= 10)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("tolerance must be from 0.1 to 10 px.");
|
|
7352
7395
|
const subpaths = selectionToSubpaths(sel, options);
|
|
7353
7396
|
if (!subpaths.length) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("The selection is too small or too faint to trace (below minArea, or under half selected); lower minArea or threshold.");
|
|
@@ -7387,7 +7430,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7387
7430
|
return _nullishCoalesce(this.state.paths, () => ( []));
|
|
7388
7431
|
}
|
|
7389
7432
|
getPath(id) {
|
|
7390
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
7433
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _242 => _242.state, 'access', _243 => _243.paths, 'optionalAccess', _244 => _244.find, 'call', _245 => _245((p) => p.id === id)]), () => ( null));
|
|
7391
7434
|
}
|
|
7392
7435
|
requirePath(id) {
|
|
7393
7436
|
const path = this.getPath(id);
|
|
@@ -7420,14 +7463,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
7420
7463
|
const subpaths = this.traceSelection(options);
|
|
7421
7464
|
const paths = this.getPaths();
|
|
7422
7465
|
const old = paths.find((p) => p.work);
|
|
7423
|
-
const work = { id: _nullishCoalesce(_optionalChain([old, 'optionalAccess',
|
|
7466
|
+
const work = { id: _nullishCoalesce(_optionalChain([old, 'optionalAccess', _246 => _246.id]), () => ( newPathId())), name: WORK_PATH_NAME, components: [{ op: "combine", subpaths }], fillRule: "evenodd", work: true };
|
|
7424
7467
|
this.commitPaths(old ? paths.map((p) => p === old ? work : p) : [...paths, work], work.id);
|
|
7425
7468
|
return work;
|
|
7426
7469
|
}
|
|
7427
7470
|
/** A new saved path from geometry (`shape`, `subpaths` or `components`). One undo step. */
|
|
7428
7471
|
addPath(input) {
|
|
7429
7472
|
const paths = this.getPaths();
|
|
7430
|
-
const path = { id: newPathId(), name: _optionalChain([input, 'access',
|
|
7473
|
+
const path = { id: newPathId(), name: _optionalChain([input, 'access', _247 => _247.name, 'optionalAccess', _248 => _248.trim, 'call', _249 => _249()]) || `Path ${paths.filter((p) => !p.work).length + 1}`, components: this.vectorMaskComponents(input) };
|
|
7431
7474
|
if (input.fillRule === "evenodd") path.fillRule = "evenodd";
|
|
7432
7475
|
this.commitPaths([...paths.filter((p) => !p.work), path, ...paths.filter((p) => p.work)], path.id);
|
|
7433
7476
|
return path;
|
|
@@ -7491,7 +7534,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7491
7534
|
const paths = this.getPaths();
|
|
7492
7535
|
const old = paths.find((p) => p.work);
|
|
7493
7536
|
const work = {
|
|
7494
|
-
id: _nullishCoalesce(_optionalChain([old, 'optionalAccess',
|
|
7537
|
+
id: _nullishCoalesce(_optionalChain([old, 'optionalAccess', _250 => _250.id]), () => ( newPathId())),
|
|
7495
7538
|
name: WORK_PATH_NAME,
|
|
7496
7539
|
components: components.map((c, i) => this.componentFrom({ op: c.op, subpaths: c.subpaths }, `components[${i}].`)),
|
|
7497
7540
|
work: true
|
|
@@ -7512,7 +7555,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7512
7555
|
/** Duplicates a path as a saved path. One undo step. */
|
|
7513
7556
|
duplicatePath(id, name) {
|
|
7514
7557
|
const old = this.requirePath(id);
|
|
7515
|
-
const copy = { ...old, id: newPathId(), name: _optionalChain([name, 'optionalAccess',
|
|
7558
|
+
const copy = { ...old, id: newPathId(), name: _optionalChain([name, 'optionalAccess', _251 => _251.trim, 'call', _252 => _252()]) || `${old.name} copy`, components: JSON.parse(JSON.stringify(old.components)) };
|
|
7516
7559
|
delete copy.work;
|
|
7517
7560
|
const paths = this.getPaths();
|
|
7518
7561
|
this.commitPaths([...paths.filter((p) => !p.work), copy, ...paths.filter((p) => p.work)], copy.id);
|
|
@@ -7718,7 +7761,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7718
7761
|
const layer = loc.layer;
|
|
7719
7762
|
if (layer.type !== "pixel") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
|
|
7720
7763
|
const sel = this.state.selection;
|
|
7721
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
7764
|
+
if (!_optionalChain([sel, 'optionalAccess', _253 => _253.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
|
|
7722
7765
|
if (options.cut) _chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
|
|
7723
7766
|
const surface = this.surfaceOf(layer);
|
|
7724
7767
|
const sb = sel.bounds;
|
|
@@ -7736,14 +7779,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
7736
7779
|
const copy = {
|
|
7737
7780
|
type: "pixel",
|
|
7738
7781
|
id: _chunkS55JFWDAcjs.newLayerId.call(void 0, ),
|
|
7739
|
-
name: _optionalChain([options, 'access',
|
|
7782
|
+
name: _optionalChain([options, 'access', _254 => _254.name, 'optionalAccess', _255 => _255.trim, 'call', _256 => _256()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
|
|
7740
7783
|
visible: true,
|
|
7741
7784
|
opacity: 1,
|
|
7742
7785
|
blend: "normal",
|
|
7743
7786
|
surface: _chunk474IQG74cjs.surfaceFromPixels.call(void 0, { width: src.width, height: src.height, data: px2 }, 4, src.x, src.y),
|
|
7744
7787
|
offset: { ...layer.offset }
|
|
7745
7788
|
};
|
|
7746
|
-
let next = _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
7789
|
+
let next = _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _257 => _257.parent, 'optionalAccess', _258 => _258.id]), () => ( null)), loc.index + 1);
|
|
7747
7790
|
if (kept) {
|
|
7748
7791
|
const cutLayer = { ...layer, surface: _chunk474IQG74cjs.writeRegion.call(void 0, surface, src, kept) };
|
|
7749
7792
|
delete cutLayer.source;
|
|
@@ -7767,7 +7810,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7767
7810
|
layers: () => this.state.layers,
|
|
7768
7811
|
activeLayerId: () => this.state.activeLayerId,
|
|
7769
7812
|
activeTarget: () => this.state.activeTarget,
|
|
7770
|
-
selection: () => _optionalChain([this, 'access',
|
|
7813
|
+
selection: () => _optionalChain([this, 'access', _259 => _259.state, 'access', _260 => _260.selection, 'optionalAccess', _261 => _261.bounds]) ? this.state.selection : null,
|
|
7771
7814
|
canvas: () => this.naturalSize,
|
|
7772
7815
|
pixelsOf: (layer) => this.surfaceOf(layer),
|
|
7773
7816
|
shapeEnv: () => this.shapeEnv(),
|
|
@@ -7915,7 +7958,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7915
7958
|
* anything else nests as a layer document. Returns the smart object's id.
|
|
7916
7959
|
*/
|
|
7917
7960
|
convertToSmartObject(ids, options = {}) {
|
|
7918
|
-
const list = _optionalChain([ids, 'optionalAccess',
|
|
7961
|
+
const list = _optionalChain([ids, 'optionalAccess', _262 => _262.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
|
|
7919
7962
|
if (!list.length) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
|
|
7920
7963
|
const res = _chunkS55JFWDAcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
|
|
7921
7964
|
this.commitLayers(res.layers, () => {
|
|
@@ -7948,8 +7991,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
7948
7991
|
width: c.width,
|
|
7949
7992
|
height: c.height,
|
|
7950
7993
|
decoded: _chunkS55JFWDAcjs.isContentsDecoded.call(void 0, c),
|
|
7951
|
-
fileType: _nullishCoalesce(_optionalChain([c, 'access',
|
|
7952
|
-
linkedPath: _nullishCoalesce(_optionalChain([c, 'access',
|
|
7994
|
+
fileType: _nullishCoalesce(_optionalChain([c, 'access', _263 => _263.file, 'optionalAccess', _264 => _264.type]), () => ( null)),
|
|
7995
|
+
linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _265 => _265.linked, 'optionalAccess', _266 => _266.path]), () => ( null)),
|
|
7953
7996
|
instances: _chunkS55JFWDAcjs.instancesOf.call(void 0, this.state.layers, c.id),
|
|
7954
7997
|
layerCount: c.document ? _chunkB46UQUDCcjs.flattenLayers.call(void 0, c.document.layers).length : 0
|
|
7955
7998
|
},
|
|
@@ -7966,9 +8009,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
7966
8009
|
bounds: _chunkS55JFWDAcjs.transformedBox.call(void 0, g)
|
|
7967
8010
|
},
|
|
7968
8011
|
smartFilters: {
|
|
7969
|
-
enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess',
|
|
7970
|
-
filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess',
|
|
7971
|
-
mask: _optionalChain([stack, 'optionalAccess',
|
|
8012
|
+
enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _267 => _267.enabled]), () => ( true)),
|
|
8013
|
+
filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess', _268 => _268.filters]), () => ( []))).map((f) => f.kind === "psd" ? { id: f.id, kind: "psd", name: f.name, enabled: f.enabled, blend: f.blend, opacity: f.opacity } : { ...f }),
|
|
8014
|
+
mask: _optionalChain([stack, 'optionalAccess', _269 => _269.mask]) ? { enabled: stack.mask.enabled !== false, linked: stack.mask.linked !== false, density: _nullishCoalesce(stack.mask.density, () => ( 1)), feather: _nullishCoalesce(stack.mask.feather, () => ( 0)), bounds: _chunk474IQG74cjs.contentBounds.call(void 0, stack.mask.surface), defaultValue: stack.mask.defaultValue } : null
|
|
7972
8015
|
},
|
|
7973
8016
|
bounds: this.getLayerBounds(id)
|
|
7974
8017
|
};
|
|
@@ -8107,7 +8150,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8107
8150
|
* it in the same undo step (Photoshop limits a filter to the selection). Returns whether it did.
|
|
8108
8151
|
*/
|
|
8109
8152
|
maskFiltersWithSelection(id, useSelection) {
|
|
8110
|
-
if (!useSelection || !_optionalChain([this, 'access',
|
|
8153
|
+
if (!useSelection || !_optionalChain([this, 'access', _270 => _270.state, 'access', _271 => _271.selection, 'optionalAccess', _272 => _272.bounds])) return false;
|
|
8111
8154
|
this.setSmartFilterMask(id, "selection", {}, false);
|
|
8112
8155
|
return true;
|
|
8113
8156
|
}
|
|
@@ -8121,19 +8164,19 @@ var ImageEditorController = (_class12 = class {
|
|
|
8121
8164
|
removeSmartFilter(id, filterId) {
|
|
8122
8165
|
const res = _chunkS55JFWDAcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
|
|
8123
8166
|
this.commitLayers(res.layers);
|
|
8124
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8167
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _273 => _273.layer, 'access', _274 => _274.smartFilters, 'optionalAccess', _275 => _275.filters]), () => ( []));
|
|
8125
8168
|
}
|
|
8126
8169
|
/** Moves one smart filter to `index` (0 = bottom, applied first), as one undo step. Returns the filters. */
|
|
8127
8170
|
moveSmartFilter(id, filterId, index) {
|
|
8128
8171
|
const res = _chunkS55JFWDAcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
|
|
8129
8172
|
this.commitLayers(res.layers);
|
|
8130
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8173
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _276 => _276.layer, 'access', _277 => _277.smartFilters, 'optionalAccess', _278 => _278.filters]), () => ( []));
|
|
8131
8174
|
}
|
|
8132
8175
|
/** Turns a smart object's whole filter stack on or off (one undo step). */
|
|
8133
8176
|
setSmartFiltersEnabled(id, enabled) {
|
|
8134
8177
|
const res = _chunkS55JFWDAcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
|
|
8135
8178
|
this.commitLayers(res.layers);
|
|
8136
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8179
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _279 => _279.layer, 'access', _280 => _280.smartFilters, 'optionalAccess', _281 => _281.enabled]), () => ( true));
|
|
8137
8180
|
}
|
|
8138
8181
|
/**
|
|
8139
8182
|
* Sets the smart filter mask (one undo step): `reveal-all`, `hide-all`, `selection` (the
|
|
@@ -8145,11 +8188,11 @@ var ImageEditorController = (_class12 = class {
|
|
|
8145
8188
|
let mask;
|
|
8146
8189
|
if (from === "none") mask = null;
|
|
8147
8190
|
else if (from === "keep") {
|
|
8148
|
-
if (!_optionalChain([layer, 'access',
|
|
8191
|
+
if (!_optionalChain([layer, 'access', _282 => _282.smartFilters, 'optionalAccess', _283 => _283.mask])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
|
|
8149
8192
|
mask = withMaskProps(layer.smartFilters.mask, props);
|
|
8150
8193
|
} else if (from === "selection") {
|
|
8151
8194
|
const sel = this.state.selection;
|
|
8152
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
8195
|
+
if (!_optionalChain([sel, 'optionalAccess', _284 => _284.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
|
|
8153
8196
|
mask = this.maskFromSelection(sel, props);
|
|
8154
8197
|
} else {
|
|
8155
8198
|
const v = from === "reveal-all" ? 255 : 0;
|
|
@@ -8161,7 +8204,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8161
8204
|
if (mask && from !== "keep") this.state.activeTarget = "filter-mask";
|
|
8162
8205
|
else if (!mask && this.state.activeTarget === "filter-mask") this.state.activeTarget = "pixels";
|
|
8163
8206
|
}, commitToHistory);
|
|
8164
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8207
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _285 => _285.layer, 'access', _286 => _286.smartFilters, 'optionalAccess', _287 => _287.mask]), () => ( null));
|
|
8165
8208
|
}
|
|
8166
8209
|
/**
|
|
8167
8210
|
* Decodes smart object contents that came as files the synchronous decoders cannot read (a JPEG
|
|
@@ -8209,7 +8252,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8209
8252
|
if (this.getFreeTransform()) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
|
|
8210
8253
|
const layer = _chunkS55JFWDAcjs.requireSmartObject.call(void 0, this.state.layers, id);
|
|
8211
8254
|
const c = layer.contents;
|
|
8212
|
-
if (!_chunkS55JFWDAcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access',
|
|
8255
|
+
if (!_chunkS55JFWDAcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _288 => _288.file, 'optionalAccess', _289 => _289.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
|
|
8213
8256
|
const saved = {
|
|
8214
8257
|
state: { ...this.state },
|
|
8215
8258
|
undo: this.undoStack,
|
|
@@ -8240,9 +8283,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
8240
8283
|
editingContents: this.getEditingContents()
|
|
8241
8284
|
};
|
|
8242
8285
|
delete this.state.legacyOutputBlur;
|
|
8243
|
-
if (_optionalChain([c, 'access',
|
|
8286
|
+
if (_optionalChain([c, 'access', _290 => _290.document, 'optionalAccess', _291 => _291.globalLight])) this.state.globalLight = c.document.globalLight;
|
|
8244
8287
|
else delete this.state.globalLight;
|
|
8245
|
-
if (_optionalChain([c, 'access',
|
|
8288
|
+
if (_optionalChain([c, 'access', _292 => _292.document, 'optionalAccess', _293 => _293.patterns, 'optionalAccess', _294 => _294.length])) this.state.patterns = c.document.patterns;
|
|
8246
8289
|
else delete this.state.patterns;
|
|
8247
8290
|
this.imageElement = null;
|
|
8248
8291
|
this.samplePixels = null;
|
|
@@ -8262,23 +8305,23 @@ var ImageEditorController = (_class12 = class {
|
|
|
8262
8305
|
closeSmartObjectContents(save = true) {
|
|
8263
8306
|
const top = this.contentsStack.pop();
|
|
8264
8307
|
if (!top) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
|
|
8265
|
-
if (_optionalChain([this, 'access',
|
|
8308
|
+
if (_optionalChain([this, 'access', _295 => _295.openTransform, 'optionalAccess', _296 => _296.isOpen])) this.openTransform.cancel();
|
|
8266
8309
|
this.openTransform = null;
|
|
8267
8310
|
const edited = this.state;
|
|
8268
8311
|
const changed = save && this.undoStack.length > 0;
|
|
8269
8312
|
let next = null;
|
|
8270
8313
|
if (changed) {
|
|
8271
|
-
const layer = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess',
|
|
8272
|
-
const old = _optionalChain([layer, 'optionalAccess',
|
|
8314
|
+
const layer = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _297 => _297.layer]);
|
|
8315
|
+
const old = _optionalChain([layer, 'optionalAccess', _298 => _298.contents]);
|
|
8273
8316
|
const { width, height } = edited.imageDimensions;
|
|
8274
8317
|
const only = edited.layers.length === 1 ? edited.layers[0] : null;
|
|
8275
|
-
const plain3 = _optionalChain([only, 'optionalAccess',
|
|
8276
|
-
if (_optionalChain([old, 'optionalAccess',
|
|
8318
|
+
const plain3 = _optionalChain([only, 'optionalAccess', _299 => _299.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _300 => _300.filters, 'optionalAccess', _301 => _301.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
|
|
8319
|
+
if (_optionalChain([old, 'optionalAccess', _302 => _302.kind]) === "raster" && plain3) {
|
|
8277
8320
|
const px2 = _chunk474IQG74cjs.readRegion.call(void 0, only.surface, { x: -only.offset.x, y: -only.offset.y, width, height });
|
|
8278
8321
|
next = _chunkS55JFWDAcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
|
|
8279
8322
|
} else {
|
|
8280
8323
|
const doc = { layers: edited.layers, globalLight: edited.globalLight, patterns: edited.patterns };
|
|
8281
|
-
next = _chunkS55JFWDAcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess',
|
|
8324
|
+
next = _chunkS55JFWDAcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _303 => _303.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _304 => _304.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
|
|
8282
8325
|
}
|
|
8283
8326
|
}
|
|
8284
8327
|
const saved = top.saved;
|
|
@@ -8303,7 +8346,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8303
8346
|
}
|
|
8304
8347
|
/** The document's own layers (not the contents open for editing). */
|
|
8305
8348
|
rootLayers() {
|
|
8306
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
8349
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _305 => _305.contentsStack, 'access', _306 => _306[0], 'optionalAccess', _307 => _307.saved, 'access', _308 => _308.state, 'access', _309 => _309.layers]), () => ( this.state.layers));
|
|
8307
8350
|
}
|
|
8308
8351
|
/** Drops every open contents edit (loading another document). */
|
|
8309
8352
|
abandonContents() {
|
|
@@ -8524,7 +8567,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8524
8567
|
const oy = layer.type === "pixel" ? layer.offset.y : 0;
|
|
8525
8568
|
const key2 = `${tw}x${th}:${ox},${oy}`;
|
|
8526
8569
|
let byKey = this.thumbCache.get(surface);
|
|
8527
|
-
const hit = _optionalChain([byKey, 'optionalAccess',
|
|
8570
|
+
const hit = _optionalChain([byKey, 'optionalAccess', _310 => _310.get, 'call', _311 => _311(key2)]);
|
|
8528
8571
|
if (hit) return hit;
|
|
8529
8572
|
const out = new Uint8ClampedArray(tw * th * 4);
|
|
8530
8573
|
for (let y = 0; y < th; y++) {
|
|
@@ -8665,7 +8708,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8665
8708
|
if (layer.mask.source) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which is generated, not painted.`);
|
|
8666
8709
|
_chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "all", action);
|
|
8667
8710
|
} else if (ch === "filter-mask") {
|
|
8668
|
-
if (layer.type !== "smart" || !_optionalChain([layer, 'access',
|
|
8711
|
+
if (layer.type !== "smart" || !_optionalChain([layer, 'access', _312 => _312.smartFilters, 'optionalAccess', _313 => _313.mask])) {
|
|
8669
8712
|
throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" has no smart filter mask to ${action}; add one with set_smart_filter_mask, or target pixels or mask.`, `Layer "${name}" has no smart filter mask to ${action}.`);
|
|
8670
8713
|
}
|
|
8671
8714
|
if (!_chunkS55JFWDAcjs.isContentsDecoded.call(void 0, layer.contents)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`The contents of "${name}" are not decoded here, so its filter mask cannot be painted; run prepareSmartObjects() first.`, `The smart object "${name}" is still loading; try again in a moment.`);
|
|
@@ -8680,7 +8723,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8680
8723
|
if (!layer.visible) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" is hidden; show it before you ${action}.`);
|
|
8681
8724
|
const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
|
|
8682
8725
|
const surface = ch === "mask" ? layer.mask.surface : ch === "filter-mask" ? layer.smartFilters.mask.surface : this.surfaceOf(layer);
|
|
8683
|
-
const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access',
|
|
8726
|
+
const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _314 => _314.locks, 'optionalAccess', _315 => _315.transparency]));
|
|
8684
8727
|
return { id, layer, channel: ch, offset, surface, lockTransparency };
|
|
8685
8728
|
}
|
|
8686
8729
|
/** The layer with its pixels (or mask) replaced by `surface`. */
|
|
@@ -8724,13 +8767,13 @@ var ImageEditorController = (_class12 = class {
|
|
|
8724
8767
|
blend: target.channel !== "pixels" ? "normal" : brush.blend,
|
|
8725
8768
|
lockTransparency: target.lockTransparency,
|
|
8726
8769
|
// In Quick Mask mode the selection is what is painted, so it does not limit the stroke.
|
|
8727
|
-
selection: target.channel !== "quick-mask" && _optionalChain([this, 'access',
|
|
8770
|
+
selection: target.channel !== "quick-mask" && _optionalChain([this, 'access', _316 => _316.state, 'access', _317 => _317.selection, 'optionalAccess', _318 => _318.bounds]) ? this.state.selection : null,
|
|
8728
8771
|
offset: target.offset
|
|
8729
8772
|
};
|
|
8730
8773
|
const depth = target.channel !== "filter-mask" && target.channel !== "quick-mask" && this.bitDepth !== 8 ? this.bitDepth : null;
|
|
8731
8774
|
if (tool === "mixer") return new PaintStrokeSession(this, target, this.mixerStroke(init, brush), apply, depth);
|
|
8732
8775
|
if (isRetouchTool(tool)) return new PaintStrokeSession(this, target, this.retouchStroke(tool, init, brush, target, apply), apply, depth);
|
|
8733
|
-
const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess',
|
|
8776
|
+
const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess', _319 => _319.type]) === "gradient" ? _chunkPQ3H2AANcjs.resolvePaintGradient.call(void 0, strokePaint, { paint: toHex(color), secondary: toHex(background) }) : null;
|
|
8734
8777
|
return new PaintStrokeSession(this, target, new (0, _chunkPQ3H2AANcjs.StrokeCoverage)(brush, gradient, _nullishCoalesce(init.seed, () => ( 0))), apply, depth);
|
|
8735
8778
|
}
|
|
8736
8779
|
/** A retouching stroke's start: its settings, what it samples and how it composites. */
|
|
@@ -8777,9 +8820,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
8777
8820
|
const steps = settings.historySteps;
|
|
8778
8821
|
const entry = steps > 0 ? _nullishCoalesce(this.undoStack[this.undoStack.length - steps], () => ( this.undoStack[0])) : this.undoStack[0];
|
|
8779
8822
|
if (!entry) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("There is no earlier state to paint from yet: the History Brush paints a layer as it was some undo steps back. Make a change first.");
|
|
8780
|
-
const then = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess',
|
|
8823
|
+
const then = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _320 => _320.layer]);
|
|
8781
8824
|
if (!then) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${target.id}" did not exist ${steps > 0 ? `${steps} steps back` : "in the oldest state"}; choose fewer history steps (historySteps).`);
|
|
8782
|
-
const surface = target.channel === "mask" ? _optionalChain([then, 'access',
|
|
8825
|
+
const surface = target.channel === "mask" ? _optionalChain([then, 'access', _321 => _321.mask, 'optionalAccess', _322 => _322.surface]) : then.type === "pixel" ? then.surface : void 0;
|
|
8783
8826
|
if (!surface) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
|
|
8784
8827
|
const offset2 = then.type === "pixel" ? then.offset : { x: 0, y: 0 };
|
|
8785
8828
|
const depth = !mask && this.bitDepth !== 8 ? this.bitDepth : null;
|
|
@@ -8853,7 +8896,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8853
8896
|
}
|
|
8854
8897
|
/** A pixel source over a surface (layer pixels or a mask) in layer space at `offset`. */
|
|
8855
8898
|
surfaceSource(surface, offset) {
|
|
8856
|
-
return new (0, _chunkYF3YZZ6Gcjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access',
|
|
8899
|
+
return new (0, _chunkYF3YZZ6Gcjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access', _323 => _323.tiles, 'access', _324 => _324.get, 'call', _325 => _325(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _326 => _326.data]), () => ( (surface.defaultValue ? defaultTile(surface) : null))), surface.channels, offset);
|
|
8857
8900
|
}
|
|
8858
8901
|
/** A pixel source over the composite of the current layers (through `throughId` and below, or all of them), as it is now. */
|
|
8859
8902
|
compositeSource(throughId, depth = null) {
|
|
@@ -8929,7 +8972,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8929
8972
|
paintStroke(init) {
|
|
8930
8973
|
if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("points must hold at least one { x, y } point.");
|
|
8931
8974
|
for (const p of init.points) {
|
|
8932
|
-
if (!Number.isFinite(_optionalChain([p, 'optionalAccess',
|
|
8975
|
+
if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _327 => _327.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _328 => _328.y]))) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
|
|
8933
8976
|
}
|
|
8934
8977
|
const session = this.beginStroke(init);
|
|
8935
8978
|
session.push(init.points);
|
|
@@ -8958,7 +9001,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8958
9001
|
*/
|
|
8959
9002
|
strokeSelection(options) {
|
|
8960
9003
|
const sel = this.state.selection;
|
|
8961
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9004
|
+
if (!_optionalChain([sel, 'optionalAccess', _329 => _329.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, then stroke the selection.");
|
|
8962
9005
|
const width = options.width;
|
|
8963
9006
|
if (!(width > 0 && width <= 250)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("width must be greater than 0 and at most 250 px.");
|
|
8964
9007
|
const location = _nullishCoalesce(options.location, () => ( "outside"));
|
|
@@ -8975,7 +9018,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8975
9018
|
*/
|
|
8976
9019
|
cropToSelection() {
|
|
8977
9020
|
const sel = this.state.selection;
|
|
8978
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9021
|
+
if (!_optionalChain([sel, 'optionalAccess', _330 => _330.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select the area to keep, then crop to it.");
|
|
8979
9022
|
const crop = { ...sel.bounds };
|
|
8980
9023
|
this.setCrop(crop);
|
|
8981
9024
|
return crop;
|
|
@@ -9026,7 +9069,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9026
9069
|
*/
|
|
9027
9070
|
prepareContentAwareFill(options = {}) {
|
|
9028
9071
|
const sel = this.state.selection;
|
|
9029
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9072
|
+
if (!_optionalChain([sel, 'optionalAccess', _331 => _331.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select what to remove, then fill it.");
|
|
9030
9073
|
if (this.bitDepth !== 8) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Content-Aware Fill works on 8-bit documents for now; set_bit_depth 8 first, or use spot_heal.");
|
|
9031
9074
|
const output = _nullishCoalesce(options.output, () => ( "current"));
|
|
9032
9075
|
if (output !== "current" && output !== "new-layer" && output !== "duplicate-layer") {
|
|
@@ -9037,12 +9080,12 @@ var ImageEditorController = (_class12 = class {
|
|
|
9037
9080
|
const b = sel.bounds;
|
|
9038
9081
|
let area = _nullishCoalesce(options.samplingArea, () => ( null));
|
|
9039
9082
|
if (!area && options.samplingChannelId) area = this.requireChannel(options.samplingChannelId).mask;
|
|
9040
|
-
if (!area && _optionalChain([options, 'access',
|
|
9083
|
+
if (!area && _optionalChain([options, 'access', _332 => _332.sampleRects, 'optionalAccess', _333 => _333.length])) {
|
|
9041
9084
|
for (const r of options.sampleRects) area = _chunkSS53NNZOcjs.combineSelections.call(void 0, area, _chunkUC3PWFM3cjs.rectSelection.call(void 0, width, height, r, { antiAlias: false }), "add");
|
|
9042
9085
|
}
|
|
9043
9086
|
if (area && !area.bounds) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("The sampling area is empty; paint or give an area to sample from.");
|
|
9044
9087
|
let win;
|
|
9045
|
-
if (_optionalChain([area, 'optionalAccess',
|
|
9088
|
+
if (_optionalChain([area, 'optionalAccess', _334 => _334.bounds])) {
|
|
9046
9089
|
const a = area.bounds;
|
|
9047
9090
|
const x0 = Math.max(0, Math.min(b.x - 8, a.x));
|
|
9048
9091
|
const y0 = Math.max(0, Math.min(b.y - 8, a.y));
|
|
@@ -9067,7 +9110,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9067
9110
|
}
|
|
9068
9111
|
}
|
|
9069
9112
|
let exclude = null;
|
|
9070
|
-
if (area || _optionalChain([options, 'access',
|
|
9113
|
+
if (area || _optionalChain([options, 'access', _335 => _335.excludeRects, 'optionalAccess', _336 => _336.length])) {
|
|
9071
9114
|
exclude = new Uint8Array(n);
|
|
9072
9115
|
if (area) {
|
|
9073
9116
|
const ad = area.data;
|
|
@@ -9138,8 +9181,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
9138
9181
|
*/
|
|
9139
9182
|
copyPixels(options = {}) {
|
|
9140
9183
|
const { width, height } = this.naturalSize;
|
|
9141
|
-
const sel = _optionalChain([this, 'access',
|
|
9142
|
-
const rect2 = _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
9184
|
+
const sel = _optionalChain([this, 'access', _337 => _337.state, 'access', _338 => _338.selection, 'optionalAccess', _339 => _339.bounds]) ? this.state.selection : null;
|
|
9185
|
+
const rect2 = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _340 => _340.bounds]), () => ( { x: 0, y: 0, width, height }));
|
|
9143
9186
|
let data;
|
|
9144
9187
|
if (options.merged) {
|
|
9145
9188
|
data = new Uint8ClampedArray(this.compositePixels(rect2).data);
|
|
@@ -9179,7 +9222,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9179
9222
|
pastePixels(mode = "new-layer", image = this.clipboard) {
|
|
9180
9223
|
if (!image) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("The clipboard is empty; copy_pixels first.");
|
|
9181
9224
|
if (!PASTE_MODES.includes(mode)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Unknown paste mode "${String(mode)}"; use ${PASTE_MODES.join(", ")}.`);
|
|
9182
|
-
const sel = _optionalChain([this, 'access',
|
|
9225
|
+
const sel = _optionalChain([this, 'access', _341 => _341.state, 'access', _342 => _342.selection, 'optionalAccess', _343 => _343.bounds]) ? this.state.selection : null;
|
|
9183
9226
|
if ((mode === "into" || mode === "outside") && !sel) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Paste ${mode === "into" ? "Into" : "Outside"} needs a selection; select where it goes first.`);
|
|
9184
9227
|
const { width, height } = this.naturalSize;
|
|
9185
9228
|
let x;
|
|
@@ -9188,7 +9231,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9188
9231
|
x = image.x;
|
|
9189
9232
|
y = image.y;
|
|
9190
9233
|
} else {
|
|
9191
|
-
const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
9234
|
+
const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _344 => _344.bounds]), () => ( { x: 0, y: 0, width, height }));
|
|
9192
9235
|
x = Math.round(frame.x + (frame.width - image.width) / 2);
|
|
9193
9236
|
y = Math.round(frame.y + (frame.height - image.height) / 2);
|
|
9194
9237
|
}
|
|
@@ -9205,8 +9248,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
9205
9248
|
if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("opacity must be from 0 to 1.");
|
|
9206
9249
|
const blend = _nullishCoalesce(_chunkS55JFWDAcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
|
|
9207
9250
|
const quickMask = target.channel === "quick-mask";
|
|
9208
|
-
const sel = _nullishCoalesce(coverageMask, () => ( (!quickMask && options.useSelection !== false && _optionalChain([this, 'access',
|
|
9209
|
-
const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
9251
|
+
const sel = _nullishCoalesce(coverageMask, () => ( (!quickMask && options.useSelection !== false && _optionalChain([this, 'access', _345 => _345.state, 'access', _346 => _346.selection, 'optionalAccess', _347 => _347.bounds]) ? this.state.selection : null)));
|
|
9252
|
+
const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _348 => _348.bounds]), () => ( { x: 0, y: 0, width, height }));
|
|
9210
9253
|
const coverage = new (0, _chunkPQ3H2AANcjs.CoverageMap)();
|
|
9211
9254
|
const ones = new Float32Array(region.width * region.height);
|
|
9212
9255
|
if (sel) {
|
|
@@ -9331,7 +9374,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9331
9374
|
placeLayer(layers, node, where) {
|
|
9332
9375
|
if (where.aboveId) {
|
|
9333
9376
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, where.aboveId);
|
|
9334
|
-
if (loc) return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9377
|
+
if (loc) return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _349 => _349.parent, 'optionalAccess', _350 => _350.id]), () => ( null)), loc.index + 1);
|
|
9335
9378
|
}
|
|
9336
9379
|
if (where.parentId) {
|
|
9337
9380
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, where.parentId);
|
|
@@ -9342,11 +9385,11 @@ var ImageEditorController = (_class12 = class {
|
|
|
9342
9385
|
const at = Math.max(0, Math.min(nodes.length, Math.round(where.adjustmentIndex)));
|
|
9343
9386
|
if (at < nodes.length) {
|
|
9344
9387
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, nodes[at].id);
|
|
9345
|
-
return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9388
|
+
return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _351 => _351.parent, 'optionalAccess', _352 => _352.id]), () => ( null)), loc.index);
|
|
9346
9389
|
}
|
|
9347
9390
|
if (nodes.length) {
|
|
9348
9391
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, nodes[nodes.length - 1].id);
|
|
9349
|
-
return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9392
|
+
return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _353 => _353.parent, 'optionalAccess', _354 => _354.id]), () => ( null)), loc.index + 1);
|
|
9350
9393
|
}
|
|
9351
9394
|
}
|
|
9352
9395
|
return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, null, this.defaultInsertIndex(layers));
|
|
@@ -9385,7 +9428,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9385
9428
|
enabled: spec.enabled,
|
|
9386
9429
|
opacity: spec.opacity,
|
|
9387
9430
|
blend: spec.blend,
|
|
9388
|
-
mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access',
|
|
9431
|
+
mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access', _355 => _355.state, 'access', _356 => _356.selection, 'optionalAccess', _357 => _357.bounds]) ? _chunkS55JFWDAcjs.layerMaskFromSelection.call(void 0, this.state.selection) : void 0)))
|
|
9389
9432
|
});
|
|
9390
9433
|
while (ids.has(layer.id)) layer.id = _chunkS55JFWDAcjs.newLayerId.call(void 0, "adj");
|
|
9391
9434
|
const { width, height } = this.naturalSize;
|
|
@@ -9462,7 +9505,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9462
9505
|
const anchor = nodes[to];
|
|
9463
9506
|
const without = _chunkB46UQUDCcjs.mapLayer.call(void 0, layers, id, () => null);
|
|
9464
9507
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, without, anchor.id);
|
|
9465
|
-
return _chunkB46UQUDCcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9508
|
+
return _chunkB46UQUDCcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _358 => _358.parent, 'optionalAccess', _359 => _359.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
|
|
9466
9509
|
}
|
|
9467
9510
|
/** Moves a layer to `toIndex` among the adjustment layers (0 = bottom) as one undo step. Returns false if nothing moved. */
|
|
9468
9511
|
moveAdjustmentLayer(id, toIndex) {
|
|
@@ -9503,7 +9546,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9503
9546
|
return _nullishCoalesce(this.state.selection, () => ( null));
|
|
9504
9547
|
}
|
|
9505
9548
|
get hasSelection() {
|
|
9506
|
-
return Boolean(_optionalChain([this, 'access',
|
|
9549
|
+
return Boolean(_optionalChain([this, 'access', _360 => _360.state, 'access', _361 => _361.selection, 'optionalAccess', _362 => _362.bounds]));
|
|
9507
9550
|
}
|
|
9508
9551
|
/** Returns the current canvas (composition) dimensions. */
|
|
9509
9552
|
getCanvasSize() {
|
|
@@ -9595,7 +9638,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9595
9638
|
const prev = normalizeSelection(_nullishCoalesce(this.state.selection, () => ( null)));
|
|
9596
9639
|
if (prev === next || prev && next && sameSelection(prev, next)) return false;
|
|
9597
9640
|
this.recordHistory();
|
|
9598
|
-
if (!next && _optionalChain([prev, 'optionalAccess',
|
|
9641
|
+
if (!next && _optionalChain([prev, 'optionalAccess', _363 => _363.bounds])) this.lastSelection = prev;
|
|
9599
9642
|
this.state.selection = next;
|
|
9600
9643
|
this.notify();
|
|
9601
9644
|
return true;
|
|
@@ -9649,14 +9692,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
9649
9692
|
/** Select › Grow: adds connected pixels within `tolerance` of a selected colour (one undo step). */
|
|
9650
9693
|
async growSelection(options = {}) {
|
|
9651
9694
|
const sel = this.state.selection;
|
|
9652
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9695
|
+
if (!_optionalChain([sel, 'optionalAccess', _364 => _364.bounds])) return false;
|
|
9653
9696
|
const pixels = await this.requirePixels(options);
|
|
9654
9697
|
return this.setSelection(growSelection(pixels, sel, options));
|
|
9655
9698
|
}
|
|
9656
9699
|
/** Select › Similar: adds every pixel within `tolerance` of a selected colour (one undo step). */
|
|
9657
9700
|
async selectSimilar(options = {}) {
|
|
9658
9701
|
const sel = this.state.selection;
|
|
9659
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9702
|
+
if (!_optionalChain([sel, 'optionalAccess', _365 => _365.bounds])) return false;
|
|
9660
9703
|
const pixels = await this.requirePixels(options);
|
|
9661
9704
|
return this.setSelection(selectSimilar(pixels, sel, options));
|
|
9662
9705
|
}
|
|
@@ -9748,7 +9791,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9748
9791
|
size: options.size,
|
|
9749
9792
|
grow: m === "add",
|
|
9750
9793
|
enhanceEdge: options.enhanceEdge,
|
|
9751
|
-
selection: m === "add" && _optionalChain([sel, 'optionalAccess',
|
|
9794
|
+
selection: m === "add" && _optionalChain([sel, 'optionalAccess', _366 => _366.bounds]) ? _chunkUC3PWFM3cjs.serializeMask.call(void 0, sel) : null
|
|
9752
9795
|
};
|
|
9753
9796
|
const { mask } = await this.runSelectionJob(job, pixels, {
|
|
9754
9797
|
signal: options.signal,
|
|
@@ -9768,7 +9811,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9768
9811
|
const { width, height } = this.naturalSize;
|
|
9769
9812
|
const image = await this.toDataURL({ format: "image/png" });
|
|
9770
9813
|
const results = await provider.segment({ ...request, image, width, height });
|
|
9771
|
-
_optionalChain([request, 'access',
|
|
9814
|
+
_optionalChain([request, 'access', _367 => _367.signal, 'optionalAccess', _368 => _368.throwIfAborted, 'call', _369 => _369()]);
|
|
9772
9815
|
const decoded = [];
|
|
9773
9816
|
for (const r of _nullishCoalesce(results, () => ( []))) decoded.push({ ...r, mask: r.mask !== void 0 ? await this.decodeMaskImage(r.mask) : void 0 });
|
|
9774
9817
|
return decoded;
|
|
@@ -9785,7 +9828,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9785
9828
|
let union = null;
|
|
9786
9829
|
for (const r of decoded) {
|
|
9787
9830
|
const one = segmentsToSelection(width, height, [r]);
|
|
9788
|
-
if (!_optionalChain([one, 'optionalAccess',
|
|
9831
|
+
if (!_optionalChain([one, 'optionalAccess', _370 => _370.bounds])) continue;
|
|
9789
9832
|
if ("rect" in target) {
|
|
9790
9833
|
const r0 = target.rect;
|
|
9791
9834
|
const grow = 0.1 * Math.max(r0.width, r0.height);
|
|
@@ -9853,7 +9896,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9853
9896
|
if (this.segmentation && options.useModel !== false) {
|
|
9854
9897
|
const { width, height } = this.naturalSize;
|
|
9855
9898
|
const sky = segmentsToSelection(width, height, await this.modelSegments({ target: "the sky", signal: options.signal }));
|
|
9856
|
-
if (!_optionalChain([sky, 'optionalAccess',
|
|
9899
|
+
if (!_optionalChain([sky, 'optionalAccess', _371 => _371.bounds])) return { selection: _nullishCoalesce(this.state.selection, () => ( null)), method: "model", note: "The segmentation model found no sky." };
|
|
9857
9900
|
this.setSelection(sky, _nullishCoalesce(options.mode, () => ( "replace")));
|
|
9858
9901
|
return { selection: _nullishCoalesce(this.state.selection, () => ( null)), method: "model" };
|
|
9859
9902
|
}
|
|
@@ -9884,7 +9927,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9884
9927
|
try {
|
|
9885
9928
|
const canvas = await this.renderSource();
|
|
9886
9929
|
const ctx = canvas.getContext("2d");
|
|
9887
|
-
const data2 = _optionalChain([ctx, 'optionalAccess',
|
|
9930
|
+
const data2 = _optionalChain([ctx, 'optionalAccess', _372 => _372.getImageData, 'optionalCall', _373 => _373(0, 0, width, height)]);
|
|
9888
9931
|
if (data2 && data2.data && data2.data.length >= width * height * 4) {
|
|
9889
9932
|
base = { width, height, data: data2.data };
|
|
9890
9933
|
this.samplePixels = base;
|
|
@@ -9959,7 +10002,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9959
10002
|
/** Select › Modify: grow, shrink, feather, border or smooth by `radius` pixels (one undo step). */
|
|
9960
10003
|
modifySelection(op, radius) {
|
|
9961
10004
|
const sel = this.state.selection;
|
|
9962
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10005
|
+
if (!_optionalChain([sel, 'optionalAccess', _374 => _374.bounds])) return false;
|
|
9963
10006
|
return this.setSelection(_chunkSS53NNZOcjs.modifySelection.call(void 0, sel, op, radius));
|
|
9964
10007
|
}
|
|
9965
10008
|
/**
|
|
@@ -9968,7 +10011,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9968
10011
|
*/
|
|
9969
10012
|
async refineSelection(params, options = {}) {
|
|
9970
10013
|
const sel = this.state.selection;
|
|
9971
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10014
|
+
if (!_optionalChain([sel, 'optionalAccess', _375 => _375.bounds])) return false;
|
|
9972
10015
|
const pixels = (_nullishCoalesce(params.radius, () => ( 0))) > 0 ? await this.requirePixels(options) : null;
|
|
9973
10016
|
return this.setSelection(_chunkSS53NNZOcjs.refineSelection.call(void 0, pixels, sel, params));
|
|
9974
10017
|
}
|
|
@@ -9991,7 +10034,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9991
10034
|
const edits = _nullishCoalesce(options.edits, () => ( []));
|
|
9992
10035
|
const regions2 = this.checkRegions(options.regions);
|
|
9993
10036
|
const refineMode = _nullishCoalesce(options.refineMode, () => ( "color"));
|
|
9994
|
-
if (!_optionalChain([this, 'access',
|
|
10037
|
+
if (!_optionalChain([this, 'access', _376 => _376.state, 'access', _377 => _377.selection, 'optionalAccess', _378 => _378.bounds]) && !edits.length) throw new Error("Nothing is selected; select first, or pass edits that paint a selection.");
|
|
9995
10038
|
if (refineMode === "object" && !this.segmentation) {
|
|
9996
10039
|
throw new Error("Object aware refinement needs a segmentation model (setSegmentationProvider); use refineMode color.");
|
|
9997
10040
|
}
|
|
@@ -10014,14 +10057,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
10014
10057
|
const { width, height } = this.naturalSize;
|
|
10015
10058
|
const edited = _chunkUC3PWFM3cjs.applyRefineEdits.call(void 0, pixels, _nullishCoalesce(this.state.selection, () => ( null)), edits, width, height);
|
|
10016
10059
|
let sel = edited.selection;
|
|
10017
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10060
|
+
if (!_optionalChain([sel, 'optionalAccess', _379 => _379.bounds])) throw new Error("The edits leave nothing selected; paint with mode add first.");
|
|
10018
10061
|
if (refineMode === "object") {
|
|
10019
10062
|
const b = sel.bounds;
|
|
10020
10063
|
const found = await this.modelObject({ rect: b }, options.signal);
|
|
10021
10064
|
if (!found) throw new Error("The segmentation model found no object in the selection; use refineMode color.");
|
|
10022
10065
|
const near = _chunkSS53NNZOcjs.modifySelection.call(void 0, sel, "expand", Math.max(4, _nullishCoalesce(params.radius, () => ( 8))));
|
|
10023
10066
|
const clipped = _chunkSS53NNZOcjs.combineSelections.call(void 0, found, near, "intersect");
|
|
10024
|
-
if (!_optionalChain([clipped, 'optionalAccess',
|
|
10067
|
+
if (!_optionalChain([clipped, 'optionalAccess', _380 => _380.bounds])) throw new Error("The segmentation model found no object in the selection; use refineMode color.");
|
|
10025
10068
|
sel = clipped;
|
|
10026
10069
|
}
|
|
10027
10070
|
let refined = _chunkSS53NNZOcjs.refineSelection.call(void 0, pixels, sel, params, edited.refineBrush);
|
|
@@ -10123,7 +10166,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10123
10166
|
let mask;
|
|
10124
10167
|
if (source === "selection") {
|
|
10125
10168
|
const sel = this.state.selection;
|
|
10126
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10169
|
+
if (!_optionalChain([sel, 'optionalAccess', _381 => _381.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, or export a channel or a layer mask.");
|
|
10127
10170
|
mask = sel;
|
|
10128
10171
|
} else if ("channelId" in source) {
|
|
10129
10172
|
mask = this.requireChannel(source.channelId).mask;
|
|
@@ -10147,7 +10190,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10147
10190
|
const canvas = this.renderer.createCanvas(w, h);
|
|
10148
10191
|
const ctx = canvas.getContext("2d");
|
|
10149
10192
|
if (ctx) ctx.drawImage(img, 0, 0, w, h);
|
|
10150
|
-
const data = _optionalChain([ctx, 'optionalAccess',
|
|
10193
|
+
const data = _optionalChain([ctx, 'optionalAccess', _382 => _382.getImageData, 'optionalCall', _383 => _383(0, 0, w, h)]);
|
|
10151
10194
|
if (!data) throw new Error("The mask image pixels are not available (no canvas access); pass pixels.");
|
|
10152
10195
|
return { width: w, height: h, data: data.data };
|
|
10153
10196
|
}
|
|
@@ -10163,7 +10206,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10163
10206
|
const provider = this.segmentation;
|
|
10164
10207
|
if (!provider) {
|
|
10165
10208
|
const pixels = await this.requirePixels({});
|
|
10166
|
-
_optionalChain([options, 'access',
|
|
10209
|
+
_optionalChain([options, 'access', _384 => _384.signal, 'optionalAccess', _385 => _385.throwIfAborted, 'call', _386 => _386()]);
|
|
10167
10210
|
const { mask: selection, reason } = await this.runSelectionJob({ op: "subject", enhanceEdge: options.enhanceEdge }, pixels, options);
|
|
10168
10211
|
if (selection.bounds) this.shapeCommand(selection, options);
|
|
10169
10212
|
const unused = target.trim() ? ` "${target.trim()}" was not used to choose it.` : "";
|
|
@@ -10179,17 +10222,17 @@ var ImageEditorController = (_class12 = class {
|
|
|
10179
10222
|
const decoded = await this.modelSegments({ target: description, maxSegments: options.maxSegments, signal: options.signal });
|
|
10180
10223
|
const segments = decoded.map((r) => {
|
|
10181
10224
|
const one = segmentsToSelection(width, height, [r]);
|
|
10182
|
-
return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess',
|
|
10225
|
+
return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess', _387 => _387.bounds]), () => ( null)), ...r.score !== void 0 ? { score: r.score } : {} };
|
|
10183
10226
|
});
|
|
10184
10227
|
const mask = segmentsToSelection(width, height, decoded);
|
|
10185
10228
|
if (mask && options.beforeApply) {
|
|
10186
10229
|
const outlines = decoded.flatMap((r, i) => {
|
|
10187
10230
|
const rings = segmentationOutlines(r);
|
|
10188
|
-
const b = _optionalChain([segments, 'access',
|
|
10231
|
+
const b = _optionalChain([segments, 'access', _388 => _388[i], 'optionalAccess', _389 => _389.bounds]);
|
|
10189
10232
|
return rings.length ? rings : b ? [[{ x: b.x, y: b.y }, { x: b.x + b.width, y: b.y }, { x: b.x + b.width, y: b.y + b.height }, { x: b.x, y: b.y + b.height }]] : [];
|
|
10190
10233
|
});
|
|
10191
10234
|
await options.beforeApply(outlines);
|
|
10192
|
-
_optionalChain([options, 'access',
|
|
10235
|
+
_optionalChain([options, 'access', _390 => _390.signal, 'optionalAccess', _391 => _391.throwIfAborted, 'call', _392 => _392()]);
|
|
10193
10236
|
}
|
|
10194
10237
|
if (mask) this.shapeCommand(mask, options);
|
|
10195
10238
|
return { segments: segments.filter((s) => s.bounds), method: "model" };
|
|
@@ -10222,7 +10265,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10222
10265
|
const view = this.state.maskView;
|
|
10223
10266
|
if (!view) return null;
|
|
10224
10267
|
const layer = this.getLayer(view.layerId);
|
|
10225
|
-
return _optionalChain([layer, 'optionalAccess',
|
|
10268
|
+
return _optionalChain([layer, 'optionalAccess', _393 => _393.mask]) && !layer.mask.source ? view : null;
|
|
10226
10269
|
}
|
|
10227
10270
|
/**
|
|
10228
10271
|
* Shows a layer's mask on the canvas: `gray` alone in grey (Alt-click the mask thumbnail),
|
|
@@ -10245,7 +10288,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10245
10288
|
if (!layer.mask) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask to show; add one with add_layer_mask.`);
|
|
10246
10289
|
if (layer.mask.source) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${layer.name || id}" has a depth mask, which is computed, not painted, so it has no mask view.`);
|
|
10247
10290
|
const cur = this.state.maskView;
|
|
10248
|
-
if (_optionalChain([cur, 'optionalAccess',
|
|
10291
|
+
if (_optionalChain([cur, 'optionalAccess', _394 => _394.layerId]) !== id || cur.mode !== mode) {
|
|
10249
10292
|
this.state.maskView = { layerId: id, mode };
|
|
10250
10293
|
this.notify();
|
|
10251
10294
|
}
|
|
@@ -10257,7 +10300,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10257
10300
|
return _nullishCoalesce(this.state.channels, () => ( []));
|
|
10258
10301
|
}
|
|
10259
10302
|
getChannel(id) {
|
|
10260
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
10303
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _395 => _395.state, 'access', _396 => _396.channels, 'optionalAccess', _397 => _397.find, 'call', _398 => _398((c) => c.id === id)]), () => ( null));
|
|
10261
10304
|
}
|
|
10262
10305
|
requireChannel(id) {
|
|
10263
10306
|
const channel = this.getChannel(id);
|
|
@@ -10286,14 +10329,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
10286
10329
|
*/
|
|
10287
10330
|
saveSelection(options = {}) {
|
|
10288
10331
|
const sel = this.state.selection;
|
|
10289
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10332
|
+
if (!_optionalChain([sel, 'optionalAccess', _399 => _399.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, then save the selection to a channel.");
|
|
10290
10333
|
const { width, height } = this.naturalSize;
|
|
10291
10334
|
const sized = sel.width === width && sel.height === height ? sel : _chunkSS53NNZOcjs.resizeSelection.call(void 0, sel, width, height);
|
|
10292
10335
|
const channels = [...this.getChannels()];
|
|
10293
10336
|
if (options.channelId !== void 0) {
|
|
10294
10337
|
const existing = this.requireChannel(options.channelId);
|
|
10295
10338
|
const mask = _nullishCoalesce(_chunkSS53NNZOcjs.combineSelections.call(void 0, existing.mask.bounds ? existing.mask : null, sized, _nullishCoalesce(options.mode, () => ( "replace"))), () => ( _chunkSS53NNZOcjs.createSelectionMask.call(void 0, width, height)));
|
|
10296
|
-
const next = { ...existing, mask, ..._optionalChain([options, 'access',
|
|
10339
|
+
const next = { ...existing, mask, ..._optionalChain([options, 'access', _400 => _400.name, 'optionalAccess', _401 => _401.trim, 'call', _402 => _402()]) ? { name: options.name.trim() } : {} };
|
|
10297
10340
|
this.setChannels(channels.map((c) => c.id === existing.id ? next : c));
|
|
10298
10341
|
return next;
|
|
10299
10342
|
}
|
|
@@ -10304,7 +10347,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10304
10347
|
const channels = this.getChannels();
|
|
10305
10348
|
const channel = {
|
|
10306
10349
|
id: this.newChannelId(),
|
|
10307
|
-
name: _optionalChain([name, 'optionalAccess',
|
|
10350
|
+
name: _optionalChain([name, 'optionalAccess', _403 => _403.trim, 'call', _404 => _404()]) || `Alpha ${channels.length + 1}`,
|
|
10308
10351
|
mask,
|
|
10309
10352
|
color: DEFAULT_CHANNEL_COLOR,
|
|
10310
10353
|
opacity: 0.5,
|
|
@@ -10349,7 +10392,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10349
10392
|
/** Duplicates an alpha channel just after it (one undo step). Returns the copy. */
|
|
10350
10393
|
duplicateChannel(id, name) {
|
|
10351
10394
|
const channel = this.requireChannel(id);
|
|
10352
|
-
const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess',
|
|
10395
|
+
const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess', _405 => _405.trim, 'call', _406 => _406()]) || `${channel.name} copy` };
|
|
10353
10396
|
const channels = [...this.getChannels()];
|
|
10354
10397
|
channels.splice(channels.findIndex((c) => c.id === id) + 1, 0, copy);
|
|
10355
10398
|
this.setChannels(channels);
|
|
@@ -10380,7 +10423,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10380
10423
|
quickMaskSurface() {
|
|
10381
10424
|
const { width, height } = this.naturalSize;
|
|
10382
10425
|
const sel = this.state.selection;
|
|
10383
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10426
|
+
if (!_optionalChain([sel, 'optionalAccess', _407 => _407.bounds])) return _chunk474IQG74cjs.emptySurface.call(void 0, 1, 0);
|
|
10384
10427
|
return (sel.width === width && sel.height === height ? sel : _chunkSS53NNZOcjs.resizeSelection.call(void 0, sel, width, height)).surface;
|
|
10385
10428
|
}
|
|
10386
10429
|
/** The selection a painted Quick Mask surface stands for (it shares the surface's tiles). */
|
|
@@ -10401,7 +10444,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10401
10444
|
*/
|
|
10402
10445
|
applySelectionAsLayerMask(layerId, props = {}) {
|
|
10403
10446
|
const sel = this.state.selection;
|
|
10404
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10447
|
+
if (!_optionalChain([sel, 'optionalAccess', _408 => _408.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
|
|
10405
10448
|
return this.setLayerMask(layerId, this.maskFromSelection(sel, props));
|
|
10406
10449
|
}
|
|
10407
10450
|
setLayerMask(layerId, mask, commitToHistory = true) {
|
|
@@ -10450,7 +10493,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10450
10493
|
let layer;
|
|
10451
10494
|
if (target === "selection") {
|
|
10452
10495
|
mask = this.getSelection();
|
|
10453
|
-
if (!_optionalChain([mask, 'optionalAccess',
|
|
10496
|
+
if (!_optionalChain([mask, 'optionalAccess', _409 => _409.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected: make a selection first, or inspect a layer-mask or vector-mask with layerId.");
|
|
10454
10497
|
} else if (target === "layer-mask" || target === "vector-mask") {
|
|
10455
10498
|
if (!options.layerId) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`A ${target} needs layerId (see list_layers).`);
|
|
10456
10499
|
layer = this.getLayer(options.layerId);
|
|
@@ -10471,7 +10514,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10471
10514
|
const x = Math.max(0, b.x - 8);
|
|
10472
10515
|
const y = Math.max(0, b.y - 8);
|
|
10473
10516
|
const region = { x, y, width: Math.min(width, b.x + b.width + 8) - x, height: Math.min(height, b.y + b.height + 8) - y };
|
|
10474
|
-
const own = _optionalChain([layer, 'optionalAccess',
|
|
10517
|
+
const own = _optionalChain([layer, 'optionalAccess', _410 => _410.type]) === "pixel" ? this.getLayerPixels(layer.id) : null;
|
|
10475
10518
|
const image = _nullishCoalesce(own, () => ( { ...this.compositePixels(region), x: region.x, y: region.y }));
|
|
10476
10519
|
const report = inspectMaskEdge(mask, image, options);
|
|
10477
10520
|
return { target, ...layer ? { layerId: layer.id } : {}, ...report };
|
|
@@ -10482,10 +10525,10 @@ var ImageEditorController = (_class12 = class {
|
|
|
10482
10525
|
const { width, height } = this.naturalSize;
|
|
10483
10526
|
if (!Array.isArray(regions2) || !regions2.length) throw new Error("regions must be a non-empty list of { x, y, width, height } (e.g. the uncertainRegions bounds); leave it out to refine everywhere.");
|
|
10484
10527
|
return regions2.map((r, i) => {
|
|
10485
|
-
const x = Math.max(0, Math.floor(_optionalChain([r, 'optionalAccess',
|
|
10486
|
-
const y = Math.max(0, Math.floor(_optionalChain([r, 'optionalAccess',
|
|
10487
|
-
const x1 = Math.min(width, Math.ceil(_optionalChain([r, 'optionalAccess',
|
|
10488
|
-
const y1 = Math.min(height, Math.ceil(_optionalChain([r, 'optionalAccess',
|
|
10528
|
+
const x = Math.max(0, Math.floor(_optionalChain([r, 'optionalAccess', _411 => _411.x])));
|
|
10529
|
+
const y = Math.max(0, Math.floor(_optionalChain([r, 'optionalAccess', _412 => _412.y])));
|
|
10530
|
+
const x1 = Math.min(width, Math.ceil(_optionalChain([r, 'optionalAccess', _413 => _413.x]) + _optionalChain([r, 'optionalAccess', _414 => _414.width])));
|
|
10531
|
+
const y1 = Math.min(height, Math.ceil(_optionalChain([r, 'optionalAccess', _415 => _415.y]) + _optionalChain([r, 'optionalAccess', _416 => _416.height])));
|
|
10489
10532
|
if (![x, y, x1, y1].every(Number.isFinite) || x1 <= x || y1 <= y) throw new Error(`regions[${i}] must overlap the image (0..${width} \xD7 0..${height}), got ${JSON.stringify(r)}.`);
|
|
10490
10533
|
return { x, y, width: x1 - x, height: y1 - y };
|
|
10491
10534
|
});
|
|
@@ -10499,7 +10542,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10499
10542
|
selectionUncertainty(options = {}) {
|
|
10500
10543
|
const { width, height } = this.naturalSize;
|
|
10501
10544
|
const sel = this.getSelection();
|
|
10502
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10545
|
+
if (!_optionalChain([sel, 'optionalAccess', _417 => _417.bounds])) return selectionUncertainty(_chunkSS53NNZOcjs.createSelectionMask.call(void 0, width, height), { x: 0, y: 0, width: 0, height: 0, data: new Uint8ClampedArray(0) }, options);
|
|
10503
10546
|
const b = sel.bounds;
|
|
10504
10547
|
const m = Math.max(8, Math.ceil(_nullishCoalesce(options.band, () => ( Math.max(2, Math.min(width, height) / 200)))) + 4);
|
|
10505
10548
|
const x = Math.max(0, b.x - m);
|
|
@@ -10513,7 +10556,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10513
10556
|
*/
|
|
10514
10557
|
selectionFrom(source) {
|
|
10515
10558
|
const { width, height } = this.naturalSize;
|
|
10516
|
-
switch (_optionalChain([source, 'optionalAccess',
|
|
10559
|
+
switch (_optionalChain([source, 'optionalAccess', _418 => _418.kind])) {
|
|
10517
10560
|
case "selection":
|
|
10518
10561
|
return this.getSelection();
|
|
10519
10562
|
case "history": {
|
|
@@ -10569,7 +10612,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10569
10612
|
/** A layer's painted mask over the canvas as a selection mask; null without one (or for a depth mask). */
|
|
10570
10613
|
layerMaskCoverage(layerId) {
|
|
10571
10614
|
const layer = this.getLayer(layerId);
|
|
10572
|
-
if (!_optionalChain([layer, 'optionalAccess',
|
|
10615
|
+
if (!_optionalChain([layer, 'optionalAccess', _419 => _419.mask]) || layer.mask.source) return null;
|
|
10573
10616
|
const { width, height } = this.naturalSize;
|
|
10574
10617
|
const ox = layer.type === "pixel" ? layer.offset.x : 0;
|
|
10575
10618
|
const oy = layer.type === "pixel" ? layer.offset.y : 0;
|
|
@@ -10604,7 +10647,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10604
10647
|
this.state.layers = _chunkB46UQUDCcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
|
|
10605
10648
|
const next = { ...l };
|
|
10606
10649
|
if (_chunkS55JFWDAcjs.isDefaultDepthMask.call(void 0, merged)) {
|
|
10607
|
-
if (_optionalChain([next, 'access',
|
|
10650
|
+
if (_optionalChain([next, 'access', _420 => _420.mask, 'optionalAccess', _421 => _421.source])) delete next.mask;
|
|
10608
10651
|
} else next.mask = _chunkS55JFWDAcjs.depthRasterMask.call(void 0, merged);
|
|
10609
10652
|
return next;
|
|
10610
10653
|
});
|
|
@@ -10614,7 +10657,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10614
10657
|
resetDepthMask() {
|
|
10615
10658
|
this.recordHistory();
|
|
10616
10659
|
const target = this.developLayer();
|
|
10617
|
-
if (_optionalChain([target, 'optionalAccess',
|
|
10660
|
+
if (_optionalChain([target, 'optionalAccess', _422 => _422.mask, 'optionalAccess', _423 => _423.source])) {
|
|
10618
10661
|
this.state.layers = _chunkB46UQUDCcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
|
|
10619
10662
|
const next = { ...l };
|
|
10620
10663
|
delete next.mask;
|
|
@@ -10626,7 +10669,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10626
10669
|
// --- Annotations & Layers ---
|
|
10627
10670
|
/** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
|
|
10628
10671
|
annotationLayer(id) {
|
|
10629
|
-
return _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkS55JFWDAcjs.annotationOfLayer.call(void 0, l), 'optionalAccess',
|
|
10672
|
+
return _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkS55JFWDAcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _424 => _424.id]) === id);
|
|
10630
10673
|
}
|
|
10631
10674
|
/** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
|
|
10632
10675
|
annotationEnv() {
|
|
@@ -10644,7 +10687,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10644
10687
|
const fullAnnotation = { ...annotation, id };
|
|
10645
10688
|
const layer = _chunkS55JFWDAcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
|
|
10646
10689
|
const loc = placement.aboveId ? _chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
|
|
10647
|
-
this.state.layers = loc ? _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
10690
|
+
this.state.layers = loc ? _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _425 => _425.parent, 'optionalAccess', _426 => _426.id]), () => ( null)), loc.index + 1) : _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, layer, null);
|
|
10648
10691
|
this.state.selectedAnnotationId = id;
|
|
10649
10692
|
this.notify();
|
|
10650
10693
|
return id;
|
|
@@ -10767,7 +10810,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10767
10810
|
await this.renderer.renderToCanvas(targetCanvas, source, this.state, {
|
|
10768
10811
|
...options,
|
|
10769
10812
|
// The clone source follows the brush cursor (both editors pass it).
|
|
10770
|
-
cloneSourceMarker: _optionalChain([options, 'optionalAccess',
|
|
10813
|
+
cloneSourceMarker: _optionalChain([options, 'optionalAccess', _427 => _427.cloneSourceMarker]) !== void 0 ? options.cloneSourceMarker : _optionalChain([options, 'optionalAccess', _428 => _428.brushCursor]) ? this.cloneSourceMarker(options.brushCursor) : null,
|
|
10771
10814
|
dirty: dirty === "all" ? void 0 : dirty,
|
|
10772
10815
|
checkpointLayerId: this.state.activeLayerId
|
|
10773
10816
|
});
|
|
@@ -10780,7 +10823,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10780
10823
|
return this.renderer.createCanvas(1, 1);
|
|
10781
10824
|
}
|
|
10782
10825
|
this.syncViews();
|
|
10783
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
10826
|
+
if (_optionalChain([options, 'optionalAccess', _429 => _429.layerIds])) {
|
|
10784
10827
|
const keep = new Set(options.layerIds);
|
|
10785
10828
|
const layers = _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => keep.has(l.id));
|
|
10786
10829
|
return this.renderer.renderExport(source, { ...this.state, layers }, options);
|
|
@@ -10934,7 +10977,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10934
10977
|
let px2 = await this.decodeImage(newDataUrl);
|
|
10935
10978
|
if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
|
|
10936
10979
|
const data = new Uint8ClampedArray(px2.data);
|
|
10937
|
-
const sel = _optionalChain([this, 'access',
|
|
10980
|
+
const sel = _optionalChain([this, 'access', _430 => _430.state, 'access', _431 => _431.selection, 'optionalAccess', _432 => _432.bounds]) ? this.state.selection : null;
|
|
10938
10981
|
if (sel) for (let p = 0, i = 3; p < width * height; p++, i += 4) data[i] = Math.round(data[i] * sel.data[p] / 255);
|
|
10939
10982
|
return this.addPixelLayer({ name: "Inpaint", pixels: { width, height, data } });
|
|
10940
10983
|
}
|
|
@@ -10981,7 +11024,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10981
11024
|
}
|
|
10982
11025
|
/** Font families the shaper offers (generic families at least). */
|
|
10983
11026
|
listFonts() {
|
|
10984
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
11027
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _433 => _433.getTextShaper, 'call', _434 => _434(), 'optionalAccess', _435 => _435.families, 'optionalCall', _436 => _436()]), () => ( ["sans-serif", "serif", "monospace"]));
|
|
10985
11028
|
}
|
|
10986
11029
|
typeInfo(id) {
|
|
10987
11030
|
const layer = _chunkS55JFWDAcjs.requireTypeLayer.call(void 0, this.state.layers, id);
|
|
@@ -11055,8 +11098,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
11055
11098
|
const layer = this.layoutTypeLayer({ ...init, text, orientation: vertical ? "vertical" : "horizontal" });
|
|
11056
11099
|
const { width, height } = this.naturalSize;
|
|
11057
11100
|
const b = _chunk474IQG74cjs.contentBounds.call(void 0, layer.surface);
|
|
11058
|
-
const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess',
|
|
11059
|
-
const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess',
|
|
11101
|
+
const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _437 => _437.x]), () => ( 0)));
|
|
11102
|
+
const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _438 => _438.y]), () => ( 0)));
|
|
11060
11103
|
const x1 = Math.min(width, b ? b.x + b.width : 0);
|
|
11061
11104
|
const y1 = Math.min(height, b ? b.y + b.height : 0);
|
|
11062
11105
|
let mask;
|
|
@@ -11233,7 +11276,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11233
11276
|
if (colors.size > 1) warnings.push("The text had several colours; the shape takes the first one.");
|
|
11234
11277
|
const missing = _chunkQAUIZPYIcjs.layoutText.call(void 0, layer, shaper).missingFonts;
|
|
11235
11278
|
if (missing.length) warnings.push(`Missing fonts were drawn with a fallback: ${missing.join(", ")}.`);
|
|
11236
|
-
const first = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
11279
|
+
const first = _nullishCoalesce(_optionalChain([layer, 'access', _439 => _439.runs, 'access', _440 => _440.find, 'call', _441 => _441((r) => r.length > 0), 'optionalAccess', _442 => _442.style]), () => ( _chunkQAUIZPYIcjs.DEFAULT_TEXT_STYLE));
|
|
11237
11280
|
const fill = first.opacity !== void 0 && first.opacity !== 1 ? { type: "color", color: first.color, opacity: first.opacity } : { type: "color", color: first.color };
|
|
11238
11281
|
const shape = _chunkS55JFWDAcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
|
|
11239
11282
|
const keep = { visible: layer.visible, opacity: layer.opacity, blend: layer.blend };
|
|
@@ -11266,7 +11309,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11266
11309
|
// --- Shape layers ---
|
|
11267
11310
|
/** What shape rendering needs: the canvas size and the document's patterns. */
|
|
11268
11311
|
shapeEnv() {
|
|
11269
|
-
return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
11312
|
+
return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _443 => _443.state, 'access', _444 => _444.patterns, 'optionalAccess', _445 => _445.find, 'call', _446 => _446((p) => p.id === id)]), () => ( null)) };
|
|
11270
11313
|
}
|
|
11271
11314
|
/** One component from tool or UI input (validated). */
|
|
11272
11315
|
componentFrom(spec, path) {
|
|
@@ -11309,9 +11352,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
11309
11352
|
* open path) and stroked with `stroke`. Goes above the active layer unless placed. Returns its id.
|
|
11310
11353
|
*/
|
|
11311
11354
|
addShapeLayer(init) {
|
|
11312
|
-
const specs = _optionalChain([init, 'access',
|
|
11313
|
-
if (_optionalChain([init, 'access',
|
|
11314
|
-
const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access',
|
|
11355
|
+
const specs = _optionalChain([init, 'access', _447 => _447.components, 'optionalAccess', _448 => _448.length]) ? init.components : [init];
|
|
11356
|
+
if (_optionalChain([init, 'access', _449 => _449.components, 'optionalAccess', _450 => _450.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
|
|
11357
|
+
const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _451 => _451.components, 'optionalAccess', _452 => _452.length]) ? `components[${i}].` : ""));
|
|
11315
11358
|
const stroke = init.stroke ? _chunkS55JFWDAcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
|
|
11316
11359
|
const openOnly = components.every((c) => !c.live && c.subpaths.every((sp) => !sp.closed));
|
|
11317
11360
|
const fill = init.fill === void 0 ? stroke && openOnly ? null : _chunkS55JFWDAcjs.normalizeShapePaint.call(void 0, this.state.paint.foreground, "fill") : init.fill === null ? null : _chunkS55JFWDAcjs.normalizeShapePaint.call(void 0, init.fill, "fill");
|
|
@@ -11422,7 +11465,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11422
11465
|
if (layer.locks) next.locks = layer.locks;
|
|
11423
11466
|
if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
|
|
11424
11467
|
} else if (layer.type === "pixel") {
|
|
11425
|
-
if (!_optionalChain([layer, 'access',
|
|
11468
|
+
if (!_optionalChain([layer, 'access', _453 => _453.filters, 'optionalAccess', _454 => _454.length])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
|
|
11426
11469
|
_chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
|
|
11427
11470
|
const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
|
|
11428
11471
|
const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
|
|
@@ -11441,7 +11484,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11441
11484
|
return this.rasterizeSmartObject(id);
|
|
11442
11485
|
} else if (layer.type === "shape" || layer.type === "type") {
|
|
11443
11486
|
next = layer.type === "shape" ? _chunkS55JFWDAcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkS55JFWDAcjs.typeAsPixelLayer.call(void 0, layer);
|
|
11444
|
-
if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access',
|
|
11487
|
+
if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _455 => _455.annotation, 'optionalAccess', _456 => _456.id])) this.state.selectedAnnotationId = null;
|
|
11445
11488
|
} else {
|
|
11446
11489
|
throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Only shape, type and annotation layers, smart objects and pixel layers with filters rasterize; "${layer.name || id}" is a ${layer.type} layer. Merge it down or flatten instead.`);
|
|
11447
11490
|
}
|
|
@@ -11455,8 +11498,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
11455
11498
|
const doc = this.state.colorProfile;
|
|
11456
11499
|
const p = resolveProfile(doc);
|
|
11457
11500
|
const m = this.state.colorMode;
|
|
11458
|
-
const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess',
|
|
11459
|
-
if (_optionalChain([m, 'optionalAccess',
|
|
11501
|
+
const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _457 => _457.name]), () => ( p.description)), builtin: doc ? _nullishCoalesce(doc.builtin, () => ( null)) : "srgb", colorSpace: p.colorSpace, srgb: isSrgb(doc), mode: _nullishCoalesce(_optionalChain([m, 'optionalAccess', _458 => _458.mode]), () => ( "rgb")) };
|
|
11502
|
+
if (_optionalChain([m, 'optionalAccess', _459 => _459.mode]) === "cmyk") out.cmykProfile = { name: m.profile.name, builtin: _nullishCoalesce(m.profile.builtin, () => ( null)), intent: m.intent };
|
|
11460
11503
|
return out;
|
|
11461
11504
|
}
|
|
11462
11505
|
/**
|
|
@@ -11546,7 +11589,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11546
11589
|
const textEnv = this.textEnv();
|
|
11547
11590
|
const walk = (layers) => layers.map((l) => {
|
|
11548
11591
|
let next2 = l;
|
|
11549
|
-
if (_optionalChain([l, 'access',
|
|
11592
|
+
if (_optionalChain([l, 'access', _460 => _460.effects, 'optionalAccess', _461 => _461.items, 'access', _462 => _462.length])) next2 = { ...next2, effects: convertColorFields(l.effects, hex) };
|
|
11550
11593
|
if (l.type === "group") {
|
|
11551
11594
|
if (next2 !== l) converted.push(l.id);
|
|
11552
11595
|
return { ...next2, children: walk(l.children) };
|
|
@@ -11734,8 +11777,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
11734
11777
|
else delete s.bitDepth;
|
|
11735
11778
|
delete s.colorProfile;
|
|
11736
11779
|
delete s.colorMode;
|
|
11737
|
-
if (_optionalChain([result, 'access',
|
|
11738
|
-
else if (_optionalChain([result, 'access',
|
|
11780
|
+
if (_optionalChain([result, 'access', _463 => _463.sourceMode, 'optionalAccess', _464 => _464.mode]) === "cmyk") s.colorMode = { mode: "cmyk", profile: result.sourceMode.profile, intent: "relative" };
|
|
11781
|
+
else if (_optionalChain([result, 'access', _465 => _465.sourceMode, 'optionalAccess', _466 => _466.mode]) === "lab") s.colorMode = { mode: "lab" };
|
|
11739
11782
|
else if (result.iccProfile) {
|
|
11740
11783
|
try {
|
|
11741
11784
|
const doc = documentProfile(result.iccProfile);
|
|
@@ -11799,7 +11842,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11799
11842
|
const compositor = new (0, _chunkS55JFWDAcjs.LayerCompositor)();
|
|
11800
11843
|
const bakeMask = (layer) => {
|
|
11801
11844
|
const mask = layer.mask;
|
|
11802
|
-
if (!_optionalChain([mask, 'optionalAccess',
|
|
11845
|
+
if (!_optionalChain([mask, 'optionalAccess', _467 => _467.source])) return mask;
|
|
11803
11846
|
add2("Parametric (depth) masks were baked into pixel masks", layer.name);
|
|
11804
11847
|
const plain3 = { ...layer, mask: { ...mask, density: 1, feather: 0, enabled: true } };
|
|
11805
11848
|
const ox = layer.type === "pixel" ? layer.offset.x : 0;
|
|
@@ -11815,10 +11858,10 @@ var ImageEditorController = (_class12 = class {
|
|
|
11815
11858
|
return baked;
|
|
11816
11859
|
};
|
|
11817
11860
|
const prepare = async (layer) => {
|
|
11818
|
-
if (_optionalChain([layer, 'access',
|
|
11861
|
+
if (_optionalChain([layer, 'access', _468 => _468.edge, 'optionalAccess', _469 => _469.ambient])) add2("The live edge cast (set_edge_ambient) has no PSD equivalent and was left out", layer.name);
|
|
11819
11862
|
const p = await prepareLayer(layer);
|
|
11820
|
-
if (_optionalChain([p, 'optionalAccess',
|
|
11821
|
-
if (_optionalChain([p, 'optionalAccess',
|
|
11863
|
+
if (_optionalChain([p, 'optionalAccess', _470 => _470.edge])) delete p.edge;
|
|
11864
|
+
if (_optionalChain([p, 'optionalAccess', _471 => _471.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
|
|
11822
11865
|
return p;
|
|
11823
11866
|
};
|
|
11824
11867
|
const prepareLayer = async (layer) => {
|
|
@@ -11861,7 +11904,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11861
11904
|
return out2;
|
|
11862
11905
|
}
|
|
11863
11906
|
if (layer.type === "shape" || layer.type === "type") {
|
|
11864
|
-
if (layer.type === "type" && _optionalChain([layer, 'access',
|
|
11907
|
+
if (layer.type === "type" && _optionalChain([layer, 'access', _472 => _472.missingFonts, 'optionalAccess', _473 => _473.length])) add2(`Type layers drawn with a fallback for missing fonts (${layer.missingFonts.join(", ")}) keep the font names, so Photoshop may draw them differently`, layer.name);
|
|
11865
11908
|
const out2 = { ...layer };
|
|
11866
11909
|
const mask2 = bakeMask(layer);
|
|
11867
11910
|
if (mask2) out2.mask = mask2;
|
|
@@ -11880,7 +11923,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11880
11923
|
out.surface = this.surfaceOf(layer);
|
|
11881
11924
|
delete out.source;
|
|
11882
11925
|
}
|
|
11883
|
-
const active = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
11926
|
+
const active = _nullishCoalesce(_optionalChain([layer, 'access', _474 => _474.filters, 'optionalAccess', _475 => _475.filter, 'call', _476 => _476(_chunkS55JFWDAcjs.isActiveFilter)]), () => ( []));
|
|
11884
11927
|
if (active.length) {
|
|
11885
11928
|
add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
|
|
11886
11929
|
const content = { ...out, visible: true, opacity: 1, blend: "normal" };
|
|
@@ -11891,7 +11934,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11891
11934
|
const data = compositor.composite([content], canvas, sources);
|
|
11892
11935
|
out = { ...out, surface: _chunk474IQG74cjs.surfaceFromPixels.call(void 0, { width, height, data }, 4, -layer.offset.x, -layer.offset.y) };
|
|
11893
11936
|
}
|
|
11894
|
-
if (_optionalChain([layer, 'access',
|
|
11937
|
+
if (_optionalChain([layer, 'access', _477 => _477.filters, 'optionalAccess', _478 => _478.some, 'call', _479 => _479((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
|
|
11895
11938
|
delete out.filters;
|
|
11896
11939
|
const unmixMask = _chunkS55JFWDAcjs.hasEdgeUnmix.call(void 0, layer.edge) ? _chunkS55JFWDAcjs.effectiveLayerMask.call(void 0, layer, width, height) : void 0;
|
|
11897
11940
|
if (unmixMask && !unmixMask.source && unmixMask.enabled !== false) {
|
|
@@ -11963,7 +12006,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11963
12006
|
);
|
|
11964
12007
|
}
|
|
11965
12008
|
layers = resizeLegacyMasks(layers, prev, next.dimensions);
|
|
11966
|
-
const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
12009
|
+
const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access', _480 => _480.state, 'access', _481 => _481.patterns, 'optionalAccess', _482 => _482.find, 'call', _483 => _483((p) => p.id === pid)]), () => ( null)) };
|
|
11967
12010
|
for (const l of _chunkB46UQUDCcjs.flattenLayers.call(void 0, layers)) {
|
|
11968
12011
|
if (l.type === "annotation") {
|
|
11969
12012
|
layers = _chunkB46UQUDCcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, annotation: scaleAnnotation(l.annotation, sx, sy) }));
|
|
@@ -11972,7 +12015,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11972
12015
|
const scaled = a ? scaleAnnotation(a, sx, sy) : null;
|
|
11973
12016
|
const fromAnnotation = scaled ? _chunkS55JFWDAcjs.shapeFromAnnotation.call(void 0, scaled) : null;
|
|
11974
12017
|
const m = [sx, 0, 0, sy, 0, 0];
|
|
11975
|
-
const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess',
|
|
12018
|
+
const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _484 => _484.components]), () => ( _chunkS55JFWDAcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
|
|
11976
12019
|
const moved = { ...l, components, ...fromAnnotation ? { fill: fromAnnotation.fill, stroke: fromAnnotation.stroke } : {} };
|
|
11977
12020
|
if (scaled && fromAnnotation) moved.annotation = scaled;
|
|
11978
12021
|
else delete moved.annotation;
|
|
@@ -11990,7 +12033,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11990
12033
|
this.notify();
|
|
11991
12034
|
}
|
|
11992
12035
|
toJSON(options) {
|
|
11993
|
-
const root = _optionalChain([this, 'access',
|
|
12036
|
+
const root = _optionalChain([this, 'access', _485 => _485.contentsStack, 'access', _486 => _486[0], 'optionalAccess', _487 => _487.saved]);
|
|
11994
12037
|
const current = this.state;
|
|
11995
12038
|
const element = this.imageElement;
|
|
11996
12039
|
if (root) {
|
|
@@ -12001,9 +12044,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
12001
12044
|
let out;
|
|
12002
12045
|
try {
|
|
12003
12046
|
out = this.serializeState();
|
|
12004
|
-
if (_optionalChain([this, 'access',
|
|
12005
|
-
if (_optionalChain([this, 'access',
|
|
12006
|
-
if (_optionalChain([this, 'access',
|
|
12047
|
+
if (_optionalChain([this, 'access', _488 => _488.state, 'access', _489 => _489.selection, 'optionalAccess', _490 => _490.bounds])) out.selection = _chunkSS53NNZOcjs.serializeSelection.call(void 0, this.state.selection);
|
|
12048
|
+
if (_optionalChain([this, 'access', _491 => _491.state, 'access', _492 => _492.channels, 'optionalAccess', _493 => _493.length])) out.channels = serializeChannels(this.state.channels);
|
|
12049
|
+
if (_optionalChain([this, 'access', _494 => _494.state, 'access', _495 => _495.paths, 'optionalAccess', _496 => _496.length])) out.paths = serializePaths(this.state.paths);
|
|
12007
12050
|
} finally {
|
|
12008
12051
|
if (root) {
|
|
12009
12052
|
this.state = current;
|
|
@@ -12121,10 +12164,10 @@ var ImageEditorController = (_class12 = class {
|
|
|
12121
12164
|
serializeState() {
|
|
12122
12165
|
const { width, height } = this.naturalSize;
|
|
12123
12166
|
const view = _chunkS55JFWDAcjs.legacyView.call(void 0, this.stack(), width, height, null);
|
|
12124
|
-
if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access',
|
|
12167
|
+
if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _497 => _497.state, 'access', _498 => _498.patterns, 'optionalAccess', _499 => _499.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
|
|
12125
12168
|
return {
|
|
12126
12169
|
// States without adjustment layers keep schema 1, so they round-trip unchanged.
|
|
12127
|
-
version: _optionalChain([view, 'access',
|
|
12170
|
+
version: _optionalChain([view, 'access', _500 => _500.adjustments, 'access', _501 => _501.layers, 'optionalAccess', _502 => _502.length]) ? 2 : 1,
|
|
12128
12171
|
crop: this.state.crop ? { ...this.state.crop } : null,
|
|
12129
12172
|
transform: { ...this.state.transform },
|
|
12130
12173
|
adjustments: serializeAdjustments(view.adjustments),
|
|
@@ -12149,7 +12192,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
12149
12192
|
};
|
|
12150
12193
|
if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
|
|
12151
12194
|
if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
|
|
12152
|
-
if (_optionalChain([this, 'access',
|
|
12195
|
+
if (_optionalChain([this, 'access', _503 => _503.state, 'access', _504 => _504.patterns, 'optionalAccess', _505 => _505.length])) out.patterns = _chunkS55JFWDAcjs.serializePatterns.call(void 0, this.state.patterns);
|
|
12153
12196
|
if (smartContents) out.smartContents = smartContents;
|
|
12154
12197
|
if (this.state.bitDepth === 16 || this.state.bitDepth === 32) out.bitDepth = this.state.bitDepth;
|
|
12155
12198
|
if (this.state.colorProfile) out.colorProfile = serializeColorProfile(this.state.colorProfile);
|
|
@@ -12159,7 +12202,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
12159
12202
|
}, _class12);
|
|
12160
12203
|
function serializeAdjustments(adjustments) {
|
|
12161
12204
|
const out = { ...adjustments };
|
|
12162
|
-
if (_optionalChain([out, 'access',
|
|
12205
|
+
if (_optionalChain([out, 'access', _506 => _506.layers, 'optionalAccess', _507 => _507.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
|
|
12163
12206
|
else delete out.layers;
|
|
12164
12207
|
if (_chunkS55JFWDAcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkS55JFWDAcjs.LEGACY_PROCESS_VERSION) {
|
|
12165
12208
|
delete out.process;
|
|
@@ -12195,11 +12238,11 @@ function withDevelop(layer, partial) {
|
|
|
12195
12238
|
return { ...layer, filters };
|
|
12196
12239
|
}
|
|
12197
12240
|
function withBlur(layer, radius) {
|
|
12198
|
-
const existing = _optionalChain([layer, 'access',
|
|
12241
|
+
const existing = _optionalChain([layer, 'access', _508 => _508.filters, 'optionalAccess', _509 => _509.find, 'call', _510 => _510((f) => f.kind === "blur")]);
|
|
12199
12242
|
const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
|
|
12200
12243
|
if (radius > 0) {
|
|
12201
12244
|
filters.push({
|
|
12202
|
-
id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess',
|
|
12245
|
+
id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _511 => _511.id]), () => ( (layer.source === "document" ? _chunkS55JFWDAcjs.BLUR_FILTER_ID : _chunkS55JFWDAcjs.newLayerId.call(void 0, "flt")))),
|
|
12203
12246
|
kind: "blur",
|
|
12204
12247
|
enabled: true,
|
|
12205
12248
|
radius
|
|
@@ -12295,7 +12338,7 @@ function collectStateTiles(layers, into) {
|
|
|
12295
12338
|
if (l.type === "shape" || l.type === "type") _chunk474IQG74cjs.collectTiles.call(void 0, l.surface, into);
|
|
12296
12339
|
if (l.type === "smart") {
|
|
12297
12340
|
_chunk474IQG74cjs.collectTiles.call(void 0, l.surface, into);
|
|
12298
|
-
if (_optionalChain([l, 'access',
|
|
12341
|
+
if (_optionalChain([l, 'access', _512 => _512.smartFilters, 'optionalAccess', _513 => _513.mask])) _chunk474IQG74cjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
|
|
12299
12342
|
if (l.contents.raster) _chunk474IQG74cjs.collectTiles.call(void 0, l.contents.raster, into);
|
|
12300
12343
|
if (l.contents.document) collectStateTiles(l.contents.document.layers, into);
|
|
12301
12344
|
}
|
|
@@ -12327,7 +12370,7 @@ function pixelsOnly(layers) {
|
|
|
12327
12370
|
for (const l of layers) {
|
|
12328
12371
|
if (l.type === "adjustment") continue;
|
|
12329
12372
|
if (l.type === "group") out.push({ ...l, children: pixelsOnly(l.children) });
|
|
12330
|
-
else if (l.type === "pixel" && _optionalChain([l, 'access',
|
|
12373
|
+
else if (l.type === "pixel" && _optionalChain([l, 'access', _514 => _514.filters, 'optionalAccess', _515 => _515.length])) {
|
|
12331
12374
|
const p = { ...l };
|
|
12332
12375
|
delete p.filters;
|
|
12333
12376
|
out.push(p);
|
|
@@ -12393,7 +12436,7 @@ function toHex(c) {
|
|
|
12393
12436
|
return "#" + [c[0], c[1], c[2]].map((v) => Math.round(v).toString(16).padStart(2, "0")).join("");
|
|
12394
12437
|
}
|
|
12395
12438
|
function normalizeSelection(mask) {
|
|
12396
|
-
return _optionalChain([mask, 'optionalAccess',
|
|
12439
|
+
return _optionalChain([mask, 'optionalAccess', _516 => _516.bounds]) ? mask : null;
|
|
12397
12440
|
}
|
|
12398
12441
|
function sameSelection(a, b) {
|
|
12399
12442
|
if (a.width !== b.width || a.height !== b.height) return false;
|
|
@@ -12603,7 +12646,7 @@ function loadImageEditorDocument(input) {
|
|
|
12603
12646
|
}
|
|
12604
12647
|
const state = { version: 1, ...result.value };
|
|
12605
12648
|
if (isV2) {
|
|
12606
|
-
if (_optionalChain([state, 'access',
|
|
12649
|
+
if (_optionalChain([state, 'access', _517 => _517.adjustments, 'access', _518 => _518.layers, 'optionalAccess', _519 => _519.length])) state.version = 2;
|
|
12607
12650
|
result.report.version = 2;
|
|
12608
12651
|
}
|
|
12609
12652
|
if (state.selection === void 0) delete state.selection;
|
|
@@ -12811,7 +12854,7 @@ function findAdjustmentControl(id) {
|
|
|
12811
12854
|
}
|
|
12812
12855
|
function findLayerControl(kind, id) {
|
|
12813
12856
|
if (id === "opacity") return ADJUSTMENT_LAYER_OPACITY_CONTROL;
|
|
12814
|
-
return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access',
|
|
12857
|
+
return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _520 => _520[kind], 'optionalAccess', _521 => _521.find, 'call', _522 => _522((c) => c.id === id)]);
|
|
12815
12858
|
}
|
|
12816
12859
|
function clampControlValue(spec, v) {
|
|
12817
12860
|
if (typeof v !== "number" || !Number.isFinite(v)) return spec.default;
|
|
@@ -13288,7 +13331,7 @@ function summary(controller) {
|
|
|
13288
13331
|
const area = _chunkSS53NNZOcjs.selectionArea.call(void 0, sel);
|
|
13289
13332
|
return {
|
|
13290
13333
|
empty: !sel,
|
|
13291
|
-
bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
13334
|
+
bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _523 => _523.bounds]), () => ( null)),
|
|
13292
13335
|
/** Σ coverage in pixels. */
|
|
13293
13336
|
area: Math.round(area),
|
|
13294
13337
|
percent: Math.round(area / Math.max(1, width * height) * 1e4) / 100,
|
|
@@ -13443,7 +13486,7 @@ function createImageSelectionTools(controller) {
|
|
|
13443
13486
|
break;
|
|
13444
13487
|
}
|
|
13445
13488
|
case "polygon": {
|
|
13446
|
-
const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess',
|
|
13489
|
+
const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _524 => _524.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _525 => _525.y]), NaN) })) : [];
|
|
13447
13490
|
if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
|
|
13448
13491
|
throw new Error("polygon needs points: at least 3 { x, y } vertices.");
|
|
13449
13492
|
}
|
|
@@ -13578,7 +13621,7 @@ function createImageSelectionTools(controller) {
|
|
|
13578
13621
|
},
|
|
13579
13622
|
annotations: writeAnnotations("Refine the selection edge"),
|
|
13580
13623
|
handler: async (params) => {
|
|
13581
|
-
const edits = Array.isArray(params.edits) ? params.edits.map((e) => e.kind === "object" ? { ...e } : { ...e, points: (_nullishCoalesce(e.points, () => ( []))).map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess',
|
|
13624
|
+
const edits = Array.isArray(params.edits) ? params.edits.map((e) => e.kind === "object" ? { ...e } : { ...e, points: (_nullishCoalesce(e.points, () => ( []))).map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _526 => _526.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _527 => _527.y]), NaN) })) }) : [];
|
|
13582
13625
|
for (const e of edits) {
|
|
13583
13626
|
if (e.kind === "object") {
|
|
13584
13627
|
if (!e.rect === !e.point) throw new Error("An object edit takes rect (a box around the object) or point (on it).");
|
|
@@ -13743,7 +13786,7 @@ function createImageSelectionTools(controller) {
|
|
|
13743
13786
|
},
|
|
13744
13787
|
annotations: writeAnnotations("Select a polygon (lasso)", true),
|
|
13745
13788
|
handler: async (args) => {
|
|
13746
|
-
const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess',
|
|
13789
|
+
const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _528 => _528.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _529 => _529.y]), NaN) })) : [];
|
|
13747
13790
|
if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
|
|
13748
13791
|
throw new Error("points needs at least 3 { x, y } vertices in natural image pixels.");
|
|
13749
13792
|
}
|
|
@@ -13780,7 +13823,7 @@ function createImageSelectionTools(controller) {
|
|
|
13780
13823
|
},
|
|
13781
13824
|
annotations: writeAnnotations("Quick Selection"),
|
|
13782
13825
|
handler: async (args, context) => {
|
|
13783
|
-
const strokes = Array.isArray(args.strokes) ? args.strokes.map((s) => Array.isArray(s) ? s.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess',
|
|
13826
|
+
const strokes = Array.isArray(args.strokes) ? args.strokes.map((s) => Array.isArray(s) ? s.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _530 => _530.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _531 => _531.y]), NaN) })) : []) : [];
|
|
13784
13827
|
if (!strokes.length || strokes.some((s) => !s.length || !s.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y)))) {
|
|
13785
13828
|
throw new Error("strokes needs at least one stroke of { x, y } points in natural image pixels.");
|
|
13786
13829
|
}
|
|
@@ -13789,7 +13832,7 @@ function createImageSelectionTools(controller) {
|
|
|
13789
13832
|
mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, args.mode),
|
|
13790
13833
|
sampleAllLayers: args.sampleAllLayers,
|
|
13791
13834
|
enhanceEdge: args.enhanceEdge,
|
|
13792
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
13835
|
+
signal: _optionalChain([context, 'optionalAccess', _532 => _532.signal])
|
|
13793
13836
|
});
|
|
13794
13837
|
return { ...summary(controller), ...uncertainty(controller) };
|
|
13795
13838
|
}
|
|
@@ -13827,7 +13870,7 @@ function createImageSelectionTools(controller) {
|
|
|
13827
13870
|
sampleAllLayers: args.sampleAllLayers,
|
|
13828
13871
|
enhanceEdge: args.enhanceEdge,
|
|
13829
13872
|
useModel: args.useModel,
|
|
13830
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
13873
|
+
signal: _optionalChain([context, 'optionalAccess', _533 => _533.signal])
|
|
13831
13874
|
};
|
|
13832
13875
|
const { method } = rect2 ? await controller.selectObject({ rect: { x: num2(rect2.x, NaN), y: num2(rect2.y, NaN), width: num2(rect2.width, NaN), height: num2(rect2.height, NaN) } }, options) : await controller.selectObject({ point: { x: num2(point.x, NaN), y: num2(point.y, NaN) } }, options);
|
|
13833
13876
|
return { ...summary(controller), method, ...uncertainty(controller) };
|
|
@@ -13856,7 +13899,7 @@ function createImageSelectionTools(controller) {
|
|
|
13856
13899
|
softness: args.softness === void 0 ? void 0 : num2(args.softness, 4),
|
|
13857
13900
|
mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, args.mode),
|
|
13858
13901
|
sampleAllLayers: args.sampleAllLayers,
|
|
13859
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
13902
|
+
signal: _optionalChain([context, 'optionalAccess', _534 => _534.signal])
|
|
13860
13903
|
});
|
|
13861
13904
|
return { ...summary(controller), noiseLevel };
|
|
13862
13905
|
}
|
|
@@ -13884,7 +13927,7 @@ function createImageSelectionTools(controller) {
|
|
|
13884
13927
|
mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, args.mode),
|
|
13885
13928
|
sampleAllLayers: args.sampleAllLayers,
|
|
13886
13929
|
useModel: args.useModel,
|
|
13887
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
13930
|
+
signal: _optionalChain([context, 'optionalAccess', _535 => _535.signal])
|
|
13888
13931
|
});
|
|
13889
13932
|
return { ...summary(controller), method, ...note ? { note } : {}, ...uncertainty(controller) };
|
|
13890
13933
|
}
|
|
@@ -13982,7 +14025,7 @@ function createImageSelectionTools(controller) {
|
|
|
13982
14025
|
await controller.selectColorRangePreset(args.preset, { ...common, falloff: num2(args.fuzziness, 20) });
|
|
13983
14026
|
} else {
|
|
13984
14027
|
const samples = args.samples.map((s, i) => {
|
|
13985
|
-
if (typeof _optionalChain([s, 'optionalAccess',
|
|
14028
|
+
if (typeof _optionalChain([s, 'optionalAccess', _536 => _536.color]) !== "string" || !/^#?[0-9a-f]{6}$/i.test(s.color.trim())) throw new Error(`samples[${i}].color must be #rrggbb.`);
|
|
13986
14029
|
const at = typeof s.x === "number" && typeof s.y === "number" ? { x: s.x, y: s.y } : void 0;
|
|
13987
14030
|
return at ? { color: s.color, at } : { color: s.color };
|
|
13988
14031
|
});
|
|
@@ -14224,7 +14267,7 @@ function createImageSelectionTools(controller) {
|
|
|
14224
14267
|
annotations: writeAnnotations("Content-Aware Fill"),
|
|
14225
14268
|
handler: async (args, context) => {
|
|
14226
14269
|
if (!controller.getSelection()) throw new Error("Nothing is selected; select what to remove first.");
|
|
14227
|
-
const rects = (v) => Array.isArray(v) ? v.map((r) => ({ x: num2(_optionalChain([r, 'optionalAccess',
|
|
14270
|
+
const rects = (v) => Array.isArray(v) ? v.map((r) => ({ x: num2(_optionalChain([r, 'optionalAccess', _537 => _537.x]), NaN), y: num2(_optionalChain([r, 'optionalAccess', _538 => _538.y]), NaN), width: num2(_optionalChain([r, 'optionalAccess', _539 => _539.width]), NaN), height: num2(_optionalChain([r, 'optionalAccess', _540 => _540.height]), NaN) })) : void 0;
|
|
14228
14271
|
return controller.contentAwareFillAsync({
|
|
14229
14272
|
output: args.output,
|
|
14230
14273
|
sampleRadius: args.sampleRadius,
|
|
@@ -14233,7 +14276,7 @@ function createImageSelectionTools(controller) {
|
|
|
14233
14276
|
sampleRects: rects(args.sampleRects),
|
|
14234
14277
|
excludeRects: rects(args.excludeRects),
|
|
14235
14278
|
samplingChannelId: typeof args.samplingChannelId === "string" ? args.samplingChannelId : void 0,
|
|
14236
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
14279
|
+
signal: _optionalChain([context, 'optionalAccess', _541 => _541.signal])
|
|
14237
14280
|
});
|
|
14238
14281
|
}
|
|
14239
14282
|
};
|
|
@@ -14513,13 +14556,13 @@ function createImageSubjectSelectionTool(controller) {
|
|
|
14513
14556
|
handler: async ({ target, maxSegments, mode, feather, enhanceEdge }, context) => {
|
|
14514
14557
|
if (target !== void 0 && typeof target !== "string") throw new Error("target must be a description in words.");
|
|
14515
14558
|
if (controller.segmentationProvider && !String(_nullishCoalesce(target, () => ( ""))).trim()) throw new Error("target must describe what to select (a model is set, and it selects by description).");
|
|
14516
|
-
const perform = _optionalChain([context, 'optionalAccess',
|
|
14559
|
+
const perform = _optionalChain([context, 'optionalAccess', _542 => _542.perform]);
|
|
14517
14560
|
const { segments, method, note } = await controller.selectSubject(String(_nullishCoalesce(target, () => ( ""))), {
|
|
14518
14561
|
mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, mode),
|
|
14519
14562
|
feather: num2(feather, 0),
|
|
14520
14563
|
maxSegments: typeof maxSegments === "number" ? Math.max(1, Math.round(maxSegments)) : void 0,
|
|
14521
14564
|
enhanceEdge: enhanceEdge === true,
|
|
14522
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
14565
|
+
signal: _optionalChain([context, 'optionalAccess', _543 => _543.signal]),
|
|
14523
14566
|
// Under playback the cursor traces what the model found, as a lasso, before it is selected.
|
|
14524
14567
|
beforeApply: perform ? (outlines) => perform(planOutlineTrace(outlines)) : void 0
|
|
14525
14568
|
});
|
|
@@ -14597,7 +14640,7 @@ async function renderImageRegion(controller, request) {
|
|
|
14597
14640
|
const maskView = maskViewCanvas(controller, document);
|
|
14598
14641
|
if (maskView) context.drawImage(maskView, rect2.x, rect2.y, rect2.width, rect2.height, 0, 0, out.width, out.height);
|
|
14599
14642
|
const selection = state.selection;
|
|
14600
|
-
if (_optionalChain([selection, 'optionalAccess',
|
|
14643
|
+
if (_optionalChain([selection, 'optionalAccess', _544 => _544.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
|
|
14601
14644
|
const shade = selectionShade(selection, document);
|
|
14602
14645
|
if (shade) context.drawImage(shade, rect2.x, rect2.y, rect2.width, rect2.height, 0, 0, out.width, out.height);
|
|
14603
14646
|
}
|
|
@@ -14622,7 +14665,7 @@ function createImageCaptureSurface(controller) {
|
|
|
14622
14665
|
return {
|
|
14623
14666
|
units: "image pixels",
|
|
14624
14667
|
content: whole,
|
|
14625
|
-
selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access',
|
|
14668
|
+
selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _545 => _545.getState, 'call', _546 => _546(), 'access', _547 => _547.selection, 'optionalAccess', _548 => _548.bounds]), () => ( null)) }),
|
|
14626
14669
|
overlays: "a shade over unselected pixels, the crop box outline and a layer mask view (set_mask_view)",
|
|
14627
14670
|
maxScale: 8,
|
|
14628
14671
|
render: (request) => renderImageRegion(controller, request)
|
|
@@ -14956,7 +14999,7 @@ function describeLayer(layer, activeId, boundsOf) {
|
|
|
14956
14999
|
out.bounds = boundsOf(layer);
|
|
14957
15000
|
out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
|
|
14958
15001
|
out.shape = {
|
|
14959
|
-
components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access',
|
|
15002
|
+
components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _549 => _549.live, 'optionalAccess', _550 => _550.kind]), () => ( "path")) })),
|
|
14960
15003
|
fill: layer.fill ? layer.fill.type : null,
|
|
14961
15004
|
stroke: layer.stroke ? { width: layer.stroke.width, paint: layer.stroke.paint.type } : null
|
|
14962
15005
|
};
|
|
@@ -14979,8 +15022,8 @@ function describeLayer(layer, activeId, boundsOf) {
|
|
|
14979
15022
|
out.bounds = boundsOf(layer);
|
|
14980
15023
|
out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
|
|
14981
15024
|
out.contents = { id: layer.contents.id, name: layer.contents.name, kind: layer.contents.kind, width: layer.contents.width, height: layer.contents.height };
|
|
14982
|
-
out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access',
|
|
14983
|
-
out.filterMask = maskSummary(_optionalChain([layer, 'access',
|
|
15025
|
+
out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _551 => _551.smartFilters, 'optionalAccess', _552 => _552.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
|
|
15026
|
+
out.filterMask = maskSummary(_optionalChain([layer, 'access', _553 => _553.smartFilters, 'optionalAccess', _554 => _554.mask]));
|
|
14984
15027
|
break;
|
|
14985
15028
|
}
|
|
14986
15029
|
return out;
|
|
@@ -15008,7 +15051,7 @@ function createImageLayerTools(controller) {
|
|
|
15008
15051
|
if (!loc) return null;
|
|
15009
15052
|
return {
|
|
15010
15053
|
...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)),
|
|
15011
|
-
parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
15054
|
+
parentId: _nullishCoalesce(_optionalChain([loc, 'access', _555 => _555.parent, 'optionalAccess', _556 => _556.id]), () => ( null)),
|
|
15012
15055
|
index: loc.index
|
|
15013
15056
|
};
|
|
15014
15057
|
};
|
|
@@ -15331,7 +15374,7 @@ function createImageLayerTools(controller) {
|
|
|
15331
15374
|
if (view !== "gray" && view !== "overlay" && view !== "off") throw new Error(`Unknown view "${String(view)}". Use gray, overlay or off.`);
|
|
15332
15375
|
const id = view === "off" || layerId === void 0 ? void 0 : exists(layerId);
|
|
15333
15376
|
const shown = controller.setMaskView(view, id);
|
|
15334
|
-
return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess',
|
|
15377
|
+
return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _557 => _557.mode]), () => ( "off")), layerId: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _558 => _558.layerId]), () => ( null)) };
|
|
15335
15378
|
}
|
|
15336
15379
|
};
|
|
15337
15380
|
const AMOUNT = (what) => ({ type: "number", minimum: 0, maximum: 100, description: `${what}, in percent 0-100; 0 turns it off.` });
|
|
@@ -15930,7 +15973,7 @@ var SelectionGesture = (_class13 = class {
|
|
|
15930
15973
|
size: _nullishCoalesce(options.quickSize, () => ( 30)),
|
|
15931
15974
|
grow: q.mode === "add",
|
|
15932
15975
|
enhanceEdge: _nullishCoalesce(options.quickEnhance, () => ( false)),
|
|
15933
|
-
selection: q.mode === "add" && _optionalChain([q, 'access',
|
|
15976
|
+
selection: q.mode === "add" && _optionalChain([q, 'access', _559 => _559.base, 'optionalAccess', _560 => _560.bounds]) ? _chunkUC3PWFM3cjs.serializeMask.call(void 0, q.base) : null
|
|
15934
15977
|
},
|
|
15935
15978
|
pixels
|
|
15936
15979
|
);
|
|
@@ -16141,7 +16184,7 @@ var SelectionGesture = (_class13 = class {
|
|
|
16141
16184
|
this.start = null;
|
|
16142
16185
|
this.current = null;
|
|
16143
16186
|
this.points = [];
|
|
16144
|
-
const strokeMode = _nullishCoalesce(_optionalChain([this, 'access',
|
|
16187
|
+
const strokeMode = _nullishCoalesce(_optionalChain([this, 'access', _561 => _561.quick, 'optionalAccess', _562 => _562.mode]), () => ( (mode === "replace" && this.controller.getSelection() ? "add" : mode)));
|
|
16145
16188
|
this.quick = null;
|
|
16146
16189
|
this.pending = this.controller.quickSelect([stroke], {
|
|
16147
16190
|
size: _nullishCoalesce(options.quickSize, () => ( 30)),
|
|
@@ -16302,7 +16345,7 @@ function handleSelectionShortcut(controller, e, onError) {
|
|
|
16302
16345
|
try {
|
|
16303
16346
|
fn();
|
|
16304
16347
|
} catch (err) {
|
|
16305
|
-
_optionalChain([onError, 'optionalCall',
|
|
16348
|
+
_optionalChain([onError, 'optionalCall', _563 => _563(err instanceof Error ? err.message : String(err))]);
|
|
16306
16349
|
}
|
|
16307
16350
|
return true;
|
|
16308
16351
|
};
|
|
@@ -16317,9 +16360,9 @@ function handleMaskViewKey(controller, e) {
|
|
|
16317
16360
|
if (e.ctrlKey || e.metaKey || e.altKey || e.key !== "\\") return false;
|
|
16318
16361
|
const id = controller.getState().activeLayerId;
|
|
16319
16362
|
const layer = id ? controller.getLayer(id) : null;
|
|
16320
|
-
if (!_optionalChain([layer, 'optionalAccess',
|
|
16363
|
+
if (!_optionalChain([layer, 'optionalAccess', _564 => _564.mask]) || layer.mask.source) return false;
|
|
16321
16364
|
const view = controller.getMaskView();
|
|
16322
|
-
controller.setMaskView(_optionalChain([view, 'optionalAccess',
|
|
16365
|
+
controller.setMaskView(_optionalChain([view, 'optionalAccess', _565 => _565.layerId]) === layer.id && view.mode === "overlay" ? "off" : "overlay", layer.id);
|
|
16323
16366
|
return true;
|
|
16324
16367
|
}
|
|
16325
16368
|
function handleQuickMaskKey(controller, e) {
|
|
@@ -16533,7 +16576,7 @@ var PaintGesture = (_class14 = class {
|
|
|
16533
16576
|
const layer = this.controller.getActiveLayer();
|
|
16534
16577
|
if (!layer) throw new Error("Select a layer to move in the Layers panel.");
|
|
16535
16578
|
if (layer.type !== "pixel" && layer.type !== "shape" && layer.type !== "smart") throw new Error(`Only pixel, shape and smart object layers move; "${layer.name}" is a ${layer.type} layer.`);
|
|
16536
|
-
if (_optionalChain([layer, 'access',
|
|
16579
|
+
if (_optionalChain([layer, 'access', _566 => _566.locks, 'optionalAccess', _567 => _567.all]) || _optionalChain([layer, 'access', _568 => _568.locks, 'optionalAccess', _569 => _569.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
|
|
16537
16580
|
const origin = layer.type === "pixel" ? { ...layer.offset } : layer.type === "smart" ? { ...layer.placement.corners[0] } : (() => {
|
|
16538
16581
|
const b = _chunkS55JFWDAcjs.shapeGeometryBounds.call(void 0, layer);
|
|
16539
16582
|
return b ? { x: b.x, y: b.y } : { x: 0, y: 0 };
|
|
@@ -16590,7 +16633,7 @@ var PaintGesture = (_class14 = class {
|
|
|
16590
16633
|
this.move = null;
|
|
16591
16634
|
}
|
|
16592
16635
|
cancel() {
|
|
16593
|
-
_optionalChain([this, 'access',
|
|
16636
|
+
_optionalChain([this, 'access', _570 => _570.stroke, 'optionalAccess', _571 => _571.cancel, 'call', _572 => _572()]);
|
|
16594
16637
|
this.stroke = null;
|
|
16595
16638
|
this.move = null;
|
|
16596
16639
|
}
|
|
@@ -17671,7 +17714,7 @@ function createImageSmartObjectTools(controller) {
|
|
|
17671
17714
|
const layerSummary = (id) => {
|
|
17672
17715
|
const s = controller.getState();
|
|
17673
17716
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, s.layers, id);
|
|
17674
|
-
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
17717
|
+
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _573 => _573.parent, 'optionalAccess', _574 => _574.id]), () => ( null)), index: loc.index } : null;
|
|
17675
17718
|
};
|
|
17676
17719
|
const getSmart = {
|
|
17677
17720
|
name: "get_smart_object",
|
|
@@ -18228,7 +18271,7 @@ function createImageShapeTools(controller) {
|
|
|
18228
18271
|
const layerSummary = (id) => {
|
|
18229
18272
|
const s = controller.getState();
|
|
18230
18273
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, s.layers, id);
|
|
18231
|
-
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
18274
|
+
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _575 => _575.parent, 'optionalAccess', _576 => _576.id]), () => ( null)), index: loc.index } : null;
|
|
18232
18275
|
};
|
|
18233
18276
|
const get = {
|
|
18234
18277
|
name: "get_shape_layer",
|
|
@@ -18459,7 +18502,7 @@ function createImageShapeTools(controller) {
|
|
|
18459
18502
|
const mode = args.mode;
|
|
18460
18503
|
controller.pathToSelection(_nullishCoalesce(fromPathId(args), () => ( pathSpec(args))), { feather: args.feather, antiAlias: args.antiAlias, mode });
|
|
18461
18504
|
const sel = controller.getSelection();
|
|
18462
|
-
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
18505
|
+
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _577 => _577.bounds]), () => ( null)), area: Math.round(sel ? _chunkSS53NNZOcjs.selectionArea.call(void 0, sel) : 0) };
|
|
18463
18506
|
}
|
|
18464
18507
|
};
|
|
18465
18508
|
const getVectorMask = {
|
|
@@ -18491,7 +18534,7 @@ function createImageShapeTools(controller) {
|
|
|
18491
18534
|
handler: (args) => {
|
|
18492
18535
|
const id = layerArg(args.layerId);
|
|
18493
18536
|
const spec = _nullishCoalesce(fromPathId(args), () => ( pathSpec(args)));
|
|
18494
|
-
const hasPath = _optionalChain([spec, 'access',
|
|
18537
|
+
const hasPath = _optionalChain([spec, 'access', _578 => _578.components, 'optionalAccess', _579 => _579.length]) || spec.shape !== void 0 || spec.subpaths !== void 0;
|
|
18495
18538
|
const from = _nullishCoalesce(args.from, () => ( (hasPath ? "path" : "reveal-all")));
|
|
18496
18539
|
if (from !== "selection" && TRACE_KEYS.some((k) => args[k] !== void 0)) throw new Error("tolerance, cornerRoundness and minArea apply only to from selection.");
|
|
18497
18540
|
controller.addVectorMask(id, from, spec, traceOptions(args));
|
|
@@ -18599,7 +18642,7 @@ function createImageShapeTools(controller) {
|
|
|
18599
18642
|
annotations: { title: "Add a document path", ...WRITE8 },
|
|
18600
18643
|
handler: (args) => {
|
|
18601
18644
|
const spec = pathSpec(args);
|
|
18602
|
-
if (!_optionalChain([spec, 'access',
|
|
18645
|
+
if (!_optionalChain([spec, 'access', _580 => _580.components, 'optionalAccess', _581 => _581.length]) && spec.shape === void 0 && spec.subpaths === void 0) throw new Error("Give the path as shape, subpaths or components.");
|
|
18603
18646
|
return { path: pathSummary(controller.addPath({ ...spec, name: args.name }).id) };
|
|
18604
18647
|
}
|
|
18605
18648
|
};
|
|
@@ -18743,7 +18786,7 @@ function createImageTypeTools(controller) {
|
|
|
18743
18786
|
const layerSummary = (id) => {
|
|
18744
18787
|
const s = controller.getState();
|
|
18745
18788
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, s.layers, id);
|
|
18746
|
-
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
18789
|
+
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _582 => _582.parent, 'optionalAccess', _583 => _583.id]), () => ( null)), index: loc.index } : null;
|
|
18747
18790
|
};
|
|
18748
18791
|
const range = (args) => ({ start: args.start, end: args.end });
|
|
18749
18792
|
const listFonts = {
|
|
@@ -18752,7 +18795,7 @@ function createImageTypeTools(controller) {
|
|
|
18752
18795
|
description: "Returns the font families type layers can use here (generic families such as sans-serif always work). Changes nothing.",
|
|
18753
18796
|
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
18754
18797
|
annotations: { title: "List fonts", ...READ11 },
|
|
18755
|
-
handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access',
|
|
18798
|
+
handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _584 => _584.getTextShaper, 'call', _585 => _585(), 'optionalAccess', _586 => _586.id]), () => ( null)) })
|
|
18756
18799
|
};
|
|
18757
18800
|
const get = {
|
|
18758
18801
|
name: "get_text_layer",
|
|
@@ -18908,7 +18951,7 @@ function createImageTypeTools(controller) {
|
|
|
18908
18951
|
const init = pick2(args, ["text", "x", "y", "orientation", "box", "style", "paragraph", "rotation", "mode", "feather", "antiAlias"]);
|
|
18909
18952
|
controller.selectTextShape(init);
|
|
18910
18953
|
const sel = controller.getSelection();
|
|
18911
|
-
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
18954
|
+
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _587 => _587.bounds]), () => ( null)), area: Math.round(sel ? _chunkSS53NNZOcjs.selectionArea.call(void 0, sel) : 0) };
|
|
18912
18955
|
}
|
|
18913
18956
|
};
|
|
18914
18957
|
return [listFonts, get, add2, setText, setStyle, setParagraph, setFrame, setOrientation, toShape, typeMask];
|
|
@@ -19087,7 +19130,7 @@ function createImageEditorToolProvider(controller, options = {}) {
|
|
|
19087
19130
|
for (const ref of [aboveId, parentId]) {
|
|
19088
19131
|
if (ref !== void 0 && !controller.getLayer(ref)) throw new Error(`Unknown layer "${ref}". Call list_layers for ids.`);
|
|
19089
19132
|
}
|
|
19090
|
-
if (parentId !== void 0 && _optionalChain([controller, 'access',
|
|
19133
|
+
if (parentId !== void 0 && _optionalChain([controller, 'access', _588 => _588.getLayer, 'call', _589 => _589(parentId), 'optionalAccess', _590 => _590.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
|
|
19091
19134
|
const id = controller.addAdjustmentLayer({ kind, params, opacity, blend, name, aboveId, parentId, useSelection: useSelection !== false });
|
|
19092
19135
|
const layer = controller.getAdjustmentLayer(id);
|
|
19093
19136
|
return { layer: JSON.parse(JSON.stringify(layer)), index: controller.getAdjustmentLayers().findIndex((l) => l.id === id), masked: Boolean(layer.mask) };
|
|
@@ -19163,7 +19206,7 @@ function createImageEditorToolProvider(controller, options = {}) {
|
|
|
19163
19206
|
...createImagePaintTools(controller),
|
|
19164
19207
|
...createImageColorTools(controller),
|
|
19165
19208
|
...createImageRetouchTools(controller),
|
|
19166
|
-
...
|
|
19209
|
+
..._chunkXFYLA3ZOcjs.createPigmentTools.call(void 0, ),
|
|
19167
19210
|
...createImagePsdTools(controller)
|
|
19168
19211
|
]
|
|
19169
19212
|
}, options.playbackSurface);
|
|
@@ -19422,7 +19465,7 @@ var SelectAndMaskSession = (_class15 = class {
|
|
|
19422
19465
|
const h = Math.max(1, Math.round(px2.height * s));
|
|
19423
19466
|
this.previewPixels = scalePixels(px2, w, h);
|
|
19424
19467
|
this.belowPreview = this.below ? scalePixels(this.below, w, h) : null;
|
|
19425
|
-
this.baseMask = _optionalChain([this, 'access',
|
|
19468
|
+
this.baseMask = _optionalChain([this, 'access', _591 => _591.base, 'optionalAccess', _592 => _592.bounds]) ? s === 1 ? this.base : _chunkSS53NNZOcjs.resizeSelection.call(void 0, this.base, w, h) : null;
|
|
19426
19469
|
}
|
|
19427
19470
|
/**
|
|
19428
19471
|
* Recomputes the preview mask from the base selection, the strokes and the settings: at once on
|
|
@@ -19440,7 +19483,7 @@ var SelectAndMaskSession = (_class15 = class {
|
|
|
19440
19483
|
const edits = [...this.editsList, ...this.live ? [this.live] : []].map((e) => scaleEdit(e, scale));
|
|
19441
19484
|
try {
|
|
19442
19485
|
const { selection, refineBrush } = _chunkUC3PWFM3cjs.applyRefineEdits.call(void 0, px2, this.baseMask, edits, px2.width, px2.height);
|
|
19443
|
-
this.previewMask = _optionalChain([selection, 'optionalAccess',
|
|
19486
|
+
this.previewMask = _optionalChain([selection, 'optionalAccess', _593 => _593.bounds]) ? _chunkSS53NNZOcjs.refineSelection.call(void 0, px2, selection, scaleParams(this.settingsValue.params, scale), refineBrush) : null;
|
|
19444
19487
|
this.error = null;
|
|
19445
19488
|
} catch (err) {
|
|
19446
19489
|
this.previewMask = null;
|
|
@@ -19546,7 +19589,7 @@ var SelectAndMaskSession = (_class15 = class {
|
|
|
19546
19589
|
break;
|
|
19547
19590
|
}
|
|
19548
19591
|
case "on-layers": {
|
|
19549
|
-
const under = _optionalChain([this, 'access',
|
|
19592
|
+
const under = _optionalChain([this, 'access', _594 => _594.belowPreview, 'optionalAccess', _595 => _595.data]);
|
|
19550
19593
|
let ur = checker;
|
|
19551
19594
|
let ug = checker;
|
|
19552
19595
|
let ub = checker;
|
|
@@ -19842,7 +19885,7 @@ function maskThumbnailClick(controller, layer, e) {
|
|
|
19842
19885
|
} else if (e.altKey && !layer.mask.source) {
|
|
19843
19886
|
const mode = e.shiftKey ? "overlay" : "gray";
|
|
19844
19887
|
const view = controller.getMaskView();
|
|
19845
|
-
controller.setMaskView(_optionalChain([view, 'optionalAccess',
|
|
19888
|
+
controller.setMaskView(_optionalChain([view, 'optionalAccess', _596 => _596.layerId]) === layer.id && view.mode === mode ? "off" : mode, layer.id);
|
|
19846
19889
|
} else if (e.shiftKey) {
|
|
19847
19890
|
controller.setLayerMaskProps(layer.id, { enabled: layer.mask.enabled === false });
|
|
19848
19891
|
} else {
|
|
@@ -19906,7 +19949,7 @@ function layerHasThumbnail(layer) {
|
|
|
19906
19949
|
return layer.type === "pixel" || layer.type === "shape" || layer.type === "type";
|
|
19907
19950
|
}
|
|
19908
19951
|
function layerWarning(layer) {
|
|
19909
|
-
if (layer.type === "type" && _optionalChain([layer, 'access',
|
|
19952
|
+
if (layer.type === "type" && _optionalChain([layer, 'access', _597 => _597.missingFonts, 'optionalAccess', _598 => _598.length])) {
|
|
19910
19953
|
return `Missing ${layer.missingFonts.length === 1 ? "font" : "fonts"}: ${layer.missingFonts.join(", ")}. ${layer.rendering === "stored" ? "Showing the saved pixels until the text is edited." : "Drawn with a fallback font."}`;
|
|
19911
19954
|
}
|
|
19912
19955
|
return null;
|
|
@@ -19929,16 +19972,16 @@ function layerMenu(controller) {
|
|
|
19929
19972
|
const siblings = loc ? loc.parent ? loc.parent.children : s.layers : [];
|
|
19930
19973
|
const below = loc ? siblings[loc.index - 1] : void 0;
|
|
19931
19974
|
const hasSel = controller.hasSelection;
|
|
19932
|
-
const isPixel = _optionalChain([active, 'optionalAccess',
|
|
19933
|
-
const hasOwnPixels = _optionalChain([active, 'optionalAccess',
|
|
19975
|
+
const isPixel = _optionalChain([active, 'optionalAccess', _599 => _599.type]) === "pixel";
|
|
19976
|
+
const hasOwnPixels = _optionalChain([active, 'optionalAccess', _600 => _600.type]) === "pixel" || _optionalChain([active, 'optionalAccess', _601 => _601.type]) === "shape" || _optionalChain([active, 'optionalAccess', _602 => _602.type]) === "type" || _optionalChain([active, 'optionalAccess', _603 => _603.type]) === "smart";
|
|
19934
19977
|
return [
|
|
19935
19978
|
{ action: "new-layer", label: "New Layer", enabled: true },
|
|
19936
19979
|
{ action: "new-group", label: "New Group", enabled: true },
|
|
19937
19980
|
{ action: "duplicate", label: "Duplicate Layer", enabled: Boolean(active) },
|
|
19938
19981
|
{ action: "delete", label: "Delete Layer", enabled: Boolean(active) },
|
|
19939
19982
|
{ action: "group-selected", label: "Group Layer", enabled: Boolean(active) },
|
|
19940
|
-
{ action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess',
|
|
19941
|
-
{ action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
19983
|
+
{ action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _604 => _604.type]) === "group" },
|
|
19984
|
+
{ action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _605 => _605.visible]) && _optionalChain([below, 'optionalAccess', _606 => _606.type]) === "pixel") },
|
|
19942
19985
|
{ action: "merge-visible", label: "Merge Visible", enabled: s.layers.some((l) => l.visible) },
|
|
19943
19986
|
{ action: "flatten", label: "Flatten Image", enabled: s.layers.length > 0 },
|
|
19944
19987
|
{ action: "via-copy", label: "Layer via Copy", enabled: isPixel && hasSel },
|
|
@@ -19948,27 +19991,27 @@ function layerMenu(controller) {
|
|
|
19948
19991
|
{ action: "add-mask-hide-selection", label: "Add Mask Hiding Selection", enabled: Boolean(active) && hasSel },
|
|
19949
19992
|
{ action: "add-mask-transparency", label: "Add Mask from Transparency", enabled: hasOwnPixels },
|
|
19950
19993
|
{ action: "select-transparency", label: "Select Layer Pixels", enabled: hasOwnPixels },
|
|
19951
|
-
{ action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess',
|
|
19952
|
-
{ action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
19953
|
-
{ action: "toggle-mask", label: _optionalChain([active, 'optionalAccess',
|
|
19954
|
-
{ action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess',
|
|
19955
|
-
{ action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access',
|
|
19956
|
-
{ action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access',
|
|
19957
|
-
{ action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access',
|
|
19958
|
-
{ action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
19959
|
-
{ action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess',
|
|
19960
|
-
{ action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
19961
|
-
{ action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess',
|
|
19994
|
+
{ action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _607 => _607.mask])) },
|
|
19995
|
+
{ action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _608 => _608.mask])) },
|
|
19996
|
+
{ action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _609 => _609.mask, 'optionalAccess', _610 => _610.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _611 => _611.mask])) },
|
|
19997
|
+
{ action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _612 => _612.mask, 'optionalAccess', _613 => _613.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _614 => _614.mask]) && !active.mask.source) },
|
|
19998
|
+
{ action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _615 => _615.mask, 'optionalAccess', _616 => _616.source])) },
|
|
19999
|
+
{ action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _617 => _617.mask, 'optionalAccess', _618 => _618.source])) },
|
|
20000
|
+
{ action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _619 => _619.mask, 'optionalAccess', _620 => _620.source])) && hasSel },
|
|
20001
|
+
{ action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _621 => _621.vectorMask])) },
|
|
20002
|
+
{ action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess', _622 => _622.vectorMask, 'optionalAccess', _623 => _623.enabled]) === false ? "Enable Vector Mask" : "Disable Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _624 => _624.vectorMask])) },
|
|
20003
|
+
{ action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _625 => _625.vectorMask])) },
|
|
20004
|
+
{ action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _626 => _626.type]) === "annotation" || _optionalChain([active, 'optionalAccess', _627 => _627.type]) === "smart" || _optionalChain([active, 'optionalAccess', _628 => _628.type]) === "shape" || _optionalChain([active, 'optionalAccess', _629 => _629.type]) === "type" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _630 => _630.type]) === "pixel" && _optionalChain([active, 'access', _631 => _631.filters, 'optionalAccess', _632 => _632.length])) },
|
|
19962
20005
|
{ action: "convert-smart", label: "Convert to Smart Object", enabled: Boolean(active && active.type !== "annotation") },
|
|
19963
|
-
{ action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess',
|
|
19964
|
-
{ action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess',
|
|
19965
|
-
{ action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess',
|
|
19966
|
-
{ action: "toggle-clip", label: _optionalChain([active, 'optionalAccess',
|
|
20006
|
+
{ action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _633 => _633.type]) === "smart" },
|
|
20007
|
+
{ action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _634 => _634.type]) === "smart" },
|
|
20008
|
+
{ action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess', _635 => _635.type]) === "smart" && !_optionalChain([active, 'access', _636 => _636.smartFilters, 'optionalAccess', _637 => _637.mask]) },
|
|
20009
|
+
{ action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _638 => _638.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
|
|
19967
20010
|
];
|
|
19968
20011
|
}
|
|
19969
20012
|
async function runLayerMenuAction(controller, action) {
|
|
19970
20013
|
const active = controller.getActiveLayer();
|
|
19971
|
-
const id = _optionalChain([active, 'optionalAccess',
|
|
20014
|
+
const id = _optionalChain([active, 'optionalAccess', _639 => _639.id]);
|
|
19972
20015
|
try {
|
|
19973
20016
|
switch (action) {
|
|
19974
20017
|
case "new-layer":
|
|
@@ -20024,10 +20067,10 @@ async function runLayerMenuAction(controller, action) {
|
|
|
20024
20067
|
if (id) controller.removeLayerMask(id);
|
|
20025
20068
|
break;
|
|
20026
20069
|
case "toggle-mask":
|
|
20027
|
-
if (id && _optionalChain([active, 'optionalAccess',
|
|
20070
|
+
if (id && _optionalChain([active, 'optionalAccess', _640 => _640.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
|
|
20028
20071
|
break;
|
|
20029
20072
|
case "toggle-mask-link":
|
|
20030
|
-
if (id && _optionalChain([active, 'optionalAccess',
|
|
20073
|
+
if (id && _optionalChain([active, 'optionalAccess', _641 => _641.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
|
|
20031
20074
|
break;
|
|
20032
20075
|
case "add-vector-mask":
|
|
20033
20076
|
case "add-vector-mask-hide":
|
|
@@ -20040,7 +20083,7 @@ async function runLayerMenuAction(controller, action) {
|
|
|
20040
20083
|
if (id) controller.removeVectorMask(id);
|
|
20041
20084
|
break;
|
|
20042
20085
|
case "toggle-vector-mask":
|
|
20043
|
-
if (id && _optionalChain([active, 'optionalAccess',
|
|
20086
|
+
if (id && _optionalChain([active, 'optionalAccess', _642 => _642.vectorMask])) controller.setVectorMaskProps(id, { enabled: active.vectorMask.enabled === false });
|
|
20044
20087
|
break;
|
|
20045
20088
|
case "rasterize-vector-mask":
|
|
20046
20089
|
if (id) controller.rasterizeVectorMask(id);
|
|
@@ -20061,7 +20104,7 @@ async function runLayerMenuAction(controller, action) {
|
|
|
20061
20104
|
if (id) controller.setSmartFilterMask(id, "reveal-all");
|
|
20062
20105
|
break;
|
|
20063
20106
|
case "toggle-clip":
|
|
20064
|
-
if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess',
|
|
20107
|
+
if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _643 => _643.clipped]) });
|
|
20065
20108
|
break;
|
|
20066
20109
|
}
|
|
20067
20110
|
return null;
|
|
@@ -20071,7 +20114,7 @@ async function runLayerMenuAction(controller, action) {
|
|
|
20071
20114
|
}
|
|
20072
20115
|
function smartFilterRows(layer) {
|
|
20073
20116
|
if (layer.type !== "smart") return [];
|
|
20074
|
-
const list = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
20117
|
+
const list = _nullishCoalesce(_optionalChain([layer, 'access', _644 => _644.smartFilters, 'optionalAccess', _645 => _645.filters]), () => ( []));
|
|
20075
20118
|
const rows = list.map((f, index) => ({
|
|
20076
20119
|
filter: f,
|
|
20077
20120
|
index,
|
|
@@ -20097,8 +20140,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
|
|
|
20097
20140
|
};
|
|
20098
20141
|
collectSerialized(_nullishCoalesce(serialized.layers, () => ( [])));
|
|
20099
20142
|
const sLayerMap = new Map(allSerializedLayers.map((sl) => [sl.id, sl]));
|
|
20100
|
-
const imgW = _optionalChain([state, 'access',
|
|
20101
|
-
const imgH = _optionalChain([state, 'access',
|
|
20143
|
+
const imgW = _optionalChain([state, 'access', _646 => _646.imageDimensions, 'optionalAccess', _647 => _647.width]) || 1;
|
|
20144
|
+
const imgH = _optionalChain([state, 'access', _648 => _648.imageDimensions, 'optionalAccess', _649 => _649.height]) || 1;
|
|
20102
20145
|
return ctrlLayers.map((l) => {
|
|
20103
20146
|
const bounds = controller.getLayerBounds(l.id) || {
|
|
20104
20147
|
x: 0,
|
|
@@ -20107,8 +20150,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
|
|
|
20107
20150
|
height: imgH
|
|
20108
20151
|
};
|
|
20109
20152
|
const sLayer = sLayerMap.get(l.id);
|
|
20110
|
-
const assetKey = _optionalChain([sLayer, 'optionalAccess',
|
|
20111
|
-
const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess',
|
|
20153
|
+
const assetKey = _optionalChain([sLayer, 'optionalAccess', _650 => _650.asset]);
|
|
20154
|
+
const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _651 => _651.source]) === "document" ? fallbackImageUrl : "");
|
|
20112
20155
|
return {
|
|
20113
20156
|
id: l.id,
|
|
20114
20157
|
name: l.name || "Untitled Layer",
|
|
@@ -20162,9 +20205,9 @@ async function addLayerOfKind(controller, id, init) {
|
|
|
20162
20205
|
const cx = Math.round(canvas.width / 2);
|
|
20163
20206
|
const cy = Math.round(canvas.height / 2);
|
|
20164
20207
|
return controller.addTextLayer({
|
|
20165
|
-
text: _optionalChain([init, 'optionalAccess',
|
|
20166
|
-
x: typeof _optionalChain([init, 'optionalAccess',
|
|
20167
|
-
y: typeof _optionalChain([init, 'optionalAccess',
|
|
20208
|
+
text: _optionalChain([init, 'optionalAccess', _652 => _652.text]) || "New Text",
|
|
20209
|
+
x: typeof _optionalChain([init, 'optionalAccess', _653 => _653.x]) === "number" ? init.x : cx - 100,
|
|
20210
|
+
y: typeof _optionalChain([init, 'optionalAccess', _654 => _654.y]) === "number" ? init.y : cy,
|
|
20168
20211
|
...init
|
|
20169
20212
|
});
|
|
20170
20213
|
}
|
|
@@ -20177,10 +20220,10 @@ async function addLayerOfKind(controller, id, init) {
|
|
|
20177
20220
|
return controller.addShapeLayer({
|
|
20178
20221
|
shape: {
|
|
20179
20222
|
kind: "rect",
|
|
20180
|
-
x: typeof _optionalChain([init, 'optionalAccess',
|
|
20181
|
-
y: typeof _optionalChain([init, 'optionalAccess',
|
|
20182
|
-
width: typeof _optionalChain([init, 'optionalAccess',
|
|
20183
|
-
height: typeof _optionalChain([init, 'optionalAccess',
|
|
20223
|
+
x: typeof _optionalChain([init, 'optionalAccess', _655 => _655.x]) === "number" ? init.x : cx - Math.round(w / 2),
|
|
20224
|
+
y: typeof _optionalChain([init, 'optionalAccess', _656 => _656.y]) === "number" ? init.y : cy - Math.round(h / 2),
|
|
20225
|
+
width: typeof _optionalChain([init, 'optionalAccess', _657 => _657.width]) === "number" ? init.width : w,
|
|
20226
|
+
height: typeof _optionalChain([init, 'optionalAccess', _658 => _658.height]) === "number" ? init.height : h
|
|
20184
20227
|
},
|
|
20185
20228
|
name: "Rectangle",
|
|
20186
20229
|
...init
|
|
@@ -20195,10 +20238,10 @@ async function addLayerOfKind(controller, id, init) {
|
|
|
20195
20238
|
return controller.addShapeLayer({
|
|
20196
20239
|
shape: {
|
|
20197
20240
|
kind: "ellipse",
|
|
20198
|
-
x: typeof _optionalChain([init, 'optionalAccess',
|
|
20199
|
-
y: typeof _optionalChain([init, 'optionalAccess',
|
|
20200
|
-
width: typeof _optionalChain([init, 'optionalAccess',
|
|
20201
|
-
height: typeof _optionalChain([init, 'optionalAccess',
|
|
20241
|
+
x: typeof _optionalChain([init, 'optionalAccess', _659 => _659.x]) === "number" ? init.x : cx - Math.round(w / 2),
|
|
20242
|
+
y: typeof _optionalChain([init, 'optionalAccess', _660 => _660.y]) === "number" ? init.y : cy - Math.round(h / 2),
|
|
20243
|
+
width: typeof _optionalChain([init, 'optionalAccess', _661 => _661.width]) === "number" ? init.width : w,
|
|
20244
|
+
height: typeof _optionalChain([init, 'optionalAccess', _662 => _662.height]) === "number" ? init.height : h
|
|
20202
20245
|
},
|
|
20203
20246
|
name: "Ellipse",
|
|
20204
20247
|
...init
|
|
@@ -20259,18 +20302,18 @@ function layerEffectsPanel(layer) {
|
|
|
20259
20302
|
if (!layer) return { ...empty, available: false, reason: "Select a layer to add a layer style." };
|
|
20260
20303
|
if (layer.type === "adjustment") return { ...empty, available: false, reason: "Adjustment layers cannot have a layer style." };
|
|
20261
20304
|
const fx = layer.effects;
|
|
20262
|
-
const readOnly = Boolean(_optionalChain([layer, 'access',
|
|
20305
|
+
const readOnly = Boolean(_optionalChain([layer, 'access', _663 => _663.locks, 'optionalAccess', _664 => _664.all]));
|
|
20263
20306
|
return {
|
|
20264
20307
|
available: true,
|
|
20265
20308
|
readOnly,
|
|
20266
20309
|
reason: readOnly ? "The layer is locked; unlock it to change its layer style." : void 0,
|
|
20267
|
-
enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess',
|
|
20268
|
-
scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess',
|
|
20269
|
-
rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess',
|
|
20310
|
+
enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _665 => _665.enabled]), () => ( true)),
|
|
20311
|
+
scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _666 => _666.scale]), () => ( 1)),
|
|
20312
|
+
rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _667 => _667.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkB46UQUDCcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
|
|
20270
20313
|
};
|
|
20271
20314
|
}
|
|
20272
20315
|
function layerEffectsBadge(layer) {
|
|
20273
|
-
if (!_optionalChain([layer, 'access',
|
|
20316
|
+
if (!_optionalChain([layer, 'access', _668 => _668.effects, 'optionalAccess', _669 => _669.items, 'access', _670 => _670.length])) return null;
|
|
20274
20317
|
return _chunkB46UQUDCcjs.hasActiveEffects.call(void 0, layer.effects) ? "on" : "off";
|
|
20275
20318
|
}
|
|
20276
20319
|
var LAYER_EFFECT_MENU = _chunkB46UQUDCcjs.LAYER_EFFECT_KINDS.map((kind) => ({ kind, label: _chunkB46UQUDCcjs.layerEffectLabel.call(void 0, kind) }));
|
|
@@ -20315,8 +20358,8 @@ function fillControls(f, allowPattern, patterns) {
|
|
|
20315
20358
|
}
|
|
20316
20359
|
function gradientControls(prefix, g) {
|
|
20317
20360
|
return [
|
|
20318
|
-
{ key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access',
|
|
20319
|
-
{ key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access',
|
|
20361
|
+
{ key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _671 => _671.stops, 'access', _672 => _672[0], 'optionalAccess', _673 => _673.color]), () => ( "#000000")) },
|
|
20362
|
+
{ key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _674 => _674.stops, 'access', _675 => _675[g.stops.length - 1], 'optionalAccess', _676 => _676.color]), () => ( "#ffffff")) },
|
|
20320
20363
|
{ key: `${prefix}.style`, label: "Style", type: "select", value: g.style, options: opt(["linear", "Linear"], ["radial", "Radial"], ["angle", "Angle"], ["reflected", "Reflected"], ["diamond", "Diamond"]) },
|
|
20321
20364
|
{ key: `${prefix}.angle`, label: "Angle", type: "range", min: -180, max: 180, step: 1, value: g.angle, unit: "\xB0" },
|
|
20322
20365
|
{ key: `${prefix}.scale`, label: "Scale", type: "range", min: 0.1, max: 1.5, step: 0.01, value: g.scale, percent: true, unit: "%" },
|
|
@@ -20408,19 +20451,19 @@ function layerEffectControls(e, patterns = []) {
|
|
|
20408
20451
|
}
|
|
20409
20452
|
function fillOfType(current, type, patterns) {
|
|
20410
20453
|
if (type === "gradient") return { type: "gradient", gradient: _chunkB46UQUDCcjs.defaultEffectGradient.call(void 0, ) };
|
|
20411
|
-
if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access',
|
|
20454
|
+
if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _677 => _677[0], 'optionalAccess', _678 => _678.id]), () => ( "checker")), scale: 1 };
|
|
20412
20455
|
return { type: "color", color: current.type === "color" ? current.color : "#000000" };
|
|
20413
20456
|
}
|
|
20414
20457
|
function effectControlChange(effect, key2, value, patterns = []) {
|
|
20415
20458
|
const [top, ...rest] = key2.split(".");
|
|
20416
20459
|
if (top === "fill" && rest[0] === "type") return { fill: fillOfType(effect.fill, String(value), patterns) };
|
|
20417
20460
|
if (top === "patternId" && !rest.length) {
|
|
20418
|
-
const name = _optionalChain([patternOptions, 'call',
|
|
20461
|
+
const name = _optionalChain([patternOptions, 'call', _679 => _679(patterns), 'access', _680 => _680.find, 'call', _681 => _681((o) => o.value === value), 'optionalAccess', _682 => _682.label]);
|
|
20419
20462
|
return name ? { patternId: value, name } : { patternId: value };
|
|
20420
20463
|
}
|
|
20421
20464
|
if (!rest.length) return { [top]: value };
|
|
20422
20465
|
if (top === "fill" && rest[0] === "patternId") {
|
|
20423
|
-
const name = _optionalChain([patternOptions, 'call',
|
|
20466
|
+
const name = _optionalChain([patternOptions, 'call', _683 => _683(patterns), 'access', _684 => _684.find, 'call', _685 => _685((o) => o.value === value), 'optionalAccess', _686 => _686.label]);
|
|
20424
20467
|
return { fill: { ...effect.fill, patternId: value, ...name ? { name } : {} } };
|
|
20425
20468
|
}
|
|
20426
20469
|
return { [top]: setPath(getPath(effect, top), rest, value) };
|
|
@@ -20447,7 +20490,7 @@ function colorPanelView(controller) {
|
|
|
20447
20490
|
profileName: profile.name,
|
|
20448
20491
|
workingSpace: profile.builtin,
|
|
20449
20492
|
mode: profile.mode,
|
|
20450
|
-
cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access',
|
|
20493
|
+
cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access', _687 => _687.cmykProfile, 'optionalAccess', _688 => _688.name]), () => ( null)),
|
|
20451
20494
|
proof: proof ? { id: _nullishCoalesce(proof.profile.builtin, () => ( null)), name: proof.profile.name, intent: proof.intent, simulatePaper: proof.simulatePaper, gamutWarning: proof.gamutWarning, bpc: proof.bpc } : null
|
|
20452
20495
|
};
|
|
20453
20496
|
}
|
|
@@ -20655,7 +20698,7 @@ var FreeTransformTool = (_class16 = class {
|
|
|
20655
20698
|
__init147() {this.error = null}
|
|
20656
20699
|
__init148() {this.lastResult = null}
|
|
20657
20700
|
get active() {
|
|
20658
|
-
return Boolean(_optionalChain([this, 'access',
|
|
20701
|
+
return Boolean(_optionalChain([this, 'access', _689 => _689.sessionRef, 'optionalAccess', _690 => _690.isOpen]));
|
|
20659
20702
|
}
|
|
20660
20703
|
get session() {
|
|
20661
20704
|
return this.active ? this.sessionRef : null;
|
|
@@ -20664,7 +20707,7 @@ var FreeTransformTool = (_class16 = class {
|
|
|
20664
20707
|
return this.modeValue;
|
|
20665
20708
|
}
|
|
20666
20709
|
get interpolation() {
|
|
20667
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
20710
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _691 => _691.sessionRef, 'optionalAccess', _692 => _692.interpolation]), () => ( "bicubic"));
|
|
20668
20711
|
}
|
|
20669
20712
|
/** Whether the open transform has changed anything yet (a commit would add an undo step). */
|
|
20670
20713
|
get modified() {
|
|
@@ -20683,7 +20726,7 @@ var FreeTransformTool = (_class16 = class {
|
|
|
20683
20726
|
};
|
|
20684
20727
|
}
|
|
20685
20728
|
changed() {
|
|
20686
|
-
_optionalChain([this, 'access',
|
|
20729
|
+
_optionalChain([this, 'access', _693 => _693.options, 'access', _694 => _694.onChange, 'optionalCall', _695 => _695()]);
|
|
20687
20730
|
for (const l of this.listeners) l();
|
|
20688
20731
|
}
|
|
20689
20732
|
/** Opens a Free Transform (default: the selected pixels of the active layer, or the whole layer). Returns an error message or `null`. */
|
|
@@ -21076,7 +21119,7 @@ var FreeTransformTool = (_class16 = class {
|
|
|
21076
21119
|
}
|
|
21077
21120
|
/** Abandons the transform and restores everything. */
|
|
21078
21121
|
cancel() {
|
|
21079
|
-
_optionalChain([this, 'access',
|
|
21122
|
+
_optionalChain([this, 'access', _696 => _696.sessionRef, 'optionalAccess', _697 => _697.cancel, 'call', _698 => _698()]);
|
|
21080
21123
|
this.sessionRef = null;
|
|
21081
21124
|
this.corners = null;
|
|
21082
21125
|
this.mesh = null;
|
|
@@ -21132,7 +21175,7 @@ function imageLayerAppliedEffects(layer) {
|
|
|
21132
21175
|
const ref = (r) => ({ effect: r.effect, ...r.name ? { name: r.name } : {}, ...r.provider ? { provider: r.provider } : {} });
|
|
21133
21176
|
if (layer.type === "pixel" && layer.generator) out.push({ id: "generator", ...ref(layer.generator), role: "effect layer", enabled: true, values: layer.generator.values, ...layer.generator.time ? { time: layer.generator.time } : {}, ...layer.generator.animate ? { animate: layer.generator.animate } : {} });
|
|
21134
21177
|
if (layer.type === "smart")
|
|
21135
|
-
(_nullishCoalesce(_optionalChain([layer, 'access',
|
|
21178
|
+
(_nullishCoalesce(_optionalChain([layer, 'access', _699 => _699.smartFilters, 'optionalAccess', _700 => _700.filters]), () => ( []))).forEach((f, index) => {
|
|
21136
21179
|
if (f.kind === "effect") out.push({ id: f.id, ...ref(f), role: "smart filter", enabled: f.enabled && layer.smartFilters.enabled, opacity: f.opacity, blend: f.blend, values: f.values, index });
|
|
21137
21180
|
});
|
|
21138
21181
|
return out;
|
|
@@ -21289,7 +21332,7 @@ var OTHER_TOOL_LABELS = {
|
|
|
21289
21332
|
watermark: "Watermark"
|
|
21290
21333
|
};
|
|
21291
21334
|
function imageToolLabel(tool) {
|
|
21292
|
-
return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access',
|
|
21335
|
+
return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access', _701 => _701.find, 'call', _702 => _702((t) => t.id === tool), 'optionalAccess', _703 => _703.label]), () => ( OTHER_TOOL_LABELS[tool])), () => ( tool));
|
|
21293
21336
|
}
|
|
21294
21337
|
var IMAGE_TOOL_SHORTCUTS = {
|
|
21295
21338
|
...Object.fromEntries(PAINT_TOOLS.filter((t) => t.shortcut).map((t) => [t.id, t.shortcut])),
|
|
@@ -21421,10 +21464,10 @@ var PathEditGesture = (_class17 = class {
|
|
|
21421
21464
|
}
|
|
21422
21465
|
for (const k of [...this.selected]) {
|
|
21423
21466
|
const r = parseKey(k);
|
|
21424
|
-
if (!_optionalChain([cs, 'access',
|
|
21467
|
+
if (!_optionalChain([cs, 'access', _704 => _704[r.component], 'optionalAccess', _705 => _705.subpaths, 'access', _706 => _706[r.subpath], 'optionalAccess', _707 => _707.anchors, 'access', _708 => _708[r.anchor]])) this.selected.delete(k);
|
|
21425
21468
|
}
|
|
21426
21469
|
const d = this.drawing;
|
|
21427
|
-
if (d && (!_optionalChain([cs, 'access',
|
|
21470
|
+
if (d && (!_optionalChain([cs, 'access', _709 => _709[d.component], 'optionalAccess', _710 => _710.subpaths, 'access', _711 => _711[d.subpath]]) || cs[d.component].subpaths[d.subpath].closed)) this.drawing = null;
|
|
21428
21471
|
return cs;
|
|
21429
21472
|
}
|
|
21430
21473
|
anchorAt(cs, p) {
|
|
@@ -21759,11 +21802,11 @@ var PathEditGesture = (_class17 = class {
|
|
|
21759
21802
|
let preview = null;
|
|
21760
21803
|
const d = this.drawing;
|
|
21761
21804
|
if (tool === "path-pen" && d && this.pointer && !this.drag) {
|
|
21762
|
-
const sp = _optionalChain([cs, 'access',
|
|
21763
|
-
const last = _optionalChain([sp, 'optionalAccess',
|
|
21805
|
+
const sp = _optionalChain([cs, 'access', _712 => _712[d.component], 'optionalAccess', _713 => _713.subpaths, 'access', _714 => _714[d.subpath]]);
|
|
21806
|
+
const last = _optionalChain([sp, 'optionalAccess', _715 => _715.anchors, 'access', _716 => _716[sp.anchors.length - 1]]);
|
|
21764
21807
|
if (last) preview = last.out ? [pt(last), pt(last.out), this.pointer, this.pointer] : [pt(last), this.pointer];
|
|
21765
21808
|
}
|
|
21766
|
-
const marquee = _optionalChain([this, 'access',
|
|
21809
|
+
const marquee = _optionalChain([this, 'access', _717 => _717.drag, 'optionalAccess', _718 => _718.kind]) === "marquee" ? rect(this.drag.start, this.drag.end) : null;
|
|
21767
21810
|
return { curves, anchors, handles, marquee, preview };
|
|
21768
21811
|
}
|
|
21769
21812
|
}, _class17);
|
|
@@ -21845,8 +21888,8 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
|
|
|
21845
21888
|
async open() {
|
|
21846
21889
|
try {
|
|
21847
21890
|
const { width, height } = this.controller.getState().imageDimensions;
|
|
21848
|
-
const b = _optionalChain([this, 'access',
|
|
21849
|
-
this.margin = width * height <= _ContentAwareFillSession.WHOLE_IMAGE_PIXELS ? Math.max(width, height) : Math.max(256, 2 * Math.max(_nullishCoalesce(_optionalChain([b, 'optionalAccess',
|
|
21891
|
+
const b = _optionalChain([this, 'access', _719 => _719.controller, 'access', _720 => _720.getSelection, 'call', _721 => _721(), 'optionalAccess', _722 => _722.bounds]);
|
|
21892
|
+
this.margin = width * height <= _ContentAwareFillSession.WHOLE_IMAGE_PIXELS ? Math.max(width, height) : Math.max(256, 2 * Math.max(_nullishCoalesce(_optionalChain([b, 'optionalAccess', _723 => _723.width]), () => ( 0)), _nullishCoalesce(_optionalChain([b, 'optionalAccess', _724 => _724.height]), () => ( 0))));
|
|
21850
21893
|
this.plan = this.controller.prepareContentAwareFill({ sampleRadius: this.margin });
|
|
21851
21894
|
} catch (err) {
|
|
21852
21895
|
this.error = err instanceof Error ? err.message : String(err);
|
|
@@ -22004,7 +22047,7 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
|
|
|
22004
22047
|
this.dirty = false;
|
|
22005
22048
|
try {
|
|
22006
22049
|
const area = this.samplingMask();
|
|
22007
|
-
if (!_optionalChain([area, 'optionalAccess',
|
|
22050
|
+
if (!_optionalChain([area, 'optionalAccess', _725 => _725.bounds])) throw new Error("The sampling area is empty; paint where the fill may copy from.");
|
|
22008
22051
|
const { plan, after } = await this.controller.previewContentAwareFill({ layerId: this.plan.layerId, samplingArea: area, seed: this.settingsValue.seed });
|
|
22009
22052
|
const win = this.win;
|
|
22010
22053
|
const out = Uint8ClampedArray.from(this.before);
|
|
@@ -22083,7 +22126,7 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
|
|
|
22083
22126
|
/** OK: fills with this sampling area, seed and output as one undo step. */
|
|
22084
22127
|
async commit(options = {}) {
|
|
22085
22128
|
const area = this.samplingMask();
|
|
22086
|
-
if (!this.plan || !_optionalChain([area, 'optionalAccess',
|
|
22129
|
+
if (!this.plan || !_optionalChain([area, 'optionalAccess', _726 => _726.bounds])) throw new Error(_nullishCoalesce(this.error, () => ( "The sampling area is empty; paint where the fill may copy from.")));
|
|
22087
22130
|
return this.controller.contentAwareFillAsync({ layerId: this.plan.layerId, samplingArea: area, seed: this.settingsValue.seed, output: this.settingsValue.output, signal: options.signal });
|
|
22088
22131
|
}
|
|
22089
22132
|
}, _class18.__initStatic(), _class18);
|
|
@@ -23201,4 +23244,6 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
|
|
|
23201
23244
|
|
|
23202
23245
|
|
|
23203
23246
|
|
|
23204
|
-
exports.ADJUSTMENT_KEYS = _chunkS55JFWDAcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkS55JFWDAcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkS55JFWDAcjs.ADJUSTMENT_LUT_SIZE; exports.ANCHOR_FRACTION = _chunkS55JFWDAcjs.ANCHOR_FRACTION; exports.AS_SHOT_KELVIN = _chunkS55JFWDAcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkS55JFWDAcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkS55JFWDAcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkOLNIPTB3cjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkOLNIPTB3cjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkS55JFWDAcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkKWNMBMKGcjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkBROJYMWUcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkPQ3H2AANcjs.BrushstrokeCache; exports.CANVAS_SIZE_PRESETS = CANVAS_SIZE_PRESETS; exports.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.COLOR_RANGE_PRESETS = COLOR_RANGE_PRESETS; exports.COLOR_RANGE_PRESET_LABELS = COLOR_RANGE_PRESET_LABELS; exports.CONTENT_AWARE_FILL_SAMPLING = CONTENT_AWARE_FILL_SAMPLING; exports.CONTENT_AWARE_FILL_TOOLS = CONTENT_AWARE_FILL_TOOLS; exports.ColorGmm = _chunkUC3PWFM3cjs.ColorGmm; exports.ContentAwareFillSession = ContentAwareFillSession; exports.CoverageMap = _chunkPQ3H2AANcjs.CoverageMap; exports.D50 = _chunkS55JFWDAcjs.D50; exports.D65 = _chunkS55JFWDAcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkQAUIZPYIcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkPQ3H2AANcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkPQ3H2AANcjs.DEFAULT_BRUSH; exports.DEFAULT_CANVAS_VIEWPORT = DEFAULT_CANVAS_VIEWPORT; exports.DEFAULT_CHANNEL_COLOR = DEFAULT_CHANNEL_COLOR; exports.DEFAULT_CONTENT_AWARE_FILL_SETTINGS = DEFAULT_CONTENT_AWARE_FILL_SETTINGS; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkKWNMBMKGcjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkB46UQUDCcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkS55JFWDAcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunkPQ3H2AANcjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunkPQ3H2AANcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkPQ3H2AANcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = _chunkSS53NNZOcjs.DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunkYF3YZZ6Gcjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SELECT_AND_MASK_SETTINGS = DEFAULT_SELECT_AND_MASK_SETTINGS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunkPQ3H2AANcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkQAUIZPYIcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkKWNMBMKGcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkKWNMBMKGcjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkS55JFWDAcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkK6PXS6DOcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkKWNMBMKGcjs.DRY_EPS; exports.DabWalker = _chunkPQ3H2AANcjs.DabWalker; exports.EDGE_COLOR_RADIUS = _chunkS55JFWDAcjs.EDGE_COLOR_RADIUS; exports.EFFECT_LAYER_USES = EFFECT_LAYER_USES; exports.EMPTY_DISTANCE = _chunkSS53NNZOcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkPQ3H2AANcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkKWNMBMKGcjs.EX; exports.EY = _chunkKWNMBMKGcjs.EY; exports.EdgeMap = EdgeMap; exports.FLAG_ALIVE = _chunkKWNMBMKGcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkKWNMBMKGcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkKWNMBMKGcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkKWNMBMKGcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkKWNMBMKGcjs.FLAG_TOP; exports.FLAG_WET = _chunkKWNMBMKGcjs.FLAG_WET; exports.FLAT = _chunkKWNMBMKGcjs.FLAT; exports.FREE_INTERVAL = _chunkKWNMBMKGcjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkS55JFWDAcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GAMMA = _chunkUC3PWFM3cjs.GAMMA; exports.GRAIN_PATTERNS = _chunkPQ3H2AANcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkPQ3H2AANcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = _chunkSS53NNZOcjs.GUIDED_FILTER_EPS; exports.GridGraph = _chunkUC3PWFM3cjs.GridGraph; exports.HIDE = _chunkKWNMBMKGcjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkS55JFWDAcjs.HUE_RANGE_LABELS; exports.HUE_RANGE_PRESETS = HUE_RANGE_PRESETS; exports.IDENTITY_CLONE_TRANSFORM = _chunkYF3YZZ6Gcjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkS55JFWDAcjs.IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_CROP_PRESETS = IMAGE_CROP_PRESETS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.IMAGE_EFFECT_PLACES = IMAGE_EFFECT_PLACES; exports.IMAGE_FILTER_PRESETS = IMAGE_FILTER_PRESETS; exports.IMAGE_PLAYBACK_KIND = IMAGE_PLAYBACK_KIND; exports.IMAGE_TOOL_GROUPS = IMAGE_TOOL_GROUPS; exports.IMAGE_TOOL_SHORTCUTS = IMAGE_TOOL_SHORTCUTS; exports.INTENTS = _chunkBROJYMWUcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunkB46UQUDCcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkS55JFWDAcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkS55JFWDAcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkB46UQUDCcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkS55JFWDAcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkS55JFWDAcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkS55JFWDAcjs.LUMA_709; exports.LayerCompositor = _chunkS55JFWDAcjs.LayerCompositor; exports.LayerEffectError = _chunkB46UQUDCcjs.LayerEffectError; exports.LayerOperationError = _chunkS55JFWDAcjs.LayerOperationError; exports.MARCHING_ANTS_STEP_MS = MARCHING_ANTS_STEP_MS; exports.MASK_EDGE_THRESHOLDS = MASK_EDGE_THRESHOLDS; exports.MASK_FILE_ACCEPT = MASK_FILE_ACCEPT; exports.MAX_BATCH = _chunkKWNMBMKGcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkPQ3H2AANcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_BACKING_SIDE = MAX_CANVAS_BACKING_SIDE; exports.MAX_EFFECT_ANIMATION_MS = _chunkS55JFWDAcjs.MAX_EFFECT_ANIMATION_MS; exports.MAX_EFFECT_REACH = _chunkB46UQUDCcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkS55JFWDAcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkKWNMBMKGcjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkB46UQUDCcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkKWNMBMKGcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkKWNMBMKGcjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkS55JFWDAcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkS55JFWDAcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkPQ3H2AANcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkPQ3H2AANcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkPQ3H2AANcjs.MIXING_MODELS; exports.MixerStroke = _chunkPQ3H2AANcjs.MixerStroke; exports.OPP = _chunkKWNMBMKGcjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkOLNIPTB3cjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunkPQ3H2AANcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkPQ3H2AANcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkPQ3H2AANcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkKWNMBMKGcjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkS55JFWDAcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkKWNMBMKGcjs.PARAM; exports.PARAM_FLOATS = _chunkKWNMBMKGcjs.PARAM_FLOATS; exports.PASTE_MODES = PASTE_MODES; exports.PATH_EDIT_TOOLS = PATH_EDIT_TOOLS; exports.PATTERN_BLOCK_KEYS = _chunkS55JFWDAcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkOLNIPTB3cjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkKWNMBMKGcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkOLNIPTB3cjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkOLNIPTB3cjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkKWNMBMKGcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkOLNIPTB3cjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkKWNMBMKGcjs.PLANE; exports.PLANE_BYTES = _chunkKWNMBMKGcjs.PLANE_BYTES; exports.PREVIEW_SIZE = PREVIEW_SIZE; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkS55JFWDAcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkKWNMBMKGcjs.P_D0; exports.P_EDGE = _chunkKWNMBMKGcjs.P_EDGE; exports.P_FX = _chunkKWNMBMKGcjs.P_FX; exports.P_FY = _chunkKWNMBMKGcjs.P_FY; exports.P_H = _chunkKWNMBMKGcjs.P_H; exports.P_P0 = _chunkKWNMBMKGcjs.P_P0; exports.P_RHO = _chunkKWNMBMKGcjs.P_RHO; exports.P_SW = _chunkKWNMBMKGcjs.P_SW; exports.P_UX = _chunkKWNMBMKGcjs.P_UX; exports.P_UY = _chunkKWNMBMKGcjs.P_UY; exports.PaintExchange = _chunkPQ3H2AANcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkPQ3H2AANcjs.PaintGradientSampler; exports.PaintSourceError = _chunkPQ3H2AANcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaperGrain = _chunkPQ3H2AANcjs.PaperGrain; exports.PathEditGesture = PathEditGesture; exports.PatternPlacement = _chunkB46UQUDCcjs.PatternPlacement; exports.PatternTile = _chunkB46UQUDCcjs.PatternTile; exports.PsdError = _chunkS55JFWDAcjs.PsdError; exports.QUICK_MASK_TARGET = QUICK_MASK_TARGET; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.REFINE_EDIT_KINDS = _chunkUC3PWFM3cjs.REFINE_EDIT_KINDS; exports.REFINE_OUTPUTS = REFINE_OUTPUTS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunkYF3YZZ6Gcjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunkYF3YZZ6Gcjs.RegionPixelSource; exports.RetouchDabStroke = _chunkYF3YZZ6Gcjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkSS53NNZOcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkSS53NNZOcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SELECT_AND_MASK_TOOLS = SELECT_AND_MASK_TOOLS; exports.SELECT_AND_MASK_VIEWS = SELECT_AND_MASK_VIEWS; exports.SET_PLANES = _chunkKWNMBMKGcjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkOLNIPTB3cjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkS55JFWDAcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkS55JFWDAcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkKWNMBMKGcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkKWNMBMKGcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkKWNMBMKGcjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkS55JFWDAcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunkYF3YZZ6Gcjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkKWNMBMKGcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkKWNMBMKGcjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkS55JFWDAcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectAndMaskSession = SelectAndMaskSession; exports.SelectionGesture = SelectionGesture; exports.SelectionWorkerClient = _chunkUC3PWFM3cjs.SelectionWorkerClient; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkPQ3H2AANcjs.SmudgeTip; exports.StrokeCoverage = _chunkPQ3H2AANcjs.StrokeCoverage; exports.SurfaceDraft = _chunk474IQG74cjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkS55JFWDAcjs.TEXT_ALIGNS; exports.TEXT_ORIENTATIONS = _chunkS55JFWDAcjs.TEXT_ORIENTATIONS; exports.TEXT_RENDER_MARGIN = _chunkS55JFWDAcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkS55JFWDAcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunk474IQG74cjs.TILE; exports.TILE_SHIFT = _chunk474IQG74cjs.TILE_SHIFT; exports.TINT_SCALE = _chunkS55JFWDAcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkPQ3H2AANcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkS55JFWDAcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunkYF3YZZ6Gcjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkS55JFWDAcjs.TRANSFORM_ANCHORS; exports.TRANSFORM_ROTATE_HANDLE_OFFSET = TRANSFORM_ROTATE_HANDLE_OFFSET; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunkPQ3H2AANcjs.TileMedium; exports.TilePixelSource = _chunkYF3YZZ6Gcjs.TilePixelSource; exports.TileableNoise = _chunkPQ3H2AANcjs.TileableNoise; exports.TiledSurface = _chunk474IQG74cjs.TiledSurface; exports.TransformTooLargeError = _chunkB46UQUDCcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunkYF3YZZ6Gcjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.UNITS = _chunkUC3PWFM3cjs.UNITS; exports.U_MAX = _chunkKWNMBMKGcjs.U_MAX; exports.VIBRANCE_GREY = _chunkS55JFWDAcjs.VIBRANCE_GREY; exports.W9 = _chunkKWNMBMKGcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkQAUIZPYIcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkQAUIZPYIcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkKWNMBMKGcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkKWNMBMKGcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkKWNMBMKGcjs.WET_TILE; exports.WGSL_HALO = _chunkKWNMBMKGcjs.WGSL_HALO; exports.WGSL_SHADE = _chunkKWNMBMKGcjs.WGSL_SHADE; exports.WGSL_STEP = _chunkKWNMBMKGcjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WORK_PATH_NAME = WORK_PATH_NAME; exports.WORK_SIZE = _chunkUC3PWFM3cjs.WORK_SIZE; exports.WetGpuEngine = _chunkKWNMBMKGcjs.WetGpuEngine; exports.WetMedium = _chunkKWNMBMKGcjs.WetMedium; exports.WetWorkerPool = _chunkKWNMBMKGcjs.WetWorkerPool; exports.WetWorld = _chunkKWNMBMKGcjs.WetWorld; exports.WetWorldError = _chunkKWNMBMKGcjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkS55JFWDAcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkS55JFWDAcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkS55JFWDAcjs.activeEffectSmartFilters; exports.activeLayerAfterRemoval = _chunkS55JFWDAcjs.activeLayerAfterRemoval; exports.activeSmartFilters = _chunkS55JFWDAcjs.activeSmartFilters; exports.addLayerEffect = _chunkS55JFWDAcjs.addLayerEffect; exports.addLayerFilter = _chunkS55JFWDAcjs.addLayerFilter; exports.addLayerOfKind = addLayerOfKind; exports.addPaintGradientStop = _chunkPQ3H2AANcjs.addPaintGradientStop; exports.addSmartFilter = _chunkS55JFWDAcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkS55JFWDAcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkS55JFWDAcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkS55JFWDAcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkS55JFWDAcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.agentDragDraft = agentDragDraft; exports.anchorPoint = _chunkS55JFWDAcjs.anchorPoint; exports.annotationBlend = _chunkS55JFWDAcjs.annotationBlend; exports.annotationLayerFor = _chunkS55JFWDAcjs.annotationLayerFor; exports.annotationLayerName = _chunkS55JFWDAcjs.annotationLayerName; exports.annotationOfLayer = _chunkS55JFWDAcjs.annotationOfLayer; exports.annotationOfShape = _chunkS55JFWDAcjs.annotationOfShape; exports.annotationOfType = _chunkS55JFWDAcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkS55JFWDAcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkS55JFWDAcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkS55JFWDAcjs.applyAdjustments; exports.applyBoxBlur = _chunkS55JFWDAcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkS55JFWDAcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkS55JFWDAcjs.applyDepthMask; exports.applyEdgeUnmix = _chunkS55JFWDAcjs.applyEdgeUnmix; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkS55JFWDAcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkS55JFWDAcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkS55JFWDAcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkS55JFWDAcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkS55JFWDAcjs.applyParams; exports.applyProcess2Adjustments = _chunkS55JFWDAcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkS55JFWDAcjs.applyProcess2Float; exports.applyRefineEdits = _chunkUC3PWFM3cjs.applyRefineEdits; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunkYF3YZZ6Gcjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkS55JFWDAcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkPQ3H2AANcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkPQ3H2AANcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunkYF3YZZ6Gcjs.applyToneToDeepTile; exports.backgroundLayer = _chunkS55JFWDAcjs.backgroundLayer; exports.base64ToBytes = _chunkOLNIPTB3cjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunkMQDIP4CFcjs.bestOffset; exports.blackWhiteGray = _chunkS55JFWDAcjs.blackWhiteGray; exports.blendChannel = _chunkOLNIPTB3cjs.blendChannel; exports.blendImageData = _chunkOLNIPTB3cjs.blendImageData; exports.blendLum = _chunkOLNIPTB3cjs.blendLum; exports.blendPixel = _chunkOLNIPTB3cjs.blendPixel; exports.blendRadius = _chunkPQ3H2AANcjs.blendRadius; exports.blendRgb = _chunkOLNIPTB3cjs.blendRgb; exports.blendTile = _chunkB46UQUDCcjs.blendTile; exports.blenderDab = _chunkPQ3H2AANcjs.blenderDab; exports.blurFilter = _chunkS55JFWDAcjs.blurFilter; exports.borderCoverage = _chunkSS53NNZOcjs.borderCoverage; exports.boxBlur = _chunkUC3PWFM3cjs.boxBlur; exports.boxBlurPixels = _chunkYF3YZZ6Gcjs.boxBlurPixels; exports.boxFrameHit = boxFrameHit; exports.boxFrameOverlay = boxFrameOverlay; exports.boxMean = _chunkSS53NNZOcjs.boxMean; exports.boxPointOf = _chunkS55JFWDAcjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkS55JFWDAcjs.bradfordAdaptation; exports.brushStrokeMask = _chunkUC3PWFM3cjs.brushStrokeMask; exports.brushstrokeDataUrl = _chunkPQ3H2AANcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkPQ3H2AANcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkPQ3H2AANcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkPQ3H2AANcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkPQ3H2AANcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkS55JFWDAcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkS55JFWDAcjs.buildToneLut; exports.builtinPattern = _chunkB46UQUDCcjs.builtinPattern; exports.builtinPatternIds = _chunkB46UQUDCcjs.builtinPatternIds; exports.bytesToBase64 = _chunkOLNIPTB3cjs.bytesToBase64; exports.calculateCropDrag = _chunkS55JFWDAcjs.calculateCropDrag; exports.canShareMemory = _chunkKWNMBMKGcjs.canShareMemory; exports.canvasCompositeOperation = _chunkOLNIPTB3cjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkS55JFWDAcjs.canvasToImagePoint; exports.caretAt = _chunkQAUIZPYIcjs.caretAt; exports.changedTiles = _chunkB46UQUDCcjs.changedTiles; exports.channelThumbnail = channelThumbnail; exports.checkEffectAnimation = checkEffectAnimation; exports.checkEffectTime = checkEffectTime; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkS55JFWDAcjs.clampCropToImage; exports.cleanMixer = _chunkPQ3H2AANcjs.cleanMixer; exports.cloneSamplePoint = _chunkYF3YZZ6Gcjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunk474IQG74cjs.collectTiles; exports.colorBalanceChannel = _chunkS55JFWDAcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.colorRangePreset = colorRangePreset; exports.combineSelections = _chunkSS53NNZOcjs.combineSelections; exports.compareSelectionMasks = compareSelectionMasks; exports.compileAdjustmentLayer = _chunkS55JFWDAcjs.compileAdjustmentLayer; exports.componentPath = _chunkS55JFWDAcjs.componentPath; exports.componentsCoverage = _chunkS55JFWDAcjs.componentsCoverage; exports.compositeDeep = _chunkS55JFWDAcjs.compositeDeep; exports.compositeSurfaceOver = _chunkB46UQUDCcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkSS53NNZOcjs.computeSelectionBounds; exports.contentAwareFill = _chunkMQDIP4CFcjs.contentAwareFill; exports.contentBounds = _chunk474IQG74cjs.contentBounds; exports.contentsBox = _chunkS55JFWDAcjs.contentsBox; exports.contentsSurface = _chunkS55JFWDAcjs.contentsSurface; exports.contractCoverage = _chunkSS53NNZOcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkOLNIPTB3cjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkS55JFWDAcjs.convertToSmartObject; exports.copySmartObject = _chunkS55JFWDAcjs.copySmartObject; exports.cornersFromMatrix = _chunkS55JFWDAcjs.cornersFromMatrix; exports.coverageTileCoord = _chunkPQ3H2AANcjs.coverageTileCoord; exports.coverageToByte = _chunkSS53NNZOcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkS55JFWDAcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkPQ3H2AANcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkQAUIZPYIcjs.createCanvasTextShaper; exports.createGradientSampler = createGradientSampler; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageColorTools = createImageColorTools; exports.createImageEditTools = createImageEditTools; exports.createImageEditorDocument = createImageEditorDocument; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageEffectsToolProvider = createImageEffectsToolProvider; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePlaybackLocator = createImagePlaybackLocator; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSegmentationToolProvider = createImageSegmentationToolProvider; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageSubjectSelectionTool = createImageSubjectSelectionTool; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunkQAUIZPYIcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkQAUIZPYIcjs.createOutlineTextShaper; exports.createPigment = _chunkOLNIPTB3cjs.createPigment; exports.createPigmentTools = _chunkKWNMBMKGcjs.createPigmentTools; exports.createSelectionMask = _chunkSS53NNZOcjs.createSelectionMask; exports.createShapeLayer = _chunkS55JFWDAcjs.createShapeLayer; exports.createTypeLayer = _chunkS55JFWDAcjs.createTypeLayer; exports.createWetGpuEngine = _chunkKWNMBMKGcjs.createWetGpuEngine; exports.cssFont = _chunkQAUIZPYIcjs.cssFont; exports.cssFontFamily = _chunkQAUIZPYIcjs.cssFontFamily; exports.curveLut = _chunkB46UQUDCcjs.curveLut; exports.curveLutFromLevels = _chunkS55JFWDAcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkPQ3H2AANcjs.dabCoverage; exports.dabRect = _chunkPQ3H2AANcjs.dabRect; exports.decodeDeepSurface = _chunkS55JFWDAcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkS55JFWDAcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkS55JFWDAcjs.decodeLayerMask; exports.decodeMergedImage = _chunkS55JFWDAcjs.decodeMergedImage; exports.decodePlanes = _chunkS55JFWDAcjs.decodePlanes; exports.decodePng = _chunkOLNIPTB3cjs.decodePng; exports.decodePngDataUrl = _chunkS55JFWDAcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkSS53NNZOcjs.decodeSelectionRle; exports.decontaminateColors = _chunkSS53NNZOcjs.decontaminateColors; exports.deepBytes = _chunkOLNIPTB3cjs.deepBytes; exports.deepTile = _chunkOLNIPTB3cjs.deepTile; exports.defaultActiveLayerId = _chunkS55JFWDAcjs.defaultActiveLayerId; exports.defaultAdjustmentParams = _chunkS55JFWDAcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkB46UQUDCcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkB46UQUDCcjs.defaultLayerEffect; exports.defaultShapeName = _chunkS55JFWDAcjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkS55JFWDAcjs.depthMaskAlpha; exports.depthOf = _chunkOLNIPTB3cjs.depthOf; exports.depthRasterMask = _chunkS55JFWDAcjs.depthRasterMask; exports.describeChannel = describeChannel; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkS55JFWDAcjs.describeTransform; exports.deserializeChannels = deserializeChannels; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkS55JFWDAcjs.deserializeEffects; exports.deserializeLayer = _chunkS55JFWDAcjs.deserializeLayer; exports.deserializeLayers = _chunkS55JFWDAcjs.deserializeLayers; exports.deserializeMask = _chunkUC3PWFM3cjs.deserializeMask; exports.deserializePatterns = _chunkS55JFWDAcjs.deserializePatterns; exports.deserializeSelection = _chunkSS53NNZOcjs.deserializeSelection; exports.despillEdge = _chunkS55JFWDAcjs.despillEdge; exports.developFilter = _chunkS55JFWDAcjs.developFilter; exports.developFromAdjustments = _chunkS55JFWDAcjs.developFromAdjustments; exports.developTarget = _chunkS55JFWDAcjs.developTarget; exports.dexp = _chunkKWNMBMKGcjs.dexp; exports.dilateMask = _chunkMQDIP4CFcjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkSS53NNZOcjs.distanceTransform; exports.dlog = _chunkKWNMBMKGcjs.dlog; exports.documentContents = _chunkS55JFWDAcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunkYF3YZZ6Gcjs.dodgeBurn; exports.dodgeBurnCurve = _chunkYF3YZZ6Gcjs.dodgeBurnCurve; exports.downloadMaskImage = downloadMaskImage; exports.downloadPsd = downloadPsd; exports.dpow = _chunkKWNMBMKGcjs.dpow; exports.dragWarpMeshPoint = _chunkQAUIZPYIcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkKWNMBMKGcjs.dsincos; exports.duplicateLayer = _chunkS55JFWDAcjs.duplicateLayer; exports.edgeBits = _chunkKWNMBMKGcjs.edgeBits; exports.edgeWidth = _chunkSS53NNZOcjs.edgeWidth; exports.effectColorHex = _chunkB46UQUDCcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectLayerTiming = effectLayerTiming; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkB46UQUDCcjs.effectReach; exports.effectiveLayerMask = _chunkS55JFWDAcjs.effectiveLayerMask; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkB46UQUDCcjs.effectsFingerprint; exports.effectsMargin = _chunkB46UQUDCcjs.effectsMargin; exports.effectsScale = _chunkB46UQUDCcjs.effectsScale; exports.ellipsePoints = _chunkUC3PWFM3cjs.ellipsePoints; exports.ellipseSelection = _chunkUC3PWFM3cjs.ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunk474IQG74cjs.emptySurface; exports.encodeDeepSurface = _chunkS55JFWDAcjs.encodeDeepSurface; exports.encodePng = _chunkOLNIPTB3cjs.encodePng; exports.encodeRle = _chunkS55JFWDAcjs.encodeRle; exports.encodeSelectionRle = _chunkSS53NNZOcjs.encodeSelectionRle; exports.encodeSurface = _chunkS55JFWDAcjs.encodeSurface; exports.evalWarpMesh = _chunkQAUIZPYIcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkS55JFWDAcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkPQ3H2AANcjs.exchangeRates; exports.expNeg = _chunkKWNMBMKGcjs.expNeg; exports.expandCoverage = _chunkSS53NNZOcjs.expandCoverage; exports.exportPsd = _chunkS55JFWDAcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkSS53NNZOcjs.featherCoverage; exports.fillRect = _chunk474IQG74cjs.fillRect; exports.filmPixel = _chunkKWNMBMKGcjs.filmPixel; exports.filmReflectance = _chunkKWNMBMKGcjs.filmReflectance; exports.filterMaskCoverage = _chunkS55JFWDAcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkB46UQUDCcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findSky = _chunkUC3PWFM3cjs.findSky; exports.findSubject = _chunkUC3PWFM3cjs.findSubject; exports.findWebGpu = _chunkKWNMBMKGcjs.findWebGpu; exports.finishTile = _chunk474IQG74cjs.finishTile; exports.fitParagraphRuns = _chunkQAUIZPYIcjs.fitParagraphRuns; exports.fitRuns = _chunkQAUIZPYIcjs.fitRuns; exports.flattenLayers = _chunkB46UQUDCcjs.flattenLayers; exports.flattenPath = _chunkS55JFWDAcjs.flattenPath; exports.flipCorners = _chunkS55JFWDAcjs.flipCorners; exports.flowField = _chunkKWNMBMKGcjs.flowField; exports.focusArea = _chunkUC3PWFM3cjs.focusArea; exports.followLayerMove = _chunkS55JFWDAcjs.followLayerMove; exports.fontOf = _chunkQAUIZPYIcjs.fontOf; exports.forgetSelectAndMaskSettings = forgetSelectAndMaskSettings; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkSS53NNZOcjs.fullSelection; exports.gaussianBlur = _chunkK6PXS6DOcjs.gaussianBlur; exports.geometryHomography = _chunkS55JFWDAcjs.geometryHomography; exports.getAnnotationBounds = _chunkS55JFWDAcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkS55JFWDAcjs.getCropCursor; exports.getRotatedSize = _chunkS55JFWDAcjs.getRotatedSize; exports.getViewportMetrics = _chunkS55JFWDAcjs.getViewportMetrics; exports.getViewportProjection = _chunkS55JFWDAcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.grabCutLabels = _chunkUC3PWFM3cjs.grabCutLabels; exports.gradientDabColor = _chunkPQ3H2AANcjs.gradientDabColor; exports.grainCatch = _chunkPQ3H2AANcjs.grainCatch; exports.grainHeights = _chunkPQ3H2AANcjs.grainHeights; exports.greyMorphology = _chunkSS53NNZOcjs.greyMorphology; exports.groupLayers = _chunkS55JFWDAcjs.groupLayers; exports.growSelection = growSelection; exports.guidePlanes = _chunkSS53NNZOcjs.guidePlanes; exports.guidedFilterColor = _chunkSS53NNZOcjs.guidedFilterColor; exports.handleMaskViewKey = handleMaskViewKey; exports.handlePaintShortcut = handlePaintShortcut; exports.handleQuickMaskKey = handleQuickMaskKey; exports.handleSelectionShortcut = handleSelectionShortcut; exports.hasActiveEffects = _chunkB46UQUDCcjs.hasActiveEffects; exports.hasEdgeUnmix = _chunkS55JFWDAcjs.hasEdgeUnmix; exports.hasLayersBelow = hasLayersBelow; exports.hasResampledLegacyMask = _chunkS55JFWDAcjs.hasResampledLegacyMask; exports.hasSoftBand = _chunkS55JFWDAcjs.hasSoftBand; exports.hasSurface = _chunkS55JFWDAcjs.hasSurface; exports.hasWarp = _chunkS55JFWDAcjs.hasWarp; exports.hash2 = _chunkPQ3H2AANcjs.hash2; exports.hashMaskContent = _chunkSS53NNZOcjs.hashMaskContent; exports.hashNoise = _chunkB46UQUDCcjs.hashNoise; exports.healPixels = _chunkYF3YZZ6Gcjs.healPixels; exports.hexToPaintRgb = _chunkPQ3H2AANcjs.hexToPaintRgb; exports.hexToRgb = _chunkS55JFWDAcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkS55JFWDAcjs.hitTestAnnotation; exports.hitTestCrop = _chunkS55JFWDAcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkS55JFWDAcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkS55JFWDAcjs.hueRangeTables; exports.hueRangeWeight = _chunkS55JFWDAcjs.hueRangeWeight; exports.hueSaturation = _chunkS55JFWDAcjs.hueSaturation; exports.identityCurve = _chunkS55JFWDAcjs.identityCurve; exports.identityLevels = _chunkS55JFWDAcjs.identityLevels; exports.identityTransform = _chunkS55JFWDAcjs.identityTransform; exports.identityWarpMesh = _chunkQAUIZPYIcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imagePanelTool = imagePanelTool; exports.imagePlaybackPanel = imagePlaybackPanel; exports.imageToCanvasPoint = _chunkS55JFWDAcjs.imageToCanvasPoint; exports.imageToolCanvasMode = imageToolCanvasMode; exports.imageToolForShortcut = imageToolForShortcut; exports.imageToolGroup = imageToolGroup; exports.imageToolLabel = imageToolLabel; exports.imageToolPanel = imageToolPanel; exports.importPsd = _chunkS55JFWDAcjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkB46UQUDCcjs.insertLayer; exports.inspectMaskEdge = inspectMaskEdge; exports.instancesOf = _chunkS55JFWDAcjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkS55JFWDAcjs.invertMatrix3; exports.invertSelection = _chunkSS53NNZOcjs.invertSelection; exports.isActiveFilter = _chunkS55JFWDAcjs.isActiveFilter; exports.isActiveVectorMask = _chunkS55JFWDAcjs.isActiveVectorMask; exports.isAdjustmentKind = _chunkS55JFWDAcjs.isAdjustmentKind; exports.isBitDepth = _chunkOLNIPTB3cjs.isBitDepth; exports.isBlendMode = _chunkOLNIPTB3cjs.isBlendMode; exports.isBrushstrokeBrush = _chunkPQ3H2AANcjs.isBrushstrokeBrush; exports.isColorRangePreset = isColorRangePreset; exports.isContentsDecoded = _chunkS55JFWDAcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkS55JFWDAcjs.isDefaultDepthMask; exports.isGradientPaint = _chunkPQ3H2AANcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunkYF3YZZ6Gcjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkS55JFWDAcjs.isIdentityTransform; exports.isInterpolation = _chunkB46UQUDCcjs.isInterpolation; exports.isLayerEffectKind = _chunkB46UQUDCcjs.isLayerEffectKind; exports.isLayerLocked = _chunkB46UQUDCcjs.isLayerLocked; exports.isLegacyShape = _chunkS55JFWDAcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPaintableLayer = _chunkS55JFWDAcjs.isPaintableLayer; exports.isPainterlyBlendMode = _chunkOLNIPTB3cjs.isPainterlyBlendMode; exports.isPathEditTool = isPathEditTool; exports.isPng = _chunkOLNIPTB3cjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkS55JFWDAcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkS55JFWDAcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkSS53NNZOcjs.isSelectionEmpty; exports.isSelectionMode = _chunkSS53NNZOcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkOLNIPTB3cjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkS55JFWDAcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkS55JFWDAcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkS55JFWDAcjs.isTransformAnchor; exports.isValidWarp = _chunkS55JFWDAcjs.isValidWarp; exports.keepDeepSamples = _chunkOLNIPTB3cjs.keepDeepSamples; exports.keepMainPieces = _chunkUC3PWFM3cjs.keepMainPieces; exports.kelvinToTemperature = _chunkS55JFWDAcjs.kelvinToTemperature; exports.keysWeight = _chunkB46UQUDCcjs.keysWeight; exports.latticeViscosity = _chunkKWNMBMKGcjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkB46UQUDCcjs.layerEffectFields; exports.layerEffectLabel = _chunkB46UQUDCcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkS55JFWDAcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkS55JFWDAcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkS55JFWDAcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkS55JFWDAcjs.layerMaskKey; exports.layerMaskSelection = _chunkS55JFWDAcjs.layerMaskSelection; exports.layerMenu = layerMenu; exports.layerName = _chunkS55JFWDAcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerPanels = layerPanels; exports.layerThumbnailClick = layerThumbnailClick; exports.layerTree = _chunkS55JFWDAcjs.layerTree; exports.layerTypeLabel = _chunkS55JFWDAcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkS55JFWDAcjs.layersFromLegacy; exports.layoutText = _chunkQAUIZPYIcjs.layoutText; exports.legacyAdjustmentLayer = _chunkS55JFWDAcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkS55JFWDAcjs.legacyMaskOf; exports.legacyView = _chunkS55JFWDAcjs.legacyView; exports.lerpPigment = _chunkOLNIPTB3cjs.lerpPigment; exports.lerpPigmentInto = _chunkOLNIPTB3cjs.lerpPigmentInto; exports.levelsValue = _chunkS55JFWDAcjs.levelsValue; exports.linearSrgbToXy = _chunkS55JFWDAcjs.linearSrgbToXy; exports.linearToSrgb = _chunkS55JFWDAcjs.linearToSrgb; exports.linearToSrgb8 = _chunkKWNMBMKGcjs.linearToSrgb8; exports.liveComponent = _chunkS55JFWDAcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkS55JFWDAcjs.liveShapeSubpaths; exports.liveWire = liveWire; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkPQ3H2AANcjs.loadMixer; exports.loadOpenTypeFont = _chunkLCCMOWR7cjs.loadOpenTypeFont; exports.loadWetKernel = _chunkKWNMBMKGcjs.loadWetKernel; exports.luma = _chunkYF3YZZ6Gcjs.luma; exports.magicWand = magicWand; exports.magneticAnchorSpacing = magneticAnchorSpacing; exports.mapCropHandle = _chunkS55JFWDAcjs.mapCropHandle; exports.mapLayer = _chunkB46UQUDCcjs.mapLayer; exports.mapSubpaths = _chunkS55JFWDAcjs.mapSubpaths; exports.maskBounds = _chunkMQDIP4CFcjs.maskBounds; exports.maskCoverageOverCanvas = _chunkS55JFWDAcjs.maskCoverageOverCanvas; exports.maskFileName = maskFileName; exports.maskNameFromFile = maskNameFromFile; exports.maskSummary = maskSummary; exports.maskThumbnailClick = maskThumbnailClick; exports.matrixFromCorners = _chunkS55JFWDAcjs.matrixFromCorners; exports.matrixFromParams = _chunkS55JFWDAcjs.matrixFromParams; exports.measureCanvasViewport = measureCanvasViewport; exports.membraneFill = _chunkMQDIP4CFcjs.membraneFill; exports.mergeLayerEffect = _chunkB46UQUDCcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkS55JFWDAcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunkPQ3H2AANcjs.mix32; exports.mixPigment8 = _chunkOLNIPTB3cjs.mixPigment8; exports.mixPigmentRgb = _chunkOLNIPTB3cjs.mixPigmentRgb; exports.mixPigments = _chunkOLNIPTB3cjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunkPQ3H2AANcjs.mixerRates; exports.modifySelection = _chunkSS53NNZOcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkS55JFWDAcjs.moveLayer; exports.moveSmartFilter = _chunkS55JFWDAcjs.moveSmartFilter; exports.mulMatrix3 = _chunkS55JFWDAcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkS55JFWDAcjs.neutralHueRange; exports.newContentsId = _chunkS55JFWDAcjs.newContentsId; exports.newEffectId = _chunkB46UQUDCcjs.newEffectId; exports.newLayerId = _chunkS55JFWDAcjs.newLayerId; exports.newLayerOptions = newLayerOptions; exports.newPathId = newPathId; exports.normalizeAdjustmentLayer = _chunkS55JFWDAcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkS55JFWDAcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkS55JFWDAcjs.normalizeAngle; exports.normalizeBlendMode = _chunkOLNIPTB3cjs.normalizeBlendMode; exports.normalizeBlender = _chunkPQ3H2AANcjs.normalizeBlender; exports.normalizeBrush = _chunkPQ3H2AANcjs.normalizeBrush; exports.normalizeFilter = _chunkS55JFWDAcjs.normalizeFilter; exports.normalizeFlow = _chunkKWNMBMKGcjs.normalizeFlow; exports.normalizeHexColor = _chunkPQ3H2AANcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkB46UQUDCcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkS55JFWDAcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkS55JFWDAcjs.normalizeLiveShape; exports.normalizeMixer = _chunkPQ3H2AANcjs.normalizeMixer; exports.normalizePlacement = _chunkS55JFWDAcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkS55JFWDAcjs.normalizeProcessVersion; exports.normalizeRect = _chunkUC3PWFM3cjs.normalizeRect; exports.normalizeRefineEdgeParams = _chunkSS53NNZOcjs.normalizeRefineEdgeParams; exports.normalizeRetouch = _chunkYF3YZZ6Gcjs.normalizeRetouch; exports.normalizeShapePaint = _chunkS55JFWDAcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkS55JFWDAcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkS55JFWDAcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkPQ3H2AANcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkS55JFWDAcjs.normalizeSubpaths; exports.normalizeText = _chunkS55JFWDAcjs.normalizeText; exports.normalizeTilt = _chunkKWNMBMKGcjs.normalizeTilt; exports.normalizeWetParams = _chunkKWNMBMKGcjs.normalizeWetParams; exports.offsetLayer = _chunkS55JFWDAcjs.offsetLayer; exports.offsetShape = _chunkS55JFWDAcjs.offsetShape; exports.offsetSmartObject = _chunkS55JFWDAcjs.offsetSmartObject; exports.offsetVectorMask = _chunkS55JFWDAcjs.offsetVectorMask; exports.openMaskFile = openMaskFile; exports.openPsdFile = openPsdFile; exports.otsuThreshold = _chunkUC3PWFM3cjs.otsuThreshold; exports.packRgba = _chunk474IQG74cjs.packRgba; exports.packWetParams = _chunkKWNMBMKGcjs.packWetParams; exports.paintGradientMappingFor = _chunkPQ3H2AANcjs.paintGradientMappingFor; exports.paintPathStroke = _chunkPQ3H2AANcjs.paintPathStroke; exports.paintSourceColor = _chunkPQ3H2AANcjs.paintSourceColor; exports.paintSourceCss = _chunkPQ3H2AANcjs.paintSourceCss; exports.paragraphRanges = _chunkQAUIZPYIcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkS55JFWDAcjs.parseAdjustmentBlock; exports.parseBlend = _chunkS55JFWDAcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkOLNIPTB3cjs.parseDataUrl; exports.parseEffectColor = _chunkB46UQUDCcjs.parseEffectColor; exports.parseLfx2 = _chunkS55JFWDAcjs.parseLfx2; exports.parseLrfx = _chunkS55JFWDAcjs.parseLrfx; exports.parseOpenTypeFont = _chunkLCCMOWR7cjs.parseOpenTypeFont; exports.parsePaintSource = _chunkPQ3H2AANcjs.parsePaintSource; exports.parsePatternBlock = _chunkS55JFWDAcjs.parsePatternBlock; exports.parseSelectionMode = _chunkSS53NNZOcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkS55JFWDAcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkS55JFWDAcjs.patchParagraphStyle; exports.patchTextStyle = _chunkS55JFWDAcjs.patchTextStyle; exports.pathAnchorCount = pathAnchorCount; exports.pathBounds = pathBounds; exports.pathStrokeCoverage = _chunkPQ3H2AANcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkPQ3H2AANcjs.pathStrokeDabs; exports.pathSvgData = pathSvgData; exports.pathToSelection = pathToSelection; exports.perDabStrength = _chunkYF3YZZ6Gcjs.perDabStrength; exports.photoFilterMatrix = _chunkS55JFWDAcjs.photoFilterMatrix; exports.pigment8 = _chunkOLNIPTB3cjs.pigment8; exports.pigmentColor = _chunkKWNMBMKGcjs.pigmentColor; exports.pigmentOf = _chunkKWNMBMKGcjs.pigmentOf; exports.pixelLayerBounds = _chunkS55JFWDAcjs.pixelLayerBounds; exports.pixelLayers = _chunkS55JFWDAcjs.pixelLayers; exports.pixelPigment = _chunkKWNMBMKGcjs.pixelPigment; exports.placeContents = _chunkS55JFWDAcjs.placeContents; exports.placeLayer = _chunkS55JFWDAcjs.placeLayer; exports.placementAt = _chunkS55JFWDAcjs.placementAt; exports.placementBounds = _chunkS55JFWDAcjs.placementBounds; exports.placementGeometry = _chunkS55JFWDAcjs.placementGeometry; exports.planImageToolPlayback = planImageToolPlayback; exports.planOutlineTrace = planOutlineTrace; exports.pngDataUrl = _chunkOLNIPTB3cjs.pngDataUrl; exports.pointerPressure = _chunkKWNMBMKGcjs.pointerPressure; exports.pointerStrokeSample = _chunkKWNMBMKGcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkKWNMBMKGcjs.pointerStrokeSamples; exports.polygonCoverage = _chunkUC3PWFM3cjs.polygonCoverage; exports.polygonCoverageBox = _chunkUC3PWFM3cjs.polygonCoverageBox; exports.polygonSelection = _chunkUC3PWFM3cjs.polygonSelection; exports.posterizeValue = _chunkS55JFWDAcjs.posterizeValue; exports.presetWarp = _chunkS55JFWDAcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkS55JFWDAcjs.projectImagePoint; exports.projectImageRect = _chunkS55JFWDAcjs.projectImageRect; exports.projectMaskCoverage = _chunkS55JFWDAcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkOLNIPTB3cjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkS55JFWDAcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkS55JFWDAcjs.psdToLayers; exports.pullWarpMesh = _chunkQAUIZPYIcjs.pullWarpMesh; exports.put255 = _chunkPQ3H2AANcjs.put255; exports.quadFrameOverlay = quadFrameOverlay; exports.quickMaskPixels = quickMaskPixels; exports.quickSelectStroke = _chunkUC3PWFM3cjs.quickSelectStroke; exports.rand01 = _chunkPQ3H2AANcjs.rand01; exports.randSigned = _chunkPQ3H2AANcjs.randSigned; exports.rangeLightness = _chunkS55JFWDAcjs.rangeLightness; exports.rasterContents = _chunkS55JFWDAcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkS55JFWDAcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkS55JFWDAcjs.rasterizeCoverage; exports.rasterizeDab = _chunkPQ3H2AANcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkS55JFWDAcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkOLNIPTB3cjs.readDeepRegion; exports.readEdgeColor = _chunkS55JFWDAcjs.readEdgeColor; exports.readPaintSource = _chunkPQ3H2AANcjs.readPaintSource; exports.readPaths = readPaths; exports.readPixel = _chunk474IQG74cjs.readPixel; exports.readPsd = _chunkS55JFWDAcjs.readPsd; exports.readRegion = _chunk474IQG74cjs.readRegion; exports.readShapeComponents = _chunkS55JFWDAcjs.readShapeComponents; exports.readSourceRegion = _chunkYF3YZZ6Gcjs.readSourceRegion; exports.rectSelection = _chunkUC3PWFM3cjs.rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkB46UQUDCcjs.reduceSurface; exports.referencePoint = _chunkS55JFWDAcjs.referencePoint; exports.refineCoverage = _chunkSS53NNZOcjs.refineCoverage; exports.refineEdgeHalo = _chunkSS53NNZOcjs.refineEdgeHalo; exports.refineSelection = _chunkSS53NNZOcjs.refineSelection; exports.reflectanceToRgb = _chunkOLNIPTB3cjs.reflectanceToRgb; exports.removeAlpha = _chunkS55JFWDAcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkS55JFWDAcjs.removeLayer; exports.removeLayerEffect = _chunkS55JFWDAcjs.removeLayerEffect; exports.removeLayerFilter = _chunkS55JFWDAcjs.removeLayerFilter; exports.removePaintGradientStop = _chunkPQ3H2AANcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkS55JFWDAcjs.removeSmartFilter; exports.renderBrushstroke = _chunkPQ3H2AANcjs.renderBrushstroke; exports.renderLayerEffects = _chunkB46UQUDCcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkS55JFWDAcjs.renderShape; exports.renderShapeRect = _chunkS55JFWDAcjs.renderShapeRect; exports.renderSmartObject = _chunkS55JFWDAcjs.renderSmartObject; exports.renderText = _chunkS55JFWDAcjs.renderText; exports.replaceContents = _chunkS55JFWDAcjs.replaceContents; exports.replaceTextRange = _chunkS55JFWDAcjs.replaceTextRange; exports.requireLayer = _chunkS55JFWDAcjs.requireLayer; exports.requireOperation = _chunkS55JFWDAcjs.requireOperation; exports.requireShapeLayer = _chunkS55JFWDAcjs.requireShapeLayer; exports.requireSmartObject = _chunkS55JFWDAcjs.requireSmartObject; exports.requireTypeLayer = _chunkS55JFWDAcjs.requireTypeLayer; exports.requireUnlocked = _chunkS55JFWDAcjs.requireUnlocked; exports.rerender = _chunkS55JFWDAcjs.rerender; exports.rerenderShape = _chunkS55JFWDAcjs.rerenderShape; exports.rerenderText = _chunkS55JFWDAcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkSS53NNZOcjs.resizeSelection; exports.resizeWarpMesh = _chunkQAUIZPYIcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkS55JFWDAcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkPQ3H2AANcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.resolveVectorMasks = _chunkS55JFWDAcjs.resolveVectorMasks; exports.restyleRange = _chunkQAUIZPYIcjs.restyleRange; exports.retouchFilter = _chunkYF3YZZ6Gcjs.retouchFilter; exports.reversePaintGradient = _chunkPQ3H2AANcjs.reversePaintGradient; exports.rgbToGray = _chunkS55JFWDAcjs.rgbToGray; exports.rgbToHsl = _chunkS55JFWDAcjs.rgbToHsl; exports.rgbToReflectance = _chunkOLNIPTB3cjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunkYF3YZZ6Gcjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkS55JFWDAcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkS55JFWDAcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.runSelectionJob = _chunkUC3PWFM3cjs.runSelectionJob; exports.sameCanvasViewport = sameCanvasViewport; exports.sampleLut = _chunkS55JFWDAcjs.sampleLut; exports.sampleToneLut = _chunkS55JFWDAcjs.sampleToneLut; exports.saturationOf = _chunkYF3YZZ6Gcjs.saturationOf; exports.scaleLayerEffect = _chunkB46UQUDCcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkPQ3H2AANcjs.scalePaintGradient; exports.seamlessClone = _chunkMQDIP4CFcjs.seamlessClone; exports.seedFromString = _chunkPQ3H2AANcjs.seedFromString; exports.segmentToSelection = segmentToSelection; exports.segmentationOutlines = segmentationOutlines; exports.segmentsToSelection = segmentsToSelection; exports.selectObjectIn = _chunkUC3PWFM3cjs.selectObjectIn; exports.selectSimilar = selectSimilar; exports.selectionArea = _chunkSS53NNZOcjs.selectionArea; exports.selectionDiffPixels = selectionDiffPixels; exports.selectionFromCoverage = _chunkSS53NNZOcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkSS53NNZOcjs.selectionFromPixels; exports.selectionFromRegion = _chunkSS53NNZOcjs.selectionFromRegion; exports.selectionFromTiles = _chunkSS53NNZOcjs.selectionFromTiles; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionRing = selectionRing; exports.selectionToCoverage = _chunkSS53NNZOcjs.selectionToCoverage; exports.selectionToPixels = _chunkSS53NNZOcjs.selectionToPixels; exports.selectionToSubpaths = selectionToSubpaths; exports.selectionUncertainty = selectionUncertainty; exports.selectionValueAt = _chunkSS53NNZOcjs.selectionValueAt; exports.serializeChannels = serializeChannels; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkS55JFWDAcjs.serializeContents; exports.serializeEffects = _chunkS55JFWDAcjs.serializeEffects; exports.serializeLayer = _chunkS55JFWDAcjs.serializeLayer; exports.serializeLayers = _chunkS55JFWDAcjs.serializeLayers; exports.serializeLayersExternal = _chunkS55JFWDAcjs.serializeLayersExternal; exports.serializeMask = _chunkUC3PWFM3cjs.serializeMask; exports.serializePaths = serializePaths; exports.serializePatterns = _chunkS55JFWDAcjs.serializePatterns; exports.serializeSelection = _chunkSS53NNZOcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkS55JFWDAcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkS55JFWDAcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkS55JFWDAcjs.setLayerMask; exports.setLayerProperties = _chunkS55JFWDAcjs.setLayerProperties; exports.setLum = _chunkOLNIPTB3cjs.setLum; exports.setPigmentColor = _chunkOLNIPTB3cjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkS55JFWDAcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkS55JFWDAcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkS55JFWDAcjs.setSmartPlacement; exports.shadeTile = _chunkKWNMBMKGcjs.shadeTile; exports.shapeAsPixelLayer = _chunkS55JFWDAcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkS55JFWDAcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkS55JFWDAcjs.shapeGeometryBounds; exports.shapeLayers = _chunkS55JFWDAcjs.shapeLayers; exports.shapeOutline = _chunkS55JFWDAcjs.shapeOutline; exports.shapeRenderClip = _chunkS55JFWDAcjs.shapeRenderClip; exports.shiftCoverage = _chunkSS53NNZOcjs.shiftCoverage; exports.simplifyPixelPath = simplifyPixelPath; exports.skinToneRange = skinToneRange; exports.slicSuperpixels = _chunkUC3PWFM3cjs.slicSuperpixels; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkS55JFWDAcjs.smartObjectLayers; exports.smoothCoverage = _chunkSS53NNZOcjs.smoothCoverage; exports.smoothPoints = _chunkPQ3H2AANcjs.smoothPoints; exports.smoothnessWeights = _chunkUC3PWFM3cjs.smoothnessWeights; exports.smudgeEffect = _chunkYF3YZZ6Gcjs.smudgeEffect; exports.snapPolygonToEdges = snapPolygonToEdges; exports.snapTo45 = snapTo45; exports.snapToEdge = snapToEdge; exports.softMaskToSelection = _chunkUC3PWFM3cjs.softMaskToSelection; exports.solidPaint = _chunkPQ3H2AANcjs.solidPaint; exports.solidSurface = _chunk474IQG74cjs.solidSurface; exports.solveMembrane = _chunkMQDIP4CFcjs.solveMembrane; exports.spliceRuns = _chunkQAUIZPYIcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunkYF3YZZ6Gcjs.sponge; exports.spongeEffect = _chunkYF3YZZ6Gcjs.spongeEffect; exports.spotHealPixels = _chunkYF3YZZ6Gcjs.spotHealPixels; exports.spotHealWindow = _chunkYF3YZZ6Gcjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkKWNMBMKGcjs.srgbByteToLinear; exports.srgbDecode = _chunkOLNIPTB3cjs.srgbDecode; exports.srgbEncode = _chunkOLNIPTB3cjs.srgbEncode; exports.srgbToLinear = _chunkS55JFWDAcjs.srgbToLinear; exports.standardBlendMode = _chunkOLNIPTB3cjs.standardBlendMode; exports.startMarchingAnts = startMarchingAnts; exports.startSelectionWorker = _chunkUC3PWFM3cjs.startSelectionWorker; exports.stepSlotTs = _chunkKWNMBMKGcjs.stepSlotTs; exports.strokeGrainCatch = _chunkPQ3H2AANcjs.strokeGrainCatch; exports.styleAt = _chunkQAUIZPYIcjs.styleAt; exports.subpathsToSvgPath = subpathsToSvgPath; exports.sumHistograms = sumHistograms; exports.superpixelSaliency = _chunkUC3PWFM3cjs.superpixelSaliency; exports.surfaceBytes = _chunk474IQG74cjs.surfaceBytes; exports.surfaceDepth = _chunkOLNIPTB3cjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkOLNIPTB3cjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunk474IQG74cjs.surfaceFromPixels; exports.surfacesEqual = _chunk474IQG74cjs.surfacesEqual; exports.tempTintToXy = _chunkS55JFWDAcjs.tempTintToXy; exports.temperatureToKelvin = _chunkS55JFWDAcjs.temperatureToKelvin; exports.textIndexAt = _chunkQAUIZPYIcjs.textIndexAt; exports.textMatrix = _chunkS55JFWDAcjs.textMatrix; exports.textOrientation = _chunkS55JFWDAcjs.textOrientation; exports.textOutlines = _chunkS55JFWDAcjs.textOutlines; exports.textRange = _chunkS55JFWDAcjs.textRange; exports.tileCoord = _chunk474IQG74cjs.tileCoord; exports.tileKey = _chunk474IQG74cjs.tileKey; exports.tileRect = _chunk474IQG74cjs.tileRect; exports.tileSamples = _chunkOLNIPTB3cjs.tileSamples; exports.tileSamples16 = _chunkOLNIPTB3cjs.tileSamples16; exports.tileSamples32 = _chunkOLNIPTB3cjs.tileSamples32; exports.tilesInRect = _chunk474IQG74cjs.tilesInRect; exports.tipFalloff = _chunkPQ3H2AANcjs.tipFalloff; exports.tipReach = _chunkPQ3H2AANcjs.tipReach; exports.tipShape = _chunkPQ3H2AANcjs.tipShape; exports.to16From32 = _chunkOLNIPTB3cjs.to16From32; exports.to16From8 = _chunkOLNIPTB3cjs.to16From8; exports.to32From16 = _chunkOLNIPTB3cjs.to32From16; exports.to32From8 = _chunkOLNIPTB3cjs.to32From8; exports.to8From16 = _chunkOLNIPTB3cjs.to8From16; exports.to8From32 = _chunkOLNIPTB3cjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkS55JFWDAcjs.toTextSpace; exports.toneCurve = _chunkS55JFWDAcjs.toneCurve; exports.toneLuts = _chunkS55JFWDAcjs.toneLuts; exports.toneOf = _chunkYF3YZZ6Gcjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkS55JFWDAcjs.transformHomography; exports.transformMap = _chunkS55JFWDAcjs.transformMap; exports.transformShapeComponents = _chunkS55JFWDAcjs.transformShapeComponents; exports.transformSurface = _chunkB46UQUDCcjs.transformSurface; exports.transformTypeLayer = _chunkS55JFWDAcjs.transformTypeLayer; exports.transformVectorMask = _chunkS55JFWDAcjs.transformVectorMask; exports.transformedBounds = _chunkB46UQUDCcjs.transformedBounds; exports.transformedBox = _chunkS55JFWDAcjs.transformedBox; exports.transformedPoint = _chunkS55JFWDAcjs.transformedPoint; exports.translateLayer = _chunkS55JFWDAcjs.translateLayer; exports.translateSurface = _chunk474IQG74cjs.translateSurface; exports.typeAsPixelLayer = _chunkS55JFWDAcjs.typeAsPixelLayer; exports.typeFrame = _chunkS55JFWDAcjs.typeFrame; exports.typeFromAnnotation = _chunkS55JFWDAcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkS55JFWDAcjs.typeLayerName; exports.ungroupLayer = _chunkS55JFWDAcjs.ungroupLayer; exports.uniformTile = _chunk474IQG74cjs.uniformTile; exports.unionRect = _chunkS55JFWDAcjs.unionRect; exports.unprojectCanvasPoint = _chunkS55JFWDAcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkS55JFWDAcjs.updateLayerEffect; exports.updateLayerFilter = _chunkS55JFWDAcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkS55JFWDAcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkPQ3H2AANcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkS55JFWDAcjs.updateShapeLayer; exports.updateSmartFilter = _chunkS55JFWDAcjs.updateSmartFilter; exports.updateTypeLayer = _chunkS55JFWDAcjs.updateTypeLayer; exports.upscaleRegion = _chunkUC3PWFM3cjs.upscaleRegion; exports.userErrorMessage = _chunkS55JFWDAcjs.userErrorMessage; exports.uvToXy = _chunkS55JFWDAcjs.uvToXy; exports.validateEffectGradient = _chunkB46UQUDCcjs.validateEffectGradient; exports.validateLayerEffect = _chunkB46UQUDCcjs.validateLayerEffect; exports.validateLayerEffects = _chunkB46UQUDCcjs.validateLayerEffects; exports.vectorMaskBounds = _chunkS55JFWDAcjs.vectorMaskBounds; exports.vectorMaskCoverage = _chunkS55JFWDAcjs.vectorMaskCoverage; exports.vectorMaskThumbnail = _chunkS55JFWDAcjs.vectorMaskThumbnail; exports.vectorMaskThumbnailClick = vectorMaskThumbnailClick; exports.versionedDescriptorBytes = _chunkS55JFWDAcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkS55JFWDAcjs.vibranceLinear; exports.vibrancePixel = _chunkS55JFWDAcjs.vibrancePixel; exports.walkDabs = _chunkPQ3H2AANcjs.walkDabs; exports.warpMeshEditPoints = _chunkQAUIZPYIcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkQAUIZPYIcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkQAUIZPYIcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkQAUIZPYIcjs.warpPresetMesh; exports.warpSurface = _chunkB46UQUDCcjs.warpSurface; exports.watchCanvasViewport = watchCanvasViewport; exports.wbMatrix = _chunkS55JFWDAcjs.wbMatrix; exports.wetGpuSupport = _chunkKWNMBMKGcjs.wetGpuSupport; exports.wetSimdSupported = _chunkKWNMBMKGcjs.wetSimdSupported; exports.wetSupport = _chunkKWNMBMKGcjs.wetSupport; exports.whiteBalanceFromSample = _chunkS55JFWDAcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkS55JFWDAcjs.whiteBalanceMatrix; exports.withBackgroundOpacity = withBackgroundOpacity; exports.withFilterMaskSurface = _chunkS55JFWDAcjs.withFilterMaskSurface; exports.withImagePlayback = withImagePlayback; exports.withNewIds = _chunkS55JFWDAcjs.withNewIds; exports.workImage = _chunkUC3PWFM3cjs.workImage; exports.workLuma = _chunkUC3PWFM3cjs.workLuma; exports.workPlanes = _chunkUC3PWFM3cjs.workPlanes; exports.writeAdjustmentBlock = _chunkS55JFWDAcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkOLNIPTB3cjs.writeDeepRegion; exports.writeLfx2 = _chunkS55JFWDAcjs.writeLfx2; exports.writePatternBlock = _chunkS55JFWDAcjs.writePatternBlock; exports.writePsd = _chunkS55JFWDAcjs.writePsd; exports.writeRegion = _chunk474IQG74cjs.writeRegion; exports.xyToTempTint = _chunkS55JFWDAcjs.xyToTempTint; exports.xyToUv = _chunkS55JFWDAcjs.xyToUv;
|
|
23247
|
+
|
|
23248
|
+
|
|
23249
|
+
exports.ADJUSTMENT_KEYS = _chunkS55JFWDAcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkS55JFWDAcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkS55JFWDAcjs.ADJUSTMENT_LUT_SIZE; exports.ANCHOR_FRACTION = _chunkS55JFWDAcjs.ANCHOR_FRACTION; exports.AS_SHOT_KELVIN = _chunkS55JFWDAcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkS55JFWDAcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkS55JFWDAcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkOLNIPTB3cjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkOLNIPTB3cjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkS55JFWDAcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkXFYLA3ZOcjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkBROJYMWUcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkPQ3H2AANcjs.BrushstrokeCache; exports.CANVAS_SIZE_PRESETS = CANVAS_SIZE_PRESETS; exports.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.COLOR_RANGE_PRESETS = COLOR_RANGE_PRESETS; exports.COLOR_RANGE_PRESET_LABELS = COLOR_RANGE_PRESET_LABELS; exports.CONTENT_AWARE_FILL_SAMPLING = CONTENT_AWARE_FILL_SAMPLING; exports.CONTENT_AWARE_FILL_TOOLS = CONTENT_AWARE_FILL_TOOLS; exports.ColorGmm = _chunkUC3PWFM3cjs.ColorGmm; exports.ContentAwareFillSession = ContentAwareFillSession; exports.CoverageMap = _chunkPQ3H2AANcjs.CoverageMap; exports.D50 = _chunkS55JFWDAcjs.D50; exports.D65 = _chunkS55JFWDAcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkQAUIZPYIcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkPQ3H2AANcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkPQ3H2AANcjs.DEFAULT_BRUSH; exports.DEFAULT_CANVAS_VIEWPORT = DEFAULT_CANVAS_VIEWPORT; exports.DEFAULT_CHANNEL_COLOR = DEFAULT_CHANNEL_COLOR; exports.DEFAULT_CONTENT_AWARE_FILL_SETTINGS = DEFAULT_CONTENT_AWARE_FILL_SETTINGS; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkXFYLA3ZOcjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkB46UQUDCcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkS55JFWDAcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunkPQ3H2AANcjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunkPQ3H2AANcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkPQ3H2AANcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = _chunkSS53NNZOcjs.DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunkYF3YZZ6Gcjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SELECT_AND_MASK_SETTINGS = DEFAULT_SELECT_AND_MASK_SETTINGS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunkPQ3H2AANcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkQAUIZPYIcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkXFYLA3ZOcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkXFYLA3ZOcjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkS55JFWDAcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkK6PXS6DOcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkXFYLA3ZOcjs.DRY_EPS; exports.DabWalker = _chunkPQ3H2AANcjs.DabWalker; exports.EDGE_COLOR_RADIUS = _chunkS55JFWDAcjs.EDGE_COLOR_RADIUS; exports.EFFECT_LAYER_USES = EFFECT_LAYER_USES; exports.EMPTY_DISTANCE = _chunkSS53NNZOcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkPQ3H2AANcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkXFYLA3ZOcjs.EX; exports.EY = _chunkXFYLA3ZOcjs.EY; exports.EdgeMap = EdgeMap; exports.FLAG_ALIVE = _chunkXFYLA3ZOcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkXFYLA3ZOcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkXFYLA3ZOcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkXFYLA3ZOcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkXFYLA3ZOcjs.FLAG_TOP; exports.FLAG_WET = _chunkXFYLA3ZOcjs.FLAG_WET; exports.FLAT = _chunkXFYLA3ZOcjs.FLAT; exports.FREE_INTERVAL = _chunkXFYLA3ZOcjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkS55JFWDAcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GAMMA = _chunkUC3PWFM3cjs.GAMMA; exports.GRAIN_PATTERNS = _chunkPQ3H2AANcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkPQ3H2AANcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = _chunkSS53NNZOcjs.GUIDED_FILTER_EPS; exports.GridGraph = _chunkUC3PWFM3cjs.GridGraph; exports.HIDE = _chunkXFYLA3ZOcjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkS55JFWDAcjs.HUE_RANGE_LABELS; exports.HUE_RANGE_PRESETS = HUE_RANGE_PRESETS; exports.IDENTITY_CLONE_TRANSFORM = _chunkYF3YZZ6Gcjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkS55JFWDAcjs.IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_CROP_PRESETS = IMAGE_CROP_PRESETS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.IMAGE_EFFECT_PLACES = IMAGE_EFFECT_PLACES; exports.IMAGE_FILTER_PRESETS = IMAGE_FILTER_PRESETS; exports.IMAGE_PLAYBACK_KIND = IMAGE_PLAYBACK_KIND; exports.IMAGE_TOOL_GROUPS = IMAGE_TOOL_GROUPS; exports.IMAGE_TOOL_SHORTCUTS = IMAGE_TOOL_SHORTCUTS; exports.INTENTS = _chunkBROJYMWUcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunkB46UQUDCcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkS55JFWDAcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkS55JFWDAcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkB46UQUDCcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkS55JFWDAcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkS55JFWDAcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkS55JFWDAcjs.LUMA_709; exports.LayerCompositor = _chunkS55JFWDAcjs.LayerCompositor; exports.LayerEffectError = _chunkB46UQUDCcjs.LayerEffectError; exports.LayerOperationError = _chunkS55JFWDAcjs.LayerOperationError; exports.MARCHING_ANTS_STEP_MS = MARCHING_ANTS_STEP_MS; exports.MASK_EDGE_THRESHOLDS = MASK_EDGE_THRESHOLDS; exports.MASK_FILE_ACCEPT = MASK_FILE_ACCEPT; exports.MAX_BATCH = _chunkXFYLA3ZOcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkPQ3H2AANcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_BACKING_SIDE = MAX_CANVAS_BACKING_SIDE; exports.MAX_EFFECT_ANIMATION_MS = _chunkS55JFWDAcjs.MAX_EFFECT_ANIMATION_MS; exports.MAX_EFFECT_REACH = _chunkB46UQUDCcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkS55JFWDAcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkXFYLA3ZOcjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkB46UQUDCcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkXFYLA3ZOcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkXFYLA3ZOcjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkS55JFWDAcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkS55JFWDAcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkPQ3H2AANcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkPQ3H2AANcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkPQ3H2AANcjs.MIXING_MODELS; exports.MixerStroke = _chunkPQ3H2AANcjs.MixerStroke; exports.OPP = _chunkXFYLA3ZOcjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkOLNIPTB3cjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunkPQ3H2AANcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkPQ3H2AANcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkPQ3H2AANcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkXFYLA3ZOcjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkS55JFWDAcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkXFYLA3ZOcjs.PARAM; exports.PARAM_FLOATS = _chunkXFYLA3ZOcjs.PARAM_FLOATS; exports.PASTE_MODES = PASTE_MODES; exports.PATH_EDIT_TOOLS = PATH_EDIT_TOOLS; exports.PATTERN_BLOCK_KEYS = _chunkS55JFWDAcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkOLNIPTB3cjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkXFYLA3ZOcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkOLNIPTB3cjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkOLNIPTB3cjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkXFYLA3ZOcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkOLNIPTB3cjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkXFYLA3ZOcjs.PLANE; exports.PLANE_BYTES = _chunkXFYLA3ZOcjs.PLANE_BYTES; exports.PREVIEW_SIZE = PREVIEW_SIZE; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkS55JFWDAcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkXFYLA3ZOcjs.P_D0; exports.P_EDGE = _chunkXFYLA3ZOcjs.P_EDGE; exports.P_FX = _chunkXFYLA3ZOcjs.P_FX; exports.P_FY = _chunkXFYLA3ZOcjs.P_FY; exports.P_H = _chunkXFYLA3ZOcjs.P_H; exports.P_P0 = _chunkXFYLA3ZOcjs.P_P0; exports.P_RHO = _chunkXFYLA3ZOcjs.P_RHO; exports.P_SW = _chunkXFYLA3ZOcjs.P_SW; exports.P_UX = _chunkXFYLA3ZOcjs.P_UX; exports.P_UY = _chunkXFYLA3ZOcjs.P_UY; exports.PaintExchange = _chunkPQ3H2AANcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkPQ3H2AANcjs.PaintGradientSampler; exports.PaintSourceError = _chunkPQ3H2AANcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaperGrain = _chunkPQ3H2AANcjs.PaperGrain; exports.PathEditGesture = PathEditGesture; exports.PatternPlacement = _chunkB46UQUDCcjs.PatternPlacement; exports.PatternTile = _chunkB46UQUDCcjs.PatternTile; exports.PsdError = _chunkS55JFWDAcjs.PsdError; exports.QUICK_MASK_TARGET = QUICK_MASK_TARGET; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.REFINE_EDIT_KINDS = _chunkUC3PWFM3cjs.REFINE_EDIT_KINDS; exports.REFINE_OUTPUTS = REFINE_OUTPUTS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunkYF3YZZ6Gcjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunkYF3YZZ6Gcjs.RegionPixelSource; exports.RetouchDabStroke = _chunkYF3YZZ6Gcjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkSS53NNZOcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkSS53NNZOcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SELECT_AND_MASK_TOOLS = SELECT_AND_MASK_TOOLS; exports.SELECT_AND_MASK_VIEWS = SELECT_AND_MASK_VIEWS; exports.SET_PLANES = _chunkXFYLA3ZOcjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkOLNIPTB3cjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkS55JFWDAcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkS55JFWDAcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkXFYLA3ZOcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkXFYLA3ZOcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkXFYLA3ZOcjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkS55JFWDAcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunkYF3YZZ6Gcjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkXFYLA3ZOcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkXFYLA3ZOcjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkS55JFWDAcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectAndMaskSession = SelectAndMaskSession; exports.SelectionGesture = SelectionGesture; exports.SelectionWorkerClient = _chunkUC3PWFM3cjs.SelectionWorkerClient; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkPQ3H2AANcjs.SmudgeTip; exports.StrokeCoverage = _chunkPQ3H2AANcjs.StrokeCoverage; exports.SurfaceDraft = _chunk474IQG74cjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkS55JFWDAcjs.TEXT_ALIGNS; exports.TEXT_ORIENTATIONS = _chunkS55JFWDAcjs.TEXT_ORIENTATIONS; exports.TEXT_RENDER_MARGIN = _chunkS55JFWDAcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkS55JFWDAcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunk474IQG74cjs.TILE; exports.TILE_SHIFT = _chunk474IQG74cjs.TILE_SHIFT; exports.TINT_SCALE = _chunkS55JFWDAcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkPQ3H2AANcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkS55JFWDAcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunkYF3YZZ6Gcjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkS55JFWDAcjs.TRANSFORM_ANCHORS; exports.TRANSFORM_ROTATE_HANDLE_OFFSET = TRANSFORM_ROTATE_HANDLE_OFFSET; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunkPQ3H2AANcjs.TileMedium; exports.TilePixelSource = _chunkYF3YZZ6Gcjs.TilePixelSource; exports.TileableNoise = _chunkPQ3H2AANcjs.TileableNoise; exports.TiledSurface = _chunk474IQG74cjs.TiledSurface; exports.TransformTooLargeError = _chunkB46UQUDCcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunkYF3YZZ6Gcjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.UNITS = _chunkUC3PWFM3cjs.UNITS; exports.U_MAX = _chunkXFYLA3ZOcjs.U_MAX; exports.VIBRANCE_GREY = _chunkS55JFWDAcjs.VIBRANCE_GREY; exports.W9 = _chunkXFYLA3ZOcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkQAUIZPYIcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkQAUIZPYIcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkXFYLA3ZOcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkXFYLA3ZOcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkXFYLA3ZOcjs.WET_TILE; exports.WGSL_HALO = _chunkXFYLA3ZOcjs.WGSL_HALO; exports.WGSL_SHADE = _chunkXFYLA3ZOcjs.WGSL_SHADE; exports.WGSL_STEP = _chunkXFYLA3ZOcjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WORK_PATH_NAME = WORK_PATH_NAME; exports.WORK_SIZE = _chunkUC3PWFM3cjs.WORK_SIZE; exports.WetGpuEngine = _chunkXFYLA3ZOcjs.WetGpuEngine; exports.WetMedium = _chunkXFYLA3ZOcjs.WetMedium; exports.WetWorkerPool = _chunkXFYLA3ZOcjs.WetWorkerPool; exports.WetWorld = _chunkXFYLA3ZOcjs.WetWorld; exports.WetWorldError = _chunkXFYLA3ZOcjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkS55JFWDAcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkS55JFWDAcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkS55JFWDAcjs.activeEffectSmartFilters; exports.activeLayerAfterRemoval = _chunkS55JFWDAcjs.activeLayerAfterRemoval; exports.activeSmartFilters = _chunkS55JFWDAcjs.activeSmartFilters; exports.addLayerEffect = _chunkS55JFWDAcjs.addLayerEffect; exports.addLayerFilter = _chunkS55JFWDAcjs.addLayerFilter; exports.addLayerOfKind = addLayerOfKind; exports.addPaintGradientStop = _chunkPQ3H2AANcjs.addPaintGradientStop; exports.addSmartFilter = _chunkS55JFWDAcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkS55JFWDAcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkS55JFWDAcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkS55JFWDAcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkS55JFWDAcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.agentDragDraft = agentDragDraft; exports.anchorPoint = _chunkS55JFWDAcjs.anchorPoint; exports.annotationBlend = _chunkS55JFWDAcjs.annotationBlend; exports.annotationLayerFor = _chunkS55JFWDAcjs.annotationLayerFor; exports.annotationLayerName = _chunkS55JFWDAcjs.annotationLayerName; exports.annotationOfLayer = _chunkS55JFWDAcjs.annotationOfLayer; exports.annotationOfShape = _chunkS55JFWDAcjs.annotationOfShape; exports.annotationOfType = _chunkS55JFWDAcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkS55JFWDAcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkS55JFWDAcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkS55JFWDAcjs.applyAdjustments; exports.applyBoxBlur = _chunkS55JFWDAcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkS55JFWDAcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkS55JFWDAcjs.applyDepthMask; exports.applyEdgeUnmix = _chunkS55JFWDAcjs.applyEdgeUnmix; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkS55JFWDAcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkS55JFWDAcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkS55JFWDAcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkS55JFWDAcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkS55JFWDAcjs.applyParams; exports.applyProcess2Adjustments = _chunkS55JFWDAcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkS55JFWDAcjs.applyProcess2Float; exports.applyRefineEdits = _chunkUC3PWFM3cjs.applyRefineEdits; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunkYF3YZZ6Gcjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkS55JFWDAcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkPQ3H2AANcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkPQ3H2AANcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunkYF3YZZ6Gcjs.applyToneToDeepTile; exports.backgroundLayer = _chunkS55JFWDAcjs.backgroundLayer; exports.base64ToBytes = _chunkOLNIPTB3cjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunkMQDIP4CFcjs.bestOffset; exports.blackWhiteGray = _chunkS55JFWDAcjs.blackWhiteGray; exports.blendChannel = _chunkOLNIPTB3cjs.blendChannel; exports.blendImageData = _chunkOLNIPTB3cjs.blendImageData; exports.blendLum = _chunkOLNIPTB3cjs.blendLum; exports.blendPixel = _chunkOLNIPTB3cjs.blendPixel; exports.blendRadius = _chunkPQ3H2AANcjs.blendRadius; exports.blendRgb = _chunkOLNIPTB3cjs.blendRgb; exports.blendTile = _chunkB46UQUDCcjs.blendTile; exports.blenderDab = _chunkPQ3H2AANcjs.blenderDab; exports.blurFilter = _chunkS55JFWDAcjs.blurFilter; exports.borderCoverage = _chunkSS53NNZOcjs.borderCoverage; exports.boxBlur = _chunkUC3PWFM3cjs.boxBlur; exports.boxBlurPixels = _chunkYF3YZZ6Gcjs.boxBlurPixels; exports.boxFrameHit = boxFrameHit; exports.boxFrameOverlay = boxFrameOverlay; exports.boxMean = _chunkSS53NNZOcjs.boxMean; exports.boxPointOf = _chunkS55JFWDAcjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkS55JFWDAcjs.bradfordAdaptation; exports.brushStrokeMask = _chunkUC3PWFM3cjs.brushStrokeMask; exports.brushstrokeDataUrl = _chunkPQ3H2AANcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkPQ3H2AANcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkPQ3H2AANcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkPQ3H2AANcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkPQ3H2AANcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkS55JFWDAcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkS55JFWDAcjs.buildToneLut; exports.builtinPattern = _chunkB46UQUDCcjs.builtinPattern; exports.builtinPatternIds = _chunkB46UQUDCcjs.builtinPatternIds; exports.bytesToBase64 = _chunkOLNIPTB3cjs.bytesToBase64; exports.calculateCropDrag = _chunkS55JFWDAcjs.calculateCropDrag; exports.canShareMemory = _chunkXFYLA3ZOcjs.canShareMemory; exports.canvasCompositeOperation = _chunkOLNIPTB3cjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkS55JFWDAcjs.canvasToImagePoint; exports.caretAt = _chunkQAUIZPYIcjs.caretAt; exports.changedTiles = _chunkB46UQUDCcjs.changedTiles; exports.channelThumbnail = channelThumbnail; exports.checkEffectAnimation = checkEffectAnimation; exports.checkEffectTime = checkEffectTime; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkS55JFWDAcjs.clampCropToImage; exports.cleanMixer = _chunkPQ3H2AANcjs.cleanMixer; exports.cloneSamplePoint = _chunkYF3YZZ6Gcjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunk474IQG74cjs.collectTiles; exports.colorBalanceChannel = _chunkS55JFWDAcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.colorRangePreset = colorRangePreset; exports.combineSelections = _chunkSS53NNZOcjs.combineSelections; exports.compareSelectionMasks = compareSelectionMasks; exports.compileAdjustmentLayer = _chunkS55JFWDAcjs.compileAdjustmentLayer; exports.componentPath = _chunkS55JFWDAcjs.componentPath; exports.componentsCoverage = _chunkS55JFWDAcjs.componentsCoverage; exports.compositeDeep = _chunkS55JFWDAcjs.compositeDeep; exports.compositeSurfaceOver = _chunkB46UQUDCcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkSS53NNZOcjs.computeSelectionBounds; exports.contentAwareFill = _chunkMQDIP4CFcjs.contentAwareFill; exports.contentBounds = _chunk474IQG74cjs.contentBounds; exports.contentsBox = _chunkS55JFWDAcjs.contentsBox; exports.contentsSurface = _chunkS55JFWDAcjs.contentsSurface; exports.contractCoverage = _chunkSS53NNZOcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkOLNIPTB3cjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkS55JFWDAcjs.convertToSmartObject; exports.copySmartObject = _chunkS55JFWDAcjs.copySmartObject; exports.cornersFromMatrix = _chunkS55JFWDAcjs.cornersFromMatrix; exports.coverageTileCoord = _chunkPQ3H2AANcjs.coverageTileCoord; exports.coverageToByte = _chunkSS53NNZOcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkS55JFWDAcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkPQ3H2AANcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkQAUIZPYIcjs.createCanvasTextShaper; exports.createGradientSampler = createGradientSampler; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageColorTools = createImageColorTools; exports.createImageEditTools = createImageEditTools; exports.createImageEditorDocument = createImageEditorDocument; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageEffectsToolProvider = createImageEffectsToolProvider; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePlaybackLocator = createImagePlaybackLocator; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSegmentationToolProvider = createImageSegmentationToolProvider; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageSubjectSelectionTool = createImageSubjectSelectionTool; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunkQAUIZPYIcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkQAUIZPYIcjs.createOutlineTextShaper; exports.createPigment = _chunkOLNIPTB3cjs.createPigment; exports.createPigmentTools = _chunkXFYLA3ZOcjs.createPigmentTools; exports.createSelectionMask = _chunkSS53NNZOcjs.createSelectionMask; exports.createShapeLayer = _chunkS55JFWDAcjs.createShapeLayer; exports.createTypeLayer = _chunkS55JFWDAcjs.createTypeLayer; exports.createWetGpuEngine = _chunkXFYLA3ZOcjs.createWetGpuEngine; exports.cssFont = _chunkQAUIZPYIcjs.cssFont; exports.cssFontFamily = _chunkQAUIZPYIcjs.cssFontFamily; exports.curveLut = _chunkB46UQUDCcjs.curveLut; exports.curveLutFromLevels = _chunkS55JFWDAcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkPQ3H2AANcjs.dabCoverage; exports.dabRect = _chunkPQ3H2AANcjs.dabRect; exports.decodeDeepSurface = _chunkS55JFWDAcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkS55JFWDAcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkS55JFWDAcjs.decodeLayerMask; exports.decodeMergedImage = _chunkS55JFWDAcjs.decodeMergedImage; exports.decodePlanes = _chunkS55JFWDAcjs.decodePlanes; exports.decodePng = _chunkOLNIPTB3cjs.decodePng; exports.decodePngDataUrl = _chunkS55JFWDAcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkSS53NNZOcjs.decodeSelectionRle; exports.decontaminateColors = _chunkSS53NNZOcjs.decontaminateColors; exports.deepBytes = _chunkOLNIPTB3cjs.deepBytes; exports.deepTile = _chunkOLNIPTB3cjs.deepTile; exports.defaultActiveLayerId = _chunkS55JFWDAcjs.defaultActiveLayerId; exports.defaultAdjustmentParams = _chunkS55JFWDAcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkB46UQUDCcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkB46UQUDCcjs.defaultLayerEffect; exports.defaultShapeName = _chunkS55JFWDAcjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkS55JFWDAcjs.depthMaskAlpha; exports.depthOf = _chunkOLNIPTB3cjs.depthOf; exports.depthRasterMask = _chunkS55JFWDAcjs.depthRasterMask; exports.describeChannel = describeChannel; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkS55JFWDAcjs.describeTransform; exports.deserializeChannels = deserializeChannels; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkS55JFWDAcjs.deserializeEffects; exports.deserializeLayer = _chunkS55JFWDAcjs.deserializeLayer; exports.deserializeLayers = _chunkS55JFWDAcjs.deserializeLayers; exports.deserializeMask = _chunkUC3PWFM3cjs.deserializeMask; exports.deserializePatterns = _chunkS55JFWDAcjs.deserializePatterns; exports.deserializeSelection = _chunkSS53NNZOcjs.deserializeSelection; exports.despillEdge = _chunkS55JFWDAcjs.despillEdge; exports.developFilter = _chunkS55JFWDAcjs.developFilter; exports.developFromAdjustments = _chunkS55JFWDAcjs.developFromAdjustments; exports.developTarget = _chunkS55JFWDAcjs.developTarget; exports.dexp = _chunkXFYLA3ZOcjs.dexp; exports.dilateMask = _chunkMQDIP4CFcjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkSS53NNZOcjs.distanceTransform; exports.dlog = _chunkXFYLA3ZOcjs.dlog; exports.documentContents = _chunkS55JFWDAcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunkYF3YZZ6Gcjs.dodgeBurn; exports.dodgeBurnCurve = _chunkYF3YZZ6Gcjs.dodgeBurnCurve; exports.downloadMaskImage = downloadMaskImage; exports.downloadPsd = downloadPsd; exports.dpow = _chunkXFYLA3ZOcjs.dpow; exports.dragWarpMeshPoint = _chunkQAUIZPYIcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkXFYLA3ZOcjs.dsincos; exports.duplicateLayer = _chunkS55JFWDAcjs.duplicateLayer; exports.edgeBits = _chunkXFYLA3ZOcjs.edgeBits; exports.edgeWidth = _chunkSS53NNZOcjs.edgeWidth; exports.effectColorHex = _chunkB46UQUDCcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectLayerTiming = effectLayerTiming; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkB46UQUDCcjs.effectReach; exports.effectiveLayerMask = _chunkS55JFWDAcjs.effectiveLayerMask; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkB46UQUDCcjs.effectsFingerprint; exports.effectsMargin = _chunkB46UQUDCcjs.effectsMargin; exports.effectsScale = _chunkB46UQUDCcjs.effectsScale; exports.ellipsePoints = _chunkUC3PWFM3cjs.ellipsePoints; exports.ellipseSelection = _chunkUC3PWFM3cjs.ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunk474IQG74cjs.emptySurface; exports.encodeDeepSurface = _chunkS55JFWDAcjs.encodeDeepSurface; exports.encodePng = _chunkOLNIPTB3cjs.encodePng; exports.encodeRle = _chunkS55JFWDAcjs.encodeRle; exports.encodeSelectionRle = _chunkSS53NNZOcjs.encodeSelectionRle; exports.encodeSurface = _chunkS55JFWDAcjs.encodeSurface; exports.evalWarpMesh = _chunkQAUIZPYIcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkS55JFWDAcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkPQ3H2AANcjs.exchangeRates; exports.expNeg = _chunkXFYLA3ZOcjs.expNeg; exports.expandCoverage = _chunkSS53NNZOcjs.expandCoverage; exports.exportPsd = _chunkS55JFWDAcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkSS53NNZOcjs.featherCoverage; exports.fillRect = _chunk474IQG74cjs.fillRect; exports.filmPixel = _chunkXFYLA3ZOcjs.filmPixel; exports.filmReflectance = _chunkXFYLA3ZOcjs.filmReflectance; exports.filterMaskCoverage = _chunkS55JFWDAcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkB46UQUDCcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findSky = _chunkUC3PWFM3cjs.findSky; exports.findSubject = _chunkUC3PWFM3cjs.findSubject; exports.findWebGpu = _chunkXFYLA3ZOcjs.findWebGpu; exports.finishTile = _chunk474IQG74cjs.finishTile; exports.fitParagraphRuns = _chunkQAUIZPYIcjs.fitParagraphRuns; exports.fitRuns = _chunkQAUIZPYIcjs.fitRuns; exports.flattenLayers = _chunkB46UQUDCcjs.flattenLayers; exports.flattenPath = _chunkS55JFWDAcjs.flattenPath; exports.flipCorners = _chunkS55JFWDAcjs.flipCorners; exports.flowField = _chunkXFYLA3ZOcjs.flowField; exports.focusArea = _chunkUC3PWFM3cjs.focusArea; exports.followLayerMove = _chunkS55JFWDAcjs.followLayerMove; exports.fontOf = _chunkQAUIZPYIcjs.fontOf; exports.forgetSelectAndMaskSettings = forgetSelectAndMaskSettings; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkSS53NNZOcjs.fullSelection; exports.gaussianBlur = _chunkK6PXS6DOcjs.gaussianBlur; exports.geometryHomography = _chunkS55JFWDAcjs.geometryHomography; exports.getAnnotationBounds = _chunkS55JFWDAcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkS55JFWDAcjs.getCropCursor; exports.getRotatedSize = _chunkS55JFWDAcjs.getRotatedSize; exports.getViewportMetrics = _chunkS55JFWDAcjs.getViewportMetrics; exports.getViewportProjection = _chunkS55JFWDAcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.grabCutLabels = _chunkUC3PWFM3cjs.grabCutLabels; exports.gradientDabColor = _chunkPQ3H2AANcjs.gradientDabColor; exports.grainCatch = _chunkPQ3H2AANcjs.grainCatch; exports.grainHeights = _chunkPQ3H2AANcjs.grainHeights; exports.greyMorphology = _chunkSS53NNZOcjs.greyMorphology; exports.groupLayers = _chunkS55JFWDAcjs.groupLayers; exports.growSelection = growSelection; exports.guidePlanes = _chunkSS53NNZOcjs.guidePlanes; exports.guidedFilterColor = _chunkSS53NNZOcjs.guidedFilterColor; exports.handleMaskViewKey = handleMaskViewKey; exports.handlePaintShortcut = handlePaintShortcut; exports.handleQuickMaskKey = handleQuickMaskKey; exports.handleSelectionShortcut = handleSelectionShortcut; exports.hasActiveEffects = _chunkB46UQUDCcjs.hasActiveEffects; exports.hasEdgeUnmix = _chunkS55JFWDAcjs.hasEdgeUnmix; exports.hasLayersBelow = hasLayersBelow; exports.hasResampledLegacyMask = _chunkS55JFWDAcjs.hasResampledLegacyMask; exports.hasSoftBand = _chunkS55JFWDAcjs.hasSoftBand; exports.hasSurface = _chunkS55JFWDAcjs.hasSurface; exports.hasWarp = _chunkS55JFWDAcjs.hasWarp; exports.hash2 = _chunkPQ3H2AANcjs.hash2; exports.hashMaskContent = _chunkSS53NNZOcjs.hashMaskContent; exports.hashNoise = _chunkB46UQUDCcjs.hashNoise; exports.healPixels = _chunkYF3YZZ6Gcjs.healPixels; exports.hexToPaintRgb = _chunkPQ3H2AANcjs.hexToPaintRgb; exports.hexToRgb = _chunkS55JFWDAcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkS55JFWDAcjs.hitTestAnnotation; exports.hitTestCrop = _chunkS55JFWDAcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkS55JFWDAcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkS55JFWDAcjs.hueRangeTables; exports.hueRangeWeight = _chunkS55JFWDAcjs.hueRangeWeight; exports.hueSaturation = _chunkS55JFWDAcjs.hueSaturation; exports.identityCurve = _chunkS55JFWDAcjs.identityCurve; exports.identityLevels = _chunkS55JFWDAcjs.identityLevels; exports.identityTransform = _chunkS55JFWDAcjs.identityTransform; exports.identityWarpMesh = _chunkQAUIZPYIcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imagePanelTool = imagePanelTool; exports.imagePlaybackPanel = imagePlaybackPanel; exports.imageToCanvasPoint = _chunkS55JFWDAcjs.imageToCanvasPoint; exports.imageToolCanvasMode = imageToolCanvasMode; exports.imageToolForShortcut = imageToolForShortcut; exports.imageToolGroup = imageToolGroup; exports.imageToolLabel = imageToolLabel; exports.imageToolPanel = imageToolPanel; exports.importPsd = _chunkS55JFWDAcjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkB46UQUDCcjs.insertLayer; exports.inspectMaskEdge = inspectMaskEdge; exports.instancesOf = _chunkS55JFWDAcjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkS55JFWDAcjs.invertMatrix3; exports.invertSelection = _chunkSS53NNZOcjs.invertSelection; exports.isActiveFilter = _chunkS55JFWDAcjs.isActiveFilter; exports.isActiveVectorMask = _chunkS55JFWDAcjs.isActiveVectorMask; exports.isAdjustmentKind = _chunkS55JFWDAcjs.isAdjustmentKind; exports.isBitDepth = _chunkOLNIPTB3cjs.isBitDepth; exports.isBlendMode = _chunkOLNIPTB3cjs.isBlendMode; exports.isBrushstrokeBrush = _chunkPQ3H2AANcjs.isBrushstrokeBrush; exports.isColorRangePreset = isColorRangePreset; exports.isContentsDecoded = _chunkS55JFWDAcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkS55JFWDAcjs.isDefaultDepthMask; exports.isGradientPaint = _chunkPQ3H2AANcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunkYF3YZZ6Gcjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkS55JFWDAcjs.isIdentityTransform; exports.isInterpolation = _chunkB46UQUDCcjs.isInterpolation; exports.isLayerEffectKind = _chunkB46UQUDCcjs.isLayerEffectKind; exports.isLayerLocked = _chunkB46UQUDCcjs.isLayerLocked; exports.isLegacyShape = _chunkS55JFWDAcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPaintableLayer = _chunkS55JFWDAcjs.isPaintableLayer; exports.isPainterlyBlendMode = _chunkOLNIPTB3cjs.isPainterlyBlendMode; exports.isPathEditTool = isPathEditTool; exports.isPng = _chunkOLNIPTB3cjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkS55JFWDAcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkS55JFWDAcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkSS53NNZOcjs.isSelectionEmpty; exports.isSelectionMode = _chunkSS53NNZOcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkOLNIPTB3cjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkS55JFWDAcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkS55JFWDAcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkS55JFWDAcjs.isTransformAnchor; exports.isValidWarp = _chunkS55JFWDAcjs.isValidWarp; exports.keepDeepSamples = _chunkOLNIPTB3cjs.keepDeepSamples; exports.keepMainPieces = _chunkUC3PWFM3cjs.keepMainPieces; exports.kelvinToTemperature = _chunkS55JFWDAcjs.kelvinToTemperature; exports.keysWeight = _chunkB46UQUDCcjs.keysWeight; exports.latticeViscosity = _chunkXFYLA3ZOcjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkB46UQUDCcjs.layerEffectFields; exports.layerEffectLabel = _chunkB46UQUDCcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkS55JFWDAcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkS55JFWDAcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkS55JFWDAcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkS55JFWDAcjs.layerMaskKey; exports.layerMaskSelection = _chunkS55JFWDAcjs.layerMaskSelection; exports.layerMenu = layerMenu; exports.layerName = _chunkS55JFWDAcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerPanels = layerPanels; exports.layerThumbnailClick = layerThumbnailClick; exports.layerTree = _chunkS55JFWDAcjs.layerTree; exports.layerTypeLabel = _chunkS55JFWDAcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkS55JFWDAcjs.layersFromLegacy; exports.layoutText = _chunkQAUIZPYIcjs.layoutText; exports.legacyAdjustmentLayer = _chunkS55JFWDAcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkS55JFWDAcjs.legacyMaskOf; exports.legacyView = _chunkS55JFWDAcjs.legacyView; exports.lerpPigment = _chunkOLNIPTB3cjs.lerpPigment; exports.lerpPigmentInto = _chunkOLNIPTB3cjs.lerpPigmentInto; exports.levelsValue = _chunkS55JFWDAcjs.levelsValue; exports.linearSrgbToXy = _chunkS55JFWDAcjs.linearSrgbToXy; exports.linearToSrgb = _chunkS55JFWDAcjs.linearToSrgb; exports.linearToSrgb8 = _chunkXFYLA3ZOcjs.linearToSrgb8; exports.liveComponent = _chunkS55JFWDAcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkS55JFWDAcjs.liveShapeSubpaths; exports.liveWire = liveWire; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkPQ3H2AANcjs.loadMixer; exports.loadOpenTypeFont = _chunkLCCMOWR7cjs.loadOpenTypeFont; exports.loadWetKernel = _chunkXFYLA3ZOcjs.loadWetKernel; exports.luma = _chunkYF3YZZ6Gcjs.luma; exports.magicWand = magicWand; exports.magneticAnchorSpacing = magneticAnchorSpacing; exports.mapCropHandle = _chunkS55JFWDAcjs.mapCropHandle; exports.mapLayer = _chunkB46UQUDCcjs.mapLayer; exports.mapSubpaths = _chunkS55JFWDAcjs.mapSubpaths; exports.maskBounds = _chunkMQDIP4CFcjs.maskBounds; exports.maskCoverageOverCanvas = _chunkS55JFWDAcjs.maskCoverageOverCanvas; exports.maskFileName = maskFileName; exports.maskNameFromFile = maskNameFromFile; exports.maskSummary = maskSummary; exports.maskThumbnailClick = maskThumbnailClick; exports.matrixFromCorners = _chunkS55JFWDAcjs.matrixFromCorners; exports.matrixFromParams = _chunkS55JFWDAcjs.matrixFromParams; exports.measureCanvasViewport = measureCanvasViewport; exports.membraneFill = _chunkMQDIP4CFcjs.membraneFill; exports.mergeLayerEffect = _chunkB46UQUDCcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkS55JFWDAcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunkPQ3H2AANcjs.mix32; exports.mixPigment8 = _chunkOLNIPTB3cjs.mixPigment8; exports.mixPigmentRgb = _chunkOLNIPTB3cjs.mixPigmentRgb; exports.mixPigments = _chunkOLNIPTB3cjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunkPQ3H2AANcjs.mixerRates; exports.modifySelection = _chunkSS53NNZOcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkS55JFWDAcjs.moveLayer; exports.moveSmartFilter = _chunkS55JFWDAcjs.moveSmartFilter; exports.moveWetSnapshot = _chunkXFYLA3ZOcjs.moveWetSnapshot; exports.mulMatrix3 = _chunkS55JFWDAcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkS55JFWDAcjs.neutralHueRange; exports.newContentsId = _chunkS55JFWDAcjs.newContentsId; exports.newEffectId = _chunkB46UQUDCcjs.newEffectId; exports.newLayerId = _chunkS55JFWDAcjs.newLayerId; exports.newLayerOptions = newLayerOptions; exports.newPathId = newPathId; exports.normalizeAdjustmentLayer = _chunkS55JFWDAcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkS55JFWDAcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkS55JFWDAcjs.normalizeAngle; exports.normalizeBlendMode = _chunkOLNIPTB3cjs.normalizeBlendMode; exports.normalizeBlender = _chunkPQ3H2AANcjs.normalizeBlender; exports.normalizeBrush = _chunkPQ3H2AANcjs.normalizeBrush; exports.normalizeFilter = _chunkS55JFWDAcjs.normalizeFilter; exports.normalizeFlow = _chunkXFYLA3ZOcjs.normalizeFlow; exports.normalizeHexColor = _chunkPQ3H2AANcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkB46UQUDCcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkS55JFWDAcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkS55JFWDAcjs.normalizeLiveShape; exports.normalizeMixer = _chunkPQ3H2AANcjs.normalizeMixer; exports.normalizePlacement = _chunkS55JFWDAcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkS55JFWDAcjs.normalizeProcessVersion; exports.normalizeRect = _chunkUC3PWFM3cjs.normalizeRect; exports.normalizeRefineEdgeParams = _chunkSS53NNZOcjs.normalizeRefineEdgeParams; exports.normalizeRetouch = _chunkYF3YZZ6Gcjs.normalizeRetouch; exports.normalizeShapePaint = _chunkS55JFWDAcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkS55JFWDAcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkS55JFWDAcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkPQ3H2AANcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkS55JFWDAcjs.normalizeSubpaths; exports.normalizeText = _chunkS55JFWDAcjs.normalizeText; exports.normalizeTilt = _chunkXFYLA3ZOcjs.normalizeTilt; exports.normalizeWetParams = _chunkXFYLA3ZOcjs.normalizeWetParams; exports.offsetLayer = _chunkS55JFWDAcjs.offsetLayer; exports.offsetShape = _chunkS55JFWDAcjs.offsetShape; exports.offsetSmartObject = _chunkS55JFWDAcjs.offsetSmartObject; exports.offsetVectorMask = _chunkS55JFWDAcjs.offsetVectorMask; exports.openMaskFile = openMaskFile; exports.openPsdFile = openPsdFile; exports.otsuThreshold = _chunkUC3PWFM3cjs.otsuThreshold; exports.packRgba = _chunk474IQG74cjs.packRgba; exports.packWetParams = _chunkXFYLA3ZOcjs.packWetParams; exports.paintGradientMappingFor = _chunkPQ3H2AANcjs.paintGradientMappingFor; exports.paintPathStroke = _chunkPQ3H2AANcjs.paintPathStroke; exports.paintSourceColor = _chunkPQ3H2AANcjs.paintSourceColor; exports.paintSourceCss = _chunkPQ3H2AANcjs.paintSourceCss; exports.paragraphRanges = _chunkQAUIZPYIcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkS55JFWDAcjs.parseAdjustmentBlock; exports.parseBlend = _chunkS55JFWDAcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkOLNIPTB3cjs.parseDataUrl; exports.parseEffectColor = _chunkB46UQUDCcjs.parseEffectColor; exports.parseLfx2 = _chunkS55JFWDAcjs.parseLfx2; exports.parseLrfx = _chunkS55JFWDAcjs.parseLrfx; exports.parseOpenTypeFont = _chunkLCCMOWR7cjs.parseOpenTypeFont; exports.parsePaintSource = _chunkPQ3H2AANcjs.parsePaintSource; exports.parsePatternBlock = _chunkS55JFWDAcjs.parsePatternBlock; exports.parseSelectionMode = _chunkSS53NNZOcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkS55JFWDAcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkS55JFWDAcjs.patchParagraphStyle; exports.patchTextStyle = _chunkS55JFWDAcjs.patchTextStyle; exports.pathAnchorCount = pathAnchorCount; exports.pathBounds = pathBounds; exports.pathStrokeCoverage = _chunkPQ3H2AANcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkPQ3H2AANcjs.pathStrokeDabs; exports.pathSvgData = pathSvgData; exports.pathToSelection = pathToSelection; exports.perDabStrength = _chunkYF3YZZ6Gcjs.perDabStrength; exports.photoFilterMatrix = _chunkS55JFWDAcjs.photoFilterMatrix; exports.pigment8 = _chunkOLNIPTB3cjs.pigment8; exports.pigmentColor = _chunkXFYLA3ZOcjs.pigmentColor; exports.pigmentOf = _chunkXFYLA3ZOcjs.pigmentOf; exports.pixelLayerBounds = _chunkS55JFWDAcjs.pixelLayerBounds; exports.pixelLayers = _chunkS55JFWDAcjs.pixelLayers; exports.pixelPigment = _chunkXFYLA3ZOcjs.pixelPigment; exports.placeContents = _chunkS55JFWDAcjs.placeContents; exports.placeLayer = _chunkS55JFWDAcjs.placeLayer; exports.placementAt = _chunkS55JFWDAcjs.placementAt; exports.placementBounds = _chunkS55JFWDAcjs.placementBounds; exports.placementGeometry = _chunkS55JFWDAcjs.placementGeometry; exports.planImageToolPlayback = planImageToolPlayback; exports.planOutlineTrace = planOutlineTrace; exports.pngDataUrl = _chunkOLNIPTB3cjs.pngDataUrl; exports.pointerPressure = _chunkXFYLA3ZOcjs.pointerPressure; exports.pointerStrokeSample = _chunkXFYLA3ZOcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkXFYLA3ZOcjs.pointerStrokeSamples; exports.polygonCoverage = _chunkUC3PWFM3cjs.polygonCoverage; exports.polygonCoverageBox = _chunkUC3PWFM3cjs.polygonCoverageBox; exports.polygonSelection = _chunkUC3PWFM3cjs.polygonSelection; exports.posterizeValue = _chunkS55JFWDAcjs.posterizeValue; exports.presetWarp = _chunkS55JFWDAcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkS55JFWDAcjs.projectImagePoint; exports.projectImageRect = _chunkS55JFWDAcjs.projectImageRect; exports.projectMaskCoverage = _chunkS55JFWDAcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkOLNIPTB3cjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkS55JFWDAcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkS55JFWDAcjs.psdToLayers; exports.pullWarpMesh = _chunkQAUIZPYIcjs.pullWarpMesh; exports.put255 = _chunkPQ3H2AANcjs.put255; exports.quadFrameOverlay = quadFrameOverlay; exports.quickMaskPixels = quickMaskPixels; exports.quickSelectStroke = _chunkUC3PWFM3cjs.quickSelectStroke; exports.rand01 = _chunkPQ3H2AANcjs.rand01; exports.randSigned = _chunkPQ3H2AANcjs.randSigned; exports.rangeLightness = _chunkS55JFWDAcjs.rangeLightness; exports.rasterContents = _chunkS55JFWDAcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkS55JFWDAcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkS55JFWDAcjs.rasterizeCoverage; exports.rasterizeDab = _chunkPQ3H2AANcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkS55JFWDAcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkOLNIPTB3cjs.readDeepRegion; exports.readEdgeColor = _chunkS55JFWDAcjs.readEdgeColor; exports.readPaintSource = _chunkPQ3H2AANcjs.readPaintSource; exports.readPaths = readPaths; exports.readPixel = _chunk474IQG74cjs.readPixel; exports.readPsd = _chunkS55JFWDAcjs.readPsd; exports.readRegion = _chunk474IQG74cjs.readRegion; exports.readShapeComponents = _chunkS55JFWDAcjs.readShapeComponents; exports.readSourceRegion = _chunkYF3YZZ6Gcjs.readSourceRegion; exports.rectSelection = _chunkUC3PWFM3cjs.rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkB46UQUDCcjs.reduceSurface; exports.referencePoint = _chunkS55JFWDAcjs.referencePoint; exports.refineCoverage = _chunkSS53NNZOcjs.refineCoverage; exports.refineEdgeHalo = _chunkSS53NNZOcjs.refineEdgeHalo; exports.refineSelection = _chunkSS53NNZOcjs.refineSelection; exports.reflectanceToRgb = _chunkOLNIPTB3cjs.reflectanceToRgb; exports.removeAlpha = _chunkS55JFWDAcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkS55JFWDAcjs.removeLayer; exports.removeLayerEffect = _chunkS55JFWDAcjs.removeLayerEffect; exports.removeLayerFilter = _chunkS55JFWDAcjs.removeLayerFilter; exports.removePaintGradientStop = _chunkPQ3H2AANcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkS55JFWDAcjs.removeSmartFilter; exports.renderBrushstroke = _chunkPQ3H2AANcjs.renderBrushstroke; exports.renderLayerEffects = _chunkB46UQUDCcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkS55JFWDAcjs.renderShape; exports.renderShapeRect = _chunkS55JFWDAcjs.renderShapeRect; exports.renderSmartObject = _chunkS55JFWDAcjs.renderSmartObject; exports.renderText = _chunkS55JFWDAcjs.renderText; exports.replaceContents = _chunkS55JFWDAcjs.replaceContents; exports.replaceTextRange = _chunkS55JFWDAcjs.replaceTextRange; exports.requireLayer = _chunkS55JFWDAcjs.requireLayer; exports.requireOperation = _chunkS55JFWDAcjs.requireOperation; exports.requireShapeLayer = _chunkS55JFWDAcjs.requireShapeLayer; exports.requireSmartObject = _chunkS55JFWDAcjs.requireSmartObject; exports.requireTypeLayer = _chunkS55JFWDAcjs.requireTypeLayer; exports.requireUnlocked = _chunkS55JFWDAcjs.requireUnlocked; exports.rerender = _chunkS55JFWDAcjs.rerender; exports.rerenderShape = _chunkS55JFWDAcjs.rerenderShape; exports.rerenderText = _chunkS55JFWDAcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkSS53NNZOcjs.resizeSelection; exports.resizeWarpMesh = _chunkQAUIZPYIcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkS55JFWDAcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkPQ3H2AANcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.resolveVectorMasks = _chunkS55JFWDAcjs.resolveVectorMasks; exports.restyleRange = _chunkQAUIZPYIcjs.restyleRange; exports.retouchFilter = _chunkYF3YZZ6Gcjs.retouchFilter; exports.reversePaintGradient = _chunkPQ3H2AANcjs.reversePaintGradient; exports.rgbToGray = _chunkS55JFWDAcjs.rgbToGray; exports.rgbToHsl = _chunkS55JFWDAcjs.rgbToHsl; exports.rgbToReflectance = _chunkOLNIPTB3cjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunkYF3YZZ6Gcjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkS55JFWDAcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkS55JFWDAcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.runSelectionJob = _chunkUC3PWFM3cjs.runSelectionJob; exports.sameCanvasViewport = sameCanvasViewport; exports.sampleLut = _chunkS55JFWDAcjs.sampleLut; exports.sampleToneLut = _chunkS55JFWDAcjs.sampleToneLut; exports.saturationOf = _chunkYF3YZZ6Gcjs.saturationOf; exports.scaleLayerEffect = _chunkB46UQUDCcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkPQ3H2AANcjs.scalePaintGradient; exports.seamlessClone = _chunkMQDIP4CFcjs.seamlessClone; exports.seedFromString = _chunkPQ3H2AANcjs.seedFromString; exports.segmentToSelection = segmentToSelection; exports.segmentationOutlines = segmentationOutlines; exports.segmentsToSelection = segmentsToSelection; exports.selectObjectIn = _chunkUC3PWFM3cjs.selectObjectIn; exports.selectSimilar = selectSimilar; exports.selectionArea = _chunkSS53NNZOcjs.selectionArea; exports.selectionDiffPixels = selectionDiffPixels; exports.selectionFromCoverage = _chunkSS53NNZOcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkSS53NNZOcjs.selectionFromPixels; exports.selectionFromRegion = _chunkSS53NNZOcjs.selectionFromRegion; exports.selectionFromTiles = _chunkSS53NNZOcjs.selectionFromTiles; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionOutlinePaths = selectionOutlinePaths; exports.selectionRing = selectionRing; exports.selectionToCoverage = _chunkSS53NNZOcjs.selectionToCoverage; exports.selectionToPixels = _chunkSS53NNZOcjs.selectionToPixels; exports.selectionToSubpaths = selectionToSubpaths; exports.selectionUncertainty = selectionUncertainty; exports.selectionValueAt = _chunkSS53NNZOcjs.selectionValueAt; exports.serializeChannels = serializeChannels; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkS55JFWDAcjs.serializeContents; exports.serializeEffects = _chunkS55JFWDAcjs.serializeEffects; exports.serializeLayer = _chunkS55JFWDAcjs.serializeLayer; exports.serializeLayers = _chunkS55JFWDAcjs.serializeLayers; exports.serializeLayersExternal = _chunkS55JFWDAcjs.serializeLayersExternal; exports.serializeMask = _chunkUC3PWFM3cjs.serializeMask; exports.serializePaths = serializePaths; exports.serializePatterns = _chunkS55JFWDAcjs.serializePatterns; exports.serializeSelection = _chunkSS53NNZOcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkS55JFWDAcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkS55JFWDAcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkS55JFWDAcjs.setLayerMask; exports.setLayerProperties = _chunkS55JFWDAcjs.setLayerProperties; exports.setLum = _chunkOLNIPTB3cjs.setLum; exports.setPigmentColor = _chunkOLNIPTB3cjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkS55JFWDAcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkS55JFWDAcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkS55JFWDAcjs.setSmartPlacement; exports.shadeTile = _chunkXFYLA3ZOcjs.shadeTile; exports.shapeAsPixelLayer = _chunkS55JFWDAcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkS55JFWDAcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkS55JFWDAcjs.shapeGeometryBounds; exports.shapeLayers = _chunkS55JFWDAcjs.shapeLayers; exports.shapeOutline = _chunkS55JFWDAcjs.shapeOutline; exports.shapeRenderClip = _chunkS55JFWDAcjs.shapeRenderClip; exports.shiftCoverage = _chunkSS53NNZOcjs.shiftCoverage; exports.simplifyPixelPath = simplifyPixelPath; exports.skinToneRange = skinToneRange; exports.slicSuperpixels = _chunkUC3PWFM3cjs.slicSuperpixels; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkS55JFWDAcjs.smartObjectLayers; exports.smoothCoverage = _chunkSS53NNZOcjs.smoothCoverage; exports.smoothPoints = _chunkPQ3H2AANcjs.smoothPoints; exports.smoothnessWeights = _chunkUC3PWFM3cjs.smoothnessWeights; exports.smudgeEffect = _chunkYF3YZZ6Gcjs.smudgeEffect; exports.snapPolygonToEdges = snapPolygonToEdges; exports.snapTo45 = snapTo45; exports.snapToEdge = snapToEdge; exports.softMaskToSelection = _chunkUC3PWFM3cjs.softMaskToSelection; exports.solidPaint = _chunkPQ3H2AANcjs.solidPaint; exports.solidSurface = _chunk474IQG74cjs.solidSurface; exports.solveMembrane = _chunkMQDIP4CFcjs.solveMembrane; exports.spliceRuns = _chunkQAUIZPYIcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunkYF3YZZ6Gcjs.sponge; exports.spongeEffect = _chunkYF3YZZ6Gcjs.spongeEffect; exports.spotHealPixels = _chunkYF3YZZ6Gcjs.spotHealPixels; exports.spotHealWindow = _chunkYF3YZZ6Gcjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkXFYLA3ZOcjs.srgbByteToLinear; exports.srgbDecode = _chunkOLNIPTB3cjs.srgbDecode; exports.srgbEncode = _chunkOLNIPTB3cjs.srgbEncode; exports.srgbToLinear = _chunkS55JFWDAcjs.srgbToLinear; exports.standardBlendMode = _chunkOLNIPTB3cjs.standardBlendMode; exports.startMarchingAnts = startMarchingAnts; exports.startSelectionWorker = _chunkUC3PWFM3cjs.startSelectionWorker; exports.stepSlotTs = _chunkXFYLA3ZOcjs.stepSlotTs; exports.strokeGrainCatch = _chunkPQ3H2AANcjs.strokeGrainCatch; exports.styleAt = _chunkQAUIZPYIcjs.styleAt; exports.subpathsToSvgPath = subpathsToSvgPath; exports.sumHistograms = sumHistograms; exports.superpixelSaliency = _chunkUC3PWFM3cjs.superpixelSaliency; exports.surfaceBytes = _chunk474IQG74cjs.surfaceBytes; exports.surfaceDepth = _chunkOLNIPTB3cjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkOLNIPTB3cjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunk474IQG74cjs.surfaceFromPixels; exports.surfacesEqual = _chunk474IQG74cjs.surfacesEqual; exports.tempTintToXy = _chunkS55JFWDAcjs.tempTintToXy; exports.temperatureToKelvin = _chunkS55JFWDAcjs.temperatureToKelvin; exports.textIndexAt = _chunkQAUIZPYIcjs.textIndexAt; exports.textMatrix = _chunkS55JFWDAcjs.textMatrix; exports.textOrientation = _chunkS55JFWDAcjs.textOrientation; exports.textOutlines = _chunkS55JFWDAcjs.textOutlines; exports.textRange = _chunkS55JFWDAcjs.textRange; exports.tileCoord = _chunk474IQG74cjs.tileCoord; exports.tileKey = _chunk474IQG74cjs.tileKey; exports.tileRect = _chunk474IQG74cjs.tileRect; exports.tileSamples = _chunkOLNIPTB3cjs.tileSamples; exports.tileSamples16 = _chunkOLNIPTB3cjs.tileSamples16; exports.tileSamples32 = _chunkOLNIPTB3cjs.tileSamples32; exports.tilesInRect = _chunk474IQG74cjs.tilesInRect; exports.tipFalloff = _chunkPQ3H2AANcjs.tipFalloff; exports.tipReach = _chunkPQ3H2AANcjs.tipReach; exports.tipShape = _chunkPQ3H2AANcjs.tipShape; exports.to16From32 = _chunkOLNIPTB3cjs.to16From32; exports.to16From8 = _chunkOLNIPTB3cjs.to16From8; exports.to32From16 = _chunkOLNIPTB3cjs.to32From16; exports.to32From8 = _chunkOLNIPTB3cjs.to32From8; exports.to8From16 = _chunkOLNIPTB3cjs.to8From16; exports.to8From32 = _chunkOLNIPTB3cjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkS55JFWDAcjs.toTextSpace; exports.toneCurve = _chunkS55JFWDAcjs.toneCurve; exports.toneLuts = _chunkS55JFWDAcjs.toneLuts; exports.toneOf = _chunkYF3YZZ6Gcjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkS55JFWDAcjs.transformHomography; exports.transformMap = _chunkS55JFWDAcjs.transformMap; exports.transformShapeComponents = _chunkS55JFWDAcjs.transformShapeComponents; exports.transformSurface = _chunkB46UQUDCcjs.transformSurface; exports.transformTypeLayer = _chunkS55JFWDAcjs.transformTypeLayer; exports.transformVectorMask = _chunkS55JFWDAcjs.transformVectorMask; exports.transformedBounds = _chunkB46UQUDCcjs.transformedBounds; exports.transformedBox = _chunkS55JFWDAcjs.transformedBox; exports.transformedPoint = _chunkS55JFWDAcjs.transformedPoint; exports.translateLayer = _chunkS55JFWDAcjs.translateLayer; exports.translateSurface = _chunk474IQG74cjs.translateSurface; exports.typeAsPixelLayer = _chunkS55JFWDAcjs.typeAsPixelLayer; exports.typeFrame = _chunkS55JFWDAcjs.typeFrame; exports.typeFromAnnotation = _chunkS55JFWDAcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkS55JFWDAcjs.typeLayerName; exports.ungroupLayer = _chunkS55JFWDAcjs.ungroupLayer; exports.uniformTile = _chunk474IQG74cjs.uniformTile; exports.unionRect = _chunkS55JFWDAcjs.unionRect; exports.unprojectCanvasPoint = _chunkS55JFWDAcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkS55JFWDAcjs.updateLayerEffect; exports.updateLayerFilter = _chunkS55JFWDAcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkS55JFWDAcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkPQ3H2AANcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkS55JFWDAcjs.updateShapeLayer; exports.updateSmartFilter = _chunkS55JFWDAcjs.updateSmartFilter; exports.updateTypeLayer = _chunkS55JFWDAcjs.updateTypeLayer; exports.upscaleRegion = _chunkUC3PWFM3cjs.upscaleRegion; exports.userErrorMessage = _chunkS55JFWDAcjs.userErrorMessage; exports.uvToXy = _chunkS55JFWDAcjs.uvToXy; exports.validateEffectGradient = _chunkB46UQUDCcjs.validateEffectGradient; exports.validateLayerEffect = _chunkB46UQUDCcjs.validateLayerEffect; exports.validateLayerEffects = _chunkB46UQUDCcjs.validateLayerEffects; exports.vectorMaskBounds = _chunkS55JFWDAcjs.vectorMaskBounds; exports.vectorMaskCoverage = _chunkS55JFWDAcjs.vectorMaskCoverage; exports.vectorMaskThumbnail = _chunkS55JFWDAcjs.vectorMaskThumbnail; exports.vectorMaskThumbnailClick = vectorMaskThumbnailClick; exports.versionedDescriptorBytes = _chunkS55JFWDAcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkS55JFWDAcjs.vibranceLinear; exports.vibrancePixel = _chunkS55JFWDAcjs.vibrancePixel; exports.walkDabs = _chunkPQ3H2AANcjs.walkDabs; exports.warpMeshEditPoints = _chunkQAUIZPYIcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkQAUIZPYIcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkQAUIZPYIcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkQAUIZPYIcjs.warpPresetMesh; exports.warpSurface = _chunkB46UQUDCcjs.warpSurface; exports.watchCanvasViewport = watchCanvasViewport; exports.wbMatrix = _chunkS55JFWDAcjs.wbMatrix; exports.wetGpuSupport = _chunkXFYLA3ZOcjs.wetGpuSupport; exports.wetSimdSupported = _chunkXFYLA3ZOcjs.wetSimdSupported; exports.wetSupport = _chunkXFYLA3ZOcjs.wetSupport; exports.whiteBalanceFromSample = _chunkS55JFWDAcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkS55JFWDAcjs.whiteBalanceMatrix; exports.withBackgroundOpacity = withBackgroundOpacity; exports.withFilterMaskSurface = _chunkS55JFWDAcjs.withFilterMaskSurface; exports.withImagePlayback = withImagePlayback; exports.withNewIds = _chunkS55JFWDAcjs.withNewIds; exports.workImage = _chunkUC3PWFM3cjs.workImage; exports.workLuma = _chunkUC3PWFM3cjs.workLuma; exports.workPlanes = _chunkUC3PWFM3cjs.workPlanes; exports.writeAdjustmentBlock = _chunkS55JFWDAcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkOLNIPTB3cjs.writeDeepRegion; exports.writeLfx2 = _chunkS55JFWDAcjs.writeLfx2; exports.writePatternBlock = _chunkS55JFWDAcjs.writePatternBlock; exports.writePsd = _chunkS55JFWDAcjs.writePsd; exports.writeRegion = _chunk474IQG74cjs.writeRegion; exports.xyToTempTint = _chunkS55JFWDAcjs.xyToTempTint; exports.xyToUv = _chunkS55JFWDAcjs.xyToUv;
|