@pixerate/editor 0.162.0 → 0.163.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.
- package/README.md +1 -1
- package/dist/agent/index.cjs +34 -34
- package/dist/agent/index.js +5 -5
- package/dist/animation-editor/index.cjs +57 -57
- package/dist/animation-editor/index.js +3 -3
- package/dist/{brushstrokeRender-Q4LI22QV.js → brushstrokeRender-7LXCU7PD.js} +2 -2
- package/dist/{brushstrokeRender-5WANQIG4.cjs → brushstrokeRender-VO4ZTWVA.cjs} +5 -5
- package/dist/canvas/index.cjs +14 -14
- package/dist/canvas/index.js +3 -3
- package/dist/chart/commands.d.cts +2 -1
- package/dist/chart/commands.d.ts +2 -1
- package/dist/chart/controller.d.cts +109 -1
- package/dist/chart/controller.d.ts +109 -1
- package/dist/chart/index.cjs +605 -130
- package/dist/chart/index.d.cts +1 -0
- package/dist/chart/index.d.ts +1 -0
- package/dist/chart/index.js +490 -15
- package/dist/chart/layout-annotations.d.cts +29 -0
- package/dist/chart/layout-annotations.d.ts +29 -0
- package/dist/chart/layout-families.d.cts +23 -0
- package/dist/chart/layout-families.d.ts +23 -0
- package/dist/chart/mermaid.d.cts +2 -1
- package/dist/chart/mermaid.d.ts +2 -1
- package/dist/chart/schemas.d.cts +13 -0
- package/dist/chart/schemas.d.ts +13 -0
- package/dist/chart/spec.d.cts +30 -5
- package/dist/chart/spec.d.ts +30 -5
- package/dist/chart/stats.d.cts +9 -1
- package/dist/chart/stats.d.ts +9 -1
- package/dist/chart/tools.d.cts +1 -1
- package/dist/chart/tools.d.ts +1 -1
- package/dist/chart/tree.d.cts +62 -0
- package/dist/chart/tree.d.ts +62 -0
- package/dist/chart/types.d.cts +77 -3
- package/dist/chart/types.d.ts +77 -3
- package/dist/{chunk-7YBDRJXT.cjs → chunk-22KLZZGH.cjs} +8 -8
- package/dist/{chunk-LQLZHP6F.js → chunk-36OKQDCF.js} +7 -4
- package/dist/{chunk-HLOKB7WW.js → chunk-3NEZJCBY.js} +366 -6
- package/dist/{chunk-GWV4T5NZ.js → chunk-3VLOOO3G.js} +1 -1
- package/dist/{chunk-3GJH2MGH.cjs → chunk-5AARIS3R.cjs} +35 -35
- package/dist/{chunk-EVPZ5IKN.js → chunk-5FNGLV2D.js} +65 -3
- package/dist/{chunk-EQ46F75O.cjs → chunk-D54JHQK2.cjs} +51 -51
- package/dist/{chunk-NO5QQDHZ.js → chunk-DAPQGA55.js} +2 -2
- package/dist/{chunk-3IHNXRUV.cjs → chunk-GKNEJ6EN.cjs} +399 -67
- package/dist/{chunk-236TKNUR.cjs → chunk-JCXMJUQO.cjs} +2 -2
- package/dist/{chunk-4NGVHHJB.cjs → chunk-NZD2MZJC.cjs} +80 -18
- package/dist/{chunk-CX6JLDFC.js → chunk-OXERWBKE.js} +3 -3
- package/dist/{chunk-32MMQYCQ.cjs → chunk-PA3IMPPS.cjs} +81 -81
- package/dist/{chunk-7CKPUUN4.js → chunk-POR54B55.js} +61 -10
- package/dist/{chunk-KGTF55R3.js → chunk-QY4KUDMY.js} +1 -1
- package/dist/{chunk-LL3H5XUH.cjs → chunk-R3P2M7HU.cjs} +367 -7
- package/dist/{chunk-HDGBM7EA.cjs → chunk-SBQVEBSU.cjs} +580 -53
- package/dist/{chunk-2TKHLX6H.js → chunk-SET6KJOP.js} +1 -1
- package/dist/{chunk-XDCFJEU7.js → chunk-SZA42R4N.js} +346 -14
- package/dist/{chunk-GLMP22FT.js → chunk-TALQONZ5.js} +3 -3
- package/dist/{chunk-GNK7SESQ.cjs → chunk-V7GWZIZK.cjs} +7 -4
- package/dist/{chunk-EYVVIZJ3.cjs → chunk-WTW7QRTS.cjs} +1 -1
- package/dist/{chunk-NA4UVVJ4.cjs → chunk-YGG7WDWT.cjs} +76 -25
- package/dist/{chunk-JGKCC5OF.cjs → chunk-YQ5C5BVK.cjs} +10 -9
- package/dist/{chunk-EY22AY6R.cjs → chunk-YSAGBIRW.cjs} +16 -16
- package/dist/{chunk-A5UCR2TO.js → chunk-YXKLVD56.js} +10 -9
- package/dist/{chunk-DTSTNRPH.js → chunk-Z4P2RBMJ.js} +536 -9
- package/dist/{chunk-45XXVHVG.js → chunk-ZZGPYNS2.js} +1 -1
- package/dist/export/index.cjs +4 -4
- package/dist/export/index.js +3 -3
- package/dist/extensions/index.cjs +7 -7
- package/dist/extensions/index.js +6 -6
- package/dist/image-editor/index.cjs +638 -638
- package/dist/image-editor/index.js +4 -4
- package/dist/index.cjs +13 -13
- package/dist/index.js +7 -7
- package/dist/paint/index.cjs +2 -2
- package/dist/paint/index.js +1 -1
- package/dist/paint-editor/index.cjs +129 -149
- package/dist/paint-editor/index.js +5 -25
- package/dist/vector/index.cjs +948 -948
- package/dist/vector/index.js +3 -3
- package/package.json +3 -3
- package/skills/pixerate-canvas/SKILL.md +16 -0
- package/skills/pixerate-chart/SKILL.md +92 -9
- package/skills/pixerate-paint-editor/SKILL.md +0 -2
|
@@ -369,7 +369,7 @@ var _chunk5UEFNX24cjs = require('../chunk-5UEFNX24.cjs');
|
|
|
369
369
|
|
|
370
370
|
|
|
371
371
|
|
|
372
|
-
var
|
|
372
|
+
var _chunkPA3IMPPScjs = require('../chunk-PA3IMPPS.cjs');
|
|
373
373
|
|
|
374
374
|
|
|
375
375
|
var _chunkA2IS7EHEcjs = require('../chunk-A2IS7EHE.cjs');
|
|
@@ -569,7 +569,7 @@ var _chunk7NW46N7Icjs = require('../chunk-7NW46N7I.cjs');
|
|
|
569
569
|
|
|
570
570
|
|
|
571
571
|
|
|
572
|
-
var
|
|
572
|
+
var _chunkV7GWZIZKcjs = require('../chunk-V7GWZIZK.cjs');
|
|
573
573
|
|
|
574
574
|
|
|
575
575
|
|
|
@@ -624,8 +624,8 @@ var _chunkBROJYMWUcjs = require('../chunk-BROJYMWU.cjs');
|
|
|
624
624
|
|
|
625
625
|
|
|
626
626
|
|
|
627
|
-
var
|
|
628
|
-
require('../chunk-
|
|
627
|
+
var _chunkJCXMJUQOcjs = require('../chunk-JCXMJUQO.cjs');
|
|
628
|
+
require('../chunk-YQ5C5BVK.cjs');
|
|
629
629
|
require('../chunk-CVFAAZXE.cjs');
|
|
630
630
|
require('../chunk-GF2RBSDM.cjs');
|
|
631
631
|
require('../chunk-NM3G4VQT.cjs');
|
|
@@ -949,7 +949,7 @@ function quickMaskPixels(mask, style = {}) {
|
|
|
949
949
|
|
|
950
950
|
// src/image-editor/layers/render.ts
|
|
951
951
|
function isQuarterTurn(rotate) {
|
|
952
|
-
return
|
|
952
|
+
return _chunkPA3IMPPScjs.normalizeAngle.call(void 0, rotate) % 90 === 0;
|
|
953
953
|
}
|
|
954
954
|
function isIntegerRect(r) {
|
|
955
955
|
return Number.isInteger(r.x) && Number.isInteger(r.y) && Number.isInteger(r.width) && Number.isInteger(r.height);
|
|
@@ -957,7 +957,7 @@ function isIntegerRect(r) {
|
|
|
957
957
|
function baseProjection(region, transform, baseW, baseH) {
|
|
958
958
|
return {
|
|
959
959
|
region,
|
|
960
|
-
angle:
|
|
960
|
+
angle: _chunkPA3IMPPScjs.normalizeAngle.call(void 0, transform.rotate),
|
|
961
961
|
flipH: transform.flipH,
|
|
962
962
|
flipV: transform.flipV,
|
|
963
963
|
scale: 1,
|
|
@@ -966,14 +966,14 @@ function baseProjection(region, transform, baseW, baseH) {
|
|
|
966
966
|
};
|
|
967
967
|
}
|
|
968
968
|
function projectQuarterTurn(src, srcRect, region, transform) {
|
|
969
|
-
const rotated =
|
|
969
|
+
const rotated = _chunkPA3IMPPScjs.getRotatedSize.call(void 0, region.width, region.height, transform);
|
|
970
970
|
const w = Math.max(1, Math.round(rotated.width));
|
|
971
971
|
const h = Math.max(1, Math.round(rotated.height));
|
|
972
972
|
const out = new Uint8ClampedArray(w * h * 4);
|
|
973
973
|
const p = baseProjection(region, transform, w, h);
|
|
974
|
-
const o =
|
|
975
|
-
const ox =
|
|
976
|
-
const oy =
|
|
974
|
+
const o = _chunkPA3IMPPScjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 0.5 }, p);
|
|
975
|
+
const ox = _chunkPA3IMPPScjs.unprojectCanvasPoint.call(void 0, { x: 1.5, y: 0.5 }, p);
|
|
976
|
+
const oy = _chunkPA3IMPPScjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 1.5 }, p);
|
|
977
977
|
const ux = Math.round(ox.x - o.x);
|
|
978
978
|
const vx = Math.round(ox.y - o.y);
|
|
979
979
|
const uy = Math.round(oy.x - o.x);
|
|
@@ -1002,23 +1002,23 @@ function applyOutputStage(img, opacity, legacyOutputBlur) {
|
|
|
1002
1002
|
const d = img.data;
|
|
1003
1003
|
for (let i = 3; i < d.length; i += 4) d[i] = d[i] * opacity;
|
|
1004
1004
|
}
|
|
1005
|
-
if (legacyOutputBlur && legacyOutputBlur > 0)
|
|
1005
|
+
if (legacyOutputBlur && legacyOutputBlur > 0) _chunkPA3IMPPScjs.applyBoxBlur.call(void 0, img, Math.min(Math.round(legacyOutputBlur), 40));
|
|
1006
1006
|
}
|
|
1007
1007
|
function needsLegacyBase(input) {
|
|
1008
1008
|
const { stack, region, canvas, transform } = input;
|
|
1009
|
-
if (!
|
|
1009
|
+
if (!_chunkPA3IMPPScjs.isLegacyShape.call(void 0, stack)) return false;
|
|
1010
1010
|
const bg = stack.layers[0];
|
|
1011
1011
|
if (!isQuarterTurn(transform.rotate) || !isIntegerRect(region)) return true;
|
|
1012
1012
|
if (_optionalChain([bg, 'access', _2 => _2.mask, 'optionalAccess', _3 => _3.source, 'optionalAccess', _4 => _4.enabled]) && bg.mask.source.maskSource) return true;
|
|
1013
1013
|
if (stack.outputOpacity < 1) return true;
|
|
1014
|
-
const blur =
|
|
1014
|
+
const blur = _chunkPA3IMPPScjs.blurFilter.call(void 0, bg);
|
|
1015
1015
|
if (blur && blur.enabled && blur.radius > 0) {
|
|
1016
1016
|
const full = region.x === 0 && region.y === 0 && region.width === canvas.width && region.height === canvas.height;
|
|
1017
|
-
const angle =
|
|
1017
|
+
const angle = _chunkPA3IMPPScjs.normalizeAngle.call(void 0, transform.rotate);
|
|
1018
1018
|
if (!full || angle === 90 || angle === 270) return true;
|
|
1019
1019
|
}
|
|
1020
1020
|
if ((_nullishCoalesce(stack.legacyOutputBlur, () => ( 0))) > 0 && !input.sourceOpaque) return true;
|
|
1021
|
-
if (
|
|
1021
|
+
if (_chunkPA3IMPPScjs.hasResampledLegacyMask.call(void 0, stack.layers, canvas.width, canvas.height)) return true;
|
|
1022
1022
|
return false;
|
|
1023
1023
|
}
|
|
1024
1024
|
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;
|
|
@@ -1050,7 +1050,7 @@ function coveringRect(region) {
|
|
|
1050
1050
|
const y = Math.floor(region.y);
|
|
1051
1051
|
return { x, y, width: Math.ceil(region.x + region.width) - x, height: Math.ceil(region.y + region.height) - y };
|
|
1052
1052
|
}
|
|
1053
|
-
function renderLayeredBase(stack, region, transform, sources, compositor = new (0,
|
|
1053
|
+
function renderLayeredBase(stack, region, transform, sources, compositor = new (0, _chunkPA3IMPPScjs.LayerCompositor)()) {
|
|
1054
1054
|
if (!isQuarterTurn(transform.rotate) || !isIntegerRect(region)) {
|
|
1055
1055
|
throw new Error("renderLayeredBase needs an integer region and a quarter-turn rotation.");
|
|
1056
1056
|
}
|
|
@@ -1184,8 +1184,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1184
1184
|
* The viewport's compositor. It only ever composites the viewport's stack, so its tile cache can
|
|
1185
1185
|
* trust dirty rectangles; exports use `exportCompositor`.
|
|
1186
1186
|
*/
|
|
1187
|
-
__init8() {this.compositor = new (0,
|
|
1188
|
-
__init9() {this.exportCompositor = new (0,
|
|
1187
|
+
__init8() {this.compositor = new (0, _chunkPA3IMPPScjs.LayerCompositor)()}
|
|
1188
|
+
__init9() {this.exportCompositor = new (0, _chunkPA3IMPPScjs.LayerCompositor)({ maxCacheBytes: 64 * 1024 * 1024 })}
|
|
1189
1189
|
/** How the host resolves layer pixels (set by the controller). */
|
|
1190
1190
|
|
|
1191
1191
|
/**
|
|
@@ -1264,9 +1264,9 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1264
1264
|
return;
|
|
1265
1265
|
}
|
|
1266
1266
|
const isActivelyCropping = Boolean(options.showCropOverlay || state.activeTool === "crop");
|
|
1267
|
-
const projection =
|
|
1267
|
+
const projection = _chunkPA3IMPPScjs.getViewportProjection.call(void 0, geoState, vpWidth, vpHeight, isActivelyCropping);
|
|
1268
1268
|
const { region } = projection;
|
|
1269
|
-
const rotated =
|
|
1269
|
+
const rotated = _chunkPA3IMPPScjs.getRotatedSize.call(void 0, region.width, region.height, transform);
|
|
1270
1270
|
const route = this.chooseRoute(state, region, naturalWidth, naturalHeight);
|
|
1271
1271
|
let overlay = annotations;
|
|
1272
1272
|
if (route === "legacy") {
|
|
@@ -1276,8 +1276,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1276
1276
|
`${naturalWidth}x${naturalHeight}`,
|
|
1277
1277
|
`${region.x},${region.y},${region.width},${region.height}`,
|
|
1278
1278
|
`${projection.angle},${transform.flipH},${transform.flipV}`,
|
|
1279
|
-
`${adjustments.brightness},${adjustments.contrast},${adjustments.saturation},${adjustments.exposure},${adjustments.temperature},${_nullishCoalesce(adjustments.tint, () => ( 0))},${adjustments.blur},${adjustments.opacity},p${
|
|
1280
|
-
|
|
1279
|
+
`${adjustments.brightness},${adjustments.contrast},${adjustments.saturation},${adjustments.exposure},${adjustments.temperature},${_nullishCoalesce(adjustments.tint, () => ( 0))},${adjustments.blur},${adjustments.opacity},p${_chunkPA3IMPPScjs.normalizeProcessVersion.call(void 0, adjustments.process)}`,
|
|
1280
|
+
_chunkPA3IMPPScjs.adjustmentLayersKey.call(void 0, adjustments.layers),
|
|
1281
1281
|
`${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}`,
|
|
1282
1282
|
`d${this.displayKey}`
|
|
1283
1283
|
].join("|");
|
|
@@ -1311,7 +1311,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1311
1311
|
}
|
|
1312
1312
|
if (overlay.length > 0 || options.draftAnnotation) {
|
|
1313
1313
|
ctx.save();
|
|
1314
|
-
|
|
1314
|
+
_chunkPA3IMPPScjs.applyImageProjectionToContext.call(void 0, ctx, projection);
|
|
1315
1315
|
ctx.beginPath();
|
|
1316
1316
|
ctx.rect(region.x, region.y, region.width, region.height);
|
|
1317
1317
|
ctx.clip();
|
|
@@ -1334,7 +1334,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1334
1334
|
if (_optionalChain([state, 'access', _15 => _15.selection, 'optionalAccess', _16 => _16.bounds]) && display !== "none" || _optionalChain([options, 'access', _17 => _17.draftSelectionPath, 'optionalAccess', _18 => _18.length])) {
|
|
1335
1335
|
ctx.save();
|
|
1336
1336
|
try {
|
|
1337
|
-
|
|
1337
|
+
_chunkPA3IMPPScjs.applyImageProjectionToContext.call(void 0, ctx, projection);
|
|
1338
1338
|
ctx.beginPath();
|
|
1339
1339
|
ctx.rect(region.x, region.y, region.width, region.height);
|
|
1340
1340
|
ctx.clip();
|
|
@@ -1349,7 +1349,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1349
1349
|
const b = options.brushCursor;
|
|
1350
1350
|
ctx.save();
|
|
1351
1351
|
try {
|
|
1352
|
-
|
|
1352
|
+
_chunkPA3IMPPScjs.applyImageProjectionToContext.call(void 0, ctx, projection);
|
|
1353
1353
|
const px2 = 1 / (projection.scale || 1);
|
|
1354
1354
|
ctx.beginPath();
|
|
1355
1355
|
ctx.arc(b.x, b.y, Math.max(px2, b.diameter / 2), 0, Math.PI * 2);
|
|
@@ -1364,7 +1364,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1364
1364
|
ctx.restore();
|
|
1365
1365
|
}
|
|
1366
1366
|
if (options.cloneSourceMarker) {
|
|
1367
|
-
const m =
|
|
1367
|
+
const m = _chunkPA3IMPPScjs.projectImagePoint.call(void 0, options.cloneSourceMarker, projection);
|
|
1368
1368
|
ctx.save();
|
|
1369
1369
|
try {
|
|
1370
1370
|
const r = 7;
|
|
@@ -1388,7 +1388,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1388
1388
|
const t = options.textEdit;
|
|
1389
1389
|
ctx.save();
|
|
1390
1390
|
try {
|
|
1391
|
-
const scr = (p) =>
|
|
1391
|
+
const scr = (p) => _chunkPA3IMPPScjs.projectImagePoint.call(void 0, p, projection);
|
|
1392
1392
|
const poly = (pts) => {
|
|
1393
1393
|
ctx.beginPath();
|
|
1394
1394
|
pts.map(scr).forEach((p, i) => i ? ctx.lineTo(p.x, p.y) : ctx.moveTo(p.x, p.y));
|
|
@@ -1427,7 +1427,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1427
1427
|
const t = options.freeTransform;
|
|
1428
1428
|
ctx.save();
|
|
1429
1429
|
try {
|
|
1430
|
-
const scr = (p) =>
|
|
1430
|
+
const scr = (p) => _chunkPA3IMPPScjs.projectImagePoint.call(void 0, p, projection);
|
|
1431
1431
|
ctx.beginPath();
|
|
1432
1432
|
if (t.warp) {
|
|
1433
1433
|
for (const c of t.warp.curves) {
|
|
@@ -1485,7 +1485,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1485
1485
|
}
|
|
1486
1486
|
if (isActivelyCropping) {
|
|
1487
1487
|
const activeCrop = options.draftCrop !== void 0 && options.draftCrop !== null ? options.draftCrop : _nullishCoalesce(crop, () => ( { x: 0, y: 0, width: naturalWidth, height: naturalHeight }));
|
|
1488
|
-
this.drawCropOverlay(ctx,
|
|
1488
|
+
this.drawCropOverlay(ctx, _chunkPA3IMPPScjs.getViewportMetrics.call(void 0, geoState, vpWidth, vpHeight, true, activeCrop));
|
|
1489
1489
|
}
|
|
1490
1490
|
}
|
|
1491
1491
|
/**
|
|
@@ -1494,7 +1494,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1494
1494
|
*/
|
|
1495
1495
|
async renderBaseImage(img, naturalWidth, naturalHeight, region, transform, state, onPixels) {
|
|
1496
1496
|
const { adjustments, depthMask } = state;
|
|
1497
|
-
const rotated =
|
|
1497
|
+
const rotated = _chunkPA3IMPPScjs.getRotatedSize.call(void 0, region.width, region.height, transform);
|
|
1498
1498
|
const baseW = Math.max(1, Math.round(rotated.width));
|
|
1499
1499
|
const baseH = Math.max(1, Math.round(rotated.height));
|
|
1500
1500
|
const baseCanvas = this.createCanvas(baseW, baseH);
|
|
@@ -1502,7 +1502,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1502
1502
|
if (!baseCtx) return baseCanvas;
|
|
1503
1503
|
const projection = getBaseProjection(region, transform, baseW, baseH);
|
|
1504
1504
|
baseCtx.save();
|
|
1505
|
-
|
|
1505
|
+
_chunkPA3IMPPScjs.applyImageProjectionToContext.call(void 0, baseCtx, projection);
|
|
1506
1506
|
baseCtx.drawImage(
|
|
1507
1507
|
img,
|
|
1508
1508
|
region.x,
|
|
@@ -1517,8 +1517,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1517
1517
|
baseCtx.restore();
|
|
1518
1518
|
const imageData = baseCtx.getImageData(0, 0, baseW, baseH);
|
|
1519
1519
|
if (imageData) {
|
|
1520
|
-
const layerMasks =
|
|
1521
|
-
|
|
1520
|
+
const layerMasks = _chunkPA3IMPPScjs.buildLayerMaskPlanes.call(void 0, adjustments.layers, naturalWidth, naturalHeight, projection, baseW, baseH);
|
|
1521
|
+
_chunkPA3IMPPScjs.applyAdjustments.call(void 0, imageData, adjustments, layerMasks ? { layerMasks } : {});
|
|
1522
1522
|
if (depthMask.enabled && depthMask.maskSource) {
|
|
1523
1523
|
try {
|
|
1524
1524
|
const maskImg = await this.imageCache.get(depthMask.maskSource);
|
|
@@ -1529,7 +1529,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1529
1529
|
const maskCtx = maskCanvas.getContext("2d");
|
|
1530
1530
|
if (maskCtx) {
|
|
1531
1531
|
maskCtx.save();
|
|
1532
|
-
|
|
1532
|
+
_chunkPA3IMPPScjs.applyImageProjectionToContext.call(void 0, maskCtx, projection);
|
|
1533
1533
|
maskCtx.drawImage(
|
|
1534
1534
|
maskImg,
|
|
1535
1535
|
region.x * sx,
|
|
@@ -1544,7 +1544,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1544
1544
|
maskCtx.restore();
|
|
1545
1545
|
const maskData = maskCtx.getImageData(0, 0, baseW, baseH);
|
|
1546
1546
|
if (maskData) {
|
|
1547
|
-
|
|
1547
|
+
_chunkPA3IMPPScjs.applyDepthMask.call(void 0, imageData, maskData, depthMask);
|
|
1548
1548
|
}
|
|
1549
1549
|
}
|
|
1550
1550
|
} catch (e8) {
|
|
@@ -1563,7 +1563,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1563
1563
|
else if (this.baseRoute === "layers") route = "layers";
|
|
1564
1564
|
else {
|
|
1565
1565
|
const stack = { layers: state.layers, outputOpacity: _nullishCoalesce(state.outputOpacity, () => ( 1)), legacyOutputBlur: state.legacyOutputBlur };
|
|
1566
|
-
const shaped = this.baseRoute === "legacy" &&
|
|
1566
|
+
const shaped = this.baseRoute === "legacy" && _chunkPA3IMPPScjs.isLegacyShape.call(void 0, stack);
|
|
1567
1567
|
route = shaped || needsLegacyBase({
|
|
1568
1568
|
stack,
|
|
1569
1569
|
region,
|
|
@@ -1698,17 +1698,17 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1698
1698
|
if (!comp) return null;
|
|
1699
1699
|
const opacity = _nullishCoalesce(state.outputOpacity, () => ( 1));
|
|
1700
1700
|
const blur = _nullishCoalesce(state.legacyOutputBlur, () => ( 0));
|
|
1701
|
-
const rotated =
|
|
1701
|
+
const rotated = _chunkPA3IMPPScjs.getRotatedSize.call(void 0, region.width, region.height, transform);
|
|
1702
1702
|
const baseW = Math.max(1, Math.round(rotated.width));
|
|
1703
1703
|
const baseH = Math.max(1, Math.round(rotated.height));
|
|
1704
|
-
const key = `${this.displayKey}:${comp.version}|${region.x},${region.y},${region.width},${region.height}|${
|
|
1704
|
+
const key = `${this.displayKey}:${comp.version}|${region.x},${region.y},${region.width},${region.height}|${_chunkPA3IMPPScjs.normalizeAngle.call(void 0, transform.rotate)},${transform.flipH},${transform.flipV}|${opacity}|${blur}`;
|
|
1705
1705
|
if (this.cachedPostCanvas && this.cachedPostKey === key) return { canvas: this.cachedPostCanvas, histogram: this.cachedPostHistogram };
|
|
1706
1706
|
const canvas = this.cachedPostCanvas && this.cachedPostCanvas.width === baseW && this.cachedPostCanvas.height === baseH ? this.cachedPostCanvas : this.createCanvas(baseW, baseH);
|
|
1707
1707
|
const ctx = canvas.getContext("2d");
|
|
1708
1708
|
if (!ctx) return null;
|
|
1709
1709
|
ctx.clearRect(0, 0, baseW, baseH);
|
|
1710
1710
|
ctx.save();
|
|
1711
|
-
|
|
1711
|
+
_chunkPA3IMPPScjs.applyImageProjectionToContext.call(void 0, ctx, baseProjection(region, transform, baseW, baseH));
|
|
1712
1712
|
ctx.beginPath();
|
|
1713
1713
|
ctx.rect(region.x, region.y, region.width, region.height);
|
|
1714
1714
|
ctx.clip();
|
|
@@ -1980,7 +1980,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
1980
1980
|
ctx.strokeStyle = "#3b82f6";
|
|
1981
1981
|
ctx.lineWidth = 1.5;
|
|
1982
1982
|
ctx.setLineDash([4, 4]);
|
|
1983
|
-
const bounds =
|
|
1983
|
+
const bounds = _chunkPA3IMPPScjs.getAnnotationBounds.call(void 0, ann);
|
|
1984
1984
|
const pad = 4;
|
|
1985
1985
|
ctx.strokeRect(bounds.x - pad, bounds.y - pad, bounds.width + pad * 2, bounds.height + pad * 2);
|
|
1986
1986
|
ctx.fillStyle = "#ffffff";
|
|
@@ -2001,7 +2001,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2001
2001
|
}
|
|
2002
2002
|
/** @deprecated Use the standalone `getAnnotationBounds` from the geometry module. */
|
|
2003
2003
|
getAnnotationBounds(ann) {
|
|
2004
|
-
return
|
|
2004
|
+
return _chunkPA3IMPPScjs.getAnnotationBounds.call(void 0, ann);
|
|
2005
2005
|
}
|
|
2006
2006
|
/**
|
|
2007
2007
|
* Draws a rule-of-thirds crop grid overlay. All rectangles come from
|
|
@@ -2083,8 +2083,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2083
2083
|
}
|
|
2084
2084
|
const { width: naturalWidth, height: naturalHeight } = getSourceSize(img);
|
|
2085
2085
|
const { crop, transform, annotations } = state;
|
|
2086
|
-
const region = crop ?
|
|
2087
|
-
const rotated =
|
|
2086
|
+
const region = crop ? _chunkPA3IMPPScjs.clampCropToImage.call(void 0, crop, naturalWidth, naturalHeight) : { x: 0, y: 0, width: naturalWidth, height: naturalHeight };
|
|
2087
|
+
const rotated = _chunkPA3IMPPScjs.getRotatedSize.call(void 0, region.width, region.height, transform);
|
|
2088
2088
|
const baseW = Math.max(1, Math.round(rotated.width));
|
|
2089
2089
|
const baseH = Math.max(1, Math.round(rotated.height));
|
|
2090
2090
|
const exportW = options.width || baseW;
|
|
@@ -2113,7 +2113,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2113
2113
|
const bctx = baseCanvas.getContext("2d");
|
|
2114
2114
|
if (bctx) {
|
|
2115
2115
|
bctx.save();
|
|
2116
|
-
|
|
2116
|
+
_chunkPA3IMPPScjs.applyImageProjectionToContext.call(void 0, bctx, baseProjection(region, transform, baseW, baseH));
|
|
2117
2117
|
bctx.beginPath();
|
|
2118
2118
|
bctx.rect(region.x, region.y, region.width, region.height);
|
|
2119
2119
|
bctx.clip();
|
|
@@ -2126,7 +2126,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2126
2126
|
if (options.includeAnnotations !== false && overlay.length > 0) {
|
|
2127
2127
|
ctx.save();
|
|
2128
2128
|
ctx.scale(exportW / baseW, exportH / baseH);
|
|
2129
|
-
|
|
2129
|
+
_chunkPA3IMPPScjs.applyImageProjectionToContext.call(void 0, ctx, getBaseProjection(region, transform, baseW, baseH));
|
|
2130
2130
|
for (const ann of overlay) {
|
|
2131
2131
|
await this.drawAnnotation(ctx, ann);
|
|
2132
2132
|
}
|
|
@@ -2216,7 +2216,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
2216
2216
|
case "rect":
|
|
2217
2217
|
case "image":
|
|
2218
2218
|
case "text": {
|
|
2219
|
-
const b =
|
|
2219
|
+
const b = _chunkPA3IMPPScjs.getAnnotationBounds.call(void 0, ann);
|
|
2220
2220
|
ctx.fillRect(b.x, b.y, b.width, b.height);
|
|
2221
2221
|
break;
|
|
2222
2222
|
}
|
|
@@ -2236,7 +2236,7 @@ function getSourceSize(img, fallbackW = 800, fallbackH = 600) {
|
|
|
2236
2236
|
function getBaseProjection(region, transform, baseW, baseH) {
|
|
2237
2237
|
return {
|
|
2238
2238
|
region,
|
|
2239
|
-
angle:
|
|
2239
|
+
angle: _chunkPA3IMPPScjs.normalizeAngle.call(void 0, transform.rotate),
|
|
2240
2240
|
flipH: transform.flipH,
|
|
2241
2241
|
flipV: transform.flipV,
|
|
2242
2242
|
scale: 1,
|
|
@@ -2513,7 +2513,7 @@ var TextEditSession = (_class5 = class {
|
|
|
2513
2513
|
else {
|
|
2514
2514
|
const layout = this.layout();
|
|
2515
2515
|
if (layout && layout.lines.length) {
|
|
2516
|
-
const c =
|
|
2516
|
+
const c = _chunkJCXMJUQOcjs.caretAt.call(void 0, layout, f);
|
|
2517
2517
|
const line = layout.lines[c.line];
|
|
2518
2518
|
if (to === "home") f = line.start;
|
|
2519
2519
|
else if (to === "end") {
|
|
@@ -2608,7 +2608,7 @@ var TextEditSession = (_class5 = class {
|
|
|
2608
2608
|
styleHere() {
|
|
2609
2609
|
const layer = this.layer;
|
|
2610
2610
|
const at = this.start > 0 && this.start === this.end ? this.start - 1 : this.start;
|
|
2611
|
-
return
|
|
2611
|
+
return _chunkJCXMJUQOcjs.styleAt.call(void 0, layer.runs, at, _chunkJCXMJUQOcjs.DEFAULT_TEXT_STYLE);
|
|
2612
2612
|
}
|
|
2613
2613
|
info() {
|
|
2614
2614
|
return this.controller.getTextLayer(this.layerId);
|
|
@@ -2617,8 +2617,8 @@ var TextEditSession = (_class5 = class {
|
|
|
2617
2617
|
overlay() {
|
|
2618
2618
|
const layer = this.layer;
|
|
2619
2619
|
const layout = this.layout();
|
|
2620
|
-
const m =
|
|
2621
|
-
const at = (x, y) =>
|
|
2620
|
+
const m = _chunkPA3IMPPScjs.textMatrix.call(void 0, layer);
|
|
2621
|
+
const at = (x, y) => _chunkJCXMJUQOcjs.applyMatrix.call(void 0, m, { x, y });
|
|
2622
2622
|
let frame = null;
|
|
2623
2623
|
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)];
|
|
2624
2624
|
else if (layout) {
|
|
@@ -2638,7 +2638,7 @@ var TextEditSession = (_class5 = class {
|
|
|
2638
2638
|
selection.push([at(x0, top), at(x1, top), at(x1, bottom), at(x0, bottom)]);
|
|
2639
2639
|
}
|
|
2640
2640
|
}
|
|
2641
|
-
const c =
|
|
2641
|
+
const c = _chunkJCXMJUQOcjs.caretAt.call(void 0, layout, this.focus);
|
|
2642
2642
|
return { caret: [at(c.x, c.top), at(c.x, c.bottom)], selection, frame };
|
|
2643
2643
|
}
|
|
2644
2644
|
/** Ends editing: an empty layer made for this session is deleted (as Photoshop does). Returns whether the layer remains. */
|
|
@@ -2653,7 +2653,7 @@ var TextEditSession = (_class5 = class {
|
|
|
2653
2653
|
}
|
|
2654
2654
|
if (this.layer.name === "Text" && this.changed) {
|
|
2655
2655
|
try {
|
|
2656
|
-
this.controller.setLayerProperties(this.layerId, { name:
|
|
2656
|
+
this.controller.setLayerProperties(this.layerId, { name: _chunkPA3IMPPScjs.typeLayerName.call(void 0, this.text) }, false);
|
|
2657
2657
|
} catch (e15) {
|
|
2658
2658
|
}
|
|
2659
2659
|
}
|
|
@@ -2664,8 +2664,8 @@ function typeLayerAt(controller, p, slop = 4) {
|
|
|
2664
2664
|
const layers = [...flattenTypeLayers(controller.getLayers())].reverse();
|
|
2665
2665
|
for (const l of layers) {
|
|
2666
2666
|
if (!l.visible) continue;
|
|
2667
|
-
const inv = invert(
|
|
2668
|
-
const q =
|
|
2667
|
+
const inv = invert(_chunkPA3IMPPScjs.textMatrix.call(void 0, l));
|
|
2668
|
+
const q = _chunkJCXMJUQOcjs.applyMatrix.call(void 0, inv, p);
|
|
2669
2669
|
let b = null;
|
|
2670
2670
|
if (l.frame.kind === "box") b = { x: 0, y: 0, width: l.frame.width, height: l.frame.height };
|
|
2671
2671
|
else {
|
|
@@ -2804,8 +2804,8 @@ function polygonCoverage(points, width, height, antiAlias = true) {
|
|
|
2804
2804
|
}
|
|
2805
2805
|
function toMask(width, height, coverage) {
|
|
2806
2806
|
const out = new Uint8Array(coverage.length);
|
|
2807
|
-
for (let i = 0; i < out.length; i++) out[i] =
|
|
2808
|
-
return
|
|
2807
|
+
for (let i = 0; i < out.length; i++) out[i] = _chunkPA3IMPPScjs.coverageToByte.call(void 0, coverage[i]);
|
|
2808
|
+
return _chunkPA3IMPPScjs.createSelectionMask.call(void 0, width, height, out);
|
|
2809
2809
|
}
|
|
2810
2810
|
function polygonSelection(width, height, points, options = {}) {
|
|
2811
2811
|
return toMask(width, height, polygonCoverage(points, width, height, _nullishCoalesce(options.antiAlias, () => ( true))));
|
|
@@ -2932,7 +2932,7 @@ function magicWand(pixels, seed, options = {}) {
|
|
|
2932
2932
|
const { width: w, height: h } = pixels;
|
|
2933
2933
|
const sx = Math.floor(seed.x);
|
|
2934
2934
|
const sy = Math.floor(seed.y);
|
|
2935
|
-
if (!(sx >= 0 && sy >= 0 && sx < w && sy < h)) return
|
|
2935
|
+
if (!(sx >= 0 && sy >= 0 && sx < w && sy < h)) return _chunkPA3IMPPScjs.createSelectionMask.call(void 0, w, h);
|
|
2936
2936
|
const similar = similarity(pixels, sy * w + sx, _nullishCoalesce(options.tolerance, () => ( 32)), _nullishCoalesce(options.distance, () => ( "rgb")));
|
|
2937
2937
|
const marks = new Uint8Array(n);
|
|
2938
2938
|
let bx0 = w;
|
|
@@ -2980,9 +2980,9 @@ function magicWand(pixels, seed, options = {}) {
|
|
|
2980
2980
|
}
|
|
2981
2981
|
}
|
|
2982
2982
|
}
|
|
2983
|
-
if (bx1 < 0) return
|
|
2984
|
-
if (!(_nullishCoalesce(options.antiAlias, () => ( true)))) return
|
|
2985
|
-
return
|
|
2983
|
+
if (bx1 < 0) return _chunkPA3IMPPScjs.createSelectionMask.call(void 0, w, h);
|
|
2984
|
+
if (!(_nullishCoalesce(options.antiAlias, () => ( true)))) return _chunkPA3IMPPScjs.createSelectionMask.call(void 0, w, h, marks);
|
|
2985
|
+
return _chunkPA3IMPPScjs.createSelectionMask.call(void 0,
|
|
2986
2986
|
w,
|
|
2987
2987
|
h,
|
|
2988
2988
|
antialiasMarks(marks, w, h, Math.max(0, bx0 - 1), Math.max(0, by0 - 1), Math.min(w, bx1 + 2), Math.min(h, by1 + 2))
|
|
@@ -3004,7 +3004,7 @@ function colorRange(pixels, samples, options = {}) {
|
|
|
3004
3004
|
const parsed = samples.map((s) => ({ c: sampleColor(s.color), at: s.at }));
|
|
3005
3005
|
const radius = options.localized !== void 0 ? Math.max(1, options.localized) : void 0;
|
|
3006
3006
|
const out = new Uint8Array(n);
|
|
3007
|
-
if (!parsed.length) return
|
|
3007
|
+
if (!parsed.length) return _chunkPA3IMPPScjs.createSelectionMask.call(void 0, w, h, out);
|
|
3008
3008
|
for (let i = 0; i < n; i++) {
|
|
3009
3009
|
const p = i * 4;
|
|
3010
3010
|
if (data[p + 3] <= 0) continue;
|
|
@@ -3020,9 +3020,9 @@ function colorRange(pixels, samples, options = {}) {
|
|
|
3020
3020
|
}
|
|
3021
3021
|
if (k > best) best = k;
|
|
3022
3022
|
}
|
|
3023
|
-
out[i] =
|
|
3023
|
+
out[i] = _chunkPA3IMPPScjs.coverageToByte.call(void 0, best);
|
|
3024
3024
|
}
|
|
3025
|
-
return
|
|
3025
|
+
return _chunkPA3IMPPScjs.createSelectionMask.call(void 0, w, h, out);
|
|
3026
3026
|
}
|
|
3027
3027
|
var TONE_RANGE_PRESETS = {
|
|
3028
3028
|
shadows: [0, 65],
|
|
@@ -3040,9 +3040,9 @@ function toneRange(pixels, range, falloff = 20) {
|
|
|
3040
3040
|
if (d[p + 3] <= 0) continue;
|
|
3041
3041
|
const l = Math.min(255, Math.max(0, 0.299 * d[p] + 0.587 * d[p + 1] + 0.114 * d[p + 2]));
|
|
3042
3042
|
const outside = l < lo ? lo - l : l > hi ? l - hi : 0;
|
|
3043
|
-
out[i] =
|
|
3043
|
+
out[i] = _chunkPA3IMPPScjs.coverageToByte.call(void 0, 1 - outside / ramp);
|
|
3044
3044
|
}
|
|
3045
|
-
return
|
|
3045
|
+
return _chunkPA3IMPPScjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
|
|
3046
3046
|
}
|
|
3047
3047
|
function hueRange(pixels, center) {
|
|
3048
3048
|
const n = checkPixels(pixels);
|
|
@@ -3065,9 +3065,9 @@ function hueRange(pixels, center) {
|
|
|
3065
3065
|
hue *= 60;
|
|
3066
3066
|
let dh = ((hue - center) % 360 + 360) % 360;
|
|
3067
3067
|
dh = Math.min(dh, 360 - dh);
|
|
3068
|
-
out[i] =
|
|
3068
|
+
out[i] = _chunkPA3IMPPScjs.coverageToByte.call(void 0, Math.min(1, Math.max(0, 1 - dh / 60)) * chroma * (2 - mx));
|
|
3069
3069
|
}
|
|
3070
|
-
return
|
|
3070
|
+
return _chunkPA3IMPPScjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
|
|
3071
3071
|
}
|
|
3072
3072
|
|
|
3073
3073
|
// src/image-editor/selection/refine.ts
|
|
@@ -3201,9 +3201,9 @@ function edgeWidth(guide, w, h, r) {
|
|
|
3201
3201
|
g[yy * w + xx] = Math.sqrt(gx * gx + gy * gy);
|
|
3202
3202
|
}
|
|
3203
3203
|
}
|
|
3204
|
-
const gm =
|
|
3205
|
-
const hi =
|
|
3206
|
-
const lo =
|
|
3204
|
+
const gm = _chunkPA3IMPPScjs.greyMorphology.call(void 0, g, w, h, r, true);
|
|
3205
|
+
const hi = _chunkPA3IMPPScjs.greyMorphology.call(void 0, y, w, h, r, true);
|
|
3206
|
+
const lo = _chunkPA3IMPPScjs.greyMorphology.call(void 0, y, w, h, r, false);
|
|
3207
3207
|
const out = new Float32Array(n);
|
|
3208
3208
|
for (let i = 0; i < n; i++) out[i] = (hi[i] - lo[i]) / Math.max(gm[i], 1e-4);
|
|
3209
3209
|
return out;
|
|
@@ -3227,7 +3227,7 @@ function refineCoverage(guide, m, w, h, params = {}) {
|
|
|
3227
3227
|
}
|
|
3228
3228
|
}
|
|
3229
3229
|
if (any) {
|
|
3230
|
-
const dist =
|
|
3230
|
+
const dist = _chunkPA3IMPPScjs.distanceTransform.call(void 0, boundary, w, h);
|
|
3231
3231
|
const r = gfRadius(p);
|
|
3232
3232
|
const q = guidedFilterColor(guide, m, w, h, r);
|
|
3233
3233
|
const widths = p.smartRadius ? edgeWidth(guide, w, h, r) : null;
|
|
@@ -3253,7 +3253,7 @@ function refineCoverage(guide, m, w, h, params = {}) {
|
|
|
3253
3253
|
for (let i = 0; i < a.length; i++) a[i] = Math.min(1, Math.max(0, (a[i] - 0.5) * gain + 0.5));
|
|
3254
3254
|
}
|
|
3255
3255
|
const amount = shiftAmount(p);
|
|
3256
|
-
if (Math.abs(amount) >= 1e-4) a =
|
|
3256
|
+
if (Math.abs(amount) >= 1e-4) a = _chunkPA3IMPPScjs.shiftCoverage.call(void 0, a, w, h, amount);
|
|
3257
3257
|
return a;
|
|
3258
3258
|
}
|
|
3259
3259
|
function guidePlanes(pixels, win) {
|
|
@@ -3297,9 +3297,9 @@ function refineSelection(pixels, mask, params = {}) {
|
|
|
3297
3297
|
const out = new Uint8Array(mask.width * mask.height);
|
|
3298
3298
|
for (let y = 0; y < wh; y++) {
|
|
3299
3299
|
const dst = (y0 + y) * mask.width + x0;
|
|
3300
|
-
for (let x = 0; x < ww; x++) out[dst + x] =
|
|
3300
|
+
for (let x = 0; x < ww; x++) out[dst + x] = _chunkPA3IMPPScjs.coverageToByte.call(void 0, refined[y * ww + x]);
|
|
3301
3301
|
}
|
|
3302
|
-
return
|
|
3302
|
+
return _chunkPA3IMPPScjs.createSelectionMask.call(void 0, mask.width, mask.height, out);
|
|
3303
3303
|
}
|
|
3304
3304
|
|
|
3305
3305
|
// src/image-editor/effects.ts
|
|
@@ -3469,7 +3469,7 @@ var ImageEffectsEngine = (_class7 = class {
|
|
|
3469
3469
|
// src/image-editor/free-transform.ts
|
|
3470
3470
|
var FREE_TRANSFORM_CONTENTS = ["auto", "layer", "selection", "selection-copy", "selection-outline"];
|
|
3471
3471
|
var fail = (message) => {
|
|
3472
|
-
throw new (0,
|
|
3472
|
+
throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(message);
|
|
3473
3473
|
};
|
|
3474
3474
|
var T = (x, y) => [1, 0, x, 0, 1, y, 0, 0, 1];
|
|
3475
3475
|
function previewStep(scale) {
|
|
@@ -3578,7 +3578,7 @@ var FreeTransformSession = (_class8 = class {
|
|
|
3578
3578
|
} else {
|
|
3579
3579
|
const id = _nullishCoalesce(init.layerId, () => ( host.activeLayerId()));
|
|
3580
3580
|
if (!id) fail("No layer given and none is active; pass layerId (see list_layers).");
|
|
3581
|
-
const layer =
|
|
3581
|
+
const layer = _chunkPA3IMPPScjs.requireLayer.call(void 0, layers, id).layer;
|
|
3582
3582
|
this.layerId = layer.id;
|
|
3583
3583
|
const mask = layer.mask && !layer.mask.source ? layer.mask : void 0;
|
|
3584
3584
|
const channel = _nullishCoalesce(init.channel, () => ( (layer.id === host.activeLayerId() ? host.activeTarget() : "pixels")));
|
|
@@ -3589,20 +3589,20 @@ var FreeTransformSession = (_class8 = class {
|
|
|
3589
3589
|
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.`);
|
|
3590
3590
|
if (!layer.visible && content !== "selection-copy") fail(`Layer "${layer.name || id}" is hidden; show it before you transform it.`);
|
|
3591
3591
|
if (content !== "selection-copy") {
|
|
3592
|
-
|
|
3593
|
-
if (!maskAlone)
|
|
3592
|
+
_chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "position", "transform it");
|
|
3593
|
+
if (!maskAlone) _chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "pixels", "transform it");
|
|
3594
3594
|
}
|
|
3595
3595
|
const o = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
|
|
3596
3596
|
const pixels = layer.type === "pixel" ? host.pixelsOf(layer) : null;
|
|
3597
3597
|
if (layer.type === "smart" && !maskAlone) {
|
|
3598
3598
|
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).`);
|
|
3599
|
-
if (!
|
|
3599
|
+
if (!_chunkPA3IMPPScjs.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.`);
|
|
3600
3600
|
this.smart = layer;
|
|
3601
3601
|
this.smartObject = true;
|
|
3602
|
-
this.startGeometry =
|
|
3602
|
+
this.startGeometry = _chunkPA3IMPPScjs.placementGeometry.call(void 0, layer);
|
|
3603
3603
|
if (init.interpolation === void 0 && layer.placement.interpolation) this.interp = layer.placement.interpolation;
|
|
3604
3604
|
this.startInterp = this.interp;
|
|
3605
|
-
this.box =
|
|
3605
|
+
this.box = _chunkPA3IMPPScjs.contentsBox.call(void 0, layer.contents);
|
|
3606
3606
|
this.moves = mask && linked ? ["pixels", "mask"] : ["pixels"];
|
|
3607
3607
|
this.geometryValue = this.startGeometry;
|
|
3608
3608
|
this.shown = this.startLayers;
|
|
@@ -3610,8 +3610,8 @@ var FreeTransformSession = (_class8 = class {
|
|
|
3610
3610
|
}
|
|
3611
3611
|
if (layer.type === "type" && !maskAlone) {
|
|
3612
3612
|
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).`);
|
|
3613
|
-
const frame =
|
|
3614
|
-
const m =
|
|
3613
|
+
const frame = _chunkPA3IMPPScjs.typeFrame.call(void 0, layer, host.textEnv().shaper);
|
|
3614
|
+
const m = _chunkPA3IMPPScjs.textMatrix.call(void 0, layer);
|
|
3615
3615
|
const at = (x, y) => ({ x: m[0] * x + m[2] * y + m[4], y: m[1] * x + m[3] * y + m[5] });
|
|
3616
3616
|
this.typeTarget = layer;
|
|
3617
3617
|
this.typeLayer = true;
|
|
@@ -3630,7 +3630,7 @@ var FreeTransformSession = (_class8 = class {
|
|
|
3630
3630
|
}
|
|
3631
3631
|
if (layer.type === "shape" && !maskAlone) {
|
|
3632
3632
|
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).`);
|
|
3633
|
-
const g =
|
|
3633
|
+
const g = _chunkPA3IMPPScjs.shapeGeometryBounds.call(void 0, layer);
|
|
3634
3634
|
if (!g) fail(`Shape layer "${layer.name || id}" has no path to transform.`);
|
|
3635
3635
|
const w = Math.max(g.width, 1);
|
|
3636
3636
|
const h = Math.max(g.height, 1);
|
|
@@ -3678,7 +3678,7 @@ var FreeTransformSession = (_class8 = class {
|
|
|
3678
3678
|
if (box) {
|
|
3679
3679
|
const copy = {
|
|
3680
3680
|
type: "pixel",
|
|
3681
|
-
id:
|
|
3681
|
+
id: _chunkPA3IMPPScjs.newLayerId.call(void 0, ),
|
|
3682
3682
|
name: `${layer.name || "Layer"} copy`,
|
|
3683
3683
|
visible: true,
|
|
3684
3684
|
opacity: 1,
|
|
@@ -3702,7 +3702,7 @@ var FreeTransformSession = (_class8 = class {
|
|
|
3702
3702
|
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).");
|
|
3703
3703
|
this.box = box;
|
|
3704
3704
|
this.moves = moves;
|
|
3705
|
-
this.startGeometry =
|
|
3705
|
+
this.startGeometry = _chunkPA3IMPPScjs.identityTransform.call(void 0, box);
|
|
3706
3706
|
this.startInterp = this.interp;
|
|
3707
3707
|
this.geometryValue = this.startGeometry;
|
|
3708
3708
|
this.shown = this.startLayers;
|
|
@@ -3780,8 +3780,8 @@ var FreeTransformSession = (_class8 = class {
|
|
|
3780
3780
|
warp: changes.warp === void 0 ? _nullishCoalesce(this.geometryValue.warp, () => ( null)) : changes.warp
|
|
3781
3781
|
};
|
|
3782
3782
|
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.");
|
|
3783
|
-
if (!
|
|
3784
|
-
if (this.typeTarget && (
|
|
3783
|
+
if (!_chunkPA3IMPPScjs.transformMap.call(void 0, next)) fail("These corners fold the frame over itself or through the horizon; keep the quad convex.");
|
|
3784
|
+
if (this.typeTarget && (_chunkPA3IMPPScjs.hasWarp.call(void 0, next) || !_chunkPA3IMPPScjs.matrixFromCorners.call(void 0, next.box, next.corners))) {
|
|
3785
3785
|
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.");
|
|
3786
3786
|
}
|
|
3787
3787
|
this.geometryValue = next;
|
|
@@ -3793,10 +3793,10 @@ var FreeTransformSession = (_class8 = class {
|
|
|
3793
3793
|
if (this.smart) return { layers: this.resampleSmart(final, preview), selection: this.startSelection };
|
|
3794
3794
|
if (this.typeTarget) return { layers: this.resampleType(), selection: this.startSelection };
|
|
3795
3795
|
const g = this.geometryValue;
|
|
3796
|
-
const identity =
|
|
3797
|
-
const warp =
|
|
3798
|
-
const h = warp ? null :
|
|
3799
|
-
const f = warp ?
|
|
3796
|
+
const identity = _chunkPA3IMPPScjs.isIdentityTransform.call(void 0, g);
|
|
3797
|
+
const warp = _chunkPA3IMPPScjs.hasWarp.call(void 0, g);
|
|
3798
|
+
const h = warp ? null : _chunkPA3IMPPScjs.geometryHomography.call(void 0, g);
|
|
3799
|
+
const f = warp ? _chunkPA3IMPPScjs.transformMap.call(void 0, g) : null;
|
|
3800
3800
|
const step = final ? 1 : previewStep(preview.scale);
|
|
3801
3801
|
const interpolation = final ? this.interp : this.interp === "nearest" ? "nearest" : "bilinear";
|
|
3802
3802
|
let layers = this.startLayers;
|
|
@@ -3840,7 +3840,7 @@ var FreeTransformSession = (_class8 = class {
|
|
|
3840
3840
|
if (part.what === "selection") {
|
|
3841
3841
|
const { width, height } = this.host.canvas();
|
|
3842
3842
|
const data = new Uint8Array(_chunkCWM3CUUXcjs.readRegion.call(void 0, result, { x: 0, y: 0, width, height }).buffer);
|
|
3843
|
-
const next =
|
|
3843
|
+
const next = _chunkPA3IMPPScjs.createSelectionMask.call(void 0, width, height, data);
|
|
3844
3844
|
selection = next.bounds ? next : null;
|
|
3845
3845
|
} else if (part.what === "pixels") {
|
|
3846
3846
|
layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, targetId, (l) => {
|
|
@@ -3862,14 +3862,14 @@ var FreeTransformSession = (_class8 = class {
|
|
|
3862
3862
|
resampleShape(final, preview, warpMap, h) {
|
|
3863
3863
|
const layer = this.shape;
|
|
3864
3864
|
let components = layer.components;
|
|
3865
|
-
if (!
|
|
3865
|
+
if (!_chunkPA3IMPPScjs.isIdentityTransform.call(void 0, this.geometryValue)) {
|
|
3866
3866
|
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;
|
|
3867
3867
|
const map = _nullishCoalesce(warpMap, () => ( ((p) => h ? _chunkQT26RHKKcjs.applyHomography.call(void 0, h, p) : p)));
|
|
3868
|
-
components =
|
|
3868
|
+
components = _chunkPA3IMPPScjs.transformShapeComponents.call(void 0, layer.components, (p) => _nullishCoalesce(map(p), () => ( p)), affine);
|
|
3869
3869
|
}
|
|
3870
3870
|
const moved = { ...layer, components };
|
|
3871
3871
|
delete moved.annotation;
|
|
3872
|
-
const surface =
|
|
3872
|
+
const surface = _chunkPA3IMPPScjs.renderShape.call(void 0, moved, this.host.shapeEnv(), final ? {} : { clip: preview.clip });
|
|
3873
3873
|
return _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.startLayers, layer.id, () => ({ ...moved, surface }));
|
|
3874
3874
|
}
|
|
3875
3875
|
/**
|
|
@@ -3879,13 +3879,13 @@ var FreeTransformSession = (_class8 = class {
|
|
|
3879
3879
|
resampleType() {
|
|
3880
3880
|
const layer = this.typeTarget;
|
|
3881
3881
|
const g = this.geometryValue;
|
|
3882
|
-
if (
|
|
3883
|
-
const m =
|
|
3882
|
+
if (_chunkPA3IMPPScjs.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.");
|
|
3883
|
+
const m = _chunkPA3IMPPScjs.matrixFromCorners.call(void 0, g.box, g.corners);
|
|
3884
3884
|
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.");
|
|
3885
3885
|
const next = { ...layer, transform: m };
|
|
3886
3886
|
delete next.annotation;
|
|
3887
|
-
let layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.startLayers, layer.id, () =>
|
|
3888
|
-
const change = _chunkQT26RHKKcjs.multiplyHomographies.call(void 0, _chunkQT26RHKKcjs.homographyFromAffine.call(void 0,
|
|
3887
|
+
let layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.startLayers, layer.id, () => _chunkPA3IMPPScjs.rerenderText.call(void 0, next, this.host.textEnv()));
|
|
3888
|
+
const change = _chunkQT26RHKKcjs.multiplyHomographies.call(void 0, _chunkQT26RHKKcjs.homographyFromAffine.call(void 0, _chunkJCXMJUQOcjs.invertMatrix.call(void 0, _chunkPA3IMPPScjs.textMatrix.call(void 0, layer))), _chunkQT26RHKKcjs.homographyFromAffine.call(void 0, m));
|
|
3889
3889
|
for (const part of this.parts) {
|
|
3890
3890
|
if (part.what !== "mask") continue;
|
|
3891
3891
|
const surface = _chunkHGTDMKNEcjs.transformSurface.call(void 0, part.moving, change, { interpolation: this.interp === "nearest" ? "nearest" : "bilinear" });
|
|
@@ -3901,12 +3901,12 @@ var FreeTransformSession = (_class8 = class {
|
|
|
3901
3901
|
const canvas = this.host.canvas();
|
|
3902
3902
|
try {
|
|
3903
3903
|
if (final) {
|
|
3904
|
-
const res =
|
|
3904
|
+
const res = _chunkPA3IMPPScjs.setSmartPlacement.call(void 0, this.startLayers, layer.id, placement, canvas);
|
|
3905
3905
|
this.smartMasksMoved = res.masksMoved;
|
|
3906
3906
|
return res.layers;
|
|
3907
3907
|
}
|
|
3908
3908
|
const step = previewStep(preview.scale);
|
|
3909
|
-
const surface =
|
|
3909
|
+
const surface = _chunkPA3IMPPScjs.renderSmartObject.call(void 0, { ...layer, placement }, canvas, { step, clip: preview.clip, skipFilters: true, reduced: this.smartReduced });
|
|
3910
3910
|
return _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.startLayers, layer.id, (l) => ({ ...l, placement, surface }));
|
|
3911
3911
|
} catch (e) {
|
|
3912
3912
|
if (e instanceof _chunkHGTDMKNEcjs.TransformTooLargeError) fail(e.message);
|
|
@@ -3916,10 +3916,10 @@ var FreeTransformSession = (_class8 = class {
|
|
|
3916
3916
|
/** Whether the geometry (or the interpolation of a smart object) differs from where it started. */
|
|
3917
3917
|
isChanged() {
|
|
3918
3918
|
const g = this.geometryValue;
|
|
3919
|
-
if (!this.smart && !this.typeTarget) return !
|
|
3919
|
+
if (!this.smart && !this.typeTarget) return !_chunkPA3IMPPScjs.isIdentityTransform.call(void 0, g);
|
|
3920
3920
|
const a = this.startGeometry;
|
|
3921
3921
|
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);
|
|
3922
|
-
const warp = (w, box) => w &&
|
|
3922
|
+
const warp = (w, box) => w && _chunkPA3IMPPScjs.hasWarp.call(void 0, { box, corners: a.corners, warp: w }) ? JSON.stringify(w) : "";
|
|
3923
3923
|
return !same || warp(g.warp, g.box) !== warp(a.warp, a.box) || this.interp !== this.startInterp;
|
|
3924
3924
|
}
|
|
3925
3925
|
render(preview) {
|
|
@@ -4179,7 +4179,7 @@ function convertSurfaceColors(surface, t) {
|
|
|
4179
4179
|
}
|
|
4180
4180
|
|
|
4181
4181
|
// src/image-editor/controller.ts
|
|
4182
|
-
var IMAGE_EDITOR_SCHEMA_VERSION =
|
|
4182
|
+
var IMAGE_EDITOR_SCHEMA_VERSION = _chunkPA3IMPPScjs.LAYERED_SCHEMA_VERSION;
|
|
4183
4183
|
var RETOUCH_TOOLS = ["clone", "heal", "spot-heal", "smudge", "dodge", "burn", "sponge", "blur", "sharpen", "history"];
|
|
4184
4184
|
var isRetouchTool = (tool) => RETOUCH_TOOLS.includes(tool);
|
|
4185
4185
|
var STROKE_TOOLS = ["brush", "eraser", "mixer", ...RETOUCH_TOOLS];
|
|
@@ -4373,7 +4373,7 @@ var PaintStrokeSession = (_class9 = class {
|
|
|
4373
4373
|
for (const t of _chunkCWM3CUUXcjs.tilesInRect.call(void 0, { x: r.x - this.apply.offset.x, y: r.y - this.apply.offset.y, width: r.width, height: r.height })) {
|
|
4374
4374
|
const key = _chunkCWM3CUUXcjs.tileKey.call(void 0, t.tx, t.ty);
|
|
4375
4375
|
const cur = regions.get(key);
|
|
4376
|
-
regions.set(key, { tx: t.tx, ty: t.ty, r: cur ?
|
|
4376
|
+
regions.set(key, { tx: t.tx, ty: t.ty, r: cur ? _chunkPA3IMPPScjs.unionRect.call(void 0, cur.r, r) : r });
|
|
4377
4377
|
}
|
|
4378
4378
|
}
|
|
4379
4379
|
for (const [key, { tx, ty, r }] of regions) {
|
|
@@ -4405,7 +4405,7 @@ var PaintStrokeSession = (_class9 = class {
|
|
|
4405
4405
|
}
|
|
4406
4406
|
/** Finishes the stroke (one undo step) and returns what changed. */
|
|
4407
4407
|
end() {
|
|
4408
|
-
if (this.closed) throw new (0,
|
|
4408
|
+
if (this.closed) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("This stroke has already ended.");
|
|
4409
4409
|
const last = _nullishCoalesce(this.last, () => ( void 0));
|
|
4410
4410
|
const rects = this.mixer ? this.mixer.finish(last) : this.stroke.finish(last);
|
|
4411
4411
|
_optionalChain([this, 'access', _122 => _122.flushView, 'optionalCall', _123 => _123()]);
|
|
@@ -4541,20 +4541,20 @@ function sameTile(a, b) {
|
|
|
4541
4541
|
for (let i = 0; i < a.data.length; i++) if (a.data[i] !== b.data[i]) return false;
|
|
4542
4542
|
return true;
|
|
4543
4543
|
}
|
|
4544
|
-
var DEFAULT_ADJUSTMENTS =
|
|
4544
|
+
var DEFAULT_ADJUSTMENTS = _chunkPA3IMPPScjs.DEFAULT_ADJUSTMENTS_VALUES;
|
|
4545
4545
|
function normalizeStoredAdjustments(stored) {
|
|
4546
4546
|
if (!stored) return { ...DEFAULT_ADJUSTMENTS };
|
|
4547
4547
|
const out = {
|
|
4548
4548
|
...DEFAULT_ADJUSTMENTS,
|
|
4549
4549
|
...stored,
|
|
4550
|
-
process:
|
|
4550
|
+
process: _chunkPA3IMPPScjs.normalizeProcessVersion.call(void 0, stored.process)
|
|
4551
4551
|
};
|
|
4552
|
-
const layers =
|
|
4552
|
+
const layers = _chunkPA3IMPPScjs.normalizeAdjustmentLayers.call(void 0, stored.layers);
|
|
4553
4553
|
if (layers.length) out.layers = layers;
|
|
4554
4554
|
else delete out.layers;
|
|
4555
4555
|
return out;
|
|
4556
4556
|
}
|
|
4557
|
-
var isLayered = (data) => Boolean(data && data.version ===
|
|
4557
|
+
var isLayered = (data) => Boolean(data && data.version === _chunkPA3IMPPScjs.LAYERED_SCHEMA_VERSION && Array.isArray(data.layers));
|
|
4558
4558
|
function migrateSerializedImageEditorState(data) {
|
|
4559
4559
|
if (isLayered(data)) {
|
|
4560
4560
|
const out = {
|
|
@@ -4586,10 +4586,10 @@ function migrateSerializedImageEditorState(data) {
|
|
|
4586
4586
|
function migrateToLayeredState(data, size) {
|
|
4587
4587
|
const clean = migrateSerializedImageEditorState(data);
|
|
4588
4588
|
if (isLayered(clean)) return clean;
|
|
4589
|
-
const stack =
|
|
4590
|
-
const { layers, assets } =
|
|
4589
|
+
const stack = _chunkPA3IMPPScjs.layersFromLegacy.call(void 0, clean, Math.round(size.width), Math.round(size.height));
|
|
4590
|
+
const { layers, assets } = _chunkPA3IMPPScjs.serializeLayers.call(void 0, stack.layers);
|
|
4591
4591
|
const out = {
|
|
4592
|
-
version:
|
|
4592
|
+
version: _chunkPA3IMPPScjs.LAYERED_SCHEMA_VERSION,
|
|
4593
4593
|
width: Math.round(size.width),
|
|
4594
4594
|
height: Math.round(size.height),
|
|
4595
4595
|
layers,
|
|
@@ -4603,8 +4603,8 @@ function migrateToLayeredState(data, size) {
|
|
|
4603
4603
|
if (clean.selection) out.selection = clean.selection;
|
|
4604
4604
|
return out;
|
|
4605
4605
|
}
|
|
4606
|
-
var DEFAULT_TRANSFORM =
|
|
4607
|
-
var DEFAULT_DEPTH_MASK =
|
|
4606
|
+
var DEFAULT_TRANSFORM = _chunkPA3IMPPScjs.DEFAULT_TRANSFORM_VALUES;
|
|
4607
|
+
var DEFAULT_DEPTH_MASK = _chunkPA3IMPPScjs.DEFAULT_DEPTH_MASK_VALUES;
|
|
4608
4608
|
var DEVELOP_KEYS = ["brightness", "contrast", "saturation", "exposure", "temperature", "tint"];
|
|
4609
4609
|
var ImageEditorController = (_class10 = class {
|
|
4610
4610
|
|
|
@@ -4627,7 +4627,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
4627
4627
|
__init71() {this.sourceSurfaces = /* @__PURE__ */ new WeakMap()}
|
|
4628
4628
|
__init72() {this.viewKey = []}
|
|
4629
4629
|
/** For `compositePixels` and mask evaluation (the renderer keeps its own for the viewport). */
|
|
4630
|
-
__init73() {this.compositor = new (0,
|
|
4630
|
+
__init73() {this.compositor = new (0, _chunkPA3IMPPScjs.LayerCompositor)()}
|
|
4631
4631
|
/** The effects provider slot (see `setEffectsProvider`). */
|
|
4632
4632
|
__init74() {this.effects = new (0, _chunkRUZQMYXHcjs.EffectsSlot)()}
|
|
4633
4633
|
/** Renders provider effects: effect smart filter results and effect layers. */
|
|
@@ -4685,7 +4685,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
4685
4685
|
this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
|
|
4686
4686
|
if (_optionalChain([options, 'access', _139 => _139.initialState, 'optionalAccess', _140 => _140.selection])) {
|
|
4687
4687
|
try {
|
|
4688
|
-
this.state.selection = normalizeSelection(
|
|
4688
|
+
this.state.selection = normalizeSelection(_chunkPA3IMPPScjs.deserializeSelection.call(void 0, options.initialState.selection));
|
|
4689
4689
|
} catch (e17) {
|
|
4690
4690
|
}
|
|
4691
4691
|
}
|
|
@@ -4798,10 +4798,10 @@ var ImageEditorController = (_class10 = class {
|
|
|
4798
4798
|
if (l.type === "group") {
|
|
4799
4799
|
const children = walk(l.children);
|
|
4800
4800
|
if (children !== l.children) next2 = { ...l, children };
|
|
4801
|
-
} else if (l.type === "smart" && _optionalChain([l, 'access', _143 => _143.smartFilters, 'optionalAccess', _144 => _144.filters, 'access', _145 => _145.some, 'call', _146 => _146((f) => f.kind === "effect")]) && (all ||
|
|
4801
|
+
} else if (l.type === "smart" && _optionalChain([l, 'access', _143 => _143.smartFilters, 'optionalAccess', _144 => _144.filters, 'access', _145 => _145.some, 'call', _146 => _146((f) => f.kind === "effect")]) && (all || _chunkPA3IMPPScjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
|
|
4802
4802
|
try {
|
|
4803
|
-
const r =
|
|
4804
|
-
if (all || !
|
|
4803
|
+
const r = _chunkPA3IMPPScjs.rerender.call(void 0, l, canvas);
|
|
4804
|
+
if (all || !_chunkPA3IMPPScjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
|
|
4805
4805
|
} catch (e19) {
|
|
4806
4806
|
}
|
|
4807
4807
|
}
|
|
@@ -4857,19 +4857,19 @@ var ImageEditorController = (_class10 = class {
|
|
|
4857
4857
|
const d = await this.describeEffect(effect, "filter");
|
|
4858
4858
|
const values = _chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, d, options.values);
|
|
4859
4859
|
const found = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, layerId);
|
|
4860
|
-
if (!found) throw new (0,
|
|
4860
|
+
if (!found) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`There is no layer "${layerId}"; call list_layers for the layer ids.`);
|
|
4861
4861
|
let layers = this.state.layers;
|
|
4862
4862
|
let id = layerId;
|
|
4863
4863
|
let converted = false;
|
|
4864
4864
|
if (found.layer.type !== "smart") {
|
|
4865
|
-
if (found.layer.type === "adjustment" || found.layer.type === "annotation") throw new (0,
|
|
4866
|
-
const res2 =
|
|
4865
|
+
if (found.layer.type === "adjustment" || found.layer.type === "annotation") throw new (0, _chunkPA3IMPPScjs.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.`);
|
|
4866
|
+
const res2 = _chunkPA3IMPPScjs.convertToSmartObject.call(void 0, layers, [layerId], this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l) });
|
|
4867
4867
|
layers = res2.layers;
|
|
4868
4868
|
id = res2.layer.id;
|
|
4869
4869
|
converted = true;
|
|
4870
4870
|
}
|
|
4871
|
-
const filter =
|
|
4872
|
-
const res =
|
|
4871
|
+
const filter = _chunkPA3IMPPScjs.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 });
|
|
4872
|
+
const res = _chunkPA3IMPPScjs.addSmartFilter.call(void 0, layers, id, filter, this.canvasSize, options.index);
|
|
4873
4873
|
this.commitLayers(res.layers);
|
|
4874
4874
|
return { layerId: id, filter: res.filter, converted };
|
|
4875
4875
|
}
|
|
@@ -4880,9 +4880,9 @@ var ImageEditorController = (_class10 = class {
|
|
|
4880
4880
|
* false, during a drag).
|
|
4881
4881
|
*/
|
|
4882
4882
|
async updateEffectFilter(layerId, filterId, changes, commitToHistory = true) {
|
|
4883
|
-
const layer =
|
|
4883
|
+
const layer = _chunkPA3IMPPScjs.requireSmartObject.call(void 0, this.state.layers, layerId);
|
|
4884
4884
|
const was = _optionalChain([layer, 'access', _147 => _147.smartFilters, 'optionalAccess', _148 => _148.filters, 'access', _149 => _149.find, 'call', _150 => _150((f) => f.id === filterId)]);
|
|
4885
|
-
if (!was || was.kind !== "effect") throw new (0,
|
|
4885
|
+
if (!was || was.kind !== "effect") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access', _151 => _151.smartFilters, 'optionalAccess', _152 => _152.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
|
|
4886
4886
|
const update = {};
|
|
4887
4887
|
if (changes.values) {
|
|
4888
4888
|
const d = await this.describeEffect(was.effect);
|
|
@@ -4891,15 +4891,15 @@ var ImageEditorController = (_class10 = class {
|
|
|
4891
4891
|
for (const [k, v] of Object.entries(changes.values)) {
|
|
4892
4892
|
if (v !== null) given[k] = v;
|
|
4893
4893
|
else if (k in d.controls.properties) base[k] = d.defaults[k];
|
|
4894
|
-
else throw new (0,
|
|
4894
|
+
else throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
|
|
4895
4895
|
}
|
|
4896
4896
|
update.values = { ...base, ..._chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
|
|
4897
4897
|
}
|
|
4898
4898
|
for (const k of ["enabled", "blend", "opacity"]) if (changes[k] !== void 0) update[k] = changes[k];
|
|
4899
|
-
let res =
|
|
4900
|
-
if (changes.index !== void 0) res = { ...res, layers:
|
|
4899
|
+
let res = _chunkPA3IMPPScjs.updateSmartFilter.call(void 0, this.state.layers, layerId, filterId, update, this.canvasSize);
|
|
4900
|
+
if (changes.index !== void 0) res = { ...res, layers: _chunkPA3IMPPScjs.moveSmartFilter.call(void 0, res.layers, layerId, filterId, changes.index, this.canvasSize).layers };
|
|
4901
4901
|
this.commitLayers(res.layers, void 0, commitToHistory);
|
|
4902
|
-
return
|
|
4902
|
+
return _chunkPA3IMPPScjs.requireSmartObject.call(void 0, this.state.layers, layerId).smartFilters.filters.find((f) => f.id === filterId);
|
|
4903
4903
|
}
|
|
4904
4904
|
/**
|
|
4905
4905
|
* Adds an effect layer: a pixel layer drawn by a provider generator, overlay or title effect at
|
|
@@ -4911,12 +4911,12 @@ var ImageEditorController = (_class10 = class {
|
|
|
4911
4911
|
const values = _chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, d, options.values);
|
|
4912
4912
|
const { width, height } = this.naturalSize;
|
|
4913
4913
|
const pixels = await this.effectsEngine.renderLayer(d.id, values, { width, height, depth: this.bitDepth, time: options.time });
|
|
4914
|
-
const blend =
|
|
4915
|
-
if (options.opacity !== void 0 && !(options.opacity >= 0 && options.opacity <= 1)) throw new (0,
|
|
4914
|
+
const blend = _chunkPA3IMPPScjs.parseBlend.call(void 0, options.blend);
|
|
4915
|
+
if (options.opacity !== void 0 && !(options.opacity >= 0 && options.opacity <= 1)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("opacity must be from 0 to 1.");
|
|
4916
4916
|
const ids = new Set(_chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
|
|
4917
4917
|
const layer = {
|
|
4918
4918
|
type: "pixel",
|
|
4919
|
-
id: options.id && !ids.has(options.id) ? options.id :
|
|
4919
|
+
id: options.id && !ids.has(options.id) ? options.id : _chunkPA3IMPPScjs.newLayerId.call(void 0, ),
|
|
4920
4920
|
name: _optionalChain([options, 'access', _153 => _153.name, 'optionalAccess', _154 => _154.trim, 'call', _155 => _155()]) || d.name,
|
|
4921
4921
|
visible: true,
|
|
4922
4922
|
opacity: _nullishCoalesce(options.opacity, () => ( 1)),
|
|
@@ -4925,7 +4925,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
4925
4925
|
offset: { x: 0, y: 0 },
|
|
4926
4926
|
generator: { effect: d.id, provider: this.effects.require().id, name: d.name, values, ...options.time ? { time: options.time } : {} }
|
|
4927
4927
|
};
|
|
4928
|
-
const next =
|
|
4928
|
+
const next = _chunkPA3IMPPScjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(options));
|
|
4929
4929
|
this.commitLayers(next, () => {
|
|
4930
4930
|
this.state.activeLayerId = layer.id;
|
|
4931
4931
|
this.state.activeTarget = "pixels";
|
|
@@ -4940,8 +4940,8 @@ var ImageEditorController = (_class10 = class {
|
|
|
4940
4940
|
async updateEffectLayer(layerId, changes, commitToHistory = true) {
|
|
4941
4941
|
const found = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, layerId);
|
|
4942
4942
|
const layer = _optionalChain([found, 'optionalAccess', _156 => _156.layer]);
|
|
4943
|
-
if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0,
|
|
4944
|
-
|
|
4943
|
+
if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
|
|
4944
|
+
_chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
|
|
4945
4945
|
const g = layer.generator;
|
|
4946
4946
|
const d = await this.describeEffect(g.effect);
|
|
4947
4947
|
const base = { ...g.values };
|
|
@@ -4949,7 +4949,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
4949
4949
|
for (const [k, v] of Object.entries(_nullishCoalesce(changes.values, () => ( {})))) {
|
|
4950
4950
|
if (v !== null) given[k] = v;
|
|
4951
4951
|
else if (k in d.controls.properties) base[k] = d.defaults[k];
|
|
4952
|
-
else throw new (0,
|
|
4952
|
+
else throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
|
|
4953
4953
|
}
|
|
4954
4954
|
const values = { ...base, ..._chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
|
|
4955
4955
|
const time = _nullishCoalesce(_nullishCoalesce(changes.time, () => ( g.time)), () => ( 0));
|
|
@@ -4964,7 +4964,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
4964
4964
|
/** Turns an effect layer into a plain pixel layer keeping its pixels (one undo step). */
|
|
4965
4965
|
rasterizeEffectLayer(layerId) {
|
|
4966
4966
|
const found = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, layerId);
|
|
4967
|
-
if (!found || found.layer.type !== "pixel" || !found.layer.generator) throw new (0,
|
|
4967
|
+
if (!found || found.layer.type !== "pixel" || !found.layer.generator) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`"${layerId}" is not an effect layer.`);
|
|
4968
4968
|
this.commitLayers(
|
|
4969
4969
|
_chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, layerId, (l) => {
|
|
4970
4970
|
const { generator: _g, ...rest } = l;
|
|
@@ -4992,7 +4992,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
4992
4992
|
if (key.length === this.viewKey.length && key.every((v, i) => v === this.viewKey[i])) return;
|
|
4993
4993
|
this.viewKey = key;
|
|
4994
4994
|
const { width, height } = this.naturalSize;
|
|
4995
|
-
const view =
|
|
4995
|
+
const view = _chunkPA3IMPPScjs.legacyView.call(void 0, this.stack(), width, height, s.activeLayerId);
|
|
4996
4996
|
s.adjustments = view.adjustments;
|
|
4997
4997
|
s.depthMask = view.depthMask;
|
|
4998
4998
|
s.annotations = view.annotations;
|
|
@@ -5163,7 +5163,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5163
5163
|
applyCropPreset(ratio) {
|
|
5164
5164
|
this.recordHistory();
|
|
5165
5165
|
const { width, height } = this.state.imageDimensions;
|
|
5166
|
-
if (ratio &&
|
|
5166
|
+
if (ratio && _chunkPA3IMPPScjs.isQuarterTurnSwapped.call(void 0, this.state.transform)) {
|
|
5167
5167
|
ratio = 1 / ratio;
|
|
5168
5168
|
}
|
|
5169
5169
|
if (!ratio) {
|
|
@@ -5245,7 +5245,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5245
5245
|
*/
|
|
5246
5246
|
getLayerPixels(id) {
|
|
5247
5247
|
const layer = this.getLayer(id);
|
|
5248
|
-
if (!layer || !
|
|
5248
|
+
if (!layer || !_chunkPA3IMPPScjs.hasSurface.call(void 0, layer)) return null;
|
|
5249
5249
|
const surface = this.surfaceOf(layer);
|
|
5250
5250
|
const b = _chunkCWM3CUUXcjs.contentBounds.call(void 0, surface);
|
|
5251
5251
|
if (!b) return null;
|
|
@@ -5258,7 +5258,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5258
5258
|
*/
|
|
5259
5259
|
getLayerBounds(id) {
|
|
5260
5260
|
const layer = this.getLayer(id);
|
|
5261
|
-
if (!layer || !
|
|
5261
|
+
if (!layer || !_chunkPA3IMPPScjs.hasSurface.call(void 0, layer)) return null;
|
|
5262
5262
|
const surface = this.surfaceOf(layer);
|
|
5263
5263
|
let b = this.boundsCache.get(surface);
|
|
5264
5264
|
if (b === void 0) {
|
|
@@ -5282,15 +5282,15 @@ var ImageEditorController = (_class10 = class {
|
|
|
5282
5282
|
{ x: b2.x + b2.width, y: b2.y + b2.height },
|
|
5283
5283
|
{ x: b2.x, y: b2.y + b2.height }
|
|
5284
5284
|
];
|
|
5285
|
-
if (layer.type === "smart") return
|
|
5285
|
+
if (layer.type === "smart") return _chunkPA3IMPPScjs.placementGeometry.call(void 0, layer).corners.map((p) => ({ x: p.x, y: p.y }));
|
|
5286
5286
|
if (layer.type === "type") {
|
|
5287
|
-
const f =
|
|
5288
|
-
const m =
|
|
5287
|
+
const f = _chunkPA3IMPPScjs.typeFrame.call(void 0, layer, this.textEnv().shaper);
|
|
5288
|
+
const m = _chunkPA3IMPPScjs.textMatrix.call(void 0, layer);
|
|
5289
5289
|
const at = (x, y) => ({ x: m[0] * x + m[2] * y + m[4], y: m[1] * x + m[3] * y + m[5] });
|
|
5290
5290
|
return [at(f.x, f.y), at(f.x + f.width, f.y), at(f.x + f.width, f.y + f.height), at(f.x, f.y + f.height)];
|
|
5291
5291
|
}
|
|
5292
5292
|
if (layer.type === "shape") {
|
|
5293
|
-
const g =
|
|
5293
|
+
const g = _chunkPA3IMPPScjs.shapeGeometryBounds.call(void 0, layer);
|
|
5294
5294
|
return g ? rect(g) : null;
|
|
5295
5295
|
}
|
|
5296
5296
|
const b = this.getLayerBounds(id);
|
|
@@ -5322,7 +5322,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5322
5322
|
return null;
|
|
5323
5323
|
}
|
|
5324
5324
|
if (layer.type === "annotation") {
|
|
5325
|
-
if (
|
|
5325
|
+
if (_chunkPA3IMPPScjs.hitTestAnnotation.call(void 0, point, layer.annotation)) return layer.id;
|
|
5326
5326
|
return null;
|
|
5327
5327
|
}
|
|
5328
5328
|
if (layer.type === "shape") {
|
|
@@ -5365,9 +5365,9 @@ var ImageEditorController = (_class10 = class {
|
|
|
5365
5365
|
*/
|
|
5366
5366
|
getLayerDataURL(id) {
|
|
5367
5367
|
const layer = this.getLayer(id);
|
|
5368
|
-
if (!layer || !
|
|
5368
|
+
if (!layer || !_chunkPA3IMPPScjs.hasSurface.call(void 0, layer)) return null;
|
|
5369
5369
|
const surface = this.surfaceOf(layer);
|
|
5370
|
-
const enc =
|
|
5370
|
+
const enc = _chunkPA3IMPPScjs.encodeSurface.call(void 0, surface);
|
|
5371
5371
|
return enc ? enc.url : null;
|
|
5372
5372
|
}
|
|
5373
5373
|
/**
|
|
@@ -5487,7 +5487,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5487
5487
|
_optionalChain([extra, 'optionalCall', _167 => _167()]);
|
|
5488
5488
|
if (depth !== 8 && this.bitDepth === depth) this.state.layers = keepDeepLayers(prev, this.state.layers);
|
|
5489
5489
|
if (this.state.activeLayerId && !_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, this.state.activeLayerId)) {
|
|
5490
|
-
this.state.activeLayerId =
|
|
5490
|
+
this.state.activeLayerId = _chunkPA3IMPPScjs.activeLayerAfterRemoval.call(void 0, prev, this.state.layers, this.state.activeLayerId);
|
|
5491
5491
|
this.state.activeTarget = "pixels";
|
|
5492
5492
|
}
|
|
5493
5493
|
this.notify();
|
|
@@ -5509,19 +5509,19 @@ var ImageEditorController = (_class10 = class {
|
|
|
5509
5509
|
if (init.pixels) {
|
|
5510
5510
|
const px2 = init.pixels;
|
|
5511
5511
|
if (!(px2.width > 0 && px2.height > 0) || px2.data.length < px2.width * px2.height * 4) {
|
|
5512
|
-
throw new (0,
|
|
5512
|
+
throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("pixels must be RGBA with width \xD7 height \xD7 4 bytes.");
|
|
5513
5513
|
}
|
|
5514
5514
|
surface = _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, px2, 4);
|
|
5515
5515
|
} else if (init.color !== void 0) {
|
|
5516
5516
|
const c = parseColor(init.color);
|
|
5517
5517
|
surface = _chunkCWM3CUUXcjs.solidSurface.call(void 0, 4, { x: 0, y: 0, width, height }, _chunkCWM3CUUXcjs.packRgba.call(void 0, c[0], c[1], c[2], c[3]));
|
|
5518
5518
|
}
|
|
5519
|
-
const blend =
|
|
5520
|
-
if (init.opacity !== void 0 && !(init.opacity >= 0 && init.opacity <= 1)) throw new (0,
|
|
5519
|
+
const blend = _chunkPA3IMPPScjs.parseBlend.call(void 0, init.blend);
|
|
5520
|
+
if (init.opacity !== void 0 && !(init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("opacity must be from 0 to 1.");
|
|
5521
5521
|
const ids = new Set(_chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
|
|
5522
5522
|
const layer = {
|
|
5523
5523
|
type: "pixel",
|
|
5524
|
-
id: init.id && !ids.has(init.id) ? init.id :
|
|
5524
|
+
id: init.id && !ids.has(init.id) ? init.id : _chunkPA3IMPPScjs.newLayerId.call(void 0, ),
|
|
5525
5525
|
name: _optionalChain([init, 'access', _168 => _168.name, 'optionalAccess', _169 => _169.trim, 'call', _170 => _170()]) || this.nextLayerName(),
|
|
5526
5526
|
visible: _nullishCoalesce(init.visible, () => ( true)),
|
|
5527
5527
|
opacity: _nullishCoalesce(init.opacity, () => ( 1)),
|
|
@@ -5530,7 +5530,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5530
5530
|
offset: { x: Math.round(_nullishCoalesce(init.x, () => ( 0))), y: Math.round(_nullishCoalesce(init.y, () => ( 0))) }
|
|
5531
5531
|
};
|
|
5532
5532
|
if (init.fillOpacity !== void 0 && init.fillOpacity !== 1) layer.fillOpacity = init.fillOpacity;
|
|
5533
|
-
const next =
|
|
5533
|
+
const next = _chunkPA3IMPPScjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
|
|
5534
5534
|
this.commitLayers(next, () => {
|
|
5535
5535
|
this.state.activeLayerId = layer.id;
|
|
5536
5536
|
this.state.activeTarget = "pixels";
|
|
@@ -5570,12 +5570,12 @@ var ImageEditorController = (_class10 = class {
|
|
|
5570
5570
|
try {
|
|
5571
5571
|
img = await this.renderer.imageCache.get(src);
|
|
5572
5572
|
} catch (e24) {
|
|
5573
|
-
throw new (0,
|
|
5573
|
+
throw new (0, _chunkPA3IMPPScjs.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.");
|
|
5574
5574
|
}
|
|
5575
5575
|
const w = img.naturalWidth || img.width;
|
|
5576
5576
|
const h = img.naturalHeight || img.height;
|
|
5577
5577
|
const ctx = this.renderer.createCanvas(w, h).getContext("2d");
|
|
5578
|
-
if (!ctx || typeof ctx.getImageData !== "function") throw new (0,
|
|
5578
|
+
if (!ctx || typeof ctx.getImageData !== "function") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Decoding this image needs a canvas; pass a PNG instead.");
|
|
5579
5579
|
ctx.drawImage(img, 0, 0, w, h);
|
|
5580
5580
|
const data = ctx.getImageData(0, 0, w, h);
|
|
5581
5581
|
return { width: w, height: h, data: data.data };
|
|
@@ -5588,7 +5588,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5588
5588
|
}
|
|
5589
5589
|
/** Duplicates a layer (with its children) directly above it, as one undo step. Returns the copy's id. */
|
|
5590
5590
|
duplicateLayer(id, name) {
|
|
5591
|
-
const res =
|
|
5591
|
+
const res = _chunkPA3IMPPScjs.duplicateLayer.call(void 0, this.state.layers, id, name);
|
|
5592
5592
|
this.commitLayers(res.layers, () => {
|
|
5593
5593
|
this.state.activeLayerId = res.id;
|
|
5594
5594
|
});
|
|
@@ -5596,16 +5596,16 @@ var ImageEditorController = (_class10 = class {
|
|
|
5596
5596
|
}
|
|
5597
5597
|
/** Deletes a layer (refused when locked), as one undo step. */
|
|
5598
5598
|
removeLayer(id) {
|
|
5599
|
-
const next =
|
|
5599
|
+
const next = _chunkPA3IMPPScjs.removeLayer.call(void 0, this.state.layers, id);
|
|
5600
5600
|
this.commitLayers(next, () => {
|
|
5601
|
-
if (this.state.selectedAnnotationId && !_chunkHGTDMKNEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([
|
|
5601
|
+
if (this.state.selectedAnnotationId && !_chunkHGTDMKNEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkPA3IMPPScjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _172 => _172.id]) === this.state.selectedAnnotationId)) {
|
|
5602
5602
|
this.state.selectedAnnotationId = null;
|
|
5603
5603
|
}
|
|
5604
5604
|
});
|
|
5605
5605
|
}
|
|
5606
5606
|
/** Moves a layer above / below another, or into a group, as one undo step. Returns its new parent and index. */
|
|
5607
5607
|
moveLayer(id, placement) {
|
|
5608
|
-
const next =
|
|
5608
|
+
const next = _chunkPA3IMPPScjs.moveLayer.call(void 0, this.state.layers, id, placement);
|
|
5609
5609
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, next, id);
|
|
5610
5610
|
if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _173 => _173.parent, 'optionalAccess', _174 => _174.id]), () => ( null)), index: loc.index };
|
|
5611
5611
|
this.commitLayers(next);
|
|
@@ -5616,23 +5616,23 @@ var ImageEditorController = (_class10 = class {
|
|
|
5616
5616
|
* one undo step (`commitToHistory = false` for the moves of a slider drag). Returns the layer.
|
|
5617
5617
|
*/
|
|
5618
5618
|
setLayerProperties(id, props, commitToHistory = true) {
|
|
5619
|
-
const next =
|
|
5619
|
+
const next = _chunkPA3IMPPScjs.setLayerProperties.call(void 0, this.state.layers, id, props);
|
|
5620
5620
|
this.commitLayers(next, void 0, commitToHistory);
|
|
5621
5621
|
return _chunkHGTDMKNEcjs.findLayer.call(void 0, next, id).layer;
|
|
5622
5622
|
}
|
|
5623
5623
|
/** Adds an empty pass-through group above the active layer (or at `placement`) and makes it active. Returns its id. */
|
|
5624
5624
|
addGroup(init = {}) {
|
|
5625
|
-
const blend = init.blend === void 0 ? "pass-through" :
|
|
5625
|
+
const blend = init.blend === void 0 ? "pass-through" : _chunkPA3IMPPScjs.parseBlend.call(void 0, init.blend, true);
|
|
5626
5626
|
const group = {
|
|
5627
5627
|
type: "group",
|
|
5628
|
-
id:
|
|
5628
|
+
id: _chunkPA3IMPPScjs.newLayerId.call(void 0, "group"),
|
|
5629
5629
|
name: _optionalChain([init, 'access', _177 => _177.name, 'optionalAccess', _178 => _178.trim, 'call', _179 => _179()]) || "Group",
|
|
5630
5630
|
visible: true,
|
|
5631
5631
|
opacity: 1,
|
|
5632
5632
|
blend,
|
|
5633
5633
|
children: []
|
|
5634
5634
|
};
|
|
5635
|
-
const next =
|
|
5635
|
+
const next = _chunkPA3IMPPScjs.placeLayer.call(void 0, this.state.layers, group, this.newLayerPlacement(init));
|
|
5636
5636
|
this.commitLayers(next, () => {
|
|
5637
5637
|
this.state.activeLayerId = group.id;
|
|
5638
5638
|
this.state.activeTarget = "pixels";
|
|
@@ -5641,7 +5641,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5641
5641
|
}
|
|
5642
5642
|
/** Puts sibling layers into a new group (one undo step). Returns the group id. */
|
|
5643
5643
|
groupLayers(ids, name) {
|
|
5644
|
-
const res =
|
|
5644
|
+
const res = _chunkPA3IMPPScjs.groupLayers.call(void 0, this.state.layers, ids, name);
|
|
5645
5645
|
this.commitLayers(res.layers, () => {
|
|
5646
5646
|
this.state.activeLayerId = res.id;
|
|
5647
5647
|
});
|
|
@@ -5649,7 +5649,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5649
5649
|
}
|
|
5650
5650
|
/** Replaces a group by its children (one undo step). Returns the child ids, bottom to top. */
|
|
5651
5651
|
ungroupLayer(id) {
|
|
5652
|
-
const res =
|
|
5652
|
+
const res = _chunkPA3IMPPScjs.ungroupLayer.call(void 0, this.state.layers, id);
|
|
5653
5653
|
this.commitLayers(res.layers);
|
|
5654
5654
|
return res.ids;
|
|
5655
5655
|
}
|
|
@@ -5658,38 +5658,38 @@ var ImageEditorController = (_class10 = class {
|
|
|
5658
5658
|
* (`commitToHistory = false` for the moves of a drag). Returns the offset and document bounds.
|
|
5659
5659
|
*/
|
|
5660
5660
|
offsetLayer(id, move, commitToHistory = true) {
|
|
5661
|
-
const layer =
|
|
5661
|
+
const layer = _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id).layer;
|
|
5662
5662
|
if (layer.type === "smart") {
|
|
5663
5663
|
const tl = layer.placement.corners[0];
|
|
5664
5664
|
const dx = move.x !== void 0 ? move.x - tl.x : _nullishCoalesce(move.dx, () => ( 0));
|
|
5665
5665
|
const dy = move.y !== void 0 ? move.y - tl.y : _nullishCoalesce(move.dy, () => ( 0));
|
|
5666
|
-
if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0,
|
|
5667
|
-
this.commitLayers(
|
|
5666
|
+
if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("x and y must be numbers.");
|
|
5667
|
+
this.commitLayers(_chunkPA3IMPPScjs.offsetSmartObject.call(void 0, this.state.layers, id, dx, dy, this.canvasSize), void 0, commitToHistory);
|
|
5668
5668
|
const moved = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, id).layer;
|
|
5669
5669
|
return { offset: { x: Math.round(moved.placement.corners[0].x), y: Math.round(moved.placement.corners[0].y) }, bounds: this.getLayerBounds(id) };
|
|
5670
5670
|
}
|
|
5671
5671
|
if (layer.type === "shape") {
|
|
5672
|
-
const g = _nullishCoalesce(
|
|
5672
|
+
const g = _nullishCoalesce(_chunkPA3IMPPScjs.shapeGeometryBounds.call(void 0, layer), () => ( { x: 0, y: 0 }));
|
|
5673
5673
|
const dx = move.x !== void 0 ? move.x - g.x : _nullishCoalesce(move.dx, () => ( 0));
|
|
5674
5674
|
const dy = move.y !== void 0 ? move.y - g.y : _nullishCoalesce(move.dy, () => ( 0));
|
|
5675
|
-
if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0,
|
|
5676
|
-
|
|
5677
|
-
let moved =
|
|
5675
|
+
if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("x and y must be numbers.");
|
|
5676
|
+
_chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "position", "move it");
|
|
5677
|
+
let moved = _chunkPA3IMPPScjs.offsetShape.call(void 0, layer, dx, dy, this.shapeEnv());
|
|
5678
5678
|
const mask = layer.mask;
|
|
5679
5679
|
if (mask && mask.linked !== false && !mask.source && (Math.round(dx) || Math.round(dy))) moved = { ...moved, mask: { ...mask, surface: _chunkCWM3CUUXcjs.translateSurface.call(void 0, mask.surface, Math.round(dx), Math.round(dy)) } };
|
|
5680
5680
|
this.commitLayers(_chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, id, () => moved), void 0, commitToHistory);
|
|
5681
|
-
const b = _nullishCoalesce(
|
|
5681
|
+
const b = _nullishCoalesce(_chunkPA3IMPPScjs.shapeGeometryBounds.call(void 0, moved), () => ( { x: 0, y: 0 }));
|
|
5682
5682
|
return { offset: { x: Math.round(b.x), y: Math.round(b.y) }, bounds: this.getLayerBounds(id) };
|
|
5683
5683
|
}
|
|
5684
5684
|
if (layer.type === "type") {
|
|
5685
5685
|
const m = _nullishCoalesce(layer.transform, () => ( [1, 0, 0, 1, 0, 0]));
|
|
5686
5686
|
const dx = move.x !== void 0 ? move.x - m[4] : _nullishCoalesce(move.dx, () => ( 0));
|
|
5687
5687
|
const dy = move.y !== void 0 ? move.y - m[5] : _nullishCoalesce(move.dy, () => ( 0));
|
|
5688
|
-
if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0,
|
|
5689
|
-
|
|
5688
|
+
if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("x and y must be numbers.");
|
|
5689
|
+
_chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "position", "move it");
|
|
5690
5690
|
const mx = Math.round(dx);
|
|
5691
5691
|
const my = Math.round(dy);
|
|
5692
|
-
let moved = { ...
|
|
5692
|
+
let moved = { ..._chunkPA3IMPPScjs.transformTypeLayer.call(void 0, layer, [1, 0, 0, 1, mx, my]), surface: _chunkCWM3CUUXcjs.translateSurface.call(void 0, layer.surface, mx, my) };
|
|
5693
5693
|
const mask = layer.mask;
|
|
5694
5694
|
if (mask && mask.linked !== false && !mask.source && (mx || my)) moved = { ...moved, mask: { ...mask, surface: _chunkCWM3CUUXcjs.translateSurface.call(void 0, mask.surface, mx, my) } };
|
|
5695
5695
|
this.commitLayers(_chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, id, () => moved), void 0, commitToHistory);
|
|
@@ -5699,7 +5699,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5699
5699
|
const current = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
|
|
5700
5700
|
const x = _nullishCoalesce(move.x, () => ( current.x + (_nullishCoalesce(move.dx, () => ( 0)))));
|
|
5701
5701
|
const y = _nullishCoalesce(move.y, () => ( current.y + (_nullishCoalesce(move.dy, () => ( 0)))));
|
|
5702
|
-
const next =
|
|
5702
|
+
const next = _chunkPA3IMPPScjs.offsetLayer.call(void 0, this.state.layers, id, { x, y });
|
|
5703
5703
|
this.commitLayers(next, void 0, commitToHistory);
|
|
5704
5704
|
return { offset: { x: Math.round(x), y: Math.round(y) }, bounds: this.getLayerBounds(id) };
|
|
5705
5705
|
}
|
|
@@ -5709,11 +5709,11 @@ var ImageEditorController = (_class10 = class {
|
|
|
5709
5709
|
* target when the layer is active.
|
|
5710
5710
|
*/
|
|
5711
5711
|
addLayerMask(id, from = "reveal-all", props = {}) {
|
|
5712
|
-
const layer =
|
|
5712
|
+
const layer = _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id).layer;
|
|
5713
5713
|
let mask;
|
|
5714
5714
|
if (from === "selection") {
|
|
5715
5715
|
const sel = this.state.selection;
|
|
5716
|
-
if (!_optionalChain([sel, 'optionalAccess', _180 => _180.bounds])) throw new (0,
|
|
5716
|
+
if (!_optionalChain([sel, 'optionalAccess', _180 => _180.bounds])) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
|
|
5717
5717
|
mask = this.maskFromSelection(sel, props);
|
|
5718
5718
|
if (layer.type === "pixel" && (layer.offset.x || layer.offset.y)) {
|
|
5719
5719
|
mask = { ...mask, surface: _chunkCWM3CUUXcjs.translateSurface.call(void 0, mask.surface, -layer.offset.x, -layer.offset.y) };
|
|
@@ -5722,7 +5722,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5722
5722
|
const v = from === "reveal-all" ? 255 : 0;
|
|
5723
5723
|
mask = withMaskProps({ surface: _chunkCWM3CUUXcjs.emptySurface.call(void 0, 1, v), defaultValue: v }, props);
|
|
5724
5724
|
}
|
|
5725
|
-
const next =
|
|
5725
|
+
const next = _chunkPA3IMPPScjs.setLayerMask.call(void 0, this.state.layers, id, mask);
|
|
5726
5726
|
this.commitLayers(next, () => {
|
|
5727
5727
|
if (this.state.activeLayerId === id) this.state.activeTarget = "mask";
|
|
5728
5728
|
});
|
|
@@ -5730,18 +5730,18 @@ var ImageEditorController = (_class10 = class {
|
|
|
5730
5730
|
}
|
|
5731
5731
|
/** Removes a layer's mask (one undo step). */
|
|
5732
5732
|
removeLayerMask(id) {
|
|
5733
|
-
const layer =
|
|
5734
|
-
if (!layer.mask) throw new (0,
|
|
5735
|
-
this.commitLayers(
|
|
5733
|
+
const layer = _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id).layer;
|
|
5734
|
+
if (!layer.mask) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
|
|
5735
|
+
this.commitLayers(_chunkPA3IMPPScjs.setLayerMask.call(void 0, this.state.layers, id, null), () => {
|
|
5736
5736
|
if (this.state.activeLayerId === id) this.state.activeTarget = "pixels";
|
|
5737
5737
|
});
|
|
5738
5738
|
}
|
|
5739
5739
|
/** Changes any layer mask's density, feather, enabled or linked flag (pixels kept). Returns the mask. */
|
|
5740
5740
|
setLayerMaskProps(id, props, commitToHistory = true) {
|
|
5741
|
-
const layer =
|
|
5742
|
-
if (!layer.mask) throw new (0,
|
|
5741
|
+
const layer = _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id).layer;
|
|
5742
|
+
if (!layer.mask) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
|
|
5743
5743
|
const mask = withMaskProps(layer.mask, props);
|
|
5744
|
-
this.commitLayers(
|
|
5744
|
+
this.commitLayers(_chunkPA3IMPPScjs.setLayerMask.call(void 0, this.state.layers, id, mask), void 0, commitToHistory);
|
|
5745
5745
|
return mask;
|
|
5746
5746
|
}
|
|
5747
5747
|
/**
|
|
@@ -5749,11 +5749,11 @@ var ImageEditorController = (_class10 = class {
|
|
|
5749
5749
|
* the depth map) and removes the mask, as one undo step.
|
|
5750
5750
|
*/
|
|
5751
5751
|
async applyLayerMask(id) {
|
|
5752
|
-
const loc =
|
|
5752
|
+
const loc = _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id);
|
|
5753
5753
|
const layer = loc.layer;
|
|
5754
|
-
if (layer.type !== "pixel") throw new (0,
|
|
5755
|
-
if (!layer.mask) throw new (0,
|
|
5756
|
-
|
|
5754
|
+
if (layer.type !== "pixel") throw new (0, _chunkPA3IMPPScjs.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.`);
|
|
5755
|
+
if (!layer.mask) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
|
|
5756
|
+
_chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "pixels", "apply its mask");
|
|
5757
5757
|
const { width, height } = this.naturalSize;
|
|
5758
5758
|
await this.renderer.prepareLayerAssets([layer], width, height);
|
|
5759
5759
|
const sources = this.renderer.compositorSources(width, height);
|
|
@@ -5786,13 +5786,13 @@ var ImageEditorController = (_class10 = class {
|
|
|
5786
5786
|
*/
|
|
5787
5787
|
layerViaCopy(options = {}) {
|
|
5788
5788
|
const id = _nullishCoalesce(options.layerId, () => ( this.state.activeLayerId));
|
|
5789
|
-
if (!id) throw new (0,
|
|
5790
|
-
const loc =
|
|
5789
|
+
if (!id) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("No layer given and none is active; pass layerId (see list_layers).");
|
|
5790
|
+
const loc = _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id);
|
|
5791
5791
|
const layer = loc.layer;
|
|
5792
|
-
if (layer.type !== "pixel") throw new (0,
|
|
5792
|
+
if (layer.type !== "pixel") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
|
|
5793
5793
|
const sel = this.state.selection;
|
|
5794
|
-
if (!_optionalChain([sel, 'optionalAccess', _181 => _181.bounds])) throw new (0,
|
|
5795
|
-
if (options.cut)
|
|
5794
|
+
if (!_optionalChain([sel, 'optionalAccess', _181 => _181.bounds])) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
|
|
5795
|
+
if (options.cut) _chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
|
|
5796
5796
|
const surface = this.surfaceOf(layer);
|
|
5797
5797
|
const sb = sel.bounds;
|
|
5798
5798
|
const src = { x: sb.x - layer.offset.x, y: sb.y - layer.offset.y, width: sb.width, height: sb.height };
|
|
@@ -5808,7 +5808,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5808
5808
|
}
|
|
5809
5809
|
const copy = {
|
|
5810
5810
|
type: "pixel",
|
|
5811
|
-
id:
|
|
5811
|
+
id: _chunkPA3IMPPScjs.newLayerId.call(void 0, ),
|
|
5812
5812
|
name: _optionalChain([options, 'access', _182 => _182.name, 'optionalAccess', _183 => _183.trim, 'call', _184 => _184()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
|
|
5813
5813
|
visible: true,
|
|
5814
5814
|
opacity: 1,
|
|
@@ -5881,7 +5881,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5881
5881
|
* Refused while another transform is open.
|
|
5882
5882
|
*/
|
|
5883
5883
|
beginFreeTransform(init = {}) {
|
|
5884
|
-
if (this.getFreeTransform()) throw new (0,
|
|
5884
|
+
if (this.getFreeTransform()) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("A Free Transform is already open; commit or cancel it first.");
|
|
5885
5885
|
const session = new FreeTransformSession(this.transformHost(), init);
|
|
5886
5886
|
this.openTransform = session;
|
|
5887
5887
|
this.notify();
|
|
@@ -5895,26 +5895,26 @@ var ImageEditorController = (_class10 = class {
|
|
|
5895
5895
|
*/
|
|
5896
5896
|
transformLayer(spec) {
|
|
5897
5897
|
const given = [spec.matrix, spec.corners, spec.params].filter((v) => v !== void 0).length;
|
|
5898
|
-
if (given > 1) throw new (0,
|
|
5899
|
-
if (!given && spec.warp === void 0) throw new (0,
|
|
5898
|
+
if (given > 1) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give only one of matrix, corners and params.");
|
|
5899
|
+
if (!given && spec.warp === void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give matrix, corners or params (or a warp).");
|
|
5900
5900
|
if (spec.matrix && !(Array.isArray(spec.matrix) && spec.matrix.length === 6 && spec.matrix.every(Number.isFinite))) {
|
|
5901
|
-
throw new (0,
|
|
5901
|
+
throw new (0, _chunkPA3IMPPScjs.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).");
|
|
5902
5902
|
}
|
|
5903
5903
|
if (spec.matrix) {
|
|
5904
5904
|
const [a, b, c, d] = spec.matrix;
|
|
5905
|
-
if (Math.abs(a * d - b * c) < 1e-9) throw new (0,
|
|
5905
|
+
if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("matrix is singular (it collapses the layer to a line); its determinant a\xB7d \u2212 b\xB7c must not be 0.");
|
|
5906
5906
|
}
|
|
5907
5907
|
const session = this.beginFreeTransform(spec);
|
|
5908
5908
|
try {
|
|
5909
5909
|
const g = session.startGeometry;
|
|
5910
|
-
const corners = spec.matrix ? g.corners.map((p) =>
|
|
5910
|
+
const corners = spec.matrix ? g.corners.map((p) => _chunkJCXMJUQOcjs.applyMatrix.call(void 0, spec.matrix, p)) : spec.corners ? spec.corners : spec.params ? _chunkPA3IMPPScjs.applyParams.call(void 0, g, spec.params) : g.corners;
|
|
5911
5911
|
let warp = spec.warp === void 0 ? _nullishCoalesce(g.warp, () => ( null)) : null;
|
|
5912
5912
|
if (spec.warp) {
|
|
5913
5913
|
if ("style" in spec.warp) {
|
|
5914
|
-
if (!
|
|
5915
|
-
warp =
|
|
5914
|
+
if (!_chunkJCXMJUQOcjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkJCXMJUQOcjs.WARP_STYLES.join(", ")}.`);
|
|
5915
|
+
warp = _chunkPA3IMPPScjs.presetWarp.call(void 0, session.box, spec.warp);
|
|
5916
5916
|
} else {
|
|
5917
|
-
if (!
|
|
5917
|
+
if (!_chunkPA3IMPPScjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkPA3IMPPScjs.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.");
|
|
5918
5918
|
warp = spec.warp;
|
|
5919
5919
|
}
|
|
5920
5920
|
}
|
|
@@ -5927,10 +5927,10 @@ var ImageEditorController = (_class10 = class {
|
|
|
5927
5927
|
}
|
|
5928
5928
|
/** Flips the layer (or its selected pixels, or the outline) about the frame's centre, exactly (one undo step). */
|
|
5929
5929
|
flipLayer(axis, init = {}) {
|
|
5930
|
-
if (axis !== "horizontal" && axis !== "vertical") throw new (0,
|
|
5930
|
+
if (axis !== "horizontal" && axis !== "vertical") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`axis must be horizontal or vertical, got "${String(axis)}".`);
|
|
5931
5931
|
const session = this.beginFreeTransform({ interpolation: "nearest", ...init });
|
|
5932
5932
|
try {
|
|
5933
|
-
session.update({ corners:
|
|
5933
|
+
session.update({ corners: _chunkPA3IMPPScjs.flipCorners.call(void 0, session.startGeometry, axis) }, false);
|
|
5934
5934
|
return session.commit();
|
|
5935
5935
|
} catch (e) {
|
|
5936
5936
|
session.cancel();
|
|
@@ -5942,16 +5942,16 @@ var ImageEditorController = (_class10 = class {
|
|
|
5942
5942
|
* centre, snapped so pixels land on whole pixels: exact, no resampling (one undo step).
|
|
5943
5943
|
*/
|
|
5944
5944
|
rotateLayer90(turn, init = {}) {
|
|
5945
|
-
if (turn !== 90 && turn !== -90 && turn !== 180) throw new (0,
|
|
5945
|
+
if (turn !== 90 && turn !== -90 && turn !== 180) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`turn must be 90, -90 or 180, got ${String(turn)}.`);
|
|
5946
5946
|
const session = this.beginFreeTransform({ interpolation: "nearest", ...init });
|
|
5947
5947
|
try {
|
|
5948
|
-
const b = session.smartObject || session.typeLayer ? _nullishCoalesce(
|
|
5948
|
+
const b = session.smartObject || session.typeLayer ? _nullishCoalesce(_chunkPA3IMPPScjs.transformedBox.call(void 0, session.startGeometry), () => ( session.box)) : session.box;
|
|
5949
5949
|
const cx = b.x + b.width / 2;
|
|
5950
5950
|
const cy = b.y + b.height / 2;
|
|
5951
5951
|
const ox = turn === 180 ? 0 : Math.round(cx - b.height / 2) - (cx - b.height / 2);
|
|
5952
5952
|
const oy = turn === 180 ? 0 : Math.round(cy - b.width / 2) - (cy - b.width / 2);
|
|
5953
5953
|
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];
|
|
5954
|
-
session.update({ corners: session.startGeometry.corners.map((p) =>
|
|
5954
|
+
session.update({ corners: session.startGeometry.corners.map((p) => _chunkJCXMJUQOcjs.applyMatrix.call(void 0, m, p)) }, false);
|
|
5955
5955
|
return session.commit();
|
|
5956
5956
|
} catch (e) {
|
|
5957
5957
|
session.cancel();
|
|
@@ -5960,20 +5960,20 @@ var ImageEditorController = (_class10 = class {
|
|
|
5960
5960
|
}
|
|
5961
5961
|
/** Adds a `develop` or `blur` filter to a pixel layer (one undo step). Returns the layer's filters. */
|
|
5962
5962
|
addLayerFilter(id, filter) {
|
|
5963
|
-
const f =
|
|
5964
|
-
const next =
|
|
5963
|
+
const f = _chunkPA3IMPPScjs.normalizeFilter.call(void 0, filter);
|
|
5964
|
+
const next = _chunkPA3IMPPScjs.addLayerFilter.call(void 0, this.state.layers, id, f);
|
|
5965
5965
|
this.commitLayers(next);
|
|
5966
5966
|
return _nullishCoalesce(_chunkHGTDMKNEcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
|
|
5967
5967
|
}
|
|
5968
5968
|
/** Changes one filter (one undo step, or none with `commitToHistory = false` during a drag). Returns the filters. */
|
|
5969
5969
|
updateLayerFilter(id, filterId, changes, commitToHistory = true) {
|
|
5970
|
-
const next =
|
|
5970
|
+
const next = _chunkPA3IMPPScjs.updateLayerFilter.call(void 0, this.state.layers, id, filterId, changes);
|
|
5971
5971
|
this.commitLayers(next, void 0, commitToHistory);
|
|
5972
5972
|
return _nullishCoalesce(_chunkHGTDMKNEcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
|
|
5973
5973
|
}
|
|
5974
5974
|
/** Removes one filter (one undo step). Returns the remaining filters. */
|
|
5975
5975
|
removeLayerFilter(id, filterId) {
|
|
5976
|
-
const next =
|
|
5976
|
+
const next = _chunkPA3IMPPScjs.removeLayerFilter.call(void 0, this.state.layers, id, filterId);
|
|
5977
5977
|
this.commitLayers(next);
|
|
5978
5978
|
return _nullishCoalesce(_chunkHGTDMKNEcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
|
|
5979
5979
|
}
|
|
@@ -5989,8 +5989,8 @@ var ImageEditorController = (_class10 = class {
|
|
|
5989
5989
|
*/
|
|
5990
5990
|
convertToSmartObject(ids, options = {}) {
|
|
5991
5991
|
const list = _optionalChain([ids, 'optionalAccess', _190 => _190.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
|
|
5992
|
-
if (!list.length) throw new (0,
|
|
5993
|
-
const res =
|
|
5992
|
+
if (!list.length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
|
|
5993
|
+
const res = _chunkPA3IMPPScjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
|
|
5994
5994
|
this.commitLayers(res.layers, () => {
|
|
5995
5995
|
this.state.activeLayerId = res.layer.id;
|
|
5996
5996
|
this.state.activeTarget = "pixels";
|
|
@@ -5999,7 +5999,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
5999
5999
|
}
|
|
6000
6000
|
/** Layer › Smart Objects › Rasterize (one undo step): the smart object becomes a pixel layer holding what it renders. */
|
|
6001
6001
|
rasterizeSmartObject(id) {
|
|
6002
|
-
const res =
|
|
6002
|
+
const res = _chunkPA3IMPPScjs.rasterizeSmartObject.call(void 0, this.state.layers, id);
|
|
6003
6003
|
this.commitLayers(res.layers, () => {
|
|
6004
6004
|
if (this.state.activeLayerId === id && this.state.activeTarget === "filter-mask") this.state.activeTarget = "pixels";
|
|
6005
6005
|
});
|
|
@@ -6007,10 +6007,10 @@ var ImageEditorController = (_class10 = class {
|
|
|
6007
6007
|
}
|
|
6008
6008
|
/** A smart object's contents, placement and smart filters as plain data (see `SmartObjectInfo`). */
|
|
6009
6009
|
getSmartObject(id) {
|
|
6010
|
-
const layer =
|
|
6010
|
+
const layer = _chunkPA3IMPPScjs.requireSmartObject.call(void 0, this.state.layers, id);
|
|
6011
6011
|
const c = layer.contents;
|
|
6012
|
-
const g =
|
|
6013
|
-
const readout =
|
|
6012
|
+
const g = _chunkPA3IMPPScjs.placementGeometry.call(void 0, layer);
|
|
6013
|
+
const readout = _chunkPA3IMPPScjs.describeTransform.call(void 0, g);
|
|
6014
6014
|
const stack = layer.smartFilters;
|
|
6015
6015
|
return {
|
|
6016
6016
|
layerId: layer.id,
|
|
@@ -6020,10 +6020,10 @@ var ImageEditorController = (_class10 = class {
|
|
|
6020
6020
|
kind: c.kind,
|
|
6021
6021
|
width: c.width,
|
|
6022
6022
|
height: c.height,
|
|
6023
|
-
decoded:
|
|
6023
|
+
decoded: _chunkPA3IMPPScjs.isContentsDecoded.call(void 0, c),
|
|
6024
6024
|
fileType: _nullishCoalesce(_optionalChain([c, 'access', _191 => _191.file, 'optionalAccess', _192 => _192.type]), () => ( null)),
|
|
6025
6025
|
linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _193 => _193.linked, 'optionalAccess', _194 => _194.path]), () => ( null)),
|
|
6026
|
-
instances:
|
|
6026
|
+
instances: _chunkPA3IMPPScjs.instancesOf.call(void 0, this.state.layers, c.id),
|
|
6027
6027
|
layerCount: c.document ? _chunkHGTDMKNEcjs.flattenLayers.call(void 0, c.document.layers).length : 0
|
|
6028
6028
|
},
|
|
6029
6029
|
placement: {
|
|
@@ -6035,8 +6035,8 @@ var ImageEditorController = (_class10 = class {
|
|
|
6035
6035
|
scaleY: readout.scaleY,
|
|
6036
6036
|
rotate: readout.rotate,
|
|
6037
6037
|
skewX: readout.skewX,
|
|
6038
|
-
center:
|
|
6039
|
-
bounds:
|
|
6038
|
+
center: _chunkPA3IMPPScjs.anchorPoint.call(void 0, g, "center"),
|
|
6039
|
+
bounds: _chunkPA3IMPPScjs.transformedBox.call(void 0, g)
|
|
6040
6040
|
},
|
|
6041
6041
|
smartFilters: {
|
|
6042
6042
|
enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _195 => _195.enabled]), () => ( true)),
|
|
@@ -6053,7 +6053,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6053
6053
|
* change. Returns the new placement summary.
|
|
6054
6054
|
*/
|
|
6055
6055
|
setSmartObjectPlacement(id, placement, commitToHistory = true) {
|
|
6056
|
-
const res =
|
|
6056
|
+
const res = _chunkPA3IMPPScjs.setSmartPlacement.call(void 0, this.state.layers, id, placement, this.canvasSize);
|
|
6057
6057
|
this.commitLayers(res.layers, void 0, commitToHistory);
|
|
6058
6058
|
return { ...this.getSmartObject(id).placement, masksMoved: res.masksMoved };
|
|
6059
6059
|
}
|
|
@@ -6066,23 +6066,23 @@ var ImageEditorController = (_class10 = class {
|
|
|
6066
6066
|
* nothing is relative to the current transform.
|
|
6067
6067
|
*/
|
|
6068
6068
|
setSmartObjectTransform(id, spec) {
|
|
6069
|
-
const layer =
|
|
6070
|
-
const g =
|
|
6069
|
+
const layer = _chunkPA3IMPPScjs.requireSmartObject.call(void 0, this.state.layers, id);
|
|
6070
|
+
const g = _chunkPA3IMPPScjs.placementGeometry.call(void 0, layer);
|
|
6071
6071
|
const numeric = ["scaleX", "scaleY", "rotate", "skewX", "skewY", "x", "y"].filter((k) => spec[k] !== void 0);
|
|
6072
6072
|
const ways = [spec.corners !== void 0, spec.matrix !== void 0, numeric.length > 0].filter(Boolean).length;
|
|
6073
|
-
if (ways > 1) throw new (0,
|
|
6073
|
+
if (ways > 1) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give the transform only one way: corners, matrix, or the numbers (scaleX, scaleY, rotate, skewX, skewY, x, y).");
|
|
6074
6074
|
let corners = g.corners;
|
|
6075
6075
|
if (spec.corners) corners = spec.corners;
|
|
6076
6076
|
else if (spec.matrix) {
|
|
6077
|
-
if (!(Array.isArray(spec.matrix) && spec.matrix.length === 6 && spec.matrix.every(Number.isFinite))) throw new (0,
|
|
6077
|
+
if (!(Array.isArray(spec.matrix) && spec.matrix.length === 6 && spec.matrix.every(Number.isFinite))) throw new (0, _chunkPA3IMPPScjs.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).");
|
|
6078
6078
|
const [a, b, c, d] = spec.matrix;
|
|
6079
|
-
if (Math.abs(a * d - b * c) < 1e-9) throw new (0,
|
|
6080
|
-
corners =
|
|
6079
|
+
if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("matrix is singular (it collapses the contents to a line); a\xB7d \u2212 b\xB7c must not be 0.");
|
|
6080
|
+
corners = _chunkPA3IMPPScjs.cornersFromMatrix.call(void 0, g.box, spec.matrix);
|
|
6081
6081
|
} else if (numeric.length) {
|
|
6082
|
-
if (spec.scaleX === 0 || spec.scaleY === 0) throw new (0,
|
|
6083
|
-
for (const k of numeric) if (!Number.isFinite(spec[k])) throw new (0,
|
|
6084
|
-
const now =
|
|
6085
|
-
const centre =
|
|
6082
|
+
if (spec.scaleX === 0 || spec.scaleY === 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the contents to a line).");
|
|
6083
|
+
for (const k of numeric) if (!Number.isFinite(spec[k])) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`${k} must be a finite number.`);
|
|
6084
|
+
const now = _chunkPA3IMPPScjs.describeTransform.call(void 0, g);
|
|
6085
|
+
const centre = _chunkPA3IMPPScjs.anchorPoint.call(void 0, g, "center");
|
|
6086
6086
|
const params = {
|
|
6087
6087
|
scaleX: _nullishCoalesce(spec.scaleX, () => ( (now.affine ? now.scaleX : 100))),
|
|
6088
6088
|
scaleY: _nullishCoalesce(spec.scaleY, () => ( (now.affine ? now.scaleY : 100))),
|
|
@@ -6090,20 +6090,20 @@ var ImageEditorController = (_class10 = class {
|
|
|
6090
6090
|
skewX: _nullishCoalesce(spec.skewX, () => ( (now.affine ? now.skewX : 0))),
|
|
6091
6091
|
skewY: _nullishCoalesce(spec.skewY, () => ( 0))
|
|
6092
6092
|
};
|
|
6093
|
-
const m =
|
|
6093
|
+
const m = _chunkPA3IMPPScjs.matrixFromParams.call(void 0, g.box, { ...params, reference: "center" });
|
|
6094
6094
|
const cx = g.box.width / 2;
|
|
6095
6095
|
const cy = g.box.height / 2;
|
|
6096
6096
|
const to = { x: _nullishCoalesce(spec.x, () => ( centre.x)), y: _nullishCoalesce(spec.y, () => ( centre.y)) };
|
|
6097
|
-
corners =
|
|
6097
|
+
corners = _chunkPA3IMPPScjs.cornersFromMatrix.call(void 0, g.box, _chunkJCXMJUQOcjs.multiplyMatrices.call(void 0, m, _chunkJCXMJUQOcjs.translateMatrix.call(void 0, to.x - cx, to.y - cy)));
|
|
6098
6098
|
}
|
|
6099
6099
|
let warp = _nullishCoalesce(layer.placement.warp, () => ( null));
|
|
6100
6100
|
if (spec.warp === null) warp = null;
|
|
6101
6101
|
else if (spec.warp) {
|
|
6102
6102
|
if ("style" in spec.warp) {
|
|
6103
|
-
if (!
|
|
6104
|
-
warp =
|
|
6103
|
+
if (!_chunkJCXMJUQOcjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkJCXMJUQOcjs.WARP_STYLES.join(", ")}.`);
|
|
6104
|
+
warp = _chunkPA3IMPPScjs.presetWarp.call(void 0, g.box, spec.warp);
|
|
6105
6105
|
} else {
|
|
6106
|
-
if (!
|
|
6106
|
+
if (!_chunkPA3IMPPScjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkPA3IMPPScjs.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.");
|
|
6107
6107
|
warp = spec.warp;
|
|
6108
6108
|
}
|
|
6109
6109
|
}
|
|
@@ -6117,16 +6117,16 @@ var ImageEditorController = (_class10 = class {
|
|
|
6117
6117
|
* the layers that changed.
|
|
6118
6118
|
*/
|
|
6119
6119
|
replaceSmartObjectContents(id, source) {
|
|
6120
|
-
const layer =
|
|
6120
|
+
const layer = _chunkPA3IMPPScjs.requireSmartObject.call(void 0, this.state.layers, id);
|
|
6121
6121
|
let contents;
|
|
6122
6122
|
if ("contents" in source) contents = source.contents;
|
|
6123
|
-
else if ("pixels" in source) contents =
|
|
6123
|
+
else if ("pixels" in source) contents = _chunkPA3IMPPScjs.rasterContents.call(void 0, source.pixels, _nullishCoalesce(source.name, () => ( layer.contents.name.replace(/\.\w+$/, ".png"))));
|
|
6124
6124
|
else {
|
|
6125
|
-
const psd =
|
|
6126
|
-
contents =
|
|
6125
|
+
const psd = _chunkPA3IMPPScjs.importPsd.call(void 0, source.psd, { newId: () => _chunkPA3IMPPScjs.newLayerId.call(void 0, ) });
|
|
6126
|
+
contents = _chunkPA3IMPPScjs.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`)));
|
|
6127
6127
|
contents.file = { bytes: source.psd.slice(), type: psd.info.psb ? "psb" : "psd" };
|
|
6128
6128
|
}
|
|
6129
|
-
const res =
|
|
6129
|
+
const res = _chunkPA3IMPPScjs.replaceContents.call(void 0, this.state.layers, layer.contents.id, contents, this.canvasSize);
|
|
6130
6130
|
this.commitLayers(res.layers);
|
|
6131
6131
|
return { contentsId: layer.contents.id, width: contents.width, height: contents.height, layerIds: res.ids };
|
|
6132
6132
|
}
|
|
@@ -6141,16 +6141,16 @@ var ImageEditorController = (_class10 = class {
|
|
|
6141
6141
|
* and bytes.
|
|
6142
6142
|
*/
|
|
6143
6143
|
exportSmartObjectContents(id) {
|
|
6144
|
-
const layer =
|
|
6144
|
+
const layer = _chunkPA3IMPPScjs.requireSmartObject.call(void 0, this.state.layers, id);
|
|
6145
6145
|
const c = layer.contents;
|
|
6146
6146
|
const base = c.name.replace(/\.\w+$/, "") || "Contents";
|
|
6147
6147
|
if (c.file) {
|
|
6148
|
-
const mime = { psd: "image/vnd.adobe.photoshop", psb: "image/vnd.adobe.photoshop", pdf: "application/pdf", ...
|
|
6148
|
+
const mime = { psd: "image/vnd.adobe.photoshop", psb: "image/vnd.adobe.photoshop", pdf: "application/pdf", ..._chunkPA3IMPPScjs.BROWSER_IMAGE_TYPES };
|
|
6149
6149
|
const ext = c.file.type.toLowerCase();
|
|
6150
6150
|
return { name: /\.\w+$/.test(c.name) ? c.name : `${base}.${ext}`, mimeType: _nullishCoalesce(mime[ext], () => ( "application/octet-stream")), bytes: c.file.bytes };
|
|
6151
6151
|
}
|
|
6152
|
-
if (!
|
|
6153
|
-
const f =
|
|
6152
|
+
if (!_chunkPA3IMPPScjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`The contents of "${layer.name || id}" are not available here.`);
|
|
6153
|
+
const f = _chunkPA3IMPPScjs.smartContentsFile.call(void 0, c);
|
|
6154
6154
|
return { name: f.name, mimeType: f.name.endsWith(".png") ? "image/png" : "image/vnd.adobe.photoshop", bytes: f.bytes };
|
|
6155
6155
|
}
|
|
6156
6156
|
/**
|
|
@@ -6159,7 +6159,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6159
6159
|
* undo step. Returns the copy's id.
|
|
6160
6160
|
*/
|
|
6161
6161
|
copySmartObject(id, linked = false, name) {
|
|
6162
|
-
const res =
|
|
6162
|
+
const res = _chunkPA3IMPPScjs.copySmartObject.call(void 0, this.state.layers, id, linked, name);
|
|
6163
6163
|
this.commitLayers(res.layers, () => {
|
|
6164
6164
|
this.state.activeLayerId = res.layer.id;
|
|
6165
6165
|
this.state.activeTarget = "pixels";
|
|
@@ -6168,31 +6168,31 @@ var ImageEditorController = (_class10 = class {
|
|
|
6168
6168
|
}
|
|
6169
6169
|
/** Adds a smart filter (`develop` or `blur`, with `blend` and `opacity`) at `index` (default the top), as one undo step. */
|
|
6170
6170
|
addSmartFilter(id, filter, index) {
|
|
6171
|
-
const res =
|
|
6171
|
+
const res = _chunkPA3IMPPScjs.addSmartFilter.call(void 0, this.state.layers, id, _chunkPA3IMPPScjs.normalizeSmartFilter.call(void 0, filter), this.canvasSize, index);
|
|
6172
6172
|
this.commitLayers(res.layers);
|
|
6173
6173
|
return res.filter;
|
|
6174
6174
|
}
|
|
6175
6175
|
/** Changes one smart filter (one undo step, or none with `commitToHistory = false` during a drag). */
|
|
6176
6176
|
updateSmartFilter(id, filterId, changes, commitToHistory = true) {
|
|
6177
|
-
const res =
|
|
6177
|
+
const res = _chunkPA3IMPPScjs.updateSmartFilter.call(void 0, this.state.layers, id, filterId, changes, this.canvasSize);
|
|
6178
6178
|
this.commitLayers(res.layers, void 0, commitToHistory);
|
|
6179
6179
|
return res.filter;
|
|
6180
6180
|
}
|
|
6181
6181
|
/** Removes one smart filter (one undo step). Returns the remaining filters. */
|
|
6182
6182
|
removeSmartFilter(id, filterId) {
|
|
6183
|
-
const res =
|
|
6183
|
+
const res = _chunkPA3IMPPScjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
|
|
6184
6184
|
this.commitLayers(res.layers);
|
|
6185
6185
|
return _nullishCoalesce(_optionalChain([res, 'access', _198 => _198.layer, 'access', _199 => _199.smartFilters, 'optionalAccess', _200 => _200.filters]), () => ( []));
|
|
6186
6186
|
}
|
|
6187
6187
|
/** Moves one smart filter to `index` (0 = bottom, applied first), as one undo step. Returns the filters. */
|
|
6188
6188
|
moveSmartFilter(id, filterId, index) {
|
|
6189
|
-
const res =
|
|
6189
|
+
const res = _chunkPA3IMPPScjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
|
|
6190
6190
|
this.commitLayers(res.layers);
|
|
6191
6191
|
return _nullishCoalesce(_optionalChain([res, 'access', _201 => _201.layer, 'access', _202 => _202.smartFilters, 'optionalAccess', _203 => _203.filters]), () => ( []));
|
|
6192
6192
|
}
|
|
6193
6193
|
/** Turns a smart object's whole filter stack on or off (one undo step). */
|
|
6194
6194
|
setSmartFiltersEnabled(id, enabled) {
|
|
6195
|
-
const res =
|
|
6195
|
+
const res = _chunkPA3IMPPScjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
|
|
6196
6196
|
this.commitLayers(res.layers);
|
|
6197
6197
|
return _nullishCoalesce(_optionalChain([res, 'access', _204 => _204.layer, 'access', _205 => _205.smartFilters, 'optionalAccess', _206 => _206.enabled]), () => ( true));
|
|
6198
6198
|
}
|
|
@@ -6202,21 +6202,21 @@ var ImageEditorController = (_class10 = class {
|
|
|
6202
6202
|
* Painting it targets channel `filter-mask`. Returns the mask, or `null` when removed.
|
|
6203
6203
|
*/
|
|
6204
6204
|
setSmartFilterMask(id, from, props = {}, commitToHistory = true) {
|
|
6205
|
-
const layer =
|
|
6205
|
+
const layer = _chunkPA3IMPPScjs.requireSmartObject.call(void 0, this.state.layers, id);
|
|
6206
6206
|
let mask;
|
|
6207
6207
|
if (from === "none") mask = null;
|
|
6208
6208
|
else if (from === "keep") {
|
|
6209
|
-
if (!_optionalChain([layer, 'access', _207 => _207.smartFilters, 'optionalAccess', _208 => _208.mask])) throw new (0,
|
|
6209
|
+
if (!_optionalChain([layer, 'access', _207 => _207.smartFilters, 'optionalAccess', _208 => _208.mask])) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
|
|
6210
6210
|
mask = withMaskProps(layer.smartFilters.mask, props);
|
|
6211
6211
|
} else if (from === "selection") {
|
|
6212
6212
|
const sel = this.state.selection;
|
|
6213
|
-
if (!_optionalChain([sel, 'optionalAccess', _209 => _209.bounds])) throw new (0,
|
|
6213
|
+
if (!_optionalChain([sel, 'optionalAccess', _209 => _209.bounds])) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
|
|
6214
6214
|
mask = this.maskFromSelection(sel, props);
|
|
6215
6215
|
} else {
|
|
6216
6216
|
const v = from === "reveal-all" ? 255 : 0;
|
|
6217
6217
|
mask = withMaskProps({ surface: _chunkCWM3CUUXcjs.emptySurface.call(void 0, 1, v), defaultValue: v }, props);
|
|
6218
6218
|
}
|
|
6219
|
-
const res =
|
|
6219
|
+
const res = _chunkPA3IMPPScjs.setSmartFilterMask.call(void 0, this.state.layers, id, mask, this.canvasSize);
|
|
6220
6220
|
this.commitLayers(res.layers, () => {
|
|
6221
6221
|
if (this.state.activeLayerId !== id) return;
|
|
6222
6222
|
if (mask && from !== "keep") this.state.activeTarget = "filter-mask";
|
|
@@ -6232,14 +6232,14 @@ var ImageEditorController = (_class10 = class {
|
|
|
6232
6232
|
async prepareSmartObjects() {
|
|
6233
6233
|
const pending = /* @__PURE__ */ new Map();
|
|
6234
6234
|
for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers)) {
|
|
6235
|
-
if (l.type === "smart" && !
|
|
6235
|
+
if (l.type === "smart" && !_chunkPA3IMPPScjs.isContentsDecoded.call(void 0, l.contents) && l.contents.file && _chunkPA3IMPPScjs.BROWSER_IMAGE_TYPES[l.contents.file.type]) pending.set(l.contents.id, l.contents);
|
|
6236
6236
|
}
|
|
6237
6237
|
const left = [];
|
|
6238
6238
|
for (const [cid, c] of pending) {
|
|
6239
6239
|
try {
|
|
6240
|
-
const url = `data:${
|
|
6240
|
+
const url = `data:${_chunkPA3IMPPScjs.BROWSER_IMAGE_TYPES[c.file.type]};base64,${_chunkCWM3CUUXcjs.bytesToBase64.call(void 0, c.file.bytes)}`;
|
|
6241
6241
|
const px2 = await this.decodeImage(url);
|
|
6242
|
-
const decoded = { ...c, kind: "raster", raster:
|
|
6242
|
+
const decoded = { ...c, kind: "raster", raster: _chunkPA3IMPPScjs.rasterContents.call(void 0, px2, c.name, cid).raster, width: px2.width, height: px2.height };
|
|
6243
6243
|
const swap = (layers) => {
|
|
6244
6244
|
let out = layers;
|
|
6245
6245
|
for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers)) if (l.type === "smart" && l.contents.id === cid) out = _chunkHGTDMKNEcjs.mapLayer.call(void 0, out, l.id, (x) => ({ ...x, contents: decoded }));
|
|
@@ -6267,10 +6267,10 @@ var ImageEditorController = (_class10 = class {
|
|
|
6267
6267
|
* Contents can nest. Returns the contents' size and layer ids.
|
|
6268
6268
|
*/
|
|
6269
6269
|
editSmartObjectContents(id) {
|
|
6270
|
-
if (this.getFreeTransform()) throw new (0,
|
|
6271
|
-
const layer =
|
|
6270
|
+
if (this.getFreeTransform()) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
|
|
6271
|
+
const layer = _chunkPA3IMPPScjs.requireSmartObject.call(void 0, this.state.layers, id);
|
|
6272
6272
|
const c = layer.contents;
|
|
6273
|
-
if (!
|
|
6273
|
+
if (!_chunkPA3IMPPScjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _213 => _213.file, 'optionalAccess', _214 => _214.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
|
|
6274
6274
|
const saved = {
|
|
6275
6275
|
state: { ...this.state },
|
|
6276
6276
|
undo: this.undoStack,
|
|
@@ -6281,7 +6281,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6281
6281
|
samplePixelsOverride: this.samplePixelsOverride,
|
|
6282
6282
|
psdResolution: this.psdResolution
|
|
6283
6283
|
};
|
|
6284
|
-
const layers = c.kind === "document" ? c.document.layers : [{ type: "pixel", id:
|
|
6284
|
+
const layers = c.kind === "document" ? c.document.layers : [{ type: "pixel", id: _chunkPA3IMPPScjs.newLayerId.call(void 0, ), name: "Layer 0", visible: true, opacity: 1, blend: "normal", surface: c.raster, offset: { x: 0, y: 0 } }];
|
|
6285
6285
|
this.contentsStack.push({ layerId: layer.id, contentsId: c.id, name: layer.name || c.name, saved });
|
|
6286
6286
|
const s = this.state;
|
|
6287
6287
|
this.state = {
|
|
@@ -6289,7 +6289,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6289
6289
|
sourceUrl: null,
|
|
6290
6290
|
imageDimensions: { width: c.width, height: c.height },
|
|
6291
6291
|
crop: null,
|
|
6292
|
-
transform: { ...
|
|
6292
|
+
transform: { ..._chunkPA3IMPPScjs.DEFAULT_TRANSFORM_VALUES },
|
|
6293
6293
|
layers,
|
|
6294
6294
|
activeLayerId: layers.length ? layers[layers.length - 1].id : null,
|
|
6295
6295
|
activeTarget: "pixels",
|
|
@@ -6322,7 +6322,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6322
6322
|
*/
|
|
6323
6323
|
closeSmartObjectContents(save = true) {
|
|
6324
6324
|
const top = this.contentsStack.pop();
|
|
6325
|
-
if (!top) throw new (0,
|
|
6325
|
+
if (!top) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
|
|
6326
6326
|
if (_optionalChain([this, 'access', _220 => _220.openTransform, 'optionalAccess', _221 => _221.isOpen])) this.openTransform.cancel();
|
|
6327
6327
|
this.openTransform = null;
|
|
6328
6328
|
const edited = this.state;
|
|
@@ -6336,10 +6336,10 @@ var ImageEditorController = (_class10 = class {
|
|
|
6336
6336
|
const plain3 = _optionalChain([only, 'optionalAccess', _224 => _224.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _225 => _225.filters, 'optionalAccess', _226 => _226.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
|
|
6337
6337
|
if (_optionalChain([old, 'optionalAccess', _227 => _227.kind]) === "raster" && plain3) {
|
|
6338
6338
|
const px2 = _chunkCWM3CUUXcjs.readRegion.call(void 0, only.surface, { x: -only.offset.x, y: -only.offset.y, width, height });
|
|
6339
|
-
next =
|
|
6339
|
+
next = _chunkPA3IMPPScjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
|
|
6340
6340
|
} else {
|
|
6341
6341
|
const doc = { layers: edited.layers, globalLight: edited.globalLight, patterns: edited.patterns };
|
|
6342
|
-
next =
|
|
6342
|
+
next = _chunkPA3IMPPScjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _228 => _228.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _229 => _229.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
|
|
6343
6343
|
}
|
|
6344
6344
|
}
|
|
6345
6345
|
const saved = top.saved;
|
|
@@ -6358,7 +6358,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6358
6358
|
this.notify();
|
|
6359
6359
|
return { layerId: top.layerId, changed: false, layerIds: [] };
|
|
6360
6360
|
}
|
|
6361
|
-
const res =
|
|
6361
|
+
const res = _chunkPA3IMPPScjs.replaceContents.call(void 0, this.state.layers, top.contentsId, next, this.canvasSize);
|
|
6362
6362
|
this.commitLayers(res.layers);
|
|
6363
6363
|
return { layerId: top.layerId, changed: true, layerIds: res.ids };
|
|
6364
6364
|
}
|
|
@@ -6373,35 +6373,35 @@ var ImageEditorController = (_class10 = class {
|
|
|
6373
6373
|
// --- Layer effects ---
|
|
6374
6374
|
/** A layer's effects (an empty, enabled list when it has none). */
|
|
6375
6375
|
getLayerEffects(id) {
|
|
6376
|
-
return
|
|
6376
|
+
return _chunkPA3IMPPScjs.layerEffectsOf.call(void 0, _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id).layer);
|
|
6377
6377
|
}
|
|
6378
6378
|
/**
|
|
6379
6379
|
* Adds an effect of `kind` with Photoshop's defaults and `params` applied (one undo step), at
|
|
6380
6380
|
* `index` in the layer's effect list (default the end). Returns the new effect and the effects.
|
|
6381
6381
|
*/
|
|
6382
6382
|
addLayerEffect(id, kind, params = {}, index) {
|
|
6383
|
-
const res =
|
|
6383
|
+
const res = _chunkPA3IMPPScjs.addLayerEffect.call(void 0, this.state.layers, id, kind, params, index);
|
|
6384
6384
|
this.commitLayers(res.layers);
|
|
6385
6385
|
return { effect: res.effect, effects: this.getLayerEffects(id) };
|
|
6386
6386
|
}
|
|
6387
6387
|
/** Changes one effect (one undo step, or none with `commitToHistory = false` during a drag). Returns the effects. */
|
|
6388
6388
|
updateLayerEffect(id, effectId, changes, commitToHistory = true) {
|
|
6389
|
-
this.commitLayers(
|
|
6389
|
+
this.commitLayers(_chunkPA3IMPPScjs.updateLayerEffect.call(void 0, this.state.layers, id, effectId, changes), void 0, commitToHistory);
|
|
6390
6390
|
return this.getLayerEffects(id);
|
|
6391
6391
|
}
|
|
6392
6392
|
/** Removes one effect (one undo step). Returns the remaining effects. */
|
|
6393
6393
|
removeLayerEffect(id, effectId) {
|
|
6394
|
-
this.commitLayers(
|
|
6394
|
+
this.commitLayers(_chunkPA3IMPPScjs.removeLayerEffect.call(void 0, this.state.layers, id, effectId));
|
|
6395
6395
|
return this.getLayerEffects(id);
|
|
6396
6396
|
}
|
|
6397
6397
|
/** Turns a layer's effects on or off as a whole and, when given, sets Scale Effects (one undo step). */
|
|
6398
6398
|
setLayerEffectsEnabled(id, enabled, scale, commitToHistory = true) {
|
|
6399
|
-
this.commitLayers(
|
|
6399
|
+
this.commitLayers(_chunkPA3IMPPScjs.setLayerEffectsEnabled.call(void 0, this.state.layers, id, enabled, scale), void 0, commitToHistory);
|
|
6400
6400
|
return this.getLayerEffects(id);
|
|
6401
6401
|
}
|
|
6402
6402
|
/** Replaces a layer's effects (one undo step; `null` removes them). Returns the effects. */
|
|
6403
6403
|
setLayerEffects(id, effects, commitToHistory = true) {
|
|
6404
|
-
this.commitLayers(
|
|
6404
|
+
this.commitLayers(_chunkPA3IMPPScjs.setLayerEffects.call(void 0, this.state.layers, id, effects), void 0, commitToHistory);
|
|
6405
6405
|
return this.getLayerEffects(id);
|
|
6406
6406
|
}
|
|
6407
6407
|
__init86() {this.patternIds = /* @__PURE__ */ new WeakMap()}
|
|
@@ -6427,8 +6427,8 @@ var ImageEditorController = (_class10 = class {
|
|
|
6427
6427
|
/** Sets the global light (one undo step). `angle` -360..360°, `altitude` 0..90°. Returns it. */
|
|
6428
6428
|
setGlobalLight(light, commitToHistory = true) {
|
|
6429
6429
|
const next = { ...this.getGlobalLight(), ...light };
|
|
6430
|
-
if (!(Number.isFinite(next.angle) && next.angle >= -360 && next.angle <= 360)) throw new (0,
|
|
6431
|
-
if (!(Number.isFinite(next.altitude) && next.altitude >= 0 && next.altitude <= 90)) throw new (0,
|
|
6430
|
+
if (!(Number.isFinite(next.angle) && next.angle >= -360 && next.angle <= 360)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`angle must be from -360 to 360 degrees, got ${next.angle}.`);
|
|
6431
|
+
if (!(Number.isFinite(next.altitude) && next.altitude >= 0 && next.altitude <= 90)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`altitude must be from 0 to 90 degrees, got ${next.altitude}.`);
|
|
6432
6432
|
if (commitToHistory) this.recordHistory();
|
|
6433
6433
|
if (next.angle === _chunkHGTDMKNEcjs.DEFAULT_GLOBAL_LIGHT.angle && next.altitude === _chunkHGTDMKNEcjs.DEFAULT_GLOBAL_LIGHT.altitude) delete this.state.globalLight;
|
|
6434
6434
|
else this.state.globalLight = next;
|
|
@@ -6439,16 +6439,16 @@ var ImageEditorController = (_class10 = class {
|
|
|
6439
6439
|
async compositeToSurface(layers, rect) {
|
|
6440
6440
|
const { width, height } = this.naturalSize;
|
|
6441
6441
|
if (_chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers).some((l) => l.type === "annotation" && l.visible) && !this.renderer.canRasterize()) {
|
|
6442
|
-
throw new (0,
|
|
6442
|
+
throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Merging annotation layers needs a canvas (a browser); hide or delete them first, or merge in the browser.");
|
|
6443
6443
|
}
|
|
6444
6444
|
await this.renderer.prepareLayerAssets(layers, width, height);
|
|
6445
6445
|
const sources = this.renderer.compositorSources(width, height);
|
|
6446
6446
|
const depth = this.bitDepth;
|
|
6447
6447
|
if (depth !== 8) {
|
|
6448
|
-
const samples = _chunkHGTDMKNEcjs.workingToSamples.call(void 0,
|
|
6448
|
+
const samples = _chunkHGTDMKNEcjs.workingToSamples.call(void 0, _chunkPA3IMPPScjs.compositeDeep.call(void 0, layers, rect, sources, depth), depth);
|
|
6449
6449
|
return _chunkCWM3CUUXcjs.surfaceFromDeepPixels.call(void 0, { width: rect.width, height: rect.height, data: samples }, 4, rect.x, rect.y);
|
|
6450
6450
|
}
|
|
6451
|
-
const data = new (0,
|
|
6451
|
+
const data = new (0, _chunkPA3IMPPScjs.LayerCompositor)().composite(layers, rect, sources);
|
|
6452
6452
|
return _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width: rect.width, height: rect.height, data }, 4, rect.x, rect.y);
|
|
6453
6453
|
}
|
|
6454
6454
|
/**
|
|
@@ -6461,22 +6461,22 @@ var ImageEditorController = (_class10 = class {
|
|
|
6461
6461
|
const r = _nullishCoalesce(rect, () => ( { x: 0, y: 0, width, height }));
|
|
6462
6462
|
const depth = this.bitDepth;
|
|
6463
6463
|
if (depth === 8) return { width: r.width, height: r.height, depth: 16, data: _chunkCWM3CUUXcjs.to16From8.call(void 0, this.compositePixels(r).data) };
|
|
6464
|
-
const data = _chunkHGTDMKNEcjs.workingToSamples.call(void 0,
|
|
6464
|
+
const data = _chunkHGTDMKNEcjs.workingToSamples.call(void 0, _chunkPA3IMPPScjs.compositeDeep.call(void 0, this.state.layers, r, this.compositorSources(), depth), depth);
|
|
6465
6465
|
return { width: r.width, height: r.height, depth, data };
|
|
6466
6466
|
}
|
|
6467
6467
|
/** Document bounds a layer can paint into (pixel content, annotations, or the canvas for the rest). */
|
|
6468
6468
|
paintBounds(layer) {
|
|
6469
6469
|
const { width, height } = this.naturalSize;
|
|
6470
6470
|
const canvas = { x: 0, y: 0, width, height };
|
|
6471
|
-
if (
|
|
6471
|
+
if (_chunkPA3IMPPScjs.hasSurface.call(void 0, layer)) return _nullishCoalesce(this.getLayerBounds(layer.id), () => ( { x: 0, y: 0, width: 0, height: 0 }));
|
|
6472
6472
|
if (layer.type === "annotation") {
|
|
6473
|
-
const b =
|
|
6473
|
+
const b = _chunkPA3IMPPScjs.getAnnotationBounds.call(void 0, layer.annotation);
|
|
6474
6474
|
const pad = 4 + ("strokeWidth" in layer.annotation ? layer.annotation.strokeWidth : 0);
|
|
6475
6475
|
return coveringRect({ x: b.x - pad, y: b.y - pad, width: b.width + 2 * pad, height: b.height + 2 * pad });
|
|
6476
6476
|
}
|
|
6477
6477
|
if (layer.type === "group") {
|
|
6478
6478
|
let r = null;
|
|
6479
|
-
for (const c of layer.children) r =
|
|
6479
|
+
for (const c of layer.children) r = _chunkPA3IMPPScjs.unionRect.call(void 0, r, this.paintBounds(c));
|
|
6480
6480
|
return _nullishCoalesce(r, () => ( canvas));
|
|
6481
6481
|
}
|
|
6482
6482
|
return canvas;
|
|
@@ -6487,16 +6487,16 @@ var ImageEditorController = (_class10 = class {
|
|
|
6487
6487
|
* Returns the merged id.
|
|
6488
6488
|
*/
|
|
6489
6489
|
async mergeDown(id) {
|
|
6490
|
-
const loc =
|
|
6490
|
+
const loc = _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id);
|
|
6491
6491
|
const upper = loc.layer;
|
|
6492
6492
|
const siblings = loc.parent ? loc.parent.children : this.state.layers;
|
|
6493
6493
|
const lower = siblings[loc.index - 1];
|
|
6494
|
-
if (!lower) throw new (0,
|
|
6495
|
-
if (lower.type !== "pixel") throw new (0,
|
|
6496
|
-
if (!upper.visible) throw new (0,
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
let rect = _nullishCoalesce(
|
|
6494
|
+
if (!lower) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${upper.name || id}" is the bottom of its group; there is nothing below to merge into.`);
|
|
6495
|
+
if (lower.type !== "pixel") throw new (0, _chunkPA3IMPPScjs.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.`);
|
|
6496
|
+
if (!upper.visible) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${upper.name || id}" is hidden; show it or delete it instead of merging.`);
|
|
6497
|
+
_chunkPA3IMPPScjs.requireUnlocked.call(void 0, upper, "all", "merge it");
|
|
6498
|
+
_chunkPA3IMPPScjs.requireUnlocked.call(void 0, lower, "pixels", "merge into it");
|
|
6499
|
+
let rect = _nullishCoalesce(_chunkPA3IMPPScjs.unionRect.call(void 0, this.paintBounds(lower), upper.type === "adjustment" ? null : this.paintBounds(upper)), () => ( { x: 0, y: 0, width: 1, height: 1 }));
|
|
6500
6500
|
const reach = Math.max(_chunkHGTDMKNEcjs.effectsMargin.call(void 0, lower.effects), upper.type === "adjustment" ? 0 : _chunkHGTDMKNEcjs.effectsMargin.call(void 0, upper.effects));
|
|
6501
6501
|
if (reach) rect = { x: rect.x - reach, y: rect.y - reach, width: rect.width + 2 * reach, height: rect.height + 2 * reach };
|
|
6502
6502
|
const base = { ...lower, blend: "normal", opacity: 1 };
|
|
@@ -6522,12 +6522,12 @@ var ImageEditorController = (_class10 = class {
|
|
|
6522
6522
|
*/
|
|
6523
6523
|
async mergeVisible() {
|
|
6524
6524
|
const visible = this.state.layers.filter((l) => l.visible);
|
|
6525
|
-
if (!visible.length) throw new (0,
|
|
6525
|
+
if (!visible.length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("No layer is visible.");
|
|
6526
6526
|
const { width, height } = this.naturalSize;
|
|
6527
6527
|
const surface = await this.compositeToSurface(visible, { x: 0, y: 0, width, height });
|
|
6528
6528
|
const merged = {
|
|
6529
6529
|
type: "pixel",
|
|
6530
|
-
id:
|
|
6530
|
+
id: _chunkPA3IMPPScjs.newLayerId.call(void 0, ),
|
|
6531
6531
|
name: "Merged",
|
|
6532
6532
|
visible: true,
|
|
6533
6533
|
opacity: 1,
|
|
@@ -6551,8 +6551,8 @@ var ImageEditorController = (_class10 = class {
|
|
|
6551
6551
|
const surface = await this.compositeToSurface(this.state.layers, { x: 0, y: 0, width, height });
|
|
6552
6552
|
const bg = {
|
|
6553
6553
|
type: "pixel",
|
|
6554
|
-
id:
|
|
6555
|
-
name:
|
|
6554
|
+
id: _chunkPA3IMPPScjs.BACKGROUND_LAYER_ID,
|
|
6555
|
+
name: _chunkPA3IMPPScjs.BACKGROUND_LAYER_NAME,
|
|
6556
6556
|
visible: true,
|
|
6557
6557
|
opacity: 1,
|
|
6558
6558
|
blend: "normal",
|
|
@@ -6579,7 +6579,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6579
6579
|
const k = Math.min(1, side / Math.max(width, height));
|
|
6580
6580
|
const tw = Math.max(1, Math.round(width * k));
|
|
6581
6581
|
const th = Math.max(1, Math.round(height * k));
|
|
6582
|
-
const surface = options.mask ? layer.mask && !layer.mask.source ? layer.mask.surface : null :
|
|
6582
|
+
const surface = options.mask ? layer.mask && !layer.mask.source ? layer.mask.surface : null : _chunkPA3IMPPScjs.hasSurface.call(void 0, layer) ? this.surfaceOf(layer) : null;
|
|
6583
6583
|
if (!surface) return null;
|
|
6584
6584
|
const ox = layer.type === "pixel" ? layer.offset.x : 0;
|
|
6585
6585
|
const oy = layer.type === "pixel" ? layer.offset.y : 0;
|
|
@@ -6675,7 +6675,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6675
6675
|
* pixels. The next stroke fixes the offset from its first point. View state, no undo.
|
|
6676
6676
|
*/
|
|
6677
6677
|
setCloneSource(point) {
|
|
6678
|
-
if (point && (!Number.isFinite(point.x) || !Number.isFinite(point.y))) throw new (0,
|
|
6678
|
+
if (point && (!Number.isFinite(point.x) || !Number.isFinite(point.y))) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("The clone source needs finite x and y (document pixels).");
|
|
6679
6679
|
const source = point ? { x: Math.round(point.x), y: Math.round(point.y), offset: null } : null;
|
|
6680
6680
|
this.state.paint = { ...this.state.paint, cloneSource: source };
|
|
6681
6681
|
this.notify();
|
|
@@ -6691,9 +6691,9 @@ var ImageEditorController = (_class10 = class {
|
|
|
6691
6691
|
const next = t ? { ...cur, ...t } : { ..._chunk7NW46N7Icjs.IDENTITY_CLONE_TRANSFORM };
|
|
6692
6692
|
for (const k of ["scaleX", "scaleY"]) {
|
|
6693
6693
|
const v = next[k];
|
|
6694
|
-
if (!Number.isFinite(v) || Math.abs(v) < 0.01 || Math.abs(v) > 10) throw new (0,
|
|
6694
|
+
if (!Number.isFinite(v) || Math.abs(v) < 0.01 || Math.abs(v) > 10) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`${k} must be a scale factor between 0.01 and 10 in size (negative flips), not ${String(v)}.`);
|
|
6695
6695
|
}
|
|
6696
|
-
if (!Number.isFinite(next.rotate)) throw new (0,
|
|
6696
|
+
if (!Number.isFinite(next.rotate)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("rotate must be a number of degrees.");
|
|
6697
6697
|
next.rotate = ((next.rotate + 180) % 360 + 360) % 360 - 180;
|
|
6698
6698
|
this.state.paint = { ...this.state.paint, cloneTransform: next };
|
|
6699
6699
|
this.notify();
|
|
@@ -6711,28 +6711,28 @@ var ImageEditorController = (_class10 = class {
|
|
|
6711
6711
|
/** Resolves and validates what a stroke, fill or clear paints into. */
|
|
6712
6712
|
paintTarget(layerId, channel, action) {
|
|
6713
6713
|
const id = _nullishCoalesce(layerId, () => ( this.state.activeLayerId));
|
|
6714
|
-
if (!id) throw new (0,
|
|
6715
|
-
const layer =
|
|
6714
|
+
if (!id) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`No layer given and none is active; pass layerId (see list_layers) to ${action}.`, `Pick a layer to ${action} on in the Layers panel.`);
|
|
6715
|
+
const layer = _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id).layer;
|
|
6716
6716
|
const name = layer.name || id;
|
|
6717
6717
|
const ch = _nullishCoalesce(channel, () => ( (id === this.state.activeLayerId ? this.state.activeTarget : "pixels")));
|
|
6718
6718
|
if (ch === "mask") {
|
|
6719
|
-
if (!layer.mask) throw new (0,
|
|
6720
|
-
if (layer.mask.source) throw new (0,
|
|
6721
|
-
|
|
6719
|
+
if (!layer.mask) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${name}" has no mask to ${action}; add one with add_layer_mask, or target pixels.`, `Layer "${name}" has no mask; add a mask or ${action} on its pixels.`);
|
|
6720
|
+
if (layer.mask.source) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${name}" has a depth mask, which is generated, not painted.`);
|
|
6721
|
+
_chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "all", action);
|
|
6722
6722
|
} else if (ch === "filter-mask") {
|
|
6723
6723
|
if (layer.type !== "smart" || !_optionalChain([layer, 'access', _237 => _237.smartFilters, 'optionalAccess', _238 => _238.mask])) {
|
|
6724
|
-
throw new (0,
|
|
6724
|
+
throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${name}" has no smart filter mask to ${action}; add one with set_smart_filter_mask, or target pixels or mask.`, `Layer "${name}" has no smart filter mask to ${action}.`);
|
|
6725
6725
|
}
|
|
6726
|
-
if (!
|
|
6727
|
-
|
|
6726
|
+
if (!_chunkPA3IMPPScjs.isContentsDecoded.call(void 0, layer.contents)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`The contents of "${name}" are not decoded here, so its filter mask cannot be painted; run prepareSmartObjects() first.`, `The smart object "${name}" is still loading; try again in a moment.`);
|
|
6727
|
+
_chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "all", action);
|
|
6728
6728
|
} else {
|
|
6729
|
-
if (layer.type === "smart") throw new (0,
|
|
6730
|
-
if (layer.type === "shape") throw new (0,
|
|
6731
|
-
if (layer.type === "type") throw new (0,
|
|
6732
|
-
if (layer.type !== "pixel") throw new (0,
|
|
6733
|
-
|
|
6729
|
+
if (layer.type === "smart") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${name}" 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.`, `"${name}" is a smart object; rasterize it or edit its contents to ${action} on it.`);
|
|
6730
|
+
if (layer.type === "shape") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${name}" is a shape layer; its pixels are drawn from its paths. Rasterize it first (rasterize_layer), or ${action} on its mask (channel mask).`, `"${name}" is a shape layer; rasterize it to ${action} on it.`);
|
|
6731
|
+
if (layer.type === "type") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${name}" is a type layer; its pixels are drawn from its text. Rasterize it first (rasterize_layer), or ${action} on its mask (channel mask).`, `"${name}" is a type layer; rasterize it to ${action} on it.`);
|
|
6732
|
+
if (layer.type !== "pixel") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${name}" is a ${layer.type} layer; ${action} on a pixel layer, or on this layer's mask (channel mask).`, `"${name}" is not a pixel layer; pick a pixel layer to ${action} on.`);
|
|
6733
|
+
_chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "pixels", action);
|
|
6734
6734
|
}
|
|
6735
|
-
if (!layer.visible) throw new (0,
|
|
6735
|
+
if (!layer.visible) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${name}" is hidden; show it before you ${action}.`);
|
|
6736
6736
|
const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
|
|
6737
6737
|
const surface = ch === "mask" ? layer.mask.surface : ch === "filter-mask" ? layer.smartFilters.mask.surface : this.surfaceOf(layer);
|
|
6738
6738
|
const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _239 => _239.locks, 'optionalAccess', _240 => _240.transparency]));
|
|
@@ -6741,7 +6741,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6741
6741
|
/** The layer with its pixels (or mask) replaced by `surface`. */
|
|
6742
6742
|
withSurface(layer, channel, surface) {
|
|
6743
6743
|
if (channel === "mask") return { ...layer, mask: { ...layer.mask, surface } };
|
|
6744
|
-
if (channel === "filter-mask") return
|
|
6744
|
+
if (channel === "filter-mask") return _chunkPA3IMPPScjs.withFilterMaskSurface.call(void 0, layer, surface, this.canvasSize);
|
|
6745
6745
|
const next = { ...layer, surface };
|
|
6746
6746
|
delete next.source;
|
|
6747
6747
|
return next;
|
|
@@ -6754,10 +6754,10 @@ var ImageEditorController = (_class10 = class {
|
|
|
6754
6754
|
*/
|
|
6755
6755
|
beginStroke(init = {}) {
|
|
6756
6756
|
const tool = _nullishCoalesce(init.tool, () => ( "brush"));
|
|
6757
|
-
if (!STROKE_TOOLS.includes(tool)) throw new (0,
|
|
6757
|
+
if (!STROKE_TOOLS.includes(tool)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown paint tool "${String(tool)}"; use one of ${STROKE_TOOLS.join(", ")}.`);
|
|
6758
6758
|
const target = this.paintTarget(init.layerId, init.channel, tool === "eraser" ? "erase" : isRetouchTool(tool) ? "retouch" : "paint");
|
|
6759
6759
|
if (tool === "mixer" && target.channel !== "pixels") {
|
|
6760
|
-
throw new (0,
|
|
6760
|
+
throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("The Mixer Brush paints colour on pixels, not on masks; target pixels (channel pixels), or paint the mask with the brush.", "The Mixer Brush paints on pixels, not masks; target the layer's pixels, or paint the mask with the Brush.");
|
|
6761
6761
|
}
|
|
6762
6762
|
const brush = _chunkEBDCRTZIcjs.normalizeBrush.call(void 0, { ...this.state.paint.brush, ..._nullishCoalesce(init.brush, () => ( {})) });
|
|
6763
6763
|
let strokePaint = null;
|
|
@@ -6791,7 +6791,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6791
6791
|
retouchStroke(tool, init, brush, target, apply) {
|
|
6792
6792
|
const settings = _chunk7NW46N7Icjs.normalizeRetouch.call(void 0, _nullishCoalesce(init.retouch, () => ( {})), this.state.paint.retouch);
|
|
6793
6793
|
const mask = target.channel !== "pixels";
|
|
6794
|
-
if (tool === "sponge" && mask) throw new (0,
|
|
6794
|
+
if (tool === "sponge" && mask) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("The Sponge changes saturation, and a mask has none; target pixels (channel pixels), or use dodge or burn on the mask.");
|
|
6795
6795
|
if (tool === "smudge") return { kind: "dabs", create: (pixels) => new (0, _chunk7NW46N7Icjs.RetouchDabStroke)(brush, pixels, _chunk7NW46N7Icjs.smudgeEffect.call(void 0, brush, settings.strength)) };
|
|
6796
6796
|
if (tool === "sponge") return { kind: "dabs", create: (pixels) => new (0, _chunk7NW46N7Icjs.RetouchDabStroke)(brush, pixels, _chunk7NW46N7Icjs.spongeEffect.call(void 0, brush, settings.spongeMode === "saturate", settings.vibrance)) };
|
|
6797
6797
|
const retouchApply = {
|
|
@@ -6830,11 +6830,11 @@ var ImageEditorController = (_class10 = class {
|
|
|
6830
6830
|
if (tool === "history") {
|
|
6831
6831
|
const steps = settings.historySteps;
|
|
6832
6832
|
const entry = steps > 0 ? _nullishCoalesce(this.undoStack[this.undoStack.length - steps], () => ( this.undoStack[0])) : this.undoStack[0];
|
|
6833
|
-
if (!entry) throw new (0,
|
|
6833
|
+
if (!entry) throw new (0, _chunkPA3IMPPScjs.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.");
|
|
6834
6834
|
const then = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _245 => _245.layer]);
|
|
6835
|
-
if (!then) throw new (0,
|
|
6835
|
+
if (!then) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${target.id}" did not exist ${steps > 0 ? `${steps} steps back` : "in the oldest state"}; choose fewer history steps (historySteps).`);
|
|
6836
6836
|
const surface = target.channel === "mask" ? _optionalChain([then, 'access', _246 => _246.mask, 'optionalAccess', _247 => _247.surface]) : then.type === "pixel" ? then.surface : void 0;
|
|
6837
|
-
if (!surface) throw new (0,
|
|
6837
|
+
if (!surface) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
|
|
6838
6838
|
const offset2 = then.type === "pixel" ? then.offset : { x: 0, y: 0 };
|
|
6839
6839
|
const depth = !mask && this.bitDepth !== 8 ? this.bitDepth : null;
|
|
6840
6840
|
const source2 = depth ? new (0, _chunk7NW46N7Icjs.TilePixelSource)((tx, ty) => workTileOf(surface.tiles.get(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty))), 4, offset2) : this.surfaceSource(surface, offset2);
|
|
@@ -6879,7 +6879,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6879
6879
|
}
|
|
6880
6880
|
if (init.source) this.setCloneSource(init.source);
|
|
6881
6881
|
const cs = this.state.paint.cloneSource;
|
|
6882
|
-
if (!cs) throw new (0,
|
|
6882
|
+
if (!cs) throw new (0, _chunkPA3IMPPScjs.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 }.`);
|
|
6883
6883
|
let offset = { x: 0, y: 0 };
|
|
6884
6884
|
let first = { x: 0, y: 0 };
|
|
6885
6885
|
const xf = this.state.paint.cloneTransform;
|
|
@@ -6916,7 +6916,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6916
6916
|
const sources = this.compositorSources();
|
|
6917
6917
|
if (depth) {
|
|
6918
6918
|
return new (0, _chunk7NW46N7Icjs.TilePixelSource)((tx, ty) => {
|
|
6919
|
-
const w =
|
|
6919
|
+
const w = _chunkPA3IMPPScjs.compositeDeep.call(void 0, layers, { x: tx * _chunkCWM3CUUXcjs.TILE, y: ty * _chunkCWM3CUUXcjs.TILE, width: _chunkCWM3CUUXcjs.TILE, height: _chunkCWM3CUUXcjs.TILE }, sources, depth);
|
|
6920
6920
|
for (let i = 0; i < w.length; i += 4) {
|
|
6921
6921
|
if (depth === 32) for (let c = 0; c < 3; c++) w[i + c] = _chunkCWM3CUUXcjs.srgbEncode.call(void 0, w[i + c]);
|
|
6922
6922
|
for (let c = 0; c < 4; c++) w[i + c] *= 255;
|
|
@@ -6924,7 +6924,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
6924
6924
|
return w;
|
|
6925
6925
|
}, 4);
|
|
6926
6926
|
}
|
|
6927
|
-
const compositor = new (0,
|
|
6927
|
+
const compositor = new (0, _chunkPA3IMPPScjs.LayerCompositor)();
|
|
6928
6928
|
return new (0, _chunk7NW46N7Icjs.TilePixelSource)((tx, ty) => compositor.tile(layers, tx, ty, sources), 4);
|
|
6929
6929
|
}
|
|
6930
6930
|
/** A Mixer Brush stroke's start: the settings, and the load (refilled when asked or set to). */
|
|
@@ -6974,9 +6974,9 @@ var ImageEditorController = (_class10 = class {
|
|
|
6974
6974
|
* document bounds and the number of dabs.
|
|
6975
6975
|
*/
|
|
6976
6976
|
paintStroke(init) {
|
|
6977
|
-
if (!Array.isArray(init.points) || !init.points.length) throw new (0,
|
|
6977
|
+
if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("points must hold at least one { x, y } point.");
|
|
6978
6978
|
for (const p of init.points) {
|
|
6979
|
-
if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _252 => _252.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _253 => _253.y]))) throw new (0,
|
|
6979
|
+
if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _252 => _252.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _253 => _253.y]))) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
|
|
6980
6980
|
}
|
|
6981
6981
|
const session = this.beginStroke(init);
|
|
6982
6982
|
session.push(init.points);
|
|
@@ -7002,8 +7002,8 @@ var ImageEditorController = (_class10 = class {
|
|
|
7002
7002
|
const target = this.paintTarget(options.layerId, options.channel, mode === "paint" ? "fill" : "clear");
|
|
7003
7003
|
const { width, height } = this.naturalSize;
|
|
7004
7004
|
const opacity = _nullishCoalesce(options.opacity, () => ( 1));
|
|
7005
|
-
if (!(opacity >= 0 && opacity <= 1)) throw new (0,
|
|
7006
|
-
const blend = _nullishCoalesce(
|
|
7005
|
+
if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("opacity must be from 0 to 1.");
|
|
7006
|
+
const blend = _nullishCoalesce(_chunkPA3IMPPScjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
|
|
7007
7007
|
const sel = options.useSelection !== false && _optionalChain([this, 'access', _254 => _254.state, 'access', _255 => _255.selection, 'optionalAccess', _256 => _256.bounds]) ? this.state.selection : null;
|
|
7008
7008
|
const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _257 => _257.bounds]), () => ( { x: 0, y: 0, width, height }));
|
|
7009
7009
|
const coverage = new (0, _chunkEBDCRTZIcjs.CoverageMap)();
|
|
@@ -7039,7 +7039,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7039
7039
|
// --- Adjustments ---
|
|
7040
7040
|
/** The pixel layer the base sliders edit: the active pixel layer, else the Background. */
|
|
7041
7041
|
developLayer() {
|
|
7042
|
-
return
|
|
7042
|
+
return _chunkPA3IMPPScjs.developTarget.call(void 0, this.state.layers, this.state.activeLayerId);
|
|
7043
7043
|
}
|
|
7044
7044
|
/**
|
|
7045
7045
|
* Sets base adjustment values as one undo step (unless `commitToHistory` is false). The base
|
|
@@ -7065,7 +7065,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7065
7065
|
this.state.outputOpacity = Math.min(1, Math.max(0, partial.opacity));
|
|
7066
7066
|
}
|
|
7067
7067
|
if ("layers" in partial) {
|
|
7068
|
-
layers = this.replaceAdjustmentNodes(layers,
|
|
7068
|
+
layers = this.replaceAdjustmentNodes(layers, _chunkPA3IMPPScjs.normalizeAdjustmentLayers.call(void 0, partial.layers));
|
|
7069
7069
|
}
|
|
7070
7070
|
this.state.layers = layers;
|
|
7071
7071
|
this.notify();
|
|
@@ -7073,7 +7073,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7073
7073
|
/** True when the adjustments use an older rendering process than {@link LATEST_PROCESS_VERSION}. */
|
|
7074
7074
|
get isProcessOutdated() {
|
|
7075
7075
|
this.syncViews();
|
|
7076
|
-
return
|
|
7076
|
+
return _chunkPA3IMPPScjs.normalizeProcessVersion.call(void 0, this.state.adjustments.process) < _chunkPA3IMPPScjs.LATEST_PROCESS_VERSION;
|
|
7077
7077
|
}
|
|
7078
7078
|
/**
|
|
7079
7079
|
* Update to Current Process: re-interprets the current adjustment values with the latest
|
|
@@ -7081,7 +7081,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7081
7081
|
*/
|
|
7082
7082
|
upgradeProcess() {
|
|
7083
7083
|
if (!this.isProcessOutdated) return false;
|
|
7084
|
-
this.setAdjustments({ process:
|
|
7084
|
+
this.setAdjustments({ process: _chunkPA3IMPPScjs.LATEST_PROCESS_VERSION });
|
|
7085
7085
|
return true;
|
|
7086
7086
|
}
|
|
7087
7087
|
/** Resets the base sliders (latest process). Adjustment layers are kept; see `clearAdjustmentLayers`. */
|
|
@@ -7092,7 +7092,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7092
7092
|
this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0,
|
|
7093
7093
|
this.state.layers,
|
|
7094
7094
|
target.id,
|
|
7095
|
-
(l) => withBlur(withDevelop(l, { ...DEFAULT_ADJUSTMENTS, process:
|
|
7095
|
+
(l) => withBlur(withDevelop(l, { ...DEFAULT_ADJUSTMENTS, process: _chunkPA3IMPPScjs.LATEST_PROCESS_VERSION }), 0)
|
|
7096
7096
|
);
|
|
7097
7097
|
}
|
|
7098
7098
|
delete this.state.legacyOutputBlur;
|
|
@@ -7156,7 +7156,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7156
7156
|
const existing = new Set(this.adjustmentNodes(out).map((n) => n.id));
|
|
7157
7157
|
for (const l of next) {
|
|
7158
7158
|
if (existing.has(l.id)) continue;
|
|
7159
|
-
out = this.placeLayer(out,
|
|
7159
|
+
out = this.placeLayer(out, _chunkPA3IMPPScjs.adjustmentNodeFromLegacy.call(void 0, l, width, height), { adjustmentIndex: Infinity });
|
|
7160
7160
|
}
|
|
7161
7161
|
const order = next.map((l) => l.id);
|
|
7162
7162
|
for (let to = 0; to < order.length; to++) out = this.moveAdjustmentNode(out, order[to], to);
|
|
@@ -7171,7 +7171,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7171
7171
|
addAdjustmentLayer(init, index) {
|
|
7172
7172
|
const spec = typeof init === "string" ? { kind: init } : init;
|
|
7173
7173
|
const ids = new Set(_chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
|
|
7174
|
-
const layer =
|
|
7174
|
+
const layer = _chunkPA3IMPPScjs.createAdjustmentLayer.call(void 0, spec.kind, {
|
|
7175
7175
|
id: spec.id && !ids.has(spec.id) ? spec.id : void 0,
|
|
7176
7176
|
name: spec.name,
|
|
7177
7177
|
params: spec.params,
|
|
@@ -7180,10 +7180,10 @@ var ImageEditorController = (_class10 = class {
|
|
|
7180
7180
|
blend: spec.blend,
|
|
7181
7181
|
mask: _nullishCoalesce(spec.mask, () => ( void 0))
|
|
7182
7182
|
});
|
|
7183
|
-
while (ids.has(layer.id)) layer.id =
|
|
7183
|
+
while (ids.has(layer.id)) layer.id = _chunkPA3IMPPScjs.newLayerId.call(void 0, "adj");
|
|
7184
7184
|
const { width, height } = this.naturalSize;
|
|
7185
7185
|
this.recordHistory();
|
|
7186
|
-
const node =
|
|
7186
|
+
const node = _chunkPA3IMPPScjs.adjustmentNodeFromLegacy.call(void 0, layer, width, height);
|
|
7187
7187
|
const positioned = Boolean(spec.aboveId || spec.parentId);
|
|
7188
7188
|
this.state.layers = this.placeLayer(this.state.layers, node, {
|
|
7189
7189
|
aboveId: spec.aboveId,
|
|
@@ -7203,7 +7203,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7203
7203
|
if (!loc || loc.layer.type !== "adjustment") return false;
|
|
7204
7204
|
const { width, height } = this.naturalSize;
|
|
7205
7205
|
const node = loc.layer;
|
|
7206
|
-
const merged =
|
|
7206
|
+
const merged = _chunkPA3IMPPScjs.normalizeAdjustmentLayer.call(void 0, {
|
|
7207
7207
|
id: node.id,
|
|
7208
7208
|
kind: node.kind,
|
|
7209
7209
|
enabled: _nullishCoalesce(update.enabled, () => ( node.visible)),
|
|
@@ -7223,7 +7223,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7223
7223
|
params: merged.params
|
|
7224
7224
|
};
|
|
7225
7225
|
if (update.mask !== void 0) {
|
|
7226
|
-
const mask = update.mask ?
|
|
7226
|
+
const mask = update.mask ? _chunkPA3IMPPScjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height) : null;
|
|
7227
7227
|
if (mask) next.mask = mask;
|
|
7228
7228
|
else delete next.mask;
|
|
7229
7229
|
}
|
|
@@ -7239,7 +7239,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7239
7239
|
const prev = this.state.layers;
|
|
7240
7240
|
this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, prev, id, () => null);
|
|
7241
7241
|
if (this.state.activeLayerId === id) {
|
|
7242
|
-
this.state.activeLayerId =
|
|
7242
|
+
this.state.activeLayerId = _chunkPA3IMPPScjs.activeLayerAfterRemoval.call(void 0, prev, this.state.layers, id);
|
|
7243
7243
|
this.state.activeTarget = "pixels";
|
|
7244
7244
|
}
|
|
7245
7245
|
this.notify();
|
|
@@ -7285,7 +7285,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7285
7285
|
this.state.layers = layers;
|
|
7286
7286
|
const active = this.state.activeLayerId;
|
|
7287
7287
|
if (active && nodes.some((n) => n.id === active)) {
|
|
7288
|
-
this.state.activeLayerId =
|
|
7288
|
+
this.state.activeLayerId = _chunkPA3IMPPScjs.activeLayerAfterRemoval.call(void 0, prev, layers, active);
|
|
7289
7289
|
this.state.activeTarget = "pixels";
|
|
7290
7290
|
}
|
|
7291
7291
|
this.notify();
|
|
@@ -7309,14 +7309,14 @@ var ImageEditorController = (_class10 = class {
|
|
|
7309
7309
|
resizeCanvas(options) {
|
|
7310
7310
|
const { width, height, anchor = "center" } = options;
|
|
7311
7311
|
if (!Number.isFinite(width) || width < 1 || !Number.isFinite(height) || height < 1) {
|
|
7312
|
-
throw new (0,
|
|
7312
|
+
throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Canvas width and height must be numbers at least 1 pixel.");
|
|
7313
7313
|
}
|
|
7314
7314
|
const targetWidth = Math.round(width);
|
|
7315
7315
|
const targetHeight = Math.round(height);
|
|
7316
7316
|
const prev = this.naturalSize;
|
|
7317
7317
|
if (prev.width === targetWidth && prev.height === targetHeight) return;
|
|
7318
7318
|
this.recordHistory();
|
|
7319
|
-
const [fx, fy] =
|
|
7319
|
+
const [fx, fy] = _chunkPA3IMPPScjs.ANCHOR_FRACTION[anchor];
|
|
7320
7320
|
const dx = Math.round((targetWidth - prev.width) * fx);
|
|
7321
7321
|
const dy = Math.round((targetHeight - prev.height) * fy);
|
|
7322
7322
|
this.state.layers = this.state.layers.map((l) => {
|
|
@@ -7352,10 +7352,10 @@ var ImageEditorController = (_class10 = class {
|
|
|
7352
7352
|
}
|
|
7353
7353
|
}
|
|
7354
7354
|
this.state.selection = normalizeSelection(
|
|
7355
|
-
|
|
7355
|
+
_chunkPA3IMPPScjs.createSelectionMask.call(void 0, targetWidth, targetHeight, nextData)
|
|
7356
7356
|
);
|
|
7357
7357
|
}
|
|
7358
|
-
this.state.layers = this.state.layers.map((l) =>
|
|
7358
|
+
this.state.layers = this.state.layers.map((l) => _chunkPA3IMPPScjs.translateLayer.call(void 0, l, dx, dy));
|
|
7359
7359
|
this.docRevision++;
|
|
7360
7360
|
this.notify();
|
|
7361
7361
|
}
|
|
@@ -7380,8 +7380,8 @@ var ImageEditorController = (_class10 = class {
|
|
|
7380
7380
|
const { width, height } = this.naturalSize;
|
|
7381
7381
|
let next = null;
|
|
7382
7382
|
if (mask) {
|
|
7383
|
-
const sized = mask.width === width && mask.height === height ? mask :
|
|
7384
|
-
next =
|
|
7383
|
+
const sized = mask.width === width && mask.height === height ? mask : _chunkPA3IMPPScjs.resizeSelection.call(void 0, mask, width, height);
|
|
7384
|
+
next = _chunkPA3IMPPScjs.combineSelections.call(void 0, this.state.selection, sized, mode);
|
|
7385
7385
|
} else if (mode !== "replace") {
|
|
7386
7386
|
return false;
|
|
7387
7387
|
}
|
|
@@ -7395,7 +7395,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7395
7395
|
/** Select › All. */
|
|
7396
7396
|
selectAll() {
|
|
7397
7397
|
const { width, height } = this.naturalSize;
|
|
7398
|
-
return this.setSelection(
|
|
7398
|
+
return this.setSelection(_chunkPA3IMPPScjs.fullSelection.call(void 0, width, height));
|
|
7399
7399
|
}
|
|
7400
7400
|
/** Select › Deselect. */
|
|
7401
7401
|
deselect() {
|
|
@@ -7404,11 +7404,11 @@ var ImageEditorController = (_class10 = class {
|
|
|
7404
7404
|
/** Select › Inverse (with nothing selected, selects everything). */
|
|
7405
7405
|
invertSelection() {
|
|
7406
7406
|
const { width, height } = this.naturalSize;
|
|
7407
|
-
const current = _nullishCoalesce(this.state.selection, () => (
|
|
7408
|
-
return this.setSelection(
|
|
7407
|
+
const current = _nullishCoalesce(this.state.selection, () => ( _chunkPA3IMPPScjs.createSelectionMask.call(void 0, width, height)));
|
|
7408
|
+
return this.setSelection(_chunkPA3IMPPScjs.invertSelection.call(void 0, current));
|
|
7409
7409
|
}
|
|
7410
7410
|
shapeCommand(mask, options) {
|
|
7411
|
-
const shaped = options.feather && options.feather > 0 ?
|
|
7411
|
+
const shaped = options.feather && options.feather > 0 ? _chunkPA3IMPPScjs.modifySelection.call(void 0, mask, "feather", options.feather) : mask;
|
|
7412
7412
|
return this.setSelection(shaped, _nullishCoalesce(options.mode, () => ( "replace")));
|
|
7413
7413
|
}
|
|
7414
7414
|
/** Rectangular marquee in natural image pixels. */
|
|
@@ -7462,11 +7462,11 @@ var ImageEditorController = (_class10 = class {
|
|
|
7462
7462
|
if (!this.samplePixelsOverride && !options.pixels) this.samplePixels = null;
|
|
7463
7463
|
return null;
|
|
7464
7464
|
}
|
|
7465
|
-
const legacy =
|
|
7465
|
+
const legacy = _chunkPA3IMPPScjs.legacyView.call(void 0, this.stack(), width, height, null).exact;
|
|
7466
7466
|
if (options.sample === "active-layer") {
|
|
7467
7467
|
const layer = this.getActiveLayer();
|
|
7468
7468
|
if (!layer || layer.type !== "pixel") {
|
|
7469
|
-
throw new (0,
|
|
7469
|
+
throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Sampling the active layer needs an active pixel layer; select one, or sample the composite.");
|
|
7470
7470
|
}
|
|
7471
7471
|
const surface = layer.source === "document" && options.pixels ? _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, options.pixels, 4) : this.surfaceOf(layer);
|
|
7472
7472
|
return { width, height, data: _chunkCWM3CUUXcjs.readRegion.call(void 0, surface, { x: -layer.offset.x, y: -layer.offset.y, width, height }) };
|
|
@@ -7475,7 +7475,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7475
7475
|
this.syncViews();
|
|
7476
7476
|
if (legacy && !options.pixels) {
|
|
7477
7477
|
const copy = { width: base.width, height: base.height, data: new Uint8ClampedArray(base.data) };
|
|
7478
|
-
|
|
7478
|
+
_chunkPA3IMPPScjs.applyAdjustments.call(void 0, copy, _chunkPA3IMPPScjs.legacyView.call(void 0, this.stack(), width, height, null).adjustments);
|
|
7479
7479
|
return copy;
|
|
7480
7480
|
}
|
|
7481
7481
|
const pixels = options.pixels;
|
|
@@ -7487,7 +7487,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7487
7487
|
};
|
|
7488
7488
|
const stack = withoutAnnotations(this.state.layers);
|
|
7489
7489
|
const layers = options.sampleMerged ? stack : pixelsOnly(stack);
|
|
7490
|
-
const data = new (0,
|
|
7490
|
+
const data = new (0, _chunkPA3IMPPScjs.LayerCompositor)().composite(layers, { x: 0, y: 0, width, height }, sources);
|
|
7491
7491
|
return { width, height, data };
|
|
7492
7492
|
}
|
|
7493
7493
|
async requirePixels(options) {
|
|
@@ -7514,7 +7514,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7514
7514
|
modifySelection(op, radius) {
|
|
7515
7515
|
const sel = this.state.selection;
|
|
7516
7516
|
if (!_optionalChain([sel, 'optionalAccess', _271 => _271.bounds])) return false;
|
|
7517
|
-
return this.setSelection(
|
|
7517
|
+
return this.setSelection(_chunkPA3IMPPScjs.modifySelection.call(void 0, sel, op, radius));
|
|
7518
7518
|
}
|
|
7519
7519
|
/**
|
|
7520
7520
|
* Refine Edge: snaps the selection (e.g. a coarse AI mask loaded with `loadSelectionFromImage`)
|
|
@@ -7545,7 +7545,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7545
7545
|
} else {
|
|
7546
7546
|
pixels = source;
|
|
7547
7547
|
}
|
|
7548
|
-
this.setSelection(
|
|
7548
|
+
this.setSelection(_chunkPA3IMPPScjs.selectionFromPixels.call(void 0, pixels, options), _nullishCoalesce(options.mode, () => ( "replace")));
|
|
7549
7549
|
return this.getSelection();
|
|
7550
7550
|
}
|
|
7551
7551
|
/** Quick Mask view (tints the unselected area). View state: no undo step. */
|
|
@@ -7557,7 +7557,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7557
7557
|
// --- Layer masks ---
|
|
7558
7558
|
maskFromSelection(sel, props = {}) {
|
|
7559
7559
|
const { width, height } = this.naturalSize;
|
|
7560
|
-
const sized = sel.width === width && sel.height === height ? sel :
|
|
7560
|
+
const sized = sel.width === width && sel.height === height ? sel : _chunkPA3IMPPScjs.resizeSelection.call(void 0, sel, width, height);
|
|
7561
7561
|
const mask = { surface: _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width, height, data: sized.data }, 1, 0, 0, 0), defaultValue: 0 };
|
|
7562
7562
|
return withMaskProps(mask, props);
|
|
7563
7563
|
}
|
|
@@ -7603,7 +7603,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7603
7603
|
const ox = layer.type === "pixel" ? layer.offset.x : 0;
|
|
7604
7604
|
const oy = layer.type === "pixel" ? layer.offset.y : 0;
|
|
7605
7605
|
const data = _chunkCWM3CUUXcjs.readRegion.call(void 0, layer.mask.surface, { x: -ox, y: -oy, width, height });
|
|
7606
|
-
const sel =
|
|
7606
|
+
const sel = _chunkPA3IMPPScjs.createSelectionMask.call(void 0, width, height, new Uint8Array(data.buffer, data.byteOffset, data.length));
|
|
7607
7607
|
return this.setSelection(sel, mode);
|
|
7608
7608
|
}
|
|
7609
7609
|
// --- Histogram ---
|
|
@@ -7633,9 +7633,9 @@ var ImageEditorController = (_class10 = class {
|
|
|
7633
7633
|
merged.depthRange = [...merged.depthRange];
|
|
7634
7634
|
this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
|
|
7635
7635
|
const next = { ...l };
|
|
7636
|
-
if (
|
|
7636
|
+
if (_chunkPA3IMPPScjs.isDefaultDepthMask.call(void 0, merged)) {
|
|
7637
7637
|
if (_optionalChain([next, 'access', _277 => _277.mask, 'optionalAccess', _278 => _278.source])) delete next.mask;
|
|
7638
|
-
} else next.mask =
|
|
7638
|
+
} else next.mask = _chunkPA3IMPPScjs.depthRasterMask.call(void 0, merged);
|
|
7639
7639
|
return next;
|
|
7640
7640
|
});
|
|
7641
7641
|
}
|
|
@@ -7656,7 +7656,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7656
7656
|
// --- Annotations & Layers ---
|
|
7657
7657
|
/** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
|
|
7658
7658
|
annotationLayer(id) {
|
|
7659
|
-
return _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([
|
|
7659
|
+
return _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkPA3IMPPScjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _281 => _281.id]) === id);
|
|
7660
7660
|
}
|
|
7661
7661
|
/** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
|
|
7662
7662
|
annotationEnv() {
|
|
@@ -7672,7 +7672,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
7672
7672
|
this.recordHistory();
|
|
7673
7673
|
const id = `ann_${Date.now()}_${Math.random().toString(36).slice(2, 7)}`;
|
|
7674
7674
|
const fullAnnotation = { ...annotation, id };
|
|
7675
|
-
const layer =
|
|
7675
|
+
const layer = _chunkPA3IMPPScjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
|
|
7676
7676
|
const loc = placement.aboveId ? _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
|
|
7677
7677
|
this.state.layers = loc ? _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _282 => _282.parent, 'optionalAccess', _283 => _283.id]), () => ( null)), loc.index + 1) : _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, null);
|
|
7678
7678
|
this.state.selectedAnnotationId = id;
|
|
@@ -7684,17 +7684,17 @@ var ImageEditorController = (_class10 = class {
|
|
|
7684
7684
|
this.recordHistory();
|
|
7685
7685
|
}
|
|
7686
7686
|
const layer = this.annotationLayer(id);
|
|
7687
|
-
const current = layer ?
|
|
7687
|
+
const current = layer ? _chunkPA3IMPPScjs.annotationOfLayer.call(void 0, layer) : null;
|
|
7688
7688
|
if (layer && current) {
|
|
7689
7689
|
const annotation = { ...current, ...partial, id };
|
|
7690
|
-
const name = layer.name ===
|
|
7690
|
+
const name = layer.name === _chunkPA3IMPPScjs.annotationLayerName.call(void 0, current) ? _chunkPA3IMPPScjs.annotationLayerName.call(void 0, annotation) : layer.name;
|
|
7691
7691
|
this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, layer.id, () => this.layerForAnnotation(layer, annotation, name));
|
|
7692
7692
|
}
|
|
7693
7693
|
this.notify();
|
|
7694
7694
|
}
|
|
7695
7695
|
/** `layer` (an annotation, or a shape or type layer migrated from one) showing `annotation` instead, keeping its other properties. */
|
|
7696
7696
|
layerForAnnotation(layer, annotation, name) {
|
|
7697
|
-
const fresh =
|
|
7697
|
+
const fresh = _chunkPA3IMPPScjs.annotationLayerFor.call(void 0, annotation, this.annotationEnv());
|
|
7698
7698
|
const keep = { id: layer.id, visible: layer.visible, opacity: layer.opacity };
|
|
7699
7699
|
for (const k of ["clipped", "mask", "locks", "effects"]) if (layer[k] !== void 0) keep[k] = layer[k];
|
|
7700
7700
|
if (fresh.type !== "annotation" && layer.type !== "annotation" && layer.fillOpacity !== void 0) keep.fillOpacity = layer.fillOpacity;
|
|
@@ -7981,8 +7981,8 @@ var ImageEditorController = (_class10 = class {
|
|
|
7981
7981
|
return;
|
|
7982
7982
|
}
|
|
7983
7983
|
const target = this.developLayer();
|
|
7984
|
-
if (!target) throw new (0,
|
|
7985
|
-
|
|
7984
|
+
if (!target) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("There is no pixel layer to mask.");
|
|
7985
|
+
_chunkPA3IMPPScjs.requireUnlocked.call(void 0, target, "all", "mask it");
|
|
7986
7986
|
const { width, height } = this.naturalSize;
|
|
7987
7987
|
let px2 = await this.decodeImage(newDataUrl);
|
|
7988
7988
|
if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
|
|
@@ -7990,14 +7990,14 @@ var ImageEditorController = (_class10 = class {
|
|
|
7990
7990
|
for (let p = 0; p < alpha.length; p++) alpha[p] = px2.data[p * 4 + 3];
|
|
7991
7991
|
let surface = _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width, height, data: alpha }, 1, 0, 0, 0);
|
|
7992
7992
|
if (target.offset.x || target.offset.y) surface = _chunkCWM3CUUXcjs.translateSurface.call(void 0, surface, -target.offset.x, -target.offset.y);
|
|
7993
|
-
this.commitLayers(
|
|
7993
|
+
this.commitLayers(_chunkPA3IMPPScjs.setLayerMask.call(void 0, this.state.layers, target.id, { surface, defaultValue: 0 }));
|
|
7994
7994
|
return target.id;
|
|
7995
7995
|
}
|
|
7996
7996
|
// --- Type layers ---
|
|
7997
7997
|
|
|
7998
7998
|
/** The shaper that lays out and draws type layers (`null` when there is none here). */
|
|
7999
7999
|
getTextShaper() {
|
|
8000
|
-
if (this.textShaperValue === void 0) this.textShaperValue =
|
|
8000
|
+
if (this.textShaperValue === void 0) this.textShaperValue = _chunkJCXMJUQOcjs.createCanvasTextShaper.call(void 0, { createCanvas: (w, h) => this.renderer.createCanvas(w, h) });
|
|
8001
8001
|
return this.textShaperValue;
|
|
8002
8002
|
}
|
|
8003
8003
|
/** Sets the text shaper (fonts) type layers lay out and draw with; existing layers redraw on their next edit. */
|
|
@@ -8014,7 +8014,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8014
8014
|
return _nullishCoalesce(_optionalChain([this, 'access', _290 => _290.getTextShaper, 'call', _291 => _291(), 'optionalAccess', _292 => _292.families, 'optionalCall', _293 => _293()]), () => ( ["sans-serif", "serif", "monospace"]));
|
|
8015
8015
|
}
|
|
8016
8016
|
typeInfo(id) {
|
|
8017
|
-
const layer =
|
|
8017
|
+
const layer = _chunkPA3IMPPScjs.requireTypeLayer.call(void 0, this.state.layers, id);
|
|
8018
8018
|
const ranges = (runs) => {
|
|
8019
8019
|
let at = 0;
|
|
8020
8020
|
return runs.map((r) => {
|
|
@@ -8027,7 +8027,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8027
8027
|
let lines = [];
|
|
8028
8028
|
let missing = _nullishCoalesce(layer.missingFonts, () => ( []));
|
|
8029
8029
|
if (shaper) {
|
|
8030
|
-
const layout =
|
|
8030
|
+
const layout = _chunkJCXMJUQOcjs.layoutText.call(void 0, layer, shaper);
|
|
8031
8031
|
const r = (n) => Math.round(n * 1e3) / 1e3;
|
|
8032
8032
|
lines = layout.lines.map((l) => ({ start: l.start, end: l.end, baseline: r(l.baseline), width: r(l.width) }));
|
|
8033
8033
|
if (layer.rendering === "stored") missing = layout.missingFonts;
|
|
@@ -8057,25 +8057,25 @@ var ImageEditorController = (_class10 = class {
|
|
|
8057
8057
|
* text wrapped in `box`. Refused without a text shaper. Returns its id.
|
|
8058
8058
|
*/
|
|
8059
8059
|
addTextLayer(init) {
|
|
8060
|
-
const text =
|
|
8061
|
-
if (!Number.isFinite(init.x) || !Number.isFinite(init.y)) throw new (0,
|
|
8062
|
-
const style =
|
|
8063
|
-
const paragraph =
|
|
8060
|
+
const text = _chunkPA3IMPPScjs.normalizeText.call(void 0, init.text);
|
|
8061
|
+
if (!Number.isFinite(init.x) || !Number.isFinite(init.y)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("x and y must be numbers (document pixels).");
|
|
8062
|
+
const style = _chunkPA3IMPPScjs.patchTextStyle.call(void 0, { ..._chunkJCXMJUQOcjs.DEFAULT_TEXT_STYLE, color: this.state.paint.foreground }, _nullishCoalesce(init.style, () => ( {})));
|
|
8063
|
+
const paragraph = _chunkPA3IMPPScjs.patchParagraphStyle.call(void 0, {}, _nullishCoalesce(init.paragraph, () => ( {})));
|
|
8064
8064
|
let frame = { kind: "point" };
|
|
8065
8065
|
if (init.box) {
|
|
8066
8066
|
const { width, height } = init.box;
|
|
8067
|
-
if (!(Number.isFinite(width) && width >= 1 && Number.isFinite(height) && height >= 1)) throw new (0,
|
|
8067
|
+
if (!(Number.isFinite(width) && width >= 1 && Number.isFinite(height) && height >= 1)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("box.width and box.height must be at least 1 pixel.");
|
|
8068
8068
|
frame = { kind: "box", width, height };
|
|
8069
8069
|
}
|
|
8070
|
-
if (init.rotation !== void 0 && !Number.isFinite(init.rotation)) throw new (0,
|
|
8071
|
-
if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0,
|
|
8072
|
-
if (init.blend !== void 0 && !_chunkCWM3CUUXcjs.isBlendMode.call(void 0, init.blend)) throw new (0,
|
|
8070
|
+
if (init.rotation !== void 0 && !Number.isFinite(init.rotation)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("rotation must be a number of degrees.");
|
|
8071
|
+
if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("opacity must be between 0 and 1.");
|
|
8072
|
+
if (init.blend !== void 0 && !_chunkCWM3CUUXcjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
|
|
8073
8073
|
const t = [1, 0, 0, 1, init.x, init.y];
|
|
8074
|
-
const transform = init.rotation ?
|
|
8075
|
-
const layer =
|
|
8074
|
+
const transform = init.rotation ? _chunkJCXMJUQOcjs.multiplyMatrices.call(void 0, t, _chunkJCXMJUQOcjs.rotateMatrix.call(void 0, init.rotation, { x: init.x, y: init.y })) : t;
|
|
8075
|
+
const layer = _chunkPA3IMPPScjs.createTypeLayer.call(void 0, { text, runs: [{ length: text.length, style }], paragraphs: [{ length: text.length, style: paragraph }], frame, transform, name: _nullishCoalesce(init.name, () => ( _chunkPA3IMPPScjs.typeLayerName.call(void 0, text))) }, this.textEnv());
|
|
8076
8076
|
if (init.opacity !== void 0) layer.opacity = init.opacity;
|
|
8077
8077
|
if (init.blend !== void 0) layer.blend = init.blend;
|
|
8078
|
-
const next =
|
|
8078
|
+
const next = _chunkPA3IMPPScjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
|
|
8079
8079
|
this.commitLayers(next, () => {
|
|
8080
8080
|
this.state.activeLayerId = layer.id;
|
|
8081
8081
|
this.state.activeTarget = "pixels";
|
|
@@ -8087,28 +8087,28 @@ var ImageEditorController = (_class10 = class {
|
|
|
8087
8087
|
* `start`. One undo step unless `commitToHistory` is false (typing). Returns the layer.
|
|
8088
8088
|
*/
|
|
8089
8089
|
setText(id, text, range = {}, commitToHistory = true) {
|
|
8090
|
-
const layer =
|
|
8091
|
-
const insert =
|
|
8092
|
-
const [start, end] =
|
|
8093
|
-
const { layers } =
|
|
8090
|
+
const layer = _chunkPA3IMPPScjs.requireTypeLayer.call(void 0, this.state.layers, id);
|
|
8091
|
+
const insert = _chunkPA3IMPPScjs.normalizeText.call(void 0, text);
|
|
8092
|
+
const [start, end] = _chunkPA3IMPPScjs.textRange.call(void 0, layer.text, range.start, range.end);
|
|
8093
|
+
const { layers } = _chunkPA3IMPPScjs.updateTypeLayer.call(void 0, this.state.layers, id, (l) => _chunkPA3IMPPScjs.replaceTextRange.call(void 0, l, start, end, insert), this.textEnv(), "edit its text");
|
|
8094
8094
|
this.commitLayers(layers, void 0, commitToHistory);
|
|
8095
8095
|
return this.typeInfo(id);
|
|
8096
8096
|
}
|
|
8097
8097
|
/** Sets character style fields over [start, end) (default all), one undo step. Returns the layer. */
|
|
8098
8098
|
setTextStyle(id, style, range = {}, commitToHistory = true) {
|
|
8099
|
-
const layer =
|
|
8100
|
-
const [start, end] =
|
|
8101
|
-
if (!Object.keys(style).length) throw new (0,
|
|
8102
|
-
|
|
8103
|
-
const { layers } =
|
|
8099
|
+
const layer = _chunkPA3IMPPScjs.requireTypeLayer.call(void 0, this.state.layers, id);
|
|
8100
|
+
const [start, end] = _chunkPA3IMPPScjs.textRange.call(void 0, layer.text, range.start, range.end);
|
|
8101
|
+
if (!Object.keys(style).length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give at least one style field to set.");
|
|
8102
|
+
_chunkPA3IMPPScjs.patchTextStyle.call(void 0, _chunkJCXMJUQOcjs.DEFAULT_TEXT_STYLE, style);
|
|
8103
|
+
const { layers } = _chunkPA3IMPPScjs.updateTypeLayer.call(void 0,
|
|
8104
8104
|
this.state.layers,
|
|
8105
8105
|
id,
|
|
8106
8106
|
(l) => {
|
|
8107
8107
|
if (start === end) {
|
|
8108
|
-
if (l.text.length) throw new (0,
|
|
8109
|
-
return { runs: [{ length: 0, style:
|
|
8108
|
+
if (l.text.length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("The range is empty; give start < end (or leave both out for the whole text).");
|
|
8109
|
+
return { runs: [{ length: 0, style: _chunkPA3IMPPScjs.patchTextStyle.call(void 0, _chunkJCXMJUQOcjs.styleAt.call(void 0, l.runs, 0, _chunkJCXMJUQOcjs.DEFAULT_TEXT_STYLE), style) }] };
|
|
8110
8110
|
}
|
|
8111
|
-
return { runs:
|
|
8111
|
+
return { runs: _chunkJCXMJUQOcjs.restyleRange.call(void 0, l.runs, start, end, (s) => _chunkPA3IMPPScjs.patchTextStyle.call(void 0, s, style)) };
|
|
8112
8112
|
},
|
|
8113
8113
|
this.textEnv(),
|
|
8114
8114
|
"restyle its text"
|
|
@@ -8118,11 +8118,11 @@ var ImageEditorController = (_class10 = class {
|
|
|
8118
8118
|
}
|
|
8119
8119
|
/** Sets paragraph style fields on every paragraph that [start, end) touches (default all), one undo step. */
|
|
8120
8120
|
setParagraphStyle(id, style, range = {}, commitToHistory = true) {
|
|
8121
|
-
const layer =
|
|
8122
|
-
const [start, end] =
|
|
8123
|
-
if (!Object.keys(style).length) throw new (0,
|
|
8124
|
-
|
|
8125
|
-
const { layers } =
|
|
8121
|
+
const layer = _chunkPA3IMPPScjs.requireTypeLayer.call(void 0, this.state.layers, id);
|
|
8122
|
+
const [start, end] = _chunkPA3IMPPScjs.textRange.call(void 0, layer.text, range.start, range.end);
|
|
8123
|
+
if (!Object.keys(style).length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give at least one paragraph field to set.");
|
|
8124
|
+
_chunkPA3IMPPScjs.patchParagraphStyle.call(void 0, {}, style);
|
|
8125
|
+
const { layers } = _chunkPA3IMPPScjs.updateTypeLayer.call(void 0,
|
|
8126
8126
|
this.state.layers,
|
|
8127
8127
|
id,
|
|
8128
8128
|
(l) => {
|
|
@@ -8131,7 +8131,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8131
8131
|
const a = at;
|
|
8132
8132
|
at += p.length;
|
|
8133
8133
|
const touches = a < end && at > start || start === end && start >= a && (start < at || at === l.text.length);
|
|
8134
|
-
return touches || !l.text.length ? { length: p.length, style:
|
|
8134
|
+
return touches || !l.text.length ? { length: p.length, style: _chunkPA3IMPPScjs.patchParagraphStyle.call(void 0, p.style, style) } : p;
|
|
8135
8135
|
});
|
|
8136
8136
|
return { paragraphs };
|
|
8137
8137
|
},
|
|
@@ -8147,21 +8147,21 @@ var ImageEditorController = (_class10 = class {
|
|
|
8147
8147
|
* paragraph. Also resizes a box. One undo step.
|
|
8148
8148
|
*/
|
|
8149
8149
|
setTextFrame(id, frame, commitToHistory = true) {
|
|
8150
|
-
const layer =
|
|
8151
|
-
if (frame.kind === "box" && !(Number.isFinite(frame.width) && frame.width >= 1 && Number.isFinite(frame.height) && frame.height >= 1)) throw new (0,
|
|
8152
|
-
if (frame.kind !== "box" && frame.kind !== "point") throw new (0,
|
|
8150
|
+
const layer = _chunkPA3IMPPScjs.requireTypeLayer.call(void 0, this.state.layers, id);
|
|
8151
|
+
if (frame.kind === "box" && !(Number.isFinite(frame.width) && frame.width >= 1 && Number.isFinite(frame.height) && frame.height >= 1)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("width and height must be at least 1 pixel.");
|
|
8152
|
+
if (frame.kind !== "box" && frame.kind !== "point") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("kind must be point or box.");
|
|
8153
8153
|
const shaper = this.getTextShaper();
|
|
8154
|
-
const { layers } =
|
|
8154
|
+
const { layers } = _chunkPA3IMPPScjs.updateTypeLayer.call(void 0,
|
|
8155
8155
|
this.state.layers,
|
|
8156
8156
|
id,
|
|
8157
8157
|
(l) => {
|
|
8158
8158
|
if (frame.kind === "box" && l.frame.kind === "box") return { frame: { kind: "box", width: frame.width, height: frame.height } };
|
|
8159
|
-
if (!shaper) throw new (0,
|
|
8160
|
-
const lines =
|
|
8159
|
+
if (!shaper) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Changing between point and paragraph text needs a text shaper to measure the text.");
|
|
8160
|
+
const lines = _chunkJCXMJUQOcjs.layoutText.call(void 0, l, shaper).lines;
|
|
8161
8161
|
const first = lines[0];
|
|
8162
8162
|
const dx = frame.kind === "box" ? first ? first.x : 0 : 0;
|
|
8163
8163
|
const dy = frame.kind === "box" ? first ? first.baseline - first.ascent : 0 : first ? first.baseline : 0;
|
|
8164
|
-
const m =
|
|
8164
|
+
const m = _chunkPA3IMPPScjs.textMatrix.call(void 0, l);
|
|
8165
8165
|
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]];
|
|
8166
8166
|
const nextFrame = frame.kind === "box" ? { kind: "box", width: frame.width, height: frame.height } : { kind: "point" };
|
|
8167
8167
|
return { frame: nextFrame, transform: shifted };
|
|
@@ -8178,21 +8178,21 @@ var ImageEditorController = (_class10 = class {
|
|
|
8178
8178
|
* `warnings` says when other colours were dropped. One undo step.
|
|
8179
8179
|
*/
|
|
8180
8180
|
convertTextToShape(id) {
|
|
8181
|
-
const layer =
|
|
8182
|
-
|
|
8181
|
+
const layer = _chunkPA3IMPPScjs.requireTypeLayer.call(void 0, this.state.layers, id);
|
|
8182
|
+
_chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "all", "convert it");
|
|
8183
8183
|
const shaper = this.getTextShaper();
|
|
8184
|
-
if (!shaper) throw new (0,
|
|
8185
|
-
const parts =
|
|
8186
|
-
const subpaths = parts.flatMap((p) =>
|
|
8187
|
-
if (!subpaths.length) throw new (0,
|
|
8184
|
+
if (!shaper) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Convert to Shape needs a text shaper that gives glyph outlines; none is set here.");
|
|
8185
|
+
const parts = _chunkPA3IMPPScjs.textOutlines.call(void 0, layer, shaper);
|
|
8186
|
+
const subpaths = parts.flatMap((p) => _chunkJCXMJUQOcjs.bezierToSubpaths.call(void 0, p.path));
|
|
8187
|
+
if (!subpaths.length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("The text draws nothing (it is empty or only spaces), so there is no shape to make.");
|
|
8188
8188
|
const warnings = [];
|
|
8189
8189
|
const colors = new Set(layer.runs.filter((r) => r.length > 0).map((r) => `${r.style.color}/${_nullishCoalesce(r.style.opacity, () => ( 1))}`));
|
|
8190
8190
|
if (colors.size > 1) warnings.push("The text had several colours; the shape takes the first one.");
|
|
8191
|
-
const missing =
|
|
8191
|
+
const missing = _chunkJCXMJUQOcjs.layoutText.call(void 0, layer, shaper).missingFonts;
|
|
8192
8192
|
if (missing.length) warnings.push(`Missing fonts were drawn with a fallback: ${missing.join(", ")}.`);
|
|
8193
|
-
const first = _nullishCoalesce(_optionalChain([layer, 'access', _294 => _294.runs, 'access', _295 => _295.find, 'call', _296 => _296((r) => r.length > 0), 'optionalAccess', _297 => _297.style]), () => (
|
|
8193
|
+
const first = _nullishCoalesce(_optionalChain([layer, 'access', _294 => _294.runs, 'access', _295 => _295.find, 'call', _296 => _296((r) => r.length > 0), 'optionalAccess', _297 => _297.style]), () => ( _chunkJCXMJUQOcjs.DEFAULT_TEXT_STYLE));
|
|
8194
8194
|
const fill = first.opacity !== void 0 && first.opacity !== 1 ? { type: "color", color: first.color, opacity: first.opacity } : { type: "color", color: first.color };
|
|
8195
|
-
const shape =
|
|
8195
|
+
const shape = _chunkPA3IMPPScjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
|
|
8196
8196
|
const keep = { visible: layer.visible, opacity: layer.opacity, blend: layer.blend };
|
|
8197
8197
|
for (const k of ["clipped", "mask", "locks", "effects", "fillOpacity"]) if (layer[k] !== void 0) keep[k] = layer[k];
|
|
8198
8198
|
this.commitLayers(_chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, id, () => ({ ...shape, ...keep })));
|
|
@@ -8200,23 +8200,23 @@ var ImageEditorController = (_class10 = class {
|
|
|
8200
8200
|
}
|
|
8201
8201
|
/** The layout of a type layer (lines, characters, bounds in text space), or `null` without a shaper. */
|
|
8202
8202
|
getTextLayout(id) {
|
|
8203
|
-
const layer =
|
|
8203
|
+
const layer = _chunkPA3IMPPScjs.requireTypeLayer.call(void 0, this.state.layers, id);
|
|
8204
8204
|
const shaper = this.getTextShaper();
|
|
8205
|
-
return shaper ?
|
|
8205
|
+
return shaper ? _chunkJCXMJUQOcjs.layoutText.call(void 0, layer, shaper) : null;
|
|
8206
8206
|
}
|
|
8207
8207
|
/** The text index nearest a document point (for clicks on a type layer). */
|
|
8208
8208
|
textIndexAt(id, point) {
|
|
8209
|
-
const layer =
|
|
8209
|
+
const layer = _chunkPA3IMPPScjs.requireTypeLayer.call(void 0, this.state.layers, id);
|
|
8210
8210
|
const layout = this.getTextLayout(id);
|
|
8211
|
-
return layout ?
|
|
8211
|
+
return layout ? _chunkJCXMJUQOcjs.textIndexAt.call(void 0, layout, _chunkPA3IMPPScjs.toTextSpace.call(void 0, layer, point)) : layer.text.length;
|
|
8212
8212
|
}
|
|
8213
8213
|
/** The caret at text index `index` as a document-space segment (top to bottom), for drawing it. */
|
|
8214
8214
|
textCaret(id, index) {
|
|
8215
|
-
const layer =
|
|
8215
|
+
const layer = _chunkPA3IMPPScjs.requireTypeLayer.call(void 0, this.state.layers, id);
|
|
8216
8216
|
const layout = this.getTextLayout(id);
|
|
8217
8217
|
if (!layout) return null;
|
|
8218
|
-
const c =
|
|
8219
|
-
const m =
|
|
8218
|
+
const c = _chunkJCXMJUQOcjs.caretAt.call(void 0, layout, Math.max(0, Math.min(layer.text.length, index)));
|
|
8219
|
+
const m = _chunkPA3IMPPScjs.textMatrix.call(void 0, layer);
|
|
8220
8220
|
const at = (x, y) => ({ x: m[0] * x + m[2] * y + m[4], y: m[1] * x + m[3] * y + m[5] });
|
|
8221
8221
|
return { top: at(c.x, c.top), bottom: at(c.x, c.bottom), line: c.line };
|
|
8222
8222
|
}
|
|
@@ -8227,14 +8227,14 @@ var ImageEditorController = (_class10 = class {
|
|
|
8227
8227
|
}
|
|
8228
8228
|
/** One component from tool or UI input (validated). */
|
|
8229
8229
|
componentFrom(spec, path) {
|
|
8230
|
-
const op =
|
|
8231
|
-
if (spec.shape !== void 0 && spec.subpaths !== void 0) throw new (0,
|
|
8232
|
-
if (spec.shape !== void 0) return
|
|
8233
|
-
if (spec.subpaths !== void 0) return { op, subpaths:
|
|
8234
|
-
throw new (0,
|
|
8230
|
+
const op = _chunkPA3IMPPScjs.requireOperation.call(void 0, spec.op, `${path}op`);
|
|
8231
|
+
if (spec.shape !== void 0 && spec.subpaths !== void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Give ${path}shape or ${path}subpaths, not both.`);
|
|
8232
|
+
if (spec.shape !== void 0) return _chunkPA3IMPPScjs.liveComponent.call(void 0, _chunkPA3IMPPScjs.normalizeLiveShape.call(void 0, spec.shape, `${path}shape`), op);
|
|
8233
|
+
if (spec.subpaths !== void 0) return { op, subpaths: _chunkPA3IMPPScjs.normalizeSubpaths.call(void 0, spec.subpaths, `${path}subpaths`) };
|
|
8234
|
+
throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`${path}shape (a live shape: { kind: rect | ellipse | polygon | star | line, \u2026 }) or ${path}subpaths (anchors or SVG path data) is required.`);
|
|
8235
8235
|
}
|
|
8236
8236
|
shapeInfo(id) {
|
|
8237
|
-
const layer =
|
|
8237
|
+
const layer = _chunkPA3IMPPScjs.requireShapeLayer.call(void 0, this.state.layers, id);
|
|
8238
8238
|
const r = (n) => Math.round(n * 1e3) / 1e3;
|
|
8239
8239
|
const box = (b) => b ? { x: r(b.x), y: r(b.y), width: r(b.width), height: r(b.height) } : null;
|
|
8240
8240
|
const info = {
|
|
@@ -8244,13 +8244,13 @@ var ImageEditorController = (_class10 = class {
|
|
|
8244
8244
|
index,
|
|
8245
8245
|
op: c.op,
|
|
8246
8246
|
live: c.live ? JSON.parse(JSON.stringify(c.live)) : null,
|
|
8247
|
-
subpaths:
|
|
8248
|
-
bounds: box(
|
|
8247
|
+
subpaths: _chunkJCXMJUQOcjs.roundSubpaths.call(void 0, c.subpaths),
|
|
8248
|
+
bounds: box(_chunkPA3IMPPScjs.shapeGeometryBounds.call(void 0, { components: [c] }))
|
|
8249
8249
|
})),
|
|
8250
8250
|
fillRule: _nullishCoalesce(layer.fillRule, () => ( "nonzero")),
|
|
8251
8251
|
fill: layer.fill ? JSON.parse(JSON.stringify(layer.fill)) : null,
|
|
8252
8252
|
stroke: layer.stroke ? JSON.parse(JSON.stringify(layer.stroke)) : null,
|
|
8253
|
-
geometryBounds: box(
|
|
8253
|
+
geometryBounds: box(_chunkPA3IMPPScjs.shapeGeometryBounds.call(void 0, layer)),
|
|
8254
8254
|
bounds: this.getLayerBounds(id)
|
|
8255
8255
|
};
|
|
8256
8256
|
if (layer.annotation) info.annotationId = layer.annotation.id;
|
|
@@ -8267,17 +8267,17 @@ var ImageEditorController = (_class10 = class {
|
|
|
8267
8267
|
*/
|
|
8268
8268
|
addShapeLayer(init) {
|
|
8269
8269
|
const specs = _optionalChain([init, 'access', _302 => _302.components, 'optionalAccess', _303 => _303.length]) ? init.components : [init];
|
|
8270
|
-
if (_optionalChain([init, 'access', _304 => _304.components, 'optionalAccess', _305 => _305.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0,
|
|
8270
|
+
if (_optionalChain([init, 'access', _304 => _304.components, 'optionalAccess', _305 => _305.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
|
|
8271
8271
|
const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _306 => _306.components, 'optionalAccess', _307 => _307.length]) ? `components[${i}].` : ""));
|
|
8272
|
-
const stroke = init.stroke ?
|
|
8272
|
+
const stroke = init.stroke ? _chunkPA3IMPPScjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
|
|
8273
8273
|
const openOnly = components.every((c) => !c.live && c.subpaths.every((sp) => !sp.closed));
|
|
8274
|
-
const fill = init.fill === void 0 ? stroke && openOnly ? null :
|
|
8275
|
-
if (!fill && !stroke) throw new (0,
|
|
8276
|
-
if (init.fillRule !== void 0 && init.fillRule !== "nonzero" && init.fillRule !== "evenodd") throw new (0,
|
|
8277
|
-
if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0,
|
|
8278
|
-
if (init.blend !== void 0 && !_chunkCWM3CUUXcjs.isBlendMode.call(void 0, init.blend)) throw new (0,
|
|
8279
|
-
const layer =
|
|
8280
|
-
const next =
|
|
8274
|
+
const fill = init.fill === void 0 ? stroke && openOnly ? null : _chunkPA3IMPPScjs.normalizeShapePaint.call(void 0, this.state.paint.foreground, "fill") : init.fill === null ? null : _chunkPA3IMPPScjs.normalizeShapePaint.call(void 0, init.fill, "fill");
|
|
8275
|
+
if (!fill && !stroke) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("A shape with neither fill nor stroke draws nothing; give fill or stroke.");
|
|
8276
|
+
if (init.fillRule !== void 0 && init.fillRule !== "nonzero" && init.fillRule !== "evenodd") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
|
|
8277
|
+
if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("opacity must be between 0 and 1.");
|
|
8278
|
+
if (init.blend !== void 0 && !_chunkCWM3CUUXcjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
|
|
8279
|
+
const layer = _chunkPA3IMPPScjs.createShapeLayer.call(void 0, { components, fill, stroke, fillRule: init.fillRule, name: init.name, opacity: init.opacity, blend: init.blend }, this.shapeEnv());
|
|
8280
|
+
const next = _chunkPA3IMPPScjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
|
|
8281
8281
|
this.commitLayers(next, () => {
|
|
8282
8282
|
this.state.activeLayerId = layer.id;
|
|
8283
8283
|
this.state.activeTarget = "pixels";
|
|
@@ -8290,18 +8290,18 @@ var ImageEditorController = (_class10 = class {
|
|
|
8290
8290
|
* only those settings of the current stroke. Returns the shape.
|
|
8291
8291
|
*/
|
|
8292
8292
|
setShapeStyle(id, changes, commitToHistory = true) {
|
|
8293
|
-
const layer =
|
|
8294
|
-
const fill = changes.fill === void 0 ? layer.fill : changes.fill === null ? null :
|
|
8295
|
-
const stroke = changes.stroke === void 0 ? layer.stroke : changes.stroke === null ? null :
|
|
8296
|
-
if (changes.fillRule !== void 0 && changes.fillRule !== "nonzero" && changes.fillRule !== "evenodd") throw new (0,
|
|
8293
|
+
const layer = _chunkPA3IMPPScjs.requireShapeLayer.call(void 0, this.state.layers, id);
|
|
8294
|
+
const fill = changes.fill === void 0 ? layer.fill : changes.fill === null ? null : _chunkPA3IMPPScjs.normalizeShapePaint.call(void 0, changes.fill, "fill");
|
|
8295
|
+
const stroke = changes.stroke === void 0 ? layer.stroke : changes.stroke === null ? null : _chunkPA3IMPPScjs.normalizeShapeStroke.call(void 0, changes.stroke, "stroke", layer.stroke);
|
|
8296
|
+
if (changes.fillRule !== void 0 && changes.fillRule !== "nonzero" && changes.fillRule !== "evenodd") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
|
|
8297
8297
|
const fillRule = _nullishCoalesce(_nullishCoalesce(changes.fillRule, () => ( layer.fillRule)), () => ( "nonzero"));
|
|
8298
|
-
const { layers } =
|
|
8298
|
+
const { layers } = _chunkPA3IMPPScjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ fill, stroke, fillRule: fillRule === "nonzero" ? void 0 : fillRule }), this.shapeEnv(), "restyle it");
|
|
8299
8299
|
this.commitLayers(layers, void 0, commitToHistory);
|
|
8300
8300
|
return this.shapeInfo(id);
|
|
8301
8301
|
}
|
|
8302
8302
|
componentIndex(layer, index) {
|
|
8303
8303
|
if (!Number.isInteger(index) || index < 0 || index >= layer.components.length) {
|
|
8304
|
-
throw new (0,
|
|
8304
|
+
throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`componentIndex must be 0..${layer.components.length - 1} (get_shape_layer lists the components), got ${String(index)}.`);
|
|
8305
8305
|
}
|
|
8306
8306
|
return index;
|
|
8307
8307
|
}
|
|
@@ -8311,36 +8311,36 @@ var ImageEditorController = (_class10 = class {
|
|
|
8311
8311
|
* the live shape) or its operation. Returns the shape.
|
|
8312
8312
|
*/
|
|
8313
8313
|
setShapeComponent(id, index, change, commitToHistory = true) {
|
|
8314
|
-
const layer =
|
|
8314
|
+
const layer = _chunkPA3IMPPScjs.requireShapeLayer.call(void 0, this.state.layers, id);
|
|
8315
8315
|
const i = this.componentIndex(layer, index);
|
|
8316
8316
|
const current = layer.components[i];
|
|
8317
8317
|
let shape = change.shape;
|
|
8318
8318
|
if (shape && current.live && shape.kind === void 0) shape = { ...current.live, ...shape };
|
|
8319
8319
|
else if (shape && current.live && shape.kind === current.live.kind) shape = { ...current.live, ...shape };
|
|
8320
|
-
const next = shape !== void 0 || change.subpaths !== void 0 ? this.componentFrom({ ...change, shape, op: _nullishCoalesce(change.op, () => ( current.op)) }, "") : { ...current, op:
|
|
8320
|
+
const next = shape !== void 0 || change.subpaths !== void 0 ? this.componentFrom({ ...change, shape, op: _nullishCoalesce(change.op, () => ( current.op)) }, "") : { ...current, op: _chunkPA3IMPPScjs.requireOperation.call(void 0, change.op) };
|
|
8321
8321
|
const components = layer.components.map((c, k) => k === i ? next : c);
|
|
8322
|
-
const { layers } =
|
|
8322
|
+
const { layers } = _chunkPA3IMPPScjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
|
|
8323
8323
|
this.commitLayers(layers, void 0, commitToHistory);
|
|
8324
8324
|
return this.shapeInfo(id);
|
|
8325
8325
|
}
|
|
8326
8326
|
/** Adds a component to a shape (path operations), on top unless `index` is given (one undo step). Returns the shape. */
|
|
8327
8327
|
addShapeComponent(id, spec, index) {
|
|
8328
|
-
const layer =
|
|
8328
|
+
const layer = _chunkPA3IMPPScjs.requireShapeLayer.call(void 0, this.state.layers, id);
|
|
8329
8329
|
const c = this.componentFrom(spec, "");
|
|
8330
8330
|
const at = index === void 0 ? layer.components.length : index;
|
|
8331
|
-
if (!Number.isInteger(at) || at < 0 || at > layer.components.length) throw new (0,
|
|
8331
|
+
if (!Number.isInteger(at) || at < 0 || at > layer.components.length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`index must be 0..${layer.components.length}, got ${String(index)}.`);
|
|
8332
8332
|
const components = [...layer.components.slice(0, at), c, ...layer.components.slice(at)];
|
|
8333
|
-
const { layers } =
|
|
8333
|
+
const { layers } = _chunkPA3IMPPScjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
|
|
8334
8334
|
this.commitLayers(layers);
|
|
8335
8335
|
return this.shapeInfo(id);
|
|
8336
8336
|
}
|
|
8337
8337
|
/** Removes one component of a shape (one undo step); the last one cannot go (delete the layer instead). Returns the shape. */
|
|
8338
8338
|
removeShapeComponent(id, index) {
|
|
8339
|
-
const layer =
|
|
8339
|
+
const layer = _chunkPA3IMPPScjs.requireShapeLayer.call(void 0, this.state.layers, id);
|
|
8340
8340
|
const i = this.componentIndex(layer, index);
|
|
8341
|
-
if (layer.components.length === 1) throw new (0,
|
|
8341
|
+
if (layer.components.length === 1) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("This is the shape's only component; delete the layer instead (delete_layer).");
|
|
8342
8342
|
const components = layer.components.filter((_, k) => k !== i);
|
|
8343
|
-
const { layers } =
|
|
8343
|
+
const { layers } = _chunkPA3IMPPScjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
|
|
8344
8344
|
this.commitLayers(layers);
|
|
8345
8345
|
return this.shapeInfo(id);
|
|
8346
8346
|
}
|
|
@@ -8349,10 +8349,10 @@ var ImageEditorController = (_class10 = class {
|
|
|
8349
8349
|
* shapes become paths), as one undo step. Returns the shape.
|
|
8350
8350
|
*/
|
|
8351
8351
|
mergeShapeComponents(id) {
|
|
8352
|
-
const layer =
|
|
8353
|
-
if (layer.components.length < 2) throw new (0,
|
|
8354
|
-
const components =
|
|
8355
|
-
const { layers } =
|
|
8352
|
+
const layer = _chunkPA3IMPPScjs.requireShapeLayer.call(void 0, this.state.layers, id);
|
|
8353
|
+
if (layer.components.length < 2) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("The shape has one component; there is nothing to merge.");
|
|
8354
|
+
const components = _chunkPA3IMPPScjs.mergeShapeComponents.call(void 0, layer.components, layer.fillRule);
|
|
8355
|
+
const { layers } = _chunkPA3IMPPScjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components, fillRule: void 0 }), this.shapeEnv(), "edit its path");
|
|
8356
8356
|
this.commitLayers(layers);
|
|
8357
8357
|
return this.shapeInfo(id);
|
|
8358
8358
|
}
|
|
@@ -8362,8 +8362,8 @@ var ImageEditorController = (_class10 = class {
|
|
|
8362
8362
|
* step. Returns the layer id.
|
|
8363
8363
|
*/
|
|
8364
8364
|
async rasterizeLayer(id) {
|
|
8365
|
-
const layer =
|
|
8366
|
-
|
|
8365
|
+
const layer = _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id).layer;
|
|
8366
|
+
_chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "all", "rasterize it");
|
|
8367
8367
|
const { width, height } = this.naturalSize;
|
|
8368
8368
|
const canvas = { x: 0, y: 0, width, height };
|
|
8369
8369
|
let next;
|
|
@@ -8379,8 +8379,8 @@ var ImageEditorController = (_class10 = class {
|
|
|
8379
8379
|
if (layer.locks) next.locks = layer.locks;
|
|
8380
8380
|
if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
|
|
8381
8381
|
} else if (layer.type === "pixel") {
|
|
8382
|
-
if (!_optionalChain([layer, 'access', _308 => _308.filters, 'optionalAccess', _309 => _309.length])) throw new (0,
|
|
8383
|
-
|
|
8382
|
+
if (!_optionalChain([layer, 'access', _308 => _308.filters, 'optionalAccess', _309 => _309.length])) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
|
|
8383
|
+
_chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
|
|
8384
8384
|
const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
|
|
8385
8385
|
const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
|
|
8386
8386
|
delete content.mask;
|
|
@@ -8397,10 +8397,10 @@ var ImageEditorController = (_class10 = class {
|
|
|
8397
8397
|
} else if (layer.type === "smart") {
|
|
8398
8398
|
return this.rasterizeSmartObject(id);
|
|
8399
8399
|
} else if (layer.type === "shape" || layer.type === "type") {
|
|
8400
|
-
next = layer.type === "shape" ?
|
|
8400
|
+
next = layer.type === "shape" ? _chunkPA3IMPPScjs.shapeAsPixelLayer.call(void 0, layer) : _chunkPA3IMPPScjs.typeAsPixelLayer.call(void 0, layer);
|
|
8401
8401
|
if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _310 => _310.annotation, 'optionalAccess', _311 => _311.id])) this.state.selectedAnnotationId = null;
|
|
8402
8402
|
} else {
|
|
8403
|
-
throw new (0,
|
|
8403
|
+
throw new (0, _chunkPA3IMPPScjs.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.`);
|
|
8404
8404
|
}
|
|
8405
8405
|
this.commitLayers(_chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, id, () => next));
|
|
8406
8406
|
return id;
|
|
@@ -8425,7 +8425,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8425
8425
|
setColorMode(mode, options = {}) {
|
|
8426
8426
|
let next;
|
|
8427
8427
|
if (mode === "rgb") {
|
|
8428
|
-
if (options.profile !== void 0) throw new (0,
|
|
8428
|
+
if (options.profile !== void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("An RGB document takes no CMYK profile; use assign_profile for its working space.");
|
|
8429
8429
|
next = null;
|
|
8430
8430
|
} else if (mode === "lab") next = { mode: "lab" };
|
|
8431
8431
|
else if (mode === "cmyk") {
|
|
@@ -8433,14 +8433,14 @@ var ImageEditorController = (_class10 = class {
|
|
|
8433
8433
|
try {
|
|
8434
8434
|
doc = documentProfile(_nullishCoalesce(options.profile, () => ( "coated-cmyk")));
|
|
8435
8435
|
} catch (e) {
|
|
8436
|
-
throw new (0,
|
|
8436
|
+
throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
|
|
8437
8437
|
}
|
|
8438
8438
|
const cs = resolveProfile(doc).colorSpace;
|
|
8439
|
-
if (cs !== "cmyk") throw new (0,
|
|
8439
|
+
if (cs !== "cmyk") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`CMYK mode needs a CMYK profile; "${doc.name}" is ${cs.toUpperCase()}.`);
|
|
8440
8440
|
const intent = _nullishCoalesce(options.intent, () => ( "relative"));
|
|
8441
|
-
if (!_chunkBROJYMWUcjs.INTENTS.includes(intent)) throw new (0,
|
|
8441
|
+
if (!_chunkBROJYMWUcjs.INTENTS.includes(intent)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkBROJYMWUcjs.INTENTS.join(", ")}.`);
|
|
8442
8442
|
next = { mode: "cmyk", profile: doc, intent };
|
|
8443
|
-
} else throw new (0,
|
|
8443
|
+
} else throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown colour mode "${String(mode)}"; use rgb, cmyk or lab.`);
|
|
8444
8444
|
this.recordHistory();
|
|
8445
8445
|
if (next) this.state.colorMode = next;
|
|
8446
8446
|
else delete this.state.colorMode;
|
|
@@ -8453,10 +8453,10 @@ var ImageEditorController = (_class10 = class {
|
|
|
8453
8453
|
try {
|
|
8454
8454
|
doc = documentProfile(profile);
|
|
8455
8455
|
} catch (e) {
|
|
8456
|
-
throw new (0,
|
|
8456
|
+
throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
|
|
8457
8457
|
}
|
|
8458
8458
|
const cs = resolveProfile(doc).colorSpace;
|
|
8459
|
-
if (cs !== "rgb") throw new (0,
|
|
8459
|
+
if (cs !== "rgb") throw new (0, _chunkPA3IMPPScjs.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.`);
|
|
8460
8460
|
return doc;
|
|
8461
8461
|
}
|
|
8462
8462
|
/**
|
|
@@ -8482,7 +8482,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8482
8482
|
convertToProfile(profile, options = {}) {
|
|
8483
8483
|
const doc = this.rgbProfileArg(profile, "Convert to Profile");
|
|
8484
8484
|
const intent = _nullishCoalesce(options.intent, () => ( "relative"));
|
|
8485
|
-
if (!_chunkBROJYMWUcjs.INTENTS.includes(intent)) throw new (0,
|
|
8485
|
+
if (!_chunkBROJYMWUcjs.INTENTS.includes(intent)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkBROJYMWUcjs.INTENTS.join(", ")}.`);
|
|
8486
8486
|
const t = _chunkBROJYMWUcjs.Transform.create(resolveProfile(this.state.colorProfile), resolveProfile(doc), { intent, bpc: _nullishCoalesce(options.bpc, () => ( true)) });
|
|
8487
8487
|
const converted = [];
|
|
8488
8488
|
const unconverted = [];
|
|
@@ -8512,11 +8512,11 @@ var ImageEditorController = (_class10 = class {
|
|
|
8512
8512
|
else if (l.type === "pixel") next2 = { ...next2, surface: convertSurfaceColors(this.surfaceOf(l), t), source: void 0 };
|
|
8513
8513
|
else if (l.type === "shape") {
|
|
8514
8514
|
const s = next2;
|
|
8515
|
-
next2 =
|
|
8515
|
+
next2 = _chunkPA3IMPPScjs.rerenderShape.call(void 0, { ...s, fill: convertColorFields(s.fill, hex), stroke: convertColorFields(s.stroke, hex), ...s.annotation ? { annotation: convertColorFields(s.annotation, hex) } : {} }, shapeEnv);
|
|
8516
8516
|
} else if (l.type === "type") {
|
|
8517
8517
|
const recoloured = { ...next2, runs: convertColorFields(l.runs, hex) };
|
|
8518
8518
|
try {
|
|
8519
|
-
next2 =
|
|
8519
|
+
next2 = _chunkPA3IMPPScjs.rerenderText.call(void 0, recoloured, textEnv);
|
|
8520
8520
|
} catch (e29) {
|
|
8521
8521
|
next2 = { ...recoloured, surface: convertSurfaceColors(l.surface, t) };
|
|
8522
8522
|
}
|
|
@@ -8546,12 +8546,12 @@ var ImageEditorController = (_class10 = class {
|
|
|
8546
8546
|
try {
|
|
8547
8547
|
doc = documentProfile(setup.profile);
|
|
8548
8548
|
} catch (e) {
|
|
8549
|
-
throw new (0,
|
|
8549
|
+
throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
|
|
8550
8550
|
}
|
|
8551
8551
|
const intent = _nullishCoalesce(setup.intent, () => ( DEFAULT_PROOF.intent));
|
|
8552
|
-
if (!_chunkBROJYMWUcjs.INTENTS.includes(intent)) throw new (0,
|
|
8552
|
+
if (!_chunkBROJYMWUcjs.INTENTS.includes(intent)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkBROJYMWUcjs.INTENTS.join(", ")}.`);
|
|
8553
8553
|
const next = { ...DEFAULT_PROOF, ...setup, intent, profile: doc };
|
|
8554
|
-
if (!_chunkBROJYMWUcjs.canBeDestination.call(void 0, resolveProfile(doc))) throw new (0,
|
|
8554
|
+
if (!_chunkBROJYMWUcjs.canBeDestination.call(void 0, resolveProfile(doc))) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`"${doc.name}" describes a source only, so colours cannot be proofed through it.`);
|
|
8555
8555
|
this.state.proofSetup = next;
|
|
8556
8556
|
this.notify();
|
|
8557
8557
|
return next;
|
|
@@ -8568,14 +8568,14 @@ var ImageEditorController = (_class10 = class {
|
|
|
8568
8568
|
src = options.from !== void 0 ? resolveProfile(documentProfile(options.from)) : resolveProfile(this.state.colorProfile);
|
|
8569
8569
|
dst = resolveProfile(documentProfile(to));
|
|
8570
8570
|
} catch (e) {
|
|
8571
|
-
throw new (0,
|
|
8571
|
+
throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
|
|
8572
8572
|
}
|
|
8573
|
-
if (src.colorSpace !== "rgb") throw new (0,
|
|
8573
|
+
if (src.colorSpace !== "rgb") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Colours are given as #rrggbb, so the source profile must be RGB.");
|
|
8574
8574
|
const t = _chunkBROJYMWUcjs.Transform.create(src, dst, { intent: _nullishCoalesce(options.intent, () => ( "relative")), bpc: _nullishCoalesce(options.bpc, () => ( true)) });
|
|
8575
8575
|
const toLab = _chunkBROJYMWUcjs.Transform.create(src, _chunkBROJYMWUcjs.builtinProfile.call(void 0, "lab-d50"), { intent: "relative", bpc: false });
|
|
8576
8576
|
return colors.map((input) => {
|
|
8577
8577
|
const m = /^#?([0-9a-f]{6})$/i.exec(input.trim());
|
|
8578
|
-
if (!m) throw new (0,
|
|
8578
|
+
if (!m) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Invalid colour "${input}"; use #rrggbb.`);
|
|
8579
8579
|
const n = parseInt(m[1], 16);
|
|
8580
8580
|
const rgb = [(n >> 16 & 255) / 255, (n >> 8 & 255) / 255, (n & 255) / 255];
|
|
8581
8581
|
const out = new Float32Array(16);
|
|
@@ -8601,7 +8601,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8601
8601
|
* the ids of the layers whose pixels changed.
|
|
8602
8602
|
*/
|
|
8603
8603
|
setBitDepth(depth) {
|
|
8604
|
-
if (!_chunkCWM3CUUXcjs.isBitDepth.call(void 0, depth)) throw new (0,
|
|
8604
|
+
if (!_chunkCWM3CUUXcjs.isBitDepth.call(void 0, depth)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Bit depth must be 8, 16 or 32, not ${String(depth)}.`);
|
|
8605
8605
|
const changed = [];
|
|
8606
8606
|
const withMask = (l) => {
|
|
8607
8607
|
const m = l.mask;
|
|
@@ -8650,7 +8650,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8650
8650
|
* Throws `PsdError` for files that cannot be read at all.
|
|
8651
8651
|
*/
|
|
8652
8652
|
loadPsd(bytes) {
|
|
8653
|
-
const result =
|
|
8653
|
+
const result = _chunkPA3IMPPScjs.importPsd.call(void 0, bytes, { newId: () => _chunkPA3IMPPScjs.newLayerId.call(void 0, ) });
|
|
8654
8654
|
this.abandonContents();
|
|
8655
8655
|
this.recordHistory();
|
|
8656
8656
|
const s = this.state;
|
|
@@ -8660,12 +8660,12 @@ var ImageEditorController = (_class10 = class {
|
|
|
8660
8660
|
if (!this.samplePixelsOverride) this.samplePixels = null;
|
|
8661
8661
|
s.layers = this.checkPsdFonts(result);
|
|
8662
8662
|
s.crop = null;
|
|
8663
|
-
s.transform = { ...
|
|
8663
|
+
s.transform = { ..._chunkPA3IMPPScjs.DEFAULT_TRANSFORM_VALUES };
|
|
8664
8664
|
s.outputOpacity = 1;
|
|
8665
8665
|
delete s.legacyOutputBlur;
|
|
8666
8666
|
s.selection = null;
|
|
8667
8667
|
s.selectedAnnotationId = null;
|
|
8668
|
-
s.activeLayerId =
|
|
8668
|
+
s.activeLayerId = _chunkPA3IMPPScjs.defaultActiveLayerId.call(void 0, s.layers);
|
|
8669
8669
|
s.activeTarget = "pixels";
|
|
8670
8670
|
this.psdResolution = result.resolution;
|
|
8671
8671
|
if (result.patterns.length) s.patterns = result.patterns;
|
|
@@ -8710,7 +8710,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8710
8710
|
let layers = result.layers;
|
|
8711
8711
|
const missing = /* @__PURE__ */ new Map();
|
|
8712
8712
|
for (const l of types) {
|
|
8713
|
-
const fonts = shaper ?
|
|
8713
|
+
const fonts = shaper ? _chunkJCXMJUQOcjs.layoutText.call(void 0, l, shaper).missingFonts : [...new Set(l.runs.map((r) => r.style.fontFamily))];
|
|
8714
8714
|
if (!fonts.length) continue;
|
|
8715
8715
|
layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, missingFonts: fonts }));
|
|
8716
8716
|
for (const f of fonts) missing.set(f, [..._nullishCoalesce(missing.get(f), () => ( [])), l.name]);
|
|
@@ -8738,7 +8738,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8738
8738
|
const canRasterize = this.renderer.canRasterize();
|
|
8739
8739
|
await this.renderer.prepareLayerAssets(this.state.layers, width, height);
|
|
8740
8740
|
const sources = this.renderer.compositorSources(width, height);
|
|
8741
|
-
const compositor = new (0,
|
|
8741
|
+
const compositor = new (0, _chunkPA3IMPPScjs.LayerCompositor)();
|
|
8742
8742
|
const bakeMask = (layer) => {
|
|
8743
8743
|
const mask = layer.mask;
|
|
8744
8744
|
if (!_optionalChain([mask, 'optionalAccess', _322 => _322.source])) return mask;
|
|
@@ -8820,7 +8820,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8820
8820
|
out.surface = this.surfaceOf(layer);
|
|
8821
8821
|
delete out.source;
|
|
8822
8822
|
}
|
|
8823
|
-
const active = _nullishCoalesce(_optionalChain([layer, 'access', _326 => _326.filters, 'optionalAccess', _327 => _327.filter, 'call', _328 => _328(
|
|
8823
|
+
const active = _nullishCoalesce(_optionalChain([layer, 'access', _326 => _326.filters, 'optionalAccess', _327 => _327.filter, 'call', _328 => _328(_chunkPA3IMPPScjs.isActiveFilter)]), () => ( []));
|
|
8824
8824
|
if (active.length) {
|
|
8825
8825
|
add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
|
|
8826
8826
|
const content = { ...out, visible: true, opacity: 1, blend: "normal" };
|
|
@@ -8853,8 +8853,8 @@ var ImageEditorController = (_class10 = class {
|
|
|
8853
8853
|
const color = this.psdColorOptions(warnings);
|
|
8854
8854
|
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).`);
|
|
8855
8855
|
const depth = color.colorMode && this.bitDepth === 32 ? 16 : this.bitDepth;
|
|
8856
|
-
const mergedDeep = depth === 8 ? void 0 : _chunkHGTDMKNEcjs.workingToSamples.call(void 0,
|
|
8857
|
-
const result =
|
|
8856
|
+
const mergedDeep = depth === 8 ? void 0 : _chunkHGTDMKNEcjs.workingToSamples.call(void 0, _chunkPA3IMPPScjs.compositeDeep.call(void 0, prepared, canvas, sources, depth), depth);
|
|
8857
|
+
const result = _chunkPA3IMPPScjs.exportPsd.call(void 0, { width, height, layers: prepared, merged, mergedDeep, resolution: this.psdResolution, patterns: this.state.patterns, globalLight: this.state.globalLight, depth, ...color });
|
|
8858
8858
|
warnings.push(...result.warnings);
|
|
8859
8859
|
return { bytes: result.bytes, warnings, psb: result.psb, width, height };
|
|
8860
8860
|
}
|
|
@@ -8870,13 +8870,13 @@ var ImageEditorController = (_class10 = class {
|
|
|
8870
8870
|
if (!this.samplePixelsOverride) this.samplePixels = null;
|
|
8871
8871
|
if (this.state.selection && (sx !== 1 || sy !== 1)) {
|
|
8872
8872
|
this.state.selection = normalizeSelection(
|
|
8873
|
-
|
|
8873
|
+
_chunkPA3IMPPScjs.resizeSelection.call(void 0, this.state.selection, Math.round(next.dimensions.width), Math.round(next.dimensions.height))
|
|
8874
8874
|
);
|
|
8875
8875
|
}
|
|
8876
8876
|
let layers = this.state.layers;
|
|
8877
8877
|
if (sx !== 1 || sy !== 1) {
|
|
8878
8878
|
if (this.state.crop) {
|
|
8879
|
-
this.state.crop =
|
|
8879
|
+
this.state.crop = _chunkPA3IMPPScjs.clampCropToImage.call(void 0,
|
|
8880
8880
|
{
|
|
8881
8881
|
x: Math.round(this.state.crop.x * sx),
|
|
8882
8882
|
y: Math.round(this.state.crop.y * sy),
|
|
@@ -8895,17 +8895,17 @@ var ImageEditorController = (_class10 = class {
|
|
|
8895
8895
|
} else if (l.type === "shape") {
|
|
8896
8896
|
const a = l.annotation;
|
|
8897
8897
|
const scaled = a ? scaleAnnotation(a, sx, sy) : null;
|
|
8898
|
-
const fromAnnotation = scaled ?
|
|
8898
|
+
const fromAnnotation = scaled ? _chunkPA3IMPPScjs.shapeFromAnnotation.call(void 0, scaled) : null;
|
|
8899
8899
|
const m = [sx, 0, 0, sy, 0, 0];
|
|
8900
|
-
const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _336 => _336.components]), () => (
|
|
8900
|
+
const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _336 => _336.components]), () => ( _chunkPA3IMPPScjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
|
|
8901
8901
|
const moved = { ...l, components, ...fromAnnotation ? { fill: fromAnnotation.fill, stroke: fromAnnotation.stroke } : {} };
|
|
8902
8902
|
if (scaled && fromAnnotation) moved.annotation = scaled;
|
|
8903
8903
|
else delete moved.annotation;
|
|
8904
|
-
layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, l.id, () =>
|
|
8904
|
+
layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, l.id, () => _chunkPA3IMPPScjs.rerenderShape.call(void 0, moved, env));
|
|
8905
8905
|
}
|
|
8906
8906
|
}
|
|
8907
8907
|
}
|
|
8908
|
-
const bg =
|
|
8908
|
+
const bg = _chunkPA3IMPPScjs.developTarget.call(void 0, layers, null);
|
|
8909
8909
|
if (bg && bg.source !== "document") layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, bg.id, () => ({ ...bg, source: "document" }));
|
|
8910
8910
|
if (clearAnnotations) {
|
|
8911
8911
|
for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers)) if (l.type === "annotation" || (l.type === "shape" || l.type === "type") && l.annotation) layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, l.id, () => null);
|
|
@@ -8926,7 +8926,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8926
8926
|
let out;
|
|
8927
8927
|
try {
|
|
8928
8928
|
out = this.serializeState();
|
|
8929
|
-
if (_optionalChain([this, 'access', _340 => _340.state, 'access', _341 => _341.selection, 'optionalAccess', _342 => _342.bounds])) out.selection =
|
|
8929
|
+
if (_optionalChain([this, 'access', _340 => _340.state, 'access', _341 => _341.selection, 'optionalAccess', _342 => _342.bounds])) out.selection = _chunkPA3IMPPScjs.serializeSelection.call(void 0, this.state.selection);
|
|
8930
8930
|
} finally {
|
|
8931
8931
|
if (root) {
|
|
8932
8932
|
this.state = current;
|
|
@@ -8934,8 +8934,8 @@ var ImageEditorController = (_class10 = class {
|
|
|
8934
8934
|
this.viewKey = [];
|
|
8935
8935
|
}
|
|
8936
8936
|
}
|
|
8937
|
-
if (!options || out.version !==
|
|
8938
|
-
return
|
|
8937
|
+
if (!options || out.version !== _chunkPA3IMPPScjs.LAYERED_SCHEMA_VERSION) return options ? Promise.resolve(out) : out;
|
|
8938
|
+
return _chunkPA3IMPPScjs.serializeLayersExternal.call(void 0, this.rootLayers(), options.store).then(({ layers, assets, smartContents }) => smartContents ? { ...out, layers, assets, smartContents } : { ...out, layers, assets });
|
|
8939
8939
|
}
|
|
8940
8940
|
/**
|
|
8941
8941
|
* Loads a stored state whose v3 assets may live in an asset store (references other than data
|
|
@@ -8943,12 +8943,12 @@ var ImageEditorController = (_class10 = class {
|
|
|
8943
8943
|
* out and listed in `lastLoadProblems`.
|
|
8944
8944
|
*/
|
|
8945
8945
|
async loadJSONAsync(data, options = {}) {
|
|
8946
|
-
if (data.version !==
|
|
8946
|
+
if (data.version !== _chunkPA3IMPPScjs.LAYERED_SCHEMA_VERSION || !data.assets) {
|
|
8947
8947
|
this.loadJSON(data);
|
|
8948
8948
|
return;
|
|
8949
8949
|
}
|
|
8950
8950
|
const problems = [];
|
|
8951
|
-
const assets = await
|
|
8951
|
+
const assets = await _chunkPA3IMPPScjs.resolveExternalAssets.call(void 0, data.assets, options.store, problems);
|
|
8952
8952
|
this.loadJSON({ ...data, assets });
|
|
8953
8953
|
this.lastLoadProblems = [...problems, ...this.lastLoadProblems];
|
|
8954
8954
|
}
|
|
@@ -8960,7 +8960,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
8960
8960
|
let selection = null;
|
|
8961
8961
|
if (data.selection) {
|
|
8962
8962
|
try {
|
|
8963
|
-
selection = normalizeSelection(
|
|
8963
|
+
selection = normalizeSelection(_chunkPA3IMPPScjs.deserializeSelection.call(void 0, data.selection));
|
|
8964
8964
|
} catch (e30) {
|
|
8965
8965
|
selection = null;
|
|
8966
8966
|
}
|
|
@@ -8978,8 +8978,8 @@ var ImageEditorController = (_class10 = class {
|
|
|
8978
8978
|
if (isLayered(data)) {
|
|
8979
8979
|
const problems = [];
|
|
8980
8980
|
const canvas = typeof data.width === "number" && data.width > 0 && typeof data.height === "number" && data.height > 0 ? { width: data.width, height: data.height } : this.naturalSize;
|
|
8981
|
-
const storedPatterns =
|
|
8982
|
-
s.layers =
|
|
8981
|
+
const storedPatterns = _chunkPA3IMPPScjs.deserializePatterns.call(void 0, data.patterns, []);
|
|
8982
|
+
s.layers = _chunkPA3IMPPScjs.deserializeLayers.call(void 0, data.layers, {
|
|
8983
8983
|
assets: _nullishCoalesce(data.assets, () => ( {})),
|
|
8984
8984
|
problems,
|
|
8985
8985
|
smartContents: Array.isArray(data.smartContents) ? data.smartContents : [],
|
|
@@ -8993,11 +8993,11 @@ var ImageEditorController = (_class10 = class {
|
|
|
8993
8993
|
s.outputOpacity = data.opacity;
|
|
8994
8994
|
if (typeof data.legacyOutputBlur === "number" && data.legacyOutputBlur >= 0) s.legacyOutputBlur = data.legacyOutputBlur;
|
|
8995
8995
|
else delete s.legacyOutputBlur;
|
|
8996
|
-
s.activeLayerId = data.activeLayerId && _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, data.activeLayerId) ? data.activeLayerId :
|
|
8996
|
+
s.activeLayerId = data.activeLayerId && _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, data.activeLayerId) ? data.activeLayerId : _chunkPA3IMPPScjs.defaultActiveLayerId.call(void 0, s.layers);
|
|
8997
8997
|
const light = data.globalLight;
|
|
8998
8998
|
if (light && Number.isFinite(light.angle) && Number.isFinite(light.altitude)) s.globalLight = { angle: light.angle, altitude: Math.min(90, Math.max(0, light.altitude)) };
|
|
8999
8999
|
else delete s.globalLight;
|
|
9000
|
-
const patterns =
|
|
9000
|
+
const patterns = _chunkPA3IMPPScjs.deserializePatterns.call(void 0, data.patterns, problems);
|
|
9001
9001
|
if (patterns.length) s.patterns = patterns;
|
|
9002
9002
|
else delete s.patterns;
|
|
9003
9003
|
if (data.bitDepth === 16 || data.bitDepth === 32) s.bitDepth = data.bitDepth;
|
|
@@ -9013,14 +9013,14 @@ var ImageEditorController = (_class10 = class {
|
|
|
9013
9013
|
}
|
|
9014
9014
|
} else {
|
|
9015
9015
|
const { width, height } = this.naturalSize;
|
|
9016
|
-
const stack =
|
|
9016
|
+
const stack = _chunkPA3IMPPScjs.layersFromLegacy.call(void 0, data, width, height);
|
|
9017
9017
|
s.layers = stack.layers;
|
|
9018
9018
|
s.outputOpacity = stack.outputOpacity;
|
|
9019
9019
|
if (stack.legacyOutputBlur !== void 0) s.legacyOutputBlur = stack.legacyOutputBlur;
|
|
9020
9020
|
else delete s.legacyOutputBlur;
|
|
9021
9021
|
s.crop = data.crop ? { ...data.crop } : null;
|
|
9022
9022
|
s.transform = { ...data.transform };
|
|
9023
|
-
s.activeLayerId =
|
|
9023
|
+
s.activeLayerId = _chunkPA3IMPPScjs.defaultActiveLayerId.call(void 0, s.layers);
|
|
9024
9024
|
delete s.globalLight;
|
|
9025
9025
|
delete s.patterns;
|
|
9026
9026
|
delete s.bitDepth;
|
|
@@ -9034,7 +9034,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
9034
9034
|
}
|
|
9035
9035
|
serializeState() {
|
|
9036
9036
|
const { width, height } = this.naturalSize;
|
|
9037
|
-
const view =
|
|
9037
|
+
const view = _chunkPA3IMPPScjs.legacyView.call(void 0, this.stack(), width, height, null);
|
|
9038
9038
|
if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _343 => _343.state, 'access', _344 => _344.patterns, 'optionalAccess', _345 => _345.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
|
|
9039
9039
|
return {
|
|
9040
9040
|
// States without adjustment layers keep schema 1, so they round-trip unchanged.
|
|
@@ -9049,9 +9049,9 @@ var ImageEditorController = (_class10 = class {
|
|
|
9049
9049
|
annotations: JSON.parse(JSON.stringify(view.annotations))
|
|
9050
9050
|
};
|
|
9051
9051
|
}
|
|
9052
|
-
const { layers, assets, smartContents } =
|
|
9052
|
+
const { layers, assets, smartContents } = _chunkPA3IMPPScjs.serializeLayers.call(void 0, this.state.layers);
|
|
9053
9053
|
const out = {
|
|
9054
|
-
version:
|
|
9054
|
+
version: _chunkPA3IMPPScjs.LAYERED_SCHEMA_VERSION,
|
|
9055
9055
|
width,
|
|
9056
9056
|
height,
|
|
9057
9057
|
layers,
|
|
@@ -9063,7 +9063,7 @@ var ImageEditorController = (_class10 = class {
|
|
|
9063
9063
|
};
|
|
9064
9064
|
if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
|
|
9065
9065
|
if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
|
|
9066
|
-
if (_optionalChain([this, 'access', _349 => _349.state, 'access', _350 => _350.patterns, 'optionalAccess', _351 => _351.length])) out.patterns =
|
|
9066
|
+
if (_optionalChain([this, 'access', _349 => _349.state, 'access', _350 => _350.patterns, 'optionalAccess', _351 => _351.length])) out.patterns = _chunkPA3IMPPScjs.serializePatterns.call(void 0, this.state.patterns);
|
|
9067
9067
|
if (smartContents) out.smartContents = smartContents;
|
|
9068
9068
|
if (this.state.bitDepth === 16 || this.state.bitDepth === 32) out.bitDepth = this.state.bitDepth;
|
|
9069
9069
|
if (this.state.colorProfile) out.colorProfile = serializeColorProfile(this.state.colorProfile);
|
|
@@ -9075,7 +9075,7 @@ function serializeAdjustments(adjustments) {
|
|
|
9075
9075
|
const out = { ...adjustments };
|
|
9076
9076
|
if (_optionalChain([out, 'access', _352 => _352.layers, 'optionalAccess', _353 => _353.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
|
|
9077
9077
|
else delete out.layers;
|
|
9078
|
-
if (
|
|
9078
|
+
if (_chunkPA3IMPPScjs.normalizeProcessVersion.call(void 0, out.process) === _chunkPA3IMPPScjs.LEGACY_PROCESS_VERSION) {
|
|
9079
9079
|
delete out.process;
|
|
9080
9080
|
if (!out.tint) delete out.tint;
|
|
9081
9081
|
}
|
|
@@ -9086,7 +9086,7 @@ function withDevelop(layer, partial) {
|
|
|
9086
9086
|
let i = filters.findIndex((f) => f.kind === "develop");
|
|
9087
9087
|
if (i === -1) {
|
|
9088
9088
|
filters.unshift({
|
|
9089
|
-
id: layer.source === "document" ?
|
|
9089
|
+
id: layer.source === "document" ? _chunkPA3IMPPScjs.DEVELOP_FILTER_ID : _chunkPA3IMPPScjs.newLayerId.call(void 0, "flt"),
|
|
9090
9090
|
kind: "develop",
|
|
9091
9091
|
enabled: true,
|
|
9092
9092
|
brightness: 0,
|
|
@@ -9095,7 +9095,7 @@ function withDevelop(layer, partial) {
|
|
|
9095
9095
|
exposure: 0,
|
|
9096
9096
|
temperature: 0,
|
|
9097
9097
|
tint: 0,
|
|
9098
|
-
process:
|
|
9098
|
+
process: _chunkPA3IMPPScjs.LATEST_PROCESS_VERSION
|
|
9099
9099
|
});
|
|
9100
9100
|
i = 0;
|
|
9101
9101
|
}
|
|
@@ -9104,7 +9104,7 @@ function withDevelop(layer, partial) {
|
|
|
9104
9104
|
const v = partial[k];
|
|
9105
9105
|
if (typeof v === "number" && Number.isFinite(v)) next[k] = v;
|
|
9106
9106
|
}
|
|
9107
|
-
if ("process" in partial) next.process =
|
|
9107
|
+
if ("process" in partial) next.process = _chunkPA3IMPPScjs.normalizeProcessVersion.call(void 0, partial.process);
|
|
9108
9108
|
filters[i] = next;
|
|
9109
9109
|
return { ...layer, filters };
|
|
9110
9110
|
}
|
|
@@ -9113,7 +9113,7 @@ function withBlur(layer, radius) {
|
|
|
9113
9113
|
const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
|
|
9114
9114
|
if (radius > 0) {
|
|
9115
9115
|
filters.push({
|
|
9116
|
-
id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _357 => _357.id]), () => ( (layer.source === "document" ?
|
|
9116
|
+
id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _357 => _357.id]), () => ( (layer.source === "document" ? _chunkPA3IMPPScjs.BLUR_FILTER_ID : _chunkPA3IMPPScjs.newLayerId.call(void 0, "flt")))),
|
|
9117
9117
|
kind: "blur",
|
|
9118
9118
|
enabled: true,
|
|
9119
9119
|
radius
|
|
@@ -9137,7 +9137,7 @@ function mergeAdjustmentNode(node, update, width, height) {
|
|
|
9137
9137
|
if (!update.mask) delete next.mask;
|
|
9138
9138
|
else {
|
|
9139
9139
|
const current = node.mask && !node.mask.source ? node.mask : null;
|
|
9140
|
-
const memo = current ?
|
|
9140
|
+
const memo = current ? _chunkPA3IMPPScjs.legacyMaskOf.call(void 0, current, width, height) : null;
|
|
9141
9141
|
if (current && memo && memo.width === update.mask.width && memo.height === update.mask.height && memo.rle === update.mask.rle) {
|
|
9142
9142
|
next.mask = withMaskProps(current, {
|
|
9143
9143
|
density: _nullishCoalesce(update.mask.density, () => ( 1)),
|
|
@@ -9145,7 +9145,7 @@ function mergeAdjustmentNode(node, update, width, height) {
|
|
|
9145
9145
|
enabled: update.mask.enabled !== false
|
|
9146
9146
|
});
|
|
9147
9147
|
} else {
|
|
9148
|
-
const m =
|
|
9148
|
+
const m = _chunkPA3IMPPScjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height);
|
|
9149
9149
|
if (m) next.mask = m;
|
|
9150
9150
|
else delete next.mask;
|
|
9151
9151
|
}
|
|
@@ -9184,7 +9184,7 @@ function resizeLegacyMasks(layers, from, to) {
|
|
|
9184
9184
|
for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers)) {
|
|
9185
9185
|
if (l.type !== "adjustment" || !l.mask || l.mask.source) continue;
|
|
9186
9186
|
const old = l.mask;
|
|
9187
|
-
const mask =
|
|
9187
|
+
const mask = _chunkPA3IMPPScjs.rasterMaskFromLegacy.call(void 0, _chunkPA3IMPPScjs.legacyMaskOf.call(void 0, old, fw, fh), tw, th);
|
|
9188
9188
|
if (!mask) continue;
|
|
9189
9189
|
out = _chunkHGTDMKNEcjs.mapLayer.call(void 0, out, l.id, (n) => ({ ...n, mask: { ...mask, density: old.density, feather: old.feather, enabled: old.enabled } }));
|
|
9190
9190
|
}
|
|
@@ -9280,12 +9280,12 @@ function withoutAnnotations(layers) {
|
|
|
9280
9280
|
function parseColor(value) {
|
|
9281
9281
|
if (Array.isArray(value)) {
|
|
9282
9282
|
if (value.length < 3 || value.length > 4 || !value.every((v) => typeof v === "number" && v >= 0 && v <= 255)) {
|
|
9283
|
-
throw new (0,
|
|
9283
|
+
throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("A colour array is [r, g, b] or [r, g, b, a] with values 0..255.");
|
|
9284
9284
|
}
|
|
9285
9285
|
return [Math.round(value[0]), Math.round(value[1]), Math.round(value[2]), Math.round(_nullishCoalesce(value[3], () => ( 255)))];
|
|
9286
9286
|
}
|
|
9287
9287
|
const m = /^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(String(value).trim());
|
|
9288
|
-
if (!m) throw new (0,
|
|
9288
|
+
if (!m) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Invalid colour "${value}"; use #rrggbb or #rrggbbaa.`);
|
|
9289
9289
|
let hex = m[1];
|
|
9290
9290
|
if (hex.length === 3) hex = hex.split("").map((c) => c + c).join("");
|
|
9291
9291
|
const n = (i) => parseInt(hex.slice(i, i + 2), 16);
|
|
@@ -9295,7 +9295,7 @@ function readImagePaint(raw) {
|
|
|
9295
9295
|
try {
|
|
9296
9296
|
return _chunkEBDCRTZIcjs.parsePaintSource.call(void 0, raw);
|
|
9297
9297
|
} catch (e) {
|
|
9298
|
-
if (e instanceof _chunkEBDCRTZIcjs.PaintSourceError) throw new (0,
|
|
9298
|
+
if (e instanceof _chunkEBDCRTZIcjs.PaintSourceError) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(e.message);
|
|
9299
9299
|
throw e;
|
|
9300
9300
|
}
|
|
9301
9301
|
}
|
|
@@ -9486,7 +9486,7 @@ function loadImageEditorDocument(input) {
|
|
|
9486
9486
|
// Optional: only present when something was selected when saving.
|
|
9487
9487
|
selection: {
|
|
9488
9488
|
parse: (value) => {
|
|
9489
|
-
const mask =
|
|
9489
|
+
const mask = _chunkPA3IMPPScjs.deserializeSelection.call(void 0, value);
|
|
9490
9490
|
const v = value;
|
|
9491
9491
|
return { width: mask.width, height: mask.height, rle: v.rle };
|
|
9492
9492
|
},
|
|
@@ -9574,7 +9574,7 @@ function loadLayeredDocument(doc) {
|
|
|
9574
9574
|
},
|
|
9575
9575
|
selection: {
|
|
9576
9576
|
parse: (value) => {
|
|
9577
|
-
const mask =
|
|
9577
|
+
const mask = _chunkPA3IMPPScjs.deserializeSelection.call(void 0, value);
|
|
9578
9578
|
const v = value;
|
|
9579
9579
|
return { width: mask.width, height: mask.height, rle: v.rle };
|
|
9580
9580
|
},
|
|
@@ -10086,14 +10086,14 @@ function describeSelection(mask) {
|
|
|
10086
10086
|
// src/image-editor/selection-tools.ts
|
|
10087
10087
|
var modeSchema = {
|
|
10088
10088
|
type: "string",
|
|
10089
|
-
enum: [...
|
|
10089
|
+
enum: [..._chunkPA3IMPPScjs.SELECTION_MODES],
|
|
10090
10090
|
description: "How the result combines with the current selection (default replace)."
|
|
10091
10091
|
};
|
|
10092
10092
|
var num2 = (v, d) => typeof v === "number" && Number.isFinite(v) ? v : d;
|
|
10093
10093
|
function summary(controller) {
|
|
10094
10094
|
const sel = controller.getSelection();
|
|
10095
10095
|
const { width, height } = controller.getState().imageDimensions;
|
|
10096
|
-
const area =
|
|
10096
|
+
const area = _chunkPA3IMPPScjs.selectionArea.call(void 0, sel);
|
|
10097
10097
|
return {
|
|
10098
10098
|
empty: !sel,
|
|
10099
10099
|
bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _369 => _369.bounds]), () => ( null)),
|
|
@@ -10139,7 +10139,7 @@ function createImageSelectionTools(controller) {
|
|
|
10139
10139
|
},
|
|
10140
10140
|
annotations: writeAnnotations("Select a region", true),
|
|
10141
10141
|
handler: ({ shape, x, y, width, height, mode, feather }) => {
|
|
10142
|
-
const opts = { mode:
|
|
10142
|
+
const opts = { mode: _chunkPA3IMPPScjs.parseSelectionMode.call(void 0, mode), feather: num2(feather, 0) };
|
|
10143
10143
|
switch (shape) {
|
|
10144
10144
|
case "all":
|
|
10145
10145
|
controller.selectAll();
|
|
@@ -10192,7 +10192,7 @@ function createImageSelectionTools(controller) {
|
|
|
10192
10192
|
annotations: writeAnnotations("Select by colour", true),
|
|
10193
10193
|
handler: async ({ x, y, color, tolerance, contiguous, fuzziness, sampleMerged, sample, mode }) => {
|
|
10194
10194
|
const common = {
|
|
10195
|
-
mode:
|
|
10195
|
+
mode: _chunkPA3IMPPScjs.parseSelectionMode.call(void 0, mode),
|
|
10196
10196
|
sampleMerged: sampleMerged === true,
|
|
10197
10197
|
sample: _nullishCoalesce(sample, () => ( "composite"))
|
|
10198
10198
|
};
|
|
@@ -10213,7 +10213,7 @@ function createImageSelectionTools(controller) {
|
|
|
10213
10213
|
inputSchema: {
|
|
10214
10214
|
type: "object",
|
|
10215
10215
|
properties: {
|
|
10216
|
-
op: { type: "string", enum: [...
|
|
10216
|
+
op: { type: "string", enum: [..._chunkPA3IMPPScjs.SELECTION_MODIFY_OPS], description: "How to modify the selection." },
|
|
10217
10217
|
radius: { type: "number", minimum: 0, maximum: 500, description: "Radius in pixels." }
|
|
10218
10218
|
},
|
|
10219
10219
|
required: ["op", "radius"],
|
|
@@ -10221,7 +10221,7 @@ function createImageSelectionTools(controller) {
|
|
|
10221
10221
|
},
|
|
10222
10222
|
annotations: writeAnnotations("Modify the selection"),
|
|
10223
10223
|
handler: ({ op, radius }) => {
|
|
10224
|
-
if (!
|
|
10224
|
+
if (!_chunkPA3IMPPScjs.SELECTION_MODIFY_OPS.includes(op)) throw new Error(`Unknown op "${String(op)}".`);
|
|
10225
10225
|
if (!controller.getSelection()) throw new Error("Nothing is selected.");
|
|
10226
10226
|
controller.modifySelection(op, Math.min(500, Math.max(0, num2(radius, 0))));
|
|
10227
10227
|
return summary(controller);
|
|
@@ -10265,7 +10265,7 @@ function createImageSelectionTools(controller) {
|
|
|
10265
10265
|
type: "object",
|
|
10266
10266
|
properties: {
|
|
10267
10267
|
layerId: { type: "string", description: "Existing adjustment layer to mask." },
|
|
10268
|
-
kind: { type: "string", enum:
|
|
10268
|
+
kind: { type: "string", enum: _chunkPA3IMPPScjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Kind of a new layer to add and mask (instead of layerId)." },
|
|
10269
10269
|
params: { type: "object", description: "Parameters for the new layer (see list_controls)." },
|
|
10270
10270
|
density: { type: "number", minimum: 0, maximum: 1, description: "Mask density 0-1." },
|
|
10271
10271
|
feather: { type: "number", minimum: 0, maximum: 1e3, description: "Mask feather in pixels." }
|
|
@@ -10285,11 +10285,11 @@ function createImageSelectionTools(controller) {
|
|
|
10285
10285
|
if (!controller.getAdjustmentLayer(layerId)) throw new Error(`No adjustment layer "${layerId}".`);
|
|
10286
10286
|
controller.applySelectionAsLayerMask(layerId, props);
|
|
10287
10287
|
id = layerId;
|
|
10288
|
-
} else if (
|
|
10288
|
+
} else if (_chunkPA3IMPPScjs.isAdjustmentKind.call(void 0, kind)) {
|
|
10289
10289
|
id = controller.addAdjustmentLayer({
|
|
10290
10290
|
kind,
|
|
10291
10291
|
params,
|
|
10292
|
-
mask:
|
|
10292
|
+
mask: _chunkPA3IMPPScjs.layerMaskFromSelection.call(void 0, sel, props)
|
|
10293
10293
|
});
|
|
10294
10294
|
} else {
|
|
10295
10295
|
throw new Error("Pass layerId (an existing layer) or kind (a new adjustment layer).");
|
|
@@ -10426,11 +10426,11 @@ function createImageEditTools(controller) {
|
|
|
10426
10426
|
const geometry2 = () => {
|
|
10427
10427
|
const s = controller.getState();
|
|
10428
10428
|
const region = _nullishCoalesce(s.crop, () => ( { x: 0, y: 0, ...s.imageDimensions }));
|
|
10429
|
-
const out =
|
|
10429
|
+
const out = _chunkPA3IMPPScjs.getRotatedSize.call(void 0, region.width, region.height, s.transform);
|
|
10430
10430
|
return {
|
|
10431
10431
|
image: { ...s.imageDimensions },
|
|
10432
10432
|
crop: s.crop ? { ...s.crop } : null,
|
|
10433
|
-
rotation:
|
|
10433
|
+
rotation: _chunkPA3IMPPScjs.normalizeAngle.call(void 0, s.transform.rotate),
|
|
10434
10434
|
flipH: s.transform.flipH,
|
|
10435
10435
|
flipV: s.transform.flipV,
|
|
10436
10436
|
output: { width: Math.round(out.width), height: Math.round(out.height) }
|
|
@@ -10665,7 +10665,7 @@ function describeLayer(layer, activeId, boundsOf) {
|
|
|
10665
10665
|
const out = {
|
|
10666
10666
|
id: layer.id,
|
|
10667
10667
|
type: layer.type,
|
|
10668
|
-
name: layer.name || (layer.type === "adjustment" ?
|
|
10668
|
+
name: layer.name || (layer.type === "adjustment" ? _chunkPA3IMPPScjs.adjustmentKindLabel.call(void 0, layer.kind) : ""),
|
|
10669
10669
|
visible: layer.visible,
|
|
10670
10670
|
opacity: round3(layer.opacity),
|
|
10671
10671
|
blend: layer.blend,
|
|
@@ -10754,8 +10754,8 @@ function createImageLayerTools(controller) {
|
|
|
10754
10754
|
};
|
|
10755
10755
|
};
|
|
10756
10756
|
const exists = (id, what = "layerId") => {
|
|
10757
|
-
if (typeof id !== "string" || !id) throw new (0,
|
|
10758
|
-
|
|
10757
|
+
if (typeof id !== "string" || !id) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`${what} is required (a layer id from list_layers).`);
|
|
10758
|
+
_chunkPA3IMPPScjs.requireLayer.call(void 0, controller.getLayers(), id);
|
|
10759
10759
|
return id;
|
|
10760
10760
|
};
|
|
10761
10761
|
const listLayers = {
|
|
@@ -10791,7 +10791,7 @@ function createImageLayerTools(controller) {
|
|
|
10791
10791
|
handler: ({ layerId, target }) => {
|
|
10792
10792
|
const id = exists(layerId);
|
|
10793
10793
|
const layer = controller.getLayer(id);
|
|
10794
|
-
if (target === "mask" && !layer.mask) throw new (0,
|
|
10794
|
+
if (target === "mask" && !layer.mask) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
|
|
10795
10795
|
controller.setActiveLayer(id, _nullishCoalesce(target, () => ( "pixels")));
|
|
10796
10796
|
return { layer: describe(id), activeTarget: controller.getState().activeTarget };
|
|
10797
10797
|
}
|
|
@@ -10816,7 +10816,7 @@ function createImageLayerTools(controller) {
|
|
|
10816
10816
|
},
|
|
10817
10817
|
annotations: { title: "Add a pixel layer", ...WRITE2 },
|
|
10818
10818
|
handler: async (args) => {
|
|
10819
|
-
if (args.color !== void 0 && args.image !== void 0) throw new (0,
|
|
10819
|
+
if (args.color !== void 0 && args.image !== void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give color or image, not both.");
|
|
10820
10820
|
for (const k of ["aboveId", "belowId", "parentId"]) if (args[k] !== void 0) exists(args[k], k);
|
|
10821
10821
|
const init = {
|
|
10822
10822
|
name: args.name,
|
|
@@ -10906,7 +10906,7 @@ function createImageLayerTools(controller) {
|
|
|
10906
10906
|
const id = exists(args.layerId);
|
|
10907
10907
|
const props = {};
|
|
10908
10908
|
for (const k of ["name", "visible", "opacity", "fillOpacity", "blend", "clipped", "locks", "collapsed"]) if (args[k] !== void 0) props[k] = args[k];
|
|
10909
|
-
if (!Object.keys(props).length) throw new (0,
|
|
10909
|
+
if (!Object.keys(props).length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give at least one property to change.");
|
|
10910
10910
|
controller.setLayerProperties(id, props);
|
|
10911
10911
|
return { layer: describe(id) };
|
|
10912
10912
|
}
|
|
@@ -11000,8 +11000,8 @@ function createImageLayerTools(controller) {
|
|
|
11000
11000
|
annotations: { title: "Move a layer's pixels", ...WRITE2 },
|
|
11001
11001
|
handler: ({ layerId, x, y, dx, dy }) => {
|
|
11002
11002
|
const id = exists(layerId);
|
|
11003
|
-
if ([x, y, dx, dy].every((v) => v === void 0)) throw new (0,
|
|
11004
|
-
if ((x !== void 0 || y !== void 0) && (dx !== void 0 || dy !== void 0)) throw new (0,
|
|
11003
|
+
if ([x, y, dx, dy].every((v) => v === void 0)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give x and y, or dx and dy.");
|
|
11004
|
+
if ((x !== void 0 || y !== void 0) && (dx !== void 0 || dy !== void 0)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give x / y or dx / dy, not both.");
|
|
11005
11005
|
return { layerId: id, ...controller.offsetLayer(id, { x, y, dx, dy }) };
|
|
11006
11006
|
}
|
|
11007
11007
|
};
|
|
@@ -11073,7 +11073,7 @@ function createImageLayerTools(controller) {
|
|
|
11073
11073
|
annotations: { title: "Set layer mask properties", ...WRITE_IDEMPOTENT2 },
|
|
11074
11074
|
handler: ({ layerId, density, feather, enabled, linked }) => {
|
|
11075
11075
|
const id = exists(layerId);
|
|
11076
|
-
if ([density, feather, enabled, linked].every((v) => v === void 0)) throw new (0,
|
|
11076
|
+
if ([density, feather, enabled, linked].every((v) => v === void 0)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give density, feather, enabled or linked.");
|
|
11077
11077
|
const mask = controller.setLayerMaskProps(id, {
|
|
11078
11078
|
density,
|
|
11079
11079
|
feather,
|
|
@@ -11156,7 +11156,7 @@ function createImageLayerTools(controller) {
|
|
|
11156
11156
|
handler: (args) => {
|
|
11157
11157
|
const id = exists(args.layerId);
|
|
11158
11158
|
const changes = filterValues(args);
|
|
11159
|
-
if (!Object.keys(changes).length) throw new (0,
|
|
11159
|
+
if (!Object.keys(changes).length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give at least one value to change.");
|
|
11160
11160
|
return { layerId: id, filters: controller.updateLayerFilter(id, args.filterId, changes) };
|
|
11161
11161
|
}
|
|
11162
11162
|
};
|
|
@@ -11420,8 +11420,8 @@ function describeLayerEffects(effects) {
|
|
|
11420
11420
|
}
|
|
11421
11421
|
function createImageEffectTools(controller) {
|
|
11422
11422
|
const layerArg = (id) => {
|
|
11423
|
-
if (typeof id !== "string" || !id) throw new (0,
|
|
11424
|
-
|
|
11423
|
+
if (typeof id !== "string" || !id) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("layerId is required (a layer id from list_layers).");
|
|
11424
|
+
_chunkPA3IMPPScjs.requireLayer.call(void 0, controller.getLayers(), id);
|
|
11425
11425
|
return id;
|
|
11426
11426
|
};
|
|
11427
11427
|
const result = (layerId, extra = {}) => ({ layerId, ...extra, ...describeLayerEffects(controller.getLayerEffects(layerId)) });
|
|
@@ -11452,7 +11452,7 @@ function createImageEffectTools(controller) {
|
|
|
11452
11452
|
annotations: { title: "Add a layer effect", ...WRITE3 },
|
|
11453
11453
|
handler: ({ layerId, kind, settings, index }) => {
|
|
11454
11454
|
const id = layerArg(layerId);
|
|
11455
|
-
if (!_chunkHGTDMKNEcjs.isLayerEffectKind.call(void 0, kind)) throw new (0,
|
|
11455
|
+
if (!_chunkHGTDMKNEcjs.isLayerEffectKind.call(void 0, kind)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`kind must be one of ${_chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS.join(", ")}.`);
|
|
11456
11456
|
const { effect } = controller.addLayerEffect(id, kind, _nullishCoalesce(settings, () => ( {})), index);
|
|
11457
11457
|
return result(id, { effectId: effect.id });
|
|
11458
11458
|
}
|
|
@@ -11472,7 +11472,7 @@ function createImageEffectTools(controller) {
|
|
|
11472
11472
|
handler: ({ layerId, effectId, settings }) => {
|
|
11473
11473
|
const id = layerArg(layerId);
|
|
11474
11474
|
const changes = _nullishCoalesce(settings, () => ( {}));
|
|
11475
|
-
if (!Object.keys(changes).length) throw new (0,
|
|
11475
|
+
if (!Object.keys(changes).length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give at least one setting to change.");
|
|
11476
11476
|
controller.updateLayerEffect(id, effectId, changes);
|
|
11477
11477
|
return result(id);
|
|
11478
11478
|
}
|
|
@@ -11524,7 +11524,7 @@ function createImageEffectTools(controller) {
|
|
|
11524
11524
|
},
|
|
11525
11525
|
annotations: { title: "Set the global light", ...WRITE_IDEMPOTENT3 },
|
|
11526
11526
|
handler: ({ angle, altitude }) => {
|
|
11527
|
-
if (angle === void 0 && altitude === void 0) throw new (0,
|
|
11527
|
+
if (angle === void 0 && altitude === void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give angle, altitude or both.");
|
|
11528
11528
|
const next = {};
|
|
11529
11529
|
if (angle !== void 0) next.angle = angle;
|
|
11530
11530
|
if (altitude !== void 0) next.altitude = altitude;
|
|
@@ -11737,7 +11737,7 @@ var PaintGesture = (_class11 = class {
|
|
|
11737
11737
|
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.`);
|
|
11738
11738
|
if (_optionalChain([layer, 'access', _383 => _383.locks, 'optionalAccess', _384 => _384.all]) || _optionalChain([layer, 'access', _385 => _385.locks, 'optionalAccess', _386 => _386.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
|
|
11739
11739
|
const origin = layer.type === "pixel" ? { ...layer.offset } : layer.type === "smart" ? { ...layer.placement.corners[0] } : (() => {
|
|
11740
|
-
const b =
|
|
11740
|
+
const b = _chunkPA3IMPPScjs.shapeGeometryBounds.call(void 0, layer);
|
|
11741
11741
|
return b ? { x: b.x, y: b.y } : { x: 0, y: 0 };
|
|
11742
11742
|
})();
|
|
11743
11743
|
this.move = { id: layer.id, start: { x: sample.x, y: sample.y }, origin, moved: false };
|
|
@@ -11753,7 +11753,7 @@ var PaintGesture = (_class11 = class {
|
|
|
11753
11753
|
return null;
|
|
11754
11754
|
}
|
|
11755
11755
|
} catch (err) {
|
|
11756
|
-
this.error =
|
|
11756
|
+
this.error = _chunkPA3IMPPScjs.userErrorMessage.call(void 0, err);
|
|
11757
11757
|
this.stroke = null;
|
|
11758
11758
|
this.move = null;
|
|
11759
11759
|
}
|
|
@@ -11775,7 +11775,7 @@ var PaintGesture = (_class11 = class {
|
|
|
11775
11775
|
this.controller.offsetLayer(m.id, { x, y }, !m.moved);
|
|
11776
11776
|
m.moved = true;
|
|
11777
11777
|
} catch (err) {
|
|
11778
|
-
this.error =
|
|
11778
|
+
this.error = _chunkPA3IMPPScjs.userErrorMessage.call(void 0, err);
|
|
11779
11779
|
this.move = null;
|
|
11780
11780
|
}
|
|
11781
11781
|
}
|
|
@@ -11785,7 +11785,7 @@ var PaintGesture = (_class11 = class {
|
|
|
11785
11785
|
try {
|
|
11786
11786
|
this.stroke.end();
|
|
11787
11787
|
} catch (err) {
|
|
11788
|
-
this.error =
|
|
11788
|
+
this.error = _chunkPA3IMPPScjs.userErrorMessage.call(void 0, err);
|
|
11789
11789
|
}
|
|
11790
11790
|
}
|
|
11791
11791
|
this.stroke = null;
|
|
@@ -11895,9 +11895,9 @@ function createImagePaintTools(controller) {
|
|
|
11895
11895
|
annotations: { title: "Paint a brush stroke", ...WRITE4 },
|
|
11896
11896
|
handler: (args) => {
|
|
11897
11897
|
const tool = args.tool;
|
|
11898
|
-
if (args.mixer !== void 0 && tool !== "mixer") throw new (0,
|
|
11899
|
-
if (args.paint !== void 0 && (_nullishCoalesce(tool, () => ( "brush"))) !== "brush") throw new (0,
|
|
11900
|
-
if (args.paint !== void 0 && args.color !== void 0) throw new (0,
|
|
11898
|
+
if (args.mixer !== void 0 && tool !== "mixer") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)('mixer settings apply to the Mixer Brush only; pass tool "mixer", or drop mixer.');
|
|
11899
|
+
if (args.paint !== void 0 && (_nullishCoalesce(tool, () => ( "brush"))) !== "brush") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)('paint applies to the brush only (the eraser removes paint; the Mixer Brush loads color); drop paint or use tool "brush".');
|
|
11900
|
+
if (args.paint !== void 0 && args.color !== void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give color or paint, not both.");
|
|
11901
11901
|
const result = controller.paintStroke({
|
|
11902
11902
|
tool,
|
|
11903
11903
|
points: args.points,
|
|
@@ -12028,7 +12028,7 @@ function profileArg(v) {
|
|
|
12028
12028
|
try {
|
|
12029
12029
|
return _chunkCWM3CUUXcjs.base64ToBytes.call(void 0, s.slice(4));
|
|
12030
12030
|
} catch (e32) {
|
|
12031
|
-
throw new (0,
|
|
12031
|
+
throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("The icc: value is not valid base64.");
|
|
12032
12032
|
}
|
|
12033
12033
|
}
|
|
12034
12034
|
return s;
|
|
@@ -12093,10 +12093,10 @@ function createImageColorTools(controller) {
|
|
|
12093
12093
|
annotations: { title: "Set up soft proofing", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
12094
12094
|
handler: (args) => {
|
|
12095
12095
|
if (args.off === true) {
|
|
12096
|
-
if (args.profile !== void 0) throw new (0,
|
|
12096
|
+
if (args.profile !== void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give either off true or a profile, not both.");
|
|
12097
12097
|
return controller.setProofSetup(null);
|
|
12098
12098
|
}
|
|
12099
|
-
if (args.profile === void 0) throw new (0,
|
|
12099
|
+
if (args.profile === void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Pass the profile to proof with (e.g. coated-cmyk), or off true.");
|
|
12100
12100
|
const s = controller.setProofSetup({
|
|
12101
12101
|
profile: profileArg(args.profile),
|
|
12102
12102
|
...args.intent !== void 0 ? { intent: args.intent } : {},
|
|
@@ -12148,7 +12148,7 @@ function createImageColorTools(controller) {
|
|
|
12148
12148
|
},
|
|
12149
12149
|
annotations: { title: "Set the colour mode", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
12150
12150
|
handler: (args) => {
|
|
12151
|
-
if (args.mode !== "cmyk" && (args.profile !== void 0 || args.intent !== void 0)) throw new (0,
|
|
12151
|
+
if (args.mode !== "cmyk" && (args.profile !== void 0 || args.intent !== void 0)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("profile and intent apply to CMYK mode only.");
|
|
12152
12152
|
return controller.setColorMode(args.mode, {
|
|
12153
12153
|
...args.profile !== void 0 ? { profile: profileArg(args.profile) } : {},
|
|
12154
12154
|
...args.intent !== void 0 ? { intent: args.intent } : {}
|
|
@@ -12213,7 +12213,7 @@ function checkSource(controller, source) {
|
|
|
12213
12213
|
const p = source;
|
|
12214
12214
|
const { width, height } = controller.getState().imageDimensions;
|
|
12215
12215
|
if (!(p.x >= 0 && p.y >= 0 && p.x < width && p.y < height)) {
|
|
12216
|
-
throw new (0,
|
|
12216
|
+
throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`source (${p.x}, ${p.y}) is outside the ${width} \xD7 ${height} canvas; pick a point on the image to sample.`);
|
|
12217
12217
|
}
|
|
12218
12218
|
return p;
|
|
12219
12219
|
}
|
|
@@ -12453,10 +12453,10 @@ function createImageRetouchTools(controller) {
|
|
|
12453
12453
|
annotations: { title: "Set the clone source", ...WRITE5, idempotentHint: true },
|
|
12454
12454
|
handler: (args) => {
|
|
12455
12455
|
if (args.clear === true) {
|
|
12456
|
-
if (args.x !== void 0 || args.y !== void 0) throw new (0,
|
|
12456
|
+
if (args.x !== void 0 || args.y !== void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give either clear true or x and y, not both.");
|
|
12457
12457
|
return controller.setCloneSource(null);
|
|
12458
12458
|
}
|
|
12459
|
-
if (typeof args.x !== "number" || typeof args.y !== "number") throw new (0,
|
|
12459
|
+
if (typeof args.x !== "number" || typeof args.y !== "number") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Pass x and y (document pixels) for the source point, or clear true to remove it.");
|
|
12460
12460
|
return controller.setCloneSource(checkSource(controller, { x: args.x, y: args.y }));
|
|
12461
12461
|
}
|
|
12462
12462
|
};
|
|
@@ -12479,7 +12479,7 @@ function createImageRetouchTools(controller) {
|
|
|
12479
12479
|
annotations: { title: "Transform the clone source", ...WRITE5, idempotentHint: false },
|
|
12480
12480
|
handler: (args) => {
|
|
12481
12481
|
if (args.reset === true) {
|
|
12482
|
-
if (Object.keys(args).some((k) => k !== "reset")) throw new (0,
|
|
12482
|
+
if (Object.keys(args).some((k) => k !== "reset")) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give either reset true or transform values, not both.");
|
|
12483
12483
|
return controller.setCloneTransform(null);
|
|
12484
12484
|
}
|
|
12485
12485
|
const cur = controller.getState().paint.cloneTransform;
|
|
@@ -12489,7 +12489,7 @@ function createImageRetouchTools(controller) {
|
|
|
12489
12489
|
if (args.rotate !== void 0) next.rotate = args.rotate;
|
|
12490
12490
|
if (args.flipHorizontal === true) next.scaleX = -(_nullishCoalesce(next.scaleX, () => ( cur.scaleX)));
|
|
12491
12491
|
if (args.flipVertical === true) next.scaleY = -(_nullishCoalesce(next.scaleY, () => ( cur.scaleY)));
|
|
12492
|
-
if (!Object.keys(next).length) throw new (0,
|
|
12492
|
+
if (!Object.keys(next).length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Pass scaleX, scaleY, rotate, flipHorizontal or flipVertical, or reset true.");
|
|
12493
12493
|
return controller.setCloneTransform(next);
|
|
12494
12494
|
}
|
|
12495
12495
|
};
|
|
@@ -12510,11 +12510,11 @@ var DATA = {
|
|
|
12510
12510
|
description: "The PSD or PSB file as base64 (a `data:` URL prefix is accepted)."
|
|
12511
12511
|
};
|
|
12512
12512
|
function psdBytesFromBase64(data) {
|
|
12513
|
-
if (typeof data !== "string" || !data.trim()) throw new (0,
|
|
12513
|
+
if (typeof data !== "string" || !data.trim()) throw new (0, _chunkPA3IMPPScjs.PsdError)("data is required: the PSD file as base64.");
|
|
12514
12514
|
const body = data.trim().replace(/^data:[^,]*;base64,/i, "");
|
|
12515
|
-
if (!/^[A-Za-z0-9+/=_\s-]+$/.test(body)) throw new (0,
|
|
12515
|
+
if (!/^[A-Za-z0-9+/=_\s-]+$/.test(body)) throw new (0, _chunkPA3IMPPScjs.PsdError)("data is not base64; send the PSD file bytes base64-encoded.");
|
|
12516
12516
|
const bytes = _chunkCWM3CUUXcjs.base64ToBytes.call(void 0, body);
|
|
12517
|
-
if (bytes.length < 26) throw new (0,
|
|
12517
|
+
if (bytes.length < 26) throw new (0, _chunkPA3IMPPScjs.PsdError)(`data decodes to ${bytes.length} bytes, too short for a PSD (at least 26).`);
|
|
12518
12518
|
return bytes;
|
|
12519
12519
|
}
|
|
12520
12520
|
function createImagePsdTools(controller) {
|
|
@@ -12525,7 +12525,7 @@ function createImagePsdTools(controller) {
|
|
|
12525
12525
|
inputSchema: { type: "object", properties: { data: DATA }, required: ["data"], additionalProperties: false },
|
|
12526
12526
|
annotations: { title: "Inspect a PSD", ...READ7 },
|
|
12527
12527
|
handler: ({ data }) => {
|
|
12528
|
-
const res =
|
|
12528
|
+
const res = _chunkPA3IMPPScjs.importPsd.call(void 0, psdBytesFromBase64(data), { skipPixels: true });
|
|
12529
12529
|
return {
|
|
12530
12530
|
width: res.width,
|
|
12531
12531
|
height: res.height,
|
|
@@ -12612,7 +12612,7 @@ var GEOMETRY = {
|
|
|
12612
12612
|
dy: { type: "number", description: "Move down after scaling and rotating, in document pixels (default 0)." },
|
|
12613
12613
|
reference: {
|
|
12614
12614
|
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}.",
|
|
12615
|
-
anyOf: [{ type: "string", enum:
|
|
12615
|
+
anyOf: [{ type: "string", enum: _chunkPA3IMPPScjs.TRANSFORM_ANCHORS }, POINT]
|
|
12616
12616
|
},
|
|
12617
12617
|
matrix: {
|
|
12618
12618
|
type: "array",
|
|
@@ -12633,14 +12633,14 @@ var NUMERIC = ["scaleX", "scaleY", "rotate", "skewX", "skewY", "dx", "dy", "refe
|
|
|
12633
12633
|
function geometryFrom(args) {
|
|
12634
12634
|
const numeric = NUMERIC.filter((k) => args[k] !== void 0);
|
|
12635
12635
|
const ways = [numeric.length > 0, args.matrix !== void 0, args.corners !== void 0].filter(Boolean).length;
|
|
12636
|
-
if (ways === 0) throw new (0,
|
|
12637
|
-
if (ways > 1) throw new (0,
|
|
12636
|
+
if (ways === 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give the transform one way: numeric fields (scaleX, scaleY, rotate, skewX, skewY, dx, dy, reference), matrix, or corners.");
|
|
12637
|
+
if (ways > 1) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give the transform only one way: numeric fields, matrix or corners, not a mix.");
|
|
12638
12638
|
if (args.matrix !== void 0) return { matrix: args.matrix };
|
|
12639
12639
|
if (args.corners !== void 0) return { corners: args.corners };
|
|
12640
12640
|
const params = {};
|
|
12641
12641
|
for (const k of NUMERIC) if (args[k] !== void 0) params[k] = args[k];
|
|
12642
|
-
if (params.scaleX === 0 || params.scaleY === 0) throw new (0,
|
|
12643
|
-
if (typeof params.reference === "string" && !
|
|
12642
|
+
if (params.scaleX === 0 || params.scaleY === 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the layer to a line).");
|
|
12643
|
+
if (typeof params.reference === "string" && !_chunkPA3IMPPScjs.isTransformAnchor.call(void 0, params.reference)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown reference "${params.reference}". Use ${_chunkPA3IMPPScjs.TRANSFORM_ANCHORS.join(", ")} or {x, y}.`);
|
|
12644
12644
|
return { params };
|
|
12645
12645
|
}
|
|
12646
12646
|
function targetFrom(args) {
|
|
@@ -12689,15 +12689,15 @@ function createImageTransformTools(controller) {
|
|
|
12689
12689
|
moved: [...s.moves],
|
|
12690
12690
|
frame: { ...s.box },
|
|
12691
12691
|
corners: s.startGeometry.corners.map(roundPoint),
|
|
12692
|
-
center: roundPoint(
|
|
12692
|
+
center: roundPoint(_chunkPA3IMPPScjs.anchorPoint.call(void 0, s.startGeometry, "center"))
|
|
12693
12693
|
};
|
|
12694
12694
|
if (s.smartObject) out.smartObject = true;
|
|
12695
12695
|
s.cancel();
|
|
12696
12696
|
if (args.meshColumns !== void 0) {
|
|
12697
12697
|
const cols = args.meshColumns;
|
|
12698
12698
|
const rows = _nullishCoalesce(args.meshRows, () => ( cols));
|
|
12699
|
-
const mesh =
|
|
12700
|
-
out.mesh = { columns: cols, rows, pointsPerRow:
|
|
12699
|
+
const mesh = _chunkJCXMJUQOcjs.identityWarpMesh.call(void 0, s.box, cols, rows);
|
|
12700
|
+
out.mesh = { columns: cols, rows, pointsPerRow: _chunkJCXMJUQOcjs.warpMeshColumns.call(void 0, mesh), pointRows: _chunkJCXMJUQOcjs.warpMeshRows.call(void 0, mesh), points: mesh.points.map(roundPoint) };
|
|
12701
12701
|
}
|
|
12702
12702
|
return out;
|
|
12703
12703
|
}
|
|
@@ -12722,7 +12722,7 @@ function createImageTransformTools(controller) {
|
|
|
12722
12722
|
type: "object",
|
|
12723
12723
|
properties: {
|
|
12724
12724
|
...TARGET3,
|
|
12725
|
-
style: { type: "string", enum:
|
|
12725
|
+
style: { type: "string", enum: _chunkJCXMJUQOcjs.WARP_STYLES, description: "Preset warp (Photoshop\u2019s menu): arc, arcLower, arcUpper, arch, bulge, shellLower, shellUpper, flag, wave, fish, rise, fisheye, inflate, squeeze, twist." },
|
|
12726
12726
|
bend: { type: "number", minimum: -100, maximum: 100, description: "Preset bend in percent, \u2212100..100 (default 50)." },
|
|
12727
12727
|
horizontal: { type: "number", minimum: -100, maximum: 100, description: "Preset horizontal distortion in percent, \u2212100..100 (default 0)." },
|
|
12728
12728
|
vertical: { type: "number", minimum: -100, maximum: 100, description: "Preset vertical distortion in percent, \u2212100..100 (default 0)." },
|
|
@@ -12744,11 +12744,11 @@ function createImageTransformTools(controller) {
|
|
|
12744
12744
|
annotations: { title: "Warp a layer", ...WRITE6 },
|
|
12745
12745
|
handler: (args) => {
|
|
12746
12746
|
const hasPreset = ["style", "bend", "horizontal", "vertical", "orientation"].some((k) => args[k] !== void 0);
|
|
12747
|
-
if (hasPreset && args.mesh !== void 0) throw new (0,
|
|
12748
|
-
if (!hasPreset && args.mesh === void 0) throw new (0,
|
|
12747
|
+
if (hasPreset && args.mesh !== void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give a preset (style, bend, horizontal, vertical, orientation) or a mesh, not both.");
|
|
12748
|
+
if (!hasPreset && args.mesh === void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give a preset style or a mesh.");
|
|
12749
12749
|
let warp;
|
|
12750
12750
|
if (hasPreset) {
|
|
12751
|
-
if (args.style === void 0) throw new (0,
|
|
12751
|
+
if (args.style === void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`style is required with a preset. Styles: ${_chunkJCXMJUQOcjs.WARP_STYLES.join(", ")}.`);
|
|
12752
12752
|
warp = {
|
|
12753
12753
|
style: args.style,
|
|
12754
12754
|
bend: _nullishCoalesce(args.bend, () => ( 50)),
|
|
@@ -12759,7 +12759,7 @@ function createImageTransformTools(controller) {
|
|
|
12759
12759
|
} else {
|
|
12760
12760
|
const m = args.mesh;
|
|
12761
12761
|
const want = (3 * m.columns + 1) * (3 * m.rows + 1);
|
|
12762
|
-
if (m.points.length !== want) throw new (0,
|
|
12762
|
+
if (m.points.length !== want) throw new (0, _chunkPA3IMPPScjs.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}.`);
|
|
12763
12763
|
const knots = (n) => Array.from({ length: n + 1 }, (_, i) => i / n);
|
|
12764
12764
|
warp = { us: knots(m.columns), vs: knots(m.rows), points: m.points.map((p) => ({ x: p.x, y: p.y })) };
|
|
12765
12765
|
}
|
|
@@ -12854,13 +12854,13 @@ function settingsFrom(args) {
|
|
|
12854
12854
|
return out;
|
|
12855
12855
|
}
|
|
12856
12856
|
function imageArg(image) {
|
|
12857
|
-
if (typeof image !== "string" || !image.trim()) throw new (0,
|
|
12857
|
+
if (typeof image !== "string" || !image.trim()) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("image is required: a PNG as a data URL or base64 (other formats need a browser).");
|
|
12858
12858
|
return image.trim();
|
|
12859
12859
|
}
|
|
12860
12860
|
function createImageSmartObjectTools(controller) {
|
|
12861
12861
|
const smartId = (id) => {
|
|
12862
|
-
if (typeof id !== "string" || !id) throw new (0,
|
|
12863
|
-
|
|
12862
|
+
if (typeof id !== "string" || !id) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("layerId is required (a smart object id from list_layers).");
|
|
12863
|
+
_chunkPA3IMPPScjs.requireSmartObject.call(void 0, controller.getLayers(), id);
|
|
12864
12864
|
return id;
|
|
12865
12865
|
};
|
|
12866
12866
|
const info = (id) => {
|
|
@@ -12897,7 +12897,7 @@ function createImageSmartObjectTools(controller) {
|
|
|
12897
12897
|
},
|
|
12898
12898
|
annotations: { title: "Convert to Smart Object", ...WRITE7 },
|
|
12899
12899
|
handler: ({ layerIds, name }) => {
|
|
12900
|
-
for (const id2 of _nullishCoalesce(layerIds, () => ( [])))
|
|
12900
|
+
for (const id2 of _nullishCoalesce(layerIds, () => ( []))) _chunkPA3IMPPScjs.requireLayer.call(void 0, controller.getLayers(), id2);
|
|
12901
12901
|
const id = controller.convertToSmartObject(layerIds, { name });
|
|
12902
12902
|
return { layer: layerSummary(id), smartObject: info(id) };
|
|
12903
12903
|
}
|
|
@@ -12934,7 +12934,7 @@ function createImageSmartObjectTools(controller) {
|
|
|
12934
12934
|
{
|
|
12935
12935
|
type: "object",
|
|
12936
12936
|
properties: {
|
|
12937
|
-
style: { type: "string", enum:
|
|
12937
|
+
style: { type: "string", enum: _chunkJCXMJUQOcjs.WARP_STYLES, description: "Preset (Photoshop\u2019s menu)." },
|
|
12938
12938
|
bend: { type: "number", minimum: -100, maximum: 100, description: "Bend in percent (default 50)." },
|
|
12939
12939
|
horizontal: { type: "number", minimum: -100, maximum: 100, description: "Horizontal distortion in percent (default 0)." },
|
|
12940
12940
|
vertical: { type: "number", minimum: -100, maximum: 100, description: "Vertical distortion in percent (default 0)." },
|
|
@@ -12970,12 +12970,12 @@ function createImageSmartObjectTools(controller) {
|
|
|
12970
12970
|
else if (w) {
|
|
12971
12971
|
const m = w;
|
|
12972
12972
|
const want = (3 * m.columns + 1) * (3 * m.rows + 1);
|
|
12973
|
-
if (m.points.length !== want) throw new (0,
|
|
12973
|
+
if (m.points.length !== want) throw new (0, _chunkPA3IMPPScjs.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}.`);
|
|
12974
12974
|
const knots = (n) => Array.from({ length: n + 1 }, (_, i) => i / n);
|
|
12975
12975
|
warp = { us: knots(m.columns), vs: knots(m.rows), points: m.points.map((p) => ({ x: p.x, y: p.y })) };
|
|
12976
12976
|
}
|
|
12977
12977
|
const keys = ["corners", "matrix", "scaleX", "scaleY", "rotate", "skewX", "skewY", "x", "y", "warp", "interpolation"];
|
|
12978
|
-
if (!keys.some((k) => args[k] !== void 0)) throw new (0,
|
|
12978
|
+
if (!keys.some((k) => args[k] !== void 0)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Give something to set: ${keys.join(", ")}.`);
|
|
12979
12979
|
const res = controller.setSmartObjectTransform(id, {
|
|
12980
12980
|
corners: args.corners,
|
|
12981
12981
|
matrix: args.matrix,
|
|
@@ -13100,7 +13100,7 @@ function createImageSmartObjectTools(controller) {
|
|
|
13100
13100
|
handler: (args) => {
|
|
13101
13101
|
const id = smartId(args.layerId);
|
|
13102
13102
|
const changes = settingsFrom(args);
|
|
13103
|
-
if (!Object.keys(changes).length) throw new (0,
|
|
13103
|
+
if (!Object.keys(changes).length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give at least one value to change.");
|
|
13104
13104
|
const filter = controller.updateSmartFilter(id, args.filterId, changes);
|
|
13105
13105
|
return { layerId: id, filter, smartFilters: info(id).smartFilters };
|
|
13106
13106
|
}
|
|
@@ -13421,8 +13421,8 @@ function geometry(args) {
|
|
|
13421
13421
|
}
|
|
13422
13422
|
function createImageShapeTools(controller) {
|
|
13423
13423
|
const shapeId = (id) => {
|
|
13424
|
-
if (typeof id !== "string" || !id) throw new (0,
|
|
13425
|
-
|
|
13424
|
+
if (typeof id !== "string" || !id) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("layerId is required (a shape layer id from list_layers).");
|
|
13425
|
+
_chunkPA3IMPPScjs.requireShapeLayer.call(void 0, controller.getLayers(), id);
|
|
13426
13426
|
return id;
|
|
13427
13427
|
};
|
|
13428
13428
|
const layerSummary = (id) => {
|
|
@@ -13497,7 +13497,7 @@ function createImageShapeTools(controller) {
|
|
|
13497
13497
|
annotations: { title: "Restyle a shape", ...WRITE_IDEMPOTENT5 },
|
|
13498
13498
|
handler: ({ layerId, fill, stroke, fillRule }) => {
|
|
13499
13499
|
const id = shapeId(layerId);
|
|
13500
|
-
if (fill === void 0 && stroke === void 0 && fillRule === void 0) throw new (0,
|
|
13500
|
+
if (fill === void 0 && stroke === void 0 && fillRule === void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give fill, stroke or fillRule to change.");
|
|
13501
13501
|
return controller.setShapeStyle(id, { fill, stroke, fillRule });
|
|
13502
13502
|
}
|
|
13503
13503
|
};
|
|
@@ -13546,7 +13546,7 @@ function createImageShapeTools(controller) {
|
|
|
13546
13546
|
handler: ({ layerId, componentIndex, ...rest }) => {
|
|
13547
13547
|
const id = shapeId(layerId);
|
|
13548
13548
|
const change = geometry(rest);
|
|
13549
|
-
if (change.shape === void 0 && change.subpaths === void 0 && change.op === void 0) throw new (0,
|
|
13549
|
+
if (change.shape === void 0 && change.subpaths === void 0 && change.op === void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give shape, subpaths or op to change.");
|
|
13550
13550
|
return controller.setShapeComponent(id, componentIndex, change);
|
|
13551
13551
|
}
|
|
13552
13552
|
};
|
|
@@ -13620,8 +13620,8 @@ function pick2(args, keys) {
|
|
|
13620
13620
|
}
|
|
13621
13621
|
function createImageTypeTools(controller) {
|
|
13622
13622
|
const typeId = (id) => {
|
|
13623
|
-
if (typeof id !== "string" || !id) throw new (0,
|
|
13624
|
-
|
|
13623
|
+
if (typeof id !== "string" || !id) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("layerId is required (a type layer id from list_layers).");
|
|
13624
|
+
_chunkPA3IMPPScjs.requireTypeLayer.call(void 0, controller.getLayers(), id);
|
|
13625
13625
|
return id;
|
|
13626
13626
|
};
|
|
13627
13627
|
const layerSummary = (id) => {
|
|
@@ -13701,7 +13701,7 @@ function createImageTypeTools(controller) {
|
|
|
13701
13701
|
annotations: { title: "Style a range of text", ...WRITE_IDEMPOTENT6 },
|
|
13702
13702
|
handler: (args) => {
|
|
13703
13703
|
const style = pick2(args, Object.keys(STYLE));
|
|
13704
|
-
if (!Object.keys(style).length) throw new (0,
|
|
13704
|
+
if (!Object.keys(style).length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Give at least one style field: ${Object.keys(STYLE).join(", ")}.`);
|
|
13705
13705
|
return controller.setTextStyle(typeId(args.layerId), style, range(args));
|
|
13706
13706
|
}
|
|
13707
13707
|
};
|
|
@@ -13713,7 +13713,7 @@ function createImageTypeTools(controller) {
|
|
|
13713
13713
|
annotations: { title: "Style paragraphs", ...WRITE_IDEMPOTENT6 },
|
|
13714
13714
|
handler: (args) => {
|
|
13715
13715
|
const style = pick2(args, Object.keys(PARAGRAPH));
|
|
13716
|
-
if (!Object.keys(style).length) throw new (0,
|
|
13716
|
+
if (!Object.keys(style).length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Give at least one paragraph field: ${Object.keys(PARAGRAPH).join(", ")}.`);
|
|
13717
13717
|
return controller.setParagraphStyle(typeId(args.layerId), style, range(args));
|
|
13718
13718
|
}
|
|
13719
13719
|
};
|
|
@@ -13735,7 +13735,7 @@ function createImageTypeTools(controller) {
|
|
|
13735
13735
|
annotations: { title: "Point or paragraph text", ...WRITE_IDEMPOTENT6 },
|
|
13736
13736
|
handler: ({ layerId, kind, width, height }) => {
|
|
13737
13737
|
const id = typeId(layerId);
|
|
13738
|
-
if (kind === "box" && (width === void 0 || height === void 0)) throw new (0,
|
|
13738
|
+
if (kind === "box" && (width === void 0 || height === void 0)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("kind box needs width and height in pixels.");
|
|
13739
13739
|
return controller.setTextFrame(id, kind === "box" ? { kind: "box", width, height } : { kind: "point" });
|
|
13740
13740
|
}
|
|
13741
13741
|
};
|
|
@@ -13757,7 +13757,7 @@ function createImageTypeTools(controller) {
|
|
|
13757
13757
|
var LAYER_PATH = /^layers\.([^.]+)\.(.+)$/;
|
|
13758
13758
|
function adjustmentsSummary(adjustments) {
|
|
13759
13759
|
return {
|
|
13760
|
-
process:
|
|
13760
|
+
process: _chunkPA3IMPPScjs.normalizeProcessVersion.call(void 0, adjustments.process),
|
|
13761
13761
|
values: readAdjustmentControls(adjustments),
|
|
13762
13762
|
layers: (_nullishCoalesce(adjustments.layers, () => ( []))).map((l) => JSON.parse(JSON.stringify(l)))
|
|
13763
13763
|
};
|
|
@@ -13800,7 +13800,7 @@ function createImageEditorToolProvider(controller, options = {}) {
|
|
|
13800
13800
|
default: def,
|
|
13801
13801
|
...requiresProcess ? { requiresProcess } : {}
|
|
13802
13802
|
})),
|
|
13803
|
-
layerKinds:
|
|
13803
|
+
layerKinds: _chunkPA3IMPPScjs.ADJUSTMENT_KINDS.map(({ kind, label }) => ({
|
|
13804
13804
|
kind,
|
|
13805
13805
|
label,
|
|
13806
13806
|
controls: [...ADJUSTMENT_LAYER_CONTROLS[kind], ADJUSTMENT_LAYER_OPACITY_CONTROL].map(({ id, label: l, min, max, step, default: def }) => ({
|
|
@@ -13886,7 +13886,7 @@ function createImageEditorToolProvider(controller, options = {}) {
|
|
|
13886
13886
|
const result = { applied, clamped };
|
|
13887
13887
|
if (typeof label === "string" && label) result.label = label;
|
|
13888
13888
|
const notes = [];
|
|
13889
|
-
if ("tint" in applied &&
|
|
13889
|
+
if ("tint" in applied && _chunkPA3IMPPScjs.normalizeProcessVersion.call(void 0, controller.getState().adjustments.process) < 2) {
|
|
13890
13890
|
notes.push("Tint has no effect on process 1 edits.");
|
|
13891
13891
|
}
|
|
13892
13892
|
if (notes.length) result.notes = notes;
|
|
@@ -13896,11 +13896,11 @@ function createImageEditorToolProvider(controller, options = {}) {
|
|
|
13896
13896
|
const addLayer = {
|
|
13897
13897
|
name: "add_adjustment_layer",
|
|
13898
13898
|
title: "Add an adjustment layer",
|
|
13899
|
-
description: "Adds a non-destructive adjustment layer on top of the stack (one undoable step) and returns it. Kinds: " +
|
|
13899
|
+
description: "Adds a non-destructive adjustment layer on top of the stack (one undoable step) and returns it. Kinds: " + _chunkPA3IMPPScjs.ADJUSTMENT_KINDS.map((k) => k.kind).join(", ") + ". Omitted params are neutral.",
|
|
13900
13900
|
inputSchema: {
|
|
13901
13901
|
type: "object",
|
|
13902
13902
|
properties: {
|
|
13903
|
-
kind: { type: "string", enum:
|
|
13903
|
+
kind: { type: "string", enum: _chunkPA3IMPPScjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Adjustment kind." },
|
|
13904
13904
|
params: { type: "object", description: "Initial parameters (see list_controls); merged with neutral defaults." },
|
|
13905
13905
|
opacity: { type: "number", minimum: 0, maximum: 1, description: "Layer opacity 0-1 (default 1)." },
|
|
13906
13906
|
blend: { type: "string", enum: _chunkCWM3CUUXcjs.BLEND_MODES.map((m) => m.id), description: "Blend mode (default normal)." },
|
|
@@ -13919,7 +13919,7 @@ function createImageEditorToolProvider(controller, options = {}) {
|
|
|
13919
13919
|
openWorldHint: false
|
|
13920
13920
|
},
|
|
13921
13921
|
handler: ({ kind, params, opacity, blend, name, aboveId, parentId }) => {
|
|
13922
|
-
if (!
|
|
13922
|
+
if (!_chunkPA3IMPPScjs.isAdjustmentKind.call(void 0, kind)) throw new Error(`Unknown adjustment kind "${kind}".`);
|
|
13923
13923
|
if (blend !== void 0 && !_chunkCWM3CUUXcjs.isBlendMode.call(void 0, blend)) throw new Error(`Unknown blend mode "${blend}".`);
|
|
13924
13924
|
if (aboveId !== void 0 && parentId !== void 0) throw new Error("Give aboveId or parentId, not both.");
|
|
13925
13925
|
for (const ref of [aboveId, parentId]) {
|
|
@@ -14001,7 +14001,7 @@ function createImageEditorToolProvider(controller, options = {}) {
|
|
|
14001
14001
|
...createImagePaintTools(controller),
|
|
14002
14002
|
...createImageColorTools(controller),
|
|
14003
14003
|
...createImageRetouchTools(controller),
|
|
14004
|
-
...
|
|
14004
|
+
..._chunkV7GWZIZKcjs.createPigmentTools.call(void 0, ),
|
|
14005
14005
|
...createImagePsdTools(controller)
|
|
14006
14006
|
]
|
|
14007
14007
|
}, options.playbackSurface);
|
|
@@ -14016,7 +14016,7 @@ function boxToCurvePoint(x, y, width, height) {
|
|
|
14016
14016
|
return { input: clampLevel(x / (width || 1) * 255), output: clampLevel((height - y) / (height || 1) * 255) };
|
|
14017
14017
|
}
|
|
14018
14018
|
function curveSvgPath(points, width, height, samples = 64) {
|
|
14019
|
-
const lut =
|
|
14019
|
+
const lut = _chunkPA3IMPPScjs.curveLutFromLevels.call(void 0, points);
|
|
14020
14020
|
const n = lut.length - 1;
|
|
14021
14021
|
let d = "";
|
|
14022
14022
|
for (let i = 0; i <= samples; i++) {
|
|
@@ -14324,7 +14324,7 @@ function layerPanelRows(layers, activeId) {
|
|
|
14324
14324
|
}
|
|
14325
14325
|
function layerLabel(layer) {
|
|
14326
14326
|
if (layer.name) return layer.name;
|
|
14327
|
-
if (layer.type === "adjustment") return
|
|
14327
|
+
if (layer.type === "adjustment") return _chunkPA3IMPPScjs.adjustmentKindLabel.call(void 0, layer.kind);
|
|
14328
14328
|
return layer.type === "group" ? "Group" : "Layer";
|
|
14329
14329
|
}
|
|
14330
14330
|
function layerBadge(layer) {
|
|
@@ -14544,7 +14544,7 @@ function newLayerOptions(_controller) {
|
|
|
14544
14544
|
{ id: "shape-ellipse", label: "Ellipse Shape", icon: "circle", group: "Shapes" },
|
|
14545
14545
|
{ id: "group", label: "Group Folder", icon: "folder", group: "Basic" }
|
|
14546
14546
|
];
|
|
14547
|
-
for (const { kind, label } of
|
|
14547
|
+
for (const { kind, label } of _chunkPA3IMPPScjs.ADJUSTMENT_KINDS) {
|
|
14548
14548
|
options.push({
|
|
14549
14549
|
id: `adjustment-${kind}`,
|
|
14550
14550
|
label,
|
|
@@ -14610,7 +14610,7 @@ async function addLayerOfKind(controller, id, init) {
|
|
|
14610
14610
|
}
|
|
14611
14611
|
if (id.startsWith("adjustment-")) {
|
|
14612
14612
|
const kind = id.slice("adjustment-".length);
|
|
14613
|
-
if (
|
|
14613
|
+
if (_chunkPA3IMPPScjs.isAdjustmentKind.call(void 0, kind)) {
|
|
14614
14614
|
return controller.addAdjustmentLayer({
|
|
14615
14615
|
kind,
|
|
14616
14616
|
...init
|
|
@@ -14633,7 +14633,7 @@ function layerPanels(layer) {
|
|
|
14633
14633
|
panels.push({ id: "paint", title: "Brush Options" });
|
|
14634
14634
|
panels.push({ id: "effects", title: "Layer Effects" });
|
|
14635
14635
|
} else if (layer.type === "adjustment") {
|
|
14636
|
-
panels.push({ id: "adjustment", title:
|
|
14636
|
+
panels.push({ id: "adjustment", title: _chunkPA3IMPPScjs.adjustmentKindLabel.call(void 0, layer.kind) });
|
|
14637
14637
|
} else if (layer.type === "type") {
|
|
14638
14638
|
panels.push({ id: "type", title: "Typography" });
|
|
14639
14639
|
panels.push({ id: "effects", title: "Layer Effects" });
|
|
@@ -14909,7 +14909,7 @@ var FREE_TRANSFORM_MODE_OPTIONS = [
|
|
|
14909
14909
|
];
|
|
14910
14910
|
var WARP_STYLE_OPTIONS = [
|
|
14911
14911
|
{ id: "custom", label: "Custom" },
|
|
14912
|
-
...
|
|
14912
|
+
..._chunkJCXMJUQOcjs.WARP_STYLES.map((id) => ({ id, label: _chunkJCXMJUQOcjs.WARP_STYLE_LABELS[id] }))
|
|
14913
14913
|
];
|
|
14914
14914
|
var WARP_GRID_OPTIONS = [
|
|
14915
14915
|
{ id: "1x1", label: "Default", columns: 1, rows: 1 },
|
|
@@ -15091,7 +15091,7 @@ var FreeTransformTool = (_class13 = class {
|
|
|
15091
15091
|
setMode(mode) {
|
|
15092
15092
|
this.modeValue = mode;
|
|
15093
15093
|
const s = this.session;
|
|
15094
|
-
if (mode === "warp" && s && !this.mesh) this.mesh =
|
|
15094
|
+
if (mode === "warp" && s && !this.mesh) this.mesh = _chunkJCXMJUQOcjs.identityWarpMesh.call(void 0, s.box, this.warpSettings.columns, this.warpSettings.rows);
|
|
15095
15095
|
this.changed();
|
|
15096
15096
|
}
|
|
15097
15097
|
/** The Warp options bar's settings. */
|
|
@@ -15113,13 +15113,13 @@ var FreeTransformTool = (_class13 = class {
|
|
|
15113
15113
|
this.modeValue = "warp";
|
|
15114
15114
|
const next = { ...this.warpSettings, ...changes };
|
|
15115
15115
|
this.warpSettings = next;
|
|
15116
|
-
let mesh = _nullishCoalesce(this.mesh, () => (
|
|
15116
|
+
let mesh = _nullishCoalesce(this.mesh, () => ( _chunkJCXMJUQOcjs.identityWarpMesh.call(void 0, s.box, next.columns, next.rows)));
|
|
15117
15117
|
if (next.style !== "custom" && ("style" in changes || "bend" in changes || "horizontal" in changes || "vertical" in changes || "orientation" in changes)) {
|
|
15118
15118
|
const preset = { style: next.style, bend: next.bend, horizontal: next.horizontal, vertical: next.vertical, orientation: next.orientation };
|
|
15119
|
-
mesh = _nullishCoalesce(
|
|
15120
|
-
mesh =
|
|
15119
|
+
mesh = _nullishCoalesce(_chunkJCXMJUQOcjs.warpPresetMesh.call(void 0, preset, s.box), () => ( _chunkJCXMJUQOcjs.identityWarpMesh.call(void 0, s.box)));
|
|
15120
|
+
mesh = _chunkJCXMJUQOcjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
|
|
15121
15121
|
}
|
|
15122
|
-
if ("columns" in changes || "rows" in changes) mesh =
|
|
15122
|
+
if ("columns" in changes || "rows" in changes) mesh = _chunkJCXMJUQOcjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
|
|
15123
15123
|
this.mesh = mesh;
|
|
15124
15124
|
this.changed();
|
|
15125
15125
|
this.preview();
|
|
@@ -15166,11 +15166,11 @@ var FreeTransformTool = (_class13 = class {
|
|
|
15166
15166
|
const m = this.mesh;
|
|
15167
15167
|
const at = (p) => _nullishCoalesce(_chunkQT26RHKKcjs.applyHomography.call(void 0, h, p), () => ( p));
|
|
15168
15168
|
const pts = m.points.map(at);
|
|
15169
|
-
const edit =
|
|
15169
|
+
const edit = _chunkJCXMJUQOcjs.warpMeshEditPoints.call(void 0, m);
|
|
15170
15170
|
out.handles = [];
|
|
15171
|
-
out.outline =
|
|
15171
|
+
out.outline = _chunkJCXMJUQOcjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }).length ? this.meshOutline(pts, m) : out.outline;
|
|
15172
15172
|
out.warp = {
|
|
15173
|
-
curves:
|
|
15173
|
+
curves: _chunkJCXMJUQOcjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }),
|
|
15174
15174
|
anchors: edit.anchors.map((i) => pts[i]),
|
|
15175
15175
|
handles: edit.handles.map((e) => ({ point: pts[e.index], anchor: pts[e.anchor] }))
|
|
15176
15176
|
};
|
|
@@ -15194,7 +15194,7 @@ var FreeTransformTool = (_class13 = class {
|
|
|
15194
15194
|
if (!o) return null;
|
|
15195
15195
|
if (this.modeValue === "warp" && this.mesh) {
|
|
15196
15196
|
const h = this.homography();
|
|
15197
|
-
const edit =
|
|
15197
|
+
const edit = _chunkJCXMJUQOcjs.warpMeshEditPoints.call(void 0, this.mesh);
|
|
15198
15198
|
let best2 = -1;
|
|
15199
15199
|
let bestD2 = tolerance;
|
|
15200
15200
|
for (const i of [...edit.anchors, ...edit.handles.map((e) => e.index)]) {
|
|
@@ -15243,7 +15243,7 @@ var FreeTransformTool = (_class13 = class {
|
|
|
15243
15243
|
if (this.modeValue === "warp" && this.mesh && handle === "inside") {
|
|
15244
15244
|
const q = this.toFrame(p, this.corners);
|
|
15245
15245
|
if (q) {
|
|
15246
|
-
const r =
|
|
15246
|
+
const r = _chunkJCXMJUQOcjs.warpMeshParamAt.call(void 0, this.mesh, q);
|
|
15247
15247
|
st = { s: r.s, t: r.t };
|
|
15248
15248
|
}
|
|
15249
15249
|
}
|
|
@@ -15276,8 +15276,8 @@ var FreeTransformTool = (_class13 = class {
|
|
|
15276
15276
|
if (!a || !b) return;
|
|
15277
15277
|
const delta = { x: b.x - a.x, y: b.y - a.y };
|
|
15278
15278
|
const i = meshIndex(d.handle);
|
|
15279
|
-
if (i >= 0) this.mesh =
|
|
15280
|
-
else if (d.handle === "inside" && d.st) this.mesh =
|
|
15279
|
+
if (i >= 0) this.mesh = _chunkJCXMJUQOcjs.dragWarpMeshPoint.call(void 0, d.mesh, i, delta);
|
|
15280
|
+
else if (d.handle === "inside" && d.st) this.mesh = _chunkJCXMJUQOcjs.pullWarpMesh.call(void 0, d.mesh, d.st.s, d.st.t, delta);
|
|
15281
15281
|
else return;
|
|
15282
15282
|
this.warpSettings = { ...this.warpSettings, style: "custom" };
|
|
15283
15283
|
this.changed();
|
|
@@ -15401,7 +15401,7 @@ var FreeTransformTool = (_class13 = class {
|
|
|
15401
15401
|
bar() {
|
|
15402
15402
|
const s = this.session;
|
|
15403
15403
|
if (!s || !this.corners) return null;
|
|
15404
|
-
const read =
|
|
15404
|
+
const read = _chunkPA3IMPPScjs.describeTransform.call(void 0, { box: s.box, corners: this.corners }, this.refBox);
|
|
15405
15405
|
return {
|
|
15406
15406
|
affine: read.affine,
|
|
15407
15407
|
x: _nullishCoalesce(this.typed.x, () => ( read.x)),
|
|
@@ -15426,7 +15426,7 @@ var FreeTransformTool = (_class13 = class {
|
|
|
15426
15426
|
this.changed();
|
|
15427
15427
|
return;
|
|
15428
15428
|
}
|
|
15429
|
-
const m =
|
|
15429
|
+
const m = _chunkPA3IMPPScjs.matrixFromParams.call(void 0, s.box, {
|
|
15430
15430
|
scaleX: next.scaleX,
|
|
15431
15431
|
scaleY: next.scaleY,
|
|
15432
15432
|
rotate: next.rotate,
|
|
@@ -15436,7 +15436,7 @@ var FreeTransformTool = (_class13 = class {
|
|
|
15436
15436
|
dx: next.x - this.refBox.x,
|
|
15437
15437
|
dy: next.y - this.refBox.y
|
|
15438
15438
|
});
|
|
15439
|
-
this.setCorners(
|
|
15439
|
+
this.setCorners(_chunkPA3IMPPScjs.cornersFromMatrix.call(void 0, s.box, m));
|
|
15440
15440
|
this.typed = { scaleX: next.scaleX, scaleY: next.scaleY, rotate: next.rotate, skewX: next.skewX, skewY: next.skewY, x: next.x, y: next.y };
|
|
15441
15441
|
this.changed();
|
|
15442
15442
|
}
|
|
@@ -16602,4 +16602,4 @@ function createImageEditorDocument(controller, options = {}) {
|
|
|
16602
16602
|
|
|
16603
16603
|
|
|
16604
16604
|
|
|
16605
|
-
exports.ADJUSTMENT_KEYS = _chunk32MMQYCQcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunk32MMQYCQcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunk32MMQYCQcjs.ADJUSTMENT_LUT_SIZE; exports.ANCHOR_FRACTION = _chunk32MMQYCQcjs.ANCHOR_FRACTION; exports.AS_SHOT_KELVIN = _chunk32MMQYCQcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunk32MMQYCQcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunk32MMQYCQcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkCWM3CUUXcjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkCWM3CUUXcjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunk32MMQYCQcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkGNK7SESQcjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkBROJYMWUcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkEBDCRTZIcjs.BrushstrokeCache; exports.CANVAS_SIZE_PRESETS = CANVAS_SIZE_PRESETS; exports.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.CoverageMap = _chunkEBDCRTZIcjs.CoverageMap; exports.D50 = _chunk32MMQYCQcjs.D50; exports.D65 = _chunk32MMQYCQcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunk236TKNURcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkEBDCRTZIcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkEBDCRTZIcjs.DEFAULT_BRUSH; exports.DEFAULT_CANVAS_VIEWPORT = DEFAULT_CANVAS_VIEWPORT; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkGNK7SESQcjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkHGTDMKNEcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunk32MMQYCQcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunkEBDCRTZIcjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunk7NW46N7Icjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunkEBDCRTZIcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunk236TKNURcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkGNK7SESQcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkGNK7SESQcjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunk32MMQYCQcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkHGTDMKNEcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkGNK7SESQcjs.DRY_EPS; exports.DabWalker = _chunkEBDCRTZIcjs.DabWalker; exports.EMPTY_DISTANCE = _chunk32MMQYCQcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkGNK7SESQcjs.EX; exports.EY = _chunkGNK7SESQcjs.EY; exports.FLAG_ALIVE = _chunkGNK7SESQcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkGNK7SESQcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkGNK7SESQcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkGNK7SESQcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkGNK7SESQcjs.FLAG_TOP; exports.FLAG_WET = _chunkGNK7SESQcjs.FLAG_WET; exports.FLAT = _chunkGNK7SESQcjs.FLAT; exports.FREE_INTERVAL = _chunkGNK7SESQcjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunk32MMQYCQcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GRAIN_PATTERNS = _chunkEBDCRTZIcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkEBDCRTZIcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.HIDE = _chunkGNK7SESQcjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunk32MMQYCQcjs.HUE_RANGE_LABELS; exports.IDENTITY_CLONE_TRANSFORM = _chunk7NW46N7Icjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunk32MMQYCQcjs.IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_CROP_PRESETS = IMAGE_CROP_PRESETS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.IMAGE_EFFECT_PLACES = IMAGE_EFFECT_PLACES; exports.IMAGE_FILTER_PRESETS = IMAGE_FILTER_PRESETS; exports.IMAGE_PLAYBACK_KIND = IMAGE_PLAYBACK_KIND; exports.INTENTS = _chunkBROJYMWUcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunkHGTDMKNEcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunk32MMQYCQcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunk32MMQYCQcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunk32MMQYCQcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunk32MMQYCQcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunk32MMQYCQcjs.LUMA_709; exports.LayerCompositor = _chunk32MMQYCQcjs.LayerCompositor; exports.LayerEffectError = _chunkHGTDMKNEcjs.LayerEffectError; exports.LayerOperationError = _chunk32MMQYCQcjs.LayerOperationError; exports.MAX_BATCH = _chunkGNK7SESQcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkEBDCRTZIcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_BACKING_SIDE = MAX_CANVAS_BACKING_SIDE; exports.MAX_EFFECT_REACH = _chunkHGTDMKNEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunk32MMQYCQcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkGNK7SESQcjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkHGTDMKNEcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkGNK7SESQcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkGNK7SESQcjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunk32MMQYCQcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunk32MMQYCQcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkEBDCRTZIcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkEBDCRTZIcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkEBDCRTZIcjs.MIXING_MODELS; exports.MixerStroke = _chunkEBDCRTZIcjs.MixerStroke; exports.OPP = _chunkGNK7SESQcjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkCWM3CUUXcjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunkEBDCRTZIcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkEBDCRTZIcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkGNK7SESQcjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunk32MMQYCQcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkGNK7SESQcjs.PARAM; exports.PARAM_FLOATS = _chunkGNK7SESQcjs.PARAM_FLOATS; exports.PATTERN_BLOCK_KEYS = _chunk32MMQYCQcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkCWM3CUUXcjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkGNK7SESQcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkGNK7SESQcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkCWM3CUUXcjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkGNK7SESQcjs.PLANE; exports.PLANE_BYTES = _chunkGNK7SESQcjs.PLANE_BYTES; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunk32MMQYCQcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkGNK7SESQcjs.P_D0; exports.P_EDGE = _chunkGNK7SESQcjs.P_EDGE; exports.P_FX = _chunkGNK7SESQcjs.P_FX; exports.P_FY = _chunkGNK7SESQcjs.P_FY; exports.P_H = _chunkGNK7SESQcjs.P_H; exports.P_P0 = _chunkGNK7SESQcjs.P_P0; exports.P_RHO = _chunkGNK7SESQcjs.P_RHO; exports.P_SW = _chunkGNK7SESQcjs.P_SW; exports.P_UX = _chunkGNK7SESQcjs.P_UX; exports.P_UY = _chunkGNK7SESQcjs.P_UY; exports.PaintExchange = _chunkEBDCRTZIcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkEBDCRTZIcjs.PaintGradientSampler; exports.PaintSourceError = _chunkEBDCRTZIcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaperGrain = _chunkEBDCRTZIcjs.PaperGrain; exports.PatternPlacement = _chunkHGTDMKNEcjs.PatternPlacement; exports.PatternTile = _chunkHGTDMKNEcjs.PatternTile; exports.PsdError = _chunk32MMQYCQcjs.PsdError; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunk7NW46N7Icjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunk7NW46N7Icjs.RegionPixelSource; exports.RetouchDabStroke = _chunk7NW46N7Icjs.RetouchDabStroke; exports.SELECTION_MODES = _chunk32MMQYCQcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunk32MMQYCQcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SET_PLANES = _chunkGNK7SESQcjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkCWM3CUUXcjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunk32MMQYCQcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunk32MMQYCQcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkGNK7SESQcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkGNK7SESQcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkGNK7SESQcjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunk32MMQYCQcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunk7NW46N7Icjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkGNK7SESQcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkGNK7SESQcjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunk32MMQYCQcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkEBDCRTZIcjs.SmudgeTip; exports.StrokeCoverage = _chunkEBDCRTZIcjs.StrokeCoverage; exports.SurfaceDraft = _chunkCWM3CUUXcjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunk32MMQYCQcjs.TEXT_ALIGNS; exports.TEXT_RENDER_MARGIN = _chunk32MMQYCQcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunk32MMQYCQcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkCWM3CUUXcjs.TILE; exports.TILE_SHIFT = _chunkCWM3CUUXcjs.TILE_SHIFT; exports.TINT_SCALE = _chunk32MMQYCQcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkEBDCRTZIcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunk32MMQYCQcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunk7NW46N7Icjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunk32MMQYCQcjs.TRANSFORM_ANCHORS; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunkEBDCRTZIcjs.TileMedium; exports.TilePixelSource = _chunk7NW46N7Icjs.TilePixelSource; exports.TileableNoise = _chunkEBDCRTZIcjs.TileableNoise; exports.TiledSurface = _chunkCWM3CUUXcjs.TiledSurface; exports.TransformTooLargeError = _chunkHGTDMKNEcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunk7NW46N7Icjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.U_MAX = _chunkGNK7SESQcjs.U_MAX; exports.VIBRANCE_GREY = _chunk32MMQYCQcjs.VIBRANCE_GREY; exports.W9 = _chunkGNK7SESQcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunk236TKNURcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunk236TKNURcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkGNK7SESQcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkGNK7SESQcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkGNK7SESQcjs.WET_TILE; exports.WGSL_HALO = _chunkGNK7SESQcjs.WGSL_HALO; exports.WGSL_SHADE = _chunkGNK7SESQcjs.WGSL_SHADE; exports.WGSL_STEP = _chunkGNK7SESQcjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WetGpuEngine = _chunkGNK7SESQcjs.WetGpuEngine; exports.WetMedium = _chunkGNK7SESQcjs.WetMedium; exports.WetWorkerPool = _chunkGNK7SESQcjs.WetWorkerPool; exports.WetWorld = _chunkGNK7SESQcjs.WetWorld; exports.WetWorldError = _chunkGNK7SESQcjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunk32MMQYCQcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunk32MMQYCQcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunk32MMQYCQcjs.activeEffectSmartFilters; exports.activeLayerAfterRemoval = _chunk32MMQYCQcjs.activeLayerAfterRemoval; exports.activeSmartFilters = _chunk32MMQYCQcjs.activeSmartFilters; exports.addLayerEffect = _chunk32MMQYCQcjs.addLayerEffect; exports.addLayerFilter = _chunk32MMQYCQcjs.addLayerFilter; exports.addLayerOfKind = addLayerOfKind; exports.addPaintGradientStop = _chunkEBDCRTZIcjs.addPaintGradientStop; exports.addSmartFilter = _chunk32MMQYCQcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunk32MMQYCQcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunk32MMQYCQcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunk32MMQYCQcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunk32MMQYCQcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.agentDragDraft = agentDragDraft; exports.anchorPoint = _chunk32MMQYCQcjs.anchorPoint; exports.annotationBlend = _chunk32MMQYCQcjs.annotationBlend; exports.annotationLayerFor = _chunk32MMQYCQcjs.annotationLayerFor; exports.annotationLayerName = _chunk32MMQYCQcjs.annotationLayerName; exports.annotationOfLayer = _chunk32MMQYCQcjs.annotationOfLayer; exports.annotationOfShape = _chunk32MMQYCQcjs.annotationOfShape; exports.annotationOfType = _chunk32MMQYCQcjs.annotationOfType; exports.applyAdjustmentLayers = _chunk32MMQYCQcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunk32MMQYCQcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunk32MMQYCQcjs.applyAdjustments; exports.applyBoxBlur = _chunk32MMQYCQcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunk32MMQYCQcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunk32MMQYCQcjs.applyDepthMask; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunk32MMQYCQcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunk32MMQYCQcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunk32MMQYCQcjs.applyLegacyFloat; exports.applyMatrix3 = _chunk32MMQYCQcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunk32MMQYCQcjs.applyParams; exports.applyProcess2Adjustments = _chunk32MMQYCQcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunk32MMQYCQcjs.applyProcess2Float; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunk7NW46N7Icjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunk32MMQYCQcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkEBDCRTZIcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkEBDCRTZIcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunk7NW46N7Icjs.applyToneToDeepTile; exports.backgroundLayer = _chunk32MMQYCQcjs.backgroundLayer; exports.base64ToBytes = _chunkCWM3CUUXcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunk7NW46N7Icjs.bestOffset; exports.blackWhiteGray = _chunk32MMQYCQcjs.blackWhiteGray; exports.blendChannel = _chunkCWM3CUUXcjs.blendChannel; exports.blendImageData = _chunkCWM3CUUXcjs.blendImageData; exports.blendLum = _chunkCWM3CUUXcjs.blendLum; exports.blendPixel = _chunkCWM3CUUXcjs.blendPixel; exports.blendRadius = _chunkEBDCRTZIcjs.blendRadius; exports.blendRgb = _chunkCWM3CUUXcjs.blendRgb; exports.blendTile = _chunkHGTDMKNEcjs.blendTile; exports.blenderDab = _chunkEBDCRTZIcjs.blenderDab; exports.blurFilter = _chunk32MMQYCQcjs.blurFilter; exports.borderCoverage = _chunk32MMQYCQcjs.borderCoverage; exports.boxBlurPixels = _chunk7NW46N7Icjs.boxBlurPixels; exports.boxFrameHit = boxFrameHit; exports.boxFrameOverlay = boxFrameOverlay; exports.boxMean = boxMean; exports.boxPointOf = _chunk32MMQYCQcjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunk32MMQYCQcjs.bradfordAdaptation; exports.brushstrokeDataUrl = _chunkEBDCRTZIcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkEBDCRTZIcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkEBDCRTZIcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkEBDCRTZIcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkEBDCRTZIcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunk32MMQYCQcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunk32MMQYCQcjs.buildToneLut; exports.builtinPattern = _chunkHGTDMKNEcjs.builtinPattern; exports.builtinPatternIds = _chunkHGTDMKNEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkCWM3CUUXcjs.bytesToBase64; exports.calculateCropDrag = _chunk32MMQYCQcjs.calculateCropDrag; exports.canShareMemory = _chunkGNK7SESQcjs.canShareMemory; exports.canvasCompositeOperation = _chunkCWM3CUUXcjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunk32MMQYCQcjs.canvasToImagePoint; exports.caretAt = _chunk236TKNURcjs.caretAt; exports.changedTiles = _chunkHGTDMKNEcjs.changedTiles; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunk32MMQYCQcjs.clampCropToImage; exports.cleanMixer = _chunkEBDCRTZIcjs.cleanMixer; exports.cloneSamplePoint = _chunk7NW46N7Icjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunkCWM3CUUXcjs.collectTiles; exports.colorBalanceChannel = _chunk32MMQYCQcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.combineSelections = _chunk32MMQYCQcjs.combineSelections; exports.compileAdjustmentLayer = _chunk32MMQYCQcjs.compileAdjustmentLayer; exports.componentPath = _chunk32MMQYCQcjs.componentPath; exports.compositeDeep = _chunk32MMQYCQcjs.compositeDeep; exports.compositeSurfaceOver = _chunkHGTDMKNEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunk32MMQYCQcjs.computeSelectionBounds; exports.contentAwareFill = _chunk7NW46N7Icjs.contentAwareFill; exports.contentBounds = _chunkCWM3CUUXcjs.contentBounds; exports.contentsBox = _chunk32MMQYCQcjs.contentsBox; exports.contentsSurface = _chunk32MMQYCQcjs.contentsSurface; exports.contractCoverage = _chunk32MMQYCQcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkCWM3CUUXcjs.convertSurfaceDepth; exports.convertToSmartObject = _chunk32MMQYCQcjs.convertToSmartObject; exports.copySmartObject = _chunk32MMQYCQcjs.copySmartObject; exports.cornersFromMatrix = _chunk32MMQYCQcjs.cornersFromMatrix; exports.coverageTileCoord = _chunkEBDCRTZIcjs.coverageTileCoord; exports.coverageToByte = _chunk32MMQYCQcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunk32MMQYCQcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkEBDCRTZIcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunk236TKNURcjs.createCanvasTextShaper; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageColorTools = createImageColorTools; exports.createImageEditTools = createImageEditTools; exports.createImageEditorDocument = createImageEditorDocument; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageEffectsToolProvider = createImageEffectsToolProvider; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePlaybackLocator = createImagePlaybackLocator; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunk236TKNURcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunk236TKNURcjs.createOutlineTextShaper; exports.createPigment = _chunkCWM3CUUXcjs.createPigment; exports.createPigmentTools = _chunkGNK7SESQcjs.createPigmentTools; exports.createSelectionMask = _chunk32MMQYCQcjs.createSelectionMask; exports.createShapeLayer = _chunk32MMQYCQcjs.createShapeLayer; exports.createTypeLayer = _chunk32MMQYCQcjs.createTypeLayer; exports.createWetGpuEngine = _chunkGNK7SESQcjs.createWetGpuEngine; exports.cssFont = _chunk236TKNURcjs.cssFont; exports.cssFontFamily = _chunk236TKNURcjs.cssFontFamily; exports.curveLut = _chunkHGTDMKNEcjs.curveLut; exports.curveLutFromLevels = _chunk32MMQYCQcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkEBDCRTZIcjs.dabCoverage; exports.dabRect = _chunkEBDCRTZIcjs.dabRect; exports.decodeDeepSurface = _chunk32MMQYCQcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunk32MMQYCQcjs.decodeLayerChannel; exports.decodeLayerMask = _chunk32MMQYCQcjs.decodeLayerMask; exports.decodeMergedImage = _chunk32MMQYCQcjs.decodeMergedImage; exports.decodePlanes = _chunk32MMQYCQcjs.decodePlanes; exports.decodePng = _chunkCWM3CUUXcjs.decodePng; exports.decodePngDataUrl = _chunk32MMQYCQcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunk32MMQYCQcjs.decodeSelectionRle; exports.deepBytes = _chunkCWM3CUUXcjs.deepBytes; exports.deepTile = _chunkCWM3CUUXcjs.deepTile; exports.defaultActiveLayerId = _chunk32MMQYCQcjs.defaultActiveLayerId; exports.defaultAdjustmentParams = _chunk32MMQYCQcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkHGTDMKNEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkHGTDMKNEcjs.defaultLayerEffect; exports.defaultShapeName = _chunk32MMQYCQcjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunk32MMQYCQcjs.depthMaskAlpha; exports.depthOf = _chunkCWM3CUUXcjs.depthOf; exports.depthRasterMask = _chunk32MMQYCQcjs.depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunk32MMQYCQcjs.describeTransform; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunk32MMQYCQcjs.deserializeEffects; exports.deserializeLayer = _chunk32MMQYCQcjs.deserializeLayer; exports.deserializeLayers = _chunk32MMQYCQcjs.deserializeLayers; exports.deserializePatterns = _chunk32MMQYCQcjs.deserializePatterns; exports.deserializeSelection = _chunk32MMQYCQcjs.deserializeSelection; exports.developFilter = _chunk32MMQYCQcjs.developFilter; exports.developFromAdjustments = _chunk32MMQYCQcjs.developFromAdjustments; exports.developTarget = _chunk32MMQYCQcjs.developTarget; exports.dexp = _chunkGNK7SESQcjs.dexp; exports.dilateMask = _chunk7NW46N7Icjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunk32MMQYCQcjs.distanceTransform; exports.dlog = _chunkGNK7SESQcjs.dlog; exports.documentContents = _chunk32MMQYCQcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunk7NW46N7Icjs.dodgeBurn; exports.dodgeBurnCurve = _chunk7NW46N7Icjs.dodgeBurnCurve; exports.downloadPsd = downloadPsd; exports.dpow = _chunkGNK7SESQcjs.dpow; exports.dragWarpMeshPoint = _chunk236TKNURcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkGNK7SESQcjs.dsincos; exports.duplicateLayer = _chunk32MMQYCQcjs.duplicateLayer; exports.edgeBits = _chunkGNK7SESQcjs.edgeBits; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunkHGTDMKNEcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkHGTDMKNEcjs.effectReach; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkHGTDMKNEcjs.effectsFingerprint; exports.effectsMargin = _chunkHGTDMKNEcjs.effectsMargin; exports.effectsScale = _chunkHGTDMKNEcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkCWM3CUUXcjs.emptySurface; exports.encodeDeepSurface = _chunk32MMQYCQcjs.encodeDeepSurface; exports.encodePng = _chunkCWM3CUUXcjs.encodePng; exports.encodeRle = _chunk32MMQYCQcjs.encodeRle; exports.encodeSelectionRle = _chunk32MMQYCQcjs.encodeSelectionRle; exports.encodeSurface = _chunk32MMQYCQcjs.encodeSurface; exports.evalWarpMesh = _chunk236TKNURcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunk32MMQYCQcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkEBDCRTZIcjs.exchangeRates; exports.expNeg = _chunkGNK7SESQcjs.expNeg; exports.expandCoverage = _chunk32MMQYCQcjs.expandCoverage; exports.exportPsd = _chunk32MMQYCQcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunk32MMQYCQcjs.featherCoverage; exports.fillRect = _chunkCWM3CUUXcjs.fillRect; exports.filmPixel = _chunkGNK7SESQcjs.filmPixel; exports.filmReflectance = _chunkGNK7SESQcjs.filmReflectance; exports.filterMaskCoverage = _chunk32MMQYCQcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkHGTDMKNEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findWebGpu = _chunkGNK7SESQcjs.findWebGpu; exports.finishTile = _chunkCWM3CUUXcjs.finishTile; exports.fitParagraphRuns = _chunk236TKNURcjs.fitParagraphRuns; exports.fitRuns = _chunk236TKNURcjs.fitRuns; exports.flattenLayers = _chunkHGTDMKNEcjs.flattenLayers; exports.flattenPath = _chunk32MMQYCQcjs.flattenPath; exports.flipCorners = _chunk32MMQYCQcjs.flipCorners; exports.flowField = _chunkGNK7SESQcjs.flowField; exports.fontOf = _chunk236TKNURcjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunk32MMQYCQcjs.fullSelection; exports.gaussianBlur = _chunkHGTDMKNEcjs.gaussianBlur; exports.geometryHomography = _chunk32MMQYCQcjs.geometryHomography; exports.getAnnotationBounds = _chunk32MMQYCQcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunk32MMQYCQcjs.getCropCursor; exports.getRotatedSize = _chunk32MMQYCQcjs.getRotatedSize; exports.getViewportMetrics = _chunk32MMQYCQcjs.getViewportMetrics; exports.getViewportProjection = _chunk32MMQYCQcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.gradientDabColor = _chunkEBDCRTZIcjs.gradientDabColor; exports.grainCatch = _chunkEBDCRTZIcjs.grainCatch; exports.grainHeights = _chunkEBDCRTZIcjs.grainHeights; exports.greyMorphology = _chunk32MMQYCQcjs.greyMorphology; exports.groupLayers = _chunk32MMQYCQcjs.groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunkHGTDMKNEcjs.hasActiveEffects; exports.hasResampledLegacyMask = _chunk32MMQYCQcjs.hasResampledLegacyMask; exports.hasSurface = _chunk32MMQYCQcjs.hasSurface; exports.hasWarp = _chunk32MMQYCQcjs.hasWarp; exports.hash2 = _chunkEBDCRTZIcjs.hash2; exports.hashMaskContent = _chunk32MMQYCQcjs.hashMaskContent; exports.hashNoise = _chunkHGTDMKNEcjs.hashNoise; exports.healPixels = _chunk7NW46N7Icjs.healPixels; exports.hexToPaintRgb = _chunkEBDCRTZIcjs.hexToPaintRgb; exports.hexToRgb = _chunk32MMQYCQcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunk32MMQYCQcjs.hitTestAnnotation; exports.hitTestCrop = _chunk32MMQYCQcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunk32MMQYCQcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunk32MMQYCQcjs.hueRangeTables; exports.hueRangeWeight = _chunk32MMQYCQcjs.hueRangeWeight; exports.hueSaturation = _chunk32MMQYCQcjs.hueSaturation; exports.identityCurve = _chunk32MMQYCQcjs.identityCurve; exports.identityLevels = _chunk32MMQYCQcjs.identityLevels; exports.identityTransform = _chunk32MMQYCQcjs.identityTransform; exports.identityWarpMesh = _chunk236TKNURcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imagePlaybackPanel = imagePlaybackPanel; exports.imageToCanvasPoint = _chunk32MMQYCQcjs.imageToCanvasPoint; exports.importPsd = _chunk32MMQYCQcjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkHGTDMKNEcjs.insertLayer; exports.instancesOf = _chunk32MMQYCQcjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunk32MMQYCQcjs.invertMatrix3; exports.invertSelection = _chunk32MMQYCQcjs.invertSelection; exports.isActiveFilter = _chunk32MMQYCQcjs.isActiveFilter; exports.isAdjustmentKind = _chunk32MMQYCQcjs.isAdjustmentKind; exports.isBitDepth = _chunkCWM3CUUXcjs.isBitDepth; exports.isBlendMode = _chunkCWM3CUUXcjs.isBlendMode; exports.isBrushstrokeBrush = _chunkEBDCRTZIcjs.isBrushstrokeBrush; exports.isContentsDecoded = _chunk32MMQYCQcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunk32MMQYCQcjs.isDefaultDepthMask; exports.isGradientPaint = _chunkEBDCRTZIcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunk7NW46N7Icjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunk32MMQYCQcjs.isIdentityTransform; exports.isInterpolation = _chunkHGTDMKNEcjs.isInterpolation; exports.isLayerEffectKind = _chunkHGTDMKNEcjs.isLayerEffectKind; exports.isLayerLocked = _chunkHGTDMKNEcjs.isLayerLocked; exports.isLegacyShape = _chunk32MMQYCQcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPaintableLayer = _chunk32MMQYCQcjs.isPaintableLayer; exports.isPainterlyBlendMode = _chunkCWM3CUUXcjs.isPainterlyBlendMode; exports.isPng = _chunkCWM3CUUXcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunk32MMQYCQcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunk32MMQYCQcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunk32MMQYCQcjs.isSelectionEmpty; exports.isSelectionMode = _chunk32MMQYCQcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkCWM3CUUXcjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunk32MMQYCQcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunk32MMQYCQcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunk32MMQYCQcjs.isTransformAnchor; exports.isValidWarp = _chunk32MMQYCQcjs.isValidWarp; exports.keepDeepSamples = _chunkCWM3CUUXcjs.keepDeepSamples; exports.kelvinToTemperature = _chunk32MMQYCQcjs.kelvinToTemperature; exports.keysWeight = _chunkHGTDMKNEcjs.keysWeight; exports.latticeViscosity = _chunkGNK7SESQcjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkHGTDMKNEcjs.layerEffectFields; exports.layerEffectLabel = _chunkHGTDMKNEcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunk32MMQYCQcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunk32MMQYCQcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunk32MMQYCQcjs.layerMaskFromSelection; exports.layerMaskKey = _chunk32MMQYCQcjs.layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = _chunk32MMQYCQcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerPanels = layerPanels; exports.layerTree = _chunk32MMQYCQcjs.layerTree; exports.layerTypeLabel = _chunk32MMQYCQcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunk32MMQYCQcjs.layersFromLegacy; exports.layoutText = _chunk236TKNURcjs.layoutText; exports.legacyAdjustmentLayer = _chunk32MMQYCQcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunk32MMQYCQcjs.legacyMaskOf; exports.legacyView = _chunk32MMQYCQcjs.legacyView; exports.lerpPigment = _chunkCWM3CUUXcjs.lerpPigment; exports.lerpPigmentInto = _chunkCWM3CUUXcjs.lerpPigmentInto; exports.levelsValue = _chunk32MMQYCQcjs.levelsValue; exports.linearSrgbToXy = _chunk32MMQYCQcjs.linearSrgbToXy; exports.linearToSrgb = _chunk32MMQYCQcjs.linearToSrgb; exports.linearToSrgb8 = _chunkGNK7SESQcjs.linearToSrgb8; exports.liveComponent = _chunk32MMQYCQcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunk32MMQYCQcjs.liveShapeSubpaths; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkEBDCRTZIcjs.loadMixer; exports.loadOpenTypeFont = _chunk5UEFNX24cjs.loadOpenTypeFont; exports.loadWetKernel = _chunkGNK7SESQcjs.loadWetKernel; exports.luma = _chunk7NW46N7Icjs.luma; exports.magicWand = magicWand; exports.mapCropHandle = _chunk32MMQYCQcjs.mapCropHandle; exports.mapLayer = _chunkHGTDMKNEcjs.mapLayer; exports.mapSubpaths = _chunk32MMQYCQcjs.mapSubpaths; exports.maskBounds = _chunk7NW46N7Icjs.maskBounds; exports.maskSummary = maskSummary; exports.matrixFromCorners = _chunk32MMQYCQcjs.matrixFromCorners; exports.matrixFromParams = _chunk32MMQYCQcjs.matrixFromParams; exports.measureCanvasViewport = measureCanvasViewport; exports.membraneFill = _chunk7NW46N7Icjs.membraneFill; exports.mergeLayerEffect = _chunkHGTDMKNEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunk32MMQYCQcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunkEBDCRTZIcjs.mix32; exports.mixPigment8 = _chunkCWM3CUUXcjs.mixPigment8; exports.mixPigmentRgb = _chunkCWM3CUUXcjs.mixPigmentRgb; exports.mixPigments = _chunkCWM3CUUXcjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunkEBDCRTZIcjs.mixerRates; exports.modifySelection = _chunk32MMQYCQcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunk32MMQYCQcjs.moveLayer; exports.moveSmartFilter = _chunk32MMQYCQcjs.moveSmartFilter; exports.mulMatrix3 = _chunk32MMQYCQcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunk32MMQYCQcjs.neutralHueRange; exports.newContentsId = _chunk32MMQYCQcjs.newContentsId; exports.newEffectId = _chunkHGTDMKNEcjs.newEffectId; exports.newLayerId = _chunk32MMQYCQcjs.newLayerId; exports.newLayerOptions = newLayerOptions; exports.normalizeAdjustmentLayer = _chunk32MMQYCQcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunk32MMQYCQcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunk32MMQYCQcjs.normalizeAngle; exports.normalizeBlendMode = _chunkCWM3CUUXcjs.normalizeBlendMode; exports.normalizeBlender = _chunkEBDCRTZIcjs.normalizeBlender; exports.normalizeBrush = _chunkEBDCRTZIcjs.normalizeBrush; exports.normalizeFilter = _chunk32MMQYCQcjs.normalizeFilter; exports.normalizeFlow = _chunkGNK7SESQcjs.normalizeFlow; exports.normalizeHexColor = _chunkEBDCRTZIcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkHGTDMKNEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunk32MMQYCQcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunk32MMQYCQcjs.normalizeLiveShape; exports.normalizeMixer = _chunkEBDCRTZIcjs.normalizeMixer; exports.normalizePlacement = _chunk32MMQYCQcjs.normalizePlacement; exports.normalizeProcessVersion = _chunk32MMQYCQcjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunk7NW46N7Icjs.normalizeRetouch; exports.normalizeShapePaint = _chunk32MMQYCQcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunk32MMQYCQcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunk32MMQYCQcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkEBDCRTZIcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunk32MMQYCQcjs.normalizeSubpaths; exports.normalizeText = _chunk32MMQYCQcjs.normalizeText; exports.normalizeTilt = _chunkGNK7SESQcjs.normalizeTilt; exports.normalizeWetParams = _chunkGNK7SESQcjs.normalizeWetParams; exports.offsetLayer = _chunk32MMQYCQcjs.offsetLayer; exports.offsetShape = _chunk32MMQYCQcjs.offsetShape; exports.offsetSmartObject = _chunk32MMQYCQcjs.offsetSmartObject; exports.openPsdFile = openPsdFile; exports.packRgba = _chunkCWM3CUUXcjs.packRgba; exports.packWetParams = _chunkGNK7SESQcjs.packWetParams; exports.paintGradientMappingFor = _chunkEBDCRTZIcjs.paintGradientMappingFor; exports.paintPathStroke = _chunkEBDCRTZIcjs.paintPathStroke; exports.paintSourceColor = _chunkEBDCRTZIcjs.paintSourceColor; exports.paintSourceCss = _chunkEBDCRTZIcjs.paintSourceCss; exports.paragraphRanges = _chunk236TKNURcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunk32MMQYCQcjs.parseAdjustmentBlock; exports.parseBlend = _chunk32MMQYCQcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkCWM3CUUXcjs.parseDataUrl; exports.parseEffectColor = _chunkHGTDMKNEcjs.parseEffectColor; exports.parseLfx2 = _chunk32MMQYCQcjs.parseLfx2; exports.parseLrfx = _chunk32MMQYCQcjs.parseLrfx; exports.parseOpenTypeFont = _chunk5UEFNX24cjs.parseOpenTypeFont; exports.parsePaintSource = _chunkEBDCRTZIcjs.parsePaintSource; exports.parsePatternBlock = _chunk32MMQYCQcjs.parsePatternBlock; exports.parseSelectionMode = _chunk32MMQYCQcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunk32MMQYCQcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunk32MMQYCQcjs.patchParagraphStyle; exports.patchTextStyle = _chunk32MMQYCQcjs.patchTextStyle; exports.pathStrokeCoverage = _chunkEBDCRTZIcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkEBDCRTZIcjs.pathStrokeDabs; exports.perDabStrength = _chunk7NW46N7Icjs.perDabStrength; exports.photoFilterMatrix = _chunk32MMQYCQcjs.photoFilterMatrix; exports.pigment8 = _chunkCWM3CUUXcjs.pigment8; exports.pigmentColor = _chunkGNK7SESQcjs.pigmentColor; exports.pigmentOf = _chunkGNK7SESQcjs.pigmentOf; exports.pixelLayerBounds = _chunk32MMQYCQcjs.pixelLayerBounds; exports.pixelLayers = _chunk32MMQYCQcjs.pixelLayers; exports.pixelPigment = _chunkGNK7SESQcjs.pixelPigment; exports.placeContents = _chunk32MMQYCQcjs.placeContents; exports.placeLayer = _chunk32MMQYCQcjs.placeLayer; exports.placementAt = _chunk32MMQYCQcjs.placementAt; exports.placementBounds = _chunk32MMQYCQcjs.placementBounds; exports.placementGeometry = _chunk32MMQYCQcjs.placementGeometry; exports.planImageToolPlayback = planImageToolPlayback; exports.pngDataUrl = _chunkCWM3CUUXcjs.pngDataUrl; exports.pointerPressure = _chunkGNK7SESQcjs.pointerPressure; exports.pointerStrokeSample = _chunkGNK7SESQcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkGNK7SESQcjs.pointerStrokeSamples; exports.polygonCoverage = polygonCoverage; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunk32MMQYCQcjs.posterizeValue; exports.presetWarp = _chunk32MMQYCQcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunk32MMQYCQcjs.projectImagePoint; exports.projectImageRect = _chunk32MMQYCQcjs.projectImageRect; exports.projectMaskCoverage = _chunk32MMQYCQcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkCWM3CUUXcjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunk32MMQYCQcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunk32MMQYCQcjs.psdToLayers; exports.pullWarpMesh = _chunk236TKNURcjs.pullWarpMesh; exports.put255 = _chunkEBDCRTZIcjs.put255; exports.quadFrameOverlay = quadFrameOverlay; exports.quickMaskPixels = quickMaskPixels; exports.rand01 = _chunkEBDCRTZIcjs.rand01; exports.randSigned = _chunkEBDCRTZIcjs.randSigned; exports.rangeLightness = _chunk32MMQYCQcjs.rangeLightness; exports.rasterContents = _chunk32MMQYCQcjs.rasterContents; exports.rasterMaskFromLegacy = _chunk32MMQYCQcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunk32MMQYCQcjs.rasterizeCoverage; exports.rasterizeDab = _chunkEBDCRTZIcjs.rasterizeDab; exports.rasterizeSmartObject = _chunk32MMQYCQcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkCWM3CUUXcjs.readDeepRegion; exports.readPaintSource = _chunkEBDCRTZIcjs.readPaintSource; exports.readPixel = _chunkCWM3CUUXcjs.readPixel; exports.readPsd = _chunk32MMQYCQcjs.readPsd; exports.readRegion = _chunkCWM3CUUXcjs.readRegion; exports.readSourceRegion = _chunk7NW46N7Icjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkHGTDMKNEcjs.reduceSurface; exports.referencePoint = _chunk32MMQYCQcjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkCWM3CUUXcjs.reflectanceToRgb; exports.removeAlpha = _chunk32MMQYCQcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunk32MMQYCQcjs.removeLayer; exports.removeLayerEffect = _chunk32MMQYCQcjs.removeLayerEffect; exports.removeLayerFilter = _chunk32MMQYCQcjs.removeLayerFilter; exports.removePaintGradientStop = _chunkEBDCRTZIcjs.removePaintGradientStop; exports.removeSmartFilter = _chunk32MMQYCQcjs.removeSmartFilter; exports.renderBrushstroke = _chunkEBDCRTZIcjs.renderBrushstroke; exports.renderLayerEffects = _chunkHGTDMKNEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunk32MMQYCQcjs.renderShape; exports.renderShapeRect = _chunk32MMQYCQcjs.renderShapeRect; exports.renderSmartObject = _chunk32MMQYCQcjs.renderSmartObject; exports.renderText = _chunk32MMQYCQcjs.renderText; exports.replaceContents = _chunk32MMQYCQcjs.replaceContents; exports.replaceTextRange = _chunk32MMQYCQcjs.replaceTextRange; exports.requireLayer = _chunk32MMQYCQcjs.requireLayer; exports.requireOperation = _chunk32MMQYCQcjs.requireOperation; exports.requireShapeLayer = _chunk32MMQYCQcjs.requireShapeLayer; exports.requireSmartObject = _chunk32MMQYCQcjs.requireSmartObject; exports.requireTypeLayer = _chunk32MMQYCQcjs.requireTypeLayer; exports.requireUnlocked = _chunk32MMQYCQcjs.requireUnlocked; exports.rerender = _chunk32MMQYCQcjs.rerender; exports.rerenderShape = _chunk32MMQYCQcjs.rerenderShape; exports.rerenderText = _chunk32MMQYCQcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunk32MMQYCQcjs.resizeSelection; exports.resizeWarpMesh = _chunk236TKNURcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunk32MMQYCQcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkEBDCRTZIcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.restyleRange = _chunk236TKNURcjs.restyleRange; exports.retouchFilter = _chunk7NW46N7Icjs.retouchFilter; exports.reversePaintGradient = _chunkEBDCRTZIcjs.reversePaintGradient; exports.rgbToGray = _chunk32MMQYCQcjs.rgbToGray; exports.rgbToHsl = _chunk32MMQYCQcjs.rgbToHsl; exports.rgbToReflectance = _chunkCWM3CUUXcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunk7NW46N7Icjs.rgbaViewOfGrey; exports.runLayerFilters = _chunk32MMQYCQcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunk32MMQYCQcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sameCanvasViewport = sameCanvasViewport; exports.sampleLut = _chunk32MMQYCQcjs.sampleLut; exports.sampleToneLut = _chunk32MMQYCQcjs.sampleToneLut; exports.saturationOf = _chunk7NW46N7Icjs.saturationOf; exports.scaleLayerEffect = _chunkHGTDMKNEcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkEBDCRTZIcjs.scalePaintGradient; exports.seamlessClone = _chunk7NW46N7Icjs.seamlessClone; exports.seedFromString = _chunkEBDCRTZIcjs.seedFromString; exports.selectionArea = _chunk32MMQYCQcjs.selectionArea; exports.selectionFromCoverage = _chunk32MMQYCQcjs.selectionFromCoverage; exports.selectionFromPixels = _chunk32MMQYCQcjs.selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = _chunk32MMQYCQcjs.selectionToCoverage; exports.selectionToPixels = _chunk32MMQYCQcjs.selectionToPixels; exports.selectionValueAt = _chunk32MMQYCQcjs.selectionValueAt; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunk32MMQYCQcjs.serializeContents; exports.serializeEffects = _chunk32MMQYCQcjs.serializeEffects; exports.serializeLayer = _chunk32MMQYCQcjs.serializeLayer; exports.serializeLayers = _chunk32MMQYCQcjs.serializeLayers; exports.serializeLayersExternal = _chunk32MMQYCQcjs.serializeLayersExternal; exports.serializePatterns = _chunk32MMQYCQcjs.serializePatterns; exports.serializeSelection = _chunk32MMQYCQcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunk32MMQYCQcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunk32MMQYCQcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunk32MMQYCQcjs.setLayerMask; exports.setLayerProperties = _chunk32MMQYCQcjs.setLayerProperties; exports.setLum = _chunkCWM3CUUXcjs.setLum; exports.setPigmentColor = _chunkCWM3CUUXcjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunk32MMQYCQcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunk32MMQYCQcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunk32MMQYCQcjs.setSmartPlacement; exports.shadeTile = _chunkGNK7SESQcjs.shadeTile; exports.shapeAsPixelLayer = _chunk32MMQYCQcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunk32MMQYCQcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunk32MMQYCQcjs.shapeGeometryBounds; exports.shapeLayers = _chunk32MMQYCQcjs.shapeLayers; exports.shapeOutline = _chunk32MMQYCQcjs.shapeOutline; exports.shapeRenderClip = _chunk32MMQYCQcjs.shapeRenderClip; exports.shiftCoverage = _chunk32MMQYCQcjs.shiftCoverage; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunk32MMQYCQcjs.smartObjectLayers; exports.smoothCoverage = _chunk32MMQYCQcjs.smoothCoverage; exports.smoothPoints = _chunkEBDCRTZIcjs.smoothPoints; exports.smudgeEffect = _chunk7NW46N7Icjs.smudgeEffect; exports.solidPaint = _chunkEBDCRTZIcjs.solidPaint; exports.solidSurface = _chunkCWM3CUUXcjs.solidSurface; exports.solveMembrane = _chunk7NW46N7Icjs.solveMembrane; exports.spliceRuns = _chunk236TKNURcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunk7NW46N7Icjs.sponge; exports.spongeEffect = _chunk7NW46N7Icjs.spongeEffect; exports.spotHealPixels = _chunk7NW46N7Icjs.spotHealPixels; exports.spotHealWindow = _chunk7NW46N7Icjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkGNK7SESQcjs.srgbByteToLinear; exports.srgbDecode = _chunkCWM3CUUXcjs.srgbDecode; exports.srgbEncode = _chunkCWM3CUUXcjs.srgbEncode; exports.srgbToLinear = _chunk32MMQYCQcjs.srgbToLinear; exports.standardBlendMode = _chunkCWM3CUUXcjs.standardBlendMode; exports.stepSlotTs = _chunkGNK7SESQcjs.stepSlotTs; exports.strokeGrainCatch = _chunkEBDCRTZIcjs.strokeGrainCatch; exports.styleAt = _chunk236TKNURcjs.styleAt; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkCWM3CUUXcjs.surfaceBytes; exports.surfaceDepth = _chunkCWM3CUUXcjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkCWM3CUUXcjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunkCWM3CUUXcjs.surfaceFromPixels; exports.surfacesEqual = _chunkCWM3CUUXcjs.surfacesEqual; exports.tempTintToXy = _chunk32MMQYCQcjs.tempTintToXy; exports.temperatureToKelvin = _chunk32MMQYCQcjs.temperatureToKelvin; exports.textIndexAt = _chunk236TKNURcjs.textIndexAt; exports.textMatrix = _chunk32MMQYCQcjs.textMatrix; exports.textOutlines = _chunk32MMQYCQcjs.textOutlines; exports.textRange = _chunk32MMQYCQcjs.textRange; exports.tileCoord = _chunkCWM3CUUXcjs.tileCoord; exports.tileKey = _chunkCWM3CUUXcjs.tileKey; exports.tileRect = _chunkCWM3CUUXcjs.tileRect; exports.tileSamples = _chunkCWM3CUUXcjs.tileSamples; exports.tileSamples16 = _chunkCWM3CUUXcjs.tileSamples16; exports.tileSamples32 = _chunkCWM3CUUXcjs.tileSamples32; exports.tilesInRect = _chunkCWM3CUUXcjs.tilesInRect; exports.tipFalloff = _chunkEBDCRTZIcjs.tipFalloff; exports.tipReach = _chunkEBDCRTZIcjs.tipReach; exports.tipShape = _chunkEBDCRTZIcjs.tipShape; exports.to16From32 = _chunkCWM3CUUXcjs.to16From32; exports.to16From8 = _chunkCWM3CUUXcjs.to16From8; exports.to32From16 = _chunkCWM3CUUXcjs.to32From16; exports.to32From8 = _chunkCWM3CUUXcjs.to32From8; exports.to8From16 = _chunkCWM3CUUXcjs.to8From16; exports.to8From32 = _chunkCWM3CUUXcjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunk32MMQYCQcjs.toTextSpace; exports.toneCurve = _chunk32MMQYCQcjs.toneCurve; exports.toneLuts = _chunk32MMQYCQcjs.toneLuts; exports.toneOf = _chunk7NW46N7Icjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunk32MMQYCQcjs.transformHomography; exports.transformMap = _chunk32MMQYCQcjs.transformMap; exports.transformShapeComponents = _chunk32MMQYCQcjs.transformShapeComponents; exports.transformSurface = _chunkHGTDMKNEcjs.transformSurface; exports.transformTypeLayer = _chunk32MMQYCQcjs.transformTypeLayer; exports.transformedBounds = _chunkHGTDMKNEcjs.transformedBounds; exports.transformedBox = _chunk32MMQYCQcjs.transformedBox; exports.transformedPoint = _chunk32MMQYCQcjs.transformedPoint; exports.translateLayer = _chunk32MMQYCQcjs.translateLayer; exports.translateSurface = _chunkCWM3CUUXcjs.translateSurface; exports.typeAsPixelLayer = _chunk32MMQYCQcjs.typeAsPixelLayer; exports.typeFrame = _chunk32MMQYCQcjs.typeFrame; exports.typeFromAnnotation = _chunk32MMQYCQcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunk32MMQYCQcjs.typeLayerName; exports.ungroupLayer = _chunk32MMQYCQcjs.ungroupLayer; exports.uniformTile = _chunkCWM3CUUXcjs.uniformTile; exports.unionRect = _chunk32MMQYCQcjs.unionRect; exports.unprojectCanvasPoint = _chunk32MMQYCQcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunk32MMQYCQcjs.updateLayerEffect; exports.updateLayerFilter = _chunk32MMQYCQcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunk32MMQYCQcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkEBDCRTZIcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunk32MMQYCQcjs.updateShapeLayer; exports.updateSmartFilter = _chunk32MMQYCQcjs.updateSmartFilter; exports.updateTypeLayer = _chunk32MMQYCQcjs.updateTypeLayer; exports.userErrorMessage = _chunk32MMQYCQcjs.userErrorMessage; exports.uvToXy = _chunk32MMQYCQcjs.uvToXy; exports.validateEffectGradient = _chunkHGTDMKNEcjs.validateEffectGradient; exports.validateLayerEffect = _chunkHGTDMKNEcjs.validateLayerEffect; exports.validateLayerEffects = _chunkHGTDMKNEcjs.validateLayerEffects; exports.versionedDescriptorBytes = _chunk32MMQYCQcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunk32MMQYCQcjs.vibranceLinear; exports.vibrancePixel = _chunk32MMQYCQcjs.vibrancePixel; exports.walkDabs = _chunkEBDCRTZIcjs.walkDabs; exports.warpMeshEditPoints = _chunk236TKNURcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunk236TKNURcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunk236TKNURcjs.warpMeshParamAt; exports.warpPresetMesh = _chunk236TKNURcjs.warpPresetMesh; exports.warpSurface = _chunkHGTDMKNEcjs.warpSurface; exports.watchCanvasViewport = watchCanvasViewport; exports.wbMatrix = _chunk32MMQYCQcjs.wbMatrix; exports.wetGpuSupport = _chunkGNK7SESQcjs.wetGpuSupport; exports.wetSimdSupported = _chunkGNK7SESQcjs.wetSimdSupported; exports.wetSupport = _chunkGNK7SESQcjs.wetSupport; exports.whiteBalanceFromSample = _chunk32MMQYCQcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunk32MMQYCQcjs.whiteBalanceMatrix; exports.withFilterMaskSurface = _chunk32MMQYCQcjs.withFilterMaskSurface; exports.withImagePlayback = withImagePlayback; exports.withNewIds = _chunk32MMQYCQcjs.withNewIds; exports.writeAdjustmentBlock = _chunk32MMQYCQcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkCWM3CUUXcjs.writeDeepRegion; exports.writeLfx2 = _chunk32MMQYCQcjs.writeLfx2; exports.writePatternBlock = _chunk32MMQYCQcjs.writePatternBlock; exports.writePsd = _chunk32MMQYCQcjs.writePsd; exports.writeRegion = _chunkCWM3CUUXcjs.writeRegion; exports.xyToTempTint = _chunk32MMQYCQcjs.xyToTempTint; exports.xyToUv = _chunk32MMQYCQcjs.xyToUv;
|
|
16605
|
+
exports.ADJUSTMENT_KEYS = _chunkPA3IMPPScjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkPA3IMPPScjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkPA3IMPPScjs.ADJUSTMENT_LUT_SIZE; exports.ANCHOR_FRACTION = _chunkPA3IMPPScjs.ANCHOR_FRACTION; exports.AS_SHOT_KELVIN = _chunkPA3IMPPScjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkPA3IMPPScjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkPA3IMPPScjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkCWM3CUUXcjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkCWM3CUUXcjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkPA3IMPPScjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkV7GWZIZKcjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkBROJYMWUcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkEBDCRTZIcjs.BrushstrokeCache; exports.CANVAS_SIZE_PRESETS = CANVAS_SIZE_PRESETS; exports.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.CoverageMap = _chunkEBDCRTZIcjs.CoverageMap; exports.D50 = _chunkPA3IMPPScjs.D50; exports.D65 = _chunkPA3IMPPScjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkJCXMJUQOcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkEBDCRTZIcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkEBDCRTZIcjs.DEFAULT_BRUSH; exports.DEFAULT_CANVAS_VIEWPORT = DEFAULT_CANVAS_VIEWPORT; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkV7GWZIZKcjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkHGTDMKNEcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkPA3IMPPScjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunkEBDCRTZIcjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunk7NW46N7Icjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunkEBDCRTZIcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkJCXMJUQOcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkV7GWZIZKcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkV7GWZIZKcjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkPA3IMPPScjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkHGTDMKNEcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkV7GWZIZKcjs.DRY_EPS; exports.DabWalker = _chunkEBDCRTZIcjs.DabWalker; exports.EMPTY_DISTANCE = _chunkPA3IMPPScjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkV7GWZIZKcjs.EX; exports.EY = _chunkV7GWZIZKcjs.EY; exports.FLAG_ALIVE = _chunkV7GWZIZKcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkV7GWZIZKcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkV7GWZIZKcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkV7GWZIZKcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkV7GWZIZKcjs.FLAG_TOP; exports.FLAG_WET = _chunkV7GWZIZKcjs.FLAG_WET; exports.FLAT = _chunkV7GWZIZKcjs.FLAT; exports.FREE_INTERVAL = _chunkV7GWZIZKcjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkPA3IMPPScjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GRAIN_PATTERNS = _chunkEBDCRTZIcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkEBDCRTZIcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.HIDE = _chunkV7GWZIZKcjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkPA3IMPPScjs.HUE_RANGE_LABELS; exports.IDENTITY_CLONE_TRANSFORM = _chunk7NW46N7Icjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkPA3IMPPScjs.IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_CROP_PRESETS = IMAGE_CROP_PRESETS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.IMAGE_EFFECT_PLACES = IMAGE_EFFECT_PLACES; exports.IMAGE_FILTER_PRESETS = IMAGE_FILTER_PRESETS; exports.IMAGE_PLAYBACK_KIND = IMAGE_PLAYBACK_KIND; exports.INTENTS = _chunkBROJYMWUcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunkHGTDMKNEcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkPA3IMPPScjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkPA3IMPPScjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkPA3IMPPScjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkPA3IMPPScjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkPA3IMPPScjs.LUMA_709; exports.LayerCompositor = _chunkPA3IMPPScjs.LayerCompositor; exports.LayerEffectError = _chunkHGTDMKNEcjs.LayerEffectError; exports.LayerOperationError = _chunkPA3IMPPScjs.LayerOperationError; exports.MAX_BATCH = _chunkV7GWZIZKcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkEBDCRTZIcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_BACKING_SIDE = MAX_CANVAS_BACKING_SIDE; exports.MAX_EFFECT_REACH = _chunkHGTDMKNEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkPA3IMPPScjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkV7GWZIZKcjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkHGTDMKNEcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkV7GWZIZKcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkV7GWZIZKcjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkPA3IMPPScjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkPA3IMPPScjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkEBDCRTZIcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkEBDCRTZIcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkEBDCRTZIcjs.MIXING_MODELS; exports.MixerStroke = _chunkEBDCRTZIcjs.MixerStroke; exports.OPP = _chunkV7GWZIZKcjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkCWM3CUUXcjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunkEBDCRTZIcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkEBDCRTZIcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkV7GWZIZKcjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkPA3IMPPScjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkV7GWZIZKcjs.PARAM; exports.PARAM_FLOATS = _chunkV7GWZIZKcjs.PARAM_FLOATS; exports.PATTERN_BLOCK_KEYS = _chunkPA3IMPPScjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkCWM3CUUXcjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkV7GWZIZKcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkV7GWZIZKcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkCWM3CUUXcjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkV7GWZIZKcjs.PLANE; exports.PLANE_BYTES = _chunkV7GWZIZKcjs.PLANE_BYTES; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkPA3IMPPScjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkV7GWZIZKcjs.P_D0; exports.P_EDGE = _chunkV7GWZIZKcjs.P_EDGE; exports.P_FX = _chunkV7GWZIZKcjs.P_FX; exports.P_FY = _chunkV7GWZIZKcjs.P_FY; exports.P_H = _chunkV7GWZIZKcjs.P_H; exports.P_P0 = _chunkV7GWZIZKcjs.P_P0; exports.P_RHO = _chunkV7GWZIZKcjs.P_RHO; exports.P_SW = _chunkV7GWZIZKcjs.P_SW; exports.P_UX = _chunkV7GWZIZKcjs.P_UX; exports.P_UY = _chunkV7GWZIZKcjs.P_UY; exports.PaintExchange = _chunkEBDCRTZIcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkEBDCRTZIcjs.PaintGradientSampler; exports.PaintSourceError = _chunkEBDCRTZIcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaperGrain = _chunkEBDCRTZIcjs.PaperGrain; exports.PatternPlacement = _chunkHGTDMKNEcjs.PatternPlacement; exports.PatternTile = _chunkHGTDMKNEcjs.PatternTile; exports.PsdError = _chunkPA3IMPPScjs.PsdError; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunk7NW46N7Icjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunk7NW46N7Icjs.RegionPixelSource; exports.RetouchDabStroke = _chunk7NW46N7Icjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkPA3IMPPScjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkPA3IMPPScjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SET_PLANES = _chunkV7GWZIZKcjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkCWM3CUUXcjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkPA3IMPPScjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkPA3IMPPScjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkV7GWZIZKcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkV7GWZIZKcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkV7GWZIZKcjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkPA3IMPPScjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunk7NW46N7Icjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkV7GWZIZKcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkV7GWZIZKcjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkPA3IMPPScjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkEBDCRTZIcjs.SmudgeTip; exports.StrokeCoverage = _chunkEBDCRTZIcjs.StrokeCoverage; exports.SurfaceDraft = _chunkCWM3CUUXcjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkPA3IMPPScjs.TEXT_ALIGNS; exports.TEXT_RENDER_MARGIN = _chunkPA3IMPPScjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkPA3IMPPScjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkCWM3CUUXcjs.TILE; exports.TILE_SHIFT = _chunkCWM3CUUXcjs.TILE_SHIFT; exports.TINT_SCALE = _chunkPA3IMPPScjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkEBDCRTZIcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkPA3IMPPScjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunk7NW46N7Icjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkPA3IMPPScjs.TRANSFORM_ANCHORS; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunkEBDCRTZIcjs.TileMedium; exports.TilePixelSource = _chunk7NW46N7Icjs.TilePixelSource; exports.TileableNoise = _chunkEBDCRTZIcjs.TileableNoise; exports.TiledSurface = _chunkCWM3CUUXcjs.TiledSurface; exports.TransformTooLargeError = _chunkHGTDMKNEcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunk7NW46N7Icjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.U_MAX = _chunkV7GWZIZKcjs.U_MAX; exports.VIBRANCE_GREY = _chunkPA3IMPPScjs.VIBRANCE_GREY; exports.W9 = _chunkV7GWZIZKcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkJCXMJUQOcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkJCXMJUQOcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkV7GWZIZKcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkV7GWZIZKcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkV7GWZIZKcjs.WET_TILE; exports.WGSL_HALO = _chunkV7GWZIZKcjs.WGSL_HALO; exports.WGSL_SHADE = _chunkV7GWZIZKcjs.WGSL_SHADE; exports.WGSL_STEP = _chunkV7GWZIZKcjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WetGpuEngine = _chunkV7GWZIZKcjs.WetGpuEngine; exports.WetMedium = _chunkV7GWZIZKcjs.WetMedium; exports.WetWorkerPool = _chunkV7GWZIZKcjs.WetWorkerPool; exports.WetWorld = _chunkV7GWZIZKcjs.WetWorld; exports.WetWorldError = _chunkV7GWZIZKcjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkPA3IMPPScjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkPA3IMPPScjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkPA3IMPPScjs.activeEffectSmartFilters; exports.activeLayerAfterRemoval = _chunkPA3IMPPScjs.activeLayerAfterRemoval; exports.activeSmartFilters = _chunkPA3IMPPScjs.activeSmartFilters; exports.addLayerEffect = _chunkPA3IMPPScjs.addLayerEffect; exports.addLayerFilter = _chunkPA3IMPPScjs.addLayerFilter; exports.addLayerOfKind = addLayerOfKind; exports.addPaintGradientStop = _chunkEBDCRTZIcjs.addPaintGradientStop; exports.addSmartFilter = _chunkPA3IMPPScjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkPA3IMPPScjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkPA3IMPPScjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkPA3IMPPScjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkPA3IMPPScjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.agentDragDraft = agentDragDraft; exports.anchorPoint = _chunkPA3IMPPScjs.anchorPoint; exports.annotationBlend = _chunkPA3IMPPScjs.annotationBlend; exports.annotationLayerFor = _chunkPA3IMPPScjs.annotationLayerFor; exports.annotationLayerName = _chunkPA3IMPPScjs.annotationLayerName; exports.annotationOfLayer = _chunkPA3IMPPScjs.annotationOfLayer; exports.annotationOfShape = _chunkPA3IMPPScjs.annotationOfShape; exports.annotationOfType = _chunkPA3IMPPScjs.annotationOfType; exports.applyAdjustmentLayers = _chunkPA3IMPPScjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkPA3IMPPScjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkPA3IMPPScjs.applyAdjustments; exports.applyBoxBlur = _chunkPA3IMPPScjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkPA3IMPPScjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkPA3IMPPScjs.applyDepthMask; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkPA3IMPPScjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkPA3IMPPScjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkPA3IMPPScjs.applyLegacyFloat; exports.applyMatrix3 = _chunkPA3IMPPScjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkPA3IMPPScjs.applyParams; exports.applyProcess2Adjustments = _chunkPA3IMPPScjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkPA3IMPPScjs.applyProcess2Float; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunk7NW46N7Icjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkPA3IMPPScjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkEBDCRTZIcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkEBDCRTZIcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunk7NW46N7Icjs.applyToneToDeepTile; exports.backgroundLayer = _chunkPA3IMPPScjs.backgroundLayer; exports.base64ToBytes = _chunkCWM3CUUXcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunk7NW46N7Icjs.bestOffset; exports.blackWhiteGray = _chunkPA3IMPPScjs.blackWhiteGray; exports.blendChannel = _chunkCWM3CUUXcjs.blendChannel; exports.blendImageData = _chunkCWM3CUUXcjs.blendImageData; exports.blendLum = _chunkCWM3CUUXcjs.blendLum; exports.blendPixel = _chunkCWM3CUUXcjs.blendPixel; exports.blendRadius = _chunkEBDCRTZIcjs.blendRadius; exports.blendRgb = _chunkCWM3CUUXcjs.blendRgb; exports.blendTile = _chunkHGTDMKNEcjs.blendTile; exports.blenderDab = _chunkEBDCRTZIcjs.blenderDab; exports.blurFilter = _chunkPA3IMPPScjs.blurFilter; exports.borderCoverage = _chunkPA3IMPPScjs.borderCoverage; exports.boxBlurPixels = _chunk7NW46N7Icjs.boxBlurPixels; exports.boxFrameHit = boxFrameHit; exports.boxFrameOverlay = boxFrameOverlay; exports.boxMean = boxMean; exports.boxPointOf = _chunkPA3IMPPScjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkPA3IMPPScjs.bradfordAdaptation; exports.brushstrokeDataUrl = _chunkEBDCRTZIcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkEBDCRTZIcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkEBDCRTZIcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkEBDCRTZIcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkEBDCRTZIcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkPA3IMPPScjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkPA3IMPPScjs.buildToneLut; exports.builtinPattern = _chunkHGTDMKNEcjs.builtinPattern; exports.builtinPatternIds = _chunkHGTDMKNEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkCWM3CUUXcjs.bytesToBase64; exports.calculateCropDrag = _chunkPA3IMPPScjs.calculateCropDrag; exports.canShareMemory = _chunkV7GWZIZKcjs.canShareMemory; exports.canvasCompositeOperation = _chunkCWM3CUUXcjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkPA3IMPPScjs.canvasToImagePoint; exports.caretAt = _chunkJCXMJUQOcjs.caretAt; exports.changedTiles = _chunkHGTDMKNEcjs.changedTiles; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkPA3IMPPScjs.clampCropToImage; exports.cleanMixer = _chunkEBDCRTZIcjs.cleanMixer; exports.cloneSamplePoint = _chunk7NW46N7Icjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunkCWM3CUUXcjs.collectTiles; exports.colorBalanceChannel = _chunkPA3IMPPScjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.combineSelections = _chunkPA3IMPPScjs.combineSelections; exports.compileAdjustmentLayer = _chunkPA3IMPPScjs.compileAdjustmentLayer; exports.componentPath = _chunkPA3IMPPScjs.componentPath; exports.compositeDeep = _chunkPA3IMPPScjs.compositeDeep; exports.compositeSurfaceOver = _chunkHGTDMKNEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkPA3IMPPScjs.computeSelectionBounds; exports.contentAwareFill = _chunk7NW46N7Icjs.contentAwareFill; exports.contentBounds = _chunkCWM3CUUXcjs.contentBounds; exports.contentsBox = _chunkPA3IMPPScjs.contentsBox; exports.contentsSurface = _chunkPA3IMPPScjs.contentsSurface; exports.contractCoverage = _chunkPA3IMPPScjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkCWM3CUUXcjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkPA3IMPPScjs.convertToSmartObject; exports.copySmartObject = _chunkPA3IMPPScjs.copySmartObject; exports.cornersFromMatrix = _chunkPA3IMPPScjs.cornersFromMatrix; exports.coverageTileCoord = _chunkEBDCRTZIcjs.coverageTileCoord; exports.coverageToByte = _chunkPA3IMPPScjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkPA3IMPPScjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkEBDCRTZIcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkJCXMJUQOcjs.createCanvasTextShaper; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageColorTools = createImageColorTools; exports.createImageEditTools = createImageEditTools; exports.createImageEditorDocument = createImageEditorDocument; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageEffectsToolProvider = createImageEffectsToolProvider; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePlaybackLocator = createImagePlaybackLocator; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunkJCXMJUQOcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkJCXMJUQOcjs.createOutlineTextShaper; exports.createPigment = _chunkCWM3CUUXcjs.createPigment; exports.createPigmentTools = _chunkV7GWZIZKcjs.createPigmentTools; exports.createSelectionMask = _chunkPA3IMPPScjs.createSelectionMask; exports.createShapeLayer = _chunkPA3IMPPScjs.createShapeLayer; exports.createTypeLayer = _chunkPA3IMPPScjs.createTypeLayer; exports.createWetGpuEngine = _chunkV7GWZIZKcjs.createWetGpuEngine; exports.cssFont = _chunkJCXMJUQOcjs.cssFont; exports.cssFontFamily = _chunkJCXMJUQOcjs.cssFontFamily; exports.curveLut = _chunkHGTDMKNEcjs.curveLut; exports.curveLutFromLevels = _chunkPA3IMPPScjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkEBDCRTZIcjs.dabCoverage; exports.dabRect = _chunkEBDCRTZIcjs.dabRect; exports.decodeDeepSurface = _chunkPA3IMPPScjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkPA3IMPPScjs.decodeLayerChannel; exports.decodeLayerMask = _chunkPA3IMPPScjs.decodeLayerMask; exports.decodeMergedImage = _chunkPA3IMPPScjs.decodeMergedImage; exports.decodePlanes = _chunkPA3IMPPScjs.decodePlanes; exports.decodePng = _chunkCWM3CUUXcjs.decodePng; exports.decodePngDataUrl = _chunkPA3IMPPScjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkPA3IMPPScjs.decodeSelectionRle; exports.deepBytes = _chunkCWM3CUUXcjs.deepBytes; exports.deepTile = _chunkCWM3CUUXcjs.deepTile; exports.defaultActiveLayerId = _chunkPA3IMPPScjs.defaultActiveLayerId; exports.defaultAdjustmentParams = _chunkPA3IMPPScjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkHGTDMKNEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkHGTDMKNEcjs.defaultLayerEffect; exports.defaultShapeName = _chunkPA3IMPPScjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkPA3IMPPScjs.depthMaskAlpha; exports.depthOf = _chunkCWM3CUUXcjs.depthOf; exports.depthRasterMask = _chunkPA3IMPPScjs.depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkPA3IMPPScjs.describeTransform; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkPA3IMPPScjs.deserializeEffects; exports.deserializeLayer = _chunkPA3IMPPScjs.deserializeLayer; exports.deserializeLayers = _chunkPA3IMPPScjs.deserializeLayers; exports.deserializePatterns = _chunkPA3IMPPScjs.deserializePatterns; exports.deserializeSelection = _chunkPA3IMPPScjs.deserializeSelection; exports.developFilter = _chunkPA3IMPPScjs.developFilter; exports.developFromAdjustments = _chunkPA3IMPPScjs.developFromAdjustments; exports.developTarget = _chunkPA3IMPPScjs.developTarget; exports.dexp = _chunkV7GWZIZKcjs.dexp; exports.dilateMask = _chunk7NW46N7Icjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkPA3IMPPScjs.distanceTransform; exports.dlog = _chunkV7GWZIZKcjs.dlog; exports.documentContents = _chunkPA3IMPPScjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunk7NW46N7Icjs.dodgeBurn; exports.dodgeBurnCurve = _chunk7NW46N7Icjs.dodgeBurnCurve; exports.downloadPsd = downloadPsd; exports.dpow = _chunkV7GWZIZKcjs.dpow; exports.dragWarpMeshPoint = _chunkJCXMJUQOcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkV7GWZIZKcjs.dsincos; exports.duplicateLayer = _chunkPA3IMPPScjs.duplicateLayer; exports.edgeBits = _chunkV7GWZIZKcjs.edgeBits; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunkHGTDMKNEcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkHGTDMKNEcjs.effectReach; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkHGTDMKNEcjs.effectsFingerprint; exports.effectsMargin = _chunkHGTDMKNEcjs.effectsMargin; exports.effectsScale = _chunkHGTDMKNEcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkCWM3CUUXcjs.emptySurface; exports.encodeDeepSurface = _chunkPA3IMPPScjs.encodeDeepSurface; exports.encodePng = _chunkCWM3CUUXcjs.encodePng; exports.encodeRle = _chunkPA3IMPPScjs.encodeRle; exports.encodeSelectionRle = _chunkPA3IMPPScjs.encodeSelectionRle; exports.encodeSurface = _chunkPA3IMPPScjs.encodeSurface; exports.evalWarpMesh = _chunkJCXMJUQOcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkPA3IMPPScjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkEBDCRTZIcjs.exchangeRates; exports.expNeg = _chunkV7GWZIZKcjs.expNeg; exports.expandCoverage = _chunkPA3IMPPScjs.expandCoverage; exports.exportPsd = _chunkPA3IMPPScjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkPA3IMPPScjs.featherCoverage; exports.fillRect = _chunkCWM3CUUXcjs.fillRect; exports.filmPixel = _chunkV7GWZIZKcjs.filmPixel; exports.filmReflectance = _chunkV7GWZIZKcjs.filmReflectance; exports.filterMaskCoverage = _chunkPA3IMPPScjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkHGTDMKNEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findWebGpu = _chunkV7GWZIZKcjs.findWebGpu; exports.finishTile = _chunkCWM3CUUXcjs.finishTile; exports.fitParagraphRuns = _chunkJCXMJUQOcjs.fitParagraphRuns; exports.fitRuns = _chunkJCXMJUQOcjs.fitRuns; exports.flattenLayers = _chunkHGTDMKNEcjs.flattenLayers; exports.flattenPath = _chunkPA3IMPPScjs.flattenPath; exports.flipCorners = _chunkPA3IMPPScjs.flipCorners; exports.flowField = _chunkV7GWZIZKcjs.flowField; exports.fontOf = _chunkJCXMJUQOcjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkPA3IMPPScjs.fullSelection; exports.gaussianBlur = _chunkHGTDMKNEcjs.gaussianBlur; exports.geometryHomography = _chunkPA3IMPPScjs.geometryHomography; exports.getAnnotationBounds = _chunkPA3IMPPScjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkPA3IMPPScjs.getCropCursor; exports.getRotatedSize = _chunkPA3IMPPScjs.getRotatedSize; exports.getViewportMetrics = _chunkPA3IMPPScjs.getViewportMetrics; exports.getViewportProjection = _chunkPA3IMPPScjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.gradientDabColor = _chunkEBDCRTZIcjs.gradientDabColor; exports.grainCatch = _chunkEBDCRTZIcjs.grainCatch; exports.grainHeights = _chunkEBDCRTZIcjs.grainHeights; exports.greyMorphology = _chunkPA3IMPPScjs.greyMorphology; exports.groupLayers = _chunkPA3IMPPScjs.groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunkHGTDMKNEcjs.hasActiveEffects; exports.hasResampledLegacyMask = _chunkPA3IMPPScjs.hasResampledLegacyMask; exports.hasSurface = _chunkPA3IMPPScjs.hasSurface; exports.hasWarp = _chunkPA3IMPPScjs.hasWarp; exports.hash2 = _chunkEBDCRTZIcjs.hash2; exports.hashMaskContent = _chunkPA3IMPPScjs.hashMaskContent; exports.hashNoise = _chunkHGTDMKNEcjs.hashNoise; exports.healPixels = _chunk7NW46N7Icjs.healPixels; exports.hexToPaintRgb = _chunkEBDCRTZIcjs.hexToPaintRgb; exports.hexToRgb = _chunkPA3IMPPScjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkPA3IMPPScjs.hitTestAnnotation; exports.hitTestCrop = _chunkPA3IMPPScjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkPA3IMPPScjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkPA3IMPPScjs.hueRangeTables; exports.hueRangeWeight = _chunkPA3IMPPScjs.hueRangeWeight; exports.hueSaturation = _chunkPA3IMPPScjs.hueSaturation; exports.identityCurve = _chunkPA3IMPPScjs.identityCurve; exports.identityLevels = _chunkPA3IMPPScjs.identityLevels; exports.identityTransform = _chunkPA3IMPPScjs.identityTransform; exports.identityWarpMesh = _chunkJCXMJUQOcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imagePlaybackPanel = imagePlaybackPanel; exports.imageToCanvasPoint = _chunkPA3IMPPScjs.imageToCanvasPoint; exports.importPsd = _chunkPA3IMPPScjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkHGTDMKNEcjs.insertLayer; exports.instancesOf = _chunkPA3IMPPScjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkPA3IMPPScjs.invertMatrix3; exports.invertSelection = _chunkPA3IMPPScjs.invertSelection; exports.isActiveFilter = _chunkPA3IMPPScjs.isActiveFilter; exports.isAdjustmentKind = _chunkPA3IMPPScjs.isAdjustmentKind; exports.isBitDepth = _chunkCWM3CUUXcjs.isBitDepth; exports.isBlendMode = _chunkCWM3CUUXcjs.isBlendMode; exports.isBrushstrokeBrush = _chunkEBDCRTZIcjs.isBrushstrokeBrush; exports.isContentsDecoded = _chunkPA3IMPPScjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkPA3IMPPScjs.isDefaultDepthMask; exports.isGradientPaint = _chunkEBDCRTZIcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunk7NW46N7Icjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkPA3IMPPScjs.isIdentityTransform; exports.isInterpolation = _chunkHGTDMKNEcjs.isInterpolation; exports.isLayerEffectKind = _chunkHGTDMKNEcjs.isLayerEffectKind; exports.isLayerLocked = _chunkHGTDMKNEcjs.isLayerLocked; exports.isLegacyShape = _chunkPA3IMPPScjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPaintableLayer = _chunkPA3IMPPScjs.isPaintableLayer; exports.isPainterlyBlendMode = _chunkCWM3CUUXcjs.isPainterlyBlendMode; exports.isPng = _chunkCWM3CUUXcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkPA3IMPPScjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkPA3IMPPScjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkPA3IMPPScjs.isSelectionEmpty; exports.isSelectionMode = _chunkPA3IMPPScjs.isSelectionMode; exports.isSeparableBlendMode = _chunkCWM3CUUXcjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkPA3IMPPScjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkPA3IMPPScjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkPA3IMPPScjs.isTransformAnchor; exports.isValidWarp = _chunkPA3IMPPScjs.isValidWarp; exports.keepDeepSamples = _chunkCWM3CUUXcjs.keepDeepSamples; exports.kelvinToTemperature = _chunkPA3IMPPScjs.kelvinToTemperature; exports.keysWeight = _chunkHGTDMKNEcjs.keysWeight; exports.latticeViscosity = _chunkV7GWZIZKcjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkHGTDMKNEcjs.layerEffectFields; exports.layerEffectLabel = _chunkHGTDMKNEcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkPA3IMPPScjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkPA3IMPPScjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkPA3IMPPScjs.layerMaskFromSelection; exports.layerMaskKey = _chunkPA3IMPPScjs.layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = _chunkPA3IMPPScjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerPanels = layerPanels; exports.layerTree = _chunkPA3IMPPScjs.layerTree; exports.layerTypeLabel = _chunkPA3IMPPScjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkPA3IMPPScjs.layersFromLegacy; exports.layoutText = _chunkJCXMJUQOcjs.layoutText; exports.legacyAdjustmentLayer = _chunkPA3IMPPScjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkPA3IMPPScjs.legacyMaskOf; exports.legacyView = _chunkPA3IMPPScjs.legacyView; exports.lerpPigment = _chunkCWM3CUUXcjs.lerpPigment; exports.lerpPigmentInto = _chunkCWM3CUUXcjs.lerpPigmentInto; exports.levelsValue = _chunkPA3IMPPScjs.levelsValue; exports.linearSrgbToXy = _chunkPA3IMPPScjs.linearSrgbToXy; exports.linearToSrgb = _chunkPA3IMPPScjs.linearToSrgb; exports.linearToSrgb8 = _chunkV7GWZIZKcjs.linearToSrgb8; exports.liveComponent = _chunkPA3IMPPScjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkPA3IMPPScjs.liveShapeSubpaths; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkEBDCRTZIcjs.loadMixer; exports.loadOpenTypeFont = _chunk5UEFNX24cjs.loadOpenTypeFont; exports.loadWetKernel = _chunkV7GWZIZKcjs.loadWetKernel; exports.luma = _chunk7NW46N7Icjs.luma; exports.magicWand = magicWand; exports.mapCropHandle = _chunkPA3IMPPScjs.mapCropHandle; exports.mapLayer = _chunkHGTDMKNEcjs.mapLayer; exports.mapSubpaths = _chunkPA3IMPPScjs.mapSubpaths; exports.maskBounds = _chunk7NW46N7Icjs.maskBounds; exports.maskSummary = maskSummary; exports.matrixFromCorners = _chunkPA3IMPPScjs.matrixFromCorners; exports.matrixFromParams = _chunkPA3IMPPScjs.matrixFromParams; exports.measureCanvasViewport = measureCanvasViewport; exports.membraneFill = _chunk7NW46N7Icjs.membraneFill; exports.mergeLayerEffect = _chunkHGTDMKNEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkPA3IMPPScjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunkEBDCRTZIcjs.mix32; exports.mixPigment8 = _chunkCWM3CUUXcjs.mixPigment8; exports.mixPigmentRgb = _chunkCWM3CUUXcjs.mixPigmentRgb; exports.mixPigments = _chunkCWM3CUUXcjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunkEBDCRTZIcjs.mixerRates; exports.modifySelection = _chunkPA3IMPPScjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkPA3IMPPScjs.moveLayer; exports.moveSmartFilter = _chunkPA3IMPPScjs.moveSmartFilter; exports.mulMatrix3 = _chunkPA3IMPPScjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkPA3IMPPScjs.neutralHueRange; exports.newContentsId = _chunkPA3IMPPScjs.newContentsId; exports.newEffectId = _chunkHGTDMKNEcjs.newEffectId; exports.newLayerId = _chunkPA3IMPPScjs.newLayerId; exports.newLayerOptions = newLayerOptions; exports.normalizeAdjustmentLayer = _chunkPA3IMPPScjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkPA3IMPPScjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkPA3IMPPScjs.normalizeAngle; exports.normalizeBlendMode = _chunkCWM3CUUXcjs.normalizeBlendMode; exports.normalizeBlender = _chunkEBDCRTZIcjs.normalizeBlender; exports.normalizeBrush = _chunkEBDCRTZIcjs.normalizeBrush; exports.normalizeFilter = _chunkPA3IMPPScjs.normalizeFilter; exports.normalizeFlow = _chunkV7GWZIZKcjs.normalizeFlow; exports.normalizeHexColor = _chunkEBDCRTZIcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkHGTDMKNEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkPA3IMPPScjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkPA3IMPPScjs.normalizeLiveShape; exports.normalizeMixer = _chunkEBDCRTZIcjs.normalizeMixer; exports.normalizePlacement = _chunkPA3IMPPScjs.normalizePlacement; exports.normalizeProcessVersion = _chunkPA3IMPPScjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunk7NW46N7Icjs.normalizeRetouch; exports.normalizeShapePaint = _chunkPA3IMPPScjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkPA3IMPPScjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkPA3IMPPScjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkEBDCRTZIcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkPA3IMPPScjs.normalizeSubpaths; exports.normalizeText = _chunkPA3IMPPScjs.normalizeText; exports.normalizeTilt = _chunkV7GWZIZKcjs.normalizeTilt; exports.normalizeWetParams = _chunkV7GWZIZKcjs.normalizeWetParams; exports.offsetLayer = _chunkPA3IMPPScjs.offsetLayer; exports.offsetShape = _chunkPA3IMPPScjs.offsetShape; exports.offsetSmartObject = _chunkPA3IMPPScjs.offsetSmartObject; exports.openPsdFile = openPsdFile; exports.packRgba = _chunkCWM3CUUXcjs.packRgba; exports.packWetParams = _chunkV7GWZIZKcjs.packWetParams; exports.paintGradientMappingFor = _chunkEBDCRTZIcjs.paintGradientMappingFor; exports.paintPathStroke = _chunkEBDCRTZIcjs.paintPathStroke; exports.paintSourceColor = _chunkEBDCRTZIcjs.paintSourceColor; exports.paintSourceCss = _chunkEBDCRTZIcjs.paintSourceCss; exports.paragraphRanges = _chunkJCXMJUQOcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkPA3IMPPScjs.parseAdjustmentBlock; exports.parseBlend = _chunkPA3IMPPScjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkCWM3CUUXcjs.parseDataUrl; exports.parseEffectColor = _chunkHGTDMKNEcjs.parseEffectColor; exports.parseLfx2 = _chunkPA3IMPPScjs.parseLfx2; exports.parseLrfx = _chunkPA3IMPPScjs.parseLrfx; exports.parseOpenTypeFont = _chunk5UEFNX24cjs.parseOpenTypeFont; exports.parsePaintSource = _chunkEBDCRTZIcjs.parsePaintSource; exports.parsePatternBlock = _chunkPA3IMPPScjs.parsePatternBlock; exports.parseSelectionMode = _chunkPA3IMPPScjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkPA3IMPPScjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkPA3IMPPScjs.patchParagraphStyle; exports.patchTextStyle = _chunkPA3IMPPScjs.patchTextStyle; exports.pathStrokeCoverage = _chunkEBDCRTZIcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkEBDCRTZIcjs.pathStrokeDabs; exports.perDabStrength = _chunk7NW46N7Icjs.perDabStrength; exports.photoFilterMatrix = _chunkPA3IMPPScjs.photoFilterMatrix; exports.pigment8 = _chunkCWM3CUUXcjs.pigment8; exports.pigmentColor = _chunkV7GWZIZKcjs.pigmentColor; exports.pigmentOf = _chunkV7GWZIZKcjs.pigmentOf; exports.pixelLayerBounds = _chunkPA3IMPPScjs.pixelLayerBounds; exports.pixelLayers = _chunkPA3IMPPScjs.pixelLayers; exports.pixelPigment = _chunkV7GWZIZKcjs.pixelPigment; exports.placeContents = _chunkPA3IMPPScjs.placeContents; exports.placeLayer = _chunkPA3IMPPScjs.placeLayer; exports.placementAt = _chunkPA3IMPPScjs.placementAt; exports.placementBounds = _chunkPA3IMPPScjs.placementBounds; exports.placementGeometry = _chunkPA3IMPPScjs.placementGeometry; exports.planImageToolPlayback = planImageToolPlayback; exports.pngDataUrl = _chunkCWM3CUUXcjs.pngDataUrl; exports.pointerPressure = _chunkV7GWZIZKcjs.pointerPressure; exports.pointerStrokeSample = _chunkV7GWZIZKcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkV7GWZIZKcjs.pointerStrokeSamples; exports.polygonCoverage = polygonCoverage; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunkPA3IMPPScjs.posterizeValue; exports.presetWarp = _chunkPA3IMPPScjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkPA3IMPPScjs.projectImagePoint; exports.projectImageRect = _chunkPA3IMPPScjs.projectImageRect; exports.projectMaskCoverage = _chunkPA3IMPPScjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkCWM3CUUXcjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkPA3IMPPScjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkPA3IMPPScjs.psdToLayers; exports.pullWarpMesh = _chunkJCXMJUQOcjs.pullWarpMesh; exports.put255 = _chunkEBDCRTZIcjs.put255; exports.quadFrameOverlay = quadFrameOverlay; exports.quickMaskPixels = quickMaskPixels; exports.rand01 = _chunkEBDCRTZIcjs.rand01; exports.randSigned = _chunkEBDCRTZIcjs.randSigned; exports.rangeLightness = _chunkPA3IMPPScjs.rangeLightness; exports.rasterContents = _chunkPA3IMPPScjs.rasterContents; exports.rasterMaskFromLegacy = _chunkPA3IMPPScjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkPA3IMPPScjs.rasterizeCoverage; exports.rasterizeDab = _chunkEBDCRTZIcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkPA3IMPPScjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkCWM3CUUXcjs.readDeepRegion; exports.readPaintSource = _chunkEBDCRTZIcjs.readPaintSource; exports.readPixel = _chunkCWM3CUUXcjs.readPixel; exports.readPsd = _chunkPA3IMPPScjs.readPsd; exports.readRegion = _chunkCWM3CUUXcjs.readRegion; exports.readSourceRegion = _chunk7NW46N7Icjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkHGTDMKNEcjs.reduceSurface; exports.referencePoint = _chunkPA3IMPPScjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkCWM3CUUXcjs.reflectanceToRgb; exports.removeAlpha = _chunkPA3IMPPScjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkPA3IMPPScjs.removeLayer; exports.removeLayerEffect = _chunkPA3IMPPScjs.removeLayerEffect; exports.removeLayerFilter = _chunkPA3IMPPScjs.removeLayerFilter; exports.removePaintGradientStop = _chunkEBDCRTZIcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkPA3IMPPScjs.removeSmartFilter; exports.renderBrushstroke = _chunkEBDCRTZIcjs.renderBrushstroke; exports.renderLayerEffects = _chunkHGTDMKNEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkPA3IMPPScjs.renderShape; exports.renderShapeRect = _chunkPA3IMPPScjs.renderShapeRect; exports.renderSmartObject = _chunkPA3IMPPScjs.renderSmartObject; exports.renderText = _chunkPA3IMPPScjs.renderText; exports.replaceContents = _chunkPA3IMPPScjs.replaceContents; exports.replaceTextRange = _chunkPA3IMPPScjs.replaceTextRange; exports.requireLayer = _chunkPA3IMPPScjs.requireLayer; exports.requireOperation = _chunkPA3IMPPScjs.requireOperation; exports.requireShapeLayer = _chunkPA3IMPPScjs.requireShapeLayer; exports.requireSmartObject = _chunkPA3IMPPScjs.requireSmartObject; exports.requireTypeLayer = _chunkPA3IMPPScjs.requireTypeLayer; exports.requireUnlocked = _chunkPA3IMPPScjs.requireUnlocked; exports.rerender = _chunkPA3IMPPScjs.rerender; exports.rerenderShape = _chunkPA3IMPPScjs.rerenderShape; exports.rerenderText = _chunkPA3IMPPScjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkPA3IMPPScjs.resizeSelection; exports.resizeWarpMesh = _chunkJCXMJUQOcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkPA3IMPPScjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkEBDCRTZIcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.restyleRange = _chunkJCXMJUQOcjs.restyleRange; exports.retouchFilter = _chunk7NW46N7Icjs.retouchFilter; exports.reversePaintGradient = _chunkEBDCRTZIcjs.reversePaintGradient; exports.rgbToGray = _chunkPA3IMPPScjs.rgbToGray; exports.rgbToHsl = _chunkPA3IMPPScjs.rgbToHsl; exports.rgbToReflectance = _chunkCWM3CUUXcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunk7NW46N7Icjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkPA3IMPPScjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkPA3IMPPScjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sameCanvasViewport = sameCanvasViewport; exports.sampleLut = _chunkPA3IMPPScjs.sampleLut; exports.sampleToneLut = _chunkPA3IMPPScjs.sampleToneLut; exports.saturationOf = _chunk7NW46N7Icjs.saturationOf; exports.scaleLayerEffect = _chunkHGTDMKNEcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkEBDCRTZIcjs.scalePaintGradient; exports.seamlessClone = _chunk7NW46N7Icjs.seamlessClone; exports.seedFromString = _chunkEBDCRTZIcjs.seedFromString; exports.selectionArea = _chunkPA3IMPPScjs.selectionArea; exports.selectionFromCoverage = _chunkPA3IMPPScjs.selectionFromCoverage; exports.selectionFromPixels = _chunkPA3IMPPScjs.selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = _chunkPA3IMPPScjs.selectionToCoverage; exports.selectionToPixels = _chunkPA3IMPPScjs.selectionToPixels; exports.selectionValueAt = _chunkPA3IMPPScjs.selectionValueAt; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkPA3IMPPScjs.serializeContents; exports.serializeEffects = _chunkPA3IMPPScjs.serializeEffects; exports.serializeLayer = _chunkPA3IMPPScjs.serializeLayer; exports.serializeLayers = _chunkPA3IMPPScjs.serializeLayers; exports.serializeLayersExternal = _chunkPA3IMPPScjs.serializeLayersExternal; exports.serializePatterns = _chunkPA3IMPPScjs.serializePatterns; exports.serializeSelection = _chunkPA3IMPPScjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkPA3IMPPScjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkPA3IMPPScjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkPA3IMPPScjs.setLayerMask; exports.setLayerProperties = _chunkPA3IMPPScjs.setLayerProperties; exports.setLum = _chunkCWM3CUUXcjs.setLum; exports.setPigmentColor = _chunkCWM3CUUXcjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkPA3IMPPScjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkPA3IMPPScjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkPA3IMPPScjs.setSmartPlacement; exports.shadeTile = _chunkV7GWZIZKcjs.shadeTile; exports.shapeAsPixelLayer = _chunkPA3IMPPScjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkPA3IMPPScjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkPA3IMPPScjs.shapeGeometryBounds; exports.shapeLayers = _chunkPA3IMPPScjs.shapeLayers; exports.shapeOutline = _chunkPA3IMPPScjs.shapeOutline; exports.shapeRenderClip = _chunkPA3IMPPScjs.shapeRenderClip; exports.shiftCoverage = _chunkPA3IMPPScjs.shiftCoverage; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkPA3IMPPScjs.smartObjectLayers; exports.smoothCoverage = _chunkPA3IMPPScjs.smoothCoverage; exports.smoothPoints = _chunkEBDCRTZIcjs.smoothPoints; exports.smudgeEffect = _chunk7NW46N7Icjs.smudgeEffect; exports.solidPaint = _chunkEBDCRTZIcjs.solidPaint; exports.solidSurface = _chunkCWM3CUUXcjs.solidSurface; exports.solveMembrane = _chunk7NW46N7Icjs.solveMembrane; exports.spliceRuns = _chunkJCXMJUQOcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunk7NW46N7Icjs.sponge; exports.spongeEffect = _chunk7NW46N7Icjs.spongeEffect; exports.spotHealPixels = _chunk7NW46N7Icjs.spotHealPixels; exports.spotHealWindow = _chunk7NW46N7Icjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkV7GWZIZKcjs.srgbByteToLinear; exports.srgbDecode = _chunkCWM3CUUXcjs.srgbDecode; exports.srgbEncode = _chunkCWM3CUUXcjs.srgbEncode; exports.srgbToLinear = _chunkPA3IMPPScjs.srgbToLinear; exports.standardBlendMode = _chunkCWM3CUUXcjs.standardBlendMode; exports.stepSlotTs = _chunkV7GWZIZKcjs.stepSlotTs; exports.strokeGrainCatch = _chunkEBDCRTZIcjs.strokeGrainCatch; exports.styleAt = _chunkJCXMJUQOcjs.styleAt; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkCWM3CUUXcjs.surfaceBytes; exports.surfaceDepth = _chunkCWM3CUUXcjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkCWM3CUUXcjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunkCWM3CUUXcjs.surfaceFromPixels; exports.surfacesEqual = _chunkCWM3CUUXcjs.surfacesEqual; exports.tempTintToXy = _chunkPA3IMPPScjs.tempTintToXy; exports.temperatureToKelvin = _chunkPA3IMPPScjs.temperatureToKelvin; exports.textIndexAt = _chunkJCXMJUQOcjs.textIndexAt; exports.textMatrix = _chunkPA3IMPPScjs.textMatrix; exports.textOutlines = _chunkPA3IMPPScjs.textOutlines; exports.textRange = _chunkPA3IMPPScjs.textRange; exports.tileCoord = _chunkCWM3CUUXcjs.tileCoord; exports.tileKey = _chunkCWM3CUUXcjs.tileKey; exports.tileRect = _chunkCWM3CUUXcjs.tileRect; exports.tileSamples = _chunkCWM3CUUXcjs.tileSamples; exports.tileSamples16 = _chunkCWM3CUUXcjs.tileSamples16; exports.tileSamples32 = _chunkCWM3CUUXcjs.tileSamples32; exports.tilesInRect = _chunkCWM3CUUXcjs.tilesInRect; exports.tipFalloff = _chunkEBDCRTZIcjs.tipFalloff; exports.tipReach = _chunkEBDCRTZIcjs.tipReach; exports.tipShape = _chunkEBDCRTZIcjs.tipShape; exports.to16From32 = _chunkCWM3CUUXcjs.to16From32; exports.to16From8 = _chunkCWM3CUUXcjs.to16From8; exports.to32From16 = _chunkCWM3CUUXcjs.to32From16; exports.to32From8 = _chunkCWM3CUUXcjs.to32From8; exports.to8From16 = _chunkCWM3CUUXcjs.to8From16; exports.to8From32 = _chunkCWM3CUUXcjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkPA3IMPPScjs.toTextSpace; exports.toneCurve = _chunkPA3IMPPScjs.toneCurve; exports.toneLuts = _chunkPA3IMPPScjs.toneLuts; exports.toneOf = _chunk7NW46N7Icjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkPA3IMPPScjs.transformHomography; exports.transformMap = _chunkPA3IMPPScjs.transformMap; exports.transformShapeComponents = _chunkPA3IMPPScjs.transformShapeComponents; exports.transformSurface = _chunkHGTDMKNEcjs.transformSurface; exports.transformTypeLayer = _chunkPA3IMPPScjs.transformTypeLayer; exports.transformedBounds = _chunkHGTDMKNEcjs.transformedBounds; exports.transformedBox = _chunkPA3IMPPScjs.transformedBox; exports.transformedPoint = _chunkPA3IMPPScjs.transformedPoint; exports.translateLayer = _chunkPA3IMPPScjs.translateLayer; exports.translateSurface = _chunkCWM3CUUXcjs.translateSurface; exports.typeAsPixelLayer = _chunkPA3IMPPScjs.typeAsPixelLayer; exports.typeFrame = _chunkPA3IMPPScjs.typeFrame; exports.typeFromAnnotation = _chunkPA3IMPPScjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkPA3IMPPScjs.typeLayerName; exports.ungroupLayer = _chunkPA3IMPPScjs.ungroupLayer; exports.uniformTile = _chunkCWM3CUUXcjs.uniformTile; exports.unionRect = _chunkPA3IMPPScjs.unionRect; exports.unprojectCanvasPoint = _chunkPA3IMPPScjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkPA3IMPPScjs.updateLayerEffect; exports.updateLayerFilter = _chunkPA3IMPPScjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkPA3IMPPScjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkEBDCRTZIcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkPA3IMPPScjs.updateShapeLayer; exports.updateSmartFilter = _chunkPA3IMPPScjs.updateSmartFilter; exports.updateTypeLayer = _chunkPA3IMPPScjs.updateTypeLayer; exports.userErrorMessage = _chunkPA3IMPPScjs.userErrorMessage; exports.uvToXy = _chunkPA3IMPPScjs.uvToXy; exports.validateEffectGradient = _chunkHGTDMKNEcjs.validateEffectGradient; exports.validateLayerEffect = _chunkHGTDMKNEcjs.validateLayerEffect; exports.validateLayerEffects = _chunkHGTDMKNEcjs.validateLayerEffects; exports.versionedDescriptorBytes = _chunkPA3IMPPScjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkPA3IMPPScjs.vibranceLinear; exports.vibrancePixel = _chunkPA3IMPPScjs.vibrancePixel; exports.walkDabs = _chunkEBDCRTZIcjs.walkDabs; exports.warpMeshEditPoints = _chunkJCXMJUQOcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkJCXMJUQOcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkJCXMJUQOcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkJCXMJUQOcjs.warpPresetMesh; exports.warpSurface = _chunkHGTDMKNEcjs.warpSurface; exports.watchCanvasViewport = watchCanvasViewport; exports.wbMatrix = _chunkPA3IMPPScjs.wbMatrix; exports.wetGpuSupport = _chunkV7GWZIZKcjs.wetGpuSupport; exports.wetSimdSupported = _chunkV7GWZIZKcjs.wetSimdSupported; exports.wetSupport = _chunkV7GWZIZKcjs.wetSupport; exports.whiteBalanceFromSample = _chunkPA3IMPPScjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkPA3IMPPScjs.whiteBalanceMatrix; exports.withFilterMaskSurface = _chunkPA3IMPPScjs.withFilterMaskSurface; exports.withImagePlayback = withImagePlayback; exports.withNewIds = _chunkPA3IMPPScjs.withNewIds; exports.writeAdjustmentBlock = _chunkPA3IMPPScjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkCWM3CUUXcjs.writeDeepRegion; exports.writeLfx2 = _chunkPA3IMPPScjs.writeLfx2; exports.writePatternBlock = _chunkPA3IMPPScjs.writePatternBlock; exports.writePsd = _chunkPA3IMPPScjs.writePsd; exports.writeRegion = _chunkCWM3CUUXcjs.writeRegion; exports.xyToTempTint = _chunkPA3IMPPScjs.xyToTempTint; exports.xyToUv = _chunkPA3IMPPScjs.xyToUv;
|