@pixerate/editor 0.216.0 → 0.218.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-WJ2RBZMM.js → chunk-HLBTRSQJ.js} +24 -0
- package/dist/{chunk-KWNMBMKG.cjs → chunk-XFYLA3ZO.cjs} +25 -1
- package/dist/image-editor/controller.d.cts +33 -0
- package/dist/image-editor/controller.d.ts +33 -0
- package/dist/image-editor/index.cjs +816 -567
- package/dist/image-editor/index.js +252 -3
- package/dist/image-editor/renderer.d.cts +2 -0
- package/dist/image-editor/renderer.d.ts +2 -0
- package/dist/image-editor/selection/diff.d.cts +59 -0
- package/dist/image-editor/selection/diff.d.ts +59 -0
- package/dist/image-editor/selection/index.d.cts +1 -0
- package/dist/image-editor/selection/index.d.ts +1 -0
- package/dist/image-editor/types.d.cts +9 -0
- package/dist/image-editor/types.d.ts +9 -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-image-editor/SKILL.md +2 -2
- package/skills/pixerate-image-selection-masking/SKILL.md +3 -3
- 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
|
|
|
@@ -1070,6 +1071,105 @@ function startMarchingAnts(tick, stepMs = MARCHING_ANTS_STEP_MS) {
|
|
|
1070
1071
|
return () => clearInterval(id);
|
|
1071
1072
|
}
|
|
1072
1073
|
|
|
1074
|
+
// src/image-editor/selection/diff.ts
|
|
1075
|
+
function compareSelectionMasks(a, b, width, height, options = {}) {
|
|
1076
|
+
const minArea = Math.max(1, _nullishCoalesce(options.minArea, () => ( 4)));
|
|
1077
|
+
const maxRegions = Math.max(1, _nullishCoalesce(options.maxRegions, () => ( 10)));
|
|
1078
|
+
const n = width * height;
|
|
1079
|
+
const ad = _optionalChain([a, 'optionalAccess', _2 => _2.data]);
|
|
1080
|
+
const bd = _optionalChain([b, 'optionalAccess', _3 => _3.data]);
|
|
1081
|
+
const added = new Uint8Array(n);
|
|
1082
|
+
const removed = new Uint8Array(n);
|
|
1083
|
+
let areaA = 0;
|
|
1084
|
+
let areaB = 0;
|
|
1085
|
+
let inter = 0;
|
|
1086
|
+
let change = 0;
|
|
1087
|
+
let addedArea = 0;
|
|
1088
|
+
let removedArea = 0;
|
|
1089
|
+
for (let i = 0; i < n; i++) {
|
|
1090
|
+
const va = ad ? ad[i] : 0;
|
|
1091
|
+
const vb = bd ? bd[i] : 0;
|
|
1092
|
+
if (va !== vb) change += Math.abs(vb - va);
|
|
1093
|
+
const ia = va >= 128;
|
|
1094
|
+
const ib = vb >= 128;
|
|
1095
|
+
if (ia) areaA++;
|
|
1096
|
+
if (ib) areaB++;
|
|
1097
|
+
if (ia && ib) inter++;
|
|
1098
|
+
else if (ib) {
|
|
1099
|
+
added[i] = 255;
|
|
1100
|
+
addedArea++;
|
|
1101
|
+
} else if (ia) {
|
|
1102
|
+
removed[i] = 255;
|
|
1103
|
+
removedArea++;
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
const union = areaA + areaB - inter;
|
|
1107
|
+
const addedMask = _chunkSS53NNZOcjs.createSelectionMask.call(void 0, width, height, added);
|
|
1108
|
+
const removedMask = _chunkSS53NNZOcjs.createSelectionMask.call(void 0, width, height, removed);
|
|
1109
|
+
return {
|
|
1110
|
+
a: { area: areaA, bounds: _nullishCoalesce(_optionalChain([a, 'optionalAccess', _4 => _4.bounds]), () => ( null)) },
|
|
1111
|
+
b: { area: areaB, bounds: _nullishCoalesce(_optionalChain([b, 'optionalAccess', _5 => _5.bounds]), () => ( null)) },
|
|
1112
|
+
added: { area: addedArea, ...pieces(added, width, height, addedMask.bounds, minArea, maxRegions) },
|
|
1113
|
+
removed: { area: removedArea, ...pieces(removed, width, height, removedMask.bounds, minArea, maxRegions) },
|
|
1114
|
+
iou: union ? Math.round(inter / union * 1e4) / 1e4 : 1,
|
|
1115
|
+
coverageChange: Math.round(change / 255),
|
|
1116
|
+
identical: change === 0,
|
|
1117
|
+
addedMask,
|
|
1118
|
+
removedMask
|
|
1119
|
+
};
|
|
1120
|
+
}
|
|
1121
|
+
function pieces(bits, W, H, bounds, minArea, maxRegions) {
|
|
1122
|
+
if (!bounds) return { count: 0, regions: [] };
|
|
1123
|
+
const { x: x0, y: y0, width: w, height: h } = bounds;
|
|
1124
|
+
const seen = new Uint8Array(w * h);
|
|
1125
|
+
const stack = new Int32Array(w * h);
|
|
1126
|
+
const found = [];
|
|
1127
|
+
for (let start = 0; start < w * h; start++) {
|
|
1128
|
+
if (seen[start] || !bits[(y0 + Math.floor(start / w)) * W + x0 + start % w]) continue;
|
|
1129
|
+
let area = 0;
|
|
1130
|
+
let bx0 = w;
|
|
1131
|
+
let by0 = h;
|
|
1132
|
+
let bx1 = -1;
|
|
1133
|
+
let by1 = -1;
|
|
1134
|
+
let top = 0;
|
|
1135
|
+
stack[top++] = start;
|
|
1136
|
+
seen[start] = 1;
|
|
1137
|
+
while (top) {
|
|
1138
|
+
const k = stack[--top];
|
|
1139
|
+
const i = k % w;
|
|
1140
|
+
const j = (k - i) / w;
|
|
1141
|
+
area++;
|
|
1142
|
+
if (i < bx0) bx0 = i;
|
|
1143
|
+
if (i > bx1) bx1 = i;
|
|
1144
|
+
if (j < by0) by0 = j;
|
|
1145
|
+
if (j > by1) by1 = j;
|
|
1146
|
+
for (let dy = -1; dy <= 1; dy++) {
|
|
1147
|
+
for (let dx = -1; dx <= 1; dx++) {
|
|
1148
|
+
const ni = i + dx;
|
|
1149
|
+
const nj = j + dy;
|
|
1150
|
+
if (ni < 0 || nj < 0 || ni >= w || nj >= h) continue;
|
|
1151
|
+
const nk = nj * w + ni;
|
|
1152
|
+
if (seen[nk] || !bits[(y0 + nj) * W + x0 + ni]) continue;
|
|
1153
|
+
seen[nk] = 1;
|
|
1154
|
+
stack[top++] = nk;
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
if (area >= minArea) found.push({ area, bounds: { x: x0 + bx0, y: y0 + by0, width: bx1 - bx0 + 1, height: by1 - by0 + 1 } });
|
|
1159
|
+
}
|
|
1160
|
+
found.sort((p, q) => q.area - p.area);
|
|
1161
|
+
return { count: found.length, regions: found.slice(0, maxRegions) };
|
|
1162
|
+
}
|
|
1163
|
+
function selectionDiffPixels(added, removed) {
|
|
1164
|
+
const n = added.width * added.height;
|
|
1165
|
+
const out = new Uint8ClampedArray(n * 4);
|
|
1166
|
+
for (let i = 0; i < n; i++) {
|
|
1167
|
+
if (added.data[i]) out.set([34, 197, 94, 140], i * 4);
|
|
1168
|
+
else if (removed.data[i]) out.set([239, 68, 68, 140], i * 4);
|
|
1169
|
+
}
|
|
1170
|
+
return out;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1073
1173
|
// src/image-editor/layers/render.ts
|
|
1074
1174
|
function isQuarterTurn(rotate) {
|
|
1075
1175
|
return _chunkS55JFWDAcjs.normalizeAngle.call(void 0, rotate) % 90 === 0;
|
|
@@ -1132,7 +1232,7 @@ function needsLegacyBase(input) {
|
|
|
1132
1232
|
if (!_chunkS55JFWDAcjs.isLegacyShape.call(void 0, stack)) return false;
|
|
1133
1233
|
const bg = stack.layers[0];
|
|
1134
1234
|
if (!isQuarterTurn(transform.rotate) || !isIntegerRect(region)) return true;
|
|
1135
|
-
if (_optionalChain([bg, 'access',
|
|
1235
|
+
if (_optionalChain([bg, 'access', _6 => _6.mask, 'optionalAccess', _7 => _7.source, 'optionalAccess', _8 => _8.enabled]) && bg.mask.source.maskSource) return true;
|
|
1136
1236
|
if (stack.outputOpacity < 1) return true;
|
|
1137
1237
|
const blur = _chunkS55JFWDAcjs.blurFilter.call(void 0, bg);
|
|
1138
1238
|
if (blur && blur.enabled && blur.radius > 0) {
|
|
@@ -1301,7 +1401,7 @@ function drawOverlayHandles(ctx, points, u = 1) {
|
|
|
1301
1401
|
ctx.strokeRect(h.x - size / 2, h.y - size / 2, size, size);
|
|
1302
1402
|
}
|
|
1303
1403
|
}
|
|
1304
|
-
var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__init2.call(this);_class2.prototype.__init3.call(this);_class2.prototype.__init4.call(this);_class2.prototype.__init5.call(this);_class2.prototype.__init6.call(this);_class2.prototype.__init7.call(this);_class2.prototype.__init8.call(this);_class2.prototype.__init9.call(this);_class2.prototype.__init10.call(this);_class2.prototype.__init11.call(this);_class2.prototype.__init12.call(this);_class2.prototype.__init13.call(this);_class2.prototype.__init14.call(this);_class2.prototype.__init15.call(this);_class2.prototype.__init16.call(this);_class2.prototype.__init17.call(this);_class2.prototype.__init18.call(this);_class2.prototype.__init19.call(this);_class2.prototype.__init20.call(this);_class2.prototype.__init21.call(this);_class2.prototype.__init22.call(this);_class2.prototype.__init23.call(this);_class2.prototype.__init24.call(this);_class2.prototype.__init25.call(this);_class2.prototype.__init26.call(this); }
|
|
1404
|
+
var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__init2.call(this);_class2.prototype.__init3.call(this);_class2.prototype.__init4.call(this);_class2.prototype.__init5.call(this);_class2.prototype.__init6.call(this);_class2.prototype.__init7.call(this);_class2.prototype.__init8.call(this);_class2.prototype.__init9.call(this);_class2.prototype.__init10.call(this);_class2.prototype.__init11.call(this);_class2.prototype.__init12.call(this);_class2.prototype.__init13.call(this);_class2.prototype.__init14.call(this);_class2.prototype.__init15.call(this);_class2.prototype.__init16.call(this);_class2.prototype.__init17.call(this);_class2.prototype.__init18.call(this);_class2.prototype.__init19.call(this);_class2.prototype.__init20.call(this);_class2.prototype.__init21.call(this);_class2.prototype.__init22.call(this);_class2.prototype.__init23.call(this);_class2.prototype.__init24.call(this);_class2.prototype.__init25.call(this);_class2.prototype.__init26.call(this);_class2.prototype.__init27.call(this); }
|
|
1305
1405
|
__init2() {this.imageCache = globalImageCache}
|
|
1306
1406
|
__init3() {this.cachedBaseCanvas = null}
|
|
1307
1407
|
__init4() {this.cachedBaseKey = ""}
|
|
@@ -1413,7 +1513,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1413
1513
|
`${projection.angle},${transform.flipH},${transform.flipV}`,
|
|
1414
1514
|
`${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)}`,
|
|
1415
1515
|
_chunkS55JFWDAcjs.adjustmentLayersKey.call(void 0, adjustments.layers),
|
|
1416
|
-
`${depthMask.enabled},${depthMask.maskSource},${_optionalChain([depthMask, 'access',
|
|
1516
|
+
`${depthMask.enabled},${depthMask.maskSource},${_optionalChain([depthMask, 'access', _9 => _9.depthRange, 'optionalAccess', _10 => _10[0]])}-${_optionalChain([depthMask, 'access', _11 => _11.depthRange, 'optionalAccess', _12 => _12[1]])},${depthMask.softness},${depthMask.invert},${depthMask.mode}`,
|
|
1417
1517
|
`d${this.displayKey}`
|
|
1418
1518
|
].join("|");
|
|
1419
1519
|
let baseCanvas = this.cachedBaseCanvas;
|
|
@@ -1421,12 +1521,12 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1421
1521
|
let histogram = null;
|
|
1422
1522
|
baseCanvas = await this.renderBaseImage(img, naturalWidth, naturalHeight, region, transform, state, (pixels) => {
|
|
1423
1523
|
histogram = computeHistogram(pixels);
|
|
1424
|
-
_optionalChain([this, 'access',
|
|
1524
|
+
_optionalChain([this, 'access', _13 => _13.display, 'optionalCall', _14 => _14(pixels.data)]);
|
|
1425
1525
|
});
|
|
1426
1526
|
this.cachedBaseCanvas = baseCanvas;
|
|
1427
1527
|
this.cachedBaseKey = baseKey;
|
|
1428
1528
|
this.previewHistogram = histogram;
|
|
1429
|
-
_optionalChain([this, 'access',
|
|
1529
|
+
_optionalChain([this, 'access', _15 => _15.onPreviewHistogram, 'optionalCall', _16 => _16(histogram)]);
|
|
1430
1530
|
}
|
|
1431
1531
|
const drawW = rotated.width * projection.scale;
|
|
1432
1532
|
const drawH = rotated.height * projection.scale;
|
|
@@ -1441,7 +1541,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1441
1541
|
const drawW = rotated.width * projection.scale;
|
|
1442
1542
|
const drawH = rotated.height * projection.scale;
|
|
1443
1543
|
ctx.drawImage(base.canvas, projection.originX - drawW / 2, projection.originY - drawH / 2, drawW, drawH);
|
|
1444
|
-
this.publishHistogram(_nullishCoalesce(_nullishCoalesce(base.histogram, () => ( _optionalChain([comp, 'optionalAccess',
|
|
1544
|
+
this.publishHistogram(_nullishCoalesce(_nullishCoalesce(base.histogram, () => ( _optionalChain([comp, 'optionalAccess', _17 => _17.histogram, 'call', _18 => _18()]))), () => ( null)));
|
|
1445
1545
|
}
|
|
1446
1546
|
}
|
|
1447
1547
|
if (overlay.length > 0 || options.draftAnnotation) {
|
|
@@ -1499,8 +1599,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1499
1599
|
}
|
|
1500
1600
|
const { width: iw, height: ih } = state.imageDimensions;
|
|
1501
1601
|
const shownSel = state.selectionPreview !== void 0 ? state.selectionPreview : state.selection;
|
|
1502
|
-
const quickMaskSel = display === "quickMask" && state.quickMaskEditing && !_optionalChain([shownSel, 'optionalAccess',
|
|
1503
|
-
if (_optionalChain([shownSel, 'optionalAccess',
|
|
1602
|
+
const quickMaskSel = display === "quickMask" && state.quickMaskEditing && !_optionalChain([shownSel, 'optionalAccess', _19 => _19.bounds]) ? this.emptyMask(Math.round(iw), Math.round(ih)) : null;
|
|
1603
|
+
if (_optionalChain([shownSel, 'optionalAccess', _20 => _20.bounds]) && display !== "none" || quickMaskSel || _optionalChain([options, 'access', _21 => _21.draftSelectionPath, 'optionalAccess', _22 => _22.length])) {
|
|
1504
1604
|
ctx.save();
|
|
1505
1605
|
try {
|
|
1506
1606
|
_chunkS55JFWDAcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
|
|
@@ -1508,13 +1608,26 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1508
1608
|
ctx.rect(region.x, region.y, region.width, region.height);
|
|
1509
1609
|
ctx.clip();
|
|
1510
1610
|
if (quickMaskSel) this.drawQuickMask(ctx, quickMaskSel);
|
|
1511
|
-
else if (_optionalChain([shownSel, 'optionalAccess',
|
|
1512
|
-
else if (_optionalChain([shownSel, 'optionalAccess',
|
|
1513
|
-
if (_optionalChain([options, 'access',
|
|
1611
|
+
else if (_optionalChain([shownSel, 'optionalAccess', _23 => _23.bounds]) && display === "quickMask") this.drawQuickMask(ctx, shownSel);
|
|
1612
|
+
else if (_optionalChain([shownSel, 'optionalAccess', _24 => _24.bounds]) && display === "ants") this.drawAnts(ctx, shownSel, projection.scale / u, _nullishCoalesce(options.antsOffset, () => ( 0)));
|
|
1613
|
+
if (_optionalChain([options, 'access', _25 => _25.draftSelectionPath, 'optionalAccess', _26 => _26.length])) this.drawDraftPath(ctx, options.draftSelectionPath, projection.scale / u);
|
|
1514
1614
|
} catch (e7) {
|
|
1515
1615
|
}
|
|
1516
1616
|
ctx.restore();
|
|
1517
1617
|
}
|
|
1618
|
+
const diff = state.selectionDiff;
|
|
1619
|
+
if (diff && diff.selection === (_nullishCoalesce(state.selection, () => ( null)))) {
|
|
1620
|
+
ctx.save();
|
|
1621
|
+
try {
|
|
1622
|
+
_chunkS55JFWDAcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
|
|
1623
|
+
ctx.beginPath();
|
|
1624
|
+
ctx.rect(region.x, region.y, region.width, region.height);
|
|
1625
|
+
ctx.clip();
|
|
1626
|
+
this.drawSelectionDiff(ctx, diff);
|
|
1627
|
+
} catch (e8) {
|
|
1628
|
+
}
|
|
1629
|
+
ctx.restore();
|
|
1630
|
+
}
|
|
1518
1631
|
if (options.brushCursor) {
|
|
1519
1632
|
const b = options.brushCursor;
|
|
1520
1633
|
ctx.save();
|
|
@@ -1529,7 +1642,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1529
1642
|
ctx.lineWidth = px2;
|
|
1530
1643
|
ctx.strokeStyle = "#ffffff";
|
|
1531
1644
|
ctx.stroke();
|
|
1532
|
-
} catch (
|
|
1645
|
+
} catch (e9) {
|
|
1533
1646
|
}
|
|
1534
1647
|
ctx.restore();
|
|
1535
1648
|
}
|
|
@@ -1550,7 +1663,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1550
1663
|
ctx.lineWidth = u;
|
|
1551
1664
|
ctx.strokeStyle = "#ffffff";
|
|
1552
1665
|
ctx.stroke();
|
|
1553
|
-
} catch (
|
|
1666
|
+
} catch (e10) {
|
|
1554
1667
|
}
|
|
1555
1668
|
ctx.restore();
|
|
1556
1669
|
}
|
|
@@ -1589,7 +1702,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1589
1702
|
ctx.strokeStyle = "#111827";
|
|
1590
1703
|
ctx.stroke();
|
|
1591
1704
|
}
|
|
1592
|
-
} catch (
|
|
1705
|
+
} catch (e11) {
|
|
1593
1706
|
}
|
|
1594
1707
|
ctx.restore();
|
|
1595
1708
|
}
|
|
@@ -1628,7 +1741,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1628
1741
|
ctx.lineWidth = 1.5 * u;
|
|
1629
1742
|
ctx.strokeStyle = "#ffffff";
|
|
1630
1743
|
ctx.stroke();
|
|
1631
|
-
drawOverlayHandles(ctx, [...t.handles, ..._nullishCoalesce(_optionalChain([t, 'access',
|
|
1744
|
+
drawOverlayHandles(ctx, [...t.handles, ..._nullishCoalesce(_optionalChain([t, 'access', _27 => _27.warp, 'optionalAccess', _28 => _28.anchors]), () => ( []))].map(scr), u);
|
|
1632
1745
|
if (rotate) {
|
|
1633
1746
|
ctx.beginPath();
|
|
1634
1747
|
ctx.arc(rotate.x, rotate.y, 5 * u, 0, Math.PI * 2);
|
|
@@ -1638,7 +1751,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1638
1751
|
ctx.strokeStyle = OVERLAY_HANDLE_EDGE;
|
|
1639
1752
|
ctx.stroke();
|
|
1640
1753
|
}
|
|
1641
|
-
for (const h of (_nullishCoalesce(_optionalChain([t, 'access',
|
|
1754
|
+
for (const h of (_nullishCoalesce(_optionalChain([t, 'access', _29 => _29.warp, 'optionalAccess', _30 => _30.handles]), () => ( []))).map((w) => scr(w.point))) {
|
|
1642
1755
|
ctx.beginPath();
|
|
1643
1756
|
ctx.arc(h.x, h.y, 3.5 * u, 0, Math.PI * 2);
|
|
1644
1757
|
ctx.fillStyle = "#ffffff";
|
|
@@ -1655,7 +1768,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1655
1768
|
ctx.lineWidth = 1.5 * u;
|
|
1656
1769
|
ctx.strokeStyle = OVERLAY_HANDLE_EDGE;
|
|
1657
1770
|
ctx.stroke();
|
|
1658
|
-
} catch (
|
|
1771
|
+
} catch (e12) {
|
|
1659
1772
|
}
|
|
1660
1773
|
ctx.restore();
|
|
1661
1774
|
}
|
|
@@ -1712,7 +1825,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1712
1825
|
ctx.setLineDash([4 * u, 3 * u]);
|
|
1713
1826
|
ctx.strokeRect(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.abs(b.x - a.x), Math.abs(b.y - a.y));
|
|
1714
1827
|
}
|
|
1715
|
-
} catch (
|
|
1828
|
+
} catch (e13) {
|
|
1716
1829
|
}
|
|
1717
1830
|
ctx.restore();
|
|
1718
1831
|
}
|
|
@@ -1780,10 +1893,10 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1780
1893
|
_chunkS55JFWDAcjs.applyDepthMask.call(void 0, imageData, maskData, depthMask);
|
|
1781
1894
|
}
|
|
1782
1895
|
}
|
|
1783
|
-
} catch (
|
|
1896
|
+
} catch (e14) {
|
|
1784
1897
|
}
|
|
1785
1898
|
}
|
|
1786
|
-
_optionalChain([onPixels, 'optionalCall',
|
|
1899
|
+
_optionalChain([onPixels, 'optionalCall', _31 => _31(imageData)]);
|
|
1787
1900
|
baseCtx.putImageData(imageData, 0, 0);
|
|
1788
1901
|
}
|
|
1789
1902
|
return baseCanvas;
|
|
@@ -1792,7 +1905,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1792
1905
|
/** Which base path renders `state` (see `needsLegacyBase`). */
|
|
1793
1906
|
chooseRoute(state, region, naturalWidth, naturalHeight) {
|
|
1794
1907
|
let route;
|
|
1795
|
-
if (!_optionalChain([state, 'access',
|
|
1908
|
+
if (!_optionalChain([state, 'access', _32 => _32.layers, 'optionalAccess', _33 => _33.length])) route = "legacy";
|
|
1796
1909
|
else if (this.baseRoute === "layers") route = "layers";
|
|
1797
1910
|
else {
|
|
1798
1911
|
const stack = { layers: state.layers, outputOpacity: _nullishCoalesce(state.outputOpacity, () => ( 1)), legacyOutputBlur: state.legacyOutputBlur };
|
|
@@ -1802,7 +1915,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1802
1915
|
region,
|
|
1803
1916
|
canvas: { width: naturalWidth, height: naturalHeight },
|
|
1804
1917
|
transform: state.transform,
|
|
1805
|
-
sourceOpaque: _nullishCoalesce(_optionalChain([this, 'access',
|
|
1918
|
+
sourceOpaque: _nullishCoalesce(_optionalChain([this, 'access', _34 => _34.layerSources, 'optionalAccess', _35 => _35.sourceIsOpaque, 'call', _36 => _36()]), () => ( true))
|
|
1806
1919
|
}) ? "legacy" : "layers";
|
|
1807
1920
|
}
|
|
1808
1921
|
this.lastBaseRoute = route;
|
|
@@ -1820,36 +1933,36 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1820
1933
|
return _nullishCoalesce(this.depthMaps.get(`${source.maskSource}|${width}x${height}`), () => ( null));
|
|
1821
1934
|
},
|
|
1822
1935
|
rasterizeAnnotation: (annotation, rect2) => this.rasterizeAnnotation(annotation, rect2),
|
|
1823
|
-
version: `${_nullishCoalesce(_optionalChain([host, 'optionalAccess',
|
|
1824
|
-
globalLight: _optionalChain([host, 'optionalAccess',
|
|
1825
|
-
pattern: _optionalChain([host, 'optionalAccess',
|
|
1936
|
+
version: `${_nullishCoalesce(_optionalChain([host, 'optionalAccess', _37 => _37.version, 'call', _38 => _38()]), () => ( ""))}:${this.assetVersion}`,
|
|
1937
|
+
globalLight: _optionalChain([host, 'optionalAccess', _39 => _39.globalLight, 'optionalCall', _40 => _40()]),
|
|
1938
|
+
pattern: _optionalChain([host, 'optionalAccess', _41 => _41.pattern]) ? (id) => host.pattern(id) : void 0
|
|
1826
1939
|
};
|
|
1827
1940
|
}
|
|
1828
1941
|
/** Loads what the compositor reads synchronously: depth maps (at canvas size) and annotation images. */
|
|
1829
1942
|
/** Loads depth maps and annotation images the compositor reads synchronously. */
|
|
1830
1943
|
async prepareLayerAssets(layers, width, height) {
|
|
1831
1944
|
for (const l of _chunkB46UQUDCcjs.flattenLayers.call(void 0, layers)) {
|
|
1832
|
-
const source = _optionalChain([l, 'access',
|
|
1833
|
-
if (_optionalChain([source, 'optionalAccess',
|
|
1945
|
+
const source = _optionalChain([l, 'access', _42 => _42.mask, 'optionalAccess', _43 => _43.source]);
|
|
1946
|
+
if (_optionalChain([source, 'optionalAccess', _44 => _44.enabled]) && source.maskSource) {
|
|
1834
1947
|
const key2 = `${source.maskSource}|${width}x${height}`;
|
|
1835
1948
|
if (this.depthMaps.has(key2)) continue;
|
|
1836
1949
|
try {
|
|
1837
1950
|
const maskImg = await this.imageCache.get(source.maskSource);
|
|
1838
1951
|
const canvas = this.createCanvas(width, height);
|
|
1839
1952
|
const mctx = canvas.getContext("2d");
|
|
1840
|
-
const data = mctx ? (mctx.drawImage(maskImg, 0, 0, width, height), _optionalChain([mctx, 'access',
|
|
1953
|
+
const data = mctx ? (mctx.drawImage(maskImg, 0, 0, width, height), _optionalChain([mctx, 'access', _45 => _45.getImageData, 'optionalCall', _46 => _46(0, 0, width, height)])) : null;
|
|
1841
1954
|
if (data) {
|
|
1842
1955
|
this.depthMaps.set(key2, { width, height, data: data.data });
|
|
1843
1956
|
this.assetVersion++;
|
|
1844
1957
|
}
|
|
1845
|
-
} catch (
|
|
1958
|
+
} catch (e15) {
|
|
1846
1959
|
}
|
|
1847
1960
|
}
|
|
1848
1961
|
if (l.type === "annotation" && l.annotation.type === "image" && !this.imageCache.peek(l.annotation.src)) {
|
|
1849
1962
|
try {
|
|
1850
1963
|
await this.imageCache.get(l.annotation.src);
|
|
1851
1964
|
this.assetVersion++;
|
|
1852
|
-
} catch (
|
|
1965
|
+
} catch (e16) {
|
|
1853
1966
|
}
|
|
1854
1967
|
}
|
|
1855
1968
|
}
|
|
@@ -1877,7 +1990,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1877
1990
|
this.drawAnnotationShape(ctx, annotation, img);
|
|
1878
1991
|
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
1879
1992
|
return new Uint8ClampedArray(ctx.getImageData(0, 0, rect2.width, rect2.height).data);
|
|
1880
|
-
} catch (
|
|
1993
|
+
} catch (e17) {
|
|
1881
1994
|
return null;
|
|
1882
1995
|
}
|
|
1883
1996
|
}
|
|
@@ -1891,7 +2004,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1891
2004
|
if (x1 <= x0 || y1 <= y0) return;
|
|
1892
2005
|
const img = ctx.createImageData(_chunk474IQG74cjs.TILE, _chunk474IQG74cjs.TILE);
|
|
1893
2006
|
img.data.set(data);
|
|
1894
|
-
_optionalChain([this, 'access',
|
|
2007
|
+
_optionalChain([this, 'access', _47 => _47.display, 'optionalCall', _48 => _48(img.data)]);
|
|
1895
2008
|
ctx.putImageData(img, ox, oy, x0, y0, x1 - x0, y1 - y0);
|
|
1896
2009
|
}
|
|
1897
2010
|
/**
|
|
@@ -1958,7 +2071,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1958
2071
|
const opacity = _nullishCoalesce(state.outputOpacity, () => ( 1));
|
|
1959
2072
|
const blur = _nullishCoalesce(state.legacyOutputBlur, () => ( 0));
|
|
1960
2073
|
if (!(opacity < 1) && !(blur > 0)) return null;
|
|
1961
|
-
const data = _optionalChain([ctx, 'access',
|
|
2074
|
+
const data = _optionalChain([ctx, 'access', _49 => _49.getImageData, 'optionalCall', _50 => _50(0, 0, w, h)]);
|
|
1962
2075
|
if (!data) return null;
|
|
1963
2076
|
applyOutputStage(data, opacity, blur);
|
|
1964
2077
|
ctx.putImageData(data, 0, 0);
|
|
@@ -1967,11 +2080,12 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1967
2080
|
publishHistogram(histogram) {
|
|
1968
2081
|
if (histogram === this.previewHistogram) return;
|
|
1969
2082
|
this.previewHistogram = histogram;
|
|
1970
|
-
_optionalChain([this, 'access',
|
|
2083
|
+
_optionalChain([this, 'access', _51 => _51.onPreviewHistogram, 'optionalCall', _52 => _52(histogram)]);
|
|
1971
2084
|
}
|
|
1972
2085
|
__init21() {this.quickMaskCache = /* @__PURE__ */ new WeakMap()}
|
|
1973
|
-
__init22() {this.
|
|
1974
|
-
__init23() {this.
|
|
2086
|
+
__init22() {this.diffCache = /* @__PURE__ */ new WeakMap()}
|
|
2087
|
+
__init23() {this.outlineCache = /* @__PURE__ */ new WeakMap()}
|
|
2088
|
+
__init24() {this.emptyMaskCache = null}
|
|
1975
2089
|
/** An empty selection of the image's size (Quick Mask mode with nothing selected). */
|
|
1976
2090
|
emptyMask(width, height) {
|
|
1977
2091
|
const m = this.emptyMaskCache;
|
|
@@ -1979,15 +2093,15 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1979
2093
|
this.emptyMaskCache = _chunkSS53NNZOcjs.createSelectionMask.call(void 0, Math.max(1, width), Math.max(1, height));
|
|
1980
2094
|
return this.emptyMaskCache;
|
|
1981
2095
|
}
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
2096
|
+
__init25() {this.overlayCache = /* @__PURE__ */ new WeakMap()}
|
|
2097
|
+
__init26() {this.maskViewCache = /* @__PURE__ */ new WeakMap()}
|
|
2098
|
+
__init27() {this.grayCache = /* @__PURE__ */ new WeakMap()}
|
|
1985
2099
|
/** A layer's mask as canvas-sized coverage for its mask view, kept while the mask is unchanged. */
|
|
1986
2100
|
maskViewSelection(layer, width, height) {
|
|
1987
2101
|
if (!layer.mask || layer.mask.source || width < 1 || height < 1) return null;
|
|
1988
2102
|
const key2 = `${width}x${height}:${layer.type === "pixel" ? `${layer.offset.x},${layer.offset.y}` : ""}`;
|
|
1989
2103
|
const cached = this.maskViewCache.get(layer.mask.surface);
|
|
1990
|
-
if (_optionalChain([cached, 'optionalAccess',
|
|
2104
|
+
if (_optionalChain([cached, 'optionalAccess', _53 => _53.key]) === key2) return cached.mask;
|
|
1991
2105
|
const mask = _chunkS55JFWDAcjs.layerMaskSelection.call(void 0, layer, width, height);
|
|
1992
2106
|
if (mask) this.maskViewCache.set(layer.mask.surface, { key: key2, mask });
|
|
1993
2107
|
return mask;
|
|
@@ -2008,7 +2122,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2008
2122
|
}
|
|
2009
2123
|
/** A channel's tint (colour, opacity, masked or selected area), drawn in natural image space. */
|
|
2010
2124
|
drawMaskOverlay(ctx, mask, style) {
|
|
2011
|
-
const key2 = `${_optionalChain([style, 'access',
|
|
2125
|
+
const key2 = `${_optionalChain([style, 'access', _54 => _54.color, 'optionalAccess', _55 => _55.join, 'call', _56 => _56(",")])}|${style.opacity}|${style.indicates}`;
|
|
2012
2126
|
let cached = this.overlayCache.get(mask);
|
|
2013
2127
|
if (!cached || cached.key !== key2) {
|
|
2014
2128
|
const canvas = this.createCanvas(mask.width, mask.height);
|
|
@@ -2023,6 +2137,19 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2023
2137
|
ctx.drawImage(cached.canvas, 0, 0, mask.width, mask.height);
|
|
2024
2138
|
}
|
|
2025
2139
|
/** Rubylith over the unselected area, drawn in natural image space. */
|
|
2140
|
+
drawSelectionDiff(ctx, diff) {
|
|
2141
|
+
let canvas = this.diffCache.get(diff);
|
|
2142
|
+
if (!canvas) {
|
|
2143
|
+
canvas = this.createCanvas(diff.added.width, diff.added.height);
|
|
2144
|
+
const mctx = canvas.getContext("2d");
|
|
2145
|
+
if (!mctx || typeof mctx.createImageData !== "function") return;
|
|
2146
|
+
const img = mctx.createImageData(diff.added.width, diff.added.height);
|
|
2147
|
+
img.data.set(selectionDiffPixels(diff.added, diff.removed));
|
|
2148
|
+
mctx.putImageData(img, 0, 0);
|
|
2149
|
+
this.diffCache.set(diff, canvas);
|
|
2150
|
+
}
|
|
2151
|
+
ctx.drawImage(canvas, 0, 0, diff.added.width, diff.added.height);
|
|
2152
|
+
}
|
|
2026
2153
|
drawQuickMask(ctx, selection) {
|
|
2027
2154
|
let canvas = this.quickMaskCache.get(selection);
|
|
2028
2155
|
if (!canvas) {
|
|
@@ -2131,7 +2258,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2131
2258
|
_chunkOLNIPTB3cjs.blendImageData.call(void 0, backdrop, source, _chunkOLNIPTB3cjs.normalizeBlendMode.call(void 0, ann.blend));
|
|
2132
2259
|
lctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
2133
2260
|
lctx.putImageData(backdrop, 0, 0);
|
|
2134
|
-
} catch (
|
|
2261
|
+
} catch (e18) {
|
|
2135
2262
|
return false;
|
|
2136
2263
|
}
|
|
2137
2264
|
ctx.save();
|
|
@@ -2147,7 +2274,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2147
2274
|
if (ann.type === "image") {
|
|
2148
2275
|
try {
|
|
2149
2276
|
img = await this.imageCache.get(ann.src);
|
|
2150
|
-
} catch (
|
|
2277
|
+
} catch (e19) {
|
|
2151
2278
|
}
|
|
2152
2279
|
}
|
|
2153
2280
|
this.drawAnnotationShape(ctx, ann, img);
|
|
@@ -2426,8 +2553,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2426
2553
|
if (!ctx) return maskCanvas;
|
|
2427
2554
|
ctx.fillStyle = MASK_BLACK;
|
|
2428
2555
|
ctx.fillRect(0, 0, naturalWidth, naturalHeight);
|
|
2429
|
-
const useCrop = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2430
|
-
const useAnnotations = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2556
|
+
const useCrop = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _57 => _57.useCrop]), () => ( true));
|
|
2557
|
+
const useAnnotations = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _58 => _58.useAnnotations]), () => ( true));
|
|
2431
2558
|
if (useCrop && state.crop) {
|
|
2432
2559
|
ctx.fillStyle = MASK_WHITE;
|
|
2433
2560
|
ctx.fillRect(state.crop.x, state.crop.y, state.crop.width, state.crop.height);
|
|
@@ -2437,8 +2564,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2437
2564
|
this.drawAnnotationMask(ctx, ann);
|
|
2438
2565
|
}
|
|
2439
2566
|
}
|
|
2440
|
-
const imageData = _optionalChain([ctx, 'access',
|
|
2441
|
-
const selection = (_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2567
|
+
const imageData = _optionalChain([ctx, 'access', _59 => _59.getImageData, 'optionalCall', _60 => _60(0, 0, naturalWidth, naturalHeight)]);
|
|
2568
|
+
const selection = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _61 => _61.useSelection]), () => ( true))) && _optionalChain([state, 'access', _62 => _62.selection, 'optionalAccess', _63 => _63.bounds]) && state.selection.width === naturalWidth && state.selection.height === naturalHeight ? state.selection : null;
|
|
2442
2569
|
if (imageData) {
|
|
2443
2570
|
const d = imageData.data;
|
|
2444
2571
|
for (let i = 0; i < d.length; i += 4) {
|
|
@@ -2524,16 +2651,16 @@ function getBaseProjection(region, transform, baseW, baseH) {
|
|
|
2524
2651
|
};
|
|
2525
2652
|
}
|
|
2526
2653
|
var CompositeCanvas = (_class3 = class {
|
|
2527
|
-
constructor(canvas, rect2) {;_class3.prototype.
|
|
2654
|
+
constructor(canvas, rect2) {;_class3.prototype.__init28.call(this);_class3.prototype.__init29.call(this);_class3.prototype.__init30.call(this);
|
|
2528
2655
|
this.canvas = canvas;
|
|
2529
2656
|
this.rect = rect2;
|
|
2530
2657
|
this.region = rect2;
|
|
2531
2658
|
}
|
|
2532
2659
|
|
|
2533
2660
|
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2661
|
+
__init28() {this.tiles = /* @__PURE__ */ new Map()}
|
|
2662
|
+
__init29() {this.histograms = /* @__PURE__ */ new Map()}
|
|
2663
|
+
__init30() {this.version = 0}
|
|
2537
2664
|
|
|
2538
2665
|
/** Histogram of the composite over the region (per-tile parts are cached). */
|
|
2539
2666
|
histogram() {
|
|
@@ -2987,10 +3114,10 @@ function regions(a, W, H, b, minArea) {
|
|
|
2987
3114
|
const kept = list.filter((r) => r.area >= minArea).sort((p, q) => q.area - p.area);
|
|
2988
3115
|
return { count: kept.length, totalArea: kept.reduce((s, r) => s + r.area, 0), largest: kept.slice(0, 10).map((r) => ({ area: r.area, bounds: box(r) })) };
|
|
2989
3116
|
};
|
|
2990
|
-
const
|
|
3117
|
+
const pieces2 = found.filter((r) => r.fg).sort((p, q) => q.area - p.area);
|
|
2991
3118
|
return {
|
|
2992
3119
|
holes: summarize(found.filter((r) => !r.fg && !r.outer)),
|
|
2993
|
-
islands: summarize(
|
|
3120
|
+
islands: summarize(pieces2.slice(1))
|
|
2994
3121
|
};
|
|
2995
3122
|
}
|
|
2996
3123
|
|
|
@@ -3194,8 +3321,8 @@ var EdgeMap = (_class4 = class {
|
|
|
3194
3321
|
|
|
3195
3322
|
|
|
3196
3323
|
|
|
3197
|
-
|
|
3198
|
-
constructor(pixels, options = {}) {;_class4.prototype.
|
|
3324
|
+
__init31() {this.blocks = /* @__PURE__ */ new Map()}
|
|
3325
|
+
constructor(pixels, options = {}) {;_class4.prototype.__init31.call(this);
|
|
3199
3326
|
const { width, height, data } = pixels;
|
|
3200
3327
|
if (!(width >= 1 && height >= 1) || data.length < width * height * 4) throw new Error("Invalid pixel buffer for edge detection.");
|
|
3201
3328
|
this.width = width;
|
|
@@ -3312,10 +3439,10 @@ function snapToEdge(map, point, width = 10) {
|
|
|
3312
3439
|
}
|
|
3313
3440
|
return best > 0 ? { x: bx + 0.5, y: by + 0.5 } : point;
|
|
3314
3441
|
}
|
|
3315
|
-
var Heap = (_class5 = class {constructor() { _class5.prototype.
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3442
|
+
var Heap = (_class5 = class {constructor() { _class5.prototype.__init32.call(this);_class5.prototype.__init33.call(this);_class5.prototype.__init34.call(this); }
|
|
3443
|
+
__init32() {this.ids = new Int32Array(256)}
|
|
3444
|
+
__init33() {this.keys = new Float64Array(256)}
|
|
3445
|
+
__init34() {this.size = 0}
|
|
3319
3446
|
push(id, key2) {
|
|
3320
3447
|
if (this.size === this.ids.length) {
|
|
3321
3448
|
const ids = new Int32Array(this.size * 2);
|
|
@@ -3522,15 +3649,15 @@ function readPaths(stored, problems = []) {
|
|
|
3522
3649
|
let work = false;
|
|
3523
3650
|
for (const [i, raw] of stored.entries()) {
|
|
3524
3651
|
const r = raw;
|
|
3525
|
-
const name = typeof _optionalChain([r, 'optionalAccess',
|
|
3652
|
+
const name = typeof _optionalChain([r, 'optionalAccess', _64 => _64.name]) === "string" && r.name.trim() ? r.name.trim() : `Path ${i + 1}`;
|
|
3526
3653
|
try {
|
|
3527
|
-
const components = _chunkS55JFWDAcjs.readShapeComponents.call(void 0, _optionalChain([r, 'optionalAccess',
|
|
3528
|
-
let id = typeof _optionalChain([r, 'optionalAccess',
|
|
3654
|
+
const components = _chunkS55JFWDAcjs.readShapeComponents.call(void 0, _optionalChain([r, 'optionalAccess', _65 => _65.components]));
|
|
3655
|
+
let id = typeof _optionalChain([r, 'optionalAccess', _66 => _66.id]) === "string" && r.id ? r.id : newPathId();
|
|
3529
3656
|
if (ids.has(id)) id = newPathId();
|
|
3530
3657
|
ids.add(id);
|
|
3531
3658
|
const path = { id, name, components };
|
|
3532
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
3533
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
3659
|
+
if (_optionalChain([r, 'optionalAccess', _67 => _67.fillRule]) === "evenodd") path.fillRule = "evenodd";
|
|
3660
|
+
if (_optionalChain([r, 'optionalAccess', _68 => _68.work]) === true && !work) {
|
|
3534
3661
|
path.work = true;
|
|
3535
3662
|
work = true;
|
|
3536
3663
|
}
|
|
@@ -3601,15 +3728,15 @@ function liveShapeForDrag(o, a, b, mods = {}) {
|
|
|
3601
3728
|
return null;
|
|
3602
3729
|
}
|
|
3603
3730
|
var ShapeDrawGesture = (_class6 = class {
|
|
3604
|
-
constructor(controller, options) {;_class6.prototype.
|
|
3731
|
+
constructor(controller, options) {;_class6.prototype.__init35.call(this);_class6.prototype.__init36.call(this);_class6.prototype.__init37.call(this);
|
|
3605
3732
|
this.controller = controller;
|
|
3606
3733
|
this.options = options;
|
|
3607
3734
|
}
|
|
3608
3735
|
|
|
3609
3736
|
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3737
|
+
__init35() {this.start = null}
|
|
3738
|
+
__init36() {this.layerId = null}
|
|
3739
|
+
__init37() {this.error = null}
|
|
3613
3740
|
get active() {
|
|
3614
3741
|
return this.start !== null;
|
|
3615
3742
|
}
|
|
@@ -3654,11 +3781,11 @@ function applyShapeOptions(controller, layerId, change) {
|
|
|
3654
3781
|
const style = {};
|
|
3655
3782
|
if ("fill" in change) style.fill = _nullishCoalesce(change.fill, () => ( null));
|
|
3656
3783
|
if ("stroke" in change || "strokeWidth" in change) {
|
|
3657
|
-
const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access',
|
|
3658
|
-
style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access',
|
|
3784
|
+
const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access', _69 => _69.stroke, 'optionalAccess', _70 => _70.paint, 'access', _71 => _71.type]) === "color" ? info.stroke.paint.color : null;
|
|
3785
|
+
style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access', _72 => _72.stroke, 'optionalAccess', _73 => _73.width]))), () => ( 2)), paint: color } : null;
|
|
3659
3786
|
}
|
|
3660
3787
|
if (Object.keys(style).length) controller.setShapeStyle(layerId, style);
|
|
3661
|
-
const live = _optionalChain([info, 'access',
|
|
3788
|
+
const live = _optionalChain([info, 'access', _74 => _74.components, 'access', _75 => _75[0], 'optionalAccess', _76 => _76.live]);
|
|
3662
3789
|
if (!live) return;
|
|
3663
3790
|
const shape = {};
|
|
3664
3791
|
if (live.kind === "rect" && change.radius !== void 0) shape.radius = change.radius;
|
|
@@ -3670,7 +3797,7 @@ function applyShapeOptions(controller, layerId, change) {
|
|
|
3670
3797
|
if (Object.keys(shape).length) controller.setShapeComponent(layerId, 0, { shape });
|
|
3671
3798
|
}
|
|
3672
3799
|
var TextEditSession = (_class7 = class {
|
|
3673
|
-
constructor(controller, layerId, index) {;_class7.prototype.
|
|
3800
|
+
constructor(controller, layerId, index) {;_class7.prototype.__init38.call(this);_class7.prototype.__init39.call(this);_class7.prototype.__init40.call(this);
|
|
3674
3801
|
this.controller = controller;
|
|
3675
3802
|
this.layerId = layerId;
|
|
3676
3803
|
const n = this.text.length;
|
|
@@ -3680,11 +3807,11 @@ var TextEditSession = (_class7 = class {
|
|
|
3680
3807
|
|
|
3681
3808
|
|
|
3682
3809
|
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3810
|
+
__init38() {this.changed = false}
|
|
3811
|
+
__init39() {this.listeners = /* @__PURE__ */ new Set()}
|
|
3812
|
+
__init40() {this.error = null}
|
|
3686
3813
|
get layer() {
|
|
3687
|
-
const l = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess',
|
|
3814
|
+
const l = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _77 => _77.layer]);
|
|
3688
3815
|
if (!l || l.type !== "type") throw new Error("The type layer being edited is gone.");
|
|
3689
3816
|
return l;
|
|
3690
3817
|
}
|
|
@@ -3699,7 +3826,7 @@ var TextEditSession = (_class7 = class {
|
|
|
3699
3826
|
}
|
|
3700
3827
|
/** Whether the layer still exists (it can be deleted or undone away while editing). */
|
|
3701
3828
|
get alive() {
|
|
3702
|
-
return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess',
|
|
3829
|
+
return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _78 => _78.layer, 'access', _79 => _79.type]) === "type";
|
|
3703
3830
|
}
|
|
3704
3831
|
subscribe(fn) {
|
|
3705
3832
|
this.listeners.add(fn);
|
|
@@ -3885,14 +4012,14 @@ var TextEditSession = (_class7 = class {
|
|
|
3885
4012
|
if (!this.text.trim().length) {
|
|
3886
4013
|
try {
|
|
3887
4014
|
this.controller.removeLayer(this.layerId);
|
|
3888
|
-
} catch (
|
|
4015
|
+
} catch (e20) {
|
|
3889
4016
|
}
|
|
3890
4017
|
return false;
|
|
3891
4018
|
}
|
|
3892
4019
|
if (this.layer.name === "Text" && this.changed) {
|
|
3893
4020
|
try {
|
|
3894
4021
|
this.controller.setLayerProperties(this.layerId, { name: _chunkS55JFWDAcjs.typeLayerName.call(void 0, this.text) }, false);
|
|
3895
|
-
} catch (
|
|
4022
|
+
} catch (e21) {
|
|
3896
4023
|
}
|
|
3897
4024
|
}
|
|
3898
4025
|
return true;
|
|
@@ -3931,15 +4058,15 @@ function invert(m) {
|
|
|
3931
4058
|
return [d / det, -b / det, -c / det, a / det, (c * f - d * e) / det, (b * e - a * f) / det];
|
|
3932
4059
|
}
|
|
3933
4060
|
var TypeToolGesture = (_class8 = class {
|
|
3934
|
-
constructor(controller, options) {;_class8.prototype.
|
|
4061
|
+
constructor(controller, options) {;_class8.prototype.__init41.call(this);_class8.prototype.__init42.call(this);_class8.prototype.__init43.call(this);
|
|
3935
4062
|
this.controller = controller;
|
|
3936
4063
|
this.options = options;
|
|
3937
4064
|
}
|
|
3938
4065
|
|
|
3939
4066
|
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
4067
|
+
__init41() {this.session = null}
|
|
4068
|
+
__init42() {this.dragStart = null}
|
|
4069
|
+
__init43() {this.error = null}
|
|
3943
4070
|
down(p, mods = {}) {
|
|
3944
4071
|
this.error = null;
|
|
3945
4072
|
const hit = typeLayerAt(this.controller, p);
|
|
@@ -3987,7 +4114,7 @@ var TypeToolGesture = (_class8 = class {
|
|
|
3987
4114
|
finish() {
|
|
3988
4115
|
const s = this.session;
|
|
3989
4116
|
this.session = null;
|
|
3990
|
-
_optionalChain([s, 'optionalAccess',
|
|
4117
|
+
_optionalChain([s, 'optionalAccess', _80 => _80.close, 'call', _81 => _81()]);
|
|
3991
4118
|
}
|
|
3992
4119
|
}, _class8);
|
|
3993
4120
|
|
|
@@ -4339,7 +4466,7 @@ function segmentToSelection(width, height, result) {
|
|
|
4339
4466
|
const sized = raw.width === width && raw.height === height ? raw : _chunkSS53NNZOcjs.resizeSelection.call(void 0, raw, width, height);
|
|
4340
4467
|
out = _chunkSS53NNZOcjs.combineSelections.call(void 0, out, sized, "add");
|
|
4341
4468
|
}
|
|
4342
|
-
return _optionalChain([out, 'optionalAccess',
|
|
4469
|
+
return _optionalChain([out, 'optionalAccess', _82 => _82.bounds]) ? out : null;
|
|
4343
4470
|
}
|
|
4344
4471
|
function segmentsToSelection(width, height, results) {
|
|
4345
4472
|
let out = null;
|
|
@@ -4388,7 +4515,7 @@ function deserializeChannels(value, size, problems = []) {
|
|
|
4388
4515
|
visible: v.visible === true
|
|
4389
4516
|
});
|
|
4390
4517
|
} catch (err) {
|
|
4391
|
-
problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess',
|
|
4518
|
+
problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess', _83 => _83.name]), () => ( "?")))}" could not be read: ${err instanceof Error ? err.message : String(err)}.`);
|
|
4392
4519
|
}
|
|
4393
4520
|
}
|
|
4394
4521
|
return out;
|
|
@@ -4426,16 +4553,16 @@ function checkEffectTime(time) {
|
|
|
4426
4553
|
return time;
|
|
4427
4554
|
}
|
|
4428
4555
|
function checkEffectAnimation(animate) {
|
|
4429
|
-
const duration = _optionalChain([animate, 'optionalAccess',
|
|
4556
|
+
const duration = _optionalChain([animate, 'optionalAccess', _84 => _84.duration]);
|
|
4430
4557
|
if (!(typeof duration === "number" && Number.isFinite(duration) && duration > 0 && duration <= _chunkS55JFWDAcjs.MAX_EFFECT_ANIMATION_MS)) {
|
|
4431
4558
|
throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`animate.duration must be more than 0 and at most ${_chunkS55JFWDAcjs.MAX_EFFECT_ANIMATION_MS} ms.`);
|
|
4432
4559
|
}
|
|
4433
4560
|
return { duration: Math.round(duration) };
|
|
4434
4561
|
}
|
|
4435
4562
|
function effectLayerTiming(g, d) {
|
|
4436
|
-
if (!_optionalChain([d, 'optionalAccess',
|
|
4563
|
+
if (!_optionalChain([d, 'optionalAccess', _85 => _85.duration])) return null;
|
|
4437
4564
|
const time = _nullishCoalesce(g.time, () => ( 0));
|
|
4438
|
-
return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access',
|
|
4565
|
+
return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access', _86 => _86.animate, 'optionalAccess', _87 => _87.duration]), () => ( d.duration)), loops: d.loop };
|
|
4439
4566
|
}
|
|
4440
4567
|
|
|
4441
4568
|
// src/image-editor/effects.ts
|
|
@@ -4482,16 +4609,16 @@ function effectPixelsToSurface(p, depth) {
|
|
|
4482
4609
|
}
|
|
4483
4610
|
var ImageEffectsEngine = (_class9 = class {
|
|
4484
4611
|
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4612
|
+
__init44() {this.cache = /* @__PURE__ */ new Map()}
|
|
4613
|
+
__init45() {this.pending = /* @__PURE__ */ new Map()}
|
|
4614
|
+
__init46() {this.failures = /* @__PURE__ */ new Map()}
|
|
4488
4615
|
|
|
4489
|
-
|
|
4490
|
-
|
|
4616
|
+
__init47() {this.descriptions = /* @__PURE__ */ new Map()}
|
|
4617
|
+
__init48() {this.listeners = /* @__PURE__ */ new Set()}
|
|
4491
4618
|
|
|
4492
|
-
|
|
4619
|
+
__init49() {this.generation = 0}
|
|
4493
4620
|
|
|
4494
|
-
constructor(options = {}) {;_class9.prototype.
|
|
4621
|
+
constructor(options = {}) {;_class9.prototype.__init44.call(this);_class9.prototype.__init45.call(this);_class9.prototype.__init46.call(this);_class9.prototype.__init47.call(this);_class9.prototype.__init48.call(this);_class9.prototype.__init49.call(this);
|
|
4495
4622
|
this.slot = _nullishCoalesce(options.slot, () => ( new (0, _chunkA3A5TI6Rcjs.EffectsSlot)()));
|
|
4496
4623
|
this.maxEntries = _nullishCoalesce(options.maxEntries, () => ( 24));
|
|
4497
4624
|
this.pool = new (0, _chunkPY4GWSE2cjs.EffectRendererPool)({ maxRenderers: options.maxRenderers });
|
|
@@ -4683,19 +4810,19 @@ function liftMask(mask, sel, o) {
|
|
|
4683
4810
|
return { lifted: _chunk474IQG74cjs.surfaceFromPixels.call(void 0, { width: area.width, height: area.height, data: lifted }, 4, area.x, area.y), rest: _chunk474IQG74cjs.writeRegion.call(void 0, mask, area, rest) };
|
|
4684
4811
|
}
|
|
4685
4812
|
var FreeTransformSession = (_class10 = class {
|
|
4686
|
-
constructor(host, init = {}) {;_class10.prototype.
|
|
4813
|
+
constructor(host, init = {}) {;_class10.prototype.__init50.call(this);_class10.prototype.__init51.call(this);_class10.prototype.__init52.call(this);_class10.prototype.__init53.call(this);_class10.prototype.__init54.call(this);_class10.prototype.__init55.call(this);_class10.prototype.__init56.call(this);_class10.prototype.__init57.call(this);_class10.prototype.__init58.call(this);_class10.prototype.__init59.call(this);_class10.prototype.__init60.call(this);
|
|
4687
4814
|
this.host = host;
|
|
4688
4815
|
if (init.interpolation !== void 0 && !_chunkB46UQUDCcjs.isInterpolation.call(void 0, init.interpolation)) fail(`Unknown interpolation "${String(init.interpolation)}"; use nearest, bilinear or bicubic.`);
|
|
4689
4816
|
this.interp = _nullishCoalesce(init.interpolation, () => ( "bicubic"));
|
|
4690
4817
|
const sel = host.selection();
|
|
4691
|
-
const selected = Boolean(_optionalChain([sel, 'optionalAccess',
|
|
4818
|
+
const selected = Boolean(_optionalChain([sel, 'optionalAccess', _88 => _88.bounds]));
|
|
4692
4819
|
let content = _nullishCoalesce(init.content, () => ( "auto"));
|
|
4693
4820
|
if (!["auto", "layer", "selection", "selection-copy", "selection-outline"].includes(content)) {
|
|
4694
4821
|
fail(`Unknown content "${String(content)}"; use auto, layer, selection, selection-copy or selection-outline.`);
|
|
4695
4822
|
}
|
|
4696
4823
|
const targetId = _nullishCoalesce(init.layerId, () => ( host.activeLayerId()));
|
|
4697
|
-
const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess',
|
|
4698
|
-
const smartTarget = (_optionalChain([target, 'optionalAccess',
|
|
4824
|
+
const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess', _89 => _89.layer]) : void 0;
|
|
4825
|
+
const smartTarget = (_optionalChain([target, 'optionalAccess', _90 => _90.type]) === "smart" || _optionalChain([target, 'optionalAccess', _91 => _91.type]) === "shape" || _optionalChain([target, 'optionalAccess', _92 => _92.type]) === "type") && (_nullishCoalesce(init.channel, () => ( (target.id === host.activeLayerId() ? host.activeTarget() : "pixels")))) !== "mask";
|
|
4699
4826
|
if (content === "auto") content = selected && !smartTarget ? "selection" : "layer";
|
|
4700
4827
|
this.content = content;
|
|
4701
4828
|
if (content !== "layer" && !selected) fail(`Nothing is selected; ${content} needs a selection. Select first, or use content layer.`);
|
|
@@ -4719,9 +4846,9 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4719
4846
|
const mask = layer.mask && !layer.mask.source ? layer.mask : void 0;
|
|
4720
4847
|
const channel = _nullishCoalesce(init.channel, () => ( (layer.id === host.activeLayerId() ? host.activeTarget() : "pixels")));
|
|
4721
4848
|
if (channel !== "pixels" && channel !== "mask") fail(`Unknown channel "${String(channel)}"; use pixels or mask.`);
|
|
4722
|
-
const linked = _optionalChain([mask, 'optionalAccess',
|
|
4849
|
+
const linked = _optionalChain([mask, 'optionalAccess', _93 => _93.linked]) !== false;
|
|
4723
4850
|
const maskAlone = channel === "mask" && (!linked || layer.type !== "pixel");
|
|
4724
|
-
if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access',
|
|
4851
|
+
if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access', _94 => _94.mask, 'optionalAccess', _95 => _95.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.`);
|
|
4725
4852
|
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.`);
|
|
4726
4853
|
if (!layer.visible && content !== "selection-copy") fail(`Layer "${layer.name || id}" is hidden; show it before you transform it.`);
|
|
4727
4854
|
if (content !== "selection-copy") {
|
|
@@ -4824,7 +4951,7 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4824
4951
|
};
|
|
4825
4952
|
this.copyId = copy.id;
|
|
4826
4953
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, layer.id);
|
|
4827
|
-
this.startLayers = _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
4954
|
+
this.startLayers = _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _96 => _96.parent, 'optionalAccess', _97 => _97.id]), () => ( null)), loc.index + 1);
|
|
4828
4955
|
this.parts.push({ what: "pixels", offset: o, moving: lifted, base: null, reduced: /* @__PURE__ */ new Map() });
|
|
4829
4956
|
moves.push("pixels");
|
|
4830
4957
|
}
|
|
@@ -4850,7 +4977,7 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4850
4977
|
/** The layer being transformed (`null` for `selection-outline`). */
|
|
4851
4978
|
|
|
4852
4979
|
/** The new layer of a `selection-copy`. */
|
|
4853
|
-
|
|
4980
|
+
__init50() {this.copyId = null}
|
|
4854
4981
|
/** The frame (document pixels). */
|
|
4855
4982
|
|
|
4856
4983
|
/** What moves. */
|
|
@@ -4862,27 +4989,27 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4862
4989
|
*/
|
|
4863
4990
|
|
|
4864
4991
|
/** True when the layer is a smart object (the transform sets its placement). */
|
|
4865
|
-
|
|
4992
|
+
__init51() {this.smartObject = false}
|
|
4866
4993
|
/** True when the layer is a shape layer (the transform maps its paths and renders them again). */
|
|
4867
|
-
|
|
4868
|
-
|
|
4994
|
+
__init52() {this.shapeLayer = false}
|
|
4995
|
+
__init53() {this.shape = null}
|
|
4869
4996
|
/** True when the layer is a type layer (the transform sets its text matrix; affine only). */
|
|
4870
|
-
|
|
4871
|
-
|
|
4997
|
+
__init54() {this.typeLayer = false}
|
|
4998
|
+
__init55() {this.typeTarget = null}
|
|
4872
4999
|
|
|
4873
|
-
|
|
4874
|
-
|
|
5000
|
+
__init56() {this.smart = null}
|
|
5001
|
+
__init57() {this.smartReduced = /* @__PURE__ */ new Map()}
|
|
4875
5002
|
|
|
4876
|
-
|
|
5003
|
+
__init58() {this.smartMasksMoved = false}
|
|
4877
5004
|
|
|
4878
|
-
|
|
5005
|
+
__init59() {this.parts = []}
|
|
4879
5006
|
|
|
4880
5007
|
|
|
4881
5008
|
|
|
4882
5009
|
|
|
4883
5010
|
/** The stack this session last showed: anything else means the document changed under it. */
|
|
4884
5011
|
|
|
4885
|
-
|
|
5012
|
+
__init60() {this.closed = false}
|
|
4886
5013
|
/** The current geometry. */
|
|
4887
5014
|
get geometry() {
|
|
4888
5015
|
return this.geometryValue;
|
|
@@ -4933,7 +5060,7 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4933
5060
|
moveVectorMask(layers) {
|
|
4934
5061
|
const g = this.geometryValue;
|
|
4935
5062
|
if (!this.layerId || this.copyId || !this.moves.includes("pixels") || _chunkS55JFWDAcjs.isIdentityTransform.call(void 0, g)) return layers;
|
|
4936
|
-
const vm = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess',
|
|
5063
|
+
const vm = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess', _98 => _98.layer, 'access', _99 => _99.vectorMask]);
|
|
4937
5064
|
if (!vm || vm.linked === false) return layers;
|
|
4938
5065
|
const warp = _chunkS55JFWDAcjs.hasWarp.call(void 0, g);
|
|
4939
5066
|
const f = warp ? _chunkS55JFWDAcjs.transformMap.call(void 0, g) : null;
|
|
@@ -5104,11 +5231,11 @@ var FreeTransformSession = (_class10 = class {
|
|
|
5104
5231
|
result(changed, layers, selection) {
|
|
5105
5232
|
let bounds = null;
|
|
5106
5233
|
const id = _nullishCoalesce(this.copyId, () => ( this.layerId));
|
|
5107
|
-
const layer = id ? _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, layers, id), 'optionalAccess',
|
|
5108
|
-
if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess',
|
|
5109
|
-
else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess',
|
|
5110
|
-
else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess',
|
|
5111
|
-
else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess',
|
|
5234
|
+
const layer = id ? _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _100 => _100.layer]) : void 0;
|
|
5235
|
+
if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess', _101 => _101.type]) === "pixel") bounds = toDoc(_chunk474IQG74cjs.contentBounds.call(void 0, this.host.pixelsOf(layer)), layer.offset);
|
|
5236
|
+
else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess', _102 => _102.type]) === "smart" || _optionalChain([layer, 'optionalAccess', _103 => _103.type]) === "shape" || _optionalChain([layer, 'optionalAccess', _104 => _104.type]) === "type")) bounds = _chunk474IQG74cjs.contentBounds.call(void 0, layer.surface);
|
|
5237
|
+
else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess', _105 => _105.mask])) bounds = toDoc(_chunk474IQG74cjs.contentBounds.call(void 0, layer.mask.surface), layer.type === "pixel" ? layer.offset : { x: 0, y: 0 });
|
|
5238
|
+
else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess', _106 => _106.bounds]) ? { ...selection.bounds } : null;
|
|
5112
5239
|
return {
|
|
5113
5240
|
layerId: _nullishCoalesce(this.copyId, () => ( this.layerId)),
|
|
5114
5241
|
content: this.content,
|
|
@@ -5137,7 +5264,7 @@ function deserializeColorMode(raw, problems) {
|
|
|
5137
5264
|
}
|
|
5138
5265
|
function effectiveProof(proof, mode) {
|
|
5139
5266
|
if (proof) return proof;
|
|
5140
|
-
if (_optionalChain([mode, 'optionalAccess',
|
|
5267
|
+
if (_optionalChain([mode, 'optionalAccess', _107 => _107.mode]) === "cmyk") return { ...DEFAULT_PROOF, profile: mode.profile, intent: mode.intent };
|
|
5141
5268
|
return null;
|
|
5142
5269
|
}
|
|
5143
5270
|
function colorModePlanes(doc, mode) {
|
|
@@ -5192,7 +5319,7 @@ function resolveProfile(doc) {
|
|
|
5192
5319
|
return p;
|
|
5193
5320
|
}
|
|
5194
5321
|
function profileBytes(doc) {
|
|
5195
|
-
if (_optionalChain([doc, 'optionalAccess',
|
|
5322
|
+
if (_optionalChain([doc, 'optionalAccess', _108 => _108.icc])) return doc.icc;
|
|
5196
5323
|
const p = resolveProfile(doc);
|
|
5197
5324
|
return _nullishCoalesce(p.bytes, () => ( _chunkBROJYMWUcjs.encodeProfile.call(void 0, p)));
|
|
5198
5325
|
}
|
|
@@ -5209,7 +5336,7 @@ function isSrgb(doc) {
|
|
|
5209
5336
|
if (!doc || doc.builtin === "srgb") return true;
|
|
5210
5337
|
try {
|
|
5211
5338
|
return _chunkBROJYMWUcjs.sameColors.call(void 0, resolveProfile(doc), _chunkBROJYMWUcjs.srgbProfile.call(void 0, ), _chunkBROJYMWUcjs.builtinProfile.call(void 0, "lab-d50"));
|
|
5212
|
-
} catch (
|
|
5339
|
+
} catch (e22) {
|
|
5213
5340
|
return false;
|
|
5214
5341
|
}
|
|
5215
5342
|
}
|
|
@@ -5354,7 +5481,7 @@ function paintCoverageInto(base, coverage, apply, rects, depth = null) {
|
|
|
5354
5481
|
else tiles.delete(key2);
|
|
5355
5482
|
continue;
|
|
5356
5483
|
}
|
|
5357
|
-
const src = _nullishCoalesce(_optionalChain([base, 'access',
|
|
5484
|
+
const src = _nullishCoalesce(_optionalChain([base, 'access', _109 => _109.tiles, 'access', _110 => _110.get, 'call', _111 => _111(key2), 'optionalAccess', _112 => _112.data]), () => ( defaultTile(base)));
|
|
5358
5485
|
const data = _chunkPQ3H2AANcjs.applyStrokeToTile.call(void 0, coverage, src, base.channels, t.tx, t.ty, apply);
|
|
5359
5486
|
const tile = _chunk474IQG74cjs.finishTile.call(void 0, data, base.channels, base.defaultValue);
|
|
5360
5487
|
if (tile) tiles.set(key2, tile);
|
|
@@ -5369,7 +5496,7 @@ function defaultTile(s) {
|
|
|
5369
5496
|
return d;
|
|
5370
5497
|
}
|
|
5371
5498
|
var PaintStrokeSession = (_class11 = class {
|
|
5372
|
-
constructor(controller, target, stroke, apply, depth = null) {;_class11.prototype.
|
|
5499
|
+
constructor(controller, target, stroke, apply, depth = null) {;_class11.prototype.__init61.call(this);_class11.prototype.__init62.call(this);_class11.prototype.__init63.call(this);_class11.prototype.__init64.call(this);_class11.prototype.__init65.call(this);_class11.prototype.__init66.call(this);_class11.prototype.__init67.call(this);_class11.prototype.__init68.call(this);_class11.prototype.__init69.call(this);_class11.prototype.__init70.call(this);_class11.prototype.__init71.call(this);
|
|
5373
5500
|
this.controller = controller;
|
|
5374
5501
|
this.target = target;
|
|
5375
5502
|
this.apply = apply;
|
|
@@ -5406,28 +5533,28 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5406
5533
|
|
|
5407
5534
|
|
|
5408
5535
|
|
|
5409
|
-
|
|
5536
|
+
__init61() {this.touched = /* @__PURE__ */ new Set()}
|
|
5410
5537
|
|
|
5411
5538
|
|
|
5412
|
-
|
|
5413
|
-
|
|
5539
|
+
__init62() {this.mixerInit = null}
|
|
5540
|
+
__init63() {this.retouch = null}
|
|
5414
5541
|
/** Writes a mask's RGBA view back (sequential retouching on a mask). */
|
|
5415
|
-
|
|
5416
|
-
|
|
5542
|
+
__init64() {this.flushView = null}
|
|
5543
|
+
__init65() {this.started = false}
|
|
5417
5544
|
/** Mixer tiles written since the last update: they get new tile objects so the compositor sees them change. */
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5545
|
+
__init66() {this.fresh = /* @__PURE__ */ new Set()}
|
|
5546
|
+
__init67() {this.last = null}
|
|
5547
|
+
__init68() {this.closed = false}
|
|
5421
5548
|
/** Brush and eraser strokes on a 16- or 32-bit document: the deep samples of each touched tile. */
|
|
5422
5549
|
|
|
5423
|
-
|
|
5550
|
+
__init69() {this.liveDeep = /* @__PURE__ */ new Map()}
|
|
5424
5551
|
/**
|
|
5425
5552
|
* Mixer Brush, Smudge and Sponge on a 16- or 32-bit layer: they read and write float working
|
|
5426
5553
|
* tiles on the 8-bit 0..255 sRGB-encoded scale, which keep the fractions bytes would round away.
|
|
5427
5554
|
*/
|
|
5428
5555
|
|
|
5429
|
-
|
|
5430
|
-
|
|
5556
|
+
__init70() {this.work = /* @__PURE__ */ new Map()}
|
|
5557
|
+
__init71() {this.workRead = /* @__PURE__ */ new Map()}
|
|
5431
5558
|
/** The pre-stroke tile as a float working tile (cached; `null`: transparent). */
|
|
5432
5559
|
readWork(key2) {
|
|
5433
5560
|
if (!this.workRead.has(key2)) this.workRead.set(key2, workTileOf(this.base.tiles.get(key2)));
|
|
@@ -5467,7 +5594,7 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5467
5594
|
writeTile: (tx, ty) => {
|
|
5468
5595
|
const key2 = _chunk474IQG74cjs.tileKey.call(void 0, tx, ty);
|
|
5469
5596
|
if (!this.touched.has(key2)) {
|
|
5470
|
-
this.work.set(key2, _nullishCoalesce(_optionalChain([read, 'call',
|
|
5597
|
+
this.work.set(key2, _nullishCoalesce(_optionalChain([read, 'call', _113 => _113(key2), 'optionalAccess', _114 => _114.slice, 'call', _115 => _115()]), () => ( new Float32Array(_chunk474IQG74cjs.TILE * _chunk474IQG74cjs.TILE * 4))));
|
|
5471
5598
|
this.touched.add(key2);
|
|
5472
5599
|
}
|
|
5473
5600
|
this.fresh.add(key2);
|
|
@@ -5479,11 +5606,11 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5479
5606
|
offset: a.offset,
|
|
5480
5607
|
lockTransparency: a.lockTransparency,
|
|
5481
5608
|
selection: a.selection,
|
|
5482
|
-
readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
5609
|
+
readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access', _116 => _116.live, 'access', _117 => _117.get, 'call', _118 => _118(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _119 => _119.data]), () => ( (this.base.defaultValue ? defaultTile(this.base) : null))),
|
|
5483
5610
|
writeTile: (tx, ty) => {
|
|
5484
5611
|
const key2 = _chunk474IQG74cjs.tileKey.call(void 0, tx, ty);
|
|
5485
5612
|
if (!this.touched.has(key2)) {
|
|
5486
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
5613
|
+
const src = _nullishCoalesce(_optionalChain([this, 'access', _120 => _120.base, 'access', _121 => _121.tiles, 'access', _122 => _122.get, 'call', _123 => _123(key2), 'optionalAccess', _124 => _124.data]), () => ( defaultTile(this.base)));
|
|
5487
5614
|
this.live.set(key2, { data: new Uint8ClampedArray(src), uniform: null });
|
|
5488
5615
|
this.touched.add(key2);
|
|
5489
5616
|
}
|
|
@@ -5500,11 +5627,11 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5500
5627
|
if (this.closed || !points.length) return;
|
|
5501
5628
|
if (!this.started) {
|
|
5502
5629
|
this.started = true;
|
|
5503
|
-
if (_optionalChain([this, 'access',
|
|
5630
|
+
if (_optionalChain([this, 'access', _125 => _125.retouch, 'optionalAccess', _126 => _126.kind]) === "coverage") this.retouch.start(points[0]);
|
|
5504
5631
|
}
|
|
5505
5632
|
this.last = points[points.length - 1];
|
|
5506
5633
|
const rects = this.mixer ? this.mixer.push(points) : this.stroke.push(points);
|
|
5507
|
-
_optionalChain([this, 'access',
|
|
5634
|
+
_optionalChain([this, 'access', _127 => _127.flushView, 'optionalCall', _128 => _128()]);
|
|
5508
5635
|
this.update(rects);
|
|
5509
5636
|
}
|
|
5510
5637
|
update(rects) {
|
|
@@ -5534,7 +5661,7 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5534
5661
|
for (const [key2, { tx, ty, r }] of regions2) {
|
|
5535
5662
|
if (this.deep) {
|
|
5536
5663
|
const rt = this.retouch;
|
|
5537
|
-
const paint = _optionalChain([rt, 'optionalAccess',
|
|
5664
|
+
const paint = _optionalChain([rt, 'optionalAccess', _129 => _129.kind]) === "coverage" ? rt.paint() : null;
|
|
5538
5665
|
if (paint && paint.kind !== "tone") {
|
|
5539
5666
|
const prevWork = this.touched.has(key2) ? this.work.get(key2) : void 0;
|
|
5540
5667
|
this.touched.add(key2);
|
|
@@ -5545,13 +5672,13 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5545
5672
|
const prev2 = this.touched.has(key2) ? this.liveDeep.get(key2) : void 0;
|
|
5546
5673
|
this.touched.add(key2);
|
|
5547
5674
|
const opts = prev2 ? { into: prev2, region: r, channels: ch } : { channels: ch };
|
|
5548
|
-
const d = _optionalChain([rt, 'optionalAccess',
|
|
5675
|
+
const d = _optionalChain([rt, 'optionalAccess', _130 => _130.kind]) === "coverage" && _optionalChain([paint, 'optionalAccess', _131 => _131.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);
|
|
5549
5676
|
this.liveDeep.set(key2, d);
|
|
5550
5677
|
this.live.set(key2, { data: _chunkOLNIPTB3cjs.proxyOf.call(void 0, d, ch), uniform: null, deep: d });
|
|
5551
5678
|
continue;
|
|
5552
5679
|
}
|
|
5553
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
5554
|
-
const prev = this.touched.has(key2) ? _optionalChain([this, 'access',
|
|
5680
|
+
const src = _nullishCoalesce(_optionalChain([this, 'access', _132 => _132.base, 'access', _133 => _133.tiles, 'access', _134 => _134.get, 'call', _135 => _135(key2), 'optionalAccess', _136 => _136.data]), () => ( defaultTile(this.base)));
|
|
5681
|
+
const prev = this.touched.has(key2) ? _optionalChain([this, 'access', _137 => _137.live, 'access', _138 => _138.get, 'call', _139 => _139(key2), 'optionalAccess', _140 => _140.data]) : void 0;
|
|
5555
5682
|
this.touched.add(key2);
|
|
5556
5683
|
const data = this.compositeTile(src, tx, ty, prev ? { into: prev, region: r } : {});
|
|
5557
5684
|
this.live.set(key2, { data, uniform: null });
|
|
@@ -5563,12 +5690,12 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5563
5690
|
if (this.closed) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("This stroke has already ended.");
|
|
5564
5691
|
const last = _nullishCoalesce(this.last, () => ( void 0));
|
|
5565
5692
|
const rects = this.mixer ? this.mixer.finish(last) : this.stroke.finish(last);
|
|
5566
|
-
_optionalChain([this, 'access',
|
|
5693
|
+
_optionalChain([this, 'access', _141 => _141.flushView, 'optionalCall', _142 => _142()]);
|
|
5567
5694
|
this.update(rects);
|
|
5568
5695
|
this.closed = true;
|
|
5569
5696
|
const ch = this.base.channels;
|
|
5570
5697
|
const r = this.retouch;
|
|
5571
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
5698
|
+
if (_optionalChain([r, 'optionalAccess', _143 => _143.kind]) === "coverage" && r.finalPaint) {
|
|
5572
5699
|
const final = r.finalPaint(this.stroke.coverage);
|
|
5573
5700
|
if (final) {
|
|
5574
5701
|
for (const key2 of this.touched) {
|
|
@@ -5577,7 +5704,7 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5577
5704
|
this.retouchDeepTile(key2, tx, ty, final, {});
|
|
5578
5705
|
continue;
|
|
5579
5706
|
}
|
|
5580
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
5707
|
+
const src = _nullishCoalesce(_optionalChain([this, 'access', _144 => _144.base, 'access', _145 => _145.tiles, 'access', _146 => _146.get, 'call', _147 => _147(key2), 'optionalAccess', _148 => _148.data]), () => ( defaultTile(this.base)));
|
|
5581
5708
|
this.live.set(key2, { data: this.compositeTile(src, tx, ty, {}, final), uniform: null });
|
|
5582
5709
|
}
|
|
5583
5710
|
}
|
|
@@ -5599,7 +5726,7 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5599
5726
|
const b = this.mixer ? this.mixer.bounds : this.stroke.coverage.bounds;
|
|
5600
5727
|
const result = { layerId: this.target.id, channel: this.target.channel, bounds: changed ? b : null, dabs: (_nullishCoalesce(this.mixer, () => ( this.stroke))).dabCount };
|
|
5601
5728
|
if (mixerLoad) result.mixerLoad = mixerLoad;
|
|
5602
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
5729
|
+
if (_optionalChain([r, 'optionalAccess', _149 => _149.result])) Object.assign(result, r.result());
|
|
5603
5730
|
return result;
|
|
5604
5731
|
}
|
|
5605
5732
|
/** Abandons the stroke and restores the layer. */
|
|
@@ -5725,14 +5852,14 @@ function migrateSerializedImageEditorState(data) {
|
|
|
5725
5852
|
const legacy = data;
|
|
5726
5853
|
const adjustments = normalizeStoredAdjustments(legacy.adjustments);
|
|
5727
5854
|
return {
|
|
5728
|
-
version: _optionalChain([adjustments, 'access',
|
|
5855
|
+
version: _optionalChain([adjustments, 'access', _150 => _150.layers, 'optionalAccess', _151 => _151.length]) ? 2 : 1,
|
|
5729
5856
|
crop: legacy.crop ? { ...legacy.crop } : null,
|
|
5730
5857
|
transform: { ...DEFAULT_TRANSFORM, ...legacy.transform },
|
|
5731
5858
|
adjustments: serializeAdjustments(adjustments),
|
|
5732
5859
|
depthMask: {
|
|
5733
5860
|
...DEFAULT_DEPTH_MASK,
|
|
5734
5861
|
...legacy.depthMask,
|
|
5735
|
-
depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access',
|
|
5862
|
+
depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _152 => _152.depthMask, 'optionalAccess', _153 => _153.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
|
|
5736
5863
|
},
|
|
5737
5864
|
annotations: JSON.parse(JSON.stringify(_nullishCoalesce(legacy.annotations, () => ( [])))),
|
|
5738
5865
|
...legacy.selection ? { selection: { ...legacy.selection } } : {}
|
|
@@ -5764,35 +5891,35 @@ var DEVELOP_KEYS = ["brightness", "contrast", "saturation", "exposure", "tempera
|
|
|
5764
5891
|
var ImageEditorController = (_class12 = class {
|
|
5765
5892
|
|
|
5766
5893
|
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5894
|
+
__init72() {this.imageElement = null}
|
|
5895
|
+
__init73() {this.listeners = /* @__PURE__ */ new Set()}
|
|
5896
|
+
__init74() {this.histogramListeners = /* @__PURE__ */ new Set()}
|
|
5770
5897
|
|
|
5771
5898
|
// History stacks
|
|
5772
|
-
|
|
5773
|
-
|
|
5899
|
+
__init75() {this.undoStack = []}
|
|
5900
|
+
__init76() {this.redoStack = []}
|
|
5774
5901
|
|
|
5775
5902
|
|
|
5776
|
-
|
|
5903
|
+
__init77() {this.isApplyingHistory = false}
|
|
5777
5904
|
|
|
5778
5905
|
/** Pixels the selection tools sample (host-provided or read back from the source). */
|
|
5779
|
-
|
|
5780
|
-
|
|
5906
|
+
__init78() {this.samplePixels = null}
|
|
5907
|
+
__init79() {this.samplePixelsOverride = false}
|
|
5781
5908
|
/** Decoded source pixels (the Background's surface), by the buffer or element they came from. */
|
|
5782
|
-
|
|
5783
|
-
|
|
5909
|
+
__init80() {this.sourceSurfaces = /* @__PURE__ */ new WeakMap()}
|
|
5910
|
+
__init81() {this.viewKey = []}
|
|
5784
5911
|
/** For `compositePixels` and mask evaluation (the renderer keeps its own for the viewport). */
|
|
5785
|
-
|
|
5912
|
+
__init82() {this.compositor = new (0, _chunkS55JFWDAcjs.LayerCompositor)()}
|
|
5786
5913
|
/** The segmentation provider behind `selectSubject` (see `setSegmentationProvider`). */
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5914
|
+
__init83() {this.segmentation = null}
|
|
5915
|
+
__init84() {this.selectionWorker = null}
|
|
5916
|
+
__init85() {this.documentOpener = null}
|
|
5790
5917
|
/** The effects provider slot (see `setEffectsProvider`). */
|
|
5791
|
-
|
|
5918
|
+
__init86() {this.effects = new (0, _chunkA3A5TI6Rcjs.EffectsSlot)()}
|
|
5792
5919
|
/** Renders provider effects: effect smart filter results and effect layers. */
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
constructor(options = {}) {;_class12.prototype.
|
|
5920
|
+
__init87() {this.effectsEngine = new ImageEffectsEngine({ slot: this.effects })}
|
|
5921
|
+
__init88() {this.effectRefresh = "none"}
|
|
5922
|
+
constructor(options = {}) {;_class12.prototype.__init72.call(this);_class12.prototype.__init73.call(this);_class12.prototype.__init74.call(this);_class12.prototype.__init75.call(this);_class12.prototype.__init76.call(this);_class12.prototype.__init77.call(this);_class12.prototype.__init78.call(this);_class12.prototype.__init79.call(this);_class12.prototype.__init80.call(this);_class12.prototype.__init81.call(this);_class12.prototype.__init82.call(this);_class12.prototype.__init83.call(this);_class12.prototype.__init84.call(this);_class12.prototype.__init85.call(this);_class12.prototype.__init86.call(this);_class12.prototype.__init87.call(this);_class12.prototype.__init88.call(this);_class12.prototype.__init89.call(this);_class12.prototype.__init90.call(this);_class12.prototype.__init91.call(this);_class12.prototype.__init92.call(this);_class12.prototype.__init93.call(this);_class12.prototype.__init94.call(this);_class12.prototype.__init95.call(this);_class12.prototype.__init96.call(this);_class12.prototype.__init97.call(this);_class12.prototype.__init98.call(this);_class12.prototype.__init99.call(this);_class12.prototype.__init100.call(this);_class12.prototype.__init101.call(this);_class12.prototype.__init102.call(this);_class12.prototype.__init103.call(this);_class12.prototype.__init104.call(this);
|
|
5796
5923
|
this.effects.subscribe(() => this.queueEffectRefresh("all"));
|
|
5797
5924
|
this.effectsEngine.subscribe(() => this.queueEffectRefresh("incomplete"));
|
|
5798
5925
|
if (options.effects) this.effects.set(options.effects);
|
|
@@ -5812,7 +5939,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5812
5939
|
sourceIsOpaque: () => this.sourceIsOpaque(),
|
|
5813
5940
|
version: () => `${this.sourceVersion()}:${this.patternsVersion()}`,
|
|
5814
5941
|
globalLight: () => this.state.globalLight,
|
|
5815
|
-
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
5942
|
+
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _154 => _154.state, 'access', _155 => _155.patterns, 'optionalAccess', _156 => _156.find, 'call', _157 => _157((p) => p.id === id)]), () => ( null))
|
|
5816
5943
|
};
|
|
5817
5944
|
this.state = {
|
|
5818
5945
|
sourceUrl: typeof options.image === "string" ? options.image : null,
|
|
@@ -5845,13 +5972,13 @@ var ImageEditorController = (_class12 = class {
|
|
|
5845
5972
|
};
|
|
5846
5973
|
}
|
|
5847
5974
|
this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
|
|
5848
|
-
if (_optionalChain([options, 'access',
|
|
5975
|
+
if (_optionalChain([options, 'access', _158 => _158.initialState, 'optionalAccess', _159 => _159.selection])) {
|
|
5849
5976
|
try {
|
|
5850
5977
|
this.state.selection = normalizeSelection(_chunkSS53NNZOcjs.deserializeSelection.call(void 0, options.initialState.selection));
|
|
5851
|
-
} catch (
|
|
5978
|
+
} catch (e23) {
|
|
5852
5979
|
}
|
|
5853
5980
|
}
|
|
5854
|
-
if (_optionalChain([options, 'access',
|
|
5981
|
+
if (_optionalChain([options, 'access', _160 => _160.initialState, 'optionalAccess', _161 => _161.channels])) {
|
|
5855
5982
|
const channels = deserializeChannels(options.initialState.channels, this.naturalSize, this.lastLoadProblems);
|
|
5856
5983
|
if (channels.length) this.state.channels = channels;
|
|
5857
5984
|
}
|
|
@@ -5894,7 +6021,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5894
6021
|
height: img.naturalHeight || img.height || 600
|
|
5895
6022
|
}
|
|
5896
6023
|
};
|
|
5897
|
-
} catch (
|
|
6024
|
+
} catch (e24) {
|
|
5898
6025
|
return { sourceUrl: src, element: null, dimensions: { ...this.state.imageDimensions } };
|
|
5899
6026
|
}
|
|
5900
6027
|
}
|
|
@@ -5927,7 +6054,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5927
6054
|
* Where layer pixels changed since the last viewport render, when only strokes changed them
|
|
5928
6055
|
* (the renderer then recomposites just those rectangles); `'all'` after any other change.
|
|
5929
6056
|
*/
|
|
5930
|
-
|
|
6057
|
+
__init89() {this.pendingDirty = "all"}
|
|
5931
6058
|
notify(strokeRects) {
|
|
5932
6059
|
if (strokeRects) this.docRevision++;
|
|
5933
6060
|
if (strokeRects && this.pendingDirty !== "all") this.pendingDirty.push(...strokeRects);
|
|
@@ -5935,7 +6062,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5935
6062
|
this.syncViews();
|
|
5936
6063
|
this.syncDisplay();
|
|
5937
6064
|
const currentState = { ...this.state };
|
|
5938
|
-
_optionalChain([this, 'access',
|
|
6065
|
+
_optionalChain([this, 'access', _162 => _162.onStateChange, 'optionalCall', _163 => _163(currentState)]);
|
|
5939
6066
|
this.listeners.forEach((l) => l(currentState));
|
|
5940
6067
|
if (this.effects.provider) this.queueEffectRefresh("incomplete");
|
|
5941
6068
|
}
|
|
@@ -5964,11 +6091,11 @@ var ImageEditorController = (_class12 = class {
|
|
|
5964
6091
|
if (l.type === "group") {
|
|
5965
6092
|
const children = walk(l.children);
|
|
5966
6093
|
if (children !== l.children) next2 = { ...l, children };
|
|
5967
|
-
} else if (l.type === "smart" && _optionalChain([l, 'access',
|
|
6094
|
+
} else if (l.type === "smart" && _optionalChain([l, 'access', _164 => _164.smartFilters, 'optionalAccess', _165 => _165.filters, 'access', _166 => _166.some, 'call', _167 => _167((f) => f.kind === "effect")]) && (all || _chunkS55JFWDAcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
|
|
5968
6095
|
try {
|
|
5969
6096
|
const r = _chunkS55JFWDAcjs.rerender.call(void 0, l, canvas);
|
|
5970
6097
|
if (all || !_chunkS55JFWDAcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
|
|
5971
|
-
} catch (
|
|
6098
|
+
} catch (e25) {
|
|
5972
6099
|
}
|
|
5973
6100
|
}
|
|
5974
6101
|
if (next2 !== l) {
|
|
@@ -5993,7 +6120,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5993
6120
|
* A worker that is cancelled or fails is replaced by a fresh one on the next job.
|
|
5994
6121
|
*/
|
|
5995
6122
|
setSelectionWorker(factory) {
|
|
5996
|
-
_optionalChain([this, 'access',
|
|
6123
|
+
_optionalChain([this, 'access', _168 => _168.selectionWorker, 'optionalAccess', _169 => _169.terminate, 'call', _170 => _170()]);
|
|
5997
6124
|
this.selectionWorker = factory ? new (0, _chunkUC3PWFM3cjs.SelectionWorkerClient)(factory) : null;
|
|
5998
6125
|
}
|
|
5999
6126
|
/** Sets (or with `null` removes) how new documents are opened (see `DocumentOpener`). Not an edit. */
|
|
@@ -6019,7 +6146,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6019
6146
|
const layer = _chunkS55JFWDAcjs.requireLayer.call(void 0, this.state.layers, id).layer;
|
|
6020
6147
|
if (layer.type !== "pixel") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`A new document needs a pixel layer; "${id}" is a ${layer.type} layer.`);
|
|
6021
6148
|
const sel = _nullishCoalesce(options.selection, () => ( this.state.selection));
|
|
6022
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
6149
|
+
if (!_optionalChain([sel, 'optionalAccess', _171 => _171.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select what goes in the new document first.");
|
|
6023
6150
|
const { width, height } = this.naturalSize;
|
|
6024
6151
|
const surface = this.surfaceOf(layer);
|
|
6025
6152
|
let copy;
|
|
@@ -6070,10 +6197,10 @@ var ImageEditorController = (_class12 = class {
|
|
|
6070
6197
|
* `onProgress` hears its stages. The document is not changed.
|
|
6071
6198
|
*/
|
|
6072
6199
|
async runSelectionJob(job, pixels, options = {}) {
|
|
6073
|
-
_optionalChain([options, 'access',
|
|
6200
|
+
_optionalChain([options, 'access', _172 => _172.signal, 'optionalAccess', _173 => _173.throwIfAborted, 'call', _174 => _174()]);
|
|
6074
6201
|
if (this.selectionWorker) return this.selectionWorker.run(job, pixels, options);
|
|
6075
6202
|
const result = _chunkUC3PWFM3cjs.runSelectionJob.call(void 0, job, pixels, options.onProgress);
|
|
6076
|
-
_optionalChain([options, 'access',
|
|
6203
|
+
_optionalChain([options, 'access', _175 => _175.signal, 'optionalAccess', _176 => _176.throwIfAborted, 'call', _177 => _177()]);
|
|
6077
6204
|
return result;
|
|
6078
6205
|
}
|
|
6079
6206
|
/** Registers (or with `null` removes) the segmentation provider. Not an edit: no undo step. */
|
|
@@ -6148,8 +6275,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
6148
6275
|
*/
|
|
6149
6276
|
async updateEffectFilter(layerId, filterId, changes, commitToHistory = true) {
|
|
6150
6277
|
const layer = _chunkS55JFWDAcjs.requireSmartObject.call(void 0, this.state.layers, layerId);
|
|
6151
|
-
const was = _optionalChain([layer, 'access',
|
|
6152
|
-
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',
|
|
6278
|
+
const was = _optionalChain([layer, 'access', _178 => _178.smartFilters, 'optionalAccess', _179 => _179.filters, 'access', _180 => _180.find, 'call', _181 => _181((f) => f.id === filterId)]);
|
|
6279
|
+
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', _182 => _182.smartFilters, 'optionalAccess', _183 => _183.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
|
|
6153
6280
|
const update = {};
|
|
6154
6281
|
if (changes.values) {
|
|
6155
6282
|
const d = await this.describeEffect(was.effect);
|
|
@@ -6191,7 +6318,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6191
6318
|
const layer = {
|
|
6192
6319
|
type: "pixel",
|
|
6193
6320
|
id,
|
|
6194
|
-
name: _optionalChain([options, 'access',
|
|
6321
|
+
name: _optionalChain([options, 'access', _184 => _184.name, 'optionalAccess', _185 => _185.trim, 'call', _186 => _186()]) || d.name,
|
|
6195
6322
|
visible: true,
|
|
6196
6323
|
opacity: _nullishCoalesce(options.opacity, () => ( 1)),
|
|
6197
6324
|
blend: _nullishCoalesce(blend, () => ( "normal")),
|
|
@@ -6216,7 +6343,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6216
6343
|
*/
|
|
6217
6344
|
async updateEffectLayer(layerId, changes, commitToHistory = true) {
|
|
6218
6345
|
const found = _chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, layerId);
|
|
6219
|
-
const layer = _optionalChain([found, 'optionalAccess',
|
|
6346
|
+
const layer = _optionalChain([found, 'optionalAccess', _187 => _187.layer]);
|
|
6220
6347
|
if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
|
|
6221
6348
|
_chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
|
|
6222
6349
|
const g = layer.generator;
|
|
@@ -6245,7 +6372,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6245
6372
|
* and how long it runs, the longest of theirs (ms). Null when none animates.
|
|
6246
6373
|
*/
|
|
6247
6374
|
getAnimation() {
|
|
6248
|
-
const layers = _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access',
|
|
6375
|
+
const layers = _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access', _188 => _188.generator, 'optionalAccess', _189 => _189.animate]));
|
|
6249
6376
|
if (!layers.length) return null;
|
|
6250
6377
|
return { duration: Math.max(...layers.map((l) => l.generator.animate.duration)), layerIds: layers.map((l) => l.id) };
|
|
6251
6378
|
}
|
|
@@ -6262,7 +6389,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6262
6389
|
const { width, height } = this.naturalSize;
|
|
6263
6390
|
const surfaces = /* @__PURE__ */ new Map();
|
|
6264
6391
|
for (const l of _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers)) {
|
|
6265
|
-
if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access',
|
|
6392
|
+
if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access', _190 => _190.generator, 'optionalAccess', _191 => _191.animate])) continue;
|
|
6266
6393
|
const g = l.generator;
|
|
6267
6394
|
const pixels = await this.effectsEngine.renderLayer(g.effect, g.values, { width, height, depth: this.bitDepth, time: (_nullishCoalesce(g.time, () => ( 0))) + time });
|
|
6268
6395
|
surfaces.set(l.id, effectPixelsToSurface(pixels, this.bitDepth));
|
|
@@ -6282,7 +6409,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6282
6409
|
})
|
|
6283
6410
|
);
|
|
6284
6411
|
}
|
|
6285
|
-
|
|
6412
|
+
__init90() {this.displayFor = null}
|
|
6286
6413
|
/** Keeps the renderer's display transform in step with the document profile, mode and Proof Setup. */
|
|
6287
6414
|
syncDisplay() {
|
|
6288
6415
|
const s = this.state;
|
|
@@ -6291,7 +6418,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6291
6418
|
this.displayFor = [s.colorProfile, s.proofSetup, s.colorMode];
|
|
6292
6419
|
try {
|
|
6293
6420
|
this.renderer.setDisplayTransform(displayTransform(s.colorProfile, effectiveProof(s.proofSetup, s.colorMode)));
|
|
6294
|
-
} catch (
|
|
6421
|
+
} catch (e26) {
|
|
6295
6422
|
this.renderer.setDisplayTransform(null);
|
|
6296
6423
|
}
|
|
6297
6424
|
}
|
|
@@ -6323,8 +6450,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
6323
6450
|
transform: { ...s.transform },
|
|
6324
6451
|
outputOpacity: s.outputOpacity,
|
|
6325
6452
|
selection: _nullishCoalesce(s.selection, () => ( null)),
|
|
6326
|
-
..._optionalChain([s, 'access',
|
|
6327
|
-
..._optionalChain([s, 'access',
|
|
6453
|
+
..._optionalChain([s, 'access', _192 => _192.channels, 'optionalAccess', _193 => _193.length]) ? { channels: s.channels } : {},
|
|
6454
|
+
..._optionalChain([s, 'access', _194 => _194.paths, 'optionalAccess', _195 => _195.length]) ? { paths: s.paths } : {},
|
|
6328
6455
|
source: {
|
|
6329
6456
|
sourceUrl: s.sourceUrl,
|
|
6330
6457
|
element: this.imageElement,
|
|
@@ -6360,11 +6487,11 @@ var ImageEditorController = (_class12 = class {
|
|
|
6360
6487
|
if (entry.colorMode) s.colorMode = entry.colorMode;
|
|
6361
6488
|
else delete s.colorMode;
|
|
6362
6489
|
s.selection = entry.selection;
|
|
6363
|
-
if (_optionalChain([entry, 'access',
|
|
6490
|
+
if (_optionalChain([entry, 'access', _196 => _196.channels, 'optionalAccess', _197 => _197.length])) s.channels = entry.channels;
|
|
6364
6491
|
else delete s.channels;
|
|
6365
|
-
if (_optionalChain([entry, 'access',
|
|
6492
|
+
if (_optionalChain([entry, 'access', _198 => _198.paths, 'optionalAccess', _199 => _199.length])) s.paths = entry.paths;
|
|
6366
6493
|
else delete s.paths;
|
|
6367
|
-
if (s.activePathId && !_optionalChain([s, 'access',
|
|
6494
|
+
if (s.activePathId && !_optionalChain([s, 'access', _200 => _200.paths, 'optionalAccess', _201 => _201.some, 'call', _202 => _202((p) => p.id === s.activePathId)])) s.activePathId = null;
|
|
6368
6495
|
if (this.imageElement !== entry.source.element && !this.samplePixelsOverride) this.samplePixels = null;
|
|
6369
6496
|
this.imageElement = entry.source.element;
|
|
6370
6497
|
s.sourceUrl = entry.source.sourceUrl;
|
|
@@ -6375,7 +6502,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6375
6502
|
}
|
|
6376
6503
|
}
|
|
6377
6504
|
/** Set while `asOneStep` runs: the step is already recorded, so nested commands add none. */
|
|
6378
|
-
|
|
6505
|
+
__init91() {this.historyGrouped = false}
|
|
6379
6506
|
/**
|
|
6380
6507
|
* Runs `fn` as one undo step: history is recorded once, before it, and the commands it calls
|
|
6381
6508
|
* record none. If `fn` throws, the step is dropped and the state goes back to before it, so a
|
|
@@ -6438,7 +6565,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6438
6565
|
get canUndo() {
|
|
6439
6566
|
return this.undoStack.length > 0;
|
|
6440
6567
|
}
|
|
6441
|
-
|
|
6568
|
+
__init92() {this.docRevision = 0}
|
|
6442
6569
|
/**
|
|
6443
6570
|
* Bumped on every change to the document (an undoable edit, a stroke, undo, redo), not on view
|
|
6444
6571
|
* or tool changes, nor on `loadImage` (the source image is the host's, not part of the document). `createImageEditorDocument` uses it to tell document changes apart.
|
|
@@ -6570,7 +6697,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6570
6697
|
return this.state.layers;
|
|
6571
6698
|
}
|
|
6572
6699
|
getLayer(id) {
|
|
6573
|
-
return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess',
|
|
6700
|
+
return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _203 => _203.layer]);
|
|
6574
6701
|
}
|
|
6575
6702
|
/** The active layer, or `undefined`. */
|
|
6576
6703
|
getActiveLayer() {
|
|
@@ -6583,7 +6710,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6583
6710
|
setActiveLayer(id, target = "pixels") {
|
|
6584
6711
|
if (id !== null && !this.getLayer(id)) return false;
|
|
6585
6712
|
const layer = id ? this.getLayer(id) : void 0;
|
|
6586
|
-
const t = target === "mask" && _optionalChain([layer, 'optionalAccess',
|
|
6713
|
+
const t = target === "mask" && _optionalChain([layer, 'optionalAccess', _204 => _204.mask]) ? "mask" : target === "filter-mask" && _optionalChain([layer, 'optionalAccess', _205 => _205.type]) === "smart" && _optionalChain([layer, 'access', _206 => _206.smartFilters, 'optionalAccess', _207 => _207.mask]) ? "filter-mask" : "pixels";
|
|
6587
6714
|
if (this.state.activeLayerId === id && this.state.activeTarget === t) return true;
|
|
6588
6715
|
this.state.activeLayerId = id;
|
|
6589
6716
|
this.state.activeTarget = t;
|
|
@@ -6602,7 +6729,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6602
6729
|
if (!b) return null;
|
|
6603
6730
|
return { x: b.x + layer.offset.x, y: b.y + layer.offset.y, width: b.width, height: b.height, data: _chunk474IQG74cjs.readRegion.call(void 0, surface, b) };
|
|
6604
6731
|
}
|
|
6605
|
-
|
|
6732
|
+
__init93() {this.boundsCache = /* @__PURE__ */ new WeakMap()}
|
|
6606
6733
|
/**
|
|
6607
6734
|
* Document bounds of a layer's non-transparent pixels (pixel layers; the Background's source
|
|
6608
6735
|
* included), or `null` for an empty or non-pixel layer.
|
|
@@ -6745,11 +6872,11 @@ var ImageEditorController = (_class12 = class {
|
|
|
6745
6872
|
surfaceOf: (l) => this.surfaceOf(l),
|
|
6746
6873
|
version: `${this.sourceVersion()}:${this.patternsVersion()}`,
|
|
6747
6874
|
globalLight: this.state.globalLight,
|
|
6748
|
-
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
6875
|
+
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _208 => _208.state, 'access', _209 => _209.patterns, 'optionalAccess', _210 => _210.find, 'call', _211 => _211((p) => p.id === id)]), () => ( null))
|
|
6749
6876
|
};
|
|
6750
6877
|
}
|
|
6751
|
-
|
|
6752
|
-
|
|
6878
|
+
__init94() {this.sourceIds = /* @__PURE__ */ new WeakMap()}
|
|
6879
|
+
__init95() {this.nextSourceId = 1}
|
|
6753
6880
|
/** Changes whenever the Background's source pixels can have changed. */
|
|
6754
6881
|
sourceVersion() {
|
|
6755
6882
|
const key2 = this.samplePixelsOverride ? this.samplePixels : _nullishCoalesce(this.imageElement, () => ( this.samplePixels));
|
|
@@ -6798,7 +6925,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6798
6925
|
}
|
|
6799
6926
|
return fits ? fromPixels(px2) : null;
|
|
6800
6927
|
}
|
|
6801
|
-
|
|
6928
|
+
__init96() {this.opaqueCache = /* @__PURE__ */ new WeakMap()}
|
|
6802
6929
|
/** Whether every source pixel is opaque (some legacy renders depend on it). */
|
|
6803
6930
|
sourceIsOpaque() {
|
|
6804
6931
|
const s = this.sourceSurface();
|
|
@@ -6822,9 +6949,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
6822
6949
|
if (!ctx || typeof ctx.getImageData !== "function") return null;
|
|
6823
6950
|
ctx.drawImage(el, 0, 0, width, height);
|
|
6824
6951
|
const data = ctx.getImageData(0, 0, width, height);
|
|
6825
|
-
if (!_optionalChain([data, 'optionalAccess',
|
|
6952
|
+
if (!_optionalChain([data, 'optionalAccess', _212 => _212.data]) || data.data.length < width * height * 4) return null;
|
|
6826
6953
|
return { width, height, data: data.data };
|
|
6827
|
-
} catch (
|
|
6954
|
+
} catch (e27) {
|
|
6828
6955
|
return null;
|
|
6829
6956
|
}
|
|
6830
6957
|
}
|
|
@@ -6835,7 +6962,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6835
6962
|
const prev = this.state.layers;
|
|
6836
6963
|
const depth = this.bitDepth;
|
|
6837
6964
|
this.state.layers = next;
|
|
6838
|
-
_optionalChain([extra, 'optionalCall',
|
|
6965
|
+
_optionalChain([extra, 'optionalCall', _213 => _213()]);
|
|
6839
6966
|
if (depth !== 8 && this.bitDepth === depth) this.state.layers = keepDeepLayers(prev, this.state.layers);
|
|
6840
6967
|
if (this.state.activeLayerId && !_chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, this.state.activeLayerId)) {
|
|
6841
6968
|
this.state.activeLayerId = _chunkS55JFWDAcjs.activeLayerAfterRemoval.call(void 0, prev, this.state.layers, this.state.activeLayerId);
|
|
@@ -6873,7 +7000,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6873
7000
|
const layer = {
|
|
6874
7001
|
type: "pixel",
|
|
6875
7002
|
id: init.id && !ids.has(init.id) ? init.id : _chunkS55JFWDAcjs.newLayerId.call(void 0, ),
|
|
6876
|
-
name: _optionalChain([init, 'access',
|
|
7003
|
+
name: _optionalChain([init, 'access', _214 => _214.name, 'optionalAccess', _215 => _215.trim, 'call', _216 => _216()]) || this.nextLayerName(),
|
|
6877
7004
|
visible: _nullishCoalesce(init.visible, () => ( true)),
|
|
6878
7005
|
opacity: _nullishCoalesce(init.opacity, () => ( 1)),
|
|
6879
7006
|
blend: _nullishCoalesce(blend, () => ( "normal")),
|
|
@@ -6900,12 +7027,12 @@ var ImageEditorController = (_class12 = class {
|
|
|
6900
7027
|
async decodeImage(image) {
|
|
6901
7028
|
const trimmed = image.trim();
|
|
6902
7029
|
let png = null;
|
|
6903
|
-
if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkOLNIPTB3cjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess',
|
|
7030
|
+
if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkOLNIPTB3cjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _217 => _217.bytes]), () => ( null));
|
|
6904
7031
|
else if (/^[A-Za-z0-9+/=\s]+$/.test(trimmed) && trimmed.length > 16) {
|
|
6905
7032
|
try {
|
|
6906
7033
|
const bytes = _chunkOLNIPTB3cjs.base64ToBytes.call(void 0, trimmed);
|
|
6907
7034
|
if (_chunkOLNIPTB3cjs.isPng.call(void 0, bytes)) png = bytes;
|
|
6908
|
-
} catch (
|
|
7035
|
+
} catch (e28) {
|
|
6909
7036
|
png = null;
|
|
6910
7037
|
}
|
|
6911
7038
|
}
|
|
@@ -6913,14 +7040,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
6913
7040
|
try {
|
|
6914
7041
|
const d = _chunkOLNIPTB3cjs.decodePng.call(void 0, png);
|
|
6915
7042
|
return { width: d.width, height: d.height, data: d.data };
|
|
6916
|
-
} catch (
|
|
7043
|
+
} catch (e29) {
|
|
6917
7044
|
}
|
|
6918
7045
|
}
|
|
6919
7046
|
const src = png ? `data:image/png;base64,${_chunkOLNIPTB3cjs.bytesToBase64.call(void 0, png)}` : trimmed;
|
|
6920
7047
|
let img;
|
|
6921
7048
|
try {
|
|
6922
7049
|
img = await this.renderer.imageCache.get(src);
|
|
6923
|
-
} catch (
|
|
7050
|
+
} catch (e30) {
|
|
6924
7051
|
throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("The image could not be decoded here. Pass a PNG (data URL or base64), or run in a browser for other formats and URLs.");
|
|
6925
7052
|
}
|
|
6926
7053
|
const w = img.naturalWidth || img.width;
|
|
@@ -6949,7 +7076,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6949
7076
|
removeLayer(id) {
|
|
6950
7077
|
const next = _chunkS55JFWDAcjs.removeLayer.call(void 0, this.state.layers, id);
|
|
6951
7078
|
this.commitLayers(next, () => {
|
|
6952
|
-
if (this.state.selectedAnnotationId && !_chunkB46UQUDCcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkS55JFWDAcjs.annotationOfLayer.call(void 0, l), 'optionalAccess',
|
|
7079
|
+
if (this.state.selectedAnnotationId && !_chunkB46UQUDCcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkS55JFWDAcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _218 => _218.id]) === this.state.selectedAnnotationId)) {
|
|
6953
7080
|
this.state.selectedAnnotationId = null;
|
|
6954
7081
|
}
|
|
6955
7082
|
});
|
|
@@ -6958,9 +7085,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
6958
7085
|
moveLayer(id, placement) {
|
|
6959
7086
|
const next = _chunkS55JFWDAcjs.moveLayer.call(void 0, this.state.layers, id, placement);
|
|
6960
7087
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, next, id);
|
|
6961
|
-
if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
7088
|
+
if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _219 => _219.parent, 'optionalAccess', _220 => _220.id]), () => ( null)), index: loc.index };
|
|
6962
7089
|
this.commitLayers(next);
|
|
6963
|
-
return { parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
7090
|
+
return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _221 => _221.parent, 'optionalAccess', _222 => _222.id]), () => ( null)), index: loc.index };
|
|
6964
7091
|
}
|
|
6965
7092
|
/** A layer's edge colour as percentages (see `setEdgeColor`). */
|
|
6966
7093
|
getEdgeColor(id) {
|
|
@@ -7056,7 +7183,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7056
7183
|
const group = {
|
|
7057
7184
|
type: "group",
|
|
7058
7185
|
id: _chunkS55JFWDAcjs.newLayerId.call(void 0, "group"),
|
|
7059
|
-
name: _optionalChain([init, 'access',
|
|
7186
|
+
name: _optionalChain([init, 'access', _223 => _223.name, 'optionalAccess', _224 => _224.trim, 'call', _225 => _225()]) || "Group",
|
|
7060
7187
|
visible: true,
|
|
7061
7188
|
opacity: 1,
|
|
7062
7189
|
blend,
|
|
@@ -7149,7 +7276,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7149
7276
|
sel = this.layerTransparency(id);
|
|
7150
7277
|
} else {
|
|
7151
7278
|
const current = this.state.selection;
|
|
7152
|
-
if (!_optionalChain([current, 'optionalAccess',
|
|
7279
|
+
if (!_optionalChain([current, 'optionalAccess', _226 => _226.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all / transparency.");
|
|
7153
7280
|
sel = from === "hide-selection" ? _chunkSS53NNZOcjs.invertSelection.call(void 0, current) : current;
|
|
7154
7281
|
}
|
|
7155
7282
|
mask = this.maskFromSelection(sel, props);
|
|
@@ -7180,7 +7307,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7180
7307
|
const layer = _chunkS55JFWDAcjs.requireLayer.call(void 0, this.state.layers, id).layer;
|
|
7181
7308
|
const name = layer.name || id;
|
|
7182
7309
|
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.`);
|
|
7183
|
-
if (_optionalChain([layer, 'access',
|
|
7310
|
+
if (_optionalChain([layer, 'access', _227 => _227.mask, 'optionalAccess', _228 => _228.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.`);
|
|
7184
7311
|
return layer;
|
|
7185
7312
|
}
|
|
7186
7313
|
requireVectorMask(id) {
|
|
@@ -7190,10 +7317,10 @@ var ImageEditorController = (_class12 = class {
|
|
|
7190
7317
|
}
|
|
7191
7318
|
/** Components from a path spec: `components`, or one `shape` / `subpaths`. */
|
|
7192
7319
|
vectorMaskComponents(path) {
|
|
7193
|
-
if (_optionalChain([path, 'access',
|
|
7320
|
+
if (_optionalChain([path, 'access', _229 => _229.components, 'optionalAccess', _230 => _230.length]) && (path.shape !== void 0 || path.subpaths !== void 0)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
|
|
7194
7321
|
if (path.fillRule !== void 0 && path.fillRule !== "nonzero" && path.fillRule !== "evenodd") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
|
|
7195
|
-
const specs = _optionalChain([path, 'access',
|
|
7196
|
-
return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access',
|
|
7322
|
+
const specs = _optionalChain([path, 'access', _231 => _231.components, 'optionalAccess', _232 => _232.length]) ? path.components : [path];
|
|
7323
|
+
return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access', _233 => _233.components, 'optionalAccess', _234 => _234.length]) ? `components[${i}].` : ""));
|
|
7197
7324
|
}
|
|
7198
7325
|
/**
|
|
7199
7326
|
* Layer › Vector Mask: `reveal-all` (an empty path showing everything), `hide-all` (an empty path
|
|
@@ -7210,7 +7337,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7210
7337
|
vm = { components: this.vectorMaskComponents(path) };
|
|
7211
7338
|
if (path.fillRule === "evenodd") vm.fillRule = "evenodd";
|
|
7212
7339
|
} else if (from === "reveal-all" || from === "hide-all") {
|
|
7213
|
-
if (_optionalChain([path, 'access',
|
|
7340
|
+
if (_optionalChain([path, 'access', _235 => _235.components, 'optionalAccess', _236 => _236.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.`);
|
|
7214
7341
|
vm = { components: [], ...from === "reveal-all" ? { inverted: true } : {} };
|
|
7215
7342
|
} else {
|
|
7216
7343
|
throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Unknown vector mask source "${String(from)}". Use reveal-all, hide-all, path or selection.`);
|
|
@@ -7221,7 +7348,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7221
7348
|
/** The selection's outline as subpaths; throws when nothing is selected or nothing is left to trace. */
|
|
7222
7349
|
traceSelection(options) {
|
|
7223
7350
|
const sel = this.state.selection;
|
|
7224
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
7351
|
+
if (!_optionalChain([sel, 'optionalAccess', _237 => _237.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, then make a path from the selection.");
|
|
7225
7352
|
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.");
|
|
7226
7353
|
const subpaths = selectionToSubpaths(sel, options);
|
|
7227
7354
|
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.");
|
|
@@ -7261,7 +7388,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7261
7388
|
return _nullishCoalesce(this.state.paths, () => ( []));
|
|
7262
7389
|
}
|
|
7263
7390
|
getPath(id) {
|
|
7264
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
7391
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _238 => _238.state, 'access', _239 => _239.paths, 'optionalAccess', _240 => _240.find, 'call', _241 => _241((p) => p.id === id)]), () => ( null));
|
|
7265
7392
|
}
|
|
7266
7393
|
requirePath(id) {
|
|
7267
7394
|
const path = this.getPath(id);
|
|
@@ -7294,14 +7421,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
7294
7421
|
const subpaths = this.traceSelection(options);
|
|
7295
7422
|
const paths = this.getPaths();
|
|
7296
7423
|
const old = paths.find((p) => p.work);
|
|
7297
|
-
const work = { id: _nullishCoalesce(_optionalChain([old, 'optionalAccess',
|
|
7424
|
+
const work = { id: _nullishCoalesce(_optionalChain([old, 'optionalAccess', _242 => _242.id]), () => ( newPathId())), name: WORK_PATH_NAME, components: [{ op: "combine", subpaths }], fillRule: "evenodd", work: true };
|
|
7298
7425
|
this.commitPaths(old ? paths.map((p) => p === old ? work : p) : [...paths, work], work.id);
|
|
7299
7426
|
return work;
|
|
7300
7427
|
}
|
|
7301
7428
|
/** A new saved path from geometry (`shape`, `subpaths` or `components`). One undo step. */
|
|
7302
7429
|
addPath(input) {
|
|
7303
7430
|
const paths = this.getPaths();
|
|
7304
|
-
const path = { id: newPathId(), name: _optionalChain([input, 'access',
|
|
7431
|
+
const path = { id: newPathId(), name: _optionalChain([input, 'access', _243 => _243.name, 'optionalAccess', _244 => _244.trim, 'call', _245 => _245()]) || `Path ${paths.filter((p) => !p.work).length + 1}`, components: this.vectorMaskComponents(input) };
|
|
7305
7432
|
if (input.fillRule === "evenodd") path.fillRule = "evenodd";
|
|
7306
7433
|
this.commitPaths([...paths.filter((p) => !p.work), path, ...paths.filter((p) => p.work)], path.id);
|
|
7307
7434
|
return path;
|
|
@@ -7365,7 +7492,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7365
7492
|
const paths = this.getPaths();
|
|
7366
7493
|
const old = paths.find((p) => p.work);
|
|
7367
7494
|
const work = {
|
|
7368
|
-
id: _nullishCoalesce(_optionalChain([old, 'optionalAccess',
|
|
7495
|
+
id: _nullishCoalesce(_optionalChain([old, 'optionalAccess', _246 => _246.id]), () => ( newPathId())),
|
|
7369
7496
|
name: WORK_PATH_NAME,
|
|
7370
7497
|
components: components.map((c, i) => this.componentFrom({ op: c.op, subpaths: c.subpaths }, `components[${i}].`)),
|
|
7371
7498
|
work: true
|
|
@@ -7386,7 +7513,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7386
7513
|
/** Duplicates a path as a saved path. One undo step. */
|
|
7387
7514
|
duplicatePath(id, name) {
|
|
7388
7515
|
const old = this.requirePath(id);
|
|
7389
|
-
const copy = { ...old, id: newPathId(), name: _optionalChain([name, 'optionalAccess',
|
|
7516
|
+
const copy = { ...old, id: newPathId(), name: _optionalChain([name, 'optionalAccess', _247 => _247.trim, 'call', _248 => _248()]) || `${old.name} copy`, components: JSON.parse(JSON.stringify(old.components)) };
|
|
7390
7517
|
delete copy.work;
|
|
7391
7518
|
const paths = this.getPaths();
|
|
7392
7519
|
this.commitPaths([...paths.filter((p) => !p.work), copy, ...paths.filter((p) => p.work)], copy.id);
|
|
@@ -7592,7 +7719,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7592
7719
|
const layer = loc.layer;
|
|
7593
7720
|
if (layer.type !== "pixel") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
|
|
7594
7721
|
const sel = this.state.selection;
|
|
7595
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
7722
|
+
if (!_optionalChain([sel, 'optionalAccess', _249 => _249.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
|
|
7596
7723
|
if (options.cut) _chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
|
|
7597
7724
|
const surface = this.surfaceOf(layer);
|
|
7598
7725
|
const sb = sel.bounds;
|
|
@@ -7610,14 +7737,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
7610
7737
|
const copy = {
|
|
7611
7738
|
type: "pixel",
|
|
7612
7739
|
id: _chunkS55JFWDAcjs.newLayerId.call(void 0, ),
|
|
7613
|
-
name: _optionalChain([options, 'access',
|
|
7740
|
+
name: _optionalChain([options, 'access', _250 => _250.name, 'optionalAccess', _251 => _251.trim, 'call', _252 => _252()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
|
|
7614
7741
|
visible: true,
|
|
7615
7742
|
opacity: 1,
|
|
7616
7743
|
blend: "normal",
|
|
7617
7744
|
surface: _chunk474IQG74cjs.surfaceFromPixels.call(void 0, { width: src.width, height: src.height, data: px2 }, 4, src.x, src.y),
|
|
7618
7745
|
offset: { ...layer.offset }
|
|
7619
7746
|
};
|
|
7620
|
-
let next = _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
7747
|
+
let next = _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _253 => _253.parent, 'optionalAccess', _254 => _254.id]), () => ( null)), loc.index + 1);
|
|
7621
7748
|
if (kept) {
|
|
7622
7749
|
const cutLayer = { ...layer, surface: _chunk474IQG74cjs.writeRegion.call(void 0, surface, src, kept) };
|
|
7623
7750
|
delete cutLayer.source;
|
|
@@ -7630,7 +7757,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7630
7757
|
return copy.id;
|
|
7631
7758
|
}
|
|
7632
7759
|
// --- Free Transform ---
|
|
7633
|
-
|
|
7760
|
+
__init97() {this.openTransform = null}
|
|
7634
7761
|
/** The Free Transform in progress (see `beginFreeTransform`), or `null`. */
|
|
7635
7762
|
getFreeTransform() {
|
|
7636
7763
|
if (this.openTransform && !this.openTransform.isOpen) this.openTransform = null;
|
|
@@ -7641,7 +7768,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7641
7768
|
layers: () => this.state.layers,
|
|
7642
7769
|
activeLayerId: () => this.state.activeLayerId,
|
|
7643
7770
|
activeTarget: () => this.state.activeTarget,
|
|
7644
|
-
selection: () => _optionalChain([this, 'access',
|
|
7771
|
+
selection: () => _optionalChain([this, 'access', _255 => _255.state, 'access', _256 => _256.selection, 'optionalAccess', _257 => _257.bounds]) ? this.state.selection : null,
|
|
7645
7772
|
canvas: () => this.naturalSize,
|
|
7646
7773
|
pixelsOf: (layer) => this.surfaceOf(layer),
|
|
7647
7774
|
shapeEnv: () => this.shapeEnv(),
|
|
@@ -7789,7 +7916,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7789
7916
|
* anything else nests as a layer document. Returns the smart object's id.
|
|
7790
7917
|
*/
|
|
7791
7918
|
convertToSmartObject(ids, options = {}) {
|
|
7792
|
-
const list = _optionalChain([ids, 'optionalAccess',
|
|
7919
|
+
const list = _optionalChain([ids, 'optionalAccess', _258 => _258.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
|
|
7793
7920
|
if (!list.length) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
|
|
7794
7921
|
const res = _chunkS55JFWDAcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
|
|
7795
7922
|
this.commitLayers(res.layers, () => {
|
|
@@ -7822,8 +7949,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
7822
7949
|
width: c.width,
|
|
7823
7950
|
height: c.height,
|
|
7824
7951
|
decoded: _chunkS55JFWDAcjs.isContentsDecoded.call(void 0, c),
|
|
7825
|
-
fileType: _nullishCoalesce(_optionalChain([c, 'access',
|
|
7826
|
-
linkedPath: _nullishCoalesce(_optionalChain([c, 'access',
|
|
7952
|
+
fileType: _nullishCoalesce(_optionalChain([c, 'access', _259 => _259.file, 'optionalAccess', _260 => _260.type]), () => ( null)),
|
|
7953
|
+
linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _261 => _261.linked, 'optionalAccess', _262 => _262.path]), () => ( null)),
|
|
7827
7954
|
instances: _chunkS55JFWDAcjs.instancesOf.call(void 0, this.state.layers, c.id),
|
|
7828
7955
|
layerCount: c.document ? _chunkB46UQUDCcjs.flattenLayers.call(void 0, c.document.layers).length : 0
|
|
7829
7956
|
},
|
|
@@ -7840,9 +7967,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
7840
7967
|
bounds: _chunkS55JFWDAcjs.transformedBox.call(void 0, g)
|
|
7841
7968
|
},
|
|
7842
7969
|
smartFilters: {
|
|
7843
|
-
enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess',
|
|
7844
|
-
filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess',
|
|
7845
|
-
mask: _optionalChain([stack, 'optionalAccess',
|
|
7970
|
+
enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _263 => _263.enabled]), () => ( true)),
|
|
7971
|
+
filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess', _264 => _264.filters]), () => ( []))).map((f) => f.kind === "psd" ? { id: f.id, kind: "psd", name: f.name, enabled: f.enabled, blend: f.blend, opacity: f.opacity } : { ...f }),
|
|
7972
|
+
mask: _optionalChain([stack, 'optionalAccess', _265 => _265.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
|
|
7846
7973
|
},
|
|
7847
7974
|
bounds: this.getLayerBounds(id)
|
|
7848
7975
|
};
|
|
@@ -7981,7 +8108,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7981
8108
|
* it in the same undo step (Photoshop limits a filter to the selection). Returns whether it did.
|
|
7982
8109
|
*/
|
|
7983
8110
|
maskFiltersWithSelection(id, useSelection) {
|
|
7984
|
-
if (!useSelection || !_optionalChain([this, 'access',
|
|
8111
|
+
if (!useSelection || !_optionalChain([this, 'access', _266 => _266.state, 'access', _267 => _267.selection, 'optionalAccess', _268 => _268.bounds])) return false;
|
|
7985
8112
|
this.setSmartFilterMask(id, "selection", {}, false);
|
|
7986
8113
|
return true;
|
|
7987
8114
|
}
|
|
@@ -7995,19 +8122,19 @@ var ImageEditorController = (_class12 = class {
|
|
|
7995
8122
|
removeSmartFilter(id, filterId) {
|
|
7996
8123
|
const res = _chunkS55JFWDAcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
|
|
7997
8124
|
this.commitLayers(res.layers);
|
|
7998
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8125
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _269 => _269.layer, 'access', _270 => _270.smartFilters, 'optionalAccess', _271 => _271.filters]), () => ( []));
|
|
7999
8126
|
}
|
|
8000
8127
|
/** Moves one smart filter to `index` (0 = bottom, applied first), as one undo step. Returns the filters. */
|
|
8001
8128
|
moveSmartFilter(id, filterId, index) {
|
|
8002
8129
|
const res = _chunkS55JFWDAcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
|
|
8003
8130
|
this.commitLayers(res.layers);
|
|
8004
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8131
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _272 => _272.layer, 'access', _273 => _273.smartFilters, 'optionalAccess', _274 => _274.filters]), () => ( []));
|
|
8005
8132
|
}
|
|
8006
8133
|
/** Turns a smart object's whole filter stack on or off (one undo step). */
|
|
8007
8134
|
setSmartFiltersEnabled(id, enabled) {
|
|
8008
8135
|
const res = _chunkS55JFWDAcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
|
|
8009
8136
|
this.commitLayers(res.layers);
|
|
8010
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8137
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _275 => _275.layer, 'access', _276 => _276.smartFilters, 'optionalAccess', _277 => _277.enabled]), () => ( true));
|
|
8011
8138
|
}
|
|
8012
8139
|
/**
|
|
8013
8140
|
* Sets the smart filter mask (one undo step): `reveal-all`, `hide-all`, `selection` (the
|
|
@@ -8019,11 +8146,11 @@ var ImageEditorController = (_class12 = class {
|
|
|
8019
8146
|
let mask;
|
|
8020
8147
|
if (from === "none") mask = null;
|
|
8021
8148
|
else if (from === "keep") {
|
|
8022
|
-
if (!_optionalChain([layer, 'access',
|
|
8149
|
+
if (!_optionalChain([layer, 'access', _278 => _278.smartFilters, 'optionalAccess', _279 => _279.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.`);
|
|
8023
8150
|
mask = withMaskProps(layer.smartFilters.mask, props);
|
|
8024
8151
|
} else if (from === "selection") {
|
|
8025
8152
|
const sel = this.state.selection;
|
|
8026
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
8153
|
+
if (!_optionalChain([sel, 'optionalAccess', _280 => _280.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
|
|
8027
8154
|
mask = this.maskFromSelection(sel, props);
|
|
8028
8155
|
} else {
|
|
8029
8156
|
const v = from === "reveal-all" ? 255 : 0;
|
|
@@ -8035,7 +8162,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8035
8162
|
if (mask && from !== "keep") this.state.activeTarget = "filter-mask";
|
|
8036
8163
|
else if (!mask && this.state.activeTarget === "filter-mask") this.state.activeTarget = "pixels";
|
|
8037
8164
|
}, commitToHistory);
|
|
8038
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8165
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _281 => _281.layer, 'access', _282 => _282.smartFilters, 'optionalAccess', _283 => _283.mask]), () => ( null));
|
|
8039
8166
|
}
|
|
8040
8167
|
/**
|
|
8041
8168
|
* Decodes smart object contents that came as files the synchronous decoders cannot read (a JPEG
|
|
@@ -8060,7 +8187,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8060
8187
|
};
|
|
8061
8188
|
this.state.layers = swap(this.state.layers);
|
|
8062
8189
|
for (const e of [...this.undoStack, ...this.redoStack]) e.layers = swap(e.layers);
|
|
8063
|
-
} catch (
|
|
8190
|
+
} catch (e31) {
|
|
8064
8191
|
left.push(cid);
|
|
8065
8192
|
}
|
|
8066
8193
|
}
|
|
@@ -8068,7 +8195,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8068
8195
|
return left;
|
|
8069
8196
|
}
|
|
8070
8197
|
// --- Smart object contents (Edit Contents) ---
|
|
8071
|
-
|
|
8198
|
+
__init98() {this.contentsStack = []}
|
|
8072
8199
|
/** The smart objects whose contents are open (outermost first); empty when the document itself is shown. */
|
|
8073
8200
|
getEditingContents() {
|
|
8074
8201
|
return this.contentsStack.map((e) => ({ layerId: e.layerId, name: e.name }));
|
|
@@ -8083,7 +8210,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8083
8210
|
if (this.getFreeTransform()) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
|
|
8084
8211
|
const layer = _chunkS55JFWDAcjs.requireSmartObject.call(void 0, this.state.layers, id);
|
|
8085
8212
|
const c = layer.contents;
|
|
8086
|
-
if (!_chunkS55JFWDAcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access',
|
|
8213
|
+
if (!_chunkS55JFWDAcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _284 => _284.file, 'optionalAccess', _285 => _285.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
|
|
8087
8214
|
const saved = {
|
|
8088
8215
|
state: { ...this.state },
|
|
8089
8216
|
undo: this.undoStack,
|
|
@@ -8114,9 +8241,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
8114
8241
|
editingContents: this.getEditingContents()
|
|
8115
8242
|
};
|
|
8116
8243
|
delete this.state.legacyOutputBlur;
|
|
8117
|
-
if (_optionalChain([c, 'access',
|
|
8244
|
+
if (_optionalChain([c, 'access', _286 => _286.document, 'optionalAccess', _287 => _287.globalLight])) this.state.globalLight = c.document.globalLight;
|
|
8118
8245
|
else delete this.state.globalLight;
|
|
8119
|
-
if (_optionalChain([c, 'access',
|
|
8246
|
+
if (_optionalChain([c, 'access', _288 => _288.document, 'optionalAccess', _289 => _289.patterns, 'optionalAccess', _290 => _290.length])) this.state.patterns = c.document.patterns;
|
|
8120
8247
|
else delete this.state.patterns;
|
|
8121
8248
|
this.imageElement = null;
|
|
8122
8249
|
this.samplePixels = null;
|
|
@@ -8136,23 +8263,23 @@ var ImageEditorController = (_class12 = class {
|
|
|
8136
8263
|
closeSmartObjectContents(save = true) {
|
|
8137
8264
|
const top = this.contentsStack.pop();
|
|
8138
8265
|
if (!top) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
|
|
8139
|
-
if (_optionalChain([this, 'access',
|
|
8266
|
+
if (_optionalChain([this, 'access', _291 => _291.openTransform, 'optionalAccess', _292 => _292.isOpen])) this.openTransform.cancel();
|
|
8140
8267
|
this.openTransform = null;
|
|
8141
8268
|
const edited = this.state;
|
|
8142
8269
|
const changed = save && this.undoStack.length > 0;
|
|
8143
8270
|
let next = null;
|
|
8144
8271
|
if (changed) {
|
|
8145
|
-
const layer = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess',
|
|
8146
|
-
const old = _optionalChain([layer, 'optionalAccess',
|
|
8272
|
+
const layer = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _293 => _293.layer]);
|
|
8273
|
+
const old = _optionalChain([layer, 'optionalAccess', _294 => _294.contents]);
|
|
8147
8274
|
const { width, height } = edited.imageDimensions;
|
|
8148
8275
|
const only = edited.layers.length === 1 ? edited.layers[0] : null;
|
|
8149
|
-
const plain3 = _optionalChain([only, 'optionalAccess',
|
|
8150
|
-
if (_optionalChain([old, 'optionalAccess',
|
|
8276
|
+
const plain3 = _optionalChain([only, 'optionalAccess', _295 => _295.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _296 => _296.filters, 'optionalAccess', _297 => _297.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
|
|
8277
|
+
if (_optionalChain([old, 'optionalAccess', _298 => _298.kind]) === "raster" && plain3) {
|
|
8151
8278
|
const px2 = _chunk474IQG74cjs.readRegion.call(void 0, only.surface, { x: -only.offset.x, y: -only.offset.y, width, height });
|
|
8152
8279
|
next = _chunkS55JFWDAcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
|
|
8153
8280
|
} else {
|
|
8154
8281
|
const doc = { layers: edited.layers, globalLight: edited.globalLight, patterns: edited.patterns };
|
|
8155
|
-
next = _chunkS55JFWDAcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess',
|
|
8282
|
+
next = _chunkS55JFWDAcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _299 => _299.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _300 => _300.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
|
|
8156
8283
|
}
|
|
8157
8284
|
}
|
|
8158
8285
|
const saved = top.saved;
|
|
@@ -8177,7 +8304,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8177
8304
|
}
|
|
8178
8305
|
/** The document's own layers (not the contents open for editing). */
|
|
8179
8306
|
rootLayers() {
|
|
8180
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
8307
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _301 => _301.contentsStack, 'access', _302 => _302[0], 'optionalAccess', _303 => _303.saved, 'access', _304 => _304.state, 'access', _305 => _305.layers]), () => ( this.state.layers));
|
|
8181
8308
|
}
|
|
8182
8309
|
/** Drops every open contents edit (loading another document). */
|
|
8183
8310
|
abandonContents() {
|
|
@@ -8217,7 +8344,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8217
8344
|
this.commitLayers(_chunkS55JFWDAcjs.setLayerEffects.call(void 0, this.state.layers, id, effects), void 0, commitToHistory);
|
|
8218
8345
|
return this.getLayerEffects(id);
|
|
8219
8346
|
}
|
|
8220
|
-
|
|
8347
|
+
__init99() {this.patternIds = /* @__PURE__ */ new WeakMap()}
|
|
8221
8348
|
/** Changes whenever the document's pattern list is replaced (the compositor then drops its caches). */
|
|
8222
8349
|
patternsVersion() {
|
|
8223
8350
|
const list = this.state.patterns;
|
|
@@ -8379,7 +8506,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8379
8506
|
});
|
|
8380
8507
|
return bg.id;
|
|
8381
8508
|
}
|
|
8382
|
-
|
|
8509
|
+
__init100() {this.thumbCache = /* @__PURE__ */ new WeakMap()}
|
|
8383
8510
|
/**
|
|
8384
8511
|
* A small RGBA preview of a pixel layer over the canvas (or of its mask with `mask: true`),
|
|
8385
8512
|
* longest side `maxSide` px, point-sampled; `null` for layers without pixels.
|
|
@@ -8398,7 +8525,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8398
8525
|
const oy = layer.type === "pixel" ? layer.offset.y : 0;
|
|
8399
8526
|
const key2 = `${tw}x${th}:${ox},${oy}`;
|
|
8400
8527
|
let byKey = this.thumbCache.get(surface);
|
|
8401
|
-
const hit = _optionalChain([byKey, 'optionalAccess',
|
|
8528
|
+
const hit = _optionalChain([byKey, 'optionalAccess', _306 => _306.get, 'call', _307 => _307(key2)]);
|
|
8402
8529
|
if (hit) return hit;
|
|
8403
8530
|
const out = new Uint8ClampedArray(tw * th * 4);
|
|
8404
8531
|
for (let y = 0; y < th; y++) {
|
|
@@ -8539,7 +8666,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8539
8666
|
if (layer.mask.source) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which is generated, not painted.`);
|
|
8540
8667
|
_chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "all", action);
|
|
8541
8668
|
} else if (ch === "filter-mask") {
|
|
8542
|
-
if (layer.type !== "smart" || !_optionalChain([layer, 'access',
|
|
8669
|
+
if (layer.type !== "smart" || !_optionalChain([layer, 'access', _308 => _308.smartFilters, 'optionalAccess', _309 => _309.mask])) {
|
|
8543
8670
|
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}.`);
|
|
8544
8671
|
}
|
|
8545
8672
|
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.`);
|
|
@@ -8554,7 +8681,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8554
8681
|
if (!layer.visible) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" is hidden; show it before you ${action}.`);
|
|
8555
8682
|
const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
|
|
8556
8683
|
const surface = ch === "mask" ? layer.mask.surface : ch === "filter-mask" ? layer.smartFilters.mask.surface : this.surfaceOf(layer);
|
|
8557
|
-
const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access',
|
|
8684
|
+
const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _310 => _310.locks, 'optionalAccess', _311 => _311.transparency]));
|
|
8558
8685
|
return { id, layer, channel: ch, offset, surface, lockTransparency };
|
|
8559
8686
|
}
|
|
8560
8687
|
/** The layer with its pixels (or mask) replaced by `surface`. */
|
|
@@ -8598,13 +8725,13 @@ var ImageEditorController = (_class12 = class {
|
|
|
8598
8725
|
blend: target.channel !== "pixels" ? "normal" : brush.blend,
|
|
8599
8726
|
lockTransparency: target.lockTransparency,
|
|
8600
8727
|
// In Quick Mask mode the selection is what is painted, so it does not limit the stroke.
|
|
8601
|
-
selection: target.channel !== "quick-mask" && _optionalChain([this, 'access',
|
|
8728
|
+
selection: target.channel !== "quick-mask" && _optionalChain([this, 'access', _312 => _312.state, 'access', _313 => _313.selection, 'optionalAccess', _314 => _314.bounds]) ? this.state.selection : null,
|
|
8602
8729
|
offset: target.offset
|
|
8603
8730
|
};
|
|
8604
8731
|
const depth = target.channel !== "filter-mask" && target.channel !== "quick-mask" && this.bitDepth !== 8 ? this.bitDepth : null;
|
|
8605
8732
|
if (tool === "mixer") return new PaintStrokeSession(this, target, this.mixerStroke(init, brush), apply, depth);
|
|
8606
8733
|
if (isRetouchTool(tool)) return new PaintStrokeSession(this, target, this.retouchStroke(tool, init, brush, target, apply), apply, depth);
|
|
8607
|
-
const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess',
|
|
8734
|
+
const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess', _315 => _315.type]) === "gradient" ? _chunkPQ3H2AANcjs.resolvePaintGradient.call(void 0, strokePaint, { paint: toHex(color), secondary: toHex(background) }) : null;
|
|
8608
8735
|
return new PaintStrokeSession(this, target, new (0, _chunkPQ3H2AANcjs.StrokeCoverage)(brush, gradient, _nullishCoalesce(init.seed, () => ( 0))), apply, depth);
|
|
8609
8736
|
}
|
|
8610
8737
|
/** A retouching stroke's start: its settings, what it samples and how it composites. */
|
|
@@ -8651,9 +8778,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
8651
8778
|
const steps = settings.historySteps;
|
|
8652
8779
|
const entry = steps > 0 ? _nullishCoalesce(this.undoStack[this.undoStack.length - steps], () => ( this.undoStack[0])) : this.undoStack[0];
|
|
8653
8780
|
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.");
|
|
8654
|
-
const then = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess',
|
|
8781
|
+
const then = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _316 => _316.layer]);
|
|
8655
8782
|
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).`);
|
|
8656
|
-
const surface = target.channel === "mask" ? _optionalChain([then, 'access',
|
|
8783
|
+
const surface = target.channel === "mask" ? _optionalChain([then, 'access', _317 => _317.mask, 'optionalAccess', _318 => _318.surface]) : then.type === "pixel" ? then.surface : void 0;
|
|
8657
8784
|
if (!surface) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
|
|
8658
8785
|
const offset2 = then.type === "pixel" ? then.offset : { x: 0, y: 0 };
|
|
8659
8786
|
const depth = !mask && this.bitDepth !== 8 ? this.bitDepth : null;
|
|
@@ -8727,7 +8854,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8727
8854
|
}
|
|
8728
8855
|
/** A pixel source over a surface (layer pixels or a mask) in layer space at `offset`. */
|
|
8729
8856
|
surfaceSource(surface, offset) {
|
|
8730
|
-
return new (0, _chunkYF3YZZ6Gcjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access',
|
|
8857
|
+
return new (0, _chunkYF3YZZ6Gcjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access', _319 => _319.tiles, 'access', _320 => _320.get, 'call', _321 => _321(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _322 => _322.data]), () => ( (surface.defaultValue ? defaultTile(surface) : null))), surface.channels, offset);
|
|
8731
8858
|
}
|
|
8732
8859
|
/** A pixel source over the composite of the current layers (through `throughId` and below, or all of them), as it is now. */
|
|
8733
8860
|
compositeSource(throughId, depth = null) {
|
|
@@ -8803,7 +8930,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8803
8930
|
paintStroke(init) {
|
|
8804
8931
|
if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("points must hold at least one { x, y } point.");
|
|
8805
8932
|
for (const p of init.points) {
|
|
8806
|
-
if (!Number.isFinite(_optionalChain([p, 'optionalAccess',
|
|
8933
|
+
if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _323 => _323.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _324 => _324.y]))) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
|
|
8807
8934
|
}
|
|
8808
8935
|
const session = this.beginStroke(init);
|
|
8809
8936
|
session.push(init.points);
|
|
@@ -8832,7 +8959,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8832
8959
|
*/
|
|
8833
8960
|
strokeSelection(options) {
|
|
8834
8961
|
const sel = this.state.selection;
|
|
8835
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
8962
|
+
if (!_optionalChain([sel, 'optionalAccess', _325 => _325.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, then stroke the selection.");
|
|
8836
8963
|
const width = options.width;
|
|
8837
8964
|
if (!(width > 0 && width <= 250)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("width must be greater than 0 and at most 250 px.");
|
|
8838
8965
|
const location = _nullishCoalesce(options.location, () => ( "outside"));
|
|
@@ -8849,7 +8976,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8849
8976
|
*/
|
|
8850
8977
|
cropToSelection() {
|
|
8851
8978
|
const sel = this.state.selection;
|
|
8852
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
8979
|
+
if (!_optionalChain([sel, 'optionalAccess', _326 => _326.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select the area to keep, then crop to it.");
|
|
8853
8980
|
const crop = { ...sel.bounds };
|
|
8854
8981
|
this.setCrop(crop);
|
|
8855
8982
|
return crop;
|
|
@@ -8900,7 +9027,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8900
9027
|
*/
|
|
8901
9028
|
prepareContentAwareFill(options = {}) {
|
|
8902
9029
|
const sel = this.state.selection;
|
|
8903
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9030
|
+
if (!_optionalChain([sel, 'optionalAccess', _327 => _327.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select what to remove, then fill it.");
|
|
8904
9031
|
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.");
|
|
8905
9032
|
const output = _nullishCoalesce(options.output, () => ( "current"));
|
|
8906
9033
|
if (output !== "current" && output !== "new-layer" && output !== "duplicate-layer") {
|
|
@@ -8911,12 +9038,12 @@ var ImageEditorController = (_class12 = class {
|
|
|
8911
9038
|
const b = sel.bounds;
|
|
8912
9039
|
let area = _nullishCoalesce(options.samplingArea, () => ( null));
|
|
8913
9040
|
if (!area && options.samplingChannelId) area = this.requireChannel(options.samplingChannelId).mask;
|
|
8914
|
-
if (!area && _optionalChain([options, 'access',
|
|
9041
|
+
if (!area && _optionalChain([options, 'access', _328 => _328.sampleRects, 'optionalAccess', _329 => _329.length])) {
|
|
8915
9042
|
for (const r of options.sampleRects) area = _chunkSS53NNZOcjs.combineSelections.call(void 0, area, _chunkUC3PWFM3cjs.rectSelection.call(void 0, width, height, r, { antiAlias: false }), "add");
|
|
8916
9043
|
}
|
|
8917
9044
|
if (area && !area.bounds) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("The sampling area is empty; paint or give an area to sample from.");
|
|
8918
9045
|
let win;
|
|
8919
|
-
if (_optionalChain([area, 'optionalAccess',
|
|
9046
|
+
if (_optionalChain([area, 'optionalAccess', _330 => _330.bounds])) {
|
|
8920
9047
|
const a = area.bounds;
|
|
8921
9048
|
const x0 = Math.max(0, Math.min(b.x - 8, a.x));
|
|
8922
9049
|
const y0 = Math.max(0, Math.min(b.y - 8, a.y));
|
|
@@ -8941,7 +9068,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8941
9068
|
}
|
|
8942
9069
|
}
|
|
8943
9070
|
let exclude = null;
|
|
8944
|
-
if (area || _optionalChain([options, 'access',
|
|
9071
|
+
if (area || _optionalChain([options, 'access', _331 => _331.excludeRects, 'optionalAccess', _332 => _332.length])) {
|
|
8945
9072
|
exclude = new Uint8Array(n);
|
|
8946
9073
|
if (area) {
|
|
8947
9074
|
const ad = area.data;
|
|
@@ -8993,7 +9120,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8993
9120
|
return { layerId: target.id, bounds: { ...b }, output };
|
|
8994
9121
|
}
|
|
8995
9122
|
/** The pixel clipboard (Copy / Cut), or null. */
|
|
8996
|
-
|
|
9123
|
+
__init101() {this.clipboard = null}
|
|
8997
9124
|
/** What Copy or Cut last put on the editor's clipboard, or null. */
|
|
8998
9125
|
getClipboard() {
|
|
8999
9126
|
return this.clipboard;
|
|
@@ -9012,8 +9139,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
9012
9139
|
*/
|
|
9013
9140
|
copyPixels(options = {}) {
|
|
9014
9141
|
const { width, height } = this.naturalSize;
|
|
9015
|
-
const sel = _optionalChain([this, 'access',
|
|
9016
|
-
const rect2 = _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
9142
|
+
const sel = _optionalChain([this, 'access', _333 => _333.state, 'access', _334 => _334.selection, 'optionalAccess', _335 => _335.bounds]) ? this.state.selection : null;
|
|
9143
|
+
const rect2 = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _336 => _336.bounds]), () => ( { x: 0, y: 0, width, height }));
|
|
9017
9144
|
let data;
|
|
9018
9145
|
if (options.merged) {
|
|
9019
9146
|
data = new Uint8ClampedArray(this.compositePixels(rect2).data);
|
|
@@ -9053,7 +9180,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9053
9180
|
pastePixels(mode = "new-layer", image = this.clipboard) {
|
|
9054
9181
|
if (!image) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("The clipboard is empty; copy_pixels first.");
|
|
9055
9182
|
if (!PASTE_MODES.includes(mode)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Unknown paste mode "${String(mode)}"; use ${PASTE_MODES.join(", ")}.`);
|
|
9056
|
-
const sel = _optionalChain([this, 'access',
|
|
9183
|
+
const sel = _optionalChain([this, 'access', _337 => _337.state, 'access', _338 => _338.selection, 'optionalAccess', _339 => _339.bounds]) ? this.state.selection : null;
|
|
9057
9184
|
if ((mode === "into" || mode === "outside") && !sel) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Paste ${mode === "into" ? "Into" : "Outside"} needs a selection; select where it goes first.`);
|
|
9058
9185
|
const { width, height } = this.naturalSize;
|
|
9059
9186
|
let x;
|
|
@@ -9062,7 +9189,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9062
9189
|
x = image.x;
|
|
9063
9190
|
y = image.y;
|
|
9064
9191
|
} else {
|
|
9065
|
-
const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
9192
|
+
const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _340 => _340.bounds]), () => ( { x: 0, y: 0, width, height }));
|
|
9066
9193
|
x = Math.round(frame.x + (frame.width - image.width) / 2);
|
|
9067
9194
|
y = Math.round(frame.y + (frame.height - image.height) / 2);
|
|
9068
9195
|
}
|
|
@@ -9079,8 +9206,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
9079
9206
|
if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("opacity must be from 0 to 1.");
|
|
9080
9207
|
const blend = _nullishCoalesce(_chunkS55JFWDAcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
|
|
9081
9208
|
const quickMask = target.channel === "quick-mask";
|
|
9082
|
-
const sel = _nullishCoalesce(coverageMask, () => ( (!quickMask && options.useSelection !== false && _optionalChain([this, 'access',
|
|
9083
|
-
const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
9209
|
+
const sel = _nullishCoalesce(coverageMask, () => ( (!quickMask && options.useSelection !== false && _optionalChain([this, 'access', _341 => _341.state, 'access', _342 => _342.selection, 'optionalAccess', _343 => _343.bounds]) ? this.state.selection : null)));
|
|
9210
|
+
const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _344 => _344.bounds]), () => ( { x: 0, y: 0, width, height }));
|
|
9084
9211
|
const coverage = new (0, _chunkPQ3H2AANcjs.CoverageMap)();
|
|
9085
9212
|
const ones = new Float32Array(region.width * region.height);
|
|
9086
9213
|
if (sel) {
|
|
@@ -9205,7 +9332,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9205
9332
|
placeLayer(layers, node, where) {
|
|
9206
9333
|
if (where.aboveId) {
|
|
9207
9334
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, where.aboveId);
|
|
9208
|
-
if (loc) return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9335
|
+
if (loc) return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _345 => _345.parent, 'optionalAccess', _346 => _346.id]), () => ( null)), loc.index + 1);
|
|
9209
9336
|
}
|
|
9210
9337
|
if (where.parentId) {
|
|
9211
9338
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, where.parentId);
|
|
@@ -9216,11 +9343,11 @@ var ImageEditorController = (_class12 = class {
|
|
|
9216
9343
|
const at = Math.max(0, Math.min(nodes.length, Math.round(where.adjustmentIndex)));
|
|
9217
9344
|
if (at < nodes.length) {
|
|
9218
9345
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, nodes[at].id);
|
|
9219
|
-
return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9346
|
+
return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _347 => _347.parent, 'optionalAccess', _348 => _348.id]), () => ( null)), loc.index);
|
|
9220
9347
|
}
|
|
9221
9348
|
if (nodes.length) {
|
|
9222
9349
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, nodes[nodes.length - 1].id);
|
|
9223
|
-
return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9350
|
+
return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _349 => _349.parent, 'optionalAccess', _350 => _350.id]), () => ( null)), loc.index + 1);
|
|
9224
9351
|
}
|
|
9225
9352
|
}
|
|
9226
9353
|
return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, null, this.defaultInsertIndex(layers));
|
|
@@ -9259,7 +9386,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9259
9386
|
enabled: spec.enabled,
|
|
9260
9387
|
opacity: spec.opacity,
|
|
9261
9388
|
blend: spec.blend,
|
|
9262
|
-
mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access',
|
|
9389
|
+
mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access', _351 => _351.state, 'access', _352 => _352.selection, 'optionalAccess', _353 => _353.bounds]) ? _chunkS55JFWDAcjs.layerMaskFromSelection.call(void 0, this.state.selection) : void 0)))
|
|
9263
9390
|
});
|
|
9264
9391
|
while (ids.has(layer.id)) layer.id = _chunkS55JFWDAcjs.newLayerId.call(void 0, "adj");
|
|
9265
9392
|
const { width, height } = this.naturalSize;
|
|
@@ -9336,7 +9463,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9336
9463
|
const anchor = nodes[to];
|
|
9337
9464
|
const without = _chunkB46UQUDCcjs.mapLayer.call(void 0, layers, id, () => null);
|
|
9338
9465
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, without, anchor.id);
|
|
9339
|
-
return _chunkB46UQUDCcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9466
|
+
return _chunkB46UQUDCcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _354 => _354.parent, 'optionalAccess', _355 => _355.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
|
|
9340
9467
|
}
|
|
9341
9468
|
/** Moves a layer to `toIndex` among the adjustment layers (0 = bottom) as one undo step. Returns false if nothing moved. */
|
|
9342
9469
|
moveAdjustmentLayer(id, toIndex) {
|
|
@@ -9377,7 +9504,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9377
9504
|
return _nullishCoalesce(this.state.selection, () => ( null));
|
|
9378
9505
|
}
|
|
9379
9506
|
get hasSelection() {
|
|
9380
|
-
return Boolean(_optionalChain([this, 'access',
|
|
9507
|
+
return Boolean(_optionalChain([this, 'access', _356 => _356.state, 'access', _357 => _357.selection, 'optionalAccess', _358 => _358.bounds]));
|
|
9381
9508
|
}
|
|
9382
9509
|
/** Returns the current canvas (composition) dimensions. */
|
|
9383
9510
|
getCanvasSize() {
|
|
@@ -9469,7 +9596,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9469
9596
|
const prev = normalizeSelection(_nullishCoalesce(this.state.selection, () => ( null)));
|
|
9470
9597
|
if (prev === next || prev && next && sameSelection(prev, next)) return false;
|
|
9471
9598
|
this.recordHistory();
|
|
9472
|
-
if (!next && _optionalChain([prev, 'optionalAccess',
|
|
9599
|
+
if (!next && _optionalChain([prev, 'optionalAccess', _359 => _359.bounds])) this.lastSelection = prev;
|
|
9473
9600
|
this.state.selection = next;
|
|
9474
9601
|
this.notify();
|
|
9475
9602
|
return true;
|
|
@@ -9495,7 +9622,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9495
9622
|
return this.setSelection(null);
|
|
9496
9623
|
}
|
|
9497
9624
|
/** The selection a Deselect cleared, for `reselect` (not saved, not part of history). */
|
|
9498
|
-
|
|
9625
|
+
__init102() {this.lastSelection = null}
|
|
9499
9626
|
/** Whether `reselect` has a selection to bring back. */
|
|
9500
9627
|
canReselect() {
|
|
9501
9628
|
const { width, height } = this.naturalSize;
|
|
@@ -9523,14 +9650,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
9523
9650
|
/** Select › Grow: adds connected pixels within `tolerance` of a selected colour (one undo step). */
|
|
9524
9651
|
async growSelection(options = {}) {
|
|
9525
9652
|
const sel = this.state.selection;
|
|
9526
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9653
|
+
if (!_optionalChain([sel, 'optionalAccess', _360 => _360.bounds])) return false;
|
|
9527
9654
|
const pixels = await this.requirePixels(options);
|
|
9528
9655
|
return this.setSelection(growSelection(pixels, sel, options));
|
|
9529
9656
|
}
|
|
9530
9657
|
/** Select › Similar: adds every pixel within `tolerance` of a selected colour (one undo step). */
|
|
9531
9658
|
async selectSimilar(options = {}) {
|
|
9532
9659
|
const sel = this.state.selection;
|
|
9533
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9660
|
+
if (!_optionalChain([sel, 'optionalAccess', _361 => _361.bounds])) return false;
|
|
9534
9661
|
const pixels = await this.requirePixels(options);
|
|
9535
9662
|
return this.setSelection(selectSimilar(pixels, sel, options));
|
|
9536
9663
|
}
|
|
@@ -9622,7 +9749,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9622
9749
|
size: options.size,
|
|
9623
9750
|
grow: m === "add",
|
|
9624
9751
|
enhanceEdge: options.enhanceEdge,
|
|
9625
|
-
selection: m === "add" && _optionalChain([sel, 'optionalAccess',
|
|
9752
|
+
selection: m === "add" && _optionalChain([sel, 'optionalAccess', _362 => _362.bounds]) ? _chunkUC3PWFM3cjs.serializeMask.call(void 0, sel) : null
|
|
9626
9753
|
};
|
|
9627
9754
|
const { mask } = await this.runSelectionJob(job, pixels, {
|
|
9628
9755
|
signal: options.signal,
|
|
@@ -9642,7 +9769,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9642
9769
|
const { width, height } = this.naturalSize;
|
|
9643
9770
|
const image = await this.toDataURL({ format: "image/png" });
|
|
9644
9771
|
const results = await provider.segment({ ...request, image, width, height });
|
|
9645
|
-
_optionalChain([request, 'access',
|
|
9772
|
+
_optionalChain([request, 'access', _363 => _363.signal, 'optionalAccess', _364 => _364.throwIfAborted, 'call', _365 => _365()]);
|
|
9646
9773
|
const decoded = [];
|
|
9647
9774
|
for (const r of _nullishCoalesce(results, () => ( []))) decoded.push({ ...r, mask: r.mask !== void 0 ? await this.decodeMaskImage(r.mask) : void 0 });
|
|
9648
9775
|
return decoded;
|
|
@@ -9659,7 +9786,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9659
9786
|
let union = null;
|
|
9660
9787
|
for (const r of decoded) {
|
|
9661
9788
|
const one = segmentsToSelection(width, height, [r]);
|
|
9662
|
-
if (!_optionalChain([one, 'optionalAccess',
|
|
9789
|
+
if (!_optionalChain([one, 'optionalAccess', _366 => _366.bounds])) continue;
|
|
9663
9790
|
if ("rect" in target) {
|
|
9664
9791
|
const r0 = target.rect;
|
|
9665
9792
|
const grow = 0.1 * Math.max(r0.width, r0.height);
|
|
@@ -9727,7 +9854,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9727
9854
|
if (this.segmentation && options.useModel !== false) {
|
|
9728
9855
|
const { width, height } = this.naturalSize;
|
|
9729
9856
|
const sky = segmentsToSelection(width, height, await this.modelSegments({ target: "the sky", signal: options.signal }));
|
|
9730
|
-
if (!_optionalChain([sky, 'optionalAccess',
|
|
9857
|
+
if (!_optionalChain([sky, 'optionalAccess', _367 => _367.bounds])) return { selection: _nullishCoalesce(this.state.selection, () => ( null)), method: "model", note: "The segmentation model found no sky." };
|
|
9731
9858
|
this.setSelection(sky, _nullishCoalesce(options.mode, () => ( "replace")));
|
|
9732
9859
|
return { selection: _nullishCoalesce(this.state.selection, () => ( null)), method: "model" };
|
|
9733
9860
|
}
|
|
@@ -9758,13 +9885,13 @@ var ImageEditorController = (_class12 = class {
|
|
|
9758
9885
|
try {
|
|
9759
9886
|
const canvas = await this.renderSource();
|
|
9760
9887
|
const ctx = canvas.getContext("2d");
|
|
9761
|
-
const data2 = _optionalChain([ctx, 'optionalAccess',
|
|
9888
|
+
const data2 = _optionalChain([ctx, 'optionalAccess', _368 => _368.getImageData, 'optionalCall', _369 => _369(0, 0, width, height)]);
|
|
9762
9889
|
if (data2 && data2.data && data2.data.length >= width * height * 4) {
|
|
9763
9890
|
base = { width, height, data: data2.data };
|
|
9764
9891
|
this.samplePixels = base;
|
|
9765
9892
|
this.samplePixelsOverride = false;
|
|
9766
9893
|
}
|
|
9767
|
-
} catch (
|
|
9894
|
+
} catch (e32) {
|
|
9768
9895
|
base = null;
|
|
9769
9896
|
}
|
|
9770
9897
|
}
|
|
@@ -9833,7 +9960,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9833
9960
|
/** Select › Modify: grow, shrink, feather, border or smooth by `radius` pixels (one undo step). */
|
|
9834
9961
|
modifySelection(op, radius) {
|
|
9835
9962
|
const sel = this.state.selection;
|
|
9836
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9963
|
+
if (!_optionalChain([sel, 'optionalAccess', _370 => _370.bounds])) return false;
|
|
9837
9964
|
return this.setSelection(_chunkSS53NNZOcjs.modifySelection.call(void 0, sel, op, radius));
|
|
9838
9965
|
}
|
|
9839
9966
|
/**
|
|
@@ -9842,7 +9969,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9842
9969
|
*/
|
|
9843
9970
|
async refineSelection(params, options = {}) {
|
|
9844
9971
|
const sel = this.state.selection;
|
|
9845
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9972
|
+
if (!_optionalChain([sel, 'optionalAccess', _371 => _371.bounds])) return false;
|
|
9846
9973
|
const pixels = (_nullishCoalesce(params.radius, () => ( 0))) > 0 ? await this.requirePixels(options) : null;
|
|
9847
9974
|
return this.setSelection(_chunkSS53NNZOcjs.refineSelection.call(void 0, pixels, sel, params));
|
|
9848
9975
|
}
|
|
@@ -9865,7 +9992,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9865
9992
|
const edits = _nullishCoalesce(options.edits, () => ( []));
|
|
9866
9993
|
const regions2 = this.checkRegions(options.regions);
|
|
9867
9994
|
const refineMode = _nullishCoalesce(options.refineMode, () => ( "color"));
|
|
9868
|
-
if (!_optionalChain([this, 'access',
|
|
9995
|
+
if (!_optionalChain([this, 'access', _372 => _372.state, 'access', _373 => _373.selection, 'optionalAccess', _374 => _374.bounds]) && !edits.length) throw new Error("Nothing is selected; select first, or pass edits that paint a selection.");
|
|
9869
9996
|
if (refineMode === "object" && !this.segmentation) {
|
|
9870
9997
|
throw new Error("Object aware refinement needs a segmentation model (setSegmentationProvider); use refineMode color.");
|
|
9871
9998
|
}
|
|
@@ -9888,14 +10015,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
9888
10015
|
const { width, height } = this.naturalSize;
|
|
9889
10016
|
const edited = _chunkUC3PWFM3cjs.applyRefineEdits.call(void 0, pixels, _nullishCoalesce(this.state.selection, () => ( null)), edits, width, height);
|
|
9890
10017
|
let sel = edited.selection;
|
|
9891
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10018
|
+
if (!_optionalChain([sel, 'optionalAccess', _375 => _375.bounds])) throw new Error("The edits leave nothing selected; paint with mode add first.");
|
|
9892
10019
|
if (refineMode === "object") {
|
|
9893
10020
|
const b = sel.bounds;
|
|
9894
10021
|
const found = await this.modelObject({ rect: b }, options.signal);
|
|
9895
10022
|
if (!found) throw new Error("The segmentation model found no object in the selection; use refineMode color.");
|
|
9896
10023
|
const near = _chunkSS53NNZOcjs.modifySelection.call(void 0, sel, "expand", Math.max(4, _nullishCoalesce(params.radius, () => ( 8))));
|
|
9897
10024
|
const clipped = _chunkSS53NNZOcjs.combineSelections.call(void 0, found, near, "intersect");
|
|
9898
|
-
if (!_optionalChain([clipped, 'optionalAccess',
|
|
10025
|
+
if (!_optionalChain([clipped, 'optionalAccess', _376 => _376.bounds])) throw new Error("The segmentation model found no object in the selection; use refineMode color.");
|
|
9899
10026
|
sel = clipped;
|
|
9900
10027
|
}
|
|
9901
10028
|
let refined = _chunkSS53NNZOcjs.refineSelection.call(void 0, pixels, sel, params, edited.refineBrush);
|
|
@@ -9997,7 +10124,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9997
10124
|
let mask;
|
|
9998
10125
|
if (source === "selection") {
|
|
9999
10126
|
const sel = this.state.selection;
|
|
10000
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10127
|
+
if (!_optionalChain([sel, 'optionalAccess', _377 => _377.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, or export a channel or a layer mask.");
|
|
10001
10128
|
mask = sel;
|
|
10002
10129
|
} else if ("channelId" in source) {
|
|
10003
10130
|
mask = this.requireChannel(source.channelId).mask;
|
|
@@ -10021,7 +10148,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10021
10148
|
const canvas = this.renderer.createCanvas(w, h);
|
|
10022
10149
|
const ctx = canvas.getContext("2d");
|
|
10023
10150
|
if (ctx) ctx.drawImage(img, 0, 0, w, h);
|
|
10024
|
-
const data = _optionalChain([ctx, 'optionalAccess',
|
|
10151
|
+
const data = _optionalChain([ctx, 'optionalAccess', _378 => _378.getImageData, 'optionalCall', _379 => _379(0, 0, w, h)]);
|
|
10025
10152
|
if (!data) throw new Error("The mask image pixels are not available (no canvas access); pass pixels.");
|
|
10026
10153
|
return { width: w, height: h, data: data.data };
|
|
10027
10154
|
}
|
|
@@ -10037,7 +10164,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10037
10164
|
const provider = this.segmentation;
|
|
10038
10165
|
if (!provider) {
|
|
10039
10166
|
const pixels = await this.requirePixels({});
|
|
10040
|
-
_optionalChain([options, 'access',
|
|
10167
|
+
_optionalChain([options, 'access', _380 => _380.signal, 'optionalAccess', _381 => _381.throwIfAborted, 'call', _382 => _382()]);
|
|
10041
10168
|
const { mask: selection, reason } = await this.runSelectionJob({ op: "subject", enhanceEdge: options.enhanceEdge }, pixels, options);
|
|
10042
10169
|
if (selection.bounds) this.shapeCommand(selection, options);
|
|
10043
10170
|
const unused = target.trim() ? ` "${target.trim()}" was not used to choose it.` : "";
|
|
@@ -10053,17 +10180,17 @@ var ImageEditorController = (_class12 = class {
|
|
|
10053
10180
|
const decoded = await this.modelSegments({ target: description, maxSegments: options.maxSegments, signal: options.signal });
|
|
10054
10181
|
const segments = decoded.map((r) => {
|
|
10055
10182
|
const one = segmentsToSelection(width, height, [r]);
|
|
10056
|
-
return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess',
|
|
10183
|
+
return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess', _383 => _383.bounds]), () => ( null)), ...r.score !== void 0 ? { score: r.score } : {} };
|
|
10057
10184
|
});
|
|
10058
10185
|
const mask = segmentsToSelection(width, height, decoded);
|
|
10059
10186
|
if (mask && options.beforeApply) {
|
|
10060
10187
|
const outlines = decoded.flatMap((r, i) => {
|
|
10061
10188
|
const rings = segmentationOutlines(r);
|
|
10062
|
-
const b = _optionalChain([segments, 'access',
|
|
10189
|
+
const b = _optionalChain([segments, 'access', _384 => _384[i], 'optionalAccess', _385 => _385.bounds]);
|
|
10063
10190
|
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 }]] : [];
|
|
10064
10191
|
});
|
|
10065
10192
|
await options.beforeApply(outlines);
|
|
10066
|
-
_optionalChain([options, 'access',
|
|
10193
|
+
_optionalChain([options, 'access', _386 => _386.signal, 'optionalAccess', _387 => _387.throwIfAborted, 'call', _388 => _388()]);
|
|
10067
10194
|
}
|
|
10068
10195
|
if (mask) this.shapeCommand(mask, options);
|
|
10069
10196
|
return { segments: segments.filter((s) => s.bounds), method: "model" };
|
|
@@ -10096,7 +10223,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10096
10223
|
const view = this.state.maskView;
|
|
10097
10224
|
if (!view) return null;
|
|
10098
10225
|
const layer = this.getLayer(view.layerId);
|
|
10099
|
-
return _optionalChain([layer, 'optionalAccess',
|
|
10226
|
+
return _optionalChain([layer, 'optionalAccess', _389 => _389.mask]) && !layer.mask.source ? view : null;
|
|
10100
10227
|
}
|
|
10101
10228
|
/**
|
|
10102
10229
|
* Shows a layer's mask on the canvas: `gray` alone in grey (Alt-click the mask thumbnail),
|
|
@@ -10119,7 +10246,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10119
10246
|
if (!layer.mask) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask to show; add one with add_layer_mask.`);
|
|
10120
10247
|
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.`);
|
|
10121
10248
|
const cur = this.state.maskView;
|
|
10122
|
-
if (_optionalChain([cur, 'optionalAccess',
|
|
10249
|
+
if (_optionalChain([cur, 'optionalAccess', _390 => _390.layerId]) !== id || cur.mode !== mode) {
|
|
10123
10250
|
this.state.maskView = { layerId: id, mode };
|
|
10124
10251
|
this.notify();
|
|
10125
10252
|
}
|
|
@@ -10131,7 +10258,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10131
10258
|
return _nullishCoalesce(this.state.channels, () => ( []));
|
|
10132
10259
|
}
|
|
10133
10260
|
getChannel(id) {
|
|
10134
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
10261
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _391 => _391.state, 'access', _392 => _392.channels, 'optionalAccess', _393 => _393.find, 'call', _394 => _394((c) => c.id === id)]), () => ( null));
|
|
10135
10262
|
}
|
|
10136
10263
|
requireChannel(id) {
|
|
10137
10264
|
const channel = this.getChannel(id);
|
|
@@ -10160,14 +10287,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
10160
10287
|
*/
|
|
10161
10288
|
saveSelection(options = {}) {
|
|
10162
10289
|
const sel = this.state.selection;
|
|
10163
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10290
|
+
if (!_optionalChain([sel, 'optionalAccess', _395 => _395.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, then save the selection to a channel.");
|
|
10164
10291
|
const { width, height } = this.naturalSize;
|
|
10165
10292
|
const sized = sel.width === width && sel.height === height ? sel : _chunkSS53NNZOcjs.resizeSelection.call(void 0, sel, width, height);
|
|
10166
10293
|
const channels = [...this.getChannels()];
|
|
10167
10294
|
if (options.channelId !== void 0) {
|
|
10168
10295
|
const existing = this.requireChannel(options.channelId);
|
|
10169
10296
|
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)));
|
|
10170
|
-
const next = { ...existing, mask, ..._optionalChain([options, 'access',
|
|
10297
|
+
const next = { ...existing, mask, ..._optionalChain([options, 'access', _396 => _396.name, 'optionalAccess', _397 => _397.trim, 'call', _398 => _398()]) ? { name: options.name.trim() } : {} };
|
|
10171
10298
|
this.setChannels(channels.map((c) => c.id === existing.id ? next : c));
|
|
10172
10299
|
return next;
|
|
10173
10300
|
}
|
|
@@ -10178,7 +10305,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10178
10305
|
const channels = this.getChannels();
|
|
10179
10306
|
const channel = {
|
|
10180
10307
|
id: this.newChannelId(),
|
|
10181
|
-
name: _optionalChain([name, 'optionalAccess',
|
|
10308
|
+
name: _optionalChain([name, 'optionalAccess', _399 => _399.trim, 'call', _400 => _400()]) || `Alpha ${channels.length + 1}`,
|
|
10182
10309
|
mask,
|
|
10183
10310
|
color: DEFAULT_CHANNEL_COLOR,
|
|
10184
10311
|
opacity: 0.5,
|
|
@@ -10223,7 +10350,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10223
10350
|
/** Duplicates an alpha channel just after it (one undo step). Returns the copy. */
|
|
10224
10351
|
duplicateChannel(id, name) {
|
|
10225
10352
|
const channel = this.requireChannel(id);
|
|
10226
|
-
const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess',
|
|
10353
|
+
const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess', _401 => _401.trim, 'call', _402 => _402()]) || `${channel.name} copy` };
|
|
10227
10354
|
const channels = [...this.getChannels()];
|
|
10228
10355
|
channels.splice(channels.findIndex((c) => c.id === id) + 1, 0, copy);
|
|
10229
10356
|
this.setChannels(channels);
|
|
@@ -10254,7 +10381,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10254
10381
|
quickMaskSurface() {
|
|
10255
10382
|
const { width, height } = this.naturalSize;
|
|
10256
10383
|
const sel = this.state.selection;
|
|
10257
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10384
|
+
if (!_optionalChain([sel, 'optionalAccess', _403 => _403.bounds])) return _chunk474IQG74cjs.emptySurface.call(void 0, 1, 0);
|
|
10258
10385
|
return (sel.width === width && sel.height === height ? sel : _chunkSS53NNZOcjs.resizeSelection.call(void 0, sel, width, height)).surface;
|
|
10259
10386
|
}
|
|
10260
10387
|
/** The selection a painted Quick Mask surface stands for (it shares the surface's tiles). */
|
|
@@ -10275,7 +10402,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10275
10402
|
*/
|
|
10276
10403
|
applySelectionAsLayerMask(layerId, props = {}) {
|
|
10277
10404
|
const sel = this.state.selection;
|
|
10278
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10405
|
+
if (!_optionalChain([sel, 'optionalAccess', _404 => _404.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
|
|
10279
10406
|
return this.setLayerMask(layerId, this.maskFromSelection(sel, props));
|
|
10280
10407
|
}
|
|
10281
10408
|
setLayerMask(layerId, mask, commitToHistory = true) {
|
|
@@ -10324,7 +10451,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10324
10451
|
let layer;
|
|
10325
10452
|
if (target === "selection") {
|
|
10326
10453
|
mask = this.getSelection();
|
|
10327
|
-
if (!_optionalChain([mask, 'optionalAccess',
|
|
10454
|
+
if (!_optionalChain([mask, 'optionalAccess', _405 => _405.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected: make a selection first, or inspect a layer-mask or vector-mask with layerId.");
|
|
10328
10455
|
} else if (target === "layer-mask" || target === "vector-mask") {
|
|
10329
10456
|
if (!options.layerId) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`A ${target} needs layerId (see list_layers).`);
|
|
10330
10457
|
layer = this.getLayer(options.layerId);
|
|
@@ -10345,7 +10472,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10345
10472
|
const x = Math.max(0, b.x - 8);
|
|
10346
10473
|
const y = Math.max(0, b.y - 8);
|
|
10347
10474
|
const region = { x, y, width: Math.min(width, b.x + b.width + 8) - x, height: Math.min(height, b.y + b.height + 8) - y };
|
|
10348
|
-
const own = _optionalChain([layer, 'optionalAccess',
|
|
10475
|
+
const own = _optionalChain([layer, 'optionalAccess', _406 => _406.type]) === "pixel" ? this.getLayerPixels(layer.id) : null;
|
|
10349
10476
|
const image = _nullishCoalesce(own, () => ( { ...this.compositePixels(region), x: region.x, y: region.y }));
|
|
10350
10477
|
const report = inspectMaskEdge(mask, image, options);
|
|
10351
10478
|
return { target, ...layer ? { layerId: layer.id } : {}, ...report };
|
|
@@ -10356,10 +10483,10 @@ var ImageEditorController = (_class12 = class {
|
|
|
10356
10483
|
const { width, height } = this.naturalSize;
|
|
10357
10484
|
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.");
|
|
10358
10485
|
return regions2.map((r, i) => {
|
|
10359
|
-
const x = Math.max(0, Math.floor(_optionalChain([r, 'optionalAccess',
|
|
10360
|
-
const y = Math.max(0, Math.floor(_optionalChain([r, 'optionalAccess',
|
|
10361
|
-
const x1 = Math.min(width, Math.ceil(_optionalChain([r, 'optionalAccess',
|
|
10362
|
-
const y1 = Math.min(height, Math.ceil(_optionalChain([r, 'optionalAccess',
|
|
10486
|
+
const x = Math.max(0, Math.floor(_optionalChain([r, 'optionalAccess', _407 => _407.x])));
|
|
10487
|
+
const y = Math.max(0, Math.floor(_optionalChain([r, 'optionalAccess', _408 => _408.y])));
|
|
10488
|
+
const x1 = Math.min(width, Math.ceil(_optionalChain([r, 'optionalAccess', _409 => _409.x]) + _optionalChain([r, 'optionalAccess', _410 => _410.width])));
|
|
10489
|
+
const y1 = Math.min(height, Math.ceil(_optionalChain([r, 'optionalAccess', _411 => _411.y]) + _optionalChain([r, 'optionalAccess', _412 => _412.height])));
|
|
10363
10490
|
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)}.`);
|
|
10364
10491
|
return { x, y, width: x1 - x, height: y1 - y };
|
|
10365
10492
|
});
|
|
@@ -10373,7 +10500,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10373
10500
|
selectionUncertainty(options = {}) {
|
|
10374
10501
|
const { width, height } = this.naturalSize;
|
|
10375
10502
|
const sel = this.getSelection();
|
|
10376
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10503
|
+
if (!_optionalChain([sel, 'optionalAccess', _413 => _413.bounds])) return selectionUncertainty(_chunkSS53NNZOcjs.createSelectionMask.call(void 0, width, height), { x: 0, y: 0, width: 0, height: 0, data: new Uint8ClampedArray(0) }, options);
|
|
10377
10504
|
const b = sel.bounds;
|
|
10378
10505
|
const m = Math.max(8, Math.ceil(_nullishCoalesce(options.band, () => ( Math.max(2, Math.min(width, height) / 200)))) + 4);
|
|
10379
10506
|
const x = Math.max(0, b.x - m);
|
|
@@ -10381,10 +10508,69 @@ var ImageEditorController = (_class12 = class {
|
|
|
10381
10508
|
const region = { x, y, width: Math.min(width, b.x + b.width + m) - x, height: Math.min(height, b.y + b.height + m) - y };
|
|
10382
10509
|
return selectionUncertainty(sel, { ...this.compositePixels(region), x, y }, options);
|
|
10383
10510
|
}
|
|
10511
|
+
/**
|
|
10512
|
+
* A selection to compare (`compareSelections`): the current one, the one `steps` undo steps
|
|
10513
|
+
* ago, a saved channel, or a layer's painted or vector mask. `null` is nothing selected.
|
|
10514
|
+
*/
|
|
10515
|
+
selectionFrom(source) {
|
|
10516
|
+
const { width, height } = this.naturalSize;
|
|
10517
|
+
switch (_optionalChain([source, 'optionalAccess', _414 => _414.kind])) {
|
|
10518
|
+
case "selection":
|
|
10519
|
+
return this.getSelection();
|
|
10520
|
+
case "history": {
|
|
10521
|
+
const steps = _nullishCoalesce(source.steps, () => ( 1));
|
|
10522
|
+
const depth = this.undoStack.length;
|
|
10523
|
+
if (!Number.isInteger(steps) || steps < 1) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`steps must be a whole number of undo steps back, at least 1; got ${String(source.steps)}.`);
|
|
10524
|
+
if (steps > depth) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`There ${depth === 1 ? "is 1 undo step" : `are ${depth} undo steps`}; steps must be 1..${depth || 1}${depth ? "" : " once something has been done"}.`);
|
|
10525
|
+
return _nullishCoalesce(this.undoStack[depth - steps].selection, () => ( null));
|
|
10526
|
+
}
|
|
10527
|
+
case "channel":
|
|
10528
|
+
return this.requireChannel(source.channelId).mask;
|
|
10529
|
+
case "layer-mask": {
|
|
10530
|
+
const layer = this.getLayer(source.layerId);
|
|
10531
|
+
if (!layer) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`There is no layer "${source.layerId}" (see list_layers).`);
|
|
10532
|
+
const mask = this.layerMaskCoverage(layer.id);
|
|
10533
|
+
if (!mask) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${layer.name || layer.id}" has no painted mask; add one with add_layer_mask, or compare its vector-mask.`);
|
|
10534
|
+
return mask;
|
|
10535
|
+
}
|
|
10536
|
+
case "vector-mask": {
|
|
10537
|
+
const layer = this.getLayer(source.layerId);
|
|
10538
|
+
if (!layer) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`There is no layer "${source.layerId}" (see list_layers).`);
|
|
10539
|
+
const { vm } = this.requireVectorMask(layer.id);
|
|
10540
|
+
const mask = pathToSelection(vm.components, width, height, { fillRule: vm.fillRule });
|
|
10541
|
+
return vm.inverted ? _chunkSS53NNZOcjs.invertSelection.call(void 0, mask) : mask;
|
|
10542
|
+
}
|
|
10543
|
+
default:
|
|
10544
|
+
throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Unknown selection source ${JSON.stringify(source)}. Use selection, history, channel, layer-mask or vector-mask.`);
|
|
10545
|
+
}
|
|
10546
|
+
}
|
|
10547
|
+
/**
|
|
10548
|
+
* What changed from selection `a` (default: before the last undo step) to `b` (default: the
|
|
10549
|
+
* current selection): added and removed area with their largest pieces, IoU and the coverage
|
|
10550
|
+
* change. With `show` (default true) the canvas tints added area green and removed red until the
|
|
10551
|
+
* selection next changes (view state, no undo step). Read-only otherwise.
|
|
10552
|
+
*/
|
|
10553
|
+
compareSelections(a = { kind: "history", steps: 1 }, b = { kind: "selection" }, options = {}) {
|
|
10554
|
+
const { width, height } = this.naturalSize;
|
|
10555
|
+
const ma = this.selectionFrom(a);
|
|
10556
|
+
const mb = this.selectionFrom(b);
|
|
10557
|
+
const { addedMask, removedMask, ...diff } = compareSelectionMasks(ma, mb, width, height, options);
|
|
10558
|
+
if (options.show !== false) {
|
|
10559
|
+
this.state.selectionDiff = diff.identical ? null : { added: addedMask, removed: removedMask, selection: _nullishCoalesce(this.state.selection, () => ( null)) };
|
|
10560
|
+
this.notify();
|
|
10561
|
+
}
|
|
10562
|
+
return diff;
|
|
10563
|
+
}
|
|
10564
|
+
/** Hides the `compareSelections` overlay. */
|
|
10565
|
+
clearSelectionDiff() {
|
|
10566
|
+
if (!this.state.selectionDiff) return;
|
|
10567
|
+
this.state.selectionDiff = null;
|
|
10568
|
+
this.notify();
|
|
10569
|
+
}
|
|
10384
10570
|
/** A layer's painted mask over the canvas as a selection mask; null without one (or for a depth mask). */
|
|
10385
10571
|
layerMaskCoverage(layerId) {
|
|
10386
10572
|
const layer = this.getLayer(layerId);
|
|
10387
|
-
if (!_optionalChain([layer, 'optionalAccess',
|
|
10573
|
+
if (!_optionalChain([layer, 'optionalAccess', _415 => _415.mask]) || layer.mask.source) return null;
|
|
10388
10574
|
const { width, height } = this.naturalSize;
|
|
10389
10575
|
const ox = layer.type === "pixel" ? layer.offset.x : 0;
|
|
10390
10576
|
const oy = layer.type === "pixel" ? layer.offset.y : 0;
|
|
@@ -10419,7 +10605,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10419
10605
|
this.state.layers = _chunkB46UQUDCcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
|
|
10420
10606
|
const next = { ...l };
|
|
10421
10607
|
if (_chunkS55JFWDAcjs.isDefaultDepthMask.call(void 0, merged)) {
|
|
10422
|
-
if (_optionalChain([next, 'access',
|
|
10608
|
+
if (_optionalChain([next, 'access', _416 => _416.mask, 'optionalAccess', _417 => _417.source])) delete next.mask;
|
|
10423
10609
|
} else next.mask = _chunkS55JFWDAcjs.depthRasterMask.call(void 0, merged);
|
|
10424
10610
|
return next;
|
|
10425
10611
|
});
|
|
@@ -10429,7 +10615,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10429
10615
|
resetDepthMask() {
|
|
10430
10616
|
this.recordHistory();
|
|
10431
10617
|
const target = this.developLayer();
|
|
10432
|
-
if (_optionalChain([target, 'optionalAccess',
|
|
10618
|
+
if (_optionalChain([target, 'optionalAccess', _418 => _418.mask, 'optionalAccess', _419 => _419.source])) {
|
|
10433
10619
|
this.state.layers = _chunkB46UQUDCcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
|
|
10434
10620
|
const next = { ...l };
|
|
10435
10621
|
delete next.mask;
|
|
@@ -10441,7 +10627,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10441
10627
|
// --- Annotations & Layers ---
|
|
10442
10628
|
/** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
|
|
10443
10629
|
annotationLayer(id) {
|
|
10444
|
-
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',
|
|
10630
|
+
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', _420 => _420.id]) === id);
|
|
10445
10631
|
}
|
|
10446
10632
|
/** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
|
|
10447
10633
|
annotationEnv() {
|
|
@@ -10459,7 +10645,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10459
10645
|
const fullAnnotation = { ...annotation, id };
|
|
10460
10646
|
const layer = _chunkS55JFWDAcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
|
|
10461
10647
|
const loc = placement.aboveId ? _chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
|
|
10462
|
-
this.state.layers = loc ? _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
10648
|
+
this.state.layers = loc ? _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _421 => _421.parent, 'optionalAccess', _422 => _422.id]), () => ( null)), loc.index + 1) : _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, layer, null);
|
|
10463
10649
|
this.state.selectedAnnotationId = id;
|
|
10464
10650
|
this.notify();
|
|
10465
10651
|
return id;
|
|
@@ -10539,7 +10725,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10539
10725
|
this.notify();
|
|
10540
10726
|
}
|
|
10541
10727
|
// --- Rendering & Export ---
|
|
10542
|
-
|
|
10728
|
+
__init103() {this.blankSource = null}
|
|
10543
10729
|
/**
|
|
10544
10730
|
* What the renderer draws from: the source image, or, for a document without one (an opened
|
|
10545
10731
|
* PSD, a v3 document loaded on its own), a transparent canvas of the document size, since every
|
|
@@ -10582,11 +10768,11 @@ var ImageEditorController = (_class12 = class {
|
|
|
10582
10768
|
await this.renderer.renderToCanvas(targetCanvas, source, this.state, {
|
|
10583
10769
|
...options,
|
|
10584
10770
|
// The clone source follows the brush cursor (both editors pass it).
|
|
10585
|
-
cloneSourceMarker: _optionalChain([options, 'optionalAccess',
|
|
10771
|
+
cloneSourceMarker: _optionalChain([options, 'optionalAccess', _423 => _423.cloneSourceMarker]) !== void 0 ? options.cloneSourceMarker : _optionalChain([options, 'optionalAccess', _424 => _424.brushCursor]) ? this.cloneSourceMarker(options.brushCursor) : null,
|
|
10586
10772
|
dirty: dirty === "all" ? void 0 : dirty,
|
|
10587
10773
|
checkpointLayerId: this.state.activeLayerId
|
|
10588
10774
|
});
|
|
10589
|
-
} catch (
|
|
10775
|
+
} catch (e33) {
|
|
10590
10776
|
}
|
|
10591
10777
|
}
|
|
10592
10778
|
async renderExport(options) {
|
|
@@ -10595,7 +10781,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10595
10781
|
return this.renderer.createCanvas(1, 1);
|
|
10596
10782
|
}
|
|
10597
10783
|
this.syncViews();
|
|
10598
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
10784
|
+
if (_optionalChain([options, 'optionalAccess', _425 => _425.layerIds])) {
|
|
10599
10785
|
const keep = new Set(options.layerIds);
|
|
10600
10786
|
const layers = _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => keep.has(l.id));
|
|
10601
10787
|
return this.renderer.renderExport(source, { ...this.state, layers }, options);
|
|
@@ -10641,7 +10827,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10641
10827
|
try {
|
|
10642
10828
|
if (mime === "image/png") return _chunkBROJYMWUcjs.writePngIcc.call(void 0, bytes, icc, this.getColorProfile().name);
|
|
10643
10829
|
if (mime === "image/jpeg") return _chunkBROJYMWUcjs.writeJpegIcc.call(void 0, bytes, icc);
|
|
10644
|
-
} catch (
|
|
10830
|
+
} catch (e34) {
|
|
10645
10831
|
}
|
|
10646
10832
|
return bytes;
|
|
10647
10833
|
}
|
|
@@ -10749,7 +10935,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10749
10935
|
let px2 = await this.decodeImage(newDataUrl);
|
|
10750
10936
|
if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
|
|
10751
10937
|
const data = new Uint8ClampedArray(px2.data);
|
|
10752
|
-
const sel = _optionalChain([this, 'access',
|
|
10938
|
+
const sel = _optionalChain([this, 'access', _426 => _426.state, 'access', _427 => _427.selection, 'optionalAccess', _428 => _428.bounds]) ? this.state.selection : null;
|
|
10753
10939
|
if (sel) for (let p = 0, i = 3; p < width * height; p++, i += 4) data[i] = Math.round(data[i] * sel.data[p] / 255);
|
|
10754
10940
|
return this.addPixelLayer({ name: "Inpaint", pixels: { width, height, data } });
|
|
10755
10941
|
}
|
|
@@ -10796,7 +10982,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10796
10982
|
}
|
|
10797
10983
|
/** Font families the shaper offers (generic families at least). */
|
|
10798
10984
|
listFonts() {
|
|
10799
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
10985
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _429 => _429.getTextShaper, 'call', _430 => _430(), 'optionalAccess', _431 => _431.families, 'optionalCall', _432 => _432()]), () => ( ["sans-serif", "serif", "monospace"]));
|
|
10800
10986
|
}
|
|
10801
10987
|
typeInfo(id) {
|
|
10802
10988
|
const layer = _chunkS55JFWDAcjs.requireTypeLayer.call(void 0, this.state.layers, id);
|
|
@@ -10870,8 +11056,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
10870
11056
|
const layer = this.layoutTypeLayer({ ...init, text, orientation: vertical ? "vertical" : "horizontal" });
|
|
10871
11057
|
const { width, height } = this.naturalSize;
|
|
10872
11058
|
const b = _chunk474IQG74cjs.contentBounds.call(void 0, layer.surface);
|
|
10873
|
-
const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess',
|
|
10874
|
-
const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess',
|
|
11059
|
+
const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _433 => _433.x]), () => ( 0)));
|
|
11060
|
+
const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _434 => _434.y]), () => ( 0)));
|
|
10875
11061
|
const x1 = Math.min(width, b ? b.x + b.width : 0);
|
|
10876
11062
|
const y1 = Math.min(height, b ? b.y + b.height : 0);
|
|
10877
11063
|
let mask;
|
|
@@ -11048,7 +11234,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11048
11234
|
if (colors.size > 1) warnings.push("The text had several colours; the shape takes the first one.");
|
|
11049
11235
|
const missing = _chunkQAUIZPYIcjs.layoutText.call(void 0, layer, shaper).missingFonts;
|
|
11050
11236
|
if (missing.length) warnings.push(`Missing fonts were drawn with a fallback: ${missing.join(", ")}.`);
|
|
11051
|
-
const first = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
11237
|
+
const first = _nullishCoalesce(_optionalChain([layer, 'access', _435 => _435.runs, 'access', _436 => _436.find, 'call', _437 => _437((r) => r.length > 0), 'optionalAccess', _438 => _438.style]), () => ( _chunkQAUIZPYIcjs.DEFAULT_TEXT_STYLE));
|
|
11052
11238
|
const fill = first.opacity !== void 0 && first.opacity !== 1 ? { type: "color", color: first.color, opacity: first.opacity } : { type: "color", color: first.color };
|
|
11053
11239
|
const shape = _chunkS55JFWDAcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
|
|
11054
11240
|
const keep = { visible: layer.visible, opacity: layer.opacity, blend: layer.blend };
|
|
@@ -11081,7 +11267,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11081
11267
|
// --- Shape layers ---
|
|
11082
11268
|
/** What shape rendering needs: the canvas size and the document's patterns. */
|
|
11083
11269
|
shapeEnv() {
|
|
11084
|
-
return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
11270
|
+
return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _439 => _439.state, 'access', _440 => _440.patterns, 'optionalAccess', _441 => _441.find, 'call', _442 => _442((p) => p.id === id)]), () => ( null)) };
|
|
11085
11271
|
}
|
|
11086
11272
|
/** One component from tool or UI input (validated). */
|
|
11087
11273
|
componentFrom(spec, path) {
|
|
@@ -11124,9 +11310,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
11124
11310
|
* open path) and stroked with `stroke`. Goes above the active layer unless placed. Returns its id.
|
|
11125
11311
|
*/
|
|
11126
11312
|
addShapeLayer(init) {
|
|
11127
|
-
const specs = _optionalChain([init, 'access',
|
|
11128
|
-
if (_optionalChain([init, 'access',
|
|
11129
|
-
const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access',
|
|
11313
|
+
const specs = _optionalChain([init, 'access', _443 => _443.components, 'optionalAccess', _444 => _444.length]) ? init.components : [init];
|
|
11314
|
+
if (_optionalChain([init, 'access', _445 => _445.components, 'optionalAccess', _446 => _446.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
|
|
11315
|
+
const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _447 => _447.components, 'optionalAccess', _448 => _448.length]) ? `components[${i}].` : ""));
|
|
11130
11316
|
const stroke = init.stroke ? _chunkS55JFWDAcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
|
|
11131
11317
|
const openOnly = components.every((c) => !c.live && c.subpaths.every((sp) => !sp.closed));
|
|
11132
11318
|
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");
|
|
@@ -11237,7 +11423,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11237
11423
|
if (layer.locks) next.locks = layer.locks;
|
|
11238
11424
|
if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
|
|
11239
11425
|
} else if (layer.type === "pixel") {
|
|
11240
|
-
if (!_optionalChain([layer, 'access',
|
|
11426
|
+
if (!_optionalChain([layer, 'access', _449 => _449.filters, 'optionalAccess', _450 => _450.length])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
|
|
11241
11427
|
_chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
|
|
11242
11428
|
const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
|
|
11243
11429
|
const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
|
|
@@ -11256,7 +11442,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11256
11442
|
return this.rasterizeSmartObject(id);
|
|
11257
11443
|
} else if (layer.type === "shape" || layer.type === "type") {
|
|
11258
11444
|
next = layer.type === "shape" ? _chunkS55JFWDAcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkS55JFWDAcjs.typeAsPixelLayer.call(void 0, layer);
|
|
11259
|
-
if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access',
|
|
11445
|
+
if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _451 => _451.annotation, 'optionalAccess', _452 => _452.id])) this.state.selectedAnnotationId = null;
|
|
11260
11446
|
} else {
|
|
11261
11447
|
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.`);
|
|
11262
11448
|
}
|
|
@@ -11270,8 +11456,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
11270
11456
|
const doc = this.state.colorProfile;
|
|
11271
11457
|
const p = resolveProfile(doc);
|
|
11272
11458
|
const m = this.state.colorMode;
|
|
11273
|
-
const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess',
|
|
11274
|
-
if (_optionalChain([m, 'optionalAccess',
|
|
11459
|
+
const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _453 => _453.name]), () => ( p.description)), builtin: doc ? _nullishCoalesce(doc.builtin, () => ( null)) : "srgb", colorSpace: p.colorSpace, srgb: isSrgb(doc), mode: _nullishCoalesce(_optionalChain([m, 'optionalAccess', _454 => _454.mode]), () => ( "rgb")) };
|
|
11460
|
+
if (_optionalChain([m, 'optionalAccess', _455 => _455.mode]) === "cmyk") out.cmykProfile = { name: m.profile.name, builtin: _nullishCoalesce(m.profile.builtin, () => ( null)), intent: m.intent };
|
|
11275
11461
|
return out;
|
|
11276
11462
|
}
|
|
11277
11463
|
/**
|
|
@@ -11361,7 +11547,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11361
11547
|
const textEnv = this.textEnv();
|
|
11362
11548
|
const walk = (layers) => layers.map((l) => {
|
|
11363
11549
|
let next2 = l;
|
|
11364
|
-
if (_optionalChain([l, 'access',
|
|
11550
|
+
if (_optionalChain([l, 'access', _456 => _456.effects, 'optionalAccess', _457 => _457.items, 'access', _458 => _458.length])) next2 = { ...next2, effects: convertColorFields(l.effects, hex) };
|
|
11365
11551
|
if (l.type === "group") {
|
|
11366
11552
|
if (next2 !== l) converted.push(l.id);
|
|
11367
11553
|
return { ...next2, children: walk(l.children) };
|
|
@@ -11375,7 +11561,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11375
11561
|
const recoloured = { ...next2, runs: convertColorFields(l.runs, hex) };
|
|
11376
11562
|
try {
|
|
11377
11563
|
next2 = _chunkS55JFWDAcjs.rerenderText.call(void 0, recoloured, textEnv);
|
|
11378
|
-
} catch (
|
|
11564
|
+
} catch (e35) {
|
|
11379
11565
|
next2 = { ...recoloured, surface: convertSurfaceColors(l.surface, t) };
|
|
11380
11566
|
}
|
|
11381
11567
|
} else if (l.type === "annotation") next2 = { ...next2, annotation: convertColorFields(l.annotation, hex) };
|
|
@@ -11549,8 +11735,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
11549
11735
|
else delete s.bitDepth;
|
|
11550
11736
|
delete s.colorProfile;
|
|
11551
11737
|
delete s.colorMode;
|
|
11552
|
-
if (_optionalChain([result, 'access',
|
|
11553
|
-
else if (_optionalChain([result, 'access',
|
|
11738
|
+
if (_optionalChain([result, 'access', _459 => _459.sourceMode, 'optionalAccess', _460 => _460.mode]) === "cmyk") s.colorMode = { mode: "cmyk", profile: result.sourceMode.profile, intent: "relative" };
|
|
11739
|
+
else if (_optionalChain([result, 'access', _461 => _461.sourceMode, 'optionalAccess', _462 => _462.mode]) === "lab") s.colorMode = { mode: "lab" };
|
|
11554
11740
|
else if (result.iccProfile) {
|
|
11555
11741
|
try {
|
|
11556
11742
|
const doc = documentProfile(result.iccProfile);
|
|
@@ -11614,7 +11800,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11614
11800
|
const compositor = new (0, _chunkS55JFWDAcjs.LayerCompositor)();
|
|
11615
11801
|
const bakeMask = (layer) => {
|
|
11616
11802
|
const mask = layer.mask;
|
|
11617
|
-
if (!_optionalChain([mask, 'optionalAccess',
|
|
11803
|
+
if (!_optionalChain([mask, 'optionalAccess', _463 => _463.source])) return mask;
|
|
11618
11804
|
add2("Parametric (depth) masks were baked into pixel masks", layer.name);
|
|
11619
11805
|
const plain3 = { ...layer, mask: { ...mask, density: 1, feather: 0, enabled: true } };
|
|
11620
11806
|
const ox = layer.type === "pixel" ? layer.offset.x : 0;
|
|
@@ -11630,10 +11816,10 @@ var ImageEditorController = (_class12 = class {
|
|
|
11630
11816
|
return baked;
|
|
11631
11817
|
};
|
|
11632
11818
|
const prepare = async (layer) => {
|
|
11633
|
-
if (_optionalChain([layer, 'access',
|
|
11819
|
+
if (_optionalChain([layer, 'access', _464 => _464.edge, 'optionalAccess', _465 => _465.ambient])) add2("The live edge cast (set_edge_ambient) has no PSD equivalent and was left out", layer.name);
|
|
11634
11820
|
const p = await prepareLayer(layer);
|
|
11635
|
-
if (_optionalChain([p, 'optionalAccess',
|
|
11636
|
-
if (_optionalChain([p, 'optionalAccess',
|
|
11821
|
+
if (_optionalChain([p, 'optionalAccess', _466 => _466.edge])) delete p.edge;
|
|
11822
|
+
if (_optionalChain([p, 'optionalAccess', _467 => _467.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
|
|
11637
11823
|
return p;
|
|
11638
11824
|
};
|
|
11639
11825
|
const prepareLayer = async (layer) => {
|
|
@@ -11676,7 +11862,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11676
11862
|
return out2;
|
|
11677
11863
|
}
|
|
11678
11864
|
if (layer.type === "shape" || layer.type === "type") {
|
|
11679
|
-
if (layer.type === "type" && _optionalChain([layer, 'access',
|
|
11865
|
+
if (layer.type === "type" && _optionalChain([layer, 'access', _468 => _468.missingFonts, 'optionalAccess', _469 => _469.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);
|
|
11680
11866
|
const out2 = { ...layer };
|
|
11681
11867
|
const mask2 = bakeMask(layer);
|
|
11682
11868
|
if (mask2) out2.mask = mask2;
|
|
@@ -11695,7 +11881,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11695
11881
|
out.surface = this.surfaceOf(layer);
|
|
11696
11882
|
delete out.source;
|
|
11697
11883
|
}
|
|
11698
|
-
const active = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
11884
|
+
const active = _nullishCoalesce(_optionalChain([layer, 'access', _470 => _470.filters, 'optionalAccess', _471 => _471.filter, 'call', _472 => _472(_chunkS55JFWDAcjs.isActiveFilter)]), () => ( []));
|
|
11699
11885
|
if (active.length) {
|
|
11700
11886
|
add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
|
|
11701
11887
|
const content = { ...out, visible: true, opacity: 1, blend: "normal" };
|
|
@@ -11706,7 +11892,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11706
11892
|
const data = compositor.composite([content], canvas, sources);
|
|
11707
11893
|
out = { ...out, surface: _chunk474IQG74cjs.surfaceFromPixels.call(void 0, { width, height, data }, 4, -layer.offset.x, -layer.offset.y) };
|
|
11708
11894
|
}
|
|
11709
|
-
if (_optionalChain([layer, 'access',
|
|
11895
|
+
if (_optionalChain([layer, 'access', _473 => _473.filters, 'optionalAccess', _474 => _474.some, 'call', _475 => _475((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
|
|
11710
11896
|
delete out.filters;
|
|
11711
11897
|
const unmixMask = _chunkS55JFWDAcjs.hasEdgeUnmix.call(void 0, layer.edge) ? _chunkS55JFWDAcjs.effectiveLayerMask.call(void 0, layer, width, height) : void 0;
|
|
11712
11898
|
if (unmixMask && !unmixMask.source && unmixMask.enabled !== false) {
|
|
@@ -11778,7 +11964,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11778
11964
|
);
|
|
11779
11965
|
}
|
|
11780
11966
|
layers = resizeLegacyMasks(layers, prev, next.dimensions);
|
|
11781
|
-
const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
11967
|
+
const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access', _476 => _476.state, 'access', _477 => _477.patterns, 'optionalAccess', _478 => _478.find, 'call', _479 => _479((p) => p.id === pid)]), () => ( null)) };
|
|
11782
11968
|
for (const l of _chunkB46UQUDCcjs.flattenLayers.call(void 0, layers)) {
|
|
11783
11969
|
if (l.type === "annotation") {
|
|
11784
11970
|
layers = _chunkB46UQUDCcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, annotation: scaleAnnotation(l.annotation, sx, sy) }));
|
|
@@ -11787,7 +11973,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11787
11973
|
const scaled = a ? scaleAnnotation(a, sx, sy) : null;
|
|
11788
11974
|
const fromAnnotation = scaled ? _chunkS55JFWDAcjs.shapeFromAnnotation.call(void 0, scaled) : null;
|
|
11789
11975
|
const m = [sx, 0, 0, sy, 0, 0];
|
|
11790
|
-
const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess',
|
|
11976
|
+
const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _480 => _480.components]), () => ( _chunkS55JFWDAcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
|
|
11791
11977
|
const moved = { ...l, components, ...fromAnnotation ? { fill: fromAnnotation.fill, stroke: fromAnnotation.stroke } : {} };
|
|
11792
11978
|
if (scaled && fromAnnotation) moved.annotation = scaled;
|
|
11793
11979
|
else delete moved.annotation;
|
|
@@ -11805,7 +11991,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11805
11991
|
this.notify();
|
|
11806
11992
|
}
|
|
11807
11993
|
toJSON(options) {
|
|
11808
|
-
const root = _optionalChain([this, 'access',
|
|
11994
|
+
const root = _optionalChain([this, 'access', _481 => _481.contentsStack, 'access', _482 => _482[0], 'optionalAccess', _483 => _483.saved]);
|
|
11809
11995
|
const current = this.state;
|
|
11810
11996
|
const element = this.imageElement;
|
|
11811
11997
|
if (root) {
|
|
@@ -11816,9 +12002,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
11816
12002
|
let out;
|
|
11817
12003
|
try {
|
|
11818
12004
|
out = this.serializeState();
|
|
11819
|
-
if (_optionalChain([this, 'access',
|
|
11820
|
-
if (_optionalChain([this, 'access',
|
|
11821
|
-
if (_optionalChain([this, 'access',
|
|
12005
|
+
if (_optionalChain([this, 'access', _484 => _484.state, 'access', _485 => _485.selection, 'optionalAccess', _486 => _486.bounds])) out.selection = _chunkSS53NNZOcjs.serializeSelection.call(void 0, this.state.selection);
|
|
12006
|
+
if (_optionalChain([this, 'access', _487 => _487.state, 'access', _488 => _488.channels, 'optionalAccess', _489 => _489.length])) out.channels = serializeChannels(this.state.channels);
|
|
12007
|
+
if (_optionalChain([this, 'access', _490 => _490.state, 'access', _491 => _491.paths, 'optionalAccess', _492 => _492.length])) out.paths = serializePaths(this.state.paths);
|
|
11822
12008
|
} finally {
|
|
11823
12009
|
if (root) {
|
|
11824
12010
|
this.state = current;
|
|
@@ -11853,7 +12039,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11853
12039
|
if (data.selection) {
|
|
11854
12040
|
try {
|
|
11855
12041
|
selection = normalizeSelection(_chunkSS53NNZOcjs.deserializeSelection.call(void 0, data.selection));
|
|
11856
|
-
} catch (
|
|
12042
|
+
} catch (e36) {
|
|
11857
12043
|
selection = null;
|
|
11858
12044
|
}
|
|
11859
12045
|
}
|
|
@@ -11871,7 +12057,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11871
12057
|
this.notify();
|
|
11872
12058
|
}
|
|
11873
12059
|
/** Problems found by the last `loadJSON` / `initialState` of a v3 document (unreadable layers or assets). */
|
|
11874
|
-
|
|
12060
|
+
__init104() {this.lastLoadProblems = []}
|
|
11875
12061
|
applyStored(raw) {
|
|
11876
12062
|
const s = this.state;
|
|
11877
12063
|
const data = migrateSerializedImageEditorState(raw);
|
|
@@ -11936,10 +12122,10 @@ var ImageEditorController = (_class12 = class {
|
|
|
11936
12122
|
serializeState() {
|
|
11937
12123
|
const { width, height } = this.naturalSize;
|
|
11938
12124
|
const view = _chunkS55JFWDAcjs.legacyView.call(void 0, this.stack(), width, height, null);
|
|
11939
|
-
if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access',
|
|
12125
|
+
if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _493 => _493.state, 'access', _494 => _494.patterns, 'optionalAccess', _495 => _495.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
|
|
11940
12126
|
return {
|
|
11941
12127
|
// States without adjustment layers keep schema 1, so they round-trip unchanged.
|
|
11942
|
-
version: _optionalChain([view, 'access',
|
|
12128
|
+
version: _optionalChain([view, 'access', _496 => _496.adjustments, 'access', _497 => _497.layers, 'optionalAccess', _498 => _498.length]) ? 2 : 1,
|
|
11943
12129
|
crop: this.state.crop ? { ...this.state.crop } : null,
|
|
11944
12130
|
transform: { ...this.state.transform },
|
|
11945
12131
|
adjustments: serializeAdjustments(view.adjustments),
|
|
@@ -11964,7 +12150,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11964
12150
|
};
|
|
11965
12151
|
if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
|
|
11966
12152
|
if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
|
|
11967
|
-
if (_optionalChain([this, 'access',
|
|
12153
|
+
if (_optionalChain([this, 'access', _499 => _499.state, 'access', _500 => _500.patterns, 'optionalAccess', _501 => _501.length])) out.patterns = _chunkS55JFWDAcjs.serializePatterns.call(void 0, this.state.patterns);
|
|
11968
12154
|
if (smartContents) out.smartContents = smartContents;
|
|
11969
12155
|
if (this.state.bitDepth === 16 || this.state.bitDepth === 32) out.bitDepth = this.state.bitDepth;
|
|
11970
12156
|
if (this.state.colorProfile) out.colorProfile = serializeColorProfile(this.state.colorProfile);
|
|
@@ -11974,7 +12160,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11974
12160
|
}, _class12);
|
|
11975
12161
|
function serializeAdjustments(adjustments) {
|
|
11976
12162
|
const out = { ...adjustments };
|
|
11977
|
-
if (_optionalChain([out, 'access',
|
|
12163
|
+
if (_optionalChain([out, 'access', _502 => _502.layers, 'optionalAccess', _503 => _503.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
|
|
11978
12164
|
else delete out.layers;
|
|
11979
12165
|
if (_chunkS55JFWDAcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkS55JFWDAcjs.LEGACY_PROCESS_VERSION) {
|
|
11980
12166
|
delete out.process;
|
|
@@ -12010,11 +12196,11 @@ function withDevelop(layer, partial) {
|
|
|
12010
12196
|
return { ...layer, filters };
|
|
12011
12197
|
}
|
|
12012
12198
|
function withBlur(layer, radius) {
|
|
12013
|
-
const existing = _optionalChain([layer, 'access',
|
|
12199
|
+
const existing = _optionalChain([layer, 'access', _504 => _504.filters, 'optionalAccess', _505 => _505.find, 'call', _506 => _506((f) => f.kind === "blur")]);
|
|
12014
12200
|
const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
|
|
12015
12201
|
if (radius > 0) {
|
|
12016
12202
|
filters.push({
|
|
12017
|
-
id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess',
|
|
12203
|
+
id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _507 => _507.id]), () => ( (layer.source === "document" ? _chunkS55JFWDAcjs.BLUR_FILTER_ID : _chunkS55JFWDAcjs.newLayerId.call(void 0, "flt")))),
|
|
12018
12204
|
kind: "blur",
|
|
12019
12205
|
enabled: true,
|
|
12020
12206
|
radius
|
|
@@ -12110,7 +12296,7 @@ function collectStateTiles(layers, into) {
|
|
|
12110
12296
|
if (l.type === "shape" || l.type === "type") _chunk474IQG74cjs.collectTiles.call(void 0, l.surface, into);
|
|
12111
12297
|
if (l.type === "smart") {
|
|
12112
12298
|
_chunk474IQG74cjs.collectTiles.call(void 0, l.surface, into);
|
|
12113
|
-
if (_optionalChain([l, 'access',
|
|
12299
|
+
if (_optionalChain([l, 'access', _508 => _508.smartFilters, 'optionalAccess', _509 => _509.mask])) _chunk474IQG74cjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
|
|
12114
12300
|
if (l.contents.raster) _chunk474IQG74cjs.collectTiles.call(void 0, l.contents.raster, into);
|
|
12115
12301
|
if (l.contents.document) collectStateTiles(l.contents.document.layers, into);
|
|
12116
12302
|
}
|
|
@@ -12142,7 +12328,7 @@ function pixelsOnly(layers) {
|
|
|
12142
12328
|
for (const l of layers) {
|
|
12143
12329
|
if (l.type === "adjustment") continue;
|
|
12144
12330
|
if (l.type === "group") out.push({ ...l, children: pixelsOnly(l.children) });
|
|
12145
|
-
else if (l.type === "pixel" && _optionalChain([l, 'access',
|
|
12331
|
+
else if (l.type === "pixel" && _optionalChain([l, 'access', _510 => _510.filters, 'optionalAccess', _511 => _511.length])) {
|
|
12146
12332
|
const p = { ...l };
|
|
12147
12333
|
delete p.filters;
|
|
12148
12334
|
out.push(p);
|
|
@@ -12208,7 +12394,7 @@ function toHex(c) {
|
|
|
12208
12394
|
return "#" + [c[0], c[1], c[2]].map((v) => Math.round(v).toString(16).padStart(2, "0")).join("");
|
|
12209
12395
|
}
|
|
12210
12396
|
function normalizeSelection(mask) {
|
|
12211
|
-
return _optionalChain([mask, 'optionalAccess',
|
|
12397
|
+
return _optionalChain([mask, 'optionalAccess', _512 => _512.bounds]) ? mask : null;
|
|
12212
12398
|
}
|
|
12213
12399
|
function sameSelection(a, b) {
|
|
12214
12400
|
if (a.width !== b.width || a.height !== b.height) return false;
|
|
@@ -12362,7 +12548,7 @@ function loadImageEditorDocument(input) {
|
|
|
12362
12548
|
if (typeof input === "string") {
|
|
12363
12549
|
try {
|
|
12364
12550
|
parsed = JSON.parse(input);
|
|
12365
|
-
} catch (
|
|
12551
|
+
} catch (e37) {
|
|
12366
12552
|
parsed = input;
|
|
12367
12553
|
}
|
|
12368
12554
|
}
|
|
@@ -12418,7 +12604,7 @@ function loadImageEditorDocument(input) {
|
|
|
12418
12604
|
}
|
|
12419
12605
|
const state = { version: 1, ...result.value };
|
|
12420
12606
|
if (isV2) {
|
|
12421
|
-
if (_optionalChain([state, 'access',
|
|
12607
|
+
if (_optionalChain([state, 'access', _513 => _513.adjustments, 'access', _514 => _514.layers, 'optionalAccess', _515 => _515.length])) state.version = 2;
|
|
12422
12608
|
result.report.version = 2;
|
|
12423
12609
|
}
|
|
12424
12610
|
if (state.selection === void 0) delete state.selection;
|
|
@@ -12626,7 +12812,7 @@ function findAdjustmentControl(id) {
|
|
|
12626
12812
|
}
|
|
12627
12813
|
function findLayerControl(kind, id) {
|
|
12628
12814
|
if (id === "opacity") return ADJUSTMENT_LAYER_OPACITY_CONTROL;
|
|
12629
|
-
return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access',
|
|
12815
|
+
return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _516 => _516[kind], 'optionalAccess', _517 => _517.find, 'call', _518 => _518((c) => c.id === id)]);
|
|
12630
12816
|
}
|
|
12631
12817
|
function clampControlValue(spec, v) {
|
|
12632
12818
|
if (typeof v !== "number" || !Number.isFinite(v)) return spec.default;
|
|
@@ -13103,7 +13289,7 @@ function summary(controller) {
|
|
|
13103
13289
|
const area = _chunkSS53NNZOcjs.selectionArea.call(void 0, sel);
|
|
13104
13290
|
return {
|
|
13105
13291
|
empty: !sel,
|
|
13106
|
-
bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
13292
|
+
bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _519 => _519.bounds]), () => ( null)),
|
|
13107
13293
|
/** Σ coverage in pixels. */
|
|
13108
13294
|
area: Math.round(area),
|
|
13109
13295
|
percent: Math.round(area / Math.max(1, width * height) * 1e4) / 100,
|
|
@@ -13146,6 +13332,65 @@ function createImageSelectionTools(controller) {
|
|
|
13146
13332
|
return controller.inspectMaskEdge(t, { layerId, minArea });
|
|
13147
13333
|
}
|
|
13148
13334
|
};
|
|
13335
|
+
const sourceSchema = (which, dflt) => ({
|
|
13336
|
+
type: "object",
|
|
13337
|
+
properties: {
|
|
13338
|
+
source: { type: "string", enum: ["selection", "history", "channel", "layer-mask", "vector-mask"], description: "selection: the current one; history: as it was steps undo steps ago; channel: a saved selection (channelId, see list_channels); layer-mask / vector-mask: a layer's mask (layerId)." },
|
|
13339
|
+
steps: { type: "integer", minimum: 1, description: "history only: how many undo steps back (default 1, before the last edit)." },
|
|
13340
|
+
channelId: { type: "string", description: "channel only: the channel id from list_channels." },
|
|
13341
|
+
layerId: { type: "string", description: "layer-mask and vector-mask only: the layer id from list_layers." }
|
|
13342
|
+
},
|
|
13343
|
+
required: ["source"],
|
|
13344
|
+
additionalProperties: false,
|
|
13345
|
+
description: `${which} (default ${dflt}).`
|
|
13346
|
+
});
|
|
13347
|
+
const toSource = (v, fallback) => {
|
|
13348
|
+
if (v === void 0) return fallback;
|
|
13349
|
+
const o = v;
|
|
13350
|
+
const extra = (keys) => {
|
|
13351
|
+
const bad = Object.keys(o).filter((k) => k !== "source" && !keys.includes(k));
|
|
13352
|
+
if (bad.length) throw new Error(`${bad.join(", ")} ${bad.length === 1 ? "does" : "do"} not apply to source ${o.source}.`);
|
|
13353
|
+
};
|
|
13354
|
+
switch (o.source) {
|
|
13355
|
+
case "selection":
|
|
13356
|
+
extra([]);
|
|
13357
|
+
return { kind: "selection" };
|
|
13358
|
+
case "history":
|
|
13359
|
+
extra(["steps"]);
|
|
13360
|
+
return { kind: "history", steps: _nullishCoalesce(o.steps, () => ( 1)) };
|
|
13361
|
+
case "channel":
|
|
13362
|
+
extra(["channelId"]);
|
|
13363
|
+
if (!o.channelId) throw new Error("source channel needs channelId (see list_channels).");
|
|
13364
|
+
return { kind: "channel", channelId: o.channelId };
|
|
13365
|
+
case "layer-mask":
|
|
13366
|
+
case "vector-mask":
|
|
13367
|
+
extra(["layerId"]);
|
|
13368
|
+
if (!o.layerId) throw new Error(`source ${o.source} needs layerId (see list_layers).`);
|
|
13369
|
+
return { kind: o.source, layerId: o.layerId };
|
|
13370
|
+
default:
|
|
13371
|
+
throw new Error(`Unknown source "${String(o.source)}". Use selection, history, channel, layer-mask or vector-mask.`);
|
|
13372
|
+
}
|
|
13373
|
+
};
|
|
13374
|
+
const compareTool = {
|
|
13375
|
+
name: "compare_selections",
|
|
13376
|
+
title: "Compare two selections",
|
|
13377
|
+
description: "Shows what changed between two selections, to check that a modify, refine or select step did what you meant. a (default: the selection before the last undo step) and b (default: the current selection) can each be the current selection, a history step, a saved channel or a layer's mask. Returns a and b (area, bounds), added and removed (area in pixels, count and the 10 largest pieces with bounds, ready for capture_view), iou 0-1, coverageChange (pixels of coverage changed, counting edges that only softened) and identical. With show (default true) the canvas tints added area green and removed red until the selection next changes (view only, no undo step).",
|
|
13378
|
+
inputSchema: {
|
|
13379
|
+
type: "object",
|
|
13380
|
+
properties: {
|
|
13381
|
+
a: sourceSchema("The selection before", "history, 1 step back"),
|
|
13382
|
+
b: sourceSchema("The selection after", "the current selection"),
|
|
13383
|
+
minArea: { type: "number", minimum: 1, maximum: 1e6, description: "Pieces smaller than this many pixels are counted but not listed (default 4)." },
|
|
13384
|
+
show: { type: "boolean", description: "Tint the change on the canvas (default true)." }
|
|
13385
|
+
},
|
|
13386
|
+
additionalProperties: false
|
|
13387
|
+
},
|
|
13388
|
+
annotations: { title: "Compare two selections", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
13389
|
+
handler: ({ a, b, minArea, show }) => controller.compareSelections(toSource(a, { kind: "history", steps: 1 }), toSource(b, { kind: "selection" }), {
|
|
13390
|
+
...minArea !== void 0 ? { minArea } : {},
|
|
13391
|
+
show: show !== false
|
|
13392
|
+
})
|
|
13393
|
+
};
|
|
13149
13394
|
const selectRegion = {
|
|
13150
13395
|
name: "select_region",
|
|
13151
13396
|
title: "Select a region",
|
|
@@ -13199,7 +13444,7 @@ function createImageSelectionTools(controller) {
|
|
|
13199
13444
|
break;
|
|
13200
13445
|
}
|
|
13201
13446
|
case "polygon": {
|
|
13202
|
-
const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess',
|
|
13447
|
+
const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _520 => _520.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _521 => _521.y]), NaN) })) : [];
|
|
13203
13448
|
if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
|
|
13204
13449
|
throw new Error("polygon needs points: at least 3 { x, y } vertices.");
|
|
13205
13450
|
}
|
|
@@ -13334,7 +13579,7 @@ function createImageSelectionTools(controller) {
|
|
|
13334
13579
|
},
|
|
13335
13580
|
annotations: writeAnnotations("Refine the selection edge"),
|
|
13336
13581
|
handler: async (params) => {
|
|
13337
|
-
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',
|
|
13582
|
+
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', _522 => _522.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _523 => _523.y]), NaN) })) }) : [];
|
|
13338
13583
|
for (const e of edits) {
|
|
13339
13584
|
if (e.kind === "object") {
|
|
13340
13585
|
if (!e.rect === !e.point) throw new Error("An object edit takes rect (a box around the object) or point (on it).");
|
|
@@ -13499,7 +13744,7 @@ function createImageSelectionTools(controller) {
|
|
|
13499
13744
|
},
|
|
13500
13745
|
annotations: writeAnnotations("Select a polygon (lasso)", true),
|
|
13501
13746
|
handler: async (args) => {
|
|
13502
|
-
const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess',
|
|
13747
|
+
const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _524 => _524.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _525 => _525.y]), NaN) })) : [];
|
|
13503
13748
|
if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
|
|
13504
13749
|
throw new Error("points needs at least 3 { x, y } vertices in natural image pixels.");
|
|
13505
13750
|
}
|
|
@@ -13536,7 +13781,7 @@ function createImageSelectionTools(controller) {
|
|
|
13536
13781
|
},
|
|
13537
13782
|
annotations: writeAnnotations("Quick Selection"),
|
|
13538
13783
|
handler: async (args, context) => {
|
|
13539
|
-
const strokes = Array.isArray(args.strokes) ? args.strokes.map((s) => Array.isArray(s) ? s.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess',
|
|
13784
|
+
const strokes = Array.isArray(args.strokes) ? args.strokes.map((s) => Array.isArray(s) ? s.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _526 => _526.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _527 => _527.y]), NaN) })) : []) : [];
|
|
13540
13785
|
if (!strokes.length || strokes.some((s) => !s.length || !s.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y)))) {
|
|
13541
13786
|
throw new Error("strokes needs at least one stroke of { x, y } points in natural image pixels.");
|
|
13542
13787
|
}
|
|
@@ -13545,7 +13790,7 @@ function createImageSelectionTools(controller) {
|
|
|
13545
13790
|
mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, args.mode),
|
|
13546
13791
|
sampleAllLayers: args.sampleAllLayers,
|
|
13547
13792
|
enhanceEdge: args.enhanceEdge,
|
|
13548
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
13793
|
+
signal: _optionalChain([context, 'optionalAccess', _528 => _528.signal])
|
|
13549
13794
|
});
|
|
13550
13795
|
return { ...summary(controller), ...uncertainty(controller) };
|
|
13551
13796
|
}
|
|
@@ -13583,7 +13828,7 @@ function createImageSelectionTools(controller) {
|
|
|
13583
13828
|
sampleAllLayers: args.sampleAllLayers,
|
|
13584
13829
|
enhanceEdge: args.enhanceEdge,
|
|
13585
13830
|
useModel: args.useModel,
|
|
13586
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
13831
|
+
signal: _optionalChain([context, 'optionalAccess', _529 => _529.signal])
|
|
13587
13832
|
};
|
|
13588
13833
|
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);
|
|
13589
13834
|
return { ...summary(controller), method, ...uncertainty(controller) };
|
|
@@ -13612,7 +13857,7 @@ function createImageSelectionTools(controller) {
|
|
|
13612
13857
|
softness: args.softness === void 0 ? void 0 : num2(args.softness, 4),
|
|
13613
13858
|
mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, args.mode),
|
|
13614
13859
|
sampleAllLayers: args.sampleAllLayers,
|
|
13615
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
13860
|
+
signal: _optionalChain([context, 'optionalAccess', _530 => _530.signal])
|
|
13616
13861
|
});
|
|
13617
13862
|
return { ...summary(controller), noiseLevel };
|
|
13618
13863
|
}
|
|
@@ -13640,7 +13885,7 @@ function createImageSelectionTools(controller) {
|
|
|
13640
13885
|
mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, args.mode),
|
|
13641
13886
|
sampleAllLayers: args.sampleAllLayers,
|
|
13642
13887
|
useModel: args.useModel,
|
|
13643
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
13888
|
+
signal: _optionalChain([context, 'optionalAccess', _531 => _531.signal])
|
|
13644
13889
|
});
|
|
13645
13890
|
return { ...summary(controller), method, ...note ? { note } : {}, ...uncertainty(controller) };
|
|
13646
13891
|
}
|
|
@@ -13738,7 +13983,7 @@ function createImageSelectionTools(controller) {
|
|
|
13738
13983
|
await controller.selectColorRangePreset(args.preset, { ...common, falloff: num2(args.fuzziness, 20) });
|
|
13739
13984
|
} else {
|
|
13740
13985
|
const samples = args.samples.map((s, i) => {
|
|
13741
|
-
if (typeof _optionalChain([s, 'optionalAccess',
|
|
13986
|
+
if (typeof _optionalChain([s, 'optionalAccess', _532 => _532.color]) !== "string" || !/^#?[0-9a-f]{6}$/i.test(s.color.trim())) throw new Error(`samples[${i}].color must be #rrggbb.`);
|
|
13742
13987
|
const at = typeof s.x === "number" && typeof s.y === "number" ? { x: s.x, y: s.y } : void 0;
|
|
13743
13988
|
return at ? { color: s.color, at } : { color: s.color };
|
|
13744
13989
|
});
|
|
@@ -13980,7 +14225,7 @@ function createImageSelectionTools(controller) {
|
|
|
13980
14225
|
annotations: writeAnnotations("Content-Aware Fill"),
|
|
13981
14226
|
handler: async (args, context) => {
|
|
13982
14227
|
if (!controller.getSelection()) throw new Error("Nothing is selected; select what to remove first.");
|
|
13983
|
-
const rects = (v) => Array.isArray(v) ? v.map((r) => ({ x: num2(_optionalChain([r, 'optionalAccess',
|
|
14228
|
+
const rects = (v) => Array.isArray(v) ? v.map((r) => ({ x: num2(_optionalChain([r, 'optionalAccess', _533 => _533.x]), NaN), y: num2(_optionalChain([r, 'optionalAccess', _534 => _534.y]), NaN), width: num2(_optionalChain([r, 'optionalAccess', _535 => _535.width]), NaN), height: num2(_optionalChain([r, 'optionalAccess', _536 => _536.height]), NaN) })) : void 0;
|
|
13984
14229
|
return controller.contentAwareFillAsync({
|
|
13985
14230
|
output: args.output,
|
|
13986
14231
|
sampleRadius: args.sampleRadius,
|
|
@@ -13989,7 +14234,7 @@ function createImageSelectionTools(controller) {
|
|
|
13989
14234
|
sampleRects: rects(args.sampleRects),
|
|
13990
14235
|
excludeRects: rects(args.excludeRects),
|
|
13991
14236
|
samplingChannelId: typeof args.samplingChannelId === "string" ? args.samplingChannelId : void 0,
|
|
13992
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
14237
|
+
signal: _optionalChain([context, 'optionalAccess', _537 => _537.signal])
|
|
13993
14238
|
});
|
|
13994
14239
|
}
|
|
13995
14240
|
};
|
|
@@ -14200,6 +14445,7 @@ function createImageSelectionTools(controller) {
|
|
|
14200
14445
|
return [
|
|
14201
14446
|
getSelection,
|
|
14202
14447
|
inspectEdge,
|
|
14448
|
+
compareTool,
|
|
14203
14449
|
selectAll,
|
|
14204
14450
|
deselect,
|
|
14205
14451
|
invert2,
|
|
@@ -14268,13 +14514,13 @@ function createImageSubjectSelectionTool(controller) {
|
|
|
14268
14514
|
handler: async ({ target, maxSegments, mode, feather, enhanceEdge }, context) => {
|
|
14269
14515
|
if (target !== void 0 && typeof target !== "string") throw new Error("target must be a description in words.");
|
|
14270
14516
|
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).");
|
|
14271
|
-
const perform = _optionalChain([context, 'optionalAccess',
|
|
14517
|
+
const perform = _optionalChain([context, 'optionalAccess', _538 => _538.perform]);
|
|
14272
14518
|
const { segments, method, note } = await controller.selectSubject(String(_nullishCoalesce(target, () => ( ""))), {
|
|
14273
14519
|
mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, mode),
|
|
14274
14520
|
feather: num2(feather, 0),
|
|
14275
14521
|
maxSegments: typeof maxSegments === "number" ? Math.max(1, Math.round(maxSegments)) : void 0,
|
|
14276
14522
|
enhanceEdge: enhanceEdge === true,
|
|
14277
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
14523
|
+
signal: _optionalChain([context, 'optionalAccess', _539 => _539.signal]),
|
|
14278
14524
|
// Under playback the cursor traces what the model found, as a lasso, before it is selected.
|
|
14279
14525
|
beforeApply: perform ? (outlines) => perform(planOutlineTrace(outlines)) : void 0
|
|
14280
14526
|
});
|
|
@@ -14352,7 +14598,7 @@ async function renderImageRegion(controller, request) {
|
|
|
14352
14598
|
const maskView = maskViewCanvas(controller, document);
|
|
14353
14599
|
if (maskView) context.drawImage(maskView, rect2.x, rect2.y, rect2.width, rect2.height, 0, 0, out.width, out.height);
|
|
14354
14600
|
const selection = state.selection;
|
|
14355
|
-
if (_optionalChain([selection, 'optionalAccess',
|
|
14601
|
+
if (_optionalChain([selection, 'optionalAccess', _540 => _540.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
|
|
14356
14602
|
const shade = selectionShade(selection, document);
|
|
14357
14603
|
if (shade) context.drawImage(shade, rect2.x, rect2.y, rect2.width, rect2.height, 0, 0, out.width, out.height);
|
|
14358
14604
|
}
|
|
@@ -14377,7 +14623,7 @@ function createImageCaptureSurface(controller) {
|
|
|
14377
14623
|
return {
|
|
14378
14624
|
units: "image pixels",
|
|
14379
14625
|
content: whole,
|
|
14380
|
-
selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access',
|
|
14626
|
+
selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _541 => _541.getState, 'call', _542 => _542(), 'access', _543 => _543.selection, 'optionalAccess', _544 => _544.bounds]), () => ( null)) }),
|
|
14381
14627
|
overlays: "a shade over unselected pixels, the crop box outline and a layer mask view (set_mask_view)",
|
|
14382
14628
|
maxScale: 8,
|
|
14383
14629
|
render: (request) => renderImageRegion(controller, request)
|
|
@@ -14711,7 +14957,7 @@ function describeLayer(layer, activeId, boundsOf) {
|
|
|
14711
14957
|
out.bounds = boundsOf(layer);
|
|
14712
14958
|
out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
|
|
14713
14959
|
out.shape = {
|
|
14714
|
-
components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access',
|
|
14960
|
+
components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _545 => _545.live, 'optionalAccess', _546 => _546.kind]), () => ( "path")) })),
|
|
14715
14961
|
fill: layer.fill ? layer.fill.type : null,
|
|
14716
14962
|
stroke: layer.stroke ? { width: layer.stroke.width, paint: layer.stroke.paint.type } : null
|
|
14717
14963
|
};
|
|
@@ -14734,8 +14980,8 @@ function describeLayer(layer, activeId, boundsOf) {
|
|
|
14734
14980
|
out.bounds = boundsOf(layer);
|
|
14735
14981
|
out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
|
|
14736
14982
|
out.contents = { id: layer.contents.id, name: layer.contents.name, kind: layer.contents.kind, width: layer.contents.width, height: layer.contents.height };
|
|
14737
|
-
out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access',
|
|
14738
|
-
out.filterMask = maskSummary(_optionalChain([layer, 'access',
|
|
14983
|
+
out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _547 => _547.smartFilters, 'optionalAccess', _548 => _548.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
|
|
14984
|
+
out.filterMask = maskSummary(_optionalChain([layer, 'access', _549 => _549.smartFilters, 'optionalAccess', _550 => _550.mask]));
|
|
14739
14985
|
break;
|
|
14740
14986
|
}
|
|
14741
14987
|
return out;
|
|
@@ -14763,7 +15009,7 @@ function createImageLayerTools(controller) {
|
|
|
14763
15009
|
if (!loc) return null;
|
|
14764
15010
|
return {
|
|
14765
15011
|
...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)),
|
|
14766
|
-
parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
15012
|
+
parentId: _nullishCoalesce(_optionalChain([loc, 'access', _551 => _551.parent, 'optionalAccess', _552 => _552.id]), () => ( null)),
|
|
14767
15013
|
index: loc.index
|
|
14768
15014
|
};
|
|
14769
15015
|
};
|
|
@@ -15086,7 +15332,7 @@ function createImageLayerTools(controller) {
|
|
|
15086
15332
|
if (view !== "gray" && view !== "overlay" && view !== "off") throw new Error(`Unknown view "${String(view)}". Use gray, overlay or off.`);
|
|
15087
15333
|
const id = view === "off" || layerId === void 0 ? void 0 : exists(layerId);
|
|
15088
15334
|
const shown = controller.setMaskView(view, id);
|
|
15089
|
-
return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess',
|
|
15335
|
+
return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _553 => _553.mode]), () => ( "off")), layerId: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _554 => _554.layerId]), () => ( null)) };
|
|
15090
15336
|
}
|
|
15091
15337
|
};
|
|
15092
15338
|
const AMOUNT = (what) => ({ type: "number", minimum: 0, maximum: 100, description: `${what}, in percent 0-100; 0 turns it off.` });
|
|
@@ -15627,29 +15873,29 @@ function snapTo45(from, point) {
|
|
|
15627
15873
|
return { x: from.x + Math.cos(a) * len, y: from.y + Math.sin(a) * len };
|
|
15628
15874
|
}
|
|
15629
15875
|
var SelectionGesture = (_class13 = class {
|
|
15630
|
-
constructor(controller, getOptions) {;_class13.prototype.
|
|
15876
|
+
constructor(controller, getOptions) {;_class13.prototype.__init105.call(this);_class13.prototype.__init106.call(this);_class13.prototype.__init107.call(this);_class13.prototype.__init108.call(this);_class13.prototype.__init109.call(this);_class13.prototype.__init110.call(this);_class13.prototype.__init111.call(this);_class13.prototype.__init112.call(this);_class13.prototype.__init113.call(this);_class13.prototype.__init114.call(this);_class13.prototype.__init115.call(this);_class13.prototype.__init116.call(this);_class13.prototype.__init117.call(this);
|
|
15631
15877
|
this.controller = controller;
|
|
15632
15878
|
this.getOptions = getOptions;
|
|
15633
15879
|
}
|
|
15634
15880
|
|
|
15635
15881
|
|
|
15636
|
-
|
|
15637
|
-
|
|
15638
|
-
|
|
15639
|
-
|
|
15882
|
+
__init105() {this.start = null}
|
|
15883
|
+
__init106() {this.points = []}
|
|
15884
|
+
__init107() {this.current = null}
|
|
15885
|
+
__init108() {this.modifiers = {}}
|
|
15640
15886
|
/** Polygonal lasso corners while one is being drawn. */
|
|
15641
|
-
|
|
15642
|
-
|
|
15643
|
-
|
|
15644
|
-
|
|
15887
|
+
__init109() {this.polygon = null}
|
|
15888
|
+
__init110() {this.pressedAt = null}
|
|
15889
|
+
__init111() {this.freehand = false}
|
|
15890
|
+
__init112() {this.magnetic = null}
|
|
15645
15891
|
/** A click this close to the first corner (natural pixels) closes a polygonal lasso. */
|
|
15646
|
-
|
|
15892
|
+
__init113() {this.closeRadius = 8}
|
|
15647
15893
|
/** The last error (e.g. pixels unavailable for the wand), for the UI to show. */
|
|
15648
|
-
|
|
15649
|
-
|
|
15894
|
+
__init114() {this.error = null}
|
|
15895
|
+
__init115() {this.pending = Promise.resolve()}
|
|
15650
15896
|
/** Quick Selection while dragging: the selection before the stroke, how the stroke combines, the pixels. */
|
|
15651
|
-
|
|
15652
|
-
|
|
15897
|
+
__init116() {this.quick = null}
|
|
15898
|
+
__init117() {this.livePreviews = Promise.resolve()}
|
|
15653
15899
|
get active() {
|
|
15654
15900
|
return this.start !== null || this.polygon !== null || this.magnetic !== null;
|
|
15655
15901
|
}
|
|
@@ -15685,12 +15931,12 @@ var SelectionGesture = (_class13 = class {
|
|
|
15685
15931
|
size: _nullishCoalesce(options.quickSize, () => ( 30)),
|
|
15686
15932
|
grow: q.mode === "add",
|
|
15687
15933
|
enhanceEdge: _nullishCoalesce(options.quickEnhance, () => ( false)),
|
|
15688
|
-
selection: q.mode === "add" && _optionalChain([q, 'access',
|
|
15934
|
+
selection: q.mode === "add" && _optionalChain([q, 'access', _555 => _555.base, 'optionalAccess', _556 => _556.bounds]) ? _chunkUC3PWFM3cjs.serializeMask.call(void 0, q.base) : null
|
|
15689
15935
|
},
|
|
15690
15936
|
pixels
|
|
15691
15937
|
);
|
|
15692
15938
|
if (this.quick === q) this.controller.setSelectionPreview(_chunkSS53NNZOcjs.combineSelections.call(void 0, q.base, mask, q.mode));
|
|
15693
|
-
} catch (
|
|
15939
|
+
} catch (e38) {
|
|
15694
15940
|
break;
|
|
15695
15941
|
}
|
|
15696
15942
|
} while (q.dirty && this.quick === q);
|
|
@@ -15896,7 +16142,7 @@ var SelectionGesture = (_class13 = class {
|
|
|
15896
16142
|
this.start = null;
|
|
15897
16143
|
this.current = null;
|
|
15898
16144
|
this.points = [];
|
|
15899
|
-
const strokeMode = _nullishCoalesce(_optionalChain([this, 'access',
|
|
16145
|
+
const strokeMode = _nullishCoalesce(_optionalChain([this, 'access', _557 => _557.quick, 'optionalAccess', _558 => _558.mode]), () => ( (mode === "replace" && this.controller.getSelection() ? "add" : mode)));
|
|
15900
16146
|
this.quick = null;
|
|
15901
16147
|
this.pending = this.controller.quickSelect([stroke], {
|
|
15902
16148
|
size: _nullishCoalesce(options.quickSize, () => ( 30)),
|
|
@@ -16057,7 +16303,7 @@ function handleSelectionShortcut(controller, e, onError) {
|
|
|
16057
16303
|
try {
|
|
16058
16304
|
fn();
|
|
16059
16305
|
} catch (err) {
|
|
16060
|
-
_optionalChain([onError, 'optionalCall',
|
|
16306
|
+
_optionalChain([onError, 'optionalCall', _559 => _559(err instanceof Error ? err.message : String(err))]);
|
|
16061
16307
|
}
|
|
16062
16308
|
return true;
|
|
16063
16309
|
};
|
|
@@ -16072,9 +16318,9 @@ function handleMaskViewKey(controller, e) {
|
|
|
16072
16318
|
if (e.ctrlKey || e.metaKey || e.altKey || e.key !== "\\") return false;
|
|
16073
16319
|
const id = controller.getState().activeLayerId;
|
|
16074
16320
|
const layer = id ? controller.getLayer(id) : null;
|
|
16075
|
-
if (!_optionalChain([layer, 'optionalAccess',
|
|
16321
|
+
if (!_optionalChain([layer, 'optionalAccess', _560 => _560.mask]) || layer.mask.source) return false;
|
|
16076
16322
|
const view = controller.getMaskView();
|
|
16077
|
-
controller.setMaskView(_optionalChain([view, 'optionalAccess',
|
|
16323
|
+
controller.setMaskView(_optionalChain([view, 'optionalAccess', _561 => _561.layerId]) === layer.id && view.mode === "overlay" ? "off" : "overlay", layer.id);
|
|
16078
16324
|
return true;
|
|
16079
16325
|
}
|
|
16080
16326
|
function handleQuickMaskKey(controller, e) {
|
|
@@ -16269,14 +16515,14 @@ function handlePaintShortcut(controller, e) {
|
|
|
16269
16515
|
return false;
|
|
16270
16516
|
}
|
|
16271
16517
|
var PaintGesture = (_class14 = class {
|
|
16272
|
-
constructor(controller) {;_class14.prototype.
|
|
16518
|
+
constructor(controller) {;_class14.prototype.__init118.call(this);_class14.prototype.__init119.call(this);_class14.prototype.__init120.call(this);
|
|
16273
16519
|
this.controller = controller;
|
|
16274
16520
|
}
|
|
16275
16521
|
|
|
16276
|
-
|
|
16277
|
-
|
|
16522
|
+
__init118() {this.stroke = null}
|
|
16523
|
+
__init119() {this.move = null}
|
|
16278
16524
|
/** The last refusal (e.g. "layer is locked"), for the editor to show. */
|
|
16279
|
-
|
|
16525
|
+
__init120() {this.error = null}
|
|
16280
16526
|
get active() {
|
|
16281
16527
|
return Boolean(this.stroke || this.move);
|
|
16282
16528
|
}
|
|
@@ -16288,7 +16534,7 @@ var PaintGesture = (_class14 = class {
|
|
|
16288
16534
|
const layer = this.controller.getActiveLayer();
|
|
16289
16535
|
if (!layer) throw new Error("Select a layer to move in the Layers panel.");
|
|
16290
16536
|
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.`);
|
|
16291
|
-
if (_optionalChain([layer, 'access',
|
|
16537
|
+
if (_optionalChain([layer, 'access', _562 => _562.locks, 'optionalAccess', _563 => _563.all]) || _optionalChain([layer, 'access', _564 => _564.locks, 'optionalAccess', _565 => _565.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
|
|
16292
16538
|
const origin = layer.type === "pixel" ? { ...layer.offset } : layer.type === "smart" ? { ...layer.placement.corners[0] } : (() => {
|
|
16293
16539
|
const b = _chunkS55JFWDAcjs.shapeGeometryBounds.call(void 0, layer);
|
|
16294
16540
|
return b ? { x: b.x, y: b.y } : { x: 0, y: 0 };
|
|
@@ -16345,7 +16591,7 @@ var PaintGesture = (_class14 = class {
|
|
|
16345
16591
|
this.move = null;
|
|
16346
16592
|
}
|
|
16347
16593
|
cancel() {
|
|
16348
|
-
_optionalChain([this, 'access',
|
|
16594
|
+
_optionalChain([this, 'access', _566 => _566.stroke, 'optionalAccess', _567 => _567.cancel, 'call', _568 => _568()]);
|
|
16349
16595
|
this.stroke = null;
|
|
16350
16596
|
this.move = null;
|
|
16351
16597
|
}
|
|
@@ -16580,7 +16826,7 @@ function profileArg(v) {
|
|
|
16580
16826
|
if (s.startsWith("icc:")) {
|
|
16581
16827
|
try {
|
|
16582
16828
|
return _chunkOLNIPTB3cjs.base64ToBytes.call(void 0, s.slice(4));
|
|
16583
|
-
} catch (
|
|
16829
|
+
} catch (e39) {
|
|
16584
16830
|
throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("The icc: value is not valid base64.");
|
|
16585
16831
|
}
|
|
16586
16832
|
}
|
|
@@ -17426,7 +17672,7 @@ function createImageSmartObjectTools(controller) {
|
|
|
17426
17672
|
const layerSummary = (id) => {
|
|
17427
17673
|
const s = controller.getState();
|
|
17428
17674
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, s.layers, id);
|
|
17429
|
-
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
17675
|
+
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _569 => _569.parent, 'optionalAccess', _570 => _570.id]), () => ( null)), index: loc.index } : null;
|
|
17430
17676
|
};
|
|
17431
17677
|
const getSmart = {
|
|
17432
17678
|
name: "get_smart_object",
|
|
@@ -17983,7 +18229,7 @@ function createImageShapeTools(controller) {
|
|
|
17983
18229
|
const layerSummary = (id) => {
|
|
17984
18230
|
const s = controller.getState();
|
|
17985
18231
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, s.layers, id);
|
|
17986
|
-
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
18232
|
+
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _571 => _571.parent, 'optionalAccess', _572 => _572.id]), () => ( null)), index: loc.index } : null;
|
|
17987
18233
|
};
|
|
17988
18234
|
const get = {
|
|
17989
18235
|
name: "get_shape_layer",
|
|
@@ -18214,7 +18460,7 @@ function createImageShapeTools(controller) {
|
|
|
18214
18460
|
const mode = args.mode;
|
|
18215
18461
|
controller.pathToSelection(_nullishCoalesce(fromPathId(args), () => ( pathSpec(args))), { feather: args.feather, antiAlias: args.antiAlias, mode });
|
|
18216
18462
|
const sel = controller.getSelection();
|
|
18217
|
-
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
18463
|
+
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _573 => _573.bounds]), () => ( null)), area: Math.round(sel ? _chunkSS53NNZOcjs.selectionArea.call(void 0, sel) : 0) };
|
|
18218
18464
|
}
|
|
18219
18465
|
};
|
|
18220
18466
|
const getVectorMask = {
|
|
@@ -18246,7 +18492,7 @@ function createImageShapeTools(controller) {
|
|
|
18246
18492
|
handler: (args) => {
|
|
18247
18493
|
const id = layerArg(args.layerId);
|
|
18248
18494
|
const spec = _nullishCoalesce(fromPathId(args), () => ( pathSpec(args)));
|
|
18249
|
-
const hasPath = _optionalChain([spec, 'access',
|
|
18495
|
+
const hasPath = _optionalChain([spec, 'access', _574 => _574.components, 'optionalAccess', _575 => _575.length]) || spec.shape !== void 0 || spec.subpaths !== void 0;
|
|
18250
18496
|
const from = _nullishCoalesce(args.from, () => ( (hasPath ? "path" : "reveal-all")));
|
|
18251
18497
|
if (from !== "selection" && TRACE_KEYS.some((k) => args[k] !== void 0)) throw new Error("tolerance, cornerRoundness and minArea apply only to from selection.");
|
|
18252
18498
|
controller.addVectorMask(id, from, spec, traceOptions(args));
|
|
@@ -18354,7 +18600,7 @@ function createImageShapeTools(controller) {
|
|
|
18354
18600
|
annotations: { title: "Add a document path", ...WRITE8 },
|
|
18355
18601
|
handler: (args) => {
|
|
18356
18602
|
const spec = pathSpec(args);
|
|
18357
|
-
if (!_optionalChain([spec, 'access',
|
|
18603
|
+
if (!_optionalChain([spec, 'access', _576 => _576.components, 'optionalAccess', _577 => _577.length]) && spec.shape === void 0 && spec.subpaths === void 0) throw new Error("Give the path as shape, subpaths or components.");
|
|
18358
18604
|
return { path: pathSummary(controller.addPath({ ...spec, name: args.name }).id) };
|
|
18359
18605
|
}
|
|
18360
18606
|
};
|
|
@@ -18498,7 +18744,7 @@ function createImageTypeTools(controller) {
|
|
|
18498
18744
|
const layerSummary = (id) => {
|
|
18499
18745
|
const s = controller.getState();
|
|
18500
18746
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, s.layers, id);
|
|
18501
|
-
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
18747
|
+
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _578 => _578.parent, 'optionalAccess', _579 => _579.id]), () => ( null)), index: loc.index } : null;
|
|
18502
18748
|
};
|
|
18503
18749
|
const range = (args) => ({ start: args.start, end: args.end });
|
|
18504
18750
|
const listFonts = {
|
|
@@ -18507,7 +18753,7 @@ function createImageTypeTools(controller) {
|
|
|
18507
18753
|
description: "Returns the font families type layers can use here (generic families such as sans-serif always work). Changes nothing.",
|
|
18508
18754
|
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
18509
18755
|
annotations: { title: "List fonts", ...READ11 },
|
|
18510
|
-
handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access',
|
|
18756
|
+
handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _580 => _580.getTextShaper, 'call', _581 => _581(), 'optionalAccess', _582 => _582.id]), () => ( null)) })
|
|
18511
18757
|
};
|
|
18512
18758
|
const get = {
|
|
18513
18759
|
name: "get_text_layer",
|
|
@@ -18663,7 +18909,7 @@ function createImageTypeTools(controller) {
|
|
|
18663
18909
|
const init = pick2(args, ["text", "x", "y", "orientation", "box", "style", "paragraph", "rotation", "mode", "feather", "antiAlias"]);
|
|
18664
18910
|
controller.selectTextShape(init);
|
|
18665
18911
|
const sel = controller.getSelection();
|
|
18666
|
-
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
18912
|
+
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _583 => _583.bounds]), () => ( null)), area: Math.round(sel ? _chunkSS53NNZOcjs.selectionArea.call(void 0, sel) : 0) };
|
|
18667
18913
|
}
|
|
18668
18914
|
};
|
|
18669
18915
|
return [listFonts, get, add2, setText, setStyle, setParagraph, setFrame, setOrientation, toShape, typeMask];
|
|
@@ -18842,7 +19088,7 @@ function createImageEditorToolProvider(controller, options = {}) {
|
|
|
18842
19088
|
for (const ref of [aboveId, parentId]) {
|
|
18843
19089
|
if (ref !== void 0 && !controller.getLayer(ref)) throw new Error(`Unknown layer "${ref}". Call list_layers for ids.`);
|
|
18844
19090
|
}
|
|
18845
|
-
if (parentId !== void 0 && _optionalChain([controller, 'access',
|
|
19091
|
+
if (parentId !== void 0 && _optionalChain([controller, 'access', _584 => _584.getLayer, 'call', _585 => _585(parentId), 'optionalAccess', _586 => _586.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
|
|
18846
19092
|
const id = controller.addAdjustmentLayer({ kind, params, opacity, blend, name, aboveId, parentId, useSelection: useSelection !== false });
|
|
18847
19093
|
const layer = controller.getAdjustmentLayer(id);
|
|
18848
19094
|
return { layer: JSON.parse(JSON.stringify(layer)), index: controller.getAdjustmentLayers().findIndex((l) => l.id === id), masked: Boolean(layer.mask) };
|
|
@@ -18918,7 +19164,7 @@ function createImageEditorToolProvider(controller, options = {}) {
|
|
|
18918
19164
|
...createImagePaintTools(controller),
|
|
18919
19165
|
...createImageColorTools(controller),
|
|
18920
19166
|
...createImageRetouchTools(controller),
|
|
18921
|
-
...
|
|
19167
|
+
..._chunkXFYLA3ZOcjs.createPigmentTools.call(void 0, ),
|
|
18922
19168
|
...createImagePsdTools(controller)
|
|
18923
19169
|
]
|
|
18924
19170
|
}, options.playbackSurface);
|
|
@@ -19079,35 +19325,35 @@ function scaleParams(p, s) {
|
|
|
19079
19325
|
return { ...p, radius: p.radius * s, feather: p.feather * s };
|
|
19080
19326
|
}
|
|
19081
19327
|
var SelectAndMaskSession = (_class15 = class {
|
|
19082
|
-
constructor(controller) {;_class15.prototype.
|
|
19328
|
+
constructor(controller) {;_class15.prototype.__init121.call(this);_class15.prototype.__init122.call(this);_class15.prototype.__init123.call(this);_class15.prototype.__init124.call(this);_class15.prototype.__init125.call(this);_class15.prototype.__init126.call(this);_class15.prototype.__init127.call(this);_class15.prototype.__init128.call(this);_class15.prototype.__init129.call(this);_class15.prototype.__init130.call(this);_class15.prototype.__init131.call(this);_class15.prototype.__init132.call(this);_class15.prototype.__init133.call(this);_class15.prototype.__init134.call(this);_class15.prototype.__init135.call(this);
|
|
19083
19329
|
this.controller = controller;
|
|
19084
19330
|
this.base = controller.getSelection();
|
|
19085
19331
|
this.settingsValue = remembered ? { ...remembered, params: { ...remembered.params }, showOriginal: false } : { ...DEFAULT_SELECT_AND_MASK_SETTINGS, params: { ...DEFAULT_SELECT_AND_MASK_SETTINGS.params } };
|
|
19086
19332
|
}
|
|
19087
19333
|
|
|
19088
19334
|
|
|
19089
|
-
|
|
19335
|
+
__init121() {this.editsList = []}
|
|
19090
19336
|
/** The edit being painted, shown in the preview but not yet in `edits`. */
|
|
19091
|
-
|
|
19092
|
-
|
|
19093
|
-
|
|
19094
|
-
|
|
19337
|
+
__init122() {this.live = null}
|
|
19338
|
+
__init123() {this.dragStart = null}
|
|
19339
|
+
__init124() {this.pixels = null}
|
|
19340
|
+
__init125() {this.previewPixels = null}
|
|
19095
19341
|
/** The layers below the active one, composited (On Layers shows them where nothing is selected). */
|
|
19096
|
-
|
|
19097
|
-
|
|
19342
|
+
__init126() {this.below = null}
|
|
19343
|
+
__init127() {this.belowPreview = null}
|
|
19098
19344
|
|
|
19099
|
-
|
|
19100
|
-
|
|
19101
|
-
|
|
19345
|
+
__init128() {this.previewMask = null}
|
|
19346
|
+
__init129() {this.baseMask = null}
|
|
19347
|
+
__init130() {this.listeners = /* @__PURE__ */ new Set()}
|
|
19102
19348
|
/** Why the preview could not be made (no pixels), for the UI. */
|
|
19103
|
-
|
|
19349
|
+
__init131() {this.error = null}
|
|
19104
19350
|
/** A note for the UI, such as object aware refinement applying only on OK. */
|
|
19105
|
-
|
|
19351
|
+
__init132() {this.note = null}
|
|
19106
19352
|
/** Bumped each time the preview changes, so a UI can redraw. */
|
|
19107
|
-
|
|
19353
|
+
__init133() {this.revision = 0}
|
|
19108
19354
|
/** True while the worker computes a preview. */
|
|
19109
|
-
|
|
19110
|
-
|
|
19355
|
+
__init134() {this.computing = false}
|
|
19356
|
+
__init135() {this.dirty = false}
|
|
19111
19357
|
get settings() {
|
|
19112
19358
|
return this.settingsValue;
|
|
19113
19359
|
}
|
|
@@ -19140,7 +19386,7 @@ var SelectAndMaskSession = (_class15 = class {
|
|
|
19140
19386
|
if (!ids.length) return null;
|
|
19141
19387
|
try {
|
|
19142
19388
|
return this.controller.compositePixels(void 0, { layerIds: ids });
|
|
19143
|
-
} catch (
|
|
19389
|
+
} catch (e40) {
|
|
19144
19390
|
return null;
|
|
19145
19391
|
}
|
|
19146
19392
|
}
|
|
@@ -19177,7 +19423,7 @@ var SelectAndMaskSession = (_class15 = class {
|
|
|
19177
19423
|
const h = Math.max(1, Math.round(px2.height * s));
|
|
19178
19424
|
this.previewPixels = scalePixels(px2, w, h);
|
|
19179
19425
|
this.belowPreview = this.below ? scalePixels(this.below, w, h) : null;
|
|
19180
|
-
this.baseMask = _optionalChain([this, 'access',
|
|
19426
|
+
this.baseMask = _optionalChain([this, 'access', _587 => _587.base, 'optionalAccess', _588 => _588.bounds]) ? s === 1 ? this.base : _chunkSS53NNZOcjs.resizeSelection.call(void 0, this.base, w, h) : null;
|
|
19181
19427
|
}
|
|
19182
19428
|
/**
|
|
19183
19429
|
* Recomputes the preview mask from the base selection, the strokes and the settings: at once on
|
|
@@ -19195,7 +19441,7 @@ var SelectAndMaskSession = (_class15 = class {
|
|
|
19195
19441
|
const edits = [...this.editsList, ...this.live ? [this.live] : []].map((e) => scaleEdit(e, scale));
|
|
19196
19442
|
try {
|
|
19197
19443
|
const { selection, refineBrush } = _chunkUC3PWFM3cjs.applyRefineEdits.call(void 0, px2, this.baseMask, edits, px2.width, px2.height);
|
|
19198
|
-
this.previewMask = _optionalChain([selection, 'optionalAccess',
|
|
19444
|
+
this.previewMask = _optionalChain([selection, 'optionalAccess', _589 => _589.bounds]) ? _chunkSS53NNZOcjs.refineSelection.call(void 0, px2, selection, scaleParams(this.settingsValue.params, scale), refineBrush) : null;
|
|
19199
19445
|
this.error = null;
|
|
19200
19446
|
} catch (err) {
|
|
19201
19447
|
this.previewMask = null;
|
|
@@ -19301,7 +19547,7 @@ var SelectAndMaskSession = (_class15 = class {
|
|
|
19301
19547
|
break;
|
|
19302
19548
|
}
|
|
19303
19549
|
case "on-layers": {
|
|
19304
|
-
const under = _optionalChain([this, 'access',
|
|
19550
|
+
const under = _optionalChain([this, 'access', _590 => _590.belowPreview, 'optionalAccess', _591 => _591.data]);
|
|
19305
19551
|
let ur = checker;
|
|
19306
19552
|
let ug = checker;
|
|
19307
19553
|
let ub = checker;
|
|
@@ -19597,7 +19843,7 @@ function maskThumbnailClick(controller, layer, e) {
|
|
|
19597
19843
|
} else if (e.altKey && !layer.mask.source) {
|
|
19598
19844
|
const mode = e.shiftKey ? "overlay" : "gray";
|
|
19599
19845
|
const view = controller.getMaskView();
|
|
19600
|
-
controller.setMaskView(_optionalChain([view, 'optionalAccess',
|
|
19846
|
+
controller.setMaskView(_optionalChain([view, 'optionalAccess', _592 => _592.layerId]) === layer.id && view.mode === mode ? "off" : mode, layer.id);
|
|
19601
19847
|
} else if (e.shiftKey) {
|
|
19602
19848
|
controller.setLayerMaskProps(layer.id, { enabled: layer.mask.enabled === false });
|
|
19603
19849
|
} else {
|
|
@@ -19661,7 +19907,7 @@ function layerHasThumbnail(layer) {
|
|
|
19661
19907
|
return layer.type === "pixel" || layer.type === "shape" || layer.type === "type";
|
|
19662
19908
|
}
|
|
19663
19909
|
function layerWarning(layer) {
|
|
19664
|
-
if (layer.type === "type" && _optionalChain([layer, 'access',
|
|
19910
|
+
if (layer.type === "type" && _optionalChain([layer, 'access', _593 => _593.missingFonts, 'optionalAccess', _594 => _594.length])) {
|
|
19665
19911
|
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."}`;
|
|
19666
19912
|
}
|
|
19667
19913
|
return null;
|
|
@@ -19684,16 +19930,16 @@ function layerMenu(controller) {
|
|
|
19684
19930
|
const siblings = loc ? loc.parent ? loc.parent.children : s.layers : [];
|
|
19685
19931
|
const below = loc ? siblings[loc.index - 1] : void 0;
|
|
19686
19932
|
const hasSel = controller.hasSelection;
|
|
19687
|
-
const isPixel = _optionalChain([active, 'optionalAccess',
|
|
19688
|
-
const hasOwnPixels = _optionalChain([active, 'optionalAccess',
|
|
19933
|
+
const isPixel = _optionalChain([active, 'optionalAccess', _595 => _595.type]) === "pixel";
|
|
19934
|
+
const hasOwnPixels = _optionalChain([active, 'optionalAccess', _596 => _596.type]) === "pixel" || _optionalChain([active, 'optionalAccess', _597 => _597.type]) === "shape" || _optionalChain([active, 'optionalAccess', _598 => _598.type]) === "type" || _optionalChain([active, 'optionalAccess', _599 => _599.type]) === "smart";
|
|
19689
19935
|
return [
|
|
19690
19936
|
{ action: "new-layer", label: "New Layer", enabled: true },
|
|
19691
19937
|
{ action: "new-group", label: "New Group", enabled: true },
|
|
19692
19938
|
{ action: "duplicate", label: "Duplicate Layer", enabled: Boolean(active) },
|
|
19693
19939
|
{ action: "delete", label: "Delete Layer", enabled: Boolean(active) },
|
|
19694
19940
|
{ action: "group-selected", label: "Group Layer", enabled: Boolean(active) },
|
|
19695
|
-
{ action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess',
|
|
19696
|
-
{ action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
19941
|
+
{ action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _600 => _600.type]) === "group" },
|
|
19942
|
+
{ action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _601 => _601.visible]) && _optionalChain([below, 'optionalAccess', _602 => _602.type]) === "pixel") },
|
|
19697
19943
|
{ action: "merge-visible", label: "Merge Visible", enabled: s.layers.some((l) => l.visible) },
|
|
19698
19944
|
{ action: "flatten", label: "Flatten Image", enabled: s.layers.length > 0 },
|
|
19699
19945
|
{ action: "via-copy", label: "Layer via Copy", enabled: isPixel && hasSel },
|
|
@@ -19703,27 +19949,27 @@ function layerMenu(controller) {
|
|
|
19703
19949
|
{ action: "add-mask-hide-selection", label: "Add Mask Hiding Selection", enabled: Boolean(active) && hasSel },
|
|
19704
19950
|
{ action: "add-mask-transparency", label: "Add Mask from Transparency", enabled: hasOwnPixels },
|
|
19705
19951
|
{ action: "select-transparency", label: "Select Layer Pixels", enabled: hasOwnPixels },
|
|
19706
|
-
{ action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess',
|
|
19707
|
-
{ action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
19708
|
-
{ action: "toggle-mask", label: _optionalChain([active, 'optionalAccess',
|
|
19709
|
-
{ action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess',
|
|
19710
|
-
{ action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access',
|
|
19711
|
-
{ action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access',
|
|
19712
|
-
{ action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access',
|
|
19713
|
-
{ action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
19714
|
-
{ action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess',
|
|
19715
|
-
{ action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
19716
|
-
{ action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess',
|
|
19952
|
+
{ action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _603 => _603.mask])) },
|
|
19953
|
+
{ action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _604 => _604.mask])) },
|
|
19954
|
+
{ action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _605 => _605.mask, 'optionalAccess', _606 => _606.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _607 => _607.mask])) },
|
|
19955
|
+
{ action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _608 => _608.mask, 'optionalAccess', _609 => _609.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _610 => _610.mask]) && !active.mask.source) },
|
|
19956
|
+
{ action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _611 => _611.mask, 'optionalAccess', _612 => _612.source])) },
|
|
19957
|
+
{ action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _613 => _613.mask, 'optionalAccess', _614 => _614.source])) },
|
|
19958
|
+
{ action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _615 => _615.mask, 'optionalAccess', _616 => _616.source])) && hasSel },
|
|
19959
|
+
{ action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _617 => _617.vectorMask])) },
|
|
19960
|
+
{ action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess', _618 => _618.vectorMask, 'optionalAccess', _619 => _619.enabled]) === false ? "Enable Vector Mask" : "Disable Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _620 => _620.vectorMask])) },
|
|
19961
|
+
{ action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _621 => _621.vectorMask])) },
|
|
19962
|
+
{ action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _622 => _622.type]) === "annotation" || _optionalChain([active, 'optionalAccess', _623 => _623.type]) === "smart" || _optionalChain([active, 'optionalAccess', _624 => _624.type]) === "shape" || _optionalChain([active, 'optionalAccess', _625 => _625.type]) === "type" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _626 => _626.type]) === "pixel" && _optionalChain([active, 'access', _627 => _627.filters, 'optionalAccess', _628 => _628.length])) },
|
|
19717
19963
|
{ action: "convert-smart", label: "Convert to Smart Object", enabled: Boolean(active && active.type !== "annotation") },
|
|
19718
|
-
{ action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess',
|
|
19719
|
-
{ action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess',
|
|
19720
|
-
{ action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess',
|
|
19721
|
-
{ action: "toggle-clip", label: _optionalChain([active, 'optionalAccess',
|
|
19964
|
+
{ action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _629 => _629.type]) === "smart" },
|
|
19965
|
+
{ action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _630 => _630.type]) === "smart" },
|
|
19966
|
+
{ action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess', _631 => _631.type]) === "smart" && !_optionalChain([active, 'access', _632 => _632.smartFilters, 'optionalAccess', _633 => _633.mask]) },
|
|
19967
|
+
{ action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _634 => _634.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
|
|
19722
19968
|
];
|
|
19723
19969
|
}
|
|
19724
19970
|
async function runLayerMenuAction(controller, action) {
|
|
19725
19971
|
const active = controller.getActiveLayer();
|
|
19726
|
-
const id = _optionalChain([active, 'optionalAccess',
|
|
19972
|
+
const id = _optionalChain([active, 'optionalAccess', _635 => _635.id]);
|
|
19727
19973
|
try {
|
|
19728
19974
|
switch (action) {
|
|
19729
19975
|
case "new-layer":
|
|
@@ -19779,10 +20025,10 @@ async function runLayerMenuAction(controller, action) {
|
|
|
19779
20025
|
if (id) controller.removeLayerMask(id);
|
|
19780
20026
|
break;
|
|
19781
20027
|
case "toggle-mask":
|
|
19782
|
-
if (id && _optionalChain([active, 'optionalAccess',
|
|
20028
|
+
if (id && _optionalChain([active, 'optionalAccess', _636 => _636.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
|
|
19783
20029
|
break;
|
|
19784
20030
|
case "toggle-mask-link":
|
|
19785
|
-
if (id && _optionalChain([active, 'optionalAccess',
|
|
20031
|
+
if (id && _optionalChain([active, 'optionalAccess', _637 => _637.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
|
|
19786
20032
|
break;
|
|
19787
20033
|
case "add-vector-mask":
|
|
19788
20034
|
case "add-vector-mask-hide":
|
|
@@ -19795,7 +20041,7 @@ async function runLayerMenuAction(controller, action) {
|
|
|
19795
20041
|
if (id) controller.removeVectorMask(id);
|
|
19796
20042
|
break;
|
|
19797
20043
|
case "toggle-vector-mask":
|
|
19798
|
-
if (id && _optionalChain([active, 'optionalAccess',
|
|
20044
|
+
if (id && _optionalChain([active, 'optionalAccess', _638 => _638.vectorMask])) controller.setVectorMaskProps(id, { enabled: active.vectorMask.enabled === false });
|
|
19799
20045
|
break;
|
|
19800
20046
|
case "rasterize-vector-mask":
|
|
19801
20047
|
if (id) controller.rasterizeVectorMask(id);
|
|
@@ -19816,7 +20062,7 @@ async function runLayerMenuAction(controller, action) {
|
|
|
19816
20062
|
if (id) controller.setSmartFilterMask(id, "reveal-all");
|
|
19817
20063
|
break;
|
|
19818
20064
|
case "toggle-clip":
|
|
19819
|
-
if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess',
|
|
20065
|
+
if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _639 => _639.clipped]) });
|
|
19820
20066
|
break;
|
|
19821
20067
|
}
|
|
19822
20068
|
return null;
|
|
@@ -19826,7 +20072,7 @@ async function runLayerMenuAction(controller, action) {
|
|
|
19826
20072
|
}
|
|
19827
20073
|
function smartFilterRows(layer) {
|
|
19828
20074
|
if (layer.type !== "smart") return [];
|
|
19829
|
-
const list = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
20075
|
+
const list = _nullishCoalesce(_optionalChain([layer, 'access', _640 => _640.smartFilters, 'optionalAccess', _641 => _641.filters]), () => ( []));
|
|
19830
20076
|
const rows = list.map((f, index) => ({
|
|
19831
20077
|
filter: f,
|
|
19832
20078
|
index,
|
|
@@ -19852,8 +20098,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
|
|
|
19852
20098
|
};
|
|
19853
20099
|
collectSerialized(_nullishCoalesce(serialized.layers, () => ( [])));
|
|
19854
20100
|
const sLayerMap = new Map(allSerializedLayers.map((sl) => [sl.id, sl]));
|
|
19855
|
-
const imgW = _optionalChain([state, 'access',
|
|
19856
|
-
const imgH = _optionalChain([state, 'access',
|
|
20101
|
+
const imgW = _optionalChain([state, 'access', _642 => _642.imageDimensions, 'optionalAccess', _643 => _643.width]) || 1;
|
|
20102
|
+
const imgH = _optionalChain([state, 'access', _644 => _644.imageDimensions, 'optionalAccess', _645 => _645.height]) || 1;
|
|
19857
20103
|
return ctrlLayers.map((l) => {
|
|
19858
20104
|
const bounds = controller.getLayerBounds(l.id) || {
|
|
19859
20105
|
x: 0,
|
|
@@ -19862,8 +20108,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
|
|
|
19862
20108
|
height: imgH
|
|
19863
20109
|
};
|
|
19864
20110
|
const sLayer = sLayerMap.get(l.id);
|
|
19865
|
-
const assetKey = _optionalChain([sLayer, 'optionalAccess',
|
|
19866
|
-
const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess',
|
|
20111
|
+
const assetKey = _optionalChain([sLayer, 'optionalAccess', _646 => _646.asset]);
|
|
20112
|
+
const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _647 => _647.source]) === "document" ? fallbackImageUrl : "");
|
|
19867
20113
|
return {
|
|
19868
20114
|
id: l.id,
|
|
19869
20115
|
name: l.name || "Untitled Layer",
|
|
@@ -19917,9 +20163,9 @@ async function addLayerOfKind(controller, id, init) {
|
|
|
19917
20163
|
const cx = Math.round(canvas.width / 2);
|
|
19918
20164
|
const cy = Math.round(canvas.height / 2);
|
|
19919
20165
|
return controller.addTextLayer({
|
|
19920
|
-
text: _optionalChain([init, 'optionalAccess',
|
|
19921
|
-
x: typeof _optionalChain([init, 'optionalAccess',
|
|
19922
|
-
y: typeof _optionalChain([init, 'optionalAccess',
|
|
20166
|
+
text: _optionalChain([init, 'optionalAccess', _648 => _648.text]) || "New Text",
|
|
20167
|
+
x: typeof _optionalChain([init, 'optionalAccess', _649 => _649.x]) === "number" ? init.x : cx - 100,
|
|
20168
|
+
y: typeof _optionalChain([init, 'optionalAccess', _650 => _650.y]) === "number" ? init.y : cy,
|
|
19923
20169
|
...init
|
|
19924
20170
|
});
|
|
19925
20171
|
}
|
|
@@ -19932,10 +20178,10 @@ async function addLayerOfKind(controller, id, init) {
|
|
|
19932
20178
|
return controller.addShapeLayer({
|
|
19933
20179
|
shape: {
|
|
19934
20180
|
kind: "rect",
|
|
19935
|
-
x: typeof _optionalChain([init, 'optionalAccess',
|
|
19936
|
-
y: typeof _optionalChain([init, 'optionalAccess',
|
|
19937
|
-
width: typeof _optionalChain([init, 'optionalAccess',
|
|
19938
|
-
height: typeof _optionalChain([init, 'optionalAccess',
|
|
20181
|
+
x: typeof _optionalChain([init, 'optionalAccess', _651 => _651.x]) === "number" ? init.x : cx - Math.round(w / 2),
|
|
20182
|
+
y: typeof _optionalChain([init, 'optionalAccess', _652 => _652.y]) === "number" ? init.y : cy - Math.round(h / 2),
|
|
20183
|
+
width: typeof _optionalChain([init, 'optionalAccess', _653 => _653.width]) === "number" ? init.width : w,
|
|
20184
|
+
height: typeof _optionalChain([init, 'optionalAccess', _654 => _654.height]) === "number" ? init.height : h
|
|
19939
20185
|
},
|
|
19940
20186
|
name: "Rectangle",
|
|
19941
20187
|
...init
|
|
@@ -19950,10 +20196,10 @@ async function addLayerOfKind(controller, id, init) {
|
|
|
19950
20196
|
return controller.addShapeLayer({
|
|
19951
20197
|
shape: {
|
|
19952
20198
|
kind: "ellipse",
|
|
19953
|
-
x: typeof _optionalChain([init, 'optionalAccess',
|
|
19954
|
-
y: typeof _optionalChain([init, 'optionalAccess',
|
|
19955
|
-
width: typeof _optionalChain([init, 'optionalAccess',
|
|
19956
|
-
height: typeof _optionalChain([init, 'optionalAccess',
|
|
20199
|
+
x: typeof _optionalChain([init, 'optionalAccess', _655 => _655.x]) === "number" ? init.x : cx - Math.round(w / 2),
|
|
20200
|
+
y: typeof _optionalChain([init, 'optionalAccess', _656 => _656.y]) === "number" ? init.y : cy - Math.round(h / 2),
|
|
20201
|
+
width: typeof _optionalChain([init, 'optionalAccess', _657 => _657.width]) === "number" ? init.width : w,
|
|
20202
|
+
height: typeof _optionalChain([init, 'optionalAccess', _658 => _658.height]) === "number" ? init.height : h
|
|
19957
20203
|
},
|
|
19958
20204
|
name: "Ellipse",
|
|
19959
20205
|
...init
|
|
@@ -20014,18 +20260,18 @@ function layerEffectsPanel(layer) {
|
|
|
20014
20260
|
if (!layer) return { ...empty, available: false, reason: "Select a layer to add a layer style." };
|
|
20015
20261
|
if (layer.type === "adjustment") return { ...empty, available: false, reason: "Adjustment layers cannot have a layer style." };
|
|
20016
20262
|
const fx = layer.effects;
|
|
20017
|
-
const readOnly = Boolean(_optionalChain([layer, 'access',
|
|
20263
|
+
const readOnly = Boolean(_optionalChain([layer, 'access', _659 => _659.locks, 'optionalAccess', _660 => _660.all]));
|
|
20018
20264
|
return {
|
|
20019
20265
|
available: true,
|
|
20020
20266
|
readOnly,
|
|
20021
20267
|
reason: readOnly ? "The layer is locked; unlock it to change its layer style." : void 0,
|
|
20022
|
-
enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess',
|
|
20023
|
-
scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess',
|
|
20024
|
-
rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess',
|
|
20268
|
+
enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _661 => _661.enabled]), () => ( true)),
|
|
20269
|
+
scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _662 => _662.scale]), () => ( 1)),
|
|
20270
|
+
rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _663 => _663.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkB46UQUDCcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
|
|
20025
20271
|
};
|
|
20026
20272
|
}
|
|
20027
20273
|
function layerEffectsBadge(layer) {
|
|
20028
|
-
if (!_optionalChain([layer, 'access',
|
|
20274
|
+
if (!_optionalChain([layer, 'access', _664 => _664.effects, 'optionalAccess', _665 => _665.items, 'access', _666 => _666.length])) return null;
|
|
20029
20275
|
return _chunkB46UQUDCcjs.hasActiveEffects.call(void 0, layer.effects) ? "on" : "off";
|
|
20030
20276
|
}
|
|
20031
20277
|
var LAYER_EFFECT_MENU = _chunkB46UQUDCcjs.LAYER_EFFECT_KINDS.map((kind) => ({ kind, label: _chunkB46UQUDCcjs.layerEffectLabel.call(void 0, kind) }));
|
|
@@ -20070,8 +20316,8 @@ function fillControls(f, allowPattern, patterns) {
|
|
|
20070
20316
|
}
|
|
20071
20317
|
function gradientControls(prefix, g) {
|
|
20072
20318
|
return [
|
|
20073
|
-
{ key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access',
|
|
20074
|
-
{ key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access',
|
|
20319
|
+
{ key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _667 => _667.stops, 'access', _668 => _668[0], 'optionalAccess', _669 => _669.color]), () => ( "#000000")) },
|
|
20320
|
+
{ key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _670 => _670.stops, 'access', _671 => _671[g.stops.length - 1], 'optionalAccess', _672 => _672.color]), () => ( "#ffffff")) },
|
|
20075
20321
|
{ key: `${prefix}.style`, label: "Style", type: "select", value: g.style, options: opt(["linear", "Linear"], ["radial", "Radial"], ["angle", "Angle"], ["reflected", "Reflected"], ["diamond", "Diamond"]) },
|
|
20076
20322
|
{ key: `${prefix}.angle`, label: "Angle", type: "range", min: -180, max: 180, step: 1, value: g.angle, unit: "\xB0" },
|
|
20077
20323
|
{ key: `${prefix}.scale`, label: "Scale", type: "range", min: 0.1, max: 1.5, step: 0.01, value: g.scale, percent: true, unit: "%" },
|
|
@@ -20163,19 +20409,19 @@ function layerEffectControls(e, patterns = []) {
|
|
|
20163
20409
|
}
|
|
20164
20410
|
function fillOfType(current, type, patterns) {
|
|
20165
20411
|
if (type === "gradient") return { type: "gradient", gradient: _chunkB46UQUDCcjs.defaultEffectGradient.call(void 0, ) };
|
|
20166
|
-
if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access',
|
|
20412
|
+
if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _673 => _673[0], 'optionalAccess', _674 => _674.id]), () => ( "checker")), scale: 1 };
|
|
20167
20413
|
return { type: "color", color: current.type === "color" ? current.color : "#000000" };
|
|
20168
20414
|
}
|
|
20169
20415
|
function effectControlChange(effect, key2, value, patterns = []) {
|
|
20170
20416
|
const [top, ...rest] = key2.split(".");
|
|
20171
20417
|
if (top === "fill" && rest[0] === "type") return { fill: fillOfType(effect.fill, String(value), patterns) };
|
|
20172
20418
|
if (top === "patternId" && !rest.length) {
|
|
20173
|
-
const name = _optionalChain([patternOptions, 'call',
|
|
20419
|
+
const name = _optionalChain([patternOptions, 'call', _675 => _675(patterns), 'access', _676 => _676.find, 'call', _677 => _677((o) => o.value === value), 'optionalAccess', _678 => _678.label]);
|
|
20174
20420
|
return name ? { patternId: value, name } : { patternId: value };
|
|
20175
20421
|
}
|
|
20176
20422
|
if (!rest.length) return { [top]: value };
|
|
20177
20423
|
if (top === "fill" && rest[0] === "patternId") {
|
|
20178
|
-
const name = _optionalChain([patternOptions, 'call',
|
|
20424
|
+
const name = _optionalChain([patternOptions, 'call', _679 => _679(patterns), 'access', _680 => _680.find, 'call', _681 => _681((o) => o.value === value), 'optionalAccess', _682 => _682.label]);
|
|
20179
20425
|
return { fill: { ...effect.fill, patternId: value, ...name ? { name } : {} } };
|
|
20180
20426
|
}
|
|
20181
20427
|
return { [top]: setPath(getPath(effect, top), rest, value) };
|
|
@@ -20202,7 +20448,7 @@ function colorPanelView(controller) {
|
|
|
20202
20448
|
profileName: profile.name,
|
|
20203
20449
|
workingSpace: profile.builtin,
|
|
20204
20450
|
mode: profile.mode,
|
|
20205
|
-
cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access',
|
|
20451
|
+
cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access', _683 => _683.cmykProfile, 'optionalAccess', _684 => _684.name]), () => ( null)),
|
|
20206
20452
|
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
|
|
20207
20453
|
};
|
|
20208
20454
|
}
|
|
@@ -20385,32 +20631,32 @@ function boxFrameHit(overlay, p, tolerance, band) {
|
|
|
20385
20631
|
return null;
|
|
20386
20632
|
}
|
|
20387
20633
|
var FreeTransformTool = (_class16 = class {
|
|
20388
|
-
constructor(controller, options = {}) {;_class16.prototype.
|
|
20634
|
+
constructor(controller, options = {}) {;_class16.prototype.__init136.call(this);_class16.prototype.__init137.call(this);_class16.prototype.__init138.call(this);_class16.prototype.__init139.call(this);_class16.prototype.__init140.call(this);_class16.prototype.__init141.call(this);_class16.prototype.__init142.call(this);_class16.prototype.__init143.call(this);_class16.prototype.__init144.call(this);_class16.prototype.__init145.call(this);_class16.prototype.__init146.call(this);_class16.prototype.__init147.call(this);_class16.prototype.__init148.call(this);_class16.prototype.__init149.call(this);
|
|
20389
20635
|
this.controller = controller;
|
|
20390
20636
|
this.options = options;
|
|
20391
20637
|
}
|
|
20392
20638
|
|
|
20393
20639
|
|
|
20394
|
-
|
|
20395
|
-
|
|
20640
|
+
__init136() {this.sessionRef = null}
|
|
20641
|
+
__init137() {this.modeValue = "scale"}
|
|
20396
20642
|
/** The reference point in the untransformed frame's space (follows the transform). */
|
|
20397
|
-
|
|
20398
|
-
|
|
20399
|
-
|
|
20643
|
+
__init138() {this.refBox = { x: 0, y: 0 }}
|
|
20644
|
+
__init139() {this.corners = null}
|
|
20645
|
+
__init140() {this.drag = null}
|
|
20400
20646
|
/** The warp mesh in the frame's own space (null: no warp). */
|
|
20401
|
-
|
|
20402
|
-
|
|
20403
|
-
|
|
20404
|
-
|
|
20647
|
+
__init141() {this.mesh = null}
|
|
20648
|
+
__init142() {this.warpSettings = { style: "custom", bend: 50, horizontal: 0, vertical: 0, orientation: "horizontal", columns: 1, rows: 1 }}
|
|
20649
|
+
__init143() {this.pending = false}
|
|
20650
|
+
__init144() {this.viewScale = 1}
|
|
20405
20651
|
|
|
20406
20652
|
/** Values typed into the options bar since the last drag (V skew is not recovered from the shape). */
|
|
20407
|
-
|
|
20653
|
+
__init145() {this.typed = {}}
|
|
20408
20654
|
/** Width and height scale together when typed (the chain icon). */
|
|
20409
|
-
|
|
20410
|
-
|
|
20411
|
-
|
|
20655
|
+
__init146() {this.proportional = true}
|
|
20656
|
+
__init147() {this.error = null}
|
|
20657
|
+
__init148() {this.lastResult = null}
|
|
20412
20658
|
get active() {
|
|
20413
|
-
return Boolean(_optionalChain([this, 'access',
|
|
20659
|
+
return Boolean(_optionalChain([this, 'access', _685 => _685.sessionRef, 'optionalAccess', _686 => _686.isOpen]));
|
|
20414
20660
|
}
|
|
20415
20661
|
get session() {
|
|
20416
20662
|
return this.active ? this.sessionRef : null;
|
|
@@ -20419,7 +20665,7 @@ var FreeTransformTool = (_class16 = class {
|
|
|
20419
20665
|
return this.modeValue;
|
|
20420
20666
|
}
|
|
20421
20667
|
get interpolation() {
|
|
20422
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
20668
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _687 => _687.sessionRef, 'optionalAccess', _688 => _688.interpolation]), () => ( "bicubic"));
|
|
20423
20669
|
}
|
|
20424
20670
|
/** Whether the open transform has changed anything yet (a commit would add an undo step). */
|
|
20425
20671
|
get modified() {
|
|
@@ -20429,7 +20675,7 @@ var FreeTransformTool = (_class16 = class {
|
|
|
20429
20675
|
const start = s.startGeometry.corners;
|
|
20430
20676
|
return this.corners.some((p, i) => p.x !== start[i].x || p.y !== start[i].y);
|
|
20431
20677
|
}
|
|
20432
|
-
|
|
20678
|
+
__init149() {this.listeners = /* @__PURE__ */ new Set()}
|
|
20433
20679
|
/** Calls `listener` whenever the overlay, readout, mode or error changes. Returns the unsubscribe. */
|
|
20434
20680
|
subscribe(listener) {
|
|
20435
20681
|
this.listeners.add(listener);
|
|
@@ -20438,7 +20684,7 @@ var FreeTransformTool = (_class16 = class {
|
|
|
20438
20684
|
};
|
|
20439
20685
|
}
|
|
20440
20686
|
changed() {
|
|
20441
|
-
_optionalChain([this, 'access',
|
|
20687
|
+
_optionalChain([this, 'access', _689 => _689.options, 'access', _690 => _690.onChange, 'optionalCall', _691 => _691()]);
|
|
20442
20688
|
for (const l of this.listeners) l();
|
|
20443
20689
|
}
|
|
20444
20690
|
/** Opens a Free Transform (default: the selected pixels of the active layer, or the whole layer). Returns an error message or `null`. */
|
|
@@ -20831,7 +21077,7 @@ var FreeTransformTool = (_class16 = class {
|
|
|
20831
21077
|
}
|
|
20832
21078
|
/** Abandons the transform and restores everything. */
|
|
20833
21079
|
cancel() {
|
|
20834
|
-
_optionalChain([this, 'access',
|
|
21080
|
+
_optionalChain([this, 'access', _692 => _692.sessionRef, 'optionalAccess', _693 => _693.cancel, 'call', _694 => _694()]);
|
|
20835
21081
|
this.sessionRef = null;
|
|
20836
21082
|
this.corners = null;
|
|
20837
21083
|
this.mesh = null;
|
|
@@ -20887,7 +21133,7 @@ function imageLayerAppliedEffects(layer) {
|
|
|
20887
21133
|
const ref = (r) => ({ effect: r.effect, ...r.name ? { name: r.name } : {}, ...r.provider ? { provider: r.provider } : {} });
|
|
20888
21134
|
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 } : {} });
|
|
20889
21135
|
if (layer.type === "smart")
|
|
20890
|
-
(_nullishCoalesce(_optionalChain([layer, 'access',
|
|
21136
|
+
(_nullishCoalesce(_optionalChain([layer, 'access', _695 => _695.smartFilters, 'optionalAccess', _696 => _696.filters]), () => ( []))).forEach((f, index) => {
|
|
20891
21137
|
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 });
|
|
20892
21138
|
});
|
|
20893
21139
|
return out;
|
|
@@ -21044,7 +21290,7 @@ var OTHER_TOOL_LABELS = {
|
|
|
21044
21290
|
watermark: "Watermark"
|
|
21045
21291
|
};
|
|
21046
21292
|
function imageToolLabel(tool) {
|
|
21047
|
-
return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access',
|
|
21293
|
+
return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access', _697 => _697.find, 'call', _698 => _698((t) => t.id === tool), 'optionalAccess', _699 => _699.label]), () => ( OTHER_TOOL_LABELS[tool])), () => ( tool));
|
|
21048
21294
|
}
|
|
21049
21295
|
var IMAGE_TOOL_SHORTCUTS = {
|
|
21050
21296
|
...Object.fromEntries(PAINT_TOOLS.filter((t) => t.shortcut).map((t) => [t.id, t.shortcut])),
|
|
@@ -21128,19 +21374,19 @@ var pt = (p) => ({ x: p.x, y: p.y });
|
|
|
21128
21374
|
var cloneComponents = (cs) => cs.map((c) => ({ op: c.op, subpaths: c.subpaths.map((sp) => ({ anchors: sp.anchors.map(_chunkQAUIZPYIcjs.cloneAnchor), closed: sp.closed })), ...c.live ? { live: c.live } : {} }));
|
|
21129
21375
|
var sameTarget = (a, b) => !!a && !!b && a.kind === b.kind && (a.kind === "path" ? a.id === b.id : a.layerId === b.layerId);
|
|
21130
21376
|
var PathEditGesture = (_class17 = class {
|
|
21131
|
-
constructor(controller) {;_class17.prototype.
|
|
21377
|
+
constructor(controller) {;_class17.prototype.__init150.call(this);_class17.prototype.__init151.call(this);_class17.prototype.__init152.call(this);_class17.prototype.__init153.call(this);_class17.prototype.__init154.call(this);_class17.prototype.__init155.call(this);_class17.prototype.__init156.call(this);
|
|
21132
21378
|
this.controller = controller;
|
|
21133
21379
|
}
|
|
21134
21380
|
|
|
21135
21381
|
/** Selected anchors, as `component:subpath:anchor` keys. */
|
|
21136
|
-
|
|
21137
|
-
|
|
21138
|
-
|
|
21382
|
+
__init150() {this.selected = /* @__PURE__ */ new Set()}
|
|
21383
|
+
__init151() {this.target = null}
|
|
21384
|
+
__init152() {this.drag = null}
|
|
21139
21385
|
/** The Pen's open subpath being drawn. */
|
|
21140
|
-
|
|
21141
|
-
|
|
21142
|
-
|
|
21143
|
-
|
|
21386
|
+
__init153() {this.drawing = null}
|
|
21387
|
+
__init154() {this.pointer = null}
|
|
21388
|
+
__init155() {this.scale = 1}
|
|
21389
|
+
__init156() {this.error = null}
|
|
21144
21390
|
/** Screen pixels per document pixel (the viewport projection's scale). */
|
|
21145
21391
|
setView(scale) {
|
|
21146
21392
|
if (scale > 0 && Number.isFinite(scale)) this.scale = scale;
|
|
@@ -21171,15 +21417,15 @@ var PathEditGesture = (_class17 = class {
|
|
|
21171
21417
|
let cs;
|
|
21172
21418
|
try {
|
|
21173
21419
|
cs = this.controller.getPathEditComponents(target);
|
|
21174
|
-
} catch (
|
|
21420
|
+
} catch (e41) {
|
|
21175
21421
|
return null;
|
|
21176
21422
|
}
|
|
21177
21423
|
for (const k of [...this.selected]) {
|
|
21178
21424
|
const r = parseKey(k);
|
|
21179
|
-
if (!_optionalChain([cs, 'access',
|
|
21425
|
+
if (!_optionalChain([cs, 'access', _700 => _700[r.component], 'optionalAccess', _701 => _701.subpaths, 'access', _702 => _702[r.subpath], 'optionalAccess', _703 => _703.anchors, 'access', _704 => _704[r.anchor]])) this.selected.delete(k);
|
|
21180
21426
|
}
|
|
21181
21427
|
const d = this.drawing;
|
|
21182
|
-
if (d && (!_optionalChain([cs, 'access',
|
|
21428
|
+
if (d && (!_optionalChain([cs, 'access', _705 => _705[d.component], 'optionalAccess', _706 => _706.subpaths, 'access', _707 => _707[d.subpath]]) || cs[d.component].subpaths[d.subpath].closed)) this.drawing = null;
|
|
21183
21429
|
return cs;
|
|
21184
21430
|
}
|
|
21185
21431
|
anchorAt(cs, p) {
|
|
@@ -21514,11 +21760,11 @@ var PathEditGesture = (_class17 = class {
|
|
|
21514
21760
|
let preview = null;
|
|
21515
21761
|
const d = this.drawing;
|
|
21516
21762
|
if (tool === "path-pen" && d && this.pointer && !this.drag) {
|
|
21517
|
-
const sp = _optionalChain([cs, 'access',
|
|
21518
|
-
const last = _optionalChain([sp, 'optionalAccess',
|
|
21763
|
+
const sp = _optionalChain([cs, 'access', _708 => _708[d.component], 'optionalAccess', _709 => _709.subpaths, 'access', _710 => _710[d.subpath]]);
|
|
21764
|
+
const last = _optionalChain([sp, 'optionalAccess', _711 => _711.anchors, 'access', _712 => _712[sp.anchors.length - 1]]);
|
|
21519
21765
|
if (last) preview = last.out ? [pt(last), pt(last.out), this.pointer, this.pointer] : [pt(last), this.pointer];
|
|
21520
21766
|
}
|
|
21521
|
-
const marquee = _optionalChain([this, 'access',
|
|
21767
|
+
const marquee = _optionalChain([this, 'access', _713 => _713.drag, 'optionalAccess', _714 => _714.kind]) === "marquee" ? rect(this.drag.start, this.drag.end) : null;
|
|
21522
21768
|
return { curves, anchors, handles, marquee, preview };
|
|
21523
21769
|
}
|
|
21524
21770
|
}, _class17);
|
|
@@ -21553,26 +21799,26 @@ var DEFAULT_CONTENT_AWARE_FILL_SETTINGS = {
|
|
|
21553
21799
|
livePreview: true
|
|
21554
21800
|
};
|
|
21555
21801
|
var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
|
|
21556
|
-
constructor(controller) {;_class18.prototype.
|
|
21802
|
+
constructor(controller) {;_class18.prototype.__init157.call(this);_class18.prototype.__init158.call(this);_class18.prototype.__init159.call(this);_class18.prototype.__init160.call(this);_class18.prototype.__init161.call(this);_class18.prototype.__init162.call(this);_class18.prototype.__init163.call(this);_class18.prototype.__init164.call(this);_class18.prototype.__init165.call(this);_class18.prototype.__init166.call(this);_class18.prototype.__init167.call(this);_class18.prototype.__init168.call(this);_class18.prototype.__init169.call(this);_class18.prototype.__init170.call(this);_class18.prototype.__init171.call(this);
|
|
21557
21803
|
this.controller = controller;
|
|
21558
21804
|
}
|
|
21559
21805
|
|
|
21560
|
-
|
|
21561
|
-
|
|
21806
|
+
__init157() {this.settingsValue = { ...DEFAULT_CONTENT_AWARE_FILL_SETTINGS }}
|
|
21807
|
+
__init158() {this.plan = null}
|
|
21562
21808
|
/** The source view's window (document pixels): the selection with room around it to sample. */
|
|
21563
|
-
|
|
21564
|
-
|
|
21565
|
-
|
|
21809
|
+
__init159() {this.win = null}
|
|
21810
|
+
__init160() {this.before = null}
|
|
21811
|
+
__init161() {this.hole = null}
|
|
21566
21812
|
/** 1 where the fill may copy from, per window pixel. */
|
|
21567
|
-
|
|
21568
|
-
|
|
21569
|
-
|
|
21570
|
-
|
|
21571
|
-
|
|
21813
|
+
__init162() {this.area = null}
|
|
21814
|
+
__init163() {this.after = null}
|
|
21815
|
+
__init164() {this.lastPoint = null}
|
|
21816
|
+
__init165() {this.listeners = /* @__PURE__ */ new Set()}
|
|
21817
|
+
__init166() {this.dirty = false}
|
|
21572
21818
|
/** Why the workspace can't fill (nothing selected, not a pixel layer), for the UI. */
|
|
21573
|
-
|
|
21574
|
-
|
|
21575
|
-
|
|
21819
|
+
__init167() {this.error = null}
|
|
21820
|
+
__init168() {this.computing = false}
|
|
21821
|
+
__init169() {this.revision = 0}
|
|
21576
21822
|
get settings() {
|
|
21577
21823
|
return this.settingsValue;
|
|
21578
21824
|
}
|
|
@@ -21591,7 +21837,7 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
|
|
|
21591
21837
|
/** Images up to this many pixels show (and can be sampled) whole in the workspace. */
|
|
21592
21838
|
static __initStatic() {this.WHOLE_IMAGE_PIXELS = 4e6}
|
|
21593
21839
|
/** Room around the selection the window holds, in px each way. */
|
|
21594
|
-
|
|
21840
|
+
__init170() {this.margin = 0}
|
|
21595
21841
|
/**
|
|
21596
21842
|
* Reads the layer and makes the first preview. The window is the whole image up to
|
|
21597
21843
|
* {@link WHOLE_IMAGE_PIXELS}; on a larger one it holds the selection and room around it (twice
|
|
@@ -21600,8 +21846,8 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
|
|
|
21600
21846
|
async open() {
|
|
21601
21847
|
try {
|
|
21602
21848
|
const { width, height } = this.controller.getState().imageDimensions;
|
|
21603
|
-
const b = _optionalChain([this, 'access',
|
|
21604
|
-
this.margin = width * height <= _ContentAwareFillSession.WHOLE_IMAGE_PIXELS ? Math.max(width, height) : Math.max(256, 2 * Math.max(_nullishCoalesce(_optionalChain([b, 'optionalAccess',
|
|
21849
|
+
const b = _optionalChain([this, 'access', _715 => _715.controller, 'access', _716 => _716.getSelection, 'call', _717 => _717(), 'optionalAccess', _718 => _718.bounds]);
|
|
21850
|
+
this.margin = width * height <= _ContentAwareFillSession.WHOLE_IMAGE_PIXELS ? Math.max(width, height) : Math.max(256, 2 * Math.max(_nullishCoalesce(_optionalChain([b, 'optionalAccess', _719 => _719.width]), () => ( 0)), _nullishCoalesce(_optionalChain([b, 'optionalAccess', _720 => _720.height]), () => ( 0))));
|
|
21605
21851
|
this.plan = this.controller.prepareContentAwareFill({ sampleRadius: this.margin });
|
|
21606
21852
|
} catch (err) {
|
|
21607
21853
|
this.error = err instanceof Error ? err.message : String(err);
|
|
@@ -21733,7 +21979,7 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
|
|
|
21733
21979
|
this.emit();
|
|
21734
21980
|
return true;
|
|
21735
21981
|
}
|
|
21736
|
-
|
|
21982
|
+
__init171() {this.strokeAdds = true}
|
|
21737
21983
|
move(point) {
|
|
21738
21984
|
if (!this.lastPoint) return;
|
|
21739
21985
|
this.paint(this.lastPoint, point, this.strokeAdds);
|
|
@@ -21759,7 +22005,7 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
|
|
|
21759
22005
|
this.dirty = false;
|
|
21760
22006
|
try {
|
|
21761
22007
|
const area = this.samplingMask();
|
|
21762
|
-
if (!_optionalChain([area, 'optionalAccess',
|
|
22008
|
+
if (!_optionalChain([area, 'optionalAccess', _721 => _721.bounds])) throw new Error("The sampling area is empty; paint where the fill may copy from.");
|
|
21763
22009
|
const { plan, after } = await this.controller.previewContentAwareFill({ layerId: this.plan.layerId, samplingArea: area, seed: this.settingsValue.seed });
|
|
21764
22010
|
const win = this.win;
|
|
21765
22011
|
const out = Uint8ClampedArray.from(this.before);
|
|
@@ -21838,7 +22084,7 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
|
|
|
21838
22084
|
/** OK: fills with this sampling area, seed and output as one undo step. */
|
|
21839
22085
|
async commit(options = {}) {
|
|
21840
22086
|
const area = this.samplingMask();
|
|
21841
|
-
if (!this.plan || !_optionalChain([area, 'optionalAccess',
|
|
22087
|
+
if (!this.plan || !_optionalChain([area, 'optionalAccess', _722 => _722.bounds])) throw new Error(_nullishCoalesce(this.error, () => ( "The sampling area is empty; paint where the fill may copy from.")));
|
|
21842
22088
|
return this.controller.contentAwareFillAsync({ layerId: this.plan.layerId, samplingArea: area, seed: this.settingsValue.seed, output: this.settingsValue.output, signal: options.signal });
|
|
21843
22089
|
}
|
|
21844
22090
|
}, _class18.__initStatic(), _class18);
|
|
@@ -22954,4 +23200,7 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
|
|
|
22954
23200
|
|
|
22955
23201
|
|
|
22956
23202
|
|
|
22957
|
-
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.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.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;
|
|
23203
|
+
|
|
23204
|
+
|
|
23205
|
+
|
|
23206
|
+
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.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;
|