@pixerate/editor 0.199.0 → 0.200.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.
@@ -3049,8 +3049,9 @@ var GridGraph = class {
3049
3049
  var WORK_SIZE = 512;
3050
3050
  var workCache = /* @__PURE__ */ new WeakMap();
3051
3051
  function workImage(pixels, maxSide = WORK_SIZE) {
3052
- const cached = workCache.get(pixels.data);
3053
- if (cached && cached.maxSide === maxSide && cached.work.sourceWidth === pixels.width && cached.work.sourceHeight === pixels.height) return cached.work;
3052
+ const sizes = workCache.get(pixels.data);
3053
+ const cached = _optionalChain([sizes, 'optionalAccess', _64 => _64.get, 'call', _65 => _65(maxSide)]);
3054
+ if (cached && cached.sourceWidth === pixels.width && cached.sourceHeight === pixels.height) return cached;
3054
3055
  const { width: W, height: H, data } = pixels;
3055
3056
  const scale = Math.min(1, maxSide / Math.max(W, H));
3056
3057
  const w = Math.max(1, Math.round(W * scale));
@@ -3079,7 +3080,8 @@ function workImage(pixels, maxSide = WORK_SIZE) {
3079
3080
  rgb[i * 3 + 2] = sum[i * 3 + 2] / c;
3080
3081
  }
3081
3082
  const work = { sourceWidth: W, sourceHeight: H, width: w, height: h, scale: w / W, rgb };
3082
- workCache.set(pixels.data, { maxSide, work });
3083
+ if (sizes) sizes.set(maxSide, work);
3084
+ else workCache.set(pixels.data, /* @__PURE__ */ new Map([[maxSide, work]]));
3083
3085
  return work;
3084
3086
  }
3085
3087
  var GAMMA = 50;
@@ -3300,7 +3302,7 @@ function segmentStroke(work, stroke, grown, start) {
3300
3302
  const bin = binOf(rgb, g);
3301
3303
  bgHist[bin]++;
3302
3304
  bgN++;
3303
- if (stroke.mask[g] || _optionalChain([grown, 'optionalAccess', _64 => _64[g]])) {
3305
+ if (stroke.mask[g] || _optionalChain([grown, 'optionalAccess', _66 => _66[g]])) {
3304
3306
  fgHist[bin]++;
3305
3307
  fgN++;
3306
3308
  }
@@ -3382,7 +3384,7 @@ function quickSelectStroke(pixels, stroke, options = {}) {
3382
3384
  const roi = { x: rx, y: ry, width: Math.min(w, Math.ceil(x1 + margin)) - rx, height: Math.min(h, Math.ceil(y1 + margin)) - ry };
3383
3385
  let grown = null;
3384
3386
  const sel = options.grow ? options.selection : null;
3385
- if (_optionalChain([sel, 'optionalAccess', _65 => _65.bounds])) {
3387
+ if (_optionalChain([sel, 'optionalAccess', _67 => _67.bounds])) {
3386
3388
  grown = new Uint8Array(w * h);
3387
3389
  const b = sel.bounds;
3388
3390
  for (let y = Math.max(0, Math.floor(b.y * scale)); y < Math.min(h, Math.ceil((b.y + b.height) * scale)); y++) {
@@ -3554,7 +3556,7 @@ function grabCutLabels(work, setup, iterations) {
3554
3556
  const graph = new GridGraph(rw, rh);
3555
3557
  for (let p = 0; p < n; p++) {
3556
3558
  if (hardBg[p]) graph.addTerminal(p, 0, HARD);
3557
- else if (_optionalChain([hardFg, 'optionalAccess', _66 => _66[p]])) graph.addTerminal(p, HARD, 0);
3559
+ else if (_optionalChain([hardFg, 'optionalAccess', _68 => _68[p]])) graph.addTerminal(p, HARD, 0);
3558
3560
  else {
3559
3561
  const i = global[p] * 3;
3560
3562
  graph.addTerminal(p, Math.round(bg.cost(rgb[i], rgb[i + 1], rgb[i + 2]) * UNITS), Math.round(fg.cost(rgb[i], rgb[i + 1], rgb[i + 2]) * UNITS));
@@ -3875,6 +3877,342 @@ function findSubject(pixels, options = {}) {
3875
3877
  return { selection: upscaleRegion(work, pixels, roi, label, _nullishCoalesce(options.enhanceEdge, () => ( false))) };
3876
3878
  }
3877
3879
 
3880
+ // src/image-editor/selection/refine.ts
3881
+ var DEFAULT_REFINE_EDGE_PARAMS = {
3882
+ radius: 0,
3883
+ smartRadius: false,
3884
+ smooth: 0,
3885
+ feather: 0,
3886
+ contrast: 0,
3887
+ shiftEdge: 0
3888
+ };
3889
+ var GUIDED_FILTER_EPS = 1e-4;
3890
+ var fin = (v, d) => typeof v === "number" && Number.isFinite(v) ? v : d;
3891
+ function normalizeRefineEdgeParams(p = {}) {
3892
+ return {
3893
+ radius: Math.min(250, Math.max(0, fin(p.radius, 0))),
3894
+ smartRadius: p.smartRadius === true,
3895
+ smooth: Math.min(100, Math.max(0, fin(p.smooth, 0))),
3896
+ feather: Math.min(1e3, Math.max(0, fin(p.feather, 0))),
3897
+ contrast: Math.min(100, Math.max(0, fin(p.contrast, 0))),
3898
+ shiftEdge: Math.min(100, Math.max(-100, fin(p.shiftEdge, 0)))
3899
+ };
3900
+ }
3901
+ var gfRadius = (p) => Math.min(64, Math.max(1, Math.ceil(p.radius)));
3902
+ var smoothSigma = (p) => p.smooth / 100 * 4;
3903
+ var featherSigma = (p) => p.feather / 2;
3904
+ function shiftAmount(p) {
3905
+ const px2 = p.shiftEdge / 100 * Math.max(p.radius, 4);
3906
+ return Number.isFinite(px2) ? Math.min(64, Math.max(-64, px2)) : 0;
3907
+ }
3908
+ function refineEdgeHalo(params = {}) {
3909
+ const p = normalizeRefineEdgeParams(params);
3910
+ const g = gfRadius(p);
3911
+ const edge = p.radius > 0 ? Math.max(Math.ceil(p.radius), 2 * g + (p.smartRadius ? g + 1 : 0)) : 0;
3912
+ return edge + Math.ceil(3 * smoothSigma(p)) + Math.ceil(3 * featherSigma(p)) + Math.ceil(Math.abs(shiftAmount(p))) + 2;
3913
+ }
3914
+ function boxMean(src, w, h, r) {
3915
+ const tmp = new Float32Array(w * h);
3916
+ const pre = new Float64Array(Math.max(w, h) + 1);
3917
+ for (let y = 0; y < h; y++) {
3918
+ const row = y * w;
3919
+ for (let x = 0; x < w; x++) pre[x + 1] = pre[x] + src[row + x];
3920
+ for (let x = 0; x < w; x++) {
3921
+ const lo = Math.max(0, x - r);
3922
+ const hi = Math.min(w, x + r + 1);
3923
+ tmp[row + x] = (pre[hi] - pre[lo]) / (hi - lo);
3924
+ }
3925
+ }
3926
+ const out = new Float32Array(w * h);
3927
+ for (let x = 0; x < w; x++) {
3928
+ for (let y = 0; y < h; y++) pre[y + 1] = pre[y] + tmp[y * w + x];
3929
+ for (let y = 0; y < h; y++) {
3930
+ const lo = Math.max(0, y - r);
3931
+ const hi = Math.min(h, y + r + 1);
3932
+ out[y * w + x] = (pre[hi] - pre[lo]) / (hi - lo);
3933
+ }
3934
+ }
3935
+ return out;
3936
+ }
3937
+ function guidedFilterColor(guide, p, w, h, r, eps = GUIDED_FILTER_EPS) {
3938
+ const n = w * h;
3939
+ const [c0, c1, c2] = guide;
3940
+ const prod = (a, b2) => {
3941
+ const o = new Float32Array(n);
3942
+ for (let i = 0; i < n; i++) o[i] = a[i] * b2[i];
3943
+ return o;
3944
+ };
3945
+ const m0 = boxMean(c0, w, h, r);
3946
+ const m1 = boxMean(c1, w, h, r);
3947
+ const m2 = boxMean(c2, w, h, r);
3948
+ const mp = boxMean(p, w, h, r);
3949
+ const mip0 = boxMean(prod(c0, p), w, h, r);
3950
+ const mip1 = boxMean(prod(c1, p), w, h, r);
3951
+ const mip2 = boxMean(prod(c2, p), w, h, r);
3952
+ const s00 = boxMean(prod(c0, c0), w, h, r);
3953
+ const s01 = boxMean(prod(c0, c1), w, h, r);
3954
+ const s02 = boxMean(prod(c0, c2), w, h, r);
3955
+ const s11 = boxMean(prod(c1, c1), w, h, r);
3956
+ const s12 = boxMean(prod(c1, c2), w, h, r);
3957
+ const s22 = boxMean(prod(c2, c2), w, h, r);
3958
+ const a0 = new Float32Array(n);
3959
+ const a1 = new Float32Array(n);
3960
+ const a2 = new Float32Array(n);
3961
+ const b = new Float32Array(n);
3962
+ for (let i = 0; i < n; i++) {
3963
+ const u0 = m0[i], u1 = m1[i], u2 = m2[i], up = mp[i];
3964
+ const rr = s00[i] - u0 * u0 + eps;
3965
+ const rg = s01[i] - u0 * u1;
3966
+ const rb = s02[i] - u0 * u2;
3967
+ const gg = s11[i] - u1 * u1 + eps;
3968
+ const gb = s12[i] - u1 * u2;
3969
+ const bb = s22[i] - u2 * u2 + eps;
3970
+ const v0 = mip0[i] - u0 * up;
3971
+ const v1 = mip1[i] - u1 * up;
3972
+ const v2 = mip2[i] - u2 * up;
3973
+ const i00 = gg * bb - gb * gb;
3974
+ const i01 = gb * rb - rg * bb;
3975
+ const i02 = rg * gb - gg * rb;
3976
+ const i11 = rr * bb - rb * rb;
3977
+ const i12 = rb * rg - rr * gb;
3978
+ const i22 = rr * gg - rg * rg;
3979
+ const det = rr * i00 + rg * i01 + rb * i02;
3980
+ let x0 = 0, x1 = 0, x2 = 0;
3981
+ if (Math.abs(det) >= 1e-30) {
3982
+ x0 = (i00 * v0 + i01 * v1 + i02 * v2) / det;
3983
+ x1 = (i01 * v0 + i11 * v1 + i12 * v2) / det;
3984
+ x2 = (i02 * v0 + i12 * v1 + i22 * v2) / det;
3985
+ }
3986
+ a0[i] = x0;
3987
+ a1[i] = x1;
3988
+ a2[i] = x2;
3989
+ b[i] = up - x0 * u0 - x1 * u1 - x2 * u2;
3990
+ }
3991
+ const ma0 = boxMean(a0, w, h, r);
3992
+ const ma1 = boxMean(a1, w, h, r);
3993
+ const ma2 = boxMean(a2, w, h, r);
3994
+ const mb = boxMean(b, w, h, r);
3995
+ const out = new Float32Array(n);
3996
+ for (let i = 0; i < n; i++) out[i] = ma0[i] * c0[i] + ma1[i] * c1[i] + ma2[i] * c2[i] + mb[i];
3997
+ return out;
3998
+ }
3999
+ function edgeWidth(guide, w, h, r) {
4000
+ const n = w * h;
4001
+ const y = new Float32Array(n);
4002
+ for (let i = 0; i < n; i++) y[i] = 0.299 * guide[0][i] + 0.587 * guide[1][i] + 0.114 * guide[2][i];
4003
+ const g = new Float32Array(n);
4004
+ for (let yy = 0; yy < h; yy++) {
4005
+ for (let xx = 0; xx < w; xx++) {
4006
+ const gx = (y[yy * w + Math.min(w - 1, xx + 1)] - y[yy * w + Math.max(0, xx - 1)]) / 2;
4007
+ const gy = (y[Math.min(h - 1, yy + 1) * w + xx] - y[Math.max(0, yy - 1) * w + xx]) / 2;
4008
+ g[yy * w + xx] = Math.sqrt(gx * gx + gy * gy);
4009
+ }
4010
+ }
4011
+ const gm = _chunkUYXL6ZWQcjs.greyMorphology.call(void 0, g, w, h, r, true);
4012
+ const hi = _chunkUYXL6ZWQcjs.greyMorphology.call(void 0, y, w, h, r, true);
4013
+ const lo = _chunkUYXL6ZWQcjs.greyMorphology.call(void 0, y, w, h, r, false);
4014
+ const out = new Float32Array(n);
4015
+ for (let i = 0; i < n; i++) out[i] = (hi[i] - lo[i]) / Math.max(gm[i], 1e-4);
4016
+ return out;
4017
+ }
4018
+ function refineCoverage(guide, m, w, h, params = {}) {
4019
+ const p = normalizeRefineEdgeParams(params);
4020
+ let a = Float32Array.from(m);
4021
+ if (p.radius > 0 && guide) {
4022
+ const n = w * h;
4023
+ const boundary = new Uint8Array(n);
4024
+ let any = false;
4025
+ for (let y = 0; y < h; y++) {
4026
+ for (let x = 0; x < w; x++) {
4027
+ const i = y * w + x;
4028
+ const v = m[i] >= 0.5;
4029
+ const diff = x > 0 && m[i - 1] >= 0.5 !== v || x + 1 < w && m[i + 1] >= 0.5 !== v || y > 0 && m[i - w] >= 0.5 !== v || y + 1 < h && m[i + w] >= 0.5 !== v;
4030
+ if (diff) {
4031
+ boundary[i] = 1;
4032
+ any = true;
4033
+ }
4034
+ }
4035
+ }
4036
+ if (any) {
4037
+ const dist = _chunkUYXL6ZWQcjs.distanceTransform.call(void 0, boundary, w, h);
4038
+ const r = gfRadius(p);
4039
+ const q = guidedFilterColor(guide, m, w, h, r);
4040
+ const widths = p.smartRadius ? edgeWidth(guide, w, h, r) : null;
4041
+ for (let i = 0; i < n; i++) {
4042
+ const reff = widths ? Math.min(Math.max(p.radius, 1.5), Math.max(1.5, widths[i])) : p.radius;
4043
+ const wgt = Math.min(1, Math.max(0, reff + 1 - dist[i]));
4044
+ if (wgt > 0) {
4045
+ const qi = Math.min(1, Math.max(0, q[i]));
4046
+ a[i] = m[i] + (qi - m[i]) * wgt;
4047
+ }
4048
+ }
4049
+ }
4050
+ }
4051
+ const ss = smoothSigma(p);
4052
+ if (ss >= 0.3) {
4053
+ a = _chunkHGTDMKNEcjs.gaussianBlur.call(void 0, a, w, h, ss, "clamp");
4054
+ const gain = 1 + ss;
4055
+ for (let i = 0; i < a.length; i++) a[i] = Math.min(1, Math.max(0, (a[i] - 0.5) * gain + 0.5));
4056
+ }
4057
+ a = _chunkHGTDMKNEcjs.gaussianBlur.call(void 0, a, w, h, featherSigma(p), "clamp");
4058
+ if (p.contrast > 0) {
4059
+ const gain = 1 / (1 - 0.99 * p.contrast / 100);
4060
+ for (let i = 0; i < a.length; i++) a[i] = Math.min(1, Math.max(0, (a[i] - 0.5) * gain + 0.5));
4061
+ }
4062
+ const amount = shiftAmount(p);
4063
+ if (Math.abs(amount) >= 1e-4) a = _chunkUYXL6ZWQcjs.shiftCoverage.call(void 0, a, w, h, amount);
4064
+ return a;
4065
+ }
4066
+ function guidePlanes(pixels, win) {
4067
+ const box = _nullishCoalesce(win, () => ( { x: 0, y: 0, width: pixels.width, height: pixels.height }));
4068
+ const n = box.width * box.height;
4069
+ const r = new Float32Array(n);
4070
+ const g = new Float32Array(n);
4071
+ const b = new Float32Array(n);
4072
+ const d = pixels.data;
4073
+ for (let y = 0; y < box.height; y++) {
4074
+ for (let x = 0; x < box.width; x++) {
4075
+ const i = y * box.width + x;
4076
+ const p = ((box.y + y) * pixels.width + box.x + x) * 4;
4077
+ r[i] = d[p] / 255;
4078
+ g[i] = d[p + 1] / 255;
4079
+ b[i] = d[p + 2] / 255;
4080
+ }
4081
+ }
4082
+ return [r, g, b];
4083
+ }
4084
+ function refineSelection(pixels, mask, params = {}) {
4085
+ const p = normalizeRefineEdgeParams(params);
4086
+ if (pixels && (pixels.width !== mask.width || pixels.height !== mask.height)) {
4087
+ throw new Error("Refine Edge needs pixels the size of the selection");
4088
+ }
4089
+ if (!mask.bounds) return mask;
4090
+ const halo = refineEdgeHalo(p);
4091
+ const x0 = Math.max(0, mask.bounds.x - halo);
4092
+ const y0 = Math.max(0, mask.bounds.y - halo);
4093
+ const x1 = Math.min(mask.width, mask.bounds.x + mask.bounds.width + halo);
4094
+ const y1 = Math.min(mask.height, mask.bounds.y + mask.bounds.height + halo);
4095
+ const ww = x1 - x0;
4096
+ const wh = y1 - y0;
4097
+ const m = new Float32Array(ww * wh);
4098
+ for (let y = 0; y < wh; y++) {
4099
+ const src = (y0 + y) * mask.width + x0;
4100
+ for (let x = 0; x < ww; x++) m[y * ww + x] = mask.data[src + x] / 255;
4101
+ }
4102
+ const guide = pixels && p.radius > 0 ? guidePlanes(pixels, { x: x0, y: y0, width: ww, height: wh }) : null;
4103
+ const refined = refineCoverage(guide, m, ww, wh, p);
4104
+ const out = new Uint8Array(mask.width * mask.height);
4105
+ for (let y = 0; y < wh; y++) {
4106
+ const dst = (y0 + y) * mask.width + x0;
4107
+ for (let x = 0; x < ww; x++) out[dst + x] = _chunkUYXL6ZWQcjs.coverageToByte.call(void 0, refined[y * ww + x]);
4108
+ }
4109
+ return _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, mask.width, mask.height, out);
4110
+ }
4111
+
4112
+ // src/image-editor/selection/segment/guided.ts
4113
+ function workPlanes(work) {
4114
+ const n = work.width * work.height;
4115
+ const planes = [new Float32Array(n), new Float32Array(n), new Float32Array(n)];
4116
+ for (let i = 0; i < n; i++) for (let c = 0; c < 3; c++) planes[c][i] = work.rgb[i * 3 + c] / 255;
4117
+ return planes;
4118
+ }
4119
+ function workLuma(work) {
4120
+ const n = work.width * work.height;
4121
+ const out = new Float32Array(n);
4122
+ const { rgb } = work;
4123
+ for (let i = 0; i < n; i++) out[i] = (0.299 * rgb[i * 3] + 0.587 * rgb[i * 3 + 1] + 0.114 * rgb[i * 3 + 2]) / 255;
4124
+ return out;
4125
+ }
4126
+ function softMaskToSelection(work, mask) {
4127
+ const { sourceWidth: W, sourceHeight: H, width: w, height: h, scale } = work;
4128
+ const out = new Uint8Array(W * H);
4129
+ const col = new Int32Array(W);
4130
+ const fx = new Float32Array(W);
4131
+ for (let X = 0; X < W; X++) {
4132
+ const u = Math.min(w - 1, Math.max(0, (X + 0.5) * scale - 0.5));
4133
+ col[X] = Math.min(w - 2, Math.floor(u));
4134
+ fx[X] = u - col[X];
4135
+ if (w === 1) {
4136
+ col[X] = 0;
4137
+ fx[X] = 0;
4138
+ }
4139
+ }
4140
+ for (let Y = 0; Y < H; Y++) {
4141
+ const v = Math.min(h - 1, Math.max(0, (Y + 0.5) * scale - 0.5));
4142
+ const j = h === 1 ? 0 : Math.min(h - 2, Math.floor(v));
4143
+ const fy = h === 1 ? 0 : v - j;
4144
+ const r0 = j * w;
4145
+ const r1 = h === 1 ? r0 : r0 + w;
4146
+ for (let X = 0; X < W; X++) {
4147
+ const i = col[X];
4148
+ const i1 = w === 1 ? i : i + 1;
4149
+ const t = fx[X];
4150
+ const m = (mask[r0 + i] * (1 - t) + mask[r0 + i1] * t) * (1 - fy) + (mask[r1 + i] * (1 - t) + mask[r1 + i1] * t) * fy;
4151
+ out[Y * W + X] = Math.round(Math.min(1, Math.max(0, m)) * 255);
4152
+ }
4153
+ }
4154
+ return _chunkUYXL6ZWQcjs.selectionFromRegion.call(void 0, W, H, { x: 0, y: 0, width: W, height: H }, out);
4155
+ }
4156
+
4157
+ // src/image-editor/selection/segment/focus.ts
4158
+ var FOCUS_SIZE = 1024;
4159
+ function estimateNoise(luma2, w, h) {
4160
+ if (w < 3 || h < 3) return 0;
4161
+ let sum = 0;
4162
+ for (let y = 1; y < h - 1; y++) {
4163
+ for (let x = 1; x < w - 1; x++) {
4164
+ const i = y * w + x;
4165
+ const v = luma2[i - w - 1] - 2 * luma2[i - w] + luma2[i - w + 1] - 2 * luma2[i - 1] + 4 * luma2[i] - 2 * luma2[i + 1] + luma2[i + w - 1] - 2 * luma2[i + w] + luma2[i + w + 1];
4166
+ sum += Math.abs(v);
4167
+ }
4168
+ }
4169
+ return Math.sqrt(Math.PI / 2) * sum / (6 * (w - 2) * (h - 2));
4170
+ }
4171
+ function focusArea(pixels, options = {}) {
4172
+ const work = workImage(pixels, FOCUS_SIZE);
4173
+ const { width: w, height: h, scale } = work;
4174
+ const n = w * h;
4175
+ const luma2 = workLuma(work);
4176
+ const sigma = estimateNoise(luma2, w, h);
4177
+ const noise = Math.min(100, Math.max(0, _nullishCoalesce(options.noise, () => ( 0))));
4178
+ const floor = 2 * sigma * (1 + noise / 25);
4179
+ const detail = new Float32Array(n);
4180
+ for (let y = 1; y < h - 1; y++) {
4181
+ for (let x = 1; x < w - 1; x++) {
4182
+ const i = y * w + x;
4183
+ const lap = Math.abs(4 * luma2[i] - luma2[i - 1] - luma2[i + 1] - luma2[i - w] - luma2[i + w]);
4184
+ const d = Math.max(0, lap - floor);
4185
+ detail[i] = d * d;
4186
+ }
4187
+ }
4188
+ const r = Math.max(2, Math.round(0.012 * Math.max(w, h)));
4189
+ const energy = boxMean(detail, w, h, r);
4190
+ const sharp = new Float32Array(n);
4191
+ for (let i = 0; i < n; i++) sharp[i] = Math.log1p(Math.sqrt(energy[i]) * 400);
4192
+ const sorted = Float32Array.from(sharp).sort();
4193
+ const top = sorted[Math.floor(n * 0.995)] || 1;
4194
+ for (let i = 0; i < n; i++) sharp[i] = Math.min(1, sharp[i] / top);
4195
+ const ones = new Float32Array(n).fill(1);
4196
+ const otsu = otsuThreshold(sharp, ones);
4197
+ const range = Math.min(100, Math.max(0, _nullishCoalesce(options.range, () => ( 50))));
4198
+ const t = Math.min(0.98, otsu * Math.pow(2, (50 - range) / 25));
4199
+ let mask = new Float32Array(n);
4200
+ for (let i = 0; i < n; i++) mask[i] = sharp[i] >= t ? 1 : 0;
4201
+ const c = 2 * r;
4202
+ const grown = boxMean(mask, w, h, c);
4203
+ for (let i = 0; i < n; i++) grown[i] = grown[i] > 1e-3 ? 1 : 0;
4204
+ const shrunk = boxMean(grown, w, h, c);
4205
+ for (let i = 0; i < n; i++) mask[i] = shrunk[i] >= 0.999 ? 1 : 0;
4206
+ const pulled = boxMean(mask, w, h, Math.max(1, Math.round(r / 2)));
4207
+ for (let i = 0; i < n; i++) mask[i] = pulled[i] >= 0.999 ? 1 : 0;
4208
+ const softness = Math.max(0, _nullishCoalesce(options.softness, () => ( 4))) * scale;
4209
+ if (softness > 0) {
4210
+ const fitted = guidedFilterColor(workPlanes(work), mask, w, h, Math.max(1, Math.round(softness * 2)), 1e-3);
4211
+ for (let i = 0; i < n; i++) mask[i] = Math.min(1, Math.max(0, fitted[i]));
4212
+ }
4213
+ return { selection: softMaskToSelection(work, mask), noiseLevel: Math.round(sigma * 255 * 10) / 10 };
4214
+ }
4215
+
3878
4216
  // src/image-editor/layers/shape-type-ui.ts
3879
4217
  var DEFAULT_SHAPE_TOOL_OPTIONS = {
3880
4218
  kind: "rect",
@@ -3987,11 +4325,11 @@ function applyShapeOptions(controller, layerId, change) {
3987
4325
  const style = {};
3988
4326
  if ("fill" in change) style.fill = _nullishCoalesce(change.fill, () => ( null));
3989
4327
  if ("stroke" in change || "strokeWidth" in change) {
3990
- const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access', _67 => _67.stroke, 'optionalAccess', _68 => _68.paint, 'access', _69 => _69.type]) === "color" ? info.stroke.paint.color : null;
3991
- style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access', _70 => _70.stroke, 'optionalAccess', _71 => _71.width]))), () => ( 2)), paint: color } : null;
4328
+ const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access', _69 => _69.stroke, 'optionalAccess', _70 => _70.paint, 'access', _71 => _71.type]) === "color" ? info.stroke.paint.color : null;
4329
+ style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access', _72 => _72.stroke, 'optionalAccess', _73 => _73.width]))), () => ( 2)), paint: color } : null;
3992
4330
  }
3993
4331
  if (Object.keys(style).length) controller.setShapeStyle(layerId, style);
3994
- const live = _optionalChain([info, 'access', _72 => _72.components, 'access', _73 => _73[0], 'optionalAccess', _74 => _74.live]);
4332
+ const live = _optionalChain([info, 'access', _74 => _74.components, 'access', _75 => _75[0], 'optionalAccess', _76 => _76.live]);
3995
4333
  if (!live) return;
3996
4334
  const shape = {};
3997
4335
  if (live.kind === "rect" && change.radius !== void 0) shape.radius = change.radius;
@@ -4017,7 +4355,7 @@ var TextEditSession = (_class8 = class {
4017
4355
  __init42() {this.listeners = /* @__PURE__ */ new Set()}
4018
4356
  __init43() {this.error = null}
4019
4357
  get layer() {
4020
- const l = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _75 => _75.layer]);
4358
+ const l = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _77 => _77.layer]);
4021
4359
  if (!l || l.type !== "type") throw new Error("The type layer being edited is gone.");
4022
4360
  return l;
4023
4361
  }
@@ -4032,7 +4370,7 @@ var TextEditSession = (_class8 = class {
4032
4370
  }
4033
4371
  /** Whether the layer still exists (it can be deleted or undone away while editing). */
4034
4372
  get alive() {
4035
- return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _76 => _76.layer, 'access', _77 => _77.type]) === "type";
4373
+ return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _78 => _78.layer, 'access', _79 => _79.type]) === "type";
4036
4374
  }
4037
4375
  subscribe(fn) {
4038
4376
  this.listeners.add(fn);
@@ -4320,7 +4658,7 @@ var TypeToolGesture = (_class9 = class {
4320
4658
  finish() {
4321
4659
  const s = this.session;
4322
4660
  this.session = null;
4323
- _optionalChain([s, 'optionalAccess', _78 => _78.close, 'call', _79 => _79()]);
4661
+ _optionalChain([s, 'optionalAccess', _80 => _80.close, 'call', _81 => _81()]);
4324
4662
  }
4325
4663
  }, _class9);
4326
4664
 
@@ -4789,7 +5127,7 @@ function segmentToSelection(width, height, result) {
4789
5127
  const sized = raw.width === width && raw.height === height ? raw : _chunkUYXL6ZWQcjs.resizeSelection.call(void 0, raw, width, height);
4790
5128
  out = _chunkUYXL6ZWQcjs.combineSelections.call(void 0, out, sized, "add");
4791
5129
  }
4792
- return _optionalChain([out, 'optionalAccess', _80 => _80.bounds]) ? out : null;
5130
+ return _optionalChain([out, 'optionalAccess', _82 => _82.bounds]) ? out : null;
4793
5131
  }
4794
5132
  function segmentsToSelection(width, height, results) {
4795
5133
  let out = null;
@@ -4800,238 +5138,6 @@ function segmentsToSelection(width, height, results) {
4800
5138
  return out;
4801
5139
  }
4802
5140
 
4803
- // src/image-editor/selection/refine.ts
4804
- var DEFAULT_REFINE_EDGE_PARAMS = {
4805
- radius: 0,
4806
- smartRadius: false,
4807
- smooth: 0,
4808
- feather: 0,
4809
- contrast: 0,
4810
- shiftEdge: 0
4811
- };
4812
- var GUIDED_FILTER_EPS = 1e-4;
4813
- var fin = (v, d) => typeof v === "number" && Number.isFinite(v) ? v : d;
4814
- function normalizeRefineEdgeParams(p = {}) {
4815
- return {
4816
- radius: Math.min(250, Math.max(0, fin(p.radius, 0))),
4817
- smartRadius: p.smartRadius === true,
4818
- smooth: Math.min(100, Math.max(0, fin(p.smooth, 0))),
4819
- feather: Math.min(1e3, Math.max(0, fin(p.feather, 0))),
4820
- contrast: Math.min(100, Math.max(0, fin(p.contrast, 0))),
4821
- shiftEdge: Math.min(100, Math.max(-100, fin(p.shiftEdge, 0)))
4822
- };
4823
- }
4824
- var gfRadius = (p) => Math.min(64, Math.max(1, Math.ceil(p.radius)));
4825
- var smoothSigma = (p) => p.smooth / 100 * 4;
4826
- var featherSigma = (p) => p.feather / 2;
4827
- function shiftAmount(p) {
4828
- const px2 = p.shiftEdge / 100 * Math.max(p.radius, 4);
4829
- return Number.isFinite(px2) ? Math.min(64, Math.max(-64, px2)) : 0;
4830
- }
4831
- function refineEdgeHalo(params = {}) {
4832
- const p = normalizeRefineEdgeParams(params);
4833
- const g = gfRadius(p);
4834
- const edge = p.radius > 0 ? Math.max(Math.ceil(p.radius), 2 * g + (p.smartRadius ? g + 1 : 0)) : 0;
4835
- return edge + Math.ceil(3 * smoothSigma(p)) + Math.ceil(3 * featherSigma(p)) + Math.ceil(Math.abs(shiftAmount(p))) + 2;
4836
- }
4837
- function boxMean(src, w, h, r) {
4838
- const tmp = new Float32Array(w * h);
4839
- const pre = new Float64Array(Math.max(w, h) + 1);
4840
- for (let y = 0; y < h; y++) {
4841
- const row = y * w;
4842
- for (let x = 0; x < w; x++) pre[x + 1] = pre[x] + src[row + x];
4843
- for (let x = 0; x < w; x++) {
4844
- const lo = Math.max(0, x - r);
4845
- const hi = Math.min(w, x + r + 1);
4846
- tmp[row + x] = (pre[hi] - pre[lo]) / (hi - lo);
4847
- }
4848
- }
4849
- const out = new Float32Array(w * h);
4850
- for (let x = 0; x < w; x++) {
4851
- for (let y = 0; y < h; y++) pre[y + 1] = pre[y] + tmp[y * w + x];
4852
- for (let y = 0; y < h; y++) {
4853
- const lo = Math.max(0, y - r);
4854
- const hi = Math.min(h, y + r + 1);
4855
- out[y * w + x] = (pre[hi] - pre[lo]) / (hi - lo);
4856
- }
4857
- }
4858
- return out;
4859
- }
4860
- function guidedFilterColor(guide, p, w, h, r, eps = GUIDED_FILTER_EPS) {
4861
- const n = w * h;
4862
- const [c0, c1, c2] = guide;
4863
- const prod = (a, b2) => {
4864
- const o = new Float32Array(n);
4865
- for (let i = 0; i < n; i++) o[i] = a[i] * b2[i];
4866
- return o;
4867
- };
4868
- const m0 = boxMean(c0, w, h, r);
4869
- const m1 = boxMean(c1, w, h, r);
4870
- const m2 = boxMean(c2, w, h, r);
4871
- const mp = boxMean(p, w, h, r);
4872
- const mip0 = boxMean(prod(c0, p), w, h, r);
4873
- const mip1 = boxMean(prod(c1, p), w, h, r);
4874
- const mip2 = boxMean(prod(c2, p), w, h, r);
4875
- const s00 = boxMean(prod(c0, c0), w, h, r);
4876
- const s01 = boxMean(prod(c0, c1), w, h, r);
4877
- const s02 = boxMean(prod(c0, c2), w, h, r);
4878
- const s11 = boxMean(prod(c1, c1), w, h, r);
4879
- const s12 = boxMean(prod(c1, c2), w, h, r);
4880
- const s22 = boxMean(prod(c2, c2), w, h, r);
4881
- const a0 = new Float32Array(n);
4882
- const a1 = new Float32Array(n);
4883
- const a2 = new Float32Array(n);
4884
- const b = new Float32Array(n);
4885
- for (let i = 0; i < n; i++) {
4886
- const u0 = m0[i], u1 = m1[i], u2 = m2[i], up = mp[i];
4887
- const rr = s00[i] - u0 * u0 + eps;
4888
- const rg = s01[i] - u0 * u1;
4889
- const rb = s02[i] - u0 * u2;
4890
- const gg = s11[i] - u1 * u1 + eps;
4891
- const gb = s12[i] - u1 * u2;
4892
- const bb = s22[i] - u2 * u2 + eps;
4893
- const v0 = mip0[i] - u0 * up;
4894
- const v1 = mip1[i] - u1 * up;
4895
- const v2 = mip2[i] - u2 * up;
4896
- const i00 = gg * bb - gb * gb;
4897
- const i01 = gb * rb - rg * bb;
4898
- const i02 = rg * gb - gg * rb;
4899
- const i11 = rr * bb - rb * rb;
4900
- const i12 = rb * rg - rr * gb;
4901
- const i22 = rr * gg - rg * rg;
4902
- const det = rr * i00 + rg * i01 + rb * i02;
4903
- let x0 = 0, x1 = 0, x2 = 0;
4904
- if (Math.abs(det) >= 1e-30) {
4905
- x0 = (i00 * v0 + i01 * v1 + i02 * v2) / det;
4906
- x1 = (i01 * v0 + i11 * v1 + i12 * v2) / det;
4907
- x2 = (i02 * v0 + i12 * v1 + i22 * v2) / det;
4908
- }
4909
- a0[i] = x0;
4910
- a1[i] = x1;
4911
- a2[i] = x2;
4912
- b[i] = up - x0 * u0 - x1 * u1 - x2 * u2;
4913
- }
4914
- const ma0 = boxMean(a0, w, h, r);
4915
- const ma1 = boxMean(a1, w, h, r);
4916
- const ma2 = boxMean(a2, w, h, r);
4917
- const mb = boxMean(b, w, h, r);
4918
- const out = new Float32Array(n);
4919
- for (let i = 0; i < n; i++) out[i] = ma0[i] * c0[i] + ma1[i] * c1[i] + ma2[i] * c2[i] + mb[i];
4920
- return out;
4921
- }
4922
- function edgeWidth(guide, w, h, r) {
4923
- const n = w * h;
4924
- const y = new Float32Array(n);
4925
- for (let i = 0; i < n; i++) y[i] = 0.299 * guide[0][i] + 0.587 * guide[1][i] + 0.114 * guide[2][i];
4926
- const g = new Float32Array(n);
4927
- for (let yy = 0; yy < h; yy++) {
4928
- for (let xx = 0; xx < w; xx++) {
4929
- const gx = (y[yy * w + Math.min(w - 1, xx + 1)] - y[yy * w + Math.max(0, xx - 1)]) / 2;
4930
- const gy = (y[Math.min(h - 1, yy + 1) * w + xx] - y[Math.max(0, yy - 1) * w + xx]) / 2;
4931
- g[yy * w + xx] = Math.sqrt(gx * gx + gy * gy);
4932
- }
4933
- }
4934
- const gm = _chunkUYXL6ZWQcjs.greyMorphology.call(void 0, g, w, h, r, true);
4935
- const hi = _chunkUYXL6ZWQcjs.greyMorphology.call(void 0, y, w, h, r, true);
4936
- const lo = _chunkUYXL6ZWQcjs.greyMorphology.call(void 0, y, w, h, r, false);
4937
- const out = new Float32Array(n);
4938
- for (let i = 0; i < n; i++) out[i] = (hi[i] - lo[i]) / Math.max(gm[i], 1e-4);
4939
- return out;
4940
- }
4941
- function refineCoverage(guide, m, w, h, params = {}) {
4942
- const p = normalizeRefineEdgeParams(params);
4943
- let a = Float32Array.from(m);
4944
- if (p.radius > 0 && guide) {
4945
- const n = w * h;
4946
- const boundary = new Uint8Array(n);
4947
- let any = false;
4948
- for (let y = 0; y < h; y++) {
4949
- for (let x = 0; x < w; x++) {
4950
- const i = y * w + x;
4951
- const v = m[i] >= 0.5;
4952
- const diff = x > 0 && m[i - 1] >= 0.5 !== v || x + 1 < w && m[i + 1] >= 0.5 !== v || y > 0 && m[i - w] >= 0.5 !== v || y + 1 < h && m[i + w] >= 0.5 !== v;
4953
- if (diff) {
4954
- boundary[i] = 1;
4955
- any = true;
4956
- }
4957
- }
4958
- }
4959
- if (any) {
4960
- const dist = _chunkUYXL6ZWQcjs.distanceTransform.call(void 0, boundary, w, h);
4961
- const r = gfRadius(p);
4962
- const q = guidedFilterColor(guide, m, w, h, r);
4963
- const widths = p.smartRadius ? edgeWidth(guide, w, h, r) : null;
4964
- for (let i = 0; i < n; i++) {
4965
- const reff = widths ? Math.min(Math.max(p.radius, 1.5), Math.max(1.5, widths[i])) : p.radius;
4966
- const wgt = Math.min(1, Math.max(0, reff + 1 - dist[i]));
4967
- if (wgt > 0) {
4968
- const qi = Math.min(1, Math.max(0, q[i]));
4969
- a[i] = m[i] + (qi - m[i]) * wgt;
4970
- }
4971
- }
4972
- }
4973
- }
4974
- const ss = smoothSigma(p);
4975
- if (ss >= 0.3) {
4976
- a = _chunkHGTDMKNEcjs.gaussianBlur.call(void 0, a, w, h, ss, "clamp");
4977
- const gain = 1 + ss;
4978
- for (let i = 0; i < a.length; i++) a[i] = Math.min(1, Math.max(0, (a[i] - 0.5) * gain + 0.5));
4979
- }
4980
- a = _chunkHGTDMKNEcjs.gaussianBlur.call(void 0, a, w, h, featherSigma(p), "clamp");
4981
- if (p.contrast > 0) {
4982
- const gain = 1 / (1 - 0.99 * p.contrast / 100);
4983
- for (let i = 0; i < a.length; i++) a[i] = Math.min(1, Math.max(0, (a[i] - 0.5) * gain + 0.5));
4984
- }
4985
- const amount = shiftAmount(p);
4986
- if (Math.abs(amount) >= 1e-4) a = _chunkUYXL6ZWQcjs.shiftCoverage.call(void 0, a, w, h, amount);
4987
- return a;
4988
- }
4989
- function guidePlanes(pixels, win) {
4990
- const box = _nullishCoalesce(win, () => ( { x: 0, y: 0, width: pixels.width, height: pixels.height }));
4991
- const n = box.width * box.height;
4992
- const r = new Float32Array(n);
4993
- const g = new Float32Array(n);
4994
- const b = new Float32Array(n);
4995
- const d = pixels.data;
4996
- for (let y = 0; y < box.height; y++) {
4997
- for (let x = 0; x < box.width; x++) {
4998
- const i = y * box.width + x;
4999
- const p = ((box.y + y) * pixels.width + box.x + x) * 4;
5000
- r[i] = d[p] / 255;
5001
- g[i] = d[p + 1] / 255;
5002
- b[i] = d[p + 2] / 255;
5003
- }
5004
- }
5005
- return [r, g, b];
5006
- }
5007
- function refineSelection(pixels, mask, params = {}) {
5008
- const p = normalizeRefineEdgeParams(params);
5009
- if (pixels && (pixels.width !== mask.width || pixels.height !== mask.height)) {
5010
- throw new Error("Refine Edge needs pixels the size of the selection");
5011
- }
5012
- if (!mask.bounds) return mask;
5013
- const halo = refineEdgeHalo(p);
5014
- const x0 = Math.max(0, mask.bounds.x - halo);
5015
- const y0 = Math.max(0, mask.bounds.y - halo);
5016
- const x1 = Math.min(mask.width, mask.bounds.x + mask.bounds.width + halo);
5017
- const y1 = Math.min(mask.height, mask.bounds.y + mask.bounds.height + halo);
5018
- const ww = x1 - x0;
5019
- const wh = y1 - y0;
5020
- const m = new Float32Array(ww * wh);
5021
- for (let y = 0; y < wh; y++) {
5022
- const src = (y0 + y) * mask.width + x0;
5023
- for (let x = 0; x < ww; x++) m[y * ww + x] = mask.data[src + x] / 255;
5024
- }
5025
- const guide = pixels && p.radius > 0 ? guidePlanes(pixels, { x: x0, y: y0, width: ww, height: wh }) : null;
5026
- const refined = refineCoverage(guide, m, ww, wh, p);
5027
- const out = new Uint8Array(mask.width * mask.height);
5028
- for (let y = 0; y < wh; y++) {
5029
- const dst = (y0 + y) * mask.width + x0;
5030
- for (let x = 0; x < ww; x++) out[dst + x] = _chunkUYXL6ZWQcjs.coverageToByte.call(void 0, refined[y * ww + x]);
5031
- }
5032
- return _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, mask.width, mask.height, out);
5033
- }
5034
-
5035
5141
  // src/image-editor/selection/stroke.ts
5036
5142
  function selectionRing(sel, width, location) {
5037
5143
  const half = location === "center" ? width / 2 : width;
@@ -5070,7 +5176,7 @@ function deserializeChannels(value, size, problems = []) {
5070
5176
  visible: v.visible === true
5071
5177
  });
5072
5178
  } catch (err) {
5073
- problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess', _81 => _81.name]), () => ( "?")))}" could not be read: ${err instanceof Error ? err.message : String(err)}.`);
5179
+ problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess', _83 => _83.name]), () => ( "?")))}" could not be read: ${err instanceof Error ? err.message : String(err)}.`);
5074
5180
  }
5075
5181
  }
5076
5182
  return out;
@@ -5108,16 +5214,16 @@ function checkEffectTime(time) {
5108
5214
  return time;
5109
5215
  }
5110
5216
  function checkEffectAnimation(animate) {
5111
- const duration = _optionalChain([animate, 'optionalAccess', _82 => _82.duration]);
5217
+ const duration = _optionalChain([animate, 'optionalAccess', _84 => _84.duration]);
5112
5218
  if (!(typeof duration === "number" && Number.isFinite(duration) && duration > 0 && duration <= _chunkUYXL6ZWQcjs.MAX_EFFECT_ANIMATION_MS)) {
5113
5219
  throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`animate.duration must be more than 0 and at most ${_chunkUYXL6ZWQcjs.MAX_EFFECT_ANIMATION_MS} ms.`);
5114
5220
  }
5115
5221
  return { duration: Math.round(duration) };
5116
5222
  }
5117
5223
  function effectLayerTiming(g, d) {
5118
- if (!_optionalChain([d, 'optionalAccess', _83 => _83.duration])) return null;
5224
+ if (!_optionalChain([d, 'optionalAccess', _85 => _85.duration])) return null;
5119
5225
  const time = _nullishCoalesce(g.time, () => ( 0));
5120
- return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access', _84 => _84.animate, 'optionalAccess', _85 => _85.duration]), () => ( d.duration)), loops: d.loop };
5226
+ return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access', _86 => _86.animate, 'optionalAccess', _87 => _87.duration]), () => ( d.duration)), loops: d.loop };
5121
5227
  }
5122
5228
 
5123
5229
  // src/image-editor/effects.ts
@@ -5370,14 +5476,14 @@ var FreeTransformSession = (_class11 = class {
5370
5476
  if (init.interpolation !== void 0 && !_chunkHGTDMKNEcjs.isInterpolation.call(void 0, init.interpolation)) fail(`Unknown interpolation "${String(init.interpolation)}"; use nearest, bilinear or bicubic.`);
5371
5477
  this.interp = _nullishCoalesce(init.interpolation, () => ( "bicubic"));
5372
5478
  const sel = host.selection();
5373
- const selected = Boolean(_optionalChain([sel, 'optionalAccess', _86 => _86.bounds]));
5479
+ const selected = Boolean(_optionalChain([sel, 'optionalAccess', _88 => _88.bounds]));
5374
5480
  let content = _nullishCoalesce(init.content, () => ( "auto"));
5375
5481
  if (!["auto", "layer", "selection", "selection-copy", "selection-outline"].includes(content)) {
5376
5482
  fail(`Unknown content "${String(content)}"; use auto, layer, selection, selection-copy or selection-outline.`);
5377
5483
  }
5378
5484
  const targetId = _nullishCoalesce(init.layerId, () => ( host.activeLayerId()));
5379
- const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess', _87 => _87.layer]) : void 0;
5380
- const smartTarget = (_optionalChain([target, 'optionalAccess', _88 => _88.type]) === "smart" || _optionalChain([target, 'optionalAccess', _89 => _89.type]) === "shape" || _optionalChain([target, 'optionalAccess', _90 => _90.type]) === "type") && (_nullishCoalesce(init.channel, () => ( (target.id === host.activeLayerId() ? host.activeTarget() : "pixels")))) !== "mask";
5485
+ const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess', _89 => _89.layer]) : void 0;
5486
+ const smartTarget = (_optionalChain([target, 'optionalAccess', _90 => _90.type]) === "smart" || _optionalChain([target, 'optionalAccess', _91 => _91.type]) === "shape" || _optionalChain([target, 'optionalAccess', _92 => _92.type]) === "type") && (_nullishCoalesce(init.channel, () => ( (target.id === host.activeLayerId() ? host.activeTarget() : "pixels")))) !== "mask";
5381
5487
  if (content === "auto") content = selected && !smartTarget ? "selection" : "layer";
5382
5488
  this.content = content;
5383
5489
  if (content !== "layer" && !selected) fail(`Nothing is selected; ${content} needs a selection. Select first, or use content layer.`);
@@ -5401,9 +5507,9 @@ var FreeTransformSession = (_class11 = class {
5401
5507
  const mask = layer.mask && !layer.mask.source ? layer.mask : void 0;
5402
5508
  const channel = _nullishCoalesce(init.channel, () => ( (layer.id === host.activeLayerId() ? host.activeTarget() : "pixels")));
5403
5509
  if (channel !== "pixels" && channel !== "mask") fail(`Unknown channel "${String(channel)}"; use pixels or mask.`);
5404
- const linked = _optionalChain([mask, 'optionalAccess', _91 => _91.linked]) !== false;
5510
+ const linked = _optionalChain([mask, 'optionalAccess', _93 => _93.linked]) !== false;
5405
5511
  const maskAlone = channel === "mask" && (!linked || layer.type !== "pixel");
5406
- if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access', _92 => _92.mask, 'optionalAccess', _93 => _93.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.`);
5512
+ if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access', _94 => _94.mask, 'optionalAccess', _95 => _95.source]) ? `Layer "${layer.name || id}" has a depth mask, which is generated, not transformed.` : `Layer "${layer.name || id}" has no mask to transform; add one with add_layer_mask, or transform its pixels.`);
5407
5513
  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.`);
5408
5514
  if (!layer.visible && content !== "selection-copy") fail(`Layer "${layer.name || id}" is hidden; show it before you transform it.`);
5409
5515
  if (content !== "selection-copy") {
@@ -5506,7 +5612,7 @@ var FreeTransformSession = (_class11 = class {
5506
5612
  };
5507
5613
  this.copyId = copy.id;
5508
5614
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, layer.id);
5509
- this.startLayers = _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _94 => _94.parent, 'optionalAccess', _95 => _95.id]), () => ( null)), loc.index + 1);
5615
+ this.startLayers = _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _96 => _96.parent, 'optionalAccess', _97 => _97.id]), () => ( null)), loc.index + 1);
5510
5616
  this.parts.push({ what: "pixels", offset: o, moving: lifted, base: null, reduced: /* @__PURE__ */ new Map() });
5511
5617
  moves.push("pixels");
5512
5618
  }
@@ -5615,7 +5721,7 @@ var FreeTransformSession = (_class11 = class {
5615
5721
  moveVectorMask(layers) {
5616
5722
  const g = this.geometryValue;
5617
5723
  if (!this.layerId || this.copyId || !this.moves.includes("pixels") || _chunkUYXL6ZWQcjs.isIdentityTransform.call(void 0, g)) return layers;
5618
- const vm = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess', _96 => _96.layer, 'access', _97 => _97.vectorMask]);
5724
+ const vm = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess', _98 => _98.layer, 'access', _99 => _99.vectorMask]);
5619
5725
  if (!vm || vm.linked === false) return layers;
5620
5726
  const warp = _chunkUYXL6ZWQcjs.hasWarp.call(void 0, g);
5621
5727
  const f = warp ? _chunkUYXL6ZWQcjs.transformMap.call(void 0, g) : null;
@@ -5786,11 +5892,11 @@ var FreeTransformSession = (_class11 = class {
5786
5892
  result(changed, layers, selection) {
5787
5893
  let bounds = null;
5788
5894
  const id = _nullishCoalesce(this.copyId, () => ( this.layerId));
5789
- const layer = id ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _98 => _98.layer]) : void 0;
5790
- if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess', _99 => _99.type]) === "pixel") bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, this.host.pixelsOf(layer)), layer.offset);
5791
- else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess', _100 => _100.type]) === "smart" || _optionalChain([layer, 'optionalAccess', _101 => _101.type]) === "shape" || _optionalChain([layer, 'optionalAccess', _102 => _102.type]) === "type")) bounds = _chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.surface);
5792
- else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess', _103 => _103.mask])) bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.mask.surface), layer.type === "pixel" ? layer.offset : { x: 0, y: 0 });
5793
- else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess', _104 => _104.bounds]) ? { ...selection.bounds } : null;
5895
+ const layer = id ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _100 => _100.layer]) : void 0;
5896
+ if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess', _101 => _101.type]) === "pixel") bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, this.host.pixelsOf(layer)), layer.offset);
5897
+ else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess', _102 => _102.type]) === "smart" || _optionalChain([layer, 'optionalAccess', _103 => _103.type]) === "shape" || _optionalChain([layer, 'optionalAccess', _104 => _104.type]) === "type")) bounds = _chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.surface);
5898
+ else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess', _105 => _105.mask])) bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.mask.surface), layer.type === "pixel" ? layer.offset : { x: 0, y: 0 });
5899
+ else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess', _106 => _106.bounds]) ? { ...selection.bounds } : null;
5794
5900
  return {
5795
5901
  layerId: _nullishCoalesce(this.copyId, () => ( this.layerId)),
5796
5902
  content: this.content,
@@ -5819,7 +5925,7 @@ function deserializeColorMode(raw, problems) {
5819
5925
  }
5820
5926
  function effectiveProof(proof, mode) {
5821
5927
  if (proof) return proof;
5822
- if (_optionalChain([mode, 'optionalAccess', _105 => _105.mode]) === "cmyk") return { ...DEFAULT_PROOF, profile: mode.profile, intent: mode.intent };
5928
+ if (_optionalChain([mode, 'optionalAccess', _107 => _107.mode]) === "cmyk") return { ...DEFAULT_PROOF, profile: mode.profile, intent: mode.intent };
5823
5929
  return null;
5824
5930
  }
5825
5931
  function colorModePlanes(doc, mode) {
@@ -5874,7 +5980,7 @@ function resolveProfile(doc) {
5874
5980
  return p;
5875
5981
  }
5876
5982
  function profileBytes(doc) {
5877
- if (_optionalChain([doc, 'optionalAccess', _106 => _106.icc])) return doc.icc;
5983
+ if (_optionalChain([doc, 'optionalAccess', _108 => _108.icc])) return doc.icc;
5878
5984
  const p = resolveProfile(doc);
5879
5985
  return _nullishCoalesce(p.bytes, () => ( _chunkBROJYMWUcjs.encodeProfile.call(void 0, p)));
5880
5986
  }
@@ -6036,7 +6142,7 @@ function paintCoverageInto(base, coverage, apply, rects, depth = null) {
6036
6142
  else tiles.delete(key);
6037
6143
  continue;
6038
6144
  }
6039
- const src = _nullishCoalesce(_optionalChain([base, 'access', _107 => _107.tiles, 'access', _108 => _108.get, 'call', _109 => _109(key), 'optionalAccess', _110 => _110.data]), () => ( defaultTile(base)));
6145
+ const src = _nullishCoalesce(_optionalChain([base, 'access', _109 => _109.tiles, 'access', _110 => _110.get, 'call', _111 => _111(key), 'optionalAccess', _112 => _112.data]), () => ( defaultTile(base)));
6040
6146
  const data = _chunkEBDCRTZIcjs.applyStrokeToTile.call(void 0, coverage, src, base.channels, t.tx, t.ty, apply);
6041
6147
  const tile = _chunkCWM3CUUXcjs.finishTile.call(void 0, data, base.channels, base.defaultValue);
6042
6148
  if (tile) tiles.set(key, tile);
@@ -6149,7 +6255,7 @@ var PaintStrokeSession = (_class12 = class {
6149
6255
  writeTile: (tx, ty) => {
6150
6256
  const key = _chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty);
6151
6257
  if (!this.touched.has(key)) {
6152
- this.work.set(key, _nullishCoalesce(_optionalChain([read, 'call', _111 => _111(key), 'optionalAccess', _112 => _112.slice, 'call', _113 => _113()]), () => ( new Float32Array(_chunkCWM3CUUXcjs.TILE * _chunkCWM3CUUXcjs.TILE * 4))));
6258
+ this.work.set(key, _nullishCoalesce(_optionalChain([read, 'call', _113 => _113(key), 'optionalAccess', _114 => _114.slice, 'call', _115 => _115()]), () => ( new Float32Array(_chunkCWM3CUUXcjs.TILE * _chunkCWM3CUUXcjs.TILE * 4))));
6153
6259
  this.touched.add(key);
6154
6260
  }
6155
6261
  this.fresh.add(key);
@@ -6161,11 +6267,11 @@ var PaintStrokeSession = (_class12 = class {
6161
6267
  offset: a.offset,
6162
6268
  lockTransparency: a.lockTransparency,
6163
6269
  selection: a.selection,
6164
- readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access', _114 => _114.live, 'access', _115 => _115.get, 'call', _116 => _116(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _117 => _117.data]), () => ( (this.base.defaultValue ? defaultTile(this.base) : null))),
6270
+ readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access', _116 => _116.live, 'access', _117 => _117.get, 'call', _118 => _118(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _119 => _119.data]), () => ( (this.base.defaultValue ? defaultTile(this.base) : null))),
6165
6271
  writeTile: (tx, ty) => {
6166
6272
  const key = _chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty);
6167
6273
  if (!this.touched.has(key)) {
6168
- const src = _nullishCoalesce(_optionalChain([this, 'access', _118 => _118.base, 'access', _119 => _119.tiles, 'access', _120 => _120.get, 'call', _121 => _121(key), 'optionalAccess', _122 => _122.data]), () => ( defaultTile(this.base)));
6274
+ const src = _nullishCoalesce(_optionalChain([this, 'access', _120 => _120.base, 'access', _121 => _121.tiles, 'access', _122 => _122.get, 'call', _123 => _123(key), 'optionalAccess', _124 => _124.data]), () => ( defaultTile(this.base)));
6169
6275
  this.live.set(key, { data: new Uint8ClampedArray(src), uniform: null });
6170
6276
  this.touched.add(key);
6171
6277
  }
@@ -6182,11 +6288,11 @@ var PaintStrokeSession = (_class12 = class {
6182
6288
  if (this.closed || !points.length) return;
6183
6289
  if (!this.started) {
6184
6290
  this.started = true;
6185
- if (_optionalChain([this, 'access', _123 => _123.retouch, 'optionalAccess', _124 => _124.kind]) === "coverage") this.retouch.start(points[0]);
6291
+ if (_optionalChain([this, 'access', _125 => _125.retouch, 'optionalAccess', _126 => _126.kind]) === "coverage") this.retouch.start(points[0]);
6186
6292
  }
6187
6293
  this.last = points[points.length - 1];
6188
6294
  const rects = this.mixer ? this.mixer.push(points) : this.stroke.push(points);
6189
- _optionalChain([this, 'access', _125 => _125.flushView, 'optionalCall', _126 => _126()]);
6295
+ _optionalChain([this, 'access', _127 => _127.flushView, 'optionalCall', _128 => _128()]);
6190
6296
  this.update(rects);
6191
6297
  }
6192
6298
  update(rects) {
@@ -6216,7 +6322,7 @@ var PaintStrokeSession = (_class12 = class {
6216
6322
  for (const [key, { tx, ty, r }] of regions) {
6217
6323
  if (this.deep) {
6218
6324
  const rt = this.retouch;
6219
- const paint = _optionalChain([rt, 'optionalAccess', _127 => _127.kind]) === "coverage" ? rt.paint() : null;
6325
+ const paint = _optionalChain([rt, 'optionalAccess', _129 => _129.kind]) === "coverage" ? rt.paint() : null;
6220
6326
  if (paint && paint.kind !== "tone") {
6221
6327
  const prevWork = this.touched.has(key) ? this.work.get(key) : void 0;
6222
6328
  this.touched.add(key);
@@ -6227,13 +6333,13 @@ var PaintStrokeSession = (_class12 = class {
6227
6333
  const prev2 = this.touched.has(key) ? this.liveDeep.get(key) : void 0;
6228
6334
  this.touched.add(key);
6229
6335
  const opts = prev2 ? { into: prev2, region: r, channels: ch } : { channels: ch };
6230
- const d = _optionalChain([rt, 'optionalAccess', _128 => _128.kind]) === "coverage" && _optionalChain([paint, 'optionalAccess', _129 => _129.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);
6336
+ const d = _optionalChain([rt, 'optionalAccess', _130 => _130.kind]) === "coverage" && _optionalChain([paint, 'optionalAccess', _131 => _131.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);
6231
6337
  this.liveDeep.set(key, d);
6232
6338
  this.live.set(key, { data: _chunkCWM3CUUXcjs.proxyOf.call(void 0, d, ch), uniform: null, deep: d });
6233
6339
  continue;
6234
6340
  }
6235
- const src = _nullishCoalesce(_optionalChain([this, 'access', _130 => _130.base, 'access', _131 => _131.tiles, 'access', _132 => _132.get, 'call', _133 => _133(key), 'optionalAccess', _134 => _134.data]), () => ( defaultTile(this.base)));
6236
- const prev = this.touched.has(key) ? _optionalChain([this, 'access', _135 => _135.live, 'access', _136 => _136.get, 'call', _137 => _137(key), 'optionalAccess', _138 => _138.data]) : void 0;
6341
+ const src = _nullishCoalesce(_optionalChain([this, 'access', _132 => _132.base, 'access', _133 => _133.tiles, 'access', _134 => _134.get, 'call', _135 => _135(key), 'optionalAccess', _136 => _136.data]), () => ( defaultTile(this.base)));
6342
+ const prev = this.touched.has(key) ? _optionalChain([this, 'access', _137 => _137.live, 'access', _138 => _138.get, 'call', _139 => _139(key), 'optionalAccess', _140 => _140.data]) : void 0;
6237
6343
  this.touched.add(key);
6238
6344
  const data = this.compositeTile(src, tx, ty, prev ? { into: prev, region: r } : {});
6239
6345
  this.live.set(key, { data, uniform: null });
@@ -6245,12 +6351,12 @@ var PaintStrokeSession = (_class12 = class {
6245
6351
  if (this.closed) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("This stroke has already ended.");
6246
6352
  const last = _nullishCoalesce(this.last, () => ( void 0));
6247
6353
  const rects = this.mixer ? this.mixer.finish(last) : this.stroke.finish(last);
6248
- _optionalChain([this, 'access', _139 => _139.flushView, 'optionalCall', _140 => _140()]);
6354
+ _optionalChain([this, 'access', _141 => _141.flushView, 'optionalCall', _142 => _142()]);
6249
6355
  this.update(rects);
6250
6356
  this.closed = true;
6251
6357
  const ch = this.base.channels;
6252
6358
  const r = this.retouch;
6253
- if (_optionalChain([r, 'optionalAccess', _141 => _141.kind]) === "coverage" && r.finalPaint) {
6359
+ if (_optionalChain([r, 'optionalAccess', _143 => _143.kind]) === "coverage" && r.finalPaint) {
6254
6360
  const final = r.finalPaint(this.stroke.coverage);
6255
6361
  if (final) {
6256
6362
  for (const key of this.touched) {
@@ -6259,7 +6365,7 @@ var PaintStrokeSession = (_class12 = class {
6259
6365
  this.retouchDeepTile(key, tx, ty, final, {});
6260
6366
  continue;
6261
6367
  }
6262
- const src = _nullishCoalesce(_optionalChain([this, 'access', _142 => _142.base, 'access', _143 => _143.tiles, 'access', _144 => _144.get, 'call', _145 => _145(key), 'optionalAccess', _146 => _146.data]), () => ( defaultTile(this.base)));
6368
+ const src = _nullishCoalesce(_optionalChain([this, 'access', _144 => _144.base, 'access', _145 => _145.tiles, 'access', _146 => _146.get, 'call', _147 => _147(key), 'optionalAccess', _148 => _148.data]), () => ( defaultTile(this.base)));
6263
6369
  this.live.set(key, { data: this.compositeTile(src, tx, ty, {}, final), uniform: null });
6264
6370
  }
6265
6371
  }
@@ -6281,7 +6387,7 @@ var PaintStrokeSession = (_class12 = class {
6281
6387
  const b = this.mixer ? this.mixer.bounds : this.stroke.coverage.bounds;
6282
6388
  const result = { layerId: this.target.id, channel: this.target.channel, bounds: changed ? b : null, dabs: (_nullishCoalesce(this.mixer, () => ( this.stroke))).dabCount };
6283
6389
  if (mixerLoad) result.mixerLoad = mixerLoad;
6284
- if (_optionalChain([r, 'optionalAccess', _147 => _147.result])) Object.assign(result, r.result());
6390
+ if (_optionalChain([r, 'optionalAccess', _149 => _149.result])) Object.assign(result, r.result());
6285
6391
  return result;
6286
6392
  }
6287
6393
  /** Abandons the stroke and restores the layer. */
@@ -6407,14 +6513,14 @@ function migrateSerializedImageEditorState(data) {
6407
6513
  const legacy = data;
6408
6514
  const adjustments = normalizeStoredAdjustments(legacy.adjustments);
6409
6515
  return {
6410
- version: _optionalChain([adjustments, 'access', _148 => _148.layers, 'optionalAccess', _149 => _149.length]) ? 2 : 1,
6516
+ version: _optionalChain([adjustments, 'access', _150 => _150.layers, 'optionalAccess', _151 => _151.length]) ? 2 : 1,
6411
6517
  crop: legacy.crop ? { ...legacy.crop } : null,
6412
6518
  transform: { ...DEFAULT_TRANSFORM, ...legacy.transform },
6413
6519
  adjustments: serializeAdjustments(adjustments),
6414
6520
  depthMask: {
6415
6521
  ...DEFAULT_DEPTH_MASK,
6416
6522
  ...legacy.depthMask,
6417
- depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _150 => _150.depthMask, 'optionalAccess', _151 => _151.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
6523
+ depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _152 => _152.depthMask, 'optionalAccess', _153 => _153.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
6418
6524
  },
6419
6525
  annotations: JSON.parse(JSON.stringify(_nullishCoalesce(legacy.annotations, () => ( [])))),
6420
6526
  ...legacy.selection ? { selection: { ...legacy.selection } } : {}
@@ -6490,7 +6596,7 @@ var ImageEditorController = (_class13 = class {
6490
6596
  sourceIsOpaque: () => this.sourceIsOpaque(),
6491
6597
  version: () => `${this.sourceVersion()}:${this.patternsVersion()}`,
6492
6598
  globalLight: () => this.state.globalLight,
6493
- pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _152 => _152.state, 'access', _153 => _153.patterns, 'optionalAccess', _154 => _154.find, 'call', _155 => _155((p) => p.id === id)]), () => ( null))
6599
+ pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _154 => _154.state, 'access', _155 => _155.patterns, 'optionalAccess', _156 => _156.find, 'call', _157 => _157((p) => p.id === id)]), () => ( null))
6494
6600
  };
6495
6601
  this.state = {
6496
6602
  sourceUrl: typeof options.image === "string" ? options.image : null,
@@ -6523,13 +6629,13 @@ var ImageEditorController = (_class13 = class {
6523
6629
  };
6524
6630
  }
6525
6631
  this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
6526
- if (_optionalChain([options, 'access', _156 => _156.initialState, 'optionalAccess', _157 => _157.selection])) {
6632
+ if (_optionalChain([options, 'access', _158 => _158.initialState, 'optionalAccess', _159 => _159.selection])) {
6527
6633
  try {
6528
6634
  this.state.selection = normalizeSelection(_chunkUYXL6ZWQcjs.deserializeSelection.call(void 0, options.initialState.selection));
6529
6635
  } catch (e20) {
6530
6636
  }
6531
6637
  }
6532
- if (_optionalChain([options, 'access', _158 => _158.initialState, 'optionalAccess', _159 => _159.channels])) {
6638
+ if (_optionalChain([options, 'access', _160 => _160.initialState, 'optionalAccess', _161 => _161.channels])) {
6533
6639
  const channels = deserializeChannels(options.initialState.channels, this.naturalSize, this.lastLoadProblems);
6534
6640
  if (channels.length) this.state.channels = channels;
6535
6641
  }
@@ -6613,7 +6719,7 @@ var ImageEditorController = (_class13 = class {
6613
6719
  this.syncViews();
6614
6720
  this.syncDisplay();
6615
6721
  const currentState = { ...this.state };
6616
- _optionalChain([this, 'access', _160 => _160.onStateChange, 'optionalCall', _161 => _161(currentState)]);
6722
+ _optionalChain([this, 'access', _162 => _162.onStateChange, 'optionalCall', _163 => _163(currentState)]);
6617
6723
  this.listeners.forEach((l) => l(currentState));
6618
6724
  if (this.effects.provider) this.queueEffectRefresh("incomplete");
6619
6725
  }
@@ -6642,7 +6748,7 @@ var ImageEditorController = (_class13 = class {
6642
6748
  if (l.type === "group") {
6643
6749
  const children = walk(l.children);
6644
6750
  if (children !== l.children) next2 = { ...l, children };
6645
- } else if (l.type === "smart" && _optionalChain([l, 'access', _162 => _162.smartFilters, 'optionalAccess', _163 => _163.filters, 'access', _164 => _164.some, 'call', _165 => _165((f) => f.kind === "effect")]) && (all || _chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
6751
+ } else if (l.type === "smart" && _optionalChain([l, 'access', _164 => _164.smartFilters, 'optionalAccess', _165 => _165.filters, 'access', _166 => _166.some, 'call', _167 => _167((f) => f.kind === "effect")]) && (all || _chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
6646
6752
  try {
6647
6753
  const r = _chunkUYXL6ZWQcjs.rerender.call(void 0, l, canvas);
6648
6754
  if (all || !_chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
@@ -6738,8 +6844,8 @@ var ImageEditorController = (_class13 = class {
6738
6844
  */
6739
6845
  async updateEffectFilter(layerId, filterId, changes, commitToHistory = true) {
6740
6846
  const layer = _chunkUYXL6ZWQcjs.requireSmartObject.call(void 0, this.state.layers, layerId);
6741
- const was = _optionalChain([layer, 'access', _166 => _166.smartFilters, 'optionalAccess', _167 => _167.filters, 'access', _168 => _168.find, 'call', _169 => _169((f) => f.id === filterId)]);
6742
- 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', _170 => _170.smartFilters, 'optionalAccess', _171 => _171.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
6847
+ const was = _optionalChain([layer, 'access', _168 => _168.smartFilters, 'optionalAccess', _169 => _169.filters, 'access', _170 => _170.find, 'call', _171 => _171((f) => f.id === filterId)]);
6848
+ 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', _172 => _172.smartFilters, 'optionalAccess', _173 => _173.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
6743
6849
  const update = {};
6744
6850
  if (changes.values) {
6745
6851
  const d = await this.describeEffect(was.effect);
@@ -6781,7 +6887,7 @@ var ImageEditorController = (_class13 = class {
6781
6887
  const layer = {
6782
6888
  type: "pixel",
6783
6889
  id,
6784
- name: _optionalChain([options, 'access', _172 => _172.name, 'optionalAccess', _173 => _173.trim, 'call', _174 => _174()]) || d.name,
6890
+ name: _optionalChain([options, 'access', _174 => _174.name, 'optionalAccess', _175 => _175.trim, 'call', _176 => _176()]) || d.name,
6785
6891
  visible: true,
6786
6892
  opacity: _nullishCoalesce(options.opacity, () => ( 1)),
6787
6893
  blend: _nullishCoalesce(blend, () => ( "normal")),
@@ -6806,7 +6912,7 @@ var ImageEditorController = (_class13 = class {
6806
6912
  */
6807
6913
  async updateEffectLayer(layerId, changes, commitToHistory = true) {
6808
6914
  const found = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, layerId);
6809
- const layer = _optionalChain([found, 'optionalAccess', _175 => _175.layer]);
6915
+ const layer = _optionalChain([found, 'optionalAccess', _177 => _177.layer]);
6810
6916
  if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
6811
6917
  _chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
6812
6918
  const g = layer.generator;
@@ -6835,7 +6941,7 @@ var ImageEditorController = (_class13 = class {
6835
6941
  * and how long it runs, the longest of theirs (ms). Null when none animates.
6836
6942
  */
6837
6943
  getAnimation() {
6838
- const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access', _176 => _176.generator, 'optionalAccess', _177 => _177.animate]));
6944
+ const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access', _178 => _178.generator, 'optionalAccess', _179 => _179.animate]));
6839
6945
  if (!layers.length) return null;
6840
6946
  return { duration: Math.max(...layers.map((l) => l.generator.animate.duration)), layerIds: layers.map((l) => l.id) };
6841
6947
  }
@@ -6852,7 +6958,7 @@ var ImageEditorController = (_class13 = class {
6852
6958
  const { width, height } = this.naturalSize;
6853
6959
  const surfaces = /* @__PURE__ */ new Map();
6854
6960
  for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers)) {
6855
- if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access', _178 => _178.generator, 'optionalAccess', _179 => _179.animate])) continue;
6961
+ if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access', _180 => _180.generator, 'optionalAccess', _181 => _181.animate])) continue;
6856
6962
  const g = l.generator;
6857
6963
  const pixels = await this.effectsEngine.renderLayer(g.effect, g.values, { width, height, depth: this.bitDepth, time: (_nullishCoalesce(g.time, () => ( 0))) + time });
6858
6964
  surfaces.set(l.id, effectPixelsToSurface(pixels, this.bitDepth));
@@ -6913,7 +7019,7 @@ var ImageEditorController = (_class13 = class {
6913
7019
  transform: { ...s.transform },
6914
7020
  outputOpacity: s.outputOpacity,
6915
7021
  selection: _nullishCoalesce(s.selection, () => ( null)),
6916
- ..._optionalChain([s, 'access', _180 => _180.channels, 'optionalAccess', _181 => _181.length]) ? { channels: s.channels } : {},
7022
+ ..._optionalChain([s, 'access', _182 => _182.channels, 'optionalAccess', _183 => _183.length]) ? { channels: s.channels } : {},
6917
7023
  source: {
6918
7024
  sourceUrl: s.sourceUrl,
6919
7025
  element: this.imageElement,
@@ -6949,7 +7055,7 @@ var ImageEditorController = (_class13 = class {
6949
7055
  if (entry.colorMode) s.colorMode = entry.colorMode;
6950
7056
  else delete s.colorMode;
6951
7057
  s.selection = entry.selection;
6952
- if (_optionalChain([entry, 'access', _182 => _182.channels, 'optionalAccess', _183 => _183.length])) s.channels = entry.channels;
7058
+ if (_optionalChain([entry, 'access', _184 => _184.channels, 'optionalAccess', _185 => _185.length])) s.channels = entry.channels;
6953
7059
  else delete s.channels;
6954
7060
  if (this.imageElement !== entry.source.element && !this.samplePixelsOverride) this.samplePixels = null;
6955
7061
  this.imageElement = entry.source.element;
@@ -7156,7 +7262,7 @@ var ImageEditorController = (_class13 = class {
7156
7262
  return this.state.layers;
7157
7263
  }
7158
7264
  getLayer(id) {
7159
- return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _184 => _184.layer]);
7265
+ return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _186 => _186.layer]);
7160
7266
  }
7161
7267
  /** The active layer, or `undefined`. */
7162
7268
  getActiveLayer() {
@@ -7169,7 +7275,7 @@ var ImageEditorController = (_class13 = class {
7169
7275
  setActiveLayer(id, target = "pixels") {
7170
7276
  if (id !== null && !this.getLayer(id)) return false;
7171
7277
  const layer = id ? this.getLayer(id) : void 0;
7172
- const t = target === "mask" && _optionalChain([layer, 'optionalAccess', _185 => _185.mask]) ? "mask" : target === "filter-mask" && _optionalChain([layer, 'optionalAccess', _186 => _186.type]) === "smart" && _optionalChain([layer, 'access', _187 => _187.smartFilters, 'optionalAccess', _188 => _188.mask]) ? "filter-mask" : "pixels";
7278
+ const t = target === "mask" && _optionalChain([layer, 'optionalAccess', _187 => _187.mask]) ? "mask" : target === "filter-mask" && _optionalChain([layer, 'optionalAccess', _188 => _188.type]) === "smart" && _optionalChain([layer, 'access', _189 => _189.smartFilters, 'optionalAccess', _190 => _190.mask]) ? "filter-mask" : "pixels";
7173
7279
  if (this.state.activeLayerId === id && this.state.activeTarget === t) return true;
7174
7280
  this.state.activeLayerId = id;
7175
7281
  this.state.activeTarget = t;
@@ -7331,7 +7437,7 @@ var ImageEditorController = (_class13 = class {
7331
7437
  surfaceOf: (l) => this.surfaceOf(l),
7332
7438
  version: `${this.sourceVersion()}:${this.patternsVersion()}`,
7333
7439
  globalLight: this.state.globalLight,
7334
- pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _189 => _189.state, 'access', _190 => _190.patterns, 'optionalAccess', _191 => _191.find, 'call', _192 => _192((p) => p.id === id)]), () => ( null))
7440
+ pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _191 => _191.state, 'access', _192 => _192.patterns, 'optionalAccess', _193 => _193.find, 'call', _194 => _194((p) => p.id === id)]), () => ( null))
7335
7441
  };
7336
7442
  }
7337
7443
  __init95() {this.sourceIds = /* @__PURE__ */ new WeakMap()}
@@ -7408,7 +7514,7 @@ var ImageEditorController = (_class13 = class {
7408
7514
  if (!ctx || typeof ctx.getImageData !== "function") return null;
7409
7515
  ctx.drawImage(el, 0, 0, width, height);
7410
7516
  const data = ctx.getImageData(0, 0, width, height);
7411
- if (!_optionalChain([data, 'optionalAccess', _193 => _193.data]) || data.data.length < width * height * 4) return null;
7517
+ if (!_optionalChain([data, 'optionalAccess', _195 => _195.data]) || data.data.length < width * height * 4) return null;
7412
7518
  return { width, height, data: data.data };
7413
7519
  } catch (e24) {
7414
7520
  return null;
@@ -7421,7 +7527,7 @@ var ImageEditorController = (_class13 = class {
7421
7527
  const prev = this.state.layers;
7422
7528
  const depth = this.bitDepth;
7423
7529
  this.state.layers = next;
7424
- _optionalChain([extra, 'optionalCall', _194 => _194()]);
7530
+ _optionalChain([extra, 'optionalCall', _196 => _196()]);
7425
7531
  if (depth !== 8 && this.bitDepth === depth) this.state.layers = keepDeepLayers(prev, this.state.layers);
7426
7532
  if (this.state.activeLayerId && !_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, this.state.activeLayerId)) {
7427
7533
  this.state.activeLayerId = _chunkUYXL6ZWQcjs.activeLayerAfterRemoval.call(void 0, prev, this.state.layers, this.state.activeLayerId);
@@ -7459,7 +7565,7 @@ var ImageEditorController = (_class13 = class {
7459
7565
  const layer = {
7460
7566
  type: "pixel",
7461
7567
  id: init.id && !ids.has(init.id) ? init.id : _chunkUYXL6ZWQcjs.newLayerId.call(void 0, ),
7462
- name: _optionalChain([init, 'access', _195 => _195.name, 'optionalAccess', _196 => _196.trim, 'call', _197 => _197()]) || this.nextLayerName(),
7568
+ name: _optionalChain([init, 'access', _197 => _197.name, 'optionalAccess', _198 => _198.trim, 'call', _199 => _199()]) || this.nextLayerName(),
7463
7569
  visible: _nullishCoalesce(init.visible, () => ( true)),
7464
7570
  opacity: _nullishCoalesce(init.opacity, () => ( 1)),
7465
7571
  blend: _nullishCoalesce(blend, () => ( "normal")),
@@ -7486,7 +7592,7 @@ var ImageEditorController = (_class13 = class {
7486
7592
  async decodeImage(image) {
7487
7593
  const trimmed = image.trim();
7488
7594
  let png = null;
7489
- if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _198 => _198.bytes]), () => ( null));
7595
+ if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _200 => _200.bytes]), () => ( null));
7490
7596
  else if (/^[A-Za-z0-9+/=\s]+$/.test(trimmed) && trimmed.length > 16) {
7491
7597
  try {
7492
7598
  const bytes = _chunkCWM3CUUXcjs.base64ToBytes.call(void 0, trimmed);
@@ -7535,7 +7641,7 @@ var ImageEditorController = (_class13 = class {
7535
7641
  removeLayer(id) {
7536
7642
  const next = _chunkUYXL6ZWQcjs.removeLayer.call(void 0, this.state.layers, id);
7537
7643
  this.commitLayers(next, () => {
7538
- if (this.state.selectedAnnotationId && !_chunkHGTDMKNEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkUYXL6ZWQcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _199 => _199.id]) === this.state.selectedAnnotationId)) {
7644
+ if (this.state.selectedAnnotationId && !_chunkHGTDMKNEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkUYXL6ZWQcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _201 => _201.id]) === this.state.selectedAnnotationId)) {
7539
7645
  this.state.selectedAnnotationId = null;
7540
7646
  }
7541
7647
  });
@@ -7544,9 +7650,9 @@ var ImageEditorController = (_class13 = class {
7544
7650
  moveLayer(id, placement) {
7545
7651
  const next = _chunkUYXL6ZWQcjs.moveLayer.call(void 0, this.state.layers, id, placement);
7546
7652
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, next, id);
7547
- if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _200 => _200.parent, 'optionalAccess', _201 => _201.id]), () => ( null)), index: loc.index };
7653
+ if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _202 => _202.parent, 'optionalAccess', _203 => _203.id]), () => ( null)), index: loc.index };
7548
7654
  this.commitLayers(next);
7549
- return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _202 => _202.parent, 'optionalAccess', _203 => _203.id]), () => ( null)), index: loc.index };
7655
+ return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _204 => _204.parent, 'optionalAccess', _205 => _205.id]), () => ( null)), index: loc.index };
7550
7656
  }
7551
7657
  /**
7552
7658
  * Changes name, visibility, opacity, fill, blend, clipping, locks or (groups) collapsed state, as
@@ -7563,7 +7669,7 @@ var ImageEditorController = (_class13 = class {
7563
7669
  const group = {
7564
7670
  type: "group",
7565
7671
  id: _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "group"),
7566
- name: _optionalChain([init, 'access', _204 => _204.name, 'optionalAccess', _205 => _205.trim, 'call', _206 => _206()]) || "Group",
7672
+ name: _optionalChain([init, 'access', _206 => _206.name, 'optionalAccess', _207 => _207.trim, 'call', _208 => _208()]) || "Group",
7567
7673
  visible: true,
7568
7674
  opacity: 1,
7569
7675
  blend,
@@ -7656,7 +7762,7 @@ var ImageEditorController = (_class13 = class {
7656
7762
  sel = this.layerTransparency(id);
7657
7763
  } else {
7658
7764
  const current = this.state.selection;
7659
- if (!_optionalChain([current, 'optionalAccess', _207 => _207.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all / transparency.");
7765
+ if (!_optionalChain([current, 'optionalAccess', _209 => _209.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all / transparency.");
7660
7766
  sel = from === "hide-selection" ? _chunkUYXL6ZWQcjs.invertSelection.call(void 0, current) : current;
7661
7767
  }
7662
7768
  mask = this.maskFromSelection(sel, props);
@@ -7687,7 +7793,7 @@ var ImageEditorController = (_class13 = class {
7687
7793
  const layer = _chunkUYXL6ZWQcjs.requireLayer.call(void 0, this.state.layers, id).layer;
7688
7794
  const name = layer.name || id;
7689
7795
  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.`);
7690
- if (_optionalChain([layer, 'access', _208 => _208.mask, 'optionalAccess', _209 => _209.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.`);
7796
+ if (_optionalChain([layer, 'access', _210 => _210.mask, 'optionalAccess', _211 => _211.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.`);
7691
7797
  return layer;
7692
7798
  }
7693
7799
  requireVectorMask(id) {
@@ -7697,10 +7803,10 @@ var ImageEditorController = (_class13 = class {
7697
7803
  }
7698
7804
  /** Components from a path spec: `components`, or one `shape` / `subpaths`. */
7699
7805
  vectorMaskComponents(path) {
7700
- if (_optionalChain([path, 'access', _210 => _210.components, 'optionalAccess', _211 => _211.length]) && (path.shape !== void 0 || path.subpaths !== void 0)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
7806
+ if (_optionalChain([path, 'access', _212 => _212.components, 'optionalAccess', _213 => _213.length]) && (path.shape !== void 0 || path.subpaths !== void 0)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
7701
7807
  if (path.fillRule !== void 0 && path.fillRule !== "nonzero" && path.fillRule !== "evenodd") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7702
- const specs = _optionalChain([path, 'access', _212 => _212.components, 'optionalAccess', _213 => _213.length]) ? path.components : [path];
7703
- return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access', _214 => _214.components, 'optionalAccess', _215 => _215.length]) ? `components[${i}].` : ""));
7808
+ const specs = _optionalChain([path, 'access', _214 => _214.components, 'optionalAccess', _215 => _215.length]) ? path.components : [path];
7809
+ return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access', _216 => _216.components, 'optionalAccess', _217 => _217.length]) ? `components[${i}].` : ""));
7704
7810
  }
7705
7811
  /**
7706
7812
  * Layer › Vector Mask: `reveal-all` (an empty path showing everything), `hide-all` (an empty path
@@ -7717,7 +7823,7 @@ var ImageEditorController = (_class13 = class {
7717
7823
  vm = { components: this.vectorMaskComponents(path) };
7718
7824
  if (path.fillRule === "evenodd") vm.fillRule = "evenodd";
7719
7825
  } else if (from === "reveal-all" || from === "hide-all") {
7720
- if (_optionalChain([path, 'access', _216 => _216.components, 'optionalAccess', _217 => _217.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.`);
7826
+ if (_optionalChain([path, 'access', _218 => _218.components, 'optionalAccess', _219 => _219.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.`);
7721
7827
  vm = { components: [], ...from === "reveal-all" ? { inverted: true } : {} };
7722
7828
  } else {
7723
7829
  throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Unknown vector mask source "${String(from)}". Use reveal-all, hide-all, path or selection.`);
@@ -7728,7 +7834,7 @@ var ImageEditorController = (_class13 = class {
7728
7834
  /** The selection's outline as subpaths; throws when nothing is selected or nothing is left to trace. */
7729
7835
  traceSelection(options) {
7730
7836
  const sel = this.state.selection;
7731
- if (!_optionalChain([sel, 'optionalAccess', _218 => _218.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then make a path from the selection.");
7837
+ if (!_optionalChain([sel, 'optionalAccess', _220 => _220.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then make a path from the selection.");
7732
7838
  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.");
7733
7839
  const subpaths = selectionToSubpaths(sel, options);
7734
7840
  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.");
@@ -7909,7 +8015,7 @@ var ImageEditorController = (_class13 = class {
7909
8015
  const layer = loc.layer;
7910
8016
  if (layer.type !== "pixel") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
7911
8017
  const sel = this.state.selection;
7912
- if (!_optionalChain([sel, 'optionalAccess', _219 => _219.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
8018
+ if (!_optionalChain([sel, 'optionalAccess', _221 => _221.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
7913
8019
  if (options.cut) _chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
7914
8020
  const surface = this.surfaceOf(layer);
7915
8021
  const sb = sel.bounds;
@@ -7927,14 +8033,14 @@ var ImageEditorController = (_class13 = class {
7927
8033
  const copy = {
7928
8034
  type: "pixel",
7929
8035
  id: _chunkUYXL6ZWQcjs.newLayerId.call(void 0, ),
7930
- name: _optionalChain([options, 'access', _220 => _220.name, 'optionalAccess', _221 => _221.trim, 'call', _222 => _222()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
8036
+ name: _optionalChain([options, 'access', _222 => _222.name, 'optionalAccess', _223 => _223.trim, 'call', _224 => _224()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
7931
8037
  visible: true,
7932
8038
  opacity: 1,
7933
8039
  blend: "normal",
7934
8040
  surface: _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width: src.width, height: src.height, data: px2 }, 4, src.x, src.y),
7935
8041
  offset: { ...layer.offset }
7936
8042
  };
7937
- let next = _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _223 => _223.parent, 'optionalAccess', _224 => _224.id]), () => ( null)), loc.index + 1);
8043
+ let next = _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _225 => _225.parent, 'optionalAccess', _226 => _226.id]), () => ( null)), loc.index + 1);
7938
8044
  if (kept) {
7939
8045
  const cutLayer = { ...layer, surface: _chunkCWM3CUUXcjs.writeRegion.call(void 0, surface, src, kept) };
7940
8046
  delete cutLayer.source;
@@ -7958,7 +8064,7 @@ var ImageEditorController = (_class13 = class {
7958
8064
  layers: () => this.state.layers,
7959
8065
  activeLayerId: () => this.state.activeLayerId,
7960
8066
  activeTarget: () => this.state.activeTarget,
7961
- selection: () => _optionalChain([this, 'access', _225 => _225.state, 'access', _226 => _226.selection, 'optionalAccess', _227 => _227.bounds]) ? this.state.selection : null,
8067
+ selection: () => _optionalChain([this, 'access', _227 => _227.state, 'access', _228 => _228.selection, 'optionalAccess', _229 => _229.bounds]) ? this.state.selection : null,
7962
8068
  canvas: () => this.naturalSize,
7963
8069
  pixelsOf: (layer) => this.surfaceOf(layer),
7964
8070
  shapeEnv: () => this.shapeEnv(),
@@ -8106,7 +8212,7 @@ var ImageEditorController = (_class13 = class {
8106
8212
  * anything else nests as a layer document. Returns the smart object's id.
8107
8213
  */
8108
8214
  convertToSmartObject(ids, options = {}) {
8109
- const list = _optionalChain([ids, 'optionalAccess', _228 => _228.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
8215
+ const list = _optionalChain([ids, 'optionalAccess', _230 => _230.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
8110
8216
  if (!list.length) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
8111
8217
  const res = _chunkUYXL6ZWQcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
8112
8218
  this.commitLayers(res.layers, () => {
@@ -8139,8 +8245,8 @@ var ImageEditorController = (_class13 = class {
8139
8245
  width: c.width,
8140
8246
  height: c.height,
8141
8247
  decoded: _chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, c),
8142
- fileType: _nullishCoalesce(_optionalChain([c, 'access', _229 => _229.file, 'optionalAccess', _230 => _230.type]), () => ( null)),
8143
- linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _231 => _231.linked, 'optionalAccess', _232 => _232.path]), () => ( null)),
8248
+ fileType: _nullishCoalesce(_optionalChain([c, 'access', _231 => _231.file, 'optionalAccess', _232 => _232.type]), () => ( null)),
8249
+ linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _233 => _233.linked, 'optionalAccess', _234 => _234.path]), () => ( null)),
8144
8250
  instances: _chunkUYXL6ZWQcjs.instancesOf.call(void 0, this.state.layers, c.id),
8145
8251
  layerCount: c.document ? _chunkHGTDMKNEcjs.flattenLayers.call(void 0, c.document.layers).length : 0
8146
8252
  },
@@ -8157,9 +8263,9 @@ var ImageEditorController = (_class13 = class {
8157
8263
  bounds: _chunkUYXL6ZWQcjs.transformedBox.call(void 0, g)
8158
8264
  },
8159
8265
  smartFilters: {
8160
- enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _233 => _233.enabled]), () => ( true)),
8161
- filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess', _234 => _234.filters]), () => ( []))).map((f) => f.kind === "psd" ? { id: f.id, kind: "psd", name: f.name, enabled: f.enabled, blend: f.blend, opacity: f.opacity } : { ...f }),
8162
- mask: _optionalChain([stack, 'optionalAccess', _235 => _235.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
8266
+ enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _235 => _235.enabled]), () => ( true)),
8267
+ filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess', _236 => _236.filters]), () => ( []))).map((f) => f.kind === "psd" ? { id: f.id, kind: "psd", name: f.name, enabled: f.enabled, blend: f.blend, opacity: f.opacity } : { ...f }),
8268
+ mask: _optionalChain([stack, 'optionalAccess', _237 => _237.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
8163
8269
  },
8164
8270
  bounds: this.getLayerBounds(id)
8165
8271
  };
@@ -8298,7 +8404,7 @@ var ImageEditorController = (_class13 = class {
8298
8404
  * it in the same undo step (Photoshop limits a filter to the selection). Returns whether it did.
8299
8405
  */
8300
8406
  maskFiltersWithSelection(id, useSelection) {
8301
- if (!useSelection || !_optionalChain([this, 'access', _236 => _236.state, 'access', _237 => _237.selection, 'optionalAccess', _238 => _238.bounds])) return false;
8407
+ if (!useSelection || !_optionalChain([this, 'access', _238 => _238.state, 'access', _239 => _239.selection, 'optionalAccess', _240 => _240.bounds])) return false;
8302
8408
  this.setSmartFilterMask(id, "selection", {}, false);
8303
8409
  return true;
8304
8410
  }
@@ -8312,19 +8418,19 @@ var ImageEditorController = (_class13 = class {
8312
8418
  removeSmartFilter(id, filterId) {
8313
8419
  const res = _chunkUYXL6ZWQcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
8314
8420
  this.commitLayers(res.layers);
8315
- return _nullishCoalesce(_optionalChain([res, 'access', _239 => _239.layer, 'access', _240 => _240.smartFilters, 'optionalAccess', _241 => _241.filters]), () => ( []));
8421
+ return _nullishCoalesce(_optionalChain([res, 'access', _241 => _241.layer, 'access', _242 => _242.smartFilters, 'optionalAccess', _243 => _243.filters]), () => ( []));
8316
8422
  }
8317
8423
  /** Moves one smart filter to `index` (0 = bottom, applied first), as one undo step. Returns the filters. */
8318
8424
  moveSmartFilter(id, filterId, index) {
8319
8425
  const res = _chunkUYXL6ZWQcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
8320
8426
  this.commitLayers(res.layers);
8321
- return _nullishCoalesce(_optionalChain([res, 'access', _242 => _242.layer, 'access', _243 => _243.smartFilters, 'optionalAccess', _244 => _244.filters]), () => ( []));
8427
+ return _nullishCoalesce(_optionalChain([res, 'access', _244 => _244.layer, 'access', _245 => _245.smartFilters, 'optionalAccess', _246 => _246.filters]), () => ( []));
8322
8428
  }
8323
8429
  /** Turns a smart object's whole filter stack on or off (one undo step). */
8324
8430
  setSmartFiltersEnabled(id, enabled) {
8325
8431
  const res = _chunkUYXL6ZWQcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
8326
8432
  this.commitLayers(res.layers);
8327
- return _nullishCoalesce(_optionalChain([res, 'access', _245 => _245.layer, 'access', _246 => _246.smartFilters, 'optionalAccess', _247 => _247.enabled]), () => ( true));
8433
+ return _nullishCoalesce(_optionalChain([res, 'access', _247 => _247.layer, 'access', _248 => _248.smartFilters, 'optionalAccess', _249 => _249.enabled]), () => ( true));
8328
8434
  }
8329
8435
  /**
8330
8436
  * Sets the smart filter mask (one undo step): `reveal-all`, `hide-all`, `selection` (the
@@ -8336,11 +8442,11 @@ var ImageEditorController = (_class13 = class {
8336
8442
  let mask;
8337
8443
  if (from === "none") mask = null;
8338
8444
  else if (from === "keep") {
8339
- if (!_optionalChain([layer, 'access', _248 => _248.smartFilters, 'optionalAccess', _249 => _249.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.`);
8445
+ if (!_optionalChain([layer, 'access', _250 => _250.smartFilters, 'optionalAccess', _251 => _251.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.`);
8340
8446
  mask = withMaskProps(layer.smartFilters.mask, props);
8341
8447
  } else if (from === "selection") {
8342
8448
  const sel = this.state.selection;
8343
- if (!_optionalChain([sel, 'optionalAccess', _250 => _250.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
8449
+ if (!_optionalChain([sel, 'optionalAccess', _252 => _252.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
8344
8450
  mask = this.maskFromSelection(sel, props);
8345
8451
  } else {
8346
8452
  const v = from === "reveal-all" ? 255 : 0;
@@ -8352,7 +8458,7 @@ var ImageEditorController = (_class13 = class {
8352
8458
  if (mask && from !== "keep") this.state.activeTarget = "filter-mask";
8353
8459
  else if (!mask && this.state.activeTarget === "filter-mask") this.state.activeTarget = "pixels";
8354
8460
  }, commitToHistory);
8355
- return _nullishCoalesce(_optionalChain([res, 'access', _251 => _251.layer, 'access', _252 => _252.smartFilters, 'optionalAccess', _253 => _253.mask]), () => ( null));
8461
+ return _nullishCoalesce(_optionalChain([res, 'access', _253 => _253.layer, 'access', _254 => _254.smartFilters, 'optionalAccess', _255 => _255.mask]), () => ( null));
8356
8462
  }
8357
8463
  /**
8358
8464
  * Decodes smart object contents that came as files the synchronous decoders cannot read (a JPEG
@@ -8400,7 +8506,7 @@ var ImageEditorController = (_class13 = class {
8400
8506
  if (this.getFreeTransform()) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
8401
8507
  const layer = _chunkUYXL6ZWQcjs.requireSmartObject.call(void 0, this.state.layers, id);
8402
8508
  const c = layer.contents;
8403
- if (!_chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _254 => _254.file, 'optionalAccess', _255 => _255.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
8509
+ if (!_chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _256 => _256.file, 'optionalAccess', _257 => _257.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
8404
8510
  const saved = {
8405
8511
  state: { ...this.state },
8406
8512
  undo: this.undoStack,
@@ -8431,9 +8537,9 @@ var ImageEditorController = (_class13 = class {
8431
8537
  editingContents: this.getEditingContents()
8432
8538
  };
8433
8539
  delete this.state.legacyOutputBlur;
8434
- if (_optionalChain([c, 'access', _256 => _256.document, 'optionalAccess', _257 => _257.globalLight])) this.state.globalLight = c.document.globalLight;
8540
+ if (_optionalChain([c, 'access', _258 => _258.document, 'optionalAccess', _259 => _259.globalLight])) this.state.globalLight = c.document.globalLight;
8435
8541
  else delete this.state.globalLight;
8436
- if (_optionalChain([c, 'access', _258 => _258.document, 'optionalAccess', _259 => _259.patterns, 'optionalAccess', _260 => _260.length])) this.state.patterns = c.document.patterns;
8542
+ if (_optionalChain([c, 'access', _260 => _260.document, 'optionalAccess', _261 => _261.patterns, 'optionalAccess', _262 => _262.length])) this.state.patterns = c.document.patterns;
8437
8543
  else delete this.state.patterns;
8438
8544
  this.imageElement = null;
8439
8545
  this.samplePixels = null;
@@ -8453,23 +8559,23 @@ var ImageEditorController = (_class13 = class {
8453
8559
  closeSmartObjectContents(save = true) {
8454
8560
  const top = this.contentsStack.pop();
8455
8561
  if (!top) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
8456
- if (_optionalChain([this, 'access', _261 => _261.openTransform, 'optionalAccess', _262 => _262.isOpen])) this.openTransform.cancel();
8562
+ if (_optionalChain([this, 'access', _263 => _263.openTransform, 'optionalAccess', _264 => _264.isOpen])) this.openTransform.cancel();
8457
8563
  this.openTransform = null;
8458
8564
  const edited = this.state;
8459
8565
  const changed = save && this.undoStack.length > 0;
8460
8566
  let next = null;
8461
8567
  if (changed) {
8462
- const layer = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _263 => _263.layer]);
8463
- const old = _optionalChain([layer, 'optionalAccess', _264 => _264.contents]);
8568
+ const layer = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _265 => _265.layer]);
8569
+ const old = _optionalChain([layer, 'optionalAccess', _266 => _266.contents]);
8464
8570
  const { width, height } = edited.imageDimensions;
8465
8571
  const only = edited.layers.length === 1 ? edited.layers[0] : null;
8466
- const plain3 = _optionalChain([only, 'optionalAccess', _265 => _265.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _266 => _266.filters, 'optionalAccess', _267 => _267.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
8467
- if (_optionalChain([old, 'optionalAccess', _268 => _268.kind]) === "raster" && plain3) {
8572
+ const plain3 = _optionalChain([only, 'optionalAccess', _267 => _267.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _268 => _268.filters, 'optionalAccess', _269 => _269.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
8573
+ if (_optionalChain([old, 'optionalAccess', _270 => _270.kind]) === "raster" && plain3) {
8468
8574
  const px2 = _chunkCWM3CUUXcjs.readRegion.call(void 0, only.surface, { x: -only.offset.x, y: -only.offset.y, width, height });
8469
8575
  next = _chunkUYXL6ZWQcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
8470
8576
  } else {
8471
8577
  const doc = { layers: edited.layers, globalLight: edited.globalLight, patterns: edited.patterns };
8472
- next = _chunkUYXL6ZWQcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _269 => _269.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _270 => _270.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
8578
+ next = _chunkUYXL6ZWQcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _271 => _271.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _272 => _272.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
8473
8579
  }
8474
8580
  }
8475
8581
  const saved = top.saved;
@@ -8494,7 +8600,7 @@ var ImageEditorController = (_class13 = class {
8494
8600
  }
8495
8601
  /** The document's own layers (not the contents open for editing). */
8496
8602
  rootLayers() {
8497
- return _nullishCoalesce(_optionalChain([this, 'access', _271 => _271.contentsStack, 'access', _272 => _272[0], 'optionalAccess', _273 => _273.saved, 'access', _274 => _274.state, 'access', _275 => _275.layers]), () => ( this.state.layers));
8603
+ return _nullishCoalesce(_optionalChain([this, 'access', _273 => _273.contentsStack, 'access', _274 => _274[0], 'optionalAccess', _275 => _275.saved, 'access', _276 => _276.state, 'access', _277 => _277.layers]), () => ( this.state.layers));
8498
8604
  }
8499
8605
  /** Drops every open contents edit (loading another document). */
8500
8606
  abandonContents() {
@@ -8715,7 +8821,7 @@ var ImageEditorController = (_class13 = class {
8715
8821
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
8716
8822
  const key = `${tw}x${th}:${ox},${oy}`;
8717
8823
  let byKey = this.thumbCache.get(surface);
8718
- const hit = _optionalChain([byKey, 'optionalAccess', _276 => _276.get, 'call', _277 => _277(key)]);
8824
+ const hit = _optionalChain([byKey, 'optionalAccess', _278 => _278.get, 'call', _279 => _279(key)]);
8719
8825
  if (hit) return hit;
8720
8826
  const out = new Uint8ClampedArray(tw * th * 4);
8721
8827
  for (let y = 0; y < th; y++) {
@@ -8856,7 +8962,7 @@ var ImageEditorController = (_class13 = class {
8856
8962
  if (layer.mask.source) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which is generated, not painted.`);
8857
8963
  _chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "all", action);
8858
8964
  } else if (ch === "filter-mask") {
8859
- if (layer.type !== "smart" || !_optionalChain([layer, 'access', _278 => _278.smartFilters, 'optionalAccess', _279 => _279.mask])) {
8965
+ if (layer.type !== "smart" || !_optionalChain([layer, 'access', _280 => _280.smartFilters, 'optionalAccess', _281 => _281.mask])) {
8860
8966
  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}.`);
8861
8967
  }
8862
8968
  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.`);
@@ -8871,7 +8977,7 @@ var ImageEditorController = (_class13 = class {
8871
8977
  if (!layer.visible) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" is hidden; show it before you ${action}.`);
8872
8978
  const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
8873
8979
  const surface = ch === "mask" ? layer.mask.surface : ch === "filter-mask" ? layer.smartFilters.mask.surface : this.surfaceOf(layer);
8874
- const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _280 => _280.locks, 'optionalAccess', _281 => _281.transparency]));
8980
+ const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _282 => _282.locks, 'optionalAccess', _283 => _283.transparency]));
8875
8981
  return { id, layer, channel: ch, offset, surface, lockTransparency };
8876
8982
  }
8877
8983
  /** The layer with its pixels (or mask) replaced by `surface`. */
@@ -8915,13 +9021,13 @@ var ImageEditorController = (_class13 = class {
8915
9021
  blend: target.channel !== "pixels" ? "normal" : brush.blend,
8916
9022
  lockTransparency: target.lockTransparency,
8917
9023
  // In Quick Mask mode the selection is what is painted, so it does not limit the stroke.
8918
- selection: target.channel !== "quick-mask" && _optionalChain([this, 'access', _282 => _282.state, 'access', _283 => _283.selection, 'optionalAccess', _284 => _284.bounds]) ? this.state.selection : null,
9024
+ selection: target.channel !== "quick-mask" && _optionalChain([this, 'access', _284 => _284.state, 'access', _285 => _285.selection, 'optionalAccess', _286 => _286.bounds]) ? this.state.selection : null,
8919
9025
  offset: target.offset
8920
9026
  };
8921
9027
  const depth = target.channel !== "filter-mask" && target.channel !== "quick-mask" && this.bitDepth !== 8 ? this.bitDepth : null;
8922
9028
  if (tool === "mixer") return new PaintStrokeSession(this, target, this.mixerStroke(init, brush), apply, depth);
8923
9029
  if (isRetouchTool(tool)) return new PaintStrokeSession(this, target, this.retouchStroke(tool, init, brush, target, apply), apply, depth);
8924
- const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess', _285 => _285.type]) === "gradient" ? _chunkEBDCRTZIcjs.resolvePaintGradient.call(void 0, strokePaint, { paint: toHex(color), secondary: toHex(background) }) : null;
9030
+ const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess', _287 => _287.type]) === "gradient" ? _chunkEBDCRTZIcjs.resolvePaintGradient.call(void 0, strokePaint, { paint: toHex(color), secondary: toHex(background) }) : null;
8925
9031
  return new PaintStrokeSession(this, target, new (0, _chunkEBDCRTZIcjs.StrokeCoverage)(brush, gradient, _nullishCoalesce(init.seed, () => ( 0))), apply, depth);
8926
9032
  }
8927
9033
  /** A retouching stroke's start: its settings, what it samples and how it composites. */
@@ -8968,9 +9074,9 @@ var ImageEditorController = (_class13 = class {
8968
9074
  const steps = settings.historySteps;
8969
9075
  const entry = steps > 0 ? _nullishCoalesce(this.undoStack[this.undoStack.length - steps], () => ( this.undoStack[0])) : this.undoStack[0];
8970
9076
  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.");
8971
- const then = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _286 => _286.layer]);
9077
+ const then = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _288 => _288.layer]);
8972
9078
  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).`);
8973
- const surface = target.channel === "mask" ? _optionalChain([then, 'access', _287 => _287.mask, 'optionalAccess', _288 => _288.surface]) : then.type === "pixel" ? then.surface : void 0;
9079
+ const surface = target.channel === "mask" ? _optionalChain([then, 'access', _289 => _289.mask, 'optionalAccess', _290 => _290.surface]) : then.type === "pixel" ? then.surface : void 0;
8974
9080
  if (!surface) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
8975
9081
  const offset2 = then.type === "pixel" ? then.offset : { x: 0, y: 0 };
8976
9082
  const depth = !mask && this.bitDepth !== 8 ? this.bitDepth : null;
@@ -9044,7 +9150,7 @@ var ImageEditorController = (_class13 = class {
9044
9150
  }
9045
9151
  /** A pixel source over a surface (layer pixels or a mask) in layer space at `offset`. */
9046
9152
  surfaceSource(surface, offset) {
9047
- return new (0, _chunk7NW46N7Icjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access', _289 => _289.tiles, 'access', _290 => _290.get, 'call', _291 => _291(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _292 => _292.data]), () => ( (surface.defaultValue ? defaultTile(surface) : null))), surface.channels, offset);
9153
+ return new (0, _chunk7NW46N7Icjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access', _291 => _291.tiles, 'access', _292 => _292.get, 'call', _293 => _293(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _294 => _294.data]), () => ( (surface.defaultValue ? defaultTile(surface) : null))), surface.channels, offset);
9048
9154
  }
9049
9155
  /** A pixel source over the composite of the current layers (through `throughId` and below, or all of them), as it is now. */
9050
9156
  compositeSource(throughId, depth = null) {
@@ -9120,7 +9226,7 @@ var ImageEditorController = (_class13 = class {
9120
9226
  paintStroke(init) {
9121
9227
  if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("points must hold at least one { x, y } point.");
9122
9228
  for (const p of init.points) {
9123
- if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _293 => _293.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _294 => _294.y]))) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
9229
+ if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _295 => _295.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _296 => _296.y]))) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
9124
9230
  }
9125
9231
  const session = this.beginStroke(init);
9126
9232
  session.push(init.points);
@@ -9149,7 +9255,7 @@ var ImageEditorController = (_class13 = class {
9149
9255
  */
9150
9256
  strokeSelection(options) {
9151
9257
  const sel = this.state.selection;
9152
- if (!_optionalChain([sel, 'optionalAccess', _295 => _295.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then stroke the selection.");
9258
+ if (!_optionalChain([sel, 'optionalAccess', _297 => _297.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then stroke the selection.");
9153
9259
  const width = options.width;
9154
9260
  if (!(width > 0 && width <= 250)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("width must be greater than 0 and at most 250 px.");
9155
9261
  const location = _nullishCoalesce(options.location, () => ( "outside"));
@@ -9166,7 +9272,7 @@ var ImageEditorController = (_class13 = class {
9166
9272
  */
9167
9273
  cropToSelection() {
9168
9274
  const sel = this.state.selection;
9169
- if (!_optionalChain([sel, 'optionalAccess', _296 => _296.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the area to keep, then crop to it.");
9275
+ if (!_optionalChain([sel, 'optionalAccess', _298 => _298.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the area to keep, then crop to it.");
9170
9276
  const crop = { ...sel.bounds };
9171
9277
  this.setCrop(crop);
9172
9278
  return crop;
@@ -9180,7 +9286,7 @@ var ImageEditorController = (_class13 = class {
9180
9286
  */
9181
9287
  contentAwareFill(options = {}) {
9182
9288
  const sel = this.state.selection;
9183
- if (!_optionalChain([sel, 'optionalAccess', _297 => _297.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select what to remove, then fill it.");
9289
+ if (!_optionalChain([sel, 'optionalAccess', _299 => _299.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select what to remove, then fill it.");
9184
9290
  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.");
9185
9291
  const output = _nullishCoalesce(options.output, () => ( "current"));
9186
9292
  if (output !== "current" && output !== "new-layer") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Unknown output "${String(output)}"; use current or new-layer.`);
@@ -9245,8 +9351,8 @@ var ImageEditorController = (_class13 = class {
9245
9351
  */
9246
9352
  copyPixels(options = {}) {
9247
9353
  const { width, height } = this.naturalSize;
9248
- const sel = _optionalChain([this, 'access', _298 => _298.state, 'access', _299 => _299.selection, 'optionalAccess', _300 => _300.bounds]) ? this.state.selection : null;
9249
- const rect = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _301 => _301.bounds]), () => ( { x: 0, y: 0, width, height }));
9354
+ const sel = _optionalChain([this, 'access', _300 => _300.state, 'access', _301 => _301.selection, 'optionalAccess', _302 => _302.bounds]) ? this.state.selection : null;
9355
+ const rect = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _303 => _303.bounds]), () => ( { x: 0, y: 0, width, height }));
9250
9356
  let data;
9251
9357
  if (options.merged) {
9252
9358
  data = new Uint8ClampedArray(this.compositePixels(rect).data);
@@ -9286,7 +9392,7 @@ var ImageEditorController = (_class13 = class {
9286
9392
  pastePixels(mode = "new-layer", image = this.clipboard) {
9287
9393
  if (!image) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("The clipboard is empty; copy_pixels first.");
9288
9394
  if (!PASTE_MODES.includes(mode)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Unknown paste mode "${String(mode)}"; use ${PASTE_MODES.join(", ")}.`);
9289
- const sel = _optionalChain([this, 'access', _302 => _302.state, 'access', _303 => _303.selection, 'optionalAccess', _304 => _304.bounds]) ? this.state.selection : null;
9395
+ const sel = _optionalChain([this, 'access', _304 => _304.state, 'access', _305 => _305.selection, 'optionalAccess', _306 => _306.bounds]) ? this.state.selection : null;
9290
9396
  if ((mode === "into" || mode === "outside") && !sel) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Paste ${mode === "into" ? "Into" : "Outside"} needs a selection; select where it goes first.`);
9291
9397
  const { width, height } = this.naturalSize;
9292
9398
  let x;
@@ -9295,7 +9401,7 @@ var ImageEditorController = (_class13 = class {
9295
9401
  x = image.x;
9296
9402
  y = image.y;
9297
9403
  } else {
9298
- const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _305 => _305.bounds]), () => ( { x: 0, y: 0, width, height }));
9404
+ const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _307 => _307.bounds]), () => ( { x: 0, y: 0, width, height }));
9299
9405
  x = Math.round(frame.x + (frame.width - image.width) / 2);
9300
9406
  y = Math.round(frame.y + (frame.height - image.height) / 2);
9301
9407
  }
@@ -9312,8 +9418,8 @@ var ImageEditorController = (_class13 = class {
9312
9418
  if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("opacity must be from 0 to 1.");
9313
9419
  const blend = _nullishCoalesce(_chunkUYXL6ZWQcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
9314
9420
  const quickMask = target.channel === "quick-mask";
9315
- const sel = _nullishCoalesce(coverageMask, () => ( (!quickMask && options.useSelection !== false && _optionalChain([this, 'access', _306 => _306.state, 'access', _307 => _307.selection, 'optionalAccess', _308 => _308.bounds]) ? this.state.selection : null)));
9316
- const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _309 => _309.bounds]), () => ( { x: 0, y: 0, width, height }));
9421
+ const sel = _nullishCoalesce(coverageMask, () => ( (!quickMask && options.useSelection !== false && _optionalChain([this, 'access', _308 => _308.state, 'access', _309 => _309.selection, 'optionalAccess', _310 => _310.bounds]) ? this.state.selection : null)));
9422
+ const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _311 => _311.bounds]), () => ( { x: 0, y: 0, width, height }));
9317
9423
  const coverage = new (0, _chunkEBDCRTZIcjs.CoverageMap)();
9318
9424
  const ones = new Float32Array(region.width * region.height);
9319
9425
  if (sel) {
@@ -9438,7 +9544,7 @@ var ImageEditorController = (_class13 = class {
9438
9544
  placeLayer(layers, node, where) {
9439
9545
  if (where.aboveId) {
9440
9546
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, where.aboveId);
9441
- if (loc) return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _310 => _310.parent, 'optionalAccess', _311 => _311.id]), () => ( null)), loc.index + 1);
9547
+ if (loc) return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _312 => _312.parent, 'optionalAccess', _313 => _313.id]), () => ( null)), loc.index + 1);
9442
9548
  }
9443
9549
  if (where.parentId) {
9444
9550
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, where.parentId);
@@ -9449,11 +9555,11 @@ var ImageEditorController = (_class13 = class {
9449
9555
  const at = Math.max(0, Math.min(nodes.length, Math.round(where.adjustmentIndex)));
9450
9556
  if (at < nodes.length) {
9451
9557
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, nodes[at].id);
9452
- return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _312 => _312.parent, 'optionalAccess', _313 => _313.id]), () => ( null)), loc.index);
9558
+ return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _314 => _314.parent, 'optionalAccess', _315 => _315.id]), () => ( null)), loc.index);
9453
9559
  }
9454
9560
  if (nodes.length) {
9455
9561
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, nodes[nodes.length - 1].id);
9456
- return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _314 => _314.parent, 'optionalAccess', _315 => _315.id]), () => ( null)), loc.index + 1);
9562
+ return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _316 => _316.parent, 'optionalAccess', _317 => _317.id]), () => ( null)), loc.index + 1);
9457
9563
  }
9458
9564
  }
9459
9565
  return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, null, this.defaultInsertIndex(layers));
@@ -9492,7 +9598,7 @@ var ImageEditorController = (_class13 = class {
9492
9598
  enabled: spec.enabled,
9493
9599
  opacity: spec.opacity,
9494
9600
  blend: spec.blend,
9495
- mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access', _316 => _316.state, 'access', _317 => _317.selection, 'optionalAccess', _318 => _318.bounds]) ? _chunkUYXL6ZWQcjs.layerMaskFromSelection.call(void 0, this.state.selection) : void 0)))
9601
+ mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access', _318 => _318.state, 'access', _319 => _319.selection, 'optionalAccess', _320 => _320.bounds]) ? _chunkUYXL6ZWQcjs.layerMaskFromSelection.call(void 0, this.state.selection) : void 0)))
9496
9602
  });
9497
9603
  while (ids.has(layer.id)) layer.id = _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "adj");
9498
9604
  const { width, height } = this.naturalSize;
@@ -9569,7 +9675,7 @@ var ImageEditorController = (_class13 = class {
9569
9675
  const anchor = nodes[to];
9570
9676
  const without = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, id, () => null);
9571
9677
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, without, anchor.id);
9572
- return _chunkHGTDMKNEcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _319 => _319.parent, 'optionalAccess', _320 => _320.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
9678
+ return _chunkHGTDMKNEcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _321 => _321.parent, 'optionalAccess', _322 => _322.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
9573
9679
  }
9574
9680
  /** Moves a layer to `toIndex` among the adjustment layers (0 = bottom) as one undo step. Returns false if nothing moved. */
9575
9681
  moveAdjustmentLayer(id, toIndex) {
@@ -9610,7 +9716,7 @@ var ImageEditorController = (_class13 = class {
9610
9716
  return _nullishCoalesce(this.state.selection, () => ( null));
9611
9717
  }
9612
9718
  get hasSelection() {
9613
- return Boolean(_optionalChain([this, 'access', _321 => _321.state, 'access', _322 => _322.selection, 'optionalAccess', _323 => _323.bounds]));
9719
+ return Boolean(_optionalChain([this, 'access', _323 => _323.state, 'access', _324 => _324.selection, 'optionalAccess', _325 => _325.bounds]));
9614
9720
  }
9615
9721
  /** Returns the current canvas (composition) dimensions. */
9616
9722
  getCanvasSize() {
@@ -9702,7 +9808,7 @@ var ImageEditorController = (_class13 = class {
9702
9808
  const prev = normalizeSelection(_nullishCoalesce(this.state.selection, () => ( null)));
9703
9809
  if (prev === next || prev && next && sameSelection(prev, next)) return false;
9704
9810
  this.recordHistory();
9705
- if (!next && _optionalChain([prev, 'optionalAccess', _324 => _324.bounds])) this.lastSelection = prev;
9811
+ if (!next && _optionalChain([prev, 'optionalAccess', _326 => _326.bounds])) this.lastSelection = prev;
9706
9812
  this.state.selection = next;
9707
9813
  this.notify();
9708
9814
  return true;
@@ -9745,14 +9851,14 @@ var ImageEditorController = (_class13 = class {
9745
9851
  /** Select › Grow: adds connected pixels within `tolerance` of a selected colour (one undo step). */
9746
9852
  async growSelection(options = {}) {
9747
9853
  const sel = this.state.selection;
9748
- if (!_optionalChain([sel, 'optionalAccess', _325 => _325.bounds])) return false;
9854
+ if (!_optionalChain([sel, 'optionalAccess', _327 => _327.bounds])) return false;
9749
9855
  const pixels = await this.requirePixels(options);
9750
9856
  return this.setSelection(growSelection(pixels, sel, options));
9751
9857
  }
9752
9858
  /** Select › Similar: adds every pixel within `tolerance` of a selected colour (one undo step). */
9753
9859
  async selectSimilar(options = {}) {
9754
9860
  const sel = this.state.selection;
9755
- if (!_optionalChain([sel, 'optionalAccess', _326 => _326.bounds])) return false;
9861
+ if (!_optionalChain([sel, 'optionalAccess', _328 => _328.bounds])) return false;
9756
9862
  const pixels = await this.requirePixels(options);
9757
9863
  return this.setSelection(selectSimilar(pixels, sel, options));
9758
9864
  }
@@ -9866,6 +9972,17 @@ var ImageEditorController = (_class13 = class {
9866
9972
  this.setSelection(region, _nullishCoalesce(options.mode, () => ( "replace")));
9867
9973
  return _nullishCoalesce(this.state.selection, () => ( null));
9868
9974
  }
9975
+ /**
9976
+ * Select › Focus Area: selects the parts of the image that are in focus (fine detail above the
9977
+ * image's noise), fitted to its edges, combined with the selection by `mode` as one undo step.
9978
+ * Resolves to the selection and the noise level measured (σ of luminance in levels).
9979
+ */
9980
+ async selectFocusArea(options = {}) {
9981
+ const pixels = await this.requirePixels({ sample: options.sampleAllLayers === false ? "active-layer" : "composite" });
9982
+ const { selection, noiseLevel } = focusArea(pixels, options);
9983
+ this.setSelection(selection, _nullishCoalesce(options.mode, () => ( "replace")));
9984
+ return { selection: _nullishCoalesce(this.state.selection, () => ( null)), noiseLevel };
9985
+ }
9869
9986
  /**
9870
9987
  * Supplies the pixels the selection tools sample (natural size RGBA), e.g. decoded in a worker
9871
9988
  * or in a test; `null` goes back to reading the source image. Without a canvas (Node, workers)
@@ -9887,7 +10004,7 @@ var ImageEditorController = (_class13 = class {
9887
10004
  try {
9888
10005
  const canvas = await this.renderSource();
9889
10006
  const ctx = canvas.getContext("2d");
9890
- const data2 = _optionalChain([ctx, 'optionalAccess', _327 => _327.getImageData, 'optionalCall', _328 => _328(0, 0, width, height)]);
10007
+ const data2 = _optionalChain([ctx, 'optionalAccess', _329 => _329.getImageData, 'optionalCall', _330 => _330(0, 0, width, height)]);
9891
10008
  if (data2 && data2.data && data2.data.length >= width * height * 4) {
9892
10009
  base = { width, height, data: data2.data };
9893
10010
  this.samplePixels = base;
@@ -9962,7 +10079,7 @@ var ImageEditorController = (_class13 = class {
9962
10079
  /** Select › Modify: grow, shrink, feather, border or smooth by `radius` pixels (one undo step). */
9963
10080
  modifySelection(op, radius) {
9964
10081
  const sel = this.state.selection;
9965
- if (!_optionalChain([sel, 'optionalAccess', _329 => _329.bounds])) return false;
10082
+ if (!_optionalChain([sel, 'optionalAccess', _331 => _331.bounds])) return false;
9966
10083
  return this.setSelection(_chunkUYXL6ZWQcjs.modifySelection.call(void 0, sel, op, radius));
9967
10084
  }
9968
10085
  /**
@@ -9971,7 +10088,7 @@ var ImageEditorController = (_class13 = class {
9971
10088
  */
9972
10089
  async refineSelection(params, options = {}) {
9973
10090
  const sel = this.state.selection;
9974
- if (!_optionalChain([sel, 'optionalAccess', _330 => _330.bounds])) return false;
10091
+ if (!_optionalChain([sel, 'optionalAccess', _332 => _332.bounds])) return false;
9975
10092
  const pixels = (_nullishCoalesce(params.radius, () => ( 0))) > 0 ? await this.requirePixels(options) : null;
9976
10093
  return this.setSelection(refineSelection(pixels, sel, params));
9977
10094
  }
@@ -10002,7 +10119,7 @@ var ImageEditorController = (_class13 = class {
10002
10119
  let mask;
10003
10120
  if (source === "selection") {
10004
10121
  const sel = this.state.selection;
10005
- if (!_optionalChain([sel, 'optionalAccess', _331 => _331.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or export a channel or a layer mask.");
10122
+ if (!_optionalChain([sel, 'optionalAccess', _333 => _333.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or export a channel or a layer mask.");
10006
10123
  mask = sel;
10007
10124
  } else if ("channelId" in source) {
10008
10125
  mask = this.requireChannel(source.channelId).mask;
@@ -10026,7 +10143,7 @@ var ImageEditorController = (_class13 = class {
10026
10143
  const canvas = this.renderer.createCanvas(w, h);
10027
10144
  const ctx = canvas.getContext("2d");
10028
10145
  if (ctx) ctx.drawImage(img, 0, 0, w, h);
10029
- const data = _optionalChain([ctx, 'optionalAccess', _332 => _332.getImageData, 'optionalCall', _333 => _333(0, 0, w, h)]);
10146
+ const data = _optionalChain([ctx, 'optionalAccess', _334 => _334.getImageData, 'optionalCall', _335 => _335(0, 0, w, h)]);
10030
10147
  if (!data) throw new Error("The mask image pixels are not available (no canvas access); pass pixels.");
10031
10148
  return { width: w, height: h, data: data.data };
10032
10149
  }
@@ -10042,7 +10159,7 @@ var ImageEditorController = (_class13 = class {
10042
10159
  const provider = this.segmentation;
10043
10160
  if (!provider) {
10044
10161
  const pixels = await this.requirePixels({});
10045
- _optionalChain([options, 'access', _334 => _334.signal, 'optionalAccess', _335 => _335.throwIfAborted, 'call', _336 => _336()]);
10162
+ _optionalChain([options, 'access', _336 => _336.signal, 'optionalAccess', _337 => _337.throwIfAborted, 'call', _338 => _338()]);
10046
10163
  const { selection, reason } = findSubject(pixels, { enhanceEdge: options.enhanceEdge });
10047
10164
  if (selection.bounds) this.shapeCommand(selection, options);
10048
10165
  const unused = target.trim() ? ` "${target.trim()}" was not used to choose it.` : "";
@@ -10057,24 +10174,24 @@ var ImageEditorController = (_class13 = class {
10057
10174
  const { width, height } = this.naturalSize;
10058
10175
  const image = await this.toDataURL({ format: "image/png" });
10059
10176
  const results = await provider.segment({ image, width, height, target: description, maxSegments: options.maxSegments, signal: options.signal });
10060
- _optionalChain([options, 'access', _337 => _337.signal, 'optionalAccess', _338 => _338.throwIfAborted, 'call', _339 => _339()]);
10177
+ _optionalChain([options, 'access', _339 => _339.signal, 'optionalAccess', _340 => _340.throwIfAborted, 'call', _341 => _341()]);
10061
10178
  const decoded = [];
10062
10179
  for (const r of _nullishCoalesce(results, () => ( []))) {
10063
10180
  decoded.push({ ...r, mask: r.mask !== void 0 ? await this.decodeMaskImage(r.mask) : void 0 });
10064
10181
  }
10065
10182
  const segments = decoded.map((r) => {
10066
10183
  const one = segmentsToSelection(width, height, [r]);
10067
- return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess', _340 => _340.bounds]), () => ( null)), ...r.score !== void 0 ? { score: r.score } : {} };
10184
+ return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess', _342 => _342.bounds]), () => ( null)), ...r.score !== void 0 ? { score: r.score } : {} };
10068
10185
  });
10069
10186
  const mask = segmentsToSelection(width, height, decoded);
10070
10187
  if (mask && options.beforeApply) {
10071
10188
  const outlines = decoded.flatMap((r, i) => {
10072
10189
  const rings = segmentationOutlines(r);
10073
- const b = _optionalChain([segments, 'access', _341 => _341[i], 'optionalAccess', _342 => _342.bounds]);
10190
+ const b = _optionalChain([segments, 'access', _343 => _343[i], 'optionalAccess', _344 => _344.bounds]);
10074
10191
  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 }]] : [];
10075
10192
  });
10076
10193
  await options.beforeApply(outlines);
10077
- _optionalChain([options, 'access', _343 => _343.signal, 'optionalAccess', _344 => _344.throwIfAborted, 'call', _345 => _345()]);
10194
+ _optionalChain([options, 'access', _345 => _345.signal, 'optionalAccess', _346 => _346.throwIfAborted, 'call', _347 => _347()]);
10078
10195
  }
10079
10196
  if (mask) this.shapeCommand(mask, options);
10080
10197
  return { segments: segments.filter((s) => s.bounds), method: "model" };
@@ -10107,7 +10224,7 @@ var ImageEditorController = (_class13 = class {
10107
10224
  const view = this.state.maskView;
10108
10225
  if (!view) return null;
10109
10226
  const layer = this.getLayer(view.layerId);
10110
- return _optionalChain([layer, 'optionalAccess', _346 => _346.mask]) && !layer.mask.source ? view : null;
10227
+ return _optionalChain([layer, 'optionalAccess', _348 => _348.mask]) && !layer.mask.source ? view : null;
10111
10228
  }
10112
10229
  /**
10113
10230
  * Shows a layer's mask on the canvas: `gray` alone in grey (Alt-click the mask thumbnail),
@@ -10130,7 +10247,7 @@ var ImageEditorController = (_class13 = class {
10130
10247
  if (!layer.mask) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask to show; add one with add_layer_mask.`);
10131
10248
  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.`);
10132
10249
  const cur = this.state.maskView;
10133
- if (_optionalChain([cur, 'optionalAccess', _347 => _347.layerId]) !== id || cur.mode !== mode) {
10250
+ if (_optionalChain([cur, 'optionalAccess', _349 => _349.layerId]) !== id || cur.mode !== mode) {
10134
10251
  this.state.maskView = { layerId: id, mode };
10135
10252
  this.notify();
10136
10253
  }
@@ -10142,7 +10259,7 @@ var ImageEditorController = (_class13 = class {
10142
10259
  return _nullishCoalesce(this.state.channels, () => ( []));
10143
10260
  }
10144
10261
  getChannel(id) {
10145
- return _nullishCoalesce(_optionalChain([this, 'access', _348 => _348.state, 'access', _349 => _349.channels, 'optionalAccess', _350 => _350.find, 'call', _351 => _351((c) => c.id === id)]), () => ( null));
10262
+ return _nullishCoalesce(_optionalChain([this, 'access', _350 => _350.state, 'access', _351 => _351.channels, 'optionalAccess', _352 => _352.find, 'call', _353 => _353((c) => c.id === id)]), () => ( null));
10146
10263
  }
10147
10264
  requireChannel(id) {
10148
10265
  const channel = this.getChannel(id);
@@ -10171,14 +10288,14 @@ var ImageEditorController = (_class13 = class {
10171
10288
  */
10172
10289
  saveSelection(options = {}) {
10173
10290
  const sel = this.state.selection;
10174
- if (!_optionalChain([sel, 'optionalAccess', _352 => _352.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then save the selection to a channel.");
10291
+ if (!_optionalChain([sel, 'optionalAccess', _354 => _354.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then save the selection to a channel.");
10175
10292
  const { width, height } = this.naturalSize;
10176
10293
  const sized = sel.width === width && sel.height === height ? sel : _chunkUYXL6ZWQcjs.resizeSelection.call(void 0, sel, width, height);
10177
10294
  const channels = [...this.getChannels()];
10178
10295
  if (options.channelId !== void 0) {
10179
10296
  const existing = this.requireChannel(options.channelId);
10180
10297
  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)));
10181
- const next = { ...existing, mask, ..._optionalChain([options, 'access', _353 => _353.name, 'optionalAccess', _354 => _354.trim, 'call', _355 => _355()]) ? { name: options.name.trim() } : {} };
10298
+ const next = { ...existing, mask, ..._optionalChain([options, 'access', _355 => _355.name, 'optionalAccess', _356 => _356.trim, 'call', _357 => _357()]) ? { name: options.name.trim() } : {} };
10182
10299
  this.setChannels(channels.map((c) => c.id === existing.id ? next : c));
10183
10300
  return next;
10184
10301
  }
@@ -10189,7 +10306,7 @@ var ImageEditorController = (_class13 = class {
10189
10306
  const channels = this.getChannels();
10190
10307
  const channel = {
10191
10308
  id: this.newChannelId(),
10192
- name: _optionalChain([name, 'optionalAccess', _356 => _356.trim, 'call', _357 => _357()]) || `Alpha ${channels.length + 1}`,
10309
+ name: _optionalChain([name, 'optionalAccess', _358 => _358.trim, 'call', _359 => _359()]) || `Alpha ${channels.length + 1}`,
10193
10310
  mask,
10194
10311
  color: DEFAULT_CHANNEL_COLOR,
10195
10312
  opacity: 0.5,
@@ -10234,7 +10351,7 @@ var ImageEditorController = (_class13 = class {
10234
10351
  /** Duplicates an alpha channel just after it (one undo step). Returns the copy. */
10235
10352
  duplicateChannel(id, name) {
10236
10353
  const channel = this.requireChannel(id);
10237
- const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess', _358 => _358.trim, 'call', _359 => _359()]) || `${channel.name} copy` };
10354
+ const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess', _360 => _360.trim, 'call', _361 => _361()]) || `${channel.name} copy` };
10238
10355
  const channels = [...this.getChannels()];
10239
10356
  channels.splice(channels.findIndex((c) => c.id === id) + 1, 0, copy);
10240
10357
  this.setChannels(channels);
@@ -10265,7 +10382,7 @@ var ImageEditorController = (_class13 = class {
10265
10382
  quickMaskSurface() {
10266
10383
  const { width, height } = this.naturalSize;
10267
10384
  const sel = this.state.selection;
10268
- if (!_optionalChain([sel, 'optionalAccess', _360 => _360.bounds])) return _chunkCWM3CUUXcjs.emptySurface.call(void 0, 1, 0);
10385
+ if (!_optionalChain([sel, 'optionalAccess', _362 => _362.bounds])) return _chunkCWM3CUUXcjs.emptySurface.call(void 0, 1, 0);
10269
10386
  return (sel.width === width && sel.height === height ? sel : _chunkUYXL6ZWQcjs.resizeSelection.call(void 0, sel, width, height)).surface;
10270
10387
  }
10271
10388
  /** The selection a painted Quick Mask surface stands for (it shares the surface's tiles). */
@@ -10286,7 +10403,7 @@ var ImageEditorController = (_class13 = class {
10286
10403
  */
10287
10404
  applySelectionAsLayerMask(layerId, props = {}) {
10288
10405
  const sel = this.state.selection;
10289
- if (!_optionalChain([sel, 'optionalAccess', _361 => _361.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
10406
+ if (!_optionalChain([sel, 'optionalAccess', _363 => _363.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
10290
10407
  return this.setLayerMask(layerId, this.maskFromSelection(sel, props));
10291
10408
  }
10292
10409
  setLayerMask(layerId, mask, commitToHistory = true) {
@@ -10326,7 +10443,7 @@ var ImageEditorController = (_class13 = class {
10326
10443
  /** A layer's painted mask over the canvas as a selection mask; null without one (or for a depth mask). */
10327
10444
  layerMaskCoverage(layerId) {
10328
10445
  const layer = this.getLayer(layerId);
10329
- if (!_optionalChain([layer, 'optionalAccess', _362 => _362.mask]) || layer.mask.source) return null;
10446
+ if (!_optionalChain([layer, 'optionalAccess', _364 => _364.mask]) || layer.mask.source) return null;
10330
10447
  const { width, height } = this.naturalSize;
10331
10448
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
10332
10449
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
@@ -10361,7 +10478,7 @@ var ImageEditorController = (_class13 = class {
10361
10478
  this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
10362
10479
  const next = { ...l };
10363
10480
  if (_chunkUYXL6ZWQcjs.isDefaultDepthMask.call(void 0, merged)) {
10364
- if (_optionalChain([next, 'access', _363 => _363.mask, 'optionalAccess', _364 => _364.source])) delete next.mask;
10481
+ if (_optionalChain([next, 'access', _365 => _365.mask, 'optionalAccess', _366 => _366.source])) delete next.mask;
10365
10482
  } else next.mask = _chunkUYXL6ZWQcjs.depthRasterMask.call(void 0, merged);
10366
10483
  return next;
10367
10484
  });
@@ -10371,7 +10488,7 @@ var ImageEditorController = (_class13 = class {
10371
10488
  resetDepthMask() {
10372
10489
  this.recordHistory();
10373
10490
  const target = this.developLayer();
10374
- if (_optionalChain([target, 'optionalAccess', _365 => _365.mask, 'optionalAccess', _366 => _366.source])) {
10491
+ if (_optionalChain([target, 'optionalAccess', _367 => _367.mask, 'optionalAccess', _368 => _368.source])) {
10375
10492
  this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
10376
10493
  const next = { ...l };
10377
10494
  delete next.mask;
@@ -10383,7 +10500,7 @@ var ImageEditorController = (_class13 = class {
10383
10500
  // --- Annotations & Layers ---
10384
10501
  /** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
10385
10502
  annotationLayer(id) {
10386
- 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', _367 => _367.id]) === id);
10503
+ 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', _369 => _369.id]) === id);
10387
10504
  }
10388
10505
  /** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
10389
10506
  annotationEnv() {
@@ -10401,7 +10518,7 @@ var ImageEditorController = (_class13 = class {
10401
10518
  const fullAnnotation = { ...annotation, id };
10402
10519
  const layer = _chunkUYXL6ZWQcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
10403
10520
  const loc = placement.aboveId ? _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
10404
- this.state.layers = loc ? _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _368 => _368.parent, 'optionalAccess', _369 => _369.id]), () => ( null)), loc.index + 1) : _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, null);
10521
+ this.state.layers = loc ? _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _370 => _370.parent, 'optionalAccess', _371 => _371.id]), () => ( null)), loc.index + 1) : _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, null);
10405
10522
  this.state.selectedAnnotationId = id;
10406
10523
  this.notify();
10407
10524
  return id;
@@ -10524,7 +10641,7 @@ var ImageEditorController = (_class13 = class {
10524
10641
  await this.renderer.renderToCanvas(targetCanvas, source, this.state, {
10525
10642
  ...options,
10526
10643
  // The clone source follows the brush cursor (both editors pass it).
10527
- cloneSourceMarker: _optionalChain([options, 'optionalAccess', _370 => _370.cloneSourceMarker]) !== void 0 ? options.cloneSourceMarker : _optionalChain([options, 'optionalAccess', _371 => _371.brushCursor]) ? this.cloneSourceMarker(options.brushCursor) : null,
10644
+ cloneSourceMarker: _optionalChain([options, 'optionalAccess', _372 => _372.cloneSourceMarker]) !== void 0 ? options.cloneSourceMarker : _optionalChain([options, 'optionalAccess', _373 => _373.brushCursor]) ? this.cloneSourceMarker(options.brushCursor) : null,
10528
10645
  dirty: dirty === "all" ? void 0 : dirty,
10529
10646
  checkpointLayerId: this.state.activeLayerId
10530
10647
  });
@@ -10537,7 +10654,7 @@ var ImageEditorController = (_class13 = class {
10537
10654
  return this.renderer.createCanvas(1, 1);
10538
10655
  }
10539
10656
  this.syncViews();
10540
- if (_optionalChain([options, 'optionalAccess', _372 => _372.layerIds])) {
10657
+ if (_optionalChain([options, 'optionalAccess', _374 => _374.layerIds])) {
10541
10658
  const keep = new Set(options.layerIds);
10542
10659
  const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => keep.has(l.id));
10543
10660
  return this.renderer.renderExport(source, { ...this.state, layers }, options);
@@ -10691,7 +10808,7 @@ var ImageEditorController = (_class13 = class {
10691
10808
  let px2 = await this.decodeImage(newDataUrl);
10692
10809
  if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
10693
10810
  const data = new Uint8ClampedArray(px2.data);
10694
- const sel = _optionalChain([this, 'access', _373 => _373.state, 'access', _374 => _374.selection, 'optionalAccess', _375 => _375.bounds]) ? this.state.selection : null;
10811
+ const sel = _optionalChain([this, 'access', _375 => _375.state, 'access', _376 => _376.selection, 'optionalAccess', _377 => _377.bounds]) ? this.state.selection : null;
10695
10812
  if (sel) for (let p = 0, i = 3; p < width * height; p++, i += 4) data[i] = Math.round(data[i] * sel.data[p] / 255);
10696
10813
  return this.addPixelLayer({ name: "Inpaint", pixels: { width, height, data } });
10697
10814
  }
@@ -10738,7 +10855,7 @@ var ImageEditorController = (_class13 = class {
10738
10855
  }
10739
10856
  /** Font families the shaper offers (generic families at least). */
10740
10857
  listFonts() {
10741
- return _nullishCoalesce(_optionalChain([this, 'access', _376 => _376.getTextShaper, 'call', _377 => _377(), 'optionalAccess', _378 => _378.families, 'optionalCall', _379 => _379()]), () => ( ["sans-serif", "serif", "monospace"]));
10858
+ return _nullishCoalesce(_optionalChain([this, 'access', _378 => _378.getTextShaper, 'call', _379 => _379(), 'optionalAccess', _380 => _380.families, 'optionalCall', _381 => _381()]), () => ( ["sans-serif", "serif", "monospace"]));
10742
10859
  }
10743
10860
  typeInfo(id) {
10744
10861
  const layer = _chunkUYXL6ZWQcjs.requireTypeLayer.call(void 0, this.state.layers, id);
@@ -10812,8 +10929,8 @@ var ImageEditorController = (_class13 = class {
10812
10929
  const layer = this.layoutTypeLayer({ ...init, text, orientation: vertical ? "vertical" : "horizontal" });
10813
10930
  const { width, height } = this.naturalSize;
10814
10931
  const b = _chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.surface);
10815
- const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _380 => _380.x]), () => ( 0)));
10816
- const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _381 => _381.y]), () => ( 0)));
10932
+ const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _382 => _382.x]), () => ( 0)));
10933
+ const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _383 => _383.y]), () => ( 0)));
10817
10934
  const x1 = Math.min(width, b ? b.x + b.width : 0);
10818
10935
  const y1 = Math.min(height, b ? b.y + b.height : 0);
10819
10936
  let mask;
@@ -10990,7 +11107,7 @@ var ImageEditorController = (_class13 = class {
10990
11107
  if (colors.size > 1) warnings.push("The text had several colours; the shape takes the first one.");
10991
11108
  const missing = _chunkBRKVNXDZcjs.layoutText.call(void 0, layer, shaper).missingFonts;
10992
11109
  if (missing.length) warnings.push(`Missing fonts were drawn with a fallback: ${missing.join(", ")}.`);
10993
- const first = _nullishCoalesce(_optionalChain([layer, 'access', _382 => _382.runs, 'access', _383 => _383.find, 'call', _384 => _384((r) => r.length > 0), 'optionalAccess', _385 => _385.style]), () => ( _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE));
11110
+ const first = _nullishCoalesce(_optionalChain([layer, 'access', _384 => _384.runs, 'access', _385 => _385.find, 'call', _386 => _386((r) => r.length > 0), 'optionalAccess', _387 => _387.style]), () => ( _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE));
10994
11111
  const fill = first.opacity !== void 0 && first.opacity !== 1 ? { type: "color", color: first.color, opacity: first.opacity } : { type: "color", color: first.color };
10995
11112
  const shape = _chunkUYXL6ZWQcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
10996
11113
  const keep = { visible: layer.visible, opacity: layer.opacity, blend: layer.blend };
@@ -11023,7 +11140,7 @@ var ImageEditorController = (_class13 = class {
11023
11140
  // --- Shape layers ---
11024
11141
  /** What shape rendering needs: the canvas size and the document's patterns. */
11025
11142
  shapeEnv() {
11026
- return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _386 => _386.state, 'access', _387 => _387.patterns, 'optionalAccess', _388 => _388.find, 'call', _389 => _389((p) => p.id === id)]), () => ( null)) };
11143
+ return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _388 => _388.state, 'access', _389 => _389.patterns, 'optionalAccess', _390 => _390.find, 'call', _391 => _391((p) => p.id === id)]), () => ( null)) };
11027
11144
  }
11028
11145
  /** One component from tool or UI input (validated). */
11029
11146
  componentFrom(spec, path) {
@@ -11066,9 +11183,9 @@ var ImageEditorController = (_class13 = class {
11066
11183
  * open path) and stroked with `stroke`. Goes above the active layer unless placed. Returns its id.
11067
11184
  */
11068
11185
  addShapeLayer(init) {
11069
- const specs = _optionalChain([init, 'access', _390 => _390.components, 'optionalAccess', _391 => _391.length]) ? init.components : [init];
11070
- if (_optionalChain([init, 'access', _392 => _392.components, 'optionalAccess', _393 => _393.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
11071
- const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _394 => _394.components, 'optionalAccess', _395 => _395.length]) ? `components[${i}].` : ""));
11186
+ const specs = _optionalChain([init, 'access', _392 => _392.components, 'optionalAccess', _393 => _393.length]) ? init.components : [init];
11187
+ if (_optionalChain([init, 'access', _394 => _394.components, 'optionalAccess', _395 => _395.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
11188
+ const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _396 => _396.components, 'optionalAccess', _397 => _397.length]) ? `components[${i}].` : ""));
11072
11189
  const stroke = init.stroke ? _chunkUYXL6ZWQcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
11073
11190
  const openOnly = components.every((c) => !c.live && c.subpaths.every((sp) => !sp.closed));
11074
11191
  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");
@@ -11179,7 +11296,7 @@ var ImageEditorController = (_class13 = class {
11179
11296
  if (layer.locks) next.locks = layer.locks;
11180
11297
  if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
11181
11298
  } else if (layer.type === "pixel") {
11182
- if (!_optionalChain([layer, 'access', _396 => _396.filters, 'optionalAccess', _397 => _397.length])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
11299
+ if (!_optionalChain([layer, 'access', _398 => _398.filters, 'optionalAccess', _399 => _399.length])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
11183
11300
  _chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
11184
11301
  const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
11185
11302
  const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
@@ -11198,7 +11315,7 @@ var ImageEditorController = (_class13 = class {
11198
11315
  return this.rasterizeSmartObject(id);
11199
11316
  } else if (layer.type === "shape" || layer.type === "type") {
11200
11317
  next = layer.type === "shape" ? _chunkUYXL6ZWQcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkUYXL6ZWQcjs.typeAsPixelLayer.call(void 0, layer);
11201
- if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _398 => _398.annotation, 'optionalAccess', _399 => _399.id])) this.state.selectedAnnotationId = null;
11318
+ if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _400 => _400.annotation, 'optionalAccess', _401 => _401.id])) this.state.selectedAnnotationId = null;
11202
11319
  } else {
11203
11320
  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.`);
11204
11321
  }
@@ -11212,8 +11329,8 @@ var ImageEditorController = (_class13 = class {
11212
11329
  const doc = this.state.colorProfile;
11213
11330
  const p = resolveProfile(doc);
11214
11331
  const m = this.state.colorMode;
11215
- const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _400 => _400.name]), () => ( p.description)), builtin: doc ? _nullishCoalesce(doc.builtin, () => ( null)) : "srgb", colorSpace: p.colorSpace, srgb: isSrgb(doc), mode: _nullishCoalesce(_optionalChain([m, 'optionalAccess', _401 => _401.mode]), () => ( "rgb")) };
11216
- if (_optionalChain([m, 'optionalAccess', _402 => _402.mode]) === "cmyk") out.cmykProfile = { name: m.profile.name, builtin: _nullishCoalesce(m.profile.builtin, () => ( null)), intent: m.intent };
11332
+ const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _402 => _402.name]), () => ( p.description)), builtin: doc ? _nullishCoalesce(doc.builtin, () => ( null)) : "srgb", colorSpace: p.colorSpace, srgb: isSrgb(doc), mode: _nullishCoalesce(_optionalChain([m, 'optionalAccess', _403 => _403.mode]), () => ( "rgb")) };
11333
+ if (_optionalChain([m, 'optionalAccess', _404 => _404.mode]) === "cmyk") out.cmykProfile = { name: m.profile.name, builtin: _nullishCoalesce(m.profile.builtin, () => ( null)), intent: m.intent };
11217
11334
  return out;
11218
11335
  }
11219
11336
  /**
@@ -11303,7 +11420,7 @@ var ImageEditorController = (_class13 = class {
11303
11420
  const textEnv = this.textEnv();
11304
11421
  const walk = (layers) => layers.map((l) => {
11305
11422
  let next2 = l;
11306
- if (_optionalChain([l, 'access', _403 => _403.effects, 'optionalAccess', _404 => _404.items, 'access', _405 => _405.length])) next2 = { ...next2, effects: convertColorFields(l.effects, hex) };
11423
+ if (_optionalChain([l, 'access', _405 => _405.effects, 'optionalAccess', _406 => _406.items, 'access', _407 => _407.length])) next2 = { ...next2, effects: convertColorFields(l.effects, hex) };
11307
11424
  if (l.type === "group") {
11308
11425
  if (next2 !== l) converted.push(l.id);
11309
11426
  return { ...next2, children: walk(l.children) };
@@ -11487,8 +11604,8 @@ var ImageEditorController = (_class13 = class {
11487
11604
  else delete s.bitDepth;
11488
11605
  delete s.colorProfile;
11489
11606
  delete s.colorMode;
11490
- if (_optionalChain([result, 'access', _406 => _406.sourceMode, 'optionalAccess', _407 => _407.mode]) === "cmyk") s.colorMode = { mode: "cmyk", profile: result.sourceMode.profile, intent: "relative" };
11491
- else if (_optionalChain([result, 'access', _408 => _408.sourceMode, 'optionalAccess', _409 => _409.mode]) === "lab") s.colorMode = { mode: "lab" };
11607
+ if (_optionalChain([result, 'access', _408 => _408.sourceMode, 'optionalAccess', _409 => _409.mode]) === "cmyk") s.colorMode = { mode: "cmyk", profile: result.sourceMode.profile, intent: "relative" };
11608
+ else if (_optionalChain([result, 'access', _410 => _410.sourceMode, 'optionalAccess', _411 => _411.mode]) === "lab") s.colorMode = { mode: "lab" };
11492
11609
  else if (result.iccProfile) {
11493
11610
  try {
11494
11611
  const doc = documentProfile(result.iccProfile);
@@ -11552,7 +11669,7 @@ var ImageEditorController = (_class13 = class {
11552
11669
  const compositor = new (0, _chunkUYXL6ZWQcjs.LayerCompositor)();
11553
11670
  const bakeMask = (layer) => {
11554
11671
  const mask = layer.mask;
11555
- if (!_optionalChain([mask, 'optionalAccess', _410 => _410.source])) return mask;
11672
+ if (!_optionalChain([mask, 'optionalAccess', _412 => _412.source])) return mask;
11556
11673
  add2("Parametric (depth) masks were baked into pixel masks", layer.name);
11557
11674
  const plain3 = { ...layer, mask: { ...mask, density: 1, feather: 0, enabled: true } };
11558
11675
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
@@ -11569,7 +11686,7 @@ var ImageEditorController = (_class13 = class {
11569
11686
  };
11570
11687
  const prepare = async (layer) => {
11571
11688
  const p = await prepareLayer(layer);
11572
- if (_optionalChain([p, 'optionalAccess', _411 => _411.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
11689
+ if (_optionalChain([p, 'optionalAccess', _413 => _413.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
11573
11690
  return p;
11574
11691
  };
11575
11692
  const prepareLayer = async (layer) => {
@@ -11612,7 +11729,7 @@ var ImageEditorController = (_class13 = class {
11612
11729
  return out2;
11613
11730
  }
11614
11731
  if (layer.type === "shape" || layer.type === "type") {
11615
- if (layer.type === "type" && _optionalChain([layer, 'access', _412 => _412.missingFonts, 'optionalAccess', _413 => _413.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);
11732
+ if (layer.type === "type" && _optionalChain([layer, 'access', _414 => _414.missingFonts, 'optionalAccess', _415 => _415.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);
11616
11733
  const out2 = { ...layer };
11617
11734
  const mask2 = bakeMask(layer);
11618
11735
  if (mask2) out2.mask = mask2;
@@ -11631,7 +11748,7 @@ var ImageEditorController = (_class13 = class {
11631
11748
  out.surface = this.surfaceOf(layer);
11632
11749
  delete out.source;
11633
11750
  }
11634
- const active = _nullishCoalesce(_optionalChain([layer, 'access', _414 => _414.filters, 'optionalAccess', _415 => _415.filter, 'call', _416 => _416(_chunkUYXL6ZWQcjs.isActiveFilter)]), () => ( []));
11751
+ const active = _nullishCoalesce(_optionalChain([layer, 'access', _416 => _416.filters, 'optionalAccess', _417 => _417.filter, 'call', _418 => _418(_chunkUYXL6ZWQcjs.isActiveFilter)]), () => ( []));
11635
11752
  if (active.length) {
11636
11753
  add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
11637
11754
  const content = { ...out, visible: true, opacity: 1, blend: "normal" };
@@ -11642,7 +11759,7 @@ var ImageEditorController = (_class13 = class {
11642
11759
  const data = compositor.composite([content], canvas, sources);
11643
11760
  out = { ...out, surface: _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width, height, data }, 4, -layer.offset.x, -layer.offset.y) };
11644
11761
  }
11645
- if (_optionalChain([layer, 'access', _417 => _417.filters, 'optionalAccess', _418 => _418.some, 'call', _419 => _419((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
11762
+ if (_optionalChain([layer, 'access', _419 => _419.filters, 'optionalAccess', _420 => _420.some, 'call', _421 => _421((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
11646
11763
  delete out.filters;
11647
11764
  const mask = bakeMask(layer);
11648
11765
  if (mask) out.mask = mask;
@@ -11706,7 +11823,7 @@ var ImageEditorController = (_class13 = class {
11706
11823
  );
11707
11824
  }
11708
11825
  layers = resizeLegacyMasks(layers, prev, next.dimensions);
11709
- const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access', _420 => _420.state, 'access', _421 => _421.patterns, 'optionalAccess', _422 => _422.find, 'call', _423 => _423((p) => p.id === pid)]), () => ( null)) };
11826
+ const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access', _422 => _422.state, 'access', _423 => _423.patterns, 'optionalAccess', _424 => _424.find, 'call', _425 => _425((p) => p.id === pid)]), () => ( null)) };
11710
11827
  for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers)) {
11711
11828
  if (l.type === "annotation") {
11712
11829
  layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, annotation: scaleAnnotation(l.annotation, sx, sy) }));
@@ -11715,7 +11832,7 @@ var ImageEditorController = (_class13 = class {
11715
11832
  const scaled = a ? scaleAnnotation(a, sx, sy) : null;
11716
11833
  const fromAnnotation = scaled ? _chunkUYXL6ZWQcjs.shapeFromAnnotation.call(void 0, scaled) : null;
11717
11834
  const m = [sx, 0, 0, sy, 0, 0];
11718
- const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _424 => _424.components]), () => ( _chunkUYXL6ZWQcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
11835
+ const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _426 => _426.components]), () => ( _chunkUYXL6ZWQcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
11719
11836
  const moved = { ...l, components, ...fromAnnotation ? { fill: fromAnnotation.fill, stroke: fromAnnotation.stroke } : {} };
11720
11837
  if (scaled && fromAnnotation) moved.annotation = scaled;
11721
11838
  else delete moved.annotation;
@@ -11733,7 +11850,7 @@ var ImageEditorController = (_class13 = class {
11733
11850
  this.notify();
11734
11851
  }
11735
11852
  toJSON(options) {
11736
- const root = _optionalChain([this, 'access', _425 => _425.contentsStack, 'access', _426 => _426[0], 'optionalAccess', _427 => _427.saved]);
11853
+ const root = _optionalChain([this, 'access', _427 => _427.contentsStack, 'access', _428 => _428[0], 'optionalAccess', _429 => _429.saved]);
11737
11854
  const current = this.state;
11738
11855
  const element = this.imageElement;
11739
11856
  if (root) {
@@ -11744,8 +11861,8 @@ var ImageEditorController = (_class13 = class {
11744
11861
  let out;
11745
11862
  try {
11746
11863
  out = this.serializeState();
11747
- if (_optionalChain([this, 'access', _428 => _428.state, 'access', _429 => _429.selection, 'optionalAccess', _430 => _430.bounds])) out.selection = _chunkUYXL6ZWQcjs.serializeSelection.call(void 0, this.state.selection);
11748
- if (_optionalChain([this, 'access', _431 => _431.state, 'access', _432 => _432.channels, 'optionalAccess', _433 => _433.length])) out.channels = serializeChannels(this.state.channels);
11864
+ if (_optionalChain([this, 'access', _430 => _430.state, 'access', _431 => _431.selection, 'optionalAccess', _432 => _432.bounds])) out.selection = _chunkUYXL6ZWQcjs.serializeSelection.call(void 0, this.state.selection);
11865
+ if (_optionalChain([this, 'access', _433 => _433.state, 'access', _434 => _434.channels, 'optionalAccess', _435 => _435.length])) out.channels = serializeChannels(this.state.channels);
11749
11866
  } finally {
11750
11867
  if (root) {
11751
11868
  this.state = current;
@@ -11859,10 +11976,10 @@ var ImageEditorController = (_class13 = class {
11859
11976
  serializeState() {
11860
11977
  const { width, height } = this.naturalSize;
11861
11978
  const view = _chunkUYXL6ZWQcjs.legacyView.call(void 0, this.stack(), width, height, null);
11862
- if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _434 => _434.state, 'access', _435 => _435.patterns, 'optionalAccess', _436 => _436.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
11979
+ if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _436 => _436.state, 'access', _437 => _437.patterns, 'optionalAccess', _438 => _438.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
11863
11980
  return {
11864
11981
  // States without adjustment layers keep schema 1, so they round-trip unchanged.
11865
- version: _optionalChain([view, 'access', _437 => _437.adjustments, 'access', _438 => _438.layers, 'optionalAccess', _439 => _439.length]) ? 2 : 1,
11982
+ version: _optionalChain([view, 'access', _439 => _439.adjustments, 'access', _440 => _440.layers, 'optionalAccess', _441 => _441.length]) ? 2 : 1,
11866
11983
  crop: this.state.crop ? { ...this.state.crop } : null,
11867
11984
  transform: { ...this.state.transform },
11868
11985
  adjustments: serializeAdjustments(view.adjustments),
@@ -11887,7 +12004,7 @@ var ImageEditorController = (_class13 = class {
11887
12004
  };
11888
12005
  if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
11889
12006
  if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
11890
- if (_optionalChain([this, 'access', _440 => _440.state, 'access', _441 => _441.patterns, 'optionalAccess', _442 => _442.length])) out.patterns = _chunkUYXL6ZWQcjs.serializePatterns.call(void 0, this.state.patterns);
12007
+ if (_optionalChain([this, 'access', _442 => _442.state, 'access', _443 => _443.patterns, 'optionalAccess', _444 => _444.length])) out.patterns = _chunkUYXL6ZWQcjs.serializePatterns.call(void 0, this.state.patterns);
11891
12008
  if (smartContents) out.smartContents = smartContents;
11892
12009
  if (this.state.bitDepth === 16 || this.state.bitDepth === 32) out.bitDepth = this.state.bitDepth;
11893
12010
  if (this.state.colorProfile) out.colorProfile = serializeColorProfile(this.state.colorProfile);
@@ -11897,7 +12014,7 @@ var ImageEditorController = (_class13 = class {
11897
12014
  }, _class13);
11898
12015
  function serializeAdjustments(adjustments) {
11899
12016
  const out = { ...adjustments };
11900
- if (_optionalChain([out, 'access', _443 => _443.layers, 'optionalAccess', _444 => _444.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
12017
+ if (_optionalChain([out, 'access', _445 => _445.layers, 'optionalAccess', _446 => _446.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
11901
12018
  else delete out.layers;
11902
12019
  if (_chunkUYXL6ZWQcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkUYXL6ZWQcjs.LEGACY_PROCESS_VERSION) {
11903
12020
  delete out.process;
@@ -11933,11 +12050,11 @@ function withDevelop(layer, partial) {
11933
12050
  return { ...layer, filters };
11934
12051
  }
11935
12052
  function withBlur(layer, radius) {
11936
- const existing = _optionalChain([layer, 'access', _445 => _445.filters, 'optionalAccess', _446 => _446.find, 'call', _447 => _447((f) => f.kind === "blur")]);
12053
+ const existing = _optionalChain([layer, 'access', _447 => _447.filters, 'optionalAccess', _448 => _448.find, 'call', _449 => _449((f) => f.kind === "blur")]);
11937
12054
  const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
11938
12055
  if (radius > 0) {
11939
12056
  filters.push({
11940
- id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _448 => _448.id]), () => ( (layer.source === "document" ? _chunkUYXL6ZWQcjs.BLUR_FILTER_ID : _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "flt")))),
12057
+ id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _450 => _450.id]), () => ( (layer.source === "document" ? _chunkUYXL6ZWQcjs.BLUR_FILTER_ID : _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "flt")))),
11941
12058
  kind: "blur",
11942
12059
  enabled: true,
11943
12060
  radius
@@ -12033,7 +12150,7 @@ function collectStateTiles(layers, into) {
12033
12150
  if (l.type === "shape" || l.type === "type") _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.surface, into);
12034
12151
  if (l.type === "smart") {
12035
12152
  _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.surface, into);
12036
- if (_optionalChain([l, 'access', _449 => _449.smartFilters, 'optionalAccess', _450 => _450.mask])) _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
12153
+ if (_optionalChain([l, 'access', _451 => _451.smartFilters, 'optionalAccess', _452 => _452.mask])) _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
12037
12154
  if (l.contents.raster) _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.contents.raster, into);
12038
12155
  if (l.contents.document) collectStateTiles(l.contents.document.layers, into);
12039
12156
  }
@@ -12065,7 +12182,7 @@ function pixelsOnly(layers) {
12065
12182
  for (const l of layers) {
12066
12183
  if (l.type === "adjustment") continue;
12067
12184
  if (l.type === "group") out.push({ ...l, children: pixelsOnly(l.children) });
12068
- else if (l.type === "pixel" && _optionalChain([l, 'access', _451 => _451.filters, 'optionalAccess', _452 => _452.length])) {
12185
+ else if (l.type === "pixel" && _optionalChain([l, 'access', _453 => _453.filters, 'optionalAccess', _454 => _454.length])) {
12069
12186
  const p = { ...l };
12070
12187
  delete p.filters;
12071
12188
  out.push(p);
@@ -12131,7 +12248,7 @@ function toHex(c) {
12131
12248
  return "#" + [c[0], c[1], c[2]].map((v) => Math.round(v).toString(16).padStart(2, "0")).join("");
12132
12249
  }
12133
12250
  function normalizeSelection(mask) {
12134
- return _optionalChain([mask, 'optionalAccess', _453 => _453.bounds]) ? mask : null;
12251
+ return _optionalChain([mask, 'optionalAccess', _455 => _455.bounds]) ? mask : null;
12135
12252
  }
12136
12253
  function sameSelection(a, b) {
12137
12254
  if (a.width !== b.width || a.height !== b.height) return false;
@@ -12341,7 +12458,7 @@ function loadImageEditorDocument(input) {
12341
12458
  }
12342
12459
  const state = { version: 1, ...result.value };
12343
12460
  if (isV2) {
12344
- if (_optionalChain([state, 'access', _454 => _454.adjustments, 'access', _455 => _455.layers, 'optionalAccess', _456 => _456.length])) state.version = 2;
12461
+ if (_optionalChain([state, 'access', _456 => _456.adjustments, 'access', _457 => _457.layers, 'optionalAccess', _458 => _458.length])) state.version = 2;
12345
12462
  result.report.version = 2;
12346
12463
  }
12347
12464
  if (state.selection === void 0) delete state.selection;
@@ -12549,7 +12666,7 @@ function findAdjustmentControl(id) {
12549
12666
  }
12550
12667
  function findLayerControl(kind, id) {
12551
12668
  if (id === "opacity") return ADJUSTMENT_LAYER_OPACITY_CONTROL;
12552
- return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _457 => _457[kind], 'optionalAccess', _458 => _458.find, 'call', _459 => _459((c) => c.id === id)]);
12669
+ return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _459 => _459[kind], 'optionalAccess', _460 => _460.find, 'call', _461 => _461((c) => c.id === id)]);
12553
12670
  }
12554
12671
  function clampControlValue(spec, v) {
12555
12672
  if (typeof v !== "number" || !Number.isFinite(v)) return spec.default;
@@ -12766,7 +12883,7 @@ var DEPTH_MASK_CONTROLS = [
12766
12883
  // src/image-editor/playback.ts
12767
12884
  var IMAGE_PLAYBACK_KIND = "layer";
12768
12885
  var PAINT = /^(paint_stroke|clone_stamp|heal_brush|spot_heal|dodge|burn|sponge|smudge|blur_stroke|sharpen_stroke|history_brush|set_clone_source|set_clone_transform|fill_pixels|clear_pixels|set_paint|set_retouch_options|load_mixer_brush|clean_mixer_brush)$/;
12769
- var SELECT = /^(select_region|select_subject|select_by_color|select_all|deselect|invert_selection|select_rect|select_ellipse|select_polygon|quick_select|select_object|select_line|magic_wand|grow_selection|select_similar|reselect|select_layer_transparency|select_color_range|load_selection_from_image|load_selection_from_mask|set_selection_display|modify_selection|refine_selection|transform_selection|apply_selection_as_mask|layer_via_copy|stroke_selection|content_aware_fill|copy_pixels|cut_pixels|paste_pixels|save_selection|load_selection_from_channel|set_channel_properties|duplicate_channel|delete_channel|load_channel_from_image|set_quick_mask|path_to_selection|select_text_shape)$/;
12886
+ var SELECT = /^(select_region|select_subject|select_by_color|select_all|deselect|invert_selection|select_rect|select_ellipse|select_polygon|quick_select|select_object|select_focus_area|select_line|magic_wand|grow_selection|select_similar|reselect|select_layer_transparency|select_color_range|load_selection_from_image|load_selection_from_mask|set_selection_display|modify_selection|refine_selection|transform_selection|apply_selection_as_mask|layer_via_copy|stroke_selection|content_aware_fill|copy_pixels|cut_pixels|paste_pixels|save_selection|load_selection_from_channel|set_channel_properties|duplicate_channel|delete_channel|load_channel_from_image|set_quick_mask|path_to_selection|select_text_shape)$/;
12770
12887
  var ANNOTATE = /^(add_shape_layer|update_shape|add_shape_component|set_shape_component|remove_shape_component|merge_shape_components|add_text_layer|set_text|set_text_style|set_paragraph_style|set_text_frame|set_text_orientation|convert_text_to_shape)$/;
12771
12888
  var CROP = /^(set_crop|crop_to_selection|reset_crop|set_rotation|flip_image|transform_layer|warp_layer|flip_layer|offset_layer)$/;
12772
12889
  var ADJUST = /^(set_adjustments|add_adjustment_layer|update_adjustment_layer|remove_adjustment_layer|move_adjustment_layer)$/;
@@ -12932,6 +13049,9 @@ var DEFAULT_SELECTION_TOOL_OPTIONS = {
12932
13049
  quickEnhance: false,
12933
13050
  objectSampleAll: true,
12934
13051
  objectEnhance: false,
13052
+ focusRange: 50,
13053
+ focusNoise: 0,
13054
+ focusSoftness: 4,
12935
13055
  typeText: "Type",
12936
13056
  typeSize: 72,
12937
13057
  typeFamily: "sans-serif"
@@ -13004,7 +13124,7 @@ function summary(controller) {
13004
13124
  const area = _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel);
13005
13125
  return {
13006
13126
  empty: !sel,
13007
- bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _460 => _460.bounds]), () => ( null)),
13127
+ bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _462 => _462.bounds]), () => ( null)),
13008
13128
  /** Σ coverage in pixels. */
13009
13129
  area: Math.round(area),
13010
13130
  percent: Math.round(area / Math.max(1, width * height) * 1e4) / 100,
@@ -13080,7 +13200,7 @@ function createImageSelectionTools(controller) {
13080
13200
  break;
13081
13201
  }
13082
13202
  case "polygon": {
13083
- const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _461 => _461.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _462 => _462.y]), NaN) })) : [];
13203
+ const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _463 => _463.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _464 => _464.y]), NaN) })) : [];
13084
13204
  if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
13085
13205
  throw new Error("polygon needs points: at least 3 { x, y } vertices.");
13086
13206
  }
@@ -13317,7 +13437,7 @@ function createImageSelectionTools(controller) {
13317
13437
  },
13318
13438
  annotations: writeAnnotations("Select a polygon (lasso)", true),
13319
13439
  handler: async (args) => {
13320
- const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _463 => _463.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _464 => _464.y]), NaN) })) : [];
13440
+ const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _465 => _465.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _466 => _466.y]), NaN) })) : [];
13321
13441
  if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
13322
13442
  throw new Error("points needs at least 3 { x, y } vertices in natural image pixels.");
13323
13443
  }
@@ -13354,7 +13474,7 @@ function createImageSelectionTools(controller) {
13354
13474
  },
13355
13475
  annotations: writeAnnotations("Quick Selection"),
13356
13476
  handler: async (args) => {
13357
- const strokes = Array.isArray(args.strokes) ? args.strokes.map((s) => Array.isArray(s) ? s.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _465 => _465.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _466 => _466.y]), NaN) })) : []) : [];
13477
+ const strokes = Array.isArray(args.strokes) ? args.strokes.map((s) => Array.isArray(s) ? s.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _467 => _467.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _468 => _468.y]), NaN) })) : []) : [];
13358
13478
  if (!strokes.length || strokes.some((s) => !s.length || !s.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y)))) {
13359
13479
  throw new Error("strokes needs at least one stroke of { x, y } points in natural image pixels.");
13360
13480
  }
@@ -13400,6 +13520,33 @@ function createImageSelectionTools(controller) {
13400
13520
  return summary(controller);
13401
13521
  }
13402
13522
  };
13523
+ const selectFocusAreaTool = {
13524
+ name: "select_focus_area",
13525
+ title: "Select the focus area",
13526
+ description: "Select \u203A Focus Area: selects the parts of the image that are in focus (sharp detail, above the image noise), with the edge fitted to the image, combined with the selection by mode. Use it to separate a sharp subject from a blurred background (shallow depth of field), e.g. before blurring or darkening the background. Raise range to take in less sharp areas, raise noise if grain in the background gets selected. One undoable step. Returns the selection and noiseLevel (\u03C3 of the image noise in levels of 255).",
13527
+ inputSchema: {
13528
+ type: "object",
13529
+ properties: {
13530
+ range: { type: "number", minimum: 0, maximum: 100, description: "In-Focus Range 0..100 (default 50): higher takes in less sharp areas too." },
13531
+ noise: { type: "number", minimum: 0, maximum: 100, description: "Image Noise Level 0..100 (default 0): raise it when grain is selected as detail." },
13532
+ softness: { type: "number", minimum: 0, maximum: 100, description: "Soften the edge over this many natural pixels (default 4; 0 for a hard edge)." },
13533
+ mode: modeSchema,
13534
+ sampleAllLayers: { type: "boolean", description: "Read every layer (default true); false reads only the active pixel layer." }
13535
+ },
13536
+ additionalProperties: false
13537
+ },
13538
+ annotations: writeAnnotations("Select the focus area", true),
13539
+ handler: async (args) => {
13540
+ const { noiseLevel } = await controller.selectFocusArea({
13541
+ range: args.range === void 0 ? void 0 : num2(args.range, 50),
13542
+ noise: args.noise === void 0 ? void 0 : num2(args.noise, 0),
13543
+ softness: args.softness === void 0 ? void 0 : num2(args.softness, 4),
13544
+ mode: _chunkUYXL6ZWQcjs.parseSelectionMode.call(void 0, args.mode),
13545
+ sampleAllLayers: args.sampleAllLayers
13546
+ });
13547
+ return { ...summary(controller), noiseLevel };
13548
+ }
13549
+ };
13403
13550
  const magicWandTool = {
13404
13551
  name: "magic_wand",
13405
13552
  title: "Magic wand",
@@ -13493,7 +13640,7 @@ function createImageSelectionTools(controller) {
13493
13640
  await controller.selectColorRangePreset(args.preset, { ...common, falloff: num2(args.fuzziness, 20) });
13494
13641
  } else {
13495
13642
  const samples = args.samples.map((s, i) => {
13496
- if (typeof _optionalChain([s, 'optionalAccess', _467 => _467.color]) !== "string" || !/^#?[0-9a-f]{6}$/i.test(s.color.trim())) throw new Error(`samples[${i}].color must be #rrggbb.`);
13643
+ if (typeof _optionalChain([s, 'optionalAccess', _469 => _469.color]) !== "string" || !/^#?[0-9a-f]{6}$/i.test(s.color.trim())) throw new Error(`samples[${i}].color must be #rrggbb.`);
13497
13644
  const at = typeof s.x === "number" && typeof s.y === "number" ? { x: s.x, y: s.y } : void 0;
13498
13645
  return at ? { color: s.color, at } : { color: s.color };
13499
13646
  });
@@ -13955,6 +14102,7 @@ function createImageSelectionTools(controller) {
13955
14102
  quickSelectTool,
13956
14103
  selectObjectTool,
13957
14104
  createImageSubjectSelectionTool(controller),
14105
+ selectFocusAreaTool,
13958
14106
  lineTool,
13959
14107
  magicWandTool,
13960
14108
  colorRangeTool,
@@ -14012,13 +14160,13 @@ function createImageSubjectSelectionTool(controller) {
14012
14160
  handler: async ({ target, maxSegments, mode, feather, enhanceEdge }, context) => {
14013
14161
  if (target !== void 0 && typeof target !== "string") throw new Error("target must be a description in words.");
14014
14162
  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).");
14015
- const perform = _optionalChain([context, 'optionalAccess', _468 => _468.perform]);
14163
+ const perform = _optionalChain([context, 'optionalAccess', _470 => _470.perform]);
14016
14164
  const { segments, method, note } = await controller.selectSubject(String(_nullishCoalesce(target, () => ( ""))), {
14017
14165
  mode: _chunkUYXL6ZWQcjs.parseSelectionMode.call(void 0, mode),
14018
14166
  feather: num2(feather, 0),
14019
14167
  maxSegments: typeof maxSegments === "number" ? Math.max(1, Math.round(maxSegments)) : void 0,
14020
14168
  enhanceEdge: enhanceEdge === true,
14021
- signal: _optionalChain([context, 'optionalAccess', _469 => _469.signal]),
14169
+ signal: _optionalChain([context, 'optionalAccess', _471 => _471.signal]),
14022
14170
  // Under playback the cursor traces what the model found, as a lasso, before it is selected.
14023
14171
  beforeApply: perform ? (outlines) => perform(planOutlineTrace(outlines)) : void 0
14024
14172
  });
@@ -14096,7 +14244,7 @@ async function renderImageRegion(controller, request) {
14096
14244
  const maskView = maskViewCanvas(controller, document);
14097
14245
  if (maskView) context.drawImage(maskView, rect.x, rect.y, rect.width, rect.height, 0, 0, out.width, out.height);
14098
14246
  const selection = state.selection;
14099
- if (_optionalChain([selection, 'optionalAccess', _470 => _470.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
14247
+ if (_optionalChain([selection, 'optionalAccess', _472 => _472.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
14100
14248
  const shade = selectionShade(selection, document);
14101
14249
  if (shade) context.drawImage(shade, rect.x, rect.y, rect.width, rect.height, 0, 0, out.width, out.height);
14102
14250
  }
@@ -14121,7 +14269,7 @@ function createImageCaptureSurface(controller) {
14121
14269
  return {
14122
14270
  units: "image pixels",
14123
14271
  content: whole,
14124
- selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _471 => _471.getState, 'call', _472 => _472(), 'access', _473 => _473.selection, 'optionalAccess', _474 => _474.bounds]), () => ( null)) }),
14272
+ selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _473 => _473.getState, 'call', _474 => _474(), 'access', _475 => _475.selection, 'optionalAccess', _476 => _476.bounds]), () => ( null)) }),
14125
14273
  overlays: "a shade over unselected pixels, the crop box outline and a layer mask view (set_mask_view)",
14126
14274
  maxScale: 8,
14127
14275
  render: (request) => renderImageRegion(controller, request)
@@ -14455,7 +14603,7 @@ function describeLayer(layer, activeId, boundsOf) {
14455
14603
  out.bounds = boundsOf(layer);
14456
14604
  out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
14457
14605
  out.shape = {
14458
- components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _475 => _475.live, 'optionalAccess', _476 => _476.kind]), () => ( "path")) })),
14606
+ components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _477 => _477.live, 'optionalAccess', _478 => _478.kind]), () => ( "path")) })),
14459
14607
  fill: layer.fill ? layer.fill.type : null,
14460
14608
  stroke: layer.stroke ? { width: layer.stroke.width, paint: layer.stroke.paint.type } : null
14461
14609
  };
@@ -14478,8 +14626,8 @@ function describeLayer(layer, activeId, boundsOf) {
14478
14626
  out.bounds = boundsOf(layer);
14479
14627
  out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
14480
14628
  out.contents = { id: layer.contents.id, name: layer.contents.name, kind: layer.contents.kind, width: layer.contents.width, height: layer.contents.height };
14481
- out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _477 => _477.smartFilters, 'optionalAccess', _478 => _478.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
14482
- out.filterMask = maskSummary(_optionalChain([layer, 'access', _479 => _479.smartFilters, 'optionalAccess', _480 => _480.mask]));
14629
+ out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _479 => _479.smartFilters, 'optionalAccess', _480 => _480.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
14630
+ out.filterMask = maskSummary(_optionalChain([layer, 'access', _481 => _481.smartFilters, 'optionalAccess', _482 => _482.mask]));
14483
14631
  break;
14484
14632
  }
14485
14633
  return out;
@@ -14507,7 +14655,7 @@ function createImageLayerTools(controller) {
14507
14655
  if (!loc) return null;
14508
14656
  return {
14509
14657
  ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)),
14510
- parentId: _nullishCoalesce(_optionalChain([loc, 'access', _481 => _481.parent, 'optionalAccess', _482 => _482.id]), () => ( null)),
14658
+ parentId: _nullishCoalesce(_optionalChain([loc, 'access', _483 => _483.parent, 'optionalAccess', _484 => _484.id]), () => ( null)),
14511
14659
  index: loc.index
14512
14660
  };
14513
14661
  };
@@ -14830,7 +14978,7 @@ function createImageLayerTools(controller) {
14830
14978
  if (view !== "gray" && view !== "overlay" && view !== "off") throw new Error(`Unknown view "${String(view)}". Use gray, overlay or off.`);
14831
14979
  const id = view === "off" || layerId === void 0 ? void 0 : exists(layerId);
14832
14980
  const shown = controller.setMaskView(view, id);
14833
- return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _483 => _483.mode]), () => ( "off")), layerId: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _484 => _484.layerId]), () => ( null)) };
14981
+ return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _485 => _485.mode]), () => ( "off")), layerId: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _486 => _486.layerId]), () => ( null)) };
14834
14982
  }
14835
14983
  };
14836
14984
  const maskProps = {
@@ -15692,7 +15840,7 @@ function handleSelectionShortcut(controller, e, onError) {
15692
15840
  try {
15693
15841
  fn();
15694
15842
  } catch (err) {
15695
- _optionalChain([onError, 'optionalCall', _485 => _485(err instanceof Error ? err.message : String(err))]);
15843
+ _optionalChain([onError, 'optionalCall', _487 => _487(err instanceof Error ? err.message : String(err))]);
15696
15844
  }
15697
15845
  return true;
15698
15846
  };
@@ -15707,9 +15855,9 @@ function handleMaskViewKey(controller, e) {
15707
15855
  if (e.ctrlKey || e.metaKey || e.altKey || e.key !== "\\") return false;
15708
15856
  const id = controller.getState().activeLayerId;
15709
15857
  const layer = id ? controller.getLayer(id) : null;
15710
- if (!_optionalChain([layer, 'optionalAccess', _486 => _486.mask]) || layer.mask.source) return false;
15858
+ if (!_optionalChain([layer, 'optionalAccess', _488 => _488.mask]) || layer.mask.source) return false;
15711
15859
  const view = controller.getMaskView();
15712
- controller.setMaskView(_optionalChain([view, 'optionalAccess', _487 => _487.layerId]) === layer.id && view.mode === "overlay" ? "off" : "overlay", layer.id);
15860
+ controller.setMaskView(_optionalChain([view, 'optionalAccess', _489 => _489.layerId]) === layer.id && view.mode === "overlay" ? "off" : "overlay", layer.id);
15713
15861
  return true;
15714
15862
  }
15715
15863
  function handleQuickMaskKey(controller, e) {
@@ -15923,7 +16071,7 @@ var PaintGesture = (_class15 = class {
15923
16071
  const layer = this.controller.getActiveLayer();
15924
16072
  if (!layer) throw new Error("Select a layer to move in the Layers panel.");
15925
16073
  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.`);
15926
- if (_optionalChain([layer, 'access', _488 => _488.locks, 'optionalAccess', _489 => _489.all]) || _optionalChain([layer, 'access', _490 => _490.locks, 'optionalAccess', _491 => _491.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
16074
+ if (_optionalChain([layer, 'access', _490 => _490.locks, 'optionalAccess', _491 => _491.all]) || _optionalChain([layer, 'access', _492 => _492.locks, 'optionalAccess', _493 => _493.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
15927
16075
  const origin = layer.type === "pixel" ? { ...layer.offset } : layer.type === "smart" ? { ...layer.placement.corners[0] } : (() => {
15928
16076
  const b = _chunkUYXL6ZWQcjs.shapeGeometryBounds.call(void 0, layer);
15929
16077
  return b ? { x: b.x, y: b.y } : { x: 0, y: 0 };
@@ -15980,7 +16128,7 @@ var PaintGesture = (_class15 = class {
15980
16128
  this.move = null;
15981
16129
  }
15982
16130
  cancel() {
15983
- _optionalChain([this, 'access', _492 => _492.stroke, 'optionalAccess', _493 => _493.cancel, 'call', _494 => _494()]);
16131
+ _optionalChain([this, 'access', _494 => _494.stroke, 'optionalAccess', _495 => _495.cancel, 'call', _496 => _496()]);
15984
16132
  this.stroke = null;
15985
16133
  this.move = null;
15986
16134
  }
@@ -17061,7 +17209,7 @@ function createImageSmartObjectTools(controller) {
17061
17209
  const layerSummary = (id) => {
17062
17210
  const s = controller.getState();
17063
17211
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
17064
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _495 => _495.parent, 'optionalAccess', _496 => _496.id]), () => ( null)), index: loc.index } : null;
17212
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _497 => _497.parent, 'optionalAccess', _498 => _498.id]), () => ( null)), index: loc.index } : null;
17065
17213
  };
17066
17214
  const getSmart = {
17067
17215
  name: "get_smart_object",
@@ -17618,7 +17766,7 @@ function createImageShapeTools(controller) {
17618
17766
  const layerSummary = (id) => {
17619
17767
  const s = controller.getState();
17620
17768
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
17621
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _497 => _497.parent, 'optionalAccess', _498 => _498.id]), () => ( null)), index: loc.index } : null;
17769
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _499 => _499.parent, 'optionalAccess', _500 => _500.id]), () => ( null)), index: loc.index } : null;
17622
17770
  };
17623
17771
  const get = {
17624
17772
  name: "get_shape_layer",
@@ -17835,7 +17983,7 @@ function createImageShapeTools(controller) {
17835
17983
  const mode = args.mode;
17836
17984
  controller.pathToSelection(pathSpec(args), { feather: args.feather, antiAlias: args.antiAlias, mode });
17837
17985
  const sel = controller.getSelection();
17838
- return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _499 => _499.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
17986
+ return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _501 => _501.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
17839
17987
  }
17840
17988
  };
17841
17989
  const getVectorMask = {
@@ -17866,7 +18014,7 @@ function createImageShapeTools(controller) {
17866
18014
  handler: (args) => {
17867
18015
  const id = layerArg(args.layerId);
17868
18016
  const spec = pathSpec(args);
17869
- const hasPath = _optionalChain([spec, 'access', _500 => _500.components, 'optionalAccess', _501 => _501.length]) || spec.shape !== void 0 || spec.subpaths !== void 0;
18017
+ const hasPath = _optionalChain([spec, 'access', _502 => _502.components, 'optionalAccess', _503 => _503.length]) || spec.shape !== void 0 || spec.subpaths !== void 0;
17870
18018
  const from = _nullishCoalesce(args.from, () => ( (hasPath ? "path" : "reveal-all")));
17871
18019
  if (from !== "selection" && TRACE_KEYS.some((k) => args[k] !== void 0)) throw new Error("tolerance, cornerRoundness and minArea apply only to from selection.");
17872
18020
  controller.addVectorMask(id, from, spec, traceOptions(args));
@@ -17986,7 +18134,7 @@ function createImageTypeTools(controller) {
17986
18134
  const layerSummary = (id) => {
17987
18135
  const s = controller.getState();
17988
18136
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
17989
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _502 => _502.parent, 'optionalAccess', _503 => _503.id]), () => ( null)), index: loc.index } : null;
18137
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _504 => _504.parent, 'optionalAccess', _505 => _505.id]), () => ( null)), index: loc.index } : null;
17990
18138
  };
17991
18139
  const range = (args) => ({ start: args.start, end: args.end });
17992
18140
  const listFonts = {
@@ -17995,7 +18143,7 @@ function createImageTypeTools(controller) {
17995
18143
  description: "Returns the font families type layers can use here (generic families such as sans-serif always work). Changes nothing.",
17996
18144
  inputSchema: { type: "object", properties: {}, additionalProperties: false },
17997
18145
  annotations: { title: "List fonts", ...READ11 },
17998
- handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _504 => _504.getTextShaper, 'call', _505 => _505(), 'optionalAccess', _506 => _506.id]), () => ( null)) })
18146
+ handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _506 => _506.getTextShaper, 'call', _507 => _507(), 'optionalAccess', _508 => _508.id]), () => ( null)) })
17999
18147
  };
18000
18148
  const get = {
18001
18149
  name: "get_text_layer",
@@ -18151,7 +18299,7 @@ function createImageTypeTools(controller) {
18151
18299
  const init = pick2(args, ["text", "x", "y", "orientation", "box", "style", "paragraph", "rotation", "mode", "feather", "antiAlias"]);
18152
18300
  controller.selectTextShape(init);
18153
18301
  const sel = controller.getSelection();
18154
- return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _507 => _507.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
18302
+ return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _509 => _509.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
18155
18303
  }
18156
18304
  };
18157
18305
  return [listFonts, get, add2, setText, setStyle, setParagraph, setFrame, setOrientation, toShape, typeMask];
@@ -18330,7 +18478,7 @@ function createImageEditorToolProvider(controller, options = {}) {
18330
18478
  for (const ref of [aboveId, parentId]) {
18331
18479
  if (ref !== void 0 && !controller.getLayer(ref)) throw new Error(`Unknown layer "${ref}". Call list_layers for ids.`);
18332
18480
  }
18333
- if (parentId !== void 0 && _optionalChain([controller, 'access', _508 => _508.getLayer, 'call', _509 => _509(parentId), 'optionalAccess', _510 => _510.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
18481
+ if (parentId !== void 0 && _optionalChain([controller, 'access', _510 => _510.getLayer, 'call', _511 => _511(parentId), 'optionalAccess', _512 => _512.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
18334
18482
  const id = controller.addAdjustmentLayer({ kind, params, opacity, blend, name, aboveId, parentId, useSelection: useSelection !== false });
18335
18483
  const layer = controller.getAdjustmentLayer(id);
18336
18484
  return { layer: JSON.parse(JSON.stringify(layer)), index: controller.getAdjustmentLayers().findIndex((l) => l.id === id), masked: Boolean(layer.mask) };
@@ -18644,7 +18792,7 @@ function maskThumbnailClick(controller, layer, e) {
18644
18792
  } else if (e.altKey && !layer.mask.source) {
18645
18793
  const mode = e.shiftKey ? "overlay" : "gray";
18646
18794
  const view = controller.getMaskView();
18647
- controller.setMaskView(_optionalChain([view, 'optionalAccess', _511 => _511.layerId]) === layer.id && view.mode === mode ? "off" : mode, layer.id);
18795
+ controller.setMaskView(_optionalChain([view, 'optionalAccess', _513 => _513.layerId]) === layer.id && view.mode === mode ? "off" : mode, layer.id);
18648
18796
  } else if (e.shiftKey) {
18649
18797
  controller.setLayerMaskProps(layer.id, { enabled: layer.mask.enabled === false });
18650
18798
  } else {
@@ -18708,7 +18856,7 @@ function layerHasThumbnail(layer) {
18708
18856
  return layer.type === "pixel" || layer.type === "shape" || layer.type === "type";
18709
18857
  }
18710
18858
  function layerWarning(layer) {
18711
- if (layer.type === "type" && _optionalChain([layer, 'access', _512 => _512.missingFonts, 'optionalAccess', _513 => _513.length])) {
18859
+ if (layer.type === "type" && _optionalChain([layer, 'access', _514 => _514.missingFonts, 'optionalAccess', _515 => _515.length])) {
18712
18860
  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."}`;
18713
18861
  }
18714
18862
  return null;
@@ -18731,16 +18879,16 @@ function layerMenu(controller) {
18731
18879
  const siblings = loc ? loc.parent ? loc.parent.children : s.layers : [];
18732
18880
  const below = loc ? siblings[loc.index - 1] : void 0;
18733
18881
  const hasSel = controller.hasSelection;
18734
- const isPixel = _optionalChain([active, 'optionalAccess', _514 => _514.type]) === "pixel";
18735
- const hasOwnPixels = _optionalChain([active, 'optionalAccess', _515 => _515.type]) === "pixel" || _optionalChain([active, 'optionalAccess', _516 => _516.type]) === "shape" || _optionalChain([active, 'optionalAccess', _517 => _517.type]) === "type" || _optionalChain([active, 'optionalAccess', _518 => _518.type]) === "smart";
18882
+ const isPixel = _optionalChain([active, 'optionalAccess', _516 => _516.type]) === "pixel";
18883
+ const hasOwnPixels = _optionalChain([active, 'optionalAccess', _517 => _517.type]) === "pixel" || _optionalChain([active, 'optionalAccess', _518 => _518.type]) === "shape" || _optionalChain([active, 'optionalAccess', _519 => _519.type]) === "type" || _optionalChain([active, 'optionalAccess', _520 => _520.type]) === "smart";
18736
18884
  return [
18737
18885
  { action: "new-layer", label: "New Layer", enabled: true },
18738
18886
  { action: "new-group", label: "New Group", enabled: true },
18739
18887
  { action: "duplicate", label: "Duplicate Layer", enabled: Boolean(active) },
18740
18888
  { action: "delete", label: "Delete Layer", enabled: Boolean(active) },
18741
18889
  { action: "group-selected", label: "Group Layer", enabled: Boolean(active) },
18742
- { action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _519 => _519.type]) === "group" },
18743
- { action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _520 => _520.visible]) && _optionalChain([below, 'optionalAccess', _521 => _521.type]) === "pixel") },
18890
+ { action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _521 => _521.type]) === "group" },
18891
+ { action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _522 => _522.visible]) && _optionalChain([below, 'optionalAccess', _523 => _523.type]) === "pixel") },
18744
18892
  { action: "merge-visible", label: "Merge Visible", enabled: s.layers.some((l) => l.visible) },
18745
18893
  { action: "flatten", label: "Flatten Image", enabled: s.layers.length > 0 },
18746
18894
  { action: "via-copy", label: "Layer via Copy", enabled: isPixel && hasSel },
@@ -18750,27 +18898,27 @@ function layerMenu(controller) {
18750
18898
  { action: "add-mask-hide-selection", label: "Add Mask Hiding Selection", enabled: Boolean(active) && hasSel },
18751
18899
  { action: "add-mask-transparency", label: "Add Mask from Transparency", enabled: hasOwnPixels },
18752
18900
  { action: "select-transparency", label: "Select Layer Pixels", enabled: hasOwnPixels },
18753
- { action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _522 => _522.mask])) },
18754
- { action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _523 => _523.mask])) },
18755
- { action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _524 => _524.mask, 'optionalAccess', _525 => _525.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _526 => _526.mask])) },
18756
- { action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _527 => _527.mask, 'optionalAccess', _528 => _528.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _529 => _529.mask]) && !active.mask.source) },
18757
- { action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _530 => _530.mask, 'optionalAccess', _531 => _531.source])) },
18758
- { action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _532 => _532.mask, 'optionalAccess', _533 => _533.source])) },
18759
- { action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _534 => _534.mask, 'optionalAccess', _535 => _535.source])) && hasSel },
18760
- { action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _536 => _536.vectorMask])) },
18761
- { action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess', _537 => _537.vectorMask, 'optionalAccess', _538 => _538.enabled]) === false ? "Enable Vector Mask" : "Disable Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _539 => _539.vectorMask])) },
18762
- { action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _540 => _540.vectorMask])) },
18763
- { action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _541 => _541.type]) === "annotation" || _optionalChain([active, 'optionalAccess', _542 => _542.type]) === "smart" || _optionalChain([active, 'optionalAccess', _543 => _543.type]) === "shape" || _optionalChain([active, 'optionalAccess', _544 => _544.type]) === "type" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _545 => _545.type]) === "pixel" && _optionalChain([active, 'access', _546 => _546.filters, 'optionalAccess', _547 => _547.length])) },
18901
+ { action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _524 => _524.mask])) },
18902
+ { action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _525 => _525.mask])) },
18903
+ { action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _526 => _526.mask, 'optionalAccess', _527 => _527.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _528 => _528.mask])) },
18904
+ { action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _529 => _529.mask, 'optionalAccess', _530 => _530.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _531 => _531.mask]) && !active.mask.source) },
18905
+ { action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _532 => _532.mask, 'optionalAccess', _533 => _533.source])) },
18906
+ { action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _534 => _534.mask, 'optionalAccess', _535 => _535.source])) },
18907
+ { action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _536 => _536.mask, 'optionalAccess', _537 => _537.source])) && hasSel },
18908
+ { action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _538 => _538.vectorMask])) },
18909
+ { action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess', _539 => _539.vectorMask, 'optionalAccess', _540 => _540.enabled]) === false ? "Enable Vector Mask" : "Disable Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _541 => _541.vectorMask])) },
18910
+ { action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _542 => _542.vectorMask])) },
18911
+ { action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _543 => _543.type]) === "annotation" || _optionalChain([active, 'optionalAccess', _544 => _544.type]) === "smart" || _optionalChain([active, 'optionalAccess', _545 => _545.type]) === "shape" || _optionalChain([active, 'optionalAccess', _546 => _546.type]) === "type" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _547 => _547.type]) === "pixel" && _optionalChain([active, 'access', _548 => _548.filters, 'optionalAccess', _549 => _549.length])) },
18764
18912
  { action: "convert-smart", label: "Convert to Smart Object", enabled: Boolean(active && active.type !== "annotation") },
18765
- { action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _548 => _548.type]) === "smart" },
18766
- { action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _549 => _549.type]) === "smart" },
18767
- { action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess', _550 => _550.type]) === "smart" && !_optionalChain([active, 'access', _551 => _551.smartFilters, 'optionalAccess', _552 => _552.mask]) },
18768
- { action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _553 => _553.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
18913
+ { action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _550 => _550.type]) === "smart" },
18914
+ { action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _551 => _551.type]) === "smart" },
18915
+ { action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess', _552 => _552.type]) === "smart" && !_optionalChain([active, 'access', _553 => _553.smartFilters, 'optionalAccess', _554 => _554.mask]) },
18916
+ { action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _555 => _555.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
18769
18917
  ];
18770
18918
  }
18771
18919
  async function runLayerMenuAction(controller, action) {
18772
18920
  const active = controller.getActiveLayer();
18773
- const id = _optionalChain([active, 'optionalAccess', _554 => _554.id]);
18921
+ const id = _optionalChain([active, 'optionalAccess', _556 => _556.id]);
18774
18922
  try {
18775
18923
  switch (action) {
18776
18924
  case "new-layer":
@@ -18826,10 +18974,10 @@ async function runLayerMenuAction(controller, action) {
18826
18974
  if (id) controller.removeLayerMask(id);
18827
18975
  break;
18828
18976
  case "toggle-mask":
18829
- if (id && _optionalChain([active, 'optionalAccess', _555 => _555.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
18977
+ if (id && _optionalChain([active, 'optionalAccess', _557 => _557.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
18830
18978
  break;
18831
18979
  case "toggle-mask-link":
18832
- if (id && _optionalChain([active, 'optionalAccess', _556 => _556.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
18980
+ if (id && _optionalChain([active, 'optionalAccess', _558 => _558.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
18833
18981
  break;
18834
18982
  case "add-vector-mask":
18835
18983
  case "add-vector-mask-hide":
@@ -18842,7 +18990,7 @@ async function runLayerMenuAction(controller, action) {
18842
18990
  if (id) controller.removeVectorMask(id);
18843
18991
  break;
18844
18992
  case "toggle-vector-mask":
18845
- if (id && _optionalChain([active, 'optionalAccess', _557 => _557.vectorMask])) controller.setVectorMaskProps(id, { enabled: active.vectorMask.enabled === false });
18993
+ if (id && _optionalChain([active, 'optionalAccess', _559 => _559.vectorMask])) controller.setVectorMaskProps(id, { enabled: active.vectorMask.enabled === false });
18846
18994
  break;
18847
18995
  case "rasterize-vector-mask":
18848
18996
  if (id) controller.rasterizeVectorMask(id);
@@ -18863,7 +19011,7 @@ async function runLayerMenuAction(controller, action) {
18863
19011
  if (id) controller.setSmartFilterMask(id, "reveal-all");
18864
19012
  break;
18865
19013
  case "toggle-clip":
18866
- if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _558 => _558.clipped]) });
19014
+ if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _560 => _560.clipped]) });
18867
19015
  break;
18868
19016
  }
18869
19017
  return null;
@@ -18873,7 +19021,7 @@ async function runLayerMenuAction(controller, action) {
18873
19021
  }
18874
19022
  function smartFilterRows(layer) {
18875
19023
  if (layer.type !== "smart") return [];
18876
- const list = _nullishCoalesce(_optionalChain([layer, 'access', _559 => _559.smartFilters, 'optionalAccess', _560 => _560.filters]), () => ( []));
19024
+ const list = _nullishCoalesce(_optionalChain([layer, 'access', _561 => _561.smartFilters, 'optionalAccess', _562 => _562.filters]), () => ( []));
18877
19025
  const rows = list.map((f, index) => ({
18878
19026
  filter: f,
18879
19027
  index,
@@ -18899,8 +19047,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
18899
19047
  };
18900
19048
  collectSerialized(_nullishCoalesce(serialized.layers, () => ( [])));
18901
19049
  const sLayerMap = new Map(allSerializedLayers.map((sl) => [sl.id, sl]));
18902
- const imgW = _optionalChain([state, 'access', _561 => _561.imageDimensions, 'optionalAccess', _562 => _562.width]) || 1;
18903
- const imgH = _optionalChain([state, 'access', _563 => _563.imageDimensions, 'optionalAccess', _564 => _564.height]) || 1;
19050
+ const imgW = _optionalChain([state, 'access', _563 => _563.imageDimensions, 'optionalAccess', _564 => _564.width]) || 1;
19051
+ const imgH = _optionalChain([state, 'access', _565 => _565.imageDimensions, 'optionalAccess', _566 => _566.height]) || 1;
18904
19052
  return ctrlLayers.map((l) => {
18905
19053
  const bounds = controller.getLayerBounds(l.id) || {
18906
19054
  x: 0,
@@ -18909,8 +19057,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
18909
19057
  height: imgH
18910
19058
  };
18911
19059
  const sLayer = sLayerMap.get(l.id);
18912
- const assetKey = _optionalChain([sLayer, 'optionalAccess', _565 => _565.asset]);
18913
- const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _566 => _566.source]) === "document" ? fallbackImageUrl : "");
19060
+ const assetKey = _optionalChain([sLayer, 'optionalAccess', _567 => _567.asset]);
19061
+ const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _568 => _568.source]) === "document" ? fallbackImageUrl : "");
18914
19062
  return {
18915
19063
  id: l.id,
18916
19064
  name: l.name || "Untitled Layer",
@@ -18964,9 +19112,9 @@ async function addLayerOfKind(controller, id, init) {
18964
19112
  const cx = Math.round(canvas.width / 2);
18965
19113
  const cy = Math.round(canvas.height / 2);
18966
19114
  return controller.addTextLayer({
18967
- text: _optionalChain([init, 'optionalAccess', _567 => _567.text]) || "New Text",
18968
- x: typeof _optionalChain([init, 'optionalAccess', _568 => _568.x]) === "number" ? init.x : cx - 100,
18969
- y: typeof _optionalChain([init, 'optionalAccess', _569 => _569.y]) === "number" ? init.y : cy,
19115
+ text: _optionalChain([init, 'optionalAccess', _569 => _569.text]) || "New Text",
19116
+ x: typeof _optionalChain([init, 'optionalAccess', _570 => _570.x]) === "number" ? init.x : cx - 100,
19117
+ y: typeof _optionalChain([init, 'optionalAccess', _571 => _571.y]) === "number" ? init.y : cy,
18970
19118
  ...init
18971
19119
  });
18972
19120
  }
@@ -18979,10 +19127,10 @@ async function addLayerOfKind(controller, id, init) {
18979
19127
  return controller.addShapeLayer({
18980
19128
  shape: {
18981
19129
  kind: "rect",
18982
- x: typeof _optionalChain([init, 'optionalAccess', _570 => _570.x]) === "number" ? init.x : cx - Math.round(w / 2),
18983
- y: typeof _optionalChain([init, 'optionalAccess', _571 => _571.y]) === "number" ? init.y : cy - Math.round(h / 2),
18984
- width: typeof _optionalChain([init, 'optionalAccess', _572 => _572.width]) === "number" ? init.width : w,
18985
- height: typeof _optionalChain([init, 'optionalAccess', _573 => _573.height]) === "number" ? init.height : h
19130
+ x: typeof _optionalChain([init, 'optionalAccess', _572 => _572.x]) === "number" ? init.x : cx - Math.round(w / 2),
19131
+ y: typeof _optionalChain([init, 'optionalAccess', _573 => _573.y]) === "number" ? init.y : cy - Math.round(h / 2),
19132
+ width: typeof _optionalChain([init, 'optionalAccess', _574 => _574.width]) === "number" ? init.width : w,
19133
+ height: typeof _optionalChain([init, 'optionalAccess', _575 => _575.height]) === "number" ? init.height : h
18986
19134
  },
18987
19135
  name: "Rectangle",
18988
19136
  ...init
@@ -18997,10 +19145,10 @@ async function addLayerOfKind(controller, id, init) {
18997
19145
  return controller.addShapeLayer({
18998
19146
  shape: {
18999
19147
  kind: "ellipse",
19000
- x: typeof _optionalChain([init, 'optionalAccess', _574 => _574.x]) === "number" ? init.x : cx - Math.round(w / 2),
19001
- y: typeof _optionalChain([init, 'optionalAccess', _575 => _575.y]) === "number" ? init.y : cy - Math.round(h / 2),
19002
- width: typeof _optionalChain([init, 'optionalAccess', _576 => _576.width]) === "number" ? init.width : w,
19003
- height: typeof _optionalChain([init, 'optionalAccess', _577 => _577.height]) === "number" ? init.height : h
19148
+ x: typeof _optionalChain([init, 'optionalAccess', _576 => _576.x]) === "number" ? init.x : cx - Math.round(w / 2),
19149
+ y: typeof _optionalChain([init, 'optionalAccess', _577 => _577.y]) === "number" ? init.y : cy - Math.round(h / 2),
19150
+ width: typeof _optionalChain([init, 'optionalAccess', _578 => _578.width]) === "number" ? init.width : w,
19151
+ height: typeof _optionalChain([init, 'optionalAccess', _579 => _579.height]) === "number" ? init.height : h
19004
19152
  },
19005
19153
  name: "Ellipse",
19006
19154
  ...init
@@ -19061,18 +19209,18 @@ function layerEffectsPanel(layer) {
19061
19209
  if (!layer) return { ...empty, available: false, reason: "Select a layer to add a layer style." };
19062
19210
  if (layer.type === "adjustment") return { ...empty, available: false, reason: "Adjustment layers cannot have a layer style." };
19063
19211
  const fx = layer.effects;
19064
- const readOnly = Boolean(_optionalChain([layer, 'access', _578 => _578.locks, 'optionalAccess', _579 => _579.all]));
19212
+ const readOnly = Boolean(_optionalChain([layer, 'access', _580 => _580.locks, 'optionalAccess', _581 => _581.all]));
19065
19213
  return {
19066
19214
  available: true,
19067
19215
  readOnly,
19068
19216
  reason: readOnly ? "The layer is locked; unlock it to change its layer style." : void 0,
19069
- enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _580 => _580.enabled]), () => ( true)),
19070
- scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _581 => _581.scale]), () => ( 1)),
19071
- rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _582 => _582.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkHGTDMKNEcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
19217
+ enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _582 => _582.enabled]), () => ( true)),
19218
+ scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _583 => _583.scale]), () => ( 1)),
19219
+ rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _584 => _584.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkHGTDMKNEcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
19072
19220
  };
19073
19221
  }
19074
19222
  function layerEffectsBadge(layer) {
19075
- if (!_optionalChain([layer, 'access', _583 => _583.effects, 'optionalAccess', _584 => _584.items, 'access', _585 => _585.length])) return null;
19223
+ if (!_optionalChain([layer, 'access', _585 => _585.effects, 'optionalAccess', _586 => _586.items, 'access', _587 => _587.length])) return null;
19076
19224
  return _chunkHGTDMKNEcjs.hasActiveEffects.call(void 0, layer.effects) ? "on" : "off";
19077
19225
  }
19078
19226
  var LAYER_EFFECT_MENU = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS.map((kind) => ({ kind, label: _chunkHGTDMKNEcjs.layerEffectLabel.call(void 0, kind) }));
@@ -19117,8 +19265,8 @@ function fillControls(f, allowPattern, patterns) {
19117
19265
  }
19118
19266
  function gradientControls(prefix, g) {
19119
19267
  return [
19120
- { key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _586 => _586.stops, 'access', _587 => _587[0], 'optionalAccess', _588 => _588.color]), () => ( "#000000")) },
19121
- { key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _589 => _589.stops, 'access', _590 => _590[g.stops.length - 1], 'optionalAccess', _591 => _591.color]), () => ( "#ffffff")) },
19268
+ { key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _588 => _588.stops, 'access', _589 => _589[0], 'optionalAccess', _590 => _590.color]), () => ( "#000000")) },
19269
+ { key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _591 => _591.stops, 'access', _592 => _592[g.stops.length - 1], 'optionalAccess', _593 => _593.color]), () => ( "#ffffff")) },
19122
19270
  { key: `${prefix}.style`, label: "Style", type: "select", value: g.style, options: opt(["linear", "Linear"], ["radial", "Radial"], ["angle", "Angle"], ["reflected", "Reflected"], ["diamond", "Diamond"]) },
19123
19271
  { key: `${prefix}.angle`, label: "Angle", type: "range", min: -180, max: 180, step: 1, value: g.angle, unit: "\xB0" },
19124
19272
  { key: `${prefix}.scale`, label: "Scale", type: "range", min: 0.1, max: 1.5, step: 0.01, value: g.scale, percent: true, unit: "%" },
@@ -19210,19 +19358,19 @@ function layerEffectControls(e, patterns = []) {
19210
19358
  }
19211
19359
  function fillOfType(current, type, patterns) {
19212
19360
  if (type === "gradient") return { type: "gradient", gradient: _chunkHGTDMKNEcjs.defaultEffectGradient.call(void 0, ) };
19213
- if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _592 => _592[0], 'optionalAccess', _593 => _593.id]), () => ( "checker")), scale: 1 };
19361
+ if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _594 => _594[0], 'optionalAccess', _595 => _595.id]), () => ( "checker")), scale: 1 };
19214
19362
  return { type: "color", color: current.type === "color" ? current.color : "#000000" };
19215
19363
  }
19216
19364
  function effectControlChange(effect, key, value, patterns = []) {
19217
19365
  const [top, ...rest] = key.split(".");
19218
19366
  if (top === "fill" && rest[0] === "type") return { fill: fillOfType(effect.fill, String(value), patterns) };
19219
19367
  if (top === "patternId" && !rest.length) {
19220
- const name = _optionalChain([patternOptions, 'call', _594 => _594(patterns), 'access', _595 => _595.find, 'call', _596 => _596((o) => o.value === value), 'optionalAccess', _597 => _597.label]);
19368
+ const name = _optionalChain([patternOptions, 'call', _596 => _596(patterns), 'access', _597 => _597.find, 'call', _598 => _598((o) => o.value === value), 'optionalAccess', _599 => _599.label]);
19221
19369
  return name ? { patternId: value, name } : { patternId: value };
19222
19370
  }
19223
19371
  if (!rest.length) return { [top]: value };
19224
19372
  if (top === "fill" && rest[0] === "patternId") {
19225
- const name = _optionalChain([patternOptions, 'call', _598 => _598(patterns), 'access', _599 => _599.find, 'call', _600 => _600((o) => o.value === value), 'optionalAccess', _601 => _601.label]);
19373
+ const name = _optionalChain([patternOptions, 'call', _600 => _600(patterns), 'access', _601 => _601.find, 'call', _602 => _602((o) => o.value === value), 'optionalAccess', _603 => _603.label]);
19226
19374
  return { fill: { ...effect.fill, patternId: value, ...name ? { name } : {} } };
19227
19375
  }
19228
19376
  return { [top]: setPath(getPath(effect, top), rest, value) };
@@ -19249,7 +19397,7 @@ function colorPanelView(controller) {
19249
19397
  profileName: profile.name,
19250
19398
  workingSpace: profile.builtin,
19251
19399
  mode: profile.mode,
19252
- cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access', _602 => _602.cmykProfile, 'optionalAccess', _603 => _603.name]), () => ( null)),
19400
+ cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access', _604 => _604.cmykProfile, 'optionalAccess', _605 => _605.name]), () => ( null)),
19253
19401
  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
19254
19402
  };
19255
19403
  }
@@ -19457,7 +19605,7 @@ var FreeTransformTool = (_class16 = class {
19457
19605
  __init131() {this.error = null}
19458
19606
  __init132() {this.lastResult = null}
19459
19607
  get active() {
19460
- return Boolean(_optionalChain([this, 'access', _604 => _604.sessionRef, 'optionalAccess', _605 => _605.isOpen]));
19608
+ return Boolean(_optionalChain([this, 'access', _606 => _606.sessionRef, 'optionalAccess', _607 => _607.isOpen]));
19461
19609
  }
19462
19610
  get session() {
19463
19611
  return this.active ? this.sessionRef : null;
@@ -19466,7 +19614,7 @@ var FreeTransformTool = (_class16 = class {
19466
19614
  return this.modeValue;
19467
19615
  }
19468
19616
  get interpolation() {
19469
- return _nullishCoalesce(_optionalChain([this, 'access', _606 => _606.sessionRef, 'optionalAccess', _607 => _607.interpolation]), () => ( "bicubic"));
19617
+ return _nullishCoalesce(_optionalChain([this, 'access', _608 => _608.sessionRef, 'optionalAccess', _609 => _609.interpolation]), () => ( "bicubic"));
19470
19618
  }
19471
19619
  /** Whether the open transform has changed anything yet (a commit would add an undo step). */
19472
19620
  get modified() {
@@ -19485,7 +19633,7 @@ var FreeTransformTool = (_class16 = class {
19485
19633
  };
19486
19634
  }
19487
19635
  changed() {
19488
- _optionalChain([this, 'access', _608 => _608.options, 'access', _609 => _609.onChange, 'optionalCall', _610 => _610()]);
19636
+ _optionalChain([this, 'access', _610 => _610.options, 'access', _611 => _611.onChange, 'optionalCall', _612 => _612()]);
19489
19637
  for (const l of this.listeners) l();
19490
19638
  }
19491
19639
  /** Opens a Free Transform (default: the selected pixels of the active layer, or the whole layer). Returns an error message or `null`. */
@@ -19878,7 +20026,7 @@ var FreeTransformTool = (_class16 = class {
19878
20026
  }
19879
20027
  /** Abandons the transform and restores everything. */
19880
20028
  cancel() {
19881
- _optionalChain([this, 'access', _611 => _611.sessionRef, 'optionalAccess', _612 => _612.cancel, 'call', _613 => _613()]);
20029
+ _optionalChain([this, 'access', _613 => _613.sessionRef, 'optionalAccess', _614 => _614.cancel, 'call', _615 => _615()]);
19882
20030
  this.sessionRef = null;
19883
20031
  this.corners = null;
19884
20032
  this.mesh = null;
@@ -19934,7 +20082,7 @@ function imageLayerAppliedEffects(layer) {
19934
20082
  const ref = (r) => ({ effect: r.effect, ...r.name ? { name: r.name } : {}, ...r.provider ? { provider: r.provider } : {} });
19935
20083
  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 } : {} });
19936
20084
  if (layer.type === "smart")
19937
- (_nullishCoalesce(_optionalChain([layer, 'access', _614 => _614.smartFilters, 'optionalAccess', _615 => _615.filters]), () => ( []))).forEach((f, index) => {
20085
+ (_nullishCoalesce(_optionalChain([layer, 'access', _616 => _616.smartFilters, 'optionalAccess', _617 => _617.filters]), () => ( []))).forEach((f, index) => {
19938
20086
  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 });
19939
20087
  });
19940
20088
  return out;
@@ -20086,7 +20234,7 @@ var OTHER_TOOL_LABELS = {
20086
20234
  watermark: "Watermark"
20087
20235
  };
20088
20236
  function imageToolLabel(tool) {
20089
- return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access', _616 => _616.find, 'call', _617 => _617((t) => t.id === tool), 'optionalAccess', _618 => _618.label]), () => ( OTHER_TOOL_LABELS[tool])), () => ( tool));
20237
+ return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access', _618 => _618.find, 'call', _619 => _619((t) => t.id === tool), 'optionalAccess', _620 => _620.label]), () => ( OTHER_TOOL_LABELS[tool])), () => ( tool));
20090
20238
  }
20091
20239
  var IMAGE_TOOL_SHORTCUTS = {
20092
20240
  ...Object.fromEntries(PAINT_TOOLS.filter((t) => t.shortcut).map((t) => [t.id, t.shortcut])),
@@ -21217,4 +21365,8 @@ function createImageEditorDocument(controller, options = {}) {
21217
21365
 
21218
21366
 
21219
21367
 
21220
- 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.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.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.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.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;
21368
+
21369
+
21370
+
21371
+
21372
+ 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.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;