@pixerate/editor 0.129.0 → 0.132.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/animation-editor/index.cjs +55 -55
  2. package/dist/animation-editor/index.d.cts +5 -5
  3. package/dist/animation-editor/index.d.ts +5 -5
  4. package/dist/animation-editor/index.js +2 -2
  5. package/dist/{bezier-DP4NnJp3.d.ts → bezier-0IHDCvv_.d.ts} +1 -1
  6. package/dist/{bezier-CvgQiYRg.d.cts → bezier-oCBfrGDG.d.cts} +1 -1
  7. package/dist/canvas/index.d.cts +7 -7
  8. package/dist/canvas/index.d.ts +7 -7
  9. package/dist/{chunk-XLUYXUBD.cjs → chunk-55UEZIU4.cjs} +119 -90
  10. package/dist/chunk-55UEZIU4.cjs.map +1 -0
  11. package/dist/{chunk-A6KHMKI4.js → chunk-ECVI5QRE.js} +2 -2
  12. package/dist/{chunk-F7Q2NE2Y.js → chunk-G5FX56KX.js} +39 -10
  13. package/dist/{chunk-F7Q2NE2Y.js.map → chunk-G5FX56KX.js.map} +1 -1
  14. package/dist/{chunk-ROZFX4QI.js → chunk-IEYXYMRQ.js} +556 -13
  15. package/dist/chunk-IEYXYMRQ.js.map +1 -0
  16. package/dist/{chunk-BEGEWQHD.cjs → chunk-OYPJGGF3.cjs} +36 -36
  17. package/dist/{chunk-BEGEWQHD.cjs.map → chunk-OYPJGGF3.cjs.map} +1 -1
  18. package/dist/{chunk-ORE334I6.cjs → chunk-YYJKIESX.cjs} +619 -76
  19. package/dist/chunk-YYJKIESX.cjs.map +1 -0
  20. package/dist/effects/index.d.cts +4 -4
  21. package/dist/effects/index.d.ts +4 -4
  22. package/dist/{export-DotEEyXj.d.ts → export-ByJvAvR7.d.ts} +26 -4
  23. package/dist/{export-Cbr9IqpJ.d.cts → export-CfAogLEr.d.cts} +1 -1
  24. package/dist/{export-ClPKUB-v.d.ts → export-Crl82sbE.d.ts} +1 -1
  25. package/dist/{export-DRzNhrdx.d.cts → export-D-gkjBkB.d.cts} +26 -4
  26. package/dist/{helpers-CPWcK504.d.ts → helpers-BCd2-PAR.d.ts} +67 -3
  27. package/dist/{helpers-C5aAd44p.d.cts → helpers-CoIeXQnW.d.cts} +67 -3
  28. package/dist/image-editor/index.cjs +775 -723
  29. package/dist/image-editor/index.cjs.map +1 -1
  30. package/dist/image-editor/index.d.cts +8 -8
  31. package/dist/image-editor/index.d.ts +8 -8
  32. package/dist/image-editor/index.js +59 -7
  33. package/dist/image-editor/index.js.map +1 -1
  34. package/dist/index.cjs +11 -4
  35. package/dist/index.cjs.map +1 -1
  36. package/dist/index.js +11 -4
  37. package/dist/index.js.map +1 -1
  38. package/dist/{opentype-BOewaGQx.d.cts → opentype-BDahNRTe.d.cts} +2 -2
  39. package/dist/{opentype-sQrF3Ry1.d.ts → opentype-BQFEvy-t.d.ts} +2 -2
  40. package/dist/paint-editor/index.cjs +7 -7
  41. package/dist/paint-editor/index.d.cts +5 -5
  42. package/dist/paint-editor/index.d.ts +5 -5
  43. package/dist/paint-editor/index.js +2 -2
  44. package/dist/{pathfinder-CnkW7zLI.d.cts → pathfinder-01ZgAwqV.d.cts} +1 -1
  45. package/dist/{pathfinder-BwJx0_zM.d.ts → pathfinder-DaVdT8jq.d.ts} +1 -1
  46. package/dist/{pool-CTrtciaN.d.ts → pool-D2A3WTt9.d.ts} +1 -1
  47. package/dist/{pool-C7GtrL34.d.cts → pool-D6a45MoE.d.cts} +1 -1
  48. package/dist/{svg-C4LlFnEw.d.cts → svg-CcDz7Zq2.d.cts} +2 -2
  49. package/dist/{svg-CUzZa0EO.d.ts → svg-DELNVerw.d.ts} +2 -2
  50. package/dist/{tools-BpCmUNxb.d.cts → tools-BFvkFnRj.d.cts} +1 -1
  51. package/dist/{tools-AugT22z3.d.ts → tools-D7ws-OKL.d.ts} +1 -1
  52. package/dist/vector/index.cjs +1149 -1017
  53. package/dist/vector/index.cjs.map +1 -1
  54. package/dist/vector/index.d.cts +106 -10
  55. package/dist/vector/index.d.ts +106 -10
  56. package/dist/vector/index.js +142 -10
  57. package/dist/vector/index.js.map +1 -1
  58. package/dist/video-editor/index.d.cts +4 -4
  59. package/dist/video-editor/index.d.ts +4 -4
  60. package/dist/{warp-CIsO617e.d.ts → warp-2N9wkOkL.d.ts} +2 -2
  61. package/dist/{warp-D62N_5VK.d.cts → warp-DErXW5rz.d.cts} +2 -2
  62. package/package.json +2 -2
  63. package/skills/pixerate-image-editor/SKILL.md +6 -2
  64. package/skills/pixerate-image-editor/references/color-management.md +1 -1
  65. package/skills/pixerate-image-editor/references/photoshop-files.md +2 -2
  66. package/skills/pixerate-image-editor/references/retouching.md +9 -1
  67. package/skills/pixerate-vector/SKILL.md +18 -1
  68. package/skills/pixerate-vector/references/commands.md +20 -0
  69. package/dist/chunk-ORE334I6.cjs.map +0 -1
  70. package/dist/chunk-ROZFX4QI.js.map +0 -1
  71. package/dist/chunk-XLUYXUBD.cjs.map +0 -1
  72. /package/dist/{chunk-A6KHMKI4.js.map → chunk-ECVI5QRE.js.map} +0 -0
@@ -125,7 +125,7 @@ var _chunk643B2HKCcjs = require('./chunk-643B2HKC.cjs');
125
125
 
126
126
 
127
127
 
128
- var _chunkORE334I6cjs = require('./chunk-ORE334I6.cjs');
128
+ var _chunkYYJKIESXcjs = require('./chunk-YYJKIESX.cjs');
129
129
 
130
130
 
131
131
 
@@ -3225,7 +3225,7 @@ function mapAnchor(a, f) {
3225
3225
  return out;
3226
3226
  }
3227
3227
  function mapSubpaths(subpaths, f) {
3228
- return _chunkORE334I6cjs.expandVectorCorners.call(void 0, subpaths).map((sp) => ({ closed: sp.closed, anchors: sp.anchors.map((a) => mapAnchor(a, f)) }));
3228
+ return _chunkYYJKIESXcjs.expandVectorCorners.call(void 0, subpaths).map((sp) => ({ closed: sp.closed, anchors: sp.anchors.map((a) => mapAnchor(a, f)) }));
3229
3229
  }
3230
3230
  function liveShapeSubpaths(live) {
3231
3231
  let out;
@@ -3233,19 +3233,19 @@ function liveShapeSubpaths(live) {
3233
3233
  case "rect": {
3234
3234
  const x = Math.min(live.x, live.x + live.width);
3235
3235
  const y = Math.min(live.y, live.y + live.height);
3236
- const sp = _chunkORE334I6cjs.rectSubpath.call(void 0, { x, y, width: Math.abs(live.width), height: Math.abs(live.height) });
3236
+ const sp = _chunkYYJKIESXcjs.rectSubpath.call(void 0, { x, y, width: Math.abs(live.width), height: Math.abs(live.height) });
3237
3237
  const r = _nullishCoalesce(live.radii, () => ( [0, 0, 0, 0]));
3238
- out = [{ closed: true, anchors: sp.anchors.map((a, i) => r[i] > 0 ? _chunkORE334I6cjs.setAnchorCorner.call(void 0, a, r[i]) : a) }];
3238
+ out = [{ closed: true, anchors: sp.anchors.map((a, i) => r[i] > 0 ? _chunkYYJKIESXcjs.setAnchorCorner.call(void 0, a, r[i]) : a) }];
3239
3239
  break;
3240
3240
  }
3241
3241
  case "ellipse":
3242
- out = [_chunkORE334I6cjs.ellipseSubpath.call(void 0, normBox(live))];
3242
+ out = [_chunkYYJKIESXcjs.ellipseSubpath.call(void 0, normBox(live))];
3243
3243
  break;
3244
3244
  case "polygon":
3245
- out = [_chunkORE334I6cjs.polygonSubpath.call(void 0, normBox(live), live.sides)];
3245
+ out = [_chunkYYJKIESXcjs.polygonSubpath.call(void 0, normBox(live), live.sides)];
3246
3246
  break;
3247
3247
  case "star":
3248
- out = [_chunkORE334I6cjs.starSubpath.call(void 0, normBox(live), live.points, Math.max(0, Math.min(1, live.innerRatio)))];
3248
+ out = [_chunkYYJKIESXcjs.starSubpath.call(void 0, normBox(live), live.points, Math.max(0, Math.min(1, live.innerRatio)))];
3249
3249
  break;
3250
3250
  case "line": {
3251
3251
  const a = { x: live.x1, y: live.y1 };
@@ -3268,7 +3268,7 @@ function liveShapeSubpaths(live) {
3268
3268
  }
3269
3269
  }
3270
3270
  const m = live.transform;
3271
- return m && !_chunkORE334I6cjs.isIdentityMatrix.call(void 0, m) ? mapSubpaths(out, (p) => _chunkORE334I6cjs.applyMatrix.call(void 0, m, p)) : out;
3271
+ return m && !_chunkYYJKIESXcjs.isIdentityMatrix.call(void 0, m) ? mapSubpaths(out, (p) => _chunkYYJKIESXcjs.applyMatrix.call(void 0, m, p)) : out;
3272
3272
  }
3273
3273
  function normBox(b) {
3274
3274
  return { x: Math.min(b.x, b.x + b.width), y: Math.min(b.y, b.y + b.height), width: Math.abs(b.width), height: Math.abs(b.height) };
@@ -3280,7 +3280,7 @@ var pathCache = /* @__PURE__ */ new WeakMap();
3280
3280
  function componentPath(c) {
3281
3281
  let p = pathCache.get(c.subpaths);
3282
3282
  if (!p) {
3283
- p = _chunkORE334I6cjs.subpathsToBezier.call(void 0, c.subpaths);
3283
+ p = _chunkYYJKIESXcjs.subpathsToBezier.call(void 0, c.subpaths);
3284
3284
  pathCache.set(c.subpaths, p);
3285
3285
  }
3286
3286
  return p;
@@ -3603,7 +3603,7 @@ function matrixArg(v, path) {
3603
3603
  if (!Array.isArray(v) || v.length !== 6 || !v.every(isNum)) fail2(`${path} must be six numbers [a, b, c, d, e, f].`);
3604
3604
  const m = v;
3605
3605
  if (Math.abs(m[0] * m[3] - m[1] * m[2]) < 1e-12) fail2(`${path} is singular.`);
3606
- return _chunkORE334I6cjs.isIdentityMatrix.call(void 0, m) ? void 0 : [...m];
3606
+ return _chunkYYJKIESXcjs.isIdentityMatrix.call(void 0, m) ? void 0 : [...m];
3607
3607
  }
3608
3608
  function normalizeLiveShape(v, path = "shape") {
3609
3609
  if (!v || typeof v !== "object") return fail2(`${path} must be an object with kind ${LIVE_SHAPE_KINDS.join(", ")}.`);
@@ -3664,7 +3664,7 @@ function normalizeSubpaths(v, path = "subpaths") {
3664
3664
  if (typeof v === "string") {
3665
3665
  let subs;
3666
3666
  try {
3667
- subs = _chunkORE334I6cjs.bezierToSubpaths.call(void 0, v);
3667
+ subs = _chunkYYJKIESXcjs.bezierToSubpaths.call(void 0, v);
3668
3668
  } catch (e5) {
3669
3669
  return fail2(`${path}: could not read the SVG path data.`);
3670
3670
  }
@@ -3750,15 +3750,15 @@ function updateShapeLayer(layers, id, change, env, action = "edit it") {
3750
3750
  function transformShapeComponents(components, f, affine) {
3751
3751
  return components.map((c) => {
3752
3752
  if (affine && c.live) {
3753
- const live = { ...c.live, transform: _chunkORE334I6cjs.multiplyMatrices.call(void 0, _nullishCoalesce(c.live.transform, () => ( _chunkORE334I6cjs.IDENTITY_MATRIX)), affine) };
3754
- if (_chunkORE334I6cjs.isIdentityMatrix.call(void 0, live.transform)) delete live.transform;
3753
+ const live = { ...c.live, transform: _chunkYYJKIESXcjs.multiplyMatrices.call(void 0, _nullishCoalesce(c.live.transform, () => ( _chunkYYJKIESXcjs.IDENTITY_MATRIX)), affine) };
3754
+ if (_chunkYYJKIESXcjs.isIdentityMatrix.call(void 0, live.transform)) delete live.transform;
3755
3755
  return { op: c.op, subpaths: liveShapeSubpaths(live), live };
3756
3756
  }
3757
3757
  return { op: c.op, subpaths: mapSubpaths(c.subpaths, f) };
3758
3758
  });
3759
3759
  }
3760
3760
  function offsetShape(layer, dx, dy, env) {
3761
- const m = _chunkORE334I6cjs.translateMatrix.call(void 0, dx, dy);
3761
+ const m = _chunkYYJKIESXcjs.translateMatrix.call(void 0, dx, dy);
3762
3762
  const next = { ...layer, components: transformShapeComponents(layer.components, (p) => ({ x: p.x + dx, y: p.y + dy }), m) };
3763
3763
  delete next.annotation;
3764
3764
  return rerenderShape(next, env);
@@ -3766,7 +3766,7 @@ function offsetShape(layer, dx, dy, env) {
3766
3766
  function mergeShapeComponents(components, fillRule = "nonzero") {
3767
3767
  if (components.length < 2) return [...components];
3768
3768
  const path = shapeOutline(components, fillRule);
3769
- const subpaths = _chunkORE334I6cjs.bezierToSubpaths.call(void 0, path);
3769
+ const subpaths = _chunkYYJKIESXcjs.bezierToSubpaths.call(void 0, path);
3770
3770
  if (!subpaths.length) fail2("The components combine to nothing (the operations remove every area), so there is nothing to merge into.");
3771
3771
  return [{ op: "combine", subpaths }];
3772
3772
  }
@@ -3783,7 +3783,7 @@ function annotationPaint(color, opacity) {
3783
3783
  function shapeFromAnnotation(a) {
3784
3784
  const opacity = _nullishCoalesce(a.opacity, () => ( 1));
3785
3785
  const lineWidth = "strokeWidth" in a && a.strokeWidth > 0 ? a.strokeWidth : 1;
3786
- const rotation = a.rotation ? _chunkORE334I6cjs.rotateMatrix.call(void 0, a.rotation, { x: a.x, y: a.y }) : void 0;
3786
+ const rotation = a.rotation ? _chunkYYJKIESXcjs.rotateMatrix.call(void 0, a.rotation, { x: a.x, y: a.y }) : void 0;
3787
3787
  const t = rotation ? { transform: rotation } : {};
3788
3788
  const live = (l) => liveComponent(l);
3789
3789
  switch (a.type) {
@@ -3826,7 +3826,7 @@ function shapeFromAnnotation(a) {
3826
3826
  case "pen": {
3827
3827
  const paint = annotationPaint(a.strokeColor, opacity);
3828
3828
  if (!paint) return null;
3829
- const pts = rotation ? a.points.map((p) => _chunkORE334I6cjs.applyMatrix.call(void 0, rotation, p)) : a.points;
3829
+ const pts = rotation ? a.points.map((p) => _chunkYYJKIESXcjs.applyMatrix.call(void 0, rotation, p)) : a.points;
3830
3830
  const subpaths = pts.length > 1 ? [{ closed: false, anchors: pts.map((p) => ({ x: p.x, y: p.y })) }] : [];
3831
3831
  return {
3832
3832
  components: [{ op: "combine", subpaths }],
@@ -3859,7 +3859,7 @@ var fail3 = (message) => {
3859
3859
  };
3860
3860
  var TEXT_RENDER_MARGIN = _chunkMZXQTKUMcjs.MAX_EFFECT_REACH;
3861
3861
  function textMatrix(layer) {
3862
- return _nullishCoalesce(layer.transform, () => ( _chunkORE334I6cjs.IDENTITY_MATRIX));
3862
+ return _nullishCoalesce(layer.transform, () => ( _chunkYYJKIESXcjs.IDENTITY_MATRIX));
3863
3863
  }
3864
3864
  function rectCorners(r) {
3865
3865
  return [
@@ -3870,7 +3870,7 @@ function rectCorners(r) {
3870
3870
  ];
3871
3871
  }
3872
3872
  function docRect(r, m) {
3873
- const pts = rectCorners(r).map((p) => _chunkORE334I6cjs.applyMatrix.call(void 0, m, p));
3873
+ const pts = rectCorners(r).map((p) => _chunkYYJKIESXcjs.applyMatrix.call(void 0, m, p));
3874
3874
  const x0 = Math.floor(Math.min(...pts.map((p) => p.x)));
3875
3875
  const y0 = Math.floor(Math.min(...pts.map((p) => p.y)));
3876
3876
  const x1 = Math.ceil(Math.max(...pts.map((p) => p.x)));
@@ -3903,14 +3903,14 @@ function inkBounds(layout) {
3903
3903
  }
3904
3904
  function textOutlines(layer, shaper) {
3905
3905
  if (!shaper.outline) fail3(`The text shaper "${shaper.id}" cannot give glyph outlines; plug in an outline shaper (createOutlineTextShaper) to convert text to shapes.`);
3906
- const layout = _chunkORE334I6cjs.layoutText.call(void 0, layer, shaper);
3906
+ const layout = _chunkYYJKIESXcjs.layoutText.call(void 0, layer, shaper);
3907
3907
  const m = textMatrix(layer);
3908
3908
  const out = [];
3909
3909
  for (const l of layout.lines) {
3910
3910
  for (const f of l.fragments) {
3911
- let path = _chunkORE334I6cjs.textFragmentOutline.call(void 0, shaper, layer.text, f);
3912
- for (const r of _chunkORE334I6cjs.textDecorations.call(void 0, f, l)) path = [...path, ..._chunkORE334I6cjs.textRectPath.call(void 0, r)];
3913
- out.push({ fragment: f, path: _chunkORE334I6cjs.isIdentityMatrix.call(void 0, m) ? path : _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, path, m) });
3911
+ let path = _chunkYYJKIESXcjs.textFragmentOutline.call(void 0, shaper, layer.text, f);
3912
+ for (const r of _chunkYYJKIESXcjs.textDecorations.call(void 0, f, l)) path = [...path, ..._chunkYYJKIESXcjs.textRectPath.call(void 0, r)];
3913
+ out.push({ fragment: f, path: _chunkYYJKIESXcjs.isIdentityMatrix.call(void 0, m) ? path : _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, path, m) });
3914
3914
  }
3915
3915
  }
3916
3916
  return out;
@@ -3966,7 +3966,7 @@ function renderOnCanvas(layer, shaper, region, env) {
3966
3966
  const canvas = env.createCanvas(region.width, region.height);
3967
3967
  const ctx = canvas.getContext("2d");
3968
3968
  if (!ctx || typeof ctx.getImageData !== "function") return null;
3969
- const layout = _chunkORE334I6cjs.layoutText.call(void 0, layer, shaper);
3969
+ const layout = _chunkYYJKIESXcjs.layoutText.call(void 0, layer, shaper);
3970
3970
  const m = textMatrix(layer);
3971
3971
  ctx.setTransform(1, 0, 0, 1, 0, 0);
3972
3972
  ctx.clearRect(0, 0, region.width, region.height);
@@ -3978,8 +3978,8 @@ function renderOnCanvas(layer, shaper, region, env) {
3978
3978
  ctx.globalAlpha = _nullishCoalesce(f.style.opacity, () => ( 1));
3979
3979
  const s = layer.text.slice(f.start, f.end);
3980
3980
  if (!f.spaced) shaper.draw(ctx, s, f.font, f.x, f.y);
3981
- else for (let k = 0; k < s.length; k++) if (!_chunkORE334I6cjs.isTextSpace.call(void 0, s[k])) shaper.draw(ctx, s[k], f.font, f.x + f.carets[k], f.y);
3982
- for (const d of _chunkORE334I6cjs.textDecorations.call(void 0, f, l)) ctx.fillRect(d.x, d.y, d.width, d.height);
3981
+ else for (let k = 0; k < s.length; k++) if (!_chunkYYJKIESXcjs.isTextSpace.call(void 0, s[k])) shaper.draw(ctx, s[k], f.font, f.x + f.carets[k], f.y);
3982
+ for (const d of _chunkYYJKIESXcjs.textDecorations.call(void 0, f, l)) ctx.fillRect(d.x, d.y, d.width, d.height);
3983
3983
  }
3984
3984
  }
3985
3985
  ctx.globalAlpha = 1;
@@ -3990,7 +3990,7 @@ function renderOnCanvas(layer, shaper, region, env) {
3990
3990
  function renderText(layer, env) {
3991
3991
  const shaper = env.shaper;
3992
3992
  if (!shaper || !shaper.outline && !shaper.draw) return null;
3993
- const layout = _chunkORE334I6cjs.layoutText.call(void 0, layer, shaper);
3993
+ const layout = _chunkYYJKIESXcjs.layoutText.call(void 0, layer, shaper);
3994
3994
  const ink = inkBounds(layout);
3995
3995
  const clip = { x: -TEXT_RENDER_MARGIN, y: -TEXT_RENDER_MARGIN, width: env.width + 2 * TEXT_RENDER_MARGIN, height: env.height + 2 * TEXT_RENDER_MARGIN };
3996
3996
  const region = ink ? intersect2(docRect(ink, textMatrix(layer)), clip) : null;
@@ -4085,7 +4085,7 @@ function patchParagraphStyle(base, patch, path = "paragraph") {
4085
4085
  continue;
4086
4086
  }
4087
4087
  const value = k === "autoLeading" ? num(v, `${path}.${k}`, 0.1, 10) : num(v, `${path}.${k}`, -1e4, 1e4);
4088
- if (k === "autoLeading" && value === _chunkORE334I6cjs.DEFAULT_AUTO_LEADING || k !== "autoLeading" && value === 0) delete o[k];
4088
+ if (k === "autoLeading" && value === _chunkYYJKIESXcjs.DEFAULT_AUTO_LEADING || k !== "autoLeading" && value === 0) delete o[k];
4089
4089
  else o[k] = value;
4090
4090
  } else fail3(`${path}.${k} is not a paragraph style field; use ${PARAGRAPH_STYLE_FIELDS.join(", ")}.`);
4091
4091
  }
@@ -4122,14 +4122,14 @@ function createTypeLayer(init, env, id = newLayerId(), lenient = false) {
4122
4122
  opacity: 1,
4123
4123
  blend: "normal",
4124
4124
  text: text3,
4125
- runs: _chunkORE334I6cjs.fitRuns.call(void 0, init.runs, text3.length, _chunkORE334I6cjs.DEFAULT_TEXT_STYLE),
4126
- paragraphs: _chunkORE334I6cjs.fitParagraphRuns.call(void 0, _nullishCoalesce(init.paragraphs, () => ( [{ length: text3.length, style: {} }])), text3),
4125
+ runs: _chunkYYJKIESXcjs.fitRuns.call(void 0, init.runs, text3.length, _chunkYYJKIESXcjs.DEFAULT_TEXT_STYLE),
4126
+ paragraphs: _chunkYYJKIESXcjs.fitParagraphRuns.call(void 0, _nullishCoalesce(init.paragraphs, () => ( [{ length: text3.length, style: {} }])), text3),
4127
4127
  frame: init.frame,
4128
4128
  surface: _chunkJ5BA3BQ6cjs.emptySurface.call(void 0, 4),
4129
4129
  offset: { x: 0, y: 0 }
4130
4130
  };
4131
- if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([init, 'access', _61 => _61.runs, 'access', _62 => _62[0], 'optionalAccess', _63 => _63.style]), () => ( _chunkORE334I6cjs.DEFAULT_TEXT_STYLE)) }];
4132
- if (init.transform && !_chunkORE334I6cjs.isIdentityMatrix.call(void 0, init.transform)) layer.transform = init.transform;
4131
+ if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([init, 'access', _61 => _61.runs, 'access', _62 => _62[0], 'optionalAccess', _63 => _63.style]), () => ( _chunkYYJKIESXcjs.DEFAULT_TEXT_STYLE)) }];
4132
+ if (init.transform && !_chunkYYJKIESXcjs.isIdentityMatrix.call(void 0, init.transform)) layer.transform = init.transform;
4133
4133
  if (lenient && !renderText(layer, env)) return { ...layer, rendering: "stored" };
4134
4134
  return rerenderText(layer, env);
4135
4135
  }
@@ -4139,24 +4139,24 @@ function updateTypeLayer(layers, id, change, env, action = "edit it") {
4139
4139
  const patch = change(current);
4140
4140
  const next = { ...current, ...patch };
4141
4141
  if (!("annotation" in patch)) delete next.annotation;
4142
- if ("text" in patch || "runs" in patch) next.runs = _chunkORE334I6cjs.fitRuns.call(void 0, next.runs, next.text.length, _nullishCoalesce(_optionalChain([current, 'access', _64 => _64.runs, 'access', _65 => _65[0], 'optionalAccess', _66 => _66.style]), () => ( _chunkORE334I6cjs.DEFAULT_TEXT_STYLE)));
4143
- if (!next.runs.length) next.runs = [{ length: 0, style: _chunkORE334I6cjs.styleAt.call(void 0, current.runs, 0, _chunkORE334I6cjs.DEFAULT_TEXT_STYLE) }];
4144
- if ("text" in patch || "paragraphs" in patch) next.paragraphs = _chunkORE334I6cjs.fitParagraphRuns.call(void 0, next.paragraphs, next.text);
4142
+ if ("text" in patch || "runs" in patch) next.runs = _chunkYYJKIESXcjs.fitRuns.call(void 0, next.runs, next.text.length, _nullishCoalesce(_optionalChain([current, 'access', _64 => _64.runs, 'access', _65 => _65[0], 'optionalAccess', _66 => _66.style]), () => ( _chunkYYJKIESXcjs.DEFAULT_TEXT_STYLE)));
4143
+ if (!next.runs.length) next.runs = [{ length: 0, style: _chunkYYJKIESXcjs.styleAt.call(void 0, current.runs, 0, _chunkYYJKIESXcjs.DEFAULT_TEXT_STYLE) }];
4144
+ if ("text" in patch || "paragraphs" in patch) next.paragraphs = _chunkYYJKIESXcjs.fitParagraphRuns.call(void 0, next.paragraphs, next.text);
4145
4145
  const rendered = rerenderText(next, env);
4146
4146
  return { layers: _chunkMZXQTKUMcjs.mapLayer.call(void 0, layers, id, () => rendered), layer: rendered };
4147
4147
  }
4148
4148
  function replaceTextRange(layer, start, end, insert) {
4149
4149
  const text3 = layer.text.slice(0, start) + insert + layer.text.slice(end);
4150
- const style = _chunkORE334I6cjs.styleAt.call(void 0, layer.runs, start > 0 && start === layer.text.length ? start - 1 : start, _chunkORE334I6cjs.DEFAULT_TEXT_STYLE);
4151
- const runs = _chunkORE334I6cjs.spliceRuns.call(void 0, layer.runs, start, end, insert.length, style);
4152
- const pstyle = _chunkORE334I6cjs.styleAt.call(void 0, layer.paragraphs, start, {});
4153
- const paragraphs = _chunkORE334I6cjs.spliceRuns.call(void 0, layer.paragraphs, start, end, insert.length, pstyle);
4154
- return { text: text3, runs, paragraphs: _chunkORE334I6cjs.fitParagraphRuns.call(void 0, paragraphs, text3) };
4150
+ const style = _chunkYYJKIESXcjs.styleAt.call(void 0, layer.runs, start > 0 && start === layer.text.length ? start - 1 : start, _chunkYYJKIESXcjs.DEFAULT_TEXT_STYLE);
4151
+ const runs = _chunkYYJKIESXcjs.spliceRuns.call(void 0, layer.runs, start, end, insert.length, style);
4152
+ const pstyle = _chunkYYJKIESXcjs.styleAt.call(void 0, layer.paragraphs, start, {});
4153
+ const paragraphs = _chunkYYJKIESXcjs.spliceRuns.call(void 0, layer.paragraphs, start, end, insert.length, pstyle);
4154
+ return { text: text3, runs, paragraphs: _chunkYYJKIESXcjs.fitParagraphRuns.call(void 0, paragraphs, text3) };
4155
4155
  }
4156
4156
  function transformTypeLayer(layer, m) {
4157
- const t = _chunkORE334I6cjs.multiplyMatrices.call(void 0, textMatrix(layer), m);
4157
+ const t = _chunkYYJKIESXcjs.multiplyMatrices.call(void 0, textMatrix(layer), m);
4158
4158
  const next = { ...layer };
4159
- if (_chunkORE334I6cjs.isIdentityMatrix.call(void 0, t)) delete next.transform;
4159
+ if (_chunkYYJKIESXcjs.isIdentityMatrix.call(void 0, t)) delete next.transform;
4160
4160
  else next.transform = t;
4161
4161
  delete next.annotation;
4162
4162
  return next;
@@ -4164,7 +4164,7 @@ function transformTypeLayer(layer, m) {
4164
4164
  function typeFrame(layer, shaper) {
4165
4165
  if (layer.frame.kind === "box") return { x: 0, y: 0, width: layer.frame.width, height: layer.frame.height };
4166
4166
  if (!shaper) return fail3("Type layers need a text shaper to be measured; none is set here.");
4167
- const b = _chunkORE334I6cjs.layoutText.call(void 0, layer, shaper).bounds;
4167
+ const b = _chunkYYJKIESXcjs.layoutText.call(void 0, layer, shaper).bounds;
4168
4168
  return { x: b.x, y: b.y, width: Math.max(b.width, 1), height: Math.max(b.height, 1) };
4169
4169
  }
4170
4170
  function typeAsPixelLayer(layer) {
@@ -4172,7 +4172,7 @@ function typeAsPixelLayer(layer) {
4172
4172
  return { ...rest, type: "pixel", surface: layer.surface, offset: { x: 0, y: 0 } };
4173
4173
  }
4174
4174
  function toTextSpace(layer, p) {
4175
- return _chunkORE334I6cjs.applyMatrix.call(void 0, _chunkORE334I6cjs.invertMatrix.call(void 0, textMatrix(layer)), p);
4175
+ return _chunkYYJKIESXcjs.applyMatrix.call(void 0, _chunkYYJKIESXcjs.invertMatrix.call(void 0, textMatrix(layer)), p);
4176
4176
  }
4177
4177
  function typeFromAnnotation(a) {
4178
4178
  if (a.type !== "text") return null;
@@ -4186,7 +4186,7 @@ function typeFromAnnotation(a) {
4186
4186
  if (op !== 1) style.opacity = op;
4187
4187
  const text3 = t.text.replace(/\r?\n|\r/g, " ");
4188
4188
  const translate = [1, 0, 0, 1, t.x, t.y];
4189
- const transform = t.rotation ? _chunkORE334I6cjs.multiplyMatrices.call(void 0, translate, _chunkORE334I6cjs.rotateMatrix.call(void 0, t.rotation, { x: t.x, y: t.y })) : translate;
4189
+ const transform = t.rotation ? _chunkYYJKIESXcjs.multiplyMatrices.call(void 0, translate, _chunkYYJKIESXcjs.rotateMatrix.call(void 0, t.rotation, { x: t.x, y: t.y })) : translate;
4190
4190
  return { text: text3, runs: [{ length: text3.length, style }], frame: { kind: "point", origin: "top" }, transform };
4191
4191
  }
4192
4192
  function annotationOfType(layer) {
@@ -4520,7 +4520,7 @@ function identityTransform(box2) {
4520
4520
  }
4521
4521
  function cornersFromMatrix(box2, m) {
4522
4522
  const q2 = _chunkMUUXNRU4cjs.boxQuad.call(void 0, box2);
4523
- return [_chunkORE334I6cjs.applyMatrix.call(void 0, m, q2[0]), _chunkORE334I6cjs.applyMatrix.call(void 0, m, q2[1]), _chunkORE334I6cjs.applyMatrix.call(void 0, m, q2[2]), _chunkORE334I6cjs.applyMatrix.call(void 0, m, q2[3])];
4523
+ return [_chunkYYJKIESXcjs.applyMatrix.call(void 0, m, q2[0]), _chunkYYJKIESXcjs.applyMatrix.call(void 0, m, q2[1]), _chunkYYJKIESXcjs.applyMatrix.call(void 0, m, q2[2]), _chunkYYJKIESXcjs.applyMatrix.call(void 0, m, q2[3])];
4524
4524
  }
4525
4525
  function matrixFromCorners(box2, corners, eps = 1e-6) {
4526
4526
  const [tl, tr, br, bl] = corners;
@@ -4537,7 +4537,7 @@ function transformHomography(geometry) {
4537
4537
  function hasWarp(geometry) {
4538
4538
  const w = geometry.warp;
4539
4539
  if (!w) return false;
4540
- const id = _chunkORE334I6cjs.identityWarpMesh.call(void 0, geometry.box, w.us.length - 1, w.vs.length - 1);
4540
+ const id = _chunkYYJKIESXcjs.identityWarpMesh.call(void 0, geometry.box, w.us.length - 1, w.vs.length - 1);
4541
4541
  if (id.points.length !== w.points.length || id.us.some((u, i) => Math.abs(u - w.us[i]) > 1e-12) || id.vs.some((v, i) => Math.abs(v - w.vs[i]) > 1e-12)) return true;
4542
4542
  return w.points.some((p, i) => Math.abs(p.x - id.points[i].x) > 1e-6 || Math.abs(p.y - id.points[i].y) > 1e-6);
4543
4543
  }
@@ -4552,7 +4552,7 @@ function transformMap(geometry) {
4552
4552
  const { box: box2 } = geometry;
4553
4553
  const warp = hasWarp(geometry) ? geometry.warp : null;
4554
4554
  if (!warp) return (p) => _chunkMUUXNRU4cjs.applyHomography.call(void 0, h, p);
4555
- return (p) => _chunkMUUXNRU4cjs.applyHomography.call(void 0, h, _chunkORE334I6cjs.evalWarpMesh.call(void 0, warp, (p.x - box2.x) / box2.width, (p.y - box2.y) / box2.height));
4555
+ return (p) => _chunkMUUXNRU4cjs.applyHomography.call(void 0, h, _chunkYYJKIESXcjs.evalWarpMesh.call(void 0, warp, (p.x - box2.x) / box2.width, (p.y - box2.y) / box2.height));
4556
4556
  }
4557
4557
  function transformedPoint(geometry, fx, fy) {
4558
4558
  const f = transformMap(geometry);
@@ -4596,8 +4596,8 @@ function matrixFromParams(box2, params) {
4596
4596
  const tx = Math.tan((_nullishCoalesce(params.skewX, () => ( 0))) * Math.PI / 180);
4597
4597
  const ty = Math.tan((_nullishCoalesce(params.skewY, () => ( 0))) * Math.PI / 180);
4598
4598
  const ref = referencePoint(box2, params.reference);
4599
- const linear = _chunkORE334I6cjs.multiplyMatrices.call(void 0, _chunkORE334I6cjs.multiplyMatrices.call(void 0, [1, ty, tx, 1, 0, 0], [sx, 0, 0, sy, 0, 0]), _chunkORE334I6cjs.rotateMatrix.call(void 0, _nullishCoalesce(params.rotate, () => ( 0))));
4600
- return _chunkORE334I6cjs.multiplyMatrices.call(void 0, _chunkORE334I6cjs.matrixAbout.call(void 0, linear, ref), _chunkORE334I6cjs.translateMatrix.call(void 0, _nullishCoalesce(params.dx, () => ( 0)), _nullishCoalesce(params.dy, () => ( 0))));
4599
+ const linear = _chunkYYJKIESXcjs.multiplyMatrices.call(void 0, _chunkYYJKIESXcjs.multiplyMatrices.call(void 0, [1, ty, tx, 1, 0, 0], [sx, 0, 0, sy, 0, 0]), _chunkYYJKIESXcjs.rotateMatrix.call(void 0, _nullishCoalesce(params.rotate, () => ( 0))));
4600
+ return _chunkYYJKIESXcjs.multiplyMatrices.call(void 0, _chunkYYJKIESXcjs.matrixAbout.call(void 0, linear, ref), _chunkYYJKIESXcjs.translateMatrix.call(void 0, _nullishCoalesce(params.dx, () => ( 0)), _nullishCoalesce(params.dy, () => ( 0))));
4601
4601
  }
4602
4602
  function describeTransform(geometry, reference = "center") {
4603
4603
  const m = hasWarp(geometry) ? null : matrixFromCorners(geometry.box, geometry.corners);
@@ -4614,7 +4614,7 @@ function describeTransform(geometry, reference = "center") {
4614
4614
  const shear = sxAbs ? (a * c + b * d) / sxAbs : 0;
4615
4615
  const sy = sxAbs ? (a * d - b * c) / sxAbs : 0;
4616
4616
  const skew = sxAbs ? Math.atan(shear / sxAbs) * 180 / Math.PI : 0;
4617
- const at = _chunkORE334I6cjs.applyMatrix.call(void 0, m, ref);
4617
+ const at = _chunkYYJKIESXcjs.applyMatrix.call(void 0, m, ref);
4618
4618
  const clean = (v) => Math.abs(v) < 1e-9 ? 0 : v;
4619
4619
  return {
4620
4620
  affine: true,
@@ -4632,24 +4632,24 @@ function applyParams(geometry, params) {
4632
4632
  const ref = params.reference && typeof params.reference === "object" ? params.reference : anchorPoint(geometry, _nullishCoalesce(params.reference, () => ( "center")));
4633
4633
  const m = matrixFromParams({ x: ref.x, y: ref.y, width: 0, height: 0 }, { ...params, reference: ref });
4634
4634
  const c = geometry.corners;
4635
- return [_chunkORE334I6cjs.applyMatrix.call(void 0, m, c[0]), _chunkORE334I6cjs.applyMatrix.call(void 0, m, c[1]), _chunkORE334I6cjs.applyMatrix.call(void 0, m, c[2]), _chunkORE334I6cjs.applyMatrix.call(void 0, m, c[3])];
4635
+ return [_chunkYYJKIESXcjs.applyMatrix.call(void 0, m, c[0]), _chunkYYJKIESXcjs.applyMatrix.call(void 0, m, c[1]), _chunkYYJKIESXcjs.applyMatrix.call(void 0, m, c[2]), _chunkYYJKIESXcjs.applyMatrix.call(void 0, m, c[3])];
4636
4636
  }
4637
4637
  function flipCorners(geometry, axis) {
4638
4638
  const c = anchorPoint(geometry, "center");
4639
4639
  const m = axis === "horizontal" ? [-1, 0, 0, 1, 2 * c.x, 0] : [1, 0, 0, -1, 0, 2 * c.y];
4640
4640
  const q2 = geometry.corners;
4641
- return [_chunkORE334I6cjs.applyMatrix.call(void 0, m, q2[0]), _chunkORE334I6cjs.applyMatrix.call(void 0, m, q2[1]), _chunkORE334I6cjs.applyMatrix.call(void 0, m, q2[2]), _chunkORE334I6cjs.applyMatrix.call(void 0, m, q2[3])];
4641
+ return [_chunkYYJKIESXcjs.applyMatrix.call(void 0, m, q2[0]), _chunkYYJKIESXcjs.applyMatrix.call(void 0, m, q2[1]), _chunkYYJKIESXcjs.applyMatrix.call(void 0, m, q2[2]), _chunkYYJKIESXcjs.applyMatrix.call(void 0, m, q2[3])];
4642
4642
  }
4643
4643
  function boxPointOf(geometry, p) {
4644
4644
  const m = matrixFromCorners(geometry.box, geometry.corners);
4645
- if (m) return _chunkORE334I6cjs.applyMatrix.call(void 0, _chunkORE334I6cjs.invertMatrix.call(void 0, m), p);
4645
+ if (m) return _chunkYYJKIESXcjs.applyMatrix.call(void 0, _chunkYYJKIESXcjs.invertMatrix.call(void 0, m), p);
4646
4646
  return null;
4647
4647
  }
4648
4648
  function presetWarp(box2, preset) {
4649
- return _chunkORE334I6cjs.warpPresetMesh.call(void 0, preset, box2);
4649
+ return _chunkYYJKIESXcjs.warpPresetMesh.call(void 0, preset, box2);
4650
4650
  }
4651
4651
  function isValidWarp(mesh) {
4652
- return _chunkORE334I6cjs.isValidWarpMesh.call(void 0, mesh);
4652
+ return _chunkYYJKIESXcjs.isValidWarpMesh.call(void 0, mesh);
4653
4653
  }
4654
4654
  function geometryHomography(geometry) {
4655
4655
  const m = matrixFromCorners(geometry.box, geometry.corners);
@@ -4915,7 +4915,7 @@ function normalizePlacement(raw, contents) {
4915
4915
  }
4916
4916
  const out = { corners: c.map((p) => ({ x: p.x, y: p.y })) };
4917
4917
  if (raw.warp) {
4918
- if (!_chunkORE334I6cjs.isValidWarpMesh.call(void 0, raw.warp)) fail4("warp must be a mesh with us and vs (knots from 0 to 1, increasing) and (3\xB7columns + 1) \xD7 (3\xB7rows + 1) finite points in contents pixels.");
4918
+ if (!_chunkYYJKIESXcjs.isValidWarpMesh.call(void 0, raw.warp)) fail4("warp must be a mesh with us and vs (knots from 0 to 1, increasing) and (3\xB7columns + 1) \xD7 (3\xB7rows + 1) finite points in contents pixels.");
4919
4919
  out.warp = { us: [...raw.warp.us], vs: [...raw.warp.vs], points: raw.warp.points.map((p) => ({ x: p.x, y: p.y })) };
4920
4920
  }
4921
4921
  if (raw.interpolation !== void 0) {
@@ -5018,7 +5018,7 @@ function translateLayer(layer, dx, dy) {
5018
5018
  case "shape": {
5019
5019
  const next = {
5020
5020
  ...layer,
5021
- components: transformShapeComponents(layer.components, (p) => ({ x: p.x + dx, y: p.y + dy }), _chunkORE334I6cjs.translateMatrix.call(void 0, dx, dy)),
5021
+ components: transformShapeComponents(layer.components, (p) => ({ x: p.x + dx, y: p.y + dy }), _chunkYYJKIESXcjs.translateMatrix.call(void 0, dx, dy)),
5022
5022
  surface: _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, layer.surface, dx, dy),
5023
5023
  mask: moveMask(layer.mask)
5024
5024
  };
@@ -5027,7 +5027,7 @@ function translateLayer(layer, dx, dy) {
5027
5027
  return next;
5028
5028
  }
5029
5029
  case "type": {
5030
- const next = { ...transformTypeLayer(layer, _chunkORE334I6cjs.translateMatrix.call(void 0, dx, dy)), surface: _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, layer.surface, dx, dy), mask: moveMask(layer.mask) };
5030
+ const next = { ...transformTypeLayer(layer, _chunkYYJKIESXcjs.translateMatrix.call(void 0, dx, dy)), surface: _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, layer.surface, dx, dy), mask: moveMask(layer.mask) };
5031
5031
  if (!next.mask) delete next.mask;
5032
5032
  return next;
5033
5033
  }
@@ -5213,7 +5213,7 @@ function refitPlacement(layer, contents) {
5213
5213
  });
5214
5214
  const out = { corners: pts };
5215
5215
  if (layer.placement.interpolation) out.interpolation = layer.placement.interpolation;
5216
- if (layer.placement.warp) out.warp = _chunkORE334I6cjs.mapWarpMeshPoints.call(void 0, layer.placement.warp, (p) => ({ x: p.x * W1 / W0, y: p.y * H1 / H0 }));
5216
+ if (layer.placement.warp) out.warp = _chunkYYJKIESXcjs.mapWarpMeshPoints.call(void 0, layer.placement.warp, (p) => ({ x: p.x * W1 / W0, y: p.y * H1 / H0 }));
5217
5217
  return out;
5218
5218
  }
5219
5219
  function normalizeSmartFilter(raw, id = newLayerId("flt")) {
@@ -5527,7 +5527,7 @@ function readType(r, base, ctx) {
5527
5527
  const text3 = normalizeText(_nullishCoalesce(r.text, () => ( "")));
5528
5528
  const runs = (Array.isArray(r.runs) ? r.runs : []).map((run, i) => ({
5529
5529
  length: Math.max(0, Math.floor(num2(_optionalChain([run, 'optionalAccess', _139 => _139.length]), 0, 1e9, 0))),
5530
- style: patchTextStyle(_chunkORE334I6cjs.DEFAULT_TEXT_STYLE, _optionalChain([run, 'optionalAccess', _140 => _140.style]) && typeof run.style === "object" ? run.style : {}, `runs[${i}].style`)
5530
+ style: patchTextStyle(_chunkYYJKIESXcjs.DEFAULT_TEXT_STYLE, _optionalChain([run, 'optionalAccess', _140 => _140.style]) && typeof run.style === "object" ? run.style : {}, `runs[${i}].style`)
5531
5531
  }));
5532
5532
  const paragraphs = (Array.isArray(r.paragraphs) ? r.paragraphs : []).map((p, i) => ({
5533
5533
  length: Math.max(0, Math.floor(num2(_optionalChain([p, 'optionalAccess', _141 => _141.length]), 0, 1e9, 0))),
@@ -5540,13 +5540,13 @@ function readType(r, base, ctx) {
5540
5540
  ...base,
5541
5541
  type: "type",
5542
5542
  text: text3,
5543
- runs: _chunkORE334I6cjs.fitRuns.call(void 0, runs, text3.length, _chunkORE334I6cjs.DEFAULT_TEXT_STYLE),
5544
- paragraphs: _chunkORE334I6cjs.fitParagraphRuns.call(void 0, paragraphs.length ? paragraphs : [{ length: text3.length, style: {} }], text3),
5543
+ runs: _chunkYYJKIESXcjs.fitRuns.call(void 0, runs, text3.length, _chunkYYJKIESXcjs.DEFAULT_TEXT_STYLE),
5544
+ paragraphs: _chunkYYJKIESXcjs.fitParagraphRuns.call(void 0, paragraphs.length ? paragraphs : [{ length: text3.length, style: {} }], text3),
5545
5545
  frame,
5546
5546
  surface: _chunkJ5BA3BQ6cjs.emptySurface.call(void 0, 4),
5547
5547
  offset: { x: 0, y: 0 }
5548
5548
  };
5549
- if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([runs, 'access', _145 => _145[0], 'optionalAccess', _146 => _146.style]), () => ( _chunkORE334I6cjs.DEFAULT_TEXT_STYLE)) }];
5549
+ if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([runs, 'access', _145 => _145[0], 'optionalAccess', _146 => _146.style]), () => ( _chunkYYJKIESXcjs.DEFAULT_TEXT_STYLE)) }];
5550
5550
  if (m) layer.transform = m;
5551
5551
  if (r.antiAlias === false) layer.antiAlias = false;
5552
5552
  if (typeof r.fillOpacity === "number" && r.fillOpacity !== 1) layer.fillOpacity = num2(r.fillOpacity, 0, 1, 1);
@@ -5999,7 +5999,7 @@ function readSmartObject(r, base, ctx) {
5999
5999
  let placement;
6000
6000
  try {
6001
6001
  const raw = { corners: p.corners };
6002
- if (p.warp && _chunkORE334I6cjs.isValidWarpMesh.call(void 0, p.warp)) raw.warp = p.warp;
6002
+ if (p.warp && _chunkYYJKIESXcjs.isValidWarpMesh.call(void 0, p.warp)) raw.warp = p.warp;
6003
6003
  if (_chunkMZXQTKUMcjs.isInterpolation.call(void 0, p.interpolation)) raw.interpolation = p.interpolation;
6004
6004
  placement = normalizePlacement(raw, contents);
6005
6005
  } catch (e) {
@@ -6982,7 +6982,7 @@ function vectorBlockForComponents(components, inverted, width, height, flags = 0
6982
6982
  const fr = (p) => ({ x: p.x / w, y: p.y / h });
6983
6983
  const subpaths = [];
6984
6984
  components.forEach((c, ci) => {
6985
- _chunkORE334I6cjs.expandVectorCorners.call(void 0, c.subpaths).forEach((sp, si) => {
6985
+ _chunkYYJKIESXcjs.expandVectorCorners.call(void 0, c.subpaths).forEach((sp, si) => {
6986
6986
  if (!sp.anchors.length) return;
6987
6987
  subpaths.push({
6988
6988
  closed: sp.closed,
@@ -7704,7 +7704,7 @@ function merged(levels) {
7704
7704
  function charStyle(d, fonts, notes) {
7705
7705
  const n = (k) => eNum(eGet(d, k));
7706
7706
  const flag = (k) => eBool(eGet(d, k));
7707
- const s = { ..._chunkORE334I6cjs.DEFAULT_TEXT_STYLE };
7707
+ const s = { ..._chunkYYJKIESXcjs.DEFAULT_TEXT_STYLE };
7708
7708
  const fi = n("Font");
7709
7709
  const ps = fi !== void 0 ? fonts[fi] : void 0;
7710
7710
  if (ps) {
@@ -7787,7 +7787,7 @@ function typeFromTySh(data, notes) {
7787
7787
  }
7788
7788
  const edText = _nullishCoalesce(eStr(ePath(_nullishCoalesce(engine, () => ( void 0)), ["EngineDict", "Editor", "Text"])), () => ( ""));
7789
7789
  const text3 = (_nullishCoalesce(txt, () => ( edText.replace(/\r$/, "")))).replace(/\r\n?/g, "\n");
7790
- let runs = [{ length: text3.length, style: { ..._chunkORE334I6cjs.DEFAULT_TEXT_STYLE } }];
7790
+ let runs = [{ length: text3.length, style: { ..._chunkYYJKIESXcjs.DEFAULT_TEXT_STYLE } }];
7791
7791
  let paragraphs = [{ length: text3.length, style: {} }];
7792
7792
  let frame = { kind: "point" };
7793
7793
  let transform = t.transform;
@@ -7843,14 +7843,14 @@ function typeFromTySh(data, notes) {
7843
7843
  const b = eArray(ePath(shape, ["Cookie", "Photoshop", "BoxBounds"])).map((v) => _nullishCoalesce(eNum(v), () => ( 0)));
7844
7844
  if (b.length === 4 && b[2] > b[0] && b[3] > b[1]) {
7845
7845
  frame = { kind: "box", width: b[2] - b[0], height: b[3] - b[1] };
7846
- transform = _chunkORE334I6cjs.multiplyMatrices.call(void 0, [1, 0, 0, 1, b[0], b[1]], t.transform);
7846
+ transform = _chunkYYJKIESXcjs.multiplyMatrices.call(void 0, [1, 0, 0, 1, b[0], b[1]], t.transform);
7847
7847
  }
7848
7848
  }
7849
7849
  }
7850
7850
  return {
7851
7851
  text: text3,
7852
- runs: _chunkORE334I6cjs.fitRuns.call(void 0, runs, text3.length, _chunkORE334I6cjs.DEFAULT_TEXT_STYLE),
7853
- paragraphs: _chunkORE334I6cjs.fitParagraphRuns.call(void 0, paragraphs, text3),
7852
+ runs: _chunkYYJKIESXcjs.fitRuns.call(void 0, runs, text3.length, _chunkYYJKIESXcjs.DEFAULT_TEXT_STYLE),
7853
+ paragraphs: _chunkYYJKIESXcjs.fitParagraphRuns.call(void 0, paragraphs, text3),
7854
7854
  frame,
7855
7855
  transform,
7856
7856
  antiAlias,
@@ -7924,7 +7924,7 @@ function buildEngineData(layer, template) {
7924
7924
  fonts.push(ps);
7925
7925
  return fonts.length - 1;
7926
7926
  };
7927
- const runs = _chunkORE334I6cjs.fitRuns.call(void 0, layer.runs, layer.text.length, _chunkORE334I6cjs.DEFAULT_TEXT_STYLE);
7927
+ const runs = _chunkYYJKIESXcjs.fitRuns.call(void 0, layer.runs, layer.text.length, _chunkYYJKIESXcjs.DEFAULT_TEXT_STYLE);
7928
7928
  const sruns = [];
7929
7929
  const slens = [];
7930
7930
  runs.forEach((r, i) => {
@@ -7932,10 +7932,10 @@ function buildEngineData(layer, template) {
7932
7932
  slens.push(E.int(r.length + (i === runs.length - 1 ? 1 : 0)));
7933
7933
  });
7934
7934
  if (!runs.length) {
7935
- sruns.push(E.dict([["StyleSheet", E.dict([["StyleSheetData", styleSheetData(_chunkORE334I6cjs.DEFAULT_TEXT_STYLE, fontIndex(postScriptFor(_chunkORE334I6cjs.DEFAULT_TEXT_STYLE)))]])]]));
7935
+ sruns.push(E.dict([["StyleSheet", E.dict([["StyleSheetData", styleSheetData(_chunkYYJKIESXcjs.DEFAULT_TEXT_STYLE, fontIndex(postScriptFor(_chunkYYJKIESXcjs.DEFAULT_TEXT_STYLE)))]])]]));
7936
7936
  slens.push(E.int(1));
7937
7937
  }
7938
- const paras = _chunkORE334I6cjs.fitParagraphRuns.call(void 0, layer.paragraphs, layer.text);
7938
+ const paras = _chunkYYJKIESXcjs.fitParagraphRuns.call(void 0, layer.paragraphs, layer.text);
7939
7939
  const pruns = [];
7940
7940
  const plens = [];
7941
7941
  paras.forEach((p, i) => {
@@ -7991,7 +7991,7 @@ function buildEngineData(layer, template) {
7991
7991
  eSet(e, key, rd);
7992
7992
  }
7993
7993
  eSet(rd, "FontSet", fontSet);
7994
- if (!eGet(rd, "StyleSheetSet")) eSet(rd, "StyleSheetSet", E.array([E.dict([["Name", E.str("Normal RGB")], ["StyleSheetData", styleSheetData(_nullishCoalesce(_optionalChain([runs, 'access', _211 => _211[0], 'optionalAccess', _212 => _212.style]), () => ( _chunkORE334I6cjs.DEFAULT_TEXT_STYLE)), 0)]])]));
7994
+ if (!eGet(rd, "StyleSheetSet")) eSet(rd, "StyleSheetSet", E.array([E.dict([["Name", E.str("Normal RGB")], ["StyleSheetData", styleSheetData(_nullishCoalesce(_optionalChain([runs, 'access', _211 => _211[0], 'optionalAccess', _212 => _212.style]), () => ( _chunkYYJKIESXcjs.DEFAULT_TEXT_STYLE)), 0)]])]));
7995
7995
  if (!eGet(rd, "ParagraphSheetSet")) eSet(rd, "ParagraphSheetSet", E.array([E.dict([["Name", E.str("Normal RGB")], ["DefaultStyleSheet", E.int(0)], ["Properties", paragraphProperties({})]])]));
7996
7996
  if (!eGet(rd, "TheNormalStyleSheet")) eSet(rd, "TheNormalStyleSheet", E.int(0));
7997
7997
  if (!eGet(rd, "TheNormalParagraphSheet")) eSet(rd, "TheNormalParagraphSheet", E.int(0));
@@ -8002,13 +8002,13 @@ function inkBounds2(layer) {
8002
8002
  if (layer.frame.kind === "box") return [0, 0, layer.frame.width, layer.frame.height];
8003
8003
  const b = _chunkJ5BA3BQ6cjs.contentBounds.call(void 0, layer.surface);
8004
8004
  if (!b) return [0, 0, 0, 0];
8005
- const inv = _chunkORE334I6cjs.invertMatrix.call(void 0, textMatrix(layer));
8005
+ const inv = _chunkYYJKIESXcjs.invertMatrix.call(void 0, textMatrix(layer));
8006
8006
  const pts = [
8007
8007
  { x: b.x, y: b.y },
8008
8008
  { x: b.x + b.width, y: b.y },
8009
8009
  { x: b.x + b.width, y: b.y + b.height },
8010
8010
  { x: b.x, y: b.y + b.height }
8011
- ].map((p) => _chunkORE334I6cjs.applyMatrix.call(void 0, inv, p));
8011
+ ].map((p) => _chunkYYJKIESXcjs.applyMatrix.call(void 0, inv, p));
8012
8012
  return [Math.min(...pts.map((p) => p.x)), Math.min(...pts.map((p) => p.y)), Math.max(...pts.map((p) => p.x)), Math.max(...pts.map((p) => p.y))];
8013
8013
  }
8014
8014
  function tyShForLayer(layer) {
@@ -8475,7 +8475,7 @@ function filterMaskItem(placed, mask, area) {
8475
8475
  var warpStyleOf = (name) => {
8476
8476
  if (!name.startsWith("warp")) return null;
8477
8477
  const s = _optionalChain([name, 'access', _226 => _226[4], 'optionalAccess', _227 => _227.toLowerCase, 'call', _228 => _228()]) + name.slice(5);
8478
- return _chunkORE334I6cjs.WARP_STYLES.includes(s) ? s : null;
8478
+ return _chunkYYJKIESXcjs.WARP_STYLES.includes(s) ? s : null;
8479
8479
  };
8480
8480
  function warpFromDescriptor(w, contents) {
8481
8481
  const full = { x: 0, y: 0, width: contents.width, height: contents.height };
@@ -8505,7 +8505,7 @@ function warpFromDescriptor(w, contents) {
8505
8505
  } else {
8506
8506
  const style = warpStyleOf(styleName);
8507
8507
  if (!style) return void 0;
8508
- mesh = _chunkORE334I6cjs.warpPresetMesh.call(void 0,
8508
+ mesh = _chunkYYJKIESXcjs.warpPresetMesh.call(void 0,
8509
8509
  {
8510
8510
  style,
8511
8511
  bend: _nullishCoalesce(descNumber(w, "warpValue"), () => ( 0)),
@@ -8520,7 +8520,7 @@ function warpFromDescriptor(w, contents) {
8520
8520
  const same = Math.abs(bounds.x) < 1e-6 && Math.abs(bounds.y) < 1e-6 && Math.abs(bounds.width - contents.width) < 1e-6 && Math.abs(bounds.height - contents.height) < 1e-6;
8521
8521
  if (!same) {
8522
8522
  const m = mesh;
8523
- mesh = _chunkORE334I6cjs.fitWarpMesh.call(void 0, (s, t) => _chunkORE334I6cjs.evalWarpMesh.call(void 0, m, (s * contents.width - bounds.x) / bounds.width, (t * contents.height - bounds.y) / bounds.height), [0, 1], [0, 1]);
8523
+ mesh = _chunkYYJKIESXcjs.fitWarpMesh.call(void 0, (s, t) => _chunkYYJKIESXcjs.evalWarpMesh.call(void 0, m, (s * contents.width - bounds.x) / bounds.width, (t * contents.height - bounds.y) / bounds.height), [0, 1], [0, 1]);
8524
8524
  }
8525
8525
  return { mesh, frame };
8526
8526
  }
@@ -9359,6 +9359,16 @@ function toRgbaDeep(set) {
9359
9359
  };
9360
9360
  const planes = set.color.map((p) => raw(p, cmyk ? 1 : 0));
9361
9361
  const alpha = raw(set.alpha, 1);
9362
+ if (depth === 16 && cmyk && set.cmykToRgb16) {
9363
+ const ink = new Uint16Array(n * 4);
9364
+ const out2 = new Uint16Array(n * 4);
9365
+ for (let i = 0, o = 0; i < n; i++, o += 4) {
9366
+ for (let c = 0; c < 4; c++) ink[o + c] = Math.round((1 - (planes[c] ? planes[c](i) : 1)) * 65535);
9367
+ out2[o + 3] = Math.round(clamp012(alpha(i)) * 65535);
9368
+ }
9369
+ set.cmykToRgb16(ink, out2);
9370
+ return out2;
9371
+ }
9362
9372
  if (depth === 16) {
9363
9373
  const out2 = new Uint16Array(n * 4);
9364
9374
  const q2 = (v) => Math.round(clamp012(v) * 65535);
@@ -9752,9 +9762,10 @@ function recordPixels(ctx, rec, name) {
9752
9762
  color: planes.slice(0, ctx.colorCount),
9753
9763
  alpha: planes[ctx.colorCount],
9754
9764
  palette: ctx.palette,
9755
- cmykToRgb: ctx.cmykToRgb
9765
+ cmykToRgb: ctx.cmykToRgb,
9766
+ cmykToRgb16: ctx.cmykToRgb16
9756
9767
  };
9757
- const deep = set.cmykToRgb ? null : toRgbaDeep(set);
9768
+ const deep = set.cmykToRgb && !set.cmykToRgb16 ? null : toRgbaDeep(set);
9758
9769
  if (deep) return _chunkJ5BA3BQ6cjs.surfaceFromDeepPixels.call(void 0, { width, height, data: deep }, 4, rec.rect.left, rec.rect.top);
9759
9770
  return _chunkJ5BA3BQ6cjs.surfaceFromPixels.call(void 0, { width, height, data: toRgba8(set) }, 4, rec.rect.left, rec.rect.top);
9760
9771
  }
@@ -9772,7 +9783,7 @@ function recordMask(ctx, rec, name) {
9772
9783
  if (width && height && !ctx.skipPixels) {
9773
9784
  const plane = decodeOr(ctx, rec, id, name);
9774
9785
  const depth = ctx.file.header.depth;
9775
- if (plane && (depth === 16 || depth === 32) && ctx.file.header.colorMode !== MODE_CMYK) surface = _chunkJ5BA3BQ6cjs.surfaceFromDeepPixels.call(void 0, { width, height, data: toMaskDeep(plane, width, height, depth) }, 1, rect.left, rect.top, def);
9786
+ if (plane && (depth === 16 || depth === 32)) surface = _chunkJ5BA3BQ6cjs.surfaceFromDeepPixels.call(void 0, { width, height, data: toMaskDeep(plane, width, height, depth) }, 1, rect.left, rect.top, def);
9776
9787
  else if (plane) surface = _chunkJ5BA3BQ6cjs.surfaceFromPixels.call(void 0, { width, height, data: toMask8(plane, width, height, depth) }, 1, rect.left, rect.top, def);
9777
9788
  }
9778
9789
  const mask = { surface, defaultValue: def };
@@ -10085,7 +10096,7 @@ function importSmart(ctx, rec, name, notes, props) {
10085
10096
  if (placement && (size.width !== contents.width || size.height !== contents.height)) {
10086
10097
  const kx = contents.width / size.width;
10087
10098
  const ky = contents.height / size.height;
10088
- if (placement.warp) placement = { ...placement, warp: _chunkORE334I6cjs.mapWarpMeshPoints.call(void 0, placement.warp, (p) => ({ x: p.x * kx, y: p.y * ky })) };
10099
+ if (placement.warp) placement = { ...placement, warp: _chunkYYJKIESXcjs.mapWarpMeshPoints.call(void 0, placement.warp, (p) => ({ x: p.x * kx, y: p.y * ky })) };
10089
10100
  }
10090
10101
  }
10091
10102
  if (!contents || !placement) {
@@ -10164,9 +10175,10 @@ function mergedLayer(ctx) {
10164
10175
  color: Array.from({ length: cc }, (_, i) => plane(i)),
10165
10176
  alpha: hasAlpha ? plane(cc) : void 0,
10166
10177
  palette: ctx.palette,
10167
- cmykToRgb: ctx.cmykToRgb
10178
+ cmykToRgb: ctx.cmykToRgb,
10179
+ cmykToRgb16: ctx.cmykToRgb16
10168
10180
  };
10169
- const deep = hasAlpha || set.cmykToRgb ? null : toRgbaDeep(set);
10181
+ const deep = hasAlpha || set.cmykToRgb && !set.cmykToRgb16 ? null : toRgbaDeep(set);
10170
10182
  let surface;
10171
10183
  if (deep) surface = _chunkJ5BA3BQ6cjs.surfaceFromDeepPixels.call(void 0, { width, height, data: deep }, 4);
10172
10184
  else {
@@ -10225,6 +10237,7 @@ function psdToLayers(file, options = {}) {
10225
10237
  }
10226
10238
  const t = _chunkG5NMLUVFcjs.Transform.create(src, _chunkG5NMLUVFcjs.srgbProfile.call(void 0, ), { intent: "relative", bpc: true });
10227
10239
  ctx.cmykToRgb = (ink, out) => t.convert8(ink, 4, out, 4, false);
10240
+ if (header.depth === 16) ctx.cmykToRgb16 = (ink, out) => t.convert16(ink, 4, out, 4, false);
10228
10241
  }
10229
10242
  for (const block of file.globalBlocks) {
10230
10243
  if (LINKED_FILE_KEYS.includes(block.key)) {
@@ -11091,7 +11104,8 @@ function exportPsd(input) {
11091
11104
  if (width < 1 || height < 1) throw new PsdError("The document is empty.");
11092
11105
  const mode = _nullishCoalesce(input.colorMode, () => ( "rgb"));
11093
11106
  if (mode !== "rgb" && !input.colorPlanes) throw new PsdError(`A ${mode.toUpperCase()} file needs colorPlanes to convert the pixels.`);
11094
- if (mode !== "rgb" && depth !== 8) throw new PsdError(`${mode.toUpperCase()} files are written at 8 bits per channel.`);
11107
+ if (mode !== "rgb" && depth === 32) throw new PsdError(`${mode.toUpperCase()} files are written at 8 or 16 bits per channel.`);
11108
+ if (mode !== "rgb" && depth === 16 && !input.colorPlanes16) throw new PsdError(`A 16-bit ${mode.toUpperCase()} file needs colorPlanes16 to convert the pixels.`);
11095
11109
  const colorIds = mode === "cmyk" ? [0, 1, 2, 3] : [0, 1, 2];
11096
11110
  const colorPlanes = (rgba, n2) => mode === "rgb" ? rgbaToPlanes(rgba, n2).slice(0, 3) : input.colorPlanes(rgba, n2);
11097
11111
  const pixelChannels = (rgba, w, h) => {
@@ -11100,6 +11114,14 @@ function exportPsd(input) {
11100
11114
  return [rleChannel(CHANNEL_ALPHA, alpha, w, h, psb), ...colorPlanes(rgba, n2).map((p, i) => rleChannel(i, p, w, h, psb))];
11101
11115
  };
11102
11116
  const surfaceChannels = (surface, bounds) => {
11117
+ if (mode !== "rgb" && depth === 16) {
11118
+ const n2 = bounds.width * bounds.height;
11119
+ const s = _chunkJ5BA3BQ6cjs.readDeepRegion.call(void 0, surface, bounds, 16);
11120
+ const alpha = new Uint16Array(n2);
11121
+ for (let i = 0; i < n2; i++) alpha[i] = s[i * 4 + 3];
11122
+ const planes2 = [alpha, ...input.colorPlanes16(s, n2)];
11123
+ return [CHANNEL_ALPHA, ...colorIds].map((id, i) => rleChannel(id, deepMaskPlane(planes2[i]), bounds.width, bounds.height, psb, 16));
11124
+ }
11103
11125
  if (mode !== "rgb") return pixelChannels(_chunkJ5BA3BQ6cjs.readRegion.call(void 0, surface, bounds), bounds.width, bounds.height);
11104
11126
  const [r, g, b, a2] = surfacePlanes(surface, bounds, depth);
11105
11127
  return [CHANNEL_ALPHA, 0, 1, 2].map((id, i) => rleChannel(id, [a2, r, g, b][i], bounds.width, bounds.height, psb, depth));
@@ -11304,8 +11326,15 @@ function exportPsd(input) {
11304
11326
  let planes = [...colorPlanes(matted, n), ...transparent ? [a] : []].map((p) => planeAtDepth(p, depth));
11305
11327
  const deep = input.mergedDeep;
11306
11328
  if (deep && depth !== 8 && deep.length >= n * 4 && (deep instanceof Uint16Array ? depth === 16 : depth === 32)) {
11307
- const dp = deepToPlanes(matteWhiteDeep(deep), n);
11308
- planes = transparent ? dp : dp.slice(0, 3);
11329
+ const mattedDeep = matteWhiteDeep(deep);
11330
+ if (mode !== "rgb" && mattedDeep instanceof Uint16Array) {
11331
+ const alpha = new Uint16Array(n);
11332
+ for (let i = 0; i < n; i++) alpha[i] = mattedDeep[i * 4 + 3];
11333
+ planes = [...input.colorPlanes16(mattedDeep, n), ...transparent ? [alpha] : []].map(deepMaskPlane);
11334
+ } else {
11335
+ const dp = deepToPlanes(mattedDeep, n);
11336
+ planes = transparent ? dp : dp.slice(0, 3);
11337
+ }
11309
11338
  }
11310
11339
  const planeBytes = n * (depth >> 3);
11311
11340
  const merged2 = new Uint8Array(planeBytes * planes.length);
@@ -11736,4 +11765,4 @@ function exportPsd(input) {
11736
11765
 
11737
11766
 
11738
11767
  exports.LEGACY_PROCESS_VERSION = LEGACY_PROCESS_VERSION; exports.LATEST_PROCESS_VERSION = LATEST_PROCESS_VERSION; exports.normalizeProcessVersion = normalizeProcessVersion; exports.srgbToLinear = srgbToLinear; exports.linearToSrgb = linearToSrgb; exports.LUMA_709 = LUMA_709; exports.IDENTITY_MATRIX3 = IDENTITY_MATRIX3; exports.mulMatrix3 = mulMatrix3; exports.applyMatrix3 = applyMatrix3; exports.invertMatrix3 = invertMatrix3; exports.D65 = D65; exports.bradfordAdaptation = bradfordAdaptation; exports.wbMatrix = wbMatrix; exports.linearSrgbToXy = linearSrgbToXy; exports.TINT_SCALE = TINT_SCALE; exports.MIN_KELVIN = MIN_KELVIN; exports.MAX_KELVIN = MAX_KELVIN; exports.xyToUv = xyToUv; exports.uvToXy = uvToXy; exports.tempTintToXy = tempTintToXy; exports.xyToTempTint = xyToTempTint; exports.AS_SHOT_KELVIN = AS_SHOT_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = MIRED_PER_TEMPERATURE_UNIT; exports.temperatureToKelvin = temperatureToKelvin; exports.kelvinToTemperature = kelvinToTemperature; exports.whiteBalanceMatrix = whiteBalanceMatrix; exports.whiteBalanceFromSample = whiteBalanceFromSample; exports.TONE_LUT_SIZE = TONE_LUT_SIZE; exports.toneCurve = toneCurve; exports.buildToneLut = buildToneLut; exports.sampleToneLut = sampleToneLut; exports.normalizeAngle = normalizeAngle; exports.isQuarterTurnSwapped = isQuarterTurnSwapped; exports.getRotatedSize = getRotatedSize; exports.projectImagePoint = projectImagePoint; exports.unprojectCanvasPoint = unprojectCanvasPoint; exports.applyImageProjectionToContext = applyImageProjectionToContext; exports.projectImageRect = projectImageRect; exports.clampCropToImage = clampCropToImage; exports.getViewportProjection = getViewportProjection; exports.getViewportMetrics = getViewportMetrics; exports.canvasToImagePoint = canvasToImagePoint; exports.imageToCanvasPoint = imageToCanvasPoint; exports.mapCropHandle = mapCropHandle; exports.hitTestCrop = hitTestCrop; exports.getCropCursor = getCropCursor; exports.calculateCropDrag = calculateCropDrag; exports.getAnnotationBounds = getAnnotationBounds; exports.hitTestAnnotation = hitTestAnnotation; exports.SELECTION_MODES = SELECTION_MODES; exports.isSelectionMode = isSelectionMode; exports.parseSelectionMode = parseSelectionMode; exports.computeSelectionBounds = computeSelectionBounds; exports.createSelectionMask = createSelectionMask; exports.fullSelection = fullSelection; exports.isSelectionEmpty = isSelectionEmpty; exports.selectionValueAt = selectionValueAt; exports.coverageToByte = coverageToByte; exports.selectionFromCoverage = selectionFromCoverage; exports.selectionToCoverage = selectionToCoverage; exports.selectionArea = selectionArea; exports.combineSelections = combineSelections; exports.invertSelection = invertSelection; exports.resizeSelection = resizeSelection; exports.selectionFromPixels = selectionFromPixels; exports.selectionToPixels = selectionToPixels; exports.encodeSelectionRle = encodeSelectionRle; exports.decodeSelectionRle = decodeSelectionRle; exports.serializeSelection = serializeSelection; exports.deserializeSelection = deserializeSelection; exports.hashMaskContent = hashMaskContent; exports.EMPTY_DISTANCE = EMPTY_DISTANCE; exports.distanceTransform = distanceTransform; exports.expandCoverage = expandCoverage; exports.contractCoverage = contractCoverage; exports.borderCoverage = borderCoverage; exports.smoothCoverage = smoothCoverage; exports.featherCoverage = featherCoverage; exports.greyMorphology = greyMorphology; exports.shiftCoverage = shiftCoverage; exports.SELECTION_MODIFY_OPS = SELECTION_MODIFY_OPS; exports.modifySelection = modifySelection; exports.normalizeLayerMask = normalizeLayerMask; exports.layerMaskFromSelection = layerMaskFromSelection; exports.updateLayerMaskProps = updateLayerMaskProps; exports.decodeLayerMask = decodeLayerMask; exports.layerMaskKey = layerMaskKey; exports.layerMaskCoverage = layerMaskCoverage; exports.projectMaskCoverage = projectMaskCoverage; exports.buildLayerMaskPlanes = buildLayerMaskPlanes; exports.ADJUSTMENT_LUT_SIZE = ADJUSTMENT_LUT_SIZE; exports.sampleLut = sampleLut; exports.ADJUSTMENT_KINDS = ADJUSTMENT_KINDS; exports.isAdjustmentKind = isAdjustmentKind; exports.adjustmentKindLabel = adjustmentKindLabel; exports.HUE_RANGE_LABELS = HUE_RANGE_LABELS; exports.neutralHueRange = neutralHueRange; exports.identityCurve = identityCurve; exports.identityLevels = identityLevels; exports.defaultAdjustmentParams = defaultAdjustmentParams; exports.createAdjustmentLayer = createAdjustmentLayer; exports.normalizeAdjustmentLayer = normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = normalizeAdjustmentLayers; exports.curveLutFromLevels = curveLutFromLevels; exports.levelsValue = levelsValue; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.hueRangeWeight = hueRangeWeight; exports.hueRangeTables = hueRangeTables; exports.hueSaturation = hueSaturation; exports.rangeLightness = rangeLightness; exports.VIBRANCE_GREY = VIBRANCE_GREY; exports.vibranceLinear = vibranceLinear; exports.vibrancePixel = vibrancePixel; exports.colorBalanceChannel = colorBalanceChannel; exports.blackWhiteGray = blackWhiteGray; exports.D50 = D50; exports.XYZ_D50_TO_SRGB = XYZ_D50_TO_SRGB; exports.photoFilterMatrix = photoFilterMatrix; exports.posterizeValue = posterizeValue; exports.rgbToGray = rgbToGray; exports.hexToRgb = hexToRgb; exports.toneLuts = toneLuts; exports.compileAdjustmentLayer = compileAdjustmentLayer; exports.activeAdjustmentLayers = activeAdjustmentLayers; exports.evaluateAdjustmentLayers = evaluateAdjustmentLayers; exports.applyAdjustmentLayers = applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = applyAdjustmentLayersFloat; exports.adjustmentLayersKey = adjustmentLayersKey; exports.applyAdjustments = applyAdjustments; exports.applyLegacyAdjustments = applyLegacyAdjustments; exports.applyProcess2Adjustments = applyProcess2Adjustments; exports.applyProcess2Float = applyProcess2Float; exports.applyBoxBlurFloat = applyBoxBlurFloat; exports.applyBoxBlur = applyBoxBlur; exports.applyDepthMask = applyDepthMask; exports.removeAlpha = removeAlpha; exports.TEXT_ALIGNS = TEXT_ALIGNS; exports.SHAPE_OPERATIONS = SHAPE_OPERATIONS; exports.LIVE_SHAPE_KINDS = LIVE_SHAPE_KINDS; exports.newLayerId = newLayerId; exports.pixelLayers = pixelLayers; exports.developFilter = developFilter; exports.blurFilter = blurFilter; exports.isActiveFilter = isActiveFilter; exports.isSpatialFilter = isSpatialFilter; exports.pixelLayerBounds = pixelLayerBounds; exports.layerTypeLabel = layerTypeLabel; exports.hasSurface = hasSurface; exports.isRenderedLayer = isRenderedLayer; exports.shapeLayers = shapeLayers; exports.smartObjectLayers = smartObjectLayers; exports.adjustmentNodeAsLayer = adjustmentNodeAsLayer; exports.depthMaskAlpha = depthMaskAlpha; exports.runLayerFilters = runLayerFilters; exports.runLayerFiltersFloat = runLayerFiltersFloat; exports.LayerCompositor = LayerCompositor; exports.compositeDeep = compositeDeep; exports.DEFAULT_ADJUSTMENTS_VALUES = DEFAULT_ADJUSTMENTS_VALUES; exports.DEFAULT_TRANSFORM_VALUES = DEFAULT_TRANSFORM_VALUES; exports.DEFAULT_DEPTH_MASK_VALUES = DEFAULT_DEPTH_MASK_VALUES; exports.flattenPath = flattenPath; exports.rasterizeCoverage = rasterizeCoverage; exports.LayerOperationError = LayerOperationError; exports.requireLayer = requireLayer; exports.requireUnlocked = requireUnlocked; exports.placeLayer = placeLayer; exports.removeLayer = removeLayer; exports.moveLayer = moveLayer; exports.withNewIds = withNewIds; exports.duplicateLayer = duplicateLayer; exports.setLayerProperties = setLayerProperties; exports.groupLayers = groupLayers; exports.ungroupLayer = ungroupLayer; exports.offsetLayer = offsetLayer; exports.setLayerMask = setLayerMask; exports.normalizeFilter = normalizeFilter; exports.addLayerFilter = addLayerFilter; exports.updateLayerFilter = updateLayerFilter; exports.removeLayerFilter = removeLayerFilter; exports.layerEffectsOf = layerEffectsOf; exports.setLayerEffects = setLayerEffects; exports.addLayerEffect = addLayerEffect; exports.updateLayerEffect = updateLayerEffect; exports.removeLayerEffect = removeLayerEffect; exports.setLayerEffectsEnabled = setLayerEffectsEnabled; exports.parseBlend = parseBlend; exports.unionRect = unionRect; exports.SHAPE_RENDER_MARGIN = SHAPE_RENDER_MARGIN; exports.DEFAULT_MITER_LIMIT = DEFAULT_MITER_LIMIT; exports.mapSubpaths = mapSubpaths; exports.liveShapeSubpaths = liveShapeSubpaths; exports.liveComponent = liveComponent; exports.componentPath = componentPath; exports.shapeOutline = shapeOutline; exports.shapeGeometryBounds = shapeGeometryBounds; exports.shapeRenderClip = shapeRenderClip; exports.renderShapeRect = renderShapeRect; exports.renderShape = renderShape; exports.rerenderShape = rerenderShape; exports.normalizeShapePaint = normalizeShapePaint; exports.normalizeShapeStroke = normalizeShapeStroke; exports.normalizeLiveShape = normalizeLiveShape; exports.normalizeSubpaths = normalizeSubpaths; exports.requireOperation = requireOperation; exports.requireShapeLayer = requireShapeLayer; exports.createShapeLayer = createShapeLayer; exports.defaultShapeName = defaultShapeName; exports.updateShapeLayer = updateShapeLayer; exports.transformShapeComponents = transformShapeComponents; exports.offsetShape = offsetShape; exports.mergeShapeComponents = mergeShapeComponents; exports.shapeAsPixelLayer = shapeAsPixelLayer; exports.shapeFromAnnotation = shapeFromAnnotation; exports.annotationBlend = annotationBlend; exports.annotationOfShape = annotationOfShape; exports.TEXT_RENDER_MARGIN = TEXT_RENDER_MARGIN; exports.textMatrix = textMatrix; exports.textOutlines = textOutlines; exports.renderText = renderText; exports.rerenderText = rerenderText; exports.TEXT_STYLE_FIELDS = TEXT_STYLE_FIELDS; exports.patchTextStyle = patchTextStyle; exports.PARAGRAPH_STYLE_FIELDS = PARAGRAPH_STYLE_FIELDS; exports.patchParagraphStyle = patchParagraphStyle; exports.textRange = textRange; exports.requireTypeLayer = requireTypeLayer; exports.normalizeText = normalizeText; exports.typeLayerName = typeLayerName; exports.createTypeLayer = createTypeLayer; exports.updateTypeLayer = updateTypeLayer; exports.replaceTextRange = replaceTextRange; exports.transformTypeLayer = transformTypeLayer; exports.typeFrame = typeFrame; exports.typeAsPixelLayer = typeAsPixelLayer; exports.toTextSpace = toTextSpace; exports.typeFromAnnotation = typeFromAnnotation; exports.annotationOfType = annotationOfType; exports.BACKGROUND_LAYER_ID = BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = BACKGROUND_LAYER_NAME; exports.DEVELOP_FILTER_ID = DEVELOP_FILTER_ID; exports.BLUR_FILTER_ID = BLUR_FILTER_ID; exports.rasterMaskFromLegacy = rasterMaskFromLegacy; exports.hasResampledLegacyMask = hasResampledLegacyMask; exports.legacyMaskOf = legacyMaskOf; exports.isDefaultDepthMask = isDefaultDepthMask; exports.developFromAdjustments = developFromAdjustments; exports.annotationLayerName = annotationLayerName; exports.annotationLayerFor = annotationLayerFor; exports.annotationOfLayer = annotationOfLayer; exports.adjustmentNodeFromLegacy = adjustmentNodeFromLegacy; exports.backgroundLayer = backgroundLayer; exports.depthRasterMask = depthRasterMask; exports.layersFromLegacy = layersFromLegacy; exports.legacyAdjustmentLayer = legacyAdjustmentLayer; exports.developTarget = developTarget; exports.legacyView = legacyView; exports.isLegacyShape = isLegacyShape; exports.FREE_TRANSFORM_MODES = FREE_TRANSFORM_MODES; exports.TRANSFORM_ANCHORS = TRANSFORM_ANCHORS; exports.isTransformAnchor = isTransformAnchor; exports.identityTransform = identityTransform; exports.cornersFromMatrix = cornersFromMatrix; exports.matrixFromCorners = matrixFromCorners; exports.transformHomography = transformHomography; exports.hasWarp = hasWarp; exports.isIdentityTransform = isIdentityTransform; exports.transformMap = transformMap; exports.transformedPoint = transformedPoint; exports.anchorPoint = anchorPoint; exports.transformedBox = transformedBox; exports.referencePoint = referencePoint; exports.matrixFromParams = matrixFromParams; exports.describeTransform = describeTransform; exports.applyParams = applyParams; exports.flipCorners = flipCorners; exports.boxPointOf = boxPointOf; exports.presetWarp = presetWarp; exports.isValidWarp = isValidWarp; exports.geometryHomography = geometryHomography; exports.SMART_RENDER_MARGIN = SMART_RENDER_MARGIN; exports.isSmartSurfaceIncomplete = isSmartSurfaceIncomplete; exports.newContentsId = newContentsId; exports.contentsBox = contentsBox; exports.placementGeometry = placementGeometry; exports.placementAt = placementAt; exports.isContentsDecoded = isContentsDecoded; exports.requireSmartObject = requireSmartObject; exports.contentsSurface = contentsSurface; exports.rasterContents = rasterContents; exports.documentContents = documentContents; exports.placeContents = placeContents; exports.activeSmartFilters = activeSmartFilters; exports.activeEffectSmartFilters = activeEffectSmartFilters; exports.filterMaskCoverage = filterMaskCoverage; exports.applySmartFilters = applySmartFilters; exports.renderSmartObject = renderSmartObject; exports.rerender = rerender; exports.normalizePlacement = normalizePlacement; exports.setSmartPlacement = setSmartPlacement; exports.offsetSmartObject = offsetSmartObject; exports.convertToSmartObject = convertToSmartObject; exports.rasterizeSmartObject = rasterizeSmartObject; exports.copySmartObject = copySmartObject; exports.instancesOf = instancesOf; exports.replaceContents = replaceContents; exports.normalizeSmartFilter = normalizeSmartFilter; exports.addSmartFilter = addSmartFilter; exports.updateSmartFilter = updateSmartFilter; exports.removeSmartFilter = removeSmartFilter; exports.moveSmartFilter = moveSmartFilter; exports.setSmartFiltersEnabled = setSmartFiltersEnabled; exports.setSmartFilterMask = setSmartFilterMask; exports.withFilterMaskSurface = withFilterMaskSurface; exports.placementBounds = placementBounds; exports.LAYERED_SCHEMA_VERSION = LAYERED_SCHEMA_VERSION; exports.serializePatterns = serializePatterns; exports.deserializePatterns = deserializePatterns; exports.encodeSurface = encodeSurface; exports.encodeDeepSurface = encodeDeepSurface; exports.decodeDeepSurface = decodeDeepSurface; exports.serializeEffects = serializeEffects; exports.deserializeEffects = deserializeEffects; exports.serializeLayer = serializeLayer; exports.serializeContents = serializeContents; exports.serializeLayers = serializeLayers; exports.serializeLayersExternal = serializeLayersExternal; exports.resolveExternalAssets = resolveExternalAssets; exports.decodePngDataUrl = decodePngDataUrl; exports.deserializeLayer = deserializeLayer; exports.deserializeLayers = deserializeLayers; exports.PsdError = PsdError; exports.parseVersionedDescriptor = parseVersionedDescriptor; exports.versionedDescriptorBytes = versionedDescriptorBytes; exports.ADJUSTMENT_KEYS = ADJUSTMENT_KEYS; exports.SUPPORTED_ADJUSTMENT_KEYS = SUPPORTED_ADJUSTMENT_KEYS; exports.parseAdjustmentBlock = parseAdjustmentBlock; exports.writeAdjustmentBlock = writeAdjustmentBlock; exports.parseLfx2 = parseLfx2; exports.writeLfx2 = writeLfx2; exports.parseLrfx = parseLrfx; exports.decodePlanes = decodePlanes; exports.encodeRle = encodeRle; exports.BROWSER_IMAGE_TYPES = BROWSER_IMAGE_TYPES; exports.readPsd = readPsd; exports.layerName = layerName; exports.layerTree = layerTree; exports.decodeLayerChannel = decodeLayerChannel; exports.decodeMergedImage = decodeMergedImage; exports.writePsd = writePsd; exports.PATTERN_BLOCK_KEYS = PATTERN_BLOCK_KEYS; exports.parsePatternBlock = parsePatternBlock; exports.psdPatternToEffectPattern = psdPatternToEffectPattern; exports.writePatternBlock = writePatternBlock; exports.PSD_BLEND_KEYS = PSD_BLEND_KEYS; exports.psdToLayers = psdToLayers; exports.importPsd = importPsd; exports.smartContentsFile = smartContentsFile; exports.exportPsd = exportPsd;
11739
- //# sourceMappingURL=chunk-XLUYXUBD.cjs.map
11768
+ //# sourceMappingURL=chunk-55UEZIU4.cjs.map