@pixerate/editor 0.128.0 → 0.130.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.
Files changed (65) hide show
  1. package/dist/animation-editor/index.cjs +55 -55
  2. package/dist/animation-editor/index.d.cts +5 -5
  3. package/dist/animation-editor/index.d.ts +5 -5
  4. package/dist/animation-editor/index.js +2 -2
  5. package/dist/{bezier-CvgQiYRg.d.cts → bezier-CdoGygwG.d.cts} +1 -1
  6. package/dist/{bezier-DP4NnJp3.d.ts → bezier-CigmusV_.d.ts} +1 -1
  7. package/dist/canvas/index.d.cts +7 -7
  8. package/dist/canvas/index.d.ts +7 -7
  9. package/dist/{chunk-BEGEWQHD.cjs → chunk-2PXRKMOH.cjs} +36 -36
  10. package/dist/{chunk-BEGEWQHD.cjs.map → chunk-2PXRKMOH.cjs.map} +1 -1
  11. package/dist/{chunk-F7Q2NE2Y.js → chunk-ERYGCA72.js} +2 -2
  12. package/dist/{chunk-A6KHMKI4.js → chunk-L5OTIYOO.js} +2 -2
  13. package/dist/{chunk-ORE334I6.cjs → chunk-LXGOYRPE.cjs} +366 -68
  14. package/dist/chunk-LXGOYRPE.cjs.map +1 -0
  15. package/dist/{chunk-XLUYXUBD.cjs → chunk-PMHPXCJC.cjs} +82 -82
  16. package/dist/{chunk-XLUYXUBD.cjs.map → chunk-PMHPXCJC.cjs.map} +1 -1
  17. package/dist/{chunk-ROZFX4QI.js → chunk-PRYMC442.js} +302 -4
  18. package/dist/chunk-PRYMC442.js.map +1 -0
  19. package/dist/effects/index.d.cts +4 -4
  20. package/dist/effects/index.d.ts +4 -4
  21. package/dist/{export-Cbr9IqpJ.d.cts → export-5WDKJqTy.d.cts} +1 -1
  22. package/dist/{export-DHrFJ8r_.d.ts → export-B4r8b9Ft.d.ts} +11 -4
  23. package/dist/{export-ClPKUB-v.d.ts → export-CU_ARP3A.d.ts} +1 -1
  24. package/dist/{export-BkYQvV56.d.cts → export-CejjC2iI.d.cts} +11 -4
  25. package/dist/{helpers-C5aAd44p.d.cts → helpers-CzZu51eI.d.cts} +33 -2
  26. package/dist/{helpers-CPWcK504.d.ts → helpers-X_rycLNJ.d.ts} +33 -2
  27. package/dist/image-editor/index.cjs +672 -621
  28. package/dist/image-editor/index.cjs.map +1 -1
  29. package/dist/image-editor/index.d.cts +8 -8
  30. package/dist/image-editor/index.d.ts +8 -8
  31. package/dist/image-editor/index.js +65 -14
  32. package/dist/image-editor/index.js.map +1 -1
  33. package/dist/{opentype-sQrF3Ry1.d.ts → opentype-CrHAsKh3.d.ts} +2 -2
  34. package/dist/{opentype-BOewaGQx.d.cts → opentype-DlRMYcCW.d.cts} +2 -2
  35. package/dist/paint-editor/index.cjs +7 -7
  36. package/dist/paint-editor/index.d.cts +5 -5
  37. package/dist/paint-editor/index.d.ts +5 -5
  38. package/dist/paint-editor/index.js +2 -2
  39. package/dist/{pathfinder-CnkW7zLI.d.cts → pathfinder-CKfKOVP4.d.cts} +1 -1
  40. package/dist/{pathfinder-BwJx0_zM.d.ts → pathfinder-Dlss70hL.d.ts} +1 -1
  41. package/dist/{pool-CTrtciaN.d.ts → pool-DDOo0xJH.d.ts} +1 -1
  42. package/dist/{pool-C7GtrL34.d.cts → pool-DKic69LD.d.cts} +1 -1
  43. package/dist/{svg-C4LlFnEw.d.cts → svg-BRaii3pI.d.cts} +2 -2
  44. package/dist/{svg-CUzZa0EO.d.ts → svg-BYVZeVo0.d.ts} +2 -2
  45. package/dist/{tools-BpCmUNxb.d.cts → tools-CtheDLDr.d.cts} +1 -1
  46. package/dist/{tools-AugT22z3.d.ts → tools-D8bZ-7YG.d.ts} +1 -1
  47. package/dist/vector/index.cjs +884 -874
  48. package/dist/vector/index.cjs.map +1 -1
  49. package/dist/vector/index.d.cts +53 -10
  50. package/dist/vector/index.d.ts +53 -10
  51. package/dist/vector/index.js +15 -5
  52. package/dist/vector/index.js.map +1 -1
  53. package/dist/video-editor/index.d.cts +4 -4
  54. package/dist/video-editor/index.d.ts +4 -4
  55. package/dist/{warp-D62N_5VK.d.cts → warp-BFoYxy_s.d.cts} +2 -2
  56. package/dist/{warp-CIsO617e.d.ts → warp-CZVC8pB5.d.ts} +2 -2
  57. package/package.json +1 -1
  58. package/skills/pixerate-image-editor/SKILL.md +1 -1
  59. package/skills/pixerate-image-editor/references/color-management.md +4 -3
  60. package/skills/pixerate-vector/SKILL.md +1 -1
  61. package/skills/pixerate-vector/references/commands.md +2 -0
  62. package/dist/chunk-ORE334I6.cjs.map +0 -1
  63. package/dist/chunk-ROZFX4QI.js.map +0 -1
  64. /package/dist/{chunk-F7Q2NE2Y.js.map → chunk-ERYGCA72.js.map} +0 -0
  65. /package/dist/{chunk-A6KHMKI4.js.map → chunk-L5OTIYOO.js.map} +0 -0
@@ -362,7 +362,7 @@ var _chunk2OJACTPRcjs = require('../chunk-2OJACTPR.cjs');
362
362
 
363
363
 
364
364
 
365
- var _chunkXLUYXUBDcjs = require('../chunk-XLUYXUBD.cjs');
365
+ var _chunkPMHPXCJCcjs = require('../chunk-PMHPXCJC.cjs');
366
366
 
367
367
 
368
368
  var _chunk2YQONY6Gcjs = require('../chunk-2YQONY6G.cjs');
@@ -802,7 +802,7 @@ var _chunk643B2HKCcjs = require('../chunk-643B2HKC.cjs');
802
802
 
803
803
 
804
804
 
805
- var _chunkORE334I6cjs = require('../chunk-ORE334I6.cjs');
805
+ var _chunkLXGOYRPEcjs = require('../chunk-LXGOYRPE.cjs');
806
806
  require('../chunk-BJTCSLF6.cjs');
807
807
  require('../chunk-IZ4WRXZA.cjs');
808
808
 
@@ -920,7 +920,7 @@ function quickMaskPixels(mask, style = {}) {
920
920
 
921
921
  // src/image-editor/layers/render.ts
922
922
  function isQuarterTurn(rotate) {
923
- return _chunkXLUYXUBDcjs.normalizeAngle.call(void 0, rotate) % 90 === 0;
923
+ return _chunkPMHPXCJCcjs.normalizeAngle.call(void 0, rotate) % 90 === 0;
924
924
  }
925
925
  function isIntegerRect(r) {
926
926
  return Number.isInteger(r.x) && Number.isInteger(r.y) && Number.isInteger(r.width) && Number.isInteger(r.height);
@@ -928,7 +928,7 @@ function isIntegerRect(r) {
928
928
  function baseProjection(region, transform, baseW, baseH) {
929
929
  return {
930
930
  region,
931
- angle: _chunkXLUYXUBDcjs.normalizeAngle.call(void 0, transform.rotate),
931
+ angle: _chunkPMHPXCJCcjs.normalizeAngle.call(void 0, transform.rotate),
932
932
  flipH: transform.flipH,
933
933
  flipV: transform.flipV,
934
934
  scale: 1,
@@ -937,14 +937,14 @@ function baseProjection(region, transform, baseW, baseH) {
937
937
  };
938
938
  }
939
939
  function projectQuarterTurn(src, srcRect, region, transform) {
940
- const rotated = _chunkXLUYXUBDcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
940
+ const rotated = _chunkPMHPXCJCcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
941
941
  const w = Math.max(1, Math.round(rotated.width));
942
942
  const h = Math.max(1, Math.round(rotated.height));
943
943
  const out = new Uint8ClampedArray(w * h * 4);
944
944
  const p = baseProjection(region, transform, w, h);
945
- const o = _chunkXLUYXUBDcjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 0.5 }, p);
946
- const ox = _chunkXLUYXUBDcjs.unprojectCanvasPoint.call(void 0, { x: 1.5, y: 0.5 }, p);
947
- const oy = _chunkXLUYXUBDcjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 1.5 }, p);
945
+ const o = _chunkPMHPXCJCcjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 0.5 }, p);
946
+ const ox = _chunkPMHPXCJCcjs.unprojectCanvasPoint.call(void 0, { x: 1.5, y: 0.5 }, p);
947
+ const oy = _chunkPMHPXCJCcjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 1.5 }, p);
948
948
  const ux = Math.round(ox.x - o.x);
949
949
  const vx = Math.round(ox.y - o.y);
950
950
  const uy = Math.round(oy.x - o.x);
@@ -973,23 +973,23 @@ function applyOutputStage(img, opacity, legacyOutputBlur) {
973
973
  const d = img.data;
974
974
  for (let i = 3; i < d.length; i += 4) d[i] = d[i] * opacity;
975
975
  }
976
- if (legacyOutputBlur && legacyOutputBlur > 0) _chunkXLUYXUBDcjs.applyBoxBlur.call(void 0, img, Math.min(Math.round(legacyOutputBlur), 40));
976
+ if (legacyOutputBlur && legacyOutputBlur > 0) _chunkPMHPXCJCcjs.applyBoxBlur.call(void 0, img, Math.min(Math.round(legacyOutputBlur), 40));
977
977
  }
978
978
  function needsLegacyBase(input) {
979
979
  const { stack, region, canvas, transform } = input;
980
- if (!_chunkXLUYXUBDcjs.isLegacyShape.call(void 0, stack)) return false;
980
+ if (!_chunkPMHPXCJCcjs.isLegacyShape.call(void 0, stack)) return false;
981
981
  const bg = stack.layers[0];
982
982
  if (!isQuarterTurn(transform.rotate) || !isIntegerRect(region)) return true;
983
983
  if (_optionalChain([bg, 'access', _2 => _2.mask, 'optionalAccess', _3 => _3.source, 'optionalAccess', _4 => _4.enabled]) && bg.mask.source.maskSource) return true;
984
984
  if (stack.outputOpacity < 1) return true;
985
- const blur = _chunkXLUYXUBDcjs.blurFilter.call(void 0, bg);
985
+ const blur = _chunkPMHPXCJCcjs.blurFilter.call(void 0, bg);
986
986
  if (blur && blur.enabled && blur.radius > 0) {
987
987
  const full = region.x === 0 && region.y === 0 && region.width === canvas.width && region.height === canvas.height;
988
- const angle = _chunkXLUYXUBDcjs.normalizeAngle.call(void 0, transform.rotate);
988
+ const angle = _chunkPMHPXCJCcjs.normalizeAngle.call(void 0, transform.rotate);
989
989
  if (!full || angle === 90 || angle === 270) return true;
990
990
  }
991
991
  if ((_nullishCoalesce(stack.legacyOutputBlur, () => ( 0))) > 0 && !input.sourceOpaque) return true;
992
- if (_chunkXLUYXUBDcjs.hasResampledLegacyMask.call(void 0, stack.layers, canvas.width, canvas.height)) return true;
992
+ if (_chunkPMHPXCJCcjs.hasResampledLegacyMask.call(void 0, stack.layers, canvas.width, canvas.height)) return true;
993
993
  return false;
994
994
  }
995
995
  var isPlainAnnotation = (l) => l.type === "annotation" ? l.opacity === 1 && l.blend === "normal" && !l.clipped && !l.mask : (l.type === "shape" || l.type === "type") && Boolean(l.annotation) && l.opacity === 1 && l.blend === (_nullishCoalesce(l.annotation.blend, () => ( "normal"))) && !l.clipped && !l.mask && !l.effects && (_nullishCoalesce(l.fillOpacity, () => ( 1))) === 1;
@@ -1021,7 +1021,7 @@ function coveringRect(region) {
1021
1021
  const y = Math.floor(region.y);
1022
1022
  return { x, y, width: Math.ceil(region.x + region.width) - x, height: Math.ceil(region.y + region.height) - y };
1023
1023
  }
1024
- function renderLayeredBase(stack, region, transform, sources, compositor = new (0, _chunkXLUYXUBDcjs.LayerCompositor)()) {
1024
+ function renderLayeredBase(stack, region, transform, sources, compositor = new (0, _chunkPMHPXCJCcjs.LayerCompositor)()) {
1025
1025
  if (!isQuarterTurn(transform.rotate) || !isIntegerRect(region)) {
1026
1026
  throw new Error("renderLayeredBase needs an integer region and a quarter-turn rotation.");
1027
1027
  }
@@ -1155,8 +1155,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1155
1155
  * The viewport's compositor. It only ever composites the viewport's stack, so its tile cache can
1156
1156
  * trust dirty rectangles; exports use `exportCompositor`.
1157
1157
  */
1158
- __init8() {this.compositor = new (0, _chunkXLUYXUBDcjs.LayerCompositor)()}
1159
- __init9() {this.exportCompositor = new (0, _chunkXLUYXUBDcjs.LayerCompositor)({ maxCacheBytes: 64 * 1024 * 1024 })}
1158
+ __init8() {this.compositor = new (0, _chunkPMHPXCJCcjs.LayerCompositor)()}
1159
+ __init9() {this.exportCompositor = new (0, _chunkPMHPXCJCcjs.LayerCompositor)({ maxCacheBytes: 64 * 1024 * 1024 })}
1160
1160
  /** How the host resolves layer pixels (set by the controller). */
1161
1161
 
1162
1162
  /**
@@ -1233,9 +1233,9 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1233
1233
  return;
1234
1234
  }
1235
1235
  const isActivelyCropping = Boolean(options.showCropOverlay || state.activeTool === "crop");
1236
- const projection = _chunkXLUYXUBDcjs.getViewportProjection.call(void 0, geoState, vpWidth, vpHeight, isActivelyCropping);
1236
+ const projection = _chunkPMHPXCJCcjs.getViewportProjection.call(void 0, geoState, vpWidth, vpHeight, isActivelyCropping);
1237
1237
  const { region } = projection;
1238
- const rotated = _chunkXLUYXUBDcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1238
+ const rotated = _chunkPMHPXCJCcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1239
1239
  const route = this.chooseRoute(state, region, naturalWidth, naturalHeight);
1240
1240
  let overlay = annotations;
1241
1241
  if (route === "legacy") {
@@ -1245,8 +1245,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1245
1245
  `${naturalWidth}x${naturalHeight}`,
1246
1246
  `${region.x},${region.y},${region.width},${region.height}`,
1247
1247
  `${projection.angle},${transform.flipH},${transform.flipV}`,
1248
- `${adjustments.brightness},${adjustments.contrast},${adjustments.saturation},${adjustments.exposure},${adjustments.temperature},${_nullishCoalesce(adjustments.tint, () => ( 0))},${adjustments.blur},${adjustments.opacity},p${_chunkXLUYXUBDcjs.normalizeProcessVersion.call(void 0, adjustments.process)}`,
1249
- _chunkXLUYXUBDcjs.adjustmentLayersKey.call(void 0, adjustments.layers),
1248
+ `${adjustments.brightness},${adjustments.contrast},${adjustments.saturation},${adjustments.exposure},${adjustments.temperature},${_nullishCoalesce(adjustments.tint, () => ( 0))},${adjustments.blur},${adjustments.opacity},p${_chunkPMHPXCJCcjs.normalizeProcessVersion.call(void 0, adjustments.process)}`,
1249
+ _chunkPMHPXCJCcjs.adjustmentLayersKey.call(void 0, adjustments.layers),
1250
1250
  `${depthMask.enabled},${depthMask.maskSource},${_optionalChain([depthMask, 'access', _5 => _5.depthRange, 'optionalAccess', _6 => _6[0]])}-${_optionalChain([depthMask, 'access', _7 => _7.depthRange, 'optionalAccess', _8 => _8[1]])},${depthMask.softness},${depthMask.invert},${depthMask.mode}`,
1251
1251
  `d${this.displayKey}`
1252
1252
  ].join("|");
@@ -1280,7 +1280,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1280
1280
  }
1281
1281
  if (overlay.length > 0 || options.draftAnnotation) {
1282
1282
  ctx.save();
1283
- _chunkXLUYXUBDcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1283
+ _chunkPMHPXCJCcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1284
1284
  ctx.beginPath();
1285
1285
  ctx.rect(region.x, region.y, region.width, region.height);
1286
1286
  ctx.clip();
@@ -1303,7 +1303,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1303
1303
  if (_optionalChain([state, 'access', _15 => _15.selection, 'optionalAccess', _16 => _16.bounds]) && display !== "none" || _optionalChain([options, 'access', _17 => _17.draftSelectionPath, 'optionalAccess', _18 => _18.length])) {
1304
1304
  ctx.save();
1305
1305
  try {
1306
- _chunkXLUYXUBDcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1306
+ _chunkPMHPXCJCcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1307
1307
  ctx.beginPath();
1308
1308
  ctx.rect(region.x, region.y, region.width, region.height);
1309
1309
  ctx.clip();
@@ -1318,7 +1318,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1318
1318
  const b = options.brushCursor;
1319
1319
  ctx.save();
1320
1320
  try {
1321
- _chunkXLUYXUBDcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1321
+ _chunkPMHPXCJCcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1322
1322
  const px2 = 1 / (projection.scale || 1);
1323
1323
  ctx.beginPath();
1324
1324
  ctx.arc(b.x, b.y, Math.max(px2, b.diameter / 2), 0, Math.PI * 2);
@@ -1336,7 +1336,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1336
1336
  const t = options.textEdit;
1337
1337
  ctx.save();
1338
1338
  try {
1339
- const scr = (p) => _chunkXLUYXUBDcjs.projectImagePoint.call(void 0, p, projection);
1339
+ const scr = (p) => _chunkPMHPXCJCcjs.projectImagePoint.call(void 0, p, projection);
1340
1340
  const poly = (pts) => {
1341
1341
  ctx.beginPath();
1342
1342
  pts.map(scr).forEach((p, i) => i ? ctx.lineTo(p.x, p.y) : ctx.moveTo(p.x, p.y));
@@ -1375,7 +1375,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1375
1375
  const t = options.freeTransform;
1376
1376
  ctx.save();
1377
1377
  try {
1378
- const scr = (p) => _chunkXLUYXUBDcjs.projectImagePoint.call(void 0, p, projection);
1378
+ const scr = (p) => _chunkPMHPXCJCcjs.projectImagePoint.call(void 0, p, projection);
1379
1379
  ctx.beginPath();
1380
1380
  if (t.warp) {
1381
1381
  for (const c of t.warp.curves) {
@@ -1433,7 +1433,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1433
1433
  }
1434
1434
  if (isActivelyCropping) {
1435
1435
  const activeCrop = options.draftCrop !== void 0 && options.draftCrop !== null ? options.draftCrop : _nullishCoalesce(crop, () => ( { x: 0, y: 0, width: naturalWidth, height: naturalHeight }));
1436
- this.drawCropOverlay(ctx, _chunkXLUYXUBDcjs.getViewportMetrics.call(void 0, geoState, vpWidth, vpHeight, true, activeCrop));
1436
+ this.drawCropOverlay(ctx, _chunkPMHPXCJCcjs.getViewportMetrics.call(void 0, geoState, vpWidth, vpHeight, true, activeCrop));
1437
1437
  }
1438
1438
  }
1439
1439
  /**
@@ -1442,7 +1442,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1442
1442
  */
1443
1443
  async renderBaseImage(img, naturalWidth, naturalHeight, region, transform, state, onPixels) {
1444
1444
  const { adjustments, depthMask } = state;
1445
- const rotated = _chunkXLUYXUBDcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1445
+ const rotated = _chunkPMHPXCJCcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1446
1446
  const baseW = Math.max(1, Math.round(rotated.width));
1447
1447
  const baseH = Math.max(1, Math.round(rotated.height));
1448
1448
  const baseCanvas = this.createCanvas(baseW, baseH);
@@ -1450,7 +1450,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1450
1450
  if (!baseCtx) return baseCanvas;
1451
1451
  const projection = getBaseProjection(region, transform, baseW, baseH);
1452
1452
  baseCtx.save();
1453
- _chunkXLUYXUBDcjs.applyImageProjectionToContext.call(void 0, baseCtx, projection);
1453
+ _chunkPMHPXCJCcjs.applyImageProjectionToContext.call(void 0, baseCtx, projection);
1454
1454
  baseCtx.drawImage(
1455
1455
  img,
1456
1456
  region.x,
@@ -1465,8 +1465,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1465
1465
  baseCtx.restore();
1466
1466
  const imageData = baseCtx.getImageData(0, 0, baseW, baseH);
1467
1467
  if (imageData) {
1468
- const layerMasks = _chunkXLUYXUBDcjs.buildLayerMaskPlanes.call(void 0, adjustments.layers, naturalWidth, naturalHeight, projection, baseW, baseH);
1469
- _chunkXLUYXUBDcjs.applyAdjustments.call(void 0, imageData, adjustments, layerMasks ? { layerMasks } : {});
1468
+ const layerMasks = _chunkPMHPXCJCcjs.buildLayerMaskPlanes.call(void 0, adjustments.layers, naturalWidth, naturalHeight, projection, baseW, baseH);
1469
+ _chunkPMHPXCJCcjs.applyAdjustments.call(void 0, imageData, adjustments, layerMasks ? { layerMasks } : {});
1470
1470
  if (depthMask.enabled && depthMask.maskSource) {
1471
1471
  try {
1472
1472
  const maskImg = await this.imageCache.get(depthMask.maskSource);
@@ -1477,7 +1477,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1477
1477
  const maskCtx = maskCanvas.getContext("2d");
1478
1478
  if (maskCtx) {
1479
1479
  maskCtx.save();
1480
- _chunkXLUYXUBDcjs.applyImageProjectionToContext.call(void 0, maskCtx, projection);
1480
+ _chunkPMHPXCJCcjs.applyImageProjectionToContext.call(void 0, maskCtx, projection);
1481
1481
  maskCtx.drawImage(
1482
1482
  maskImg,
1483
1483
  region.x * sx,
@@ -1492,7 +1492,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1492
1492
  maskCtx.restore();
1493
1493
  const maskData = maskCtx.getImageData(0, 0, baseW, baseH);
1494
1494
  if (maskData) {
1495
- _chunkXLUYXUBDcjs.applyDepthMask.call(void 0, imageData, maskData, depthMask);
1495
+ _chunkPMHPXCJCcjs.applyDepthMask.call(void 0, imageData, maskData, depthMask);
1496
1496
  }
1497
1497
  }
1498
1498
  } catch (e7) {
@@ -1511,7 +1511,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1511
1511
  else if (this.baseRoute === "layers") route = "layers";
1512
1512
  else {
1513
1513
  const stack = { layers: state.layers, outputOpacity: _nullishCoalesce(state.outputOpacity, () => ( 1)), legacyOutputBlur: state.legacyOutputBlur };
1514
- const shaped = this.baseRoute === "legacy" && _chunkXLUYXUBDcjs.isLegacyShape.call(void 0, stack);
1514
+ const shaped = this.baseRoute === "legacy" && _chunkPMHPXCJCcjs.isLegacyShape.call(void 0, stack);
1515
1515
  route = shaped || needsLegacyBase({
1516
1516
  stack,
1517
1517
  region,
@@ -1646,17 +1646,17 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1646
1646
  if (!comp) return null;
1647
1647
  const opacity = _nullishCoalesce(state.outputOpacity, () => ( 1));
1648
1648
  const blur = _nullishCoalesce(state.legacyOutputBlur, () => ( 0));
1649
- const rotated = _chunkXLUYXUBDcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1649
+ const rotated = _chunkPMHPXCJCcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1650
1650
  const baseW = Math.max(1, Math.round(rotated.width));
1651
1651
  const baseH = Math.max(1, Math.round(rotated.height));
1652
- const key = `${this.displayKey}:${comp.version}|${region.x},${region.y},${region.width},${region.height}|${_chunkXLUYXUBDcjs.normalizeAngle.call(void 0, transform.rotate)},${transform.flipH},${transform.flipV}|${opacity}|${blur}`;
1652
+ const key = `${this.displayKey}:${comp.version}|${region.x},${region.y},${region.width},${region.height}|${_chunkPMHPXCJCcjs.normalizeAngle.call(void 0, transform.rotate)},${transform.flipH},${transform.flipV}|${opacity}|${blur}`;
1653
1653
  if (this.cachedPostCanvas && this.cachedPostKey === key) return { canvas: this.cachedPostCanvas, histogram: this.cachedPostHistogram };
1654
1654
  const canvas = this.cachedPostCanvas && this.cachedPostCanvas.width === baseW && this.cachedPostCanvas.height === baseH ? this.cachedPostCanvas : this.createCanvas(baseW, baseH);
1655
1655
  const ctx = canvas.getContext("2d");
1656
1656
  if (!ctx) return null;
1657
1657
  ctx.clearRect(0, 0, baseW, baseH);
1658
1658
  ctx.save();
1659
- _chunkXLUYXUBDcjs.applyImageProjectionToContext.call(void 0, ctx, baseProjection(region, transform, baseW, baseH));
1659
+ _chunkPMHPXCJCcjs.applyImageProjectionToContext.call(void 0, ctx, baseProjection(region, transform, baseW, baseH));
1660
1660
  ctx.beginPath();
1661
1661
  ctx.rect(region.x, region.y, region.width, region.height);
1662
1662
  ctx.clip();
@@ -1928,7 +1928,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1928
1928
  ctx.strokeStyle = "#3b82f6";
1929
1929
  ctx.lineWidth = 1.5;
1930
1930
  ctx.setLineDash([4, 4]);
1931
- const bounds = _chunkXLUYXUBDcjs.getAnnotationBounds.call(void 0, ann);
1931
+ const bounds = _chunkPMHPXCJCcjs.getAnnotationBounds.call(void 0, ann);
1932
1932
  const pad = 4;
1933
1933
  ctx.strokeRect(bounds.x - pad, bounds.y - pad, bounds.width + pad * 2, bounds.height + pad * 2);
1934
1934
  ctx.fillStyle = "#ffffff";
@@ -1949,7 +1949,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1949
1949
  }
1950
1950
  /** @deprecated Use the standalone `getAnnotationBounds` from the geometry module. */
1951
1951
  getAnnotationBounds(ann) {
1952
- return _chunkXLUYXUBDcjs.getAnnotationBounds.call(void 0, ann);
1952
+ return _chunkPMHPXCJCcjs.getAnnotationBounds.call(void 0, ann);
1953
1953
  }
1954
1954
  /**
1955
1955
  * Draws a rule-of-thirds crop grid overlay. All rectangles come from
@@ -2031,8 +2031,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2031
2031
  }
2032
2032
  const { width: naturalWidth, height: naturalHeight } = getSourceSize(img);
2033
2033
  const { crop, transform, annotations } = state;
2034
- const region = crop ? _chunkXLUYXUBDcjs.clampCropToImage.call(void 0, crop, naturalWidth, naturalHeight) : { x: 0, y: 0, width: naturalWidth, height: naturalHeight };
2035
- const rotated = _chunkXLUYXUBDcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
2034
+ const region = crop ? _chunkPMHPXCJCcjs.clampCropToImage.call(void 0, crop, naturalWidth, naturalHeight) : { x: 0, y: 0, width: naturalWidth, height: naturalHeight };
2035
+ const rotated = _chunkPMHPXCJCcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
2036
2036
  const baseW = Math.max(1, Math.round(rotated.width));
2037
2037
  const baseH = Math.max(1, Math.round(rotated.height));
2038
2038
  const exportW = options.width || baseW;
@@ -2061,7 +2061,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2061
2061
  const bctx = baseCanvas.getContext("2d");
2062
2062
  if (bctx) {
2063
2063
  bctx.save();
2064
- _chunkXLUYXUBDcjs.applyImageProjectionToContext.call(void 0, bctx, baseProjection(region, transform, baseW, baseH));
2064
+ _chunkPMHPXCJCcjs.applyImageProjectionToContext.call(void 0, bctx, baseProjection(region, transform, baseW, baseH));
2065
2065
  bctx.beginPath();
2066
2066
  bctx.rect(region.x, region.y, region.width, region.height);
2067
2067
  bctx.clip();
@@ -2074,7 +2074,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2074
2074
  if (options.includeAnnotations !== false && overlay.length > 0) {
2075
2075
  ctx.save();
2076
2076
  ctx.scale(exportW / baseW, exportH / baseH);
2077
- _chunkXLUYXUBDcjs.applyImageProjectionToContext.call(void 0, ctx, getBaseProjection(region, transform, baseW, baseH));
2077
+ _chunkPMHPXCJCcjs.applyImageProjectionToContext.call(void 0, ctx, getBaseProjection(region, transform, baseW, baseH));
2078
2078
  for (const ann of overlay) {
2079
2079
  await this.drawAnnotation(ctx, ann);
2080
2080
  }
@@ -2164,7 +2164,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2164
2164
  case "rect":
2165
2165
  case "image":
2166
2166
  case "text": {
2167
- const b = _chunkXLUYXUBDcjs.getAnnotationBounds.call(void 0, ann);
2167
+ const b = _chunkPMHPXCJCcjs.getAnnotationBounds.call(void 0, ann);
2168
2168
  ctx.fillRect(b.x, b.y, b.width, b.height);
2169
2169
  break;
2170
2170
  }
@@ -2184,7 +2184,7 @@ function getSourceSize(img, fallbackW = 800, fallbackH = 600) {
2184
2184
  function getBaseProjection(region, transform, baseW, baseH) {
2185
2185
  return {
2186
2186
  region,
2187
- angle: _chunkXLUYXUBDcjs.normalizeAngle.call(void 0, transform.rotate),
2187
+ angle: _chunkPMHPXCJCcjs.normalizeAngle.call(void 0, transform.rotate),
2188
2188
  flipH: transform.flipH,
2189
2189
  flipV: transform.flipV,
2190
2190
  scale: 1,
@@ -2288,8 +2288,8 @@ function polygonCoverage(points, width, height, antiAlias = true) {
2288
2288
  }
2289
2289
  function toMask(width, height, coverage) {
2290
2290
  const out = new Uint8Array(coverage.length);
2291
- for (let i = 0; i < out.length; i++) out[i] = _chunkXLUYXUBDcjs.coverageToByte.call(void 0, coverage[i]);
2292
- return _chunkXLUYXUBDcjs.createSelectionMask.call(void 0, width, height, out);
2291
+ for (let i = 0; i < out.length; i++) out[i] = _chunkPMHPXCJCcjs.coverageToByte.call(void 0, coverage[i]);
2292
+ return _chunkPMHPXCJCcjs.createSelectionMask.call(void 0, width, height, out);
2293
2293
  }
2294
2294
  function polygonSelection(width, height, points, options = {}) {
2295
2295
  return toMask(width, height, polygonCoverage(points, width, height, _nullishCoalesce(options.antiAlias, () => ( true))));
@@ -2416,7 +2416,7 @@ function magicWand(pixels, seed, options = {}) {
2416
2416
  const { width: w, height: h } = pixels;
2417
2417
  const sx = Math.floor(seed.x);
2418
2418
  const sy = Math.floor(seed.y);
2419
- if (!(sx >= 0 && sy >= 0 && sx < w && sy < h)) return _chunkXLUYXUBDcjs.createSelectionMask.call(void 0, w, h);
2419
+ if (!(sx >= 0 && sy >= 0 && sx < w && sy < h)) return _chunkPMHPXCJCcjs.createSelectionMask.call(void 0, w, h);
2420
2420
  const similar = similarity(pixels, sy * w + sx, _nullishCoalesce(options.tolerance, () => ( 32)), _nullishCoalesce(options.distance, () => ( "rgb")));
2421
2421
  const marks = new Uint8Array(n);
2422
2422
  let bx0 = w;
@@ -2464,9 +2464,9 @@ function magicWand(pixels, seed, options = {}) {
2464
2464
  }
2465
2465
  }
2466
2466
  }
2467
- if (bx1 < 0) return _chunkXLUYXUBDcjs.createSelectionMask.call(void 0, w, h);
2468
- if (!(_nullishCoalesce(options.antiAlias, () => ( true)))) return _chunkXLUYXUBDcjs.createSelectionMask.call(void 0, w, h, marks);
2469
- return _chunkXLUYXUBDcjs.createSelectionMask.call(void 0,
2467
+ if (bx1 < 0) return _chunkPMHPXCJCcjs.createSelectionMask.call(void 0, w, h);
2468
+ if (!(_nullishCoalesce(options.antiAlias, () => ( true)))) return _chunkPMHPXCJCcjs.createSelectionMask.call(void 0, w, h, marks);
2469
+ return _chunkPMHPXCJCcjs.createSelectionMask.call(void 0,
2470
2470
  w,
2471
2471
  h,
2472
2472
  antialiasMarks(marks, w, h, Math.max(0, bx0 - 1), Math.max(0, by0 - 1), Math.min(w, bx1 + 2), Math.min(h, by1 + 2))
@@ -2488,7 +2488,7 @@ function colorRange(pixels, samples, options = {}) {
2488
2488
  const parsed = samples.map((s) => ({ c: sampleColor(s.color), at: s.at }));
2489
2489
  const radius = options.localized !== void 0 ? Math.max(1, options.localized) : void 0;
2490
2490
  const out = new Uint8Array(n);
2491
- if (!parsed.length) return _chunkXLUYXUBDcjs.createSelectionMask.call(void 0, w, h, out);
2491
+ if (!parsed.length) return _chunkPMHPXCJCcjs.createSelectionMask.call(void 0, w, h, out);
2492
2492
  for (let i = 0; i < n; i++) {
2493
2493
  const p = i * 4;
2494
2494
  if (data[p + 3] <= 0) continue;
@@ -2504,9 +2504,9 @@ function colorRange(pixels, samples, options = {}) {
2504
2504
  }
2505
2505
  if (k > best) best = k;
2506
2506
  }
2507
- out[i] = _chunkXLUYXUBDcjs.coverageToByte.call(void 0, best);
2507
+ out[i] = _chunkPMHPXCJCcjs.coverageToByte.call(void 0, best);
2508
2508
  }
2509
- return _chunkXLUYXUBDcjs.createSelectionMask.call(void 0, w, h, out);
2509
+ return _chunkPMHPXCJCcjs.createSelectionMask.call(void 0, w, h, out);
2510
2510
  }
2511
2511
  var TONE_RANGE_PRESETS = {
2512
2512
  shadows: [0, 65],
@@ -2524,9 +2524,9 @@ function toneRange(pixels, range, falloff = 20) {
2524
2524
  if (d[p + 3] <= 0) continue;
2525
2525
  const l = Math.min(255, Math.max(0, 0.299 * d[p] + 0.587 * d[p + 1] + 0.114 * d[p + 2]));
2526
2526
  const outside = l < lo ? lo - l : l > hi ? l - hi : 0;
2527
- out[i] = _chunkXLUYXUBDcjs.coverageToByte.call(void 0, 1 - outside / ramp);
2527
+ out[i] = _chunkPMHPXCJCcjs.coverageToByte.call(void 0, 1 - outside / ramp);
2528
2528
  }
2529
- return _chunkXLUYXUBDcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
2529
+ return _chunkPMHPXCJCcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
2530
2530
  }
2531
2531
  function hueRange(pixels, center) {
2532
2532
  const n = checkPixels(pixels);
@@ -2549,9 +2549,9 @@ function hueRange(pixels, center) {
2549
2549
  hue *= 60;
2550
2550
  let dh = ((hue - center) % 360 + 360) % 360;
2551
2551
  dh = Math.min(dh, 360 - dh);
2552
- out[i] = _chunkXLUYXUBDcjs.coverageToByte.call(void 0, Math.min(1, Math.max(0, 1 - dh / 60)) * chroma * (2 - mx));
2552
+ out[i] = _chunkPMHPXCJCcjs.coverageToByte.call(void 0, Math.min(1, Math.max(0, 1 - dh / 60)) * chroma * (2 - mx));
2553
2553
  }
2554
- return _chunkXLUYXUBDcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
2554
+ return _chunkPMHPXCJCcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
2555
2555
  }
2556
2556
 
2557
2557
  // src/image-editor/selection/refine.ts
@@ -2685,9 +2685,9 @@ function edgeWidth(guide, w, h, r) {
2685
2685
  g[yy * w + xx] = Math.sqrt(gx * gx + gy * gy);
2686
2686
  }
2687
2687
  }
2688
- const gm = _chunkXLUYXUBDcjs.greyMorphology.call(void 0, g, w, h, r, true);
2689
- const hi = _chunkXLUYXUBDcjs.greyMorphology.call(void 0, y, w, h, r, true);
2690
- const lo = _chunkXLUYXUBDcjs.greyMorphology.call(void 0, y, w, h, r, false);
2688
+ const gm = _chunkPMHPXCJCcjs.greyMorphology.call(void 0, g, w, h, r, true);
2689
+ const hi = _chunkPMHPXCJCcjs.greyMorphology.call(void 0, y, w, h, r, true);
2690
+ const lo = _chunkPMHPXCJCcjs.greyMorphology.call(void 0, y, w, h, r, false);
2691
2691
  const out = new Float32Array(n);
2692
2692
  for (let i = 0; i < n; i++) out[i] = (hi[i] - lo[i]) / Math.max(gm[i], 1e-4);
2693
2693
  return out;
@@ -2711,7 +2711,7 @@ function refineCoverage(guide, m, w, h, params = {}) {
2711
2711
  }
2712
2712
  }
2713
2713
  if (any) {
2714
- const dist = _chunkXLUYXUBDcjs.distanceTransform.call(void 0, boundary, w, h);
2714
+ const dist = _chunkPMHPXCJCcjs.distanceTransform.call(void 0, boundary, w, h);
2715
2715
  const r = gfRadius(p);
2716
2716
  const q = guidedFilterColor(guide, m, w, h, r);
2717
2717
  const widths = p.smartRadius ? edgeWidth(guide, w, h, r) : null;
@@ -2737,7 +2737,7 @@ function refineCoverage(guide, m, w, h, params = {}) {
2737
2737
  for (let i = 0; i < a.length; i++) a[i] = Math.min(1, Math.max(0, (a[i] - 0.5) * gain + 0.5));
2738
2738
  }
2739
2739
  const amount = shiftAmount(p);
2740
- if (Math.abs(amount) >= 1e-4) a = _chunkXLUYXUBDcjs.shiftCoverage.call(void 0, a, w, h, amount);
2740
+ if (Math.abs(amount) >= 1e-4) a = _chunkPMHPXCJCcjs.shiftCoverage.call(void 0, a, w, h, amount);
2741
2741
  return a;
2742
2742
  }
2743
2743
  function guidePlanes(pixels, win) {
@@ -2781,9 +2781,9 @@ function refineSelection(pixels, mask, params = {}) {
2781
2781
  const out = new Uint8Array(mask.width * mask.height);
2782
2782
  for (let y = 0; y < wh; y++) {
2783
2783
  const dst = (y0 + y) * mask.width + x0;
2784
- for (let x = 0; x < ww; x++) out[dst + x] = _chunkXLUYXUBDcjs.coverageToByte.call(void 0, refined[y * ww + x]);
2784
+ for (let x = 0; x < ww; x++) out[dst + x] = _chunkPMHPXCJCcjs.coverageToByte.call(void 0, refined[y * ww + x]);
2785
2785
  }
2786
- return _chunkXLUYXUBDcjs.createSelectionMask.call(void 0, mask.width, mask.height, out);
2786
+ return _chunkPMHPXCJCcjs.createSelectionMask.call(void 0, mask.width, mask.height, out);
2787
2787
  }
2788
2788
 
2789
2789
  // src/image-editor/effects.ts
@@ -2953,7 +2953,7 @@ var ImageEffectsEngine = (_class4 = class {
2953
2953
  // src/image-editor/free-transform.ts
2954
2954
  var FREE_TRANSFORM_CONTENTS = ["auto", "layer", "selection", "selection-copy", "selection-outline"];
2955
2955
  var fail = (message) => {
2956
- throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(message);
2956
+ throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(message);
2957
2957
  };
2958
2958
  var T = (x, y) => [1, 0, x, 0, 1, y, 0, 0, 1];
2959
2959
  function previewStep(scale) {
@@ -3062,7 +3062,7 @@ var FreeTransformSession = (_class5 = class {
3062
3062
  } else {
3063
3063
  const id = _nullishCoalesce(init.layerId, () => ( host.activeLayerId()));
3064
3064
  if (!id) fail("No layer given and none is active; pass layerId (see list_layers).");
3065
- const layer = _chunkXLUYXUBDcjs.requireLayer.call(void 0, layers, id).layer;
3065
+ const layer = _chunkPMHPXCJCcjs.requireLayer.call(void 0, layers, id).layer;
3066
3066
  this.layerId = layer.id;
3067
3067
  const mask = layer.mask && !layer.mask.source ? layer.mask : void 0;
3068
3068
  const channel = _nullishCoalesce(init.channel, () => ( (layer.id === host.activeLayerId() ? host.activeTarget() : "pixels")));
@@ -3073,20 +3073,20 @@ var FreeTransformSession = (_class5 = class {
3073
3073
  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.`);
3074
3074
  if (!layer.visible && content !== "selection-copy") fail(`Layer "${layer.name || id}" is hidden; show it before you transform it.`);
3075
3075
  if (content !== "selection-copy") {
3076
- _chunkXLUYXUBDcjs.requireUnlocked.call(void 0, layer, "position", "transform it");
3077
- if (!maskAlone) _chunkXLUYXUBDcjs.requireUnlocked.call(void 0, layer, "pixels", "transform it");
3076
+ _chunkPMHPXCJCcjs.requireUnlocked.call(void 0, layer, "position", "transform it");
3077
+ if (!maskAlone) _chunkPMHPXCJCcjs.requireUnlocked.call(void 0, layer, "pixels", "transform it");
3078
3078
  }
3079
3079
  const o = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
3080
3080
  const pixels = layer.type === "pixel" ? host.pixelsOf(layer) : null;
3081
3081
  if (layer.type === "smart" && !maskAlone) {
3082
3082
  if (content !== "layer") fail(`Layer "${layer.name || id}" is a smart object, which transforms as a whole; use content layer (or rasterize it to transform part of it).`);
3083
- if (!_chunkXLUYXUBDcjs.isContentsDecoded.call(void 0, layer.contents)) fail(`The contents of "${layer.name || id}" are not decoded here, so it cannot be transformed; run prepareSmartObjects() first.`);
3083
+ if (!_chunkPMHPXCJCcjs.isContentsDecoded.call(void 0, layer.contents)) fail(`The contents of "${layer.name || id}" are not decoded here, so it cannot be transformed; run prepareSmartObjects() first.`);
3084
3084
  this.smart = layer;
3085
3085
  this.smartObject = true;
3086
- this.startGeometry = _chunkXLUYXUBDcjs.placementGeometry.call(void 0, layer);
3086
+ this.startGeometry = _chunkPMHPXCJCcjs.placementGeometry.call(void 0, layer);
3087
3087
  if (init.interpolation === void 0 && layer.placement.interpolation) this.interp = layer.placement.interpolation;
3088
3088
  this.startInterp = this.interp;
3089
- this.box = _chunkXLUYXUBDcjs.contentsBox.call(void 0, layer.contents);
3089
+ this.box = _chunkPMHPXCJCcjs.contentsBox.call(void 0, layer.contents);
3090
3090
  this.moves = mask && linked ? ["pixels", "mask"] : ["pixels"];
3091
3091
  this.geometryValue = this.startGeometry;
3092
3092
  this.shown = this.startLayers;
@@ -3094,8 +3094,8 @@ var FreeTransformSession = (_class5 = class {
3094
3094
  }
3095
3095
  if (layer.type === "type" && !maskAlone) {
3096
3096
  if (content !== "layer") fail(`Layer "${layer.name || id}" is a type layer, which transforms as a whole; use content layer (or rasterize it to transform part of it).`);
3097
- const frame = _chunkXLUYXUBDcjs.typeFrame.call(void 0, layer, host.textEnv().shaper);
3098
- const m = _chunkXLUYXUBDcjs.textMatrix.call(void 0, layer);
3097
+ const frame = _chunkPMHPXCJCcjs.typeFrame.call(void 0, layer, host.textEnv().shaper);
3098
+ const m = _chunkPMHPXCJCcjs.textMatrix.call(void 0, layer);
3099
3099
  const at = (x, y) => ({ x: m[0] * x + m[2] * y + m[4], y: m[1] * x + m[3] * y + m[5] });
3100
3100
  this.typeTarget = layer;
3101
3101
  this.typeLayer = true;
@@ -3114,7 +3114,7 @@ var FreeTransformSession = (_class5 = class {
3114
3114
  }
3115
3115
  if (layer.type === "shape" && !maskAlone) {
3116
3116
  if (content !== "layer") fail(`Layer "${layer.name || id}" is a shape layer, which transforms as a whole; use content layer (or rasterize it to transform part of it).`);
3117
- const g = _chunkXLUYXUBDcjs.shapeGeometryBounds.call(void 0, layer);
3117
+ const g = _chunkPMHPXCJCcjs.shapeGeometryBounds.call(void 0, layer);
3118
3118
  if (!g) fail(`Shape layer "${layer.name || id}" has no path to transform.`);
3119
3119
  const w = Math.max(g.width, 1);
3120
3120
  const h = Math.max(g.height, 1);
@@ -3162,7 +3162,7 @@ var FreeTransformSession = (_class5 = class {
3162
3162
  if (box) {
3163
3163
  const copy = {
3164
3164
  type: "pixel",
3165
- id: _chunkXLUYXUBDcjs.newLayerId.call(void 0, ),
3165
+ id: _chunkPMHPXCJCcjs.newLayerId.call(void 0, ),
3166
3166
  name: `${layer.name || "Layer"} copy`,
3167
3167
  visible: true,
3168
3168
  opacity: 1,
@@ -3186,7 +3186,7 @@ var FreeTransformSession = (_class5 = class {
3186
3186
  if (!box) fail(content === "layer" ? "The layer has no pixels to transform." : "The selection holds no pixels of this layer; select some, or transform the outline (content selection-outline).");
3187
3187
  this.box = box;
3188
3188
  this.moves = moves;
3189
- this.startGeometry = _chunkXLUYXUBDcjs.identityTransform.call(void 0, box);
3189
+ this.startGeometry = _chunkPMHPXCJCcjs.identityTransform.call(void 0, box);
3190
3190
  this.startInterp = this.interp;
3191
3191
  this.geometryValue = this.startGeometry;
3192
3192
  this.shown = this.startLayers;
@@ -3264,8 +3264,8 @@ var FreeTransformSession = (_class5 = class {
3264
3264
  warp: changes.warp === void 0 ? _nullishCoalesce(this.geometryValue.warp, () => ( null)) : changes.warp
3265
3265
  };
3266
3266
  if (next.corners.length !== 4 || !next.corners.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) fail("corners must be four finite points: top-left, top-right, bottom-right, bottom-left.");
3267
- if (!_chunkXLUYXUBDcjs.transformMap.call(void 0, next)) fail("These corners fold the frame over itself or through the horizon; keep the quad convex.");
3268
- if (this.typeTarget && (_chunkXLUYXUBDcjs.hasWarp.call(void 0, next) || !_chunkXLUYXUBDcjs.matrixFromCorners.call(void 0, next.box, next.corners))) {
3267
+ if (!_chunkPMHPXCJCcjs.transformMap.call(void 0, next)) fail("These corners fold the frame over itself or through the horizon; keep the quad convex.");
3268
+ if (this.typeTarget && (_chunkPMHPXCJCcjs.hasWarp.call(void 0, next) || !_chunkPMHPXCJCcjs.matrixFromCorners.call(void 0, next.box, next.corners))) {
3269
3269
  fail("Type layers take scale, rotate, skew and flips only (the corners must stay a parallelogram, no warp); rasterize the layer (rasterize_layer) for distort, perspective or warp.");
3270
3270
  }
3271
3271
  this.geometryValue = next;
@@ -3277,10 +3277,10 @@ var FreeTransformSession = (_class5 = class {
3277
3277
  if (this.smart) return { layers: this.resampleSmart(final, preview), selection: this.startSelection };
3278
3278
  if (this.typeTarget) return { layers: this.resampleType(), selection: this.startSelection };
3279
3279
  const g = this.geometryValue;
3280
- const identity = _chunkXLUYXUBDcjs.isIdentityTransform.call(void 0, g);
3281
- const warp = _chunkXLUYXUBDcjs.hasWarp.call(void 0, g);
3282
- const h = warp ? null : _chunkXLUYXUBDcjs.geometryHomography.call(void 0, g);
3283
- const f = warp ? _chunkXLUYXUBDcjs.transformMap.call(void 0, g) : null;
3280
+ const identity = _chunkPMHPXCJCcjs.isIdentityTransform.call(void 0, g);
3281
+ const warp = _chunkPMHPXCJCcjs.hasWarp.call(void 0, g);
3282
+ const h = warp ? null : _chunkPMHPXCJCcjs.geometryHomography.call(void 0, g);
3283
+ const f = warp ? _chunkPMHPXCJCcjs.transformMap.call(void 0, g) : null;
3284
3284
  const step = final ? 1 : previewStep(preview.scale);
3285
3285
  const interpolation = final ? this.interp : this.interp === "nearest" ? "nearest" : "bilinear";
3286
3286
  let layers = this.startLayers;
@@ -3324,7 +3324,7 @@ var FreeTransformSession = (_class5 = class {
3324
3324
  if (part.what === "selection") {
3325
3325
  const { width, height } = this.host.canvas();
3326
3326
  const data = new Uint8Array(_chunkJ5BA3BQ6cjs.readRegion.call(void 0, result, { x: 0, y: 0, width, height }).buffer);
3327
- const next = _chunkXLUYXUBDcjs.createSelectionMask.call(void 0, width, height, data);
3327
+ const next = _chunkPMHPXCJCcjs.createSelectionMask.call(void 0, width, height, data);
3328
3328
  selection = next.bounds ? next : null;
3329
3329
  } else if (part.what === "pixels") {
3330
3330
  layers = _chunkMZXQTKUMcjs.mapLayer.call(void 0, layers, targetId, (l) => {
@@ -3346,14 +3346,14 @@ var FreeTransformSession = (_class5 = class {
3346
3346
  resampleShape(final, preview, warpMap, h) {
3347
3347
  const layer = this.shape;
3348
3348
  let components = layer.components;
3349
- if (!_chunkXLUYXUBDcjs.isIdentityTransform.call(void 0, this.geometryValue)) {
3349
+ if (!_chunkPMHPXCJCcjs.isIdentityTransform.call(void 0, this.geometryValue)) {
3350
3350
  const affine = !warpMap && h && Math.abs(h[6]) < 1e-12 && Math.abs(h[7]) < 1e-12 && Math.abs(h[8] - 1) < 1e-12 ? [h[0], h[3], h[1], h[4], h[2], h[5]] : void 0;
3351
3351
  const map = _nullishCoalesce(warpMap, () => ( ((p) => h ? _chunkMUUXNRU4cjs.applyHomography.call(void 0, h, p) : p)));
3352
- components = _chunkXLUYXUBDcjs.transformShapeComponents.call(void 0, layer.components, (p) => _nullishCoalesce(map(p), () => ( p)), affine);
3352
+ components = _chunkPMHPXCJCcjs.transformShapeComponents.call(void 0, layer.components, (p) => _nullishCoalesce(map(p), () => ( p)), affine);
3353
3353
  }
3354
3354
  const moved = { ...layer, components };
3355
3355
  delete moved.annotation;
3356
- const surface = _chunkXLUYXUBDcjs.renderShape.call(void 0, moved, this.host.shapeEnv(), final ? {} : { clip: preview.clip });
3356
+ const surface = _chunkPMHPXCJCcjs.renderShape.call(void 0, moved, this.host.shapeEnv(), final ? {} : { clip: preview.clip });
3357
3357
  return _chunkMZXQTKUMcjs.mapLayer.call(void 0, this.startLayers, layer.id, () => ({ ...moved, surface }));
3358
3358
  }
3359
3359
  /**
@@ -3363,13 +3363,13 @@ var FreeTransformSession = (_class5 = class {
3363
3363
  resampleType() {
3364
3364
  const layer = this.typeTarget;
3365
3365
  const g = this.geometryValue;
3366
- if (_chunkXLUYXUBDcjs.hasWarp.call(void 0, g)) fail("Type layers cannot be warped here; rasterize the layer first (rasterize_layer), or transform it with scale, rotate and skew.");
3367
- const m = _chunkXLUYXUBDcjs.matrixFromCorners.call(void 0, g.box, g.corners);
3366
+ if (_chunkPMHPXCJCcjs.hasWarp.call(void 0, g)) fail("Type layers cannot be warped here; rasterize the layer first (rasterize_layer), or transform it with scale, rotate and skew.");
3367
+ const m = _chunkPMHPXCJCcjs.matrixFromCorners.call(void 0, g.box, g.corners);
3368
3368
  if (!m) fail("Type layers take scale, rotate, skew and flips only (the corners must stay a parallelogram); rasterize the layer for distort or perspective.");
3369
3369
  const next = { ...layer, transform: m };
3370
3370
  delete next.annotation;
3371
- let layers = _chunkMZXQTKUMcjs.mapLayer.call(void 0, this.startLayers, layer.id, () => _chunkXLUYXUBDcjs.rerenderText.call(void 0, next, this.host.textEnv()));
3372
- const change = _chunkMUUXNRU4cjs.multiplyHomographies.call(void 0, _chunkMUUXNRU4cjs.homographyFromAffine.call(void 0, _chunkORE334I6cjs.invertMatrix.call(void 0, _chunkXLUYXUBDcjs.textMatrix.call(void 0, layer))), _chunkMUUXNRU4cjs.homographyFromAffine.call(void 0, m));
3371
+ let layers = _chunkMZXQTKUMcjs.mapLayer.call(void 0, this.startLayers, layer.id, () => _chunkPMHPXCJCcjs.rerenderText.call(void 0, next, this.host.textEnv()));
3372
+ const change = _chunkMUUXNRU4cjs.multiplyHomographies.call(void 0, _chunkMUUXNRU4cjs.homographyFromAffine.call(void 0, _chunkLXGOYRPEcjs.invertMatrix.call(void 0, _chunkPMHPXCJCcjs.textMatrix.call(void 0, layer))), _chunkMUUXNRU4cjs.homographyFromAffine.call(void 0, m));
3373
3373
  for (const part of this.parts) {
3374
3374
  if (part.what !== "mask") continue;
3375
3375
  const surface = _chunkMZXQTKUMcjs.transformSurface.call(void 0, part.moving, change, { interpolation: this.interp === "nearest" ? "nearest" : "bilinear" });
@@ -3385,12 +3385,12 @@ var FreeTransformSession = (_class5 = class {
3385
3385
  const canvas = this.host.canvas();
3386
3386
  try {
3387
3387
  if (final) {
3388
- const res = _chunkXLUYXUBDcjs.setSmartPlacement.call(void 0, this.startLayers, layer.id, placement, canvas);
3388
+ const res = _chunkPMHPXCJCcjs.setSmartPlacement.call(void 0, this.startLayers, layer.id, placement, canvas);
3389
3389
  this.smartMasksMoved = res.masksMoved;
3390
3390
  return res.layers;
3391
3391
  }
3392
3392
  const step = previewStep(preview.scale);
3393
- const surface = _chunkXLUYXUBDcjs.renderSmartObject.call(void 0, { ...layer, placement }, canvas, { step, clip: preview.clip, skipFilters: true, reduced: this.smartReduced });
3393
+ const surface = _chunkPMHPXCJCcjs.renderSmartObject.call(void 0, { ...layer, placement }, canvas, { step, clip: preview.clip, skipFilters: true, reduced: this.smartReduced });
3394
3394
  return _chunkMZXQTKUMcjs.mapLayer.call(void 0, this.startLayers, layer.id, (l) => ({ ...l, placement, surface }));
3395
3395
  } catch (e) {
3396
3396
  if (e instanceof _chunkMZXQTKUMcjs.TransformTooLargeError) fail(e.message);
@@ -3400,10 +3400,10 @@ var FreeTransformSession = (_class5 = class {
3400
3400
  /** Whether the geometry (or the interpolation of a smart object) differs from where it started. */
3401
3401
  isChanged() {
3402
3402
  const g = this.geometryValue;
3403
- if (!this.smart && !this.typeTarget) return !_chunkXLUYXUBDcjs.isIdentityTransform.call(void 0, g);
3403
+ if (!this.smart && !this.typeTarget) return !_chunkPMHPXCJCcjs.isIdentityTransform.call(void 0, g);
3404
3404
  const a = this.startGeometry;
3405
3405
  const same = g.corners.every((c, i) => Math.abs(c.x - a.corners[i].x) < 1e-9 && Math.abs(c.y - a.corners[i].y) < 1e-9);
3406
- const warp = (w, box) => w && _chunkXLUYXUBDcjs.hasWarp.call(void 0, { box, corners: a.corners, warp: w }) ? JSON.stringify(w) : "";
3406
+ const warp = (w, box) => w && _chunkPMHPXCJCcjs.hasWarp.call(void 0, { box, corners: a.corners, warp: w }) ? JSON.stringify(w) : "";
3407
3407
  return !same || warp(g.warp, g.box) !== warp(a.warp, a.box) || this.interp !== this.startInterp;
3408
3408
  }
3409
3409
  render(preview) {
@@ -3593,6 +3593,30 @@ function convertHex(hex, from, to, intent = "relative", bpc = true) {
3593
3593
  const c = (v) => Math.round(Math.min(1, Math.max(0, v)) * 255).toString(16).padStart(2, "0");
3594
3594
  return `#${c(out[0])}${c(out[1])}${c(out[2])}`;
3595
3595
  }
3596
+ function convertColorFields(value, convert) {
3597
+ const walk = (v, key) => {
3598
+ if (typeof v === "string") return /color$/i.test(key) && /^#[0-9a-f]{6}$/i.test(v) ? convert(v) : v;
3599
+ if (Array.isArray(v)) {
3600
+ let changed = false;
3601
+ const out = v.map((x) => {
3602
+ const y = walk(x, key);
3603
+ if (y !== x) changed = true;
3604
+ return y;
3605
+ });
3606
+ return changed ? out : v;
3607
+ }
3608
+ if (v && typeof v === "object" && Object.getPrototypeOf(v) === Object.prototype) {
3609
+ let out = null;
3610
+ for (const [k, x] of Object.entries(v)) {
3611
+ const y = walk(x, k);
3612
+ if (y !== x) (out ??= { ...v })[k] = y;
3613
+ }
3614
+ return _nullishCoalesce(out, () => ( v));
3615
+ }
3616
+ return v;
3617
+ };
3618
+ return walk(value, "");
3619
+ }
3596
3620
  function convertSurfaceColors(surface, t) {
3597
3621
  if (surface.channels !== 4 || t.inputs !== 3 || t.outputs !== 3) return surface;
3598
3622
  const tiles = /* @__PURE__ */ new Map();
@@ -3626,7 +3650,7 @@ function convertSurfaceColors(surface, t) {
3626
3650
  }
3627
3651
 
3628
3652
  // src/image-editor/controller.ts
3629
- var IMAGE_EDITOR_SCHEMA_VERSION = _chunkXLUYXUBDcjs.LAYERED_SCHEMA_VERSION;
3653
+ var IMAGE_EDITOR_SCHEMA_VERSION = _chunkPMHPXCJCcjs.LAYERED_SCHEMA_VERSION;
3630
3654
  var RETOUCH_TOOLS = ["clone", "heal", "spot-heal", "smudge", "dodge", "burn", "sponge"];
3631
3655
  var isRetouchTool = (tool) => RETOUCH_TOOLS.includes(tool);
3632
3656
  var STROKE_TOOLS = ["brush", "eraser", "mixer", ...RETOUCH_TOOLS];
@@ -3820,7 +3844,7 @@ var PaintStrokeSession = (_class6 = class {
3820
3844
  for (const t of _chunkJ5BA3BQ6cjs.tilesInRect.call(void 0, { x: r.x - this.apply.offset.x, y: r.y - this.apply.offset.y, width: r.width, height: r.height })) {
3821
3845
  const key = _chunkJ5BA3BQ6cjs.tileKey.call(void 0, t.tx, t.ty);
3822
3846
  const cur = regions.get(key);
3823
- regions.set(key, { tx: t.tx, ty: t.ty, r: cur ? _chunkXLUYXUBDcjs.unionRect.call(void 0, cur.r, r) : r });
3847
+ regions.set(key, { tx: t.tx, ty: t.ty, r: cur ? _chunkPMHPXCJCcjs.unionRect.call(void 0, cur.r, r) : r });
3824
3848
  }
3825
3849
  }
3826
3850
  for (const [key, { tx, ty, r }] of regions) {
@@ -3852,7 +3876,7 @@ var PaintStrokeSession = (_class6 = class {
3852
3876
  }
3853
3877
  /** Finishes the stroke (one undo step) and returns what changed. */
3854
3878
  end() {
3855
- if (this.closed) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("This stroke has already ended.");
3879
+ if (this.closed) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("This stroke has already ended.");
3856
3880
  const last = _nullishCoalesce(this.last, () => ( void 0));
3857
3881
  const rects = this.mixer ? this.mixer.finish(last) : this.stroke.finish(last);
3858
3882
  _optionalChain([this, 'access', _109 => _109.flushView, 'optionalCall', _110 => _110()]);
@@ -3976,20 +4000,20 @@ function sameTile(a, b) {
3976
4000
  for (let i = 0; i < a.data.length; i++) if (a.data[i] !== b.data[i]) return false;
3977
4001
  return true;
3978
4002
  }
3979
- var DEFAULT_ADJUSTMENTS = _chunkXLUYXUBDcjs.DEFAULT_ADJUSTMENTS_VALUES;
4003
+ var DEFAULT_ADJUSTMENTS = _chunkPMHPXCJCcjs.DEFAULT_ADJUSTMENTS_VALUES;
3980
4004
  function normalizeStoredAdjustments(stored) {
3981
4005
  if (!stored) return { ...DEFAULT_ADJUSTMENTS };
3982
4006
  const out = {
3983
4007
  ...DEFAULT_ADJUSTMENTS,
3984
4008
  ...stored,
3985
- process: _chunkXLUYXUBDcjs.normalizeProcessVersion.call(void 0, stored.process)
4009
+ process: _chunkPMHPXCJCcjs.normalizeProcessVersion.call(void 0, stored.process)
3986
4010
  };
3987
- const layers = _chunkXLUYXUBDcjs.normalizeAdjustmentLayers.call(void 0, stored.layers);
4011
+ const layers = _chunkPMHPXCJCcjs.normalizeAdjustmentLayers.call(void 0, stored.layers);
3988
4012
  if (layers.length) out.layers = layers;
3989
4013
  else delete out.layers;
3990
4014
  return out;
3991
4015
  }
3992
- var isLayered = (data) => Boolean(data && data.version === _chunkXLUYXUBDcjs.LAYERED_SCHEMA_VERSION && Array.isArray(data.layers));
4016
+ var isLayered = (data) => Boolean(data && data.version === _chunkPMHPXCJCcjs.LAYERED_SCHEMA_VERSION && Array.isArray(data.layers));
3993
4017
  function migrateSerializedImageEditorState(data) {
3994
4018
  if (isLayered(data)) {
3995
4019
  const out = {
@@ -4021,10 +4045,10 @@ function migrateSerializedImageEditorState(data) {
4021
4045
  function migrateToLayeredState(data, size) {
4022
4046
  const clean = migrateSerializedImageEditorState(data);
4023
4047
  if (isLayered(clean)) return clean;
4024
- const stack = _chunkXLUYXUBDcjs.layersFromLegacy.call(void 0, clean, Math.round(size.width), Math.round(size.height));
4025
- const { layers, assets } = _chunkXLUYXUBDcjs.serializeLayers.call(void 0, stack.layers);
4048
+ const stack = _chunkPMHPXCJCcjs.layersFromLegacy.call(void 0, clean, Math.round(size.width), Math.round(size.height));
4049
+ const { layers, assets } = _chunkPMHPXCJCcjs.serializeLayers.call(void 0, stack.layers);
4026
4050
  const out = {
4027
- version: _chunkXLUYXUBDcjs.LAYERED_SCHEMA_VERSION,
4051
+ version: _chunkPMHPXCJCcjs.LAYERED_SCHEMA_VERSION,
4028
4052
  width: Math.round(size.width),
4029
4053
  height: Math.round(size.height),
4030
4054
  layers,
@@ -4038,8 +4062,8 @@ function migrateToLayeredState(data, size) {
4038
4062
  if (clean.selection) out.selection = clean.selection;
4039
4063
  return out;
4040
4064
  }
4041
- var DEFAULT_TRANSFORM = _chunkXLUYXUBDcjs.DEFAULT_TRANSFORM_VALUES;
4042
- var DEFAULT_DEPTH_MASK = _chunkXLUYXUBDcjs.DEFAULT_DEPTH_MASK_VALUES;
4065
+ var DEFAULT_TRANSFORM = _chunkPMHPXCJCcjs.DEFAULT_TRANSFORM_VALUES;
4066
+ var DEFAULT_DEPTH_MASK = _chunkPMHPXCJCcjs.DEFAULT_DEPTH_MASK_VALUES;
4043
4067
  var DEVELOP_KEYS = ["brightness", "contrast", "saturation", "exposure", "temperature", "tint"];
4044
4068
  var ImageEditorController = (_class7 = class {
4045
4069
 
@@ -4062,7 +4086,7 @@ var ImageEditorController = (_class7 = class {
4062
4086
  __init62() {this.sourceSurfaces = /* @__PURE__ */ new WeakMap()}
4063
4087
  __init63() {this.viewKey = []}
4064
4088
  /** For `compositePixels` and mask evaluation (the renderer keeps its own for the viewport). */
4065
- __init64() {this.compositor = new (0, _chunkXLUYXUBDcjs.LayerCompositor)()}
4089
+ __init64() {this.compositor = new (0, _chunkPMHPXCJCcjs.LayerCompositor)()}
4066
4090
  /** The effects provider slot (see `setEffectsProvider`). */
4067
4091
  __init65() {this.effects = new (0, _chunkJODTP4DPcjs.EffectsSlot)()}
4068
4092
  /** Renders provider effects: effect smart filter results and effect layers. */
@@ -4120,7 +4144,7 @@ var ImageEditorController = (_class7 = class {
4120
4144
  this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
4121
4145
  if (_optionalChain([options, 'access', _126 => _126.initialState, 'optionalAccess', _127 => _127.selection])) {
4122
4146
  try {
4123
- this.state.selection = normalizeSelection(_chunkXLUYXUBDcjs.deserializeSelection.call(void 0, options.initialState.selection));
4147
+ this.state.selection = normalizeSelection(_chunkPMHPXCJCcjs.deserializeSelection.call(void 0, options.initialState.selection));
4124
4148
  } catch (e14) {
4125
4149
  }
4126
4150
  }
@@ -4232,10 +4256,10 @@ var ImageEditorController = (_class7 = class {
4232
4256
  if (l.type === "group") {
4233
4257
  const children = walk(l.children);
4234
4258
  if (children !== l.children) next2 = { ...l, children };
4235
- } else if (l.type === "smart" && _optionalChain([l, 'access', _130 => _130.smartFilters, 'optionalAccess', _131 => _131.filters, 'access', _132 => _132.some, 'call', _133 => _133((f) => f.kind === "effect")]) && (all || _chunkXLUYXUBDcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
4259
+ } else if (l.type === "smart" && _optionalChain([l, 'access', _130 => _130.smartFilters, 'optionalAccess', _131 => _131.filters, 'access', _132 => _132.some, 'call', _133 => _133((f) => f.kind === "effect")]) && (all || _chunkPMHPXCJCcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
4236
4260
  try {
4237
- const r = _chunkXLUYXUBDcjs.rerender.call(void 0, l, canvas);
4238
- if (all || !_chunkXLUYXUBDcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
4261
+ const r = _chunkPMHPXCJCcjs.rerender.call(void 0, l, canvas);
4262
+ if (all || !_chunkPMHPXCJCcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
4239
4263
  } catch (e16) {
4240
4264
  }
4241
4265
  }
@@ -4291,19 +4315,19 @@ var ImageEditorController = (_class7 = class {
4291
4315
  const d = await this.describeEffect(effect, "filter");
4292
4316
  const values = _chunkJODTP4DPcjs.resolveEffectValues.call(void 0, d, options.values);
4293
4317
  const found = _chunkMZXQTKUMcjs.findLayer.call(void 0, this.state.layers, layerId);
4294
- if (!found) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`There is no layer "${layerId}"; call list_layers for the layer ids.`);
4318
+ if (!found) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`There is no layer "${layerId}"; call list_layers for the layer ids.`);
4295
4319
  let layers = this.state.layers;
4296
4320
  let id = layerId;
4297
4321
  let converted = false;
4298
4322
  if (found.layer.type !== "smart") {
4299
- if (found.layer.type === "adjustment" || found.layer.type === "annotation") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Layer "${found.layer.name || layerId}" is ${found.layer.type === "adjustment" ? "an adjustment layer" : "an annotation"}, which has no pixels to filter; apply the effect to a pixel layer or smart object.`);
4300
- const res2 = _chunkXLUYXUBDcjs.convertToSmartObject.call(void 0, layers, [layerId], this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l) });
4323
+ if (found.layer.type === "adjustment" || found.layer.type === "annotation") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Layer "${found.layer.name || layerId}" is ${found.layer.type === "adjustment" ? "an adjustment layer" : "an annotation"}, which has no pixels to filter; apply the effect to a pixel layer or smart object.`);
4324
+ const res2 = _chunkPMHPXCJCcjs.convertToSmartObject.call(void 0, layers, [layerId], this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l) });
4301
4325
  layers = res2.layers;
4302
4326
  id = res2.layer.id;
4303
4327
  converted = true;
4304
4328
  }
4305
- const filter = _chunkXLUYXUBDcjs.normalizeSmartFilter.call(void 0, { kind: "effect", effect: d.id, provider: this.effects.require().id, name: d.name, values, enabled: options.enabled !== false, blend: options.blend, opacity: options.opacity });
4306
- const res = _chunkXLUYXUBDcjs.addSmartFilter.call(void 0, layers, id, filter, this.canvasSize, options.index);
4329
+ const filter = _chunkPMHPXCJCcjs.normalizeSmartFilter.call(void 0, { kind: "effect", effect: d.id, provider: this.effects.require().id, name: d.name, values, enabled: options.enabled !== false, blend: options.blend, opacity: options.opacity });
4330
+ const res = _chunkPMHPXCJCcjs.addSmartFilter.call(void 0, layers, id, filter, this.canvasSize, options.index);
4307
4331
  this.commitLayers(res.layers);
4308
4332
  return { layerId: id, filter: res.filter, converted };
4309
4333
  }
@@ -4314,9 +4338,9 @@ var ImageEditorController = (_class7 = class {
4314
4338
  * false, during a drag).
4315
4339
  */
4316
4340
  async updateEffectFilter(layerId, filterId, changes, commitToHistory = true) {
4317
- const layer = _chunkXLUYXUBDcjs.requireSmartObject.call(void 0, this.state.layers, layerId);
4341
+ const layer = _chunkPMHPXCJCcjs.requireSmartObject.call(void 0, this.state.layers, layerId);
4318
4342
  const was = _optionalChain([layer, 'access', _134 => _134.smartFilters, 'optionalAccess', _135 => _135.filters, 'access', _136 => _136.find, 'call', _137 => _137((f) => f.id === filterId)]);
4319
- if (!was || was.kind !== "effect") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access', _138 => _138.smartFilters, 'optionalAccess', _139 => _139.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
4343
+ if (!was || was.kind !== "effect") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access', _138 => _138.smartFilters, 'optionalAccess', _139 => _139.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
4320
4344
  const update = {};
4321
4345
  if (changes.values) {
4322
4346
  const d = await this.describeEffect(was.effect);
@@ -4325,15 +4349,15 @@ var ImageEditorController = (_class7 = class {
4325
4349
  for (const [k, v] of Object.entries(changes.values)) {
4326
4350
  if (v !== null) given[k] = v;
4327
4351
  else if (k in d.controls.properties) base[k] = d.defaults[k];
4328
- else throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4352
+ else throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4329
4353
  }
4330
4354
  update.values = { ...base, ..._chunkJODTP4DPcjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
4331
4355
  }
4332
4356
  for (const k of ["enabled", "blend", "opacity"]) if (changes[k] !== void 0) update[k] = changes[k];
4333
- let res = _chunkXLUYXUBDcjs.updateSmartFilter.call(void 0, this.state.layers, layerId, filterId, update, this.canvasSize);
4334
- if (changes.index !== void 0) res = { ...res, layers: _chunkXLUYXUBDcjs.moveSmartFilter.call(void 0, res.layers, layerId, filterId, changes.index, this.canvasSize).layers };
4357
+ let res = _chunkPMHPXCJCcjs.updateSmartFilter.call(void 0, this.state.layers, layerId, filterId, update, this.canvasSize);
4358
+ if (changes.index !== void 0) res = { ...res, layers: _chunkPMHPXCJCcjs.moveSmartFilter.call(void 0, res.layers, layerId, filterId, changes.index, this.canvasSize).layers };
4335
4359
  this.commitLayers(res.layers, void 0, commitToHistory);
4336
- return _chunkXLUYXUBDcjs.requireSmartObject.call(void 0, this.state.layers, layerId).smartFilters.filters.find((f) => f.id === filterId);
4360
+ return _chunkPMHPXCJCcjs.requireSmartObject.call(void 0, this.state.layers, layerId).smartFilters.filters.find((f) => f.id === filterId);
4337
4361
  }
4338
4362
  /**
4339
4363
  * Adds an effect layer: a pixel layer drawn by a provider generator, overlay or title effect at
@@ -4345,12 +4369,12 @@ var ImageEditorController = (_class7 = class {
4345
4369
  const values = _chunkJODTP4DPcjs.resolveEffectValues.call(void 0, d, options.values);
4346
4370
  const { width, height } = this.naturalSize;
4347
4371
  const pixels = await this.effectsEngine.renderLayer(d.id, values, { width, height, depth: this.bitDepth, time: options.time });
4348
- const blend = _chunkXLUYXUBDcjs.parseBlend.call(void 0, options.blend);
4349
- if (options.opacity !== void 0 && !(options.opacity >= 0 && options.opacity <= 1)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("opacity must be from 0 to 1.");
4372
+ const blend = _chunkPMHPXCJCcjs.parseBlend.call(void 0, options.blend);
4373
+ if (options.opacity !== void 0 && !(options.opacity >= 0 && options.opacity <= 1)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("opacity must be from 0 to 1.");
4350
4374
  const ids = new Set(_chunkMZXQTKUMcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
4351
4375
  const layer = {
4352
4376
  type: "pixel",
4353
- id: options.id && !ids.has(options.id) ? options.id : _chunkXLUYXUBDcjs.newLayerId.call(void 0, ),
4377
+ id: options.id && !ids.has(options.id) ? options.id : _chunkPMHPXCJCcjs.newLayerId.call(void 0, ),
4354
4378
  name: _optionalChain([options, 'access', _140 => _140.name, 'optionalAccess', _141 => _141.trim, 'call', _142 => _142()]) || d.name,
4355
4379
  visible: true,
4356
4380
  opacity: _nullishCoalesce(options.opacity, () => ( 1)),
@@ -4359,7 +4383,7 @@ var ImageEditorController = (_class7 = class {
4359
4383
  offset: { x: 0, y: 0 },
4360
4384
  generator: { effect: d.id, provider: this.effects.require().id, name: d.name, values, ...options.time ? { time: options.time } : {} }
4361
4385
  };
4362
- const next = _chunkXLUYXUBDcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(options));
4386
+ const next = _chunkPMHPXCJCcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(options));
4363
4387
  this.commitLayers(next, () => {
4364
4388
  this.state.activeLayerId = layer.id;
4365
4389
  this.state.activeTarget = "pixels";
@@ -4374,8 +4398,8 @@ var ImageEditorController = (_class7 = class {
4374
4398
  async updateEffectLayer(layerId, changes, commitToHistory = true) {
4375
4399
  const found = _chunkMZXQTKUMcjs.findLayer.call(void 0, this.state.layers, layerId);
4376
4400
  const layer = _optionalChain([found, 'optionalAccess', _143 => _143.layer]);
4377
- if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
4378
- _chunkXLUYXUBDcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
4401
+ if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
4402
+ _chunkPMHPXCJCcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
4379
4403
  const g = layer.generator;
4380
4404
  const d = await this.describeEffect(g.effect);
4381
4405
  const base = { ...g.values };
@@ -4383,7 +4407,7 @@ var ImageEditorController = (_class7 = class {
4383
4407
  for (const [k, v] of Object.entries(_nullishCoalesce(changes.values, () => ( {})))) {
4384
4408
  if (v !== null) given[k] = v;
4385
4409
  else if (k in d.controls.properties) base[k] = d.defaults[k];
4386
- else throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4410
+ else throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4387
4411
  }
4388
4412
  const values = { ...base, ..._chunkJODTP4DPcjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
4389
4413
  const time = _nullishCoalesce(_nullishCoalesce(changes.time, () => ( g.time)), () => ( 0));
@@ -4398,7 +4422,7 @@ var ImageEditorController = (_class7 = class {
4398
4422
  /** Turns an effect layer into a plain pixel layer keeping its pixels (one undo step). */
4399
4423
  rasterizeEffectLayer(layerId) {
4400
4424
  const found = _chunkMZXQTKUMcjs.findLayer.call(void 0, this.state.layers, layerId);
4401
- if (!found || found.layer.type !== "pixel" || !found.layer.generator) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`"${layerId}" is not an effect layer.`);
4425
+ if (!found || found.layer.type !== "pixel" || !found.layer.generator) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`"${layerId}" is not an effect layer.`);
4402
4426
  this.commitLayers(
4403
4427
  _chunkMZXQTKUMcjs.mapLayer.call(void 0, this.state.layers, layerId, (l) => {
4404
4428
  const { generator: _g, ...rest } = l;
@@ -4426,7 +4450,7 @@ var ImageEditorController = (_class7 = class {
4426
4450
  if (key.length === this.viewKey.length && key.every((v, i) => v === this.viewKey[i])) return;
4427
4451
  this.viewKey = key;
4428
4452
  const { width, height } = this.naturalSize;
4429
- const view = _chunkXLUYXUBDcjs.legacyView.call(void 0, this.stack(), width, height, s.activeLayerId);
4453
+ const view = _chunkPMHPXCJCcjs.legacyView.call(void 0, this.stack(), width, height, s.activeLayerId);
4430
4454
  s.adjustments = view.adjustments;
4431
4455
  s.depthMask = view.depthMask;
4432
4456
  s.annotations = view.annotations;
@@ -4580,7 +4604,7 @@ var ImageEditorController = (_class7 = class {
4580
4604
  applyCropPreset(ratio) {
4581
4605
  this.recordHistory();
4582
4606
  const { width, height } = this.state.imageDimensions;
4583
- if (ratio && _chunkXLUYXUBDcjs.isQuarterTurnSwapped.call(void 0, this.state.transform)) {
4607
+ if (ratio && _chunkPMHPXCJCcjs.isQuarterTurnSwapped.call(void 0, this.state.transform)) {
4584
4608
  ratio = 1 / ratio;
4585
4609
  }
4586
4610
  if (!ratio) {
@@ -4662,7 +4686,7 @@ var ImageEditorController = (_class7 = class {
4662
4686
  */
4663
4687
  getLayerPixels(id) {
4664
4688
  const layer = this.getLayer(id);
4665
- if (!layer || !_chunkXLUYXUBDcjs.hasSurface.call(void 0, layer)) return null;
4689
+ if (!layer || !_chunkPMHPXCJCcjs.hasSurface.call(void 0, layer)) return null;
4666
4690
  const surface = this.surfaceOf(layer);
4667
4691
  const b = _chunkJ5BA3BQ6cjs.contentBounds.call(void 0, surface);
4668
4692
  if (!b) return null;
@@ -4675,7 +4699,7 @@ var ImageEditorController = (_class7 = class {
4675
4699
  */
4676
4700
  getLayerBounds(id) {
4677
4701
  const layer = this.getLayer(id);
4678
- if (!layer || !_chunkXLUYXUBDcjs.hasSurface.call(void 0, layer)) return null;
4702
+ if (!layer || !_chunkPMHPXCJCcjs.hasSurface.call(void 0, layer)) return null;
4679
4703
  const surface = this.surfaceOf(layer);
4680
4704
  let b = this.boundsCache.get(surface);
4681
4705
  if (b === void 0) {
@@ -4690,9 +4714,9 @@ var ImageEditorController = (_class7 = class {
4690
4714
  */
4691
4715
  getLayerDataURL(id) {
4692
4716
  const layer = this.getLayer(id);
4693
- if (!layer || !_chunkXLUYXUBDcjs.hasSurface.call(void 0, layer)) return null;
4717
+ if (!layer || !_chunkPMHPXCJCcjs.hasSurface.call(void 0, layer)) return null;
4694
4718
  const surface = this.surfaceOf(layer);
4695
- const enc = _chunkXLUYXUBDcjs.encodeSurface.call(void 0, surface);
4719
+ const enc = _chunkPMHPXCJCcjs.encodeSurface.call(void 0, surface);
4696
4720
  return enc ? enc.url : null;
4697
4721
  }
4698
4722
  /**
@@ -4834,19 +4858,19 @@ var ImageEditorController = (_class7 = class {
4834
4858
  if (init.pixels) {
4835
4859
  const px2 = init.pixels;
4836
4860
  if (!(px2.width > 0 && px2.height > 0) || px2.data.length < px2.width * px2.height * 4) {
4837
- throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("pixels must be RGBA with width \xD7 height \xD7 4 bytes.");
4861
+ throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("pixels must be RGBA with width \xD7 height \xD7 4 bytes.");
4838
4862
  }
4839
4863
  surface = _chunkJ5BA3BQ6cjs.surfaceFromPixels.call(void 0, px2, 4);
4840
4864
  } else if (init.color !== void 0) {
4841
4865
  const c = parseColor(init.color);
4842
4866
  surface = _chunkJ5BA3BQ6cjs.solidSurface.call(void 0, 4, { x: 0, y: 0, width, height }, _chunkJ5BA3BQ6cjs.packRgba.call(void 0, c[0], c[1], c[2], c[3]));
4843
4867
  }
4844
- const blend = _chunkXLUYXUBDcjs.parseBlend.call(void 0, init.blend);
4845
- if (init.opacity !== void 0 && !(init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("opacity must be from 0 to 1.");
4868
+ const blend = _chunkPMHPXCJCcjs.parseBlend.call(void 0, init.blend);
4869
+ if (init.opacity !== void 0 && !(init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("opacity must be from 0 to 1.");
4846
4870
  const ids = new Set(_chunkMZXQTKUMcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
4847
4871
  const layer = {
4848
4872
  type: "pixel",
4849
- id: init.id && !ids.has(init.id) ? init.id : _chunkXLUYXUBDcjs.newLayerId.call(void 0, ),
4873
+ id: init.id && !ids.has(init.id) ? init.id : _chunkPMHPXCJCcjs.newLayerId.call(void 0, ),
4850
4874
  name: _optionalChain([init, 'access', _155 => _155.name, 'optionalAccess', _156 => _156.trim, 'call', _157 => _157()]) || this.nextLayerName(),
4851
4875
  visible: _nullishCoalesce(init.visible, () => ( true)),
4852
4876
  opacity: _nullishCoalesce(init.opacity, () => ( 1)),
@@ -4855,7 +4879,7 @@ var ImageEditorController = (_class7 = class {
4855
4879
  offset: { x: Math.round(_nullishCoalesce(init.x, () => ( 0))), y: Math.round(_nullishCoalesce(init.y, () => ( 0))) }
4856
4880
  };
4857
4881
  if (init.fillOpacity !== void 0 && init.fillOpacity !== 1) layer.fillOpacity = init.fillOpacity;
4858
- const next = _chunkXLUYXUBDcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
4882
+ const next = _chunkPMHPXCJCcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
4859
4883
  this.commitLayers(next, () => {
4860
4884
  this.state.activeLayerId = layer.id;
4861
4885
  this.state.activeTarget = "pixels";
@@ -4895,12 +4919,12 @@ var ImageEditorController = (_class7 = class {
4895
4919
  try {
4896
4920
  img = await this.renderer.imageCache.get(src);
4897
4921
  } catch (e21) {
4898
- throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("The image could not be decoded here. Pass a PNG (data URL or base64), or run in a browser for other formats and URLs.");
4922
+ throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("The image could not be decoded here. Pass a PNG (data URL or base64), or run in a browser for other formats and URLs.");
4899
4923
  }
4900
4924
  const w = img.naturalWidth || img.width;
4901
4925
  const h = img.naturalHeight || img.height;
4902
4926
  const ctx = this.renderer.createCanvas(w, h).getContext("2d");
4903
- if (!ctx || typeof ctx.getImageData !== "function") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Decoding this image needs a canvas; pass a PNG instead.");
4927
+ if (!ctx || typeof ctx.getImageData !== "function") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Decoding this image needs a canvas; pass a PNG instead.");
4904
4928
  ctx.drawImage(img, 0, 0, w, h);
4905
4929
  const data = ctx.getImageData(0, 0, w, h);
4906
4930
  return { width: w, height: h, data: data.data };
@@ -4913,7 +4937,7 @@ var ImageEditorController = (_class7 = class {
4913
4937
  }
4914
4938
  /** Duplicates a layer (with its children) directly above it, as one undo step. Returns the copy's id. */
4915
4939
  duplicateLayer(id, name) {
4916
- const res = _chunkXLUYXUBDcjs.duplicateLayer.call(void 0, this.state.layers, id, name);
4940
+ const res = _chunkPMHPXCJCcjs.duplicateLayer.call(void 0, this.state.layers, id, name);
4917
4941
  this.commitLayers(res.layers, () => {
4918
4942
  this.state.activeLayerId = res.id;
4919
4943
  });
@@ -4921,16 +4945,16 @@ var ImageEditorController = (_class7 = class {
4921
4945
  }
4922
4946
  /** Deletes a layer (refused when locked), as one undo step. */
4923
4947
  removeLayer(id) {
4924
- const next = _chunkXLUYXUBDcjs.removeLayer.call(void 0, this.state.layers, id);
4948
+ const next = _chunkPMHPXCJCcjs.removeLayer.call(void 0, this.state.layers, id);
4925
4949
  this.commitLayers(next, () => {
4926
- if (this.state.selectedAnnotationId && !_chunkMZXQTKUMcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkXLUYXUBDcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _159 => _159.id]) === this.state.selectedAnnotationId)) {
4950
+ if (this.state.selectedAnnotationId && !_chunkMZXQTKUMcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkPMHPXCJCcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _159 => _159.id]) === this.state.selectedAnnotationId)) {
4927
4951
  this.state.selectedAnnotationId = null;
4928
4952
  }
4929
4953
  });
4930
4954
  }
4931
4955
  /** Moves a layer above / below another, or into a group, as one undo step. Returns its new parent and index. */
4932
4956
  moveLayer(id, placement) {
4933
- const next = _chunkXLUYXUBDcjs.moveLayer.call(void 0, this.state.layers, id, placement);
4957
+ const next = _chunkPMHPXCJCcjs.moveLayer.call(void 0, this.state.layers, id, placement);
4934
4958
  const loc = _chunkMZXQTKUMcjs.findLayer.call(void 0, next, id);
4935
4959
  if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _160 => _160.parent, 'optionalAccess', _161 => _161.id]), () => ( null)), index: loc.index };
4936
4960
  this.commitLayers(next);
@@ -4941,23 +4965,23 @@ var ImageEditorController = (_class7 = class {
4941
4965
  * one undo step (`commitToHistory = false` for the moves of a slider drag). Returns the layer.
4942
4966
  */
4943
4967
  setLayerProperties(id, props, commitToHistory = true) {
4944
- const next = _chunkXLUYXUBDcjs.setLayerProperties.call(void 0, this.state.layers, id, props);
4968
+ const next = _chunkPMHPXCJCcjs.setLayerProperties.call(void 0, this.state.layers, id, props);
4945
4969
  this.commitLayers(next, void 0, commitToHistory);
4946
4970
  return _chunkMZXQTKUMcjs.findLayer.call(void 0, next, id).layer;
4947
4971
  }
4948
4972
  /** Adds an empty pass-through group above the active layer (or at `placement`) and makes it active. Returns its id. */
4949
4973
  addGroup(init = {}) {
4950
- const blend = init.blend === void 0 ? "pass-through" : _chunkXLUYXUBDcjs.parseBlend.call(void 0, init.blend, true);
4974
+ const blend = init.blend === void 0 ? "pass-through" : _chunkPMHPXCJCcjs.parseBlend.call(void 0, init.blend, true);
4951
4975
  const group = {
4952
4976
  type: "group",
4953
- id: _chunkXLUYXUBDcjs.newLayerId.call(void 0, "group"),
4977
+ id: _chunkPMHPXCJCcjs.newLayerId.call(void 0, "group"),
4954
4978
  name: _optionalChain([init, 'access', _164 => _164.name, 'optionalAccess', _165 => _165.trim, 'call', _166 => _166()]) || "Group",
4955
4979
  visible: true,
4956
4980
  opacity: 1,
4957
4981
  blend,
4958
4982
  children: []
4959
4983
  };
4960
- const next = _chunkXLUYXUBDcjs.placeLayer.call(void 0, this.state.layers, group, this.newLayerPlacement(init));
4984
+ const next = _chunkPMHPXCJCcjs.placeLayer.call(void 0, this.state.layers, group, this.newLayerPlacement(init));
4961
4985
  this.commitLayers(next, () => {
4962
4986
  this.state.activeLayerId = group.id;
4963
4987
  this.state.activeTarget = "pixels";
@@ -4966,7 +4990,7 @@ var ImageEditorController = (_class7 = class {
4966
4990
  }
4967
4991
  /** Puts sibling layers into a new group (one undo step). Returns the group id. */
4968
4992
  groupLayers(ids, name) {
4969
- const res = _chunkXLUYXUBDcjs.groupLayers.call(void 0, this.state.layers, ids, name);
4993
+ const res = _chunkPMHPXCJCcjs.groupLayers.call(void 0, this.state.layers, ids, name);
4970
4994
  this.commitLayers(res.layers, () => {
4971
4995
  this.state.activeLayerId = res.id;
4972
4996
  });
@@ -4974,7 +4998,7 @@ var ImageEditorController = (_class7 = class {
4974
4998
  }
4975
4999
  /** Replaces a group by its children (one undo step). Returns the child ids, bottom to top. */
4976
5000
  ungroupLayer(id) {
4977
- const res = _chunkXLUYXUBDcjs.ungroupLayer.call(void 0, this.state.layers, id);
5001
+ const res = _chunkPMHPXCJCcjs.ungroupLayer.call(void 0, this.state.layers, id);
4978
5002
  this.commitLayers(res.layers);
4979
5003
  return res.ids;
4980
5004
  }
@@ -4983,38 +5007,38 @@ var ImageEditorController = (_class7 = class {
4983
5007
  * (`commitToHistory = false` for the moves of a drag). Returns the offset and document bounds.
4984
5008
  */
4985
5009
  offsetLayer(id, move, commitToHistory = true) {
4986
- const layer = _chunkXLUYXUBDcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5010
+ const layer = _chunkPMHPXCJCcjs.requireLayer.call(void 0, this.state.layers, id).layer;
4987
5011
  if (layer.type === "smart") {
4988
5012
  const tl = layer.placement.corners[0];
4989
5013
  const dx = move.x !== void 0 ? move.x - tl.x : _nullishCoalesce(move.dx, () => ( 0));
4990
5014
  const dy = move.y !== void 0 ? move.y - tl.y : _nullishCoalesce(move.dy, () => ( 0));
4991
- if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("x and y must be numbers.");
4992
- this.commitLayers(_chunkXLUYXUBDcjs.offsetSmartObject.call(void 0, this.state.layers, id, dx, dy, this.canvasSize), void 0, commitToHistory);
5015
+ if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("x and y must be numbers.");
5016
+ this.commitLayers(_chunkPMHPXCJCcjs.offsetSmartObject.call(void 0, this.state.layers, id, dx, dy, this.canvasSize), void 0, commitToHistory);
4993
5017
  const moved = _chunkMZXQTKUMcjs.findLayer.call(void 0, this.state.layers, id).layer;
4994
5018
  return { offset: { x: Math.round(moved.placement.corners[0].x), y: Math.round(moved.placement.corners[0].y) }, bounds: this.getLayerBounds(id) };
4995
5019
  }
4996
5020
  if (layer.type === "shape") {
4997
- const g = _nullishCoalesce(_chunkXLUYXUBDcjs.shapeGeometryBounds.call(void 0, layer), () => ( { x: 0, y: 0 }));
5021
+ const g = _nullishCoalesce(_chunkPMHPXCJCcjs.shapeGeometryBounds.call(void 0, layer), () => ( { x: 0, y: 0 }));
4998
5022
  const dx = move.x !== void 0 ? move.x - g.x : _nullishCoalesce(move.dx, () => ( 0));
4999
5023
  const dy = move.y !== void 0 ? move.y - g.y : _nullishCoalesce(move.dy, () => ( 0));
5000
- if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("x and y must be numbers.");
5001
- _chunkXLUYXUBDcjs.requireUnlocked.call(void 0, layer, "position", "move it");
5002
- let moved = _chunkXLUYXUBDcjs.offsetShape.call(void 0, layer, dx, dy, this.shapeEnv());
5024
+ if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("x and y must be numbers.");
5025
+ _chunkPMHPXCJCcjs.requireUnlocked.call(void 0, layer, "position", "move it");
5026
+ let moved = _chunkPMHPXCJCcjs.offsetShape.call(void 0, layer, dx, dy, this.shapeEnv());
5003
5027
  const mask = layer.mask;
5004
5028
  if (mask && mask.linked !== false && !mask.source && (Math.round(dx) || Math.round(dy))) moved = { ...moved, mask: { ...mask, surface: _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, mask.surface, Math.round(dx), Math.round(dy)) } };
5005
5029
  this.commitLayers(_chunkMZXQTKUMcjs.mapLayer.call(void 0, this.state.layers, id, () => moved), void 0, commitToHistory);
5006
- const b = _nullishCoalesce(_chunkXLUYXUBDcjs.shapeGeometryBounds.call(void 0, moved), () => ( { x: 0, y: 0 }));
5030
+ const b = _nullishCoalesce(_chunkPMHPXCJCcjs.shapeGeometryBounds.call(void 0, moved), () => ( { x: 0, y: 0 }));
5007
5031
  return { offset: { x: Math.round(b.x), y: Math.round(b.y) }, bounds: this.getLayerBounds(id) };
5008
5032
  }
5009
5033
  if (layer.type === "type") {
5010
5034
  const m = _nullishCoalesce(layer.transform, () => ( [1, 0, 0, 1, 0, 0]));
5011
5035
  const dx = move.x !== void 0 ? move.x - m[4] : _nullishCoalesce(move.dx, () => ( 0));
5012
5036
  const dy = move.y !== void 0 ? move.y - m[5] : _nullishCoalesce(move.dy, () => ( 0));
5013
- if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("x and y must be numbers.");
5014
- _chunkXLUYXUBDcjs.requireUnlocked.call(void 0, layer, "position", "move it");
5037
+ if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("x and y must be numbers.");
5038
+ _chunkPMHPXCJCcjs.requireUnlocked.call(void 0, layer, "position", "move it");
5015
5039
  const mx = Math.round(dx);
5016
5040
  const my = Math.round(dy);
5017
- let moved = { ..._chunkXLUYXUBDcjs.transformTypeLayer.call(void 0, layer, [1, 0, 0, 1, mx, my]), surface: _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, layer.surface, mx, my) };
5041
+ let moved = { ..._chunkPMHPXCJCcjs.transformTypeLayer.call(void 0, layer, [1, 0, 0, 1, mx, my]), surface: _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, layer.surface, mx, my) };
5018
5042
  const mask = layer.mask;
5019
5043
  if (mask && mask.linked !== false && !mask.source && (mx || my)) moved = { ...moved, mask: { ...mask, surface: _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, mask.surface, mx, my) } };
5020
5044
  this.commitLayers(_chunkMZXQTKUMcjs.mapLayer.call(void 0, this.state.layers, id, () => moved), void 0, commitToHistory);
@@ -5024,7 +5048,7 @@ var ImageEditorController = (_class7 = class {
5024
5048
  const current = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
5025
5049
  const x = _nullishCoalesce(move.x, () => ( current.x + (_nullishCoalesce(move.dx, () => ( 0)))));
5026
5050
  const y = _nullishCoalesce(move.y, () => ( current.y + (_nullishCoalesce(move.dy, () => ( 0)))));
5027
- const next = _chunkXLUYXUBDcjs.offsetLayer.call(void 0, this.state.layers, id, { x, y });
5051
+ const next = _chunkPMHPXCJCcjs.offsetLayer.call(void 0, this.state.layers, id, { x, y });
5028
5052
  this.commitLayers(next, void 0, commitToHistory);
5029
5053
  return { offset: { x: Math.round(x), y: Math.round(y) }, bounds: this.getLayerBounds(id) };
5030
5054
  }
@@ -5034,11 +5058,11 @@ var ImageEditorController = (_class7 = class {
5034
5058
  * target when the layer is active.
5035
5059
  */
5036
5060
  addLayerMask(id, from = "reveal-all", props = {}) {
5037
- const layer = _chunkXLUYXUBDcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5061
+ const layer = _chunkPMHPXCJCcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5038
5062
  let mask;
5039
5063
  if (from === "selection") {
5040
5064
  const sel = this.state.selection;
5041
- if (!_optionalChain([sel, 'optionalAccess', _167 => _167.bounds])) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
5065
+ if (!_optionalChain([sel, 'optionalAccess', _167 => _167.bounds])) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
5042
5066
  mask = this.maskFromSelection(sel, props);
5043
5067
  if (layer.type === "pixel" && (layer.offset.x || layer.offset.y)) {
5044
5068
  mask = { ...mask, surface: _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, mask.surface, -layer.offset.x, -layer.offset.y) };
@@ -5047,7 +5071,7 @@ var ImageEditorController = (_class7 = class {
5047
5071
  const v = from === "reveal-all" ? 255 : 0;
5048
5072
  mask = withMaskProps({ surface: _chunkJ5BA3BQ6cjs.emptySurface.call(void 0, 1, v), defaultValue: v }, props);
5049
5073
  }
5050
- const next = _chunkXLUYXUBDcjs.setLayerMask.call(void 0, this.state.layers, id, mask);
5074
+ const next = _chunkPMHPXCJCcjs.setLayerMask.call(void 0, this.state.layers, id, mask);
5051
5075
  this.commitLayers(next, () => {
5052
5076
  if (this.state.activeLayerId === id) this.state.activeTarget = "mask";
5053
5077
  });
@@ -5055,18 +5079,18 @@ var ImageEditorController = (_class7 = class {
5055
5079
  }
5056
5080
  /** Removes a layer's mask (one undo step). */
5057
5081
  removeLayerMask(id) {
5058
- const layer = _chunkXLUYXUBDcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5059
- if (!layer.mask) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5060
- this.commitLayers(_chunkXLUYXUBDcjs.setLayerMask.call(void 0, this.state.layers, id, null), () => {
5082
+ const layer = _chunkPMHPXCJCcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5083
+ if (!layer.mask) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5084
+ this.commitLayers(_chunkPMHPXCJCcjs.setLayerMask.call(void 0, this.state.layers, id, null), () => {
5061
5085
  if (this.state.activeLayerId === id) this.state.activeTarget = "pixels";
5062
5086
  });
5063
5087
  }
5064
5088
  /** Changes any layer mask's density, feather, enabled or linked flag (pixels kept). Returns the mask. */
5065
5089
  setLayerMaskProps(id, props, commitToHistory = true) {
5066
- const layer = _chunkXLUYXUBDcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5067
- if (!layer.mask) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
5090
+ const layer = _chunkPMHPXCJCcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5091
+ if (!layer.mask) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
5068
5092
  const mask = withMaskProps(layer.mask, props);
5069
- this.commitLayers(_chunkXLUYXUBDcjs.setLayerMask.call(void 0, this.state.layers, id, mask), void 0, commitToHistory);
5093
+ this.commitLayers(_chunkPMHPXCJCcjs.setLayerMask.call(void 0, this.state.layers, id, mask), void 0, commitToHistory);
5070
5094
  return mask;
5071
5095
  }
5072
5096
  /**
@@ -5074,11 +5098,11 @@ var ImageEditorController = (_class7 = class {
5074
5098
  * the depth map) and removes the mask, as one undo step.
5075
5099
  */
5076
5100
  async applyLayerMask(id) {
5077
- const loc = _chunkXLUYXUBDcjs.requireLayer.call(void 0, this.state.layers, id);
5101
+ const loc = _chunkPMHPXCJCcjs.requireLayer.call(void 0, this.state.layers, id);
5078
5102
  const layer = loc.layer;
5079
- if (layer.type !== "pixel") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Only a pixel layer's mask can be applied to its pixels; "${id}" is a ${layer.type} layer. Remove the mask or keep it.`);
5080
- if (!layer.mask) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5081
- _chunkXLUYXUBDcjs.requireUnlocked.call(void 0, layer, "pixels", "apply its mask");
5103
+ if (layer.type !== "pixel") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Only a pixel layer's mask can be applied to its pixels; "${id}" is a ${layer.type} layer. Remove the mask or keep it.`);
5104
+ if (!layer.mask) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5105
+ _chunkPMHPXCJCcjs.requireUnlocked.call(void 0, layer, "pixels", "apply its mask");
5082
5106
  const { width, height } = this.naturalSize;
5083
5107
  await this.renderer.prepareLayerAssets([layer], width, height);
5084
5108
  const sources = this.renderer.compositorSources(width, height);
@@ -5111,13 +5135,13 @@ var ImageEditorController = (_class7 = class {
5111
5135
  */
5112
5136
  layerViaCopy(options = {}) {
5113
5137
  const id = _nullishCoalesce(options.layerId, () => ( this.state.activeLayerId));
5114
- if (!id) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("No layer given and none is active; pass layerId (see list_layers).");
5115
- const loc = _chunkXLUYXUBDcjs.requireLayer.call(void 0, this.state.layers, id);
5138
+ if (!id) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("No layer given and none is active; pass layerId (see list_layers).");
5139
+ const loc = _chunkPMHPXCJCcjs.requireLayer.call(void 0, this.state.layers, id);
5116
5140
  const layer = loc.layer;
5117
- if (layer.type !== "pixel") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
5141
+ if (layer.type !== "pixel") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
5118
5142
  const sel = this.state.selection;
5119
- if (!_optionalChain([sel, 'optionalAccess', _168 => _168.bounds])) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
5120
- if (options.cut) _chunkXLUYXUBDcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
5143
+ if (!_optionalChain([sel, 'optionalAccess', _168 => _168.bounds])) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
5144
+ if (options.cut) _chunkPMHPXCJCcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
5121
5145
  const surface = this.surfaceOf(layer);
5122
5146
  const sb = sel.bounds;
5123
5147
  const src = { x: sb.x - layer.offset.x, y: sb.y - layer.offset.y, width: sb.width, height: sb.height };
@@ -5133,7 +5157,7 @@ var ImageEditorController = (_class7 = class {
5133
5157
  }
5134
5158
  const copy = {
5135
5159
  type: "pixel",
5136
- id: _chunkXLUYXUBDcjs.newLayerId.call(void 0, ),
5160
+ id: _chunkPMHPXCJCcjs.newLayerId.call(void 0, ),
5137
5161
  name: _optionalChain([options, 'access', _169 => _169.name, 'optionalAccess', _170 => _170.trim, 'call', _171 => _171()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
5138
5162
  visible: true,
5139
5163
  opacity: 1,
@@ -5206,7 +5230,7 @@ var ImageEditorController = (_class7 = class {
5206
5230
  * Refused while another transform is open.
5207
5231
  */
5208
5232
  beginFreeTransform(init = {}) {
5209
- if (this.getFreeTransform()) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("A Free Transform is already open; commit or cancel it first.");
5233
+ if (this.getFreeTransform()) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("A Free Transform is already open; commit or cancel it first.");
5210
5234
  const session = new FreeTransformSession(this.transformHost(), init);
5211
5235
  this.openTransform = session;
5212
5236
  this.notify();
@@ -5220,26 +5244,26 @@ var ImageEditorController = (_class7 = class {
5220
5244
  */
5221
5245
  transformLayer(spec) {
5222
5246
  const given = [spec.matrix, spec.corners, spec.params].filter((v) => v !== void 0).length;
5223
- if (given > 1) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give only one of matrix, corners and params.");
5224
- if (!given && spec.warp === void 0) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give matrix, corners or params (or a warp).");
5247
+ if (given > 1) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give only one of matrix, corners and params.");
5248
+ if (!given && spec.warp === void 0) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give matrix, corners or params (or a warp).");
5225
5249
  if (spec.matrix && !(Array.isArray(spec.matrix) && spec.matrix.length === 6 && spec.matrix.every(Number.isFinite))) {
5226
- throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("matrix must be six finite numbers [a, b, c, d, e, f] (x' = a\xB7x + c\xB7y + e, y' = b\xB7x + d\xB7y + f).");
5250
+ throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("matrix must be six finite numbers [a, b, c, d, e, f] (x' = a\xB7x + c\xB7y + e, y' = b\xB7x + d\xB7y + f).");
5227
5251
  }
5228
5252
  if (spec.matrix) {
5229
5253
  const [a, b, c, d] = spec.matrix;
5230
- if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("matrix is singular (it collapses the layer to a line); its determinant a\xB7d \u2212 b\xB7c must not be 0.");
5254
+ if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("matrix is singular (it collapses the layer to a line); its determinant a\xB7d \u2212 b\xB7c must not be 0.");
5231
5255
  }
5232
5256
  const session = this.beginFreeTransform(spec);
5233
5257
  try {
5234
5258
  const g = session.startGeometry;
5235
- const corners = spec.matrix ? g.corners.map((p) => _chunkORE334I6cjs.applyMatrix.call(void 0, spec.matrix, p)) : spec.corners ? spec.corners : spec.params ? _chunkXLUYXUBDcjs.applyParams.call(void 0, g, spec.params) : g.corners;
5259
+ const corners = spec.matrix ? g.corners.map((p) => _chunkLXGOYRPEcjs.applyMatrix.call(void 0, spec.matrix, p)) : spec.corners ? spec.corners : spec.params ? _chunkPMHPXCJCcjs.applyParams.call(void 0, g, spec.params) : g.corners;
5236
5260
  let warp = spec.warp === void 0 ? _nullishCoalesce(g.warp, () => ( null)) : null;
5237
5261
  if (spec.warp) {
5238
5262
  if ("style" in spec.warp) {
5239
- if (!_chunkORE334I6cjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkORE334I6cjs.WARP_STYLES.join(", ")}.`);
5240
- warp = _chunkXLUYXUBDcjs.presetWarp.call(void 0, session.box, spec.warp);
5263
+ if (!_chunkLXGOYRPEcjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkLXGOYRPEcjs.WARP_STYLES.join(", ")}.`);
5264
+ warp = _chunkPMHPXCJCcjs.presetWarp.call(void 0, session.box, spec.warp);
5241
5265
  } else {
5242
- if (!_chunkXLUYXUBDcjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("mesh must have us and vs (knots from 0 to 1, increasing) and (3\xB7columns + 1) \xD7 (3\xB7rows + 1) finite points, row by row.");
5266
+ if (!_chunkPMHPXCJCcjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("mesh must have us and vs (knots from 0 to 1, increasing) and (3\xB7columns + 1) \xD7 (3\xB7rows + 1) finite points, row by row.");
5243
5267
  warp = spec.warp;
5244
5268
  }
5245
5269
  }
@@ -5252,10 +5276,10 @@ var ImageEditorController = (_class7 = class {
5252
5276
  }
5253
5277
  /** Flips the layer (or its selected pixels, or the outline) about the frame's centre, exactly (one undo step). */
5254
5278
  flipLayer(axis, init = {}) {
5255
- if (axis !== "horizontal" && axis !== "vertical") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`axis must be horizontal or vertical, got "${String(axis)}".`);
5279
+ if (axis !== "horizontal" && axis !== "vertical") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`axis must be horizontal or vertical, got "${String(axis)}".`);
5256
5280
  const session = this.beginFreeTransform({ interpolation: "nearest", ...init });
5257
5281
  try {
5258
- session.update({ corners: _chunkXLUYXUBDcjs.flipCorners.call(void 0, session.startGeometry, axis) }, false);
5282
+ session.update({ corners: _chunkPMHPXCJCcjs.flipCorners.call(void 0, session.startGeometry, axis) }, false);
5259
5283
  return session.commit();
5260
5284
  } catch (e) {
5261
5285
  session.cancel();
@@ -5267,16 +5291,16 @@ var ImageEditorController = (_class7 = class {
5267
5291
  * centre, snapped so pixels land on whole pixels: exact, no resampling (one undo step).
5268
5292
  */
5269
5293
  rotateLayer90(turn, init = {}) {
5270
- if (turn !== 90 && turn !== -90 && turn !== 180) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`turn must be 90, -90 or 180, got ${String(turn)}.`);
5294
+ if (turn !== 90 && turn !== -90 && turn !== 180) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`turn must be 90, -90 or 180, got ${String(turn)}.`);
5271
5295
  const session = this.beginFreeTransform({ interpolation: "nearest", ...init });
5272
5296
  try {
5273
- const b = session.smartObject || session.typeLayer ? _nullishCoalesce(_chunkXLUYXUBDcjs.transformedBox.call(void 0, session.startGeometry), () => ( session.box)) : session.box;
5297
+ const b = session.smartObject || session.typeLayer ? _nullishCoalesce(_chunkPMHPXCJCcjs.transformedBox.call(void 0, session.startGeometry), () => ( session.box)) : session.box;
5274
5298
  const cx = b.x + b.width / 2;
5275
5299
  const cy = b.y + b.height / 2;
5276
5300
  const ox = turn === 180 ? 0 : Math.round(cx - b.height / 2) - (cx - b.height / 2);
5277
5301
  const oy = turn === 180 ? 0 : Math.round(cy - b.width / 2) - (cy - b.width / 2);
5278
5302
  const m = turn === 90 ? [0, 1, -1, 0, cx + cy + ox, cy - cx + oy] : turn === -90 ? [0, -1, 1, 0, cx - cy + ox, cy + cx + oy] : [-1, 0, 0, -1, 2 * cx, 2 * cy];
5279
- session.update({ corners: session.startGeometry.corners.map((p) => _chunkORE334I6cjs.applyMatrix.call(void 0, m, p)) }, false);
5303
+ session.update({ corners: session.startGeometry.corners.map((p) => _chunkLXGOYRPEcjs.applyMatrix.call(void 0, m, p)) }, false);
5280
5304
  return session.commit();
5281
5305
  } catch (e) {
5282
5306
  session.cancel();
@@ -5285,20 +5309,20 @@ var ImageEditorController = (_class7 = class {
5285
5309
  }
5286
5310
  /** Adds a `develop` or `blur` filter to a pixel layer (one undo step). Returns the layer's filters. */
5287
5311
  addLayerFilter(id, filter) {
5288
- const f = _chunkXLUYXUBDcjs.normalizeFilter.call(void 0, filter);
5289
- const next = _chunkXLUYXUBDcjs.addLayerFilter.call(void 0, this.state.layers, id, f);
5312
+ const f = _chunkPMHPXCJCcjs.normalizeFilter.call(void 0, filter);
5313
+ const next = _chunkPMHPXCJCcjs.addLayerFilter.call(void 0, this.state.layers, id, f);
5290
5314
  this.commitLayers(next);
5291
5315
  return _nullishCoalesce(_chunkMZXQTKUMcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
5292
5316
  }
5293
5317
  /** Changes one filter (one undo step, or none with `commitToHistory = false` during a drag). Returns the filters. */
5294
5318
  updateLayerFilter(id, filterId, changes, commitToHistory = true) {
5295
- const next = _chunkXLUYXUBDcjs.updateLayerFilter.call(void 0, this.state.layers, id, filterId, changes);
5319
+ const next = _chunkPMHPXCJCcjs.updateLayerFilter.call(void 0, this.state.layers, id, filterId, changes);
5296
5320
  this.commitLayers(next, void 0, commitToHistory);
5297
5321
  return _nullishCoalesce(_chunkMZXQTKUMcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
5298
5322
  }
5299
5323
  /** Removes one filter (one undo step). Returns the remaining filters. */
5300
5324
  removeLayerFilter(id, filterId) {
5301
- const next = _chunkXLUYXUBDcjs.removeLayerFilter.call(void 0, this.state.layers, id, filterId);
5325
+ const next = _chunkPMHPXCJCcjs.removeLayerFilter.call(void 0, this.state.layers, id, filterId);
5302
5326
  this.commitLayers(next);
5303
5327
  return _nullishCoalesce(_chunkMZXQTKUMcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
5304
5328
  }
@@ -5314,8 +5338,8 @@ var ImageEditorController = (_class7 = class {
5314
5338
  */
5315
5339
  convertToSmartObject(ids, options = {}) {
5316
5340
  const list = _optionalChain([ids, 'optionalAccess', _177 => _177.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
5317
- if (!list.length) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
5318
- const res = _chunkXLUYXUBDcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
5341
+ if (!list.length) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
5342
+ const res = _chunkPMHPXCJCcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
5319
5343
  this.commitLayers(res.layers, () => {
5320
5344
  this.state.activeLayerId = res.layer.id;
5321
5345
  this.state.activeTarget = "pixels";
@@ -5324,7 +5348,7 @@ var ImageEditorController = (_class7 = class {
5324
5348
  }
5325
5349
  /** Layer › Smart Objects › Rasterize (one undo step): the smart object becomes a pixel layer holding what it renders. */
5326
5350
  rasterizeSmartObject(id) {
5327
- const res = _chunkXLUYXUBDcjs.rasterizeSmartObject.call(void 0, this.state.layers, id);
5351
+ const res = _chunkPMHPXCJCcjs.rasterizeSmartObject.call(void 0, this.state.layers, id);
5328
5352
  this.commitLayers(res.layers, () => {
5329
5353
  if (this.state.activeLayerId === id && this.state.activeTarget === "filter-mask") this.state.activeTarget = "pixels";
5330
5354
  });
@@ -5332,10 +5356,10 @@ var ImageEditorController = (_class7 = class {
5332
5356
  }
5333
5357
  /** A smart object's contents, placement and smart filters as plain data (see `SmartObjectInfo`). */
5334
5358
  getSmartObject(id) {
5335
- const layer = _chunkXLUYXUBDcjs.requireSmartObject.call(void 0, this.state.layers, id);
5359
+ const layer = _chunkPMHPXCJCcjs.requireSmartObject.call(void 0, this.state.layers, id);
5336
5360
  const c = layer.contents;
5337
- const g = _chunkXLUYXUBDcjs.placementGeometry.call(void 0, layer);
5338
- const readout = _chunkXLUYXUBDcjs.describeTransform.call(void 0, g);
5361
+ const g = _chunkPMHPXCJCcjs.placementGeometry.call(void 0, layer);
5362
+ const readout = _chunkPMHPXCJCcjs.describeTransform.call(void 0, g);
5339
5363
  const stack = layer.smartFilters;
5340
5364
  return {
5341
5365
  layerId: layer.id,
@@ -5345,10 +5369,10 @@ var ImageEditorController = (_class7 = class {
5345
5369
  kind: c.kind,
5346
5370
  width: c.width,
5347
5371
  height: c.height,
5348
- decoded: _chunkXLUYXUBDcjs.isContentsDecoded.call(void 0, c),
5372
+ decoded: _chunkPMHPXCJCcjs.isContentsDecoded.call(void 0, c),
5349
5373
  fileType: _nullishCoalesce(_optionalChain([c, 'access', _178 => _178.file, 'optionalAccess', _179 => _179.type]), () => ( null)),
5350
5374
  linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _180 => _180.linked, 'optionalAccess', _181 => _181.path]), () => ( null)),
5351
- instances: _chunkXLUYXUBDcjs.instancesOf.call(void 0, this.state.layers, c.id),
5375
+ instances: _chunkPMHPXCJCcjs.instancesOf.call(void 0, this.state.layers, c.id),
5352
5376
  layerCount: c.document ? _chunkMZXQTKUMcjs.flattenLayers.call(void 0, c.document.layers).length : 0
5353
5377
  },
5354
5378
  placement: {
@@ -5360,8 +5384,8 @@ var ImageEditorController = (_class7 = class {
5360
5384
  scaleY: readout.scaleY,
5361
5385
  rotate: readout.rotate,
5362
5386
  skewX: readout.skewX,
5363
- center: _chunkXLUYXUBDcjs.anchorPoint.call(void 0, g, "center"),
5364
- bounds: _chunkXLUYXUBDcjs.transformedBox.call(void 0, g)
5387
+ center: _chunkPMHPXCJCcjs.anchorPoint.call(void 0, g, "center"),
5388
+ bounds: _chunkPMHPXCJCcjs.transformedBox.call(void 0, g)
5365
5389
  },
5366
5390
  smartFilters: {
5367
5391
  enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _182 => _182.enabled]), () => ( true)),
@@ -5378,7 +5402,7 @@ var ImageEditorController = (_class7 = class {
5378
5402
  * change. Returns the new placement summary.
5379
5403
  */
5380
5404
  setSmartObjectPlacement(id, placement, commitToHistory = true) {
5381
- const res = _chunkXLUYXUBDcjs.setSmartPlacement.call(void 0, this.state.layers, id, placement, this.canvasSize);
5405
+ const res = _chunkPMHPXCJCcjs.setSmartPlacement.call(void 0, this.state.layers, id, placement, this.canvasSize);
5382
5406
  this.commitLayers(res.layers, void 0, commitToHistory);
5383
5407
  return { ...this.getSmartObject(id).placement, masksMoved: res.masksMoved };
5384
5408
  }
@@ -5391,23 +5415,23 @@ var ImageEditorController = (_class7 = class {
5391
5415
  * nothing is relative to the current transform.
5392
5416
  */
5393
5417
  setSmartObjectTransform(id, spec) {
5394
- const layer = _chunkXLUYXUBDcjs.requireSmartObject.call(void 0, this.state.layers, id);
5395
- const g = _chunkXLUYXUBDcjs.placementGeometry.call(void 0, layer);
5418
+ const layer = _chunkPMHPXCJCcjs.requireSmartObject.call(void 0, this.state.layers, id);
5419
+ const g = _chunkPMHPXCJCcjs.placementGeometry.call(void 0, layer);
5396
5420
  const numeric = ["scaleX", "scaleY", "rotate", "skewX", "skewY", "x", "y"].filter((k) => spec[k] !== void 0);
5397
5421
  const ways = [spec.corners !== void 0, spec.matrix !== void 0, numeric.length > 0].filter(Boolean).length;
5398
- if (ways > 1) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give the transform only one way: corners, matrix, or the numbers (scaleX, scaleY, rotate, skewX, skewY, x, y).");
5422
+ if (ways > 1) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give the transform only one way: corners, matrix, or the numbers (scaleX, scaleY, rotate, skewX, skewY, x, y).");
5399
5423
  let corners = g.corners;
5400
5424
  if (spec.corners) corners = spec.corners;
5401
5425
  else if (spec.matrix) {
5402
- if (!(Array.isArray(spec.matrix) && spec.matrix.length === 6 && spec.matrix.every(Number.isFinite))) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("matrix must be six finite numbers [a, b, c, d, e, f] (x' = a\xB7x + c\xB7y + e, y' = b\xB7x + d\xB7y + f).");
5426
+ if (!(Array.isArray(spec.matrix) && spec.matrix.length === 6 && spec.matrix.every(Number.isFinite))) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("matrix must be six finite numbers [a, b, c, d, e, f] (x' = a\xB7x + c\xB7y + e, y' = b\xB7x + d\xB7y + f).");
5403
5427
  const [a, b, c, d] = spec.matrix;
5404
- if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("matrix is singular (it collapses the contents to a line); a\xB7d \u2212 b\xB7c must not be 0.");
5405
- corners = _chunkXLUYXUBDcjs.cornersFromMatrix.call(void 0, g.box, spec.matrix);
5428
+ if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("matrix is singular (it collapses the contents to a line); a\xB7d \u2212 b\xB7c must not be 0.");
5429
+ corners = _chunkPMHPXCJCcjs.cornersFromMatrix.call(void 0, g.box, spec.matrix);
5406
5430
  } else if (numeric.length) {
5407
- if (spec.scaleX === 0 || spec.scaleY === 0) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the contents to a line).");
5408
- for (const k of numeric) if (!Number.isFinite(spec[k])) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`${k} must be a finite number.`);
5409
- const now = _chunkXLUYXUBDcjs.describeTransform.call(void 0, g);
5410
- const centre = _chunkXLUYXUBDcjs.anchorPoint.call(void 0, g, "center");
5431
+ if (spec.scaleX === 0 || spec.scaleY === 0) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the contents to a line).");
5432
+ for (const k of numeric) if (!Number.isFinite(spec[k])) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`${k} must be a finite number.`);
5433
+ const now = _chunkPMHPXCJCcjs.describeTransform.call(void 0, g);
5434
+ const centre = _chunkPMHPXCJCcjs.anchorPoint.call(void 0, g, "center");
5411
5435
  const params = {
5412
5436
  scaleX: _nullishCoalesce(spec.scaleX, () => ( (now.affine ? now.scaleX : 100))),
5413
5437
  scaleY: _nullishCoalesce(spec.scaleY, () => ( (now.affine ? now.scaleY : 100))),
@@ -5415,20 +5439,20 @@ var ImageEditorController = (_class7 = class {
5415
5439
  skewX: _nullishCoalesce(spec.skewX, () => ( (now.affine ? now.skewX : 0))),
5416
5440
  skewY: _nullishCoalesce(spec.skewY, () => ( 0))
5417
5441
  };
5418
- const m = _chunkXLUYXUBDcjs.matrixFromParams.call(void 0, g.box, { ...params, reference: "center" });
5442
+ const m = _chunkPMHPXCJCcjs.matrixFromParams.call(void 0, g.box, { ...params, reference: "center" });
5419
5443
  const cx = g.box.width / 2;
5420
5444
  const cy = g.box.height / 2;
5421
5445
  const to = { x: _nullishCoalesce(spec.x, () => ( centre.x)), y: _nullishCoalesce(spec.y, () => ( centre.y)) };
5422
- corners = _chunkXLUYXUBDcjs.cornersFromMatrix.call(void 0, g.box, _chunkORE334I6cjs.multiplyMatrices.call(void 0, m, _chunkORE334I6cjs.translateMatrix.call(void 0, to.x - cx, to.y - cy)));
5446
+ corners = _chunkPMHPXCJCcjs.cornersFromMatrix.call(void 0, g.box, _chunkLXGOYRPEcjs.multiplyMatrices.call(void 0, m, _chunkLXGOYRPEcjs.translateMatrix.call(void 0, to.x - cx, to.y - cy)));
5423
5447
  }
5424
5448
  let warp = _nullishCoalesce(layer.placement.warp, () => ( null));
5425
5449
  if (spec.warp === null) warp = null;
5426
5450
  else if (spec.warp) {
5427
5451
  if ("style" in spec.warp) {
5428
- if (!_chunkORE334I6cjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkORE334I6cjs.WARP_STYLES.join(", ")}.`);
5429
- warp = _chunkXLUYXUBDcjs.presetWarp.call(void 0, g.box, spec.warp);
5452
+ if (!_chunkLXGOYRPEcjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkLXGOYRPEcjs.WARP_STYLES.join(", ")}.`);
5453
+ warp = _chunkPMHPXCJCcjs.presetWarp.call(void 0, g.box, spec.warp);
5430
5454
  } else {
5431
- if (!_chunkXLUYXUBDcjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("mesh must have us and vs (knots from 0 to 1, increasing) and (3\xB7columns + 1) \xD7 (3\xB7rows + 1) finite points in contents pixels, row by row.");
5455
+ if (!_chunkPMHPXCJCcjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("mesh must have us and vs (knots from 0 to 1, increasing) and (3\xB7columns + 1) \xD7 (3\xB7rows + 1) finite points in contents pixels, row by row.");
5432
5456
  warp = spec.warp;
5433
5457
  }
5434
5458
  }
@@ -5442,16 +5466,16 @@ var ImageEditorController = (_class7 = class {
5442
5466
  * the layers that changed.
5443
5467
  */
5444
5468
  replaceSmartObjectContents(id, source) {
5445
- const layer = _chunkXLUYXUBDcjs.requireSmartObject.call(void 0, this.state.layers, id);
5469
+ const layer = _chunkPMHPXCJCcjs.requireSmartObject.call(void 0, this.state.layers, id);
5446
5470
  let contents;
5447
5471
  if ("contents" in source) contents = source.contents;
5448
- else if ("pixels" in source) contents = _chunkXLUYXUBDcjs.rasterContents.call(void 0, source.pixels, _nullishCoalesce(source.name, () => ( layer.contents.name.replace(/\.\w+$/, ".png"))));
5472
+ else if ("pixels" in source) contents = _chunkPMHPXCJCcjs.rasterContents.call(void 0, source.pixels, _nullishCoalesce(source.name, () => ( layer.contents.name.replace(/\.\w+$/, ".png"))));
5449
5473
  else {
5450
- const psd = _chunkXLUYXUBDcjs.importPsd.call(void 0, source.psd, { newId: () => _chunkXLUYXUBDcjs.newLayerId.call(void 0, ) });
5451
- contents = _chunkXLUYXUBDcjs.documentContents.call(void 0, { layers: psd.layers, globalLight: psd.globalLight, patterns: psd.patterns.length ? psd.patterns : void 0 }, psd.width, psd.height, _nullishCoalesce(source.name, () => ( `${layer.name || "Contents"}.psb`)));
5474
+ const psd = _chunkPMHPXCJCcjs.importPsd.call(void 0, source.psd, { newId: () => _chunkPMHPXCJCcjs.newLayerId.call(void 0, ) });
5475
+ contents = _chunkPMHPXCJCcjs.documentContents.call(void 0, { layers: psd.layers, globalLight: psd.globalLight, patterns: psd.patterns.length ? psd.patterns : void 0 }, psd.width, psd.height, _nullishCoalesce(source.name, () => ( `${layer.name || "Contents"}.psb`)));
5452
5476
  contents.file = { bytes: source.psd.slice(), type: psd.info.psb ? "psb" : "psd" };
5453
5477
  }
5454
- const res = _chunkXLUYXUBDcjs.replaceContents.call(void 0, this.state.layers, layer.contents.id, contents, this.canvasSize);
5478
+ const res = _chunkPMHPXCJCcjs.replaceContents.call(void 0, this.state.layers, layer.contents.id, contents, this.canvasSize);
5455
5479
  this.commitLayers(res.layers);
5456
5480
  return { contentsId: layer.contents.id, width: contents.width, height: contents.height, layerIds: res.ids };
5457
5481
  }
@@ -5466,16 +5490,16 @@ var ImageEditorController = (_class7 = class {
5466
5490
  * and bytes.
5467
5491
  */
5468
5492
  exportSmartObjectContents(id) {
5469
- const layer = _chunkXLUYXUBDcjs.requireSmartObject.call(void 0, this.state.layers, id);
5493
+ const layer = _chunkPMHPXCJCcjs.requireSmartObject.call(void 0, this.state.layers, id);
5470
5494
  const c = layer.contents;
5471
5495
  const base = c.name.replace(/\.\w+$/, "") || "Contents";
5472
5496
  if (c.file) {
5473
- const mime = { psd: "image/vnd.adobe.photoshop", psb: "image/vnd.adobe.photoshop", pdf: "application/pdf", ..._chunkXLUYXUBDcjs.BROWSER_IMAGE_TYPES };
5497
+ const mime = { psd: "image/vnd.adobe.photoshop", psb: "image/vnd.adobe.photoshop", pdf: "application/pdf", ..._chunkPMHPXCJCcjs.BROWSER_IMAGE_TYPES };
5474
5498
  const ext = c.file.type.toLowerCase();
5475
5499
  return { name: /\.\w+$/.test(c.name) ? c.name : `${base}.${ext}`, mimeType: _nullishCoalesce(mime[ext], () => ( "application/octet-stream")), bytes: c.file.bytes };
5476
5500
  }
5477
- if (!_chunkXLUYXUBDcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`The contents of "${layer.name || id}" are not available here.`);
5478
- const f = _chunkXLUYXUBDcjs.smartContentsFile.call(void 0, c);
5501
+ if (!_chunkPMHPXCJCcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`The contents of "${layer.name || id}" are not available here.`);
5502
+ const f = _chunkPMHPXCJCcjs.smartContentsFile.call(void 0, c);
5479
5503
  return { name: f.name, mimeType: f.name.endsWith(".png") ? "image/png" : "image/vnd.adobe.photoshop", bytes: f.bytes };
5480
5504
  }
5481
5505
  /**
@@ -5484,7 +5508,7 @@ var ImageEditorController = (_class7 = class {
5484
5508
  * undo step. Returns the copy's id.
5485
5509
  */
5486
5510
  copySmartObject(id, linked = false, name) {
5487
- const res = _chunkXLUYXUBDcjs.copySmartObject.call(void 0, this.state.layers, id, linked, name);
5511
+ const res = _chunkPMHPXCJCcjs.copySmartObject.call(void 0, this.state.layers, id, linked, name);
5488
5512
  this.commitLayers(res.layers, () => {
5489
5513
  this.state.activeLayerId = res.layer.id;
5490
5514
  this.state.activeTarget = "pixels";
@@ -5493,31 +5517,31 @@ var ImageEditorController = (_class7 = class {
5493
5517
  }
5494
5518
  /** Adds a smart filter (`develop` or `blur`, with `blend` and `opacity`) at `index` (default the top), as one undo step. */
5495
5519
  addSmartFilter(id, filter, index) {
5496
- const res = _chunkXLUYXUBDcjs.addSmartFilter.call(void 0, this.state.layers, id, _chunkXLUYXUBDcjs.normalizeSmartFilter.call(void 0, filter), this.canvasSize, index);
5520
+ const res = _chunkPMHPXCJCcjs.addSmartFilter.call(void 0, this.state.layers, id, _chunkPMHPXCJCcjs.normalizeSmartFilter.call(void 0, filter), this.canvasSize, index);
5497
5521
  this.commitLayers(res.layers);
5498
5522
  return res.filter;
5499
5523
  }
5500
5524
  /** Changes one smart filter (one undo step, or none with `commitToHistory = false` during a drag). */
5501
5525
  updateSmartFilter(id, filterId, changes, commitToHistory = true) {
5502
- const res = _chunkXLUYXUBDcjs.updateSmartFilter.call(void 0, this.state.layers, id, filterId, changes, this.canvasSize);
5526
+ const res = _chunkPMHPXCJCcjs.updateSmartFilter.call(void 0, this.state.layers, id, filterId, changes, this.canvasSize);
5503
5527
  this.commitLayers(res.layers, void 0, commitToHistory);
5504
5528
  return res.filter;
5505
5529
  }
5506
5530
  /** Removes one smart filter (one undo step). Returns the remaining filters. */
5507
5531
  removeSmartFilter(id, filterId) {
5508
- const res = _chunkXLUYXUBDcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
5532
+ const res = _chunkPMHPXCJCcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
5509
5533
  this.commitLayers(res.layers);
5510
5534
  return _nullishCoalesce(_optionalChain([res, 'access', _185 => _185.layer, 'access', _186 => _186.smartFilters, 'optionalAccess', _187 => _187.filters]), () => ( []));
5511
5535
  }
5512
5536
  /** Moves one smart filter to `index` (0 = bottom, applied first), as one undo step. Returns the filters. */
5513
5537
  moveSmartFilter(id, filterId, index) {
5514
- const res = _chunkXLUYXUBDcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
5538
+ const res = _chunkPMHPXCJCcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
5515
5539
  this.commitLayers(res.layers);
5516
5540
  return _nullishCoalesce(_optionalChain([res, 'access', _188 => _188.layer, 'access', _189 => _189.smartFilters, 'optionalAccess', _190 => _190.filters]), () => ( []));
5517
5541
  }
5518
5542
  /** Turns a smart object's whole filter stack on or off (one undo step). */
5519
5543
  setSmartFiltersEnabled(id, enabled) {
5520
- const res = _chunkXLUYXUBDcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
5544
+ const res = _chunkPMHPXCJCcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
5521
5545
  this.commitLayers(res.layers);
5522
5546
  return _nullishCoalesce(_optionalChain([res, 'access', _191 => _191.layer, 'access', _192 => _192.smartFilters, 'optionalAccess', _193 => _193.enabled]), () => ( true));
5523
5547
  }
@@ -5527,21 +5551,21 @@ var ImageEditorController = (_class7 = class {
5527
5551
  * Painting it targets channel `filter-mask`. Returns the mask, or `null` when removed.
5528
5552
  */
5529
5553
  setSmartFilterMask(id, from, props = {}, commitToHistory = true) {
5530
- const layer = _chunkXLUYXUBDcjs.requireSmartObject.call(void 0, this.state.layers, id);
5554
+ const layer = _chunkPMHPXCJCcjs.requireSmartObject.call(void 0, this.state.layers, id);
5531
5555
  let mask;
5532
5556
  if (from === "none") mask = null;
5533
5557
  else if (from === "keep") {
5534
- if (!_optionalChain([layer, 'access', _194 => _194.smartFilters, 'optionalAccess', _195 => _195.mask])) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
5558
+ if (!_optionalChain([layer, 'access', _194 => _194.smartFilters, 'optionalAccess', _195 => _195.mask])) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
5535
5559
  mask = withMaskProps(layer.smartFilters.mask, props);
5536
5560
  } else if (from === "selection") {
5537
5561
  const sel = this.state.selection;
5538
- if (!_optionalChain([sel, 'optionalAccess', _196 => _196.bounds])) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
5562
+ if (!_optionalChain([sel, 'optionalAccess', _196 => _196.bounds])) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
5539
5563
  mask = this.maskFromSelection(sel, props);
5540
5564
  } else {
5541
5565
  const v = from === "reveal-all" ? 255 : 0;
5542
5566
  mask = withMaskProps({ surface: _chunkJ5BA3BQ6cjs.emptySurface.call(void 0, 1, v), defaultValue: v }, props);
5543
5567
  }
5544
- const res = _chunkXLUYXUBDcjs.setSmartFilterMask.call(void 0, this.state.layers, id, mask, this.canvasSize);
5568
+ const res = _chunkPMHPXCJCcjs.setSmartFilterMask.call(void 0, this.state.layers, id, mask, this.canvasSize);
5545
5569
  this.commitLayers(res.layers, () => {
5546
5570
  if (this.state.activeLayerId !== id) return;
5547
5571
  if (mask && from !== "keep") this.state.activeTarget = "filter-mask";
@@ -5557,14 +5581,14 @@ var ImageEditorController = (_class7 = class {
5557
5581
  async prepareSmartObjects() {
5558
5582
  const pending = /* @__PURE__ */ new Map();
5559
5583
  for (const l of _chunkMZXQTKUMcjs.flattenLayers.call(void 0, this.state.layers)) {
5560
- if (l.type === "smart" && !_chunkXLUYXUBDcjs.isContentsDecoded.call(void 0, l.contents) && l.contents.file && _chunkXLUYXUBDcjs.BROWSER_IMAGE_TYPES[l.contents.file.type]) pending.set(l.contents.id, l.contents);
5584
+ if (l.type === "smart" && !_chunkPMHPXCJCcjs.isContentsDecoded.call(void 0, l.contents) && l.contents.file && _chunkPMHPXCJCcjs.BROWSER_IMAGE_TYPES[l.contents.file.type]) pending.set(l.contents.id, l.contents);
5561
5585
  }
5562
5586
  const left = [];
5563
5587
  for (const [cid, c] of pending) {
5564
5588
  try {
5565
- const url = `data:${_chunkXLUYXUBDcjs.BROWSER_IMAGE_TYPES[c.file.type]};base64,${_chunkDCLJNVZScjs.bytesToBase64.call(void 0, c.file.bytes)}`;
5589
+ const url = `data:${_chunkPMHPXCJCcjs.BROWSER_IMAGE_TYPES[c.file.type]};base64,${_chunkDCLJNVZScjs.bytesToBase64.call(void 0, c.file.bytes)}`;
5566
5590
  const px2 = await this.decodeImage(url);
5567
- const decoded = { ...c, kind: "raster", raster: _chunkXLUYXUBDcjs.rasterContents.call(void 0, px2, c.name, cid).raster, width: px2.width, height: px2.height };
5591
+ const decoded = { ...c, kind: "raster", raster: _chunkPMHPXCJCcjs.rasterContents.call(void 0, px2, c.name, cid).raster, width: px2.width, height: px2.height };
5568
5592
  const swap = (layers) => {
5569
5593
  let out = layers;
5570
5594
  for (const l of _chunkMZXQTKUMcjs.flattenLayers.call(void 0, layers)) if (l.type === "smart" && l.contents.id === cid) out = _chunkMZXQTKUMcjs.mapLayer.call(void 0, out, l.id, (x) => ({ ...x, contents: decoded }));
@@ -5592,10 +5616,10 @@ var ImageEditorController = (_class7 = class {
5592
5616
  * Contents can nest. Returns the contents' size and layer ids.
5593
5617
  */
5594
5618
  editSmartObjectContents(id) {
5595
- if (this.getFreeTransform()) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
5596
- const layer = _chunkXLUYXUBDcjs.requireSmartObject.call(void 0, this.state.layers, id);
5619
+ if (this.getFreeTransform()) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
5620
+ const layer = _chunkPMHPXCJCcjs.requireSmartObject.call(void 0, this.state.layers, id);
5597
5621
  const c = layer.contents;
5598
- if (!_chunkXLUYXUBDcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _200 => _200.file, 'optionalAccess', _201 => _201.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
5622
+ if (!_chunkPMHPXCJCcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _200 => _200.file, 'optionalAccess', _201 => _201.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
5599
5623
  const saved = {
5600
5624
  state: { ...this.state },
5601
5625
  undo: this.undoStack,
@@ -5606,7 +5630,7 @@ var ImageEditorController = (_class7 = class {
5606
5630
  samplePixelsOverride: this.samplePixelsOverride,
5607
5631
  psdResolution: this.psdResolution
5608
5632
  };
5609
- const layers = c.kind === "document" ? c.document.layers : [{ type: "pixel", id: _chunkXLUYXUBDcjs.newLayerId.call(void 0, ), name: "Layer 0", visible: true, opacity: 1, blend: "normal", surface: c.raster, offset: { x: 0, y: 0 } }];
5633
+ const layers = c.kind === "document" ? c.document.layers : [{ type: "pixel", id: _chunkPMHPXCJCcjs.newLayerId.call(void 0, ), name: "Layer 0", visible: true, opacity: 1, blend: "normal", surface: c.raster, offset: { x: 0, y: 0 } }];
5610
5634
  this.contentsStack.push({ layerId: layer.id, contentsId: c.id, name: layer.name || c.name, saved });
5611
5635
  const s = this.state;
5612
5636
  this.state = {
@@ -5614,7 +5638,7 @@ var ImageEditorController = (_class7 = class {
5614
5638
  sourceUrl: null,
5615
5639
  imageDimensions: { width: c.width, height: c.height },
5616
5640
  crop: null,
5617
- transform: { ..._chunkXLUYXUBDcjs.DEFAULT_TRANSFORM_VALUES },
5641
+ transform: { ..._chunkPMHPXCJCcjs.DEFAULT_TRANSFORM_VALUES },
5618
5642
  layers,
5619
5643
  activeLayerId: layers.length ? layers[layers.length - 1].id : null,
5620
5644
  activeTarget: "pixels",
@@ -5647,7 +5671,7 @@ var ImageEditorController = (_class7 = class {
5647
5671
  */
5648
5672
  closeSmartObjectContents(save = true) {
5649
5673
  const top = this.contentsStack.pop();
5650
- if (!top) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
5674
+ if (!top) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
5651
5675
  if (_optionalChain([this, 'access', _207 => _207.openTransform, 'optionalAccess', _208 => _208.isOpen])) this.openTransform.cancel();
5652
5676
  this.openTransform = null;
5653
5677
  const edited = this.state;
@@ -5661,10 +5685,10 @@ var ImageEditorController = (_class7 = class {
5661
5685
  const plain3 = _optionalChain([only, 'optionalAccess', _211 => _211.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _212 => _212.filters, 'optionalAccess', _213 => _213.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
5662
5686
  if (_optionalChain([old, 'optionalAccess', _214 => _214.kind]) === "raster" && plain3) {
5663
5687
  const px2 = _chunkJ5BA3BQ6cjs.readRegion.call(void 0, only.surface, { x: -only.offset.x, y: -only.offset.y, width, height });
5664
- next = _chunkXLUYXUBDcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
5688
+ next = _chunkPMHPXCJCcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
5665
5689
  } else {
5666
5690
  const doc = { layers: edited.layers, globalLight: edited.globalLight, patterns: edited.patterns };
5667
- next = _chunkXLUYXUBDcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _215 => _215.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _216 => _216.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
5691
+ next = _chunkPMHPXCJCcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _215 => _215.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _216 => _216.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
5668
5692
  }
5669
5693
  }
5670
5694
  const saved = top.saved;
@@ -5683,7 +5707,7 @@ var ImageEditorController = (_class7 = class {
5683
5707
  this.notify();
5684
5708
  return { layerId: top.layerId, changed: false, layerIds: [] };
5685
5709
  }
5686
- const res = _chunkXLUYXUBDcjs.replaceContents.call(void 0, this.state.layers, top.contentsId, next, this.canvasSize);
5710
+ const res = _chunkPMHPXCJCcjs.replaceContents.call(void 0, this.state.layers, top.contentsId, next, this.canvasSize);
5687
5711
  this.commitLayers(res.layers);
5688
5712
  return { layerId: top.layerId, changed: true, layerIds: res.ids };
5689
5713
  }
@@ -5698,35 +5722,35 @@ var ImageEditorController = (_class7 = class {
5698
5722
  // --- Layer effects ---
5699
5723
  /** A layer's effects (an empty, enabled list when it has none). */
5700
5724
  getLayerEffects(id) {
5701
- return _chunkXLUYXUBDcjs.layerEffectsOf.call(void 0, _chunkXLUYXUBDcjs.requireLayer.call(void 0, this.state.layers, id).layer);
5725
+ return _chunkPMHPXCJCcjs.layerEffectsOf.call(void 0, _chunkPMHPXCJCcjs.requireLayer.call(void 0, this.state.layers, id).layer);
5702
5726
  }
5703
5727
  /**
5704
5728
  * Adds an effect of `kind` with Photoshop's defaults and `params` applied (one undo step), at
5705
5729
  * `index` in the layer's effect list (default the end). Returns the new effect and the effects.
5706
5730
  */
5707
5731
  addLayerEffect(id, kind, params = {}, index) {
5708
- const res = _chunkXLUYXUBDcjs.addLayerEffect.call(void 0, this.state.layers, id, kind, params, index);
5732
+ const res = _chunkPMHPXCJCcjs.addLayerEffect.call(void 0, this.state.layers, id, kind, params, index);
5709
5733
  this.commitLayers(res.layers);
5710
5734
  return { effect: res.effect, effects: this.getLayerEffects(id) };
5711
5735
  }
5712
5736
  /** Changes one effect (one undo step, or none with `commitToHistory = false` during a drag). Returns the effects. */
5713
5737
  updateLayerEffect(id, effectId, changes, commitToHistory = true) {
5714
- this.commitLayers(_chunkXLUYXUBDcjs.updateLayerEffect.call(void 0, this.state.layers, id, effectId, changes), void 0, commitToHistory);
5738
+ this.commitLayers(_chunkPMHPXCJCcjs.updateLayerEffect.call(void 0, this.state.layers, id, effectId, changes), void 0, commitToHistory);
5715
5739
  return this.getLayerEffects(id);
5716
5740
  }
5717
5741
  /** Removes one effect (one undo step). Returns the remaining effects. */
5718
5742
  removeLayerEffect(id, effectId) {
5719
- this.commitLayers(_chunkXLUYXUBDcjs.removeLayerEffect.call(void 0, this.state.layers, id, effectId));
5743
+ this.commitLayers(_chunkPMHPXCJCcjs.removeLayerEffect.call(void 0, this.state.layers, id, effectId));
5720
5744
  return this.getLayerEffects(id);
5721
5745
  }
5722
5746
  /** Turns a layer's effects on or off as a whole and, when given, sets Scale Effects (one undo step). */
5723
5747
  setLayerEffectsEnabled(id, enabled, scale, commitToHistory = true) {
5724
- this.commitLayers(_chunkXLUYXUBDcjs.setLayerEffectsEnabled.call(void 0, this.state.layers, id, enabled, scale), void 0, commitToHistory);
5748
+ this.commitLayers(_chunkPMHPXCJCcjs.setLayerEffectsEnabled.call(void 0, this.state.layers, id, enabled, scale), void 0, commitToHistory);
5725
5749
  return this.getLayerEffects(id);
5726
5750
  }
5727
5751
  /** Replaces a layer's effects (one undo step; `null` removes them). Returns the effects. */
5728
5752
  setLayerEffects(id, effects, commitToHistory = true) {
5729
- this.commitLayers(_chunkXLUYXUBDcjs.setLayerEffects.call(void 0, this.state.layers, id, effects), void 0, commitToHistory);
5753
+ this.commitLayers(_chunkPMHPXCJCcjs.setLayerEffects.call(void 0, this.state.layers, id, effects), void 0, commitToHistory);
5730
5754
  return this.getLayerEffects(id);
5731
5755
  }
5732
5756
  __init76() {this.patternIds = /* @__PURE__ */ new WeakMap()}
@@ -5752,8 +5776,8 @@ var ImageEditorController = (_class7 = class {
5752
5776
  /** Sets the global light (one undo step). `angle` -360..360°, `altitude` 0..90°. Returns it. */
5753
5777
  setGlobalLight(light, commitToHistory = true) {
5754
5778
  const next = { ...this.getGlobalLight(), ...light };
5755
- if (!(Number.isFinite(next.angle) && next.angle >= -360 && next.angle <= 360)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`angle must be from -360 to 360 degrees, got ${next.angle}.`);
5756
- if (!(Number.isFinite(next.altitude) && next.altitude >= 0 && next.altitude <= 90)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`altitude must be from 0 to 90 degrees, got ${next.altitude}.`);
5779
+ if (!(Number.isFinite(next.angle) && next.angle >= -360 && next.angle <= 360)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`angle must be from -360 to 360 degrees, got ${next.angle}.`);
5780
+ if (!(Number.isFinite(next.altitude) && next.altitude >= 0 && next.altitude <= 90)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`altitude must be from 0 to 90 degrees, got ${next.altitude}.`);
5757
5781
  if (commitToHistory) this.recordHistory();
5758
5782
  if (next.angle === _chunkMZXQTKUMcjs.DEFAULT_GLOBAL_LIGHT.angle && next.altitude === _chunkMZXQTKUMcjs.DEFAULT_GLOBAL_LIGHT.altitude) delete this.state.globalLight;
5759
5783
  else this.state.globalLight = next;
@@ -5764,16 +5788,16 @@ var ImageEditorController = (_class7 = class {
5764
5788
  async compositeToSurface(layers, rect) {
5765
5789
  const { width, height } = this.naturalSize;
5766
5790
  if (_chunkMZXQTKUMcjs.flattenLayers.call(void 0, layers).some((l) => l.type === "annotation" && l.visible) && !this.renderer.canRasterize()) {
5767
- throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Merging annotation layers needs a canvas (a browser); hide or delete them first, or merge in the browser.");
5791
+ throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Merging annotation layers needs a canvas (a browser); hide or delete them first, or merge in the browser.");
5768
5792
  }
5769
5793
  await this.renderer.prepareLayerAssets(layers, width, height);
5770
5794
  const sources = this.renderer.compositorSources(width, height);
5771
5795
  const depth = this.bitDepth;
5772
5796
  if (depth !== 8) {
5773
- const samples = _chunkMZXQTKUMcjs.workingToSamples.call(void 0, _chunkXLUYXUBDcjs.compositeDeep.call(void 0, layers, rect, sources, depth), depth);
5797
+ const samples = _chunkMZXQTKUMcjs.workingToSamples.call(void 0, _chunkPMHPXCJCcjs.compositeDeep.call(void 0, layers, rect, sources, depth), depth);
5774
5798
  return _chunkJ5BA3BQ6cjs.surfaceFromDeepPixels.call(void 0, { width: rect.width, height: rect.height, data: samples }, 4, rect.x, rect.y);
5775
5799
  }
5776
- const data = new (0, _chunkXLUYXUBDcjs.LayerCompositor)().composite(layers, rect, sources);
5800
+ const data = new (0, _chunkPMHPXCJCcjs.LayerCompositor)().composite(layers, rect, sources);
5777
5801
  return _chunkJ5BA3BQ6cjs.surfaceFromPixels.call(void 0, { width: rect.width, height: rect.height, data }, 4, rect.x, rect.y);
5778
5802
  }
5779
5803
  /**
@@ -5786,22 +5810,22 @@ var ImageEditorController = (_class7 = class {
5786
5810
  const r = _nullishCoalesce(rect, () => ( { x: 0, y: 0, width, height }));
5787
5811
  const depth = this.bitDepth;
5788
5812
  if (depth === 8) return { width: r.width, height: r.height, depth: 16, data: _chunkJ5BA3BQ6cjs.to16From8.call(void 0, this.compositePixels(r).data) };
5789
- const data = _chunkMZXQTKUMcjs.workingToSamples.call(void 0, _chunkXLUYXUBDcjs.compositeDeep.call(void 0, this.state.layers, r, this.compositorSources(), depth), depth);
5813
+ const data = _chunkMZXQTKUMcjs.workingToSamples.call(void 0, _chunkPMHPXCJCcjs.compositeDeep.call(void 0, this.state.layers, r, this.compositorSources(), depth), depth);
5790
5814
  return { width: r.width, height: r.height, depth, data };
5791
5815
  }
5792
5816
  /** Document bounds a layer can paint into (pixel content, annotations, or the canvas for the rest). */
5793
5817
  paintBounds(layer) {
5794
5818
  const { width, height } = this.naturalSize;
5795
5819
  const canvas = { x: 0, y: 0, width, height };
5796
- if (_chunkXLUYXUBDcjs.hasSurface.call(void 0, layer)) return _nullishCoalesce(this.getLayerBounds(layer.id), () => ( { x: 0, y: 0, width: 0, height: 0 }));
5820
+ if (_chunkPMHPXCJCcjs.hasSurface.call(void 0, layer)) return _nullishCoalesce(this.getLayerBounds(layer.id), () => ( { x: 0, y: 0, width: 0, height: 0 }));
5797
5821
  if (layer.type === "annotation") {
5798
- const b = _chunkXLUYXUBDcjs.getAnnotationBounds.call(void 0, layer.annotation);
5822
+ const b = _chunkPMHPXCJCcjs.getAnnotationBounds.call(void 0, layer.annotation);
5799
5823
  const pad = 4 + ("strokeWidth" in layer.annotation ? layer.annotation.strokeWidth : 0);
5800
5824
  return coveringRect({ x: b.x - pad, y: b.y - pad, width: b.width + 2 * pad, height: b.height + 2 * pad });
5801
5825
  }
5802
5826
  if (layer.type === "group") {
5803
5827
  let r = null;
5804
- for (const c of layer.children) r = _chunkXLUYXUBDcjs.unionRect.call(void 0, r, this.paintBounds(c));
5828
+ for (const c of layer.children) r = _chunkPMHPXCJCcjs.unionRect.call(void 0, r, this.paintBounds(c));
5805
5829
  return _nullishCoalesce(r, () => ( canvas));
5806
5830
  }
5807
5831
  return canvas;
@@ -5812,16 +5836,16 @@ var ImageEditorController = (_class7 = class {
5812
5836
  * Returns the merged id.
5813
5837
  */
5814
5838
  async mergeDown(id) {
5815
- const loc = _chunkXLUYXUBDcjs.requireLayer.call(void 0, this.state.layers, id);
5839
+ const loc = _chunkPMHPXCJCcjs.requireLayer.call(void 0, this.state.layers, id);
5816
5840
  const upper = loc.layer;
5817
5841
  const siblings = loc.parent ? loc.parent.children : this.state.layers;
5818
5842
  const lower = siblings[loc.index - 1];
5819
- if (!lower) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Layer "${upper.name || id}" is the bottom of its group; there is nothing below to merge into.`);
5820
- if (lower.type !== "pixel") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Merge Down needs a pixel layer below; "${lower.name || lower.id}" is a ${lower.type} layer. Move the layer or merge into another one.`);
5821
- if (!upper.visible) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Layer "${upper.name || id}" is hidden; show it or delete it instead of merging.`);
5822
- _chunkXLUYXUBDcjs.requireUnlocked.call(void 0, upper, "all", "merge it");
5823
- _chunkXLUYXUBDcjs.requireUnlocked.call(void 0, lower, "pixels", "merge into it");
5824
- let rect = _nullishCoalesce(_chunkXLUYXUBDcjs.unionRect.call(void 0, this.paintBounds(lower), upper.type === "adjustment" ? null : this.paintBounds(upper)), () => ( { x: 0, y: 0, width: 1, height: 1 }));
5843
+ if (!lower) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Layer "${upper.name || id}" is the bottom of its group; there is nothing below to merge into.`);
5844
+ if (lower.type !== "pixel") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Merge Down needs a pixel layer below; "${lower.name || lower.id}" is a ${lower.type} layer. Move the layer or merge into another one.`);
5845
+ if (!upper.visible) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Layer "${upper.name || id}" is hidden; show it or delete it instead of merging.`);
5846
+ _chunkPMHPXCJCcjs.requireUnlocked.call(void 0, upper, "all", "merge it");
5847
+ _chunkPMHPXCJCcjs.requireUnlocked.call(void 0, lower, "pixels", "merge into it");
5848
+ let rect = _nullishCoalesce(_chunkPMHPXCJCcjs.unionRect.call(void 0, this.paintBounds(lower), upper.type === "adjustment" ? null : this.paintBounds(upper)), () => ( { x: 0, y: 0, width: 1, height: 1 }));
5825
5849
  const reach = Math.max(_chunkMZXQTKUMcjs.effectsMargin.call(void 0, lower.effects), upper.type === "adjustment" ? 0 : _chunkMZXQTKUMcjs.effectsMargin.call(void 0, upper.effects));
5826
5850
  if (reach) rect = { x: rect.x - reach, y: rect.y - reach, width: rect.width + 2 * reach, height: rect.height + 2 * reach };
5827
5851
  const base = { ...lower, blend: "normal", opacity: 1 };
@@ -5847,12 +5871,12 @@ var ImageEditorController = (_class7 = class {
5847
5871
  */
5848
5872
  async mergeVisible() {
5849
5873
  const visible = this.state.layers.filter((l) => l.visible);
5850
- if (!visible.length) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("No layer is visible.");
5874
+ if (!visible.length) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("No layer is visible.");
5851
5875
  const { width, height } = this.naturalSize;
5852
5876
  const surface = await this.compositeToSurface(visible, { x: 0, y: 0, width, height });
5853
5877
  const merged = {
5854
5878
  type: "pixel",
5855
- id: _chunkXLUYXUBDcjs.newLayerId.call(void 0, ),
5879
+ id: _chunkPMHPXCJCcjs.newLayerId.call(void 0, ),
5856
5880
  name: "Merged",
5857
5881
  visible: true,
5858
5882
  opacity: 1,
@@ -5876,8 +5900,8 @@ var ImageEditorController = (_class7 = class {
5876
5900
  const surface = await this.compositeToSurface(this.state.layers, { x: 0, y: 0, width, height });
5877
5901
  const bg = {
5878
5902
  type: "pixel",
5879
- id: _chunkXLUYXUBDcjs.BACKGROUND_LAYER_ID,
5880
- name: _chunkXLUYXUBDcjs.BACKGROUND_LAYER_NAME,
5903
+ id: _chunkPMHPXCJCcjs.BACKGROUND_LAYER_ID,
5904
+ name: _chunkPMHPXCJCcjs.BACKGROUND_LAYER_NAME,
5881
5905
  visible: true,
5882
5906
  opacity: 1,
5883
5907
  blend: "normal",
@@ -5904,7 +5928,7 @@ var ImageEditorController = (_class7 = class {
5904
5928
  const k = Math.min(1, side / Math.max(width, height));
5905
5929
  const tw = Math.max(1, Math.round(width * k));
5906
5930
  const th = Math.max(1, Math.round(height * k));
5907
- const surface = options.mask ? layer.mask && !layer.mask.source ? layer.mask.surface : null : _chunkXLUYXUBDcjs.hasSurface.call(void 0, layer) ? this.surfaceOf(layer) : null;
5931
+ const surface = options.mask ? layer.mask && !layer.mask.source ? layer.mask.surface : null : _chunkPMHPXCJCcjs.hasSurface.call(void 0, layer) ? this.surfaceOf(layer) : null;
5908
5932
  if (!surface) return null;
5909
5933
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
5910
5934
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
@@ -5999,7 +6023,7 @@ var ImageEditorController = (_class7 = class {
5999
6023
  * pixels. The next stroke fixes the offset from its first point. View state, no undo.
6000
6024
  */
6001
6025
  setCloneSource(point) {
6002
- if (point && (!Number.isFinite(point.x) || !Number.isFinite(point.y))) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("The clone source needs finite x and y (document pixels).");
6026
+ if (point && (!Number.isFinite(point.x) || !Number.isFinite(point.y))) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("The clone source needs finite x and y (document pixels).");
6003
6027
  const source = point ? { x: Math.round(point.x), y: Math.round(point.y), offset: null } : null;
6004
6028
  this.state.paint = { ...this.state.paint, cloneSource: source };
6005
6029
  this.notify();
@@ -6017,27 +6041,27 @@ var ImageEditorController = (_class7 = class {
6017
6041
  /** Resolves and validates what a stroke, fill or clear paints into. */
6018
6042
  paintTarget(layerId, channel, action) {
6019
6043
  const id = _nullishCoalesce(layerId, () => ( this.state.activeLayerId));
6020
- if (!id) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`No layer given and none is active; pass layerId (see list_layers) to ${action}.`);
6021
- const layer = _chunkXLUYXUBDcjs.requireLayer.call(void 0, this.state.layers, id).layer;
6044
+ if (!id) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`No layer given and none is active; pass layerId (see list_layers) to ${action}.`);
6045
+ const layer = _chunkPMHPXCJCcjs.requireLayer.call(void 0, this.state.layers, id).layer;
6022
6046
  const ch = _nullishCoalesce(channel, () => ( (id === this.state.activeLayerId ? this.state.activeTarget : "pixels")));
6023
6047
  if (ch === "mask") {
6024
- if (!layer.mask) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask to ${action}; add one with add_layer_mask, or target pixels.`);
6025
- if (layer.mask.source) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Layer "${layer.name || id}" has a depth mask, which is generated, not painted.`);
6026
- _chunkXLUYXUBDcjs.requireUnlocked.call(void 0, layer, "all", action);
6048
+ if (!layer.mask) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask to ${action}; add one with add_layer_mask, or target pixels.`);
6049
+ if (layer.mask.source) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Layer "${layer.name || id}" has a depth mask, which is generated, not painted.`);
6050
+ _chunkPMHPXCJCcjs.requireUnlocked.call(void 0, layer, "all", action);
6027
6051
  } else if (ch === "filter-mask") {
6028
6052
  if (layer.type !== "smart" || !_optionalChain([layer, 'access', _224 => _224.smartFilters, 'optionalAccess', _225 => _225.mask])) {
6029
- throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Layer "${layer.name || id}" has no smart filter mask to ${action}; add one with set_smart_filter_mask, or target pixels or mask.`);
6053
+ throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Layer "${layer.name || id}" has no smart filter mask to ${action}; add one with set_smart_filter_mask, or target pixels or mask.`);
6030
6054
  }
6031
- if (!_chunkXLUYXUBDcjs.isContentsDecoded.call(void 0, layer.contents)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`The contents of "${layer.name || id}" are not decoded here, so its filter mask cannot be painted; run prepareSmartObjects() first.`);
6032
- _chunkXLUYXUBDcjs.requireUnlocked.call(void 0, layer, "all", action);
6055
+ if (!_chunkPMHPXCJCcjs.isContentsDecoded.call(void 0, layer.contents)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`The contents of "${layer.name || id}" are not decoded here, so its filter mask cannot be painted; run prepareSmartObjects() first.`);
6056
+ _chunkPMHPXCJCcjs.requireUnlocked.call(void 0, layer, "all", action);
6033
6057
  } else {
6034
- if (layer.type === "smart") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Layer "${layer.name || id}" is a smart object; its pixels come from its contents. Rasterize it (rasterize_smart_object), edit its contents (edit_smart_object_contents), or ${action} on its mask or filter mask.`);
6035
- if (layer.type === "shape") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Layer "${layer.name || id}" is a shape layer; its pixels are drawn from its paths. Rasterize it first (rasterize_layer), or ${action} on its mask (channel mask).`);
6036
- if (layer.type === "type") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Layer "${layer.name || id}" is a type layer; its pixels are drawn from its text. Rasterize it first (rasterize_layer), or ${action} on its mask (channel mask).`);
6037
- if (layer.type !== "pixel") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Layer "${layer.name || id}" is a ${layer.type} layer; ${action} on a pixel layer, or on this layer's mask (channel mask).`);
6038
- _chunkXLUYXUBDcjs.requireUnlocked.call(void 0, layer, "pixels", action);
6058
+ if (layer.type === "smart") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Layer "${layer.name || id}" is a smart object; its pixels come from its contents. Rasterize it (rasterize_smart_object), edit its contents (edit_smart_object_contents), or ${action} on its mask or filter mask.`);
6059
+ if (layer.type === "shape") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Layer "${layer.name || id}" is a shape layer; its pixels are drawn from its paths. Rasterize it first (rasterize_layer), or ${action} on its mask (channel mask).`);
6060
+ if (layer.type === "type") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Layer "${layer.name || id}" is a type layer; its pixels are drawn from its text. Rasterize it first (rasterize_layer), or ${action} on its mask (channel mask).`);
6061
+ if (layer.type !== "pixel") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Layer "${layer.name || id}" is a ${layer.type} layer; ${action} on a pixel layer, or on this layer's mask (channel mask).`);
6062
+ _chunkPMHPXCJCcjs.requireUnlocked.call(void 0, layer, "pixels", action);
6039
6063
  }
6040
- if (!layer.visible) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Layer "${layer.name || id}" is hidden; show it before you ${action}.`);
6064
+ if (!layer.visible) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Layer "${layer.name || id}" is hidden; show it before you ${action}.`);
6041
6065
  const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
6042
6066
  const surface = ch === "mask" ? layer.mask.surface : ch === "filter-mask" ? layer.smartFilters.mask.surface : this.surfaceOf(layer);
6043
6067
  const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _226 => _226.locks, 'optionalAccess', _227 => _227.transparency]));
@@ -6046,7 +6070,7 @@ var ImageEditorController = (_class7 = class {
6046
6070
  /** The layer with its pixels (or mask) replaced by `surface`. */
6047
6071
  withSurface(layer, channel, surface) {
6048
6072
  if (channel === "mask") return { ...layer, mask: { ...layer.mask, surface } };
6049
- if (channel === "filter-mask") return _chunkXLUYXUBDcjs.withFilterMaskSurface.call(void 0, layer, surface, this.canvasSize);
6073
+ if (channel === "filter-mask") return _chunkPMHPXCJCcjs.withFilterMaskSurface.call(void 0, layer, surface, this.canvasSize);
6050
6074
  const next = { ...layer, surface };
6051
6075
  delete next.source;
6052
6076
  return next;
@@ -6059,10 +6083,10 @@ var ImageEditorController = (_class7 = class {
6059
6083
  */
6060
6084
  beginStroke(init = {}) {
6061
6085
  const tool = _nullishCoalesce(init.tool, () => ( "brush"));
6062
- if (!STROKE_TOOLS.includes(tool)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Unknown paint tool "${String(tool)}"; use one of ${STROKE_TOOLS.join(", ")}.`);
6086
+ if (!STROKE_TOOLS.includes(tool)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Unknown paint tool "${String(tool)}"; use one of ${STROKE_TOOLS.join(", ")}.`);
6063
6087
  const target = this.paintTarget(init.layerId, init.channel, tool === "eraser" ? "erase" : isRetouchTool(tool) ? "retouch" : "paint");
6064
6088
  if (tool === "mixer" && target.channel !== "pixels") {
6065
- throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("The Mixer Brush paints colour on pixels, not on masks; target pixels (channel pixels), or paint the mask with the brush.");
6089
+ throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("The Mixer Brush paints colour on pixels, not on masks; target pixels (channel pixels), or paint the mask with the brush.");
6066
6090
  }
6067
6091
  const brush = _chunk6GFRKLLScjs.normalizeBrush.call(void 0, { ...this.state.paint.brush, ..._nullishCoalesce(init.brush, () => ( {})) });
6068
6092
  let strokePaint = null;
@@ -6096,7 +6120,7 @@ var ImageEditorController = (_class7 = class {
6096
6120
  retouchStroke(tool, init, brush, target, apply) {
6097
6121
  const settings = _chunkW6M7C7R3cjs.normalizeRetouch.call(void 0, _nullishCoalesce(init.retouch, () => ( {})), this.state.paint.retouch);
6098
6122
  const mask = target.channel !== "pixels";
6099
- if (tool === "sponge" && mask) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("The Sponge changes saturation, and a mask has none; target pixels (channel pixels), or use dodge or burn on the mask.");
6123
+ if (tool === "sponge" && mask) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("The Sponge changes saturation, and a mask has none; target pixels (channel pixels), or use dodge or burn on the mask.");
6100
6124
  if (tool === "smudge") return { kind: "dabs", create: (pixels) => new (0, _chunkW6M7C7R3cjs.RetouchDabStroke)(brush, pixels, _chunkW6M7C7R3cjs.smudgeEffect.call(void 0, brush, settings.strength)) };
6101
6125
  if (tool === "sponge") return { kind: "dabs", create: (pixels) => new (0, _chunkW6M7C7R3cjs.RetouchDabStroke)(brush, pixels, _chunkW6M7C7R3cjs.spongeEffect.call(void 0, brush, settings.spongeMode === "saturate", settings.vibrance)) };
6102
6126
  const retouchApply = {
@@ -6149,7 +6173,7 @@ var ImageEditorController = (_class7 = class {
6149
6173
  }
6150
6174
  if (init.source) this.setCloneSource(init.source);
6151
6175
  const cs = this.state.paint.cloneSource;
6152
- if (!cs) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`The ${tool === "clone" ? "Clone Stamp" : "Healing Brush"} needs a source point; Alt-click the canvas, call set_clone_source, or pass source { x, y }.`);
6176
+ if (!cs) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`The ${tool === "clone" ? "Clone Stamp" : "Healing Brush"} needs a source point; Alt-click the canvas, call set_clone_source, or pass source { x, y }.`);
6153
6177
  let offset = { x: 0, y: 0 };
6154
6178
  let first = { x: 0, y: 0 };
6155
6179
  const paint = () => ({ kind: "source", source, dx: offset.x, dy: offset.y });
@@ -6184,7 +6208,7 @@ var ImageEditorController = (_class7 = class {
6184
6208
  const sources = this.compositorSources();
6185
6209
  if (depth) {
6186
6210
  return new (0, _chunkW6M7C7R3cjs.TilePixelSource)((tx, ty) => {
6187
- const w = _chunkXLUYXUBDcjs.compositeDeep.call(void 0, layers, { x: tx * _chunkJ5BA3BQ6cjs.TILE, y: ty * _chunkJ5BA3BQ6cjs.TILE, width: _chunkJ5BA3BQ6cjs.TILE, height: _chunkJ5BA3BQ6cjs.TILE }, sources, depth);
6211
+ const w = _chunkPMHPXCJCcjs.compositeDeep.call(void 0, layers, { x: tx * _chunkJ5BA3BQ6cjs.TILE, y: ty * _chunkJ5BA3BQ6cjs.TILE, width: _chunkJ5BA3BQ6cjs.TILE, height: _chunkJ5BA3BQ6cjs.TILE }, sources, depth);
6188
6212
  for (let i = 0; i < w.length; i += 4) {
6189
6213
  if (depth === 32) for (let c = 0; c < 3; c++) w[i + c] = _chunkJ5BA3BQ6cjs.srgbEncode.call(void 0, w[i + c]);
6190
6214
  for (let c = 0; c < 4; c++) w[i + c] *= 255;
@@ -6192,7 +6216,7 @@ var ImageEditorController = (_class7 = class {
6192
6216
  return w;
6193
6217
  }, 4);
6194
6218
  }
6195
- const compositor = new (0, _chunkXLUYXUBDcjs.LayerCompositor)();
6219
+ const compositor = new (0, _chunkPMHPXCJCcjs.LayerCompositor)();
6196
6220
  return new (0, _chunkW6M7C7R3cjs.TilePixelSource)((tx, ty) => compositor.tile(layers, tx, ty, sources), 4);
6197
6221
  }
6198
6222
  /** A Mixer Brush stroke's start: the settings, and the load (refilled when asked or set to). */
@@ -6242,9 +6266,9 @@ var ImageEditorController = (_class7 = class {
6242
6266
  * document bounds and the number of dabs.
6243
6267
  */
6244
6268
  paintStroke(init) {
6245
- if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("points must hold at least one { x, y } point.");
6269
+ if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("points must hold at least one { x, y } point.");
6246
6270
  for (const p of init.points) {
6247
- if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _236 => _236.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _237 => _237.y]))) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
6271
+ if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _236 => _236.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _237 => _237.y]))) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
6248
6272
  }
6249
6273
  const session = this.beginStroke(init);
6250
6274
  session.push(init.points);
@@ -6270,8 +6294,8 @@ var ImageEditorController = (_class7 = class {
6270
6294
  const target = this.paintTarget(options.layerId, options.channel, mode === "paint" ? "fill" : "clear");
6271
6295
  const { width, height } = this.naturalSize;
6272
6296
  const opacity = _nullishCoalesce(options.opacity, () => ( 1));
6273
- if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("opacity must be from 0 to 1.");
6274
- const blend = _nullishCoalesce(_chunkXLUYXUBDcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
6297
+ if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("opacity must be from 0 to 1.");
6298
+ const blend = _nullishCoalesce(_chunkPMHPXCJCcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
6275
6299
  const sel = options.useSelection !== false && _optionalChain([this, 'access', _238 => _238.state, 'access', _239 => _239.selection, 'optionalAccess', _240 => _240.bounds]) ? this.state.selection : null;
6276
6300
  const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _241 => _241.bounds]), () => ( { x: 0, y: 0, width, height }));
6277
6301
  const coverage = new (0, _chunk6GFRKLLScjs.CoverageMap)();
@@ -6307,7 +6331,7 @@ var ImageEditorController = (_class7 = class {
6307
6331
  // --- Adjustments ---
6308
6332
  /** The pixel layer the base sliders edit: the active pixel layer, else the Background. */
6309
6333
  developLayer() {
6310
- return _chunkXLUYXUBDcjs.developTarget.call(void 0, this.state.layers, this.state.activeLayerId);
6334
+ return _chunkPMHPXCJCcjs.developTarget.call(void 0, this.state.layers, this.state.activeLayerId);
6311
6335
  }
6312
6336
  /**
6313
6337
  * Sets base adjustment values as one undo step (unless `commitToHistory` is false). The base
@@ -6333,7 +6357,7 @@ var ImageEditorController = (_class7 = class {
6333
6357
  this.state.outputOpacity = Math.min(1, Math.max(0, partial.opacity));
6334
6358
  }
6335
6359
  if ("layers" in partial) {
6336
- layers = this.replaceAdjustmentNodes(layers, _chunkXLUYXUBDcjs.normalizeAdjustmentLayers.call(void 0, partial.layers));
6360
+ layers = this.replaceAdjustmentNodes(layers, _chunkPMHPXCJCcjs.normalizeAdjustmentLayers.call(void 0, partial.layers));
6337
6361
  }
6338
6362
  this.state.layers = layers;
6339
6363
  this.notify();
@@ -6341,7 +6365,7 @@ var ImageEditorController = (_class7 = class {
6341
6365
  /** True when the adjustments use an older rendering process than {@link LATEST_PROCESS_VERSION}. */
6342
6366
  get isProcessOutdated() {
6343
6367
  this.syncViews();
6344
- return _chunkXLUYXUBDcjs.normalizeProcessVersion.call(void 0, this.state.adjustments.process) < _chunkXLUYXUBDcjs.LATEST_PROCESS_VERSION;
6368
+ return _chunkPMHPXCJCcjs.normalizeProcessVersion.call(void 0, this.state.adjustments.process) < _chunkPMHPXCJCcjs.LATEST_PROCESS_VERSION;
6345
6369
  }
6346
6370
  /**
6347
6371
  * Update to Current Process: re-interprets the current adjustment values with the latest
@@ -6349,7 +6373,7 @@ var ImageEditorController = (_class7 = class {
6349
6373
  */
6350
6374
  upgradeProcess() {
6351
6375
  if (!this.isProcessOutdated) return false;
6352
- this.setAdjustments({ process: _chunkXLUYXUBDcjs.LATEST_PROCESS_VERSION });
6376
+ this.setAdjustments({ process: _chunkPMHPXCJCcjs.LATEST_PROCESS_VERSION });
6353
6377
  return true;
6354
6378
  }
6355
6379
  /** Resets the base sliders (latest process). Adjustment layers are kept; see `clearAdjustmentLayers`. */
@@ -6360,7 +6384,7 @@ var ImageEditorController = (_class7 = class {
6360
6384
  this.state.layers = _chunkMZXQTKUMcjs.mapLayer.call(void 0,
6361
6385
  this.state.layers,
6362
6386
  target.id,
6363
- (l) => withBlur(withDevelop(l, { ...DEFAULT_ADJUSTMENTS, process: _chunkXLUYXUBDcjs.LATEST_PROCESS_VERSION }), 0)
6387
+ (l) => withBlur(withDevelop(l, { ...DEFAULT_ADJUSTMENTS, process: _chunkPMHPXCJCcjs.LATEST_PROCESS_VERSION }), 0)
6364
6388
  );
6365
6389
  }
6366
6390
  delete this.state.legacyOutputBlur;
@@ -6424,7 +6448,7 @@ var ImageEditorController = (_class7 = class {
6424
6448
  const existing = new Set(this.adjustmentNodes(out).map((n) => n.id));
6425
6449
  for (const l of next) {
6426
6450
  if (existing.has(l.id)) continue;
6427
- out = this.placeLayer(out, _chunkXLUYXUBDcjs.adjustmentNodeFromLegacy.call(void 0, l, width, height), { adjustmentIndex: Infinity });
6451
+ out = this.placeLayer(out, _chunkPMHPXCJCcjs.adjustmentNodeFromLegacy.call(void 0, l, width, height), { adjustmentIndex: Infinity });
6428
6452
  }
6429
6453
  const order = next.map((l) => l.id);
6430
6454
  for (let to = 0; to < order.length; to++) out = this.moveAdjustmentNode(out, order[to], to);
@@ -6439,7 +6463,7 @@ var ImageEditorController = (_class7 = class {
6439
6463
  addAdjustmentLayer(init, index) {
6440
6464
  const spec = typeof init === "string" ? { kind: init } : init;
6441
6465
  const ids = new Set(_chunkMZXQTKUMcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
6442
- const layer = _chunkXLUYXUBDcjs.createAdjustmentLayer.call(void 0, spec.kind, {
6466
+ const layer = _chunkPMHPXCJCcjs.createAdjustmentLayer.call(void 0, spec.kind, {
6443
6467
  id: spec.id && !ids.has(spec.id) ? spec.id : void 0,
6444
6468
  name: spec.name,
6445
6469
  params: spec.params,
@@ -6448,10 +6472,10 @@ var ImageEditorController = (_class7 = class {
6448
6472
  blend: spec.blend,
6449
6473
  mask: _nullishCoalesce(spec.mask, () => ( void 0))
6450
6474
  });
6451
- while (ids.has(layer.id)) layer.id = _chunkXLUYXUBDcjs.newLayerId.call(void 0, "adj");
6475
+ while (ids.has(layer.id)) layer.id = _chunkPMHPXCJCcjs.newLayerId.call(void 0, "adj");
6452
6476
  const { width, height } = this.naturalSize;
6453
6477
  this.recordHistory();
6454
- const node = _chunkXLUYXUBDcjs.adjustmentNodeFromLegacy.call(void 0, layer, width, height);
6478
+ const node = _chunkPMHPXCJCcjs.adjustmentNodeFromLegacy.call(void 0, layer, width, height);
6455
6479
  const positioned = Boolean(spec.aboveId || spec.parentId);
6456
6480
  this.state.layers = this.placeLayer(this.state.layers, node, {
6457
6481
  aboveId: spec.aboveId,
@@ -6471,7 +6495,7 @@ var ImageEditorController = (_class7 = class {
6471
6495
  if (!loc || loc.layer.type !== "adjustment") return false;
6472
6496
  const { width, height } = this.naturalSize;
6473
6497
  const node = loc.layer;
6474
- const merged = _chunkXLUYXUBDcjs.normalizeAdjustmentLayer.call(void 0, {
6498
+ const merged = _chunkPMHPXCJCcjs.normalizeAdjustmentLayer.call(void 0, {
6475
6499
  id: node.id,
6476
6500
  kind: node.kind,
6477
6501
  enabled: _nullishCoalesce(update.enabled, () => ( node.visible)),
@@ -6491,7 +6515,7 @@ var ImageEditorController = (_class7 = class {
6491
6515
  params: merged.params
6492
6516
  };
6493
6517
  if (update.mask !== void 0) {
6494
- const mask = update.mask ? _chunkXLUYXUBDcjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height) : null;
6518
+ const mask = update.mask ? _chunkPMHPXCJCcjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height) : null;
6495
6519
  if (mask) next.mask = mask;
6496
6520
  else delete next.mask;
6497
6521
  }
@@ -6578,8 +6602,8 @@ var ImageEditorController = (_class7 = class {
6578
6602
  const { width, height } = this.naturalSize;
6579
6603
  let next = null;
6580
6604
  if (mask) {
6581
- const sized = mask.width === width && mask.height === height ? mask : _chunkXLUYXUBDcjs.resizeSelection.call(void 0, mask, width, height);
6582
- next = _chunkXLUYXUBDcjs.combineSelections.call(void 0, this.state.selection, sized, mode);
6605
+ const sized = mask.width === width && mask.height === height ? mask : _chunkPMHPXCJCcjs.resizeSelection.call(void 0, mask, width, height);
6606
+ next = _chunkPMHPXCJCcjs.combineSelections.call(void 0, this.state.selection, sized, mode);
6583
6607
  } else if (mode !== "replace") {
6584
6608
  return false;
6585
6609
  }
@@ -6593,7 +6617,7 @@ var ImageEditorController = (_class7 = class {
6593
6617
  /** Select › All. */
6594
6618
  selectAll() {
6595
6619
  const { width, height } = this.naturalSize;
6596
- return this.setSelection(_chunkXLUYXUBDcjs.fullSelection.call(void 0, width, height));
6620
+ return this.setSelection(_chunkPMHPXCJCcjs.fullSelection.call(void 0, width, height));
6597
6621
  }
6598
6622
  /** Select › Deselect. */
6599
6623
  deselect() {
@@ -6602,11 +6626,11 @@ var ImageEditorController = (_class7 = class {
6602
6626
  /** Select › Inverse (with nothing selected, selects everything). */
6603
6627
  invertSelection() {
6604
6628
  const { width, height } = this.naturalSize;
6605
- const current = _nullishCoalesce(this.state.selection, () => ( _chunkXLUYXUBDcjs.createSelectionMask.call(void 0, width, height)));
6606
- return this.setSelection(_chunkXLUYXUBDcjs.invertSelection.call(void 0, current));
6629
+ const current = _nullishCoalesce(this.state.selection, () => ( _chunkPMHPXCJCcjs.createSelectionMask.call(void 0, width, height)));
6630
+ return this.setSelection(_chunkPMHPXCJCcjs.invertSelection.call(void 0, current));
6607
6631
  }
6608
6632
  shapeCommand(mask, options) {
6609
- const shaped = options.feather && options.feather > 0 ? _chunkXLUYXUBDcjs.modifySelection.call(void 0, mask, "feather", options.feather) : mask;
6633
+ const shaped = options.feather && options.feather > 0 ? _chunkPMHPXCJCcjs.modifySelection.call(void 0, mask, "feather", options.feather) : mask;
6610
6634
  return this.setSelection(shaped, _nullishCoalesce(options.mode, () => ( "replace")));
6611
6635
  }
6612
6636
  /** Rectangular marquee in natural image pixels. */
@@ -6660,11 +6684,11 @@ var ImageEditorController = (_class7 = class {
6660
6684
  if (!this.samplePixelsOverride && !options.pixels) this.samplePixels = null;
6661
6685
  return null;
6662
6686
  }
6663
- const legacy = _chunkXLUYXUBDcjs.legacyView.call(void 0, this.stack(), width, height, null).exact;
6687
+ const legacy = _chunkPMHPXCJCcjs.legacyView.call(void 0, this.stack(), width, height, null).exact;
6664
6688
  if (options.sample === "active-layer") {
6665
6689
  const layer = this.getActiveLayer();
6666
6690
  if (!layer || layer.type !== "pixel") {
6667
- throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Sampling the active layer needs an active pixel layer; select one, or sample the composite.");
6691
+ throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Sampling the active layer needs an active pixel layer; select one, or sample the composite.");
6668
6692
  }
6669
6693
  const surface = layer.source === "document" && options.pixels ? _chunkJ5BA3BQ6cjs.surfaceFromPixels.call(void 0, options.pixels, 4) : this.surfaceOf(layer);
6670
6694
  return { width, height, data: _chunkJ5BA3BQ6cjs.readRegion.call(void 0, surface, { x: -layer.offset.x, y: -layer.offset.y, width, height }) };
@@ -6673,7 +6697,7 @@ var ImageEditorController = (_class7 = class {
6673
6697
  this.syncViews();
6674
6698
  if (legacy && !options.pixels) {
6675
6699
  const copy = { width: base.width, height: base.height, data: new Uint8ClampedArray(base.data) };
6676
- _chunkXLUYXUBDcjs.applyAdjustments.call(void 0, copy, _chunkXLUYXUBDcjs.legacyView.call(void 0, this.stack(), width, height, null).adjustments);
6700
+ _chunkPMHPXCJCcjs.applyAdjustments.call(void 0, copy, _chunkPMHPXCJCcjs.legacyView.call(void 0, this.stack(), width, height, null).adjustments);
6677
6701
  return copy;
6678
6702
  }
6679
6703
  const pixels = options.pixels;
@@ -6685,7 +6709,7 @@ var ImageEditorController = (_class7 = class {
6685
6709
  };
6686
6710
  const stack = withoutAnnotations(this.state.layers);
6687
6711
  const layers = options.sampleMerged ? stack : pixelsOnly(stack);
6688
- const data = new (0, _chunkXLUYXUBDcjs.LayerCompositor)().composite(layers, { x: 0, y: 0, width, height }, sources);
6712
+ const data = new (0, _chunkPMHPXCJCcjs.LayerCompositor)().composite(layers, { x: 0, y: 0, width, height }, sources);
6689
6713
  return { width, height, data };
6690
6714
  }
6691
6715
  async requirePixels(options) {
@@ -6712,7 +6736,7 @@ var ImageEditorController = (_class7 = class {
6712
6736
  modifySelection(op, radius) {
6713
6737
  const sel = this.state.selection;
6714
6738
  if (!_optionalChain([sel, 'optionalAccess', _255 => _255.bounds])) return false;
6715
- return this.setSelection(_chunkXLUYXUBDcjs.modifySelection.call(void 0, sel, op, radius));
6739
+ return this.setSelection(_chunkPMHPXCJCcjs.modifySelection.call(void 0, sel, op, radius));
6716
6740
  }
6717
6741
  /**
6718
6742
  * Refine Edge: snaps the selection (e.g. a coarse AI mask loaded with `loadSelectionFromImage`)
@@ -6743,7 +6767,7 @@ var ImageEditorController = (_class7 = class {
6743
6767
  } else {
6744
6768
  pixels = source;
6745
6769
  }
6746
- this.setSelection(_chunkXLUYXUBDcjs.selectionFromPixels.call(void 0, pixels, options), _nullishCoalesce(options.mode, () => ( "replace")));
6770
+ this.setSelection(_chunkPMHPXCJCcjs.selectionFromPixels.call(void 0, pixels, options), _nullishCoalesce(options.mode, () => ( "replace")));
6747
6771
  return this.getSelection();
6748
6772
  }
6749
6773
  /** Quick Mask view (tints the unselected area). View state: no undo step. */
@@ -6755,7 +6779,7 @@ var ImageEditorController = (_class7 = class {
6755
6779
  // --- Layer masks ---
6756
6780
  maskFromSelection(sel, props = {}) {
6757
6781
  const { width, height } = this.naturalSize;
6758
- const sized = sel.width === width && sel.height === height ? sel : _chunkXLUYXUBDcjs.resizeSelection.call(void 0, sel, width, height);
6782
+ const sized = sel.width === width && sel.height === height ? sel : _chunkPMHPXCJCcjs.resizeSelection.call(void 0, sel, width, height);
6759
6783
  const mask = { surface: _chunkJ5BA3BQ6cjs.surfaceFromPixels.call(void 0, { width, height, data: sized.data }, 1, 0, 0, 0), defaultValue: 0 };
6760
6784
  return withMaskProps(mask, props);
6761
6785
  }
@@ -6801,7 +6825,7 @@ var ImageEditorController = (_class7 = class {
6801
6825
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
6802
6826
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
6803
6827
  const data = _chunkJ5BA3BQ6cjs.readRegion.call(void 0, layer.mask.surface, { x: -ox, y: -oy, width, height });
6804
- const sel = _chunkXLUYXUBDcjs.createSelectionMask.call(void 0, width, height, new Uint8Array(data.buffer, data.byteOffset, data.length));
6828
+ const sel = _chunkPMHPXCJCcjs.createSelectionMask.call(void 0, width, height, new Uint8Array(data.buffer, data.byteOffset, data.length));
6805
6829
  return this.setSelection(sel, mode);
6806
6830
  }
6807
6831
  // --- Histogram ---
@@ -6831,9 +6855,9 @@ var ImageEditorController = (_class7 = class {
6831
6855
  merged.depthRange = [...merged.depthRange];
6832
6856
  this.state.layers = _chunkMZXQTKUMcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
6833
6857
  const next = { ...l };
6834
- if (_chunkXLUYXUBDcjs.isDefaultDepthMask.call(void 0, merged)) {
6858
+ if (_chunkPMHPXCJCcjs.isDefaultDepthMask.call(void 0, merged)) {
6835
6859
  if (_optionalChain([next, 'access', _261 => _261.mask, 'optionalAccess', _262 => _262.source])) delete next.mask;
6836
- } else next.mask = _chunkXLUYXUBDcjs.depthRasterMask.call(void 0, merged);
6860
+ } else next.mask = _chunkPMHPXCJCcjs.depthRasterMask.call(void 0, merged);
6837
6861
  return next;
6838
6862
  });
6839
6863
  }
@@ -6854,7 +6878,7 @@ var ImageEditorController = (_class7 = class {
6854
6878
  // --- Annotations & Layers ---
6855
6879
  /** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
6856
6880
  annotationLayer(id) {
6857
- return _chunkMZXQTKUMcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkXLUYXUBDcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _265 => _265.id]) === id);
6881
+ return _chunkMZXQTKUMcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkPMHPXCJCcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _265 => _265.id]) === id);
6858
6882
  }
6859
6883
  /** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
6860
6884
  annotationEnv() {
@@ -6870,7 +6894,7 @@ var ImageEditorController = (_class7 = class {
6870
6894
  this.recordHistory();
6871
6895
  const id = `ann_${Date.now()}_${Math.random().toString(36).slice(2, 7)}`;
6872
6896
  const fullAnnotation = { ...annotation, id };
6873
- const layer = _chunkXLUYXUBDcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
6897
+ const layer = _chunkPMHPXCJCcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
6874
6898
  const loc = placement.aboveId ? _chunkMZXQTKUMcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
6875
6899
  this.state.layers = loc ? _chunkMZXQTKUMcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _266 => _266.parent, 'optionalAccess', _267 => _267.id]), () => ( null)), loc.index + 1) : _chunkMZXQTKUMcjs.insertLayer.call(void 0, this.state.layers, layer, null);
6876
6900
  this.state.selectedAnnotationId = id;
@@ -6882,17 +6906,17 @@ var ImageEditorController = (_class7 = class {
6882
6906
  this.recordHistory();
6883
6907
  }
6884
6908
  const layer = this.annotationLayer(id);
6885
- const current = layer ? _chunkXLUYXUBDcjs.annotationOfLayer.call(void 0, layer) : null;
6909
+ const current = layer ? _chunkPMHPXCJCcjs.annotationOfLayer.call(void 0, layer) : null;
6886
6910
  if (layer && current) {
6887
6911
  const annotation = { ...current, ...partial, id };
6888
- const name = layer.name === _chunkXLUYXUBDcjs.annotationLayerName.call(void 0, current) ? _chunkXLUYXUBDcjs.annotationLayerName.call(void 0, annotation) : layer.name;
6912
+ const name = layer.name === _chunkPMHPXCJCcjs.annotationLayerName.call(void 0, current) ? _chunkPMHPXCJCcjs.annotationLayerName.call(void 0, annotation) : layer.name;
6889
6913
  this.state.layers = _chunkMZXQTKUMcjs.mapLayer.call(void 0, this.state.layers, layer.id, () => this.layerForAnnotation(layer, annotation, name));
6890
6914
  }
6891
6915
  this.notify();
6892
6916
  }
6893
6917
  /** `layer` (an annotation, or a shape or type layer migrated from one) showing `annotation` instead, keeping its other properties. */
6894
6918
  layerForAnnotation(layer, annotation, name) {
6895
- const fresh = _chunkXLUYXUBDcjs.annotationLayerFor.call(void 0, annotation, this.annotationEnv());
6919
+ const fresh = _chunkPMHPXCJCcjs.annotationLayerFor.call(void 0, annotation, this.annotationEnv());
6896
6920
  const keep = { id: layer.id, visible: layer.visible, opacity: layer.opacity };
6897
6921
  for (const k of ["clipped", "mask", "locks", "effects"]) if (layer[k] !== void 0) keep[k] = layer[k];
6898
6922
  if (fresh.type !== "annotation" && layer.type !== "annotation" && layer.fillOpacity !== void 0) keep.fillOpacity = layer.fillOpacity;
@@ -7160,8 +7184,8 @@ var ImageEditorController = (_class7 = class {
7160
7184
  return;
7161
7185
  }
7162
7186
  const target = this.developLayer();
7163
- if (!target) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("There is no pixel layer to mask.");
7164
- _chunkXLUYXUBDcjs.requireUnlocked.call(void 0, target, "all", "mask it");
7187
+ if (!target) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("There is no pixel layer to mask.");
7188
+ _chunkPMHPXCJCcjs.requireUnlocked.call(void 0, target, "all", "mask it");
7165
7189
  const { width, height } = this.naturalSize;
7166
7190
  let px2 = await this.decodeImage(newDataUrl);
7167
7191
  if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
@@ -7169,14 +7193,14 @@ var ImageEditorController = (_class7 = class {
7169
7193
  for (let p = 0; p < alpha.length; p++) alpha[p] = px2.data[p * 4 + 3];
7170
7194
  let surface = _chunkJ5BA3BQ6cjs.surfaceFromPixels.call(void 0, { width, height, data: alpha }, 1, 0, 0, 0);
7171
7195
  if (target.offset.x || target.offset.y) surface = _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, surface, -target.offset.x, -target.offset.y);
7172
- this.commitLayers(_chunkXLUYXUBDcjs.setLayerMask.call(void 0, this.state.layers, target.id, { surface, defaultValue: 0 }));
7196
+ this.commitLayers(_chunkPMHPXCJCcjs.setLayerMask.call(void 0, this.state.layers, target.id, { surface, defaultValue: 0 }));
7173
7197
  return target.id;
7174
7198
  }
7175
7199
  // --- Type layers ---
7176
7200
 
7177
7201
  /** The shaper that lays out and draws type layers (`null` when there is none here). */
7178
7202
  getTextShaper() {
7179
- if (this.textShaperValue === void 0) this.textShaperValue = _chunkORE334I6cjs.createCanvasTextShaper.call(void 0, { createCanvas: (w, h) => this.renderer.createCanvas(w, h) });
7203
+ if (this.textShaperValue === void 0) this.textShaperValue = _chunkLXGOYRPEcjs.createCanvasTextShaper.call(void 0, { createCanvas: (w, h) => this.renderer.createCanvas(w, h) });
7180
7204
  return this.textShaperValue;
7181
7205
  }
7182
7206
  /** Sets the text shaper (fonts) type layers lay out and draw with; existing layers redraw on their next edit. */
@@ -7193,7 +7217,7 @@ var ImageEditorController = (_class7 = class {
7193
7217
  return _nullishCoalesce(_optionalChain([this, 'access', _272 => _272.getTextShaper, 'call', _273 => _273(), 'optionalAccess', _274 => _274.families, 'optionalCall', _275 => _275()]), () => ( ["sans-serif", "serif", "monospace"]));
7194
7218
  }
7195
7219
  typeInfo(id) {
7196
- const layer = _chunkXLUYXUBDcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7220
+ const layer = _chunkPMHPXCJCcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7197
7221
  const ranges = (runs) => {
7198
7222
  let at = 0;
7199
7223
  return runs.map((r) => {
@@ -7206,7 +7230,7 @@ var ImageEditorController = (_class7 = class {
7206
7230
  let lines = [];
7207
7231
  let missing = _nullishCoalesce(layer.missingFonts, () => ( []));
7208
7232
  if (shaper) {
7209
- const layout = _chunkORE334I6cjs.layoutText.call(void 0, layer, shaper);
7233
+ const layout = _chunkLXGOYRPEcjs.layoutText.call(void 0, layer, shaper);
7210
7234
  const r = (n) => Math.round(n * 1e3) / 1e3;
7211
7235
  lines = layout.lines.map((l) => ({ start: l.start, end: l.end, baseline: r(l.baseline), width: r(l.width) }));
7212
7236
  if (layer.rendering === "stored") missing = layout.missingFonts;
@@ -7236,25 +7260,25 @@ var ImageEditorController = (_class7 = class {
7236
7260
  * text wrapped in `box`. Refused without a text shaper. Returns its id.
7237
7261
  */
7238
7262
  addTextLayer(init) {
7239
- const text = _chunkXLUYXUBDcjs.normalizeText.call(void 0, init.text);
7240
- if (!Number.isFinite(init.x) || !Number.isFinite(init.y)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("x and y must be numbers (document pixels).");
7241
- const style = _chunkXLUYXUBDcjs.patchTextStyle.call(void 0, { ..._chunkORE334I6cjs.DEFAULT_TEXT_STYLE, color: this.state.paint.foreground }, _nullishCoalesce(init.style, () => ( {})));
7242
- const paragraph = _chunkXLUYXUBDcjs.patchParagraphStyle.call(void 0, {}, _nullishCoalesce(init.paragraph, () => ( {})));
7263
+ const text = _chunkPMHPXCJCcjs.normalizeText.call(void 0, init.text);
7264
+ if (!Number.isFinite(init.x) || !Number.isFinite(init.y)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("x and y must be numbers (document pixels).");
7265
+ const style = _chunkPMHPXCJCcjs.patchTextStyle.call(void 0, { ..._chunkLXGOYRPEcjs.DEFAULT_TEXT_STYLE, color: this.state.paint.foreground }, _nullishCoalesce(init.style, () => ( {})));
7266
+ const paragraph = _chunkPMHPXCJCcjs.patchParagraphStyle.call(void 0, {}, _nullishCoalesce(init.paragraph, () => ( {})));
7243
7267
  let frame = { kind: "point" };
7244
7268
  if (init.box) {
7245
7269
  const { width, height } = init.box;
7246
- if (!(Number.isFinite(width) && width >= 1 && Number.isFinite(height) && height >= 1)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("box.width and box.height must be at least 1 pixel.");
7270
+ if (!(Number.isFinite(width) && width >= 1 && Number.isFinite(height) && height >= 1)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("box.width and box.height must be at least 1 pixel.");
7247
7271
  frame = { kind: "box", width, height };
7248
7272
  }
7249
- if (init.rotation !== void 0 && !Number.isFinite(init.rotation)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("rotation must be a number of degrees.");
7250
- if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("opacity must be between 0 and 1.");
7251
- if (init.blend !== void 0 && !_chunkJ5BA3BQ6cjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
7273
+ if (init.rotation !== void 0 && !Number.isFinite(init.rotation)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("rotation must be a number of degrees.");
7274
+ if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("opacity must be between 0 and 1.");
7275
+ if (init.blend !== void 0 && !_chunkJ5BA3BQ6cjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
7252
7276
  const t = [1, 0, 0, 1, init.x, init.y];
7253
- const transform = init.rotation ? _chunkORE334I6cjs.multiplyMatrices.call(void 0, t, _chunkORE334I6cjs.rotateMatrix.call(void 0, init.rotation, { x: init.x, y: init.y })) : t;
7254
- const layer = _chunkXLUYXUBDcjs.createTypeLayer.call(void 0, { text, runs: [{ length: text.length, style }], paragraphs: [{ length: text.length, style: paragraph }], frame, transform, name: _nullishCoalesce(init.name, () => ( _chunkXLUYXUBDcjs.typeLayerName.call(void 0, text))) }, this.textEnv());
7277
+ const transform = init.rotation ? _chunkLXGOYRPEcjs.multiplyMatrices.call(void 0, t, _chunkLXGOYRPEcjs.rotateMatrix.call(void 0, init.rotation, { x: init.x, y: init.y })) : t;
7278
+ const layer = _chunkPMHPXCJCcjs.createTypeLayer.call(void 0, { text, runs: [{ length: text.length, style }], paragraphs: [{ length: text.length, style: paragraph }], frame, transform, name: _nullishCoalesce(init.name, () => ( _chunkPMHPXCJCcjs.typeLayerName.call(void 0, text))) }, this.textEnv());
7255
7279
  if (init.opacity !== void 0) layer.opacity = init.opacity;
7256
7280
  if (init.blend !== void 0) layer.blend = init.blend;
7257
- const next = _chunkXLUYXUBDcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
7281
+ const next = _chunkPMHPXCJCcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
7258
7282
  this.commitLayers(next, () => {
7259
7283
  this.state.activeLayerId = layer.id;
7260
7284
  this.state.activeTarget = "pixels";
@@ -7266,28 +7290,28 @@ var ImageEditorController = (_class7 = class {
7266
7290
  * `start`. One undo step unless `commitToHistory` is false (typing). Returns the layer.
7267
7291
  */
7268
7292
  setText(id, text, range = {}, commitToHistory = true) {
7269
- const layer = _chunkXLUYXUBDcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7270
- const insert = _chunkXLUYXUBDcjs.normalizeText.call(void 0, text);
7271
- const [start, end] = _chunkXLUYXUBDcjs.textRange.call(void 0, layer.text, range.start, range.end);
7272
- const { layers } = _chunkXLUYXUBDcjs.updateTypeLayer.call(void 0, this.state.layers, id, (l) => _chunkXLUYXUBDcjs.replaceTextRange.call(void 0, l, start, end, insert), this.textEnv(), "edit its text");
7293
+ const layer = _chunkPMHPXCJCcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7294
+ const insert = _chunkPMHPXCJCcjs.normalizeText.call(void 0, text);
7295
+ const [start, end] = _chunkPMHPXCJCcjs.textRange.call(void 0, layer.text, range.start, range.end);
7296
+ const { layers } = _chunkPMHPXCJCcjs.updateTypeLayer.call(void 0, this.state.layers, id, (l) => _chunkPMHPXCJCcjs.replaceTextRange.call(void 0, l, start, end, insert), this.textEnv(), "edit its text");
7273
7297
  this.commitLayers(layers, void 0, commitToHistory);
7274
7298
  return this.typeInfo(id);
7275
7299
  }
7276
7300
  /** Sets character style fields over [start, end) (default all), one undo step. Returns the layer. */
7277
7301
  setTextStyle(id, style, range = {}, commitToHistory = true) {
7278
- const layer = _chunkXLUYXUBDcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7279
- const [start, end] = _chunkXLUYXUBDcjs.textRange.call(void 0, layer.text, range.start, range.end);
7280
- if (!Object.keys(style).length) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give at least one style field to set.");
7281
- _chunkXLUYXUBDcjs.patchTextStyle.call(void 0, _chunkORE334I6cjs.DEFAULT_TEXT_STYLE, style);
7282
- const { layers } = _chunkXLUYXUBDcjs.updateTypeLayer.call(void 0,
7302
+ const layer = _chunkPMHPXCJCcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7303
+ const [start, end] = _chunkPMHPXCJCcjs.textRange.call(void 0, layer.text, range.start, range.end);
7304
+ if (!Object.keys(style).length) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give at least one style field to set.");
7305
+ _chunkPMHPXCJCcjs.patchTextStyle.call(void 0, _chunkLXGOYRPEcjs.DEFAULT_TEXT_STYLE, style);
7306
+ const { layers } = _chunkPMHPXCJCcjs.updateTypeLayer.call(void 0,
7283
7307
  this.state.layers,
7284
7308
  id,
7285
7309
  (l) => {
7286
7310
  if (start === end) {
7287
- if (l.text.length) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("The range is empty; give start < end (or leave both out for the whole text).");
7288
- return { runs: [{ length: 0, style: _chunkXLUYXUBDcjs.patchTextStyle.call(void 0, _chunkORE334I6cjs.styleAt.call(void 0, l.runs, 0, _chunkORE334I6cjs.DEFAULT_TEXT_STYLE), style) }] };
7311
+ if (l.text.length) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("The range is empty; give start < end (or leave both out for the whole text).");
7312
+ return { runs: [{ length: 0, style: _chunkPMHPXCJCcjs.patchTextStyle.call(void 0, _chunkLXGOYRPEcjs.styleAt.call(void 0, l.runs, 0, _chunkLXGOYRPEcjs.DEFAULT_TEXT_STYLE), style) }] };
7289
7313
  }
7290
- return { runs: _chunkORE334I6cjs.restyleRange.call(void 0, l.runs, start, end, (s) => _chunkXLUYXUBDcjs.patchTextStyle.call(void 0, s, style)) };
7314
+ return { runs: _chunkLXGOYRPEcjs.restyleRange.call(void 0, l.runs, start, end, (s) => _chunkPMHPXCJCcjs.patchTextStyle.call(void 0, s, style)) };
7291
7315
  },
7292
7316
  this.textEnv(),
7293
7317
  "restyle its text"
@@ -7297,11 +7321,11 @@ var ImageEditorController = (_class7 = class {
7297
7321
  }
7298
7322
  /** Sets paragraph style fields on every paragraph that [start, end) touches (default all), one undo step. */
7299
7323
  setParagraphStyle(id, style, range = {}, commitToHistory = true) {
7300
- const layer = _chunkXLUYXUBDcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7301
- const [start, end] = _chunkXLUYXUBDcjs.textRange.call(void 0, layer.text, range.start, range.end);
7302
- if (!Object.keys(style).length) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give at least one paragraph field to set.");
7303
- _chunkXLUYXUBDcjs.patchParagraphStyle.call(void 0, {}, style);
7304
- const { layers } = _chunkXLUYXUBDcjs.updateTypeLayer.call(void 0,
7324
+ const layer = _chunkPMHPXCJCcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7325
+ const [start, end] = _chunkPMHPXCJCcjs.textRange.call(void 0, layer.text, range.start, range.end);
7326
+ if (!Object.keys(style).length) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give at least one paragraph field to set.");
7327
+ _chunkPMHPXCJCcjs.patchParagraphStyle.call(void 0, {}, style);
7328
+ const { layers } = _chunkPMHPXCJCcjs.updateTypeLayer.call(void 0,
7305
7329
  this.state.layers,
7306
7330
  id,
7307
7331
  (l) => {
@@ -7310,7 +7334,7 @@ var ImageEditorController = (_class7 = class {
7310
7334
  const a = at;
7311
7335
  at += p.length;
7312
7336
  const touches = a < end && at > start || start === end && start >= a && (start < at || at === l.text.length);
7313
- return touches || !l.text.length ? { length: p.length, style: _chunkXLUYXUBDcjs.patchParagraphStyle.call(void 0, p.style, style) } : p;
7337
+ return touches || !l.text.length ? { length: p.length, style: _chunkPMHPXCJCcjs.patchParagraphStyle.call(void 0, p.style, style) } : p;
7314
7338
  });
7315
7339
  return { paragraphs };
7316
7340
  },
@@ -7326,21 +7350,21 @@ var ImageEditorController = (_class7 = class {
7326
7350
  * paragraph. Also resizes a box. One undo step.
7327
7351
  */
7328
7352
  setTextFrame(id, frame, commitToHistory = true) {
7329
- const layer = _chunkXLUYXUBDcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7330
- if (frame.kind === "box" && !(Number.isFinite(frame.width) && frame.width >= 1 && Number.isFinite(frame.height) && frame.height >= 1)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("width and height must be at least 1 pixel.");
7331
- if (frame.kind !== "box" && frame.kind !== "point") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("kind must be point or box.");
7353
+ const layer = _chunkPMHPXCJCcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7354
+ if (frame.kind === "box" && !(Number.isFinite(frame.width) && frame.width >= 1 && Number.isFinite(frame.height) && frame.height >= 1)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("width and height must be at least 1 pixel.");
7355
+ if (frame.kind !== "box" && frame.kind !== "point") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("kind must be point or box.");
7332
7356
  const shaper = this.getTextShaper();
7333
- const { layers } = _chunkXLUYXUBDcjs.updateTypeLayer.call(void 0,
7357
+ const { layers } = _chunkPMHPXCJCcjs.updateTypeLayer.call(void 0,
7334
7358
  this.state.layers,
7335
7359
  id,
7336
7360
  (l) => {
7337
7361
  if (frame.kind === "box" && l.frame.kind === "box") return { frame: { kind: "box", width: frame.width, height: frame.height } };
7338
- if (!shaper) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Changing between point and paragraph text needs a text shaper to measure the text.");
7339
- const lines = _chunkORE334I6cjs.layoutText.call(void 0, l, shaper).lines;
7362
+ if (!shaper) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Changing between point and paragraph text needs a text shaper to measure the text.");
7363
+ const lines = _chunkLXGOYRPEcjs.layoutText.call(void 0, l, shaper).lines;
7340
7364
  const first = lines[0];
7341
7365
  const dx = frame.kind === "box" ? first ? first.x : 0 : 0;
7342
7366
  const dy = frame.kind === "box" ? first ? first.baseline - first.ascent : 0 : first ? first.baseline : 0;
7343
- const m = _chunkXLUYXUBDcjs.textMatrix.call(void 0, l);
7367
+ const m = _chunkPMHPXCJCcjs.textMatrix.call(void 0, l);
7344
7368
  const shifted = [m[0], m[1], m[2], m[3], m[0] * dx + m[2] * dy + m[4], m[1] * dx + m[3] * dy + m[5]];
7345
7369
  const nextFrame = frame.kind === "box" ? { kind: "box", width: frame.width, height: frame.height } : { kind: "point" };
7346
7370
  return { frame: nextFrame, transform: shifted };
@@ -7357,21 +7381,21 @@ var ImageEditorController = (_class7 = class {
7357
7381
  * `warnings` says when other colours were dropped. One undo step.
7358
7382
  */
7359
7383
  convertTextToShape(id) {
7360
- const layer = _chunkXLUYXUBDcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7361
- _chunkXLUYXUBDcjs.requireUnlocked.call(void 0, layer, "all", "convert it");
7384
+ const layer = _chunkPMHPXCJCcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7385
+ _chunkPMHPXCJCcjs.requireUnlocked.call(void 0, layer, "all", "convert it");
7362
7386
  const shaper = this.getTextShaper();
7363
- if (!shaper) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Convert to Shape needs a text shaper that gives glyph outlines; none is set here.");
7364
- const parts = _chunkXLUYXUBDcjs.textOutlines.call(void 0, layer, shaper);
7365
- const subpaths = parts.flatMap((p) => _chunkORE334I6cjs.bezierToSubpaths.call(void 0, p.path));
7366
- if (!subpaths.length) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("The text draws nothing (it is empty or only spaces), so there is no shape to make.");
7387
+ if (!shaper) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Convert to Shape needs a text shaper that gives glyph outlines; none is set here.");
7388
+ const parts = _chunkPMHPXCJCcjs.textOutlines.call(void 0, layer, shaper);
7389
+ const subpaths = parts.flatMap((p) => _chunkLXGOYRPEcjs.bezierToSubpaths.call(void 0, p.path));
7390
+ if (!subpaths.length) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("The text draws nothing (it is empty or only spaces), so there is no shape to make.");
7367
7391
  const warnings = [];
7368
7392
  const colors = new Set(layer.runs.filter((r) => r.length > 0).map((r) => `${r.style.color}/${_nullishCoalesce(r.style.opacity, () => ( 1))}`));
7369
7393
  if (colors.size > 1) warnings.push("The text had several colours; the shape takes the first one.");
7370
- const missing = _chunkORE334I6cjs.layoutText.call(void 0, layer, shaper).missingFonts;
7394
+ const missing = _chunkLXGOYRPEcjs.layoutText.call(void 0, layer, shaper).missingFonts;
7371
7395
  if (missing.length) warnings.push(`Missing fonts were drawn with a fallback: ${missing.join(", ")}.`);
7372
- const first = _nullishCoalesce(_optionalChain([layer, 'access', _276 => _276.runs, 'access', _277 => _277.find, 'call', _278 => _278((r) => r.length > 0), 'optionalAccess', _279 => _279.style]), () => ( _chunkORE334I6cjs.DEFAULT_TEXT_STYLE));
7396
+ const first = _nullishCoalesce(_optionalChain([layer, 'access', _276 => _276.runs, 'access', _277 => _277.find, 'call', _278 => _278((r) => r.length > 0), 'optionalAccess', _279 => _279.style]), () => ( _chunkLXGOYRPEcjs.DEFAULT_TEXT_STYLE));
7373
7397
  const fill = first.opacity !== void 0 && first.opacity !== 1 ? { type: "color", color: first.color, opacity: first.opacity } : { type: "color", color: first.color };
7374
- const shape = _chunkXLUYXUBDcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
7398
+ const shape = _chunkPMHPXCJCcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
7375
7399
  const keep = { visible: layer.visible, opacity: layer.opacity, blend: layer.blend };
7376
7400
  for (const k of ["clipped", "mask", "locks", "effects", "fillOpacity"]) if (layer[k] !== void 0) keep[k] = layer[k];
7377
7401
  this.commitLayers(_chunkMZXQTKUMcjs.mapLayer.call(void 0, this.state.layers, id, () => ({ ...shape, ...keep })));
@@ -7379,23 +7403,23 @@ var ImageEditorController = (_class7 = class {
7379
7403
  }
7380
7404
  /** The layout of a type layer (lines, characters, bounds in text space), or `null` without a shaper. */
7381
7405
  getTextLayout(id) {
7382
- const layer = _chunkXLUYXUBDcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7406
+ const layer = _chunkPMHPXCJCcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7383
7407
  const shaper = this.getTextShaper();
7384
- return shaper ? _chunkORE334I6cjs.layoutText.call(void 0, layer, shaper) : null;
7408
+ return shaper ? _chunkLXGOYRPEcjs.layoutText.call(void 0, layer, shaper) : null;
7385
7409
  }
7386
7410
  /** The text index nearest a document point (for clicks on a type layer). */
7387
7411
  textIndexAt(id, point) {
7388
- const layer = _chunkXLUYXUBDcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7412
+ const layer = _chunkPMHPXCJCcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7389
7413
  const layout = this.getTextLayout(id);
7390
- return layout ? _chunkORE334I6cjs.textIndexAt.call(void 0, layout, _chunkXLUYXUBDcjs.toTextSpace.call(void 0, layer, point)) : layer.text.length;
7414
+ return layout ? _chunkLXGOYRPEcjs.textIndexAt.call(void 0, layout, _chunkPMHPXCJCcjs.toTextSpace.call(void 0, layer, point)) : layer.text.length;
7391
7415
  }
7392
7416
  /** The caret at text index `index` as a document-space segment (top to bottom), for drawing it. */
7393
7417
  textCaret(id, index) {
7394
- const layer = _chunkXLUYXUBDcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7418
+ const layer = _chunkPMHPXCJCcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7395
7419
  const layout = this.getTextLayout(id);
7396
7420
  if (!layout) return null;
7397
- const c = _chunkORE334I6cjs.caretAt.call(void 0, layout, Math.max(0, Math.min(layer.text.length, index)));
7398
- const m = _chunkXLUYXUBDcjs.textMatrix.call(void 0, layer);
7421
+ const c = _chunkLXGOYRPEcjs.caretAt.call(void 0, layout, Math.max(0, Math.min(layer.text.length, index)));
7422
+ const m = _chunkPMHPXCJCcjs.textMatrix.call(void 0, layer);
7399
7423
  const at = (x, y) => ({ x: m[0] * x + m[2] * y + m[4], y: m[1] * x + m[3] * y + m[5] });
7400
7424
  return { top: at(c.x, c.top), bottom: at(c.x, c.bottom), line: c.line };
7401
7425
  }
@@ -7406,14 +7430,14 @@ var ImageEditorController = (_class7 = class {
7406
7430
  }
7407
7431
  /** One component from tool or UI input (validated). */
7408
7432
  componentFrom(spec, path) {
7409
- const op = _chunkXLUYXUBDcjs.requireOperation.call(void 0, spec.op, `${path}op`);
7410
- if (spec.shape !== void 0 && spec.subpaths !== void 0) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Give ${path}shape or ${path}subpaths, not both.`);
7411
- if (spec.shape !== void 0) return _chunkXLUYXUBDcjs.liveComponent.call(void 0, _chunkXLUYXUBDcjs.normalizeLiveShape.call(void 0, spec.shape, `${path}shape`), op);
7412
- if (spec.subpaths !== void 0) return { op, subpaths: _chunkXLUYXUBDcjs.normalizeSubpaths.call(void 0, spec.subpaths, `${path}subpaths`) };
7413
- throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`${path}shape (a live shape: { kind: rect | ellipse | polygon | star | line, \u2026 }) or ${path}subpaths (anchors or SVG path data) is required.`);
7433
+ const op = _chunkPMHPXCJCcjs.requireOperation.call(void 0, spec.op, `${path}op`);
7434
+ if (spec.shape !== void 0 && spec.subpaths !== void 0) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Give ${path}shape or ${path}subpaths, not both.`);
7435
+ if (spec.shape !== void 0) return _chunkPMHPXCJCcjs.liveComponent.call(void 0, _chunkPMHPXCJCcjs.normalizeLiveShape.call(void 0, spec.shape, `${path}shape`), op);
7436
+ if (spec.subpaths !== void 0) return { op, subpaths: _chunkPMHPXCJCcjs.normalizeSubpaths.call(void 0, spec.subpaths, `${path}subpaths`) };
7437
+ throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`${path}shape (a live shape: { kind: rect | ellipse | polygon | star | line, \u2026 }) or ${path}subpaths (anchors or SVG path data) is required.`);
7414
7438
  }
7415
7439
  shapeInfo(id) {
7416
- const layer = _chunkXLUYXUBDcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7440
+ const layer = _chunkPMHPXCJCcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7417
7441
  const r = (n) => Math.round(n * 1e3) / 1e3;
7418
7442
  const box = (b) => b ? { x: r(b.x), y: r(b.y), width: r(b.width), height: r(b.height) } : null;
7419
7443
  const info = {
@@ -7423,13 +7447,13 @@ var ImageEditorController = (_class7 = class {
7423
7447
  index,
7424
7448
  op: c.op,
7425
7449
  live: c.live ? JSON.parse(JSON.stringify(c.live)) : null,
7426
- subpaths: _chunkORE334I6cjs.roundSubpaths.call(void 0, c.subpaths),
7427
- bounds: box(_chunkXLUYXUBDcjs.shapeGeometryBounds.call(void 0, { components: [c] }))
7450
+ subpaths: _chunkLXGOYRPEcjs.roundSubpaths.call(void 0, c.subpaths),
7451
+ bounds: box(_chunkPMHPXCJCcjs.shapeGeometryBounds.call(void 0, { components: [c] }))
7428
7452
  })),
7429
7453
  fillRule: _nullishCoalesce(layer.fillRule, () => ( "nonzero")),
7430
7454
  fill: layer.fill ? JSON.parse(JSON.stringify(layer.fill)) : null,
7431
7455
  stroke: layer.stroke ? JSON.parse(JSON.stringify(layer.stroke)) : null,
7432
- geometryBounds: box(_chunkXLUYXUBDcjs.shapeGeometryBounds.call(void 0, layer)),
7456
+ geometryBounds: box(_chunkPMHPXCJCcjs.shapeGeometryBounds.call(void 0, layer)),
7433
7457
  bounds: this.getLayerBounds(id)
7434
7458
  };
7435
7459
  if (layer.annotation) info.annotationId = layer.annotation.id;
@@ -7446,17 +7470,17 @@ var ImageEditorController = (_class7 = class {
7446
7470
  */
7447
7471
  addShapeLayer(init) {
7448
7472
  const specs = _optionalChain([init, 'access', _284 => _284.components, 'optionalAccess', _285 => _285.length]) ? init.components : [init];
7449
- if (_optionalChain([init, 'access', _286 => _286.components, 'optionalAccess', _287 => _287.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
7473
+ if (_optionalChain([init, 'access', _286 => _286.components, 'optionalAccess', _287 => _287.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
7450
7474
  const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _288 => _288.components, 'optionalAccess', _289 => _289.length]) ? `components[${i}].` : ""));
7451
- const stroke = init.stroke ? _chunkXLUYXUBDcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
7475
+ const stroke = init.stroke ? _chunkPMHPXCJCcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
7452
7476
  const openOnly = components.every((c) => !c.live && c.subpaths.every((sp) => !sp.closed));
7453
- const fill = init.fill === void 0 ? stroke && openOnly ? null : _chunkXLUYXUBDcjs.normalizeShapePaint.call(void 0, this.state.paint.foreground, "fill") : init.fill === null ? null : _chunkXLUYXUBDcjs.normalizeShapePaint.call(void 0, init.fill, "fill");
7454
- if (!fill && !stroke) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("A shape with neither fill nor stroke draws nothing; give fill or stroke.");
7455
- if (init.fillRule !== void 0 && init.fillRule !== "nonzero" && init.fillRule !== "evenodd") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7456
- if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("opacity must be between 0 and 1.");
7457
- if (init.blend !== void 0 && !_chunkJ5BA3BQ6cjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
7458
- const layer = _chunkXLUYXUBDcjs.createShapeLayer.call(void 0, { components, fill, stroke, fillRule: init.fillRule, name: init.name, opacity: init.opacity, blend: init.blend }, this.shapeEnv());
7459
- const next = _chunkXLUYXUBDcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
7477
+ const fill = init.fill === void 0 ? stroke && openOnly ? null : _chunkPMHPXCJCcjs.normalizeShapePaint.call(void 0, this.state.paint.foreground, "fill") : init.fill === null ? null : _chunkPMHPXCJCcjs.normalizeShapePaint.call(void 0, init.fill, "fill");
7478
+ if (!fill && !stroke) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("A shape with neither fill nor stroke draws nothing; give fill or stroke.");
7479
+ if (init.fillRule !== void 0 && init.fillRule !== "nonzero" && init.fillRule !== "evenodd") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7480
+ if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("opacity must be between 0 and 1.");
7481
+ if (init.blend !== void 0 && !_chunkJ5BA3BQ6cjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
7482
+ const layer = _chunkPMHPXCJCcjs.createShapeLayer.call(void 0, { components, fill, stroke, fillRule: init.fillRule, name: init.name, opacity: init.opacity, blend: init.blend }, this.shapeEnv());
7483
+ const next = _chunkPMHPXCJCcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
7460
7484
  this.commitLayers(next, () => {
7461
7485
  this.state.activeLayerId = layer.id;
7462
7486
  this.state.activeTarget = "pixels";
@@ -7469,18 +7493,18 @@ var ImageEditorController = (_class7 = class {
7469
7493
  * only those settings of the current stroke. Returns the shape.
7470
7494
  */
7471
7495
  setShapeStyle(id, changes, commitToHistory = true) {
7472
- const layer = _chunkXLUYXUBDcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7473
- const fill = changes.fill === void 0 ? layer.fill : changes.fill === null ? null : _chunkXLUYXUBDcjs.normalizeShapePaint.call(void 0, changes.fill, "fill");
7474
- const stroke = changes.stroke === void 0 ? layer.stroke : changes.stroke === null ? null : _chunkXLUYXUBDcjs.normalizeShapeStroke.call(void 0, changes.stroke, "stroke", layer.stroke);
7475
- if (changes.fillRule !== void 0 && changes.fillRule !== "nonzero" && changes.fillRule !== "evenodd") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7496
+ const layer = _chunkPMHPXCJCcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7497
+ const fill = changes.fill === void 0 ? layer.fill : changes.fill === null ? null : _chunkPMHPXCJCcjs.normalizeShapePaint.call(void 0, changes.fill, "fill");
7498
+ const stroke = changes.stroke === void 0 ? layer.stroke : changes.stroke === null ? null : _chunkPMHPXCJCcjs.normalizeShapeStroke.call(void 0, changes.stroke, "stroke", layer.stroke);
7499
+ if (changes.fillRule !== void 0 && changes.fillRule !== "nonzero" && changes.fillRule !== "evenodd") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7476
7500
  const fillRule = _nullishCoalesce(_nullishCoalesce(changes.fillRule, () => ( layer.fillRule)), () => ( "nonzero"));
7477
- const { layers } = _chunkXLUYXUBDcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ fill, stroke, fillRule: fillRule === "nonzero" ? void 0 : fillRule }), this.shapeEnv(), "restyle it");
7501
+ const { layers } = _chunkPMHPXCJCcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ fill, stroke, fillRule: fillRule === "nonzero" ? void 0 : fillRule }), this.shapeEnv(), "restyle it");
7478
7502
  this.commitLayers(layers, void 0, commitToHistory);
7479
7503
  return this.shapeInfo(id);
7480
7504
  }
7481
7505
  componentIndex(layer, index) {
7482
7506
  if (!Number.isInteger(index) || index < 0 || index >= layer.components.length) {
7483
- throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`componentIndex must be 0..${layer.components.length - 1} (get_shape_layer lists the components), got ${String(index)}.`);
7507
+ throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`componentIndex must be 0..${layer.components.length - 1} (get_shape_layer lists the components), got ${String(index)}.`);
7484
7508
  }
7485
7509
  return index;
7486
7510
  }
@@ -7490,36 +7514,36 @@ var ImageEditorController = (_class7 = class {
7490
7514
  * the live shape) or its operation. Returns the shape.
7491
7515
  */
7492
7516
  setShapeComponent(id, index, change, commitToHistory = true) {
7493
- const layer = _chunkXLUYXUBDcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7517
+ const layer = _chunkPMHPXCJCcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7494
7518
  const i = this.componentIndex(layer, index);
7495
7519
  const current = layer.components[i];
7496
7520
  let shape = change.shape;
7497
7521
  if (shape && current.live && shape.kind === void 0) shape = { ...current.live, ...shape };
7498
7522
  else if (shape && current.live && shape.kind === current.live.kind) shape = { ...current.live, ...shape };
7499
- const next = shape !== void 0 || change.subpaths !== void 0 ? this.componentFrom({ ...change, shape, op: _nullishCoalesce(change.op, () => ( current.op)) }, "") : { ...current, op: _chunkXLUYXUBDcjs.requireOperation.call(void 0, change.op) };
7523
+ const next = shape !== void 0 || change.subpaths !== void 0 ? this.componentFrom({ ...change, shape, op: _nullishCoalesce(change.op, () => ( current.op)) }, "") : { ...current, op: _chunkPMHPXCJCcjs.requireOperation.call(void 0, change.op) };
7500
7524
  const components = layer.components.map((c, k) => k === i ? next : c);
7501
- const { layers } = _chunkXLUYXUBDcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7525
+ const { layers } = _chunkPMHPXCJCcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7502
7526
  this.commitLayers(layers, void 0, commitToHistory);
7503
7527
  return this.shapeInfo(id);
7504
7528
  }
7505
7529
  /** Adds a component to a shape (path operations), on top unless `index` is given (one undo step). Returns the shape. */
7506
7530
  addShapeComponent(id, spec, index) {
7507
- const layer = _chunkXLUYXUBDcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7531
+ const layer = _chunkPMHPXCJCcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7508
7532
  const c = this.componentFrom(spec, "");
7509
7533
  const at = index === void 0 ? layer.components.length : index;
7510
- if (!Number.isInteger(at) || at < 0 || at > layer.components.length) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`index must be 0..${layer.components.length}, got ${String(index)}.`);
7534
+ if (!Number.isInteger(at) || at < 0 || at > layer.components.length) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`index must be 0..${layer.components.length}, got ${String(index)}.`);
7511
7535
  const components = [...layer.components.slice(0, at), c, ...layer.components.slice(at)];
7512
- const { layers } = _chunkXLUYXUBDcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7536
+ const { layers } = _chunkPMHPXCJCcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7513
7537
  this.commitLayers(layers);
7514
7538
  return this.shapeInfo(id);
7515
7539
  }
7516
7540
  /** Removes one component of a shape (one undo step); the last one cannot go (delete the layer instead). Returns the shape. */
7517
7541
  removeShapeComponent(id, index) {
7518
- const layer = _chunkXLUYXUBDcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7542
+ const layer = _chunkPMHPXCJCcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7519
7543
  const i = this.componentIndex(layer, index);
7520
- if (layer.components.length === 1) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("This is the shape's only component; delete the layer instead (delete_layer).");
7544
+ if (layer.components.length === 1) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("This is the shape's only component; delete the layer instead (delete_layer).");
7521
7545
  const components = layer.components.filter((_, k) => k !== i);
7522
- const { layers } = _chunkXLUYXUBDcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7546
+ const { layers } = _chunkPMHPXCJCcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7523
7547
  this.commitLayers(layers);
7524
7548
  return this.shapeInfo(id);
7525
7549
  }
@@ -7528,10 +7552,10 @@ var ImageEditorController = (_class7 = class {
7528
7552
  * shapes become paths), as one undo step. Returns the shape.
7529
7553
  */
7530
7554
  mergeShapeComponents(id) {
7531
- const layer = _chunkXLUYXUBDcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7532
- if (layer.components.length < 2) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("The shape has one component; there is nothing to merge.");
7533
- const components = _chunkXLUYXUBDcjs.mergeShapeComponents.call(void 0, layer.components, layer.fillRule);
7534
- const { layers } = _chunkXLUYXUBDcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components, fillRule: void 0 }), this.shapeEnv(), "edit its path");
7555
+ const layer = _chunkPMHPXCJCcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7556
+ if (layer.components.length < 2) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("The shape has one component; there is nothing to merge.");
7557
+ const components = _chunkPMHPXCJCcjs.mergeShapeComponents.call(void 0, layer.components, layer.fillRule);
7558
+ const { layers } = _chunkPMHPXCJCcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components, fillRule: void 0 }), this.shapeEnv(), "edit its path");
7535
7559
  this.commitLayers(layers);
7536
7560
  return this.shapeInfo(id);
7537
7561
  }
@@ -7541,8 +7565,8 @@ var ImageEditorController = (_class7 = class {
7541
7565
  * step. Returns the layer id.
7542
7566
  */
7543
7567
  async rasterizeLayer(id) {
7544
- const layer = _chunkXLUYXUBDcjs.requireLayer.call(void 0, this.state.layers, id).layer;
7545
- _chunkXLUYXUBDcjs.requireUnlocked.call(void 0, layer, "all", "rasterize it");
7568
+ const layer = _chunkPMHPXCJCcjs.requireLayer.call(void 0, this.state.layers, id).layer;
7569
+ _chunkPMHPXCJCcjs.requireUnlocked.call(void 0, layer, "all", "rasterize it");
7546
7570
  const { width, height } = this.naturalSize;
7547
7571
  const canvas = { x: 0, y: 0, width, height };
7548
7572
  let next;
@@ -7558,8 +7582,8 @@ var ImageEditorController = (_class7 = class {
7558
7582
  if (layer.locks) next.locks = layer.locks;
7559
7583
  if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
7560
7584
  } else if (layer.type === "pixel") {
7561
- if (!_optionalChain([layer, 'access', _290 => _290.filters, 'optionalAccess', _291 => _291.length])) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
7562
- _chunkXLUYXUBDcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
7585
+ if (!_optionalChain([layer, 'access', _290 => _290.filters, 'optionalAccess', _291 => _291.length])) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
7586
+ _chunkPMHPXCJCcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
7563
7587
  const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
7564
7588
  const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
7565
7589
  delete content.mask;
@@ -7576,10 +7600,10 @@ var ImageEditorController = (_class7 = class {
7576
7600
  } else if (layer.type === "smart") {
7577
7601
  return this.rasterizeSmartObject(id);
7578
7602
  } else if (layer.type === "shape" || layer.type === "type") {
7579
- next = layer.type === "shape" ? _chunkXLUYXUBDcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkXLUYXUBDcjs.typeAsPixelLayer.call(void 0, layer);
7603
+ next = layer.type === "shape" ? _chunkPMHPXCJCcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkPMHPXCJCcjs.typeAsPixelLayer.call(void 0, layer);
7580
7604
  if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _292 => _292.annotation, 'optionalAccess', _293 => _293.id])) this.state.selectedAnnotationId = null;
7581
7605
  } else {
7582
- throw new (0, _chunkXLUYXUBDcjs.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.`);
7606
+ throw new (0, _chunkPMHPXCJCcjs.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.`);
7583
7607
  }
7584
7608
  this.commitLayers(_chunkMZXQTKUMcjs.mapLayer.call(void 0, this.state.layers, id, () => next));
7585
7609
  return id;
@@ -7604,7 +7628,7 @@ var ImageEditorController = (_class7 = class {
7604
7628
  setColorMode(mode, options = {}) {
7605
7629
  let next;
7606
7630
  if (mode === "rgb") {
7607
- if (options.profile !== void 0) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("An RGB document takes no CMYK profile; use assign_profile for its working space.");
7631
+ if (options.profile !== void 0) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("An RGB document takes no CMYK profile; use assign_profile for its working space.");
7608
7632
  next = null;
7609
7633
  } else if (mode === "lab") next = { mode: "lab" };
7610
7634
  else if (mode === "cmyk") {
@@ -7612,14 +7636,14 @@ var ImageEditorController = (_class7 = class {
7612
7636
  try {
7613
7637
  doc = documentProfile(_nullishCoalesce(options.profile, () => ( "coated-cmyk")));
7614
7638
  } catch (e) {
7615
- throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7639
+ throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7616
7640
  }
7617
7641
  const cs = resolveProfile(doc).colorSpace;
7618
- if (cs !== "cmyk") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`CMYK mode needs a CMYK profile; "${doc.name}" is ${cs.toUpperCase()}.`);
7642
+ if (cs !== "cmyk") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`CMYK mode needs a CMYK profile; "${doc.name}" is ${cs.toUpperCase()}.`);
7619
7643
  const intent = _nullishCoalesce(options.intent, () => ( "relative"));
7620
- if (!_chunkG5NMLUVFcjs.INTENTS.includes(intent)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkG5NMLUVFcjs.INTENTS.join(", ")}.`);
7644
+ if (!_chunkG5NMLUVFcjs.INTENTS.includes(intent)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkG5NMLUVFcjs.INTENTS.join(", ")}.`);
7621
7645
  next = { mode: "cmyk", profile: doc, intent };
7622
- } else throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Unknown colour mode "${String(mode)}"; use rgb, cmyk or lab.`);
7646
+ } else throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Unknown colour mode "${String(mode)}"; use rgb, cmyk or lab.`);
7623
7647
  this.recordHistory();
7624
7648
  if (next) this.state.colorMode = next;
7625
7649
  else delete this.state.colorMode;
@@ -7632,10 +7656,10 @@ var ImageEditorController = (_class7 = class {
7632
7656
  try {
7633
7657
  doc = documentProfile(profile);
7634
7658
  } catch (e) {
7635
- throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7659
+ throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7636
7660
  }
7637
7661
  const cs = resolveProfile(doc).colorSpace;
7638
- if (cs !== "rgb") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`${action} needs an RGB profile; "${doc.name}" is ${cs.toUpperCase()}. The document is RGB: soft-proof CMYK with set_proof_setup, or export to it.`);
7662
+ if (cs !== "rgb") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`${action} needs an RGB profile; "${doc.name}" is ${cs.toUpperCase()}. The document is RGB: soft-proof CMYK with set_proof_setup, or export to it.`);
7639
7663
  return doc;
7640
7664
  }
7641
7665
  /**
@@ -7661,22 +7685,48 @@ var ImageEditorController = (_class7 = class {
7661
7685
  convertToProfile(profile, options = {}) {
7662
7686
  const doc = this.rgbProfileArg(profile, "Convert to Profile");
7663
7687
  const intent = _nullishCoalesce(options.intent, () => ( "relative"));
7664
- if (!_chunkG5NMLUVFcjs.INTENTS.includes(intent)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkG5NMLUVFcjs.INTENTS.join(", ")}.`);
7688
+ if (!_chunkG5NMLUVFcjs.INTENTS.includes(intent)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkG5NMLUVFcjs.INTENTS.join(", ")}.`);
7665
7689
  const t = _chunkG5NMLUVFcjs.Transform.create(resolveProfile(this.state.colorProfile), resolveProfile(doc), { intent, bpc: _nullishCoalesce(options.bpc, () => ( true)) });
7666
7690
  const converted = [];
7667
7691
  const unconverted = [];
7668
- const walk = (layers) => layers.map((l) => {
7669
- if (l.type === "group") return { ...l, children: walk(l.children) };
7670
- if (l.type === "pixel" && l.source !== "document") {
7671
- converted.push(l.id);
7672
- return { ...l, surface: convertSurfaceColors(l.surface, t) };
7692
+ const memo = /* @__PURE__ */ new Map();
7693
+ const px2 = new Float32Array(4);
7694
+ const hex = (h) => {
7695
+ let out = memo.get(h.toLowerCase());
7696
+ if (out === void 0) {
7697
+ const n = parseInt(h.slice(1), 16);
7698
+ t.eval([(n >> 16 & 255) / 255, (n >> 8 & 255) / 255, (n & 255) / 255], px2);
7699
+ const c = (v) => Math.round(Math.min(1, Math.max(0, v)) * 255).toString(16).padStart(2, "0");
7700
+ out = `#${c(px2[0])}${c(px2[1])}${c(px2[2])}`;
7701
+ memo.set(h.toLowerCase(), out);
7673
7702
  }
7674
- if (l.type === "pixel" && l.source === "document") {
7675
- converted.push(l.id);
7676
- return { ...l, surface: convertSurfaceColors(this.surfaceOf(l), t), source: void 0 };
7677
- }
7678
- if (l.type === "shape" || l.type === "type" || l.type === "smart" || _optionalChain([l, 'access', _297 => _297.effects, 'optionalAccess', _298 => _298.items, 'access', _299 => _299.length])) unconverted.push(l.id);
7679
- return l;
7703
+ return out;
7704
+ };
7705
+ const shapeEnv = this.shapeEnv();
7706
+ const textEnv = this.textEnv();
7707
+ const walk = (layers) => layers.map((l) => {
7708
+ let next2 = l;
7709
+ if (_optionalChain([l, 'access', _297 => _297.effects, 'optionalAccess', _298 => _298.items, 'access', _299 => _299.length])) next2 = { ...next2, effects: convertColorFields(l.effects, hex) };
7710
+ if (l.type === "group") {
7711
+ if (next2 !== l) converted.push(l.id);
7712
+ return { ...next2, children: walk(l.children) };
7713
+ }
7714
+ if (l.type === "pixel" && l.source !== "document") next2 = { ...next2, surface: convertSurfaceColors(l.surface, t) };
7715
+ else if (l.type === "pixel") next2 = { ...next2, surface: convertSurfaceColors(this.surfaceOf(l), t), source: void 0 };
7716
+ else if (l.type === "shape") {
7717
+ const s = next2;
7718
+ next2 = _chunkPMHPXCJCcjs.rerenderShape.call(void 0, { ...s, fill: convertColorFields(s.fill, hex), stroke: convertColorFields(s.stroke, hex), ...s.annotation ? { annotation: convertColorFields(s.annotation, hex) } : {} }, shapeEnv);
7719
+ } else if (l.type === "type") {
7720
+ const recoloured = { ...next2, runs: convertColorFields(l.runs, hex) };
7721
+ try {
7722
+ next2 = _chunkPMHPXCJCcjs.rerenderText.call(void 0, recoloured, textEnv);
7723
+ } catch (e26) {
7724
+ next2 = { ...recoloured, surface: convertSurfaceColors(l.surface, t) };
7725
+ }
7726
+ } else if (l.type === "annotation") next2 = { ...next2, annotation: convertColorFields(l.annotation, hex) };
7727
+ if (l.type === "smart") unconverted.push(l.id);
7728
+ else if (next2 !== l) converted.push(l.id);
7729
+ return next2;
7680
7730
  });
7681
7731
  const next = walk(this.state.layers);
7682
7732
  this.commitLayers(next, () => {
@@ -7699,12 +7749,12 @@ var ImageEditorController = (_class7 = class {
7699
7749
  try {
7700
7750
  doc = documentProfile(setup.profile);
7701
7751
  } catch (e) {
7702
- throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7752
+ throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7703
7753
  }
7704
7754
  const intent = _nullishCoalesce(setup.intent, () => ( DEFAULT_PROOF.intent));
7705
- if (!_chunkG5NMLUVFcjs.INTENTS.includes(intent)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkG5NMLUVFcjs.INTENTS.join(", ")}.`);
7755
+ if (!_chunkG5NMLUVFcjs.INTENTS.includes(intent)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkG5NMLUVFcjs.INTENTS.join(", ")}.`);
7706
7756
  const next = { ...DEFAULT_PROOF, ...setup, intent, profile: doc };
7707
- if (!_chunkG5NMLUVFcjs.canBeDestination.call(void 0, resolveProfile(doc))) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`"${doc.name}" describes a source only, so colours cannot be proofed through it.`);
7757
+ if (!_chunkG5NMLUVFcjs.canBeDestination.call(void 0, resolveProfile(doc))) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`"${doc.name}" describes a source only, so colours cannot be proofed through it.`);
7708
7758
  this.state.proofSetup = next;
7709
7759
  this.notify();
7710
7760
  return next;
@@ -7721,14 +7771,14 @@ var ImageEditorController = (_class7 = class {
7721
7771
  src = options.from !== void 0 ? resolveProfile(documentProfile(options.from)) : resolveProfile(this.state.colorProfile);
7722
7772
  dst = resolveProfile(documentProfile(to));
7723
7773
  } catch (e) {
7724
- throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7774
+ throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7725
7775
  }
7726
- if (src.colorSpace !== "rgb") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Colours are given as #rrggbb, so the source profile must be RGB.");
7776
+ if (src.colorSpace !== "rgb") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Colours are given as #rrggbb, so the source profile must be RGB.");
7727
7777
  const t = _chunkG5NMLUVFcjs.Transform.create(src, dst, { intent: _nullishCoalesce(options.intent, () => ( "relative")), bpc: _nullishCoalesce(options.bpc, () => ( true)) });
7728
7778
  const toLab = _chunkG5NMLUVFcjs.Transform.create(src, _chunkG5NMLUVFcjs.builtinProfile.call(void 0, "lab-d50"), { intent: "relative", bpc: false });
7729
7779
  return colors.map((input) => {
7730
7780
  const m = /^#?([0-9a-f]{6})$/i.exec(input.trim());
7731
- if (!m) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Invalid colour "${input}"; use #rrggbb.`);
7781
+ if (!m) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Invalid colour "${input}"; use #rrggbb.`);
7732
7782
  const n = parseInt(m[1], 16);
7733
7783
  const rgb = [(n >> 16 & 255) / 255, (n >> 8 & 255) / 255, (n & 255) / 255];
7734
7784
  const out = new Float32Array(16);
@@ -7754,7 +7804,7 @@ var ImageEditorController = (_class7 = class {
7754
7804
  * the ids of the layers whose pixels changed.
7755
7805
  */
7756
7806
  setBitDepth(depth) {
7757
- if (!_chunkJ5BA3BQ6cjs.isBitDepth.call(void 0, depth)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Bit depth must be 8, 16 or 32, not ${String(depth)}.`);
7807
+ if (!_chunkJ5BA3BQ6cjs.isBitDepth.call(void 0, depth)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Bit depth must be 8, 16 or 32, not ${String(depth)}.`);
7758
7808
  const changed = [];
7759
7809
  const withMask = (l) => {
7760
7810
  const m = l.mask;
@@ -7802,7 +7852,7 @@ var ImageEditorController = (_class7 = class {
7802
7852
  * Throws `PsdError` for files that cannot be read at all.
7803
7853
  */
7804
7854
  loadPsd(bytes) {
7805
- const result = _chunkXLUYXUBDcjs.importPsd.call(void 0, bytes, { newId: () => _chunkXLUYXUBDcjs.newLayerId.call(void 0, ) });
7855
+ const result = _chunkPMHPXCJCcjs.importPsd.call(void 0, bytes, { newId: () => _chunkPMHPXCJCcjs.newLayerId.call(void 0, ) });
7806
7856
  this.abandonContents();
7807
7857
  this.recordHistory();
7808
7858
  const s = this.state;
@@ -7812,7 +7862,7 @@ var ImageEditorController = (_class7 = class {
7812
7862
  if (!this.samplePixelsOverride) this.samplePixels = null;
7813
7863
  s.layers = this.checkPsdFonts(result);
7814
7864
  s.crop = null;
7815
- s.transform = { ..._chunkXLUYXUBDcjs.DEFAULT_TRANSFORM_VALUES };
7865
+ s.transform = { ..._chunkPMHPXCJCcjs.DEFAULT_TRANSFORM_VALUES };
7816
7866
  s.outputOpacity = 1;
7817
7867
  delete s.legacyOutputBlur;
7818
7868
  s.selection = null;
@@ -7863,7 +7913,7 @@ var ImageEditorController = (_class7 = class {
7863
7913
  let layers = result.layers;
7864
7914
  const missing = /* @__PURE__ */ new Map();
7865
7915
  for (const l of types) {
7866
- const fonts = shaper ? _chunkORE334I6cjs.layoutText.call(void 0, l, shaper).missingFonts : [...new Set(l.runs.map((r) => r.style.fontFamily))];
7916
+ const fonts = shaper ? _chunkLXGOYRPEcjs.layoutText.call(void 0, l, shaper).missingFonts : [...new Set(l.runs.map((r) => r.style.fontFamily))];
7867
7917
  if (!fonts.length) continue;
7868
7918
  layers = _chunkMZXQTKUMcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, missingFonts: fonts }));
7869
7919
  for (const f of fonts) missing.set(f, [..._nullishCoalesce(missing.get(f), () => ( [])), l.name]);
@@ -7891,7 +7941,7 @@ var ImageEditorController = (_class7 = class {
7891
7941
  const canRasterize = this.renderer.canRasterize();
7892
7942
  await this.renderer.prepareLayerAssets(this.state.layers, width, height);
7893
7943
  const sources = this.renderer.compositorSources(width, height);
7894
- const compositor = new (0, _chunkXLUYXUBDcjs.LayerCompositor)();
7944
+ const compositor = new (0, _chunkPMHPXCJCcjs.LayerCompositor)();
7895
7945
  const bakeMask = (layer) => {
7896
7946
  const mask = layer.mask;
7897
7947
  if (!_optionalChain([mask, 'optionalAccess', _304 => _304.source])) return mask;
@@ -7973,7 +8023,7 @@ var ImageEditorController = (_class7 = class {
7973
8023
  out.surface = this.surfaceOf(layer);
7974
8024
  delete out.source;
7975
8025
  }
7976
- const active = _nullishCoalesce(_optionalChain([layer, 'access', _308 => _308.filters, 'optionalAccess', _309 => _309.filter, 'call', _310 => _310(_chunkXLUYXUBDcjs.isActiveFilter)]), () => ( []));
8026
+ const active = _nullishCoalesce(_optionalChain([layer, 'access', _308 => _308.filters, 'optionalAccess', _309 => _309.filter, 'call', _310 => _310(_chunkPMHPXCJCcjs.isActiveFilter)]), () => ( []));
7977
8027
  if (active.length) {
7978
8028
  add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
7979
8029
  const content = { ...out, visible: true, opacity: 1, blend: "normal" };
@@ -8006,8 +8056,8 @@ var ImageEditorController = (_class7 = class {
8006
8056
  const color = this.psdColorOptions(warnings);
8007
8057
  if (color.colorMode && this.bitDepth !== 8) warnings.push(`${color.colorMode.toUpperCase()} files are written at 8 bits per channel; the ${this.bitDepth}-bit samples were rounded.`);
8008
8058
  const depth = color.colorMode ? 8 : this.bitDepth;
8009
- const mergedDeep = depth === 8 ? void 0 : _chunkMZXQTKUMcjs.workingToSamples.call(void 0, _chunkXLUYXUBDcjs.compositeDeep.call(void 0, prepared, canvas, sources, depth), depth);
8010
- const result = _chunkXLUYXUBDcjs.exportPsd.call(void 0, { width, height, layers: prepared, merged, mergedDeep, resolution: this.psdResolution, patterns: this.state.patterns, globalLight: this.state.globalLight, depth, ...color });
8059
+ const mergedDeep = depth === 8 ? void 0 : _chunkMZXQTKUMcjs.workingToSamples.call(void 0, _chunkPMHPXCJCcjs.compositeDeep.call(void 0, prepared, canvas, sources, depth), depth);
8060
+ const result = _chunkPMHPXCJCcjs.exportPsd.call(void 0, { width, height, layers: prepared, merged, mergedDeep, resolution: this.psdResolution, patterns: this.state.patterns, globalLight: this.state.globalLight, depth, ...color });
8011
8061
  warnings.push(...result.warnings);
8012
8062
  return { bytes: result.bytes, warnings, psb: result.psb, width, height };
8013
8063
  }
@@ -8023,13 +8073,13 @@ var ImageEditorController = (_class7 = class {
8023
8073
  if (!this.samplePixelsOverride) this.samplePixels = null;
8024
8074
  if (this.state.selection && (sx !== 1 || sy !== 1)) {
8025
8075
  this.state.selection = normalizeSelection(
8026
- _chunkXLUYXUBDcjs.resizeSelection.call(void 0, this.state.selection, Math.round(next.dimensions.width), Math.round(next.dimensions.height))
8076
+ _chunkPMHPXCJCcjs.resizeSelection.call(void 0, this.state.selection, Math.round(next.dimensions.width), Math.round(next.dimensions.height))
8027
8077
  );
8028
8078
  }
8029
8079
  let layers = this.state.layers;
8030
8080
  if (sx !== 1 || sy !== 1) {
8031
8081
  if (this.state.crop) {
8032
- this.state.crop = _chunkXLUYXUBDcjs.clampCropToImage.call(void 0,
8082
+ this.state.crop = _chunkPMHPXCJCcjs.clampCropToImage.call(void 0,
8033
8083
  {
8034
8084
  x: Math.round(this.state.crop.x * sx),
8035
8085
  y: Math.round(this.state.crop.y * sy),
@@ -8048,17 +8098,17 @@ var ImageEditorController = (_class7 = class {
8048
8098
  } else if (l.type === "shape") {
8049
8099
  const a = l.annotation;
8050
8100
  const scaled = a ? scaleAnnotation(a, sx, sy) : null;
8051
- const fromAnnotation = scaled ? _chunkXLUYXUBDcjs.shapeFromAnnotation.call(void 0, scaled) : null;
8101
+ const fromAnnotation = scaled ? _chunkPMHPXCJCcjs.shapeFromAnnotation.call(void 0, scaled) : null;
8052
8102
  const m = [sx, 0, 0, sy, 0, 0];
8053
- const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _318 => _318.components]), () => ( _chunkXLUYXUBDcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
8103
+ const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _318 => _318.components]), () => ( _chunkPMHPXCJCcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
8054
8104
  const moved = { ...l, components, ...fromAnnotation ? { fill: fromAnnotation.fill, stroke: fromAnnotation.stroke } : {} };
8055
8105
  if (scaled && fromAnnotation) moved.annotation = scaled;
8056
8106
  else delete moved.annotation;
8057
- layers = _chunkMZXQTKUMcjs.mapLayer.call(void 0, layers, l.id, () => _chunkXLUYXUBDcjs.rerenderShape.call(void 0, moved, env));
8107
+ layers = _chunkMZXQTKUMcjs.mapLayer.call(void 0, layers, l.id, () => _chunkPMHPXCJCcjs.rerenderShape.call(void 0, moved, env));
8058
8108
  }
8059
8109
  }
8060
8110
  }
8061
- const bg = _chunkXLUYXUBDcjs.developTarget.call(void 0, layers, null);
8111
+ const bg = _chunkPMHPXCJCcjs.developTarget.call(void 0, layers, null);
8062
8112
  if (bg && bg.source !== "document") layers = _chunkMZXQTKUMcjs.mapLayer.call(void 0, layers, bg.id, () => ({ ...bg, source: "document" }));
8063
8113
  if (clearAnnotations) {
8064
8114
  for (const l of _chunkMZXQTKUMcjs.flattenLayers.call(void 0, layers)) if (l.type === "annotation" || (l.type === "shape" || l.type === "type") && l.annotation) layers = _chunkMZXQTKUMcjs.mapLayer.call(void 0, layers, l.id, () => null);
@@ -8079,7 +8129,7 @@ var ImageEditorController = (_class7 = class {
8079
8129
  let out;
8080
8130
  try {
8081
8131
  out = this.serializeState();
8082
- if (_optionalChain([this, 'access', _322 => _322.state, 'access', _323 => _323.selection, 'optionalAccess', _324 => _324.bounds])) out.selection = _chunkXLUYXUBDcjs.serializeSelection.call(void 0, this.state.selection);
8132
+ if (_optionalChain([this, 'access', _322 => _322.state, 'access', _323 => _323.selection, 'optionalAccess', _324 => _324.bounds])) out.selection = _chunkPMHPXCJCcjs.serializeSelection.call(void 0, this.state.selection);
8083
8133
  } finally {
8084
8134
  if (root) {
8085
8135
  this.state = current;
@@ -8087,8 +8137,8 @@ var ImageEditorController = (_class7 = class {
8087
8137
  this.viewKey = [];
8088
8138
  }
8089
8139
  }
8090
- if (!options || out.version !== _chunkXLUYXUBDcjs.LAYERED_SCHEMA_VERSION) return options ? Promise.resolve(out) : out;
8091
- return _chunkXLUYXUBDcjs.serializeLayersExternal.call(void 0, this.rootLayers(), options.store).then(({ layers, assets, smartContents }) => smartContents ? { ...out, layers, assets, smartContents } : { ...out, layers, assets });
8140
+ if (!options || out.version !== _chunkPMHPXCJCcjs.LAYERED_SCHEMA_VERSION) return options ? Promise.resolve(out) : out;
8141
+ return _chunkPMHPXCJCcjs.serializeLayersExternal.call(void 0, this.rootLayers(), options.store).then(({ layers, assets, smartContents }) => smartContents ? { ...out, layers, assets, smartContents } : { ...out, layers, assets });
8092
8142
  }
8093
8143
  /**
8094
8144
  * Loads a stored state whose v3 assets may live in an asset store (references other than data
@@ -8096,12 +8146,12 @@ var ImageEditorController = (_class7 = class {
8096
8146
  * out and listed in `lastLoadProblems`.
8097
8147
  */
8098
8148
  async loadJSONAsync(data, options = {}) {
8099
- if (data.version !== _chunkXLUYXUBDcjs.LAYERED_SCHEMA_VERSION || !data.assets) {
8149
+ if (data.version !== _chunkPMHPXCJCcjs.LAYERED_SCHEMA_VERSION || !data.assets) {
8100
8150
  this.loadJSON(data);
8101
8151
  return;
8102
8152
  }
8103
8153
  const problems = [];
8104
- const assets = await _chunkXLUYXUBDcjs.resolveExternalAssets.call(void 0, data.assets, options.store, problems);
8154
+ const assets = await _chunkPMHPXCJCcjs.resolveExternalAssets.call(void 0, data.assets, options.store, problems);
8105
8155
  this.loadJSON({ ...data, assets });
8106
8156
  this.lastLoadProblems = [...problems, ...this.lastLoadProblems];
8107
8157
  }
@@ -8113,8 +8163,8 @@ var ImageEditorController = (_class7 = class {
8113
8163
  let selection = null;
8114
8164
  if (data.selection) {
8115
8165
  try {
8116
- selection = normalizeSelection(_chunkXLUYXUBDcjs.deserializeSelection.call(void 0, data.selection));
8117
- } catch (e26) {
8166
+ selection = normalizeSelection(_chunkPMHPXCJCcjs.deserializeSelection.call(void 0, data.selection));
8167
+ } catch (e27) {
8118
8168
  selection = null;
8119
8169
  }
8120
8170
  }
@@ -8131,8 +8181,8 @@ var ImageEditorController = (_class7 = class {
8131
8181
  if (isLayered(data)) {
8132
8182
  const problems = [];
8133
8183
  const canvas = typeof data.width === "number" && data.width > 0 && typeof data.height === "number" && data.height > 0 ? { width: data.width, height: data.height } : this.naturalSize;
8134
- const storedPatterns = _chunkXLUYXUBDcjs.deserializePatterns.call(void 0, data.patterns, []);
8135
- s.layers = _chunkXLUYXUBDcjs.deserializeLayers.call(void 0, data.layers, {
8184
+ const storedPatterns = _chunkPMHPXCJCcjs.deserializePatterns.call(void 0, data.patterns, []);
8185
+ s.layers = _chunkPMHPXCJCcjs.deserializeLayers.call(void 0, data.layers, {
8136
8186
  assets: _nullishCoalesce(data.assets, () => ( {})),
8137
8187
  problems,
8138
8188
  smartContents: Array.isArray(data.smartContents) ? data.smartContents : [],
@@ -8150,7 +8200,7 @@ var ImageEditorController = (_class7 = class {
8150
8200
  const light = data.globalLight;
8151
8201
  if (light && Number.isFinite(light.angle) && Number.isFinite(light.altitude)) s.globalLight = { angle: light.angle, altitude: Math.min(90, Math.max(0, light.altitude)) };
8152
8202
  else delete s.globalLight;
8153
- const patterns = _chunkXLUYXUBDcjs.deserializePatterns.call(void 0, data.patterns, problems);
8203
+ const patterns = _chunkPMHPXCJCcjs.deserializePatterns.call(void 0, data.patterns, problems);
8154
8204
  if (patterns.length) s.patterns = patterns;
8155
8205
  else delete s.patterns;
8156
8206
  if (data.bitDepth === 16 || data.bitDepth === 32) s.bitDepth = data.bitDepth;
@@ -8166,7 +8216,7 @@ var ImageEditorController = (_class7 = class {
8166
8216
  }
8167
8217
  } else {
8168
8218
  const { width, height } = this.naturalSize;
8169
- const stack = _chunkXLUYXUBDcjs.layersFromLegacy.call(void 0, data, width, height);
8219
+ const stack = _chunkPMHPXCJCcjs.layersFromLegacy.call(void 0, data, width, height);
8170
8220
  s.layers = stack.layers;
8171
8221
  s.outputOpacity = stack.outputOpacity;
8172
8222
  if (stack.legacyOutputBlur !== void 0) s.legacyOutputBlur = stack.legacyOutputBlur;
@@ -8187,7 +8237,7 @@ var ImageEditorController = (_class7 = class {
8187
8237
  }
8188
8238
  serializeState() {
8189
8239
  const { width, height } = this.naturalSize;
8190
- const view = _chunkXLUYXUBDcjs.legacyView.call(void 0, this.stack(), width, height, null);
8240
+ const view = _chunkPMHPXCJCcjs.legacyView.call(void 0, this.stack(), width, height, null);
8191
8241
  if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _325 => _325.state, 'access', _326 => _326.patterns, 'optionalAccess', _327 => _327.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
8192
8242
  return {
8193
8243
  // States without adjustment layers keep schema 1, so they round-trip unchanged.
@@ -8202,9 +8252,9 @@ var ImageEditorController = (_class7 = class {
8202
8252
  annotations: JSON.parse(JSON.stringify(view.annotations))
8203
8253
  };
8204
8254
  }
8205
- const { layers, assets, smartContents } = _chunkXLUYXUBDcjs.serializeLayers.call(void 0, this.state.layers);
8255
+ const { layers, assets, smartContents } = _chunkPMHPXCJCcjs.serializeLayers.call(void 0, this.state.layers);
8206
8256
  const out = {
8207
- version: _chunkXLUYXUBDcjs.LAYERED_SCHEMA_VERSION,
8257
+ version: _chunkPMHPXCJCcjs.LAYERED_SCHEMA_VERSION,
8208
8258
  width,
8209
8259
  height,
8210
8260
  layers,
@@ -8216,7 +8266,7 @@ var ImageEditorController = (_class7 = class {
8216
8266
  };
8217
8267
  if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
8218
8268
  if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
8219
- if (_optionalChain([this, 'access', _331 => _331.state, 'access', _332 => _332.patterns, 'optionalAccess', _333 => _333.length])) out.patterns = _chunkXLUYXUBDcjs.serializePatterns.call(void 0, this.state.patterns);
8269
+ if (_optionalChain([this, 'access', _331 => _331.state, 'access', _332 => _332.patterns, 'optionalAccess', _333 => _333.length])) out.patterns = _chunkPMHPXCJCcjs.serializePatterns.call(void 0, this.state.patterns);
8220
8270
  if (smartContents) out.smartContents = smartContents;
8221
8271
  if (this.state.bitDepth === 16 || this.state.bitDepth === 32) out.bitDepth = this.state.bitDepth;
8222
8272
  if (this.state.colorProfile) out.colorProfile = serializeColorProfile(this.state.colorProfile);
@@ -8228,7 +8278,7 @@ function serializeAdjustments(adjustments) {
8228
8278
  const out = { ...adjustments };
8229
8279
  if (_optionalChain([out, 'access', _334 => _334.layers, 'optionalAccess', _335 => _335.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
8230
8280
  else delete out.layers;
8231
- if (_chunkXLUYXUBDcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkXLUYXUBDcjs.LEGACY_PROCESS_VERSION) {
8281
+ if (_chunkPMHPXCJCcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkPMHPXCJCcjs.LEGACY_PROCESS_VERSION) {
8232
8282
  delete out.process;
8233
8283
  if (!out.tint) delete out.tint;
8234
8284
  }
@@ -8239,7 +8289,7 @@ function withDevelop(layer, partial) {
8239
8289
  let i = filters.findIndex((f) => f.kind === "develop");
8240
8290
  if (i === -1) {
8241
8291
  filters.unshift({
8242
- id: layer.source === "document" ? _chunkXLUYXUBDcjs.DEVELOP_FILTER_ID : _chunkXLUYXUBDcjs.newLayerId.call(void 0, "flt"),
8292
+ id: layer.source === "document" ? _chunkPMHPXCJCcjs.DEVELOP_FILTER_ID : _chunkPMHPXCJCcjs.newLayerId.call(void 0, "flt"),
8243
8293
  kind: "develop",
8244
8294
  enabled: true,
8245
8295
  brightness: 0,
@@ -8248,7 +8298,7 @@ function withDevelop(layer, partial) {
8248
8298
  exposure: 0,
8249
8299
  temperature: 0,
8250
8300
  tint: 0,
8251
- process: _chunkXLUYXUBDcjs.LATEST_PROCESS_VERSION
8301
+ process: _chunkPMHPXCJCcjs.LATEST_PROCESS_VERSION
8252
8302
  });
8253
8303
  i = 0;
8254
8304
  }
@@ -8257,7 +8307,7 @@ function withDevelop(layer, partial) {
8257
8307
  const v = partial[k];
8258
8308
  if (typeof v === "number" && Number.isFinite(v)) next[k] = v;
8259
8309
  }
8260
- if ("process" in partial) next.process = _chunkXLUYXUBDcjs.normalizeProcessVersion.call(void 0, partial.process);
8310
+ if ("process" in partial) next.process = _chunkPMHPXCJCcjs.normalizeProcessVersion.call(void 0, partial.process);
8261
8311
  filters[i] = next;
8262
8312
  return { ...layer, filters };
8263
8313
  }
@@ -8266,7 +8316,7 @@ function withBlur(layer, radius) {
8266
8316
  const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
8267
8317
  if (radius > 0) {
8268
8318
  filters.push({
8269
- id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _339 => _339.id]), () => ( (layer.source === "document" ? _chunkXLUYXUBDcjs.BLUR_FILTER_ID : _chunkXLUYXUBDcjs.newLayerId.call(void 0, "flt")))),
8319
+ id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _339 => _339.id]), () => ( (layer.source === "document" ? _chunkPMHPXCJCcjs.BLUR_FILTER_ID : _chunkPMHPXCJCcjs.newLayerId.call(void 0, "flt")))),
8270
8320
  kind: "blur",
8271
8321
  enabled: true,
8272
8322
  radius
@@ -8290,7 +8340,7 @@ function mergeAdjustmentNode(node, update, width, height) {
8290
8340
  if (!update.mask) delete next.mask;
8291
8341
  else {
8292
8342
  const current = node.mask && !node.mask.source ? node.mask : null;
8293
- const memo = current ? _chunkXLUYXUBDcjs.legacyMaskOf.call(void 0, current, width, height) : null;
8343
+ const memo = current ? _chunkPMHPXCJCcjs.legacyMaskOf.call(void 0, current, width, height) : null;
8294
8344
  if (current && memo && memo.width === update.mask.width && memo.height === update.mask.height && memo.rle === update.mask.rle) {
8295
8345
  next.mask = withMaskProps(current, {
8296
8346
  density: _nullishCoalesce(update.mask.density, () => ( 1)),
@@ -8298,7 +8348,7 @@ function mergeAdjustmentNode(node, update, width, height) {
8298
8348
  enabled: update.mask.enabled !== false
8299
8349
  });
8300
8350
  } else {
8301
- const m = _chunkXLUYXUBDcjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height);
8351
+ const m = _chunkPMHPXCJCcjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height);
8302
8352
  if (m) next.mask = m;
8303
8353
  else delete next.mask;
8304
8354
  }
@@ -8337,7 +8387,7 @@ function resizeLegacyMasks(layers, from, to) {
8337
8387
  for (const l of _chunkMZXQTKUMcjs.flattenLayers.call(void 0, layers)) {
8338
8388
  if (l.type !== "adjustment" || !l.mask || l.mask.source) continue;
8339
8389
  const old = l.mask;
8340
- const mask = _chunkXLUYXUBDcjs.rasterMaskFromLegacy.call(void 0, _chunkXLUYXUBDcjs.legacyMaskOf.call(void 0, old, fw, fh), tw, th);
8390
+ const mask = _chunkPMHPXCJCcjs.rasterMaskFromLegacy.call(void 0, _chunkPMHPXCJCcjs.legacyMaskOf.call(void 0, old, fw, fh), tw, th);
8341
8391
  if (!mask) continue;
8342
8392
  out = _chunkMZXQTKUMcjs.mapLayer.call(void 0, out, l.id, (n) => ({ ...n, mask: { ...mask, density: old.density, feather: old.feather, enabled: old.enabled } }));
8343
8393
  }
@@ -8433,12 +8483,12 @@ function withoutAnnotations(layers) {
8433
8483
  function parseColor(value) {
8434
8484
  if (Array.isArray(value)) {
8435
8485
  if (value.length < 3 || value.length > 4 || !value.every((v) => typeof v === "number" && v >= 0 && v <= 255)) {
8436
- throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("A colour array is [r, g, b] or [r, g, b, a] with values 0..255.");
8486
+ throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("A colour array is [r, g, b] or [r, g, b, a] with values 0..255.");
8437
8487
  }
8438
8488
  return [Math.round(value[0]), Math.round(value[1]), Math.round(value[2]), Math.round(_nullishCoalesce(value[3], () => ( 255)))];
8439
8489
  }
8440
8490
  const m = /^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(String(value).trim());
8441
- if (!m) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Invalid colour "${value}"; use #rrggbb or #rrggbbaa.`);
8491
+ if (!m) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Invalid colour "${value}"; use #rrggbb or #rrggbbaa.`);
8442
8492
  let hex = m[1];
8443
8493
  if (hex.length === 3) hex = hex.split("").map((c) => c + c).join("");
8444
8494
  const n = (i) => parseInt(hex.slice(i, i + 2), 16);
@@ -8448,7 +8498,7 @@ function readImagePaint(raw) {
8448
8498
  try {
8449
8499
  return _chunk6GFRKLLScjs.parsePaintSource.call(void 0, raw);
8450
8500
  } catch (e) {
8451
- if (e instanceof _chunk6GFRKLLScjs.PaintSourceError) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(e.message);
8501
+ if (e instanceof _chunk6GFRKLLScjs.PaintSourceError) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(e.message);
8452
8502
  throw e;
8453
8503
  }
8454
8504
  }
@@ -8561,7 +8611,7 @@ function loadImageEditorDocument(input) {
8561
8611
  if (typeof input === "string") {
8562
8612
  try {
8563
8613
  parsed = JSON.parse(input);
8564
- } catch (e27) {
8614
+ } catch (e28) {
8565
8615
  parsed = input;
8566
8616
  }
8567
8617
  }
@@ -8596,7 +8646,7 @@ function loadImageEditorDocument(input) {
8596
8646
  // Optional: only present when something was selected when saving.
8597
8647
  selection: {
8598
8648
  parse: (value) => {
8599
- const mask = _chunkXLUYXUBDcjs.deserializeSelection.call(void 0, value);
8649
+ const mask = _chunkPMHPXCJCcjs.deserializeSelection.call(void 0, value);
8600
8650
  const v = value;
8601
8651
  return { width: mask.width, height: mask.height, rle: v.rle };
8602
8652
  },
@@ -8684,7 +8734,7 @@ function loadLayeredDocument(doc) {
8684
8734
  },
8685
8735
  selection: {
8686
8736
  parse: (value) => {
8687
- const mask = _chunkXLUYXUBDcjs.deserializeSelection.call(void 0, value);
8737
+ const mask = _chunkPMHPXCJCcjs.deserializeSelection.call(void 0, value);
8688
8738
  const v = value;
8689
8739
  return { width: mask.width, height: mask.height, rle: v.rle };
8690
8740
  },
@@ -9078,14 +9128,14 @@ function describeSelection(mask) {
9078
9128
  // src/image-editor/selection-tools.ts
9079
9129
  var modeSchema = {
9080
9130
  type: "string",
9081
- enum: [..._chunkXLUYXUBDcjs.SELECTION_MODES],
9131
+ enum: [..._chunkPMHPXCJCcjs.SELECTION_MODES],
9082
9132
  description: "How the result combines with the current selection (default replace)."
9083
9133
  };
9084
9134
  var num = (v, d) => typeof v === "number" && Number.isFinite(v) ? v : d;
9085
9135
  function summary(controller) {
9086
9136
  const sel = controller.getSelection();
9087
9137
  const { width, height } = controller.getState().imageDimensions;
9088
- const area = _chunkXLUYXUBDcjs.selectionArea.call(void 0, sel);
9138
+ const area = _chunkPMHPXCJCcjs.selectionArea.call(void 0, sel);
9089
9139
  return {
9090
9140
  empty: !sel,
9091
9141
  bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _351 => _351.bounds]), () => ( null)),
@@ -9131,7 +9181,7 @@ function createImageSelectionTools(controller) {
9131
9181
  },
9132
9182
  annotations: writeAnnotations("Select a region", true),
9133
9183
  handler: ({ shape, x, y, width, height, mode, feather }) => {
9134
- const opts = { mode: _chunkXLUYXUBDcjs.parseSelectionMode.call(void 0, mode), feather: num(feather, 0) };
9184
+ const opts = { mode: _chunkPMHPXCJCcjs.parseSelectionMode.call(void 0, mode), feather: num(feather, 0) };
9135
9185
  switch (shape) {
9136
9186
  case "all":
9137
9187
  controller.selectAll();
@@ -9184,7 +9234,7 @@ function createImageSelectionTools(controller) {
9184
9234
  annotations: writeAnnotations("Select by colour", true),
9185
9235
  handler: async ({ x, y, color, tolerance, contiguous, fuzziness, sampleMerged, sample, mode }) => {
9186
9236
  const common = {
9187
- mode: _chunkXLUYXUBDcjs.parseSelectionMode.call(void 0, mode),
9237
+ mode: _chunkPMHPXCJCcjs.parseSelectionMode.call(void 0, mode),
9188
9238
  sampleMerged: sampleMerged === true,
9189
9239
  sample: _nullishCoalesce(sample, () => ( "composite"))
9190
9240
  };
@@ -9205,7 +9255,7 @@ function createImageSelectionTools(controller) {
9205
9255
  inputSchema: {
9206
9256
  type: "object",
9207
9257
  properties: {
9208
- op: { type: "string", enum: [..._chunkXLUYXUBDcjs.SELECTION_MODIFY_OPS], description: "How to modify the selection." },
9258
+ op: { type: "string", enum: [..._chunkPMHPXCJCcjs.SELECTION_MODIFY_OPS], description: "How to modify the selection." },
9209
9259
  radius: { type: "number", minimum: 0, maximum: 500, description: "Radius in pixels." }
9210
9260
  },
9211
9261
  required: ["op", "radius"],
@@ -9213,7 +9263,7 @@ function createImageSelectionTools(controller) {
9213
9263
  },
9214
9264
  annotations: writeAnnotations("Modify the selection"),
9215
9265
  handler: ({ op, radius }) => {
9216
- if (!_chunkXLUYXUBDcjs.SELECTION_MODIFY_OPS.includes(op)) throw new Error(`Unknown op "${String(op)}".`);
9266
+ if (!_chunkPMHPXCJCcjs.SELECTION_MODIFY_OPS.includes(op)) throw new Error(`Unknown op "${String(op)}".`);
9217
9267
  if (!controller.getSelection()) throw new Error("Nothing is selected.");
9218
9268
  controller.modifySelection(op, Math.min(500, Math.max(0, num(radius, 0))));
9219
9269
  return summary(controller);
@@ -9257,7 +9307,7 @@ function createImageSelectionTools(controller) {
9257
9307
  type: "object",
9258
9308
  properties: {
9259
9309
  layerId: { type: "string", description: "Existing adjustment layer to mask." },
9260
- kind: { type: "string", enum: _chunkXLUYXUBDcjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Kind of a new layer to add and mask (instead of layerId)." },
9310
+ kind: { type: "string", enum: _chunkPMHPXCJCcjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Kind of a new layer to add and mask (instead of layerId)." },
9261
9311
  params: { type: "object", description: "Parameters for the new layer (see list_controls)." },
9262
9312
  density: { type: "number", minimum: 0, maximum: 1, description: "Mask density 0-1." },
9263
9313
  feather: { type: "number", minimum: 0, maximum: 1e3, description: "Mask feather in pixels." }
@@ -9277,11 +9327,11 @@ function createImageSelectionTools(controller) {
9277
9327
  if (!controller.getAdjustmentLayer(layerId)) throw new Error(`No adjustment layer "${layerId}".`);
9278
9328
  controller.applySelectionAsLayerMask(layerId, props);
9279
9329
  id = layerId;
9280
- } else if (_chunkXLUYXUBDcjs.isAdjustmentKind.call(void 0, kind)) {
9330
+ } else if (_chunkPMHPXCJCcjs.isAdjustmentKind.call(void 0, kind)) {
9281
9331
  id = controller.addAdjustmentLayer({
9282
9332
  kind,
9283
9333
  params,
9284
- mask: _chunkXLUYXUBDcjs.layerMaskFromSelection.call(void 0, sel, props)
9334
+ mask: _chunkPMHPXCJCcjs.layerMaskFromSelection.call(void 0, sel, props)
9285
9335
  });
9286
9336
  } else {
9287
9337
  throw new Error("Pass layerId (an existing layer) or kind (a new adjustment layer).");
@@ -9418,11 +9468,11 @@ function createImageEditTools(controller) {
9418
9468
  const geometry2 = () => {
9419
9469
  const s = controller.getState();
9420
9470
  const region = _nullishCoalesce(s.crop, () => ( { x: 0, y: 0, ...s.imageDimensions }));
9421
- const out = _chunkXLUYXUBDcjs.getRotatedSize.call(void 0, region.width, region.height, s.transform);
9471
+ const out = _chunkPMHPXCJCcjs.getRotatedSize.call(void 0, region.width, region.height, s.transform);
9422
9472
  return {
9423
9473
  image: { ...s.imageDimensions },
9424
9474
  crop: s.crop ? { ...s.crop } : null,
9425
- rotation: _chunkXLUYXUBDcjs.normalizeAngle.call(void 0, s.transform.rotate),
9475
+ rotation: _chunkPMHPXCJCcjs.normalizeAngle.call(void 0, s.transform.rotate),
9426
9476
  flipH: s.transform.flipH,
9427
9477
  flipV: s.transform.flipV,
9428
9478
  output: { width: Math.round(out.width), height: Math.round(out.height) }
@@ -9657,7 +9707,7 @@ function describeLayer(layer, activeId, boundsOf) {
9657
9707
  const out = {
9658
9708
  id: layer.id,
9659
9709
  type: layer.type,
9660
- name: layer.name || (layer.type === "adjustment" ? _chunkXLUYXUBDcjs.adjustmentKindLabel.call(void 0, layer.kind) : ""),
9710
+ name: layer.name || (layer.type === "adjustment" ? _chunkPMHPXCJCcjs.adjustmentKindLabel.call(void 0, layer.kind) : ""),
9661
9711
  visible: layer.visible,
9662
9712
  opacity: round3(layer.opacity),
9663
9713
  blend: layer.blend,
@@ -9746,8 +9796,8 @@ function createImageLayerTools(controller) {
9746
9796
  };
9747
9797
  };
9748
9798
  const exists = (id, what = "layerId") => {
9749
- if (typeof id !== "string" || !id) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`${what} is required (a layer id from list_layers).`);
9750
- _chunkXLUYXUBDcjs.requireLayer.call(void 0, controller.getLayers(), id);
9799
+ if (typeof id !== "string" || !id) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`${what} is required (a layer id from list_layers).`);
9800
+ _chunkPMHPXCJCcjs.requireLayer.call(void 0, controller.getLayers(), id);
9751
9801
  return id;
9752
9802
  };
9753
9803
  const listLayers = {
@@ -9783,7 +9833,7 @@ function createImageLayerTools(controller) {
9783
9833
  handler: ({ layerId, target }) => {
9784
9834
  const id = exists(layerId);
9785
9835
  const layer = controller.getLayer(id);
9786
- if (target === "mask" && !layer.mask) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
9836
+ if (target === "mask" && !layer.mask) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
9787
9837
  controller.setActiveLayer(id, _nullishCoalesce(target, () => ( "pixels")));
9788
9838
  return { layer: describe(id), activeTarget: controller.getState().activeTarget };
9789
9839
  }
@@ -9808,7 +9858,7 @@ function createImageLayerTools(controller) {
9808
9858
  },
9809
9859
  annotations: { title: "Add a pixel layer", ...WRITE2 },
9810
9860
  handler: async (args) => {
9811
- if (args.color !== void 0 && args.image !== void 0) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give color or image, not both.");
9861
+ if (args.color !== void 0 && args.image !== void 0) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give color or image, not both.");
9812
9862
  for (const k of ["aboveId", "belowId", "parentId"]) if (args[k] !== void 0) exists(args[k], k);
9813
9863
  const init = {
9814
9864
  name: args.name,
@@ -9898,7 +9948,7 @@ function createImageLayerTools(controller) {
9898
9948
  const id = exists(args.layerId);
9899
9949
  const props = {};
9900
9950
  for (const k of ["name", "visible", "opacity", "fillOpacity", "blend", "clipped", "locks", "collapsed"]) if (args[k] !== void 0) props[k] = args[k];
9901
- if (!Object.keys(props).length) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give at least one property to change.");
9951
+ if (!Object.keys(props).length) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give at least one property to change.");
9902
9952
  controller.setLayerProperties(id, props);
9903
9953
  return { layer: describe(id) };
9904
9954
  }
@@ -9992,8 +10042,8 @@ function createImageLayerTools(controller) {
9992
10042
  annotations: { title: "Move a layer's pixels", ...WRITE2 },
9993
10043
  handler: ({ layerId, x, y, dx, dy }) => {
9994
10044
  const id = exists(layerId);
9995
- if ([x, y, dx, dy].every((v) => v === void 0)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give x and y, or dx and dy.");
9996
- if ((x !== void 0 || y !== void 0) && (dx !== void 0 || dy !== void 0)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give x / y or dx / dy, not both.");
10045
+ if ([x, y, dx, dy].every((v) => v === void 0)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give x and y, or dx and dy.");
10046
+ if ((x !== void 0 || y !== void 0) && (dx !== void 0 || dy !== void 0)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give x / y or dx / dy, not both.");
9997
10047
  return { layerId: id, ...controller.offsetLayer(id, { x, y, dx, dy }) };
9998
10048
  }
9999
10049
  };
@@ -10065,7 +10115,7 @@ function createImageLayerTools(controller) {
10065
10115
  annotations: { title: "Set layer mask properties", ...WRITE_IDEMPOTENT2 },
10066
10116
  handler: ({ layerId, density, feather, enabled, linked }) => {
10067
10117
  const id = exists(layerId);
10068
- if ([density, feather, enabled, linked].every((v) => v === void 0)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give density, feather, enabled or linked.");
10118
+ if ([density, feather, enabled, linked].every((v) => v === void 0)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give density, feather, enabled or linked.");
10069
10119
  const mask = controller.setLayerMaskProps(id, {
10070
10120
  density,
10071
10121
  feather,
@@ -10148,7 +10198,7 @@ function createImageLayerTools(controller) {
10148
10198
  handler: (args) => {
10149
10199
  const id = exists(args.layerId);
10150
10200
  const changes = filterValues(args);
10151
- if (!Object.keys(changes).length) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give at least one value to change.");
10201
+ if (!Object.keys(changes).length) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give at least one value to change.");
10152
10202
  return { layerId: id, filters: controller.updateLayerFilter(id, args.filterId, changes) };
10153
10203
  }
10154
10204
  };
@@ -10412,8 +10462,8 @@ function describeLayerEffects(effects) {
10412
10462
  }
10413
10463
  function createImageEffectTools(controller) {
10414
10464
  const layerArg = (id) => {
10415
- if (typeof id !== "string" || !id) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("layerId is required (a layer id from list_layers).");
10416
- _chunkXLUYXUBDcjs.requireLayer.call(void 0, controller.getLayers(), id);
10465
+ if (typeof id !== "string" || !id) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("layerId is required (a layer id from list_layers).");
10466
+ _chunkPMHPXCJCcjs.requireLayer.call(void 0, controller.getLayers(), id);
10417
10467
  return id;
10418
10468
  };
10419
10469
  const result = (layerId, extra = {}) => ({ layerId, ...extra, ...describeLayerEffects(controller.getLayerEffects(layerId)) });
@@ -10444,7 +10494,7 @@ function createImageEffectTools(controller) {
10444
10494
  annotations: { title: "Add a layer effect", ...WRITE3 },
10445
10495
  handler: ({ layerId, kind, settings, index }) => {
10446
10496
  const id = layerArg(layerId);
10447
- if (!_chunkMZXQTKUMcjs.isLayerEffectKind.call(void 0, kind)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`kind must be one of ${_chunkMZXQTKUMcjs.LAYER_EFFECT_KINDS.join(", ")}.`);
10497
+ if (!_chunkMZXQTKUMcjs.isLayerEffectKind.call(void 0, kind)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`kind must be one of ${_chunkMZXQTKUMcjs.LAYER_EFFECT_KINDS.join(", ")}.`);
10448
10498
  const { effect } = controller.addLayerEffect(id, kind, _nullishCoalesce(settings, () => ( {})), index);
10449
10499
  return result(id, { effectId: effect.id });
10450
10500
  }
@@ -10464,7 +10514,7 @@ function createImageEffectTools(controller) {
10464
10514
  handler: ({ layerId, effectId, settings }) => {
10465
10515
  const id = layerArg(layerId);
10466
10516
  const changes = _nullishCoalesce(settings, () => ( {}));
10467
- if (!Object.keys(changes).length) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give at least one setting to change.");
10517
+ if (!Object.keys(changes).length) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give at least one setting to change.");
10468
10518
  controller.updateLayerEffect(id, effectId, changes);
10469
10519
  return result(id);
10470
10520
  }
@@ -10516,7 +10566,7 @@ function createImageEffectTools(controller) {
10516
10566
  },
10517
10567
  annotations: { title: "Set the global light", ...WRITE_IDEMPOTENT3 },
10518
10568
  handler: ({ angle, altitude }) => {
10519
- if (angle === void 0 && altitude === void 0) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give angle, altitude or both.");
10569
+ if (angle === void 0 && altitude === void 0) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give angle, altitude or both.");
10520
10570
  const next = {};
10521
10571
  if (angle !== void 0) next.angle = angle;
10522
10572
  if (altitude !== void 0) next.altitude = altitude;
@@ -10697,7 +10747,7 @@ var PaintGesture = (_class8 = class {
10697
10747
  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.`);
10698
10748
  if (_optionalChain([layer, 'access', _365 => _365.locks, 'optionalAccess', _366 => _366.all]) || _optionalChain([layer, 'access', _367 => _367.locks, 'optionalAccess', _368 => _368.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
10699
10749
  const origin = layer.type === "pixel" ? { ...layer.offset } : layer.type === "smart" ? { ...layer.placement.corners[0] } : (() => {
10700
- const b = _chunkXLUYXUBDcjs.shapeGeometryBounds.call(void 0, layer);
10750
+ const b = _chunkPMHPXCJCcjs.shapeGeometryBounds.call(void 0, layer);
10701
10751
  return b ? { x: b.x, y: b.y } : { x: 0, y: 0 };
10702
10752
  })();
10703
10753
  this.move = { id: layer.id, start: { x: sample.x, y: sample.y }, origin, moved: false };
@@ -10855,9 +10905,9 @@ function createImagePaintTools(controller) {
10855
10905
  annotations: { title: "Paint a brush stroke", ...WRITE4 },
10856
10906
  handler: (args) => {
10857
10907
  const tool = args.tool;
10858
- if (args.mixer !== void 0 && tool !== "mixer") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)('mixer settings apply to the Mixer Brush only; pass tool "mixer", or drop mixer.');
10859
- if (args.paint !== void 0 && (_nullishCoalesce(tool, () => ( "brush"))) !== "brush") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)('paint applies to the brush only (the eraser removes paint; the Mixer Brush loads color); drop paint or use tool "brush".');
10860
- if (args.paint !== void 0 && args.color !== void 0) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give color or paint, not both.");
10908
+ if (args.mixer !== void 0 && tool !== "mixer") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)('mixer settings apply to the Mixer Brush only; pass tool "mixer", or drop mixer.');
10909
+ if (args.paint !== void 0 && (_nullishCoalesce(tool, () => ( "brush"))) !== "brush") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)('paint applies to the brush only (the eraser removes paint; the Mixer Brush loads color); drop paint or use tool "brush".');
10910
+ if (args.paint !== void 0 && args.color !== void 0) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give color or paint, not both.");
10861
10911
  const result = controller.paintStroke({
10862
10912
  tool,
10863
10913
  points: args.points,
@@ -10987,8 +11037,8 @@ function profileArg(v) {
10987
11037
  if (s.startsWith("icc:")) {
10988
11038
  try {
10989
11039
  return _chunkDCLJNVZScjs.base64ToBytes.call(void 0, s.slice(4));
10990
- } catch (e28) {
10991
- throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("The icc: value is not valid base64.");
11040
+ } catch (e29) {
11041
+ throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("The icc: value is not valid base64.");
10992
11042
  }
10993
11043
  }
10994
11044
  return s;
@@ -11020,7 +11070,7 @@ function createImageColorTools(controller) {
11020
11070
  const convert = {
11021
11071
  name: "convert_to_profile",
11022
11072
  title: "Convert to a colour profile",
11023
- description: "Edit \u203A Convert to Profile: converts every pixel layer's numbers so its colours stay the same in `profile`, then makes `profile` the document's. Colours outside the new space are mapped by `intent`. Shape and type layers, layer effects and smart objects keep their numbers and are listed in unconvertedLayerIds. RGB profiles only (proof CMYK with set_proof_setup). One undo step. Returns the profile, convertedLayerIds and unconvertedLayerIds.",
11073
+ description: "Edit \u203A Convert to Profile: converts every pixel layer's numbers so its colours stay the same in `profile`, then makes `profile` the document's. Colours outside the new space are mapped by `intent`. Shape fills and strokes, text colours, layer-effect colours and annotation colours convert too (and re-render); smart objects keep their contents' numbers and are listed in unconvertedLayerIds. RGB profiles only (proof CMYK with set_proof_setup). One undo step. Returns the profile, convertedLayerIds and unconvertedLayerIds.",
11024
11074
  inputSchema: {
11025
11075
  type: "object",
11026
11076
  properties: {
@@ -11053,10 +11103,10 @@ function createImageColorTools(controller) {
11053
11103
  annotations: { title: "Set up soft proofing", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
11054
11104
  handler: (args) => {
11055
11105
  if (args.off === true) {
11056
- if (args.profile !== void 0) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give either off true or a profile, not both.");
11106
+ if (args.profile !== void 0) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give either off true or a profile, not both.");
11057
11107
  return controller.setProofSetup(null);
11058
11108
  }
11059
- if (args.profile === void 0) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Pass the profile to proof with (e.g. coated-cmyk), or off true.");
11109
+ if (args.profile === void 0) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Pass the profile to proof with (e.g. coated-cmyk), or off true.");
11060
11110
  const s = controller.setProofSetup({
11061
11111
  profile: profileArg(args.profile),
11062
11112
  ...args.intent !== void 0 ? { intent: args.intent } : {},
@@ -11108,7 +11158,7 @@ function createImageColorTools(controller) {
11108
11158
  },
11109
11159
  annotations: { title: "Set the colour mode", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
11110
11160
  handler: (args) => {
11111
- if (args.mode !== "cmyk" && (args.profile !== void 0 || args.intent !== void 0)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("profile and intent apply to CMYK mode only.");
11161
+ if (args.mode !== "cmyk" && (args.profile !== void 0 || args.intent !== void 0)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("profile and intent apply to CMYK mode only.");
11112
11162
  return controller.setColorMode(args.mode, {
11113
11163
  ...args.profile !== void 0 ? { profile: profileArg(args.profile) } : {},
11114
11164
  ...args.intent !== void 0 ? { intent: args.intent } : {}
@@ -11173,7 +11223,7 @@ function checkSource(controller, source) {
11173
11223
  const p = source;
11174
11224
  const { width, height } = controller.getState().imageDimensions;
11175
11225
  if (!(p.x >= 0 && p.y >= 0 && p.x < width && p.y < height)) {
11176
- throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`source (${p.x}, ${p.y}) is outside the ${width} \xD7 ${height} canvas; pick a point on the image to sample.`);
11226
+ throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`source (${p.x}, ${p.y}) is outside the ${width} \xD7 ${height} canvas; pick a point on the image to sample.`);
11177
11227
  }
11178
11228
  return p;
11179
11229
  }
@@ -11367,10 +11417,10 @@ function createImageRetouchTools(controller) {
11367
11417
  annotations: { title: "Set the clone source", ...WRITE5, idempotentHint: true },
11368
11418
  handler: (args) => {
11369
11419
  if (args.clear === true) {
11370
- if (args.x !== void 0 || args.y !== void 0) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give either clear true or x and y, not both.");
11420
+ if (args.x !== void 0 || args.y !== void 0) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give either clear true or x and y, not both.");
11371
11421
  return controller.setCloneSource(null);
11372
11422
  }
11373
- if (typeof args.x !== "number" || typeof args.y !== "number") throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Pass x and y (document pixels) for the source point, or clear true to remove it.");
11423
+ if (typeof args.x !== "number" || typeof args.y !== "number") throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Pass x and y (document pixels) for the source point, or clear true to remove it.");
11374
11424
  return controller.setCloneSource(checkSource(controller, { x: args.x, y: args.y }));
11375
11425
  }
11376
11426
  };
@@ -11391,11 +11441,11 @@ var DATA = {
11391
11441
  description: "The PSD or PSB file as base64 (a `data:` URL prefix is accepted)."
11392
11442
  };
11393
11443
  function psdBytesFromBase64(data) {
11394
- if (typeof data !== "string" || !data.trim()) throw new (0, _chunkXLUYXUBDcjs.PsdError)("data is required: the PSD file as base64.");
11444
+ if (typeof data !== "string" || !data.trim()) throw new (0, _chunkPMHPXCJCcjs.PsdError)("data is required: the PSD file as base64.");
11395
11445
  const body = data.trim().replace(/^data:[^,]*;base64,/i, "");
11396
- if (!/^[A-Za-z0-9+/=_\s-]+$/.test(body)) throw new (0, _chunkXLUYXUBDcjs.PsdError)("data is not base64; send the PSD file bytes base64-encoded.");
11446
+ if (!/^[A-Za-z0-9+/=_\s-]+$/.test(body)) throw new (0, _chunkPMHPXCJCcjs.PsdError)("data is not base64; send the PSD file bytes base64-encoded.");
11397
11447
  const bytes = _chunkDCLJNVZScjs.base64ToBytes.call(void 0, body);
11398
- if (bytes.length < 26) throw new (0, _chunkXLUYXUBDcjs.PsdError)(`data decodes to ${bytes.length} bytes, too short for a PSD (at least 26).`);
11448
+ if (bytes.length < 26) throw new (0, _chunkPMHPXCJCcjs.PsdError)(`data decodes to ${bytes.length} bytes, too short for a PSD (at least 26).`);
11399
11449
  return bytes;
11400
11450
  }
11401
11451
  function createImagePsdTools(controller) {
@@ -11406,7 +11456,7 @@ function createImagePsdTools(controller) {
11406
11456
  inputSchema: { type: "object", properties: { data: DATA }, required: ["data"], additionalProperties: false },
11407
11457
  annotations: { title: "Inspect a PSD", ...READ7 },
11408
11458
  handler: ({ data }) => {
11409
- const res = _chunkXLUYXUBDcjs.importPsd.call(void 0, psdBytesFromBase64(data), { skipPixels: true });
11459
+ const res = _chunkPMHPXCJCcjs.importPsd.call(void 0, psdBytesFromBase64(data), { skipPixels: true });
11410
11460
  return {
11411
11461
  width: res.width,
11412
11462
  height: res.height,
@@ -11493,7 +11543,7 @@ var GEOMETRY = {
11493
11543
  dy: { type: "number", description: "Move down after scaling and rotating, in document pixels (default 0)." },
11494
11544
  reference: {
11495
11545
  description: "Fixed point of scale, skew and rotate: an anchor of the frame (top-left, top, top-right, left, center, right, bottom-left, bottom, bottom-right; default center) or a document point {x, y}.",
11496
- anyOf: [{ type: "string", enum: _chunkXLUYXUBDcjs.TRANSFORM_ANCHORS }, POINT]
11546
+ anyOf: [{ type: "string", enum: _chunkPMHPXCJCcjs.TRANSFORM_ANCHORS }, POINT]
11497
11547
  },
11498
11548
  matrix: {
11499
11549
  type: "array",
@@ -11514,14 +11564,14 @@ var NUMERIC = ["scaleX", "scaleY", "rotate", "skewX", "skewY", "dx", "dy", "refe
11514
11564
  function geometryFrom(args) {
11515
11565
  const numeric = NUMERIC.filter((k) => args[k] !== void 0);
11516
11566
  const ways = [numeric.length > 0, args.matrix !== void 0, args.corners !== void 0].filter(Boolean).length;
11517
- if (ways === 0) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give the transform one way: numeric fields (scaleX, scaleY, rotate, skewX, skewY, dx, dy, reference), matrix, or corners.");
11518
- if (ways > 1) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give the transform only one way: numeric fields, matrix or corners, not a mix.");
11567
+ if (ways === 0) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give the transform one way: numeric fields (scaleX, scaleY, rotate, skewX, skewY, dx, dy, reference), matrix, or corners.");
11568
+ if (ways > 1) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give the transform only one way: numeric fields, matrix or corners, not a mix.");
11519
11569
  if (args.matrix !== void 0) return { matrix: args.matrix };
11520
11570
  if (args.corners !== void 0) return { corners: args.corners };
11521
11571
  const params = {};
11522
11572
  for (const k of NUMERIC) if (args[k] !== void 0) params[k] = args[k];
11523
- if (params.scaleX === 0 || params.scaleY === 0) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the layer to a line).");
11524
- if (typeof params.reference === "string" && !_chunkXLUYXUBDcjs.isTransformAnchor.call(void 0, params.reference)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Unknown reference "${params.reference}". Use ${_chunkXLUYXUBDcjs.TRANSFORM_ANCHORS.join(", ")} or {x, y}.`);
11573
+ if (params.scaleX === 0 || params.scaleY === 0) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the layer to a line).");
11574
+ if (typeof params.reference === "string" && !_chunkPMHPXCJCcjs.isTransformAnchor.call(void 0, params.reference)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Unknown reference "${params.reference}". Use ${_chunkPMHPXCJCcjs.TRANSFORM_ANCHORS.join(", ")} or {x, y}.`);
11525
11575
  return { params };
11526
11576
  }
11527
11577
  function targetFrom(args) {
@@ -11570,15 +11620,15 @@ function createImageTransformTools(controller) {
11570
11620
  moved: [...s.moves],
11571
11621
  frame: { ...s.box },
11572
11622
  corners: s.startGeometry.corners.map(roundPoint),
11573
- center: roundPoint(_chunkXLUYXUBDcjs.anchorPoint.call(void 0, s.startGeometry, "center"))
11623
+ center: roundPoint(_chunkPMHPXCJCcjs.anchorPoint.call(void 0, s.startGeometry, "center"))
11574
11624
  };
11575
11625
  if (s.smartObject) out.smartObject = true;
11576
11626
  s.cancel();
11577
11627
  if (args.meshColumns !== void 0) {
11578
11628
  const cols = args.meshColumns;
11579
11629
  const rows = _nullishCoalesce(args.meshRows, () => ( cols));
11580
- const mesh = _chunkORE334I6cjs.identityWarpMesh.call(void 0, s.box, cols, rows);
11581
- out.mesh = { columns: cols, rows, pointsPerRow: _chunkORE334I6cjs.warpMeshColumns.call(void 0, mesh), pointRows: _chunkORE334I6cjs.warpMeshRows.call(void 0, mesh), points: mesh.points.map(roundPoint) };
11630
+ const mesh = _chunkLXGOYRPEcjs.identityWarpMesh.call(void 0, s.box, cols, rows);
11631
+ out.mesh = { columns: cols, rows, pointsPerRow: _chunkLXGOYRPEcjs.warpMeshColumns.call(void 0, mesh), pointRows: _chunkLXGOYRPEcjs.warpMeshRows.call(void 0, mesh), points: mesh.points.map(roundPoint) };
11582
11632
  }
11583
11633
  return out;
11584
11634
  }
@@ -11603,7 +11653,7 @@ function createImageTransformTools(controller) {
11603
11653
  type: "object",
11604
11654
  properties: {
11605
11655
  ...TARGET3,
11606
- style: { type: "string", enum: _chunkORE334I6cjs.WARP_STYLES, description: "Preset warp (Photoshop\u2019s menu): arc, arcLower, arcUpper, arch, bulge, shellLower, shellUpper, flag, wave, fish, rise, fisheye, inflate, squeeze, twist." },
11656
+ style: { type: "string", enum: _chunkLXGOYRPEcjs.WARP_STYLES, description: "Preset warp (Photoshop\u2019s menu): arc, arcLower, arcUpper, arch, bulge, shellLower, shellUpper, flag, wave, fish, rise, fisheye, inflate, squeeze, twist." },
11607
11657
  bend: { type: "number", minimum: -100, maximum: 100, description: "Preset bend in percent, \u2212100..100 (default 50)." },
11608
11658
  horizontal: { type: "number", minimum: -100, maximum: 100, description: "Preset horizontal distortion in percent, \u2212100..100 (default 0)." },
11609
11659
  vertical: { type: "number", minimum: -100, maximum: 100, description: "Preset vertical distortion in percent, \u2212100..100 (default 0)." },
@@ -11625,11 +11675,11 @@ function createImageTransformTools(controller) {
11625
11675
  annotations: { title: "Warp a layer", ...WRITE6 },
11626
11676
  handler: (args) => {
11627
11677
  const hasPreset = ["style", "bend", "horizontal", "vertical", "orientation"].some((k) => args[k] !== void 0);
11628
- if (hasPreset && args.mesh !== void 0) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give a preset (style, bend, horizontal, vertical, orientation) or a mesh, not both.");
11629
- if (!hasPreset && args.mesh === void 0) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give a preset style or a mesh.");
11678
+ if (hasPreset && args.mesh !== void 0) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give a preset (style, bend, horizontal, vertical, orientation) or a mesh, not both.");
11679
+ if (!hasPreset && args.mesh === void 0) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give a preset style or a mesh.");
11630
11680
  let warp;
11631
11681
  if (hasPreset) {
11632
- if (args.style === void 0) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`style is required with a preset. Styles: ${_chunkORE334I6cjs.WARP_STYLES.join(", ")}.`);
11682
+ if (args.style === void 0) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`style is required with a preset. Styles: ${_chunkLXGOYRPEcjs.WARP_STYLES.join(", ")}.`);
11633
11683
  warp = {
11634
11684
  style: args.style,
11635
11685
  bend: _nullishCoalesce(args.bend, () => ( 50)),
@@ -11640,7 +11690,7 @@ function createImageTransformTools(controller) {
11640
11690
  } else {
11641
11691
  const m = args.mesh;
11642
11692
  const want = (3 * m.columns + 1) * (3 * m.rows + 1);
11643
- if (m.points.length !== want) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`A ${m.columns} \xD7 ${m.rows} mesh needs (3\xB7${m.columns} + 1) \xD7 (3\xB7${m.rows} + 1) = ${want} points, got ${m.points.length}.`);
11693
+ if (m.points.length !== want) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`A ${m.columns} \xD7 ${m.rows} mesh needs (3\xB7${m.columns} + 1) \xD7 (3\xB7${m.rows} + 1) = ${want} points, got ${m.points.length}.`);
11644
11694
  const knots = (n) => Array.from({ length: n + 1 }, (_, i) => i / n);
11645
11695
  warp = { us: knots(m.columns), vs: knots(m.rows), points: m.points.map((p) => ({ x: p.x, y: p.y })) };
11646
11696
  }
@@ -11735,13 +11785,13 @@ function settingsFrom(args) {
11735
11785
  return out;
11736
11786
  }
11737
11787
  function imageArg(image) {
11738
- if (typeof image !== "string" || !image.trim()) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("image is required: a PNG as a data URL or base64 (other formats need a browser).");
11788
+ if (typeof image !== "string" || !image.trim()) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("image is required: a PNG as a data URL or base64 (other formats need a browser).");
11739
11789
  return image.trim();
11740
11790
  }
11741
11791
  function createImageSmartObjectTools(controller) {
11742
11792
  const smartId = (id) => {
11743
- if (typeof id !== "string" || !id) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("layerId is required (a smart object id from list_layers).");
11744
- _chunkXLUYXUBDcjs.requireSmartObject.call(void 0, controller.getLayers(), id);
11793
+ if (typeof id !== "string" || !id) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("layerId is required (a smart object id from list_layers).");
11794
+ _chunkPMHPXCJCcjs.requireSmartObject.call(void 0, controller.getLayers(), id);
11745
11795
  return id;
11746
11796
  };
11747
11797
  const info = (id) => {
@@ -11778,7 +11828,7 @@ function createImageSmartObjectTools(controller) {
11778
11828
  },
11779
11829
  annotations: { title: "Convert to Smart Object", ...WRITE7 },
11780
11830
  handler: ({ layerIds, name }) => {
11781
- for (const id2 of _nullishCoalesce(layerIds, () => ( []))) _chunkXLUYXUBDcjs.requireLayer.call(void 0, controller.getLayers(), id2);
11831
+ for (const id2 of _nullishCoalesce(layerIds, () => ( []))) _chunkPMHPXCJCcjs.requireLayer.call(void 0, controller.getLayers(), id2);
11782
11832
  const id = controller.convertToSmartObject(layerIds, { name });
11783
11833
  return { layer: layerSummary(id), smartObject: info(id) };
11784
11834
  }
@@ -11815,7 +11865,7 @@ function createImageSmartObjectTools(controller) {
11815
11865
  {
11816
11866
  type: "object",
11817
11867
  properties: {
11818
- style: { type: "string", enum: _chunkORE334I6cjs.WARP_STYLES, description: "Preset (Photoshop\u2019s menu)." },
11868
+ style: { type: "string", enum: _chunkLXGOYRPEcjs.WARP_STYLES, description: "Preset (Photoshop\u2019s menu)." },
11819
11869
  bend: { type: "number", minimum: -100, maximum: 100, description: "Bend in percent (default 50)." },
11820
11870
  horizontal: { type: "number", minimum: -100, maximum: 100, description: "Horizontal distortion in percent (default 0)." },
11821
11871
  vertical: { type: "number", minimum: -100, maximum: 100, description: "Vertical distortion in percent (default 0)." },
@@ -11851,12 +11901,12 @@ function createImageSmartObjectTools(controller) {
11851
11901
  else if (w) {
11852
11902
  const m = w;
11853
11903
  const want = (3 * m.columns + 1) * (3 * m.rows + 1);
11854
- if (m.points.length !== want) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`A ${m.columns} \xD7 ${m.rows} mesh needs (3\xB7${m.columns} + 1) \xD7 (3\xB7${m.rows} + 1) = ${want} points, got ${m.points.length}.`);
11904
+ if (m.points.length !== want) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`A ${m.columns} \xD7 ${m.rows} mesh needs (3\xB7${m.columns} + 1) \xD7 (3\xB7${m.rows} + 1) = ${want} points, got ${m.points.length}.`);
11855
11905
  const knots = (n) => Array.from({ length: n + 1 }, (_, i) => i / n);
11856
11906
  warp = { us: knots(m.columns), vs: knots(m.rows), points: m.points.map((p) => ({ x: p.x, y: p.y })) };
11857
11907
  }
11858
11908
  const keys = ["corners", "matrix", "scaleX", "scaleY", "rotate", "skewX", "skewY", "x", "y", "warp", "interpolation"];
11859
- if (!keys.some((k) => args[k] !== void 0)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Give something to set: ${keys.join(", ")}.`);
11909
+ if (!keys.some((k) => args[k] !== void 0)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Give something to set: ${keys.join(", ")}.`);
11860
11910
  const res = controller.setSmartObjectTransform(id, {
11861
11911
  corners: args.corners,
11862
11912
  matrix: args.matrix,
@@ -11981,7 +12031,7 @@ function createImageSmartObjectTools(controller) {
11981
12031
  handler: (args) => {
11982
12032
  const id = smartId(args.layerId);
11983
12033
  const changes = settingsFrom(args);
11984
- if (!Object.keys(changes).length) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give at least one value to change.");
12034
+ if (!Object.keys(changes).length) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give at least one value to change.");
11985
12035
  const filter = controller.updateSmartFilter(id, args.filterId, changes);
11986
12036
  return { layerId: id, filter, smartFilters: info(id).smartFilters };
11987
12037
  }
@@ -12302,8 +12352,8 @@ function geometry(args) {
12302
12352
  }
12303
12353
  function createImageShapeTools(controller) {
12304
12354
  const shapeId = (id) => {
12305
- if (typeof id !== "string" || !id) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("layerId is required (a shape layer id from list_layers).");
12306
- _chunkXLUYXUBDcjs.requireShapeLayer.call(void 0, controller.getLayers(), id);
12355
+ if (typeof id !== "string" || !id) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("layerId is required (a shape layer id from list_layers).");
12356
+ _chunkPMHPXCJCcjs.requireShapeLayer.call(void 0, controller.getLayers(), id);
12307
12357
  return id;
12308
12358
  };
12309
12359
  const layerSummary = (id) => {
@@ -12378,7 +12428,7 @@ function createImageShapeTools(controller) {
12378
12428
  annotations: { title: "Restyle a shape", ...WRITE_IDEMPOTENT5 },
12379
12429
  handler: ({ layerId, fill, stroke, fillRule }) => {
12380
12430
  const id = shapeId(layerId);
12381
- if (fill === void 0 && stroke === void 0 && fillRule === void 0) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give fill, stroke or fillRule to change.");
12431
+ if (fill === void 0 && stroke === void 0 && fillRule === void 0) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give fill, stroke or fillRule to change.");
12382
12432
  return controller.setShapeStyle(id, { fill, stroke, fillRule });
12383
12433
  }
12384
12434
  };
@@ -12427,7 +12477,7 @@ function createImageShapeTools(controller) {
12427
12477
  handler: ({ layerId, componentIndex, ...rest }) => {
12428
12478
  const id = shapeId(layerId);
12429
12479
  const change = geometry(rest);
12430
- if (change.shape === void 0 && change.subpaths === void 0 && change.op === void 0) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("Give shape, subpaths or op to change.");
12480
+ if (change.shape === void 0 && change.subpaths === void 0 && change.op === void 0) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("Give shape, subpaths or op to change.");
12431
12481
  return controller.setShapeComponent(id, componentIndex, change);
12432
12482
  }
12433
12483
  };
@@ -12501,8 +12551,8 @@ function pick2(args, keys) {
12501
12551
  }
12502
12552
  function createImageTypeTools(controller) {
12503
12553
  const typeId = (id) => {
12504
- if (typeof id !== "string" || !id) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("layerId is required (a type layer id from list_layers).");
12505
- _chunkXLUYXUBDcjs.requireTypeLayer.call(void 0, controller.getLayers(), id);
12554
+ if (typeof id !== "string" || !id) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("layerId is required (a type layer id from list_layers).");
12555
+ _chunkPMHPXCJCcjs.requireTypeLayer.call(void 0, controller.getLayers(), id);
12506
12556
  return id;
12507
12557
  };
12508
12558
  const layerSummary = (id) => {
@@ -12582,7 +12632,7 @@ function createImageTypeTools(controller) {
12582
12632
  annotations: { title: "Style a range of text", ...WRITE_IDEMPOTENT6 },
12583
12633
  handler: (args) => {
12584
12634
  const style = pick2(args, Object.keys(STYLE));
12585
- if (!Object.keys(style).length) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Give at least one style field: ${Object.keys(STYLE).join(", ")}.`);
12635
+ if (!Object.keys(style).length) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Give at least one style field: ${Object.keys(STYLE).join(", ")}.`);
12586
12636
  return controller.setTextStyle(typeId(args.layerId), style, range(args));
12587
12637
  }
12588
12638
  };
@@ -12594,7 +12644,7 @@ function createImageTypeTools(controller) {
12594
12644
  annotations: { title: "Style paragraphs", ...WRITE_IDEMPOTENT6 },
12595
12645
  handler: (args) => {
12596
12646
  const style = pick2(args, Object.keys(PARAGRAPH));
12597
- if (!Object.keys(style).length) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)(`Give at least one paragraph field: ${Object.keys(PARAGRAPH).join(", ")}.`);
12647
+ if (!Object.keys(style).length) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)(`Give at least one paragraph field: ${Object.keys(PARAGRAPH).join(", ")}.`);
12598
12648
  return controller.setParagraphStyle(typeId(args.layerId), style, range(args));
12599
12649
  }
12600
12650
  };
@@ -12616,7 +12666,7 @@ function createImageTypeTools(controller) {
12616
12666
  annotations: { title: "Point or paragraph text", ...WRITE_IDEMPOTENT6 },
12617
12667
  handler: ({ layerId, kind, width, height }) => {
12618
12668
  const id = typeId(layerId);
12619
- if (kind === "box" && (width === void 0 || height === void 0)) throw new (0, _chunkXLUYXUBDcjs.LayerOperationError)("kind box needs width and height in pixels.");
12669
+ if (kind === "box" && (width === void 0 || height === void 0)) throw new (0, _chunkPMHPXCJCcjs.LayerOperationError)("kind box needs width and height in pixels.");
12620
12670
  return controller.setTextFrame(id, kind === "box" ? { kind: "box", width, height } : { kind: "point" });
12621
12671
  }
12622
12672
  };
@@ -12638,7 +12688,7 @@ function createImageTypeTools(controller) {
12638
12688
  var LAYER_PATH = /^layers\.([^.]+)\.(.+)$/;
12639
12689
  function adjustmentsSummary(adjustments) {
12640
12690
  return {
12641
- process: _chunkXLUYXUBDcjs.normalizeProcessVersion.call(void 0, adjustments.process),
12691
+ process: _chunkPMHPXCJCcjs.normalizeProcessVersion.call(void 0, adjustments.process),
12642
12692
  values: readAdjustmentControls(adjustments),
12643
12693
  layers: (_nullishCoalesce(adjustments.layers, () => ( []))).map((l) => JSON.parse(JSON.stringify(l)))
12644
12694
  };
@@ -12681,7 +12731,7 @@ function createImageEditorToolProvider(controller, options = {}) {
12681
12731
  default: def,
12682
12732
  ...requiresProcess ? { requiresProcess } : {}
12683
12733
  })),
12684
- layerKinds: _chunkXLUYXUBDcjs.ADJUSTMENT_KINDS.map(({ kind, label }) => ({
12734
+ layerKinds: _chunkPMHPXCJCcjs.ADJUSTMENT_KINDS.map(({ kind, label }) => ({
12685
12735
  kind,
12686
12736
  label,
12687
12737
  controls: [...ADJUSTMENT_LAYER_CONTROLS[kind], ADJUSTMENT_LAYER_OPACITY_CONTROL].map(({ id, label: l, min, max, step, default: def }) => ({
@@ -12767,7 +12817,7 @@ function createImageEditorToolProvider(controller, options = {}) {
12767
12817
  const result = { applied, clamped };
12768
12818
  if (typeof label === "string" && label) result.label = label;
12769
12819
  const notes = [];
12770
- if ("tint" in applied && _chunkXLUYXUBDcjs.normalizeProcessVersion.call(void 0, controller.getState().adjustments.process) < 2) {
12820
+ if ("tint" in applied && _chunkPMHPXCJCcjs.normalizeProcessVersion.call(void 0, controller.getState().adjustments.process) < 2) {
12771
12821
  notes.push("Tint has no effect on process 1 edits.");
12772
12822
  }
12773
12823
  if (notes.length) result.notes = notes;
@@ -12777,11 +12827,11 @@ function createImageEditorToolProvider(controller, options = {}) {
12777
12827
  const addLayer = {
12778
12828
  name: "add_adjustment_layer",
12779
12829
  title: "Add an adjustment layer",
12780
- description: "Adds a non-destructive adjustment layer on top of the stack (one undoable step) and returns it. Kinds: " + _chunkXLUYXUBDcjs.ADJUSTMENT_KINDS.map((k) => k.kind).join(", ") + ". Omitted params are neutral.",
12830
+ description: "Adds a non-destructive adjustment layer on top of the stack (one undoable step) and returns it. Kinds: " + _chunkPMHPXCJCcjs.ADJUSTMENT_KINDS.map((k) => k.kind).join(", ") + ". Omitted params are neutral.",
12781
12831
  inputSchema: {
12782
12832
  type: "object",
12783
12833
  properties: {
12784
- kind: { type: "string", enum: _chunkXLUYXUBDcjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Adjustment kind." },
12834
+ kind: { type: "string", enum: _chunkPMHPXCJCcjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Adjustment kind." },
12785
12835
  params: { type: "object", description: "Initial parameters (see list_controls); merged with neutral defaults." },
12786
12836
  opacity: { type: "number", minimum: 0, maximum: 1, description: "Layer opacity 0-1 (default 1)." },
12787
12837
  blend: { type: "string", enum: _chunkJ5BA3BQ6cjs.BLEND_MODES.map((m) => m.id), description: "Blend mode (default normal)." },
@@ -12800,7 +12850,7 @@ function createImageEditorToolProvider(controller, options = {}) {
12800
12850
  openWorldHint: false
12801
12851
  },
12802
12852
  handler: ({ kind, params, opacity, blend, name, aboveId, parentId }) => {
12803
- if (!_chunkXLUYXUBDcjs.isAdjustmentKind.call(void 0, kind)) throw new Error(`Unknown adjustment kind "${kind}".`);
12853
+ if (!_chunkPMHPXCJCcjs.isAdjustmentKind.call(void 0, kind)) throw new Error(`Unknown adjustment kind "${kind}".`);
12804
12854
  if (blend !== void 0 && !_chunkJ5BA3BQ6cjs.isBlendMode.call(void 0, blend)) throw new Error(`Unknown blend mode "${blend}".`);
12805
12855
  if (aboveId !== void 0 && parentId !== void 0) throw new Error("Give aboveId or parentId, not both.");
12806
12856
  for (const ref of [aboveId, parentId]) {
@@ -12894,7 +12944,7 @@ function boxToCurvePoint(x, y, width, height) {
12894
12944
  return { input: clampLevel(x / (width || 1) * 255), output: clampLevel((height - y) / (height || 1) * 255) };
12895
12945
  }
12896
12946
  function curveSvgPath(points, width, height, samples = 64) {
12897
- const lut = _chunkXLUYXUBDcjs.curveLutFromLevels.call(void 0, points);
12947
+ const lut = _chunkPMHPXCJCcjs.curveLutFromLevels.call(void 0, points);
12898
12948
  const n = lut.length - 1;
12899
12949
  let d = "";
12900
12950
  for (let i = 0; i <= samples; i++) {
@@ -13404,7 +13454,7 @@ var TextEditSession = (_class11 = class {
13404
13454
  else {
13405
13455
  const layout = this.layout();
13406
13456
  if (layout && layout.lines.length) {
13407
- const c = _chunkORE334I6cjs.caretAt.call(void 0, layout, f);
13457
+ const c = _chunkLXGOYRPEcjs.caretAt.call(void 0, layout, f);
13408
13458
  const line = layout.lines[c.line];
13409
13459
  if (to === "home") f = line.start;
13410
13460
  else if (to === "end") {
@@ -13499,7 +13549,7 @@ var TextEditSession = (_class11 = class {
13499
13549
  styleHere() {
13500
13550
  const layer = this.layer;
13501
13551
  const at = this.start > 0 && this.start === this.end ? this.start - 1 : this.start;
13502
- return _chunkORE334I6cjs.styleAt.call(void 0, layer.runs, at, _chunkORE334I6cjs.DEFAULT_TEXT_STYLE);
13552
+ return _chunkLXGOYRPEcjs.styleAt.call(void 0, layer.runs, at, _chunkLXGOYRPEcjs.DEFAULT_TEXT_STYLE);
13503
13553
  }
13504
13554
  info() {
13505
13555
  return this.controller.getTextLayer(this.layerId);
@@ -13508,8 +13558,8 @@ var TextEditSession = (_class11 = class {
13508
13558
  overlay() {
13509
13559
  const layer = this.layer;
13510
13560
  const layout = this.layout();
13511
- const m = _chunkXLUYXUBDcjs.textMatrix.call(void 0, layer);
13512
- const at = (x, y) => _chunkORE334I6cjs.applyMatrix.call(void 0, m, { x, y });
13561
+ const m = _chunkPMHPXCJCcjs.textMatrix.call(void 0, layer);
13562
+ const at = (x, y) => _chunkLXGOYRPEcjs.applyMatrix.call(void 0, m, { x, y });
13513
13563
  let frame = null;
13514
13564
  if (layer.frame.kind === "box") frame = [at(0, 0), at(layer.frame.width, 0), at(layer.frame.width, layer.frame.height), at(0, layer.frame.height)];
13515
13565
  else if (layout) {
@@ -13529,7 +13579,7 @@ var TextEditSession = (_class11 = class {
13529
13579
  selection.push([at(x0, top), at(x1, top), at(x1, bottom), at(x0, bottom)]);
13530
13580
  }
13531
13581
  }
13532
- const c = _chunkORE334I6cjs.caretAt.call(void 0, layout, this.focus);
13582
+ const c = _chunkLXGOYRPEcjs.caretAt.call(void 0, layout, this.focus);
13533
13583
  return { caret: [at(c.x, c.top), at(c.x, c.bottom)], selection, frame };
13534
13584
  }
13535
13585
  /** Ends editing: an empty layer made for this session is deleted (as Photoshop does). Returns whether the layer remains. */
@@ -13538,14 +13588,14 @@ var TextEditSession = (_class11 = class {
13538
13588
  if (!this.text.trim().length) {
13539
13589
  try {
13540
13590
  this.controller.removeLayer(this.layerId);
13541
- } catch (e29) {
13591
+ } catch (e30) {
13542
13592
  }
13543
13593
  return false;
13544
13594
  }
13545
13595
  if (this.layer.name === "Text" && this.changed) {
13546
13596
  try {
13547
- this.controller.setLayerProperties(this.layerId, { name: _chunkXLUYXUBDcjs.typeLayerName.call(void 0, this.text) }, false);
13548
- } catch (e30) {
13597
+ this.controller.setLayerProperties(this.layerId, { name: _chunkPMHPXCJCcjs.typeLayerName.call(void 0, this.text) }, false);
13598
+ } catch (e31) {
13549
13599
  }
13550
13600
  }
13551
13601
  return true;
@@ -13555,8 +13605,8 @@ function typeLayerAt(controller, p, slop = 4) {
13555
13605
  const layers = [...flattenTypeLayers(controller.getLayers())].reverse();
13556
13606
  for (const l of layers) {
13557
13607
  if (!l.visible) continue;
13558
- const inv = invert(_chunkXLUYXUBDcjs.textMatrix.call(void 0, l));
13559
- const q = _chunkORE334I6cjs.applyMatrix.call(void 0, inv, p);
13608
+ const inv = invert(_chunkPMHPXCJCcjs.textMatrix.call(void 0, l));
13609
+ const q = _chunkLXGOYRPEcjs.applyMatrix.call(void 0, inv, p);
13560
13610
  let b = null;
13561
13611
  if (l.frame.kind === "box") b = { x: 0, y: 0, width: l.frame.width, height: l.frame.height };
13562
13612
  else {
@@ -13666,7 +13716,7 @@ function layerPanelRows(layers, activeId) {
13666
13716
  }
13667
13717
  function layerLabel(layer) {
13668
13718
  if (layer.name) return layer.name;
13669
- if (layer.type === "adjustment") return _chunkXLUYXUBDcjs.adjustmentKindLabel.call(void 0, layer.kind);
13719
+ if (layer.type === "adjustment") return _chunkPMHPXCJCcjs.adjustmentKindLabel.call(void 0, layer.kind);
13670
13720
  return layer.type === "group" ? "Group" : "Layer";
13671
13721
  }
13672
13722
  function layerBadge(layer) {
@@ -14138,7 +14188,7 @@ var FREE_TRANSFORM_MODE_OPTIONS = [
14138
14188
  ];
14139
14189
  var WARP_STYLE_OPTIONS = [
14140
14190
  { id: "custom", label: "Custom" },
14141
- ..._chunkORE334I6cjs.WARP_STYLES.map((id) => ({ id, label: _chunkORE334I6cjs.WARP_STYLE_LABELS[id] }))
14191
+ ..._chunkLXGOYRPEcjs.WARP_STYLES.map((id) => ({ id, label: _chunkLXGOYRPEcjs.WARP_STYLE_LABELS[id] }))
14142
14192
  ];
14143
14193
  var WARP_GRID_OPTIONS = [
14144
14194
  { id: "1x1", label: "Default", columns: 1, rows: 1 },
@@ -14274,7 +14324,7 @@ var FreeTransformTool = (_class13 = class {
14274
14324
  setMode(mode) {
14275
14325
  this.modeValue = mode;
14276
14326
  const s = this.session;
14277
- if (mode === "warp" && s && !this.mesh) this.mesh = _chunkORE334I6cjs.identityWarpMesh.call(void 0, s.box, this.warpSettings.columns, this.warpSettings.rows);
14327
+ if (mode === "warp" && s && !this.mesh) this.mesh = _chunkLXGOYRPEcjs.identityWarpMesh.call(void 0, s.box, this.warpSettings.columns, this.warpSettings.rows);
14278
14328
  this.changed();
14279
14329
  }
14280
14330
  /** The Warp options bar's settings. */
@@ -14296,13 +14346,13 @@ var FreeTransformTool = (_class13 = class {
14296
14346
  this.modeValue = "warp";
14297
14347
  const next = { ...this.warpSettings, ...changes };
14298
14348
  this.warpSettings = next;
14299
- let mesh = _nullishCoalesce(this.mesh, () => ( _chunkORE334I6cjs.identityWarpMesh.call(void 0, s.box, next.columns, next.rows)));
14349
+ let mesh = _nullishCoalesce(this.mesh, () => ( _chunkLXGOYRPEcjs.identityWarpMesh.call(void 0, s.box, next.columns, next.rows)));
14300
14350
  if (next.style !== "custom" && ("style" in changes || "bend" in changes || "horizontal" in changes || "vertical" in changes || "orientation" in changes)) {
14301
14351
  const preset = { style: next.style, bend: next.bend, horizontal: next.horizontal, vertical: next.vertical, orientation: next.orientation };
14302
- mesh = _nullishCoalesce(_chunkORE334I6cjs.warpPresetMesh.call(void 0, preset, s.box), () => ( _chunkORE334I6cjs.identityWarpMesh.call(void 0, s.box)));
14303
- mesh = _chunkORE334I6cjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
14352
+ mesh = _nullishCoalesce(_chunkLXGOYRPEcjs.warpPresetMesh.call(void 0, preset, s.box), () => ( _chunkLXGOYRPEcjs.identityWarpMesh.call(void 0, s.box)));
14353
+ mesh = _chunkLXGOYRPEcjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
14304
14354
  }
14305
- if ("columns" in changes || "rows" in changes) mesh = _chunkORE334I6cjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
14355
+ if ("columns" in changes || "rows" in changes) mesh = _chunkLXGOYRPEcjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
14306
14356
  this.mesh = mesh;
14307
14357
  this.changed();
14308
14358
  this.preview();
@@ -14349,11 +14399,11 @@ var FreeTransformTool = (_class13 = class {
14349
14399
  const m = this.mesh;
14350
14400
  const at = (p) => _nullishCoalesce(_chunkMUUXNRU4cjs.applyHomography.call(void 0, h, p), () => ( p));
14351
14401
  const pts = m.points.map(at);
14352
- const edit = _chunkORE334I6cjs.warpMeshEditPoints.call(void 0, m);
14402
+ const edit = _chunkLXGOYRPEcjs.warpMeshEditPoints.call(void 0, m);
14353
14403
  out.handles = [];
14354
- out.outline = _chunkORE334I6cjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }).length ? this.meshOutline(pts, m) : out.outline;
14404
+ out.outline = _chunkLXGOYRPEcjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }).length ? this.meshOutline(pts, m) : out.outline;
14355
14405
  out.warp = {
14356
- curves: _chunkORE334I6cjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }),
14406
+ curves: _chunkLXGOYRPEcjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }),
14357
14407
  anchors: edit.anchors.map((i) => pts[i]),
14358
14408
  handles: edit.handles.map((e) => ({ point: pts[e.index], anchor: pts[e.anchor] }))
14359
14409
  };
@@ -14377,7 +14427,7 @@ var FreeTransformTool = (_class13 = class {
14377
14427
  if (!o) return null;
14378
14428
  if (this.modeValue === "warp" && this.mesh) {
14379
14429
  const h = this.homography();
14380
- const edit = _chunkORE334I6cjs.warpMeshEditPoints.call(void 0, this.mesh);
14430
+ const edit = _chunkLXGOYRPEcjs.warpMeshEditPoints.call(void 0, this.mesh);
14381
14431
  let best2 = -1;
14382
14432
  let bestD2 = tolerance;
14383
14433
  for (const i of [...edit.anchors, ...edit.handles.map((e) => e.index)]) {
@@ -14422,7 +14472,7 @@ var FreeTransformTool = (_class13 = class {
14422
14472
  if (this.modeValue === "warp" && this.mesh && handle === "inside") {
14423
14473
  const q = this.toFrame(p, this.corners);
14424
14474
  if (q) {
14425
- const r = _chunkORE334I6cjs.warpMeshParamAt.call(void 0, this.mesh, q);
14475
+ const r = _chunkLXGOYRPEcjs.warpMeshParamAt.call(void 0, this.mesh, q);
14426
14476
  st = { s: r.s, t: r.t };
14427
14477
  }
14428
14478
  }
@@ -14455,8 +14505,8 @@ var FreeTransformTool = (_class13 = class {
14455
14505
  if (!a || !b) return;
14456
14506
  const delta = { x: b.x - a.x, y: b.y - a.y };
14457
14507
  const i = meshIndex(d.handle);
14458
- if (i >= 0) this.mesh = _chunkORE334I6cjs.dragWarpMeshPoint.call(void 0, d.mesh, i, delta);
14459
- else if (d.handle === "inside" && d.st) this.mesh = _chunkORE334I6cjs.pullWarpMesh.call(void 0, d.mesh, d.st.s, d.st.t, delta);
14508
+ if (i >= 0) this.mesh = _chunkLXGOYRPEcjs.dragWarpMeshPoint.call(void 0, d.mesh, i, delta);
14509
+ else if (d.handle === "inside" && d.st) this.mesh = _chunkLXGOYRPEcjs.pullWarpMesh.call(void 0, d.mesh, d.st.s, d.st.t, delta);
14460
14510
  else return;
14461
14511
  this.warpSettings = { ...this.warpSettings, style: "custom" };
14462
14512
  this.changed();
@@ -14580,7 +14630,7 @@ var FreeTransformTool = (_class13 = class {
14580
14630
  bar() {
14581
14631
  const s = this.session;
14582
14632
  if (!s || !this.corners) return null;
14583
- const read = _chunkXLUYXUBDcjs.describeTransform.call(void 0, { box: s.box, corners: this.corners }, this.refBox);
14633
+ const read = _chunkPMHPXCJCcjs.describeTransform.call(void 0, { box: s.box, corners: this.corners }, this.refBox);
14584
14634
  return {
14585
14635
  affine: read.affine,
14586
14636
  x: _nullishCoalesce(this.typed.x, () => ( read.x)),
@@ -14605,7 +14655,7 @@ var FreeTransformTool = (_class13 = class {
14605
14655
  this.changed();
14606
14656
  return;
14607
14657
  }
14608
- const m = _chunkXLUYXUBDcjs.matrixFromParams.call(void 0, s.box, {
14658
+ const m = _chunkPMHPXCJCcjs.matrixFromParams.call(void 0, s.box, {
14609
14659
  scaleX: next.scaleX,
14610
14660
  scaleY: next.scaleY,
14611
14661
  rotate: next.rotate,
@@ -14615,7 +14665,7 @@ var FreeTransformTool = (_class13 = class {
14615
14665
  dx: next.x - this.refBox.x,
14616
14666
  dy: next.y - this.refBox.y
14617
14667
  });
14618
- this.setCorners(_chunkXLUYXUBDcjs.cornersFromMatrix.call(void 0, s.box, m));
14668
+ this.setCorners(_chunkPMHPXCJCcjs.cornersFromMatrix.call(void 0, s.box, m));
14619
14669
  this.typed = { scaleX: next.scaleX, scaleY: next.scaleY, rotate: next.rotate, skewX: next.skewX, skewY: next.skewY, x: next.x, y: next.y };
14620
14670
  this.changed();
14621
14671
  }
@@ -15702,5 +15752,6 @@ function createImageEffectsToolProvider(controller, options = {}) {
15702
15752
 
15703
15753
 
15704
15754
 
15705
- exports.ADJUSTMENT_KEYS = _chunkXLUYXUBDcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkXLUYXUBDcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkXLUYXUBDcjs.ADJUSTMENT_LUT_SIZE; exports.AS_SHOT_KELVIN = _chunkXLUYXUBDcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkXLUYXUBDcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkXLUYXUBDcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkJ5BA3BQ6cjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkJ5BA3BQ6cjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkXLUYXUBDcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkFHPVDTI2cjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkSYPFUL5Bcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkSYPFUL5Bcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkG5NMLUVFcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkZ6OUCS2Kcjs.BrushstrokeCache; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.CoverageMap = _chunk6GFRKLLScjs.CoverageMap; exports.D50 = _chunkXLUYXUBDcjs.D50; exports.D65 = _chunkXLUYXUBDcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkORE334I6cjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunk6GFRKLLScjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunk6GFRKLLScjs.DEFAULT_BRUSH; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkFHPVDTI2cjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkMZXQTKUMcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkXLUYXUBDcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunk6GFRKLLScjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunk6GFRKLLScjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunk6GFRKLLScjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunkW6M7C7R3cjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunk6GFRKLLScjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkORE334I6cjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkFHPVDTI2cjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkFHPVDTI2cjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkXLUYXUBDcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkMZXQTKUMcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkFHPVDTI2cjs.DRY_EPS; exports.DabWalker = _chunk6GFRKLLScjs.DabWalker; exports.EMPTY_DISTANCE = _chunkXLUYXUBDcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunk6GFRKLLScjs.EMPTY_MIXER_LOAD; exports.EX = _chunkFHPVDTI2cjs.EX; exports.EY = _chunkFHPVDTI2cjs.EY; exports.FLAG_ALIVE = _chunkFHPVDTI2cjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkFHPVDTI2cjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkFHPVDTI2cjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkFHPVDTI2cjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkFHPVDTI2cjs.FLAG_TOP; exports.FLAG_WET = _chunkFHPVDTI2cjs.FLAG_WET; exports.FLAT = _chunkFHPVDTI2cjs.FLAT; exports.FREE_INTERVAL = _chunkFHPVDTI2cjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkXLUYXUBDcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.HIDE = _chunkFHPVDTI2cjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkXLUYXUBDcjs.HUE_RANGE_LABELS; exports.IDENTITY_MATRIX3 = _chunkXLUYXUBDcjs.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.INTENTS = _chunkG5NMLUVFcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunkMZXQTKUMcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkXLUYXUBDcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkXLUYXUBDcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkMZXQTKUMcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkXLUYXUBDcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkXLUYXUBDcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkXLUYXUBDcjs.LUMA_709; exports.LayerCompositor = _chunkXLUYXUBDcjs.LayerCompositor; exports.LayerEffectError = _chunkMZXQTKUMcjs.LayerEffectError; exports.LayerOperationError = _chunkXLUYXUBDcjs.LayerOperationError; exports.MAX_BATCH = _chunkFHPVDTI2cjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunk6GFRKLLScjs.MAX_BRUSH_SIZE; exports.MAX_EFFECT_REACH = _chunkMZXQTKUMcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkXLUYXUBDcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkFHPVDTI2cjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkMZXQTKUMcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkFHPVDTI2cjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkFHPVDTI2cjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkXLUYXUBDcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkXLUYXUBDcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunk6GFRKLLScjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunk6GFRKLLScjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunk6GFRKLLScjs.MIXING_MODELS; exports.MixerStroke = _chunk6GFRKLLScjs.MixerStroke; exports.OPP = _chunkFHPVDTI2cjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkJ5BA3BQ6cjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunk6GFRKLLScjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunk6GFRKLLScjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunk6GFRKLLScjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunk6GFRKLLScjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunk6GFRKLLScjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunk6GFRKLLScjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunk6GFRKLLScjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunk6GFRKLLScjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunk6GFRKLLScjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunk6GFRKLLScjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunk6GFRKLLScjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunk6GFRKLLScjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkFHPVDTI2cjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkXLUYXUBDcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkFHPVDTI2cjs.PARAM; exports.PARAM_FLOATS = _chunkFHPVDTI2cjs.PARAM_FLOATS; exports.PATTERN_BLOCK_KEYS = _chunkXLUYXUBDcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkJ5BA3BQ6cjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkFHPVDTI2cjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkJ5BA3BQ6cjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkJ5BA3BQ6cjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkFHPVDTI2cjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkJ5BA3BQ6cjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkFHPVDTI2cjs.PLANE; exports.PLANE_BYTES = _chunkFHPVDTI2cjs.PLANE_BYTES; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkXLUYXUBDcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkFHPVDTI2cjs.P_D0; exports.P_EDGE = _chunkFHPVDTI2cjs.P_EDGE; exports.P_FX = _chunkFHPVDTI2cjs.P_FX; exports.P_FY = _chunkFHPVDTI2cjs.P_FY; exports.P_H = _chunkFHPVDTI2cjs.P_H; exports.P_P0 = _chunkFHPVDTI2cjs.P_P0; exports.P_RHO = _chunkFHPVDTI2cjs.P_RHO; exports.P_SW = _chunkFHPVDTI2cjs.P_SW; exports.P_UX = _chunkFHPVDTI2cjs.P_UX; exports.P_UY = _chunkFHPVDTI2cjs.P_UY; exports.PaintExchange = _chunk6GFRKLLScjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunk6GFRKLLScjs.PaintGradientSampler; exports.PaintSourceError = _chunk6GFRKLLScjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PatternPlacement = _chunkMZXQTKUMcjs.PatternPlacement; exports.PatternTile = _chunkMZXQTKUMcjs.PatternTile; exports.PsdError = _chunkXLUYXUBDcjs.PsdError; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunkW6M7C7R3cjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunkW6M7C7R3cjs.RegionPixelSource; exports.RetouchDabStroke = _chunkW6M7C7R3cjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkXLUYXUBDcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkXLUYXUBDcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SET_PLANES = _chunkFHPVDTI2cjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkJ5BA3BQ6cjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkXLUYXUBDcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkXLUYXUBDcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkFHPVDTI2cjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkFHPVDTI2cjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkFHPVDTI2cjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkXLUYXUBDcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunkW6M7C7R3cjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkFHPVDTI2cjs.SRGB_TO_LINEAR; exports.STRIP = _chunkFHPVDTI2cjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkXLUYXUBDcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunk6GFRKLLScjs.SmudgeTip; exports.StrokeCoverage = _chunk6GFRKLLScjs.StrokeCoverage; exports.SurfaceDraft = _chunkJ5BA3BQ6cjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkXLUYXUBDcjs.TEXT_ALIGNS; exports.TEXT_RENDER_MARGIN = _chunkXLUYXUBDcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkXLUYXUBDcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkJ5BA3BQ6cjs.TILE; exports.TILE_SHIFT = _chunkJ5BA3BQ6cjs.TILE_SHIFT; exports.TINT_SCALE = _chunkXLUYXUBDcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunk6GFRKLLScjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkXLUYXUBDcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunkW6M7C7R3cjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkXLUYXUBDcjs.TRANSFORM_ANCHORS; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunk6GFRKLLScjs.TileMedium; exports.TilePixelSource = _chunkW6M7C7R3cjs.TilePixelSource; exports.TiledSurface = _chunkJ5BA3BQ6cjs.TiledSurface; exports.TransformTooLargeError = _chunkMZXQTKUMcjs.TransformTooLargeError; exports.TypeToolGesture = TypeToolGesture; exports.U_MAX = _chunkFHPVDTI2cjs.U_MAX; exports.VIBRANCE_GREY = _chunkXLUYXUBDcjs.VIBRANCE_GREY; exports.W9 = _chunkFHPVDTI2cjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkORE334I6cjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkORE334I6cjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkFHPVDTI2cjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkFHPVDTI2cjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkFHPVDTI2cjs.WET_TILE; exports.WGSL_HALO = _chunkFHPVDTI2cjs.WGSL_HALO; exports.WGSL_SHADE = _chunkFHPVDTI2cjs.WGSL_SHADE; exports.WGSL_STEP = _chunkFHPVDTI2cjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WetGpuEngine = _chunkFHPVDTI2cjs.WetGpuEngine; exports.WetMedium = _chunkFHPVDTI2cjs.WetMedium; exports.WetWorkerPool = _chunkFHPVDTI2cjs.WetWorkerPool; exports.WetWorld = _chunkFHPVDTI2cjs.WetWorld; exports.WetWorldError = _chunkFHPVDTI2cjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkXLUYXUBDcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunk643B2HKCcjs.ZlibError; exports.activeAdjustmentLayers = _chunkXLUYXUBDcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkXLUYXUBDcjs.activeEffectSmartFilters; exports.activeSmartFilters = _chunkXLUYXUBDcjs.activeSmartFilters; exports.addLayerEffect = _chunkXLUYXUBDcjs.addLayerEffect; exports.addLayerFilter = _chunkXLUYXUBDcjs.addLayerFilter; exports.addPaintGradientStop = _chunk6GFRKLLScjs.addPaintGradientStop; exports.addSmartFilter = _chunkXLUYXUBDcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkXLUYXUBDcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkXLUYXUBDcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkXLUYXUBDcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkXLUYXUBDcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunk643B2HKCcjs.adler32; exports.anchorPoint = _chunkXLUYXUBDcjs.anchorPoint; exports.annotationBlend = _chunkXLUYXUBDcjs.annotationBlend; exports.annotationLayerFor = _chunkXLUYXUBDcjs.annotationLayerFor; exports.annotationLayerName = _chunkXLUYXUBDcjs.annotationLayerName; exports.annotationOfLayer = _chunkXLUYXUBDcjs.annotationOfLayer; exports.annotationOfShape = _chunkXLUYXUBDcjs.annotationOfShape; exports.annotationOfType = _chunkXLUYXUBDcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkXLUYXUBDcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkXLUYXUBDcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkXLUYXUBDcjs.applyAdjustments; exports.applyBoxBlur = _chunkXLUYXUBDcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkXLUYXUBDcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkXLUYXUBDcjs.applyDepthMask; exports.applyHomography = _chunkMUUXNRU4cjs.applyHomography; exports.applyImageProjectionToContext = _chunkXLUYXUBDcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkXLUYXUBDcjs.applyLegacyAdjustments; exports.applyMatrix3 = _chunkXLUYXUBDcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkXLUYXUBDcjs.applyParams; exports.applyProcess2Adjustments = _chunkXLUYXUBDcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkXLUYXUBDcjs.applyProcess2Float; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunkW6M7C7R3cjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkXLUYXUBDcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunk6GFRKLLScjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunk6GFRKLLScjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunkW6M7C7R3cjs.applyToneToDeepTile; exports.backgroundLayer = _chunkXLUYXUBDcjs.backgroundLayer; exports.base64ToBytes = _chunkDCLJNVZScjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunkW6M7C7R3cjs.bestOffset; exports.blackWhiteGray = _chunkXLUYXUBDcjs.blackWhiteGray; exports.blendChannel = _chunkJ5BA3BQ6cjs.blendChannel; exports.blendImageData = _chunkJ5BA3BQ6cjs.blendImageData; exports.blendLum = _chunkJ5BA3BQ6cjs.blendLum; exports.blendPixel = _chunkJ5BA3BQ6cjs.blendPixel; exports.blendRadius = _chunk6GFRKLLScjs.blendRadius; exports.blendRgb = _chunkJ5BA3BQ6cjs.blendRgb; exports.blendTile = _chunkMZXQTKUMcjs.blendTile; exports.blenderDab = _chunk6GFRKLLScjs.blenderDab; exports.blurFilter = _chunkXLUYXUBDcjs.blurFilter; exports.borderCoverage = _chunkXLUYXUBDcjs.borderCoverage; exports.boxMean = boxMean; exports.boxPointOf = _chunkXLUYXUBDcjs.boxPointOf; exports.boxQuad = _chunkMUUXNRU4cjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkXLUYXUBDcjs.bradfordAdaptation; exports.brushstrokeDataUrl = _chunkZ6OUCS2Kcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkZ6OUCS2Kcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkZ6OUCS2Kcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkSYPFUL5Bcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkZ6OUCS2Kcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkZ6OUCS2Kcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkXLUYXUBDcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkXLUYXUBDcjs.buildToneLut; exports.builtinPattern = _chunkMZXQTKUMcjs.builtinPattern; exports.builtinPatternIds = _chunkMZXQTKUMcjs.builtinPatternIds; exports.bytesToBase64 = _chunkDCLJNVZScjs.bytesToBase64; exports.calculateCropDrag = _chunkXLUYXUBDcjs.calculateCropDrag; exports.canShareMemory = _chunkFHPVDTI2cjs.canShareMemory; exports.canvasCompositeOperation = _chunkJ5BA3BQ6cjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkXLUYXUBDcjs.canvasToImagePoint; exports.caretAt = _chunkORE334I6cjs.caretAt; exports.changedTiles = _chunkMZXQTKUMcjs.changedTiles; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkXLUYXUBDcjs.clampCropToImage; exports.cleanMixer = _chunk6GFRKLLScjs.cleanMixer; exports.cloneSourceLabel = cloneSourceLabel; exports.collectTiles = _chunkJ5BA3BQ6cjs.collectTiles; exports.colorBalanceChannel = _chunkXLUYXUBDcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.combineSelections = _chunkXLUYXUBDcjs.combineSelections; exports.compileAdjustmentLayer = _chunkXLUYXUBDcjs.compileAdjustmentLayer; exports.componentPath = _chunkXLUYXUBDcjs.componentPath; exports.compositeDeep = _chunkXLUYXUBDcjs.compositeDeep; exports.compositeSurfaceOver = _chunkMZXQTKUMcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkXLUYXUBDcjs.computeSelectionBounds; exports.contentBounds = _chunkJ5BA3BQ6cjs.contentBounds; exports.contentsBox = _chunkXLUYXUBDcjs.contentsBox; exports.contentsSurface = _chunkXLUYXUBDcjs.contentsSurface; exports.contractCoverage = _chunkXLUYXUBDcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkJ5BA3BQ6cjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkXLUYXUBDcjs.convertToSmartObject; exports.copySmartObject = _chunkXLUYXUBDcjs.copySmartObject; exports.cornersFromMatrix = _chunkXLUYXUBDcjs.cornersFromMatrix; exports.coverageTileCoord = _chunk6GFRKLLScjs.coverageTileCoord; exports.coverageToByte = _chunkXLUYXUBDcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkXLUYXUBDcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunk6GFRKLLScjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkORE334I6cjs.createCanvasTextShaper; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageColorTools = createImageColorTools; exports.createImageEditTools = createImageEditTools; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageEffectsToolProvider = createImageEffectsToolProvider; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunkORE334I6cjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkORE334I6cjs.createOutlineTextShaper; exports.createPigment = _chunkJ5BA3BQ6cjs.createPigment; exports.createPigmentTools = _chunkFHPVDTI2cjs.createPigmentTools; exports.createSelectionMask = _chunkXLUYXUBDcjs.createSelectionMask; exports.createShapeLayer = _chunkXLUYXUBDcjs.createShapeLayer; exports.createTypeLayer = _chunkXLUYXUBDcjs.createTypeLayer; exports.createWetGpuEngine = _chunkFHPVDTI2cjs.createWetGpuEngine; exports.cssFont = _chunkORE334I6cjs.cssFont; exports.cssFontFamily = _chunkORE334I6cjs.cssFontFamily; exports.curveLut = _chunkMZXQTKUMcjs.curveLut; exports.curveLutFromLevels = _chunkXLUYXUBDcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunk6GFRKLLScjs.dabCoverage; exports.dabRect = _chunk6GFRKLLScjs.dabRect; exports.decodeDeepSurface = _chunkXLUYXUBDcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkXLUYXUBDcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkXLUYXUBDcjs.decodeLayerMask; exports.decodeMergedImage = _chunkXLUYXUBDcjs.decodeMergedImage; exports.decodePlanes = _chunkXLUYXUBDcjs.decodePlanes; exports.decodePng = _chunkDCLJNVZScjs.decodePng; exports.decodePngDataUrl = _chunkXLUYXUBDcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkXLUYXUBDcjs.decodeSelectionRle; exports.deepBytes = _chunkJ5BA3BQ6cjs.deepBytes; exports.deepTile = _chunkJ5BA3BQ6cjs.deepTile; exports.defaultAdjustmentParams = _chunkXLUYXUBDcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkMZXQTKUMcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkMZXQTKUMcjs.defaultLayerEffect; exports.defaultShapeName = _chunkXLUYXUBDcjs.defaultShapeName; exports.deflate = _chunk643B2HKCcjs.deflate; exports.deflateRaw = _chunk643B2HKCcjs.deflateRaw; exports.depthMaskAlpha = _chunkXLUYXUBDcjs.depthMaskAlpha; exports.depthOf = _chunkJ5BA3BQ6cjs.depthOf; exports.depthRasterMask = _chunkXLUYXUBDcjs.depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkXLUYXUBDcjs.describeTransform; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkXLUYXUBDcjs.deserializeEffects; exports.deserializeLayer = _chunkXLUYXUBDcjs.deserializeLayer; exports.deserializeLayers = _chunkXLUYXUBDcjs.deserializeLayers; exports.deserializePatterns = _chunkXLUYXUBDcjs.deserializePatterns; exports.deserializeSelection = _chunkXLUYXUBDcjs.deserializeSelection; exports.developFilter = _chunkXLUYXUBDcjs.developFilter; exports.developFromAdjustments = _chunkXLUYXUBDcjs.developFromAdjustments; exports.developTarget = _chunkXLUYXUBDcjs.developTarget; exports.dexp = _chunkFHPVDTI2cjs.dexp; exports.dilateMask = _chunkW6M7C7R3cjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkXLUYXUBDcjs.distanceTransform; exports.dlog = _chunkFHPVDTI2cjs.dlog; exports.documentContents = _chunkXLUYXUBDcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunkW6M7C7R3cjs.dodgeBurn; exports.dodgeBurnCurve = _chunkW6M7C7R3cjs.dodgeBurnCurve; exports.downloadPsd = downloadPsd; exports.dpow = _chunkFHPVDTI2cjs.dpow; exports.dragWarpMeshPoint = _chunkORE334I6cjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkFHPVDTI2cjs.dsincos; exports.duplicateLayer = _chunkXLUYXUBDcjs.duplicateLayer; exports.edgeBits = _chunkFHPVDTI2cjs.edgeBits; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunkMZXQTKUMcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkMZXQTKUMcjs.effectReach; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkMZXQTKUMcjs.effectsFingerprint; exports.effectsMargin = _chunkMZXQTKUMcjs.effectsMargin; exports.effectsScale = _chunkMZXQTKUMcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkJ5BA3BQ6cjs.emptySurface; exports.encodeDeepSurface = _chunkXLUYXUBDcjs.encodeDeepSurface; exports.encodePng = _chunkDCLJNVZScjs.encodePng; exports.encodeRle = _chunkXLUYXUBDcjs.encodeRle; exports.encodeSelectionRle = _chunkXLUYXUBDcjs.encodeSelectionRle; exports.encodeSurface = _chunkXLUYXUBDcjs.encodeSurface; exports.evalWarpMesh = _chunkORE334I6cjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkXLUYXUBDcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunk6GFRKLLScjs.exchangeRates; exports.expNeg = _chunkFHPVDTI2cjs.expNeg; exports.expandCoverage = _chunkXLUYXUBDcjs.expandCoverage; exports.exportPsd = _chunkXLUYXUBDcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkXLUYXUBDcjs.featherCoverage; exports.fillRect = _chunkJ5BA3BQ6cjs.fillRect; exports.filmPixel = _chunkFHPVDTI2cjs.filmPixel; exports.filmReflectance = _chunkFHPVDTI2cjs.filmReflectance; exports.filterMaskCoverage = _chunkXLUYXUBDcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkMZXQTKUMcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findWebGpu = _chunkFHPVDTI2cjs.findWebGpu; exports.finishTile = _chunkJ5BA3BQ6cjs.finishTile; exports.fitParagraphRuns = _chunkORE334I6cjs.fitParagraphRuns; exports.fitRuns = _chunkORE334I6cjs.fitRuns; exports.flattenLayers = _chunkMZXQTKUMcjs.flattenLayers; exports.flattenPath = _chunkXLUYXUBDcjs.flattenPath; exports.flipCorners = _chunkXLUYXUBDcjs.flipCorners; exports.flowField = _chunkFHPVDTI2cjs.flowField; exports.fontOf = _chunkORE334I6cjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkXLUYXUBDcjs.fullSelection; exports.gaussianBlur = _chunkMZXQTKUMcjs.gaussianBlur; exports.geometryHomography = _chunkXLUYXUBDcjs.geometryHomography; exports.getAnnotationBounds = _chunkXLUYXUBDcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkXLUYXUBDcjs.getCropCursor; exports.getRotatedSize = _chunkXLUYXUBDcjs.getRotatedSize; exports.getViewportMetrics = _chunkXLUYXUBDcjs.getViewportMetrics; exports.getViewportProjection = _chunkXLUYXUBDcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.gradientDabColor = _chunk6GFRKLLScjs.gradientDabColor; exports.greyMorphology = _chunkXLUYXUBDcjs.greyMorphology; exports.groupLayers = _chunkXLUYXUBDcjs.groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunkMZXQTKUMcjs.hasActiveEffects; exports.hasResampledLegacyMask = _chunkXLUYXUBDcjs.hasResampledLegacyMask; exports.hasSurface = _chunkXLUYXUBDcjs.hasSurface; exports.hasWarp = _chunkXLUYXUBDcjs.hasWarp; exports.hash2 = _chunk6GFRKLLScjs.hash2; exports.hashMaskContent = _chunkXLUYXUBDcjs.hashMaskContent; exports.hashNoise = _chunkMZXQTKUMcjs.hashNoise; exports.healPixels = _chunkW6M7C7R3cjs.healPixels; exports.hexToPaintRgb = _chunk6GFRKLLScjs.hexToPaintRgb; exports.hexToRgb = _chunkXLUYXUBDcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkXLUYXUBDcjs.hitTestAnnotation; exports.hitTestCrop = _chunkXLUYXUBDcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkMUUXNRU4cjs.homographyFromAffine; exports.homographyFromPoints = _chunkMUUXNRU4cjs.homographyFromPoints; exports.hslToRgb = _chunkXLUYXUBDcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkXLUYXUBDcjs.hueRangeTables; exports.hueRangeWeight = _chunkXLUYXUBDcjs.hueRangeWeight; exports.hueSaturation = _chunkXLUYXUBDcjs.hueSaturation; exports.identityCurve = _chunkXLUYXUBDcjs.identityCurve; exports.identityLevels = _chunkXLUYXUBDcjs.identityLevels; exports.identityTransform = _chunkXLUYXUBDcjs.identityTransform; exports.identityWarpMesh = _chunkORE334I6cjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imageToCanvasPoint = _chunkXLUYXUBDcjs.imageToCanvasPoint; exports.importPsd = _chunkXLUYXUBDcjs.importPsd; exports.inflate = _chunk643B2HKCcjs.inflate; exports.inflateRaw = _chunk643B2HKCcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkMZXQTKUMcjs.insertLayer; exports.instancesOf = _chunkXLUYXUBDcjs.instancesOf; exports.invertHomography = _chunkMUUXNRU4cjs.invertHomography; exports.invertMatrix3 = _chunkXLUYXUBDcjs.invertMatrix3; exports.invertSelection = _chunkXLUYXUBDcjs.invertSelection; exports.isActiveFilter = _chunkXLUYXUBDcjs.isActiveFilter; exports.isAdjustmentKind = _chunkXLUYXUBDcjs.isAdjustmentKind; exports.isBitDepth = _chunkJ5BA3BQ6cjs.isBitDepth; exports.isBlendMode = _chunkJ5BA3BQ6cjs.isBlendMode; exports.isBrushstrokeBrush = _chunkZ6OUCS2Kcjs.isBrushstrokeBrush; exports.isContentsDecoded = _chunkXLUYXUBDcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkXLUYXUBDcjs.isDefaultDepthMask; exports.isGradientPaint = _chunk6GFRKLLScjs.isGradientPaint; exports.isIdentityTransform = _chunkXLUYXUBDcjs.isIdentityTransform; exports.isInterpolation = _chunkMZXQTKUMcjs.isInterpolation; exports.isLayerEffectKind = _chunkMZXQTKUMcjs.isLayerEffectKind; exports.isLayerLocked = _chunkMZXQTKUMcjs.isLayerLocked; exports.isLegacyShape = _chunkXLUYXUBDcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPainterlyBlendMode = _chunkJ5BA3BQ6cjs.isPainterlyBlendMode; exports.isPng = _chunkDCLJNVZScjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkXLUYXUBDcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkXLUYXUBDcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkXLUYXUBDcjs.isSelectionEmpty; exports.isSelectionMode = _chunkXLUYXUBDcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkJ5BA3BQ6cjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkXLUYXUBDcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkXLUYXUBDcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkXLUYXUBDcjs.isTransformAnchor; exports.isValidWarp = _chunkXLUYXUBDcjs.isValidWarp; exports.keepDeepSamples = _chunkJ5BA3BQ6cjs.keepDeepSamples; exports.kelvinToTemperature = _chunkXLUYXUBDcjs.kelvinToTemperature; exports.keysWeight = _chunkMZXQTKUMcjs.keysWeight; exports.latticeViscosity = _chunkFHPVDTI2cjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkMZXQTKUMcjs.layerEffectFields; exports.layerEffectLabel = _chunkMZXQTKUMcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkXLUYXUBDcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkXLUYXUBDcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkXLUYXUBDcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkXLUYXUBDcjs.layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = _chunkXLUYXUBDcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerTree = _chunkXLUYXUBDcjs.layerTree; exports.layerTypeLabel = _chunkXLUYXUBDcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkXLUYXUBDcjs.layersFromLegacy; exports.layoutText = _chunkORE334I6cjs.layoutText; exports.legacyAdjustmentLayer = _chunkXLUYXUBDcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkXLUYXUBDcjs.legacyMaskOf; exports.legacyView = _chunkXLUYXUBDcjs.legacyView; exports.lerpPigment = _chunkJ5BA3BQ6cjs.lerpPigment; exports.lerpPigmentInto = _chunkJ5BA3BQ6cjs.lerpPigmentInto; exports.levelsValue = _chunkXLUYXUBDcjs.levelsValue; exports.linearSrgbToXy = _chunkXLUYXUBDcjs.linearSrgbToXy; exports.linearToSrgb = _chunkXLUYXUBDcjs.linearToSrgb; exports.linearToSrgb8 = _chunkFHPVDTI2cjs.linearToSrgb8; exports.liveComponent = _chunkXLUYXUBDcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkXLUYXUBDcjs.liveShapeSubpaths; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunk6GFRKLLScjs.loadMixer; exports.loadOpenTypeFont = _chunk2OJACTPRcjs.loadOpenTypeFont; exports.loadWetKernel = _chunkFHPVDTI2cjs.loadWetKernel; exports.luma = _chunkW6M7C7R3cjs.luma; exports.magicWand = magicWand; exports.mapCropHandle = _chunkXLUYXUBDcjs.mapCropHandle; exports.mapLayer = _chunkMZXQTKUMcjs.mapLayer; exports.mapSubpaths = _chunkXLUYXUBDcjs.mapSubpaths; exports.maskBounds = _chunkW6M7C7R3cjs.maskBounds; exports.maskSummary = maskSummary; exports.matrixFromCorners = _chunkXLUYXUBDcjs.matrixFromCorners; exports.matrixFromParams = _chunkXLUYXUBDcjs.matrixFromParams; exports.membraneFill = _chunkW6M7C7R3cjs.membraneFill; exports.mergeLayerEffect = _chunkMZXQTKUMcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkXLUYXUBDcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunk6GFRKLLScjs.mix32; exports.mixPigment8 = _chunkJ5BA3BQ6cjs.mixPigment8; exports.mixPigmentRgb = _chunkJ5BA3BQ6cjs.mixPigmentRgb; exports.mixPigments = _chunkJ5BA3BQ6cjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunk6GFRKLLScjs.mixerRates; exports.modifySelection = _chunkXLUYXUBDcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkXLUYXUBDcjs.moveLayer; exports.moveSmartFilter = _chunkXLUYXUBDcjs.moveSmartFilter; exports.mulMatrix3 = _chunkXLUYXUBDcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkXLUYXUBDcjs.neutralHueRange; exports.newContentsId = _chunkXLUYXUBDcjs.newContentsId; exports.newEffectId = _chunkMZXQTKUMcjs.newEffectId; exports.newLayerId = _chunkXLUYXUBDcjs.newLayerId; exports.normalizeAdjustmentLayer = _chunkXLUYXUBDcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkXLUYXUBDcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkXLUYXUBDcjs.normalizeAngle; exports.normalizeBlendMode = _chunkJ5BA3BQ6cjs.normalizeBlendMode; exports.normalizeBlender = _chunk6GFRKLLScjs.normalizeBlender; exports.normalizeBrush = _chunk6GFRKLLScjs.normalizeBrush; exports.normalizeFilter = _chunkXLUYXUBDcjs.normalizeFilter; exports.normalizeFlow = _chunkFHPVDTI2cjs.normalizeFlow; exports.normalizeHexColor = _chunk6GFRKLLScjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkMZXQTKUMcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkXLUYXUBDcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkXLUYXUBDcjs.normalizeLiveShape; exports.normalizeMixer = _chunk6GFRKLLScjs.normalizeMixer; exports.normalizePlacement = _chunkXLUYXUBDcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkXLUYXUBDcjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunkW6M7C7R3cjs.normalizeRetouch; exports.normalizeShapePaint = _chunkXLUYXUBDcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkXLUYXUBDcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkXLUYXUBDcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunk6GFRKLLScjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkXLUYXUBDcjs.normalizeSubpaths; exports.normalizeText = _chunkXLUYXUBDcjs.normalizeText; exports.normalizeTilt = _chunkFHPVDTI2cjs.normalizeTilt; exports.normalizeWetParams = _chunkFHPVDTI2cjs.normalizeWetParams; exports.offsetLayer = _chunkXLUYXUBDcjs.offsetLayer; exports.offsetShape = _chunkXLUYXUBDcjs.offsetShape; exports.offsetSmartObject = _chunkXLUYXUBDcjs.offsetSmartObject; exports.openPsdFile = openPsdFile; exports.packRgba = _chunkJ5BA3BQ6cjs.packRgba; exports.packWetParams = _chunkFHPVDTI2cjs.packWetParams; exports.paintGradientMappingFor = _chunk6GFRKLLScjs.paintGradientMappingFor; exports.paintPathStroke = _chunkZ6OUCS2Kcjs.paintPathStroke; exports.paintSourceColor = _chunk6GFRKLLScjs.paintSourceColor; exports.paintSourceCss = _chunk6GFRKLLScjs.paintSourceCss; exports.paragraphRanges = _chunkORE334I6cjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkXLUYXUBDcjs.parseAdjustmentBlock; exports.parseBlend = _chunkXLUYXUBDcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunk2YQONY6Gcjs.parseCssColor; exports.parseDataUrl = _chunkDCLJNVZScjs.parseDataUrl; exports.parseEffectColor = _chunkMZXQTKUMcjs.parseEffectColor; exports.parseLfx2 = _chunkXLUYXUBDcjs.parseLfx2; exports.parseLrfx = _chunkXLUYXUBDcjs.parseLrfx; exports.parseOpenTypeFont = _chunk2OJACTPRcjs.parseOpenTypeFont; exports.parsePaintSource = _chunk6GFRKLLScjs.parsePaintSource; exports.parsePatternBlock = _chunkXLUYXUBDcjs.parsePatternBlock; exports.parseSelectionMode = _chunkXLUYXUBDcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkXLUYXUBDcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkXLUYXUBDcjs.patchParagraphStyle; exports.patchTextStyle = _chunkXLUYXUBDcjs.patchTextStyle; exports.pathStrokeCoverage = _chunkZ6OUCS2Kcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkZ6OUCS2Kcjs.pathStrokeDabs; exports.perDabStrength = _chunkW6M7C7R3cjs.perDabStrength; exports.photoFilterMatrix = _chunkXLUYXUBDcjs.photoFilterMatrix; exports.pigment8 = _chunkJ5BA3BQ6cjs.pigment8; exports.pigmentColor = _chunkFHPVDTI2cjs.pigmentColor; exports.pigmentOf = _chunkFHPVDTI2cjs.pigmentOf; exports.pixelLayerBounds = _chunkXLUYXUBDcjs.pixelLayerBounds; exports.pixelLayers = _chunkXLUYXUBDcjs.pixelLayers; exports.pixelPigment = _chunkFHPVDTI2cjs.pixelPigment; exports.placeContents = _chunkXLUYXUBDcjs.placeContents; exports.placeLayer = _chunkXLUYXUBDcjs.placeLayer; exports.placementAt = _chunkXLUYXUBDcjs.placementAt; exports.placementBounds = _chunkXLUYXUBDcjs.placementBounds; exports.placementGeometry = _chunkXLUYXUBDcjs.placementGeometry; exports.pngDataUrl = _chunkDCLJNVZScjs.pngDataUrl; exports.pointerPressure = _chunkFHPVDTI2cjs.pointerPressure; exports.pointerStrokeSample = _chunkFHPVDTI2cjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkFHPVDTI2cjs.pointerStrokeSamples; exports.polygonCoverage = polygonCoverage; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunkXLUYXUBDcjs.posterizeValue; exports.presetWarp = _chunkXLUYXUBDcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkXLUYXUBDcjs.projectImagePoint; exports.projectImageRect = _chunkXLUYXUBDcjs.projectImageRect; exports.projectMaskCoverage = _chunkXLUYXUBDcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkJ5BA3BQ6cjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkXLUYXUBDcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkXLUYXUBDcjs.psdToLayers; exports.pullWarpMesh = _chunkORE334I6cjs.pullWarpMesh; exports.put255 = _chunk6GFRKLLScjs.put255; exports.quickMaskPixels = quickMaskPixels; exports.rand01 = _chunk6GFRKLLScjs.rand01; exports.rangeLightness = _chunkXLUYXUBDcjs.rangeLightness; exports.rasterContents = _chunkXLUYXUBDcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkXLUYXUBDcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkXLUYXUBDcjs.rasterizeCoverage; exports.rasterizeDab = _chunk6GFRKLLScjs.rasterizeDab; exports.rasterizeSmartObject = _chunkXLUYXUBDcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkJ5BA3BQ6cjs.readDeepRegion; exports.readPaintSource = _chunk6GFRKLLScjs.readPaintSource; exports.readPixel = _chunkJ5BA3BQ6cjs.readPixel; exports.readPsd = _chunkXLUYXUBDcjs.readPsd; exports.readRegion = _chunkJ5BA3BQ6cjs.readRegion; exports.readSourceRegion = _chunkW6M7C7R3cjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkMUUXNRU4cjs.rectToQuad; exports.reduceSurface = _chunkMZXQTKUMcjs.reduceSurface; exports.referencePoint = _chunkXLUYXUBDcjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkJ5BA3BQ6cjs.reflectanceToRgb; exports.removeAlpha = _chunkXLUYXUBDcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkXLUYXUBDcjs.removeLayer; exports.removeLayerEffect = _chunkXLUYXUBDcjs.removeLayerEffect; exports.removeLayerFilter = _chunkXLUYXUBDcjs.removeLayerFilter; exports.removePaintGradientStop = _chunk6GFRKLLScjs.removePaintGradientStop; exports.removeSmartFilter = _chunkXLUYXUBDcjs.removeSmartFilter; exports.renderBrushstroke = _chunkZ6OUCS2Kcjs.renderBrushstroke; exports.renderLayerEffects = _chunkMZXQTKUMcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkXLUYXUBDcjs.renderShape; exports.renderShapeRect = _chunkXLUYXUBDcjs.renderShapeRect; exports.renderSmartObject = _chunkXLUYXUBDcjs.renderSmartObject; exports.renderText = _chunkXLUYXUBDcjs.renderText; exports.replaceContents = _chunkXLUYXUBDcjs.replaceContents; exports.replaceTextRange = _chunkXLUYXUBDcjs.replaceTextRange; exports.requireLayer = _chunkXLUYXUBDcjs.requireLayer; exports.requireOperation = _chunkXLUYXUBDcjs.requireOperation; exports.requireShapeLayer = _chunkXLUYXUBDcjs.requireShapeLayer; exports.requireSmartObject = _chunkXLUYXUBDcjs.requireSmartObject; exports.requireTypeLayer = _chunkXLUYXUBDcjs.requireTypeLayer; exports.requireUnlocked = _chunkXLUYXUBDcjs.requireUnlocked; exports.rerender = _chunkXLUYXUBDcjs.rerender; exports.rerenderShape = _chunkXLUYXUBDcjs.rerenderShape; exports.rerenderText = _chunkXLUYXUBDcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkXLUYXUBDcjs.resizeSelection; exports.resizeWarpMesh = _chunkORE334I6cjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkXLUYXUBDcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunk6GFRKLLScjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.restyleRange = _chunkORE334I6cjs.restyleRange; exports.reversePaintGradient = _chunk6GFRKLLScjs.reversePaintGradient; exports.rgbToGray = _chunkXLUYXUBDcjs.rgbToGray; exports.rgbToHsl = _chunkXLUYXUBDcjs.rgbToHsl; exports.rgbToReflectance = _chunkJ5BA3BQ6cjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunkW6M7C7R3cjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkXLUYXUBDcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkXLUYXUBDcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sampleLut = _chunkXLUYXUBDcjs.sampleLut; exports.sampleToneLut = _chunkXLUYXUBDcjs.sampleToneLut; exports.saturationOf = _chunkW6M7C7R3cjs.saturationOf; exports.scaleLayerEffect = _chunkMZXQTKUMcjs.scaleLayerEffect; exports.scalePaintGradient = _chunk6GFRKLLScjs.scalePaintGradient; exports.seamlessClone = _chunkW6M7C7R3cjs.seamlessClone; exports.selectionArea = _chunkXLUYXUBDcjs.selectionArea; exports.selectionFromCoverage = _chunkXLUYXUBDcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkXLUYXUBDcjs.selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = _chunkXLUYXUBDcjs.selectionToCoverage; exports.selectionToPixels = _chunkXLUYXUBDcjs.selectionToPixels; exports.selectionValueAt = _chunkXLUYXUBDcjs.selectionValueAt; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkXLUYXUBDcjs.serializeContents; exports.serializeEffects = _chunkXLUYXUBDcjs.serializeEffects; exports.serializeLayer = _chunkXLUYXUBDcjs.serializeLayer; exports.serializeLayers = _chunkXLUYXUBDcjs.serializeLayers; exports.serializeLayersExternal = _chunkXLUYXUBDcjs.serializeLayersExternal; exports.serializePatterns = _chunkXLUYXUBDcjs.serializePatterns; exports.serializeSelection = _chunkXLUYXUBDcjs.serializeSelection; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkXLUYXUBDcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkXLUYXUBDcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkXLUYXUBDcjs.setLayerMask; exports.setLayerProperties = _chunkXLUYXUBDcjs.setLayerProperties; exports.setLum = _chunkJ5BA3BQ6cjs.setLum; exports.setPigmentColor = _chunkJ5BA3BQ6cjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkXLUYXUBDcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkXLUYXUBDcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkXLUYXUBDcjs.setSmartPlacement; exports.shadeTile = _chunkFHPVDTI2cjs.shadeTile; exports.shapeAsPixelLayer = _chunkXLUYXUBDcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkXLUYXUBDcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkXLUYXUBDcjs.shapeGeometryBounds; exports.shapeLayers = _chunkXLUYXUBDcjs.shapeLayers; exports.shapeOutline = _chunkXLUYXUBDcjs.shapeOutline; exports.shapeRenderClip = _chunkXLUYXUBDcjs.shapeRenderClip; exports.shiftCoverage = _chunkXLUYXUBDcjs.shiftCoverage; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkXLUYXUBDcjs.smartObjectLayers; exports.smoothCoverage = _chunkXLUYXUBDcjs.smoothCoverage; exports.smoothPoints = _chunk6GFRKLLScjs.smoothPoints; exports.smudgeEffect = _chunkW6M7C7R3cjs.smudgeEffect; exports.solidPaint = _chunk6GFRKLLScjs.solidPaint; exports.solidSurface = _chunkJ5BA3BQ6cjs.solidSurface; exports.solveMembrane = _chunkW6M7C7R3cjs.solveMembrane; exports.spliceRuns = _chunkORE334I6cjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunkW6M7C7R3cjs.sponge; exports.spongeEffect = _chunkW6M7C7R3cjs.spongeEffect; exports.spotHealPixels = _chunkW6M7C7R3cjs.spotHealPixels; exports.spotHealWindow = _chunkW6M7C7R3cjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkFHPVDTI2cjs.srgbByteToLinear; exports.srgbDecode = _chunkJ5BA3BQ6cjs.srgbDecode; exports.srgbEncode = _chunkJ5BA3BQ6cjs.srgbEncode; exports.srgbToLinear = _chunkXLUYXUBDcjs.srgbToLinear; exports.standardBlendMode = _chunkJ5BA3BQ6cjs.standardBlendMode; exports.stepSlotTs = _chunkFHPVDTI2cjs.stepSlotTs; exports.styleAt = _chunkORE334I6cjs.styleAt; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkJ5BA3BQ6cjs.surfaceBytes; exports.surfaceDepth = _chunkJ5BA3BQ6cjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkJ5BA3BQ6cjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunkJ5BA3BQ6cjs.surfaceFromPixels; exports.surfacesEqual = _chunkJ5BA3BQ6cjs.surfacesEqual; exports.tempTintToXy = _chunkXLUYXUBDcjs.tempTintToXy; exports.temperatureToKelvin = _chunkXLUYXUBDcjs.temperatureToKelvin; exports.textIndexAt = _chunkORE334I6cjs.textIndexAt; exports.textMatrix = _chunkXLUYXUBDcjs.textMatrix; exports.textOutlines = _chunkXLUYXUBDcjs.textOutlines; exports.textRange = _chunkXLUYXUBDcjs.textRange; exports.tileCoord = _chunkJ5BA3BQ6cjs.tileCoord; exports.tileKey = _chunkJ5BA3BQ6cjs.tileKey; exports.tileRect = _chunkJ5BA3BQ6cjs.tileRect; exports.tileSamples = _chunkJ5BA3BQ6cjs.tileSamples; exports.tileSamples16 = _chunkJ5BA3BQ6cjs.tileSamples16; exports.tileSamples32 = _chunkJ5BA3BQ6cjs.tileSamples32; exports.tilesInRect = _chunkJ5BA3BQ6cjs.tilesInRect; exports.tipFalloff = _chunk6GFRKLLScjs.tipFalloff; exports.tipReach = _chunk6GFRKLLScjs.tipReach; exports.tipShape = _chunk6GFRKLLScjs.tipShape; exports.to16From32 = _chunkJ5BA3BQ6cjs.to16From32; exports.to16From8 = _chunkJ5BA3BQ6cjs.to16From8; exports.to32From16 = _chunkJ5BA3BQ6cjs.to32From16; exports.to32From8 = _chunkJ5BA3BQ6cjs.to32From8; exports.to8From16 = _chunkJ5BA3BQ6cjs.to8From16; exports.to8From32 = _chunkJ5BA3BQ6cjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkXLUYXUBDcjs.toTextSpace; exports.toneCurve = _chunkXLUYXUBDcjs.toneCurve; exports.toneLuts = _chunkXLUYXUBDcjs.toneLuts; exports.toneOf = _chunkW6M7C7R3cjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkXLUYXUBDcjs.transformHomography; exports.transformMap = _chunkXLUYXUBDcjs.transformMap; exports.transformShapeComponents = _chunkXLUYXUBDcjs.transformShapeComponents; exports.transformSurface = _chunkMZXQTKUMcjs.transformSurface; exports.transformTypeLayer = _chunkXLUYXUBDcjs.transformTypeLayer; exports.transformedBounds = _chunkMZXQTKUMcjs.transformedBounds; exports.transformedBox = _chunkXLUYXUBDcjs.transformedBox; exports.transformedPoint = _chunkXLUYXUBDcjs.transformedPoint; exports.translateSurface = _chunkJ5BA3BQ6cjs.translateSurface; exports.typeAsPixelLayer = _chunkXLUYXUBDcjs.typeAsPixelLayer; exports.typeFrame = _chunkXLUYXUBDcjs.typeFrame; exports.typeFromAnnotation = _chunkXLUYXUBDcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkXLUYXUBDcjs.typeLayerName; exports.ungroupLayer = _chunkXLUYXUBDcjs.ungroupLayer; exports.uniformTile = _chunkJ5BA3BQ6cjs.uniformTile; exports.unionRect = _chunkXLUYXUBDcjs.unionRect; exports.unprojectCanvasPoint = _chunkXLUYXUBDcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkXLUYXUBDcjs.updateLayerEffect; exports.updateLayerFilter = _chunkXLUYXUBDcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkXLUYXUBDcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunk6GFRKLLScjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkXLUYXUBDcjs.updateShapeLayer; exports.updateSmartFilter = _chunkXLUYXUBDcjs.updateSmartFilter; exports.updateTypeLayer = _chunkXLUYXUBDcjs.updateTypeLayer; exports.uvToXy = _chunkXLUYXUBDcjs.uvToXy; exports.validateEffectGradient = _chunkMZXQTKUMcjs.validateEffectGradient; exports.validateLayerEffect = _chunkMZXQTKUMcjs.validateLayerEffect; exports.validateLayerEffects = _chunkMZXQTKUMcjs.validateLayerEffects; exports.versionedDescriptorBytes = _chunkXLUYXUBDcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkXLUYXUBDcjs.vibranceLinear; exports.vibrancePixel = _chunkXLUYXUBDcjs.vibrancePixel; exports.walkDabs = _chunk6GFRKLLScjs.walkDabs; exports.warpMeshEditPoints = _chunkORE334I6cjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkORE334I6cjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkORE334I6cjs.warpMeshParamAt; exports.warpPresetMesh = _chunkORE334I6cjs.warpPresetMesh; exports.warpSurface = _chunkMZXQTKUMcjs.warpSurface; exports.wbMatrix = _chunkXLUYXUBDcjs.wbMatrix; exports.wetGpuSupport = _chunkFHPVDTI2cjs.wetGpuSupport; exports.wetSimdSupported = _chunkFHPVDTI2cjs.wetSimdSupported; exports.wetSupport = _chunkFHPVDTI2cjs.wetSupport; exports.whiteBalanceFromSample = _chunkXLUYXUBDcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkXLUYXUBDcjs.whiteBalanceMatrix; exports.withFilterMaskSurface = _chunkXLUYXUBDcjs.withFilterMaskSurface; exports.withNewIds = _chunkXLUYXUBDcjs.withNewIds; exports.writeAdjustmentBlock = _chunkXLUYXUBDcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkJ5BA3BQ6cjs.writeDeepRegion; exports.writeLfx2 = _chunkXLUYXUBDcjs.writeLfx2; exports.writePatternBlock = _chunkXLUYXUBDcjs.writePatternBlock; exports.writePsd = _chunkXLUYXUBDcjs.writePsd; exports.writeRegion = _chunkJ5BA3BQ6cjs.writeRegion; exports.xyToTempTint = _chunkXLUYXUBDcjs.xyToTempTint; exports.xyToUv = _chunkXLUYXUBDcjs.xyToUv;
15755
+
15756
+ exports.ADJUSTMENT_KEYS = _chunkPMHPXCJCcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkPMHPXCJCcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkPMHPXCJCcjs.ADJUSTMENT_LUT_SIZE; exports.AS_SHOT_KELVIN = _chunkPMHPXCJCcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkPMHPXCJCcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkPMHPXCJCcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkJ5BA3BQ6cjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkJ5BA3BQ6cjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkPMHPXCJCcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkFHPVDTI2cjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkSYPFUL5Bcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkSYPFUL5Bcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkG5NMLUVFcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkZ6OUCS2Kcjs.BrushstrokeCache; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.CoverageMap = _chunk6GFRKLLScjs.CoverageMap; exports.D50 = _chunkPMHPXCJCcjs.D50; exports.D65 = _chunkPMHPXCJCcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkLXGOYRPEcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunk6GFRKLLScjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunk6GFRKLLScjs.DEFAULT_BRUSH; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkFHPVDTI2cjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkMZXQTKUMcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkPMHPXCJCcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunk6GFRKLLScjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunk6GFRKLLScjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunk6GFRKLLScjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunkW6M7C7R3cjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunk6GFRKLLScjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkLXGOYRPEcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkFHPVDTI2cjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkFHPVDTI2cjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkPMHPXCJCcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkMZXQTKUMcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkFHPVDTI2cjs.DRY_EPS; exports.DabWalker = _chunk6GFRKLLScjs.DabWalker; exports.EMPTY_DISTANCE = _chunkPMHPXCJCcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunk6GFRKLLScjs.EMPTY_MIXER_LOAD; exports.EX = _chunkFHPVDTI2cjs.EX; exports.EY = _chunkFHPVDTI2cjs.EY; exports.FLAG_ALIVE = _chunkFHPVDTI2cjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkFHPVDTI2cjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkFHPVDTI2cjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkFHPVDTI2cjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkFHPVDTI2cjs.FLAG_TOP; exports.FLAG_WET = _chunkFHPVDTI2cjs.FLAG_WET; exports.FLAT = _chunkFHPVDTI2cjs.FLAT; exports.FREE_INTERVAL = _chunkFHPVDTI2cjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkPMHPXCJCcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.HIDE = _chunkFHPVDTI2cjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkPMHPXCJCcjs.HUE_RANGE_LABELS; exports.IDENTITY_MATRIX3 = _chunkPMHPXCJCcjs.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.INTENTS = _chunkG5NMLUVFcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunkMZXQTKUMcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkPMHPXCJCcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkPMHPXCJCcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkMZXQTKUMcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkPMHPXCJCcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkPMHPXCJCcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkPMHPXCJCcjs.LUMA_709; exports.LayerCompositor = _chunkPMHPXCJCcjs.LayerCompositor; exports.LayerEffectError = _chunkMZXQTKUMcjs.LayerEffectError; exports.LayerOperationError = _chunkPMHPXCJCcjs.LayerOperationError; exports.MAX_BATCH = _chunkFHPVDTI2cjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunk6GFRKLLScjs.MAX_BRUSH_SIZE; exports.MAX_EFFECT_REACH = _chunkMZXQTKUMcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkPMHPXCJCcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkFHPVDTI2cjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkMZXQTKUMcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkFHPVDTI2cjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkFHPVDTI2cjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkPMHPXCJCcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkPMHPXCJCcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunk6GFRKLLScjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunk6GFRKLLScjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunk6GFRKLLScjs.MIXING_MODELS; exports.MixerStroke = _chunk6GFRKLLScjs.MixerStroke; exports.OPP = _chunkFHPVDTI2cjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkJ5BA3BQ6cjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunk6GFRKLLScjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunk6GFRKLLScjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunk6GFRKLLScjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunk6GFRKLLScjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunk6GFRKLLScjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunk6GFRKLLScjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunk6GFRKLLScjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunk6GFRKLLScjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunk6GFRKLLScjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunk6GFRKLLScjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunk6GFRKLLScjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunk6GFRKLLScjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkFHPVDTI2cjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkPMHPXCJCcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkFHPVDTI2cjs.PARAM; exports.PARAM_FLOATS = _chunkFHPVDTI2cjs.PARAM_FLOATS; exports.PATTERN_BLOCK_KEYS = _chunkPMHPXCJCcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkJ5BA3BQ6cjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkFHPVDTI2cjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkJ5BA3BQ6cjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkJ5BA3BQ6cjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkFHPVDTI2cjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkJ5BA3BQ6cjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkFHPVDTI2cjs.PLANE; exports.PLANE_BYTES = _chunkFHPVDTI2cjs.PLANE_BYTES; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkPMHPXCJCcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkFHPVDTI2cjs.P_D0; exports.P_EDGE = _chunkFHPVDTI2cjs.P_EDGE; exports.P_FX = _chunkFHPVDTI2cjs.P_FX; exports.P_FY = _chunkFHPVDTI2cjs.P_FY; exports.P_H = _chunkFHPVDTI2cjs.P_H; exports.P_P0 = _chunkFHPVDTI2cjs.P_P0; exports.P_RHO = _chunkFHPVDTI2cjs.P_RHO; exports.P_SW = _chunkFHPVDTI2cjs.P_SW; exports.P_UX = _chunkFHPVDTI2cjs.P_UX; exports.P_UY = _chunkFHPVDTI2cjs.P_UY; exports.PaintExchange = _chunk6GFRKLLScjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunk6GFRKLLScjs.PaintGradientSampler; exports.PaintSourceError = _chunk6GFRKLLScjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PatternPlacement = _chunkMZXQTKUMcjs.PatternPlacement; exports.PatternTile = _chunkMZXQTKUMcjs.PatternTile; exports.PsdError = _chunkPMHPXCJCcjs.PsdError; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunkW6M7C7R3cjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunkW6M7C7R3cjs.RegionPixelSource; exports.RetouchDabStroke = _chunkW6M7C7R3cjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkPMHPXCJCcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkPMHPXCJCcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SET_PLANES = _chunkFHPVDTI2cjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkJ5BA3BQ6cjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkPMHPXCJCcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkPMHPXCJCcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkFHPVDTI2cjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkFHPVDTI2cjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkFHPVDTI2cjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkPMHPXCJCcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunkW6M7C7R3cjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkFHPVDTI2cjs.SRGB_TO_LINEAR; exports.STRIP = _chunkFHPVDTI2cjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkPMHPXCJCcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunk6GFRKLLScjs.SmudgeTip; exports.StrokeCoverage = _chunk6GFRKLLScjs.StrokeCoverage; exports.SurfaceDraft = _chunkJ5BA3BQ6cjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkPMHPXCJCcjs.TEXT_ALIGNS; exports.TEXT_RENDER_MARGIN = _chunkPMHPXCJCcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkPMHPXCJCcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkJ5BA3BQ6cjs.TILE; exports.TILE_SHIFT = _chunkJ5BA3BQ6cjs.TILE_SHIFT; exports.TINT_SCALE = _chunkPMHPXCJCcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunk6GFRKLLScjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkPMHPXCJCcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunkW6M7C7R3cjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkPMHPXCJCcjs.TRANSFORM_ANCHORS; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunk6GFRKLLScjs.TileMedium; exports.TilePixelSource = _chunkW6M7C7R3cjs.TilePixelSource; exports.TiledSurface = _chunkJ5BA3BQ6cjs.TiledSurface; exports.TransformTooLargeError = _chunkMZXQTKUMcjs.TransformTooLargeError; exports.TypeToolGesture = TypeToolGesture; exports.U_MAX = _chunkFHPVDTI2cjs.U_MAX; exports.VIBRANCE_GREY = _chunkPMHPXCJCcjs.VIBRANCE_GREY; exports.W9 = _chunkFHPVDTI2cjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkLXGOYRPEcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkLXGOYRPEcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkFHPVDTI2cjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkFHPVDTI2cjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkFHPVDTI2cjs.WET_TILE; exports.WGSL_HALO = _chunkFHPVDTI2cjs.WGSL_HALO; exports.WGSL_SHADE = _chunkFHPVDTI2cjs.WGSL_SHADE; exports.WGSL_STEP = _chunkFHPVDTI2cjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WetGpuEngine = _chunkFHPVDTI2cjs.WetGpuEngine; exports.WetMedium = _chunkFHPVDTI2cjs.WetMedium; exports.WetWorkerPool = _chunkFHPVDTI2cjs.WetWorkerPool; exports.WetWorld = _chunkFHPVDTI2cjs.WetWorld; exports.WetWorldError = _chunkFHPVDTI2cjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkPMHPXCJCcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunk643B2HKCcjs.ZlibError; exports.activeAdjustmentLayers = _chunkPMHPXCJCcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkPMHPXCJCcjs.activeEffectSmartFilters; exports.activeSmartFilters = _chunkPMHPXCJCcjs.activeSmartFilters; exports.addLayerEffect = _chunkPMHPXCJCcjs.addLayerEffect; exports.addLayerFilter = _chunkPMHPXCJCcjs.addLayerFilter; exports.addPaintGradientStop = _chunk6GFRKLLScjs.addPaintGradientStop; exports.addSmartFilter = _chunkPMHPXCJCcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkPMHPXCJCcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkPMHPXCJCcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkPMHPXCJCcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkPMHPXCJCcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunk643B2HKCcjs.adler32; exports.anchorPoint = _chunkPMHPXCJCcjs.anchorPoint; exports.annotationBlend = _chunkPMHPXCJCcjs.annotationBlend; exports.annotationLayerFor = _chunkPMHPXCJCcjs.annotationLayerFor; exports.annotationLayerName = _chunkPMHPXCJCcjs.annotationLayerName; exports.annotationOfLayer = _chunkPMHPXCJCcjs.annotationOfLayer; exports.annotationOfShape = _chunkPMHPXCJCcjs.annotationOfShape; exports.annotationOfType = _chunkPMHPXCJCcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkPMHPXCJCcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkPMHPXCJCcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkPMHPXCJCcjs.applyAdjustments; exports.applyBoxBlur = _chunkPMHPXCJCcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkPMHPXCJCcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkPMHPXCJCcjs.applyDepthMask; exports.applyHomography = _chunkMUUXNRU4cjs.applyHomography; exports.applyImageProjectionToContext = _chunkPMHPXCJCcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkPMHPXCJCcjs.applyLegacyAdjustments; exports.applyMatrix3 = _chunkPMHPXCJCcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkPMHPXCJCcjs.applyParams; exports.applyProcess2Adjustments = _chunkPMHPXCJCcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkPMHPXCJCcjs.applyProcess2Float; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunkW6M7C7R3cjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkPMHPXCJCcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunk6GFRKLLScjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunk6GFRKLLScjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunkW6M7C7R3cjs.applyToneToDeepTile; exports.backgroundLayer = _chunkPMHPXCJCcjs.backgroundLayer; exports.base64ToBytes = _chunkDCLJNVZScjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunkW6M7C7R3cjs.bestOffset; exports.blackWhiteGray = _chunkPMHPXCJCcjs.blackWhiteGray; exports.blendChannel = _chunkJ5BA3BQ6cjs.blendChannel; exports.blendImageData = _chunkJ5BA3BQ6cjs.blendImageData; exports.blendLum = _chunkJ5BA3BQ6cjs.blendLum; exports.blendPixel = _chunkJ5BA3BQ6cjs.blendPixel; exports.blendRadius = _chunk6GFRKLLScjs.blendRadius; exports.blendRgb = _chunkJ5BA3BQ6cjs.blendRgb; exports.blendTile = _chunkMZXQTKUMcjs.blendTile; exports.blenderDab = _chunk6GFRKLLScjs.blenderDab; exports.blurFilter = _chunkPMHPXCJCcjs.blurFilter; exports.borderCoverage = _chunkPMHPXCJCcjs.borderCoverage; exports.boxMean = boxMean; exports.boxPointOf = _chunkPMHPXCJCcjs.boxPointOf; exports.boxQuad = _chunkMUUXNRU4cjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkPMHPXCJCcjs.bradfordAdaptation; exports.brushstrokeDataUrl = _chunkZ6OUCS2Kcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkZ6OUCS2Kcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkZ6OUCS2Kcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkSYPFUL5Bcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkZ6OUCS2Kcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkZ6OUCS2Kcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkPMHPXCJCcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkPMHPXCJCcjs.buildToneLut; exports.builtinPattern = _chunkMZXQTKUMcjs.builtinPattern; exports.builtinPatternIds = _chunkMZXQTKUMcjs.builtinPatternIds; exports.bytesToBase64 = _chunkDCLJNVZScjs.bytesToBase64; exports.calculateCropDrag = _chunkPMHPXCJCcjs.calculateCropDrag; exports.canShareMemory = _chunkFHPVDTI2cjs.canShareMemory; exports.canvasCompositeOperation = _chunkJ5BA3BQ6cjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkPMHPXCJCcjs.canvasToImagePoint; exports.caretAt = _chunkLXGOYRPEcjs.caretAt; exports.changedTiles = _chunkMZXQTKUMcjs.changedTiles; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkPMHPXCJCcjs.clampCropToImage; exports.cleanMixer = _chunk6GFRKLLScjs.cleanMixer; exports.cloneSourceLabel = cloneSourceLabel; exports.collectTiles = _chunkJ5BA3BQ6cjs.collectTiles; exports.colorBalanceChannel = _chunkPMHPXCJCcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.combineSelections = _chunkPMHPXCJCcjs.combineSelections; exports.compileAdjustmentLayer = _chunkPMHPXCJCcjs.compileAdjustmentLayer; exports.componentPath = _chunkPMHPXCJCcjs.componentPath; exports.compositeDeep = _chunkPMHPXCJCcjs.compositeDeep; exports.compositeSurfaceOver = _chunkMZXQTKUMcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkPMHPXCJCcjs.computeSelectionBounds; exports.contentBounds = _chunkJ5BA3BQ6cjs.contentBounds; exports.contentsBox = _chunkPMHPXCJCcjs.contentsBox; exports.contentsSurface = _chunkPMHPXCJCcjs.contentsSurface; exports.contractCoverage = _chunkPMHPXCJCcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkJ5BA3BQ6cjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkPMHPXCJCcjs.convertToSmartObject; exports.copySmartObject = _chunkPMHPXCJCcjs.copySmartObject; exports.cornersFromMatrix = _chunkPMHPXCJCcjs.cornersFromMatrix; exports.coverageTileCoord = _chunk6GFRKLLScjs.coverageTileCoord; exports.coverageToByte = _chunkPMHPXCJCcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkPMHPXCJCcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunk6GFRKLLScjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkLXGOYRPEcjs.createCanvasTextShaper; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageColorTools = createImageColorTools; exports.createImageEditTools = createImageEditTools; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageEffectsToolProvider = createImageEffectsToolProvider; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunkLXGOYRPEcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkLXGOYRPEcjs.createOutlineTextShaper; exports.createPigment = _chunkJ5BA3BQ6cjs.createPigment; exports.createPigmentTools = _chunkFHPVDTI2cjs.createPigmentTools; exports.createSelectionMask = _chunkPMHPXCJCcjs.createSelectionMask; exports.createShapeLayer = _chunkPMHPXCJCcjs.createShapeLayer; exports.createTypeLayer = _chunkPMHPXCJCcjs.createTypeLayer; exports.createWetGpuEngine = _chunkFHPVDTI2cjs.createWetGpuEngine; exports.cssFont = _chunkLXGOYRPEcjs.cssFont; exports.cssFontFamily = _chunkLXGOYRPEcjs.cssFontFamily; exports.curveLut = _chunkMZXQTKUMcjs.curveLut; exports.curveLutFromLevels = _chunkPMHPXCJCcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunk6GFRKLLScjs.dabCoverage; exports.dabRect = _chunk6GFRKLLScjs.dabRect; exports.decodeDeepSurface = _chunkPMHPXCJCcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkPMHPXCJCcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkPMHPXCJCcjs.decodeLayerMask; exports.decodeMergedImage = _chunkPMHPXCJCcjs.decodeMergedImage; exports.decodePlanes = _chunkPMHPXCJCcjs.decodePlanes; exports.decodePng = _chunkDCLJNVZScjs.decodePng; exports.decodePngDataUrl = _chunkPMHPXCJCcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkPMHPXCJCcjs.decodeSelectionRle; exports.deepBytes = _chunkJ5BA3BQ6cjs.deepBytes; exports.deepTile = _chunkJ5BA3BQ6cjs.deepTile; exports.defaultAdjustmentParams = _chunkPMHPXCJCcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkMZXQTKUMcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkMZXQTKUMcjs.defaultLayerEffect; exports.defaultShapeName = _chunkPMHPXCJCcjs.defaultShapeName; exports.deflate = _chunk643B2HKCcjs.deflate; exports.deflateRaw = _chunk643B2HKCcjs.deflateRaw; exports.depthMaskAlpha = _chunkPMHPXCJCcjs.depthMaskAlpha; exports.depthOf = _chunkJ5BA3BQ6cjs.depthOf; exports.depthRasterMask = _chunkPMHPXCJCcjs.depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkPMHPXCJCcjs.describeTransform; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkPMHPXCJCcjs.deserializeEffects; exports.deserializeLayer = _chunkPMHPXCJCcjs.deserializeLayer; exports.deserializeLayers = _chunkPMHPXCJCcjs.deserializeLayers; exports.deserializePatterns = _chunkPMHPXCJCcjs.deserializePatterns; exports.deserializeSelection = _chunkPMHPXCJCcjs.deserializeSelection; exports.developFilter = _chunkPMHPXCJCcjs.developFilter; exports.developFromAdjustments = _chunkPMHPXCJCcjs.developFromAdjustments; exports.developTarget = _chunkPMHPXCJCcjs.developTarget; exports.dexp = _chunkFHPVDTI2cjs.dexp; exports.dilateMask = _chunkW6M7C7R3cjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkPMHPXCJCcjs.distanceTransform; exports.dlog = _chunkFHPVDTI2cjs.dlog; exports.documentContents = _chunkPMHPXCJCcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunkW6M7C7R3cjs.dodgeBurn; exports.dodgeBurnCurve = _chunkW6M7C7R3cjs.dodgeBurnCurve; exports.downloadPsd = downloadPsd; exports.dpow = _chunkFHPVDTI2cjs.dpow; exports.dragWarpMeshPoint = _chunkLXGOYRPEcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkFHPVDTI2cjs.dsincos; exports.duplicateLayer = _chunkPMHPXCJCcjs.duplicateLayer; exports.edgeBits = _chunkFHPVDTI2cjs.edgeBits; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunkMZXQTKUMcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkMZXQTKUMcjs.effectReach; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkMZXQTKUMcjs.effectsFingerprint; exports.effectsMargin = _chunkMZXQTKUMcjs.effectsMargin; exports.effectsScale = _chunkMZXQTKUMcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkJ5BA3BQ6cjs.emptySurface; exports.encodeDeepSurface = _chunkPMHPXCJCcjs.encodeDeepSurface; exports.encodePng = _chunkDCLJNVZScjs.encodePng; exports.encodeRle = _chunkPMHPXCJCcjs.encodeRle; exports.encodeSelectionRle = _chunkPMHPXCJCcjs.encodeSelectionRle; exports.encodeSurface = _chunkPMHPXCJCcjs.encodeSurface; exports.evalWarpMesh = _chunkLXGOYRPEcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkPMHPXCJCcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunk6GFRKLLScjs.exchangeRates; exports.expNeg = _chunkFHPVDTI2cjs.expNeg; exports.expandCoverage = _chunkPMHPXCJCcjs.expandCoverage; exports.exportPsd = _chunkPMHPXCJCcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkPMHPXCJCcjs.featherCoverage; exports.fillRect = _chunkJ5BA3BQ6cjs.fillRect; exports.filmPixel = _chunkFHPVDTI2cjs.filmPixel; exports.filmReflectance = _chunkFHPVDTI2cjs.filmReflectance; exports.filterMaskCoverage = _chunkPMHPXCJCcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkMZXQTKUMcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findWebGpu = _chunkFHPVDTI2cjs.findWebGpu; exports.finishTile = _chunkJ5BA3BQ6cjs.finishTile; exports.fitParagraphRuns = _chunkLXGOYRPEcjs.fitParagraphRuns; exports.fitRuns = _chunkLXGOYRPEcjs.fitRuns; exports.flattenLayers = _chunkMZXQTKUMcjs.flattenLayers; exports.flattenPath = _chunkPMHPXCJCcjs.flattenPath; exports.flipCorners = _chunkPMHPXCJCcjs.flipCorners; exports.flowField = _chunkFHPVDTI2cjs.flowField; exports.fontOf = _chunkLXGOYRPEcjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkPMHPXCJCcjs.fullSelection; exports.gaussianBlur = _chunkMZXQTKUMcjs.gaussianBlur; exports.geometryHomography = _chunkPMHPXCJCcjs.geometryHomography; exports.getAnnotationBounds = _chunkPMHPXCJCcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkPMHPXCJCcjs.getCropCursor; exports.getRotatedSize = _chunkPMHPXCJCcjs.getRotatedSize; exports.getViewportMetrics = _chunkPMHPXCJCcjs.getViewportMetrics; exports.getViewportProjection = _chunkPMHPXCJCcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.gradientDabColor = _chunk6GFRKLLScjs.gradientDabColor; exports.greyMorphology = _chunkPMHPXCJCcjs.greyMorphology; exports.groupLayers = _chunkPMHPXCJCcjs.groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunkMZXQTKUMcjs.hasActiveEffects; exports.hasResampledLegacyMask = _chunkPMHPXCJCcjs.hasResampledLegacyMask; exports.hasSurface = _chunkPMHPXCJCcjs.hasSurface; exports.hasWarp = _chunkPMHPXCJCcjs.hasWarp; exports.hash2 = _chunk6GFRKLLScjs.hash2; exports.hashMaskContent = _chunkPMHPXCJCcjs.hashMaskContent; exports.hashNoise = _chunkMZXQTKUMcjs.hashNoise; exports.healPixels = _chunkW6M7C7R3cjs.healPixels; exports.hexToPaintRgb = _chunk6GFRKLLScjs.hexToPaintRgb; exports.hexToRgb = _chunkPMHPXCJCcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkPMHPXCJCcjs.hitTestAnnotation; exports.hitTestCrop = _chunkPMHPXCJCcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkMUUXNRU4cjs.homographyFromAffine; exports.homographyFromPoints = _chunkMUUXNRU4cjs.homographyFromPoints; exports.hslToRgb = _chunkPMHPXCJCcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkPMHPXCJCcjs.hueRangeTables; exports.hueRangeWeight = _chunkPMHPXCJCcjs.hueRangeWeight; exports.hueSaturation = _chunkPMHPXCJCcjs.hueSaturation; exports.identityCurve = _chunkPMHPXCJCcjs.identityCurve; exports.identityLevels = _chunkPMHPXCJCcjs.identityLevels; exports.identityTransform = _chunkPMHPXCJCcjs.identityTransform; exports.identityWarpMesh = _chunkLXGOYRPEcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imageToCanvasPoint = _chunkPMHPXCJCcjs.imageToCanvasPoint; exports.importPsd = _chunkPMHPXCJCcjs.importPsd; exports.inflate = _chunk643B2HKCcjs.inflate; exports.inflateRaw = _chunk643B2HKCcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkMZXQTKUMcjs.insertLayer; exports.instancesOf = _chunkPMHPXCJCcjs.instancesOf; exports.invertHomography = _chunkMUUXNRU4cjs.invertHomography; exports.invertMatrix3 = _chunkPMHPXCJCcjs.invertMatrix3; exports.invertSelection = _chunkPMHPXCJCcjs.invertSelection; exports.isActiveFilter = _chunkPMHPXCJCcjs.isActiveFilter; exports.isAdjustmentKind = _chunkPMHPXCJCcjs.isAdjustmentKind; exports.isBitDepth = _chunkJ5BA3BQ6cjs.isBitDepth; exports.isBlendMode = _chunkJ5BA3BQ6cjs.isBlendMode; exports.isBrushstrokeBrush = _chunkZ6OUCS2Kcjs.isBrushstrokeBrush; exports.isContentsDecoded = _chunkPMHPXCJCcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkPMHPXCJCcjs.isDefaultDepthMask; exports.isGradientPaint = _chunk6GFRKLLScjs.isGradientPaint; exports.isIdentityTransform = _chunkPMHPXCJCcjs.isIdentityTransform; exports.isInterpolation = _chunkMZXQTKUMcjs.isInterpolation; exports.isLayerEffectKind = _chunkMZXQTKUMcjs.isLayerEffectKind; exports.isLayerLocked = _chunkMZXQTKUMcjs.isLayerLocked; exports.isLegacyShape = _chunkPMHPXCJCcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPainterlyBlendMode = _chunkJ5BA3BQ6cjs.isPainterlyBlendMode; exports.isPng = _chunkDCLJNVZScjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkPMHPXCJCcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkPMHPXCJCcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkPMHPXCJCcjs.isSelectionEmpty; exports.isSelectionMode = _chunkPMHPXCJCcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkJ5BA3BQ6cjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkPMHPXCJCcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkPMHPXCJCcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkPMHPXCJCcjs.isTransformAnchor; exports.isValidWarp = _chunkPMHPXCJCcjs.isValidWarp; exports.keepDeepSamples = _chunkJ5BA3BQ6cjs.keepDeepSamples; exports.kelvinToTemperature = _chunkPMHPXCJCcjs.kelvinToTemperature; exports.keysWeight = _chunkMZXQTKUMcjs.keysWeight; exports.latticeViscosity = _chunkFHPVDTI2cjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkMZXQTKUMcjs.layerEffectFields; exports.layerEffectLabel = _chunkMZXQTKUMcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkPMHPXCJCcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkPMHPXCJCcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkPMHPXCJCcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkPMHPXCJCcjs.layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = _chunkPMHPXCJCcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerTree = _chunkPMHPXCJCcjs.layerTree; exports.layerTypeLabel = _chunkPMHPXCJCcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkPMHPXCJCcjs.layersFromLegacy; exports.layoutText = _chunkLXGOYRPEcjs.layoutText; exports.legacyAdjustmentLayer = _chunkPMHPXCJCcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkPMHPXCJCcjs.legacyMaskOf; exports.legacyView = _chunkPMHPXCJCcjs.legacyView; exports.lerpPigment = _chunkJ5BA3BQ6cjs.lerpPigment; exports.lerpPigmentInto = _chunkJ5BA3BQ6cjs.lerpPigmentInto; exports.levelsValue = _chunkPMHPXCJCcjs.levelsValue; exports.linearSrgbToXy = _chunkPMHPXCJCcjs.linearSrgbToXy; exports.linearToSrgb = _chunkPMHPXCJCcjs.linearToSrgb; exports.linearToSrgb8 = _chunkFHPVDTI2cjs.linearToSrgb8; exports.liveComponent = _chunkPMHPXCJCcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkPMHPXCJCcjs.liveShapeSubpaths; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunk6GFRKLLScjs.loadMixer; exports.loadOpenTypeFont = _chunk2OJACTPRcjs.loadOpenTypeFont; exports.loadWetKernel = _chunkFHPVDTI2cjs.loadWetKernel; exports.luma = _chunkW6M7C7R3cjs.luma; exports.magicWand = magicWand; exports.mapCropHandle = _chunkPMHPXCJCcjs.mapCropHandle; exports.mapLayer = _chunkMZXQTKUMcjs.mapLayer; exports.mapSubpaths = _chunkPMHPXCJCcjs.mapSubpaths; exports.maskBounds = _chunkW6M7C7R3cjs.maskBounds; exports.maskSummary = maskSummary; exports.matrixFromCorners = _chunkPMHPXCJCcjs.matrixFromCorners; exports.matrixFromParams = _chunkPMHPXCJCcjs.matrixFromParams; exports.membraneFill = _chunkW6M7C7R3cjs.membraneFill; exports.mergeLayerEffect = _chunkMZXQTKUMcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkPMHPXCJCcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunk6GFRKLLScjs.mix32; exports.mixPigment8 = _chunkJ5BA3BQ6cjs.mixPigment8; exports.mixPigmentRgb = _chunkJ5BA3BQ6cjs.mixPigmentRgb; exports.mixPigments = _chunkJ5BA3BQ6cjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunk6GFRKLLScjs.mixerRates; exports.modifySelection = _chunkPMHPXCJCcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkPMHPXCJCcjs.moveLayer; exports.moveSmartFilter = _chunkPMHPXCJCcjs.moveSmartFilter; exports.mulMatrix3 = _chunkPMHPXCJCcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkPMHPXCJCcjs.neutralHueRange; exports.newContentsId = _chunkPMHPXCJCcjs.newContentsId; exports.newEffectId = _chunkMZXQTKUMcjs.newEffectId; exports.newLayerId = _chunkPMHPXCJCcjs.newLayerId; exports.normalizeAdjustmentLayer = _chunkPMHPXCJCcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkPMHPXCJCcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkPMHPXCJCcjs.normalizeAngle; exports.normalizeBlendMode = _chunkJ5BA3BQ6cjs.normalizeBlendMode; exports.normalizeBlender = _chunk6GFRKLLScjs.normalizeBlender; exports.normalizeBrush = _chunk6GFRKLLScjs.normalizeBrush; exports.normalizeFilter = _chunkPMHPXCJCcjs.normalizeFilter; exports.normalizeFlow = _chunkFHPVDTI2cjs.normalizeFlow; exports.normalizeHexColor = _chunk6GFRKLLScjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkMZXQTKUMcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkPMHPXCJCcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkPMHPXCJCcjs.normalizeLiveShape; exports.normalizeMixer = _chunk6GFRKLLScjs.normalizeMixer; exports.normalizePlacement = _chunkPMHPXCJCcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkPMHPXCJCcjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunkW6M7C7R3cjs.normalizeRetouch; exports.normalizeShapePaint = _chunkPMHPXCJCcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkPMHPXCJCcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkPMHPXCJCcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunk6GFRKLLScjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkPMHPXCJCcjs.normalizeSubpaths; exports.normalizeText = _chunkPMHPXCJCcjs.normalizeText; exports.normalizeTilt = _chunkFHPVDTI2cjs.normalizeTilt; exports.normalizeWetParams = _chunkFHPVDTI2cjs.normalizeWetParams; exports.offsetLayer = _chunkPMHPXCJCcjs.offsetLayer; exports.offsetShape = _chunkPMHPXCJCcjs.offsetShape; exports.offsetSmartObject = _chunkPMHPXCJCcjs.offsetSmartObject; exports.openPsdFile = openPsdFile; exports.packRgba = _chunkJ5BA3BQ6cjs.packRgba; exports.packWetParams = _chunkFHPVDTI2cjs.packWetParams; exports.paintGradientMappingFor = _chunk6GFRKLLScjs.paintGradientMappingFor; exports.paintPathStroke = _chunkZ6OUCS2Kcjs.paintPathStroke; exports.paintSourceColor = _chunk6GFRKLLScjs.paintSourceColor; exports.paintSourceCss = _chunk6GFRKLLScjs.paintSourceCss; exports.paragraphRanges = _chunkLXGOYRPEcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkPMHPXCJCcjs.parseAdjustmentBlock; exports.parseBlend = _chunkPMHPXCJCcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunk2YQONY6Gcjs.parseCssColor; exports.parseDataUrl = _chunkDCLJNVZScjs.parseDataUrl; exports.parseEffectColor = _chunkMZXQTKUMcjs.parseEffectColor; exports.parseLfx2 = _chunkPMHPXCJCcjs.parseLfx2; exports.parseLrfx = _chunkPMHPXCJCcjs.parseLrfx; exports.parseOpenTypeFont = _chunk2OJACTPRcjs.parseOpenTypeFont; exports.parsePaintSource = _chunk6GFRKLLScjs.parsePaintSource; exports.parsePatternBlock = _chunkPMHPXCJCcjs.parsePatternBlock; exports.parseSelectionMode = _chunkPMHPXCJCcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkPMHPXCJCcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkPMHPXCJCcjs.patchParagraphStyle; exports.patchTextStyle = _chunkPMHPXCJCcjs.patchTextStyle; exports.pathStrokeCoverage = _chunkZ6OUCS2Kcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkZ6OUCS2Kcjs.pathStrokeDabs; exports.perDabStrength = _chunkW6M7C7R3cjs.perDabStrength; exports.photoFilterMatrix = _chunkPMHPXCJCcjs.photoFilterMatrix; exports.pigment8 = _chunkJ5BA3BQ6cjs.pigment8; exports.pigmentColor = _chunkFHPVDTI2cjs.pigmentColor; exports.pigmentOf = _chunkFHPVDTI2cjs.pigmentOf; exports.pixelLayerBounds = _chunkPMHPXCJCcjs.pixelLayerBounds; exports.pixelLayers = _chunkPMHPXCJCcjs.pixelLayers; exports.pixelPigment = _chunkFHPVDTI2cjs.pixelPigment; exports.placeContents = _chunkPMHPXCJCcjs.placeContents; exports.placeLayer = _chunkPMHPXCJCcjs.placeLayer; exports.placementAt = _chunkPMHPXCJCcjs.placementAt; exports.placementBounds = _chunkPMHPXCJCcjs.placementBounds; exports.placementGeometry = _chunkPMHPXCJCcjs.placementGeometry; exports.pngDataUrl = _chunkDCLJNVZScjs.pngDataUrl; exports.pointerPressure = _chunkFHPVDTI2cjs.pointerPressure; exports.pointerStrokeSample = _chunkFHPVDTI2cjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkFHPVDTI2cjs.pointerStrokeSamples; exports.polygonCoverage = polygonCoverage; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunkPMHPXCJCcjs.posterizeValue; exports.presetWarp = _chunkPMHPXCJCcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkPMHPXCJCcjs.projectImagePoint; exports.projectImageRect = _chunkPMHPXCJCcjs.projectImageRect; exports.projectMaskCoverage = _chunkPMHPXCJCcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkJ5BA3BQ6cjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkPMHPXCJCcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkPMHPXCJCcjs.psdToLayers; exports.pullWarpMesh = _chunkLXGOYRPEcjs.pullWarpMesh; exports.put255 = _chunk6GFRKLLScjs.put255; exports.quickMaskPixels = quickMaskPixels; exports.rand01 = _chunk6GFRKLLScjs.rand01; exports.rangeLightness = _chunkPMHPXCJCcjs.rangeLightness; exports.rasterContents = _chunkPMHPXCJCcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkPMHPXCJCcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkPMHPXCJCcjs.rasterizeCoverage; exports.rasterizeDab = _chunk6GFRKLLScjs.rasterizeDab; exports.rasterizeSmartObject = _chunkPMHPXCJCcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkJ5BA3BQ6cjs.readDeepRegion; exports.readPaintSource = _chunk6GFRKLLScjs.readPaintSource; exports.readPixel = _chunkJ5BA3BQ6cjs.readPixel; exports.readPsd = _chunkPMHPXCJCcjs.readPsd; exports.readRegion = _chunkJ5BA3BQ6cjs.readRegion; exports.readSourceRegion = _chunkW6M7C7R3cjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkMUUXNRU4cjs.rectToQuad; exports.reduceSurface = _chunkMZXQTKUMcjs.reduceSurface; exports.referencePoint = _chunkPMHPXCJCcjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkJ5BA3BQ6cjs.reflectanceToRgb; exports.removeAlpha = _chunkPMHPXCJCcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkPMHPXCJCcjs.removeLayer; exports.removeLayerEffect = _chunkPMHPXCJCcjs.removeLayerEffect; exports.removeLayerFilter = _chunkPMHPXCJCcjs.removeLayerFilter; exports.removePaintGradientStop = _chunk6GFRKLLScjs.removePaintGradientStop; exports.removeSmartFilter = _chunkPMHPXCJCcjs.removeSmartFilter; exports.renderBrushstroke = _chunkZ6OUCS2Kcjs.renderBrushstroke; exports.renderLayerEffects = _chunkMZXQTKUMcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkPMHPXCJCcjs.renderShape; exports.renderShapeRect = _chunkPMHPXCJCcjs.renderShapeRect; exports.renderSmartObject = _chunkPMHPXCJCcjs.renderSmartObject; exports.renderText = _chunkPMHPXCJCcjs.renderText; exports.replaceContents = _chunkPMHPXCJCcjs.replaceContents; exports.replaceTextRange = _chunkPMHPXCJCcjs.replaceTextRange; exports.requireLayer = _chunkPMHPXCJCcjs.requireLayer; exports.requireOperation = _chunkPMHPXCJCcjs.requireOperation; exports.requireShapeLayer = _chunkPMHPXCJCcjs.requireShapeLayer; exports.requireSmartObject = _chunkPMHPXCJCcjs.requireSmartObject; exports.requireTypeLayer = _chunkPMHPXCJCcjs.requireTypeLayer; exports.requireUnlocked = _chunkPMHPXCJCcjs.requireUnlocked; exports.rerender = _chunkPMHPXCJCcjs.rerender; exports.rerenderShape = _chunkPMHPXCJCcjs.rerenderShape; exports.rerenderText = _chunkPMHPXCJCcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkPMHPXCJCcjs.resizeSelection; exports.resizeWarpMesh = _chunkLXGOYRPEcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkPMHPXCJCcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunk6GFRKLLScjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.restyleRange = _chunkLXGOYRPEcjs.restyleRange; exports.reversePaintGradient = _chunk6GFRKLLScjs.reversePaintGradient; exports.rgbToGray = _chunkPMHPXCJCcjs.rgbToGray; exports.rgbToHsl = _chunkPMHPXCJCcjs.rgbToHsl; exports.rgbToReflectance = _chunkJ5BA3BQ6cjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunkW6M7C7R3cjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkPMHPXCJCcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkPMHPXCJCcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sampleLut = _chunkPMHPXCJCcjs.sampleLut; exports.sampleToneLut = _chunkPMHPXCJCcjs.sampleToneLut; exports.saturationOf = _chunkW6M7C7R3cjs.saturationOf; exports.scaleLayerEffect = _chunkMZXQTKUMcjs.scaleLayerEffect; exports.scalePaintGradient = _chunk6GFRKLLScjs.scalePaintGradient; exports.seamlessClone = _chunkW6M7C7R3cjs.seamlessClone; exports.selectionArea = _chunkPMHPXCJCcjs.selectionArea; exports.selectionFromCoverage = _chunkPMHPXCJCcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkPMHPXCJCcjs.selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = _chunkPMHPXCJCcjs.selectionToCoverage; exports.selectionToPixels = _chunkPMHPXCJCcjs.selectionToPixels; exports.selectionValueAt = _chunkPMHPXCJCcjs.selectionValueAt; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkPMHPXCJCcjs.serializeContents; exports.serializeEffects = _chunkPMHPXCJCcjs.serializeEffects; exports.serializeLayer = _chunkPMHPXCJCcjs.serializeLayer; exports.serializeLayers = _chunkPMHPXCJCcjs.serializeLayers; exports.serializeLayersExternal = _chunkPMHPXCJCcjs.serializeLayersExternal; exports.serializePatterns = _chunkPMHPXCJCcjs.serializePatterns; exports.serializeSelection = _chunkPMHPXCJCcjs.serializeSelection; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkPMHPXCJCcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkPMHPXCJCcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkPMHPXCJCcjs.setLayerMask; exports.setLayerProperties = _chunkPMHPXCJCcjs.setLayerProperties; exports.setLum = _chunkJ5BA3BQ6cjs.setLum; exports.setPigmentColor = _chunkJ5BA3BQ6cjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkPMHPXCJCcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkPMHPXCJCcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkPMHPXCJCcjs.setSmartPlacement; exports.shadeTile = _chunkFHPVDTI2cjs.shadeTile; exports.shapeAsPixelLayer = _chunkPMHPXCJCcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkPMHPXCJCcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkPMHPXCJCcjs.shapeGeometryBounds; exports.shapeLayers = _chunkPMHPXCJCcjs.shapeLayers; exports.shapeOutline = _chunkPMHPXCJCcjs.shapeOutline; exports.shapeRenderClip = _chunkPMHPXCJCcjs.shapeRenderClip; exports.shiftCoverage = _chunkPMHPXCJCcjs.shiftCoverage; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkPMHPXCJCcjs.smartObjectLayers; exports.smoothCoverage = _chunkPMHPXCJCcjs.smoothCoverage; exports.smoothPoints = _chunk6GFRKLLScjs.smoothPoints; exports.smudgeEffect = _chunkW6M7C7R3cjs.smudgeEffect; exports.solidPaint = _chunk6GFRKLLScjs.solidPaint; exports.solidSurface = _chunkJ5BA3BQ6cjs.solidSurface; exports.solveMembrane = _chunkW6M7C7R3cjs.solveMembrane; exports.spliceRuns = _chunkLXGOYRPEcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunkW6M7C7R3cjs.sponge; exports.spongeEffect = _chunkW6M7C7R3cjs.spongeEffect; exports.spotHealPixels = _chunkW6M7C7R3cjs.spotHealPixels; exports.spotHealWindow = _chunkW6M7C7R3cjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkFHPVDTI2cjs.srgbByteToLinear; exports.srgbDecode = _chunkJ5BA3BQ6cjs.srgbDecode; exports.srgbEncode = _chunkJ5BA3BQ6cjs.srgbEncode; exports.srgbToLinear = _chunkPMHPXCJCcjs.srgbToLinear; exports.standardBlendMode = _chunkJ5BA3BQ6cjs.standardBlendMode; exports.stepSlotTs = _chunkFHPVDTI2cjs.stepSlotTs; exports.styleAt = _chunkLXGOYRPEcjs.styleAt; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkJ5BA3BQ6cjs.surfaceBytes; exports.surfaceDepth = _chunkJ5BA3BQ6cjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkJ5BA3BQ6cjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunkJ5BA3BQ6cjs.surfaceFromPixels; exports.surfacesEqual = _chunkJ5BA3BQ6cjs.surfacesEqual; exports.tempTintToXy = _chunkPMHPXCJCcjs.tempTintToXy; exports.temperatureToKelvin = _chunkPMHPXCJCcjs.temperatureToKelvin; exports.textIndexAt = _chunkLXGOYRPEcjs.textIndexAt; exports.textMatrix = _chunkPMHPXCJCcjs.textMatrix; exports.textOutlines = _chunkPMHPXCJCcjs.textOutlines; exports.textRange = _chunkPMHPXCJCcjs.textRange; exports.tileCoord = _chunkJ5BA3BQ6cjs.tileCoord; exports.tileKey = _chunkJ5BA3BQ6cjs.tileKey; exports.tileRect = _chunkJ5BA3BQ6cjs.tileRect; exports.tileSamples = _chunkJ5BA3BQ6cjs.tileSamples; exports.tileSamples16 = _chunkJ5BA3BQ6cjs.tileSamples16; exports.tileSamples32 = _chunkJ5BA3BQ6cjs.tileSamples32; exports.tilesInRect = _chunkJ5BA3BQ6cjs.tilesInRect; exports.tipFalloff = _chunk6GFRKLLScjs.tipFalloff; exports.tipReach = _chunk6GFRKLLScjs.tipReach; exports.tipShape = _chunk6GFRKLLScjs.tipShape; exports.to16From32 = _chunkJ5BA3BQ6cjs.to16From32; exports.to16From8 = _chunkJ5BA3BQ6cjs.to16From8; exports.to32From16 = _chunkJ5BA3BQ6cjs.to32From16; exports.to32From8 = _chunkJ5BA3BQ6cjs.to32From8; exports.to8From16 = _chunkJ5BA3BQ6cjs.to8From16; exports.to8From32 = _chunkJ5BA3BQ6cjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkPMHPXCJCcjs.toTextSpace; exports.toneCurve = _chunkPMHPXCJCcjs.toneCurve; exports.toneLuts = _chunkPMHPXCJCcjs.toneLuts; exports.toneOf = _chunkW6M7C7R3cjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkPMHPXCJCcjs.transformHomography; exports.transformMap = _chunkPMHPXCJCcjs.transformMap; exports.transformShapeComponents = _chunkPMHPXCJCcjs.transformShapeComponents; exports.transformSurface = _chunkMZXQTKUMcjs.transformSurface; exports.transformTypeLayer = _chunkPMHPXCJCcjs.transformTypeLayer; exports.transformedBounds = _chunkMZXQTKUMcjs.transformedBounds; exports.transformedBox = _chunkPMHPXCJCcjs.transformedBox; exports.transformedPoint = _chunkPMHPXCJCcjs.transformedPoint; exports.translateSurface = _chunkJ5BA3BQ6cjs.translateSurface; exports.typeAsPixelLayer = _chunkPMHPXCJCcjs.typeAsPixelLayer; exports.typeFrame = _chunkPMHPXCJCcjs.typeFrame; exports.typeFromAnnotation = _chunkPMHPXCJCcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkPMHPXCJCcjs.typeLayerName; exports.ungroupLayer = _chunkPMHPXCJCcjs.ungroupLayer; exports.uniformTile = _chunkJ5BA3BQ6cjs.uniformTile; exports.unionRect = _chunkPMHPXCJCcjs.unionRect; exports.unprojectCanvasPoint = _chunkPMHPXCJCcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkPMHPXCJCcjs.updateLayerEffect; exports.updateLayerFilter = _chunkPMHPXCJCcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkPMHPXCJCcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunk6GFRKLLScjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkPMHPXCJCcjs.updateShapeLayer; exports.updateSmartFilter = _chunkPMHPXCJCcjs.updateSmartFilter; exports.updateTypeLayer = _chunkPMHPXCJCcjs.updateTypeLayer; exports.uvToXy = _chunkPMHPXCJCcjs.uvToXy; exports.validateEffectGradient = _chunkMZXQTKUMcjs.validateEffectGradient; exports.validateLayerEffect = _chunkMZXQTKUMcjs.validateLayerEffect; exports.validateLayerEffects = _chunkMZXQTKUMcjs.validateLayerEffects; exports.versionedDescriptorBytes = _chunkPMHPXCJCcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkPMHPXCJCcjs.vibranceLinear; exports.vibrancePixel = _chunkPMHPXCJCcjs.vibrancePixel; exports.walkDabs = _chunk6GFRKLLScjs.walkDabs; exports.warpMeshEditPoints = _chunkLXGOYRPEcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkLXGOYRPEcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkLXGOYRPEcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkLXGOYRPEcjs.warpPresetMesh; exports.warpSurface = _chunkMZXQTKUMcjs.warpSurface; exports.wbMatrix = _chunkPMHPXCJCcjs.wbMatrix; exports.wetGpuSupport = _chunkFHPVDTI2cjs.wetGpuSupport; exports.wetSimdSupported = _chunkFHPVDTI2cjs.wetSimdSupported; exports.wetSupport = _chunkFHPVDTI2cjs.wetSupport; exports.whiteBalanceFromSample = _chunkPMHPXCJCcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkPMHPXCJCcjs.whiteBalanceMatrix; exports.withFilterMaskSurface = _chunkPMHPXCJCcjs.withFilterMaskSurface; exports.withNewIds = _chunkPMHPXCJCcjs.withNewIds; exports.writeAdjustmentBlock = _chunkPMHPXCJCcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkJ5BA3BQ6cjs.writeDeepRegion; exports.writeLfx2 = _chunkPMHPXCJCcjs.writeLfx2; exports.writePatternBlock = _chunkPMHPXCJCcjs.writePatternBlock; exports.writePsd = _chunkPMHPXCJCcjs.writePsd; exports.writeRegion = _chunkJ5BA3BQ6cjs.writeRegion; exports.xyToTempTint = _chunkPMHPXCJCcjs.xyToTempTint; exports.xyToUv = _chunkPMHPXCJCcjs.xyToUv;
15706
15757
  //# sourceMappingURL=index.cjs.map