@pixerate/editor 0.216.0 → 0.217.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/image-editor/controller.d.cts +33 -0
- package/dist/image-editor/controller.d.ts +33 -0
- package/dist/image-editor/index.cjs +812 -565
- package/dist/image-editor/index.js +249 -2
- 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/package.json +1 -1
- package/skills/pixerate-image-editor/SKILL.md +2 -2
- package/skills/pixerate-image-selection-masking/SKILL.md +3 -3
|
@@ -1070,6 +1070,105 @@ function startMarchingAnts(tick, stepMs = MARCHING_ANTS_STEP_MS) {
|
|
|
1070
1070
|
return () => clearInterval(id);
|
|
1071
1071
|
}
|
|
1072
1072
|
|
|
1073
|
+
// src/image-editor/selection/diff.ts
|
|
1074
|
+
function compareSelectionMasks(a, b, width, height, options = {}) {
|
|
1075
|
+
const minArea = Math.max(1, _nullishCoalesce(options.minArea, () => ( 4)));
|
|
1076
|
+
const maxRegions = Math.max(1, _nullishCoalesce(options.maxRegions, () => ( 10)));
|
|
1077
|
+
const n = width * height;
|
|
1078
|
+
const ad = _optionalChain([a, 'optionalAccess', _2 => _2.data]);
|
|
1079
|
+
const bd = _optionalChain([b, 'optionalAccess', _3 => _3.data]);
|
|
1080
|
+
const added = new Uint8Array(n);
|
|
1081
|
+
const removed = new Uint8Array(n);
|
|
1082
|
+
let areaA = 0;
|
|
1083
|
+
let areaB = 0;
|
|
1084
|
+
let inter = 0;
|
|
1085
|
+
let change = 0;
|
|
1086
|
+
let addedArea = 0;
|
|
1087
|
+
let removedArea = 0;
|
|
1088
|
+
for (let i = 0; i < n; i++) {
|
|
1089
|
+
const va = ad ? ad[i] : 0;
|
|
1090
|
+
const vb = bd ? bd[i] : 0;
|
|
1091
|
+
if (va !== vb) change += Math.abs(vb - va);
|
|
1092
|
+
const ia = va >= 128;
|
|
1093
|
+
const ib = vb >= 128;
|
|
1094
|
+
if (ia) areaA++;
|
|
1095
|
+
if (ib) areaB++;
|
|
1096
|
+
if (ia && ib) inter++;
|
|
1097
|
+
else if (ib) {
|
|
1098
|
+
added[i] = 255;
|
|
1099
|
+
addedArea++;
|
|
1100
|
+
} else if (ia) {
|
|
1101
|
+
removed[i] = 255;
|
|
1102
|
+
removedArea++;
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
const union = areaA + areaB - inter;
|
|
1106
|
+
const addedMask = _chunkSS53NNZOcjs.createSelectionMask.call(void 0, width, height, added);
|
|
1107
|
+
const removedMask = _chunkSS53NNZOcjs.createSelectionMask.call(void 0, width, height, removed);
|
|
1108
|
+
return {
|
|
1109
|
+
a: { area: areaA, bounds: _nullishCoalesce(_optionalChain([a, 'optionalAccess', _4 => _4.bounds]), () => ( null)) },
|
|
1110
|
+
b: { area: areaB, bounds: _nullishCoalesce(_optionalChain([b, 'optionalAccess', _5 => _5.bounds]), () => ( null)) },
|
|
1111
|
+
added: { area: addedArea, ...pieces(added, width, height, addedMask.bounds, minArea, maxRegions) },
|
|
1112
|
+
removed: { area: removedArea, ...pieces(removed, width, height, removedMask.bounds, minArea, maxRegions) },
|
|
1113
|
+
iou: union ? Math.round(inter / union * 1e4) / 1e4 : 1,
|
|
1114
|
+
coverageChange: Math.round(change / 255),
|
|
1115
|
+
identical: change === 0,
|
|
1116
|
+
addedMask,
|
|
1117
|
+
removedMask
|
|
1118
|
+
};
|
|
1119
|
+
}
|
|
1120
|
+
function pieces(bits, W, H, bounds, minArea, maxRegions) {
|
|
1121
|
+
if (!bounds) return { count: 0, regions: [] };
|
|
1122
|
+
const { x: x0, y: y0, width: w, height: h } = bounds;
|
|
1123
|
+
const seen = new Uint8Array(w * h);
|
|
1124
|
+
const stack = new Int32Array(w * h);
|
|
1125
|
+
const found = [];
|
|
1126
|
+
for (let start = 0; start < w * h; start++) {
|
|
1127
|
+
if (seen[start] || !bits[(y0 + Math.floor(start / w)) * W + x0 + start % w]) continue;
|
|
1128
|
+
let area = 0;
|
|
1129
|
+
let bx0 = w;
|
|
1130
|
+
let by0 = h;
|
|
1131
|
+
let bx1 = -1;
|
|
1132
|
+
let by1 = -1;
|
|
1133
|
+
let top = 0;
|
|
1134
|
+
stack[top++] = start;
|
|
1135
|
+
seen[start] = 1;
|
|
1136
|
+
while (top) {
|
|
1137
|
+
const k = stack[--top];
|
|
1138
|
+
const i = k % w;
|
|
1139
|
+
const j = (k - i) / w;
|
|
1140
|
+
area++;
|
|
1141
|
+
if (i < bx0) bx0 = i;
|
|
1142
|
+
if (i > bx1) bx1 = i;
|
|
1143
|
+
if (j < by0) by0 = j;
|
|
1144
|
+
if (j > by1) by1 = j;
|
|
1145
|
+
for (let dy = -1; dy <= 1; dy++) {
|
|
1146
|
+
for (let dx = -1; dx <= 1; dx++) {
|
|
1147
|
+
const ni = i + dx;
|
|
1148
|
+
const nj = j + dy;
|
|
1149
|
+
if (ni < 0 || nj < 0 || ni >= w || nj >= h) continue;
|
|
1150
|
+
const nk = nj * w + ni;
|
|
1151
|
+
if (seen[nk] || !bits[(y0 + nj) * W + x0 + ni]) continue;
|
|
1152
|
+
seen[nk] = 1;
|
|
1153
|
+
stack[top++] = nk;
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
if (area >= minArea) found.push({ area, bounds: { x: x0 + bx0, y: y0 + by0, width: bx1 - bx0 + 1, height: by1 - by0 + 1 } });
|
|
1158
|
+
}
|
|
1159
|
+
found.sort((p, q) => q.area - p.area);
|
|
1160
|
+
return { count: found.length, regions: found.slice(0, maxRegions) };
|
|
1161
|
+
}
|
|
1162
|
+
function selectionDiffPixels(added, removed) {
|
|
1163
|
+
const n = added.width * added.height;
|
|
1164
|
+
const out = new Uint8ClampedArray(n * 4);
|
|
1165
|
+
for (let i = 0; i < n; i++) {
|
|
1166
|
+
if (added.data[i]) out.set([34, 197, 94, 140], i * 4);
|
|
1167
|
+
else if (removed.data[i]) out.set([239, 68, 68, 140], i * 4);
|
|
1168
|
+
}
|
|
1169
|
+
return out;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1073
1172
|
// src/image-editor/layers/render.ts
|
|
1074
1173
|
function isQuarterTurn(rotate) {
|
|
1075
1174
|
return _chunkS55JFWDAcjs.normalizeAngle.call(void 0, rotate) % 90 === 0;
|
|
@@ -1132,7 +1231,7 @@ function needsLegacyBase(input) {
|
|
|
1132
1231
|
if (!_chunkS55JFWDAcjs.isLegacyShape.call(void 0, stack)) return false;
|
|
1133
1232
|
const bg = stack.layers[0];
|
|
1134
1233
|
if (!isQuarterTurn(transform.rotate) || !isIntegerRect(region)) return true;
|
|
1135
|
-
if (_optionalChain([bg, 'access',
|
|
1234
|
+
if (_optionalChain([bg, 'access', _6 => _6.mask, 'optionalAccess', _7 => _7.source, 'optionalAccess', _8 => _8.enabled]) && bg.mask.source.maskSource) return true;
|
|
1136
1235
|
if (stack.outputOpacity < 1) return true;
|
|
1137
1236
|
const blur = _chunkS55JFWDAcjs.blurFilter.call(void 0, bg);
|
|
1138
1237
|
if (blur && blur.enabled && blur.radius > 0) {
|
|
@@ -1301,7 +1400,7 @@ function drawOverlayHandles(ctx, points, u = 1) {
|
|
|
1301
1400
|
ctx.strokeRect(h.x - size / 2, h.y - size / 2, size, size);
|
|
1302
1401
|
}
|
|
1303
1402
|
}
|
|
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); }
|
|
1403
|
+
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
1404
|
__init2() {this.imageCache = globalImageCache}
|
|
1306
1405
|
__init3() {this.cachedBaseCanvas = null}
|
|
1307
1406
|
__init4() {this.cachedBaseKey = ""}
|
|
@@ -1413,7 +1512,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1413
1512
|
`${projection.angle},${transform.flipH},${transform.flipV}`,
|
|
1414
1513
|
`${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
1514
|
_chunkS55JFWDAcjs.adjustmentLayersKey.call(void 0, adjustments.layers),
|
|
1416
|
-
`${depthMask.enabled},${depthMask.maskSource},${_optionalChain([depthMask, 'access',
|
|
1515
|
+
`${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
1516
|
`d${this.displayKey}`
|
|
1418
1517
|
].join("|");
|
|
1419
1518
|
let baseCanvas = this.cachedBaseCanvas;
|
|
@@ -1421,12 +1520,12 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1421
1520
|
let histogram = null;
|
|
1422
1521
|
baseCanvas = await this.renderBaseImage(img, naturalWidth, naturalHeight, region, transform, state, (pixels) => {
|
|
1423
1522
|
histogram = computeHistogram(pixels);
|
|
1424
|
-
_optionalChain([this, 'access',
|
|
1523
|
+
_optionalChain([this, 'access', _13 => _13.display, 'optionalCall', _14 => _14(pixels.data)]);
|
|
1425
1524
|
});
|
|
1426
1525
|
this.cachedBaseCanvas = baseCanvas;
|
|
1427
1526
|
this.cachedBaseKey = baseKey;
|
|
1428
1527
|
this.previewHistogram = histogram;
|
|
1429
|
-
_optionalChain([this, 'access',
|
|
1528
|
+
_optionalChain([this, 'access', _15 => _15.onPreviewHistogram, 'optionalCall', _16 => _16(histogram)]);
|
|
1430
1529
|
}
|
|
1431
1530
|
const drawW = rotated.width * projection.scale;
|
|
1432
1531
|
const drawH = rotated.height * projection.scale;
|
|
@@ -1441,7 +1540,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1441
1540
|
const drawW = rotated.width * projection.scale;
|
|
1442
1541
|
const drawH = rotated.height * projection.scale;
|
|
1443
1542
|
ctx.drawImage(base.canvas, projection.originX - drawW / 2, projection.originY - drawH / 2, drawW, drawH);
|
|
1444
|
-
this.publishHistogram(_nullishCoalesce(_nullishCoalesce(base.histogram, () => ( _optionalChain([comp, 'optionalAccess',
|
|
1543
|
+
this.publishHistogram(_nullishCoalesce(_nullishCoalesce(base.histogram, () => ( _optionalChain([comp, 'optionalAccess', _17 => _17.histogram, 'call', _18 => _18()]))), () => ( null)));
|
|
1445
1544
|
}
|
|
1446
1545
|
}
|
|
1447
1546
|
if (overlay.length > 0 || options.draftAnnotation) {
|
|
@@ -1499,8 +1598,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1499
1598
|
}
|
|
1500
1599
|
const { width: iw, height: ih } = state.imageDimensions;
|
|
1501
1600
|
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',
|
|
1601
|
+
const quickMaskSel = display === "quickMask" && state.quickMaskEditing && !_optionalChain([shownSel, 'optionalAccess', _19 => _19.bounds]) ? this.emptyMask(Math.round(iw), Math.round(ih)) : null;
|
|
1602
|
+
if (_optionalChain([shownSel, 'optionalAccess', _20 => _20.bounds]) && display !== "none" || quickMaskSel || _optionalChain([options, 'access', _21 => _21.draftSelectionPath, 'optionalAccess', _22 => _22.length])) {
|
|
1504
1603
|
ctx.save();
|
|
1505
1604
|
try {
|
|
1506
1605
|
_chunkS55JFWDAcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
|
|
@@ -1508,13 +1607,26 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1508
1607
|
ctx.rect(region.x, region.y, region.width, region.height);
|
|
1509
1608
|
ctx.clip();
|
|
1510
1609
|
if (quickMaskSel) this.drawQuickMask(ctx, quickMaskSel);
|
|
1511
|
-
else if (_optionalChain([shownSel, 'optionalAccess',
|
|
1512
|
-
else if (_optionalChain([shownSel, 'optionalAccess',
|
|
1513
|
-
if (_optionalChain([options, 'access',
|
|
1610
|
+
else if (_optionalChain([shownSel, 'optionalAccess', _23 => _23.bounds]) && display === "quickMask") this.drawQuickMask(ctx, shownSel);
|
|
1611
|
+
else if (_optionalChain([shownSel, 'optionalAccess', _24 => _24.bounds]) && display === "ants") this.drawAnts(ctx, shownSel, projection.scale / u, _nullishCoalesce(options.antsOffset, () => ( 0)));
|
|
1612
|
+
if (_optionalChain([options, 'access', _25 => _25.draftSelectionPath, 'optionalAccess', _26 => _26.length])) this.drawDraftPath(ctx, options.draftSelectionPath, projection.scale / u);
|
|
1514
1613
|
} catch (e7) {
|
|
1515
1614
|
}
|
|
1516
1615
|
ctx.restore();
|
|
1517
1616
|
}
|
|
1617
|
+
const diff = state.selectionDiff;
|
|
1618
|
+
if (diff && diff.selection === (_nullishCoalesce(state.selection, () => ( null)))) {
|
|
1619
|
+
ctx.save();
|
|
1620
|
+
try {
|
|
1621
|
+
_chunkS55JFWDAcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
|
|
1622
|
+
ctx.beginPath();
|
|
1623
|
+
ctx.rect(region.x, region.y, region.width, region.height);
|
|
1624
|
+
ctx.clip();
|
|
1625
|
+
this.drawSelectionDiff(ctx, diff);
|
|
1626
|
+
} catch (e8) {
|
|
1627
|
+
}
|
|
1628
|
+
ctx.restore();
|
|
1629
|
+
}
|
|
1518
1630
|
if (options.brushCursor) {
|
|
1519
1631
|
const b = options.brushCursor;
|
|
1520
1632
|
ctx.save();
|
|
@@ -1529,7 +1641,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1529
1641
|
ctx.lineWidth = px2;
|
|
1530
1642
|
ctx.strokeStyle = "#ffffff";
|
|
1531
1643
|
ctx.stroke();
|
|
1532
|
-
} catch (
|
|
1644
|
+
} catch (e9) {
|
|
1533
1645
|
}
|
|
1534
1646
|
ctx.restore();
|
|
1535
1647
|
}
|
|
@@ -1550,7 +1662,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1550
1662
|
ctx.lineWidth = u;
|
|
1551
1663
|
ctx.strokeStyle = "#ffffff";
|
|
1552
1664
|
ctx.stroke();
|
|
1553
|
-
} catch (
|
|
1665
|
+
} catch (e10) {
|
|
1554
1666
|
}
|
|
1555
1667
|
ctx.restore();
|
|
1556
1668
|
}
|
|
@@ -1589,7 +1701,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1589
1701
|
ctx.strokeStyle = "#111827";
|
|
1590
1702
|
ctx.stroke();
|
|
1591
1703
|
}
|
|
1592
|
-
} catch (
|
|
1704
|
+
} catch (e11) {
|
|
1593
1705
|
}
|
|
1594
1706
|
ctx.restore();
|
|
1595
1707
|
}
|
|
@@ -1628,7 +1740,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1628
1740
|
ctx.lineWidth = 1.5 * u;
|
|
1629
1741
|
ctx.strokeStyle = "#ffffff";
|
|
1630
1742
|
ctx.stroke();
|
|
1631
|
-
drawOverlayHandles(ctx, [...t.handles, ..._nullishCoalesce(_optionalChain([t, 'access',
|
|
1743
|
+
drawOverlayHandles(ctx, [...t.handles, ..._nullishCoalesce(_optionalChain([t, 'access', _27 => _27.warp, 'optionalAccess', _28 => _28.anchors]), () => ( []))].map(scr), u);
|
|
1632
1744
|
if (rotate) {
|
|
1633
1745
|
ctx.beginPath();
|
|
1634
1746
|
ctx.arc(rotate.x, rotate.y, 5 * u, 0, Math.PI * 2);
|
|
@@ -1638,7 +1750,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1638
1750
|
ctx.strokeStyle = OVERLAY_HANDLE_EDGE;
|
|
1639
1751
|
ctx.stroke();
|
|
1640
1752
|
}
|
|
1641
|
-
for (const h of (_nullishCoalesce(_optionalChain([t, 'access',
|
|
1753
|
+
for (const h of (_nullishCoalesce(_optionalChain([t, 'access', _29 => _29.warp, 'optionalAccess', _30 => _30.handles]), () => ( []))).map((w) => scr(w.point))) {
|
|
1642
1754
|
ctx.beginPath();
|
|
1643
1755
|
ctx.arc(h.x, h.y, 3.5 * u, 0, Math.PI * 2);
|
|
1644
1756
|
ctx.fillStyle = "#ffffff";
|
|
@@ -1655,7 +1767,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1655
1767
|
ctx.lineWidth = 1.5 * u;
|
|
1656
1768
|
ctx.strokeStyle = OVERLAY_HANDLE_EDGE;
|
|
1657
1769
|
ctx.stroke();
|
|
1658
|
-
} catch (
|
|
1770
|
+
} catch (e12) {
|
|
1659
1771
|
}
|
|
1660
1772
|
ctx.restore();
|
|
1661
1773
|
}
|
|
@@ -1712,7 +1824,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1712
1824
|
ctx.setLineDash([4 * u, 3 * u]);
|
|
1713
1825
|
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
1826
|
}
|
|
1715
|
-
} catch (
|
|
1827
|
+
} catch (e13) {
|
|
1716
1828
|
}
|
|
1717
1829
|
ctx.restore();
|
|
1718
1830
|
}
|
|
@@ -1780,10 +1892,10 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1780
1892
|
_chunkS55JFWDAcjs.applyDepthMask.call(void 0, imageData, maskData, depthMask);
|
|
1781
1893
|
}
|
|
1782
1894
|
}
|
|
1783
|
-
} catch (
|
|
1895
|
+
} catch (e14) {
|
|
1784
1896
|
}
|
|
1785
1897
|
}
|
|
1786
|
-
_optionalChain([onPixels, 'optionalCall',
|
|
1898
|
+
_optionalChain([onPixels, 'optionalCall', _31 => _31(imageData)]);
|
|
1787
1899
|
baseCtx.putImageData(imageData, 0, 0);
|
|
1788
1900
|
}
|
|
1789
1901
|
return baseCanvas;
|
|
@@ -1792,7 +1904,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1792
1904
|
/** Which base path renders `state` (see `needsLegacyBase`). */
|
|
1793
1905
|
chooseRoute(state, region, naturalWidth, naturalHeight) {
|
|
1794
1906
|
let route;
|
|
1795
|
-
if (!_optionalChain([state, 'access',
|
|
1907
|
+
if (!_optionalChain([state, 'access', _32 => _32.layers, 'optionalAccess', _33 => _33.length])) route = "legacy";
|
|
1796
1908
|
else if (this.baseRoute === "layers") route = "layers";
|
|
1797
1909
|
else {
|
|
1798
1910
|
const stack = { layers: state.layers, outputOpacity: _nullishCoalesce(state.outputOpacity, () => ( 1)), legacyOutputBlur: state.legacyOutputBlur };
|
|
@@ -1802,7 +1914,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1802
1914
|
region,
|
|
1803
1915
|
canvas: { width: naturalWidth, height: naturalHeight },
|
|
1804
1916
|
transform: state.transform,
|
|
1805
|
-
sourceOpaque: _nullishCoalesce(_optionalChain([this, 'access',
|
|
1917
|
+
sourceOpaque: _nullishCoalesce(_optionalChain([this, 'access', _34 => _34.layerSources, 'optionalAccess', _35 => _35.sourceIsOpaque, 'call', _36 => _36()]), () => ( true))
|
|
1806
1918
|
}) ? "legacy" : "layers";
|
|
1807
1919
|
}
|
|
1808
1920
|
this.lastBaseRoute = route;
|
|
@@ -1820,36 +1932,36 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1820
1932
|
return _nullishCoalesce(this.depthMaps.get(`${source.maskSource}|${width}x${height}`), () => ( null));
|
|
1821
1933
|
},
|
|
1822
1934
|
rasterizeAnnotation: (annotation, rect2) => this.rasterizeAnnotation(annotation, rect2),
|
|
1823
|
-
version: `${_nullishCoalesce(_optionalChain([host, 'optionalAccess',
|
|
1824
|
-
globalLight: _optionalChain([host, 'optionalAccess',
|
|
1825
|
-
pattern: _optionalChain([host, 'optionalAccess',
|
|
1935
|
+
version: `${_nullishCoalesce(_optionalChain([host, 'optionalAccess', _37 => _37.version, 'call', _38 => _38()]), () => ( ""))}:${this.assetVersion}`,
|
|
1936
|
+
globalLight: _optionalChain([host, 'optionalAccess', _39 => _39.globalLight, 'optionalCall', _40 => _40()]),
|
|
1937
|
+
pattern: _optionalChain([host, 'optionalAccess', _41 => _41.pattern]) ? (id) => host.pattern(id) : void 0
|
|
1826
1938
|
};
|
|
1827
1939
|
}
|
|
1828
1940
|
/** Loads what the compositor reads synchronously: depth maps (at canvas size) and annotation images. */
|
|
1829
1941
|
/** Loads depth maps and annotation images the compositor reads synchronously. */
|
|
1830
1942
|
async prepareLayerAssets(layers, width, height) {
|
|
1831
1943
|
for (const l of _chunkB46UQUDCcjs.flattenLayers.call(void 0, layers)) {
|
|
1832
|
-
const source = _optionalChain([l, 'access',
|
|
1833
|
-
if (_optionalChain([source, 'optionalAccess',
|
|
1944
|
+
const source = _optionalChain([l, 'access', _42 => _42.mask, 'optionalAccess', _43 => _43.source]);
|
|
1945
|
+
if (_optionalChain([source, 'optionalAccess', _44 => _44.enabled]) && source.maskSource) {
|
|
1834
1946
|
const key2 = `${source.maskSource}|${width}x${height}`;
|
|
1835
1947
|
if (this.depthMaps.has(key2)) continue;
|
|
1836
1948
|
try {
|
|
1837
1949
|
const maskImg = await this.imageCache.get(source.maskSource);
|
|
1838
1950
|
const canvas = this.createCanvas(width, height);
|
|
1839
1951
|
const mctx = canvas.getContext("2d");
|
|
1840
|
-
const data = mctx ? (mctx.drawImage(maskImg, 0, 0, width, height), _optionalChain([mctx, 'access',
|
|
1952
|
+
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
1953
|
if (data) {
|
|
1842
1954
|
this.depthMaps.set(key2, { width, height, data: data.data });
|
|
1843
1955
|
this.assetVersion++;
|
|
1844
1956
|
}
|
|
1845
|
-
} catch (
|
|
1957
|
+
} catch (e15) {
|
|
1846
1958
|
}
|
|
1847
1959
|
}
|
|
1848
1960
|
if (l.type === "annotation" && l.annotation.type === "image" && !this.imageCache.peek(l.annotation.src)) {
|
|
1849
1961
|
try {
|
|
1850
1962
|
await this.imageCache.get(l.annotation.src);
|
|
1851
1963
|
this.assetVersion++;
|
|
1852
|
-
} catch (
|
|
1964
|
+
} catch (e16) {
|
|
1853
1965
|
}
|
|
1854
1966
|
}
|
|
1855
1967
|
}
|
|
@@ -1877,7 +1989,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1877
1989
|
this.drawAnnotationShape(ctx, annotation, img);
|
|
1878
1990
|
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
1879
1991
|
return new Uint8ClampedArray(ctx.getImageData(0, 0, rect2.width, rect2.height).data);
|
|
1880
|
-
} catch (
|
|
1992
|
+
} catch (e17) {
|
|
1881
1993
|
return null;
|
|
1882
1994
|
}
|
|
1883
1995
|
}
|
|
@@ -1891,7 +2003,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1891
2003
|
if (x1 <= x0 || y1 <= y0) return;
|
|
1892
2004
|
const img = ctx.createImageData(_chunk474IQG74cjs.TILE, _chunk474IQG74cjs.TILE);
|
|
1893
2005
|
img.data.set(data);
|
|
1894
|
-
_optionalChain([this, 'access',
|
|
2006
|
+
_optionalChain([this, 'access', _47 => _47.display, 'optionalCall', _48 => _48(img.data)]);
|
|
1895
2007
|
ctx.putImageData(img, ox, oy, x0, y0, x1 - x0, y1 - y0);
|
|
1896
2008
|
}
|
|
1897
2009
|
/**
|
|
@@ -1958,7 +2070,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1958
2070
|
const opacity = _nullishCoalesce(state.outputOpacity, () => ( 1));
|
|
1959
2071
|
const blur = _nullishCoalesce(state.legacyOutputBlur, () => ( 0));
|
|
1960
2072
|
if (!(opacity < 1) && !(blur > 0)) return null;
|
|
1961
|
-
const data = _optionalChain([ctx, 'access',
|
|
2073
|
+
const data = _optionalChain([ctx, 'access', _49 => _49.getImageData, 'optionalCall', _50 => _50(0, 0, w, h)]);
|
|
1962
2074
|
if (!data) return null;
|
|
1963
2075
|
applyOutputStage(data, opacity, blur);
|
|
1964
2076
|
ctx.putImageData(data, 0, 0);
|
|
@@ -1967,11 +2079,12 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1967
2079
|
publishHistogram(histogram) {
|
|
1968
2080
|
if (histogram === this.previewHistogram) return;
|
|
1969
2081
|
this.previewHistogram = histogram;
|
|
1970
|
-
_optionalChain([this, 'access',
|
|
2082
|
+
_optionalChain([this, 'access', _51 => _51.onPreviewHistogram, 'optionalCall', _52 => _52(histogram)]);
|
|
1971
2083
|
}
|
|
1972
2084
|
__init21() {this.quickMaskCache = /* @__PURE__ */ new WeakMap()}
|
|
1973
|
-
__init22() {this.
|
|
1974
|
-
__init23() {this.
|
|
2085
|
+
__init22() {this.diffCache = /* @__PURE__ */ new WeakMap()}
|
|
2086
|
+
__init23() {this.outlineCache = /* @__PURE__ */ new WeakMap()}
|
|
2087
|
+
__init24() {this.emptyMaskCache = null}
|
|
1975
2088
|
/** An empty selection of the image's size (Quick Mask mode with nothing selected). */
|
|
1976
2089
|
emptyMask(width, height) {
|
|
1977
2090
|
const m = this.emptyMaskCache;
|
|
@@ -1979,15 +2092,15 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1979
2092
|
this.emptyMaskCache = _chunkSS53NNZOcjs.createSelectionMask.call(void 0, Math.max(1, width), Math.max(1, height));
|
|
1980
2093
|
return this.emptyMaskCache;
|
|
1981
2094
|
}
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
2095
|
+
__init25() {this.overlayCache = /* @__PURE__ */ new WeakMap()}
|
|
2096
|
+
__init26() {this.maskViewCache = /* @__PURE__ */ new WeakMap()}
|
|
2097
|
+
__init27() {this.grayCache = /* @__PURE__ */ new WeakMap()}
|
|
1985
2098
|
/** A layer's mask as canvas-sized coverage for its mask view, kept while the mask is unchanged. */
|
|
1986
2099
|
maskViewSelection(layer, width, height) {
|
|
1987
2100
|
if (!layer.mask || layer.mask.source || width < 1 || height < 1) return null;
|
|
1988
2101
|
const key2 = `${width}x${height}:${layer.type === "pixel" ? `${layer.offset.x},${layer.offset.y}` : ""}`;
|
|
1989
2102
|
const cached = this.maskViewCache.get(layer.mask.surface);
|
|
1990
|
-
if (_optionalChain([cached, 'optionalAccess',
|
|
2103
|
+
if (_optionalChain([cached, 'optionalAccess', _53 => _53.key]) === key2) return cached.mask;
|
|
1991
2104
|
const mask = _chunkS55JFWDAcjs.layerMaskSelection.call(void 0, layer, width, height);
|
|
1992
2105
|
if (mask) this.maskViewCache.set(layer.mask.surface, { key: key2, mask });
|
|
1993
2106
|
return mask;
|
|
@@ -2008,7 +2121,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2008
2121
|
}
|
|
2009
2122
|
/** A channel's tint (colour, opacity, masked or selected area), drawn in natural image space. */
|
|
2010
2123
|
drawMaskOverlay(ctx, mask, style) {
|
|
2011
|
-
const key2 = `${_optionalChain([style, 'access',
|
|
2124
|
+
const key2 = `${_optionalChain([style, 'access', _54 => _54.color, 'optionalAccess', _55 => _55.join, 'call', _56 => _56(",")])}|${style.opacity}|${style.indicates}`;
|
|
2012
2125
|
let cached = this.overlayCache.get(mask);
|
|
2013
2126
|
if (!cached || cached.key !== key2) {
|
|
2014
2127
|
const canvas = this.createCanvas(mask.width, mask.height);
|
|
@@ -2023,6 +2136,19 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2023
2136
|
ctx.drawImage(cached.canvas, 0, 0, mask.width, mask.height);
|
|
2024
2137
|
}
|
|
2025
2138
|
/** Rubylith over the unselected area, drawn in natural image space. */
|
|
2139
|
+
drawSelectionDiff(ctx, diff) {
|
|
2140
|
+
let canvas = this.diffCache.get(diff);
|
|
2141
|
+
if (!canvas) {
|
|
2142
|
+
canvas = this.createCanvas(diff.added.width, diff.added.height);
|
|
2143
|
+
const mctx = canvas.getContext("2d");
|
|
2144
|
+
if (!mctx || typeof mctx.createImageData !== "function") return;
|
|
2145
|
+
const img = mctx.createImageData(diff.added.width, diff.added.height);
|
|
2146
|
+
img.data.set(selectionDiffPixels(diff.added, diff.removed));
|
|
2147
|
+
mctx.putImageData(img, 0, 0);
|
|
2148
|
+
this.diffCache.set(diff, canvas);
|
|
2149
|
+
}
|
|
2150
|
+
ctx.drawImage(canvas, 0, 0, diff.added.width, diff.added.height);
|
|
2151
|
+
}
|
|
2026
2152
|
drawQuickMask(ctx, selection) {
|
|
2027
2153
|
let canvas = this.quickMaskCache.get(selection);
|
|
2028
2154
|
if (!canvas) {
|
|
@@ -2131,7 +2257,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2131
2257
|
_chunkOLNIPTB3cjs.blendImageData.call(void 0, backdrop, source, _chunkOLNIPTB3cjs.normalizeBlendMode.call(void 0, ann.blend));
|
|
2132
2258
|
lctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
2133
2259
|
lctx.putImageData(backdrop, 0, 0);
|
|
2134
|
-
} catch (
|
|
2260
|
+
} catch (e18) {
|
|
2135
2261
|
return false;
|
|
2136
2262
|
}
|
|
2137
2263
|
ctx.save();
|
|
@@ -2147,7 +2273,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2147
2273
|
if (ann.type === "image") {
|
|
2148
2274
|
try {
|
|
2149
2275
|
img = await this.imageCache.get(ann.src);
|
|
2150
|
-
} catch (
|
|
2276
|
+
} catch (e19) {
|
|
2151
2277
|
}
|
|
2152
2278
|
}
|
|
2153
2279
|
this.drawAnnotationShape(ctx, ann, img);
|
|
@@ -2426,8 +2552,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2426
2552
|
if (!ctx) return maskCanvas;
|
|
2427
2553
|
ctx.fillStyle = MASK_BLACK;
|
|
2428
2554
|
ctx.fillRect(0, 0, naturalWidth, naturalHeight);
|
|
2429
|
-
const useCrop = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2430
|
-
const useAnnotations = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2555
|
+
const useCrop = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _57 => _57.useCrop]), () => ( true));
|
|
2556
|
+
const useAnnotations = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _58 => _58.useAnnotations]), () => ( true));
|
|
2431
2557
|
if (useCrop && state.crop) {
|
|
2432
2558
|
ctx.fillStyle = MASK_WHITE;
|
|
2433
2559
|
ctx.fillRect(state.crop.x, state.crop.y, state.crop.width, state.crop.height);
|
|
@@ -2437,8 +2563,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2437
2563
|
this.drawAnnotationMask(ctx, ann);
|
|
2438
2564
|
}
|
|
2439
2565
|
}
|
|
2440
|
-
const imageData = _optionalChain([ctx, 'access',
|
|
2441
|
-
const selection = (_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
2566
|
+
const imageData = _optionalChain([ctx, 'access', _59 => _59.getImageData, 'optionalCall', _60 => _60(0, 0, naturalWidth, naturalHeight)]);
|
|
2567
|
+
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
2568
|
if (imageData) {
|
|
2443
2569
|
const d = imageData.data;
|
|
2444
2570
|
for (let i = 0; i < d.length; i += 4) {
|
|
@@ -2524,16 +2650,16 @@ function getBaseProjection(region, transform, baseW, baseH) {
|
|
|
2524
2650
|
};
|
|
2525
2651
|
}
|
|
2526
2652
|
var CompositeCanvas = (_class3 = class {
|
|
2527
|
-
constructor(canvas, rect2) {;_class3.prototype.
|
|
2653
|
+
constructor(canvas, rect2) {;_class3.prototype.__init28.call(this);_class3.prototype.__init29.call(this);_class3.prototype.__init30.call(this);
|
|
2528
2654
|
this.canvas = canvas;
|
|
2529
2655
|
this.rect = rect2;
|
|
2530
2656
|
this.region = rect2;
|
|
2531
2657
|
}
|
|
2532
2658
|
|
|
2533
2659
|
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2660
|
+
__init28() {this.tiles = /* @__PURE__ */ new Map()}
|
|
2661
|
+
__init29() {this.histograms = /* @__PURE__ */ new Map()}
|
|
2662
|
+
__init30() {this.version = 0}
|
|
2537
2663
|
|
|
2538
2664
|
/** Histogram of the composite over the region (per-tile parts are cached). */
|
|
2539
2665
|
histogram() {
|
|
@@ -2987,10 +3113,10 @@ function regions(a, W, H, b, minArea) {
|
|
|
2987
3113
|
const kept = list.filter((r) => r.area >= minArea).sort((p, q) => q.area - p.area);
|
|
2988
3114
|
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
3115
|
};
|
|
2990
|
-
const
|
|
3116
|
+
const pieces2 = found.filter((r) => r.fg).sort((p, q) => q.area - p.area);
|
|
2991
3117
|
return {
|
|
2992
3118
|
holes: summarize(found.filter((r) => !r.fg && !r.outer)),
|
|
2993
|
-
islands: summarize(
|
|
3119
|
+
islands: summarize(pieces2.slice(1))
|
|
2994
3120
|
};
|
|
2995
3121
|
}
|
|
2996
3122
|
|
|
@@ -3194,8 +3320,8 @@ var EdgeMap = (_class4 = class {
|
|
|
3194
3320
|
|
|
3195
3321
|
|
|
3196
3322
|
|
|
3197
|
-
|
|
3198
|
-
constructor(pixels, options = {}) {;_class4.prototype.
|
|
3323
|
+
__init31() {this.blocks = /* @__PURE__ */ new Map()}
|
|
3324
|
+
constructor(pixels, options = {}) {;_class4.prototype.__init31.call(this);
|
|
3199
3325
|
const { width, height, data } = pixels;
|
|
3200
3326
|
if (!(width >= 1 && height >= 1) || data.length < width * height * 4) throw new Error("Invalid pixel buffer for edge detection.");
|
|
3201
3327
|
this.width = width;
|
|
@@ -3312,10 +3438,10 @@ function snapToEdge(map, point, width = 10) {
|
|
|
3312
3438
|
}
|
|
3313
3439
|
return best > 0 ? { x: bx + 0.5, y: by + 0.5 } : point;
|
|
3314
3440
|
}
|
|
3315
|
-
var Heap = (_class5 = class {constructor() { _class5.prototype.
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3441
|
+
var Heap = (_class5 = class {constructor() { _class5.prototype.__init32.call(this);_class5.prototype.__init33.call(this);_class5.prototype.__init34.call(this); }
|
|
3442
|
+
__init32() {this.ids = new Int32Array(256)}
|
|
3443
|
+
__init33() {this.keys = new Float64Array(256)}
|
|
3444
|
+
__init34() {this.size = 0}
|
|
3319
3445
|
push(id, key2) {
|
|
3320
3446
|
if (this.size === this.ids.length) {
|
|
3321
3447
|
const ids = new Int32Array(this.size * 2);
|
|
@@ -3522,15 +3648,15 @@ function readPaths(stored, problems = []) {
|
|
|
3522
3648
|
let work = false;
|
|
3523
3649
|
for (const [i, raw] of stored.entries()) {
|
|
3524
3650
|
const r = raw;
|
|
3525
|
-
const name = typeof _optionalChain([r, 'optionalAccess',
|
|
3651
|
+
const name = typeof _optionalChain([r, 'optionalAccess', _64 => _64.name]) === "string" && r.name.trim() ? r.name.trim() : `Path ${i + 1}`;
|
|
3526
3652
|
try {
|
|
3527
|
-
const components = _chunkS55JFWDAcjs.readShapeComponents.call(void 0, _optionalChain([r, 'optionalAccess',
|
|
3528
|
-
let id = typeof _optionalChain([r, 'optionalAccess',
|
|
3653
|
+
const components = _chunkS55JFWDAcjs.readShapeComponents.call(void 0, _optionalChain([r, 'optionalAccess', _65 => _65.components]));
|
|
3654
|
+
let id = typeof _optionalChain([r, 'optionalAccess', _66 => _66.id]) === "string" && r.id ? r.id : newPathId();
|
|
3529
3655
|
if (ids.has(id)) id = newPathId();
|
|
3530
3656
|
ids.add(id);
|
|
3531
3657
|
const path = { id, name, components };
|
|
3532
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
3533
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
3658
|
+
if (_optionalChain([r, 'optionalAccess', _67 => _67.fillRule]) === "evenodd") path.fillRule = "evenodd";
|
|
3659
|
+
if (_optionalChain([r, 'optionalAccess', _68 => _68.work]) === true && !work) {
|
|
3534
3660
|
path.work = true;
|
|
3535
3661
|
work = true;
|
|
3536
3662
|
}
|
|
@@ -3601,15 +3727,15 @@ function liveShapeForDrag(o, a, b, mods = {}) {
|
|
|
3601
3727
|
return null;
|
|
3602
3728
|
}
|
|
3603
3729
|
var ShapeDrawGesture = (_class6 = class {
|
|
3604
|
-
constructor(controller, options) {;_class6.prototype.
|
|
3730
|
+
constructor(controller, options) {;_class6.prototype.__init35.call(this);_class6.prototype.__init36.call(this);_class6.prototype.__init37.call(this);
|
|
3605
3731
|
this.controller = controller;
|
|
3606
3732
|
this.options = options;
|
|
3607
3733
|
}
|
|
3608
3734
|
|
|
3609
3735
|
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3736
|
+
__init35() {this.start = null}
|
|
3737
|
+
__init36() {this.layerId = null}
|
|
3738
|
+
__init37() {this.error = null}
|
|
3613
3739
|
get active() {
|
|
3614
3740
|
return this.start !== null;
|
|
3615
3741
|
}
|
|
@@ -3654,11 +3780,11 @@ function applyShapeOptions(controller, layerId, change) {
|
|
|
3654
3780
|
const style = {};
|
|
3655
3781
|
if ("fill" in change) style.fill = _nullishCoalesce(change.fill, () => ( null));
|
|
3656
3782
|
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',
|
|
3783
|
+
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;
|
|
3784
|
+
style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access', _72 => _72.stroke, 'optionalAccess', _73 => _73.width]))), () => ( 2)), paint: color } : null;
|
|
3659
3785
|
}
|
|
3660
3786
|
if (Object.keys(style).length) controller.setShapeStyle(layerId, style);
|
|
3661
|
-
const live = _optionalChain([info, 'access',
|
|
3787
|
+
const live = _optionalChain([info, 'access', _74 => _74.components, 'access', _75 => _75[0], 'optionalAccess', _76 => _76.live]);
|
|
3662
3788
|
if (!live) return;
|
|
3663
3789
|
const shape = {};
|
|
3664
3790
|
if (live.kind === "rect" && change.radius !== void 0) shape.radius = change.radius;
|
|
@@ -3670,7 +3796,7 @@ function applyShapeOptions(controller, layerId, change) {
|
|
|
3670
3796
|
if (Object.keys(shape).length) controller.setShapeComponent(layerId, 0, { shape });
|
|
3671
3797
|
}
|
|
3672
3798
|
var TextEditSession = (_class7 = class {
|
|
3673
|
-
constructor(controller, layerId, index) {;_class7.prototype.
|
|
3799
|
+
constructor(controller, layerId, index) {;_class7.prototype.__init38.call(this);_class7.prototype.__init39.call(this);_class7.prototype.__init40.call(this);
|
|
3674
3800
|
this.controller = controller;
|
|
3675
3801
|
this.layerId = layerId;
|
|
3676
3802
|
const n = this.text.length;
|
|
@@ -3680,11 +3806,11 @@ var TextEditSession = (_class7 = class {
|
|
|
3680
3806
|
|
|
3681
3807
|
|
|
3682
3808
|
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3809
|
+
__init38() {this.changed = false}
|
|
3810
|
+
__init39() {this.listeners = /* @__PURE__ */ new Set()}
|
|
3811
|
+
__init40() {this.error = null}
|
|
3686
3812
|
get layer() {
|
|
3687
|
-
const l = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess',
|
|
3813
|
+
const l = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _77 => _77.layer]);
|
|
3688
3814
|
if (!l || l.type !== "type") throw new Error("The type layer being edited is gone.");
|
|
3689
3815
|
return l;
|
|
3690
3816
|
}
|
|
@@ -3699,7 +3825,7 @@ var TextEditSession = (_class7 = class {
|
|
|
3699
3825
|
}
|
|
3700
3826
|
/** Whether the layer still exists (it can be deleted or undone away while editing). */
|
|
3701
3827
|
get alive() {
|
|
3702
|
-
return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess',
|
|
3828
|
+
return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _78 => _78.layer, 'access', _79 => _79.type]) === "type";
|
|
3703
3829
|
}
|
|
3704
3830
|
subscribe(fn) {
|
|
3705
3831
|
this.listeners.add(fn);
|
|
@@ -3885,14 +4011,14 @@ var TextEditSession = (_class7 = class {
|
|
|
3885
4011
|
if (!this.text.trim().length) {
|
|
3886
4012
|
try {
|
|
3887
4013
|
this.controller.removeLayer(this.layerId);
|
|
3888
|
-
} catch (
|
|
4014
|
+
} catch (e20) {
|
|
3889
4015
|
}
|
|
3890
4016
|
return false;
|
|
3891
4017
|
}
|
|
3892
4018
|
if (this.layer.name === "Text" && this.changed) {
|
|
3893
4019
|
try {
|
|
3894
4020
|
this.controller.setLayerProperties(this.layerId, { name: _chunkS55JFWDAcjs.typeLayerName.call(void 0, this.text) }, false);
|
|
3895
|
-
} catch (
|
|
4021
|
+
} catch (e21) {
|
|
3896
4022
|
}
|
|
3897
4023
|
}
|
|
3898
4024
|
return true;
|
|
@@ -3931,15 +4057,15 @@ function invert(m) {
|
|
|
3931
4057
|
return [d / det, -b / det, -c / det, a / det, (c * f - d * e) / det, (b * e - a * f) / det];
|
|
3932
4058
|
}
|
|
3933
4059
|
var TypeToolGesture = (_class8 = class {
|
|
3934
|
-
constructor(controller, options) {;_class8.prototype.
|
|
4060
|
+
constructor(controller, options) {;_class8.prototype.__init41.call(this);_class8.prototype.__init42.call(this);_class8.prototype.__init43.call(this);
|
|
3935
4061
|
this.controller = controller;
|
|
3936
4062
|
this.options = options;
|
|
3937
4063
|
}
|
|
3938
4064
|
|
|
3939
4065
|
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
4066
|
+
__init41() {this.session = null}
|
|
4067
|
+
__init42() {this.dragStart = null}
|
|
4068
|
+
__init43() {this.error = null}
|
|
3943
4069
|
down(p, mods = {}) {
|
|
3944
4070
|
this.error = null;
|
|
3945
4071
|
const hit = typeLayerAt(this.controller, p);
|
|
@@ -3987,7 +4113,7 @@ var TypeToolGesture = (_class8 = class {
|
|
|
3987
4113
|
finish() {
|
|
3988
4114
|
const s = this.session;
|
|
3989
4115
|
this.session = null;
|
|
3990
|
-
_optionalChain([s, 'optionalAccess',
|
|
4116
|
+
_optionalChain([s, 'optionalAccess', _80 => _80.close, 'call', _81 => _81()]);
|
|
3991
4117
|
}
|
|
3992
4118
|
}, _class8);
|
|
3993
4119
|
|
|
@@ -4339,7 +4465,7 @@ function segmentToSelection(width, height, result) {
|
|
|
4339
4465
|
const sized = raw.width === width && raw.height === height ? raw : _chunkSS53NNZOcjs.resizeSelection.call(void 0, raw, width, height);
|
|
4340
4466
|
out = _chunkSS53NNZOcjs.combineSelections.call(void 0, out, sized, "add");
|
|
4341
4467
|
}
|
|
4342
|
-
return _optionalChain([out, 'optionalAccess',
|
|
4468
|
+
return _optionalChain([out, 'optionalAccess', _82 => _82.bounds]) ? out : null;
|
|
4343
4469
|
}
|
|
4344
4470
|
function segmentsToSelection(width, height, results) {
|
|
4345
4471
|
let out = null;
|
|
@@ -4388,7 +4514,7 @@ function deserializeChannels(value, size, problems = []) {
|
|
|
4388
4514
|
visible: v.visible === true
|
|
4389
4515
|
});
|
|
4390
4516
|
} catch (err) {
|
|
4391
|
-
problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess',
|
|
4517
|
+
problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess', _83 => _83.name]), () => ( "?")))}" could not be read: ${err instanceof Error ? err.message : String(err)}.`);
|
|
4392
4518
|
}
|
|
4393
4519
|
}
|
|
4394
4520
|
return out;
|
|
@@ -4426,16 +4552,16 @@ function checkEffectTime(time) {
|
|
|
4426
4552
|
return time;
|
|
4427
4553
|
}
|
|
4428
4554
|
function checkEffectAnimation(animate) {
|
|
4429
|
-
const duration = _optionalChain([animate, 'optionalAccess',
|
|
4555
|
+
const duration = _optionalChain([animate, 'optionalAccess', _84 => _84.duration]);
|
|
4430
4556
|
if (!(typeof duration === "number" && Number.isFinite(duration) && duration > 0 && duration <= _chunkS55JFWDAcjs.MAX_EFFECT_ANIMATION_MS)) {
|
|
4431
4557
|
throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`animate.duration must be more than 0 and at most ${_chunkS55JFWDAcjs.MAX_EFFECT_ANIMATION_MS} ms.`);
|
|
4432
4558
|
}
|
|
4433
4559
|
return { duration: Math.round(duration) };
|
|
4434
4560
|
}
|
|
4435
4561
|
function effectLayerTiming(g, d) {
|
|
4436
|
-
if (!_optionalChain([d, 'optionalAccess',
|
|
4562
|
+
if (!_optionalChain([d, 'optionalAccess', _85 => _85.duration])) return null;
|
|
4437
4563
|
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',
|
|
4564
|
+
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
4565
|
}
|
|
4440
4566
|
|
|
4441
4567
|
// src/image-editor/effects.ts
|
|
@@ -4482,16 +4608,16 @@ function effectPixelsToSurface(p, depth) {
|
|
|
4482
4608
|
}
|
|
4483
4609
|
var ImageEffectsEngine = (_class9 = class {
|
|
4484
4610
|
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4611
|
+
__init44() {this.cache = /* @__PURE__ */ new Map()}
|
|
4612
|
+
__init45() {this.pending = /* @__PURE__ */ new Map()}
|
|
4613
|
+
__init46() {this.failures = /* @__PURE__ */ new Map()}
|
|
4488
4614
|
|
|
4489
|
-
|
|
4490
|
-
|
|
4615
|
+
__init47() {this.descriptions = /* @__PURE__ */ new Map()}
|
|
4616
|
+
__init48() {this.listeners = /* @__PURE__ */ new Set()}
|
|
4491
4617
|
|
|
4492
|
-
|
|
4618
|
+
__init49() {this.generation = 0}
|
|
4493
4619
|
|
|
4494
|
-
constructor(options = {}) {;_class9.prototype.
|
|
4620
|
+
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
4621
|
this.slot = _nullishCoalesce(options.slot, () => ( new (0, _chunkA3A5TI6Rcjs.EffectsSlot)()));
|
|
4496
4622
|
this.maxEntries = _nullishCoalesce(options.maxEntries, () => ( 24));
|
|
4497
4623
|
this.pool = new (0, _chunkPY4GWSE2cjs.EffectRendererPool)({ maxRenderers: options.maxRenderers });
|
|
@@ -4683,19 +4809,19 @@ function liftMask(mask, sel, o) {
|
|
|
4683
4809
|
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
4810
|
}
|
|
4685
4811
|
var FreeTransformSession = (_class10 = class {
|
|
4686
|
-
constructor(host, init = {}) {;_class10.prototype.
|
|
4812
|
+
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
4813
|
this.host = host;
|
|
4688
4814
|
if (init.interpolation !== void 0 && !_chunkB46UQUDCcjs.isInterpolation.call(void 0, init.interpolation)) fail(`Unknown interpolation "${String(init.interpolation)}"; use nearest, bilinear or bicubic.`);
|
|
4689
4815
|
this.interp = _nullishCoalesce(init.interpolation, () => ( "bicubic"));
|
|
4690
4816
|
const sel = host.selection();
|
|
4691
|
-
const selected = Boolean(_optionalChain([sel, 'optionalAccess',
|
|
4817
|
+
const selected = Boolean(_optionalChain([sel, 'optionalAccess', _88 => _88.bounds]));
|
|
4692
4818
|
let content = _nullishCoalesce(init.content, () => ( "auto"));
|
|
4693
4819
|
if (!["auto", "layer", "selection", "selection-copy", "selection-outline"].includes(content)) {
|
|
4694
4820
|
fail(`Unknown content "${String(content)}"; use auto, layer, selection, selection-copy or selection-outline.`);
|
|
4695
4821
|
}
|
|
4696
4822
|
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',
|
|
4823
|
+
const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess', _89 => _89.layer]) : void 0;
|
|
4824
|
+
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
4825
|
if (content === "auto") content = selected && !smartTarget ? "selection" : "layer";
|
|
4700
4826
|
this.content = content;
|
|
4701
4827
|
if (content !== "layer" && !selected) fail(`Nothing is selected; ${content} needs a selection. Select first, or use content layer.`);
|
|
@@ -4719,9 +4845,9 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4719
4845
|
const mask = layer.mask && !layer.mask.source ? layer.mask : void 0;
|
|
4720
4846
|
const channel = _nullishCoalesce(init.channel, () => ( (layer.id === host.activeLayerId() ? host.activeTarget() : "pixels")));
|
|
4721
4847
|
if (channel !== "pixels" && channel !== "mask") fail(`Unknown channel "${String(channel)}"; use pixels or mask.`);
|
|
4722
|
-
const linked = _optionalChain([mask, 'optionalAccess',
|
|
4848
|
+
const linked = _optionalChain([mask, 'optionalAccess', _93 => _93.linked]) !== false;
|
|
4723
4849
|
const maskAlone = channel === "mask" && (!linked || layer.type !== "pixel");
|
|
4724
|
-
if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access',
|
|
4850
|
+
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
4851
|
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
4852
|
if (!layer.visible && content !== "selection-copy") fail(`Layer "${layer.name || id}" is hidden; show it before you transform it.`);
|
|
4727
4853
|
if (content !== "selection-copy") {
|
|
@@ -4824,7 +4950,7 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4824
4950
|
};
|
|
4825
4951
|
this.copyId = copy.id;
|
|
4826
4952
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, layer.id);
|
|
4827
|
-
this.startLayers = _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
4953
|
+
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
4954
|
this.parts.push({ what: "pixels", offset: o, moving: lifted, base: null, reduced: /* @__PURE__ */ new Map() });
|
|
4829
4955
|
moves.push("pixels");
|
|
4830
4956
|
}
|
|
@@ -4850,7 +4976,7 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4850
4976
|
/** The layer being transformed (`null` for `selection-outline`). */
|
|
4851
4977
|
|
|
4852
4978
|
/** The new layer of a `selection-copy`. */
|
|
4853
|
-
|
|
4979
|
+
__init50() {this.copyId = null}
|
|
4854
4980
|
/** The frame (document pixels). */
|
|
4855
4981
|
|
|
4856
4982
|
/** What moves. */
|
|
@@ -4862,27 +4988,27 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4862
4988
|
*/
|
|
4863
4989
|
|
|
4864
4990
|
/** True when the layer is a smart object (the transform sets its placement). */
|
|
4865
|
-
|
|
4991
|
+
__init51() {this.smartObject = false}
|
|
4866
4992
|
/** True when the layer is a shape layer (the transform maps its paths and renders them again). */
|
|
4867
|
-
|
|
4868
|
-
|
|
4993
|
+
__init52() {this.shapeLayer = false}
|
|
4994
|
+
__init53() {this.shape = null}
|
|
4869
4995
|
/** True when the layer is a type layer (the transform sets its text matrix; affine only). */
|
|
4870
|
-
|
|
4871
|
-
|
|
4996
|
+
__init54() {this.typeLayer = false}
|
|
4997
|
+
__init55() {this.typeTarget = null}
|
|
4872
4998
|
|
|
4873
|
-
|
|
4874
|
-
|
|
4999
|
+
__init56() {this.smart = null}
|
|
5000
|
+
__init57() {this.smartReduced = /* @__PURE__ */ new Map()}
|
|
4875
5001
|
|
|
4876
|
-
|
|
5002
|
+
__init58() {this.smartMasksMoved = false}
|
|
4877
5003
|
|
|
4878
|
-
|
|
5004
|
+
__init59() {this.parts = []}
|
|
4879
5005
|
|
|
4880
5006
|
|
|
4881
5007
|
|
|
4882
5008
|
|
|
4883
5009
|
/** The stack this session last showed: anything else means the document changed under it. */
|
|
4884
5010
|
|
|
4885
|
-
|
|
5011
|
+
__init60() {this.closed = false}
|
|
4886
5012
|
/** The current geometry. */
|
|
4887
5013
|
get geometry() {
|
|
4888
5014
|
return this.geometryValue;
|
|
@@ -4933,7 +5059,7 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4933
5059
|
moveVectorMask(layers) {
|
|
4934
5060
|
const g = this.geometryValue;
|
|
4935
5061
|
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',
|
|
5062
|
+
const vm = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess', _98 => _98.layer, 'access', _99 => _99.vectorMask]);
|
|
4937
5063
|
if (!vm || vm.linked === false) return layers;
|
|
4938
5064
|
const warp = _chunkS55JFWDAcjs.hasWarp.call(void 0, g);
|
|
4939
5065
|
const f = warp ? _chunkS55JFWDAcjs.transformMap.call(void 0, g) : null;
|
|
@@ -5104,11 +5230,11 @@ var FreeTransformSession = (_class10 = class {
|
|
|
5104
5230
|
result(changed, layers, selection) {
|
|
5105
5231
|
let bounds = null;
|
|
5106
5232
|
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',
|
|
5233
|
+
const layer = id ? _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _100 => _100.layer]) : void 0;
|
|
5234
|
+
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);
|
|
5235
|
+
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);
|
|
5236
|
+
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 });
|
|
5237
|
+
else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess', _106 => _106.bounds]) ? { ...selection.bounds } : null;
|
|
5112
5238
|
return {
|
|
5113
5239
|
layerId: _nullishCoalesce(this.copyId, () => ( this.layerId)),
|
|
5114
5240
|
content: this.content,
|
|
@@ -5137,7 +5263,7 @@ function deserializeColorMode(raw, problems) {
|
|
|
5137
5263
|
}
|
|
5138
5264
|
function effectiveProof(proof, mode) {
|
|
5139
5265
|
if (proof) return proof;
|
|
5140
|
-
if (_optionalChain([mode, 'optionalAccess',
|
|
5266
|
+
if (_optionalChain([mode, 'optionalAccess', _107 => _107.mode]) === "cmyk") return { ...DEFAULT_PROOF, profile: mode.profile, intent: mode.intent };
|
|
5141
5267
|
return null;
|
|
5142
5268
|
}
|
|
5143
5269
|
function colorModePlanes(doc, mode) {
|
|
@@ -5192,7 +5318,7 @@ function resolveProfile(doc) {
|
|
|
5192
5318
|
return p;
|
|
5193
5319
|
}
|
|
5194
5320
|
function profileBytes(doc) {
|
|
5195
|
-
if (_optionalChain([doc, 'optionalAccess',
|
|
5321
|
+
if (_optionalChain([doc, 'optionalAccess', _108 => _108.icc])) return doc.icc;
|
|
5196
5322
|
const p = resolveProfile(doc);
|
|
5197
5323
|
return _nullishCoalesce(p.bytes, () => ( _chunkBROJYMWUcjs.encodeProfile.call(void 0, p)));
|
|
5198
5324
|
}
|
|
@@ -5209,7 +5335,7 @@ function isSrgb(doc) {
|
|
|
5209
5335
|
if (!doc || doc.builtin === "srgb") return true;
|
|
5210
5336
|
try {
|
|
5211
5337
|
return _chunkBROJYMWUcjs.sameColors.call(void 0, resolveProfile(doc), _chunkBROJYMWUcjs.srgbProfile.call(void 0, ), _chunkBROJYMWUcjs.builtinProfile.call(void 0, "lab-d50"));
|
|
5212
|
-
} catch (
|
|
5338
|
+
} catch (e22) {
|
|
5213
5339
|
return false;
|
|
5214
5340
|
}
|
|
5215
5341
|
}
|
|
@@ -5354,7 +5480,7 @@ function paintCoverageInto(base, coverage, apply, rects, depth = null) {
|
|
|
5354
5480
|
else tiles.delete(key2);
|
|
5355
5481
|
continue;
|
|
5356
5482
|
}
|
|
5357
|
-
const src = _nullishCoalesce(_optionalChain([base, 'access',
|
|
5483
|
+
const src = _nullishCoalesce(_optionalChain([base, 'access', _109 => _109.tiles, 'access', _110 => _110.get, 'call', _111 => _111(key2), 'optionalAccess', _112 => _112.data]), () => ( defaultTile(base)));
|
|
5358
5484
|
const data = _chunkPQ3H2AANcjs.applyStrokeToTile.call(void 0, coverage, src, base.channels, t.tx, t.ty, apply);
|
|
5359
5485
|
const tile = _chunk474IQG74cjs.finishTile.call(void 0, data, base.channels, base.defaultValue);
|
|
5360
5486
|
if (tile) tiles.set(key2, tile);
|
|
@@ -5369,7 +5495,7 @@ function defaultTile(s) {
|
|
|
5369
5495
|
return d;
|
|
5370
5496
|
}
|
|
5371
5497
|
var PaintStrokeSession = (_class11 = class {
|
|
5372
|
-
constructor(controller, target, stroke, apply, depth = null) {;_class11.prototype.
|
|
5498
|
+
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
5499
|
this.controller = controller;
|
|
5374
5500
|
this.target = target;
|
|
5375
5501
|
this.apply = apply;
|
|
@@ -5406,28 +5532,28 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5406
5532
|
|
|
5407
5533
|
|
|
5408
5534
|
|
|
5409
|
-
|
|
5535
|
+
__init61() {this.touched = /* @__PURE__ */ new Set()}
|
|
5410
5536
|
|
|
5411
5537
|
|
|
5412
|
-
|
|
5413
|
-
|
|
5538
|
+
__init62() {this.mixerInit = null}
|
|
5539
|
+
__init63() {this.retouch = null}
|
|
5414
5540
|
/** Writes a mask's RGBA view back (sequential retouching on a mask). */
|
|
5415
|
-
|
|
5416
|
-
|
|
5541
|
+
__init64() {this.flushView = null}
|
|
5542
|
+
__init65() {this.started = false}
|
|
5417
5543
|
/** Mixer tiles written since the last update: they get new tile objects so the compositor sees them change. */
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5544
|
+
__init66() {this.fresh = /* @__PURE__ */ new Set()}
|
|
5545
|
+
__init67() {this.last = null}
|
|
5546
|
+
__init68() {this.closed = false}
|
|
5421
5547
|
/** Brush and eraser strokes on a 16- or 32-bit document: the deep samples of each touched tile. */
|
|
5422
5548
|
|
|
5423
|
-
|
|
5549
|
+
__init69() {this.liveDeep = /* @__PURE__ */ new Map()}
|
|
5424
5550
|
/**
|
|
5425
5551
|
* Mixer Brush, Smudge and Sponge on a 16- or 32-bit layer: they read and write float working
|
|
5426
5552
|
* tiles on the 8-bit 0..255 sRGB-encoded scale, which keep the fractions bytes would round away.
|
|
5427
5553
|
*/
|
|
5428
5554
|
|
|
5429
|
-
|
|
5430
|
-
|
|
5555
|
+
__init70() {this.work = /* @__PURE__ */ new Map()}
|
|
5556
|
+
__init71() {this.workRead = /* @__PURE__ */ new Map()}
|
|
5431
5557
|
/** The pre-stroke tile as a float working tile (cached; `null`: transparent). */
|
|
5432
5558
|
readWork(key2) {
|
|
5433
5559
|
if (!this.workRead.has(key2)) this.workRead.set(key2, workTileOf(this.base.tiles.get(key2)));
|
|
@@ -5467,7 +5593,7 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5467
5593
|
writeTile: (tx, ty) => {
|
|
5468
5594
|
const key2 = _chunk474IQG74cjs.tileKey.call(void 0, tx, ty);
|
|
5469
5595
|
if (!this.touched.has(key2)) {
|
|
5470
|
-
this.work.set(key2, _nullishCoalesce(_optionalChain([read, 'call',
|
|
5596
|
+
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
5597
|
this.touched.add(key2);
|
|
5472
5598
|
}
|
|
5473
5599
|
this.fresh.add(key2);
|
|
@@ -5479,11 +5605,11 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5479
5605
|
offset: a.offset,
|
|
5480
5606
|
lockTransparency: a.lockTransparency,
|
|
5481
5607
|
selection: a.selection,
|
|
5482
|
-
readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
5608
|
+
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
5609
|
writeTile: (tx, ty) => {
|
|
5484
5610
|
const key2 = _chunk474IQG74cjs.tileKey.call(void 0, tx, ty);
|
|
5485
5611
|
if (!this.touched.has(key2)) {
|
|
5486
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
5612
|
+
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
5613
|
this.live.set(key2, { data: new Uint8ClampedArray(src), uniform: null });
|
|
5488
5614
|
this.touched.add(key2);
|
|
5489
5615
|
}
|
|
@@ -5500,11 +5626,11 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5500
5626
|
if (this.closed || !points.length) return;
|
|
5501
5627
|
if (!this.started) {
|
|
5502
5628
|
this.started = true;
|
|
5503
|
-
if (_optionalChain([this, 'access',
|
|
5629
|
+
if (_optionalChain([this, 'access', _125 => _125.retouch, 'optionalAccess', _126 => _126.kind]) === "coverage") this.retouch.start(points[0]);
|
|
5504
5630
|
}
|
|
5505
5631
|
this.last = points[points.length - 1];
|
|
5506
5632
|
const rects = this.mixer ? this.mixer.push(points) : this.stroke.push(points);
|
|
5507
|
-
_optionalChain([this, 'access',
|
|
5633
|
+
_optionalChain([this, 'access', _127 => _127.flushView, 'optionalCall', _128 => _128()]);
|
|
5508
5634
|
this.update(rects);
|
|
5509
5635
|
}
|
|
5510
5636
|
update(rects) {
|
|
@@ -5534,7 +5660,7 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5534
5660
|
for (const [key2, { tx, ty, r }] of regions2) {
|
|
5535
5661
|
if (this.deep) {
|
|
5536
5662
|
const rt = this.retouch;
|
|
5537
|
-
const paint = _optionalChain([rt, 'optionalAccess',
|
|
5663
|
+
const paint = _optionalChain([rt, 'optionalAccess', _129 => _129.kind]) === "coverage" ? rt.paint() : null;
|
|
5538
5664
|
if (paint && paint.kind !== "tone") {
|
|
5539
5665
|
const prevWork = this.touched.has(key2) ? this.work.get(key2) : void 0;
|
|
5540
5666
|
this.touched.add(key2);
|
|
@@ -5545,13 +5671,13 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5545
5671
|
const prev2 = this.touched.has(key2) ? this.liveDeep.get(key2) : void 0;
|
|
5546
5672
|
this.touched.add(key2);
|
|
5547
5673
|
const opts = prev2 ? { into: prev2, region: r, channels: ch } : { channels: ch };
|
|
5548
|
-
const d = _optionalChain([rt, 'optionalAccess',
|
|
5674
|
+
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
5675
|
this.liveDeep.set(key2, d);
|
|
5550
5676
|
this.live.set(key2, { data: _chunkOLNIPTB3cjs.proxyOf.call(void 0, d, ch), uniform: null, deep: d });
|
|
5551
5677
|
continue;
|
|
5552
5678
|
}
|
|
5553
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
5554
|
-
const prev = this.touched.has(key2) ? _optionalChain([this, 'access',
|
|
5679
|
+
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)));
|
|
5680
|
+
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
5681
|
this.touched.add(key2);
|
|
5556
5682
|
const data = this.compositeTile(src, tx, ty, prev ? { into: prev, region: r } : {});
|
|
5557
5683
|
this.live.set(key2, { data, uniform: null });
|
|
@@ -5563,12 +5689,12 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5563
5689
|
if (this.closed) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("This stroke has already ended.");
|
|
5564
5690
|
const last = _nullishCoalesce(this.last, () => ( void 0));
|
|
5565
5691
|
const rects = this.mixer ? this.mixer.finish(last) : this.stroke.finish(last);
|
|
5566
|
-
_optionalChain([this, 'access',
|
|
5692
|
+
_optionalChain([this, 'access', _141 => _141.flushView, 'optionalCall', _142 => _142()]);
|
|
5567
5693
|
this.update(rects);
|
|
5568
5694
|
this.closed = true;
|
|
5569
5695
|
const ch = this.base.channels;
|
|
5570
5696
|
const r = this.retouch;
|
|
5571
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
5697
|
+
if (_optionalChain([r, 'optionalAccess', _143 => _143.kind]) === "coverage" && r.finalPaint) {
|
|
5572
5698
|
const final = r.finalPaint(this.stroke.coverage);
|
|
5573
5699
|
if (final) {
|
|
5574
5700
|
for (const key2 of this.touched) {
|
|
@@ -5577,7 +5703,7 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5577
5703
|
this.retouchDeepTile(key2, tx, ty, final, {});
|
|
5578
5704
|
continue;
|
|
5579
5705
|
}
|
|
5580
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
5706
|
+
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
5707
|
this.live.set(key2, { data: this.compositeTile(src, tx, ty, {}, final), uniform: null });
|
|
5582
5708
|
}
|
|
5583
5709
|
}
|
|
@@ -5599,7 +5725,7 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5599
5725
|
const b = this.mixer ? this.mixer.bounds : this.stroke.coverage.bounds;
|
|
5600
5726
|
const result = { layerId: this.target.id, channel: this.target.channel, bounds: changed ? b : null, dabs: (_nullishCoalesce(this.mixer, () => ( this.stroke))).dabCount };
|
|
5601
5727
|
if (mixerLoad) result.mixerLoad = mixerLoad;
|
|
5602
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
5728
|
+
if (_optionalChain([r, 'optionalAccess', _149 => _149.result])) Object.assign(result, r.result());
|
|
5603
5729
|
return result;
|
|
5604
5730
|
}
|
|
5605
5731
|
/** Abandons the stroke and restores the layer. */
|
|
@@ -5725,14 +5851,14 @@ function migrateSerializedImageEditorState(data) {
|
|
|
5725
5851
|
const legacy = data;
|
|
5726
5852
|
const adjustments = normalizeStoredAdjustments(legacy.adjustments);
|
|
5727
5853
|
return {
|
|
5728
|
-
version: _optionalChain([adjustments, 'access',
|
|
5854
|
+
version: _optionalChain([adjustments, 'access', _150 => _150.layers, 'optionalAccess', _151 => _151.length]) ? 2 : 1,
|
|
5729
5855
|
crop: legacy.crop ? { ...legacy.crop } : null,
|
|
5730
5856
|
transform: { ...DEFAULT_TRANSFORM, ...legacy.transform },
|
|
5731
5857
|
adjustments: serializeAdjustments(adjustments),
|
|
5732
5858
|
depthMask: {
|
|
5733
5859
|
...DEFAULT_DEPTH_MASK,
|
|
5734
5860
|
...legacy.depthMask,
|
|
5735
|
-
depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access',
|
|
5861
|
+
depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _152 => _152.depthMask, 'optionalAccess', _153 => _153.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
|
|
5736
5862
|
},
|
|
5737
5863
|
annotations: JSON.parse(JSON.stringify(_nullishCoalesce(legacy.annotations, () => ( [])))),
|
|
5738
5864
|
...legacy.selection ? { selection: { ...legacy.selection } } : {}
|
|
@@ -5764,35 +5890,35 @@ var DEVELOP_KEYS = ["brightness", "contrast", "saturation", "exposure", "tempera
|
|
|
5764
5890
|
var ImageEditorController = (_class12 = class {
|
|
5765
5891
|
|
|
5766
5892
|
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5893
|
+
__init72() {this.imageElement = null}
|
|
5894
|
+
__init73() {this.listeners = /* @__PURE__ */ new Set()}
|
|
5895
|
+
__init74() {this.histogramListeners = /* @__PURE__ */ new Set()}
|
|
5770
5896
|
|
|
5771
5897
|
// History stacks
|
|
5772
|
-
|
|
5773
|
-
|
|
5898
|
+
__init75() {this.undoStack = []}
|
|
5899
|
+
__init76() {this.redoStack = []}
|
|
5774
5900
|
|
|
5775
5901
|
|
|
5776
|
-
|
|
5902
|
+
__init77() {this.isApplyingHistory = false}
|
|
5777
5903
|
|
|
5778
5904
|
/** Pixels the selection tools sample (host-provided or read back from the source). */
|
|
5779
|
-
|
|
5780
|
-
|
|
5905
|
+
__init78() {this.samplePixels = null}
|
|
5906
|
+
__init79() {this.samplePixelsOverride = false}
|
|
5781
5907
|
/** Decoded source pixels (the Background's surface), by the buffer or element they came from. */
|
|
5782
|
-
|
|
5783
|
-
|
|
5908
|
+
__init80() {this.sourceSurfaces = /* @__PURE__ */ new WeakMap()}
|
|
5909
|
+
__init81() {this.viewKey = []}
|
|
5784
5910
|
/** For `compositePixels` and mask evaluation (the renderer keeps its own for the viewport). */
|
|
5785
|
-
|
|
5911
|
+
__init82() {this.compositor = new (0, _chunkS55JFWDAcjs.LayerCompositor)()}
|
|
5786
5912
|
/** The segmentation provider behind `selectSubject` (see `setSegmentationProvider`). */
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5913
|
+
__init83() {this.segmentation = null}
|
|
5914
|
+
__init84() {this.selectionWorker = null}
|
|
5915
|
+
__init85() {this.documentOpener = null}
|
|
5790
5916
|
/** The effects provider slot (see `setEffectsProvider`). */
|
|
5791
|
-
|
|
5917
|
+
__init86() {this.effects = new (0, _chunkA3A5TI6Rcjs.EffectsSlot)()}
|
|
5792
5918
|
/** Renders provider effects: effect smart filter results and effect layers. */
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
constructor(options = {}) {;_class12.prototype.
|
|
5919
|
+
__init87() {this.effectsEngine = new ImageEffectsEngine({ slot: this.effects })}
|
|
5920
|
+
__init88() {this.effectRefresh = "none"}
|
|
5921
|
+
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
5922
|
this.effects.subscribe(() => this.queueEffectRefresh("all"));
|
|
5797
5923
|
this.effectsEngine.subscribe(() => this.queueEffectRefresh("incomplete"));
|
|
5798
5924
|
if (options.effects) this.effects.set(options.effects);
|
|
@@ -5812,7 +5938,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5812
5938
|
sourceIsOpaque: () => this.sourceIsOpaque(),
|
|
5813
5939
|
version: () => `${this.sourceVersion()}:${this.patternsVersion()}`,
|
|
5814
5940
|
globalLight: () => this.state.globalLight,
|
|
5815
|
-
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
5941
|
+
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
5942
|
};
|
|
5817
5943
|
this.state = {
|
|
5818
5944
|
sourceUrl: typeof options.image === "string" ? options.image : null,
|
|
@@ -5845,13 +5971,13 @@ var ImageEditorController = (_class12 = class {
|
|
|
5845
5971
|
};
|
|
5846
5972
|
}
|
|
5847
5973
|
this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
|
|
5848
|
-
if (_optionalChain([options, 'access',
|
|
5974
|
+
if (_optionalChain([options, 'access', _158 => _158.initialState, 'optionalAccess', _159 => _159.selection])) {
|
|
5849
5975
|
try {
|
|
5850
5976
|
this.state.selection = normalizeSelection(_chunkSS53NNZOcjs.deserializeSelection.call(void 0, options.initialState.selection));
|
|
5851
|
-
} catch (
|
|
5977
|
+
} catch (e23) {
|
|
5852
5978
|
}
|
|
5853
5979
|
}
|
|
5854
|
-
if (_optionalChain([options, 'access',
|
|
5980
|
+
if (_optionalChain([options, 'access', _160 => _160.initialState, 'optionalAccess', _161 => _161.channels])) {
|
|
5855
5981
|
const channels = deserializeChannels(options.initialState.channels, this.naturalSize, this.lastLoadProblems);
|
|
5856
5982
|
if (channels.length) this.state.channels = channels;
|
|
5857
5983
|
}
|
|
@@ -5894,7 +6020,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5894
6020
|
height: img.naturalHeight || img.height || 600
|
|
5895
6021
|
}
|
|
5896
6022
|
};
|
|
5897
|
-
} catch (
|
|
6023
|
+
} catch (e24) {
|
|
5898
6024
|
return { sourceUrl: src, element: null, dimensions: { ...this.state.imageDimensions } };
|
|
5899
6025
|
}
|
|
5900
6026
|
}
|
|
@@ -5927,7 +6053,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5927
6053
|
* Where layer pixels changed since the last viewport render, when only strokes changed them
|
|
5928
6054
|
* (the renderer then recomposites just those rectangles); `'all'` after any other change.
|
|
5929
6055
|
*/
|
|
5930
|
-
|
|
6056
|
+
__init89() {this.pendingDirty = "all"}
|
|
5931
6057
|
notify(strokeRects) {
|
|
5932
6058
|
if (strokeRects) this.docRevision++;
|
|
5933
6059
|
if (strokeRects && this.pendingDirty !== "all") this.pendingDirty.push(...strokeRects);
|
|
@@ -5935,7 +6061,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5935
6061
|
this.syncViews();
|
|
5936
6062
|
this.syncDisplay();
|
|
5937
6063
|
const currentState = { ...this.state };
|
|
5938
|
-
_optionalChain([this, 'access',
|
|
6064
|
+
_optionalChain([this, 'access', _162 => _162.onStateChange, 'optionalCall', _163 => _163(currentState)]);
|
|
5939
6065
|
this.listeners.forEach((l) => l(currentState));
|
|
5940
6066
|
if (this.effects.provider) this.queueEffectRefresh("incomplete");
|
|
5941
6067
|
}
|
|
@@ -5964,11 +6090,11 @@ var ImageEditorController = (_class12 = class {
|
|
|
5964
6090
|
if (l.type === "group") {
|
|
5965
6091
|
const children = walk(l.children);
|
|
5966
6092
|
if (children !== l.children) next2 = { ...l, children };
|
|
5967
|
-
} else if (l.type === "smart" && _optionalChain([l, 'access',
|
|
6093
|
+
} 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
6094
|
try {
|
|
5969
6095
|
const r = _chunkS55JFWDAcjs.rerender.call(void 0, l, canvas);
|
|
5970
6096
|
if (all || !_chunkS55JFWDAcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
|
|
5971
|
-
} catch (
|
|
6097
|
+
} catch (e25) {
|
|
5972
6098
|
}
|
|
5973
6099
|
}
|
|
5974
6100
|
if (next2 !== l) {
|
|
@@ -5993,7 +6119,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5993
6119
|
* A worker that is cancelled or fails is replaced by a fresh one on the next job.
|
|
5994
6120
|
*/
|
|
5995
6121
|
setSelectionWorker(factory) {
|
|
5996
|
-
_optionalChain([this, 'access',
|
|
6122
|
+
_optionalChain([this, 'access', _168 => _168.selectionWorker, 'optionalAccess', _169 => _169.terminate, 'call', _170 => _170()]);
|
|
5997
6123
|
this.selectionWorker = factory ? new (0, _chunkUC3PWFM3cjs.SelectionWorkerClient)(factory) : null;
|
|
5998
6124
|
}
|
|
5999
6125
|
/** Sets (or with `null` removes) how new documents are opened (see `DocumentOpener`). Not an edit. */
|
|
@@ -6019,7 +6145,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6019
6145
|
const layer = _chunkS55JFWDAcjs.requireLayer.call(void 0, this.state.layers, id).layer;
|
|
6020
6146
|
if (layer.type !== "pixel") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`A new document needs a pixel layer; "${id}" is a ${layer.type} layer.`);
|
|
6021
6147
|
const sel = _nullishCoalesce(options.selection, () => ( this.state.selection));
|
|
6022
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
6148
|
+
if (!_optionalChain([sel, 'optionalAccess', _171 => _171.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select what goes in the new document first.");
|
|
6023
6149
|
const { width, height } = this.naturalSize;
|
|
6024
6150
|
const surface = this.surfaceOf(layer);
|
|
6025
6151
|
let copy;
|
|
@@ -6070,10 +6196,10 @@ var ImageEditorController = (_class12 = class {
|
|
|
6070
6196
|
* `onProgress` hears its stages. The document is not changed.
|
|
6071
6197
|
*/
|
|
6072
6198
|
async runSelectionJob(job, pixels, options = {}) {
|
|
6073
|
-
_optionalChain([options, 'access',
|
|
6199
|
+
_optionalChain([options, 'access', _172 => _172.signal, 'optionalAccess', _173 => _173.throwIfAborted, 'call', _174 => _174()]);
|
|
6074
6200
|
if (this.selectionWorker) return this.selectionWorker.run(job, pixels, options);
|
|
6075
6201
|
const result = _chunkUC3PWFM3cjs.runSelectionJob.call(void 0, job, pixels, options.onProgress);
|
|
6076
|
-
_optionalChain([options, 'access',
|
|
6202
|
+
_optionalChain([options, 'access', _175 => _175.signal, 'optionalAccess', _176 => _176.throwIfAborted, 'call', _177 => _177()]);
|
|
6077
6203
|
return result;
|
|
6078
6204
|
}
|
|
6079
6205
|
/** Registers (or with `null` removes) the segmentation provider. Not an edit: no undo step. */
|
|
@@ -6148,8 +6274,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
6148
6274
|
*/
|
|
6149
6275
|
async updateEffectFilter(layerId, filterId, changes, commitToHistory = true) {
|
|
6150
6276
|
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',
|
|
6277
|
+
const was = _optionalChain([layer, 'access', _178 => _178.smartFilters, 'optionalAccess', _179 => _179.filters, 'access', _180 => _180.find, 'call', _181 => _181((f) => f.id === filterId)]);
|
|
6278
|
+
if (!was || was.kind !== "effect") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access', _182 => _182.smartFilters, 'optionalAccess', _183 => _183.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
|
|
6153
6279
|
const update = {};
|
|
6154
6280
|
if (changes.values) {
|
|
6155
6281
|
const d = await this.describeEffect(was.effect);
|
|
@@ -6191,7 +6317,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6191
6317
|
const layer = {
|
|
6192
6318
|
type: "pixel",
|
|
6193
6319
|
id,
|
|
6194
|
-
name: _optionalChain([options, 'access',
|
|
6320
|
+
name: _optionalChain([options, 'access', _184 => _184.name, 'optionalAccess', _185 => _185.trim, 'call', _186 => _186()]) || d.name,
|
|
6195
6321
|
visible: true,
|
|
6196
6322
|
opacity: _nullishCoalesce(options.opacity, () => ( 1)),
|
|
6197
6323
|
blend: _nullishCoalesce(blend, () => ( "normal")),
|
|
@@ -6216,7 +6342,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6216
6342
|
*/
|
|
6217
6343
|
async updateEffectLayer(layerId, changes, commitToHistory = true) {
|
|
6218
6344
|
const found = _chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, layerId);
|
|
6219
|
-
const layer = _optionalChain([found, 'optionalAccess',
|
|
6345
|
+
const layer = _optionalChain([found, 'optionalAccess', _187 => _187.layer]);
|
|
6220
6346
|
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
6347
|
_chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
|
|
6222
6348
|
const g = layer.generator;
|
|
@@ -6245,7 +6371,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6245
6371
|
* and how long it runs, the longest of theirs (ms). Null when none animates.
|
|
6246
6372
|
*/
|
|
6247
6373
|
getAnimation() {
|
|
6248
|
-
const layers = _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access',
|
|
6374
|
+
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
6375
|
if (!layers.length) return null;
|
|
6250
6376
|
return { duration: Math.max(...layers.map((l) => l.generator.animate.duration)), layerIds: layers.map((l) => l.id) };
|
|
6251
6377
|
}
|
|
@@ -6262,7 +6388,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6262
6388
|
const { width, height } = this.naturalSize;
|
|
6263
6389
|
const surfaces = /* @__PURE__ */ new Map();
|
|
6264
6390
|
for (const l of _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers)) {
|
|
6265
|
-
if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access',
|
|
6391
|
+
if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access', _190 => _190.generator, 'optionalAccess', _191 => _191.animate])) continue;
|
|
6266
6392
|
const g = l.generator;
|
|
6267
6393
|
const pixels = await this.effectsEngine.renderLayer(g.effect, g.values, { width, height, depth: this.bitDepth, time: (_nullishCoalesce(g.time, () => ( 0))) + time });
|
|
6268
6394
|
surfaces.set(l.id, effectPixelsToSurface(pixels, this.bitDepth));
|
|
@@ -6282,7 +6408,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6282
6408
|
})
|
|
6283
6409
|
);
|
|
6284
6410
|
}
|
|
6285
|
-
|
|
6411
|
+
__init90() {this.displayFor = null}
|
|
6286
6412
|
/** Keeps the renderer's display transform in step with the document profile, mode and Proof Setup. */
|
|
6287
6413
|
syncDisplay() {
|
|
6288
6414
|
const s = this.state;
|
|
@@ -6291,7 +6417,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6291
6417
|
this.displayFor = [s.colorProfile, s.proofSetup, s.colorMode];
|
|
6292
6418
|
try {
|
|
6293
6419
|
this.renderer.setDisplayTransform(displayTransform(s.colorProfile, effectiveProof(s.proofSetup, s.colorMode)));
|
|
6294
|
-
} catch (
|
|
6420
|
+
} catch (e26) {
|
|
6295
6421
|
this.renderer.setDisplayTransform(null);
|
|
6296
6422
|
}
|
|
6297
6423
|
}
|
|
@@ -6323,8 +6449,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
6323
6449
|
transform: { ...s.transform },
|
|
6324
6450
|
outputOpacity: s.outputOpacity,
|
|
6325
6451
|
selection: _nullishCoalesce(s.selection, () => ( null)),
|
|
6326
|
-
..._optionalChain([s, 'access',
|
|
6327
|
-
..._optionalChain([s, 'access',
|
|
6452
|
+
..._optionalChain([s, 'access', _192 => _192.channels, 'optionalAccess', _193 => _193.length]) ? { channels: s.channels } : {},
|
|
6453
|
+
..._optionalChain([s, 'access', _194 => _194.paths, 'optionalAccess', _195 => _195.length]) ? { paths: s.paths } : {},
|
|
6328
6454
|
source: {
|
|
6329
6455
|
sourceUrl: s.sourceUrl,
|
|
6330
6456
|
element: this.imageElement,
|
|
@@ -6360,11 +6486,11 @@ var ImageEditorController = (_class12 = class {
|
|
|
6360
6486
|
if (entry.colorMode) s.colorMode = entry.colorMode;
|
|
6361
6487
|
else delete s.colorMode;
|
|
6362
6488
|
s.selection = entry.selection;
|
|
6363
|
-
if (_optionalChain([entry, 'access',
|
|
6489
|
+
if (_optionalChain([entry, 'access', _196 => _196.channels, 'optionalAccess', _197 => _197.length])) s.channels = entry.channels;
|
|
6364
6490
|
else delete s.channels;
|
|
6365
|
-
if (_optionalChain([entry, 'access',
|
|
6491
|
+
if (_optionalChain([entry, 'access', _198 => _198.paths, 'optionalAccess', _199 => _199.length])) s.paths = entry.paths;
|
|
6366
6492
|
else delete s.paths;
|
|
6367
|
-
if (s.activePathId && !_optionalChain([s, 'access',
|
|
6493
|
+
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
6494
|
if (this.imageElement !== entry.source.element && !this.samplePixelsOverride) this.samplePixels = null;
|
|
6369
6495
|
this.imageElement = entry.source.element;
|
|
6370
6496
|
s.sourceUrl = entry.source.sourceUrl;
|
|
@@ -6375,7 +6501,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6375
6501
|
}
|
|
6376
6502
|
}
|
|
6377
6503
|
/** Set while `asOneStep` runs: the step is already recorded, so nested commands add none. */
|
|
6378
|
-
|
|
6504
|
+
__init91() {this.historyGrouped = false}
|
|
6379
6505
|
/**
|
|
6380
6506
|
* Runs `fn` as one undo step: history is recorded once, before it, and the commands it calls
|
|
6381
6507
|
* record none. If `fn` throws, the step is dropped and the state goes back to before it, so a
|
|
@@ -6438,7 +6564,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6438
6564
|
get canUndo() {
|
|
6439
6565
|
return this.undoStack.length > 0;
|
|
6440
6566
|
}
|
|
6441
|
-
|
|
6567
|
+
__init92() {this.docRevision = 0}
|
|
6442
6568
|
/**
|
|
6443
6569
|
* Bumped on every change to the document (an undoable edit, a stroke, undo, redo), not on view
|
|
6444
6570
|
* 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 +6696,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6570
6696
|
return this.state.layers;
|
|
6571
6697
|
}
|
|
6572
6698
|
getLayer(id) {
|
|
6573
|
-
return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess',
|
|
6699
|
+
return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _203 => _203.layer]);
|
|
6574
6700
|
}
|
|
6575
6701
|
/** The active layer, or `undefined`. */
|
|
6576
6702
|
getActiveLayer() {
|
|
@@ -6583,7 +6709,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6583
6709
|
setActiveLayer(id, target = "pixels") {
|
|
6584
6710
|
if (id !== null && !this.getLayer(id)) return false;
|
|
6585
6711
|
const layer = id ? this.getLayer(id) : void 0;
|
|
6586
|
-
const t = target === "mask" && _optionalChain([layer, 'optionalAccess',
|
|
6712
|
+
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
6713
|
if (this.state.activeLayerId === id && this.state.activeTarget === t) return true;
|
|
6588
6714
|
this.state.activeLayerId = id;
|
|
6589
6715
|
this.state.activeTarget = t;
|
|
@@ -6602,7 +6728,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6602
6728
|
if (!b) return null;
|
|
6603
6729
|
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
6730
|
}
|
|
6605
|
-
|
|
6731
|
+
__init93() {this.boundsCache = /* @__PURE__ */ new WeakMap()}
|
|
6606
6732
|
/**
|
|
6607
6733
|
* Document bounds of a layer's non-transparent pixels (pixel layers; the Background's source
|
|
6608
6734
|
* included), or `null` for an empty or non-pixel layer.
|
|
@@ -6745,11 +6871,11 @@ var ImageEditorController = (_class12 = class {
|
|
|
6745
6871
|
surfaceOf: (l) => this.surfaceOf(l),
|
|
6746
6872
|
version: `${this.sourceVersion()}:${this.patternsVersion()}`,
|
|
6747
6873
|
globalLight: this.state.globalLight,
|
|
6748
|
-
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
6874
|
+
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
6875
|
};
|
|
6750
6876
|
}
|
|
6751
|
-
|
|
6752
|
-
|
|
6877
|
+
__init94() {this.sourceIds = /* @__PURE__ */ new WeakMap()}
|
|
6878
|
+
__init95() {this.nextSourceId = 1}
|
|
6753
6879
|
/** Changes whenever the Background's source pixels can have changed. */
|
|
6754
6880
|
sourceVersion() {
|
|
6755
6881
|
const key2 = this.samplePixelsOverride ? this.samplePixels : _nullishCoalesce(this.imageElement, () => ( this.samplePixels));
|
|
@@ -6798,7 +6924,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6798
6924
|
}
|
|
6799
6925
|
return fits ? fromPixels(px2) : null;
|
|
6800
6926
|
}
|
|
6801
|
-
|
|
6927
|
+
__init96() {this.opaqueCache = /* @__PURE__ */ new WeakMap()}
|
|
6802
6928
|
/** Whether every source pixel is opaque (some legacy renders depend on it). */
|
|
6803
6929
|
sourceIsOpaque() {
|
|
6804
6930
|
const s = this.sourceSurface();
|
|
@@ -6822,9 +6948,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
6822
6948
|
if (!ctx || typeof ctx.getImageData !== "function") return null;
|
|
6823
6949
|
ctx.drawImage(el, 0, 0, width, height);
|
|
6824
6950
|
const data = ctx.getImageData(0, 0, width, height);
|
|
6825
|
-
if (!_optionalChain([data, 'optionalAccess',
|
|
6951
|
+
if (!_optionalChain([data, 'optionalAccess', _212 => _212.data]) || data.data.length < width * height * 4) return null;
|
|
6826
6952
|
return { width, height, data: data.data };
|
|
6827
|
-
} catch (
|
|
6953
|
+
} catch (e27) {
|
|
6828
6954
|
return null;
|
|
6829
6955
|
}
|
|
6830
6956
|
}
|
|
@@ -6835,7 +6961,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6835
6961
|
const prev = this.state.layers;
|
|
6836
6962
|
const depth = this.bitDepth;
|
|
6837
6963
|
this.state.layers = next;
|
|
6838
|
-
_optionalChain([extra, 'optionalCall',
|
|
6964
|
+
_optionalChain([extra, 'optionalCall', _213 => _213()]);
|
|
6839
6965
|
if (depth !== 8 && this.bitDepth === depth) this.state.layers = keepDeepLayers(prev, this.state.layers);
|
|
6840
6966
|
if (this.state.activeLayerId && !_chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, this.state.activeLayerId)) {
|
|
6841
6967
|
this.state.activeLayerId = _chunkS55JFWDAcjs.activeLayerAfterRemoval.call(void 0, prev, this.state.layers, this.state.activeLayerId);
|
|
@@ -6873,7 +6999,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6873
6999
|
const layer = {
|
|
6874
7000
|
type: "pixel",
|
|
6875
7001
|
id: init.id && !ids.has(init.id) ? init.id : _chunkS55JFWDAcjs.newLayerId.call(void 0, ),
|
|
6876
|
-
name: _optionalChain([init, 'access',
|
|
7002
|
+
name: _optionalChain([init, 'access', _214 => _214.name, 'optionalAccess', _215 => _215.trim, 'call', _216 => _216()]) || this.nextLayerName(),
|
|
6877
7003
|
visible: _nullishCoalesce(init.visible, () => ( true)),
|
|
6878
7004
|
opacity: _nullishCoalesce(init.opacity, () => ( 1)),
|
|
6879
7005
|
blend: _nullishCoalesce(blend, () => ( "normal")),
|
|
@@ -6900,12 +7026,12 @@ var ImageEditorController = (_class12 = class {
|
|
|
6900
7026
|
async decodeImage(image) {
|
|
6901
7027
|
const trimmed = image.trim();
|
|
6902
7028
|
let png = null;
|
|
6903
|
-
if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkOLNIPTB3cjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess',
|
|
7029
|
+
if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkOLNIPTB3cjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _217 => _217.bytes]), () => ( null));
|
|
6904
7030
|
else if (/^[A-Za-z0-9+/=\s]+$/.test(trimmed) && trimmed.length > 16) {
|
|
6905
7031
|
try {
|
|
6906
7032
|
const bytes = _chunkOLNIPTB3cjs.base64ToBytes.call(void 0, trimmed);
|
|
6907
7033
|
if (_chunkOLNIPTB3cjs.isPng.call(void 0, bytes)) png = bytes;
|
|
6908
|
-
} catch (
|
|
7034
|
+
} catch (e28) {
|
|
6909
7035
|
png = null;
|
|
6910
7036
|
}
|
|
6911
7037
|
}
|
|
@@ -6913,14 +7039,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
6913
7039
|
try {
|
|
6914
7040
|
const d = _chunkOLNIPTB3cjs.decodePng.call(void 0, png);
|
|
6915
7041
|
return { width: d.width, height: d.height, data: d.data };
|
|
6916
|
-
} catch (
|
|
7042
|
+
} catch (e29) {
|
|
6917
7043
|
}
|
|
6918
7044
|
}
|
|
6919
7045
|
const src = png ? `data:image/png;base64,${_chunkOLNIPTB3cjs.bytesToBase64.call(void 0, png)}` : trimmed;
|
|
6920
7046
|
let img;
|
|
6921
7047
|
try {
|
|
6922
7048
|
img = await this.renderer.imageCache.get(src);
|
|
6923
|
-
} catch (
|
|
7049
|
+
} catch (e30) {
|
|
6924
7050
|
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
7051
|
}
|
|
6926
7052
|
const w = img.naturalWidth || img.width;
|
|
@@ -6949,7 +7075,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6949
7075
|
removeLayer(id) {
|
|
6950
7076
|
const next = _chunkS55JFWDAcjs.removeLayer.call(void 0, this.state.layers, id);
|
|
6951
7077
|
this.commitLayers(next, () => {
|
|
6952
|
-
if (this.state.selectedAnnotationId && !_chunkB46UQUDCcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkS55JFWDAcjs.annotationOfLayer.call(void 0, l), 'optionalAccess',
|
|
7078
|
+
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
7079
|
this.state.selectedAnnotationId = null;
|
|
6954
7080
|
}
|
|
6955
7081
|
});
|
|
@@ -6958,9 +7084,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
6958
7084
|
moveLayer(id, placement) {
|
|
6959
7085
|
const next = _chunkS55JFWDAcjs.moveLayer.call(void 0, this.state.layers, id, placement);
|
|
6960
7086
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, next, id);
|
|
6961
|
-
if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
7087
|
+
if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _219 => _219.parent, 'optionalAccess', _220 => _220.id]), () => ( null)), index: loc.index };
|
|
6962
7088
|
this.commitLayers(next);
|
|
6963
|
-
return { parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
7089
|
+
return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _221 => _221.parent, 'optionalAccess', _222 => _222.id]), () => ( null)), index: loc.index };
|
|
6964
7090
|
}
|
|
6965
7091
|
/** A layer's edge colour as percentages (see `setEdgeColor`). */
|
|
6966
7092
|
getEdgeColor(id) {
|
|
@@ -7056,7 +7182,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7056
7182
|
const group = {
|
|
7057
7183
|
type: "group",
|
|
7058
7184
|
id: _chunkS55JFWDAcjs.newLayerId.call(void 0, "group"),
|
|
7059
|
-
name: _optionalChain([init, 'access',
|
|
7185
|
+
name: _optionalChain([init, 'access', _223 => _223.name, 'optionalAccess', _224 => _224.trim, 'call', _225 => _225()]) || "Group",
|
|
7060
7186
|
visible: true,
|
|
7061
7187
|
opacity: 1,
|
|
7062
7188
|
blend,
|
|
@@ -7149,7 +7275,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7149
7275
|
sel = this.layerTransparency(id);
|
|
7150
7276
|
} else {
|
|
7151
7277
|
const current = this.state.selection;
|
|
7152
|
-
if (!_optionalChain([current, 'optionalAccess',
|
|
7278
|
+
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
7279
|
sel = from === "hide-selection" ? _chunkSS53NNZOcjs.invertSelection.call(void 0, current) : current;
|
|
7154
7280
|
}
|
|
7155
7281
|
mask = this.maskFromSelection(sel, props);
|
|
@@ -7180,7 +7306,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7180
7306
|
const layer = _chunkS55JFWDAcjs.requireLayer.call(void 0, this.state.layers, id).layer;
|
|
7181
7307
|
const name = layer.name || id;
|
|
7182
7308
|
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',
|
|
7309
|
+
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
7310
|
return layer;
|
|
7185
7311
|
}
|
|
7186
7312
|
requireVectorMask(id) {
|
|
@@ -7190,10 +7316,10 @@ var ImageEditorController = (_class12 = class {
|
|
|
7190
7316
|
}
|
|
7191
7317
|
/** Components from a path spec: `components`, or one `shape` / `subpaths`. */
|
|
7192
7318
|
vectorMaskComponents(path) {
|
|
7193
|
-
if (_optionalChain([path, 'access',
|
|
7319
|
+
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
7320
|
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',
|
|
7321
|
+
const specs = _optionalChain([path, 'access', _231 => _231.components, 'optionalAccess', _232 => _232.length]) ? path.components : [path];
|
|
7322
|
+
return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access', _233 => _233.components, 'optionalAccess', _234 => _234.length]) ? `components[${i}].` : ""));
|
|
7197
7323
|
}
|
|
7198
7324
|
/**
|
|
7199
7325
|
* Layer › Vector Mask: `reveal-all` (an empty path showing everything), `hide-all` (an empty path
|
|
@@ -7210,7 +7336,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7210
7336
|
vm = { components: this.vectorMaskComponents(path) };
|
|
7211
7337
|
if (path.fillRule === "evenodd") vm.fillRule = "evenodd";
|
|
7212
7338
|
} else if (from === "reveal-all" || from === "hide-all") {
|
|
7213
|
-
if (_optionalChain([path, 'access',
|
|
7339
|
+
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
7340
|
vm = { components: [], ...from === "reveal-all" ? { inverted: true } : {} };
|
|
7215
7341
|
} else {
|
|
7216
7342
|
throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Unknown vector mask source "${String(from)}". Use reveal-all, hide-all, path or selection.`);
|
|
@@ -7221,7 +7347,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7221
7347
|
/** The selection's outline as subpaths; throws when nothing is selected or nothing is left to trace. */
|
|
7222
7348
|
traceSelection(options) {
|
|
7223
7349
|
const sel = this.state.selection;
|
|
7224
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
7350
|
+
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
7351
|
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
7352
|
const subpaths = selectionToSubpaths(sel, options);
|
|
7227
7353
|
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 +7387,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7261
7387
|
return _nullishCoalesce(this.state.paths, () => ( []));
|
|
7262
7388
|
}
|
|
7263
7389
|
getPath(id) {
|
|
7264
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
7390
|
+
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
7391
|
}
|
|
7266
7392
|
requirePath(id) {
|
|
7267
7393
|
const path = this.getPath(id);
|
|
@@ -7294,14 +7420,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
7294
7420
|
const subpaths = this.traceSelection(options);
|
|
7295
7421
|
const paths = this.getPaths();
|
|
7296
7422
|
const old = paths.find((p) => p.work);
|
|
7297
|
-
const work = { id: _nullishCoalesce(_optionalChain([old, 'optionalAccess',
|
|
7423
|
+
const work = { id: _nullishCoalesce(_optionalChain([old, 'optionalAccess', _242 => _242.id]), () => ( newPathId())), name: WORK_PATH_NAME, components: [{ op: "combine", subpaths }], fillRule: "evenodd", work: true };
|
|
7298
7424
|
this.commitPaths(old ? paths.map((p) => p === old ? work : p) : [...paths, work], work.id);
|
|
7299
7425
|
return work;
|
|
7300
7426
|
}
|
|
7301
7427
|
/** A new saved path from geometry (`shape`, `subpaths` or `components`). One undo step. */
|
|
7302
7428
|
addPath(input) {
|
|
7303
7429
|
const paths = this.getPaths();
|
|
7304
|
-
const path = { id: newPathId(), name: _optionalChain([input, 'access',
|
|
7430
|
+
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
7431
|
if (input.fillRule === "evenodd") path.fillRule = "evenodd";
|
|
7306
7432
|
this.commitPaths([...paths.filter((p) => !p.work), path, ...paths.filter((p) => p.work)], path.id);
|
|
7307
7433
|
return path;
|
|
@@ -7365,7 +7491,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7365
7491
|
const paths = this.getPaths();
|
|
7366
7492
|
const old = paths.find((p) => p.work);
|
|
7367
7493
|
const work = {
|
|
7368
|
-
id: _nullishCoalesce(_optionalChain([old, 'optionalAccess',
|
|
7494
|
+
id: _nullishCoalesce(_optionalChain([old, 'optionalAccess', _246 => _246.id]), () => ( newPathId())),
|
|
7369
7495
|
name: WORK_PATH_NAME,
|
|
7370
7496
|
components: components.map((c, i) => this.componentFrom({ op: c.op, subpaths: c.subpaths }, `components[${i}].`)),
|
|
7371
7497
|
work: true
|
|
@@ -7386,7 +7512,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7386
7512
|
/** Duplicates a path as a saved path. One undo step. */
|
|
7387
7513
|
duplicatePath(id, name) {
|
|
7388
7514
|
const old = this.requirePath(id);
|
|
7389
|
-
const copy = { ...old, id: newPathId(), name: _optionalChain([name, 'optionalAccess',
|
|
7515
|
+
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
7516
|
delete copy.work;
|
|
7391
7517
|
const paths = this.getPaths();
|
|
7392
7518
|
this.commitPaths([...paths.filter((p) => !p.work), copy, ...paths.filter((p) => p.work)], copy.id);
|
|
@@ -7592,7 +7718,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7592
7718
|
const layer = loc.layer;
|
|
7593
7719
|
if (layer.type !== "pixel") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
|
|
7594
7720
|
const sel = this.state.selection;
|
|
7595
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
7721
|
+
if (!_optionalChain([sel, 'optionalAccess', _249 => _249.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
|
|
7596
7722
|
if (options.cut) _chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
|
|
7597
7723
|
const surface = this.surfaceOf(layer);
|
|
7598
7724
|
const sb = sel.bounds;
|
|
@@ -7610,14 +7736,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
7610
7736
|
const copy = {
|
|
7611
7737
|
type: "pixel",
|
|
7612
7738
|
id: _chunkS55JFWDAcjs.newLayerId.call(void 0, ),
|
|
7613
|
-
name: _optionalChain([options, 'access',
|
|
7739
|
+
name: _optionalChain([options, 'access', _250 => _250.name, 'optionalAccess', _251 => _251.trim, 'call', _252 => _252()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
|
|
7614
7740
|
visible: true,
|
|
7615
7741
|
opacity: 1,
|
|
7616
7742
|
blend: "normal",
|
|
7617
7743
|
surface: _chunk474IQG74cjs.surfaceFromPixels.call(void 0, { width: src.width, height: src.height, data: px2 }, 4, src.x, src.y),
|
|
7618
7744
|
offset: { ...layer.offset }
|
|
7619
7745
|
};
|
|
7620
|
-
let next = _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
7746
|
+
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
7747
|
if (kept) {
|
|
7622
7748
|
const cutLayer = { ...layer, surface: _chunk474IQG74cjs.writeRegion.call(void 0, surface, src, kept) };
|
|
7623
7749
|
delete cutLayer.source;
|
|
@@ -7630,7 +7756,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7630
7756
|
return copy.id;
|
|
7631
7757
|
}
|
|
7632
7758
|
// --- Free Transform ---
|
|
7633
|
-
|
|
7759
|
+
__init97() {this.openTransform = null}
|
|
7634
7760
|
/** The Free Transform in progress (see `beginFreeTransform`), or `null`. */
|
|
7635
7761
|
getFreeTransform() {
|
|
7636
7762
|
if (this.openTransform && !this.openTransform.isOpen) this.openTransform = null;
|
|
@@ -7641,7 +7767,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7641
7767
|
layers: () => this.state.layers,
|
|
7642
7768
|
activeLayerId: () => this.state.activeLayerId,
|
|
7643
7769
|
activeTarget: () => this.state.activeTarget,
|
|
7644
|
-
selection: () => _optionalChain([this, 'access',
|
|
7770
|
+
selection: () => _optionalChain([this, 'access', _255 => _255.state, 'access', _256 => _256.selection, 'optionalAccess', _257 => _257.bounds]) ? this.state.selection : null,
|
|
7645
7771
|
canvas: () => this.naturalSize,
|
|
7646
7772
|
pixelsOf: (layer) => this.surfaceOf(layer),
|
|
7647
7773
|
shapeEnv: () => this.shapeEnv(),
|
|
@@ -7789,7 +7915,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7789
7915
|
* anything else nests as a layer document. Returns the smart object's id.
|
|
7790
7916
|
*/
|
|
7791
7917
|
convertToSmartObject(ids, options = {}) {
|
|
7792
|
-
const list = _optionalChain([ids, 'optionalAccess',
|
|
7918
|
+
const list = _optionalChain([ids, 'optionalAccess', _258 => _258.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
|
|
7793
7919
|
if (!list.length) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
|
|
7794
7920
|
const res = _chunkS55JFWDAcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
|
|
7795
7921
|
this.commitLayers(res.layers, () => {
|
|
@@ -7822,8 +7948,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
7822
7948
|
width: c.width,
|
|
7823
7949
|
height: c.height,
|
|
7824
7950
|
decoded: _chunkS55JFWDAcjs.isContentsDecoded.call(void 0, c),
|
|
7825
|
-
fileType: _nullishCoalesce(_optionalChain([c, 'access',
|
|
7826
|
-
linkedPath: _nullishCoalesce(_optionalChain([c, 'access',
|
|
7951
|
+
fileType: _nullishCoalesce(_optionalChain([c, 'access', _259 => _259.file, 'optionalAccess', _260 => _260.type]), () => ( null)),
|
|
7952
|
+
linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _261 => _261.linked, 'optionalAccess', _262 => _262.path]), () => ( null)),
|
|
7827
7953
|
instances: _chunkS55JFWDAcjs.instancesOf.call(void 0, this.state.layers, c.id),
|
|
7828
7954
|
layerCount: c.document ? _chunkB46UQUDCcjs.flattenLayers.call(void 0, c.document.layers).length : 0
|
|
7829
7955
|
},
|
|
@@ -7840,9 +7966,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
7840
7966
|
bounds: _chunkS55JFWDAcjs.transformedBox.call(void 0, g)
|
|
7841
7967
|
},
|
|
7842
7968
|
smartFilters: {
|
|
7843
|
-
enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess',
|
|
7844
|
-
filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess',
|
|
7845
|
-
mask: _optionalChain([stack, 'optionalAccess',
|
|
7969
|
+
enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _263 => _263.enabled]), () => ( true)),
|
|
7970
|
+
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 }),
|
|
7971
|
+
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
7972
|
},
|
|
7847
7973
|
bounds: this.getLayerBounds(id)
|
|
7848
7974
|
};
|
|
@@ -7981,7 +8107,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7981
8107
|
* it in the same undo step (Photoshop limits a filter to the selection). Returns whether it did.
|
|
7982
8108
|
*/
|
|
7983
8109
|
maskFiltersWithSelection(id, useSelection) {
|
|
7984
|
-
if (!useSelection || !_optionalChain([this, 'access',
|
|
8110
|
+
if (!useSelection || !_optionalChain([this, 'access', _266 => _266.state, 'access', _267 => _267.selection, 'optionalAccess', _268 => _268.bounds])) return false;
|
|
7985
8111
|
this.setSmartFilterMask(id, "selection", {}, false);
|
|
7986
8112
|
return true;
|
|
7987
8113
|
}
|
|
@@ -7995,19 +8121,19 @@ var ImageEditorController = (_class12 = class {
|
|
|
7995
8121
|
removeSmartFilter(id, filterId) {
|
|
7996
8122
|
const res = _chunkS55JFWDAcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
|
|
7997
8123
|
this.commitLayers(res.layers);
|
|
7998
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8124
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _269 => _269.layer, 'access', _270 => _270.smartFilters, 'optionalAccess', _271 => _271.filters]), () => ( []));
|
|
7999
8125
|
}
|
|
8000
8126
|
/** Moves one smart filter to `index` (0 = bottom, applied first), as one undo step. Returns the filters. */
|
|
8001
8127
|
moveSmartFilter(id, filterId, index) {
|
|
8002
8128
|
const res = _chunkS55JFWDAcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
|
|
8003
8129
|
this.commitLayers(res.layers);
|
|
8004
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8130
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _272 => _272.layer, 'access', _273 => _273.smartFilters, 'optionalAccess', _274 => _274.filters]), () => ( []));
|
|
8005
8131
|
}
|
|
8006
8132
|
/** Turns a smart object's whole filter stack on or off (one undo step). */
|
|
8007
8133
|
setSmartFiltersEnabled(id, enabled) {
|
|
8008
8134
|
const res = _chunkS55JFWDAcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
|
|
8009
8135
|
this.commitLayers(res.layers);
|
|
8010
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8136
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _275 => _275.layer, 'access', _276 => _276.smartFilters, 'optionalAccess', _277 => _277.enabled]), () => ( true));
|
|
8011
8137
|
}
|
|
8012
8138
|
/**
|
|
8013
8139
|
* Sets the smart filter mask (one undo step): `reveal-all`, `hide-all`, `selection` (the
|
|
@@ -8019,11 +8145,11 @@ var ImageEditorController = (_class12 = class {
|
|
|
8019
8145
|
let mask;
|
|
8020
8146
|
if (from === "none") mask = null;
|
|
8021
8147
|
else if (from === "keep") {
|
|
8022
|
-
if (!_optionalChain([layer, 'access',
|
|
8148
|
+
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
8149
|
mask = withMaskProps(layer.smartFilters.mask, props);
|
|
8024
8150
|
} else if (from === "selection") {
|
|
8025
8151
|
const sel = this.state.selection;
|
|
8026
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
8152
|
+
if (!_optionalChain([sel, 'optionalAccess', _280 => _280.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
|
|
8027
8153
|
mask = this.maskFromSelection(sel, props);
|
|
8028
8154
|
} else {
|
|
8029
8155
|
const v = from === "reveal-all" ? 255 : 0;
|
|
@@ -8035,7 +8161,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8035
8161
|
if (mask && from !== "keep") this.state.activeTarget = "filter-mask";
|
|
8036
8162
|
else if (!mask && this.state.activeTarget === "filter-mask") this.state.activeTarget = "pixels";
|
|
8037
8163
|
}, commitToHistory);
|
|
8038
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8164
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _281 => _281.layer, 'access', _282 => _282.smartFilters, 'optionalAccess', _283 => _283.mask]), () => ( null));
|
|
8039
8165
|
}
|
|
8040
8166
|
/**
|
|
8041
8167
|
* Decodes smart object contents that came as files the synchronous decoders cannot read (a JPEG
|
|
@@ -8060,7 +8186,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8060
8186
|
};
|
|
8061
8187
|
this.state.layers = swap(this.state.layers);
|
|
8062
8188
|
for (const e of [...this.undoStack, ...this.redoStack]) e.layers = swap(e.layers);
|
|
8063
|
-
} catch (
|
|
8189
|
+
} catch (e31) {
|
|
8064
8190
|
left.push(cid);
|
|
8065
8191
|
}
|
|
8066
8192
|
}
|
|
@@ -8068,7 +8194,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8068
8194
|
return left;
|
|
8069
8195
|
}
|
|
8070
8196
|
// --- Smart object contents (Edit Contents) ---
|
|
8071
|
-
|
|
8197
|
+
__init98() {this.contentsStack = []}
|
|
8072
8198
|
/** The smart objects whose contents are open (outermost first); empty when the document itself is shown. */
|
|
8073
8199
|
getEditingContents() {
|
|
8074
8200
|
return this.contentsStack.map((e) => ({ layerId: e.layerId, name: e.name }));
|
|
@@ -8083,7 +8209,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8083
8209
|
if (this.getFreeTransform()) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
|
|
8084
8210
|
const layer = _chunkS55JFWDAcjs.requireSmartObject.call(void 0, this.state.layers, id);
|
|
8085
8211
|
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',
|
|
8212
|
+
if (!_chunkS55JFWDAcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _284 => _284.file, 'optionalAccess', _285 => _285.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
|
|
8087
8213
|
const saved = {
|
|
8088
8214
|
state: { ...this.state },
|
|
8089
8215
|
undo: this.undoStack,
|
|
@@ -8114,9 +8240,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
8114
8240
|
editingContents: this.getEditingContents()
|
|
8115
8241
|
};
|
|
8116
8242
|
delete this.state.legacyOutputBlur;
|
|
8117
|
-
if (_optionalChain([c, 'access',
|
|
8243
|
+
if (_optionalChain([c, 'access', _286 => _286.document, 'optionalAccess', _287 => _287.globalLight])) this.state.globalLight = c.document.globalLight;
|
|
8118
8244
|
else delete this.state.globalLight;
|
|
8119
|
-
if (_optionalChain([c, 'access',
|
|
8245
|
+
if (_optionalChain([c, 'access', _288 => _288.document, 'optionalAccess', _289 => _289.patterns, 'optionalAccess', _290 => _290.length])) this.state.patterns = c.document.patterns;
|
|
8120
8246
|
else delete this.state.patterns;
|
|
8121
8247
|
this.imageElement = null;
|
|
8122
8248
|
this.samplePixels = null;
|
|
@@ -8136,23 +8262,23 @@ var ImageEditorController = (_class12 = class {
|
|
|
8136
8262
|
closeSmartObjectContents(save = true) {
|
|
8137
8263
|
const top = this.contentsStack.pop();
|
|
8138
8264
|
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',
|
|
8265
|
+
if (_optionalChain([this, 'access', _291 => _291.openTransform, 'optionalAccess', _292 => _292.isOpen])) this.openTransform.cancel();
|
|
8140
8266
|
this.openTransform = null;
|
|
8141
8267
|
const edited = this.state;
|
|
8142
8268
|
const changed = save && this.undoStack.length > 0;
|
|
8143
8269
|
let next = null;
|
|
8144
8270
|
if (changed) {
|
|
8145
|
-
const layer = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess',
|
|
8146
|
-
const old = _optionalChain([layer, 'optionalAccess',
|
|
8271
|
+
const layer = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _293 => _293.layer]);
|
|
8272
|
+
const old = _optionalChain([layer, 'optionalAccess', _294 => _294.contents]);
|
|
8147
8273
|
const { width, height } = edited.imageDimensions;
|
|
8148
8274
|
const only = edited.layers.length === 1 ? edited.layers[0] : null;
|
|
8149
|
-
const plain3 = _optionalChain([only, 'optionalAccess',
|
|
8150
|
-
if (_optionalChain([old, 'optionalAccess',
|
|
8275
|
+
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";
|
|
8276
|
+
if (_optionalChain([old, 'optionalAccess', _298 => _298.kind]) === "raster" && plain3) {
|
|
8151
8277
|
const px2 = _chunk474IQG74cjs.readRegion.call(void 0, only.surface, { x: -only.offset.x, y: -only.offset.y, width, height });
|
|
8152
8278
|
next = _chunkS55JFWDAcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
|
|
8153
8279
|
} else {
|
|
8154
8280
|
const doc = { layers: edited.layers, globalLight: edited.globalLight, patterns: edited.patterns };
|
|
8155
|
-
next = _chunkS55JFWDAcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess',
|
|
8281
|
+
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
8282
|
}
|
|
8157
8283
|
}
|
|
8158
8284
|
const saved = top.saved;
|
|
@@ -8177,7 +8303,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8177
8303
|
}
|
|
8178
8304
|
/** The document's own layers (not the contents open for editing). */
|
|
8179
8305
|
rootLayers() {
|
|
8180
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
8306
|
+
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
8307
|
}
|
|
8182
8308
|
/** Drops every open contents edit (loading another document). */
|
|
8183
8309
|
abandonContents() {
|
|
@@ -8217,7 +8343,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8217
8343
|
this.commitLayers(_chunkS55JFWDAcjs.setLayerEffects.call(void 0, this.state.layers, id, effects), void 0, commitToHistory);
|
|
8218
8344
|
return this.getLayerEffects(id);
|
|
8219
8345
|
}
|
|
8220
|
-
|
|
8346
|
+
__init99() {this.patternIds = /* @__PURE__ */ new WeakMap()}
|
|
8221
8347
|
/** Changes whenever the document's pattern list is replaced (the compositor then drops its caches). */
|
|
8222
8348
|
patternsVersion() {
|
|
8223
8349
|
const list = this.state.patterns;
|
|
@@ -8379,7 +8505,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8379
8505
|
});
|
|
8380
8506
|
return bg.id;
|
|
8381
8507
|
}
|
|
8382
|
-
|
|
8508
|
+
__init100() {this.thumbCache = /* @__PURE__ */ new WeakMap()}
|
|
8383
8509
|
/**
|
|
8384
8510
|
* A small RGBA preview of a pixel layer over the canvas (or of its mask with `mask: true`),
|
|
8385
8511
|
* longest side `maxSide` px, point-sampled; `null` for layers without pixels.
|
|
@@ -8398,7 +8524,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8398
8524
|
const oy = layer.type === "pixel" ? layer.offset.y : 0;
|
|
8399
8525
|
const key2 = `${tw}x${th}:${ox},${oy}`;
|
|
8400
8526
|
let byKey = this.thumbCache.get(surface);
|
|
8401
|
-
const hit = _optionalChain([byKey, 'optionalAccess',
|
|
8527
|
+
const hit = _optionalChain([byKey, 'optionalAccess', _306 => _306.get, 'call', _307 => _307(key2)]);
|
|
8402
8528
|
if (hit) return hit;
|
|
8403
8529
|
const out = new Uint8ClampedArray(tw * th * 4);
|
|
8404
8530
|
for (let y = 0; y < th; y++) {
|
|
@@ -8539,7 +8665,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8539
8665
|
if (layer.mask.source) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which is generated, not painted.`);
|
|
8540
8666
|
_chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "all", action);
|
|
8541
8667
|
} else if (ch === "filter-mask") {
|
|
8542
|
-
if (layer.type !== "smart" || !_optionalChain([layer, 'access',
|
|
8668
|
+
if (layer.type !== "smart" || !_optionalChain([layer, 'access', _308 => _308.smartFilters, 'optionalAccess', _309 => _309.mask])) {
|
|
8543
8669
|
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
8670
|
}
|
|
8545
8671
|
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 +8680,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8554
8680
|
if (!layer.visible) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" is hidden; show it before you ${action}.`);
|
|
8555
8681
|
const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
|
|
8556
8682
|
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',
|
|
8683
|
+
const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _310 => _310.locks, 'optionalAccess', _311 => _311.transparency]));
|
|
8558
8684
|
return { id, layer, channel: ch, offset, surface, lockTransparency };
|
|
8559
8685
|
}
|
|
8560
8686
|
/** The layer with its pixels (or mask) replaced by `surface`. */
|
|
@@ -8598,13 +8724,13 @@ var ImageEditorController = (_class12 = class {
|
|
|
8598
8724
|
blend: target.channel !== "pixels" ? "normal" : brush.blend,
|
|
8599
8725
|
lockTransparency: target.lockTransparency,
|
|
8600
8726
|
// 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',
|
|
8727
|
+
selection: target.channel !== "quick-mask" && _optionalChain([this, 'access', _312 => _312.state, 'access', _313 => _313.selection, 'optionalAccess', _314 => _314.bounds]) ? this.state.selection : null,
|
|
8602
8728
|
offset: target.offset
|
|
8603
8729
|
};
|
|
8604
8730
|
const depth = target.channel !== "filter-mask" && target.channel !== "quick-mask" && this.bitDepth !== 8 ? this.bitDepth : null;
|
|
8605
8731
|
if (tool === "mixer") return new PaintStrokeSession(this, target, this.mixerStroke(init, brush), apply, depth);
|
|
8606
8732
|
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',
|
|
8733
|
+
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
8734
|
return new PaintStrokeSession(this, target, new (0, _chunkPQ3H2AANcjs.StrokeCoverage)(brush, gradient, _nullishCoalesce(init.seed, () => ( 0))), apply, depth);
|
|
8609
8735
|
}
|
|
8610
8736
|
/** A retouching stroke's start: its settings, what it samples and how it composites. */
|
|
@@ -8651,9 +8777,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
8651
8777
|
const steps = settings.historySteps;
|
|
8652
8778
|
const entry = steps > 0 ? _nullishCoalesce(this.undoStack[this.undoStack.length - steps], () => ( this.undoStack[0])) : this.undoStack[0];
|
|
8653
8779
|
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',
|
|
8780
|
+
const then = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _316 => _316.layer]);
|
|
8655
8781
|
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',
|
|
8782
|
+
const surface = target.channel === "mask" ? _optionalChain([then, 'access', _317 => _317.mask, 'optionalAccess', _318 => _318.surface]) : then.type === "pixel" ? then.surface : void 0;
|
|
8657
8783
|
if (!surface) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
|
|
8658
8784
|
const offset2 = then.type === "pixel" ? then.offset : { x: 0, y: 0 };
|
|
8659
8785
|
const depth = !mask && this.bitDepth !== 8 ? this.bitDepth : null;
|
|
@@ -8727,7 +8853,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8727
8853
|
}
|
|
8728
8854
|
/** A pixel source over a surface (layer pixels or a mask) in layer space at `offset`. */
|
|
8729
8855
|
surfaceSource(surface, offset) {
|
|
8730
|
-
return new (0, _chunkYF3YZZ6Gcjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access',
|
|
8856
|
+
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
8857
|
}
|
|
8732
8858
|
/** A pixel source over the composite of the current layers (through `throughId` and below, or all of them), as it is now. */
|
|
8733
8859
|
compositeSource(throughId, depth = null) {
|
|
@@ -8803,7 +8929,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8803
8929
|
paintStroke(init) {
|
|
8804
8930
|
if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("points must hold at least one { x, y } point.");
|
|
8805
8931
|
for (const p of init.points) {
|
|
8806
|
-
if (!Number.isFinite(_optionalChain([p, 'optionalAccess',
|
|
8932
|
+
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
8933
|
}
|
|
8808
8934
|
const session = this.beginStroke(init);
|
|
8809
8935
|
session.push(init.points);
|
|
@@ -8832,7 +8958,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8832
8958
|
*/
|
|
8833
8959
|
strokeSelection(options) {
|
|
8834
8960
|
const sel = this.state.selection;
|
|
8835
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
8961
|
+
if (!_optionalChain([sel, 'optionalAccess', _325 => _325.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, then stroke the selection.");
|
|
8836
8962
|
const width = options.width;
|
|
8837
8963
|
if (!(width > 0 && width <= 250)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("width must be greater than 0 and at most 250 px.");
|
|
8838
8964
|
const location = _nullishCoalesce(options.location, () => ( "outside"));
|
|
@@ -8849,7 +8975,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8849
8975
|
*/
|
|
8850
8976
|
cropToSelection() {
|
|
8851
8977
|
const sel = this.state.selection;
|
|
8852
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
8978
|
+
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
8979
|
const crop = { ...sel.bounds };
|
|
8854
8980
|
this.setCrop(crop);
|
|
8855
8981
|
return crop;
|
|
@@ -8900,7 +9026,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8900
9026
|
*/
|
|
8901
9027
|
prepareContentAwareFill(options = {}) {
|
|
8902
9028
|
const sel = this.state.selection;
|
|
8903
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9029
|
+
if (!_optionalChain([sel, 'optionalAccess', _327 => _327.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select what to remove, then fill it.");
|
|
8904
9030
|
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
9031
|
const output = _nullishCoalesce(options.output, () => ( "current"));
|
|
8906
9032
|
if (output !== "current" && output !== "new-layer" && output !== "duplicate-layer") {
|
|
@@ -8911,12 +9037,12 @@ var ImageEditorController = (_class12 = class {
|
|
|
8911
9037
|
const b = sel.bounds;
|
|
8912
9038
|
let area = _nullishCoalesce(options.samplingArea, () => ( null));
|
|
8913
9039
|
if (!area && options.samplingChannelId) area = this.requireChannel(options.samplingChannelId).mask;
|
|
8914
|
-
if (!area && _optionalChain([options, 'access',
|
|
9040
|
+
if (!area && _optionalChain([options, 'access', _328 => _328.sampleRects, 'optionalAccess', _329 => _329.length])) {
|
|
8915
9041
|
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
9042
|
}
|
|
8917
9043
|
if (area && !area.bounds) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("The sampling area is empty; paint or give an area to sample from.");
|
|
8918
9044
|
let win;
|
|
8919
|
-
if (_optionalChain([area, 'optionalAccess',
|
|
9045
|
+
if (_optionalChain([area, 'optionalAccess', _330 => _330.bounds])) {
|
|
8920
9046
|
const a = area.bounds;
|
|
8921
9047
|
const x0 = Math.max(0, Math.min(b.x - 8, a.x));
|
|
8922
9048
|
const y0 = Math.max(0, Math.min(b.y - 8, a.y));
|
|
@@ -8941,7 +9067,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8941
9067
|
}
|
|
8942
9068
|
}
|
|
8943
9069
|
let exclude = null;
|
|
8944
|
-
if (area || _optionalChain([options, 'access',
|
|
9070
|
+
if (area || _optionalChain([options, 'access', _331 => _331.excludeRects, 'optionalAccess', _332 => _332.length])) {
|
|
8945
9071
|
exclude = new Uint8Array(n);
|
|
8946
9072
|
if (area) {
|
|
8947
9073
|
const ad = area.data;
|
|
@@ -8993,7 +9119,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8993
9119
|
return { layerId: target.id, bounds: { ...b }, output };
|
|
8994
9120
|
}
|
|
8995
9121
|
/** The pixel clipboard (Copy / Cut), or null. */
|
|
8996
|
-
|
|
9122
|
+
__init101() {this.clipboard = null}
|
|
8997
9123
|
/** What Copy or Cut last put on the editor's clipboard, or null. */
|
|
8998
9124
|
getClipboard() {
|
|
8999
9125
|
return this.clipboard;
|
|
@@ -9012,8 +9138,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
9012
9138
|
*/
|
|
9013
9139
|
copyPixels(options = {}) {
|
|
9014
9140
|
const { width, height } = this.naturalSize;
|
|
9015
|
-
const sel = _optionalChain([this, 'access',
|
|
9016
|
-
const rect2 = _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
9141
|
+
const sel = _optionalChain([this, 'access', _333 => _333.state, 'access', _334 => _334.selection, 'optionalAccess', _335 => _335.bounds]) ? this.state.selection : null;
|
|
9142
|
+
const rect2 = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _336 => _336.bounds]), () => ( { x: 0, y: 0, width, height }));
|
|
9017
9143
|
let data;
|
|
9018
9144
|
if (options.merged) {
|
|
9019
9145
|
data = new Uint8ClampedArray(this.compositePixels(rect2).data);
|
|
@@ -9053,7 +9179,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9053
9179
|
pastePixels(mode = "new-layer", image = this.clipboard) {
|
|
9054
9180
|
if (!image) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("The clipboard is empty; copy_pixels first.");
|
|
9055
9181
|
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',
|
|
9182
|
+
const sel = _optionalChain([this, 'access', _337 => _337.state, 'access', _338 => _338.selection, 'optionalAccess', _339 => _339.bounds]) ? this.state.selection : null;
|
|
9057
9183
|
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
9184
|
const { width, height } = this.naturalSize;
|
|
9059
9185
|
let x;
|
|
@@ -9062,7 +9188,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9062
9188
|
x = image.x;
|
|
9063
9189
|
y = image.y;
|
|
9064
9190
|
} else {
|
|
9065
|
-
const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
9191
|
+
const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _340 => _340.bounds]), () => ( { x: 0, y: 0, width, height }));
|
|
9066
9192
|
x = Math.round(frame.x + (frame.width - image.width) / 2);
|
|
9067
9193
|
y = Math.round(frame.y + (frame.height - image.height) / 2);
|
|
9068
9194
|
}
|
|
@@ -9079,8 +9205,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
9079
9205
|
if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("opacity must be from 0 to 1.");
|
|
9080
9206
|
const blend = _nullishCoalesce(_chunkS55JFWDAcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
|
|
9081
9207
|
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',
|
|
9208
|
+
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)));
|
|
9209
|
+
const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _344 => _344.bounds]), () => ( { x: 0, y: 0, width, height }));
|
|
9084
9210
|
const coverage = new (0, _chunkPQ3H2AANcjs.CoverageMap)();
|
|
9085
9211
|
const ones = new Float32Array(region.width * region.height);
|
|
9086
9212
|
if (sel) {
|
|
@@ -9205,7 +9331,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9205
9331
|
placeLayer(layers, node, where) {
|
|
9206
9332
|
if (where.aboveId) {
|
|
9207
9333
|
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',
|
|
9334
|
+
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
9335
|
}
|
|
9210
9336
|
if (where.parentId) {
|
|
9211
9337
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, where.parentId);
|
|
@@ -9216,11 +9342,11 @@ var ImageEditorController = (_class12 = class {
|
|
|
9216
9342
|
const at = Math.max(0, Math.min(nodes.length, Math.round(where.adjustmentIndex)));
|
|
9217
9343
|
if (at < nodes.length) {
|
|
9218
9344
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, nodes[at].id);
|
|
9219
|
-
return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9345
|
+
return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _347 => _347.parent, 'optionalAccess', _348 => _348.id]), () => ( null)), loc.index);
|
|
9220
9346
|
}
|
|
9221
9347
|
if (nodes.length) {
|
|
9222
9348
|
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',
|
|
9349
|
+
return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _349 => _349.parent, 'optionalAccess', _350 => _350.id]), () => ( null)), loc.index + 1);
|
|
9224
9350
|
}
|
|
9225
9351
|
}
|
|
9226
9352
|
return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, null, this.defaultInsertIndex(layers));
|
|
@@ -9259,7 +9385,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9259
9385
|
enabled: spec.enabled,
|
|
9260
9386
|
opacity: spec.opacity,
|
|
9261
9387
|
blend: spec.blend,
|
|
9262
|
-
mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access',
|
|
9388
|
+
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
9389
|
});
|
|
9264
9390
|
while (ids.has(layer.id)) layer.id = _chunkS55JFWDAcjs.newLayerId.call(void 0, "adj");
|
|
9265
9391
|
const { width, height } = this.naturalSize;
|
|
@@ -9336,7 +9462,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9336
9462
|
const anchor = nodes[to];
|
|
9337
9463
|
const without = _chunkB46UQUDCcjs.mapLayer.call(void 0, layers, id, () => null);
|
|
9338
9464
|
const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, without, anchor.id);
|
|
9339
|
-
return _chunkB46UQUDCcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9465
|
+
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
9466
|
}
|
|
9341
9467
|
/** Moves a layer to `toIndex` among the adjustment layers (0 = bottom) as one undo step. Returns false if nothing moved. */
|
|
9342
9468
|
moveAdjustmentLayer(id, toIndex) {
|
|
@@ -9377,7 +9503,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9377
9503
|
return _nullishCoalesce(this.state.selection, () => ( null));
|
|
9378
9504
|
}
|
|
9379
9505
|
get hasSelection() {
|
|
9380
|
-
return Boolean(_optionalChain([this, 'access',
|
|
9506
|
+
return Boolean(_optionalChain([this, 'access', _356 => _356.state, 'access', _357 => _357.selection, 'optionalAccess', _358 => _358.bounds]));
|
|
9381
9507
|
}
|
|
9382
9508
|
/** Returns the current canvas (composition) dimensions. */
|
|
9383
9509
|
getCanvasSize() {
|
|
@@ -9469,7 +9595,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9469
9595
|
const prev = normalizeSelection(_nullishCoalesce(this.state.selection, () => ( null)));
|
|
9470
9596
|
if (prev === next || prev && next && sameSelection(prev, next)) return false;
|
|
9471
9597
|
this.recordHistory();
|
|
9472
|
-
if (!next && _optionalChain([prev, 'optionalAccess',
|
|
9598
|
+
if (!next && _optionalChain([prev, 'optionalAccess', _359 => _359.bounds])) this.lastSelection = prev;
|
|
9473
9599
|
this.state.selection = next;
|
|
9474
9600
|
this.notify();
|
|
9475
9601
|
return true;
|
|
@@ -9495,7 +9621,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9495
9621
|
return this.setSelection(null);
|
|
9496
9622
|
}
|
|
9497
9623
|
/** The selection a Deselect cleared, for `reselect` (not saved, not part of history). */
|
|
9498
|
-
|
|
9624
|
+
__init102() {this.lastSelection = null}
|
|
9499
9625
|
/** Whether `reselect` has a selection to bring back. */
|
|
9500
9626
|
canReselect() {
|
|
9501
9627
|
const { width, height } = this.naturalSize;
|
|
@@ -9523,14 +9649,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
9523
9649
|
/** Select › Grow: adds connected pixels within `tolerance` of a selected colour (one undo step). */
|
|
9524
9650
|
async growSelection(options = {}) {
|
|
9525
9651
|
const sel = this.state.selection;
|
|
9526
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9652
|
+
if (!_optionalChain([sel, 'optionalAccess', _360 => _360.bounds])) return false;
|
|
9527
9653
|
const pixels = await this.requirePixels(options);
|
|
9528
9654
|
return this.setSelection(growSelection(pixels, sel, options));
|
|
9529
9655
|
}
|
|
9530
9656
|
/** Select › Similar: adds every pixel within `tolerance` of a selected colour (one undo step). */
|
|
9531
9657
|
async selectSimilar(options = {}) {
|
|
9532
9658
|
const sel = this.state.selection;
|
|
9533
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9659
|
+
if (!_optionalChain([sel, 'optionalAccess', _361 => _361.bounds])) return false;
|
|
9534
9660
|
const pixels = await this.requirePixels(options);
|
|
9535
9661
|
return this.setSelection(selectSimilar(pixels, sel, options));
|
|
9536
9662
|
}
|
|
@@ -9622,7 +9748,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9622
9748
|
size: options.size,
|
|
9623
9749
|
grow: m === "add",
|
|
9624
9750
|
enhanceEdge: options.enhanceEdge,
|
|
9625
|
-
selection: m === "add" && _optionalChain([sel, 'optionalAccess',
|
|
9751
|
+
selection: m === "add" && _optionalChain([sel, 'optionalAccess', _362 => _362.bounds]) ? _chunkUC3PWFM3cjs.serializeMask.call(void 0, sel) : null
|
|
9626
9752
|
};
|
|
9627
9753
|
const { mask } = await this.runSelectionJob(job, pixels, {
|
|
9628
9754
|
signal: options.signal,
|
|
@@ -9642,7 +9768,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9642
9768
|
const { width, height } = this.naturalSize;
|
|
9643
9769
|
const image = await this.toDataURL({ format: "image/png" });
|
|
9644
9770
|
const results = await provider.segment({ ...request, image, width, height });
|
|
9645
|
-
_optionalChain([request, 'access',
|
|
9771
|
+
_optionalChain([request, 'access', _363 => _363.signal, 'optionalAccess', _364 => _364.throwIfAborted, 'call', _365 => _365()]);
|
|
9646
9772
|
const decoded = [];
|
|
9647
9773
|
for (const r of _nullishCoalesce(results, () => ( []))) decoded.push({ ...r, mask: r.mask !== void 0 ? await this.decodeMaskImage(r.mask) : void 0 });
|
|
9648
9774
|
return decoded;
|
|
@@ -9659,7 +9785,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9659
9785
|
let union = null;
|
|
9660
9786
|
for (const r of decoded) {
|
|
9661
9787
|
const one = segmentsToSelection(width, height, [r]);
|
|
9662
|
-
if (!_optionalChain([one, 'optionalAccess',
|
|
9788
|
+
if (!_optionalChain([one, 'optionalAccess', _366 => _366.bounds])) continue;
|
|
9663
9789
|
if ("rect" in target) {
|
|
9664
9790
|
const r0 = target.rect;
|
|
9665
9791
|
const grow = 0.1 * Math.max(r0.width, r0.height);
|
|
@@ -9727,7 +9853,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9727
9853
|
if (this.segmentation && options.useModel !== false) {
|
|
9728
9854
|
const { width, height } = this.naturalSize;
|
|
9729
9855
|
const sky = segmentsToSelection(width, height, await this.modelSegments({ target: "the sky", signal: options.signal }));
|
|
9730
|
-
if (!_optionalChain([sky, 'optionalAccess',
|
|
9856
|
+
if (!_optionalChain([sky, 'optionalAccess', _367 => _367.bounds])) return { selection: _nullishCoalesce(this.state.selection, () => ( null)), method: "model", note: "The segmentation model found no sky." };
|
|
9731
9857
|
this.setSelection(sky, _nullishCoalesce(options.mode, () => ( "replace")));
|
|
9732
9858
|
return { selection: _nullishCoalesce(this.state.selection, () => ( null)), method: "model" };
|
|
9733
9859
|
}
|
|
@@ -9758,13 +9884,13 @@ var ImageEditorController = (_class12 = class {
|
|
|
9758
9884
|
try {
|
|
9759
9885
|
const canvas = await this.renderSource();
|
|
9760
9886
|
const ctx = canvas.getContext("2d");
|
|
9761
|
-
const data2 = _optionalChain([ctx, 'optionalAccess',
|
|
9887
|
+
const data2 = _optionalChain([ctx, 'optionalAccess', _368 => _368.getImageData, 'optionalCall', _369 => _369(0, 0, width, height)]);
|
|
9762
9888
|
if (data2 && data2.data && data2.data.length >= width * height * 4) {
|
|
9763
9889
|
base = { width, height, data: data2.data };
|
|
9764
9890
|
this.samplePixels = base;
|
|
9765
9891
|
this.samplePixelsOverride = false;
|
|
9766
9892
|
}
|
|
9767
|
-
} catch (
|
|
9893
|
+
} catch (e32) {
|
|
9768
9894
|
base = null;
|
|
9769
9895
|
}
|
|
9770
9896
|
}
|
|
@@ -9833,7 +9959,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9833
9959
|
/** Select › Modify: grow, shrink, feather, border or smooth by `radius` pixels (one undo step). */
|
|
9834
9960
|
modifySelection(op, radius) {
|
|
9835
9961
|
const sel = this.state.selection;
|
|
9836
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9962
|
+
if (!_optionalChain([sel, 'optionalAccess', _370 => _370.bounds])) return false;
|
|
9837
9963
|
return this.setSelection(_chunkSS53NNZOcjs.modifySelection.call(void 0, sel, op, radius));
|
|
9838
9964
|
}
|
|
9839
9965
|
/**
|
|
@@ -9842,7 +9968,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9842
9968
|
*/
|
|
9843
9969
|
async refineSelection(params, options = {}) {
|
|
9844
9970
|
const sel = this.state.selection;
|
|
9845
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9971
|
+
if (!_optionalChain([sel, 'optionalAccess', _371 => _371.bounds])) return false;
|
|
9846
9972
|
const pixels = (_nullishCoalesce(params.radius, () => ( 0))) > 0 ? await this.requirePixels(options) : null;
|
|
9847
9973
|
return this.setSelection(_chunkSS53NNZOcjs.refineSelection.call(void 0, pixels, sel, params));
|
|
9848
9974
|
}
|
|
@@ -9865,7 +9991,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9865
9991
|
const edits = _nullishCoalesce(options.edits, () => ( []));
|
|
9866
9992
|
const regions2 = this.checkRegions(options.regions);
|
|
9867
9993
|
const refineMode = _nullishCoalesce(options.refineMode, () => ( "color"));
|
|
9868
|
-
if (!_optionalChain([this, 'access',
|
|
9994
|
+
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
9995
|
if (refineMode === "object" && !this.segmentation) {
|
|
9870
9996
|
throw new Error("Object aware refinement needs a segmentation model (setSegmentationProvider); use refineMode color.");
|
|
9871
9997
|
}
|
|
@@ -9888,14 +10014,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
9888
10014
|
const { width, height } = this.naturalSize;
|
|
9889
10015
|
const edited = _chunkUC3PWFM3cjs.applyRefineEdits.call(void 0, pixels, _nullishCoalesce(this.state.selection, () => ( null)), edits, width, height);
|
|
9890
10016
|
let sel = edited.selection;
|
|
9891
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10017
|
+
if (!_optionalChain([sel, 'optionalAccess', _375 => _375.bounds])) throw new Error("The edits leave nothing selected; paint with mode add first.");
|
|
9892
10018
|
if (refineMode === "object") {
|
|
9893
10019
|
const b = sel.bounds;
|
|
9894
10020
|
const found = await this.modelObject({ rect: b }, options.signal);
|
|
9895
10021
|
if (!found) throw new Error("The segmentation model found no object in the selection; use refineMode color.");
|
|
9896
10022
|
const near = _chunkSS53NNZOcjs.modifySelection.call(void 0, sel, "expand", Math.max(4, _nullishCoalesce(params.radius, () => ( 8))));
|
|
9897
10023
|
const clipped = _chunkSS53NNZOcjs.combineSelections.call(void 0, found, near, "intersect");
|
|
9898
|
-
if (!_optionalChain([clipped, 'optionalAccess',
|
|
10024
|
+
if (!_optionalChain([clipped, 'optionalAccess', _376 => _376.bounds])) throw new Error("The segmentation model found no object in the selection; use refineMode color.");
|
|
9899
10025
|
sel = clipped;
|
|
9900
10026
|
}
|
|
9901
10027
|
let refined = _chunkSS53NNZOcjs.refineSelection.call(void 0, pixels, sel, params, edited.refineBrush);
|
|
@@ -9997,7 +10123,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9997
10123
|
let mask;
|
|
9998
10124
|
if (source === "selection") {
|
|
9999
10125
|
const sel = this.state.selection;
|
|
10000
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10126
|
+
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
10127
|
mask = sel;
|
|
10002
10128
|
} else if ("channelId" in source) {
|
|
10003
10129
|
mask = this.requireChannel(source.channelId).mask;
|
|
@@ -10021,7 +10147,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10021
10147
|
const canvas = this.renderer.createCanvas(w, h);
|
|
10022
10148
|
const ctx = canvas.getContext("2d");
|
|
10023
10149
|
if (ctx) ctx.drawImage(img, 0, 0, w, h);
|
|
10024
|
-
const data = _optionalChain([ctx, 'optionalAccess',
|
|
10150
|
+
const data = _optionalChain([ctx, 'optionalAccess', _378 => _378.getImageData, 'optionalCall', _379 => _379(0, 0, w, h)]);
|
|
10025
10151
|
if (!data) throw new Error("The mask image pixels are not available (no canvas access); pass pixels.");
|
|
10026
10152
|
return { width: w, height: h, data: data.data };
|
|
10027
10153
|
}
|
|
@@ -10037,7 +10163,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10037
10163
|
const provider = this.segmentation;
|
|
10038
10164
|
if (!provider) {
|
|
10039
10165
|
const pixels = await this.requirePixels({});
|
|
10040
|
-
_optionalChain([options, 'access',
|
|
10166
|
+
_optionalChain([options, 'access', _380 => _380.signal, 'optionalAccess', _381 => _381.throwIfAborted, 'call', _382 => _382()]);
|
|
10041
10167
|
const { mask: selection, reason } = await this.runSelectionJob({ op: "subject", enhanceEdge: options.enhanceEdge }, pixels, options);
|
|
10042
10168
|
if (selection.bounds) this.shapeCommand(selection, options);
|
|
10043
10169
|
const unused = target.trim() ? ` "${target.trim()}" was not used to choose it.` : "";
|
|
@@ -10053,17 +10179,17 @@ var ImageEditorController = (_class12 = class {
|
|
|
10053
10179
|
const decoded = await this.modelSegments({ target: description, maxSegments: options.maxSegments, signal: options.signal });
|
|
10054
10180
|
const segments = decoded.map((r) => {
|
|
10055
10181
|
const one = segmentsToSelection(width, height, [r]);
|
|
10056
|
-
return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess',
|
|
10182
|
+
return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess', _383 => _383.bounds]), () => ( null)), ...r.score !== void 0 ? { score: r.score } : {} };
|
|
10057
10183
|
});
|
|
10058
10184
|
const mask = segmentsToSelection(width, height, decoded);
|
|
10059
10185
|
if (mask && options.beforeApply) {
|
|
10060
10186
|
const outlines = decoded.flatMap((r, i) => {
|
|
10061
10187
|
const rings = segmentationOutlines(r);
|
|
10062
|
-
const b = _optionalChain([segments, 'access',
|
|
10188
|
+
const b = _optionalChain([segments, 'access', _384 => _384[i], 'optionalAccess', _385 => _385.bounds]);
|
|
10063
10189
|
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
10190
|
});
|
|
10065
10191
|
await options.beforeApply(outlines);
|
|
10066
|
-
_optionalChain([options, 'access',
|
|
10192
|
+
_optionalChain([options, 'access', _386 => _386.signal, 'optionalAccess', _387 => _387.throwIfAborted, 'call', _388 => _388()]);
|
|
10067
10193
|
}
|
|
10068
10194
|
if (mask) this.shapeCommand(mask, options);
|
|
10069
10195
|
return { segments: segments.filter((s) => s.bounds), method: "model" };
|
|
@@ -10096,7 +10222,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10096
10222
|
const view = this.state.maskView;
|
|
10097
10223
|
if (!view) return null;
|
|
10098
10224
|
const layer = this.getLayer(view.layerId);
|
|
10099
|
-
return _optionalChain([layer, 'optionalAccess',
|
|
10225
|
+
return _optionalChain([layer, 'optionalAccess', _389 => _389.mask]) && !layer.mask.source ? view : null;
|
|
10100
10226
|
}
|
|
10101
10227
|
/**
|
|
10102
10228
|
* Shows a layer's mask on the canvas: `gray` alone in grey (Alt-click the mask thumbnail),
|
|
@@ -10119,7 +10245,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10119
10245
|
if (!layer.mask) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask to show; add one with add_layer_mask.`);
|
|
10120
10246
|
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
10247
|
const cur = this.state.maskView;
|
|
10122
|
-
if (_optionalChain([cur, 'optionalAccess',
|
|
10248
|
+
if (_optionalChain([cur, 'optionalAccess', _390 => _390.layerId]) !== id || cur.mode !== mode) {
|
|
10123
10249
|
this.state.maskView = { layerId: id, mode };
|
|
10124
10250
|
this.notify();
|
|
10125
10251
|
}
|
|
@@ -10131,7 +10257,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10131
10257
|
return _nullishCoalesce(this.state.channels, () => ( []));
|
|
10132
10258
|
}
|
|
10133
10259
|
getChannel(id) {
|
|
10134
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
10260
|
+
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
10261
|
}
|
|
10136
10262
|
requireChannel(id) {
|
|
10137
10263
|
const channel = this.getChannel(id);
|
|
@@ -10160,14 +10286,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
10160
10286
|
*/
|
|
10161
10287
|
saveSelection(options = {}) {
|
|
10162
10288
|
const sel = this.state.selection;
|
|
10163
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10289
|
+
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
10290
|
const { width, height } = this.naturalSize;
|
|
10165
10291
|
const sized = sel.width === width && sel.height === height ? sel : _chunkSS53NNZOcjs.resizeSelection.call(void 0, sel, width, height);
|
|
10166
10292
|
const channels = [...this.getChannels()];
|
|
10167
10293
|
if (options.channelId !== void 0) {
|
|
10168
10294
|
const existing = this.requireChannel(options.channelId);
|
|
10169
10295
|
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',
|
|
10296
|
+
const next = { ...existing, mask, ..._optionalChain([options, 'access', _396 => _396.name, 'optionalAccess', _397 => _397.trim, 'call', _398 => _398()]) ? { name: options.name.trim() } : {} };
|
|
10171
10297
|
this.setChannels(channels.map((c) => c.id === existing.id ? next : c));
|
|
10172
10298
|
return next;
|
|
10173
10299
|
}
|
|
@@ -10178,7 +10304,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10178
10304
|
const channels = this.getChannels();
|
|
10179
10305
|
const channel = {
|
|
10180
10306
|
id: this.newChannelId(),
|
|
10181
|
-
name: _optionalChain([name, 'optionalAccess',
|
|
10307
|
+
name: _optionalChain([name, 'optionalAccess', _399 => _399.trim, 'call', _400 => _400()]) || `Alpha ${channels.length + 1}`,
|
|
10182
10308
|
mask,
|
|
10183
10309
|
color: DEFAULT_CHANNEL_COLOR,
|
|
10184
10310
|
opacity: 0.5,
|
|
@@ -10223,7 +10349,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10223
10349
|
/** Duplicates an alpha channel just after it (one undo step). Returns the copy. */
|
|
10224
10350
|
duplicateChannel(id, name) {
|
|
10225
10351
|
const channel = this.requireChannel(id);
|
|
10226
|
-
const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess',
|
|
10352
|
+
const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess', _401 => _401.trim, 'call', _402 => _402()]) || `${channel.name} copy` };
|
|
10227
10353
|
const channels = [...this.getChannels()];
|
|
10228
10354
|
channels.splice(channels.findIndex((c) => c.id === id) + 1, 0, copy);
|
|
10229
10355
|
this.setChannels(channels);
|
|
@@ -10254,7 +10380,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10254
10380
|
quickMaskSurface() {
|
|
10255
10381
|
const { width, height } = this.naturalSize;
|
|
10256
10382
|
const sel = this.state.selection;
|
|
10257
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10383
|
+
if (!_optionalChain([sel, 'optionalAccess', _403 => _403.bounds])) return _chunk474IQG74cjs.emptySurface.call(void 0, 1, 0);
|
|
10258
10384
|
return (sel.width === width && sel.height === height ? sel : _chunkSS53NNZOcjs.resizeSelection.call(void 0, sel, width, height)).surface;
|
|
10259
10385
|
}
|
|
10260
10386
|
/** The selection a painted Quick Mask surface stands for (it shares the surface's tiles). */
|
|
@@ -10275,7 +10401,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10275
10401
|
*/
|
|
10276
10402
|
applySelectionAsLayerMask(layerId, props = {}) {
|
|
10277
10403
|
const sel = this.state.selection;
|
|
10278
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10404
|
+
if (!_optionalChain([sel, 'optionalAccess', _404 => _404.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
|
|
10279
10405
|
return this.setLayerMask(layerId, this.maskFromSelection(sel, props));
|
|
10280
10406
|
}
|
|
10281
10407
|
setLayerMask(layerId, mask, commitToHistory = true) {
|
|
@@ -10324,7 +10450,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10324
10450
|
let layer;
|
|
10325
10451
|
if (target === "selection") {
|
|
10326
10452
|
mask = this.getSelection();
|
|
10327
|
-
if (!_optionalChain([mask, 'optionalAccess',
|
|
10453
|
+
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
10454
|
} else if (target === "layer-mask" || target === "vector-mask") {
|
|
10329
10455
|
if (!options.layerId) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`A ${target} needs layerId (see list_layers).`);
|
|
10330
10456
|
layer = this.getLayer(options.layerId);
|
|
@@ -10345,7 +10471,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10345
10471
|
const x = Math.max(0, b.x - 8);
|
|
10346
10472
|
const y = Math.max(0, b.y - 8);
|
|
10347
10473
|
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',
|
|
10474
|
+
const own = _optionalChain([layer, 'optionalAccess', _406 => _406.type]) === "pixel" ? this.getLayerPixels(layer.id) : null;
|
|
10349
10475
|
const image = _nullishCoalesce(own, () => ( { ...this.compositePixels(region), x: region.x, y: region.y }));
|
|
10350
10476
|
const report = inspectMaskEdge(mask, image, options);
|
|
10351
10477
|
return { target, ...layer ? { layerId: layer.id } : {}, ...report };
|
|
@@ -10356,10 +10482,10 @@ var ImageEditorController = (_class12 = class {
|
|
|
10356
10482
|
const { width, height } = this.naturalSize;
|
|
10357
10483
|
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
10484
|
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',
|
|
10485
|
+
const x = Math.max(0, Math.floor(_optionalChain([r, 'optionalAccess', _407 => _407.x])));
|
|
10486
|
+
const y = Math.max(0, Math.floor(_optionalChain([r, 'optionalAccess', _408 => _408.y])));
|
|
10487
|
+
const x1 = Math.min(width, Math.ceil(_optionalChain([r, 'optionalAccess', _409 => _409.x]) + _optionalChain([r, 'optionalAccess', _410 => _410.width])));
|
|
10488
|
+
const y1 = Math.min(height, Math.ceil(_optionalChain([r, 'optionalAccess', _411 => _411.y]) + _optionalChain([r, 'optionalAccess', _412 => _412.height])));
|
|
10363
10489
|
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
10490
|
return { x, y, width: x1 - x, height: y1 - y };
|
|
10365
10491
|
});
|
|
@@ -10373,7 +10499,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10373
10499
|
selectionUncertainty(options = {}) {
|
|
10374
10500
|
const { width, height } = this.naturalSize;
|
|
10375
10501
|
const sel = this.getSelection();
|
|
10376
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10502
|
+
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
10503
|
const b = sel.bounds;
|
|
10378
10504
|
const m = Math.max(8, Math.ceil(_nullishCoalesce(options.band, () => ( Math.max(2, Math.min(width, height) / 200)))) + 4);
|
|
10379
10505
|
const x = Math.max(0, b.x - m);
|
|
@@ -10381,10 +10507,69 @@ var ImageEditorController = (_class12 = class {
|
|
|
10381
10507
|
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
10508
|
return selectionUncertainty(sel, { ...this.compositePixels(region), x, y }, options);
|
|
10383
10509
|
}
|
|
10510
|
+
/**
|
|
10511
|
+
* A selection to compare (`compareSelections`): the current one, the one `steps` undo steps
|
|
10512
|
+
* ago, a saved channel, or a layer's painted or vector mask. `null` is nothing selected.
|
|
10513
|
+
*/
|
|
10514
|
+
selectionFrom(source) {
|
|
10515
|
+
const { width, height } = this.naturalSize;
|
|
10516
|
+
switch (_optionalChain([source, 'optionalAccess', _414 => _414.kind])) {
|
|
10517
|
+
case "selection":
|
|
10518
|
+
return this.getSelection();
|
|
10519
|
+
case "history": {
|
|
10520
|
+
const steps = _nullishCoalesce(source.steps, () => ( 1));
|
|
10521
|
+
const depth = this.undoStack.length;
|
|
10522
|
+
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)}.`);
|
|
10523
|
+
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"}.`);
|
|
10524
|
+
return _nullishCoalesce(this.undoStack[depth - steps].selection, () => ( null));
|
|
10525
|
+
}
|
|
10526
|
+
case "channel":
|
|
10527
|
+
return this.requireChannel(source.channelId).mask;
|
|
10528
|
+
case "layer-mask": {
|
|
10529
|
+
const layer = this.getLayer(source.layerId);
|
|
10530
|
+
if (!layer) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`There is no layer "${source.layerId}" (see list_layers).`);
|
|
10531
|
+
const mask = this.layerMaskCoverage(layer.id);
|
|
10532
|
+
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.`);
|
|
10533
|
+
return mask;
|
|
10534
|
+
}
|
|
10535
|
+
case "vector-mask": {
|
|
10536
|
+
const layer = this.getLayer(source.layerId);
|
|
10537
|
+
if (!layer) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`There is no layer "${source.layerId}" (see list_layers).`);
|
|
10538
|
+
const { vm } = this.requireVectorMask(layer.id);
|
|
10539
|
+
const mask = pathToSelection(vm.components, width, height, { fillRule: vm.fillRule });
|
|
10540
|
+
return vm.inverted ? _chunkSS53NNZOcjs.invertSelection.call(void 0, mask) : mask;
|
|
10541
|
+
}
|
|
10542
|
+
default:
|
|
10543
|
+
throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Unknown selection source ${JSON.stringify(source)}. Use selection, history, channel, layer-mask or vector-mask.`);
|
|
10544
|
+
}
|
|
10545
|
+
}
|
|
10546
|
+
/**
|
|
10547
|
+
* What changed from selection `a` (default: before the last undo step) to `b` (default: the
|
|
10548
|
+
* current selection): added and removed area with their largest pieces, IoU and the coverage
|
|
10549
|
+
* change. With `show` (default true) the canvas tints added area green and removed red until the
|
|
10550
|
+
* selection next changes (view state, no undo step). Read-only otherwise.
|
|
10551
|
+
*/
|
|
10552
|
+
compareSelections(a = { kind: "history", steps: 1 }, b = { kind: "selection" }, options = {}) {
|
|
10553
|
+
const { width, height } = this.naturalSize;
|
|
10554
|
+
const ma = this.selectionFrom(a);
|
|
10555
|
+
const mb = this.selectionFrom(b);
|
|
10556
|
+
const { addedMask, removedMask, ...diff } = compareSelectionMasks(ma, mb, width, height, options);
|
|
10557
|
+
if (options.show !== false) {
|
|
10558
|
+
this.state.selectionDiff = diff.identical ? null : { added: addedMask, removed: removedMask, selection: _nullishCoalesce(this.state.selection, () => ( null)) };
|
|
10559
|
+
this.notify();
|
|
10560
|
+
}
|
|
10561
|
+
return diff;
|
|
10562
|
+
}
|
|
10563
|
+
/** Hides the `compareSelections` overlay. */
|
|
10564
|
+
clearSelectionDiff() {
|
|
10565
|
+
if (!this.state.selectionDiff) return;
|
|
10566
|
+
this.state.selectionDiff = null;
|
|
10567
|
+
this.notify();
|
|
10568
|
+
}
|
|
10384
10569
|
/** A layer's painted mask over the canvas as a selection mask; null without one (or for a depth mask). */
|
|
10385
10570
|
layerMaskCoverage(layerId) {
|
|
10386
10571
|
const layer = this.getLayer(layerId);
|
|
10387
|
-
if (!_optionalChain([layer, 'optionalAccess',
|
|
10572
|
+
if (!_optionalChain([layer, 'optionalAccess', _415 => _415.mask]) || layer.mask.source) return null;
|
|
10388
10573
|
const { width, height } = this.naturalSize;
|
|
10389
10574
|
const ox = layer.type === "pixel" ? layer.offset.x : 0;
|
|
10390
10575
|
const oy = layer.type === "pixel" ? layer.offset.y : 0;
|
|
@@ -10419,7 +10604,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10419
10604
|
this.state.layers = _chunkB46UQUDCcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
|
|
10420
10605
|
const next = { ...l };
|
|
10421
10606
|
if (_chunkS55JFWDAcjs.isDefaultDepthMask.call(void 0, merged)) {
|
|
10422
|
-
if (_optionalChain([next, 'access',
|
|
10607
|
+
if (_optionalChain([next, 'access', _416 => _416.mask, 'optionalAccess', _417 => _417.source])) delete next.mask;
|
|
10423
10608
|
} else next.mask = _chunkS55JFWDAcjs.depthRasterMask.call(void 0, merged);
|
|
10424
10609
|
return next;
|
|
10425
10610
|
});
|
|
@@ -10429,7 +10614,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10429
10614
|
resetDepthMask() {
|
|
10430
10615
|
this.recordHistory();
|
|
10431
10616
|
const target = this.developLayer();
|
|
10432
|
-
if (_optionalChain([target, 'optionalAccess',
|
|
10617
|
+
if (_optionalChain([target, 'optionalAccess', _418 => _418.mask, 'optionalAccess', _419 => _419.source])) {
|
|
10433
10618
|
this.state.layers = _chunkB46UQUDCcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
|
|
10434
10619
|
const next = { ...l };
|
|
10435
10620
|
delete next.mask;
|
|
@@ -10441,7 +10626,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10441
10626
|
// --- Annotations & Layers ---
|
|
10442
10627
|
/** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
|
|
10443
10628
|
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',
|
|
10629
|
+
return _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkS55JFWDAcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _420 => _420.id]) === id);
|
|
10445
10630
|
}
|
|
10446
10631
|
/** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
|
|
10447
10632
|
annotationEnv() {
|
|
@@ -10459,7 +10644,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10459
10644
|
const fullAnnotation = { ...annotation, id };
|
|
10460
10645
|
const layer = _chunkS55JFWDAcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
|
|
10461
10646
|
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',
|
|
10647
|
+
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
10648
|
this.state.selectedAnnotationId = id;
|
|
10464
10649
|
this.notify();
|
|
10465
10650
|
return id;
|
|
@@ -10539,7 +10724,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10539
10724
|
this.notify();
|
|
10540
10725
|
}
|
|
10541
10726
|
// --- Rendering & Export ---
|
|
10542
|
-
|
|
10727
|
+
__init103() {this.blankSource = null}
|
|
10543
10728
|
/**
|
|
10544
10729
|
* What the renderer draws from: the source image, or, for a document without one (an opened
|
|
10545
10730
|
* PSD, a v3 document loaded on its own), a transparent canvas of the document size, since every
|
|
@@ -10582,11 +10767,11 @@ var ImageEditorController = (_class12 = class {
|
|
|
10582
10767
|
await this.renderer.renderToCanvas(targetCanvas, source, this.state, {
|
|
10583
10768
|
...options,
|
|
10584
10769
|
// The clone source follows the brush cursor (both editors pass it).
|
|
10585
|
-
cloneSourceMarker: _optionalChain([options, 'optionalAccess',
|
|
10770
|
+
cloneSourceMarker: _optionalChain([options, 'optionalAccess', _423 => _423.cloneSourceMarker]) !== void 0 ? options.cloneSourceMarker : _optionalChain([options, 'optionalAccess', _424 => _424.brushCursor]) ? this.cloneSourceMarker(options.brushCursor) : null,
|
|
10586
10771
|
dirty: dirty === "all" ? void 0 : dirty,
|
|
10587
10772
|
checkpointLayerId: this.state.activeLayerId
|
|
10588
10773
|
});
|
|
10589
|
-
} catch (
|
|
10774
|
+
} catch (e33) {
|
|
10590
10775
|
}
|
|
10591
10776
|
}
|
|
10592
10777
|
async renderExport(options) {
|
|
@@ -10595,7 +10780,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10595
10780
|
return this.renderer.createCanvas(1, 1);
|
|
10596
10781
|
}
|
|
10597
10782
|
this.syncViews();
|
|
10598
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
10783
|
+
if (_optionalChain([options, 'optionalAccess', _425 => _425.layerIds])) {
|
|
10599
10784
|
const keep = new Set(options.layerIds);
|
|
10600
10785
|
const layers = _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => keep.has(l.id));
|
|
10601
10786
|
return this.renderer.renderExport(source, { ...this.state, layers }, options);
|
|
@@ -10641,7 +10826,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10641
10826
|
try {
|
|
10642
10827
|
if (mime === "image/png") return _chunkBROJYMWUcjs.writePngIcc.call(void 0, bytes, icc, this.getColorProfile().name);
|
|
10643
10828
|
if (mime === "image/jpeg") return _chunkBROJYMWUcjs.writeJpegIcc.call(void 0, bytes, icc);
|
|
10644
|
-
} catch (
|
|
10829
|
+
} catch (e34) {
|
|
10645
10830
|
}
|
|
10646
10831
|
return bytes;
|
|
10647
10832
|
}
|
|
@@ -10749,7 +10934,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10749
10934
|
let px2 = await this.decodeImage(newDataUrl);
|
|
10750
10935
|
if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
|
|
10751
10936
|
const data = new Uint8ClampedArray(px2.data);
|
|
10752
|
-
const sel = _optionalChain([this, 'access',
|
|
10937
|
+
const sel = _optionalChain([this, 'access', _426 => _426.state, 'access', _427 => _427.selection, 'optionalAccess', _428 => _428.bounds]) ? this.state.selection : null;
|
|
10753
10938
|
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
10939
|
return this.addPixelLayer({ name: "Inpaint", pixels: { width, height, data } });
|
|
10755
10940
|
}
|
|
@@ -10796,7 +10981,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10796
10981
|
}
|
|
10797
10982
|
/** Font families the shaper offers (generic families at least). */
|
|
10798
10983
|
listFonts() {
|
|
10799
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
10984
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _429 => _429.getTextShaper, 'call', _430 => _430(), 'optionalAccess', _431 => _431.families, 'optionalCall', _432 => _432()]), () => ( ["sans-serif", "serif", "monospace"]));
|
|
10800
10985
|
}
|
|
10801
10986
|
typeInfo(id) {
|
|
10802
10987
|
const layer = _chunkS55JFWDAcjs.requireTypeLayer.call(void 0, this.state.layers, id);
|
|
@@ -10870,8 +11055,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
10870
11055
|
const layer = this.layoutTypeLayer({ ...init, text, orientation: vertical ? "vertical" : "horizontal" });
|
|
10871
11056
|
const { width, height } = this.naturalSize;
|
|
10872
11057
|
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',
|
|
11058
|
+
const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _433 => _433.x]), () => ( 0)));
|
|
11059
|
+
const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _434 => _434.y]), () => ( 0)));
|
|
10875
11060
|
const x1 = Math.min(width, b ? b.x + b.width : 0);
|
|
10876
11061
|
const y1 = Math.min(height, b ? b.y + b.height : 0);
|
|
10877
11062
|
let mask;
|
|
@@ -11048,7 +11233,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11048
11233
|
if (colors.size > 1) warnings.push("The text had several colours; the shape takes the first one.");
|
|
11049
11234
|
const missing = _chunkQAUIZPYIcjs.layoutText.call(void 0, layer, shaper).missingFonts;
|
|
11050
11235
|
if (missing.length) warnings.push(`Missing fonts were drawn with a fallback: ${missing.join(", ")}.`);
|
|
11051
|
-
const first = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
11236
|
+
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
11237
|
const fill = first.opacity !== void 0 && first.opacity !== 1 ? { type: "color", color: first.color, opacity: first.opacity } : { type: "color", color: first.color };
|
|
11053
11238
|
const shape = _chunkS55JFWDAcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
|
|
11054
11239
|
const keep = { visible: layer.visible, opacity: layer.opacity, blend: layer.blend };
|
|
@@ -11081,7 +11266,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11081
11266
|
// --- Shape layers ---
|
|
11082
11267
|
/** What shape rendering needs: the canvas size and the document's patterns. */
|
|
11083
11268
|
shapeEnv() {
|
|
11084
|
-
return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
11269
|
+
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
11270
|
}
|
|
11086
11271
|
/** One component from tool or UI input (validated). */
|
|
11087
11272
|
componentFrom(spec, path) {
|
|
@@ -11124,9 +11309,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
11124
11309
|
* open path) and stroked with `stroke`. Goes above the active layer unless placed. Returns its id.
|
|
11125
11310
|
*/
|
|
11126
11311
|
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',
|
|
11312
|
+
const specs = _optionalChain([init, 'access', _443 => _443.components, 'optionalAccess', _444 => _444.length]) ? init.components : [init];
|
|
11313
|
+
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.");
|
|
11314
|
+
const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _447 => _447.components, 'optionalAccess', _448 => _448.length]) ? `components[${i}].` : ""));
|
|
11130
11315
|
const stroke = init.stroke ? _chunkS55JFWDAcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
|
|
11131
11316
|
const openOnly = components.every((c) => !c.live && c.subpaths.every((sp) => !sp.closed));
|
|
11132
11317
|
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 +11422,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11237
11422
|
if (layer.locks) next.locks = layer.locks;
|
|
11238
11423
|
if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
|
|
11239
11424
|
} else if (layer.type === "pixel") {
|
|
11240
|
-
if (!_optionalChain([layer, 'access',
|
|
11425
|
+
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
11426
|
_chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
|
|
11242
11427
|
const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
|
|
11243
11428
|
const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
|
|
@@ -11256,7 +11441,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11256
11441
|
return this.rasterizeSmartObject(id);
|
|
11257
11442
|
} else if (layer.type === "shape" || layer.type === "type") {
|
|
11258
11443
|
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',
|
|
11444
|
+
if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _451 => _451.annotation, 'optionalAccess', _452 => _452.id])) this.state.selectedAnnotationId = null;
|
|
11260
11445
|
} else {
|
|
11261
11446
|
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
11447
|
}
|
|
@@ -11270,8 +11455,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
11270
11455
|
const doc = this.state.colorProfile;
|
|
11271
11456
|
const p = resolveProfile(doc);
|
|
11272
11457
|
const m = this.state.colorMode;
|
|
11273
|
-
const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess',
|
|
11274
|
-
if (_optionalChain([m, 'optionalAccess',
|
|
11458
|
+
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")) };
|
|
11459
|
+
if (_optionalChain([m, 'optionalAccess', _455 => _455.mode]) === "cmyk") out.cmykProfile = { name: m.profile.name, builtin: _nullishCoalesce(m.profile.builtin, () => ( null)), intent: m.intent };
|
|
11275
11460
|
return out;
|
|
11276
11461
|
}
|
|
11277
11462
|
/**
|
|
@@ -11361,7 +11546,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11361
11546
|
const textEnv = this.textEnv();
|
|
11362
11547
|
const walk = (layers) => layers.map((l) => {
|
|
11363
11548
|
let next2 = l;
|
|
11364
|
-
if (_optionalChain([l, 'access',
|
|
11549
|
+
if (_optionalChain([l, 'access', _456 => _456.effects, 'optionalAccess', _457 => _457.items, 'access', _458 => _458.length])) next2 = { ...next2, effects: convertColorFields(l.effects, hex) };
|
|
11365
11550
|
if (l.type === "group") {
|
|
11366
11551
|
if (next2 !== l) converted.push(l.id);
|
|
11367
11552
|
return { ...next2, children: walk(l.children) };
|
|
@@ -11375,7 +11560,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11375
11560
|
const recoloured = { ...next2, runs: convertColorFields(l.runs, hex) };
|
|
11376
11561
|
try {
|
|
11377
11562
|
next2 = _chunkS55JFWDAcjs.rerenderText.call(void 0, recoloured, textEnv);
|
|
11378
|
-
} catch (
|
|
11563
|
+
} catch (e35) {
|
|
11379
11564
|
next2 = { ...recoloured, surface: convertSurfaceColors(l.surface, t) };
|
|
11380
11565
|
}
|
|
11381
11566
|
} else if (l.type === "annotation") next2 = { ...next2, annotation: convertColorFields(l.annotation, hex) };
|
|
@@ -11549,8 +11734,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
11549
11734
|
else delete s.bitDepth;
|
|
11550
11735
|
delete s.colorProfile;
|
|
11551
11736
|
delete s.colorMode;
|
|
11552
|
-
if (_optionalChain([result, 'access',
|
|
11553
|
-
else if (_optionalChain([result, 'access',
|
|
11737
|
+
if (_optionalChain([result, 'access', _459 => _459.sourceMode, 'optionalAccess', _460 => _460.mode]) === "cmyk") s.colorMode = { mode: "cmyk", profile: result.sourceMode.profile, intent: "relative" };
|
|
11738
|
+
else if (_optionalChain([result, 'access', _461 => _461.sourceMode, 'optionalAccess', _462 => _462.mode]) === "lab") s.colorMode = { mode: "lab" };
|
|
11554
11739
|
else if (result.iccProfile) {
|
|
11555
11740
|
try {
|
|
11556
11741
|
const doc = documentProfile(result.iccProfile);
|
|
@@ -11614,7 +11799,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11614
11799
|
const compositor = new (0, _chunkS55JFWDAcjs.LayerCompositor)();
|
|
11615
11800
|
const bakeMask = (layer) => {
|
|
11616
11801
|
const mask = layer.mask;
|
|
11617
|
-
if (!_optionalChain([mask, 'optionalAccess',
|
|
11802
|
+
if (!_optionalChain([mask, 'optionalAccess', _463 => _463.source])) return mask;
|
|
11618
11803
|
add2("Parametric (depth) masks were baked into pixel masks", layer.name);
|
|
11619
11804
|
const plain3 = { ...layer, mask: { ...mask, density: 1, feather: 0, enabled: true } };
|
|
11620
11805
|
const ox = layer.type === "pixel" ? layer.offset.x : 0;
|
|
@@ -11630,10 +11815,10 @@ var ImageEditorController = (_class12 = class {
|
|
|
11630
11815
|
return baked;
|
|
11631
11816
|
};
|
|
11632
11817
|
const prepare = async (layer) => {
|
|
11633
|
-
if (_optionalChain([layer, 'access',
|
|
11818
|
+
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
11819
|
const p = await prepareLayer(layer);
|
|
11635
|
-
if (_optionalChain([p, 'optionalAccess',
|
|
11636
|
-
if (_optionalChain([p, 'optionalAccess',
|
|
11820
|
+
if (_optionalChain([p, 'optionalAccess', _466 => _466.edge])) delete p.edge;
|
|
11821
|
+
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
11822
|
return p;
|
|
11638
11823
|
};
|
|
11639
11824
|
const prepareLayer = async (layer) => {
|
|
@@ -11676,7 +11861,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11676
11861
|
return out2;
|
|
11677
11862
|
}
|
|
11678
11863
|
if (layer.type === "shape" || layer.type === "type") {
|
|
11679
|
-
if (layer.type === "type" && _optionalChain([layer, 'access',
|
|
11864
|
+
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
11865
|
const out2 = { ...layer };
|
|
11681
11866
|
const mask2 = bakeMask(layer);
|
|
11682
11867
|
if (mask2) out2.mask = mask2;
|
|
@@ -11695,7 +11880,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11695
11880
|
out.surface = this.surfaceOf(layer);
|
|
11696
11881
|
delete out.source;
|
|
11697
11882
|
}
|
|
11698
|
-
const active = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
11883
|
+
const active = _nullishCoalesce(_optionalChain([layer, 'access', _470 => _470.filters, 'optionalAccess', _471 => _471.filter, 'call', _472 => _472(_chunkS55JFWDAcjs.isActiveFilter)]), () => ( []));
|
|
11699
11884
|
if (active.length) {
|
|
11700
11885
|
add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
|
|
11701
11886
|
const content = { ...out, visible: true, opacity: 1, blend: "normal" };
|
|
@@ -11706,7 +11891,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11706
11891
|
const data = compositor.composite([content], canvas, sources);
|
|
11707
11892
|
out = { ...out, surface: _chunk474IQG74cjs.surfaceFromPixels.call(void 0, { width, height, data }, 4, -layer.offset.x, -layer.offset.y) };
|
|
11708
11893
|
}
|
|
11709
|
-
if (_optionalChain([layer, 'access',
|
|
11894
|
+
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
11895
|
delete out.filters;
|
|
11711
11896
|
const unmixMask = _chunkS55JFWDAcjs.hasEdgeUnmix.call(void 0, layer.edge) ? _chunkS55JFWDAcjs.effectiveLayerMask.call(void 0, layer, width, height) : void 0;
|
|
11712
11897
|
if (unmixMask && !unmixMask.source && unmixMask.enabled !== false) {
|
|
@@ -11778,7 +11963,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11778
11963
|
);
|
|
11779
11964
|
}
|
|
11780
11965
|
layers = resizeLegacyMasks(layers, prev, next.dimensions);
|
|
11781
|
-
const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
11966
|
+
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
11967
|
for (const l of _chunkB46UQUDCcjs.flattenLayers.call(void 0, layers)) {
|
|
11783
11968
|
if (l.type === "annotation") {
|
|
11784
11969
|
layers = _chunkB46UQUDCcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, annotation: scaleAnnotation(l.annotation, sx, sy) }));
|
|
@@ -11787,7 +11972,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11787
11972
|
const scaled = a ? scaleAnnotation(a, sx, sy) : null;
|
|
11788
11973
|
const fromAnnotation = scaled ? _chunkS55JFWDAcjs.shapeFromAnnotation.call(void 0, scaled) : null;
|
|
11789
11974
|
const m = [sx, 0, 0, sy, 0, 0];
|
|
11790
|
-
const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess',
|
|
11975
|
+
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
11976
|
const moved = { ...l, components, ...fromAnnotation ? { fill: fromAnnotation.fill, stroke: fromAnnotation.stroke } : {} };
|
|
11792
11977
|
if (scaled && fromAnnotation) moved.annotation = scaled;
|
|
11793
11978
|
else delete moved.annotation;
|
|
@@ -11805,7 +11990,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11805
11990
|
this.notify();
|
|
11806
11991
|
}
|
|
11807
11992
|
toJSON(options) {
|
|
11808
|
-
const root = _optionalChain([this, 'access',
|
|
11993
|
+
const root = _optionalChain([this, 'access', _481 => _481.contentsStack, 'access', _482 => _482[0], 'optionalAccess', _483 => _483.saved]);
|
|
11809
11994
|
const current = this.state;
|
|
11810
11995
|
const element = this.imageElement;
|
|
11811
11996
|
if (root) {
|
|
@@ -11816,9 +12001,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
11816
12001
|
let out;
|
|
11817
12002
|
try {
|
|
11818
12003
|
out = this.serializeState();
|
|
11819
|
-
if (_optionalChain([this, 'access',
|
|
11820
|
-
if (_optionalChain([this, 'access',
|
|
11821
|
-
if (_optionalChain([this, 'access',
|
|
12004
|
+
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);
|
|
12005
|
+
if (_optionalChain([this, 'access', _487 => _487.state, 'access', _488 => _488.channels, 'optionalAccess', _489 => _489.length])) out.channels = serializeChannels(this.state.channels);
|
|
12006
|
+
if (_optionalChain([this, 'access', _490 => _490.state, 'access', _491 => _491.paths, 'optionalAccess', _492 => _492.length])) out.paths = serializePaths(this.state.paths);
|
|
11822
12007
|
} finally {
|
|
11823
12008
|
if (root) {
|
|
11824
12009
|
this.state = current;
|
|
@@ -11853,7 +12038,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11853
12038
|
if (data.selection) {
|
|
11854
12039
|
try {
|
|
11855
12040
|
selection = normalizeSelection(_chunkSS53NNZOcjs.deserializeSelection.call(void 0, data.selection));
|
|
11856
|
-
} catch (
|
|
12041
|
+
} catch (e36) {
|
|
11857
12042
|
selection = null;
|
|
11858
12043
|
}
|
|
11859
12044
|
}
|
|
@@ -11871,7 +12056,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11871
12056
|
this.notify();
|
|
11872
12057
|
}
|
|
11873
12058
|
/** Problems found by the last `loadJSON` / `initialState` of a v3 document (unreadable layers or assets). */
|
|
11874
|
-
|
|
12059
|
+
__init104() {this.lastLoadProblems = []}
|
|
11875
12060
|
applyStored(raw) {
|
|
11876
12061
|
const s = this.state;
|
|
11877
12062
|
const data = migrateSerializedImageEditorState(raw);
|
|
@@ -11936,10 +12121,10 @@ var ImageEditorController = (_class12 = class {
|
|
|
11936
12121
|
serializeState() {
|
|
11937
12122
|
const { width, height } = this.naturalSize;
|
|
11938
12123
|
const view = _chunkS55JFWDAcjs.legacyView.call(void 0, this.stack(), width, height, null);
|
|
11939
|
-
if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access',
|
|
12124
|
+
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
12125
|
return {
|
|
11941
12126
|
// States without adjustment layers keep schema 1, so they round-trip unchanged.
|
|
11942
|
-
version: _optionalChain([view, 'access',
|
|
12127
|
+
version: _optionalChain([view, 'access', _496 => _496.adjustments, 'access', _497 => _497.layers, 'optionalAccess', _498 => _498.length]) ? 2 : 1,
|
|
11943
12128
|
crop: this.state.crop ? { ...this.state.crop } : null,
|
|
11944
12129
|
transform: { ...this.state.transform },
|
|
11945
12130
|
adjustments: serializeAdjustments(view.adjustments),
|
|
@@ -11964,7 +12149,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11964
12149
|
};
|
|
11965
12150
|
if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
|
|
11966
12151
|
if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
|
|
11967
|
-
if (_optionalChain([this, 'access',
|
|
12152
|
+
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
12153
|
if (smartContents) out.smartContents = smartContents;
|
|
11969
12154
|
if (this.state.bitDepth === 16 || this.state.bitDepth === 32) out.bitDepth = this.state.bitDepth;
|
|
11970
12155
|
if (this.state.colorProfile) out.colorProfile = serializeColorProfile(this.state.colorProfile);
|
|
@@ -11974,7 +12159,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
11974
12159
|
}, _class12);
|
|
11975
12160
|
function serializeAdjustments(adjustments) {
|
|
11976
12161
|
const out = { ...adjustments };
|
|
11977
|
-
if (_optionalChain([out, 'access',
|
|
12162
|
+
if (_optionalChain([out, 'access', _502 => _502.layers, 'optionalAccess', _503 => _503.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
|
|
11978
12163
|
else delete out.layers;
|
|
11979
12164
|
if (_chunkS55JFWDAcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkS55JFWDAcjs.LEGACY_PROCESS_VERSION) {
|
|
11980
12165
|
delete out.process;
|
|
@@ -12010,11 +12195,11 @@ function withDevelop(layer, partial) {
|
|
|
12010
12195
|
return { ...layer, filters };
|
|
12011
12196
|
}
|
|
12012
12197
|
function withBlur(layer, radius) {
|
|
12013
|
-
const existing = _optionalChain([layer, 'access',
|
|
12198
|
+
const existing = _optionalChain([layer, 'access', _504 => _504.filters, 'optionalAccess', _505 => _505.find, 'call', _506 => _506((f) => f.kind === "blur")]);
|
|
12014
12199
|
const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
|
|
12015
12200
|
if (radius > 0) {
|
|
12016
12201
|
filters.push({
|
|
12017
|
-
id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess',
|
|
12202
|
+
id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _507 => _507.id]), () => ( (layer.source === "document" ? _chunkS55JFWDAcjs.BLUR_FILTER_ID : _chunkS55JFWDAcjs.newLayerId.call(void 0, "flt")))),
|
|
12018
12203
|
kind: "blur",
|
|
12019
12204
|
enabled: true,
|
|
12020
12205
|
radius
|
|
@@ -12110,7 +12295,7 @@ function collectStateTiles(layers, into) {
|
|
|
12110
12295
|
if (l.type === "shape" || l.type === "type") _chunk474IQG74cjs.collectTiles.call(void 0, l.surface, into);
|
|
12111
12296
|
if (l.type === "smart") {
|
|
12112
12297
|
_chunk474IQG74cjs.collectTiles.call(void 0, l.surface, into);
|
|
12113
|
-
if (_optionalChain([l, 'access',
|
|
12298
|
+
if (_optionalChain([l, 'access', _508 => _508.smartFilters, 'optionalAccess', _509 => _509.mask])) _chunk474IQG74cjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
|
|
12114
12299
|
if (l.contents.raster) _chunk474IQG74cjs.collectTiles.call(void 0, l.contents.raster, into);
|
|
12115
12300
|
if (l.contents.document) collectStateTiles(l.contents.document.layers, into);
|
|
12116
12301
|
}
|
|
@@ -12142,7 +12327,7 @@ function pixelsOnly(layers) {
|
|
|
12142
12327
|
for (const l of layers) {
|
|
12143
12328
|
if (l.type === "adjustment") continue;
|
|
12144
12329
|
if (l.type === "group") out.push({ ...l, children: pixelsOnly(l.children) });
|
|
12145
|
-
else if (l.type === "pixel" && _optionalChain([l, 'access',
|
|
12330
|
+
else if (l.type === "pixel" && _optionalChain([l, 'access', _510 => _510.filters, 'optionalAccess', _511 => _511.length])) {
|
|
12146
12331
|
const p = { ...l };
|
|
12147
12332
|
delete p.filters;
|
|
12148
12333
|
out.push(p);
|
|
@@ -12208,7 +12393,7 @@ function toHex(c) {
|
|
|
12208
12393
|
return "#" + [c[0], c[1], c[2]].map((v) => Math.round(v).toString(16).padStart(2, "0")).join("");
|
|
12209
12394
|
}
|
|
12210
12395
|
function normalizeSelection(mask) {
|
|
12211
|
-
return _optionalChain([mask, 'optionalAccess',
|
|
12396
|
+
return _optionalChain([mask, 'optionalAccess', _512 => _512.bounds]) ? mask : null;
|
|
12212
12397
|
}
|
|
12213
12398
|
function sameSelection(a, b) {
|
|
12214
12399
|
if (a.width !== b.width || a.height !== b.height) return false;
|
|
@@ -12362,7 +12547,7 @@ function loadImageEditorDocument(input) {
|
|
|
12362
12547
|
if (typeof input === "string") {
|
|
12363
12548
|
try {
|
|
12364
12549
|
parsed = JSON.parse(input);
|
|
12365
|
-
} catch (
|
|
12550
|
+
} catch (e37) {
|
|
12366
12551
|
parsed = input;
|
|
12367
12552
|
}
|
|
12368
12553
|
}
|
|
@@ -12418,7 +12603,7 @@ function loadImageEditorDocument(input) {
|
|
|
12418
12603
|
}
|
|
12419
12604
|
const state = { version: 1, ...result.value };
|
|
12420
12605
|
if (isV2) {
|
|
12421
|
-
if (_optionalChain([state, 'access',
|
|
12606
|
+
if (_optionalChain([state, 'access', _513 => _513.adjustments, 'access', _514 => _514.layers, 'optionalAccess', _515 => _515.length])) state.version = 2;
|
|
12422
12607
|
result.report.version = 2;
|
|
12423
12608
|
}
|
|
12424
12609
|
if (state.selection === void 0) delete state.selection;
|
|
@@ -12626,7 +12811,7 @@ function findAdjustmentControl(id) {
|
|
|
12626
12811
|
}
|
|
12627
12812
|
function findLayerControl(kind, id) {
|
|
12628
12813
|
if (id === "opacity") return ADJUSTMENT_LAYER_OPACITY_CONTROL;
|
|
12629
|
-
return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access',
|
|
12814
|
+
return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _516 => _516[kind], 'optionalAccess', _517 => _517.find, 'call', _518 => _518((c) => c.id === id)]);
|
|
12630
12815
|
}
|
|
12631
12816
|
function clampControlValue(spec, v) {
|
|
12632
12817
|
if (typeof v !== "number" || !Number.isFinite(v)) return spec.default;
|
|
@@ -13103,7 +13288,7 @@ function summary(controller) {
|
|
|
13103
13288
|
const area = _chunkSS53NNZOcjs.selectionArea.call(void 0, sel);
|
|
13104
13289
|
return {
|
|
13105
13290
|
empty: !sel,
|
|
13106
|
-
bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
13291
|
+
bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _519 => _519.bounds]), () => ( null)),
|
|
13107
13292
|
/** Σ coverage in pixels. */
|
|
13108
13293
|
area: Math.round(area),
|
|
13109
13294
|
percent: Math.round(area / Math.max(1, width * height) * 1e4) / 100,
|
|
@@ -13146,6 +13331,65 @@ function createImageSelectionTools(controller) {
|
|
|
13146
13331
|
return controller.inspectMaskEdge(t, { layerId, minArea });
|
|
13147
13332
|
}
|
|
13148
13333
|
};
|
|
13334
|
+
const sourceSchema = (which, dflt) => ({
|
|
13335
|
+
type: "object",
|
|
13336
|
+
properties: {
|
|
13337
|
+
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)." },
|
|
13338
|
+
steps: { type: "integer", minimum: 1, description: "history only: how many undo steps back (default 1, before the last edit)." },
|
|
13339
|
+
channelId: { type: "string", description: "channel only: the channel id from list_channels." },
|
|
13340
|
+
layerId: { type: "string", description: "layer-mask and vector-mask only: the layer id from list_layers." }
|
|
13341
|
+
},
|
|
13342
|
+
required: ["source"],
|
|
13343
|
+
additionalProperties: false,
|
|
13344
|
+
description: `${which} (default ${dflt}).`
|
|
13345
|
+
});
|
|
13346
|
+
const toSource = (v, fallback) => {
|
|
13347
|
+
if (v === void 0) return fallback;
|
|
13348
|
+
const o = v;
|
|
13349
|
+
const extra = (keys) => {
|
|
13350
|
+
const bad = Object.keys(o).filter((k) => k !== "source" && !keys.includes(k));
|
|
13351
|
+
if (bad.length) throw new Error(`${bad.join(", ")} ${bad.length === 1 ? "does" : "do"} not apply to source ${o.source}.`);
|
|
13352
|
+
};
|
|
13353
|
+
switch (o.source) {
|
|
13354
|
+
case "selection":
|
|
13355
|
+
extra([]);
|
|
13356
|
+
return { kind: "selection" };
|
|
13357
|
+
case "history":
|
|
13358
|
+
extra(["steps"]);
|
|
13359
|
+
return { kind: "history", steps: _nullishCoalesce(o.steps, () => ( 1)) };
|
|
13360
|
+
case "channel":
|
|
13361
|
+
extra(["channelId"]);
|
|
13362
|
+
if (!o.channelId) throw new Error("source channel needs channelId (see list_channels).");
|
|
13363
|
+
return { kind: "channel", channelId: o.channelId };
|
|
13364
|
+
case "layer-mask":
|
|
13365
|
+
case "vector-mask":
|
|
13366
|
+
extra(["layerId"]);
|
|
13367
|
+
if (!o.layerId) throw new Error(`source ${o.source} needs layerId (see list_layers).`);
|
|
13368
|
+
return { kind: o.source, layerId: o.layerId };
|
|
13369
|
+
default:
|
|
13370
|
+
throw new Error(`Unknown source "${String(o.source)}". Use selection, history, channel, layer-mask or vector-mask.`);
|
|
13371
|
+
}
|
|
13372
|
+
};
|
|
13373
|
+
const compareTool = {
|
|
13374
|
+
name: "compare_selections",
|
|
13375
|
+
title: "Compare two selections",
|
|
13376
|
+
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).",
|
|
13377
|
+
inputSchema: {
|
|
13378
|
+
type: "object",
|
|
13379
|
+
properties: {
|
|
13380
|
+
a: sourceSchema("The selection before", "history, 1 step back"),
|
|
13381
|
+
b: sourceSchema("The selection after", "the current selection"),
|
|
13382
|
+
minArea: { type: "number", minimum: 1, maximum: 1e6, description: "Pieces smaller than this many pixels are counted but not listed (default 4)." },
|
|
13383
|
+
show: { type: "boolean", description: "Tint the change on the canvas (default true)." }
|
|
13384
|
+
},
|
|
13385
|
+
additionalProperties: false
|
|
13386
|
+
},
|
|
13387
|
+
annotations: { title: "Compare two selections", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
13388
|
+
handler: ({ a, b, minArea, show }) => controller.compareSelections(toSource(a, { kind: "history", steps: 1 }), toSource(b, { kind: "selection" }), {
|
|
13389
|
+
...minArea !== void 0 ? { minArea } : {},
|
|
13390
|
+
show: show !== false
|
|
13391
|
+
})
|
|
13392
|
+
};
|
|
13149
13393
|
const selectRegion = {
|
|
13150
13394
|
name: "select_region",
|
|
13151
13395
|
title: "Select a region",
|
|
@@ -13199,7 +13443,7 @@ function createImageSelectionTools(controller) {
|
|
|
13199
13443
|
break;
|
|
13200
13444
|
}
|
|
13201
13445
|
case "polygon": {
|
|
13202
|
-
const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess',
|
|
13446
|
+
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
13447
|
if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
|
|
13204
13448
|
throw new Error("polygon needs points: at least 3 { x, y } vertices.");
|
|
13205
13449
|
}
|
|
@@ -13334,7 +13578,7 @@ function createImageSelectionTools(controller) {
|
|
|
13334
13578
|
},
|
|
13335
13579
|
annotations: writeAnnotations("Refine the selection edge"),
|
|
13336
13580
|
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',
|
|
13581
|
+
const edits = Array.isArray(params.edits) ? params.edits.map((e) => e.kind === "object" ? { ...e } : { ...e, points: (_nullishCoalesce(e.points, () => ( []))).map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _522 => _522.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _523 => _523.y]), NaN) })) }) : [];
|
|
13338
13582
|
for (const e of edits) {
|
|
13339
13583
|
if (e.kind === "object") {
|
|
13340
13584
|
if (!e.rect === !e.point) throw new Error("An object edit takes rect (a box around the object) or point (on it).");
|
|
@@ -13499,7 +13743,7 @@ function createImageSelectionTools(controller) {
|
|
|
13499
13743
|
},
|
|
13500
13744
|
annotations: writeAnnotations("Select a polygon (lasso)", true),
|
|
13501
13745
|
handler: async (args) => {
|
|
13502
|
-
const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess',
|
|
13746
|
+
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
13747
|
if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
|
|
13504
13748
|
throw new Error("points needs at least 3 { x, y } vertices in natural image pixels.");
|
|
13505
13749
|
}
|
|
@@ -13536,7 +13780,7 @@ function createImageSelectionTools(controller) {
|
|
|
13536
13780
|
},
|
|
13537
13781
|
annotations: writeAnnotations("Quick Selection"),
|
|
13538
13782
|
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',
|
|
13783
|
+
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
13784
|
if (!strokes.length || strokes.some((s) => !s.length || !s.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y)))) {
|
|
13541
13785
|
throw new Error("strokes needs at least one stroke of { x, y } points in natural image pixels.");
|
|
13542
13786
|
}
|
|
@@ -13545,7 +13789,7 @@ function createImageSelectionTools(controller) {
|
|
|
13545
13789
|
mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, args.mode),
|
|
13546
13790
|
sampleAllLayers: args.sampleAllLayers,
|
|
13547
13791
|
enhanceEdge: args.enhanceEdge,
|
|
13548
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
13792
|
+
signal: _optionalChain([context, 'optionalAccess', _528 => _528.signal])
|
|
13549
13793
|
});
|
|
13550
13794
|
return { ...summary(controller), ...uncertainty(controller) };
|
|
13551
13795
|
}
|
|
@@ -13583,7 +13827,7 @@ function createImageSelectionTools(controller) {
|
|
|
13583
13827
|
sampleAllLayers: args.sampleAllLayers,
|
|
13584
13828
|
enhanceEdge: args.enhanceEdge,
|
|
13585
13829
|
useModel: args.useModel,
|
|
13586
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
13830
|
+
signal: _optionalChain([context, 'optionalAccess', _529 => _529.signal])
|
|
13587
13831
|
};
|
|
13588
13832
|
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
13833
|
return { ...summary(controller), method, ...uncertainty(controller) };
|
|
@@ -13612,7 +13856,7 @@ function createImageSelectionTools(controller) {
|
|
|
13612
13856
|
softness: args.softness === void 0 ? void 0 : num2(args.softness, 4),
|
|
13613
13857
|
mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, args.mode),
|
|
13614
13858
|
sampleAllLayers: args.sampleAllLayers,
|
|
13615
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
13859
|
+
signal: _optionalChain([context, 'optionalAccess', _530 => _530.signal])
|
|
13616
13860
|
});
|
|
13617
13861
|
return { ...summary(controller), noiseLevel };
|
|
13618
13862
|
}
|
|
@@ -13640,7 +13884,7 @@ function createImageSelectionTools(controller) {
|
|
|
13640
13884
|
mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, args.mode),
|
|
13641
13885
|
sampleAllLayers: args.sampleAllLayers,
|
|
13642
13886
|
useModel: args.useModel,
|
|
13643
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
13887
|
+
signal: _optionalChain([context, 'optionalAccess', _531 => _531.signal])
|
|
13644
13888
|
});
|
|
13645
13889
|
return { ...summary(controller), method, ...note ? { note } : {}, ...uncertainty(controller) };
|
|
13646
13890
|
}
|
|
@@ -13738,7 +13982,7 @@ function createImageSelectionTools(controller) {
|
|
|
13738
13982
|
await controller.selectColorRangePreset(args.preset, { ...common, falloff: num2(args.fuzziness, 20) });
|
|
13739
13983
|
} else {
|
|
13740
13984
|
const samples = args.samples.map((s, i) => {
|
|
13741
|
-
if (typeof _optionalChain([s, 'optionalAccess',
|
|
13985
|
+
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
13986
|
const at = typeof s.x === "number" && typeof s.y === "number" ? { x: s.x, y: s.y } : void 0;
|
|
13743
13987
|
return at ? { color: s.color, at } : { color: s.color };
|
|
13744
13988
|
});
|
|
@@ -13980,7 +14224,7 @@ function createImageSelectionTools(controller) {
|
|
|
13980
14224
|
annotations: writeAnnotations("Content-Aware Fill"),
|
|
13981
14225
|
handler: async (args, context) => {
|
|
13982
14226
|
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',
|
|
14227
|
+
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
14228
|
return controller.contentAwareFillAsync({
|
|
13985
14229
|
output: args.output,
|
|
13986
14230
|
sampleRadius: args.sampleRadius,
|
|
@@ -13989,7 +14233,7 @@ function createImageSelectionTools(controller) {
|
|
|
13989
14233
|
sampleRects: rects(args.sampleRects),
|
|
13990
14234
|
excludeRects: rects(args.excludeRects),
|
|
13991
14235
|
samplingChannelId: typeof args.samplingChannelId === "string" ? args.samplingChannelId : void 0,
|
|
13992
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
14236
|
+
signal: _optionalChain([context, 'optionalAccess', _537 => _537.signal])
|
|
13993
14237
|
});
|
|
13994
14238
|
}
|
|
13995
14239
|
};
|
|
@@ -14200,6 +14444,7 @@ function createImageSelectionTools(controller) {
|
|
|
14200
14444
|
return [
|
|
14201
14445
|
getSelection,
|
|
14202
14446
|
inspectEdge,
|
|
14447
|
+
compareTool,
|
|
14203
14448
|
selectAll,
|
|
14204
14449
|
deselect,
|
|
14205
14450
|
invert2,
|
|
@@ -14268,13 +14513,13 @@ function createImageSubjectSelectionTool(controller) {
|
|
|
14268
14513
|
handler: async ({ target, maxSegments, mode, feather, enhanceEdge }, context) => {
|
|
14269
14514
|
if (target !== void 0 && typeof target !== "string") throw new Error("target must be a description in words.");
|
|
14270
14515
|
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',
|
|
14516
|
+
const perform = _optionalChain([context, 'optionalAccess', _538 => _538.perform]);
|
|
14272
14517
|
const { segments, method, note } = await controller.selectSubject(String(_nullishCoalesce(target, () => ( ""))), {
|
|
14273
14518
|
mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, mode),
|
|
14274
14519
|
feather: num2(feather, 0),
|
|
14275
14520
|
maxSegments: typeof maxSegments === "number" ? Math.max(1, Math.round(maxSegments)) : void 0,
|
|
14276
14521
|
enhanceEdge: enhanceEdge === true,
|
|
14277
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
14522
|
+
signal: _optionalChain([context, 'optionalAccess', _539 => _539.signal]),
|
|
14278
14523
|
// Under playback the cursor traces what the model found, as a lasso, before it is selected.
|
|
14279
14524
|
beforeApply: perform ? (outlines) => perform(planOutlineTrace(outlines)) : void 0
|
|
14280
14525
|
});
|
|
@@ -14352,7 +14597,7 @@ async function renderImageRegion(controller, request) {
|
|
|
14352
14597
|
const maskView = maskViewCanvas(controller, document);
|
|
14353
14598
|
if (maskView) context.drawImage(maskView, rect2.x, rect2.y, rect2.width, rect2.height, 0, 0, out.width, out.height);
|
|
14354
14599
|
const selection = state.selection;
|
|
14355
|
-
if (_optionalChain([selection, 'optionalAccess',
|
|
14600
|
+
if (_optionalChain([selection, 'optionalAccess', _540 => _540.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
|
|
14356
14601
|
const shade = selectionShade(selection, document);
|
|
14357
14602
|
if (shade) context.drawImage(shade, rect2.x, rect2.y, rect2.width, rect2.height, 0, 0, out.width, out.height);
|
|
14358
14603
|
}
|
|
@@ -14377,7 +14622,7 @@ function createImageCaptureSurface(controller) {
|
|
|
14377
14622
|
return {
|
|
14378
14623
|
units: "image pixels",
|
|
14379
14624
|
content: whole,
|
|
14380
|
-
selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access',
|
|
14625
|
+
selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _541 => _541.getState, 'call', _542 => _542(), 'access', _543 => _543.selection, 'optionalAccess', _544 => _544.bounds]), () => ( null)) }),
|
|
14381
14626
|
overlays: "a shade over unselected pixels, the crop box outline and a layer mask view (set_mask_view)",
|
|
14382
14627
|
maxScale: 8,
|
|
14383
14628
|
render: (request) => renderImageRegion(controller, request)
|
|
@@ -14711,7 +14956,7 @@ function describeLayer(layer, activeId, boundsOf) {
|
|
|
14711
14956
|
out.bounds = boundsOf(layer);
|
|
14712
14957
|
out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
|
|
14713
14958
|
out.shape = {
|
|
14714
|
-
components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access',
|
|
14959
|
+
components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _545 => _545.live, 'optionalAccess', _546 => _546.kind]), () => ( "path")) })),
|
|
14715
14960
|
fill: layer.fill ? layer.fill.type : null,
|
|
14716
14961
|
stroke: layer.stroke ? { width: layer.stroke.width, paint: layer.stroke.paint.type } : null
|
|
14717
14962
|
};
|
|
@@ -14734,8 +14979,8 @@ function describeLayer(layer, activeId, boundsOf) {
|
|
|
14734
14979
|
out.bounds = boundsOf(layer);
|
|
14735
14980
|
out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
|
|
14736
14981
|
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',
|
|
14982
|
+
out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _547 => _547.smartFilters, 'optionalAccess', _548 => _548.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
|
|
14983
|
+
out.filterMask = maskSummary(_optionalChain([layer, 'access', _549 => _549.smartFilters, 'optionalAccess', _550 => _550.mask]));
|
|
14739
14984
|
break;
|
|
14740
14985
|
}
|
|
14741
14986
|
return out;
|
|
@@ -14763,7 +15008,7 @@ function createImageLayerTools(controller) {
|
|
|
14763
15008
|
if (!loc) return null;
|
|
14764
15009
|
return {
|
|
14765
15010
|
...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)),
|
|
14766
|
-
parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
15011
|
+
parentId: _nullishCoalesce(_optionalChain([loc, 'access', _551 => _551.parent, 'optionalAccess', _552 => _552.id]), () => ( null)),
|
|
14767
15012
|
index: loc.index
|
|
14768
15013
|
};
|
|
14769
15014
|
};
|
|
@@ -15086,7 +15331,7 @@ function createImageLayerTools(controller) {
|
|
|
15086
15331
|
if (view !== "gray" && view !== "overlay" && view !== "off") throw new Error(`Unknown view "${String(view)}". Use gray, overlay or off.`);
|
|
15087
15332
|
const id = view === "off" || layerId === void 0 ? void 0 : exists(layerId);
|
|
15088
15333
|
const shown = controller.setMaskView(view, id);
|
|
15089
|
-
return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess',
|
|
15334
|
+
return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _553 => _553.mode]), () => ( "off")), layerId: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _554 => _554.layerId]), () => ( null)) };
|
|
15090
15335
|
}
|
|
15091
15336
|
};
|
|
15092
15337
|
const AMOUNT = (what) => ({ type: "number", minimum: 0, maximum: 100, description: `${what}, in percent 0-100; 0 turns it off.` });
|
|
@@ -15627,29 +15872,29 @@ function snapTo45(from, point) {
|
|
|
15627
15872
|
return { x: from.x + Math.cos(a) * len, y: from.y + Math.sin(a) * len };
|
|
15628
15873
|
}
|
|
15629
15874
|
var SelectionGesture = (_class13 = class {
|
|
15630
|
-
constructor(controller, getOptions) {;_class13.prototype.
|
|
15875
|
+
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
15876
|
this.controller = controller;
|
|
15632
15877
|
this.getOptions = getOptions;
|
|
15633
15878
|
}
|
|
15634
15879
|
|
|
15635
15880
|
|
|
15636
|
-
|
|
15637
|
-
|
|
15638
|
-
|
|
15639
|
-
|
|
15881
|
+
__init105() {this.start = null}
|
|
15882
|
+
__init106() {this.points = []}
|
|
15883
|
+
__init107() {this.current = null}
|
|
15884
|
+
__init108() {this.modifiers = {}}
|
|
15640
15885
|
/** Polygonal lasso corners while one is being drawn. */
|
|
15641
|
-
|
|
15642
|
-
|
|
15643
|
-
|
|
15644
|
-
|
|
15886
|
+
__init109() {this.polygon = null}
|
|
15887
|
+
__init110() {this.pressedAt = null}
|
|
15888
|
+
__init111() {this.freehand = false}
|
|
15889
|
+
__init112() {this.magnetic = null}
|
|
15645
15890
|
/** A click this close to the first corner (natural pixels) closes a polygonal lasso. */
|
|
15646
|
-
|
|
15891
|
+
__init113() {this.closeRadius = 8}
|
|
15647
15892
|
/** The last error (e.g. pixels unavailable for the wand), for the UI to show. */
|
|
15648
|
-
|
|
15649
|
-
|
|
15893
|
+
__init114() {this.error = null}
|
|
15894
|
+
__init115() {this.pending = Promise.resolve()}
|
|
15650
15895
|
/** Quick Selection while dragging: the selection before the stroke, how the stroke combines, the pixels. */
|
|
15651
|
-
|
|
15652
|
-
|
|
15896
|
+
__init116() {this.quick = null}
|
|
15897
|
+
__init117() {this.livePreviews = Promise.resolve()}
|
|
15653
15898
|
get active() {
|
|
15654
15899
|
return this.start !== null || this.polygon !== null || this.magnetic !== null;
|
|
15655
15900
|
}
|
|
@@ -15685,12 +15930,12 @@ var SelectionGesture = (_class13 = class {
|
|
|
15685
15930
|
size: _nullishCoalesce(options.quickSize, () => ( 30)),
|
|
15686
15931
|
grow: q.mode === "add",
|
|
15687
15932
|
enhanceEdge: _nullishCoalesce(options.quickEnhance, () => ( false)),
|
|
15688
|
-
selection: q.mode === "add" && _optionalChain([q, 'access',
|
|
15933
|
+
selection: q.mode === "add" && _optionalChain([q, 'access', _555 => _555.base, 'optionalAccess', _556 => _556.bounds]) ? _chunkUC3PWFM3cjs.serializeMask.call(void 0, q.base) : null
|
|
15689
15934
|
},
|
|
15690
15935
|
pixels
|
|
15691
15936
|
);
|
|
15692
15937
|
if (this.quick === q) this.controller.setSelectionPreview(_chunkSS53NNZOcjs.combineSelections.call(void 0, q.base, mask, q.mode));
|
|
15693
|
-
} catch (
|
|
15938
|
+
} catch (e38) {
|
|
15694
15939
|
break;
|
|
15695
15940
|
}
|
|
15696
15941
|
} while (q.dirty && this.quick === q);
|
|
@@ -15896,7 +16141,7 @@ var SelectionGesture = (_class13 = class {
|
|
|
15896
16141
|
this.start = null;
|
|
15897
16142
|
this.current = null;
|
|
15898
16143
|
this.points = [];
|
|
15899
|
-
const strokeMode = _nullishCoalesce(_optionalChain([this, 'access',
|
|
16144
|
+
const strokeMode = _nullishCoalesce(_optionalChain([this, 'access', _557 => _557.quick, 'optionalAccess', _558 => _558.mode]), () => ( (mode === "replace" && this.controller.getSelection() ? "add" : mode)));
|
|
15900
16145
|
this.quick = null;
|
|
15901
16146
|
this.pending = this.controller.quickSelect([stroke], {
|
|
15902
16147
|
size: _nullishCoalesce(options.quickSize, () => ( 30)),
|
|
@@ -16057,7 +16302,7 @@ function handleSelectionShortcut(controller, e, onError) {
|
|
|
16057
16302
|
try {
|
|
16058
16303
|
fn();
|
|
16059
16304
|
} catch (err) {
|
|
16060
|
-
_optionalChain([onError, 'optionalCall',
|
|
16305
|
+
_optionalChain([onError, 'optionalCall', _559 => _559(err instanceof Error ? err.message : String(err))]);
|
|
16061
16306
|
}
|
|
16062
16307
|
return true;
|
|
16063
16308
|
};
|
|
@@ -16072,9 +16317,9 @@ function handleMaskViewKey(controller, e) {
|
|
|
16072
16317
|
if (e.ctrlKey || e.metaKey || e.altKey || e.key !== "\\") return false;
|
|
16073
16318
|
const id = controller.getState().activeLayerId;
|
|
16074
16319
|
const layer = id ? controller.getLayer(id) : null;
|
|
16075
|
-
if (!_optionalChain([layer, 'optionalAccess',
|
|
16320
|
+
if (!_optionalChain([layer, 'optionalAccess', _560 => _560.mask]) || layer.mask.source) return false;
|
|
16076
16321
|
const view = controller.getMaskView();
|
|
16077
|
-
controller.setMaskView(_optionalChain([view, 'optionalAccess',
|
|
16322
|
+
controller.setMaskView(_optionalChain([view, 'optionalAccess', _561 => _561.layerId]) === layer.id && view.mode === "overlay" ? "off" : "overlay", layer.id);
|
|
16078
16323
|
return true;
|
|
16079
16324
|
}
|
|
16080
16325
|
function handleQuickMaskKey(controller, e) {
|
|
@@ -16269,14 +16514,14 @@ function handlePaintShortcut(controller, e) {
|
|
|
16269
16514
|
return false;
|
|
16270
16515
|
}
|
|
16271
16516
|
var PaintGesture = (_class14 = class {
|
|
16272
|
-
constructor(controller) {;_class14.prototype.
|
|
16517
|
+
constructor(controller) {;_class14.prototype.__init118.call(this);_class14.prototype.__init119.call(this);_class14.prototype.__init120.call(this);
|
|
16273
16518
|
this.controller = controller;
|
|
16274
16519
|
}
|
|
16275
16520
|
|
|
16276
|
-
|
|
16277
|
-
|
|
16521
|
+
__init118() {this.stroke = null}
|
|
16522
|
+
__init119() {this.move = null}
|
|
16278
16523
|
/** The last refusal (e.g. "layer is locked"), for the editor to show. */
|
|
16279
|
-
|
|
16524
|
+
__init120() {this.error = null}
|
|
16280
16525
|
get active() {
|
|
16281
16526
|
return Boolean(this.stroke || this.move);
|
|
16282
16527
|
}
|
|
@@ -16288,7 +16533,7 @@ var PaintGesture = (_class14 = class {
|
|
|
16288
16533
|
const layer = this.controller.getActiveLayer();
|
|
16289
16534
|
if (!layer) throw new Error("Select a layer to move in the Layers panel.");
|
|
16290
16535
|
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',
|
|
16536
|
+
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
16537
|
const origin = layer.type === "pixel" ? { ...layer.offset } : layer.type === "smart" ? { ...layer.placement.corners[0] } : (() => {
|
|
16293
16538
|
const b = _chunkS55JFWDAcjs.shapeGeometryBounds.call(void 0, layer);
|
|
16294
16539
|
return b ? { x: b.x, y: b.y } : { x: 0, y: 0 };
|
|
@@ -16345,7 +16590,7 @@ var PaintGesture = (_class14 = class {
|
|
|
16345
16590
|
this.move = null;
|
|
16346
16591
|
}
|
|
16347
16592
|
cancel() {
|
|
16348
|
-
_optionalChain([this, 'access',
|
|
16593
|
+
_optionalChain([this, 'access', _566 => _566.stroke, 'optionalAccess', _567 => _567.cancel, 'call', _568 => _568()]);
|
|
16349
16594
|
this.stroke = null;
|
|
16350
16595
|
this.move = null;
|
|
16351
16596
|
}
|
|
@@ -16580,7 +16825,7 @@ function profileArg(v) {
|
|
|
16580
16825
|
if (s.startsWith("icc:")) {
|
|
16581
16826
|
try {
|
|
16582
16827
|
return _chunkOLNIPTB3cjs.base64ToBytes.call(void 0, s.slice(4));
|
|
16583
|
-
} catch (
|
|
16828
|
+
} catch (e39) {
|
|
16584
16829
|
throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("The icc: value is not valid base64.");
|
|
16585
16830
|
}
|
|
16586
16831
|
}
|
|
@@ -17426,7 +17671,7 @@ function createImageSmartObjectTools(controller) {
|
|
|
17426
17671
|
const layerSummary = (id) => {
|
|
17427
17672
|
const s = controller.getState();
|
|
17428
17673
|
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',
|
|
17674
|
+
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
17675
|
};
|
|
17431
17676
|
const getSmart = {
|
|
17432
17677
|
name: "get_smart_object",
|
|
@@ -17983,7 +18228,7 @@ function createImageShapeTools(controller) {
|
|
|
17983
18228
|
const layerSummary = (id) => {
|
|
17984
18229
|
const s = controller.getState();
|
|
17985
18230
|
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',
|
|
18231
|
+
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
18232
|
};
|
|
17988
18233
|
const get = {
|
|
17989
18234
|
name: "get_shape_layer",
|
|
@@ -18214,7 +18459,7 @@ function createImageShapeTools(controller) {
|
|
|
18214
18459
|
const mode = args.mode;
|
|
18215
18460
|
controller.pathToSelection(_nullishCoalesce(fromPathId(args), () => ( pathSpec(args))), { feather: args.feather, antiAlias: args.antiAlias, mode });
|
|
18216
18461
|
const sel = controller.getSelection();
|
|
18217
|
-
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
18462
|
+
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _573 => _573.bounds]), () => ( null)), area: Math.round(sel ? _chunkSS53NNZOcjs.selectionArea.call(void 0, sel) : 0) };
|
|
18218
18463
|
}
|
|
18219
18464
|
};
|
|
18220
18465
|
const getVectorMask = {
|
|
@@ -18246,7 +18491,7 @@ function createImageShapeTools(controller) {
|
|
|
18246
18491
|
handler: (args) => {
|
|
18247
18492
|
const id = layerArg(args.layerId);
|
|
18248
18493
|
const spec = _nullishCoalesce(fromPathId(args), () => ( pathSpec(args)));
|
|
18249
|
-
const hasPath = _optionalChain([spec, 'access',
|
|
18494
|
+
const hasPath = _optionalChain([spec, 'access', _574 => _574.components, 'optionalAccess', _575 => _575.length]) || spec.shape !== void 0 || spec.subpaths !== void 0;
|
|
18250
18495
|
const from = _nullishCoalesce(args.from, () => ( (hasPath ? "path" : "reveal-all")));
|
|
18251
18496
|
if (from !== "selection" && TRACE_KEYS.some((k) => args[k] !== void 0)) throw new Error("tolerance, cornerRoundness and minArea apply only to from selection.");
|
|
18252
18497
|
controller.addVectorMask(id, from, spec, traceOptions(args));
|
|
@@ -18354,7 +18599,7 @@ function createImageShapeTools(controller) {
|
|
|
18354
18599
|
annotations: { title: "Add a document path", ...WRITE8 },
|
|
18355
18600
|
handler: (args) => {
|
|
18356
18601
|
const spec = pathSpec(args);
|
|
18357
|
-
if (!_optionalChain([spec, 'access',
|
|
18602
|
+
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
18603
|
return { path: pathSummary(controller.addPath({ ...spec, name: args.name }).id) };
|
|
18359
18604
|
}
|
|
18360
18605
|
};
|
|
@@ -18498,7 +18743,7 @@ function createImageTypeTools(controller) {
|
|
|
18498
18743
|
const layerSummary = (id) => {
|
|
18499
18744
|
const s = controller.getState();
|
|
18500
18745
|
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',
|
|
18746
|
+
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
18747
|
};
|
|
18503
18748
|
const range = (args) => ({ start: args.start, end: args.end });
|
|
18504
18749
|
const listFonts = {
|
|
@@ -18507,7 +18752,7 @@ function createImageTypeTools(controller) {
|
|
|
18507
18752
|
description: "Returns the font families type layers can use here (generic families such as sans-serif always work). Changes nothing.",
|
|
18508
18753
|
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
18509
18754
|
annotations: { title: "List fonts", ...READ11 },
|
|
18510
|
-
handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access',
|
|
18755
|
+
handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _580 => _580.getTextShaper, 'call', _581 => _581(), 'optionalAccess', _582 => _582.id]), () => ( null)) })
|
|
18511
18756
|
};
|
|
18512
18757
|
const get = {
|
|
18513
18758
|
name: "get_text_layer",
|
|
@@ -18663,7 +18908,7 @@ function createImageTypeTools(controller) {
|
|
|
18663
18908
|
const init = pick2(args, ["text", "x", "y", "orientation", "box", "style", "paragraph", "rotation", "mode", "feather", "antiAlias"]);
|
|
18664
18909
|
controller.selectTextShape(init);
|
|
18665
18910
|
const sel = controller.getSelection();
|
|
18666
|
-
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
18911
|
+
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _583 => _583.bounds]), () => ( null)), area: Math.round(sel ? _chunkSS53NNZOcjs.selectionArea.call(void 0, sel) : 0) };
|
|
18667
18912
|
}
|
|
18668
18913
|
};
|
|
18669
18914
|
return [listFonts, get, add2, setText, setStyle, setParagraph, setFrame, setOrientation, toShape, typeMask];
|
|
@@ -18842,7 +19087,7 @@ function createImageEditorToolProvider(controller, options = {}) {
|
|
|
18842
19087
|
for (const ref of [aboveId, parentId]) {
|
|
18843
19088
|
if (ref !== void 0 && !controller.getLayer(ref)) throw new Error(`Unknown layer "${ref}". Call list_layers for ids.`);
|
|
18844
19089
|
}
|
|
18845
|
-
if (parentId !== void 0 && _optionalChain([controller, 'access',
|
|
19090
|
+
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
19091
|
const id = controller.addAdjustmentLayer({ kind, params, opacity, blend, name, aboveId, parentId, useSelection: useSelection !== false });
|
|
18847
19092
|
const layer = controller.getAdjustmentLayer(id);
|
|
18848
19093
|
return { layer: JSON.parse(JSON.stringify(layer)), index: controller.getAdjustmentLayers().findIndex((l) => l.id === id), masked: Boolean(layer.mask) };
|
|
@@ -19079,35 +19324,35 @@ function scaleParams(p, s) {
|
|
|
19079
19324
|
return { ...p, radius: p.radius * s, feather: p.feather * s };
|
|
19080
19325
|
}
|
|
19081
19326
|
var SelectAndMaskSession = (_class15 = class {
|
|
19082
|
-
constructor(controller) {;_class15.prototype.
|
|
19327
|
+
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
19328
|
this.controller = controller;
|
|
19084
19329
|
this.base = controller.getSelection();
|
|
19085
19330
|
this.settingsValue = remembered ? { ...remembered, params: { ...remembered.params }, showOriginal: false } : { ...DEFAULT_SELECT_AND_MASK_SETTINGS, params: { ...DEFAULT_SELECT_AND_MASK_SETTINGS.params } };
|
|
19086
19331
|
}
|
|
19087
19332
|
|
|
19088
19333
|
|
|
19089
|
-
|
|
19334
|
+
__init121() {this.editsList = []}
|
|
19090
19335
|
/** The edit being painted, shown in the preview but not yet in `edits`. */
|
|
19091
|
-
|
|
19092
|
-
|
|
19093
|
-
|
|
19094
|
-
|
|
19336
|
+
__init122() {this.live = null}
|
|
19337
|
+
__init123() {this.dragStart = null}
|
|
19338
|
+
__init124() {this.pixels = null}
|
|
19339
|
+
__init125() {this.previewPixels = null}
|
|
19095
19340
|
/** The layers below the active one, composited (On Layers shows them where nothing is selected). */
|
|
19096
|
-
|
|
19097
|
-
|
|
19341
|
+
__init126() {this.below = null}
|
|
19342
|
+
__init127() {this.belowPreview = null}
|
|
19098
19343
|
|
|
19099
|
-
|
|
19100
|
-
|
|
19101
|
-
|
|
19344
|
+
__init128() {this.previewMask = null}
|
|
19345
|
+
__init129() {this.baseMask = null}
|
|
19346
|
+
__init130() {this.listeners = /* @__PURE__ */ new Set()}
|
|
19102
19347
|
/** Why the preview could not be made (no pixels), for the UI. */
|
|
19103
|
-
|
|
19348
|
+
__init131() {this.error = null}
|
|
19104
19349
|
/** A note for the UI, such as object aware refinement applying only on OK. */
|
|
19105
|
-
|
|
19350
|
+
__init132() {this.note = null}
|
|
19106
19351
|
/** Bumped each time the preview changes, so a UI can redraw. */
|
|
19107
|
-
|
|
19352
|
+
__init133() {this.revision = 0}
|
|
19108
19353
|
/** True while the worker computes a preview. */
|
|
19109
|
-
|
|
19110
|
-
|
|
19354
|
+
__init134() {this.computing = false}
|
|
19355
|
+
__init135() {this.dirty = false}
|
|
19111
19356
|
get settings() {
|
|
19112
19357
|
return this.settingsValue;
|
|
19113
19358
|
}
|
|
@@ -19140,7 +19385,7 @@ var SelectAndMaskSession = (_class15 = class {
|
|
|
19140
19385
|
if (!ids.length) return null;
|
|
19141
19386
|
try {
|
|
19142
19387
|
return this.controller.compositePixels(void 0, { layerIds: ids });
|
|
19143
|
-
} catch (
|
|
19388
|
+
} catch (e40) {
|
|
19144
19389
|
return null;
|
|
19145
19390
|
}
|
|
19146
19391
|
}
|
|
@@ -19177,7 +19422,7 @@ var SelectAndMaskSession = (_class15 = class {
|
|
|
19177
19422
|
const h = Math.max(1, Math.round(px2.height * s));
|
|
19178
19423
|
this.previewPixels = scalePixels(px2, w, h);
|
|
19179
19424
|
this.belowPreview = this.below ? scalePixels(this.below, w, h) : null;
|
|
19180
|
-
this.baseMask = _optionalChain([this, 'access',
|
|
19425
|
+
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
19426
|
}
|
|
19182
19427
|
/**
|
|
19183
19428
|
* Recomputes the preview mask from the base selection, the strokes and the settings: at once on
|
|
@@ -19195,7 +19440,7 @@ var SelectAndMaskSession = (_class15 = class {
|
|
|
19195
19440
|
const edits = [...this.editsList, ...this.live ? [this.live] : []].map((e) => scaleEdit(e, scale));
|
|
19196
19441
|
try {
|
|
19197
19442
|
const { selection, refineBrush } = _chunkUC3PWFM3cjs.applyRefineEdits.call(void 0, px2, this.baseMask, edits, px2.width, px2.height);
|
|
19198
|
-
this.previewMask = _optionalChain([selection, 'optionalAccess',
|
|
19443
|
+
this.previewMask = _optionalChain([selection, 'optionalAccess', _589 => _589.bounds]) ? _chunkSS53NNZOcjs.refineSelection.call(void 0, px2, selection, scaleParams(this.settingsValue.params, scale), refineBrush) : null;
|
|
19199
19444
|
this.error = null;
|
|
19200
19445
|
} catch (err) {
|
|
19201
19446
|
this.previewMask = null;
|
|
@@ -19301,7 +19546,7 @@ var SelectAndMaskSession = (_class15 = class {
|
|
|
19301
19546
|
break;
|
|
19302
19547
|
}
|
|
19303
19548
|
case "on-layers": {
|
|
19304
|
-
const under = _optionalChain([this, 'access',
|
|
19549
|
+
const under = _optionalChain([this, 'access', _590 => _590.belowPreview, 'optionalAccess', _591 => _591.data]);
|
|
19305
19550
|
let ur = checker;
|
|
19306
19551
|
let ug = checker;
|
|
19307
19552
|
let ub = checker;
|
|
@@ -19597,7 +19842,7 @@ function maskThumbnailClick(controller, layer, e) {
|
|
|
19597
19842
|
} else if (e.altKey && !layer.mask.source) {
|
|
19598
19843
|
const mode = e.shiftKey ? "overlay" : "gray";
|
|
19599
19844
|
const view = controller.getMaskView();
|
|
19600
|
-
controller.setMaskView(_optionalChain([view, 'optionalAccess',
|
|
19845
|
+
controller.setMaskView(_optionalChain([view, 'optionalAccess', _592 => _592.layerId]) === layer.id && view.mode === mode ? "off" : mode, layer.id);
|
|
19601
19846
|
} else if (e.shiftKey) {
|
|
19602
19847
|
controller.setLayerMaskProps(layer.id, { enabled: layer.mask.enabled === false });
|
|
19603
19848
|
} else {
|
|
@@ -19661,7 +19906,7 @@ function layerHasThumbnail(layer) {
|
|
|
19661
19906
|
return layer.type === "pixel" || layer.type === "shape" || layer.type === "type";
|
|
19662
19907
|
}
|
|
19663
19908
|
function layerWarning(layer) {
|
|
19664
|
-
if (layer.type === "type" && _optionalChain([layer, 'access',
|
|
19909
|
+
if (layer.type === "type" && _optionalChain([layer, 'access', _593 => _593.missingFonts, 'optionalAccess', _594 => _594.length])) {
|
|
19665
19910
|
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
19911
|
}
|
|
19667
19912
|
return null;
|
|
@@ -19684,16 +19929,16 @@ function layerMenu(controller) {
|
|
|
19684
19929
|
const siblings = loc ? loc.parent ? loc.parent.children : s.layers : [];
|
|
19685
19930
|
const below = loc ? siblings[loc.index - 1] : void 0;
|
|
19686
19931
|
const hasSel = controller.hasSelection;
|
|
19687
|
-
const isPixel = _optionalChain([active, 'optionalAccess',
|
|
19688
|
-
const hasOwnPixels = _optionalChain([active, 'optionalAccess',
|
|
19932
|
+
const isPixel = _optionalChain([active, 'optionalAccess', _595 => _595.type]) === "pixel";
|
|
19933
|
+
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
19934
|
return [
|
|
19690
19935
|
{ action: "new-layer", label: "New Layer", enabled: true },
|
|
19691
19936
|
{ action: "new-group", label: "New Group", enabled: true },
|
|
19692
19937
|
{ action: "duplicate", label: "Duplicate Layer", enabled: Boolean(active) },
|
|
19693
19938
|
{ action: "delete", label: "Delete Layer", enabled: Boolean(active) },
|
|
19694
19939
|
{ 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',
|
|
19940
|
+
{ action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _600 => _600.type]) === "group" },
|
|
19941
|
+
{ action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _601 => _601.visible]) && _optionalChain([below, 'optionalAccess', _602 => _602.type]) === "pixel") },
|
|
19697
19942
|
{ action: "merge-visible", label: "Merge Visible", enabled: s.layers.some((l) => l.visible) },
|
|
19698
19943
|
{ action: "flatten", label: "Flatten Image", enabled: s.layers.length > 0 },
|
|
19699
19944
|
{ action: "via-copy", label: "Layer via Copy", enabled: isPixel && hasSel },
|
|
@@ -19703,27 +19948,27 @@ function layerMenu(controller) {
|
|
|
19703
19948
|
{ action: "add-mask-hide-selection", label: "Add Mask Hiding Selection", enabled: Boolean(active) && hasSel },
|
|
19704
19949
|
{ action: "add-mask-transparency", label: "Add Mask from Transparency", enabled: hasOwnPixels },
|
|
19705
19950
|
{ 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',
|
|
19951
|
+
{ action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _603 => _603.mask])) },
|
|
19952
|
+
{ action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _604 => _604.mask])) },
|
|
19953
|
+
{ 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])) },
|
|
19954
|
+
{ 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) },
|
|
19955
|
+
{ 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])) },
|
|
19956
|
+
{ 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])) },
|
|
19957
|
+
{ 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 },
|
|
19958
|
+
{ action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _617 => _617.vectorMask])) },
|
|
19959
|
+
{ 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])) },
|
|
19960
|
+
{ action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _621 => _621.vectorMask])) },
|
|
19961
|
+
{ 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
19962
|
{ 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',
|
|
19963
|
+
{ action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _629 => _629.type]) === "smart" },
|
|
19964
|
+
{ action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _630 => _630.type]) === "smart" },
|
|
19965
|
+
{ 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]) },
|
|
19966
|
+
{ action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _634 => _634.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
|
|
19722
19967
|
];
|
|
19723
19968
|
}
|
|
19724
19969
|
async function runLayerMenuAction(controller, action) {
|
|
19725
19970
|
const active = controller.getActiveLayer();
|
|
19726
|
-
const id = _optionalChain([active, 'optionalAccess',
|
|
19971
|
+
const id = _optionalChain([active, 'optionalAccess', _635 => _635.id]);
|
|
19727
19972
|
try {
|
|
19728
19973
|
switch (action) {
|
|
19729
19974
|
case "new-layer":
|
|
@@ -19779,10 +20024,10 @@ async function runLayerMenuAction(controller, action) {
|
|
|
19779
20024
|
if (id) controller.removeLayerMask(id);
|
|
19780
20025
|
break;
|
|
19781
20026
|
case "toggle-mask":
|
|
19782
|
-
if (id && _optionalChain([active, 'optionalAccess',
|
|
20027
|
+
if (id && _optionalChain([active, 'optionalAccess', _636 => _636.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
|
|
19783
20028
|
break;
|
|
19784
20029
|
case "toggle-mask-link":
|
|
19785
|
-
if (id && _optionalChain([active, 'optionalAccess',
|
|
20030
|
+
if (id && _optionalChain([active, 'optionalAccess', _637 => _637.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
|
|
19786
20031
|
break;
|
|
19787
20032
|
case "add-vector-mask":
|
|
19788
20033
|
case "add-vector-mask-hide":
|
|
@@ -19795,7 +20040,7 @@ async function runLayerMenuAction(controller, action) {
|
|
|
19795
20040
|
if (id) controller.removeVectorMask(id);
|
|
19796
20041
|
break;
|
|
19797
20042
|
case "toggle-vector-mask":
|
|
19798
|
-
if (id && _optionalChain([active, 'optionalAccess',
|
|
20043
|
+
if (id && _optionalChain([active, 'optionalAccess', _638 => _638.vectorMask])) controller.setVectorMaskProps(id, { enabled: active.vectorMask.enabled === false });
|
|
19799
20044
|
break;
|
|
19800
20045
|
case "rasterize-vector-mask":
|
|
19801
20046
|
if (id) controller.rasterizeVectorMask(id);
|
|
@@ -19816,7 +20061,7 @@ async function runLayerMenuAction(controller, action) {
|
|
|
19816
20061
|
if (id) controller.setSmartFilterMask(id, "reveal-all");
|
|
19817
20062
|
break;
|
|
19818
20063
|
case "toggle-clip":
|
|
19819
|
-
if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess',
|
|
20064
|
+
if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _639 => _639.clipped]) });
|
|
19820
20065
|
break;
|
|
19821
20066
|
}
|
|
19822
20067
|
return null;
|
|
@@ -19826,7 +20071,7 @@ async function runLayerMenuAction(controller, action) {
|
|
|
19826
20071
|
}
|
|
19827
20072
|
function smartFilterRows(layer) {
|
|
19828
20073
|
if (layer.type !== "smart") return [];
|
|
19829
|
-
const list = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
20074
|
+
const list = _nullishCoalesce(_optionalChain([layer, 'access', _640 => _640.smartFilters, 'optionalAccess', _641 => _641.filters]), () => ( []));
|
|
19830
20075
|
const rows = list.map((f, index) => ({
|
|
19831
20076
|
filter: f,
|
|
19832
20077
|
index,
|
|
@@ -19852,8 +20097,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
|
|
|
19852
20097
|
};
|
|
19853
20098
|
collectSerialized(_nullishCoalesce(serialized.layers, () => ( [])));
|
|
19854
20099
|
const sLayerMap = new Map(allSerializedLayers.map((sl) => [sl.id, sl]));
|
|
19855
|
-
const imgW = _optionalChain([state, 'access',
|
|
19856
|
-
const imgH = _optionalChain([state, 'access',
|
|
20100
|
+
const imgW = _optionalChain([state, 'access', _642 => _642.imageDimensions, 'optionalAccess', _643 => _643.width]) || 1;
|
|
20101
|
+
const imgH = _optionalChain([state, 'access', _644 => _644.imageDimensions, 'optionalAccess', _645 => _645.height]) || 1;
|
|
19857
20102
|
return ctrlLayers.map((l) => {
|
|
19858
20103
|
const bounds = controller.getLayerBounds(l.id) || {
|
|
19859
20104
|
x: 0,
|
|
@@ -19862,8 +20107,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
|
|
|
19862
20107
|
height: imgH
|
|
19863
20108
|
};
|
|
19864
20109
|
const sLayer = sLayerMap.get(l.id);
|
|
19865
|
-
const assetKey = _optionalChain([sLayer, 'optionalAccess',
|
|
19866
|
-
const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess',
|
|
20110
|
+
const assetKey = _optionalChain([sLayer, 'optionalAccess', _646 => _646.asset]);
|
|
20111
|
+
const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _647 => _647.source]) === "document" ? fallbackImageUrl : "");
|
|
19867
20112
|
return {
|
|
19868
20113
|
id: l.id,
|
|
19869
20114
|
name: l.name || "Untitled Layer",
|
|
@@ -19917,9 +20162,9 @@ async function addLayerOfKind(controller, id, init) {
|
|
|
19917
20162
|
const cx = Math.round(canvas.width / 2);
|
|
19918
20163
|
const cy = Math.round(canvas.height / 2);
|
|
19919
20164
|
return controller.addTextLayer({
|
|
19920
|
-
text: _optionalChain([init, 'optionalAccess',
|
|
19921
|
-
x: typeof _optionalChain([init, 'optionalAccess',
|
|
19922
|
-
y: typeof _optionalChain([init, 'optionalAccess',
|
|
20165
|
+
text: _optionalChain([init, 'optionalAccess', _648 => _648.text]) || "New Text",
|
|
20166
|
+
x: typeof _optionalChain([init, 'optionalAccess', _649 => _649.x]) === "number" ? init.x : cx - 100,
|
|
20167
|
+
y: typeof _optionalChain([init, 'optionalAccess', _650 => _650.y]) === "number" ? init.y : cy,
|
|
19923
20168
|
...init
|
|
19924
20169
|
});
|
|
19925
20170
|
}
|
|
@@ -19932,10 +20177,10 @@ async function addLayerOfKind(controller, id, init) {
|
|
|
19932
20177
|
return controller.addShapeLayer({
|
|
19933
20178
|
shape: {
|
|
19934
20179
|
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',
|
|
20180
|
+
x: typeof _optionalChain([init, 'optionalAccess', _651 => _651.x]) === "number" ? init.x : cx - Math.round(w / 2),
|
|
20181
|
+
y: typeof _optionalChain([init, 'optionalAccess', _652 => _652.y]) === "number" ? init.y : cy - Math.round(h / 2),
|
|
20182
|
+
width: typeof _optionalChain([init, 'optionalAccess', _653 => _653.width]) === "number" ? init.width : w,
|
|
20183
|
+
height: typeof _optionalChain([init, 'optionalAccess', _654 => _654.height]) === "number" ? init.height : h
|
|
19939
20184
|
},
|
|
19940
20185
|
name: "Rectangle",
|
|
19941
20186
|
...init
|
|
@@ -19950,10 +20195,10 @@ async function addLayerOfKind(controller, id, init) {
|
|
|
19950
20195
|
return controller.addShapeLayer({
|
|
19951
20196
|
shape: {
|
|
19952
20197
|
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',
|
|
20198
|
+
x: typeof _optionalChain([init, 'optionalAccess', _655 => _655.x]) === "number" ? init.x : cx - Math.round(w / 2),
|
|
20199
|
+
y: typeof _optionalChain([init, 'optionalAccess', _656 => _656.y]) === "number" ? init.y : cy - Math.round(h / 2),
|
|
20200
|
+
width: typeof _optionalChain([init, 'optionalAccess', _657 => _657.width]) === "number" ? init.width : w,
|
|
20201
|
+
height: typeof _optionalChain([init, 'optionalAccess', _658 => _658.height]) === "number" ? init.height : h
|
|
19957
20202
|
},
|
|
19958
20203
|
name: "Ellipse",
|
|
19959
20204
|
...init
|
|
@@ -20014,18 +20259,18 @@ function layerEffectsPanel(layer) {
|
|
|
20014
20259
|
if (!layer) return { ...empty, available: false, reason: "Select a layer to add a layer style." };
|
|
20015
20260
|
if (layer.type === "adjustment") return { ...empty, available: false, reason: "Adjustment layers cannot have a layer style." };
|
|
20016
20261
|
const fx = layer.effects;
|
|
20017
|
-
const readOnly = Boolean(_optionalChain([layer, 'access',
|
|
20262
|
+
const readOnly = Boolean(_optionalChain([layer, 'access', _659 => _659.locks, 'optionalAccess', _660 => _660.all]));
|
|
20018
20263
|
return {
|
|
20019
20264
|
available: true,
|
|
20020
20265
|
readOnly,
|
|
20021
20266
|
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',
|
|
20267
|
+
enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _661 => _661.enabled]), () => ( true)),
|
|
20268
|
+
scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _662 => _662.scale]), () => ( 1)),
|
|
20269
|
+
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
20270
|
};
|
|
20026
20271
|
}
|
|
20027
20272
|
function layerEffectsBadge(layer) {
|
|
20028
|
-
if (!_optionalChain([layer, 'access',
|
|
20273
|
+
if (!_optionalChain([layer, 'access', _664 => _664.effects, 'optionalAccess', _665 => _665.items, 'access', _666 => _666.length])) return null;
|
|
20029
20274
|
return _chunkB46UQUDCcjs.hasActiveEffects.call(void 0, layer.effects) ? "on" : "off";
|
|
20030
20275
|
}
|
|
20031
20276
|
var LAYER_EFFECT_MENU = _chunkB46UQUDCcjs.LAYER_EFFECT_KINDS.map((kind) => ({ kind, label: _chunkB46UQUDCcjs.layerEffectLabel.call(void 0, kind) }));
|
|
@@ -20070,8 +20315,8 @@ function fillControls(f, allowPattern, patterns) {
|
|
|
20070
20315
|
}
|
|
20071
20316
|
function gradientControls(prefix, g) {
|
|
20072
20317
|
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',
|
|
20318
|
+
{ 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")) },
|
|
20319
|
+
{ 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
20320
|
{ key: `${prefix}.style`, label: "Style", type: "select", value: g.style, options: opt(["linear", "Linear"], ["radial", "Radial"], ["angle", "Angle"], ["reflected", "Reflected"], ["diamond", "Diamond"]) },
|
|
20076
20321
|
{ key: `${prefix}.angle`, label: "Angle", type: "range", min: -180, max: 180, step: 1, value: g.angle, unit: "\xB0" },
|
|
20077
20322
|
{ key: `${prefix}.scale`, label: "Scale", type: "range", min: 0.1, max: 1.5, step: 0.01, value: g.scale, percent: true, unit: "%" },
|
|
@@ -20163,19 +20408,19 @@ function layerEffectControls(e, patterns = []) {
|
|
|
20163
20408
|
}
|
|
20164
20409
|
function fillOfType(current, type, patterns) {
|
|
20165
20410
|
if (type === "gradient") return { type: "gradient", gradient: _chunkB46UQUDCcjs.defaultEffectGradient.call(void 0, ) };
|
|
20166
|
-
if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access',
|
|
20411
|
+
if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _673 => _673[0], 'optionalAccess', _674 => _674.id]), () => ( "checker")), scale: 1 };
|
|
20167
20412
|
return { type: "color", color: current.type === "color" ? current.color : "#000000" };
|
|
20168
20413
|
}
|
|
20169
20414
|
function effectControlChange(effect, key2, value, patterns = []) {
|
|
20170
20415
|
const [top, ...rest] = key2.split(".");
|
|
20171
20416
|
if (top === "fill" && rest[0] === "type") return { fill: fillOfType(effect.fill, String(value), patterns) };
|
|
20172
20417
|
if (top === "patternId" && !rest.length) {
|
|
20173
|
-
const name = _optionalChain([patternOptions, 'call',
|
|
20418
|
+
const name = _optionalChain([patternOptions, 'call', _675 => _675(patterns), 'access', _676 => _676.find, 'call', _677 => _677((o) => o.value === value), 'optionalAccess', _678 => _678.label]);
|
|
20174
20419
|
return name ? { patternId: value, name } : { patternId: value };
|
|
20175
20420
|
}
|
|
20176
20421
|
if (!rest.length) return { [top]: value };
|
|
20177
20422
|
if (top === "fill" && rest[0] === "patternId") {
|
|
20178
|
-
const name = _optionalChain([patternOptions, 'call',
|
|
20423
|
+
const name = _optionalChain([patternOptions, 'call', _679 => _679(patterns), 'access', _680 => _680.find, 'call', _681 => _681((o) => o.value === value), 'optionalAccess', _682 => _682.label]);
|
|
20179
20424
|
return { fill: { ...effect.fill, patternId: value, ...name ? { name } : {} } };
|
|
20180
20425
|
}
|
|
20181
20426
|
return { [top]: setPath(getPath(effect, top), rest, value) };
|
|
@@ -20202,7 +20447,7 @@ function colorPanelView(controller) {
|
|
|
20202
20447
|
profileName: profile.name,
|
|
20203
20448
|
workingSpace: profile.builtin,
|
|
20204
20449
|
mode: profile.mode,
|
|
20205
|
-
cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access',
|
|
20450
|
+
cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access', _683 => _683.cmykProfile, 'optionalAccess', _684 => _684.name]), () => ( null)),
|
|
20206
20451
|
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
20452
|
};
|
|
20208
20453
|
}
|
|
@@ -20385,32 +20630,32 @@ function boxFrameHit(overlay, p, tolerance, band) {
|
|
|
20385
20630
|
return null;
|
|
20386
20631
|
}
|
|
20387
20632
|
var FreeTransformTool = (_class16 = class {
|
|
20388
|
-
constructor(controller, options = {}) {;_class16.prototype.
|
|
20633
|
+
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
20634
|
this.controller = controller;
|
|
20390
20635
|
this.options = options;
|
|
20391
20636
|
}
|
|
20392
20637
|
|
|
20393
20638
|
|
|
20394
|
-
|
|
20395
|
-
|
|
20639
|
+
__init136() {this.sessionRef = null}
|
|
20640
|
+
__init137() {this.modeValue = "scale"}
|
|
20396
20641
|
/** The reference point in the untransformed frame's space (follows the transform). */
|
|
20397
|
-
|
|
20398
|
-
|
|
20399
|
-
|
|
20642
|
+
__init138() {this.refBox = { x: 0, y: 0 }}
|
|
20643
|
+
__init139() {this.corners = null}
|
|
20644
|
+
__init140() {this.drag = null}
|
|
20400
20645
|
/** The warp mesh in the frame's own space (null: no warp). */
|
|
20401
|
-
|
|
20402
|
-
|
|
20403
|
-
|
|
20404
|
-
|
|
20646
|
+
__init141() {this.mesh = null}
|
|
20647
|
+
__init142() {this.warpSettings = { style: "custom", bend: 50, horizontal: 0, vertical: 0, orientation: "horizontal", columns: 1, rows: 1 }}
|
|
20648
|
+
__init143() {this.pending = false}
|
|
20649
|
+
__init144() {this.viewScale = 1}
|
|
20405
20650
|
|
|
20406
20651
|
/** Values typed into the options bar since the last drag (V skew is not recovered from the shape). */
|
|
20407
|
-
|
|
20652
|
+
__init145() {this.typed = {}}
|
|
20408
20653
|
/** Width and height scale together when typed (the chain icon). */
|
|
20409
|
-
|
|
20410
|
-
|
|
20411
|
-
|
|
20654
|
+
__init146() {this.proportional = true}
|
|
20655
|
+
__init147() {this.error = null}
|
|
20656
|
+
__init148() {this.lastResult = null}
|
|
20412
20657
|
get active() {
|
|
20413
|
-
return Boolean(_optionalChain([this, 'access',
|
|
20658
|
+
return Boolean(_optionalChain([this, 'access', _685 => _685.sessionRef, 'optionalAccess', _686 => _686.isOpen]));
|
|
20414
20659
|
}
|
|
20415
20660
|
get session() {
|
|
20416
20661
|
return this.active ? this.sessionRef : null;
|
|
@@ -20419,7 +20664,7 @@ var FreeTransformTool = (_class16 = class {
|
|
|
20419
20664
|
return this.modeValue;
|
|
20420
20665
|
}
|
|
20421
20666
|
get interpolation() {
|
|
20422
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
20667
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _687 => _687.sessionRef, 'optionalAccess', _688 => _688.interpolation]), () => ( "bicubic"));
|
|
20423
20668
|
}
|
|
20424
20669
|
/** Whether the open transform has changed anything yet (a commit would add an undo step). */
|
|
20425
20670
|
get modified() {
|
|
@@ -20429,7 +20674,7 @@ var FreeTransformTool = (_class16 = class {
|
|
|
20429
20674
|
const start = s.startGeometry.corners;
|
|
20430
20675
|
return this.corners.some((p, i) => p.x !== start[i].x || p.y !== start[i].y);
|
|
20431
20676
|
}
|
|
20432
|
-
|
|
20677
|
+
__init149() {this.listeners = /* @__PURE__ */ new Set()}
|
|
20433
20678
|
/** Calls `listener` whenever the overlay, readout, mode or error changes. Returns the unsubscribe. */
|
|
20434
20679
|
subscribe(listener) {
|
|
20435
20680
|
this.listeners.add(listener);
|
|
@@ -20438,7 +20683,7 @@ var FreeTransformTool = (_class16 = class {
|
|
|
20438
20683
|
};
|
|
20439
20684
|
}
|
|
20440
20685
|
changed() {
|
|
20441
|
-
_optionalChain([this, 'access',
|
|
20686
|
+
_optionalChain([this, 'access', _689 => _689.options, 'access', _690 => _690.onChange, 'optionalCall', _691 => _691()]);
|
|
20442
20687
|
for (const l of this.listeners) l();
|
|
20443
20688
|
}
|
|
20444
20689
|
/** Opens a Free Transform (default: the selected pixels of the active layer, or the whole layer). Returns an error message or `null`. */
|
|
@@ -20831,7 +21076,7 @@ var FreeTransformTool = (_class16 = class {
|
|
|
20831
21076
|
}
|
|
20832
21077
|
/** Abandons the transform and restores everything. */
|
|
20833
21078
|
cancel() {
|
|
20834
|
-
_optionalChain([this, 'access',
|
|
21079
|
+
_optionalChain([this, 'access', _692 => _692.sessionRef, 'optionalAccess', _693 => _693.cancel, 'call', _694 => _694()]);
|
|
20835
21080
|
this.sessionRef = null;
|
|
20836
21081
|
this.corners = null;
|
|
20837
21082
|
this.mesh = null;
|
|
@@ -20887,7 +21132,7 @@ function imageLayerAppliedEffects(layer) {
|
|
|
20887
21132
|
const ref = (r) => ({ effect: r.effect, ...r.name ? { name: r.name } : {}, ...r.provider ? { provider: r.provider } : {} });
|
|
20888
21133
|
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
21134
|
if (layer.type === "smart")
|
|
20890
|
-
(_nullishCoalesce(_optionalChain([layer, 'access',
|
|
21135
|
+
(_nullishCoalesce(_optionalChain([layer, 'access', _695 => _695.smartFilters, 'optionalAccess', _696 => _696.filters]), () => ( []))).forEach((f, index) => {
|
|
20891
21136
|
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
21137
|
});
|
|
20893
21138
|
return out;
|
|
@@ -21044,7 +21289,7 @@ var OTHER_TOOL_LABELS = {
|
|
|
21044
21289
|
watermark: "Watermark"
|
|
21045
21290
|
};
|
|
21046
21291
|
function imageToolLabel(tool) {
|
|
21047
|
-
return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access',
|
|
21292
|
+
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
21293
|
}
|
|
21049
21294
|
var IMAGE_TOOL_SHORTCUTS = {
|
|
21050
21295
|
...Object.fromEntries(PAINT_TOOLS.filter((t) => t.shortcut).map((t) => [t.id, t.shortcut])),
|
|
@@ -21128,19 +21373,19 @@ var pt = (p) => ({ x: p.x, y: p.y });
|
|
|
21128
21373
|
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
21374
|
var sameTarget = (a, b) => !!a && !!b && a.kind === b.kind && (a.kind === "path" ? a.id === b.id : a.layerId === b.layerId);
|
|
21130
21375
|
var PathEditGesture = (_class17 = class {
|
|
21131
|
-
constructor(controller) {;_class17.prototype.
|
|
21376
|
+
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
21377
|
this.controller = controller;
|
|
21133
21378
|
}
|
|
21134
21379
|
|
|
21135
21380
|
/** Selected anchors, as `component:subpath:anchor` keys. */
|
|
21136
|
-
|
|
21137
|
-
|
|
21138
|
-
|
|
21381
|
+
__init150() {this.selected = /* @__PURE__ */ new Set()}
|
|
21382
|
+
__init151() {this.target = null}
|
|
21383
|
+
__init152() {this.drag = null}
|
|
21139
21384
|
/** The Pen's open subpath being drawn. */
|
|
21140
|
-
|
|
21141
|
-
|
|
21142
|
-
|
|
21143
|
-
|
|
21385
|
+
__init153() {this.drawing = null}
|
|
21386
|
+
__init154() {this.pointer = null}
|
|
21387
|
+
__init155() {this.scale = 1}
|
|
21388
|
+
__init156() {this.error = null}
|
|
21144
21389
|
/** Screen pixels per document pixel (the viewport projection's scale). */
|
|
21145
21390
|
setView(scale) {
|
|
21146
21391
|
if (scale > 0 && Number.isFinite(scale)) this.scale = scale;
|
|
@@ -21171,15 +21416,15 @@ var PathEditGesture = (_class17 = class {
|
|
|
21171
21416
|
let cs;
|
|
21172
21417
|
try {
|
|
21173
21418
|
cs = this.controller.getPathEditComponents(target);
|
|
21174
|
-
} catch (
|
|
21419
|
+
} catch (e41) {
|
|
21175
21420
|
return null;
|
|
21176
21421
|
}
|
|
21177
21422
|
for (const k of [...this.selected]) {
|
|
21178
21423
|
const r = parseKey(k);
|
|
21179
|
-
if (!_optionalChain([cs, 'access',
|
|
21424
|
+
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
21425
|
}
|
|
21181
21426
|
const d = this.drawing;
|
|
21182
|
-
if (d && (!_optionalChain([cs, 'access',
|
|
21427
|
+
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
21428
|
return cs;
|
|
21184
21429
|
}
|
|
21185
21430
|
anchorAt(cs, p) {
|
|
@@ -21514,11 +21759,11 @@ var PathEditGesture = (_class17 = class {
|
|
|
21514
21759
|
let preview = null;
|
|
21515
21760
|
const d = this.drawing;
|
|
21516
21761
|
if (tool === "path-pen" && d && this.pointer && !this.drag) {
|
|
21517
|
-
const sp = _optionalChain([cs, 'access',
|
|
21518
|
-
const last = _optionalChain([sp, 'optionalAccess',
|
|
21762
|
+
const sp = _optionalChain([cs, 'access', _708 => _708[d.component], 'optionalAccess', _709 => _709.subpaths, 'access', _710 => _710[d.subpath]]);
|
|
21763
|
+
const last = _optionalChain([sp, 'optionalAccess', _711 => _711.anchors, 'access', _712 => _712[sp.anchors.length - 1]]);
|
|
21519
21764
|
if (last) preview = last.out ? [pt(last), pt(last.out), this.pointer, this.pointer] : [pt(last), this.pointer];
|
|
21520
21765
|
}
|
|
21521
|
-
const marquee = _optionalChain([this, 'access',
|
|
21766
|
+
const marquee = _optionalChain([this, 'access', _713 => _713.drag, 'optionalAccess', _714 => _714.kind]) === "marquee" ? rect(this.drag.start, this.drag.end) : null;
|
|
21522
21767
|
return { curves, anchors, handles, marquee, preview };
|
|
21523
21768
|
}
|
|
21524
21769
|
}, _class17);
|
|
@@ -21553,26 +21798,26 @@ var DEFAULT_CONTENT_AWARE_FILL_SETTINGS = {
|
|
|
21553
21798
|
livePreview: true
|
|
21554
21799
|
};
|
|
21555
21800
|
var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
|
|
21556
|
-
constructor(controller) {;_class18.prototype.
|
|
21801
|
+
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
21802
|
this.controller = controller;
|
|
21558
21803
|
}
|
|
21559
21804
|
|
|
21560
|
-
|
|
21561
|
-
|
|
21805
|
+
__init157() {this.settingsValue = { ...DEFAULT_CONTENT_AWARE_FILL_SETTINGS }}
|
|
21806
|
+
__init158() {this.plan = null}
|
|
21562
21807
|
/** The source view's window (document pixels): the selection with room around it to sample. */
|
|
21563
|
-
|
|
21564
|
-
|
|
21565
|
-
|
|
21808
|
+
__init159() {this.win = null}
|
|
21809
|
+
__init160() {this.before = null}
|
|
21810
|
+
__init161() {this.hole = null}
|
|
21566
21811
|
/** 1 where the fill may copy from, per window pixel. */
|
|
21567
|
-
|
|
21568
|
-
|
|
21569
|
-
|
|
21570
|
-
|
|
21571
|
-
|
|
21812
|
+
__init162() {this.area = null}
|
|
21813
|
+
__init163() {this.after = null}
|
|
21814
|
+
__init164() {this.lastPoint = null}
|
|
21815
|
+
__init165() {this.listeners = /* @__PURE__ */ new Set()}
|
|
21816
|
+
__init166() {this.dirty = false}
|
|
21572
21817
|
/** Why the workspace can't fill (nothing selected, not a pixel layer), for the UI. */
|
|
21573
|
-
|
|
21574
|
-
|
|
21575
|
-
|
|
21818
|
+
__init167() {this.error = null}
|
|
21819
|
+
__init168() {this.computing = false}
|
|
21820
|
+
__init169() {this.revision = 0}
|
|
21576
21821
|
get settings() {
|
|
21577
21822
|
return this.settingsValue;
|
|
21578
21823
|
}
|
|
@@ -21591,7 +21836,7 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
|
|
|
21591
21836
|
/** Images up to this many pixels show (and can be sampled) whole in the workspace. */
|
|
21592
21837
|
static __initStatic() {this.WHOLE_IMAGE_PIXELS = 4e6}
|
|
21593
21838
|
/** Room around the selection the window holds, in px each way. */
|
|
21594
|
-
|
|
21839
|
+
__init170() {this.margin = 0}
|
|
21595
21840
|
/**
|
|
21596
21841
|
* Reads the layer and makes the first preview. The window is the whole image up to
|
|
21597
21842
|
* {@link WHOLE_IMAGE_PIXELS}; on a larger one it holds the selection and room around it (twice
|
|
@@ -21600,8 +21845,8 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
|
|
|
21600
21845
|
async open() {
|
|
21601
21846
|
try {
|
|
21602
21847
|
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',
|
|
21848
|
+
const b = _optionalChain([this, 'access', _715 => _715.controller, 'access', _716 => _716.getSelection, 'call', _717 => _717(), 'optionalAccess', _718 => _718.bounds]);
|
|
21849
|
+
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
21850
|
this.plan = this.controller.prepareContentAwareFill({ sampleRadius: this.margin });
|
|
21606
21851
|
} catch (err) {
|
|
21607
21852
|
this.error = err instanceof Error ? err.message : String(err);
|
|
@@ -21733,7 +21978,7 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
|
|
|
21733
21978
|
this.emit();
|
|
21734
21979
|
return true;
|
|
21735
21980
|
}
|
|
21736
|
-
|
|
21981
|
+
__init171() {this.strokeAdds = true}
|
|
21737
21982
|
move(point) {
|
|
21738
21983
|
if (!this.lastPoint) return;
|
|
21739
21984
|
this.paint(this.lastPoint, point, this.strokeAdds);
|
|
@@ -21759,7 +22004,7 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
|
|
|
21759
22004
|
this.dirty = false;
|
|
21760
22005
|
try {
|
|
21761
22006
|
const area = this.samplingMask();
|
|
21762
|
-
if (!_optionalChain([area, 'optionalAccess',
|
|
22007
|
+
if (!_optionalChain([area, 'optionalAccess', _721 => _721.bounds])) throw new Error("The sampling area is empty; paint where the fill may copy from.");
|
|
21763
22008
|
const { plan, after } = await this.controller.previewContentAwareFill({ layerId: this.plan.layerId, samplingArea: area, seed: this.settingsValue.seed });
|
|
21764
22009
|
const win = this.win;
|
|
21765
22010
|
const out = Uint8ClampedArray.from(this.before);
|
|
@@ -21838,7 +22083,7 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
|
|
|
21838
22083
|
/** OK: fills with this sampling area, seed and output as one undo step. */
|
|
21839
22084
|
async commit(options = {}) {
|
|
21840
22085
|
const area = this.samplingMask();
|
|
21841
|
-
if (!this.plan || !_optionalChain([area, 'optionalAccess',
|
|
22086
|
+
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
22087
|
return this.controller.contentAwareFillAsync({ layerId: this.plan.layerId, samplingArea: area, seed: this.settingsValue.seed, output: this.settingsValue.output, signal: options.signal });
|
|
21843
22088
|
}
|
|
21844
22089
|
}, _class18.__initStatic(), _class18);
|
|
@@ -22954,4 +23199,6 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
|
|
|
22954
23199
|
|
|
22955
23200
|
|
|
22956
23201
|
|
|
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;
|
|
23202
|
+
|
|
23203
|
+
|
|
23204
|
+
exports.ADJUSTMENT_KEYS = _chunkS55JFWDAcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkS55JFWDAcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkS55JFWDAcjs.ADJUSTMENT_LUT_SIZE; exports.ANCHOR_FRACTION = _chunkS55JFWDAcjs.ANCHOR_FRACTION; exports.AS_SHOT_KELVIN = _chunkS55JFWDAcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkS55JFWDAcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkS55JFWDAcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkOLNIPTB3cjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkOLNIPTB3cjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkS55JFWDAcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkKWNMBMKGcjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkBROJYMWUcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkPQ3H2AANcjs.BrushstrokeCache; exports.CANVAS_SIZE_PRESETS = CANVAS_SIZE_PRESETS; exports.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.COLOR_RANGE_PRESETS = COLOR_RANGE_PRESETS; exports.COLOR_RANGE_PRESET_LABELS = COLOR_RANGE_PRESET_LABELS; exports.CONTENT_AWARE_FILL_SAMPLING = CONTENT_AWARE_FILL_SAMPLING; exports.CONTENT_AWARE_FILL_TOOLS = CONTENT_AWARE_FILL_TOOLS; exports.ColorGmm = _chunkUC3PWFM3cjs.ColorGmm; exports.ContentAwareFillSession = ContentAwareFillSession; exports.CoverageMap = _chunkPQ3H2AANcjs.CoverageMap; exports.D50 = _chunkS55JFWDAcjs.D50; exports.D65 = _chunkS55JFWDAcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkQAUIZPYIcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkPQ3H2AANcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkPQ3H2AANcjs.DEFAULT_BRUSH; exports.DEFAULT_CANVAS_VIEWPORT = DEFAULT_CANVAS_VIEWPORT; exports.DEFAULT_CHANNEL_COLOR = DEFAULT_CHANNEL_COLOR; exports.DEFAULT_CONTENT_AWARE_FILL_SETTINGS = DEFAULT_CONTENT_AWARE_FILL_SETTINGS; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkKWNMBMKGcjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkB46UQUDCcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkS55JFWDAcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunkPQ3H2AANcjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunkPQ3H2AANcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkPQ3H2AANcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = _chunkSS53NNZOcjs.DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunkYF3YZZ6Gcjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SELECT_AND_MASK_SETTINGS = DEFAULT_SELECT_AND_MASK_SETTINGS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunkPQ3H2AANcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkQAUIZPYIcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkKWNMBMKGcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkKWNMBMKGcjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkS55JFWDAcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkK6PXS6DOcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkKWNMBMKGcjs.DRY_EPS; exports.DabWalker = _chunkPQ3H2AANcjs.DabWalker; exports.EDGE_COLOR_RADIUS = _chunkS55JFWDAcjs.EDGE_COLOR_RADIUS; exports.EFFECT_LAYER_USES = EFFECT_LAYER_USES; exports.EMPTY_DISTANCE = _chunkSS53NNZOcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkPQ3H2AANcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkKWNMBMKGcjs.EX; exports.EY = _chunkKWNMBMKGcjs.EY; exports.EdgeMap = EdgeMap; exports.FLAG_ALIVE = _chunkKWNMBMKGcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkKWNMBMKGcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkKWNMBMKGcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkKWNMBMKGcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkKWNMBMKGcjs.FLAG_TOP; exports.FLAG_WET = _chunkKWNMBMKGcjs.FLAG_WET; exports.FLAT = _chunkKWNMBMKGcjs.FLAT; exports.FREE_INTERVAL = _chunkKWNMBMKGcjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkS55JFWDAcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GAMMA = _chunkUC3PWFM3cjs.GAMMA; exports.GRAIN_PATTERNS = _chunkPQ3H2AANcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkPQ3H2AANcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = _chunkSS53NNZOcjs.GUIDED_FILTER_EPS; exports.GridGraph = _chunkUC3PWFM3cjs.GridGraph; exports.HIDE = _chunkKWNMBMKGcjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkS55JFWDAcjs.HUE_RANGE_LABELS; exports.HUE_RANGE_PRESETS = HUE_RANGE_PRESETS; exports.IDENTITY_CLONE_TRANSFORM = _chunkYF3YZZ6Gcjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkS55JFWDAcjs.IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_CROP_PRESETS = IMAGE_CROP_PRESETS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.IMAGE_EFFECT_PLACES = IMAGE_EFFECT_PLACES; exports.IMAGE_FILTER_PRESETS = IMAGE_FILTER_PRESETS; exports.IMAGE_PLAYBACK_KIND = IMAGE_PLAYBACK_KIND; exports.IMAGE_TOOL_GROUPS = IMAGE_TOOL_GROUPS; exports.IMAGE_TOOL_SHORTCUTS = IMAGE_TOOL_SHORTCUTS; exports.INTENTS = _chunkBROJYMWUcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunkB46UQUDCcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkS55JFWDAcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkS55JFWDAcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkB46UQUDCcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkS55JFWDAcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkS55JFWDAcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkS55JFWDAcjs.LUMA_709; exports.LayerCompositor = _chunkS55JFWDAcjs.LayerCompositor; exports.LayerEffectError = _chunkB46UQUDCcjs.LayerEffectError; exports.LayerOperationError = _chunkS55JFWDAcjs.LayerOperationError; exports.MARCHING_ANTS_STEP_MS = MARCHING_ANTS_STEP_MS; exports.MASK_EDGE_THRESHOLDS = MASK_EDGE_THRESHOLDS; exports.MASK_FILE_ACCEPT = MASK_FILE_ACCEPT; exports.MAX_BATCH = _chunkKWNMBMKGcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkPQ3H2AANcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_BACKING_SIDE = MAX_CANVAS_BACKING_SIDE; exports.MAX_EFFECT_ANIMATION_MS = _chunkS55JFWDAcjs.MAX_EFFECT_ANIMATION_MS; exports.MAX_EFFECT_REACH = _chunkB46UQUDCcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkS55JFWDAcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkKWNMBMKGcjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkB46UQUDCcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkKWNMBMKGcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkKWNMBMKGcjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkS55JFWDAcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkS55JFWDAcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkPQ3H2AANcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkPQ3H2AANcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkPQ3H2AANcjs.MIXING_MODELS; exports.MixerStroke = _chunkPQ3H2AANcjs.MixerStroke; exports.OPP = _chunkKWNMBMKGcjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkOLNIPTB3cjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunkPQ3H2AANcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkPQ3H2AANcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkPQ3H2AANcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkKWNMBMKGcjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkS55JFWDAcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkKWNMBMKGcjs.PARAM; exports.PARAM_FLOATS = _chunkKWNMBMKGcjs.PARAM_FLOATS; exports.PASTE_MODES = PASTE_MODES; exports.PATH_EDIT_TOOLS = PATH_EDIT_TOOLS; exports.PATTERN_BLOCK_KEYS = _chunkS55JFWDAcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkOLNIPTB3cjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkKWNMBMKGcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkOLNIPTB3cjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkOLNIPTB3cjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkKWNMBMKGcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkOLNIPTB3cjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkKWNMBMKGcjs.PLANE; exports.PLANE_BYTES = _chunkKWNMBMKGcjs.PLANE_BYTES; exports.PREVIEW_SIZE = PREVIEW_SIZE; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkS55JFWDAcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkKWNMBMKGcjs.P_D0; exports.P_EDGE = _chunkKWNMBMKGcjs.P_EDGE; exports.P_FX = _chunkKWNMBMKGcjs.P_FX; exports.P_FY = _chunkKWNMBMKGcjs.P_FY; exports.P_H = _chunkKWNMBMKGcjs.P_H; exports.P_P0 = _chunkKWNMBMKGcjs.P_P0; exports.P_RHO = _chunkKWNMBMKGcjs.P_RHO; exports.P_SW = _chunkKWNMBMKGcjs.P_SW; exports.P_UX = _chunkKWNMBMKGcjs.P_UX; exports.P_UY = _chunkKWNMBMKGcjs.P_UY; exports.PaintExchange = _chunkPQ3H2AANcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkPQ3H2AANcjs.PaintGradientSampler; exports.PaintSourceError = _chunkPQ3H2AANcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaperGrain = _chunkPQ3H2AANcjs.PaperGrain; exports.PathEditGesture = PathEditGesture; exports.PatternPlacement = _chunkB46UQUDCcjs.PatternPlacement; exports.PatternTile = _chunkB46UQUDCcjs.PatternTile; exports.PsdError = _chunkS55JFWDAcjs.PsdError; exports.QUICK_MASK_TARGET = QUICK_MASK_TARGET; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.REFINE_EDIT_KINDS = _chunkUC3PWFM3cjs.REFINE_EDIT_KINDS; exports.REFINE_OUTPUTS = REFINE_OUTPUTS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunkYF3YZZ6Gcjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunkYF3YZZ6Gcjs.RegionPixelSource; exports.RetouchDabStroke = _chunkYF3YZZ6Gcjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkSS53NNZOcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkSS53NNZOcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SELECT_AND_MASK_TOOLS = SELECT_AND_MASK_TOOLS; exports.SELECT_AND_MASK_VIEWS = SELECT_AND_MASK_VIEWS; exports.SET_PLANES = _chunkKWNMBMKGcjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkOLNIPTB3cjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkS55JFWDAcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkS55JFWDAcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkKWNMBMKGcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkKWNMBMKGcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkKWNMBMKGcjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkS55JFWDAcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunkYF3YZZ6Gcjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkKWNMBMKGcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkKWNMBMKGcjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkS55JFWDAcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectAndMaskSession = SelectAndMaskSession; exports.SelectionGesture = SelectionGesture; exports.SelectionWorkerClient = _chunkUC3PWFM3cjs.SelectionWorkerClient; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkPQ3H2AANcjs.SmudgeTip; exports.StrokeCoverage = _chunkPQ3H2AANcjs.StrokeCoverage; exports.SurfaceDraft = _chunk474IQG74cjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkS55JFWDAcjs.TEXT_ALIGNS; exports.TEXT_ORIENTATIONS = _chunkS55JFWDAcjs.TEXT_ORIENTATIONS; exports.TEXT_RENDER_MARGIN = _chunkS55JFWDAcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkS55JFWDAcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunk474IQG74cjs.TILE; exports.TILE_SHIFT = _chunk474IQG74cjs.TILE_SHIFT; exports.TINT_SCALE = _chunkS55JFWDAcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkPQ3H2AANcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkS55JFWDAcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunkYF3YZZ6Gcjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkS55JFWDAcjs.TRANSFORM_ANCHORS; exports.TRANSFORM_ROTATE_HANDLE_OFFSET = TRANSFORM_ROTATE_HANDLE_OFFSET; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunkPQ3H2AANcjs.TileMedium; exports.TilePixelSource = _chunkYF3YZZ6Gcjs.TilePixelSource; exports.TileableNoise = _chunkPQ3H2AANcjs.TileableNoise; exports.TiledSurface = _chunk474IQG74cjs.TiledSurface; exports.TransformTooLargeError = _chunkB46UQUDCcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunkYF3YZZ6Gcjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.UNITS = _chunkUC3PWFM3cjs.UNITS; exports.U_MAX = _chunkKWNMBMKGcjs.U_MAX; exports.VIBRANCE_GREY = _chunkS55JFWDAcjs.VIBRANCE_GREY; exports.W9 = _chunkKWNMBMKGcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkQAUIZPYIcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkQAUIZPYIcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkKWNMBMKGcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkKWNMBMKGcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkKWNMBMKGcjs.WET_TILE; exports.WGSL_HALO = _chunkKWNMBMKGcjs.WGSL_HALO; exports.WGSL_SHADE = _chunkKWNMBMKGcjs.WGSL_SHADE; exports.WGSL_STEP = _chunkKWNMBMKGcjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WORK_PATH_NAME = WORK_PATH_NAME; exports.WORK_SIZE = _chunkUC3PWFM3cjs.WORK_SIZE; exports.WetGpuEngine = _chunkKWNMBMKGcjs.WetGpuEngine; exports.WetMedium = _chunkKWNMBMKGcjs.WetMedium; exports.WetWorkerPool = _chunkKWNMBMKGcjs.WetWorkerPool; exports.WetWorld = _chunkKWNMBMKGcjs.WetWorld; exports.WetWorldError = _chunkKWNMBMKGcjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkS55JFWDAcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkS55JFWDAcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkS55JFWDAcjs.activeEffectSmartFilters; exports.activeLayerAfterRemoval = _chunkS55JFWDAcjs.activeLayerAfterRemoval; exports.activeSmartFilters = _chunkS55JFWDAcjs.activeSmartFilters; exports.addLayerEffect = _chunkS55JFWDAcjs.addLayerEffect; exports.addLayerFilter = _chunkS55JFWDAcjs.addLayerFilter; exports.addLayerOfKind = addLayerOfKind; exports.addPaintGradientStop = _chunkPQ3H2AANcjs.addPaintGradientStop; exports.addSmartFilter = _chunkS55JFWDAcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkS55JFWDAcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkS55JFWDAcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkS55JFWDAcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkS55JFWDAcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.agentDragDraft = agentDragDraft; exports.anchorPoint = _chunkS55JFWDAcjs.anchorPoint; exports.annotationBlend = _chunkS55JFWDAcjs.annotationBlend; exports.annotationLayerFor = _chunkS55JFWDAcjs.annotationLayerFor; exports.annotationLayerName = _chunkS55JFWDAcjs.annotationLayerName; exports.annotationOfLayer = _chunkS55JFWDAcjs.annotationOfLayer; exports.annotationOfShape = _chunkS55JFWDAcjs.annotationOfShape; exports.annotationOfType = _chunkS55JFWDAcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkS55JFWDAcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkS55JFWDAcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkS55JFWDAcjs.applyAdjustments; exports.applyBoxBlur = _chunkS55JFWDAcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkS55JFWDAcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkS55JFWDAcjs.applyDepthMask; exports.applyEdgeUnmix = _chunkS55JFWDAcjs.applyEdgeUnmix; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkS55JFWDAcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkS55JFWDAcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkS55JFWDAcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkS55JFWDAcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkS55JFWDAcjs.applyParams; exports.applyProcess2Adjustments = _chunkS55JFWDAcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkS55JFWDAcjs.applyProcess2Float; exports.applyRefineEdits = _chunkUC3PWFM3cjs.applyRefineEdits; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunkYF3YZZ6Gcjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkS55JFWDAcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkPQ3H2AANcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkPQ3H2AANcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunkYF3YZZ6Gcjs.applyToneToDeepTile; exports.backgroundLayer = _chunkS55JFWDAcjs.backgroundLayer; exports.base64ToBytes = _chunkOLNIPTB3cjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunkMQDIP4CFcjs.bestOffset; exports.blackWhiteGray = _chunkS55JFWDAcjs.blackWhiteGray; exports.blendChannel = _chunkOLNIPTB3cjs.blendChannel; exports.blendImageData = _chunkOLNIPTB3cjs.blendImageData; exports.blendLum = _chunkOLNIPTB3cjs.blendLum; exports.blendPixel = _chunkOLNIPTB3cjs.blendPixel; exports.blendRadius = _chunkPQ3H2AANcjs.blendRadius; exports.blendRgb = _chunkOLNIPTB3cjs.blendRgb; exports.blendTile = _chunkB46UQUDCcjs.blendTile; exports.blenderDab = _chunkPQ3H2AANcjs.blenderDab; exports.blurFilter = _chunkS55JFWDAcjs.blurFilter; exports.borderCoverage = _chunkSS53NNZOcjs.borderCoverage; exports.boxBlur = _chunkUC3PWFM3cjs.boxBlur; exports.boxBlurPixels = _chunkYF3YZZ6Gcjs.boxBlurPixels; exports.boxFrameHit = boxFrameHit; exports.boxFrameOverlay = boxFrameOverlay; exports.boxMean = _chunkSS53NNZOcjs.boxMean; exports.boxPointOf = _chunkS55JFWDAcjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkS55JFWDAcjs.bradfordAdaptation; exports.brushStrokeMask = _chunkUC3PWFM3cjs.brushStrokeMask; exports.brushstrokeDataUrl = _chunkPQ3H2AANcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkPQ3H2AANcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkPQ3H2AANcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkPQ3H2AANcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkPQ3H2AANcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkS55JFWDAcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkS55JFWDAcjs.buildToneLut; exports.builtinPattern = _chunkB46UQUDCcjs.builtinPattern; exports.builtinPatternIds = _chunkB46UQUDCcjs.builtinPatternIds; exports.bytesToBase64 = _chunkOLNIPTB3cjs.bytesToBase64; exports.calculateCropDrag = _chunkS55JFWDAcjs.calculateCropDrag; exports.canShareMemory = _chunkKWNMBMKGcjs.canShareMemory; exports.canvasCompositeOperation = _chunkOLNIPTB3cjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkS55JFWDAcjs.canvasToImagePoint; exports.caretAt = _chunkQAUIZPYIcjs.caretAt; exports.changedTiles = _chunkB46UQUDCcjs.changedTiles; exports.channelThumbnail = channelThumbnail; exports.checkEffectAnimation = checkEffectAnimation; exports.checkEffectTime = checkEffectTime; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkS55JFWDAcjs.clampCropToImage; exports.cleanMixer = _chunkPQ3H2AANcjs.cleanMixer; exports.cloneSamplePoint = _chunkYF3YZZ6Gcjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunk474IQG74cjs.collectTiles; exports.colorBalanceChannel = _chunkS55JFWDAcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.colorRangePreset = colorRangePreset; exports.combineSelections = _chunkSS53NNZOcjs.combineSelections; exports.compareSelectionMasks = compareSelectionMasks; exports.compileAdjustmentLayer = _chunkS55JFWDAcjs.compileAdjustmentLayer; exports.componentPath = _chunkS55JFWDAcjs.componentPath; exports.componentsCoverage = _chunkS55JFWDAcjs.componentsCoverage; exports.compositeDeep = _chunkS55JFWDAcjs.compositeDeep; exports.compositeSurfaceOver = _chunkB46UQUDCcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkSS53NNZOcjs.computeSelectionBounds; exports.contentAwareFill = _chunkMQDIP4CFcjs.contentAwareFill; exports.contentBounds = _chunk474IQG74cjs.contentBounds; exports.contentsBox = _chunkS55JFWDAcjs.contentsBox; exports.contentsSurface = _chunkS55JFWDAcjs.contentsSurface; exports.contractCoverage = _chunkSS53NNZOcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkOLNIPTB3cjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkS55JFWDAcjs.convertToSmartObject; exports.copySmartObject = _chunkS55JFWDAcjs.copySmartObject; exports.cornersFromMatrix = _chunkS55JFWDAcjs.cornersFromMatrix; exports.coverageTileCoord = _chunkPQ3H2AANcjs.coverageTileCoord; exports.coverageToByte = _chunkSS53NNZOcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkS55JFWDAcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkPQ3H2AANcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkQAUIZPYIcjs.createCanvasTextShaper; exports.createGradientSampler = createGradientSampler; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageColorTools = createImageColorTools; exports.createImageEditTools = createImageEditTools; exports.createImageEditorDocument = createImageEditorDocument; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageEffectsToolProvider = createImageEffectsToolProvider; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePlaybackLocator = createImagePlaybackLocator; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSegmentationToolProvider = createImageSegmentationToolProvider; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageSubjectSelectionTool = createImageSubjectSelectionTool; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunkQAUIZPYIcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkQAUIZPYIcjs.createOutlineTextShaper; exports.createPigment = _chunkOLNIPTB3cjs.createPigment; exports.createPigmentTools = _chunkKWNMBMKGcjs.createPigmentTools; exports.createSelectionMask = _chunkSS53NNZOcjs.createSelectionMask; exports.createShapeLayer = _chunkS55JFWDAcjs.createShapeLayer; exports.createTypeLayer = _chunkS55JFWDAcjs.createTypeLayer; exports.createWetGpuEngine = _chunkKWNMBMKGcjs.createWetGpuEngine; exports.cssFont = _chunkQAUIZPYIcjs.cssFont; exports.cssFontFamily = _chunkQAUIZPYIcjs.cssFontFamily; exports.curveLut = _chunkB46UQUDCcjs.curveLut; exports.curveLutFromLevels = _chunkS55JFWDAcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkPQ3H2AANcjs.dabCoverage; exports.dabRect = _chunkPQ3H2AANcjs.dabRect; exports.decodeDeepSurface = _chunkS55JFWDAcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkS55JFWDAcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkS55JFWDAcjs.decodeLayerMask; exports.decodeMergedImage = _chunkS55JFWDAcjs.decodeMergedImage; exports.decodePlanes = _chunkS55JFWDAcjs.decodePlanes; exports.decodePng = _chunkOLNIPTB3cjs.decodePng; exports.decodePngDataUrl = _chunkS55JFWDAcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkSS53NNZOcjs.decodeSelectionRle; exports.decontaminateColors = _chunkSS53NNZOcjs.decontaminateColors; exports.deepBytes = _chunkOLNIPTB3cjs.deepBytes; exports.deepTile = _chunkOLNIPTB3cjs.deepTile; exports.defaultActiveLayerId = _chunkS55JFWDAcjs.defaultActiveLayerId; exports.defaultAdjustmentParams = _chunkS55JFWDAcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkB46UQUDCcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkB46UQUDCcjs.defaultLayerEffect; exports.defaultShapeName = _chunkS55JFWDAcjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkS55JFWDAcjs.depthMaskAlpha; exports.depthOf = _chunkOLNIPTB3cjs.depthOf; exports.depthRasterMask = _chunkS55JFWDAcjs.depthRasterMask; exports.describeChannel = describeChannel; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkS55JFWDAcjs.describeTransform; exports.deserializeChannels = deserializeChannels; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkS55JFWDAcjs.deserializeEffects; exports.deserializeLayer = _chunkS55JFWDAcjs.deserializeLayer; exports.deserializeLayers = _chunkS55JFWDAcjs.deserializeLayers; exports.deserializeMask = _chunkUC3PWFM3cjs.deserializeMask; exports.deserializePatterns = _chunkS55JFWDAcjs.deserializePatterns; exports.deserializeSelection = _chunkSS53NNZOcjs.deserializeSelection; exports.despillEdge = _chunkS55JFWDAcjs.despillEdge; exports.developFilter = _chunkS55JFWDAcjs.developFilter; exports.developFromAdjustments = _chunkS55JFWDAcjs.developFromAdjustments; exports.developTarget = _chunkS55JFWDAcjs.developTarget; exports.dexp = _chunkKWNMBMKGcjs.dexp; exports.dilateMask = _chunkMQDIP4CFcjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkSS53NNZOcjs.distanceTransform; exports.dlog = _chunkKWNMBMKGcjs.dlog; exports.documentContents = _chunkS55JFWDAcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunkYF3YZZ6Gcjs.dodgeBurn; exports.dodgeBurnCurve = _chunkYF3YZZ6Gcjs.dodgeBurnCurve; exports.downloadMaskImage = downloadMaskImage; exports.downloadPsd = downloadPsd; exports.dpow = _chunkKWNMBMKGcjs.dpow; exports.dragWarpMeshPoint = _chunkQAUIZPYIcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkKWNMBMKGcjs.dsincos; exports.duplicateLayer = _chunkS55JFWDAcjs.duplicateLayer; exports.edgeBits = _chunkKWNMBMKGcjs.edgeBits; exports.edgeWidth = _chunkSS53NNZOcjs.edgeWidth; exports.effectColorHex = _chunkB46UQUDCcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectLayerTiming = effectLayerTiming; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkB46UQUDCcjs.effectReach; exports.effectiveLayerMask = _chunkS55JFWDAcjs.effectiveLayerMask; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkB46UQUDCcjs.effectsFingerprint; exports.effectsMargin = _chunkB46UQUDCcjs.effectsMargin; exports.effectsScale = _chunkB46UQUDCcjs.effectsScale; exports.ellipsePoints = _chunkUC3PWFM3cjs.ellipsePoints; exports.ellipseSelection = _chunkUC3PWFM3cjs.ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunk474IQG74cjs.emptySurface; exports.encodeDeepSurface = _chunkS55JFWDAcjs.encodeDeepSurface; exports.encodePng = _chunkOLNIPTB3cjs.encodePng; exports.encodeRle = _chunkS55JFWDAcjs.encodeRle; exports.encodeSelectionRle = _chunkSS53NNZOcjs.encodeSelectionRle; exports.encodeSurface = _chunkS55JFWDAcjs.encodeSurface; exports.evalWarpMesh = _chunkQAUIZPYIcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkS55JFWDAcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkPQ3H2AANcjs.exchangeRates; exports.expNeg = _chunkKWNMBMKGcjs.expNeg; exports.expandCoverage = _chunkSS53NNZOcjs.expandCoverage; exports.exportPsd = _chunkS55JFWDAcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkSS53NNZOcjs.featherCoverage; exports.fillRect = _chunk474IQG74cjs.fillRect; exports.filmPixel = _chunkKWNMBMKGcjs.filmPixel; exports.filmReflectance = _chunkKWNMBMKGcjs.filmReflectance; exports.filterMaskCoverage = _chunkS55JFWDAcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkB46UQUDCcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findSky = _chunkUC3PWFM3cjs.findSky; exports.findSubject = _chunkUC3PWFM3cjs.findSubject; exports.findWebGpu = _chunkKWNMBMKGcjs.findWebGpu; exports.finishTile = _chunk474IQG74cjs.finishTile; exports.fitParagraphRuns = _chunkQAUIZPYIcjs.fitParagraphRuns; exports.fitRuns = _chunkQAUIZPYIcjs.fitRuns; exports.flattenLayers = _chunkB46UQUDCcjs.flattenLayers; exports.flattenPath = _chunkS55JFWDAcjs.flattenPath; exports.flipCorners = _chunkS55JFWDAcjs.flipCorners; exports.flowField = _chunkKWNMBMKGcjs.flowField; exports.focusArea = _chunkUC3PWFM3cjs.focusArea; exports.followLayerMove = _chunkS55JFWDAcjs.followLayerMove; exports.fontOf = _chunkQAUIZPYIcjs.fontOf; exports.forgetSelectAndMaskSettings = forgetSelectAndMaskSettings; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkSS53NNZOcjs.fullSelection; exports.gaussianBlur = _chunkK6PXS6DOcjs.gaussianBlur; exports.geometryHomography = _chunkS55JFWDAcjs.geometryHomography; exports.getAnnotationBounds = _chunkS55JFWDAcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkS55JFWDAcjs.getCropCursor; exports.getRotatedSize = _chunkS55JFWDAcjs.getRotatedSize; exports.getViewportMetrics = _chunkS55JFWDAcjs.getViewportMetrics; exports.getViewportProjection = _chunkS55JFWDAcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.grabCutLabels = _chunkUC3PWFM3cjs.grabCutLabels; exports.gradientDabColor = _chunkPQ3H2AANcjs.gradientDabColor; exports.grainCatch = _chunkPQ3H2AANcjs.grainCatch; exports.grainHeights = _chunkPQ3H2AANcjs.grainHeights; exports.greyMorphology = _chunkSS53NNZOcjs.greyMorphology; exports.groupLayers = _chunkS55JFWDAcjs.groupLayers; exports.growSelection = growSelection; exports.guidePlanes = _chunkSS53NNZOcjs.guidePlanes; exports.guidedFilterColor = _chunkSS53NNZOcjs.guidedFilterColor; exports.handleMaskViewKey = handleMaskViewKey; exports.handlePaintShortcut = handlePaintShortcut; exports.handleQuickMaskKey = handleQuickMaskKey; exports.handleSelectionShortcut = handleSelectionShortcut; exports.hasActiveEffects = _chunkB46UQUDCcjs.hasActiveEffects; exports.hasEdgeUnmix = _chunkS55JFWDAcjs.hasEdgeUnmix; exports.hasLayersBelow = hasLayersBelow; exports.hasResampledLegacyMask = _chunkS55JFWDAcjs.hasResampledLegacyMask; exports.hasSoftBand = _chunkS55JFWDAcjs.hasSoftBand; exports.hasSurface = _chunkS55JFWDAcjs.hasSurface; exports.hasWarp = _chunkS55JFWDAcjs.hasWarp; exports.hash2 = _chunkPQ3H2AANcjs.hash2; exports.hashMaskContent = _chunkSS53NNZOcjs.hashMaskContent; exports.hashNoise = _chunkB46UQUDCcjs.hashNoise; exports.healPixels = _chunkYF3YZZ6Gcjs.healPixels; exports.hexToPaintRgb = _chunkPQ3H2AANcjs.hexToPaintRgb; exports.hexToRgb = _chunkS55JFWDAcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkS55JFWDAcjs.hitTestAnnotation; exports.hitTestCrop = _chunkS55JFWDAcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkS55JFWDAcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkS55JFWDAcjs.hueRangeTables; exports.hueRangeWeight = _chunkS55JFWDAcjs.hueRangeWeight; exports.hueSaturation = _chunkS55JFWDAcjs.hueSaturation; exports.identityCurve = _chunkS55JFWDAcjs.identityCurve; exports.identityLevels = _chunkS55JFWDAcjs.identityLevels; exports.identityTransform = _chunkS55JFWDAcjs.identityTransform; exports.identityWarpMesh = _chunkQAUIZPYIcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imagePanelTool = imagePanelTool; exports.imagePlaybackPanel = imagePlaybackPanel; exports.imageToCanvasPoint = _chunkS55JFWDAcjs.imageToCanvasPoint; exports.imageToolCanvasMode = imageToolCanvasMode; exports.imageToolForShortcut = imageToolForShortcut; exports.imageToolGroup = imageToolGroup; exports.imageToolLabel = imageToolLabel; exports.imageToolPanel = imageToolPanel; exports.importPsd = _chunkS55JFWDAcjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkB46UQUDCcjs.insertLayer; exports.inspectMaskEdge = inspectMaskEdge; exports.instancesOf = _chunkS55JFWDAcjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkS55JFWDAcjs.invertMatrix3; exports.invertSelection = _chunkSS53NNZOcjs.invertSelection; exports.isActiveFilter = _chunkS55JFWDAcjs.isActiveFilter; exports.isActiveVectorMask = _chunkS55JFWDAcjs.isActiveVectorMask; exports.isAdjustmentKind = _chunkS55JFWDAcjs.isAdjustmentKind; exports.isBitDepth = _chunkOLNIPTB3cjs.isBitDepth; exports.isBlendMode = _chunkOLNIPTB3cjs.isBlendMode; exports.isBrushstrokeBrush = _chunkPQ3H2AANcjs.isBrushstrokeBrush; exports.isColorRangePreset = isColorRangePreset; exports.isContentsDecoded = _chunkS55JFWDAcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkS55JFWDAcjs.isDefaultDepthMask; exports.isGradientPaint = _chunkPQ3H2AANcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunkYF3YZZ6Gcjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkS55JFWDAcjs.isIdentityTransform; exports.isInterpolation = _chunkB46UQUDCcjs.isInterpolation; exports.isLayerEffectKind = _chunkB46UQUDCcjs.isLayerEffectKind; exports.isLayerLocked = _chunkB46UQUDCcjs.isLayerLocked; exports.isLegacyShape = _chunkS55JFWDAcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPaintableLayer = _chunkS55JFWDAcjs.isPaintableLayer; exports.isPainterlyBlendMode = _chunkOLNIPTB3cjs.isPainterlyBlendMode; exports.isPathEditTool = isPathEditTool; exports.isPng = _chunkOLNIPTB3cjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkS55JFWDAcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkS55JFWDAcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkSS53NNZOcjs.isSelectionEmpty; exports.isSelectionMode = _chunkSS53NNZOcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkOLNIPTB3cjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkS55JFWDAcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkS55JFWDAcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkS55JFWDAcjs.isTransformAnchor; exports.isValidWarp = _chunkS55JFWDAcjs.isValidWarp; exports.keepDeepSamples = _chunkOLNIPTB3cjs.keepDeepSamples; exports.keepMainPieces = _chunkUC3PWFM3cjs.keepMainPieces; exports.kelvinToTemperature = _chunkS55JFWDAcjs.kelvinToTemperature; exports.keysWeight = _chunkB46UQUDCcjs.keysWeight; exports.latticeViscosity = _chunkKWNMBMKGcjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkB46UQUDCcjs.layerEffectFields; exports.layerEffectLabel = _chunkB46UQUDCcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkS55JFWDAcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkS55JFWDAcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkS55JFWDAcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkS55JFWDAcjs.layerMaskKey; exports.layerMaskSelection = _chunkS55JFWDAcjs.layerMaskSelection; exports.layerMenu = layerMenu; exports.layerName = _chunkS55JFWDAcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerPanels = layerPanels; exports.layerThumbnailClick = layerThumbnailClick; exports.layerTree = _chunkS55JFWDAcjs.layerTree; exports.layerTypeLabel = _chunkS55JFWDAcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkS55JFWDAcjs.layersFromLegacy; exports.layoutText = _chunkQAUIZPYIcjs.layoutText; exports.legacyAdjustmentLayer = _chunkS55JFWDAcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkS55JFWDAcjs.legacyMaskOf; exports.legacyView = _chunkS55JFWDAcjs.legacyView; exports.lerpPigment = _chunkOLNIPTB3cjs.lerpPigment; exports.lerpPigmentInto = _chunkOLNIPTB3cjs.lerpPigmentInto; exports.levelsValue = _chunkS55JFWDAcjs.levelsValue; exports.linearSrgbToXy = _chunkS55JFWDAcjs.linearSrgbToXy; exports.linearToSrgb = _chunkS55JFWDAcjs.linearToSrgb; exports.linearToSrgb8 = _chunkKWNMBMKGcjs.linearToSrgb8; exports.liveComponent = _chunkS55JFWDAcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkS55JFWDAcjs.liveShapeSubpaths; exports.liveWire = liveWire; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkPQ3H2AANcjs.loadMixer; exports.loadOpenTypeFont = _chunkLCCMOWR7cjs.loadOpenTypeFont; exports.loadWetKernel = _chunkKWNMBMKGcjs.loadWetKernel; exports.luma = _chunkYF3YZZ6Gcjs.luma; exports.magicWand = magicWand; exports.magneticAnchorSpacing = magneticAnchorSpacing; exports.mapCropHandle = _chunkS55JFWDAcjs.mapCropHandle; exports.mapLayer = _chunkB46UQUDCcjs.mapLayer; exports.mapSubpaths = _chunkS55JFWDAcjs.mapSubpaths; exports.maskBounds = _chunkMQDIP4CFcjs.maskBounds; exports.maskCoverageOverCanvas = _chunkS55JFWDAcjs.maskCoverageOverCanvas; exports.maskFileName = maskFileName; exports.maskNameFromFile = maskNameFromFile; exports.maskSummary = maskSummary; exports.maskThumbnailClick = maskThumbnailClick; exports.matrixFromCorners = _chunkS55JFWDAcjs.matrixFromCorners; exports.matrixFromParams = _chunkS55JFWDAcjs.matrixFromParams; exports.measureCanvasViewport = measureCanvasViewport; exports.membraneFill = _chunkMQDIP4CFcjs.membraneFill; exports.mergeLayerEffect = _chunkB46UQUDCcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkS55JFWDAcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunkPQ3H2AANcjs.mix32; exports.mixPigment8 = _chunkOLNIPTB3cjs.mixPigment8; exports.mixPigmentRgb = _chunkOLNIPTB3cjs.mixPigmentRgb; exports.mixPigments = _chunkOLNIPTB3cjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunkPQ3H2AANcjs.mixerRates; exports.modifySelection = _chunkSS53NNZOcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkS55JFWDAcjs.moveLayer; exports.moveSmartFilter = _chunkS55JFWDAcjs.moveSmartFilter; exports.mulMatrix3 = _chunkS55JFWDAcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkS55JFWDAcjs.neutralHueRange; exports.newContentsId = _chunkS55JFWDAcjs.newContentsId; exports.newEffectId = _chunkB46UQUDCcjs.newEffectId; exports.newLayerId = _chunkS55JFWDAcjs.newLayerId; exports.newLayerOptions = newLayerOptions; exports.newPathId = newPathId; exports.normalizeAdjustmentLayer = _chunkS55JFWDAcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkS55JFWDAcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkS55JFWDAcjs.normalizeAngle; exports.normalizeBlendMode = _chunkOLNIPTB3cjs.normalizeBlendMode; exports.normalizeBlender = _chunkPQ3H2AANcjs.normalizeBlender; exports.normalizeBrush = _chunkPQ3H2AANcjs.normalizeBrush; exports.normalizeFilter = _chunkS55JFWDAcjs.normalizeFilter; exports.normalizeFlow = _chunkKWNMBMKGcjs.normalizeFlow; exports.normalizeHexColor = _chunkPQ3H2AANcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkB46UQUDCcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkS55JFWDAcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkS55JFWDAcjs.normalizeLiveShape; exports.normalizeMixer = _chunkPQ3H2AANcjs.normalizeMixer; exports.normalizePlacement = _chunkS55JFWDAcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkS55JFWDAcjs.normalizeProcessVersion; exports.normalizeRect = _chunkUC3PWFM3cjs.normalizeRect; exports.normalizeRefineEdgeParams = _chunkSS53NNZOcjs.normalizeRefineEdgeParams; exports.normalizeRetouch = _chunkYF3YZZ6Gcjs.normalizeRetouch; exports.normalizeShapePaint = _chunkS55JFWDAcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkS55JFWDAcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkS55JFWDAcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkPQ3H2AANcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkS55JFWDAcjs.normalizeSubpaths; exports.normalizeText = _chunkS55JFWDAcjs.normalizeText; exports.normalizeTilt = _chunkKWNMBMKGcjs.normalizeTilt; exports.normalizeWetParams = _chunkKWNMBMKGcjs.normalizeWetParams; exports.offsetLayer = _chunkS55JFWDAcjs.offsetLayer; exports.offsetShape = _chunkS55JFWDAcjs.offsetShape; exports.offsetSmartObject = _chunkS55JFWDAcjs.offsetSmartObject; exports.offsetVectorMask = _chunkS55JFWDAcjs.offsetVectorMask; exports.openMaskFile = openMaskFile; exports.openPsdFile = openPsdFile; exports.otsuThreshold = _chunkUC3PWFM3cjs.otsuThreshold; exports.packRgba = _chunk474IQG74cjs.packRgba; exports.packWetParams = _chunkKWNMBMKGcjs.packWetParams; exports.paintGradientMappingFor = _chunkPQ3H2AANcjs.paintGradientMappingFor; exports.paintPathStroke = _chunkPQ3H2AANcjs.paintPathStroke; exports.paintSourceColor = _chunkPQ3H2AANcjs.paintSourceColor; exports.paintSourceCss = _chunkPQ3H2AANcjs.paintSourceCss; exports.paragraphRanges = _chunkQAUIZPYIcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkS55JFWDAcjs.parseAdjustmentBlock; exports.parseBlend = _chunkS55JFWDAcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkOLNIPTB3cjs.parseDataUrl; exports.parseEffectColor = _chunkB46UQUDCcjs.parseEffectColor; exports.parseLfx2 = _chunkS55JFWDAcjs.parseLfx2; exports.parseLrfx = _chunkS55JFWDAcjs.parseLrfx; exports.parseOpenTypeFont = _chunkLCCMOWR7cjs.parseOpenTypeFont; exports.parsePaintSource = _chunkPQ3H2AANcjs.parsePaintSource; exports.parsePatternBlock = _chunkS55JFWDAcjs.parsePatternBlock; exports.parseSelectionMode = _chunkSS53NNZOcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkS55JFWDAcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkS55JFWDAcjs.patchParagraphStyle; exports.patchTextStyle = _chunkS55JFWDAcjs.patchTextStyle; exports.pathAnchorCount = pathAnchorCount; exports.pathBounds = pathBounds; exports.pathStrokeCoverage = _chunkPQ3H2AANcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkPQ3H2AANcjs.pathStrokeDabs; exports.pathSvgData = pathSvgData; exports.pathToSelection = pathToSelection; exports.perDabStrength = _chunkYF3YZZ6Gcjs.perDabStrength; exports.photoFilterMatrix = _chunkS55JFWDAcjs.photoFilterMatrix; exports.pigment8 = _chunkOLNIPTB3cjs.pigment8; exports.pigmentColor = _chunkKWNMBMKGcjs.pigmentColor; exports.pigmentOf = _chunkKWNMBMKGcjs.pigmentOf; exports.pixelLayerBounds = _chunkS55JFWDAcjs.pixelLayerBounds; exports.pixelLayers = _chunkS55JFWDAcjs.pixelLayers; exports.pixelPigment = _chunkKWNMBMKGcjs.pixelPigment; exports.placeContents = _chunkS55JFWDAcjs.placeContents; exports.placeLayer = _chunkS55JFWDAcjs.placeLayer; exports.placementAt = _chunkS55JFWDAcjs.placementAt; exports.placementBounds = _chunkS55JFWDAcjs.placementBounds; exports.placementGeometry = _chunkS55JFWDAcjs.placementGeometry; exports.planImageToolPlayback = planImageToolPlayback; exports.planOutlineTrace = planOutlineTrace; exports.pngDataUrl = _chunkOLNIPTB3cjs.pngDataUrl; exports.pointerPressure = _chunkKWNMBMKGcjs.pointerPressure; exports.pointerStrokeSample = _chunkKWNMBMKGcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkKWNMBMKGcjs.pointerStrokeSamples; exports.polygonCoverage = _chunkUC3PWFM3cjs.polygonCoverage; exports.polygonCoverageBox = _chunkUC3PWFM3cjs.polygonCoverageBox; exports.polygonSelection = _chunkUC3PWFM3cjs.polygonSelection; exports.posterizeValue = _chunkS55JFWDAcjs.posterizeValue; exports.presetWarp = _chunkS55JFWDAcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkS55JFWDAcjs.projectImagePoint; exports.projectImageRect = _chunkS55JFWDAcjs.projectImageRect; exports.projectMaskCoverage = _chunkS55JFWDAcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkOLNIPTB3cjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkS55JFWDAcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkS55JFWDAcjs.psdToLayers; exports.pullWarpMesh = _chunkQAUIZPYIcjs.pullWarpMesh; exports.put255 = _chunkPQ3H2AANcjs.put255; exports.quadFrameOverlay = quadFrameOverlay; exports.quickMaskPixels = quickMaskPixels; exports.quickSelectStroke = _chunkUC3PWFM3cjs.quickSelectStroke; exports.rand01 = _chunkPQ3H2AANcjs.rand01; exports.randSigned = _chunkPQ3H2AANcjs.randSigned; exports.rangeLightness = _chunkS55JFWDAcjs.rangeLightness; exports.rasterContents = _chunkS55JFWDAcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkS55JFWDAcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkS55JFWDAcjs.rasterizeCoverage; exports.rasterizeDab = _chunkPQ3H2AANcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkS55JFWDAcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkOLNIPTB3cjs.readDeepRegion; exports.readEdgeColor = _chunkS55JFWDAcjs.readEdgeColor; exports.readPaintSource = _chunkPQ3H2AANcjs.readPaintSource; exports.readPaths = readPaths; exports.readPixel = _chunk474IQG74cjs.readPixel; exports.readPsd = _chunkS55JFWDAcjs.readPsd; exports.readRegion = _chunk474IQG74cjs.readRegion; exports.readShapeComponents = _chunkS55JFWDAcjs.readShapeComponents; exports.readSourceRegion = _chunkYF3YZZ6Gcjs.readSourceRegion; exports.rectSelection = _chunkUC3PWFM3cjs.rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkB46UQUDCcjs.reduceSurface; exports.referencePoint = _chunkS55JFWDAcjs.referencePoint; exports.refineCoverage = _chunkSS53NNZOcjs.refineCoverage; exports.refineEdgeHalo = _chunkSS53NNZOcjs.refineEdgeHalo; exports.refineSelection = _chunkSS53NNZOcjs.refineSelection; exports.reflectanceToRgb = _chunkOLNIPTB3cjs.reflectanceToRgb; exports.removeAlpha = _chunkS55JFWDAcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkS55JFWDAcjs.removeLayer; exports.removeLayerEffect = _chunkS55JFWDAcjs.removeLayerEffect; exports.removeLayerFilter = _chunkS55JFWDAcjs.removeLayerFilter; exports.removePaintGradientStop = _chunkPQ3H2AANcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkS55JFWDAcjs.removeSmartFilter; exports.renderBrushstroke = _chunkPQ3H2AANcjs.renderBrushstroke; exports.renderLayerEffects = _chunkB46UQUDCcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkS55JFWDAcjs.renderShape; exports.renderShapeRect = _chunkS55JFWDAcjs.renderShapeRect; exports.renderSmartObject = _chunkS55JFWDAcjs.renderSmartObject; exports.renderText = _chunkS55JFWDAcjs.renderText; exports.replaceContents = _chunkS55JFWDAcjs.replaceContents; exports.replaceTextRange = _chunkS55JFWDAcjs.replaceTextRange; exports.requireLayer = _chunkS55JFWDAcjs.requireLayer; exports.requireOperation = _chunkS55JFWDAcjs.requireOperation; exports.requireShapeLayer = _chunkS55JFWDAcjs.requireShapeLayer; exports.requireSmartObject = _chunkS55JFWDAcjs.requireSmartObject; exports.requireTypeLayer = _chunkS55JFWDAcjs.requireTypeLayer; exports.requireUnlocked = _chunkS55JFWDAcjs.requireUnlocked; exports.rerender = _chunkS55JFWDAcjs.rerender; exports.rerenderShape = _chunkS55JFWDAcjs.rerenderShape; exports.rerenderText = _chunkS55JFWDAcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkSS53NNZOcjs.resizeSelection; exports.resizeWarpMesh = _chunkQAUIZPYIcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkS55JFWDAcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkPQ3H2AANcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.resolveVectorMasks = _chunkS55JFWDAcjs.resolveVectorMasks; exports.restyleRange = _chunkQAUIZPYIcjs.restyleRange; exports.retouchFilter = _chunkYF3YZZ6Gcjs.retouchFilter; exports.reversePaintGradient = _chunkPQ3H2AANcjs.reversePaintGradient; exports.rgbToGray = _chunkS55JFWDAcjs.rgbToGray; exports.rgbToHsl = _chunkS55JFWDAcjs.rgbToHsl; exports.rgbToReflectance = _chunkOLNIPTB3cjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunkYF3YZZ6Gcjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkS55JFWDAcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkS55JFWDAcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.runSelectionJob = _chunkUC3PWFM3cjs.runSelectionJob; exports.sameCanvasViewport = sameCanvasViewport; exports.sampleLut = _chunkS55JFWDAcjs.sampleLut; exports.sampleToneLut = _chunkS55JFWDAcjs.sampleToneLut; exports.saturationOf = _chunkYF3YZZ6Gcjs.saturationOf; exports.scaleLayerEffect = _chunkB46UQUDCcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkPQ3H2AANcjs.scalePaintGradient; exports.seamlessClone = _chunkMQDIP4CFcjs.seamlessClone; exports.seedFromString = _chunkPQ3H2AANcjs.seedFromString; exports.segmentToSelection = segmentToSelection; exports.segmentationOutlines = segmentationOutlines; exports.segmentsToSelection = segmentsToSelection; exports.selectObjectIn = _chunkUC3PWFM3cjs.selectObjectIn; exports.selectSimilar = selectSimilar; exports.selectionArea = _chunkSS53NNZOcjs.selectionArea; exports.selectionDiffPixels = selectionDiffPixels; exports.selectionFromCoverage = _chunkSS53NNZOcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkSS53NNZOcjs.selectionFromPixels; exports.selectionFromRegion = _chunkSS53NNZOcjs.selectionFromRegion; exports.selectionFromTiles = _chunkSS53NNZOcjs.selectionFromTiles; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionRing = selectionRing; exports.selectionToCoverage = _chunkSS53NNZOcjs.selectionToCoverage; exports.selectionToPixels = _chunkSS53NNZOcjs.selectionToPixels; exports.selectionToSubpaths = selectionToSubpaths; exports.selectionUncertainty = selectionUncertainty; exports.selectionValueAt = _chunkSS53NNZOcjs.selectionValueAt; exports.serializeChannels = serializeChannels; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkS55JFWDAcjs.serializeContents; exports.serializeEffects = _chunkS55JFWDAcjs.serializeEffects; exports.serializeLayer = _chunkS55JFWDAcjs.serializeLayer; exports.serializeLayers = _chunkS55JFWDAcjs.serializeLayers; exports.serializeLayersExternal = _chunkS55JFWDAcjs.serializeLayersExternal; exports.serializeMask = _chunkUC3PWFM3cjs.serializeMask; exports.serializePaths = serializePaths; exports.serializePatterns = _chunkS55JFWDAcjs.serializePatterns; exports.serializeSelection = _chunkSS53NNZOcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkS55JFWDAcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkS55JFWDAcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkS55JFWDAcjs.setLayerMask; exports.setLayerProperties = _chunkS55JFWDAcjs.setLayerProperties; exports.setLum = _chunkOLNIPTB3cjs.setLum; exports.setPigmentColor = _chunkOLNIPTB3cjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkS55JFWDAcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkS55JFWDAcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkS55JFWDAcjs.setSmartPlacement; exports.shadeTile = _chunkKWNMBMKGcjs.shadeTile; exports.shapeAsPixelLayer = _chunkS55JFWDAcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkS55JFWDAcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkS55JFWDAcjs.shapeGeometryBounds; exports.shapeLayers = _chunkS55JFWDAcjs.shapeLayers; exports.shapeOutline = _chunkS55JFWDAcjs.shapeOutline; exports.shapeRenderClip = _chunkS55JFWDAcjs.shapeRenderClip; exports.shiftCoverage = _chunkSS53NNZOcjs.shiftCoverage; exports.simplifyPixelPath = simplifyPixelPath; exports.skinToneRange = skinToneRange; exports.slicSuperpixels = _chunkUC3PWFM3cjs.slicSuperpixels; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkS55JFWDAcjs.smartObjectLayers; exports.smoothCoverage = _chunkSS53NNZOcjs.smoothCoverage; exports.smoothPoints = _chunkPQ3H2AANcjs.smoothPoints; exports.smoothnessWeights = _chunkUC3PWFM3cjs.smoothnessWeights; exports.smudgeEffect = _chunkYF3YZZ6Gcjs.smudgeEffect; exports.snapPolygonToEdges = snapPolygonToEdges; exports.snapTo45 = snapTo45; exports.snapToEdge = snapToEdge; exports.softMaskToSelection = _chunkUC3PWFM3cjs.softMaskToSelection; exports.solidPaint = _chunkPQ3H2AANcjs.solidPaint; exports.solidSurface = _chunk474IQG74cjs.solidSurface; exports.solveMembrane = _chunkMQDIP4CFcjs.solveMembrane; exports.spliceRuns = _chunkQAUIZPYIcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunkYF3YZZ6Gcjs.sponge; exports.spongeEffect = _chunkYF3YZZ6Gcjs.spongeEffect; exports.spotHealPixels = _chunkYF3YZZ6Gcjs.spotHealPixels; exports.spotHealWindow = _chunkYF3YZZ6Gcjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkKWNMBMKGcjs.srgbByteToLinear; exports.srgbDecode = _chunkOLNIPTB3cjs.srgbDecode; exports.srgbEncode = _chunkOLNIPTB3cjs.srgbEncode; exports.srgbToLinear = _chunkS55JFWDAcjs.srgbToLinear; exports.standardBlendMode = _chunkOLNIPTB3cjs.standardBlendMode; exports.startMarchingAnts = startMarchingAnts; exports.startSelectionWorker = _chunkUC3PWFM3cjs.startSelectionWorker; exports.stepSlotTs = _chunkKWNMBMKGcjs.stepSlotTs; exports.strokeGrainCatch = _chunkPQ3H2AANcjs.strokeGrainCatch; exports.styleAt = _chunkQAUIZPYIcjs.styleAt; exports.subpathsToSvgPath = subpathsToSvgPath; exports.sumHistograms = sumHistograms; exports.superpixelSaliency = _chunkUC3PWFM3cjs.superpixelSaliency; exports.surfaceBytes = _chunk474IQG74cjs.surfaceBytes; exports.surfaceDepth = _chunkOLNIPTB3cjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkOLNIPTB3cjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunk474IQG74cjs.surfaceFromPixels; exports.surfacesEqual = _chunk474IQG74cjs.surfacesEqual; exports.tempTintToXy = _chunkS55JFWDAcjs.tempTintToXy; exports.temperatureToKelvin = _chunkS55JFWDAcjs.temperatureToKelvin; exports.textIndexAt = _chunkQAUIZPYIcjs.textIndexAt; exports.textMatrix = _chunkS55JFWDAcjs.textMatrix; exports.textOrientation = _chunkS55JFWDAcjs.textOrientation; exports.textOutlines = _chunkS55JFWDAcjs.textOutlines; exports.textRange = _chunkS55JFWDAcjs.textRange; exports.tileCoord = _chunk474IQG74cjs.tileCoord; exports.tileKey = _chunk474IQG74cjs.tileKey; exports.tileRect = _chunk474IQG74cjs.tileRect; exports.tileSamples = _chunkOLNIPTB3cjs.tileSamples; exports.tileSamples16 = _chunkOLNIPTB3cjs.tileSamples16; exports.tileSamples32 = _chunkOLNIPTB3cjs.tileSamples32; exports.tilesInRect = _chunk474IQG74cjs.tilesInRect; exports.tipFalloff = _chunkPQ3H2AANcjs.tipFalloff; exports.tipReach = _chunkPQ3H2AANcjs.tipReach; exports.tipShape = _chunkPQ3H2AANcjs.tipShape; exports.to16From32 = _chunkOLNIPTB3cjs.to16From32; exports.to16From8 = _chunkOLNIPTB3cjs.to16From8; exports.to32From16 = _chunkOLNIPTB3cjs.to32From16; exports.to32From8 = _chunkOLNIPTB3cjs.to32From8; exports.to8From16 = _chunkOLNIPTB3cjs.to8From16; exports.to8From32 = _chunkOLNIPTB3cjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkS55JFWDAcjs.toTextSpace; exports.toneCurve = _chunkS55JFWDAcjs.toneCurve; exports.toneLuts = _chunkS55JFWDAcjs.toneLuts; exports.toneOf = _chunkYF3YZZ6Gcjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkS55JFWDAcjs.transformHomography; exports.transformMap = _chunkS55JFWDAcjs.transformMap; exports.transformShapeComponents = _chunkS55JFWDAcjs.transformShapeComponents; exports.transformSurface = _chunkB46UQUDCcjs.transformSurface; exports.transformTypeLayer = _chunkS55JFWDAcjs.transformTypeLayer; exports.transformVectorMask = _chunkS55JFWDAcjs.transformVectorMask; exports.transformedBounds = _chunkB46UQUDCcjs.transformedBounds; exports.transformedBox = _chunkS55JFWDAcjs.transformedBox; exports.transformedPoint = _chunkS55JFWDAcjs.transformedPoint; exports.translateLayer = _chunkS55JFWDAcjs.translateLayer; exports.translateSurface = _chunk474IQG74cjs.translateSurface; exports.typeAsPixelLayer = _chunkS55JFWDAcjs.typeAsPixelLayer; exports.typeFrame = _chunkS55JFWDAcjs.typeFrame; exports.typeFromAnnotation = _chunkS55JFWDAcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkS55JFWDAcjs.typeLayerName; exports.ungroupLayer = _chunkS55JFWDAcjs.ungroupLayer; exports.uniformTile = _chunk474IQG74cjs.uniformTile; exports.unionRect = _chunkS55JFWDAcjs.unionRect; exports.unprojectCanvasPoint = _chunkS55JFWDAcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkS55JFWDAcjs.updateLayerEffect; exports.updateLayerFilter = _chunkS55JFWDAcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkS55JFWDAcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkPQ3H2AANcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkS55JFWDAcjs.updateShapeLayer; exports.updateSmartFilter = _chunkS55JFWDAcjs.updateSmartFilter; exports.updateTypeLayer = _chunkS55JFWDAcjs.updateTypeLayer; exports.upscaleRegion = _chunkUC3PWFM3cjs.upscaleRegion; exports.userErrorMessage = _chunkS55JFWDAcjs.userErrorMessage; exports.uvToXy = _chunkS55JFWDAcjs.uvToXy; exports.validateEffectGradient = _chunkB46UQUDCcjs.validateEffectGradient; exports.validateLayerEffect = _chunkB46UQUDCcjs.validateLayerEffect; exports.validateLayerEffects = _chunkB46UQUDCcjs.validateLayerEffects; exports.vectorMaskBounds = _chunkS55JFWDAcjs.vectorMaskBounds; exports.vectorMaskCoverage = _chunkS55JFWDAcjs.vectorMaskCoverage; exports.vectorMaskThumbnail = _chunkS55JFWDAcjs.vectorMaskThumbnail; exports.vectorMaskThumbnailClick = vectorMaskThumbnailClick; exports.versionedDescriptorBytes = _chunkS55JFWDAcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkS55JFWDAcjs.vibranceLinear; exports.vibrancePixel = _chunkS55JFWDAcjs.vibrancePixel; exports.walkDabs = _chunkPQ3H2AANcjs.walkDabs; exports.warpMeshEditPoints = _chunkQAUIZPYIcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkQAUIZPYIcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkQAUIZPYIcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkQAUIZPYIcjs.warpPresetMesh; exports.warpSurface = _chunkB46UQUDCcjs.warpSurface; exports.watchCanvasViewport = watchCanvasViewport; exports.wbMatrix = _chunkS55JFWDAcjs.wbMatrix; exports.wetGpuSupport = _chunkKWNMBMKGcjs.wetGpuSupport; exports.wetSimdSupported = _chunkKWNMBMKGcjs.wetSimdSupported; exports.wetSupport = _chunkKWNMBMKGcjs.wetSupport; exports.whiteBalanceFromSample = _chunkS55JFWDAcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkS55JFWDAcjs.whiteBalanceMatrix; exports.withBackgroundOpacity = withBackgroundOpacity; exports.withFilterMaskSurface = _chunkS55JFWDAcjs.withFilterMaskSurface; exports.withImagePlayback = withImagePlayback; exports.withNewIds = _chunkS55JFWDAcjs.withNewIds; exports.workImage = _chunkUC3PWFM3cjs.workImage; exports.workLuma = _chunkUC3PWFM3cjs.workLuma; exports.workPlanes = _chunkUC3PWFM3cjs.workPlanes; exports.writeAdjustmentBlock = _chunkS55JFWDAcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkOLNIPTB3cjs.writeDeepRegion; exports.writeLfx2 = _chunkS55JFWDAcjs.writeLfx2; exports.writePatternBlock = _chunkS55JFWDAcjs.writePatternBlock; exports.writePsd = _chunkS55JFWDAcjs.writePsd; exports.writeRegion = _chunk474IQG74cjs.writeRegion; exports.xyToTempTint = _chunkS55JFWDAcjs.xyToTempTint; exports.xyToUv = _chunkS55JFWDAcjs.xyToUv;
|