@pixerate/editor 0.197.0 → 0.198.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.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10; var _class11; var _class12; var _class13; var _class14; var _class15;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10; var _class11; var _class12; var _class13; var _class14; var _class15; var _class16;
2
2
 
3
3
 
4
4
 
@@ -3045,7 +3045,7 @@ var GridGraph = class {
3045
3045
  }
3046
3046
  };
3047
3047
 
3048
- // src/image-editor/selection/segment/quick.ts
3048
+ // src/image-editor/selection/segment/work.ts
3049
3049
  var WORK_SIZE = 512;
3050
3050
  var workCache = /* @__PURE__ */ new WeakMap();
3051
3051
  function workImage(pixels, maxSide = WORK_SIZE) {
@@ -3082,6 +3082,155 @@ function workImage(pixels, maxSide = WORK_SIZE) {
3082
3082
  workCache.set(pixels.data, { maxSide, work });
3083
3083
  return work;
3084
3084
  }
3085
+ var GAMMA = 50;
3086
+ var UNITS = 64;
3087
+ function smoothnessWeights(work, roi) {
3088
+ const { width: w, rgb } = work;
3089
+ const { x: rx, y: ry, width: rw, height: rh } = roi;
3090
+ const right = new Float64Array(rw * rh);
3091
+ const down = new Float64Array(rw * rh);
3092
+ let sumSq = 0;
3093
+ let pairs = 0;
3094
+ for (let y = 0; y < rh; y++) {
3095
+ for (let x = 0; x < rw; x++) {
3096
+ const p = y * rw + x;
3097
+ const c = ((ry + y) * w + rx + x) * 3;
3098
+ if (x + 1 < rw) {
3099
+ right[p] = (rgb[c] - rgb[c + 3]) ** 2 + (rgb[c + 1] - rgb[c + 4]) ** 2 + (rgb[c + 2] - rgb[c + 5]) ** 2;
3100
+ sumSq += right[p];
3101
+ pairs++;
3102
+ }
3103
+ if (y + 1 < rh) {
3104
+ const k = c + w * 3;
3105
+ down[p] = (rgb[c] - rgb[k]) ** 2 + (rgb[c + 1] - rgb[k + 1]) ** 2 + (rgb[c + 2] - rgb[k + 2]) ** 2;
3106
+ sumSq += down[p];
3107
+ pairs++;
3108
+ }
3109
+ }
3110
+ }
3111
+ const beta = 1 / (2 * Math.max(1e-6, sumSq / Math.max(1, pairs)));
3112
+ for (let p = 0; p < right.length; p++) {
3113
+ right[p] = Math.round(GAMMA * UNITS * Math.exp(-beta * right[p]));
3114
+ down[p] = Math.round(GAMMA * UNITS * Math.exp(-beta * down[p]));
3115
+ }
3116
+ return { right, down };
3117
+ }
3118
+ function boxBlur(src, w, h, passes) {
3119
+ let a = src;
3120
+ for (let k = 0; k < passes; k++) {
3121
+ const b = new Float32Array(a.length);
3122
+ for (let y = 0; y < h; y++) {
3123
+ for (let x = 0; x < w; x++) {
3124
+ let s = 0;
3125
+ let c = 0;
3126
+ for (let j = Math.max(0, y - 1); j <= Math.min(h - 1, y + 1); j++) {
3127
+ for (let i = Math.max(0, x - 1); i <= Math.min(w - 1, x + 1); i++) {
3128
+ s += a[j * w + i];
3129
+ c++;
3130
+ }
3131
+ }
3132
+ b[y * w + x] = s / c;
3133
+ }
3134
+ }
3135
+ a = b;
3136
+ }
3137
+ return a;
3138
+ }
3139
+ function upscaleRegion(work, pixels, roi, label, enhance) {
3140
+ const { sourceWidth: W, sourceHeight: H, scale, rgb, width: ww } = work;
3141
+ const { x: rx, y: ry, width: rw, height: rh } = roi;
3142
+ let soft = Float32Array.from(label);
3143
+ if (enhance) {
3144
+ soft = boxBlur(soft, rw, rh, 2);
3145
+ for (let i = 0; i < soft.length; i++) soft[i] = Math.min(1, Math.max(0, (soft[i] - 0.5) * 3 + 0.5));
3146
+ }
3147
+ const X0 = Math.max(0, Math.floor(rx / scale));
3148
+ const Y0 = Math.max(0, Math.floor(ry / scale));
3149
+ const X1 = Math.min(W, Math.ceil((rx + rw) / scale));
3150
+ const Y1 = Math.min(H, Math.ceil((ry + rh) / scale));
3151
+ const RW = X1 - X0;
3152
+ const RH = Y1 - Y0;
3153
+ const out = new Uint8Array(RW * RH);
3154
+ const at = (x, y) => soft[Math.min(rh - 1, Math.max(0, y)) * rw + Math.min(rw - 1, Math.max(0, x))];
3155
+ const data = pixels.data;
3156
+ const colOf = new Int32Array(RW);
3157
+ const fxOf = new Float32Array(RW);
3158
+ for (let X = 0; X < RW; X++) {
3159
+ const u = (X0 + X + 0.5) * scale - 0.5 - rx;
3160
+ colOf[X] = Math.floor(u);
3161
+ fxOf[X] = u - colOf[X];
3162
+ }
3163
+ const cellState = (i, j) => {
3164
+ const a = at(i, j), b = at(i + 1, j), c = at(i, j + 1), d = at(i + 1, j + 1);
3165
+ if (a === 1 && b === 1 && c === 1 && d === 1) return 1;
3166
+ if (a === 0 && b === 0 && c === 0 && d === 0) return 0;
3167
+ return 2;
3168
+ };
3169
+ for (let Y = 0; Y < RH; Y++) {
3170
+ const v = (Y0 + Y + 0.5) * scale - 0.5 - ry;
3171
+ const j = Math.floor(v);
3172
+ const fy = v - j;
3173
+ for (let X = 0; X < RW; X++) {
3174
+ const i = colOf[X];
3175
+ const state = cellState(i, j);
3176
+ if (state !== 2) {
3177
+ let end = X + 1;
3178
+ while (end < RW && colOf[end] === i) end++;
3179
+ if (state === 1) out.fill(255, Y * RW + X, Y * RW + end);
3180
+ X = end - 1;
3181
+ continue;
3182
+ }
3183
+ const fx = fxOf[X];
3184
+ const m = (at(i, j) * (1 - fx) + at(i + 1, j) * fx) * (1 - fy) + (at(i, j + 1) * (1 - fx) + at(i + 1, j + 1) * fx) * fy;
3185
+ if (m <= 1e-3 || m >= 0.999) {
3186
+ out[Y * RW + X] = m >= 0.999 ? 255 : 0;
3187
+ continue;
3188
+ }
3189
+ let fr = 0, fg = 0, fb = 0, fn = 0, br = 0, bg = 0, bb = 0, bn = 0;
3190
+ for (let jj = j - 1; jj <= j + 2; jj++) {
3191
+ for (let ii = i - 1; ii <= i + 2; ii++) {
3192
+ if (ii < 0 || jj < 0 || ii >= rw || jj >= rh) continue;
3193
+ const k = ((ry + jj) * ww + rx + ii) * 3;
3194
+ if (soft[jj * rw + ii] >= 0.5) {
3195
+ fr += rgb[k];
3196
+ fg += rgb[k + 1];
3197
+ fb += rgb[k + 2];
3198
+ fn++;
3199
+ } else {
3200
+ br += rgb[k];
3201
+ bg += rgb[k + 1];
3202
+ bb += rgb[k + 2];
3203
+ bn++;
3204
+ }
3205
+ }
3206
+ }
3207
+ let alpha = m;
3208
+ if (fn && bn) {
3209
+ fr /= fn;
3210
+ fg /= fn;
3211
+ fb /= fn;
3212
+ br /= bn;
3213
+ bg /= bn;
3214
+ bb /= bn;
3215
+ const dr = fr - br, dg = fg - bg, db = fb - bb;
3216
+ const len2 = dr * dr + dg * dg + db * db;
3217
+ if (len2 > 400) {
3218
+ const p = ((Y0 + Y) * W + X0 + X) * 4;
3219
+ const a = data[p + 3] / 255;
3220
+ const cr = data[p] * a + 255 * (1 - a) - br;
3221
+ const cg = data[p + 1] * a + 255 * (1 - a) - bg;
3222
+ const cb = data[p + 2] * a + 255 * (1 - a) - bb;
3223
+ const proj = Math.min(1, Math.max(0, (cr * dr + cg * dg + cb * db) / len2));
3224
+ alpha = Math.min(1, Math.max(0, proj * 0.75 + m * 0.25));
3225
+ } else alpha = Math.min(1, Math.max(0, (m - 0.5) * 2 + 0.5));
3226
+ }
3227
+ out[Y * RW + X] = Math.round(alpha * 255);
3228
+ }
3229
+ }
3230
+ return _chunkUYXL6ZWQcjs.selectionFromRegion.call(void 0, W, H, { x: X0, y: Y0, width: RW, height: RH }, out);
3231
+ }
3232
+
3233
+ // src/image-editor/selection/segment/quick.ts
3085
3234
  var BINS = 16;
3086
3235
  var binOf = (rgb, i) => (Math.min(BINS - 1, rgb[i * 3] >> 4) * BINS + Math.min(BINS - 1, rgb[i * 3 + 1] >> 4)) * BINS + Math.min(BINS - 1, rgb[i * 3 + 2] >> 4);
3087
3236
  function costTable(hist, total) {
@@ -3102,8 +3251,6 @@ function costTable(hist, total) {
3102
3251
  for (let i = 0; i < a.length; i++) out[i] = -Math.log((a[i] + floor * Math.max(1, total)) / denom);
3103
3252
  return out;
3104
3253
  }
3105
- var GAMMA = 50;
3106
- var UNITS = 64;
3107
3254
  function strokePixels(points, r, w, h) {
3108
3255
  const mask = new Uint8Array(w * h);
3109
3256
  const list = [];
@@ -3161,23 +3308,7 @@ function segmentStroke(work, stroke, grown, start) {
3161
3308
  }
3162
3309
  const fgCost = costTable(fgHist, fgN);
3163
3310
  const bgCost = costTable(bgHist, bgN);
3164
- let sumSq = 0;
3165
- let pairs = 0;
3166
- for (let y = 0; y < rh; y++) {
3167
- for (let x = 0; x < rw; x++) {
3168
- const g = ((ry + y) * w + rx + x) * 3;
3169
- if (x + 1 < rw) {
3170
- sumSq += (rgb[g] - rgb[g + 3]) ** 2 + (rgb[g + 1] - rgb[g + 4]) ** 2 + (rgb[g + 2] - rgb[g + 5]) ** 2;
3171
- pairs++;
3172
- }
3173
- if (y + 1 < rh) {
3174
- const k = g + w * 3;
3175
- sumSq += (rgb[g] - rgb[k]) ** 2 + (rgb[g + 1] - rgb[k + 1]) ** 2 + (rgb[g + 2] - rgb[k + 2]) ** 2;
3176
- pairs++;
3177
- }
3178
- }
3179
- }
3180
- const beta = 1 / (2 * Math.max(1e-6, sumSq / Math.max(1, pairs)));
3311
+ const { right, down } = smoothnessWeights(work, roi);
3181
3312
  const graph = new GridGraph(rw, rh);
3182
3313
  const HARD = 1e9;
3183
3314
  for (let y = 0; y < rh; y++) {
@@ -3189,16 +3320,8 @@ function segmentStroke(work, stroke, grown, start) {
3189
3320
  const bin = binOf(rgb, g);
3190
3321
  graph.addTerminal(p, Math.round(bgCost[bin] * UNITS), Math.round(fgCost[bin] * UNITS));
3191
3322
  }
3192
- const c = g * 3;
3193
- if (x + 1 < rw) {
3194
- const d = (rgb[c] - rgb[c + 3]) ** 2 + (rgb[c + 1] - rgb[c + 4]) ** 2 + (rgb[c + 2] - rgb[c + 5]) ** 2;
3195
- graph.setEdge(p, 0, Math.round(GAMMA * UNITS * Math.exp(-beta * d)));
3196
- }
3197
- if (y + 1 < rh) {
3198
- const k = c + w * 3;
3199
- const d = (rgb[c] - rgb[k]) ** 2 + (rgb[c + 1] - rgb[k + 1]) ** 2 + (rgb[c + 2] - rgb[k + 2]) ** 2;
3200
- graph.setEdge(p, 1, Math.round(GAMMA * UNITS * Math.exp(-beta * d)));
3201
- }
3323
+ if (x + 1 < rw) graph.setEdge(p, 0, right[p]);
3324
+ if (y + 1 < rh) graph.setEdge(p, 1, down[p]);
3202
3325
  }
3203
3326
  }
3204
3327
  graph.maxflow();
@@ -3239,120 +3362,6 @@ function segmentStroke(work, stroke, grown, start) {
3239
3362
  if (roi.width * roi.height * 2.5 > w * h) roi = { x: 0, y: 0, width: w, height: h };
3240
3363
  }
3241
3364
  }
3242
- function boxBlur(src, w, h, passes) {
3243
- let a = src;
3244
- for (let k = 0; k < passes; k++) {
3245
- const b = new Float32Array(a.length);
3246
- for (let y = 0; y < h; y++) {
3247
- for (let x = 0; x < w; x++) {
3248
- let s = 0;
3249
- let c = 0;
3250
- for (let j = Math.max(0, y - 1); j <= Math.min(h - 1, y + 1); j++) {
3251
- for (let i = Math.max(0, x - 1); i <= Math.min(w - 1, x + 1); i++) {
3252
- s += a[j * w + i];
3253
- c++;
3254
- }
3255
- }
3256
- b[y * w + x] = s / c;
3257
- }
3258
- }
3259
- a = b;
3260
- }
3261
- return a;
3262
- }
3263
- function upscaleRegion(work, pixels, roi, label, enhance) {
3264
- const { sourceWidth: W, sourceHeight: H, scale, rgb, width: ww } = work;
3265
- const { x: rx, y: ry, width: rw, height: rh } = roi;
3266
- let soft = Float32Array.from(label);
3267
- if (enhance) {
3268
- soft = boxBlur(soft, rw, rh, 2);
3269
- for (let i = 0; i < soft.length; i++) soft[i] = Math.min(1, Math.max(0, (soft[i] - 0.5) * 3 + 0.5));
3270
- }
3271
- const X0 = Math.max(0, Math.floor(rx / scale));
3272
- const Y0 = Math.max(0, Math.floor(ry / scale));
3273
- const X1 = Math.min(W, Math.ceil((rx + rw) / scale));
3274
- const Y1 = Math.min(H, Math.ceil((ry + rh) / scale));
3275
- const RW = X1 - X0;
3276
- const RH = Y1 - Y0;
3277
- const out = new Uint8Array(RW * RH);
3278
- const at = (x, y) => soft[Math.min(rh - 1, Math.max(0, y)) * rw + Math.min(rw - 1, Math.max(0, x))];
3279
- const data = pixels.data;
3280
- const colOf = new Int32Array(RW);
3281
- const fxOf = new Float32Array(RW);
3282
- for (let X = 0; X < RW; X++) {
3283
- const u = (X0 + X + 0.5) * scale - 0.5 - rx;
3284
- colOf[X] = Math.floor(u);
3285
- fxOf[X] = u - colOf[X];
3286
- }
3287
- const cellState = (i, j) => {
3288
- const a = at(i, j), b = at(i + 1, j), c = at(i, j + 1), d = at(i + 1, j + 1);
3289
- if (a === 1 && b === 1 && c === 1 && d === 1) return 1;
3290
- if (a === 0 && b === 0 && c === 0 && d === 0) return 0;
3291
- return 2;
3292
- };
3293
- for (let Y = 0; Y < RH; Y++) {
3294
- const v = (Y0 + Y + 0.5) * scale - 0.5 - ry;
3295
- const j = Math.floor(v);
3296
- const fy = v - j;
3297
- for (let X = 0; X < RW; X++) {
3298
- const i = colOf[X];
3299
- const state = cellState(i, j);
3300
- if (state !== 2) {
3301
- let end = X + 1;
3302
- while (end < RW && colOf[end] === i) end++;
3303
- if (state === 1) out.fill(255, Y * RW + X, Y * RW + end);
3304
- X = end - 1;
3305
- continue;
3306
- }
3307
- const fx = fxOf[X];
3308
- const m = (at(i, j) * (1 - fx) + at(i + 1, j) * fx) * (1 - fy) + (at(i, j + 1) * (1 - fx) + at(i + 1, j + 1) * fx) * fy;
3309
- if (m <= 1e-3 || m >= 0.999) {
3310
- out[Y * RW + X] = m >= 0.999 ? 255 : 0;
3311
- continue;
3312
- }
3313
- let fr = 0, fg = 0, fb = 0, fn = 0, br = 0, bg = 0, bb = 0, bn = 0;
3314
- for (let jj = j - 1; jj <= j + 2; jj++) {
3315
- for (let ii = i - 1; ii <= i + 2; ii++) {
3316
- if (ii < 0 || jj < 0 || ii >= rw || jj >= rh) continue;
3317
- const k = ((ry + jj) * ww + rx + ii) * 3;
3318
- if (soft[jj * rw + ii] >= 0.5) {
3319
- fr += rgb[k];
3320
- fg += rgb[k + 1];
3321
- fb += rgb[k + 2];
3322
- fn++;
3323
- } else {
3324
- br += rgb[k];
3325
- bg += rgb[k + 1];
3326
- bb += rgb[k + 2];
3327
- bn++;
3328
- }
3329
- }
3330
- }
3331
- let alpha = m;
3332
- if (fn && bn) {
3333
- fr /= fn;
3334
- fg /= fn;
3335
- fb /= fn;
3336
- br /= bn;
3337
- bg /= bn;
3338
- bb /= bn;
3339
- const dr = fr - br, dg = fg - bg, db = fb - bb;
3340
- const len2 = dr * dr + dg * dg + db * db;
3341
- if (len2 > 400) {
3342
- const p = ((Y0 + Y) * W + X0 + X) * 4;
3343
- const a = data[p + 3] / 255;
3344
- const cr = data[p] * a + 255 * (1 - a) - br;
3345
- const cg = data[p + 1] * a + 255 * (1 - a) - bg;
3346
- const cb = data[p + 2] * a + 255 * (1 - a) - bb;
3347
- const proj = Math.min(1, Math.max(0, (cr * dr + cg * dg + cb * db) / len2));
3348
- alpha = Math.min(1, Math.max(0, proj * 0.75 + m * 0.25));
3349
- } else alpha = Math.min(1, Math.max(0, (m - 0.5) * 2 + 0.5));
3350
- }
3351
- out[Y * RW + X] = Math.round(alpha * 255);
3352
- }
3353
- }
3354
- return _chunkUYXL6ZWQcjs.selectionFromRegion.call(void 0, W, H, { x: X0, y: Y0, width: RW, height: RH }, out);
3355
- }
3356
3365
  function quickSelectStroke(pixels, stroke, options = {}) {
3357
3366
  if (!stroke.length) throw new Error("A stroke needs at least one point.");
3358
3367
  const work = workImage(pixels);
@@ -3386,6 +3395,283 @@ function quickSelectStroke(pixels, stroke, options = {}) {
3386
3395
  return upscaleRegion(work, pixels, done, label, _nullishCoalesce(options.enhanceEdge, () => ( false)));
3387
3396
  }
3388
3397
 
3398
+ // src/image-editor/selection/segment/grabcut.ts
3399
+ var K = 5;
3400
+ var ColorGmm = (_class6 = class {constructor() { _class6.prototype.__init34.call(this);_class6.prototype.__init35.call(this);_class6.prototype.__init36.call(this);_class6.prototype.__init37.call(this); }
3401
+ __init34() {this.logWeight = new Float64Array(K)}
3402
+ __init35() {this.mean = new Float64Array(K * 3)}
3403
+ /** Inverse covariances, row-major 3 × 3. */
3404
+ __init36() {this.inv = new Float64Array(K * 9)}
3405
+ /** ln(weight) − ½ ln((2π)³ |Σ|) per component; −∞ for an empty one. */
3406
+ __init37() {this.logNorm = new Float64Array(K).fill(-Infinity)}
3407
+ /** Fits the components to the pixels `ids` of `rgb`, each in component `comp[id]`. */
3408
+ fit(rgb, ids, comp) {
3409
+ const n = new Float64Array(K);
3410
+ const sum = new Float64Array(K * 3);
3411
+ const prod = new Float64Array(K * 9);
3412
+ for (let t = 0; t < ids.length; t++) {
3413
+ const i = ids[t];
3414
+ const k = comp[i];
3415
+ const c = [rgb[i * 3], rgb[i * 3 + 1], rgb[i * 3 + 2]];
3416
+ n[k]++;
3417
+ for (let a = 0; a < 3; a++) {
3418
+ sum[k * 3 + a] += c[a];
3419
+ for (let b = 0; b < 3; b++) prod[k * 9 + a * 3 + b] += c[a] * c[b];
3420
+ }
3421
+ }
3422
+ const total = ids.length || 1;
3423
+ for (let k = 0; k < K; k++) {
3424
+ if (!n[k]) {
3425
+ this.logNorm[k] = -Infinity;
3426
+ continue;
3427
+ }
3428
+ const m = [sum[k * 3] / n[k], sum[k * 3 + 1] / n[k], sum[k * 3 + 2] / n[k]];
3429
+ const cov = new Float64Array(9);
3430
+ for (let a = 0; a < 3; a++) {
3431
+ for (let b = 0; b < 3; b++) cov[a * 3 + b] = prod[k * 9 + a * 3 + b] / n[k] - m[a] * m[b];
3432
+ cov[a * 4] += 4;
3433
+ }
3434
+ const det = cov[0] * (cov[4] * cov[8] - cov[5] * cov[7]) - cov[1] * (cov[3] * cov[8] - cov[5] * cov[6]) + cov[2] * (cov[3] * cov[7] - cov[4] * cov[6]);
3435
+ const d = Math.max(det, 1e-6);
3436
+ const inv = [
3437
+ (cov[4] * cov[8] - cov[5] * cov[7]) / d,
3438
+ (cov[2] * cov[7] - cov[1] * cov[8]) / d,
3439
+ (cov[1] * cov[5] - cov[2] * cov[4]) / d,
3440
+ (cov[5] * cov[6] - cov[3] * cov[8]) / d,
3441
+ (cov[0] * cov[8] - cov[2] * cov[6]) / d,
3442
+ (cov[2] * cov[3] - cov[0] * cov[5]) / d,
3443
+ (cov[3] * cov[7] - cov[4] * cov[6]) / d,
3444
+ (cov[1] * cov[6] - cov[0] * cov[7]) / d,
3445
+ (cov[0] * cov[4] - cov[1] * cov[3]) / d
3446
+ ];
3447
+ this.mean.set(m, k * 3);
3448
+ this.inv.set(inv, k * 9);
3449
+ this.logWeight[k] = Math.log(n[k] / total);
3450
+ this.logNorm[k] = this.logWeight[k] - 0.5 * Math.log(Math.pow(2 * Math.PI, 3) * d);
3451
+ }
3452
+ }
3453
+ /** ln p(colour | component k), up to the shared constant. */
3454
+ componentLog(k, r, g, b) {
3455
+ const ln = this.logNorm[k];
3456
+ if (ln === -Infinity) return -Infinity;
3457
+ const dr = r - this.mean[k * 3];
3458
+ const dg = g - this.mean[k * 3 + 1];
3459
+ const db = b - this.mean[k * 3 + 2];
3460
+ const v = this.inv;
3461
+ const o = k * 9;
3462
+ const q = dr * (v[o] * dr + v[o + 1] * dg + v[o + 2] * db) + dg * (v[o + 3] * dr + v[o + 4] * dg + v[o + 5] * db) + db * (v[o + 6] * dr + v[o + 7] * dg + v[o + 8] * db);
3463
+ return ln - 0.5 * q;
3464
+ }
3465
+ /** −ln p(colour) under the mixture (large for colours the model hasn't seen). */
3466
+ cost(r, g, b) {
3467
+ let best = -Infinity;
3468
+ const logs = new Array(K);
3469
+ for (let k = 0; k < K; k++) {
3470
+ logs[k] = this.componentLog(k, r, g, b);
3471
+ if (logs[k] > best) best = logs[k];
3472
+ }
3473
+ if (best === -Infinity) return 50;
3474
+ let s = 0;
3475
+ for (let k = 0; k < K; k++) if (logs[k] > -Infinity) s += Math.exp(logs[k] - best);
3476
+ return Math.min(50, -(best + Math.log(s)));
3477
+ }
3478
+ /** The component most likely to have produced the colour. */
3479
+ nearest(r, g, b) {
3480
+ let best = 0;
3481
+ let bestLog = -Infinity;
3482
+ for (let k = 0; k < K; k++) {
3483
+ const l = this.componentLog(k, r, g, b);
3484
+ if (l > bestLog) {
3485
+ bestLog = l;
3486
+ best = k;
3487
+ }
3488
+ }
3489
+ return best;
3490
+ }
3491
+ }, _class6);
3492
+ function initialComponents(rgb, ids, comp) {
3493
+ if (!ids.length) return;
3494
+ const step = Math.max(1, Math.floor(ids.length / 6e3));
3495
+ const sample = [];
3496
+ for (let t = 0; t < ids.length; t += step) sample.push(ids[t]);
3497
+ const centres = [];
3498
+ const dist2 = (i, c) => (rgb[i * 3] - c[0]) ** 2 + (rgb[i * 3 + 1] - c[1]) ** 2 + (rgb[i * 3 + 2] - c[2]) ** 2;
3499
+ centres.push([rgb[sample[0] * 3], rgb[sample[0] * 3 + 1], rgb[sample[0] * 3 + 2]]);
3500
+ const near = sample.map((i) => dist2(i, centres[0]));
3501
+ while (centres.length < K) {
3502
+ let far = 0;
3503
+ for (let t = 1; t < sample.length; t++) if (near[t] > near[far]) far = t;
3504
+ const i = sample[far];
3505
+ const c = [rgb[i * 3], rgb[i * 3 + 1], rgb[i * 3 + 2]];
3506
+ centres.push(c);
3507
+ for (let t = 0; t < sample.length; t++) near[t] = Math.min(near[t], dist2(sample[t], c));
3508
+ }
3509
+ const closest = (i) => {
3510
+ let best = 0;
3511
+ for (let k = 1; k < K; k++) if (dist2(i, centres[k]) < dist2(i, centres[best])) best = k;
3512
+ return best;
3513
+ };
3514
+ for (let round6 = 0; round6 < 6; round6++) {
3515
+ const sum = Array.from({ length: K }, () => [0, 0, 0, 0]);
3516
+ for (const i of sample) {
3517
+ const s = sum[closest(i)];
3518
+ s[0] += rgb[i * 3];
3519
+ s[1] += rgb[i * 3 + 1];
3520
+ s[2] += rgb[i * 3 + 2];
3521
+ s[3]++;
3522
+ }
3523
+ for (let k = 0; k < K; k++) if (sum[k][3]) centres[k] = [sum[k][0] / sum[k][3], sum[k][1] / sum[k][3], sum[k][2] / sum[k][3]];
3524
+ }
3525
+ for (const i of ids) comp[i] = closest(i);
3526
+ }
3527
+ function grabCutLabels(work, setup, iterations) {
3528
+ const { width: w, rgb } = work;
3529
+ const { roi, hardBg, hardFg } = setup;
3530
+ const { x: rx, y: ry, width: rw, height: rh } = roi;
3531
+ const n = rw * rh;
3532
+ const label = setup.initial.slice();
3533
+ const global = new Int32Array(n);
3534
+ for (let y = 0; y < rh; y++) for (let x = 0; x < rw; x++) global[y * rw + x] = (ry + y) * w + rx + x;
3535
+ const comp = new Uint8Array(w * work.height);
3536
+ const fg = new ColorGmm();
3537
+ const bg = new ColorGmm();
3538
+ const { right, down } = smoothnessWeights(work, roi);
3539
+ const HARD = 1e9;
3540
+ for (let iter = 0; iter < iterations; iter++) {
3541
+ const fgIds = [];
3542
+ const bgIds = [];
3543
+ for (let p = 0; p < n; p++) (label[p] ? fgIds : bgIds).push(global[p]);
3544
+ if (!fgIds.length) return label;
3545
+ if (iter === 0) {
3546
+ initialComponents(rgb, fgIds, comp);
3547
+ initialComponents(rgb, bgIds, comp);
3548
+ } else {
3549
+ for (const i of fgIds) comp[i] = fg.nearest(rgb[i * 3], rgb[i * 3 + 1], rgb[i * 3 + 2]);
3550
+ for (const i of bgIds) comp[i] = bg.nearest(rgb[i * 3], rgb[i * 3 + 1], rgb[i * 3 + 2]);
3551
+ }
3552
+ fg.fit(rgb, fgIds, comp);
3553
+ bg.fit(rgb, bgIds, comp);
3554
+ const graph = new GridGraph(rw, rh);
3555
+ for (let p = 0; p < n; p++) {
3556
+ if (hardBg[p]) graph.addTerminal(p, 0, HARD);
3557
+ else if (_optionalChain([hardFg, 'optionalAccess', _66 => _66[p]])) graph.addTerminal(p, HARD, 0);
3558
+ else {
3559
+ const i = global[p] * 3;
3560
+ 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));
3561
+ }
3562
+ if (p % rw + 1 < rw) graph.setEdge(p, 0, right[p]);
3563
+ if (p + rw < n) graph.setEdge(p, 1, down[p]);
3564
+ }
3565
+ graph.maxflow();
3566
+ let changed = 0;
3567
+ for (let p = 0; p < n; p++) {
3568
+ const v = graph.inSource(p) ? 1 : 0;
3569
+ if (v !== label[p]) changed++;
3570
+ label[p] = v;
3571
+ }
3572
+ if (changed <= n * 1e-3) break;
3573
+ }
3574
+ return label;
3575
+ }
3576
+ function keepMainPieces(label, rw, rh, seed) {
3577
+ const n = rw * rh;
3578
+ const piece = new Int32Array(n).fill(-1);
3579
+ const sizes = [];
3580
+ const stack = [];
3581
+ for (let s = 0; s < n; s++) {
3582
+ if (!label[s] || piece[s] >= 0) continue;
3583
+ const id = sizes.length;
3584
+ let size = 0;
3585
+ piece[s] = id;
3586
+ stack.push(s);
3587
+ while (stack.length) {
3588
+ const p = stack.pop();
3589
+ size++;
3590
+ const x = p % rw;
3591
+ for (const q of [x + 1 < rw ? p + 1 : -1, x > 0 ? p - 1 : -1, p + rw < n ? p + rw : -1, p - rw]) {
3592
+ if (q >= 0 && label[q] && piece[q] < 0) {
3593
+ piece[q] = id;
3594
+ stack.push(q);
3595
+ }
3596
+ }
3597
+ }
3598
+ sizes.push(size);
3599
+ }
3600
+ if (!sizes.length) return;
3601
+ const largest = Math.max(...sizes);
3602
+ const keep = (id) => seed !== null && piece[seed] >= 0 ? id === piece[seed] : sizes[id] * 5 >= largest;
3603
+ for (let p = 0; p < n; p++) if (label[p] && !keep(piece[p])) label[p] = 0;
3604
+ }
3605
+ function selectObjectIn(pixels, target, options = {}) {
3606
+ const work = workImage(pixels);
3607
+ const { width: w, height: h, scale } = work;
3608
+ const iterations = Math.max(1, Math.round(_nullishCoalesce(options.iterations, () => ( 5))));
3609
+ const enhance = _nullishCoalesce(options.enhanceEdge, () => ( false));
3610
+ if ("rect" in target) {
3611
+ const r = target.rect;
3612
+ const bx0 = Math.max(0, Math.floor(r.x * scale));
3613
+ const by0 = Math.max(0, Math.floor(r.y * scale));
3614
+ const bx1 = Math.min(w, Math.ceil((r.x + r.width) * scale));
3615
+ const by1 = Math.min(h, Math.ceil((r.y + r.height) * scale));
3616
+ if (bx1 - bx0 < 2 || by1 - by0 < 2) return _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, pixels.width, pixels.height);
3617
+ const m = Math.max(8, Math.round(0.25 * Math.max(bx1 - bx0, by1 - by0)));
3618
+ const rx = Math.max(0, bx0 - m);
3619
+ const ry = Math.max(0, by0 - m);
3620
+ const roi = { x: rx, y: ry, width: Math.min(w, bx1 + m) - rx, height: Math.min(h, by1 + m) - ry };
3621
+ const n = roi.width * roi.height;
3622
+ const initial = new Uint8Array(n);
3623
+ const hardBg = new Uint8Array(n);
3624
+ for (let y = 0; y < roi.height; y++) {
3625
+ for (let x = 0; x < roi.width; x++) {
3626
+ const gx = rx + x;
3627
+ const gy = ry + y;
3628
+ const inside = gx >= bx0 && gx < bx1 && gy >= by0 && gy < by1;
3629
+ initial[y * roi.width + x] = inside ? 1 : 0;
3630
+ hardBg[y * roi.width + x] = inside ? 0 : 1;
3631
+ }
3632
+ }
3633
+ const label = grabCutLabels(work, { roi, initial, hardBg, hardFg: null }, iterations);
3634
+ keepMainPieces(label, roi.width, roi.height, null);
3635
+ return upscaleRegion(work, pixels, roi, label, enhance);
3636
+ }
3637
+ const px2 = Math.min(w - 1, Math.max(0, Math.floor(target.point.x * scale)));
3638
+ const py = Math.min(h - 1, Math.max(0, Math.floor(target.point.y * scale)));
3639
+ let half = Math.max(24, Math.round(0.3 * Math.max(w, h)));
3640
+ for (; ; ) {
3641
+ const rx = Math.max(0, px2 - half);
3642
+ const ry = Math.max(0, py - half);
3643
+ const roi = { x: rx, y: ry, width: Math.min(w, px2 + half + 1) - rx, height: Math.min(h, py + half + 1) - ry };
3644
+ const whole = roi.width === w && roi.height === h;
3645
+ const band = Math.max(4, Math.round(0.15 * half));
3646
+ const n = roi.width * roi.height;
3647
+ const initial = new Uint8Array(n);
3648
+ const hardBg = new Uint8Array(n);
3649
+ const hardFg = new Uint8Array(n);
3650
+ const inBand = (x, y) => rx > 0 && x < band || ry > 0 && y < band || rx + roi.width < w && x >= roi.width - band || ry + roi.height < h && y >= roi.height - band;
3651
+ for (let y = 0; y < roi.height; y++) {
3652
+ for (let x = 0; x < roi.width; x++) {
3653
+ const p = y * roi.width + x;
3654
+ if (inBand(x, y)) hardBg[p] = 1;
3655
+ else initial[p] = 1;
3656
+ if (Math.hypot(rx + x - px2, ry + y - py) <= 1.5) hardFg[p] = 1;
3657
+ }
3658
+ }
3659
+ const label = grabCutLabels(work, { roi, initial, hardBg, hardFg }, iterations);
3660
+ keepMainPieces(label, roi.width, roi.height, (py - ry) * roi.width + (px2 - rx));
3661
+ let touches = false;
3662
+ for (let y = 0; y < roi.height && !touches; y++) {
3663
+ for (let x = 0; x < roi.width; x++) {
3664
+ if (label[y * roi.width + x] && (inBand(x - 1, y) || inBand(x + 1, y) || inBand(x, y - 1) || inBand(x, y + 1))) {
3665
+ touches = true;
3666
+ break;
3667
+ }
3668
+ }
3669
+ }
3670
+ if (!touches || whole) return upscaleRegion(work, pixels, roi, label, enhance);
3671
+ half = Math.round(half * 1.6);
3672
+ }
3673
+ }
3674
+
3389
3675
  // src/image-editor/layers/shape-type-ui.ts
3390
3676
  var DEFAULT_SHAPE_TOOL_OPTIONS = {
3391
3677
  kind: "rect",
@@ -3444,16 +3730,16 @@ function liveShapeForDrag(o, a, b, mods = {}) {
3444
3730
  }
3445
3731
  return null;
3446
3732
  }
3447
- var ShapeDrawGesture = (_class6 = class {
3448
- constructor(controller, options) {;_class6.prototype.__init34.call(this);_class6.prototype.__init35.call(this);_class6.prototype.__init36.call(this);
3733
+ var ShapeDrawGesture = (_class7 = class {
3734
+ constructor(controller, options) {;_class7.prototype.__init38.call(this);_class7.prototype.__init39.call(this);_class7.prototype.__init40.call(this);
3449
3735
  this.controller = controller;
3450
3736
  this.options = options;
3451
3737
  }
3452
3738
 
3453
3739
 
3454
- __init34() {this.start = null}
3455
- __init35() {this.layerId = null}
3456
- __init36() {this.error = null}
3740
+ __init38() {this.start = null}
3741
+ __init39() {this.layerId = null}
3742
+ __init40() {this.error = null}
3457
3743
  get active() {
3458
3744
  return this.start !== null;
3459
3745
  }
@@ -3492,17 +3778,17 @@ var ShapeDrawGesture = (_class6 = class {
3492
3778
  cancel() {
3493
3779
  this.start = null;
3494
3780
  }
3495
- }, _class6);
3781
+ }, _class7);
3496
3782
  function applyShapeOptions(controller, layerId, change) {
3497
3783
  const info = controller.getShapeLayer(layerId);
3498
3784
  const style = {};
3499
3785
  if ("fill" in change) style.fill = _nullishCoalesce(change.fill, () => ( null));
3500
3786
  if ("stroke" in change || "strokeWidth" in change) {
3501
- const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access', _66 => _66.stroke, 'optionalAccess', _67 => _67.paint, 'access', _68 => _68.type]) === "color" ? info.stroke.paint.color : null;
3502
- style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access', _69 => _69.stroke, 'optionalAccess', _70 => _70.width]))), () => ( 2)), paint: color } : null;
3787
+ 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;
3788
+ style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access', _70 => _70.stroke, 'optionalAccess', _71 => _71.width]))), () => ( 2)), paint: color } : null;
3503
3789
  }
3504
3790
  if (Object.keys(style).length) controller.setShapeStyle(layerId, style);
3505
- const live = _optionalChain([info, 'access', _71 => _71.components, 'access', _72 => _72[0], 'optionalAccess', _73 => _73.live]);
3791
+ const live = _optionalChain([info, 'access', _72 => _72.components, 'access', _73 => _73[0], 'optionalAccess', _74 => _74.live]);
3506
3792
  if (!live) return;
3507
3793
  const shape = {};
3508
3794
  if (live.kind === "rect" && change.radius !== void 0) shape.radius = change.radius;
@@ -3513,8 +3799,8 @@ function applyShapeOptions(controller, layerId, change) {
3513
3799
  if (live.kind === "line" && change.arrow !== void 0) shape.endArrow = change.arrow ? { width: (live.weight || 1) * 4, length: (live.weight || 1) * 4 } : null;
3514
3800
  if (Object.keys(shape).length) controller.setShapeComponent(layerId, 0, { shape });
3515
3801
  }
3516
- var TextEditSession = (_class7 = class {
3517
- constructor(controller, layerId, index) {;_class7.prototype.__init37.call(this);_class7.prototype.__init38.call(this);_class7.prototype.__init39.call(this);
3802
+ var TextEditSession = (_class8 = class {
3803
+ constructor(controller, layerId, index) {;_class8.prototype.__init41.call(this);_class8.prototype.__init42.call(this);_class8.prototype.__init43.call(this);
3518
3804
  this.controller = controller;
3519
3805
  this.layerId = layerId;
3520
3806
  const n = this.text.length;
@@ -3524,11 +3810,11 @@ var TextEditSession = (_class7 = class {
3524
3810
 
3525
3811
 
3526
3812
 
3527
- __init37() {this.changed = false}
3528
- __init38() {this.listeners = /* @__PURE__ */ new Set()}
3529
- __init39() {this.error = null}
3813
+ __init41() {this.changed = false}
3814
+ __init42() {this.listeners = /* @__PURE__ */ new Set()}
3815
+ __init43() {this.error = null}
3530
3816
  get layer() {
3531
- const l = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _74 => _74.layer]);
3817
+ const l = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _75 => _75.layer]);
3532
3818
  if (!l || l.type !== "type") throw new Error("The type layer being edited is gone.");
3533
3819
  return l;
3534
3820
  }
@@ -3543,7 +3829,7 @@ var TextEditSession = (_class7 = class {
3543
3829
  }
3544
3830
  /** Whether the layer still exists (it can be deleted or undone away while editing). */
3545
3831
  get alive() {
3546
- return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _75 => _75.layer, 'access', _76 => _76.type]) === "type";
3832
+ return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _76 => _76.layer, 'access', _77 => _77.type]) === "type";
3547
3833
  }
3548
3834
  subscribe(fn) {
3549
3835
  this.listeners.add(fn);
@@ -3741,7 +4027,7 @@ var TextEditSession = (_class7 = class {
3741
4027
  }
3742
4028
  return true;
3743
4029
  }
3744
- }, _class7);
4030
+ }, _class8);
3745
4031
  function typeLayerAt(controller, p, slop = 4) {
3746
4032
  const layers = [...flattenTypeLayers(controller.getLayers())].reverse();
3747
4033
  for (const l of layers) {
@@ -3774,16 +4060,16 @@ function invert(m) {
3774
4060
  const det = a * d - b * c || 1;
3775
4061
  return [d / det, -b / det, -c / det, a / det, (c * f - d * e) / det, (b * e - a * f) / det];
3776
4062
  }
3777
- var TypeToolGesture = (_class8 = class {
3778
- constructor(controller, options) {;_class8.prototype.__init40.call(this);_class8.prototype.__init41.call(this);_class8.prototype.__init42.call(this);
4063
+ var TypeToolGesture = (_class9 = class {
4064
+ constructor(controller, options) {;_class9.prototype.__init44.call(this);_class9.prototype.__init45.call(this);_class9.prototype.__init46.call(this);
3779
4065
  this.controller = controller;
3780
4066
  this.options = options;
3781
4067
  }
3782
4068
 
3783
4069
 
3784
- __init40() {this.session = null}
3785
- __init41() {this.dragStart = null}
3786
- __init42() {this.error = null}
4070
+ __init44() {this.session = null}
4071
+ __init45() {this.dragStart = null}
4072
+ __init46() {this.error = null}
3787
4073
  down(p, mods = {}) {
3788
4074
  this.error = null;
3789
4075
  const hit = typeLayerAt(this.controller, p);
@@ -3831,9 +4117,9 @@ var TypeToolGesture = (_class8 = class {
3831
4117
  finish() {
3832
4118
  const s = this.session;
3833
4119
  this.session = null;
3834
- _optionalChain([s, 'optionalAccess', _77 => _77.close, 'call', _78 => _78()]);
4120
+ _optionalChain([s, 'optionalAccess', _78 => _78.close, 'call', _79 => _79()]);
3835
4121
  }
3836
- }, _class8);
4122
+ }, _class9);
3837
4123
 
3838
4124
  // src/image-editor/selection/shapes.ts
3839
4125
  function polygonCoverage(points, width, height, antiAlias = true) {
@@ -4300,7 +4586,7 @@ function segmentToSelection(width, height, result) {
4300
4586
  const sized = raw.width === width && raw.height === height ? raw : _chunkUYXL6ZWQcjs.resizeSelection.call(void 0, raw, width, height);
4301
4587
  out = _chunkUYXL6ZWQcjs.combineSelections.call(void 0, out, sized, "add");
4302
4588
  }
4303
- return _optionalChain([out, 'optionalAccess', _79 => _79.bounds]) ? out : null;
4589
+ return _optionalChain([out, 'optionalAccess', _80 => _80.bounds]) ? out : null;
4304
4590
  }
4305
4591
  function segmentsToSelection(width, height, results) {
4306
4592
  let out = null;
@@ -4581,7 +4867,7 @@ function deserializeChannels(value, size, problems = []) {
4581
4867
  visible: v.visible === true
4582
4868
  });
4583
4869
  } catch (err) {
4584
- problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess', _80 => _80.name]), () => ( "?")))}" could not be read: ${err instanceof Error ? err.message : String(err)}.`);
4870
+ problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess', _81 => _81.name]), () => ( "?")))}" could not be read: ${err instanceof Error ? err.message : String(err)}.`);
4585
4871
  }
4586
4872
  }
4587
4873
  return out;
@@ -4619,16 +4905,16 @@ function checkEffectTime(time) {
4619
4905
  return time;
4620
4906
  }
4621
4907
  function checkEffectAnimation(animate) {
4622
- const duration = _optionalChain([animate, 'optionalAccess', _81 => _81.duration]);
4908
+ const duration = _optionalChain([animate, 'optionalAccess', _82 => _82.duration]);
4623
4909
  if (!(typeof duration === "number" && Number.isFinite(duration) && duration > 0 && duration <= _chunkUYXL6ZWQcjs.MAX_EFFECT_ANIMATION_MS)) {
4624
4910
  throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`animate.duration must be more than 0 and at most ${_chunkUYXL6ZWQcjs.MAX_EFFECT_ANIMATION_MS} ms.`);
4625
4911
  }
4626
4912
  return { duration: Math.round(duration) };
4627
4913
  }
4628
4914
  function effectLayerTiming(g, d) {
4629
- if (!_optionalChain([d, 'optionalAccess', _82 => _82.duration])) return null;
4915
+ if (!_optionalChain([d, 'optionalAccess', _83 => _83.duration])) return null;
4630
4916
  const time = _nullishCoalesce(g.time, () => ( 0));
4631
- return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access', _83 => _83.animate, 'optionalAccess', _84 => _84.duration]), () => ( d.duration)), loops: d.loop };
4917
+ 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 };
4632
4918
  }
4633
4919
 
4634
4920
  // src/image-editor/effects.ts
@@ -4673,18 +4959,18 @@ function effectPixelsToSurface(p, depth) {
4673
4959
  }
4674
4960
  return _chunkCWM3CUUXcjs.surfaceFromDeepPixels.call(void 0, { width: p.width, height: p.height, data: d }, 4);
4675
4961
  }
4676
- var ImageEffectsEngine = (_class9 = class {
4962
+ var ImageEffectsEngine = (_class10 = class {
4677
4963
 
4678
- __init43() {this.cache = /* @__PURE__ */ new Map()}
4679
- __init44() {this.pending = /* @__PURE__ */ new Map()}
4680
- __init45() {this.failures = /* @__PURE__ */ new Map()}
4964
+ __init47() {this.cache = /* @__PURE__ */ new Map()}
4965
+ __init48() {this.pending = /* @__PURE__ */ new Map()}
4966
+ __init49() {this.failures = /* @__PURE__ */ new Map()}
4681
4967
 
4682
- __init46() {this.descriptions = /* @__PURE__ */ new Map()}
4683
- __init47() {this.listeners = /* @__PURE__ */ new Set()}
4968
+ __init50() {this.descriptions = /* @__PURE__ */ new Map()}
4969
+ __init51() {this.listeners = /* @__PURE__ */ new Set()}
4684
4970
 
4685
- __init48() {this.generation = 0}
4971
+ __init52() {this.generation = 0}
4686
4972
 
4687
- constructor(options = {}) {;_class9.prototype.__init43.call(this);_class9.prototype.__init44.call(this);_class9.prototype.__init45.call(this);_class9.prototype.__init46.call(this);_class9.prototype.__init47.call(this);_class9.prototype.__init48.call(this);
4973
+ constructor(options = {}) {;_class10.prototype.__init47.call(this);_class10.prototype.__init48.call(this);_class10.prototype.__init49.call(this);_class10.prototype.__init50.call(this);_class10.prototype.__init51.call(this);_class10.prototype.__init52.call(this);
4688
4974
  this.slot = _nullishCoalesce(options.slot, () => ( new (0, _chunkA3A5TI6Rcjs.EffectsSlot)()));
4689
4975
  this.maxEntries = _nullishCoalesce(options.maxEntries, () => ( 24));
4690
4976
  this.pool = new (0, _chunkPY4GWSE2cjs.EffectRendererPool)({ maxRenderers: options.maxRenderers });
@@ -4793,7 +5079,7 @@ var ImageEffectsEngine = (_class9 = class {
4793
5079
  this.detach();
4794
5080
  this.listeners.clear();
4795
5081
  }
4796
- }, _class9);
5082
+ }, _class10);
4797
5083
 
4798
5084
  // src/image-editor/free-transform.ts
4799
5085
  var FREE_TRANSFORM_CONTENTS = ["auto", "layer", "selection", "selection-copy", "selection-outline"];
@@ -4875,20 +5161,20 @@ function liftMask(mask, sel, o) {
4875
5161
  }
4876
5162
  return { lifted: _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width: area.width, height: area.height, data: lifted }, 4, area.x, area.y), rest: _chunkCWM3CUUXcjs.writeRegion.call(void 0, mask, area, rest) };
4877
5163
  }
4878
- var FreeTransformSession = (_class10 = class {
4879
- constructor(host, init = {}) {;_class10.prototype.__init49.call(this);_class10.prototype.__init50.call(this);_class10.prototype.__init51.call(this);_class10.prototype.__init52.call(this);_class10.prototype.__init53.call(this);_class10.prototype.__init54.call(this);_class10.prototype.__init55.call(this);_class10.prototype.__init56.call(this);_class10.prototype.__init57.call(this);_class10.prototype.__init58.call(this);_class10.prototype.__init59.call(this);
5164
+ var FreeTransformSession = (_class11 = class {
5165
+ constructor(host, init = {}) {;_class11.prototype.__init53.call(this);_class11.prototype.__init54.call(this);_class11.prototype.__init55.call(this);_class11.prototype.__init56.call(this);_class11.prototype.__init57.call(this);_class11.prototype.__init58.call(this);_class11.prototype.__init59.call(this);_class11.prototype.__init60.call(this);_class11.prototype.__init61.call(this);_class11.prototype.__init62.call(this);_class11.prototype.__init63.call(this);
4880
5166
  this.host = host;
4881
5167
  if (init.interpolation !== void 0 && !_chunkHGTDMKNEcjs.isInterpolation.call(void 0, init.interpolation)) fail(`Unknown interpolation "${String(init.interpolation)}"; use nearest, bilinear or bicubic.`);
4882
5168
  this.interp = _nullishCoalesce(init.interpolation, () => ( "bicubic"));
4883
5169
  const sel = host.selection();
4884
- const selected = Boolean(_optionalChain([sel, 'optionalAccess', _85 => _85.bounds]));
5170
+ const selected = Boolean(_optionalChain([sel, 'optionalAccess', _86 => _86.bounds]));
4885
5171
  let content = _nullishCoalesce(init.content, () => ( "auto"));
4886
5172
  if (!["auto", "layer", "selection", "selection-copy", "selection-outline"].includes(content)) {
4887
5173
  fail(`Unknown content "${String(content)}"; use auto, layer, selection, selection-copy or selection-outline.`);
4888
5174
  }
4889
5175
  const targetId = _nullishCoalesce(init.layerId, () => ( host.activeLayerId()));
4890
- const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess', _86 => _86.layer]) : void 0;
4891
- const smartTarget = (_optionalChain([target, 'optionalAccess', _87 => _87.type]) === "smart" || _optionalChain([target, 'optionalAccess', _88 => _88.type]) === "shape" || _optionalChain([target, 'optionalAccess', _89 => _89.type]) === "type") && (_nullishCoalesce(init.channel, () => ( (target.id === host.activeLayerId() ? host.activeTarget() : "pixels")))) !== "mask";
5176
+ const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess', _87 => _87.layer]) : void 0;
5177
+ 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";
4892
5178
  if (content === "auto") content = selected && !smartTarget ? "selection" : "layer";
4893
5179
  this.content = content;
4894
5180
  if (content !== "layer" && !selected) fail(`Nothing is selected; ${content} needs a selection. Select first, or use content layer.`);
@@ -4912,9 +5198,9 @@ var FreeTransformSession = (_class10 = class {
4912
5198
  const mask = layer.mask && !layer.mask.source ? layer.mask : void 0;
4913
5199
  const channel = _nullishCoalesce(init.channel, () => ( (layer.id === host.activeLayerId() ? host.activeTarget() : "pixels")));
4914
5200
  if (channel !== "pixels" && channel !== "mask") fail(`Unknown channel "${String(channel)}"; use pixels or mask.`);
4915
- const linked = _optionalChain([mask, 'optionalAccess', _90 => _90.linked]) !== false;
5201
+ const linked = _optionalChain([mask, 'optionalAccess', _91 => _91.linked]) !== false;
4916
5202
  const maskAlone = channel === "mask" && (!linked || layer.type !== "pixel");
4917
- if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access', _91 => _91.mask, 'optionalAccess', _92 => _92.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.`);
5203
+ 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.`);
4918
5204
  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.`);
4919
5205
  if (!layer.visible && content !== "selection-copy") fail(`Layer "${layer.name || id}" is hidden; show it before you transform it.`);
4920
5206
  if (content !== "selection-copy") {
@@ -5017,7 +5303,7 @@ var FreeTransformSession = (_class10 = class {
5017
5303
  };
5018
5304
  this.copyId = copy.id;
5019
5305
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, layer.id);
5020
- this.startLayers = _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _93 => _93.parent, 'optionalAccess', _94 => _94.id]), () => ( null)), loc.index + 1);
5306
+ this.startLayers = _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _94 => _94.parent, 'optionalAccess', _95 => _95.id]), () => ( null)), loc.index + 1);
5021
5307
  this.parts.push({ what: "pixels", offset: o, moving: lifted, base: null, reduced: /* @__PURE__ */ new Map() });
5022
5308
  moves.push("pixels");
5023
5309
  }
@@ -5043,7 +5329,7 @@ var FreeTransformSession = (_class10 = class {
5043
5329
  /** The layer being transformed (`null` for `selection-outline`). */
5044
5330
 
5045
5331
  /** The new layer of a `selection-copy`. */
5046
- __init49() {this.copyId = null}
5332
+ __init53() {this.copyId = null}
5047
5333
  /** The frame (document pixels). */
5048
5334
 
5049
5335
  /** What moves. */
@@ -5055,27 +5341,27 @@ var FreeTransformSession = (_class10 = class {
5055
5341
  */
5056
5342
 
5057
5343
  /** True when the layer is a smart object (the transform sets its placement). */
5058
- __init50() {this.smartObject = false}
5344
+ __init54() {this.smartObject = false}
5059
5345
  /** True when the layer is a shape layer (the transform maps its paths and renders them again). */
5060
- __init51() {this.shapeLayer = false}
5061
- __init52() {this.shape = null}
5346
+ __init55() {this.shapeLayer = false}
5347
+ __init56() {this.shape = null}
5062
5348
  /** True when the layer is a type layer (the transform sets its text matrix; affine only). */
5063
- __init53() {this.typeLayer = false}
5064
- __init54() {this.typeTarget = null}
5349
+ __init57() {this.typeLayer = false}
5350
+ __init58() {this.typeTarget = null}
5065
5351
 
5066
- __init55() {this.smart = null}
5067
- __init56() {this.smartReduced = /* @__PURE__ */ new Map()}
5352
+ __init59() {this.smart = null}
5353
+ __init60() {this.smartReduced = /* @__PURE__ */ new Map()}
5068
5354
 
5069
- __init57() {this.smartMasksMoved = false}
5355
+ __init61() {this.smartMasksMoved = false}
5070
5356
 
5071
- __init58() {this.parts = []}
5357
+ __init62() {this.parts = []}
5072
5358
 
5073
5359
 
5074
5360
 
5075
5361
 
5076
5362
  /** The stack this session last showed: anything else means the document changed under it. */
5077
5363
 
5078
- __init59() {this.closed = false}
5364
+ __init63() {this.closed = false}
5079
5365
  /** The current geometry. */
5080
5366
  get geometry() {
5081
5367
  return this.geometryValue;
@@ -5126,7 +5412,7 @@ var FreeTransformSession = (_class10 = class {
5126
5412
  moveVectorMask(layers) {
5127
5413
  const g = this.geometryValue;
5128
5414
  if (!this.layerId || this.copyId || !this.moves.includes("pixels") || _chunkUYXL6ZWQcjs.isIdentityTransform.call(void 0, g)) return layers;
5129
- const vm = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess', _95 => _95.layer, 'access', _96 => _96.vectorMask]);
5415
+ const vm = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess', _96 => _96.layer, 'access', _97 => _97.vectorMask]);
5130
5416
  if (!vm || vm.linked === false) return layers;
5131
5417
  const warp = _chunkUYXL6ZWQcjs.hasWarp.call(void 0, g);
5132
5418
  const f = warp ? _chunkUYXL6ZWQcjs.transformMap.call(void 0, g) : null;
@@ -5297,11 +5583,11 @@ var FreeTransformSession = (_class10 = class {
5297
5583
  result(changed, layers, selection) {
5298
5584
  let bounds = null;
5299
5585
  const id = _nullishCoalesce(this.copyId, () => ( this.layerId));
5300
- const layer = id ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _97 => _97.layer]) : void 0;
5301
- if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess', _98 => _98.type]) === "pixel") bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, this.host.pixelsOf(layer)), layer.offset);
5302
- else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess', _99 => _99.type]) === "smart" || _optionalChain([layer, 'optionalAccess', _100 => _100.type]) === "shape" || _optionalChain([layer, 'optionalAccess', _101 => _101.type]) === "type")) bounds = _chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.surface);
5303
- else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess', _102 => _102.mask])) bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.mask.surface), layer.type === "pixel" ? layer.offset : { x: 0, y: 0 });
5304
- else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess', _103 => _103.bounds]) ? { ...selection.bounds } : null;
5586
+ const layer = id ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _98 => _98.layer]) : void 0;
5587
+ 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);
5588
+ 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);
5589
+ 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 });
5590
+ else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess', _104 => _104.bounds]) ? { ...selection.bounds } : null;
5305
5591
  return {
5306
5592
  layerId: _nullishCoalesce(this.copyId, () => ( this.layerId)),
5307
5593
  content: this.content,
@@ -5312,7 +5598,7 @@ var FreeTransformSession = (_class10 = class {
5312
5598
  changed
5313
5599
  };
5314
5600
  }
5315
- }, _class10);
5601
+ }, _class11);
5316
5602
 
5317
5603
  // src/image-editor/color-management.ts
5318
5604
  var DEFAULT_PROOF = { intent: "relative", bpc: true, simulatePaper: false, gamutWarning: false };
@@ -5330,7 +5616,7 @@ function deserializeColorMode(raw, problems) {
5330
5616
  }
5331
5617
  function effectiveProof(proof, mode) {
5332
5618
  if (proof) return proof;
5333
- if (_optionalChain([mode, 'optionalAccess', _104 => _104.mode]) === "cmyk") return { ...DEFAULT_PROOF, profile: mode.profile, intent: mode.intent };
5619
+ if (_optionalChain([mode, 'optionalAccess', _105 => _105.mode]) === "cmyk") return { ...DEFAULT_PROOF, profile: mode.profile, intent: mode.intent };
5334
5620
  return null;
5335
5621
  }
5336
5622
  function colorModePlanes(doc, mode) {
@@ -5385,7 +5671,7 @@ function resolveProfile(doc) {
5385
5671
  return p;
5386
5672
  }
5387
5673
  function profileBytes(doc) {
5388
- if (_optionalChain([doc, 'optionalAccess', _105 => _105.icc])) return doc.icc;
5674
+ if (_optionalChain([doc, 'optionalAccess', _106 => _106.icc])) return doc.icc;
5389
5675
  const p = resolveProfile(doc);
5390
5676
  return _nullishCoalesce(p.bytes, () => ( _chunkBROJYMWUcjs.encodeProfile.call(void 0, p)));
5391
5677
  }
@@ -5547,7 +5833,7 @@ function paintCoverageInto(base, coverage, apply, rects, depth = null) {
5547
5833
  else tiles.delete(key);
5548
5834
  continue;
5549
5835
  }
5550
- const src = _nullishCoalesce(_optionalChain([base, 'access', _106 => _106.tiles, 'access', _107 => _107.get, 'call', _108 => _108(key), 'optionalAccess', _109 => _109.data]), () => ( defaultTile(base)));
5836
+ const src = _nullishCoalesce(_optionalChain([base, 'access', _107 => _107.tiles, 'access', _108 => _108.get, 'call', _109 => _109(key), 'optionalAccess', _110 => _110.data]), () => ( defaultTile(base)));
5551
5837
  const data = _chunkEBDCRTZIcjs.applyStrokeToTile.call(void 0, coverage, src, base.channels, t.tx, t.ty, apply);
5552
5838
  const tile = _chunkCWM3CUUXcjs.finishTile.call(void 0, data, base.channels, base.defaultValue);
5553
5839
  if (tile) tiles.set(key, tile);
@@ -5561,8 +5847,8 @@ function defaultTile(s) {
5561
5847
  if (s.defaultValue) d.fill(s.defaultValue);
5562
5848
  return d;
5563
5849
  }
5564
- var PaintStrokeSession = (_class11 = class {
5565
- constructor(controller, target, stroke, apply, depth = null) {;_class11.prototype.__init60.call(this);_class11.prototype.__init61.call(this);_class11.prototype.__init62.call(this);_class11.prototype.__init63.call(this);_class11.prototype.__init64.call(this);_class11.prototype.__init65.call(this);_class11.prototype.__init66.call(this);_class11.prototype.__init67.call(this);_class11.prototype.__init68.call(this);_class11.prototype.__init69.call(this);_class11.prototype.__init70.call(this);
5850
+ var PaintStrokeSession = (_class12 = class {
5851
+ constructor(controller, target, stroke, apply, depth = null) {;_class12.prototype.__init64.call(this);_class12.prototype.__init65.call(this);_class12.prototype.__init66.call(this);_class12.prototype.__init67.call(this);_class12.prototype.__init68.call(this);_class12.prototype.__init69.call(this);_class12.prototype.__init70.call(this);_class12.prototype.__init71.call(this);_class12.prototype.__init72.call(this);_class12.prototype.__init73.call(this);_class12.prototype.__init74.call(this);
5566
5852
  this.controller = controller;
5567
5853
  this.target = target;
5568
5854
  this.apply = apply;
@@ -5599,28 +5885,28 @@ var PaintStrokeSession = (_class11 = class {
5599
5885
 
5600
5886
 
5601
5887
 
5602
- __init60() {this.touched = /* @__PURE__ */ new Set()}
5888
+ __init64() {this.touched = /* @__PURE__ */ new Set()}
5603
5889
 
5604
5890
 
5605
- __init61() {this.mixerInit = null}
5606
- __init62() {this.retouch = null}
5891
+ __init65() {this.mixerInit = null}
5892
+ __init66() {this.retouch = null}
5607
5893
  /** Writes a mask's RGBA view back (sequential retouching on a mask). */
5608
- __init63() {this.flushView = null}
5609
- __init64() {this.started = false}
5894
+ __init67() {this.flushView = null}
5895
+ __init68() {this.started = false}
5610
5896
  /** Mixer tiles written since the last update: they get new tile objects so the compositor sees them change. */
5611
- __init65() {this.fresh = /* @__PURE__ */ new Set()}
5612
- __init66() {this.last = null}
5613
- __init67() {this.closed = false}
5897
+ __init69() {this.fresh = /* @__PURE__ */ new Set()}
5898
+ __init70() {this.last = null}
5899
+ __init71() {this.closed = false}
5614
5900
  /** Brush and eraser strokes on a 16- or 32-bit document: the deep samples of each touched tile. */
5615
5901
 
5616
- __init68() {this.liveDeep = /* @__PURE__ */ new Map()}
5902
+ __init72() {this.liveDeep = /* @__PURE__ */ new Map()}
5617
5903
  /**
5618
5904
  * Mixer Brush, Smudge and Sponge on a 16- or 32-bit layer: they read and write float working
5619
5905
  * tiles on the 8-bit 0..255 sRGB-encoded scale, which keep the fractions bytes would round away.
5620
5906
  */
5621
5907
 
5622
- __init69() {this.work = /* @__PURE__ */ new Map()}
5623
- __init70() {this.workRead = /* @__PURE__ */ new Map()}
5908
+ __init73() {this.work = /* @__PURE__ */ new Map()}
5909
+ __init74() {this.workRead = /* @__PURE__ */ new Map()}
5624
5910
  /** The pre-stroke tile as a float working tile (cached; `null`: transparent). */
5625
5911
  readWork(key) {
5626
5912
  if (!this.workRead.has(key)) this.workRead.set(key, workTileOf(this.base.tiles.get(key)));
@@ -5660,7 +5946,7 @@ var PaintStrokeSession = (_class11 = class {
5660
5946
  writeTile: (tx, ty) => {
5661
5947
  const key = _chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty);
5662
5948
  if (!this.touched.has(key)) {
5663
- this.work.set(key, _nullishCoalesce(_optionalChain([read, 'call', _110 => _110(key), 'optionalAccess', _111 => _111.slice, 'call', _112 => _112()]), () => ( new Float32Array(_chunkCWM3CUUXcjs.TILE * _chunkCWM3CUUXcjs.TILE * 4))));
5949
+ 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))));
5664
5950
  this.touched.add(key);
5665
5951
  }
5666
5952
  this.fresh.add(key);
@@ -5672,11 +5958,11 @@ var PaintStrokeSession = (_class11 = class {
5672
5958
  offset: a.offset,
5673
5959
  lockTransparency: a.lockTransparency,
5674
5960
  selection: a.selection,
5675
- readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access', _113 => _113.live, 'access', _114 => _114.get, 'call', _115 => _115(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _116 => _116.data]), () => ( (this.base.defaultValue ? defaultTile(this.base) : null))),
5961
+ 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))),
5676
5962
  writeTile: (tx, ty) => {
5677
5963
  const key = _chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty);
5678
5964
  if (!this.touched.has(key)) {
5679
- const src = _nullishCoalesce(_optionalChain([this, 'access', _117 => _117.base, 'access', _118 => _118.tiles, 'access', _119 => _119.get, 'call', _120 => _120(key), 'optionalAccess', _121 => _121.data]), () => ( defaultTile(this.base)));
5965
+ 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)));
5680
5966
  this.live.set(key, { data: new Uint8ClampedArray(src), uniform: null });
5681
5967
  this.touched.add(key);
5682
5968
  }
@@ -5693,11 +5979,11 @@ var PaintStrokeSession = (_class11 = class {
5693
5979
  if (this.closed || !points.length) return;
5694
5980
  if (!this.started) {
5695
5981
  this.started = true;
5696
- if (_optionalChain([this, 'access', _122 => _122.retouch, 'optionalAccess', _123 => _123.kind]) === "coverage") this.retouch.start(points[0]);
5982
+ if (_optionalChain([this, 'access', _123 => _123.retouch, 'optionalAccess', _124 => _124.kind]) === "coverage") this.retouch.start(points[0]);
5697
5983
  }
5698
5984
  this.last = points[points.length - 1];
5699
5985
  const rects = this.mixer ? this.mixer.push(points) : this.stroke.push(points);
5700
- _optionalChain([this, 'access', _124 => _124.flushView, 'optionalCall', _125 => _125()]);
5986
+ _optionalChain([this, 'access', _125 => _125.flushView, 'optionalCall', _126 => _126()]);
5701
5987
  this.update(rects);
5702
5988
  }
5703
5989
  update(rects) {
@@ -5727,7 +6013,7 @@ var PaintStrokeSession = (_class11 = class {
5727
6013
  for (const [key, { tx, ty, r }] of regions) {
5728
6014
  if (this.deep) {
5729
6015
  const rt = this.retouch;
5730
- const paint = _optionalChain([rt, 'optionalAccess', _126 => _126.kind]) === "coverage" ? rt.paint() : null;
6016
+ const paint = _optionalChain([rt, 'optionalAccess', _127 => _127.kind]) === "coverage" ? rt.paint() : null;
5731
6017
  if (paint && paint.kind !== "tone") {
5732
6018
  const prevWork = this.touched.has(key) ? this.work.get(key) : void 0;
5733
6019
  this.touched.add(key);
@@ -5738,13 +6024,13 @@ var PaintStrokeSession = (_class11 = class {
5738
6024
  const prev2 = this.touched.has(key) ? this.liveDeep.get(key) : void 0;
5739
6025
  this.touched.add(key);
5740
6026
  const opts = prev2 ? { into: prev2, region: r, channels: ch } : { channels: ch };
5741
- const d = _optionalChain([rt, 'optionalAccess', _127 => _127.kind]) === "coverage" && _optionalChain([paint, 'optionalAccess', _128 => _128.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);
6027
+ 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);
5742
6028
  this.liveDeep.set(key, d);
5743
6029
  this.live.set(key, { data: _chunkCWM3CUUXcjs.proxyOf.call(void 0, d, ch), uniform: null, deep: d });
5744
6030
  continue;
5745
6031
  }
5746
- const src = _nullishCoalesce(_optionalChain([this, 'access', _129 => _129.base, 'access', _130 => _130.tiles, 'access', _131 => _131.get, 'call', _132 => _132(key), 'optionalAccess', _133 => _133.data]), () => ( defaultTile(this.base)));
5747
- const prev = this.touched.has(key) ? _optionalChain([this, 'access', _134 => _134.live, 'access', _135 => _135.get, 'call', _136 => _136(key), 'optionalAccess', _137 => _137.data]) : void 0;
6032
+ 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)));
6033
+ 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;
5748
6034
  this.touched.add(key);
5749
6035
  const data = this.compositeTile(src, tx, ty, prev ? { into: prev, region: r } : {});
5750
6036
  this.live.set(key, { data, uniform: null });
@@ -5756,12 +6042,12 @@ var PaintStrokeSession = (_class11 = class {
5756
6042
  if (this.closed) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("This stroke has already ended.");
5757
6043
  const last = _nullishCoalesce(this.last, () => ( void 0));
5758
6044
  const rects = this.mixer ? this.mixer.finish(last) : this.stroke.finish(last);
5759
- _optionalChain([this, 'access', _138 => _138.flushView, 'optionalCall', _139 => _139()]);
6045
+ _optionalChain([this, 'access', _139 => _139.flushView, 'optionalCall', _140 => _140()]);
5760
6046
  this.update(rects);
5761
6047
  this.closed = true;
5762
6048
  const ch = this.base.channels;
5763
6049
  const r = this.retouch;
5764
- if (_optionalChain([r, 'optionalAccess', _140 => _140.kind]) === "coverage" && r.finalPaint) {
6050
+ if (_optionalChain([r, 'optionalAccess', _141 => _141.kind]) === "coverage" && r.finalPaint) {
5765
6051
  const final = r.finalPaint(this.stroke.coverage);
5766
6052
  if (final) {
5767
6053
  for (const key of this.touched) {
@@ -5770,7 +6056,7 @@ var PaintStrokeSession = (_class11 = class {
5770
6056
  this.retouchDeepTile(key, tx, ty, final, {});
5771
6057
  continue;
5772
6058
  }
5773
- const src = _nullishCoalesce(_optionalChain([this, 'access', _141 => _141.base, 'access', _142 => _142.tiles, 'access', _143 => _143.get, 'call', _144 => _144(key), 'optionalAccess', _145 => _145.data]), () => ( defaultTile(this.base)));
6059
+ 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)));
5774
6060
  this.live.set(key, { data: this.compositeTile(src, tx, ty, {}, final), uniform: null });
5775
6061
  }
5776
6062
  }
@@ -5792,7 +6078,7 @@ var PaintStrokeSession = (_class11 = class {
5792
6078
  const b = this.mixer ? this.mixer.bounds : this.stroke.coverage.bounds;
5793
6079
  const result = { layerId: this.target.id, channel: this.target.channel, bounds: changed ? b : null, dabs: (_nullishCoalesce(this.mixer, () => ( this.stroke))).dabCount };
5794
6080
  if (mixerLoad) result.mixerLoad = mixerLoad;
5795
- if (_optionalChain([r, 'optionalAccess', _146 => _146.result])) Object.assign(result, r.result());
6081
+ if (_optionalChain([r, 'optionalAccess', _147 => _147.result])) Object.assign(result, r.result());
5796
6082
  return result;
5797
6083
  }
5798
6084
  /** Abandons the stroke and restores the layer. */
@@ -5801,7 +6087,7 @@ var PaintStrokeSession = (_class11 = class {
5801
6087
  this.closed = true;
5802
6088
  this.controller._strokeCommit(this.before, this.target.id, this.target.channel, null);
5803
6089
  }
5804
- }, _class11);
6090
+ }, _class12);
5805
6091
  function workRegionOf(surface, rect, depth) {
5806
6092
  if (!depth) return Float32Array.from(_chunkCWM3CUUXcjs.readRegion.call(void 0, surface, rect));
5807
6093
  const d = _chunkCWM3CUUXcjs.readDeepRegion.call(void 0, surface, rect, depth);
@@ -5918,14 +6204,14 @@ function migrateSerializedImageEditorState(data) {
5918
6204
  const legacy = data;
5919
6205
  const adjustments = normalizeStoredAdjustments(legacy.adjustments);
5920
6206
  return {
5921
- version: _optionalChain([adjustments, 'access', _147 => _147.layers, 'optionalAccess', _148 => _148.length]) ? 2 : 1,
6207
+ version: _optionalChain([adjustments, 'access', _148 => _148.layers, 'optionalAccess', _149 => _149.length]) ? 2 : 1,
5922
6208
  crop: legacy.crop ? { ...legacy.crop } : null,
5923
6209
  transform: { ...DEFAULT_TRANSFORM, ...legacy.transform },
5924
6210
  adjustments: serializeAdjustments(adjustments),
5925
6211
  depthMask: {
5926
6212
  ...DEFAULT_DEPTH_MASK,
5927
6213
  ...legacy.depthMask,
5928
- depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _149 => _149.depthMask, 'optionalAccess', _150 => _150.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
6214
+ depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _150 => _150.depthMask, 'optionalAccess', _151 => _151.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
5929
6215
  },
5930
6216
  annotations: JSON.parse(JSON.stringify(_nullishCoalesce(legacy.annotations, () => ( [])))),
5931
6217
  ...legacy.selection ? { selection: { ...legacy.selection } } : {}
@@ -5954,36 +6240,36 @@ function migrateToLayeredState(data, size) {
5954
6240
  var DEFAULT_TRANSFORM = _chunkUYXL6ZWQcjs.DEFAULT_TRANSFORM_VALUES;
5955
6241
  var DEFAULT_DEPTH_MASK = _chunkUYXL6ZWQcjs.DEFAULT_DEPTH_MASK_VALUES;
5956
6242
  var DEVELOP_KEYS = ["brightness", "contrast", "saturation", "exposure", "temperature", "tint"];
5957
- var ImageEditorController = (_class12 = class {
6243
+ var ImageEditorController = (_class13 = class {
5958
6244
 
5959
6245
 
5960
- __init71() {this.imageElement = null}
5961
- __init72() {this.listeners = /* @__PURE__ */ new Set()}
5962
- __init73() {this.histogramListeners = /* @__PURE__ */ new Set()}
6246
+ __init75() {this.imageElement = null}
6247
+ __init76() {this.listeners = /* @__PURE__ */ new Set()}
6248
+ __init77() {this.histogramListeners = /* @__PURE__ */ new Set()}
5963
6249
 
5964
6250
  // History stacks
5965
- __init74() {this.undoStack = []}
5966
- __init75() {this.redoStack = []}
6251
+ __init78() {this.undoStack = []}
6252
+ __init79() {this.redoStack = []}
5967
6253
 
5968
6254
 
5969
- __init76() {this.isApplyingHistory = false}
6255
+ __init80() {this.isApplyingHistory = false}
5970
6256
 
5971
6257
  /** Pixels the selection tools sample (host-provided or read back from the source). */
5972
- __init77() {this.samplePixels = null}
5973
- __init78() {this.samplePixelsOverride = false}
6258
+ __init81() {this.samplePixels = null}
6259
+ __init82() {this.samplePixelsOverride = false}
5974
6260
  /** Decoded source pixels (the Background's surface), by the buffer or element they came from. */
5975
- __init79() {this.sourceSurfaces = /* @__PURE__ */ new WeakMap()}
5976
- __init80() {this.viewKey = []}
6261
+ __init83() {this.sourceSurfaces = /* @__PURE__ */ new WeakMap()}
6262
+ __init84() {this.viewKey = []}
5977
6263
  /** For `compositePixels` and mask evaluation (the renderer keeps its own for the viewport). */
5978
- __init81() {this.compositor = new (0, _chunkUYXL6ZWQcjs.LayerCompositor)()}
6264
+ __init85() {this.compositor = new (0, _chunkUYXL6ZWQcjs.LayerCompositor)()}
5979
6265
  /** The segmentation provider behind `selectSubject` (see `setSegmentationProvider`). */
5980
- __init82() {this.segmentation = null}
6266
+ __init86() {this.segmentation = null}
5981
6267
  /** The effects provider slot (see `setEffectsProvider`). */
5982
- __init83() {this.effects = new (0, _chunkA3A5TI6Rcjs.EffectsSlot)()}
6268
+ __init87() {this.effects = new (0, _chunkA3A5TI6Rcjs.EffectsSlot)()}
5983
6269
  /** Renders provider effects: effect smart filter results and effect layers. */
5984
- __init84() {this.effectsEngine = new ImageEffectsEngine({ slot: this.effects })}
5985
- __init85() {this.effectRefresh = "none"}
5986
- constructor(options = {}) {;_class12.prototype.__init71.call(this);_class12.prototype.__init72.call(this);_class12.prototype.__init73.call(this);_class12.prototype.__init74.call(this);_class12.prototype.__init75.call(this);_class12.prototype.__init76.call(this);_class12.prototype.__init77.call(this);_class12.prototype.__init78.call(this);_class12.prototype.__init79.call(this);_class12.prototype.__init80.call(this);_class12.prototype.__init81.call(this);_class12.prototype.__init82.call(this);_class12.prototype.__init83.call(this);_class12.prototype.__init84.call(this);_class12.prototype.__init85.call(this);_class12.prototype.__init86.call(this);_class12.prototype.__init87.call(this);_class12.prototype.__init88.call(this);_class12.prototype.__init89.call(this);_class12.prototype.__init90.call(this);_class12.prototype.__init91.call(this);_class12.prototype.__init92.call(this);_class12.prototype.__init93.call(this);_class12.prototype.__init94.call(this);_class12.prototype.__init95.call(this);_class12.prototype.__init96.call(this);_class12.prototype.__init97.call(this);_class12.prototype.__init98.call(this);_class12.prototype.__init99.call(this);_class12.prototype.__init100.call(this);_class12.prototype.__init101.call(this);
6270
+ __init88() {this.effectsEngine = new ImageEffectsEngine({ slot: this.effects })}
6271
+ __init89() {this.effectRefresh = "none"}
6272
+ constructor(options = {}) {;_class13.prototype.__init75.call(this);_class13.prototype.__init76.call(this);_class13.prototype.__init77.call(this);_class13.prototype.__init78.call(this);_class13.prototype.__init79.call(this);_class13.prototype.__init80.call(this);_class13.prototype.__init81.call(this);_class13.prototype.__init82.call(this);_class13.prototype.__init83.call(this);_class13.prototype.__init84.call(this);_class13.prototype.__init85.call(this);_class13.prototype.__init86.call(this);_class13.prototype.__init87.call(this);_class13.prototype.__init88.call(this);_class13.prototype.__init89.call(this);_class13.prototype.__init90.call(this);_class13.prototype.__init91.call(this);_class13.prototype.__init92.call(this);_class13.prototype.__init93.call(this);_class13.prototype.__init94.call(this);_class13.prototype.__init95.call(this);_class13.prototype.__init96.call(this);_class13.prototype.__init97.call(this);_class13.prototype.__init98.call(this);_class13.prototype.__init99.call(this);_class13.prototype.__init100.call(this);_class13.prototype.__init101.call(this);_class13.prototype.__init102.call(this);_class13.prototype.__init103.call(this);_class13.prototype.__init104.call(this);_class13.prototype.__init105.call(this);
5987
6273
  this.effects.subscribe(() => this.queueEffectRefresh("all"));
5988
6274
  this.effectsEngine.subscribe(() => this.queueEffectRefresh("incomplete"));
5989
6275
  if (options.effects) this.effects.set(options.effects);
@@ -6001,7 +6287,7 @@ var ImageEditorController = (_class12 = class {
6001
6287
  sourceIsOpaque: () => this.sourceIsOpaque(),
6002
6288
  version: () => `${this.sourceVersion()}:${this.patternsVersion()}`,
6003
6289
  globalLight: () => this.state.globalLight,
6004
- pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _151 => _151.state, 'access', _152 => _152.patterns, 'optionalAccess', _153 => _153.find, 'call', _154 => _154((p) => p.id === id)]), () => ( null))
6290
+ 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))
6005
6291
  };
6006
6292
  this.state = {
6007
6293
  sourceUrl: typeof options.image === "string" ? options.image : null,
@@ -6034,13 +6320,13 @@ var ImageEditorController = (_class12 = class {
6034
6320
  };
6035
6321
  }
6036
6322
  this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
6037
- if (_optionalChain([options, 'access', _155 => _155.initialState, 'optionalAccess', _156 => _156.selection])) {
6323
+ if (_optionalChain([options, 'access', _156 => _156.initialState, 'optionalAccess', _157 => _157.selection])) {
6038
6324
  try {
6039
6325
  this.state.selection = normalizeSelection(_chunkUYXL6ZWQcjs.deserializeSelection.call(void 0, options.initialState.selection));
6040
6326
  } catch (e20) {
6041
6327
  }
6042
6328
  }
6043
- if (_optionalChain([options, 'access', _157 => _157.initialState, 'optionalAccess', _158 => _158.channels])) {
6329
+ if (_optionalChain([options, 'access', _158 => _158.initialState, 'optionalAccess', _159 => _159.channels])) {
6044
6330
  const channels = deserializeChannels(options.initialState.channels, this.naturalSize, this.lastLoadProblems);
6045
6331
  if (channels.length) this.state.channels = channels;
6046
6332
  }
@@ -6116,7 +6402,7 @@ var ImageEditorController = (_class12 = class {
6116
6402
  * Where layer pixels changed since the last viewport render, when only strokes changed them
6117
6403
  * (the renderer then recomposites just those rectangles); `'all'` after any other change.
6118
6404
  */
6119
- __init86() {this.pendingDirty = "all"}
6405
+ __init90() {this.pendingDirty = "all"}
6120
6406
  notify(strokeRects) {
6121
6407
  if (strokeRects) this.docRevision++;
6122
6408
  if (strokeRects && this.pendingDirty !== "all") this.pendingDirty.push(...strokeRects);
@@ -6124,7 +6410,7 @@ var ImageEditorController = (_class12 = class {
6124
6410
  this.syncViews();
6125
6411
  this.syncDisplay();
6126
6412
  const currentState = { ...this.state };
6127
- _optionalChain([this, 'access', _159 => _159.onStateChange, 'optionalCall', _160 => _160(currentState)]);
6413
+ _optionalChain([this, 'access', _160 => _160.onStateChange, 'optionalCall', _161 => _161(currentState)]);
6128
6414
  this.listeners.forEach((l) => l(currentState));
6129
6415
  if (this.effects.provider) this.queueEffectRefresh("incomplete");
6130
6416
  }
@@ -6153,7 +6439,7 @@ var ImageEditorController = (_class12 = class {
6153
6439
  if (l.type === "group") {
6154
6440
  const children = walk(l.children);
6155
6441
  if (children !== l.children) next2 = { ...l, children };
6156
- } else if (l.type === "smart" && _optionalChain([l, 'access', _161 => _161.smartFilters, 'optionalAccess', _162 => _162.filters, 'access', _163 => _163.some, 'call', _164 => _164((f) => f.kind === "effect")]) && (all || _chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
6442
+ } 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))) {
6157
6443
  try {
6158
6444
  const r = _chunkUYXL6ZWQcjs.rerender.call(void 0, l, canvas);
6159
6445
  if (all || !_chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
@@ -6249,8 +6535,8 @@ var ImageEditorController = (_class12 = class {
6249
6535
  */
6250
6536
  async updateEffectFilter(layerId, filterId, changes, commitToHistory = true) {
6251
6537
  const layer = _chunkUYXL6ZWQcjs.requireSmartObject.call(void 0, this.state.layers, layerId);
6252
- const was = _optionalChain([layer, 'access', _165 => _165.smartFilters, 'optionalAccess', _166 => _166.filters, 'access', _167 => _167.find, 'call', _168 => _168((f) => f.id === filterId)]);
6253
- 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', _169 => _169.smartFilters, 'optionalAccess', _170 => _170.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
6538
+ const was = _optionalChain([layer, 'access', _166 => _166.smartFilters, 'optionalAccess', _167 => _167.filters, 'access', _168 => _168.find, 'call', _169 => _169((f) => f.id === filterId)]);
6539
+ 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"}.`);
6254
6540
  const update = {};
6255
6541
  if (changes.values) {
6256
6542
  const d = await this.describeEffect(was.effect);
@@ -6292,7 +6578,7 @@ var ImageEditorController = (_class12 = class {
6292
6578
  const layer = {
6293
6579
  type: "pixel",
6294
6580
  id,
6295
- name: _optionalChain([options, 'access', _171 => _171.name, 'optionalAccess', _172 => _172.trim, 'call', _173 => _173()]) || d.name,
6581
+ name: _optionalChain([options, 'access', _172 => _172.name, 'optionalAccess', _173 => _173.trim, 'call', _174 => _174()]) || d.name,
6296
6582
  visible: true,
6297
6583
  opacity: _nullishCoalesce(options.opacity, () => ( 1)),
6298
6584
  blend: _nullishCoalesce(blend, () => ( "normal")),
@@ -6317,7 +6603,7 @@ var ImageEditorController = (_class12 = class {
6317
6603
  */
6318
6604
  async updateEffectLayer(layerId, changes, commitToHistory = true) {
6319
6605
  const found = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, layerId);
6320
- const layer = _optionalChain([found, 'optionalAccess', _174 => _174.layer]);
6606
+ const layer = _optionalChain([found, 'optionalAccess', _175 => _175.layer]);
6321
6607
  if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
6322
6608
  _chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
6323
6609
  const g = layer.generator;
@@ -6346,7 +6632,7 @@ var ImageEditorController = (_class12 = class {
6346
6632
  * and how long it runs, the longest of theirs (ms). Null when none animates.
6347
6633
  */
6348
6634
  getAnimation() {
6349
- const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access', _175 => _175.generator, 'optionalAccess', _176 => _176.animate]));
6635
+ 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]));
6350
6636
  if (!layers.length) return null;
6351
6637
  return { duration: Math.max(...layers.map((l) => l.generator.animate.duration)), layerIds: layers.map((l) => l.id) };
6352
6638
  }
@@ -6363,7 +6649,7 @@ var ImageEditorController = (_class12 = class {
6363
6649
  const { width, height } = this.naturalSize;
6364
6650
  const surfaces = /* @__PURE__ */ new Map();
6365
6651
  for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers)) {
6366
- if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access', _177 => _177.generator, 'optionalAccess', _178 => _178.animate])) continue;
6652
+ if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access', _178 => _178.generator, 'optionalAccess', _179 => _179.animate])) continue;
6367
6653
  const g = l.generator;
6368
6654
  const pixels = await this.effectsEngine.renderLayer(g.effect, g.values, { width, height, depth: this.bitDepth, time: (_nullishCoalesce(g.time, () => ( 0))) + time });
6369
6655
  surfaces.set(l.id, effectPixelsToSurface(pixels, this.bitDepth));
@@ -6383,7 +6669,7 @@ var ImageEditorController = (_class12 = class {
6383
6669
  })
6384
6670
  );
6385
6671
  }
6386
- __init87() {this.displayFor = null}
6672
+ __init91() {this.displayFor = null}
6387
6673
  /** Keeps the renderer's display transform in step with the document profile, mode and Proof Setup. */
6388
6674
  syncDisplay() {
6389
6675
  const s = this.state;
@@ -6424,7 +6710,7 @@ var ImageEditorController = (_class12 = class {
6424
6710
  transform: { ...s.transform },
6425
6711
  outputOpacity: s.outputOpacity,
6426
6712
  selection: _nullishCoalesce(s.selection, () => ( null)),
6427
- ..._optionalChain([s, 'access', _179 => _179.channels, 'optionalAccess', _180 => _180.length]) ? { channels: s.channels } : {},
6713
+ ..._optionalChain([s, 'access', _180 => _180.channels, 'optionalAccess', _181 => _181.length]) ? { channels: s.channels } : {},
6428
6714
  source: {
6429
6715
  sourceUrl: s.sourceUrl,
6430
6716
  element: this.imageElement,
@@ -6460,7 +6746,7 @@ var ImageEditorController = (_class12 = class {
6460
6746
  if (entry.colorMode) s.colorMode = entry.colorMode;
6461
6747
  else delete s.colorMode;
6462
6748
  s.selection = entry.selection;
6463
- if (_optionalChain([entry, 'access', _181 => _181.channels, 'optionalAccess', _182 => _182.length])) s.channels = entry.channels;
6749
+ if (_optionalChain([entry, 'access', _182 => _182.channels, 'optionalAccess', _183 => _183.length])) s.channels = entry.channels;
6464
6750
  else delete s.channels;
6465
6751
  if (this.imageElement !== entry.source.element && !this.samplePixelsOverride) this.samplePixels = null;
6466
6752
  this.imageElement = entry.source.element;
@@ -6472,7 +6758,7 @@ var ImageEditorController = (_class12 = class {
6472
6758
  }
6473
6759
  }
6474
6760
  /** Set while `asOneStep` runs: the step is already recorded, so nested commands add none. */
6475
- __init88() {this.historyGrouped = false}
6761
+ __init92() {this.historyGrouped = false}
6476
6762
  /**
6477
6763
  * Runs `fn` as one undo step: history is recorded once, before it, and the commands it calls
6478
6764
  * record none. If `fn` throws, the step is dropped and the state goes back to before it, so a
@@ -6535,7 +6821,7 @@ var ImageEditorController = (_class12 = class {
6535
6821
  get canUndo() {
6536
6822
  return this.undoStack.length > 0;
6537
6823
  }
6538
- __init89() {this.docRevision = 0}
6824
+ __init93() {this.docRevision = 0}
6539
6825
  /**
6540
6826
  * Bumped on every change to the document (an undoable edit, a stroke, undo, redo), not on view
6541
6827
  * or tool changes, nor on `loadImage` (the source image is the host's, not part of the document). `createImageEditorDocument` uses it to tell document changes apart.
@@ -6667,7 +6953,7 @@ var ImageEditorController = (_class12 = class {
6667
6953
  return this.state.layers;
6668
6954
  }
6669
6955
  getLayer(id) {
6670
- return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _183 => _183.layer]);
6956
+ return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _184 => _184.layer]);
6671
6957
  }
6672
6958
  /** The active layer, or `undefined`. */
6673
6959
  getActiveLayer() {
@@ -6680,7 +6966,7 @@ var ImageEditorController = (_class12 = class {
6680
6966
  setActiveLayer(id, target = "pixels") {
6681
6967
  if (id !== null && !this.getLayer(id)) return false;
6682
6968
  const layer = id ? this.getLayer(id) : void 0;
6683
- const t = target === "mask" && _optionalChain([layer, 'optionalAccess', _184 => _184.mask]) ? "mask" : target === "filter-mask" && _optionalChain([layer, 'optionalAccess', _185 => _185.type]) === "smart" && _optionalChain([layer, 'access', _186 => _186.smartFilters, 'optionalAccess', _187 => _187.mask]) ? "filter-mask" : "pixels";
6969
+ 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";
6684
6970
  if (this.state.activeLayerId === id && this.state.activeTarget === t) return true;
6685
6971
  this.state.activeLayerId = id;
6686
6972
  this.state.activeTarget = t;
@@ -6699,7 +6985,7 @@ var ImageEditorController = (_class12 = class {
6699
6985
  if (!b) return null;
6700
6986
  return { x: b.x + layer.offset.x, y: b.y + layer.offset.y, width: b.width, height: b.height, data: _chunkCWM3CUUXcjs.readRegion.call(void 0, surface, b) };
6701
6987
  }
6702
- __init90() {this.boundsCache = /* @__PURE__ */ new WeakMap()}
6988
+ __init94() {this.boundsCache = /* @__PURE__ */ new WeakMap()}
6703
6989
  /**
6704
6990
  * Document bounds of a layer's non-transparent pixels (pixel layers; the Background's source
6705
6991
  * included), or `null` for an empty or non-pixel layer.
@@ -6842,11 +7128,11 @@ var ImageEditorController = (_class12 = class {
6842
7128
  surfaceOf: (l) => this.surfaceOf(l),
6843
7129
  version: `${this.sourceVersion()}:${this.patternsVersion()}`,
6844
7130
  globalLight: this.state.globalLight,
6845
- pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _188 => _188.state, 'access', _189 => _189.patterns, 'optionalAccess', _190 => _190.find, 'call', _191 => _191((p) => p.id === id)]), () => ( null))
7131
+ 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))
6846
7132
  };
6847
7133
  }
6848
- __init91() {this.sourceIds = /* @__PURE__ */ new WeakMap()}
6849
- __init92() {this.nextSourceId = 1}
7134
+ __init95() {this.sourceIds = /* @__PURE__ */ new WeakMap()}
7135
+ __init96() {this.nextSourceId = 1}
6850
7136
  /** Changes whenever the Background's source pixels can have changed. */
6851
7137
  sourceVersion() {
6852
7138
  const key = this.samplePixelsOverride ? this.samplePixels : _nullishCoalesce(this.imageElement, () => ( this.samplePixels));
@@ -6895,7 +7181,7 @@ var ImageEditorController = (_class12 = class {
6895
7181
  }
6896
7182
  return fits ? fromPixels(px2) : null;
6897
7183
  }
6898
- __init93() {this.opaqueCache = /* @__PURE__ */ new WeakMap()}
7184
+ __init97() {this.opaqueCache = /* @__PURE__ */ new WeakMap()}
6899
7185
  /** Whether every source pixel is opaque (some legacy renders depend on it). */
6900
7186
  sourceIsOpaque() {
6901
7187
  const s = this.sourceSurface();
@@ -6919,7 +7205,7 @@ var ImageEditorController = (_class12 = class {
6919
7205
  if (!ctx || typeof ctx.getImageData !== "function") return null;
6920
7206
  ctx.drawImage(el, 0, 0, width, height);
6921
7207
  const data = ctx.getImageData(0, 0, width, height);
6922
- if (!_optionalChain([data, 'optionalAccess', _192 => _192.data]) || data.data.length < width * height * 4) return null;
7208
+ if (!_optionalChain([data, 'optionalAccess', _193 => _193.data]) || data.data.length < width * height * 4) return null;
6923
7209
  return { width, height, data: data.data };
6924
7210
  } catch (e24) {
6925
7211
  return null;
@@ -6932,7 +7218,7 @@ var ImageEditorController = (_class12 = class {
6932
7218
  const prev = this.state.layers;
6933
7219
  const depth = this.bitDepth;
6934
7220
  this.state.layers = next;
6935
- _optionalChain([extra, 'optionalCall', _193 => _193()]);
7221
+ _optionalChain([extra, 'optionalCall', _194 => _194()]);
6936
7222
  if (depth !== 8 && this.bitDepth === depth) this.state.layers = keepDeepLayers(prev, this.state.layers);
6937
7223
  if (this.state.activeLayerId && !_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, this.state.activeLayerId)) {
6938
7224
  this.state.activeLayerId = _chunkUYXL6ZWQcjs.activeLayerAfterRemoval.call(void 0, prev, this.state.layers, this.state.activeLayerId);
@@ -6970,7 +7256,7 @@ var ImageEditorController = (_class12 = class {
6970
7256
  const layer = {
6971
7257
  type: "pixel",
6972
7258
  id: init.id && !ids.has(init.id) ? init.id : _chunkUYXL6ZWQcjs.newLayerId.call(void 0, ),
6973
- name: _optionalChain([init, 'access', _194 => _194.name, 'optionalAccess', _195 => _195.trim, 'call', _196 => _196()]) || this.nextLayerName(),
7259
+ name: _optionalChain([init, 'access', _195 => _195.name, 'optionalAccess', _196 => _196.trim, 'call', _197 => _197()]) || this.nextLayerName(),
6974
7260
  visible: _nullishCoalesce(init.visible, () => ( true)),
6975
7261
  opacity: _nullishCoalesce(init.opacity, () => ( 1)),
6976
7262
  blend: _nullishCoalesce(blend, () => ( "normal")),
@@ -6997,7 +7283,7 @@ var ImageEditorController = (_class12 = class {
6997
7283
  async decodeImage(image) {
6998
7284
  const trimmed = image.trim();
6999
7285
  let png = null;
7000
- if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _197 => _197.bytes]), () => ( null));
7286
+ if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _198 => _198.bytes]), () => ( null));
7001
7287
  else if (/^[A-Za-z0-9+/=\s]+$/.test(trimmed) && trimmed.length > 16) {
7002
7288
  try {
7003
7289
  const bytes = _chunkCWM3CUUXcjs.base64ToBytes.call(void 0, trimmed);
@@ -7046,7 +7332,7 @@ var ImageEditorController = (_class12 = class {
7046
7332
  removeLayer(id) {
7047
7333
  const next = _chunkUYXL6ZWQcjs.removeLayer.call(void 0, this.state.layers, id);
7048
7334
  this.commitLayers(next, () => {
7049
- if (this.state.selectedAnnotationId && !_chunkHGTDMKNEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkUYXL6ZWQcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _198 => _198.id]) === this.state.selectedAnnotationId)) {
7335
+ 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)) {
7050
7336
  this.state.selectedAnnotationId = null;
7051
7337
  }
7052
7338
  });
@@ -7055,9 +7341,9 @@ var ImageEditorController = (_class12 = class {
7055
7341
  moveLayer(id, placement) {
7056
7342
  const next = _chunkUYXL6ZWQcjs.moveLayer.call(void 0, this.state.layers, id, placement);
7057
7343
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, next, id);
7058
- if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _199 => _199.parent, 'optionalAccess', _200 => _200.id]), () => ( null)), index: loc.index };
7344
+ if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _200 => _200.parent, 'optionalAccess', _201 => _201.id]), () => ( null)), index: loc.index };
7059
7345
  this.commitLayers(next);
7060
- return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _201 => _201.parent, 'optionalAccess', _202 => _202.id]), () => ( null)), index: loc.index };
7346
+ return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _202 => _202.parent, 'optionalAccess', _203 => _203.id]), () => ( null)), index: loc.index };
7061
7347
  }
7062
7348
  /**
7063
7349
  * Changes name, visibility, opacity, fill, blend, clipping, locks or (groups) collapsed state, as
@@ -7074,7 +7360,7 @@ var ImageEditorController = (_class12 = class {
7074
7360
  const group = {
7075
7361
  type: "group",
7076
7362
  id: _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "group"),
7077
- name: _optionalChain([init, 'access', _203 => _203.name, 'optionalAccess', _204 => _204.trim, 'call', _205 => _205()]) || "Group",
7363
+ name: _optionalChain([init, 'access', _204 => _204.name, 'optionalAccess', _205 => _205.trim, 'call', _206 => _206()]) || "Group",
7078
7364
  visible: true,
7079
7365
  opacity: 1,
7080
7366
  blend,
@@ -7167,7 +7453,7 @@ var ImageEditorController = (_class12 = class {
7167
7453
  sel = this.layerTransparency(id);
7168
7454
  } else {
7169
7455
  const current = this.state.selection;
7170
- if (!_optionalChain([current, 'optionalAccess', _206 => _206.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all / transparency.");
7456
+ if (!_optionalChain([current, 'optionalAccess', _207 => _207.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all / transparency.");
7171
7457
  sel = from === "hide-selection" ? _chunkUYXL6ZWQcjs.invertSelection.call(void 0, current) : current;
7172
7458
  }
7173
7459
  mask = this.maskFromSelection(sel, props);
@@ -7198,7 +7484,7 @@ var ImageEditorController = (_class12 = class {
7198
7484
  const layer = _chunkUYXL6ZWQcjs.requireLayer.call(void 0, this.state.layers, id).layer;
7199
7485
  const name = layer.name || id;
7200
7486
  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.`);
7201
- if (_optionalChain([layer, 'access', _207 => _207.mask, 'optionalAccess', _208 => _208.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.`);
7487
+ 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.`);
7202
7488
  return layer;
7203
7489
  }
7204
7490
  requireVectorMask(id) {
@@ -7208,10 +7494,10 @@ var ImageEditorController = (_class12 = class {
7208
7494
  }
7209
7495
  /** Components from a path spec: `components`, or one `shape` / `subpaths`. */
7210
7496
  vectorMaskComponents(path) {
7211
- if (_optionalChain([path, 'access', _209 => _209.components, 'optionalAccess', _210 => _210.length]) && (path.shape !== void 0 || path.subpaths !== void 0)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
7497
+ 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.");
7212
7498
  if (path.fillRule !== void 0 && path.fillRule !== "nonzero" && path.fillRule !== "evenodd") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7213
- const specs = _optionalChain([path, 'access', _211 => _211.components, 'optionalAccess', _212 => _212.length]) ? path.components : [path];
7214
- return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access', _213 => _213.components, 'optionalAccess', _214 => _214.length]) ? `components[${i}].` : ""));
7499
+ const specs = _optionalChain([path, 'access', _212 => _212.components, 'optionalAccess', _213 => _213.length]) ? path.components : [path];
7500
+ return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access', _214 => _214.components, 'optionalAccess', _215 => _215.length]) ? `components[${i}].` : ""));
7215
7501
  }
7216
7502
  /**
7217
7503
  * Layer › Vector Mask: `reveal-all` (an empty path showing everything), `hide-all` (an empty path
@@ -7228,7 +7514,7 @@ var ImageEditorController = (_class12 = class {
7228
7514
  vm = { components: this.vectorMaskComponents(path) };
7229
7515
  if (path.fillRule === "evenodd") vm.fillRule = "evenodd";
7230
7516
  } else if (from === "reveal-all" || from === "hide-all") {
7231
- if (_optionalChain([path, 'access', _215 => _215.components, 'optionalAccess', _216 => _216.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.`);
7517
+ 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.`);
7232
7518
  vm = { components: [], ...from === "reveal-all" ? { inverted: true } : {} };
7233
7519
  } else {
7234
7520
  throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Unknown vector mask source "${String(from)}". Use reveal-all, hide-all, path or selection.`);
@@ -7239,7 +7525,7 @@ var ImageEditorController = (_class12 = class {
7239
7525
  /** The selection's outline as subpaths; throws when nothing is selected or nothing is left to trace. */
7240
7526
  traceSelection(options) {
7241
7527
  const sel = this.state.selection;
7242
- if (!_optionalChain([sel, 'optionalAccess', _217 => _217.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then make a path from the selection.");
7528
+ if (!_optionalChain([sel, 'optionalAccess', _218 => _218.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then make a path from the selection.");
7243
7529
  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.");
7244
7530
  const subpaths = selectionToSubpaths(sel, options);
7245
7531
  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.");
@@ -7420,7 +7706,7 @@ var ImageEditorController = (_class12 = class {
7420
7706
  const layer = loc.layer;
7421
7707
  if (layer.type !== "pixel") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
7422
7708
  const sel = this.state.selection;
7423
- if (!_optionalChain([sel, 'optionalAccess', _218 => _218.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
7709
+ if (!_optionalChain([sel, 'optionalAccess', _219 => _219.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
7424
7710
  if (options.cut) _chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
7425
7711
  const surface = this.surfaceOf(layer);
7426
7712
  const sb = sel.bounds;
@@ -7438,14 +7724,14 @@ var ImageEditorController = (_class12 = class {
7438
7724
  const copy = {
7439
7725
  type: "pixel",
7440
7726
  id: _chunkUYXL6ZWQcjs.newLayerId.call(void 0, ),
7441
- name: _optionalChain([options, 'access', _219 => _219.name, 'optionalAccess', _220 => _220.trim, 'call', _221 => _221()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
7727
+ name: _optionalChain([options, 'access', _220 => _220.name, 'optionalAccess', _221 => _221.trim, 'call', _222 => _222()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
7442
7728
  visible: true,
7443
7729
  opacity: 1,
7444
7730
  blend: "normal",
7445
7731
  surface: _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width: src.width, height: src.height, data: px2 }, 4, src.x, src.y),
7446
7732
  offset: { ...layer.offset }
7447
7733
  };
7448
- let next = _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _222 => _222.parent, 'optionalAccess', _223 => _223.id]), () => ( null)), loc.index + 1);
7734
+ 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);
7449
7735
  if (kept) {
7450
7736
  const cutLayer = { ...layer, surface: _chunkCWM3CUUXcjs.writeRegion.call(void 0, surface, src, kept) };
7451
7737
  delete cutLayer.source;
@@ -7458,7 +7744,7 @@ var ImageEditorController = (_class12 = class {
7458
7744
  return copy.id;
7459
7745
  }
7460
7746
  // --- Free Transform ---
7461
- __init94() {this.openTransform = null}
7747
+ __init98() {this.openTransform = null}
7462
7748
  /** The Free Transform in progress (see `beginFreeTransform`), or `null`. */
7463
7749
  getFreeTransform() {
7464
7750
  if (this.openTransform && !this.openTransform.isOpen) this.openTransform = null;
@@ -7469,7 +7755,7 @@ var ImageEditorController = (_class12 = class {
7469
7755
  layers: () => this.state.layers,
7470
7756
  activeLayerId: () => this.state.activeLayerId,
7471
7757
  activeTarget: () => this.state.activeTarget,
7472
- selection: () => _optionalChain([this, 'access', _224 => _224.state, 'access', _225 => _225.selection, 'optionalAccess', _226 => _226.bounds]) ? this.state.selection : null,
7758
+ selection: () => _optionalChain([this, 'access', _225 => _225.state, 'access', _226 => _226.selection, 'optionalAccess', _227 => _227.bounds]) ? this.state.selection : null,
7473
7759
  canvas: () => this.naturalSize,
7474
7760
  pixelsOf: (layer) => this.surfaceOf(layer),
7475
7761
  shapeEnv: () => this.shapeEnv(),
@@ -7617,7 +7903,7 @@ var ImageEditorController = (_class12 = class {
7617
7903
  * anything else nests as a layer document. Returns the smart object's id.
7618
7904
  */
7619
7905
  convertToSmartObject(ids, options = {}) {
7620
- const list = _optionalChain([ids, 'optionalAccess', _227 => _227.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
7906
+ const list = _optionalChain([ids, 'optionalAccess', _228 => _228.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
7621
7907
  if (!list.length) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
7622
7908
  const res = _chunkUYXL6ZWQcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
7623
7909
  this.commitLayers(res.layers, () => {
@@ -7650,8 +7936,8 @@ var ImageEditorController = (_class12 = class {
7650
7936
  width: c.width,
7651
7937
  height: c.height,
7652
7938
  decoded: _chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, c),
7653
- fileType: _nullishCoalesce(_optionalChain([c, 'access', _228 => _228.file, 'optionalAccess', _229 => _229.type]), () => ( null)),
7654
- linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _230 => _230.linked, 'optionalAccess', _231 => _231.path]), () => ( null)),
7939
+ fileType: _nullishCoalesce(_optionalChain([c, 'access', _229 => _229.file, 'optionalAccess', _230 => _230.type]), () => ( null)),
7940
+ linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _231 => _231.linked, 'optionalAccess', _232 => _232.path]), () => ( null)),
7655
7941
  instances: _chunkUYXL6ZWQcjs.instancesOf.call(void 0, this.state.layers, c.id),
7656
7942
  layerCount: c.document ? _chunkHGTDMKNEcjs.flattenLayers.call(void 0, c.document.layers).length : 0
7657
7943
  },
@@ -7668,9 +7954,9 @@ var ImageEditorController = (_class12 = class {
7668
7954
  bounds: _chunkUYXL6ZWQcjs.transformedBox.call(void 0, g)
7669
7955
  },
7670
7956
  smartFilters: {
7671
- enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _232 => _232.enabled]), () => ( true)),
7672
- filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess', _233 => _233.filters]), () => ( []))).map((f) => f.kind === "psd" ? { id: f.id, kind: "psd", name: f.name, enabled: f.enabled, blend: f.blend, opacity: f.opacity } : { ...f }),
7673
- mask: _optionalChain([stack, 'optionalAccess', _234 => _234.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
7957
+ enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _233 => _233.enabled]), () => ( true)),
7958
+ 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 }),
7959
+ 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
7674
7960
  },
7675
7961
  bounds: this.getLayerBounds(id)
7676
7962
  };
@@ -7809,7 +8095,7 @@ var ImageEditorController = (_class12 = class {
7809
8095
  * it in the same undo step (Photoshop limits a filter to the selection). Returns whether it did.
7810
8096
  */
7811
8097
  maskFiltersWithSelection(id, useSelection) {
7812
- if (!useSelection || !_optionalChain([this, 'access', _235 => _235.state, 'access', _236 => _236.selection, 'optionalAccess', _237 => _237.bounds])) return false;
8098
+ if (!useSelection || !_optionalChain([this, 'access', _236 => _236.state, 'access', _237 => _237.selection, 'optionalAccess', _238 => _238.bounds])) return false;
7813
8099
  this.setSmartFilterMask(id, "selection", {}, false);
7814
8100
  return true;
7815
8101
  }
@@ -7823,19 +8109,19 @@ var ImageEditorController = (_class12 = class {
7823
8109
  removeSmartFilter(id, filterId) {
7824
8110
  const res = _chunkUYXL6ZWQcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
7825
8111
  this.commitLayers(res.layers);
7826
- return _nullishCoalesce(_optionalChain([res, 'access', _238 => _238.layer, 'access', _239 => _239.smartFilters, 'optionalAccess', _240 => _240.filters]), () => ( []));
8112
+ return _nullishCoalesce(_optionalChain([res, 'access', _239 => _239.layer, 'access', _240 => _240.smartFilters, 'optionalAccess', _241 => _241.filters]), () => ( []));
7827
8113
  }
7828
8114
  /** Moves one smart filter to `index` (0 = bottom, applied first), as one undo step. Returns the filters. */
7829
8115
  moveSmartFilter(id, filterId, index) {
7830
8116
  const res = _chunkUYXL6ZWQcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
7831
8117
  this.commitLayers(res.layers);
7832
- return _nullishCoalesce(_optionalChain([res, 'access', _241 => _241.layer, 'access', _242 => _242.smartFilters, 'optionalAccess', _243 => _243.filters]), () => ( []));
8118
+ return _nullishCoalesce(_optionalChain([res, 'access', _242 => _242.layer, 'access', _243 => _243.smartFilters, 'optionalAccess', _244 => _244.filters]), () => ( []));
7833
8119
  }
7834
8120
  /** Turns a smart object's whole filter stack on or off (one undo step). */
7835
8121
  setSmartFiltersEnabled(id, enabled) {
7836
8122
  const res = _chunkUYXL6ZWQcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
7837
8123
  this.commitLayers(res.layers);
7838
- return _nullishCoalesce(_optionalChain([res, 'access', _244 => _244.layer, 'access', _245 => _245.smartFilters, 'optionalAccess', _246 => _246.enabled]), () => ( true));
8124
+ return _nullishCoalesce(_optionalChain([res, 'access', _245 => _245.layer, 'access', _246 => _246.smartFilters, 'optionalAccess', _247 => _247.enabled]), () => ( true));
7839
8125
  }
7840
8126
  /**
7841
8127
  * Sets the smart filter mask (one undo step): `reveal-all`, `hide-all`, `selection` (the
@@ -7847,11 +8133,11 @@ var ImageEditorController = (_class12 = class {
7847
8133
  let mask;
7848
8134
  if (from === "none") mask = null;
7849
8135
  else if (from === "keep") {
7850
- if (!_optionalChain([layer, 'access', _247 => _247.smartFilters, 'optionalAccess', _248 => _248.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.`);
8136
+ 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.`);
7851
8137
  mask = withMaskProps(layer.smartFilters.mask, props);
7852
8138
  } else if (from === "selection") {
7853
8139
  const sel = this.state.selection;
7854
- if (!_optionalChain([sel, 'optionalAccess', _249 => _249.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
8140
+ if (!_optionalChain([sel, 'optionalAccess', _250 => _250.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
7855
8141
  mask = this.maskFromSelection(sel, props);
7856
8142
  } else {
7857
8143
  const v = from === "reveal-all" ? 255 : 0;
@@ -7863,7 +8149,7 @@ var ImageEditorController = (_class12 = class {
7863
8149
  if (mask && from !== "keep") this.state.activeTarget = "filter-mask";
7864
8150
  else if (!mask && this.state.activeTarget === "filter-mask") this.state.activeTarget = "pixels";
7865
8151
  }, commitToHistory);
7866
- return _nullishCoalesce(_optionalChain([res, 'access', _250 => _250.layer, 'access', _251 => _251.smartFilters, 'optionalAccess', _252 => _252.mask]), () => ( null));
8152
+ return _nullishCoalesce(_optionalChain([res, 'access', _251 => _251.layer, 'access', _252 => _252.smartFilters, 'optionalAccess', _253 => _253.mask]), () => ( null));
7867
8153
  }
7868
8154
  /**
7869
8155
  * Decodes smart object contents that came as files the synchronous decoders cannot read (a JPEG
@@ -7896,7 +8182,7 @@ var ImageEditorController = (_class12 = class {
7896
8182
  return left;
7897
8183
  }
7898
8184
  // --- Smart object contents (Edit Contents) ---
7899
- __init95() {this.contentsStack = []}
8185
+ __init99() {this.contentsStack = []}
7900
8186
  /** The smart objects whose contents are open (outermost first); empty when the document itself is shown. */
7901
8187
  getEditingContents() {
7902
8188
  return this.contentsStack.map((e) => ({ layerId: e.layerId, name: e.name }));
@@ -7911,7 +8197,7 @@ var ImageEditorController = (_class12 = class {
7911
8197
  if (this.getFreeTransform()) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
7912
8198
  const layer = _chunkUYXL6ZWQcjs.requireSmartObject.call(void 0, this.state.layers, id);
7913
8199
  const c = layer.contents;
7914
- if (!_chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _253 => _253.file, 'optionalAccess', _254 => _254.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
8200
+ 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.`);
7915
8201
  const saved = {
7916
8202
  state: { ...this.state },
7917
8203
  undo: this.undoStack,
@@ -7942,9 +8228,9 @@ var ImageEditorController = (_class12 = class {
7942
8228
  editingContents: this.getEditingContents()
7943
8229
  };
7944
8230
  delete this.state.legacyOutputBlur;
7945
- if (_optionalChain([c, 'access', _255 => _255.document, 'optionalAccess', _256 => _256.globalLight])) this.state.globalLight = c.document.globalLight;
8231
+ if (_optionalChain([c, 'access', _256 => _256.document, 'optionalAccess', _257 => _257.globalLight])) this.state.globalLight = c.document.globalLight;
7946
8232
  else delete this.state.globalLight;
7947
- if (_optionalChain([c, 'access', _257 => _257.document, 'optionalAccess', _258 => _258.patterns, 'optionalAccess', _259 => _259.length])) this.state.patterns = c.document.patterns;
8233
+ if (_optionalChain([c, 'access', _258 => _258.document, 'optionalAccess', _259 => _259.patterns, 'optionalAccess', _260 => _260.length])) this.state.patterns = c.document.patterns;
7948
8234
  else delete this.state.patterns;
7949
8235
  this.imageElement = null;
7950
8236
  this.samplePixels = null;
@@ -7964,23 +8250,23 @@ var ImageEditorController = (_class12 = class {
7964
8250
  closeSmartObjectContents(save = true) {
7965
8251
  const top = this.contentsStack.pop();
7966
8252
  if (!top) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
7967
- if (_optionalChain([this, 'access', _260 => _260.openTransform, 'optionalAccess', _261 => _261.isOpen])) this.openTransform.cancel();
8253
+ if (_optionalChain([this, 'access', _261 => _261.openTransform, 'optionalAccess', _262 => _262.isOpen])) this.openTransform.cancel();
7968
8254
  this.openTransform = null;
7969
8255
  const edited = this.state;
7970
8256
  const changed = save && this.undoStack.length > 0;
7971
8257
  let next = null;
7972
8258
  if (changed) {
7973
- const layer = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _262 => _262.layer]);
7974
- const old = _optionalChain([layer, 'optionalAccess', _263 => _263.contents]);
8259
+ const layer = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _263 => _263.layer]);
8260
+ const old = _optionalChain([layer, 'optionalAccess', _264 => _264.contents]);
7975
8261
  const { width, height } = edited.imageDimensions;
7976
8262
  const only = edited.layers.length === 1 ? edited.layers[0] : null;
7977
- const plain3 = _optionalChain([only, 'optionalAccess', _264 => _264.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _265 => _265.filters, 'optionalAccess', _266 => _266.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
7978
- if (_optionalChain([old, 'optionalAccess', _267 => _267.kind]) === "raster" && plain3) {
8263
+ 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";
8264
+ if (_optionalChain([old, 'optionalAccess', _268 => _268.kind]) === "raster" && plain3) {
7979
8265
  const px2 = _chunkCWM3CUUXcjs.readRegion.call(void 0, only.surface, { x: -only.offset.x, y: -only.offset.y, width, height });
7980
8266
  next = _chunkUYXL6ZWQcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
7981
8267
  } else {
7982
8268
  const doc = { layers: edited.layers, globalLight: edited.globalLight, patterns: edited.patterns };
7983
- next = _chunkUYXL6ZWQcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _268 => _268.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _269 => _269.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
8269
+ 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);
7984
8270
  }
7985
8271
  }
7986
8272
  const saved = top.saved;
@@ -8005,7 +8291,7 @@ var ImageEditorController = (_class12 = class {
8005
8291
  }
8006
8292
  /** The document's own layers (not the contents open for editing). */
8007
8293
  rootLayers() {
8008
- return _nullishCoalesce(_optionalChain([this, 'access', _270 => _270.contentsStack, 'access', _271 => _271[0], 'optionalAccess', _272 => _272.saved, 'access', _273 => _273.state, 'access', _274 => _274.layers]), () => ( this.state.layers));
8294
+ 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));
8009
8295
  }
8010
8296
  /** Drops every open contents edit (loading another document). */
8011
8297
  abandonContents() {
@@ -8045,7 +8331,7 @@ var ImageEditorController = (_class12 = class {
8045
8331
  this.commitLayers(_chunkUYXL6ZWQcjs.setLayerEffects.call(void 0, this.state.layers, id, effects), void 0, commitToHistory);
8046
8332
  return this.getLayerEffects(id);
8047
8333
  }
8048
- __init96() {this.patternIds = /* @__PURE__ */ new WeakMap()}
8334
+ __init100() {this.patternIds = /* @__PURE__ */ new WeakMap()}
8049
8335
  /** Changes whenever the document's pattern list is replaced (the compositor then drops its caches). */
8050
8336
  patternsVersion() {
8051
8337
  const list = this.state.patterns;
@@ -8207,7 +8493,7 @@ var ImageEditorController = (_class12 = class {
8207
8493
  });
8208
8494
  return bg.id;
8209
8495
  }
8210
- __init97() {this.thumbCache = /* @__PURE__ */ new WeakMap()}
8496
+ __init101() {this.thumbCache = /* @__PURE__ */ new WeakMap()}
8211
8497
  /**
8212
8498
  * A small RGBA preview of a pixel layer over the canvas (or of its mask with `mask: true`),
8213
8499
  * longest side `maxSide` px, point-sampled; `null` for layers without pixels.
@@ -8226,7 +8512,7 @@ var ImageEditorController = (_class12 = class {
8226
8512
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
8227
8513
  const key = `${tw}x${th}:${ox},${oy}`;
8228
8514
  let byKey = this.thumbCache.get(surface);
8229
- const hit = _optionalChain([byKey, 'optionalAccess', _275 => _275.get, 'call', _276 => _276(key)]);
8515
+ const hit = _optionalChain([byKey, 'optionalAccess', _276 => _276.get, 'call', _277 => _277(key)]);
8230
8516
  if (hit) return hit;
8231
8517
  const out = new Uint8ClampedArray(tw * th * 4);
8232
8518
  for (let y = 0; y < th; y++) {
@@ -8367,7 +8653,7 @@ var ImageEditorController = (_class12 = class {
8367
8653
  if (layer.mask.source) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which is generated, not painted.`);
8368
8654
  _chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "all", action);
8369
8655
  } else if (ch === "filter-mask") {
8370
- if (layer.type !== "smart" || !_optionalChain([layer, 'access', _277 => _277.smartFilters, 'optionalAccess', _278 => _278.mask])) {
8656
+ if (layer.type !== "smart" || !_optionalChain([layer, 'access', _278 => _278.smartFilters, 'optionalAccess', _279 => _279.mask])) {
8371
8657
  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}.`);
8372
8658
  }
8373
8659
  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.`);
@@ -8382,7 +8668,7 @@ var ImageEditorController = (_class12 = class {
8382
8668
  if (!layer.visible) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" is hidden; show it before you ${action}.`);
8383
8669
  const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
8384
8670
  const surface = ch === "mask" ? layer.mask.surface : ch === "filter-mask" ? layer.smartFilters.mask.surface : this.surfaceOf(layer);
8385
- const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _279 => _279.locks, 'optionalAccess', _280 => _280.transparency]));
8671
+ const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _280 => _280.locks, 'optionalAccess', _281 => _281.transparency]));
8386
8672
  return { id, layer, channel: ch, offset, surface, lockTransparency };
8387
8673
  }
8388
8674
  /** The layer with its pixels (or mask) replaced by `surface`. */
@@ -8426,13 +8712,13 @@ var ImageEditorController = (_class12 = class {
8426
8712
  blend: target.channel !== "pixels" ? "normal" : brush.blend,
8427
8713
  lockTransparency: target.lockTransparency,
8428
8714
  // In Quick Mask mode the selection is what is painted, so it does not limit the stroke.
8429
- selection: target.channel !== "quick-mask" && _optionalChain([this, 'access', _281 => _281.state, 'access', _282 => _282.selection, 'optionalAccess', _283 => _283.bounds]) ? this.state.selection : null,
8715
+ selection: target.channel !== "quick-mask" && _optionalChain([this, 'access', _282 => _282.state, 'access', _283 => _283.selection, 'optionalAccess', _284 => _284.bounds]) ? this.state.selection : null,
8430
8716
  offset: target.offset
8431
8717
  };
8432
8718
  const depth = target.channel !== "filter-mask" && target.channel !== "quick-mask" && this.bitDepth !== 8 ? this.bitDepth : null;
8433
8719
  if (tool === "mixer") return new PaintStrokeSession(this, target, this.mixerStroke(init, brush), apply, depth);
8434
8720
  if (isRetouchTool(tool)) return new PaintStrokeSession(this, target, this.retouchStroke(tool, init, brush, target, apply), apply, depth);
8435
- const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess', _284 => _284.type]) === "gradient" ? _chunkEBDCRTZIcjs.resolvePaintGradient.call(void 0, strokePaint, { paint: toHex(color), secondary: toHex(background) }) : null;
8721
+ const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess', _285 => _285.type]) === "gradient" ? _chunkEBDCRTZIcjs.resolvePaintGradient.call(void 0, strokePaint, { paint: toHex(color), secondary: toHex(background) }) : null;
8436
8722
  return new PaintStrokeSession(this, target, new (0, _chunkEBDCRTZIcjs.StrokeCoverage)(brush, gradient, _nullishCoalesce(init.seed, () => ( 0))), apply, depth);
8437
8723
  }
8438
8724
  /** A retouching stroke's start: its settings, what it samples and how it composites. */
@@ -8479,9 +8765,9 @@ var ImageEditorController = (_class12 = class {
8479
8765
  const steps = settings.historySteps;
8480
8766
  const entry = steps > 0 ? _nullishCoalesce(this.undoStack[this.undoStack.length - steps], () => ( this.undoStack[0])) : this.undoStack[0];
8481
8767
  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.");
8482
- const then = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _285 => _285.layer]);
8768
+ const then = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _286 => _286.layer]);
8483
8769
  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).`);
8484
- const surface = target.channel === "mask" ? _optionalChain([then, 'access', _286 => _286.mask, 'optionalAccess', _287 => _287.surface]) : then.type === "pixel" ? then.surface : void 0;
8770
+ const surface = target.channel === "mask" ? _optionalChain([then, 'access', _287 => _287.mask, 'optionalAccess', _288 => _288.surface]) : then.type === "pixel" ? then.surface : void 0;
8485
8771
  if (!surface) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
8486
8772
  const offset2 = then.type === "pixel" ? then.offset : { x: 0, y: 0 };
8487
8773
  const depth = !mask && this.bitDepth !== 8 ? this.bitDepth : null;
@@ -8555,7 +8841,7 @@ var ImageEditorController = (_class12 = class {
8555
8841
  }
8556
8842
  /** A pixel source over a surface (layer pixels or a mask) in layer space at `offset`. */
8557
8843
  surfaceSource(surface, offset) {
8558
- return new (0, _chunk7NW46N7Icjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access', _288 => _288.tiles, 'access', _289 => _289.get, 'call', _290 => _290(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _291 => _291.data]), () => ( (surface.defaultValue ? defaultTile(surface) : null))), surface.channels, offset);
8844
+ 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);
8559
8845
  }
8560
8846
  /** A pixel source over the composite of the current layers (through `throughId` and below, or all of them), as it is now. */
8561
8847
  compositeSource(throughId, depth = null) {
@@ -8631,7 +8917,7 @@ var ImageEditorController = (_class12 = class {
8631
8917
  paintStroke(init) {
8632
8918
  if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("points must hold at least one { x, y } point.");
8633
8919
  for (const p of init.points) {
8634
- if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _292 => _292.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _293 => _293.y]))) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
8920
+ 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).");
8635
8921
  }
8636
8922
  const session = this.beginStroke(init);
8637
8923
  session.push(init.points);
@@ -8660,7 +8946,7 @@ var ImageEditorController = (_class12 = class {
8660
8946
  */
8661
8947
  strokeSelection(options) {
8662
8948
  const sel = this.state.selection;
8663
- if (!_optionalChain([sel, 'optionalAccess', _294 => _294.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then stroke the selection.");
8949
+ if (!_optionalChain([sel, 'optionalAccess', _295 => _295.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then stroke the selection.");
8664
8950
  const width = options.width;
8665
8951
  if (!(width > 0 && width <= 250)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("width must be greater than 0 and at most 250 px.");
8666
8952
  const location = _nullishCoalesce(options.location, () => ( "outside"));
@@ -8677,7 +8963,7 @@ var ImageEditorController = (_class12 = class {
8677
8963
  */
8678
8964
  cropToSelection() {
8679
8965
  const sel = this.state.selection;
8680
- if (!_optionalChain([sel, 'optionalAccess', _295 => _295.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the area to keep, then crop to it.");
8966
+ if (!_optionalChain([sel, 'optionalAccess', _296 => _296.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the area to keep, then crop to it.");
8681
8967
  const crop = { ...sel.bounds };
8682
8968
  this.setCrop(crop);
8683
8969
  return crop;
@@ -8691,7 +8977,7 @@ var ImageEditorController = (_class12 = class {
8691
8977
  */
8692
8978
  contentAwareFill(options = {}) {
8693
8979
  const sel = this.state.selection;
8694
- if (!_optionalChain([sel, 'optionalAccess', _296 => _296.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select what to remove, then fill it.");
8980
+ if (!_optionalChain([sel, 'optionalAccess', _297 => _297.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select what to remove, then fill it.");
8695
8981
  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.");
8696
8982
  const output = _nullishCoalesce(options.output, () => ( "current"));
8697
8983
  if (output !== "current" && output !== "new-layer") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Unknown output "${String(output)}"; use current or new-layer.`);
@@ -8737,7 +9023,7 @@ var ImageEditorController = (_class12 = class {
8737
9023
  return { layerId: target.id, bounds: { ...b }, output };
8738
9024
  }
8739
9025
  /** The pixel clipboard (Copy / Cut), or null. */
8740
- __init98() {this.clipboard = null}
9026
+ __init102() {this.clipboard = null}
8741
9027
  /** What Copy or Cut last put on the editor's clipboard, or null. */
8742
9028
  getClipboard() {
8743
9029
  return this.clipboard;
@@ -8756,8 +9042,8 @@ var ImageEditorController = (_class12 = class {
8756
9042
  */
8757
9043
  copyPixels(options = {}) {
8758
9044
  const { width, height } = this.naturalSize;
8759
- const sel = _optionalChain([this, 'access', _297 => _297.state, 'access', _298 => _298.selection, 'optionalAccess', _299 => _299.bounds]) ? this.state.selection : null;
8760
- const rect = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _300 => _300.bounds]), () => ( { x: 0, y: 0, width, height }));
9045
+ const sel = _optionalChain([this, 'access', _298 => _298.state, 'access', _299 => _299.selection, 'optionalAccess', _300 => _300.bounds]) ? this.state.selection : null;
9046
+ const rect = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _301 => _301.bounds]), () => ( { x: 0, y: 0, width, height }));
8761
9047
  let data;
8762
9048
  if (options.merged) {
8763
9049
  data = new Uint8ClampedArray(this.compositePixels(rect).data);
@@ -8797,7 +9083,7 @@ var ImageEditorController = (_class12 = class {
8797
9083
  pastePixels(mode = "new-layer", image = this.clipboard) {
8798
9084
  if (!image) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("The clipboard is empty; copy_pixels first.");
8799
9085
  if (!PASTE_MODES.includes(mode)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Unknown paste mode "${String(mode)}"; use ${PASTE_MODES.join(", ")}.`);
8800
- const sel = _optionalChain([this, 'access', _301 => _301.state, 'access', _302 => _302.selection, 'optionalAccess', _303 => _303.bounds]) ? this.state.selection : null;
9086
+ const sel = _optionalChain([this, 'access', _302 => _302.state, 'access', _303 => _303.selection, 'optionalAccess', _304 => _304.bounds]) ? this.state.selection : null;
8801
9087
  if ((mode === "into" || mode === "outside") && !sel) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Paste ${mode === "into" ? "Into" : "Outside"} needs a selection; select where it goes first.`);
8802
9088
  const { width, height } = this.naturalSize;
8803
9089
  let x;
@@ -8806,7 +9092,7 @@ var ImageEditorController = (_class12 = class {
8806
9092
  x = image.x;
8807
9093
  y = image.y;
8808
9094
  } else {
8809
- const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _304 => _304.bounds]), () => ( { x: 0, y: 0, width, height }));
9095
+ const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _305 => _305.bounds]), () => ( { x: 0, y: 0, width, height }));
8810
9096
  x = Math.round(frame.x + (frame.width - image.width) / 2);
8811
9097
  y = Math.round(frame.y + (frame.height - image.height) / 2);
8812
9098
  }
@@ -8823,8 +9109,8 @@ var ImageEditorController = (_class12 = class {
8823
9109
  if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("opacity must be from 0 to 1.");
8824
9110
  const blend = _nullishCoalesce(_chunkUYXL6ZWQcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
8825
9111
  const quickMask = target.channel === "quick-mask";
8826
- const sel = _nullishCoalesce(coverageMask, () => ( (!quickMask && options.useSelection !== false && _optionalChain([this, 'access', _305 => _305.state, 'access', _306 => _306.selection, 'optionalAccess', _307 => _307.bounds]) ? this.state.selection : null)));
8827
- const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _308 => _308.bounds]), () => ( { x: 0, y: 0, width, height }));
9112
+ 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)));
9113
+ const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _309 => _309.bounds]), () => ( { x: 0, y: 0, width, height }));
8828
9114
  const coverage = new (0, _chunkEBDCRTZIcjs.CoverageMap)();
8829
9115
  const ones = new Float32Array(region.width * region.height);
8830
9116
  if (sel) {
@@ -8949,7 +9235,7 @@ var ImageEditorController = (_class12 = class {
8949
9235
  placeLayer(layers, node, where) {
8950
9236
  if (where.aboveId) {
8951
9237
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, where.aboveId);
8952
- if (loc) return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _309 => _309.parent, 'optionalAccess', _310 => _310.id]), () => ( null)), loc.index + 1);
9238
+ 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);
8953
9239
  }
8954
9240
  if (where.parentId) {
8955
9241
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, where.parentId);
@@ -8960,11 +9246,11 @@ var ImageEditorController = (_class12 = class {
8960
9246
  const at = Math.max(0, Math.min(nodes.length, Math.round(where.adjustmentIndex)));
8961
9247
  if (at < nodes.length) {
8962
9248
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, nodes[at].id);
8963
- return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _311 => _311.parent, 'optionalAccess', _312 => _312.id]), () => ( null)), loc.index);
9249
+ return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _312 => _312.parent, 'optionalAccess', _313 => _313.id]), () => ( null)), loc.index);
8964
9250
  }
8965
9251
  if (nodes.length) {
8966
9252
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, nodes[nodes.length - 1].id);
8967
- return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _313 => _313.parent, 'optionalAccess', _314 => _314.id]), () => ( null)), loc.index + 1);
9253
+ return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _314 => _314.parent, 'optionalAccess', _315 => _315.id]), () => ( null)), loc.index + 1);
8968
9254
  }
8969
9255
  }
8970
9256
  return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, null, this.defaultInsertIndex(layers));
@@ -9003,7 +9289,7 @@ var ImageEditorController = (_class12 = class {
9003
9289
  enabled: spec.enabled,
9004
9290
  opacity: spec.opacity,
9005
9291
  blend: spec.blend,
9006
- mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access', _315 => _315.state, 'access', _316 => _316.selection, 'optionalAccess', _317 => _317.bounds]) ? _chunkUYXL6ZWQcjs.layerMaskFromSelection.call(void 0, this.state.selection) : void 0)))
9292
+ 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)))
9007
9293
  });
9008
9294
  while (ids.has(layer.id)) layer.id = _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "adj");
9009
9295
  const { width, height } = this.naturalSize;
@@ -9080,7 +9366,7 @@ var ImageEditorController = (_class12 = class {
9080
9366
  const anchor = nodes[to];
9081
9367
  const without = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, id, () => null);
9082
9368
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, without, anchor.id);
9083
- return _chunkHGTDMKNEcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _318 => _318.parent, 'optionalAccess', _319 => _319.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
9369
+ 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);
9084
9370
  }
9085
9371
  /** Moves a layer to `toIndex` among the adjustment layers (0 = bottom) as one undo step. Returns false if nothing moved. */
9086
9372
  moveAdjustmentLayer(id, toIndex) {
@@ -9121,7 +9407,7 @@ var ImageEditorController = (_class12 = class {
9121
9407
  return _nullishCoalesce(this.state.selection, () => ( null));
9122
9408
  }
9123
9409
  get hasSelection() {
9124
- return Boolean(_optionalChain([this, 'access', _320 => _320.state, 'access', _321 => _321.selection, 'optionalAccess', _322 => _322.bounds]));
9410
+ return Boolean(_optionalChain([this, 'access', _321 => _321.state, 'access', _322 => _322.selection, 'optionalAccess', _323 => _323.bounds]));
9125
9411
  }
9126
9412
  /** Returns the current canvas (composition) dimensions. */
9127
9413
  getCanvasSize() {
@@ -9213,7 +9499,7 @@ var ImageEditorController = (_class12 = class {
9213
9499
  const prev = normalizeSelection(_nullishCoalesce(this.state.selection, () => ( null)));
9214
9500
  if (prev === next || prev && next && sameSelection(prev, next)) return false;
9215
9501
  this.recordHistory();
9216
- if (!next && _optionalChain([prev, 'optionalAccess', _323 => _323.bounds])) this.lastSelection = prev;
9502
+ if (!next && _optionalChain([prev, 'optionalAccess', _324 => _324.bounds])) this.lastSelection = prev;
9217
9503
  this.state.selection = next;
9218
9504
  this.notify();
9219
9505
  return true;
@@ -9228,7 +9514,7 @@ var ImageEditorController = (_class12 = class {
9228
9514
  return this.setSelection(null);
9229
9515
  }
9230
9516
  /** The selection a Deselect cleared, for `reselect` (not saved, not part of history). */
9231
- __init99() {this.lastSelection = null}
9517
+ __init103() {this.lastSelection = null}
9232
9518
  /** Whether `reselect` has a selection to bring back. */
9233
9519
  canReselect() {
9234
9520
  const { width, height } = this.naturalSize;
@@ -9256,14 +9542,14 @@ var ImageEditorController = (_class12 = class {
9256
9542
  /** Select › Grow: adds connected pixels within `tolerance` of a selected colour (one undo step). */
9257
9543
  async growSelection(options = {}) {
9258
9544
  const sel = this.state.selection;
9259
- if (!_optionalChain([sel, 'optionalAccess', _324 => _324.bounds])) return false;
9545
+ if (!_optionalChain([sel, 'optionalAccess', _325 => _325.bounds])) return false;
9260
9546
  const pixels = await this.requirePixels(options);
9261
9547
  return this.setSelection(growSelection(pixels, sel, options));
9262
9548
  }
9263
9549
  /** Select › Similar: adds every pixel within `tolerance` of a selected colour (one undo step). */
9264
9550
  async selectSimilar(options = {}) {
9265
9551
  const sel = this.state.selection;
9266
- if (!_optionalChain([sel, 'optionalAccess', _325 => _325.bounds])) return false;
9552
+ if (!_optionalChain([sel, 'optionalAccess', _326 => _326.bounds])) return false;
9267
9553
  const pixels = await this.requirePixels(options);
9268
9554
  return this.setSelection(selectSimilar(pixels, sel, options));
9269
9555
  }
@@ -9355,6 +9641,28 @@ var ImageEditorController = (_class12 = class {
9355
9641
  this.setSelection(sel, "replace");
9356
9642
  return _nullishCoalesce(this.state.selection, () => ( null));
9357
9643
  }
9644
+ /**
9645
+ * Object Selection: the object inside `target.rect` (natural pixels; what is outside the box is
9646
+ * background) or under `target.point`, found by GrabCut (colour models of object and background
9647
+ * plus a graph cut along edges), combined with the selection by `mode` as one undo step.
9648
+ * Resolves to the resulting selection.
9649
+ */
9650
+ async selectObject(target, options = {}) {
9651
+ const { width, height } = this.naturalSize;
9652
+ if ("rect" in target) {
9653
+ const r = target.rect;
9654
+ if (!(r.width > 0 && r.height > 0)) throw new Error("The box needs a positive width and height.");
9655
+ if (r.x >= width || r.y >= height || r.x + r.width <= 0 || r.y + r.height <= 0) {
9656
+ throw new Error(`The box lies outside the image (0..${width}, 0..${height}); draw it around the object.`);
9657
+ }
9658
+ } else if (!(target.point.x >= 0 && target.point.y >= 0 && target.point.x < width && target.point.y < height)) {
9659
+ throw new Error(`(${target.point.x}, ${target.point.y}) is outside the image (0..${width - 1}, 0..${height - 1}); click on the object.`);
9660
+ }
9661
+ const pixels = await this.requirePixels({ sample: options.sampleAllLayers === false ? "active-layer" : "composite" });
9662
+ const region = selectObjectIn(pixels, target, { enhanceEdge: options.enhanceEdge });
9663
+ this.setSelection(region, _nullishCoalesce(options.mode, () => ( "replace")));
9664
+ return _nullishCoalesce(this.state.selection, () => ( null));
9665
+ }
9358
9666
  /**
9359
9667
  * Supplies the pixels the selection tools sample (natural size RGBA), e.g. decoded in a worker
9360
9668
  * or in a test; `null` goes back to reading the source image. Without a canvas (Node, workers)
@@ -9376,7 +9684,7 @@ var ImageEditorController = (_class12 = class {
9376
9684
  try {
9377
9685
  const canvas = await this.renderSource();
9378
9686
  const ctx = canvas.getContext("2d");
9379
- const data2 = _optionalChain([ctx, 'optionalAccess', _326 => _326.getImageData, 'optionalCall', _327 => _327(0, 0, width, height)]);
9687
+ const data2 = _optionalChain([ctx, 'optionalAccess', _327 => _327.getImageData, 'optionalCall', _328 => _328(0, 0, width, height)]);
9380
9688
  if (data2 && data2.data && data2.data.length >= width * height * 4) {
9381
9689
  base = { width, height, data: data2.data };
9382
9690
  this.samplePixels = base;
@@ -9451,7 +9759,7 @@ var ImageEditorController = (_class12 = class {
9451
9759
  /** Select › Modify: grow, shrink, feather, border or smooth by `radius` pixels (one undo step). */
9452
9760
  modifySelection(op, radius) {
9453
9761
  const sel = this.state.selection;
9454
- if (!_optionalChain([sel, 'optionalAccess', _328 => _328.bounds])) return false;
9762
+ if (!_optionalChain([sel, 'optionalAccess', _329 => _329.bounds])) return false;
9455
9763
  return this.setSelection(_chunkUYXL6ZWQcjs.modifySelection.call(void 0, sel, op, radius));
9456
9764
  }
9457
9765
  /**
@@ -9460,7 +9768,7 @@ var ImageEditorController = (_class12 = class {
9460
9768
  */
9461
9769
  async refineSelection(params, options = {}) {
9462
9770
  const sel = this.state.selection;
9463
- if (!_optionalChain([sel, 'optionalAccess', _329 => _329.bounds])) return false;
9771
+ if (!_optionalChain([sel, 'optionalAccess', _330 => _330.bounds])) return false;
9464
9772
  const pixels = (_nullishCoalesce(params.radius, () => ( 0))) > 0 ? await this.requirePixels(options) : null;
9465
9773
  return this.setSelection(refineSelection(pixels, sel, params));
9466
9774
  }
@@ -9491,7 +9799,7 @@ var ImageEditorController = (_class12 = class {
9491
9799
  let mask;
9492
9800
  if (source === "selection") {
9493
9801
  const sel = this.state.selection;
9494
- if (!_optionalChain([sel, 'optionalAccess', _330 => _330.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or export a channel or a layer mask.");
9802
+ 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.");
9495
9803
  mask = sel;
9496
9804
  } else if ("channelId" in source) {
9497
9805
  mask = this.requireChannel(source.channelId).mask;
@@ -9515,7 +9823,7 @@ var ImageEditorController = (_class12 = class {
9515
9823
  const canvas = this.renderer.createCanvas(w, h);
9516
9824
  const ctx = canvas.getContext("2d");
9517
9825
  if (ctx) ctx.drawImage(img, 0, 0, w, h);
9518
- const data = _optionalChain([ctx, 'optionalAccess', _331 => _331.getImageData, 'optionalCall', _332 => _332(0, 0, w, h)]);
9826
+ const data = _optionalChain([ctx, 'optionalAccess', _332 => _332.getImageData, 'optionalCall', _333 => _333(0, 0, w, h)]);
9519
9827
  if (!data) throw new Error("The mask image pixels are not available (no canvas access); pass pixels.");
9520
9828
  return { width: w, height: h, data: data.data };
9521
9829
  }
@@ -9533,24 +9841,24 @@ var ImageEditorController = (_class12 = class {
9533
9841
  const { width, height } = this.naturalSize;
9534
9842
  const image = await this.toDataURL({ format: "image/png" });
9535
9843
  const results = await provider.segment({ image, width, height, target: description, maxSegments: options.maxSegments, signal: options.signal });
9536
- _optionalChain([options, 'access', _333 => _333.signal, 'optionalAccess', _334 => _334.throwIfAborted, 'call', _335 => _335()]);
9844
+ _optionalChain([options, 'access', _334 => _334.signal, 'optionalAccess', _335 => _335.throwIfAborted, 'call', _336 => _336()]);
9537
9845
  const decoded = [];
9538
9846
  for (const r of _nullishCoalesce(results, () => ( []))) {
9539
9847
  decoded.push({ ...r, mask: r.mask !== void 0 ? await this.decodeMaskImage(r.mask) : void 0 });
9540
9848
  }
9541
9849
  const segments = decoded.map((r) => {
9542
9850
  const one = segmentsToSelection(width, height, [r]);
9543
- return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess', _336 => _336.bounds]), () => ( null)), ...r.score !== void 0 ? { score: r.score } : {} };
9851
+ return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess', _337 => _337.bounds]), () => ( null)), ...r.score !== void 0 ? { score: r.score } : {} };
9544
9852
  });
9545
9853
  const mask = segmentsToSelection(width, height, decoded);
9546
9854
  if (mask && options.beforeApply) {
9547
9855
  const outlines = decoded.flatMap((r, i) => {
9548
9856
  const rings = segmentationOutlines(r);
9549
- const b = _optionalChain([segments, 'access', _337 => _337[i], 'optionalAccess', _338 => _338.bounds]);
9857
+ const b = _optionalChain([segments, 'access', _338 => _338[i], 'optionalAccess', _339 => _339.bounds]);
9550
9858
  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 }]] : [];
9551
9859
  });
9552
9860
  await options.beforeApply(outlines);
9553
- _optionalChain([options, 'access', _339 => _339.signal, 'optionalAccess', _340 => _340.throwIfAborted, 'call', _341 => _341()]);
9861
+ _optionalChain([options, 'access', _340 => _340.signal, 'optionalAccess', _341 => _341.throwIfAborted, 'call', _342 => _342()]);
9554
9862
  }
9555
9863
  if (mask) this.shapeCommand(mask, options);
9556
9864
  return { segments: segments.filter((s) => s.bounds) };
@@ -9583,7 +9891,7 @@ var ImageEditorController = (_class12 = class {
9583
9891
  const view = this.state.maskView;
9584
9892
  if (!view) return null;
9585
9893
  const layer = this.getLayer(view.layerId);
9586
- return _optionalChain([layer, 'optionalAccess', _342 => _342.mask]) && !layer.mask.source ? view : null;
9894
+ return _optionalChain([layer, 'optionalAccess', _343 => _343.mask]) && !layer.mask.source ? view : null;
9587
9895
  }
9588
9896
  /**
9589
9897
  * Shows a layer's mask on the canvas: `gray` alone in grey (Alt-click the mask thumbnail),
@@ -9606,7 +9914,7 @@ var ImageEditorController = (_class12 = class {
9606
9914
  if (!layer.mask) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask to show; add one with add_layer_mask.`);
9607
9915
  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.`);
9608
9916
  const cur = this.state.maskView;
9609
- if (_optionalChain([cur, 'optionalAccess', _343 => _343.layerId]) !== id || cur.mode !== mode) {
9917
+ if (_optionalChain([cur, 'optionalAccess', _344 => _344.layerId]) !== id || cur.mode !== mode) {
9610
9918
  this.state.maskView = { layerId: id, mode };
9611
9919
  this.notify();
9612
9920
  }
@@ -9618,7 +9926,7 @@ var ImageEditorController = (_class12 = class {
9618
9926
  return _nullishCoalesce(this.state.channels, () => ( []));
9619
9927
  }
9620
9928
  getChannel(id) {
9621
- return _nullishCoalesce(_optionalChain([this, 'access', _344 => _344.state, 'access', _345 => _345.channels, 'optionalAccess', _346 => _346.find, 'call', _347 => _347((c) => c.id === id)]), () => ( null));
9929
+ return _nullishCoalesce(_optionalChain([this, 'access', _345 => _345.state, 'access', _346 => _346.channels, 'optionalAccess', _347 => _347.find, 'call', _348 => _348((c) => c.id === id)]), () => ( null));
9622
9930
  }
9623
9931
  requireChannel(id) {
9624
9932
  const channel = this.getChannel(id);
@@ -9647,14 +9955,14 @@ var ImageEditorController = (_class12 = class {
9647
9955
  */
9648
9956
  saveSelection(options = {}) {
9649
9957
  const sel = this.state.selection;
9650
- if (!_optionalChain([sel, 'optionalAccess', _348 => _348.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then save the selection to a channel.");
9958
+ if (!_optionalChain([sel, 'optionalAccess', _349 => _349.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then save the selection to a channel.");
9651
9959
  const { width, height } = this.naturalSize;
9652
9960
  const sized = sel.width === width && sel.height === height ? sel : _chunkUYXL6ZWQcjs.resizeSelection.call(void 0, sel, width, height);
9653
9961
  const channels = [...this.getChannels()];
9654
9962
  if (options.channelId !== void 0) {
9655
9963
  const existing = this.requireChannel(options.channelId);
9656
9964
  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)));
9657
- const next = { ...existing, mask, ..._optionalChain([options, 'access', _349 => _349.name, 'optionalAccess', _350 => _350.trim, 'call', _351 => _351()]) ? { name: options.name.trim() } : {} };
9965
+ const next = { ...existing, mask, ..._optionalChain([options, 'access', _350 => _350.name, 'optionalAccess', _351 => _351.trim, 'call', _352 => _352()]) ? { name: options.name.trim() } : {} };
9658
9966
  this.setChannels(channels.map((c) => c.id === existing.id ? next : c));
9659
9967
  return next;
9660
9968
  }
@@ -9665,7 +9973,7 @@ var ImageEditorController = (_class12 = class {
9665
9973
  const channels = this.getChannels();
9666
9974
  const channel = {
9667
9975
  id: this.newChannelId(),
9668
- name: _optionalChain([name, 'optionalAccess', _352 => _352.trim, 'call', _353 => _353()]) || `Alpha ${channels.length + 1}`,
9976
+ name: _optionalChain([name, 'optionalAccess', _353 => _353.trim, 'call', _354 => _354()]) || `Alpha ${channels.length + 1}`,
9669
9977
  mask,
9670
9978
  color: DEFAULT_CHANNEL_COLOR,
9671
9979
  opacity: 0.5,
@@ -9710,7 +10018,7 @@ var ImageEditorController = (_class12 = class {
9710
10018
  /** Duplicates an alpha channel just after it (one undo step). Returns the copy. */
9711
10019
  duplicateChannel(id, name) {
9712
10020
  const channel = this.requireChannel(id);
9713
- const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess', _354 => _354.trim, 'call', _355 => _355()]) || `${channel.name} copy` };
10021
+ const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess', _355 => _355.trim, 'call', _356 => _356()]) || `${channel.name} copy` };
9714
10022
  const channels = [...this.getChannels()];
9715
10023
  channels.splice(channels.findIndex((c) => c.id === id) + 1, 0, copy);
9716
10024
  this.setChannels(channels);
@@ -9741,7 +10049,7 @@ var ImageEditorController = (_class12 = class {
9741
10049
  quickMaskSurface() {
9742
10050
  const { width, height } = this.naturalSize;
9743
10051
  const sel = this.state.selection;
9744
- if (!_optionalChain([sel, 'optionalAccess', _356 => _356.bounds])) return _chunkCWM3CUUXcjs.emptySurface.call(void 0, 1, 0);
10052
+ if (!_optionalChain([sel, 'optionalAccess', _357 => _357.bounds])) return _chunkCWM3CUUXcjs.emptySurface.call(void 0, 1, 0);
9745
10053
  return (sel.width === width && sel.height === height ? sel : _chunkUYXL6ZWQcjs.resizeSelection.call(void 0, sel, width, height)).surface;
9746
10054
  }
9747
10055
  /** The selection a painted Quick Mask surface stands for (it shares the surface's tiles). */
@@ -9762,7 +10070,7 @@ var ImageEditorController = (_class12 = class {
9762
10070
  */
9763
10071
  applySelectionAsLayerMask(layerId, props = {}) {
9764
10072
  const sel = this.state.selection;
9765
- if (!_optionalChain([sel, 'optionalAccess', _357 => _357.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
10073
+ if (!_optionalChain([sel, 'optionalAccess', _358 => _358.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
9766
10074
  return this.setLayerMask(layerId, this.maskFromSelection(sel, props));
9767
10075
  }
9768
10076
  setLayerMask(layerId, mask, commitToHistory = true) {
@@ -9802,7 +10110,7 @@ var ImageEditorController = (_class12 = class {
9802
10110
  /** A layer's painted mask over the canvas as a selection mask; null without one (or for a depth mask). */
9803
10111
  layerMaskCoverage(layerId) {
9804
10112
  const layer = this.getLayer(layerId);
9805
- if (!_optionalChain([layer, 'optionalAccess', _358 => _358.mask]) || layer.mask.source) return null;
10113
+ if (!_optionalChain([layer, 'optionalAccess', _359 => _359.mask]) || layer.mask.source) return null;
9806
10114
  const { width, height } = this.naturalSize;
9807
10115
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
9808
10116
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
@@ -9837,7 +10145,7 @@ var ImageEditorController = (_class12 = class {
9837
10145
  this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
9838
10146
  const next = { ...l };
9839
10147
  if (_chunkUYXL6ZWQcjs.isDefaultDepthMask.call(void 0, merged)) {
9840
- if (_optionalChain([next, 'access', _359 => _359.mask, 'optionalAccess', _360 => _360.source])) delete next.mask;
10148
+ if (_optionalChain([next, 'access', _360 => _360.mask, 'optionalAccess', _361 => _361.source])) delete next.mask;
9841
10149
  } else next.mask = _chunkUYXL6ZWQcjs.depthRasterMask.call(void 0, merged);
9842
10150
  return next;
9843
10151
  });
@@ -9847,7 +10155,7 @@ var ImageEditorController = (_class12 = class {
9847
10155
  resetDepthMask() {
9848
10156
  this.recordHistory();
9849
10157
  const target = this.developLayer();
9850
- if (_optionalChain([target, 'optionalAccess', _361 => _361.mask, 'optionalAccess', _362 => _362.source])) {
10158
+ if (_optionalChain([target, 'optionalAccess', _362 => _362.mask, 'optionalAccess', _363 => _363.source])) {
9851
10159
  this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
9852
10160
  const next = { ...l };
9853
10161
  delete next.mask;
@@ -9859,7 +10167,7 @@ var ImageEditorController = (_class12 = class {
9859
10167
  // --- Annotations & Layers ---
9860
10168
  /** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
9861
10169
  annotationLayer(id) {
9862
- 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', _363 => _363.id]) === id);
10170
+ 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', _364 => _364.id]) === id);
9863
10171
  }
9864
10172
  /** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
9865
10173
  annotationEnv() {
@@ -9877,7 +10185,7 @@ var ImageEditorController = (_class12 = class {
9877
10185
  const fullAnnotation = { ...annotation, id };
9878
10186
  const layer = _chunkUYXL6ZWQcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
9879
10187
  const loc = placement.aboveId ? _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
9880
- this.state.layers = loc ? _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _364 => _364.parent, 'optionalAccess', _365 => _365.id]), () => ( null)), loc.index + 1) : _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, null);
10188
+ this.state.layers = loc ? _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _365 => _365.parent, 'optionalAccess', _366 => _366.id]), () => ( null)), loc.index + 1) : _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, null);
9881
10189
  this.state.selectedAnnotationId = id;
9882
10190
  this.notify();
9883
10191
  return id;
@@ -9957,7 +10265,7 @@ var ImageEditorController = (_class12 = class {
9957
10265
  this.notify();
9958
10266
  }
9959
10267
  // --- Rendering & Export ---
9960
- __init100() {this.blankSource = null}
10268
+ __init104() {this.blankSource = null}
9961
10269
  /**
9962
10270
  * What the renderer draws from: the source image, or, for a document without one (an opened
9963
10271
  * PSD, a v3 document loaded on its own), a transparent canvas of the document size, since every
@@ -10000,7 +10308,7 @@ var ImageEditorController = (_class12 = class {
10000
10308
  await this.renderer.renderToCanvas(targetCanvas, source, this.state, {
10001
10309
  ...options,
10002
10310
  // The clone source follows the brush cursor (both editors pass it).
10003
- cloneSourceMarker: _optionalChain([options, 'optionalAccess', _366 => _366.cloneSourceMarker]) !== void 0 ? options.cloneSourceMarker : _optionalChain([options, 'optionalAccess', _367 => _367.brushCursor]) ? this.cloneSourceMarker(options.brushCursor) : null,
10311
+ cloneSourceMarker: _optionalChain([options, 'optionalAccess', _367 => _367.cloneSourceMarker]) !== void 0 ? options.cloneSourceMarker : _optionalChain([options, 'optionalAccess', _368 => _368.brushCursor]) ? this.cloneSourceMarker(options.brushCursor) : null,
10004
10312
  dirty: dirty === "all" ? void 0 : dirty,
10005
10313
  checkpointLayerId: this.state.activeLayerId
10006
10314
  });
@@ -10013,7 +10321,7 @@ var ImageEditorController = (_class12 = class {
10013
10321
  return this.renderer.createCanvas(1, 1);
10014
10322
  }
10015
10323
  this.syncViews();
10016
- if (_optionalChain([options, 'optionalAccess', _368 => _368.layerIds])) {
10324
+ if (_optionalChain([options, 'optionalAccess', _369 => _369.layerIds])) {
10017
10325
  const keep = new Set(options.layerIds);
10018
10326
  const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => keep.has(l.id));
10019
10327
  return this.renderer.renderExport(source, { ...this.state, layers }, options);
@@ -10167,7 +10475,7 @@ var ImageEditorController = (_class12 = class {
10167
10475
  let px2 = await this.decodeImage(newDataUrl);
10168
10476
  if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
10169
10477
  const data = new Uint8ClampedArray(px2.data);
10170
- const sel = _optionalChain([this, 'access', _369 => _369.state, 'access', _370 => _370.selection, 'optionalAccess', _371 => _371.bounds]) ? this.state.selection : null;
10478
+ const sel = _optionalChain([this, 'access', _370 => _370.state, 'access', _371 => _371.selection, 'optionalAccess', _372 => _372.bounds]) ? this.state.selection : null;
10171
10479
  if (sel) for (let p = 0, i = 3; p < width * height; p++, i += 4) data[i] = Math.round(data[i] * sel.data[p] / 255);
10172
10480
  return this.addPixelLayer({ name: "Inpaint", pixels: { width, height, data } });
10173
10481
  }
@@ -10214,7 +10522,7 @@ var ImageEditorController = (_class12 = class {
10214
10522
  }
10215
10523
  /** Font families the shaper offers (generic families at least). */
10216
10524
  listFonts() {
10217
- return _nullishCoalesce(_optionalChain([this, 'access', _372 => _372.getTextShaper, 'call', _373 => _373(), 'optionalAccess', _374 => _374.families, 'optionalCall', _375 => _375()]), () => ( ["sans-serif", "serif", "monospace"]));
10525
+ return _nullishCoalesce(_optionalChain([this, 'access', _373 => _373.getTextShaper, 'call', _374 => _374(), 'optionalAccess', _375 => _375.families, 'optionalCall', _376 => _376()]), () => ( ["sans-serif", "serif", "monospace"]));
10218
10526
  }
10219
10527
  typeInfo(id) {
10220
10528
  const layer = _chunkUYXL6ZWQcjs.requireTypeLayer.call(void 0, this.state.layers, id);
@@ -10288,8 +10596,8 @@ var ImageEditorController = (_class12 = class {
10288
10596
  const layer = this.layoutTypeLayer({ ...init, text, orientation: vertical ? "vertical" : "horizontal" });
10289
10597
  const { width, height } = this.naturalSize;
10290
10598
  const b = _chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.surface);
10291
- const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _376 => _376.x]), () => ( 0)));
10292
- const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _377 => _377.y]), () => ( 0)));
10599
+ const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _377 => _377.x]), () => ( 0)));
10600
+ const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _378 => _378.y]), () => ( 0)));
10293
10601
  const x1 = Math.min(width, b ? b.x + b.width : 0);
10294
10602
  const y1 = Math.min(height, b ? b.y + b.height : 0);
10295
10603
  let mask;
@@ -10466,7 +10774,7 @@ var ImageEditorController = (_class12 = class {
10466
10774
  if (colors.size > 1) warnings.push("The text had several colours; the shape takes the first one.");
10467
10775
  const missing = _chunkBRKVNXDZcjs.layoutText.call(void 0, layer, shaper).missingFonts;
10468
10776
  if (missing.length) warnings.push(`Missing fonts were drawn with a fallback: ${missing.join(", ")}.`);
10469
- const first = _nullishCoalesce(_optionalChain([layer, 'access', _378 => _378.runs, 'access', _379 => _379.find, 'call', _380 => _380((r) => r.length > 0), 'optionalAccess', _381 => _381.style]), () => ( _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE));
10777
+ const first = _nullishCoalesce(_optionalChain([layer, 'access', _379 => _379.runs, 'access', _380 => _380.find, 'call', _381 => _381((r) => r.length > 0), 'optionalAccess', _382 => _382.style]), () => ( _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE));
10470
10778
  const fill = first.opacity !== void 0 && first.opacity !== 1 ? { type: "color", color: first.color, opacity: first.opacity } : { type: "color", color: first.color };
10471
10779
  const shape = _chunkUYXL6ZWQcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
10472
10780
  const keep = { visible: layer.visible, opacity: layer.opacity, blend: layer.blend };
@@ -10499,7 +10807,7 @@ var ImageEditorController = (_class12 = class {
10499
10807
  // --- Shape layers ---
10500
10808
  /** What shape rendering needs: the canvas size and the document's patterns. */
10501
10809
  shapeEnv() {
10502
- return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _382 => _382.state, 'access', _383 => _383.patterns, 'optionalAccess', _384 => _384.find, 'call', _385 => _385((p) => p.id === id)]), () => ( null)) };
10810
+ return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _383 => _383.state, 'access', _384 => _384.patterns, 'optionalAccess', _385 => _385.find, 'call', _386 => _386((p) => p.id === id)]), () => ( null)) };
10503
10811
  }
10504
10812
  /** One component from tool or UI input (validated). */
10505
10813
  componentFrom(spec, path) {
@@ -10542,9 +10850,9 @@ var ImageEditorController = (_class12 = class {
10542
10850
  * open path) and stroked with `stroke`. Goes above the active layer unless placed. Returns its id.
10543
10851
  */
10544
10852
  addShapeLayer(init) {
10545
- const specs = _optionalChain([init, 'access', _386 => _386.components, 'optionalAccess', _387 => _387.length]) ? init.components : [init];
10546
- if (_optionalChain([init, 'access', _388 => _388.components, 'optionalAccess', _389 => _389.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
10547
- const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _390 => _390.components, 'optionalAccess', _391 => _391.length]) ? `components[${i}].` : ""));
10853
+ const specs = _optionalChain([init, 'access', _387 => _387.components, 'optionalAccess', _388 => _388.length]) ? init.components : [init];
10854
+ if (_optionalChain([init, 'access', _389 => _389.components, 'optionalAccess', _390 => _390.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
10855
+ const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _391 => _391.components, 'optionalAccess', _392 => _392.length]) ? `components[${i}].` : ""));
10548
10856
  const stroke = init.stroke ? _chunkUYXL6ZWQcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
10549
10857
  const openOnly = components.every((c) => !c.live && c.subpaths.every((sp) => !sp.closed));
10550
10858
  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");
@@ -10655,7 +10963,7 @@ var ImageEditorController = (_class12 = class {
10655
10963
  if (layer.locks) next.locks = layer.locks;
10656
10964
  if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
10657
10965
  } else if (layer.type === "pixel") {
10658
- if (!_optionalChain([layer, 'access', _392 => _392.filters, 'optionalAccess', _393 => _393.length])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
10966
+ if (!_optionalChain([layer, 'access', _393 => _393.filters, 'optionalAccess', _394 => _394.length])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
10659
10967
  _chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
10660
10968
  const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
10661
10969
  const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
@@ -10674,7 +10982,7 @@ var ImageEditorController = (_class12 = class {
10674
10982
  return this.rasterizeSmartObject(id);
10675
10983
  } else if (layer.type === "shape" || layer.type === "type") {
10676
10984
  next = layer.type === "shape" ? _chunkUYXL6ZWQcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkUYXL6ZWQcjs.typeAsPixelLayer.call(void 0, layer);
10677
- if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _394 => _394.annotation, 'optionalAccess', _395 => _395.id])) this.state.selectedAnnotationId = null;
10985
+ if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _395 => _395.annotation, 'optionalAccess', _396 => _396.id])) this.state.selectedAnnotationId = null;
10678
10986
  } else {
10679
10987
  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.`);
10680
10988
  }
@@ -10688,8 +10996,8 @@ var ImageEditorController = (_class12 = class {
10688
10996
  const doc = this.state.colorProfile;
10689
10997
  const p = resolveProfile(doc);
10690
10998
  const m = this.state.colorMode;
10691
- const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _396 => _396.name]), () => ( p.description)), builtin: doc ? _nullishCoalesce(doc.builtin, () => ( null)) : "srgb", colorSpace: p.colorSpace, srgb: isSrgb(doc), mode: _nullishCoalesce(_optionalChain([m, 'optionalAccess', _397 => _397.mode]), () => ( "rgb")) };
10692
- if (_optionalChain([m, 'optionalAccess', _398 => _398.mode]) === "cmyk") out.cmykProfile = { name: m.profile.name, builtin: _nullishCoalesce(m.profile.builtin, () => ( null)), intent: m.intent };
10999
+ const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _397 => _397.name]), () => ( p.description)), builtin: doc ? _nullishCoalesce(doc.builtin, () => ( null)) : "srgb", colorSpace: p.colorSpace, srgb: isSrgb(doc), mode: _nullishCoalesce(_optionalChain([m, 'optionalAccess', _398 => _398.mode]), () => ( "rgb")) };
11000
+ if (_optionalChain([m, 'optionalAccess', _399 => _399.mode]) === "cmyk") out.cmykProfile = { name: m.profile.name, builtin: _nullishCoalesce(m.profile.builtin, () => ( null)), intent: m.intent };
10693
11001
  return out;
10694
11002
  }
10695
11003
  /**
@@ -10779,7 +11087,7 @@ var ImageEditorController = (_class12 = class {
10779
11087
  const textEnv = this.textEnv();
10780
11088
  const walk = (layers) => layers.map((l) => {
10781
11089
  let next2 = l;
10782
- if (_optionalChain([l, 'access', _399 => _399.effects, 'optionalAccess', _400 => _400.items, 'access', _401 => _401.length])) next2 = { ...next2, effects: convertColorFields(l.effects, hex) };
11090
+ if (_optionalChain([l, 'access', _400 => _400.effects, 'optionalAccess', _401 => _401.items, 'access', _402 => _402.length])) next2 = { ...next2, effects: convertColorFields(l.effects, hex) };
10783
11091
  if (l.type === "group") {
10784
11092
  if (next2 !== l) converted.push(l.id);
10785
11093
  return { ...next2, children: walk(l.children) };
@@ -10963,8 +11271,8 @@ var ImageEditorController = (_class12 = class {
10963
11271
  else delete s.bitDepth;
10964
11272
  delete s.colorProfile;
10965
11273
  delete s.colorMode;
10966
- if (_optionalChain([result, 'access', _402 => _402.sourceMode, 'optionalAccess', _403 => _403.mode]) === "cmyk") s.colorMode = { mode: "cmyk", profile: result.sourceMode.profile, intent: "relative" };
10967
- else if (_optionalChain([result, 'access', _404 => _404.sourceMode, 'optionalAccess', _405 => _405.mode]) === "lab") s.colorMode = { mode: "lab" };
11274
+ if (_optionalChain([result, 'access', _403 => _403.sourceMode, 'optionalAccess', _404 => _404.mode]) === "cmyk") s.colorMode = { mode: "cmyk", profile: result.sourceMode.profile, intent: "relative" };
11275
+ else if (_optionalChain([result, 'access', _405 => _405.sourceMode, 'optionalAccess', _406 => _406.mode]) === "lab") s.colorMode = { mode: "lab" };
10968
11276
  else if (result.iccProfile) {
10969
11277
  try {
10970
11278
  const doc = documentProfile(result.iccProfile);
@@ -11028,7 +11336,7 @@ var ImageEditorController = (_class12 = class {
11028
11336
  const compositor = new (0, _chunkUYXL6ZWQcjs.LayerCompositor)();
11029
11337
  const bakeMask = (layer) => {
11030
11338
  const mask = layer.mask;
11031
- if (!_optionalChain([mask, 'optionalAccess', _406 => _406.source])) return mask;
11339
+ if (!_optionalChain([mask, 'optionalAccess', _407 => _407.source])) return mask;
11032
11340
  add2("Parametric (depth) masks were baked into pixel masks", layer.name);
11033
11341
  const plain3 = { ...layer, mask: { ...mask, density: 1, feather: 0, enabled: true } };
11034
11342
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
@@ -11045,7 +11353,7 @@ var ImageEditorController = (_class12 = class {
11045
11353
  };
11046
11354
  const prepare = async (layer) => {
11047
11355
  const p = await prepareLayer(layer);
11048
- if (_optionalChain([p, 'optionalAccess', _407 => _407.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
11356
+ if (_optionalChain([p, 'optionalAccess', _408 => _408.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
11049
11357
  return p;
11050
11358
  };
11051
11359
  const prepareLayer = async (layer) => {
@@ -11088,7 +11396,7 @@ var ImageEditorController = (_class12 = class {
11088
11396
  return out2;
11089
11397
  }
11090
11398
  if (layer.type === "shape" || layer.type === "type") {
11091
- if (layer.type === "type" && _optionalChain([layer, 'access', _408 => _408.missingFonts, 'optionalAccess', _409 => _409.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);
11399
+ if (layer.type === "type" && _optionalChain([layer, 'access', _409 => _409.missingFonts, 'optionalAccess', _410 => _410.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);
11092
11400
  const out2 = { ...layer };
11093
11401
  const mask2 = bakeMask(layer);
11094
11402
  if (mask2) out2.mask = mask2;
@@ -11107,7 +11415,7 @@ var ImageEditorController = (_class12 = class {
11107
11415
  out.surface = this.surfaceOf(layer);
11108
11416
  delete out.source;
11109
11417
  }
11110
- const active = _nullishCoalesce(_optionalChain([layer, 'access', _410 => _410.filters, 'optionalAccess', _411 => _411.filter, 'call', _412 => _412(_chunkUYXL6ZWQcjs.isActiveFilter)]), () => ( []));
11418
+ const active = _nullishCoalesce(_optionalChain([layer, 'access', _411 => _411.filters, 'optionalAccess', _412 => _412.filter, 'call', _413 => _413(_chunkUYXL6ZWQcjs.isActiveFilter)]), () => ( []));
11111
11419
  if (active.length) {
11112
11420
  add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
11113
11421
  const content = { ...out, visible: true, opacity: 1, blend: "normal" };
@@ -11118,7 +11426,7 @@ var ImageEditorController = (_class12 = class {
11118
11426
  const data = compositor.composite([content], canvas, sources);
11119
11427
  out = { ...out, surface: _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width, height, data }, 4, -layer.offset.x, -layer.offset.y) };
11120
11428
  }
11121
- if (_optionalChain([layer, 'access', _413 => _413.filters, 'optionalAccess', _414 => _414.some, 'call', _415 => _415((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
11429
+ if (_optionalChain([layer, 'access', _414 => _414.filters, 'optionalAccess', _415 => _415.some, 'call', _416 => _416((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
11122
11430
  delete out.filters;
11123
11431
  const mask = bakeMask(layer);
11124
11432
  if (mask) out.mask = mask;
@@ -11182,7 +11490,7 @@ var ImageEditorController = (_class12 = class {
11182
11490
  );
11183
11491
  }
11184
11492
  layers = resizeLegacyMasks(layers, prev, next.dimensions);
11185
- const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access', _416 => _416.state, 'access', _417 => _417.patterns, 'optionalAccess', _418 => _418.find, 'call', _419 => _419((p) => p.id === pid)]), () => ( null)) };
11493
+ const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access', _417 => _417.state, 'access', _418 => _418.patterns, 'optionalAccess', _419 => _419.find, 'call', _420 => _420((p) => p.id === pid)]), () => ( null)) };
11186
11494
  for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers)) {
11187
11495
  if (l.type === "annotation") {
11188
11496
  layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, annotation: scaleAnnotation(l.annotation, sx, sy) }));
@@ -11191,7 +11499,7 @@ var ImageEditorController = (_class12 = class {
11191
11499
  const scaled = a ? scaleAnnotation(a, sx, sy) : null;
11192
11500
  const fromAnnotation = scaled ? _chunkUYXL6ZWQcjs.shapeFromAnnotation.call(void 0, scaled) : null;
11193
11501
  const m = [sx, 0, 0, sy, 0, 0];
11194
- const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _420 => _420.components]), () => ( _chunkUYXL6ZWQcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
11502
+ const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _421 => _421.components]), () => ( _chunkUYXL6ZWQcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
11195
11503
  const moved = { ...l, components, ...fromAnnotation ? { fill: fromAnnotation.fill, stroke: fromAnnotation.stroke } : {} };
11196
11504
  if (scaled && fromAnnotation) moved.annotation = scaled;
11197
11505
  else delete moved.annotation;
@@ -11209,7 +11517,7 @@ var ImageEditorController = (_class12 = class {
11209
11517
  this.notify();
11210
11518
  }
11211
11519
  toJSON(options) {
11212
- const root = _optionalChain([this, 'access', _421 => _421.contentsStack, 'access', _422 => _422[0], 'optionalAccess', _423 => _423.saved]);
11520
+ const root = _optionalChain([this, 'access', _422 => _422.contentsStack, 'access', _423 => _423[0], 'optionalAccess', _424 => _424.saved]);
11213
11521
  const current = this.state;
11214
11522
  const element = this.imageElement;
11215
11523
  if (root) {
@@ -11220,8 +11528,8 @@ var ImageEditorController = (_class12 = class {
11220
11528
  let out;
11221
11529
  try {
11222
11530
  out = this.serializeState();
11223
- if (_optionalChain([this, 'access', _424 => _424.state, 'access', _425 => _425.selection, 'optionalAccess', _426 => _426.bounds])) out.selection = _chunkUYXL6ZWQcjs.serializeSelection.call(void 0, this.state.selection);
11224
- if (_optionalChain([this, 'access', _427 => _427.state, 'access', _428 => _428.channels, 'optionalAccess', _429 => _429.length])) out.channels = serializeChannels(this.state.channels);
11531
+ if (_optionalChain([this, 'access', _425 => _425.state, 'access', _426 => _426.selection, 'optionalAccess', _427 => _427.bounds])) out.selection = _chunkUYXL6ZWQcjs.serializeSelection.call(void 0, this.state.selection);
11532
+ if (_optionalChain([this, 'access', _428 => _428.state, 'access', _429 => _429.channels, 'optionalAccess', _430 => _430.length])) out.channels = serializeChannels(this.state.channels);
11225
11533
  } finally {
11226
11534
  if (root) {
11227
11535
  this.state = current;
@@ -11270,7 +11578,7 @@ var ImageEditorController = (_class12 = class {
11270
11578
  this.notify();
11271
11579
  }
11272
11580
  /** Problems found by the last `loadJSON` / `initialState` of a v3 document (unreadable layers or assets). */
11273
- __init101() {this.lastLoadProblems = []}
11581
+ __init105() {this.lastLoadProblems = []}
11274
11582
  applyStored(raw) {
11275
11583
  const s = this.state;
11276
11584
  const data = migrateSerializedImageEditorState(raw);
@@ -11335,10 +11643,10 @@ var ImageEditorController = (_class12 = class {
11335
11643
  serializeState() {
11336
11644
  const { width, height } = this.naturalSize;
11337
11645
  const view = _chunkUYXL6ZWQcjs.legacyView.call(void 0, this.stack(), width, height, null);
11338
- if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _430 => _430.state, 'access', _431 => _431.patterns, 'optionalAccess', _432 => _432.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
11646
+ if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _431 => _431.state, 'access', _432 => _432.patterns, 'optionalAccess', _433 => _433.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
11339
11647
  return {
11340
11648
  // States without adjustment layers keep schema 1, so they round-trip unchanged.
11341
- version: _optionalChain([view, 'access', _433 => _433.adjustments, 'access', _434 => _434.layers, 'optionalAccess', _435 => _435.length]) ? 2 : 1,
11649
+ version: _optionalChain([view, 'access', _434 => _434.adjustments, 'access', _435 => _435.layers, 'optionalAccess', _436 => _436.length]) ? 2 : 1,
11342
11650
  crop: this.state.crop ? { ...this.state.crop } : null,
11343
11651
  transform: { ...this.state.transform },
11344
11652
  adjustments: serializeAdjustments(view.adjustments),
@@ -11363,17 +11671,17 @@ var ImageEditorController = (_class12 = class {
11363
11671
  };
11364
11672
  if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
11365
11673
  if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
11366
- if (_optionalChain([this, 'access', _436 => _436.state, 'access', _437 => _437.patterns, 'optionalAccess', _438 => _438.length])) out.patterns = _chunkUYXL6ZWQcjs.serializePatterns.call(void 0, this.state.patterns);
11674
+ if (_optionalChain([this, 'access', _437 => _437.state, 'access', _438 => _438.patterns, 'optionalAccess', _439 => _439.length])) out.patterns = _chunkUYXL6ZWQcjs.serializePatterns.call(void 0, this.state.patterns);
11367
11675
  if (smartContents) out.smartContents = smartContents;
11368
11676
  if (this.state.bitDepth === 16 || this.state.bitDepth === 32) out.bitDepth = this.state.bitDepth;
11369
11677
  if (this.state.colorProfile) out.colorProfile = serializeColorProfile(this.state.colorProfile);
11370
11678
  if (this.state.colorMode) out.colorMode = serializeColorMode(this.state.colorMode);
11371
11679
  return out;
11372
11680
  }
11373
- }, _class12);
11681
+ }, _class13);
11374
11682
  function serializeAdjustments(adjustments) {
11375
11683
  const out = { ...adjustments };
11376
- if (_optionalChain([out, 'access', _439 => _439.layers, 'optionalAccess', _440 => _440.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
11684
+ if (_optionalChain([out, 'access', _440 => _440.layers, 'optionalAccess', _441 => _441.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
11377
11685
  else delete out.layers;
11378
11686
  if (_chunkUYXL6ZWQcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkUYXL6ZWQcjs.LEGACY_PROCESS_VERSION) {
11379
11687
  delete out.process;
@@ -11409,11 +11717,11 @@ function withDevelop(layer, partial) {
11409
11717
  return { ...layer, filters };
11410
11718
  }
11411
11719
  function withBlur(layer, radius) {
11412
- const existing = _optionalChain([layer, 'access', _441 => _441.filters, 'optionalAccess', _442 => _442.find, 'call', _443 => _443((f) => f.kind === "blur")]);
11720
+ const existing = _optionalChain([layer, 'access', _442 => _442.filters, 'optionalAccess', _443 => _443.find, 'call', _444 => _444((f) => f.kind === "blur")]);
11413
11721
  const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
11414
11722
  if (radius > 0) {
11415
11723
  filters.push({
11416
- id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _444 => _444.id]), () => ( (layer.source === "document" ? _chunkUYXL6ZWQcjs.BLUR_FILTER_ID : _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "flt")))),
11724
+ id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _445 => _445.id]), () => ( (layer.source === "document" ? _chunkUYXL6ZWQcjs.BLUR_FILTER_ID : _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "flt")))),
11417
11725
  kind: "blur",
11418
11726
  enabled: true,
11419
11727
  radius
@@ -11509,7 +11817,7 @@ function collectStateTiles(layers, into) {
11509
11817
  if (l.type === "shape" || l.type === "type") _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.surface, into);
11510
11818
  if (l.type === "smart") {
11511
11819
  _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.surface, into);
11512
- if (_optionalChain([l, 'access', _445 => _445.smartFilters, 'optionalAccess', _446 => _446.mask])) _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
11820
+ if (_optionalChain([l, 'access', _446 => _446.smartFilters, 'optionalAccess', _447 => _447.mask])) _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
11513
11821
  if (l.contents.raster) _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.contents.raster, into);
11514
11822
  if (l.contents.document) collectStateTiles(l.contents.document.layers, into);
11515
11823
  }
@@ -11541,7 +11849,7 @@ function pixelsOnly(layers) {
11541
11849
  for (const l of layers) {
11542
11850
  if (l.type === "adjustment") continue;
11543
11851
  if (l.type === "group") out.push({ ...l, children: pixelsOnly(l.children) });
11544
- else if (l.type === "pixel" && _optionalChain([l, 'access', _447 => _447.filters, 'optionalAccess', _448 => _448.length])) {
11852
+ else if (l.type === "pixel" && _optionalChain([l, 'access', _448 => _448.filters, 'optionalAccess', _449 => _449.length])) {
11545
11853
  const p = { ...l };
11546
11854
  delete p.filters;
11547
11855
  out.push(p);
@@ -11607,7 +11915,7 @@ function toHex(c) {
11607
11915
  return "#" + [c[0], c[1], c[2]].map((v) => Math.round(v).toString(16).padStart(2, "0")).join("");
11608
11916
  }
11609
11917
  function normalizeSelection(mask) {
11610
- return _optionalChain([mask, 'optionalAccess', _449 => _449.bounds]) ? mask : null;
11918
+ return _optionalChain([mask, 'optionalAccess', _450 => _450.bounds]) ? mask : null;
11611
11919
  }
11612
11920
  function sameSelection(a, b) {
11613
11921
  if (a.width !== b.width || a.height !== b.height) return false;
@@ -11817,7 +12125,7 @@ function loadImageEditorDocument(input) {
11817
12125
  }
11818
12126
  const state = { version: 1, ...result.value };
11819
12127
  if (isV2) {
11820
- if (_optionalChain([state, 'access', _450 => _450.adjustments, 'access', _451 => _451.layers, 'optionalAccess', _452 => _452.length])) state.version = 2;
12128
+ if (_optionalChain([state, 'access', _451 => _451.adjustments, 'access', _452 => _452.layers, 'optionalAccess', _453 => _453.length])) state.version = 2;
11821
12129
  result.report.version = 2;
11822
12130
  }
11823
12131
  if (state.selection === void 0) delete state.selection;
@@ -12025,7 +12333,7 @@ function findAdjustmentControl(id) {
12025
12333
  }
12026
12334
  function findLayerControl(kind, id) {
12027
12335
  if (id === "opacity") return ADJUSTMENT_LAYER_OPACITY_CONTROL;
12028
- return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _453 => _453[kind], 'optionalAccess', _454 => _454.find, 'call', _455 => _455((c) => c.id === id)]);
12336
+ return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _454 => _454[kind], 'optionalAccess', _455 => _455.find, 'call', _456 => _456((c) => c.id === id)]);
12029
12337
  }
12030
12338
  function clampControlValue(spec, v) {
12031
12339
  if (typeof v !== "number" || !Number.isFinite(v)) return spec.default;
@@ -12242,7 +12550,7 @@ var DEPTH_MASK_CONTROLS = [
12242
12550
  // src/image-editor/playback.ts
12243
12551
  var IMAGE_PLAYBACK_KIND = "layer";
12244
12552
  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)$/;
12245
- var SELECT = /^(select_region|select_subject|select_by_color|select_all|deselect|invert_selection|select_rect|select_ellipse|select_polygon|quick_select|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)$/;
12553
+ 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)$/;
12246
12554
  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)$/;
12247
12555
  var CROP = /^(set_crop|crop_to_selection|reset_crop|set_rotation|flip_image|transform_layer|warp_layer|flip_layer|offset_layer)$/;
12248
12556
  var ADJUST = /^(set_adjustments|add_adjustment_layer|update_adjustment_layer|remove_adjustment_layer|move_adjustment_layer)$/;
@@ -12365,6 +12673,7 @@ var SELECTION_TOOLS = [
12365
12673
  { id: "polygon", label: "Polygonal Lasso" },
12366
12674
  { id: "magnetic", label: "Magnetic Lasso" },
12367
12675
  { id: "quick", label: "Quick Selection" },
12676
+ { id: "object", label: "Object Selection" },
12368
12677
  { id: "range", label: "Color Range" },
12369
12678
  { id: "type", label: "Type Mask" },
12370
12679
  { id: "type-vertical", label: "Vertical Type Mask" }
@@ -12405,6 +12714,8 @@ var DEFAULT_SELECTION_TOOL_OPTIONS = {
12405
12714
  quickSize: 30,
12406
12715
  quickSampleAll: true,
12407
12716
  quickEnhance: false,
12717
+ objectSampleAll: true,
12718
+ objectEnhance: false,
12408
12719
  typeText: "Type",
12409
12720
  typeSize: 72,
12410
12721
  typeFamily: "sans-serif"
@@ -12477,7 +12788,7 @@ function summary(controller) {
12477
12788
  const area = _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel);
12478
12789
  return {
12479
12790
  empty: !sel,
12480
- bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _456 => _456.bounds]), () => ( null)),
12791
+ bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _457 => _457.bounds]), () => ( null)),
12481
12792
  /** Σ coverage in pixels. */
12482
12793
  area: Math.round(area),
12483
12794
  percent: Math.round(area / Math.max(1, width * height) * 1e4) / 100,
@@ -12553,7 +12864,7 @@ function createImageSelectionTools(controller) {
12553
12864
  break;
12554
12865
  }
12555
12866
  case "polygon": {
12556
- const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _457 => _457.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _458 => _458.y]), NaN) })) : [];
12867
+ const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _458 => _458.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _459 => _459.y]), NaN) })) : [];
12557
12868
  if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
12558
12869
  throw new Error("polygon needs points: at least 3 { x, y } vertices.");
12559
12870
  }
@@ -12790,7 +13101,7 @@ function createImageSelectionTools(controller) {
12790
13101
  },
12791
13102
  annotations: writeAnnotations("Select a polygon (lasso)", true),
12792
13103
  handler: async (args) => {
12793
- const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _459 => _459.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _460 => _460.y]), NaN) })) : [];
13104
+ const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _460 => _460.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _461 => _461.y]), NaN) })) : [];
12794
13105
  if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
12795
13106
  throw new Error("points needs at least 3 { x, y } vertices in natural image pixels.");
12796
13107
  }
@@ -12827,7 +13138,7 @@ function createImageSelectionTools(controller) {
12827
13138
  },
12828
13139
  annotations: writeAnnotations("Quick Selection"),
12829
13140
  handler: async (args) => {
12830
- const strokes = Array.isArray(args.strokes) ? args.strokes.map((s) => Array.isArray(s) ? s.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _461 => _461.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _462 => _462.y]), NaN) })) : []) : [];
13141
+ const strokes = Array.isArray(args.strokes) ? args.strokes.map((s) => Array.isArray(s) ? s.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _462 => _462.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _463 => _463.y]), NaN) })) : []) : [];
12831
13142
  if (!strokes.length || strokes.some((s) => !s.length || !s.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y)))) {
12832
13143
  throw new Error("strokes needs at least one stroke of { x, y } points in natural image pixels.");
12833
13144
  }
@@ -12840,6 +13151,39 @@ function createImageSelectionTools(controller) {
12840
13151
  return summary(controller);
12841
13152
  }
12842
13153
  };
13154
+ const selectObjectTool = {
13155
+ name: "select_object",
13156
+ title: "Object Selection",
13157
+ description: "Object Selection: selects the object inside rect (a box drawn loosely around it, natural image pixels; what lies outside the box is treated as background) or the object under point, found from the colours of object and background and the edges between them (GrabCut). Combined with the selection by mode. A box is more reliable than a point: make it a little larger than the object on every side. Check with get_selection and capture_view, then fix with quick_select strokes or select_object with mode add / subtract. One undoable step. Returns the selection.",
13158
+ inputSchema: {
13159
+ type: "object",
13160
+ properties: {
13161
+ rect: {
13162
+ type: "object",
13163
+ properties: rectProperties,
13164
+ required: ["x", "y", "width", "height"],
13165
+ additionalProperties: false,
13166
+ description: "A box around the object (x, y, width, height in natural image pixels). Pass this or point."
13167
+ },
13168
+ point: { ...pointSchema, description: "A point on the object (natural image pixels). Pass this or rect." },
13169
+ mode: modeSchema,
13170
+ sampleAllLayers: { type: "boolean", description: "Read every layer (default true); false reads only the active pixel layer." },
13171
+ enhanceEdge: { type: "boolean", description: "Smoother, less blocky edges (Auto-Enhance; default false)." }
13172
+ },
13173
+ additionalProperties: false
13174
+ },
13175
+ annotations: writeAnnotations("Object Selection"),
13176
+ handler: async (args) => {
13177
+ const rect = args.rect;
13178
+ const point = args.point;
13179
+ if (!rect && !point) throw new Error("Pass rect (a box around the object) or point (a point on it).");
13180
+ if (rect && point) throw new Error("Pass rect or point, not both.");
13181
+ const options = { mode: _chunkUYXL6ZWQcjs.parseSelectionMode.call(void 0, args.mode), sampleAllLayers: args.sampleAllLayers, enhanceEdge: args.enhanceEdge };
13182
+ if (rect) await controller.selectObject({ rect: { x: num2(rect.x, NaN), y: num2(rect.y, NaN), width: num2(rect.width, NaN), height: num2(rect.height, NaN) } }, options);
13183
+ else await controller.selectObject({ point: { x: num2(point.x, NaN), y: num2(point.y, NaN) } }, options);
13184
+ return summary(controller);
13185
+ }
13186
+ };
12843
13187
  const magicWandTool = {
12844
13188
  name: "magic_wand",
12845
13189
  title: "Magic wand",
@@ -12933,7 +13277,7 @@ function createImageSelectionTools(controller) {
12933
13277
  await controller.selectColorRangePreset(args.preset, { ...common, falloff: num2(args.fuzziness, 20) });
12934
13278
  } else {
12935
13279
  const samples = args.samples.map((s, i) => {
12936
- if (typeof _optionalChain([s, 'optionalAccess', _463 => _463.color]) !== "string" || !/^#?[0-9a-f]{6}$/i.test(s.color.trim())) throw new Error(`samples[${i}].color must be #rrggbb.`);
13280
+ if (typeof _optionalChain([s, 'optionalAccess', _464 => _464.color]) !== "string" || !/^#?[0-9a-f]{6}$/i.test(s.color.trim())) throw new Error(`samples[${i}].color must be #rrggbb.`);
12937
13281
  const at = typeof s.x === "number" && typeof s.y === "number" ? { x: s.x, y: s.y } : void 0;
12938
13282
  return at ? { color: s.color, at } : { color: s.color };
12939
13283
  });
@@ -13393,6 +13737,7 @@ function createImageSelectionTools(controller) {
13393
13737
  selectEllipse,
13394
13738
  selectPolygonTool,
13395
13739
  quickSelectTool,
13740
+ selectObjectTool,
13396
13741
  lineTool,
13397
13742
  magicWandTool,
13398
13743
  colorRangeTool,
@@ -13449,12 +13794,12 @@ function createImageSubjectSelectionTool(controller) {
13449
13794
  annotations: { ...writeAnnotations("Select a subject"), openWorldHint: true },
13450
13795
  handler: async ({ target, maxSegments, mode, feather }, context) => {
13451
13796
  if (typeof target !== "string" || !target.trim()) throw new Error("target must describe what to select.");
13452
- const perform = _optionalChain([context, 'optionalAccess', _464 => _464.perform]);
13797
+ const perform = _optionalChain([context, 'optionalAccess', _465 => _465.perform]);
13453
13798
  const { segments } = await controller.selectSubject(target, {
13454
13799
  mode: _chunkUYXL6ZWQcjs.parseSelectionMode.call(void 0, mode),
13455
13800
  feather: num2(feather, 0),
13456
13801
  maxSegments: typeof maxSegments === "number" ? Math.max(1, Math.round(maxSegments)) : void 0,
13457
- signal: _optionalChain([context, 'optionalAccess', _465 => _465.signal]),
13802
+ signal: _optionalChain([context, 'optionalAccess', _466 => _466.signal]),
13458
13803
  // Under playback the cursor traces what the model found, as a lasso, before it is selected.
13459
13804
  beforeApply: perform ? (outlines) => perform(planOutlineTrace(outlines)) : void 0
13460
13805
  });
@@ -13533,7 +13878,7 @@ async function renderImageRegion(controller, request) {
13533
13878
  const maskView = maskViewCanvas(controller, document);
13534
13879
  if (maskView) context.drawImage(maskView, rect.x, rect.y, rect.width, rect.height, 0, 0, out.width, out.height);
13535
13880
  const selection = state.selection;
13536
- if (_optionalChain([selection, 'optionalAccess', _466 => _466.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
13881
+ if (_optionalChain([selection, 'optionalAccess', _467 => _467.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
13537
13882
  const shade = selectionShade(selection, document);
13538
13883
  if (shade) context.drawImage(shade, rect.x, rect.y, rect.width, rect.height, 0, 0, out.width, out.height);
13539
13884
  }
@@ -13558,7 +13903,7 @@ function createImageCaptureSurface(controller) {
13558
13903
  return {
13559
13904
  units: "image pixels",
13560
13905
  content: whole,
13561
- selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _467 => _467.getState, 'call', _468 => _468(), 'access', _469 => _469.selection, 'optionalAccess', _470 => _470.bounds]), () => ( null)) }),
13906
+ selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _468 => _468.getState, 'call', _469 => _469(), 'access', _470 => _470.selection, 'optionalAccess', _471 => _471.bounds]), () => ( null)) }),
13562
13907
  overlays: "a shade over unselected pixels, the crop box outline and a layer mask view (set_mask_view)",
13563
13908
  maxScale: 8,
13564
13909
  render: (request) => renderImageRegion(controller, request)
@@ -13892,7 +14237,7 @@ function describeLayer(layer, activeId, boundsOf) {
13892
14237
  out.bounds = boundsOf(layer);
13893
14238
  out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
13894
14239
  out.shape = {
13895
- components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _471 => _471.live, 'optionalAccess', _472 => _472.kind]), () => ( "path")) })),
14240
+ components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _472 => _472.live, 'optionalAccess', _473 => _473.kind]), () => ( "path")) })),
13896
14241
  fill: layer.fill ? layer.fill.type : null,
13897
14242
  stroke: layer.stroke ? { width: layer.stroke.width, paint: layer.stroke.paint.type } : null
13898
14243
  };
@@ -13915,8 +14260,8 @@ function describeLayer(layer, activeId, boundsOf) {
13915
14260
  out.bounds = boundsOf(layer);
13916
14261
  out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
13917
14262
  out.contents = { id: layer.contents.id, name: layer.contents.name, kind: layer.contents.kind, width: layer.contents.width, height: layer.contents.height };
13918
- out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _473 => _473.smartFilters, 'optionalAccess', _474 => _474.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
13919
- out.filterMask = maskSummary(_optionalChain([layer, 'access', _475 => _475.smartFilters, 'optionalAccess', _476 => _476.mask]));
14263
+ out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _474 => _474.smartFilters, 'optionalAccess', _475 => _475.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
14264
+ out.filterMask = maskSummary(_optionalChain([layer, 'access', _476 => _476.smartFilters, 'optionalAccess', _477 => _477.mask]));
13920
14265
  break;
13921
14266
  }
13922
14267
  return out;
@@ -13944,7 +14289,7 @@ function createImageLayerTools(controller) {
13944
14289
  if (!loc) return null;
13945
14290
  return {
13946
14291
  ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)),
13947
- parentId: _nullishCoalesce(_optionalChain([loc, 'access', _477 => _477.parent, 'optionalAccess', _478 => _478.id]), () => ( null)),
14292
+ parentId: _nullishCoalesce(_optionalChain([loc, 'access', _478 => _478.parent, 'optionalAccess', _479 => _479.id]), () => ( null)),
13948
14293
  index: loc.index
13949
14294
  };
13950
14295
  };
@@ -14267,7 +14612,7 @@ function createImageLayerTools(controller) {
14267
14612
  if (view !== "gray" && view !== "overlay" && view !== "off") throw new Error(`Unknown view "${String(view)}". Use gray, overlay or off.`);
14268
14613
  const id = view === "off" || layerId === void 0 ? void 0 : exists(layerId);
14269
14614
  const shown = controller.setMaskView(view, id);
14270
- return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _479 => _479.mode]), () => ( "off")), layerId: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _480 => _480.layerId]), () => ( null)) };
14615
+ return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _480 => _480.mode]), () => ( "off")), layerId: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _481 => _481.layerId]), () => ( null)) };
14271
14616
  }
14272
14617
  };
14273
14618
  const maskProps = {
@@ -14760,31 +15105,31 @@ function snapTo45(from, point) {
14760
15105
  const a = Math.round(Math.atan2(dy, dx) / (Math.PI / 4)) * (Math.PI / 4);
14761
15106
  return { x: from.x + Math.cos(a) * len, y: from.y + Math.sin(a) * len };
14762
15107
  }
14763
- var SelectionGesture = (_class13 = class {
14764
- constructor(controller, getOptions) {;_class13.prototype.__init102.call(this);_class13.prototype.__init103.call(this);_class13.prototype.__init104.call(this);_class13.prototype.__init105.call(this);_class13.prototype.__init106.call(this);_class13.prototype.__init107.call(this);_class13.prototype.__init108.call(this);_class13.prototype.__init109.call(this);_class13.prototype.__init110.call(this);_class13.prototype.__init111.call(this);_class13.prototype.__init112.call(this);
15108
+ var SelectionGesture = (_class14 = class {
15109
+ constructor(controller, getOptions) {;_class14.prototype.__init106.call(this);_class14.prototype.__init107.call(this);_class14.prototype.__init108.call(this);_class14.prototype.__init109.call(this);_class14.prototype.__init110.call(this);_class14.prototype.__init111.call(this);_class14.prototype.__init112.call(this);_class14.prototype.__init113.call(this);_class14.prototype.__init114.call(this);_class14.prototype.__init115.call(this);_class14.prototype.__init116.call(this);
14765
15110
  this.controller = controller;
14766
15111
  this.getOptions = getOptions;
14767
15112
  }
14768
15113
 
14769
15114
 
14770
- __init102() {this.start = null}
14771
- __init103() {this.points = []}
14772
- __init104() {this.current = null}
14773
- __init105() {this.modifiers = {}}
15115
+ __init106() {this.start = null}
15116
+ __init107() {this.points = []}
15117
+ __init108() {this.current = null}
15118
+ __init109() {this.modifiers = {}}
14774
15119
  /** Polygonal lasso corners while one is being drawn. */
14775
- __init106() {this.polygon = null}
14776
- __init107() {this.pressedAt = null}
14777
- __init108() {this.freehand = false}
14778
- __init109() {this.magnetic = null}
15120
+ __init110() {this.polygon = null}
15121
+ __init111() {this.pressedAt = null}
15122
+ __init112() {this.freehand = false}
15123
+ __init113() {this.magnetic = null}
14779
15124
  /** A click this close to the first corner (natural pixels) closes a polygonal lasso. */
14780
- __init110() {this.closeRadius = 8}
15125
+ __init114() {this.closeRadius = 8}
14781
15126
  /** The last error (e.g. pixels unavailable for the wand), for the UI to show. */
14782
- __init111() {this.error = null}
14783
- __init112() {this.pending = Promise.resolve()}
15127
+ __init115() {this.error = null}
15128
+ __init116() {this.pending = Promise.resolve()}
14784
15129
  get active() {
14785
15130
  return this.start !== null || this.polygon !== null || this.magnetic !== null;
14786
15131
  }
14787
- /** Resolves once a Quick Selection stroke has been applied. */
15132
+ /** Resolves once a Quick Selection stroke or an Object Selection has been applied. */
14788
15133
  get settled() {
14789
15134
  return this.pending;
14790
15135
  }
@@ -14954,6 +15299,20 @@ var SelectionGesture = (_class13 = class {
14954
15299
  if (point) this.move(point);
14955
15300
  const options = this.getOptions();
14956
15301
  const mode = selectionModeFromModifiers(_nullishCoalesce(modifiers, () => ( this.modifiers)), options.mode);
15302
+ if (options.tool === "object") {
15303
+ const rect2 = normalizeRect({ x: this.start.x, y: this.start.y, width: this.current.x - this.start.x, height: this.current.y - this.start.y });
15304
+ this.start = null;
15305
+ this.current = null;
15306
+ this.points = [];
15307
+ const target = rect2.width >= 4 && rect2.height >= 4 ? { rect: rect2 } : { point: { x: rect2.x + rect2.width / 2, y: rect2.y + rect2.height / 2 } };
15308
+ this.pending = this.controller.selectObject(target, { mode, sampleAllLayers: _nullishCoalesce(options.objectSampleAll, () => ( true)), enhanceEdge: _nullishCoalesce(options.objectEnhance, () => ( false)) }).then(
15309
+ () => void 0,
15310
+ (err) => {
15311
+ this.error = err instanceof Error ? err.message : String(err);
15312
+ }
15313
+ );
15314
+ return false;
15315
+ }
14957
15316
  if (options.tool === "quick") {
14958
15317
  const stroke = this.points;
14959
15318
  this.start = null;
@@ -15107,7 +15466,7 @@ var SelectionGesture = (_class13 = class {
15107
15466
  this.pressedAt = null;
15108
15467
  this.freehand = false;
15109
15468
  }
15110
- }, _class13);
15469
+ }, _class14);
15111
15470
  function handleSelectionShortcut(controller, e, onError) {
15112
15471
  if (!(e.ctrlKey || e.metaKey)) return false;
15113
15472
  const key = e.key.toLowerCase();
@@ -15115,7 +15474,7 @@ function handleSelectionShortcut(controller, e, onError) {
15115
15474
  try {
15116
15475
  fn();
15117
15476
  } catch (err) {
15118
- _optionalChain([onError, 'optionalCall', _481 => _481(err instanceof Error ? err.message : String(err))]);
15477
+ _optionalChain([onError, 'optionalCall', _482 => _482(err instanceof Error ? err.message : String(err))]);
15119
15478
  }
15120
15479
  return true;
15121
15480
  };
@@ -15130,9 +15489,9 @@ function handleMaskViewKey(controller, e) {
15130
15489
  if (e.ctrlKey || e.metaKey || e.altKey || e.key !== "\\") return false;
15131
15490
  const id = controller.getState().activeLayerId;
15132
15491
  const layer = id ? controller.getLayer(id) : null;
15133
- if (!_optionalChain([layer, 'optionalAccess', _482 => _482.mask]) || layer.mask.source) return false;
15492
+ if (!_optionalChain([layer, 'optionalAccess', _483 => _483.mask]) || layer.mask.source) return false;
15134
15493
  const view = controller.getMaskView();
15135
- controller.setMaskView(_optionalChain([view, 'optionalAccess', _483 => _483.layerId]) === layer.id && view.mode === "overlay" ? "off" : "overlay", layer.id);
15494
+ controller.setMaskView(_optionalChain([view, 'optionalAccess', _484 => _484.layerId]) === layer.id && view.mode === "overlay" ? "off" : "overlay", layer.id);
15136
15495
  return true;
15137
15496
  }
15138
15497
  function handleQuickMaskKey(controller, e) {
@@ -15326,15 +15685,15 @@ function handlePaintShortcut(controller, e) {
15326
15685
  }
15327
15686
  return false;
15328
15687
  }
15329
- var PaintGesture = (_class14 = class {
15330
- constructor(controller) {;_class14.prototype.__init113.call(this);_class14.prototype.__init114.call(this);_class14.prototype.__init115.call(this);
15688
+ var PaintGesture = (_class15 = class {
15689
+ constructor(controller) {;_class15.prototype.__init117.call(this);_class15.prototype.__init118.call(this);_class15.prototype.__init119.call(this);
15331
15690
  this.controller = controller;
15332
15691
  }
15333
15692
 
15334
- __init113() {this.stroke = null}
15335
- __init114() {this.move = null}
15693
+ __init117() {this.stroke = null}
15694
+ __init118() {this.move = null}
15336
15695
  /** The last refusal (e.g. "layer is locked"), for the editor to show. */
15337
- __init115() {this.error = null}
15696
+ __init119() {this.error = null}
15338
15697
  get active() {
15339
15698
  return Boolean(this.stroke || this.move);
15340
15699
  }
@@ -15346,7 +15705,7 @@ var PaintGesture = (_class14 = class {
15346
15705
  const layer = this.controller.getActiveLayer();
15347
15706
  if (!layer) throw new Error("Select a layer to move in the Layers panel.");
15348
15707
  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.`);
15349
- if (_optionalChain([layer, 'access', _484 => _484.locks, 'optionalAccess', _485 => _485.all]) || _optionalChain([layer, 'access', _486 => _486.locks, 'optionalAccess', _487 => _487.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
15708
+ if (_optionalChain([layer, 'access', _485 => _485.locks, 'optionalAccess', _486 => _486.all]) || _optionalChain([layer, 'access', _487 => _487.locks, 'optionalAccess', _488 => _488.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
15350
15709
  const origin = layer.type === "pixel" ? { ...layer.offset } : layer.type === "smart" ? { ...layer.placement.corners[0] } : (() => {
15351
15710
  const b = _chunkUYXL6ZWQcjs.shapeGeometryBounds.call(void 0, layer);
15352
15711
  return b ? { x: b.x, y: b.y } : { x: 0, y: 0 };
@@ -15403,11 +15762,11 @@ var PaintGesture = (_class14 = class {
15403
15762
  this.move = null;
15404
15763
  }
15405
15764
  cancel() {
15406
- _optionalChain([this, 'access', _488 => _488.stroke, 'optionalAccess', _489 => _489.cancel, 'call', _490 => _490()]);
15765
+ _optionalChain([this, 'access', _489 => _489.stroke, 'optionalAccess', _490 => _490.cancel, 'call', _491 => _491()]);
15407
15766
  this.stroke = null;
15408
15767
  this.move = null;
15409
15768
  }
15410
- }, _class14);
15769
+ }, _class15);
15411
15770
 
15412
15771
  // src/image-editor/paint-tools.ts
15413
15772
  var READ4 = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
@@ -16484,7 +16843,7 @@ function createImageSmartObjectTools(controller) {
16484
16843
  const layerSummary = (id) => {
16485
16844
  const s = controller.getState();
16486
16845
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
16487
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _491 => _491.parent, 'optionalAccess', _492 => _492.id]), () => ( null)), index: loc.index } : null;
16846
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _492 => _492.parent, 'optionalAccess', _493 => _493.id]), () => ( null)), index: loc.index } : null;
16488
16847
  };
16489
16848
  const getSmart = {
16490
16849
  name: "get_smart_object",
@@ -17041,7 +17400,7 @@ function createImageShapeTools(controller) {
17041
17400
  const layerSummary = (id) => {
17042
17401
  const s = controller.getState();
17043
17402
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
17044
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _493 => _493.parent, 'optionalAccess', _494 => _494.id]), () => ( null)), index: loc.index } : null;
17403
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _494 => _494.parent, 'optionalAccess', _495 => _495.id]), () => ( null)), index: loc.index } : null;
17045
17404
  };
17046
17405
  const get = {
17047
17406
  name: "get_shape_layer",
@@ -17258,7 +17617,7 @@ function createImageShapeTools(controller) {
17258
17617
  const mode = args.mode;
17259
17618
  controller.pathToSelection(pathSpec(args), { feather: args.feather, antiAlias: args.antiAlias, mode });
17260
17619
  const sel = controller.getSelection();
17261
- return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _495 => _495.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
17620
+ return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _496 => _496.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
17262
17621
  }
17263
17622
  };
17264
17623
  const getVectorMask = {
@@ -17289,7 +17648,7 @@ function createImageShapeTools(controller) {
17289
17648
  handler: (args) => {
17290
17649
  const id = layerArg(args.layerId);
17291
17650
  const spec = pathSpec(args);
17292
- const hasPath = _optionalChain([spec, 'access', _496 => _496.components, 'optionalAccess', _497 => _497.length]) || spec.shape !== void 0 || spec.subpaths !== void 0;
17651
+ const hasPath = _optionalChain([spec, 'access', _497 => _497.components, 'optionalAccess', _498 => _498.length]) || spec.shape !== void 0 || spec.subpaths !== void 0;
17293
17652
  const from = _nullishCoalesce(args.from, () => ( (hasPath ? "path" : "reveal-all")));
17294
17653
  if (from !== "selection" && TRACE_KEYS.some((k) => args[k] !== void 0)) throw new Error("tolerance, cornerRoundness and minArea apply only to from selection.");
17295
17654
  controller.addVectorMask(id, from, spec, traceOptions(args));
@@ -17409,7 +17768,7 @@ function createImageTypeTools(controller) {
17409
17768
  const layerSummary = (id) => {
17410
17769
  const s = controller.getState();
17411
17770
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
17412
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _498 => _498.parent, 'optionalAccess', _499 => _499.id]), () => ( null)), index: loc.index } : null;
17771
+ 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;
17413
17772
  };
17414
17773
  const range = (args) => ({ start: args.start, end: args.end });
17415
17774
  const listFonts = {
@@ -17418,7 +17777,7 @@ function createImageTypeTools(controller) {
17418
17777
  description: "Returns the font families type layers can use here (generic families such as sans-serif always work). Changes nothing.",
17419
17778
  inputSchema: { type: "object", properties: {}, additionalProperties: false },
17420
17779
  annotations: { title: "List fonts", ...READ11 },
17421
- handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _500 => _500.getTextShaper, 'call', _501 => _501(), 'optionalAccess', _502 => _502.id]), () => ( null)) })
17780
+ handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _501 => _501.getTextShaper, 'call', _502 => _502(), 'optionalAccess', _503 => _503.id]), () => ( null)) })
17422
17781
  };
17423
17782
  const get = {
17424
17783
  name: "get_text_layer",
@@ -17574,7 +17933,7 @@ function createImageTypeTools(controller) {
17574
17933
  const init = pick2(args, ["text", "x", "y", "orientation", "box", "style", "paragraph", "rotation", "mode", "feather", "antiAlias"]);
17575
17934
  controller.selectTextShape(init);
17576
17935
  const sel = controller.getSelection();
17577
- return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _503 => _503.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
17936
+ return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _504 => _504.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
17578
17937
  }
17579
17938
  };
17580
17939
  return [listFonts, get, add2, setText, setStyle, setParagraph, setFrame, setOrientation, toShape, typeMask];
@@ -17753,7 +18112,7 @@ function createImageEditorToolProvider(controller, options = {}) {
17753
18112
  for (const ref of [aboveId, parentId]) {
17754
18113
  if (ref !== void 0 && !controller.getLayer(ref)) throw new Error(`Unknown layer "${ref}". Call list_layers for ids.`);
17755
18114
  }
17756
- if (parentId !== void 0 && _optionalChain([controller, 'access', _504 => _504.getLayer, 'call', _505 => _505(parentId), 'optionalAccess', _506 => _506.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
18115
+ if (parentId !== void 0 && _optionalChain([controller, 'access', _505 => _505.getLayer, 'call', _506 => _506(parentId), 'optionalAccess', _507 => _507.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
17757
18116
  const id = controller.addAdjustmentLayer({ kind, params, opacity, blend, name, aboveId, parentId, useSelection: useSelection !== false });
17758
18117
  const layer = controller.getAdjustmentLayer(id);
17759
18118
  return { layer: JSON.parse(JSON.stringify(layer)), index: controller.getAdjustmentLayers().findIndex((l) => l.id === id), masked: Boolean(layer.mask) };
@@ -18067,7 +18426,7 @@ function maskThumbnailClick(controller, layer, e) {
18067
18426
  } else if (e.altKey && !layer.mask.source) {
18068
18427
  const mode = e.shiftKey ? "overlay" : "gray";
18069
18428
  const view = controller.getMaskView();
18070
- controller.setMaskView(_optionalChain([view, 'optionalAccess', _507 => _507.layerId]) === layer.id && view.mode === mode ? "off" : mode, layer.id);
18429
+ controller.setMaskView(_optionalChain([view, 'optionalAccess', _508 => _508.layerId]) === layer.id && view.mode === mode ? "off" : mode, layer.id);
18071
18430
  } else if (e.shiftKey) {
18072
18431
  controller.setLayerMaskProps(layer.id, { enabled: layer.mask.enabled === false });
18073
18432
  } else {
@@ -18131,7 +18490,7 @@ function layerHasThumbnail(layer) {
18131
18490
  return layer.type === "pixel" || layer.type === "shape" || layer.type === "type";
18132
18491
  }
18133
18492
  function layerWarning(layer) {
18134
- if (layer.type === "type" && _optionalChain([layer, 'access', _508 => _508.missingFonts, 'optionalAccess', _509 => _509.length])) {
18493
+ if (layer.type === "type" && _optionalChain([layer, 'access', _509 => _509.missingFonts, 'optionalAccess', _510 => _510.length])) {
18135
18494
  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."}`;
18136
18495
  }
18137
18496
  return null;
@@ -18154,16 +18513,16 @@ function layerMenu(controller) {
18154
18513
  const siblings = loc ? loc.parent ? loc.parent.children : s.layers : [];
18155
18514
  const below = loc ? siblings[loc.index - 1] : void 0;
18156
18515
  const hasSel = controller.hasSelection;
18157
- const isPixel = _optionalChain([active, 'optionalAccess', _510 => _510.type]) === "pixel";
18158
- const hasOwnPixels = _optionalChain([active, 'optionalAccess', _511 => _511.type]) === "pixel" || _optionalChain([active, 'optionalAccess', _512 => _512.type]) === "shape" || _optionalChain([active, 'optionalAccess', _513 => _513.type]) === "type" || _optionalChain([active, 'optionalAccess', _514 => _514.type]) === "smart";
18516
+ const isPixel = _optionalChain([active, 'optionalAccess', _511 => _511.type]) === "pixel";
18517
+ const hasOwnPixels = _optionalChain([active, 'optionalAccess', _512 => _512.type]) === "pixel" || _optionalChain([active, 'optionalAccess', _513 => _513.type]) === "shape" || _optionalChain([active, 'optionalAccess', _514 => _514.type]) === "type" || _optionalChain([active, 'optionalAccess', _515 => _515.type]) === "smart";
18159
18518
  return [
18160
18519
  { action: "new-layer", label: "New Layer", enabled: true },
18161
18520
  { action: "new-group", label: "New Group", enabled: true },
18162
18521
  { action: "duplicate", label: "Duplicate Layer", enabled: Boolean(active) },
18163
18522
  { action: "delete", label: "Delete Layer", enabled: Boolean(active) },
18164
18523
  { action: "group-selected", label: "Group Layer", enabled: Boolean(active) },
18165
- { action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _515 => _515.type]) === "group" },
18166
- { action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _516 => _516.visible]) && _optionalChain([below, 'optionalAccess', _517 => _517.type]) === "pixel") },
18524
+ { action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _516 => _516.type]) === "group" },
18525
+ { action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _517 => _517.visible]) && _optionalChain([below, 'optionalAccess', _518 => _518.type]) === "pixel") },
18167
18526
  { action: "merge-visible", label: "Merge Visible", enabled: s.layers.some((l) => l.visible) },
18168
18527
  { action: "flatten", label: "Flatten Image", enabled: s.layers.length > 0 },
18169
18528
  { action: "via-copy", label: "Layer via Copy", enabled: isPixel && hasSel },
@@ -18173,27 +18532,27 @@ function layerMenu(controller) {
18173
18532
  { action: "add-mask-hide-selection", label: "Add Mask Hiding Selection", enabled: Boolean(active) && hasSel },
18174
18533
  { action: "add-mask-transparency", label: "Add Mask from Transparency", enabled: hasOwnPixels },
18175
18534
  { action: "select-transparency", label: "Select Layer Pixels", enabled: hasOwnPixels },
18176
- { action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _518 => _518.mask])) },
18177
- { action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _519 => _519.mask])) },
18178
- { action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _520 => _520.mask, 'optionalAccess', _521 => _521.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _522 => _522.mask])) },
18179
- { action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _523 => _523.mask, 'optionalAccess', _524 => _524.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _525 => _525.mask]) && !active.mask.source) },
18180
- { action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _526 => _526.mask, 'optionalAccess', _527 => _527.source])) },
18181
- { action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _528 => _528.mask, 'optionalAccess', _529 => _529.source])) },
18182
- { action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _530 => _530.mask, 'optionalAccess', _531 => _531.source])) && hasSel },
18183
- { action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _532 => _532.vectorMask])) },
18184
- { action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess', _533 => _533.vectorMask, 'optionalAccess', _534 => _534.enabled]) === false ? "Enable Vector Mask" : "Disable Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _535 => _535.vectorMask])) },
18185
- { action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _536 => _536.vectorMask])) },
18186
- { action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _537 => _537.type]) === "annotation" || _optionalChain([active, 'optionalAccess', _538 => _538.type]) === "smart" || _optionalChain([active, 'optionalAccess', _539 => _539.type]) === "shape" || _optionalChain([active, 'optionalAccess', _540 => _540.type]) === "type" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _541 => _541.type]) === "pixel" && _optionalChain([active, 'access', _542 => _542.filters, 'optionalAccess', _543 => _543.length])) },
18535
+ { action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _519 => _519.mask])) },
18536
+ { action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _520 => _520.mask])) },
18537
+ { action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _521 => _521.mask, 'optionalAccess', _522 => _522.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _523 => _523.mask])) },
18538
+ { action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _524 => _524.mask, 'optionalAccess', _525 => _525.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _526 => _526.mask]) && !active.mask.source) },
18539
+ { action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _527 => _527.mask, 'optionalAccess', _528 => _528.source])) },
18540
+ { action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _529 => _529.mask, 'optionalAccess', _530 => _530.source])) },
18541
+ { action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _531 => _531.mask, 'optionalAccess', _532 => _532.source])) && hasSel },
18542
+ { action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _533 => _533.vectorMask])) },
18543
+ { action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess', _534 => _534.vectorMask, 'optionalAccess', _535 => _535.enabled]) === false ? "Enable Vector Mask" : "Disable Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _536 => _536.vectorMask])) },
18544
+ { action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _537 => _537.vectorMask])) },
18545
+ { action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _538 => _538.type]) === "annotation" || _optionalChain([active, 'optionalAccess', _539 => _539.type]) === "smart" || _optionalChain([active, 'optionalAccess', _540 => _540.type]) === "shape" || _optionalChain([active, 'optionalAccess', _541 => _541.type]) === "type" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _542 => _542.type]) === "pixel" && _optionalChain([active, 'access', _543 => _543.filters, 'optionalAccess', _544 => _544.length])) },
18187
18546
  { action: "convert-smart", label: "Convert to Smart Object", enabled: Boolean(active && active.type !== "annotation") },
18188
- { action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _544 => _544.type]) === "smart" },
18189
- { action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _545 => _545.type]) === "smart" },
18190
- { action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess', _546 => _546.type]) === "smart" && !_optionalChain([active, 'access', _547 => _547.smartFilters, 'optionalAccess', _548 => _548.mask]) },
18191
- { action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _549 => _549.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
18547
+ { action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _545 => _545.type]) === "smart" },
18548
+ { action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _546 => _546.type]) === "smart" },
18549
+ { action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess', _547 => _547.type]) === "smart" && !_optionalChain([active, 'access', _548 => _548.smartFilters, 'optionalAccess', _549 => _549.mask]) },
18550
+ { action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _550 => _550.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
18192
18551
  ];
18193
18552
  }
18194
18553
  async function runLayerMenuAction(controller, action) {
18195
18554
  const active = controller.getActiveLayer();
18196
- const id = _optionalChain([active, 'optionalAccess', _550 => _550.id]);
18555
+ const id = _optionalChain([active, 'optionalAccess', _551 => _551.id]);
18197
18556
  try {
18198
18557
  switch (action) {
18199
18558
  case "new-layer":
@@ -18249,10 +18608,10 @@ async function runLayerMenuAction(controller, action) {
18249
18608
  if (id) controller.removeLayerMask(id);
18250
18609
  break;
18251
18610
  case "toggle-mask":
18252
- if (id && _optionalChain([active, 'optionalAccess', _551 => _551.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
18611
+ if (id && _optionalChain([active, 'optionalAccess', _552 => _552.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
18253
18612
  break;
18254
18613
  case "toggle-mask-link":
18255
- if (id && _optionalChain([active, 'optionalAccess', _552 => _552.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
18614
+ if (id && _optionalChain([active, 'optionalAccess', _553 => _553.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
18256
18615
  break;
18257
18616
  case "add-vector-mask":
18258
18617
  case "add-vector-mask-hide":
@@ -18265,7 +18624,7 @@ async function runLayerMenuAction(controller, action) {
18265
18624
  if (id) controller.removeVectorMask(id);
18266
18625
  break;
18267
18626
  case "toggle-vector-mask":
18268
- if (id && _optionalChain([active, 'optionalAccess', _553 => _553.vectorMask])) controller.setVectorMaskProps(id, { enabled: active.vectorMask.enabled === false });
18627
+ if (id && _optionalChain([active, 'optionalAccess', _554 => _554.vectorMask])) controller.setVectorMaskProps(id, { enabled: active.vectorMask.enabled === false });
18269
18628
  break;
18270
18629
  case "rasterize-vector-mask":
18271
18630
  if (id) controller.rasterizeVectorMask(id);
@@ -18286,7 +18645,7 @@ async function runLayerMenuAction(controller, action) {
18286
18645
  if (id) controller.setSmartFilterMask(id, "reveal-all");
18287
18646
  break;
18288
18647
  case "toggle-clip":
18289
- if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _554 => _554.clipped]) });
18648
+ if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _555 => _555.clipped]) });
18290
18649
  break;
18291
18650
  }
18292
18651
  return null;
@@ -18296,7 +18655,7 @@ async function runLayerMenuAction(controller, action) {
18296
18655
  }
18297
18656
  function smartFilterRows(layer) {
18298
18657
  if (layer.type !== "smart") return [];
18299
- const list = _nullishCoalesce(_optionalChain([layer, 'access', _555 => _555.smartFilters, 'optionalAccess', _556 => _556.filters]), () => ( []));
18658
+ const list = _nullishCoalesce(_optionalChain([layer, 'access', _556 => _556.smartFilters, 'optionalAccess', _557 => _557.filters]), () => ( []));
18300
18659
  const rows = list.map((f, index) => ({
18301
18660
  filter: f,
18302
18661
  index,
@@ -18322,8 +18681,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
18322
18681
  };
18323
18682
  collectSerialized(_nullishCoalesce(serialized.layers, () => ( [])));
18324
18683
  const sLayerMap = new Map(allSerializedLayers.map((sl) => [sl.id, sl]));
18325
- const imgW = _optionalChain([state, 'access', _557 => _557.imageDimensions, 'optionalAccess', _558 => _558.width]) || 1;
18326
- const imgH = _optionalChain([state, 'access', _559 => _559.imageDimensions, 'optionalAccess', _560 => _560.height]) || 1;
18684
+ const imgW = _optionalChain([state, 'access', _558 => _558.imageDimensions, 'optionalAccess', _559 => _559.width]) || 1;
18685
+ const imgH = _optionalChain([state, 'access', _560 => _560.imageDimensions, 'optionalAccess', _561 => _561.height]) || 1;
18327
18686
  return ctrlLayers.map((l) => {
18328
18687
  const bounds = controller.getLayerBounds(l.id) || {
18329
18688
  x: 0,
@@ -18332,8 +18691,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
18332
18691
  height: imgH
18333
18692
  };
18334
18693
  const sLayer = sLayerMap.get(l.id);
18335
- const assetKey = _optionalChain([sLayer, 'optionalAccess', _561 => _561.asset]);
18336
- const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _562 => _562.source]) === "document" ? fallbackImageUrl : "");
18694
+ const assetKey = _optionalChain([sLayer, 'optionalAccess', _562 => _562.asset]);
18695
+ const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _563 => _563.source]) === "document" ? fallbackImageUrl : "");
18337
18696
  return {
18338
18697
  id: l.id,
18339
18698
  name: l.name || "Untitled Layer",
@@ -18387,9 +18746,9 @@ async function addLayerOfKind(controller, id, init) {
18387
18746
  const cx = Math.round(canvas.width / 2);
18388
18747
  const cy = Math.round(canvas.height / 2);
18389
18748
  return controller.addTextLayer({
18390
- text: _optionalChain([init, 'optionalAccess', _563 => _563.text]) || "New Text",
18391
- x: typeof _optionalChain([init, 'optionalAccess', _564 => _564.x]) === "number" ? init.x : cx - 100,
18392
- y: typeof _optionalChain([init, 'optionalAccess', _565 => _565.y]) === "number" ? init.y : cy,
18749
+ text: _optionalChain([init, 'optionalAccess', _564 => _564.text]) || "New Text",
18750
+ x: typeof _optionalChain([init, 'optionalAccess', _565 => _565.x]) === "number" ? init.x : cx - 100,
18751
+ y: typeof _optionalChain([init, 'optionalAccess', _566 => _566.y]) === "number" ? init.y : cy,
18393
18752
  ...init
18394
18753
  });
18395
18754
  }
@@ -18402,10 +18761,10 @@ async function addLayerOfKind(controller, id, init) {
18402
18761
  return controller.addShapeLayer({
18403
18762
  shape: {
18404
18763
  kind: "rect",
18405
- x: typeof _optionalChain([init, 'optionalAccess', _566 => _566.x]) === "number" ? init.x : cx - Math.round(w / 2),
18406
- y: typeof _optionalChain([init, 'optionalAccess', _567 => _567.y]) === "number" ? init.y : cy - Math.round(h / 2),
18407
- width: typeof _optionalChain([init, 'optionalAccess', _568 => _568.width]) === "number" ? init.width : w,
18408
- height: typeof _optionalChain([init, 'optionalAccess', _569 => _569.height]) === "number" ? init.height : h
18764
+ x: typeof _optionalChain([init, 'optionalAccess', _567 => _567.x]) === "number" ? init.x : cx - Math.round(w / 2),
18765
+ y: typeof _optionalChain([init, 'optionalAccess', _568 => _568.y]) === "number" ? init.y : cy - Math.round(h / 2),
18766
+ width: typeof _optionalChain([init, 'optionalAccess', _569 => _569.width]) === "number" ? init.width : w,
18767
+ height: typeof _optionalChain([init, 'optionalAccess', _570 => _570.height]) === "number" ? init.height : h
18409
18768
  },
18410
18769
  name: "Rectangle",
18411
18770
  ...init
@@ -18420,10 +18779,10 @@ async function addLayerOfKind(controller, id, init) {
18420
18779
  return controller.addShapeLayer({
18421
18780
  shape: {
18422
18781
  kind: "ellipse",
18423
- x: typeof _optionalChain([init, 'optionalAccess', _570 => _570.x]) === "number" ? init.x : cx - Math.round(w / 2),
18424
- y: typeof _optionalChain([init, 'optionalAccess', _571 => _571.y]) === "number" ? init.y : cy - Math.round(h / 2),
18425
- width: typeof _optionalChain([init, 'optionalAccess', _572 => _572.width]) === "number" ? init.width : w,
18426
- height: typeof _optionalChain([init, 'optionalAccess', _573 => _573.height]) === "number" ? init.height : h
18782
+ x: typeof _optionalChain([init, 'optionalAccess', _571 => _571.x]) === "number" ? init.x : cx - Math.round(w / 2),
18783
+ y: typeof _optionalChain([init, 'optionalAccess', _572 => _572.y]) === "number" ? init.y : cy - Math.round(h / 2),
18784
+ width: typeof _optionalChain([init, 'optionalAccess', _573 => _573.width]) === "number" ? init.width : w,
18785
+ height: typeof _optionalChain([init, 'optionalAccess', _574 => _574.height]) === "number" ? init.height : h
18427
18786
  },
18428
18787
  name: "Ellipse",
18429
18788
  ...init
@@ -18484,18 +18843,18 @@ function layerEffectsPanel(layer) {
18484
18843
  if (!layer) return { ...empty, available: false, reason: "Select a layer to add a layer style." };
18485
18844
  if (layer.type === "adjustment") return { ...empty, available: false, reason: "Adjustment layers cannot have a layer style." };
18486
18845
  const fx = layer.effects;
18487
- const readOnly = Boolean(_optionalChain([layer, 'access', _574 => _574.locks, 'optionalAccess', _575 => _575.all]));
18846
+ const readOnly = Boolean(_optionalChain([layer, 'access', _575 => _575.locks, 'optionalAccess', _576 => _576.all]));
18488
18847
  return {
18489
18848
  available: true,
18490
18849
  readOnly,
18491
18850
  reason: readOnly ? "The layer is locked; unlock it to change its layer style." : void 0,
18492
- enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _576 => _576.enabled]), () => ( true)),
18493
- scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _577 => _577.scale]), () => ( 1)),
18494
- rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _578 => _578.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkHGTDMKNEcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
18851
+ enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _577 => _577.enabled]), () => ( true)),
18852
+ scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _578 => _578.scale]), () => ( 1)),
18853
+ rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _579 => _579.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkHGTDMKNEcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
18495
18854
  };
18496
18855
  }
18497
18856
  function layerEffectsBadge(layer) {
18498
- if (!_optionalChain([layer, 'access', _579 => _579.effects, 'optionalAccess', _580 => _580.items, 'access', _581 => _581.length])) return null;
18857
+ if (!_optionalChain([layer, 'access', _580 => _580.effects, 'optionalAccess', _581 => _581.items, 'access', _582 => _582.length])) return null;
18499
18858
  return _chunkHGTDMKNEcjs.hasActiveEffects.call(void 0, layer.effects) ? "on" : "off";
18500
18859
  }
18501
18860
  var LAYER_EFFECT_MENU = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS.map((kind) => ({ kind, label: _chunkHGTDMKNEcjs.layerEffectLabel.call(void 0, kind) }));
@@ -18540,8 +18899,8 @@ function fillControls(f, allowPattern, patterns) {
18540
18899
  }
18541
18900
  function gradientControls(prefix, g) {
18542
18901
  return [
18543
- { key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _582 => _582.stops, 'access', _583 => _583[0], 'optionalAccess', _584 => _584.color]), () => ( "#000000")) },
18544
- { key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _585 => _585.stops, 'access', _586 => _586[g.stops.length - 1], 'optionalAccess', _587 => _587.color]), () => ( "#ffffff")) },
18902
+ { key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _583 => _583.stops, 'access', _584 => _584[0], 'optionalAccess', _585 => _585.color]), () => ( "#000000")) },
18903
+ { key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _586 => _586.stops, 'access', _587 => _587[g.stops.length - 1], 'optionalAccess', _588 => _588.color]), () => ( "#ffffff")) },
18545
18904
  { key: `${prefix}.style`, label: "Style", type: "select", value: g.style, options: opt(["linear", "Linear"], ["radial", "Radial"], ["angle", "Angle"], ["reflected", "Reflected"], ["diamond", "Diamond"]) },
18546
18905
  { key: `${prefix}.angle`, label: "Angle", type: "range", min: -180, max: 180, step: 1, value: g.angle, unit: "\xB0" },
18547
18906
  { key: `${prefix}.scale`, label: "Scale", type: "range", min: 0.1, max: 1.5, step: 0.01, value: g.scale, percent: true, unit: "%" },
@@ -18633,19 +18992,19 @@ function layerEffectControls(e, patterns = []) {
18633
18992
  }
18634
18993
  function fillOfType(current, type, patterns) {
18635
18994
  if (type === "gradient") return { type: "gradient", gradient: _chunkHGTDMKNEcjs.defaultEffectGradient.call(void 0, ) };
18636
- if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _588 => _588[0], 'optionalAccess', _589 => _589.id]), () => ( "checker")), scale: 1 };
18995
+ if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _589 => _589[0], 'optionalAccess', _590 => _590.id]), () => ( "checker")), scale: 1 };
18637
18996
  return { type: "color", color: current.type === "color" ? current.color : "#000000" };
18638
18997
  }
18639
18998
  function effectControlChange(effect, key, value, patterns = []) {
18640
18999
  const [top, ...rest] = key.split(".");
18641
19000
  if (top === "fill" && rest[0] === "type") return { fill: fillOfType(effect.fill, String(value), patterns) };
18642
19001
  if (top === "patternId" && !rest.length) {
18643
- const name = _optionalChain([patternOptions, 'call', _590 => _590(patterns), 'access', _591 => _591.find, 'call', _592 => _592((o) => o.value === value), 'optionalAccess', _593 => _593.label]);
19002
+ const name = _optionalChain([patternOptions, 'call', _591 => _591(patterns), 'access', _592 => _592.find, 'call', _593 => _593((o) => o.value === value), 'optionalAccess', _594 => _594.label]);
18644
19003
  return name ? { patternId: value, name } : { patternId: value };
18645
19004
  }
18646
19005
  if (!rest.length) return { [top]: value };
18647
19006
  if (top === "fill" && rest[0] === "patternId") {
18648
- const name = _optionalChain([patternOptions, 'call', _594 => _594(patterns), 'access', _595 => _595.find, 'call', _596 => _596((o) => o.value === value), 'optionalAccess', _597 => _597.label]);
19007
+ const name = _optionalChain([patternOptions, 'call', _595 => _595(patterns), 'access', _596 => _596.find, 'call', _597 => _597((o) => o.value === value), 'optionalAccess', _598 => _598.label]);
18649
19008
  return { fill: { ...effect.fill, patternId: value, ...name ? { name } : {} } };
18650
19009
  }
18651
19010
  return { [top]: setPath(getPath(effect, top), rest, value) };
@@ -18672,7 +19031,7 @@ function colorPanelView(controller) {
18672
19031
  profileName: profile.name,
18673
19032
  workingSpace: profile.builtin,
18674
19033
  mode: profile.mode,
18675
- cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access', _598 => _598.cmykProfile, 'optionalAccess', _599 => _599.name]), () => ( null)),
19034
+ cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access', _599 => _599.cmykProfile, 'optionalAccess', _600 => _600.name]), () => ( null)),
18676
19035
  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
18677
19036
  };
18678
19037
  }
@@ -18854,33 +19213,33 @@ function boxFrameHit(overlay, p, tolerance, band) {
18854
19213
  }
18855
19214
  return null;
18856
19215
  }
18857
- var FreeTransformTool = (_class15 = class {
18858
- constructor(controller, options = {}) {;_class15.prototype.__init116.call(this);_class15.prototype.__init117.call(this);_class15.prototype.__init118.call(this);_class15.prototype.__init119.call(this);_class15.prototype.__init120.call(this);_class15.prototype.__init121.call(this);_class15.prototype.__init122.call(this);_class15.prototype.__init123.call(this);_class15.prototype.__init124.call(this);_class15.prototype.__init125.call(this);_class15.prototype.__init126.call(this);_class15.prototype.__init127.call(this);_class15.prototype.__init128.call(this);_class15.prototype.__init129.call(this);
19216
+ var FreeTransformTool = (_class16 = class {
19217
+ constructor(controller, options = {}) {;_class16.prototype.__init120.call(this);_class16.prototype.__init121.call(this);_class16.prototype.__init122.call(this);_class16.prototype.__init123.call(this);_class16.prototype.__init124.call(this);_class16.prototype.__init125.call(this);_class16.prototype.__init126.call(this);_class16.prototype.__init127.call(this);_class16.prototype.__init128.call(this);_class16.prototype.__init129.call(this);_class16.prototype.__init130.call(this);_class16.prototype.__init131.call(this);_class16.prototype.__init132.call(this);_class16.prototype.__init133.call(this);
18859
19218
  this.controller = controller;
18860
19219
  this.options = options;
18861
19220
  }
18862
19221
 
18863
19222
 
18864
- __init116() {this.sessionRef = null}
18865
- __init117() {this.modeValue = "scale"}
19223
+ __init120() {this.sessionRef = null}
19224
+ __init121() {this.modeValue = "scale"}
18866
19225
  /** The reference point in the untransformed frame's space (follows the transform). */
18867
- __init118() {this.refBox = { x: 0, y: 0 }}
18868
- __init119() {this.corners = null}
18869
- __init120() {this.drag = null}
19226
+ __init122() {this.refBox = { x: 0, y: 0 }}
19227
+ __init123() {this.corners = null}
19228
+ __init124() {this.drag = null}
18870
19229
  /** The warp mesh in the frame's own space (null: no warp). */
18871
- __init121() {this.mesh = null}
18872
- __init122() {this.warpSettings = { style: "custom", bend: 50, horizontal: 0, vertical: 0, orientation: "horizontal", columns: 1, rows: 1 }}
18873
- __init123() {this.pending = false}
18874
- __init124() {this.viewScale = 1}
19230
+ __init125() {this.mesh = null}
19231
+ __init126() {this.warpSettings = { style: "custom", bend: 50, horizontal: 0, vertical: 0, orientation: "horizontal", columns: 1, rows: 1 }}
19232
+ __init127() {this.pending = false}
19233
+ __init128() {this.viewScale = 1}
18875
19234
 
18876
19235
  /** Values typed into the options bar since the last drag (V skew is not recovered from the shape). */
18877
- __init125() {this.typed = {}}
19236
+ __init129() {this.typed = {}}
18878
19237
  /** Width and height scale together when typed (the chain icon). */
18879
- __init126() {this.proportional = true}
18880
- __init127() {this.error = null}
18881
- __init128() {this.lastResult = null}
19238
+ __init130() {this.proportional = true}
19239
+ __init131() {this.error = null}
19240
+ __init132() {this.lastResult = null}
18882
19241
  get active() {
18883
- return Boolean(_optionalChain([this, 'access', _600 => _600.sessionRef, 'optionalAccess', _601 => _601.isOpen]));
19242
+ return Boolean(_optionalChain([this, 'access', _601 => _601.sessionRef, 'optionalAccess', _602 => _602.isOpen]));
18884
19243
  }
18885
19244
  get session() {
18886
19245
  return this.active ? this.sessionRef : null;
@@ -18889,7 +19248,7 @@ var FreeTransformTool = (_class15 = class {
18889
19248
  return this.modeValue;
18890
19249
  }
18891
19250
  get interpolation() {
18892
- return _nullishCoalesce(_optionalChain([this, 'access', _602 => _602.sessionRef, 'optionalAccess', _603 => _603.interpolation]), () => ( "bicubic"));
19251
+ return _nullishCoalesce(_optionalChain([this, 'access', _603 => _603.sessionRef, 'optionalAccess', _604 => _604.interpolation]), () => ( "bicubic"));
18893
19252
  }
18894
19253
  /** Whether the open transform has changed anything yet (a commit would add an undo step). */
18895
19254
  get modified() {
@@ -18899,7 +19258,7 @@ var FreeTransformTool = (_class15 = class {
18899
19258
  const start = s.startGeometry.corners;
18900
19259
  return this.corners.some((p, i) => p.x !== start[i].x || p.y !== start[i].y);
18901
19260
  }
18902
- __init129() {this.listeners = /* @__PURE__ */ new Set()}
19261
+ __init133() {this.listeners = /* @__PURE__ */ new Set()}
18903
19262
  /** Calls `listener` whenever the overlay, readout, mode or error changes. Returns the unsubscribe. */
18904
19263
  subscribe(listener) {
18905
19264
  this.listeners.add(listener);
@@ -18908,7 +19267,7 @@ var FreeTransformTool = (_class15 = class {
18908
19267
  };
18909
19268
  }
18910
19269
  changed() {
18911
- _optionalChain([this, 'access', _604 => _604.options, 'access', _605 => _605.onChange, 'optionalCall', _606 => _606()]);
19270
+ _optionalChain([this, 'access', _605 => _605.options, 'access', _606 => _606.onChange, 'optionalCall', _607 => _607()]);
18912
19271
  for (const l of this.listeners) l();
18913
19272
  }
18914
19273
  /** Opens a Free Transform (default: the selected pixels of the active layer, or the whole layer). Returns an error message or `null`. */
@@ -19301,7 +19660,7 @@ var FreeTransformTool = (_class15 = class {
19301
19660
  }
19302
19661
  /** Abandons the transform and restores everything. */
19303
19662
  cancel() {
19304
- _optionalChain([this, 'access', _607 => _607.sessionRef, 'optionalAccess', _608 => _608.cancel, 'call', _609 => _609()]);
19663
+ _optionalChain([this, 'access', _608 => _608.sessionRef, 'optionalAccess', _609 => _609.cancel, 'call', _610 => _610()]);
19305
19664
  this.sessionRef = null;
19306
19665
  this.corners = null;
19307
19666
  this.mesh = null;
@@ -19342,7 +19701,7 @@ var FreeTransformTool = (_class15 = class {
19342
19701
  }
19343
19702
  return false;
19344
19703
  }
19345
- }, _class15);
19704
+ }, _class16);
19346
19705
 
19347
19706
  // src/image-editor/provider-effect-tools.ts
19348
19707
  var ANIMATE_SCHEMA = {
@@ -19357,7 +19716,7 @@ function imageLayerAppliedEffects(layer) {
19357
19716
  const ref = (r) => ({ effect: r.effect, ...r.name ? { name: r.name } : {}, ...r.provider ? { provider: r.provider } : {} });
19358
19717
  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 } : {} });
19359
19718
  if (layer.type === "smart")
19360
- (_nullishCoalesce(_optionalChain([layer, 'access', _610 => _610.smartFilters, 'optionalAccess', _611 => _611.filters]), () => ( []))).forEach((f, index) => {
19719
+ (_nullishCoalesce(_optionalChain([layer, 'access', _611 => _611.smartFilters, 'optionalAccess', _612 => _612.filters]), () => ( []))).forEach((f, index) => {
19361
19720
  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 });
19362
19721
  });
19363
19722
  return out;
@@ -19509,7 +19868,7 @@ var OTHER_TOOL_LABELS = {
19509
19868
  watermark: "Watermark"
19510
19869
  };
19511
19870
  function imageToolLabel(tool) {
19512
- return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access', _612 => _612.find, 'call', _613 => _613((t) => t.id === tool), 'optionalAccess', _614 => _614.label]), () => ( OTHER_TOOL_LABELS[tool])), () => ( tool));
19871
+ return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access', _613 => _613.find, 'call', _614 => _614((t) => t.id === tool), 'optionalAccess', _615 => _615.label]), () => ( OTHER_TOOL_LABELS[tool])), () => ( tool));
19513
19872
  }
19514
19873
  var IMAGE_TOOL_SHORTCUTS = {
19515
19874
  ...Object.fromEntries(PAINT_TOOLS.filter((t) => t.shortcut).map((t) => [t.id, t.shortcut])),
@@ -20627,4 +20986,11 @@ function createImageEditorDocument(controller, options = {}) {
20627
20986
 
20628
20987
 
20629
20988
 
20630
- 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.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.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.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.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.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.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.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.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.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.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkUYXL6ZWQcjs.smartObjectLayers; exports.smoothCoverage = _chunkUYXL6ZWQcjs.smoothCoverage; exports.smoothPoints = _chunkEBDCRTZIcjs.smoothPoints; 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.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.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;
20989
+
20990
+
20991
+
20992
+
20993
+
20994
+
20995
+
20996
+ 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.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.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.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.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.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.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;