@pixerate/editor 0.135.0 → 0.136.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 (99) hide show
  1. package/dist/animation-editor/index.cjs +58 -55
  2. package/dist/animation-editor/index.cjs.map +1 -1
  3. package/dist/animation-editor/index.d.cts +8 -5
  4. package/dist/animation-editor/index.d.ts +8 -5
  5. package/dist/animation-editor/index.js +5 -2
  6. package/dist/animation-editor/index.js.map +1 -1
  7. package/dist/{bezier-J8i4uqSH.d.cts → bezier-CdccFsF8.d.cts} +1 -1
  8. package/dist/{bezier-lNEOp0Jx.d.ts → bezier-DG9qNZQV.d.ts} +1 -1
  9. package/dist/canvas/index.d.cts +10 -7
  10. package/dist/canvas/index.d.ts +10 -7
  11. package/dist/{chunk-Z2H7KECK.cjs → chunk-2R3UW57U.cjs} +13 -2
  12. package/dist/chunk-2R3UW57U.cjs.map +1 -0
  13. package/dist/{chunk-ESIWZMMK.js → chunk-6QQR4LKE.js} +2 -2
  14. package/dist/chunk-A3BVTI3G.js +150 -0
  15. package/dist/chunk-A3BVTI3G.js.map +1 -0
  16. package/dist/{chunk-T6TV6HY6.cjs → chunk-B2CUCM7Y.cjs} +36 -36
  17. package/dist/{chunk-T6TV6HY6.cjs.map → chunk-B2CUCM7Y.cjs.map} +1 -1
  18. package/dist/chunk-ECCXGELC.cjs +727 -0
  19. package/dist/chunk-ECCXGELC.cjs.map +1 -0
  20. package/dist/{chunk-OXSV64JX.js → chunk-G6IKY6PL.js} +4 -4
  21. package/dist/chunk-I52DRGGJ.js +727 -0
  22. package/dist/chunk-I52DRGGJ.js.map +1 -0
  23. package/dist/{chunk-YAFS2QFZ.cjs → chunk-JLGNZMUV.cjs} +82 -82
  24. package/dist/{chunk-YAFS2QFZ.cjs.map → chunk-JLGNZMUV.cjs.map} +1 -1
  25. package/dist/{chunk-7RJ6P7MI.js → chunk-KZXLZCQ7.js} +2 -2
  26. package/dist/{chunk-HHTCDFZC.js → chunk-MAHQC3SK.js} +13 -2
  27. package/dist/chunk-MAHQC3SK.js.map +1 -0
  28. package/dist/{chunk-FWEO3HSL.js → chunk-PQQF5KOW.js} +8 -8
  29. package/dist/chunk-Q6OUXEK3.cjs +150 -0
  30. package/dist/chunk-Q6OUXEK3.cjs.map +1 -0
  31. package/dist/{chunk-P3RQ5UJE.cjs → chunk-UTQKC66X.cjs} +4 -4
  32. package/dist/{chunk-P3RQ5UJE.cjs.map → chunk-UTQKC66X.cjs.map} +1 -1
  33. package/dist/{chunk-J3B45HTA.cjs → chunk-XB25WOC2.cjs} +6 -6
  34. package/dist/{chunk-J3B45HTA.cjs.map → chunk-XB25WOC2.cjs.map} +1 -1
  35. package/dist/effects/index.d.cts +7 -4
  36. package/dist/effects/index.d.ts +7 -4
  37. package/dist/{export-AZSwX087.d.cts → export-BOheWw2R.d.cts} +3 -3
  38. package/dist/{export-BDkyDNM8.d.ts → export-ByKKIA2S.d.ts} +3 -3
  39. package/dist/{export-KzubBKo7.d.cts → export-CEYeRQXH.d.cts} +1 -1
  40. package/dist/{export-DMeG6E06.d.ts → export-Ds7zgGD8.d.ts} +1 -1
  41. package/dist/extensions/index.cjs +3 -3
  42. package/dist/extensions/index.cjs.map +1 -1
  43. package/dist/extensions/index.js +2 -2
  44. package/dist/generation/index.cjs +150 -945
  45. package/dist/generation/index.cjs.map +1 -1
  46. package/dist/generation/index.d.cts +3 -423
  47. package/dist/generation/index.d.ts +3 -423
  48. package/dist/generation/index.js +59 -854
  49. package/dist/generation/index.js.map +1 -1
  50. package/dist/grammar/index.cjs +3 -3
  51. package/dist/grammar/index.cjs.map +1 -1
  52. package/dist/grammar/index.js +2 -2
  53. package/dist/{helpers-Coa4e2j_.d.ts → helpers--ns3W2D7.d.ts} +7 -1
  54. package/dist/{helpers-DHl28yLO.d.cts → helpers-BVkU4oUi.d.cts} +7 -1
  55. package/dist/image-editor/index.cjs +617 -614
  56. package/dist/image-editor/index.cjs.map +1 -1
  57. package/dist/image-editor/index.d.cts +11 -8
  58. package/dist/image-editor/index.d.ts +11 -8
  59. package/dist/image-editor/index.js +5 -2
  60. package/dist/image-editor/index.js.map +1 -1
  61. package/dist/index.cjs +28 -28
  62. package/dist/index.cjs.map +1 -1
  63. package/dist/index.js +36 -36
  64. package/dist/{opentype-Dfcx6wFx.d.ts → opentype-DfoVYgmG.d.ts} +1 -1
  65. package/dist/{opentype-BWR7Qv8W.d.cts → opentype-yi-Kz4ND.d.cts} +1 -1
  66. package/dist/paint-editor/index.cjs +10 -7
  67. package/dist/paint-editor/index.cjs.map +1 -1
  68. package/dist/paint-editor/index.d.cts +8 -5
  69. package/dist/paint-editor/index.d.ts +8 -5
  70. package/dist/paint-editor/index.js +5 -2
  71. package/dist/paint-editor/index.js.map +1 -1
  72. package/dist/{pathfinder-D8KQ6blQ.d.cts → pathfinder-7JkMwYvC.d.cts} +1 -1
  73. package/dist/{pathfinder-Celbi3e6.d.ts → pathfinder-GM3UWdBZ.d.ts} +1 -1
  74. package/dist/{pool-BfuxBKTd.d.cts → pool-04qp8iW4.d.cts} +1 -1
  75. package/dist/{pool-8JZGWHvR.d.ts → pool-CkTxlLMC.d.ts} +1 -1
  76. package/dist/provenance-DmlcgdzT.d.cts +426 -0
  77. package/dist/provenance-uh5r2TQ8.d.ts +426 -0
  78. package/dist/{svg-pwXWq6s2.d.cts → svg-BDDKvWWY.d.cts} +2 -2
  79. package/dist/{svg-CxxqG3_W.d.ts → svg-rV6_HPmn.d.ts} +2 -2
  80. package/dist/{tools-3EBjR91b.d.cts → tools-BAjSbTdY.d.cts} +1 -1
  81. package/dist/{tools-y1M6O3UT.d.ts → tools-DPYerqeR.d.ts} +1 -1
  82. package/dist/vector/index.cjs +2684 -1860
  83. package/dist/vector/index.cjs.map +1 -1
  84. package/dist/vector/index.d.cts +313 -71
  85. package/dist/vector/index.d.ts +313 -71
  86. package/dist/vector/index.js +4700 -3876
  87. package/dist/vector/index.js.map +1 -1
  88. package/dist/video-editor/index.d.cts +7 -4
  89. package/dist/video-editor/index.d.ts +7 -4
  90. package/dist/{warp-Ceqdz7kj.d.cts → warp-DQh9R7Ie.d.cts} +1 -1
  91. package/dist/{warp-C1gwu2G_.d.ts → warp-XVL6SpSh.d.ts} +1 -1
  92. package/package.json +1 -1
  93. package/skills/pixerate-vector/SKILL.md +14 -0
  94. package/dist/chunk-HHTCDFZC.js.map +0 -1
  95. package/dist/chunk-Z2H7KECK.cjs.map +0 -1
  96. /package/dist/{chunk-ESIWZMMK.js.map → chunk-6QQR4LKE.js.map} +0 -0
  97. /package/dist/{chunk-OXSV64JX.js.map → chunk-G6IKY6PL.js.map} +0 -0
  98. /package/dist/{chunk-7RJ6P7MI.js.map → chunk-KZXLZCQ7.js.map} +0 -0
  99. /package/dist/{chunk-FWEO3HSL.js.map → chunk-PQQF5KOW.js.map} +0 -0
@@ -363,7 +363,7 @@ var _chunk2OJACTPRcjs = require('../chunk-2OJACTPR.cjs');
363
363
 
364
364
 
365
365
 
366
- var _chunkYAFS2QFZcjs = require('../chunk-YAFS2QFZ.cjs');
366
+ var _chunkJLGNZMUVcjs = require('../chunk-JLGNZMUV.cjs');
367
367
 
368
368
 
369
369
  var _chunk2YQONY6Gcjs = require('../chunk-2YQONY6G.cjs');
@@ -810,7 +810,8 @@ var _chunk643B2HKCcjs = require('../chunk-643B2HKC.cjs');
810
810
 
811
811
 
812
812
 
813
- var _chunkZ2H7KECKcjs = require('../chunk-Z2H7KECK.cjs');
813
+ var _chunk2R3UW57Ucjs = require('../chunk-2R3UW57U.cjs');
814
+ require('../chunk-Q6OUXEK3.cjs');
814
815
  require('../chunk-BJTCSLF6.cjs');
815
816
  require('../chunk-IZ4WRXZA.cjs');
816
817
 
@@ -822,6 +823,8 @@ require('../chunk-IZ4WRXZA.cjs');
822
823
 
823
824
  var _chunkJODTP4DPcjs = require('../chunk-JODTP4DP.cjs');
824
825
  require('../chunk-RIWPYSKU.cjs');
826
+ require('../chunk-FD4LPFAE.cjs');
827
+ require('../chunk-MKA3AHLV.cjs');
825
828
  require('../chunk-MR3Z4OQI.cjs');
826
829
  require('../chunk-A6PHCAGX.cjs');
827
830
 
@@ -928,7 +931,7 @@ function quickMaskPixels(mask, style = {}) {
928
931
 
929
932
  // src/image-editor/layers/render.ts
930
933
  function isQuarterTurn(rotate) {
931
- return _chunkYAFS2QFZcjs.normalizeAngle.call(void 0, rotate) % 90 === 0;
934
+ return _chunkJLGNZMUVcjs.normalizeAngle.call(void 0, rotate) % 90 === 0;
932
935
  }
933
936
  function isIntegerRect(r) {
934
937
  return Number.isInteger(r.x) && Number.isInteger(r.y) && Number.isInteger(r.width) && Number.isInteger(r.height);
@@ -936,7 +939,7 @@ function isIntegerRect(r) {
936
939
  function baseProjection(region, transform, baseW, baseH) {
937
940
  return {
938
941
  region,
939
- angle: _chunkYAFS2QFZcjs.normalizeAngle.call(void 0, transform.rotate),
942
+ angle: _chunkJLGNZMUVcjs.normalizeAngle.call(void 0, transform.rotate),
940
943
  flipH: transform.flipH,
941
944
  flipV: transform.flipV,
942
945
  scale: 1,
@@ -945,14 +948,14 @@ function baseProjection(region, transform, baseW, baseH) {
945
948
  };
946
949
  }
947
950
  function projectQuarterTurn(src, srcRect, region, transform) {
948
- const rotated = _chunkYAFS2QFZcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
951
+ const rotated = _chunkJLGNZMUVcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
949
952
  const w = Math.max(1, Math.round(rotated.width));
950
953
  const h = Math.max(1, Math.round(rotated.height));
951
954
  const out = new Uint8ClampedArray(w * h * 4);
952
955
  const p = baseProjection(region, transform, w, h);
953
- const o = _chunkYAFS2QFZcjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 0.5 }, p);
954
- const ox = _chunkYAFS2QFZcjs.unprojectCanvasPoint.call(void 0, { x: 1.5, y: 0.5 }, p);
955
- const oy = _chunkYAFS2QFZcjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 1.5 }, p);
956
+ const o = _chunkJLGNZMUVcjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 0.5 }, p);
957
+ const ox = _chunkJLGNZMUVcjs.unprojectCanvasPoint.call(void 0, { x: 1.5, y: 0.5 }, p);
958
+ const oy = _chunkJLGNZMUVcjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 1.5 }, p);
956
959
  const ux = Math.round(ox.x - o.x);
957
960
  const vx = Math.round(ox.y - o.y);
958
961
  const uy = Math.round(oy.x - o.x);
@@ -981,23 +984,23 @@ function applyOutputStage(img, opacity, legacyOutputBlur) {
981
984
  const d = img.data;
982
985
  for (let i = 3; i < d.length; i += 4) d[i] = d[i] * opacity;
983
986
  }
984
- if (legacyOutputBlur && legacyOutputBlur > 0) _chunkYAFS2QFZcjs.applyBoxBlur.call(void 0, img, Math.min(Math.round(legacyOutputBlur), 40));
987
+ if (legacyOutputBlur && legacyOutputBlur > 0) _chunkJLGNZMUVcjs.applyBoxBlur.call(void 0, img, Math.min(Math.round(legacyOutputBlur), 40));
985
988
  }
986
989
  function needsLegacyBase(input) {
987
990
  const { stack, region, canvas, transform } = input;
988
- if (!_chunkYAFS2QFZcjs.isLegacyShape.call(void 0, stack)) return false;
991
+ if (!_chunkJLGNZMUVcjs.isLegacyShape.call(void 0, stack)) return false;
989
992
  const bg = stack.layers[0];
990
993
  if (!isQuarterTurn(transform.rotate) || !isIntegerRect(region)) return true;
991
994
  if (_optionalChain([bg, 'access', _2 => _2.mask, 'optionalAccess', _3 => _3.source, 'optionalAccess', _4 => _4.enabled]) && bg.mask.source.maskSource) return true;
992
995
  if (stack.outputOpacity < 1) return true;
993
- const blur = _chunkYAFS2QFZcjs.blurFilter.call(void 0, bg);
996
+ const blur = _chunkJLGNZMUVcjs.blurFilter.call(void 0, bg);
994
997
  if (blur && blur.enabled && blur.radius > 0) {
995
998
  const full = region.x === 0 && region.y === 0 && region.width === canvas.width && region.height === canvas.height;
996
- const angle = _chunkYAFS2QFZcjs.normalizeAngle.call(void 0, transform.rotate);
999
+ const angle = _chunkJLGNZMUVcjs.normalizeAngle.call(void 0, transform.rotate);
997
1000
  if (!full || angle === 90 || angle === 270) return true;
998
1001
  }
999
1002
  if ((_nullishCoalesce(stack.legacyOutputBlur, () => ( 0))) > 0 && !input.sourceOpaque) return true;
1000
- if (_chunkYAFS2QFZcjs.hasResampledLegacyMask.call(void 0, stack.layers, canvas.width, canvas.height)) return true;
1003
+ if (_chunkJLGNZMUVcjs.hasResampledLegacyMask.call(void 0, stack.layers, canvas.width, canvas.height)) return true;
1001
1004
  return false;
1002
1005
  }
1003
1006
  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;
@@ -1029,7 +1032,7 @@ function coveringRect(region) {
1029
1032
  const y = Math.floor(region.y);
1030
1033
  return { x, y, width: Math.ceil(region.x + region.width) - x, height: Math.ceil(region.y + region.height) - y };
1031
1034
  }
1032
- function renderLayeredBase(stack, region, transform, sources, compositor = new (0, _chunkYAFS2QFZcjs.LayerCompositor)()) {
1035
+ function renderLayeredBase(stack, region, transform, sources, compositor = new (0, _chunkJLGNZMUVcjs.LayerCompositor)()) {
1033
1036
  if (!isQuarterTurn(transform.rotate) || !isIntegerRect(region)) {
1034
1037
  throw new Error("renderLayeredBase needs an integer region and a quarter-turn rotation.");
1035
1038
  }
@@ -1163,8 +1166,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1163
1166
  * The viewport's compositor. It only ever composites the viewport's stack, so its tile cache can
1164
1167
  * trust dirty rectangles; exports use `exportCompositor`.
1165
1168
  */
1166
- __init8() {this.compositor = new (0, _chunkYAFS2QFZcjs.LayerCompositor)()}
1167
- __init9() {this.exportCompositor = new (0, _chunkYAFS2QFZcjs.LayerCompositor)({ maxCacheBytes: 64 * 1024 * 1024 })}
1169
+ __init8() {this.compositor = new (0, _chunkJLGNZMUVcjs.LayerCompositor)()}
1170
+ __init9() {this.exportCompositor = new (0, _chunkJLGNZMUVcjs.LayerCompositor)({ maxCacheBytes: 64 * 1024 * 1024 })}
1168
1171
  /** How the host resolves layer pixels (set by the controller). */
1169
1172
 
1170
1173
  /**
@@ -1241,9 +1244,9 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1241
1244
  return;
1242
1245
  }
1243
1246
  const isActivelyCropping = Boolean(options.showCropOverlay || state.activeTool === "crop");
1244
- const projection = _chunkYAFS2QFZcjs.getViewportProjection.call(void 0, geoState, vpWidth, vpHeight, isActivelyCropping);
1247
+ const projection = _chunkJLGNZMUVcjs.getViewportProjection.call(void 0, geoState, vpWidth, vpHeight, isActivelyCropping);
1245
1248
  const { region } = projection;
1246
- const rotated = _chunkYAFS2QFZcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1249
+ const rotated = _chunkJLGNZMUVcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1247
1250
  const route = this.chooseRoute(state, region, naturalWidth, naturalHeight);
1248
1251
  let overlay = annotations;
1249
1252
  if (route === "legacy") {
@@ -1253,8 +1256,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1253
1256
  `${naturalWidth}x${naturalHeight}`,
1254
1257
  `${region.x},${region.y},${region.width},${region.height}`,
1255
1258
  `${projection.angle},${transform.flipH},${transform.flipV}`,
1256
- `${adjustments.brightness},${adjustments.contrast},${adjustments.saturation},${adjustments.exposure},${adjustments.temperature},${_nullishCoalesce(adjustments.tint, () => ( 0))},${adjustments.blur},${adjustments.opacity},p${_chunkYAFS2QFZcjs.normalizeProcessVersion.call(void 0, adjustments.process)}`,
1257
- _chunkYAFS2QFZcjs.adjustmentLayersKey.call(void 0, adjustments.layers),
1259
+ `${adjustments.brightness},${adjustments.contrast},${adjustments.saturation},${adjustments.exposure},${adjustments.temperature},${_nullishCoalesce(adjustments.tint, () => ( 0))},${adjustments.blur},${adjustments.opacity},p${_chunkJLGNZMUVcjs.normalizeProcessVersion.call(void 0, adjustments.process)}`,
1260
+ _chunkJLGNZMUVcjs.adjustmentLayersKey.call(void 0, adjustments.layers),
1258
1261
  `${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}`,
1259
1262
  `d${this.displayKey}`
1260
1263
  ].join("|");
@@ -1288,7 +1291,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1288
1291
  }
1289
1292
  if (overlay.length > 0 || options.draftAnnotation) {
1290
1293
  ctx.save();
1291
- _chunkYAFS2QFZcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1294
+ _chunkJLGNZMUVcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1292
1295
  ctx.beginPath();
1293
1296
  ctx.rect(region.x, region.y, region.width, region.height);
1294
1297
  ctx.clip();
@@ -1311,7 +1314,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1311
1314
  if (_optionalChain([state, 'access', _15 => _15.selection, 'optionalAccess', _16 => _16.bounds]) && display !== "none" || _optionalChain([options, 'access', _17 => _17.draftSelectionPath, 'optionalAccess', _18 => _18.length])) {
1312
1315
  ctx.save();
1313
1316
  try {
1314
- _chunkYAFS2QFZcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1317
+ _chunkJLGNZMUVcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1315
1318
  ctx.beginPath();
1316
1319
  ctx.rect(region.x, region.y, region.width, region.height);
1317
1320
  ctx.clip();
@@ -1326,7 +1329,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1326
1329
  const b = options.brushCursor;
1327
1330
  ctx.save();
1328
1331
  try {
1329
- _chunkYAFS2QFZcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1332
+ _chunkJLGNZMUVcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1330
1333
  const px2 = 1 / (projection.scale || 1);
1331
1334
  ctx.beginPath();
1332
1335
  ctx.arc(b.x, b.y, Math.max(px2, b.diameter / 2), 0, Math.PI * 2);
@@ -1341,7 +1344,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1341
1344
  ctx.restore();
1342
1345
  }
1343
1346
  if (options.cloneSourceMarker) {
1344
- const m = _chunkYAFS2QFZcjs.projectImagePoint.call(void 0, options.cloneSourceMarker, projection);
1347
+ const m = _chunkJLGNZMUVcjs.projectImagePoint.call(void 0, options.cloneSourceMarker, projection);
1345
1348
  ctx.save();
1346
1349
  try {
1347
1350
  const r = 7;
@@ -1365,7 +1368,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1365
1368
  const t = options.textEdit;
1366
1369
  ctx.save();
1367
1370
  try {
1368
- const scr = (p) => _chunkYAFS2QFZcjs.projectImagePoint.call(void 0, p, projection);
1371
+ const scr = (p) => _chunkJLGNZMUVcjs.projectImagePoint.call(void 0, p, projection);
1369
1372
  const poly = (pts) => {
1370
1373
  ctx.beginPath();
1371
1374
  pts.map(scr).forEach((p, i) => i ? ctx.lineTo(p.x, p.y) : ctx.moveTo(p.x, p.y));
@@ -1404,7 +1407,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1404
1407
  const t = options.freeTransform;
1405
1408
  ctx.save();
1406
1409
  try {
1407
- const scr = (p) => _chunkYAFS2QFZcjs.projectImagePoint.call(void 0, p, projection);
1410
+ const scr = (p) => _chunkJLGNZMUVcjs.projectImagePoint.call(void 0, p, projection);
1408
1411
  ctx.beginPath();
1409
1412
  if (t.warp) {
1410
1413
  for (const c of t.warp.curves) {
@@ -1462,7 +1465,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1462
1465
  }
1463
1466
  if (isActivelyCropping) {
1464
1467
  const activeCrop = options.draftCrop !== void 0 && options.draftCrop !== null ? options.draftCrop : _nullishCoalesce(crop, () => ( { x: 0, y: 0, width: naturalWidth, height: naturalHeight }));
1465
- this.drawCropOverlay(ctx, _chunkYAFS2QFZcjs.getViewportMetrics.call(void 0, geoState, vpWidth, vpHeight, true, activeCrop));
1468
+ this.drawCropOverlay(ctx, _chunkJLGNZMUVcjs.getViewportMetrics.call(void 0, geoState, vpWidth, vpHeight, true, activeCrop));
1466
1469
  }
1467
1470
  }
1468
1471
  /**
@@ -1471,7 +1474,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1471
1474
  */
1472
1475
  async renderBaseImage(img, naturalWidth, naturalHeight, region, transform, state, onPixels) {
1473
1476
  const { adjustments, depthMask } = state;
1474
- const rotated = _chunkYAFS2QFZcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1477
+ const rotated = _chunkJLGNZMUVcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1475
1478
  const baseW = Math.max(1, Math.round(rotated.width));
1476
1479
  const baseH = Math.max(1, Math.round(rotated.height));
1477
1480
  const baseCanvas = this.createCanvas(baseW, baseH);
@@ -1479,7 +1482,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1479
1482
  if (!baseCtx) return baseCanvas;
1480
1483
  const projection = getBaseProjection(region, transform, baseW, baseH);
1481
1484
  baseCtx.save();
1482
- _chunkYAFS2QFZcjs.applyImageProjectionToContext.call(void 0, baseCtx, projection);
1485
+ _chunkJLGNZMUVcjs.applyImageProjectionToContext.call(void 0, baseCtx, projection);
1483
1486
  baseCtx.drawImage(
1484
1487
  img,
1485
1488
  region.x,
@@ -1494,8 +1497,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1494
1497
  baseCtx.restore();
1495
1498
  const imageData = baseCtx.getImageData(0, 0, baseW, baseH);
1496
1499
  if (imageData) {
1497
- const layerMasks = _chunkYAFS2QFZcjs.buildLayerMaskPlanes.call(void 0, adjustments.layers, naturalWidth, naturalHeight, projection, baseW, baseH);
1498
- _chunkYAFS2QFZcjs.applyAdjustments.call(void 0, imageData, adjustments, layerMasks ? { layerMasks } : {});
1500
+ const layerMasks = _chunkJLGNZMUVcjs.buildLayerMaskPlanes.call(void 0, adjustments.layers, naturalWidth, naturalHeight, projection, baseW, baseH);
1501
+ _chunkJLGNZMUVcjs.applyAdjustments.call(void 0, imageData, adjustments, layerMasks ? { layerMasks } : {});
1499
1502
  if (depthMask.enabled && depthMask.maskSource) {
1500
1503
  try {
1501
1504
  const maskImg = await this.imageCache.get(depthMask.maskSource);
@@ -1506,7 +1509,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1506
1509
  const maskCtx = maskCanvas.getContext("2d");
1507
1510
  if (maskCtx) {
1508
1511
  maskCtx.save();
1509
- _chunkYAFS2QFZcjs.applyImageProjectionToContext.call(void 0, maskCtx, projection);
1512
+ _chunkJLGNZMUVcjs.applyImageProjectionToContext.call(void 0, maskCtx, projection);
1510
1513
  maskCtx.drawImage(
1511
1514
  maskImg,
1512
1515
  region.x * sx,
@@ -1521,7 +1524,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1521
1524
  maskCtx.restore();
1522
1525
  const maskData = maskCtx.getImageData(0, 0, baseW, baseH);
1523
1526
  if (maskData) {
1524
- _chunkYAFS2QFZcjs.applyDepthMask.call(void 0, imageData, maskData, depthMask);
1527
+ _chunkJLGNZMUVcjs.applyDepthMask.call(void 0, imageData, maskData, depthMask);
1525
1528
  }
1526
1529
  }
1527
1530
  } catch (e8) {
@@ -1540,7 +1543,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1540
1543
  else if (this.baseRoute === "layers") route = "layers";
1541
1544
  else {
1542
1545
  const stack = { layers: state.layers, outputOpacity: _nullishCoalesce(state.outputOpacity, () => ( 1)), legacyOutputBlur: state.legacyOutputBlur };
1543
- const shaped = this.baseRoute === "legacy" && _chunkYAFS2QFZcjs.isLegacyShape.call(void 0, stack);
1546
+ const shaped = this.baseRoute === "legacy" && _chunkJLGNZMUVcjs.isLegacyShape.call(void 0, stack);
1544
1547
  route = shaped || needsLegacyBase({
1545
1548
  stack,
1546
1549
  region,
@@ -1675,17 +1678,17 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1675
1678
  if (!comp) return null;
1676
1679
  const opacity = _nullishCoalesce(state.outputOpacity, () => ( 1));
1677
1680
  const blur = _nullishCoalesce(state.legacyOutputBlur, () => ( 0));
1678
- const rotated = _chunkYAFS2QFZcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1681
+ const rotated = _chunkJLGNZMUVcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1679
1682
  const baseW = Math.max(1, Math.round(rotated.width));
1680
1683
  const baseH = Math.max(1, Math.round(rotated.height));
1681
- const key = `${this.displayKey}:${comp.version}|${region.x},${region.y},${region.width},${region.height}|${_chunkYAFS2QFZcjs.normalizeAngle.call(void 0, transform.rotate)},${transform.flipH},${transform.flipV}|${opacity}|${blur}`;
1684
+ const key = `${this.displayKey}:${comp.version}|${region.x},${region.y},${region.width},${region.height}|${_chunkJLGNZMUVcjs.normalizeAngle.call(void 0, transform.rotate)},${transform.flipH},${transform.flipV}|${opacity}|${blur}`;
1682
1685
  if (this.cachedPostCanvas && this.cachedPostKey === key) return { canvas: this.cachedPostCanvas, histogram: this.cachedPostHistogram };
1683
1686
  const canvas = this.cachedPostCanvas && this.cachedPostCanvas.width === baseW && this.cachedPostCanvas.height === baseH ? this.cachedPostCanvas : this.createCanvas(baseW, baseH);
1684
1687
  const ctx = canvas.getContext("2d");
1685
1688
  if (!ctx) return null;
1686
1689
  ctx.clearRect(0, 0, baseW, baseH);
1687
1690
  ctx.save();
1688
- _chunkYAFS2QFZcjs.applyImageProjectionToContext.call(void 0, ctx, baseProjection(region, transform, baseW, baseH));
1691
+ _chunkJLGNZMUVcjs.applyImageProjectionToContext.call(void 0, ctx, baseProjection(region, transform, baseW, baseH));
1689
1692
  ctx.beginPath();
1690
1693
  ctx.rect(region.x, region.y, region.width, region.height);
1691
1694
  ctx.clip();
@@ -1957,7 +1960,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1957
1960
  ctx.strokeStyle = "#3b82f6";
1958
1961
  ctx.lineWidth = 1.5;
1959
1962
  ctx.setLineDash([4, 4]);
1960
- const bounds = _chunkYAFS2QFZcjs.getAnnotationBounds.call(void 0, ann);
1963
+ const bounds = _chunkJLGNZMUVcjs.getAnnotationBounds.call(void 0, ann);
1961
1964
  const pad = 4;
1962
1965
  ctx.strokeRect(bounds.x - pad, bounds.y - pad, bounds.width + pad * 2, bounds.height + pad * 2);
1963
1966
  ctx.fillStyle = "#ffffff";
@@ -1978,7 +1981,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1978
1981
  }
1979
1982
  /** @deprecated Use the standalone `getAnnotationBounds` from the geometry module. */
1980
1983
  getAnnotationBounds(ann) {
1981
- return _chunkYAFS2QFZcjs.getAnnotationBounds.call(void 0, ann);
1984
+ return _chunkJLGNZMUVcjs.getAnnotationBounds.call(void 0, ann);
1982
1985
  }
1983
1986
  /**
1984
1987
  * Draws a rule-of-thirds crop grid overlay. All rectangles come from
@@ -2060,8 +2063,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2060
2063
  }
2061
2064
  const { width: naturalWidth, height: naturalHeight } = getSourceSize(img);
2062
2065
  const { crop, transform, annotations } = state;
2063
- const region = crop ? _chunkYAFS2QFZcjs.clampCropToImage.call(void 0, crop, naturalWidth, naturalHeight) : { x: 0, y: 0, width: naturalWidth, height: naturalHeight };
2064
- const rotated = _chunkYAFS2QFZcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
2066
+ const region = crop ? _chunkJLGNZMUVcjs.clampCropToImage.call(void 0, crop, naturalWidth, naturalHeight) : { x: 0, y: 0, width: naturalWidth, height: naturalHeight };
2067
+ const rotated = _chunkJLGNZMUVcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
2065
2068
  const baseW = Math.max(1, Math.round(rotated.width));
2066
2069
  const baseH = Math.max(1, Math.round(rotated.height));
2067
2070
  const exportW = options.width || baseW;
@@ -2090,7 +2093,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2090
2093
  const bctx = baseCanvas.getContext("2d");
2091
2094
  if (bctx) {
2092
2095
  bctx.save();
2093
- _chunkYAFS2QFZcjs.applyImageProjectionToContext.call(void 0, bctx, baseProjection(region, transform, baseW, baseH));
2096
+ _chunkJLGNZMUVcjs.applyImageProjectionToContext.call(void 0, bctx, baseProjection(region, transform, baseW, baseH));
2094
2097
  bctx.beginPath();
2095
2098
  bctx.rect(region.x, region.y, region.width, region.height);
2096
2099
  bctx.clip();
@@ -2103,7 +2106,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2103
2106
  if (options.includeAnnotations !== false && overlay.length > 0) {
2104
2107
  ctx.save();
2105
2108
  ctx.scale(exportW / baseW, exportH / baseH);
2106
- _chunkYAFS2QFZcjs.applyImageProjectionToContext.call(void 0, ctx, getBaseProjection(region, transform, baseW, baseH));
2109
+ _chunkJLGNZMUVcjs.applyImageProjectionToContext.call(void 0, ctx, getBaseProjection(region, transform, baseW, baseH));
2107
2110
  for (const ann of overlay) {
2108
2111
  await this.drawAnnotation(ctx, ann);
2109
2112
  }
@@ -2193,7 +2196,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2193
2196
  case "rect":
2194
2197
  case "image":
2195
2198
  case "text": {
2196
- const b = _chunkYAFS2QFZcjs.getAnnotationBounds.call(void 0, ann);
2199
+ const b = _chunkJLGNZMUVcjs.getAnnotationBounds.call(void 0, ann);
2197
2200
  ctx.fillRect(b.x, b.y, b.width, b.height);
2198
2201
  break;
2199
2202
  }
@@ -2213,7 +2216,7 @@ function getSourceSize(img, fallbackW = 800, fallbackH = 600) {
2213
2216
  function getBaseProjection(region, transform, baseW, baseH) {
2214
2217
  return {
2215
2218
  region,
2216
- angle: _chunkYAFS2QFZcjs.normalizeAngle.call(void 0, transform.rotate),
2219
+ angle: _chunkJLGNZMUVcjs.normalizeAngle.call(void 0, transform.rotate),
2217
2220
  flipH: transform.flipH,
2218
2221
  flipV: transform.flipV,
2219
2222
  scale: 1,
@@ -2317,8 +2320,8 @@ function polygonCoverage(points, width, height, antiAlias = true) {
2317
2320
  }
2318
2321
  function toMask(width, height, coverage) {
2319
2322
  const out = new Uint8Array(coverage.length);
2320
- for (let i = 0; i < out.length; i++) out[i] = _chunkYAFS2QFZcjs.coverageToByte.call(void 0, coverage[i]);
2321
- return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, width, height, out);
2323
+ for (let i = 0; i < out.length; i++) out[i] = _chunkJLGNZMUVcjs.coverageToByte.call(void 0, coverage[i]);
2324
+ return _chunkJLGNZMUVcjs.createSelectionMask.call(void 0, width, height, out);
2322
2325
  }
2323
2326
  function polygonSelection(width, height, points, options = {}) {
2324
2327
  return toMask(width, height, polygonCoverage(points, width, height, _nullishCoalesce(options.antiAlias, () => ( true))));
@@ -2445,7 +2448,7 @@ function magicWand(pixels, seed, options = {}) {
2445
2448
  const { width: w, height: h } = pixels;
2446
2449
  const sx = Math.floor(seed.x);
2447
2450
  const sy = Math.floor(seed.y);
2448
- if (!(sx >= 0 && sy >= 0 && sx < w && sy < h)) return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, w, h);
2451
+ if (!(sx >= 0 && sy >= 0 && sx < w && sy < h)) return _chunkJLGNZMUVcjs.createSelectionMask.call(void 0, w, h);
2449
2452
  const similar = similarity(pixels, sy * w + sx, _nullishCoalesce(options.tolerance, () => ( 32)), _nullishCoalesce(options.distance, () => ( "rgb")));
2450
2453
  const marks = new Uint8Array(n);
2451
2454
  let bx0 = w;
@@ -2493,9 +2496,9 @@ function magicWand(pixels, seed, options = {}) {
2493
2496
  }
2494
2497
  }
2495
2498
  }
2496
- if (bx1 < 0) return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, w, h);
2497
- if (!(_nullishCoalesce(options.antiAlias, () => ( true)))) return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, w, h, marks);
2498
- return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0,
2499
+ if (bx1 < 0) return _chunkJLGNZMUVcjs.createSelectionMask.call(void 0, w, h);
2500
+ if (!(_nullishCoalesce(options.antiAlias, () => ( true)))) return _chunkJLGNZMUVcjs.createSelectionMask.call(void 0, w, h, marks);
2501
+ return _chunkJLGNZMUVcjs.createSelectionMask.call(void 0,
2499
2502
  w,
2500
2503
  h,
2501
2504
  antialiasMarks(marks, w, h, Math.max(0, bx0 - 1), Math.max(0, by0 - 1), Math.min(w, bx1 + 2), Math.min(h, by1 + 2))
@@ -2517,7 +2520,7 @@ function colorRange(pixels, samples, options = {}) {
2517
2520
  const parsed = samples.map((s) => ({ c: sampleColor(s.color), at: s.at }));
2518
2521
  const radius = options.localized !== void 0 ? Math.max(1, options.localized) : void 0;
2519
2522
  const out = new Uint8Array(n);
2520
- if (!parsed.length) return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, w, h, out);
2523
+ if (!parsed.length) return _chunkJLGNZMUVcjs.createSelectionMask.call(void 0, w, h, out);
2521
2524
  for (let i = 0; i < n; i++) {
2522
2525
  const p = i * 4;
2523
2526
  if (data[p + 3] <= 0) continue;
@@ -2533,9 +2536,9 @@ function colorRange(pixels, samples, options = {}) {
2533
2536
  }
2534
2537
  if (k > best) best = k;
2535
2538
  }
2536
- out[i] = _chunkYAFS2QFZcjs.coverageToByte.call(void 0, best);
2539
+ out[i] = _chunkJLGNZMUVcjs.coverageToByte.call(void 0, best);
2537
2540
  }
2538
- return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, w, h, out);
2541
+ return _chunkJLGNZMUVcjs.createSelectionMask.call(void 0, w, h, out);
2539
2542
  }
2540
2543
  var TONE_RANGE_PRESETS = {
2541
2544
  shadows: [0, 65],
@@ -2553,9 +2556,9 @@ function toneRange(pixels, range, falloff = 20) {
2553
2556
  if (d[p + 3] <= 0) continue;
2554
2557
  const l = Math.min(255, Math.max(0, 0.299 * d[p] + 0.587 * d[p + 1] + 0.114 * d[p + 2]));
2555
2558
  const outside = l < lo ? lo - l : l > hi ? l - hi : 0;
2556
- out[i] = _chunkYAFS2QFZcjs.coverageToByte.call(void 0, 1 - outside / ramp);
2559
+ out[i] = _chunkJLGNZMUVcjs.coverageToByte.call(void 0, 1 - outside / ramp);
2557
2560
  }
2558
- return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
2561
+ return _chunkJLGNZMUVcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
2559
2562
  }
2560
2563
  function hueRange(pixels, center) {
2561
2564
  const n = checkPixels(pixels);
@@ -2578,9 +2581,9 @@ function hueRange(pixels, center) {
2578
2581
  hue *= 60;
2579
2582
  let dh = ((hue - center) % 360 + 360) % 360;
2580
2583
  dh = Math.min(dh, 360 - dh);
2581
- out[i] = _chunkYAFS2QFZcjs.coverageToByte.call(void 0, Math.min(1, Math.max(0, 1 - dh / 60)) * chroma * (2 - mx));
2584
+ out[i] = _chunkJLGNZMUVcjs.coverageToByte.call(void 0, Math.min(1, Math.max(0, 1 - dh / 60)) * chroma * (2 - mx));
2582
2585
  }
2583
- return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
2586
+ return _chunkJLGNZMUVcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
2584
2587
  }
2585
2588
 
2586
2589
  // src/image-editor/selection/refine.ts
@@ -2714,9 +2717,9 @@ function edgeWidth(guide, w, h, r) {
2714
2717
  g[yy * w + xx] = Math.sqrt(gx * gx + gy * gy);
2715
2718
  }
2716
2719
  }
2717
- const gm = _chunkYAFS2QFZcjs.greyMorphology.call(void 0, g, w, h, r, true);
2718
- const hi = _chunkYAFS2QFZcjs.greyMorphology.call(void 0, y, w, h, r, true);
2719
- const lo = _chunkYAFS2QFZcjs.greyMorphology.call(void 0, y, w, h, r, false);
2720
+ const gm = _chunkJLGNZMUVcjs.greyMorphology.call(void 0, g, w, h, r, true);
2721
+ const hi = _chunkJLGNZMUVcjs.greyMorphology.call(void 0, y, w, h, r, true);
2722
+ const lo = _chunkJLGNZMUVcjs.greyMorphology.call(void 0, y, w, h, r, false);
2720
2723
  const out = new Float32Array(n);
2721
2724
  for (let i = 0; i < n; i++) out[i] = (hi[i] - lo[i]) / Math.max(gm[i], 1e-4);
2722
2725
  return out;
@@ -2740,7 +2743,7 @@ function refineCoverage(guide, m, w, h, params = {}) {
2740
2743
  }
2741
2744
  }
2742
2745
  if (any) {
2743
- const dist = _chunkYAFS2QFZcjs.distanceTransform.call(void 0, boundary, w, h);
2746
+ const dist = _chunkJLGNZMUVcjs.distanceTransform.call(void 0, boundary, w, h);
2744
2747
  const r = gfRadius(p);
2745
2748
  const q = guidedFilterColor(guide, m, w, h, r);
2746
2749
  const widths = p.smartRadius ? edgeWidth(guide, w, h, r) : null;
@@ -2766,7 +2769,7 @@ function refineCoverage(guide, m, w, h, params = {}) {
2766
2769
  for (let i = 0; i < a.length; i++) a[i] = Math.min(1, Math.max(0, (a[i] - 0.5) * gain + 0.5));
2767
2770
  }
2768
2771
  const amount = shiftAmount(p);
2769
- if (Math.abs(amount) >= 1e-4) a = _chunkYAFS2QFZcjs.shiftCoverage.call(void 0, a, w, h, amount);
2772
+ if (Math.abs(amount) >= 1e-4) a = _chunkJLGNZMUVcjs.shiftCoverage.call(void 0, a, w, h, amount);
2770
2773
  return a;
2771
2774
  }
2772
2775
  function guidePlanes(pixels, win) {
@@ -2810,9 +2813,9 @@ function refineSelection(pixels, mask, params = {}) {
2810
2813
  const out = new Uint8Array(mask.width * mask.height);
2811
2814
  for (let y = 0; y < wh; y++) {
2812
2815
  const dst = (y0 + y) * mask.width + x0;
2813
- for (let x = 0; x < ww; x++) out[dst + x] = _chunkYAFS2QFZcjs.coverageToByte.call(void 0, refined[y * ww + x]);
2816
+ for (let x = 0; x < ww; x++) out[dst + x] = _chunkJLGNZMUVcjs.coverageToByte.call(void 0, refined[y * ww + x]);
2814
2817
  }
2815
- return _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, mask.width, mask.height, out);
2818
+ return _chunkJLGNZMUVcjs.createSelectionMask.call(void 0, mask.width, mask.height, out);
2816
2819
  }
2817
2820
 
2818
2821
  // src/image-editor/effects.ts
@@ -2982,7 +2985,7 @@ var ImageEffectsEngine = (_class4 = class {
2982
2985
  // src/image-editor/free-transform.ts
2983
2986
  var FREE_TRANSFORM_CONTENTS = ["auto", "layer", "selection", "selection-copy", "selection-outline"];
2984
2987
  var fail = (message) => {
2985
- throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(message);
2988
+ throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(message);
2986
2989
  };
2987
2990
  var T = (x, y) => [1, 0, x, 0, 1, y, 0, 0, 1];
2988
2991
  function previewStep(scale) {
@@ -3091,7 +3094,7 @@ var FreeTransformSession = (_class5 = class {
3091
3094
  } else {
3092
3095
  const id = _nullishCoalesce(init.layerId, () => ( host.activeLayerId()));
3093
3096
  if (!id) fail("No layer given and none is active; pass layerId (see list_layers).");
3094
- const layer = _chunkYAFS2QFZcjs.requireLayer.call(void 0, layers, id).layer;
3097
+ const layer = _chunkJLGNZMUVcjs.requireLayer.call(void 0, layers, id).layer;
3095
3098
  this.layerId = layer.id;
3096
3099
  const mask = layer.mask && !layer.mask.source ? layer.mask : void 0;
3097
3100
  const channel = _nullishCoalesce(init.channel, () => ( (layer.id === host.activeLayerId() ? host.activeTarget() : "pixels")));
@@ -3102,20 +3105,20 @@ var FreeTransformSession = (_class5 = class {
3102
3105
  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.`);
3103
3106
  if (!layer.visible && content !== "selection-copy") fail(`Layer "${layer.name || id}" is hidden; show it before you transform it.`);
3104
3107
  if (content !== "selection-copy") {
3105
- _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "position", "transform it");
3106
- if (!maskAlone) _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "pixels", "transform it");
3108
+ _chunkJLGNZMUVcjs.requireUnlocked.call(void 0, layer, "position", "transform it");
3109
+ if (!maskAlone) _chunkJLGNZMUVcjs.requireUnlocked.call(void 0, layer, "pixels", "transform it");
3107
3110
  }
3108
3111
  const o = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
3109
3112
  const pixels = layer.type === "pixel" ? host.pixelsOf(layer) : null;
3110
3113
  if (layer.type === "smart" && !maskAlone) {
3111
3114
  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).`);
3112
- if (!_chunkYAFS2QFZcjs.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.`);
3115
+ if (!_chunkJLGNZMUVcjs.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.`);
3113
3116
  this.smart = layer;
3114
3117
  this.smartObject = true;
3115
- this.startGeometry = _chunkYAFS2QFZcjs.placementGeometry.call(void 0, layer);
3118
+ this.startGeometry = _chunkJLGNZMUVcjs.placementGeometry.call(void 0, layer);
3116
3119
  if (init.interpolation === void 0 && layer.placement.interpolation) this.interp = layer.placement.interpolation;
3117
3120
  this.startInterp = this.interp;
3118
- this.box = _chunkYAFS2QFZcjs.contentsBox.call(void 0, layer.contents);
3121
+ this.box = _chunkJLGNZMUVcjs.contentsBox.call(void 0, layer.contents);
3119
3122
  this.moves = mask && linked ? ["pixels", "mask"] : ["pixels"];
3120
3123
  this.geometryValue = this.startGeometry;
3121
3124
  this.shown = this.startLayers;
@@ -3123,8 +3126,8 @@ var FreeTransformSession = (_class5 = class {
3123
3126
  }
3124
3127
  if (layer.type === "type" && !maskAlone) {
3125
3128
  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).`);
3126
- const frame = _chunkYAFS2QFZcjs.typeFrame.call(void 0, layer, host.textEnv().shaper);
3127
- const m = _chunkYAFS2QFZcjs.textMatrix.call(void 0, layer);
3129
+ const frame = _chunkJLGNZMUVcjs.typeFrame.call(void 0, layer, host.textEnv().shaper);
3130
+ const m = _chunkJLGNZMUVcjs.textMatrix.call(void 0, layer);
3128
3131
  const at = (x, y) => ({ x: m[0] * x + m[2] * y + m[4], y: m[1] * x + m[3] * y + m[5] });
3129
3132
  this.typeTarget = layer;
3130
3133
  this.typeLayer = true;
@@ -3143,7 +3146,7 @@ var FreeTransformSession = (_class5 = class {
3143
3146
  }
3144
3147
  if (layer.type === "shape" && !maskAlone) {
3145
3148
  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).`);
3146
- const g = _chunkYAFS2QFZcjs.shapeGeometryBounds.call(void 0, layer);
3149
+ const g = _chunkJLGNZMUVcjs.shapeGeometryBounds.call(void 0, layer);
3147
3150
  if (!g) fail(`Shape layer "${layer.name || id}" has no path to transform.`);
3148
3151
  const w = Math.max(g.width, 1);
3149
3152
  const h = Math.max(g.height, 1);
@@ -3191,7 +3194,7 @@ var FreeTransformSession = (_class5 = class {
3191
3194
  if (box) {
3192
3195
  const copy = {
3193
3196
  type: "pixel",
3194
- id: _chunkYAFS2QFZcjs.newLayerId.call(void 0, ),
3197
+ id: _chunkJLGNZMUVcjs.newLayerId.call(void 0, ),
3195
3198
  name: `${layer.name || "Layer"} copy`,
3196
3199
  visible: true,
3197
3200
  opacity: 1,
@@ -3215,7 +3218,7 @@ var FreeTransformSession = (_class5 = class {
3215
3218
  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).");
3216
3219
  this.box = box;
3217
3220
  this.moves = moves;
3218
- this.startGeometry = _chunkYAFS2QFZcjs.identityTransform.call(void 0, box);
3221
+ this.startGeometry = _chunkJLGNZMUVcjs.identityTransform.call(void 0, box);
3219
3222
  this.startInterp = this.interp;
3220
3223
  this.geometryValue = this.startGeometry;
3221
3224
  this.shown = this.startLayers;
@@ -3293,8 +3296,8 @@ var FreeTransformSession = (_class5 = class {
3293
3296
  warp: changes.warp === void 0 ? _nullishCoalesce(this.geometryValue.warp, () => ( null)) : changes.warp
3294
3297
  };
3295
3298
  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.");
3296
- if (!_chunkYAFS2QFZcjs.transformMap.call(void 0, next)) fail("These corners fold the frame over itself or through the horizon; keep the quad convex.");
3297
- if (this.typeTarget && (_chunkYAFS2QFZcjs.hasWarp.call(void 0, next) || !_chunkYAFS2QFZcjs.matrixFromCorners.call(void 0, next.box, next.corners))) {
3299
+ if (!_chunkJLGNZMUVcjs.transformMap.call(void 0, next)) fail("These corners fold the frame over itself or through the horizon; keep the quad convex.");
3300
+ if (this.typeTarget && (_chunkJLGNZMUVcjs.hasWarp.call(void 0, next) || !_chunkJLGNZMUVcjs.matrixFromCorners.call(void 0, next.box, next.corners))) {
3298
3301
  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.");
3299
3302
  }
3300
3303
  this.geometryValue = next;
@@ -3306,10 +3309,10 @@ var FreeTransformSession = (_class5 = class {
3306
3309
  if (this.smart) return { layers: this.resampleSmart(final, preview), selection: this.startSelection };
3307
3310
  if (this.typeTarget) return { layers: this.resampleType(), selection: this.startSelection };
3308
3311
  const g = this.geometryValue;
3309
- const identity = _chunkYAFS2QFZcjs.isIdentityTransform.call(void 0, g);
3310
- const warp = _chunkYAFS2QFZcjs.hasWarp.call(void 0, g);
3311
- const h = warp ? null : _chunkYAFS2QFZcjs.geometryHomography.call(void 0, g);
3312
- const f = warp ? _chunkYAFS2QFZcjs.transformMap.call(void 0, g) : null;
3312
+ const identity = _chunkJLGNZMUVcjs.isIdentityTransform.call(void 0, g);
3313
+ const warp = _chunkJLGNZMUVcjs.hasWarp.call(void 0, g);
3314
+ const h = warp ? null : _chunkJLGNZMUVcjs.geometryHomography.call(void 0, g);
3315
+ const f = warp ? _chunkJLGNZMUVcjs.transformMap.call(void 0, g) : null;
3313
3316
  const step = final ? 1 : previewStep(preview.scale);
3314
3317
  const interpolation = final ? this.interp : this.interp === "nearest" ? "nearest" : "bilinear";
3315
3318
  let layers = this.startLayers;
@@ -3353,7 +3356,7 @@ var FreeTransformSession = (_class5 = class {
3353
3356
  if (part.what === "selection") {
3354
3357
  const { width, height } = this.host.canvas();
3355
3358
  const data = new Uint8Array(_chunkJ5BA3BQ6cjs.readRegion.call(void 0, result, { x: 0, y: 0, width, height }).buffer);
3356
- const next = _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, width, height, data);
3359
+ const next = _chunkJLGNZMUVcjs.createSelectionMask.call(void 0, width, height, data);
3357
3360
  selection = next.bounds ? next : null;
3358
3361
  } else if (part.what === "pixels") {
3359
3362
  layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, layers, targetId, (l) => {
@@ -3375,14 +3378,14 @@ var FreeTransformSession = (_class5 = class {
3375
3378
  resampleShape(final, preview, warpMap, h) {
3376
3379
  const layer = this.shape;
3377
3380
  let components = layer.components;
3378
- if (!_chunkYAFS2QFZcjs.isIdentityTransform.call(void 0, this.geometryValue)) {
3381
+ if (!_chunkJLGNZMUVcjs.isIdentityTransform.call(void 0, this.geometryValue)) {
3379
3382
  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;
3380
3383
  const map = _nullishCoalesce(warpMap, () => ( ((p) => h ? _chunkMUUXNRU4cjs.applyHomography.call(void 0, h, p) : p)));
3381
- components = _chunkYAFS2QFZcjs.transformShapeComponents.call(void 0, layer.components, (p) => _nullishCoalesce(map(p), () => ( p)), affine);
3384
+ components = _chunkJLGNZMUVcjs.transformShapeComponents.call(void 0, layer.components, (p) => _nullishCoalesce(map(p), () => ( p)), affine);
3382
3385
  }
3383
3386
  const moved = { ...layer, components };
3384
3387
  delete moved.annotation;
3385
- const surface = _chunkYAFS2QFZcjs.renderShape.call(void 0, moved, this.host.shapeEnv(), final ? {} : { clip: preview.clip });
3388
+ const surface = _chunkJLGNZMUVcjs.renderShape.call(void 0, moved, this.host.shapeEnv(), final ? {} : { clip: preview.clip });
3386
3389
  return _chunk24ATT2PEcjs.mapLayer.call(void 0, this.startLayers, layer.id, () => ({ ...moved, surface }));
3387
3390
  }
3388
3391
  /**
@@ -3392,13 +3395,13 @@ var FreeTransformSession = (_class5 = class {
3392
3395
  resampleType() {
3393
3396
  const layer = this.typeTarget;
3394
3397
  const g = this.geometryValue;
3395
- if (_chunkYAFS2QFZcjs.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.");
3396
- const m = _chunkYAFS2QFZcjs.matrixFromCorners.call(void 0, g.box, g.corners);
3398
+ if (_chunkJLGNZMUVcjs.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.");
3399
+ const m = _chunkJLGNZMUVcjs.matrixFromCorners.call(void 0, g.box, g.corners);
3397
3400
  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.");
3398
3401
  const next = { ...layer, transform: m };
3399
3402
  delete next.annotation;
3400
- let layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, this.startLayers, layer.id, () => _chunkYAFS2QFZcjs.rerenderText.call(void 0, next, this.host.textEnv()));
3401
- const change = _chunkMUUXNRU4cjs.multiplyHomographies.call(void 0, _chunkMUUXNRU4cjs.homographyFromAffine.call(void 0, _chunkZ2H7KECKcjs.invertMatrix.call(void 0, _chunkYAFS2QFZcjs.textMatrix.call(void 0, layer))), _chunkMUUXNRU4cjs.homographyFromAffine.call(void 0, m));
3403
+ let layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, this.startLayers, layer.id, () => _chunkJLGNZMUVcjs.rerenderText.call(void 0, next, this.host.textEnv()));
3404
+ const change = _chunkMUUXNRU4cjs.multiplyHomographies.call(void 0, _chunkMUUXNRU4cjs.homographyFromAffine.call(void 0, _chunk2R3UW57Ucjs.invertMatrix.call(void 0, _chunkJLGNZMUVcjs.textMatrix.call(void 0, layer))), _chunkMUUXNRU4cjs.homographyFromAffine.call(void 0, m));
3402
3405
  for (const part of this.parts) {
3403
3406
  if (part.what !== "mask") continue;
3404
3407
  const surface = _chunk24ATT2PEcjs.transformSurface.call(void 0, part.moving, change, { interpolation: this.interp === "nearest" ? "nearest" : "bilinear" });
@@ -3414,12 +3417,12 @@ var FreeTransformSession = (_class5 = class {
3414
3417
  const canvas = this.host.canvas();
3415
3418
  try {
3416
3419
  if (final) {
3417
- const res = _chunkYAFS2QFZcjs.setSmartPlacement.call(void 0, this.startLayers, layer.id, placement, canvas);
3420
+ const res = _chunkJLGNZMUVcjs.setSmartPlacement.call(void 0, this.startLayers, layer.id, placement, canvas);
3418
3421
  this.smartMasksMoved = res.masksMoved;
3419
3422
  return res.layers;
3420
3423
  }
3421
3424
  const step = previewStep(preview.scale);
3422
- const surface = _chunkYAFS2QFZcjs.renderSmartObject.call(void 0, { ...layer, placement }, canvas, { step, clip: preview.clip, skipFilters: true, reduced: this.smartReduced });
3425
+ const surface = _chunkJLGNZMUVcjs.renderSmartObject.call(void 0, { ...layer, placement }, canvas, { step, clip: preview.clip, skipFilters: true, reduced: this.smartReduced });
3423
3426
  return _chunk24ATT2PEcjs.mapLayer.call(void 0, this.startLayers, layer.id, (l) => ({ ...l, placement, surface }));
3424
3427
  } catch (e) {
3425
3428
  if (e instanceof _chunk24ATT2PEcjs.TransformTooLargeError) fail(e.message);
@@ -3429,10 +3432,10 @@ var FreeTransformSession = (_class5 = class {
3429
3432
  /** Whether the geometry (or the interpolation of a smart object) differs from where it started. */
3430
3433
  isChanged() {
3431
3434
  const g = this.geometryValue;
3432
- if (!this.smart && !this.typeTarget) return !_chunkYAFS2QFZcjs.isIdentityTransform.call(void 0, g);
3435
+ if (!this.smart && !this.typeTarget) return !_chunkJLGNZMUVcjs.isIdentityTransform.call(void 0, g);
3433
3436
  const a = this.startGeometry;
3434
3437
  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);
3435
- const warp = (w, box) => w && _chunkYAFS2QFZcjs.hasWarp.call(void 0, { box, corners: a.corners, warp: w }) ? JSON.stringify(w) : "";
3438
+ const warp = (w, box) => w && _chunkJLGNZMUVcjs.hasWarp.call(void 0, { box, corners: a.corners, warp: w }) ? JSON.stringify(w) : "";
3436
3439
  return !same || warp(g.warp, g.box) !== warp(a.warp, a.box) || this.interp !== this.startInterp;
3437
3440
  }
3438
3441
  render(preview) {
@@ -3692,7 +3695,7 @@ function convertSurfaceColors(surface, t) {
3692
3695
  }
3693
3696
 
3694
3697
  // src/image-editor/controller.ts
3695
- var IMAGE_EDITOR_SCHEMA_VERSION = _chunkYAFS2QFZcjs.LAYERED_SCHEMA_VERSION;
3698
+ var IMAGE_EDITOR_SCHEMA_VERSION = _chunkJLGNZMUVcjs.LAYERED_SCHEMA_VERSION;
3696
3699
  var RETOUCH_TOOLS = ["clone", "heal", "spot-heal", "smudge", "dodge", "burn", "sponge", "blur", "sharpen", "history"];
3697
3700
  var isRetouchTool = (tool) => RETOUCH_TOOLS.includes(tool);
3698
3701
  var STROKE_TOOLS = ["brush", "eraser", "mixer", ...RETOUCH_TOOLS];
@@ -3886,7 +3889,7 @@ var PaintStrokeSession = (_class6 = class {
3886
3889
  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 })) {
3887
3890
  const key = _chunkJ5BA3BQ6cjs.tileKey.call(void 0, t.tx, t.ty);
3888
3891
  const cur = regions.get(key);
3889
- regions.set(key, { tx: t.tx, ty: t.ty, r: cur ? _chunkYAFS2QFZcjs.unionRect.call(void 0, cur.r, r) : r });
3892
+ regions.set(key, { tx: t.tx, ty: t.ty, r: cur ? _chunkJLGNZMUVcjs.unionRect.call(void 0, cur.r, r) : r });
3890
3893
  }
3891
3894
  }
3892
3895
  for (const [key, { tx, ty, r }] of regions) {
@@ -3918,7 +3921,7 @@ var PaintStrokeSession = (_class6 = class {
3918
3921
  }
3919
3922
  /** Finishes the stroke (one undo step) and returns what changed. */
3920
3923
  end() {
3921
- if (this.closed) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("This stroke has already ended.");
3924
+ if (this.closed) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("This stroke has already ended.");
3922
3925
  const last = _nullishCoalesce(this.last, () => ( void 0));
3923
3926
  const rects = this.mixer ? this.mixer.finish(last) : this.stroke.finish(last);
3924
3927
  _optionalChain([this, 'access', _109 => _109.flushView, 'optionalCall', _110 => _110()]);
@@ -4054,20 +4057,20 @@ function sameTile(a, b) {
4054
4057
  for (let i = 0; i < a.data.length; i++) if (a.data[i] !== b.data[i]) return false;
4055
4058
  return true;
4056
4059
  }
4057
- var DEFAULT_ADJUSTMENTS = _chunkYAFS2QFZcjs.DEFAULT_ADJUSTMENTS_VALUES;
4060
+ var DEFAULT_ADJUSTMENTS = _chunkJLGNZMUVcjs.DEFAULT_ADJUSTMENTS_VALUES;
4058
4061
  function normalizeStoredAdjustments(stored) {
4059
4062
  if (!stored) return { ...DEFAULT_ADJUSTMENTS };
4060
4063
  const out = {
4061
4064
  ...DEFAULT_ADJUSTMENTS,
4062
4065
  ...stored,
4063
- process: _chunkYAFS2QFZcjs.normalizeProcessVersion.call(void 0, stored.process)
4066
+ process: _chunkJLGNZMUVcjs.normalizeProcessVersion.call(void 0, stored.process)
4064
4067
  };
4065
- const layers = _chunkYAFS2QFZcjs.normalizeAdjustmentLayers.call(void 0, stored.layers);
4068
+ const layers = _chunkJLGNZMUVcjs.normalizeAdjustmentLayers.call(void 0, stored.layers);
4066
4069
  if (layers.length) out.layers = layers;
4067
4070
  else delete out.layers;
4068
4071
  return out;
4069
4072
  }
4070
- var isLayered = (data) => Boolean(data && data.version === _chunkYAFS2QFZcjs.LAYERED_SCHEMA_VERSION && Array.isArray(data.layers));
4073
+ var isLayered = (data) => Boolean(data && data.version === _chunkJLGNZMUVcjs.LAYERED_SCHEMA_VERSION && Array.isArray(data.layers));
4071
4074
  function migrateSerializedImageEditorState(data) {
4072
4075
  if (isLayered(data)) {
4073
4076
  const out = {
@@ -4099,10 +4102,10 @@ function migrateSerializedImageEditorState(data) {
4099
4102
  function migrateToLayeredState(data, size) {
4100
4103
  const clean = migrateSerializedImageEditorState(data);
4101
4104
  if (isLayered(clean)) return clean;
4102
- const stack = _chunkYAFS2QFZcjs.layersFromLegacy.call(void 0, clean, Math.round(size.width), Math.round(size.height));
4103
- const { layers, assets } = _chunkYAFS2QFZcjs.serializeLayers.call(void 0, stack.layers);
4105
+ const stack = _chunkJLGNZMUVcjs.layersFromLegacy.call(void 0, clean, Math.round(size.width), Math.round(size.height));
4106
+ const { layers, assets } = _chunkJLGNZMUVcjs.serializeLayers.call(void 0, stack.layers);
4104
4107
  const out = {
4105
- version: _chunkYAFS2QFZcjs.LAYERED_SCHEMA_VERSION,
4108
+ version: _chunkJLGNZMUVcjs.LAYERED_SCHEMA_VERSION,
4106
4109
  width: Math.round(size.width),
4107
4110
  height: Math.round(size.height),
4108
4111
  layers,
@@ -4116,8 +4119,8 @@ function migrateToLayeredState(data, size) {
4116
4119
  if (clean.selection) out.selection = clean.selection;
4117
4120
  return out;
4118
4121
  }
4119
- var DEFAULT_TRANSFORM = _chunkYAFS2QFZcjs.DEFAULT_TRANSFORM_VALUES;
4120
- var DEFAULT_DEPTH_MASK = _chunkYAFS2QFZcjs.DEFAULT_DEPTH_MASK_VALUES;
4122
+ var DEFAULT_TRANSFORM = _chunkJLGNZMUVcjs.DEFAULT_TRANSFORM_VALUES;
4123
+ var DEFAULT_DEPTH_MASK = _chunkJLGNZMUVcjs.DEFAULT_DEPTH_MASK_VALUES;
4121
4124
  var DEVELOP_KEYS = ["brightness", "contrast", "saturation", "exposure", "temperature", "tint"];
4122
4125
  var ImageEditorController = (_class7 = class {
4123
4126
 
@@ -4140,7 +4143,7 @@ var ImageEditorController = (_class7 = class {
4140
4143
  __init62() {this.sourceSurfaces = /* @__PURE__ */ new WeakMap()}
4141
4144
  __init63() {this.viewKey = []}
4142
4145
  /** For `compositePixels` and mask evaluation (the renderer keeps its own for the viewport). */
4143
- __init64() {this.compositor = new (0, _chunkYAFS2QFZcjs.LayerCompositor)()}
4146
+ __init64() {this.compositor = new (0, _chunkJLGNZMUVcjs.LayerCompositor)()}
4144
4147
  /** The effects provider slot (see `setEffectsProvider`). */
4145
4148
  __init65() {this.effects = new (0, _chunkJODTP4DPcjs.EffectsSlot)()}
4146
4149
  /** Renders provider effects: effect smart filter results and effect layers. */
@@ -4198,7 +4201,7 @@ var ImageEditorController = (_class7 = class {
4198
4201
  this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
4199
4202
  if (_optionalChain([options, 'access', _126 => _126.initialState, 'optionalAccess', _127 => _127.selection])) {
4200
4203
  try {
4201
- this.state.selection = normalizeSelection(_chunkYAFS2QFZcjs.deserializeSelection.call(void 0, options.initialState.selection));
4204
+ this.state.selection = normalizeSelection(_chunkJLGNZMUVcjs.deserializeSelection.call(void 0, options.initialState.selection));
4202
4205
  } catch (e15) {
4203
4206
  }
4204
4207
  }
@@ -4310,10 +4313,10 @@ var ImageEditorController = (_class7 = class {
4310
4313
  if (l.type === "group") {
4311
4314
  const children = walk(l.children);
4312
4315
  if (children !== l.children) next2 = { ...l, children };
4313
- } 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 || _chunkYAFS2QFZcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
4316
+ } 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 || _chunkJLGNZMUVcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
4314
4317
  try {
4315
- const r = _chunkYAFS2QFZcjs.rerender.call(void 0, l, canvas);
4316
- if (all || !_chunkYAFS2QFZcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
4318
+ const r = _chunkJLGNZMUVcjs.rerender.call(void 0, l, canvas);
4319
+ if (all || !_chunkJLGNZMUVcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
4317
4320
  } catch (e17) {
4318
4321
  }
4319
4322
  }
@@ -4369,19 +4372,19 @@ var ImageEditorController = (_class7 = class {
4369
4372
  const d = await this.describeEffect(effect, "filter");
4370
4373
  const values = _chunkJODTP4DPcjs.resolveEffectValues.call(void 0, d, options.values);
4371
4374
  const found = _chunk24ATT2PEcjs.findLayer.call(void 0, this.state.layers, layerId);
4372
- if (!found) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`There is no layer "${layerId}"; call list_layers for the layer ids.`);
4375
+ if (!found) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`There is no layer "${layerId}"; call list_layers for the layer ids.`);
4373
4376
  let layers = this.state.layers;
4374
4377
  let id = layerId;
4375
4378
  let converted = false;
4376
4379
  if (found.layer.type !== "smart") {
4377
- if (found.layer.type === "adjustment" || found.layer.type === "annotation") throw new (0, _chunkYAFS2QFZcjs.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.`);
4378
- const res2 = _chunkYAFS2QFZcjs.convertToSmartObject.call(void 0, layers, [layerId], this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l) });
4380
+ if (found.layer.type === "adjustment" || found.layer.type === "annotation") throw new (0, _chunkJLGNZMUVcjs.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.`);
4381
+ const res2 = _chunkJLGNZMUVcjs.convertToSmartObject.call(void 0, layers, [layerId], this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l) });
4379
4382
  layers = res2.layers;
4380
4383
  id = res2.layer.id;
4381
4384
  converted = true;
4382
4385
  }
4383
- const filter = _chunkYAFS2QFZcjs.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 });
4384
- const res = _chunkYAFS2QFZcjs.addSmartFilter.call(void 0, layers, id, filter, this.canvasSize, options.index);
4386
+ const filter = _chunkJLGNZMUVcjs.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 });
4387
+ const res = _chunkJLGNZMUVcjs.addSmartFilter.call(void 0, layers, id, filter, this.canvasSize, options.index);
4385
4388
  this.commitLayers(res.layers);
4386
4389
  return { layerId: id, filter: res.filter, converted };
4387
4390
  }
@@ -4392,9 +4395,9 @@ var ImageEditorController = (_class7 = class {
4392
4395
  * false, during a drag).
4393
4396
  */
4394
4397
  async updateEffectFilter(layerId, filterId, changes, commitToHistory = true) {
4395
- const layer = _chunkYAFS2QFZcjs.requireSmartObject.call(void 0, this.state.layers, layerId);
4398
+ const layer = _chunkJLGNZMUVcjs.requireSmartObject.call(void 0, this.state.layers, layerId);
4396
4399
  const was = _optionalChain([layer, 'access', _134 => _134.smartFilters, 'optionalAccess', _135 => _135.filters, 'access', _136 => _136.find, 'call', _137 => _137((f) => f.id === filterId)]);
4397
- if (!was || was.kind !== "effect") throw new (0, _chunkYAFS2QFZcjs.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"}.`);
4400
+ if (!was || was.kind !== "effect") throw new (0, _chunkJLGNZMUVcjs.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"}.`);
4398
4401
  const update = {};
4399
4402
  if (changes.values) {
4400
4403
  const d = await this.describeEffect(was.effect);
@@ -4403,15 +4406,15 @@ var ImageEditorController = (_class7 = class {
4403
4406
  for (const [k, v] of Object.entries(changes.values)) {
4404
4407
  if (v !== null) given[k] = v;
4405
4408
  else if (k in d.controls.properties) base[k] = d.defaults[k];
4406
- else throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4409
+ else throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4407
4410
  }
4408
4411
  update.values = { ...base, ..._chunkJODTP4DPcjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
4409
4412
  }
4410
4413
  for (const k of ["enabled", "blend", "opacity"]) if (changes[k] !== void 0) update[k] = changes[k];
4411
- let res = _chunkYAFS2QFZcjs.updateSmartFilter.call(void 0, this.state.layers, layerId, filterId, update, this.canvasSize);
4412
- if (changes.index !== void 0) res = { ...res, layers: _chunkYAFS2QFZcjs.moveSmartFilter.call(void 0, res.layers, layerId, filterId, changes.index, this.canvasSize).layers };
4414
+ let res = _chunkJLGNZMUVcjs.updateSmartFilter.call(void 0, this.state.layers, layerId, filterId, update, this.canvasSize);
4415
+ if (changes.index !== void 0) res = { ...res, layers: _chunkJLGNZMUVcjs.moveSmartFilter.call(void 0, res.layers, layerId, filterId, changes.index, this.canvasSize).layers };
4413
4416
  this.commitLayers(res.layers, void 0, commitToHistory);
4414
- return _chunkYAFS2QFZcjs.requireSmartObject.call(void 0, this.state.layers, layerId).smartFilters.filters.find((f) => f.id === filterId);
4417
+ return _chunkJLGNZMUVcjs.requireSmartObject.call(void 0, this.state.layers, layerId).smartFilters.filters.find((f) => f.id === filterId);
4415
4418
  }
4416
4419
  /**
4417
4420
  * Adds an effect layer: a pixel layer drawn by a provider generator, overlay or title effect at
@@ -4423,12 +4426,12 @@ var ImageEditorController = (_class7 = class {
4423
4426
  const values = _chunkJODTP4DPcjs.resolveEffectValues.call(void 0, d, options.values);
4424
4427
  const { width, height } = this.naturalSize;
4425
4428
  const pixels = await this.effectsEngine.renderLayer(d.id, values, { width, height, depth: this.bitDepth, time: options.time });
4426
- const blend = _chunkYAFS2QFZcjs.parseBlend.call(void 0, options.blend);
4427
- if (options.opacity !== void 0 && !(options.opacity >= 0 && options.opacity <= 1)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("opacity must be from 0 to 1.");
4429
+ const blend = _chunkJLGNZMUVcjs.parseBlend.call(void 0, options.blend);
4430
+ if (options.opacity !== void 0 && !(options.opacity >= 0 && options.opacity <= 1)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("opacity must be from 0 to 1.");
4428
4431
  const ids = new Set(_chunk24ATT2PEcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
4429
4432
  const layer = {
4430
4433
  type: "pixel",
4431
- id: options.id && !ids.has(options.id) ? options.id : _chunkYAFS2QFZcjs.newLayerId.call(void 0, ),
4434
+ id: options.id && !ids.has(options.id) ? options.id : _chunkJLGNZMUVcjs.newLayerId.call(void 0, ),
4432
4435
  name: _optionalChain([options, 'access', _140 => _140.name, 'optionalAccess', _141 => _141.trim, 'call', _142 => _142()]) || d.name,
4433
4436
  visible: true,
4434
4437
  opacity: _nullishCoalesce(options.opacity, () => ( 1)),
@@ -4437,7 +4440,7 @@ var ImageEditorController = (_class7 = class {
4437
4440
  offset: { x: 0, y: 0 },
4438
4441
  generator: { effect: d.id, provider: this.effects.require().id, name: d.name, values, ...options.time ? { time: options.time } : {} }
4439
4442
  };
4440
- const next = _chunkYAFS2QFZcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(options));
4443
+ const next = _chunkJLGNZMUVcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(options));
4441
4444
  this.commitLayers(next, () => {
4442
4445
  this.state.activeLayerId = layer.id;
4443
4446
  this.state.activeTarget = "pixels";
@@ -4452,8 +4455,8 @@ var ImageEditorController = (_class7 = class {
4452
4455
  async updateEffectLayer(layerId, changes, commitToHistory = true) {
4453
4456
  const found = _chunk24ATT2PEcjs.findLayer.call(void 0, this.state.layers, layerId);
4454
4457
  const layer = _optionalChain([found, 'optionalAccess', _143 => _143.layer]);
4455
- if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
4456
- _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
4458
+ if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
4459
+ _chunkJLGNZMUVcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
4457
4460
  const g = layer.generator;
4458
4461
  const d = await this.describeEffect(g.effect);
4459
4462
  const base = { ...g.values };
@@ -4461,7 +4464,7 @@ var ImageEditorController = (_class7 = class {
4461
4464
  for (const [k, v] of Object.entries(_nullishCoalesce(changes.values, () => ( {})))) {
4462
4465
  if (v !== null) given[k] = v;
4463
4466
  else if (k in d.controls.properties) base[k] = d.defaults[k];
4464
- else throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4467
+ else throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4465
4468
  }
4466
4469
  const values = { ...base, ..._chunkJODTP4DPcjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
4467
4470
  const time = _nullishCoalesce(_nullishCoalesce(changes.time, () => ( g.time)), () => ( 0));
@@ -4476,7 +4479,7 @@ var ImageEditorController = (_class7 = class {
4476
4479
  /** Turns an effect layer into a plain pixel layer keeping its pixels (one undo step). */
4477
4480
  rasterizeEffectLayer(layerId) {
4478
4481
  const found = _chunk24ATT2PEcjs.findLayer.call(void 0, this.state.layers, layerId);
4479
- if (!found || found.layer.type !== "pixel" || !found.layer.generator) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`"${layerId}" is not an effect layer.`);
4482
+ if (!found || found.layer.type !== "pixel" || !found.layer.generator) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`"${layerId}" is not an effect layer.`);
4480
4483
  this.commitLayers(
4481
4484
  _chunk24ATT2PEcjs.mapLayer.call(void 0, this.state.layers, layerId, (l) => {
4482
4485
  const { generator: _g, ...rest } = l;
@@ -4504,7 +4507,7 @@ var ImageEditorController = (_class7 = class {
4504
4507
  if (key.length === this.viewKey.length && key.every((v, i) => v === this.viewKey[i])) return;
4505
4508
  this.viewKey = key;
4506
4509
  const { width, height } = this.naturalSize;
4507
- const view = _chunkYAFS2QFZcjs.legacyView.call(void 0, this.stack(), width, height, s.activeLayerId);
4510
+ const view = _chunkJLGNZMUVcjs.legacyView.call(void 0, this.stack(), width, height, s.activeLayerId);
4508
4511
  s.adjustments = view.adjustments;
4509
4512
  s.depthMask = view.depthMask;
4510
4513
  s.annotations = view.annotations;
@@ -4658,7 +4661,7 @@ var ImageEditorController = (_class7 = class {
4658
4661
  applyCropPreset(ratio) {
4659
4662
  this.recordHistory();
4660
4663
  const { width, height } = this.state.imageDimensions;
4661
- if (ratio && _chunkYAFS2QFZcjs.isQuarterTurnSwapped.call(void 0, this.state.transform)) {
4664
+ if (ratio && _chunkJLGNZMUVcjs.isQuarterTurnSwapped.call(void 0, this.state.transform)) {
4662
4665
  ratio = 1 / ratio;
4663
4666
  }
4664
4667
  if (!ratio) {
@@ -4740,7 +4743,7 @@ var ImageEditorController = (_class7 = class {
4740
4743
  */
4741
4744
  getLayerPixels(id) {
4742
4745
  const layer = this.getLayer(id);
4743
- if (!layer || !_chunkYAFS2QFZcjs.hasSurface.call(void 0, layer)) return null;
4746
+ if (!layer || !_chunkJLGNZMUVcjs.hasSurface.call(void 0, layer)) return null;
4744
4747
  const surface = this.surfaceOf(layer);
4745
4748
  const b = _chunkJ5BA3BQ6cjs.contentBounds.call(void 0, surface);
4746
4749
  if (!b) return null;
@@ -4753,7 +4756,7 @@ var ImageEditorController = (_class7 = class {
4753
4756
  */
4754
4757
  getLayerBounds(id) {
4755
4758
  const layer = this.getLayer(id);
4756
- if (!layer || !_chunkYAFS2QFZcjs.hasSurface.call(void 0, layer)) return null;
4759
+ if (!layer || !_chunkJLGNZMUVcjs.hasSurface.call(void 0, layer)) return null;
4757
4760
  const surface = this.surfaceOf(layer);
4758
4761
  let b = this.boundsCache.get(surface);
4759
4762
  if (b === void 0) {
@@ -4768,9 +4771,9 @@ var ImageEditorController = (_class7 = class {
4768
4771
  */
4769
4772
  getLayerDataURL(id) {
4770
4773
  const layer = this.getLayer(id);
4771
- if (!layer || !_chunkYAFS2QFZcjs.hasSurface.call(void 0, layer)) return null;
4774
+ if (!layer || !_chunkJLGNZMUVcjs.hasSurface.call(void 0, layer)) return null;
4772
4775
  const surface = this.surfaceOf(layer);
4773
- const enc = _chunkYAFS2QFZcjs.encodeSurface.call(void 0, surface);
4776
+ const enc = _chunkJLGNZMUVcjs.encodeSurface.call(void 0, surface);
4774
4777
  return enc ? enc.url : null;
4775
4778
  }
4776
4779
  /**
@@ -4912,19 +4915,19 @@ var ImageEditorController = (_class7 = class {
4912
4915
  if (init.pixels) {
4913
4916
  const px2 = init.pixels;
4914
4917
  if (!(px2.width > 0 && px2.height > 0) || px2.data.length < px2.width * px2.height * 4) {
4915
- throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("pixels must be RGBA with width \xD7 height \xD7 4 bytes.");
4918
+ throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("pixels must be RGBA with width \xD7 height \xD7 4 bytes.");
4916
4919
  }
4917
4920
  surface = _chunkJ5BA3BQ6cjs.surfaceFromPixels.call(void 0, px2, 4);
4918
4921
  } else if (init.color !== void 0) {
4919
4922
  const c = parseColor(init.color);
4920
4923
  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]));
4921
4924
  }
4922
- const blend = _chunkYAFS2QFZcjs.parseBlend.call(void 0, init.blend);
4923
- if (init.opacity !== void 0 && !(init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("opacity must be from 0 to 1.");
4925
+ const blend = _chunkJLGNZMUVcjs.parseBlend.call(void 0, init.blend);
4926
+ if (init.opacity !== void 0 && !(init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("opacity must be from 0 to 1.");
4924
4927
  const ids = new Set(_chunk24ATT2PEcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
4925
4928
  const layer = {
4926
4929
  type: "pixel",
4927
- id: init.id && !ids.has(init.id) ? init.id : _chunkYAFS2QFZcjs.newLayerId.call(void 0, ),
4930
+ id: init.id && !ids.has(init.id) ? init.id : _chunkJLGNZMUVcjs.newLayerId.call(void 0, ),
4928
4931
  name: _optionalChain([init, 'access', _155 => _155.name, 'optionalAccess', _156 => _156.trim, 'call', _157 => _157()]) || this.nextLayerName(),
4929
4932
  visible: _nullishCoalesce(init.visible, () => ( true)),
4930
4933
  opacity: _nullishCoalesce(init.opacity, () => ( 1)),
@@ -4933,7 +4936,7 @@ var ImageEditorController = (_class7 = class {
4933
4936
  offset: { x: Math.round(_nullishCoalesce(init.x, () => ( 0))), y: Math.round(_nullishCoalesce(init.y, () => ( 0))) }
4934
4937
  };
4935
4938
  if (init.fillOpacity !== void 0 && init.fillOpacity !== 1) layer.fillOpacity = init.fillOpacity;
4936
- const next = _chunkYAFS2QFZcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
4939
+ const next = _chunkJLGNZMUVcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
4937
4940
  this.commitLayers(next, () => {
4938
4941
  this.state.activeLayerId = layer.id;
4939
4942
  this.state.activeTarget = "pixels";
@@ -4973,12 +4976,12 @@ var ImageEditorController = (_class7 = class {
4973
4976
  try {
4974
4977
  img = await this.renderer.imageCache.get(src);
4975
4978
  } catch (e22) {
4976
- throw new (0, _chunkYAFS2QFZcjs.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.");
4979
+ throw new (0, _chunkJLGNZMUVcjs.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.");
4977
4980
  }
4978
4981
  const w = img.naturalWidth || img.width;
4979
4982
  const h = img.naturalHeight || img.height;
4980
4983
  const ctx = this.renderer.createCanvas(w, h).getContext("2d");
4981
- if (!ctx || typeof ctx.getImageData !== "function") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Decoding this image needs a canvas; pass a PNG instead.");
4984
+ if (!ctx || typeof ctx.getImageData !== "function") throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Decoding this image needs a canvas; pass a PNG instead.");
4982
4985
  ctx.drawImage(img, 0, 0, w, h);
4983
4986
  const data = ctx.getImageData(0, 0, w, h);
4984
4987
  return { width: w, height: h, data: data.data };
@@ -4991,7 +4994,7 @@ var ImageEditorController = (_class7 = class {
4991
4994
  }
4992
4995
  /** Duplicates a layer (with its children) directly above it, as one undo step. Returns the copy's id. */
4993
4996
  duplicateLayer(id, name) {
4994
- const res = _chunkYAFS2QFZcjs.duplicateLayer.call(void 0, this.state.layers, id, name);
4997
+ const res = _chunkJLGNZMUVcjs.duplicateLayer.call(void 0, this.state.layers, id, name);
4995
4998
  this.commitLayers(res.layers, () => {
4996
4999
  this.state.activeLayerId = res.id;
4997
5000
  });
@@ -4999,16 +5002,16 @@ var ImageEditorController = (_class7 = class {
4999
5002
  }
5000
5003
  /** Deletes a layer (refused when locked), as one undo step. */
5001
5004
  removeLayer(id) {
5002
- const next = _chunkYAFS2QFZcjs.removeLayer.call(void 0, this.state.layers, id);
5005
+ const next = _chunkJLGNZMUVcjs.removeLayer.call(void 0, this.state.layers, id);
5003
5006
  this.commitLayers(next, () => {
5004
- if (this.state.selectedAnnotationId && !_chunk24ATT2PEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkYAFS2QFZcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _159 => _159.id]) === this.state.selectedAnnotationId)) {
5007
+ if (this.state.selectedAnnotationId && !_chunk24ATT2PEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkJLGNZMUVcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _159 => _159.id]) === this.state.selectedAnnotationId)) {
5005
5008
  this.state.selectedAnnotationId = null;
5006
5009
  }
5007
5010
  });
5008
5011
  }
5009
5012
  /** Moves a layer above / below another, or into a group, as one undo step. Returns its new parent and index. */
5010
5013
  moveLayer(id, placement) {
5011
- const next = _chunkYAFS2QFZcjs.moveLayer.call(void 0, this.state.layers, id, placement);
5014
+ const next = _chunkJLGNZMUVcjs.moveLayer.call(void 0, this.state.layers, id, placement);
5012
5015
  const loc = _chunk24ATT2PEcjs.findLayer.call(void 0, next, id);
5013
5016
  if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _160 => _160.parent, 'optionalAccess', _161 => _161.id]), () => ( null)), index: loc.index };
5014
5017
  this.commitLayers(next);
@@ -5019,23 +5022,23 @@ var ImageEditorController = (_class7 = class {
5019
5022
  * one undo step (`commitToHistory = false` for the moves of a slider drag). Returns the layer.
5020
5023
  */
5021
5024
  setLayerProperties(id, props, commitToHistory = true) {
5022
- const next = _chunkYAFS2QFZcjs.setLayerProperties.call(void 0, this.state.layers, id, props);
5025
+ const next = _chunkJLGNZMUVcjs.setLayerProperties.call(void 0, this.state.layers, id, props);
5023
5026
  this.commitLayers(next, void 0, commitToHistory);
5024
5027
  return _chunk24ATT2PEcjs.findLayer.call(void 0, next, id).layer;
5025
5028
  }
5026
5029
  /** Adds an empty pass-through group above the active layer (or at `placement`) and makes it active. Returns its id. */
5027
5030
  addGroup(init = {}) {
5028
- const blend = init.blend === void 0 ? "pass-through" : _chunkYAFS2QFZcjs.parseBlend.call(void 0, init.blend, true);
5031
+ const blend = init.blend === void 0 ? "pass-through" : _chunkJLGNZMUVcjs.parseBlend.call(void 0, init.blend, true);
5029
5032
  const group = {
5030
5033
  type: "group",
5031
- id: _chunkYAFS2QFZcjs.newLayerId.call(void 0, "group"),
5034
+ id: _chunkJLGNZMUVcjs.newLayerId.call(void 0, "group"),
5032
5035
  name: _optionalChain([init, 'access', _164 => _164.name, 'optionalAccess', _165 => _165.trim, 'call', _166 => _166()]) || "Group",
5033
5036
  visible: true,
5034
5037
  opacity: 1,
5035
5038
  blend,
5036
5039
  children: []
5037
5040
  };
5038
- const next = _chunkYAFS2QFZcjs.placeLayer.call(void 0, this.state.layers, group, this.newLayerPlacement(init));
5041
+ const next = _chunkJLGNZMUVcjs.placeLayer.call(void 0, this.state.layers, group, this.newLayerPlacement(init));
5039
5042
  this.commitLayers(next, () => {
5040
5043
  this.state.activeLayerId = group.id;
5041
5044
  this.state.activeTarget = "pixels";
@@ -5044,7 +5047,7 @@ var ImageEditorController = (_class7 = class {
5044
5047
  }
5045
5048
  /** Puts sibling layers into a new group (one undo step). Returns the group id. */
5046
5049
  groupLayers(ids, name) {
5047
- const res = _chunkYAFS2QFZcjs.groupLayers.call(void 0, this.state.layers, ids, name);
5050
+ const res = _chunkJLGNZMUVcjs.groupLayers.call(void 0, this.state.layers, ids, name);
5048
5051
  this.commitLayers(res.layers, () => {
5049
5052
  this.state.activeLayerId = res.id;
5050
5053
  });
@@ -5052,7 +5055,7 @@ var ImageEditorController = (_class7 = class {
5052
5055
  }
5053
5056
  /** Replaces a group by its children (one undo step). Returns the child ids, bottom to top. */
5054
5057
  ungroupLayer(id) {
5055
- const res = _chunkYAFS2QFZcjs.ungroupLayer.call(void 0, this.state.layers, id);
5058
+ const res = _chunkJLGNZMUVcjs.ungroupLayer.call(void 0, this.state.layers, id);
5056
5059
  this.commitLayers(res.layers);
5057
5060
  return res.ids;
5058
5061
  }
@@ -5061,38 +5064,38 @@ var ImageEditorController = (_class7 = class {
5061
5064
  * (`commitToHistory = false` for the moves of a drag). Returns the offset and document bounds.
5062
5065
  */
5063
5066
  offsetLayer(id, move, commitToHistory = true) {
5064
- const layer = _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5067
+ const layer = _chunkJLGNZMUVcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5065
5068
  if (layer.type === "smart") {
5066
5069
  const tl = layer.placement.corners[0];
5067
5070
  const dx = move.x !== void 0 ? move.x - tl.x : _nullishCoalesce(move.dx, () => ( 0));
5068
5071
  const dy = move.y !== void 0 ? move.y - tl.y : _nullishCoalesce(move.dy, () => ( 0));
5069
- if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("x and y must be numbers.");
5070
- this.commitLayers(_chunkYAFS2QFZcjs.offsetSmartObject.call(void 0, this.state.layers, id, dx, dy, this.canvasSize), void 0, commitToHistory);
5072
+ if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("x and y must be numbers.");
5073
+ this.commitLayers(_chunkJLGNZMUVcjs.offsetSmartObject.call(void 0, this.state.layers, id, dx, dy, this.canvasSize), void 0, commitToHistory);
5071
5074
  const moved = _chunk24ATT2PEcjs.findLayer.call(void 0, this.state.layers, id).layer;
5072
5075
  return { offset: { x: Math.round(moved.placement.corners[0].x), y: Math.round(moved.placement.corners[0].y) }, bounds: this.getLayerBounds(id) };
5073
5076
  }
5074
5077
  if (layer.type === "shape") {
5075
- const g = _nullishCoalesce(_chunkYAFS2QFZcjs.shapeGeometryBounds.call(void 0, layer), () => ( { x: 0, y: 0 }));
5078
+ const g = _nullishCoalesce(_chunkJLGNZMUVcjs.shapeGeometryBounds.call(void 0, layer), () => ( { x: 0, y: 0 }));
5076
5079
  const dx = move.x !== void 0 ? move.x - g.x : _nullishCoalesce(move.dx, () => ( 0));
5077
5080
  const dy = move.y !== void 0 ? move.y - g.y : _nullishCoalesce(move.dy, () => ( 0));
5078
- if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("x and y must be numbers.");
5079
- _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "position", "move it");
5080
- let moved = _chunkYAFS2QFZcjs.offsetShape.call(void 0, layer, dx, dy, this.shapeEnv());
5081
+ if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("x and y must be numbers.");
5082
+ _chunkJLGNZMUVcjs.requireUnlocked.call(void 0, layer, "position", "move it");
5083
+ let moved = _chunkJLGNZMUVcjs.offsetShape.call(void 0, layer, dx, dy, this.shapeEnv());
5081
5084
  const mask = layer.mask;
5082
5085
  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)) } };
5083
5086
  this.commitLayers(_chunk24ATT2PEcjs.mapLayer.call(void 0, this.state.layers, id, () => moved), void 0, commitToHistory);
5084
- const b = _nullishCoalesce(_chunkYAFS2QFZcjs.shapeGeometryBounds.call(void 0, moved), () => ( { x: 0, y: 0 }));
5087
+ const b = _nullishCoalesce(_chunkJLGNZMUVcjs.shapeGeometryBounds.call(void 0, moved), () => ( { x: 0, y: 0 }));
5085
5088
  return { offset: { x: Math.round(b.x), y: Math.round(b.y) }, bounds: this.getLayerBounds(id) };
5086
5089
  }
5087
5090
  if (layer.type === "type") {
5088
5091
  const m = _nullishCoalesce(layer.transform, () => ( [1, 0, 0, 1, 0, 0]));
5089
5092
  const dx = move.x !== void 0 ? move.x - m[4] : _nullishCoalesce(move.dx, () => ( 0));
5090
5093
  const dy = move.y !== void 0 ? move.y - m[5] : _nullishCoalesce(move.dy, () => ( 0));
5091
- if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("x and y must be numbers.");
5092
- _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "position", "move it");
5094
+ if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("x and y must be numbers.");
5095
+ _chunkJLGNZMUVcjs.requireUnlocked.call(void 0, layer, "position", "move it");
5093
5096
  const mx = Math.round(dx);
5094
5097
  const my = Math.round(dy);
5095
- let moved = { ..._chunkYAFS2QFZcjs.transformTypeLayer.call(void 0, layer, [1, 0, 0, 1, mx, my]), surface: _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, layer.surface, mx, my) };
5098
+ let moved = { ..._chunkJLGNZMUVcjs.transformTypeLayer.call(void 0, layer, [1, 0, 0, 1, mx, my]), surface: _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, layer.surface, mx, my) };
5096
5099
  const mask = layer.mask;
5097
5100
  if (mask && mask.linked !== false && !mask.source && (mx || my)) moved = { ...moved, mask: { ...mask, surface: _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, mask.surface, mx, my) } };
5098
5101
  this.commitLayers(_chunk24ATT2PEcjs.mapLayer.call(void 0, this.state.layers, id, () => moved), void 0, commitToHistory);
@@ -5102,7 +5105,7 @@ var ImageEditorController = (_class7 = class {
5102
5105
  const current = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
5103
5106
  const x = _nullishCoalesce(move.x, () => ( current.x + (_nullishCoalesce(move.dx, () => ( 0)))));
5104
5107
  const y = _nullishCoalesce(move.y, () => ( current.y + (_nullishCoalesce(move.dy, () => ( 0)))));
5105
- const next = _chunkYAFS2QFZcjs.offsetLayer.call(void 0, this.state.layers, id, { x, y });
5108
+ const next = _chunkJLGNZMUVcjs.offsetLayer.call(void 0, this.state.layers, id, { x, y });
5106
5109
  this.commitLayers(next, void 0, commitToHistory);
5107
5110
  return { offset: { x: Math.round(x), y: Math.round(y) }, bounds: this.getLayerBounds(id) };
5108
5111
  }
@@ -5112,11 +5115,11 @@ var ImageEditorController = (_class7 = class {
5112
5115
  * target when the layer is active.
5113
5116
  */
5114
5117
  addLayerMask(id, from = "reveal-all", props = {}) {
5115
- const layer = _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5118
+ const layer = _chunkJLGNZMUVcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5116
5119
  let mask;
5117
5120
  if (from === "selection") {
5118
5121
  const sel = this.state.selection;
5119
- if (!_optionalChain([sel, 'optionalAccess', _167 => _167.bounds])) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
5122
+ if (!_optionalChain([sel, 'optionalAccess', _167 => _167.bounds])) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
5120
5123
  mask = this.maskFromSelection(sel, props);
5121
5124
  if (layer.type === "pixel" && (layer.offset.x || layer.offset.y)) {
5122
5125
  mask = { ...mask, surface: _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, mask.surface, -layer.offset.x, -layer.offset.y) };
@@ -5125,7 +5128,7 @@ var ImageEditorController = (_class7 = class {
5125
5128
  const v = from === "reveal-all" ? 255 : 0;
5126
5129
  mask = withMaskProps({ surface: _chunkJ5BA3BQ6cjs.emptySurface.call(void 0, 1, v), defaultValue: v }, props);
5127
5130
  }
5128
- const next = _chunkYAFS2QFZcjs.setLayerMask.call(void 0, this.state.layers, id, mask);
5131
+ const next = _chunkJLGNZMUVcjs.setLayerMask.call(void 0, this.state.layers, id, mask);
5129
5132
  this.commitLayers(next, () => {
5130
5133
  if (this.state.activeLayerId === id) this.state.activeTarget = "mask";
5131
5134
  });
@@ -5133,18 +5136,18 @@ var ImageEditorController = (_class7 = class {
5133
5136
  }
5134
5137
  /** Removes a layer's mask (one undo step). */
5135
5138
  removeLayerMask(id) {
5136
- const layer = _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5137
- if (!layer.mask) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5138
- this.commitLayers(_chunkYAFS2QFZcjs.setLayerMask.call(void 0, this.state.layers, id, null), () => {
5139
+ const layer = _chunkJLGNZMUVcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5140
+ if (!layer.mask) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5141
+ this.commitLayers(_chunkJLGNZMUVcjs.setLayerMask.call(void 0, this.state.layers, id, null), () => {
5139
5142
  if (this.state.activeLayerId === id) this.state.activeTarget = "pixels";
5140
5143
  });
5141
5144
  }
5142
5145
  /** Changes any layer mask's density, feather, enabled or linked flag (pixels kept). Returns the mask. */
5143
5146
  setLayerMaskProps(id, props, commitToHistory = true) {
5144
- const layer = _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5145
- if (!layer.mask) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
5147
+ const layer = _chunkJLGNZMUVcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5148
+ if (!layer.mask) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
5146
5149
  const mask = withMaskProps(layer.mask, props);
5147
- this.commitLayers(_chunkYAFS2QFZcjs.setLayerMask.call(void 0, this.state.layers, id, mask), void 0, commitToHistory);
5150
+ this.commitLayers(_chunkJLGNZMUVcjs.setLayerMask.call(void 0, this.state.layers, id, mask), void 0, commitToHistory);
5148
5151
  return mask;
5149
5152
  }
5150
5153
  /**
@@ -5152,11 +5155,11 @@ var ImageEditorController = (_class7 = class {
5152
5155
  * the depth map) and removes the mask, as one undo step.
5153
5156
  */
5154
5157
  async applyLayerMask(id) {
5155
- const loc = _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id);
5158
+ const loc = _chunkJLGNZMUVcjs.requireLayer.call(void 0, this.state.layers, id);
5156
5159
  const layer = loc.layer;
5157
- if (layer.type !== "pixel") throw new (0, _chunkYAFS2QFZcjs.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.`);
5158
- if (!layer.mask) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5159
- _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "pixels", "apply its mask");
5160
+ if (layer.type !== "pixel") throw new (0, _chunkJLGNZMUVcjs.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.`);
5161
+ if (!layer.mask) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5162
+ _chunkJLGNZMUVcjs.requireUnlocked.call(void 0, layer, "pixels", "apply its mask");
5160
5163
  const { width, height } = this.naturalSize;
5161
5164
  await this.renderer.prepareLayerAssets([layer], width, height);
5162
5165
  const sources = this.renderer.compositorSources(width, height);
@@ -5189,13 +5192,13 @@ var ImageEditorController = (_class7 = class {
5189
5192
  */
5190
5193
  layerViaCopy(options = {}) {
5191
5194
  const id = _nullishCoalesce(options.layerId, () => ( this.state.activeLayerId));
5192
- if (!id) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("No layer given and none is active; pass layerId (see list_layers).");
5193
- const loc = _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id);
5195
+ if (!id) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("No layer given and none is active; pass layerId (see list_layers).");
5196
+ const loc = _chunkJLGNZMUVcjs.requireLayer.call(void 0, this.state.layers, id);
5194
5197
  const layer = loc.layer;
5195
- if (layer.type !== "pixel") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
5198
+ if (layer.type !== "pixel") throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
5196
5199
  const sel = this.state.selection;
5197
- if (!_optionalChain([sel, 'optionalAccess', _168 => _168.bounds])) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
5198
- if (options.cut) _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
5200
+ if (!_optionalChain([sel, 'optionalAccess', _168 => _168.bounds])) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
5201
+ if (options.cut) _chunkJLGNZMUVcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
5199
5202
  const surface = this.surfaceOf(layer);
5200
5203
  const sb = sel.bounds;
5201
5204
  const src = { x: sb.x - layer.offset.x, y: sb.y - layer.offset.y, width: sb.width, height: sb.height };
@@ -5211,7 +5214,7 @@ var ImageEditorController = (_class7 = class {
5211
5214
  }
5212
5215
  const copy = {
5213
5216
  type: "pixel",
5214
- id: _chunkYAFS2QFZcjs.newLayerId.call(void 0, ),
5217
+ id: _chunkJLGNZMUVcjs.newLayerId.call(void 0, ),
5215
5218
  name: _optionalChain([options, 'access', _169 => _169.name, 'optionalAccess', _170 => _170.trim, 'call', _171 => _171()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
5216
5219
  visible: true,
5217
5220
  opacity: 1,
@@ -5284,7 +5287,7 @@ var ImageEditorController = (_class7 = class {
5284
5287
  * Refused while another transform is open.
5285
5288
  */
5286
5289
  beginFreeTransform(init = {}) {
5287
- if (this.getFreeTransform()) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("A Free Transform is already open; commit or cancel it first.");
5290
+ if (this.getFreeTransform()) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("A Free Transform is already open; commit or cancel it first.");
5288
5291
  const session = new FreeTransformSession(this.transformHost(), init);
5289
5292
  this.openTransform = session;
5290
5293
  this.notify();
@@ -5298,26 +5301,26 @@ var ImageEditorController = (_class7 = class {
5298
5301
  */
5299
5302
  transformLayer(spec) {
5300
5303
  const given = [spec.matrix, spec.corners, spec.params].filter((v) => v !== void 0).length;
5301
- if (given > 1) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give only one of matrix, corners and params.");
5302
- if (!given && spec.warp === void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give matrix, corners or params (or a warp).");
5304
+ if (given > 1) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give only one of matrix, corners and params.");
5305
+ if (!given && spec.warp === void 0) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give matrix, corners or params (or a warp).");
5303
5306
  if (spec.matrix && !(Array.isArray(spec.matrix) && spec.matrix.length === 6 && spec.matrix.every(Number.isFinite))) {
5304
- throw new (0, _chunkYAFS2QFZcjs.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).");
5307
+ throw new (0, _chunkJLGNZMUVcjs.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).");
5305
5308
  }
5306
5309
  if (spec.matrix) {
5307
5310
  const [a, b, c, d] = spec.matrix;
5308
- if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("matrix is singular (it collapses the layer to a line); its determinant a\xB7d \u2212 b\xB7c must not be 0.");
5311
+ if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("matrix is singular (it collapses the layer to a line); its determinant a\xB7d \u2212 b\xB7c must not be 0.");
5309
5312
  }
5310
5313
  const session = this.beginFreeTransform(spec);
5311
5314
  try {
5312
5315
  const g = session.startGeometry;
5313
- const corners = spec.matrix ? g.corners.map((p) => _chunkZ2H7KECKcjs.applyMatrix.call(void 0, spec.matrix, p)) : spec.corners ? spec.corners : spec.params ? _chunkYAFS2QFZcjs.applyParams.call(void 0, g, spec.params) : g.corners;
5316
+ const corners = spec.matrix ? g.corners.map((p) => _chunk2R3UW57Ucjs.applyMatrix.call(void 0, spec.matrix, p)) : spec.corners ? spec.corners : spec.params ? _chunkJLGNZMUVcjs.applyParams.call(void 0, g, spec.params) : g.corners;
5314
5317
  let warp = spec.warp === void 0 ? _nullishCoalesce(g.warp, () => ( null)) : null;
5315
5318
  if (spec.warp) {
5316
5319
  if ("style" in spec.warp) {
5317
- if (!_chunkZ2H7KECKcjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkZ2H7KECKcjs.WARP_STYLES.join(", ")}.`);
5318
- warp = _chunkYAFS2QFZcjs.presetWarp.call(void 0, session.box, spec.warp);
5320
+ if (!_chunk2R3UW57Ucjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunk2R3UW57Ucjs.WARP_STYLES.join(", ")}.`);
5321
+ warp = _chunkJLGNZMUVcjs.presetWarp.call(void 0, session.box, spec.warp);
5319
5322
  } else {
5320
- if (!_chunkYAFS2QFZcjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkYAFS2QFZcjs.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.");
5323
+ if (!_chunkJLGNZMUVcjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkJLGNZMUVcjs.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.");
5321
5324
  warp = spec.warp;
5322
5325
  }
5323
5326
  }
@@ -5330,10 +5333,10 @@ var ImageEditorController = (_class7 = class {
5330
5333
  }
5331
5334
  /** Flips the layer (or its selected pixels, or the outline) about the frame's centre, exactly (one undo step). */
5332
5335
  flipLayer(axis, init = {}) {
5333
- if (axis !== "horizontal" && axis !== "vertical") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`axis must be horizontal or vertical, got "${String(axis)}".`);
5336
+ if (axis !== "horizontal" && axis !== "vertical") throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`axis must be horizontal or vertical, got "${String(axis)}".`);
5334
5337
  const session = this.beginFreeTransform({ interpolation: "nearest", ...init });
5335
5338
  try {
5336
- session.update({ corners: _chunkYAFS2QFZcjs.flipCorners.call(void 0, session.startGeometry, axis) }, false);
5339
+ session.update({ corners: _chunkJLGNZMUVcjs.flipCorners.call(void 0, session.startGeometry, axis) }, false);
5337
5340
  return session.commit();
5338
5341
  } catch (e) {
5339
5342
  session.cancel();
@@ -5345,16 +5348,16 @@ var ImageEditorController = (_class7 = class {
5345
5348
  * centre, snapped so pixels land on whole pixels: exact, no resampling (one undo step).
5346
5349
  */
5347
5350
  rotateLayer90(turn, init = {}) {
5348
- if (turn !== 90 && turn !== -90 && turn !== 180) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`turn must be 90, -90 or 180, got ${String(turn)}.`);
5351
+ if (turn !== 90 && turn !== -90 && turn !== 180) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`turn must be 90, -90 or 180, got ${String(turn)}.`);
5349
5352
  const session = this.beginFreeTransform({ interpolation: "nearest", ...init });
5350
5353
  try {
5351
- const b = session.smartObject || session.typeLayer ? _nullishCoalesce(_chunkYAFS2QFZcjs.transformedBox.call(void 0, session.startGeometry), () => ( session.box)) : session.box;
5354
+ const b = session.smartObject || session.typeLayer ? _nullishCoalesce(_chunkJLGNZMUVcjs.transformedBox.call(void 0, session.startGeometry), () => ( session.box)) : session.box;
5352
5355
  const cx = b.x + b.width / 2;
5353
5356
  const cy = b.y + b.height / 2;
5354
5357
  const ox = turn === 180 ? 0 : Math.round(cx - b.height / 2) - (cx - b.height / 2);
5355
5358
  const oy = turn === 180 ? 0 : Math.round(cy - b.width / 2) - (cy - b.width / 2);
5356
5359
  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];
5357
- session.update({ corners: session.startGeometry.corners.map((p) => _chunkZ2H7KECKcjs.applyMatrix.call(void 0, m, p)) }, false);
5360
+ session.update({ corners: session.startGeometry.corners.map((p) => _chunk2R3UW57Ucjs.applyMatrix.call(void 0, m, p)) }, false);
5358
5361
  return session.commit();
5359
5362
  } catch (e) {
5360
5363
  session.cancel();
@@ -5363,20 +5366,20 @@ var ImageEditorController = (_class7 = class {
5363
5366
  }
5364
5367
  /** Adds a `develop` or `blur` filter to a pixel layer (one undo step). Returns the layer's filters. */
5365
5368
  addLayerFilter(id, filter) {
5366
- const f = _chunkYAFS2QFZcjs.normalizeFilter.call(void 0, filter);
5367
- const next = _chunkYAFS2QFZcjs.addLayerFilter.call(void 0, this.state.layers, id, f);
5369
+ const f = _chunkJLGNZMUVcjs.normalizeFilter.call(void 0, filter);
5370
+ const next = _chunkJLGNZMUVcjs.addLayerFilter.call(void 0, this.state.layers, id, f);
5368
5371
  this.commitLayers(next);
5369
5372
  return _nullishCoalesce(_chunk24ATT2PEcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
5370
5373
  }
5371
5374
  /** Changes one filter (one undo step, or none with `commitToHistory = false` during a drag). Returns the filters. */
5372
5375
  updateLayerFilter(id, filterId, changes, commitToHistory = true) {
5373
- const next = _chunkYAFS2QFZcjs.updateLayerFilter.call(void 0, this.state.layers, id, filterId, changes);
5376
+ const next = _chunkJLGNZMUVcjs.updateLayerFilter.call(void 0, this.state.layers, id, filterId, changes);
5374
5377
  this.commitLayers(next, void 0, commitToHistory);
5375
5378
  return _nullishCoalesce(_chunk24ATT2PEcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
5376
5379
  }
5377
5380
  /** Removes one filter (one undo step). Returns the remaining filters. */
5378
5381
  removeLayerFilter(id, filterId) {
5379
- const next = _chunkYAFS2QFZcjs.removeLayerFilter.call(void 0, this.state.layers, id, filterId);
5382
+ const next = _chunkJLGNZMUVcjs.removeLayerFilter.call(void 0, this.state.layers, id, filterId);
5380
5383
  this.commitLayers(next);
5381
5384
  return _nullishCoalesce(_chunk24ATT2PEcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
5382
5385
  }
@@ -5392,8 +5395,8 @@ var ImageEditorController = (_class7 = class {
5392
5395
  */
5393
5396
  convertToSmartObject(ids, options = {}) {
5394
5397
  const list = _optionalChain([ids, 'optionalAccess', _177 => _177.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
5395
- if (!list.length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
5396
- const res = _chunkYAFS2QFZcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
5398
+ if (!list.length) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
5399
+ const res = _chunkJLGNZMUVcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
5397
5400
  this.commitLayers(res.layers, () => {
5398
5401
  this.state.activeLayerId = res.layer.id;
5399
5402
  this.state.activeTarget = "pixels";
@@ -5402,7 +5405,7 @@ var ImageEditorController = (_class7 = class {
5402
5405
  }
5403
5406
  /** Layer › Smart Objects › Rasterize (one undo step): the smart object becomes a pixel layer holding what it renders. */
5404
5407
  rasterizeSmartObject(id) {
5405
- const res = _chunkYAFS2QFZcjs.rasterizeSmartObject.call(void 0, this.state.layers, id);
5408
+ const res = _chunkJLGNZMUVcjs.rasterizeSmartObject.call(void 0, this.state.layers, id);
5406
5409
  this.commitLayers(res.layers, () => {
5407
5410
  if (this.state.activeLayerId === id && this.state.activeTarget === "filter-mask") this.state.activeTarget = "pixels";
5408
5411
  });
@@ -5410,10 +5413,10 @@ var ImageEditorController = (_class7 = class {
5410
5413
  }
5411
5414
  /** A smart object's contents, placement and smart filters as plain data (see `SmartObjectInfo`). */
5412
5415
  getSmartObject(id) {
5413
- const layer = _chunkYAFS2QFZcjs.requireSmartObject.call(void 0, this.state.layers, id);
5416
+ const layer = _chunkJLGNZMUVcjs.requireSmartObject.call(void 0, this.state.layers, id);
5414
5417
  const c = layer.contents;
5415
- const g = _chunkYAFS2QFZcjs.placementGeometry.call(void 0, layer);
5416
- const readout = _chunkYAFS2QFZcjs.describeTransform.call(void 0, g);
5418
+ const g = _chunkJLGNZMUVcjs.placementGeometry.call(void 0, layer);
5419
+ const readout = _chunkJLGNZMUVcjs.describeTransform.call(void 0, g);
5417
5420
  const stack = layer.smartFilters;
5418
5421
  return {
5419
5422
  layerId: layer.id,
@@ -5423,10 +5426,10 @@ var ImageEditorController = (_class7 = class {
5423
5426
  kind: c.kind,
5424
5427
  width: c.width,
5425
5428
  height: c.height,
5426
- decoded: _chunkYAFS2QFZcjs.isContentsDecoded.call(void 0, c),
5429
+ decoded: _chunkJLGNZMUVcjs.isContentsDecoded.call(void 0, c),
5427
5430
  fileType: _nullishCoalesce(_optionalChain([c, 'access', _178 => _178.file, 'optionalAccess', _179 => _179.type]), () => ( null)),
5428
5431
  linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _180 => _180.linked, 'optionalAccess', _181 => _181.path]), () => ( null)),
5429
- instances: _chunkYAFS2QFZcjs.instancesOf.call(void 0, this.state.layers, c.id),
5432
+ instances: _chunkJLGNZMUVcjs.instancesOf.call(void 0, this.state.layers, c.id),
5430
5433
  layerCount: c.document ? _chunk24ATT2PEcjs.flattenLayers.call(void 0, c.document.layers).length : 0
5431
5434
  },
5432
5435
  placement: {
@@ -5438,8 +5441,8 @@ var ImageEditorController = (_class7 = class {
5438
5441
  scaleY: readout.scaleY,
5439
5442
  rotate: readout.rotate,
5440
5443
  skewX: readout.skewX,
5441
- center: _chunkYAFS2QFZcjs.anchorPoint.call(void 0, g, "center"),
5442
- bounds: _chunkYAFS2QFZcjs.transformedBox.call(void 0, g)
5444
+ center: _chunkJLGNZMUVcjs.anchorPoint.call(void 0, g, "center"),
5445
+ bounds: _chunkJLGNZMUVcjs.transformedBox.call(void 0, g)
5443
5446
  },
5444
5447
  smartFilters: {
5445
5448
  enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _182 => _182.enabled]), () => ( true)),
@@ -5456,7 +5459,7 @@ var ImageEditorController = (_class7 = class {
5456
5459
  * change. Returns the new placement summary.
5457
5460
  */
5458
5461
  setSmartObjectPlacement(id, placement, commitToHistory = true) {
5459
- const res = _chunkYAFS2QFZcjs.setSmartPlacement.call(void 0, this.state.layers, id, placement, this.canvasSize);
5462
+ const res = _chunkJLGNZMUVcjs.setSmartPlacement.call(void 0, this.state.layers, id, placement, this.canvasSize);
5460
5463
  this.commitLayers(res.layers, void 0, commitToHistory);
5461
5464
  return { ...this.getSmartObject(id).placement, masksMoved: res.masksMoved };
5462
5465
  }
@@ -5469,23 +5472,23 @@ var ImageEditorController = (_class7 = class {
5469
5472
  * nothing is relative to the current transform.
5470
5473
  */
5471
5474
  setSmartObjectTransform(id, spec) {
5472
- const layer = _chunkYAFS2QFZcjs.requireSmartObject.call(void 0, this.state.layers, id);
5473
- const g = _chunkYAFS2QFZcjs.placementGeometry.call(void 0, layer);
5475
+ const layer = _chunkJLGNZMUVcjs.requireSmartObject.call(void 0, this.state.layers, id);
5476
+ const g = _chunkJLGNZMUVcjs.placementGeometry.call(void 0, layer);
5474
5477
  const numeric = ["scaleX", "scaleY", "rotate", "skewX", "skewY", "x", "y"].filter((k) => spec[k] !== void 0);
5475
5478
  const ways = [spec.corners !== void 0, spec.matrix !== void 0, numeric.length > 0].filter(Boolean).length;
5476
- if (ways > 1) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give the transform only one way: corners, matrix, or the numbers (scaleX, scaleY, rotate, skewX, skewY, x, y).");
5479
+ if (ways > 1) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give the transform only one way: corners, matrix, or the numbers (scaleX, scaleY, rotate, skewX, skewY, x, y).");
5477
5480
  let corners = g.corners;
5478
5481
  if (spec.corners) corners = spec.corners;
5479
5482
  else if (spec.matrix) {
5480
- if (!(Array.isArray(spec.matrix) && spec.matrix.length === 6 && spec.matrix.every(Number.isFinite))) throw new (0, _chunkYAFS2QFZcjs.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).");
5483
+ if (!(Array.isArray(spec.matrix) && spec.matrix.length === 6 && spec.matrix.every(Number.isFinite))) throw new (0, _chunkJLGNZMUVcjs.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).");
5481
5484
  const [a, b, c, d] = spec.matrix;
5482
- if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("matrix is singular (it collapses the contents to a line); a\xB7d \u2212 b\xB7c must not be 0.");
5483
- corners = _chunkYAFS2QFZcjs.cornersFromMatrix.call(void 0, g.box, spec.matrix);
5485
+ if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("matrix is singular (it collapses the contents to a line); a\xB7d \u2212 b\xB7c must not be 0.");
5486
+ corners = _chunkJLGNZMUVcjs.cornersFromMatrix.call(void 0, g.box, spec.matrix);
5484
5487
  } else if (numeric.length) {
5485
- if (spec.scaleX === 0 || spec.scaleY === 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the contents to a line).");
5486
- for (const k of numeric) if (!Number.isFinite(spec[k])) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`${k} must be a finite number.`);
5487
- const now = _chunkYAFS2QFZcjs.describeTransform.call(void 0, g);
5488
- const centre = _chunkYAFS2QFZcjs.anchorPoint.call(void 0, g, "center");
5488
+ if (spec.scaleX === 0 || spec.scaleY === 0) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the contents to a line).");
5489
+ for (const k of numeric) if (!Number.isFinite(spec[k])) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`${k} must be a finite number.`);
5490
+ const now = _chunkJLGNZMUVcjs.describeTransform.call(void 0, g);
5491
+ const centre = _chunkJLGNZMUVcjs.anchorPoint.call(void 0, g, "center");
5489
5492
  const params = {
5490
5493
  scaleX: _nullishCoalesce(spec.scaleX, () => ( (now.affine ? now.scaleX : 100))),
5491
5494
  scaleY: _nullishCoalesce(spec.scaleY, () => ( (now.affine ? now.scaleY : 100))),
@@ -5493,20 +5496,20 @@ var ImageEditorController = (_class7 = class {
5493
5496
  skewX: _nullishCoalesce(spec.skewX, () => ( (now.affine ? now.skewX : 0))),
5494
5497
  skewY: _nullishCoalesce(spec.skewY, () => ( 0))
5495
5498
  };
5496
- const m = _chunkYAFS2QFZcjs.matrixFromParams.call(void 0, g.box, { ...params, reference: "center" });
5499
+ const m = _chunkJLGNZMUVcjs.matrixFromParams.call(void 0, g.box, { ...params, reference: "center" });
5497
5500
  const cx = g.box.width / 2;
5498
5501
  const cy = g.box.height / 2;
5499
5502
  const to = { x: _nullishCoalesce(spec.x, () => ( centre.x)), y: _nullishCoalesce(spec.y, () => ( centre.y)) };
5500
- corners = _chunkYAFS2QFZcjs.cornersFromMatrix.call(void 0, g.box, _chunkZ2H7KECKcjs.multiplyMatrices.call(void 0, m, _chunkZ2H7KECKcjs.translateMatrix.call(void 0, to.x - cx, to.y - cy)));
5503
+ corners = _chunkJLGNZMUVcjs.cornersFromMatrix.call(void 0, g.box, _chunk2R3UW57Ucjs.multiplyMatrices.call(void 0, m, _chunk2R3UW57Ucjs.translateMatrix.call(void 0, to.x - cx, to.y - cy)));
5501
5504
  }
5502
5505
  let warp = _nullishCoalesce(layer.placement.warp, () => ( null));
5503
5506
  if (spec.warp === null) warp = null;
5504
5507
  else if (spec.warp) {
5505
5508
  if ("style" in spec.warp) {
5506
- if (!_chunkZ2H7KECKcjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkZ2H7KECKcjs.WARP_STYLES.join(", ")}.`);
5507
- warp = _chunkYAFS2QFZcjs.presetWarp.call(void 0, g.box, spec.warp);
5509
+ if (!_chunk2R3UW57Ucjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunk2R3UW57Ucjs.WARP_STYLES.join(", ")}.`);
5510
+ warp = _chunkJLGNZMUVcjs.presetWarp.call(void 0, g.box, spec.warp);
5508
5511
  } else {
5509
- if (!_chunkYAFS2QFZcjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkYAFS2QFZcjs.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.");
5512
+ if (!_chunkJLGNZMUVcjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkJLGNZMUVcjs.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.");
5510
5513
  warp = spec.warp;
5511
5514
  }
5512
5515
  }
@@ -5520,16 +5523,16 @@ var ImageEditorController = (_class7 = class {
5520
5523
  * the layers that changed.
5521
5524
  */
5522
5525
  replaceSmartObjectContents(id, source) {
5523
- const layer = _chunkYAFS2QFZcjs.requireSmartObject.call(void 0, this.state.layers, id);
5526
+ const layer = _chunkJLGNZMUVcjs.requireSmartObject.call(void 0, this.state.layers, id);
5524
5527
  let contents;
5525
5528
  if ("contents" in source) contents = source.contents;
5526
- else if ("pixels" in source) contents = _chunkYAFS2QFZcjs.rasterContents.call(void 0, source.pixels, _nullishCoalesce(source.name, () => ( layer.contents.name.replace(/\.\w+$/, ".png"))));
5529
+ else if ("pixels" in source) contents = _chunkJLGNZMUVcjs.rasterContents.call(void 0, source.pixels, _nullishCoalesce(source.name, () => ( layer.contents.name.replace(/\.\w+$/, ".png"))));
5527
5530
  else {
5528
- const psd = _chunkYAFS2QFZcjs.importPsd.call(void 0, source.psd, { newId: () => _chunkYAFS2QFZcjs.newLayerId.call(void 0, ) });
5529
- contents = _chunkYAFS2QFZcjs.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`)));
5531
+ const psd = _chunkJLGNZMUVcjs.importPsd.call(void 0, source.psd, { newId: () => _chunkJLGNZMUVcjs.newLayerId.call(void 0, ) });
5532
+ contents = _chunkJLGNZMUVcjs.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`)));
5530
5533
  contents.file = { bytes: source.psd.slice(), type: psd.info.psb ? "psb" : "psd" };
5531
5534
  }
5532
- const res = _chunkYAFS2QFZcjs.replaceContents.call(void 0, this.state.layers, layer.contents.id, contents, this.canvasSize);
5535
+ const res = _chunkJLGNZMUVcjs.replaceContents.call(void 0, this.state.layers, layer.contents.id, contents, this.canvasSize);
5533
5536
  this.commitLayers(res.layers);
5534
5537
  return { contentsId: layer.contents.id, width: contents.width, height: contents.height, layerIds: res.ids };
5535
5538
  }
@@ -5544,16 +5547,16 @@ var ImageEditorController = (_class7 = class {
5544
5547
  * and bytes.
5545
5548
  */
5546
5549
  exportSmartObjectContents(id) {
5547
- const layer = _chunkYAFS2QFZcjs.requireSmartObject.call(void 0, this.state.layers, id);
5550
+ const layer = _chunkJLGNZMUVcjs.requireSmartObject.call(void 0, this.state.layers, id);
5548
5551
  const c = layer.contents;
5549
5552
  const base = c.name.replace(/\.\w+$/, "") || "Contents";
5550
5553
  if (c.file) {
5551
- const mime = { psd: "image/vnd.adobe.photoshop", psb: "image/vnd.adobe.photoshop", pdf: "application/pdf", ..._chunkYAFS2QFZcjs.BROWSER_IMAGE_TYPES };
5554
+ const mime = { psd: "image/vnd.adobe.photoshop", psb: "image/vnd.adobe.photoshop", pdf: "application/pdf", ..._chunkJLGNZMUVcjs.BROWSER_IMAGE_TYPES };
5552
5555
  const ext = c.file.type.toLowerCase();
5553
5556
  return { name: /\.\w+$/.test(c.name) ? c.name : `${base}.${ext}`, mimeType: _nullishCoalesce(mime[ext], () => ( "application/octet-stream")), bytes: c.file.bytes };
5554
5557
  }
5555
- if (!_chunkYAFS2QFZcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`The contents of "${layer.name || id}" are not available here.`);
5556
- const f = _chunkYAFS2QFZcjs.smartContentsFile.call(void 0, c);
5558
+ if (!_chunkJLGNZMUVcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`The contents of "${layer.name || id}" are not available here.`);
5559
+ const f = _chunkJLGNZMUVcjs.smartContentsFile.call(void 0, c);
5557
5560
  return { name: f.name, mimeType: f.name.endsWith(".png") ? "image/png" : "image/vnd.adobe.photoshop", bytes: f.bytes };
5558
5561
  }
5559
5562
  /**
@@ -5562,7 +5565,7 @@ var ImageEditorController = (_class7 = class {
5562
5565
  * undo step. Returns the copy's id.
5563
5566
  */
5564
5567
  copySmartObject(id, linked = false, name) {
5565
- const res = _chunkYAFS2QFZcjs.copySmartObject.call(void 0, this.state.layers, id, linked, name);
5568
+ const res = _chunkJLGNZMUVcjs.copySmartObject.call(void 0, this.state.layers, id, linked, name);
5566
5569
  this.commitLayers(res.layers, () => {
5567
5570
  this.state.activeLayerId = res.layer.id;
5568
5571
  this.state.activeTarget = "pixels";
@@ -5571,31 +5574,31 @@ var ImageEditorController = (_class7 = class {
5571
5574
  }
5572
5575
  /** Adds a smart filter (`develop` or `blur`, with `blend` and `opacity`) at `index` (default the top), as one undo step. */
5573
5576
  addSmartFilter(id, filter, index) {
5574
- const res = _chunkYAFS2QFZcjs.addSmartFilter.call(void 0, this.state.layers, id, _chunkYAFS2QFZcjs.normalizeSmartFilter.call(void 0, filter), this.canvasSize, index);
5577
+ const res = _chunkJLGNZMUVcjs.addSmartFilter.call(void 0, this.state.layers, id, _chunkJLGNZMUVcjs.normalizeSmartFilter.call(void 0, filter), this.canvasSize, index);
5575
5578
  this.commitLayers(res.layers);
5576
5579
  return res.filter;
5577
5580
  }
5578
5581
  /** Changes one smart filter (one undo step, or none with `commitToHistory = false` during a drag). */
5579
5582
  updateSmartFilter(id, filterId, changes, commitToHistory = true) {
5580
- const res = _chunkYAFS2QFZcjs.updateSmartFilter.call(void 0, this.state.layers, id, filterId, changes, this.canvasSize);
5583
+ const res = _chunkJLGNZMUVcjs.updateSmartFilter.call(void 0, this.state.layers, id, filterId, changes, this.canvasSize);
5581
5584
  this.commitLayers(res.layers, void 0, commitToHistory);
5582
5585
  return res.filter;
5583
5586
  }
5584
5587
  /** Removes one smart filter (one undo step). Returns the remaining filters. */
5585
5588
  removeSmartFilter(id, filterId) {
5586
- const res = _chunkYAFS2QFZcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
5589
+ const res = _chunkJLGNZMUVcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
5587
5590
  this.commitLayers(res.layers);
5588
5591
  return _nullishCoalesce(_optionalChain([res, 'access', _185 => _185.layer, 'access', _186 => _186.smartFilters, 'optionalAccess', _187 => _187.filters]), () => ( []));
5589
5592
  }
5590
5593
  /** Moves one smart filter to `index` (0 = bottom, applied first), as one undo step. Returns the filters. */
5591
5594
  moveSmartFilter(id, filterId, index) {
5592
- const res = _chunkYAFS2QFZcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
5595
+ const res = _chunkJLGNZMUVcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
5593
5596
  this.commitLayers(res.layers);
5594
5597
  return _nullishCoalesce(_optionalChain([res, 'access', _188 => _188.layer, 'access', _189 => _189.smartFilters, 'optionalAccess', _190 => _190.filters]), () => ( []));
5595
5598
  }
5596
5599
  /** Turns a smart object's whole filter stack on or off (one undo step). */
5597
5600
  setSmartFiltersEnabled(id, enabled) {
5598
- const res = _chunkYAFS2QFZcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
5601
+ const res = _chunkJLGNZMUVcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
5599
5602
  this.commitLayers(res.layers);
5600
5603
  return _nullishCoalesce(_optionalChain([res, 'access', _191 => _191.layer, 'access', _192 => _192.smartFilters, 'optionalAccess', _193 => _193.enabled]), () => ( true));
5601
5604
  }
@@ -5605,21 +5608,21 @@ var ImageEditorController = (_class7 = class {
5605
5608
  * Painting it targets channel `filter-mask`. Returns the mask, or `null` when removed.
5606
5609
  */
5607
5610
  setSmartFilterMask(id, from, props = {}, commitToHistory = true) {
5608
- const layer = _chunkYAFS2QFZcjs.requireSmartObject.call(void 0, this.state.layers, id);
5611
+ const layer = _chunkJLGNZMUVcjs.requireSmartObject.call(void 0, this.state.layers, id);
5609
5612
  let mask;
5610
5613
  if (from === "none") mask = null;
5611
5614
  else if (from === "keep") {
5612
- if (!_optionalChain([layer, 'access', _194 => _194.smartFilters, 'optionalAccess', _195 => _195.mask])) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
5615
+ if (!_optionalChain([layer, 'access', _194 => _194.smartFilters, 'optionalAccess', _195 => _195.mask])) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
5613
5616
  mask = withMaskProps(layer.smartFilters.mask, props);
5614
5617
  } else if (from === "selection") {
5615
5618
  const sel = this.state.selection;
5616
- if (!_optionalChain([sel, 'optionalAccess', _196 => _196.bounds])) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
5619
+ if (!_optionalChain([sel, 'optionalAccess', _196 => _196.bounds])) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
5617
5620
  mask = this.maskFromSelection(sel, props);
5618
5621
  } else {
5619
5622
  const v = from === "reveal-all" ? 255 : 0;
5620
5623
  mask = withMaskProps({ surface: _chunkJ5BA3BQ6cjs.emptySurface.call(void 0, 1, v), defaultValue: v }, props);
5621
5624
  }
5622
- const res = _chunkYAFS2QFZcjs.setSmartFilterMask.call(void 0, this.state.layers, id, mask, this.canvasSize);
5625
+ const res = _chunkJLGNZMUVcjs.setSmartFilterMask.call(void 0, this.state.layers, id, mask, this.canvasSize);
5623
5626
  this.commitLayers(res.layers, () => {
5624
5627
  if (this.state.activeLayerId !== id) return;
5625
5628
  if (mask && from !== "keep") this.state.activeTarget = "filter-mask";
@@ -5635,14 +5638,14 @@ var ImageEditorController = (_class7 = class {
5635
5638
  async prepareSmartObjects() {
5636
5639
  const pending = /* @__PURE__ */ new Map();
5637
5640
  for (const l of _chunk24ATT2PEcjs.flattenLayers.call(void 0, this.state.layers)) {
5638
- if (l.type === "smart" && !_chunkYAFS2QFZcjs.isContentsDecoded.call(void 0, l.contents) && l.contents.file && _chunkYAFS2QFZcjs.BROWSER_IMAGE_TYPES[l.contents.file.type]) pending.set(l.contents.id, l.contents);
5641
+ if (l.type === "smart" && !_chunkJLGNZMUVcjs.isContentsDecoded.call(void 0, l.contents) && l.contents.file && _chunkJLGNZMUVcjs.BROWSER_IMAGE_TYPES[l.contents.file.type]) pending.set(l.contents.id, l.contents);
5639
5642
  }
5640
5643
  const left = [];
5641
5644
  for (const [cid, c] of pending) {
5642
5645
  try {
5643
- const url = `data:${_chunkYAFS2QFZcjs.BROWSER_IMAGE_TYPES[c.file.type]};base64,${_chunkDCLJNVZScjs.bytesToBase64.call(void 0, c.file.bytes)}`;
5646
+ const url = `data:${_chunkJLGNZMUVcjs.BROWSER_IMAGE_TYPES[c.file.type]};base64,${_chunkDCLJNVZScjs.bytesToBase64.call(void 0, c.file.bytes)}`;
5644
5647
  const px2 = await this.decodeImage(url);
5645
- const decoded = { ...c, kind: "raster", raster: _chunkYAFS2QFZcjs.rasterContents.call(void 0, px2, c.name, cid).raster, width: px2.width, height: px2.height };
5648
+ const decoded = { ...c, kind: "raster", raster: _chunkJLGNZMUVcjs.rasterContents.call(void 0, px2, c.name, cid).raster, width: px2.width, height: px2.height };
5646
5649
  const swap = (layers) => {
5647
5650
  let out = layers;
5648
5651
  for (const l of _chunk24ATT2PEcjs.flattenLayers.call(void 0, layers)) if (l.type === "smart" && l.contents.id === cid) out = _chunk24ATT2PEcjs.mapLayer.call(void 0, out, l.id, (x) => ({ ...x, contents: decoded }));
@@ -5670,10 +5673,10 @@ var ImageEditorController = (_class7 = class {
5670
5673
  * Contents can nest. Returns the contents' size and layer ids.
5671
5674
  */
5672
5675
  editSmartObjectContents(id) {
5673
- if (this.getFreeTransform()) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
5674
- const layer = _chunkYAFS2QFZcjs.requireSmartObject.call(void 0, this.state.layers, id);
5676
+ if (this.getFreeTransform()) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
5677
+ const layer = _chunkJLGNZMUVcjs.requireSmartObject.call(void 0, this.state.layers, id);
5675
5678
  const c = layer.contents;
5676
- if (!_chunkYAFS2QFZcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkYAFS2QFZcjs.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.`);
5679
+ if (!_chunkJLGNZMUVcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkJLGNZMUVcjs.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.`);
5677
5680
  const saved = {
5678
5681
  state: { ...this.state },
5679
5682
  undo: this.undoStack,
@@ -5684,7 +5687,7 @@ var ImageEditorController = (_class7 = class {
5684
5687
  samplePixelsOverride: this.samplePixelsOverride,
5685
5688
  psdResolution: this.psdResolution
5686
5689
  };
5687
- const layers = c.kind === "document" ? c.document.layers : [{ type: "pixel", id: _chunkYAFS2QFZcjs.newLayerId.call(void 0, ), name: "Layer 0", visible: true, opacity: 1, blend: "normal", surface: c.raster, offset: { x: 0, y: 0 } }];
5690
+ const layers = c.kind === "document" ? c.document.layers : [{ type: "pixel", id: _chunkJLGNZMUVcjs.newLayerId.call(void 0, ), name: "Layer 0", visible: true, opacity: 1, blend: "normal", surface: c.raster, offset: { x: 0, y: 0 } }];
5688
5691
  this.contentsStack.push({ layerId: layer.id, contentsId: c.id, name: layer.name || c.name, saved });
5689
5692
  const s = this.state;
5690
5693
  this.state = {
@@ -5692,7 +5695,7 @@ var ImageEditorController = (_class7 = class {
5692
5695
  sourceUrl: null,
5693
5696
  imageDimensions: { width: c.width, height: c.height },
5694
5697
  crop: null,
5695
- transform: { ..._chunkYAFS2QFZcjs.DEFAULT_TRANSFORM_VALUES },
5698
+ transform: { ..._chunkJLGNZMUVcjs.DEFAULT_TRANSFORM_VALUES },
5696
5699
  layers,
5697
5700
  activeLayerId: layers.length ? layers[layers.length - 1].id : null,
5698
5701
  activeTarget: "pixels",
@@ -5725,7 +5728,7 @@ var ImageEditorController = (_class7 = class {
5725
5728
  */
5726
5729
  closeSmartObjectContents(save = true) {
5727
5730
  const top = this.contentsStack.pop();
5728
- if (!top) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
5731
+ if (!top) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
5729
5732
  if (_optionalChain([this, 'access', _207 => _207.openTransform, 'optionalAccess', _208 => _208.isOpen])) this.openTransform.cancel();
5730
5733
  this.openTransform = null;
5731
5734
  const edited = this.state;
@@ -5739,10 +5742,10 @@ var ImageEditorController = (_class7 = class {
5739
5742
  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";
5740
5743
  if (_optionalChain([old, 'optionalAccess', _214 => _214.kind]) === "raster" && plain3) {
5741
5744
  const px2 = _chunkJ5BA3BQ6cjs.readRegion.call(void 0, only.surface, { x: -only.offset.x, y: -only.offset.y, width, height });
5742
- next = _chunkYAFS2QFZcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
5745
+ next = _chunkJLGNZMUVcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
5743
5746
  } else {
5744
5747
  const doc = { layers: edited.layers, globalLight: edited.globalLight, patterns: edited.patterns };
5745
- next = _chunkYAFS2QFZcjs.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);
5748
+ next = _chunkJLGNZMUVcjs.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);
5746
5749
  }
5747
5750
  }
5748
5751
  const saved = top.saved;
@@ -5761,7 +5764,7 @@ var ImageEditorController = (_class7 = class {
5761
5764
  this.notify();
5762
5765
  return { layerId: top.layerId, changed: false, layerIds: [] };
5763
5766
  }
5764
- const res = _chunkYAFS2QFZcjs.replaceContents.call(void 0, this.state.layers, top.contentsId, next, this.canvasSize);
5767
+ const res = _chunkJLGNZMUVcjs.replaceContents.call(void 0, this.state.layers, top.contentsId, next, this.canvasSize);
5765
5768
  this.commitLayers(res.layers);
5766
5769
  return { layerId: top.layerId, changed: true, layerIds: res.ids };
5767
5770
  }
@@ -5776,35 +5779,35 @@ var ImageEditorController = (_class7 = class {
5776
5779
  // --- Layer effects ---
5777
5780
  /** A layer's effects (an empty, enabled list when it has none). */
5778
5781
  getLayerEffects(id) {
5779
- return _chunkYAFS2QFZcjs.layerEffectsOf.call(void 0, _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id).layer);
5782
+ return _chunkJLGNZMUVcjs.layerEffectsOf.call(void 0, _chunkJLGNZMUVcjs.requireLayer.call(void 0, this.state.layers, id).layer);
5780
5783
  }
5781
5784
  /**
5782
5785
  * Adds an effect of `kind` with Photoshop's defaults and `params` applied (one undo step), at
5783
5786
  * `index` in the layer's effect list (default the end). Returns the new effect and the effects.
5784
5787
  */
5785
5788
  addLayerEffect(id, kind, params = {}, index) {
5786
- const res = _chunkYAFS2QFZcjs.addLayerEffect.call(void 0, this.state.layers, id, kind, params, index);
5789
+ const res = _chunkJLGNZMUVcjs.addLayerEffect.call(void 0, this.state.layers, id, kind, params, index);
5787
5790
  this.commitLayers(res.layers);
5788
5791
  return { effect: res.effect, effects: this.getLayerEffects(id) };
5789
5792
  }
5790
5793
  /** Changes one effect (one undo step, or none with `commitToHistory = false` during a drag). Returns the effects. */
5791
5794
  updateLayerEffect(id, effectId, changes, commitToHistory = true) {
5792
- this.commitLayers(_chunkYAFS2QFZcjs.updateLayerEffect.call(void 0, this.state.layers, id, effectId, changes), void 0, commitToHistory);
5795
+ this.commitLayers(_chunkJLGNZMUVcjs.updateLayerEffect.call(void 0, this.state.layers, id, effectId, changes), void 0, commitToHistory);
5793
5796
  return this.getLayerEffects(id);
5794
5797
  }
5795
5798
  /** Removes one effect (one undo step). Returns the remaining effects. */
5796
5799
  removeLayerEffect(id, effectId) {
5797
- this.commitLayers(_chunkYAFS2QFZcjs.removeLayerEffect.call(void 0, this.state.layers, id, effectId));
5800
+ this.commitLayers(_chunkJLGNZMUVcjs.removeLayerEffect.call(void 0, this.state.layers, id, effectId));
5798
5801
  return this.getLayerEffects(id);
5799
5802
  }
5800
5803
  /** Turns a layer's effects on or off as a whole and, when given, sets Scale Effects (one undo step). */
5801
5804
  setLayerEffectsEnabled(id, enabled, scale, commitToHistory = true) {
5802
- this.commitLayers(_chunkYAFS2QFZcjs.setLayerEffectsEnabled.call(void 0, this.state.layers, id, enabled, scale), void 0, commitToHistory);
5805
+ this.commitLayers(_chunkJLGNZMUVcjs.setLayerEffectsEnabled.call(void 0, this.state.layers, id, enabled, scale), void 0, commitToHistory);
5803
5806
  return this.getLayerEffects(id);
5804
5807
  }
5805
5808
  /** Replaces a layer's effects (one undo step; `null` removes them). Returns the effects. */
5806
5809
  setLayerEffects(id, effects, commitToHistory = true) {
5807
- this.commitLayers(_chunkYAFS2QFZcjs.setLayerEffects.call(void 0, this.state.layers, id, effects), void 0, commitToHistory);
5810
+ this.commitLayers(_chunkJLGNZMUVcjs.setLayerEffects.call(void 0, this.state.layers, id, effects), void 0, commitToHistory);
5808
5811
  return this.getLayerEffects(id);
5809
5812
  }
5810
5813
  __init76() {this.patternIds = /* @__PURE__ */ new WeakMap()}
@@ -5830,8 +5833,8 @@ var ImageEditorController = (_class7 = class {
5830
5833
  /** Sets the global light (one undo step). `angle` -360..360°, `altitude` 0..90°. Returns it. */
5831
5834
  setGlobalLight(light, commitToHistory = true) {
5832
5835
  const next = { ...this.getGlobalLight(), ...light };
5833
- if (!(Number.isFinite(next.angle) && next.angle >= -360 && next.angle <= 360)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`angle must be from -360 to 360 degrees, got ${next.angle}.`);
5834
- if (!(Number.isFinite(next.altitude) && next.altitude >= 0 && next.altitude <= 90)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`altitude must be from 0 to 90 degrees, got ${next.altitude}.`);
5836
+ if (!(Number.isFinite(next.angle) && next.angle >= -360 && next.angle <= 360)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`angle must be from -360 to 360 degrees, got ${next.angle}.`);
5837
+ if (!(Number.isFinite(next.altitude) && next.altitude >= 0 && next.altitude <= 90)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`altitude must be from 0 to 90 degrees, got ${next.altitude}.`);
5835
5838
  if (commitToHistory) this.recordHistory();
5836
5839
  if (next.angle === _chunk24ATT2PEcjs.DEFAULT_GLOBAL_LIGHT.angle && next.altitude === _chunk24ATT2PEcjs.DEFAULT_GLOBAL_LIGHT.altitude) delete this.state.globalLight;
5837
5840
  else this.state.globalLight = next;
@@ -5842,16 +5845,16 @@ var ImageEditorController = (_class7 = class {
5842
5845
  async compositeToSurface(layers, rect) {
5843
5846
  const { width, height } = this.naturalSize;
5844
5847
  if (_chunk24ATT2PEcjs.flattenLayers.call(void 0, layers).some((l) => l.type === "annotation" && l.visible) && !this.renderer.canRasterize()) {
5845
- throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Merging annotation layers needs a canvas (a browser); hide or delete them first, or merge in the browser.");
5848
+ throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Merging annotation layers needs a canvas (a browser); hide or delete them first, or merge in the browser.");
5846
5849
  }
5847
5850
  await this.renderer.prepareLayerAssets(layers, width, height);
5848
5851
  const sources = this.renderer.compositorSources(width, height);
5849
5852
  const depth = this.bitDepth;
5850
5853
  if (depth !== 8) {
5851
- const samples = _chunk24ATT2PEcjs.workingToSamples.call(void 0, _chunkYAFS2QFZcjs.compositeDeep.call(void 0, layers, rect, sources, depth), depth);
5854
+ const samples = _chunk24ATT2PEcjs.workingToSamples.call(void 0, _chunkJLGNZMUVcjs.compositeDeep.call(void 0, layers, rect, sources, depth), depth);
5852
5855
  return _chunkJ5BA3BQ6cjs.surfaceFromDeepPixels.call(void 0, { width: rect.width, height: rect.height, data: samples }, 4, rect.x, rect.y);
5853
5856
  }
5854
- const data = new (0, _chunkYAFS2QFZcjs.LayerCompositor)().composite(layers, rect, sources);
5857
+ const data = new (0, _chunkJLGNZMUVcjs.LayerCompositor)().composite(layers, rect, sources);
5855
5858
  return _chunkJ5BA3BQ6cjs.surfaceFromPixels.call(void 0, { width: rect.width, height: rect.height, data }, 4, rect.x, rect.y);
5856
5859
  }
5857
5860
  /**
@@ -5864,22 +5867,22 @@ var ImageEditorController = (_class7 = class {
5864
5867
  const r = _nullishCoalesce(rect, () => ( { x: 0, y: 0, width, height }));
5865
5868
  const depth = this.bitDepth;
5866
5869
  if (depth === 8) return { width: r.width, height: r.height, depth: 16, data: _chunkJ5BA3BQ6cjs.to16From8.call(void 0, this.compositePixels(r).data) };
5867
- const data = _chunk24ATT2PEcjs.workingToSamples.call(void 0, _chunkYAFS2QFZcjs.compositeDeep.call(void 0, this.state.layers, r, this.compositorSources(), depth), depth);
5870
+ const data = _chunk24ATT2PEcjs.workingToSamples.call(void 0, _chunkJLGNZMUVcjs.compositeDeep.call(void 0, this.state.layers, r, this.compositorSources(), depth), depth);
5868
5871
  return { width: r.width, height: r.height, depth, data };
5869
5872
  }
5870
5873
  /** Document bounds a layer can paint into (pixel content, annotations, or the canvas for the rest). */
5871
5874
  paintBounds(layer) {
5872
5875
  const { width, height } = this.naturalSize;
5873
5876
  const canvas = { x: 0, y: 0, width, height };
5874
- if (_chunkYAFS2QFZcjs.hasSurface.call(void 0, layer)) return _nullishCoalesce(this.getLayerBounds(layer.id), () => ( { x: 0, y: 0, width: 0, height: 0 }));
5877
+ if (_chunkJLGNZMUVcjs.hasSurface.call(void 0, layer)) return _nullishCoalesce(this.getLayerBounds(layer.id), () => ( { x: 0, y: 0, width: 0, height: 0 }));
5875
5878
  if (layer.type === "annotation") {
5876
- const b = _chunkYAFS2QFZcjs.getAnnotationBounds.call(void 0, layer.annotation);
5879
+ const b = _chunkJLGNZMUVcjs.getAnnotationBounds.call(void 0, layer.annotation);
5877
5880
  const pad = 4 + ("strokeWidth" in layer.annotation ? layer.annotation.strokeWidth : 0);
5878
5881
  return coveringRect({ x: b.x - pad, y: b.y - pad, width: b.width + 2 * pad, height: b.height + 2 * pad });
5879
5882
  }
5880
5883
  if (layer.type === "group") {
5881
5884
  let r = null;
5882
- for (const c of layer.children) r = _chunkYAFS2QFZcjs.unionRect.call(void 0, r, this.paintBounds(c));
5885
+ for (const c of layer.children) r = _chunkJLGNZMUVcjs.unionRect.call(void 0, r, this.paintBounds(c));
5883
5886
  return _nullishCoalesce(r, () => ( canvas));
5884
5887
  }
5885
5888
  return canvas;
@@ -5890,16 +5893,16 @@ var ImageEditorController = (_class7 = class {
5890
5893
  * Returns the merged id.
5891
5894
  */
5892
5895
  async mergeDown(id) {
5893
- const loc = _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id);
5896
+ const loc = _chunkJLGNZMUVcjs.requireLayer.call(void 0, this.state.layers, id);
5894
5897
  const upper = loc.layer;
5895
5898
  const siblings = loc.parent ? loc.parent.children : this.state.layers;
5896
5899
  const lower = siblings[loc.index - 1];
5897
- if (!lower) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${upper.name || id}" is the bottom of its group; there is nothing below to merge into.`);
5898
- if (lower.type !== "pixel") throw new (0, _chunkYAFS2QFZcjs.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.`);
5899
- if (!upper.visible) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${upper.name || id}" is hidden; show it or delete it instead of merging.`);
5900
- _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, upper, "all", "merge it");
5901
- _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, lower, "pixels", "merge into it");
5902
- let rect = _nullishCoalesce(_chunkYAFS2QFZcjs.unionRect.call(void 0, this.paintBounds(lower), upper.type === "adjustment" ? null : this.paintBounds(upper)), () => ( { x: 0, y: 0, width: 1, height: 1 }));
5900
+ if (!lower) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Layer "${upper.name || id}" is the bottom of its group; there is nothing below to merge into.`);
5901
+ if (lower.type !== "pixel") throw new (0, _chunkJLGNZMUVcjs.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.`);
5902
+ if (!upper.visible) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Layer "${upper.name || id}" is hidden; show it or delete it instead of merging.`);
5903
+ _chunkJLGNZMUVcjs.requireUnlocked.call(void 0, upper, "all", "merge it");
5904
+ _chunkJLGNZMUVcjs.requireUnlocked.call(void 0, lower, "pixels", "merge into it");
5905
+ let rect = _nullishCoalesce(_chunkJLGNZMUVcjs.unionRect.call(void 0, this.paintBounds(lower), upper.type === "adjustment" ? null : this.paintBounds(upper)), () => ( { x: 0, y: 0, width: 1, height: 1 }));
5903
5906
  const reach = Math.max(_chunk24ATT2PEcjs.effectsMargin.call(void 0, lower.effects), upper.type === "adjustment" ? 0 : _chunk24ATT2PEcjs.effectsMargin.call(void 0, upper.effects));
5904
5907
  if (reach) rect = { x: rect.x - reach, y: rect.y - reach, width: rect.width + 2 * reach, height: rect.height + 2 * reach };
5905
5908
  const base = { ...lower, blend: "normal", opacity: 1 };
@@ -5925,12 +5928,12 @@ var ImageEditorController = (_class7 = class {
5925
5928
  */
5926
5929
  async mergeVisible() {
5927
5930
  const visible = this.state.layers.filter((l) => l.visible);
5928
- if (!visible.length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("No layer is visible.");
5931
+ if (!visible.length) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("No layer is visible.");
5929
5932
  const { width, height } = this.naturalSize;
5930
5933
  const surface = await this.compositeToSurface(visible, { x: 0, y: 0, width, height });
5931
5934
  const merged = {
5932
5935
  type: "pixel",
5933
- id: _chunkYAFS2QFZcjs.newLayerId.call(void 0, ),
5936
+ id: _chunkJLGNZMUVcjs.newLayerId.call(void 0, ),
5934
5937
  name: "Merged",
5935
5938
  visible: true,
5936
5939
  opacity: 1,
@@ -5954,8 +5957,8 @@ var ImageEditorController = (_class7 = class {
5954
5957
  const surface = await this.compositeToSurface(this.state.layers, { x: 0, y: 0, width, height });
5955
5958
  const bg = {
5956
5959
  type: "pixel",
5957
- id: _chunkYAFS2QFZcjs.BACKGROUND_LAYER_ID,
5958
- name: _chunkYAFS2QFZcjs.BACKGROUND_LAYER_NAME,
5960
+ id: _chunkJLGNZMUVcjs.BACKGROUND_LAYER_ID,
5961
+ name: _chunkJLGNZMUVcjs.BACKGROUND_LAYER_NAME,
5959
5962
  visible: true,
5960
5963
  opacity: 1,
5961
5964
  blend: "normal",
@@ -5982,7 +5985,7 @@ var ImageEditorController = (_class7 = class {
5982
5985
  const k = Math.min(1, side / Math.max(width, height));
5983
5986
  const tw = Math.max(1, Math.round(width * k));
5984
5987
  const th = Math.max(1, Math.round(height * k));
5985
- const surface = options.mask ? layer.mask && !layer.mask.source ? layer.mask.surface : null : _chunkYAFS2QFZcjs.hasSurface.call(void 0, layer) ? this.surfaceOf(layer) : null;
5988
+ const surface = options.mask ? layer.mask && !layer.mask.source ? layer.mask.surface : null : _chunkJLGNZMUVcjs.hasSurface.call(void 0, layer) ? this.surfaceOf(layer) : null;
5986
5989
  if (!surface) return null;
5987
5990
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
5988
5991
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
@@ -6078,7 +6081,7 @@ var ImageEditorController = (_class7 = class {
6078
6081
  * pixels. The next stroke fixes the offset from its first point. View state, no undo.
6079
6082
  */
6080
6083
  setCloneSource(point) {
6081
- if (point && (!Number.isFinite(point.x) || !Number.isFinite(point.y))) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("The clone source needs finite x and y (document pixels).");
6084
+ if (point && (!Number.isFinite(point.x) || !Number.isFinite(point.y))) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("The clone source needs finite x and y (document pixels).");
6082
6085
  const source = point ? { x: Math.round(point.x), y: Math.round(point.y), offset: null } : null;
6083
6086
  this.state.paint = { ...this.state.paint, cloneSource: source };
6084
6087
  this.notify();
@@ -6094,9 +6097,9 @@ var ImageEditorController = (_class7 = class {
6094
6097
  const next = t ? { ...cur, ...t } : { ..._chunkYT3JL7YMcjs.IDENTITY_CLONE_TRANSFORM };
6095
6098
  for (const k of ["scaleX", "scaleY"]) {
6096
6099
  const v = next[k];
6097
- if (!Number.isFinite(v) || Math.abs(v) < 0.01 || Math.abs(v) > 10) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`${k} must be a scale factor between 0.01 and 10 in size (negative flips), not ${String(v)}.`);
6100
+ if (!Number.isFinite(v) || Math.abs(v) < 0.01 || Math.abs(v) > 10) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`${k} must be a scale factor between 0.01 and 10 in size (negative flips), not ${String(v)}.`);
6098
6101
  }
6099
- if (!Number.isFinite(next.rotate)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("rotate must be a number of degrees.");
6102
+ if (!Number.isFinite(next.rotate)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("rotate must be a number of degrees.");
6100
6103
  next.rotate = ((next.rotate + 180) % 360 + 360) % 360 - 180;
6101
6104
  this.state.paint = { ...this.state.paint, cloneTransform: next };
6102
6105
  this.notify();
@@ -6114,27 +6117,27 @@ var ImageEditorController = (_class7 = class {
6114
6117
  /** Resolves and validates what a stroke, fill or clear paints into. */
6115
6118
  paintTarget(layerId, channel, action) {
6116
6119
  const id = _nullishCoalesce(layerId, () => ( this.state.activeLayerId));
6117
- if (!id) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`No layer given and none is active; pass layerId (see list_layers) to ${action}.`);
6118
- const layer = _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id).layer;
6120
+ if (!id) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`No layer given and none is active; pass layerId (see list_layers) to ${action}.`);
6121
+ const layer = _chunkJLGNZMUVcjs.requireLayer.call(void 0, this.state.layers, id).layer;
6119
6122
  const ch = _nullishCoalesce(channel, () => ( (id === this.state.activeLayerId ? this.state.activeTarget : "pixels")));
6120
6123
  if (ch === "mask") {
6121
- if (!layer.mask) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask to ${action}; add one with add_layer_mask, or target pixels.`);
6122
- if (layer.mask.source) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" has a depth mask, which is generated, not painted.`);
6123
- _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "all", action);
6124
+ if (!layer.mask) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask to ${action}; add one with add_layer_mask, or target pixels.`);
6125
+ if (layer.mask.source) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Layer "${layer.name || id}" has a depth mask, which is generated, not painted.`);
6126
+ _chunkJLGNZMUVcjs.requireUnlocked.call(void 0, layer, "all", action);
6124
6127
  } else if (ch === "filter-mask") {
6125
6128
  if (layer.type !== "smart" || !_optionalChain([layer, 'access', _224 => _224.smartFilters, 'optionalAccess', _225 => _225.mask])) {
6126
- throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" has no smart filter mask to ${action}; add one with set_smart_filter_mask, or target pixels or mask.`);
6129
+ throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Layer "${layer.name || id}" has no smart filter mask to ${action}; add one with set_smart_filter_mask, or target pixels or mask.`);
6127
6130
  }
6128
- if (!_chunkYAFS2QFZcjs.isContentsDecoded.call(void 0, layer.contents)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`The contents of "${layer.name || id}" are not decoded here, so its filter mask cannot be painted; run prepareSmartObjects() first.`);
6129
- _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "all", action);
6131
+ if (!_chunkJLGNZMUVcjs.isContentsDecoded.call(void 0, layer.contents)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`The contents of "${layer.name || id}" are not decoded here, so its filter mask cannot be painted; run prepareSmartObjects() first.`);
6132
+ _chunkJLGNZMUVcjs.requireUnlocked.call(void 0, layer, "all", action);
6130
6133
  } else {
6131
- if (layer.type === "smart") throw new (0, _chunkYAFS2QFZcjs.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.`);
6132
- if (layer.type === "shape") throw new (0, _chunkYAFS2QFZcjs.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).`);
6133
- if (layer.type === "type") throw new (0, _chunkYAFS2QFZcjs.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).`);
6134
- if (layer.type !== "pixel") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" is a ${layer.type} layer; ${action} on a pixel layer, or on this layer's mask (channel mask).`);
6135
- _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "pixels", action);
6134
+ if (layer.type === "smart") throw new (0, _chunkJLGNZMUVcjs.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.`);
6135
+ if (layer.type === "shape") throw new (0, _chunkJLGNZMUVcjs.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).`);
6136
+ if (layer.type === "type") throw new (0, _chunkJLGNZMUVcjs.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).`);
6137
+ if (layer.type !== "pixel") throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Layer "${layer.name || id}" is a ${layer.type} layer; ${action} on a pixel layer, or on this layer's mask (channel mask).`);
6138
+ _chunkJLGNZMUVcjs.requireUnlocked.call(void 0, layer, "pixels", action);
6136
6139
  }
6137
- if (!layer.visible) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" is hidden; show it before you ${action}.`);
6140
+ if (!layer.visible) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Layer "${layer.name || id}" is hidden; show it before you ${action}.`);
6138
6141
  const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
6139
6142
  const surface = ch === "mask" ? layer.mask.surface : ch === "filter-mask" ? layer.smartFilters.mask.surface : this.surfaceOf(layer);
6140
6143
  const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _226 => _226.locks, 'optionalAccess', _227 => _227.transparency]));
@@ -6143,7 +6146,7 @@ var ImageEditorController = (_class7 = class {
6143
6146
  /** The layer with its pixels (or mask) replaced by `surface`. */
6144
6147
  withSurface(layer, channel, surface) {
6145
6148
  if (channel === "mask") return { ...layer, mask: { ...layer.mask, surface } };
6146
- if (channel === "filter-mask") return _chunkYAFS2QFZcjs.withFilterMaskSurface.call(void 0, layer, surface, this.canvasSize);
6149
+ if (channel === "filter-mask") return _chunkJLGNZMUVcjs.withFilterMaskSurface.call(void 0, layer, surface, this.canvasSize);
6147
6150
  const next = { ...layer, surface };
6148
6151
  delete next.source;
6149
6152
  return next;
@@ -6156,10 +6159,10 @@ var ImageEditorController = (_class7 = class {
6156
6159
  */
6157
6160
  beginStroke(init = {}) {
6158
6161
  const tool = _nullishCoalesce(init.tool, () => ( "brush"));
6159
- if (!STROKE_TOOLS.includes(tool)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown paint tool "${String(tool)}"; use one of ${STROKE_TOOLS.join(", ")}.`);
6162
+ if (!STROKE_TOOLS.includes(tool)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Unknown paint tool "${String(tool)}"; use one of ${STROKE_TOOLS.join(", ")}.`);
6160
6163
  const target = this.paintTarget(init.layerId, init.channel, tool === "eraser" ? "erase" : isRetouchTool(tool) ? "retouch" : "paint");
6161
6164
  if (tool === "mixer" && target.channel !== "pixels") {
6162
- throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("The Mixer Brush paints colour on pixels, not on masks; target pixels (channel pixels), or paint the mask with the brush.");
6165
+ throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("The Mixer Brush paints colour on pixels, not on masks; target pixels (channel pixels), or paint the mask with the brush.");
6163
6166
  }
6164
6167
  const brush = _chunk6GFRKLLScjs.normalizeBrush.call(void 0, { ...this.state.paint.brush, ..._nullishCoalesce(init.brush, () => ( {})) });
6165
6168
  let strokePaint = null;
@@ -6193,7 +6196,7 @@ var ImageEditorController = (_class7 = class {
6193
6196
  retouchStroke(tool, init, brush, target, apply) {
6194
6197
  const settings = _chunkYT3JL7YMcjs.normalizeRetouch.call(void 0, _nullishCoalesce(init.retouch, () => ( {})), this.state.paint.retouch);
6195
6198
  const mask = target.channel !== "pixels";
6196
- if (tool === "sponge" && mask) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("The Sponge changes saturation, and a mask has none; target pixels (channel pixels), or use dodge or burn on the mask.");
6199
+ if (tool === "sponge" && mask) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("The Sponge changes saturation, and a mask has none; target pixels (channel pixels), or use dodge or burn on the mask.");
6197
6200
  if (tool === "smudge") return { kind: "dabs", create: (pixels) => new (0, _chunkYT3JL7YMcjs.RetouchDabStroke)(brush, pixels, _chunkYT3JL7YMcjs.smudgeEffect.call(void 0, brush, settings.strength)) };
6198
6201
  if (tool === "sponge") return { kind: "dabs", create: (pixels) => new (0, _chunkYT3JL7YMcjs.RetouchDabStroke)(brush, pixels, _chunkYT3JL7YMcjs.spongeEffect.call(void 0, brush, settings.spongeMode === "saturate", settings.vibrance)) };
6199
6202
  const retouchApply = {
@@ -6232,11 +6235,11 @@ var ImageEditorController = (_class7 = class {
6232
6235
  if (tool === "history") {
6233
6236
  const steps = settings.historySteps;
6234
6237
  const entry = steps > 0 ? _nullishCoalesce(this.undoStack[this.undoStack.length - steps], () => ( this.undoStack[0])) : this.undoStack[0];
6235
- if (!entry) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("There is no earlier state to paint from yet: the History Brush paints a layer as it was some undo steps back. Make a change first.");
6238
+ if (!entry) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("There is no earlier state to paint from yet: the History Brush paints a layer as it was some undo steps back. Make a change first.");
6236
6239
  const then = _optionalChain([_chunk24ATT2PEcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _232 => _232.layer]);
6237
- if (!then) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${target.id}" did not exist ${steps > 0 ? `${steps} steps back` : "in the oldest state"}; choose fewer history steps (historySteps).`);
6240
+ if (!then) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Layer "${target.id}" did not exist ${steps > 0 ? `${steps} steps back` : "in the oldest state"}; choose fewer history steps (historySteps).`);
6238
6241
  const surface = target.channel === "mask" ? _optionalChain([then, 'access', _233 => _233.mask, 'optionalAccess', _234 => _234.surface]) : then.type === "pixel" ? then.surface : void 0;
6239
- if (!surface) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
6242
+ if (!surface) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
6240
6243
  const offset2 = then.type === "pixel" ? then.offset : { x: 0, y: 0 };
6241
6244
  const depth = !mask && this.bitDepth !== 8 ? this.bitDepth : null;
6242
6245
  const source2 = depth ? new (0, _chunkYT3JL7YMcjs.TilePixelSource)((tx, ty) => workTileOf(surface.tiles.get(_chunkJ5BA3BQ6cjs.tileKey.call(void 0, tx, ty))), 4, offset2) : this.surfaceSource(surface, offset2);
@@ -6281,7 +6284,7 @@ var ImageEditorController = (_class7 = class {
6281
6284
  }
6282
6285
  if (init.source) this.setCloneSource(init.source);
6283
6286
  const cs = this.state.paint.cloneSource;
6284
- if (!cs) throw new (0, _chunkYAFS2QFZcjs.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 }.`);
6287
+ if (!cs) throw new (0, _chunkJLGNZMUVcjs.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 }.`);
6285
6288
  let offset = { x: 0, y: 0 };
6286
6289
  let first = { x: 0, y: 0 };
6287
6290
  const xf = this.state.paint.cloneTransform;
@@ -6318,7 +6321,7 @@ var ImageEditorController = (_class7 = class {
6318
6321
  const sources = this.compositorSources();
6319
6322
  if (depth) {
6320
6323
  return new (0, _chunkYT3JL7YMcjs.TilePixelSource)((tx, ty) => {
6321
- const w = _chunkYAFS2QFZcjs.compositeDeep.call(void 0, layers, { x: tx * _chunkJ5BA3BQ6cjs.TILE, y: ty * _chunkJ5BA3BQ6cjs.TILE, width: _chunkJ5BA3BQ6cjs.TILE, height: _chunkJ5BA3BQ6cjs.TILE }, sources, depth);
6324
+ const w = _chunkJLGNZMUVcjs.compositeDeep.call(void 0, layers, { x: tx * _chunkJ5BA3BQ6cjs.TILE, y: ty * _chunkJ5BA3BQ6cjs.TILE, width: _chunkJ5BA3BQ6cjs.TILE, height: _chunkJ5BA3BQ6cjs.TILE }, sources, depth);
6322
6325
  for (let i = 0; i < w.length; i += 4) {
6323
6326
  if (depth === 32) for (let c = 0; c < 3; c++) w[i + c] = _chunkJ5BA3BQ6cjs.srgbEncode.call(void 0, w[i + c]);
6324
6327
  for (let c = 0; c < 4; c++) w[i + c] *= 255;
@@ -6326,7 +6329,7 @@ var ImageEditorController = (_class7 = class {
6326
6329
  return w;
6327
6330
  }, 4);
6328
6331
  }
6329
- const compositor = new (0, _chunkYAFS2QFZcjs.LayerCompositor)();
6332
+ const compositor = new (0, _chunkJLGNZMUVcjs.LayerCompositor)();
6330
6333
  return new (0, _chunkYT3JL7YMcjs.TilePixelSource)((tx, ty) => compositor.tile(layers, tx, ty, sources), 4);
6331
6334
  }
6332
6335
  /** A Mixer Brush stroke's start: the settings, and the load (refilled when asked or set to). */
@@ -6376,9 +6379,9 @@ var ImageEditorController = (_class7 = class {
6376
6379
  * document bounds and the number of dabs.
6377
6380
  */
6378
6381
  paintStroke(init) {
6379
- if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("points must hold at least one { x, y } point.");
6382
+ if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("points must hold at least one { x, y } point.");
6380
6383
  for (const p of init.points) {
6381
- if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _239 => _239.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _240 => _240.y]))) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
6384
+ if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _239 => _239.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _240 => _240.y]))) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
6382
6385
  }
6383
6386
  const session = this.beginStroke(init);
6384
6387
  session.push(init.points);
@@ -6404,8 +6407,8 @@ var ImageEditorController = (_class7 = class {
6404
6407
  const target = this.paintTarget(options.layerId, options.channel, mode === "paint" ? "fill" : "clear");
6405
6408
  const { width, height } = this.naturalSize;
6406
6409
  const opacity = _nullishCoalesce(options.opacity, () => ( 1));
6407
- if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("opacity must be from 0 to 1.");
6408
- const blend = _nullishCoalesce(_chunkYAFS2QFZcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
6410
+ if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("opacity must be from 0 to 1.");
6411
+ const blend = _nullishCoalesce(_chunkJLGNZMUVcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
6409
6412
  const sel = options.useSelection !== false && _optionalChain([this, 'access', _241 => _241.state, 'access', _242 => _242.selection, 'optionalAccess', _243 => _243.bounds]) ? this.state.selection : null;
6410
6413
  const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _244 => _244.bounds]), () => ( { x: 0, y: 0, width, height }));
6411
6414
  const coverage = new (0, _chunk6GFRKLLScjs.CoverageMap)();
@@ -6441,7 +6444,7 @@ var ImageEditorController = (_class7 = class {
6441
6444
  // --- Adjustments ---
6442
6445
  /** The pixel layer the base sliders edit: the active pixel layer, else the Background. */
6443
6446
  developLayer() {
6444
- return _chunkYAFS2QFZcjs.developTarget.call(void 0, this.state.layers, this.state.activeLayerId);
6447
+ return _chunkJLGNZMUVcjs.developTarget.call(void 0, this.state.layers, this.state.activeLayerId);
6445
6448
  }
6446
6449
  /**
6447
6450
  * Sets base adjustment values as one undo step (unless `commitToHistory` is false). The base
@@ -6467,7 +6470,7 @@ var ImageEditorController = (_class7 = class {
6467
6470
  this.state.outputOpacity = Math.min(1, Math.max(0, partial.opacity));
6468
6471
  }
6469
6472
  if ("layers" in partial) {
6470
- layers = this.replaceAdjustmentNodes(layers, _chunkYAFS2QFZcjs.normalizeAdjustmentLayers.call(void 0, partial.layers));
6473
+ layers = this.replaceAdjustmentNodes(layers, _chunkJLGNZMUVcjs.normalizeAdjustmentLayers.call(void 0, partial.layers));
6471
6474
  }
6472
6475
  this.state.layers = layers;
6473
6476
  this.notify();
@@ -6475,7 +6478,7 @@ var ImageEditorController = (_class7 = class {
6475
6478
  /** True when the adjustments use an older rendering process than {@link LATEST_PROCESS_VERSION}. */
6476
6479
  get isProcessOutdated() {
6477
6480
  this.syncViews();
6478
- return _chunkYAFS2QFZcjs.normalizeProcessVersion.call(void 0, this.state.adjustments.process) < _chunkYAFS2QFZcjs.LATEST_PROCESS_VERSION;
6481
+ return _chunkJLGNZMUVcjs.normalizeProcessVersion.call(void 0, this.state.adjustments.process) < _chunkJLGNZMUVcjs.LATEST_PROCESS_VERSION;
6479
6482
  }
6480
6483
  /**
6481
6484
  * Update to Current Process: re-interprets the current adjustment values with the latest
@@ -6483,7 +6486,7 @@ var ImageEditorController = (_class7 = class {
6483
6486
  */
6484
6487
  upgradeProcess() {
6485
6488
  if (!this.isProcessOutdated) return false;
6486
- this.setAdjustments({ process: _chunkYAFS2QFZcjs.LATEST_PROCESS_VERSION });
6489
+ this.setAdjustments({ process: _chunkJLGNZMUVcjs.LATEST_PROCESS_VERSION });
6487
6490
  return true;
6488
6491
  }
6489
6492
  /** Resets the base sliders (latest process). Adjustment layers are kept; see `clearAdjustmentLayers`. */
@@ -6494,7 +6497,7 @@ var ImageEditorController = (_class7 = class {
6494
6497
  this.state.layers = _chunk24ATT2PEcjs.mapLayer.call(void 0,
6495
6498
  this.state.layers,
6496
6499
  target.id,
6497
- (l) => withBlur(withDevelop(l, { ...DEFAULT_ADJUSTMENTS, process: _chunkYAFS2QFZcjs.LATEST_PROCESS_VERSION }), 0)
6500
+ (l) => withBlur(withDevelop(l, { ...DEFAULT_ADJUSTMENTS, process: _chunkJLGNZMUVcjs.LATEST_PROCESS_VERSION }), 0)
6498
6501
  );
6499
6502
  }
6500
6503
  delete this.state.legacyOutputBlur;
@@ -6558,7 +6561,7 @@ var ImageEditorController = (_class7 = class {
6558
6561
  const existing = new Set(this.adjustmentNodes(out).map((n) => n.id));
6559
6562
  for (const l of next) {
6560
6563
  if (existing.has(l.id)) continue;
6561
- out = this.placeLayer(out, _chunkYAFS2QFZcjs.adjustmentNodeFromLegacy.call(void 0, l, width, height), { adjustmentIndex: Infinity });
6564
+ out = this.placeLayer(out, _chunkJLGNZMUVcjs.adjustmentNodeFromLegacy.call(void 0, l, width, height), { adjustmentIndex: Infinity });
6562
6565
  }
6563
6566
  const order = next.map((l) => l.id);
6564
6567
  for (let to = 0; to < order.length; to++) out = this.moveAdjustmentNode(out, order[to], to);
@@ -6573,7 +6576,7 @@ var ImageEditorController = (_class7 = class {
6573
6576
  addAdjustmentLayer(init, index) {
6574
6577
  const spec = typeof init === "string" ? { kind: init } : init;
6575
6578
  const ids = new Set(_chunk24ATT2PEcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
6576
- const layer = _chunkYAFS2QFZcjs.createAdjustmentLayer.call(void 0, spec.kind, {
6579
+ const layer = _chunkJLGNZMUVcjs.createAdjustmentLayer.call(void 0, spec.kind, {
6577
6580
  id: spec.id && !ids.has(spec.id) ? spec.id : void 0,
6578
6581
  name: spec.name,
6579
6582
  params: spec.params,
@@ -6582,10 +6585,10 @@ var ImageEditorController = (_class7 = class {
6582
6585
  blend: spec.blend,
6583
6586
  mask: _nullishCoalesce(spec.mask, () => ( void 0))
6584
6587
  });
6585
- while (ids.has(layer.id)) layer.id = _chunkYAFS2QFZcjs.newLayerId.call(void 0, "adj");
6588
+ while (ids.has(layer.id)) layer.id = _chunkJLGNZMUVcjs.newLayerId.call(void 0, "adj");
6586
6589
  const { width, height } = this.naturalSize;
6587
6590
  this.recordHistory();
6588
- const node = _chunkYAFS2QFZcjs.adjustmentNodeFromLegacy.call(void 0, layer, width, height);
6591
+ const node = _chunkJLGNZMUVcjs.adjustmentNodeFromLegacy.call(void 0, layer, width, height);
6589
6592
  const positioned = Boolean(spec.aboveId || spec.parentId);
6590
6593
  this.state.layers = this.placeLayer(this.state.layers, node, {
6591
6594
  aboveId: spec.aboveId,
@@ -6605,7 +6608,7 @@ var ImageEditorController = (_class7 = class {
6605
6608
  if (!loc || loc.layer.type !== "adjustment") return false;
6606
6609
  const { width, height } = this.naturalSize;
6607
6610
  const node = loc.layer;
6608
- const merged = _chunkYAFS2QFZcjs.normalizeAdjustmentLayer.call(void 0, {
6611
+ const merged = _chunkJLGNZMUVcjs.normalizeAdjustmentLayer.call(void 0, {
6609
6612
  id: node.id,
6610
6613
  kind: node.kind,
6611
6614
  enabled: _nullishCoalesce(update.enabled, () => ( node.visible)),
@@ -6625,7 +6628,7 @@ var ImageEditorController = (_class7 = class {
6625
6628
  params: merged.params
6626
6629
  };
6627
6630
  if (update.mask !== void 0) {
6628
- const mask = update.mask ? _chunkYAFS2QFZcjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height) : null;
6631
+ const mask = update.mask ? _chunkJLGNZMUVcjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height) : null;
6629
6632
  if (mask) next.mask = mask;
6630
6633
  else delete next.mask;
6631
6634
  }
@@ -6712,8 +6715,8 @@ var ImageEditorController = (_class7 = class {
6712
6715
  const { width, height } = this.naturalSize;
6713
6716
  let next = null;
6714
6717
  if (mask) {
6715
- const sized = mask.width === width && mask.height === height ? mask : _chunkYAFS2QFZcjs.resizeSelection.call(void 0, mask, width, height);
6716
- next = _chunkYAFS2QFZcjs.combineSelections.call(void 0, this.state.selection, sized, mode);
6718
+ const sized = mask.width === width && mask.height === height ? mask : _chunkJLGNZMUVcjs.resizeSelection.call(void 0, mask, width, height);
6719
+ next = _chunkJLGNZMUVcjs.combineSelections.call(void 0, this.state.selection, sized, mode);
6717
6720
  } else if (mode !== "replace") {
6718
6721
  return false;
6719
6722
  }
@@ -6727,7 +6730,7 @@ var ImageEditorController = (_class7 = class {
6727
6730
  /** Select › All. */
6728
6731
  selectAll() {
6729
6732
  const { width, height } = this.naturalSize;
6730
- return this.setSelection(_chunkYAFS2QFZcjs.fullSelection.call(void 0, width, height));
6733
+ return this.setSelection(_chunkJLGNZMUVcjs.fullSelection.call(void 0, width, height));
6731
6734
  }
6732
6735
  /** Select › Deselect. */
6733
6736
  deselect() {
@@ -6736,11 +6739,11 @@ var ImageEditorController = (_class7 = class {
6736
6739
  /** Select › Inverse (with nothing selected, selects everything). */
6737
6740
  invertSelection() {
6738
6741
  const { width, height } = this.naturalSize;
6739
- const current = _nullishCoalesce(this.state.selection, () => ( _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, width, height)));
6740
- return this.setSelection(_chunkYAFS2QFZcjs.invertSelection.call(void 0, current));
6742
+ const current = _nullishCoalesce(this.state.selection, () => ( _chunkJLGNZMUVcjs.createSelectionMask.call(void 0, width, height)));
6743
+ return this.setSelection(_chunkJLGNZMUVcjs.invertSelection.call(void 0, current));
6741
6744
  }
6742
6745
  shapeCommand(mask, options) {
6743
- const shaped = options.feather && options.feather > 0 ? _chunkYAFS2QFZcjs.modifySelection.call(void 0, mask, "feather", options.feather) : mask;
6746
+ const shaped = options.feather && options.feather > 0 ? _chunkJLGNZMUVcjs.modifySelection.call(void 0, mask, "feather", options.feather) : mask;
6744
6747
  return this.setSelection(shaped, _nullishCoalesce(options.mode, () => ( "replace")));
6745
6748
  }
6746
6749
  /** Rectangular marquee in natural image pixels. */
@@ -6794,11 +6797,11 @@ var ImageEditorController = (_class7 = class {
6794
6797
  if (!this.samplePixelsOverride && !options.pixels) this.samplePixels = null;
6795
6798
  return null;
6796
6799
  }
6797
- const legacy = _chunkYAFS2QFZcjs.legacyView.call(void 0, this.stack(), width, height, null).exact;
6800
+ const legacy = _chunkJLGNZMUVcjs.legacyView.call(void 0, this.stack(), width, height, null).exact;
6798
6801
  if (options.sample === "active-layer") {
6799
6802
  const layer = this.getActiveLayer();
6800
6803
  if (!layer || layer.type !== "pixel") {
6801
- throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Sampling the active layer needs an active pixel layer; select one, or sample the composite.");
6804
+ throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Sampling the active layer needs an active pixel layer; select one, or sample the composite.");
6802
6805
  }
6803
6806
  const surface = layer.source === "document" && options.pixels ? _chunkJ5BA3BQ6cjs.surfaceFromPixels.call(void 0, options.pixels, 4) : this.surfaceOf(layer);
6804
6807
  return { width, height, data: _chunkJ5BA3BQ6cjs.readRegion.call(void 0, surface, { x: -layer.offset.x, y: -layer.offset.y, width, height }) };
@@ -6807,7 +6810,7 @@ var ImageEditorController = (_class7 = class {
6807
6810
  this.syncViews();
6808
6811
  if (legacy && !options.pixels) {
6809
6812
  const copy = { width: base.width, height: base.height, data: new Uint8ClampedArray(base.data) };
6810
- _chunkYAFS2QFZcjs.applyAdjustments.call(void 0, copy, _chunkYAFS2QFZcjs.legacyView.call(void 0, this.stack(), width, height, null).adjustments);
6813
+ _chunkJLGNZMUVcjs.applyAdjustments.call(void 0, copy, _chunkJLGNZMUVcjs.legacyView.call(void 0, this.stack(), width, height, null).adjustments);
6811
6814
  return copy;
6812
6815
  }
6813
6816
  const pixels = options.pixels;
@@ -6819,7 +6822,7 @@ var ImageEditorController = (_class7 = class {
6819
6822
  };
6820
6823
  const stack = withoutAnnotations(this.state.layers);
6821
6824
  const layers = options.sampleMerged ? stack : pixelsOnly(stack);
6822
- const data = new (0, _chunkYAFS2QFZcjs.LayerCompositor)().composite(layers, { x: 0, y: 0, width, height }, sources);
6825
+ const data = new (0, _chunkJLGNZMUVcjs.LayerCompositor)().composite(layers, { x: 0, y: 0, width, height }, sources);
6823
6826
  return { width, height, data };
6824
6827
  }
6825
6828
  async requirePixels(options) {
@@ -6846,7 +6849,7 @@ var ImageEditorController = (_class7 = class {
6846
6849
  modifySelection(op, radius) {
6847
6850
  const sel = this.state.selection;
6848
6851
  if (!_optionalChain([sel, 'optionalAccess', _258 => _258.bounds])) return false;
6849
- return this.setSelection(_chunkYAFS2QFZcjs.modifySelection.call(void 0, sel, op, radius));
6852
+ return this.setSelection(_chunkJLGNZMUVcjs.modifySelection.call(void 0, sel, op, radius));
6850
6853
  }
6851
6854
  /**
6852
6855
  * Refine Edge: snaps the selection (e.g. a coarse AI mask loaded with `loadSelectionFromImage`)
@@ -6877,7 +6880,7 @@ var ImageEditorController = (_class7 = class {
6877
6880
  } else {
6878
6881
  pixels = source;
6879
6882
  }
6880
- this.setSelection(_chunkYAFS2QFZcjs.selectionFromPixels.call(void 0, pixels, options), _nullishCoalesce(options.mode, () => ( "replace")));
6883
+ this.setSelection(_chunkJLGNZMUVcjs.selectionFromPixels.call(void 0, pixels, options), _nullishCoalesce(options.mode, () => ( "replace")));
6881
6884
  return this.getSelection();
6882
6885
  }
6883
6886
  /** Quick Mask view (tints the unselected area). View state: no undo step. */
@@ -6889,7 +6892,7 @@ var ImageEditorController = (_class7 = class {
6889
6892
  // --- Layer masks ---
6890
6893
  maskFromSelection(sel, props = {}) {
6891
6894
  const { width, height } = this.naturalSize;
6892
- const sized = sel.width === width && sel.height === height ? sel : _chunkYAFS2QFZcjs.resizeSelection.call(void 0, sel, width, height);
6895
+ const sized = sel.width === width && sel.height === height ? sel : _chunkJLGNZMUVcjs.resizeSelection.call(void 0, sel, width, height);
6893
6896
  const mask = { surface: _chunkJ5BA3BQ6cjs.surfaceFromPixels.call(void 0, { width, height, data: sized.data }, 1, 0, 0, 0), defaultValue: 0 };
6894
6897
  return withMaskProps(mask, props);
6895
6898
  }
@@ -6935,7 +6938,7 @@ var ImageEditorController = (_class7 = class {
6935
6938
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
6936
6939
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
6937
6940
  const data = _chunkJ5BA3BQ6cjs.readRegion.call(void 0, layer.mask.surface, { x: -ox, y: -oy, width, height });
6938
- const sel = _chunkYAFS2QFZcjs.createSelectionMask.call(void 0, width, height, new Uint8Array(data.buffer, data.byteOffset, data.length));
6941
+ const sel = _chunkJLGNZMUVcjs.createSelectionMask.call(void 0, width, height, new Uint8Array(data.buffer, data.byteOffset, data.length));
6939
6942
  return this.setSelection(sel, mode);
6940
6943
  }
6941
6944
  // --- Histogram ---
@@ -6965,9 +6968,9 @@ var ImageEditorController = (_class7 = class {
6965
6968
  merged.depthRange = [...merged.depthRange];
6966
6969
  this.state.layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
6967
6970
  const next = { ...l };
6968
- if (_chunkYAFS2QFZcjs.isDefaultDepthMask.call(void 0, merged)) {
6971
+ if (_chunkJLGNZMUVcjs.isDefaultDepthMask.call(void 0, merged)) {
6969
6972
  if (_optionalChain([next, 'access', _264 => _264.mask, 'optionalAccess', _265 => _265.source])) delete next.mask;
6970
- } else next.mask = _chunkYAFS2QFZcjs.depthRasterMask.call(void 0, merged);
6973
+ } else next.mask = _chunkJLGNZMUVcjs.depthRasterMask.call(void 0, merged);
6971
6974
  return next;
6972
6975
  });
6973
6976
  }
@@ -6988,7 +6991,7 @@ var ImageEditorController = (_class7 = class {
6988
6991
  // --- Annotations & Layers ---
6989
6992
  /** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
6990
6993
  annotationLayer(id) {
6991
- return _chunk24ATT2PEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkYAFS2QFZcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _268 => _268.id]) === id);
6994
+ return _chunk24ATT2PEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkJLGNZMUVcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _268 => _268.id]) === id);
6992
6995
  }
6993
6996
  /** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
6994
6997
  annotationEnv() {
@@ -7004,7 +7007,7 @@ var ImageEditorController = (_class7 = class {
7004
7007
  this.recordHistory();
7005
7008
  const id = `ann_${Date.now()}_${Math.random().toString(36).slice(2, 7)}`;
7006
7009
  const fullAnnotation = { ...annotation, id };
7007
- const layer = _chunkYAFS2QFZcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
7010
+ const layer = _chunkJLGNZMUVcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
7008
7011
  const loc = placement.aboveId ? _chunk24ATT2PEcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
7009
7012
  this.state.layers = loc ? _chunk24ATT2PEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _269 => _269.parent, 'optionalAccess', _270 => _270.id]), () => ( null)), loc.index + 1) : _chunk24ATT2PEcjs.insertLayer.call(void 0, this.state.layers, layer, null);
7010
7013
  this.state.selectedAnnotationId = id;
@@ -7016,17 +7019,17 @@ var ImageEditorController = (_class7 = class {
7016
7019
  this.recordHistory();
7017
7020
  }
7018
7021
  const layer = this.annotationLayer(id);
7019
- const current = layer ? _chunkYAFS2QFZcjs.annotationOfLayer.call(void 0, layer) : null;
7022
+ const current = layer ? _chunkJLGNZMUVcjs.annotationOfLayer.call(void 0, layer) : null;
7020
7023
  if (layer && current) {
7021
7024
  const annotation = { ...current, ...partial, id };
7022
- const name = layer.name === _chunkYAFS2QFZcjs.annotationLayerName.call(void 0, current) ? _chunkYAFS2QFZcjs.annotationLayerName.call(void 0, annotation) : layer.name;
7025
+ const name = layer.name === _chunkJLGNZMUVcjs.annotationLayerName.call(void 0, current) ? _chunkJLGNZMUVcjs.annotationLayerName.call(void 0, annotation) : layer.name;
7023
7026
  this.state.layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, this.state.layers, layer.id, () => this.layerForAnnotation(layer, annotation, name));
7024
7027
  }
7025
7028
  this.notify();
7026
7029
  }
7027
7030
  /** `layer` (an annotation, or a shape or type layer migrated from one) showing `annotation` instead, keeping its other properties. */
7028
7031
  layerForAnnotation(layer, annotation, name) {
7029
- const fresh = _chunkYAFS2QFZcjs.annotationLayerFor.call(void 0, annotation, this.annotationEnv());
7032
+ const fresh = _chunkJLGNZMUVcjs.annotationLayerFor.call(void 0, annotation, this.annotationEnv());
7030
7033
  const keep = { id: layer.id, visible: layer.visible, opacity: layer.opacity };
7031
7034
  for (const k of ["clipped", "mask", "locks", "effects"]) if (layer[k] !== void 0) keep[k] = layer[k];
7032
7035
  if (fresh.type !== "annotation" && layer.type !== "annotation" && layer.fillOpacity !== void 0) keep.fillOpacity = layer.fillOpacity;
@@ -7313,8 +7316,8 @@ var ImageEditorController = (_class7 = class {
7313
7316
  return;
7314
7317
  }
7315
7318
  const target = this.developLayer();
7316
- if (!target) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("There is no pixel layer to mask.");
7317
- _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, target, "all", "mask it");
7319
+ if (!target) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("There is no pixel layer to mask.");
7320
+ _chunkJLGNZMUVcjs.requireUnlocked.call(void 0, target, "all", "mask it");
7318
7321
  const { width, height } = this.naturalSize;
7319
7322
  let px2 = await this.decodeImage(newDataUrl);
7320
7323
  if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
@@ -7322,14 +7325,14 @@ var ImageEditorController = (_class7 = class {
7322
7325
  for (let p = 0; p < alpha.length; p++) alpha[p] = px2.data[p * 4 + 3];
7323
7326
  let surface = _chunkJ5BA3BQ6cjs.surfaceFromPixels.call(void 0, { width, height, data: alpha }, 1, 0, 0, 0);
7324
7327
  if (target.offset.x || target.offset.y) surface = _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, surface, -target.offset.x, -target.offset.y);
7325
- this.commitLayers(_chunkYAFS2QFZcjs.setLayerMask.call(void 0, this.state.layers, target.id, { surface, defaultValue: 0 }));
7328
+ this.commitLayers(_chunkJLGNZMUVcjs.setLayerMask.call(void 0, this.state.layers, target.id, { surface, defaultValue: 0 }));
7326
7329
  return target.id;
7327
7330
  }
7328
7331
  // --- Type layers ---
7329
7332
 
7330
7333
  /** The shaper that lays out and draws type layers (`null` when there is none here). */
7331
7334
  getTextShaper() {
7332
- if (this.textShaperValue === void 0) this.textShaperValue = _chunkZ2H7KECKcjs.createCanvasTextShaper.call(void 0, { createCanvas: (w, h) => this.renderer.createCanvas(w, h) });
7335
+ if (this.textShaperValue === void 0) this.textShaperValue = _chunk2R3UW57Ucjs.createCanvasTextShaper.call(void 0, { createCanvas: (w, h) => this.renderer.createCanvas(w, h) });
7333
7336
  return this.textShaperValue;
7334
7337
  }
7335
7338
  /** Sets the text shaper (fonts) type layers lay out and draw with; existing layers redraw on their next edit. */
@@ -7346,7 +7349,7 @@ var ImageEditorController = (_class7 = class {
7346
7349
  return _nullishCoalesce(_optionalChain([this, 'access', _277 => _277.getTextShaper, 'call', _278 => _278(), 'optionalAccess', _279 => _279.families, 'optionalCall', _280 => _280()]), () => ( ["sans-serif", "serif", "monospace"]));
7347
7350
  }
7348
7351
  typeInfo(id) {
7349
- const layer = _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7352
+ const layer = _chunkJLGNZMUVcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7350
7353
  const ranges = (runs) => {
7351
7354
  let at = 0;
7352
7355
  return runs.map((r) => {
@@ -7359,7 +7362,7 @@ var ImageEditorController = (_class7 = class {
7359
7362
  let lines = [];
7360
7363
  let missing = _nullishCoalesce(layer.missingFonts, () => ( []));
7361
7364
  if (shaper) {
7362
- const layout = _chunkZ2H7KECKcjs.layoutText.call(void 0, layer, shaper);
7365
+ const layout = _chunk2R3UW57Ucjs.layoutText.call(void 0, layer, shaper);
7363
7366
  const r = (n) => Math.round(n * 1e3) / 1e3;
7364
7367
  lines = layout.lines.map((l) => ({ start: l.start, end: l.end, baseline: r(l.baseline), width: r(l.width) }));
7365
7368
  if (layer.rendering === "stored") missing = layout.missingFonts;
@@ -7389,25 +7392,25 @@ var ImageEditorController = (_class7 = class {
7389
7392
  * text wrapped in `box`. Refused without a text shaper. Returns its id.
7390
7393
  */
7391
7394
  addTextLayer(init) {
7392
- const text = _chunkYAFS2QFZcjs.normalizeText.call(void 0, init.text);
7393
- if (!Number.isFinite(init.x) || !Number.isFinite(init.y)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("x and y must be numbers (document pixels).");
7394
- const style = _chunkYAFS2QFZcjs.patchTextStyle.call(void 0, { ..._chunkZ2H7KECKcjs.DEFAULT_TEXT_STYLE, color: this.state.paint.foreground }, _nullishCoalesce(init.style, () => ( {})));
7395
- const paragraph = _chunkYAFS2QFZcjs.patchParagraphStyle.call(void 0, {}, _nullishCoalesce(init.paragraph, () => ( {})));
7395
+ const text = _chunkJLGNZMUVcjs.normalizeText.call(void 0, init.text);
7396
+ if (!Number.isFinite(init.x) || !Number.isFinite(init.y)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("x and y must be numbers (document pixels).");
7397
+ const style = _chunkJLGNZMUVcjs.patchTextStyle.call(void 0, { ..._chunk2R3UW57Ucjs.DEFAULT_TEXT_STYLE, color: this.state.paint.foreground }, _nullishCoalesce(init.style, () => ( {})));
7398
+ const paragraph = _chunkJLGNZMUVcjs.patchParagraphStyle.call(void 0, {}, _nullishCoalesce(init.paragraph, () => ( {})));
7396
7399
  let frame = { kind: "point" };
7397
7400
  if (init.box) {
7398
7401
  const { width, height } = init.box;
7399
- if (!(Number.isFinite(width) && width >= 1 && Number.isFinite(height) && height >= 1)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("box.width and box.height must be at least 1 pixel.");
7402
+ if (!(Number.isFinite(width) && width >= 1 && Number.isFinite(height) && height >= 1)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("box.width and box.height must be at least 1 pixel.");
7400
7403
  frame = { kind: "box", width, height };
7401
7404
  }
7402
- if (init.rotation !== void 0 && !Number.isFinite(init.rotation)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("rotation must be a number of degrees.");
7403
- if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("opacity must be between 0 and 1.");
7404
- if (init.blend !== void 0 && !_chunkJ5BA3BQ6cjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
7405
+ if (init.rotation !== void 0 && !Number.isFinite(init.rotation)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("rotation must be a number of degrees.");
7406
+ if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("opacity must be between 0 and 1.");
7407
+ if (init.blend !== void 0 && !_chunkJ5BA3BQ6cjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
7405
7408
  const t = [1, 0, 0, 1, init.x, init.y];
7406
- const transform = init.rotation ? _chunkZ2H7KECKcjs.multiplyMatrices.call(void 0, t, _chunkZ2H7KECKcjs.rotateMatrix.call(void 0, init.rotation, { x: init.x, y: init.y })) : t;
7407
- const layer = _chunkYAFS2QFZcjs.createTypeLayer.call(void 0, { text, runs: [{ length: text.length, style }], paragraphs: [{ length: text.length, style: paragraph }], frame, transform, name: _nullishCoalesce(init.name, () => ( _chunkYAFS2QFZcjs.typeLayerName.call(void 0, text))) }, this.textEnv());
7409
+ const transform = init.rotation ? _chunk2R3UW57Ucjs.multiplyMatrices.call(void 0, t, _chunk2R3UW57Ucjs.rotateMatrix.call(void 0, init.rotation, { x: init.x, y: init.y })) : t;
7410
+ const layer = _chunkJLGNZMUVcjs.createTypeLayer.call(void 0, { text, runs: [{ length: text.length, style }], paragraphs: [{ length: text.length, style: paragraph }], frame, transform, name: _nullishCoalesce(init.name, () => ( _chunkJLGNZMUVcjs.typeLayerName.call(void 0, text))) }, this.textEnv());
7408
7411
  if (init.opacity !== void 0) layer.opacity = init.opacity;
7409
7412
  if (init.blend !== void 0) layer.blend = init.blend;
7410
- const next = _chunkYAFS2QFZcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
7413
+ const next = _chunkJLGNZMUVcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
7411
7414
  this.commitLayers(next, () => {
7412
7415
  this.state.activeLayerId = layer.id;
7413
7416
  this.state.activeTarget = "pixels";
@@ -7419,28 +7422,28 @@ var ImageEditorController = (_class7 = class {
7419
7422
  * `start`. One undo step unless `commitToHistory` is false (typing). Returns the layer.
7420
7423
  */
7421
7424
  setText(id, text, range = {}, commitToHistory = true) {
7422
- const layer = _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7423
- const insert = _chunkYAFS2QFZcjs.normalizeText.call(void 0, text);
7424
- const [start, end] = _chunkYAFS2QFZcjs.textRange.call(void 0, layer.text, range.start, range.end);
7425
- const { layers } = _chunkYAFS2QFZcjs.updateTypeLayer.call(void 0, this.state.layers, id, (l) => _chunkYAFS2QFZcjs.replaceTextRange.call(void 0, l, start, end, insert), this.textEnv(), "edit its text");
7425
+ const layer = _chunkJLGNZMUVcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7426
+ const insert = _chunkJLGNZMUVcjs.normalizeText.call(void 0, text);
7427
+ const [start, end] = _chunkJLGNZMUVcjs.textRange.call(void 0, layer.text, range.start, range.end);
7428
+ const { layers } = _chunkJLGNZMUVcjs.updateTypeLayer.call(void 0, this.state.layers, id, (l) => _chunkJLGNZMUVcjs.replaceTextRange.call(void 0, l, start, end, insert), this.textEnv(), "edit its text");
7426
7429
  this.commitLayers(layers, void 0, commitToHistory);
7427
7430
  return this.typeInfo(id);
7428
7431
  }
7429
7432
  /** Sets character style fields over [start, end) (default all), one undo step. Returns the layer. */
7430
7433
  setTextStyle(id, style, range = {}, commitToHistory = true) {
7431
- const layer = _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7432
- const [start, end] = _chunkYAFS2QFZcjs.textRange.call(void 0, layer.text, range.start, range.end);
7433
- if (!Object.keys(style).length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give at least one style field to set.");
7434
- _chunkYAFS2QFZcjs.patchTextStyle.call(void 0, _chunkZ2H7KECKcjs.DEFAULT_TEXT_STYLE, style);
7435
- const { layers } = _chunkYAFS2QFZcjs.updateTypeLayer.call(void 0,
7434
+ const layer = _chunkJLGNZMUVcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7435
+ const [start, end] = _chunkJLGNZMUVcjs.textRange.call(void 0, layer.text, range.start, range.end);
7436
+ if (!Object.keys(style).length) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give at least one style field to set.");
7437
+ _chunkJLGNZMUVcjs.patchTextStyle.call(void 0, _chunk2R3UW57Ucjs.DEFAULT_TEXT_STYLE, style);
7438
+ const { layers } = _chunkJLGNZMUVcjs.updateTypeLayer.call(void 0,
7436
7439
  this.state.layers,
7437
7440
  id,
7438
7441
  (l) => {
7439
7442
  if (start === end) {
7440
- if (l.text.length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("The range is empty; give start < end (or leave both out for the whole text).");
7441
- return { runs: [{ length: 0, style: _chunkYAFS2QFZcjs.patchTextStyle.call(void 0, _chunkZ2H7KECKcjs.styleAt.call(void 0, l.runs, 0, _chunkZ2H7KECKcjs.DEFAULT_TEXT_STYLE), style) }] };
7443
+ if (l.text.length) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("The range is empty; give start < end (or leave both out for the whole text).");
7444
+ return { runs: [{ length: 0, style: _chunkJLGNZMUVcjs.patchTextStyle.call(void 0, _chunk2R3UW57Ucjs.styleAt.call(void 0, l.runs, 0, _chunk2R3UW57Ucjs.DEFAULT_TEXT_STYLE), style) }] };
7442
7445
  }
7443
- return { runs: _chunkZ2H7KECKcjs.restyleRange.call(void 0, l.runs, start, end, (s) => _chunkYAFS2QFZcjs.patchTextStyle.call(void 0, s, style)) };
7446
+ return { runs: _chunk2R3UW57Ucjs.restyleRange.call(void 0, l.runs, start, end, (s) => _chunkJLGNZMUVcjs.patchTextStyle.call(void 0, s, style)) };
7444
7447
  },
7445
7448
  this.textEnv(),
7446
7449
  "restyle its text"
@@ -7450,11 +7453,11 @@ var ImageEditorController = (_class7 = class {
7450
7453
  }
7451
7454
  /** Sets paragraph style fields on every paragraph that [start, end) touches (default all), one undo step. */
7452
7455
  setParagraphStyle(id, style, range = {}, commitToHistory = true) {
7453
- const layer = _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7454
- const [start, end] = _chunkYAFS2QFZcjs.textRange.call(void 0, layer.text, range.start, range.end);
7455
- if (!Object.keys(style).length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give at least one paragraph field to set.");
7456
- _chunkYAFS2QFZcjs.patchParagraphStyle.call(void 0, {}, style);
7457
- const { layers } = _chunkYAFS2QFZcjs.updateTypeLayer.call(void 0,
7456
+ const layer = _chunkJLGNZMUVcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7457
+ const [start, end] = _chunkJLGNZMUVcjs.textRange.call(void 0, layer.text, range.start, range.end);
7458
+ if (!Object.keys(style).length) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give at least one paragraph field to set.");
7459
+ _chunkJLGNZMUVcjs.patchParagraphStyle.call(void 0, {}, style);
7460
+ const { layers } = _chunkJLGNZMUVcjs.updateTypeLayer.call(void 0,
7458
7461
  this.state.layers,
7459
7462
  id,
7460
7463
  (l) => {
@@ -7463,7 +7466,7 @@ var ImageEditorController = (_class7 = class {
7463
7466
  const a = at;
7464
7467
  at += p.length;
7465
7468
  const touches = a < end && at > start || start === end && start >= a && (start < at || at === l.text.length);
7466
- return touches || !l.text.length ? { length: p.length, style: _chunkYAFS2QFZcjs.patchParagraphStyle.call(void 0, p.style, style) } : p;
7469
+ return touches || !l.text.length ? { length: p.length, style: _chunkJLGNZMUVcjs.patchParagraphStyle.call(void 0, p.style, style) } : p;
7467
7470
  });
7468
7471
  return { paragraphs };
7469
7472
  },
@@ -7479,21 +7482,21 @@ var ImageEditorController = (_class7 = class {
7479
7482
  * paragraph. Also resizes a box. One undo step.
7480
7483
  */
7481
7484
  setTextFrame(id, frame, commitToHistory = true) {
7482
- const layer = _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7483
- if (frame.kind === "box" && !(Number.isFinite(frame.width) && frame.width >= 1 && Number.isFinite(frame.height) && frame.height >= 1)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("width and height must be at least 1 pixel.");
7484
- if (frame.kind !== "box" && frame.kind !== "point") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("kind must be point or box.");
7485
+ const layer = _chunkJLGNZMUVcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7486
+ if (frame.kind === "box" && !(Number.isFinite(frame.width) && frame.width >= 1 && Number.isFinite(frame.height) && frame.height >= 1)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("width and height must be at least 1 pixel.");
7487
+ if (frame.kind !== "box" && frame.kind !== "point") throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("kind must be point or box.");
7485
7488
  const shaper = this.getTextShaper();
7486
- const { layers } = _chunkYAFS2QFZcjs.updateTypeLayer.call(void 0,
7489
+ const { layers } = _chunkJLGNZMUVcjs.updateTypeLayer.call(void 0,
7487
7490
  this.state.layers,
7488
7491
  id,
7489
7492
  (l) => {
7490
7493
  if (frame.kind === "box" && l.frame.kind === "box") return { frame: { kind: "box", width: frame.width, height: frame.height } };
7491
- if (!shaper) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Changing between point and paragraph text needs a text shaper to measure the text.");
7492
- const lines = _chunkZ2H7KECKcjs.layoutText.call(void 0, l, shaper).lines;
7494
+ if (!shaper) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Changing between point and paragraph text needs a text shaper to measure the text.");
7495
+ const lines = _chunk2R3UW57Ucjs.layoutText.call(void 0, l, shaper).lines;
7493
7496
  const first = lines[0];
7494
7497
  const dx = frame.kind === "box" ? first ? first.x : 0 : 0;
7495
7498
  const dy = frame.kind === "box" ? first ? first.baseline - first.ascent : 0 : first ? first.baseline : 0;
7496
- const m = _chunkYAFS2QFZcjs.textMatrix.call(void 0, l);
7499
+ const m = _chunkJLGNZMUVcjs.textMatrix.call(void 0, l);
7497
7500
  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]];
7498
7501
  const nextFrame = frame.kind === "box" ? { kind: "box", width: frame.width, height: frame.height } : { kind: "point" };
7499
7502
  return { frame: nextFrame, transform: shifted };
@@ -7510,21 +7513,21 @@ var ImageEditorController = (_class7 = class {
7510
7513
  * `warnings` says when other colours were dropped. One undo step.
7511
7514
  */
7512
7515
  convertTextToShape(id) {
7513
- const layer = _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7514
- _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "all", "convert it");
7516
+ const layer = _chunkJLGNZMUVcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7517
+ _chunkJLGNZMUVcjs.requireUnlocked.call(void 0, layer, "all", "convert it");
7515
7518
  const shaper = this.getTextShaper();
7516
- if (!shaper) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Convert to Shape needs a text shaper that gives glyph outlines; none is set here.");
7517
- const parts = _chunkYAFS2QFZcjs.textOutlines.call(void 0, layer, shaper);
7518
- const subpaths = parts.flatMap((p) => _chunkZ2H7KECKcjs.bezierToSubpaths.call(void 0, p.path));
7519
- if (!subpaths.length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("The text draws nothing (it is empty or only spaces), so there is no shape to make.");
7519
+ if (!shaper) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Convert to Shape needs a text shaper that gives glyph outlines; none is set here.");
7520
+ const parts = _chunkJLGNZMUVcjs.textOutlines.call(void 0, layer, shaper);
7521
+ const subpaths = parts.flatMap((p) => _chunk2R3UW57Ucjs.bezierToSubpaths.call(void 0, p.path));
7522
+ if (!subpaths.length) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("The text draws nothing (it is empty or only spaces), so there is no shape to make.");
7520
7523
  const warnings = [];
7521
7524
  const colors = new Set(layer.runs.filter((r) => r.length > 0).map((r) => `${r.style.color}/${_nullishCoalesce(r.style.opacity, () => ( 1))}`));
7522
7525
  if (colors.size > 1) warnings.push("The text had several colours; the shape takes the first one.");
7523
- const missing = _chunkZ2H7KECKcjs.layoutText.call(void 0, layer, shaper).missingFonts;
7526
+ const missing = _chunk2R3UW57Ucjs.layoutText.call(void 0, layer, shaper).missingFonts;
7524
7527
  if (missing.length) warnings.push(`Missing fonts were drawn with a fallback: ${missing.join(", ")}.`);
7525
- const first = _nullishCoalesce(_optionalChain([layer, 'access', _281 => _281.runs, 'access', _282 => _282.find, 'call', _283 => _283((r) => r.length > 0), 'optionalAccess', _284 => _284.style]), () => ( _chunkZ2H7KECKcjs.DEFAULT_TEXT_STYLE));
7528
+ const first = _nullishCoalesce(_optionalChain([layer, 'access', _281 => _281.runs, 'access', _282 => _282.find, 'call', _283 => _283((r) => r.length > 0), 'optionalAccess', _284 => _284.style]), () => ( _chunk2R3UW57Ucjs.DEFAULT_TEXT_STYLE));
7526
7529
  const fill = first.opacity !== void 0 && first.opacity !== 1 ? { type: "color", color: first.color, opacity: first.opacity } : { type: "color", color: first.color };
7527
- const shape = _chunkYAFS2QFZcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
7530
+ const shape = _chunkJLGNZMUVcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
7528
7531
  const keep = { visible: layer.visible, opacity: layer.opacity, blend: layer.blend };
7529
7532
  for (const k of ["clipped", "mask", "locks", "effects", "fillOpacity"]) if (layer[k] !== void 0) keep[k] = layer[k];
7530
7533
  this.commitLayers(_chunk24ATT2PEcjs.mapLayer.call(void 0, this.state.layers, id, () => ({ ...shape, ...keep })));
@@ -7532,23 +7535,23 @@ var ImageEditorController = (_class7 = class {
7532
7535
  }
7533
7536
  /** The layout of a type layer (lines, characters, bounds in text space), or `null` without a shaper. */
7534
7537
  getTextLayout(id) {
7535
- const layer = _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7538
+ const layer = _chunkJLGNZMUVcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7536
7539
  const shaper = this.getTextShaper();
7537
- return shaper ? _chunkZ2H7KECKcjs.layoutText.call(void 0, layer, shaper) : null;
7540
+ return shaper ? _chunk2R3UW57Ucjs.layoutText.call(void 0, layer, shaper) : null;
7538
7541
  }
7539
7542
  /** The text index nearest a document point (for clicks on a type layer). */
7540
7543
  textIndexAt(id, point) {
7541
- const layer = _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7544
+ const layer = _chunkJLGNZMUVcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7542
7545
  const layout = this.getTextLayout(id);
7543
- return layout ? _chunkZ2H7KECKcjs.textIndexAt.call(void 0, layout, _chunkYAFS2QFZcjs.toTextSpace.call(void 0, layer, point)) : layer.text.length;
7546
+ return layout ? _chunk2R3UW57Ucjs.textIndexAt.call(void 0, layout, _chunkJLGNZMUVcjs.toTextSpace.call(void 0, layer, point)) : layer.text.length;
7544
7547
  }
7545
7548
  /** The caret at text index `index` as a document-space segment (top to bottom), for drawing it. */
7546
7549
  textCaret(id, index) {
7547
- const layer = _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7550
+ const layer = _chunkJLGNZMUVcjs.requireTypeLayer.call(void 0, this.state.layers, id);
7548
7551
  const layout = this.getTextLayout(id);
7549
7552
  if (!layout) return null;
7550
- const c = _chunkZ2H7KECKcjs.caretAt.call(void 0, layout, Math.max(0, Math.min(layer.text.length, index)));
7551
- const m = _chunkYAFS2QFZcjs.textMatrix.call(void 0, layer);
7553
+ const c = _chunk2R3UW57Ucjs.caretAt.call(void 0, layout, Math.max(0, Math.min(layer.text.length, index)));
7554
+ const m = _chunkJLGNZMUVcjs.textMatrix.call(void 0, layer);
7552
7555
  const at = (x, y) => ({ x: m[0] * x + m[2] * y + m[4], y: m[1] * x + m[3] * y + m[5] });
7553
7556
  return { top: at(c.x, c.top), bottom: at(c.x, c.bottom), line: c.line };
7554
7557
  }
@@ -7559,14 +7562,14 @@ var ImageEditorController = (_class7 = class {
7559
7562
  }
7560
7563
  /** One component from tool or UI input (validated). */
7561
7564
  componentFrom(spec, path) {
7562
- const op = _chunkYAFS2QFZcjs.requireOperation.call(void 0, spec.op, `${path}op`);
7563
- if (spec.shape !== void 0 && spec.subpaths !== void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Give ${path}shape or ${path}subpaths, not both.`);
7564
- if (spec.shape !== void 0) return _chunkYAFS2QFZcjs.liveComponent.call(void 0, _chunkYAFS2QFZcjs.normalizeLiveShape.call(void 0, spec.shape, `${path}shape`), op);
7565
- if (spec.subpaths !== void 0) return { op, subpaths: _chunkYAFS2QFZcjs.normalizeSubpaths.call(void 0, spec.subpaths, `${path}subpaths`) };
7566
- throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`${path}shape (a live shape: { kind: rect | ellipse | polygon | star | line, \u2026 }) or ${path}subpaths (anchors or SVG path data) is required.`);
7565
+ const op = _chunkJLGNZMUVcjs.requireOperation.call(void 0, spec.op, `${path}op`);
7566
+ if (spec.shape !== void 0 && spec.subpaths !== void 0) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Give ${path}shape or ${path}subpaths, not both.`);
7567
+ if (spec.shape !== void 0) return _chunkJLGNZMUVcjs.liveComponent.call(void 0, _chunkJLGNZMUVcjs.normalizeLiveShape.call(void 0, spec.shape, `${path}shape`), op);
7568
+ if (spec.subpaths !== void 0) return { op, subpaths: _chunkJLGNZMUVcjs.normalizeSubpaths.call(void 0, spec.subpaths, `${path}subpaths`) };
7569
+ throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`${path}shape (a live shape: { kind: rect | ellipse | polygon | star | line, \u2026 }) or ${path}subpaths (anchors or SVG path data) is required.`);
7567
7570
  }
7568
7571
  shapeInfo(id) {
7569
- const layer = _chunkYAFS2QFZcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7572
+ const layer = _chunkJLGNZMUVcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7570
7573
  const r = (n) => Math.round(n * 1e3) / 1e3;
7571
7574
  const box = (b) => b ? { x: r(b.x), y: r(b.y), width: r(b.width), height: r(b.height) } : null;
7572
7575
  const info = {
@@ -7576,13 +7579,13 @@ var ImageEditorController = (_class7 = class {
7576
7579
  index,
7577
7580
  op: c.op,
7578
7581
  live: c.live ? JSON.parse(JSON.stringify(c.live)) : null,
7579
- subpaths: _chunkZ2H7KECKcjs.roundSubpaths.call(void 0, c.subpaths),
7580
- bounds: box(_chunkYAFS2QFZcjs.shapeGeometryBounds.call(void 0, { components: [c] }))
7582
+ subpaths: _chunk2R3UW57Ucjs.roundSubpaths.call(void 0, c.subpaths),
7583
+ bounds: box(_chunkJLGNZMUVcjs.shapeGeometryBounds.call(void 0, { components: [c] }))
7581
7584
  })),
7582
7585
  fillRule: _nullishCoalesce(layer.fillRule, () => ( "nonzero")),
7583
7586
  fill: layer.fill ? JSON.parse(JSON.stringify(layer.fill)) : null,
7584
7587
  stroke: layer.stroke ? JSON.parse(JSON.stringify(layer.stroke)) : null,
7585
- geometryBounds: box(_chunkYAFS2QFZcjs.shapeGeometryBounds.call(void 0, layer)),
7588
+ geometryBounds: box(_chunkJLGNZMUVcjs.shapeGeometryBounds.call(void 0, layer)),
7586
7589
  bounds: this.getLayerBounds(id)
7587
7590
  };
7588
7591
  if (layer.annotation) info.annotationId = layer.annotation.id;
@@ -7599,17 +7602,17 @@ var ImageEditorController = (_class7 = class {
7599
7602
  */
7600
7603
  addShapeLayer(init) {
7601
7604
  const specs = _optionalChain([init, 'access', _289 => _289.components, 'optionalAccess', _290 => _290.length]) ? init.components : [init];
7602
- if (_optionalChain([init, 'access', _291 => _291.components, 'optionalAccess', _292 => _292.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
7605
+ if (_optionalChain([init, 'access', _291 => _291.components, 'optionalAccess', _292 => _292.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
7603
7606
  const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _293 => _293.components, 'optionalAccess', _294 => _294.length]) ? `components[${i}].` : ""));
7604
- const stroke = init.stroke ? _chunkYAFS2QFZcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
7607
+ const stroke = init.stroke ? _chunkJLGNZMUVcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
7605
7608
  const openOnly = components.every((c) => !c.live && c.subpaths.every((sp) => !sp.closed));
7606
- const fill = init.fill === void 0 ? stroke && openOnly ? null : _chunkYAFS2QFZcjs.normalizeShapePaint.call(void 0, this.state.paint.foreground, "fill") : init.fill === null ? null : _chunkYAFS2QFZcjs.normalizeShapePaint.call(void 0, init.fill, "fill");
7607
- if (!fill && !stroke) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("A shape with neither fill nor stroke draws nothing; give fill or stroke.");
7608
- if (init.fillRule !== void 0 && init.fillRule !== "nonzero" && init.fillRule !== "evenodd") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7609
- if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("opacity must be between 0 and 1.");
7610
- if (init.blend !== void 0 && !_chunkJ5BA3BQ6cjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
7611
- const layer = _chunkYAFS2QFZcjs.createShapeLayer.call(void 0, { components, fill, stroke, fillRule: init.fillRule, name: init.name, opacity: init.opacity, blend: init.blend }, this.shapeEnv());
7612
- const next = _chunkYAFS2QFZcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
7609
+ const fill = init.fill === void 0 ? stroke && openOnly ? null : _chunkJLGNZMUVcjs.normalizeShapePaint.call(void 0, this.state.paint.foreground, "fill") : init.fill === null ? null : _chunkJLGNZMUVcjs.normalizeShapePaint.call(void 0, init.fill, "fill");
7610
+ if (!fill && !stroke) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("A shape with neither fill nor stroke draws nothing; give fill or stroke.");
7611
+ if (init.fillRule !== void 0 && init.fillRule !== "nonzero" && init.fillRule !== "evenodd") throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7612
+ if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("opacity must be between 0 and 1.");
7613
+ if (init.blend !== void 0 && !_chunkJ5BA3BQ6cjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
7614
+ const layer = _chunkJLGNZMUVcjs.createShapeLayer.call(void 0, { components, fill, stroke, fillRule: init.fillRule, name: init.name, opacity: init.opacity, blend: init.blend }, this.shapeEnv());
7615
+ const next = _chunkJLGNZMUVcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
7613
7616
  this.commitLayers(next, () => {
7614
7617
  this.state.activeLayerId = layer.id;
7615
7618
  this.state.activeTarget = "pixels";
@@ -7622,18 +7625,18 @@ var ImageEditorController = (_class7 = class {
7622
7625
  * only those settings of the current stroke. Returns the shape.
7623
7626
  */
7624
7627
  setShapeStyle(id, changes, commitToHistory = true) {
7625
- const layer = _chunkYAFS2QFZcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7626
- const fill = changes.fill === void 0 ? layer.fill : changes.fill === null ? null : _chunkYAFS2QFZcjs.normalizeShapePaint.call(void 0, changes.fill, "fill");
7627
- const stroke = changes.stroke === void 0 ? layer.stroke : changes.stroke === null ? null : _chunkYAFS2QFZcjs.normalizeShapeStroke.call(void 0, changes.stroke, "stroke", layer.stroke);
7628
- if (changes.fillRule !== void 0 && changes.fillRule !== "nonzero" && changes.fillRule !== "evenodd") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7628
+ const layer = _chunkJLGNZMUVcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7629
+ const fill = changes.fill === void 0 ? layer.fill : changes.fill === null ? null : _chunkJLGNZMUVcjs.normalizeShapePaint.call(void 0, changes.fill, "fill");
7630
+ const stroke = changes.stroke === void 0 ? layer.stroke : changes.stroke === null ? null : _chunkJLGNZMUVcjs.normalizeShapeStroke.call(void 0, changes.stroke, "stroke", layer.stroke);
7631
+ if (changes.fillRule !== void 0 && changes.fillRule !== "nonzero" && changes.fillRule !== "evenodd") throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7629
7632
  const fillRule = _nullishCoalesce(_nullishCoalesce(changes.fillRule, () => ( layer.fillRule)), () => ( "nonzero"));
7630
- const { layers } = _chunkYAFS2QFZcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ fill, stroke, fillRule: fillRule === "nonzero" ? void 0 : fillRule }), this.shapeEnv(), "restyle it");
7633
+ const { layers } = _chunkJLGNZMUVcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ fill, stroke, fillRule: fillRule === "nonzero" ? void 0 : fillRule }), this.shapeEnv(), "restyle it");
7631
7634
  this.commitLayers(layers, void 0, commitToHistory);
7632
7635
  return this.shapeInfo(id);
7633
7636
  }
7634
7637
  componentIndex(layer, index) {
7635
7638
  if (!Number.isInteger(index) || index < 0 || index >= layer.components.length) {
7636
- throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`componentIndex must be 0..${layer.components.length - 1} (get_shape_layer lists the components), got ${String(index)}.`);
7639
+ throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`componentIndex must be 0..${layer.components.length - 1} (get_shape_layer lists the components), got ${String(index)}.`);
7637
7640
  }
7638
7641
  return index;
7639
7642
  }
@@ -7643,36 +7646,36 @@ var ImageEditorController = (_class7 = class {
7643
7646
  * the live shape) or its operation. Returns the shape.
7644
7647
  */
7645
7648
  setShapeComponent(id, index, change, commitToHistory = true) {
7646
- const layer = _chunkYAFS2QFZcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7649
+ const layer = _chunkJLGNZMUVcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7647
7650
  const i = this.componentIndex(layer, index);
7648
7651
  const current = layer.components[i];
7649
7652
  let shape = change.shape;
7650
7653
  if (shape && current.live && shape.kind === void 0) shape = { ...current.live, ...shape };
7651
7654
  else if (shape && current.live && shape.kind === current.live.kind) shape = { ...current.live, ...shape };
7652
- const next = shape !== void 0 || change.subpaths !== void 0 ? this.componentFrom({ ...change, shape, op: _nullishCoalesce(change.op, () => ( current.op)) }, "") : { ...current, op: _chunkYAFS2QFZcjs.requireOperation.call(void 0, change.op) };
7655
+ const next = shape !== void 0 || change.subpaths !== void 0 ? this.componentFrom({ ...change, shape, op: _nullishCoalesce(change.op, () => ( current.op)) }, "") : { ...current, op: _chunkJLGNZMUVcjs.requireOperation.call(void 0, change.op) };
7653
7656
  const components = layer.components.map((c, k) => k === i ? next : c);
7654
- const { layers } = _chunkYAFS2QFZcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7657
+ const { layers } = _chunkJLGNZMUVcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7655
7658
  this.commitLayers(layers, void 0, commitToHistory);
7656
7659
  return this.shapeInfo(id);
7657
7660
  }
7658
7661
  /** Adds a component to a shape (path operations), on top unless `index` is given (one undo step). Returns the shape. */
7659
7662
  addShapeComponent(id, spec, index) {
7660
- const layer = _chunkYAFS2QFZcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7663
+ const layer = _chunkJLGNZMUVcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7661
7664
  const c = this.componentFrom(spec, "");
7662
7665
  const at = index === void 0 ? layer.components.length : index;
7663
- if (!Number.isInteger(at) || at < 0 || at > layer.components.length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`index must be 0..${layer.components.length}, got ${String(index)}.`);
7666
+ if (!Number.isInteger(at) || at < 0 || at > layer.components.length) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`index must be 0..${layer.components.length}, got ${String(index)}.`);
7664
7667
  const components = [...layer.components.slice(0, at), c, ...layer.components.slice(at)];
7665
- const { layers } = _chunkYAFS2QFZcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7668
+ const { layers } = _chunkJLGNZMUVcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7666
7669
  this.commitLayers(layers);
7667
7670
  return this.shapeInfo(id);
7668
7671
  }
7669
7672
  /** Removes one component of a shape (one undo step); the last one cannot go (delete the layer instead). Returns the shape. */
7670
7673
  removeShapeComponent(id, index) {
7671
- const layer = _chunkYAFS2QFZcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7674
+ const layer = _chunkJLGNZMUVcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7672
7675
  const i = this.componentIndex(layer, index);
7673
- if (layer.components.length === 1) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("This is the shape's only component; delete the layer instead (delete_layer).");
7676
+ if (layer.components.length === 1) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("This is the shape's only component; delete the layer instead (delete_layer).");
7674
7677
  const components = layer.components.filter((_, k) => k !== i);
7675
- const { layers } = _chunkYAFS2QFZcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7678
+ const { layers } = _chunkJLGNZMUVcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
7676
7679
  this.commitLayers(layers);
7677
7680
  return this.shapeInfo(id);
7678
7681
  }
@@ -7681,10 +7684,10 @@ var ImageEditorController = (_class7 = class {
7681
7684
  * shapes become paths), as one undo step. Returns the shape.
7682
7685
  */
7683
7686
  mergeShapeComponents(id) {
7684
- const layer = _chunkYAFS2QFZcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7685
- if (layer.components.length < 2) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("The shape has one component; there is nothing to merge.");
7686
- const components = _chunkYAFS2QFZcjs.mergeShapeComponents.call(void 0, layer.components, layer.fillRule);
7687
- const { layers } = _chunkYAFS2QFZcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components, fillRule: void 0 }), this.shapeEnv(), "edit its path");
7687
+ const layer = _chunkJLGNZMUVcjs.requireShapeLayer.call(void 0, this.state.layers, id);
7688
+ if (layer.components.length < 2) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("The shape has one component; there is nothing to merge.");
7689
+ const components = _chunkJLGNZMUVcjs.mergeShapeComponents.call(void 0, layer.components, layer.fillRule);
7690
+ const { layers } = _chunkJLGNZMUVcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components, fillRule: void 0 }), this.shapeEnv(), "edit its path");
7688
7691
  this.commitLayers(layers);
7689
7692
  return this.shapeInfo(id);
7690
7693
  }
@@ -7694,8 +7697,8 @@ var ImageEditorController = (_class7 = class {
7694
7697
  * step. Returns the layer id.
7695
7698
  */
7696
7699
  async rasterizeLayer(id) {
7697
- const layer = _chunkYAFS2QFZcjs.requireLayer.call(void 0, this.state.layers, id).layer;
7698
- _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "all", "rasterize it");
7700
+ const layer = _chunkJLGNZMUVcjs.requireLayer.call(void 0, this.state.layers, id).layer;
7701
+ _chunkJLGNZMUVcjs.requireUnlocked.call(void 0, layer, "all", "rasterize it");
7699
7702
  const { width, height } = this.naturalSize;
7700
7703
  const canvas = { x: 0, y: 0, width, height };
7701
7704
  let next;
@@ -7711,8 +7714,8 @@ var ImageEditorController = (_class7 = class {
7711
7714
  if (layer.locks) next.locks = layer.locks;
7712
7715
  if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
7713
7716
  } else if (layer.type === "pixel") {
7714
- if (!_optionalChain([layer, 'access', _295 => _295.filters, 'optionalAccess', _296 => _296.length])) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
7715
- _chunkYAFS2QFZcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
7717
+ if (!_optionalChain([layer, 'access', _295 => _295.filters, 'optionalAccess', _296 => _296.length])) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
7718
+ _chunkJLGNZMUVcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
7716
7719
  const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
7717
7720
  const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
7718
7721
  delete content.mask;
@@ -7729,10 +7732,10 @@ var ImageEditorController = (_class7 = class {
7729
7732
  } else if (layer.type === "smart") {
7730
7733
  return this.rasterizeSmartObject(id);
7731
7734
  } else if (layer.type === "shape" || layer.type === "type") {
7732
- next = layer.type === "shape" ? _chunkYAFS2QFZcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkYAFS2QFZcjs.typeAsPixelLayer.call(void 0, layer);
7735
+ next = layer.type === "shape" ? _chunkJLGNZMUVcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkJLGNZMUVcjs.typeAsPixelLayer.call(void 0, layer);
7733
7736
  if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _297 => _297.annotation, 'optionalAccess', _298 => _298.id])) this.state.selectedAnnotationId = null;
7734
7737
  } else {
7735
- throw new (0, _chunkYAFS2QFZcjs.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.`);
7738
+ throw new (0, _chunkJLGNZMUVcjs.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.`);
7736
7739
  }
7737
7740
  this.commitLayers(_chunk24ATT2PEcjs.mapLayer.call(void 0, this.state.layers, id, () => next));
7738
7741
  return id;
@@ -7757,7 +7760,7 @@ var ImageEditorController = (_class7 = class {
7757
7760
  setColorMode(mode, options = {}) {
7758
7761
  let next;
7759
7762
  if (mode === "rgb") {
7760
- if (options.profile !== void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("An RGB document takes no CMYK profile; use assign_profile for its working space.");
7763
+ if (options.profile !== void 0) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("An RGB document takes no CMYK profile; use assign_profile for its working space.");
7761
7764
  next = null;
7762
7765
  } else if (mode === "lab") next = { mode: "lab" };
7763
7766
  else if (mode === "cmyk") {
@@ -7765,14 +7768,14 @@ var ImageEditorController = (_class7 = class {
7765
7768
  try {
7766
7769
  doc = documentProfile(_nullishCoalesce(options.profile, () => ( "coated-cmyk")));
7767
7770
  } catch (e) {
7768
- throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7771
+ throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7769
7772
  }
7770
7773
  const cs = resolveProfile(doc).colorSpace;
7771
- if (cs !== "cmyk") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`CMYK mode needs a CMYK profile; "${doc.name}" is ${cs.toUpperCase()}.`);
7774
+ if (cs !== "cmyk") throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`CMYK mode needs a CMYK profile; "${doc.name}" is ${cs.toUpperCase()}.`);
7772
7775
  const intent = _nullishCoalesce(options.intent, () => ( "relative"));
7773
- if (!_chunkG5NMLUVFcjs.INTENTS.includes(intent)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkG5NMLUVFcjs.INTENTS.join(", ")}.`);
7776
+ if (!_chunkG5NMLUVFcjs.INTENTS.includes(intent)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkG5NMLUVFcjs.INTENTS.join(", ")}.`);
7774
7777
  next = { mode: "cmyk", profile: doc, intent };
7775
- } else throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown colour mode "${String(mode)}"; use rgb, cmyk or lab.`);
7778
+ } else throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Unknown colour mode "${String(mode)}"; use rgb, cmyk or lab.`);
7776
7779
  this.recordHistory();
7777
7780
  if (next) this.state.colorMode = next;
7778
7781
  else delete this.state.colorMode;
@@ -7785,10 +7788,10 @@ var ImageEditorController = (_class7 = class {
7785
7788
  try {
7786
7789
  doc = documentProfile(profile);
7787
7790
  } catch (e) {
7788
- throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7791
+ throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7789
7792
  }
7790
7793
  const cs = resolveProfile(doc).colorSpace;
7791
- if (cs !== "rgb") throw new (0, _chunkYAFS2QFZcjs.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.`);
7794
+ if (cs !== "rgb") throw new (0, _chunkJLGNZMUVcjs.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.`);
7792
7795
  return doc;
7793
7796
  }
7794
7797
  /**
@@ -7814,7 +7817,7 @@ var ImageEditorController = (_class7 = class {
7814
7817
  convertToProfile(profile, options = {}) {
7815
7818
  const doc = this.rgbProfileArg(profile, "Convert to Profile");
7816
7819
  const intent = _nullishCoalesce(options.intent, () => ( "relative"));
7817
- if (!_chunkG5NMLUVFcjs.INTENTS.includes(intent)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkG5NMLUVFcjs.INTENTS.join(", ")}.`);
7820
+ if (!_chunkG5NMLUVFcjs.INTENTS.includes(intent)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkG5NMLUVFcjs.INTENTS.join(", ")}.`);
7818
7821
  const t = _chunkG5NMLUVFcjs.Transform.create(resolveProfile(this.state.colorProfile), resolveProfile(doc), { intent, bpc: _nullishCoalesce(options.bpc, () => ( true)) });
7819
7822
  const converted = [];
7820
7823
  const unconverted = [];
@@ -7844,11 +7847,11 @@ var ImageEditorController = (_class7 = class {
7844
7847
  else if (l.type === "pixel") next2 = { ...next2, surface: convertSurfaceColors(this.surfaceOf(l), t), source: void 0 };
7845
7848
  else if (l.type === "shape") {
7846
7849
  const s = next2;
7847
- next2 = _chunkYAFS2QFZcjs.rerenderShape.call(void 0, { ...s, fill: convertColorFields(s.fill, hex), stroke: convertColorFields(s.stroke, hex), ...s.annotation ? { annotation: convertColorFields(s.annotation, hex) } : {} }, shapeEnv);
7850
+ next2 = _chunkJLGNZMUVcjs.rerenderShape.call(void 0, { ...s, fill: convertColorFields(s.fill, hex), stroke: convertColorFields(s.stroke, hex), ...s.annotation ? { annotation: convertColorFields(s.annotation, hex) } : {} }, shapeEnv);
7848
7851
  } else if (l.type === "type") {
7849
7852
  const recoloured = { ...next2, runs: convertColorFields(l.runs, hex) };
7850
7853
  try {
7851
- next2 = _chunkYAFS2QFZcjs.rerenderText.call(void 0, recoloured, textEnv);
7854
+ next2 = _chunkJLGNZMUVcjs.rerenderText.call(void 0, recoloured, textEnv);
7852
7855
  } catch (e27) {
7853
7856
  next2 = { ...recoloured, surface: convertSurfaceColors(l.surface, t) };
7854
7857
  }
@@ -7878,12 +7881,12 @@ var ImageEditorController = (_class7 = class {
7878
7881
  try {
7879
7882
  doc = documentProfile(setup.profile);
7880
7883
  } catch (e) {
7881
- throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7884
+ throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7882
7885
  }
7883
7886
  const intent = _nullishCoalesce(setup.intent, () => ( DEFAULT_PROOF.intent));
7884
- if (!_chunkG5NMLUVFcjs.INTENTS.includes(intent)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkG5NMLUVFcjs.INTENTS.join(", ")}.`);
7887
+ if (!_chunkG5NMLUVFcjs.INTENTS.includes(intent)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkG5NMLUVFcjs.INTENTS.join(", ")}.`);
7885
7888
  const next = { ...DEFAULT_PROOF, ...setup, intent, profile: doc };
7886
- if (!_chunkG5NMLUVFcjs.canBeDestination.call(void 0, resolveProfile(doc))) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`"${doc.name}" describes a source only, so colours cannot be proofed through it.`);
7889
+ if (!_chunkG5NMLUVFcjs.canBeDestination.call(void 0, resolveProfile(doc))) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`"${doc.name}" describes a source only, so colours cannot be proofed through it.`);
7887
7890
  this.state.proofSetup = next;
7888
7891
  this.notify();
7889
7892
  return next;
@@ -7900,14 +7903,14 @@ var ImageEditorController = (_class7 = class {
7900
7903
  src = options.from !== void 0 ? resolveProfile(documentProfile(options.from)) : resolveProfile(this.state.colorProfile);
7901
7904
  dst = resolveProfile(documentProfile(to));
7902
7905
  } catch (e) {
7903
- throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7906
+ throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
7904
7907
  }
7905
- if (src.colorSpace !== "rgb") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Colours are given as #rrggbb, so the source profile must be RGB.");
7908
+ if (src.colorSpace !== "rgb") throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Colours are given as #rrggbb, so the source profile must be RGB.");
7906
7909
  const t = _chunkG5NMLUVFcjs.Transform.create(src, dst, { intent: _nullishCoalesce(options.intent, () => ( "relative")), bpc: _nullishCoalesce(options.bpc, () => ( true)) });
7907
7910
  const toLab = _chunkG5NMLUVFcjs.Transform.create(src, _chunkG5NMLUVFcjs.builtinProfile.call(void 0, "lab-d50"), { intent: "relative", bpc: false });
7908
7911
  return colors.map((input) => {
7909
7912
  const m = /^#?([0-9a-f]{6})$/i.exec(input.trim());
7910
- if (!m) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Invalid colour "${input}"; use #rrggbb.`);
7913
+ if (!m) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Invalid colour "${input}"; use #rrggbb.`);
7911
7914
  const n = parseInt(m[1], 16);
7912
7915
  const rgb = [(n >> 16 & 255) / 255, (n >> 8 & 255) / 255, (n & 255) / 255];
7913
7916
  const out = new Float32Array(16);
@@ -7933,7 +7936,7 @@ var ImageEditorController = (_class7 = class {
7933
7936
  * the ids of the layers whose pixels changed.
7934
7937
  */
7935
7938
  setBitDepth(depth) {
7936
- if (!_chunkJ5BA3BQ6cjs.isBitDepth.call(void 0, depth)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Bit depth must be 8, 16 or 32, not ${String(depth)}.`);
7939
+ if (!_chunkJ5BA3BQ6cjs.isBitDepth.call(void 0, depth)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Bit depth must be 8, 16 or 32, not ${String(depth)}.`);
7937
7940
  const changed = [];
7938
7941
  const withMask = (l) => {
7939
7942
  const m = l.mask;
@@ -7982,7 +7985,7 @@ var ImageEditorController = (_class7 = class {
7982
7985
  * Throws `PsdError` for files that cannot be read at all.
7983
7986
  */
7984
7987
  loadPsd(bytes) {
7985
- const result = _chunkYAFS2QFZcjs.importPsd.call(void 0, bytes, { newId: () => _chunkYAFS2QFZcjs.newLayerId.call(void 0, ) });
7988
+ const result = _chunkJLGNZMUVcjs.importPsd.call(void 0, bytes, { newId: () => _chunkJLGNZMUVcjs.newLayerId.call(void 0, ) });
7986
7989
  this.abandonContents();
7987
7990
  this.recordHistory();
7988
7991
  const s = this.state;
@@ -7992,7 +7995,7 @@ var ImageEditorController = (_class7 = class {
7992
7995
  if (!this.samplePixelsOverride) this.samplePixels = null;
7993
7996
  s.layers = this.checkPsdFonts(result);
7994
7997
  s.crop = null;
7995
- s.transform = { ..._chunkYAFS2QFZcjs.DEFAULT_TRANSFORM_VALUES };
7998
+ s.transform = { ..._chunkJLGNZMUVcjs.DEFAULT_TRANSFORM_VALUES };
7996
7999
  s.outputOpacity = 1;
7997
8000
  delete s.legacyOutputBlur;
7998
8001
  s.selection = null;
@@ -8043,7 +8046,7 @@ var ImageEditorController = (_class7 = class {
8043
8046
  let layers = result.layers;
8044
8047
  const missing = /* @__PURE__ */ new Map();
8045
8048
  for (const l of types) {
8046
- const fonts = shaper ? _chunkZ2H7KECKcjs.layoutText.call(void 0, l, shaper).missingFonts : [...new Set(l.runs.map((r) => r.style.fontFamily))];
8049
+ const fonts = shaper ? _chunk2R3UW57Ucjs.layoutText.call(void 0, l, shaper).missingFonts : [...new Set(l.runs.map((r) => r.style.fontFamily))];
8047
8050
  if (!fonts.length) continue;
8048
8051
  layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, missingFonts: fonts }));
8049
8052
  for (const f of fonts) missing.set(f, [..._nullishCoalesce(missing.get(f), () => ( [])), l.name]);
@@ -8071,7 +8074,7 @@ var ImageEditorController = (_class7 = class {
8071
8074
  const canRasterize = this.renderer.canRasterize();
8072
8075
  await this.renderer.prepareLayerAssets(this.state.layers, width, height);
8073
8076
  const sources = this.renderer.compositorSources(width, height);
8074
- const compositor = new (0, _chunkYAFS2QFZcjs.LayerCompositor)();
8077
+ const compositor = new (0, _chunkJLGNZMUVcjs.LayerCompositor)();
8075
8078
  const bakeMask = (layer) => {
8076
8079
  const mask = layer.mask;
8077
8080
  if (!_optionalChain([mask, 'optionalAccess', _309 => _309.source])) return mask;
@@ -8153,7 +8156,7 @@ var ImageEditorController = (_class7 = class {
8153
8156
  out.surface = this.surfaceOf(layer);
8154
8157
  delete out.source;
8155
8158
  }
8156
- const active = _nullishCoalesce(_optionalChain([layer, 'access', _313 => _313.filters, 'optionalAccess', _314 => _314.filter, 'call', _315 => _315(_chunkYAFS2QFZcjs.isActiveFilter)]), () => ( []));
8159
+ const active = _nullishCoalesce(_optionalChain([layer, 'access', _313 => _313.filters, 'optionalAccess', _314 => _314.filter, 'call', _315 => _315(_chunkJLGNZMUVcjs.isActiveFilter)]), () => ( []));
8157
8160
  if (active.length) {
8158
8161
  add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
8159
8162
  const content = { ...out, visible: true, opacity: 1, blend: "normal" };
@@ -8186,8 +8189,8 @@ var ImageEditorController = (_class7 = class {
8186
8189
  const color = this.psdColorOptions(warnings);
8187
8190
  if (color.colorMode && this.bitDepth === 32) warnings.push(`${color.colorMode.toUpperCase()} files are written at 16 bits per channel at most; the 32-bit samples were converted (colour above 1 clipped).`);
8188
8191
  const depth = color.colorMode && this.bitDepth === 32 ? 16 : this.bitDepth;
8189
- const mergedDeep = depth === 8 ? void 0 : _chunk24ATT2PEcjs.workingToSamples.call(void 0, _chunkYAFS2QFZcjs.compositeDeep.call(void 0, prepared, canvas, sources, depth), depth);
8190
- const result = _chunkYAFS2QFZcjs.exportPsd.call(void 0, { width, height, layers: prepared, merged, mergedDeep, resolution: this.psdResolution, patterns: this.state.patterns, globalLight: this.state.globalLight, depth, ...color });
8192
+ const mergedDeep = depth === 8 ? void 0 : _chunk24ATT2PEcjs.workingToSamples.call(void 0, _chunkJLGNZMUVcjs.compositeDeep.call(void 0, prepared, canvas, sources, depth), depth);
8193
+ const result = _chunkJLGNZMUVcjs.exportPsd.call(void 0, { width, height, layers: prepared, merged, mergedDeep, resolution: this.psdResolution, patterns: this.state.patterns, globalLight: this.state.globalLight, depth, ...color });
8191
8194
  warnings.push(...result.warnings);
8192
8195
  return { bytes: result.bytes, warnings, psb: result.psb, width, height };
8193
8196
  }
@@ -8203,13 +8206,13 @@ var ImageEditorController = (_class7 = class {
8203
8206
  if (!this.samplePixelsOverride) this.samplePixels = null;
8204
8207
  if (this.state.selection && (sx !== 1 || sy !== 1)) {
8205
8208
  this.state.selection = normalizeSelection(
8206
- _chunkYAFS2QFZcjs.resizeSelection.call(void 0, this.state.selection, Math.round(next.dimensions.width), Math.round(next.dimensions.height))
8209
+ _chunkJLGNZMUVcjs.resizeSelection.call(void 0, this.state.selection, Math.round(next.dimensions.width), Math.round(next.dimensions.height))
8207
8210
  );
8208
8211
  }
8209
8212
  let layers = this.state.layers;
8210
8213
  if (sx !== 1 || sy !== 1) {
8211
8214
  if (this.state.crop) {
8212
- this.state.crop = _chunkYAFS2QFZcjs.clampCropToImage.call(void 0,
8215
+ this.state.crop = _chunkJLGNZMUVcjs.clampCropToImage.call(void 0,
8213
8216
  {
8214
8217
  x: Math.round(this.state.crop.x * sx),
8215
8218
  y: Math.round(this.state.crop.y * sy),
@@ -8228,17 +8231,17 @@ var ImageEditorController = (_class7 = class {
8228
8231
  } else if (l.type === "shape") {
8229
8232
  const a = l.annotation;
8230
8233
  const scaled = a ? scaleAnnotation(a, sx, sy) : null;
8231
- const fromAnnotation = scaled ? _chunkYAFS2QFZcjs.shapeFromAnnotation.call(void 0, scaled) : null;
8234
+ const fromAnnotation = scaled ? _chunkJLGNZMUVcjs.shapeFromAnnotation.call(void 0, scaled) : null;
8232
8235
  const m = [sx, 0, 0, sy, 0, 0];
8233
- const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _323 => _323.components]), () => ( _chunkYAFS2QFZcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
8236
+ const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _323 => _323.components]), () => ( _chunkJLGNZMUVcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
8234
8237
  const moved = { ...l, components, ...fromAnnotation ? { fill: fromAnnotation.fill, stroke: fromAnnotation.stroke } : {} };
8235
8238
  if (scaled && fromAnnotation) moved.annotation = scaled;
8236
8239
  else delete moved.annotation;
8237
- layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, layers, l.id, () => _chunkYAFS2QFZcjs.rerenderShape.call(void 0, moved, env));
8240
+ layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, layers, l.id, () => _chunkJLGNZMUVcjs.rerenderShape.call(void 0, moved, env));
8238
8241
  }
8239
8242
  }
8240
8243
  }
8241
- const bg = _chunkYAFS2QFZcjs.developTarget.call(void 0, layers, null);
8244
+ const bg = _chunkJLGNZMUVcjs.developTarget.call(void 0, layers, null);
8242
8245
  if (bg && bg.source !== "document") layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, layers, bg.id, () => ({ ...bg, source: "document" }));
8243
8246
  if (clearAnnotations) {
8244
8247
  for (const l of _chunk24ATT2PEcjs.flattenLayers.call(void 0, layers)) if (l.type === "annotation" || (l.type === "shape" || l.type === "type") && l.annotation) layers = _chunk24ATT2PEcjs.mapLayer.call(void 0, layers, l.id, () => null);
@@ -8259,7 +8262,7 @@ var ImageEditorController = (_class7 = class {
8259
8262
  let out;
8260
8263
  try {
8261
8264
  out = this.serializeState();
8262
- if (_optionalChain([this, 'access', _327 => _327.state, 'access', _328 => _328.selection, 'optionalAccess', _329 => _329.bounds])) out.selection = _chunkYAFS2QFZcjs.serializeSelection.call(void 0, this.state.selection);
8265
+ if (_optionalChain([this, 'access', _327 => _327.state, 'access', _328 => _328.selection, 'optionalAccess', _329 => _329.bounds])) out.selection = _chunkJLGNZMUVcjs.serializeSelection.call(void 0, this.state.selection);
8263
8266
  } finally {
8264
8267
  if (root) {
8265
8268
  this.state = current;
@@ -8267,8 +8270,8 @@ var ImageEditorController = (_class7 = class {
8267
8270
  this.viewKey = [];
8268
8271
  }
8269
8272
  }
8270
- if (!options || out.version !== _chunkYAFS2QFZcjs.LAYERED_SCHEMA_VERSION) return options ? Promise.resolve(out) : out;
8271
- return _chunkYAFS2QFZcjs.serializeLayersExternal.call(void 0, this.rootLayers(), options.store).then(({ layers, assets, smartContents }) => smartContents ? { ...out, layers, assets, smartContents } : { ...out, layers, assets });
8273
+ if (!options || out.version !== _chunkJLGNZMUVcjs.LAYERED_SCHEMA_VERSION) return options ? Promise.resolve(out) : out;
8274
+ return _chunkJLGNZMUVcjs.serializeLayersExternal.call(void 0, this.rootLayers(), options.store).then(({ layers, assets, smartContents }) => smartContents ? { ...out, layers, assets, smartContents } : { ...out, layers, assets });
8272
8275
  }
8273
8276
  /**
8274
8277
  * Loads a stored state whose v3 assets may live in an asset store (references other than data
@@ -8276,12 +8279,12 @@ var ImageEditorController = (_class7 = class {
8276
8279
  * out and listed in `lastLoadProblems`.
8277
8280
  */
8278
8281
  async loadJSONAsync(data, options = {}) {
8279
- if (data.version !== _chunkYAFS2QFZcjs.LAYERED_SCHEMA_VERSION || !data.assets) {
8282
+ if (data.version !== _chunkJLGNZMUVcjs.LAYERED_SCHEMA_VERSION || !data.assets) {
8280
8283
  this.loadJSON(data);
8281
8284
  return;
8282
8285
  }
8283
8286
  const problems = [];
8284
- const assets = await _chunkYAFS2QFZcjs.resolveExternalAssets.call(void 0, data.assets, options.store, problems);
8287
+ const assets = await _chunkJLGNZMUVcjs.resolveExternalAssets.call(void 0, data.assets, options.store, problems);
8285
8288
  this.loadJSON({ ...data, assets });
8286
8289
  this.lastLoadProblems = [...problems, ...this.lastLoadProblems];
8287
8290
  }
@@ -8293,7 +8296,7 @@ var ImageEditorController = (_class7 = class {
8293
8296
  let selection = null;
8294
8297
  if (data.selection) {
8295
8298
  try {
8296
- selection = normalizeSelection(_chunkYAFS2QFZcjs.deserializeSelection.call(void 0, data.selection));
8299
+ selection = normalizeSelection(_chunkJLGNZMUVcjs.deserializeSelection.call(void 0, data.selection));
8297
8300
  } catch (e28) {
8298
8301
  selection = null;
8299
8302
  }
@@ -8311,8 +8314,8 @@ var ImageEditorController = (_class7 = class {
8311
8314
  if (isLayered(data)) {
8312
8315
  const problems = [];
8313
8316
  const canvas = typeof data.width === "number" && data.width > 0 && typeof data.height === "number" && data.height > 0 ? { width: data.width, height: data.height } : this.naturalSize;
8314
- const storedPatterns = _chunkYAFS2QFZcjs.deserializePatterns.call(void 0, data.patterns, []);
8315
- s.layers = _chunkYAFS2QFZcjs.deserializeLayers.call(void 0, data.layers, {
8317
+ const storedPatterns = _chunkJLGNZMUVcjs.deserializePatterns.call(void 0, data.patterns, []);
8318
+ s.layers = _chunkJLGNZMUVcjs.deserializeLayers.call(void 0, data.layers, {
8316
8319
  assets: _nullishCoalesce(data.assets, () => ( {})),
8317
8320
  problems,
8318
8321
  smartContents: Array.isArray(data.smartContents) ? data.smartContents : [],
@@ -8330,7 +8333,7 @@ var ImageEditorController = (_class7 = class {
8330
8333
  const light = data.globalLight;
8331
8334
  if (light && Number.isFinite(light.angle) && Number.isFinite(light.altitude)) s.globalLight = { angle: light.angle, altitude: Math.min(90, Math.max(0, light.altitude)) };
8332
8335
  else delete s.globalLight;
8333
- const patterns = _chunkYAFS2QFZcjs.deserializePatterns.call(void 0, data.patterns, problems);
8336
+ const patterns = _chunkJLGNZMUVcjs.deserializePatterns.call(void 0, data.patterns, problems);
8334
8337
  if (patterns.length) s.patterns = patterns;
8335
8338
  else delete s.patterns;
8336
8339
  if (data.bitDepth === 16 || data.bitDepth === 32) s.bitDepth = data.bitDepth;
@@ -8346,7 +8349,7 @@ var ImageEditorController = (_class7 = class {
8346
8349
  }
8347
8350
  } else {
8348
8351
  const { width, height } = this.naturalSize;
8349
- const stack = _chunkYAFS2QFZcjs.layersFromLegacy.call(void 0, data, width, height);
8352
+ const stack = _chunkJLGNZMUVcjs.layersFromLegacy.call(void 0, data, width, height);
8350
8353
  s.layers = stack.layers;
8351
8354
  s.outputOpacity = stack.outputOpacity;
8352
8355
  if (stack.legacyOutputBlur !== void 0) s.legacyOutputBlur = stack.legacyOutputBlur;
@@ -8367,7 +8370,7 @@ var ImageEditorController = (_class7 = class {
8367
8370
  }
8368
8371
  serializeState() {
8369
8372
  const { width, height } = this.naturalSize;
8370
- const view = _chunkYAFS2QFZcjs.legacyView.call(void 0, this.stack(), width, height, null);
8373
+ const view = _chunkJLGNZMUVcjs.legacyView.call(void 0, this.stack(), width, height, null);
8371
8374
  if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _330 => _330.state, 'access', _331 => _331.patterns, 'optionalAccess', _332 => _332.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
8372
8375
  return {
8373
8376
  // States without adjustment layers keep schema 1, so they round-trip unchanged.
@@ -8382,9 +8385,9 @@ var ImageEditorController = (_class7 = class {
8382
8385
  annotations: JSON.parse(JSON.stringify(view.annotations))
8383
8386
  };
8384
8387
  }
8385
- const { layers, assets, smartContents } = _chunkYAFS2QFZcjs.serializeLayers.call(void 0, this.state.layers);
8388
+ const { layers, assets, smartContents } = _chunkJLGNZMUVcjs.serializeLayers.call(void 0, this.state.layers);
8386
8389
  const out = {
8387
- version: _chunkYAFS2QFZcjs.LAYERED_SCHEMA_VERSION,
8390
+ version: _chunkJLGNZMUVcjs.LAYERED_SCHEMA_VERSION,
8388
8391
  width,
8389
8392
  height,
8390
8393
  layers,
@@ -8396,7 +8399,7 @@ var ImageEditorController = (_class7 = class {
8396
8399
  };
8397
8400
  if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
8398
8401
  if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
8399
- if (_optionalChain([this, 'access', _336 => _336.state, 'access', _337 => _337.patterns, 'optionalAccess', _338 => _338.length])) out.patterns = _chunkYAFS2QFZcjs.serializePatterns.call(void 0, this.state.patterns);
8402
+ if (_optionalChain([this, 'access', _336 => _336.state, 'access', _337 => _337.patterns, 'optionalAccess', _338 => _338.length])) out.patterns = _chunkJLGNZMUVcjs.serializePatterns.call(void 0, this.state.patterns);
8400
8403
  if (smartContents) out.smartContents = smartContents;
8401
8404
  if (this.state.bitDepth === 16 || this.state.bitDepth === 32) out.bitDepth = this.state.bitDepth;
8402
8405
  if (this.state.colorProfile) out.colorProfile = serializeColorProfile(this.state.colorProfile);
@@ -8408,7 +8411,7 @@ function serializeAdjustments(adjustments) {
8408
8411
  const out = { ...adjustments };
8409
8412
  if (_optionalChain([out, 'access', _339 => _339.layers, 'optionalAccess', _340 => _340.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
8410
8413
  else delete out.layers;
8411
- if (_chunkYAFS2QFZcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkYAFS2QFZcjs.LEGACY_PROCESS_VERSION) {
8414
+ if (_chunkJLGNZMUVcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkJLGNZMUVcjs.LEGACY_PROCESS_VERSION) {
8412
8415
  delete out.process;
8413
8416
  if (!out.tint) delete out.tint;
8414
8417
  }
@@ -8419,7 +8422,7 @@ function withDevelop(layer, partial) {
8419
8422
  let i = filters.findIndex((f) => f.kind === "develop");
8420
8423
  if (i === -1) {
8421
8424
  filters.unshift({
8422
- id: layer.source === "document" ? _chunkYAFS2QFZcjs.DEVELOP_FILTER_ID : _chunkYAFS2QFZcjs.newLayerId.call(void 0, "flt"),
8425
+ id: layer.source === "document" ? _chunkJLGNZMUVcjs.DEVELOP_FILTER_ID : _chunkJLGNZMUVcjs.newLayerId.call(void 0, "flt"),
8423
8426
  kind: "develop",
8424
8427
  enabled: true,
8425
8428
  brightness: 0,
@@ -8428,7 +8431,7 @@ function withDevelop(layer, partial) {
8428
8431
  exposure: 0,
8429
8432
  temperature: 0,
8430
8433
  tint: 0,
8431
- process: _chunkYAFS2QFZcjs.LATEST_PROCESS_VERSION
8434
+ process: _chunkJLGNZMUVcjs.LATEST_PROCESS_VERSION
8432
8435
  });
8433
8436
  i = 0;
8434
8437
  }
@@ -8437,7 +8440,7 @@ function withDevelop(layer, partial) {
8437
8440
  const v = partial[k];
8438
8441
  if (typeof v === "number" && Number.isFinite(v)) next[k] = v;
8439
8442
  }
8440
- if ("process" in partial) next.process = _chunkYAFS2QFZcjs.normalizeProcessVersion.call(void 0, partial.process);
8443
+ if ("process" in partial) next.process = _chunkJLGNZMUVcjs.normalizeProcessVersion.call(void 0, partial.process);
8441
8444
  filters[i] = next;
8442
8445
  return { ...layer, filters };
8443
8446
  }
@@ -8446,7 +8449,7 @@ function withBlur(layer, radius) {
8446
8449
  const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
8447
8450
  if (radius > 0) {
8448
8451
  filters.push({
8449
- id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _344 => _344.id]), () => ( (layer.source === "document" ? _chunkYAFS2QFZcjs.BLUR_FILTER_ID : _chunkYAFS2QFZcjs.newLayerId.call(void 0, "flt")))),
8452
+ id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _344 => _344.id]), () => ( (layer.source === "document" ? _chunkJLGNZMUVcjs.BLUR_FILTER_ID : _chunkJLGNZMUVcjs.newLayerId.call(void 0, "flt")))),
8450
8453
  kind: "blur",
8451
8454
  enabled: true,
8452
8455
  radius
@@ -8470,7 +8473,7 @@ function mergeAdjustmentNode(node, update, width, height) {
8470
8473
  if (!update.mask) delete next.mask;
8471
8474
  else {
8472
8475
  const current = node.mask && !node.mask.source ? node.mask : null;
8473
- const memo = current ? _chunkYAFS2QFZcjs.legacyMaskOf.call(void 0, current, width, height) : null;
8476
+ const memo = current ? _chunkJLGNZMUVcjs.legacyMaskOf.call(void 0, current, width, height) : null;
8474
8477
  if (current && memo && memo.width === update.mask.width && memo.height === update.mask.height && memo.rle === update.mask.rle) {
8475
8478
  next.mask = withMaskProps(current, {
8476
8479
  density: _nullishCoalesce(update.mask.density, () => ( 1)),
@@ -8478,7 +8481,7 @@ function mergeAdjustmentNode(node, update, width, height) {
8478
8481
  enabled: update.mask.enabled !== false
8479
8482
  });
8480
8483
  } else {
8481
- const m = _chunkYAFS2QFZcjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height);
8484
+ const m = _chunkJLGNZMUVcjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height);
8482
8485
  if (m) next.mask = m;
8483
8486
  else delete next.mask;
8484
8487
  }
@@ -8517,7 +8520,7 @@ function resizeLegacyMasks(layers, from, to) {
8517
8520
  for (const l of _chunk24ATT2PEcjs.flattenLayers.call(void 0, layers)) {
8518
8521
  if (l.type !== "adjustment" || !l.mask || l.mask.source) continue;
8519
8522
  const old = l.mask;
8520
- const mask = _chunkYAFS2QFZcjs.rasterMaskFromLegacy.call(void 0, _chunkYAFS2QFZcjs.legacyMaskOf.call(void 0, old, fw, fh), tw, th);
8523
+ const mask = _chunkJLGNZMUVcjs.rasterMaskFromLegacy.call(void 0, _chunkJLGNZMUVcjs.legacyMaskOf.call(void 0, old, fw, fh), tw, th);
8521
8524
  if (!mask) continue;
8522
8525
  out = _chunk24ATT2PEcjs.mapLayer.call(void 0, out, l.id, (n) => ({ ...n, mask: { ...mask, density: old.density, feather: old.feather, enabled: old.enabled } }));
8523
8526
  }
@@ -8613,12 +8616,12 @@ function withoutAnnotations(layers) {
8613
8616
  function parseColor(value) {
8614
8617
  if (Array.isArray(value)) {
8615
8618
  if (value.length < 3 || value.length > 4 || !value.every((v) => typeof v === "number" && v >= 0 && v <= 255)) {
8616
- throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("A colour array is [r, g, b] or [r, g, b, a] with values 0..255.");
8619
+ throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("A colour array is [r, g, b] or [r, g, b, a] with values 0..255.");
8617
8620
  }
8618
8621
  return [Math.round(value[0]), Math.round(value[1]), Math.round(value[2]), Math.round(_nullishCoalesce(value[3], () => ( 255)))];
8619
8622
  }
8620
8623
  const m = /^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(String(value).trim());
8621
- if (!m) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Invalid colour "${value}"; use #rrggbb or #rrggbbaa.`);
8624
+ if (!m) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Invalid colour "${value}"; use #rrggbb or #rrggbbaa.`);
8622
8625
  let hex = m[1];
8623
8626
  if (hex.length === 3) hex = hex.split("").map((c) => c + c).join("");
8624
8627
  const n = (i) => parseInt(hex.slice(i, i + 2), 16);
@@ -8628,7 +8631,7 @@ function readImagePaint(raw) {
8628
8631
  try {
8629
8632
  return _chunk6GFRKLLScjs.parsePaintSource.call(void 0, raw);
8630
8633
  } catch (e) {
8631
- if (e instanceof _chunk6GFRKLLScjs.PaintSourceError) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(e.message);
8634
+ if (e instanceof _chunk6GFRKLLScjs.PaintSourceError) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(e.message);
8632
8635
  throw e;
8633
8636
  }
8634
8637
  }
@@ -8776,7 +8779,7 @@ function loadImageEditorDocument(input) {
8776
8779
  // Optional: only present when something was selected when saving.
8777
8780
  selection: {
8778
8781
  parse: (value) => {
8779
- const mask = _chunkYAFS2QFZcjs.deserializeSelection.call(void 0, value);
8782
+ const mask = _chunkJLGNZMUVcjs.deserializeSelection.call(void 0, value);
8780
8783
  const v = value;
8781
8784
  return { width: mask.width, height: mask.height, rle: v.rle };
8782
8785
  },
@@ -8864,7 +8867,7 @@ function loadLayeredDocument(doc) {
8864
8867
  },
8865
8868
  selection: {
8866
8869
  parse: (value) => {
8867
- const mask = _chunkYAFS2QFZcjs.deserializeSelection.call(void 0, value);
8870
+ const mask = _chunkJLGNZMUVcjs.deserializeSelection.call(void 0, value);
8868
8871
  const v = value;
8869
8872
  return { width: mask.width, height: mask.height, rle: v.rle };
8870
8873
  },
@@ -9258,14 +9261,14 @@ function describeSelection(mask) {
9258
9261
  // src/image-editor/selection-tools.ts
9259
9262
  var modeSchema = {
9260
9263
  type: "string",
9261
- enum: [..._chunkYAFS2QFZcjs.SELECTION_MODES],
9264
+ enum: [..._chunkJLGNZMUVcjs.SELECTION_MODES],
9262
9265
  description: "How the result combines with the current selection (default replace)."
9263
9266
  };
9264
9267
  var num = (v, d) => typeof v === "number" && Number.isFinite(v) ? v : d;
9265
9268
  function summary(controller) {
9266
9269
  const sel = controller.getSelection();
9267
9270
  const { width, height } = controller.getState().imageDimensions;
9268
- const area = _chunkYAFS2QFZcjs.selectionArea.call(void 0, sel);
9271
+ const area = _chunkJLGNZMUVcjs.selectionArea.call(void 0, sel);
9269
9272
  return {
9270
9273
  empty: !sel,
9271
9274
  bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _356 => _356.bounds]), () => ( null)),
@@ -9311,7 +9314,7 @@ function createImageSelectionTools(controller) {
9311
9314
  },
9312
9315
  annotations: writeAnnotations("Select a region", true),
9313
9316
  handler: ({ shape, x, y, width, height, mode, feather }) => {
9314
- const opts = { mode: _chunkYAFS2QFZcjs.parseSelectionMode.call(void 0, mode), feather: num(feather, 0) };
9317
+ const opts = { mode: _chunkJLGNZMUVcjs.parseSelectionMode.call(void 0, mode), feather: num(feather, 0) };
9315
9318
  switch (shape) {
9316
9319
  case "all":
9317
9320
  controller.selectAll();
@@ -9364,7 +9367,7 @@ function createImageSelectionTools(controller) {
9364
9367
  annotations: writeAnnotations("Select by colour", true),
9365
9368
  handler: async ({ x, y, color, tolerance, contiguous, fuzziness, sampleMerged, sample, mode }) => {
9366
9369
  const common = {
9367
- mode: _chunkYAFS2QFZcjs.parseSelectionMode.call(void 0, mode),
9370
+ mode: _chunkJLGNZMUVcjs.parseSelectionMode.call(void 0, mode),
9368
9371
  sampleMerged: sampleMerged === true,
9369
9372
  sample: _nullishCoalesce(sample, () => ( "composite"))
9370
9373
  };
@@ -9385,7 +9388,7 @@ function createImageSelectionTools(controller) {
9385
9388
  inputSchema: {
9386
9389
  type: "object",
9387
9390
  properties: {
9388
- op: { type: "string", enum: [..._chunkYAFS2QFZcjs.SELECTION_MODIFY_OPS], description: "How to modify the selection." },
9391
+ op: { type: "string", enum: [..._chunkJLGNZMUVcjs.SELECTION_MODIFY_OPS], description: "How to modify the selection." },
9389
9392
  radius: { type: "number", minimum: 0, maximum: 500, description: "Radius in pixels." }
9390
9393
  },
9391
9394
  required: ["op", "radius"],
@@ -9393,7 +9396,7 @@ function createImageSelectionTools(controller) {
9393
9396
  },
9394
9397
  annotations: writeAnnotations("Modify the selection"),
9395
9398
  handler: ({ op, radius }) => {
9396
- if (!_chunkYAFS2QFZcjs.SELECTION_MODIFY_OPS.includes(op)) throw new Error(`Unknown op "${String(op)}".`);
9399
+ if (!_chunkJLGNZMUVcjs.SELECTION_MODIFY_OPS.includes(op)) throw new Error(`Unknown op "${String(op)}".`);
9397
9400
  if (!controller.getSelection()) throw new Error("Nothing is selected.");
9398
9401
  controller.modifySelection(op, Math.min(500, Math.max(0, num(radius, 0))));
9399
9402
  return summary(controller);
@@ -9437,7 +9440,7 @@ function createImageSelectionTools(controller) {
9437
9440
  type: "object",
9438
9441
  properties: {
9439
9442
  layerId: { type: "string", description: "Existing adjustment layer to mask." },
9440
- kind: { type: "string", enum: _chunkYAFS2QFZcjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Kind of a new layer to add and mask (instead of layerId)." },
9443
+ kind: { type: "string", enum: _chunkJLGNZMUVcjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Kind of a new layer to add and mask (instead of layerId)." },
9441
9444
  params: { type: "object", description: "Parameters for the new layer (see list_controls)." },
9442
9445
  density: { type: "number", minimum: 0, maximum: 1, description: "Mask density 0-1." },
9443
9446
  feather: { type: "number", minimum: 0, maximum: 1e3, description: "Mask feather in pixels." }
@@ -9457,11 +9460,11 @@ function createImageSelectionTools(controller) {
9457
9460
  if (!controller.getAdjustmentLayer(layerId)) throw new Error(`No adjustment layer "${layerId}".`);
9458
9461
  controller.applySelectionAsLayerMask(layerId, props);
9459
9462
  id = layerId;
9460
- } else if (_chunkYAFS2QFZcjs.isAdjustmentKind.call(void 0, kind)) {
9463
+ } else if (_chunkJLGNZMUVcjs.isAdjustmentKind.call(void 0, kind)) {
9461
9464
  id = controller.addAdjustmentLayer({
9462
9465
  kind,
9463
9466
  params,
9464
- mask: _chunkYAFS2QFZcjs.layerMaskFromSelection.call(void 0, sel, props)
9467
+ mask: _chunkJLGNZMUVcjs.layerMaskFromSelection.call(void 0, sel, props)
9465
9468
  });
9466
9469
  } else {
9467
9470
  throw new Error("Pass layerId (an existing layer) or kind (a new adjustment layer).");
@@ -9598,11 +9601,11 @@ function createImageEditTools(controller) {
9598
9601
  const geometry2 = () => {
9599
9602
  const s = controller.getState();
9600
9603
  const region = _nullishCoalesce(s.crop, () => ( { x: 0, y: 0, ...s.imageDimensions }));
9601
- const out = _chunkYAFS2QFZcjs.getRotatedSize.call(void 0, region.width, region.height, s.transform);
9604
+ const out = _chunkJLGNZMUVcjs.getRotatedSize.call(void 0, region.width, region.height, s.transform);
9602
9605
  return {
9603
9606
  image: { ...s.imageDimensions },
9604
9607
  crop: s.crop ? { ...s.crop } : null,
9605
- rotation: _chunkYAFS2QFZcjs.normalizeAngle.call(void 0, s.transform.rotate),
9608
+ rotation: _chunkJLGNZMUVcjs.normalizeAngle.call(void 0, s.transform.rotate),
9606
9609
  flipH: s.transform.flipH,
9607
9610
  flipV: s.transform.flipV,
9608
9611
  output: { width: Math.round(out.width), height: Math.round(out.height) }
@@ -9837,7 +9840,7 @@ function describeLayer(layer, activeId, boundsOf) {
9837
9840
  const out = {
9838
9841
  id: layer.id,
9839
9842
  type: layer.type,
9840
- name: layer.name || (layer.type === "adjustment" ? _chunkYAFS2QFZcjs.adjustmentKindLabel.call(void 0, layer.kind) : ""),
9843
+ name: layer.name || (layer.type === "adjustment" ? _chunkJLGNZMUVcjs.adjustmentKindLabel.call(void 0, layer.kind) : ""),
9841
9844
  visible: layer.visible,
9842
9845
  opacity: round3(layer.opacity),
9843
9846
  blend: layer.blend,
@@ -9926,8 +9929,8 @@ function createImageLayerTools(controller) {
9926
9929
  };
9927
9930
  };
9928
9931
  const exists = (id, what = "layerId") => {
9929
- if (typeof id !== "string" || !id) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`${what} is required (a layer id from list_layers).`);
9930
- _chunkYAFS2QFZcjs.requireLayer.call(void 0, controller.getLayers(), id);
9932
+ if (typeof id !== "string" || !id) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`${what} is required (a layer id from list_layers).`);
9933
+ _chunkJLGNZMUVcjs.requireLayer.call(void 0, controller.getLayers(), id);
9931
9934
  return id;
9932
9935
  };
9933
9936
  const listLayers = {
@@ -9963,7 +9966,7 @@ function createImageLayerTools(controller) {
9963
9966
  handler: ({ layerId, target }) => {
9964
9967
  const id = exists(layerId);
9965
9968
  const layer = controller.getLayer(id);
9966
- if (target === "mask" && !layer.mask) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
9969
+ if (target === "mask" && !layer.mask) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
9967
9970
  controller.setActiveLayer(id, _nullishCoalesce(target, () => ( "pixels")));
9968
9971
  return { layer: describe(id), activeTarget: controller.getState().activeTarget };
9969
9972
  }
@@ -9988,7 +9991,7 @@ function createImageLayerTools(controller) {
9988
9991
  },
9989
9992
  annotations: { title: "Add a pixel layer", ...WRITE2 },
9990
9993
  handler: async (args) => {
9991
- if (args.color !== void 0 && args.image !== void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give color or image, not both.");
9994
+ if (args.color !== void 0 && args.image !== void 0) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give color or image, not both.");
9992
9995
  for (const k of ["aboveId", "belowId", "parentId"]) if (args[k] !== void 0) exists(args[k], k);
9993
9996
  const init = {
9994
9997
  name: args.name,
@@ -10078,7 +10081,7 @@ function createImageLayerTools(controller) {
10078
10081
  const id = exists(args.layerId);
10079
10082
  const props = {};
10080
10083
  for (const k of ["name", "visible", "opacity", "fillOpacity", "blend", "clipped", "locks", "collapsed"]) if (args[k] !== void 0) props[k] = args[k];
10081
- if (!Object.keys(props).length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give at least one property to change.");
10084
+ if (!Object.keys(props).length) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give at least one property to change.");
10082
10085
  controller.setLayerProperties(id, props);
10083
10086
  return { layer: describe(id) };
10084
10087
  }
@@ -10172,8 +10175,8 @@ function createImageLayerTools(controller) {
10172
10175
  annotations: { title: "Move a layer's pixels", ...WRITE2 },
10173
10176
  handler: ({ layerId, x, y, dx, dy }) => {
10174
10177
  const id = exists(layerId);
10175
- if ([x, y, dx, dy].every((v) => v === void 0)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give x and y, or dx and dy.");
10176
- if ((x !== void 0 || y !== void 0) && (dx !== void 0 || dy !== void 0)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give x / y or dx / dy, not both.");
10178
+ if ([x, y, dx, dy].every((v) => v === void 0)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give x and y, or dx and dy.");
10179
+ if ((x !== void 0 || y !== void 0) && (dx !== void 0 || dy !== void 0)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give x / y or dx / dy, not both.");
10177
10180
  return { layerId: id, ...controller.offsetLayer(id, { x, y, dx, dy }) };
10178
10181
  }
10179
10182
  };
@@ -10245,7 +10248,7 @@ function createImageLayerTools(controller) {
10245
10248
  annotations: { title: "Set layer mask properties", ...WRITE_IDEMPOTENT2 },
10246
10249
  handler: ({ layerId, density, feather, enabled, linked }) => {
10247
10250
  const id = exists(layerId);
10248
- if ([density, feather, enabled, linked].every((v) => v === void 0)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give density, feather, enabled or linked.");
10251
+ if ([density, feather, enabled, linked].every((v) => v === void 0)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give density, feather, enabled or linked.");
10249
10252
  const mask = controller.setLayerMaskProps(id, {
10250
10253
  density,
10251
10254
  feather,
@@ -10328,7 +10331,7 @@ function createImageLayerTools(controller) {
10328
10331
  handler: (args) => {
10329
10332
  const id = exists(args.layerId);
10330
10333
  const changes = filterValues(args);
10331
- if (!Object.keys(changes).length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give at least one value to change.");
10334
+ if (!Object.keys(changes).length) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give at least one value to change.");
10332
10335
  return { layerId: id, filters: controller.updateLayerFilter(id, args.filterId, changes) };
10333
10336
  }
10334
10337
  };
@@ -10592,8 +10595,8 @@ function describeLayerEffects(effects) {
10592
10595
  }
10593
10596
  function createImageEffectTools(controller) {
10594
10597
  const layerArg = (id) => {
10595
- if (typeof id !== "string" || !id) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("layerId is required (a layer id from list_layers).");
10596
- _chunkYAFS2QFZcjs.requireLayer.call(void 0, controller.getLayers(), id);
10598
+ if (typeof id !== "string" || !id) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("layerId is required (a layer id from list_layers).");
10599
+ _chunkJLGNZMUVcjs.requireLayer.call(void 0, controller.getLayers(), id);
10597
10600
  return id;
10598
10601
  };
10599
10602
  const result = (layerId, extra = {}) => ({ layerId, ...extra, ...describeLayerEffects(controller.getLayerEffects(layerId)) });
@@ -10624,7 +10627,7 @@ function createImageEffectTools(controller) {
10624
10627
  annotations: { title: "Add a layer effect", ...WRITE3 },
10625
10628
  handler: ({ layerId, kind, settings, index }) => {
10626
10629
  const id = layerArg(layerId);
10627
- if (!_chunk24ATT2PEcjs.isLayerEffectKind.call(void 0, kind)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`kind must be one of ${_chunk24ATT2PEcjs.LAYER_EFFECT_KINDS.join(", ")}.`);
10630
+ if (!_chunk24ATT2PEcjs.isLayerEffectKind.call(void 0, kind)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`kind must be one of ${_chunk24ATT2PEcjs.LAYER_EFFECT_KINDS.join(", ")}.`);
10628
10631
  const { effect } = controller.addLayerEffect(id, kind, _nullishCoalesce(settings, () => ( {})), index);
10629
10632
  return result(id, { effectId: effect.id });
10630
10633
  }
@@ -10644,7 +10647,7 @@ function createImageEffectTools(controller) {
10644
10647
  handler: ({ layerId, effectId, settings }) => {
10645
10648
  const id = layerArg(layerId);
10646
10649
  const changes = _nullishCoalesce(settings, () => ( {}));
10647
- if (!Object.keys(changes).length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give at least one setting to change.");
10650
+ if (!Object.keys(changes).length) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give at least one setting to change.");
10648
10651
  controller.updateLayerEffect(id, effectId, changes);
10649
10652
  return result(id);
10650
10653
  }
@@ -10696,7 +10699,7 @@ function createImageEffectTools(controller) {
10696
10699
  },
10697
10700
  annotations: { title: "Set the global light", ...WRITE_IDEMPOTENT3 },
10698
10701
  handler: ({ angle, altitude }) => {
10699
- if (angle === void 0 && altitude === void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give angle, altitude or both.");
10702
+ if (angle === void 0 && altitude === void 0) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give angle, altitude or both.");
10700
10703
  const next = {};
10701
10704
  if (angle !== void 0) next.angle = angle;
10702
10705
  if (altitude !== void 0) next.altitude = altitude;
@@ -10909,7 +10912,7 @@ var PaintGesture = (_class8 = class {
10909
10912
  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.`);
10910
10913
  if (_optionalChain([layer, 'access', _370 => _370.locks, 'optionalAccess', _371 => _371.all]) || _optionalChain([layer, 'access', _372 => _372.locks, 'optionalAccess', _373 => _373.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
10911
10914
  const origin = layer.type === "pixel" ? { ...layer.offset } : layer.type === "smart" ? { ...layer.placement.corners[0] } : (() => {
10912
- const b = _chunkYAFS2QFZcjs.shapeGeometryBounds.call(void 0, layer);
10915
+ const b = _chunkJLGNZMUVcjs.shapeGeometryBounds.call(void 0, layer);
10913
10916
  return b ? { x: b.x, y: b.y } : { x: 0, y: 0 };
10914
10917
  })();
10915
10918
  this.move = { id: layer.id, start: { x: sample.x, y: sample.y }, origin, moved: false };
@@ -11067,9 +11070,9 @@ function createImagePaintTools(controller) {
11067
11070
  annotations: { title: "Paint a brush stroke", ...WRITE4 },
11068
11071
  handler: (args) => {
11069
11072
  const tool = args.tool;
11070
- if (args.mixer !== void 0 && tool !== "mixer") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)('mixer settings apply to the Mixer Brush only; pass tool "mixer", or drop mixer.');
11071
- if (args.paint !== void 0 && (_nullishCoalesce(tool, () => ( "brush"))) !== "brush") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)('paint applies to the brush only (the eraser removes paint; the Mixer Brush loads color); drop paint or use tool "brush".');
11072
- if (args.paint !== void 0 && args.color !== void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give color or paint, not both.");
11073
+ if (args.mixer !== void 0 && tool !== "mixer") throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)('mixer settings apply to the Mixer Brush only; pass tool "mixer", or drop mixer.');
11074
+ if (args.paint !== void 0 && (_nullishCoalesce(tool, () => ( "brush"))) !== "brush") throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)('paint applies to the brush only (the eraser removes paint; the Mixer Brush loads color); drop paint or use tool "brush".');
11075
+ if (args.paint !== void 0 && args.color !== void 0) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give color or paint, not both.");
11073
11076
  const result = controller.paintStroke({
11074
11077
  tool,
11075
11078
  points: args.points,
@@ -11200,7 +11203,7 @@ function profileArg(v) {
11200
11203
  try {
11201
11204
  return _chunkDCLJNVZScjs.base64ToBytes.call(void 0, s.slice(4));
11202
11205
  } catch (e30) {
11203
- throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("The icc: value is not valid base64.");
11206
+ throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("The icc: value is not valid base64.");
11204
11207
  }
11205
11208
  }
11206
11209
  return s;
@@ -11265,10 +11268,10 @@ function createImageColorTools(controller) {
11265
11268
  annotations: { title: "Set up soft proofing", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
11266
11269
  handler: (args) => {
11267
11270
  if (args.off === true) {
11268
- if (args.profile !== void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give either off true or a profile, not both.");
11271
+ if (args.profile !== void 0) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give either off true or a profile, not both.");
11269
11272
  return controller.setProofSetup(null);
11270
11273
  }
11271
- if (args.profile === void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Pass the profile to proof with (e.g. coated-cmyk), or off true.");
11274
+ if (args.profile === void 0) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Pass the profile to proof with (e.g. coated-cmyk), or off true.");
11272
11275
  const s = controller.setProofSetup({
11273
11276
  profile: profileArg(args.profile),
11274
11277
  ...args.intent !== void 0 ? { intent: args.intent } : {},
@@ -11320,7 +11323,7 @@ function createImageColorTools(controller) {
11320
11323
  },
11321
11324
  annotations: { title: "Set the colour mode", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
11322
11325
  handler: (args) => {
11323
- if (args.mode !== "cmyk" && (args.profile !== void 0 || args.intent !== void 0)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("profile and intent apply to CMYK mode only.");
11326
+ if (args.mode !== "cmyk" && (args.profile !== void 0 || args.intent !== void 0)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("profile and intent apply to CMYK mode only.");
11324
11327
  return controller.setColorMode(args.mode, {
11325
11328
  ...args.profile !== void 0 ? { profile: profileArg(args.profile) } : {},
11326
11329
  ...args.intent !== void 0 ? { intent: args.intent } : {}
@@ -11385,7 +11388,7 @@ function checkSource(controller, source) {
11385
11388
  const p = source;
11386
11389
  const { width, height } = controller.getState().imageDimensions;
11387
11390
  if (!(p.x >= 0 && p.y >= 0 && p.x < width && p.y < height)) {
11388
- throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`source (${p.x}, ${p.y}) is outside the ${width} \xD7 ${height} canvas; pick a point on the image to sample.`);
11391
+ throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`source (${p.x}, ${p.y}) is outside the ${width} \xD7 ${height} canvas; pick a point on the image to sample.`);
11389
11392
  }
11390
11393
  return p;
11391
11394
  }
@@ -11625,10 +11628,10 @@ function createImageRetouchTools(controller) {
11625
11628
  annotations: { title: "Set the clone source", ...WRITE5, idempotentHint: true },
11626
11629
  handler: (args) => {
11627
11630
  if (args.clear === true) {
11628
- if (args.x !== void 0 || args.y !== void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give either clear true or x and y, not both.");
11631
+ if (args.x !== void 0 || args.y !== void 0) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give either clear true or x and y, not both.");
11629
11632
  return controller.setCloneSource(null);
11630
11633
  }
11631
- if (typeof args.x !== "number" || typeof args.y !== "number") throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Pass x and y (document pixels) for the source point, or clear true to remove it.");
11634
+ if (typeof args.x !== "number" || typeof args.y !== "number") throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Pass x and y (document pixels) for the source point, or clear true to remove it.");
11632
11635
  return controller.setCloneSource(checkSource(controller, { x: args.x, y: args.y }));
11633
11636
  }
11634
11637
  };
@@ -11651,7 +11654,7 @@ function createImageRetouchTools(controller) {
11651
11654
  annotations: { title: "Transform the clone source", ...WRITE5, idempotentHint: false },
11652
11655
  handler: (args) => {
11653
11656
  if (args.reset === true) {
11654
- if (Object.keys(args).some((k) => k !== "reset")) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give either reset true or transform values, not both.");
11657
+ if (Object.keys(args).some((k) => k !== "reset")) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give either reset true or transform values, not both.");
11655
11658
  return controller.setCloneTransform(null);
11656
11659
  }
11657
11660
  const cur = controller.getState().paint.cloneTransform;
@@ -11661,7 +11664,7 @@ function createImageRetouchTools(controller) {
11661
11664
  if (args.rotate !== void 0) next.rotate = args.rotate;
11662
11665
  if (args.flipHorizontal === true) next.scaleX = -(_nullishCoalesce(next.scaleX, () => ( cur.scaleX)));
11663
11666
  if (args.flipVertical === true) next.scaleY = -(_nullishCoalesce(next.scaleY, () => ( cur.scaleY)));
11664
- if (!Object.keys(next).length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Pass scaleX, scaleY, rotate, flipHorizontal or flipVertical, or reset true.");
11667
+ if (!Object.keys(next).length) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Pass scaleX, scaleY, rotate, flipHorizontal or flipVertical, or reset true.");
11665
11668
  return controller.setCloneTransform(next);
11666
11669
  }
11667
11670
  };
@@ -11682,11 +11685,11 @@ var DATA = {
11682
11685
  description: "The PSD or PSB file as base64 (a `data:` URL prefix is accepted)."
11683
11686
  };
11684
11687
  function psdBytesFromBase64(data) {
11685
- if (typeof data !== "string" || !data.trim()) throw new (0, _chunkYAFS2QFZcjs.PsdError)("data is required: the PSD file as base64.");
11688
+ if (typeof data !== "string" || !data.trim()) throw new (0, _chunkJLGNZMUVcjs.PsdError)("data is required: the PSD file as base64.");
11686
11689
  const body = data.trim().replace(/^data:[^,]*;base64,/i, "");
11687
- if (!/^[A-Za-z0-9+/=_\s-]+$/.test(body)) throw new (0, _chunkYAFS2QFZcjs.PsdError)("data is not base64; send the PSD file bytes base64-encoded.");
11690
+ if (!/^[A-Za-z0-9+/=_\s-]+$/.test(body)) throw new (0, _chunkJLGNZMUVcjs.PsdError)("data is not base64; send the PSD file bytes base64-encoded.");
11688
11691
  const bytes = _chunkDCLJNVZScjs.base64ToBytes.call(void 0, body);
11689
- if (bytes.length < 26) throw new (0, _chunkYAFS2QFZcjs.PsdError)(`data decodes to ${bytes.length} bytes, too short for a PSD (at least 26).`);
11692
+ if (bytes.length < 26) throw new (0, _chunkJLGNZMUVcjs.PsdError)(`data decodes to ${bytes.length} bytes, too short for a PSD (at least 26).`);
11690
11693
  return bytes;
11691
11694
  }
11692
11695
  function createImagePsdTools(controller) {
@@ -11697,7 +11700,7 @@ function createImagePsdTools(controller) {
11697
11700
  inputSchema: { type: "object", properties: { data: DATA }, required: ["data"], additionalProperties: false },
11698
11701
  annotations: { title: "Inspect a PSD", ...READ7 },
11699
11702
  handler: ({ data }) => {
11700
- const res = _chunkYAFS2QFZcjs.importPsd.call(void 0, psdBytesFromBase64(data), { skipPixels: true });
11703
+ const res = _chunkJLGNZMUVcjs.importPsd.call(void 0, psdBytesFromBase64(data), { skipPixels: true });
11701
11704
  return {
11702
11705
  width: res.width,
11703
11706
  height: res.height,
@@ -11784,7 +11787,7 @@ var GEOMETRY = {
11784
11787
  dy: { type: "number", description: "Move down after scaling and rotating, in document pixels (default 0)." },
11785
11788
  reference: {
11786
11789
  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}.",
11787
- anyOf: [{ type: "string", enum: _chunkYAFS2QFZcjs.TRANSFORM_ANCHORS }, POINT]
11790
+ anyOf: [{ type: "string", enum: _chunkJLGNZMUVcjs.TRANSFORM_ANCHORS }, POINT]
11788
11791
  },
11789
11792
  matrix: {
11790
11793
  type: "array",
@@ -11805,14 +11808,14 @@ var NUMERIC = ["scaleX", "scaleY", "rotate", "skewX", "skewY", "dx", "dy", "refe
11805
11808
  function geometryFrom(args) {
11806
11809
  const numeric = NUMERIC.filter((k) => args[k] !== void 0);
11807
11810
  const ways = [numeric.length > 0, args.matrix !== void 0, args.corners !== void 0].filter(Boolean).length;
11808
- if (ways === 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give the transform one way: numeric fields (scaleX, scaleY, rotate, skewX, skewY, dx, dy, reference), matrix, or corners.");
11809
- if (ways > 1) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give the transform only one way: numeric fields, matrix or corners, not a mix.");
11811
+ if (ways === 0) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give the transform one way: numeric fields (scaleX, scaleY, rotate, skewX, skewY, dx, dy, reference), matrix, or corners.");
11812
+ if (ways > 1) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give the transform only one way: numeric fields, matrix or corners, not a mix.");
11810
11813
  if (args.matrix !== void 0) return { matrix: args.matrix };
11811
11814
  if (args.corners !== void 0) return { corners: args.corners };
11812
11815
  const params = {};
11813
11816
  for (const k of NUMERIC) if (args[k] !== void 0) params[k] = args[k];
11814
- if (params.scaleX === 0 || params.scaleY === 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the layer to a line).");
11815
- if (typeof params.reference === "string" && !_chunkYAFS2QFZcjs.isTransformAnchor.call(void 0, params.reference)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Unknown reference "${params.reference}". Use ${_chunkYAFS2QFZcjs.TRANSFORM_ANCHORS.join(", ")} or {x, y}.`);
11817
+ if (params.scaleX === 0 || params.scaleY === 0) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the layer to a line).");
11818
+ if (typeof params.reference === "string" && !_chunkJLGNZMUVcjs.isTransformAnchor.call(void 0, params.reference)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Unknown reference "${params.reference}". Use ${_chunkJLGNZMUVcjs.TRANSFORM_ANCHORS.join(", ")} or {x, y}.`);
11816
11819
  return { params };
11817
11820
  }
11818
11821
  function targetFrom(args) {
@@ -11861,15 +11864,15 @@ function createImageTransformTools(controller) {
11861
11864
  moved: [...s.moves],
11862
11865
  frame: { ...s.box },
11863
11866
  corners: s.startGeometry.corners.map(roundPoint),
11864
- center: roundPoint(_chunkYAFS2QFZcjs.anchorPoint.call(void 0, s.startGeometry, "center"))
11867
+ center: roundPoint(_chunkJLGNZMUVcjs.anchorPoint.call(void 0, s.startGeometry, "center"))
11865
11868
  };
11866
11869
  if (s.smartObject) out.smartObject = true;
11867
11870
  s.cancel();
11868
11871
  if (args.meshColumns !== void 0) {
11869
11872
  const cols = args.meshColumns;
11870
11873
  const rows = _nullishCoalesce(args.meshRows, () => ( cols));
11871
- const mesh = _chunkZ2H7KECKcjs.identityWarpMesh.call(void 0, s.box, cols, rows);
11872
- out.mesh = { columns: cols, rows, pointsPerRow: _chunkZ2H7KECKcjs.warpMeshColumns.call(void 0, mesh), pointRows: _chunkZ2H7KECKcjs.warpMeshRows.call(void 0, mesh), points: mesh.points.map(roundPoint) };
11874
+ const mesh = _chunk2R3UW57Ucjs.identityWarpMesh.call(void 0, s.box, cols, rows);
11875
+ out.mesh = { columns: cols, rows, pointsPerRow: _chunk2R3UW57Ucjs.warpMeshColumns.call(void 0, mesh), pointRows: _chunk2R3UW57Ucjs.warpMeshRows.call(void 0, mesh), points: mesh.points.map(roundPoint) };
11873
11876
  }
11874
11877
  return out;
11875
11878
  }
@@ -11894,7 +11897,7 @@ function createImageTransformTools(controller) {
11894
11897
  type: "object",
11895
11898
  properties: {
11896
11899
  ...TARGET3,
11897
- style: { type: "string", enum: _chunkZ2H7KECKcjs.WARP_STYLES, description: "Preset warp (Photoshop\u2019s menu): arc, arcLower, arcUpper, arch, bulge, shellLower, shellUpper, flag, wave, fish, rise, fisheye, inflate, squeeze, twist." },
11900
+ style: { type: "string", enum: _chunk2R3UW57Ucjs.WARP_STYLES, description: "Preset warp (Photoshop\u2019s menu): arc, arcLower, arcUpper, arch, bulge, shellLower, shellUpper, flag, wave, fish, rise, fisheye, inflate, squeeze, twist." },
11898
11901
  bend: { type: "number", minimum: -100, maximum: 100, description: "Preset bend in percent, \u2212100..100 (default 50)." },
11899
11902
  horizontal: { type: "number", minimum: -100, maximum: 100, description: "Preset horizontal distortion in percent, \u2212100..100 (default 0)." },
11900
11903
  vertical: { type: "number", minimum: -100, maximum: 100, description: "Preset vertical distortion in percent, \u2212100..100 (default 0)." },
@@ -11916,11 +11919,11 @@ function createImageTransformTools(controller) {
11916
11919
  annotations: { title: "Warp a layer", ...WRITE6 },
11917
11920
  handler: (args) => {
11918
11921
  const hasPreset = ["style", "bend", "horizontal", "vertical", "orientation"].some((k) => args[k] !== void 0);
11919
- if (hasPreset && args.mesh !== void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give a preset (style, bend, horizontal, vertical, orientation) or a mesh, not both.");
11920
- if (!hasPreset && args.mesh === void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give a preset style or a mesh.");
11922
+ if (hasPreset && args.mesh !== void 0) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give a preset (style, bend, horizontal, vertical, orientation) or a mesh, not both.");
11923
+ if (!hasPreset && args.mesh === void 0) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give a preset style or a mesh.");
11921
11924
  let warp;
11922
11925
  if (hasPreset) {
11923
- if (args.style === void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`style is required with a preset. Styles: ${_chunkZ2H7KECKcjs.WARP_STYLES.join(", ")}.`);
11926
+ if (args.style === void 0) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`style is required with a preset. Styles: ${_chunk2R3UW57Ucjs.WARP_STYLES.join(", ")}.`);
11924
11927
  warp = {
11925
11928
  style: args.style,
11926
11929
  bend: _nullishCoalesce(args.bend, () => ( 50)),
@@ -11931,7 +11934,7 @@ function createImageTransformTools(controller) {
11931
11934
  } else {
11932
11935
  const m = args.mesh;
11933
11936
  const want = (3 * m.columns + 1) * (3 * m.rows + 1);
11934
- if (m.points.length !== want) throw new (0, _chunkYAFS2QFZcjs.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}.`);
11937
+ if (m.points.length !== want) throw new (0, _chunkJLGNZMUVcjs.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}.`);
11935
11938
  const knots = (n) => Array.from({ length: n + 1 }, (_, i) => i / n);
11936
11939
  warp = { us: knots(m.columns), vs: knots(m.rows), points: m.points.map((p) => ({ x: p.x, y: p.y })) };
11937
11940
  }
@@ -12026,13 +12029,13 @@ function settingsFrom(args) {
12026
12029
  return out;
12027
12030
  }
12028
12031
  function imageArg(image) {
12029
- if (typeof image !== "string" || !image.trim()) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("image is required: a PNG as a data URL or base64 (other formats need a browser).");
12032
+ if (typeof image !== "string" || !image.trim()) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("image is required: a PNG as a data URL or base64 (other formats need a browser).");
12030
12033
  return image.trim();
12031
12034
  }
12032
12035
  function createImageSmartObjectTools(controller) {
12033
12036
  const smartId = (id) => {
12034
- if (typeof id !== "string" || !id) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("layerId is required (a smart object id from list_layers).");
12035
- _chunkYAFS2QFZcjs.requireSmartObject.call(void 0, controller.getLayers(), id);
12037
+ if (typeof id !== "string" || !id) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("layerId is required (a smart object id from list_layers).");
12038
+ _chunkJLGNZMUVcjs.requireSmartObject.call(void 0, controller.getLayers(), id);
12036
12039
  return id;
12037
12040
  };
12038
12041
  const info = (id) => {
@@ -12069,7 +12072,7 @@ function createImageSmartObjectTools(controller) {
12069
12072
  },
12070
12073
  annotations: { title: "Convert to Smart Object", ...WRITE7 },
12071
12074
  handler: ({ layerIds, name }) => {
12072
- for (const id2 of _nullishCoalesce(layerIds, () => ( []))) _chunkYAFS2QFZcjs.requireLayer.call(void 0, controller.getLayers(), id2);
12075
+ for (const id2 of _nullishCoalesce(layerIds, () => ( []))) _chunkJLGNZMUVcjs.requireLayer.call(void 0, controller.getLayers(), id2);
12073
12076
  const id = controller.convertToSmartObject(layerIds, { name });
12074
12077
  return { layer: layerSummary(id), smartObject: info(id) };
12075
12078
  }
@@ -12106,7 +12109,7 @@ function createImageSmartObjectTools(controller) {
12106
12109
  {
12107
12110
  type: "object",
12108
12111
  properties: {
12109
- style: { type: "string", enum: _chunkZ2H7KECKcjs.WARP_STYLES, description: "Preset (Photoshop\u2019s menu)." },
12112
+ style: { type: "string", enum: _chunk2R3UW57Ucjs.WARP_STYLES, description: "Preset (Photoshop\u2019s menu)." },
12110
12113
  bend: { type: "number", minimum: -100, maximum: 100, description: "Bend in percent (default 50)." },
12111
12114
  horizontal: { type: "number", minimum: -100, maximum: 100, description: "Horizontal distortion in percent (default 0)." },
12112
12115
  vertical: { type: "number", minimum: -100, maximum: 100, description: "Vertical distortion in percent (default 0)." },
@@ -12142,12 +12145,12 @@ function createImageSmartObjectTools(controller) {
12142
12145
  else if (w) {
12143
12146
  const m = w;
12144
12147
  const want = (3 * m.columns + 1) * (3 * m.rows + 1);
12145
- if (m.points.length !== want) throw new (0, _chunkYAFS2QFZcjs.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}.`);
12148
+ if (m.points.length !== want) throw new (0, _chunkJLGNZMUVcjs.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}.`);
12146
12149
  const knots = (n) => Array.from({ length: n + 1 }, (_, i) => i / n);
12147
12150
  warp = { us: knots(m.columns), vs: knots(m.rows), points: m.points.map((p) => ({ x: p.x, y: p.y })) };
12148
12151
  }
12149
12152
  const keys = ["corners", "matrix", "scaleX", "scaleY", "rotate", "skewX", "skewY", "x", "y", "warp", "interpolation"];
12150
- if (!keys.some((k) => args[k] !== void 0)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Give something to set: ${keys.join(", ")}.`);
12153
+ if (!keys.some((k) => args[k] !== void 0)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Give something to set: ${keys.join(", ")}.`);
12151
12154
  const res = controller.setSmartObjectTransform(id, {
12152
12155
  corners: args.corners,
12153
12156
  matrix: args.matrix,
@@ -12272,7 +12275,7 @@ function createImageSmartObjectTools(controller) {
12272
12275
  handler: (args) => {
12273
12276
  const id = smartId(args.layerId);
12274
12277
  const changes = settingsFrom(args);
12275
- if (!Object.keys(changes).length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give at least one value to change.");
12278
+ if (!Object.keys(changes).length) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give at least one value to change.");
12276
12279
  const filter = controller.updateSmartFilter(id, args.filterId, changes);
12277
12280
  return { layerId: id, filter, smartFilters: info(id).smartFilters };
12278
12281
  }
@@ -12593,8 +12596,8 @@ function geometry(args) {
12593
12596
  }
12594
12597
  function createImageShapeTools(controller) {
12595
12598
  const shapeId = (id) => {
12596
- if (typeof id !== "string" || !id) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("layerId is required (a shape layer id from list_layers).");
12597
- _chunkYAFS2QFZcjs.requireShapeLayer.call(void 0, controller.getLayers(), id);
12599
+ if (typeof id !== "string" || !id) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("layerId is required (a shape layer id from list_layers).");
12600
+ _chunkJLGNZMUVcjs.requireShapeLayer.call(void 0, controller.getLayers(), id);
12598
12601
  return id;
12599
12602
  };
12600
12603
  const layerSummary = (id) => {
@@ -12669,7 +12672,7 @@ function createImageShapeTools(controller) {
12669
12672
  annotations: { title: "Restyle a shape", ...WRITE_IDEMPOTENT5 },
12670
12673
  handler: ({ layerId, fill, stroke, fillRule }) => {
12671
12674
  const id = shapeId(layerId);
12672
- if (fill === void 0 && stroke === void 0 && fillRule === void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give fill, stroke or fillRule to change.");
12675
+ if (fill === void 0 && stroke === void 0 && fillRule === void 0) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give fill, stroke or fillRule to change.");
12673
12676
  return controller.setShapeStyle(id, { fill, stroke, fillRule });
12674
12677
  }
12675
12678
  };
@@ -12718,7 +12721,7 @@ function createImageShapeTools(controller) {
12718
12721
  handler: ({ layerId, componentIndex, ...rest }) => {
12719
12722
  const id = shapeId(layerId);
12720
12723
  const change = geometry(rest);
12721
- if (change.shape === void 0 && change.subpaths === void 0 && change.op === void 0) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("Give shape, subpaths or op to change.");
12724
+ if (change.shape === void 0 && change.subpaths === void 0 && change.op === void 0) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("Give shape, subpaths or op to change.");
12722
12725
  return controller.setShapeComponent(id, componentIndex, change);
12723
12726
  }
12724
12727
  };
@@ -12792,8 +12795,8 @@ function pick2(args, keys) {
12792
12795
  }
12793
12796
  function createImageTypeTools(controller) {
12794
12797
  const typeId = (id) => {
12795
- if (typeof id !== "string" || !id) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("layerId is required (a type layer id from list_layers).");
12796
- _chunkYAFS2QFZcjs.requireTypeLayer.call(void 0, controller.getLayers(), id);
12798
+ if (typeof id !== "string" || !id) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("layerId is required (a type layer id from list_layers).");
12799
+ _chunkJLGNZMUVcjs.requireTypeLayer.call(void 0, controller.getLayers(), id);
12797
12800
  return id;
12798
12801
  };
12799
12802
  const layerSummary = (id) => {
@@ -12873,7 +12876,7 @@ function createImageTypeTools(controller) {
12873
12876
  annotations: { title: "Style a range of text", ...WRITE_IDEMPOTENT6 },
12874
12877
  handler: (args) => {
12875
12878
  const style = pick2(args, Object.keys(STYLE));
12876
- if (!Object.keys(style).length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Give at least one style field: ${Object.keys(STYLE).join(", ")}.`);
12879
+ if (!Object.keys(style).length) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Give at least one style field: ${Object.keys(STYLE).join(", ")}.`);
12877
12880
  return controller.setTextStyle(typeId(args.layerId), style, range(args));
12878
12881
  }
12879
12882
  };
@@ -12885,7 +12888,7 @@ function createImageTypeTools(controller) {
12885
12888
  annotations: { title: "Style paragraphs", ...WRITE_IDEMPOTENT6 },
12886
12889
  handler: (args) => {
12887
12890
  const style = pick2(args, Object.keys(PARAGRAPH));
12888
- if (!Object.keys(style).length) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)(`Give at least one paragraph field: ${Object.keys(PARAGRAPH).join(", ")}.`);
12891
+ if (!Object.keys(style).length) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)(`Give at least one paragraph field: ${Object.keys(PARAGRAPH).join(", ")}.`);
12889
12892
  return controller.setParagraphStyle(typeId(args.layerId), style, range(args));
12890
12893
  }
12891
12894
  };
@@ -12907,7 +12910,7 @@ function createImageTypeTools(controller) {
12907
12910
  annotations: { title: "Point or paragraph text", ...WRITE_IDEMPOTENT6 },
12908
12911
  handler: ({ layerId, kind, width, height }) => {
12909
12912
  const id = typeId(layerId);
12910
- if (kind === "box" && (width === void 0 || height === void 0)) throw new (0, _chunkYAFS2QFZcjs.LayerOperationError)("kind box needs width and height in pixels.");
12913
+ if (kind === "box" && (width === void 0 || height === void 0)) throw new (0, _chunkJLGNZMUVcjs.LayerOperationError)("kind box needs width and height in pixels.");
12911
12914
  return controller.setTextFrame(id, kind === "box" ? { kind: "box", width, height } : { kind: "point" });
12912
12915
  }
12913
12916
  };
@@ -12929,7 +12932,7 @@ function createImageTypeTools(controller) {
12929
12932
  var LAYER_PATH = /^layers\.([^.]+)\.(.+)$/;
12930
12933
  function adjustmentsSummary(adjustments) {
12931
12934
  return {
12932
- process: _chunkYAFS2QFZcjs.normalizeProcessVersion.call(void 0, adjustments.process),
12935
+ process: _chunkJLGNZMUVcjs.normalizeProcessVersion.call(void 0, adjustments.process),
12933
12936
  values: readAdjustmentControls(adjustments),
12934
12937
  layers: (_nullishCoalesce(adjustments.layers, () => ( []))).map((l) => JSON.parse(JSON.stringify(l)))
12935
12938
  };
@@ -12972,7 +12975,7 @@ function createImageEditorToolProvider(controller, options = {}) {
12972
12975
  default: def,
12973
12976
  ...requiresProcess ? { requiresProcess } : {}
12974
12977
  })),
12975
- layerKinds: _chunkYAFS2QFZcjs.ADJUSTMENT_KINDS.map(({ kind, label }) => ({
12978
+ layerKinds: _chunkJLGNZMUVcjs.ADJUSTMENT_KINDS.map(({ kind, label }) => ({
12976
12979
  kind,
12977
12980
  label,
12978
12981
  controls: [...ADJUSTMENT_LAYER_CONTROLS[kind], ADJUSTMENT_LAYER_OPACITY_CONTROL].map(({ id, label: l, min, max, step, default: def }) => ({
@@ -13058,7 +13061,7 @@ function createImageEditorToolProvider(controller, options = {}) {
13058
13061
  const result = { applied, clamped };
13059
13062
  if (typeof label === "string" && label) result.label = label;
13060
13063
  const notes = [];
13061
- if ("tint" in applied && _chunkYAFS2QFZcjs.normalizeProcessVersion.call(void 0, controller.getState().adjustments.process) < 2) {
13064
+ if ("tint" in applied && _chunkJLGNZMUVcjs.normalizeProcessVersion.call(void 0, controller.getState().adjustments.process) < 2) {
13062
13065
  notes.push("Tint has no effect on process 1 edits.");
13063
13066
  }
13064
13067
  if (notes.length) result.notes = notes;
@@ -13068,11 +13071,11 @@ function createImageEditorToolProvider(controller, options = {}) {
13068
13071
  const addLayer = {
13069
13072
  name: "add_adjustment_layer",
13070
13073
  title: "Add an adjustment layer",
13071
- description: "Adds a non-destructive adjustment layer on top of the stack (one undoable step) and returns it. Kinds: " + _chunkYAFS2QFZcjs.ADJUSTMENT_KINDS.map((k) => k.kind).join(", ") + ". Omitted params are neutral.",
13074
+ description: "Adds a non-destructive adjustment layer on top of the stack (one undoable step) and returns it. Kinds: " + _chunkJLGNZMUVcjs.ADJUSTMENT_KINDS.map((k) => k.kind).join(", ") + ". Omitted params are neutral.",
13072
13075
  inputSchema: {
13073
13076
  type: "object",
13074
13077
  properties: {
13075
- kind: { type: "string", enum: _chunkYAFS2QFZcjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Adjustment kind." },
13078
+ kind: { type: "string", enum: _chunkJLGNZMUVcjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Adjustment kind." },
13076
13079
  params: { type: "object", description: "Initial parameters (see list_controls); merged with neutral defaults." },
13077
13080
  opacity: { type: "number", minimum: 0, maximum: 1, description: "Layer opacity 0-1 (default 1)." },
13078
13081
  blend: { type: "string", enum: _chunkJ5BA3BQ6cjs.BLEND_MODES.map((m) => m.id), description: "Blend mode (default normal)." },
@@ -13091,7 +13094,7 @@ function createImageEditorToolProvider(controller, options = {}) {
13091
13094
  openWorldHint: false
13092
13095
  },
13093
13096
  handler: ({ kind, params, opacity, blend, name, aboveId, parentId }) => {
13094
- if (!_chunkYAFS2QFZcjs.isAdjustmentKind.call(void 0, kind)) throw new Error(`Unknown adjustment kind "${kind}".`);
13097
+ if (!_chunkJLGNZMUVcjs.isAdjustmentKind.call(void 0, kind)) throw new Error(`Unknown adjustment kind "${kind}".`);
13095
13098
  if (blend !== void 0 && !_chunkJ5BA3BQ6cjs.isBlendMode.call(void 0, blend)) throw new Error(`Unknown blend mode "${blend}".`);
13096
13099
  if (aboveId !== void 0 && parentId !== void 0) throw new Error("Give aboveId or parentId, not both.");
13097
13100
  for (const ref of [aboveId, parentId]) {
@@ -13185,7 +13188,7 @@ function boxToCurvePoint(x, y, width, height) {
13185
13188
  return { input: clampLevel(x / (width || 1) * 255), output: clampLevel((height - y) / (height || 1) * 255) };
13186
13189
  }
13187
13190
  function curveSvgPath(points, width, height, samples = 64) {
13188
- const lut = _chunkYAFS2QFZcjs.curveLutFromLevels.call(void 0, points);
13191
+ const lut = _chunkJLGNZMUVcjs.curveLutFromLevels.call(void 0, points);
13189
13192
  const n = lut.length - 1;
13190
13193
  let d = "";
13191
13194
  for (let i = 0; i <= samples; i++) {
@@ -13695,7 +13698,7 @@ var TextEditSession = (_class11 = class {
13695
13698
  else {
13696
13699
  const layout = this.layout();
13697
13700
  if (layout && layout.lines.length) {
13698
- const c = _chunkZ2H7KECKcjs.caretAt.call(void 0, layout, f);
13701
+ const c = _chunk2R3UW57Ucjs.caretAt.call(void 0, layout, f);
13699
13702
  const line = layout.lines[c.line];
13700
13703
  if (to === "home") f = line.start;
13701
13704
  else if (to === "end") {
@@ -13790,7 +13793,7 @@ var TextEditSession = (_class11 = class {
13790
13793
  styleHere() {
13791
13794
  const layer = this.layer;
13792
13795
  const at = this.start > 0 && this.start === this.end ? this.start - 1 : this.start;
13793
- return _chunkZ2H7KECKcjs.styleAt.call(void 0, layer.runs, at, _chunkZ2H7KECKcjs.DEFAULT_TEXT_STYLE);
13796
+ return _chunk2R3UW57Ucjs.styleAt.call(void 0, layer.runs, at, _chunk2R3UW57Ucjs.DEFAULT_TEXT_STYLE);
13794
13797
  }
13795
13798
  info() {
13796
13799
  return this.controller.getTextLayer(this.layerId);
@@ -13799,8 +13802,8 @@ var TextEditSession = (_class11 = class {
13799
13802
  overlay() {
13800
13803
  const layer = this.layer;
13801
13804
  const layout = this.layout();
13802
- const m = _chunkYAFS2QFZcjs.textMatrix.call(void 0, layer);
13803
- const at = (x, y) => _chunkZ2H7KECKcjs.applyMatrix.call(void 0, m, { x, y });
13805
+ const m = _chunkJLGNZMUVcjs.textMatrix.call(void 0, layer);
13806
+ const at = (x, y) => _chunk2R3UW57Ucjs.applyMatrix.call(void 0, m, { x, y });
13804
13807
  let frame = null;
13805
13808
  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)];
13806
13809
  else if (layout) {
@@ -13820,7 +13823,7 @@ var TextEditSession = (_class11 = class {
13820
13823
  selection.push([at(x0, top), at(x1, top), at(x1, bottom), at(x0, bottom)]);
13821
13824
  }
13822
13825
  }
13823
- const c = _chunkZ2H7KECKcjs.caretAt.call(void 0, layout, this.focus);
13826
+ const c = _chunk2R3UW57Ucjs.caretAt.call(void 0, layout, this.focus);
13824
13827
  return { caret: [at(c.x, c.top), at(c.x, c.bottom)], selection, frame };
13825
13828
  }
13826
13829
  /** Ends editing: an empty layer made for this session is deleted (as Photoshop does). Returns whether the layer remains. */
@@ -13835,7 +13838,7 @@ var TextEditSession = (_class11 = class {
13835
13838
  }
13836
13839
  if (this.layer.name === "Text" && this.changed) {
13837
13840
  try {
13838
- this.controller.setLayerProperties(this.layerId, { name: _chunkYAFS2QFZcjs.typeLayerName.call(void 0, this.text) }, false);
13841
+ this.controller.setLayerProperties(this.layerId, { name: _chunkJLGNZMUVcjs.typeLayerName.call(void 0, this.text) }, false);
13839
13842
  } catch (e32) {
13840
13843
  }
13841
13844
  }
@@ -13846,8 +13849,8 @@ function typeLayerAt(controller, p, slop = 4) {
13846
13849
  const layers = [...flattenTypeLayers(controller.getLayers())].reverse();
13847
13850
  for (const l of layers) {
13848
13851
  if (!l.visible) continue;
13849
- const inv = invert(_chunkYAFS2QFZcjs.textMatrix.call(void 0, l));
13850
- const q = _chunkZ2H7KECKcjs.applyMatrix.call(void 0, inv, p);
13852
+ const inv = invert(_chunkJLGNZMUVcjs.textMatrix.call(void 0, l));
13853
+ const q = _chunk2R3UW57Ucjs.applyMatrix.call(void 0, inv, p);
13851
13854
  let b = null;
13852
13855
  if (l.frame.kind === "box") b = { x: 0, y: 0, width: l.frame.width, height: l.frame.height };
13853
13856
  else {
@@ -13957,7 +13960,7 @@ function layerPanelRows(layers, activeId) {
13957
13960
  }
13958
13961
  function layerLabel(layer) {
13959
13962
  if (layer.name) return layer.name;
13960
- if (layer.type === "adjustment") return _chunkYAFS2QFZcjs.adjustmentKindLabel.call(void 0, layer.kind);
13963
+ if (layer.type === "adjustment") return _chunkJLGNZMUVcjs.adjustmentKindLabel.call(void 0, layer.kind);
13961
13964
  return layer.type === "group" ? "Group" : "Layer";
13962
13965
  }
13963
13966
  function layerBadge(layer) {
@@ -14429,7 +14432,7 @@ var FREE_TRANSFORM_MODE_OPTIONS = [
14429
14432
  ];
14430
14433
  var WARP_STYLE_OPTIONS = [
14431
14434
  { id: "custom", label: "Custom" },
14432
- ..._chunkZ2H7KECKcjs.WARP_STYLES.map((id) => ({ id, label: _chunkZ2H7KECKcjs.WARP_STYLE_LABELS[id] }))
14435
+ ..._chunk2R3UW57Ucjs.WARP_STYLES.map((id) => ({ id, label: _chunk2R3UW57Ucjs.WARP_STYLE_LABELS[id] }))
14433
14436
  ];
14434
14437
  var WARP_GRID_OPTIONS = [
14435
14438
  { id: "1x1", label: "Default", columns: 1, rows: 1 },
@@ -14565,7 +14568,7 @@ var FreeTransformTool = (_class13 = class {
14565
14568
  setMode(mode) {
14566
14569
  this.modeValue = mode;
14567
14570
  const s = this.session;
14568
- if (mode === "warp" && s && !this.mesh) this.mesh = _chunkZ2H7KECKcjs.identityWarpMesh.call(void 0, s.box, this.warpSettings.columns, this.warpSettings.rows);
14571
+ if (mode === "warp" && s && !this.mesh) this.mesh = _chunk2R3UW57Ucjs.identityWarpMesh.call(void 0, s.box, this.warpSettings.columns, this.warpSettings.rows);
14569
14572
  this.changed();
14570
14573
  }
14571
14574
  /** The Warp options bar's settings. */
@@ -14587,13 +14590,13 @@ var FreeTransformTool = (_class13 = class {
14587
14590
  this.modeValue = "warp";
14588
14591
  const next = { ...this.warpSettings, ...changes };
14589
14592
  this.warpSettings = next;
14590
- let mesh = _nullishCoalesce(this.mesh, () => ( _chunkZ2H7KECKcjs.identityWarpMesh.call(void 0, s.box, next.columns, next.rows)));
14593
+ let mesh = _nullishCoalesce(this.mesh, () => ( _chunk2R3UW57Ucjs.identityWarpMesh.call(void 0, s.box, next.columns, next.rows)));
14591
14594
  if (next.style !== "custom" && ("style" in changes || "bend" in changes || "horizontal" in changes || "vertical" in changes || "orientation" in changes)) {
14592
14595
  const preset = { style: next.style, bend: next.bend, horizontal: next.horizontal, vertical: next.vertical, orientation: next.orientation };
14593
- mesh = _nullishCoalesce(_chunkZ2H7KECKcjs.warpPresetMesh.call(void 0, preset, s.box), () => ( _chunkZ2H7KECKcjs.identityWarpMesh.call(void 0, s.box)));
14594
- mesh = _chunkZ2H7KECKcjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
14596
+ mesh = _nullishCoalesce(_chunk2R3UW57Ucjs.warpPresetMesh.call(void 0, preset, s.box), () => ( _chunk2R3UW57Ucjs.identityWarpMesh.call(void 0, s.box)));
14597
+ mesh = _chunk2R3UW57Ucjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
14595
14598
  }
14596
- if ("columns" in changes || "rows" in changes) mesh = _chunkZ2H7KECKcjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
14599
+ if ("columns" in changes || "rows" in changes) mesh = _chunk2R3UW57Ucjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
14597
14600
  this.mesh = mesh;
14598
14601
  this.changed();
14599
14602
  this.preview();
@@ -14640,11 +14643,11 @@ var FreeTransformTool = (_class13 = class {
14640
14643
  const m = this.mesh;
14641
14644
  const at = (p) => _nullishCoalesce(_chunkMUUXNRU4cjs.applyHomography.call(void 0, h, p), () => ( p));
14642
14645
  const pts = m.points.map(at);
14643
- const edit = _chunkZ2H7KECKcjs.warpMeshEditPoints.call(void 0, m);
14646
+ const edit = _chunk2R3UW57Ucjs.warpMeshEditPoints.call(void 0, m);
14644
14647
  out.handles = [];
14645
- out.outline = _chunkZ2H7KECKcjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }).length ? this.meshOutline(pts, m) : out.outline;
14648
+ out.outline = _chunk2R3UW57Ucjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }).length ? this.meshOutline(pts, m) : out.outline;
14646
14649
  out.warp = {
14647
- curves: _chunkZ2H7KECKcjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }),
14650
+ curves: _chunk2R3UW57Ucjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }),
14648
14651
  anchors: edit.anchors.map((i) => pts[i]),
14649
14652
  handles: edit.handles.map((e) => ({ point: pts[e.index], anchor: pts[e.anchor] }))
14650
14653
  };
@@ -14668,7 +14671,7 @@ var FreeTransformTool = (_class13 = class {
14668
14671
  if (!o) return null;
14669
14672
  if (this.modeValue === "warp" && this.mesh) {
14670
14673
  const h = this.homography();
14671
- const edit = _chunkZ2H7KECKcjs.warpMeshEditPoints.call(void 0, this.mesh);
14674
+ const edit = _chunk2R3UW57Ucjs.warpMeshEditPoints.call(void 0, this.mesh);
14672
14675
  let best2 = -1;
14673
14676
  let bestD2 = tolerance;
14674
14677
  for (const i of [...edit.anchors, ...edit.handles.map((e) => e.index)]) {
@@ -14713,7 +14716,7 @@ var FreeTransformTool = (_class13 = class {
14713
14716
  if (this.modeValue === "warp" && this.mesh && handle === "inside") {
14714
14717
  const q = this.toFrame(p, this.corners);
14715
14718
  if (q) {
14716
- const r = _chunkZ2H7KECKcjs.warpMeshParamAt.call(void 0, this.mesh, q);
14719
+ const r = _chunk2R3UW57Ucjs.warpMeshParamAt.call(void 0, this.mesh, q);
14717
14720
  st = { s: r.s, t: r.t };
14718
14721
  }
14719
14722
  }
@@ -14746,8 +14749,8 @@ var FreeTransformTool = (_class13 = class {
14746
14749
  if (!a || !b) return;
14747
14750
  const delta = { x: b.x - a.x, y: b.y - a.y };
14748
14751
  const i = meshIndex(d.handle);
14749
- if (i >= 0) this.mesh = _chunkZ2H7KECKcjs.dragWarpMeshPoint.call(void 0, d.mesh, i, delta);
14750
- else if (d.handle === "inside" && d.st) this.mesh = _chunkZ2H7KECKcjs.pullWarpMesh.call(void 0, d.mesh, d.st.s, d.st.t, delta);
14752
+ if (i >= 0) this.mesh = _chunk2R3UW57Ucjs.dragWarpMeshPoint.call(void 0, d.mesh, i, delta);
14753
+ else if (d.handle === "inside" && d.st) this.mesh = _chunk2R3UW57Ucjs.pullWarpMesh.call(void 0, d.mesh, d.st.s, d.st.t, delta);
14751
14754
  else return;
14752
14755
  this.warpSettings = { ...this.warpSettings, style: "custom" };
14753
14756
  this.changed();
@@ -14871,7 +14874,7 @@ var FreeTransformTool = (_class13 = class {
14871
14874
  bar() {
14872
14875
  const s = this.session;
14873
14876
  if (!s || !this.corners) return null;
14874
- const read = _chunkYAFS2QFZcjs.describeTransform.call(void 0, { box: s.box, corners: this.corners }, this.refBox);
14877
+ const read = _chunkJLGNZMUVcjs.describeTransform.call(void 0, { box: s.box, corners: this.corners }, this.refBox);
14875
14878
  return {
14876
14879
  affine: read.affine,
14877
14880
  x: _nullishCoalesce(this.typed.x, () => ( read.x)),
@@ -14896,7 +14899,7 @@ var FreeTransformTool = (_class13 = class {
14896
14899
  this.changed();
14897
14900
  return;
14898
14901
  }
14899
- const m = _chunkYAFS2QFZcjs.matrixFromParams.call(void 0, s.box, {
14902
+ const m = _chunkJLGNZMUVcjs.matrixFromParams.call(void 0, s.box, {
14900
14903
  scaleX: next.scaleX,
14901
14904
  scaleY: next.scaleY,
14902
14905
  rotate: next.rotate,
@@ -14906,7 +14909,7 @@ var FreeTransformTool = (_class13 = class {
14906
14909
  dx: next.x - this.refBox.x,
14907
14910
  dy: next.y - this.refBox.y
14908
14911
  });
14909
- this.setCorners(_chunkYAFS2QFZcjs.cornersFromMatrix.call(void 0, s.box, m));
14912
+ this.setCorners(_chunkJLGNZMUVcjs.cornersFromMatrix.call(void 0, s.box, m));
14910
14913
  this.typed = { scaleX: next.scaleX, scaleY: next.scaleY, rotate: next.rotate, skewX: next.skewX, skewY: next.skewY, x: next.x, y: next.y };
14911
14914
  this.changed();
14912
14915
  }
@@ -16006,5 +16009,5 @@ function createImageEffectsToolProvider(controller, options = {}) {
16006
16009
 
16007
16010
 
16008
16011
 
16009
- exports.ADJUSTMENT_KEYS = _chunkYAFS2QFZcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkYAFS2QFZcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkYAFS2QFZcjs.ADJUSTMENT_LUT_SIZE; exports.AS_SHOT_KELVIN = _chunkYAFS2QFZcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkYAFS2QFZcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkYAFS2QFZcjs.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 = _chunkYAFS2QFZcjs.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.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.CoverageMap = _chunk6GFRKLLScjs.CoverageMap; exports.D50 = _chunkYAFS2QFZcjs.D50; exports.D65 = _chunkYAFS2QFZcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkZ2H7KECKcjs.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 = _chunk24ATT2PEcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkYAFS2QFZcjs.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 = _chunkYT3JL7YMcjs.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 = _chunkZ2H7KECKcjs.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 = _chunkYAFS2QFZcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunk24ATT2PEcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkFHPVDTI2cjs.DRY_EPS; exports.DabWalker = _chunk6GFRKLLScjs.DabWalker; exports.EMPTY_DISTANCE = _chunkYAFS2QFZcjs.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 = _chunkYAFS2QFZcjs.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 = _chunkYAFS2QFZcjs.HUE_RANGE_LABELS; exports.IDENTITY_CLONE_TRANSFORM = _chunkYT3JL7YMcjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkYAFS2QFZcjs.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 = _chunk24ATT2PEcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkYAFS2QFZcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkYAFS2QFZcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunk24ATT2PEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkYAFS2QFZcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkYAFS2QFZcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkYAFS2QFZcjs.LUMA_709; exports.LayerCompositor = _chunkYAFS2QFZcjs.LayerCompositor; exports.LayerEffectError = _chunk24ATT2PEcjs.LayerEffectError; exports.LayerOperationError = _chunkYAFS2QFZcjs.LayerOperationError; exports.MAX_BATCH = _chunkFHPVDTI2cjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunk6GFRKLLScjs.MAX_BRUSH_SIZE; exports.MAX_EFFECT_REACH = _chunk24ATT2PEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkYAFS2QFZcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkFHPVDTI2cjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunk24ATT2PEcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkFHPVDTI2cjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkFHPVDTI2cjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkYAFS2QFZcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkYAFS2QFZcjs.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 = _chunkYAFS2QFZcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkFHPVDTI2cjs.PARAM; exports.PARAM_FLOATS = _chunkFHPVDTI2cjs.PARAM_FLOATS; exports.PATTERN_BLOCK_KEYS = _chunkYAFS2QFZcjs.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 = _chunkYAFS2QFZcjs.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 = _chunk24ATT2PEcjs.PatternPlacement; exports.PatternTile = _chunk24ATT2PEcjs.PatternTile; exports.PsdError = _chunkYAFS2QFZcjs.PsdError; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunkYT3JL7YMcjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunkYT3JL7YMcjs.RegionPixelSource; exports.RetouchDabStroke = _chunkYT3JL7YMcjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkYAFS2QFZcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkYAFS2QFZcjs.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 = _chunkYAFS2QFZcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkYAFS2QFZcjs.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 = _chunkYAFS2QFZcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunkYT3JL7YMcjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkFHPVDTI2cjs.SRGB_TO_LINEAR; exports.STRIP = _chunkFHPVDTI2cjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkYAFS2QFZcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunk6GFRKLLScjs.SmudgeTip; exports.StrokeCoverage = _chunk6GFRKLLScjs.StrokeCoverage; exports.SurfaceDraft = _chunkJ5BA3BQ6cjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkYAFS2QFZcjs.TEXT_ALIGNS; exports.TEXT_RENDER_MARGIN = _chunkYAFS2QFZcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkYAFS2QFZcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkJ5BA3BQ6cjs.TILE; exports.TILE_SHIFT = _chunkJ5BA3BQ6cjs.TILE_SHIFT; exports.TINT_SCALE = _chunkYAFS2QFZcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunk6GFRKLLScjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkYAFS2QFZcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunkYT3JL7YMcjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkYAFS2QFZcjs.TRANSFORM_ANCHORS; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunk6GFRKLLScjs.TileMedium; exports.TilePixelSource = _chunkYT3JL7YMcjs.TilePixelSource; exports.TiledSurface = _chunkJ5BA3BQ6cjs.TiledSurface; exports.TransformTooLargeError = _chunk24ATT2PEcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunkYT3JL7YMcjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.U_MAX = _chunkFHPVDTI2cjs.U_MAX; exports.VIBRANCE_GREY = _chunkYAFS2QFZcjs.VIBRANCE_GREY; exports.W9 = _chunkFHPVDTI2cjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkZ2H7KECKcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkZ2H7KECKcjs.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 = _chunkYAFS2QFZcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunk643B2HKCcjs.ZlibError; exports.activeAdjustmentLayers = _chunkYAFS2QFZcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkYAFS2QFZcjs.activeEffectSmartFilters; exports.activeSmartFilters = _chunkYAFS2QFZcjs.activeSmartFilters; exports.addLayerEffect = _chunkYAFS2QFZcjs.addLayerEffect; exports.addLayerFilter = _chunkYAFS2QFZcjs.addLayerFilter; exports.addPaintGradientStop = _chunk6GFRKLLScjs.addPaintGradientStop; exports.addSmartFilter = _chunkYAFS2QFZcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkYAFS2QFZcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkYAFS2QFZcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkYAFS2QFZcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkYAFS2QFZcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunk643B2HKCcjs.adler32; exports.anchorPoint = _chunkYAFS2QFZcjs.anchorPoint; exports.annotationBlend = _chunkYAFS2QFZcjs.annotationBlend; exports.annotationLayerFor = _chunkYAFS2QFZcjs.annotationLayerFor; exports.annotationLayerName = _chunkYAFS2QFZcjs.annotationLayerName; exports.annotationOfLayer = _chunkYAFS2QFZcjs.annotationOfLayer; exports.annotationOfShape = _chunkYAFS2QFZcjs.annotationOfShape; exports.annotationOfType = _chunkYAFS2QFZcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkYAFS2QFZcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkYAFS2QFZcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkYAFS2QFZcjs.applyAdjustments; exports.applyBoxBlur = _chunkYAFS2QFZcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkYAFS2QFZcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkYAFS2QFZcjs.applyDepthMask; exports.applyHomography = _chunkMUUXNRU4cjs.applyHomography; exports.applyImageProjectionToContext = _chunkYAFS2QFZcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkYAFS2QFZcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkYAFS2QFZcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkYAFS2QFZcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkYAFS2QFZcjs.applyParams; exports.applyProcess2Adjustments = _chunkYAFS2QFZcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkYAFS2QFZcjs.applyProcess2Float; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunkYT3JL7YMcjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkYAFS2QFZcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunk6GFRKLLScjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunk6GFRKLLScjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunkYT3JL7YMcjs.applyToneToDeepTile; exports.backgroundLayer = _chunkYAFS2QFZcjs.backgroundLayer; exports.base64ToBytes = _chunkDCLJNVZScjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunkYT3JL7YMcjs.bestOffset; exports.blackWhiteGray = _chunkYAFS2QFZcjs.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 = _chunk24ATT2PEcjs.blendTile; exports.blenderDab = _chunk6GFRKLLScjs.blenderDab; exports.blurFilter = _chunkYAFS2QFZcjs.blurFilter; exports.borderCoverage = _chunkYAFS2QFZcjs.borderCoverage; exports.boxBlurPixels = _chunkYT3JL7YMcjs.boxBlurPixels; exports.boxMean = boxMean; exports.boxPointOf = _chunkYAFS2QFZcjs.boxPointOf; exports.boxQuad = _chunkMUUXNRU4cjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkYAFS2QFZcjs.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 = _chunkYAFS2QFZcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkYAFS2QFZcjs.buildToneLut; exports.builtinPattern = _chunk24ATT2PEcjs.builtinPattern; exports.builtinPatternIds = _chunk24ATT2PEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkDCLJNVZScjs.bytesToBase64; exports.calculateCropDrag = _chunkYAFS2QFZcjs.calculateCropDrag; exports.canShareMemory = _chunkFHPVDTI2cjs.canShareMemory; exports.canvasCompositeOperation = _chunkJ5BA3BQ6cjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkYAFS2QFZcjs.canvasToImagePoint; exports.caretAt = _chunkZ2H7KECKcjs.caretAt; exports.changedTiles = _chunk24ATT2PEcjs.changedTiles; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkYAFS2QFZcjs.clampCropToImage; exports.cleanMixer = _chunk6GFRKLLScjs.cleanMixer; exports.cloneSamplePoint = _chunkYT3JL7YMcjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunkJ5BA3BQ6cjs.collectTiles; exports.colorBalanceChannel = _chunkYAFS2QFZcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.combineSelections = _chunkYAFS2QFZcjs.combineSelections; exports.compileAdjustmentLayer = _chunkYAFS2QFZcjs.compileAdjustmentLayer; exports.componentPath = _chunkYAFS2QFZcjs.componentPath; exports.compositeDeep = _chunkYAFS2QFZcjs.compositeDeep; exports.compositeSurfaceOver = _chunk24ATT2PEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkYAFS2QFZcjs.computeSelectionBounds; exports.contentAwareFill = _chunkYT3JL7YMcjs.contentAwareFill; exports.contentBounds = _chunkJ5BA3BQ6cjs.contentBounds; exports.contentsBox = _chunkYAFS2QFZcjs.contentsBox; exports.contentsSurface = _chunkYAFS2QFZcjs.contentsSurface; exports.contractCoverage = _chunkYAFS2QFZcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkJ5BA3BQ6cjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkYAFS2QFZcjs.convertToSmartObject; exports.copySmartObject = _chunkYAFS2QFZcjs.copySmartObject; exports.cornersFromMatrix = _chunkYAFS2QFZcjs.cornersFromMatrix; exports.coverageTileCoord = _chunk6GFRKLLScjs.coverageTileCoord; exports.coverageToByte = _chunkYAFS2QFZcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkYAFS2QFZcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunk6GFRKLLScjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkZ2H7KECKcjs.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 = _chunkZ2H7KECKcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkZ2H7KECKcjs.createOutlineTextShaper; exports.createPigment = _chunkJ5BA3BQ6cjs.createPigment; exports.createPigmentTools = _chunkFHPVDTI2cjs.createPigmentTools; exports.createSelectionMask = _chunkYAFS2QFZcjs.createSelectionMask; exports.createShapeLayer = _chunkYAFS2QFZcjs.createShapeLayer; exports.createTypeLayer = _chunkYAFS2QFZcjs.createTypeLayer; exports.createWetGpuEngine = _chunkFHPVDTI2cjs.createWetGpuEngine; exports.cssFont = _chunkZ2H7KECKcjs.cssFont; exports.cssFontFamily = _chunkZ2H7KECKcjs.cssFontFamily; exports.curveLut = _chunk24ATT2PEcjs.curveLut; exports.curveLutFromLevels = _chunkYAFS2QFZcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunk6GFRKLLScjs.dabCoverage; exports.dabRect = _chunk6GFRKLLScjs.dabRect; exports.decodeDeepSurface = _chunkYAFS2QFZcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkYAFS2QFZcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkYAFS2QFZcjs.decodeLayerMask; exports.decodeMergedImage = _chunkYAFS2QFZcjs.decodeMergedImage; exports.decodePlanes = _chunkYAFS2QFZcjs.decodePlanes; exports.decodePng = _chunkDCLJNVZScjs.decodePng; exports.decodePngDataUrl = _chunkYAFS2QFZcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkYAFS2QFZcjs.decodeSelectionRle; exports.deepBytes = _chunkJ5BA3BQ6cjs.deepBytes; exports.deepTile = _chunkJ5BA3BQ6cjs.deepTile; exports.defaultAdjustmentParams = _chunkYAFS2QFZcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunk24ATT2PEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunk24ATT2PEcjs.defaultLayerEffect; exports.defaultShapeName = _chunkYAFS2QFZcjs.defaultShapeName; exports.deflate = _chunk643B2HKCcjs.deflate; exports.deflateRaw = _chunk643B2HKCcjs.deflateRaw; exports.depthMaskAlpha = _chunkYAFS2QFZcjs.depthMaskAlpha; exports.depthOf = _chunkJ5BA3BQ6cjs.depthOf; exports.depthRasterMask = _chunkYAFS2QFZcjs.depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkYAFS2QFZcjs.describeTransform; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkYAFS2QFZcjs.deserializeEffects; exports.deserializeLayer = _chunkYAFS2QFZcjs.deserializeLayer; exports.deserializeLayers = _chunkYAFS2QFZcjs.deserializeLayers; exports.deserializePatterns = _chunkYAFS2QFZcjs.deserializePatterns; exports.deserializeSelection = _chunkYAFS2QFZcjs.deserializeSelection; exports.developFilter = _chunkYAFS2QFZcjs.developFilter; exports.developFromAdjustments = _chunkYAFS2QFZcjs.developFromAdjustments; exports.developTarget = _chunkYAFS2QFZcjs.developTarget; exports.dexp = _chunkFHPVDTI2cjs.dexp; exports.dilateMask = _chunkYT3JL7YMcjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkYAFS2QFZcjs.distanceTransform; exports.dlog = _chunkFHPVDTI2cjs.dlog; exports.documentContents = _chunkYAFS2QFZcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunkYT3JL7YMcjs.dodgeBurn; exports.dodgeBurnCurve = _chunkYT3JL7YMcjs.dodgeBurnCurve; exports.downloadPsd = downloadPsd; exports.dpow = _chunkFHPVDTI2cjs.dpow; exports.dragWarpMeshPoint = _chunkZ2H7KECKcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkFHPVDTI2cjs.dsincos; exports.duplicateLayer = _chunkYAFS2QFZcjs.duplicateLayer; exports.edgeBits = _chunkFHPVDTI2cjs.edgeBits; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunk24ATT2PEcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunk24ATT2PEcjs.effectReach; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunk24ATT2PEcjs.effectsFingerprint; exports.effectsMargin = _chunk24ATT2PEcjs.effectsMargin; exports.effectsScale = _chunk24ATT2PEcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkJ5BA3BQ6cjs.emptySurface; exports.encodeDeepSurface = _chunkYAFS2QFZcjs.encodeDeepSurface; exports.encodePng = _chunkDCLJNVZScjs.encodePng; exports.encodeRle = _chunkYAFS2QFZcjs.encodeRle; exports.encodeSelectionRle = _chunkYAFS2QFZcjs.encodeSelectionRle; exports.encodeSurface = _chunkYAFS2QFZcjs.encodeSurface; exports.evalWarpMesh = _chunkZ2H7KECKcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkYAFS2QFZcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunk6GFRKLLScjs.exchangeRates; exports.expNeg = _chunkFHPVDTI2cjs.expNeg; exports.expandCoverage = _chunkYAFS2QFZcjs.expandCoverage; exports.exportPsd = _chunkYAFS2QFZcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkYAFS2QFZcjs.featherCoverage; exports.fillRect = _chunkJ5BA3BQ6cjs.fillRect; exports.filmPixel = _chunkFHPVDTI2cjs.filmPixel; exports.filmReflectance = _chunkFHPVDTI2cjs.filmReflectance; exports.filterMaskCoverage = _chunkYAFS2QFZcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunk24ATT2PEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findWebGpu = _chunkFHPVDTI2cjs.findWebGpu; exports.finishTile = _chunkJ5BA3BQ6cjs.finishTile; exports.fitParagraphRuns = _chunkZ2H7KECKcjs.fitParagraphRuns; exports.fitRuns = _chunkZ2H7KECKcjs.fitRuns; exports.flattenLayers = _chunk24ATT2PEcjs.flattenLayers; exports.flattenPath = _chunkYAFS2QFZcjs.flattenPath; exports.flipCorners = _chunkYAFS2QFZcjs.flipCorners; exports.flowField = _chunkFHPVDTI2cjs.flowField; exports.fontOf = _chunkZ2H7KECKcjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkYAFS2QFZcjs.fullSelection; exports.gaussianBlur = _chunk24ATT2PEcjs.gaussianBlur; exports.geometryHomography = _chunkYAFS2QFZcjs.geometryHomography; exports.getAnnotationBounds = _chunkYAFS2QFZcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkYAFS2QFZcjs.getCropCursor; exports.getRotatedSize = _chunkYAFS2QFZcjs.getRotatedSize; exports.getViewportMetrics = _chunkYAFS2QFZcjs.getViewportMetrics; exports.getViewportProjection = _chunkYAFS2QFZcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.gradientDabColor = _chunk6GFRKLLScjs.gradientDabColor; exports.greyMorphology = _chunkYAFS2QFZcjs.greyMorphology; exports.groupLayers = _chunkYAFS2QFZcjs.groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunk24ATT2PEcjs.hasActiveEffects; exports.hasResampledLegacyMask = _chunkYAFS2QFZcjs.hasResampledLegacyMask; exports.hasSurface = _chunkYAFS2QFZcjs.hasSurface; exports.hasWarp = _chunkYAFS2QFZcjs.hasWarp; exports.hash2 = _chunk6GFRKLLScjs.hash2; exports.hashMaskContent = _chunkYAFS2QFZcjs.hashMaskContent; exports.hashNoise = _chunk24ATT2PEcjs.hashNoise; exports.healPixels = _chunkYT3JL7YMcjs.healPixels; exports.hexToPaintRgb = _chunk6GFRKLLScjs.hexToPaintRgb; exports.hexToRgb = _chunkYAFS2QFZcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkYAFS2QFZcjs.hitTestAnnotation; exports.hitTestCrop = _chunkYAFS2QFZcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkMUUXNRU4cjs.homographyFromAffine; exports.homographyFromPoints = _chunkMUUXNRU4cjs.homographyFromPoints; exports.hslToRgb = _chunkYAFS2QFZcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkYAFS2QFZcjs.hueRangeTables; exports.hueRangeWeight = _chunkYAFS2QFZcjs.hueRangeWeight; exports.hueSaturation = _chunkYAFS2QFZcjs.hueSaturation; exports.identityCurve = _chunkYAFS2QFZcjs.identityCurve; exports.identityLevels = _chunkYAFS2QFZcjs.identityLevels; exports.identityTransform = _chunkYAFS2QFZcjs.identityTransform; exports.identityWarpMesh = _chunkZ2H7KECKcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imageToCanvasPoint = _chunkYAFS2QFZcjs.imageToCanvasPoint; exports.importPsd = _chunkYAFS2QFZcjs.importPsd; exports.inflate = _chunk643B2HKCcjs.inflate; exports.inflateRaw = _chunk643B2HKCcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunk24ATT2PEcjs.insertLayer; exports.instancesOf = _chunkYAFS2QFZcjs.instancesOf; exports.invertHomography = _chunkMUUXNRU4cjs.invertHomography; exports.invertMatrix3 = _chunkYAFS2QFZcjs.invertMatrix3; exports.invertSelection = _chunkYAFS2QFZcjs.invertSelection; exports.isActiveFilter = _chunkYAFS2QFZcjs.isActiveFilter; exports.isAdjustmentKind = _chunkYAFS2QFZcjs.isAdjustmentKind; exports.isBitDepth = _chunkJ5BA3BQ6cjs.isBitDepth; exports.isBlendMode = _chunkJ5BA3BQ6cjs.isBlendMode; exports.isBrushstrokeBrush = _chunkZ6OUCS2Kcjs.isBrushstrokeBrush; exports.isContentsDecoded = _chunkYAFS2QFZcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkYAFS2QFZcjs.isDefaultDepthMask; exports.isGradientPaint = _chunk6GFRKLLScjs.isGradientPaint; exports.isIdentityCloneTransform = _chunkYT3JL7YMcjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkYAFS2QFZcjs.isIdentityTransform; exports.isInterpolation = _chunk24ATT2PEcjs.isInterpolation; exports.isLayerEffectKind = _chunk24ATT2PEcjs.isLayerEffectKind; exports.isLayerLocked = _chunk24ATT2PEcjs.isLayerLocked; exports.isLegacyShape = _chunkYAFS2QFZcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPainterlyBlendMode = _chunkJ5BA3BQ6cjs.isPainterlyBlendMode; exports.isPng = _chunkDCLJNVZScjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkYAFS2QFZcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkYAFS2QFZcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkYAFS2QFZcjs.isSelectionEmpty; exports.isSelectionMode = _chunkYAFS2QFZcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkJ5BA3BQ6cjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkYAFS2QFZcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkYAFS2QFZcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkYAFS2QFZcjs.isTransformAnchor; exports.isValidWarp = _chunkYAFS2QFZcjs.isValidWarp; exports.keepDeepSamples = _chunkJ5BA3BQ6cjs.keepDeepSamples; exports.kelvinToTemperature = _chunkYAFS2QFZcjs.kelvinToTemperature; exports.keysWeight = _chunk24ATT2PEcjs.keysWeight; exports.latticeViscosity = _chunkFHPVDTI2cjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunk24ATT2PEcjs.layerEffectFields; exports.layerEffectLabel = _chunk24ATT2PEcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkYAFS2QFZcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkYAFS2QFZcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkYAFS2QFZcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkYAFS2QFZcjs.layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = _chunkYAFS2QFZcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerTree = _chunkYAFS2QFZcjs.layerTree; exports.layerTypeLabel = _chunkYAFS2QFZcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkYAFS2QFZcjs.layersFromLegacy; exports.layoutText = _chunkZ2H7KECKcjs.layoutText; exports.legacyAdjustmentLayer = _chunkYAFS2QFZcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkYAFS2QFZcjs.legacyMaskOf; exports.legacyView = _chunkYAFS2QFZcjs.legacyView; exports.lerpPigment = _chunkJ5BA3BQ6cjs.lerpPigment; exports.lerpPigmentInto = _chunkJ5BA3BQ6cjs.lerpPigmentInto; exports.levelsValue = _chunkYAFS2QFZcjs.levelsValue; exports.linearSrgbToXy = _chunkYAFS2QFZcjs.linearSrgbToXy; exports.linearToSrgb = _chunkYAFS2QFZcjs.linearToSrgb; exports.linearToSrgb8 = _chunkFHPVDTI2cjs.linearToSrgb8; exports.liveComponent = _chunkYAFS2QFZcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkYAFS2QFZcjs.liveShapeSubpaths; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunk6GFRKLLScjs.loadMixer; exports.loadOpenTypeFont = _chunk2OJACTPRcjs.loadOpenTypeFont; exports.loadWetKernel = _chunkFHPVDTI2cjs.loadWetKernel; exports.luma = _chunkYT3JL7YMcjs.luma; exports.magicWand = magicWand; exports.mapCropHandle = _chunkYAFS2QFZcjs.mapCropHandle; exports.mapLayer = _chunk24ATT2PEcjs.mapLayer; exports.mapSubpaths = _chunkYAFS2QFZcjs.mapSubpaths; exports.maskBounds = _chunkYT3JL7YMcjs.maskBounds; exports.maskSummary = maskSummary; exports.matrixFromCorners = _chunkYAFS2QFZcjs.matrixFromCorners; exports.matrixFromParams = _chunkYAFS2QFZcjs.matrixFromParams; exports.membraneFill = _chunkYT3JL7YMcjs.membraneFill; exports.mergeLayerEffect = _chunk24ATT2PEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkYAFS2QFZcjs.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 = _chunkYAFS2QFZcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkYAFS2QFZcjs.moveLayer; exports.moveSmartFilter = _chunkYAFS2QFZcjs.moveSmartFilter; exports.mulMatrix3 = _chunkYAFS2QFZcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkYAFS2QFZcjs.neutralHueRange; exports.newContentsId = _chunkYAFS2QFZcjs.newContentsId; exports.newEffectId = _chunk24ATT2PEcjs.newEffectId; exports.newLayerId = _chunkYAFS2QFZcjs.newLayerId; exports.normalizeAdjustmentLayer = _chunkYAFS2QFZcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkYAFS2QFZcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkYAFS2QFZcjs.normalizeAngle; exports.normalizeBlendMode = _chunkJ5BA3BQ6cjs.normalizeBlendMode; exports.normalizeBlender = _chunk6GFRKLLScjs.normalizeBlender; exports.normalizeBrush = _chunk6GFRKLLScjs.normalizeBrush; exports.normalizeFilter = _chunkYAFS2QFZcjs.normalizeFilter; exports.normalizeFlow = _chunkFHPVDTI2cjs.normalizeFlow; exports.normalizeHexColor = _chunk6GFRKLLScjs.normalizeHexColor; exports.normalizeLayerEffects = _chunk24ATT2PEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkYAFS2QFZcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkYAFS2QFZcjs.normalizeLiveShape; exports.normalizeMixer = _chunk6GFRKLLScjs.normalizeMixer; exports.normalizePlacement = _chunkYAFS2QFZcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkYAFS2QFZcjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunkYT3JL7YMcjs.normalizeRetouch; exports.normalizeShapePaint = _chunkYAFS2QFZcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkYAFS2QFZcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkYAFS2QFZcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunk6GFRKLLScjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkYAFS2QFZcjs.normalizeSubpaths; exports.normalizeText = _chunkYAFS2QFZcjs.normalizeText; exports.normalizeTilt = _chunkFHPVDTI2cjs.normalizeTilt; exports.normalizeWetParams = _chunkFHPVDTI2cjs.normalizeWetParams; exports.offsetLayer = _chunkYAFS2QFZcjs.offsetLayer; exports.offsetShape = _chunkYAFS2QFZcjs.offsetShape; exports.offsetSmartObject = _chunkYAFS2QFZcjs.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 = _chunkZ2H7KECKcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkYAFS2QFZcjs.parseAdjustmentBlock; exports.parseBlend = _chunkYAFS2QFZcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunk2YQONY6Gcjs.parseCssColor; exports.parseDataUrl = _chunkDCLJNVZScjs.parseDataUrl; exports.parseEffectColor = _chunk24ATT2PEcjs.parseEffectColor; exports.parseLfx2 = _chunkYAFS2QFZcjs.parseLfx2; exports.parseLrfx = _chunkYAFS2QFZcjs.parseLrfx; exports.parseOpenTypeFont = _chunk2OJACTPRcjs.parseOpenTypeFont; exports.parsePaintSource = _chunk6GFRKLLScjs.parsePaintSource; exports.parsePatternBlock = _chunkYAFS2QFZcjs.parsePatternBlock; exports.parseSelectionMode = _chunkYAFS2QFZcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkYAFS2QFZcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkYAFS2QFZcjs.patchParagraphStyle; exports.patchTextStyle = _chunkYAFS2QFZcjs.patchTextStyle; exports.pathStrokeCoverage = _chunkZ6OUCS2Kcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkZ6OUCS2Kcjs.pathStrokeDabs; exports.perDabStrength = _chunkYT3JL7YMcjs.perDabStrength; exports.photoFilterMatrix = _chunkYAFS2QFZcjs.photoFilterMatrix; exports.pigment8 = _chunkJ5BA3BQ6cjs.pigment8; exports.pigmentColor = _chunkFHPVDTI2cjs.pigmentColor; exports.pigmentOf = _chunkFHPVDTI2cjs.pigmentOf; exports.pixelLayerBounds = _chunkYAFS2QFZcjs.pixelLayerBounds; exports.pixelLayers = _chunkYAFS2QFZcjs.pixelLayers; exports.pixelPigment = _chunkFHPVDTI2cjs.pixelPigment; exports.placeContents = _chunkYAFS2QFZcjs.placeContents; exports.placeLayer = _chunkYAFS2QFZcjs.placeLayer; exports.placementAt = _chunkYAFS2QFZcjs.placementAt; exports.placementBounds = _chunkYAFS2QFZcjs.placementBounds; exports.placementGeometry = _chunkYAFS2QFZcjs.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 = _chunkYAFS2QFZcjs.posterizeValue; exports.presetWarp = _chunkYAFS2QFZcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkYAFS2QFZcjs.projectImagePoint; exports.projectImageRect = _chunkYAFS2QFZcjs.projectImageRect; exports.projectMaskCoverage = _chunkYAFS2QFZcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkJ5BA3BQ6cjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkYAFS2QFZcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkYAFS2QFZcjs.psdToLayers; exports.pullWarpMesh = _chunkZ2H7KECKcjs.pullWarpMesh; exports.put255 = _chunk6GFRKLLScjs.put255; exports.quickMaskPixels = quickMaskPixels; exports.rand01 = _chunk6GFRKLLScjs.rand01; exports.rangeLightness = _chunkYAFS2QFZcjs.rangeLightness; exports.rasterContents = _chunkYAFS2QFZcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkYAFS2QFZcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkYAFS2QFZcjs.rasterizeCoverage; exports.rasterizeDab = _chunk6GFRKLLScjs.rasterizeDab; exports.rasterizeSmartObject = _chunkYAFS2QFZcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkJ5BA3BQ6cjs.readDeepRegion; exports.readPaintSource = _chunk6GFRKLLScjs.readPaintSource; exports.readPixel = _chunkJ5BA3BQ6cjs.readPixel; exports.readPsd = _chunkYAFS2QFZcjs.readPsd; exports.readRegion = _chunkJ5BA3BQ6cjs.readRegion; exports.readSourceRegion = _chunkYT3JL7YMcjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkMUUXNRU4cjs.rectToQuad; exports.reduceSurface = _chunk24ATT2PEcjs.reduceSurface; exports.referencePoint = _chunkYAFS2QFZcjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkJ5BA3BQ6cjs.reflectanceToRgb; exports.removeAlpha = _chunkYAFS2QFZcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkYAFS2QFZcjs.removeLayer; exports.removeLayerEffect = _chunkYAFS2QFZcjs.removeLayerEffect; exports.removeLayerFilter = _chunkYAFS2QFZcjs.removeLayerFilter; exports.removePaintGradientStop = _chunk6GFRKLLScjs.removePaintGradientStop; exports.removeSmartFilter = _chunkYAFS2QFZcjs.removeSmartFilter; exports.renderBrushstroke = _chunkZ6OUCS2Kcjs.renderBrushstroke; exports.renderLayerEffects = _chunk24ATT2PEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkYAFS2QFZcjs.renderShape; exports.renderShapeRect = _chunkYAFS2QFZcjs.renderShapeRect; exports.renderSmartObject = _chunkYAFS2QFZcjs.renderSmartObject; exports.renderText = _chunkYAFS2QFZcjs.renderText; exports.replaceContents = _chunkYAFS2QFZcjs.replaceContents; exports.replaceTextRange = _chunkYAFS2QFZcjs.replaceTextRange; exports.requireLayer = _chunkYAFS2QFZcjs.requireLayer; exports.requireOperation = _chunkYAFS2QFZcjs.requireOperation; exports.requireShapeLayer = _chunkYAFS2QFZcjs.requireShapeLayer; exports.requireSmartObject = _chunkYAFS2QFZcjs.requireSmartObject; exports.requireTypeLayer = _chunkYAFS2QFZcjs.requireTypeLayer; exports.requireUnlocked = _chunkYAFS2QFZcjs.requireUnlocked; exports.rerender = _chunkYAFS2QFZcjs.rerender; exports.rerenderShape = _chunkYAFS2QFZcjs.rerenderShape; exports.rerenderText = _chunkYAFS2QFZcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkYAFS2QFZcjs.resizeSelection; exports.resizeWarpMesh = _chunkZ2H7KECKcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkYAFS2QFZcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunk6GFRKLLScjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.restyleRange = _chunkZ2H7KECKcjs.restyleRange; exports.retouchFilter = _chunkYT3JL7YMcjs.retouchFilter; exports.reversePaintGradient = _chunk6GFRKLLScjs.reversePaintGradient; exports.rgbToGray = _chunkYAFS2QFZcjs.rgbToGray; exports.rgbToHsl = _chunkYAFS2QFZcjs.rgbToHsl; exports.rgbToReflectance = _chunkJ5BA3BQ6cjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunkYT3JL7YMcjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkYAFS2QFZcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkYAFS2QFZcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sampleLut = _chunkYAFS2QFZcjs.sampleLut; exports.sampleToneLut = _chunkYAFS2QFZcjs.sampleToneLut; exports.saturationOf = _chunkYT3JL7YMcjs.saturationOf; exports.scaleLayerEffect = _chunk24ATT2PEcjs.scaleLayerEffect; exports.scalePaintGradient = _chunk6GFRKLLScjs.scalePaintGradient; exports.seamlessClone = _chunkYT3JL7YMcjs.seamlessClone; exports.selectionArea = _chunkYAFS2QFZcjs.selectionArea; exports.selectionFromCoverage = _chunkYAFS2QFZcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkYAFS2QFZcjs.selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = _chunkYAFS2QFZcjs.selectionToCoverage; exports.selectionToPixels = _chunkYAFS2QFZcjs.selectionToPixels; exports.selectionValueAt = _chunkYAFS2QFZcjs.selectionValueAt; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkYAFS2QFZcjs.serializeContents; exports.serializeEffects = _chunkYAFS2QFZcjs.serializeEffects; exports.serializeLayer = _chunkYAFS2QFZcjs.serializeLayer; exports.serializeLayers = _chunkYAFS2QFZcjs.serializeLayers; exports.serializeLayersExternal = _chunkYAFS2QFZcjs.serializeLayersExternal; exports.serializePatterns = _chunkYAFS2QFZcjs.serializePatterns; exports.serializeSelection = _chunkYAFS2QFZcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkYAFS2QFZcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkYAFS2QFZcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkYAFS2QFZcjs.setLayerMask; exports.setLayerProperties = _chunkYAFS2QFZcjs.setLayerProperties; exports.setLum = _chunkJ5BA3BQ6cjs.setLum; exports.setPigmentColor = _chunkJ5BA3BQ6cjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkYAFS2QFZcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkYAFS2QFZcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkYAFS2QFZcjs.setSmartPlacement; exports.shadeTile = _chunkFHPVDTI2cjs.shadeTile; exports.shapeAsPixelLayer = _chunkYAFS2QFZcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkYAFS2QFZcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkYAFS2QFZcjs.shapeGeometryBounds; exports.shapeLayers = _chunkYAFS2QFZcjs.shapeLayers; exports.shapeOutline = _chunkYAFS2QFZcjs.shapeOutline; exports.shapeRenderClip = _chunkYAFS2QFZcjs.shapeRenderClip; exports.shiftCoverage = _chunkYAFS2QFZcjs.shiftCoverage; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkYAFS2QFZcjs.smartObjectLayers; exports.smoothCoverage = _chunkYAFS2QFZcjs.smoothCoverage; exports.smoothPoints = _chunk6GFRKLLScjs.smoothPoints; exports.smudgeEffect = _chunkYT3JL7YMcjs.smudgeEffect; exports.solidPaint = _chunk6GFRKLLScjs.solidPaint; exports.solidSurface = _chunkJ5BA3BQ6cjs.solidSurface; exports.solveMembrane = _chunkYT3JL7YMcjs.solveMembrane; exports.spliceRuns = _chunkZ2H7KECKcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunkYT3JL7YMcjs.sponge; exports.spongeEffect = _chunkYT3JL7YMcjs.spongeEffect; exports.spotHealPixels = _chunkYT3JL7YMcjs.spotHealPixels; exports.spotHealWindow = _chunkYT3JL7YMcjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkFHPVDTI2cjs.srgbByteToLinear; exports.srgbDecode = _chunkJ5BA3BQ6cjs.srgbDecode; exports.srgbEncode = _chunkJ5BA3BQ6cjs.srgbEncode; exports.srgbToLinear = _chunkYAFS2QFZcjs.srgbToLinear; exports.standardBlendMode = _chunkJ5BA3BQ6cjs.standardBlendMode; exports.stepSlotTs = _chunkFHPVDTI2cjs.stepSlotTs; exports.styleAt = _chunkZ2H7KECKcjs.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 = _chunkYAFS2QFZcjs.tempTintToXy; exports.temperatureToKelvin = _chunkYAFS2QFZcjs.temperatureToKelvin; exports.textIndexAt = _chunkZ2H7KECKcjs.textIndexAt; exports.textMatrix = _chunkYAFS2QFZcjs.textMatrix; exports.textOutlines = _chunkYAFS2QFZcjs.textOutlines; exports.textRange = _chunkYAFS2QFZcjs.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 = _chunkYAFS2QFZcjs.toTextSpace; exports.toneCurve = _chunkYAFS2QFZcjs.toneCurve; exports.toneLuts = _chunkYAFS2QFZcjs.toneLuts; exports.toneOf = _chunkYT3JL7YMcjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkYAFS2QFZcjs.transformHomography; exports.transformMap = _chunkYAFS2QFZcjs.transformMap; exports.transformShapeComponents = _chunkYAFS2QFZcjs.transformShapeComponents; exports.transformSurface = _chunk24ATT2PEcjs.transformSurface; exports.transformTypeLayer = _chunkYAFS2QFZcjs.transformTypeLayer; exports.transformedBounds = _chunk24ATT2PEcjs.transformedBounds; exports.transformedBox = _chunkYAFS2QFZcjs.transformedBox; exports.transformedPoint = _chunkYAFS2QFZcjs.transformedPoint; exports.translateSurface = _chunkJ5BA3BQ6cjs.translateSurface; exports.typeAsPixelLayer = _chunkYAFS2QFZcjs.typeAsPixelLayer; exports.typeFrame = _chunkYAFS2QFZcjs.typeFrame; exports.typeFromAnnotation = _chunkYAFS2QFZcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkYAFS2QFZcjs.typeLayerName; exports.ungroupLayer = _chunkYAFS2QFZcjs.ungroupLayer; exports.uniformTile = _chunkJ5BA3BQ6cjs.uniformTile; exports.unionRect = _chunkYAFS2QFZcjs.unionRect; exports.unprojectCanvasPoint = _chunkYAFS2QFZcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkYAFS2QFZcjs.updateLayerEffect; exports.updateLayerFilter = _chunkYAFS2QFZcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkYAFS2QFZcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunk6GFRKLLScjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkYAFS2QFZcjs.updateShapeLayer; exports.updateSmartFilter = _chunkYAFS2QFZcjs.updateSmartFilter; exports.updateTypeLayer = _chunkYAFS2QFZcjs.updateTypeLayer; exports.uvToXy = _chunkYAFS2QFZcjs.uvToXy; exports.validateEffectGradient = _chunk24ATT2PEcjs.validateEffectGradient; exports.validateLayerEffect = _chunk24ATT2PEcjs.validateLayerEffect; exports.validateLayerEffects = _chunk24ATT2PEcjs.validateLayerEffects; exports.versionedDescriptorBytes = _chunkYAFS2QFZcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkYAFS2QFZcjs.vibranceLinear; exports.vibrancePixel = _chunkYAFS2QFZcjs.vibrancePixel; exports.walkDabs = _chunk6GFRKLLScjs.walkDabs; exports.warpMeshEditPoints = _chunkZ2H7KECKcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkZ2H7KECKcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkZ2H7KECKcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkZ2H7KECKcjs.warpPresetMesh; exports.warpSurface = _chunk24ATT2PEcjs.warpSurface; exports.wbMatrix = _chunkYAFS2QFZcjs.wbMatrix; exports.wetGpuSupport = _chunkFHPVDTI2cjs.wetGpuSupport; exports.wetSimdSupported = _chunkFHPVDTI2cjs.wetSimdSupported; exports.wetSupport = _chunkFHPVDTI2cjs.wetSupport; exports.whiteBalanceFromSample = _chunkYAFS2QFZcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkYAFS2QFZcjs.whiteBalanceMatrix; exports.withFilterMaskSurface = _chunkYAFS2QFZcjs.withFilterMaskSurface; exports.withNewIds = _chunkYAFS2QFZcjs.withNewIds; exports.writeAdjustmentBlock = _chunkYAFS2QFZcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkJ5BA3BQ6cjs.writeDeepRegion; exports.writeLfx2 = _chunkYAFS2QFZcjs.writeLfx2; exports.writePatternBlock = _chunkYAFS2QFZcjs.writePatternBlock; exports.writePsd = _chunkYAFS2QFZcjs.writePsd; exports.writeRegion = _chunkJ5BA3BQ6cjs.writeRegion; exports.xyToTempTint = _chunkYAFS2QFZcjs.xyToTempTint; exports.xyToUv = _chunkYAFS2QFZcjs.xyToUv;
16012
+ exports.ADJUSTMENT_KEYS = _chunkJLGNZMUVcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkJLGNZMUVcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkJLGNZMUVcjs.ADJUSTMENT_LUT_SIZE; exports.AS_SHOT_KELVIN = _chunkJLGNZMUVcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkJLGNZMUVcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkJLGNZMUVcjs.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 = _chunkJLGNZMUVcjs.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.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.CoverageMap = _chunk6GFRKLLScjs.CoverageMap; exports.D50 = _chunkJLGNZMUVcjs.D50; exports.D65 = _chunkJLGNZMUVcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunk2R3UW57Ucjs.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 = _chunk24ATT2PEcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkJLGNZMUVcjs.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 = _chunkYT3JL7YMcjs.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 = _chunk2R3UW57Ucjs.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 = _chunkJLGNZMUVcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunk24ATT2PEcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkFHPVDTI2cjs.DRY_EPS; exports.DabWalker = _chunk6GFRKLLScjs.DabWalker; exports.EMPTY_DISTANCE = _chunkJLGNZMUVcjs.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 = _chunkJLGNZMUVcjs.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 = _chunkJLGNZMUVcjs.HUE_RANGE_LABELS; exports.IDENTITY_CLONE_TRANSFORM = _chunkYT3JL7YMcjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkJLGNZMUVcjs.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 = _chunk24ATT2PEcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkJLGNZMUVcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkJLGNZMUVcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunk24ATT2PEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkJLGNZMUVcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkJLGNZMUVcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkJLGNZMUVcjs.LUMA_709; exports.LayerCompositor = _chunkJLGNZMUVcjs.LayerCompositor; exports.LayerEffectError = _chunk24ATT2PEcjs.LayerEffectError; exports.LayerOperationError = _chunkJLGNZMUVcjs.LayerOperationError; exports.MAX_BATCH = _chunkFHPVDTI2cjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunk6GFRKLLScjs.MAX_BRUSH_SIZE; exports.MAX_EFFECT_REACH = _chunk24ATT2PEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkJLGNZMUVcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkFHPVDTI2cjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunk24ATT2PEcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkFHPVDTI2cjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkFHPVDTI2cjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkJLGNZMUVcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkJLGNZMUVcjs.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 = _chunkJLGNZMUVcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkFHPVDTI2cjs.PARAM; exports.PARAM_FLOATS = _chunkFHPVDTI2cjs.PARAM_FLOATS; exports.PATTERN_BLOCK_KEYS = _chunkJLGNZMUVcjs.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 = _chunkJLGNZMUVcjs.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 = _chunk24ATT2PEcjs.PatternPlacement; exports.PatternTile = _chunk24ATT2PEcjs.PatternTile; exports.PsdError = _chunkJLGNZMUVcjs.PsdError; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunkYT3JL7YMcjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunkYT3JL7YMcjs.RegionPixelSource; exports.RetouchDabStroke = _chunkYT3JL7YMcjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkJLGNZMUVcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkJLGNZMUVcjs.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 = _chunkJLGNZMUVcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkJLGNZMUVcjs.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 = _chunkJLGNZMUVcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunkYT3JL7YMcjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkFHPVDTI2cjs.SRGB_TO_LINEAR; exports.STRIP = _chunkFHPVDTI2cjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkJLGNZMUVcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunk6GFRKLLScjs.SmudgeTip; exports.StrokeCoverage = _chunk6GFRKLLScjs.StrokeCoverage; exports.SurfaceDraft = _chunkJ5BA3BQ6cjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkJLGNZMUVcjs.TEXT_ALIGNS; exports.TEXT_RENDER_MARGIN = _chunkJLGNZMUVcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkJLGNZMUVcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkJ5BA3BQ6cjs.TILE; exports.TILE_SHIFT = _chunkJ5BA3BQ6cjs.TILE_SHIFT; exports.TINT_SCALE = _chunkJLGNZMUVcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunk6GFRKLLScjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkJLGNZMUVcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunkYT3JL7YMcjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkJLGNZMUVcjs.TRANSFORM_ANCHORS; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunk6GFRKLLScjs.TileMedium; exports.TilePixelSource = _chunkYT3JL7YMcjs.TilePixelSource; exports.TiledSurface = _chunkJ5BA3BQ6cjs.TiledSurface; exports.TransformTooLargeError = _chunk24ATT2PEcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunkYT3JL7YMcjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.U_MAX = _chunkFHPVDTI2cjs.U_MAX; exports.VIBRANCE_GREY = _chunkJLGNZMUVcjs.VIBRANCE_GREY; exports.W9 = _chunkFHPVDTI2cjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunk2R3UW57Ucjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunk2R3UW57Ucjs.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 = _chunkJLGNZMUVcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunk643B2HKCcjs.ZlibError; exports.activeAdjustmentLayers = _chunkJLGNZMUVcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkJLGNZMUVcjs.activeEffectSmartFilters; exports.activeSmartFilters = _chunkJLGNZMUVcjs.activeSmartFilters; exports.addLayerEffect = _chunkJLGNZMUVcjs.addLayerEffect; exports.addLayerFilter = _chunkJLGNZMUVcjs.addLayerFilter; exports.addPaintGradientStop = _chunk6GFRKLLScjs.addPaintGradientStop; exports.addSmartFilter = _chunkJLGNZMUVcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkJLGNZMUVcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkJLGNZMUVcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkJLGNZMUVcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkJLGNZMUVcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunk643B2HKCcjs.adler32; exports.anchorPoint = _chunkJLGNZMUVcjs.anchorPoint; exports.annotationBlend = _chunkJLGNZMUVcjs.annotationBlend; exports.annotationLayerFor = _chunkJLGNZMUVcjs.annotationLayerFor; exports.annotationLayerName = _chunkJLGNZMUVcjs.annotationLayerName; exports.annotationOfLayer = _chunkJLGNZMUVcjs.annotationOfLayer; exports.annotationOfShape = _chunkJLGNZMUVcjs.annotationOfShape; exports.annotationOfType = _chunkJLGNZMUVcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkJLGNZMUVcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkJLGNZMUVcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkJLGNZMUVcjs.applyAdjustments; exports.applyBoxBlur = _chunkJLGNZMUVcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkJLGNZMUVcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkJLGNZMUVcjs.applyDepthMask; exports.applyHomography = _chunkMUUXNRU4cjs.applyHomography; exports.applyImageProjectionToContext = _chunkJLGNZMUVcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkJLGNZMUVcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkJLGNZMUVcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkJLGNZMUVcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkJLGNZMUVcjs.applyParams; exports.applyProcess2Adjustments = _chunkJLGNZMUVcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkJLGNZMUVcjs.applyProcess2Float; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunkYT3JL7YMcjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkJLGNZMUVcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunk6GFRKLLScjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunk6GFRKLLScjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunkYT3JL7YMcjs.applyToneToDeepTile; exports.backgroundLayer = _chunkJLGNZMUVcjs.backgroundLayer; exports.base64ToBytes = _chunkDCLJNVZScjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunkYT3JL7YMcjs.bestOffset; exports.blackWhiteGray = _chunkJLGNZMUVcjs.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 = _chunk24ATT2PEcjs.blendTile; exports.blenderDab = _chunk6GFRKLLScjs.blenderDab; exports.blurFilter = _chunkJLGNZMUVcjs.blurFilter; exports.borderCoverage = _chunkJLGNZMUVcjs.borderCoverage; exports.boxBlurPixels = _chunkYT3JL7YMcjs.boxBlurPixels; exports.boxMean = boxMean; exports.boxPointOf = _chunkJLGNZMUVcjs.boxPointOf; exports.boxQuad = _chunkMUUXNRU4cjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkJLGNZMUVcjs.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 = _chunkJLGNZMUVcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkJLGNZMUVcjs.buildToneLut; exports.builtinPattern = _chunk24ATT2PEcjs.builtinPattern; exports.builtinPatternIds = _chunk24ATT2PEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkDCLJNVZScjs.bytesToBase64; exports.calculateCropDrag = _chunkJLGNZMUVcjs.calculateCropDrag; exports.canShareMemory = _chunkFHPVDTI2cjs.canShareMemory; exports.canvasCompositeOperation = _chunkJ5BA3BQ6cjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkJLGNZMUVcjs.canvasToImagePoint; exports.caretAt = _chunk2R3UW57Ucjs.caretAt; exports.changedTiles = _chunk24ATT2PEcjs.changedTiles; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkJLGNZMUVcjs.clampCropToImage; exports.cleanMixer = _chunk6GFRKLLScjs.cleanMixer; exports.cloneSamplePoint = _chunkYT3JL7YMcjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunkJ5BA3BQ6cjs.collectTiles; exports.colorBalanceChannel = _chunkJLGNZMUVcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.combineSelections = _chunkJLGNZMUVcjs.combineSelections; exports.compileAdjustmentLayer = _chunkJLGNZMUVcjs.compileAdjustmentLayer; exports.componentPath = _chunkJLGNZMUVcjs.componentPath; exports.compositeDeep = _chunkJLGNZMUVcjs.compositeDeep; exports.compositeSurfaceOver = _chunk24ATT2PEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkJLGNZMUVcjs.computeSelectionBounds; exports.contentAwareFill = _chunkYT3JL7YMcjs.contentAwareFill; exports.contentBounds = _chunkJ5BA3BQ6cjs.contentBounds; exports.contentsBox = _chunkJLGNZMUVcjs.contentsBox; exports.contentsSurface = _chunkJLGNZMUVcjs.contentsSurface; exports.contractCoverage = _chunkJLGNZMUVcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkJ5BA3BQ6cjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkJLGNZMUVcjs.convertToSmartObject; exports.copySmartObject = _chunkJLGNZMUVcjs.copySmartObject; exports.cornersFromMatrix = _chunkJLGNZMUVcjs.cornersFromMatrix; exports.coverageTileCoord = _chunk6GFRKLLScjs.coverageTileCoord; exports.coverageToByte = _chunkJLGNZMUVcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkJLGNZMUVcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunk6GFRKLLScjs.createBlenderScratch; exports.createCanvasTextShaper = _chunk2R3UW57Ucjs.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 = _chunk2R3UW57Ucjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunk2R3UW57Ucjs.createOutlineTextShaper; exports.createPigment = _chunkJ5BA3BQ6cjs.createPigment; exports.createPigmentTools = _chunkFHPVDTI2cjs.createPigmentTools; exports.createSelectionMask = _chunkJLGNZMUVcjs.createSelectionMask; exports.createShapeLayer = _chunkJLGNZMUVcjs.createShapeLayer; exports.createTypeLayer = _chunkJLGNZMUVcjs.createTypeLayer; exports.createWetGpuEngine = _chunkFHPVDTI2cjs.createWetGpuEngine; exports.cssFont = _chunk2R3UW57Ucjs.cssFont; exports.cssFontFamily = _chunk2R3UW57Ucjs.cssFontFamily; exports.curveLut = _chunk24ATT2PEcjs.curveLut; exports.curveLutFromLevels = _chunkJLGNZMUVcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunk6GFRKLLScjs.dabCoverage; exports.dabRect = _chunk6GFRKLLScjs.dabRect; exports.decodeDeepSurface = _chunkJLGNZMUVcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkJLGNZMUVcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkJLGNZMUVcjs.decodeLayerMask; exports.decodeMergedImage = _chunkJLGNZMUVcjs.decodeMergedImage; exports.decodePlanes = _chunkJLGNZMUVcjs.decodePlanes; exports.decodePng = _chunkDCLJNVZScjs.decodePng; exports.decodePngDataUrl = _chunkJLGNZMUVcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkJLGNZMUVcjs.decodeSelectionRle; exports.deepBytes = _chunkJ5BA3BQ6cjs.deepBytes; exports.deepTile = _chunkJ5BA3BQ6cjs.deepTile; exports.defaultAdjustmentParams = _chunkJLGNZMUVcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunk24ATT2PEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunk24ATT2PEcjs.defaultLayerEffect; exports.defaultShapeName = _chunkJLGNZMUVcjs.defaultShapeName; exports.deflate = _chunk643B2HKCcjs.deflate; exports.deflateRaw = _chunk643B2HKCcjs.deflateRaw; exports.depthMaskAlpha = _chunkJLGNZMUVcjs.depthMaskAlpha; exports.depthOf = _chunkJ5BA3BQ6cjs.depthOf; exports.depthRasterMask = _chunkJLGNZMUVcjs.depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkJLGNZMUVcjs.describeTransform; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkJLGNZMUVcjs.deserializeEffects; exports.deserializeLayer = _chunkJLGNZMUVcjs.deserializeLayer; exports.deserializeLayers = _chunkJLGNZMUVcjs.deserializeLayers; exports.deserializePatterns = _chunkJLGNZMUVcjs.deserializePatterns; exports.deserializeSelection = _chunkJLGNZMUVcjs.deserializeSelection; exports.developFilter = _chunkJLGNZMUVcjs.developFilter; exports.developFromAdjustments = _chunkJLGNZMUVcjs.developFromAdjustments; exports.developTarget = _chunkJLGNZMUVcjs.developTarget; exports.dexp = _chunkFHPVDTI2cjs.dexp; exports.dilateMask = _chunkYT3JL7YMcjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkJLGNZMUVcjs.distanceTransform; exports.dlog = _chunkFHPVDTI2cjs.dlog; exports.documentContents = _chunkJLGNZMUVcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunkYT3JL7YMcjs.dodgeBurn; exports.dodgeBurnCurve = _chunkYT3JL7YMcjs.dodgeBurnCurve; exports.downloadPsd = downloadPsd; exports.dpow = _chunkFHPVDTI2cjs.dpow; exports.dragWarpMeshPoint = _chunk2R3UW57Ucjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkFHPVDTI2cjs.dsincos; exports.duplicateLayer = _chunkJLGNZMUVcjs.duplicateLayer; exports.edgeBits = _chunkFHPVDTI2cjs.edgeBits; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunk24ATT2PEcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunk24ATT2PEcjs.effectReach; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunk24ATT2PEcjs.effectsFingerprint; exports.effectsMargin = _chunk24ATT2PEcjs.effectsMargin; exports.effectsScale = _chunk24ATT2PEcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkJ5BA3BQ6cjs.emptySurface; exports.encodeDeepSurface = _chunkJLGNZMUVcjs.encodeDeepSurface; exports.encodePng = _chunkDCLJNVZScjs.encodePng; exports.encodeRle = _chunkJLGNZMUVcjs.encodeRle; exports.encodeSelectionRle = _chunkJLGNZMUVcjs.encodeSelectionRle; exports.encodeSurface = _chunkJLGNZMUVcjs.encodeSurface; exports.evalWarpMesh = _chunk2R3UW57Ucjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkJLGNZMUVcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunk6GFRKLLScjs.exchangeRates; exports.expNeg = _chunkFHPVDTI2cjs.expNeg; exports.expandCoverage = _chunkJLGNZMUVcjs.expandCoverage; exports.exportPsd = _chunkJLGNZMUVcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkJLGNZMUVcjs.featherCoverage; exports.fillRect = _chunkJ5BA3BQ6cjs.fillRect; exports.filmPixel = _chunkFHPVDTI2cjs.filmPixel; exports.filmReflectance = _chunkFHPVDTI2cjs.filmReflectance; exports.filterMaskCoverage = _chunkJLGNZMUVcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunk24ATT2PEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findWebGpu = _chunkFHPVDTI2cjs.findWebGpu; exports.finishTile = _chunkJ5BA3BQ6cjs.finishTile; exports.fitParagraphRuns = _chunk2R3UW57Ucjs.fitParagraphRuns; exports.fitRuns = _chunk2R3UW57Ucjs.fitRuns; exports.flattenLayers = _chunk24ATT2PEcjs.flattenLayers; exports.flattenPath = _chunkJLGNZMUVcjs.flattenPath; exports.flipCorners = _chunkJLGNZMUVcjs.flipCorners; exports.flowField = _chunkFHPVDTI2cjs.flowField; exports.fontOf = _chunk2R3UW57Ucjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkJLGNZMUVcjs.fullSelection; exports.gaussianBlur = _chunk24ATT2PEcjs.gaussianBlur; exports.geometryHomography = _chunkJLGNZMUVcjs.geometryHomography; exports.getAnnotationBounds = _chunkJLGNZMUVcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkJLGNZMUVcjs.getCropCursor; exports.getRotatedSize = _chunkJLGNZMUVcjs.getRotatedSize; exports.getViewportMetrics = _chunkJLGNZMUVcjs.getViewportMetrics; exports.getViewportProjection = _chunkJLGNZMUVcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.gradientDabColor = _chunk6GFRKLLScjs.gradientDabColor; exports.greyMorphology = _chunkJLGNZMUVcjs.greyMorphology; exports.groupLayers = _chunkJLGNZMUVcjs.groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunk24ATT2PEcjs.hasActiveEffects; exports.hasResampledLegacyMask = _chunkJLGNZMUVcjs.hasResampledLegacyMask; exports.hasSurface = _chunkJLGNZMUVcjs.hasSurface; exports.hasWarp = _chunkJLGNZMUVcjs.hasWarp; exports.hash2 = _chunk6GFRKLLScjs.hash2; exports.hashMaskContent = _chunkJLGNZMUVcjs.hashMaskContent; exports.hashNoise = _chunk24ATT2PEcjs.hashNoise; exports.healPixels = _chunkYT3JL7YMcjs.healPixels; exports.hexToPaintRgb = _chunk6GFRKLLScjs.hexToPaintRgb; exports.hexToRgb = _chunkJLGNZMUVcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkJLGNZMUVcjs.hitTestAnnotation; exports.hitTestCrop = _chunkJLGNZMUVcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkMUUXNRU4cjs.homographyFromAffine; exports.homographyFromPoints = _chunkMUUXNRU4cjs.homographyFromPoints; exports.hslToRgb = _chunkJLGNZMUVcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkJLGNZMUVcjs.hueRangeTables; exports.hueRangeWeight = _chunkJLGNZMUVcjs.hueRangeWeight; exports.hueSaturation = _chunkJLGNZMUVcjs.hueSaturation; exports.identityCurve = _chunkJLGNZMUVcjs.identityCurve; exports.identityLevels = _chunkJLGNZMUVcjs.identityLevels; exports.identityTransform = _chunkJLGNZMUVcjs.identityTransform; exports.identityWarpMesh = _chunk2R3UW57Ucjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imageToCanvasPoint = _chunkJLGNZMUVcjs.imageToCanvasPoint; exports.importPsd = _chunkJLGNZMUVcjs.importPsd; exports.inflate = _chunk643B2HKCcjs.inflate; exports.inflateRaw = _chunk643B2HKCcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunk24ATT2PEcjs.insertLayer; exports.instancesOf = _chunkJLGNZMUVcjs.instancesOf; exports.invertHomography = _chunkMUUXNRU4cjs.invertHomography; exports.invertMatrix3 = _chunkJLGNZMUVcjs.invertMatrix3; exports.invertSelection = _chunkJLGNZMUVcjs.invertSelection; exports.isActiveFilter = _chunkJLGNZMUVcjs.isActiveFilter; exports.isAdjustmentKind = _chunkJLGNZMUVcjs.isAdjustmentKind; exports.isBitDepth = _chunkJ5BA3BQ6cjs.isBitDepth; exports.isBlendMode = _chunkJ5BA3BQ6cjs.isBlendMode; exports.isBrushstrokeBrush = _chunkZ6OUCS2Kcjs.isBrushstrokeBrush; exports.isContentsDecoded = _chunkJLGNZMUVcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkJLGNZMUVcjs.isDefaultDepthMask; exports.isGradientPaint = _chunk6GFRKLLScjs.isGradientPaint; exports.isIdentityCloneTransform = _chunkYT3JL7YMcjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkJLGNZMUVcjs.isIdentityTransform; exports.isInterpolation = _chunk24ATT2PEcjs.isInterpolation; exports.isLayerEffectKind = _chunk24ATT2PEcjs.isLayerEffectKind; exports.isLayerLocked = _chunk24ATT2PEcjs.isLayerLocked; exports.isLegacyShape = _chunkJLGNZMUVcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPainterlyBlendMode = _chunkJ5BA3BQ6cjs.isPainterlyBlendMode; exports.isPng = _chunkDCLJNVZScjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkJLGNZMUVcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkJLGNZMUVcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkJLGNZMUVcjs.isSelectionEmpty; exports.isSelectionMode = _chunkJLGNZMUVcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkJ5BA3BQ6cjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkJLGNZMUVcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkJLGNZMUVcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkJLGNZMUVcjs.isTransformAnchor; exports.isValidWarp = _chunkJLGNZMUVcjs.isValidWarp; exports.keepDeepSamples = _chunkJ5BA3BQ6cjs.keepDeepSamples; exports.kelvinToTemperature = _chunkJLGNZMUVcjs.kelvinToTemperature; exports.keysWeight = _chunk24ATT2PEcjs.keysWeight; exports.latticeViscosity = _chunkFHPVDTI2cjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunk24ATT2PEcjs.layerEffectFields; exports.layerEffectLabel = _chunk24ATT2PEcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkJLGNZMUVcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkJLGNZMUVcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkJLGNZMUVcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkJLGNZMUVcjs.layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = _chunkJLGNZMUVcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerTree = _chunkJLGNZMUVcjs.layerTree; exports.layerTypeLabel = _chunkJLGNZMUVcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkJLGNZMUVcjs.layersFromLegacy; exports.layoutText = _chunk2R3UW57Ucjs.layoutText; exports.legacyAdjustmentLayer = _chunkJLGNZMUVcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkJLGNZMUVcjs.legacyMaskOf; exports.legacyView = _chunkJLGNZMUVcjs.legacyView; exports.lerpPigment = _chunkJ5BA3BQ6cjs.lerpPigment; exports.lerpPigmentInto = _chunkJ5BA3BQ6cjs.lerpPigmentInto; exports.levelsValue = _chunkJLGNZMUVcjs.levelsValue; exports.linearSrgbToXy = _chunkJLGNZMUVcjs.linearSrgbToXy; exports.linearToSrgb = _chunkJLGNZMUVcjs.linearToSrgb; exports.linearToSrgb8 = _chunkFHPVDTI2cjs.linearToSrgb8; exports.liveComponent = _chunkJLGNZMUVcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkJLGNZMUVcjs.liveShapeSubpaths; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunk6GFRKLLScjs.loadMixer; exports.loadOpenTypeFont = _chunk2OJACTPRcjs.loadOpenTypeFont; exports.loadWetKernel = _chunkFHPVDTI2cjs.loadWetKernel; exports.luma = _chunkYT3JL7YMcjs.luma; exports.magicWand = magicWand; exports.mapCropHandle = _chunkJLGNZMUVcjs.mapCropHandle; exports.mapLayer = _chunk24ATT2PEcjs.mapLayer; exports.mapSubpaths = _chunkJLGNZMUVcjs.mapSubpaths; exports.maskBounds = _chunkYT3JL7YMcjs.maskBounds; exports.maskSummary = maskSummary; exports.matrixFromCorners = _chunkJLGNZMUVcjs.matrixFromCorners; exports.matrixFromParams = _chunkJLGNZMUVcjs.matrixFromParams; exports.membraneFill = _chunkYT3JL7YMcjs.membraneFill; exports.mergeLayerEffect = _chunk24ATT2PEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkJLGNZMUVcjs.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 = _chunkJLGNZMUVcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkJLGNZMUVcjs.moveLayer; exports.moveSmartFilter = _chunkJLGNZMUVcjs.moveSmartFilter; exports.mulMatrix3 = _chunkJLGNZMUVcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkJLGNZMUVcjs.neutralHueRange; exports.newContentsId = _chunkJLGNZMUVcjs.newContentsId; exports.newEffectId = _chunk24ATT2PEcjs.newEffectId; exports.newLayerId = _chunkJLGNZMUVcjs.newLayerId; exports.normalizeAdjustmentLayer = _chunkJLGNZMUVcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkJLGNZMUVcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkJLGNZMUVcjs.normalizeAngle; exports.normalizeBlendMode = _chunkJ5BA3BQ6cjs.normalizeBlendMode; exports.normalizeBlender = _chunk6GFRKLLScjs.normalizeBlender; exports.normalizeBrush = _chunk6GFRKLLScjs.normalizeBrush; exports.normalizeFilter = _chunkJLGNZMUVcjs.normalizeFilter; exports.normalizeFlow = _chunkFHPVDTI2cjs.normalizeFlow; exports.normalizeHexColor = _chunk6GFRKLLScjs.normalizeHexColor; exports.normalizeLayerEffects = _chunk24ATT2PEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkJLGNZMUVcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkJLGNZMUVcjs.normalizeLiveShape; exports.normalizeMixer = _chunk6GFRKLLScjs.normalizeMixer; exports.normalizePlacement = _chunkJLGNZMUVcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkJLGNZMUVcjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunkYT3JL7YMcjs.normalizeRetouch; exports.normalizeShapePaint = _chunkJLGNZMUVcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkJLGNZMUVcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkJLGNZMUVcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunk6GFRKLLScjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkJLGNZMUVcjs.normalizeSubpaths; exports.normalizeText = _chunkJLGNZMUVcjs.normalizeText; exports.normalizeTilt = _chunkFHPVDTI2cjs.normalizeTilt; exports.normalizeWetParams = _chunkFHPVDTI2cjs.normalizeWetParams; exports.offsetLayer = _chunkJLGNZMUVcjs.offsetLayer; exports.offsetShape = _chunkJLGNZMUVcjs.offsetShape; exports.offsetSmartObject = _chunkJLGNZMUVcjs.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 = _chunk2R3UW57Ucjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkJLGNZMUVcjs.parseAdjustmentBlock; exports.parseBlend = _chunkJLGNZMUVcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunk2YQONY6Gcjs.parseCssColor; exports.parseDataUrl = _chunkDCLJNVZScjs.parseDataUrl; exports.parseEffectColor = _chunk24ATT2PEcjs.parseEffectColor; exports.parseLfx2 = _chunkJLGNZMUVcjs.parseLfx2; exports.parseLrfx = _chunkJLGNZMUVcjs.parseLrfx; exports.parseOpenTypeFont = _chunk2OJACTPRcjs.parseOpenTypeFont; exports.parsePaintSource = _chunk6GFRKLLScjs.parsePaintSource; exports.parsePatternBlock = _chunkJLGNZMUVcjs.parsePatternBlock; exports.parseSelectionMode = _chunkJLGNZMUVcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkJLGNZMUVcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkJLGNZMUVcjs.patchParagraphStyle; exports.patchTextStyle = _chunkJLGNZMUVcjs.patchTextStyle; exports.pathStrokeCoverage = _chunkZ6OUCS2Kcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkZ6OUCS2Kcjs.pathStrokeDabs; exports.perDabStrength = _chunkYT3JL7YMcjs.perDabStrength; exports.photoFilterMatrix = _chunkJLGNZMUVcjs.photoFilterMatrix; exports.pigment8 = _chunkJ5BA3BQ6cjs.pigment8; exports.pigmentColor = _chunkFHPVDTI2cjs.pigmentColor; exports.pigmentOf = _chunkFHPVDTI2cjs.pigmentOf; exports.pixelLayerBounds = _chunkJLGNZMUVcjs.pixelLayerBounds; exports.pixelLayers = _chunkJLGNZMUVcjs.pixelLayers; exports.pixelPigment = _chunkFHPVDTI2cjs.pixelPigment; exports.placeContents = _chunkJLGNZMUVcjs.placeContents; exports.placeLayer = _chunkJLGNZMUVcjs.placeLayer; exports.placementAt = _chunkJLGNZMUVcjs.placementAt; exports.placementBounds = _chunkJLGNZMUVcjs.placementBounds; exports.placementGeometry = _chunkJLGNZMUVcjs.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 = _chunkJLGNZMUVcjs.posterizeValue; exports.presetWarp = _chunkJLGNZMUVcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkJLGNZMUVcjs.projectImagePoint; exports.projectImageRect = _chunkJLGNZMUVcjs.projectImageRect; exports.projectMaskCoverage = _chunkJLGNZMUVcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkJ5BA3BQ6cjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkJLGNZMUVcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkJLGNZMUVcjs.psdToLayers; exports.pullWarpMesh = _chunk2R3UW57Ucjs.pullWarpMesh; exports.put255 = _chunk6GFRKLLScjs.put255; exports.quickMaskPixels = quickMaskPixels; exports.rand01 = _chunk6GFRKLLScjs.rand01; exports.rangeLightness = _chunkJLGNZMUVcjs.rangeLightness; exports.rasterContents = _chunkJLGNZMUVcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkJLGNZMUVcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkJLGNZMUVcjs.rasterizeCoverage; exports.rasterizeDab = _chunk6GFRKLLScjs.rasterizeDab; exports.rasterizeSmartObject = _chunkJLGNZMUVcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkJ5BA3BQ6cjs.readDeepRegion; exports.readPaintSource = _chunk6GFRKLLScjs.readPaintSource; exports.readPixel = _chunkJ5BA3BQ6cjs.readPixel; exports.readPsd = _chunkJLGNZMUVcjs.readPsd; exports.readRegion = _chunkJ5BA3BQ6cjs.readRegion; exports.readSourceRegion = _chunkYT3JL7YMcjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkMUUXNRU4cjs.rectToQuad; exports.reduceSurface = _chunk24ATT2PEcjs.reduceSurface; exports.referencePoint = _chunkJLGNZMUVcjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkJ5BA3BQ6cjs.reflectanceToRgb; exports.removeAlpha = _chunkJLGNZMUVcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkJLGNZMUVcjs.removeLayer; exports.removeLayerEffect = _chunkJLGNZMUVcjs.removeLayerEffect; exports.removeLayerFilter = _chunkJLGNZMUVcjs.removeLayerFilter; exports.removePaintGradientStop = _chunk6GFRKLLScjs.removePaintGradientStop; exports.removeSmartFilter = _chunkJLGNZMUVcjs.removeSmartFilter; exports.renderBrushstroke = _chunkZ6OUCS2Kcjs.renderBrushstroke; exports.renderLayerEffects = _chunk24ATT2PEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkJLGNZMUVcjs.renderShape; exports.renderShapeRect = _chunkJLGNZMUVcjs.renderShapeRect; exports.renderSmartObject = _chunkJLGNZMUVcjs.renderSmartObject; exports.renderText = _chunkJLGNZMUVcjs.renderText; exports.replaceContents = _chunkJLGNZMUVcjs.replaceContents; exports.replaceTextRange = _chunkJLGNZMUVcjs.replaceTextRange; exports.requireLayer = _chunkJLGNZMUVcjs.requireLayer; exports.requireOperation = _chunkJLGNZMUVcjs.requireOperation; exports.requireShapeLayer = _chunkJLGNZMUVcjs.requireShapeLayer; exports.requireSmartObject = _chunkJLGNZMUVcjs.requireSmartObject; exports.requireTypeLayer = _chunkJLGNZMUVcjs.requireTypeLayer; exports.requireUnlocked = _chunkJLGNZMUVcjs.requireUnlocked; exports.rerender = _chunkJLGNZMUVcjs.rerender; exports.rerenderShape = _chunkJLGNZMUVcjs.rerenderShape; exports.rerenderText = _chunkJLGNZMUVcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkJLGNZMUVcjs.resizeSelection; exports.resizeWarpMesh = _chunk2R3UW57Ucjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkJLGNZMUVcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunk6GFRKLLScjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.restyleRange = _chunk2R3UW57Ucjs.restyleRange; exports.retouchFilter = _chunkYT3JL7YMcjs.retouchFilter; exports.reversePaintGradient = _chunk6GFRKLLScjs.reversePaintGradient; exports.rgbToGray = _chunkJLGNZMUVcjs.rgbToGray; exports.rgbToHsl = _chunkJLGNZMUVcjs.rgbToHsl; exports.rgbToReflectance = _chunkJ5BA3BQ6cjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunkYT3JL7YMcjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkJLGNZMUVcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkJLGNZMUVcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sampleLut = _chunkJLGNZMUVcjs.sampleLut; exports.sampleToneLut = _chunkJLGNZMUVcjs.sampleToneLut; exports.saturationOf = _chunkYT3JL7YMcjs.saturationOf; exports.scaleLayerEffect = _chunk24ATT2PEcjs.scaleLayerEffect; exports.scalePaintGradient = _chunk6GFRKLLScjs.scalePaintGradient; exports.seamlessClone = _chunkYT3JL7YMcjs.seamlessClone; exports.selectionArea = _chunkJLGNZMUVcjs.selectionArea; exports.selectionFromCoverage = _chunkJLGNZMUVcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkJLGNZMUVcjs.selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = _chunkJLGNZMUVcjs.selectionToCoverage; exports.selectionToPixels = _chunkJLGNZMUVcjs.selectionToPixels; exports.selectionValueAt = _chunkJLGNZMUVcjs.selectionValueAt; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkJLGNZMUVcjs.serializeContents; exports.serializeEffects = _chunkJLGNZMUVcjs.serializeEffects; exports.serializeLayer = _chunkJLGNZMUVcjs.serializeLayer; exports.serializeLayers = _chunkJLGNZMUVcjs.serializeLayers; exports.serializeLayersExternal = _chunkJLGNZMUVcjs.serializeLayersExternal; exports.serializePatterns = _chunkJLGNZMUVcjs.serializePatterns; exports.serializeSelection = _chunkJLGNZMUVcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkJLGNZMUVcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkJLGNZMUVcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkJLGNZMUVcjs.setLayerMask; exports.setLayerProperties = _chunkJLGNZMUVcjs.setLayerProperties; exports.setLum = _chunkJ5BA3BQ6cjs.setLum; exports.setPigmentColor = _chunkJ5BA3BQ6cjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkJLGNZMUVcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkJLGNZMUVcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkJLGNZMUVcjs.setSmartPlacement; exports.shadeTile = _chunkFHPVDTI2cjs.shadeTile; exports.shapeAsPixelLayer = _chunkJLGNZMUVcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkJLGNZMUVcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkJLGNZMUVcjs.shapeGeometryBounds; exports.shapeLayers = _chunkJLGNZMUVcjs.shapeLayers; exports.shapeOutline = _chunkJLGNZMUVcjs.shapeOutline; exports.shapeRenderClip = _chunkJLGNZMUVcjs.shapeRenderClip; exports.shiftCoverage = _chunkJLGNZMUVcjs.shiftCoverage; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkJLGNZMUVcjs.smartObjectLayers; exports.smoothCoverage = _chunkJLGNZMUVcjs.smoothCoverage; exports.smoothPoints = _chunk6GFRKLLScjs.smoothPoints; exports.smudgeEffect = _chunkYT3JL7YMcjs.smudgeEffect; exports.solidPaint = _chunk6GFRKLLScjs.solidPaint; exports.solidSurface = _chunkJ5BA3BQ6cjs.solidSurface; exports.solveMembrane = _chunkYT3JL7YMcjs.solveMembrane; exports.spliceRuns = _chunk2R3UW57Ucjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunkYT3JL7YMcjs.sponge; exports.spongeEffect = _chunkYT3JL7YMcjs.spongeEffect; exports.spotHealPixels = _chunkYT3JL7YMcjs.spotHealPixels; exports.spotHealWindow = _chunkYT3JL7YMcjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkFHPVDTI2cjs.srgbByteToLinear; exports.srgbDecode = _chunkJ5BA3BQ6cjs.srgbDecode; exports.srgbEncode = _chunkJ5BA3BQ6cjs.srgbEncode; exports.srgbToLinear = _chunkJLGNZMUVcjs.srgbToLinear; exports.standardBlendMode = _chunkJ5BA3BQ6cjs.standardBlendMode; exports.stepSlotTs = _chunkFHPVDTI2cjs.stepSlotTs; exports.styleAt = _chunk2R3UW57Ucjs.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 = _chunkJLGNZMUVcjs.tempTintToXy; exports.temperatureToKelvin = _chunkJLGNZMUVcjs.temperatureToKelvin; exports.textIndexAt = _chunk2R3UW57Ucjs.textIndexAt; exports.textMatrix = _chunkJLGNZMUVcjs.textMatrix; exports.textOutlines = _chunkJLGNZMUVcjs.textOutlines; exports.textRange = _chunkJLGNZMUVcjs.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 = _chunkJLGNZMUVcjs.toTextSpace; exports.toneCurve = _chunkJLGNZMUVcjs.toneCurve; exports.toneLuts = _chunkJLGNZMUVcjs.toneLuts; exports.toneOf = _chunkYT3JL7YMcjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkJLGNZMUVcjs.transformHomography; exports.transformMap = _chunkJLGNZMUVcjs.transformMap; exports.transformShapeComponents = _chunkJLGNZMUVcjs.transformShapeComponents; exports.transformSurface = _chunk24ATT2PEcjs.transformSurface; exports.transformTypeLayer = _chunkJLGNZMUVcjs.transformTypeLayer; exports.transformedBounds = _chunk24ATT2PEcjs.transformedBounds; exports.transformedBox = _chunkJLGNZMUVcjs.transformedBox; exports.transformedPoint = _chunkJLGNZMUVcjs.transformedPoint; exports.translateSurface = _chunkJ5BA3BQ6cjs.translateSurface; exports.typeAsPixelLayer = _chunkJLGNZMUVcjs.typeAsPixelLayer; exports.typeFrame = _chunkJLGNZMUVcjs.typeFrame; exports.typeFromAnnotation = _chunkJLGNZMUVcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkJLGNZMUVcjs.typeLayerName; exports.ungroupLayer = _chunkJLGNZMUVcjs.ungroupLayer; exports.uniformTile = _chunkJ5BA3BQ6cjs.uniformTile; exports.unionRect = _chunkJLGNZMUVcjs.unionRect; exports.unprojectCanvasPoint = _chunkJLGNZMUVcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkJLGNZMUVcjs.updateLayerEffect; exports.updateLayerFilter = _chunkJLGNZMUVcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkJLGNZMUVcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunk6GFRKLLScjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkJLGNZMUVcjs.updateShapeLayer; exports.updateSmartFilter = _chunkJLGNZMUVcjs.updateSmartFilter; exports.updateTypeLayer = _chunkJLGNZMUVcjs.updateTypeLayer; exports.uvToXy = _chunkJLGNZMUVcjs.uvToXy; exports.validateEffectGradient = _chunk24ATT2PEcjs.validateEffectGradient; exports.validateLayerEffect = _chunk24ATT2PEcjs.validateLayerEffect; exports.validateLayerEffects = _chunk24ATT2PEcjs.validateLayerEffects; exports.versionedDescriptorBytes = _chunkJLGNZMUVcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkJLGNZMUVcjs.vibranceLinear; exports.vibrancePixel = _chunkJLGNZMUVcjs.vibrancePixel; exports.walkDabs = _chunk6GFRKLLScjs.walkDabs; exports.warpMeshEditPoints = _chunk2R3UW57Ucjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunk2R3UW57Ucjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunk2R3UW57Ucjs.warpMeshParamAt; exports.warpPresetMesh = _chunk2R3UW57Ucjs.warpPresetMesh; exports.warpSurface = _chunk24ATT2PEcjs.warpSurface; exports.wbMatrix = _chunkJLGNZMUVcjs.wbMatrix; exports.wetGpuSupport = _chunkFHPVDTI2cjs.wetGpuSupport; exports.wetSimdSupported = _chunkFHPVDTI2cjs.wetSimdSupported; exports.wetSupport = _chunkFHPVDTI2cjs.wetSupport; exports.whiteBalanceFromSample = _chunkJLGNZMUVcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkJLGNZMUVcjs.whiteBalanceMatrix; exports.withFilterMaskSurface = _chunkJLGNZMUVcjs.withFilterMaskSurface; exports.withNewIds = _chunkJLGNZMUVcjs.withNewIds; exports.writeAdjustmentBlock = _chunkJLGNZMUVcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkJ5BA3BQ6cjs.writeDeepRegion; exports.writeLfx2 = _chunkJLGNZMUVcjs.writeLfx2; exports.writePatternBlock = _chunkJLGNZMUVcjs.writePatternBlock; exports.writePsd = _chunkJLGNZMUVcjs.writePsd; exports.writeRegion = _chunkJ5BA3BQ6cjs.writeRegion; exports.xyToTempTint = _chunkJLGNZMUVcjs.xyToTempTint; exports.xyToUv = _chunkJLGNZMUVcjs.xyToUv;
16010
16013
  //# sourceMappingURL=index.cjs.map