@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.
Files changed (81) hide show
  1. package/README.md +1 -1
  2. package/dist/agent/index.cjs +34 -34
  3. package/dist/agent/index.js +5 -5
  4. package/dist/animation-editor/index.cjs +57 -57
  5. package/dist/animation-editor/index.js +3 -3
  6. package/dist/{brushstrokeRender-Q4LI22QV.js → brushstrokeRender-7LXCU7PD.js} +2 -2
  7. package/dist/{brushstrokeRender-5WANQIG4.cjs → brushstrokeRender-VO4ZTWVA.cjs} +5 -5
  8. package/dist/canvas/index.cjs +14 -14
  9. package/dist/canvas/index.js +3 -3
  10. package/dist/chart/commands.d.cts +2 -1
  11. package/dist/chart/commands.d.ts +2 -1
  12. package/dist/chart/controller.d.cts +109 -1
  13. package/dist/chart/controller.d.ts +109 -1
  14. package/dist/chart/index.cjs +605 -130
  15. package/dist/chart/index.d.cts +1 -0
  16. package/dist/chart/index.d.ts +1 -0
  17. package/dist/chart/index.js +490 -15
  18. package/dist/chart/layout-annotations.d.cts +29 -0
  19. package/dist/chart/layout-annotations.d.ts +29 -0
  20. package/dist/chart/layout-families.d.cts +23 -0
  21. package/dist/chart/layout-families.d.ts +23 -0
  22. package/dist/chart/mermaid.d.cts +2 -1
  23. package/dist/chart/mermaid.d.ts +2 -1
  24. package/dist/chart/schemas.d.cts +13 -0
  25. package/dist/chart/schemas.d.ts +13 -0
  26. package/dist/chart/spec.d.cts +30 -5
  27. package/dist/chart/spec.d.ts +30 -5
  28. package/dist/chart/stats.d.cts +9 -1
  29. package/dist/chart/stats.d.ts +9 -1
  30. package/dist/chart/tools.d.cts +1 -1
  31. package/dist/chart/tools.d.ts +1 -1
  32. package/dist/chart/tree.d.cts +62 -0
  33. package/dist/chart/tree.d.ts +62 -0
  34. package/dist/chart/types.d.cts +77 -3
  35. package/dist/chart/types.d.ts +77 -3
  36. package/dist/{chunk-7YBDRJXT.cjs → chunk-22KLZZGH.cjs} +8 -8
  37. package/dist/{chunk-LQLZHP6F.js → chunk-36OKQDCF.js} +7 -4
  38. package/dist/{chunk-HLOKB7WW.js → chunk-3NEZJCBY.js} +366 -6
  39. package/dist/{chunk-GWV4T5NZ.js → chunk-3VLOOO3G.js} +1 -1
  40. package/dist/{chunk-3GJH2MGH.cjs → chunk-5AARIS3R.cjs} +35 -35
  41. package/dist/{chunk-EVPZ5IKN.js → chunk-5FNGLV2D.js} +65 -3
  42. package/dist/{chunk-EQ46F75O.cjs → chunk-D54JHQK2.cjs} +51 -51
  43. package/dist/{chunk-NO5QQDHZ.js → chunk-DAPQGA55.js} +2 -2
  44. package/dist/{chunk-3IHNXRUV.cjs → chunk-GKNEJ6EN.cjs} +399 -67
  45. package/dist/{chunk-236TKNUR.cjs → chunk-JCXMJUQO.cjs} +2 -2
  46. package/dist/{chunk-4NGVHHJB.cjs → chunk-NZD2MZJC.cjs} +80 -18
  47. package/dist/{chunk-CX6JLDFC.js → chunk-OXERWBKE.js} +3 -3
  48. package/dist/{chunk-32MMQYCQ.cjs → chunk-PA3IMPPS.cjs} +81 -81
  49. package/dist/{chunk-7CKPUUN4.js → chunk-POR54B55.js} +61 -10
  50. package/dist/{chunk-KGTF55R3.js → chunk-QY4KUDMY.js} +1 -1
  51. package/dist/{chunk-LL3H5XUH.cjs → chunk-R3P2M7HU.cjs} +367 -7
  52. package/dist/{chunk-HDGBM7EA.cjs → chunk-SBQVEBSU.cjs} +580 -53
  53. package/dist/{chunk-2TKHLX6H.js → chunk-SET6KJOP.js} +1 -1
  54. package/dist/{chunk-XDCFJEU7.js → chunk-SZA42R4N.js} +346 -14
  55. package/dist/{chunk-GLMP22FT.js → chunk-TALQONZ5.js} +3 -3
  56. package/dist/{chunk-GNK7SESQ.cjs → chunk-V7GWZIZK.cjs} +7 -4
  57. package/dist/{chunk-EYVVIZJ3.cjs → chunk-WTW7QRTS.cjs} +1 -1
  58. package/dist/{chunk-NA4UVVJ4.cjs → chunk-YGG7WDWT.cjs} +76 -25
  59. package/dist/{chunk-JGKCC5OF.cjs → chunk-YQ5C5BVK.cjs} +10 -9
  60. package/dist/{chunk-EY22AY6R.cjs → chunk-YSAGBIRW.cjs} +16 -16
  61. package/dist/{chunk-A5UCR2TO.js → chunk-YXKLVD56.js} +10 -9
  62. package/dist/{chunk-DTSTNRPH.js → chunk-Z4P2RBMJ.js} +536 -9
  63. package/dist/{chunk-45XXVHVG.js → chunk-ZZGPYNS2.js} +1 -1
  64. package/dist/export/index.cjs +4 -4
  65. package/dist/export/index.js +3 -3
  66. package/dist/extensions/index.cjs +7 -7
  67. package/dist/extensions/index.js +6 -6
  68. package/dist/image-editor/index.cjs +638 -638
  69. package/dist/image-editor/index.js +4 -4
  70. package/dist/index.cjs +13 -13
  71. package/dist/index.js +7 -7
  72. package/dist/paint/index.cjs +2 -2
  73. package/dist/paint/index.js +1 -1
  74. package/dist/paint-editor/index.cjs +129 -149
  75. package/dist/paint-editor/index.js +5 -25
  76. package/dist/vector/index.cjs +948 -948
  77. package/dist/vector/index.js +3 -3
  78. package/package.json +3 -3
  79. package/skills/pixerate-canvas/SKILL.md +16 -0
  80. package/skills/pixerate-chart/SKILL.md +92 -9
  81. package/skills/pixerate-paint-editor/SKILL.md +0 -2
@@ -7,7 +7,7 @@ var _chunk3OSXHLITcjs = require('../chunk-3OSXHLIT.cjs');
7
7
 
8
8
 
9
9
 
10
- var _chunk32MMQYCQcjs = require('../chunk-32MMQYCQ.cjs');
10
+ var _chunkPA3IMPPScjs = require('../chunk-PA3IMPPS.cjs');
11
11
  require('../chunk-A2IS7EHE.cjs');
12
12
 
13
13
 
@@ -43,7 +43,7 @@ require('../chunk-QT26RHKK.cjs');
43
43
 
44
44
 
45
45
 
46
- var _chunkGNK7SESQcjs = require('../chunk-GNK7SESQ.cjs');
46
+ var _chunkV7GWZIZKcjs = require('../chunk-V7GWZIZK.cjs');
47
47
  require('../chunk-BROJYMWU.cjs');
48
48
 
49
49
 
@@ -54,7 +54,7 @@ var _chunkJLWLX52Lcjs = require('../chunk-JLWLX52L.cjs');
54
54
 
55
55
 
56
56
  var _chunkSWTUM32Hcjs = require('../chunk-SWTUM32H.cjs');
57
- require('../chunk-236TKNUR.cjs');
57
+ require('../chunk-JCXMJUQO.cjs');
58
58
 
59
59
 
60
60
 
@@ -119,7 +119,7 @@ require('../chunk-236TKNUR.cjs');
119
119
 
120
120
 
121
121
 
122
- var _chunkJGKCC5OFcjs = require('../chunk-JGKCC5OF.cjs');
122
+ var _chunkYQ5C5BVKcjs = require('../chunk-YQ5C5BVK.cjs');
123
123
  require('../chunk-CVFAAZXE.cjs');
124
124
  require('../chunk-GF2RBSDM.cjs');
125
125
  require('../chunk-NM3G4VQT.cjs');
@@ -271,7 +271,7 @@ function normalizeCanvas(raw) {
271
271
  function createPaintDocument(options = {}) {
272
272
  const canvas = normalizeCanvas({ width: _nullishCoalesce(options.width, () => ( 2048)), height: _nullishCoalesce(options.height, () => ( 1536)), dpi: options.dpi });
273
273
  const layer = createPaintLayer("Layer 1");
274
- return { canvas, paper: _chunkJGKCC5OFcjs.normalizePaper.call(void 0, _nullishCoalesce(options.paper, () => ( {}))), layers: [layer], activeLayerId: layer.id, strokes: [] };
274
+ return { canvas, paper: _chunkYQ5C5BVKcjs.normalizePaper.call(void 0, _nullishCoalesce(options.paper, () => ( {}))), layers: [layer], activeLayerId: layer.id, strokes: [] };
275
275
  }
276
276
 
277
277
  // src/paint-editor/dab-stroke.ts
@@ -325,13 +325,13 @@ var PaintDabStroke = (_class = class {
325
325
  constructor(brush, options) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);_class.prototype.__init8.call(this);_class.prototype.__init9.call(this);_class.prototype.__init10.call(this);
326
326
  this.brush = brush;
327
327
  this.options = options;
328
- this.smoother = new (0, _chunkJGKCC5OFcjs.PenSmoother)(brush.tip.smoothing, brush.pressureSmoothing);
329
- this.copies = _optionalChain([options, 'access', _2 => _2.copies, 'optionalAccess', _3 => _3.length]) ? options.copies : [_chunkJGKCC5OFcjs.IDENTITY_COPY];
328
+ this.smoother = new (0, _chunkYQ5C5BVKcjs.PenSmoother)(brush.tip.smoothing, brush.pressureSmoothing);
329
+ this.copies = _optionalChain([options, 'access', _2 => _2.copies, 'optionalAccess', _3 => _3.length]) ? options.copies : [_chunkYQ5C5BVKcjs.IDENTITY_COPY];
330
330
  const exchanging = brush.engine === "mixer" || brush.engine === "dab";
331
331
  const rates = brush.engine === "mixer" ? _chunkEBDCRTZIcjs.mixerRates.call(void 0, brush.mixer) : _chunkEBDCRTZIcjs.exchangeRates.call(void 0, brush.behavior.pickup, brush.behavior.mix, 1, brush.behavior.mixing);
332
332
  this.mixing = brush.engine === "mixer" ? brush.mixer.mixing : brush.behavior.mixing;
333
333
  this.states = this.copies.map((c, i) => ({
334
- walker: new (0, _chunkJGKCC5OFcjs.PenDabWalker)(brush, (_nullishCoalesce(options.seed, () => ( 0))) + i * 7919 | 0, c.linear),
334
+ walker: new (0, _chunkYQ5C5BVKcjs.PenDabWalker)(brush, (_nullishCoalesce(options.seed, () => ( 0))) + i * 7919 | 0, c.linear),
335
335
  exchange: exchanging ? new (0, _chunkEBDCRTZIcjs.PaintExchange)(rates, options.load) : null,
336
336
  smudge: brush.engine === "smudge" ? new (0, _chunkEBDCRTZIcjs.SmudgeTip)(brush.smudge, brush.tip.size * (1 + brush.dynamics.tiltSize * 1.5)) : null
337
337
  }));
@@ -608,10 +608,10 @@ function lightTile(color, height, heightAround, material, light) {
608
608
  const nh = Math.max(0, nx * hx + ny * hy + nz * hz);
609
609
  const spec = Math.max(0, Math.pow(nh, shininess) - Math.pow(hz, shininess)) * (0.25 + 0.75 * gloss) * light.relief;
610
610
  for (let c = 0; c < 3; c++) {
611
- const a = _chunkGNK7SESQcjs.SRGB_TO_LINEAR[color[i + c]];
611
+ const a = _chunkV7GWZIZKcjs.SRGB_TO_LINEAR[color[i + c]];
612
612
  const tint = metal * a + (1 - metal);
613
613
  const v = a * shade * (1 - 0.35 * metal) + spec * tint * (1 + metal);
614
- out[i + c] = _chunkGNK7SESQcjs.linearToSrgb8.call(void 0, v);
614
+ out[i + c] = _chunkV7GWZIZKcjs.linearToSrgb8.call(void 0, v);
615
615
  }
616
616
  }
617
617
  }
@@ -671,12 +671,12 @@ var ThickStrokeDriver = (_class3 = class {
671
671
  constructor(init) {;_class3.prototype.__init12.call(this);_class3.prototype.__init13.call(this);_class3.prototype.__init14.call(this);_class3.prototype.__init15.call(this);_class3.prototype.__init16.call(this);_class3.prototype.__init17.call(this);_class3.prototype.__init18.call(this);_class3.prototype.__init19.call(this);_class3.prototype.__init20.call(this);
672
672
  this.init = init;
673
673
  const b = init.brush;
674
- this.smoother = new (0, _chunkJGKCC5OFcjs.PenSmoother)(b.tip.smoothing, b.pressureSmoothing);
675
- const copies = init.copies.length ? init.copies : [_chunkJGKCC5OFcjs.IDENTITY_COPY];
674
+ this.smoother = new (0, _chunkYQ5C5BVKcjs.PenSmoother)(b.tip.smoothing, b.pressureSmoothing);
675
+ const copies = init.copies.length ? init.copies : [_chunkYQ5C5BVKcjs.IDENTITY_COPY];
676
676
  this.copies = copies;
677
677
  const rates = _chunkEBDCRTZIcjs.exchangeRates.call(void 0, b.behavior.pickup, b.behavior.mix, 1, b.behavior.mixing);
678
678
  this.states = copies.map((c, i) => ({
679
- walker: new (0, _chunkJGKCC5OFcjs.PenDabWalker)(b, init.seed + i * 7919 | 0, c.linear),
679
+ walker: new (0, _chunkYQ5C5BVKcjs.PenDabWalker)(b, init.seed + i * 7919 | 0, c.linear),
680
680
  exchange: new (0, _chunkEBDCRTZIcjs.PaintExchange)(rates, init.load),
681
681
  smudge: b.impasto.tool === "knife" ? new (0, _chunkEBDCRTZIcjs.SmudgeTip)({ strength: 0.85, length: 0.6 + 0.38 * b.impasto.drag, mixing: b.behavior.mixing }, b.tip.size * 1.2) : null,
682
682
  carried: null,
@@ -974,7 +974,7 @@ var PaintStrokeSession = (_class4 = class {
974
974
  this.layerId = init.layerId;
975
975
  this.base = init.surface;
976
976
  this.live = new Map(this.base.tiles);
977
- this.copies = init.copies.length ? init.copies : [_chunkJGKCC5OFcjs.IDENTITY_COPY];
977
+ this.copies = init.copies.length ? init.copies : [_chunkYQ5C5BVKcjs.IDENTITY_COPY];
978
978
  const brush = init.brush;
979
979
  if (init.wet) this.wetDriver = init.wet.driver;
980
980
  this.apply = {
@@ -989,11 +989,11 @@ var PaintStrokeSession = (_class4 = class {
989
989
  };
990
990
  if (this.wetDriver) {
991
991
  } else if (init.sticker) {
992
- this.stickerSpray = new (0, _chunkJGKCC5OFcjs.StickerSpray)({ brush, target: this.tileTarget(), color: init.colorHex, seed: init.seed, copies: this.copies, nextId: init.sticker.nextId, paint: _nullishCoalesce(init.paint, () => ( null)) });
992
+ this.stickerSpray = new (0, _chunkYQ5C5BVKcjs.StickerSpray)({ brush, target: this.tileTarget(), color: init.colorHex, seed: init.seed, copies: this.copies, nextId: init.sticker.nextId, paint: _nullishCoalesce(init.paint, () => ( null)) });
993
993
  } else if (init.thick) {
994
994
  const rgb = (c) => [c[0] / 255, c[1] / 255, c[2] / 255];
995
995
  this.thickDriver = new ThickStrokeDriver({ brush, target: this.tileTarget(), channels: init.thick.channels, color: rgb(init.color), load: init.mixerLoad, seed: init.seed, copies: this.copies, paint: _nullishCoalesce(init.paint, () => ( null)) });
996
- } else if (brush.engine === "mixer" || brush.engine === "blender" || brush.engine === "smudge" || _chunkJGKCC5OFcjs.usesPaintExchange.call(void 0, brush, Boolean(init.paint))) {
996
+ } else if (brush.engine === "mixer" || brush.engine === "blender" || brush.engine === "smudge" || _chunkYQ5C5BVKcjs.usesPaintExchange.call(void 0, brush, Boolean(init.paint))) {
997
997
  const rgb = (c) => [c[0] / 255, c[1] / 255, c[2] / 255];
998
998
  this.wet = new PaintDabStroke(brush, {
999
999
  target: this.tileTarget(),
@@ -1008,7 +1008,7 @@ var PaintStrokeSession = (_class4 = class {
1008
1008
  });
1009
1009
  } else {
1010
1010
  const opts = { grain: init.grain, paperDepth: init.paperDepth, seed: init.seed, copies: this.copies, paint: _nullishCoalesce(init.paint, () => ( null)) };
1011
- this.dry = brush.engine === "particle" ? new (0, _chunkJGKCC5OFcjs.ParticleStroke)(brush, opts) : brush.engine === "bristle" ? new (0, _chunkJGKCC5OFcjs.BristleStroke)(brush, opts) : new (0, _chunkJGKCC5OFcjs.DryStroke)(brush, opts);
1011
+ this.dry = brush.engine === "particle" ? new (0, _chunkYQ5C5BVKcjs.ParticleStroke)(brush, opts) : brush.engine === "bristle" ? new (0, _chunkYQ5C5BVKcjs.BristleStroke)(brush, opts) : new (0, _chunkYQ5C5BVKcjs.DryStroke)(brush, opts);
1012
1012
  }
1013
1013
  }
1014
1014
 
@@ -1179,7 +1179,7 @@ function brushLoadForStroke(brush, current, color) {
1179
1179
  if (brush.engine === "mixer") return mixerLoadForStroke(brush, current, color);
1180
1180
  if (brush.engine === "impasto") return { reservoir: [color[0], color[1], color[2]], amount: 1, pickup: brush.behavior.dirty ? current.pickup : null };
1181
1181
  if (brush.engine === "wet") return brush.wet.tool === "paint" ? { reservoir: [color[0], color[1], color[2]], amount: 1, pickup: brush.behavior.dirty ? current.pickup : null } : _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD;
1182
- if (_chunkJGKCC5OFcjs.usesPaintExchange.call(void 0, brush)) return { reservoir: [color[0], color[1], color[2]], amount: 1, pickup: brush.behavior.dirty ? current.pickup : null };
1182
+ if (_chunkYQ5C5BVKcjs.usesPaintExchange.call(void 0, brush)) return { reservoir: [color[0], color[1], color[2]], amount: 1, pickup: brush.behavior.dirty ? current.pickup : null };
1183
1183
  return _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD;
1184
1184
  }
1185
1185
 
@@ -1447,7 +1447,7 @@ function normalizeBrushStroke(raw) {
1447
1447
  const out = {
1448
1448
  id: r.id,
1449
1449
  layerId: r.layerId,
1450
- brush: _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, _nullishCoalesce(r.brush, () => ( {}))),
1450
+ brush: _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, _nullishCoalesce(r.brush, () => ( {}))),
1451
1451
  color: typeof r.color === "string" && /^#[0-9a-f]{6}$/i.test(r.color) ? r.color.toLowerCase() : "#000000",
1452
1452
  points,
1453
1453
  seed: finite2(r.seed) ? r.seed | 0 : 0
@@ -1503,7 +1503,7 @@ function varyStroke(stroke, m, v) {
1503
1503
  if (ps !== 1) q.pressure = Math.min(1, Math.max(0, (_nullishCoalesce(p.pressure, () => ( 1))) * ps));
1504
1504
  return q;
1505
1505
  });
1506
- const brush = s !== 1 ? _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, { ...stroke.brush, tip: { ...stroke.brush.tip, size: stroke.brush.tip.size * s } }) : stroke.brush;
1506
+ const brush = s !== 1 ? _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { ...stroke.brush, tip: { ...stroke.brush.tip, size: stroke.brush.tip.size * s } }) : stroke.brush;
1507
1507
  const out = { ...stroke, brush, points };
1508
1508
  if (stroke.paint && s !== 1) out.paint = _chunkEBDCRTZIcjs.scalePaintGradient.call(void 0, stroke.paint, s);
1509
1509
  if (_optionalChain([stroke, 'access', _57 => _57.copies, 'optionalAccess', _58 => _58.length])) {
@@ -1547,7 +1547,7 @@ function paperTile(paper, r, light) {
1547
1547
  const key = `${paperKey(paper, light)}|${r.x},${r.y},${r.width},${r.height}`;
1548
1548
  let t = tileCache.get(key);
1549
1549
  if (!t) {
1550
- t = _chunkJGKCC5OFcjs.renderPaper.call(void 0, paper, r, paperGrain(paper), light);
1550
+ t = _chunkYQ5C5BVKcjs.renderPaper.call(void 0, paper, r, paperGrain(paper), light);
1551
1551
  if (tileCache.size > 512) tileCache.delete(tileCache.keys().next().value);
1552
1552
  tileCache.set(key, t);
1553
1553
  }
@@ -1652,11 +1652,11 @@ function header(state, options) {
1652
1652
  return out;
1653
1653
  }
1654
1654
  function serializePaintDocument(state, options = {}) {
1655
- const { layers, assets } = _chunk32MMQYCQcjs.serializeLayers.call(void 0, state.layers);
1655
+ const { layers, assets } = _chunkPA3IMPPScjs.serializeLayers.call(void 0, state.layers);
1656
1656
  return { ...header(state, options), layers, assets };
1657
1657
  }
1658
1658
  async function serializePaintDocumentExternal(state, store, options = {}) {
1659
- const { layers, assets } = await _chunk32MMQYCQcjs.serializeLayersExternal.call(void 0, state.layers, store);
1659
+ const { layers, assets } = await _chunkPA3IMPPScjs.serializeLayersExternal.call(void 0, state.layers, store);
1660
1660
  return { ...header(state, options), layers, assets };
1661
1661
  }
1662
1662
  function paintLayersOnly(layers, problems) {
@@ -1691,9 +1691,9 @@ function deserializePaintDocument(raw) {
1691
1691
  }
1692
1692
  const problems = [];
1693
1693
  const canvas = normalizeCanvas({ width: r.width, height: r.height, dpi: _nullishCoalesce(r.dpi, () => ( void 0)) });
1694
- const paper = _chunkJGKCC5OFcjs.normalizePaper.call(void 0, _nullishCoalesce(r.paper, () => ( {})));
1694
+ const paper = _chunkYQ5C5BVKcjs.normalizePaper.call(void 0, _nullishCoalesce(r.paper, () => ( {})));
1695
1695
  const assets = r.assets && typeof r.assets === "object" ? r.assets : {};
1696
- const layers = paintLayersOnly(_chunk32MMQYCQcjs.deserializeLayers.call(void 0, r.layers, { assets, problems }), problems);
1696
+ const layers = paintLayersOnly(_chunkPA3IMPPScjs.deserializeLayers.call(void 0, r.layers, { assets, problems }), problems);
1697
1697
  const wanted = typeof r.activeLayerId === "string" ? r.activeLayerId : null;
1698
1698
  const activeLayerId = wanted && _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, wanted) ? wanted : _nullishCoalesce(_optionalChain([_chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers), 'access', _70 => _70.filter, 'call', _71 => _71((l) => l.type === "pixel"), 'access', _72 => _72.pop, 'call', _73 => _73(), 'optionalAccess', _74 => _74.id]), () => ( null));
1699
1699
  const wetEvents = Array.isArray(r.wetEvents) ? r.wetEvents.filter((e) => e && typeof e === "object" && Number.isInteger(e.clock) && typeof e.kind === "string") : [];
@@ -1709,7 +1709,7 @@ async function deserializePaintDocumentAsync(raw, store) {
1709
1709
  if (!raw || typeof raw !== "object") throw new Error("Not a paint document: expected a JSON object.");
1710
1710
  const r = raw;
1711
1711
  const problems = [];
1712
- const assets = await _chunk32MMQYCQcjs.resolveExternalAssets.call(void 0, _nullishCoalesce(r.assets, () => ( {})), store, problems);
1712
+ const assets = await _chunkPA3IMPPScjs.resolveExternalAssets.call(void 0, _nullishCoalesce(r.assets, () => ( {})), store, problems);
1713
1713
  const loaded = deserializePaintDocument({ ...r, assets });
1714
1714
  return { ...loaded, problems: [...problems, ...loaded.problems] };
1715
1715
  }
@@ -1786,13 +1786,13 @@ function viewPenToDocument(view, p) {
1786
1786
 
1787
1787
  // src/paint-editor/input.ts
1788
1788
  function samplePressure(e) {
1789
- return _chunkGNK7SESQcjs.pointerPressure.call(void 0, e);
1789
+ return _chunkV7GWZIZKcjs.pointerPressure.call(void 0, e);
1790
1790
  }
1791
1791
  function pointerToPenPoint(e, x, y, view) {
1792
1792
  const p = { x, y, pressure: samplePressure(e) };
1793
1793
  if (typeof e.timeStamp === "number" && Number.isFinite(e.timeStamp)) p.t = e.timeStamp;
1794
1794
  if (e.pointerType !== "pen") return p;
1795
- const o = _chunkJGKCC5OFcjs.penOrientation.call(void 0, {
1795
+ const o = _chunkYQ5C5BVKcjs.penOrientation.call(void 0, {
1796
1796
  x,
1797
1797
  y,
1798
1798
  altitude: typeof e.altitudeAngle === "number" ? e.altitudeAngle : void 0,
@@ -1856,7 +1856,7 @@ function downloadBytes(bytes, fileName, mimeType) {
1856
1856
 
1857
1857
  // src/paint-editor/wet.ts
1858
1858
  var STROKE_WATER = 0.9;
1859
- var STROKE_MASS = _chunkGNK7SESQcjs.PIGMENT_UNIT * 2.5;
1859
+ var STROKE_MASS = _chunkV7GWZIZKcjs.PIGMENT_UNIT * 2.5;
1860
1860
  var COVERAGE_STEPS = 4096;
1861
1861
  function union2(a, b) {
1862
1862
  if (!a) return { ...b };
@@ -1871,7 +1871,7 @@ function wetPaperInput(paper) {
1871
1871
  absorption: paper.absorption,
1872
1872
  permeability: paper.permeability,
1873
1873
  roughness: flat ? 0 : paper.roughness,
1874
- color: _chunkJGKCC5OFcjs.hexToRgb8.call(void 0, paper.color),
1874
+ color: _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, paper.color),
1875
1875
  heightAt: flat ? () => 0.5 : (x, y) => grain.at(x, y)
1876
1876
  };
1877
1877
  }
@@ -1879,20 +1879,20 @@ var WetStrokeDriver = (_class5 = class {
1879
1879
  constructor(init) {;_class5.prototype.__init35.call(this);_class5.prototype.__init36.call(this);_class5.prototype.__init37.call(this);_class5.prototype.__init38.call(this);_class5.prototype.__init39.call(this);_class5.prototype.__init40.call(this);_class5.prototype.__init41.call(this);_class5.prototype.__init42.call(this);_class5.prototype.__init43.call(this);_class5.prototype.__init44.call(this);_class5.prototype.__init45.call(this);_class5.prototype.__init46.call(this);
1880
1880
  this.init = init;
1881
1881
  const brush = init.brush;
1882
- this.smoother = new (0, _chunkJGKCC5OFcjs.PenSmoother)(brush.tip.smoothing, brush.pressureSmoothing);
1883
- const copies = init.copies.length ? init.copies : [_chunkJGKCC5OFcjs.IDENTITY_COPY];
1882
+ this.smoother = new (0, _chunkYQ5C5BVKcjs.PenSmoother)(brush.tip.smoothing, brush.pressureSmoothing);
1883
+ const copies = init.copies.length ? init.copies : [_chunkYQ5C5BVKcjs.IDENTITY_COPY];
1884
1884
  const wet = brush.wet;
1885
1885
  const spacing = Math.max(0.02, brush.tip.spacing);
1886
1886
  const perDab = Math.min(1, spacing * 1.2);
1887
1887
  const thin = wet.thinner;
1888
- this.medium = new (0, _chunkGNK7SESQcjs.WetMedium)(init.world, init.laneId, {
1888
+ this.medium = new (0, _chunkV7GWZIZKcjs.WetMedium)(init.world, init.laneId, {
1889
1889
  water: STROKE_WATER * Math.min(1, wet.water * (1 + thin)) * perDab,
1890
1890
  mass: STROKE_MASS * wet.pigment * (1 - 0.6 * thin) * perDab,
1891
1891
  body: wet.body * (1 - thin)
1892
1892
  });
1893
1893
  const rates = _chunkEBDCRTZIcjs.exchangeRates.call(void 0, brush.behavior.pickup, brush.behavior.mix, wet.load, brush.behavior.mixing);
1894
1894
  this.states = copies.map((c, i) => ({
1895
- walker: new (0, _chunkJGKCC5OFcjs.PenDabWalker)(brush, init.seed + i * 7919 | 0, c.linear),
1895
+ walker: new (0, _chunkYQ5C5BVKcjs.PenDabWalker)(brush, init.seed + i * 7919 | 0, c.linear),
1896
1896
  exchange: wet.tool === "paint" ? new (0, _chunkEBDCRTZIcjs.PaintExchange)(rates, init.load) : null,
1897
1897
  last: null
1898
1898
  }));
@@ -2059,7 +2059,7 @@ var WetStrokeDriver = (_class5 = class {
2059
2059
  }, _class5);
2060
2060
  var WET_MEDIUM_PARAMS = {
2061
2061
  watercolor: {},
2062
- gouache: { viscosity: 0.45, edgeDarkening: 0.15, granulation: 0.1, bloom: 0.1, bleed: 0.15, pigmentWeight: 0.5 },
2062
+ gouache: { viscosity: 0.45, evaporation: 0.1, edgeDarkening: 0.15, granulation: 0.1, bloom: 0.1, bleed: 0.15, pickup: 0.5, pigmentWeight: 0.5 },
2063
2063
  oil: { viscosity: 0.95, evaporation: 0.03, edgeDarkening: 0, granulation: 0, bloom: 0, bleed: 0.08, pickup: 0.6, fixture: 0.02, pigmentWeight: 0.8 }
2064
2064
  };
2065
2065
  var WET_GPU_MODES = ["auto", "off"];
@@ -2077,7 +2077,7 @@ var PaintWetLayers = (_class6 = class {
2077
2077
 
2078
2078
 
2079
2079
  __init47() {this.world = null}
2080
- __init48() {this.tilt = { ..._chunkGNK7SESQcjs.FLAT }}
2080
+ __init48() {this.tilt = { ..._chunkV7GWZIZKcjs.FLAT }}
2081
2081
  __init49() {this.settings = /* @__PURE__ */ new Map()}
2082
2082
  __init50() {this.paused = false}
2083
2083
  /** Wet strokes dry as soon as they end (one undo step with the stroke). */
@@ -2101,8 +2101,8 @@ var PaintWetLayers = (_class6 = class {
2101
2101
  /** Starts the GPU engine for the world (once; it may turn out unavailable). */
2102
2102
  startGpu() {
2103
2103
  if (this.gpuMode === "off" || this.gpu || this.gpuStarting || this.gpuSupport) return;
2104
- const provider = this.options.gpuProvider === void 0 ? _chunkGNK7SESQcjs.findWebGpu.call(void 0, ) : this.options.gpuProvider;
2105
- this.gpuStarting = _chunkGNK7SESQcjs.createWetGpuEngine.call(void 0, provider).then(({ engine, support }) => {
2104
+ const provider = this.options.gpuProvider === void 0 ? _chunkV7GWZIZKcjs.findWebGpu.call(void 0, ) : this.options.gpuProvider;
2105
+ this.gpuStarting = _chunkV7GWZIZKcjs.createWetGpuEngine.call(void 0, provider).then(({ engine, support }) => {
2106
2106
  this.gpuSupport = support;
2107
2107
  if (!engine) return;
2108
2108
  if (this.gpuMode === "off" || !this.world) {
@@ -2158,7 +2158,7 @@ var PaintWetLayers = (_class6 = class {
2158
2158
  this.dropWorld();
2159
2159
  }
2160
2160
  if (!this.world) {
2161
- this.world = new (0, _chunkGNK7SESQcjs.WetWorld)(width, height, wetPaperInput(this.host.paper()), { kernel: this.options.kernel, threads: this.options.threads });
2161
+ this.world = new (0, _chunkV7GWZIZKcjs.WetWorld)(width, height, wetPaperInput(this.host.paper()), { kernel: this.options.kernel, threads: this.options.threads });
2162
2162
  this.world.setTilt(this.tilt);
2163
2163
  this.world.gpuMinTiles = this.gpuMinTiles;
2164
2164
  if (this.gpu) this.world.attachGpu(this.gpu);
@@ -2188,7 +2188,7 @@ var PaintWetLayers = (_class6 = class {
2188
2188
  settingsOf(layerId, medium = "watercolor") {
2189
2189
  let s = this.settings.get(layerId);
2190
2190
  if (!s) {
2191
- s = { params: _chunkGNK7SESQcjs.normalizeWetParams.call(void 0, WET_MEDIUM_PARAMS[medium], _chunkGNK7SESQcjs.DEFAULT_WET_PARAMS), flow: { ..._chunkGNK7SESQcjs.DEFAULT_FLOW } };
2191
+ s = { params: _chunkV7GWZIZKcjs.normalizeWetParams.call(void 0, WET_MEDIUM_PARAMS[medium], _chunkV7GWZIZKcjs.DEFAULT_WET_PARAMS), flow: { ..._chunkV7GWZIZKcjs.DEFAULT_FLOW } };
2192
2192
  this.settings.set(layerId, s);
2193
2193
  }
2194
2194
  return s;
@@ -2201,27 +2201,27 @@ var PaintWetLayers = (_class6 = class {
2201
2201
  const s = this.settingsOf(layerId, medium);
2202
2202
  w.ensureLane(layerId, { params: s.params, base });
2203
2203
  const { width, height } = this.host.canvas();
2204
- if (s.flow.kind !== "none") w.setFlow(layerId, _chunkGNK7SESQcjs.flowField.call(void 0, s.flow, width, height), s.flow.strength);
2204
+ if (s.flow.kind !== "none") w.setFlow(layerId, _chunkV7GWZIZKcjs.flowField.call(void 0, s.flow, width, height), s.flow.strength);
2205
2205
  }
2206
2206
  return w;
2207
2207
  }
2208
2208
  setParams(layerId, update) {
2209
2209
  const s = this.settingsOf(layerId);
2210
- s.params = _chunkGNK7SESQcjs.normalizeWetParams.call(void 0, update, s.params);
2210
+ s.params = _chunkV7GWZIZKcjs.normalizeWetParams.call(void 0, update, s.params);
2211
2211
  if (_optionalChain([this, 'access', _100 => _100.world, 'optionalAccess', _101 => _101.hasLane, 'call', _102 => _102(layerId)])) this.world.setParams(layerId, s.params);
2212
2212
  return { ...s.params };
2213
2213
  }
2214
2214
  setFlow(layerId, update) {
2215
2215
  const s = this.settingsOf(layerId);
2216
- s.flow = _chunkGNK7SESQcjs.normalizeFlow.call(void 0, update, s.flow);
2216
+ s.flow = _chunkV7GWZIZKcjs.normalizeFlow.call(void 0, update, s.flow);
2217
2217
  if (_optionalChain([this, 'access', _103 => _103.world, 'optionalAccess', _104 => _104.hasLane, 'call', _105 => _105(layerId)])) {
2218
2218
  const { width, height } = this.host.canvas();
2219
- this.world.setFlow(layerId, _chunkGNK7SESQcjs.flowField.call(void 0, s.flow, width, height), s.flow.strength);
2219
+ this.world.setFlow(layerId, _chunkV7GWZIZKcjs.flowField.call(void 0, s.flow, width, height), s.flow.strength);
2220
2220
  }
2221
2221
  return { ...s.flow };
2222
2222
  }
2223
2223
  setTilt(update) {
2224
- this.tilt = _chunkGNK7SESQcjs.normalizeTilt.call(void 0, update, this.tilt);
2224
+ this.tilt = _chunkV7GWZIZKcjs.normalizeTilt.call(void 0, update, this.tilt);
2225
2225
  _optionalChain([this, 'access', _106 => _106.world, 'optionalAccess', _107 => _107.setTilt, 'call', _108 => _108(this.tilt)]);
2226
2226
  return { ...this.tilt };
2227
2227
  }
@@ -2468,8 +2468,8 @@ var PaintWetLayers = (_class6 = class {
2468
2468
  }
2469
2469
  }, _class6);
2470
2470
  function wetPigmentOf(hex, body) {
2471
- const [r, g, b] = _chunkJGKCC5OFcjs.hexToRgb8.call(void 0, hex);
2472
- return Array.from(_chunkGNK7SESQcjs.pigmentOf.call(void 0, [r / 255, g / 255, b / 255], body));
2471
+ const [r, g, b] = _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, hex);
2472
+ return Array.from(_chunkV7GWZIZKcjs.pigmentOf.call(void 0, [r / 255, g / 255, b / 255], body));
2473
2473
  }
2474
2474
 
2475
2475
  // src/paint-editor/thumbnails.ts
@@ -2477,16 +2477,16 @@ var thumbWorld = null;
2477
2477
  function paintWetTestStroke(brush, paper, color, width, height) {
2478
2478
  if (!thumbWorld || thumbWorld.width !== width || thumbWorld.height !== height) {
2479
2479
  _optionalChain([thumbWorld, 'optionalAccess', _140 => _140.destroy, 'call', _141 => _141()]);
2480
- thumbWorld = new (0, _chunkGNK7SESQcjs.WetWorld)(width, height, wetPaperInput(paper), { kernel: "typescript", threads: 0 });
2480
+ thumbWorld = new (0, _chunkV7GWZIZKcjs.WetWorld)(width, height, wetPaperInput(paper), { kernel: "typescript", threads: 0 });
2481
2481
  } else thumbWorld.setPaper(wetPaperInput(paper));
2482
2482
  const w = thumbWorld;
2483
2483
  if (w.hasLane("thumb")) w.removeLane("thumb");
2484
2484
  w.ensureLane("thumb");
2485
- const [r, g, b] = _chunkJGKCC5OFcjs.hexToRgb8.call(void 0, color);
2485
+ const [r, g, b] = _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, color);
2486
2486
  if (brush.wet.tool !== "paint" && brush.wet.tool !== "water") {
2487
2487
  const half = Math.ceil(height / 2);
2488
- w.paint("thumb", { x: 0, y: 0, width, height: half }, null, 0.4, Array.from(_chunkGNK7SESQcjs.pigmentOf.call(void 0, [r / 255, g / 255, b / 255], 0), (v) => v * 0.05));
2489
- w.paint("thumb", { x: 0, y: half, width, height: height - half }, null, 0.4, Array.from(_chunkGNK7SESQcjs.pigmentOf.call(void 0, [232 / 255, 196 / 255, 64 / 255], 0), (v) => v * 0.05));
2488
+ w.paint("thumb", { x: 0, y: 0, width, height: half }, null, 0.4, Array.from(_chunkV7GWZIZKcjs.pigmentOf.call(void 0, [r / 255, g / 255, b / 255], 0), (v) => v * 0.05));
2489
+ w.paint("thumb", { x: 0, y: half, width, height: height - half }, null, 0.4, Array.from(_chunkV7GWZIZKcjs.pigmentOf.call(void 0, [232 / 255, 196 / 255, 64 / 255], 0), (v) => v * 0.05));
2490
2490
  }
2491
2491
  const driver = new WetStrokeDriver({
2492
2492
  world: w,
@@ -2496,9 +2496,9 @@ function paintWetTestStroke(brush, paper, color, width, height) {
2496
2496
  load: brushLoadForStroke(brush, _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD, [r / 255, g / 255, b / 255]),
2497
2497
  grain: paperGrain(paper),
2498
2498
  paperDepth: paper.depth,
2499
- paperColor: _chunkJGKCC5OFcjs.hexToRgb8.call(void 0, paper.color),
2499
+ paperColor: _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, paper.color),
2500
2500
  seed: 7,
2501
- copies: [_chunkJGKCC5OFcjs.IDENTITY_COPY]
2501
+ copies: [_chunkYQ5C5BVKcjs.IDENTITY_COPY]
2502
2502
  });
2503
2503
  driver.push(thumbnailStroke(width, height));
2504
2504
  driver.finish();
@@ -2518,7 +2518,7 @@ function thumbnailStroke(width, height) {
2518
2518
  return pts;
2519
2519
  }
2520
2520
  function paintTestStroke(surface, brush, paper, color, width, height) {
2521
- const [r, g, b] = _chunkJGKCC5OFcjs.hexToRgb8.call(void 0, color);
2521
+ const [r, g, b] = _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, color);
2522
2522
  let result = surface;
2523
2523
  let thick = null;
2524
2524
  const session = new PaintStrokeSession(
@@ -2537,13 +2537,13 @@ function paintTestStroke(surface, brush, paper, color, width, height) {
2537
2537
  lockTransparency: false,
2538
2538
  brush,
2539
2539
  color: [r, g, b, 255],
2540
- background: [..._chunkJGKCC5OFcjs.hexToRgb8.call(void 0, paper.color), 255],
2540
+ background: [..._chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, paper.color), 255],
2541
2541
  grain: paperGrain(paper),
2542
2542
  paperDepth: paper.depth,
2543
2543
  seed: 7,
2544
2544
  colorHex: color,
2545
2545
  affineCopies: [],
2546
- copies: [_chunkJGKCC5OFcjs.IDENTITY_COPY],
2546
+ copies: [_chunkYQ5C5BVKcjs.IDENTITY_COPY],
2547
2547
  mixerLoad: brushLoadForStroke(brush, _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD, [r / 255, g / 255, b / 255]),
2548
2548
  thick: brush.engine === "impasto" ? { channels: emptyThickChannels() } : void 0,
2549
2549
  sticker: brush.engine === "sticker" ? { nextId: 1 } : void 0
@@ -2557,8 +2557,8 @@ function renderBrushThumbnail(brush, options) {
2557
2557
  const width = Math.max(16, Math.min(512, Math.round(_nullishCoalesce(options.width, () => ( 160)))));
2558
2558
  const height = Math.max(16, Math.min(512, Math.round(_nullishCoalesce(options.height, () => ( 48)))));
2559
2559
  const maxSize = height * 0.42;
2560
- const b = brush.tip.size > maxSize ? _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, { tip: { ...brush.tip, size: maxSize } }, brush) : brush;
2561
- const rgba = [..._chunkJGKCC5OFcjs.hexToRgb8.call(void 0, options.color), 255];
2560
+ const b = brush.tip.size > maxSize ? _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { tip: { ...brush.tip, size: maxSize } }, brush) : brush;
2561
+ const rgba = [..._chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, options.color), 255];
2562
2562
  let surface = _chunkCWM3CUUXcjs.emptySurface.call(void 0, 4);
2563
2563
  if (b.engine === "eraser") {
2564
2564
  surface = _chunkCWM3CUUXcjs.fillRect.call(void 0, surface, { x: 0, y: 0, width, height }, rgba);
@@ -2834,7 +2834,7 @@ var DEFAULT_SWATCHES = [
2834
2834
  // src/paint-editor/mixing-pad.ts
2835
2835
  var MIXING_PAD_WIDTH = 360;
2836
2836
  var MIXING_PAD_HEIGHT = 220;
2837
- var PAD_PAINT = _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, {
2837
+ var PAD_PAINT = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, {
2838
2838
  id: "pad-paint",
2839
2839
  name: "Pad paint",
2840
2840
  category: "mixer",
@@ -2842,7 +2842,7 @@ var PAD_PAINT = _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, {
2842
2842
  tip: { size: 28, hardness: 0.75, spacing: 0.1, opacity: 1, flow: 0.7, pressureSize: false, pressureOpacity: false },
2843
2843
  mixer: { wet: 0.45, load: 1, mix: 0.4, loadEachStroke: true, cleanEachStroke: true, mixing: "pigment" }
2844
2844
  });
2845
- var PAD_KNIFE = _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, {
2845
+ var PAD_KNIFE = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, {
2846
2846
  id: "pad-knife",
2847
2847
  name: "Palette knife",
2848
2848
  category: "smudge",
@@ -2852,7 +2852,7 @@ var PAD_KNIFE = _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, {
2852
2852
  // A knife drags streaks of paint and folds them into each other, mixing them as pigment.
2853
2853
  smudge: { strength: 0.6, length: 0.8, mixing: "pigment" }
2854
2854
  });
2855
- var PAD_BLOB = _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, {
2855
+ var PAD_BLOB = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, {
2856
2856
  id: "pad-blob",
2857
2857
  name: "Pad blob",
2858
2858
  category: "custom",
@@ -2874,12 +2874,12 @@ var MixingPad = (_class8 = class {constructor() { _class8.prototype.__init65.cal
2874
2874
  }
2875
2875
  }
2876
2876
  let brush = options.tool === "knife" ? PAD_KNIFE : PAD_PAINT;
2877
- if (options.size !== void 0) brush = _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, { tip: { ...brush.tip, size: options.size } }, brush);
2877
+ if (options.size !== void 0) brush = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { tip: { ...brush.tip, size: options.size } }, brush);
2878
2878
  return this.run(brush, points, options.color);
2879
2879
  }
2880
2880
  /** Paints `points` with `brush` in `color` on the pad. */
2881
2881
  run(brush, points, color) {
2882
- const [r, g, b] = _chunkJGKCC5OFcjs.hexToRgb8.call(void 0, color);
2882
+ const [r, g, b] = _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, color);
2883
2883
  let result = null;
2884
2884
  const session = new PaintStrokeSession(
2885
2885
  { update: () => {
@@ -2897,7 +2897,7 @@ var MixingPad = (_class8 = class {constructor() { _class8.prototype.__init65.cal
2897
2897
  seed: 1,
2898
2898
  colorHex: color,
2899
2899
  affineCopies: [],
2900
- copies: [_chunkJGKCC5OFcjs.IDENTITY_COPY],
2900
+ copies: [_chunkYQ5C5BVKcjs.IDENTITY_COPY],
2901
2901
  mixerLoad: brushLoadForStroke(brush, _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD, [r / 255, g / 255, b / 255])
2902
2902
  }
2903
2903
  );
@@ -2973,10 +2973,10 @@ var MixingPad = (_class8 = class {constructor() { _class8.prototype.__init65.cal
2973
2973
  const off = used.length === 1 ? 0 : 0.45 * R;
2974
2974
  const x = Math.min(cx + R - r, Math.max(cx - R + r, cx + Math.cos(a) * off));
2975
2975
  const y = Math.min(cy + R - r, Math.max(cy - R + r, cy + Math.sin(a) * off));
2976
- const blob = _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, { tip: { ...PAD_BLOB.tip, size: Math.max(2, 2 * r) } }, PAD_BLOB);
2976
+ const blob = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { tip: { ...PAD_BLOB.tip, size: Math.max(2, 2 * r) } }, PAD_BLOB);
2977
2977
  this.run(blob, [{ x, y }], p.color.toLowerCase());
2978
2978
  });
2979
- const knife = _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, { tip: { ...PAD_KNIFE.tip, size: Math.max(12, R * 0.5) } }, PAD_KNIFE);
2979
+ const knife = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { tip: { ...PAD_KNIFE.tip, size: Math.max(12, R * 0.5) } }, PAD_KNIFE);
2980
2980
  for (let k = 0; k < passes; k++) {
2981
2981
  const stir = [];
2982
2982
  const turns = 1.6;
@@ -2988,10 +2988,10 @@ var MixingPad = (_class8 = class {constructor() { _class8.prototype.__init65.cal
2988
2988
  this.run(knife, stir, "#000000");
2989
2989
  }
2990
2990
  const mixed = _chunkCWM3CUUXcjs.mixPigments.call(void 0,
2991
- paints.map((p) => _chunkJGKCC5OFcjs.hexToRgb8.call(void 0, p.color).map((v) => v / 255)),
2991
+ paints.map((p) => _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, p.color).map((v) => v / 255)),
2992
2992
  paints.map((p) => p.parts)
2993
2993
  );
2994
- const core = _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, { tip: { ...PAD_BLOB.tip, size: R * 1.1, hardness: 0.55 } }, PAD_BLOB);
2994
+ const core = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { tip: { ...PAD_BLOB.tip, size: R * 1.1, hardness: 0.55 } }, PAD_BLOB);
2995
2995
  const hex = "#" + mixed.map((v) => Math.round(v * 255).toString(16).padStart(2, "0")).join("");
2996
2996
  this.run(core, [{ x: cx, y: cy }], hex);
2997
2997
  return { color: this.pick(cx, cy, 2), bounds };
@@ -3348,7 +3348,7 @@ function parseColor(value, what = "color") {
3348
3348
  return value.trim().toLowerCase();
3349
3349
  }
3350
3350
  function rgbaOf(hex) {
3351
- const [r, g, b] = _chunkJGKCC5OFcjs.hexToRgb8.call(void 0, hex);
3351
+ const [r, g, b] = _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, hex);
3352
3352
  return [r, g, b, 255];
3353
3353
  }
3354
3354
  function rgbToHex(r, g, b) {
@@ -3417,9 +3417,9 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
3417
3417
  constructor(options = {}) {;_class10.prototype.__init72.call(this);_class10.prototype.__init73.call(this);_class10.prototype.__init74.call(this);_class10.prototype.__init75.call(this);_class10.prototype.__init76.call(this);_class10.prototype.__init77.call(this);_class10.prototype.__init78.call(this);_class10.prototype.__init79.call(this);_class10.prototype.__init80.call(this);_class10.prototype.__init81.call(this);_class10.prototype.__init82.call(this);_class10.prototype.__init83.call(this);_class10.prototype.__init84.call(this);_class10.prototype.__init85.call(this);_class10.prototype.__init86.call(this);_class10.prototype.__init87.call(this);_class10.prototype.__init88.call(this);_class10.prototype.__init89.call(this);_class10.prototype.__init90.call(this);_class10.prototype.__init91.call(this);_class10.prototype.__init92.call(this);_class10.prototype.__init93.call(this);_class10.prototype.__init94.call(this);_class10.prototype.__init95.call(this);_class10.prototype.__init96.call(this);_class10.prototype.__init97.call(this);_class10.prototype.__init98.call(this);_class10.prototype.__init99.call(this);_class10.prototype.__init100.call(this);_class10.prototype.__init101.call(this);_class10.prototype.__init102.call(this);_class10.prototype.__init103.call(this);_class10.prototype.__init104.call(this);_class10.prototype.__init105.call(this);_class10.prototype.__init106.call(this);_class10.prototype.__init107.call(this);_class10.prototype.__init108.call(this);_class10.prototype.__init109.call(this);
3418
3418
  this.historyLimit = Math.max(1, _nullishCoalesce(options.historyLimit, () => ( 200)));
3419
3419
  this.doc = createPaintDocument({ width: options.width, height: options.height, dpi: options.dpi, paper: this.resolvePaper(options.paper) });
3420
- this.userBrushes = (_nullishCoalesce(options.brushes, () => ( []))).map((b) => _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, { ...b, builtin: false }));
3421
- const start = _nullishCoalesce(this.findBrush(_nullishCoalesce(options.brushId, () => ( _chunkJGKCC5OFcjs.DEFAULT_BRUSH_ID))), () => ( this.findBrush(_chunkJGKCC5OFcjs.DEFAULT_BRUSH_ID)));
3422
- this.brush = _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, start);
3420
+ this.userBrushes = (_nullishCoalesce(options.brushes, () => ( []))).map((b) => _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { ...b, builtin: false }));
3421
+ const start = _nullishCoalesce(this.findBrush(_nullishCoalesce(options.brushId, () => ( _chunkYQ5C5BVKcjs.DEFAULT_BRUSH_ID))), () => ( this.findBrush(_chunkYQ5C5BVKcjs.DEFAULT_BRUSH_ID)));
3422
+ this.brush = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, start);
3423
3423
  this.color = options.color ? parseColor(options.color) : "#1f2937";
3424
3424
  this.hand = options.hand === "left" ? "left" : "right";
3425
3425
  this.encodeImage = options.encodeImage;
@@ -3466,7 +3466,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
3466
3466
  this.cached = {
3467
3467
  document: this.doc,
3468
3468
  brush: this.brush,
3469
- brushes: this.library ??= [..._chunkJGKCC5OFcjs.BUILTIN_BRUSHES, ...this.userBrushes],
3469
+ brushes: this.library ??= [..._chunkYQ5C5BVKcjs.BUILTIN_BRUSHES, ...this.userBrushes],
3470
3470
  color: this.color,
3471
3471
  secondaryColor: this.secondaryColor,
3472
3472
  paint: _nullishCoalesce(this.gradient, () => ( { type: "color", color: this.color })),
@@ -3657,7 +3657,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
3657
3657
  // --- Canvas and paper ----------------------------------------------------------
3658
3658
  resolvePaper(paper) {
3659
3659
  if (typeof paper === "string") {
3660
- const p = _chunkJGKCC5OFcjs.paperPreset.call(void 0, paper);
3660
+ const p = _chunkYQ5C5BVKcjs.paperPreset.call(void 0, paper);
3661
3661
  if (!p) throw new PaintEditorError(`Unknown paper "${paper}". Call list_papers for the ids.`);
3662
3662
  return p;
3663
3663
  }
@@ -3750,19 +3750,19 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
3750
3750
  this.requireIdle("changing the paper");
3751
3751
  let base = this.doc.paper;
3752
3752
  if (update.preset !== void 0 && update.preset !== this.doc.paper.preset) {
3753
- const p = _chunkJGKCC5OFcjs.paperPreset.call(void 0, update.preset);
3753
+ const p = _chunkYQ5C5BVKcjs.paperPreset.call(void 0, update.preset);
3754
3754
  if (!p) throw new PaintEditorError(`Unknown paper "${update.preset}". Call list_papers for the ids.`);
3755
3755
  base = p;
3756
3756
  }
3757
3757
  const { preset: _p, ...rest } = update;
3758
3758
  if (rest.color !== void 0) parseColor(rest.color, "paper color");
3759
- const paper = _chunkJGKCC5OFcjs.normalizePaper.call(void 0, { ...rest, preset: base.preset, offset: _nullishCoalesce(rest.offset, () => ( this.doc.paper.offset)) }, base);
3759
+ const paper = _chunkYQ5C5BVKcjs.normalizePaper.call(void 0, { ...rest, preset: base.preset, offset: _nullishCoalesce(rest.offset, () => ( this.doc.paper.offset)) }, base);
3760
3760
  const changedKeys = Object.keys(rest).filter((k) => k !== "name");
3761
3761
  if (changedKeys.length && update.preset === void 0) paper.preset = base.preset;
3762
3762
  if (this.wet.world) this.beginWetOp();
3763
3763
  this.commit("Paper", { ...this.doc, paper });
3764
3764
  this.wet.paperChanged();
3765
- return _chunkJGKCC5OFcjs.clonePaper.call(void 0, paper);
3765
+ return _chunkYQ5C5BVKcjs.clonePaper.call(void 0, paper);
3766
3766
  }
3767
3767
  // --- Layers --------------------------------------------------------------------
3768
3768
  getLayer(id) {
@@ -4275,12 +4275,12 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
4275
4275
  }
4276
4276
  // --- Brushes -------------------------------------------------------------------
4277
4277
  findBrush(id) {
4278
- return _nullishCoalesce(_chunkJGKCC5OFcjs.BUILTIN_BRUSHES.find((b) => b.id === id), () => ( this.userBrushes.find((b) => b.id === id)));
4278
+ return _nullishCoalesce(_chunkYQ5C5BVKcjs.BUILTIN_BRUSHES.find((b) => b.id === id), () => ( this.userBrushes.find((b) => b.id === id)));
4279
4279
  }
4280
4280
  /** A library brush by id (`undefined` when unknown). */
4281
4281
  getBrush(id) {
4282
4282
  const b = this.findBrush(id);
4283
- return b ? _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, b, b) : void 0;
4283
+ return b ? _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, b, b) : void 0;
4284
4284
  }
4285
4285
  requireBrush(id) {
4286
4286
  const b = this.findBrush(id);
@@ -4295,7 +4295,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
4295
4295
  const { id, ...changes } = update;
4296
4296
  const base = id !== void 0 ? this.requireBrush(id) : this.brush;
4297
4297
  if (changes.paint !== void 0 && changes.paint !== null) this.readStrokePaint(changes.paint);
4298
- const next = _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, { ...changes, id: base.id }, base);
4298
+ const next = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { ...changes, id: base.id }, base);
4299
4299
  if (base.builtin && !Object.keys(changes).length) next.builtin = true;
4300
4300
  else delete next.builtin;
4301
4301
  this.brush = next;
@@ -4304,10 +4304,10 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
4304
4304
  }
4305
4305
  /** Saves the active brush (or `brush`) into the user library under `id` / `name`. */
4306
4306
  saveBrush(options) {
4307
- if (!_chunkJGKCC5OFcjs.BRUSH_ID.test(options.id)) throw new PaintEditorError(`Brush id "${options.id}" is invalid; use lowercase letters, digits and dashes (e.g. "my-pencil").`);
4308
- if (_chunkJGKCC5OFcjs.BUILTIN_BRUSHES.some((b) => b.id === options.id)) throw new PaintEditorError(`"${options.id}" is a built-in brush; save under another id.`);
4309
- const source = options.brush ? _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, options.brush, this.brush) : this.brush;
4310
- const saved = _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, { ...source, id: options.id, name: _nullishCoalesce(options.name, () => ( source.name)) });
4307
+ if (!_chunkYQ5C5BVKcjs.BRUSH_ID.test(options.id)) throw new PaintEditorError(`Brush id "${options.id}" is invalid; use lowercase letters, digits and dashes (e.g. "my-pencil").`);
4308
+ if (_chunkYQ5C5BVKcjs.BUILTIN_BRUSHES.some((b) => b.id === options.id)) throw new PaintEditorError(`"${options.id}" is a built-in brush; save under another id.`);
4309
+ const source = options.brush ? _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, options.brush, this.brush) : this.brush;
4310
+ const saved = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { ...source, id: options.id, name: _nullishCoalesce(options.name, () => ( source.name)) });
4311
4311
  delete saved.builtin;
4312
4312
  const i = this.userBrushes.findIndex((b) => b.id === options.id);
4313
4313
  if (i >= 0) this.userBrushes[i] = saved;
@@ -4317,7 +4317,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
4317
4317
  return saved;
4318
4318
  }
4319
4319
  removeBrush(id) {
4320
- if (_chunkJGKCC5OFcjs.BUILTIN_BRUSHES.some((b) => b.id === id)) throw new PaintEditorError(`"${id}" is a built-in brush and cannot be removed.`);
4320
+ if (_chunkYQ5C5BVKcjs.BUILTIN_BRUSHES.some((b) => b.id === id)) throw new PaintEditorError(`"${id}" is a built-in brush and cannot be removed.`);
4321
4321
  const i = this.userBrushes.findIndex((b) => b.id === id);
4322
4322
  if (i < 0) throw new PaintEditorError(`Unknown brush "${id}". Call list_brushes for the ids.`);
4323
4323
  this.userBrushes.splice(i, 1);
@@ -4326,12 +4326,12 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
4326
4326
  }
4327
4327
  /** The user's saved brushes. */
4328
4328
  getUserBrushes() {
4329
- return this.userBrushes.map((b) => _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, b, b));
4329
+ return this.userBrushes.map((b) => _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, b, b));
4330
4330
  }
4331
4331
  /** A brush library file of the given brushes (default: the user's brushes). */
4332
4332
  exportBrushes(ids) {
4333
4333
  const list = ids ? ids.map((id) => this.requireBrush(id)) : this.userBrushes;
4334
- return { format: "pixerate-brushes", version: 1, brushes: list.map(_chunkJGKCC5OFcjs.brushToJSON) };
4334
+ return { format: "pixerate-brushes", version: 1, brushes: list.map(_chunkYQ5C5BVKcjs.brushToJSON) };
4335
4335
  }
4336
4336
  /**
4337
4337
  * Adds the brushes of a library file to the user library. A brush whose id is taken is skipped
@@ -4341,14 +4341,14 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
4341
4341
  const problems = [];
4342
4342
  let list;
4343
4343
  try {
4344
- list = _chunkJGKCC5OFcjs.parseBrushLibrary.call(void 0, file, problems);
4344
+ list = _chunkYQ5C5BVKcjs.parseBrushLibrary.call(void 0, file, problems);
4345
4345
  } catch (e) {
4346
4346
  throw new PaintEditorError(e.message);
4347
4347
  }
4348
4348
  const added = [];
4349
4349
  const skipped = [];
4350
4350
  for (const b of list) {
4351
- if (_chunkJGKCC5OFcjs.BUILTIN_BRUSHES.some((x) => x.id === b.id)) {
4351
+ if (_chunkYQ5C5BVKcjs.BUILTIN_BRUSHES.some((x) => x.id === b.id)) {
4352
4352
  skipped.push(b.id);
4353
4353
  problems.push(`"${b.id}" is a built-in brush id; rename it to import it.`);
4354
4354
  continue;
@@ -4409,7 +4409,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
4409
4409
  * brush's gradient, else the editor's gradient paint. Erasers, blenders and smudges take none.
4410
4410
  */
4411
4411
  strokeGradient(init, brush, color) {
4412
- if (!_chunkJGKCC5OFcjs.brushTakesPaint.call(void 0, brush)) return null;
4412
+ if (!_chunkYQ5C5BVKcjs.brushTakesPaint.call(void 0, brush)) return null;
4413
4413
  let g = null;
4414
4414
  if (init.paint !== void 0) {
4415
4415
  const p = this.readStrokePaint(init.paint);
@@ -4455,7 +4455,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
4455
4455
  // --- Mixer Brush ---------------------------------------------------------------
4456
4456
  /** Fills the Mixer Brush reservoir with a colour (default the editor colour). */
4457
4457
  loadMixerBrush(color) {
4458
- const [r, g, b] = _chunkJGKCC5OFcjs.hexToRgb8.call(void 0, color === void 0 ? this.color : parseColor(color));
4458
+ const [r, g, b] = _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, color === void 0 ? this.color : parseColor(color));
4459
4459
  this.mixerLoad = _chunkEBDCRTZIcjs.loadMixer.call(void 0, this.mixerLoad, [r / 255, g / 255, b / 255]);
4460
4460
  this.emit([]);
4461
4461
  return this.mixerLoad;
@@ -4485,7 +4485,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
4485
4485
  // --- Strokes -------------------------------------------------------------------
4486
4486
  strokeBrush(init) {
4487
4487
  let brush = init.brushId !== void 0 ? this.requireBrush(init.brushId) : this.brush;
4488
- if (init.brush) brush = _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, { ...init.brush, id: brush.id }, brush);
4488
+ if (init.brush) brush = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { ...init.brush, id: brush.id }, brush);
4489
4489
  return brush;
4490
4490
  }
4491
4491
  /**
@@ -4525,7 +4525,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
4525
4525
  throw new PaintEditorError(`Layer "${layer.name}" is a sticker layer (its pixels are drawn from its stickers); paint on another layer (add_layer).`);
4526
4526
  }
4527
4527
  let wet;
4528
- if (_chunkJGKCC5OFcjs.isWetBrush.call(void 0, brush)) {
4528
+ if (_chunkYQ5C5BVKcjs.isWetBrush.call(void 0, brush)) {
4529
4529
  this.requireWetIdle("painting");
4530
4530
  if (layer.offset.x || layer.offset.y) {
4531
4531
  const moved = { ...layer, surface: _chunkCWM3CUUXcjs.translateSurface.call(void 0, layer.surface, layer.offset.x, layer.offset.y), offset: { x: 0, y: 0 } };
@@ -4533,14 +4533,14 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
4533
4533
  if (doc !== this.doc) doc = { ...doc, layers: _chunkHGTDMKNEcjs.mapLayer.call(void 0, doc.layers, layer.id, () => moved) };
4534
4534
  layer = moved;
4535
4535
  }
4536
- if (!this.wet.wetLayerIds().includes(layer.id) && this.wet.wetLayerIds().length >= _chunkGNK7SESQcjs.MAX_WET_LANES) {
4537
- throw new PaintEditorError(`At most ${_chunkGNK7SESQcjs.MAX_WET_LANES} layers can hold wet paint at once; dry one first (dry_paint).`);
4536
+ if (!this.wet.wetLayerIds().includes(layer.id) && this.wet.wetLayerIds().length >= _chunkV7GWZIZKcjs.MAX_WET_LANES) {
4537
+ throw new PaintEditorError(`At most ${_chunkV7GWZIZKcjs.MAX_WET_LANES} layers can hold wet paint at once; dry one first (dry_paint).`);
4538
4538
  }
4539
4539
  this.beginWetOp();
4540
4540
  const world = this.wet.ensureLane(layer.id, brush.wet.medium);
4541
4541
  const id = layer.id;
4542
4542
  const wetColor = init.color === void 0 ? this.color : parseColor(init.color);
4543
- const [r, g, b] = _chunkJGKCC5OFcjs.hexToRgb8.call(void 0, wetColor);
4543
+ const [r, g, b] = _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, wetColor);
4544
4544
  const wetGradient = this.strokeGradient(init, brush, wetColor);
4545
4545
  const load = _nullishCoalesce(init.load, () => ( brushLoadForStroke(brush, this.mixerLoad, [r / 255, g / 255, b / 255])));
4546
4546
  const seedW = _nullishCoalesce(init.seed, () => ( _chunkEBDCRTZIcjs.mix32.call(void 0, this.seedCounter * 2654435761 >>> 0) & 2147483647));
@@ -4553,7 +4553,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
4553
4553
  load,
4554
4554
  grain: paperGrain(doc.paper),
4555
4555
  paperDepth: doc.paper.depth,
4556
- paperColor: _chunkJGKCC5OFcjs.hexToRgb8.call(void 0, doc.paper.color),
4556
+ paperColor: _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, doc.paper.color),
4557
4557
  seed: seedW,
4558
4558
  copies: [IDENTITY_AFFINE, ...copiesW].map(affineCopy),
4559
4559
  mask: init.maskStencils ? this.stencilSelection(init.maskStencils) : init.stencils !== false ? this.stencilSelection() : null,
@@ -4610,7 +4610,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
4610
4610
  const stroke = {
4611
4611
  id: `s${this.strokeCounter++}`,
4612
4612
  layerId: session.layerId,
4613
- brush: _chunkJGKCC5OFcjs.brushToJSON.call(void 0, init.brush),
4613
+ brush: _chunkYQ5C5BVKcjs.brushToJSON.call(void 0, init.brush),
4614
4614
  color: init.colorHex,
4615
4615
  points: session.points.map((p) => ({ ...p })),
4616
4616
  seed: init.seed
@@ -4802,13 +4802,13 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
4802
4802
  let brush = v.brush;
4803
4803
  if (options.brushId !== void 0) {
4804
4804
  const b = this.requireBrush(options.brushId);
4805
- brush = _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, { tip: { ...b.tip, size: b.tip.size * (v.brush.tip.size / s.brush.tip.size) } }, b);
4805
+ brush = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { tip: { ...b.tip, size: b.tip.size * (v.brush.tip.size / s.brush.tip.size) } }, b);
4806
4806
  }
4807
4807
  const layerId = _nullishCoalesce(options.layerId, () => ( s.layerId));
4808
4808
  if (!_chunkHGTDMKNEcjs.findLayer.call(void 0, doc.layers, layerId)) throw new PaintEditorError(`Stroke "${s.id}" was painted on layer "${layerId}", which no longer exists; pass layerId to replay it elsewhere.`);
4809
4809
  let load = s.load;
4810
4810
  if (load && options.color !== void 0 && load.reservoir) {
4811
- const [r, g, b] = _chunkJGKCC5OFcjs.hexToRgb8.call(void 0, options.color);
4811
+ const [r, g, b] = _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, options.color);
4812
4812
  load = { ...load, reservoir: [r / 255, g / 255, b / 255] };
4813
4813
  }
4814
4814
  const paint = v.paint && options.color === void 0 ? { paint: v.paint } : {};
@@ -4953,7 +4953,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
4953
4953
  wetState() {
4954
4954
  const st = this.getState().wet;
4955
4955
  const backend = this.wet.backend();
4956
- return { ...st, layers: this.wet.wetLayerIds().map((id) => this.wet.info(id)), backend, message: _nullishCoalesce(_optionalChain([backend, 'optionalAccess', _252 => _252.message]), () => ( _chunkGNK7SESQcjs.wetSupport.call(void 0, ).message)), engine: this.wet.engineInfo() };
4956
+ return { ...st, layers: this.wet.wetLayerIds().map((id) => this.wet.info(id)), backend, message: _nullishCoalesce(_optionalChain([backend, 'optionalAccess', _252 => _252.message]), () => ( _chunkV7GWZIZKcjs.wetSupport.call(void 0, ).message)), engine: this.wet.engineInfo() };
4957
4957
  }
4958
4958
  /**
4959
4959
  * Engine B, the WebGPU accelerator for large wet areas: whether it may run, its state (`off`,
@@ -5026,7 +5026,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
5026
5026
  const amount = _nullishCoalesce(options.amount, () => ( 1));
5027
5027
  if (!(amount > 0 && amount <= 1)) throw new PaintEditorError(`amount ${amount} is out of range; use above 0 up to 1.`);
5028
5028
  const rect = _nullishCoalesce(this.checkRect(options.rect), () => ( { x: 0, y: 0, width: this.doc.canvas.width, height: this.doc.canvas.height }));
5029
- if (!this.wet.wetLayerIds().includes(l.id) && this.wet.wetLayerIds().length >= _chunkGNK7SESQcjs.MAX_WET_LANES) throw new PaintEditorError(`At most ${_chunkGNK7SESQcjs.MAX_WET_LANES} layers can hold wet paint at once; dry one first (dry_paint).`);
5029
+ if (!this.wet.wetLayerIds().includes(l.id) && this.wet.wetLayerIds().length >= _chunkV7GWZIZKcjs.MAX_WET_LANES) throw new PaintEditorError(`At most ${_chunkV7GWZIZKcjs.MAX_WET_LANES} layers can hold wet paint at once; dry one first (dry_paint).`);
5030
5030
  const before = this.doc;
5031
5031
  this.beginWetOp();
5032
5032
  const world = this.wet.ensureLane(l.id);
@@ -5222,7 +5222,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
5222
5222
  this.wet.reset();
5223
5223
  if (!raw || typeof raw !== "object") return;
5224
5224
  const r = raw;
5225
- this.wet.setTilt(_chunkGNK7SESQcjs.normalizeTilt.call(void 0, _nullishCoalesce(r.tilt, () => ( {}))));
5225
+ this.wet.setTilt(_chunkV7GWZIZKcjs.normalizeTilt.call(void 0, _nullishCoalesce(r.tilt, () => ( {}))));
5226
5226
  if (r.layers && typeof r.layers === "object") {
5227
5227
  for (const [id, v] of Object.entries(r.layers)) {
5228
5228
  if (!v || typeof v !== "object") {
@@ -5230,7 +5230,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
5230
5230
  continue;
5231
5231
  }
5232
5232
  const x = v;
5233
- this.wet.settings.set(id, { params: _chunkGNK7SESQcjs.normalizeWetParams.call(void 0, _nullishCoalesce(x.params, () => ( {}))), flow: _chunkGNK7SESQcjs.normalizeFlow.call(void 0, _nullishCoalesce(x.flow, () => ( {}))) });
5233
+ this.wet.settings.set(id, { params: _chunkV7GWZIZKcjs.normalizeWetParams.call(void 0, _nullishCoalesce(x.params, () => ( {}))), flow: _chunkV7GWZIZKcjs.normalizeFlow.call(void 0, _nullishCoalesce(x.flow, () => ( {}))) });
5234
5234
  }
5235
5235
  }
5236
5236
  }
@@ -5266,7 +5266,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
5266
5266
  const stickers = {};
5267
5267
  for (const [id, list] of Object.entries(ext.stickers)) {
5268
5268
  if (!_chunkHGTDMKNEcjs.findLayer.call(void 0, state.layers, id) || !Array.isArray(list)) continue;
5269
- const ok = list.filter((x) => x && typeof x.id === "string" && _chunkJGKCC5OFcjs.STAMP_KINDS.includes(x.stamp) && Number.isFinite(x.x) && Number.isFinite(x.y) && x.size > 0);
5269
+ const ok = list.filter((x) => x && typeof x.id === "string" && _chunkYQ5C5BVKcjs.STAMP_KINDS.includes(x.stamp) && Number.isFinite(x.x) && Number.isFinite(x.y) && x.size > 0);
5270
5270
  if (ok.length !== list.length) problems.push(`Some stickers of layer "${id}" could not be read; they were dropped.`);
5271
5271
  stickers[id] = ok.map((x) => ({ ...x }));
5272
5272
  }
@@ -5408,7 +5408,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
5408
5408
  return next.type === "group" ? { ...next, children: toStandard(next.children) } : next;
5409
5409
  });
5410
5410
  const layers = toStandard(dried);
5411
- const result = _chunk32MMQYCQcjs.exportPsd.call(void 0, { width, height, layers: [paperLayer, ...layers], merged, resolution: dpi });
5411
+ const result = _chunkPA3IMPPScjs.exportPsd.call(void 0, { width, height, layers: [paperLayer, ...layers], merged, resolution: dpi });
5412
5412
  for (const [mode, names] of changed) {
5413
5413
  const label = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.BLEND_MODES, 'access', _271 => _271.find, 'call', _272 => _272((m) => m.id === mode), 'optionalAccess', _273 => _273.label]), () => ( mode));
5414
5414
  const std = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.BLEND_MODES, 'access', _274 => _274.find, 'call', _275 => _275((m) => m.id === _chunkCWM3CUUXcjs.standardBlendMode.call(void 0, mode)), 'optionalAccess', _276 => _276.label]), () => ( _chunkCWM3CUUXcjs.standardBlendMode.call(void 0, mode)));
@@ -5659,7 +5659,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
5659
5659
  /** Replaces a layer's stickers and redraws its pixels from them (one undo step). */
5660
5660
  commitStickers(label, layer, stickers) {
5661
5661
  if (_chunkHGTDMKNEcjs.isLayerLocked.call(void 0, layer, "pixels")) throw new PaintEditorError(`Layer "${layer.name}" has its pixels locked; unlock it first.`);
5662
- const surface = _chunkJGKCC5OFcjs.stickerSurface.call(void 0, stickers);
5662
+ const surface = _chunkYQ5C5BVKcjs.stickerSurface.call(void 0, stickers);
5663
5663
  const doc = { ...this.doc, layers: _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.doc.layers, layer.id, () => ({ ...layer, surface, offset: { x: 0, y: 0 } })), stickers: { ..._nullishCoalesce(this.doc.stickers, () => ( {})), [layer.id]: stickers } };
5664
5664
  this.commit(label, this.withPaintEvent(doc, { kind: "stickers", layerId: layer.id, data: { stickers: stickers.map((s) => ({ ...s })) } }));
5665
5665
  }
@@ -5670,7 +5670,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
5670
5670
  if (i < 0) throw new PaintEditorError(`Layer "${layer.name}" has no sticker "${id}". Call list_stickers for the ids.`);
5671
5671
  let u;
5672
5672
  try {
5673
- u = _chunkJGKCC5OFcjs.normalizeStickerUpdate.call(void 0, update);
5673
+ u = _chunkYQ5C5BVKcjs.normalizeStickerUpdate.call(void 0, update);
5674
5674
  } catch (e) {
5675
5675
  throw new PaintEditorError(e.message);
5676
5676
  }
@@ -6236,7 +6236,7 @@ function createPaintStickerTools(c) {
6236
6236
  properties: {
6237
6237
  layerId: LAYER_ID,
6238
6238
  id: { type: "string", description: "Sticker id from list_stickers." },
6239
- stamp: { type: "string", enum: [..._chunkJGKCC5OFcjs.STAMP_KINDS], description: "Another stamp." },
6239
+ stamp: { type: "string", enum: [..._chunkYQ5C5BVKcjs.STAMP_KINDS], description: "Another stamp." },
6240
6240
  x: { type: "number", description: "Centre x in document pixels." },
6241
6241
  y: { type: "number", description: "Centre y in document pixels." },
6242
6242
  size: { type: "number", minimum: 2, maximum: 2048, description: "Diameter in pixels." },
@@ -6824,7 +6824,7 @@ function createPaintWetTools(c) {
6824
6824
  type: "object",
6825
6825
  properties: {
6826
6826
  layerId: LAYER_ID2,
6827
- kind: { type: "string", enum: [..._chunkGNK7SESQcjs.WET_FLOW_KINDS], description: "none, linear, swirl, radial or turbulent." },
6827
+ kind: { type: "string", enum: [..._chunkV7GWZIZKcjs.WET_FLOW_KINDS], description: "none, linear, swirl, radial or turbulent." },
6828
6828
  strength: UNIT("How hard it pushes, 0..1 (1 is about a 25\xB0 tilt; default 0.5)."),
6829
6829
  angle: { type: "number", minimum: -360, maximum: 360, description: "linear: direction in degrees clockwise from canvas down (default 0)." },
6830
6830
  center: {
@@ -7100,7 +7100,7 @@ var BEHAVIOR = {
7100
7100
  type: "object",
7101
7101
  description: "Multi-coloured brush (the older form of paint, the brush's own gradient: tip is across-tip, dab is distance in dabs or random). Read back from paint when it has a multi-colour equivalent. Missing fields keep their current values.",
7102
7102
  properties: {
7103
- mode: { type: "string", enum: [..._chunkJGKCC5OFcjs.MULTI_COLOR_MODES], description: "off; tip: the colours lie side by side across the tip (stripes along the stroke, like a brush loaded with several paints); dab: the colour changes along the stroke." },
7103
+ mode: { type: "string", enum: [..._chunkYQ5C5BVKcjs.MULTI_COLOR_MODES], description: "off; tip: the colours lie side by side across the tip (stripes along the stroke, like a brush loaded with several paints); dab: the colour changes along the stroke." },
7104
7104
  colors: { type: "array", maxItems: 8, items: { ...COLOR3 }, description: "2..8 colours #rrggbb; fewer than 2 uses the paint colour and the secondary colour." },
7105
7105
  order: { type: "string", enum: ["sequence", "random"], description: "dab mode: sequence runs through the colours in order, blending between them; random picks one per run of dabs (seeded)." },
7106
7106
  length: { type: "integer", minimum: 1, maximum: 500, description: "dab mode: dabs per colour (default 12)." },
@@ -7141,10 +7141,10 @@ var WET_BRUSH = {
7141
7141
  properties: {
7142
7142
  tool: {
7143
7143
  type: "string",
7144
- enum: [..._chunkJGKCC5OFcjs.WET_TOOLS],
7144
+ enum: [..._chunkYQ5C5BVKcjs.WET_TOOLS],
7145
7145
  description: "paint: water and pigment (picks up and mixes wet paint by behavior.pickup / mix); water: clear water (with rewet it lifts dried paint); dry: a hair dryer, takes water; blow: pushes the water along the stroke; blend: evens out wet pigment; smudge: drags wet paint; blot: a tissue, takes wet paint up (erase wet)."
7146
7146
  },
7147
- medium: { type: "string", enum: [..._chunkJGKCC5OFcjs.WET_MEDIA], description: "The medium: watercolor, gouache or oil. A layer takes the medium's wet settings the first time it holds wet paint (oil: thick, barely flows, stays wet long and blends into the wet paint it meets)." },
7147
+ medium: { type: "string", enum: [..._chunkYQ5C5BVKcjs.WET_MEDIA], description: "The medium: watercolor, gouache or oil. A layer takes the medium's wet settings the first time it holds wet paint (oil: thick, barely flows, stays wet long and blends into the wet paint it meets)." },
7148
7148
  load: { type: "number", minimum: 0, maximum: 1, description: "Paint loading: 1 never runs out; lower, the brush runs dry along a long stroke (each stroke reloads)." },
7149
7149
  thinner: { type: "number", minimum: 0, maximum: 1, description: "Thinner (water or solvent): more transparent, runnier paint." },
7150
7150
  water: { type: "number", minimum: 0, maximum: 1, description: "Wetness: water laid per stroke, 0.2 a damp brush .. 1 a dripping one." },
@@ -7161,7 +7161,7 @@ var IMPASTO_BRUSH = {
7161
7161
  properties: {
7162
7162
  tool: {
7163
7163
  type: "string",
7164
- enum: [..._chunkJGKCC5OFcjs.IMPASTO_TOOLS],
7164
+ enum: [..._chunkYQ5C5BVKcjs.IMPASTO_TOOLS],
7165
7165
  description: "brush: thick paint with bristle ridges along the stroke; tube: blobs squeezed from the tube; knife: a palette knife that scrapes the relief flat and smears the paint; roller: a flat stippled band; gloop: a thick, glossy, rounded bead."
7166
7166
  },
7167
7167
  thickness: { type: "number", minimum: 0, maximum: 1, description: "How far the paint stands up." },
@@ -7177,8 +7177,8 @@ var PARTICLE_BRUSH = {
7177
7177
  type: "object",
7178
7178
  description: "Particle engine settings (procedural brushes). Missing fields keep their current values.",
7179
7179
  properties: {
7180
- kind: { type: "string", enum: [..._chunkJGKCC5OFcjs.PARTICLE_KINDS], description: "string: strands of masses on springs dragged behind the pen (hair, fur, wet string); spring: particles on springs to the pen, overshooting and wobbling; orbit: particles circling the pen (curls); flow: particles thrown off the pen into a swirling flow until they fade." },
7181
- render: { type: "string", enum: [..._chunkJGKCC5OFcjs.PARTICLE_RENDERS], description: "dot: a mark at each step; line: each particle draws a continuous line; sequence: beads spaced along each path." },
7180
+ kind: { type: "string", enum: [..._chunkYQ5C5BVKcjs.PARTICLE_KINDS], description: "string: strands of masses on springs dragged behind the pen (hair, fur, wet string); spring: particles on springs to the pen, overshooting and wobbling; orbit: particles circling the pen (curls); flow: particles thrown off the pen into a swirling flow until they fade." },
7181
+ render: { type: "string", enum: [..._chunkYQ5C5BVKcjs.PARTICLE_RENDERS], description: "dot: a mark at each step; line: each particle draws a continuous line; sequence: beads spaced along each path." },
7182
7182
  count: { type: "integer", minimum: 1, maximum: 64, description: "Particles (flow: how many are thrown per tip of travel)." },
7183
7183
  size: { type: "number", minimum: 0, maximum: 1, description: "Mark size as a fraction of the tip size." },
7184
7184
  spread: { type: "number", minimum: 0, maximum: 1, description: "How far apart the particles start, as a fraction of the tip size." },
@@ -7208,7 +7208,7 @@ var STICKER_BRUSH = {
7208
7208
  type: "object",
7209
7209
  description: "Sticker engine settings: stamps sprayed along the stroke as editable stickers. Missing fields keep their current values.",
7210
7210
  properties: {
7211
- stamps: { type: "array", minItems: 1, maxItems: 9, items: { type: "string", enum: [..._chunkJGKCC5OFcjs.STAMP_KINDS], description: "A stamp." }, description: "The stamps to spray (one picked at random per sticker)." },
7211
+ stamps: { type: "array", minItems: 1, maxItems: 9, items: { type: "string", enum: [..._chunkYQ5C5BVKcjs.STAMP_KINDS], description: "A stamp." }, description: "The stamps to spray (one picked at random per sticker)." },
7212
7212
  density: { type: "number", minimum: 0, maximum: 1, description: "Stickers per distance travelled." },
7213
7213
  sizeJitter: { type: "number", minimum: 0, maximum: 1, description: "Random size change." },
7214
7214
  rotationJitter: { type: "number", minimum: 0, maximum: 1, description: "Random turn as a fraction of \xB1180\xB0." },
@@ -7219,16 +7219,16 @@ var STICKER_BRUSH = {
7219
7219
  };
7220
7220
  var BRUSH_FIELDS = {
7221
7221
  name: { type: "string", minLength: 1, maxLength: 80, description: "Display name." },
7222
- category: { type: "string", enum: [..._chunkJGKCC5OFcjs.PAINT_BRUSH_CATEGORIES], description: "Library category." },
7222
+ category: { type: "string", enum: [..._chunkYQ5C5BVKcjs.PAINT_BRUSH_CATEGORIES], description: "Library category." },
7223
7223
  engine: {
7224
7224
  type: "string",
7225
- enum: [..._chunkJGKCC5OFcjs.PAINT_BRUSH_ENGINES],
7225
+ enum: [..._chunkYQ5C5BVKcjs.PAINT_BRUSH_ENGINES],
7226
7226
  description: "dab: paints dabs (with behavior.pickup or gradient paint it paints dab by dab, lifting and mixing paint); eraser: removes paint; mixer: the Mixer Brush (a reservoir plus picked-up paint); blender: mixes the colours under and near the tip; smudge: drags paint along the stroke; wet: watercolour, gouache, oil and the wet tools on a simulated wet layer (see wet); impasto: thick paint with relief (see impasto); particle: procedural particle brushes (see particle); bristle: a tuft of bristles that bend and splay (see bristle); sticker: sprays editable sticker stamps (see sticker)."
7227
7227
  },
7228
7228
  tip: TIP,
7229
7229
  grain: { type: "number", minimum: 0, maximum: 1, description: "Paper grain response: 0 ignores the grain, 1 catches only its peaks at light pressure (pencil, pastel, charcoal). Multiplied by the paper depth." },
7230
7230
  pressureSmoothing: { type: "number", minimum: 0, maximum: 0.95, description: "Pressure smoothing, separate from the tip position smoothing." },
7231
- rotation: { type: "string", enum: [..._chunkJGKCC5OFcjs.BRUSH_ROTATIONS], description: "What turns the tip: fixed (tip.angle), stroke (follows the direction of travel) or barrel (the pen barrel rotation, twist)." },
7231
+ rotation: { type: "string", enum: [..._chunkYQ5C5BVKcjs.BRUSH_ROTATIONS], description: "What turns the tip: fixed (tip.angle), stroke (follows the direction of travel) or barrel (the pen barrel rotation, twist)." },
7232
7232
  dynamics: DYNAMICS,
7233
7233
  mixer: MIXER,
7234
7234
  loadsColor: { type: "boolean", description: "Mixer engine: load the colour each stroke (false for a mixer that only moves paint)." },
@@ -7278,7 +7278,7 @@ function brushSummary(b) {
7278
7278
  size: b.tip.size,
7279
7279
  grain: b.grain,
7280
7280
  rotation: b.rotation,
7281
- wetCapable: _chunkJGKCC5OFcjs.isWetCapable.call(void 0, b),
7281
+ wetCapable: _chunkYQ5C5BVKcjs.isWetCapable.call(void 0, b),
7282
7282
  pickup: b.behavior.pickup,
7283
7283
  dirty: b.behavior.dirty,
7284
7284
  multicolor: b.behavior.multicolor.mode,
@@ -7384,8 +7384,8 @@ function createPaintEditorToolProvider(controller, options = {}) {
7384
7384
  inputSchema: EMPTY3,
7385
7385
  annotations: { title: "List papers", ...READ6 },
7386
7386
  handler: () => ({
7387
- papers: _chunkJGKCC5OFcjs.PAPER_LIBRARY.map((p) => ({ id: p.preset, name: p.name, family: p.family, pattern: p.pattern, color: p.color, depth: p.depth, absorption: p.absorption, permeability: p.permeability, roughness: p.roughness })),
7388
- families: [..._chunkJGKCC5OFcjs.PAPER_FAMILIES],
7387
+ papers: _chunkYQ5C5BVKcjs.PAPER_LIBRARY.map((p) => ({ id: p.preset, name: p.name, family: p.family, pattern: p.pattern, color: p.color, depth: p.depth, absorption: p.absorption, permeability: p.permeability, roughness: p.roughness })),
7388
+ families: [..._chunkYQ5C5BVKcjs.PAPER_FAMILIES],
7389
7389
  patterns: [..._chunkEBDCRTZIcjs.GRAIN_PATTERNS]
7390
7390
  })
7391
7391
  });
@@ -7607,10 +7607,10 @@ function createPaintEditorToolProvider(controller, options = {}) {
7607
7607
  annotations: { title: "Get a brush", ...READ6 },
7608
7608
  handler: ({ id }) => {
7609
7609
  const st = c.getState();
7610
- if (id === void 0) return { ..._chunkJGKCC5OFcjs.brushToJSON.call(void 0, st.brush), strokePaint: _nullishCoalesce(st.brush.paint, () => ( st.paint)) };
7610
+ if (id === void 0) return { ..._chunkYQ5C5BVKcjs.brushToJSON.call(void 0, st.brush), strokePaint: _nullishCoalesce(st.brush.paint, () => ( st.paint)) };
7611
7611
  const b = c.getBrush(id);
7612
7612
  if (!b) throw new Error(`Unknown brush "${id}". Call list_brushes for the ids.`);
7613
- return { ..._chunkJGKCC5OFcjs.brushToJSON.call(void 0, b), builtin: Boolean(b.builtin), strokePaint: _nullishCoalesce(b.paint, () => ( st.paint)) };
7613
+ return { ..._chunkYQ5C5BVKcjs.brushToJSON.call(void 0, b), builtin: Boolean(b.builtin), strokePaint: _nullishCoalesce(b.paint, () => ( st.paint)) };
7614
7614
  }
7615
7615
  });
7616
7616
  add({
@@ -7619,7 +7619,7 @@ function createPaintEditorToolProvider(controller, options = {}) {
7619
7619
  description: "Chooses the active brush (id) and / or changes its settings; strokes without a brush use it. Editor state, not an undo step. Changes stay on the active brush until save_brush stores them. Returns the active brush.",
7620
7620
  inputSchema: { type: "object", properties: { id: { type: "string", description: "Brush id from list_brushes to start from." }, ...BRUSH_FIELDS }, additionalProperties: false },
7621
7621
  annotations: { title: "Set the brush", ...SET4 },
7622
- handler: (a) => _chunkJGKCC5OFcjs.brushToJSON.call(void 0, c.setBrush(a))
7622
+ handler: (a) => _chunkYQ5C5BVKcjs.brushToJSON.call(void 0, c.setBrush(a))
7623
7623
  });
7624
7624
  add({
7625
7625
  name: "save_brush",
@@ -7635,7 +7635,7 @@ function createPaintEditorToolProvider(controller, options = {}) {
7635
7635
  additionalProperties: false
7636
7636
  },
7637
7637
  annotations: { title: "Save a brush", ...SET4 },
7638
- handler: ({ id, name }) => _chunkJGKCC5OFcjs.brushToJSON.call(void 0, c.saveBrush({ id, name }))
7638
+ handler: ({ id, name }) => _chunkYQ5C5BVKcjs.brushToJSON.call(void 0, c.saveBrush({ id, name }))
7639
7639
  });
7640
7640
  add({
7641
7641
  name: "remove_brush",
@@ -7978,32 +7978,12 @@ function createPaintEditorToolProvider(controller, options = {}) {
7978
7978
  return { data: _chunkCWM3CUUXcjs.bytesToBase64.call(void 0, r.bytes), bytes: r.bytes.length, psb: r.psb, warnings: r.warnings };
7979
7979
  }
7980
7980
  });
7981
- add({
7982
- name: "save_document",
7983
- title: "Save the document",
7984
- description: "Deprecated (kept for one minor version): use get_paint_document, which returns the painting with images as asset references, or save_paint_document to store it. Returns the document as JSON (format pixerate-paint, version 1): canvas, paper, layers with PNG data URLs, and the recorded strokes unless strokes is false. Changes nothing.",
7985
- inputSchema: { type: "object", properties: { strokes: { type: "boolean", description: "Include the recorded strokes (default true)." } }, additionalProperties: false },
7986
- annotations: { title: "Save the document", ...READ6 },
7987
- handler: ({ strokes }) => c.toJSON({ strokes })
7988
- });
7989
- add({
7990
- name: "open_document",
7991
- title: "Open a document",
7992
- description: "Deprecated (kept for one minor version): use load_paint_document or open_saved_paint_document. Opens a saved paint document (as save_document returns), replacing the painting and clearing the undo history. Returns the canvas, the layers and anything that could not be read.",
7993
- inputSchema: { type: "object", properties: { document: { type: "object", description: "The saved document JSON." } }, required: ["document"], additionalProperties: false },
7994
- annotations: { title: "Open a document", ...DESTRUCTIVE3 },
7995
- handler: ({ document }) => {
7996
- const problems = c.loadJSON(document);
7997
- const d = c.document;
7998
- return { width: d.canvas.width, height: d.canvas.height, layers: c.listLayers(), strokes: d.strokes.length, problems };
7999
- }
8000
- });
8001
7981
  tools.push(...createPaintGuideTools(c));
8002
7982
  tools.push(...createPaintWetTools(c));
8003
7983
  tools.push(...createPaintThickTools(c));
8004
7984
  tools.push(...createPaintReplayTools(c));
8005
7985
  tools.push(...createPaintStickerTools(c));
8006
- tools.push(..._chunkGNK7SESQcjs.createPigmentTools.call(void 0, ));
7986
+ tools.push(..._chunkV7GWZIZKcjs.createPigmentTools.call(void 0, ));
8007
7987
  return withPaintPlayback({
8008
7988
  id: _nullishCoalesce(options.id, () => ( "paint-editor")),
8009
7989
  namespace: options.namespace,
@@ -9068,4 +9048,4 @@ function createPaintEditorDocument(controller, options = {}) {
9068
9048
 
9069
9049
 
9070
9050
 
9071
- exports.BLEND_MENU_GROUPS = BLEND_MENU_GROUPS; exports.BLEND_MODES = _chunkCWM3CUUXcjs.BLEND_MODES; exports.BRUSH_ID = _chunkJGKCC5OFcjs.BRUSH_ID; exports.BRUSH_ROTATIONS = _chunkJGKCC5OFcjs.BRUSH_ROTATIONS; exports.BRUSH_SLIDERS = BRUSH_SLIDERS; exports.BUILTIN_BRUSHES = _chunkJGKCC5OFcjs.BUILTIN_BRUSHES; exports.BristleStroke = _chunkJGKCC5OFcjs.BristleStroke; exports.DEFAULT_BEHAVIOR = _chunkJGKCC5OFcjs.DEFAULT_BEHAVIOR; exports.DEFAULT_BRISTLE = _chunkJGKCC5OFcjs.DEFAULT_BRISTLE; exports.DEFAULT_BRUSH_ID = _chunkJGKCC5OFcjs.DEFAULT_BRUSH_ID; exports.DEFAULT_DPI = DEFAULT_DPI; exports.DEFAULT_DYNAMICS = _chunkJGKCC5OFcjs.DEFAULT_DYNAMICS; exports.DEFAULT_FLOW = _chunkGNK7SESQcjs.DEFAULT_FLOW; exports.DEFAULT_IMPASTO = _chunkJGKCC5OFcjs.DEFAULT_IMPASTO; exports.DEFAULT_LIGHTING = DEFAULT_LIGHTING; exports.DEFAULT_MULTI_COLOR = _chunkJGKCC5OFcjs.DEFAULT_MULTI_COLOR; exports.DEFAULT_PAINT_GRADIENT = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PAPER = _chunkJGKCC5OFcjs.DEFAULT_PAPER; exports.DEFAULT_PARTICLE = _chunkJGKCC5OFcjs.DEFAULT_PARTICLE; exports.DEFAULT_STICKER = _chunkJGKCC5OFcjs.DEFAULT_STICKER; exports.DEFAULT_SWATCHES = DEFAULT_SWATCHES; exports.DEFAULT_VIEW = DEFAULT_VIEW; exports.DEFAULT_WET_BRUSH = _chunkJGKCC5OFcjs.DEFAULT_WET_BRUSH; exports.DEFAULT_WET_PARAMS = _chunkGNK7SESQcjs.DEFAULT_WET_PARAMS; exports.DryStroke = _chunkJGKCC5OFcjs.DryStroke; exports.GPU_LEAD = GPU_LEAD; exports.GRAIN_PATTERNS = _chunkEBDCRTZIcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkEBDCRTZIcjs.GRAIN_TILE; exports.HARMONY_KINDS = _chunkES3UEVUTcjs.HARMONY_KINDS; exports.IDENTITY_AFFINE = IDENTITY_AFFINE; exports.IDENTITY_COPY = _chunkJGKCC5OFcjs.IDENTITY_COPY; exports.IMPASTO_TOOLS = _chunkJGKCC5OFcjs.IMPASTO_TOOLS; exports.IMPASTO_TOOL_LABELS = IMPASTO_TOOL_LABELS; exports.LIGHT_SLIDERS = LIGHT_SLIDERS; exports.LitCache = LitCache; exports.MAX_BRUSH_SIZE = _chunkEBDCRTZIcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_SIDE = MAX_CANVAS_SIDE; exports.MAX_COORDINATE = MAX_COORDINATE; exports.MAX_IMAGE_SIDE = MAX_IMAGE_SIDE; exports.MAX_ZOOM = MAX_ZOOM; exports.MIN_CANVAS_SIDE = MIN_CANVAS_SIDE; exports.MIN_ZOOM = MIN_ZOOM; exports.MIXING_PAD_HEIGHT = MIXING_PAD_HEIGHT; exports.MIXING_PAD_WIDTH = MIXING_PAD_WIDTH; exports.MULTI_COLOR_MODES = _chunkJGKCC5OFcjs.MULTI_COLOR_MODES; exports.MixingPad = MixingPad; exports.PAD_SAMPLE_SIZES = PAD_SAMPLE_SIZES; exports.PAINTERLY_BLEND_MODES = _chunkCWM3CUUXcjs.PAINTERLY_BLEND_MODES; exports.PAINT_BRUSH_CATEGORIES = _chunkJGKCC5OFcjs.PAINT_BRUSH_CATEGORIES; exports.PAINT_BRUSH_ENGINES = _chunkJGKCC5OFcjs.PAINT_BRUSH_ENGINES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_EFFECT_PLACES = PAINT_EFFECT_PLACES; exports.PAINT_FORMAT = PAINT_FORMAT; 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_SCHEMA_VERSION = PAINT_SCHEMA_VERSION; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_EFFECT_BLENDS = PAPER_EFFECT_BLENDS; exports.PAPER_EFFECT_NODE_ID = PAPER_EFFECT_NODE_ID; exports.PAPER_FAMILIES = _chunkJGKCC5OFcjs.PAPER_FAMILIES; exports.PAPER_LIBRARY = _chunkJGKCC5OFcjs.PAPER_LIBRARY; exports.PAPER_NODE_ID = PAPER_NODE_ID; exports.PAPER_SLIDERS = PAPER_SLIDERS; exports.PAPER_TARGET = PAPER_TARGET; exports.PARTICLE_KINDS = _chunkJGKCC5OFcjs.PARTICLE_KINDS; exports.PARTICLE_KIND_LABELS = PARTICLE_KIND_LABELS; exports.PARTICLE_RENDERS = _chunkJGKCC5OFcjs.PARTICLE_RENDERS; exports.PARTICLE_RENDER_LABELS = PARTICLE_RENDER_LABELS; exports.PaintCanvasPresenter = PaintCanvasPresenter; exports.PaintDabStroke = PaintDabStroke; exports.PaintDirector = PaintDirector; exports.PaintDocumentError = PaintDocumentError; exports.PaintEditorController = PaintEditorController; exports.PaintEditorError = PaintEditorError; exports.PaintEffectsRenderer = PaintEffectsRenderer; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkEBDCRTZIcjs.PaintGradientSampler; exports.PaintPresence = PaintPresence; exports.PaintSourceError = _chunkEBDCRTZIcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaintWetLayers = PaintWetLayers; exports.PaperGrain = _chunkEBDCRTZIcjs.PaperGrain; exports.ParticleStroke = _chunkJGKCC5OFcjs.ParticleStroke; exports.PenDabWalker = _chunkJGKCC5OFcjs.PenDabWalker; exports.PenSmoother = _chunkJGKCC5OFcjs.PenSmoother; exports.PerspectiveSnapper = PerspectiveSnapper; exports.SNAP_DECIDE_DISTANCE = SNAP_DECIDE_DISTANCE; exports.STAMP_KINDS = _chunkJGKCC5OFcjs.STAMP_KINDS; exports.STAMP_LABELS = STAMP_LABELS; exports.STENCIL_KINDS = STENCIL_KINDS; exports.STENCIL_SHAPES = STENCIL_SHAPES; exports.STICKER_SLIDERS = STICKER_SLIDERS; exports.SYMMETRY_MODES = SYMMETRY_MODES; exports.StencilSnapper = StencilSnapper; exports.StickerSpray = _chunkJGKCC5OFcjs.StickerSpray; exports.TRACING_NODE_ID = TRACING_NODE_ID; exports.ThickStrokeDriver = ThickStrokeDriver; exports.TileableNoise = _chunkEBDCRTZIcjs.TileableNoise; exports.WET_FLOW_KINDS = _chunkGNK7SESQcjs.WET_FLOW_KINDS; exports.WET_GPU_MODES = WET_GPU_MODES; exports.WET_GPU_OPTIONS = WET_GPU_OPTIONS; exports.WET_MEDIA = _chunkJGKCC5OFcjs.WET_MEDIA; exports.WET_MEDIUM_LABELS = WET_MEDIUM_LABELS; exports.WET_MEDIUM_PARAMS = WET_MEDIUM_PARAMS; exports.WET_PARAM_KEYS = _chunkGNK7SESQcjs.WET_PARAM_KEYS; exports.WET_PARAM_SCHEMA = WET_PARAM_SCHEMA; exports.WET_PARAM_SLIDERS = WET_PARAM_SLIDERS; exports.WET_SPEED_SLIDER = WET_SPEED_SLIDER; exports.WET_TILT_SLIDERS = WET_TILT_SLIDERS; exports.WET_TOOLS = _chunkJGKCC5OFcjs.WET_TOOLS; exports.WET_TOOL_LABELS = WET_TOOL_LABELS; exports.WetStrokeDriver = WetStrokeDriver; exports.addPaintGradientStop = _chunkEBDCRTZIcjs.addPaintGradientStop; exports.affineCopy = affineCopy; exports.applyAffine = applyAffine; exports.brushEngineControls = brushEngineControls; exports.brushLoadColor = brushLoadColor; exports.brushLoadForStroke = brushLoadForStroke; exports.brushTakesPaint = _chunkJGKCC5OFcjs.brushTakesPaint; exports.brushToJSON = _chunkJGKCC5OFcjs.brushToJSON; exports.buildTimeLapse = buildTimeLapse; exports.checkPaintEffectPlace = checkPaintEffectPlace; exports.clonePaper = _chunkJGKCC5OFcjs.clonePaper; exports.colorHarmony = colorHarmony2; exports.composeAffine = composeAffine; exports.contactSheet = contactSheet; exports.createPaintCompositor = createPaintCompositor; exports.createPaintDocument = createPaintDocument; exports.createPaintEditorDocument = createPaintEditorDocument; exports.createPaintEditorToolProvider = createPaintEditorToolProvider; exports.createPaintEffectsToolProvider = createPaintEffectsToolProvider; exports.createPaintLayer = createPaintLayer; exports.createPaintReplayTools = createPaintReplayTools; exports.createPaintStickerTools = createPaintStickerTools; exports.createPaintThickTools = createPaintThickTools; exports.createPaintWetTools = createPaintWetTools; exports.decodeImageBlob = decodeImageBlob; exports.defaultGuides = defaultGuides; exports.defaultImageEncoder = defaultImageEncoder; exports.deserializePaintDocument = deserializePaintDocument; exports.deserializePaintDocumentAsync = deserializePaintDocumentAsync; exports.documentExtensions = documentExtensions; exports.documentToScreen = documentToScreen; exports.downloadBytes = downloadBytes; exports.downsampleRgba = downsampleRgba; exports.drawSticker = _chunkJGKCC5OFcjs.drawSticker; exports.drawWaterOverlay = drawWaterOverlay; exports.effectLayersToJSON = effectLayersToJSON; exports.emptiedLayers = emptiedLayers; exports.emptyThickChannels = emptyThickChannels; exports.fitZoom = fitZoom; exports.grainCatch = _chunkEBDCRTZIcjs.grainCatch; exports.grainHeights = _chunkEBDCRTZIcjs.grainHeights; exports.guideOverlay = guideOverlay; exports.handlePaintShortcut = handlePaintShortcut; exports.hash2 = _chunkEBDCRTZIcjs.hash2; exports.hexToPaintRgb = _chunkEBDCRTZIcjs.hexToPaintRgb; exports.hexToRgb8 = _chunkJGKCC5OFcjs.hexToRgb8; exports.hslToRgb = hslToRgb; exports.hsvToRgb = hsvToRgb; exports.hueToWheel = _chunkES3UEVUTcjs.hueToWheel; exports.invertAffine = invertAffine; exports.isBlendMode = _chunkCWM3CUUXcjs.isBlendMode; exports.isGradientPaint = _chunkEBDCRTZIcjs.isGradientPaint; exports.isPainterlyBlendMode = _chunkCWM3CUUXcjs.isPainterlyBlendMode; exports.isPalmTouch = isPalmTouch; exports.isWetBrush = _chunkJGKCC5OFcjs.isWetBrush; exports.isWetCapable = _chunkJGKCC5OFcjs.isWetCapable; exports.lightTile = lightTile; exports.lightingKey = lightingKey; exports.mapPenPoint = mapPenPoint; exports.mix32 = _chunkEBDCRTZIcjs.mix32; exports.mixPixels = mixPixels; exports.mixerLoadForStroke = mixerLoadForStroke; exports.mixerTip = _chunkJGKCC5OFcjs.mixerTip; exports.multiColorForDab = multiColorForDab; exports.multiColorGradient = multiColorGradient; exports.multiColorPalette = multiColorPalette; exports.multiColorSliders = multiColorSliders; exports.multiColorToPaint = _chunkJGKCC5OFcjs.multiColorToPaint; exports.newPaintLayerId = newPaintLayerId; exports.nextPaperEffectVersion = nextPaperEffectVersion; exports.normalizeBehavior = _chunkJGKCC5OFcjs.normalizeBehavior; exports.normalizeBristle = _chunkJGKCC5OFcjs.normalizeBristle; exports.normalizeBrushStroke = normalizeBrushStroke; exports.normalizeCanvas = normalizeCanvas; exports.normalizeDynamics = _chunkJGKCC5OFcjs.normalizeDynamics; exports.normalizeFlow = _chunkGNK7SESQcjs.normalizeFlow; exports.normalizeHexColor = _chunkEBDCRTZIcjs.normalizeHexColor; exports.normalizeImpasto = _chunkJGKCC5OFcjs.normalizeImpasto; exports.normalizeLighting = normalizeLighting; exports.normalizeMultiColor = _chunkJGKCC5OFcjs.normalizeMultiColor; exports.normalizePaintBrush = _chunkJGKCC5OFcjs.normalizePaintBrush; exports.normalizePaper = _chunkJGKCC5OFcjs.normalizePaper; exports.normalizeParticle = _chunkJGKCC5OFcjs.normalizeParticle; exports.normalizePerspective = normalizePerspective; exports.normalizeRotation = normalizeRotation; exports.normalizeStencil = normalizeStencil; exports.normalizeStickerSettings = _chunkJGKCC5OFcjs.normalizeStickerSettings; exports.normalizeStickerUpdate = _chunkJGKCC5OFcjs.normalizeStickerUpdate; exports.normalizeSymmetry = normalizeSymmetry; exports.normalizeView = normalizeView; exports.normalizeWetBrush = _chunkJGKCC5OFcjs.normalizeWetBrush; exports.normalizeWetParams = _chunkGNK7SESQcjs.normalizeWetParams; exports.overPixels = overPixels; exports.padSampleRadius = padSampleRadius; exports.paintGradientMappingFor = _chunkEBDCRTZIcjs.paintGradientMappingFor; exports.paintPlaybackPanel = paintPlaybackPanel; exports.paintSourceColor = _chunkEBDCRTZIcjs.paintSourceColor; exports.paintSourceCss = _chunkEBDCRTZIcjs.paintSourceCss; exports.paintToMultiColor = _chunkJGKCC5OFcjs.paintToMultiColor; exports.paperEffectFromJSON = paperEffectFromJSON; exports.paperEffectToJSON = paperEffectToJSON; exports.paperGrain = paperGrain; exports.paperKey = paperKey; exports.paperNode = paperNode; exports.paperPreset = _chunkJGKCC5OFcjs.paperPreset; exports.parseBrushLibrary = _chunkJGKCC5OFcjs.parseBrushLibrary; exports.parseHexColor = parseHexColor; exports.parsePaintSource = _chunkEBDCRTZIcjs.parsePaintSource; exports.patchBrushValue = patchBrushValue; exports.patchPath = patchPath; exports.penOrientation = _chunkJGKCC5OFcjs.penOrientation; exports.perspectiveDirections = perspectiveDirections; exports.perspectiveGuideLines = perspectiveGuideLines; exports.planPaintToolPlayback = planPaintToolPlayback; exports.pointerToPenPoint = pointerToPenPoint; exports.quickStencil = quickStencil; exports.rand01 = _chunkEBDCRTZIcjs.rand01; exports.randSigned = _chunkEBDCRTZIcjs.randSigned; exports.readPaintEffectSource = readPaintEffectSource; exports.readPaintSource = _chunkEBDCRTZIcjs.readPaintSource; exports.readPath = readPath; exports.readSwatch = readSwatch; exports.reliefInfo = reliefInfo; exports.removePaintGradientStop = _chunkEBDCRTZIcjs.removePaintGradientStop; exports.renderBrushThumbnail = renderBrushThumbnail; exports.renderColorWheel = renderColorWheel; exports.renderPaper = _chunkJGKCC5OFcjs.renderPaper; exports.renderStickers = _chunkJGKCC5OFcjs.renderStickers; exports.replayFrame = replayFrame; exports.replayItems = replayItems; exports.replayPainting = replayPainting; exports.resolvePaintGradient = _chunkEBDCRTZIcjs.resolvePaintGradient; exports.reversePaintGradient = _chunkEBDCRTZIcjs.reversePaintGradient; exports.rgbToHexColor = rgbToHexColor; exports.rgbToHsl = rgbToHsl; exports.rgbToHsv = rgbToHsv; exports.samplePressure = samplePressure; exports.scalePaintGradient = _chunkEBDCRTZIcjs.scalePaintGradient; exports.scaleStencil = scaleStencil; exports.screenToDocument = screenToDocument; exports.seedFromString = _chunkEBDCRTZIcjs.seedFromString; exports.serializePaintDocument = serializePaintDocument; exports.serializePaintDocumentExternal = serializePaintDocumentExternal; exports.solidPaint = _chunkEBDCRTZIcjs.solidPaint; exports.stampCoverage = _chunkJGKCC5OFcjs.stampCoverage; exports.standardBlendMode = _chunkCWM3CUUXcjs.standardBlendMode; exports.startWetClock = startWetClock; exports.stencilMask = stencilMask; exports.stencilOutline = stencilOutline; exports.stickerRect = _chunkJGKCC5OFcjs.stickerRect; exports.stickerSurface = _chunkJGKCC5OFcjs.stickerSurface; exports.strokeBounds = strokeBounds; exports.strokeDuration = strokeDuration; exports.strokeSchedule = strokeSchedule; exports.sweepPath = sweepPath; exports.symmetryAxisAngles = symmetryAxisAngles; exports.symmetryAxisSegments = symmetryAxisSegments; exports.symmetryCopies = symmetryCopies; exports.thickFromJSON = thickFromJSON; exports.thickToJSON = thickToJSON; exports.thumbnailStroke = thumbnailStroke; exports.tiltToOrientation = _chunkJGKCC5OFcjs.tiltToOrientation; exports.timeLapseVideo = timeLapseVideo; exports.timeLapseZip = timeLapseZip; exports.toStrokePoint = _chunkJGKCC5OFcjs.toStrokePoint; exports.toggleStamp = toggleStamp; exports.translateStencil = translateStencil; exports.updatePaintGradientStop = _chunkEBDCRTZIcjs.updatePaintGradientStop; exports.usesPaintExchange = _chunkJGKCC5OFcjs.usesPaintExchange; exports.variationAffine = variationAffine; exports.varyStroke = varyStroke; exports.viewCssTransform = viewCssTransform; exports.viewMatrix = viewMatrix; exports.viewPenToDocument = viewPenToDocument; exports.wetEngineSummary = wetEngineSummary; exports.wetPaperInput = wetPaperInput; exports.wetPigmentOf = wetPigmentOf; exports.wetSupport = _chunkGNK7SESQcjs.wetSupport; exports.wheelAngle = wheelAngle; exports.wheelPick = wheelPick; exports.wheelPoint = wheelPoint; exports.wheelToHue = _chunkES3UEVUTcjs.wheelToHue; exports.withPaintPlayback = withPaintPlayback;
9051
+ exports.BLEND_MENU_GROUPS = BLEND_MENU_GROUPS; exports.BLEND_MODES = _chunkCWM3CUUXcjs.BLEND_MODES; exports.BRUSH_ID = _chunkYQ5C5BVKcjs.BRUSH_ID; exports.BRUSH_ROTATIONS = _chunkYQ5C5BVKcjs.BRUSH_ROTATIONS; exports.BRUSH_SLIDERS = BRUSH_SLIDERS; exports.BUILTIN_BRUSHES = _chunkYQ5C5BVKcjs.BUILTIN_BRUSHES; exports.BristleStroke = _chunkYQ5C5BVKcjs.BristleStroke; exports.DEFAULT_BEHAVIOR = _chunkYQ5C5BVKcjs.DEFAULT_BEHAVIOR; exports.DEFAULT_BRISTLE = _chunkYQ5C5BVKcjs.DEFAULT_BRISTLE; exports.DEFAULT_BRUSH_ID = _chunkYQ5C5BVKcjs.DEFAULT_BRUSH_ID; exports.DEFAULT_DPI = DEFAULT_DPI; exports.DEFAULT_DYNAMICS = _chunkYQ5C5BVKcjs.DEFAULT_DYNAMICS; exports.DEFAULT_FLOW = _chunkV7GWZIZKcjs.DEFAULT_FLOW; exports.DEFAULT_IMPASTO = _chunkYQ5C5BVKcjs.DEFAULT_IMPASTO; exports.DEFAULT_LIGHTING = DEFAULT_LIGHTING; exports.DEFAULT_MULTI_COLOR = _chunkYQ5C5BVKcjs.DEFAULT_MULTI_COLOR; exports.DEFAULT_PAINT_GRADIENT = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PAPER = _chunkYQ5C5BVKcjs.DEFAULT_PAPER; exports.DEFAULT_PARTICLE = _chunkYQ5C5BVKcjs.DEFAULT_PARTICLE; exports.DEFAULT_STICKER = _chunkYQ5C5BVKcjs.DEFAULT_STICKER; exports.DEFAULT_SWATCHES = DEFAULT_SWATCHES; exports.DEFAULT_VIEW = DEFAULT_VIEW; exports.DEFAULT_WET_BRUSH = _chunkYQ5C5BVKcjs.DEFAULT_WET_BRUSH; exports.DEFAULT_WET_PARAMS = _chunkV7GWZIZKcjs.DEFAULT_WET_PARAMS; exports.DryStroke = _chunkYQ5C5BVKcjs.DryStroke; exports.GPU_LEAD = GPU_LEAD; exports.GRAIN_PATTERNS = _chunkEBDCRTZIcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkEBDCRTZIcjs.GRAIN_TILE; exports.HARMONY_KINDS = _chunkES3UEVUTcjs.HARMONY_KINDS; exports.IDENTITY_AFFINE = IDENTITY_AFFINE; exports.IDENTITY_COPY = _chunkYQ5C5BVKcjs.IDENTITY_COPY; exports.IMPASTO_TOOLS = _chunkYQ5C5BVKcjs.IMPASTO_TOOLS; exports.IMPASTO_TOOL_LABELS = IMPASTO_TOOL_LABELS; exports.LIGHT_SLIDERS = LIGHT_SLIDERS; exports.LitCache = LitCache; exports.MAX_BRUSH_SIZE = _chunkEBDCRTZIcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_SIDE = MAX_CANVAS_SIDE; exports.MAX_COORDINATE = MAX_COORDINATE; exports.MAX_IMAGE_SIDE = MAX_IMAGE_SIDE; exports.MAX_ZOOM = MAX_ZOOM; exports.MIN_CANVAS_SIDE = MIN_CANVAS_SIDE; exports.MIN_ZOOM = MIN_ZOOM; exports.MIXING_PAD_HEIGHT = MIXING_PAD_HEIGHT; exports.MIXING_PAD_WIDTH = MIXING_PAD_WIDTH; exports.MULTI_COLOR_MODES = _chunkYQ5C5BVKcjs.MULTI_COLOR_MODES; exports.MixingPad = MixingPad; exports.PAD_SAMPLE_SIZES = PAD_SAMPLE_SIZES; exports.PAINTERLY_BLEND_MODES = _chunkCWM3CUUXcjs.PAINTERLY_BLEND_MODES; exports.PAINT_BRUSH_CATEGORIES = _chunkYQ5C5BVKcjs.PAINT_BRUSH_CATEGORIES; exports.PAINT_BRUSH_ENGINES = _chunkYQ5C5BVKcjs.PAINT_BRUSH_ENGINES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_EFFECT_PLACES = PAINT_EFFECT_PLACES; exports.PAINT_FORMAT = PAINT_FORMAT; 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_SCHEMA_VERSION = PAINT_SCHEMA_VERSION; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_EFFECT_BLENDS = PAPER_EFFECT_BLENDS; exports.PAPER_EFFECT_NODE_ID = PAPER_EFFECT_NODE_ID; exports.PAPER_FAMILIES = _chunkYQ5C5BVKcjs.PAPER_FAMILIES; exports.PAPER_LIBRARY = _chunkYQ5C5BVKcjs.PAPER_LIBRARY; exports.PAPER_NODE_ID = PAPER_NODE_ID; exports.PAPER_SLIDERS = PAPER_SLIDERS; exports.PAPER_TARGET = PAPER_TARGET; exports.PARTICLE_KINDS = _chunkYQ5C5BVKcjs.PARTICLE_KINDS; exports.PARTICLE_KIND_LABELS = PARTICLE_KIND_LABELS; exports.PARTICLE_RENDERS = _chunkYQ5C5BVKcjs.PARTICLE_RENDERS; exports.PARTICLE_RENDER_LABELS = PARTICLE_RENDER_LABELS; exports.PaintCanvasPresenter = PaintCanvasPresenter; exports.PaintDabStroke = PaintDabStroke; exports.PaintDirector = PaintDirector; exports.PaintDocumentError = PaintDocumentError; exports.PaintEditorController = PaintEditorController; exports.PaintEditorError = PaintEditorError; exports.PaintEffectsRenderer = PaintEffectsRenderer; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkEBDCRTZIcjs.PaintGradientSampler; exports.PaintPresence = PaintPresence; exports.PaintSourceError = _chunkEBDCRTZIcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaintWetLayers = PaintWetLayers; exports.PaperGrain = _chunkEBDCRTZIcjs.PaperGrain; exports.ParticleStroke = _chunkYQ5C5BVKcjs.ParticleStroke; exports.PenDabWalker = _chunkYQ5C5BVKcjs.PenDabWalker; exports.PenSmoother = _chunkYQ5C5BVKcjs.PenSmoother; exports.PerspectiveSnapper = PerspectiveSnapper; exports.SNAP_DECIDE_DISTANCE = SNAP_DECIDE_DISTANCE; exports.STAMP_KINDS = _chunkYQ5C5BVKcjs.STAMP_KINDS; exports.STAMP_LABELS = STAMP_LABELS; exports.STENCIL_KINDS = STENCIL_KINDS; exports.STENCIL_SHAPES = STENCIL_SHAPES; exports.STICKER_SLIDERS = STICKER_SLIDERS; exports.SYMMETRY_MODES = SYMMETRY_MODES; exports.StencilSnapper = StencilSnapper; exports.StickerSpray = _chunkYQ5C5BVKcjs.StickerSpray; exports.TRACING_NODE_ID = TRACING_NODE_ID; exports.ThickStrokeDriver = ThickStrokeDriver; exports.TileableNoise = _chunkEBDCRTZIcjs.TileableNoise; exports.WET_FLOW_KINDS = _chunkV7GWZIZKcjs.WET_FLOW_KINDS; exports.WET_GPU_MODES = WET_GPU_MODES; exports.WET_GPU_OPTIONS = WET_GPU_OPTIONS; exports.WET_MEDIA = _chunkYQ5C5BVKcjs.WET_MEDIA; exports.WET_MEDIUM_LABELS = WET_MEDIUM_LABELS; exports.WET_MEDIUM_PARAMS = WET_MEDIUM_PARAMS; exports.WET_PARAM_KEYS = _chunkV7GWZIZKcjs.WET_PARAM_KEYS; exports.WET_PARAM_SCHEMA = WET_PARAM_SCHEMA; exports.WET_PARAM_SLIDERS = WET_PARAM_SLIDERS; exports.WET_SPEED_SLIDER = WET_SPEED_SLIDER; exports.WET_TILT_SLIDERS = WET_TILT_SLIDERS; exports.WET_TOOLS = _chunkYQ5C5BVKcjs.WET_TOOLS; exports.WET_TOOL_LABELS = WET_TOOL_LABELS; exports.WetStrokeDriver = WetStrokeDriver; exports.addPaintGradientStop = _chunkEBDCRTZIcjs.addPaintGradientStop; exports.affineCopy = affineCopy; exports.applyAffine = applyAffine; exports.brushEngineControls = brushEngineControls; exports.brushLoadColor = brushLoadColor; exports.brushLoadForStroke = brushLoadForStroke; exports.brushTakesPaint = _chunkYQ5C5BVKcjs.brushTakesPaint; exports.brushToJSON = _chunkYQ5C5BVKcjs.brushToJSON; exports.buildTimeLapse = buildTimeLapse; exports.checkPaintEffectPlace = checkPaintEffectPlace; exports.clonePaper = _chunkYQ5C5BVKcjs.clonePaper; exports.colorHarmony = colorHarmony2; exports.composeAffine = composeAffine; exports.contactSheet = contactSheet; exports.createPaintCompositor = createPaintCompositor; exports.createPaintDocument = createPaintDocument; exports.createPaintEditorDocument = createPaintEditorDocument; exports.createPaintEditorToolProvider = createPaintEditorToolProvider; exports.createPaintEffectsToolProvider = createPaintEffectsToolProvider; exports.createPaintLayer = createPaintLayer; exports.createPaintReplayTools = createPaintReplayTools; exports.createPaintStickerTools = createPaintStickerTools; exports.createPaintThickTools = createPaintThickTools; exports.createPaintWetTools = createPaintWetTools; exports.decodeImageBlob = decodeImageBlob; exports.defaultGuides = defaultGuides; exports.defaultImageEncoder = defaultImageEncoder; exports.deserializePaintDocument = deserializePaintDocument; exports.deserializePaintDocumentAsync = deserializePaintDocumentAsync; exports.documentExtensions = documentExtensions; exports.documentToScreen = documentToScreen; exports.downloadBytes = downloadBytes; exports.downsampleRgba = downsampleRgba; exports.drawSticker = _chunkYQ5C5BVKcjs.drawSticker; exports.drawWaterOverlay = drawWaterOverlay; exports.effectLayersToJSON = effectLayersToJSON; exports.emptiedLayers = emptiedLayers; exports.emptyThickChannels = emptyThickChannels; exports.fitZoom = fitZoom; exports.grainCatch = _chunkEBDCRTZIcjs.grainCatch; exports.grainHeights = _chunkEBDCRTZIcjs.grainHeights; exports.guideOverlay = guideOverlay; exports.handlePaintShortcut = handlePaintShortcut; exports.hash2 = _chunkEBDCRTZIcjs.hash2; exports.hexToPaintRgb = _chunkEBDCRTZIcjs.hexToPaintRgb; exports.hexToRgb8 = _chunkYQ5C5BVKcjs.hexToRgb8; exports.hslToRgb = hslToRgb; exports.hsvToRgb = hsvToRgb; exports.hueToWheel = _chunkES3UEVUTcjs.hueToWheel; exports.invertAffine = invertAffine; exports.isBlendMode = _chunkCWM3CUUXcjs.isBlendMode; exports.isGradientPaint = _chunkEBDCRTZIcjs.isGradientPaint; exports.isPainterlyBlendMode = _chunkCWM3CUUXcjs.isPainterlyBlendMode; exports.isPalmTouch = isPalmTouch; exports.isWetBrush = _chunkYQ5C5BVKcjs.isWetBrush; exports.isWetCapable = _chunkYQ5C5BVKcjs.isWetCapable; exports.lightTile = lightTile; exports.lightingKey = lightingKey; exports.mapPenPoint = mapPenPoint; exports.mix32 = _chunkEBDCRTZIcjs.mix32; exports.mixPixels = mixPixels; exports.mixerLoadForStroke = mixerLoadForStroke; exports.mixerTip = _chunkYQ5C5BVKcjs.mixerTip; exports.multiColorForDab = multiColorForDab; exports.multiColorGradient = multiColorGradient; exports.multiColorPalette = multiColorPalette; exports.multiColorSliders = multiColorSliders; exports.multiColorToPaint = _chunkYQ5C5BVKcjs.multiColorToPaint; exports.newPaintLayerId = newPaintLayerId; exports.nextPaperEffectVersion = nextPaperEffectVersion; exports.normalizeBehavior = _chunkYQ5C5BVKcjs.normalizeBehavior; exports.normalizeBristle = _chunkYQ5C5BVKcjs.normalizeBristle; exports.normalizeBrushStroke = normalizeBrushStroke; exports.normalizeCanvas = normalizeCanvas; exports.normalizeDynamics = _chunkYQ5C5BVKcjs.normalizeDynamics; exports.normalizeFlow = _chunkV7GWZIZKcjs.normalizeFlow; exports.normalizeHexColor = _chunkEBDCRTZIcjs.normalizeHexColor; exports.normalizeImpasto = _chunkYQ5C5BVKcjs.normalizeImpasto; exports.normalizeLighting = normalizeLighting; exports.normalizeMultiColor = _chunkYQ5C5BVKcjs.normalizeMultiColor; exports.normalizePaintBrush = _chunkYQ5C5BVKcjs.normalizePaintBrush; exports.normalizePaper = _chunkYQ5C5BVKcjs.normalizePaper; exports.normalizeParticle = _chunkYQ5C5BVKcjs.normalizeParticle; exports.normalizePerspective = normalizePerspective; exports.normalizeRotation = normalizeRotation; exports.normalizeStencil = normalizeStencil; exports.normalizeStickerSettings = _chunkYQ5C5BVKcjs.normalizeStickerSettings; exports.normalizeStickerUpdate = _chunkYQ5C5BVKcjs.normalizeStickerUpdate; exports.normalizeSymmetry = normalizeSymmetry; exports.normalizeView = normalizeView; exports.normalizeWetBrush = _chunkYQ5C5BVKcjs.normalizeWetBrush; exports.normalizeWetParams = _chunkV7GWZIZKcjs.normalizeWetParams; exports.overPixels = overPixels; exports.padSampleRadius = padSampleRadius; exports.paintGradientMappingFor = _chunkEBDCRTZIcjs.paintGradientMappingFor; exports.paintPlaybackPanel = paintPlaybackPanel; exports.paintSourceColor = _chunkEBDCRTZIcjs.paintSourceColor; exports.paintSourceCss = _chunkEBDCRTZIcjs.paintSourceCss; exports.paintToMultiColor = _chunkYQ5C5BVKcjs.paintToMultiColor; exports.paperEffectFromJSON = paperEffectFromJSON; exports.paperEffectToJSON = paperEffectToJSON; exports.paperGrain = paperGrain; exports.paperKey = paperKey; exports.paperNode = paperNode; exports.paperPreset = _chunkYQ5C5BVKcjs.paperPreset; exports.parseBrushLibrary = _chunkYQ5C5BVKcjs.parseBrushLibrary; exports.parseHexColor = parseHexColor; exports.parsePaintSource = _chunkEBDCRTZIcjs.parsePaintSource; exports.patchBrushValue = patchBrushValue; exports.patchPath = patchPath; exports.penOrientation = _chunkYQ5C5BVKcjs.penOrientation; exports.perspectiveDirections = perspectiveDirections; exports.perspectiveGuideLines = perspectiveGuideLines; exports.planPaintToolPlayback = planPaintToolPlayback; exports.pointerToPenPoint = pointerToPenPoint; exports.quickStencil = quickStencil; exports.rand01 = _chunkEBDCRTZIcjs.rand01; exports.randSigned = _chunkEBDCRTZIcjs.randSigned; exports.readPaintEffectSource = readPaintEffectSource; exports.readPaintSource = _chunkEBDCRTZIcjs.readPaintSource; exports.readPath = readPath; exports.readSwatch = readSwatch; exports.reliefInfo = reliefInfo; exports.removePaintGradientStop = _chunkEBDCRTZIcjs.removePaintGradientStop; exports.renderBrushThumbnail = renderBrushThumbnail; exports.renderColorWheel = renderColorWheel; exports.renderPaper = _chunkYQ5C5BVKcjs.renderPaper; exports.renderStickers = _chunkYQ5C5BVKcjs.renderStickers; exports.replayFrame = replayFrame; exports.replayItems = replayItems; exports.replayPainting = replayPainting; exports.resolvePaintGradient = _chunkEBDCRTZIcjs.resolvePaintGradient; exports.reversePaintGradient = _chunkEBDCRTZIcjs.reversePaintGradient; exports.rgbToHexColor = rgbToHexColor; exports.rgbToHsl = rgbToHsl; exports.rgbToHsv = rgbToHsv; exports.samplePressure = samplePressure; exports.scalePaintGradient = _chunkEBDCRTZIcjs.scalePaintGradient; exports.scaleStencil = scaleStencil; exports.screenToDocument = screenToDocument; exports.seedFromString = _chunkEBDCRTZIcjs.seedFromString; exports.serializePaintDocument = serializePaintDocument; exports.serializePaintDocumentExternal = serializePaintDocumentExternal; exports.solidPaint = _chunkEBDCRTZIcjs.solidPaint; exports.stampCoverage = _chunkYQ5C5BVKcjs.stampCoverage; exports.standardBlendMode = _chunkCWM3CUUXcjs.standardBlendMode; exports.startWetClock = startWetClock; exports.stencilMask = stencilMask; exports.stencilOutline = stencilOutline; exports.stickerRect = _chunkYQ5C5BVKcjs.stickerRect; exports.stickerSurface = _chunkYQ5C5BVKcjs.stickerSurface; exports.strokeBounds = strokeBounds; exports.strokeDuration = strokeDuration; exports.strokeSchedule = strokeSchedule; exports.sweepPath = sweepPath; exports.symmetryAxisAngles = symmetryAxisAngles; exports.symmetryAxisSegments = symmetryAxisSegments; exports.symmetryCopies = symmetryCopies; exports.thickFromJSON = thickFromJSON; exports.thickToJSON = thickToJSON; exports.thumbnailStroke = thumbnailStroke; exports.tiltToOrientation = _chunkYQ5C5BVKcjs.tiltToOrientation; exports.timeLapseVideo = timeLapseVideo; exports.timeLapseZip = timeLapseZip; exports.toStrokePoint = _chunkYQ5C5BVKcjs.toStrokePoint; exports.toggleStamp = toggleStamp; exports.translateStencil = translateStencil; exports.updatePaintGradientStop = _chunkEBDCRTZIcjs.updatePaintGradientStop; exports.usesPaintExchange = _chunkYQ5C5BVKcjs.usesPaintExchange; exports.variationAffine = variationAffine; exports.varyStroke = varyStroke; exports.viewCssTransform = viewCssTransform; exports.viewMatrix = viewMatrix; exports.viewPenToDocument = viewPenToDocument; exports.wetEngineSummary = wetEngineSummary; exports.wetPaperInput = wetPaperInput; exports.wetPigmentOf = wetPigmentOf; exports.wetSupport = _chunkV7GWZIZKcjs.wetSupport; exports.wheelAngle = wheelAngle; exports.wheelPick = wheelPick; exports.wheelPoint = wheelPoint; exports.wheelToHue = _chunkES3UEVUTcjs.wheelToHue; exports.withPaintPlayback = withPaintPlayback;