@pixerate/editor 0.204.0 → 0.206.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 +41 -0
- package/dist/image-editor/controller.d.ts +41 -0
- package/dist/image-editor/index.cjs +574 -304
- package/dist/image-editor/index.js +296 -26
- package/dist/image-editor/selection/index.d.cts +1 -0
- package/dist/image-editor/selection/index.d.ts +1 -0
- package/dist/image-editor/selection/refine-edits.d.cts +41 -0
- package/dist/image-editor/selection/refine-edits.d.ts +41 -0
- package/dist/image-editor/selection/refine.d.cts +15 -4
- package/dist/image-editor/selection/refine.d.ts +15 -4
- package/dist/image-editor/selection/tool-options.d.cts +5 -0
- package/dist/image-editor/selection/tool-options.d.ts +5 -0
- package/package.json +1 -1
- package/skills/pixerate-image-editor/SKILL.md +1 -1
- package/skills/pixerate-image-selection-masking/SKILL.md +4 -1
|
@@ -4015,10 +4015,10 @@ function edgeWidth(guide, w, h, r) {
|
|
|
4015
4015
|
for (let i = 0; i < n; i++) out[i] = (hi[i] - lo[i]) / Math.max(gm[i], 1e-4);
|
|
4016
4016
|
return out;
|
|
4017
4017
|
}
|
|
4018
|
-
function refineCoverage(guide, m, w, h, params = {}) {
|
|
4018
|
+
function refineCoverage(guide, m, w, h, params = {}, band = null) {
|
|
4019
4019
|
const p = normalizeRefineEdgeParams(params);
|
|
4020
4020
|
let a = Float32Array.from(m);
|
|
4021
|
-
if (p.radius > 0 && guide) {
|
|
4021
|
+
if ((p.radius > 0 || band) && guide) {
|
|
4022
4022
|
const n = w * h;
|
|
4023
4023
|
const boundary = new Uint8Array(n);
|
|
4024
4024
|
let any = false;
|
|
@@ -4033,14 +4033,15 @@ function refineCoverage(guide, m, w, h, params = {}) {
|
|
|
4033
4033
|
}
|
|
4034
4034
|
}
|
|
4035
4035
|
}
|
|
4036
|
-
if (any) {
|
|
4036
|
+
if (any || band) {
|
|
4037
4037
|
const dist = _chunkUYXL6ZWQcjs.distanceTransform.call(void 0, boundary, w, h);
|
|
4038
|
-
const r = gfRadius(p);
|
|
4038
|
+
const r = band ? Math.max(4, gfRadius(p)) : gfRadius(p);
|
|
4039
4039
|
const q = guidedFilterColor(guide, m, w, h, r);
|
|
4040
4040
|
const widths = p.smartRadius ? edgeWidth(guide, w, h, r) : null;
|
|
4041
4041
|
for (let i = 0; i < n; i++) {
|
|
4042
4042
|
const reff = widths ? Math.min(Math.max(p.radius, 1.5), Math.max(1.5, widths[i])) : p.radius;
|
|
4043
|
-
const
|
|
4043
|
+
const edge = p.radius > 0 ? Math.min(1, Math.max(0, reff + 1 - dist[i])) : 0;
|
|
4044
|
+
const wgt = band ? Math.max(edge, Math.min(1, Math.max(0, band[i]))) : edge;
|
|
4044
4045
|
if (wgt > 0) {
|
|
4045
4046
|
const qi = Math.min(1, Math.max(0, q[i]));
|
|
4046
4047
|
a[i] = m[i] + (qi - m[i]) * wgt;
|
|
@@ -4081,17 +4082,24 @@ function guidePlanes(pixels, win) {
|
|
|
4081
4082
|
}
|
|
4082
4083
|
return [r, g, b];
|
|
4083
4084
|
}
|
|
4084
|
-
function refineSelection(pixels, mask, params = {}) {
|
|
4085
|
+
function refineSelection(pixels, mask, params = {}, refineBrush = null) {
|
|
4085
4086
|
const p = normalizeRefineEdgeParams(params);
|
|
4086
4087
|
if (pixels && (pixels.width !== mask.width || pixels.height !== mask.height)) {
|
|
4087
4088
|
throw new Error("Refine Edge needs pixels the size of the selection");
|
|
4088
4089
|
}
|
|
4089
4090
|
if (!mask.bounds) return mask;
|
|
4090
|
-
const
|
|
4091
|
-
const
|
|
4092
|
-
const
|
|
4093
|
-
|
|
4094
|
-
|
|
4091
|
+
const brush = _optionalChain([refineBrush, 'optionalAccess', _69 => _69.bounds]) ? refineBrush : null;
|
|
4092
|
+
const halo = refineEdgeHalo(p) + (brush ? 2 * Math.max(4, gfRadius(p)) : 0);
|
|
4093
|
+
const b = brush ? {
|
|
4094
|
+
x: Math.min(mask.bounds.x, brush.bounds.x),
|
|
4095
|
+
y: Math.min(mask.bounds.y, brush.bounds.y),
|
|
4096
|
+
r: Math.max(mask.bounds.x + mask.bounds.width, brush.bounds.x + brush.bounds.width),
|
|
4097
|
+
btm: Math.max(mask.bounds.y + mask.bounds.height, brush.bounds.y + brush.bounds.height)
|
|
4098
|
+
} : { x: mask.bounds.x, y: mask.bounds.y, r: mask.bounds.x + mask.bounds.width, btm: mask.bounds.y + mask.bounds.height };
|
|
4099
|
+
const x0 = Math.max(0, b.x - halo);
|
|
4100
|
+
const y0 = Math.max(0, b.y - halo);
|
|
4101
|
+
const x1 = Math.min(mask.width, b.r + halo);
|
|
4102
|
+
const y1 = Math.min(mask.height, b.btm + halo);
|
|
4095
4103
|
const ww = x1 - x0;
|
|
4096
4104
|
const wh = y1 - y0;
|
|
4097
4105
|
const m = new Float32Array(ww * wh);
|
|
@@ -4099,8 +4107,17 @@ function refineSelection(pixels, mask, params = {}) {
|
|
|
4099
4107
|
const src = (y0 + y) * mask.width + x0;
|
|
4100
4108
|
for (let x = 0; x < ww; x++) m[y * ww + x] = mask.data[src + x] / 255;
|
|
4101
4109
|
}
|
|
4102
|
-
const guide = pixels && p.radius > 0 ? guidePlanes(pixels, { x: x0, y: y0, width: ww, height: wh }) : null;
|
|
4103
|
-
|
|
4110
|
+
const guide = pixels && (p.radius > 0 || brush) ? guidePlanes(pixels, { x: x0, y: y0, width: ww, height: wh }) : null;
|
|
4111
|
+
let band = null;
|
|
4112
|
+
if (brush) {
|
|
4113
|
+
band = new Float32Array(ww * wh);
|
|
4114
|
+
const bd = brush.data;
|
|
4115
|
+
for (let y = 0; y < wh; y++) {
|
|
4116
|
+
const src = (y0 + y) * mask.width + x0;
|
|
4117
|
+
for (let x = 0; x < ww; x++) band[y * ww + x] = bd[src + x] / 255;
|
|
4118
|
+
}
|
|
4119
|
+
}
|
|
4120
|
+
const refined = refineCoverage(guide, m, ww, wh, p, band);
|
|
4104
4121
|
const out = new Uint8Array(mask.width * mask.height);
|
|
4105
4122
|
for (let y = 0; y < wh; y++) {
|
|
4106
4123
|
const dst = (y0 + y) * mask.width + x0;
|
|
@@ -4108,6 +4125,49 @@ function refineSelection(pixels, mask, params = {}) {
|
|
|
4108
4125
|
}
|
|
4109
4126
|
return _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, mask.width, mask.height, out);
|
|
4110
4127
|
}
|
|
4128
|
+
function decontaminateColors(rgba, coverage, w, h, amount, radius = 8) {
|
|
4129
|
+
const out = Uint8ClampedArray.from(rgba);
|
|
4130
|
+
const n = w * h;
|
|
4131
|
+
const k = Math.min(1, Math.max(0, amount));
|
|
4132
|
+
if (k === 0) return out;
|
|
4133
|
+
const r = Math.max(2, Math.round(radius));
|
|
4134
|
+
const fgW = new Float32Array(n);
|
|
4135
|
+
const bgW = new Float32Array(n);
|
|
4136
|
+
for (let i = 0; i < n; i++) {
|
|
4137
|
+
fgW[i] = coverage[i] >= 250 ? 1 : 0;
|
|
4138
|
+
bgW[i] = coverage[i] <= 5 ? 1 : 0;
|
|
4139
|
+
}
|
|
4140
|
+
const meanOf = (weights, radiusPx) => {
|
|
4141
|
+
const wm = boxMean(weights, w, h, radiusPx);
|
|
4142
|
+
const planes = [0, 1, 2].map((c) => {
|
|
4143
|
+
const v = new Float32Array(n);
|
|
4144
|
+
for (let i = 0; i < n; i++) v[i] = rgba[i * 4 + c] * weights[i];
|
|
4145
|
+
const m = boxMean(v, w, h, radiusPx);
|
|
4146
|
+
for (let i = 0; i < n; i++) m[i] = wm[i] > 1e-6 ? m[i] / wm[i] : NaN;
|
|
4147
|
+
return m;
|
|
4148
|
+
});
|
|
4149
|
+
return { weight: wm, planes };
|
|
4150
|
+
};
|
|
4151
|
+
const fg = meanOf(fgW, r);
|
|
4152
|
+
const fgWide = meanOf(fgW, r * 3);
|
|
4153
|
+
const bg = meanOf(bgW, r);
|
|
4154
|
+
for (let i = 0; i < n; i++) {
|
|
4155
|
+
const c = coverage[i];
|
|
4156
|
+
if (c <= 5 || c >= 250) continue;
|
|
4157
|
+
const a = c / 255;
|
|
4158
|
+
for (let ch = 0; ch < 3; ch++) {
|
|
4159
|
+
const C = rgba[i * 4 + ch];
|
|
4160
|
+
const B = bg.planes[ch][i];
|
|
4161
|
+
const Fm = Number.isNaN(fg.planes[ch][i]) ? fgWide.planes[ch][i] : fg.planes[ch][i];
|
|
4162
|
+
let F;
|
|
4163
|
+
if (a >= 0.5 && !Number.isNaN(B)) F = (C - (1 - a) * B) / a;
|
|
4164
|
+
else if (!Number.isNaN(Fm)) F = Fm;
|
|
4165
|
+
else F = C;
|
|
4166
|
+
out[i * 4 + ch] = Math.round(C + k * (Math.min(255, Math.max(0, F)) - C));
|
|
4167
|
+
}
|
|
4168
|
+
}
|
|
4169
|
+
return out;
|
|
4170
|
+
}
|
|
4111
4171
|
|
|
4112
4172
|
// src/image-editor/selection/segment/guided.ts
|
|
4113
4173
|
function workPlanes(work) {
|
|
@@ -4446,11 +4506,11 @@ function applyShapeOptions(controller, layerId, change) {
|
|
|
4446
4506
|
const style = {};
|
|
4447
4507
|
if ("fill" in change) style.fill = _nullishCoalesce(change.fill, () => ( null));
|
|
4448
4508
|
if ("stroke" in change || "strokeWidth" in change) {
|
|
4449
|
-
const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access',
|
|
4450
|
-
style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access',
|
|
4509
|
+
const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access', _70 => _70.stroke, 'optionalAccess', _71 => _71.paint, 'access', _72 => _72.type]) === "color" ? info.stroke.paint.color : null;
|
|
4510
|
+
style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access', _73 => _73.stroke, 'optionalAccess', _74 => _74.width]))), () => ( 2)), paint: color } : null;
|
|
4451
4511
|
}
|
|
4452
4512
|
if (Object.keys(style).length) controller.setShapeStyle(layerId, style);
|
|
4453
|
-
const live = _optionalChain([info, 'access',
|
|
4513
|
+
const live = _optionalChain([info, 'access', _75 => _75.components, 'access', _76 => _76[0], 'optionalAccess', _77 => _77.live]);
|
|
4454
4514
|
if (!live) return;
|
|
4455
4515
|
const shape = {};
|
|
4456
4516
|
if (live.kind === "rect" && change.radius !== void 0) shape.radius = change.radius;
|
|
@@ -4476,7 +4536,7 @@ var TextEditSession = (_class8 = class {
|
|
|
4476
4536
|
__init42() {this.listeners = /* @__PURE__ */ new Set()}
|
|
4477
4537
|
__init43() {this.error = null}
|
|
4478
4538
|
get layer() {
|
|
4479
|
-
const l = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess',
|
|
4539
|
+
const l = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _78 => _78.layer]);
|
|
4480
4540
|
if (!l || l.type !== "type") throw new Error("The type layer being edited is gone.");
|
|
4481
4541
|
return l;
|
|
4482
4542
|
}
|
|
@@ -4491,7 +4551,7 @@ var TextEditSession = (_class8 = class {
|
|
|
4491
4551
|
}
|
|
4492
4552
|
/** Whether the layer still exists (it can be deleted or undone away while editing). */
|
|
4493
4553
|
get alive() {
|
|
4494
|
-
return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess',
|
|
4554
|
+
return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _79 => _79.layer, 'access', _80 => _80.type]) === "type";
|
|
4495
4555
|
}
|
|
4496
4556
|
subscribe(fn) {
|
|
4497
4557
|
this.listeners.add(fn);
|
|
@@ -4779,7 +4839,7 @@ var TypeToolGesture = (_class9 = class {
|
|
|
4779
4839
|
finish() {
|
|
4780
4840
|
const s = this.session;
|
|
4781
4841
|
this.session = null;
|
|
4782
|
-
_optionalChain([s, 'optionalAccess',
|
|
4842
|
+
_optionalChain([s, 'optionalAccess', _81 => _81.close, 'call', _82 => _82()]);
|
|
4783
4843
|
}
|
|
4784
4844
|
}, _class9);
|
|
4785
4845
|
|
|
@@ -5248,7 +5308,7 @@ function segmentToSelection(width, height, result) {
|
|
|
5248
5308
|
const sized = raw.width === width && raw.height === height ? raw : _chunkUYXL6ZWQcjs.resizeSelection.call(void 0, raw, width, height);
|
|
5249
5309
|
out = _chunkUYXL6ZWQcjs.combineSelections.call(void 0, out, sized, "add");
|
|
5250
5310
|
}
|
|
5251
|
-
return _optionalChain([out, 'optionalAccess',
|
|
5311
|
+
return _optionalChain([out, 'optionalAccess', _83 => _83.bounds]) ? out : null;
|
|
5252
5312
|
}
|
|
5253
5313
|
function segmentsToSelection(width, height, results) {
|
|
5254
5314
|
let out = null;
|
|
@@ -5259,6 +5319,66 @@ function segmentsToSelection(width, height, results) {
|
|
|
5259
5319
|
return out;
|
|
5260
5320
|
}
|
|
5261
5321
|
|
|
5322
|
+
// src/image-editor/selection/refine-edits.ts
|
|
5323
|
+
var REFINE_EDIT_KINDS = ["quick-select", "brush", "refine-brush"];
|
|
5324
|
+
function brushStrokeMask(width, height, points, size, hardness = 1) {
|
|
5325
|
+
const r = Math.max(0.5, size / 2);
|
|
5326
|
+
const solid = r * Math.min(1, Math.max(0, hardness));
|
|
5327
|
+
let x0 = Infinity, y0 = Infinity, x1 = -Infinity, y1 = -Infinity;
|
|
5328
|
+
for (const p of points) {
|
|
5329
|
+
x0 = Math.min(x0, p.x);
|
|
5330
|
+
y0 = Math.min(y0, p.y);
|
|
5331
|
+
x1 = Math.max(x1, p.x);
|
|
5332
|
+
y1 = Math.max(y1, p.y);
|
|
5333
|
+
}
|
|
5334
|
+
const bx = Math.max(0, Math.floor(x0 - r - 1));
|
|
5335
|
+
const by = Math.max(0, Math.floor(y0 - r - 1));
|
|
5336
|
+
const bw = Math.min(width, Math.ceil(x1 + r + 1)) - bx;
|
|
5337
|
+
const bh = Math.min(height, Math.ceil(y1 + r + 1)) - by;
|
|
5338
|
+
if (!(bw > 0 && bh > 0)) return _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, width, height);
|
|
5339
|
+
const out = new Uint8Array(bw * bh);
|
|
5340
|
+
const segs = points.length === 1 ? [[points[0], points[0]]] : points.slice(1).map((p, i) => [points[i], p]);
|
|
5341
|
+
for (let y = 0; y < bh; y++) {
|
|
5342
|
+
for (let x = 0; x < bw; x++) {
|
|
5343
|
+
const px2 = bx + x + 0.5;
|
|
5344
|
+
const py = by + y + 0.5;
|
|
5345
|
+
let d = Infinity;
|
|
5346
|
+
for (const [a, b] of segs) {
|
|
5347
|
+
const dx = b.x - a.x;
|
|
5348
|
+
const dy = b.y - a.y;
|
|
5349
|
+
const len2 = dx * dx + dy * dy;
|
|
5350
|
+
const t = len2 > 0 ? Math.min(1, Math.max(0, ((px2 - a.x) * dx + (py - a.y) * dy) / len2)) : 0;
|
|
5351
|
+
d = Math.min(d, Math.hypot(px2 - a.x - t * dx, py - a.y - t * dy));
|
|
5352
|
+
}
|
|
5353
|
+
let v = d <= solid ? 1 : solid >= r ? 0 : 1 - (d - solid) / (r - solid);
|
|
5354
|
+
v = Math.min(v, Math.min(1, Math.max(0, r + 0.5 - d)));
|
|
5355
|
+
out[y * bw + x] = Math.round(Math.max(0, v) * 255);
|
|
5356
|
+
}
|
|
5357
|
+
}
|
|
5358
|
+
return _chunkUYXL6ZWQcjs.selectionFromRegion.call(void 0, width, height, { x: bx, y: by, width: bw, height: bh }, out);
|
|
5359
|
+
}
|
|
5360
|
+
function applyRefineEdits(pixels, selection, edits, width, height) {
|
|
5361
|
+
let sel = _optionalChain([selection, 'optionalAccess', _84 => _84.bounds]) ? selection : null;
|
|
5362
|
+
let band = null;
|
|
5363
|
+
for (const e of edits) {
|
|
5364
|
+
if (!e.points.length) throw new Error(`A ${e.kind} stroke needs at least one point.`);
|
|
5365
|
+
if (e.kind === "refine-brush") {
|
|
5366
|
+
band = _chunkUYXL6ZWQcjs.combineSelections.call(void 0, band, brushStrokeMask(width, height, e.points, _nullishCoalesce(e.size, () => ( 40))), "add");
|
|
5367
|
+
continue;
|
|
5368
|
+
}
|
|
5369
|
+
const mode = _nullishCoalesce(e.mode, () => ( "add"));
|
|
5370
|
+
let region;
|
|
5371
|
+
if (e.kind === "quick-select") {
|
|
5372
|
+
if (!pixels) throw new Error("Quick Selection strokes need the image pixels.");
|
|
5373
|
+
region = quickSelectStroke(pixels, e.points, { size: e.size, selection: sel, grow: mode === "add" });
|
|
5374
|
+
} else {
|
|
5375
|
+
region = brushStrokeMask(width, height, e.points, _nullishCoalesce(e.size, () => ( 20)), _nullishCoalesce(e.hardness, () => ( 1)));
|
|
5376
|
+
}
|
|
5377
|
+
sel = _chunkUYXL6ZWQcjs.combineSelections.call(void 0, sel, region, mode);
|
|
5378
|
+
}
|
|
5379
|
+
return { selection: sel, refineBrush: band };
|
|
5380
|
+
}
|
|
5381
|
+
|
|
5262
5382
|
// src/image-editor/selection/stroke.ts
|
|
5263
5383
|
function selectionRing(sel, width, location) {
|
|
5264
5384
|
const half = location === "center" ? width / 2 : width;
|
|
@@ -5297,7 +5417,7 @@ function deserializeChannels(value, size, problems = []) {
|
|
|
5297
5417
|
visible: v.visible === true
|
|
5298
5418
|
});
|
|
5299
5419
|
} catch (err) {
|
|
5300
|
-
problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess',
|
|
5420
|
+
problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess', _85 => _85.name]), () => ( "?")))}" could not be read: ${err instanceof Error ? err.message : String(err)}.`);
|
|
5301
5421
|
}
|
|
5302
5422
|
}
|
|
5303
5423
|
return out;
|
|
@@ -5335,16 +5455,16 @@ function checkEffectTime(time) {
|
|
|
5335
5455
|
return time;
|
|
5336
5456
|
}
|
|
5337
5457
|
function checkEffectAnimation(animate) {
|
|
5338
|
-
const duration = _optionalChain([animate, 'optionalAccess',
|
|
5458
|
+
const duration = _optionalChain([animate, 'optionalAccess', _86 => _86.duration]);
|
|
5339
5459
|
if (!(typeof duration === "number" && Number.isFinite(duration) && duration > 0 && duration <= _chunkUYXL6ZWQcjs.MAX_EFFECT_ANIMATION_MS)) {
|
|
5340
5460
|
throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`animate.duration must be more than 0 and at most ${_chunkUYXL6ZWQcjs.MAX_EFFECT_ANIMATION_MS} ms.`);
|
|
5341
5461
|
}
|
|
5342
5462
|
return { duration: Math.round(duration) };
|
|
5343
5463
|
}
|
|
5344
5464
|
function effectLayerTiming(g, d) {
|
|
5345
|
-
if (!_optionalChain([d, 'optionalAccess',
|
|
5465
|
+
if (!_optionalChain([d, 'optionalAccess', _87 => _87.duration])) return null;
|
|
5346
5466
|
const time = _nullishCoalesce(g.time, () => ( 0));
|
|
5347
|
-
return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access',
|
|
5467
|
+
return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access', _88 => _88.animate, 'optionalAccess', _89 => _89.duration]), () => ( d.duration)), loops: d.loop };
|
|
5348
5468
|
}
|
|
5349
5469
|
|
|
5350
5470
|
// src/image-editor/effects.ts
|
|
@@ -5597,14 +5717,14 @@ var FreeTransformSession = (_class11 = class {
|
|
|
5597
5717
|
if (init.interpolation !== void 0 && !_chunkHGTDMKNEcjs.isInterpolation.call(void 0, init.interpolation)) fail(`Unknown interpolation "${String(init.interpolation)}"; use nearest, bilinear or bicubic.`);
|
|
5598
5718
|
this.interp = _nullishCoalesce(init.interpolation, () => ( "bicubic"));
|
|
5599
5719
|
const sel = host.selection();
|
|
5600
|
-
const selected = Boolean(_optionalChain([sel, 'optionalAccess',
|
|
5720
|
+
const selected = Boolean(_optionalChain([sel, 'optionalAccess', _90 => _90.bounds]));
|
|
5601
5721
|
let content = _nullishCoalesce(init.content, () => ( "auto"));
|
|
5602
5722
|
if (!["auto", "layer", "selection", "selection-copy", "selection-outline"].includes(content)) {
|
|
5603
5723
|
fail(`Unknown content "${String(content)}"; use auto, layer, selection, selection-copy or selection-outline.`);
|
|
5604
5724
|
}
|
|
5605
5725
|
const targetId = _nullishCoalesce(init.layerId, () => ( host.activeLayerId()));
|
|
5606
|
-
const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess',
|
|
5607
|
-
const smartTarget = (_optionalChain([target, 'optionalAccess',
|
|
5726
|
+
const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess', _91 => _91.layer]) : void 0;
|
|
5727
|
+
const smartTarget = (_optionalChain([target, 'optionalAccess', _92 => _92.type]) === "smart" || _optionalChain([target, 'optionalAccess', _93 => _93.type]) === "shape" || _optionalChain([target, 'optionalAccess', _94 => _94.type]) === "type") && (_nullishCoalesce(init.channel, () => ( (target.id === host.activeLayerId() ? host.activeTarget() : "pixels")))) !== "mask";
|
|
5608
5728
|
if (content === "auto") content = selected && !smartTarget ? "selection" : "layer";
|
|
5609
5729
|
this.content = content;
|
|
5610
5730
|
if (content !== "layer" && !selected) fail(`Nothing is selected; ${content} needs a selection. Select first, or use content layer.`);
|
|
@@ -5628,9 +5748,9 @@ var FreeTransformSession = (_class11 = class {
|
|
|
5628
5748
|
const mask = layer.mask && !layer.mask.source ? layer.mask : void 0;
|
|
5629
5749
|
const channel = _nullishCoalesce(init.channel, () => ( (layer.id === host.activeLayerId() ? host.activeTarget() : "pixels")));
|
|
5630
5750
|
if (channel !== "pixels" && channel !== "mask") fail(`Unknown channel "${String(channel)}"; use pixels or mask.`);
|
|
5631
|
-
const linked = _optionalChain([mask, 'optionalAccess',
|
|
5751
|
+
const linked = _optionalChain([mask, 'optionalAccess', _95 => _95.linked]) !== false;
|
|
5632
5752
|
const maskAlone = channel === "mask" && (!linked || layer.type !== "pixel");
|
|
5633
|
-
if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access',
|
|
5753
|
+
if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access', _96 => _96.mask, 'optionalAccess', _97 => _97.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.`);
|
|
5634
5754
|
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.`);
|
|
5635
5755
|
if (!layer.visible && content !== "selection-copy") fail(`Layer "${layer.name || id}" is hidden; show it before you transform it.`);
|
|
5636
5756
|
if (content !== "selection-copy") {
|
|
@@ -5733,7 +5853,7 @@ var FreeTransformSession = (_class11 = class {
|
|
|
5733
5853
|
};
|
|
5734
5854
|
this.copyId = copy.id;
|
|
5735
5855
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, layer.id);
|
|
5736
|
-
this.startLayers = _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
5856
|
+
this.startLayers = _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _98 => _98.parent, 'optionalAccess', _99 => _99.id]), () => ( null)), loc.index + 1);
|
|
5737
5857
|
this.parts.push({ what: "pixels", offset: o, moving: lifted, base: null, reduced: /* @__PURE__ */ new Map() });
|
|
5738
5858
|
moves.push("pixels");
|
|
5739
5859
|
}
|
|
@@ -5842,7 +5962,7 @@ var FreeTransformSession = (_class11 = class {
|
|
|
5842
5962
|
moveVectorMask(layers) {
|
|
5843
5963
|
const g = this.geometryValue;
|
|
5844
5964
|
if (!this.layerId || this.copyId || !this.moves.includes("pixels") || _chunkUYXL6ZWQcjs.isIdentityTransform.call(void 0, g)) return layers;
|
|
5845
|
-
const vm = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess',
|
|
5965
|
+
const vm = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess', _100 => _100.layer, 'access', _101 => _101.vectorMask]);
|
|
5846
5966
|
if (!vm || vm.linked === false) return layers;
|
|
5847
5967
|
const warp = _chunkUYXL6ZWQcjs.hasWarp.call(void 0, g);
|
|
5848
5968
|
const f = warp ? _chunkUYXL6ZWQcjs.transformMap.call(void 0, g) : null;
|
|
@@ -6013,11 +6133,11 @@ var FreeTransformSession = (_class11 = class {
|
|
|
6013
6133
|
result(changed, layers, selection) {
|
|
6014
6134
|
let bounds = null;
|
|
6015
6135
|
const id = _nullishCoalesce(this.copyId, () => ( this.layerId));
|
|
6016
|
-
const layer = id ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, id), 'optionalAccess',
|
|
6017
|
-
if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess',
|
|
6018
|
-
else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess',
|
|
6019
|
-
else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess',
|
|
6020
|
-
else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess',
|
|
6136
|
+
const layer = id ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _102 => _102.layer]) : void 0;
|
|
6137
|
+
if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess', _103 => _103.type]) === "pixel") bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, this.host.pixelsOf(layer)), layer.offset);
|
|
6138
|
+
else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess', _104 => _104.type]) === "smart" || _optionalChain([layer, 'optionalAccess', _105 => _105.type]) === "shape" || _optionalChain([layer, 'optionalAccess', _106 => _106.type]) === "type")) bounds = _chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.surface);
|
|
6139
|
+
else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess', _107 => _107.mask])) bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.mask.surface), layer.type === "pixel" ? layer.offset : { x: 0, y: 0 });
|
|
6140
|
+
else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess', _108 => _108.bounds]) ? { ...selection.bounds } : null;
|
|
6021
6141
|
return {
|
|
6022
6142
|
layerId: _nullishCoalesce(this.copyId, () => ( this.layerId)),
|
|
6023
6143
|
content: this.content,
|
|
@@ -6046,7 +6166,7 @@ function deserializeColorMode(raw, problems) {
|
|
|
6046
6166
|
}
|
|
6047
6167
|
function effectiveProof(proof, mode) {
|
|
6048
6168
|
if (proof) return proof;
|
|
6049
|
-
if (_optionalChain([mode, 'optionalAccess',
|
|
6169
|
+
if (_optionalChain([mode, 'optionalAccess', _109 => _109.mode]) === "cmyk") return { ...DEFAULT_PROOF, profile: mode.profile, intent: mode.intent };
|
|
6050
6170
|
return null;
|
|
6051
6171
|
}
|
|
6052
6172
|
function colorModePlanes(doc, mode) {
|
|
@@ -6101,7 +6221,7 @@ function resolveProfile(doc) {
|
|
|
6101
6221
|
return p;
|
|
6102
6222
|
}
|
|
6103
6223
|
function profileBytes(doc) {
|
|
6104
|
-
if (_optionalChain([doc, 'optionalAccess',
|
|
6224
|
+
if (_optionalChain([doc, 'optionalAccess', _110 => _110.icc])) return doc.icc;
|
|
6105
6225
|
const p = resolveProfile(doc);
|
|
6106
6226
|
return _nullishCoalesce(p.bytes, () => ( _chunkBROJYMWUcjs.encodeProfile.call(void 0, p)));
|
|
6107
6227
|
}
|
|
@@ -6263,7 +6383,7 @@ function paintCoverageInto(base, coverage, apply, rects, depth = null) {
|
|
|
6263
6383
|
else tiles.delete(key);
|
|
6264
6384
|
continue;
|
|
6265
6385
|
}
|
|
6266
|
-
const src = _nullishCoalesce(_optionalChain([base, 'access',
|
|
6386
|
+
const src = _nullishCoalesce(_optionalChain([base, 'access', _111 => _111.tiles, 'access', _112 => _112.get, 'call', _113 => _113(key), 'optionalAccess', _114 => _114.data]), () => ( defaultTile(base)));
|
|
6267
6387
|
const data = _chunkEBDCRTZIcjs.applyStrokeToTile.call(void 0, coverage, src, base.channels, t.tx, t.ty, apply);
|
|
6268
6388
|
const tile = _chunkCWM3CUUXcjs.finishTile.call(void 0, data, base.channels, base.defaultValue);
|
|
6269
6389
|
if (tile) tiles.set(key, tile);
|
|
@@ -6376,7 +6496,7 @@ var PaintStrokeSession = (_class12 = class {
|
|
|
6376
6496
|
writeTile: (tx, ty) => {
|
|
6377
6497
|
const key = _chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty);
|
|
6378
6498
|
if (!this.touched.has(key)) {
|
|
6379
|
-
this.work.set(key, _nullishCoalesce(_optionalChain([read, 'call',
|
|
6499
|
+
this.work.set(key, _nullishCoalesce(_optionalChain([read, 'call', _115 => _115(key), 'optionalAccess', _116 => _116.slice, 'call', _117 => _117()]), () => ( new Float32Array(_chunkCWM3CUUXcjs.TILE * _chunkCWM3CUUXcjs.TILE * 4))));
|
|
6380
6500
|
this.touched.add(key);
|
|
6381
6501
|
}
|
|
6382
6502
|
this.fresh.add(key);
|
|
@@ -6388,11 +6508,11 @@ var PaintStrokeSession = (_class12 = class {
|
|
|
6388
6508
|
offset: a.offset,
|
|
6389
6509
|
lockTransparency: a.lockTransparency,
|
|
6390
6510
|
selection: a.selection,
|
|
6391
|
-
readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
6511
|
+
readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access', _118 => _118.live, 'access', _119 => _119.get, 'call', _120 => _120(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _121 => _121.data]), () => ( (this.base.defaultValue ? defaultTile(this.base) : null))),
|
|
6392
6512
|
writeTile: (tx, ty) => {
|
|
6393
6513
|
const key = _chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty);
|
|
6394
6514
|
if (!this.touched.has(key)) {
|
|
6395
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
6515
|
+
const src = _nullishCoalesce(_optionalChain([this, 'access', _122 => _122.base, 'access', _123 => _123.tiles, 'access', _124 => _124.get, 'call', _125 => _125(key), 'optionalAccess', _126 => _126.data]), () => ( defaultTile(this.base)));
|
|
6396
6516
|
this.live.set(key, { data: new Uint8ClampedArray(src), uniform: null });
|
|
6397
6517
|
this.touched.add(key);
|
|
6398
6518
|
}
|
|
@@ -6409,11 +6529,11 @@ var PaintStrokeSession = (_class12 = class {
|
|
|
6409
6529
|
if (this.closed || !points.length) return;
|
|
6410
6530
|
if (!this.started) {
|
|
6411
6531
|
this.started = true;
|
|
6412
|
-
if (_optionalChain([this, 'access',
|
|
6532
|
+
if (_optionalChain([this, 'access', _127 => _127.retouch, 'optionalAccess', _128 => _128.kind]) === "coverage") this.retouch.start(points[0]);
|
|
6413
6533
|
}
|
|
6414
6534
|
this.last = points[points.length - 1];
|
|
6415
6535
|
const rects = this.mixer ? this.mixer.push(points) : this.stroke.push(points);
|
|
6416
|
-
_optionalChain([this, 'access',
|
|
6536
|
+
_optionalChain([this, 'access', _129 => _129.flushView, 'optionalCall', _130 => _130()]);
|
|
6417
6537
|
this.update(rects);
|
|
6418
6538
|
}
|
|
6419
6539
|
update(rects) {
|
|
@@ -6443,7 +6563,7 @@ var PaintStrokeSession = (_class12 = class {
|
|
|
6443
6563
|
for (const [key, { tx, ty, r }] of regions) {
|
|
6444
6564
|
if (this.deep) {
|
|
6445
6565
|
const rt = this.retouch;
|
|
6446
|
-
const paint = _optionalChain([rt, 'optionalAccess',
|
|
6566
|
+
const paint = _optionalChain([rt, 'optionalAccess', _131 => _131.kind]) === "coverage" ? rt.paint() : null;
|
|
6447
6567
|
if (paint && paint.kind !== "tone") {
|
|
6448
6568
|
const prevWork = this.touched.has(key) ? this.work.get(key) : void 0;
|
|
6449
6569
|
this.touched.add(key);
|
|
@@ -6454,13 +6574,13 @@ var PaintStrokeSession = (_class12 = class {
|
|
|
6454
6574
|
const prev2 = this.touched.has(key) ? this.liveDeep.get(key) : void 0;
|
|
6455
6575
|
this.touched.add(key);
|
|
6456
6576
|
const opts = prev2 ? { into: prev2, region: r, channels: ch } : { channels: ch };
|
|
6457
|
-
const d = _optionalChain([rt, 'optionalAccess',
|
|
6577
|
+
const d = _optionalChain([rt, 'optionalAccess', _132 => _132.kind]) === "coverage" && _optionalChain([paint, 'optionalAccess', _133 => _133.kind]) === "tone" ? _chunk7NW46N7Icjs.applyToneToDeepTile.call(void 0, stroke.coverage, src2, tx, ty, paint.tone, rt.apply, opts) : _chunkEBDCRTZIcjs.applyStrokeToDeepTile.call(void 0, stroke.coverage, src2, tx, ty, this.apply, opts);
|
|
6458
6578
|
this.liveDeep.set(key, d);
|
|
6459
6579
|
this.live.set(key, { data: _chunkCWM3CUUXcjs.proxyOf.call(void 0, d, ch), uniform: null, deep: d });
|
|
6460
6580
|
continue;
|
|
6461
6581
|
}
|
|
6462
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
6463
|
-
const prev = this.touched.has(key) ? _optionalChain([this, 'access',
|
|
6582
|
+
const src = _nullishCoalesce(_optionalChain([this, 'access', _134 => _134.base, 'access', _135 => _135.tiles, 'access', _136 => _136.get, 'call', _137 => _137(key), 'optionalAccess', _138 => _138.data]), () => ( defaultTile(this.base)));
|
|
6583
|
+
const prev = this.touched.has(key) ? _optionalChain([this, 'access', _139 => _139.live, 'access', _140 => _140.get, 'call', _141 => _141(key), 'optionalAccess', _142 => _142.data]) : void 0;
|
|
6464
6584
|
this.touched.add(key);
|
|
6465
6585
|
const data = this.compositeTile(src, tx, ty, prev ? { into: prev, region: r } : {});
|
|
6466
6586
|
this.live.set(key, { data, uniform: null });
|
|
@@ -6472,12 +6592,12 @@ var PaintStrokeSession = (_class12 = class {
|
|
|
6472
6592
|
if (this.closed) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("This stroke has already ended.");
|
|
6473
6593
|
const last = _nullishCoalesce(this.last, () => ( void 0));
|
|
6474
6594
|
const rects = this.mixer ? this.mixer.finish(last) : this.stroke.finish(last);
|
|
6475
|
-
_optionalChain([this, 'access',
|
|
6595
|
+
_optionalChain([this, 'access', _143 => _143.flushView, 'optionalCall', _144 => _144()]);
|
|
6476
6596
|
this.update(rects);
|
|
6477
6597
|
this.closed = true;
|
|
6478
6598
|
const ch = this.base.channels;
|
|
6479
6599
|
const r = this.retouch;
|
|
6480
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
6600
|
+
if (_optionalChain([r, 'optionalAccess', _145 => _145.kind]) === "coverage" && r.finalPaint) {
|
|
6481
6601
|
const final = r.finalPaint(this.stroke.coverage);
|
|
6482
6602
|
if (final) {
|
|
6483
6603
|
for (const key of this.touched) {
|
|
@@ -6486,7 +6606,7 @@ var PaintStrokeSession = (_class12 = class {
|
|
|
6486
6606
|
this.retouchDeepTile(key, tx, ty, final, {});
|
|
6487
6607
|
continue;
|
|
6488
6608
|
}
|
|
6489
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
6609
|
+
const src = _nullishCoalesce(_optionalChain([this, 'access', _146 => _146.base, 'access', _147 => _147.tiles, 'access', _148 => _148.get, 'call', _149 => _149(key), 'optionalAccess', _150 => _150.data]), () => ( defaultTile(this.base)));
|
|
6490
6610
|
this.live.set(key, { data: this.compositeTile(src, tx, ty, {}, final), uniform: null });
|
|
6491
6611
|
}
|
|
6492
6612
|
}
|
|
@@ -6508,7 +6628,7 @@ var PaintStrokeSession = (_class12 = class {
|
|
|
6508
6628
|
const b = this.mixer ? this.mixer.bounds : this.stroke.coverage.bounds;
|
|
6509
6629
|
const result = { layerId: this.target.id, channel: this.target.channel, bounds: changed ? b : null, dabs: (_nullishCoalesce(this.mixer, () => ( this.stroke))).dabCount };
|
|
6510
6630
|
if (mixerLoad) result.mixerLoad = mixerLoad;
|
|
6511
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
6631
|
+
if (_optionalChain([r, 'optionalAccess', _151 => _151.result])) Object.assign(result, r.result());
|
|
6512
6632
|
return result;
|
|
6513
6633
|
}
|
|
6514
6634
|
/** Abandons the stroke and restores the layer. */
|
|
@@ -6634,14 +6754,14 @@ function migrateSerializedImageEditorState(data) {
|
|
|
6634
6754
|
const legacy = data;
|
|
6635
6755
|
const adjustments = normalizeStoredAdjustments(legacy.adjustments);
|
|
6636
6756
|
return {
|
|
6637
|
-
version: _optionalChain([adjustments, 'access',
|
|
6757
|
+
version: _optionalChain([adjustments, 'access', _152 => _152.layers, 'optionalAccess', _153 => _153.length]) ? 2 : 1,
|
|
6638
6758
|
crop: legacy.crop ? { ...legacy.crop } : null,
|
|
6639
6759
|
transform: { ...DEFAULT_TRANSFORM, ...legacy.transform },
|
|
6640
6760
|
adjustments: serializeAdjustments(adjustments),
|
|
6641
6761
|
depthMask: {
|
|
6642
6762
|
...DEFAULT_DEPTH_MASK,
|
|
6643
6763
|
...legacy.depthMask,
|
|
6644
|
-
depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access',
|
|
6764
|
+
depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _154 => _154.depthMask, 'optionalAccess', _155 => _155.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
|
|
6645
6765
|
},
|
|
6646
6766
|
annotations: JSON.parse(JSON.stringify(_nullishCoalesce(legacy.annotations, () => ( [])))),
|
|
6647
6767
|
...legacy.selection ? { selection: { ...legacy.selection } } : {}
|
|
@@ -6717,7 +6837,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
6717
6837
|
sourceIsOpaque: () => this.sourceIsOpaque(),
|
|
6718
6838
|
version: () => `${this.sourceVersion()}:${this.patternsVersion()}`,
|
|
6719
6839
|
globalLight: () => this.state.globalLight,
|
|
6720
|
-
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
6840
|
+
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _156 => _156.state, 'access', _157 => _157.patterns, 'optionalAccess', _158 => _158.find, 'call', _159 => _159((p) => p.id === id)]), () => ( null))
|
|
6721
6841
|
};
|
|
6722
6842
|
this.state = {
|
|
6723
6843
|
sourceUrl: typeof options.image === "string" ? options.image : null,
|
|
@@ -6750,13 +6870,13 @@ var ImageEditorController = (_class13 = class {
|
|
|
6750
6870
|
};
|
|
6751
6871
|
}
|
|
6752
6872
|
this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
|
|
6753
|
-
if (_optionalChain([options, 'access',
|
|
6873
|
+
if (_optionalChain([options, 'access', _160 => _160.initialState, 'optionalAccess', _161 => _161.selection])) {
|
|
6754
6874
|
try {
|
|
6755
6875
|
this.state.selection = normalizeSelection(_chunkUYXL6ZWQcjs.deserializeSelection.call(void 0, options.initialState.selection));
|
|
6756
6876
|
} catch (e20) {
|
|
6757
6877
|
}
|
|
6758
6878
|
}
|
|
6759
|
-
if (_optionalChain([options, 'access',
|
|
6879
|
+
if (_optionalChain([options, 'access', _162 => _162.initialState, 'optionalAccess', _163 => _163.channels])) {
|
|
6760
6880
|
const channels = deserializeChannels(options.initialState.channels, this.naturalSize, this.lastLoadProblems);
|
|
6761
6881
|
if (channels.length) this.state.channels = channels;
|
|
6762
6882
|
}
|
|
@@ -6840,7 +6960,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
6840
6960
|
this.syncViews();
|
|
6841
6961
|
this.syncDisplay();
|
|
6842
6962
|
const currentState = { ...this.state };
|
|
6843
|
-
_optionalChain([this, 'access',
|
|
6963
|
+
_optionalChain([this, 'access', _164 => _164.onStateChange, 'optionalCall', _165 => _165(currentState)]);
|
|
6844
6964
|
this.listeners.forEach((l) => l(currentState));
|
|
6845
6965
|
if (this.effects.provider) this.queueEffectRefresh("incomplete");
|
|
6846
6966
|
}
|
|
@@ -6869,7 +6989,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
6869
6989
|
if (l.type === "group") {
|
|
6870
6990
|
const children = walk(l.children);
|
|
6871
6991
|
if (children !== l.children) next2 = { ...l, children };
|
|
6872
|
-
} else if (l.type === "smart" && _optionalChain([l, 'access',
|
|
6992
|
+
} else if (l.type === "smart" && _optionalChain([l, 'access', _166 => _166.smartFilters, 'optionalAccess', _167 => _167.filters, 'access', _168 => _168.some, 'call', _169 => _169((f) => f.kind === "effect")]) && (all || _chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
|
|
6873
6993
|
try {
|
|
6874
6994
|
const r = _chunkUYXL6ZWQcjs.rerender.call(void 0, l, canvas);
|
|
6875
6995
|
if (all || !_chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
|
|
@@ -6965,8 +7085,8 @@ var ImageEditorController = (_class13 = class {
|
|
|
6965
7085
|
*/
|
|
6966
7086
|
async updateEffectFilter(layerId, filterId, changes, commitToHistory = true) {
|
|
6967
7087
|
const layer = _chunkUYXL6ZWQcjs.requireSmartObject.call(void 0, this.state.layers, layerId);
|
|
6968
|
-
const was = _optionalChain([layer, 'access',
|
|
6969
|
-
if (!was || was.kind !== "effect") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access',
|
|
7088
|
+
const was = _optionalChain([layer, 'access', _170 => _170.smartFilters, 'optionalAccess', _171 => _171.filters, 'access', _172 => _172.find, 'call', _173 => _173((f) => f.id === filterId)]);
|
|
7089
|
+
if (!was || was.kind !== "effect") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access', _174 => _174.smartFilters, 'optionalAccess', _175 => _175.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
|
|
6970
7090
|
const update = {};
|
|
6971
7091
|
if (changes.values) {
|
|
6972
7092
|
const d = await this.describeEffect(was.effect);
|
|
@@ -7008,7 +7128,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
7008
7128
|
const layer = {
|
|
7009
7129
|
type: "pixel",
|
|
7010
7130
|
id,
|
|
7011
|
-
name: _optionalChain([options, 'access',
|
|
7131
|
+
name: _optionalChain([options, 'access', _176 => _176.name, 'optionalAccess', _177 => _177.trim, 'call', _178 => _178()]) || d.name,
|
|
7012
7132
|
visible: true,
|
|
7013
7133
|
opacity: _nullishCoalesce(options.opacity, () => ( 1)),
|
|
7014
7134
|
blend: _nullishCoalesce(blend, () => ( "normal")),
|
|
@@ -7033,7 +7153,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
7033
7153
|
*/
|
|
7034
7154
|
async updateEffectLayer(layerId, changes, commitToHistory = true) {
|
|
7035
7155
|
const found = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, layerId);
|
|
7036
|
-
const layer = _optionalChain([found, 'optionalAccess',
|
|
7156
|
+
const layer = _optionalChain([found, 'optionalAccess', _179 => _179.layer]);
|
|
7037
7157
|
if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
|
|
7038
7158
|
_chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
|
|
7039
7159
|
const g = layer.generator;
|
|
@@ -7062,7 +7182,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
7062
7182
|
* and how long it runs, the longest of theirs (ms). Null when none animates.
|
|
7063
7183
|
*/
|
|
7064
7184
|
getAnimation() {
|
|
7065
|
-
const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access',
|
|
7185
|
+
const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access', _180 => _180.generator, 'optionalAccess', _181 => _181.animate]));
|
|
7066
7186
|
if (!layers.length) return null;
|
|
7067
7187
|
return { duration: Math.max(...layers.map((l) => l.generator.animate.duration)), layerIds: layers.map((l) => l.id) };
|
|
7068
7188
|
}
|
|
@@ -7079,7 +7199,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
7079
7199
|
const { width, height } = this.naturalSize;
|
|
7080
7200
|
const surfaces = /* @__PURE__ */ new Map();
|
|
7081
7201
|
for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers)) {
|
|
7082
|
-
if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access',
|
|
7202
|
+
if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access', _182 => _182.generator, 'optionalAccess', _183 => _183.animate])) continue;
|
|
7083
7203
|
const g = l.generator;
|
|
7084
7204
|
const pixels = await this.effectsEngine.renderLayer(g.effect, g.values, { width, height, depth: this.bitDepth, time: (_nullishCoalesce(g.time, () => ( 0))) + time });
|
|
7085
7205
|
surfaces.set(l.id, effectPixelsToSurface(pixels, this.bitDepth));
|
|
@@ -7140,7 +7260,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
7140
7260
|
transform: { ...s.transform },
|
|
7141
7261
|
outputOpacity: s.outputOpacity,
|
|
7142
7262
|
selection: _nullishCoalesce(s.selection, () => ( null)),
|
|
7143
|
-
..._optionalChain([s, 'access',
|
|
7263
|
+
..._optionalChain([s, 'access', _184 => _184.channels, 'optionalAccess', _185 => _185.length]) ? { channels: s.channels } : {},
|
|
7144
7264
|
source: {
|
|
7145
7265
|
sourceUrl: s.sourceUrl,
|
|
7146
7266
|
element: this.imageElement,
|
|
@@ -7176,7 +7296,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
7176
7296
|
if (entry.colorMode) s.colorMode = entry.colorMode;
|
|
7177
7297
|
else delete s.colorMode;
|
|
7178
7298
|
s.selection = entry.selection;
|
|
7179
|
-
if (_optionalChain([entry, 'access',
|
|
7299
|
+
if (_optionalChain([entry, 'access', _186 => _186.channels, 'optionalAccess', _187 => _187.length])) s.channels = entry.channels;
|
|
7180
7300
|
else delete s.channels;
|
|
7181
7301
|
if (this.imageElement !== entry.source.element && !this.samplePixelsOverride) this.samplePixels = null;
|
|
7182
7302
|
this.imageElement = entry.source.element;
|
|
@@ -7383,7 +7503,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
7383
7503
|
return this.state.layers;
|
|
7384
7504
|
}
|
|
7385
7505
|
getLayer(id) {
|
|
7386
|
-
return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess',
|
|
7506
|
+
return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _188 => _188.layer]);
|
|
7387
7507
|
}
|
|
7388
7508
|
/** The active layer, or `undefined`. */
|
|
7389
7509
|
getActiveLayer() {
|
|
@@ -7396,7 +7516,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
7396
7516
|
setActiveLayer(id, target = "pixels") {
|
|
7397
7517
|
if (id !== null && !this.getLayer(id)) return false;
|
|
7398
7518
|
const layer = id ? this.getLayer(id) : void 0;
|
|
7399
|
-
const t = target === "mask" && _optionalChain([layer, 'optionalAccess',
|
|
7519
|
+
const t = target === "mask" && _optionalChain([layer, 'optionalAccess', _189 => _189.mask]) ? "mask" : target === "filter-mask" && _optionalChain([layer, 'optionalAccess', _190 => _190.type]) === "smart" && _optionalChain([layer, 'access', _191 => _191.smartFilters, 'optionalAccess', _192 => _192.mask]) ? "filter-mask" : "pixels";
|
|
7400
7520
|
if (this.state.activeLayerId === id && this.state.activeTarget === t) return true;
|
|
7401
7521
|
this.state.activeLayerId = id;
|
|
7402
7522
|
this.state.activeTarget = t;
|
|
@@ -7558,7 +7678,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
7558
7678
|
surfaceOf: (l) => this.surfaceOf(l),
|
|
7559
7679
|
version: `${this.sourceVersion()}:${this.patternsVersion()}`,
|
|
7560
7680
|
globalLight: this.state.globalLight,
|
|
7561
|
-
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
7681
|
+
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _193 => _193.state, 'access', _194 => _194.patterns, 'optionalAccess', _195 => _195.find, 'call', _196 => _196((p) => p.id === id)]), () => ( null))
|
|
7562
7682
|
};
|
|
7563
7683
|
}
|
|
7564
7684
|
__init95() {this.sourceIds = /* @__PURE__ */ new WeakMap()}
|
|
@@ -7635,7 +7755,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
7635
7755
|
if (!ctx || typeof ctx.getImageData !== "function") return null;
|
|
7636
7756
|
ctx.drawImage(el, 0, 0, width, height);
|
|
7637
7757
|
const data = ctx.getImageData(0, 0, width, height);
|
|
7638
|
-
if (!_optionalChain([data, 'optionalAccess',
|
|
7758
|
+
if (!_optionalChain([data, 'optionalAccess', _197 => _197.data]) || data.data.length < width * height * 4) return null;
|
|
7639
7759
|
return { width, height, data: data.data };
|
|
7640
7760
|
} catch (e24) {
|
|
7641
7761
|
return null;
|
|
@@ -7648,7 +7768,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
7648
7768
|
const prev = this.state.layers;
|
|
7649
7769
|
const depth = this.bitDepth;
|
|
7650
7770
|
this.state.layers = next;
|
|
7651
|
-
_optionalChain([extra, 'optionalCall',
|
|
7771
|
+
_optionalChain([extra, 'optionalCall', _198 => _198()]);
|
|
7652
7772
|
if (depth !== 8 && this.bitDepth === depth) this.state.layers = keepDeepLayers(prev, this.state.layers);
|
|
7653
7773
|
if (this.state.activeLayerId && !_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, this.state.activeLayerId)) {
|
|
7654
7774
|
this.state.activeLayerId = _chunkUYXL6ZWQcjs.activeLayerAfterRemoval.call(void 0, prev, this.state.layers, this.state.activeLayerId);
|
|
@@ -7686,7 +7806,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
7686
7806
|
const layer = {
|
|
7687
7807
|
type: "pixel",
|
|
7688
7808
|
id: init.id && !ids.has(init.id) ? init.id : _chunkUYXL6ZWQcjs.newLayerId.call(void 0, ),
|
|
7689
|
-
name: _optionalChain([init, 'access',
|
|
7809
|
+
name: _optionalChain([init, 'access', _199 => _199.name, 'optionalAccess', _200 => _200.trim, 'call', _201 => _201()]) || this.nextLayerName(),
|
|
7690
7810
|
visible: _nullishCoalesce(init.visible, () => ( true)),
|
|
7691
7811
|
opacity: _nullishCoalesce(init.opacity, () => ( 1)),
|
|
7692
7812
|
blend: _nullishCoalesce(blend, () => ( "normal")),
|
|
@@ -7713,7 +7833,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
7713
7833
|
async decodeImage(image) {
|
|
7714
7834
|
const trimmed = image.trim();
|
|
7715
7835
|
let png = null;
|
|
7716
|
-
if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess',
|
|
7836
|
+
if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _202 => _202.bytes]), () => ( null));
|
|
7717
7837
|
else if (/^[A-Za-z0-9+/=\s]+$/.test(trimmed) && trimmed.length > 16) {
|
|
7718
7838
|
try {
|
|
7719
7839
|
const bytes = _chunkCWM3CUUXcjs.base64ToBytes.call(void 0, trimmed);
|
|
@@ -7762,7 +7882,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
7762
7882
|
removeLayer(id) {
|
|
7763
7883
|
const next = _chunkUYXL6ZWQcjs.removeLayer.call(void 0, this.state.layers, id);
|
|
7764
7884
|
this.commitLayers(next, () => {
|
|
7765
|
-
if (this.state.selectedAnnotationId && !_chunkHGTDMKNEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkUYXL6ZWQcjs.annotationOfLayer.call(void 0, l), 'optionalAccess',
|
|
7885
|
+
if (this.state.selectedAnnotationId && !_chunkHGTDMKNEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkUYXL6ZWQcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _203 => _203.id]) === this.state.selectedAnnotationId)) {
|
|
7766
7886
|
this.state.selectedAnnotationId = null;
|
|
7767
7887
|
}
|
|
7768
7888
|
});
|
|
@@ -7771,9 +7891,9 @@ var ImageEditorController = (_class13 = class {
|
|
|
7771
7891
|
moveLayer(id, placement) {
|
|
7772
7892
|
const next = _chunkUYXL6ZWQcjs.moveLayer.call(void 0, this.state.layers, id, placement);
|
|
7773
7893
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, next, id);
|
|
7774
|
-
if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
7894
|
+
if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _204 => _204.parent, 'optionalAccess', _205 => _205.id]), () => ( null)), index: loc.index };
|
|
7775
7895
|
this.commitLayers(next);
|
|
7776
|
-
return { parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
7896
|
+
return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _206 => _206.parent, 'optionalAccess', _207 => _207.id]), () => ( null)), index: loc.index };
|
|
7777
7897
|
}
|
|
7778
7898
|
/**
|
|
7779
7899
|
* Changes name, visibility, opacity, fill, blend, clipping, locks or (groups) collapsed state, as
|
|
@@ -7790,7 +7910,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
7790
7910
|
const group = {
|
|
7791
7911
|
type: "group",
|
|
7792
7912
|
id: _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "group"),
|
|
7793
|
-
name: _optionalChain([init, 'access',
|
|
7913
|
+
name: _optionalChain([init, 'access', _208 => _208.name, 'optionalAccess', _209 => _209.trim, 'call', _210 => _210()]) || "Group",
|
|
7794
7914
|
visible: true,
|
|
7795
7915
|
opacity: 1,
|
|
7796
7916
|
blend,
|
|
@@ -7883,7 +8003,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
7883
8003
|
sel = this.layerTransparency(id);
|
|
7884
8004
|
} else {
|
|
7885
8005
|
const current = this.state.selection;
|
|
7886
|
-
if (!_optionalChain([current, 'optionalAccess',
|
|
8006
|
+
if (!_optionalChain([current, 'optionalAccess', _211 => _211.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all / transparency.");
|
|
7887
8007
|
sel = from === "hide-selection" ? _chunkUYXL6ZWQcjs.invertSelection.call(void 0, current) : current;
|
|
7888
8008
|
}
|
|
7889
8009
|
mask = this.maskFromSelection(sel, props);
|
|
@@ -7914,7 +8034,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
7914
8034
|
const layer = _chunkUYXL6ZWQcjs.requireLayer.call(void 0, this.state.layers, id).layer;
|
|
7915
8035
|
const name = layer.name || id;
|
|
7916
8036
|
if (layer.type === "shape") throw new (0, _chunkUYXL6ZWQcjs.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.`);
|
|
7917
|
-
if (_optionalChain([layer, 'access',
|
|
8037
|
+
if (_optionalChain([layer, 'access', _212 => _212.mask, 'optionalAccess', _213 => _213.source])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which cannot be combined with a vector mask; remove the depth mask first.`);
|
|
7918
8038
|
return layer;
|
|
7919
8039
|
}
|
|
7920
8040
|
requireVectorMask(id) {
|
|
@@ -7924,10 +8044,10 @@ var ImageEditorController = (_class13 = class {
|
|
|
7924
8044
|
}
|
|
7925
8045
|
/** Components from a path spec: `components`, or one `shape` / `subpaths`. */
|
|
7926
8046
|
vectorMaskComponents(path) {
|
|
7927
|
-
if (_optionalChain([path, 'access',
|
|
8047
|
+
if (_optionalChain([path, 'access', _214 => _214.components, 'optionalAccess', _215 => _215.length]) && (path.shape !== void 0 || path.subpaths !== void 0)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
|
|
7928
8048
|
if (path.fillRule !== void 0 && path.fillRule !== "nonzero" && path.fillRule !== "evenodd") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
|
|
7929
|
-
const specs = _optionalChain([path, 'access',
|
|
7930
|
-
return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access',
|
|
8049
|
+
const specs = _optionalChain([path, 'access', _216 => _216.components, 'optionalAccess', _217 => _217.length]) ? path.components : [path];
|
|
8050
|
+
return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access', _218 => _218.components, 'optionalAccess', _219 => _219.length]) ? `components[${i}].` : ""));
|
|
7931
8051
|
}
|
|
7932
8052
|
/**
|
|
7933
8053
|
* Layer › Vector Mask: `reveal-all` (an empty path showing everything), `hide-all` (an empty path
|
|
@@ -7944,7 +8064,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
7944
8064
|
vm = { components: this.vectorMaskComponents(path) };
|
|
7945
8065
|
if (path.fillRule === "evenodd") vm.fillRule = "evenodd";
|
|
7946
8066
|
} else if (from === "reveal-all" || from === "hide-all") {
|
|
7947
|
-
if (_optionalChain([path, 'access',
|
|
8067
|
+
if (_optionalChain([path, 'access', _220 => _220.components, 'optionalAccess', _221 => _221.length]) || path.shape !== void 0 || path.subpaths !== void 0) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`A ${from} vector mask starts empty; use from path to give a path.`);
|
|
7948
8068
|
vm = { components: [], ...from === "reveal-all" ? { inverted: true } : {} };
|
|
7949
8069
|
} else {
|
|
7950
8070
|
throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Unknown vector mask source "${String(from)}". Use reveal-all, hide-all, path or selection.`);
|
|
@@ -7955,7 +8075,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
7955
8075
|
/** The selection's outline as subpaths; throws when nothing is selected or nothing is left to trace. */
|
|
7956
8076
|
traceSelection(options) {
|
|
7957
8077
|
const sel = this.state.selection;
|
|
7958
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
8078
|
+
if (!_optionalChain([sel, 'optionalAccess', _222 => _222.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then make a path from the selection.");
|
|
7959
8079
|
if (options.tolerance !== void 0 && !(options.tolerance >= 0.1 && options.tolerance <= 10)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("tolerance must be from 0.1 to 10 px.");
|
|
7960
8080
|
const subpaths = selectionToSubpaths(sel, options);
|
|
7961
8081
|
if (!subpaths.length) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("The selection is too small or too faint to trace (below minArea, or under half selected); lower minArea or threshold.");
|
|
@@ -8136,7 +8256,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
8136
8256
|
const layer = loc.layer;
|
|
8137
8257
|
if (layer.type !== "pixel") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
|
|
8138
8258
|
const sel = this.state.selection;
|
|
8139
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
8259
|
+
if (!_optionalChain([sel, 'optionalAccess', _223 => _223.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
|
|
8140
8260
|
if (options.cut) _chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
|
|
8141
8261
|
const surface = this.surfaceOf(layer);
|
|
8142
8262
|
const sb = sel.bounds;
|
|
@@ -8154,14 +8274,14 @@ var ImageEditorController = (_class13 = class {
|
|
|
8154
8274
|
const copy = {
|
|
8155
8275
|
type: "pixel",
|
|
8156
8276
|
id: _chunkUYXL6ZWQcjs.newLayerId.call(void 0, ),
|
|
8157
|
-
name: _optionalChain([options, 'access',
|
|
8277
|
+
name: _optionalChain([options, 'access', _224 => _224.name, 'optionalAccess', _225 => _225.trim, 'call', _226 => _226()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
|
|
8158
8278
|
visible: true,
|
|
8159
8279
|
opacity: 1,
|
|
8160
8280
|
blend: "normal",
|
|
8161
8281
|
surface: _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width: src.width, height: src.height, data: px2 }, 4, src.x, src.y),
|
|
8162
8282
|
offset: { ...layer.offset }
|
|
8163
8283
|
};
|
|
8164
|
-
let next = _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
8284
|
+
let next = _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _227 => _227.parent, 'optionalAccess', _228 => _228.id]), () => ( null)), loc.index + 1);
|
|
8165
8285
|
if (kept) {
|
|
8166
8286
|
const cutLayer = { ...layer, surface: _chunkCWM3CUUXcjs.writeRegion.call(void 0, surface, src, kept) };
|
|
8167
8287
|
delete cutLayer.source;
|
|
@@ -8185,7 +8305,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
8185
8305
|
layers: () => this.state.layers,
|
|
8186
8306
|
activeLayerId: () => this.state.activeLayerId,
|
|
8187
8307
|
activeTarget: () => this.state.activeTarget,
|
|
8188
|
-
selection: () => _optionalChain([this, 'access',
|
|
8308
|
+
selection: () => _optionalChain([this, 'access', _229 => _229.state, 'access', _230 => _230.selection, 'optionalAccess', _231 => _231.bounds]) ? this.state.selection : null,
|
|
8189
8309
|
canvas: () => this.naturalSize,
|
|
8190
8310
|
pixelsOf: (layer) => this.surfaceOf(layer),
|
|
8191
8311
|
shapeEnv: () => this.shapeEnv(),
|
|
@@ -8333,7 +8453,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
8333
8453
|
* anything else nests as a layer document. Returns the smart object's id.
|
|
8334
8454
|
*/
|
|
8335
8455
|
convertToSmartObject(ids, options = {}) {
|
|
8336
|
-
const list = _optionalChain([ids, 'optionalAccess',
|
|
8456
|
+
const list = _optionalChain([ids, 'optionalAccess', _232 => _232.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
|
|
8337
8457
|
if (!list.length) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
|
|
8338
8458
|
const res = _chunkUYXL6ZWQcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
|
|
8339
8459
|
this.commitLayers(res.layers, () => {
|
|
@@ -8366,8 +8486,8 @@ var ImageEditorController = (_class13 = class {
|
|
|
8366
8486
|
width: c.width,
|
|
8367
8487
|
height: c.height,
|
|
8368
8488
|
decoded: _chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, c),
|
|
8369
|
-
fileType: _nullishCoalesce(_optionalChain([c, 'access',
|
|
8370
|
-
linkedPath: _nullishCoalesce(_optionalChain([c, 'access',
|
|
8489
|
+
fileType: _nullishCoalesce(_optionalChain([c, 'access', _233 => _233.file, 'optionalAccess', _234 => _234.type]), () => ( null)),
|
|
8490
|
+
linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _235 => _235.linked, 'optionalAccess', _236 => _236.path]), () => ( null)),
|
|
8371
8491
|
instances: _chunkUYXL6ZWQcjs.instancesOf.call(void 0, this.state.layers, c.id),
|
|
8372
8492
|
layerCount: c.document ? _chunkHGTDMKNEcjs.flattenLayers.call(void 0, c.document.layers).length : 0
|
|
8373
8493
|
},
|
|
@@ -8384,9 +8504,9 @@ var ImageEditorController = (_class13 = class {
|
|
|
8384
8504
|
bounds: _chunkUYXL6ZWQcjs.transformedBox.call(void 0, g)
|
|
8385
8505
|
},
|
|
8386
8506
|
smartFilters: {
|
|
8387
|
-
enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess',
|
|
8388
|
-
filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess',
|
|
8389
|
-
mask: _optionalChain([stack, 'optionalAccess',
|
|
8507
|
+
enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _237 => _237.enabled]), () => ( true)),
|
|
8508
|
+
filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess', _238 => _238.filters]), () => ( []))).map((f) => f.kind === "psd" ? { id: f.id, kind: "psd", name: f.name, enabled: f.enabled, blend: f.blend, opacity: f.opacity } : { ...f }),
|
|
8509
|
+
mask: _optionalChain([stack, 'optionalAccess', _239 => _239.mask]) ? { enabled: stack.mask.enabled !== false, linked: stack.mask.linked !== false, density: _nullishCoalesce(stack.mask.density, () => ( 1)), feather: _nullishCoalesce(stack.mask.feather, () => ( 0)), bounds: _chunkCWM3CUUXcjs.contentBounds.call(void 0, stack.mask.surface), defaultValue: stack.mask.defaultValue } : null
|
|
8390
8510
|
},
|
|
8391
8511
|
bounds: this.getLayerBounds(id)
|
|
8392
8512
|
};
|
|
@@ -8525,7 +8645,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
8525
8645
|
* it in the same undo step (Photoshop limits a filter to the selection). Returns whether it did.
|
|
8526
8646
|
*/
|
|
8527
8647
|
maskFiltersWithSelection(id, useSelection) {
|
|
8528
|
-
if (!useSelection || !_optionalChain([this, 'access',
|
|
8648
|
+
if (!useSelection || !_optionalChain([this, 'access', _240 => _240.state, 'access', _241 => _241.selection, 'optionalAccess', _242 => _242.bounds])) return false;
|
|
8529
8649
|
this.setSmartFilterMask(id, "selection", {}, false);
|
|
8530
8650
|
return true;
|
|
8531
8651
|
}
|
|
@@ -8539,19 +8659,19 @@ var ImageEditorController = (_class13 = class {
|
|
|
8539
8659
|
removeSmartFilter(id, filterId) {
|
|
8540
8660
|
const res = _chunkUYXL6ZWQcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
|
|
8541
8661
|
this.commitLayers(res.layers);
|
|
8542
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8662
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _243 => _243.layer, 'access', _244 => _244.smartFilters, 'optionalAccess', _245 => _245.filters]), () => ( []));
|
|
8543
8663
|
}
|
|
8544
8664
|
/** Moves one smart filter to `index` (0 = bottom, applied first), as one undo step. Returns the filters. */
|
|
8545
8665
|
moveSmartFilter(id, filterId, index) {
|
|
8546
8666
|
const res = _chunkUYXL6ZWQcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
|
|
8547
8667
|
this.commitLayers(res.layers);
|
|
8548
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8668
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _246 => _246.layer, 'access', _247 => _247.smartFilters, 'optionalAccess', _248 => _248.filters]), () => ( []));
|
|
8549
8669
|
}
|
|
8550
8670
|
/** Turns a smart object's whole filter stack on or off (one undo step). */
|
|
8551
8671
|
setSmartFiltersEnabled(id, enabled) {
|
|
8552
8672
|
const res = _chunkUYXL6ZWQcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
|
|
8553
8673
|
this.commitLayers(res.layers);
|
|
8554
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8674
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _249 => _249.layer, 'access', _250 => _250.smartFilters, 'optionalAccess', _251 => _251.enabled]), () => ( true));
|
|
8555
8675
|
}
|
|
8556
8676
|
/**
|
|
8557
8677
|
* Sets the smart filter mask (one undo step): `reveal-all`, `hide-all`, `selection` (the
|
|
@@ -8563,11 +8683,11 @@ var ImageEditorController = (_class13 = class {
|
|
|
8563
8683
|
let mask;
|
|
8564
8684
|
if (from === "none") mask = null;
|
|
8565
8685
|
else if (from === "keep") {
|
|
8566
|
-
if (!_optionalChain([layer, 'access',
|
|
8686
|
+
if (!_optionalChain([layer, 'access', _252 => _252.smartFilters, 'optionalAccess', _253 => _253.mask])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
|
|
8567
8687
|
mask = withMaskProps(layer.smartFilters.mask, props);
|
|
8568
8688
|
} else if (from === "selection") {
|
|
8569
8689
|
const sel = this.state.selection;
|
|
8570
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
8690
|
+
if (!_optionalChain([sel, 'optionalAccess', _254 => _254.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
|
|
8571
8691
|
mask = this.maskFromSelection(sel, props);
|
|
8572
8692
|
} else {
|
|
8573
8693
|
const v = from === "reveal-all" ? 255 : 0;
|
|
@@ -8579,7 +8699,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
8579
8699
|
if (mask && from !== "keep") this.state.activeTarget = "filter-mask";
|
|
8580
8700
|
else if (!mask && this.state.activeTarget === "filter-mask") this.state.activeTarget = "pixels";
|
|
8581
8701
|
}, commitToHistory);
|
|
8582
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8702
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _255 => _255.layer, 'access', _256 => _256.smartFilters, 'optionalAccess', _257 => _257.mask]), () => ( null));
|
|
8583
8703
|
}
|
|
8584
8704
|
/**
|
|
8585
8705
|
* Decodes smart object contents that came as files the synchronous decoders cannot read (a JPEG
|
|
@@ -8627,7 +8747,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
8627
8747
|
if (this.getFreeTransform()) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
|
|
8628
8748
|
const layer = _chunkUYXL6ZWQcjs.requireSmartObject.call(void 0, this.state.layers, id);
|
|
8629
8749
|
const c = layer.contents;
|
|
8630
|
-
if (!_chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access',
|
|
8750
|
+
if (!_chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _258 => _258.file, 'optionalAccess', _259 => _259.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
|
|
8631
8751
|
const saved = {
|
|
8632
8752
|
state: { ...this.state },
|
|
8633
8753
|
undo: this.undoStack,
|
|
@@ -8658,9 +8778,9 @@ var ImageEditorController = (_class13 = class {
|
|
|
8658
8778
|
editingContents: this.getEditingContents()
|
|
8659
8779
|
};
|
|
8660
8780
|
delete this.state.legacyOutputBlur;
|
|
8661
|
-
if (_optionalChain([c, 'access',
|
|
8781
|
+
if (_optionalChain([c, 'access', _260 => _260.document, 'optionalAccess', _261 => _261.globalLight])) this.state.globalLight = c.document.globalLight;
|
|
8662
8782
|
else delete this.state.globalLight;
|
|
8663
|
-
if (_optionalChain([c, 'access',
|
|
8783
|
+
if (_optionalChain([c, 'access', _262 => _262.document, 'optionalAccess', _263 => _263.patterns, 'optionalAccess', _264 => _264.length])) this.state.patterns = c.document.patterns;
|
|
8664
8784
|
else delete this.state.patterns;
|
|
8665
8785
|
this.imageElement = null;
|
|
8666
8786
|
this.samplePixels = null;
|
|
@@ -8680,23 +8800,23 @@ var ImageEditorController = (_class13 = class {
|
|
|
8680
8800
|
closeSmartObjectContents(save = true) {
|
|
8681
8801
|
const top = this.contentsStack.pop();
|
|
8682
8802
|
if (!top) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
|
|
8683
|
-
if (_optionalChain([this, 'access',
|
|
8803
|
+
if (_optionalChain([this, 'access', _265 => _265.openTransform, 'optionalAccess', _266 => _266.isOpen])) this.openTransform.cancel();
|
|
8684
8804
|
this.openTransform = null;
|
|
8685
8805
|
const edited = this.state;
|
|
8686
8806
|
const changed = save && this.undoStack.length > 0;
|
|
8687
8807
|
let next = null;
|
|
8688
8808
|
if (changed) {
|
|
8689
|
-
const layer = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess',
|
|
8690
|
-
const old = _optionalChain([layer, 'optionalAccess',
|
|
8809
|
+
const layer = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _267 => _267.layer]);
|
|
8810
|
+
const old = _optionalChain([layer, 'optionalAccess', _268 => _268.contents]);
|
|
8691
8811
|
const { width, height } = edited.imageDimensions;
|
|
8692
8812
|
const only = edited.layers.length === 1 ? edited.layers[0] : null;
|
|
8693
|
-
const plain3 = _optionalChain([only, 'optionalAccess',
|
|
8694
|
-
if (_optionalChain([old, 'optionalAccess',
|
|
8813
|
+
const plain3 = _optionalChain([only, 'optionalAccess', _269 => _269.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _270 => _270.filters, 'optionalAccess', _271 => _271.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
|
|
8814
|
+
if (_optionalChain([old, 'optionalAccess', _272 => _272.kind]) === "raster" && plain3) {
|
|
8695
8815
|
const px2 = _chunkCWM3CUUXcjs.readRegion.call(void 0, only.surface, { x: -only.offset.x, y: -only.offset.y, width, height });
|
|
8696
8816
|
next = _chunkUYXL6ZWQcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
|
|
8697
8817
|
} else {
|
|
8698
8818
|
const doc = { layers: edited.layers, globalLight: edited.globalLight, patterns: edited.patterns };
|
|
8699
|
-
next = _chunkUYXL6ZWQcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess',
|
|
8819
|
+
next = _chunkUYXL6ZWQcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _273 => _273.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _274 => _274.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
|
|
8700
8820
|
}
|
|
8701
8821
|
}
|
|
8702
8822
|
const saved = top.saved;
|
|
@@ -8721,7 +8841,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
8721
8841
|
}
|
|
8722
8842
|
/** The document's own layers (not the contents open for editing). */
|
|
8723
8843
|
rootLayers() {
|
|
8724
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
8844
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _275 => _275.contentsStack, 'access', _276 => _276[0], 'optionalAccess', _277 => _277.saved, 'access', _278 => _278.state, 'access', _279 => _279.layers]), () => ( this.state.layers));
|
|
8725
8845
|
}
|
|
8726
8846
|
/** Drops every open contents edit (loading another document). */
|
|
8727
8847
|
abandonContents() {
|
|
@@ -8942,7 +9062,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
8942
9062
|
const oy = layer.type === "pixel" ? layer.offset.y : 0;
|
|
8943
9063
|
const key = `${tw}x${th}:${ox},${oy}`;
|
|
8944
9064
|
let byKey = this.thumbCache.get(surface);
|
|
8945
|
-
const hit = _optionalChain([byKey, 'optionalAccess',
|
|
9065
|
+
const hit = _optionalChain([byKey, 'optionalAccess', _280 => _280.get, 'call', _281 => _281(key)]);
|
|
8946
9066
|
if (hit) return hit;
|
|
8947
9067
|
const out = new Uint8ClampedArray(tw * th * 4);
|
|
8948
9068
|
for (let y = 0; y < th; y++) {
|
|
@@ -9083,7 +9203,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
9083
9203
|
if (layer.mask.source) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which is generated, not painted.`);
|
|
9084
9204
|
_chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "all", action);
|
|
9085
9205
|
} else if (ch === "filter-mask") {
|
|
9086
|
-
if (layer.type !== "smart" || !_optionalChain([layer, 'access',
|
|
9206
|
+
if (layer.type !== "smart" || !_optionalChain([layer, 'access', _282 => _282.smartFilters, 'optionalAccess', _283 => _283.mask])) {
|
|
9087
9207
|
throw new (0, _chunkUYXL6ZWQcjs.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}.`);
|
|
9088
9208
|
}
|
|
9089
9209
|
if (!_chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, layer.contents)) throw new (0, _chunkUYXL6ZWQcjs.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.`);
|
|
@@ -9098,7 +9218,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
9098
9218
|
if (!layer.visible) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" is hidden; show it before you ${action}.`);
|
|
9099
9219
|
const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
|
|
9100
9220
|
const surface = ch === "mask" ? layer.mask.surface : ch === "filter-mask" ? layer.smartFilters.mask.surface : this.surfaceOf(layer);
|
|
9101
|
-
const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access',
|
|
9221
|
+
const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _284 => _284.locks, 'optionalAccess', _285 => _285.transparency]));
|
|
9102
9222
|
return { id, layer, channel: ch, offset, surface, lockTransparency };
|
|
9103
9223
|
}
|
|
9104
9224
|
/** The layer with its pixels (or mask) replaced by `surface`. */
|
|
@@ -9142,13 +9262,13 @@ var ImageEditorController = (_class13 = class {
|
|
|
9142
9262
|
blend: target.channel !== "pixels" ? "normal" : brush.blend,
|
|
9143
9263
|
lockTransparency: target.lockTransparency,
|
|
9144
9264
|
// In Quick Mask mode the selection is what is painted, so it does not limit the stroke.
|
|
9145
|
-
selection: target.channel !== "quick-mask" && _optionalChain([this, 'access',
|
|
9265
|
+
selection: target.channel !== "quick-mask" && _optionalChain([this, 'access', _286 => _286.state, 'access', _287 => _287.selection, 'optionalAccess', _288 => _288.bounds]) ? this.state.selection : null,
|
|
9146
9266
|
offset: target.offset
|
|
9147
9267
|
};
|
|
9148
9268
|
const depth = target.channel !== "filter-mask" && target.channel !== "quick-mask" && this.bitDepth !== 8 ? this.bitDepth : null;
|
|
9149
9269
|
if (tool === "mixer") return new PaintStrokeSession(this, target, this.mixerStroke(init, brush), apply, depth);
|
|
9150
9270
|
if (isRetouchTool(tool)) return new PaintStrokeSession(this, target, this.retouchStroke(tool, init, brush, target, apply), apply, depth);
|
|
9151
|
-
const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess',
|
|
9271
|
+
const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess', _289 => _289.type]) === "gradient" ? _chunkEBDCRTZIcjs.resolvePaintGradient.call(void 0, strokePaint, { paint: toHex(color), secondary: toHex(background) }) : null;
|
|
9152
9272
|
return new PaintStrokeSession(this, target, new (0, _chunkEBDCRTZIcjs.StrokeCoverage)(brush, gradient, _nullishCoalesce(init.seed, () => ( 0))), apply, depth);
|
|
9153
9273
|
}
|
|
9154
9274
|
/** A retouching stroke's start: its settings, what it samples and how it composites. */
|
|
@@ -9195,9 +9315,9 @@ var ImageEditorController = (_class13 = class {
|
|
|
9195
9315
|
const steps = settings.historySteps;
|
|
9196
9316
|
const entry = steps > 0 ? _nullishCoalesce(this.undoStack[this.undoStack.length - steps], () => ( this.undoStack[0])) : this.undoStack[0];
|
|
9197
9317
|
if (!entry) throw new (0, _chunkUYXL6ZWQcjs.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.");
|
|
9198
|
-
const then = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess',
|
|
9318
|
+
const then = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _290 => _290.layer]);
|
|
9199
9319
|
if (!then) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${target.id}" did not exist ${steps > 0 ? `${steps} steps back` : "in the oldest state"}; choose fewer history steps (historySteps).`);
|
|
9200
|
-
const surface = target.channel === "mask" ? _optionalChain([then, 'access',
|
|
9320
|
+
const surface = target.channel === "mask" ? _optionalChain([then, 'access', _291 => _291.mask, 'optionalAccess', _292 => _292.surface]) : then.type === "pixel" ? then.surface : void 0;
|
|
9201
9321
|
if (!surface) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
|
|
9202
9322
|
const offset2 = then.type === "pixel" ? then.offset : { x: 0, y: 0 };
|
|
9203
9323
|
const depth = !mask && this.bitDepth !== 8 ? this.bitDepth : null;
|
|
@@ -9271,7 +9391,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
9271
9391
|
}
|
|
9272
9392
|
/** A pixel source over a surface (layer pixels or a mask) in layer space at `offset`. */
|
|
9273
9393
|
surfaceSource(surface, offset) {
|
|
9274
|
-
return new (0, _chunk7NW46N7Icjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access',
|
|
9394
|
+
return new (0, _chunk7NW46N7Icjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access', _293 => _293.tiles, 'access', _294 => _294.get, 'call', _295 => _295(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _296 => _296.data]), () => ( (surface.defaultValue ? defaultTile(surface) : null))), surface.channels, offset);
|
|
9275
9395
|
}
|
|
9276
9396
|
/** A pixel source over the composite of the current layers (through `throughId` and below, or all of them), as it is now. */
|
|
9277
9397
|
compositeSource(throughId, depth = null) {
|
|
@@ -9347,7 +9467,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
9347
9467
|
paintStroke(init) {
|
|
9348
9468
|
if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("points must hold at least one { x, y } point.");
|
|
9349
9469
|
for (const p of init.points) {
|
|
9350
|
-
if (!Number.isFinite(_optionalChain([p, 'optionalAccess',
|
|
9470
|
+
if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _297 => _297.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _298 => _298.y]))) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
|
|
9351
9471
|
}
|
|
9352
9472
|
const session = this.beginStroke(init);
|
|
9353
9473
|
session.push(init.points);
|
|
@@ -9376,7 +9496,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
9376
9496
|
*/
|
|
9377
9497
|
strokeSelection(options) {
|
|
9378
9498
|
const sel = this.state.selection;
|
|
9379
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9499
|
+
if (!_optionalChain([sel, 'optionalAccess', _299 => _299.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then stroke the selection.");
|
|
9380
9500
|
const width = options.width;
|
|
9381
9501
|
if (!(width > 0 && width <= 250)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("width must be greater than 0 and at most 250 px.");
|
|
9382
9502
|
const location = _nullishCoalesce(options.location, () => ( "outside"));
|
|
@@ -9393,7 +9513,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
9393
9513
|
*/
|
|
9394
9514
|
cropToSelection() {
|
|
9395
9515
|
const sel = this.state.selection;
|
|
9396
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9516
|
+
if (!_optionalChain([sel, 'optionalAccess', _300 => _300.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the area to keep, then crop to it.");
|
|
9397
9517
|
const crop = { ...sel.bounds };
|
|
9398
9518
|
this.setCrop(crop);
|
|
9399
9519
|
return crop;
|
|
@@ -9407,7 +9527,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
9407
9527
|
*/
|
|
9408
9528
|
contentAwareFill(options = {}) {
|
|
9409
9529
|
const sel = this.state.selection;
|
|
9410
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9530
|
+
if (!_optionalChain([sel, 'optionalAccess', _301 => _301.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select what to remove, then fill it.");
|
|
9411
9531
|
if (this.bitDepth !== 8) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Content-Aware Fill works on 8-bit documents for now; set_bit_depth 8 first, or use spot_heal.");
|
|
9412
9532
|
const output = _nullishCoalesce(options.output, () => ( "current"));
|
|
9413
9533
|
if (output !== "current" && output !== "new-layer") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Unknown output "${String(output)}"; use current or new-layer.`);
|
|
@@ -9472,8 +9592,8 @@ var ImageEditorController = (_class13 = class {
|
|
|
9472
9592
|
*/
|
|
9473
9593
|
copyPixels(options = {}) {
|
|
9474
9594
|
const { width, height } = this.naturalSize;
|
|
9475
|
-
const sel = _optionalChain([this, 'access',
|
|
9476
|
-
const rect = _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
9595
|
+
const sel = _optionalChain([this, 'access', _302 => _302.state, 'access', _303 => _303.selection, 'optionalAccess', _304 => _304.bounds]) ? this.state.selection : null;
|
|
9596
|
+
const rect = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _305 => _305.bounds]), () => ( { x: 0, y: 0, width, height }));
|
|
9477
9597
|
let data;
|
|
9478
9598
|
if (options.merged) {
|
|
9479
9599
|
data = new Uint8ClampedArray(this.compositePixels(rect).data);
|
|
@@ -9513,7 +9633,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
9513
9633
|
pastePixels(mode = "new-layer", image = this.clipboard) {
|
|
9514
9634
|
if (!image) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("The clipboard is empty; copy_pixels first.");
|
|
9515
9635
|
if (!PASTE_MODES.includes(mode)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Unknown paste mode "${String(mode)}"; use ${PASTE_MODES.join(", ")}.`);
|
|
9516
|
-
const sel = _optionalChain([this, 'access',
|
|
9636
|
+
const sel = _optionalChain([this, 'access', _306 => _306.state, 'access', _307 => _307.selection, 'optionalAccess', _308 => _308.bounds]) ? this.state.selection : null;
|
|
9517
9637
|
if ((mode === "into" || mode === "outside") && !sel) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Paste ${mode === "into" ? "Into" : "Outside"} needs a selection; select where it goes first.`);
|
|
9518
9638
|
const { width, height } = this.naturalSize;
|
|
9519
9639
|
let x;
|
|
@@ -9522,7 +9642,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
9522
9642
|
x = image.x;
|
|
9523
9643
|
y = image.y;
|
|
9524
9644
|
} else {
|
|
9525
|
-
const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
9645
|
+
const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _309 => _309.bounds]), () => ( { x: 0, y: 0, width, height }));
|
|
9526
9646
|
x = Math.round(frame.x + (frame.width - image.width) / 2);
|
|
9527
9647
|
y = Math.round(frame.y + (frame.height - image.height) / 2);
|
|
9528
9648
|
}
|
|
@@ -9539,8 +9659,8 @@ var ImageEditorController = (_class13 = class {
|
|
|
9539
9659
|
if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("opacity must be from 0 to 1.");
|
|
9540
9660
|
const blend = _nullishCoalesce(_chunkUYXL6ZWQcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
|
|
9541
9661
|
const quickMask = target.channel === "quick-mask";
|
|
9542
|
-
const sel = _nullishCoalesce(coverageMask, () => ( (!quickMask && options.useSelection !== false && _optionalChain([this, 'access',
|
|
9543
|
-
const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
9662
|
+
const sel = _nullishCoalesce(coverageMask, () => ( (!quickMask && options.useSelection !== false && _optionalChain([this, 'access', _310 => _310.state, 'access', _311 => _311.selection, 'optionalAccess', _312 => _312.bounds]) ? this.state.selection : null)));
|
|
9663
|
+
const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _313 => _313.bounds]), () => ( { x: 0, y: 0, width, height }));
|
|
9544
9664
|
const coverage = new (0, _chunkEBDCRTZIcjs.CoverageMap)();
|
|
9545
9665
|
const ones = new Float32Array(region.width * region.height);
|
|
9546
9666
|
if (sel) {
|
|
@@ -9665,7 +9785,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
9665
9785
|
placeLayer(layers, node, where) {
|
|
9666
9786
|
if (where.aboveId) {
|
|
9667
9787
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, where.aboveId);
|
|
9668
|
-
if (loc) return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9788
|
+
if (loc) return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _314 => _314.parent, 'optionalAccess', _315 => _315.id]), () => ( null)), loc.index + 1);
|
|
9669
9789
|
}
|
|
9670
9790
|
if (where.parentId) {
|
|
9671
9791
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, where.parentId);
|
|
@@ -9676,11 +9796,11 @@ var ImageEditorController = (_class13 = class {
|
|
|
9676
9796
|
const at = Math.max(0, Math.min(nodes.length, Math.round(where.adjustmentIndex)));
|
|
9677
9797
|
if (at < nodes.length) {
|
|
9678
9798
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, nodes[at].id);
|
|
9679
|
-
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9799
|
+
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _316 => _316.parent, 'optionalAccess', _317 => _317.id]), () => ( null)), loc.index);
|
|
9680
9800
|
}
|
|
9681
9801
|
if (nodes.length) {
|
|
9682
9802
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, nodes[nodes.length - 1].id);
|
|
9683
|
-
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9803
|
+
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _318 => _318.parent, 'optionalAccess', _319 => _319.id]), () => ( null)), loc.index + 1);
|
|
9684
9804
|
}
|
|
9685
9805
|
}
|
|
9686
9806
|
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, null, this.defaultInsertIndex(layers));
|
|
@@ -9719,7 +9839,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
9719
9839
|
enabled: spec.enabled,
|
|
9720
9840
|
opacity: spec.opacity,
|
|
9721
9841
|
blend: spec.blend,
|
|
9722
|
-
mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access',
|
|
9842
|
+
mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access', _320 => _320.state, 'access', _321 => _321.selection, 'optionalAccess', _322 => _322.bounds]) ? _chunkUYXL6ZWQcjs.layerMaskFromSelection.call(void 0, this.state.selection) : void 0)))
|
|
9723
9843
|
});
|
|
9724
9844
|
while (ids.has(layer.id)) layer.id = _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "adj");
|
|
9725
9845
|
const { width, height } = this.naturalSize;
|
|
@@ -9796,7 +9916,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
9796
9916
|
const anchor = nodes[to];
|
|
9797
9917
|
const without = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, id, () => null);
|
|
9798
9918
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, without, anchor.id);
|
|
9799
|
-
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9919
|
+
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _323 => _323.parent, 'optionalAccess', _324 => _324.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
|
|
9800
9920
|
}
|
|
9801
9921
|
/** Moves a layer to `toIndex` among the adjustment layers (0 = bottom) as one undo step. Returns false if nothing moved. */
|
|
9802
9922
|
moveAdjustmentLayer(id, toIndex) {
|
|
@@ -9837,7 +9957,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
9837
9957
|
return _nullishCoalesce(this.state.selection, () => ( null));
|
|
9838
9958
|
}
|
|
9839
9959
|
get hasSelection() {
|
|
9840
|
-
return Boolean(_optionalChain([this, 'access',
|
|
9960
|
+
return Boolean(_optionalChain([this, 'access', _325 => _325.state, 'access', _326 => _326.selection, 'optionalAccess', _327 => _327.bounds]));
|
|
9841
9961
|
}
|
|
9842
9962
|
/** Returns the current canvas (composition) dimensions. */
|
|
9843
9963
|
getCanvasSize() {
|
|
@@ -9929,7 +10049,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
9929
10049
|
const prev = normalizeSelection(_nullishCoalesce(this.state.selection, () => ( null)));
|
|
9930
10050
|
if (prev === next || prev && next && sameSelection(prev, next)) return false;
|
|
9931
10051
|
this.recordHistory();
|
|
9932
|
-
if (!next && _optionalChain([prev, 'optionalAccess',
|
|
10052
|
+
if (!next && _optionalChain([prev, 'optionalAccess', _328 => _328.bounds])) this.lastSelection = prev;
|
|
9933
10053
|
this.state.selection = next;
|
|
9934
10054
|
this.notify();
|
|
9935
10055
|
return true;
|
|
@@ -9972,14 +10092,14 @@ var ImageEditorController = (_class13 = class {
|
|
|
9972
10092
|
/** Select › Grow: adds connected pixels within `tolerance` of a selected colour (one undo step). */
|
|
9973
10093
|
async growSelection(options = {}) {
|
|
9974
10094
|
const sel = this.state.selection;
|
|
9975
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10095
|
+
if (!_optionalChain([sel, 'optionalAccess', _329 => _329.bounds])) return false;
|
|
9976
10096
|
const pixels = await this.requirePixels(options);
|
|
9977
10097
|
return this.setSelection(growSelection(pixels, sel, options));
|
|
9978
10098
|
}
|
|
9979
10099
|
/** Select › Similar: adds every pixel within `tolerance` of a selected colour (one undo step). */
|
|
9980
10100
|
async selectSimilar(options = {}) {
|
|
9981
10101
|
const sel = this.state.selection;
|
|
9982
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10102
|
+
if (!_optionalChain([sel, 'optionalAccess', _330 => _330.bounds])) return false;
|
|
9983
10103
|
const pixels = await this.requirePixels(options);
|
|
9984
10104
|
return this.setSelection(selectSimilar(pixels, sel, options));
|
|
9985
10105
|
}
|
|
@@ -10080,7 +10200,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10080
10200
|
const { width, height } = this.naturalSize;
|
|
10081
10201
|
const image = await this.toDataURL({ format: "image/png" });
|
|
10082
10202
|
const results = await provider.segment({ ...request, image, width, height });
|
|
10083
|
-
_optionalChain([request, 'access',
|
|
10203
|
+
_optionalChain([request, 'access', _331 => _331.signal, 'optionalAccess', _332 => _332.throwIfAborted, 'call', _333 => _333()]);
|
|
10084
10204
|
const decoded = [];
|
|
10085
10205
|
for (const r of _nullishCoalesce(results, () => ( []))) decoded.push({ ...r, mask: r.mask !== void 0 ? await this.decodeMaskImage(r.mask) : void 0 });
|
|
10086
10206
|
return decoded;
|
|
@@ -10097,7 +10217,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10097
10217
|
let union = null;
|
|
10098
10218
|
for (const r of decoded) {
|
|
10099
10219
|
const one = segmentsToSelection(width, height, [r]);
|
|
10100
|
-
if (!_optionalChain([one, 'optionalAccess',
|
|
10220
|
+
if (!_optionalChain([one, 'optionalAccess', _334 => _334.bounds])) continue;
|
|
10101
10221
|
if ("rect" in target) {
|
|
10102
10222
|
const r0 = target.rect;
|
|
10103
10223
|
const grow = 0.1 * Math.max(r0.width, r0.height);
|
|
@@ -10161,7 +10281,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10161
10281
|
if (this.segmentation && options.useModel !== false) {
|
|
10162
10282
|
const { width, height } = this.naturalSize;
|
|
10163
10283
|
const sky = segmentsToSelection(width, height, await this.modelSegments({ target: "the sky", signal: options.signal }));
|
|
10164
|
-
if (!_optionalChain([sky, 'optionalAccess',
|
|
10284
|
+
if (!_optionalChain([sky, 'optionalAccess', _335 => _335.bounds])) return { selection: _nullishCoalesce(this.state.selection, () => ( null)), method: "model", note: "The segmentation model found no sky." };
|
|
10165
10285
|
this.setSelection(sky, _nullishCoalesce(options.mode, () => ( "replace")));
|
|
10166
10286
|
return { selection: _nullishCoalesce(this.state.selection, () => ( null)), method: "model" };
|
|
10167
10287
|
}
|
|
@@ -10192,7 +10312,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10192
10312
|
try {
|
|
10193
10313
|
const canvas = await this.renderSource();
|
|
10194
10314
|
const ctx = canvas.getContext("2d");
|
|
10195
|
-
const data2 = _optionalChain([ctx, 'optionalAccess',
|
|
10315
|
+
const data2 = _optionalChain([ctx, 'optionalAccess', _336 => _336.getImageData, 'optionalCall', _337 => _337(0, 0, width, height)]);
|
|
10196
10316
|
if (data2 && data2.data && data2.data.length >= width * height * 4) {
|
|
10197
10317
|
base = { width, height, data: data2.data };
|
|
10198
10318
|
this.samplePixels = base;
|
|
@@ -10267,7 +10387,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10267
10387
|
/** Select › Modify: grow, shrink, feather, border or smooth by `radius` pixels (one undo step). */
|
|
10268
10388
|
modifySelection(op, radius) {
|
|
10269
10389
|
const sel = this.state.selection;
|
|
10270
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10390
|
+
if (!_optionalChain([sel, 'optionalAccess', _338 => _338.bounds])) return false;
|
|
10271
10391
|
return this.setSelection(_chunkUYXL6ZWQcjs.modifySelection.call(void 0, sel, op, radius));
|
|
10272
10392
|
}
|
|
10273
10393
|
/**
|
|
@@ -10276,10 +10396,111 @@ var ImageEditorController = (_class13 = class {
|
|
|
10276
10396
|
*/
|
|
10277
10397
|
async refineSelection(params, options = {}) {
|
|
10278
10398
|
const sel = this.state.selection;
|
|
10279
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10399
|
+
if (!_optionalChain([sel, 'optionalAccess', _339 => _339.bounds])) return false;
|
|
10280
10400
|
const pixels = (_nullishCoalesce(params.radius, () => ( 0))) > 0 ? await this.requirePixels(options) : null;
|
|
10281
10401
|
return this.setSelection(refineSelection(pixels, sel, params));
|
|
10282
10402
|
}
|
|
10403
|
+
/**
|
|
10404
|
+
* Select and Mask's output: refines the selection with `params`, then puts the result where
|
|
10405
|
+
* `output` says, as one undo step:
|
|
10406
|
+
* - `selection`: the refined selection;
|
|
10407
|
+
* - `layer-mask`: a mask on the layer (`layerId`, default the active one), then deselects;
|
|
10408
|
+
* - `new-layer`: a new layer of the layer's selected pixels (Layer via Copy), the source hidden;
|
|
10409
|
+
* - `new-layer-with-mask`: a copy of the layer masked by the selection, the source hidden.
|
|
10410
|
+
* `decontaminate` (0..100, new-layer outputs only) replaces the old background's colour in the
|
|
10411
|
+
* soft edge with the subject's own (see `decontaminateColors`).
|
|
10412
|
+
*
|
|
10413
|
+
* `edits` are the workspace's strokes, applied first in order (Quick Selection, Brush and
|
|
10414
|
+
* Refine Edge Brush; see `RefineEdit`); with them, an empty selection is a valid start.
|
|
10415
|
+
* `refineMode: 'object'` asks the segmentation provider for the object in the selection's
|
|
10416
|
+
* bounds and refines from its outline, kept to near the selection's edge.
|
|
10417
|
+
*/
|
|
10418
|
+
async refineSelectionTo(params, output = "selection", options = {}) {
|
|
10419
|
+
const edits = _nullishCoalesce(options.edits, () => ( []));
|
|
10420
|
+
const refineMode = _nullishCoalesce(options.refineMode, () => ( "color"));
|
|
10421
|
+
if (!_optionalChain([this, 'access', _340 => _340.state, 'access', _341 => _341.selection, 'optionalAccess', _342 => _342.bounds]) && !edits.length) throw new Error("Nothing is selected; select first, or pass edits that paint a selection.");
|
|
10422
|
+
if (refineMode === "object" && !this.segmentation) {
|
|
10423
|
+
throw new Error("Object aware refinement needs a segmentation model (setSegmentationProvider); use refineMode color.");
|
|
10424
|
+
}
|
|
10425
|
+
const amount = Math.min(100, Math.max(0, _nullishCoalesce(options.decontaminate, () => ( 0)))) / 100;
|
|
10426
|
+
const toLayer = output === "new-layer" || output === "new-layer-with-mask";
|
|
10427
|
+
if (amount > 0 && !toLayer) throw new Error("Decontaminate colors writes the cleaned colours to a new layer: use output new-layer or new-layer-with-mask.");
|
|
10428
|
+
let layerId;
|
|
10429
|
+
if (output !== "selection") {
|
|
10430
|
+
layerId = _nullishCoalesce(_nullishCoalesce(options.layerId, () => ( this.state.activeLayerId)), () => ( void 0));
|
|
10431
|
+
if (!layerId) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("No layer given and none is active; pass layerId (see list_layers).");
|
|
10432
|
+
const layer = _chunkUYXL6ZWQcjs.requireLayer.call(void 0, this.state.layers, layerId).layer;
|
|
10433
|
+
if (toLayer && layer.type !== "pixel") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Output ${output} needs a pixel layer; "${layerId}" is a ${layer.type} layer.`);
|
|
10434
|
+
}
|
|
10435
|
+
const needsPixels = (_nullishCoalesce(params.radius, () => ( 0))) > 0 || edits.some((e) => e.kind !== "brush");
|
|
10436
|
+
const pixels = needsPixels ? await this.requirePixels(options) : null;
|
|
10437
|
+
const { width, height } = this.naturalSize;
|
|
10438
|
+
const edited = applyRefineEdits(pixels, _nullishCoalesce(this.state.selection, () => ( null)), edits, width, height);
|
|
10439
|
+
let sel = edited.selection;
|
|
10440
|
+
if (!_optionalChain([sel, 'optionalAccess', _343 => _343.bounds])) throw new Error("The edits leave nothing selected; paint with mode add first.");
|
|
10441
|
+
if (refineMode === "object") {
|
|
10442
|
+
const b = sel.bounds;
|
|
10443
|
+
const found = await this.modelObject({ rect: b }, options.signal);
|
|
10444
|
+
if (!found) throw new Error("The segmentation model found no object in the selection; use refineMode color.");
|
|
10445
|
+
const near = _chunkUYXL6ZWQcjs.modifySelection.call(void 0, sel, "expand", Math.max(4, _nullishCoalesce(params.radius, () => ( 8))));
|
|
10446
|
+
const clipped = _chunkUYXL6ZWQcjs.combineSelections.call(void 0, found, near, "intersect");
|
|
10447
|
+
if (!_optionalChain([clipped, 'optionalAccess', _344 => _344.bounds])) throw new Error("The segmentation model found no object in the selection; use refineMode color.");
|
|
10448
|
+
sel = clipped;
|
|
10449
|
+
}
|
|
10450
|
+
const refined = refineSelection(pixels, sel, params, edited.refineBrush);
|
|
10451
|
+
if (!refined.bounds) throw new Error("Refining left nothing selected; use a smaller shiftEdge or contrast.");
|
|
10452
|
+
return this.asOneStep(() => {
|
|
10453
|
+
this.setSelection(refined);
|
|
10454
|
+
if (output === "selection") return { output, refineMode };
|
|
10455
|
+
if (output === "layer-mask") {
|
|
10456
|
+
this.addLayerMask(layerId, "selection");
|
|
10457
|
+
this.setSelection(null);
|
|
10458
|
+
return { output, layerId, refineMode };
|
|
10459
|
+
}
|
|
10460
|
+
let newLayerId2;
|
|
10461
|
+
if (output === "new-layer") newLayerId2 = this.layerViaCopy({ layerId });
|
|
10462
|
+
else {
|
|
10463
|
+
newLayerId2 = this.duplicateLayer(layerId);
|
|
10464
|
+
this.addLayerMask(newLayerId2, "selection");
|
|
10465
|
+
this.state.activeTarget = "pixels";
|
|
10466
|
+
}
|
|
10467
|
+
if (amount > 0) this.decontaminateLayer(newLayerId2, layerId, refined, amount, Math.max(4, _nullishCoalesce(params.radius, () => ( 0))));
|
|
10468
|
+
this.setLayerProperties(layerId, { visible: false });
|
|
10469
|
+
this.setSelection(null);
|
|
10470
|
+
return { output, layerId, newLayerId: newLayerId2, refineMode };
|
|
10471
|
+
});
|
|
10472
|
+
}
|
|
10473
|
+
/**
|
|
10474
|
+
* Decontaminate Colors along the soft edge of `coverage`: the colours are estimated from the
|
|
10475
|
+
* source layer (whose background is still there) and written into layer `id`'s RGB, keeping
|
|
10476
|
+
* its alpha.
|
|
10477
|
+
*/
|
|
10478
|
+
decontaminateLayer(id, sourceId, coverage, amount, radius) {
|
|
10479
|
+
const layer = _chunkUYXL6ZWQcjs.requireLayer.call(void 0, this.state.layers, id).layer;
|
|
10480
|
+
const source = _chunkUYXL6ZWQcjs.requireLayer.call(void 0, this.state.layers, sourceId).layer;
|
|
10481
|
+
if (layer.type !== "pixel" || source.type !== "pixel" || !coverage.bounds) return;
|
|
10482
|
+
const { width, height } = this.naturalSize;
|
|
10483
|
+
const pad = Math.ceil(radius * 3);
|
|
10484
|
+
const b = coverage.bounds;
|
|
10485
|
+
const x0 = Math.max(0, b.x - pad);
|
|
10486
|
+
const y0 = Math.max(0, b.y - pad);
|
|
10487
|
+
const box = { x: x0, y: y0, width: Math.min(width, b.x + b.width + pad) - x0, height: Math.min(height, b.y + b.height + pad) - y0 };
|
|
10488
|
+
const src = { x: box.x - layer.offset.x, y: box.y - layer.offset.y, width: box.width, height: box.height };
|
|
10489
|
+
const surface = this.surfaceOf(layer);
|
|
10490
|
+
const rgba = _chunkCWM3CUUXcjs.readRegion.call(void 0, surface, src);
|
|
10491
|
+
const original = _chunkCWM3CUUXcjs.readRegion.call(void 0, this.surfaceOf(source), { x: box.x - source.offset.x, y: box.y - source.offset.y, width: box.width, height: box.height });
|
|
10492
|
+
const cov = new Uint8Array(box.width * box.height);
|
|
10493
|
+
const all = coverage.data;
|
|
10494
|
+
for (let y = 0; y < box.height; y++) cov.set(all.subarray((box.y + y) * width + box.x, (box.y + y) * width + box.x + box.width), y * box.width);
|
|
10495
|
+
const cleaned = decontaminateColors(original, cov, box.width, box.height, amount, radius);
|
|
10496
|
+
for (let i = 3; i < cleaned.length; i += 4) cleaned[i] = rgba[i];
|
|
10497
|
+
const next = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, id, (l) => {
|
|
10498
|
+
const updated = { ...l, surface: _chunkCWM3CUUXcjs.writeRegion.call(void 0, surface, src, cleaned) };
|
|
10499
|
+
delete updated.source;
|
|
10500
|
+
return updated;
|
|
10501
|
+
});
|
|
10502
|
+
this.commitLayers(next);
|
|
10503
|
+
}
|
|
10283
10504
|
/**
|
|
10284
10505
|
* Loads a selection from a mask image (an AI segmentation, a saved mask): a data URL / URL or
|
|
10285
10506
|
* RGBA pixels, by luminance (white = selected) or a channel. Any size; it is resampled.
|
|
@@ -10307,7 +10528,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10307
10528
|
let mask;
|
|
10308
10529
|
if (source === "selection") {
|
|
10309
10530
|
const sel = this.state.selection;
|
|
10310
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10531
|
+
if (!_optionalChain([sel, 'optionalAccess', _345 => _345.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or export a channel or a layer mask.");
|
|
10311
10532
|
mask = sel;
|
|
10312
10533
|
} else if ("channelId" in source) {
|
|
10313
10534
|
mask = this.requireChannel(source.channelId).mask;
|
|
@@ -10331,7 +10552,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10331
10552
|
const canvas = this.renderer.createCanvas(w, h);
|
|
10332
10553
|
const ctx = canvas.getContext("2d");
|
|
10333
10554
|
if (ctx) ctx.drawImage(img, 0, 0, w, h);
|
|
10334
|
-
const data = _optionalChain([ctx, 'optionalAccess',
|
|
10555
|
+
const data = _optionalChain([ctx, 'optionalAccess', _346 => _346.getImageData, 'optionalCall', _347 => _347(0, 0, w, h)]);
|
|
10335
10556
|
if (!data) throw new Error("The mask image pixels are not available (no canvas access); pass pixels.");
|
|
10336
10557
|
return { width: w, height: h, data: data.data };
|
|
10337
10558
|
}
|
|
@@ -10347,7 +10568,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10347
10568
|
const provider = this.segmentation;
|
|
10348
10569
|
if (!provider) {
|
|
10349
10570
|
const pixels = await this.requirePixels({});
|
|
10350
|
-
_optionalChain([options, 'access',
|
|
10571
|
+
_optionalChain([options, 'access', _348 => _348.signal, 'optionalAccess', _349 => _349.throwIfAborted, 'call', _350 => _350()]);
|
|
10351
10572
|
const { selection, reason } = findSubject(pixels, { enhanceEdge: options.enhanceEdge });
|
|
10352
10573
|
if (selection.bounds) this.shapeCommand(selection, options);
|
|
10353
10574
|
const unused = target.trim() ? ` "${target.trim()}" was not used to choose it.` : "";
|
|
@@ -10363,17 +10584,17 @@ var ImageEditorController = (_class13 = class {
|
|
|
10363
10584
|
const decoded = await this.modelSegments({ target: description, maxSegments: options.maxSegments, signal: options.signal });
|
|
10364
10585
|
const segments = decoded.map((r) => {
|
|
10365
10586
|
const one = segmentsToSelection(width, height, [r]);
|
|
10366
|
-
return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess',
|
|
10587
|
+
return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess', _351 => _351.bounds]), () => ( null)), ...r.score !== void 0 ? { score: r.score } : {} };
|
|
10367
10588
|
});
|
|
10368
10589
|
const mask = segmentsToSelection(width, height, decoded);
|
|
10369
10590
|
if (mask && options.beforeApply) {
|
|
10370
10591
|
const outlines = decoded.flatMap((r, i) => {
|
|
10371
10592
|
const rings = segmentationOutlines(r);
|
|
10372
|
-
const b = _optionalChain([segments, 'access',
|
|
10593
|
+
const b = _optionalChain([segments, 'access', _352 => _352[i], 'optionalAccess', _353 => _353.bounds]);
|
|
10373
10594
|
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 }]] : [];
|
|
10374
10595
|
});
|
|
10375
10596
|
await options.beforeApply(outlines);
|
|
10376
|
-
_optionalChain([options, 'access',
|
|
10597
|
+
_optionalChain([options, 'access', _354 => _354.signal, 'optionalAccess', _355 => _355.throwIfAborted, 'call', _356 => _356()]);
|
|
10377
10598
|
}
|
|
10378
10599
|
if (mask) this.shapeCommand(mask, options);
|
|
10379
10600
|
return { segments: segments.filter((s) => s.bounds), method: "model" };
|
|
@@ -10406,7 +10627,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10406
10627
|
const view = this.state.maskView;
|
|
10407
10628
|
if (!view) return null;
|
|
10408
10629
|
const layer = this.getLayer(view.layerId);
|
|
10409
|
-
return _optionalChain([layer, 'optionalAccess',
|
|
10630
|
+
return _optionalChain([layer, 'optionalAccess', _357 => _357.mask]) && !layer.mask.source ? view : null;
|
|
10410
10631
|
}
|
|
10411
10632
|
/**
|
|
10412
10633
|
* Shows a layer's mask on the canvas: `gray` alone in grey (Alt-click the mask thumbnail),
|
|
@@ -10429,7 +10650,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10429
10650
|
if (!layer.mask) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask to show; add one with add_layer_mask.`);
|
|
10430
10651
|
if (layer.mask.source) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${layer.name || id}" has a depth mask, which is computed, not painted, so it has no mask view.`);
|
|
10431
10652
|
const cur = this.state.maskView;
|
|
10432
|
-
if (_optionalChain([cur, 'optionalAccess',
|
|
10653
|
+
if (_optionalChain([cur, 'optionalAccess', _358 => _358.layerId]) !== id || cur.mode !== mode) {
|
|
10433
10654
|
this.state.maskView = { layerId: id, mode };
|
|
10434
10655
|
this.notify();
|
|
10435
10656
|
}
|
|
@@ -10441,7 +10662,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10441
10662
|
return _nullishCoalesce(this.state.channels, () => ( []));
|
|
10442
10663
|
}
|
|
10443
10664
|
getChannel(id) {
|
|
10444
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
10665
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _359 => _359.state, 'access', _360 => _360.channels, 'optionalAccess', _361 => _361.find, 'call', _362 => _362((c) => c.id === id)]), () => ( null));
|
|
10445
10666
|
}
|
|
10446
10667
|
requireChannel(id) {
|
|
10447
10668
|
const channel = this.getChannel(id);
|
|
@@ -10470,14 +10691,14 @@ var ImageEditorController = (_class13 = class {
|
|
|
10470
10691
|
*/
|
|
10471
10692
|
saveSelection(options = {}) {
|
|
10472
10693
|
const sel = this.state.selection;
|
|
10473
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10694
|
+
if (!_optionalChain([sel, 'optionalAccess', _363 => _363.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then save the selection to a channel.");
|
|
10474
10695
|
const { width, height } = this.naturalSize;
|
|
10475
10696
|
const sized = sel.width === width && sel.height === height ? sel : _chunkUYXL6ZWQcjs.resizeSelection.call(void 0, sel, width, height);
|
|
10476
10697
|
const channels = [...this.getChannels()];
|
|
10477
10698
|
if (options.channelId !== void 0) {
|
|
10478
10699
|
const existing = this.requireChannel(options.channelId);
|
|
10479
10700
|
const mask = _nullishCoalesce(_chunkUYXL6ZWQcjs.combineSelections.call(void 0, existing.mask.bounds ? existing.mask : null, sized, _nullishCoalesce(options.mode, () => ( "replace"))), () => ( _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, width, height)));
|
|
10480
|
-
const next = { ...existing, mask, ..._optionalChain([options, 'access',
|
|
10701
|
+
const next = { ...existing, mask, ..._optionalChain([options, 'access', _364 => _364.name, 'optionalAccess', _365 => _365.trim, 'call', _366 => _366()]) ? { name: options.name.trim() } : {} };
|
|
10481
10702
|
this.setChannels(channels.map((c) => c.id === existing.id ? next : c));
|
|
10482
10703
|
return next;
|
|
10483
10704
|
}
|
|
@@ -10488,7 +10709,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10488
10709
|
const channels = this.getChannels();
|
|
10489
10710
|
const channel = {
|
|
10490
10711
|
id: this.newChannelId(),
|
|
10491
|
-
name: _optionalChain([name, 'optionalAccess',
|
|
10712
|
+
name: _optionalChain([name, 'optionalAccess', _367 => _367.trim, 'call', _368 => _368()]) || `Alpha ${channels.length + 1}`,
|
|
10492
10713
|
mask,
|
|
10493
10714
|
color: DEFAULT_CHANNEL_COLOR,
|
|
10494
10715
|
opacity: 0.5,
|
|
@@ -10533,7 +10754,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10533
10754
|
/** Duplicates an alpha channel just after it (one undo step). Returns the copy. */
|
|
10534
10755
|
duplicateChannel(id, name) {
|
|
10535
10756
|
const channel = this.requireChannel(id);
|
|
10536
|
-
const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess',
|
|
10757
|
+
const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess', _369 => _369.trim, 'call', _370 => _370()]) || `${channel.name} copy` };
|
|
10537
10758
|
const channels = [...this.getChannels()];
|
|
10538
10759
|
channels.splice(channels.findIndex((c) => c.id === id) + 1, 0, copy);
|
|
10539
10760
|
this.setChannels(channels);
|
|
@@ -10564,7 +10785,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10564
10785
|
quickMaskSurface() {
|
|
10565
10786
|
const { width, height } = this.naturalSize;
|
|
10566
10787
|
const sel = this.state.selection;
|
|
10567
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10788
|
+
if (!_optionalChain([sel, 'optionalAccess', _371 => _371.bounds])) return _chunkCWM3CUUXcjs.emptySurface.call(void 0, 1, 0);
|
|
10568
10789
|
return (sel.width === width && sel.height === height ? sel : _chunkUYXL6ZWQcjs.resizeSelection.call(void 0, sel, width, height)).surface;
|
|
10569
10790
|
}
|
|
10570
10791
|
/** The selection a painted Quick Mask surface stands for (it shares the surface's tiles). */
|
|
@@ -10585,7 +10806,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10585
10806
|
*/
|
|
10586
10807
|
applySelectionAsLayerMask(layerId, props = {}) {
|
|
10587
10808
|
const sel = this.state.selection;
|
|
10588
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10809
|
+
if (!_optionalChain([sel, 'optionalAccess', _372 => _372.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
|
|
10589
10810
|
return this.setLayerMask(layerId, this.maskFromSelection(sel, props));
|
|
10590
10811
|
}
|
|
10591
10812
|
setLayerMask(layerId, mask, commitToHistory = true) {
|
|
@@ -10625,7 +10846,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10625
10846
|
/** A layer's painted mask over the canvas as a selection mask; null without one (or for a depth mask). */
|
|
10626
10847
|
layerMaskCoverage(layerId) {
|
|
10627
10848
|
const layer = this.getLayer(layerId);
|
|
10628
|
-
if (!_optionalChain([layer, 'optionalAccess',
|
|
10849
|
+
if (!_optionalChain([layer, 'optionalAccess', _373 => _373.mask]) || layer.mask.source) return null;
|
|
10629
10850
|
const { width, height } = this.naturalSize;
|
|
10630
10851
|
const ox = layer.type === "pixel" ? layer.offset.x : 0;
|
|
10631
10852
|
const oy = layer.type === "pixel" ? layer.offset.y : 0;
|
|
@@ -10660,7 +10881,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10660
10881
|
this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
|
|
10661
10882
|
const next = { ...l };
|
|
10662
10883
|
if (_chunkUYXL6ZWQcjs.isDefaultDepthMask.call(void 0, merged)) {
|
|
10663
|
-
if (_optionalChain([next, 'access',
|
|
10884
|
+
if (_optionalChain([next, 'access', _374 => _374.mask, 'optionalAccess', _375 => _375.source])) delete next.mask;
|
|
10664
10885
|
} else next.mask = _chunkUYXL6ZWQcjs.depthRasterMask.call(void 0, merged);
|
|
10665
10886
|
return next;
|
|
10666
10887
|
});
|
|
@@ -10670,7 +10891,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10670
10891
|
resetDepthMask() {
|
|
10671
10892
|
this.recordHistory();
|
|
10672
10893
|
const target = this.developLayer();
|
|
10673
|
-
if (_optionalChain([target, 'optionalAccess',
|
|
10894
|
+
if (_optionalChain([target, 'optionalAccess', _376 => _376.mask, 'optionalAccess', _377 => _377.source])) {
|
|
10674
10895
|
this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
|
|
10675
10896
|
const next = { ...l };
|
|
10676
10897
|
delete next.mask;
|
|
@@ -10682,7 +10903,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10682
10903
|
// --- Annotations & Layers ---
|
|
10683
10904
|
/** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
|
|
10684
10905
|
annotationLayer(id) {
|
|
10685
|
-
return _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkUYXL6ZWQcjs.annotationOfLayer.call(void 0, l), 'optionalAccess',
|
|
10906
|
+
return _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkUYXL6ZWQcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _378 => _378.id]) === id);
|
|
10686
10907
|
}
|
|
10687
10908
|
/** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
|
|
10688
10909
|
annotationEnv() {
|
|
@@ -10700,7 +10921,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10700
10921
|
const fullAnnotation = { ...annotation, id };
|
|
10701
10922
|
const layer = _chunkUYXL6ZWQcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
|
|
10702
10923
|
const loc = placement.aboveId ? _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
|
|
10703
|
-
this.state.layers = loc ? _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
10924
|
+
this.state.layers = loc ? _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _379 => _379.parent, 'optionalAccess', _380 => _380.id]), () => ( null)), loc.index + 1) : _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, null);
|
|
10704
10925
|
this.state.selectedAnnotationId = id;
|
|
10705
10926
|
this.notify();
|
|
10706
10927
|
return id;
|
|
@@ -10823,7 +11044,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10823
11044
|
await this.renderer.renderToCanvas(targetCanvas, source, this.state, {
|
|
10824
11045
|
...options,
|
|
10825
11046
|
// The clone source follows the brush cursor (both editors pass it).
|
|
10826
|
-
cloneSourceMarker: _optionalChain([options, 'optionalAccess',
|
|
11047
|
+
cloneSourceMarker: _optionalChain([options, 'optionalAccess', _381 => _381.cloneSourceMarker]) !== void 0 ? options.cloneSourceMarker : _optionalChain([options, 'optionalAccess', _382 => _382.brushCursor]) ? this.cloneSourceMarker(options.brushCursor) : null,
|
|
10827
11048
|
dirty: dirty === "all" ? void 0 : dirty,
|
|
10828
11049
|
checkpointLayerId: this.state.activeLayerId
|
|
10829
11050
|
});
|
|
@@ -10836,7 +11057,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10836
11057
|
return this.renderer.createCanvas(1, 1);
|
|
10837
11058
|
}
|
|
10838
11059
|
this.syncViews();
|
|
10839
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
11060
|
+
if (_optionalChain([options, 'optionalAccess', _383 => _383.layerIds])) {
|
|
10840
11061
|
const keep = new Set(options.layerIds);
|
|
10841
11062
|
const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => keep.has(l.id));
|
|
10842
11063
|
return this.renderer.renderExport(source, { ...this.state, layers }, options);
|
|
@@ -10990,7 +11211,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
10990
11211
|
let px2 = await this.decodeImage(newDataUrl);
|
|
10991
11212
|
if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
|
|
10992
11213
|
const data = new Uint8ClampedArray(px2.data);
|
|
10993
|
-
const sel = _optionalChain([this, 'access',
|
|
11214
|
+
const sel = _optionalChain([this, 'access', _384 => _384.state, 'access', _385 => _385.selection, 'optionalAccess', _386 => _386.bounds]) ? this.state.selection : null;
|
|
10994
11215
|
if (sel) for (let p = 0, i = 3; p < width * height; p++, i += 4) data[i] = Math.round(data[i] * sel.data[p] / 255);
|
|
10995
11216
|
return this.addPixelLayer({ name: "Inpaint", pixels: { width, height, data } });
|
|
10996
11217
|
}
|
|
@@ -11037,7 +11258,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
11037
11258
|
}
|
|
11038
11259
|
/** Font families the shaper offers (generic families at least). */
|
|
11039
11260
|
listFonts() {
|
|
11040
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
11261
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _387 => _387.getTextShaper, 'call', _388 => _388(), 'optionalAccess', _389 => _389.families, 'optionalCall', _390 => _390()]), () => ( ["sans-serif", "serif", "monospace"]));
|
|
11041
11262
|
}
|
|
11042
11263
|
typeInfo(id) {
|
|
11043
11264
|
const layer = _chunkUYXL6ZWQcjs.requireTypeLayer.call(void 0, this.state.layers, id);
|
|
@@ -11111,8 +11332,8 @@ var ImageEditorController = (_class13 = class {
|
|
|
11111
11332
|
const layer = this.layoutTypeLayer({ ...init, text, orientation: vertical ? "vertical" : "horizontal" });
|
|
11112
11333
|
const { width, height } = this.naturalSize;
|
|
11113
11334
|
const b = _chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.surface);
|
|
11114
|
-
const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess',
|
|
11115
|
-
const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess',
|
|
11335
|
+
const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _391 => _391.x]), () => ( 0)));
|
|
11336
|
+
const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _392 => _392.y]), () => ( 0)));
|
|
11116
11337
|
const x1 = Math.min(width, b ? b.x + b.width : 0);
|
|
11117
11338
|
const y1 = Math.min(height, b ? b.y + b.height : 0);
|
|
11118
11339
|
let mask;
|
|
@@ -11289,7 +11510,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
11289
11510
|
if (colors.size > 1) warnings.push("The text had several colours; the shape takes the first one.");
|
|
11290
11511
|
const missing = _chunkBRKVNXDZcjs.layoutText.call(void 0, layer, shaper).missingFonts;
|
|
11291
11512
|
if (missing.length) warnings.push(`Missing fonts were drawn with a fallback: ${missing.join(", ")}.`);
|
|
11292
|
-
const first = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
11513
|
+
const first = _nullishCoalesce(_optionalChain([layer, 'access', _393 => _393.runs, 'access', _394 => _394.find, 'call', _395 => _395((r) => r.length > 0), 'optionalAccess', _396 => _396.style]), () => ( _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE));
|
|
11293
11514
|
const fill = first.opacity !== void 0 && first.opacity !== 1 ? { type: "color", color: first.color, opacity: first.opacity } : { type: "color", color: first.color };
|
|
11294
11515
|
const shape = _chunkUYXL6ZWQcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
|
|
11295
11516
|
const keep = { visible: layer.visible, opacity: layer.opacity, blend: layer.blend };
|
|
@@ -11322,7 +11543,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
11322
11543
|
// --- Shape layers ---
|
|
11323
11544
|
/** What shape rendering needs: the canvas size and the document's patterns. */
|
|
11324
11545
|
shapeEnv() {
|
|
11325
|
-
return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
11546
|
+
return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _397 => _397.state, 'access', _398 => _398.patterns, 'optionalAccess', _399 => _399.find, 'call', _400 => _400((p) => p.id === id)]), () => ( null)) };
|
|
11326
11547
|
}
|
|
11327
11548
|
/** One component from tool or UI input (validated). */
|
|
11328
11549
|
componentFrom(spec, path) {
|
|
@@ -11365,9 +11586,9 @@ var ImageEditorController = (_class13 = class {
|
|
|
11365
11586
|
* open path) and stroked with `stroke`. Goes above the active layer unless placed. Returns its id.
|
|
11366
11587
|
*/
|
|
11367
11588
|
addShapeLayer(init) {
|
|
11368
|
-
const specs = _optionalChain([init, 'access',
|
|
11369
|
-
if (_optionalChain([init, 'access',
|
|
11370
|
-
const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access',
|
|
11589
|
+
const specs = _optionalChain([init, 'access', _401 => _401.components, 'optionalAccess', _402 => _402.length]) ? init.components : [init];
|
|
11590
|
+
if (_optionalChain([init, 'access', _403 => _403.components, 'optionalAccess', _404 => _404.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
|
|
11591
|
+
const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _405 => _405.components, 'optionalAccess', _406 => _406.length]) ? `components[${i}].` : ""));
|
|
11371
11592
|
const stroke = init.stroke ? _chunkUYXL6ZWQcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
|
|
11372
11593
|
const openOnly = components.every((c) => !c.live && c.subpaths.every((sp) => !sp.closed));
|
|
11373
11594
|
const fill = init.fill === void 0 ? stroke && openOnly ? null : _chunkUYXL6ZWQcjs.normalizeShapePaint.call(void 0, this.state.paint.foreground, "fill") : init.fill === null ? null : _chunkUYXL6ZWQcjs.normalizeShapePaint.call(void 0, init.fill, "fill");
|
|
@@ -11478,7 +11699,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
11478
11699
|
if (layer.locks) next.locks = layer.locks;
|
|
11479
11700
|
if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
|
|
11480
11701
|
} else if (layer.type === "pixel") {
|
|
11481
|
-
if (!_optionalChain([layer, 'access',
|
|
11702
|
+
if (!_optionalChain([layer, 'access', _407 => _407.filters, 'optionalAccess', _408 => _408.length])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
|
|
11482
11703
|
_chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
|
|
11483
11704
|
const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
|
|
11484
11705
|
const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
|
|
@@ -11497,7 +11718,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
11497
11718
|
return this.rasterizeSmartObject(id);
|
|
11498
11719
|
} else if (layer.type === "shape" || layer.type === "type") {
|
|
11499
11720
|
next = layer.type === "shape" ? _chunkUYXL6ZWQcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkUYXL6ZWQcjs.typeAsPixelLayer.call(void 0, layer);
|
|
11500
|
-
if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access',
|
|
11721
|
+
if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _409 => _409.annotation, 'optionalAccess', _410 => _410.id])) this.state.selectedAnnotationId = null;
|
|
11501
11722
|
} else {
|
|
11502
11723
|
throw new (0, _chunkUYXL6ZWQcjs.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.`);
|
|
11503
11724
|
}
|
|
@@ -11511,8 +11732,8 @@ var ImageEditorController = (_class13 = class {
|
|
|
11511
11732
|
const doc = this.state.colorProfile;
|
|
11512
11733
|
const p = resolveProfile(doc);
|
|
11513
11734
|
const m = this.state.colorMode;
|
|
11514
|
-
const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess',
|
|
11515
|
-
if (_optionalChain([m, 'optionalAccess',
|
|
11735
|
+
const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _411 => _411.name]), () => ( p.description)), builtin: doc ? _nullishCoalesce(doc.builtin, () => ( null)) : "srgb", colorSpace: p.colorSpace, srgb: isSrgb(doc), mode: _nullishCoalesce(_optionalChain([m, 'optionalAccess', _412 => _412.mode]), () => ( "rgb")) };
|
|
11736
|
+
if (_optionalChain([m, 'optionalAccess', _413 => _413.mode]) === "cmyk") out.cmykProfile = { name: m.profile.name, builtin: _nullishCoalesce(m.profile.builtin, () => ( null)), intent: m.intent };
|
|
11516
11737
|
return out;
|
|
11517
11738
|
}
|
|
11518
11739
|
/**
|
|
@@ -11602,7 +11823,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
11602
11823
|
const textEnv = this.textEnv();
|
|
11603
11824
|
const walk = (layers) => layers.map((l) => {
|
|
11604
11825
|
let next2 = l;
|
|
11605
|
-
if (_optionalChain([l, 'access',
|
|
11826
|
+
if (_optionalChain([l, 'access', _414 => _414.effects, 'optionalAccess', _415 => _415.items, 'access', _416 => _416.length])) next2 = { ...next2, effects: convertColorFields(l.effects, hex) };
|
|
11606
11827
|
if (l.type === "group") {
|
|
11607
11828
|
if (next2 !== l) converted.push(l.id);
|
|
11608
11829
|
return { ...next2, children: walk(l.children) };
|
|
@@ -11786,8 +12007,8 @@ var ImageEditorController = (_class13 = class {
|
|
|
11786
12007
|
else delete s.bitDepth;
|
|
11787
12008
|
delete s.colorProfile;
|
|
11788
12009
|
delete s.colorMode;
|
|
11789
|
-
if (_optionalChain([result, 'access',
|
|
11790
|
-
else if (_optionalChain([result, 'access',
|
|
12010
|
+
if (_optionalChain([result, 'access', _417 => _417.sourceMode, 'optionalAccess', _418 => _418.mode]) === "cmyk") s.colorMode = { mode: "cmyk", profile: result.sourceMode.profile, intent: "relative" };
|
|
12011
|
+
else if (_optionalChain([result, 'access', _419 => _419.sourceMode, 'optionalAccess', _420 => _420.mode]) === "lab") s.colorMode = { mode: "lab" };
|
|
11791
12012
|
else if (result.iccProfile) {
|
|
11792
12013
|
try {
|
|
11793
12014
|
const doc = documentProfile(result.iccProfile);
|
|
@@ -11851,7 +12072,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
11851
12072
|
const compositor = new (0, _chunkUYXL6ZWQcjs.LayerCompositor)();
|
|
11852
12073
|
const bakeMask = (layer) => {
|
|
11853
12074
|
const mask = layer.mask;
|
|
11854
|
-
if (!_optionalChain([mask, 'optionalAccess',
|
|
12075
|
+
if (!_optionalChain([mask, 'optionalAccess', _421 => _421.source])) return mask;
|
|
11855
12076
|
add2("Parametric (depth) masks were baked into pixel masks", layer.name);
|
|
11856
12077
|
const plain3 = { ...layer, mask: { ...mask, density: 1, feather: 0, enabled: true } };
|
|
11857
12078
|
const ox = layer.type === "pixel" ? layer.offset.x : 0;
|
|
@@ -11868,7 +12089,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
11868
12089
|
};
|
|
11869
12090
|
const prepare = async (layer) => {
|
|
11870
12091
|
const p = await prepareLayer(layer);
|
|
11871
|
-
if (_optionalChain([p, 'optionalAccess',
|
|
12092
|
+
if (_optionalChain([p, 'optionalAccess', _422 => _422.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
|
|
11872
12093
|
return p;
|
|
11873
12094
|
};
|
|
11874
12095
|
const prepareLayer = async (layer) => {
|
|
@@ -11911,7 +12132,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
11911
12132
|
return out2;
|
|
11912
12133
|
}
|
|
11913
12134
|
if (layer.type === "shape" || layer.type === "type") {
|
|
11914
|
-
if (layer.type === "type" && _optionalChain([layer, 'access',
|
|
12135
|
+
if (layer.type === "type" && _optionalChain([layer, 'access', _423 => _423.missingFonts, 'optionalAccess', _424 => _424.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);
|
|
11915
12136
|
const out2 = { ...layer };
|
|
11916
12137
|
const mask2 = bakeMask(layer);
|
|
11917
12138
|
if (mask2) out2.mask = mask2;
|
|
@@ -11930,7 +12151,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
11930
12151
|
out.surface = this.surfaceOf(layer);
|
|
11931
12152
|
delete out.source;
|
|
11932
12153
|
}
|
|
11933
|
-
const active = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
12154
|
+
const active = _nullishCoalesce(_optionalChain([layer, 'access', _425 => _425.filters, 'optionalAccess', _426 => _426.filter, 'call', _427 => _427(_chunkUYXL6ZWQcjs.isActiveFilter)]), () => ( []));
|
|
11934
12155
|
if (active.length) {
|
|
11935
12156
|
add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
|
|
11936
12157
|
const content = { ...out, visible: true, opacity: 1, blend: "normal" };
|
|
@@ -11941,7 +12162,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
11941
12162
|
const data = compositor.composite([content], canvas, sources);
|
|
11942
12163
|
out = { ...out, surface: _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width, height, data }, 4, -layer.offset.x, -layer.offset.y) };
|
|
11943
12164
|
}
|
|
11944
|
-
if (_optionalChain([layer, 'access',
|
|
12165
|
+
if (_optionalChain([layer, 'access', _428 => _428.filters, 'optionalAccess', _429 => _429.some, 'call', _430 => _430((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
|
|
11945
12166
|
delete out.filters;
|
|
11946
12167
|
const mask = bakeMask(layer);
|
|
11947
12168
|
if (mask) out.mask = mask;
|
|
@@ -12005,7 +12226,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
12005
12226
|
);
|
|
12006
12227
|
}
|
|
12007
12228
|
layers = resizeLegacyMasks(layers, prev, next.dimensions);
|
|
12008
|
-
const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
12229
|
+
const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access', _431 => _431.state, 'access', _432 => _432.patterns, 'optionalAccess', _433 => _433.find, 'call', _434 => _434((p) => p.id === pid)]), () => ( null)) };
|
|
12009
12230
|
for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers)) {
|
|
12010
12231
|
if (l.type === "annotation") {
|
|
12011
12232
|
layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, annotation: scaleAnnotation(l.annotation, sx, sy) }));
|
|
@@ -12014,7 +12235,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
12014
12235
|
const scaled = a ? scaleAnnotation(a, sx, sy) : null;
|
|
12015
12236
|
const fromAnnotation = scaled ? _chunkUYXL6ZWQcjs.shapeFromAnnotation.call(void 0, scaled) : null;
|
|
12016
12237
|
const m = [sx, 0, 0, sy, 0, 0];
|
|
12017
|
-
const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess',
|
|
12238
|
+
const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _435 => _435.components]), () => ( _chunkUYXL6ZWQcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
|
|
12018
12239
|
const moved = { ...l, components, ...fromAnnotation ? { fill: fromAnnotation.fill, stroke: fromAnnotation.stroke } : {} };
|
|
12019
12240
|
if (scaled && fromAnnotation) moved.annotation = scaled;
|
|
12020
12241
|
else delete moved.annotation;
|
|
@@ -12032,7 +12253,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
12032
12253
|
this.notify();
|
|
12033
12254
|
}
|
|
12034
12255
|
toJSON(options) {
|
|
12035
|
-
const root = _optionalChain([this, 'access',
|
|
12256
|
+
const root = _optionalChain([this, 'access', _436 => _436.contentsStack, 'access', _437 => _437[0], 'optionalAccess', _438 => _438.saved]);
|
|
12036
12257
|
const current = this.state;
|
|
12037
12258
|
const element = this.imageElement;
|
|
12038
12259
|
if (root) {
|
|
@@ -12043,8 +12264,8 @@ var ImageEditorController = (_class13 = class {
|
|
|
12043
12264
|
let out;
|
|
12044
12265
|
try {
|
|
12045
12266
|
out = this.serializeState();
|
|
12046
|
-
if (_optionalChain([this, 'access',
|
|
12047
|
-
if (_optionalChain([this, 'access',
|
|
12267
|
+
if (_optionalChain([this, 'access', _439 => _439.state, 'access', _440 => _440.selection, 'optionalAccess', _441 => _441.bounds])) out.selection = _chunkUYXL6ZWQcjs.serializeSelection.call(void 0, this.state.selection);
|
|
12268
|
+
if (_optionalChain([this, 'access', _442 => _442.state, 'access', _443 => _443.channels, 'optionalAccess', _444 => _444.length])) out.channels = serializeChannels(this.state.channels);
|
|
12048
12269
|
} finally {
|
|
12049
12270
|
if (root) {
|
|
12050
12271
|
this.state = current;
|
|
@@ -12158,10 +12379,10 @@ var ImageEditorController = (_class13 = class {
|
|
|
12158
12379
|
serializeState() {
|
|
12159
12380
|
const { width, height } = this.naturalSize;
|
|
12160
12381
|
const view = _chunkUYXL6ZWQcjs.legacyView.call(void 0, this.stack(), width, height, null);
|
|
12161
|
-
if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access',
|
|
12382
|
+
if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _445 => _445.state, 'access', _446 => _446.patterns, 'optionalAccess', _447 => _447.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
|
|
12162
12383
|
return {
|
|
12163
12384
|
// States without adjustment layers keep schema 1, so they round-trip unchanged.
|
|
12164
|
-
version: _optionalChain([view, 'access',
|
|
12385
|
+
version: _optionalChain([view, 'access', _448 => _448.adjustments, 'access', _449 => _449.layers, 'optionalAccess', _450 => _450.length]) ? 2 : 1,
|
|
12165
12386
|
crop: this.state.crop ? { ...this.state.crop } : null,
|
|
12166
12387
|
transform: { ...this.state.transform },
|
|
12167
12388
|
adjustments: serializeAdjustments(view.adjustments),
|
|
@@ -12186,7 +12407,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
12186
12407
|
};
|
|
12187
12408
|
if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
|
|
12188
12409
|
if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
|
|
12189
|
-
if (_optionalChain([this, 'access',
|
|
12410
|
+
if (_optionalChain([this, 'access', _451 => _451.state, 'access', _452 => _452.patterns, 'optionalAccess', _453 => _453.length])) out.patterns = _chunkUYXL6ZWQcjs.serializePatterns.call(void 0, this.state.patterns);
|
|
12190
12411
|
if (smartContents) out.smartContents = smartContents;
|
|
12191
12412
|
if (this.state.bitDepth === 16 || this.state.bitDepth === 32) out.bitDepth = this.state.bitDepth;
|
|
12192
12413
|
if (this.state.colorProfile) out.colorProfile = serializeColorProfile(this.state.colorProfile);
|
|
@@ -12196,7 +12417,7 @@ var ImageEditorController = (_class13 = class {
|
|
|
12196
12417
|
}, _class13);
|
|
12197
12418
|
function serializeAdjustments(adjustments) {
|
|
12198
12419
|
const out = { ...adjustments };
|
|
12199
|
-
if (_optionalChain([out, 'access',
|
|
12420
|
+
if (_optionalChain([out, 'access', _454 => _454.layers, 'optionalAccess', _455 => _455.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
|
|
12200
12421
|
else delete out.layers;
|
|
12201
12422
|
if (_chunkUYXL6ZWQcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkUYXL6ZWQcjs.LEGACY_PROCESS_VERSION) {
|
|
12202
12423
|
delete out.process;
|
|
@@ -12232,11 +12453,11 @@ function withDevelop(layer, partial) {
|
|
|
12232
12453
|
return { ...layer, filters };
|
|
12233
12454
|
}
|
|
12234
12455
|
function withBlur(layer, radius) {
|
|
12235
|
-
const existing = _optionalChain([layer, 'access',
|
|
12456
|
+
const existing = _optionalChain([layer, 'access', _456 => _456.filters, 'optionalAccess', _457 => _457.find, 'call', _458 => _458((f) => f.kind === "blur")]);
|
|
12236
12457
|
const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
|
|
12237
12458
|
if (radius > 0) {
|
|
12238
12459
|
filters.push({
|
|
12239
|
-
id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess',
|
|
12460
|
+
id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _459 => _459.id]), () => ( (layer.source === "document" ? _chunkUYXL6ZWQcjs.BLUR_FILTER_ID : _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "flt")))),
|
|
12240
12461
|
kind: "blur",
|
|
12241
12462
|
enabled: true,
|
|
12242
12463
|
radius
|
|
@@ -12332,7 +12553,7 @@ function collectStateTiles(layers, into) {
|
|
|
12332
12553
|
if (l.type === "shape" || l.type === "type") _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.surface, into);
|
|
12333
12554
|
if (l.type === "smart") {
|
|
12334
12555
|
_chunkCWM3CUUXcjs.collectTiles.call(void 0, l.surface, into);
|
|
12335
|
-
if (_optionalChain([l, 'access',
|
|
12556
|
+
if (_optionalChain([l, 'access', _460 => _460.smartFilters, 'optionalAccess', _461 => _461.mask])) _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
|
|
12336
12557
|
if (l.contents.raster) _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.contents.raster, into);
|
|
12337
12558
|
if (l.contents.document) collectStateTiles(l.contents.document.layers, into);
|
|
12338
12559
|
}
|
|
@@ -12364,7 +12585,7 @@ function pixelsOnly(layers) {
|
|
|
12364
12585
|
for (const l of layers) {
|
|
12365
12586
|
if (l.type === "adjustment") continue;
|
|
12366
12587
|
if (l.type === "group") out.push({ ...l, children: pixelsOnly(l.children) });
|
|
12367
|
-
else if (l.type === "pixel" && _optionalChain([l, 'access',
|
|
12588
|
+
else if (l.type === "pixel" && _optionalChain([l, 'access', _462 => _462.filters, 'optionalAccess', _463 => _463.length])) {
|
|
12368
12589
|
const p = { ...l };
|
|
12369
12590
|
delete p.filters;
|
|
12370
12591
|
out.push(p);
|
|
@@ -12430,7 +12651,7 @@ function toHex(c) {
|
|
|
12430
12651
|
return "#" + [c[0], c[1], c[2]].map((v) => Math.round(v).toString(16).padStart(2, "0")).join("");
|
|
12431
12652
|
}
|
|
12432
12653
|
function normalizeSelection(mask) {
|
|
12433
|
-
return _optionalChain([mask, 'optionalAccess',
|
|
12654
|
+
return _optionalChain([mask, 'optionalAccess', _464 => _464.bounds]) ? mask : null;
|
|
12434
12655
|
}
|
|
12435
12656
|
function sameSelection(a, b) {
|
|
12436
12657
|
if (a.width !== b.width || a.height !== b.height) return false;
|
|
@@ -12640,7 +12861,7 @@ function loadImageEditorDocument(input) {
|
|
|
12640
12861
|
}
|
|
12641
12862
|
const state = { version: 1, ...result.value };
|
|
12642
12863
|
if (isV2) {
|
|
12643
|
-
if (_optionalChain([state, 'access',
|
|
12864
|
+
if (_optionalChain([state, 'access', _465 => _465.adjustments, 'access', _466 => _466.layers, 'optionalAccess', _467 => _467.length])) state.version = 2;
|
|
12644
12865
|
result.report.version = 2;
|
|
12645
12866
|
}
|
|
12646
12867
|
if (state.selection === void 0) delete state.selection;
|
|
@@ -12848,7 +13069,7 @@ function findAdjustmentControl(id) {
|
|
|
12848
13069
|
}
|
|
12849
13070
|
function findLayerControl(kind, id) {
|
|
12850
13071
|
if (id === "opacity") return ADJUSTMENT_LAYER_OPACITY_CONTROL;
|
|
12851
|
-
return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access',
|
|
13072
|
+
return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _468 => _468[kind], 'optionalAccess', _469 => _469.find, 'call', _470 => _470((c) => c.id === id)]);
|
|
12852
13073
|
}
|
|
12853
13074
|
function clampControlValue(spec, v) {
|
|
12854
13075
|
if (typeof v !== "number" || !Number.isFinite(v)) return spec.default;
|
|
@@ -13251,6 +13472,12 @@ var REFINE_EDGE_CONTROLS = [
|
|
|
13251
13472
|
{ id: "contrast", label: "Contrast", min: 0, max: 100, step: 1, unit: "%" },
|
|
13252
13473
|
{ id: "shiftEdge", label: "Shift Edge", min: -100, max: 100, step: 1, unit: "%" }
|
|
13253
13474
|
];
|
|
13475
|
+
var REFINE_OUTPUTS = [
|
|
13476
|
+
{ id: "selection", label: "Selection" },
|
|
13477
|
+
{ id: "layer-mask", label: "Layer Mask" },
|
|
13478
|
+
{ id: "new-layer", label: "New Layer" },
|
|
13479
|
+
{ id: "new-layer-with-mask", label: "New Layer with Layer Mask" }
|
|
13480
|
+
];
|
|
13254
13481
|
function describeSelection(mask) {
|
|
13255
13482
|
if (!mask || !mask.bounds) return "No selection";
|
|
13256
13483
|
const pct2 = _chunkUYXL6ZWQcjs.selectionArea.call(void 0, mask) / (mask.width * mask.height) * 100;
|
|
@@ -13306,7 +13533,7 @@ function summary(controller) {
|
|
|
13306
13533
|
const area = _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel);
|
|
13307
13534
|
return {
|
|
13308
13535
|
empty: !sel,
|
|
13309
|
-
bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
13536
|
+
bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _471 => _471.bounds]), () => ( null)),
|
|
13310
13537
|
/** Σ coverage in pixels. */
|
|
13311
13538
|
area: Math.round(area),
|
|
13312
13539
|
percent: Math.round(area / Math.max(1, width * height) * 1e4) / 100,
|
|
@@ -13382,7 +13609,7 @@ function createImageSelectionTools(controller) {
|
|
|
13382
13609
|
break;
|
|
13383
13610
|
}
|
|
13384
13611
|
case "polygon": {
|
|
13385
|
-
const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess',
|
|
13612
|
+
const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _472 => _472.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _473 => _473.y]), NaN) })) : [];
|
|
13386
13613
|
if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
|
|
13387
13614
|
throw new Error("polygon needs points: at least 3 { x, y } vertices.");
|
|
13388
13615
|
}
|
|
@@ -13459,31 +13686,69 @@ function createImageSelectionTools(controller) {
|
|
|
13459
13686
|
const refine = {
|
|
13460
13687
|
name: "refine_selection",
|
|
13461
13688
|
title: "Refine the selection edge",
|
|
13462
|
-
description: "Refine Edge: snaps the selection edge to the image within radius pixels (edge-aware guided filter), then smooth (0-100), feather (px), contrast (0-100) and shiftEdge (-100..100 %). Use it after loading a coarse AI mask. One undoable step.",
|
|
13689
|
+
description: "Select and Mask / Refine Edge: snaps the selection edge to the image within radius pixels (edge-aware guided filter), then smooth (0-100), feather (px), contrast (0-100) and shiftEdge (-100..100 %), and puts the result where output says: the selection (default), a layer-mask on layerId (default the active layer; then deselects), a new-layer of its selected pixels, or a new-layer-with-mask (a masked copy); the new-layer outputs hide the source layer. decontaminate (0-100, new-layer outputs only) replaces the old background colour in soft edges (hair, fur) with the subject's own. Use it after loading a coarse AI mask, or to cut a subject out cleanly. edits are the Select and Mask workspace's strokes, applied first in order: quick-select (grows to the region's edges), brush (paints the selection in or out) and refine-brush (marks hair or fur for the edge to be re-estimated there); with edits, an empty selection is a valid start. refineMode object (needs a host segmentation model) refines from the model's outline of the object. One undoable step. Returns the selection, refineMode and, for layer outputs, layerId and newLayerId.",
|
|
13463
13690
|
inputSchema: {
|
|
13464
13691
|
type: "object",
|
|
13465
13692
|
properties: {
|
|
13466
|
-
radius: { type: "number", minimum: 0, maximum: 64, description: "Edge detection radius in pixels." },
|
|
13693
|
+
radius: { type: "number", minimum: 0, maximum: 64, description: "Edge detection radius in pixels (default 8)." },
|
|
13467
13694
|
smartRadius: { type: "boolean", description: "Adapt the radius to hard and soft edges." },
|
|
13468
13695
|
smooth: { type: "number", minimum: 0, maximum: 100, description: "Smooth the edge outline (0-100)." },
|
|
13469
13696
|
feather: { type: "number", minimum: 0, maximum: 250, description: "Feather the edge (pixels)." },
|
|
13470
13697
|
contrast: { type: "number", minimum: 0, maximum: 100, description: "Sharpen the edge transition (0-100)." },
|
|
13471
|
-
shiftEdge: { type: "number", minimum: -100, maximum: 100, description: "Move the edge out (+) or in (-), in percent." }
|
|
13698
|
+
shiftEdge: { type: "number", minimum: -100, maximum: 100, description: "Move the edge out (+) or in (-), in percent." },
|
|
13699
|
+
output: {
|
|
13700
|
+
type: "string",
|
|
13701
|
+
enum: ["selection", "layer-mask", "new-layer", "new-layer-with-mask"],
|
|
13702
|
+
description: "Where the result goes (default selection). layer-mask keeps every pixel and is easiest to revise; new-layer-with-mask too, on a copy."
|
|
13703
|
+
},
|
|
13704
|
+
layerId: { type: "string", description: "The layer for layer outputs (default the active layer; see list_layers). New-layer outputs need a pixel layer." },
|
|
13705
|
+
decontaminate: { type: "number", minimum: 0, maximum: 100, description: "Decontaminate Colors amount 0-100 (default 0), only with output new-layer or new-layer-with-mask." },
|
|
13706
|
+
edits: {
|
|
13707
|
+
type: "array",
|
|
13708
|
+
description: "Strokes applied before refining, in order.",
|
|
13709
|
+
items: {
|
|
13710
|
+
type: "object",
|
|
13711
|
+
properties: {
|
|
13712
|
+
kind: { type: "string", enum: ["quick-select", "brush", "refine-brush"], description: "quick-select grows to edges; brush paints directly; refine-brush marks soft detail (hair) for the edge to be re-estimated." },
|
|
13713
|
+
points: { type: "array", minItems: 1, items: pointSchema, description: "The stroke path in natural image pixels (one point is a dab)." },
|
|
13714
|
+
size: { type: "number", minimum: 1, maximum: 2500, description: "Brush diameter in natural image pixels (default 30 quick-select, 20 brush, 40 refine-brush)." },
|
|
13715
|
+
mode: { type: "string", enum: ["add", "subtract"], description: "quick-select and brush: add (default) or subtract." },
|
|
13716
|
+
hardness: { type: "number", minimum: 0, maximum: 1, description: "brush: the solid share of the radius, 0..1 (default 1)." }
|
|
13717
|
+
},
|
|
13718
|
+
required: ["kind", "points"],
|
|
13719
|
+
additionalProperties: false
|
|
13720
|
+
}
|
|
13721
|
+
},
|
|
13722
|
+
refineMode: { type: "string", enum: ["color", "object"], description: "color (default): refine from the image colours; object: from a host segmentation model's outline of the object (needs a model)." }
|
|
13472
13723
|
},
|
|
13473
13724
|
additionalProperties: false
|
|
13474
13725
|
},
|
|
13475
13726
|
annotations: writeAnnotations("Refine the selection edge"),
|
|
13476
13727
|
handler: async (params) => {
|
|
13477
|
-
|
|
13478
|
-
|
|
13479
|
-
|
|
13480
|
-
|
|
13481
|
-
|
|
13482
|
-
|
|
13483
|
-
|
|
13484
|
-
|
|
13485
|
-
|
|
13486
|
-
|
|
13728
|
+
const edits = Array.isArray(params.edits) ? params.edits.map((e) => ({ ...e, points: (_nullishCoalesce(e.points, () => ( []))).map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _474 => _474.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _475 => _475.y]), NaN) })) })) : [];
|
|
13729
|
+
for (const e of edits) {
|
|
13730
|
+
if (!e.points.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) throw new Error("Each edit needs points of { x, y } in natural image pixels.");
|
|
13731
|
+
if (e.kind === "refine-brush" && e.mode !== void 0) throw new Error("refine-brush strokes have no mode; they mark where the edge is re-estimated.");
|
|
13732
|
+
}
|
|
13733
|
+
if (!controller.getSelection() && !edits.length) throw new Error("Nothing is selected.");
|
|
13734
|
+
const result = await controller.refineSelectionTo(
|
|
13735
|
+
{
|
|
13736
|
+
radius: num2(params.radius, 8),
|
|
13737
|
+
smartRadius: params.smartRadius === true,
|
|
13738
|
+
smooth: num2(params.smooth, 0),
|
|
13739
|
+
feather: num2(params.feather, 0),
|
|
13740
|
+
contrast: num2(params.contrast, 0),
|
|
13741
|
+
shiftEdge: num2(params.shiftEdge, 0)
|
|
13742
|
+
},
|
|
13743
|
+
_nullishCoalesce(params.output, () => ( "selection")),
|
|
13744
|
+
{
|
|
13745
|
+
layerId: typeof params.layerId === "string" ? params.layerId : void 0,
|
|
13746
|
+
decontaminate: num2(params.decontaminate, 0),
|
|
13747
|
+
edits,
|
|
13748
|
+
refineMode: params.refineMode === "object" ? "object" : "color"
|
|
13749
|
+
}
|
|
13750
|
+
);
|
|
13751
|
+
return { ...summary(controller), ...result };
|
|
13487
13752
|
}
|
|
13488
13753
|
};
|
|
13489
13754
|
const applyMask = {
|
|
@@ -13619,7 +13884,7 @@ function createImageSelectionTools(controller) {
|
|
|
13619
13884
|
},
|
|
13620
13885
|
annotations: writeAnnotations("Select a polygon (lasso)", true),
|
|
13621
13886
|
handler: async (args) => {
|
|
13622
|
-
const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess',
|
|
13887
|
+
const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _476 => _476.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _477 => _477.y]), NaN) })) : [];
|
|
13623
13888
|
if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
|
|
13624
13889
|
throw new Error("points needs at least 3 { x, y } vertices in natural image pixels.");
|
|
13625
13890
|
}
|
|
@@ -13656,7 +13921,7 @@ function createImageSelectionTools(controller) {
|
|
|
13656
13921
|
},
|
|
13657
13922
|
annotations: writeAnnotations("Quick Selection"),
|
|
13658
13923
|
handler: async (args) => {
|
|
13659
|
-
const strokes = Array.isArray(args.strokes) ? args.strokes.map((s) => Array.isArray(s) ? s.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess',
|
|
13924
|
+
const strokes = Array.isArray(args.strokes) ? args.strokes.map((s) => Array.isArray(s) ? s.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _478 => _478.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _479 => _479.y]), NaN) })) : []) : [];
|
|
13660
13925
|
if (!strokes.length || strokes.some((s) => !s.length || !s.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y)))) {
|
|
13661
13926
|
throw new Error("strokes needs at least one stroke of { x, y } points in natural image pixels.");
|
|
13662
13927
|
}
|
|
@@ -13854,7 +14119,7 @@ function createImageSelectionTools(controller) {
|
|
|
13854
14119
|
await controller.selectColorRangePreset(args.preset, { ...common, falloff: num2(args.fuzziness, 20) });
|
|
13855
14120
|
} else {
|
|
13856
14121
|
const samples = args.samples.map((s, i) => {
|
|
13857
|
-
if (typeof _optionalChain([s, 'optionalAccess',
|
|
14122
|
+
if (typeof _optionalChain([s, 'optionalAccess', _480 => _480.color]) !== "string" || !/^#?[0-9a-f]{6}$/i.test(s.color.trim())) throw new Error(`samples[${i}].color must be #rrggbb.`);
|
|
13858
14123
|
const at = typeof s.x === "number" && typeof s.y === "number" ? { x: s.x, y: s.y } : void 0;
|
|
13859
14124
|
return at ? { color: s.color, at } : { color: s.color };
|
|
13860
14125
|
});
|
|
@@ -14375,13 +14640,13 @@ function createImageSubjectSelectionTool(controller) {
|
|
|
14375
14640
|
handler: async ({ target, maxSegments, mode, feather, enhanceEdge }, context) => {
|
|
14376
14641
|
if (target !== void 0 && typeof target !== "string") throw new Error("target must be a description in words.");
|
|
14377
14642
|
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).");
|
|
14378
|
-
const perform = _optionalChain([context, 'optionalAccess',
|
|
14643
|
+
const perform = _optionalChain([context, 'optionalAccess', _481 => _481.perform]);
|
|
14379
14644
|
const { segments, method, note } = await controller.selectSubject(String(_nullishCoalesce(target, () => ( ""))), {
|
|
14380
14645
|
mode: _chunkUYXL6ZWQcjs.parseSelectionMode.call(void 0, mode),
|
|
14381
14646
|
feather: num2(feather, 0),
|
|
14382
14647
|
maxSegments: typeof maxSegments === "number" ? Math.max(1, Math.round(maxSegments)) : void 0,
|
|
14383
14648
|
enhanceEdge: enhanceEdge === true,
|
|
14384
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
14649
|
+
signal: _optionalChain([context, 'optionalAccess', _482 => _482.signal]),
|
|
14385
14650
|
// Under playback the cursor traces what the model found, as a lasso, before it is selected.
|
|
14386
14651
|
beforeApply: perform ? (outlines) => perform(planOutlineTrace(outlines)) : void 0
|
|
14387
14652
|
});
|
|
@@ -14459,7 +14724,7 @@ async function renderImageRegion(controller, request) {
|
|
|
14459
14724
|
const maskView = maskViewCanvas(controller, document);
|
|
14460
14725
|
if (maskView) context.drawImage(maskView, rect.x, rect.y, rect.width, rect.height, 0, 0, out.width, out.height);
|
|
14461
14726
|
const selection = state.selection;
|
|
14462
|
-
if (_optionalChain([selection, 'optionalAccess',
|
|
14727
|
+
if (_optionalChain([selection, 'optionalAccess', _483 => _483.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
|
|
14463
14728
|
const shade = selectionShade(selection, document);
|
|
14464
14729
|
if (shade) context.drawImage(shade, rect.x, rect.y, rect.width, rect.height, 0, 0, out.width, out.height);
|
|
14465
14730
|
}
|
|
@@ -14484,7 +14749,7 @@ function createImageCaptureSurface(controller) {
|
|
|
14484
14749
|
return {
|
|
14485
14750
|
units: "image pixels",
|
|
14486
14751
|
content: whole,
|
|
14487
|
-
selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access',
|
|
14752
|
+
selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _484 => _484.getState, 'call', _485 => _485(), 'access', _486 => _486.selection, 'optionalAccess', _487 => _487.bounds]), () => ( null)) }),
|
|
14488
14753
|
overlays: "a shade over unselected pixels, the crop box outline and a layer mask view (set_mask_view)",
|
|
14489
14754
|
maxScale: 8,
|
|
14490
14755
|
render: (request) => renderImageRegion(controller, request)
|
|
@@ -14818,7 +15083,7 @@ function describeLayer(layer, activeId, boundsOf) {
|
|
|
14818
15083
|
out.bounds = boundsOf(layer);
|
|
14819
15084
|
out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
|
|
14820
15085
|
out.shape = {
|
|
14821
|
-
components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access',
|
|
15086
|
+
components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _488 => _488.live, 'optionalAccess', _489 => _489.kind]), () => ( "path")) })),
|
|
14822
15087
|
fill: layer.fill ? layer.fill.type : null,
|
|
14823
15088
|
stroke: layer.stroke ? { width: layer.stroke.width, paint: layer.stroke.paint.type } : null
|
|
14824
15089
|
};
|
|
@@ -14841,8 +15106,8 @@ function describeLayer(layer, activeId, boundsOf) {
|
|
|
14841
15106
|
out.bounds = boundsOf(layer);
|
|
14842
15107
|
out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
|
|
14843
15108
|
out.contents = { id: layer.contents.id, name: layer.contents.name, kind: layer.contents.kind, width: layer.contents.width, height: layer.contents.height };
|
|
14844
|
-
out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access',
|
|
14845
|
-
out.filterMask = maskSummary(_optionalChain([layer, 'access',
|
|
15109
|
+
out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _490 => _490.smartFilters, 'optionalAccess', _491 => _491.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
|
|
15110
|
+
out.filterMask = maskSummary(_optionalChain([layer, 'access', _492 => _492.smartFilters, 'optionalAccess', _493 => _493.mask]));
|
|
14846
15111
|
break;
|
|
14847
15112
|
}
|
|
14848
15113
|
return out;
|
|
@@ -14870,7 +15135,7 @@ function createImageLayerTools(controller) {
|
|
|
14870
15135
|
if (!loc) return null;
|
|
14871
15136
|
return {
|
|
14872
15137
|
...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)),
|
|
14873
|
-
parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
15138
|
+
parentId: _nullishCoalesce(_optionalChain([loc, 'access', _494 => _494.parent, 'optionalAccess', _495 => _495.id]), () => ( null)),
|
|
14874
15139
|
index: loc.index
|
|
14875
15140
|
};
|
|
14876
15141
|
};
|
|
@@ -15193,7 +15458,7 @@ function createImageLayerTools(controller) {
|
|
|
15193
15458
|
if (view !== "gray" && view !== "overlay" && view !== "off") throw new Error(`Unknown view "${String(view)}". Use gray, overlay or off.`);
|
|
15194
15459
|
const id = view === "off" || layerId === void 0 ? void 0 : exists(layerId);
|
|
15195
15460
|
const shown = controller.setMaskView(view, id);
|
|
15196
|
-
return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess',
|
|
15461
|
+
return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _496 => _496.mode]), () => ( "off")), layerId: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _497 => _497.layerId]), () => ( null)) };
|
|
15197
15462
|
}
|
|
15198
15463
|
};
|
|
15199
15464
|
const maskProps = {
|
|
@@ -16055,7 +16320,7 @@ function handleSelectionShortcut(controller, e, onError) {
|
|
|
16055
16320
|
try {
|
|
16056
16321
|
fn();
|
|
16057
16322
|
} catch (err) {
|
|
16058
|
-
_optionalChain([onError, 'optionalCall',
|
|
16323
|
+
_optionalChain([onError, 'optionalCall', _498 => _498(err instanceof Error ? err.message : String(err))]);
|
|
16059
16324
|
}
|
|
16060
16325
|
return true;
|
|
16061
16326
|
};
|
|
@@ -16070,9 +16335,9 @@ function handleMaskViewKey(controller, e) {
|
|
|
16070
16335
|
if (e.ctrlKey || e.metaKey || e.altKey || e.key !== "\\") return false;
|
|
16071
16336
|
const id = controller.getState().activeLayerId;
|
|
16072
16337
|
const layer = id ? controller.getLayer(id) : null;
|
|
16073
|
-
if (!_optionalChain([layer, 'optionalAccess',
|
|
16338
|
+
if (!_optionalChain([layer, 'optionalAccess', _499 => _499.mask]) || layer.mask.source) return false;
|
|
16074
16339
|
const view = controller.getMaskView();
|
|
16075
|
-
controller.setMaskView(_optionalChain([view, 'optionalAccess',
|
|
16340
|
+
controller.setMaskView(_optionalChain([view, 'optionalAccess', _500 => _500.layerId]) === layer.id && view.mode === "overlay" ? "off" : "overlay", layer.id);
|
|
16076
16341
|
return true;
|
|
16077
16342
|
}
|
|
16078
16343
|
function handleQuickMaskKey(controller, e) {
|
|
@@ -16286,7 +16551,7 @@ var PaintGesture = (_class15 = class {
|
|
|
16286
16551
|
const layer = this.controller.getActiveLayer();
|
|
16287
16552
|
if (!layer) throw new Error("Select a layer to move in the Layers panel.");
|
|
16288
16553
|
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.`);
|
|
16289
|
-
if (_optionalChain([layer, 'access',
|
|
16554
|
+
if (_optionalChain([layer, 'access', _501 => _501.locks, 'optionalAccess', _502 => _502.all]) || _optionalChain([layer, 'access', _503 => _503.locks, 'optionalAccess', _504 => _504.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
|
|
16290
16555
|
const origin = layer.type === "pixel" ? { ...layer.offset } : layer.type === "smart" ? { ...layer.placement.corners[0] } : (() => {
|
|
16291
16556
|
const b = _chunkUYXL6ZWQcjs.shapeGeometryBounds.call(void 0, layer);
|
|
16292
16557
|
return b ? { x: b.x, y: b.y } : { x: 0, y: 0 };
|
|
@@ -16343,7 +16608,7 @@ var PaintGesture = (_class15 = class {
|
|
|
16343
16608
|
this.move = null;
|
|
16344
16609
|
}
|
|
16345
16610
|
cancel() {
|
|
16346
|
-
_optionalChain([this, 'access',
|
|
16611
|
+
_optionalChain([this, 'access', _505 => _505.stroke, 'optionalAccess', _506 => _506.cancel, 'call', _507 => _507()]);
|
|
16347
16612
|
this.stroke = null;
|
|
16348
16613
|
this.move = null;
|
|
16349
16614
|
}
|
|
@@ -17424,7 +17689,7 @@ function createImageSmartObjectTools(controller) {
|
|
|
17424
17689
|
const layerSummary = (id) => {
|
|
17425
17690
|
const s = controller.getState();
|
|
17426
17691
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
|
|
17427
|
-
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
17692
|
+
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _508 => _508.parent, 'optionalAccess', _509 => _509.id]), () => ( null)), index: loc.index } : null;
|
|
17428
17693
|
};
|
|
17429
17694
|
const getSmart = {
|
|
17430
17695
|
name: "get_smart_object",
|
|
@@ -17981,7 +18246,7 @@ function createImageShapeTools(controller) {
|
|
|
17981
18246
|
const layerSummary = (id) => {
|
|
17982
18247
|
const s = controller.getState();
|
|
17983
18248
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
|
|
17984
|
-
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
18249
|
+
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _510 => _510.parent, 'optionalAccess', _511 => _511.id]), () => ( null)), index: loc.index } : null;
|
|
17985
18250
|
};
|
|
17986
18251
|
const get = {
|
|
17987
18252
|
name: "get_shape_layer",
|
|
@@ -18198,7 +18463,7 @@ function createImageShapeTools(controller) {
|
|
|
18198
18463
|
const mode = args.mode;
|
|
18199
18464
|
controller.pathToSelection(pathSpec(args), { feather: args.feather, antiAlias: args.antiAlias, mode });
|
|
18200
18465
|
const sel = controller.getSelection();
|
|
18201
|
-
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
18466
|
+
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _512 => _512.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
|
|
18202
18467
|
}
|
|
18203
18468
|
};
|
|
18204
18469
|
const getVectorMask = {
|
|
@@ -18229,7 +18494,7 @@ function createImageShapeTools(controller) {
|
|
|
18229
18494
|
handler: (args) => {
|
|
18230
18495
|
const id = layerArg(args.layerId);
|
|
18231
18496
|
const spec = pathSpec(args);
|
|
18232
|
-
const hasPath = _optionalChain([spec, 'access',
|
|
18497
|
+
const hasPath = _optionalChain([spec, 'access', _513 => _513.components, 'optionalAccess', _514 => _514.length]) || spec.shape !== void 0 || spec.subpaths !== void 0;
|
|
18233
18498
|
const from = _nullishCoalesce(args.from, () => ( (hasPath ? "path" : "reveal-all")));
|
|
18234
18499
|
if (from !== "selection" && TRACE_KEYS.some((k) => args[k] !== void 0)) throw new Error("tolerance, cornerRoundness and minArea apply only to from selection.");
|
|
18235
18500
|
controller.addVectorMask(id, from, spec, traceOptions(args));
|
|
@@ -18349,7 +18614,7 @@ function createImageTypeTools(controller) {
|
|
|
18349
18614
|
const layerSummary = (id) => {
|
|
18350
18615
|
const s = controller.getState();
|
|
18351
18616
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
|
|
18352
|
-
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
18617
|
+
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _515 => _515.parent, 'optionalAccess', _516 => _516.id]), () => ( null)), index: loc.index } : null;
|
|
18353
18618
|
};
|
|
18354
18619
|
const range = (args) => ({ start: args.start, end: args.end });
|
|
18355
18620
|
const listFonts = {
|
|
@@ -18358,7 +18623,7 @@ function createImageTypeTools(controller) {
|
|
|
18358
18623
|
description: "Returns the font families type layers can use here (generic families such as sans-serif always work). Changes nothing.",
|
|
18359
18624
|
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
18360
18625
|
annotations: { title: "List fonts", ...READ11 },
|
|
18361
|
-
handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access',
|
|
18626
|
+
handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _517 => _517.getTextShaper, 'call', _518 => _518(), 'optionalAccess', _519 => _519.id]), () => ( null)) })
|
|
18362
18627
|
};
|
|
18363
18628
|
const get = {
|
|
18364
18629
|
name: "get_text_layer",
|
|
@@ -18514,7 +18779,7 @@ function createImageTypeTools(controller) {
|
|
|
18514
18779
|
const init = pick2(args, ["text", "x", "y", "orientation", "box", "style", "paragraph", "rotation", "mode", "feather", "antiAlias"]);
|
|
18515
18780
|
controller.selectTextShape(init);
|
|
18516
18781
|
const sel = controller.getSelection();
|
|
18517
|
-
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
18782
|
+
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _520 => _520.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
|
|
18518
18783
|
}
|
|
18519
18784
|
};
|
|
18520
18785
|
return [listFonts, get, add2, setText, setStyle, setParagraph, setFrame, setOrientation, toShape, typeMask];
|
|
@@ -18693,7 +18958,7 @@ function createImageEditorToolProvider(controller, options = {}) {
|
|
|
18693
18958
|
for (const ref of [aboveId, parentId]) {
|
|
18694
18959
|
if (ref !== void 0 && !controller.getLayer(ref)) throw new Error(`Unknown layer "${ref}". Call list_layers for ids.`);
|
|
18695
18960
|
}
|
|
18696
|
-
if (parentId !== void 0 && _optionalChain([controller, 'access',
|
|
18961
|
+
if (parentId !== void 0 && _optionalChain([controller, 'access', _521 => _521.getLayer, 'call', _522 => _522(parentId), 'optionalAccess', _523 => _523.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
|
|
18697
18962
|
const id = controller.addAdjustmentLayer({ kind, params, opacity, blend, name, aboveId, parentId, useSelection: useSelection !== false });
|
|
18698
18963
|
const layer = controller.getAdjustmentLayer(id);
|
|
18699
18964
|
return { layer: JSON.parse(JSON.stringify(layer)), index: controller.getAdjustmentLayers().findIndex((l) => l.id === id), masked: Boolean(layer.mask) };
|
|
@@ -19007,7 +19272,7 @@ function maskThumbnailClick(controller, layer, e) {
|
|
|
19007
19272
|
} else if (e.altKey && !layer.mask.source) {
|
|
19008
19273
|
const mode = e.shiftKey ? "overlay" : "gray";
|
|
19009
19274
|
const view = controller.getMaskView();
|
|
19010
|
-
controller.setMaskView(_optionalChain([view, 'optionalAccess',
|
|
19275
|
+
controller.setMaskView(_optionalChain([view, 'optionalAccess', _524 => _524.layerId]) === layer.id && view.mode === mode ? "off" : mode, layer.id);
|
|
19011
19276
|
} else if (e.shiftKey) {
|
|
19012
19277
|
controller.setLayerMaskProps(layer.id, { enabled: layer.mask.enabled === false });
|
|
19013
19278
|
} else {
|
|
@@ -19071,7 +19336,7 @@ function layerHasThumbnail(layer) {
|
|
|
19071
19336
|
return layer.type === "pixel" || layer.type === "shape" || layer.type === "type";
|
|
19072
19337
|
}
|
|
19073
19338
|
function layerWarning(layer) {
|
|
19074
|
-
if (layer.type === "type" && _optionalChain([layer, 'access',
|
|
19339
|
+
if (layer.type === "type" && _optionalChain([layer, 'access', _525 => _525.missingFonts, 'optionalAccess', _526 => _526.length])) {
|
|
19075
19340
|
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."}`;
|
|
19076
19341
|
}
|
|
19077
19342
|
return null;
|
|
@@ -19094,16 +19359,16 @@ function layerMenu(controller) {
|
|
|
19094
19359
|
const siblings = loc ? loc.parent ? loc.parent.children : s.layers : [];
|
|
19095
19360
|
const below = loc ? siblings[loc.index - 1] : void 0;
|
|
19096
19361
|
const hasSel = controller.hasSelection;
|
|
19097
|
-
const isPixel = _optionalChain([active, 'optionalAccess',
|
|
19098
|
-
const hasOwnPixels = _optionalChain([active, 'optionalAccess',
|
|
19362
|
+
const isPixel = _optionalChain([active, 'optionalAccess', _527 => _527.type]) === "pixel";
|
|
19363
|
+
const hasOwnPixels = _optionalChain([active, 'optionalAccess', _528 => _528.type]) === "pixel" || _optionalChain([active, 'optionalAccess', _529 => _529.type]) === "shape" || _optionalChain([active, 'optionalAccess', _530 => _530.type]) === "type" || _optionalChain([active, 'optionalAccess', _531 => _531.type]) === "smart";
|
|
19099
19364
|
return [
|
|
19100
19365
|
{ action: "new-layer", label: "New Layer", enabled: true },
|
|
19101
19366
|
{ action: "new-group", label: "New Group", enabled: true },
|
|
19102
19367
|
{ action: "duplicate", label: "Duplicate Layer", enabled: Boolean(active) },
|
|
19103
19368
|
{ action: "delete", label: "Delete Layer", enabled: Boolean(active) },
|
|
19104
19369
|
{ action: "group-selected", label: "Group Layer", enabled: Boolean(active) },
|
|
19105
|
-
{ action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess',
|
|
19106
|
-
{ action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
19370
|
+
{ action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _532 => _532.type]) === "group" },
|
|
19371
|
+
{ action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _533 => _533.visible]) && _optionalChain([below, 'optionalAccess', _534 => _534.type]) === "pixel") },
|
|
19107
19372
|
{ action: "merge-visible", label: "Merge Visible", enabled: s.layers.some((l) => l.visible) },
|
|
19108
19373
|
{ action: "flatten", label: "Flatten Image", enabled: s.layers.length > 0 },
|
|
19109
19374
|
{ action: "via-copy", label: "Layer via Copy", enabled: isPixel && hasSel },
|
|
@@ -19113,27 +19378,27 @@ function layerMenu(controller) {
|
|
|
19113
19378
|
{ action: "add-mask-hide-selection", label: "Add Mask Hiding Selection", enabled: Boolean(active) && hasSel },
|
|
19114
19379
|
{ action: "add-mask-transparency", label: "Add Mask from Transparency", enabled: hasOwnPixels },
|
|
19115
19380
|
{ action: "select-transparency", label: "Select Layer Pixels", enabled: hasOwnPixels },
|
|
19116
|
-
{ action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess',
|
|
19117
|
-
{ action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
19118
|
-
{ action: "toggle-mask", label: _optionalChain([active, 'optionalAccess',
|
|
19119
|
-
{ action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess',
|
|
19120
|
-
{ action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access',
|
|
19121
|
-
{ action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access',
|
|
19122
|
-
{ action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access',
|
|
19123
|
-
{ action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
19124
|
-
{ action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess',
|
|
19125
|
-
{ action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
19126
|
-
{ action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess',
|
|
19381
|
+
{ action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _535 => _535.mask])) },
|
|
19382
|
+
{ action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _536 => _536.mask])) },
|
|
19383
|
+
{ action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _537 => _537.mask, 'optionalAccess', _538 => _538.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _539 => _539.mask])) },
|
|
19384
|
+
{ action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _540 => _540.mask, 'optionalAccess', _541 => _541.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _542 => _542.mask]) && !active.mask.source) },
|
|
19385
|
+
{ action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _543 => _543.mask, 'optionalAccess', _544 => _544.source])) },
|
|
19386
|
+
{ action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _545 => _545.mask, 'optionalAccess', _546 => _546.source])) },
|
|
19387
|
+
{ action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _547 => _547.mask, 'optionalAccess', _548 => _548.source])) && hasSel },
|
|
19388
|
+
{ action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _549 => _549.vectorMask])) },
|
|
19389
|
+
{ action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess', _550 => _550.vectorMask, 'optionalAccess', _551 => _551.enabled]) === false ? "Enable Vector Mask" : "Disable Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _552 => _552.vectorMask])) },
|
|
19390
|
+
{ action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _553 => _553.vectorMask])) },
|
|
19391
|
+
{ action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _554 => _554.type]) === "annotation" || _optionalChain([active, 'optionalAccess', _555 => _555.type]) === "smart" || _optionalChain([active, 'optionalAccess', _556 => _556.type]) === "shape" || _optionalChain([active, 'optionalAccess', _557 => _557.type]) === "type" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _558 => _558.type]) === "pixel" && _optionalChain([active, 'access', _559 => _559.filters, 'optionalAccess', _560 => _560.length])) },
|
|
19127
19392
|
{ action: "convert-smart", label: "Convert to Smart Object", enabled: Boolean(active && active.type !== "annotation") },
|
|
19128
|
-
{ action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess',
|
|
19129
|
-
{ action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess',
|
|
19130
|
-
{ action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess',
|
|
19131
|
-
{ action: "toggle-clip", label: _optionalChain([active, 'optionalAccess',
|
|
19393
|
+
{ action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _561 => _561.type]) === "smart" },
|
|
19394
|
+
{ action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _562 => _562.type]) === "smart" },
|
|
19395
|
+
{ action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess', _563 => _563.type]) === "smart" && !_optionalChain([active, 'access', _564 => _564.smartFilters, 'optionalAccess', _565 => _565.mask]) },
|
|
19396
|
+
{ action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _566 => _566.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
|
|
19132
19397
|
];
|
|
19133
19398
|
}
|
|
19134
19399
|
async function runLayerMenuAction(controller, action) {
|
|
19135
19400
|
const active = controller.getActiveLayer();
|
|
19136
|
-
const id = _optionalChain([active, 'optionalAccess',
|
|
19401
|
+
const id = _optionalChain([active, 'optionalAccess', _567 => _567.id]);
|
|
19137
19402
|
try {
|
|
19138
19403
|
switch (action) {
|
|
19139
19404
|
case "new-layer":
|
|
@@ -19189,10 +19454,10 @@ async function runLayerMenuAction(controller, action) {
|
|
|
19189
19454
|
if (id) controller.removeLayerMask(id);
|
|
19190
19455
|
break;
|
|
19191
19456
|
case "toggle-mask":
|
|
19192
|
-
if (id && _optionalChain([active, 'optionalAccess',
|
|
19457
|
+
if (id && _optionalChain([active, 'optionalAccess', _568 => _568.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
|
|
19193
19458
|
break;
|
|
19194
19459
|
case "toggle-mask-link":
|
|
19195
|
-
if (id && _optionalChain([active, 'optionalAccess',
|
|
19460
|
+
if (id && _optionalChain([active, 'optionalAccess', _569 => _569.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
|
|
19196
19461
|
break;
|
|
19197
19462
|
case "add-vector-mask":
|
|
19198
19463
|
case "add-vector-mask-hide":
|
|
@@ -19205,7 +19470,7 @@ async function runLayerMenuAction(controller, action) {
|
|
|
19205
19470
|
if (id) controller.removeVectorMask(id);
|
|
19206
19471
|
break;
|
|
19207
19472
|
case "toggle-vector-mask":
|
|
19208
|
-
if (id && _optionalChain([active, 'optionalAccess',
|
|
19473
|
+
if (id && _optionalChain([active, 'optionalAccess', _570 => _570.vectorMask])) controller.setVectorMaskProps(id, { enabled: active.vectorMask.enabled === false });
|
|
19209
19474
|
break;
|
|
19210
19475
|
case "rasterize-vector-mask":
|
|
19211
19476
|
if (id) controller.rasterizeVectorMask(id);
|
|
@@ -19226,7 +19491,7 @@ async function runLayerMenuAction(controller, action) {
|
|
|
19226
19491
|
if (id) controller.setSmartFilterMask(id, "reveal-all");
|
|
19227
19492
|
break;
|
|
19228
19493
|
case "toggle-clip":
|
|
19229
|
-
if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess',
|
|
19494
|
+
if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _571 => _571.clipped]) });
|
|
19230
19495
|
break;
|
|
19231
19496
|
}
|
|
19232
19497
|
return null;
|
|
@@ -19236,7 +19501,7 @@ async function runLayerMenuAction(controller, action) {
|
|
|
19236
19501
|
}
|
|
19237
19502
|
function smartFilterRows(layer) {
|
|
19238
19503
|
if (layer.type !== "smart") return [];
|
|
19239
|
-
const list = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
19504
|
+
const list = _nullishCoalesce(_optionalChain([layer, 'access', _572 => _572.smartFilters, 'optionalAccess', _573 => _573.filters]), () => ( []));
|
|
19240
19505
|
const rows = list.map((f, index) => ({
|
|
19241
19506
|
filter: f,
|
|
19242
19507
|
index,
|
|
@@ -19262,8 +19527,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
|
|
|
19262
19527
|
};
|
|
19263
19528
|
collectSerialized(_nullishCoalesce(serialized.layers, () => ( [])));
|
|
19264
19529
|
const sLayerMap = new Map(allSerializedLayers.map((sl) => [sl.id, sl]));
|
|
19265
|
-
const imgW = _optionalChain([state, 'access',
|
|
19266
|
-
const imgH = _optionalChain([state, 'access',
|
|
19530
|
+
const imgW = _optionalChain([state, 'access', _574 => _574.imageDimensions, 'optionalAccess', _575 => _575.width]) || 1;
|
|
19531
|
+
const imgH = _optionalChain([state, 'access', _576 => _576.imageDimensions, 'optionalAccess', _577 => _577.height]) || 1;
|
|
19267
19532
|
return ctrlLayers.map((l) => {
|
|
19268
19533
|
const bounds = controller.getLayerBounds(l.id) || {
|
|
19269
19534
|
x: 0,
|
|
@@ -19272,8 +19537,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
|
|
|
19272
19537
|
height: imgH
|
|
19273
19538
|
};
|
|
19274
19539
|
const sLayer = sLayerMap.get(l.id);
|
|
19275
|
-
const assetKey = _optionalChain([sLayer, 'optionalAccess',
|
|
19276
|
-
const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess',
|
|
19540
|
+
const assetKey = _optionalChain([sLayer, 'optionalAccess', _578 => _578.asset]);
|
|
19541
|
+
const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _579 => _579.source]) === "document" ? fallbackImageUrl : "");
|
|
19277
19542
|
return {
|
|
19278
19543
|
id: l.id,
|
|
19279
19544
|
name: l.name || "Untitled Layer",
|
|
@@ -19327,9 +19592,9 @@ async function addLayerOfKind(controller, id, init) {
|
|
|
19327
19592
|
const cx = Math.round(canvas.width / 2);
|
|
19328
19593
|
const cy = Math.round(canvas.height / 2);
|
|
19329
19594
|
return controller.addTextLayer({
|
|
19330
|
-
text: _optionalChain([init, 'optionalAccess',
|
|
19331
|
-
x: typeof _optionalChain([init, 'optionalAccess',
|
|
19332
|
-
y: typeof _optionalChain([init, 'optionalAccess',
|
|
19595
|
+
text: _optionalChain([init, 'optionalAccess', _580 => _580.text]) || "New Text",
|
|
19596
|
+
x: typeof _optionalChain([init, 'optionalAccess', _581 => _581.x]) === "number" ? init.x : cx - 100,
|
|
19597
|
+
y: typeof _optionalChain([init, 'optionalAccess', _582 => _582.y]) === "number" ? init.y : cy,
|
|
19333
19598
|
...init
|
|
19334
19599
|
});
|
|
19335
19600
|
}
|
|
@@ -19342,10 +19607,10 @@ async function addLayerOfKind(controller, id, init) {
|
|
|
19342
19607
|
return controller.addShapeLayer({
|
|
19343
19608
|
shape: {
|
|
19344
19609
|
kind: "rect",
|
|
19345
|
-
x: typeof _optionalChain([init, 'optionalAccess',
|
|
19346
|
-
y: typeof _optionalChain([init, 'optionalAccess',
|
|
19347
|
-
width: typeof _optionalChain([init, 'optionalAccess',
|
|
19348
|
-
height: typeof _optionalChain([init, 'optionalAccess',
|
|
19610
|
+
x: typeof _optionalChain([init, 'optionalAccess', _583 => _583.x]) === "number" ? init.x : cx - Math.round(w / 2),
|
|
19611
|
+
y: typeof _optionalChain([init, 'optionalAccess', _584 => _584.y]) === "number" ? init.y : cy - Math.round(h / 2),
|
|
19612
|
+
width: typeof _optionalChain([init, 'optionalAccess', _585 => _585.width]) === "number" ? init.width : w,
|
|
19613
|
+
height: typeof _optionalChain([init, 'optionalAccess', _586 => _586.height]) === "number" ? init.height : h
|
|
19349
19614
|
},
|
|
19350
19615
|
name: "Rectangle",
|
|
19351
19616
|
...init
|
|
@@ -19360,10 +19625,10 @@ async function addLayerOfKind(controller, id, init) {
|
|
|
19360
19625
|
return controller.addShapeLayer({
|
|
19361
19626
|
shape: {
|
|
19362
19627
|
kind: "ellipse",
|
|
19363
|
-
x: typeof _optionalChain([init, 'optionalAccess',
|
|
19364
|
-
y: typeof _optionalChain([init, 'optionalAccess',
|
|
19365
|
-
width: typeof _optionalChain([init, 'optionalAccess',
|
|
19366
|
-
height: typeof _optionalChain([init, 'optionalAccess',
|
|
19628
|
+
x: typeof _optionalChain([init, 'optionalAccess', _587 => _587.x]) === "number" ? init.x : cx - Math.round(w / 2),
|
|
19629
|
+
y: typeof _optionalChain([init, 'optionalAccess', _588 => _588.y]) === "number" ? init.y : cy - Math.round(h / 2),
|
|
19630
|
+
width: typeof _optionalChain([init, 'optionalAccess', _589 => _589.width]) === "number" ? init.width : w,
|
|
19631
|
+
height: typeof _optionalChain([init, 'optionalAccess', _590 => _590.height]) === "number" ? init.height : h
|
|
19367
19632
|
},
|
|
19368
19633
|
name: "Ellipse",
|
|
19369
19634
|
...init
|
|
@@ -19424,18 +19689,18 @@ function layerEffectsPanel(layer) {
|
|
|
19424
19689
|
if (!layer) return { ...empty, available: false, reason: "Select a layer to add a layer style." };
|
|
19425
19690
|
if (layer.type === "adjustment") return { ...empty, available: false, reason: "Adjustment layers cannot have a layer style." };
|
|
19426
19691
|
const fx = layer.effects;
|
|
19427
|
-
const readOnly = Boolean(_optionalChain([layer, 'access',
|
|
19692
|
+
const readOnly = Boolean(_optionalChain([layer, 'access', _591 => _591.locks, 'optionalAccess', _592 => _592.all]));
|
|
19428
19693
|
return {
|
|
19429
19694
|
available: true,
|
|
19430
19695
|
readOnly,
|
|
19431
19696
|
reason: readOnly ? "The layer is locked; unlock it to change its layer style." : void 0,
|
|
19432
|
-
enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess',
|
|
19433
|
-
scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess',
|
|
19434
|
-
rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess',
|
|
19697
|
+
enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _593 => _593.enabled]), () => ( true)),
|
|
19698
|
+
scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _594 => _594.scale]), () => ( 1)),
|
|
19699
|
+
rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _595 => _595.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkHGTDMKNEcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
|
|
19435
19700
|
};
|
|
19436
19701
|
}
|
|
19437
19702
|
function layerEffectsBadge(layer) {
|
|
19438
|
-
if (!_optionalChain([layer, 'access',
|
|
19703
|
+
if (!_optionalChain([layer, 'access', _596 => _596.effects, 'optionalAccess', _597 => _597.items, 'access', _598 => _598.length])) return null;
|
|
19439
19704
|
return _chunkHGTDMKNEcjs.hasActiveEffects.call(void 0, layer.effects) ? "on" : "off";
|
|
19440
19705
|
}
|
|
19441
19706
|
var LAYER_EFFECT_MENU = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS.map((kind) => ({ kind, label: _chunkHGTDMKNEcjs.layerEffectLabel.call(void 0, kind) }));
|
|
@@ -19480,8 +19745,8 @@ function fillControls(f, allowPattern, patterns) {
|
|
|
19480
19745
|
}
|
|
19481
19746
|
function gradientControls(prefix, g) {
|
|
19482
19747
|
return [
|
|
19483
|
-
{ key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access',
|
|
19484
|
-
{ key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access',
|
|
19748
|
+
{ key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _599 => _599.stops, 'access', _600 => _600[0], 'optionalAccess', _601 => _601.color]), () => ( "#000000")) },
|
|
19749
|
+
{ key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _602 => _602.stops, 'access', _603 => _603[g.stops.length - 1], 'optionalAccess', _604 => _604.color]), () => ( "#ffffff")) },
|
|
19485
19750
|
{ key: `${prefix}.style`, label: "Style", type: "select", value: g.style, options: opt(["linear", "Linear"], ["radial", "Radial"], ["angle", "Angle"], ["reflected", "Reflected"], ["diamond", "Diamond"]) },
|
|
19486
19751
|
{ key: `${prefix}.angle`, label: "Angle", type: "range", min: -180, max: 180, step: 1, value: g.angle, unit: "\xB0" },
|
|
19487
19752
|
{ key: `${prefix}.scale`, label: "Scale", type: "range", min: 0.1, max: 1.5, step: 0.01, value: g.scale, percent: true, unit: "%" },
|
|
@@ -19573,19 +19838,19 @@ function layerEffectControls(e, patterns = []) {
|
|
|
19573
19838
|
}
|
|
19574
19839
|
function fillOfType(current, type, patterns) {
|
|
19575
19840
|
if (type === "gradient") return { type: "gradient", gradient: _chunkHGTDMKNEcjs.defaultEffectGradient.call(void 0, ) };
|
|
19576
|
-
if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access',
|
|
19841
|
+
if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _605 => _605[0], 'optionalAccess', _606 => _606.id]), () => ( "checker")), scale: 1 };
|
|
19577
19842
|
return { type: "color", color: current.type === "color" ? current.color : "#000000" };
|
|
19578
19843
|
}
|
|
19579
19844
|
function effectControlChange(effect, key, value, patterns = []) {
|
|
19580
19845
|
const [top, ...rest] = key.split(".");
|
|
19581
19846
|
if (top === "fill" && rest[0] === "type") return { fill: fillOfType(effect.fill, String(value), patterns) };
|
|
19582
19847
|
if (top === "patternId" && !rest.length) {
|
|
19583
|
-
const name = _optionalChain([patternOptions, 'call',
|
|
19848
|
+
const name = _optionalChain([patternOptions, 'call', _607 => _607(patterns), 'access', _608 => _608.find, 'call', _609 => _609((o) => o.value === value), 'optionalAccess', _610 => _610.label]);
|
|
19584
19849
|
return name ? { patternId: value, name } : { patternId: value };
|
|
19585
19850
|
}
|
|
19586
19851
|
if (!rest.length) return { [top]: value };
|
|
19587
19852
|
if (top === "fill" && rest[0] === "patternId") {
|
|
19588
|
-
const name = _optionalChain([patternOptions, 'call',
|
|
19853
|
+
const name = _optionalChain([patternOptions, 'call', _611 => _611(patterns), 'access', _612 => _612.find, 'call', _613 => _613((o) => o.value === value), 'optionalAccess', _614 => _614.label]);
|
|
19589
19854
|
return { fill: { ...effect.fill, patternId: value, ...name ? { name } : {} } };
|
|
19590
19855
|
}
|
|
19591
19856
|
return { [top]: setPath(getPath(effect, top), rest, value) };
|
|
@@ -19612,7 +19877,7 @@ function colorPanelView(controller) {
|
|
|
19612
19877
|
profileName: profile.name,
|
|
19613
19878
|
workingSpace: profile.builtin,
|
|
19614
19879
|
mode: profile.mode,
|
|
19615
|
-
cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access',
|
|
19880
|
+
cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access', _615 => _615.cmykProfile, 'optionalAccess', _616 => _616.name]), () => ( null)),
|
|
19616
19881
|
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
|
|
19617
19882
|
};
|
|
19618
19883
|
}
|
|
@@ -19820,7 +20085,7 @@ var FreeTransformTool = (_class16 = class {
|
|
|
19820
20085
|
__init131() {this.error = null}
|
|
19821
20086
|
__init132() {this.lastResult = null}
|
|
19822
20087
|
get active() {
|
|
19823
|
-
return Boolean(_optionalChain([this, 'access',
|
|
20088
|
+
return Boolean(_optionalChain([this, 'access', _617 => _617.sessionRef, 'optionalAccess', _618 => _618.isOpen]));
|
|
19824
20089
|
}
|
|
19825
20090
|
get session() {
|
|
19826
20091
|
return this.active ? this.sessionRef : null;
|
|
@@ -19829,7 +20094,7 @@ var FreeTransformTool = (_class16 = class {
|
|
|
19829
20094
|
return this.modeValue;
|
|
19830
20095
|
}
|
|
19831
20096
|
get interpolation() {
|
|
19832
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
20097
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _619 => _619.sessionRef, 'optionalAccess', _620 => _620.interpolation]), () => ( "bicubic"));
|
|
19833
20098
|
}
|
|
19834
20099
|
/** Whether the open transform has changed anything yet (a commit would add an undo step). */
|
|
19835
20100
|
get modified() {
|
|
@@ -19848,7 +20113,7 @@ var FreeTransformTool = (_class16 = class {
|
|
|
19848
20113
|
};
|
|
19849
20114
|
}
|
|
19850
20115
|
changed() {
|
|
19851
|
-
_optionalChain([this, 'access',
|
|
20116
|
+
_optionalChain([this, 'access', _621 => _621.options, 'access', _622 => _622.onChange, 'optionalCall', _623 => _623()]);
|
|
19852
20117
|
for (const l of this.listeners) l();
|
|
19853
20118
|
}
|
|
19854
20119
|
/** Opens a Free Transform (default: the selected pixels of the active layer, or the whole layer). Returns an error message or `null`. */
|
|
@@ -20241,7 +20506,7 @@ var FreeTransformTool = (_class16 = class {
|
|
|
20241
20506
|
}
|
|
20242
20507
|
/** Abandons the transform and restores everything. */
|
|
20243
20508
|
cancel() {
|
|
20244
|
-
_optionalChain([this, 'access',
|
|
20509
|
+
_optionalChain([this, 'access', _624 => _624.sessionRef, 'optionalAccess', _625 => _625.cancel, 'call', _626 => _626()]);
|
|
20245
20510
|
this.sessionRef = null;
|
|
20246
20511
|
this.corners = null;
|
|
20247
20512
|
this.mesh = null;
|
|
@@ -20297,7 +20562,7 @@ function imageLayerAppliedEffects(layer) {
|
|
|
20297
20562
|
const ref = (r) => ({ effect: r.effect, ...r.name ? { name: r.name } : {}, ...r.provider ? { provider: r.provider } : {} });
|
|
20298
20563
|
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 } : {} });
|
|
20299
20564
|
if (layer.type === "smart")
|
|
20300
|
-
(_nullishCoalesce(_optionalChain([layer, 'access',
|
|
20565
|
+
(_nullishCoalesce(_optionalChain([layer, 'access', _627 => _627.smartFilters, 'optionalAccess', _628 => _628.filters]), () => ( []))).forEach((f, index) => {
|
|
20301
20566
|
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 });
|
|
20302
20567
|
});
|
|
20303
20568
|
return out;
|
|
@@ -20449,7 +20714,7 @@ var OTHER_TOOL_LABELS = {
|
|
|
20449
20714
|
watermark: "Watermark"
|
|
20450
20715
|
};
|
|
20451
20716
|
function imageToolLabel(tool) {
|
|
20452
|
-
return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access',
|
|
20717
|
+
return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access', _629 => _629.find, 'call', _630 => _630((t) => t.id === tool), 'optionalAccess', _631 => _631.label]), () => ( OTHER_TOOL_LABELS[tool])), () => ( tool));
|
|
20453
20718
|
}
|
|
20454
20719
|
var IMAGE_TOOL_SHORTCUTS = {
|
|
20455
20720
|
...Object.fromEntries(PAINT_TOOLS.filter((t) => t.shortcut).map((t) => [t.id, t.shortcut])),
|
|
@@ -21585,4 +21850,9 @@ function createImageEditorDocument(controller, options = {}) {
|
|
|
21585
21850
|
|
|
21586
21851
|
|
|
21587
21852
|
|
|
21588
|
-
exports.ADJUSTMENT_KEYS = _chunkUYXL6ZWQcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkUYXL6ZWQcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkUYXL6ZWQcjs.ADJUSTMENT_LUT_SIZE; exports.ANCHOR_FRACTION = _chunkUYXL6ZWQcjs.ANCHOR_FRACTION; exports.AS_SHOT_KELVIN = _chunkUYXL6ZWQcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkUYXL6ZWQcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkUYXL6ZWQcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkCWM3CUUXcjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkCWM3CUUXcjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkUYXL6ZWQcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkV7GWZIZKcjs.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 = _chunkEBDCRTZIcjs.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.ColorGmm = ColorGmm; exports.CoverageMap = _chunkEBDCRTZIcjs.CoverageMap; exports.D50 = _chunkUYXL6ZWQcjs.D50; exports.D65 = _chunkUYXL6ZWQcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkBRKVNXDZcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkEBDCRTZIcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkEBDCRTZIcjs.DEFAULT_BRUSH; exports.DEFAULT_CANVAS_VIEWPORT = DEFAULT_CANVAS_VIEWPORT; exports.DEFAULT_CHANNEL_COLOR = DEFAULT_CHANNEL_COLOR; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkV7GWZIZKcjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkHGTDMKNEcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkUYXL6ZWQcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunkEBDCRTZIcjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunk7NW46N7Icjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunkEBDCRTZIcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkV7GWZIZKcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkV7GWZIZKcjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkUYXL6ZWQcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkHGTDMKNEcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkV7GWZIZKcjs.DRY_EPS; exports.DabWalker = _chunkEBDCRTZIcjs.DabWalker; exports.EFFECT_LAYER_USES = EFFECT_LAYER_USES; exports.EMPTY_DISTANCE = _chunkUYXL6ZWQcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkV7GWZIZKcjs.EX; exports.EY = _chunkV7GWZIZKcjs.EY; exports.EdgeMap = EdgeMap; exports.FLAG_ALIVE = _chunkV7GWZIZKcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkV7GWZIZKcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkV7GWZIZKcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkV7GWZIZKcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkV7GWZIZKcjs.FLAG_TOP; exports.FLAG_WET = _chunkV7GWZIZKcjs.FLAG_WET; exports.FLAT = _chunkV7GWZIZKcjs.FLAT; exports.FREE_INTERVAL = _chunkV7GWZIZKcjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkUYXL6ZWQcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GAMMA = GAMMA; exports.GRAIN_PATTERNS = _chunkEBDCRTZIcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkEBDCRTZIcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.GridGraph = GridGraph; exports.HIDE = _chunkV7GWZIZKcjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkUYXL6ZWQcjs.HUE_RANGE_LABELS; exports.HUE_RANGE_PRESETS = HUE_RANGE_PRESETS; exports.IDENTITY_CLONE_TRANSFORM = _chunk7NW46N7Icjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkUYXL6ZWQcjs.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 = _chunkHGTDMKNEcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkUYXL6ZWQcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkUYXL6ZWQcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkUYXL6ZWQcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkUYXL6ZWQcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkUYXL6ZWQcjs.LUMA_709; exports.LayerCompositor = _chunkUYXL6ZWQcjs.LayerCompositor; exports.LayerEffectError = _chunkHGTDMKNEcjs.LayerEffectError; exports.LayerOperationError = _chunkUYXL6ZWQcjs.LayerOperationError; exports.MARCHING_ANTS_STEP_MS = MARCHING_ANTS_STEP_MS; exports.MASK_FILE_ACCEPT = MASK_FILE_ACCEPT; exports.MAX_BATCH = _chunkV7GWZIZKcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkEBDCRTZIcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_BACKING_SIDE = MAX_CANVAS_BACKING_SIDE; exports.MAX_EFFECT_ANIMATION_MS = _chunkUYXL6ZWQcjs.MAX_EFFECT_ANIMATION_MS; exports.MAX_EFFECT_REACH = _chunkHGTDMKNEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkUYXL6ZWQcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkV7GWZIZKcjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkHGTDMKNEcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkV7GWZIZKcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkV7GWZIZKcjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkUYXL6ZWQcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkUYXL6ZWQcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkEBDCRTZIcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkEBDCRTZIcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkEBDCRTZIcjs.MIXING_MODELS; exports.MixerStroke = _chunkEBDCRTZIcjs.MixerStroke; exports.OPP = _chunkV7GWZIZKcjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkCWM3CUUXcjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunkEBDCRTZIcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkEBDCRTZIcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkV7GWZIZKcjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkUYXL6ZWQcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkV7GWZIZKcjs.PARAM; exports.PARAM_FLOATS = _chunkV7GWZIZKcjs.PARAM_FLOATS; exports.PASTE_MODES = PASTE_MODES; exports.PATTERN_BLOCK_KEYS = _chunkUYXL6ZWQcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkCWM3CUUXcjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkV7GWZIZKcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkV7GWZIZKcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkCWM3CUUXcjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkV7GWZIZKcjs.PLANE; exports.PLANE_BYTES = _chunkV7GWZIZKcjs.PLANE_BYTES; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkUYXL6ZWQcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkV7GWZIZKcjs.P_D0; exports.P_EDGE = _chunkV7GWZIZKcjs.P_EDGE; exports.P_FX = _chunkV7GWZIZKcjs.P_FX; exports.P_FY = _chunkV7GWZIZKcjs.P_FY; exports.P_H = _chunkV7GWZIZKcjs.P_H; exports.P_P0 = _chunkV7GWZIZKcjs.P_P0; exports.P_RHO = _chunkV7GWZIZKcjs.P_RHO; exports.P_SW = _chunkV7GWZIZKcjs.P_SW; exports.P_UX = _chunkV7GWZIZKcjs.P_UX; exports.P_UY = _chunkV7GWZIZKcjs.P_UY; exports.PaintExchange = _chunkEBDCRTZIcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkEBDCRTZIcjs.PaintGradientSampler; exports.PaintSourceError = _chunkEBDCRTZIcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaperGrain = _chunkEBDCRTZIcjs.PaperGrain; exports.PatternPlacement = _chunkHGTDMKNEcjs.PatternPlacement; exports.PatternTile = _chunkHGTDMKNEcjs.PatternTile; exports.PsdError = _chunkUYXL6ZWQcjs.PsdError; exports.QUICK_MASK_TARGET = QUICK_MASK_TARGET; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunk7NW46N7Icjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunk7NW46N7Icjs.RegionPixelSource; exports.RetouchDabStroke = _chunk7NW46N7Icjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkUYXL6ZWQcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkUYXL6ZWQcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SET_PLANES = _chunkV7GWZIZKcjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkCWM3CUUXcjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkUYXL6ZWQcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkUYXL6ZWQcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkV7GWZIZKcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkV7GWZIZKcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkV7GWZIZKcjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkUYXL6ZWQcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunk7NW46N7Icjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkV7GWZIZKcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkV7GWZIZKcjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkUYXL6ZWQcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkEBDCRTZIcjs.SmudgeTip; exports.StrokeCoverage = _chunkEBDCRTZIcjs.StrokeCoverage; exports.SurfaceDraft = _chunkCWM3CUUXcjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkUYXL6ZWQcjs.TEXT_ALIGNS; exports.TEXT_ORIENTATIONS = _chunkUYXL6ZWQcjs.TEXT_ORIENTATIONS; exports.TEXT_RENDER_MARGIN = _chunkUYXL6ZWQcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkUYXL6ZWQcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkCWM3CUUXcjs.TILE; exports.TILE_SHIFT = _chunkCWM3CUUXcjs.TILE_SHIFT; exports.TINT_SCALE = _chunkUYXL6ZWQcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkEBDCRTZIcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkUYXL6ZWQcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunk7NW46N7Icjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkUYXL6ZWQcjs.TRANSFORM_ANCHORS; exports.TRANSFORM_ROTATE_HANDLE_OFFSET = TRANSFORM_ROTATE_HANDLE_OFFSET; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunkEBDCRTZIcjs.TileMedium; exports.TilePixelSource = _chunk7NW46N7Icjs.TilePixelSource; exports.TileableNoise = _chunkEBDCRTZIcjs.TileableNoise; exports.TiledSurface = _chunkCWM3CUUXcjs.TiledSurface; exports.TransformTooLargeError = _chunkHGTDMKNEcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunk7NW46N7Icjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.UNITS = UNITS; exports.U_MAX = _chunkV7GWZIZKcjs.U_MAX; exports.VIBRANCE_GREY = _chunkUYXL6ZWQcjs.VIBRANCE_GREY; exports.W9 = _chunkV7GWZIZKcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkBRKVNXDZcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkBRKVNXDZcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkV7GWZIZKcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkV7GWZIZKcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkV7GWZIZKcjs.WET_TILE; exports.WGSL_HALO = _chunkV7GWZIZKcjs.WGSL_HALO; exports.WGSL_SHADE = _chunkV7GWZIZKcjs.WGSL_SHADE; exports.WGSL_STEP = _chunkV7GWZIZKcjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WORK_SIZE = WORK_SIZE; exports.WetGpuEngine = _chunkV7GWZIZKcjs.WetGpuEngine; exports.WetMedium = _chunkV7GWZIZKcjs.WetMedium; exports.WetWorkerPool = _chunkV7GWZIZKcjs.WetWorkerPool; exports.WetWorld = _chunkV7GWZIZKcjs.WetWorld; exports.WetWorldError = _chunkV7GWZIZKcjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkUYXL6ZWQcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkUYXL6ZWQcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkUYXL6ZWQcjs.activeEffectSmartFilters; exports.activeLayerAfterRemoval = _chunkUYXL6ZWQcjs.activeLayerAfterRemoval; exports.activeSmartFilters = _chunkUYXL6ZWQcjs.activeSmartFilters; exports.addLayerEffect = _chunkUYXL6ZWQcjs.addLayerEffect; exports.addLayerFilter = _chunkUYXL6ZWQcjs.addLayerFilter; exports.addLayerOfKind = addLayerOfKind; exports.addPaintGradientStop = _chunkEBDCRTZIcjs.addPaintGradientStop; exports.addSmartFilter = _chunkUYXL6ZWQcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkUYXL6ZWQcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkUYXL6ZWQcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkUYXL6ZWQcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkUYXL6ZWQcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.agentDragDraft = agentDragDraft; exports.anchorPoint = _chunkUYXL6ZWQcjs.anchorPoint; exports.annotationBlend = _chunkUYXL6ZWQcjs.annotationBlend; exports.annotationLayerFor = _chunkUYXL6ZWQcjs.annotationLayerFor; exports.annotationLayerName = _chunkUYXL6ZWQcjs.annotationLayerName; exports.annotationOfLayer = _chunkUYXL6ZWQcjs.annotationOfLayer; exports.annotationOfShape = _chunkUYXL6ZWQcjs.annotationOfShape; exports.annotationOfType = _chunkUYXL6ZWQcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkUYXL6ZWQcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkUYXL6ZWQcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkUYXL6ZWQcjs.applyAdjustments; exports.applyBoxBlur = _chunkUYXL6ZWQcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkUYXL6ZWQcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkUYXL6ZWQcjs.applyDepthMask; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkUYXL6ZWQcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkUYXL6ZWQcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkUYXL6ZWQcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkUYXL6ZWQcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkUYXL6ZWQcjs.applyParams; exports.applyProcess2Adjustments = _chunkUYXL6ZWQcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkUYXL6ZWQcjs.applyProcess2Float; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunk7NW46N7Icjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkUYXL6ZWQcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkEBDCRTZIcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkEBDCRTZIcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunk7NW46N7Icjs.applyToneToDeepTile; exports.backgroundLayer = _chunkUYXL6ZWQcjs.backgroundLayer; exports.base64ToBytes = _chunkCWM3CUUXcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunk7NW46N7Icjs.bestOffset; exports.blackWhiteGray = _chunkUYXL6ZWQcjs.blackWhiteGray; exports.blendChannel = _chunkCWM3CUUXcjs.blendChannel; exports.blendImageData = _chunkCWM3CUUXcjs.blendImageData; exports.blendLum = _chunkCWM3CUUXcjs.blendLum; exports.blendPixel = _chunkCWM3CUUXcjs.blendPixel; exports.blendRadius = _chunkEBDCRTZIcjs.blendRadius; exports.blendRgb = _chunkCWM3CUUXcjs.blendRgb; exports.blendTile = _chunkHGTDMKNEcjs.blendTile; exports.blenderDab = _chunkEBDCRTZIcjs.blenderDab; exports.blurFilter = _chunkUYXL6ZWQcjs.blurFilter; exports.borderCoverage = _chunkUYXL6ZWQcjs.borderCoverage; exports.boxBlur = boxBlur; exports.boxBlurPixels = _chunk7NW46N7Icjs.boxBlurPixels; exports.boxFrameHit = boxFrameHit; exports.boxFrameOverlay = boxFrameOverlay; exports.boxMean = boxMean; exports.boxPointOf = _chunkUYXL6ZWQcjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkUYXL6ZWQcjs.bradfordAdaptation; exports.brushstrokeDataUrl = _chunkEBDCRTZIcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkEBDCRTZIcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkEBDCRTZIcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkEBDCRTZIcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkEBDCRTZIcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkUYXL6ZWQcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkUYXL6ZWQcjs.buildToneLut; exports.builtinPattern = _chunkHGTDMKNEcjs.builtinPattern; exports.builtinPatternIds = _chunkHGTDMKNEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkCWM3CUUXcjs.bytesToBase64; exports.calculateCropDrag = _chunkUYXL6ZWQcjs.calculateCropDrag; exports.canShareMemory = _chunkV7GWZIZKcjs.canShareMemory; exports.canvasCompositeOperation = _chunkCWM3CUUXcjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkUYXL6ZWQcjs.canvasToImagePoint; exports.caretAt = _chunkBRKVNXDZcjs.caretAt; exports.changedTiles = _chunkHGTDMKNEcjs.changedTiles; exports.channelThumbnail = channelThumbnail; exports.checkEffectAnimation = checkEffectAnimation; exports.checkEffectTime = checkEffectTime; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkUYXL6ZWQcjs.clampCropToImage; exports.cleanMixer = _chunkEBDCRTZIcjs.cleanMixer; exports.cloneSamplePoint = _chunk7NW46N7Icjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunkCWM3CUUXcjs.collectTiles; exports.colorBalanceChannel = _chunkUYXL6ZWQcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.colorRangePreset = colorRangePreset; exports.combineSelections = _chunkUYXL6ZWQcjs.combineSelections; exports.compileAdjustmentLayer = _chunkUYXL6ZWQcjs.compileAdjustmentLayer; exports.componentPath = _chunkUYXL6ZWQcjs.componentPath; exports.componentsCoverage = _chunkUYXL6ZWQcjs.componentsCoverage; exports.compositeDeep = _chunkUYXL6ZWQcjs.compositeDeep; exports.compositeSurfaceOver = _chunkHGTDMKNEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkUYXL6ZWQcjs.computeSelectionBounds; exports.contentAwareFill = _chunk7NW46N7Icjs.contentAwareFill; exports.contentBounds = _chunkCWM3CUUXcjs.contentBounds; exports.contentsBox = _chunkUYXL6ZWQcjs.contentsBox; exports.contentsSurface = _chunkUYXL6ZWQcjs.contentsSurface; exports.contractCoverage = _chunkUYXL6ZWQcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkCWM3CUUXcjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkUYXL6ZWQcjs.convertToSmartObject; exports.copySmartObject = _chunkUYXL6ZWQcjs.copySmartObject; exports.cornersFromMatrix = _chunkUYXL6ZWQcjs.cornersFromMatrix; exports.coverageTileCoord = _chunkEBDCRTZIcjs.coverageTileCoord; exports.coverageToByte = _chunkUYXL6ZWQcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkUYXL6ZWQcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkEBDCRTZIcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkBRKVNXDZcjs.createCanvasTextShaper; 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 = _chunkBRKVNXDZcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkBRKVNXDZcjs.createOutlineTextShaper; exports.createPigment = _chunkCWM3CUUXcjs.createPigment; exports.createPigmentTools = _chunkV7GWZIZKcjs.createPigmentTools; exports.createSelectionMask = _chunkUYXL6ZWQcjs.createSelectionMask; exports.createShapeLayer = _chunkUYXL6ZWQcjs.createShapeLayer; exports.createTypeLayer = _chunkUYXL6ZWQcjs.createTypeLayer; exports.createWetGpuEngine = _chunkV7GWZIZKcjs.createWetGpuEngine; exports.cssFont = _chunkBRKVNXDZcjs.cssFont; exports.cssFontFamily = _chunkBRKVNXDZcjs.cssFontFamily; exports.curveLut = _chunkHGTDMKNEcjs.curveLut; exports.curveLutFromLevels = _chunkUYXL6ZWQcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkEBDCRTZIcjs.dabCoverage; exports.dabRect = _chunkEBDCRTZIcjs.dabRect; exports.decodeDeepSurface = _chunkUYXL6ZWQcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkUYXL6ZWQcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkUYXL6ZWQcjs.decodeLayerMask; exports.decodeMergedImage = _chunkUYXL6ZWQcjs.decodeMergedImage; exports.decodePlanes = _chunkUYXL6ZWQcjs.decodePlanes; exports.decodePng = _chunkCWM3CUUXcjs.decodePng; exports.decodePngDataUrl = _chunkUYXL6ZWQcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkUYXL6ZWQcjs.decodeSelectionRle; exports.deepBytes = _chunkCWM3CUUXcjs.deepBytes; exports.deepTile = _chunkCWM3CUUXcjs.deepTile; exports.defaultActiveLayerId = _chunkUYXL6ZWQcjs.defaultActiveLayerId; exports.defaultAdjustmentParams = _chunkUYXL6ZWQcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkHGTDMKNEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkHGTDMKNEcjs.defaultLayerEffect; exports.defaultShapeName = _chunkUYXL6ZWQcjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkUYXL6ZWQcjs.depthMaskAlpha; exports.depthOf = _chunkCWM3CUUXcjs.depthOf; exports.depthRasterMask = _chunkUYXL6ZWQcjs.depthRasterMask; exports.describeChannel = describeChannel; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkUYXL6ZWQcjs.describeTransform; exports.deserializeChannels = deserializeChannels; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkUYXL6ZWQcjs.deserializeEffects; exports.deserializeLayer = _chunkUYXL6ZWQcjs.deserializeLayer; exports.deserializeLayers = _chunkUYXL6ZWQcjs.deserializeLayers; exports.deserializePatterns = _chunkUYXL6ZWQcjs.deserializePatterns; exports.deserializeSelection = _chunkUYXL6ZWQcjs.deserializeSelection; exports.developFilter = _chunkUYXL6ZWQcjs.developFilter; exports.developFromAdjustments = _chunkUYXL6ZWQcjs.developFromAdjustments; exports.developTarget = _chunkUYXL6ZWQcjs.developTarget; exports.dexp = _chunkV7GWZIZKcjs.dexp; exports.dilateMask = _chunk7NW46N7Icjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkUYXL6ZWQcjs.distanceTransform; exports.dlog = _chunkV7GWZIZKcjs.dlog; exports.documentContents = _chunkUYXL6ZWQcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunk7NW46N7Icjs.dodgeBurn; exports.dodgeBurnCurve = _chunk7NW46N7Icjs.dodgeBurnCurve; exports.downloadMaskImage = downloadMaskImage; exports.downloadPsd = downloadPsd; exports.dpow = _chunkV7GWZIZKcjs.dpow; exports.dragWarpMeshPoint = _chunkBRKVNXDZcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkV7GWZIZKcjs.dsincos; exports.duplicateLayer = _chunkUYXL6ZWQcjs.duplicateLayer; exports.edgeBits = _chunkV7GWZIZKcjs.edgeBits; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunkHGTDMKNEcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectLayerTiming = effectLayerTiming; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkHGTDMKNEcjs.effectReach; exports.effectiveLayerMask = _chunkUYXL6ZWQcjs.effectiveLayerMask; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkHGTDMKNEcjs.effectsFingerprint; exports.effectsMargin = _chunkHGTDMKNEcjs.effectsMargin; exports.effectsScale = _chunkHGTDMKNEcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkCWM3CUUXcjs.emptySurface; exports.encodeDeepSurface = _chunkUYXL6ZWQcjs.encodeDeepSurface; exports.encodePng = _chunkCWM3CUUXcjs.encodePng; exports.encodeRle = _chunkUYXL6ZWQcjs.encodeRle; exports.encodeSelectionRle = _chunkUYXL6ZWQcjs.encodeSelectionRle; exports.encodeSurface = _chunkUYXL6ZWQcjs.encodeSurface; exports.evalWarpMesh = _chunkBRKVNXDZcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkUYXL6ZWQcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkEBDCRTZIcjs.exchangeRates; exports.expNeg = _chunkV7GWZIZKcjs.expNeg; exports.expandCoverage = _chunkUYXL6ZWQcjs.expandCoverage; exports.exportPsd = _chunkUYXL6ZWQcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkUYXL6ZWQcjs.featherCoverage; exports.fillRect = _chunkCWM3CUUXcjs.fillRect; exports.filmPixel = _chunkV7GWZIZKcjs.filmPixel; exports.filmReflectance = _chunkV7GWZIZKcjs.filmReflectance; exports.filterMaskCoverage = _chunkUYXL6ZWQcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkHGTDMKNEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findSky = findSky; exports.findSubject = findSubject; exports.findWebGpu = _chunkV7GWZIZKcjs.findWebGpu; exports.finishTile = _chunkCWM3CUUXcjs.finishTile; exports.fitParagraphRuns = _chunkBRKVNXDZcjs.fitParagraphRuns; exports.fitRuns = _chunkBRKVNXDZcjs.fitRuns; exports.flattenLayers = _chunkHGTDMKNEcjs.flattenLayers; exports.flattenPath = _chunkUYXL6ZWQcjs.flattenPath; exports.flipCorners = _chunkUYXL6ZWQcjs.flipCorners; exports.flowField = _chunkV7GWZIZKcjs.flowField; exports.focusArea = focusArea; exports.followLayerMove = _chunkUYXL6ZWQcjs.followLayerMove; exports.fontOf = _chunkBRKVNXDZcjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkUYXL6ZWQcjs.fullSelection; exports.gaussianBlur = _chunkHGTDMKNEcjs.gaussianBlur; exports.geometryHomography = _chunkUYXL6ZWQcjs.geometryHomography; exports.getAnnotationBounds = _chunkUYXL6ZWQcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkUYXL6ZWQcjs.getCropCursor; exports.getRotatedSize = _chunkUYXL6ZWQcjs.getRotatedSize; exports.getViewportMetrics = _chunkUYXL6ZWQcjs.getViewportMetrics; exports.getViewportProjection = _chunkUYXL6ZWQcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.grabCutLabels = grabCutLabels; exports.gradientDabColor = _chunkEBDCRTZIcjs.gradientDabColor; exports.grainCatch = _chunkEBDCRTZIcjs.grainCatch; exports.grainHeights = _chunkEBDCRTZIcjs.grainHeights; exports.greyMorphology = _chunkUYXL6ZWQcjs.greyMorphology; exports.groupLayers = _chunkUYXL6ZWQcjs.groupLayers; exports.growSelection = growSelection; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handleMaskViewKey = handleMaskViewKey; exports.handlePaintShortcut = handlePaintShortcut; exports.handleQuickMaskKey = handleQuickMaskKey; exports.handleSelectionShortcut = handleSelectionShortcut; exports.hasActiveEffects = _chunkHGTDMKNEcjs.hasActiveEffects; exports.hasLayersBelow = hasLayersBelow; exports.hasResampledLegacyMask = _chunkUYXL6ZWQcjs.hasResampledLegacyMask; exports.hasSurface = _chunkUYXL6ZWQcjs.hasSurface; exports.hasWarp = _chunkUYXL6ZWQcjs.hasWarp; exports.hash2 = _chunkEBDCRTZIcjs.hash2; exports.hashMaskContent = _chunkUYXL6ZWQcjs.hashMaskContent; exports.hashNoise = _chunkHGTDMKNEcjs.hashNoise; exports.healPixels = _chunk7NW46N7Icjs.healPixels; exports.hexToPaintRgb = _chunkEBDCRTZIcjs.hexToPaintRgb; exports.hexToRgb = _chunkUYXL6ZWQcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkUYXL6ZWQcjs.hitTestAnnotation; exports.hitTestCrop = _chunkUYXL6ZWQcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkUYXL6ZWQcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkUYXL6ZWQcjs.hueRangeTables; exports.hueRangeWeight = _chunkUYXL6ZWQcjs.hueRangeWeight; exports.hueSaturation = _chunkUYXL6ZWQcjs.hueSaturation; exports.identityCurve = _chunkUYXL6ZWQcjs.identityCurve; exports.identityLevels = _chunkUYXL6ZWQcjs.identityLevels; exports.identityTransform = _chunkUYXL6ZWQcjs.identityTransform; exports.identityWarpMesh = _chunkBRKVNXDZcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imagePanelTool = imagePanelTool; exports.imagePlaybackPanel = imagePlaybackPanel; exports.imageToCanvasPoint = _chunkUYXL6ZWQcjs.imageToCanvasPoint; exports.imageToolCanvasMode = imageToolCanvasMode; exports.imageToolForShortcut = imageToolForShortcut; exports.imageToolGroup = imageToolGroup; exports.imageToolLabel = imageToolLabel; exports.imageToolPanel = imageToolPanel; exports.importPsd = _chunkUYXL6ZWQcjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkHGTDMKNEcjs.insertLayer; exports.instancesOf = _chunkUYXL6ZWQcjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkUYXL6ZWQcjs.invertMatrix3; exports.invertSelection = _chunkUYXL6ZWQcjs.invertSelection; exports.isActiveFilter = _chunkUYXL6ZWQcjs.isActiveFilter; exports.isActiveVectorMask = _chunkUYXL6ZWQcjs.isActiveVectorMask; exports.isAdjustmentKind = _chunkUYXL6ZWQcjs.isAdjustmentKind; exports.isBitDepth = _chunkCWM3CUUXcjs.isBitDepth; exports.isBlendMode = _chunkCWM3CUUXcjs.isBlendMode; exports.isBrushstrokeBrush = _chunkEBDCRTZIcjs.isBrushstrokeBrush; exports.isColorRangePreset = isColorRangePreset; exports.isContentsDecoded = _chunkUYXL6ZWQcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkUYXL6ZWQcjs.isDefaultDepthMask; exports.isGradientPaint = _chunkEBDCRTZIcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunk7NW46N7Icjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkUYXL6ZWQcjs.isIdentityTransform; exports.isInterpolation = _chunkHGTDMKNEcjs.isInterpolation; exports.isLayerEffectKind = _chunkHGTDMKNEcjs.isLayerEffectKind; exports.isLayerLocked = _chunkHGTDMKNEcjs.isLayerLocked; exports.isLegacyShape = _chunkUYXL6ZWQcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPaintableLayer = _chunkUYXL6ZWQcjs.isPaintableLayer; exports.isPainterlyBlendMode = _chunkCWM3CUUXcjs.isPainterlyBlendMode; exports.isPng = _chunkCWM3CUUXcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkUYXL6ZWQcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkUYXL6ZWQcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkUYXL6ZWQcjs.isSelectionEmpty; exports.isSelectionMode = _chunkUYXL6ZWQcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkCWM3CUUXcjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkUYXL6ZWQcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkUYXL6ZWQcjs.isTransformAnchor; exports.isValidWarp = _chunkUYXL6ZWQcjs.isValidWarp; exports.keepDeepSamples = _chunkCWM3CUUXcjs.keepDeepSamples; exports.keepMainPieces = keepMainPieces; exports.kelvinToTemperature = _chunkUYXL6ZWQcjs.kelvinToTemperature; exports.keysWeight = _chunkHGTDMKNEcjs.keysWeight; exports.latticeViscosity = _chunkV7GWZIZKcjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkHGTDMKNEcjs.layerEffectFields; exports.layerEffectLabel = _chunkHGTDMKNEcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkUYXL6ZWQcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkUYXL6ZWQcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkUYXL6ZWQcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkUYXL6ZWQcjs.layerMaskKey; exports.layerMaskSelection = _chunkUYXL6ZWQcjs.layerMaskSelection; exports.layerMenu = layerMenu; exports.layerName = _chunkUYXL6ZWQcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerPanels = layerPanels; exports.layerThumbnailClick = layerThumbnailClick; exports.layerTree = _chunkUYXL6ZWQcjs.layerTree; exports.layerTypeLabel = _chunkUYXL6ZWQcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkUYXL6ZWQcjs.layersFromLegacy; exports.layoutText = _chunkBRKVNXDZcjs.layoutText; exports.legacyAdjustmentLayer = _chunkUYXL6ZWQcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkUYXL6ZWQcjs.legacyMaskOf; exports.legacyView = _chunkUYXL6ZWQcjs.legacyView; exports.lerpPigment = _chunkCWM3CUUXcjs.lerpPigment; exports.lerpPigmentInto = _chunkCWM3CUUXcjs.lerpPigmentInto; exports.levelsValue = _chunkUYXL6ZWQcjs.levelsValue; exports.linearSrgbToXy = _chunkUYXL6ZWQcjs.linearSrgbToXy; exports.linearToSrgb = _chunkUYXL6ZWQcjs.linearToSrgb; exports.linearToSrgb8 = _chunkV7GWZIZKcjs.linearToSrgb8; exports.liveComponent = _chunkUYXL6ZWQcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkUYXL6ZWQcjs.liveShapeSubpaths; exports.liveWire = liveWire; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkEBDCRTZIcjs.loadMixer; exports.loadOpenTypeFont = _chunk3T5VCDIVcjs.loadOpenTypeFont; exports.loadWetKernel = _chunkV7GWZIZKcjs.loadWetKernel; exports.luma = _chunk7NW46N7Icjs.luma; exports.magicWand = magicWand; exports.magneticAnchorSpacing = magneticAnchorSpacing; exports.mapCropHandle = _chunkUYXL6ZWQcjs.mapCropHandle; exports.mapLayer = _chunkHGTDMKNEcjs.mapLayer; exports.mapSubpaths = _chunkUYXL6ZWQcjs.mapSubpaths; exports.maskBounds = _chunk7NW46N7Icjs.maskBounds; exports.maskFileName = maskFileName; exports.maskNameFromFile = maskNameFromFile; exports.maskSummary = maskSummary; exports.maskThumbnailClick = maskThumbnailClick; exports.matrixFromCorners = _chunkUYXL6ZWQcjs.matrixFromCorners; exports.matrixFromParams = _chunkUYXL6ZWQcjs.matrixFromParams; exports.measureCanvasViewport = measureCanvasViewport; exports.membraneFill = _chunk7NW46N7Icjs.membraneFill; exports.mergeLayerEffect = _chunkHGTDMKNEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkUYXL6ZWQcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunkEBDCRTZIcjs.mix32; exports.mixPigment8 = _chunkCWM3CUUXcjs.mixPigment8; exports.mixPigmentRgb = _chunkCWM3CUUXcjs.mixPigmentRgb; exports.mixPigments = _chunkCWM3CUUXcjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunkEBDCRTZIcjs.mixerRates; exports.modifySelection = _chunkUYXL6ZWQcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkUYXL6ZWQcjs.moveLayer; exports.moveSmartFilter = _chunkUYXL6ZWQcjs.moveSmartFilter; exports.mulMatrix3 = _chunkUYXL6ZWQcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkUYXL6ZWQcjs.neutralHueRange; exports.newContentsId = _chunkUYXL6ZWQcjs.newContentsId; exports.newEffectId = _chunkHGTDMKNEcjs.newEffectId; exports.newLayerId = _chunkUYXL6ZWQcjs.newLayerId; exports.newLayerOptions = newLayerOptions; exports.normalizeAdjustmentLayer = _chunkUYXL6ZWQcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkUYXL6ZWQcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkUYXL6ZWQcjs.normalizeAngle; exports.normalizeBlendMode = _chunkCWM3CUUXcjs.normalizeBlendMode; exports.normalizeBlender = _chunkEBDCRTZIcjs.normalizeBlender; exports.normalizeBrush = _chunkEBDCRTZIcjs.normalizeBrush; exports.normalizeFilter = _chunkUYXL6ZWQcjs.normalizeFilter; exports.normalizeFlow = _chunkV7GWZIZKcjs.normalizeFlow; exports.normalizeHexColor = _chunkEBDCRTZIcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkHGTDMKNEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkUYXL6ZWQcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkUYXL6ZWQcjs.normalizeLiveShape; exports.normalizeMixer = _chunkEBDCRTZIcjs.normalizeMixer; exports.normalizePlacement = _chunkUYXL6ZWQcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkUYXL6ZWQcjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunk7NW46N7Icjs.normalizeRetouch; exports.normalizeShapePaint = _chunkUYXL6ZWQcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkUYXL6ZWQcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkUYXL6ZWQcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkEBDCRTZIcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkUYXL6ZWQcjs.normalizeSubpaths; exports.normalizeText = _chunkUYXL6ZWQcjs.normalizeText; exports.normalizeTilt = _chunkV7GWZIZKcjs.normalizeTilt; exports.normalizeWetParams = _chunkV7GWZIZKcjs.normalizeWetParams; exports.offsetLayer = _chunkUYXL6ZWQcjs.offsetLayer; exports.offsetShape = _chunkUYXL6ZWQcjs.offsetShape; exports.offsetSmartObject = _chunkUYXL6ZWQcjs.offsetSmartObject; exports.offsetVectorMask = _chunkUYXL6ZWQcjs.offsetVectorMask; exports.openMaskFile = openMaskFile; exports.openPsdFile = openPsdFile; exports.otsuThreshold = otsuThreshold; exports.packRgba = _chunkCWM3CUUXcjs.packRgba; exports.packWetParams = _chunkV7GWZIZKcjs.packWetParams; exports.paintGradientMappingFor = _chunkEBDCRTZIcjs.paintGradientMappingFor; exports.paintPathStroke = _chunkEBDCRTZIcjs.paintPathStroke; exports.paintSourceColor = _chunkEBDCRTZIcjs.paintSourceColor; exports.paintSourceCss = _chunkEBDCRTZIcjs.paintSourceCss; exports.paragraphRanges = _chunkBRKVNXDZcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkUYXL6ZWQcjs.parseAdjustmentBlock; exports.parseBlend = _chunkUYXL6ZWQcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkCWM3CUUXcjs.parseDataUrl; exports.parseEffectColor = _chunkHGTDMKNEcjs.parseEffectColor; exports.parseLfx2 = _chunkUYXL6ZWQcjs.parseLfx2; exports.parseLrfx = _chunkUYXL6ZWQcjs.parseLrfx; exports.parseOpenTypeFont = _chunk3T5VCDIVcjs.parseOpenTypeFont; exports.parsePaintSource = _chunkEBDCRTZIcjs.parsePaintSource; exports.parsePatternBlock = _chunkUYXL6ZWQcjs.parsePatternBlock; exports.parseSelectionMode = _chunkUYXL6ZWQcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkUYXL6ZWQcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkUYXL6ZWQcjs.patchParagraphStyle; exports.patchTextStyle = _chunkUYXL6ZWQcjs.patchTextStyle; exports.pathStrokeCoverage = _chunkEBDCRTZIcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkEBDCRTZIcjs.pathStrokeDabs; exports.pathToSelection = pathToSelection; exports.perDabStrength = _chunk7NW46N7Icjs.perDabStrength; exports.photoFilterMatrix = _chunkUYXL6ZWQcjs.photoFilterMatrix; exports.pigment8 = _chunkCWM3CUUXcjs.pigment8; exports.pigmentColor = _chunkV7GWZIZKcjs.pigmentColor; exports.pigmentOf = _chunkV7GWZIZKcjs.pigmentOf; exports.pixelLayerBounds = _chunkUYXL6ZWQcjs.pixelLayerBounds; exports.pixelLayers = _chunkUYXL6ZWQcjs.pixelLayers; exports.pixelPigment = _chunkV7GWZIZKcjs.pixelPigment; exports.placeContents = _chunkUYXL6ZWQcjs.placeContents; exports.placeLayer = _chunkUYXL6ZWQcjs.placeLayer; exports.placementAt = _chunkUYXL6ZWQcjs.placementAt; exports.placementBounds = _chunkUYXL6ZWQcjs.placementBounds; exports.placementGeometry = _chunkUYXL6ZWQcjs.placementGeometry; exports.planImageToolPlayback = planImageToolPlayback; exports.planOutlineTrace = planOutlineTrace; exports.pngDataUrl = _chunkCWM3CUUXcjs.pngDataUrl; exports.pointerPressure = _chunkV7GWZIZKcjs.pointerPressure; exports.pointerStrokeSample = _chunkV7GWZIZKcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkV7GWZIZKcjs.pointerStrokeSamples; exports.polygonCoverage = polygonCoverage; exports.polygonCoverageBox = polygonCoverageBox; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunkUYXL6ZWQcjs.posterizeValue; exports.presetWarp = _chunkUYXL6ZWQcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkUYXL6ZWQcjs.projectImagePoint; exports.projectImageRect = _chunkUYXL6ZWQcjs.projectImageRect; exports.projectMaskCoverage = _chunkUYXL6ZWQcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkCWM3CUUXcjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkUYXL6ZWQcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkUYXL6ZWQcjs.psdToLayers; exports.pullWarpMesh = _chunkBRKVNXDZcjs.pullWarpMesh; exports.put255 = _chunkEBDCRTZIcjs.put255; exports.quadFrameOverlay = quadFrameOverlay; exports.quickMaskPixels = quickMaskPixels; exports.quickSelectStroke = quickSelectStroke; exports.rand01 = _chunkEBDCRTZIcjs.rand01; exports.randSigned = _chunkEBDCRTZIcjs.randSigned; exports.rangeLightness = _chunkUYXL6ZWQcjs.rangeLightness; exports.rasterContents = _chunkUYXL6ZWQcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkUYXL6ZWQcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkUYXL6ZWQcjs.rasterizeCoverage; exports.rasterizeDab = _chunkEBDCRTZIcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkUYXL6ZWQcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkCWM3CUUXcjs.readDeepRegion; exports.readPaintSource = _chunkEBDCRTZIcjs.readPaintSource; exports.readPixel = _chunkCWM3CUUXcjs.readPixel; exports.readPsd = _chunkUYXL6ZWQcjs.readPsd; exports.readRegion = _chunkCWM3CUUXcjs.readRegion; exports.readSourceRegion = _chunk7NW46N7Icjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkHGTDMKNEcjs.reduceSurface; exports.referencePoint = _chunkUYXL6ZWQcjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkCWM3CUUXcjs.reflectanceToRgb; exports.removeAlpha = _chunkUYXL6ZWQcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkUYXL6ZWQcjs.removeLayer; exports.removeLayerEffect = _chunkUYXL6ZWQcjs.removeLayerEffect; exports.removeLayerFilter = _chunkUYXL6ZWQcjs.removeLayerFilter; exports.removePaintGradientStop = _chunkEBDCRTZIcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkUYXL6ZWQcjs.removeSmartFilter; exports.renderBrushstroke = _chunkEBDCRTZIcjs.renderBrushstroke; exports.renderLayerEffects = _chunkHGTDMKNEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkUYXL6ZWQcjs.renderShape; exports.renderShapeRect = _chunkUYXL6ZWQcjs.renderShapeRect; exports.renderSmartObject = _chunkUYXL6ZWQcjs.renderSmartObject; exports.renderText = _chunkUYXL6ZWQcjs.renderText; exports.replaceContents = _chunkUYXL6ZWQcjs.replaceContents; exports.replaceTextRange = _chunkUYXL6ZWQcjs.replaceTextRange; exports.requireLayer = _chunkUYXL6ZWQcjs.requireLayer; exports.requireOperation = _chunkUYXL6ZWQcjs.requireOperation; exports.requireShapeLayer = _chunkUYXL6ZWQcjs.requireShapeLayer; exports.requireSmartObject = _chunkUYXL6ZWQcjs.requireSmartObject; exports.requireTypeLayer = _chunkUYXL6ZWQcjs.requireTypeLayer; exports.requireUnlocked = _chunkUYXL6ZWQcjs.requireUnlocked; exports.rerender = _chunkUYXL6ZWQcjs.rerender; exports.rerenderShape = _chunkUYXL6ZWQcjs.rerenderShape; exports.rerenderText = _chunkUYXL6ZWQcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkUYXL6ZWQcjs.resizeSelection; exports.resizeWarpMesh = _chunkBRKVNXDZcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkUYXL6ZWQcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkEBDCRTZIcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.resolveVectorMasks = _chunkUYXL6ZWQcjs.resolveVectorMasks; exports.restyleRange = _chunkBRKVNXDZcjs.restyleRange; exports.retouchFilter = _chunk7NW46N7Icjs.retouchFilter; exports.reversePaintGradient = _chunkEBDCRTZIcjs.reversePaintGradient; exports.rgbToGray = _chunkUYXL6ZWQcjs.rgbToGray; exports.rgbToHsl = _chunkUYXL6ZWQcjs.rgbToHsl; exports.rgbToReflectance = _chunkCWM3CUUXcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunk7NW46N7Icjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkUYXL6ZWQcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkUYXL6ZWQcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sameCanvasViewport = sameCanvasViewport; exports.sampleLut = _chunkUYXL6ZWQcjs.sampleLut; exports.sampleToneLut = _chunkUYXL6ZWQcjs.sampleToneLut; exports.saturationOf = _chunk7NW46N7Icjs.saturationOf; exports.scaleLayerEffect = _chunkHGTDMKNEcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkEBDCRTZIcjs.scalePaintGradient; exports.seamlessClone = _chunk7NW46N7Icjs.seamlessClone; exports.seedFromString = _chunkEBDCRTZIcjs.seedFromString; exports.segmentToSelection = segmentToSelection; exports.segmentationOutlines = segmentationOutlines; exports.segmentsToSelection = segmentsToSelection; exports.selectObjectIn = selectObjectIn; exports.selectSimilar = selectSimilar; exports.selectionArea = _chunkUYXL6ZWQcjs.selectionArea; exports.selectionFromCoverage = _chunkUYXL6ZWQcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkUYXL6ZWQcjs.selectionFromPixels; exports.selectionFromRegion = _chunkUYXL6ZWQcjs.selectionFromRegion; exports.selectionFromTiles = _chunkUYXL6ZWQcjs.selectionFromTiles; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionRing = selectionRing; exports.selectionToCoverage = _chunkUYXL6ZWQcjs.selectionToCoverage; exports.selectionToPixels = _chunkUYXL6ZWQcjs.selectionToPixels; exports.selectionToSubpaths = selectionToSubpaths; exports.selectionValueAt = _chunkUYXL6ZWQcjs.selectionValueAt; exports.serializeChannels = serializeChannels; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkUYXL6ZWQcjs.serializeContents; exports.serializeEffects = _chunkUYXL6ZWQcjs.serializeEffects; exports.serializeLayer = _chunkUYXL6ZWQcjs.serializeLayer; exports.serializeLayers = _chunkUYXL6ZWQcjs.serializeLayers; exports.serializeLayersExternal = _chunkUYXL6ZWQcjs.serializeLayersExternal; exports.serializePatterns = _chunkUYXL6ZWQcjs.serializePatterns; exports.serializeSelection = _chunkUYXL6ZWQcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkUYXL6ZWQcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkUYXL6ZWQcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkUYXL6ZWQcjs.setLayerMask; exports.setLayerProperties = _chunkUYXL6ZWQcjs.setLayerProperties; exports.setLum = _chunkCWM3CUUXcjs.setLum; exports.setPigmentColor = _chunkCWM3CUUXcjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkUYXL6ZWQcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkUYXL6ZWQcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkUYXL6ZWQcjs.setSmartPlacement; exports.shadeTile = _chunkV7GWZIZKcjs.shadeTile; exports.shapeAsPixelLayer = _chunkUYXL6ZWQcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkUYXL6ZWQcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkUYXL6ZWQcjs.shapeGeometryBounds; exports.shapeLayers = _chunkUYXL6ZWQcjs.shapeLayers; exports.shapeOutline = _chunkUYXL6ZWQcjs.shapeOutline; exports.shapeRenderClip = _chunkUYXL6ZWQcjs.shapeRenderClip; exports.shiftCoverage = _chunkUYXL6ZWQcjs.shiftCoverage; exports.simplifyPixelPath = simplifyPixelPath; exports.skinToneRange = skinToneRange; exports.slicSuperpixels = slicSuperpixels; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkUYXL6ZWQcjs.smartObjectLayers; exports.smoothCoverage = _chunkUYXL6ZWQcjs.smoothCoverage; exports.smoothPoints = _chunkEBDCRTZIcjs.smoothPoints; exports.smoothnessWeights = smoothnessWeights; exports.smudgeEffect = _chunk7NW46N7Icjs.smudgeEffect; exports.snapPolygonToEdges = snapPolygonToEdges; exports.snapTo45 = snapTo45; exports.snapToEdge = snapToEdge; exports.softMaskToSelection = softMaskToSelection; exports.solidPaint = _chunkEBDCRTZIcjs.solidPaint; exports.solidSurface = _chunkCWM3CUUXcjs.solidSurface; exports.solveMembrane = _chunk7NW46N7Icjs.solveMembrane; exports.spliceRuns = _chunkBRKVNXDZcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunk7NW46N7Icjs.sponge; exports.spongeEffect = _chunk7NW46N7Icjs.spongeEffect; exports.spotHealPixels = _chunk7NW46N7Icjs.spotHealPixels; exports.spotHealWindow = _chunk7NW46N7Icjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkV7GWZIZKcjs.srgbByteToLinear; exports.srgbDecode = _chunkCWM3CUUXcjs.srgbDecode; exports.srgbEncode = _chunkCWM3CUUXcjs.srgbEncode; exports.srgbToLinear = _chunkUYXL6ZWQcjs.srgbToLinear; exports.standardBlendMode = _chunkCWM3CUUXcjs.standardBlendMode; exports.startMarchingAnts = startMarchingAnts; exports.stepSlotTs = _chunkV7GWZIZKcjs.stepSlotTs; exports.strokeGrainCatch = _chunkEBDCRTZIcjs.strokeGrainCatch; exports.styleAt = _chunkBRKVNXDZcjs.styleAt; exports.subpathsToSvgPath = subpathsToSvgPath; exports.sumHistograms = sumHistograms; exports.superpixelSaliency = superpixelSaliency; exports.surfaceBytes = _chunkCWM3CUUXcjs.surfaceBytes; exports.surfaceDepth = _chunkCWM3CUUXcjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkCWM3CUUXcjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunkCWM3CUUXcjs.surfaceFromPixels; exports.surfacesEqual = _chunkCWM3CUUXcjs.surfacesEqual; exports.tempTintToXy = _chunkUYXL6ZWQcjs.tempTintToXy; exports.temperatureToKelvin = _chunkUYXL6ZWQcjs.temperatureToKelvin; exports.textIndexAt = _chunkBRKVNXDZcjs.textIndexAt; exports.textMatrix = _chunkUYXL6ZWQcjs.textMatrix; exports.textOrientation = _chunkUYXL6ZWQcjs.textOrientation; exports.textOutlines = _chunkUYXL6ZWQcjs.textOutlines; exports.textRange = _chunkUYXL6ZWQcjs.textRange; exports.tileCoord = _chunkCWM3CUUXcjs.tileCoord; exports.tileKey = _chunkCWM3CUUXcjs.tileKey; exports.tileRect = _chunkCWM3CUUXcjs.tileRect; exports.tileSamples = _chunkCWM3CUUXcjs.tileSamples; exports.tileSamples16 = _chunkCWM3CUUXcjs.tileSamples16; exports.tileSamples32 = _chunkCWM3CUUXcjs.tileSamples32; exports.tilesInRect = _chunkCWM3CUUXcjs.tilesInRect; exports.tipFalloff = _chunkEBDCRTZIcjs.tipFalloff; exports.tipReach = _chunkEBDCRTZIcjs.tipReach; exports.tipShape = _chunkEBDCRTZIcjs.tipShape; exports.to16From32 = _chunkCWM3CUUXcjs.to16From32; exports.to16From8 = _chunkCWM3CUUXcjs.to16From8; exports.to32From16 = _chunkCWM3CUUXcjs.to32From16; exports.to32From8 = _chunkCWM3CUUXcjs.to32From8; exports.to8From16 = _chunkCWM3CUUXcjs.to8From16; exports.to8From32 = _chunkCWM3CUUXcjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkUYXL6ZWQcjs.toTextSpace; exports.toneCurve = _chunkUYXL6ZWQcjs.toneCurve; exports.toneLuts = _chunkUYXL6ZWQcjs.toneLuts; exports.toneOf = _chunk7NW46N7Icjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkUYXL6ZWQcjs.transformHomography; exports.transformMap = _chunkUYXL6ZWQcjs.transformMap; exports.transformShapeComponents = _chunkUYXL6ZWQcjs.transformShapeComponents; exports.transformSurface = _chunkHGTDMKNEcjs.transformSurface; exports.transformTypeLayer = _chunkUYXL6ZWQcjs.transformTypeLayer; exports.transformVectorMask = _chunkUYXL6ZWQcjs.transformVectorMask; exports.transformedBounds = _chunkHGTDMKNEcjs.transformedBounds; exports.transformedBox = _chunkUYXL6ZWQcjs.transformedBox; exports.transformedPoint = _chunkUYXL6ZWQcjs.transformedPoint; exports.translateLayer = _chunkUYXL6ZWQcjs.translateLayer; exports.translateSurface = _chunkCWM3CUUXcjs.translateSurface; exports.typeAsPixelLayer = _chunkUYXL6ZWQcjs.typeAsPixelLayer; exports.typeFrame = _chunkUYXL6ZWQcjs.typeFrame; exports.typeFromAnnotation = _chunkUYXL6ZWQcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkUYXL6ZWQcjs.typeLayerName; exports.ungroupLayer = _chunkUYXL6ZWQcjs.ungroupLayer; exports.uniformTile = _chunkCWM3CUUXcjs.uniformTile; exports.unionRect = _chunkUYXL6ZWQcjs.unionRect; exports.unprojectCanvasPoint = _chunkUYXL6ZWQcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkUYXL6ZWQcjs.updateLayerEffect; exports.updateLayerFilter = _chunkUYXL6ZWQcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkUYXL6ZWQcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkEBDCRTZIcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkUYXL6ZWQcjs.updateShapeLayer; exports.updateSmartFilter = _chunkUYXL6ZWQcjs.updateSmartFilter; exports.updateTypeLayer = _chunkUYXL6ZWQcjs.updateTypeLayer; exports.upscaleRegion = upscaleRegion; exports.userErrorMessage = _chunkUYXL6ZWQcjs.userErrorMessage; exports.uvToXy = _chunkUYXL6ZWQcjs.uvToXy; exports.validateEffectGradient = _chunkHGTDMKNEcjs.validateEffectGradient; exports.validateLayerEffect = _chunkHGTDMKNEcjs.validateLayerEffect; exports.validateLayerEffects = _chunkHGTDMKNEcjs.validateLayerEffects; exports.vectorMaskBounds = _chunkUYXL6ZWQcjs.vectorMaskBounds; exports.vectorMaskCoverage = _chunkUYXL6ZWQcjs.vectorMaskCoverage; exports.vectorMaskThumbnail = _chunkUYXL6ZWQcjs.vectorMaskThumbnail; exports.vectorMaskThumbnailClick = vectorMaskThumbnailClick; exports.versionedDescriptorBytes = _chunkUYXL6ZWQcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkUYXL6ZWQcjs.vibranceLinear; exports.vibrancePixel = _chunkUYXL6ZWQcjs.vibrancePixel; exports.walkDabs = _chunkEBDCRTZIcjs.walkDabs; exports.warpMeshEditPoints = _chunkBRKVNXDZcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkBRKVNXDZcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkBRKVNXDZcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkBRKVNXDZcjs.warpPresetMesh; exports.warpSurface = _chunkHGTDMKNEcjs.warpSurface; exports.watchCanvasViewport = watchCanvasViewport; exports.wbMatrix = _chunkUYXL6ZWQcjs.wbMatrix; exports.wetGpuSupport = _chunkV7GWZIZKcjs.wetGpuSupport; exports.wetSimdSupported = _chunkV7GWZIZKcjs.wetSimdSupported; exports.wetSupport = _chunkV7GWZIZKcjs.wetSupport; exports.whiteBalanceFromSample = _chunkUYXL6ZWQcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkUYXL6ZWQcjs.whiteBalanceMatrix; exports.withBackgroundOpacity = withBackgroundOpacity; exports.withFilterMaskSurface = _chunkUYXL6ZWQcjs.withFilterMaskSurface; exports.withImagePlayback = withImagePlayback; exports.withNewIds = _chunkUYXL6ZWQcjs.withNewIds; exports.workImage = workImage; exports.workLuma = workLuma; exports.workPlanes = workPlanes; exports.writeAdjustmentBlock = _chunkUYXL6ZWQcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkCWM3CUUXcjs.writeDeepRegion; exports.writeLfx2 = _chunkUYXL6ZWQcjs.writeLfx2; exports.writePatternBlock = _chunkUYXL6ZWQcjs.writePatternBlock; exports.writePsd = _chunkUYXL6ZWQcjs.writePsd; exports.writeRegion = _chunkCWM3CUUXcjs.writeRegion; exports.xyToTempTint = _chunkUYXL6ZWQcjs.xyToTempTint; exports.xyToUv = _chunkUYXL6ZWQcjs.xyToUv;
|
|
21853
|
+
|
|
21854
|
+
|
|
21855
|
+
|
|
21856
|
+
|
|
21857
|
+
|
|
21858
|
+
exports.ADJUSTMENT_KEYS = _chunkUYXL6ZWQcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkUYXL6ZWQcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkUYXL6ZWQcjs.ADJUSTMENT_LUT_SIZE; exports.ANCHOR_FRACTION = _chunkUYXL6ZWQcjs.ANCHOR_FRACTION; exports.AS_SHOT_KELVIN = _chunkUYXL6ZWQcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkUYXL6ZWQcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkUYXL6ZWQcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkCWM3CUUXcjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkCWM3CUUXcjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkUYXL6ZWQcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkV7GWZIZKcjs.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 = _chunkEBDCRTZIcjs.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.ColorGmm = ColorGmm; exports.CoverageMap = _chunkEBDCRTZIcjs.CoverageMap; exports.D50 = _chunkUYXL6ZWQcjs.D50; exports.D65 = _chunkUYXL6ZWQcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkBRKVNXDZcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkEBDCRTZIcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkEBDCRTZIcjs.DEFAULT_BRUSH; exports.DEFAULT_CANVAS_VIEWPORT = DEFAULT_CANVAS_VIEWPORT; exports.DEFAULT_CHANNEL_COLOR = DEFAULT_CHANNEL_COLOR; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkV7GWZIZKcjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkHGTDMKNEcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkUYXL6ZWQcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunkEBDCRTZIcjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunk7NW46N7Icjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunkEBDCRTZIcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkV7GWZIZKcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkV7GWZIZKcjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkUYXL6ZWQcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkHGTDMKNEcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkV7GWZIZKcjs.DRY_EPS; exports.DabWalker = _chunkEBDCRTZIcjs.DabWalker; exports.EFFECT_LAYER_USES = EFFECT_LAYER_USES; exports.EMPTY_DISTANCE = _chunkUYXL6ZWQcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkV7GWZIZKcjs.EX; exports.EY = _chunkV7GWZIZKcjs.EY; exports.EdgeMap = EdgeMap; exports.FLAG_ALIVE = _chunkV7GWZIZKcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkV7GWZIZKcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkV7GWZIZKcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkV7GWZIZKcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkV7GWZIZKcjs.FLAG_TOP; exports.FLAG_WET = _chunkV7GWZIZKcjs.FLAG_WET; exports.FLAT = _chunkV7GWZIZKcjs.FLAT; exports.FREE_INTERVAL = _chunkV7GWZIZKcjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkUYXL6ZWQcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GAMMA = GAMMA; exports.GRAIN_PATTERNS = _chunkEBDCRTZIcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkEBDCRTZIcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.GridGraph = GridGraph; exports.HIDE = _chunkV7GWZIZKcjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkUYXL6ZWQcjs.HUE_RANGE_LABELS; exports.HUE_RANGE_PRESETS = HUE_RANGE_PRESETS; exports.IDENTITY_CLONE_TRANSFORM = _chunk7NW46N7Icjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkUYXL6ZWQcjs.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 = _chunkHGTDMKNEcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkUYXL6ZWQcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkUYXL6ZWQcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkUYXL6ZWQcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkUYXL6ZWQcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkUYXL6ZWQcjs.LUMA_709; exports.LayerCompositor = _chunkUYXL6ZWQcjs.LayerCompositor; exports.LayerEffectError = _chunkHGTDMKNEcjs.LayerEffectError; exports.LayerOperationError = _chunkUYXL6ZWQcjs.LayerOperationError; exports.MARCHING_ANTS_STEP_MS = MARCHING_ANTS_STEP_MS; exports.MASK_FILE_ACCEPT = MASK_FILE_ACCEPT; exports.MAX_BATCH = _chunkV7GWZIZKcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkEBDCRTZIcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_BACKING_SIDE = MAX_CANVAS_BACKING_SIDE; exports.MAX_EFFECT_ANIMATION_MS = _chunkUYXL6ZWQcjs.MAX_EFFECT_ANIMATION_MS; exports.MAX_EFFECT_REACH = _chunkHGTDMKNEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkUYXL6ZWQcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkV7GWZIZKcjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkHGTDMKNEcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkV7GWZIZKcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkV7GWZIZKcjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkUYXL6ZWQcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkUYXL6ZWQcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkEBDCRTZIcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkEBDCRTZIcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkEBDCRTZIcjs.MIXING_MODELS; exports.MixerStroke = _chunkEBDCRTZIcjs.MixerStroke; exports.OPP = _chunkV7GWZIZKcjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkCWM3CUUXcjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunkEBDCRTZIcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkEBDCRTZIcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkV7GWZIZKcjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkUYXL6ZWQcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkV7GWZIZKcjs.PARAM; exports.PARAM_FLOATS = _chunkV7GWZIZKcjs.PARAM_FLOATS; exports.PASTE_MODES = PASTE_MODES; exports.PATTERN_BLOCK_KEYS = _chunkUYXL6ZWQcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkCWM3CUUXcjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkV7GWZIZKcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkV7GWZIZKcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkCWM3CUUXcjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkV7GWZIZKcjs.PLANE; exports.PLANE_BYTES = _chunkV7GWZIZKcjs.PLANE_BYTES; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkUYXL6ZWQcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkV7GWZIZKcjs.P_D0; exports.P_EDGE = _chunkV7GWZIZKcjs.P_EDGE; exports.P_FX = _chunkV7GWZIZKcjs.P_FX; exports.P_FY = _chunkV7GWZIZKcjs.P_FY; exports.P_H = _chunkV7GWZIZKcjs.P_H; exports.P_P0 = _chunkV7GWZIZKcjs.P_P0; exports.P_RHO = _chunkV7GWZIZKcjs.P_RHO; exports.P_SW = _chunkV7GWZIZKcjs.P_SW; exports.P_UX = _chunkV7GWZIZKcjs.P_UX; exports.P_UY = _chunkV7GWZIZKcjs.P_UY; exports.PaintExchange = _chunkEBDCRTZIcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkEBDCRTZIcjs.PaintGradientSampler; exports.PaintSourceError = _chunkEBDCRTZIcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaperGrain = _chunkEBDCRTZIcjs.PaperGrain; exports.PatternPlacement = _chunkHGTDMKNEcjs.PatternPlacement; exports.PatternTile = _chunkHGTDMKNEcjs.PatternTile; exports.PsdError = _chunkUYXL6ZWQcjs.PsdError; exports.QUICK_MASK_TARGET = QUICK_MASK_TARGET; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.REFINE_EDIT_KINDS = REFINE_EDIT_KINDS; exports.REFINE_OUTPUTS = REFINE_OUTPUTS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunk7NW46N7Icjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunk7NW46N7Icjs.RegionPixelSource; exports.RetouchDabStroke = _chunk7NW46N7Icjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkUYXL6ZWQcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkUYXL6ZWQcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SET_PLANES = _chunkV7GWZIZKcjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkCWM3CUUXcjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkUYXL6ZWQcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkUYXL6ZWQcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkV7GWZIZKcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkV7GWZIZKcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkV7GWZIZKcjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkUYXL6ZWQcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunk7NW46N7Icjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkV7GWZIZKcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkV7GWZIZKcjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkUYXL6ZWQcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkEBDCRTZIcjs.SmudgeTip; exports.StrokeCoverage = _chunkEBDCRTZIcjs.StrokeCoverage; exports.SurfaceDraft = _chunkCWM3CUUXcjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkUYXL6ZWQcjs.TEXT_ALIGNS; exports.TEXT_ORIENTATIONS = _chunkUYXL6ZWQcjs.TEXT_ORIENTATIONS; exports.TEXT_RENDER_MARGIN = _chunkUYXL6ZWQcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkUYXL6ZWQcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkCWM3CUUXcjs.TILE; exports.TILE_SHIFT = _chunkCWM3CUUXcjs.TILE_SHIFT; exports.TINT_SCALE = _chunkUYXL6ZWQcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkEBDCRTZIcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkUYXL6ZWQcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunk7NW46N7Icjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkUYXL6ZWQcjs.TRANSFORM_ANCHORS; exports.TRANSFORM_ROTATE_HANDLE_OFFSET = TRANSFORM_ROTATE_HANDLE_OFFSET; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunkEBDCRTZIcjs.TileMedium; exports.TilePixelSource = _chunk7NW46N7Icjs.TilePixelSource; exports.TileableNoise = _chunkEBDCRTZIcjs.TileableNoise; exports.TiledSurface = _chunkCWM3CUUXcjs.TiledSurface; exports.TransformTooLargeError = _chunkHGTDMKNEcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunk7NW46N7Icjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.UNITS = UNITS; exports.U_MAX = _chunkV7GWZIZKcjs.U_MAX; exports.VIBRANCE_GREY = _chunkUYXL6ZWQcjs.VIBRANCE_GREY; exports.W9 = _chunkV7GWZIZKcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkBRKVNXDZcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkBRKVNXDZcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkV7GWZIZKcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkV7GWZIZKcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkV7GWZIZKcjs.WET_TILE; exports.WGSL_HALO = _chunkV7GWZIZKcjs.WGSL_HALO; exports.WGSL_SHADE = _chunkV7GWZIZKcjs.WGSL_SHADE; exports.WGSL_STEP = _chunkV7GWZIZKcjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WORK_SIZE = WORK_SIZE; exports.WetGpuEngine = _chunkV7GWZIZKcjs.WetGpuEngine; exports.WetMedium = _chunkV7GWZIZKcjs.WetMedium; exports.WetWorkerPool = _chunkV7GWZIZKcjs.WetWorkerPool; exports.WetWorld = _chunkV7GWZIZKcjs.WetWorld; exports.WetWorldError = _chunkV7GWZIZKcjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkUYXL6ZWQcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkUYXL6ZWQcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkUYXL6ZWQcjs.activeEffectSmartFilters; exports.activeLayerAfterRemoval = _chunkUYXL6ZWQcjs.activeLayerAfterRemoval; exports.activeSmartFilters = _chunkUYXL6ZWQcjs.activeSmartFilters; exports.addLayerEffect = _chunkUYXL6ZWQcjs.addLayerEffect; exports.addLayerFilter = _chunkUYXL6ZWQcjs.addLayerFilter; exports.addLayerOfKind = addLayerOfKind; exports.addPaintGradientStop = _chunkEBDCRTZIcjs.addPaintGradientStop; exports.addSmartFilter = _chunkUYXL6ZWQcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkUYXL6ZWQcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkUYXL6ZWQcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkUYXL6ZWQcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkUYXL6ZWQcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.agentDragDraft = agentDragDraft; exports.anchorPoint = _chunkUYXL6ZWQcjs.anchorPoint; exports.annotationBlend = _chunkUYXL6ZWQcjs.annotationBlend; exports.annotationLayerFor = _chunkUYXL6ZWQcjs.annotationLayerFor; exports.annotationLayerName = _chunkUYXL6ZWQcjs.annotationLayerName; exports.annotationOfLayer = _chunkUYXL6ZWQcjs.annotationOfLayer; exports.annotationOfShape = _chunkUYXL6ZWQcjs.annotationOfShape; exports.annotationOfType = _chunkUYXL6ZWQcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkUYXL6ZWQcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkUYXL6ZWQcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkUYXL6ZWQcjs.applyAdjustments; exports.applyBoxBlur = _chunkUYXL6ZWQcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkUYXL6ZWQcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkUYXL6ZWQcjs.applyDepthMask; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkUYXL6ZWQcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkUYXL6ZWQcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkUYXL6ZWQcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkUYXL6ZWQcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkUYXL6ZWQcjs.applyParams; exports.applyProcess2Adjustments = _chunkUYXL6ZWQcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkUYXL6ZWQcjs.applyProcess2Float; exports.applyRefineEdits = applyRefineEdits; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunk7NW46N7Icjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkUYXL6ZWQcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkEBDCRTZIcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkEBDCRTZIcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunk7NW46N7Icjs.applyToneToDeepTile; exports.backgroundLayer = _chunkUYXL6ZWQcjs.backgroundLayer; exports.base64ToBytes = _chunkCWM3CUUXcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunk7NW46N7Icjs.bestOffset; exports.blackWhiteGray = _chunkUYXL6ZWQcjs.blackWhiteGray; exports.blendChannel = _chunkCWM3CUUXcjs.blendChannel; exports.blendImageData = _chunkCWM3CUUXcjs.blendImageData; exports.blendLum = _chunkCWM3CUUXcjs.blendLum; exports.blendPixel = _chunkCWM3CUUXcjs.blendPixel; exports.blendRadius = _chunkEBDCRTZIcjs.blendRadius; exports.blendRgb = _chunkCWM3CUUXcjs.blendRgb; exports.blendTile = _chunkHGTDMKNEcjs.blendTile; exports.blenderDab = _chunkEBDCRTZIcjs.blenderDab; exports.blurFilter = _chunkUYXL6ZWQcjs.blurFilter; exports.borderCoverage = _chunkUYXL6ZWQcjs.borderCoverage; exports.boxBlur = boxBlur; exports.boxBlurPixels = _chunk7NW46N7Icjs.boxBlurPixels; exports.boxFrameHit = boxFrameHit; exports.boxFrameOverlay = boxFrameOverlay; exports.boxMean = boxMean; exports.boxPointOf = _chunkUYXL6ZWQcjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkUYXL6ZWQcjs.bradfordAdaptation; exports.brushStrokeMask = brushStrokeMask; exports.brushstrokeDataUrl = _chunkEBDCRTZIcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkEBDCRTZIcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkEBDCRTZIcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkEBDCRTZIcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkEBDCRTZIcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkUYXL6ZWQcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkUYXL6ZWQcjs.buildToneLut; exports.builtinPattern = _chunkHGTDMKNEcjs.builtinPattern; exports.builtinPatternIds = _chunkHGTDMKNEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkCWM3CUUXcjs.bytesToBase64; exports.calculateCropDrag = _chunkUYXL6ZWQcjs.calculateCropDrag; exports.canShareMemory = _chunkV7GWZIZKcjs.canShareMemory; exports.canvasCompositeOperation = _chunkCWM3CUUXcjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkUYXL6ZWQcjs.canvasToImagePoint; exports.caretAt = _chunkBRKVNXDZcjs.caretAt; exports.changedTiles = _chunkHGTDMKNEcjs.changedTiles; exports.channelThumbnail = channelThumbnail; exports.checkEffectAnimation = checkEffectAnimation; exports.checkEffectTime = checkEffectTime; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkUYXL6ZWQcjs.clampCropToImage; exports.cleanMixer = _chunkEBDCRTZIcjs.cleanMixer; exports.cloneSamplePoint = _chunk7NW46N7Icjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunkCWM3CUUXcjs.collectTiles; exports.colorBalanceChannel = _chunkUYXL6ZWQcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.colorRangePreset = colorRangePreset; exports.combineSelections = _chunkUYXL6ZWQcjs.combineSelections; exports.compileAdjustmentLayer = _chunkUYXL6ZWQcjs.compileAdjustmentLayer; exports.componentPath = _chunkUYXL6ZWQcjs.componentPath; exports.componentsCoverage = _chunkUYXL6ZWQcjs.componentsCoverage; exports.compositeDeep = _chunkUYXL6ZWQcjs.compositeDeep; exports.compositeSurfaceOver = _chunkHGTDMKNEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkUYXL6ZWQcjs.computeSelectionBounds; exports.contentAwareFill = _chunk7NW46N7Icjs.contentAwareFill; exports.contentBounds = _chunkCWM3CUUXcjs.contentBounds; exports.contentsBox = _chunkUYXL6ZWQcjs.contentsBox; exports.contentsSurface = _chunkUYXL6ZWQcjs.contentsSurface; exports.contractCoverage = _chunkUYXL6ZWQcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkCWM3CUUXcjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkUYXL6ZWQcjs.convertToSmartObject; exports.copySmartObject = _chunkUYXL6ZWQcjs.copySmartObject; exports.cornersFromMatrix = _chunkUYXL6ZWQcjs.cornersFromMatrix; exports.coverageTileCoord = _chunkEBDCRTZIcjs.coverageTileCoord; exports.coverageToByte = _chunkUYXL6ZWQcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkUYXL6ZWQcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkEBDCRTZIcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkBRKVNXDZcjs.createCanvasTextShaper; 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 = _chunkBRKVNXDZcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkBRKVNXDZcjs.createOutlineTextShaper; exports.createPigment = _chunkCWM3CUUXcjs.createPigment; exports.createPigmentTools = _chunkV7GWZIZKcjs.createPigmentTools; exports.createSelectionMask = _chunkUYXL6ZWQcjs.createSelectionMask; exports.createShapeLayer = _chunkUYXL6ZWQcjs.createShapeLayer; exports.createTypeLayer = _chunkUYXL6ZWQcjs.createTypeLayer; exports.createWetGpuEngine = _chunkV7GWZIZKcjs.createWetGpuEngine; exports.cssFont = _chunkBRKVNXDZcjs.cssFont; exports.cssFontFamily = _chunkBRKVNXDZcjs.cssFontFamily; exports.curveLut = _chunkHGTDMKNEcjs.curveLut; exports.curveLutFromLevels = _chunkUYXL6ZWQcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkEBDCRTZIcjs.dabCoverage; exports.dabRect = _chunkEBDCRTZIcjs.dabRect; exports.decodeDeepSurface = _chunkUYXL6ZWQcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkUYXL6ZWQcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkUYXL6ZWQcjs.decodeLayerMask; exports.decodeMergedImage = _chunkUYXL6ZWQcjs.decodeMergedImage; exports.decodePlanes = _chunkUYXL6ZWQcjs.decodePlanes; exports.decodePng = _chunkCWM3CUUXcjs.decodePng; exports.decodePngDataUrl = _chunkUYXL6ZWQcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkUYXL6ZWQcjs.decodeSelectionRle; exports.decontaminateColors = decontaminateColors; exports.deepBytes = _chunkCWM3CUUXcjs.deepBytes; exports.deepTile = _chunkCWM3CUUXcjs.deepTile; exports.defaultActiveLayerId = _chunkUYXL6ZWQcjs.defaultActiveLayerId; exports.defaultAdjustmentParams = _chunkUYXL6ZWQcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkHGTDMKNEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkHGTDMKNEcjs.defaultLayerEffect; exports.defaultShapeName = _chunkUYXL6ZWQcjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkUYXL6ZWQcjs.depthMaskAlpha; exports.depthOf = _chunkCWM3CUUXcjs.depthOf; exports.depthRasterMask = _chunkUYXL6ZWQcjs.depthRasterMask; exports.describeChannel = describeChannel; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkUYXL6ZWQcjs.describeTransform; exports.deserializeChannels = deserializeChannels; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkUYXL6ZWQcjs.deserializeEffects; exports.deserializeLayer = _chunkUYXL6ZWQcjs.deserializeLayer; exports.deserializeLayers = _chunkUYXL6ZWQcjs.deserializeLayers; exports.deserializePatterns = _chunkUYXL6ZWQcjs.deserializePatterns; exports.deserializeSelection = _chunkUYXL6ZWQcjs.deserializeSelection; exports.developFilter = _chunkUYXL6ZWQcjs.developFilter; exports.developFromAdjustments = _chunkUYXL6ZWQcjs.developFromAdjustments; exports.developTarget = _chunkUYXL6ZWQcjs.developTarget; exports.dexp = _chunkV7GWZIZKcjs.dexp; exports.dilateMask = _chunk7NW46N7Icjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkUYXL6ZWQcjs.distanceTransform; exports.dlog = _chunkV7GWZIZKcjs.dlog; exports.documentContents = _chunkUYXL6ZWQcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunk7NW46N7Icjs.dodgeBurn; exports.dodgeBurnCurve = _chunk7NW46N7Icjs.dodgeBurnCurve; exports.downloadMaskImage = downloadMaskImage; exports.downloadPsd = downloadPsd; exports.dpow = _chunkV7GWZIZKcjs.dpow; exports.dragWarpMeshPoint = _chunkBRKVNXDZcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkV7GWZIZKcjs.dsincos; exports.duplicateLayer = _chunkUYXL6ZWQcjs.duplicateLayer; exports.edgeBits = _chunkV7GWZIZKcjs.edgeBits; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunkHGTDMKNEcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectLayerTiming = effectLayerTiming; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkHGTDMKNEcjs.effectReach; exports.effectiveLayerMask = _chunkUYXL6ZWQcjs.effectiveLayerMask; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkHGTDMKNEcjs.effectsFingerprint; exports.effectsMargin = _chunkHGTDMKNEcjs.effectsMargin; exports.effectsScale = _chunkHGTDMKNEcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkCWM3CUUXcjs.emptySurface; exports.encodeDeepSurface = _chunkUYXL6ZWQcjs.encodeDeepSurface; exports.encodePng = _chunkCWM3CUUXcjs.encodePng; exports.encodeRle = _chunkUYXL6ZWQcjs.encodeRle; exports.encodeSelectionRle = _chunkUYXL6ZWQcjs.encodeSelectionRle; exports.encodeSurface = _chunkUYXL6ZWQcjs.encodeSurface; exports.evalWarpMesh = _chunkBRKVNXDZcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkUYXL6ZWQcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkEBDCRTZIcjs.exchangeRates; exports.expNeg = _chunkV7GWZIZKcjs.expNeg; exports.expandCoverage = _chunkUYXL6ZWQcjs.expandCoverage; exports.exportPsd = _chunkUYXL6ZWQcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkUYXL6ZWQcjs.featherCoverage; exports.fillRect = _chunkCWM3CUUXcjs.fillRect; exports.filmPixel = _chunkV7GWZIZKcjs.filmPixel; exports.filmReflectance = _chunkV7GWZIZKcjs.filmReflectance; exports.filterMaskCoverage = _chunkUYXL6ZWQcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkHGTDMKNEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findSky = findSky; exports.findSubject = findSubject; exports.findWebGpu = _chunkV7GWZIZKcjs.findWebGpu; exports.finishTile = _chunkCWM3CUUXcjs.finishTile; exports.fitParagraphRuns = _chunkBRKVNXDZcjs.fitParagraphRuns; exports.fitRuns = _chunkBRKVNXDZcjs.fitRuns; exports.flattenLayers = _chunkHGTDMKNEcjs.flattenLayers; exports.flattenPath = _chunkUYXL6ZWQcjs.flattenPath; exports.flipCorners = _chunkUYXL6ZWQcjs.flipCorners; exports.flowField = _chunkV7GWZIZKcjs.flowField; exports.focusArea = focusArea; exports.followLayerMove = _chunkUYXL6ZWQcjs.followLayerMove; exports.fontOf = _chunkBRKVNXDZcjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkUYXL6ZWQcjs.fullSelection; exports.gaussianBlur = _chunkHGTDMKNEcjs.gaussianBlur; exports.geometryHomography = _chunkUYXL6ZWQcjs.geometryHomography; exports.getAnnotationBounds = _chunkUYXL6ZWQcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkUYXL6ZWQcjs.getCropCursor; exports.getRotatedSize = _chunkUYXL6ZWQcjs.getRotatedSize; exports.getViewportMetrics = _chunkUYXL6ZWQcjs.getViewportMetrics; exports.getViewportProjection = _chunkUYXL6ZWQcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.grabCutLabels = grabCutLabels; exports.gradientDabColor = _chunkEBDCRTZIcjs.gradientDabColor; exports.grainCatch = _chunkEBDCRTZIcjs.grainCatch; exports.grainHeights = _chunkEBDCRTZIcjs.grainHeights; exports.greyMorphology = _chunkUYXL6ZWQcjs.greyMorphology; exports.groupLayers = _chunkUYXL6ZWQcjs.groupLayers; exports.growSelection = growSelection; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handleMaskViewKey = handleMaskViewKey; exports.handlePaintShortcut = handlePaintShortcut; exports.handleQuickMaskKey = handleQuickMaskKey; exports.handleSelectionShortcut = handleSelectionShortcut; exports.hasActiveEffects = _chunkHGTDMKNEcjs.hasActiveEffects; exports.hasLayersBelow = hasLayersBelow; exports.hasResampledLegacyMask = _chunkUYXL6ZWQcjs.hasResampledLegacyMask; exports.hasSurface = _chunkUYXL6ZWQcjs.hasSurface; exports.hasWarp = _chunkUYXL6ZWQcjs.hasWarp; exports.hash2 = _chunkEBDCRTZIcjs.hash2; exports.hashMaskContent = _chunkUYXL6ZWQcjs.hashMaskContent; exports.hashNoise = _chunkHGTDMKNEcjs.hashNoise; exports.healPixels = _chunk7NW46N7Icjs.healPixels; exports.hexToPaintRgb = _chunkEBDCRTZIcjs.hexToPaintRgb; exports.hexToRgb = _chunkUYXL6ZWQcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkUYXL6ZWQcjs.hitTestAnnotation; exports.hitTestCrop = _chunkUYXL6ZWQcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkUYXL6ZWQcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkUYXL6ZWQcjs.hueRangeTables; exports.hueRangeWeight = _chunkUYXL6ZWQcjs.hueRangeWeight; exports.hueSaturation = _chunkUYXL6ZWQcjs.hueSaturation; exports.identityCurve = _chunkUYXL6ZWQcjs.identityCurve; exports.identityLevels = _chunkUYXL6ZWQcjs.identityLevels; exports.identityTransform = _chunkUYXL6ZWQcjs.identityTransform; exports.identityWarpMesh = _chunkBRKVNXDZcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imagePanelTool = imagePanelTool; exports.imagePlaybackPanel = imagePlaybackPanel; exports.imageToCanvasPoint = _chunkUYXL6ZWQcjs.imageToCanvasPoint; exports.imageToolCanvasMode = imageToolCanvasMode; exports.imageToolForShortcut = imageToolForShortcut; exports.imageToolGroup = imageToolGroup; exports.imageToolLabel = imageToolLabel; exports.imageToolPanel = imageToolPanel; exports.importPsd = _chunkUYXL6ZWQcjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkHGTDMKNEcjs.insertLayer; exports.instancesOf = _chunkUYXL6ZWQcjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkUYXL6ZWQcjs.invertMatrix3; exports.invertSelection = _chunkUYXL6ZWQcjs.invertSelection; exports.isActiveFilter = _chunkUYXL6ZWQcjs.isActiveFilter; exports.isActiveVectorMask = _chunkUYXL6ZWQcjs.isActiveVectorMask; exports.isAdjustmentKind = _chunkUYXL6ZWQcjs.isAdjustmentKind; exports.isBitDepth = _chunkCWM3CUUXcjs.isBitDepth; exports.isBlendMode = _chunkCWM3CUUXcjs.isBlendMode; exports.isBrushstrokeBrush = _chunkEBDCRTZIcjs.isBrushstrokeBrush; exports.isColorRangePreset = isColorRangePreset; exports.isContentsDecoded = _chunkUYXL6ZWQcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkUYXL6ZWQcjs.isDefaultDepthMask; exports.isGradientPaint = _chunkEBDCRTZIcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunk7NW46N7Icjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkUYXL6ZWQcjs.isIdentityTransform; exports.isInterpolation = _chunkHGTDMKNEcjs.isInterpolation; exports.isLayerEffectKind = _chunkHGTDMKNEcjs.isLayerEffectKind; exports.isLayerLocked = _chunkHGTDMKNEcjs.isLayerLocked; exports.isLegacyShape = _chunkUYXL6ZWQcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPaintableLayer = _chunkUYXL6ZWQcjs.isPaintableLayer; exports.isPainterlyBlendMode = _chunkCWM3CUUXcjs.isPainterlyBlendMode; exports.isPng = _chunkCWM3CUUXcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkUYXL6ZWQcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkUYXL6ZWQcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkUYXL6ZWQcjs.isSelectionEmpty; exports.isSelectionMode = _chunkUYXL6ZWQcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkCWM3CUUXcjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkUYXL6ZWQcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkUYXL6ZWQcjs.isTransformAnchor; exports.isValidWarp = _chunkUYXL6ZWQcjs.isValidWarp; exports.keepDeepSamples = _chunkCWM3CUUXcjs.keepDeepSamples; exports.keepMainPieces = keepMainPieces; exports.kelvinToTemperature = _chunkUYXL6ZWQcjs.kelvinToTemperature; exports.keysWeight = _chunkHGTDMKNEcjs.keysWeight; exports.latticeViscosity = _chunkV7GWZIZKcjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkHGTDMKNEcjs.layerEffectFields; exports.layerEffectLabel = _chunkHGTDMKNEcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkUYXL6ZWQcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkUYXL6ZWQcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkUYXL6ZWQcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkUYXL6ZWQcjs.layerMaskKey; exports.layerMaskSelection = _chunkUYXL6ZWQcjs.layerMaskSelection; exports.layerMenu = layerMenu; exports.layerName = _chunkUYXL6ZWQcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerPanels = layerPanels; exports.layerThumbnailClick = layerThumbnailClick; exports.layerTree = _chunkUYXL6ZWQcjs.layerTree; exports.layerTypeLabel = _chunkUYXL6ZWQcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkUYXL6ZWQcjs.layersFromLegacy; exports.layoutText = _chunkBRKVNXDZcjs.layoutText; exports.legacyAdjustmentLayer = _chunkUYXL6ZWQcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkUYXL6ZWQcjs.legacyMaskOf; exports.legacyView = _chunkUYXL6ZWQcjs.legacyView; exports.lerpPigment = _chunkCWM3CUUXcjs.lerpPigment; exports.lerpPigmentInto = _chunkCWM3CUUXcjs.lerpPigmentInto; exports.levelsValue = _chunkUYXL6ZWQcjs.levelsValue; exports.linearSrgbToXy = _chunkUYXL6ZWQcjs.linearSrgbToXy; exports.linearToSrgb = _chunkUYXL6ZWQcjs.linearToSrgb; exports.linearToSrgb8 = _chunkV7GWZIZKcjs.linearToSrgb8; exports.liveComponent = _chunkUYXL6ZWQcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkUYXL6ZWQcjs.liveShapeSubpaths; exports.liveWire = liveWire; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkEBDCRTZIcjs.loadMixer; exports.loadOpenTypeFont = _chunk3T5VCDIVcjs.loadOpenTypeFont; exports.loadWetKernel = _chunkV7GWZIZKcjs.loadWetKernel; exports.luma = _chunk7NW46N7Icjs.luma; exports.magicWand = magicWand; exports.magneticAnchorSpacing = magneticAnchorSpacing; exports.mapCropHandle = _chunkUYXL6ZWQcjs.mapCropHandle; exports.mapLayer = _chunkHGTDMKNEcjs.mapLayer; exports.mapSubpaths = _chunkUYXL6ZWQcjs.mapSubpaths; exports.maskBounds = _chunk7NW46N7Icjs.maskBounds; exports.maskFileName = maskFileName; exports.maskNameFromFile = maskNameFromFile; exports.maskSummary = maskSummary; exports.maskThumbnailClick = maskThumbnailClick; exports.matrixFromCorners = _chunkUYXL6ZWQcjs.matrixFromCorners; exports.matrixFromParams = _chunkUYXL6ZWQcjs.matrixFromParams; exports.measureCanvasViewport = measureCanvasViewport; exports.membraneFill = _chunk7NW46N7Icjs.membraneFill; exports.mergeLayerEffect = _chunkHGTDMKNEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkUYXL6ZWQcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunkEBDCRTZIcjs.mix32; exports.mixPigment8 = _chunkCWM3CUUXcjs.mixPigment8; exports.mixPigmentRgb = _chunkCWM3CUUXcjs.mixPigmentRgb; exports.mixPigments = _chunkCWM3CUUXcjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunkEBDCRTZIcjs.mixerRates; exports.modifySelection = _chunkUYXL6ZWQcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkUYXL6ZWQcjs.moveLayer; exports.moveSmartFilter = _chunkUYXL6ZWQcjs.moveSmartFilter; exports.mulMatrix3 = _chunkUYXL6ZWQcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkUYXL6ZWQcjs.neutralHueRange; exports.newContentsId = _chunkUYXL6ZWQcjs.newContentsId; exports.newEffectId = _chunkHGTDMKNEcjs.newEffectId; exports.newLayerId = _chunkUYXL6ZWQcjs.newLayerId; exports.newLayerOptions = newLayerOptions; exports.normalizeAdjustmentLayer = _chunkUYXL6ZWQcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkUYXL6ZWQcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkUYXL6ZWQcjs.normalizeAngle; exports.normalizeBlendMode = _chunkCWM3CUUXcjs.normalizeBlendMode; exports.normalizeBlender = _chunkEBDCRTZIcjs.normalizeBlender; exports.normalizeBrush = _chunkEBDCRTZIcjs.normalizeBrush; exports.normalizeFilter = _chunkUYXL6ZWQcjs.normalizeFilter; exports.normalizeFlow = _chunkV7GWZIZKcjs.normalizeFlow; exports.normalizeHexColor = _chunkEBDCRTZIcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkHGTDMKNEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkUYXL6ZWQcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkUYXL6ZWQcjs.normalizeLiveShape; exports.normalizeMixer = _chunkEBDCRTZIcjs.normalizeMixer; exports.normalizePlacement = _chunkUYXL6ZWQcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkUYXL6ZWQcjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunk7NW46N7Icjs.normalizeRetouch; exports.normalizeShapePaint = _chunkUYXL6ZWQcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkUYXL6ZWQcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkUYXL6ZWQcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkEBDCRTZIcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkUYXL6ZWQcjs.normalizeSubpaths; exports.normalizeText = _chunkUYXL6ZWQcjs.normalizeText; exports.normalizeTilt = _chunkV7GWZIZKcjs.normalizeTilt; exports.normalizeWetParams = _chunkV7GWZIZKcjs.normalizeWetParams; exports.offsetLayer = _chunkUYXL6ZWQcjs.offsetLayer; exports.offsetShape = _chunkUYXL6ZWQcjs.offsetShape; exports.offsetSmartObject = _chunkUYXL6ZWQcjs.offsetSmartObject; exports.offsetVectorMask = _chunkUYXL6ZWQcjs.offsetVectorMask; exports.openMaskFile = openMaskFile; exports.openPsdFile = openPsdFile; exports.otsuThreshold = otsuThreshold; exports.packRgba = _chunkCWM3CUUXcjs.packRgba; exports.packWetParams = _chunkV7GWZIZKcjs.packWetParams; exports.paintGradientMappingFor = _chunkEBDCRTZIcjs.paintGradientMappingFor; exports.paintPathStroke = _chunkEBDCRTZIcjs.paintPathStroke; exports.paintSourceColor = _chunkEBDCRTZIcjs.paintSourceColor; exports.paintSourceCss = _chunkEBDCRTZIcjs.paintSourceCss; exports.paragraphRanges = _chunkBRKVNXDZcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkUYXL6ZWQcjs.parseAdjustmentBlock; exports.parseBlend = _chunkUYXL6ZWQcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkCWM3CUUXcjs.parseDataUrl; exports.parseEffectColor = _chunkHGTDMKNEcjs.parseEffectColor; exports.parseLfx2 = _chunkUYXL6ZWQcjs.parseLfx2; exports.parseLrfx = _chunkUYXL6ZWQcjs.parseLrfx; exports.parseOpenTypeFont = _chunk3T5VCDIVcjs.parseOpenTypeFont; exports.parsePaintSource = _chunkEBDCRTZIcjs.parsePaintSource; exports.parsePatternBlock = _chunkUYXL6ZWQcjs.parsePatternBlock; exports.parseSelectionMode = _chunkUYXL6ZWQcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkUYXL6ZWQcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkUYXL6ZWQcjs.patchParagraphStyle; exports.patchTextStyle = _chunkUYXL6ZWQcjs.patchTextStyle; exports.pathStrokeCoverage = _chunkEBDCRTZIcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkEBDCRTZIcjs.pathStrokeDabs; exports.pathToSelection = pathToSelection; exports.perDabStrength = _chunk7NW46N7Icjs.perDabStrength; exports.photoFilterMatrix = _chunkUYXL6ZWQcjs.photoFilterMatrix; exports.pigment8 = _chunkCWM3CUUXcjs.pigment8; exports.pigmentColor = _chunkV7GWZIZKcjs.pigmentColor; exports.pigmentOf = _chunkV7GWZIZKcjs.pigmentOf; exports.pixelLayerBounds = _chunkUYXL6ZWQcjs.pixelLayerBounds; exports.pixelLayers = _chunkUYXL6ZWQcjs.pixelLayers; exports.pixelPigment = _chunkV7GWZIZKcjs.pixelPigment; exports.placeContents = _chunkUYXL6ZWQcjs.placeContents; exports.placeLayer = _chunkUYXL6ZWQcjs.placeLayer; exports.placementAt = _chunkUYXL6ZWQcjs.placementAt; exports.placementBounds = _chunkUYXL6ZWQcjs.placementBounds; exports.placementGeometry = _chunkUYXL6ZWQcjs.placementGeometry; exports.planImageToolPlayback = planImageToolPlayback; exports.planOutlineTrace = planOutlineTrace; exports.pngDataUrl = _chunkCWM3CUUXcjs.pngDataUrl; exports.pointerPressure = _chunkV7GWZIZKcjs.pointerPressure; exports.pointerStrokeSample = _chunkV7GWZIZKcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkV7GWZIZKcjs.pointerStrokeSamples; exports.polygonCoverage = polygonCoverage; exports.polygonCoverageBox = polygonCoverageBox; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunkUYXL6ZWQcjs.posterizeValue; exports.presetWarp = _chunkUYXL6ZWQcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkUYXL6ZWQcjs.projectImagePoint; exports.projectImageRect = _chunkUYXL6ZWQcjs.projectImageRect; exports.projectMaskCoverage = _chunkUYXL6ZWQcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkCWM3CUUXcjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkUYXL6ZWQcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkUYXL6ZWQcjs.psdToLayers; exports.pullWarpMesh = _chunkBRKVNXDZcjs.pullWarpMesh; exports.put255 = _chunkEBDCRTZIcjs.put255; exports.quadFrameOverlay = quadFrameOverlay; exports.quickMaskPixels = quickMaskPixels; exports.quickSelectStroke = quickSelectStroke; exports.rand01 = _chunkEBDCRTZIcjs.rand01; exports.randSigned = _chunkEBDCRTZIcjs.randSigned; exports.rangeLightness = _chunkUYXL6ZWQcjs.rangeLightness; exports.rasterContents = _chunkUYXL6ZWQcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkUYXL6ZWQcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkUYXL6ZWQcjs.rasterizeCoverage; exports.rasterizeDab = _chunkEBDCRTZIcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkUYXL6ZWQcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkCWM3CUUXcjs.readDeepRegion; exports.readPaintSource = _chunkEBDCRTZIcjs.readPaintSource; exports.readPixel = _chunkCWM3CUUXcjs.readPixel; exports.readPsd = _chunkUYXL6ZWQcjs.readPsd; exports.readRegion = _chunkCWM3CUUXcjs.readRegion; exports.readSourceRegion = _chunk7NW46N7Icjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkHGTDMKNEcjs.reduceSurface; exports.referencePoint = _chunkUYXL6ZWQcjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkCWM3CUUXcjs.reflectanceToRgb; exports.removeAlpha = _chunkUYXL6ZWQcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkUYXL6ZWQcjs.removeLayer; exports.removeLayerEffect = _chunkUYXL6ZWQcjs.removeLayerEffect; exports.removeLayerFilter = _chunkUYXL6ZWQcjs.removeLayerFilter; exports.removePaintGradientStop = _chunkEBDCRTZIcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkUYXL6ZWQcjs.removeSmartFilter; exports.renderBrushstroke = _chunkEBDCRTZIcjs.renderBrushstroke; exports.renderLayerEffects = _chunkHGTDMKNEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkUYXL6ZWQcjs.renderShape; exports.renderShapeRect = _chunkUYXL6ZWQcjs.renderShapeRect; exports.renderSmartObject = _chunkUYXL6ZWQcjs.renderSmartObject; exports.renderText = _chunkUYXL6ZWQcjs.renderText; exports.replaceContents = _chunkUYXL6ZWQcjs.replaceContents; exports.replaceTextRange = _chunkUYXL6ZWQcjs.replaceTextRange; exports.requireLayer = _chunkUYXL6ZWQcjs.requireLayer; exports.requireOperation = _chunkUYXL6ZWQcjs.requireOperation; exports.requireShapeLayer = _chunkUYXL6ZWQcjs.requireShapeLayer; exports.requireSmartObject = _chunkUYXL6ZWQcjs.requireSmartObject; exports.requireTypeLayer = _chunkUYXL6ZWQcjs.requireTypeLayer; exports.requireUnlocked = _chunkUYXL6ZWQcjs.requireUnlocked; exports.rerender = _chunkUYXL6ZWQcjs.rerender; exports.rerenderShape = _chunkUYXL6ZWQcjs.rerenderShape; exports.rerenderText = _chunkUYXL6ZWQcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkUYXL6ZWQcjs.resizeSelection; exports.resizeWarpMesh = _chunkBRKVNXDZcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkUYXL6ZWQcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkEBDCRTZIcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.resolveVectorMasks = _chunkUYXL6ZWQcjs.resolveVectorMasks; exports.restyleRange = _chunkBRKVNXDZcjs.restyleRange; exports.retouchFilter = _chunk7NW46N7Icjs.retouchFilter; exports.reversePaintGradient = _chunkEBDCRTZIcjs.reversePaintGradient; exports.rgbToGray = _chunkUYXL6ZWQcjs.rgbToGray; exports.rgbToHsl = _chunkUYXL6ZWQcjs.rgbToHsl; exports.rgbToReflectance = _chunkCWM3CUUXcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunk7NW46N7Icjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkUYXL6ZWQcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkUYXL6ZWQcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sameCanvasViewport = sameCanvasViewport; exports.sampleLut = _chunkUYXL6ZWQcjs.sampleLut; exports.sampleToneLut = _chunkUYXL6ZWQcjs.sampleToneLut; exports.saturationOf = _chunk7NW46N7Icjs.saturationOf; exports.scaleLayerEffect = _chunkHGTDMKNEcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkEBDCRTZIcjs.scalePaintGradient; exports.seamlessClone = _chunk7NW46N7Icjs.seamlessClone; exports.seedFromString = _chunkEBDCRTZIcjs.seedFromString; exports.segmentToSelection = segmentToSelection; exports.segmentationOutlines = segmentationOutlines; exports.segmentsToSelection = segmentsToSelection; exports.selectObjectIn = selectObjectIn; exports.selectSimilar = selectSimilar; exports.selectionArea = _chunkUYXL6ZWQcjs.selectionArea; exports.selectionFromCoverage = _chunkUYXL6ZWQcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkUYXL6ZWQcjs.selectionFromPixels; exports.selectionFromRegion = _chunkUYXL6ZWQcjs.selectionFromRegion; exports.selectionFromTiles = _chunkUYXL6ZWQcjs.selectionFromTiles; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionRing = selectionRing; exports.selectionToCoverage = _chunkUYXL6ZWQcjs.selectionToCoverage; exports.selectionToPixels = _chunkUYXL6ZWQcjs.selectionToPixels; exports.selectionToSubpaths = selectionToSubpaths; exports.selectionValueAt = _chunkUYXL6ZWQcjs.selectionValueAt; exports.serializeChannels = serializeChannels; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkUYXL6ZWQcjs.serializeContents; exports.serializeEffects = _chunkUYXL6ZWQcjs.serializeEffects; exports.serializeLayer = _chunkUYXL6ZWQcjs.serializeLayer; exports.serializeLayers = _chunkUYXL6ZWQcjs.serializeLayers; exports.serializeLayersExternal = _chunkUYXL6ZWQcjs.serializeLayersExternal; exports.serializePatterns = _chunkUYXL6ZWQcjs.serializePatterns; exports.serializeSelection = _chunkUYXL6ZWQcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkUYXL6ZWQcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkUYXL6ZWQcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkUYXL6ZWQcjs.setLayerMask; exports.setLayerProperties = _chunkUYXL6ZWQcjs.setLayerProperties; exports.setLum = _chunkCWM3CUUXcjs.setLum; exports.setPigmentColor = _chunkCWM3CUUXcjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkUYXL6ZWQcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkUYXL6ZWQcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkUYXL6ZWQcjs.setSmartPlacement; exports.shadeTile = _chunkV7GWZIZKcjs.shadeTile; exports.shapeAsPixelLayer = _chunkUYXL6ZWQcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkUYXL6ZWQcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkUYXL6ZWQcjs.shapeGeometryBounds; exports.shapeLayers = _chunkUYXL6ZWQcjs.shapeLayers; exports.shapeOutline = _chunkUYXL6ZWQcjs.shapeOutline; exports.shapeRenderClip = _chunkUYXL6ZWQcjs.shapeRenderClip; exports.shiftCoverage = _chunkUYXL6ZWQcjs.shiftCoverage; exports.simplifyPixelPath = simplifyPixelPath; exports.skinToneRange = skinToneRange; exports.slicSuperpixels = slicSuperpixels; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkUYXL6ZWQcjs.smartObjectLayers; exports.smoothCoverage = _chunkUYXL6ZWQcjs.smoothCoverage; exports.smoothPoints = _chunkEBDCRTZIcjs.smoothPoints; exports.smoothnessWeights = smoothnessWeights; exports.smudgeEffect = _chunk7NW46N7Icjs.smudgeEffect; exports.snapPolygonToEdges = snapPolygonToEdges; exports.snapTo45 = snapTo45; exports.snapToEdge = snapToEdge; exports.softMaskToSelection = softMaskToSelection; exports.solidPaint = _chunkEBDCRTZIcjs.solidPaint; exports.solidSurface = _chunkCWM3CUUXcjs.solidSurface; exports.solveMembrane = _chunk7NW46N7Icjs.solveMembrane; exports.spliceRuns = _chunkBRKVNXDZcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunk7NW46N7Icjs.sponge; exports.spongeEffect = _chunk7NW46N7Icjs.spongeEffect; exports.spotHealPixels = _chunk7NW46N7Icjs.spotHealPixels; exports.spotHealWindow = _chunk7NW46N7Icjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkV7GWZIZKcjs.srgbByteToLinear; exports.srgbDecode = _chunkCWM3CUUXcjs.srgbDecode; exports.srgbEncode = _chunkCWM3CUUXcjs.srgbEncode; exports.srgbToLinear = _chunkUYXL6ZWQcjs.srgbToLinear; exports.standardBlendMode = _chunkCWM3CUUXcjs.standardBlendMode; exports.startMarchingAnts = startMarchingAnts; exports.stepSlotTs = _chunkV7GWZIZKcjs.stepSlotTs; exports.strokeGrainCatch = _chunkEBDCRTZIcjs.strokeGrainCatch; exports.styleAt = _chunkBRKVNXDZcjs.styleAt; exports.subpathsToSvgPath = subpathsToSvgPath; exports.sumHistograms = sumHistograms; exports.superpixelSaliency = superpixelSaliency; exports.surfaceBytes = _chunkCWM3CUUXcjs.surfaceBytes; exports.surfaceDepth = _chunkCWM3CUUXcjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkCWM3CUUXcjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunkCWM3CUUXcjs.surfaceFromPixels; exports.surfacesEqual = _chunkCWM3CUUXcjs.surfacesEqual; exports.tempTintToXy = _chunkUYXL6ZWQcjs.tempTintToXy; exports.temperatureToKelvin = _chunkUYXL6ZWQcjs.temperatureToKelvin; exports.textIndexAt = _chunkBRKVNXDZcjs.textIndexAt; exports.textMatrix = _chunkUYXL6ZWQcjs.textMatrix; exports.textOrientation = _chunkUYXL6ZWQcjs.textOrientation; exports.textOutlines = _chunkUYXL6ZWQcjs.textOutlines; exports.textRange = _chunkUYXL6ZWQcjs.textRange; exports.tileCoord = _chunkCWM3CUUXcjs.tileCoord; exports.tileKey = _chunkCWM3CUUXcjs.tileKey; exports.tileRect = _chunkCWM3CUUXcjs.tileRect; exports.tileSamples = _chunkCWM3CUUXcjs.tileSamples; exports.tileSamples16 = _chunkCWM3CUUXcjs.tileSamples16; exports.tileSamples32 = _chunkCWM3CUUXcjs.tileSamples32; exports.tilesInRect = _chunkCWM3CUUXcjs.tilesInRect; exports.tipFalloff = _chunkEBDCRTZIcjs.tipFalloff; exports.tipReach = _chunkEBDCRTZIcjs.tipReach; exports.tipShape = _chunkEBDCRTZIcjs.tipShape; exports.to16From32 = _chunkCWM3CUUXcjs.to16From32; exports.to16From8 = _chunkCWM3CUUXcjs.to16From8; exports.to32From16 = _chunkCWM3CUUXcjs.to32From16; exports.to32From8 = _chunkCWM3CUUXcjs.to32From8; exports.to8From16 = _chunkCWM3CUUXcjs.to8From16; exports.to8From32 = _chunkCWM3CUUXcjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkUYXL6ZWQcjs.toTextSpace; exports.toneCurve = _chunkUYXL6ZWQcjs.toneCurve; exports.toneLuts = _chunkUYXL6ZWQcjs.toneLuts; exports.toneOf = _chunk7NW46N7Icjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkUYXL6ZWQcjs.transformHomography; exports.transformMap = _chunkUYXL6ZWQcjs.transformMap; exports.transformShapeComponents = _chunkUYXL6ZWQcjs.transformShapeComponents; exports.transformSurface = _chunkHGTDMKNEcjs.transformSurface; exports.transformTypeLayer = _chunkUYXL6ZWQcjs.transformTypeLayer; exports.transformVectorMask = _chunkUYXL6ZWQcjs.transformVectorMask; exports.transformedBounds = _chunkHGTDMKNEcjs.transformedBounds; exports.transformedBox = _chunkUYXL6ZWQcjs.transformedBox; exports.transformedPoint = _chunkUYXL6ZWQcjs.transformedPoint; exports.translateLayer = _chunkUYXL6ZWQcjs.translateLayer; exports.translateSurface = _chunkCWM3CUUXcjs.translateSurface; exports.typeAsPixelLayer = _chunkUYXL6ZWQcjs.typeAsPixelLayer; exports.typeFrame = _chunkUYXL6ZWQcjs.typeFrame; exports.typeFromAnnotation = _chunkUYXL6ZWQcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkUYXL6ZWQcjs.typeLayerName; exports.ungroupLayer = _chunkUYXL6ZWQcjs.ungroupLayer; exports.uniformTile = _chunkCWM3CUUXcjs.uniformTile; exports.unionRect = _chunkUYXL6ZWQcjs.unionRect; exports.unprojectCanvasPoint = _chunkUYXL6ZWQcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkUYXL6ZWQcjs.updateLayerEffect; exports.updateLayerFilter = _chunkUYXL6ZWQcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkUYXL6ZWQcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkEBDCRTZIcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkUYXL6ZWQcjs.updateShapeLayer; exports.updateSmartFilter = _chunkUYXL6ZWQcjs.updateSmartFilter; exports.updateTypeLayer = _chunkUYXL6ZWQcjs.updateTypeLayer; exports.upscaleRegion = upscaleRegion; exports.userErrorMessage = _chunkUYXL6ZWQcjs.userErrorMessage; exports.uvToXy = _chunkUYXL6ZWQcjs.uvToXy; exports.validateEffectGradient = _chunkHGTDMKNEcjs.validateEffectGradient; exports.validateLayerEffect = _chunkHGTDMKNEcjs.validateLayerEffect; exports.validateLayerEffects = _chunkHGTDMKNEcjs.validateLayerEffects; exports.vectorMaskBounds = _chunkUYXL6ZWQcjs.vectorMaskBounds; exports.vectorMaskCoverage = _chunkUYXL6ZWQcjs.vectorMaskCoverage; exports.vectorMaskThumbnail = _chunkUYXL6ZWQcjs.vectorMaskThumbnail; exports.vectorMaskThumbnailClick = vectorMaskThumbnailClick; exports.versionedDescriptorBytes = _chunkUYXL6ZWQcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkUYXL6ZWQcjs.vibranceLinear; exports.vibrancePixel = _chunkUYXL6ZWQcjs.vibrancePixel; exports.walkDabs = _chunkEBDCRTZIcjs.walkDabs; exports.warpMeshEditPoints = _chunkBRKVNXDZcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkBRKVNXDZcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkBRKVNXDZcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkBRKVNXDZcjs.warpPresetMesh; exports.warpSurface = _chunkHGTDMKNEcjs.warpSurface; exports.watchCanvasViewport = watchCanvasViewport; exports.wbMatrix = _chunkUYXL6ZWQcjs.wbMatrix; exports.wetGpuSupport = _chunkV7GWZIZKcjs.wetGpuSupport; exports.wetSimdSupported = _chunkV7GWZIZKcjs.wetSimdSupported; exports.wetSupport = _chunkV7GWZIZKcjs.wetSupport; exports.whiteBalanceFromSample = _chunkUYXL6ZWQcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkUYXL6ZWQcjs.whiteBalanceMatrix; exports.withBackgroundOpacity = withBackgroundOpacity; exports.withFilterMaskSurface = _chunkUYXL6ZWQcjs.withFilterMaskSurface; exports.withImagePlayback = withImagePlayback; exports.withNewIds = _chunkUYXL6ZWQcjs.withNewIds; exports.workImage = workImage; exports.workLuma = workLuma; exports.workPlanes = workPlanes; exports.writeAdjustmentBlock = _chunkUYXL6ZWQcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkCWM3CUUXcjs.writeDeepRegion; exports.writeLfx2 = _chunkUYXL6ZWQcjs.writeLfx2; exports.writePatternBlock = _chunkUYXL6ZWQcjs.writePatternBlock; exports.writePsd = _chunkUYXL6ZWQcjs.writePsd; exports.writeRegion = _chunkCWM3CUUXcjs.writeRegion; exports.xyToTempTint = _chunkUYXL6ZWQcjs.xyToTempTint; exports.xyToUv = _chunkUYXL6ZWQcjs.xyToUv;
|