@pixerate/editor 0.218.0 → 0.219.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.
@@ -43,7 +43,7 @@ var _chunkLCCMOWR7cjs = require('../chunk-LCCMOWR7.cjs');
43
43
 
44
44
 
45
45
 
46
- var _chunkUC3PWFM3cjs = require('../chunk-UC3PWFM3.cjs');
46
+ var _chunkKALCIDWHcjs = require('../chunk-KALCIDWH.cjs');
47
47
 
48
48
 
49
49
 
@@ -552,7 +552,7 @@ var _chunkK6PXS6DOcjs = require('../chunk-K6PXS6DO.cjs');
552
552
 
553
553
 
554
554
 
555
- var _chunkYF3YZZ6Gcjs = require('../chunk-YF3YZZ6G.cjs');
555
+ var _chunk2ONK3ERDcjs = require('../chunk-2ONK3ERD.cjs');
556
556
 
557
557
 
558
558
 
@@ -561,7 +561,7 @@ var _chunkYF3YZZ6Gcjs = require('../chunk-YF3YZZ6G.cjs');
561
561
 
562
562
 
563
563
 
564
- var _chunkMQDIP4CFcjs = require('../chunk-MQDIP4CF.cjs');
564
+ var _chunkBB6TR422cjs = require('../chunk-BB6TR422.cjs');
565
565
 
566
566
 
567
567
 
@@ -1039,6 +1039,44 @@ function selectionOutline(mask, threshold = 128) {
1039
1039
  }
1040
1040
  return Float32Array.from(segs);
1041
1041
  }
1042
+ function selectionOutlinePaths(mask, threshold = 128) {
1043
+ const segs = selectionOutline(mask, threshold);
1044
+ const n = segs.length / 4;
1045
+ if (!n) return [];
1046
+ const stride = mask.width + 1;
1047
+ const key2 = (x, y) => y * stride + x;
1048
+ const at = /* @__PURE__ */ new Map();
1049
+ for (let s = 0; s < n; s++) {
1050
+ for (const k of [key2(segs[s * 4], segs[s * 4 + 1]), key2(segs[s * 4 + 2], segs[s * 4 + 3])]) {
1051
+ const list = at.get(k);
1052
+ if (list) list.push(s);
1053
+ else at.set(k, [s]);
1054
+ }
1055
+ }
1056
+ const used = new Uint8Array(n);
1057
+ const paths = [];
1058
+ for (let s0 = 0; s0 < n; s0++) {
1059
+ if (used[s0]) continue;
1060
+ used[s0] = 1;
1061
+ const pts = [segs[s0 * 4], segs[s0 * 4 + 1], segs[s0 * 4 + 2], segs[s0 * 4 + 3]];
1062
+ for (const forward of [true, false]) {
1063
+ for (; ; ) {
1064
+ const x = forward ? pts[pts.length - 2] : pts[0];
1065
+ const y = forward ? pts[pts.length - 1] : pts[1];
1066
+ const next = _optionalChain([at, 'access', _2 => _2.get, 'call', _3 => _3(key2(x, y)), 'optionalAccess', _4 => _4.find, 'call', _5 => _5((t) => !used[t])]);
1067
+ if (next === void 0) break;
1068
+ used[next] = 1;
1069
+ const a = [segs[next * 4], segs[next * 4 + 1]];
1070
+ const b = [segs[next * 4 + 2], segs[next * 4 + 3]];
1071
+ const far = a[0] === x && a[1] === y ? b : a;
1072
+ if (forward) pts.push(far[0], far[1]);
1073
+ else pts.unshift(far[0], far[1]);
1074
+ }
1075
+ }
1076
+ paths.push(Float32Array.from(pts));
1077
+ }
1078
+ return paths;
1079
+ }
1042
1080
  function quickMaskPixels(mask, style = {}) {
1043
1081
  const [r, g, b] = _nullishCoalesce(style.color, () => ( [255, 0, 0]));
1044
1082
  const k = Math.min(1, Math.max(0, _nullishCoalesce(style.opacity, () => ( 0.5))));
@@ -1076,8 +1114,8 @@ function compareSelectionMasks(a, b, width, height, options = {}) {
1076
1114
  const minArea = Math.max(1, _nullishCoalesce(options.minArea, () => ( 4)));
1077
1115
  const maxRegions = Math.max(1, _nullishCoalesce(options.maxRegions, () => ( 10)));
1078
1116
  const n = width * height;
1079
- const ad = _optionalChain([a, 'optionalAccess', _2 => _2.data]);
1080
- const bd = _optionalChain([b, 'optionalAccess', _3 => _3.data]);
1117
+ const ad = _optionalChain([a, 'optionalAccess', _6 => _6.data]);
1118
+ const bd = _optionalChain([b, 'optionalAccess', _7 => _7.data]);
1081
1119
  const added = new Uint8Array(n);
1082
1120
  const removed = new Uint8Array(n);
1083
1121
  let areaA = 0;
@@ -1107,8 +1145,8 @@ function compareSelectionMasks(a, b, width, height, options = {}) {
1107
1145
  const addedMask = _chunkSS53NNZOcjs.createSelectionMask.call(void 0, width, height, added);
1108
1146
  const removedMask = _chunkSS53NNZOcjs.createSelectionMask.call(void 0, width, height, removed);
1109
1147
  return {
1110
- a: { area: areaA, bounds: _nullishCoalesce(_optionalChain([a, 'optionalAccess', _4 => _4.bounds]), () => ( null)) },
1111
- b: { area: areaB, bounds: _nullishCoalesce(_optionalChain([b, 'optionalAccess', _5 => _5.bounds]), () => ( null)) },
1148
+ a: { area: areaA, bounds: _nullishCoalesce(_optionalChain([a, 'optionalAccess', _8 => _8.bounds]), () => ( null)) },
1149
+ b: { area: areaB, bounds: _nullishCoalesce(_optionalChain([b, 'optionalAccess', _9 => _9.bounds]), () => ( null)) },
1112
1150
  added: { area: addedArea, ...pieces(added, width, height, addedMask.bounds, minArea, maxRegions) },
1113
1151
  removed: { area: removedArea, ...pieces(removed, width, height, removedMask.bounds, minArea, maxRegions) },
1114
1152
  iou: union ? Math.round(inter / union * 1e4) / 1e4 : 1,
@@ -1232,7 +1270,7 @@ function needsLegacyBase(input) {
1232
1270
  if (!_chunkS55JFWDAcjs.isLegacyShape.call(void 0, stack)) return false;
1233
1271
  const bg = stack.layers[0];
1234
1272
  if (!isQuarterTurn(transform.rotate) || !isIntegerRect(region)) return true;
1235
- if (_optionalChain([bg, 'access', _6 => _6.mask, 'optionalAccess', _7 => _7.source, 'optionalAccess', _8 => _8.enabled]) && bg.mask.source.maskSource) return true;
1273
+ if (_optionalChain([bg, 'access', _10 => _10.mask, 'optionalAccess', _11 => _11.source, 'optionalAccess', _12 => _12.enabled]) && bg.mask.source.maskSource) return true;
1236
1274
  if (stack.outputOpacity < 1) return true;
1237
1275
  const blur = _chunkS55JFWDAcjs.blurFilter.call(void 0, bg);
1238
1276
  if (blur && blur.enabled && blur.radius > 0) {
@@ -1513,7 +1551,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1513
1551
  `${projection.angle},${transform.flipH},${transform.flipV}`,
1514
1552
  `${adjustments.brightness},${adjustments.contrast},${adjustments.saturation},${adjustments.exposure},${adjustments.temperature},${_nullishCoalesce(adjustments.tint, () => ( 0))},${adjustments.blur},${adjustments.opacity},p${_chunkS55JFWDAcjs.normalizeProcessVersion.call(void 0, adjustments.process)}`,
1515
1553
  _chunkS55JFWDAcjs.adjustmentLayersKey.call(void 0, adjustments.layers),
1516
- `${depthMask.enabled},${depthMask.maskSource},${_optionalChain([depthMask, 'access', _9 => _9.depthRange, 'optionalAccess', _10 => _10[0]])}-${_optionalChain([depthMask, 'access', _11 => _11.depthRange, 'optionalAccess', _12 => _12[1]])},${depthMask.softness},${depthMask.invert},${depthMask.mode}`,
1554
+ `${depthMask.enabled},${depthMask.maskSource},${_optionalChain([depthMask, 'access', _13 => _13.depthRange, 'optionalAccess', _14 => _14[0]])}-${_optionalChain([depthMask, 'access', _15 => _15.depthRange, 'optionalAccess', _16 => _16[1]])},${depthMask.softness},${depthMask.invert},${depthMask.mode}`,
1517
1555
  `d${this.displayKey}`
1518
1556
  ].join("|");
1519
1557
  let baseCanvas = this.cachedBaseCanvas;
@@ -1521,12 +1559,12 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1521
1559
  let histogram = null;
1522
1560
  baseCanvas = await this.renderBaseImage(img, naturalWidth, naturalHeight, region, transform, state, (pixels) => {
1523
1561
  histogram = computeHistogram(pixels);
1524
- _optionalChain([this, 'access', _13 => _13.display, 'optionalCall', _14 => _14(pixels.data)]);
1562
+ _optionalChain([this, 'access', _17 => _17.display, 'optionalCall', _18 => _18(pixels.data)]);
1525
1563
  });
1526
1564
  this.cachedBaseCanvas = baseCanvas;
1527
1565
  this.cachedBaseKey = baseKey;
1528
1566
  this.previewHistogram = histogram;
1529
- _optionalChain([this, 'access', _15 => _15.onPreviewHistogram, 'optionalCall', _16 => _16(histogram)]);
1567
+ _optionalChain([this, 'access', _19 => _19.onPreviewHistogram, 'optionalCall', _20 => _20(histogram)]);
1530
1568
  }
1531
1569
  const drawW = rotated.width * projection.scale;
1532
1570
  const drawH = rotated.height * projection.scale;
@@ -1541,7 +1579,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1541
1579
  const drawW = rotated.width * projection.scale;
1542
1580
  const drawH = rotated.height * projection.scale;
1543
1581
  ctx.drawImage(base.canvas, projection.originX - drawW / 2, projection.originY - drawH / 2, drawW, drawH);
1544
- this.publishHistogram(_nullishCoalesce(_nullishCoalesce(base.histogram, () => ( _optionalChain([comp, 'optionalAccess', _17 => _17.histogram, 'call', _18 => _18()]))), () => ( null)));
1582
+ this.publishHistogram(_nullishCoalesce(_nullishCoalesce(base.histogram, () => ( _optionalChain([comp, 'optionalAccess', _21 => _21.histogram, 'call', _22 => _22()]))), () => ( null)));
1545
1583
  }
1546
1584
  }
1547
1585
  if (overlay.length > 0 || options.draftAnnotation) {
@@ -1599,8 +1637,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1599
1637
  }
1600
1638
  const { width: iw, height: ih } = state.imageDimensions;
1601
1639
  const shownSel = state.selectionPreview !== void 0 ? state.selectionPreview : state.selection;
1602
- const quickMaskSel = display === "quickMask" && state.quickMaskEditing && !_optionalChain([shownSel, 'optionalAccess', _19 => _19.bounds]) ? this.emptyMask(Math.round(iw), Math.round(ih)) : null;
1603
- if (_optionalChain([shownSel, 'optionalAccess', _20 => _20.bounds]) && display !== "none" || quickMaskSel || _optionalChain([options, 'access', _21 => _21.draftSelectionPath, 'optionalAccess', _22 => _22.length])) {
1640
+ const quickMaskSel = display === "quickMask" && state.quickMaskEditing && !_optionalChain([shownSel, 'optionalAccess', _23 => _23.bounds]) ? this.emptyMask(Math.round(iw), Math.round(ih)) : null;
1641
+ if (_optionalChain([shownSel, 'optionalAccess', _24 => _24.bounds]) && display !== "none" || quickMaskSel || _optionalChain([options, 'access', _25 => _25.draftSelectionPath, 'optionalAccess', _26 => _26.length])) {
1604
1642
  ctx.save();
1605
1643
  try {
1606
1644
  _chunkS55JFWDAcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
@@ -1608,9 +1646,9 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1608
1646
  ctx.rect(region.x, region.y, region.width, region.height);
1609
1647
  ctx.clip();
1610
1648
  if (quickMaskSel) this.drawQuickMask(ctx, quickMaskSel);
1611
- else if (_optionalChain([shownSel, 'optionalAccess', _23 => _23.bounds]) && display === "quickMask") this.drawQuickMask(ctx, shownSel);
1612
- else if (_optionalChain([shownSel, 'optionalAccess', _24 => _24.bounds]) && display === "ants") this.drawAnts(ctx, shownSel, projection.scale / u, _nullishCoalesce(options.antsOffset, () => ( 0)));
1613
- if (_optionalChain([options, 'access', _25 => _25.draftSelectionPath, 'optionalAccess', _26 => _26.length])) this.drawDraftPath(ctx, options.draftSelectionPath, projection.scale / u);
1649
+ else if (_optionalChain([shownSel, 'optionalAccess', _27 => _27.bounds]) && display === "quickMask") this.drawQuickMask(ctx, shownSel);
1650
+ else if (_optionalChain([shownSel, 'optionalAccess', _28 => _28.bounds]) && display === "ants") this.drawAnts(ctx, shownSel, projection.scale / u, _nullishCoalesce(options.antsOffset, () => ( 0)));
1651
+ if (_optionalChain([options, 'access', _29 => _29.draftSelectionPath, 'optionalAccess', _30 => _30.length])) this.drawDraftPath(ctx, options.draftSelectionPath, projection.scale / u);
1614
1652
  } catch (e7) {
1615
1653
  }
1616
1654
  ctx.restore();
@@ -1741,7 +1779,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1741
1779
  ctx.lineWidth = 1.5 * u;
1742
1780
  ctx.strokeStyle = "#ffffff";
1743
1781
  ctx.stroke();
1744
- drawOverlayHandles(ctx, [...t.handles, ..._nullishCoalesce(_optionalChain([t, 'access', _27 => _27.warp, 'optionalAccess', _28 => _28.anchors]), () => ( []))].map(scr), u);
1782
+ drawOverlayHandles(ctx, [...t.handles, ..._nullishCoalesce(_optionalChain([t, 'access', _31 => _31.warp, 'optionalAccess', _32 => _32.anchors]), () => ( []))].map(scr), u);
1745
1783
  if (rotate) {
1746
1784
  ctx.beginPath();
1747
1785
  ctx.arc(rotate.x, rotate.y, 5 * u, 0, Math.PI * 2);
@@ -1751,7 +1789,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1751
1789
  ctx.strokeStyle = OVERLAY_HANDLE_EDGE;
1752
1790
  ctx.stroke();
1753
1791
  }
1754
- for (const h of (_nullishCoalesce(_optionalChain([t, 'access', _29 => _29.warp, 'optionalAccess', _30 => _30.handles]), () => ( []))).map((w) => scr(w.point))) {
1792
+ for (const h of (_nullishCoalesce(_optionalChain([t, 'access', _33 => _33.warp, 'optionalAccess', _34 => _34.handles]), () => ( []))).map((w) => scr(w.point))) {
1755
1793
  ctx.beginPath();
1756
1794
  ctx.arc(h.x, h.y, 3.5 * u, 0, Math.PI * 2);
1757
1795
  ctx.fillStyle = "#ffffff";
@@ -1896,7 +1934,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1896
1934
  } catch (e14) {
1897
1935
  }
1898
1936
  }
1899
- _optionalChain([onPixels, 'optionalCall', _31 => _31(imageData)]);
1937
+ _optionalChain([onPixels, 'optionalCall', _35 => _35(imageData)]);
1900
1938
  baseCtx.putImageData(imageData, 0, 0);
1901
1939
  }
1902
1940
  return baseCanvas;
@@ -1905,7 +1943,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1905
1943
  /** Which base path renders `state` (see `needsLegacyBase`). */
1906
1944
  chooseRoute(state, region, naturalWidth, naturalHeight) {
1907
1945
  let route;
1908
- if (!_optionalChain([state, 'access', _32 => _32.layers, 'optionalAccess', _33 => _33.length])) route = "legacy";
1946
+ if (!_optionalChain([state, 'access', _36 => _36.layers, 'optionalAccess', _37 => _37.length])) route = "legacy";
1909
1947
  else if (this.baseRoute === "layers") route = "layers";
1910
1948
  else {
1911
1949
  const stack = { layers: state.layers, outputOpacity: _nullishCoalesce(state.outputOpacity, () => ( 1)), legacyOutputBlur: state.legacyOutputBlur };
@@ -1915,7 +1953,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1915
1953
  region,
1916
1954
  canvas: { width: naturalWidth, height: naturalHeight },
1917
1955
  transform: state.transform,
1918
- sourceOpaque: _nullishCoalesce(_optionalChain([this, 'access', _34 => _34.layerSources, 'optionalAccess', _35 => _35.sourceIsOpaque, 'call', _36 => _36()]), () => ( true))
1956
+ sourceOpaque: _nullishCoalesce(_optionalChain([this, 'access', _38 => _38.layerSources, 'optionalAccess', _39 => _39.sourceIsOpaque, 'call', _40 => _40()]), () => ( true))
1919
1957
  }) ? "legacy" : "layers";
1920
1958
  }
1921
1959
  this.lastBaseRoute = route;
@@ -1933,24 +1971,24 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1933
1971
  return _nullishCoalesce(this.depthMaps.get(`${source.maskSource}|${width}x${height}`), () => ( null));
1934
1972
  },
1935
1973
  rasterizeAnnotation: (annotation, rect2) => this.rasterizeAnnotation(annotation, rect2),
1936
- version: `${_nullishCoalesce(_optionalChain([host, 'optionalAccess', _37 => _37.version, 'call', _38 => _38()]), () => ( ""))}:${this.assetVersion}`,
1937
- globalLight: _optionalChain([host, 'optionalAccess', _39 => _39.globalLight, 'optionalCall', _40 => _40()]),
1938
- pattern: _optionalChain([host, 'optionalAccess', _41 => _41.pattern]) ? (id) => host.pattern(id) : void 0
1974
+ version: `${_nullishCoalesce(_optionalChain([host, 'optionalAccess', _41 => _41.version, 'call', _42 => _42()]), () => ( ""))}:${this.assetVersion}`,
1975
+ globalLight: _optionalChain([host, 'optionalAccess', _43 => _43.globalLight, 'optionalCall', _44 => _44()]),
1976
+ pattern: _optionalChain([host, 'optionalAccess', _45 => _45.pattern]) ? (id) => host.pattern(id) : void 0
1939
1977
  };
1940
1978
  }
1941
1979
  /** Loads what the compositor reads synchronously: depth maps (at canvas size) and annotation images. */
1942
1980
  /** Loads depth maps and annotation images the compositor reads synchronously. */
1943
1981
  async prepareLayerAssets(layers, width, height) {
1944
1982
  for (const l of _chunkB46UQUDCcjs.flattenLayers.call(void 0, layers)) {
1945
- const source = _optionalChain([l, 'access', _42 => _42.mask, 'optionalAccess', _43 => _43.source]);
1946
- if (_optionalChain([source, 'optionalAccess', _44 => _44.enabled]) && source.maskSource) {
1983
+ const source = _optionalChain([l, 'access', _46 => _46.mask, 'optionalAccess', _47 => _47.source]);
1984
+ if (_optionalChain([source, 'optionalAccess', _48 => _48.enabled]) && source.maskSource) {
1947
1985
  const key2 = `${source.maskSource}|${width}x${height}`;
1948
1986
  if (this.depthMaps.has(key2)) continue;
1949
1987
  try {
1950
1988
  const maskImg = await this.imageCache.get(source.maskSource);
1951
1989
  const canvas = this.createCanvas(width, height);
1952
1990
  const mctx = canvas.getContext("2d");
1953
- const data = mctx ? (mctx.drawImage(maskImg, 0, 0, width, height), _optionalChain([mctx, 'access', _45 => _45.getImageData, 'optionalCall', _46 => _46(0, 0, width, height)])) : null;
1991
+ const data = mctx ? (mctx.drawImage(maskImg, 0, 0, width, height), _optionalChain([mctx, 'access', _49 => _49.getImageData, 'optionalCall', _50 => _50(0, 0, width, height)])) : null;
1954
1992
  if (data) {
1955
1993
  this.depthMaps.set(key2, { width, height, data: data.data });
1956
1994
  this.assetVersion++;
@@ -2004,7 +2042,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2004
2042
  if (x1 <= x0 || y1 <= y0) return;
2005
2043
  const img = ctx.createImageData(_chunk474IQG74cjs.TILE, _chunk474IQG74cjs.TILE);
2006
2044
  img.data.set(data);
2007
- _optionalChain([this, 'access', _47 => _47.display, 'optionalCall', _48 => _48(img.data)]);
2045
+ _optionalChain([this, 'access', _51 => _51.display, 'optionalCall', _52 => _52(img.data)]);
2008
2046
  ctx.putImageData(img, ox, oy, x0, y0, x1 - x0, y1 - y0);
2009
2047
  }
2010
2048
  /**
@@ -2071,7 +2109,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2071
2109
  const opacity = _nullishCoalesce(state.outputOpacity, () => ( 1));
2072
2110
  const blur = _nullishCoalesce(state.legacyOutputBlur, () => ( 0));
2073
2111
  if (!(opacity < 1) && !(blur > 0)) return null;
2074
- const data = _optionalChain([ctx, 'access', _49 => _49.getImageData, 'optionalCall', _50 => _50(0, 0, w, h)]);
2112
+ const data = _optionalChain([ctx, 'access', _53 => _53.getImageData, 'optionalCall', _54 => _54(0, 0, w, h)]);
2075
2113
  if (!data) return null;
2076
2114
  applyOutputStage(data, opacity, blur);
2077
2115
  ctx.putImageData(data, 0, 0);
@@ -2080,7 +2118,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2080
2118
  publishHistogram(histogram) {
2081
2119
  if (histogram === this.previewHistogram) return;
2082
2120
  this.previewHistogram = histogram;
2083
- _optionalChain([this, 'access', _51 => _51.onPreviewHistogram, 'optionalCall', _52 => _52(histogram)]);
2121
+ _optionalChain([this, 'access', _55 => _55.onPreviewHistogram, 'optionalCall', _56 => _56(histogram)]);
2084
2122
  }
2085
2123
  __init21() {this.quickMaskCache = /* @__PURE__ */ new WeakMap()}
2086
2124
  __init22() {this.diffCache = /* @__PURE__ */ new WeakMap()}
@@ -2101,7 +2139,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2101
2139
  if (!layer.mask || layer.mask.source || width < 1 || height < 1) return null;
2102
2140
  const key2 = `${width}x${height}:${layer.type === "pixel" ? `${layer.offset.x},${layer.offset.y}` : ""}`;
2103
2141
  const cached = this.maskViewCache.get(layer.mask.surface);
2104
- if (_optionalChain([cached, 'optionalAccess', _53 => _53.key]) === key2) return cached.mask;
2142
+ if (_optionalChain([cached, 'optionalAccess', _57 => _57.key]) === key2) return cached.mask;
2105
2143
  const mask = _chunkS55JFWDAcjs.layerMaskSelection.call(void 0, layer, width, height);
2106
2144
  if (mask) this.maskViewCache.set(layer.mask.surface, { key: key2, mask });
2107
2145
  return mask;
@@ -2122,7 +2160,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2122
2160
  }
2123
2161
  /** A channel's tint (colour, opacity, masked or selected area), drawn in natural image space. */
2124
2162
  drawMaskOverlay(ctx, mask, style) {
2125
- const key2 = `${_optionalChain([style, 'access', _54 => _54.color, 'optionalAccess', _55 => _55.join, 'call', _56 => _56(",")])}|${style.opacity}|${style.indicates}`;
2163
+ const key2 = `${_optionalChain([style, 'access', _58 => _58.color, 'optionalAccess', _59 => _59.join, 'call', _60 => _60(",")])}|${style.opacity}|${style.indicates}`;
2126
2164
  let cached = this.overlayCache.get(mask);
2127
2165
  if (!cached || cached.key !== key2) {
2128
2166
  const canvas = this.createCanvas(mask.width, mask.height);
@@ -2168,17 +2206,17 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2168
2206
  * screen pixels per natural pixel (the projection scale times the host's CSS scale).
2169
2207
  */
2170
2208
  drawAnts(ctx, selection, scale, offset) {
2171
- let segs = this.outlineCache.get(selection);
2172
- if (!segs) {
2173
- segs = selectionOutline(selection);
2174
- this.outlineCache.set(selection, segs);
2209
+ let paths = this.outlineCache.get(selection);
2210
+ if (!paths) {
2211
+ paths = selectionOutlinePaths(selection);
2212
+ this.outlineCache.set(selection, paths);
2175
2213
  }
2176
- if (!segs.length) return;
2214
+ if (!paths.length) return;
2177
2215
  const px2 = 1 / (scale || 1);
2178
2216
  ctx.beginPath();
2179
- for (let i = 0; i < segs.length; i += 4) {
2180
- ctx.moveTo(segs[i], segs[i + 1]);
2181
- ctx.lineTo(segs[i + 2], segs[i + 3]);
2217
+ for (const p of paths) {
2218
+ ctx.moveTo(p[0], p[1]);
2219
+ for (let i = 2; i < p.length; i += 2) ctx.lineTo(p[i], p[i + 1]);
2182
2220
  }
2183
2221
  ctx.lineWidth = px2;
2184
2222
  ctx.strokeStyle = "#ffffff";
@@ -2553,8 +2591,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2553
2591
  if (!ctx) return maskCanvas;
2554
2592
  ctx.fillStyle = MASK_BLACK;
2555
2593
  ctx.fillRect(0, 0, naturalWidth, naturalHeight);
2556
- const useCrop = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _57 => _57.useCrop]), () => ( true));
2557
- const useAnnotations = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _58 => _58.useAnnotations]), () => ( true));
2594
+ const useCrop = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _61 => _61.useCrop]), () => ( true));
2595
+ const useAnnotations = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _62 => _62.useAnnotations]), () => ( true));
2558
2596
  if (useCrop && state.crop) {
2559
2597
  ctx.fillStyle = MASK_WHITE;
2560
2598
  ctx.fillRect(state.crop.x, state.crop.y, state.crop.width, state.crop.height);
@@ -2564,8 +2602,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2564
2602
  this.drawAnnotationMask(ctx, ann);
2565
2603
  }
2566
2604
  }
2567
- const imageData = _optionalChain([ctx, 'access', _59 => _59.getImageData, 'optionalCall', _60 => _60(0, 0, naturalWidth, naturalHeight)]);
2568
- const selection = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _61 => _61.useSelection]), () => ( true))) && _optionalChain([state, 'access', _62 => _62.selection, 'optionalAccess', _63 => _63.bounds]) && state.selection.width === naturalWidth && state.selection.height === naturalHeight ? state.selection : null;
2605
+ const imageData = _optionalChain([ctx, 'access', _63 => _63.getImageData, 'optionalCall', _64 => _64(0, 0, naturalWidth, naturalHeight)]);
2606
+ const selection = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _65 => _65.useSelection]), () => ( true))) && _optionalChain([state, 'access', _66 => _66.selection, 'optionalAccess', _67 => _67.bounds]) && state.selection.width === naturalWidth && state.selection.height === naturalHeight ? state.selection : null;
2569
2607
  if (imageData) {
2570
2608
  const d = imageData.data;
2571
2609
  for (let i = 0; i < d.length; i += 4) {
@@ -3649,15 +3687,15 @@ function readPaths(stored, problems = []) {
3649
3687
  let work = false;
3650
3688
  for (const [i, raw] of stored.entries()) {
3651
3689
  const r = raw;
3652
- const name = typeof _optionalChain([r, 'optionalAccess', _64 => _64.name]) === "string" && r.name.trim() ? r.name.trim() : `Path ${i + 1}`;
3690
+ const name = typeof _optionalChain([r, 'optionalAccess', _68 => _68.name]) === "string" && r.name.trim() ? r.name.trim() : `Path ${i + 1}`;
3653
3691
  try {
3654
- const components = _chunkS55JFWDAcjs.readShapeComponents.call(void 0, _optionalChain([r, 'optionalAccess', _65 => _65.components]));
3655
- let id = typeof _optionalChain([r, 'optionalAccess', _66 => _66.id]) === "string" && r.id ? r.id : newPathId();
3692
+ const components = _chunkS55JFWDAcjs.readShapeComponents.call(void 0, _optionalChain([r, 'optionalAccess', _69 => _69.components]));
3693
+ let id = typeof _optionalChain([r, 'optionalAccess', _70 => _70.id]) === "string" && r.id ? r.id : newPathId();
3656
3694
  if (ids.has(id)) id = newPathId();
3657
3695
  ids.add(id);
3658
3696
  const path = { id, name, components };
3659
- if (_optionalChain([r, 'optionalAccess', _67 => _67.fillRule]) === "evenodd") path.fillRule = "evenodd";
3660
- if (_optionalChain([r, 'optionalAccess', _68 => _68.work]) === true && !work) {
3697
+ if (_optionalChain([r, 'optionalAccess', _71 => _71.fillRule]) === "evenodd") path.fillRule = "evenodd";
3698
+ if (_optionalChain([r, 'optionalAccess', _72 => _72.work]) === true && !work) {
3661
3699
  path.work = true;
3662
3700
  work = true;
3663
3701
  }
@@ -3781,11 +3819,11 @@ function applyShapeOptions(controller, layerId, change) {
3781
3819
  const style = {};
3782
3820
  if ("fill" in change) style.fill = _nullishCoalesce(change.fill, () => ( null));
3783
3821
  if ("stroke" in change || "strokeWidth" in change) {
3784
- const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access', _69 => _69.stroke, 'optionalAccess', _70 => _70.paint, 'access', _71 => _71.type]) === "color" ? info.stroke.paint.color : null;
3785
- style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access', _72 => _72.stroke, 'optionalAccess', _73 => _73.width]))), () => ( 2)), paint: color } : null;
3822
+ const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access', _73 => _73.stroke, 'optionalAccess', _74 => _74.paint, 'access', _75 => _75.type]) === "color" ? info.stroke.paint.color : null;
3823
+ style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access', _76 => _76.stroke, 'optionalAccess', _77 => _77.width]))), () => ( 2)), paint: color } : null;
3786
3824
  }
3787
3825
  if (Object.keys(style).length) controller.setShapeStyle(layerId, style);
3788
- const live = _optionalChain([info, 'access', _74 => _74.components, 'access', _75 => _75[0], 'optionalAccess', _76 => _76.live]);
3826
+ const live = _optionalChain([info, 'access', _78 => _78.components, 'access', _79 => _79[0], 'optionalAccess', _80 => _80.live]);
3789
3827
  if (!live) return;
3790
3828
  const shape = {};
3791
3829
  if (live.kind === "rect" && change.radius !== void 0) shape.radius = change.radius;
@@ -3811,7 +3849,7 @@ var TextEditSession = (_class7 = class {
3811
3849
  __init39() {this.listeners = /* @__PURE__ */ new Set()}
3812
3850
  __init40() {this.error = null}
3813
3851
  get layer() {
3814
- const l = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _77 => _77.layer]);
3852
+ const l = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _81 => _81.layer]);
3815
3853
  if (!l || l.type !== "type") throw new Error("The type layer being edited is gone.");
3816
3854
  return l;
3817
3855
  }
@@ -3826,7 +3864,7 @@ var TextEditSession = (_class7 = class {
3826
3864
  }
3827
3865
  /** Whether the layer still exists (it can be deleted or undone away while editing). */
3828
3866
  get alive() {
3829
- return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _78 => _78.layer, 'access', _79 => _79.type]) === "type";
3867
+ return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _82 => _82.layer, 'access', _83 => _83.type]) === "type";
3830
3868
  }
3831
3869
  subscribe(fn) {
3832
3870
  this.listeners.add(fn);
@@ -4114,7 +4152,7 @@ var TypeToolGesture = (_class8 = class {
4114
4152
  finish() {
4115
4153
  const s = this.session;
4116
4154
  this.session = null;
4117
- _optionalChain([s, 'optionalAccess', _80 => _80.close, 'call', _81 => _81()]);
4155
+ _optionalChain([s, 'optionalAccess', _84 => _84.close, 'call', _85 => _85()]);
4118
4156
  }
4119
4157
  }, _class8);
4120
4158
 
@@ -4459,14 +4497,14 @@ function segmentationOutlines(result) {
4459
4497
  function segmentToSelection(width, height, result) {
4460
4498
  let out = null;
4461
4499
  for (const ring of segmentationOutlines(result)) {
4462
- out = _chunkSS53NNZOcjs.combineSelections.call(void 0, out, _chunkUC3PWFM3cjs.polygonSelection.call(void 0, width, height, ring), "add");
4500
+ out = _chunkSS53NNZOcjs.combineSelections.call(void 0, out, _chunkKALCIDWHcjs.polygonSelection.call(void 0, width, height, ring), "add");
4463
4501
  }
4464
4502
  if (result.mask && result.mask.width > 0 && result.mask.height > 0) {
4465
4503
  const raw = _chunkSS53NNZOcjs.selectionFromPixels.call(void 0, result.mask, { channel: "luminance" });
4466
4504
  const sized = raw.width === width && raw.height === height ? raw : _chunkSS53NNZOcjs.resizeSelection.call(void 0, raw, width, height);
4467
4505
  out = _chunkSS53NNZOcjs.combineSelections.call(void 0, out, sized, "add");
4468
4506
  }
4469
- return _optionalChain([out, 'optionalAccess', _82 => _82.bounds]) ? out : null;
4507
+ return _optionalChain([out, 'optionalAccess', _86 => _86.bounds]) ? out : null;
4470
4508
  }
4471
4509
  function segmentsToSelection(width, height, results) {
4472
4510
  let out = null;
@@ -4515,7 +4553,7 @@ function deserializeChannels(value, size, problems = []) {
4515
4553
  visible: v.visible === true
4516
4554
  });
4517
4555
  } catch (err) {
4518
- problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess', _83 => _83.name]), () => ( "?")))}" could not be read: ${err instanceof Error ? err.message : String(err)}.`);
4556
+ problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess', _87 => _87.name]), () => ( "?")))}" could not be read: ${err instanceof Error ? err.message : String(err)}.`);
4519
4557
  }
4520
4558
  }
4521
4559
  return out;
@@ -4553,16 +4591,16 @@ function checkEffectTime(time) {
4553
4591
  return time;
4554
4592
  }
4555
4593
  function checkEffectAnimation(animate) {
4556
- const duration = _optionalChain([animate, 'optionalAccess', _84 => _84.duration]);
4594
+ const duration = _optionalChain([animate, 'optionalAccess', _88 => _88.duration]);
4557
4595
  if (!(typeof duration === "number" && Number.isFinite(duration) && duration > 0 && duration <= _chunkS55JFWDAcjs.MAX_EFFECT_ANIMATION_MS)) {
4558
4596
  throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`animate.duration must be more than 0 and at most ${_chunkS55JFWDAcjs.MAX_EFFECT_ANIMATION_MS} ms.`);
4559
4597
  }
4560
4598
  return { duration: Math.round(duration) };
4561
4599
  }
4562
4600
  function effectLayerTiming(g, d) {
4563
- if (!_optionalChain([d, 'optionalAccess', _85 => _85.duration])) return null;
4601
+ if (!_optionalChain([d, 'optionalAccess', _89 => _89.duration])) return null;
4564
4602
  const time = _nullishCoalesce(g.time, () => ( 0));
4565
- return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access', _86 => _86.animate, 'optionalAccess', _87 => _87.duration]), () => ( d.duration)), loops: d.loop };
4603
+ return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access', _90 => _90.animate, 'optionalAccess', _91 => _91.duration]), () => ( d.duration)), loops: d.loop };
4566
4604
  }
4567
4605
 
4568
4606
  // src/image-editor/effects.ts
@@ -4815,14 +4853,14 @@ var FreeTransformSession = (_class10 = class {
4815
4853
  if (init.interpolation !== void 0 && !_chunkB46UQUDCcjs.isInterpolation.call(void 0, init.interpolation)) fail(`Unknown interpolation "${String(init.interpolation)}"; use nearest, bilinear or bicubic.`);
4816
4854
  this.interp = _nullishCoalesce(init.interpolation, () => ( "bicubic"));
4817
4855
  const sel = host.selection();
4818
- const selected = Boolean(_optionalChain([sel, 'optionalAccess', _88 => _88.bounds]));
4856
+ const selected = Boolean(_optionalChain([sel, 'optionalAccess', _92 => _92.bounds]));
4819
4857
  let content = _nullishCoalesce(init.content, () => ( "auto"));
4820
4858
  if (!["auto", "layer", "selection", "selection-copy", "selection-outline"].includes(content)) {
4821
4859
  fail(`Unknown content "${String(content)}"; use auto, layer, selection, selection-copy or selection-outline.`);
4822
4860
  }
4823
4861
  const targetId = _nullishCoalesce(init.layerId, () => ( host.activeLayerId()));
4824
- const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess', _89 => _89.layer]) : void 0;
4825
- const smartTarget = (_optionalChain([target, 'optionalAccess', _90 => _90.type]) === "smart" || _optionalChain([target, 'optionalAccess', _91 => _91.type]) === "shape" || _optionalChain([target, 'optionalAccess', _92 => _92.type]) === "type") && (_nullishCoalesce(init.channel, () => ( (target.id === host.activeLayerId() ? host.activeTarget() : "pixels")))) !== "mask";
4862
+ const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess', _93 => _93.layer]) : void 0;
4863
+ const smartTarget = (_optionalChain([target, 'optionalAccess', _94 => _94.type]) === "smart" || _optionalChain([target, 'optionalAccess', _95 => _95.type]) === "shape" || _optionalChain([target, 'optionalAccess', _96 => _96.type]) === "type") && (_nullishCoalesce(init.channel, () => ( (target.id === host.activeLayerId() ? host.activeTarget() : "pixels")))) !== "mask";
4826
4864
  if (content === "auto") content = selected && !smartTarget ? "selection" : "layer";
4827
4865
  this.content = content;
4828
4866
  if (content !== "layer" && !selected) fail(`Nothing is selected; ${content} needs a selection. Select first, or use content layer.`);
@@ -4846,9 +4884,9 @@ var FreeTransformSession = (_class10 = class {
4846
4884
  const mask = layer.mask && !layer.mask.source ? layer.mask : void 0;
4847
4885
  const channel = _nullishCoalesce(init.channel, () => ( (layer.id === host.activeLayerId() ? host.activeTarget() : "pixels")));
4848
4886
  if (channel !== "pixels" && channel !== "mask") fail(`Unknown channel "${String(channel)}"; use pixels or mask.`);
4849
- const linked = _optionalChain([mask, 'optionalAccess', _93 => _93.linked]) !== false;
4887
+ const linked = _optionalChain([mask, 'optionalAccess', _97 => _97.linked]) !== false;
4850
4888
  const maskAlone = channel === "mask" && (!linked || layer.type !== "pixel");
4851
- if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access', _94 => _94.mask, 'optionalAccess', _95 => _95.source]) ? `Layer "${layer.name || id}" has a depth mask, which is generated, not transformed.` : `Layer "${layer.name || id}" has no mask to transform; add one with add_layer_mask, or transform its pixels.`);
4889
+ if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access', _98 => _98.mask, 'optionalAccess', _99 => _99.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.`);
4852
4890
  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.`);
4853
4891
  if (!layer.visible && content !== "selection-copy") fail(`Layer "${layer.name || id}" is hidden; show it before you transform it.`);
4854
4892
  if (content !== "selection-copy") {
@@ -4951,7 +4989,7 @@ var FreeTransformSession = (_class10 = class {
4951
4989
  };
4952
4990
  this.copyId = copy.id;
4953
4991
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, layer.id);
4954
- this.startLayers = _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _96 => _96.parent, 'optionalAccess', _97 => _97.id]), () => ( null)), loc.index + 1);
4992
+ this.startLayers = _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _100 => _100.parent, 'optionalAccess', _101 => _101.id]), () => ( null)), loc.index + 1);
4955
4993
  this.parts.push({ what: "pixels", offset: o, moving: lifted, base: null, reduced: /* @__PURE__ */ new Map() });
4956
4994
  moves.push("pixels");
4957
4995
  }
@@ -5060,7 +5098,7 @@ var FreeTransformSession = (_class10 = class {
5060
5098
  moveVectorMask(layers) {
5061
5099
  const g = this.geometryValue;
5062
5100
  if (!this.layerId || this.copyId || !this.moves.includes("pixels") || _chunkS55JFWDAcjs.isIdentityTransform.call(void 0, g)) return layers;
5063
- const vm = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess', _98 => _98.layer, 'access', _99 => _99.vectorMask]);
5101
+ const vm = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess', _102 => _102.layer, 'access', _103 => _103.vectorMask]);
5064
5102
  if (!vm || vm.linked === false) return layers;
5065
5103
  const warp = _chunkS55JFWDAcjs.hasWarp.call(void 0, g);
5066
5104
  const f = warp ? _chunkS55JFWDAcjs.transformMap.call(void 0, g) : null;
@@ -5231,11 +5269,11 @@ var FreeTransformSession = (_class10 = class {
5231
5269
  result(changed, layers, selection) {
5232
5270
  let bounds = null;
5233
5271
  const id = _nullishCoalesce(this.copyId, () => ( this.layerId));
5234
- const layer = id ? _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _100 => _100.layer]) : void 0;
5235
- if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess', _101 => _101.type]) === "pixel") bounds = toDoc(_chunk474IQG74cjs.contentBounds.call(void 0, this.host.pixelsOf(layer)), layer.offset);
5236
- else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess', _102 => _102.type]) === "smart" || _optionalChain([layer, 'optionalAccess', _103 => _103.type]) === "shape" || _optionalChain([layer, 'optionalAccess', _104 => _104.type]) === "type")) bounds = _chunk474IQG74cjs.contentBounds.call(void 0, layer.surface);
5237
- else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess', _105 => _105.mask])) bounds = toDoc(_chunk474IQG74cjs.contentBounds.call(void 0, layer.mask.surface), layer.type === "pixel" ? layer.offset : { x: 0, y: 0 });
5238
- else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess', _106 => _106.bounds]) ? { ...selection.bounds } : null;
5272
+ const layer = id ? _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _104 => _104.layer]) : void 0;
5273
+ if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess', _105 => _105.type]) === "pixel") bounds = toDoc(_chunk474IQG74cjs.contentBounds.call(void 0, this.host.pixelsOf(layer)), layer.offset);
5274
+ else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess', _106 => _106.type]) === "smart" || _optionalChain([layer, 'optionalAccess', _107 => _107.type]) === "shape" || _optionalChain([layer, 'optionalAccess', _108 => _108.type]) === "type")) bounds = _chunk474IQG74cjs.contentBounds.call(void 0, layer.surface);
5275
+ else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess', _109 => _109.mask])) bounds = toDoc(_chunk474IQG74cjs.contentBounds.call(void 0, layer.mask.surface), layer.type === "pixel" ? layer.offset : { x: 0, y: 0 });
5276
+ else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess', _110 => _110.bounds]) ? { ...selection.bounds } : null;
5239
5277
  return {
5240
5278
  layerId: _nullishCoalesce(this.copyId, () => ( this.layerId)),
5241
5279
  content: this.content,
@@ -5264,7 +5302,7 @@ function deserializeColorMode(raw, problems) {
5264
5302
  }
5265
5303
  function effectiveProof(proof, mode) {
5266
5304
  if (proof) return proof;
5267
- if (_optionalChain([mode, 'optionalAccess', _107 => _107.mode]) === "cmyk") return { ...DEFAULT_PROOF, profile: mode.profile, intent: mode.intent };
5305
+ if (_optionalChain([mode, 'optionalAccess', _111 => _111.mode]) === "cmyk") return { ...DEFAULT_PROOF, profile: mode.profile, intent: mode.intent };
5268
5306
  return null;
5269
5307
  }
5270
5308
  function colorModePlanes(doc, mode) {
@@ -5319,7 +5357,7 @@ function resolveProfile(doc) {
5319
5357
  return p;
5320
5358
  }
5321
5359
  function profileBytes(doc) {
5322
- if (_optionalChain([doc, 'optionalAccess', _108 => _108.icc])) return doc.icc;
5360
+ if (_optionalChain([doc, 'optionalAccess', _112 => _112.icc])) return doc.icc;
5323
5361
  const p = resolveProfile(doc);
5324
5362
  return _nullishCoalesce(p.bytes, () => ( _chunkBROJYMWUcjs.encodeProfile.call(void 0, p)));
5325
5363
  }
@@ -5481,7 +5519,7 @@ function paintCoverageInto(base, coverage, apply, rects, depth = null) {
5481
5519
  else tiles.delete(key2);
5482
5520
  continue;
5483
5521
  }
5484
- const src = _nullishCoalesce(_optionalChain([base, 'access', _109 => _109.tiles, 'access', _110 => _110.get, 'call', _111 => _111(key2), 'optionalAccess', _112 => _112.data]), () => ( defaultTile(base)));
5522
+ const src = _nullishCoalesce(_optionalChain([base, 'access', _113 => _113.tiles, 'access', _114 => _114.get, 'call', _115 => _115(key2), 'optionalAccess', _116 => _116.data]), () => ( defaultTile(base)));
5485
5523
  const data = _chunkPQ3H2AANcjs.applyStrokeToTile.call(void 0, coverage, src, base.channels, t.tx, t.ty, apply);
5486
5524
  const tile = _chunk474IQG74cjs.finishTile.call(void 0, data, base.channels, base.defaultValue);
5487
5525
  if (tile) tiles.set(key2, tile);
@@ -5517,7 +5555,7 @@ var PaintStrokeSession = (_class11 = class {
5517
5555
  this.stroke = null;
5518
5556
  this.retouch = stroke;
5519
5557
  if (this.base.channels === 1) {
5520
- const view = _chunkYF3YZZ6Gcjs.rgbaViewOfGrey.call(void 0, this.mixerPixels());
5558
+ const view = _chunk2ONK3ERDcjs.rgbaViewOfGrey.call(void 0, this.mixerPixels());
5521
5559
  this.mixer = stroke.create(view.target);
5522
5560
  this.flushView = view.flush;
5523
5561
  } else this.mixer = stroke.create(this.mixerPixels());
@@ -5564,7 +5602,7 @@ var PaintStrokeSession = (_class11 = class {
5564
5602
  retouchDeepTile(key2, tx, ty, paint, options) {
5565
5603
  const r = this.retouch;
5566
5604
  const read = this.readWork(key2);
5567
- const out = _chunkYF3YZZ6Gcjs.applyRetouchToTile.call(void 0, this.stroke.coverage, _nullishCoalesce(read, () => ( new Float32Array(_chunk474IQG74cjs.TILE * _chunk474IQG74cjs.TILE * 4))), 4, tx, ty, paint, r.apply, options);
5605
+ const out = _chunk2ONK3ERDcjs.applyRetouchToTile.call(void 0, this.stroke.coverage, _nullishCoalesce(read, () => ( new Float32Array(_chunk474IQG74cjs.TILE * _chunk474IQG74cjs.TILE * 4))), 4, tx, ty, paint, r.apply, options);
5568
5606
  this.work.set(key2, out);
5569
5607
  const d = deepOfWorkTile(out, this.deep, read, this.base.tiles.get(key2));
5570
5608
  this.liveDeep.set(key2, d);
@@ -5574,7 +5612,7 @@ var PaintStrokeSession = (_class11 = class {
5574
5612
  /** The new tile of a coverage stroke over the pre-stroke tile `src`. */
5575
5613
  compositeTile(src, tx, ty, options = {}, paint) {
5576
5614
  const r = this.retouch;
5577
- if (r && r.kind === "coverage") return _chunkYF3YZZ6Gcjs.applyRetouchToTile.call(void 0, this.stroke.coverage, src, this.base.channels, tx, ty, _nullishCoalesce(paint, () => ( r.paint())), r.apply, options);
5615
+ if (r && r.kind === "coverage") return _chunk2ONK3ERDcjs.applyRetouchToTile.call(void 0, this.stroke.coverage, src, this.base.channels, tx, ty, _nullishCoalesce(paint, () => ( r.paint())), r.apply, options);
5578
5616
  return _chunkPQ3H2AANcjs.applyStrokeToTile.call(void 0, this.stroke.coverage, src, this.base.channels, tx, ty, this.apply, options);
5579
5617
  }
5580
5618
  /** The live pixels a mixer stroke reads and writes; base tiles are copied on first write. */
@@ -5594,7 +5632,7 @@ var PaintStrokeSession = (_class11 = class {
5594
5632
  writeTile: (tx, ty) => {
5595
5633
  const key2 = _chunk474IQG74cjs.tileKey.call(void 0, tx, ty);
5596
5634
  if (!this.touched.has(key2)) {
5597
- this.work.set(key2, _nullishCoalesce(_optionalChain([read, 'call', _113 => _113(key2), 'optionalAccess', _114 => _114.slice, 'call', _115 => _115()]), () => ( new Float32Array(_chunk474IQG74cjs.TILE * _chunk474IQG74cjs.TILE * 4))));
5635
+ this.work.set(key2, _nullishCoalesce(_optionalChain([read, 'call', _117 => _117(key2), 'optionalAccess', _118 => _118.slice, 'call', _119 => _119()]), () => ( new Float32Array(_chunk474IQG74cjs.TILE * _chunk474IQG74cjs.TILE * 4))));
5598
5636
  this.touched.add(key2);
5599
5637
  }
5600
5638
  this.fresh.add(key2);
@@ -5606,11 +5644,11 @@ var PaintStrokeSession = (_class11 = class {
5606
5644
  offset: a.offset,
5607
5645
  lockTransparency: a.lockTransparency,
5608
5646
  selection: a.selection,
5609
- readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access', _116 => _116.live, 'access', _117 => _117.get, 'call', _118 => _118(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _119 => _119.data]), () => ( (this.base.defaultValue ? defaultTile(this.base) : null))),
5647
+ readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access', _120 => _120.live, 'access', _121 => _121.get, 'call', _122 => _122(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _123 => _123.data]), () => ( (this.base.defaultValue ? defaultTile(this.base) : null))),
5610
5648
  writeTile: (tx, ty) => {
5611
5649
  const key2 = _chunk474IQG74cjs.tileKey.call(void 0, tx, ty);
5612
5650
  if (!this.touched.has(key2)) {
5613
- const src = _nullishCoalesce(_optionalChain([this, 'access', _120 => _120.base, 'access', _121 => _121.tiles, 'access', _122 => _122.get, 'call', _123 => _123(key2), 'optionalAccess', _124 => _124.data]), () => ( defaultTile(this.base)));
5651
+ const src = _nullishCoalesce(_optionalChain([this, 'access', _124 => _124.base, 'access', _125 => _125.tiles, 'access', _126 => _126.get, 'call', _127 => _127(key2), 'optionalAccess', _128 => _128.data]), () => ( defaultTile(this.base)));
5614
5652
  this.live.set(key2, { data: new Uint8ClampedArray(src), uniform: null });
5615
5653
  this.touched.add(key2);
5616
5654
  }
@@ -5627,11 +5665,11 @@ var PaintStrokeSession = (_class11 = class {
5627
5665
  if (this.closed || !points.length) return;
5628
5666
  if (!this.started) {
5629
5667
  this.started = true;
5630
- if (_optionalChain([this, 'access', _125 => _125.retouch, 'optionalAccess', _126 => _126.kind]) === "coverage") this.retouch.start(points[0]);
5668
+ if (_optionalChain([this, 'access', _129 => _129.retouch, 'optionalAccess', _130 => _130.kind]) === "coverage") this.retouch.start(points[0]);
5631
5669
  }
5632
5670
  this.last = points[points.length - 1];
5633
5671
  const rects = this.mixer ? this.mixer.push(points) : this.stroke.push(points);
5634
- _optionalChain([this, 'access', _127 => _127.flushView, 'optionalCall', _128 => _128()]);
5672
+ _optionalChain([this, 'access', _131 => _131.flushView, 'optionalCall', _132 => _132()]);
5635
5673
  this.update(rects);
5636
5674
  }
5637
5675
  update(rects) {
@@ -5661,7 +5699,7 @@ var PaintStrokeSession = (_class11 = class {
5661
5699
  for (const [key2, { tx, ty, r }] of regions2) {
5662
5700
  if (this.deep) {
5663
5701
  const rt = this.retouch;
5664
- const paint = _optionalChain([rt, 'optionalAccess', _129 => _129.kind]) === "coverage" ? rt.paint() : null;
5702
+ const paint = _optionalChain([rt, 'optionalAccess', _133 => _133.kind]) === "coverage" ? rt.paint() : null;
5665
5703
  if (paint && paint.kind !== "tone") {
5666
5704
  const prevWork = this.touched.has(key2) ? this.work.get(key2) : void 0;
5667
5705
  this.touched.add(key2);
@@ -5672,13 +5710,13 @@ var PaintStrokeSession = (_class11 = class {
5672
5710
  const prev2 = this.touched.has(key2) ? this.liveDeep.get(key2) : void 0;
5673
5711
  this.touched.add(key2);
5674
5712
  const opts = prev2 ? { into: prev2, region: r, channels: ch } : { channels: ch };
5675
- const d = _optionalChain([rt, 'optionalAccess', _130 => _130.kind]) === "coverage" && _optionalChain([paint, 'optionalAccess', _131 => _131.kind]) === "tone" ? _chunkYF3YZZ6Gcjs.applyToneToDeepTile.call(void 0, stroke.coverage, src2, tx, ty, paint.tone, rt.apply, opts) : _chunkPQ3H2AANcjs.applyStrokeToDeepTile.call(void 0, stroke.coverage, src2, tx, ty, this.apply, opts);
5713
+ const d = _optionalChain([rt, 'optionalAccess', _134 => _134.kind]) === "coverage" && _optionalChain([paint, 'optionalAccess', _135 => _135.kind]) === "tone" ? _chunk2ONK3ERDcjs.applyToneToDeepTile.call(void 0, stroke.coverage, src2, tx, ty, paint.tone, rt.apply, opts) : _chunkPQ3H2AANcjs.applyStrokeToDeepTile.call(void 0, stroke.coverage, src2, tx, ty, this.apply, opts);
5676
5714
  this.liveDeep.set(key2, d);
5677
5715
  this.live.set(key2, { data: _chunkOLNIPTB3cjs.proxyOf.call(void 0, d, ch), uniform: null, deep: d });
5678
5716
  continue;
5679
5717
  }
5680
- const src = _nullishCoalesce(_optionalChain([this, 'access', _132 => _132.base, 'access', _133 => _133.tiles, 'access', _134 => _134.get, 'call', _135 => _135(key2), 'optionalAccess', _136 => _136.data]), () => ( defaultTile(this.base)));
5681
- const prev = this.touched.has(key2) ? _optionalChain([this, 'access', _137 => _137.live, 'access', _138 => _138.get, 'call', _139 => _139(key2), 'optionalAccess', _140 => _140.data]) : void 0;
5718
+ const src = _nullishCoalesce(_optionalChain([this, 'access', _136 => _136.base, 'access', _137 => _137.tiles, 'access', _138 => _138.get, 'call', _139 => _139(key2), 'optionalAccess', _140 => _140.data]), () => ( defaultTile(this.base)));
5719
+ const prev = this.touched.has(key2) ? _optionalChain([this, 'access', _141 => _141.live, 'access', _142 => _142.get, 'call', _143 => _143(key2), 'optionalAccess', _144 => _144.data]) : void 0;
5682
5720
  this.touched.add(key2);
5683
5721
  const data = this.compositeTile(src, tx, ty, prev ? { into: prev, region: r } : {});
5684
5722
  this.live.set(key2, { data, uniform: null });
@@ -5690,12 +5728,12 @@ var PaintStrokeSession = (_class11 = class {
5690
5728
  if (this.closed) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("This stroke has already ended.");
5691
5729
  const last = _nullishCoalesce(this.last, () => ( void 0));
5692
5730
  const rects = this.mixer ? this.mixer.finish(last) : this.stroke.finish(last);
5693
- _optionalChain([this, 'access', _141 => _141.flushView, 'optionalCall', _142 => _142()]);
5731
+ _optionalChain([this, 'access', _145 => _145.flushView, 'optionalCall', _146 => _146()]);
5694
5732
  this.update(rects);
5695
5733
  this.closed = true;
5696
5734
  const ch = this.base.channels;
5697
5735
  const r = this.retouch;
5698
- if (_optionalChain([r, 'optionalAccess', _143 => _143.kind]) === "coverage" && r.finalPaint) {
5736
+ if (_optionalChain([r, 'optionalAccess', _147 => _147.kind]) === "coverage" && r.finalPaint) {
5699
5737
  const final = r.finalPaint(this.stroke.coverage);
5700
5738
  if (final) {
5701
5739
  for (const key2 of this.touched) {
@@ -5704,7 +5742,7 @@ var PaintStrokeSession = (_class11 = class {
5704
5742
  this.retouchDeepTile(key2, tx, ty, final, {});
5705
5743
  continue;
5706
5744
  }
5707
- const src = _nullishCoalesce(_optionalChain([this, 'access', _144 => _144.base, 'access', _145 => _145.tiles, 'access', _146 => _146.get, 'call', _147 => _147(key2), 'optionalAccess', _148 => _148.data]), () => ( defaultTile(this.base)));
5745
+ const src = _nullishCoalesce(_optionalChain([this, 'access', _148 => _148.base, 'access', _149 => _149.tiles, 'access', _150 => _150.get, 'call', _151 => _151(key2), 'optionalAccess', _152 => _152.data]), () => ( defaultTile(this.base)));
5708
5746
  this.live.set(key2, { data: this.compositeTile(src, tx, ty, {}, final), uniform: null });
5709
5747
  }
5710
5748
  }
@@ -5726,7 +5764,7 @@ var PaintStrokeSession = (_class11 = class {
5726
5764
  const b = this.mixer ? this.mixer.bounds : this.stroke.coverage.bounds;
5727
5765
  const result = { layerId: this.target.id, channel: this.target.channel, bounds: changed ? b : null, dabs: (_nullishCoalesce(this.mixer, () => ( this.stroke))).dabCount };
5728
5766
  if (mixerLoad) result.mixerLoad = mixerLoad;
5729
- if (_optionalChain([r, 'optionalAccess', _149 => _149.result])) Object.assign(result, r.result());
5767
+ if (_optionalChain([r, 'optionalAccess', _153 => _153.result])) Object.assign(result, r.result());
5730
5768
  return result;
5731
5769
  }
5732
5770
  /** Abandons the stroke and restores the layer. */
@@ -5852,14 +5890,14 @@ function migrateSerializedImageEditorState(data) {
5852
5890
  const legacy = data;
5853
5891
  const adjustments = normalizeStoredAdjustments(legacy.adjustments);
5854
5892
  return {
5855
- version: _optionalChain([adjustments, 'access', _150 => _150.layers, 'optionalAccess', _151 => _151.length]) ? 2 : 1,
5893
+ version: _optionalChain([adjustments, 'access', _154 => _154.layers, 'optionalAccess', _155 => _155.length]) ? 2 : 1,
5856
5894
  crop: legacy.crop ? { ...legacy.crop } : null,
5857
5895
  transform: { ...DEFAULT_TRANSFORM, ...legacy.transform },
5858
5896
  adjustments: serializeAdjustments(adjustments),
5859
5897
  depthMask: {
5860
5898
  ...DEFAULT_DEPTH_MASK,
5861
5899
  ...legacy.depthMask,
5862
- depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _152 => _152.depthMask, 'optionalAccess', _153 => _153.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
5900
+ depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _156 => _156.depthMask, 'optionalAccess', _157 => _157.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
5863
5901
  },
5864
5902
  annotations: JSON.parse(JSON.stringify(_nullishCoalesce(legacy.annotations, () => ( [])))),
5865
5903
  ...legacy.selection ? { selection: { ...legacy.selection } } : {}
@@ -5924,7 +5962,7 @@ var ImageEditorController = (_class12 = class {
5924
5962
  this.effectsEngine.subscribe(() => this.queueEffectRefresh("incomplete"));
5925
5963
  if (options.effects) this.effects.set(options.effects);
5926
5964
  if (options.segmentation) this.segmentation = options.segmentation;
5927
- if (options.selectionWorker) this.selectionWorker = new (0, _chunkUC3PWFM3cjs.SelectionWorkerClient)(options.selectionWorker);
5965
+ if (options.selectionWorker) this.selectionWorker = new (0, _chunkKALCIDWHcjs.SelectionWorkerClient)(options.selectionWorker);
5928
5966
  if (options.openDocument) this.documentOpener = options.openDocument;
5929
5967
  this.maxHistoryDepth = _nullishCoalesce(options.maxHistoryDepth, () => ( 50));
5930
5968
  if (options.textShaper !== void 0) this.textShaperValue = options.textShaper;
@@ -5939,7 +5977,7 @@ var ImageEditorController = (_class12 = class {
5939
5977
  sourceIsOpaque: () => this.sourceIsOpaque(),
5940
5978
  version: () => `${this.sourceVersion()}:${this.patternsVersion()}`,
5941
5979
  globalLight: () => this.state.globalLight,
5942
- pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _154 => _154.state, 'access', _155 => _155.patterns, 'optionalAccess', _156 => _156.find, 'call', _157 => _157((p) => p.id === id)]), () => ( null))
5980
+ pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _158 => _158.state, 'access', _159 => _159.patterns, 'optionalAccess', _160 => _160.find, 'call', _161 => _161((p) => p.id === id)]), () => ( null))
5943
5981
  };
5944
5982
  this.state = {
5945
5983
  sourceUrl: typeof options.image === "string" ? options.image : null,
@@ -5960,7 +5998,7 @@ var ImageEditorController = (_class12 = class {
5960
5998
  activeLayerId: null,
5961
5999
  activeTarget: "pixels",
5962
6000
  outputOpacity: 1,
5963
- paint: { brush: { ..._chunkPQ3H2AANcjs.DEFAULT_BRUSH }, foreground: "#000000", background: "#ffffff", paint: { type: "color", color: "#000000" }, mixer: { ..._chunkPQ3H2AANcjs.DEFAULT_MIXER }, mixerLoad: _chunkPQ3H2AANcjs.EMPTY_MIXER_LOAD, retouch: { ..._chunkYF3YZZ6Gcjs.DEFAULT_RETOUCH }, cloneSource: null, cloneTransform: { ..._chunkYF3YZZ6Gcjs.IDENTITY_CLONE_TRANSFORM } },
6001
+ paint: { brush: { ..._chunkPQ3H2AANcjs.DEFAULT_BRUSH }, foreground: "#000000", background: "#ffffff", paint: { type: "color", color: "#000000" }, mixer: { ..._chunkPQ3H2AANcjs.DEFAULT_MIXER }, mixerLoad: _chunkPQ3H2AANcjs.EMPTY_MIXER_LOAD, retouch: { ..._chunk2ONK3ERDcjs.DEFAULT_RETOUCH }, cloneSource: null, cloneTransform: { ..._chunk2ONK3ERDcjs.IDENTITY_CLONE_TRANSFORM } },
5964
6002
  fit: _nullishCoalesce(options.fit, () => ( "margin"))
5965
6003
  };
5966
6004
  if (options.image instanceof Object && "width" in options.image) {
@@ -5972,13 +6010,13 @@ var ImageEditorController = (_class12 = class {
5972
6010
  };
5973
6011
  }
5974
6012
  this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
5975
- if (_optionalChain([options, 'access', _158 => _158.initialState, 'optionalAccess', _159 => _159.selection])) {
6013
+ if (_optionalChain([options, 'access', _162 => _162.initialState, 'optionalAccess', _163 => _163.selection])) {
5976
6014
  try {
5977
6015
  this.state.selection = normalizeSelection(_chunkSS53NNZOcjs.deserializeSelection.call(void 0, options.initialState.selection));
5978
6016
  } catch (e23) {
5979
6017
  }
5980
6018
  }
5981
- if (_optionalChain([options, 'access', _160 => _160.initialState, 'optionalAccess', _161 => _161.channels])) {
6019
+ if (_optionalChain([options, 'access', _164 => _164.initialState, 'optionalAccess', _165 => _165.channels])) {
5982
6020
  const channels = deserializeChannels(options.initialState.channels, this.naturalSize, this.lastLoadProblems);
5983
6021
  if (channels.length) this.state.channels = channels;
5984
6022
  }
@@ -6003,6 +6041,10 @@ var ImageEditorController = (_class12 = class {
6003
6041
  this.state.imageDimensions = source.dimensions;
6004
6042
  if (!this.samplePixelsOverride) this.samplePixels = null;
6005
6043
  if (prev.width !== source.dimensions.width || prev.height !== source.dimensions.height) {
6044
+ const c = this.state.crop;
6045
+ if (c && c.x === 0 && c.y === 0 && c.width === prev.width && c.height === prev.height) {
6046
+ this.state.crop = { x: 0, y: 0, width: source.dimensions.width, height: source.dimensions.height };
6047
+ }
6006
6048
  this.state.layers = resizeLegacyMasks(this.state.layers, prev, source.dimensions);
6007
6049
  }
6008
6050
  this.dropMismatchedSelection();
@@ -6062,7 +6104,7 @@ var ImageEditorController = (_class12 = class {
6062
6104
  this.syncViews();
6063
6105
  this.syncDisplay();
6064
6106
  const currentState = { ...this.state };
6065
- _optionalChain([this, 'access', _162 => _162.onStateChange, 'optionalCall', _163 => _163(currentState)]);
6107
+ _optionalChain([this, 'access', _166 => _166.onStateChange, 'optionalCall', _167 => _167(currentState)]);
6066
6108
  this.listeners.forEach((l) => l(currentState));
6067
6109
  if (this.effects.provider) this.queueEffectRefresh("incomplete");
6068
6110
  }
@@ -6091,7 +6133,7 @@ var ImageEditorController = (_class12 = class {
6091
6133
  if (l.type === "group") {
6092
6134
  const children = walk(l.children);
6093
6135
  if (children !== l.children) next2 = { ...l, children };
6094
- } else if (l.type === "smart" && _optionalChain([l, 'access', _164 => _164.smartFilters, 'optionalAccess', _165 => _165.filters, 'access', _166 => _166.some, 'call', _167 => _167((f) => f.kind === "effect")]) && (all || _chunkS55JFWDAcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
6136
+ } else if (l.type === "smart" && _optionalChain([l, 'access', _168 => _168.smartFilters, 'optionalAccess', _169 => _169.filters, 'access', _170 => _170.some, 'call', _171 => _171((f) => f.kind === "effect")]) && (all || _chunkS55JFWDAcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
6095
6137
  try {
6096
6138
  const r = _chunkS55JFWDAcjs.rerender.call(void 0, l, canvas);
6097
6139
  if (all || !_chunkS55JFWDAcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
@@ -6120,8 +6162,8 @@ var ImageEditorController = (_class12 = class {
6120
6162
  * A worker that is cancelled or fails is replaced by a fresh one on the next job.
6121
6163
  */
6122
6164
  setSelectionWorker(factory) {
6123
- _optionalChain([this, 'access', _168 => _168.selectionWorker, 'optionalAccess', _169 => _169.terminate, 'call', _170 => _170()]);
6124
- this.selectionWorker = factory ? new (0, _chunkUC3PWFM3cjs.SelectionWorkerClient)(factory) : null;
6165
+ _optionalChain([this, 'access', _172 => _172.selectionWorker, 'optionalAccess', _173 => _173.terminate, 'call', _174 => _174()]);
6166
+ this.selectionWorker = factory ? new (0, _chunkKALCIDWHcjs.SelectionWorkerClient)(factory) : null;
6125
6167
  }
6126
6168
  /** Sets (or with `null` removes) how new documents are opened (see `DocumentOpener`). Not an edit. */
6127
6169
  setDocumentOpener(opener) {
@@ -6146,7 +6188,7 @@ var ImageEditorController = (_class12 = class {
6146
6188
  const layer = _chunkS55JFWDAcjs.requireLayer.call(void 0, this.state.layers, id).layer;
6147
6189
  if (layer.type !== "pixel") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`A new document needs a pixel layer; "${id}" is a ${layer.type} layer.`);
6148
6190
  const sel = _nullishCoalesce(options.selection, () => ( this.state.selection));
6149
- if (!_optionalChain([sel, 'optionalAccess', _171 => _171.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select what goes in the new document first.");
6191
+ if (!_optionalChain([sel, 'optionalAccess', _175 => _175.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select what goes in the new document first.");
6150
6192
  const { width, height } = this.naturalSize;
6151
6193
  const surface = this.surfaceOf(layer);
6152
6194
  let copy;
@@ -6197,10 +6239,10 @@ var ImageEditorController = (_class12 = class {
6197
6239
  * `onProgress` hears its stages. The document is not changed.
6198
6240
  */
6199
6241
  async runSelectionJob(job, pixels, options = {}) {
6200
- _optionalChain([options, 'access', _172 => _172.signal, 'optionalAccess', _173 => _173.throwIfAborted, 'call', _174 => _174()]);
6242
+ _optionalChain([options, 'access', _176 => _176.signal, 'optionalAccess', _177 => _177.throwIfAborted, 'call', _178 => _178()]);
6201
6243
  if (this.selectionWorker) return this.selectionWorker.run(job, pixels, options);
6202
- const result = _chunkUC3PWFM3cjs.runSelectionJob.call(void 0, job, pixels, options.onProgress);
6203
- _optionalChain([options, 'access', _175 => _175.signal, 'optionalAccess', _176 => _176.throwIfAborted, 'call', _177 => _177()]);
6244
+ const result = _chunkKALCIDWHcjs.runSelectionJob.call(void 0, job, pixels, options.onProgress);
6245
+ _optionalChain([options, 'access', _179 => _179.signal, 'optionalAccess', _180 => _180.throwIfAborted, 'call', _181 => _181()]);
6204
6246
  return result;
6205
6247
  }
6206
6248
  /** Registers (or with `null` removes) the segmentation provider. Not an edit: no undo step. */
@@ -6275,8 +6317,8 @@ var ImageEditorController = (_class12 = class {
6275
6317
  */
6276
6318
  async updateEffectFilter(layerId, filterId, changes, commitToHistory = true) {
6277
6319
  const layer = _chunkS55JFWDAcjs.requireSmartObject.call(void 0, this.state.layers, layerId);
6278
- const was = _optionalChain([layer, 'access', _178 => _178.smartFilters, 'optionalAccess', _179 => _179.filters, 'access', _180 => _180.find, 'call', _181 => _181((f) => f.id === filterId)]);
6279
- if (!was || was.kind !== "effect") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access', _182 => _182.smartFilters, 'optionalAccess', _183 => _183.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
6320
+ const was = _optionalChain([layer, 'access', _182 => _182.smartFilters, 'optionalAccess', _183 => _183.filters, 'access', _184 => _184.find, 'call', _185 => _185((f) => f.id === filterId)]);
6321
+ if (!was || was.kind !== "effect") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access', _186 => _186.smartFilters, 'optionalAccess', _187 => _187.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
6280
6322
  const update = {};
6281
6323
  if (changes.values) {
6282
6324
  const d = await this.describeEffect(was.effect);
@@ -6318,7 +6360,7 @@ var ImageEditorController = (_class12 = class {
6318
6360
  const layer = {
6319
6361
  type: "pixel",
6320
6362
  id,
6321
- name: _optionalChain([options, 'access', _184 => _184.name, 'optionalAccess', _185 => _185.trim, 'call', _186 => _186()]) || d.name,
6363
+ name: _optionalChain([options, 'access', _188 => _188.name, 'optionalAccess', _189 => _189.trim, 'call', _190 => _190()]) || d.name,
6322
6364
  visible: true,
6323
6365
  opacity: _nullishCoalesce(options.opacity, () => ( 1)),
6324
6366
  blend: _nullishCoalesce(blend, () => ( "normal")),
@@ -6343,7 +6385,7 @@ var ImageEditorController = (_class12 = class {
6343
6385
  */
6344
6386
  async updateEffectLayer(layerId, changes, commitToHistory = true) {
6345
6387
  const found = _chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, layerId);
6346
- const layer = _optionalChain([found, 'optionalAccess', _187 => _187.layer]);
6388
+ const layer = _optionalChain([found, 'optionalAccess', _191 => _191.layer]);
6347
6389
  if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
6348
6390
  _chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
6349
6391
  const g = layer.generator;
@@ -6372,7 +6414,7 @@ var ImageEditorController = (_class12 = class {
6372
6414
  * and how long it runs, the longest of theirs (ms). Null when none animates.
6373
6415
  */
6374
6416
  getAnimation() {
6375
- const layers = _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access', _188 => _188.generator, 'optionalAccess', _189 => _189.animate]));
6417
+ const layers = _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access', _192 => _192.generator, 'optionalAccess', _193 => _193.animate]));
6376
6418
  if (!layers.length) return null;
6377
6419
  return { duration: Math.max(...layers.map((l) => l.generator.animate.duration)), layerIds: layers.map((l) => l.id) };
6378
6420
  }
@@ -6389,7 +6431,7 @@ var ImageEditorController = (_class12 = class {
6389
6431
  const { width, height } = this.naturalSize;
6390
6432
  const surfaces = /* @__PURE__ */ new Map();
6391
6433
  for (const l of _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers)) {
6392
- if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access', _190 => _190.generator, 'optionalAccess', _191 => _191.animate])) continue;
6434
+ if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access', _194 => _194.generator, 'optionalAccess', _195 => _195.animate])) continue;
6393
6435
  const g = l.generator;
6394
6436
  const pixels = await this.effectsEngine.renderLayer(g.effect, g.values, { width, height, depth: this.bitDepth, time: (_nullishCoalesce(g.time, () => ( 0))) + time });
6395
6437
  surfaces.set(l.id, effectPixelsToSurface(pixels, this.bitDepth));
@@ -6450,8 +6492,8 @@ var ImageEditorController = (_class12 = class {
6450
6492
  transform: { ...s.transform },
6451
6493
  outputOpacity: s.outputOpacity,
6452
6494
  selection: _nullishCoalesce(s.selection, () => ( null)),
6453
- ..._optionalChain([s, 'access', _192 => _192.channels, 'optionalAccess', _193 => _193.length]) ? { channels: s.channels } : {},
6454
- ..._optionalChain([s, 'access', _194 => _194.paths, 'optionalAccess', _195 => _195.length]) ? { paths: s.paths } : {},
6495
+ ..._optionalChain([s, 'access', _196 => _196.channels, 'optionalAccess', _197 => _197.length]) ? { channels: s.channels } : {},
6496
+ ..._optionalChain([s, 'access', _198 => _198.paths, 'optionalAccess', _199 => _199.length]) ? { paths: s.paths } : {},
6455
6497
  source: {
6456
6498
  sourceUrl: s.sourceUrl,
6457
6499
  element: this.imageElement,
@@ -6487,11 +6529,11 @@ var ImageEditorController = (_class12 = class {
6487
6529
  if (entry.colorMode) s.colorMode = entry.colorMode;
6488
6530
  else delete s.colorMode;
6489
6531
  s.selection = entry.selection;
6490
- if (_optionalChain([entry, 'access', _196 => _196.channels, 'optionalAccess', _197 => _197.length])) s.channels = entry.channels;
6532
+ if (_optionalChain([entry, 'access', _200 => _200.channels, 'optionalAccess', _201 => _201.length])) s.channels = entry.channels;
6491
6533
  else delete s.channels;
6492
- if (_optionalChain([entry, 'access', _198 => _198.paths, 'optionalAccess', _199 => _199.length])) s.paths = entry.paths;
6534
+ if (_optionalChain([entry, 'access', _202 => _202.paths, 'optionalAccess', _203 => _203.length])) s.paths = entry.paths;
6493
6535
  else delete s.paths;
6494
- if (s.activePathId && !_optionalChain([s, 'access', _200 => _200.paths, 'optionalAccess', _201 => _201.some, 'call', _202 => _202((p) => p.id === s.activePathId)])) s.activePathId = null;
6536
+ if (s.activePathId && !_optionalChain([s, 'access', _204 => _204.paths, 'optionalAccess', _205 => _205.some, 'call', _206 => _206((p) => p.id === s.activePathId)])) s.activePathId = null;
6495
6537
  if (this.imageElement !== entry.source.element && !this.samplePixelsOverride) this.samplePixels = null;
6496
6538
  this.imageElement = entry.source.element;
6497
6539
  s.sourceUrl = entry.source.sourceUrl;
@@ -6697,7 +6739,7 @@ var ImageEditorController = (_class12 = class {
6697
6739
  return this.state.layers;
6698
6740
  }
6699
6741
  getLayer(id) {
6700
- return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _203 => _203.layer]);
6742
+ return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _207 => _207.layer]);
6701
6743
  }
6702
6744
  /** The active layer, or `undefined`. */
6703
6745
  getActiveLayer() {
@@ -6710,7 +6752,7 @@ var ImageEditorController = (_class12 = class {
6710
6752
  setActiveLayer(id, target = "pixels") {
6711
6753
  if (id !== null && !this.getLayer(id)) return false;
6712
6754
  const layer = id ? this.getLayer(id) : void 0;
6713
- const t = target === "mask" && _optionalChain([layer, 'optionalAccess', _204 => _204.mask]) ? "mask" : target === "filter-mask" && _optionalChain([layer, 'optionalAccess', _205 => _205.type]) === "smart" && _optionalChain([layer, 'access', _206 => _206.smartFilters, 'optionalAccess', _207 => _207.mask]) ? "filter-mask" : "pixels";
6755
+ const t = target === "mask" && _optionalChain([layer, 'optionalAccess', _208 => _208.mask]) ? "mask" : target === "filter-mask" && _optionalChain([layer, 'optionalAccess', _209 => _209.type]) === "smart" && _optionalChain([layer, 'access', _210 => _210.smartFilters, 'optionalAccess', _211 => _211.mask]) ? "filter-mask" : "pixels";
6714
6756
  if (this.state.activeLayerId === id && this.state.activeTarget === t) return true;
6715
6757
  this.state.activeLayerId = id;
6716
6758
  this.state.activeTarget = t;
@@ -6872,7 +6914,7 @@ var ImageEditorController = (_class12 = class {
6872
6914
  surfaceOf: (l) => this.surfaceOf(l),
6873
6915
  version: `${this.sourceVersion()}:${this.patternsVersion()}`,
6874
6916
  globalLight: this.state.globalLight,
6875
- pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _208 => _208.state, 'access', _209 => _209.patterns, 'optionalAccess', _210 => _210.find, 'call', _211 => _211((p) => p.id === id)]), () => ( null))
6917
+ pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _212 => _212.state, 'access', _213 => _213.patterns, 'optionalAccess', _214 => _214.find, 'call', _215 => _215((p) => p.id === id)]), () => ( null))
6876
6918
  };
6877
6919
  }
6878
6920
  __init94() {this.sourceIds = /* @__PURE__ */ new WeakMap()}
@@ -6949,7 +6991,7 @@ var ImageEditorController = (_class12 = class {
6949
6991
  if (!ctx || typeof ctx.getImageData !== "function") return null;
6950
6992
  ctx.drawImage(el, 0, 0, width, height);
6951
6993
  const data = ctx.getImageData(0, 0, width, height);
6952
- if (!_optionalChain([data, 'optionalAccess', _212 => _212.data]) || data.data.length < width * height * 4) return null;
6994
+ if (!_optionalChain([data, 'optionalAccess', _216 => _216.data]) || data.data.length < width * height * 4) return null;
6953
6995
  return { width, height, data: data.data };
6954
6996
  } catch (e27) {
6955
6997
  return null;
@@ -6962,7 +7004,7 @@ var ImageEditorController = (_class12 = class {
6962
7004
  const prev = this.state.layers;
6963
7005
  const depth = this.bitDepth;
6964
7006
  this.state.layers = next;
6965
- _optionalChain([extra, 'optionalCall', _213 => _213()]);
7007
+ _optionalChain([extra, 'optionalCall', _217 => _217()]);
6966
7008
  if (depth !== 8 && this.bitDepth === depth) this.state.layers = keepDeepLayers(prev, this.state.layers);
6967
7009
  if (this.state.activeLayerId && !_chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, this.state.activeLayerId)) {
6968
7010
  this.state.activeLayerId = _chunkS55JFWDAcjs.activeLayerAfterRemoval.call(void 0, prev, this.state.layers, this.state.activeLayerId);
@@ -7000,7 +7042,7 @@ var ImageEditorController = (_class12 = class {
7000
7042
  const layer = {
7001
7043
  type: "pixel",
7002
7044
  id: init.id && !ids.has(init.id) ? init.id : _chunkS55JFWDAcjs.newLayerId.call(void 0, ),
7003
- name: _optionalChain([init, 'access', _214 => _214.name, 'optionalAccess', _215 => _215.trim, 'call', _216 => _216()]) || this.nextLayerName(),
7045
+ name: _optionalChain([init, 'access', _218 => _218.name, 'optionalAccess', _219 => _219.trim, 'call', _220 => _220()]) || this.nextLayerName(),
7004
7046
  visible: _nullishCoalesce(init.visible, () => ( true)),
7005
7047
  opacity: _nullishCoalesce(init.opacity, () => ( 1)),
7006
7048
  blend: _nullishCoalesce(blend, () => ( "normal")),
@@ -7027,7 +7069,7 @@ var ImageEditorController = (_class12 = class {
7027
7069
  async decodeImage(image) {
7028
7070
  const trimmed = image.trim();
7029
7071
  let png = null;
7030
- if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkOLNIPTB3cjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _217 => _217.bytes]), () => ( null));
7072
+ if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkOLNIPTB3cjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _221 => _221.bytes]), () => ( null));
7031
7073
  else if (/^[A-Za-z0-9+/=\s]+$/.test(trimmed) && trimmed.length > 16) {
7032
7074
  try {
7033
7075
  const bytes = _chunkOLNIPTB3cjs.base64ToBytes.call(void 0, trimmed);
@@ -7076,7 +7118,7 @@ var ImageEditorController = (_class12 = class {
7076
7118
  removeLayer(id) {
7077
7119
  const next = _chunkS55JFWDAcjs.removeLayer.call(void 0, this.state.layers, id);
7078
7120
  this.commitLayers(next, () => {
7079
- if (this.state.selectedAnnotationId && !_chunkB46UQUDCcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkS55JFWDAcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _218 => _218.id]) === this.state.selectedAnnotationId)) {
7121
+ if (this.state.selectedAnnotationId && !_chunkB46UQUDCcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkS55JFWDAcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _222 => _222.id]) === this.state.selectedAnnotationId)) {
7080
7122
  this.state.selectedAnnotationId = null;
7081
7123
  }
7082
7124
  });
@@ -7085,9 +7127,9 @@ var ImageEditorController = (_class12 = class {
7085
7127
  moveLayer(id, placement) {
7086
7128
  const next = _chunkS55JFWDAcjs.moveLayer.call(void 0, this.state.layers, id, placement);
7087
7129
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, next, id);
7088
- if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _219 => _219.parent, 'optionalAccess', _220 => _220.id]), () => ( null)), index: loc.index };
7130
+ if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _223 => _223.parent, 'optionalAccess', _224 => _224.id]), () => ( null)), index: loc.index };
7089
7131
  this.commitLayers(next);
7090
- return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _221 => _221.parent, 'optionalAccess', _222 => _222.id]), () => ( null)), index: loc.index };
7132
+ return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _225 => _225.parent, 'optionalAccess', _226 => _226.id]), () => ( null)), index: loc.index };
7091
7133
  }
7092
7134
  /** A layer's edge colour as percentages (see `setEdgeColor`). */
7093
7135
  getEdgeColor(id) {
@@ -7183,7 +7225,7 @@ var ImageEditorController = (_class12 = class {
7183
7225
  const group = {
7184
7226
  type: "group",
7185
7227
  id: _chunkS55JFWDAcjs.newLayerId.call(void 0, "group"),
7186
- name: _optionalChain([init, 'access', _223 => _223.name, 'optionalAccess', _224 => _224.trim, 'call', _225 => _225()]) || "Group",
7228
+ name: _optionalChain([init, 'access', _227 => _227.name, 'optionalAccess', _228 => _228.trim, 'call', _229 => _229()]) || "Group",
7187
7229
  visible: true,
7188
7230
  opacity: 1,
7189
7231
  blend,
@@ -7276,7 +7318,7 @@ var ImageEditorController = (_class12 = class {
7276
7318
  sel = this.layerTransparency(id);
7277
7319
  } else {
7278
7320
  const current = this.state.selection;
7279
- if (!_optionalChain([current, 'optionalAccess', _226 => _226.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all / transparency.");
7321
+ if (!_optionalChain([current, 'optionalAccess', _230 => _230.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all / transparency.");
7280
7322
  sel = from === "hide-selection" ? _chunkSS53NNZOcjs.invertSelection.call(void 0, current) : current;
7281
7323
  }
7282
7324
  mask = this.maskFromSelection(sel, props);
@@ -7307,7 +7349,7 @@ var ImageEditorController = (_class12 = class {
7307
7349
  const layer = _chunkS55JFWDAcjs.requireLayer.call(void 0, this.state.layers, id).layer;
7308
7350
  const name = layer.name || id;
7309
7351
  if (layer.type === "shape") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" is a shape layer, whose path already is its vector mask; change it with set_shape_component, or rasterize the layer first.`);
7310
- if (_optionalChain([layer, 'access', _227 => _227.mask, 'optionalAccess', _228 => _228.source])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which cannot be combined with a vector mask; remove the depth mask first.`);
7352
+ if (_optionalChain([layer, 'access', _231 => _231.mask, 'optionalAccess', _232 => _232.source])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which cannot be combined with a vector mask; remove the depth mask first.`);
7311
7353
  return layer;
7312
7354
  }
7313
7355
  requireVectorMask(id) {
@@ -7317,10 +7359,10 @@ var ImageEditorController = (_class12 = class {
7317
7359
  }
7318
7360
  /** Components from a path spec: `components`, or one `shape` / `subpaths`. */
7319
7361
  vectorMaskComponents(path) {
7320
- if (_optionalChain([path, 'access', _229 => _229.components, 'optionalAccess', _230 => _230.length]) && (path.shape !== void 0 || path.subpaths !== void 0)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
7362
+ if (_optionalChain([path, 'access', _233 => _233.components, 'optionalAccess', _234 => _234.length]) && (path.shape !== void 0 || path.subpaths !== void 0)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
7321
7363
  if (path.fillRule !== void 0 && path.fillRule !== "nonzero" && path.fillRule !== "evenodd") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7322
- const specs = _optionalChain([path, 'access', _231 => _231.components, 'optionalAccess', _232 => _232.length]) ? path.components : [path];
7323
- return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access', _233 => _233.components, 'optionalAccess', _234 => _234.length]) ? `components[${i}].` : ""));
7364
+ const specs = _optionalChain([path, 'access', _235 => _235.components, 'optionalAccess', _236 => _236.length]) ? path.components : [path];
7365
+ return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access', _237 => _237.components, 'optionalAccess', _238 => _238.length]) ? `components[${i}].` : ""));
7324
7366
  }
7325
7367
  /**
7326
7368
  * Layer › Vector Mask: `reveal-all` (an empty path showing everything), `hide-all` (an empty path
@@ -7337,7 +7379,7 @@ var ImageEditorController = (_class12 = class {
7337
7379
  vm = { components: this.vectorMaskComponents(path) };
7338
7380
  if (path.fillRule === "evenodd") vm.fillRule = "evenodd";
7339
7381
  } else if (from === "reveal-all" || from === "hide-all") {
7340
- if (_optionalChain([path, 'access', _235 => _235.components, 'optionalAccess', _236 => _236.length]) || path.shape !== void 0 || path.subpaths !== void 0) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`A ${from} vector mask starts empty; use from path to give a path.`);
7382
+ if (_optionalChain([path, 'access', _239 => _239.components, 'optionalAccess', _240 => _240.length]) || path.shape !== void 0 || path.subpaths !== void 0) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`A ${from} vector mask starts empty; use from path to give a path.`);
7341
7383
  vm = { components: [], ...from === "reveal-all" ? { inverted: true } : {} };
7342
7384
  } else {
7343
7385
  throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Unknown vector mask source "${String(from)}". Use reveal-all, hide-all, path or selection.`);
@@ -7348,7 +7390,7 @@ var ImageEditorController = (_class12 = class {
7348
7390
  /** The selection's outline as subpaths; throws when nothing is selected or nothing is left to trace. */
7349
7391
  traceSelection(options) {
7350
7392
  const sel = this.state.selection;
7351
- if (!_optionalChain([sel, 'optionalAccess', _237 => _237.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, then make a path from the selection.");
7393
+ if (!_optionalChain([sel, 'optionalAccess', _241 => _241.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, then make a path from the selection.");
7352
7394
  if (options.tolerance !== void 0 && !(options.tolerance >= 0.1 && options.tolerance <= 10)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("tolerance must be from 0.1 to 10 px.");
7353
7395
  const subpaths = selectionToSubpaths(sel, options);
7354
7396
  if (!subpaths.length) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("The selection is too small or too faint to trace (below minArea, or under half selected); lower minArea or threshold.");
@@ -7388,7 +7430,7 @@ var ImageEditorController = (_class12 = class {
7388
7430
  return _nullishCoalesce(this.state.paths, () => ( []));
7389
7431
  }
7390
7432
  getPath(id) {
7391
- return _nullishCoalesce(_optionalChain([this, 'access', _238 => _238.state, 'access', _239 => _239.paths, 'optionalAccess', _240 => _240.find, 'call', _241 => _241((p) => p.id === id)]), () => ( null));
7433
+ return _nullishCoalesce(_optionalChain([this, 'access', _242 => _242.state, 'access', _243 => _243.paths, 'optionalAccess', _244 => _244.find, 'call', _245 => _245((p) => p.id === id)]), () => ( null));
7392
7434
  }
7393
7435
  requirePath(id) {
7394
7436
  const path = this.getPath(id);
@@ -7421,14 +7463,14 @@ var ImageEditorController = (_class12 = class {
7421
7463
  const subpaths = this.traceSelection(options);
7422
7464
  const paths = this.getPaths();
7423
7465
  const old = paths.find((p) => p.work);
7424
- const work = { id: _nullishCoalesce(_optionalChain([old, 'optionalAccess', _242 => _242.id]), () => ( newPathId())), name: WORK_PATH_NAME, components: [{ op: "combine", subpaths }], fillRule: "evenodd", work: true };
7466
+ const work = { id: _nullishCoalesce(_optionalChain([old, 'optionalAccess', _246 => _246.id]), () => ( newPathId())), name: WORK_PATH_NAME, components: [{ op: "combine", subpaths }], fillRule: "evenodd", work: true };
7425
7467
  this.commitPaths(old ? paths.map((p) => p === old ? work : p) : [...paths, work], work.id);
7426
7468
  return work;
7427
7469
  }
7428
7470
  /** A new saved path from geometry (`shape`, `subpaths` or `components`). One undo step. */
7429
7471
  addPath(input) {
7430
7472
  const paths = this.getPaths();
7431
- const path = { id: newPathId(), name: _optionalChain([input, 'access', _243 => _243.name, 'optionalAccess', _244 => _244.trim, 'call', _245 => _245()]) || `Path ${paths.filter((p) => !p.work).length + 1}`, components: this.vectorMaskComponents(input) };
7473
+ const path = { id: newPathId(), name: _optionalChain([input, 'access', _247 => _247.name, 'optionalAccess', _248 => _248.trim, 'call', _249 => _249()]) || `Path ${paths.filter((p) => !p.work).length + 1}`, components: this.vectorMaskComponents(input) };
7432
7474
  if (input.fillRule === "evenodd") path.fillRule = "evenodd";
7433
7475
  this.commitPaths([...paths.filter((p) => !p.work), path, ...paths.filter((p) => p.work)], path.id);
7434
7476
  return path;
@@ -7492,7 +7534,7 @@ var ImageEditorController = (_class12 = class {
7492
7534
  const paths = this.getPaths();
7493
7535
  const old = paths.find((p) => p.work);
7494
7536
  const work = {
7495
- id: _nullishCoalesce(_optionalChain([old, 'optionalAccess', _246 => _246.id]), () => ( newPathId())),
7537
+ id: _nullishCoalesce(_optionalChain([old, 'optionalAccess', _250 => _250.id]), () => ( newPathId())),
7496
7538
  name: WORK_PATH_NAME,
7497
7539
  components: components.map((c, i) => this.componentFrom({ op: c.op, subpaths: c.subpaths }, `components[${i}].`)),
7498
7540
  work: true
@@ -7513,7 +7555,7 @@ var ImageEditorController = (_class12 = class {
7513
7555
  /** Duplicates a path as a saved path. One undo step. */
7514
7556
  duplicatePath(id, name) {
7515
7557
  const old = this.requirePath(id);
7516
- const copy = { ...old, id: newPathId(), name: _optionalChain([name, 'optionalAccess', _247 => _247.trim, 'call', _248 => _248()]) || `${old.name} copy`, components: JSON.parse(JSON.stringify(old.components)) };
7558
+ const copy = { ...old, id: newPathId(), name: _optionalChain([name, 'optionalAccess', _251 => _251.trim, 'call', _252 => _252()]) || `${old.name} copy`, components: JSON.parse(JSON.stringify(old.components)) };
7517
7559
  delete copy.work;
7518
7560
  const paths = this.getPaths();
7519
7561
  this.commitPaths([...paths.filter((p) => !p.work), copy, ...paths.filter((p) => p.work)], copy.id);
@@ -7719,7 +7761,7 @@ var ImageEditorController = (_class12 = class {
7719
7761
  const layer = loc.layer;
7720
7762
  if (layer.type !== "pixel") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
7721
7763
  const sel = this.state.selection;
7722
- if (!_optionalChain([sel, 'optionalAccess', _249 => _249.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
7764
+ if (!_optionalChain([sel, 'optionalAccess', _253 => _253.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
7723
7765
  if (options.cut) _chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
7724
7766
  const surface = this.surfaceOf(layer);
7725
7767
  const sb = sel.bounds;
@@ -7737,14 +7779,14 @@ var ImageEditorController = (_class12 = class {
7737
7779
  const copy = {
7738
7780
  type: "pixel",
7739
7781
  id: _chunkS55JFWDAcjs.newLayerId.call(void 0, ),
7740
- name: _optionalChain([options, 'access', _250 => _250.name, 'optionalAccess', _251 => _251.trim, 'call', _252 => _252()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
7782
+ name: _optionalChain([options, 'access', _254 => _254.name, 'optionalAccess', _255 => _255.trim, 'call', _256 => _256()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
7741
7783
  visible: true,
7742
7784
  opacity: 1,
7743
7785
  blend: "normal",
7744
7786
  surface: _chunk474IQG74cjs.surfaceFromPixels.call(void 0, { width: src.width, height: src.height, data: px2 }, 4, src.x, src.y),
7745
7787
  offset: { ...layer.offset }
7746
7788
  };
7747
- let next = _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _253 => _253.parent, 'optionalAccess', _254 => _254.id]), () => ( null)), loc.index + 1);
7789
+ let next = _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _257 => _257.parent, 'optionalAccess', _258 => _258.id]), () => ( null)), loc.index + 1);
7748
7790
  if (kept) {
7749
7791
  const cutLayer = { ...layer, surface: _chunk474IQG74cjs.writeRegion.call(void 0, surface, src, kept) };
7750
7792
  delete cutLayer.source;
@@ -7768,7 +7810,7 @@ var ImageEditorController = (_class12 = class {
7768
7810
  layers: () => this.state.layers,
7769
7811
  activeLayerId: () => this.state.activeLayerId,
7770
7812
  activeTarget: () => this.state.activeTarget,
7771
- selection: () => _optionalChain([this, 'access', _255 => _255.state, 'access', _256 => _256.selection, 'optionalAccess', _257 => _257.bounds]) ? this.state.selection : null,
7813
+ selection: () => _optionalChain([this, 'access', _259 => _259.state, 'access', _260 => _260.selection, 'optionalAccess', _261 => _261.bounds]) ? this.state.selection : null,
7772
7814
  canvas: () => this.naturalSize,
7773
7815
  pixelsOf: (layer) => this.surfaceOf(layer),
7774
7816
  shapeEnv: () => this.shapeEnv(),
@@ -7916,7 +7958,7 @@ var ImageEditorController = (_class12 = class {
7916
7958
  * anything else nests as a layer document. Returns the smart object's id.
7917
7959
  */
7918
7960
  convertToSmartObject(ids, options = {}) {
7919
- const list = _optionalChain([ids, 'optionalAccess', _258 => _258.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
7961
+ const list = _optionalChain([ids, 'optionalAccess', _262 => _262.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
7920
7962
  if (!list.length) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
7921
7963
  const res = _chunkS55JFWDAcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
7922
7964
  this.commitLayers(res.layers, () => {
@@ -7949,8 +7991,8 @@ var ImageEditorController = (_class12 = class {
7949
7991
  width: c.width,
7950
7992
  height: c.height,
7951
7993
  decoded: _chunkS55JFWDAcjs.isContentsDecoded.call(void 0, c),
7952
- fileType: _nullishCoalesce(_optionalChain([c, 'access', _259 => _259.file, 'optionalAccess', _260 => _260.type]), () => ( null)),
7953
- linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _261 => _261.linked, 'optionalAccess', _262 => _262.path]), () => ( null)),
7994
+ fileType: _nullishCoalesce(_optionalChain([c, 'access', _263 => _263.file, 'optionalAccess', _264 => _264.type]), () => ( null)),
7995
+ linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _265 => _265.linked, 'optionalAccess', _266 => _266.path]), () => ( null)),
7954
7996
  instances: _chunkS55JFWDAcjs.instancesOf.call(void 0, this.state.layers, c.id),
7955
7997
  layerCount: c.document ? _chunkB46UQUDCcjs.flattenLayers.call(void 0, c.document.layers).length : 0
7956
7998
  },
@@ -7967,9 +8009,9 @@ var ImageEditorController = (_class12 = class {
7967
8009
  bounds: _chunkS55JFWDAcjs.transformedBox.call(void 0, g)
7968
8010
  },
7969
8011
  smartFilters: {
7970
- enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _263 => _263.enabled]), () => ( true)),
7971
- filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess', _264 => _264.filters]), () => ( []))).map((f) => f.kind === "psd" ? { id: f.id, kind: "psd", name: f.name, enabled: f.enabled, blend: f.blend, opacity: f.opacity } : { ...f }),
7972
- mask: _optionalChain([stack, 'optionalAccess', _265 => _265.mask]) ? { enabled: stack.mask.enabled !== false, linked: stack.mask.linked !== false, density: _nullishCoalesce(stack.mask.density, () => ( 1)), feather: _nullishCoalesce(stack.mask.feather, () => ( 0)), bounds: _chunk474IQG74cjs.contentBounds.call(void 0, stack.mask.surface), defaultValue: stack.mask.defaultValue } : null
8012
+ enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _267 => _267.enabled]), () => ( true)),
8013
+ filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess', _268 => _268.filters]), () => ( []))).map((f) => f.kind === "psd" ? { id: f.id, kind: "psd", name: f.name, enabled: f.enabled, blend: f.blend, opacity: f.opacity } : { ...f }),
8014
+ mask: _optionalChain([stack, 'optionalAccess', _269 => _269.mask]) ? { enabled: stack.mask.enabled !== false, linked: stack.mask.linked !== false, density: _nullishCoalesce(stack.mask.density, () => ( 1)), feather: _nullishCoalesce(stack.mask.feather, () => ( 0)), bounds: _chunk474IQG74cjs.contentBounds.call(void 0, stack.mask.surface), defaultValue: stack.mask.defaultValue } : null
7973
8015
  },
7974
8016
  bounds: this.getLayerBounds(id)
7975
8017
  };
@@ -8108,7 +8150,7 @@ var ImageEditorController = (_class12 = class {
8108
8150
  * it in the same undo step (Photoshop limits a filter to the selection). Returns whether it did.
8109
8151
  */
8110
8152
  maskFiltersWithSelection(id, useSelection) {
8111
- if (!useSelection || !_optionalChain([this, 'access', _266 => _266.state, 'access', _267 => _267.selection, 'optionalAccess', _268 => _268.bounds])) return false;
8153
+ if (!useSelection || !_optionalChain([this, 'access', _270 => _270.state, 'access', _271 => _271.selection, 'optionalAccess', _272 => _272.bounds])) return false;
8112
8154
  this.setSmartFilterMask(id, "selection", {}, false);
8113
8155
  return true;
8114
8156
  }
@@ -8122,19 +8164,19 @@ var ImageEditorController = (_class12 = class {
8122
8164
  removeSmartFilter(id, filterId) {
8123
8165
  const res = _chunkS55JFWDAcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
8124
8166
  this.commitLayers(res.layers);
8125
- return _nullishCoalesce(_optionalChain([res, 'access', _269 => _269.layer, 'access', _270 => _270.smartFilters, 'optionalAccess', _271 => _271.filters]), () => ( []));
8167
+ return _nullishCoalesce(_optionalChain([res, 'access', _273 => _273.layer, 'access', _274 => _274.smartFilters, 'optionalAccess', _275 => _275.filters]), () => ( []));
8126
8168
  }
8127
8169
  /** Moves one smart filter to `index` (0 = bottom, applied first), as one undo step. Returns the filters. */
8128
8170
  moveSmartFilter(id, filterId, index) {
8129
8171
  const res = _chunkS55JFWDAcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
8130
8172
  this.commitLayers(res.layers);
8131
- return _nullishCoalesce(_optionalChain([res, 'access', _272 => _272.layer, 'access', _273 => _273.smartFilters, 'optionalAccess', _274 => _274.filters]), () => ( []));
8173
+ return _nullishCoalesce(_optionalChain([res, 'access', _276 => _276.layer, 'access', _277 => _277.smartFilters, 'optionalAccess', _278 => _278.filters]), () => ( []));
8132
8174
  }
8133
8175
  /** Turns a smart object's whole filter stack on or off (one undo step). */
8134
8176
  setSmartFiltersEnabled(id, enabled) {
8135
8177
  const res = _chunkS55JFWDAcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
8136
8178
  this.commitLayers(res.layers);
8137
- return _nullishCoalesce(_optionalChain([res, 'access', _275 => _275.layer, 'access', _276 => _276.smartFilters, 'optionalAccess', _277 => _277.enabled]), () => ( true));
8179
+ return _nullishCoalesce(_optionalChain([res, 'access', _279 => _279.layer, 'access', _280 => _280.smartFilters, 'optionalAccess', _281 => _281.enabled]), () => ( true));
8138
8180
  }
8139
8181
  /**
8140
8182
  * Sets the smart filter mask (one undo step): `reveal-all`, `hide-all`, `selection` (the
@@ -8146,11 +8188,11 @@ var ImageEditorController = (_class12 = class {
8146
8188
  let mask;
8147
8189
  if (from === "none") mask = null;
8148
8190
  else if (from === "keep") {
8149
- if (!_optionalChain([layer, 'access', _278 => _278.smartFilters, 'optionalAccess', _279 => _279.mask])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
8191
+ if (!_optionalChain([layer, 'access', _282 => _282.smartFilters, 'optionalAccess', _283 => _283.mask])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
8150
8192
  mask = withMaskProps(layer.smartFilters.mask, props);
8151
8193
  } else if (from === "selection") {
8152
8194
  const sel = this.state.selection;
8153
- if (!_optionalChain([sel, 'optionalAccess', _280 => _280.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
8195
+ if (!_optionalChain([sel, 'optionalAccess', _284 => _284.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
8154
8196
  mask = this.maskFromSelection(sel, props);
8155
8197
  } else {
8156
8198
  const v = from === "reveal-all" ? 255 : 0;
@@ -8162,7 +8204,7 @@ var ImageEditorController = (_class12 = class {
8162
8204
  if (mask && from !== "keep") this.state.activeTarget = "filter-mask";
8163
8205
  else if (!mask && this.state.activeTarget === "filter-mask") this.state.activeTarget = "pixels";
8164
8206
  }, commitToHistory);
8165
- return _nullishCoalesce(_optionalChain([res, 'access', _281 => _281.layer, 'access', _282 => _282.smartFilters, 'optionalAccess', _283 => _283.mask]), () => ( null));
8207
+ return _nullishCoalesce(_optionalChain([res, 'access', _285 => _285.layer, 'access', _286 => _286.smartFilters, 'optionalAccess', _287 => _287.mask]), () => ( null));
8166
8208
  }
8167
8209
  /**
8168
8210
  * Decodes smart object contents that came as files the synchronous decoders cannot read (a JPEG
@@ -8210,7 +8252,7 @@ var ImageEditorController = (_class12 = class {
8210
8252
  if (this.getFreeTransform()) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
8211
8253
  const layer = _chunkS55JFWDAcjs.requireSmartObject.call(void 0, this.state.layers, id);
8212
8254
  const c = layer.contents;
8213
- if (!_chunkS55JFWDAcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _284 => _284.file, 'optionalAccess', _285 => _285.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
8255
+ if (!_chunkS55JFWDAcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _288 => _288.file, 'optionalAccess', _289 => _289.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
8214
8256
  const saved = {
8215
8257
  state: { ...this.state },
8216
8258
  undo: this.undoStack,
@@ -8241,9 +8283,9 @@ var ImageEditorController = (_class12 = class {
8241
8283
  editingContents: this.getEditingContents()
8242
8284
  };
8243
8285
  delete this.state.legacyOutputBlur;
8244
- if (_optionalChain([c, 'access', _286 => _286.document, 'optionalAccess', _287 => _287.globalLight])) this.state.globalLight = c.document.globalLight;
8286
+ if (_optionalChain([c, 'access', _290 => _290.document, 'optionalAccess', _291 => _291.globalLight])) this.state.globalLight = c.document.globalLight;
8245
8287
  else delete this.state.globalLight;
8246
- if (_optionalChain([c, 'access', _288 => _288.document, 'optionalAccess', _289 => _289.patterns, 'optionalAccess', _290 => _290.length])) this.state.patterns = c.document.patterns;
8288
+ if (_optionalChain([c, 'access', _292 => _292.document, 'optionalAccess', _293 => _293.patterns, 'optionalAccess', _294 => _294.length])) this.state.patterns = c.document.patterns;
8247
8289
  else delete this.state.patterns;
8248
8290
  this.imageElement = null;
8249
8291
  this.samplePixels = null;
@@ -8263,23 +8305,23 @@ var ImageEditorController = (_class12 = class {
8263
8305
  closeSmartObjectContents(save = true) {
8264
8306
  const top = this.contentsStack.pop();
8265
8307
  if (!top) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
8266
- if (_optionalChain([this, 'access', _291 => _291.openTransform, 'optionalAccess', _292 => _292.isOpen])) this.openTransform.cancel();
8308
+ if (_optionalChain([this, 'access', _295 => _295.openTransform, 'optionalAccess', _296 => _296.isOpen])) this.openTransform.cancel();
8267
8309
  this.openTransform = null;
8268
8310
  const edited = this.state;
8269
8311
  const changed = save && this.undoStack.length > 0;
8270
8312
  let next = null;
8271
8313
  if (changed) {
8272
- const layer = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _293 => _293.layer]);
8273
- const old = _optionalChain([layer, 'optionalAccess', _294 => _294.contents]);
8314
+ const layer = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _297 => _297.layer]);
8315
+ const old = _optionalChain([layer, 'optionalAccess', _298 => _298.contents]);
8274
8316
  const { width, height } = edited.imageDimensions;
8275
8317
  const only = edited.layers.length === 1 ? edited.layers[0] : null;
8276
- const plain3 = _optionalChain([only, 'optionalAccess', _295 => _295.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _296 => _296.filters, 'optionalAccess', _297 => _297.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
8277
- if (_optionalChain([old, 'optionalAccess', _298 => _298.kind]) === "raster" && plain3) {
8318
+ const plain3 = _optionalChain([only, 'optionalAccess', _299 => _299.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _300 => _300.filters, 'optionalAccess', _301 => _301.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
8319
+ if (_optionalChain([old, 'optionalAccess', _302 => _302.kind]) === "raster" && plain3) {
8278
8320
  const px2 = _chunk474IQG74cjs.readRegion.call(void 0, only.surface, { x: -only.offset.x, y: -only.offset.y, width, height });
8279
8321
  next = _chunkS55JFWDAcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
8280
8322
  } else {
8281
8323
  const doc = { layers: edited.layers, globalLight: edited.globalLight, patterns: edited.patterns };
8282
- next = _chunkS55JFWDAcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _299 => _299.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _300 => _300.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
8324
+ next = _chunkS55JFWDAcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _303 => _303.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _304 => _304.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
8283
8325
  }
8284
8326
  }
8285
8327
  const saved = top.saved;
@@ -8304,7 +8346,7 @@ var ImageEditorController = (_class12 = class {
8304
8346
  }
8305
8347
  /** The document's own layers (not the contents open for editing). */
8306
8348
  rootLayers() {
8307
- return _nullishCoalesce(_optionalChain([this, 'access', _301 => _301.contentsStack, 'access', _302 => _302[0], 'optionalAccess', _303 => _303.saved, 'access', _304 => _304.state, 'access', _305 => _305.layers]), () => ( this.state.layers));
8349
+ return _nullishCoalesce(_optionalChain([this, 'access', _305 => _305.contentsStack, 'access', _306 => _306[0], 'optionalAccess', _307 => _307.saved, 'access', _308 => _308.state, 'access', _309 => _309.layers]), () => ( this.state.layers));
8308
8350
  }
8309
8351
  /** Drops every open contents edit (loading another document). */
8310
8352
  abandonContents() {
@@ -8525,7 +8567,7 @@ var ImageEditorController = (_class12 = class {
8525
8567
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
8526
8568
  const key2 = `${tw}x${th}:${ox},${oy}`;
8527
8569
  let byKey = this.thumbCache.get(surface);
8528
- const hit = _optionalChain([byKey, 'optionalAccess', _306 => _306.get, 'call', _307 => _307(key2)]);
8570
+ const hit = _optionalChain([byKey, 'optionalAccess', _310 => _310.get, 'call', _311 => _311(key2)]);
8529
8571
  if (hit) return hit;
8530
8572
  const out = new Uint8ClampedArray(tw * th * 4);
8531
8573
  for (let y = 0; y < th; y++) {
@@ -8561,7 +8603,7 @@ var ImageEditorController = (_class12 = class {
8561
8603
  /** Brush settings, colours and tool options of the paint tools (view state, no undo). */
8562
8604
  setPaintOptions(options) {
8563
8605
  const cur = this.state.paint;
8564
- const retouch = options.retouch ? _chunkYF3YZZ6Gcjs.normalizeRetouch.call(void 0, options.retouch, cur.retouch) : cur.retouch;
8606
+ const retouch = options.retouch ? _chunk2ONK3ERDcjs.normalizeRetouch.call(void 0, options.retouch, cur.retouch) : cur.retouch;
8565
8607
  const cloneSource = cur.cloneSource && retouch.aligned !== cur.retouch.aligned ? { ...cur.cloneSource, offset: null } : cur.cloneSource;
8566
8608
  let source = cur.paint;
8567
8609
  let foreground = options.foreground !== void 0 ? toHex(parseColor(options.foreground)) : cur.foreground;
@@ -8628,7 +8670,7 @@ var ImageEditorController = (_class12 = class {
8628
8670
  */
8629
8671
  setCloneTransform(t) {
8630
8672
  const cur = this.state.paint.cloneTransform;
8631
- const next = t ? { ...cur, ...t } : { ..._chunkYF3YZZ6Gcjs.IDENTITY_CLONE_TRANSFORM };
8673
+ const next = t ? { ...cur, ...t } : { ..._chunk2ONK3ERDcjs.IDENTITY_CLONE_TRANSFORM };
8632
8674
  for (const k of ["scaleX", "scaleY"]) {
8633
8675
  const v = next[k];
8634
8676
  if (!Number.isFinite(v) || Math.abs(v) < 0.01 || Math.abs(v) > 10) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`${k} must be a scale factor between 0.01 and 10 in size (negative flips), not ${String(v)}.`);
@@ -8666,7 +8708,7 @@ var ImageEditorController = (_class12 = class {
8666
8708
  if (layer.mask.source) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which is generated, not painted.`);
8667
8709
  _chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "all", action);
8668
8710
  } else if (ch === "filter-mask") {
8669
- if (layer.type !== "smart" || !_optionalChain([layer, 'access', _308 => _308.smartFilters, 'optionalAccess', _309 => _309.mask])) {
8711
+ if (layer.type !== "smart" || !_optionalChain([layer, 'access', _312 => _312.smartFilters, 'optionalAccess', _313 => _313.mask])) {
8670
8712
  throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" has no smart filter mask to ${action}; add one with set_smart_filter_mask, or target pixels or mask.`, `Layer "${name}" has no smart filter mask to ${action}.`);
8671
8713
  }
8672
8714
  if (!_chunkS55JFWDAcjs.isContentsDecoded.call(void 0, layer.contents)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`The contents of "${name}" are not decoded here, so its filter mask cannot be painted; run prepareSmartObjects() first.`, `The smart object "${name}" is still loading; try again in a moment.`);
@@ -8681,7 +8723,7 @@ var ImageEditorController = (_class12 = class {
8681
8723
  if (!layer.visible) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" is hidden; show it before you ${action}.`);
8682
8724
  const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
8683
8725
  const surface = ch === "mask" ? layer.mask.surface : ch === "filter-mask" ? layer.smartFilters.mask.surface : this.surfaceOf(layer);
8684
- const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _310 => _310.locks, 'optionalAccess', _311 => _311.transparency]));
8726
+ const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _314 => _314.locks, 'optionalAccess', _315 => _315.transparency]));
8685
8727
  return { id, layer, channel: ch, offset, surface, lockTransparency };
8686
8728
  }
8687
8729
  /** The layer with its pixels (or mask) replaced by `surface`. */
@@ -8725,22 +8767,22 @@ var ImageEditorController = (_class12 = class {
8725
8767
  blend: target.channel !== "pixels" ? "normal" : brush.blend,
8726
8768
  lockTransparency: target.lockTransparency,
8727
8769
  // In Quick Mask mode the selection is what is painted, so it does not limit the stroke.
8728
- selection: target.channel !== "quick-mask" && _optionalChain([this, 'access', _312 => _312.state, 'access', _313 => _313.selection, 'optionalAccess', _314 => _314.bounds]) ? this.state.selection : null,
8770
+ selection: target.channel !== "quick-mask" && _optionalChain([this, 'access', _316 => _316.state, 'access', _317 => _317.selection, 'optionalAccess', _318 => _318.bounds]) ? this.state.selection : null,
8729
8771
  offset: target.offset
8730
8772
  };
8731
8773
  const depth = target.channel !== "filter-mask" && target.channel !== "quick-mask" && this.bitDepth !== 8 ? this.bitDepth : null;
8732
8774
  if (tool === "mixer") return new PaintStrokeSession(this, target, this.mixerStroke(init, brush), apply, depth);
8733
8775
  if (isRetouchTool(tool)) return new PaintStrokeSession(this, target, this.retouchStroke(tool, init, brush, target, apply), apply, depth);
8734
- const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess', _315 => _315.type]) === "gradient" ? _chunkPQ3H2AANcjs.resolvePaintGradient.call(void 0, strokePaint, { paint: toHex(color), secondary: toHex(background) }) : null;
8776
+ const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess', _319 => _319.type]) === "gradient" ? _chunkPQ3H2AANcjs.resolvePaintGradient.call(void 0, strokePaint, { paint: toHex(color), secondary: toHex(background) }) : null;
8735
8777
  return new PaintStrokeSession(this, target, new (0, _chunkPQ3H2AANcjs.StrokeCoverage)(brush, gradient, _nullishCoalesce(init.seed, () => ( 0))), apply, depth);
8736
8778
  }
8737
8779
  /** A retouching stroke's start: its settings, what it samples and how it composites. */
8738
8780
  retouchStroke(tool, init, brush, target, apply) {
8739
- const settings = _chunkYF3YZZ6Gcjs.normalizeRetouch.call(void 0, _nullishCoalesce(init.retouch, () => ( {})), this.state.paint.retouch);
8781
+ const settings = _chunk2ONK3ERDcjs.normalizeRetouch.call(void 0, _nullishCoalesce(init.retouch, () => ( {})), this.state.paint.retouch);
8740
8782
  const mask = target.channel !== "pixels";
8741
8783
  if (tool === "sponge" && mask) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("The Sponge changes saturation, and a mask has none; target pixels (channel pixels), or use dodge or burn on the mask.");
8742
- if (tool === "smudge") return { kind: "dabs", create: (pixels) => new (0, _chunkYF3YZZ6Gcjs.RetouchDabStroke)(brush, pixels, _chunkYF3YZZ6Gcjs.smudgeEffect.call(void 0, brush, settings.strength)) };
8743
- if (tool === "sponge") return { kind: "dabs", create: (pixels) => new (0, _chunkYF3YZZ6Gcjs.RetouchDabStroke)(brush, pixels, _chunkYF3YZZ6Gcjs.spongeEffect.call(void 0, brush, settings.spongeMode === "saturate", settings.vibrance)) };
8784
+ if (tool === "smudge") return { kind: "dabs", create: (pixels) => new (0, _chunk2ONK3ERDcjs.RetouchDabStroke)(brush, pixels, _chunk2ONK3ERDcjs.smudgeEffect.call(void 0, brush, settings.strength)) };
8785
+ if (tool === "sponge") return { kind: "dabs", create: (pixels) => new (0, _chunk2ONK3ERDcjs.RetouchDabStroke)(brush, pixels, _chunk2ONK3ERDcjs.spongeEffect.call(void 0, brush, settings.spongeMode === "saturate", settings.vibrance)) };
8744
8786
  const retouchApply = {
8745
8787
  opacity: tool === "clone" || tool === "heal" || tool === "history" ? brush.opacity : tool === "blur" || tool === "sharpen" ? brush.opacity * settings.strength : 1,
8746
8788
  blend: tool === "clone" && !mask ? brush.blend : "normal",
@@ -8750,7 +8792,7 @@ var ImageEditorController = (_class12 = class {
8750
8792
  };
8751
8793
  const coverage = new (0, _chunkPQ3H2AANcjs.StrokeCoverage)(brush);
8752
8794
  if (tool === "dodge" || tool === "burn") {
8753
- const paint2 = { kind: "tone", tone: _chunkYF3YZZ6Gcjs.toneOf.call(void 0, tool, settings) };
8795
+ const paint2 = { kind: "tone", tone: _chunk2ONK3ERDcjs.toneOf.call(void 0, tool, settings) };
8754
8796
  return { kind: "coverage", coverage, apply: retouchApply, start: () => {
8755
8797
  }, paint: () => paint2 };
8756
8798
  }
@@ -8758,11 +8800,11 @@ var ImageEditorController = (_class12 = class {
8758
8800
  const n = target.surface.channels;
8759
8801
  const depth = !mask && this.bitDepth !== 8 ? this.bitDepth : null;
8760
8802
  const m = 6;
8761
- const filtered = new (0, _chunkYF3YZZ6Gcjs.TilePixelSource)(
8803
+ const filtered = new (0, _chunk2ONK3ERDcjs.TilePixelSource)(
8762
8804
  (tx, ty) => {
8763
8805
  const r = { x: tx * _chunk474IQG74cjs.TILE - m, y: ty * _chunk474IQG74cjs.TILE - m, width: _chunk474IQG74cjs.TILE + 2 * m, height: _chunk474IQG74cjs.TILE + 2 * m };
8764
8806
  const d = workRegionOf(target.surface, r, depth);
8765
- _chunkYF3YZZ6Gcjs.retouchFilter.call(void 0, d, r.width, r.height, n, tool, 2, 1.2);
8807
+ _chunk2ONK3ERDcjs.retouchFilter.call(void 0, d, r.width, r.height, n, tool, 2, 1.2);
8766
8808
  const out = new Float32Array(_chunk474IQG74cjs.TILE * _chunk474IQG74cjs.TILE * n);
8767
8809
  for (let y = 0; y < _chunk474IQG74cjs.TILE; y++) out.set(d.subarray(((y + m) * r.width + m) * n, ((y + m) * r.width + m + _chunk474IQG74cjs.TILE) * n), y * _chunk474IQG74cjs.TILE * n);
8768
8810
  return out;
@@ -8778,20 +8820,20 @@ var ImageEditorController = (_class12 = class {
8778
8820
  const steps = settings.historySteps;
8779
8821
  const entry = steps > 0 ? _nullishCoalesce(this.undoStack[this.undoStack.length - steps], () => ( this.undoStack[0])) : this.undoStack[0];
8780
8822
  if (!entry) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("There is no earlier state to paint from yet: the History Brush paints a layer as it was some undo steps back. Make a change first.");
8781
- const then = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _316 => _316.layer]);
8823
+ const then = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _320 => _320.layer]);
8782
8824
  if (!then) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${target.id}" did not exist ${steps > 0 ? `${steps} steps back` : "in the oldest state"}; choose fewer history steps (historySteps).`);
8783
- const surface = target.channel === "mask" ? _optionalChain([then, 'access', _317 => _317.mask, 'optionalAccess', _318 => _318.surface]) : then.type === "pixel" ? then.surface : void 0;
8825
+ const surface = target.channel === "mask" ? _optionalChain([then, 'access', _321 => _321.mask, 'optionalAccess', _322 => _322.surface]) : then.type === "pixel" ? then.surface : void 0;
8784
8826
  if (!surface) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
8785
8827
  const offset2 = then.type === "pixel" ? then.offset : { x: 0, y: 0 };
8786
8828
  const depth = !mask && this.bitDepth !== 8 ? this.bitDepth : null;
8787
- const source2 = depth ? new (0, _chunkYF3YZZ6Gcjs.TilePixelSource)((tx, ty) => workTileOf(surface.tiles.get(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty))), 4, offset2) : this.surfaceSource(surface, offset2);
8829
+ const source2 = depth ? new (0, _chunk2ONK3ERDcjs.TilePixelSource)((tx, ty) => workTileOf(surface.tiles.get(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty))), 4, offset2) : this.surfaceSource(surface, offset2);
8788
8830
  const paint2 = { kind: "source", source: source2, dx: 0, dy: 0 };
8789
8831
  return { kind: "coverage", coverage, apply: retouchApply, start: () => {
8790
8832
  }, paint: () => paint2 };
8791
8833
  }
8792
8834
  const sample = mask ? "current" : settings.sample;
8793
8835
  const deep = !mask && this.bitDepth !== 8 ? this.bitDepth : null;
8794
- const own = deep ? new (0, _chunkYF3YZZ6Gcjs.TilePixelSource)((tx, ty) => workTileOf(target.surface.tiles.get(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty))), 4, target.offset) : this.surfaceSource(target.surface, target.offset);
8836
+ const own = deep ? new (0, _chunk2ONK3ERDcjs.TilePixelSource)((tx, ty) => workTileOf(target.surface.tiles.get(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty))), 4, target.offset) : this.surfaceSource(target.surface, target.offset);
8795
8837
  const source = sample === "current" ? own : this.compositeSource(sample === "all" ? null : target.id, deep);
8796
8838
  const pad = (r, m) => ({ x: r.x - m, y: r.y - m, width: r.width + 2 * m, height: r.height + 2 * m });
8797
8839
  const covered = (cov, r) => {
@@ -8812,14 +8854,14 @@ var ImageEditorController = (_class12 = class {
8812
8854
  paint: () => trail,
8813
8855
  finalPaint: (cov) => {
8814
8856
  if (!cov.bounds) return null;
8815
- const win = _chunkYF3YZZ6Gcjs.spotHealWindow.call(void 0, cov.bounds, { width, height });
8857
+ const win = _chunk2ONK3ERDcjs.spotHealWindow.call(void 0, cov.bounds, { width, height });
8816
8858
  if (win.width <= 0 || win.height <= 0) return null;
8817
- const img = _chunkYF3YZZ6Gcjs.readSourceRegion.call(void 0, source, win);
8859
+ const img = _chunk2ONK3ERDcjs.readSourceRegion.call(void 0, source, win);
8818
8860
  const hole = covered(cov, win);
8819
- const healed = _chunkYF3YZZ6Gcjs.spotHealPixels.call(void 0, win.width, win.height, img, hole, brush.size, settings.spotType, (off) => {
8861
+ const healed = _chunk2ONK3ERDcjs.spotHealPixels.call(void 0, win.width, win.height, img, hole, brush.size, settings.spotType, (off) => {
8820
8862
  patch = off ? { x: off[0], y: off[1] } : null;
8821
8863
  });
8822
- return { kind: "source", source: new (0, _chunkYF3YZZ6Gcjs.RegionPixelSource)(win, healed), dx: 0, dy: 0 };
8864
+ return { kind: "source", source: new (0, _chunk2ONK3ERDcjs.RegionPixelSource)(win, healed), dx: 0, dy: 0 };
8823
8865
  },
8824
8866
  result: () => ({ spotHeal: { offset: patch } })
8825
8867
  };
@@ -8830,7 +8872,7 @@ var ImageEditorController = (_class12 = class {
8830
8872
  let offset = { x: 0, y: 0 };
8831
8873
  let first = { x: 0, y: 0 };
8832
8874
  const xf = this.state.paint.cloneTransform;
8833
- const transformed = _chunkYF3YZZ6Gcjs.isIdentityCloneTransform.call(void 0, xf) ? null : new (0, _chunkYF3YZZ6Gcjs.TransformedPixelSource)(source, (x, y) => _chunkYF3YZZ6Gcjs.cloneSamplePoint.call(void 0, xf, cs, { x: cs.x - offset.x, y: cs.y - offset.y }, x, y));
8875
+ const transformed = _chunk2ONK3ERDcjs.isIdentityCloneTransform.call(void 0, xf) ? null : new (0, _chunk2ONK3ERDcjs.TransformedPixelSource)(source, (x, y) => _chunk2ONK3ERDcjs.cloneSamplePoint.call(void 0, xf, cs, { x: cs.x - offset.x, y: cs.y - offset.y }, x, y));
8834
8876
  const paint = () => transformed ? { kind: "source", source: transformed, dx: 0, dy: 0 } : { kind: "source", source, dx: offset.x, dy: offset.y };
8835
8877
  return {
8836
8878
  kind: "coverage",
@@ -8845,16 +8887,16 @@ var ImageEditorController = (_class12 = class {
8845
8887
  finalPaint: tool === "heal" ? (cov) => {
8846
8888
  if (!cov.bounds) return null;
8847
8889
  const g = pad(cov.bounds, 2);
8848
- const src = transformed ? _chunkYF3YZZ6Gcjs.readSourceRegion.call(void 0, transformed, g) : _chunkYF3YZZ6Gcjs.readSourceRegion.call(void 0, source, g, offset.x, offset.y);
8849
- const dst = _chunkYF3YZZ6Gcjs.readSourceRegion.call(void 0, source, g);
8850
- return { kind: "source", source: new (0, _chunkYF3YZZ6Gcjs.RegionPixelSource)(g, _chunkYF3YZZ6Gcjs.healPixels.call(void 0, g.width, g.height, src, dst, covered(cov, g))), dx: 0, dy: 0 };
8890
+ const src = transformed ? _chunk2ONK3ERDcjs.readSourceRegion.call(void 0, transformed, g) : _chunk2ONK3ERDcjs.readSourceRegion.call(void 0, source, g, offset.x, offset.y);
8891
+ const dst = _chunk2ONK3ERDcjs.readSourceRegion.call(void 0, source, g);
8892
+ return { kind: "source", source: new (0, _chunk2ONK3ERDcjs.RegionPixelSource)(g, _chunk2ONK3ERDcjs.healPixels.call(void 0, g.width, g.height, src, dst, covered(cov, g))), dx: 0, dy: 0 };
8851
8893
  } : void 0,
8852
8894
  result: () => ({ clone: { offset: { ...offset }, source: { x: first.x + offset.x, y: first.y + offset.y }, aligned: settings.aligned } })
8853
8895
  };
8854
8896
  }
8855
8897
  /** A pixel source over a surface (layer pixels or a mask) in layer space at `offset`. */
8856
8898
  surfaceSource(surface, offset) {
8857
- return new (0, _chunkYF3YZZ6Gcjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access', _319 => _319.tiles, 'access', _320 => _320.get, 'call', _321 => _321(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _322 => _322.data]), () => ( (surface.defaultValue ? defaultTile(surface) : null))), surface.channels, offset);
8899
+ return new (0, _chunk2ONK3ERDcjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access', _323 => _323.tiles, 'access', _324 => _324.get, 'call', _325 => _325(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _326 => _326.data]), () => ( (surface.defaultValue ? defaultTile(surface) : null))), surface.channels, offset);
8858
8900
  }
8859
8901
  /** A pixel source over the composite of the current layers (through `throughId` and below, or all of them), as it is now. */
8860
8902
  compositeSource(throughId, depth = null) {
@@ -8862,7 +8904,7 @@ var ImageEditorController = (_class12 = class {
8862
8904
  const layers = throughId ? layersThrough(stack, throughId) : stack;
8863
8905
  const sources = this.compositorSources();
8864
8906
  if (depth) {
8865
- return new (0, _chunkYF3YZZ6Gcjs.TilePixelSource)((tx, ty) => {
8907
+ return new (0, _chunk2ONK3ERDcjs.TilePixelSource)((tx, ty) => {
8866
8908
  const w = _chunkS55JFWDAcjs.compositeDeep.call(void 0, layers, { x: tx * _chunk474IQG74cjs.TILE, y: ty * _chunk474IQG74cjs.TILE, width: _chunk474IQG74cjs.TILE, height: _chunk474IQG74cjs.TILE }, sources, depth);
8867
8909
  for (let i = 0; i < w.length; i += 4) {
8868
8910
  if (depth === 32) for (let c = 0; c < 3; c++) w[i + c] = _chunkOLNIPTB3cjs.srgbEncode.call(void 0, w[i + c]);
@@ -8872,7 +8914,7 @@ var ImageEditorController = (_class12 = class {
8872
8914
  }, 4);
8873
8915
  }
8874
8916
  const compositor = new (0, _chunkS55JFWDAcjs.LayerCompositor)();
8875
- return new (0, _chunkYF3YZZ6Gcjs.TilePixelSource)((tx, ty) => compositor.tile(layers, tx, ty, sources), 4);
8917
+ return new (0, _chunk2ONK3ERDcjs.TilePixelSource)((tx, ty) => compositor.tile(layers, tx, ty, sources), 4);
8876
8918
  }
8877
8919
  /** A Mixer Brush stroke's start: the settings, and the load (refilled when asked or set to). */
8878
8920
  mixerStroke(init, brush) {
@@ -8930,7 +8972,7 @@ var ImageEditorController = (_class12 = class {
8930
8972
  paintStroke(init) {
8931
8973
  if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("points must hold at least one { x, y } point.");
8932
8974
  for (const p of init.points) {
8933
- if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _323 => _323.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _324 => _324.y]))) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
8975
+ if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _327 => _327.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _328 => _328.y]))) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
8934
8976
  }
8935
8977
  const session = this.beginStroke(init);
8936
8978
  session.push(init.points);
@@ -8959,7 +9001,7 @@ var ImageEditorController = (_class12 = class {
8959
9001
  */
8960
9002
  strokeSelection(options) {
8961
9003
  const sel = this.state.selection;
8962
- if (!_optionalChain([sel, 'optionalAccess', _325 => _325.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, then stroke the selection.");
9004
+ if (!_optionalChain([sel, 'optionalAccess', _329 => _329.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, then stroke the selection.");
8963
9005
  const width = options.width;
8964
9006
  if (!(width > 0 && width <= 250)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("width must be greater than 0 and at most 250 px.");
8965
9007
  const location = _nullishCoalesce(options.location, () => ( "outside"));
@@ -8976,7 +9018,7 @@ var ImageEditorController = (_class12 = class {
8976
9018
  */
8977
9019
  cropToSelection() {
8978
9020
  const sel = this.state.selection;
8979
- if (!_optionalChain([sel, 'optionalAccess', _326 => _326.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select the area to keep, then crop to it.");
9021
+ if (!_optionalChain([sel, 'optionalAccess', _330 => _330.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select the area to keep, then crop to it.");
8980
9022
  const crop = { ...sel.bounds };
8981
9023
  this.setCrop(crop);
8982
9024
  return crop;
@@ -8991,7 +9033,7 @@ var ImageEditorController = (_class12 = class {
8991
9033
  */
8992
9034
  contentAwareFill(options = {}) {
8993
9035
  const plan = this.prepareContentAwareFill(options);
8994
- const filled = _chunkMQDIP4CFcjs.contentAwareFill.call(void 0, plan.window.width, plan.window.height, 4, plan.before, plan.hole, { seed: _nullishCoalesce(options.seed, () => ( 0)), exclude: plan.exclude });
9036
+ const filled = _chunkBB6TR422cjs.contentAwareFill.call(void 0, plan.window.width, plan.window.height, 4, plan.before, plan.hole, { seed: _nullishCoalesce(options.seed, () => ( 0)), exclude: plan.exclude });
8995
9037
  return this.applyContentAwareFill(plan, Uint8ClampedArray.from(filled), _nullishCoalesce(options.output, () => ( "current")));
8996
9038
  }
8997
9039
  /**
@@ -9003,6 +9045,50 @@ var ImageEditorController = (_class12 = class {
9003
9045
  const filled = await this.synthesiseFill(plan, _nullishCoalesce(options.seed, () => ( 0)), options);
9004
9046
  return this.applyContentAwareFill(plan, filled, _nullishCoalesce(options.output, () => ( "current")));
9005
9047
  }
9048
+ /**
9049
+ * Separate Subject: splits the selected subject from its background in one undo step. The
9050
+ * subject goes to a copy of the layer masked by the selection (on top, made active); a second
9051
+ * copy becomes the background plate with the subject's area, grown by `dilate` px (default 8),
9052
+ * Content-Aware Filled (`fill: 'none'` leaves it transparent); an alpha channel marks the filled
9053
+ * area so a bad patch can be selected and filled again; the source layer is hidden. The fill is
9054
+ * computed first, so `signal` cancels it with nothing changed. 8-bit pixel layers only. Returns
9055
+ * the new layers, the channel and the filled bounds.
9056
+ */
9057
+ async separateSubject(options = {}) {
9058
+ const subject = this.state.selection;
9059
+ if (!_optionalChain([subject, 'optionalAccess', _331 => _331.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected: select the subject first (select_subject, select_object or quick_select), then separate it.");
9060
+ const fill = _nullishCoalesce(options.fill, () => ( "content-aware"));
9061
+ if (fill !== "content-aware" && fill !== "none") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`fill must be content-aware or none, got "${String(fill)}".`);
9062
+ const dilate = _nullishCoalesce(options.dilate, () => ( 8));
9063
+ if (!(typeof dilate === "number" && Number.isFinite(dilate) && dilate >= 0 && dilate <= 200)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`dilate must be 0 to 200 px, got ${String(options.dilate)}.`);
9064
+ const source = this.paintTarget(options.layerId, "pixels", "separate the subject from");
9065
+ const name = source.layer.name || "Layer";
9066
+ const hole = dilate > 0 ? _chunkSS53NNZOcjs.modifySelection.call(void 0, subject, "expand", dilate) : subject;
9067
+ let plan;
9068
+ this.state.selection = hole;
9069
+ try {
9070
+ plan = this.prepareContentAwareFill({ layerId: source.id, seed: options.seed });
9071
+ } finally {
9072
+ this.state.selection = subject;
9073
+ }
9074
+ const filled = fill === "content-aware" ? await this.synthesiseFill(plan, _nullishCoalesce(options.seed, () => ( 0)), options) : new Uint8ClampedArray(plan.before.length);
9075
+ _optionalChain([options, 'access', _332 => _332.signal, 'optionalAccess', _333 => _333.throwIfAborted, 'call', _334 => _334()]);
9076
+ const plateRect = { x: plan.window.x - source.offset.x, y: plan.window.y - source.offset.y, width: plan.window.width, height: plan.window.height };
9077
+ const plateSurface = _chunk474IQG74cjs.writeRegion.call(void 0, source.surface, plateRect, this.blendFill(plan, filled, "current"));
9078
+ return this.asOneStep(() => {
9079
+ const plateLayerId = this.duplicateLayer(source.id, `${name} plate`);
9080
+ this.commitLayers(_chunkB46UQUDCcjs.mapLayer.call(void 0, this.state.layers, plateLayerId, (l) => this.withSurface(l, "pixels", plateSurface)));
9081
+ const foregroundLayerId = this.duplicateLayer(source.id, `${name} subject`);
9082
+ this.moveLayer(foregroundLayerId, { aboveId: plateLayerId });
9083
+ this.addLayerMask(foregroundLayerId, "selection");
9084
+ this.setSelection(hole);
9085
+ const channel = this.saveSelection({ name: `${name} fill area` });
9086
+ this.setSelection(subject);
9087
+ this.setLayerProperties(source.id, { visible: false });
9088
+ this.setActiveLayer(foregroundLayerId);
9089
+ return { foregroundLayerId, plateLayerId, sourceLayerId: source.id, fillChannelId: channel.id, filledBounds: { ...hole.bounds }, dilate, fill };
9090
+ });
9091
+ }
9006
9092
  /**
9007
9093
  * The fill without changing anything: the window, its pixels before and after (RGBA, the fill
9008
9094
  * blended by the selection's coverage) and the sampling area used, for a preview.
@@ -9027,7 +9113,7 @@ var ImageEditorController = (_class12 = class {
9027
9113
  */
9028
9114
  prepareContentAwareFill(options = {}) {
9029
9115
  const sel = this.state.selection;
9030
- if (!_optionalChain([sel, 'optionalAccess', _327 => _327.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select what to remove, then fill it.");
9116
+ if (!_optionalChain([sel, 'optionalAccess', _335 => _335.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select what to remove, then fill it.");
9031
9117
  if (this.bitDepth !== 8) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Content-Aware Fill works on 8-bit documents for now; set_bit_depth 8 first, or use spot_heal.");
9032
9118
  const output = _nullishCoalesce(options.output, () => ( "current"));
9033
9119
  if (output !== "current" && output !== "new-layer" && output !== "duplicate-layer") {
@@ -9038,12 +9124,12 @@ var ImageEditorController = (_class12 = class {
9038
9124
  const b = sel.bounds;
9039
9125
  let area = _nullishCoalesce(options.samplingArea, () => ( null));
9040
9126
  if (!area && options.samplingChannelId) area = this.requireChannel(options.samplingChannelId).mask;
9041
- if (!area && _optionalChain([options, 'access', _328 => _328.sampleRects, 'optionalAccess', _329 => _329.length])) {
9042
- for (const r of options.sampleRects) area = _chunkSS53NNZOcjs.combineSelections.call(void 0, area, _chunkUC3PWFM3cjs.rectSelection.call(void 0, width, height, r, { antiAlias: false }), "add");
9127
+ if (!area && _optionalChain([options, 'access', _336 => _336.sampleRects, 'optionalAccess', _337 => _337.length])) {
9128
+ for (const r of options.sampleRects) area = _chunkSS53NNZOcjs.combineSelections.call(void 0, area, _chunkKALCIDWHcjs.rectSelection.call(void 0, width, height, r, { antiAlias: false }), "add");
9043
9129
  }
9044
9130
  if (area && !area.bounds) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("The sampling area is empty; paint or give an area to sample from.");
9045
9131
  let win;
9046
- if (_optionalChain([area, 'optionalAccess', _330 => _330.bounds])) {
9132
+ if (_optionalChain([area, 'optionalAccess', _338 => _338.bounds])) {
9047
9133
  const a = area.bounds;
9048
9134
  const x0 = Math.max(0, Math.min(b.x - 8, a.x));
9049
9135
  const y0 = Math.max(0, Math.min(b.y - 8, a.y));
@@ -9068,7 +9154,7 @@ var ImageEditorController = (_class12 = class {
9068
9154
  }
9069
9155
  }
9070
9156
  let exclude = null;
9071
- if (area || _optionalChain([options, 'access', _331 => _331.excludeRects, 'optionalAccess', _332 => _332.length])) {
9157
+ if (area || _optionalChain([options, 'access', _339 => _339.excludeRects, 'optionalAccess', _340 => _340.length])) {
9072
9158
  exclude = new Uint8Array(n);
9073
9159
  if (area) {
9074
9160
  const ad = area.data;
@@ -9139,8 +9225,8 @@ var ImageEditorController = (_class12 = class {
9139
9225
  */
9140
9226
  copyPixels(options = {}) {
9141
9227
  const { width, height } = this.naturalSize;
9142
- const sel = _optionalChain([this, 'access', _333 => _333.state, 'access', _334 => _334.selection, 'optionalAccess', _335 => _335.bounds]) ? this.state.selection : null;
9143
- const rect2 = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _336 => _336.bounds]), () => ( { x: 0, y: 0, width, height }));
9228
+ const sel = _optionalChain([this, 'access', _341 => _341.state, 'access', _342 => _342.selection, 'optionalAccess', _343 => _343.bounds]) ? this.state.selection : null;
9229
+ const rect2 = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _344 => _344.bounds]), () => ( { x: 0, y: 0, width, height }));
9144
9230
  let data;
9145
9231
  if (options.merged) {
9146
9232
  data = new Uint8ClampedArray(this.compositePixels(rect2).data);
@@ -9180,7 +9266,7 @@ var ImageEditorController = (_class12 = class {
9180
9266
  pastePixels(mode = "new-layer", image = this.clipboard) {
9181
9267
  if (!image) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("The clipboard is empty; copy_pixels first.");
9182
9268
  if (!PASTE_MODES.includes(mode)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Unknown paste mode "${String(mode)}"; use ${PASTE_MODES.join(", ")}.`);
9183
- const sel = _optionalChain([this, 'access', _337 => _337.state, 'access', _338 => _338.selection, 'optionalAccess', _339 => _339.bounds]) ? this.state.selection : null;
9269
+ const sel = _optionalChain([this, 'access', _345 => _345.state, 'access', _346 => _346.selection, 'optionalAccess', _347 => _347.bounds]) ? this.state.selection : null;
9184
9270
  if ((mode === "into" || mode === "outside") && !sel) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Paste ${mode === "into" ? "Into" : "Outside"} needs a selection; select where it goes first.`);
9185
9271
  const { width, height } = this.naturalSize;
9186
9272
  let x;
@@ -9189,7 +9275,7 @@ var ImageEditorController = (_class12 = class {
9189
9275
  x = image.x;
9190
9276
  y = image.y;
9191
9277
  } else {
9192
- const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _340 => _340.bounds]), () => ( { x: 0, y: 0, width, height }));
9278
+ const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _348 => _348.bounds]), () => ( { x: 0, y: 0, width, height }));
9193
9279
  x = Math.round(frame.x + (frame.width - image.width) / 2);
9194
9280
  y = Math.round(frame.y + (frame.height - image.height) / 2);
9195
9281
  }
@@ -9206,8 +9292,8 @@ var ImageEditorController = (_class12 = class {
9206
9292
  if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("opacity must be from 0 to 1.");
9207
9293
  const blend = _nullishCoalesce(_chunkS55JFWDAcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
9208
9294
  const quickMask = target.channel === "quick-mask";
9209
- const sel = _nullishCoalesce(coverageMask, () => ( (!quickMask && options.useSelection !== false && _optionalChain([this, 'access', _341 => _341.state, 'access', _342 => _342.selection, 'optionalAccess', _343 => _343.bounds]) ? this.state.selection : null)));
9210
- const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _344 => _344.bounds]), () => ( { x: 0, y: 0, width, height }));
9295
+ const sel = _nullishCoalesce(coverageMask, () => ( (!quickMask && options.useSelection !== false && _optionalChain([this, 'access', _349 => _349.state, 'access', _350 => _350.selection, 'optionalAccess', _351 => _351.bounds]) ? this.state.selection : null)));
9296
+ const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _352 => _352.bounds]), () => ( { x: 0, y: 0, width, height }));
9211
9297
  const coverage = new (0, _chunkPQ3H2AANcjs.CoverageMap)();
9212
9298
  const ones = new Float32Array(region.width * region.height);
9213
9299
  if (sel) {
@@ -9332,7 +9418,7 @@ var ImageEditorController = (_class12 = class {
9332
9418
  placeLayer(layers, node, where) {
9333
9419
  if (where.aboveId) {
9334
9420
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, where.aboveId);
9335
- if (loc) return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _345 => _345.parent, 'optionalAccess', _346 => _346.id]), () => ( null)), loc.index + 1);
9421
+ if (loc) return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _353 => _353.parent, 'optionalAccess', _354 => _354.id]), () => ( null)), loc.index + 1);
9336
9422
  }
9337
9423
  if (where.parentId) {
9338
9424
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, where.parentId);
@@ -9343,11 +9429,11 @@ var ImageEditorController = (_class12 = class {
9343
9429
  const at = Math.max(0, Math.min(nodes.length, Math.round(where.adjustmentIndex)));
9344
9430
  if (at < nodes.length) {
9345
9431
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, nodes[at].id);
9346
- return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _347 => _347.parent, 'optionalAccess', _348 => _348.id]), () => ( null)), loc.index);
9432
+ return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _355 => _355.parent, 'optionalAccess', _356 => _356.id]), () => ( null)), loc.index);
9347
9433
  }
9348
9434
  if (nodes.length) {
9349
9435
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, nodes[nodes.length - 1].id);
9350
- return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _349 => _349.parent, 'optionalAccess', _350 => _350.id]), () => ( null)), loc.index + 1);
9436
+ return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _357 => _357.parent, 'optionalAccess', _358 => _358.id]), () => ( null)), loc.index + 1);
9351
9437
  }
9352
9438
  }
9353
9439
  return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, null, this.defaultInsertIndex(layers));
@@ -9386,7 +9472,7 @@ var ImageEditorController = (_class12 = class {
9386
9472
  enabled: spec.enabled,
9387
9473
  opacity: spec.opacity,
9388
9474
  blend: spec.blend,
9389
- mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access', _351 => _351.state, 'access', _352 => _352.selection, 'optionalAccess', _353 => _353.bounds]) ? _chunkS55JFWDAcjs.layerMaskFromSelection.call(void 0, this.state.selection) : void 0)))
9475
+ mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access', _359 => _359.state, 'access', _360 => _360.selection, 'optionalAccess', _361 => _361.bounds]) ? _chunkS55JFWDAcjs.layerMaskFromSelection.call(void 0, this.state.selection) : void 0)))
9390
9476
  });
9391
9477
  while (ids.has(layer.id)) layer.id = _chunkS55JFWDAcjs.newLayerId.call(void 0, "adj");
9392
9478
  const { width, height } = this.naturalSize;
@@ -9463,7 +9549,7 @@ var ImageEditorController = (_class12 = class {
9463
9549
  const anchor = nodes[to];
9464
9550
  const without = _chunkB46UQUDCcjs.mapLayer.call(void 0, layers, id, () => null);
9465
9551
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, without, anchor.id);
9466
- return _chunkB46UQUDCcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _354 => _354.parent, 'optionalAccess', _355 => _355.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
9552
+ return _chunkB46UQUDCcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _362 => _362.parent, 'optionalAccess', _363 => _363.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
9467
9553
  }
9468
9554
  /** Moves a layer to `toIndex` among the adjustment layers (0 = bottom) as one undo step. Returns false if nothing moved. */
9469
9555
  moveAdjustmentLayer(id, toIndex) {
@@ -9504,7 +9590,7 @@ var ImageEditorController = (_class12 = class {
9504
9590
  return _nullishCoalesce(this.state.selection, () => ( null));
9505
9591
  }
9506
9592
  get hasSelection() {
9507
- return Boolean(_optionalChain([this, 'access', _356 => _356.state, 'access', _357 => _357.selection, 'optionalAccess', _358 => _358.bounds]));
9593
+ return Boolean(_optionalChain([this, 'access', _364 => _364.state, 'access', _365 => _365.selection, 'optionalAccess', _366 => _366.bounds]));
9508
9594
  }
9509
9595
  /** Returns the current canvas (composition) dimensions. */
9510
9596
  getCanvasSize() {
@@ -9596,7 +9682,7 @@ var ImageEditorController = (_class12 = class {
9596
9682
  const prev = normalizeSelection(_nullishCoalesce(this.state.selection, () => ( null)));
9597
9683
  if (prev === next || prev && next && sameSelection(prev, next)) return false;
9598
9684
  this.recordHistory();
9599
- if (!next && _optionalChain([prev, 'optionalAccess', _359 => _359.bounds])) this.lastSelection = prev;
9685
+ if (!next && _optionalChain([prev, 'optionalAccess', _367 => _367.bounds])) this.lastSelection = prev;
9600
9686
  this.state.selection = next;
9601
9687
  this.notify();
9602
9688
  return true;
@@ -9645,19 +9731,19 @@ var ImageEditorController = (_class12 = class {
9645
9731
  throw new RangeError(`${orientation === "row" ? "y" : "x"} ${position} is outside the image (0..${max - 1}).`);
9646
9732
  }
9647
9733
  const rect2 = orientation === "row" ? { x: 0, y: at, width, height: 1 } : { x: at, y: 0, width: 1, height };
9648
- return this.shapeCommand(_chunkUC3PWFM3cjs.rectSelection.call(void 0, width, height, rect2, { antiAlias: false }), options);
9734
+ return this.shapeCommand(_chunkKALCIDWHcjs.rectSelection.call(void 0, width, height, rect2, { antiAlias: false }), options);
9649
9735
  }
9650
9736
  /** Select › Grow: adds connected pixels within `tolerance` of a selected colour (one undo step). */
9651
9737
  async growSelection(options = {}) {
9652
9738
  const sel = this.state.selection;
9653
- if (!_optionalChain([sel, 'optionalAccess', _360 => _360.bounds])) return false;
9739
+ if (!_optionalChain([sel, 'optionalAccess', _368 => _368.bounds])) return false;
9654
9740
  const pixels = await this.requirePixels(options);
9655
9741
  return this.setSelection(growSelection(pixels, sel, options));
9656
9742
  }
9657
9743
  /** Select › Similar: adds every pixel within `tolerance` of a selected colour (one undo step). */
9658
9744
  async selectSimilar(options = {}) {
9659
9745
  const sel = this.state.selection;
9660
- if (!_optionalChain([sel, 'optionalAccess', _361 => _361.bounds])) return false;
9746
+ if (!_optionalChain([sel, 'optionalAccess', _369 => _369.bounds])) return false;
9661
9747
  const pixels = await this.requirePixels(options);
9662
9748
  return this.setSelection(selectSimilar(pixels, sel, options));
9663
9749
  }
@@ -9703,17 +9789,17 @@ var ImageEditorController = (_class12 = class {
9703
9789
  /** Rectangular marquee in natural image pixels. */
9704
9790
  selectRect(rect2, options = {}) {
9705
9791
  const { width, height } = this.naturalSize;
9706
- return this.shapeCommand(_chunkUC3PWFM3cjs.rectSelection.call(void 0, width, height, rect2, options), options);
9792
+ return this.shapeCommand(_chunkKALCIDWHcjs.rectSelection.call(void 0, width, height, rect2, options), options);
9707
9793
  }
9708
9794
  /** Elliptical marquee inscribed in `rect`. */
9709
9795
  selectEllipse(rect2, options = {}) {
9710
9796
  const { width, height } = this.naturalSize;
9711
- return this.shapeCommand(_chunkUC3PWFM3cjs.ellipseSelection.call(void 0, width, height, rect2, options), options);
9797
+ return this.shapeCommand(_chunkKALCIDWHcjs.ellipseSelection.call(void 0, width, height, rect2, options), options);
9712
9798
  }
9713
9799
  /** Lasso / polygonal lasso. */
9714
9800
  selectPolygon(points, options = {}) {
9715
9801
  const { width, height } = this.naturalSize;
9716
- return this.shapeCommand(_chunkUC3PWFM3cjs.polygonSelection.call(void 0, width, height, points, options), options);
9802
+ return this.shapeCommand(_chunkKALCIDWHcjs.polygonSelection.call(void 0, width, height, points, options), options);
9717
9803
  }
9718
9804
  /**
9719
9805
  * Magnetic Lasso for a given outline: each point snaps to the strongest edge within `width` px
@@ -9749,7 +9835,7 @@ var ImageEditorController = (_class12 = class {
9749
9835
  size: options.size,
9750
9836
  grow: m === "add",
9751
9837
  enhanceEdge: options.enhanceEdge,
9752
- selection: m === "add" && _optionalChain([sel, 'optionalAccess', _362 => _362.bounds]) ? _chunkUC3PWFM3cjs.serializeMask.call(void 0, sel) : null
9838
+ selection: m === "add" && _optionalChain([sel, 'optionalAccess', _370 => _370.bounds]) ? _chunkKALCIDWHcjs.serializeMask.call(void 0, sel) : null
9753
9839
  };
9754
9840
  const { mask } = await this.runSelectionJob(job, pixels, {
9755
9841
  signal: options.signal,
@@ -9769,7 +9855,7 @@ var ImageEditorController = (_class12 = class {
9769
9855
  const { width, height } = this.naturalSize;
9770
9856
  const image = await this.toDataURL({ format: "image/png" });
9771
9857
  const results = await provider.segment({ ...request, image, width, height });
9772
- _optionalChain([request, 'access', _363 => _363.signal, 'optionalAccess', _364 => _364.throwIfAborted, 'call', _365 => _365()]);
9858
+ _optionalChain([request, 'access', _371 => _371.signal, 'optionalAccess', _372 => _372.throwIfAborted, 'call', _373 => _373()]);
9773
9859
  const decoded = [];
9774
9860
  for (const r of _nullishCoalesce(results, () => ( []))) decoded.push({ ...r, mask: r.mask !== void 0 ? await this.decodeMaskImage(r.mask) : void 0 });
9775
9861
  return decoded;
@@ -9786,11 +9872,11 @@ var ImageEditorController = (_class12 = class {
9786
9872
  let union = null;
9787
9873
  for (const r of decoded) {
9788
9874
  const one = segmentsToSelection(width, height, [r]);
9789
- if (!_optionalChain([one, 'optionalAccess', _366 => _366.bounds])) continue;
9875
+ if (!_optionalChain([one, 'optionalAccess', _374 => _374.bounds])) continue;
9790
9876
  if ("rect" in target) {
9791
9877
  const r0 = target.rect;
9792
9878
  const grow = 0.1 * Math.max(r0.width, r0.height);
9793
- const box = _chunkUC3PWFM3cjs.rectSelection.call(void 0, width, height, { x: r0.x - grow, y: r0.y - grow, width: r0.width + 2 * grow, height: r0.height + 2 * grow }, { antiAlias: false });
9879
+ const box = _chunkKALCIDWHcjs.rectSelection.call(void 0, width, height, { x: r0.x - grow, y: r0.y - grow, width: r0.width + 2 * grow, height: r0.height + 2 * grow }, { antiAlias: false });
9794
9880
  const inside = _chunkSS53NNZOcjs.combineSelections.call(void 0, one, box, "intersect");
9795
9881
  if (!inside || _chunkSS53NNZOcjs.selectionArea.call(void 0, inside) < _chunkSS53NNZOcjs.selectionArea.call(void 0, one) * 0.5) continue;
9796
9882
  union = _chunkSS53NNZOcjs.combineSelections.call(void 0, union, inside, "add");
@@ -9854,7 +9940,7 @@ var ImageEditorController = (_class12 = class {
9854
9940
  if (this.segmentation && options.useModel !== false) {
9855
9941
  const { width, height } = this.naturalSize;
9856
9942
  const sky = segmentsToSelection(width, height, await this.modelSegments({ target: "the sky", signal: options.signal }));
9857
- if (!_optionalChain([sky, 'optionalAccess', _367 => _367.bounds])) return { selection: _nullishCoalesce(this.state.selection, () => ( null)), method: "model", note: "The segmentation model found no sky." };
9943
+ if (!_optionalChain([sky, 'optionalAccess', _375 => _375.bounds])) return { selection: _nullishCoalesce(this.state.selection, () => ( null)), method: "model", note: "The segmentation model found no sky." };
9858
9944
  this.setSelection(sky, _nullishCoalesce(options.mode, () => ( "replace")));
9859
9945
  return { selection: _nullishCoalesce(this.state.selection, () => ( null)), method: "model" };
9860
9946
  }
@@ -9885,7 +9971,7 @@ var ImageEditorController = (_class12 = class {
9885
9971
  try {
9886
9972
  const canvas = await this.renderSource();
9887
9973
  const ctx = canvas.getContext("2d");
9888
- const data2 = _optionalChain([ctx, 'optionalAccess', _368 => _368.getImageData, 'optionalCall', _369 => _369(0, 0, width, height)]);
9974
+ const data2 = _optionalChain([ctx, 'optionalAccess', _376 => _376.getImageData, 'optionalCall', _377 => _377(0, 0, width, height)]);
9889
9975
  if (data2 && data2.data && data2.data.length >= width * height * 4) {
9890
9976
  base = { width, height, data: data2.data };
9891
9977
  this.samplePixels = base;
@@ -9960,7 +10046,7 @@ var ImageEditorController = (_class12 = class {
9960
10046
  /** Select › Modify: grow, shrink, feather, border or smooth by `radius` pixels (one undo step). */
9961
10047
  modifySelection(op, radius) {
9962
10048
  const sel = this.state.selection;
9963
- if (!_optionalChain([sel, 'optionalAccess', _370 => _370.bounds])) return false;
10049
+ if (!_optionalChain([sel, 'optionalAccess', _378 => _378.bounds])) return false;
9964
10050
  return this.setSelection(_chunkSS53NNZOcjs.modifySelection.call(void 0, sel, op, radius));
9965
10051
  }
9966
10052
  /**
@@ -9969,7 +10055,7 @@ var ImageEditorController = (_class12 = class {
9969
10055
  */
9970
10056
  async refineSelection(params, options = {}) {
9971
10057
  const sel = this.state.selection;
9972
- if (!_optionalChain([sel, 'optionalAccess', _371 => _371.bounds])) return false;
10058
+ if (!_optionalChain([sel, 'optionalAccess', _379 => _379.bounds])) return false;
9973
10059
  const pixels = (_nullishCoalesce(params.radius, () => ( 0))) > 0 ? await this.requirePixels(options) : null;
9974
10060
  return this.setSelection(_chunkSS53NNZOcjs.refineSelection.call(void 0, pixels, sel, params));
9975
10061
  }
@@ -9992,7 +10078,7 @@ var ImageEditorController = (_class12 = class {
9992
10078
  const edits = _nullishCoalesce(options.edits, () => ( []));
9993
10079
  const regions2 = this.checkRegions(options.regions);
9994
10080
  const refineMode = _nullishCoalesce(options.refineMode, () => ( "color"));
9995
- if (!_optionalChain([this, 'access', _372 => _372.state, 'access', _373 => _373.selection, 'optionalAccess', _374 => _374.bounds]) && !edits.length) throw new Error("Nothing is selected; select first, or pass edits that paint a selection.");
10081
+ if (!_optionalChain([this, 'access', _380 => _380.state, 'access', _381 => _381.selection, 'optionalAccess', _382 => _382.bounds]) && !edits.length) throw new Error("Nothing is selected; select first, or pass edits that paint a selection.");
9996
10082
  if (refineMode === "object" && !this.segmentation) {
9997
10083
  throw new Error("Object aware refinement needs a segmentation model (setSegmentationProvider); use refineMode color.");
9998
10084
  }
@@ -10013,16 +10099,16 @@ var ImageEditorController = (_class12 = class {
10013
10099
  const needsPixels = (_nullishCoalesce(params.radius, () => ( 0))) > 0 || edits.some((e) => e.kind !== "brush");
10014
10100
  const pixels = needsPixels ? await this.requirePixels(options) : null;
10015
10101
  const { width, height } = this.naturalSize;
10016
- const edited = _chunkUC3PWFM3cjs.applyRefineEdits.call(void 0, pixels, _nullishCoalesce(this.state.selection, () => ( null)), edits, width, height);
10102
+ const edited = _chunkKALCIDWHcjs.applyRefineEdits.call(void 0, pixels, _nullishCoalesce(this.state.selection, () => ( null)), edits, width, height);
10017
10103
  let sel = edited.selection;
10018
- if (!_optionalChain([sel, 'optionalAccess', _375 => _375.bounds])) throw new Error("The edits leave nothing selected; paint with mode add first.");
10104
+ if (!_optionalChain([sel, 'optionalAccess', _383 => _383.bounds])) throw new Error("The edits leave nothing selected; paint with mode add first.");
10019
10105
  if (refineMode === "object") {
10020
10106
  const b = sel.bounds;
10021
10107
  const found = await this.modelObject({ rect: b }, options.signal);
10022
10108
  if (!found) throw new Error("The segmentation model found no object in the selection; use refineMode color.");
10023
10109
  const near = _chunkSS53NNZOcjs.modifySelection.call(void 0, sel, "expand", Math.max(4, _nullishCoalesce(params.radius, () => ( 8))));
10024
10110
  const clipped = _chunkSS53NNZOcjs.combineSelections.call(void 0, found, near, "intersect");
10025
- if (!_optionalChain([clipped, 'optionalAccess', _376 => _376.bounds])) throw new Error("The segmentation model found no object in the selection; use refineMode color.");
10111
+ if (!_optionalChain([clipped, 'optionalAccess', _384 => _384.bounds])) throw new Error("The segmentation model found no object in the selection; use refineMode color.");
10026
10112
  sel = clipped;
10027
10113
  }
10028
10114
  let refined = _chunkSS53NNZOcjs.refineSelection.call(void 0, pixels, sel, params, edited.refineBrush);
@@ -10124,7 +10210,7 @@ var ImageEditorController = (_class12 = class {
10124
10210
  let mask;
10125
10211
  if (source === "selection") {
10126
10212
  const sel = this.state.selection;
10127
- if (!_optionalChain([sel, 'optionalAccess', _377 => _377.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, or export a channel or a layer mask.");
10213
+ if (!_optionalChain([sel, 'optionalAccess', _385 => _385.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, or export a channel or a layer mask.");
10128
10214
  mask = sel;
10129
10215
  } else if ("channelId" in source) {
10130
10216
  mask = this.requireChannel(source.channelId).mask;
@@ -10148,7 +10234,7 @@ var ImageEditorController = (_class12 = class {
10148
10234
  const canvas = this.renderer.createCanvas(w, h);
10149
10235
  const ctx = canvas.getContext("2d");
10150
10236
  if (ctx) ctx.drawImage(img, 0, 0, w, h);
10151
- const data = _optionalChain([ctx, 'optionalAccess', _378 => _378.getImageData, 'optionalCall', _379 => _379(0, 0, w, h)]);
10237
+ const data = _optionalChain([ctx, 'optionalAccess', _386 => _386.getImageData, 'optionalCall', _387 => _387(0, 0, w, h)]);
10152
10238
  if (!data) throw new Error("The mask image pixels are not available (no canvas access); pass pixels.");
10153
10239
  return { width: w, height: h, data: data.data };
10154
10240
  }
@@ -10164,7 +10250,7 @@ var ImageEditorController = (_class12 = class {
10164
10250
  const provider = this.segmentation;
10165
10251
  if (!provider) {
10166
10252
  const pixels = await this.requirePixels({});
10167
- _optionalChain([options, 'access', _380 => _380.signal, 'optionalAccess', _381 => _381.throwIfAborted, 'call', _382 => _382()]);
10253
+ _optionalChain([options, 'access', _388 => _388.signal, 'optionalAccess', _389 => _389.throwIfAborted, 'call', _390 => _390()]);
10168
10254
  const { mask: selection, reason } = await this.runSelectionJob({ op: "subject", enhanceEdge: options.enhanceEdge }, pixels, options);
10169
10255
  if (selection.bounds) this.shapeCommand(selection, options);
10170
10256
  const unused = target.trim() ? ` "${target.trim()}" was not used to choose it.` : "";
@@ -10180,17 +10266,17 @@ var ImageEditorController = (_class12 = class {
10180
10266
  const decoded = await this.modelSegments({ target: description, maxSegments: options.maxSegments, signal: options.signal });
10181
10267
  const segments = decoded.map((r) => {
10182
10268
  const one = segmentsToSelection(width, height, [r]);
10183
- return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess', _383 => _383.bounds]), () => ( null)), ...r.score !== void 0 ? { score: r.score } : {} };
10269
+ return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess', _391 => _391.bounds]), () => ( null)), ...r.score !== void 0 ? { score: r.score } : {} };
10184
10270
  });
10185
10271
  const mask = segmentsToSelection(width, height, decoded);
10186
10272
  if (mask && options.beforeApply) {
10187
10273
  const outlines = decoded.flatMap((r, i) => {
10188
10274
  const rings = segmentationOutlines(r);
10189
- const b = _optionalChain([segments, 'access', _384 => _384[i], 'optionalAccess', _385 => _385.bounds]);
10275
+ const b = _optionalChain([segments, 'access', _392 => _392[i], 'optionalAccess', _393 => _393.bounds]);
10190
10276
  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 }]] : [];
10191
10277
  });
10192
10278
  await options.beforeApply(outlines);
10193
- _optionalChain([options, 'access', _386 => _386.signal, 'optionalAccess', _387 => _387.throwIfAborted, 'call', _388 => _388()]);
10279
+ _optionalChain([options, 'access', _394 => _394.signal, 'optionalAccess', _395 => _395.throwIfAborted, 'call', _396 => _396()]);
10194
10280
  }
10195
10281
  if (mask) this.shapeCommand(mask, options);
10196
10282
  return { segments: segments.filter((s) => s.bounds), method: "model" };
@@ -10223,7 +10309,7 @@ var ImageEditorController = (_class12 = class {
10223
10309
  const view = this.state.maskView;
10224
10310
  if (!view) return null;
10225
10311
  const layer = this.getLayer(view.layerId);
10226
- return _optionalChain([layer, 'optionalAccess', _389 => _389.mask]) && !layer.mask.source ? view : null;
10312
+ return _optionalChain([layer, 'optionalAccess', _397 => _397.mask]) && !layer.mask.source ? view : null;
10227
10313
  }
10228
10314
  /**
10229
10315
  * Shows a layer's mask on the canvas: `gray` alone in grey (Alt-click the mask thumbnail),
@@ -10246,7 +10332,7 @@ var ImageEditorController = (_class12 = class {
10246
10332
  if (!layer.mask) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask to show; add one with add_layer_mask.`);
10247
10333
  if (layer.mask.source) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${layer.name || id}" has a depth mask, which is computed, not painted, so it has no mask view.`);
10248
10334
  const cur = this.state.maskView;
10249
- if (_optionalChain([cur, 'optionalAccess', _390 => _390.layerId]) !== id || cur.mode !== mode) {
10335
+ if (_optionalChain([cur, 'optionalAccess', _398 => _398.layerId]) !== id || cur.mode !== mode) {
10250
10336
  this.state.maskView = { layerId: id, mode };
10251
10337
  this.notify();
10252
10338
  }
@@ -10258,7 +10344,7 @@ var ImageEditorController = (_class12 = class {
10258
10344
  return _nullishCoalesce(this.state.channels, () => ( []));
10259
10345
  }
10260
10346
  getChannel(id) {
10261
- return _nullishCoalesce(_optionalChain([this, 'access', _391 => _391.state, 'access', _392 => _392.channels, 'optionalAccess', _393 => _393.find, 'call', _394 => _394((c) => c.id === id)]), () => ( null));
10347
+ return _nullishCoalesce(_optionalChain([this, 'access', _399 => _399.state, 'access', _400 => _400.channels, 'optionalAccess', _401 => _401.find, 'call', _402 => _402((c) => c.id === id)]), () => ( null));
10262
10348
  }
10263
10349
  requireChannel(id) {
10264
10350
  const channel = this.getChannel(id);
@@ -10287,14 +10373,14 @@ var ImageEditorController = (_class12 = class {
10287
10373
  */
10288
10374
  saveSelection(options = {}) {
10289
10375
  const sel = this.state.selection;
10290
- if (!_optionalChain([sel, 'optionalAccess', _395 => _395.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, then save the selection to a channel.");
10376
+ if (!_optionalChain([sel, 'optionalAccess', _403 => _403.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, then save the selection to a channel.");
10291
10377
  const { width, height } = this.naturalSize;
10292
10378
  const sized = sel.width === width && sel.height === height ? sel : _chunkSS53NNZOcjs.resizeSelection.call(void 0, sel, width, height);
10293
10379
  const channels = [...this.getChannels()];
10294
10380
  if (options.channelId !== void 0) {
10295
10381
  const existing = this.requireChannel(options.channelId);
10296
10382
  const mask = _nullishCoalesce(_chunkSS53NNZOcjs.combineSelections.call(void 0, existing.mask.bounds ? existing.mask : null, sized, _nullishCoalesce(options.mode, () => ( "replace"))), () => ( _chunkSS53NNZOcjs.createSelectionMask.call(void 0, width, height)));
10297
- const next = { ...existing, mask, ..._optionalChain([options, 'access', _396 => _396.name, 'optionalAccess', _397 => _397.trim, 'call', _398 => _398()]) ? { name: options.name.trim() } : {} };
10383
+ const next = { ...existing, mask, ..._optionalChain([options, 'access', _404 => _404.name, 'optionalAccess', _405 => _405.trim, 'call', _406 => _406()]) ? { name: options.name.trim() } : {} };
10298
10384
  this.setChannels(channels.map((c) => c.id === existing.id ? next : c));
10299
10385
  return next;
10300
10386
  }
@@ -10305,7 +10391,7 @@ var ImageEditorController = (_class12 = class {
10305
10391
  const channels = this.getChannels();
10306
10392
  const channel = {
10307
10393
  id: this.newChannelId(),
10308
- name: _optionalChain([name, 'optionalAccess', _399 => _399.trim, 'call', _400 => _400()]) || `Alpha ${channels.length + 1}`,
10394
+ name: _optionalChain([name, 'optionalAccess', _407 => _407.trim, 'call', _408 => _408()]) || `Alpha ${channels.length + 1}`,
10309
10395
  mask,
10310
10396
  color: DEFAULT_CHANNEL_COLOR,
10311
10397
  opacity: 0.5,
@@ -10350,7 +10436,7 @@ var ImageEditorController = (_class12 = class {
10350
10436
  /** Duplicates an alpha channel just after it (one undo step). Returns the copy. */
10351
10437
  duplicateChannel(id, name) {
10352
10438
  const channel = this.requireChannel(id);
10353
- const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess', _401 => _401.trim, 'call', _402 => _402()]) || `${channel.name} copy` };
10439
+ const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess', _409 => _409.trim, 'call', _410 => _410()]) || `${channel.name} copy` };
10354
10440
  const channels = [...this.getChannels()];
10355
10441
  channels.splice(channels.findIndex((c) => c.id === id) + 1, 0, copy);
10356
10442
  this.setChannels(channels);
@@ -10381,7 +10467,7 @@ var ImageEditorController = (_class12 = class {
10381
10467
  quickMaskSurface() {
10382
10468
  const { width, height } = this.naturalSize;
10383
10469
  const sel = this.state.selection;
10384
- if (!_optionalChain([sel, 'optionalAccess', _403 => _403.bounds])) return _chunk474IQG74cjs.emptySurface.call(void 0, 1, 0);
10470
+ if (!_optionalChain([sel, 'optionalAccess', _411 => _411.bounds])) return _chunk474IQG74cjs.emptySurface.call(void 0, 1, 0);
10385
10471
  return (sel.width === width && sel.height === height ? sel : _chunkSS53NNZOcjs.resizeSelection.call(void 0, sel, width, height)).surface;
10386
10472
  }
10387
10473
  /** The selection a painted Quick Mask surface stands for (it shares the surface's tiles). */
@@ -10402,7 +10488,7 @@ var ImageEditorController = (_class12 = class {
10402
10488
  */
10403
10489
  applySelectionAsLayerMask(layerId, props = {}) {
10404
10490
  const sel = this.state.selection;
10405
- if (!_optionalChain([sel, 'optionalAccess', _404 => _404.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
10491
+ if (!_optionalChain([sel, 'optionalAccess', _412 => _412.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
10406
10492
  return this.setLayerMask(layerId, this.maskFromSelection(sel, props));
10407
10493
  }
10408
10494
  setLayerMask(layerId, mask, commitToHistory = true) {
@@ -10451,7 +10537,7 @@ var ImageEditorController = (_class12 = class {
10451
10537
  let layer;
10452
10538
  if (target === "selection") {
10453
10539
  mask = this.getSelection();
10454
- if (!_optionalChain([mask, 'optionalAccess', _405 => _405.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected: make a selection first, or inspect a layer-mask or vector-mask with layerId.");
10540
+ if (!_optionalChain([mask, 'optionalAccess', _413 => _413.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected: make a selection first, or inspect a layer-mask or vector-mask with layerId.");
10455
10541
  } else if (target === "layer-mask" || target === "vector-mask") {
10456
10542
  if (!options.layerId) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`A ${target} needs layerId (see list_layers).`);
10457
10543
  layer = this.getLayer(options.layerId);
@@ -10472,7 +10558,7 @@ var ImageEditorController = (_class12 = class {
10472
10558
  const x = Math.max(0, b.x - 8);
10473
10559
  const y = Math.max(0, b.y - 8);
10474
10560
  const region = { x, y, width: Math.min(width, b.x + b.width + 8) - x, height: Math.min(height, b.y + b.height + 8) - y };
10475
- const own = _optionalChain([layer, 'optionalAccess', _406 => _406.type]) === "pixel" ? this.getLayerPixels(layer.id) : null;
10561
+ const own = _optionalChain([layer, 'optionalAccess', _414 => _414.type]) === "pixel" ? this.getLayerPixels(layer.id) : null;
10476
10562
  const image = _nullishCoalesce(own, () => ( { ...this.compositePixels(region), x: region.x, y: region.y }));
10477
10563
  const report = inspectMaskEdge(mask, image, options);
10478
10564
  return { target, ...layer ? { layerId: layer.id } : {}, ...report };
@@ -10483,10 +10569,10 @@ var ImageEditorController = (_class12 = class {
10483
10569
  const { width, height } = this.naturalSize;
10484
10570
  if (!Array.isArray(regions2) || !regions2.length) throw new Error("regions must be a non-empty list of { x, y, width, height } (e.g. the uncertainRegions bounds); leave it out to refine everywhere.");
10485
10571
  return regions2.map((r, i) => {
10486
- const x = Math.max(0, Math.floor(_optionalChain([r, 'optionalAccess', _407 => _407.x])));
10487
- const y = Math.max(0, Math.floor(_optionalChain([r, 'optionalAccess', _408 => _408.y])));
10488
- const x1 = Math.min(width, Math.ceil(_optionalChain([r, 'optionalAccess', _409 => _409.x]) + _optionalChain([r, 'optionalAccess', _410 => _410.width])));
10489
- const y1 = Math.min(height, Math.ceil(_optionalChain([r, 'optionalAccess', _411 => _411.y]) + _optionalChain([r, 'optionalAccess', _412 => _412.height])));
10572
+ const x = Math.max(0, Math.floor(_optionalChain([r, 'optionalAccess', _415 => _415.x])));
10573
+ const y = Math.max(0, Math.floor(_optionalChain([r, 'optionalAccess', _416 => _416.y])));
10574
+ const x1 = Math.min(width, Math.ceil(_optionalChain([r, 'optionalAccess', _417 => _417.x]) + _optionalChain([r, 'optionalAccess', _418 => _418.width])));
10575
+ const y1 = Math.min(height, Math.ceil(_optionalChain([r, 'optionalAccess', _419 => _419.y]) + _optionalChain([r, 'optionalAccess', _420 => _420.height])));
10490
10576
  if (![x, y, x1, y1].every(Number.isFinite) || x1 <= x || y1 <= y) throw new Error(`regions[${i}] must overlap the image (0..${width} \xD7 0..${height}), got ${JSON.stringify(r)}.`);
10491
10577
  return { x, y, width: x1 - x, height: y1 - y };
10492
10578
  });
@@ -10500,7 +10586,7 @@ var ImageEditorController = (_class12 = class {
10500
10586
  selectionUncertainty(options = {}) {
10501
10587
  const { width, height } = this.naturalSize;
10502
10588
  const sel = this.getSelection();
10503
- if (!_optionalChain([sel, 'optionalAccess', _413 => _413.bounds])) return selectionUncertainty(_chunkSS53NNZOcjs.createSelectionMask.call(void 0, width, height), { x: 0, y: 0, width: 0, height: 0, data: new Uint8ClampedArray(0) }, options);
10589
+ if (!_optionalChain([sel, 'optionalAccess', _421 => _421.bounds])) return selectionUncertainty(_chunkSS53NNZOcjs.createSelectionMask.call(void 0, width, height), { x: 0, y: 0, width: 0, height: 0, data: new Uint8ClampedArray(0) }, options);
10504
10590
  const b = sel.bounds;
10505
10591
  const m = Math.max(8, Math.ceil(_nullishCoalesce(options.band, () => ( Math.max(2, Math.min(width, height) / 200)))) + 4);
10506
10592
  const x = Math.max(0, b.x - m);
@@ -10514,7 +10600,7 @@ var ImageEditorController = (_class12 = class {
10514
10600
  */
10515
10601
  selectionFrom(source) {
10516
10602
  const { width, height } = this.naturalSize;
10517
- switch (_optionalChain([source, 'optionalAccess', _414 => _414.kind])) {
10603
+ switch (_optionalChain([source, 'optionalAccess', _422 => _422.kind])) {
10518
10604
  case "selection":
10519
10605
  return this.getSelection();
10520
10606
  case "history": {
@@ -10570,7 +10656,7 @@ var ImageEditorController = (_class12 = class {
10570
10656
  /** A layer's painted mask over the canvas as a selection mask; null without one (or for a depth mask). */
10571
10657
  layerMaskCoverage(layerId) {
10572
10658
  const layer = this.getLayer(layerId);
10573
- if (!_optionalChain([layer, 'optionalAccess', _415 => _415.mask]) || layer.mask.source) return null;
10659
+ if (!_optionalChain([layer, 'optionalAccess', _423 => _423.mask]) || layer.mask.source) return null;
10574
10660
  const { width, height } = this.naturalSize;
10575
10661
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
10576
10662
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
@@ -10605,7 +10691,7 @@ var ImageEditorController = (_class12 = class {
10605
10691
  this.state.layers = _chunkB46UQUDCcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
10606
10692
  const next = { ...l };
10607
10693
  if (_chunkS55JFWDAcjs.isDefaultDepthMask.call(void 0, merged)) {
10608
- if (_optionalChain([next, 'access', _416 => _416.mask, 'optionalAccess', _417 => _417.source])) delete next.mask;
10694
+ if (_optionalChain([next, 'access', _424 => _424.mask, 'optionalAccess', _425 => _425.source])) delete next.mask;
10609
10695
  } else next.mask = _chunkS55JFWDAcjs.depthRasterMask.call(void 0, merged);
10610
10696
  return next;
10611
10697
  });
@@ -10615,7 +10701,7 @@ var ImageEditorController = (_class12 = class {
10615
10701
  resetDepthMask() {
10616
10702
  this.recordHistory();
10617
10703
  const target = this.developLayer();
10618
- if (_optionalChain([target, 'optionalAccess', _418 => _418.mask, 'optionalAccess', _419 => _419.source])) {
10704
+ if (_optionalChain([target, 'optionalAccess', _426 => _426.mask, 'optionalAccess', _427 => _427.source])) {
10619
10705
  this.state.layers = _chunkB46UQUDCcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
10620
10706
  const next = { ...l };
10621
10707
  delete next.mask;
@@ -10627,7 +10713,7 @@ var ImageEditorController = (_class12 = class {
10627
10713
  // --- Annotations & Layers ---
10628
10714
  /** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
10629
10715
  annotationLayer(id) {
10630
- return _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkS55JFWDAcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _420 => _420.id]) === id);
10716
+ return _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkS55JFWDAcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _428 => _428.id]) === id);
10631
10717
  }
10632
10718
  /** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
10633
10719
  annotationEnv() {
@@ -10645,7 +10731,7 @@ var ImageEditorController = (_class12 = class {
10645
10731
  const fullAnnotation = { ...annotation, id };
10646
10732
  const layer = _chunkS55JFWDAcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
10647
10733
  const loc = placement.aboveId ? _chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
10648
- this.state.layers = loc ? _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _421 => _421.parent, 'optionalAccess', _422 => _422.id]), () => ( null)), loc.index + 1) : _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, layer, null);
10734
+ this.state.layers = loc ? _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _429 => _429.parent, 'optionalAccess', _430 => _430.id]), () => ( null)), loc.index + 1) : _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, layer, null);
10649
10735
  this.state.selectedAnnotationId = id;
10650
10736
  this.notify();
10651
10737
  return id;
@@ -10753,7 +10839,7 @@ var ImageEditorController = (_class12 = class {
10753
10839
  const cs = s.paint.cloneSource;
10754
10840
  if (!cs) return null;
10755
10841
  if (cursor && cs.offset && s.paint.retouch.aligned) {
10756
- const [x, y] = _chunkYF3YZZ6Gcjs.cloneSamplePoint.call(void 0, s.paint.cloneTransform, cs, { x: cs.x - cs.offset.x, y: cs.y - cs.offset.y }, cursor.x, cursor.y);
10842
+ const [x, y] = _chunk2ONK3ERDcjs.cloneSamplePoint.call(void 0, s.paint.cloneTransform, cs, { x: cs.x - cs.offset.x, y: cs.y - cs.offset.y }, cursor.x, cursor.y);
10757
10843
  return { x, y };
10758
10844
  }
10759
10845
  return { x: cs.x, y: cs.y };
@@ -10768,7 +10854,7 @@ var ImageEditorController = (_class12 = class {
10768
10854
  await this.renderer.renderToCanvas(targetCanvas, source, this.state, {
10769
10855
  ...options,
10770
10856
  // The clone source follows the brush cursor (both editors pass it).
10771
- cloneSourceMarker: _optionalChain([options, 'optionalAccess', _423 => _423.cloneSourceMarker]) !== void 0 ? options.cloneSourceMarker : _optionalChain([options, 'optionalAccess', _424 => _424.brushCursor]) ? this.cloneSourceMarker(options.brushCursor) : null,
10857
+ cloneSourceMarker: _optionalChain([options, 'optionalAccess', _431 => _431.cloneSourceMarker]) !== void 0 ? options.cloneSourceMarker : _optionalChain([options, 'optionalAccess', _432 => _432.brushCursor]) ? this.cloneSourceMarker(options.brushCursor) : null,
10772
10858
  dirty: dirty === "all" ? void 0 : dirty,
10773
10859
  checkpointLayerId: this.state.activeLayerId
10774
10860
  });
@@ -10781,7 +10867,7 @@ var ImageEditorController = (_class12 = class {
10781
10867
  return this.renderer.createCanvas(1, 1);
10782
10868
  }
10783
10869
  this.syncViews();
10784
- if (_optionalChain([options, 'optionalAccess', _425 => _425.layerIds])) {
10870
+ if (_optionalChain([options, 'optionalAccess', _433 => _433.layerIds])) {
10785
10871
  const keep = new Set(options.layerIds);
10786
10872
  const layers = _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => keep.has(l.id));
10787
10873
  return this.renderer.renderExport(source, { ...this.state, layers }, options);
@@ -10935,7 +11021,7 @@ var ImageEditorController = (_class12 = class {
10935
11021
  let px2 = await this.decodeImage(newDataUrl);
10936
11022
  if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
10937
11023
  const data = new Uint8ClampedArray(px2.data);
10938
- const sel = _optionalChain([this, 'access', _426 => _426.state, 'access', _427 => _427.selection, 'optionalAccess', _428 => _428.bounds]) ? this.state.selection : null;
11024
+ const sel = _optionalChain([this, 'access', _434 => _434.state, 'access', _435 => _435.selection, 'optionalAccess', _436 => _436.bounds]) ? this.state.selection : null;
10939
11025
  if (sel) for (let p = 0, i = 3; p < width * height; p++, i += 4) data[i] = Math.round(data[i] * sel.data[p] / 255);
10940
11026
  return this.addPixelLayer({ name: "Inpaint", pixels: { width, height, data } });
10941
11027
  }
@@ -10982,7 +11068,7 @@ var ImageEditorController = (_class12 = class {
10982
11068
  }
10983
11069
  /** Font families the shaper offers (generic families at least). */
10984
11070
  listFonts() {
10985
- return _nullishCoalesce(_optionalChain([this, 'access', _429 => _429.getTextShaper, 'call', _430 => _430(), 'optionalAccess', _431 => _431.families, 'optionalCall', _432 => _432()]), () => ( ["sans-serif", "serif", "monospace"]));
11071
+ return _nullishCoalesce(_optionalChain([this, 'access', _437 => _437.getTextShaper, 'call', _438 => _438(), 'optionalAccess', _439 => _439.families, 'optionalCall', _440 => _440()]), () => ( ["sans-serif", "serif", "monospace"]));
10986
11072
  }
10987
11073
  typeInfo(id) {
10988
11074
  const layer = _chunkS55JFWDAcjs.requireTypeLayer.call(void 0, this.state.layers, id);
@@ -11056,8 +11142,8 @@ var ImageEditorController = (_class12 = class {
11056
11142
  const layer = this.layoutTypeLayer({ ...init, text, orientation: vertical ? "vertical" : "horizontal" });
11057
11143
  const { width, height } = this.naturalSize;
11058
11144
  const b = _chunk474IQG74cjs.contentBounds.call(void 0, layer.surface);
11059
- const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _433 => _433.x]), () => ( 0)));
11060
- const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _434 => _434.y]), () => ( 0)));
11145
+ const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _441 => _441.x]), () => ( 0)));
11146
+ const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _442 => _442.y]), () => ( 0)));
11061
11147
  const x1 = Math.min(width, b ? b.x + b.width : 0);
11062
11148
  const y1 = Math.min(height, b ? b.y + b.height : 0);
11063
11149
  let mask;
@@ -11234,7 +11320,7 @@ var ImageEditorController = (_class12 = class {
11234
11320
  if (colors.size > 1) warnings.push("The text had several colours; the shape takes the first one.");
11235
11321
  const missing = _chunkQAUIZPYIcjs.layoutText.call(void 0, layer, shaper).missingFonts;
11236
11322
  if (missing.length) warnings.push(`Missing fonts were drawn with a fallback: ${missing.join(", ")}.`);
11237
- const first = _nullishCoalesce(_optionalChain([layer, 'access', _435 => _435.runs, 'access', _436 => _436.find, 'call', _437 => _437((r) => r.length > 0), 'optionalAccess', _438 => _438.style]), () => ( _chunkQAUIZPYIcjs.DEFAULT_TEXT_STYLE));
11323
+ const first = _nullishCoalesce(_optionalChain([layer, 'access', _443 => _443.runs, 'access', _444 => _444.find, 'call', _445 => _445((r) => r.length > 0), 'optionalAccess', _446 => _446.style]), () => ( _chunkQAUIZPYIcjs.DEFAULT_TEXT_STYLE));
11238
11324
  const fill = first.opacity !== void 0 && first.opacity !== 1 ? { type: "color", color: first.color, opacity: first.opacity } : { type: "color", color: first.color };
11239
11325
  const shape = _chunkS55JFWDAcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
11240
11326
  const keep = { visible: layer.visible, opacity: layer.opacity, blend: layer.blend };
@@ -11267,7 +11353,7 @@ var ImageEditorController = (_class12 = class {
11267
11353
  // --- Shape layers ---
11268
11354
  /** What shape rendering needs: the canvas size and the document's patterns. */
11269
11355
  shapeEnv() {
11270
- return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _439 => _439.state, 'access', _440 => _440.patterns, 'optionalAccess', _441 => _441.find, 'call', _442 => _442((p) => p.id === id)]), () => ( null)) };
11356
+ return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _447 => _447.state, 'access', _448 => _448.patterns, 'optionalAccess', _449 => _449.find, 'call', _450 => _450((p) => p.id === id)]), () => ( null)) };
11271
11357
  }
11272
11358
  /** One component from tool or UI input (validated). */
11273
11359
  componentFrom(spec, path) {
@@ -11310,9 +11396,9 @@ var ImageEditorController = (_class12 = class {
11310
11396
  * open path) and stroked with `stroke`. Goes above the active layer unless placed. Returns its id.
11311
11397
  */
11312
11398
  addShapeLayer(init) {
11313
- const specs = _optionalChain([init, 'access', _443 => _443.components, 'optionalAccess', _444 => _444.length]) ? init.components : [init];
11314
- if (_optionalChain([init, 'access', _445 => _445.components, 'optionalAccess', _446 => _446.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
11315
- const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _447 => _447.components, 'optionalAccess', _448 => _448.length]) ? `components[${i}].` : ""));
11399
+ const specs = _optionalChain([init, 'access', _451 => _451.components, 'optionalAccess', _452 => _452.length]) ? init.components : [init];
11400
+ if (_optionalChain([init, 'access', _453 => _453.components, 'optionalAccess', _454 => _454.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
11401
+ const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _455 => _455.components, 'optionalAccess', _456 => _456.length]) ? `components[${i}].` : ""));
11316
11402
  const stroke = init.stroke ? _chunkS55JFWDAcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
11317
11403
  const openOnly = components.every((c) => !c.live && c.subpaths.every((sp) => !sp.closed));
11318
11404
  const fill = init.fill === void 0 ? stroke && openOnly ? null : _chunkS55JFWDAcjs.normalizeShapePaint.call(void 0, this.state.paint.foreground, "fill") : init.fill === null ? null : _chunkS55JFWDAcjs.normalizeShapePaint.call(void 0, init.fill, "fill");
@@ -11423,7 +11509,7 @@ var ImageEditorController = (_class12 = class {
11423
11509
  if (layer.locks) next.locks = layer.locks;
11424
11510
  if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
11425
11511
  } else if (layer.type === "pixel") {
11426
- if (!_optionalChain([layer, 'access', _449 => _449.filters, 'optionalAccess', _450 => _450.length])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
11512
+ if (!_optionalChain([layer, 'access', _457 => _457.filters, 'optionalAccess', _458 => _458.length])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
11427
11513
  _chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
11428
11514
  const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
11429
11515
  const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
@@ -11442,7 +11528,7 @@ var ImageEditorController = (_class12 = class {
11442
11528
  return this.rasterizeSmartObject(id);
11443
11529
  } else if (layer.type === "shape" || layer.type === "type") {
11444
11530
  next = layer.type === "shape" ? _chunkS55JFWDAcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkS55JFWDAcjs.typeAsPixelLayer.call(void 0, layer);
11445
- if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _451 => _451.annotation, 'optionalAccess', _452 => _452.id])) this.state.selectedAnnotationId = null;
11531
+ if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _459 => _459.annotation, 'optionalAccess', _460 => _460.id])) this.state.selectedAnnotationId = null;
11446
11532
  } else {
11447
11533
  throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Only shape, type and annotation layers, smart objects and pixel layers with filters rasterize; "${layer.name || id}" is a ${layer.type} layer. Merge it down or flatten instead.`);
11448
11534
  }
@@ -11456,8 +11542,8 @@ var ImageEditorController = (_class12 = class {
11456
11542
  const doc = this.state.colorProfile;
11457
11543
  const p = resolveProfile(doc);
11458
11544
  const m = this.state.colorMode;
11459
- const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _453 => _453.name]), () => ( p.description)), builtin: doc ? _nullishCoalesce(doc.builtin, () => ( null)) : "srgb", colorSpace: p.colorSpace, srgb: isSrgb(doc), mode: _nullishCoalesce(_optionalChain([m, 'optionalAccess', _454 => _454.mode]), () => ( "rgb")) };
11460
- if (_optionalChain([m, 'optionalAccess', _455 => _455.mode]) === "cmyk") out.cmykProfile = { name: m.profile.name, builtin: _nullishCoalesce(m.profile.builtin, () => ( null)), intent: m.intent };
11545
+ const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _461 => _461.name]), () => ( p.description)), builtin: doc ? _nullishCoalesce(doc.builtin, () => ( null)) : "srgb", colorSpace: p.colorSpace, srgb: isSrgb(doc), mode: _nullishCoalesce(_optionalChain([m, 'optionalAccess', _462 => _462.mode]), () => ( "rgb")) };
11546
+ if (_optionalChain([m, 'optionalAccess', _463 => _463.mode]) === "cmyk") out.cmykProfile = { name: m.profile.name, builtin: _nullishCoalesce(m.profile.builtin, () => ( null)), intent: m.intent };
11461
11547
  return out;
11462
11548
  }
11463
11549
  /**
@@ -11547,7 +11633,7 @@ var ImageEditorController = (_class12 = class {
11547
11633
  const textEnv = this.textEnv();
11548
11634
  const walk = (layers) => layers.map((l) => {
11549
11635
  let next2 = l;
11550
- if (_optionalChain([l, 'access', _456 => _456.effects, 'optionalAccess', _457 => _457.items, 'access', _458 => _458.length])) next2 = { ...next2, effects: convertColorFields(l.effects, hex) };
11636
+ if (_optionalChain([l, 'access', _464 => _464.effects, 'optionalAccess', _465 => _465.items, 'access', _466 => _466.length])) next2 = { ...next2, effects: convertColorFields(l.effects, hex) };
11551
11637
  if (l.type === "group") {
11552
11638
  if (next2 !== l) converted.push(l.id);
11553
11639
  return { ...next2, children: walk(l.children) };
@@ -11735,8 +11821,8 @@ var ImageEditorController = (_class12 = class {
11735
11821
  else delete s.bitDepth;
11736
11822
  delete s.colorProfile;
11737
11823
  delete s.colorMode;
11738
- if (_optionalChain([result, 'access', _459 => _459.sourceMode, 'optionalAccess', _460 => _460.mode]) === "cmyk") s.colorMode = { mode: "cmyk", profile: result.sourceMode.profile, intent: "relative" };
11739
- else if (_optionalChain([result, 'access', _461 => _461.sourceMode, 'optionalAccess', _462 => _462.mode]) === "lab") s.colorMode = { mode: "lab" };
11824
+ if (_optionalChain([result, 'access', _467 => _467.sourceMode, 'optionalAccess', _468 => _468.mode]) === "cmyk") s.colorMode = { mode: "cmyk", profile: result.sourceMode.profile, intent: "relative" };
11825
+ else if (_optionalChain([result, 'access', _469 => _469.sourceMode, 'optionalAccess', _470 => _470.mode]) === "lab") s.colorMode = { mode: "lab" };
11740
11826
  else if (result.iccProfile) {
11741
11827
  try {
11742
11828
  const doc = documentProfile(result.iccProfile);
@@ -11800,7 +11886,7 @@ var ImageEditorController = (_class12 = class {
11800
11886
  const compositor = new (0, _chunkS55JFWDAcjs.LayerCompositor)();
11801
11887
  const bakeMask = (layer) => {
11802
11888
  const mask = layer.mask;
11803
- if (!_optionalChain([mask, 'optionalAccess', _463 => _463.source])) return mask;
11889
+ if (!_optionalChain([mask, 'optionalAccess', _471 => _471.source])) return mask;
11804
11890
  add2("Parametric (depth) masks were baked into pixel masks", layer.name);
11805
11891
  const plain3 = { ...layer, mask: { ...mask, density: 1, feather: 0, enabled: true } };
11806
11892
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
@@ -11816,10 +11902,10 @@ var ImageEditorController = (_class12 = class {
11816
11902
  return baked;
11817
11903
  };
11818
11904
  const prepare = async (layer) => {
11819
- if (_optionalChain([layer, 'access', _464 => _464.edge, 'optionalAccess', _465 => _465.ambient])) add2("The live edge cast (set_edge_ambient) has no PSD equivalent and was left out", layer.name);
11905
+ if (_optionalChain([layer, 'access', _472 => _472.edge, 'optionalAccess', _473 => _473.ambient])) add2("The live edge cast (set_edge_ambient) has no PSD equivalent and was left out", layer.name);
11820
11906
  const p = await prepareLayer(layer);
11821
- if (_optionalChain([p, 'optionalAccess', _466 => _466.edge])) delete p.edge;
11822
- if (_optionalChain([p, 'optionalAccess', _467 => _467.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
11907
+ if (_optionalChain([p, 'optionalAccess', _474 => _474.edge])) delete p.edge;
11908
+ if (_optionalChain([p, 'optionalAccess', _475 => _475.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
11823
11909
  return p;
11824
11910
  };
11825
11911
  const prepareLayer = async (layer) => {
@@ -11862,7 +11948,7 @@ var ImageEditorController = (_class12 = class {
11862
11948
  return out2;
11863
11949
  }
11864
11950
  if (layer.type === "shape" || layer.type === "type") {
11865
- if (layer.type === "type" && _optionalChain([layer, 'access', _468 => _468.missingFonts, 'optionalAccess', _469 => _469.length])) add2(`Type layers drawn with a fallback for missing fonts (${layer.missingFonts.join(", ")}) keep the font names, so Photoshop may draw them differently`, layer.name);
11951
+ if (layer.type === "type" && _optionalChain([layer, 'access', _476 => _476.missingFonts, 'optionalAccess', _477 => _477.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);
11866
11952
  const out2 = { ...layer };
11867
11953
  const mask2 = bakeMask(layer);
11868
11954
  if (mask2) out2.mask = mask2;
@@ -11881,7 +11967,7 @@ var ImageEditorController = (_class12 = class {
11881
11967
  out.surface = this.surfaceOf(layer);
11882
11968
  delete out.source;
11883
11969
  }
11884
- const active = _nullishCoalesce(_optionalChain([layer, 'access', _470 => _470.filters, 'optionalAccess', _471 => _471.filter, 'call', _472 => _472(_chunkS55JFWDAcjs.isActiveFilter)]), () => ( []));
11970
+ const active = _nullishCoalesce(_optionalChain([layer, 'access', _478 => _478.filters, 'optionalAccess', _479 => _479.filter, 'call', _480 => _480(_chunkS55JFWDAcjs.isActiveFilter)]), () => ( []));
11885
11971
  if (active.length) {
11886
11972
  add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
11887
11973
  const content = { ...out, visible: true, opacity: 1, blend: "normal" };
@@ -11892,7 +11978,7 @@ var ImageEditorController = (_class12 = class {
11892
11978
  const data = compositor.composite([content], canvas, sources);
11893
11979
  out = { ...out, surface: _chunk474IQG74cjs.surfaceFromPixels.call(void 0, { width, height, data }, 4, -layer.offset.x, -layer.offset.y) };
11894
11980
  }
11895
- if (_optionalChain([layer, 'access', _473 => _473.filters, 'optionalAccess', _474 => _474.some, 'call', _475 => _475((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
11981
+ if (_optionalChain([layer, 'access', _481 => _481.filters, 'optionalAccess', _482 => _482.some, 'call', _483 => _483((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
11896
11982
  delete out.filters;
11897
11983
  const unmixMask = _chunkS55JFWDAcjs.hasEdgeUnmix.call(void 0, layer.edge) ? _chunkS55JFWDAcjs.effectiveLayerMask.call(void 0, layer, width, height) : void 0;
11898
11984
  if (unmixMask && !unmixMask.source && unmixMask.enabled !== false) {
@@ -11964,7 +12050,7 @@ var ImageEditorController = (_class12 = class {
11964
12050
  );
11965
12051
  }
11966
12052
  layers = resizeLegacyMasks(layers, prev, next.dimensions);
11967
- const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access', _476 => _476.state, 'access', _477 => _477.patterns, 'optionalAccess', _478 => _478.find, 'call', _479 => _479((p) => p.id === pid)]), () => ( null)) };
12053
+ const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access', _484 => _484.state, 'access', _485 => _485.patterns, 'optionalAccess', _486 => _486.find, 'call', _487 => _487((p) => p.id === pid)]), () => ( null)) };
11968
12054
  for (const l of _chunkB46UQUDCcjs.flattenLayers.call(void 0, layers)) {
11969
12055
  if (l.type === "annotation") {
11970
12056
  layers = _chunkB46UQUDCcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, annotation: scaleAnnotation(l.annotation, sx, sy) }));
@@ -11973,7 +12059,7 @@ var ImageEditorController = (_class12 = class {
11973
12059
  const scaled = a ? scaleAnnotation(a, sx, sy) : null;
11974
12060
  const fromAnnotation = scaled ? _chunkS55JFWDAcjs.shapeFromAnnotation.call(void 0, scaled) : null;
11975
12061
  const m = [sx, 0, 0, sy, 0, 0];
11976
- const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _480 => _480.components]), () => ( _chunkS55JFWDAcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
12062
+ const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _488 => _488.components]), () => ( _chunkS55JFWDAcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
11977
12063
  const moved = { ...l, components, ...fromAnnotation ? { fill: fromAnnotation.fill, stroke: fromAnnotation.stroke } : {} };
11978
12064
  if (scaled && fromAnnotation) moved.annotation = scaled;
11979
12065
  else delete moved.annotation;
@@ -11991,7 +12077,7 @@ var ImageEditorController = (_class12 = class {
11991
12077
  this.notify();
11992
12078
  }
11993
12079
  toJSON(options) {
11994
- const root = _optionalChain([this, 'access', _481 => _481.contentsStack, 'access', _482 => _482[0], 'optionalAccess', _483 => _483.saved]);
12080
+ const root = _optionalChain([this, 'access', _489 => _489.contentsStack, 'access', _490 => _490[0], 'optionalAccess', _491 => _491.saved]);
11995
12081
  const current = this.state;
11996
12082
  const element = this.imageElement;
11997
12083
  if (root) {
@@ -12002,9 +12088,9 @@ var ImageEditorController = (_class12 = class {
12002
12088
  let out;
12003
12089
  try {
12004
12090
  out = this.serializeState();
12005
- if (_optionalChain([this, 'access', _484 => _484.state, 'access', _485 => _485.selection, 'optionalAccess', _486 => _486.bounds])) out.selection = _chunkSS53NNZOcjs.serializeSelection.call(void 0, this.state.selection);
12006
- if (_optionalChain([this, 'access', _487 => _487.state, 'access', _488 => _488.channels, 'optionalAccess', _489 => _489.length])) out.channels = serializeChannels(this.state.channels);
12007
- if (_optionalChain([this, 'access', _490 => _490.state, 'access', _491 => _491.paths, 'optionalAccess', _492 => _492.length])) out.paths = serializePaths(this.state.paths);
12091
+ if (_optionalChain([this, 'access', _492 => _492.state, 'access', _493 => _493.selection, 'optionalAccess', _494 => _494.bounds])) out.selection = _chunkSS53NNZOcjs.serializeSelection.call(void 0, this.state.selection);
12092
+ if (_optionalChain([this, 'access', _495 => _495.state, 'access', _496 => _496.channels, 'optionalAccess', _497 => _497.length])) out.channels = serializeChannels(this.state.channels);
12093
+ if (_optionalChain([this, 'access', _498 => _498.state, 'access', _499 => _499.paths, 'optionalAccess', _500 => _500.length])) out.paths = serializePaths(this.state.paths);
12008
12094
  } finally {
12009
12095
  if (root) {
12010
12096
  this.state = current;
@@ -12122,10 +12208,10 @@ var ImageEditorController = (_class12 = class {
12122
12208
  serializeState() {
12123
12209
  const { width, height } = this.naturalSize;
12124
12210
  const view = _chunkS55JFWDAcjs.legacyView.call(void 0, this.stack(), width, height, null);
12125
- if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _493 => _493.state, 'access', _494 => _494.patterns, 'optionalAccess', _495 => _495.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
12211
+ if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _501 => _501.state, 'access', _502 => _502.patterns, 'optionalAccess', _503 => _503.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
12126
12212
  return {
12127
12213
  // States without adjustment layers keep schema 1, so they round-trip unchanged.
12128
- version: _optionalChain([view, 'access', _496 => _496.adjustments, 'access', _497 => _497.layers, 'optionalAccess', _498 => _498.length]) ? 2 : 1,
12214
+ version: _optionalChain([view, 'access', _504 => _504.adjustments, 'access', _505 => _505.layers, 'optionalAccess', _506 => _506.length]) ? 2 : 1,
12129
12215
  crop: this.state.crop ? { ...this.state.crop } : null,
12130
12216
  transform: { ...this.state.transform },
12131
12217
  adjustments: serializeAdjustments(view.adjustments),
@@ -12150,7 +12236,7 @@ var ImageEditorController = (_class12 = class {
12150
12236
  };
12151
12237
  if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
12152
12238
  if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
12153
- if (_optionalChain([this, 'access', _499 => _499.state, 'access', _500 => _500.patterns, 'optionalAccess', _501 => _501.length])) out.patterns = _chunkS55JFWDAcjs.serializePatterns.call(void 0, this.state.patterns);
12239
+ if (_optionalChain([this, 'access', _507 => _507.state, 'access', _508 => _508.patterns, 'optionalAccess', _509 => _509.length])) out.patterns = _chunkS55JFWDAcjs.serializePatterns.call(void 0, this.state.patterns);
12154
12240
  if (smartContents) out.smartContents = smartContents;
12155
12241
  if (this.state.bitDepth === 16 || this.state.bitDepth === 32) out.bitDepth = this.state.bitDepth;
12156
12242
  if (this.state.colorProfile) out.colorProfile = serializeColorProfile(this.state.colorProfile);
@@ -12160,7 +12246,7 @@ var ImageEditorController = (_class12 = class {
12160
12246
  }, _class12);
12161
12247
  function serializeAdjustments(adjustments) {
12162
12248
  const out = { ...adjustments };
12163
- if (_optionalChain([out, 'access', _502 => _502.layers, 'optionalAccess', _503 => _503.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
12249
+ if (_optionalChain([out, 'access', _510 => _510.layers, 'optionalAccess', _511 => _511.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
12164
12250
  else delete out.layers;
12165
12251
  if (_chunkS55JFWDAcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkS55JFWDAcjs.LEGACY_PROCESS_VERSION) {
12166
12252
  delete out.process;
@@ -12196,11 +12282,11 @@ function withDevelop(layer, partial) {
12196
12282
  return { ...layer, filters };
12197
12283
  }
12198
12284
  function withBlur(layer, radius) {
12199
- const existing = _optionalChain([layer, 'access', _504 => _504.filters, 'optionalAccess', _505 => _505.find, 'call', _506 => _506((f) => f.kind === "blur")]);
12285
+ const existing = _optionalChain([layer, 'access', _512 => _512.filters, 'optionalAccess', _513 => _513.find, 'call', _514 => _514((f) => f.kind === "blur")]);
12200
12286
  const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
12201
12287
  if (radius > 0) {
12202
12288
  filters.push({
12203
- id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _507 => _507.id]), () => ( (layer.source === "document" ? _chunkS55JFWDAcjs.BLUR_FILTER_ID : _chunkS55JFWDAcjs.newLayerId.call(void 0, "flt")))),
12289
+ id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _515 => _515.id]), () => ( (layer.source === "document" ? _chunkS55JFWDAcjs.BLUR_FILTER_ID : _chunkS55JFWDAcjs.newLayerId.call(void 0, "flt")))),
12204
12290
  kind: "blur",
12205
12291
  enabled: true,
12206
12292
  radius
@@ -12296,7 +12382,7 @@ function collectStateTiles(layers, into) {
12296
12382
  if (l.type === "shape" || l.type === "type") _chunk474IQG74cjs.collectTiles.call(void 0, l.surface, into);
12297
12383
  if (l.type === "smart") {
12298
12384
  _chunk474IQG74cjs.collectTiles.call(void 0, l.surface, into);
12299
- if (_optionalChain([l, 'access', _508 => _508.smartFilters, 'optionalAccess', _509 => _509.mask])) _chunk474IQG74cjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
12385
+ if (_optionalChain([l, 'access', _516 => _516.smartFilters, 'optionalAccess', _517 => _517.mask])) _chunk474IQG74cjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
12300
12386
  if (l.contents.raster) _chunk474IQG74cjs.collectTiles.call(void 0, l.contents.raster, into);
12301
12387
  if (l.contents.document) collectStateTiles(l.contents.document.layers, into);
12302
12388
  }
@@ -12328,7 +12414,7 @@ function pixelsOnly(layers) {
12328
12414
  for (const l of layers) {
12329
12415
  if (l.type === "adjustment") continue;
12330
12416
  if (l.type === "group") out.push({ ...l, children: pixelsOnly(l.children) });
12331
- else if (l.type === "pixel" && _optionalChain([l, 'access', _510 => _510.filters, 'optionalAccess', _511 => _511.length])) {
12417
+ else if (l.type === "pixel" && _optionalChain([l, 'access', _518 => _518.filters, 'optionalAccess', _519 => _519.length])) {
12332
12418
  const p = { ...l };
12333
12419
  delete p.filters;
12334
12420
  out.push(p);
@@ -12394,7 +12480,7 @@ function toHex(c) {
12394
12480
  return "#" + [c[0], c[1], c[2]].map((v) => Math.round(v).toString(16).padStart(2, "0")).join("");
12395
12481
  }
12396
12482
  function normalizeSelection(mask) {
12397
- return _optionalChain([mask, 'optionalAccess', _512 => _512.bounds]) ? mask : null;
12483
+ return _optionalChain([mask, 'optionalAccess', _520 => _520.bounds]) ? mask : null;
12398
12484
  }
12399
12485
  function sameSelection(a, b) {
12400
12486
  if (a.width !== b.width || a.height !== b.height) return false;
@@ -12604,7 +12690,7 @@ function loadImageEditorDocument(input) {
12604
12690
  }
12605
12691
  const state = { version: 1, ...result.value };
12606
12692
  if (isV2) {
12607
- if (_optionalChain([state, 'access', _513 => _513.adjustments, 'access', _514 => _514.layers, 'optionalAccess', _515 => _515.length])) state.version = 2;
12693
+ if (_optionalChain([state, 'access', _521 => _521.adjustments, 'access', _522 => _522.layers, 'optionalAccess', _523 => _523.length])) state.version = 2;
12608
12694
  result.report.version = 2;
12609
12695
  }
12610
12696
  if (state.selection === void 0) delete state.selection;
@@ -12812,7 +12898,7 @@ function findAdjustmentControl(id) {
12812
12898
  }
12813
12899
  function findLayerControl(kind, id) {
12814
12900
  if (id === "opacity") return ADJUSTMENT_LAYER_OPACITY_CONTROL;
12815
- return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _516 => _516[kind], 'optionalAccess', _517 => _517.find, 'call', _518 => _518((c) => c.id === id)]);
12901
+ return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _524 => _524[kind], 'optionalAccess', _525 => _525.find, 'call', _526 => _526((c) => c.id === id)]);
12816
12902
  }
12817
12903
  function clampControlValue(spec, v) {
12818
12904
  if (typeof v !== "number" || !Number.isFinite(v)) return spec.default;
@@ -13289,7 +13375,7 @@ function summary(controller) {
13289
13375
  const area = _chunkSS53NNZOcjs.selectionArea.call(void 0, sel);
13290
13376
  return {
13291
13377
  empty: !sel,
13292
- bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _519 => _519.bounds]), () => ( null)),
13378
+ bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _527 => _527.bounds]), () => ( null)),
13293
13379
  /** Σ coverage in pixels. */
13294
13380
  area: Math.round(area),
13295
13381
  percent: Math.round(area / Math.max(1, width * height) * 1e4) / 100,
@@ -13444,7 +13530,7 @@ function createImageSelectionTools(controller) {
13444
13530
  break;
13445
13531
  }
13446
13532
  case "polygon": {
13447
- const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _520 => _520.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _521 => _521.y]), NaN) })) : [];
13533
+ const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _528 => _528.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _529 => _529.y]), NaN) })) : [];
13448
13534
  if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
13449
13535
  throw new Error("polygon needs points: at least 3 { x, y } vertices.");
13450
13536
  }
@@ -13579,7 +13665,7 @@ function createImageSelectionTools(controller) {
13579
13665
  },
13580
13666
  annotations: writeAnnotations("Refine the selection edge"),
13581
13667
  handler: async (params) => {
13582
- const edits = Array.isArray(params.edits) ? params.edits.map((e) => e.kind === "object" ? { ...e } : { ...e, points: (_nullishCoalesce(e.points, () => ( []))).map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _522 => _522.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _523 => _523.y]), NaN) })) }) : [];
13668
+ const edits = Array.isArray(params.edits) ? params.edits.map((e) => e.kind === "object" ? { ...e } : { ...e, points: (_nullishCoalesce(e.points, () => ( []))).map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _530 => _530.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _531 => _531.y]), NaN) })) }) : [];
13583
13669
  for (const e of edits) {
13584
13670
  if (e.kind === "object") {
13585
13671
  if (!e.rect === !e.point) throw new Error("An object edit takes rect (a box around the object) or point (on it).");
@@ -13744,7 +13830,7 @@ function createImageSelectionTools(controller) {
13744
13830
  },
13745
13831
  annotations: writeAnnotations("Select a polygon (lasso)", true),
13746
13832
  handler: async (args) => {
13747
- const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _524 => _524.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _525 => _525.y]), NaN) })) : [];
13833
+ const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _532 => _532.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _533 => _533.y]), NaN) })) : [];
13748
13834
  if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
13749
13835
  throw new Error("points needs at least 3 { x, y } vertices in natural image pixels.");
13750
13836
  }
@@ -13781,7 +13867,7 @@ function createImageSelectionTools(controller) {
13781
13867
  },
13782
13868
  annotations: writeAnnotations("Quick Selection"),
13783
13869
  handler: async (args, context) => {
13784
- const strokes = Array.isArray(args.strokes) ? args.strokes.map((s) => Array.isArray(s) ? s.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _526 => _526.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _527 => _527.y]), NaN) })) : []) : [];
13870
+ const strokes = Array.isArray(args.strokes) ? args.strokes.map((s) => Array.isArray(s) ? s.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _534 => _534.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _535 => _535.y]), NaN) })) : []) : [];
13785
13871
  if (!strokes.length || strokes.some((s) => !s.length || !s.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y)))) {
13786
13872
  throw new Error("strokes needs at least one stroke of { x, y } points in natural image pixels.");
13787
13873
  }
@@ -13790,7 +13876,7 @@ function createImageSelectionTools(controller) {
13790
13876
  mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, args.mode),
13791
13877
  sampleAllLayers: args.sampleAllLayers,
13792
13878
  enhanceEdge: args.enhanceEdge,
13793
- signal: _optionalChain([context, 'optionalAccess', _528 => _528.signal])
13879
+ signal: _optionalChain([context, 'optionalAccess', _536 => _536.signal])
13794
13880
  });
13795
13881
  return { ...summary(controller), ...uncertainty(controller) };
13796
13882
  }
@@ -13828,7 +13914,7 @@ function createImageSelectionTools(controller) {
13828
13914
  sampleAllLayers: args.sampleAllLayers,
13829
13915
  enhanceEdge: args.enhanceEdge,
13830
13916
  useModel: args.useModel,
13831
- signal: _optionalChain([context, 'optionalAccess', _529 => _529.signal])
13917
+ signal: _optionalChain([context, 'optionalAccess', _537 => _537.signal])
13832
13918
  };
13833
13919
  const { method } = rect2 ? await controller.selectObject({ rect: { x: num2(rect2.x, NaN), y: num2(rect2.y, NaN), width: num2(rect2.width, NaN), height: num2(rect2.height, NaN) } }, options) : await controller.selectObject({ point: { x: num2(point.x, NaN), y: num2(point.y, NaN) } }, options);
13834
13920
  return { ...summary(controller), method, ...uncertainty(controller) };
@@ -13857,7 +13943,7 @@ function createImageSelectionTools(controller) {
13857
13943
  softness: args.softness === void 0 ? void 0 : num2(args.softness, 4),
13858
13944
  mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, args.mode),
13859
13945
  sampleAllLayers: args.sampleAllLayers,
13860
- signal: _optionalChain([context, 'optionalAccess', _530 => _530.signal])
13946
+ signal: _optionalChain([context, 'optionalAccess', _538 => _538.signal])
13861
13947
  });
13862
13948
  return { ...summary(controller), noiseLevel };
13863
13949
  }
@@ -13885,7 +13971,7 @@ function createImageSelectionTools(controller) {
13885
13971
  mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, args.mode),
13886
13972
  sampleAllLayers: args.sampleAllLayers,
13887
13973
  useModel: args.useModel,
13888
- signal: _optionalChain([context, 'optionalAccess', _531 => _531.signal])
13974
+ signal: _optionalChain([context, 'optionalAccess', _539 => _539.signal])
13889
13975
  });
13890
13976
  return { ...summary(controller), method, ...note ? { note } : {}, ...uncertainty(controller) };
13891
13977
  }
@@ -13983,7 +14069,7 @@ function createImageSelectionTools(controller) {
13983
14069
  await controller.selectColorRangePreset(args.preset, { ...common, falloff: num2(args.fuzziness, 20) });
13984
14070
  } else {
13985
14071
  const samples = args.samples.map((s, i) => {
13986
- if (typeof _optionalChain([s, 'optionalAccess', _532 => _532.color]) !== "string" || !/^#?[0-9a-f]{6}$/i.test(s.color.trim())) throw new Error(`samples[${i}].color must be #rrggbb.`);
14072
+ if (typeof _optionalChain([s, 'optionalAccess', _540 => _540.color]) !== "string" || !/^#?[0-9a-f]{6}$/i.test(s.color.trim())) throw new Error(`samples[${i}].color must be #rrggbb.`);
13987
14073
  const at = typeof s.x === "number" && typeof s.y === "number" ? { x: s.x, y: s.y } : void 0;
13988
14074
  return at ? { color: s.color, at } : { color: s.color };
13989
14075
  });
@@ -14225,7 +14311,7 @@ function createImageSelectionTools(controller) {
14225
14311
  annotations: writeAnnotations("Content-Aware Fill"),
14226
14312
  handler: async (args, context) => {
14227
14313
  if (!controller.getSelection()) throw new Error("Nothing is selected; select what to remove first.");
14228
- const rects = (v) => Array.isArray(v) ? v.map((r) => ({ x: num2(_optionalChain([r, 'optionalAccess', _533 => _533.x]), NaN), y: num2(_optionalChain([r, 'optionalAccess', _534 => _534.y]), NaN), width: num2(_optionalChain([r, 'optionalAccess', _535 => _535.width]), NaN), height: num2(_optionalChain([r, 'optionalAccess', _536 => _536.height]), NaN) })) : void 0;
14314
+ const rects = (v) => Array.isArray(v) ? v.map((r) => ({ x: num2(_optionalChain([r, 'optionalAccess', _541 => _541.x]), NaN), y: num2(_optionalChain([r, 'optionalAccess', _542 => _542.y]), NaN), width: num2(_optionalChain([r, 'optionalAccess', _543 => _543.width]), NaN), height: num2(_optionalChain([r, 'optionalAccess', _544 => _544.height]), NaN) })) : void 0;
14229
14315
  return controller.contentAwareFillAsync({
14230
14316
  output: args.output,
14231
14317
  sampleRadius: args.sampleRadius,
@@ -14234,10 +14320,33 @@ function createImageSelectionTools(controller) {
14234
14320
  sampleRects: rects(args.sampleRects),
14235
14321
  excludeRects: rects(args.excludeRects),
14236
14322
  samplingChannelId: typeof args.samplingChannelId === "string" ? args.samplingChannelId : void 0,
14237
- signal: _optionalChain([context, 'optionalAccess', _537 => _537.signal])
14323
+ signal: _optionalChain([context, 'optionalAccess', _545 => _545.signal])
14238
14324
  });
14239
14325
  }
14240
14326
  };
14327
+ const separateTool = {
14328
+ name: "separate_subject",
14329
+ title: "Separate the subject from its background",
14330
+ description: "Separate Subject: splits the selected subject (select it first: select_subject, select_object, quick_select) from its background in one undo step. The subject goes to a copy of the layer masked by the selection, on top and made active; a second copy becomes the background plate, with the subject's area grown by dilate px and Content-Aware Filled (fill none leaves it transparent); an alpha channel marks the filled area, so a bad patch can be loaded (load_selection_from_channel), trimmed and filled again (content_aware_fill); the source layer is hidden. Use it to move, scale or relight a subject over its own rebuilt background. 8-bit pixel layers. Can be cancelled. Returns foregroundLayerId, plateLayerId, sourceLayerId, fillChannelId, filledBounds, dilate and fill.",
14331
+ inputSchema: {
14332
+ type: "object",
14333
+ properties: {
14334
+ layerId: layerIdSchema,
14335
+ dilate: { type: "number", minimum: 0, maximum: 200, description: "Grow the hole past the subject by this many px before filling, so no fringe of it stays in the plate (default 8)." },
14336
+ fill: { type: "string", enum: ["content-aware", "none"], description: "content-aware (default) rebuilds the background in the hole; none leaves it transparent." },
14337
+ seed: { type: "integer", minimum: 0, description: "Random seed for the fill; the same seed gives the same plate (default 0)." }
14338
+ },
14339
+ additionalProperties: false
14340
+ },
14341
+ annotations: writeAnnotations("Separate the subject from its background"),
14342
+ handler: async (args, context) => controller.separateSubject({
14343
+ layerId: requireLayerId(args.layerId),
14344
+ dilate: args.dilate,
14345
+ fill: args.fill,
14346
+ seed: args.seed,
14347
+ signal: _optionalChain([context, 'optionalAccess', _546 => _546.signal])
14348
+ })
14349
+ };
14241
14350
  const copyTool = {
14242
14351
  name: "copy_pixels",
14243
14352
  title: "Copy pixels",
@@ -14475,6 +14584,7 @@ function createImageSelectionTools(controller) {
14475
14584
  strokeTool,
14476
14585
  cropTool,
14477
14586
  fillTool,
14587
+ separateTool,
14478
14588
  copyTool,
14479
14589
  cutTool,
14480
14590
  pasteTool,
@@ -14514,13 +14624,13 @@ function createImageSubjectSelectionTool(controller) {
14514
14624
  handler: async ({ target, maxSegments, mode, feather, enhanceEdge }, context) => {
14515
14625
  if (target !== void 0 && typeof target !== "string") throw new Error("target must be a description in words.");
14516
14626
  if (controller.segmentationProvider && !String(_nullishCoalesce(target, () => ( ""))).trim()) throw new Error("target must describe what to select (a model is set, and it selects by description).");
14517
- const perform = _optionalChain([context, 'optionalAccess', _538 => _538.perform]);
14627
+ const perform = _optionalChain([context, 'optionalAccess', _547 => _547.perform]);
14518
14628
  const { segments, method, note } = await controller.selectSubject(String(_nullishCoalesce(target, () => ( ""))), {
14519
14629
  mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, mode),
14520
14630
  feather: num2(feather, 0),
14521
14631
  maxSegments: typeof maxSegments === "number" ? Math.max(1, Math.round(maxSegments)) : void 0,
14522
14632
  enhanceEdge: enhanceEdge === true,
14523
- signal: _optionalChain([context, 'optionalAccess', _539 => _539.signal]),
14633
+ signal: _optionalChain([context, 'optionalAccess', _548 => _548.signal]),
14524
14634
  // Under playback the cursor traces what the model found, as a lasso, before it is selected.
14525
14635
  beforeApply: perform ? (outlines) => perform(planOutlineTrace(outlines)) : void 0
14526
14636
  });
@@ -14598,7 +14708,7 @@ async function renderImageRegion(controller, request) {
14598
14708
  const maskView = maskViewCanvas(controller, document);
14599
14709
  if (maskView) context.drawImage(maskView, rect2.x, rect2.y, rect2.width, rect2.height, 0, 0, out.width, out.height);
14600
14710
  const selection = state.selection;
14601
- if (_optionalChain([selection, 'optionalAccess', _540 => _540.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
14711
+ if (_optionalChain([selection, 'optionalAccess', _549 => _549.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
14602
14712
  const shade = selectionShade(selection, document);
14603
14713
  if (shade) context.drawImage(shade, rect2.x, rect2.y, rect2.width, rect2.height, 0, 0, out.width, out.height);
14604
14714
  }
@@ -14623,7 +14733,7 @@ function createImageCaptureSurface(controller) {
14623
14733
  return {
14624
14734
  units: "image pixels",
14625
14735
  content: whole,
14626
- selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _541 => _541.getState, 'call', _542 => _542(), 'access', _543 => _543.selection, 'optionalAccess', _544 => _544.bounds]), () => ( null)) }),
14736
+ selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _550 => _550.getState, 'call', _551 => _551(), 'access', _552 => _552.selection, 'optionalAccess', _553 => _553.bounds]), () => ( null)) }),
14627
14737
  overlays: "a shade over unselected pixels, the crop box outline and a layer mask view (set_mask_view)",
14628
14738
  maxScale: 8,
14629
14739
  render: (request) => renderImageRegion(controller, request)
@@ -14957,7 +15067,7 @@ function describeLayer(layer, activeId, boundsOf) {
14957
15067
  out.bounds = boundsOf(layer);
14958
15068
  out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
14959
15069
  out.shape = {
14960
- components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _545 => _545.live, 'optionalAccess', _546 => _546.kind]), () => ( "path")) })),
15070
+ components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _554 => _554.live, 'optionalAccess', _555 => _555.kind]), () => ( "path")) })),
14961
15071
  fill: layer.fill ? layer.fill.type : null,
14962
15072
  stroke: layer.stroke ? { width: layer.stroke.width, paint: layer.stroke.paint.type } : null
14963
15073
  };
@@ -14980,8 +15090,8 @@ function describeLayer(layer, activeId, boundsOf) {
14980
15090
  out.bounds = boundsOf(layer);
14981
15091
  out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
14982
15092
  out.contents = { id: layer.contents.id, name: layer.contents.name, kind: layer.contents.kind, width: layer.contents.width, height: layer.contents.height };
14983
- out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _547 => _547.smartFilters, 'optionalAccess', _548 => _548.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
14984
- out.filterMask = maskSummary(_optionalChain([layer, 'access', _549 => _549.smartFilters, 'optionalAccess', _550 => _550.mask]));
15093
+ out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _556 => _556.smartFilters, 'optionalAccess', _557 => _557.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
15094
+ out.filterMask = maskSummary(_optionalChain([layer, 'access', _558 => _558.smartFilters, 'optionalAccess', _559 => _559.mask]));
14985
15095
  break;
14986
15096
  }
14987
15097
  return out;
@@ -15009,7 +15119,7 @@ function createImageLayerTools(controller) {
15009
15119
  if (!loc) return null;
15010
15120
  return {
15011
15121
  ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)),
15012
- parentId: _nullishCoalesce(_optionalChain([loc, 'access', _551 => _551.parent, 'optionalAccess', _552 => _552.id]), () => ( null)),
15122
+ parentId: _nullishCoalesce(_optionalChain([loc, 'access', _560 => _560.parent, 'optionalAccess', _561 => _561.id]), () => ( null)),
15013
15123
  index: loc.index
15014
15124
  };
15015
15125
  };
@@ -15332,7 +15442,7 @@ function createImageLayerTools(controller) {
15332
15442
  if (view !== "gray" && view !== "overlay" && view !== "off") throw new Error(`Unknown view "${String(view)}". Use gray, overlay or off.`);
15333
15443
  const id = view === "off" || layerId === void 0 ? void 0 : exists(layerId);
15334
15444
  const shown = controller.setMaskView(view, id);
15335
- return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _553 => _553.mode]), () => ( "off")), layerId: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _554 => _554.layerId]), () => ( null)) };
15445
+ return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _562 => _562.mode]), () => ( "off")), layerId: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _563 => _563.layerId]), () => ( null)) };
15336
15446
  }
15337
15447
  };
15338
15448
  const AMOUNT = (what) => ({ type: "number", minimum: 0, maximum: 100, description: `${what}, in percent 0-100; 0 turns it off.` });
@@ -15931,7 +16041,7 @@ var SelectionGesture = (_class13 = class {
15931
16041
  size: _nullishCoalesce(options.quickSize, () => ( 30)),
15932
16042
  grow: q.mode === "add",
15933
16043
  enhanceEdge: _nullishCoalesce(options.quickEnhance, () => ( false)),
15934
- selection: q.mode === "add" && _optionalChain([q, 'access', _555 => _555.base, 'optionalAccess', _556 => _556.bounds]) ? _chunkUC3PWFM3cjs.serializeMask.call(void 0, q.base) : null
16044
+ selection: q.mode === "add" && _optionalChain([q, 'access', _564 => _564.base, 'optionalAccess', _565 => _565.bounds]) ? _chunkKALCIDWHcjs.serializeMask.call(void 0, q.base) : null
15935
16045
  },
15936
16046
  pixels
15937
16047
  );
@@ -15956,14 +16066,14 @@ var SelectionGesture = (_class13 = class {
15956
16066
  const { tool } = this.getOptions();
15957
16067
  if (tool === "quick") return null;
15958
16068
  if (tool === "lasso") return this.points.length > 1 ? this.points.slice() : null;
15959
- const rect2 = _chunkUC3PWFM3cjs.normalizeRect.call(void 0, {
16069
+ const rect2 = _chunkKALCIDWHcjs.normalizeRect.call(void 0, {
15960
16070
  x: this.start.x,
15961
16071
  y: this.start.y,
15962
16072
  width: this.current.x - this.start.x,
15963
16073
  height: this.current.y - this.start.y
15964
16074
  });
15965
16075
  if (rect2.width < 1 && rect2.height < 1) return null;
15966
- if (tool === "ellipse") return _chunkUC3PWFM3cjs.ellipsePoints.call(void 0, rect2);
16076
+ if (tool === "ellipse") return _chunkKALCIDWHcjs.ellipsePoints.call(void 0, rect2);
15967
16077
  return [
15968
16078
  { x: rect2.x, y: rect2.y },
15969
16079
  { x: rect2.x + rect2.width, y: rect2.y },
@@ -16124,7 +16234,7 @@ var SelectionGesture = (_class13 = class {
16124
16234
  const options = this.getOptions();
16125
16235
  const mode = selectionModeFromModifiers(_nullishCoalesce(modifiers, () => ( this.modifiers)), options.mode);
16126
16236
  if (options.tool === "object") {
16127
- const rect3 = _chunkUC3PWFM3cjs.normalizeRect.call(void 0, { x: this.start.x, y: this.start.y, width: this.current.x - this.start.x, height: this.current.y - this.start.y });
16237
+ const rect3 = _chunkKALCIDWHcjs.normalizeRect.call(void 0, { x: this.start.x, y: this.start.y, width: this.current.x - this.start.x, height: this.current.y - this.start.y });
16128
16238
  this.start = null;
16129
16239
  this.current = null;
16130
16240
  this.points = [];
@@ -16142,7 +16252,7 @@ var SelectionGesture = (_class13 = class {
16142
16252
  this.start = null;
16143
16253
  this.current = null;
16144
16254
  this.points = [];
16145
- const strokeMode = _nullishCoalesce(_optionalChain([this, 'access', _557 => _557.quick, 'optionalAccess', _558 => _558.mode]), () => ( (mode === "replace" && this.controller.getSelection() ? "add" : mode)));
16255
+ const strokeMode = _nullishCoalesce(_optionalChain([this, 'access', _566 => _566.quick, 'optionalAccess', _567 => _567.mode]), () => ( (mode === "replace" && this.controller.getSelection() ? "add" : mode)));
16146
16256
  this.quick = null;
16147
16257
  this.pending = this.controller.quickSelect([stroke], {
16148
16258
  size: _nullishCoalesce(options.quickSize, () => ( 30)),
@@ -16158,7 +16268,7 @@ var SelectionGesture = (_class13 = class {
16158
16268
  return false;
16159
16269
  }
16160
16270
  const path = this.draftPath;
16161
- const rect2 = _chunkUC3PWFM3cjs.normalizeRect.call(void 0, {
16271
+ const rect2 = _chunkKALCIDWHcjs.normalizeRect.call(void 0, {
16162
16272
  x: this.start.x,
16163
16273
  y: this.start.y,
16164
16274
  width: this.current.x - this.start.x,
@@ -16303,7 +16413,7 @@ function handleSelectionShortcut(controller, e, onError) {
16303
16413
  try {
16304
16414
  fn();
16305
16415
  } catch (err) {
16306
- _optionalChain([onError, 'optionalCall', _559 => _559(err instanceof Error ? err.message : String(err))]);
16416
+ _optionalChain([onError, 'optionalCall', _568 => _568(err instanceof Error ? err.message : String(err))]);
16307
16417
  }
16308
16418
  return true;
16309
16419
  };
@@ -16318,9 +16428,9 @@ function handleMaskViewKey(controller, e) {
16318
16428
  if (e.ctrlKey || e.metaKey || e.altKey || e.key !== "\\") return false;
16319
16429
  const id = controller.getState().activeLayerId;
16320
16430
  const layer = id ? controller.getLayer(id) : null;
16321
- if (!_optionalChain([layer, 'optionalAccess', _560 => _560.mask]) || layer.mask.source) return false;
16431
+ if (!_optionalChain([layer, 'optionalAccess', _569 => _569.mask]) || layer.mask.source) return false;
16322
16432
  const view = controller.getMaskView();
16323
- controller.setMaskView(_optionalChain([view, 'optionalAccess', _561 => _561.layerId]) === layer.id && view.mode === "overlay" ? "off" : "overlay", layer.id);
16433
+ controller.setMaskView(_optionalChain([view, 'optionalAccess', _570 => _570.layerId]) === layer.id && view.mode === "overlay" ? "off" : "overlay", layer.id);
16324
16434
  return true;
16325
16435
  }
16326
16436
  function handleQuickMaskKey(controller, e) {
@@ -16534,7 +16644,7 @@ var PaintGesture = (_class14 = class {
16534
16644
  const layer = this.controller.getActiveLayer();
16535
16645
  if (!layer) throw new Error("Select a layer to move in the Layers panel.");
16536
16646
  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.`);
16537
- if (_optionalChain([layer, 'access', _562 => _562.locks, 'optionalAccess', _563 => _563.all]) || _optionalChain([layer, 'access', _564 => _564.locks, 'optionalAccess', _565 => _565.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
16647
+ if (_optionalChain([layer, 'access', _571 => _571.locks, 'optionalAccess', _572 => _572.all]) || _optionalChain([layer, 'access', _573 => _573.locks, 'optionalAccess', _574 => _574.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
16538
16648
  const origin = layer.type === "pixel" ? { ...layer.offset } : layer.type === "smart" ? { ...layer.placement.corners[0] } : (() => {
16539
16649
  const b = _chunkS55JFWDAcjs.shapeGeometryBounds.call(void 0, layer);
16540
16650
  return b ? { x: b.x, y: b.y } : { x: 0, y: 0 };
@@ -16591,7 +16701,7 @@ var PaintGesture = (_class14 = class {
16591
16701
  this.move = null;
16592
16702
  }
16593
16703
  cancel() {
16594
- _optionalChain([this, 'access', _566 => _566.stroke, 'optionalAccess', _567 => _567.cancel, 'call', _568 => _568()]);
16704
+ _optionalChain([this, 'access', _575 => _575.stroke, 'optionalAccess', _576 => _576.cancel, 'call', _577 => _577()]);
16595
16705
  this.stroke = null;
16596
16706
  this.move = null;
16597
16707
  }
@@ -17001,7 +17111,7 @@ var TARGET2 = {
17001
17111
  };
17002
17112
  var SAMPLE = {
17003
17113
  type: "string",
17004
- enum: [..._chunkYF3YZZ6Gcjs.RETOUCH_SAMPLES],
17114
+ enum: [..._chunk2ONK3ERDcjs.RETOUCH_SAMPLES],
17005
17115
  description: "What is sampled: current (default: the target layer), current-below (the composite of this layer and everything under it), or all (the composite of every layer). Sample current-below or all to retouch onto an empty layer above the image."
17006
17116
  };
17007
17117
  function readTarget2(args) {
@@ -17080,7 +17190,7 @@ function createImageRetouchTools(controller) {
17080
17190
  type: "object",
17081
17191
  properties: {
17082
17192
  points: POINTS,
17083
- type: { type: "string", enum: [..._chunkYF3YZZ6Gcjs.SPOT_HEAL_TYPES], description: "proximity-match (default the current option), content-aware or smooth." },
17193
+ type: { type: "string", enum: [..._chunk2ONK3ERDcjs.SPOT_HEAL_TYPES], description: "proximity-match (default the current option), content-aware or smooth." },
17084
17194
  sample: SAMPLE,
17085
17195
  brush: BRUSH2,
17086
17196
  ...TARGET2
@@ -17113,7 +17223,7 @@ function createImageRetouchTools(controller) {
17113
17223
  type: "object",
17114
17224
  properties: {
17115
17225
  points: POINTS,
17116
- range: { type: "string", enum: [..._chunkYF3YZZ6Gcjs.TONE_RANGES], description: `Which tones to ${verb} most: shadows, midtones (default the current option, midtones) or highlights.` },
17226
+ range: { type: "string", enum: [..._chunk2ONK3ERDcjs.TONE_RANGES], description: `Which tones to ${verb} most: shadows, midtones (default the current option, midtones) or highlights.` },
17117
17227
  exposure: { type: "number", minimum: 0, maximum: 1, description: "Strength 0..1 (default the current option, 0.5). Overlapping dabs in one stroke never go past it; another stroke builds on it." },
17118
17228
  protectTones: { type: "boolean", description: "Change luma only, keeping hue and saturation (default true)." },
17119
17229
  brush: BRUSH2,
@@ -17222,8 +17332,8 @@ function createImageRetouchTools(controller) {
17222
17332
  properties: {
17223
17333
  aligned: { type: "boolean", description: "Clone / heal: keep the offset from stroke to stroke (default true)." },
17224
17334
  sample: SAMPLE,
17225
- spotType: { type: "string", enum: [..._chunkYF3YZZ6Gcjs.SPOT_HEAL_TYPES], description: "Spot heal: proximity-match (default), content-aware or smooth." },
17226
- range: { type: "string", enum: [..._chunkYF3YZZ6Gcjs.TONE_RANGES], description: "Dodge / burn: shadows, midtones (default) or highlights." },
17335
+ spotType: { type: "string", enum: [..._chunk2ONK3ERDcjs.SPOT_HEAL_TYPES], description: "Spot heal: proximity-match (default), content-aware or smooth." },
17336
+ range: { type: "string", enum: [..._chunk2ONK3ERDcjs.TONE_RANGES], description: "Dodge / burn: shadows, midtones (default) or highlights." },
17227
17337
  exposure: { type: "number", minimum: 0, maximum: 1, description: "Dodge / burn strength 0..1 (default 0.5)." },
17228
17338
  protectTones: { type: "boolean", description: "Dodge / burn: keep hue and saturation (default true)." },
17229
17339
  spongeMode: { type: "string", enum: ["desaturate", "saturate"], description: "Sponge: desaturate (default) or saturate." },
@@ -17672,7 +17782,7 @@ function createImageSmartObjectTools(controller) {
17672
17782
  const layerSummary = (id) => {
17673
17783
  const s = controller.getState();
17674
17784
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, s.layers, id);
17675
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _569 => _569.parent, 'optionalAccess', _570 => _570.id]), () => ( null)), index: loc.index } : null;
17785
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _578 => _578.parent, 'optionalAccess', _579 => _579.id]), () => ( null)), index: loc.index } : null;
17676
17786
  };
17677
17787
  const getSmart = {
17678
17788
  name: "get_smart_object",
@@ -18229,7 +18339,7 @@ function createImageShapeTools(controller) {
18229
18339
  const layerSummary = (id) => {
18230
18340
  const s = controller.getState();
18231
18341
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, s.layers, id);
18232
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _571 => _571.parent, 'optionalAccess', _572 => _572.id]), () => ( null)), index: loc.index } : null;
18342
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _580 => _580.parent, 'optionalAccess', _581 => _581.id]), () => ( null)), index: loc.index } : null;
18233
18343
  };
18234
18344
  const get = {
18235
18345
  name: "get_shape_layer",
@@ -18460,7 +18570,7 @@ function createImageShapeTools(controller) {
18460
18570
  const mode = args.mode;
18461
18571
  controller.pathToSelection(_nullishCoalesce(fromPathId(args), () => ( pathSpec(args))), { feather: args.feather, antiAlias: args.antiAlias, mode });
18462
18572
  const sel = controller.getSelection();
18463
- return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _573 => _573.bounds]), () => ( null)), area: Math.round(sel ? _chunkSS53NNZOcjs.selectionArea.call(void 0, sel) : 0) };
18573
+ return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _582 => _582.bounds]), () => ( null)), area: Math.round(sel ? _chunkSS53NNZOcjs.selectionArea.call(void 0, sel) : 0) };
18464
18574
  }
18465
18575
  };
18466
18576
  const getVectorMask = {
@@ -18492,7 +18602,7 @@ function createImageShapeTools(controller) {
18492
18602
  handler: (args) => {
18493
18603
  const id = layerArg(args.layerId);
18494
18604
  const spec = _nullishCoalesce(fromPathId(args), () => ( pathSpec(args)));
18495
- const hasPath = _optionalChain([spec, 'access', _574 => _574.components, 'optionalAccess', _575 => _575.length]) || spec.shape !== void 0 || spec.subpaths !== void 0;
18605
+ const hasPath = _optionalChain([spec, 'access', _583 => _583.components, 'optionalAccess', _584 => _584.length]) || spec.shape !== void 0 || spec.subpaths !== void 0;
18496
18606
  const from = _nullishCoalesce(args.from, () => ( (hasPath ? "path" : "reveal-all")));
18497
18607
  if (from !== "selection" && TRACE_KEYS.some((k) => args[k] !== void 0)) throw new Error("tolerance, cornerRoundness and minArea apply only to from selection.");
18498
18608
  controller.addVectorMask(id, from, spec, traceOptions(args));
@@ -18600,7 +18710,7 @@ function createImageShapeTools(controller) {
18600
18710
  annotations: { title: "Add a document path", ...WRITE8 },
18601
18711
  handler: (args) => {
18602
18712
  const spec = pathSpec(args);
18603
- if (!_optionalChain([spec, 'access', _576 => _576.components, 'optionalAccess', _577 => _577.length]) && spec.shape === void 0 && spec.subpaths === void 0) throw new Error("Give the path as shape, subpaths or components.");
18713
+ if (!_optionalChain([spec, 'access', _585 => _585.components, 'optionalAccess', _586 => _586.length]) && spec.shape === void 0 && spec.subpaths === void 0) throw new Error("Give the path as shape, subpaths or components.");
18604
18714
  return { path: pathSummary(controller.addPath({ ...spec, name: args.name }).id) };
18605
18715
  }
18606
18716
  };
@@ -18744,7 +18854,7 @@ function createImageTypeTools(controller) {
18744
18854
  const layerSummary = (id) => {
18745
18855
  const s = controller.getState();
18746
18856
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, s.layers, id);
18747
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _578 => _578.parent, 'optionalAccess', _579 => _579.id]), () => ( null)), index: loc.index } : null;
18857
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _587 => _587.parent, 'optionalAccess', _588 => _588.id]), () => ( null)), index: loc.index } : null;
18748
18858
  };
18749
18859
  const range = (args) => ({ start: args.start, end: args.end });
18750
18860
  const listFonts = {
@@ -18753,7 +18863,7 @@ function createImageTypeTools(controller) {
18753
18863
  description: "Returns the font families type layers can use here (generic families such as sans-serif always work). Changes nothing.",
18754
18864
  inputSchema: { type: "object", properties: {}, additionalProperties: false },
18755
18865
  annotations: { title: "List fonts", ...READ11 },
18756
- handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _580 => _580.getTextShaper, 'call', _581 => _581(), 'optionalAccess', _582 => _582.id]), () => ( null)) })
18866
+ handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _589 => _589.getTextShaper, 'call', _590 => _590(), 'optionalAccess', _591 => _591.id]), () => ( null)) })
18757
18867
  };
18758
18868
  const get = {
18759
18869
  name: "get_text_layer",
@@ -18909,7 +19019,7 @@ function createImageTypeTools(controller) {
18909
19019
  const init = pick2(args, ["text", "x", "y", "orientation", "box", "style", "paragraph", "rotation", "mode", "feather", "antiAlias"]);
18910
19020
  controller.selectTextShape(init);
18911
19021
  const sel = controller.getSelection();
18912
- return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _583 => _583.bounds]), () => ( null)), area: Math.round(sel ? _chunkSS53NNZOcjs.selectionArea.call(void 0, sel) : 0) };
19022
+ return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _592 => _592.bounds]), () => ( null)), area: Math.round(sel ? _chunkSS53NNZOcjs.selectionArea.call(void 0, sel) : 0) };
18913
19023
  }
18914
19024
  };
18915
19025
  return [listFonts, get, add2, setText, setStyle, setParagraph, setFrame, setOrientation, toShape, typeMask];
@@ -19088,7 +19198,7 @@ function createImageEditorToolProvider(controller, options = {}) {
19088
19198
  for (const ref of [aboveId, parentId]) {
19089
19199
  if (ref !== void 0 && !controller.getLayer(ref)) throw new Error(`Unknown layer "${ref}". Call list_layers for ids.`);
19090
19200
  }
19091
- if (parentId !== void 0 && _optionalChain([controller, 'access', _584 => _584.getLayer, 'call', _585 => _585(parentId), 'optionalAccess', _586 => _586.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
19201
+ if (parentId !== void 0 && _optionalChain([controller, 'access', _593 => _593.getLayer, 'call', _594 => _594(parentId), 'optionalAccess', _595 => _595.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
19092
19202
  const id = controller.addAdjustmentLayer({ kind, params, opacity, blend, name, aboveId, parentId, useSelection: useSelection !== false });
19093
19203
  const layer = controller.getAdjustmentLayer(id);
19094
19204
  return { layer: JSON.parse(JSON.stringify(layer)), index: controller.getAdjustmentLayers().findIndex((l) => l.id === id), masked: Boolean(layer.mask) };
@@ -19423,7 +19533,7 @@ var SelectAndMaskSession = (_class15 = class {
19423
19533
  const h = Math.max(1, Math.round(px2.height * s));
19424
19534
  this.previewPixels = scalePixels(px2, w, h);
19425
19535
  this.belowPreview = this.below ? scalePixels(this.below, w, h) : null;
19426
- this.baseMask = _optionalChain([this, 'access', _587 => _587.base, 'optionalAccess', _588 => _588.bounds]) ? s === 1 ? this.base : _chunkSS53NNZOcjs.resizeSelection.call(void 0, this.base, w, h) : null;
19536
+ this.baseMask = _optionalChain([this, 'access', _596 => _596.base, 'optionalAccess', _597 => _597.bounds]) ? s === 1 ? this.base : _chunkSS53NNZOcjs.resizeSelection.call(void 0, this.base, w, h) : null;
19427
19537
  }
19428
19538
  /**
19429
19539
  * Recomputes the preview mask from the base selection, the strokes and the settings: at once on
@@ -19440,8 +19550,8 @@ var SelectAndMaskSession = (_class15 = class {
19440
19550
  const { scale } = this.previewSize;
19441
19551
  const edits = [...this.editsList, ...this.live ? [this.live] : []].map((e) => scaleEdit(e, scale));
19442
19552
  try {
19443
- const { selection, refineBrush } = _chunkUC3PWFM3cjs.applyRefineEdits.call(void 0, px2, this.baseMask, edits, px2.width, px2.height);
19444
- this.previewMask = _optionalChain([selection, 'optionalAccess', _589 => _589.bounds]) ? _chunkSS53NNZOcjs.refineSelection.call(void 0, px2, selection, scaleParams(this.settingsValue.params, scale), refineBrush) : null;
19553
+ const { selection, refineBrush } = _chunkKALCIDWHcjs.applyRefineEdits.call(void 0, px2, this.baseMask, edits, px2.width, px2.height);
19554
+ this.previewMask = _optionalChain([selection, 'optionalAccess', _598 => _598.bounds]) ? _chunkSS53NNZOcjs.refineSelection.call(void 0, px2, selection, scaleParams(this.settingsValue.params, scale), refineBrush) : null;
19445
19555
  this.error = null;
19446
19556
  } catch (err) {
19447
19557
  this.previewMask = null;
@@ -19462,7 +19572,7 @@ var SelectAndMaskSession = (_class15 = class {
19462
19572
  const edits = [...this.editsList, ...this.live ? [this.live] : []].map((e) => scaleEdit(e, scale));
19463
19573
  try {
19464
19574
  const { mask } = await this.controller.runSelectionJob(
19465
- { op: "refine-preview", base: this.baseMask ? _chunkUC3PWFM3cjs.serializeMask.call(void 0, this.baseMask) : null, edits, params: scaleParams(this.settingsValue.params, scale) },
19575
+ { op: "refine-preview", base: this.baseMask ? _chunkKALCIDWHcjs.serializeMask.call(void 0, this.baseMask) : null, edits, params: scaleParams(this.settingsValue.params, scale) },
19466
19576
  px2
19467
19577
  );
19468
19578
  this.previewMask = mask.bounds ? mask : null;
@@ -19547,7 +19657,7 @@ var SelectAndMaskSession = (_class15 = class {
19547
19657
  break;
19548
19658
  }
19549
19659
  case "on-layers": {
19550
- const under = _optionalChain([this, 'access', _590 => _590.belowPreview, 'optionalAccess', _591 => _591.data]);
19660
+ const under = _optionalChain([this, 'access', _599 => _599.belowPreview, 'optionalAccess', _600 => _600.data]);
19551
19661
  let ur = checker;
19552
19662
  let ug = checker;
19553
19663
  let ub = checker;
@@ -19843,7 +19953,7 @@ function maskThumbnailClick(controller, layer, e) {
19843
19953
  } else if (e.altKey && !layer.mask.source) {
19844
19954
  const mode = e.shiftKey ? "overlay" : "gray";
19845
19955
  const view = controller.getMaskView();
19846
- controller.setMaskView(_optionalChain([view, 'optionalAccess', _592 => _592.layerId]) === layer.id && view.mode === mode ? "off" : mode, layer.id);
19956
+ controller.setMaskView(_optionalChain([view, 'optionalAccess', _601 => _601.layerId]) === layer.id && view.mode === mode ? "off" : mode, layer.id);
19847
19957
  } else if (e.shiftKey) {
19848
19958
  controller.setLayerMaskProps(layer.id, { enabled: layer.mask.enabled === false });
19849
19959
  } else {
@@ -19907,7 +20017,7 @@ function layerHasThumbnail(layer) {
19907
20017
  return layer.type === "pixel" || layer.type === "shape" || layer.type === "type";
19908
20018
  }
19909
20019
  function layerWarning(layer) {
19910
- if (layer.type === "type" && _optionalChain([layer, 'access', _593 => _593.missingFonts, 'optionalAccess', _594 => _594.length])) {
20020
+ if (layer.type === "type" && _optionalChain([layer, 'access', _602 => _602.missingFonts, 'optionalAccess', _603 => _603.length])) {
19911
20021
  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."}`;
19912
20022
  }
19913
20023
  return null;
@@ -19930,16 +20040,16 @@ function layerMenu(controller) {
19930
20040
  const siblings = loc ? loc.parent ? loc.parent.children : s.layers : [];
19931
20041
  const below = loc ? siblings[loc.index - 1] : void 0;
19932
20042
  const hasSel = controller.hasSelection;
19933
- const isPixel = _optionalChain([active, 'optionalAccess', _595 => _595.type]) === "pixel";
19934
- const hasOwnPixels = _optionalChain([active, 'optionalAccess', _596 => _596.type]) === "pixel" || _optionalChain([active, 'optionalAccess', _597 => _597.type]) === "shape" || _optionalChain([active, 'optionalAccess', _598 => _598.type]) === "type" || _optionalChain([active, 'optionalAccess', _599 => _599.type]) === "smart";
20043
+ const isPixel = _optionalChain([active, 'optionalAccess', _604 => _604.type]) === "pixel";
20044
+ const hasOwnPixels = _optionalChain([active, 'optionalAccess', _605 => _605.type]) === "pixel" || _optionalChain([active, 'optionalAccess', _606 => _606.type]) === "shape" || _optionalChain([active, 'optionalAccess', _607 => _607.type]) === "type" || _optionalChain([active, 'optionalAccess', _608 => _608.type]) === "smart";
19935
20045
  return [
19936
20046
  { action: "new-layer", label: "New Layer", enabled: true },
19937
20047
  { action: "new-group", label: "New Group", enabled: true },
19938
20048
  { action: "duplicate", label: "Duplicate Layer", enabled: Boolean(active) },
19939
20049
  { action: "delete", label: "Delete Layer", enabled: Boolean(active) },
19940
20050
  { action: "group-selected", label: "Group Layer", enabled: Boolean(active) },
19941
- { action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _600 => _600.type]) === "group" },
19942
- { action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _601 => _601.visible]) && _optionalChain([below, 'optionalAccess', _602 => _602.type]) === "pixel") },
20051
+ { action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _609 => _609.type]) === "group" },
20052
+ { action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _610 => _610.visible]) && _optionalChain([below, 'optionalAccess', _611 => _611.type]) === "pixel") },
19943
20053
  { action: "merge-visible", label: "Merge Visible", enabled: s.layers.some((l) => l.visible) },
19944
20054
  { action: "flatten", label: "Flatten Image", enabled: s.layers.length > 0 },
19945
20055
  { action: "via-copy", label: "Layer via Copy", enabled: isPixel && hasSel },
@@ -19949,27 +20059,27 @@ function layerMenu(controller) {
19949
20059
  { action: "add-mask-hide-selection", label: "Add Mask Hiding Selection", enabled: Boolean(active) && hasSel },
19950
20060
  { action: "add-mask-transparency", label: "Add Mask from Transparency", enabled: hasOwnPixels },
19951
20061
  { action: "select-transparency", label: "Select Layer Pixels", enabled: hasOwnPixels },
19952
- { action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _603 => _603.mask])) },
19953
- { action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _604 => _604.mask])) },
19954
- { action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _605 => _605.mask, 'optionalAccess', _606 => _606.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _607 => _607.mask])) },
19955
- { action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _608 => _608.mask, 'optionalAccess', _609 => _609.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _610 => _610.mask]) && !active.mask.source) },
19956
- { action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _611 => _611.mask, 'optionalAccess', _612 => _612.source])) },
19957
- { action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _613 => _613.mask, 'optionalAccess', _614 => _614.source])) },
19958
- { action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _615 => _615.mask, 'optionalAccess', _616 => _616.source])) && hasSel },
19959
- { action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _617 => _617.vectorMask])) },
19960
- { action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess', _618 => _618.vectorMask, 'optionalAccess', _619 => _619.enabled]) === false ? "Enable Vector Mask" : "Disable Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _620 => _620.vectorMask])) },
19961
- { action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _621 => _621.vectorMask])) },
19962
- { action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _622 => _622.type]) === "annotation" || _optionalChain([active, 'optionalAccess', _623 => _623.type]) === "smart" || _optionalChain([active, 'optionalAccess', _624 => _624.type]) === "shape" || _optionalChain([active, 'optionalAccess', _625 => _625.type]) === "type" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _626 => _626.type]) === "pixel" && _optionalChain([active, 'access', _627 => _627.filters, 'optionalAccess', _628 => _628.length])) },
20062
+ { action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _612 => _612.mask])) },
20063
+ { action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _613 => _613.mask])) },
20064
+ { action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _614 => _614.mask, 'optionalAccess', _615 => _615.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _616 => _616.mask])) },
20065
+ { action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _617 => _617.mask, 'optionalAccess', _618 => _618.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _619 => _619.mask]) && !active.mask.source) },
20066
+ { action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _620 => _620.mask, 'optionalAccess', _621 => _621.source])) },
20067
+ { action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _622 => _622.mask, 'optionalAccess', _623 => _623.source])) },
20068
+ { action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _624 => _624.mask, 'optionalAccess', _625 => _625.source])) && hasSel },
20069
+ { action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _626 => _626.vectorMask])) },
20070
+ { action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess', _627 => _627.vectorMask, 'optionalAccess', _628 => _628.enabled]) === false ? "Enable Vector Mask" : "Disable Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _629 => _629.vectorMask])) },
20071
+ { action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _630 => _630.vectorMask])) },
20072
+ { action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _631 => _631.type]) === "annotation" || _optionalChain([active, 'optionalAccess', _632 => _632.type]) === "smart" || _optionalChain([active, 'optionalAccess', _633 => _633.type]) === "shape" || _optionalChain([active, 'optionalAccess', _634 => _634.type]) === "type" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _635 => _635.type]) === "pixel" && _optionalChain([active, 'access', _636 => _636.filters, 'optionalAccess', _637 => _637.length])) },
19963
20073
  { action: "convert-smart", label: "Convert to Smart Object", enabled: Boolean(active && active.type !== "annotation") },
19964
- { action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _629 => _629.type]) === "smart" },
19965
- { action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _630 => _630.type]) === "smart" },
19966
- { action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess', _631 => _631.type]) === "smart" && !_optionalChain([active, 'access', _632 => _632.smartFilters, 'optionalAccess', _633 => _633.mask]) },
19967
- { action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _634 => _634.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
20074
+ { action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _638 => _638.type]) === "smart" },
20075
+ { action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _639 => _639.type]) === "smart" },
20076
+ { action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess', _640 => _640.type]) === "smart" && !_optionalChain([active, 'access', _641 => _641.smartFilters, 'optionalAccess', _642 => _642.mask]) },
20077
+ { action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _643 => _643.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
19968
20078
  ];
19969
20079
  }
19970
20080
  async function runLayerMenuAction(controller, action) {
19971
20081
  const active = controller.getActiveLayer();
19972
- const id = _optionalChain([active, 'optionalAccess', _635 => _635.id]);
20082
+ const id = _optionalChain([active, 'optionalAccess', _644 => _644.id]);
19973
20083
  try {
19974
20084
  switch (action) {
19975
20085
  case "new-layer":
@@ -20025,10 +20135,10 @@ async function runLayerMenuAction(controller, action) {
20025
20135
  if (id) controller.removeLayerMask(id);
20026
20136
  break;
20027
20137
  case "toggle-mask":
20028
- if (id && _optionalChain([active, 'optionalAccess', _636 => _636.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
20138
+ if (id && _optionalChain([active, 'optionalAccess', _645 => _645.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
20029
20139
  break;
20030
20140
  case "toggle-mask-link":
20031
- if (id && _optionalChain([active, 'optionalAccess', _637 => _637.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
20141
+ if (id && _optionalChain([active, 'optionalAccess', _646 => _646.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
20032
20142
  break;
20033
20143
  case "add-vector-mask":
20034
20144
  case "add-vector-mask-hide":
@@ -20041,7 +20151,7 @@ async function runLayerMenuAction(controller, action) {
20041
20151
  if (id) controller.removeVectorMask(id);
20042
20152
  break;
20043
20153
  case "toggle-vector-mask":
20044
- if (id && _optionalChain([active, 'optionalAccess', _638 => _638.vectorMask])) controller.setVectorMaskProps(id, { enabled: active.vectorMask.enabled === false });
20154
+ if (id && _optionalChain([active, 'optionalAccess', _647 => _647.vectorMask])) controller.setVectorMaskProps(id, { enabled: active.vectorMask.enabled === false });
20045
20155
  break;
20046
20156
  case "rasterize-vector-mask":
20047
20157
  if (id) controller.rasterizeVectorMask(id);
@@ -20062,7 +20172,7 @@ async function runLayerMenuAction(controller, action) {
20062
20172
  if (id) controller.setSmartFilterMask(id, "reveal-all");
20063
20173
  break;
20064
20174
  case "toggle-clip":
20065
- if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _639 => _639.clipped]) });
20175
+ if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _648 => _648.clipped]) });
20066
20176
  break;
20067
20177
  }
20068
20178
  return null;
@@ -20072,7 +20182,7 @@ async function runLayerMenuAction(controller, action) {
20072
20182
  }
20073
20183
  function smartFilterRows(layer) {
20074
20184
  if (layer.type !== "smart") return [];
20075
- const list = _nullishCoalesce(_optionalChain([layer, 'access', _640 => _640.smartFilters, 'optionalAccess', _641 => _641.filters]), () => ( []));
20185
+ const list = _nullishCoalesce(_optionalChain([layer, 'access', _649 => _649.smartFilters, 'optionalAccess', _650 => _650.filters]), () => ( []));
20076
20186
  const rows = list.map((f, index) => ({
20077
20187
  filter: f,
20078
20188
  index,
@@ -20098,8 +20208,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
20098
20208
  };
20099
20209
  collectSerialized(_nullishCoalesce(serialized.layers, () => ( [])));
20100
20210
  const sLayerMap = new Map(allSerializedLayers.map((sl) => [sl.id, sl]));
20101
- const imgW = _optionalChain([state, 'access', _642 => _642.imageDimensions, 'optionalAccess', _643 => _643.width]) || 1;
20102
- const imgH = _optionalChain([state, 'access', _644 => _644.imageDimensions, 'optionalAccess', _645 => _645.height]) || 1;
20211
+ const imgW = _optionalChain([state, 'access', _651 => _651.imageDimensions, 'optionalAccess', _652 => _652.width]) || 1;
20212
+ const imgH = _optionalChain([state, 'access', _653 => _653.imageDimensions, 'optionalAccess', _654 => _654.height]) || 1;
20103
20213
  return ctrlLayers.map((l) => {
20104
20214
  const bounds = controller.getLayerBounds(l.id) || {
20105
20215
  x: 0,
@@ -20108,8 +20218,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
20108
20218
  height: imgH
20109
20219
  };
20110
20220
  const sLayer = sLayerMap.get(l.id);
20111
- const assetKey = _optionalChain([sLayer, 'optionalAccess', _646 => _646.asset]);
20112
- const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _647 => _647.source]) === "document" ? fallbackImageUrl : "");
20221
+ const assetKey = _optionalChain([sLayer, 'optionalAccess', _655 => _655.asset]);
20222
+ const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _656 => _656.source]) === "document" ? fallbackImageUrl : "");
20113
20223
  return {
20114
20224
  id: l.id,
20115
20225
  name: l.name || "Untitled Layer",
@@ -20163,9 +20273,9 @@ async function addLayerOfKind(controller, id, init) {
20163
20273
  const cx = Math.round(canvas.width / 2);
20164
20274
  const cy = Math.round(canvas.height / 2);
20165
20275
  return controller.addTextLayer({
20166
- text: _optionalChain([init, 'optionalAccess', _648 => _648.text]) || "New Text",
20167
- x: typeof _optionalChain([init, 'optionalAccess', _649 => _649.x]) === "number" ? init.x : cx - 100,
20168
- y: typeof _optionalChain([init, 'optionalAccess', _650 => _650.y]) === "number" ? init.y : cy,
20276
+ text: _optionalChain([init, 'optionalAccess', _657 => _657.text]) || "New Text",
20277
+ x: typeof _optionalChain([init, 'optionalAccess', _658 => _658.x]) === "number" ? init.x : cx - 100,
20278
+ y: typeof _optionalChain([init, 'optionalAccess', _659 => _659.y]) === "number" ? init.y : cy,
20169
20279
  ...init
20170
20280
  });
20171
20281
  }
@@ -20178,10 +20288,10 @@ async function addLayerOfKind(controller, id, init) {
20178
20288
  return controller.addShapeLayer({
20179
20289
  shape: {
20180
20290
  kind: "rect",
20181
- x: typeof _optionalChain([init, 'optionalAccess', _651 => _651.x]) === "number" ? init.x : cx - Math.round(w / 2),
20182
- y: typeof _optionalChain([init, 'optionalAccess', _652 => _652.y]) === "number" ? init.y : cy - Math.round(h / 2),
20183
- width: typeof _optionalChain([init, 'optionalAccess', _653 => _653.width]) === "number" ? init.width : w,
20184
- height: typeof _optionalChain([init, 'optionalAccess', _654 => _654.height]) === "number" ? init.height : h
20291
+ x: typeof _optionalChain([init, 'optionalAccess', _660 => _660.x]) === "number" ? init.x : cx - Math.round(w / 2),
20292
+ y: typeof _optionalChain([init, 'optionalAccess', _661 => _661.y]) === "number" ? init.y : cy - Math.round(h / 2),
20293
+ width: typeof _optionalChain([init, 'optionalAccess', _662 => _662.width]) === "number" ? init.width : w,
20294
+ height: typeof _optionalChain([init, 'optionalAccess', _663 => _663.height]) === "number" ? init.height : h
20185
20295
  },
20186
20296
  name: "Rectangle",
20187
20297
  ...init
@@ -20196,10 +20306,10 @@ async function addLayerOfKind(controller, id, init) {
20196
20306
  return controller.addShapeLayer({
20197
20307
  shape: {
20198
20308
  kind: "ellipse",
20199
- x: typeof _optionalChain([init, 'optionalAccess', _655 => _655.x]) === "number" ? init.x : cx - Math.round(w / 2),
20200
- y: typeof _optionalChain([init, 'optionalAccess', _656 => _656.y]) === "number" ? init.y : cy - Math.round(h / 2),
20201
- width: typeof _optionalChain([init, 'optionalAccess', _657 => _657.width]) === "number" ? init.width : w,
20202
- height: typeof _optionalChain([init, 'optionalAccess', _658 => _658.height]) === "number" ? init.height : h
20309
+ x: typeof _optionalChain([init, 'optionalAccess', _664 => _664.x]) === "number" ? init.x : cx - Math.round(w / 2),
20310
+ y: typeof _optionalChain([init, 'optionalAccess', _665 => _665.y]) === "number" ? init.y : cy - Math.round(h / 2),
20311
+ width: typeof _optionalChain([init, 'optionalAccess', _666 => _666.width]) === "number" ? init.width : w,
20312
+ height: typeof _optionalChain([init, 'optionalAccess', _667 => _667.height]) === "number" ? init.height : h
20203
20313
  },
20204
20314
  name: "Ellipse",
20205
20315
  ...init
@@ -20260,18 +20370,18 @@ function layerEffectsPanel(layer) {
20260
20370
  if (!layer) return { ...empty, available: false, reason: "Select a layer to add a layer style." };
20261
20371
  if (layer.type === "adjustment") return { ...empty, available: false, reason: "Adjustment layers cannot have a layer style." };
20262
20372
  const fx = layer.effects;
20263
- const readOnly = Boolean(_optionalChain([layer, 'access', _659 => _659.locks, 'optionalAccess', _660 => _660.all]));
20373
+ const readOnly = Boolean(_optionalChain([layer, 'access', _668 => _668.locks, 'optionalAccess', _669 => _669.all]));
20264
20374
  return {
20265
20375
  available: true,
20266
20376
  readOnly,
20267
20377
  reason: readOnly ? "The layer is locked; unlock it to change its layer style." : void 0,
20268
- enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _661 => _661.enabled]), () => ( true)),
20269
- scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _662 => _662.scale]), () => ( 1)),
20270
- rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _663 => _663.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkB46UQUDCcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
20378
+ enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _670 => _670.enabled]), () => ( true)),
20379
+ scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _671 => _671.scale]), () => ( 1)),
20380
+ rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _672 => _672.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkB46UQUDCcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
20271
20381
  };
20272
20382
  }
20273
20383
  function layerEffectsBadge(layer) {
20274
- if (!_optionalChain([layer, 'access', _664 => _664.effects, 'optionalAccess', _665 => _665.items, 'access', _666 => _666.length])) return null;
20384
+ if (!_optionalChain([layer, 'access', _673 => _673.effects, 'optionalAccess', _674 => _674.items, 'access', _675 => _675.length])) return null;
20275
20385
  return _chunkB46UQUDCcjs.hasActiveEffects.call(void 0, layer.effects) ? "on" : "off";
20276
20386
  }
20277
20387
  var LAYER_EFFECT_MENU = _chunkB46UQUDCcjs.LAYER_EFFECT_KINDS.map((kind) => ({ kind, label: _chunkB46UQUDCcjs.layerEffectLabel.call(void 0, kind) }));
@@ -20316,8 +20426,8 @@ function fillControls(f, allowPattern, patterns) {
20316
20426
  }
20317
20427
  function gradientControls(prefix, g) {
20318
20428
  return [
20319
- { key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _667 => _667.stops, 'access', _668 => _668[0], 'optionalAccess', _669 => _669.color]), () => ( "#000000")) },
20320
- { key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _670 => _670.stops, 'access', _671 => _671[g.stops.length - 1], 'optionalAccess', _672 => _672.color]), () => ( "#ffffff")) },
20429
+ { key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _676 => _676.stops, 'access', _677 => _677[0], 'optionalAccess', _678 => _678.color]), () => ( "#000000")) },
20430
+ { key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _679 => _679.stops, 'access', _680 => _680[g.stops.length - 1], 'optionalAccess', _681 => _681.color]), () => ( "#ffffff")) },
20321
20431
  { key: `${prefix}.style`, label: "Style", type: "select", value: g.style, options: opt(["linear", "Linear"], ["radial", "Radial"], ["angle", "Angle"], ["reflected", "Reflected"], ["diamond", "Diamond"]) },
20322
20432
  { key: `${prefix}.angle`, label: "Angle", type: "range", min: -180, max: 180, step: 1, value: g.angle, unit: "\xB0" },
20323
20433
  { key: `${prefix}.scale`, label: "Scale", type: "range", min: 0.1, max: 1.5, step: 0.01, value: g.scale, percent: true, unit: "%" },
@@ -20409,19 +20519,19 @@ function layerEffectControls(e, patterns = []) {
20409
20519
  }
20410
20520
  function fillOfType(current, type, patterns) {
20411
20521
  if (type === "gradient") return { type: "gradient", gradient: _chunkB46UQUDCcjs.defaultEffectGradient.call(void 0, ) };
20412
- if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _673 => _673[0], 'optionalAccess', _674 => _674.id]), () => ( "checker")), scale: 1 };
20522
+ if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _682 => _682[0], 'optionalAccess', _683 => _683.id]), () => ( "checker")), scale: 1 };
20413
20523
  return { type: "color", color: current.type === "color" ? current.color : "#000000" };
20414
20524
  }
20415
20525
  function effectControlChange(effect, key2, value, patterns = []) {
20416
20526
  const [top, ...rest] = key2.split(".");
20417
20527
  if (top === "fill" && rest[0] === "type") return { fill: fillOfType(effect.fill, String(value), patterns) };
20418
20528
  if (top === "patternId" && !rest.length) {
20419
- const name = _optionalChain([patternOptions, 'call', _675 => _675(patterns), 'access', _676 => _676.find, 'call', _677 => _677((o) => o.value === value), 'optionalAccess', _678 => _678.label]);
20529
+ const name = _optionalChain([patternOptions, 'call', _684 => _684(patterns), 'access', _685 => _685.find, 'call', _686 => _686((o) => o.value === value), 'optionalAccess', _687 => _687.label]);
20420
20530
  return name ? { patternId: value, name } : { patternId: value };
20421
20531
  }
20422
20532
  if (!rest.length) return { [top]: value };
20423
20533
  if (top === "fill" && rest[0] === "patternId") {
20424
- const name = _optionalChain([patternOptions, 'call', _679 => _679(patterns), 'access', _680 => _680.find, 'call', _681 => _681((o) => o.value === value), 'optionalAccess', _682 => _682.label]);
20534
+ const name = _optionalChain([patternOptions, 'call', _688 => _688(patterns), 'access', _689 => _689.find, 'call', _690 => _690((o) => o.value === value), 'optionalAccess', _691 => _691.label]);
20425
20535
  return { fill: { ...effect.fill, patternId: value, ...name ? { name } : {} } };
20426
20536
  }
20427
20537
  return { [top]: setPath(getPath(effect, top), rest, value) };
@@ -20448,7 +20558,7 @@ function colorPanelView(controller) {
20448
20558
  profileName: profile.name,
20449
20559
  workingSpace: profile.builtin,
20450
20560
  mode: profile.mode,
20451
- cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access', _683 => _683.cmykProfile, 'optionalAccess', _684 => _684.name]), () => ( null)),
20561
+ cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access', _692 => _692.cmykProfile, 'optionalAccess', _693 => _693.name]), () => ( null)),
20452
20562
  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
20453
20563
  };
20454
20564
  }
@@ -20656,7 +20766,7 @@ var FreeTransformTool = (_class16 = class {
20656
20766
  __init147() {this.error = null}
20657
20767
  __init148() {this.lastResult = null}
20658
20768
  get active() {
20659
- return Boolean(_optionalChain([this, 'access', _685 => _685.sessionRef, 'optionalAccess', _686 => _686.isOpen]));
20769
+ return Boolean(_optionalChain([this, 'access', _694 => _694.sessionRef, 'optionalAccess', _695 => _695.isOpen]));
20660
20770
  }
20661
20771
  get session() {
20662
20772
  return this.active ? this.sessionRef : null;
@@ -20665,7 +20775,7 @@ var FreeTransformTool = (_class16 = class {
20665
20775
  return this.modeValue;
20666
20776
  }
20667
20777
  get interpolation() {
20668
- return _nullishCoalesce(_optionalChain([this, 'access', _687 => _687.sessionRef, 'optionalAccess', _688 => _688.interpolation]), () => ( "bicubic"));
20778
+ return _nullishCoalesce(_optionalChain([this, 'access', _696 => _696.sessionRef, 'optionalAccess', _697 => _697.interpolation]), () => ( "bicubic"));
20669
20779
  }
20670
20780
  /** Whether the open transform has changed anything yet (a commit would add an undo step). */
20671
20781
  get modified() {
@@ -20684,7 +20794,7 @@ var FreeTransformTool = (_class16 = class {
20684
20794
  };
20685
20795
  }
20686
20796
  changed() {
20687
- _optionalChain([this, 'access', _689 => _689.options, 'access', _690 => _690.onChange, 'optionalCall', _691 => _691()]);
20797
+ _optionalChain([this, 'access', _698 => _698.options, 'access', _699 => _699.onChange, 'optionalCall', _700 => _700()]);
20688
20798
  for (const l of this.listeners) l();
20689
20799
  }
20690
20800
  /** Opens a Free Transform (default: the selected pixels of the active layer, or the whole layer). Returns an error message or `null`. */
@@ -21077,7 +21187,7 @@ var FreeTransformTool = (_class16 = class {
21077
21187
  }
21078
21188
  /** Abandons the transform and restores everything. */
21079
21189
  cancel() {
21080
- _optionalChain([this, 'access', _692 => _692.sessionRef, 'optionalAccess', _693 => _693.cancel, 'call', _694 => _694()]);
21190
+ _optionalChain([this, 'access', _701 => _701.sessionRef, 'optionalAccess', _702 => _702.cancel, 'call', _703 => _703()]);
21081
21191
  this.sessionRef = null;
21082
21192
  this.corners = null;
21083
21193
  this.mesh = null;
@@ -21133,7 +21243,7 @@ function imageLayerAppliedEffects(layer) {
21133
21243
  const ref = (r) => ({ effect: r.effect, ...r.name ? { name: r.name } : {}, ...r.provider ? { provider: r.provider } : {} });
21134
21244
  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 } : {} });
21135
21245
  if (layer.type === "smart")
21136
- (_nullishCoalesce(_optionalChain([layer, 'access', _695 => _695.smartFilters, 'optionalAccess', _696 => _696.filters]), () => ( []))).forEach((f, index) => {
21246
+ (_nullishCoalesce(_optionalChain([layer, 'access', _704 => _704.smartFilters, 'optionalAccess', _705 => _705.filters]), () => ( []))).forEach((f, index) => {
21137
21247
  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 });
21138
21248
  });
21139
21249
  return out;
@@ -21290,7 +21400,7 @@ var OTHER_TOOL_LABELS = {
21290
21400
  watermark: "Watermark"
21291
21401
  };
21292
21402
  function imageToolLabel(tool) {
21293
- return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access', _697 => _697.find, 'call', _698 => _698((t) => t.id === tool), 'optionalAccess', _699 => _699.label]), () => ( OTHER_TOOL_LABELS[tool])), () => ( tool));
21403
+ return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access', _706 => _706.find, 'call', _707 => _707((t) => t.id === tool), 'optionalAccess', _708 => _708.label]), () => ( OTHER_TOOL_LABELS[tool])), () => ( tool));
21294
21404
  }
21295
21405
  var IMAGE_TOOL_SHORTCUTS = {
21296
21406
  ...Object.fromEntries(PAINT_TOOLS.filter((t) => t.shortcut).map((t) => [t.id, t.shortcut])),
@@ -21422,10 +21532,10 @@ var PathEditGesture = (_class17 = class {
21422
21532
  }
21423
21533
  for (const k of [...this.selected]) {
21424
21534
  const r = parseKey(k);
21425
- if (!_optionalChain([cs, 'access', _700 => _700[r.component], 'optionalAccess', _701 => _701.subpaths, 'access', _702 => _702[r.subpath], 'optionalAccess', _703 => _703.anchors, 'access', _704 => _704[r.anchor]])) this.selected.delete(k);
21535
+ if (!_optionalChain([cs, 'access', _709 => _709[r.component], 'optionalAccess', _710 => _710.subpaths, 'access', _711 => _711[r.subpath], 'optionalAccess', _712 => _712.anchors, 'access', _713 => _713[r.anchor]])) this.selected.delete(k);
21426
21536
  }
21427
21537
  const d = this.drawing;
21428
- if (d && (!_optionalChain([cs, 'access', _705 => _705[d.component], 'optionalAccess', _706 => _706.subpaths, 'access', _707 => _707[d.subpath]]) || cs[d.component].subpaths[d.subpath].closed)) this.drawing = null;
21538
+ if (d && (!_optionalChain([cs, 'access', _714 => _714[d.component], 'optionalAccess', _715 => _715.subpaths, 'access', _716 => _716[d.subpath]]) || cs[d.component].subpaths[d.subpath].closed)) this.drawing = null;
21429
21539
  return cs;
21430
21540
  }
21431
21541
  anchorAt(cs, p) {
@@ -21760,11 +21870,11 @@ var PathEditGesture = (_class17 = class {
21760
21870
  let preview = null;
21761
21871
  const d = this.drawing;
21762
21872
  if (tool === "path-pen" && d && this.pointer && !this.drag) {
21763
- const sp = _optionalChain([cs, 'access', _708 => _708[d.component], 'optionalAccess', _709 => _709.subpaths, 'access', _710 => _710[d.subpath]]);
21764
- const last = _optionalChain([sp, 'optionalAccess', _711 => _711.anchors, 'access', _712 => _712[sp.anchors.length - 1]]);
21873
+ const sp = _optionalChain([cs, 'access', _717 => _717[d.component], 'optionalAccess', _718 => _718.subpaths, 'access', _719 => _719[d.subpath]]);
21874
+ const last = _optionalChain([sp, 'optionalAccess', _720 => _720.anchors, 'access', _721 => _721[sp.anchors.length - 1]]);
21765
21875
  if (last) preview = last.out ? [pt(last), pt(last.out), this.pointer, this.pointer] : [pt(last), this.pointer];
21766
21876
  }
21767
- const marquee = _optionalChain([this, 'access', _713 => _713.drag, 'optionalAccess', _714 => _714.kind]) === "marquee" ? rect(this.drag.start, this.drag.end) : null;
21877
+ const marquee = _optionalChain([this, 'access', _722 => _722.drag, 'optionalAccess', _723 => _723.kind]) === "marquee" ? rect(this.drag.start, this.drag.end) : null;
21768
21878
  return { curves, anchors, handles, marquee, preview };
21769
21879
  }
21770
21880
  }, _class17);
@@ -21846,8 +21956,8 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
21846
21956
  async open() {
21847
21957
  try {
21848
21958
  const { width, height } = this.controller.getState().imageDimensions;
21849
- const b = _optionalChain([this, 'access', _715 => _715.controller, 'access', _716 => _716.getSelection, 'call', _717 => _717(), 'optionalAccess', _718 => _718.bounds]);
21850
- this.margin = width * height <= _ContentAwareFillSession.WHOLE_IMAGE_PIXELS ? Math.max(width, height) : Math.max(256, 2 * Math.max(_nullishCoalesce(_optionalChain([b, 'optionalAccess', _719 => _719.width]), () => ( 0)), _nullishCoalesce(_optionalChain([b, 'optionalAccess', _720 => _720.height]), () => ( 0))));
21959
+ const b = _optionalChain([this, 'access', _724 => _724.controller, 'access', _725 => _725.getSelection, 'call', _726 => _726(), 'optionalAccess', _727 => _727.bounds]);
21960
+ this.margin = width * height <= _ContentAwareFillSession.WHOLE_IMAGE_PIXELS ? Math.max(width, height) : Math.max(256, 2 * Math.max(_nullishCoalesce(_optionalChain([b, 'optionalAccess', _728 => _728.width]), () => ( 0)), _nullishCoalesce(_optionalChain([b, 'optionalAccess', _729 => _729.height]), () => ( 0))));
21851
21961
  this.plan = this.controller.prepareContentAwareFill({ sampleRadius: this.margin });
21852
21962
  } catch (err) {
21853
21963
  this.error = err instanceof Error ? err.message : String(err);
@@ -22005,7 +22115,7 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
22005
22115
  this.dirty = false;
22006
22116
  try {
22007
22117
  const area = this.samplingMask();
22008
- if (!_optionalChain([area, 'optionalAccess', _721 => _721.bounds])) throw new Error("The sampling area is empty; paint where the fill may copy from.");
22118
+ if (!_optionalChain([area, 'optionalAccess', _730 => _730.bounds])) throw new Error("The sampling area is empty; paint where the fill may copy from.");
22009
22119
  const { plan, after } = await this.controller.previewContentAwareFill({ layerId: this.plan.layerId, samplingArea: area, seed: this.settingsValue.seed });
22010
22120
  const win = this.win;
22011
22121
  const out = Uint8ClampedArray.from(this.before);
@@ -22084,7 +22194,7 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
22084
22194
  /** OK: fills with this sampling area, seed and output as one undo step. */
22085
22195
  async commit(options = {}) {
22086
22196
  const area = this.samplingMask();
22087
- if (!this.plan || !_optionalChain([area, 'optionalAccess', _722 => _722.bounds])) throw new Error(_nullishCoalesce(this.error, () => ( "The sampling area is empty; paint where the fill may copy from.")));
22197
+ if (!this.plan || !_optionalChain([area, 'optionalAccess', _731 => _731.bounds])) throw new Error(_nullishCoalesce(this.error, () => ( "The sampling area is empty; paint where the fill may copy from.")));
22088
22198
  return this.controller.contentAwareFillAsync({ layerId: this.plan.layerId, samplingArea: area, seed: this.settingsValue.seed, output: this.settingsValue.output, signal: options.signal });
22089
22199
  }
22090
22200
  }, _class18.__initStatic(), _class18);
@@ -23203,4 +23313,5 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
23203
23313
 
23204
23314
 
23205
23315
 
23206
- exports.ADJUSTMENT_KEYS = _chunkS55JFWDAcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkS55JFWDAcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkS55JFWDAcjs.ADJUSTMENT_LUT_SIZE; exports.ANCHOR_FRACTION = _chunkS55JFWDAcjs.ANCHOR_FRACTION; exports.AS_SHOT_KELVIN = _chunkS55JFWDAcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkS55JFWDAcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkS55JFWDAcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkOLNIPTB3cjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkOLNIPTB3cjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkS55JFWDAcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkXFYLA3ZOcjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkBROJYMWUcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkPQ3H2AANcjs.BrushstrokeCache; exports.CANVAS_SIZE_PRESETS = CANVAS_SIZE_PRESETS; exports.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.COLOR_RANGE_PRESETS = COLOR_RANGE_PRESETS; exports.COLOR_RANGE_PRESET_LABELS = COLOR_RANGE_PRESET_LABELS; exports.CONTENT_AWARE_FILL_SAMPLING = CONTENT_AWARE_FILL_SAMPLING; exports.CONTENT_AWARE_FILL_TOOLS = CONTENT_AWARE_FILL_TOOLS; exports.ColorGmm = _chunkUC3PWFM3cjs.ColorGmm; exports.ContentAwareFillSession = ContentAwareFillSession; exports.CoverageMap = _chunkPQ3H2AANcjs.CoverageMap; exports.D50 = _chunkS55JFWDAcjs.D50; exports.D65 = _chunkS55JFWDAcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkQAUIZPYIcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkPQ3H2AANcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkPQ3H2AANcjs.DEFAULT_BRUSH; exports.DEFAULT_CANVAS_VIEWPORT = DEFAULT_CANVAS_VIEWPORT; exports.DEFAULT_CHANNEL_COLOR = DEFAULT_CHANNEL_COLOR; exports.DEFAULT_CONTENT_AWARE_FILL_SETTINGS = DEFAULT_CONTENT_AWARE_FILL_SETTINGS; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkXFYLA3ZOcjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkB46UQUDCcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkS55JFWDAcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunkPQ3H2AANcjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunkPQ3H2AANcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkPQ3H2AANcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = _chunkSS53NNZOcjs.DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunkYF3YZZ6Gcjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SELECT_AND_MASK_SETTINGS = DEFAULT_SELECT_AND_MASK_SETTINGS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunkPQ3H2AANcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkQAUIZPYIcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkXFYLA3ZOcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkXFYLA3ZOcjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkS55JFWDAcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkK6PXS6DOcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkXFYLA3ZOcjs.DRY_EPS; exports.DabWalker = _chunkPQ3H2AANcjs.DabWalker; exports.EDGE_COLOR_RADIUS = _chunkS55JFWDAcjs.EDGE_COLOR_RADIUS; exports.EFFECT_LAYER_USES = EFFECT_LAYER_USES; exports.EMPTY_DISTANCE = _chunkSS53NNZOcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkPQ3H2AANcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkXFYLA3ZOcjs.EX; exports.EY = _chunkXFYLA3ZOcjs.EY; exports.EdgeMap = EdgeMap; exports.FLAG_ALIVE = _chunkXFYLA3ZOcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkXFYLA3ZOcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkXFYLA3ZOcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkXFYLA3ZOcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkXFYLA3ZOcjs.FLAG_TOP; exports.FLAG_WET = _chunkXFYLA3ZOcjs.FLAG_WET; exports.FLAT = _chunkXFYLA3ZOcjs.FLAT; exports.FREE_INTERVAL = _chunkXFYLA3ZOcjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkS55JFWDAcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GAMMA = _chunkUC3PWFM3cjs.GAMMA; exports.GRAIN_PATTERNS = _chunkPQ3H2AANcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkPQ3H2AANcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = _chunkSS53NNZOcjs.GUIDED_FILTER_EPS; exports.GridGraph = _chunkUC3PWFM3cjs.GridGraph; exports.HIDE = _chunkXFYLA3ZOcjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkS55JFWDAcjs.HUE_RANGE_LABELS; exports.HUE_RANGE_PRESETS = HUE_RANGE_PRESETS; exports.IDENTITY_CLONE_TRANSFORM = _chunkYF3YZZ6Gcjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkS55JFWDAcjs.IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_CROP_PRESETS = IMAGE_CROP_PRESETS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.IMAGE_EFFECT_PLACES = IMAGE_EFFECT_PLACES; exports.IMAGE_FILTER_PRESETS = IMAGE_FILTER_PRESETS; exports.IMAGE_PLAYBACK_KIND = IMAGE_PLAYBACK_KIND; exports.IMAGE_TOOL_GROUPS = IMAGE_TOOL_GROUPS; exports.IMAGE_TOOL_SHORTCUTS = IMAGE_TOOL_SHORTCUTS; exports.INTENTS = _chunkBROJYMWUcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunkB46UQUDCcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkS55JFWDAcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkS55JFWDAcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkB46UQUDCcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkS55JFWDAcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkS55JFWDAcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkS55JFWDAcjs.LUMA_709; exports.LayerCompositor = _chunkS55JFWDAcjs.LayerCompositor; exports.LayerEffectError = _chunkB46UQUDCcjs.LayerEffectError; exports.LayerOperationError = _chunkS55JFWDAcjs.LayerOperationError; exports.MARCHING_ANTS_STEP_MS = MARCHING_ANTS_STEP_MS; exports.MASK_EDGE_THRESHOLDS = MASK_EDGE_THRESHOLDS; exports.MASK_FILE_ACCEPT = MASK_FILE_ACCEPT; exports.MAX_BATCH = _chunkXFYLA3ZOcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkPQ3H2AANcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_BACKING_SIDE = MAX_CANVAS_BACKING_SIDE; exports.MAX_EFFECT_ANIMATION_MS = _chunkS55JFWDAcjs.MAX_EFFECT_ANIMATION_MS; exports.MAX_EFFECT_REACH = _chunkB46UQUDCcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkS55JFWDAcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkXFYLA3ZOcjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkB46UQUDCcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkXFYLA3ZOcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkXFYLA3ZOcjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkS55JFWDAcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkS55JFWDAcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkPQ3H2AANcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkPQ3H2AANcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkPQ3H2AANcjs.MIXING_MODELS; exports.MixerStroke = _chunkPQ3H2AANcjs.MixerStroke; exports.OPP = _chunkXFYLA3ZOcjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkOLNIPTB3cjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunkPQ3H2AANcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkPQ3H2AANcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkPQ3H2AANcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkXFYLA3ZOcjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkS55JFWDAcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkXFYLA3ZOcjs.PARAM; exports.PARAM_FLOATS = _chunkXFYLA3ZOcjs.PARAM_FLOATS; exports.PASTE_MODES = PASTE_MODES; exports.PATH_EDIT_TOOLS = PATH_EDIT_TOOLS; exports.PATTERN_BLOCK_KEYS = _chunkS55JFWDAcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkOLNIPTB3cjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkXFYLA3ZOcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkOLNIPTB3cjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkOLNIPTB3cjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkXFYLA3ZOcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkOLNIPTB3cjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkXFYLA3ZOcjs.PLANE; exports.PLANE_BYTES = _chunkXFYLA3ZOcjs.PLANE_BYTES; exports.PREVIEW_SIZE = PREVIEW_SIZE; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkS55JFWDAcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkXFYLA3ZOcjs.P_D0; exports.P_EDGE = _chunkXFYLA3ZOcjs.P_EDGE; exports.P_FX = _chunkXFYLA3ZOcjs.P_FX; exports.P_FY = _chunkXFYLA3ZOcjs.P_FY; exports.P_H = _chunkXFYLA3ZOcjs.P_H; exports.P_P0 = _chunkXFYLA3ZOcjs.P_P0; exports.P_RHO = _chunkXFYLA3ZOcjs.P_RHO; exports.P_SW = _chunkXFYLA3ZOcjs.P_SW; exports.P_UX = _chunkXFYLA3ZOcjs.P_UX; exports.P_UY = _chunkXFYLA3ZOcjs.P_UY; exports.PaintExchange = _chunkPQ3H2AANcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkPQ3H2AANcjs.PaintGradientSampler; exports.PaintSourceError = _chunkPQ3H2AANcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaperGrain = _chunkPQ3H2AANcjs.PaperGrain; exports.PathEditGesture = PathEditGesture; exports.PatternPlacement = _chunkB46UQUDCcjs.PatternPlacement; exports.PatternTile = _chunkB46UQUDCcjs.PatternTile; exports.PsdError = _chunkS55JFWDAcjs.PsdError; exports.QUICK_MASK_TARGET = QUICK_MASK_TARGET; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.REFINE_EDIT_KINDS = _chunkUC3PWFM3cjs.REFINE_EDIT_KINDS; exports.REFINE_OUTPUTS = REFINE_OUTPUTS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunkYF3YZZ6Gcjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunkYF3YZZ6Gcjs.RegionPixelSource; exports.RetouchDabStroke = _chunkYF3YZZ6Gcjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkSS53NNZOcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkSS53NNZOcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SELECT_AND_MASK_TOOLS = SELECT_AND_MASK_TOOLS; exports.SELECT_AND_MASK_VIEWS = SELECT_AND_MASK_VIEWS; exports.SET_PLANES = _chunkXFYLA3ZOcjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkOLNIPTB3cjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkS55JFWDAcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkS55JFWDAcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkXFYLA3ZOcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkXFYLA3ZOcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkXFYLA3ZOcjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkS55JFWDAcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunkYF3YZZ6Gcjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkXFYLA3ZOcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkXFYLA3ZOcjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkS55JFWDAcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectAndMaskSession = SelectAndMaskSession; exports.SelectionGesture = SelectionGesture; exports.SelectionWorkerClient = _chunkUC3PWFM3cjs.SelectionWorkerClient; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkPQ3H2AANcjs.SmudgeTip; exports.StrokeCoverage = _chunkPQ3H2AANcjs.StrokeCoverage; exports.SurfaceDraft = _chunk474IQG74cjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkS55JFWDAcjs.TEXT_ALIGNS; exports.TEXT_ORIENTATIONS = _chunkS55JFWDAcjs.TEXT_ORIENTATIONS; exports.TEXT_RENDER_MARGIN = _chunkS55JFWDAcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkS55JFWDAcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunk474IQG74cjs.TILE; exports.TILE_SHIFT = _chunk474IQG74cjs.TILE_SHIFT; exports.TINT_SCALE = _chunkS55JFWDAcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkPQ3H2AANcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkS55JFWDAcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunkYF3YZZ6Gcjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkS55JFWDAcjs.TRANSFORM_ANCHORS; exports.TRANSFORM_ROTATE_HANDLE_OFFSET = TRANSFORM_ROTATE_HANDLE_OFFSET; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunkPQ3H2AANcjs.TileMedium; exports.TilePixelSource = _chunkYF3YZZ6Gcjs.TilePixelSource; exports.TileableNoise = _chunkPQ3H2AANcjs.TileableNoise; exports.TiledSurface = _chunk474IQG74cjs.TiledSurface; exports.TransformTooLargeError = _chunkB46UQUDCcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunkYF3YZZ6Gcjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.UNITS = _chunkUC3PWFM3cjs.UNITS; exports.U_MAX = _chunkXFYLA3ZOcjs.U_MAX; exports.VIBRANCE_GREY = _chunkS55JFWDAcjs.VIBRANCE_GREY; exports.W9 = _chunkXFYLA3ZOcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkQAUIZPYIcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkQAUIZPYIcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkXFYLA3ZOcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkXFYLA3ZOcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkXFYLA3ZOcjs.WET_TILE; exports.WGSL_HALO = _chunkXFYLA3ZOcjs.WGSL_HALO; exports.WGSL_SHADE = _chunkXFYLA3ZOcjs.WGSL_SHADE; exports.WGSL_STEP = _chunkXFYLA3ZOcjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WORK_PATH_NAME = WORK_PATH_NAME; exports.WORK_SIZE = _chunkUC3PWFM3cjs.WORK_SIZE; exports.WetGpuEngine = _chunkXFYLA3ZOcjs.WetGpuEngine; exports.WetMedium = _chunkXFYLA3ZOcjs.WetMedium; exports.WetWorkerPool = _chunkXFYLA3ZOcjs.WetWorkerPool; exports.WetWorld = _chunkXFYLA3ZOcjs.WetWorld; exports.WetWorldError = _chunkXFYLA3ZOcjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkS55JFWDAcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkS55JFWDAcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkS55JFWDAcjs.activeEffectSmartFilters; exports.activeLayerAfterRemoval = _chunkS55JFWDAcjs.activeLayerAfterRemoval; exports.activeSmartFilters = _chunkS55JFWDAcjs.activeSmartFilters; exports.addLayerEffect = _chunkS55JFWDAcjs.addLayerEffect; exports.addLayerFilter = _chunkS55JFWDAcjs.addLayerFilter; exports.addLayerOfKind = addLayerOfKind; exports.addPaintGradientStop = _chunkPQ3H2AANcjs.addPaintGradientStop; exports.addSmartFilter = _chunkS55JFWDAcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkS55JFWDAcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkS55JFWDAcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkS55JFWDAcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkS55JFWDAcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.agentDragDraft = agentDragDraft; exports.anchorPoint = _chunkS55JFWDAcjs.anchorPoint; exports.annotationBlend = _chunkS55JFWDAcjs.annotationBlend; exports.annotationLayerFor = _chunkS55JFWDAcjs.annotationLayerFor; exports.annotationLayerName = _chunkS55JFWDAcjs.annotationLayerName; exports.annotationOfLayer = _chunkS55JFWDAcjs.annotationOfLayer; exports.annotationOfShape = _chunkS55JFWDAcjs.annotationOfShape; exports.annotationOfType = _chunkS55JFWDAcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkS55JFWDAcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkS55JFWDAcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkS55JFWDAcjs.applyAdjustments; exports.applyBoxBlur = _chunkS55JFWDAcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkS55JFWDAcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkS55JFWDAcjs.applyDepthMask; exports.applyEdgeUnmix = _chunkS55JFWDAcjs.applyEdgeUnmix; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkS55JFWDAcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkS55JFWDAcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkS55JFWDAcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkS55JFWDAcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkS55JFWDAcjs.applyParams; exports.applyProcess2Adjustments = _chunkS55JFWDAcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkS55JFWDAcjs.applyProcess2Float; exports.applyRefineEdits = _chunkUC3PWFM3cjs.applyRefineEdits; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunkYF3YZZ6Gcjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkS55JFWDAcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkPQ3H2AANcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkPQ3H2AANcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunkYF3YZZ6Gcjs.applyToneToDeepTile; exports.backgroundLayer = _chunkS55JFWDAcjs.backgroundLayer; exports.base64ToBytes = _chunkOLNIPTB3cjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunkMQDIP4CFcjs.bestOffset; exports.blackWhiteGray = _chunkS55JFWDAcjs.blackWhiteGray; exports.blendChannel = _chunkOLNIPTB3cjs.blendChannel; exports.blendImageData = _chunkOLNIPTB3cjs.blendImageData; exports.blendLum = _chunkOLNIPTB3cjs.blendLum; exports.blendPixel = _chunkOLNIPTB3cjs.blendPixel; exports.blendRadius = _chunkPQ3H2AANcjs.blendRadius; exports.blendRgb = _chunkOLNIPTB3cjs.blendRgb; exports.blendTile = _chunkB46UQUDCcjs.blendTile; exports.blenderDab = _chunkPQ3H2AANcjs.blenderDab; exports.blurFilter = _chunkS55JFWDAcjs.blurFilter; exports.borderCoverage = _chunkSS53NNZOcjs.borderCoverage; exports.boxBlur = _chunkUC3PWFM3cjs.boxBlur; exports.boxBlurPixels = _chunkYF3YZZ6Gcjs.boxBlurPixels; exports.boxFrameHit = boxFrameHit; exports.boxFrameOverlay = boxFrameOverlay; exports.boxMean = _chunkSS53NNZOcjs.boxMean; exports.boxPointOf = _chunkS55JFWDAcjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkS55JFWDAcjs.bradfordAdaptation; exports.brushStrokeMask = _chunkUC3PWFM3cjs.brushStrokeMask; exports.brushstrokeDataUrl = _chunkPQ3H2AANcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkPQ3H2AANcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkPQ3H2AANcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkPQ3H2AANcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkPQ3H2AANcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkS55JFWDAcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkS55JFWDAcjs.buildToneLut; exports.builtinPattern = _chunkB46UQUDCcjs.builtinPattern; exports.builtinPatternIds = _chunkB46UQUDCcjs.builtinPatternIds; exports.bytesToBase64 = _chunkOLNIPTB3cjs.bytesToBase64; exports.calculateCropDrag = _chunkS55JFWDAcjs.calculateCropDrag; exports.canShareMemory = _chunkXFYLA3ZOcjs.canShareMemory; exports.canvasCompositeOperation = _chunkOLNIPTB3cjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkS55JFWDAcjs.canvasToImagePoint; exports.caretAt = _chunkQAUIZPYIcjs.caretAt; exports.changedTiles = _chunkB46UQUDCcjs.changedTiles; exports.channelThumbnail = channelThumbnail; exports.checkEffectAnimation = checkEffectAnimation; exports.checkEffectTime = checkEffectTime; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkS55JFWDAcjs.clampCropToImage; exports.cleanMixer = _chunkPQ3H2AANcjs.cleanMixer; exports.cloneSamplePoint = _chunkYF3YZZ6Gcjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunk474IQG74cjs.collectTiles; exports.colorBalanceChannel = _chunkS55JFWDAcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.colorRangePreset = colorRangePreset; exports.combineSelections = _chunkSS53NNZOcjs.combineSelections; exports.compareSelectionMasks = compareSelectionMasks; exports.compileAdjustmentLayer = _chunkS55JFWDAcjs.compileAdjustmentLayer; exports.componentPath = _chunkS55JFWDAcjs.componentPath; exports.componentsCoverage = _chunkS55JFWDAcjs.componentsCoverage; exports.compositeDeep = _chunkS55JFWDAcjs.compositeDeep; exports.compositeSurfaceOver = _chunkB46UQUDCcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkSS53NNZOcjs.computeSelectionBounds; exports.contentAwareFill = _chunkMQDIP4CFcjs.contentAwareFill; exports.contentBounds = _chunk474IQG74cjs.contentBounds; exports.contentsBox = _chunkS55JFWDAcjs.contentsBox; exports.contentsSurface = _chunkS55JFWDAcjs.contentsSurface; exports.contractCoverage = _chunkSS53NNZOcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkOLNIPTB3cjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkS55JFWDAcjs.convertToSmartObject; exports.copySmartObject = _chunkS55JFWDAcjs.copySmartObject; exports.cornersFromMatrix = _chunkS55JFWDAcjs.cornersFromMatrix; exports.coverageTileCoord = _chunkPQ3H2AANcjs.coverageTileCoord; exports.coverageToByte = _chunkSS53NNZOcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkS55JFWDAcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkPQ3H2AANcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkQAUIZPYIcjs.createCanvasTextShaper; exports.createGradientSampler = createGradientSampler; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageColorTools = createImageColorTools; exports.createImageEditTools = createImageEditTools; exports.createImageEditorDocument = createImageEditorDocument; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageEffectsToolProvider = createImageEffectsToolProvider; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePlaybackLocator = createImagePlaybackLocator; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSegmentationToolProvider = createImageSegmentationToolProvider; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageSubjectSelectionTool = createImageSubjectSelectionTool; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunkQAUIZPYIcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkQAUIZPYIcjs.createOutlineTextShaper; exports.createPigment = _chunkOLNIPTB3cjs.createPigment; exports.createPigmentTools = _chunkXFYLA3ZOcjs.createPigmentTools; exports.createSelectionMask = _chunkSS53NNZOcjs.createSelectionMask; exports.createShapeLayer = _chunkS55JFWDAcjs.createShapeLayer; exports.createTypeLayer = _chunkS55JFWDAcjs.createTypeLayer; exports.createWetGpuEngine = _chunkXFYLA3ZOcjs.createWetGpuEngine; exports.cssFont = _chunkQAUIZPYIcjs.cssFont; exports.cssFontFamily = _chunkQAUIZPYIcjs.cssFontFamily; exports.curveLut = _chunkB46UQUDCcjs.curveLut; exports.curveLutFromLevels = _chunkS55JFWDAcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkPQ3H2AANcjs.dabCoverage; exports.dabRect = _chunkPQ3H2AANcjs.dabRect; exports.decodeDeepSurface = _chunkS55JFWDAcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkS55JFWDAcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkS55JFWDAcjs.decodeLayerMask; exports.decodeMergedImage = _chunkS55JFWDAcjs.decodeMergedImage; exports.decodePlanes = _chunkS55JFWDAcjs.decodePlanes; exports.decodePng = _chunkOLNIPTB3cjs.decodePng; exports.decodePngDataUrl = _chunkS55JFWDAcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkSS53NNZOcjs.decodeSelectionRle; exports.decontaminateColors = _chunkSS53NNZOcjs.decontaminateColors; exports.deepBytes = _chunkOLNIPTB3cjs.deepBytes; exports.deepTile = _chunkOLNIPTB3cjs.deepTile; exports.defaultActiveLayerId = _chunkS55JFWDAcjs.defaultActiveLayerId; exports.defaultAdjustmentParams = _chunkS55JFWDAcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkB46UQUDCcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkB46UQUDCcjs.defaultLayerEffect; exports.defaultShapeName = _chunkS55JFWDAcjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkS55JFWDAcjs.depthMaskAlpha; exports.depthOf = _chunkOLNIPTB3cjs.depthOf; exports.depthRasterMask = _chunkS55JFWDAcjs.depthRasterMask; exports.describeChannel = describeChannel; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkS55JFWDAcjs.describeTransform; exports.deserializeChannels = deserializeChannels; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkS55JFWDAcjs.deserializeEffects; exports.deserializeLayer = _chunkS55JFWDAcjs.deserializeLayer; exports.deserializeLayers = _chunkS55JFWDAcjs.deserializeLayers; exports.deserializeMask = _chunkUC3PWFM3cjs.deserializeMask; exports.deserializePatterns = _chunkS55JFWDAcjs.deserializePatterns; exports.deserializeSelection = _chunkSS53NNZOcjs.deserializeSelection; exports.despillEdge = _chunkS55JFWDAcjs.despillEdge; exports.developFilter = _chunkS55JFWDAcjs.developFilter; exports.developFromAdjustments = _chunkS55JFWDAcjs.developFromAdjustments; exports.developTarget = _chunkS55JFWDAcjs.developTarget; exports.dexp = _chunkXFYLA3ZOcjs.dexp; exports.dilateMask = _chunkMQDIP4CFcjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkSS53NNZOcjs.distanceTransform; exports.dlog = _chunkXFYLA3ZOcjs.dlog; exports.documentContents = _chunkS55JFWDAcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunkYF3YZZ6Gcjs.dodgeBurn; exports.dodgeBurnCurve = _chunkYF3YZZ6Gcjs.dodgeBurnCurve; exports.downloadMaskImage = downloadMaskImage; exports.downloadPsd = downloadPsd; exports.dpow = _chunkXFYLA3ZOcjs.dpow; exports.dragWarpMeshPoint = _chunkQAUIZPYIcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkXFYLA3ZOcjs.dsincos; exports.duplicateLayer = _chunkS55JFWDAcjs.duplicateLayer; exports.edgeBits = _chunkXFYLA3ZOcjs.edgeBits; exports.edgeWidth = _chunkSS53NNZOcjs.edgeWidth; exports.effectColorHex = _chunkB46UQUDCcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectLayerTiming = effectLayerTiming; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkB46UQUDCcjs.effectReach; exports.effectiveLayerMask = _chunkS55JFWDAcjs.effectiveLayerMask; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkB46UQUDCcjs.effectsFingerprint; exports.effectsMargin = _chunkB46UQUDCcjs.effectsMargin; exports.effectsScale = _chunkB46UQUDCcjs.effectsScale; exports.ellipsePoints = _chunkUC3PWFM3cjs.ellipsePoints; exports.ellipseSelection = _chunkUC3PWFM3cjs.ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunk474IQG74cjs.emptySurface; exports.encodeDeepSurface = _chunkS55JFWDAcjs.encodeDeepSurface; exports.encodePng = _chunkOLNIPTB3cjs.encodePng; exports.encodeRle = _chunkS55JFWDAcjs.encodeRle; exports.encodeSelectionRle = _chunkSS53NNZOcjs.encodeSelectionRle; exports.encodeSurface = _chunkS55JFWDAcjs.encodeSurface; exports.evalWarpMesh = _chunkQAUIZPYIcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkS55JFWDAcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkPQ3H2AANcjs.exchangeRates; exports.expNeg = _chunkXFYLA3ZOcjs.expNeg; exports.expandCoverage = _chunkSS53NNZOcjs.expandCoverage; exports.exportPsd = _chunkS55JFWDAcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkSS53NNZOcjs.featherCoverage; exports.fillRect = _chunk474IQG74cjs.fillRect; exports.filmPixel = _chunkXFYLA3ZOcjs.filmPixel; exports.filmReflectance = _chunkXFYLA3ZOcjs.filmReflectance; exports.filterMaskCoverage = _chunkS55JFWDAcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkB46UQUDCcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findSky = _chunkUC3PWFM3cjs.findSky; exports.findSubject = _chunkUC3PWFM3cjs.findSubject; exports.findWebGpu = _chunkXFYLA3ZOcjs.findWebGpu; exports.finishTile = _chunk474IQG74cjs.finishTile; exports.fitParagraphRuns = _chunkQAUIZPYIcjs.fitParagraphRuns; exports.fitRuns = _chunkQAUIZPYIcjs.fitRuns; exports.flattenLayers = _chunkB46UQUDCcjs.flattenLayers; exports.flattenPath = _chunkS55JFWDAcjs.flattenPath; exports.flipCorners = _chunkS55JFWDAcjs.flipCorners; exports.flowField = _chunkXFYLA3ZOcjs.flowField; exports.focusArea = _chunkUC3PWFM3cjs.focusArea; exports.followLayerMove = _chunkS55JFWDAcjs.followLayerMove; exports.fontOf = _chunkQAUIZPYIcjs.fontOf; exports.forgetSelectAndMaskSettings = forgetSelectAndMaskSettings; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkSS53NNZOcjs.fullSelection; exports.gaussianBlur = _chunkK6PXS6DOcjs.gaussianBlur; exports.geometryHomography = _chunkS55JFWDAcjs.geometryHomography; exports.getAnnotationBounds = _chunkS55JFWDAcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkS55JFWDAcjs.getCropCursor; exports.getRotatedSize = _chunkS55JFWDAcjs.getRotatedSize; exports.getViewportMetrics = _chunkS55JFWDAcjs.getViewportMetrics; exports.getViewportProjection = _chunkS55JFWDAcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.grabCutLabels = _chunkUC3PWFM3cjs.grabCutLabels; exports.gradientDabColor = _chunkPQ3H2AANcjs.gradientDabColor; exports.grainCatch = _chunkPQ3H2AANcjs.grainCatch; exports.grainHeights = _chunkPQ3H2AANcjs.grainHeights; exports.greyMorphology = _chunkSS53NNZOcjs.greyMorphology; exports.groupLayers = _chunkS55JFWDAcjs.groupLayers; exports.growSelection = growSelection; exports.guidePlanes = _chunkSS53NNZOcjs.guidePlanes; exports.guidedFilterColor = _chunkSS53NNZOcjs.guidedFilterColor; exports.handleMaskViewKey = handleMaskViewKey; exports.handlePaintShortcut = handlePaintShortcut; exports.handleQuickMaskKey = handleQuickMaskKey; exports.handleSelectionShortcut = handleSelectionShortcut; exports.hasActiveEffects = _chunkB46UQUDCcjs.hasActiveEffects; exports.hasEdgeUnmix = _chunkS55JFWDAcjs.hasEdgeUnmix; exports.hasLayersBelow = hasLayersBelow; exports.hasResampledLegacyMask = _chunkS55JFWDAcjs.hasResampledLegacyMask; exports.hasSoftBand = _chunkS55JFWDAcjs.hasSoftBand; exports.hasSurface = _chunkS55JFWDAcjs.hasSurface; exports.hasWarp = _chunkS55JFWDAcjs.hasWarp; exports.hash2 = _chunkPQ3H2AANcjs.hash2; exports.hashMaskContent = _chunkSS53NNZOcjs.hashMaskContent; exports.hashNoise = _chunkB46UQUDCcjs.hashNoise; exports.healPixels = _chunkYF3YZZ6Gcjs.healPixels; exports.hexToPaintRgb = _chunkPQ3H2AANcjs.hexToPaintRgb; exports.hexToRgb = _chunkS55JFWDAcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkS55JFWDAcjs.hitTestAnnotation; exports.hitTestCrop = _chunkS55JFWDAcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkS55JFWDAcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkS55JFWDAcjs.hueRangeTables; exports.hueRangeWeight = _chunkS55JFWDAcjs.hueRangeWeight; exports.hueSaturation = _chunkS55JFWDAcjs.hueSaturation; exports.identityCurve = _chunkS55JFWDAcjs.identityCurve; exports.identityLevels = _chunkS55JFWDAcjs.identityLevels; exports.identityTransform = _chunkS55JFWDAcjs.identityTransform; exports.identityWarpMesh = _chunkQAUIZPYIcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imagePanelTool = imagePanelTool; exports.imagePlaybackPanel = imagePlaybackPanel; exports.imageToCanvasPoint = _chunkS55JFWDAcjs.imageToCanvasPoint; exports.imageToolCanvasMode = imageToolCanvasMode; exports.imageToolForShortcut = imageToolForShortcut; exports.imageToolGroup = imageToolGroup; exports.imageToolLabel = imageToolLabel; exports.imageToolPanel = imageToolPanel; exports.importPsd = _chunkS55JFWDAcjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkB46UQUDCcjs.insertLayer; exports.inspectMaskEdge = inspectMaskEdge; exports.instancesOf = _chunkS55JFWDAcjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkS55JFWDAcjs.invertMatrix3; exports.invertSelection = _chunkSS53NNZOcjs.invertSelection; exports.isActiveFilter = _chunkS55JFWDAcjs.isActiveFilter; exports.isActiveVectorMask = _chunkS55JFWDAcjs.isActiveVectorMask; exports.isAdjustmentKind = _chunkS55JFWDAcjs.isAdjustmentKind; exports.isBitDepth = _chunkOLNIPTB3cjs.isBitDepth; exports.isBlendMode = _chunkOLNIPTB3cjs.isBlendMode; exports.isBrushstrokeBrush = _chunkPQ3H2AANcjs.isBrushstrokeBrush; exports.isColorRangePreset = isColorRangePreset; exports.isContentsDecoded = _chunkS55JFWDAcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkS55JFWDAcjs.isDefaultDepthMask; exports.isGradientPaint = _chunkPQ3H2AANcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunkYF3YZZ6Gcjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkS55JFWDAcjs.isIdentityTransform; exports.isInterpolation = _chunkB46UQUDCcjs.isInterpolation; exports.isLayerEffectKind = _chunkB46UQUDCcjs.isLayerEffectKind; exports.isLayerLocked = _chunkB46UQUDCcjs.isLayerLocked; exports.isLegacyShape = _chunkS55JFWDAcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPaintableLayer = _chunkS55JFWDAcjs.isPaintableLayer; exports.isPainterlyBlendMode = _chunkOLNIPTB3cjs.isPainterlyBlendMode; exports.isPathEditTool = isPathEditTool; exports.isPng = _chunkOLNIPTB3cjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkS55JFWDAcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkS55JFWDAcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkSS53NNZOcjs.isSelectionEmpty; exports.isSelectionMode = _chunkSS53NNZOcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkOLNIPTB3cjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkS55JFWDAcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkS55JFWDAcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkS55JFWDAcjs.isTransformAnchor; exports.isValidWarp = _chunkS55JFWDAcjs.isValidWarp; exports.keepDeepSamples = _chunkOLNIPTB3cjs.keepDeepSamples; exports.keepMainPieces = _chunkUC3PWFM3cjs.keepMainPieces; exports.kelvinToTemperature = _chunkS55JFWDAcjs.kelvinToTemperature; exports.keysWeight = _chunkB46UQUDCcjs.keysWeight; exports.latticeViscosity = _chunkXFYLA3ZOcjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkB46UQUDCcjs.layerEffectFields; exports.layerEffectLabel = _chunkB46UQUDCcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkS55JFWDAcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkS55JFWDAcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkS55JFWDAcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkS55JFWDAcjs.layerMaskKey; exports.layerMaskSelection = _chunkS55JFWDAcjs.layerMaskSelection; exports.layerMenu = layerMenu; exports.layerName = _chunkS55JFWDAcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerPanels = layerPanels; exports.layerThumbnailClick = layerThumbnailClick; exports.layerTree = _chunkS55JFWDAcjs.layerTree; exports.layerTypeLabel = _chunkS55JFWDAcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkS55JFWDAcjs.layersFromLegacy; exports.layoutText = _chunkQAUIZPYIcjs.layoutText; exports.legacyAdjustmentLayer = _chunkS55JFWDAcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkS55JFWDAcjs.legacyMaskOf; exports.legacyView = _chunkS55JFWDAcjs.legacyView; exports.lerpPigment = _chunkOLNIPTB3cjs.lerpPigment; exports.lerpPigmentInto = _chunkOLNIPTB3cjs.lerpPigmentInto; exports.levelsValue = _chunkS55JFWDAcjs.levelsValue; exports.linearSrgbToXy = _chunkS55JFWDAcjs.linearSrgbToXy; exports.linearToSrgb = _chunkS55JFWDAcjs.linearToSrgb; exports.linearToSrgb8 = _chunkXFYLA3ZOcjs.linearToSrgb8; exports.liveComponent = _chunkS55JFWDAcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkS55JFWDAcjs.liveShapeSubpaths; exports.liveWire = liveWire; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkPQ3H2AANcjs.loadMixer; exports.loadOpenTypeFont = _chunkLCCMOWR7cjs.loadOpenTypeFont; exports.loadWetKernel = _chunkXFYLA3ZOcjs.loadWetKernel; exports.luma = _chunkYF3YZZ6Gcjs.luma; exports.magicWand = magicWand; exports.magneticAnchorSpacing = magneticAnchorSpacing; exports.mapCropHandle = _chunkS55JFWDAcjs.mapCropHandle; exports.mapLayer = _chunkB46UQUDCcjs.mapLayer; exports.mapSubpaths = _chunkS55JFWDAcjs.mapSubpaths; exports.maskBounds = _chunkMQDIP4CFcjs.maskBounds; exports.maskCoverageOverCanvas = _chunkS55JFWDAcjs.maskCoverageOverCanvas; exports.maskFileName = maskFileName; exports.maskNameFromFile = maskNameFromFile; exports.maskSummary = maskSummary; exports.maskThumbnailClick = maskThumbnailClick; exports.matrixFromCorners = _chunkS55JFWDAcjs.matrixFromCorners; exports.matrixFromParams = _chunkS55JFWDAcjs.matrixFromParams; exports.measureCanvasViewport = measureCanvasViewport; exports.membraneFill = _chunkMQDIP4CFcjs.membraneFill; exports.mergeLayerEffect = _chunkB46UQUDCcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkS55JFWDAcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunkPQ3H2AANcjs.mix32; exports.mixPigment8 = _chunkOLNIPTB3cjs.mixPigment8; exports.mixPigmentRgb = _chunkOLNIPTB3cjs.mixPigmentRgb; exports.mixPigments = _chunkOLNIPTB3cjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunkPQ3H2AANcjs.mixerRates; exports.modifySelection = _chunkSS53NNZOcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkS55JFWDAcjs.moveLayer; exports.moveSmartFilter = _chunkS55JFWDAcjs.moveSmartFilter; exports.moveWetSnapshot = _chunkXFYLA3ZOcjs.moveWetSnapshot; exports.mulMatrix3 = _chunkS55JFWDAcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkS55JFWDAcjs.neutralHueRange; exports.newContentsId = _chunkS55JFWDAcjs.newContentsId; exports.newEffectId = _chunkB46UQUDCcjs.newEffectId; exports.newLayerId = _chunkS55JFWDAcjs.newLayerId; exports.newLayerOptions = newLayerOptions; exports.newPathId = newPathId; exports.normalizeAdjustmentLayer = _chunkS55JFWDAcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkS55JFWDAcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkS55JFWDAcjs.normalizeAngle; exports.normalizeBlendMode = _chunkOLNIPTB3cjs.normalizeBlendMode; exports.normalizeBlender = _chunkPQ3H2AANcjs.normalizeBlender; exports.normalizeBrush = _chunkPQ3H2AANcjs.normalizeBrush; exports.normalizeFilter = _chunkS55JFWDAcjs.normalizeFilter; exports.normalizeFlow = _chunkXFYLA3ZOcjs.normalizeFlow; exports.normalizeHexColor = _chunkPQ3H2AANcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkB46UQUDCcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkS55JFWDAcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkS55JFWDAcjs.normalizeLiveShape; exports.normalizeMixer = _chunkPQ3H2AANcjs.normalizeMixer; exports.normalizePlacement = _chunkS55JFWDAcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkS55JFWDAcjs.normalizeProcessVersion; exports.normalizeRect = _chunkUC3PWFM3cjs.normalizeRect; exports.normalizeRefineEdgeParams = _chunkSS53NNZOcjs.normalizeRefineEdgeParams; exports.normalizeRetouch = _chunkYF3YZZ6Gcjs.normalizeRetouch; exports.normalizeShapePaint = _chunkS55JFWDAcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkS55JFWDAcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkS55JFWDAcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkPQ3H2AANcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkS55JFWDAcjs.normalizeSubpaths; exports.normalizeText = _chunkS55JFWDAcjs.normalizeText; exports.normalizeTilt = _chunkXFYLA3ZOcjs.normalizeTilt; exports.normalizeWetParams = _chunkXFYLA3ZOcjs.normalizeWetParams; exports.offsetLayer = _chunkS55JFWDAcjs.offsetLayer; exports.offsetShape = _chunkS55JFWDAcjs.offsetShape; exports.offsetSmartObject = _chunkS55JFWDAcjs.offsetSmartObject; exports.offsetVectorMask = _chunkS55JFWDAcjs.offsetVectorMask; exports.openMaskFile = openMaskFile; exports.openPsdFile = openPsdFile; exports.otsuThreshold = _chunkUC3PWFM3cjs.otsuThreshold; exports.packRgba = _chunk474IQG74cjs.packRgba; exports.packWetParams = _chunkXFYLA3ZOcjs.packWetParams; exports.paintGradientMappingFor = _chunkPQ3H2AANcjs.paintGradientMappingFor; exports.paintPathStroke = _chunkPQ3H2AANcjs.paintPathStroke; exports.paintSourceColor = _chunkPQ3H2AANcjs.paintSourceColor; exports.paintSourceCss = _chunkPQ3H2AANcjs.paintSourceCss; exports.paragraphRanges = _chunkQAUIZPYIcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkS55JFWDAcjs.parseAdjustmentBlock; exports.parseBlend = _chunkS55JFWDAcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkOLNIPTB3cjs.parseDataUrl; exports.parseEffectColor = _chunkB46UQUDCcjs.parseEffectColor; exports.parseLfx2 = _chunkS55JFWDAcjs.parseLfx2; exports.parseLrfx = _chunkS55JFWDAcjs.parseLrfx; exports.parseOpenTypeFont = _chunkLCCMOWR7cjs.parseOpenTypeFont; exports.parsePaintSource = _chunkPQ3H2AANcjs.parsePaintSource; exports.parsePatternBlock = _chunkS55JFWDAcjs.parsePatternBlock; exports.parseSelectionMode = _chunkSS53NNZOcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkS55JFWDAcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkS55JFWDAcjs.patchParagraphStyle; exports.patchTextStyle = _chunkS55JFWDAcjs.patchTextStyle; exports.pathAnchorCount = pathAnchorCount; exports.pathBounds = pathBounds; exports.pathStrokeCoverage = _chunkPQ3H2AANcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkPQ3H2AANcjs.pathStrokeDabs; exports.pathSvgData = pathSvgData; exports.pathToSelection = pathToSelection; exports.perDabStrength = _chunkYF3YZZ6Gcjs.perDabStrength; exports.photoFilterMatrix = _chunkS55JFWDAcjs.photoFilterMatrix; exports.pigment8 = _chunkOLNIPTB3cjs.pigment8; exports.pigmentColor = _chunkXFYLA3ZOcjs.pigmentColor; exports.pigmentOf = _chunkXFYLA3ZOcjs.pigmentOf; exports.pixelLayerBounds = _chunkS55JFWDAcjs.pixelLayerBounds; exports.pixelLayers = _chunkS55JFWDAcjs.pixelLayers; exports.pixelPigment = _chunkXFYLA3ZOcjs.pixelPigment; exports.placeContents = _chunkS55JFWDAcjs.placeContents; exports.placeLayer = _chunkS55JFWDAcjs.placeLayer; exports.placementAt = _chunkS55JFWDAcjs.placementAt; exports.placementBounds = _chunkS55JFWDAcjs.placementBounds; exports.placementGeometry = _chunkS55JFWDAcjs.placementGeometry; exports.planImageToolPlayback = planImageToolPlayback; exports.planOutlineTrace = planOutlineTrace; exports.pngDataUrl = _chunkOLNIPTB3cjs.pngDataUrl; exports.pointerPressure = _chunkXFYLA3ZOcjs.pointerPressure; exports.pointerStrokeSample = _chunkXFYLA3ZOcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkXFYLA3ZOcjs.pointerStrokeSamples; exports.polygonCoverage = _chunkUC3PWFM3cjs.polygonCoverage; exports.polygonCoverageBox = _chunkUC3PWFM3cjs.polygonCoverageBox; exports.polygonSelection = _chunkUC3PWFM3cjs.polygonSelection; exports.posterizeValue = _chunkS55JFWDAcjs.posterizeValue; exports.presetWarp = _chunkS55JFWDAcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkS55JFWDAcjs.projectImagePoint; exports.projectImageRect = _chunkS55JFWDAcjs.projectImageRect; exports.projectMaskCoverage = _chunkS55JFWDAcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkOLNIPTB3cjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkS55JFWDAcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkS55JFWDAcjs.psdToLayers; exports.pullWarpMesh = _chunkQAUIZPYIcjs.pullWarpMesh; exports.put255 = _chunkPQ3H2AANcjs.put255; exports.quadFrameOverlay = quadFrameOverlay; exports.quickMaskPixels = quickMaskPixels; exports.quickSelectStroke = _chunkUC3PWFM3cjs.quickSelectStroke; exports.rand01 = _chunkPQ3H2AANcjs.rand01; exports.randSigned = _chunkPQ3H2AANcjs.randSigned; exports.rangeLightness = _chunkS55JFWDAcjs.rangeLightness; exports.rasterContents = _chunkS55JFWDAcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkS55JFWDAcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkS55JFWDAcjs.rasterizeCoverage; exports.rasterizeDab = _chunkPQ3H2AANcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkS55JFWDAcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkOLNIPTB3cjs.readDeepRegion; exports.readEdgeColor = _chunkS55JFWDAcjs.readEdgeColor; exports.readPaintSource = _chunkPQ3H2AANcjs.readPaintSource; exports.readPaths = readPaths; exports.readPixel = _chunk474IQG74cjs.readPixel; exports.readPsd = _chunkS55JFWDAcjs.readPsd; exports.readRegion = _chunk474IQG74cjs.readRegion; exports.readShapeComponents = _chunkS55JFWDAcjs.readShapeComponents; exports.readSourceRegion = _chunkYF3YZZ6Gcjs.readSourceRegion; exports.rectSelection = _chunkUC3PWFM3cjs.rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkB46UQUDCcjs.reduceSurface; exports.referencePoint = _chunkS55JFWDAcjs.referencePoint; exports.refineCoverage = _chunkSS53NNZOcjs.refineCoverage; exports.refineEdgeHalo = _chunkSS53NNZOcjs.refineEdgeHalo; exports.refineSelection = _chunkSS53NNZOcjs.refineSelection; exports.reflectanceToRgb = _chunkOLNIPTB3cjs.reflectanceToRgb; exports.removeAlpha = _chunkS55JFWDAcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkS55JFWDAcjs.removeLayer; exports.removeLayerEffect = _chunkS55JFWDAcjs.removeLayerEffect; exports.removeLayerFilter = _chunkS55JFWDAcjs.removeLayerFilter; exports.removePaintGradientStop = _chunkPQ3H2AANcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkS55JFWDAcjs.removeSmartFilter; exports.renderBrushstroke = _chunkPQ3H2AANcjs.renderBrushstroke; exports.renderLayerEffects = _chunkB46UQUDCcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkS55JFWDAcjs.renderShape; exports.renderShapeRect = _chunkS55JFWDAcjs.renderShapeRect; exports.renderSmartObject = _chunkS55JFWDAcjs.renderSmartObject; exports.renderText = _chunkS55JFWDAcjs.renderText; exports.replaceContents = _chunkS55JFWDAcjs.replaceContents; exports.replaceTextRange = _chunkS55JFWDAcjs.replaceTextRange; exports.requireLayer = _chunkS55JFWDAcjs.requireLayer; exports.requireOperation = _chunkS55JFWDAcjs.requireOperation; exports.requireShapeLayer = _chunkS55JFWDAcjs.requireShapeLayer; exports.requireSmartObject = _chunkS55JFWDAcjs.requireSmartObject; exports.requireTypeLayer = _chunkS55JFWDAcjs.requireTypeLayer; exports.requireUnlocked = _chunkS55JFWDAcjs.requireUnlocked; exports.rerender = _chunkS55JFWDAcjs.rerender; exports.rerenderShape = _chunkS55JFWDAcjs.rerenderShape; exports.rerenderText = _chunkS55JFWDAcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkSS53NNZOcjs.resizeSelection; exports.resizeWarpMesh = _chunkQAUIZPYIcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkS55JFWDAcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkPQ3H2AANcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.resolveVectorMasks = _chunkS55JFWDAcjs.resolveVectorMasks; exports.restyleRange = _chunkQAUIZPYIcjs.restyleRange; exports.retouchFilter = _chunkYF3YZZ6Gcjs.retouchFilter; exports.reversePaintGradient = _chunkPQ3H2AANcjs.reversePaintGradient; exports.rgbToGray = _chunkS55JFWDAcjs.rgbToGray; exports.rgbToHsl = _chunkS55JFWDAcjs.rgbToHsl; exports.rgbToReflectance = _chunkOLNIPTB3cjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunkYF3YZZ6Gcjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkS55JFWDAcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkS55JFWDAcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.runSelectionJob = _chunkUC3PWFM3cjs.runSelectionJob; exports.sameCanvasViewport = sameCanvasViewport; exports.sampleLut = _chunkS55JFWDAcjs.sampleLut; exports.sampleToneLut = _chunkS55JFWDAcjs.sampleToneLut; exports.saturationOf = _chunkYF3YZZ6Gcjs.saturationOf; exports.scaleLayerEffect = _chunkB46UQUDCcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkPQ3H2AANcjs.scalePaintGradient; exports.seamlessClone = _chunkMQDIP4CFcjs.seamlessClone; exports.seedFromString = _chunkPQ3H2AANcjs.seedFromString; exports.segmentToSelection = segmentToSelection; exports.segmentationOutlines = segmentationOutlines; exports.segmentsToSelection = segmentsToSelection; exports.selectObjectIn = _chunkUC3PWFM3cjs.selectObjectIn; exports.selectSimilar = selectSimilar; exports.selectionArea = _chunkSS53NNZOcjs.selectionArea; exports.selectionDiffPixels = selectionDiffPixels; exports.selectionFromCoverage = _chunkSS53NNZOcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkSS53NNZOcjs.selectionFromPixels; exports.selectionFromRegion = _chunkSS53NNZOcjs.selectionFromRegion; exports.selectionFromTiles = _chunkSS53NNZOcjs.selectionFromTiles; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionRing = selectionRing; exports.selectionToCoverage = _chunkSS53NNZOcjs.selectionToCoverage; exports.selectionToPixels = _chunkSS53NNZOcjs.selectionToPixels; exports.selectionToSubpaths = selectionToSubpaths; exports.selectionUncertainty = selectionUncertainty; exports.selectionValueAt = _chunkSS53NNZOcjs.selectionValueAt; exports.serializeChannels = serializeChannels; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkS55JFWDAcjs.serializeContents; exports.serializeEffects = _chunkS55JFWDAcjs.serializeEffects; exports.serializeLayer = _chunkS55JFWDAcjs.serializeLayer; exports.serializeLayers = _chunkS55JFWDAcjs.serializeLayers; exports.serializeLayersExternal = _chunkS55JFWDAcjs.serializeLayersExternal; exports.serializeMask = _chunkUC3PWFM3cjs.serializeMask; exports.serializePaths = serializePaths; exports.serializePatterns = _chunkS55JFWDAcjs.serializePatterns; exports.serializeSelection = _chunkSS53NNZOcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkS55JFWDAcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkS55JFWDAcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkS55JFWDAcjs.setLayerMask; exports.setLayerProperties = _chunkS55JFWDAcjs.setLayerProperties; exports.setLum = _chunkOLNIPTB3cjs.setLum; exports.setPigmentColor = _chunkOLNIPTB3cjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkS55JFWDAcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkS55JFWDAcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkS55JFWDAcjs.setSmartPlacement; exports.shadeTile = _chunkXFYLA3ZOcjs.shadeTile; exports.shapeAsPixelLayer = _chunkS55JFWDAcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkS55JFWDAcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkS55JFWDAcjs.shapeGeometryBounds; exports.shapeLayers = _chunkS55JFWDAcjs.shapeLayers; exports.shapeOutline = _chunkS55JFWDAcjs.shapeOutline; exports.shapeRenderClip = _chunkS55JFWDAcjs.shapeRenderClip; exports.shiftCoverage = _chunkSS53NNZOcjs.shiftCoverage; exports.simplifyPixelPath = simplifyPixelPath; exports.skinToneRange = skinToneRange; exports.slicSuperpixels = _chunkUC3PWFM3cjs.slicSuperpixels; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkS55JFWDAcjs.smartObjectLayers; exports.smoothCoverage = _chunkSS53NNZOcjs.smoothCoverage; exports.smoothPoints = _chunkPQ3H2AANcjs.smoothPoints; exports.smoothnessWeights = _chunkUC3PWFM3cjs.smoothnessWeights; exports.smudgeEffect = _chunkYF3YZZ6Gcjs.smudgeEffect; exports.snapPolygonToEdges = snapPolygonToEdges; exports.snapTo45 = snapTo45; exports.snapToEdge = snapToEdge; exports.softMaskToSelection = _chunkUC3PWFM3cjs.softMaskToSelection; exports.solidPaint = _chunkPQ3H2AANcjs.solidPaint; exports.solidSurface = _chunk474IQG74cjs.solidSurface; exports.solveMembrane = _chunkMQDIP4CFcjs.solveMembrane; exports.spliceRuns = _chunkQAUIZPYIcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunkYF3YZZ6Gcjs.sponge; exports.spongeEffect = _chunkYF3YZZ6Gcjs.spongeEffect; exports.spotHealPixels = _chunkYF3YZZ6Gcjs.spotHealPixels; exports.spotHealWindow = _chunkYF3YZZ6Gcjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkXFYLA3ZOcjs.srgbByteToLinear; exports.srgbDecode = _chunkOLNIPTB3cjs.srgbDecode; exports.srgbEncode = _chunkOLNIPTB3cjs.srgbEncode; exports.srgbToLinear = _chunkS55JFWDAcjs.srgbToLinear; exports.standardBlendMode = _chunkOLNIPTB3cjs.standardBlendMode; exports.startMarchingAnts = startMarchingAnts; exports.startSelectionWorker = _chunkUC3PWFM3cjs.startSelectionWorker; exports.stepSlotTs = _chunkXFYLA3ZOcjs.stepSlotTs; exports.strokeGrainCatch = _chunkPQ3H2AANcjs.strokeGrainCatch; exports.styleAt = _chunkQAUIZPYIcjs.styleAt; exports.subpathsToSvgPath = subpathsToSvgPath; exports.sumHistograms = sumHistograms; exports.superpixelSaliency = _chunkUC3PWFM3cjs.superpixelSaliency; exports.surfaceBytes = _chunk474IQG74cjs.surfaceBytes; exports.surfaceDepth = _chunkOLNIPTB3cjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkOLNIPTB3cjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunk474IQG74cjs.surfaceFromPixels; exports.surfacesEqual = _chunk474IQG74cjs.surfacesEqual; exports.tempTintToXy = _chunkS55JFWDAcjs.tempTintToXy; exports.temperatureToKelvin = _chunkS55JFWDAcjs.temperatureToKelvin; exports.textIndexAt = _chunkQAUIZPYIcjs.textIndexAt; exports.textMatrix = _chunkS55JFWDAcjs.textMatrix; exports.textOrientation = _chunkS55JFWDAcjs.textOrientation; exports.textOutlines = _chunkS55JFWDAcjs.textOutlines; exports.textRange = _chunkS55JFWDAcjs.textRange; exports.tileCoord = _chunk474IQG74cjs.tileCoord; exports.tileKey = _chunk474IQG74cjs.tileKey; exports.tileRect = _chunk474IQG74cjs.tileRect; exports.tileSamples = _chunkOLNIPTB3cjs.tileSamples; exports.tileSamples16 = _chunkOLNIPTB3cjs.tileSamples16; exports.tileSamples32 = _chunkOLNIPTB3cjs.tileSamples32; exports.tilesInRect = _chunk474IQG74cjs.tilesInRect; exports.tipFalloff = _chunkPQ3H2AANcjs.tipFalloff; exports.tipReach = _chunkPQ3H2AANcjs.tipReach; exports.tipShape = _chunkPQ3H2AANcjs.tipShape; exports.to16From32 = _chunkOLNIPTB3cjs.to16From32; exports.to16From8 = _chunkOLNIPTB3cjs.to16From8; exports.to32From16 = _chunkOLNIPTB3cjs.to32From16; exports.to32From8 = _chunkOLNIPTB3cjs.to32From8; exports.to8From16 = _chunkOLNIPTB3cjs.to8From16; exports.to8From32 = _chunkOLNIPTB3cjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkS55JFWDAcjs.toTextSpace; exports.toneCurve = _chunkS55JFWDAcjs.toneCurve; exports.toneLuts = _chunkS55JFWDAcjs.toneLuts; exports.toneOf = _chunkYF3YZZ6Gcjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkS55JFWDAcjs.transformHomography; exports.transformMap = _chunkS55JFWDAcjs.transformMap; exports.transformShapeComponents = _chunkS55JFWDAcjs.transformShapeComponents; exports.transformSurface = _chunkB46UQUDCcjs.transformSurface; exports.transformTypeLayer = _chunkS55JFWDAcjs.transformTypeLayer; exports.transformVectorMask = _chunkS55JFWDAcjs.transformVectorMask; exports.transformedBounds = _chunkB46UQUDCcjs.transformedBounds; exports.transformedBox = _chunkS55JFWDAcjs.transformedBox; exports.transformedPoint = _chunkS55JFWDAcjs.transformedPoint; exports.translateLayer = _chunkS55JFWDAcjs.translateLayer; exports.translateSurface = _chunk474IQG74cjs.translateSurface; exports.typeAsPixelLayer = _chunkS55JFWDAcjs.typeAsPixelLayer; exports.typeFrame = _chunkS55JFWDAcjs.typeFrame; exports.typeFromAnnotation = _chunkS55JFWDAcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkS55JFWDAcjs.typeLayerName; exports.ungroupLayer = _chunkS55JFWDAcjs.ungroupLayer; exports.uniformTile = _chunk474IQG74cjs.uniformTile; exports.unionRect = _chunkS55JFWDAcjs.unionRect; exports.unprojectCanvasPoint = _chunkS55JFWDAcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkS55JFWDAcjs.updateLayerEffect; exports.updateLayerFilter = _chunkS55JFWDAcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkS55JFWDAcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkPQ3H2AANcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkS55JFWDAcjs.updateShapeLayer; exports.updateSmartFilter = _chunkS55JFWDAcjs.updateSmartFilter; exports.updateTypeLayer = _chunkS55JFWDAcjs.updateTypeLayer; exports.upscaleRegion = _chunkUC3PWFM3cjs.upscaleRegion; exports.userErrorMessage = _chunkS55JFWDAcjs.userErrorMessage; exports.uvToXy = _chunkS55JFWDAcjs.uvToXy; exports.validateEffectGradient = _chunkB46UQUDCcjs.validateEffectGradient; exports.validateLayerEffect = _chunkB46UQUDCcjs.validateLayerEffect; exports.validateLayerEffects = _chunkB46UQUDCcjs.validateLayerEffects; exports.vectorMaskBounds = _chunkS55JFWDAcjs.vectorMaskBounds; exports.vectorMaskCoverage = _chunkS55JFWDAcjs.vectorMaskCoverage; exports.vectorMaskThumbnail = _chunkS55JFWDAcjs.vectorMaskThumbnail; exports.vectorMaskThumbnailClick = vectorMaskThumbnailClick; exports.versionedDescriptorBytes = _chunkS55JFWDAcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkS55JFWDAcjs.vibranceLinear; exports.vibrancePixel = _chunkS55JFWDAcjs.vibrancePixel; exports.walkDabs = _chunkPQ3H2AANcjs.walkDabs; exports.warpMeshEditPoints = _chunkQAUIZPYIcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkQAUIZPYIcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkQAUIZPYIcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkQAUIZPYIcjs.warpPresetMesh; exports.warpSurface = _chunkB46UQUDCcjs.warpSurface; exports.watchCanvasViewport = watchCanvasViewport; exports.wbMatrix = _chunkS55JFWDAcjs.wbMatrix; exports.wetGpuSupport = _chunkXFYLA3ZOcjs.wetGpuSupport; exports.wetSimdSupported = _chunkXFYLA3ZOcjs.wetSimdSupported; exports.wetSupport = _chunkXFYLA3ZOcjs.wetSupport; exports.whiteBalanceFromSample = _chunkS55JFWDAcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkS55JFWDAcjs.whiteBalanceMatrix; exports.withBackgroundOpacity = withBackgroundOpacity; exports.withFilterMaskSurface = _chunkS55JFWDAcjs.withFilterMaskSurface; exports.withImagePlayback = withImagePlayback; exports.withNewIds = _chunkS55JFWDAcjs.withNewIds; exports.workImage = _chunkUC3PWFM3cjs.workImage; exports.workLuma = _chunkUC3PWFM3cjs.workLuma; exports.workPlanes = _chunkUC3PWFM3cjs.workPlanes; exports.writeAdjustmentBlock = _chunkS55JFWDAcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkOLNIPTB3cjs.writeDeepRegion; exports.writeLfx2 = _chunkS55JFWDAcjs.writeLfx2; exports.writePatternBlock = _chunkS55JFWDAcjs.writePatternBlock; exports.writePsd = _chunkS55JFWDAcjs.writePsd; exports.writeRegion = _chunk474IQG74cjs.writeRegion; exports.xyToTempTint = _chunkS55JFWDAcjs.xyToTempTint; exports.xyToUv = _chunkS55JFWDAcjs.xyToUv;
23316
+
23317
+ exports.ADJUSTMENT_KEYS = _chunkS55JFWDAcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkS55JFWDAcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkS55JFWDAcjs.ADJUSTMENT_LUT_SIZE; exports.ANCHOR_FRACTION = _chunkS55JFWDAcjs.ANCHOR_FRACTION; exports.AS_SHOT_KELVIN = _chunkS55JFWDAcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkS55JFWDAcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkS55JFWDAcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkOLNIPTB3cjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkOLNIPTB3cjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkS55JFWDAcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkXFYLA3ZOcjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkBROJYMWUcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkPQ3H2AANcjs.BrushstrokeCache; exports.CANVAS_SIZE_PRESETS = CANVAS_SIZE_PRESETS; exports.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.COLOR_RANGE_PRESETS = COLOR_RANGE_PRESETS; exports.COLOR_RANGE_PRESET_LABELS = COLOR_RANGE_PRESET_LABELS; exports.CONTENT_AWARE_FILL_SAMPLING = CONTENT_AWARE_FILL_SAMPLING; exports.CONTENT_AWARE_FILL_TOOLS = CONTENT_AWARE_FILL_TOOLS; exports.ColorGmm = _chunkKALCIDWHcjs.ColorGmm; exports.ContentAwareFillSession = ContentAwareFillSession; exports.CoverageMap = _chunkPQ3H2AANcjs.CoverageMap; exports.D50 = _chunkS55JFWDAcjs.D50; exports.D65 = _chunkS55JFWDAcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkQAUIZPYIcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkPQ3H2AANcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkPQ3H2AANcjs.DEFAULT_BRUSH; exports.DEFAULT_CANVAS_VIEWPORT = DEFAULT_CANVAS_VIEWPORT; exports.DEFAULT_CHANNEL_COLOR = DEFAULT_CHANNEL_COLOR; exports.DEFAULT_CONTENT_AWARE_FILL_SETTINGS = DEFAULT_CONTENT_AWARE_FILL_SETTINGS; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkXFYLA3ZOcjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkB46UQUDCcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkS55JFWDAcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunkPQ3H2AANcjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunkPQ3H2AANcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkPQ3H2AANcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = _chunkSS53NNZOcjs.DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunk2ONK3ERDcjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SELECT_AND_MASK_SETTINGS = DEFAULT_SELECT_AND_MASK_SETTINGS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunkPQ3H2AANcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkQAUIZPYIcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkXFYLA3ZOcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkXFYLA3ZOcjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkS55JFWDAcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkK6PXS6DOcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkXFYLA3ZOcjs.DRY_EPS; exports.DabWalker = _chunkPQ3H2AANcjs.DabWalker; exports.EDGE_COLOR_RADIUS = _chunkS55JFWDAcjs.EDGE_COLOR_RADIUS; exports.EFFECT_LAYER_USES = EFFECT_LAYER_USES; exports.EMPTY_DISTANCE = _chunkSS53NNZOcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkPQ3H2AANcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkXFYLA3ZOcjs.EX; exports.EY = _chunkXFYLA3ZOcjs.EY; exports.EdgeMap = EdgeMap; exports.FLAG_ALIVE = _chunkXFYLA3ZOcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkXFYLA3ZOcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkXFYLA3ZOcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkXFYLA3ZOcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkXFYLA3ZOcjs.FLAG_TOP; exports.FLAG_WET = _chunkXFYLA3ZOcjs.FLAG_WET; exports.FLAT = _chunkXFYLA3ZOcjs.FLAT; exports.FREE_INTERVAL = _chunkXFYLA3ZOcjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkS55JFWDAcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GAMMA = _chunkKALCIDWHcjs.GAMMA; exports.GRAIN_PATTERNS = _chunkPQ3H2AANcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkPQ3H2AANcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = _chunkSS53NNZOcjs.GUIDED_FILTER_EPS; exports.GridGraph = _chunkKALCIDWHcjs.GridGraph; exports.HIDE = _chunkXFYLA3ZOcjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkS55JFWDAcjs.HUE_RANGE_LABELS; exports.HUE_RANGE_PRESETS = HUE_RANGE_PRESETS; exports.IDENTITY_CLONE_TRANSFORM = _chunk2ONK3ERDcjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkS55JFWDAcjs.IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_CROP_PRESETS = IMAGE_CROP_PRESETS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.IMAGE_EFFECT_PLACES = IMAGE_EFFECT_PLACES; exports.IMAGE_FILTER_PRESETS = IMAGE_FILTER_PRESETS; exports.IMAGE_PLAYBACK_KIND = IMAGE_PLAYBACK_KIND; exports.IMAGE_TOOL_GROUPS = IMAGE_TOOL_GROUPS; exports.IMAGE_TOOL_SHORTCUTS = IMAGE_TOOL_SHORTCUTS; exports.INTENTS = _chunkBROJYMWUcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunkB46UQUDCcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkS55JFWDAcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkS55JFWDAcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkB46UQUDCcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkS55JFWDAcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkS55JFWDAcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkS55JFWDAcjs.LUMA_709; exports.LayerCompositor = _chunkS55JFWDAcjs.LayerCompositor; exports.LayerEffectError = _chunkB46UQUDCcjs.LayerEffectError; exports.LayerOperationError = _chunkS55JFWDAcjs.LayerOperationError; exports.MARCHING_ANTS_STEP_MS = MARCHING_ANTS_STEP_MS; exports.MASK_EDGE_THRESHOLDS = MASK_EDGE_THRESHOLDS; exports.MASK_FILE_ACCEPT = MASK_FILE_ACCEPT; exports.MAX_BATCH = _chunkXFYLA3ZOcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkPQ3H2AANcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_BACKING_SIDE = MAX_CANVAS_BACKING_SIDE; exports.MAX_EFFECT_ANIMATION_MS = _chunkS55JFWDAcjs.MAX_EFFECT_ANIMATION_MS; exports.MAX_EFFECT_REACH = _chunkB46UQUDCcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkS55JFWDAcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkXFYLA3ZOcjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkB46UQUDCcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkXFYLA3ZOcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkXFYLA3ZOcjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkS55JFWDAcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkS55JFWDAcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkPQ3H2AANcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkPQ3H2AANcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkPQ3H2AANcjs.MIXING_MODELS; exports.MixerStroke = _chunkPQ3H2AANcjs.MixerStroke; exports.OPP = _chunkXFYLA3ZOcjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkOLNIPTB3cjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunkPQ3H2AANcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkPQ3H2AANcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkPQ3H2AANcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkXFYLA3ZOcjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkS55JFWDAcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkXFYLA3ZOcjs.PARAM; exports.PARAM_FLOATS = _chunkXFYLA3ZOcjs.PARAM_FLOATS; exports.PASTE_MODES = PASTE_MODES; exports.PATH_EDIT_TOOLS = PATH_EDIT_TOOLS; exports.PATTERN_BLOCK_KEYS = _chunkS55JFWDAcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkOLNIPTB3cjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkXFYLA3ZOcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkOLNIPTB3cjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkOLNIPTB3cjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkXFYLA3ZOcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkOLNIPTB3cjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkXFYLA3ZOcjs.PLANE; exports.PLANE_BYTES = _chunkXFYLA3ZOcjs.PLANE_BYTES; exports.PREVIEW_SIZE = PREVIEW_SIZE; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkS55JFWDAcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkXFYLA3ZOcjs.P_D0; exports.P_EDGE = _chunkXFYLA3ZOcjs.P_EDGE; exports.P_FX = _chunkXFYLA3ZOcjs.P_FX; exports.P_FY = _chunkXFYLA3ZOcjs.P_FY; exports.P_H = _chunkXFYLA3ZOcjs.P_H; exports.P_P0 = _chunkXFYLA3ZOcjs.P_P0; exports.P_RHO = _chunkXFYLA3ZOcjs.P_RHO; exports.P_SW = _chunkXFYLA3ZOcjs.P_SW; exports.P_UX = _chunkXFYLA3ZOcjs.P_UX; exports.P_UY = _chunkXFYLA3ZOcjs.P_UY; exports.PaintExchange = _chunkPQ3H2AANcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkPQ3H2AANcjs.PaintGradientSampler; exports.PaintSourceError = _chunkPQ3H2AANcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaperGrain = _chunkPQ3H2AANcjs.PaperGrain; exports.PathEditGesture = PathEditGesture; exports.PatternPlacement = _chunkB46UQUDCcjs.PatternPlacement; exports.PatternTile = _chunkB46UQUDCcjs.PatternTile; exports.PsdError = _chunkS55JFWDAcjs.PsdError; exports.QUICK_MASK_TARGET = QUICK_MASK_TARGET; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.REFINE_EDIT_KINDS = _chunkKALCIDWHcjs.REFINE_EDIT_KINDS; exports.REFINE_OUTPUTS = REFINE_OUTPUTS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunk2ONK3ERDcjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunk2ONK3ERDcjs.RegionPixelSource; exports.RetouchDabStroke = _chunk2ONK3ERDcjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkSS53NNZOcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkSS53NNZOcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SELECT_AND_MASK_TOOLS = SELECT_AND_MASK_TOOLS; exports.SELECT_AND_MASK_VIEWS = SELECT_AND_MASK_VIEWS; exports.SET_PLANES = _chunkXFYLA3ZOcjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkOLNIPTB3cjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkS55JFWDAcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkS55JFWDAcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkXFYLA3ZOcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkXFYLA3ZOcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkXFYLA3ZOcjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkS55JFWDAcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunk2ONK3ERDcjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkXFYLA3ZOcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkXFYLA3ZOcjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkS55JFWDAcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectAndMaskSession = SelectAndMaskSession; exports.SelectionGesture = SelectionGesture; exports.SelectionWorkerClient = _chunkKALCIDWHcjs.SelectionWorkerClient; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkPQ3H2AANcjs.SmudgeTip; exports.StrokeCoverage = _chunkPQ3H2AANcjs.StrokeCoverage; exports.SurfaceDraft = _chunk474IQG74cjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkS55JFWDAcjs.TEXT_ALIGNS; exports.TEXT_ORIENTATIONS = _chunkS55JFWDAcjs.TEXT_ORIENTATIONS; exports.TEXT_RENDER_MARGIN = _chunkS55JFWDAcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkS55JFWDAcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunk474IQG74cjs.TILE; exports.TILE_SHIFT = _chunk474IQG74cjs.TILE_SHIFT; exports.TINT_SCALE = _chunkS55JFWDAcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkPQ3H2AANcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkS55JFWDAcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunk2ONK3ERDcjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkS55JFWDAcjs.TRANSFORM_ANCHORS; exports.TRANSFORM_ROTATE_HANDLE_OFFSET = TRANSFORM_ROTATE_HANDLE_OFFSET; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunkPQ3H2AANcjs.TileMedium; exports.TilePixelSource = _chunk2ONK3ERDcjs.TilePixelSource; exports.TileableNoise = _chunkPQ3H2AANcjs.TileableNoise; exports.TiledSurface = _chunk474IQG74cjs.TiledSurface; exports.TransformTooLargeError = _chunkB46UQUDCcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunk2ONK3ERDcjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.UNITS = _chunkKALCIDWHcjs.UNITS; exports.U_MAX = _chunkXFYLA3ZOcjs.U_MAX; exports.VIBRANCE_GREY = _chunkS55JFWDAcjs.VIBRANCE_GREY; exports.W9 = _chunkXFYLA3ZOcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkQAUIZPYIcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkQAUIZPYIcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkXFYLA3ZOcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkXFYLA3ZOcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkXFYLA3ZOcjs.WET_TILE; exports.WGSL_HALO = _chunkXFYLA3ZOcjs.WGSL_HALO; exports.WGSL_SHADE = _chunkXFYLA3ZOcjs.WGSL_SHADE; exports.WGSL_STEP = _chunkXFYLA3ZOcjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WORK_PATH_NAME = WORK_PATH_NAME; exports.WORK_SIZE = _chunkKALCIDWHcjs.WORK_SIZE; exports.WetGpuEngine = _chunkXFYLA3ZOcjs.WetGpuEngine; exports.WetMedium = _chunkXFYLA3ZOcjs.WetMedium; exports.WetWorkerPool = _chunkXFYLA3ZOcjs.WetWorkerPool; exports.WetWorld = _chunkXFYLA3ZOcjs.WetWorld; exports.WetWorldError = _chunkXFYLA3ZOcjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkS55JFWDAcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkS55JFWDAcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkS55JFWDAcjs.activeEffectSmartFilters; exports.activeLayerAfterRemoval = _chunkS55JFWDAcjs.activeLayerAfterRemoval; exports.activeSmartFilters = _chunkS55JFWDAcjs.activeSmartFilters; exports.addLayerEffect = _chunkS55JFWDAcjs.addLayerEffect; exports.addLayerFilter = _chunkS55JFWDAcjs.addLayerFilter; exports.addLayerOfKind = addLayerOfKind; exports.addPaintGradientStop = _chunkPQ3H2AANcjs.addPaintGradientStop; exports.addSmartFilter = _chunkS55JFWDAcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkS55JFWDAcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkS55JFWDAcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkS55JFWDAcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkS55JFWDAcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.agentDragDraft = agentDragDraft; exports.anchorPoint = _chunkS55JFWDAcjs.anchorPoint; exports.annotationBlend = _chunkS55JFWDAcjs.annotationBlend; exports.annotationLayerFor = _chunkS55JFWDAcjs.annotationLayerFor; exports.annotationLayerName = _chunkS55JFWDAcjs.annotationLayerName; exports.annotationOfLayer = _chunkS55JFWDAcjs.annotationOfLayer; exports.annotationOfShape = _chunkS55JFWDAcjs.annotationOfShape; exports.annotationOfType = _chunkS55JFWDAcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkS55JFWDAcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkS55JFWDAcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkS55JFWDAcjs.applyAdjustments; exports.applyBoxBlur = _chunkS55JFWDAcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkS55JFWDAcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkS55JFWDAcjs.applyDepthMask; exports.applyEdgeUnmix = _chunkS55JFWDAcjs.applyEdgeUnmix; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkS55JFWDAcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkS55JFWDAcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkS55JFWDAcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkS55JFWDAcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkS55JFWDAcjs.applyParams; exports.applyProcess2Adjustments = _chunkS55JFWDAcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkS55JFWDAcjs.applyProcess2Float; exports.applyRefineEdits = _chunkKALCIDWHcjs.applyRefineEdits; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunk2ONK3ERDcjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkS55JFWDAcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkPQ3H2AANcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkPQ3H2AANcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunk2ONK3ERDcjs.applyToneToDeepTile; exports.backgroundLayer = _chunkS55JFWDAcjs.backgroundLayer; exports.base64ToBytes = _chunkOLNIPTB3cjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunkBB6TR422cjs.bestOffset; exports.blackWhiteGray = _chunkS55JFWDAcjs.blackWhiteGray; exports.blendChannel = _chunkOLNIPTB3cjs.blendChannel; exports.blendImageData = _chunkOLNIPTB3cjs.blendImageData; exports.blendLum = _chunkOLNIPTB3cjs.blendLum; exports.blendPixel = _chunkOLNIPTB3cjs.blendPixel; exports.blendRadius = _chunkPQ3H2AANcjs.blendRadius; exports.blendRgb = _chunkOLNIPTB3cjs.blendRgb; exports.blendTile = _chunkB46UQUDCcjs.blendTile; exports.blenderDab = _chunkPQ3H2AANcjs.blenderDab; exports.blurFilter = _chunkS55JFWDAcjs.blurFilter; exports.borderCoverage = _chunkSS53NNZOcjs.borderCoverage; exports.boxBlur = _chunkKALCIDWHcjs.boxBlur; exports.boxBlurPixels = _chunk2ONK3ERDcjs.boxBlurPixels; exports.boxFrameHit = boxFrameHit; exports.boxFrameOverlay = boxFrameOverlay; exports.boxMean = _chunkSS53NNZOcjs.boxMean; exports.boxPointOf = _chunkS55JFWDAcjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkS55JFWDAcjs.bradfordAdaptation; exports.brushStrokeMask = _chunkKALCIDWHcjs.brushStrokeMask; exports.brushstrokeDataUrl = _chunkPQ3H2AANcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkPQ3H2AANcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkPQ3H2AANcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkPQ3H2AANcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkPQ3H2AANcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkS55JFWDAcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkS55JFWDAcjs.buildToneLut; exports.builtinPattern = _chunkB46UQUDCcjs.builtinPattern; exports.builtinPatternIds = _chunkB46UQUDCcjs.builtinPatternIds; exports.bytesToBase64 = _chunkOLNIPTB3cjs.bytesToBase64; exports.calculateCropDrag = _chunkS55JFWDAcjs.calculateCropDrag; exports.canShareMemory = _chunkXFYLA3ZOcjs.canShareMemory; exports.canvasCompositeOperation = _chunkOLNIPTB3cjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkS55JFWDAcjs.canvasToImagePoint; exports.caretAt = _chunkQAUIZPYIcjs.caretAt; exports.changedTiles = _chunkB46UQUDCcjs.changedTiles; exports.channelThumbnail = channelThumbnail; exports.checkEffectAnimation = checkEffectAnimation; exports.checkEffectTime = checkEffectTime; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkS55JFWDAcjs.clampCropToImage; exports.cleanMixer = _chunkPQ3H2AANcjs.cleanMixer; exports.cloneSamplePoint = _chunk2ONK3ERDcjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunk474IQG74cjs.collectTiles; exports.colorBalanceChannel = _chunkS55JFWDAcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.colorRangePreset = colorRangePreset; exports.combineSelections = _chunkSS53NNZOcjs.combineSelections; exports.compareSelectionMasks = compareSelectionMasks; exports.compileAdjustmentLayer = _chunkS55JFWDAcjs.compileAdjustmentLayer; exports.componentPath = _chunkS55JFWDAcjs.componentPath; exports.componentsCoverage = _chunkS55JFWDAcjs.componentsCoverage; exports.compositeDeep = _chunkS55JFWDAcjs.compositeDeep; exports.compositeSurfaceOver = _chunkB46UQUDCcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkSS53NNZOcjs.computeSelectionBounds; exports.contentAwareFill = _chunkBB6TR422cjs.contentAwareFill; exports.contentBounds = _chunk474IQG74cjs.contentBounds; exports.contentsBox = _chunkS55JFWDAcjs.contentsBox; exports.contentsSurface = _chunkS55JFWDAcjs.contentsSurface; exports.contractCoverage = _chunkSS53NNZOcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkOLNIPTB3cjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkS55JFWDAcjs.convertToSmartObject; exports.copySmartObject = _chunkS55JFWDAcjs.copySmartObject; exports.cornersFromMatrix = _chunkS55JFWDAcjs.cornersFromMatrix; exports.coverageTileCoord = _chunkPQ3H2AANcjs.coverageTileCoord; exports.coverageToByte = _chunkSS53NNZOcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkS55JFWDAcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkPQ3H2AANcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkQAUIZPYIcjs.createCanvasTextShaper; exports.createGradientSampler = createGradientSampler; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageColorTools = createImageColorTools; exports.createImageEditTools = createImageEditTools; exports.createImageEditorDocument = createImageEditorDocument; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageEffectsToolProvider = createImageEffectsToolProvider; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePlaybackLocator = createImagePlaybackLocator; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSegmentationToolProvider = createImageSegmentationToolProvider; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageSubjectSelectionTool = createImageSubjectSelectionTool; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunkQAUIZPYIcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkQAUIZPYIcjs.createOutlineTextShaper; exports.createPigment = _chunkOLNIPTB3cjs.createPigment; exports.createPigmentTools = _chunkXFYLA3ZOcjs.createPigmentTools; exports.createSelectionMask = _chunkSS53NNZOcjs.createSelectionMask; exports.createShapeLayer = _chunkS55JFWDAcjs.createShapeLayer; exports.createTypeLayer = _chunkS55JFWDAcjs.createTypeLayer; exports.createWetGpuEngine = _chunkXFYLA3ZOcjs.createWetGpuEngine; exports.cssFont = _chunkQAUIZPYIcjs.cssFont; exports.cssFontFamily = _chunkQAUIZPYIcjs.cssFontFamily; exports.curveLut = _chunkB46UQUDCcjs.curveLut; exports.curveLutFromLevels = _chunkS55JFWDAcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkPQ3H2AANcjs.dabCoverage; exports.dabRect = _chunkPQ3H2AANcjs.dabRect; exports.decodeDeepSurface = _chunkS55JFWDAcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkS55JFWDAcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkS55JFWDAcjs.decodeLayerMask; exports.decodeMergedImage = _chunkS55JFWDAcjs.decodeMergedImage; exports.decodePlanes = _chunkS55JFWDAcjs.decodePlanes; exports.decodePng = _chunkOLNIPTB3cjs.decodePng; exports.decodePngDataUrl = _chunkS55JFWDAcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkSS53NNZOcjs.decodeSelectionRle; exports.decontaminateColors = _chunkSS53NNZOcjs.decontaminateColors; exports.deepBytes = _chunkOLNIPTB3cjs.deepBytes; exports.deepTile = _chunkOLNIPTB3cjs.deepTile; exports.defaultActiveLayerId = _chunkS55JFWDAcjs.defaultActiveLayerId; exports.defaultAdjustmentParams = _chunkS55JFWDAcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkB46UQUDCcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkB46UQUDCcjs.defaultLayerEffect; exports.defaultShapeName = _chunkS55JFWDAcjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkS55JFWDAcjs.depthMaskAlpha; exports.depthOf = _chunkOLNIPTB3cjs.depthOf; exports.depthRasterMask = _chunkS55JFWDAcjs.depthRasterMask; exports.describeChannel = describeChannel; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkS55JFWDAcjs.describeTransform; exports.deserializeChannels = deserializeChannels; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkS55JFWDAcjs.deserializeEffects; exports.deserializeLayer = _chunkS55JFWDAcjs.deserializeLayer; exports.deserializeLayers = _chunkS55JFWDAcjs.deserializeLayers; exports.deserializeMask = _chunkKALCIDWHcjs.deserializeMask; exports.deserializePatterns = _chunkS55JFWDAcjs.deserializePatterns; exports.deserializeSelection = _chunkSS53NNZOcjs.deserializeSelection; exports.despillEdge = _chunkS55JFWDAcjs.despillEdge; exports.developFilter = _chunkS55JFWDAcjs.developFilter; exports.developFromAdjustments = _chunkS55JFWDAcjs.developFromAdjustments; exports.developTarget = _chunkS55JFWDAcjs.developTarget; exports.dexp = _chunkXFYLA3ZOcjs.dexp; exports.dilateMask = _chunkBB6TR422cjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkSS53NNZOcjs.distanceTransform; exports.dlog = _chunkXFYLA3ZOcjs.dlog; exports.documentContents = _chunkS55JFWDAcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunk2ONK3ERDcjs.dodgeBurn; exports.dodgeBurnCurve = _chunk2ONK3ERDcjs.dodgeBurnCurve; exports.downloadMaskImage = downloadMaskImage; exports.downloadPsd = downloadPsd; exports.dpow = _chunkXFYLA3ZOcjs.dpow; exports.dragWarpMeshPoint = _chunkQAUIZPYIcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkXFYLA3ZOcjs.dsincos; exports.duplicateLayer = _chunkS55JFWDAcjs.duplicateLayer; exports.edgeBits = _chunkXFYLA3ZOcjs.edgeBits; exports.edgeWidth = _chunkSS53NNZOcjs.edgeWidth; exports.effectColorHex = _chunkB46UQUDCcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectLayerTiming = effectLayerTiming; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkB46UQUDCcjs.effectReach; exports.effectiveLayerMask = _chunkS55JFWDAcjs.effectiveLayerMask; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkB46UQUDCcjs.effectsFingerprint; exports.effectsMargin = _chunkB46UQUDCcjs.effectsMargin; exports.effectsScale = _chunkB46UQUDCcjs.effectsScale; exports.ellipsePoints = _chunkKALCIDWHcjs.ellipsePoints; exports.ellipseSelection = _chunkKALCIDWHcjs.ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunk474IQG74cjs.emptySurface; exports.encodeDeepSurface = _chunkS55JFWDAcjs.encodeDeepSurface; exports.encodePng = _chunkOLNIPTB3cjs.encodePng; exports.encodeRle = _chunkS55JFWDAcjs.encodeRle; exports.encodeSelectionRle = _chunkSS53NNZOcjs.encodeSelectionRle; exports.encodeSurface = _chunkS55JFWDAcjs.encodeSurface; exports.evalWarpMesh = _chunkQAUIZPYIcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkS55JFWDAcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkPQ3H2AANcjs.exchangeRates; exports.expNeg = _chunkXFYLA3ZOcjs.expNeg; exports.expandCoverage = _chunkSS53NNZOcjs.expandCoverage; exports.exportPsd = _chunkS55JFWDAcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkSS53NNZOcjs.featherCoverage; exports.fillRect = _chunk474IQG74cjs.fillRect; exports.filmPixel = _chunkXFYLA3ZOcjs.filmPixel; exports.filmReflectance = _chunkXFYLA3ZOcjs.filmReflectance; exports.filterMaskCoverage = _chunkS55JFWDAcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkB46UQUDCcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findSky = _chunkKALCIDWHcjs.findSky; exports.findSubject = _chunkKALCIDWHcjs.findSubject; exports.findWebGpu = _chunkXFYLA3ZOcjs.findWebGpu; exports.finishTile = _chunk474IQG74cjs.finishTile; exports.fitParagraphRuns = _chunkQAUIZPYIcjs.fitParagraphRuns; exports.fitRuns = _chunkQAUIZPYIcjs.fitRuns; exports.flattenLayers = _chunkB46UQUDCcjs.flattenLayers; exports.flattenPath = _chunkS55JFWDAcjs.flattenPath; exports.flipCorners = _chunkS55JFWDAcjs.flipCorners; exports.flowField = _chunkXFYLA3ZOcjs.flowField; exports.focusArea = _chunkKALCIDWHcjs.focusArea; exports.followLayerMove = _chunkS55JFWDAcjs.followLayerMove; exports.fontOf = _chunkQAUIZPYIcjs.fontOf; exports.forgetSelectAndMaskSettings = forgetSelectAndMaskSettings; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkSS53NNZOcjs.fullSelection; exports.gaussianBlur = _chunkK6PXS6DOcjs.gaussianBlur; exports.geometryHomography = _chunkS55JFWDAcjs.geometryHomography; exports.getAnnotationBounds = _chunkS55JFWDAcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkS55JFWDAcjs.getCropCursor; exports.getRotatedSize = _chunkS55JFWDAcjs.getRotatedSize; exports.getViewportMetrics = _chunkS55JFWDAcjs.getViewportMetrics; exports.getViewportProjection = _chunkS55JFWDAcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.grabCutLabels = _chunkKALCIDWHcjs.grabCutLabels; exports.gradientDabColor = _chunkPQ3H2AANcjs.gradientDabColor; exports.grainCatch = _chunkPQ3H2AANcjs.grainCatch; exports.grainHeights = _chunkPQ3H2AANcjs.grainHeights; exports.greyMorphology = _chunkSS53NNZOcjs.greyMorphology; exports.groupLayers = _chunkS55JFWDAcjs.groupLayers; exports.growSelection = growSelection; exports.guidePlanes = _chunkSS53NNZOcjs.guidePlanes; exports.guidedFilterColor = _chunkSS53NNZOcjs.guidedFilterColor; exports.handleMaskViewKey = handleMaskViewKey; exports.handlePaintShortcut = handlePaintShortcut; exports.handleQuickMaskKey = handleQuickMaskKey; exports.handleSelectionShortcut = handleSelectionShortcut; exports.hasActiveEffects = _chunkB46UQUDCcjs.hasActiveEffects; exports.hasEdgeUnmix = _chunkS55JFWDAcjs.hasEdgeUnmix; exports.hasLayersBelow = hasLayersBelow; exports.hasResampledLegacyMask = _chunkS55JFWDAcjs.hasResampledLegacyMask; exports.hasSoftBand = _chunkS55JFWDAcjs.hasSoftBand; exports.hasSurface = _chunkS55JFWDAcjs.hasSurface; exports.hasWarp = _chunkS55JFWDAcjs.hasWarp; exports.hash2 = _chunkPQ3H2AANcjs.hash2; exports.hashMaskContent = _chunkSS53NNZOcjs.hashMaskContent; exports.hashNoise = _chunkB46UQUDCcjs.hashNoise; exports.healPixels = _chunk2ONK3ERDcjs.healPixels; exports.hexToPaintRgb = _chunkPQ3H2AANcjs.hexToPaintRgb; exports.hexToRgb = _chunkS55JFWDAcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkS55JFWDAcjs.hitTestAnnotation; exports.hitTestCrop = _chunkS55JFWDAcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkS55JFWDAcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkS55JFWDAcjs.hueRangeTables; exports.hueRangeWeight = _chunkS55JFWDAcjs.hueRangeWeight; exports.hueSaturation = _chunkS55JFWDAcjs.hueSaturation; exports.identityCurve = _chunkS55JFWDAcjs.identityCurve; exports.identityLevels = _chunkS55JFWDAcjs.identityLevels; exports.identityTransform = _chunkS55JFWDAcjs.identityTransform; exports.identityWarpMesh = _chunkQAUIZPYIcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imagePanelTool = imagePanelTool; exports.imagePlaybackPanel = imagePlaybackPanel; exports.imageToCanvasPoint = _chunkS55JFWDAcjs.imageToCanvasPoint; exports.imageToolCanvasMode = imageToolCanvasMode; exports.imageToolForShortcut = imageToolForShortcut; exports.imageToolGroup = imageToolGroup; exports.imageToolLabel = imageToolLabel; exports.imageToolPanel = imageToolPanel; exports.importPsd = _chunkS55JFWDAcjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkB46UQUDCcjs.insertLayer; exports.inspectMaskEdge = inspectMaskEdge; exports.instancesOf = _chunkS55JFWDAcjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkS55JFWDAcjs.invertMatrix3; exports.invertSelection = _chunkSS53NNZOcjs.invertSelection; exports.isActiveFilter = _chunkS55JFWDAcjs.isActiveFilter; exports.isActiveVectorMask = _chunkS55JFWDAcjs.isActiveVectorMask; exports.isAdjustmentKind = _chunkS55JFWDAcjs.isAdjustmentKind; exports.isBitDepth = _chunkOLNIPTB3cjs.isBitDepth; exports.isBlendMode = _chunkOLNIPTB3cjs.isBlendMode; exports.isBrushstrokeBrush = _chunkPQ3H2AANcjs.isBrushstrokeBrush; exports.isColorRangePreset = isColorRangePreset; exports.isContentsDecoded = _chunkS55JFWDAcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkS55JFWDAcjs.isDefaultDepthMask; exports.isGradientPaint = _chunkPQ3H2AANcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunk2ONK3ERDcjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkS55JFWDAcjs.isIdentityTransform; exports.isInterpolation = _chunkB46UQUDCcjs.isInterpolation; exports.isLayerEffectKind = _chunkB46UQUDCcjs.isLayerEffectKind; exports.isLayerLocked = _chunkB46UQUDCcjs.isLayerLocked; exports.isLegacyShape = _chunkS55JFWDAcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPaintableLayer = _chunkS55JFWDAcjs.isPaintableLayer; exports.isPainterlyBlendMode = _chunkOLNIPTB3cjs.isPainterlyBlendMode; exports.isPathEditTool = isPathEditTool; exports.isPng = _chunkOLNIPTB3cjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkS55JFWDAcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkS55JFWDAcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkSS53NNZOcjs.isSelectionEmpty; exports.isSelectionMode = _chunkSS53NNZOcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkOLNIPTB3cjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkS55JFWDAcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkS55JFWDAcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkS55JFWDAcjs.isTransformAnchor; exports.isValidWarp = _chunkS55JFWDAcjs.isValidWarp; exports.keepDeepSamples = _chunkOLNIPTB3cjs.keepDeepSamples; exports.keepMainPieces = _chunkKALCIDWHcjs.keepMainPieces; exports.kelvinToTemperature = _chunkS55JFWDAcjs.kelvinToTemperature; exports.keysWeight = _chunkB46UQUDCcjs.keysWeight; exports.latticeViscosity = _chunkXFYLA3ZOcjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkB46UQUDCcjs.layerEffectFields; exports.layerEffectLabel = _chunkB46UQUDCcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkS55JFWDAcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkS55JFWDAcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkS55JFWDAcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkS55JFWDAcjs.layerMaskKey; exports.layerMaskSelection = _chunkS55JFWDAcjs.layerMaskSelection; exports.layerMenu = layerMenu; exports.layerName = _chunkS55JFWDAcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerPanels = layerPanels; exports.layerThumbnailClick = layerThumbnailClick; exports.layerTree = _chunkS55JFWDAcjs.layerTree; exports.layerTypeLabel = _chunkS55JFWDAcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkS55JFWDAcjs.layersFromLegacy; exports.layoutText = _chunkQAUIZPYIcjs.layoutText; exports.legacyAdjustmentLayer = _chunkS55JFWDAcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkS55JFWDAcjs.legacyMaskOf; exports.legacyView = _chunkS55JFWDAcjs.legacyView; exports.lerpPigment = _chunkOLNIPTB3cjs.lerpPigment; exports.lerpPigmentInto = _chunkOLNIPTB3cjs.lerpPigmentInto; exports.levelsValue = _chunkS55JFWDAcjs.levelsValue; exports.linearSrgbToXy = _chunkS55JFWDAcjs.linearSrgbToXy; exports.linearToSrgb = _chunkS55JFWDAcjs.linearToSrgb; exports.linearToSrgb8 = _chunkXFYLA3ZOcjs.linearToSrgb8; exports.liveComponent = _chunkS55JFWDAcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkS55JFWDAcjs.liveShapeSubpaths; exports.liveWire = liveWire; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkPQ3H2AANcjs.loadMixer; exports.loadOpenTypeFont = _chunkLCCMOWR7cjs.loadOpenTypeFont; exports.loadWetKernel = _chunkXFYLA3ZOcjs.loadWetKernel; exports.luma = _chunk2ONK3ERDcjs.luma; exports.magicWand = magicWand; exports.magneticAnchorSpacing = magneticAnchorSpacing; exports.mapCropHandle = _chunkS55JFWDAcjs.mapCropHandle; exports.mapLayer = _chunkB46UQUDCcjs.mapLayer; exports.mapSubpaths = _chunkS55JFWDAcjs.mapSubpaths; exports.maskBounds = _chunkBB6TR422cjs.maskBounds; exports.maskCoverageOverCanvas = _chunkS55JFWDAcjs.maskCoverageOverCanvas; exports.maskFileName = maskFileName; exports.maskNameFromFile = maskNameFromFile; exports.maskSummary = maskSummary; exports.maskThumbnailClick = maskThumbnailClick; exports.matrixFromCorners = _chunkS55JFWDAcjs.matrixFromCorners; exports.matrixFromParams = _chunkS55JFWDAcjs.matrixFromParams; exports.measureCanvasViewport = measureCanvasViewport; exports.membraneFill = _chunkBB6TR422cjs.membraneFill; exports.mergeLayerEffect = _chunkB46UQUDCcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkS55JFWDAcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunkPQ3H2AANcjs.mix32; exports.mixPigment8 = _chunkOLNIPTB3cjs.mixPigment8; exports.mixPigmentRgb = _chunkOLNIPTB3cjs.mixPigmentRgb; exports.mixPigments = _chunkOLNIPTB3cjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunkPQ3H2AANcjs.mixerRates; exports.modifySelection = _chunkSS53NNZOcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkS55JFWDAcjs.moveLayer; exports.moveSmartFilter = _chunkS55JFWDAcjs.moveSmartFilter; exports.moveWetSnapshot = _chunkXFYLA3ZOcjs.moveWetSnapshot; exports.mulMatrix3 = _chunkS55JFWDAcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkS55JFWDAcjs.neutralHueRange; exports.newContentsId = _chunkS55JFWDAcjs.newContentsId; exports.newEffectId = _chunkB46UQUDCcjs.newEffectId; exports.newLayerId = _chunkS55JFWDAcjs.newLayerId; exports.newLayerOptions = newLayerOptions; exports.newPathId = newPathId; exports.normalizeAdjustmentLayer = _chunkS55JFWDAcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkS55JFWDAcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkS55JFWDAcjs.normalizeAngle; exports.normalizeBlendMode = _chunkOLNIPTB3cjs.normalizeBlendMode; exports.normalizeBlender = _chunkPQ3H2AANcjs.normalizeBlender; exports.normalizeBrush = _chunkPQ3H2AANcjs.normalizeBrush; exports.normalizeFilter = _chunkS55JFWDAcjs.normalizeFilter; exports.normalizeFlow = _chunkXFYLA3ZOcjs.normalizeFlow; exports.normalizeHexColor = _chunkPQ3H2AANcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkB46UQUDCcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkS55JFWDAcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkS55JFWDAcjs.normalizeLiveShape; exports.normalizeMixer = _chunkPQ3H2AANcjs.normalizeMixer; exports.normalizePlacement = _chunkS55JFWDAcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkS55JFWDAcjs.normalizeProcessVersion; exports.normalizeRect = _chunkKALCIDWHcjs.normalizeRect; exports.normalizeRefineEdgeParams = _chunkSS53NNZOcjs.normalizeRefineEdgeParams; exports.normalizeRetouch = _chunk2ONK3ERDcjs.normalizeRetouch; exports.normalizeShapePaint = _chunkS55JFWDAcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkS55JFWDAcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkS55JFWDAcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkPQ3H2AANcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkS55JFWDAcjs.normalizeSubpaths; exports.normalizeText = _chunkS55JFWDAcjs.normalizeText; exports.normalizeTilt = _chunkXFYLA3ZOcjs.normalizeTilt; exports.normalizeWetParams = _chunkXFYLA3ZOcjs.normalizeWetParams; exports.offsetLayer = _chunkS55JFWDAcjs.offsetLayer; exports.offsetShape = _chunkS55JFWDAcjs.offsetShape; exports.offsetSmartObject = _chunkS55JFWDAcjs.offsetSmartObject; exports.offsetVectorMask = _chunkS55JFWDAcjs.offsetVectorMask; exports.openMaskFile = openMaskFile; exports.openPsdFile = openPsdFile; exports.otsuThreshold = _chunkKALCIDWHcjs.otsuThreshold; exports.packRgba = _chunk474IQG74cjs.packRgba; exports.packWetParams = _chunkXFYLA3ZOcjs.packWetParams; exports.paintGradientMappingFor = _chunkPQ3H2AANcjs.paintGradientMappingFor; exports.paintPathStroke = _chunkPQ3H2AANcjs.paintPathStroke; exports.paintSourceColor = _chunkPQ3H2AANcjs.paintSourceColor; exports.paintSourceCss = _chunkPQ3H2AANcjs.paintSourceCss; exports.paragraphRanges = _chunkQAUIZPYIcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkS55JFWDAcjs.parseAdjustmentBlock; exports.parseBlend = _chunkS55JFWDAcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkOLNIPTB3cjs.parseDataUrl; exports.parseEffectColor = _chunkB46UQUDCcjs.parseEffectColor; exports.parseLfx2 = _chunkS55JFWDAcjs.parseLfx2; exports.parseLrfx = _chunkS55JFWDAcjs.parseLrfx; exports.parseOpenTypeFont = _chunkLCCMOWR7cjs.parseOpenTypeFont; exports.parsePaintSource = _chunkPQ3H2AANcjs.parsePaintSource; exports.parsePatternBlock = _chunkS55JFWDAcjs.parsePatternBlock; exports.parseSelectionMode = _chunkSS53NNZOcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkS55JFWDAcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkS55JFWDAcjs.patchParagraphStyle; exports.patchTextStyle = _chunkS55JFWDAcjs.patchTextStyle; exports.pathAnchorCount = pathAnchorCount; exports.pathBounds = pathBounds; exports.pathStrokeCoverage = _chunkPQ3H2AANcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkPQ3H2AANcjs.pathStrokeDabs; exports.pathSvgData = pathSvgData; exports.pathToSelection = pathToSelection; exports.perDabStrength = _chunk2ONK3ERDcjs.perDabStrength; exports.photoFilterMatrix = _chunkS55JFWDAcjs.photoFilterMatrix; exports.pigment8 = _chunkOLNIPTB3cjs.pigment8; exports.pigmentColor = _chunkXFYLA3ZOcjs.pigmentColor; exports.pigmentOf = _chunkXFYLA3ZOcjs.pigmentOf; exports.pixelLayerBounds = _chunkS55JFWDAcjs.pixelLayerBounds; exports.pixelLayers = _chunkS55JFWDAcjs.pixelLayers; exports.pixelPigment = _chunkXFYLA3ZOcjs.pixelPigment; exports.placeContents = _chunkS55JFWDAcjs.placeContents; exports.placeLayer = _chunkS55JFWDAcjs.placeLayer; exports.placementAt = _chunkS55JFWDAcjs.placementAt; exports.placementBounds = _chunkS55JFWDAcjs.placementBounds; exports.placementGeometry = _chunkS55JFWDAcjs.placementGeometry; exports.planImageToolPlayback = planImageToolPlayback; exports.planOutlineTrace = planOutlineTrace; exports.pngDataUrl = _chunkOLNIPTB3cjs.pngDataUrl; exports.pointerPressure = _chunkXFYLA3ZOcjs.pointerPressure; exports.pointerStrokeSample = _chunkXFYLA3ZOcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkXFYLA3ZOcjs.pointerStrokeSamples; exports.polygonCoverage = _chunkKALCIDWHcjs.polygonCoverage; exports.polygonCoverageBox = _chunkKALCIDWHcjs.polygonCoverageBox; exports.polygonSelection = _chunkKALCIDWHcjs.polygonSelection; exports.posterizeValue = _chunkS55JFWDAcjs.posterizeValue; exports.presetWarp = _chunkS55JFWDAcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkS55JFWDAcjs.projectImagePoint; exports.projectImageRect = _chunkS55JFWDAcjs.projectImageRect; exports.projectMaskCoverage = _chunkS55JFWDAcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkOLNIPTB3cjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkS55JFWDAcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkS55JFWDAcjs.psdToLayers; exports.pullWarpMesh = _chunkQAUIZPYIcjs.pullWarpMesh; exports.put255 = _chunkPQ3H2AANcjs.put255; exports.quadFrameOverlay = quadFrameOverlay; exports.quickMaskPixels = quickMaskPixels; exports.quickSelectStroke = _chunkKALCIDWHcjs.quickSelectStroke; exports.rand01 = _chunkPQ3H2AANcjs.rand01; exports.randSigned = _chunkPQ3H2AANcjs.randSigned; exports.rangeLightness = _chunkS55JFWDAcjs.rangeLightness; exports.rasterContents = _chunkS55JFWDAcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkS55JFWDAcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkS55JFWDAcjs.rasterizeCoverage; exports.rasterizeDab = _chunkPQ3H2AANcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkS55JFWDAcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkOLNIPTB3cjs.readDeepRegion; exports.readEdgeColor = _chunkS55JFWDAcjs.readEdgeColor; exports.readPaintSource = _chunkPQ3H2AANcjs.readPaintSource; exports.readPaths = readPaths; exports.readPixel = _chunk474IQG74cjs.readPixel; exports.readPsd = _chunkS55JFWDAcjs.readPsd; exports.readRegion = _chunk474IQG74cjs.readRegion; exports.readShapeComponents = _chunkS55JFWDAcjs.readShapeComponents; exports.readSourceRegion = _chunk2ONK3ERDcjs.readSourceRegion; exports.rectSelection = _chunkKALCIDWHcjs.rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkB46UQUDCcjs.reduceSurface; exports.referencePoint = _chunkS55JFWDAcjs.referencePoint; exports.refineCoverage = _chunkSS53NNZOcjs.refineCoverage; exports.refineEdgeHalo = _chunkSS53NNZOcjs.refineEdgeHalo; exports.refineSelection = _chunkSS53NNZOcjs.refineSelection; exports.reflectanceToRgb = _chunkOLNIPTB3cjs.reflectanceToRgb; exports.removeAlpha = _chunkS55JFWDAcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkS55JFWDAcjs.removeLayer; exports.removeLayerEffect = _chunkS55JFWDAcjs.removeLayerEffect; exports.removeLayerFilter = _chunkS55JFWDAcjs.removeLayerFilter; exports.removePaintGradientStop = _chunkPQ3H2AANcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkS55JFWDAcjs.removeSmartFilter; exports.renderBrushstroke = _chunkPQ3H2AANcjs.renderBrushstroke; exports.renderLayerEffects = _chunkB46UQUDCcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkS55JFWDAcjs.renderShape; exports.renderShapeRect = _chunkS55JFWDAcjs.renderShapeRect; exports.renderSmartObject = _chunkS55JFWDAcjs.renderSmartObject; exports.renderText = _chunkS55JFWDAcjs.renderText; exports.replaceContents = _chunkS55JFWDAcjs.replaceContents; exports.replaceTextRange = _chunkS55JFWDAcjs.replaceTextRange; exports.requireLayer = _chunkS55JFWDAcjs.requireLayer; exports.requireOperation = _chunkS55JFWDAcjs.requireOperation; exports.requireShapeLayer = _chunkS55JFWDAcjs.requireShapeLayer; exports.requireSmartObject = _chunkS55JFWDAcjs.requireSmartObject; exports.requireTypeLayer = _chunkS55JFWDAcjs.requireTypeLayer; exports.requireUnlocked = _chunkS55JFWDAcjs.requireUnlocked; exports.rerender = _chunkS55JFWDAcjs.rerender; exports.rerenderShape = _chunkS55JFWDAcjs.rerenderShape; exports.rerenderText = _chunkS55JFWDAcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkSS53NNZOcjs.resizeSelection; exports.resizeWarpMesh = _chunkQAUIZPYIcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkS55JFWDAcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkPQ3H2AANcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.resolveVectorMasks = _chunkS55JFWDAcjs.resolveVectorMasks; exports.restyleRange = _chunkQAUIZPYIcjs.restyleRange; exports.retouchFilter = _chunk2ONK3ERDcjs.retouchFilter; exports.reversePaintGradient = _chunkPQ3H2AANcjs.reversePaintGradient; exports.rgbToGray = _chunkS55JFWDAcjs.rgbToGray; exports.rgbToHsl = _chunkS55JFWDAcjs.rgbToHsl; exports.rgbToReflectance = _chunkOLNIPTB3cjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunk2ONK3ERDcjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkS55JFWDAcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkS55JFWDAcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.runSelectionJob = _chunkKALCIDWHcjs.runSelectionJob; exports.sameCanvasViewport = sameCanvasViewport; exports.sampleLut = _chunkS55JFWDAcjs.sampleLut; exports.sampleToneLut = _chunkS55JFWDAcjs.sampleToneLut; exports.saturationOf = _chunk2ONK3ERDcjs.saturationOf; exports.scaleLayerEffect = _chunkB46UQUDCcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkPQ3H2AANcjs.scalePaintGradient; exports.seamlessClone = _chunkBB6TR422cjs.seamlessClone; exports.seedFromString = _chunkPQ3H2AANcjs.seedFromString; exports.segmentToSelection = segmentToSelection; exports.segmentationOutlines = segmentationOutlines; exports.segmentsToSelection = segmentsToSelection; exports.selectObjectIn = _chunkKALCIDWHcjs.selectObjectIn; exports.selectSimilar = selectSimilar; exports.selectionArea = _chunkSS53NNZOcjs.selectionArea; exports.selectionDiffPixels = selectionDiffPixels; exports.selectionFromCoverage = _chunkSS53NNZOcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkSS53NNZOcjs.selectionFromPixels; exports.selectionFromRegion = _chunkSS53NNZOcjs.selectionFromRegion; exports.selectionFromTiles = _chunkSS53NNZOcjs.selectionFromTiles; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionOutlinePaths = selectionOutlinePaths; exports.selectionRing = selectionRing; exports.selectionToCoverage = _chunkSS53NNZOcjs.selectionToCoverage; exports.selectionToPixels = _chunkSS53NNZOcjs.selectionToPixels; exports.selectionToSubpaths = selectionToSubpaths; exports.selectionUncertainty = selectionUncertainty; exports.selectionValueAt = _chunkSS53NNZOcjs.selectionValueAt; exports.serializeChannels = serializeChannels; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkS55JFWDAcjs.serializeContents; exports.serializeEffects = _chunkS55JFWDAcjs.serializeEffects; exports.serializeLayer = _chunkS55JFWDAcjs.serializeLayer; exports.serializeLayers = _chunkS55JFWDAcjs.serializeLayers; exports.serializeLayersExternal = _chunkS55JFWDAcjs.serializeLayersExternal; exports.serializeMask = _chunkKALCIDWHcjs.serializeMask; exports.serializePaths = serializePaths; exports.serializePatterns = _chunkS55JFWDAcjs.serializePatterns; exports.serializeSelection = _chunkSS53NNZOcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkS55JFWDAcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkS55JFWDAcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkS55JFWDAcjs.setLayerMask; exports.setLayerProperties = _chunkS55JFWDAcjs.setLayerProperties; exports.setLum = _chunkOLNIPTB3cjs.setLum; exports.setPigmentColor = _chunkOLNIPTB3cjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkS55JFWDAcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkS55JFWDAcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkS55JFWDAcjs.setSmartPlacement; exports.shadeTile = _chunkXFYLA3ZOcjs.shadeTile; exports.shapeAsPixelLayer = _chunkS55JFWDAcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkS55JFWDAcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkS55JFWDAcjs.shapeGeometryBounds; exports.shapeLayers = _chunkS55JFWDAcjs.shapeLayers; exports.shapeOutline = _chunkS55JFWDAcjs.shapeOutline; exports.shapeRenderClip = _chunkS55JFWDAcjs.shapeRenderClip; exports.shiftCoverage = _chunkSS53NNZOcjs.shiftCoverage; exports.simplifyPixelPath = simplifyPixelPath; exports.skinToneRange = skinToneRange; exports.slicSuperpixels = _chunkKALCIDWHcjs.slicSuperpixels; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkS55JFWDAcjs.smartObjectLayers; exports.smoothCoverage = _chunkSS53NNZOcjs.smoothCoverage; exports.smoothPoints = _chunkPQ3H2AANcjs.smoothPoints; exports.smoothnessWeights = _chunkKALCIDWHcjs.smoothnessWeights; exports.smudgeEffect = _chunk2ONK3ERDcjs.smudgeEffect; exports.snapPolygonToEdges = snapPolygonToEdges; exports.snapTo45 = snapTo45; exports.snapToEdge = snapToEdge; exports.softMaskToSelection = _chunkKALCIDWHcjs.softMaskToSelection; exports.solidPaint = _chunkPQ3H2AANcjs.solidPaint; exports.solidSurface = _chunk474IQG74cjs.solidSurface; exports.solveMembrane = _chunkBB6TR422cjs.solveMembrane; exports.spliceRuns = _chunkQAUIZPYIcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunk2ONK3ERDcjs.sponge; exports.spongeEffect = _chunk2ONK3ERDcjs.spongeEffect; exports.spotHealPixels = _chunk2ONK3ERDcjs.spotHealPixels; exports.spotHealWindow = _chunk2ONK3ERDcjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkXFYLA3ZOcjs.srgbByteToLinear; exports.srgbDecode = _chunkOLNIPTB3cjs.srgbDecode; exports.srgbEncode = _chunkOLNIPTB3cjs.srgbEncode; exports.srgbToLinear = _chunkS55JFWDAcjs.srgbToLinear; exports.standardBlendMode = _chunkOLNIPTB3cjs.standardBlendMode; exports.startMarchingAnts = startMarchingAnts; exports.startSelectionWorker = _chunkKALCIDWHcjs.startSelectionWorker; exports.stepSlotTs = _chunkXFYLA3ZOcjs.stepSlotTs; exports.strokeGrainCatch = _chunkPQ3H2AANcjs.strokeGrainCatch; exports.styleAt = _chunkQAUIZPYIcjs.styleAt; exports.subpathsToSvgPath = subpathsToSvgPath; exports.sumHistograms = sumHistograms; exports.superpixelSaliency = _chunkKALCIDWHcjs.superpixelSaliency; exports.surfaceBytes = _chunk474IQG74cjs.surfaceBytes; exports.surfaceDepth = _chunkOLNIPTB3cjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkOLNIPTB3cjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunk474IQG74cjs.surfaceFromPixels; exports.surfacesEqual = _chunk474IQG74cjs.surfacesEqual; exports.tempTintToXy = _chunkS55JFWDAcjs.tempTintToXy; exports.temperatureToKelvin = _chunkS55JFWDAcjs.temperatureToKelvin; exports.textIndexAt = _chunkQAUIZPYIcjs.textIndexAt; exports.textMatrix = _chunkS55JFWDAcjs.textMatrix; exports.textOrientation = _chunkS55JFWDAcjs.textOrientation; exports.textOutlines = _chunkS55JFWDAcjs.textOutlines; exports.textRange = _chunkS55JFWDAcjs.textRange; exports.tileCoord = _chunk474IQG74cjs.tileCoord; exports.tileKey = _chunk474IQG74cjs.tileKey; exports.tileRect = _chunk474IQG74cjs.tileRect; exports.tileSamples = _chunkOLNIPTB3cjs.tileSamples; exports.tileSamples16 = _chunkOLNIPTB3cjs.tileSamples16; exports.tileSamples32 = _chunkOLNIPTB3cjs.tileSamples32; exports.tilesInRect = _chunk474IQG74cjs.tilesInRect; exports.tipFalloff = _chunkPQ3H2AANcjs.tipFalloff; exports.tipReach = _chunkPQ3H2AANcjs.tipReach; exports.tipShape = _chunkPQ3H2AANcjs.tipShape; exports.to16From32 = _chunkOLNIPTB3cjs.to16From32; exports.to16From8 = _chunkOLNIPTB3cjs.to16From8; exports.to32From16 = _chunkOLNIPTB3cjs.to32From16; exports.to32From8 = _chunkOLNIPTB3cjs.to32From8; exports.to8From16 = _chunkOLNIPTB3cjs.to8From16; exports.to8From32 = _chunkOLNIPTB3cjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkS55JFWDAcjs.toTextSpace; exports.toneCurve = _chunkS55JFWDAcjs.toneCurve; exports.toneLuts = _chunkS55JFWDAcjs.toneLuts; exports.toneOf = _chunk2ONK3ERDcjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkS55JFWDAcjs.transformHomography; exports.transformMap = _chunkS55JFWDAcjs.transformMap; exports.transformShapeComponents = _chunkS55JFWDAcjs.transformShapeComponents; exports.transformSurface = _chunkB46UQUDCcjs.transformSurface; exports.transformTypeLayer = _chunkS55JFWDAcjs.transformTypeLayer; exports.transformVectorMask = _chunkS55JFWDAcjs.transformVectorMask; exports.transformedBounds = _chunkB46UQUDCcjs.transformedBounds; exports.transformedBox = _chunkS55JFWDAcjs.transformedBox; exports.transformedPoint = _chunkS55JFWDAcjs.transformedPoint; exports.translateLayer = _chunkS55JFWDAcjs.translateLayer; exports.translateSurface = _chunk474IQG74cjs.translateSurface; exports.typeAsPixelLayer = _chunkS55JFWDAcjs.typeAsPixelLayer; exports.typeFrame = _chunkS55JFWDAcjs.typeFrame; exports.typeFromAnnotation = _chunkS55JFWDAcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkS55JFWDAcjs.typeLayerName; exports.ungroupLayer = _chunkS55JFWDAcjs.ungroupLayer; exports.uniformTile = _chunk474IQG74cjs.uniformTile; exports.unionRect = _chunkS55JFWDAcjs.unionRect; exports.unprojectCanvasPoint = _chunkS55JFWDAcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkS55JFWDAcjs.updateLayerEffect; exports.updateLayerFilter = _chunkS55JFWDAcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkS55JFWDAcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkPQ3H2AANcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkS55JFWDAcjs.updateShapeLayer; exports.updateSmartFilter = _chunkS55JFWDAcjs.updateSmartFilter; exports.updateTypeLayer = _chunkS55JFWDAcjs.updateTypeLayer; exports.upscaleRegion = _chunkKALCIDWHcjs.upscaleRegion; exports.userErrorMessage = _chunkS55JFWDAcjs.userErrorMessage; exports.uvToXy = _chunkS55JFWDAcjs.uvToXy; exports.validateEffectGradient = _chunkB46UQUDCcjs.validateEffectGradient; exports.validateLayerEffect = _chunkB46UQUDCcjs.validateLayerEffect; exports.validateLayerEffects = _chunkB46UQUDCcjs.validateLayerEffects; exports.vectorMaskBounds = _chunkS55JFWDAcjs.vectorMaskBounds; exports.vectorMaskCoverage = _chunkS55JFWDAcjs.vectorMaskCoverage; exports.vectorMaskThumbnail = _chunkS55JFWDAcjs.vectorMaskThumbnail; exports.vectorMaskThumbnailClick = vectorMaskThumbnailClick; exports.versionedDescriptorBytes = _chunkS55JFWDAcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkS55JFWDAcjs.vibranceLinear; exports.vibrancePixel = _chunkS55JFWDAcjs.vibrancePixel; exports.walkDabs = _chunkPQ3H2AANcjs.walkDabs; exports.warpMeshEditPoints = _chunkQAUIZPYIcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkQAUIZPYIcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkQAUIZPYIcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkQAUIZPYIcjs.warpPresetMesh; exports.warpSurface = _chunkB46UQUDCcjs.warpSurface; exports.watchCanvasViewport = watchCanvasViewport; exports.wbMatrix = _chunkS55JFWDAcjs.wbMatrix; exports.wetGpuSupport = _chunkXFYLA3ZOcjs.wetGpuSupport; exports.wetSimdSupported = _chunkXFYLA3ZOcjs.wetSimdSupported; exports.wetSupport = _chunkXFYLA3ZOcjs.wetSupport; exports.whiteBalanceFromSample = _chunkS55JFWDAcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkS55JFWDAcjs.whiteBalanceMatrix; exports.withBackgroundOpacity = withBackgroundOpacity; exports.withFilterMaskSurface = _chunkS55JFWDAcjs.withFilterMaskSurface; exports.withImagePlayback = withImagePlayback; exports.withNewIds = _chunkS55JFWDAcjs.withNewIds; exports.workImage = _chunkKALCIDWHcjs.workImage; exports.workLuma = _chunkKALCIDWHcjs.workLuma; exports.workPlanes = _chunkKALCIDWHcjs.workPlanes; exports.writeAdjustmentBlock = _chunkS55JFWDAcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkOLNIPTB3cjs.writeDeepRegion; exports.writeLfx2 = _chunkS55JFWDAcjs.writeLfx2; exports.writePatternBlock = _chunkS55JFWDAcjs.writePatternBlock; exports.writePsd = _chunkS55JFWDAcjs.writePsd; exports.writeRegion = _chunk474IQG74cjs.writeRegion; exports.xyToTempTint = _chunkS55JFWDAcjs.xyToTempTint; exports.xyToUv = _chunkS55JFWDAcjs.xyToUv;