@pixodesk/svg-animator-vue 1.0.17 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -39,9 +39,9 @@ var PixodeskAnimatorVue = (() => {
39
39
  "use strict";
40
40
  Object.defineProperty(exports, "__esModule", { value: true });
41
41
  // @__NO_SIDE_EFFECTS__
42
- function makeMap(str) {
42
+ function makeMap(str2) {
43
43
  const map = /* @__PURE__ */ Object.create(null);
44
- for (const key of str.split(",")) map[key] = 1;
44
+ for (const key of str2.split(",")) map[key] = 1;
45
45
  return (val) => val in map;
46
46
  }
47
47
  var EMPTY_OBJ = {};
@@ -89,27 +89,27 @@ var PixodeskAnimatorVue = (() => {
89
89
  );
90
90
  var cacheStringFunction = (fn) => {
91
91
  const cache = /* @__PURE__ */ Object.create(null);
92
- return ((str) => {
93
- const hit = cache[str];
94
- return hit || (cache[str] = fn(str));
92
+ return ((str2) => {
93
+ const hit = cache[str2];
94
+ return hit || (cache[str2] = fn(str2));
95
95
  });
96
96
  };
97
97
  var camelizeRE = /-\w/g;
98
98
  var camelize = cacheStringFunction(
99
- (str) => {
100
- return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
99
+ (str2) => {
100
+ return str2.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
101
101
  }
102
102
  );
103
103
  var hyphenateRE = /\B([A-Z])/g;
104
104
  var hyphenate = cacheStringFunction(
105
- (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
105
+ (str2) => str2.replace(hyphenateRE, "-$1").toLowerCase()
106
106
  );
107
- var capitalize = cacheStringFunction((str) => {
108
- return str.charAt(0).toUpperCase() + str.slice(1);
107
+ var capitalize = cacheStringFunction((str2) => {
108
+ return str2.charAt(0).toUpperCase() + str2.slice(1);
109
109
  });
110
110
  var toHandlerKey = cacheStringFunction(
111
- (str) => {
112
- const s = str ? `on${capitalize(str)}` : ``;
111
+ (str2) => {
112
+ const s = str2 ? `on${capitalize(str2)}` : ``;
113
113
  return s;
114
114
  }
115
115
  );
@@ -402,17 +402,17 @@ var PixodeskAnimatorVue = (() => {
402
402
  }
403
403
  var escapeRE = /["'&<>]/;
404
404
  function escapeHtml(string) {
405
- const str = "" + string;
406
- const match = escapeRE.exec(str);
405
+ const str2 = "" + string;
406
+ const match = escapeRE.exec(str2);
407
407
  if (!match) {
408
- return str;
408
+ return str2;
409
409
  }
410
410
  let html = "";
411
411
  let escaped;
412
412
  let index;
413
413
  let lastIndex = 0;
414
- for (index = match.index; index < str.length; index++) {
415
- switch (str.charCodeAt(index)) {
414
+ for (index = match.index; index < str2.length; index++) {
415
+ switch (str2.charCodeAt(index)) {
416
416
  case 34:
417
417
  escaped = "&quot;";
418
418
  break;
@@ -432,12 +432,12 @@ var PixodeskAnimatorVue = (() => {
432
432
  continue;
433
433
  }
434
434
  if (lastIndex !== index) {
435
- html += str.slice(lastIndex, index);
435
+ html += str2.slice(lastIndex, index);
436
436
  }
437
437
  lastIndex = index + 1;
438
438
  html += escaped;
439
439
  }
440
- return lastIndex !== index ? html + str.slice(lastIndex, index) : html;
440
+ return lastIndex !== index ? html + str2.slice(lastIndex, index) : html;
441
441
  }
442
442
  var commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
443
443
  function escapeHtmlComment(src) {
@@ -628,9 +628,9 @@ var PixodeskAnimatorVue = (() => {
628
628
  "use strict";
629
629
  Object.defineProperty(exports, "__esModule", { value: true });
630
630
  // @__NO_SIDE_EFFECTS__
631
- function makeMap(str) {
631
+ function makeMap(str2) {
632
632
  const map = /* @__PURE__ */ Object.create(null);
633
- for (const key of str.split(",")) map[key] = 1;
633
+ for (const key of str2.split(",")) map[key] = 1;
634
634
  return (val) => val in map;
635
635
  }
636
636
  var EMPTY_OBJ = Object.freeze({});
@@ -678,27 +678,27 @@ var PixodeskAnimatorVue = (() => {
678
678
  );
679
679
  var cacheStringFunction = (fn) => {
680
680
  const cache = /* @__PURE__ */ Object.create(null);
681
- return ((str) => {
682
- const hit = cache[str];
683
- return hit || (cache[str] = fn(str));
681
+ return ((str2) => {
682
+ const hit = cache[str2];
683
+ return hit || (cache[str2] = fn(str2));
684
684
  });
685
685
  };
686
686
  var camelizeRE = /-\w/g;
687
687
  var camelize = cacheStringFunction(
688
- (str) => {
689
- return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
688
+ (str2) => {
689
+ return str2.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
690
690
  }
691
691
  );
692
692
  var hyphenateRE = /\B([A-Z])/g;
693
693
  var hyphenate = cacheStringFunction(
694
- (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
694
+ (str2) => str2.replace(hyphenateRE, "-$1").toLowerCase()
695
695
  );
696
- var capitalize = cacheStringFunction((str) => {
697
- return str.charAt(0).toUpperCase() + str.slice(1);
696
+ var capitalize = cacheStringFunction((str2) => {
697
+ return str2.charAt(0).toUpperCase() + str2.slice(1);
698
698
  });
699
699
  var toHandlerKey = cacheStringFunction(
700
- (str) => {
701
- const s = str ? `on${capitalize(str)}` : ``;
700
+ (str2) => {
701
+ const s = str2 ? `on${capitalize(str2)}` : ``;
702
702
  return s;
703
703
  }
704
704
  );
@@ -991,17 +991,17 @@ var PixodeskAnimatorVue = (() => {
991
991
  }
992
992
  var escapeRE = /["'&<>]/;
993
993
  function escapeHtml(string) {
994
- const str = "" + string;
995
- const match = escapeRE.exec(str);
994
+ const str2 = "" + string;
995
+ const match = escapeRE.exec(str2);
996
996
  if (!match) {
997
- return str;
997
+ return str2;
998
998
  }
999
999
  let html = "";
1000
1000
  let escaped;
1001
1001
  let index;
1002
1002
  let lastIndex = 0;
1003
- for (index = match.index; index < str.length; index++) {
1004
- switch (str.charCodeAt(index)) {
1003
+ for (index = match.index; index < str2.length; index++) {
1004
+ switch (str2.charCodeAt(index)) {
1005
1005
  case 34:
1006
1006
  escaped = "&quot;";
1007
1007
  break;
@@ -1021,12 +1021,12 @@ var PixodeskAnimatorVue = (() => {
1021
1021
  continue;
1022
1022
  }
1023
1023
  if (lastIndex !== index) {
1024
- html += str.slice(lastIndex, index);
1024
+ html += str2.slice(lastIndex, index);
1025
1025
  }
1026
1026
  lastIndex = index + 1;
1027
1027
  html += escaped;
1028
1028
  }
1029
- return lastIndex !== index ? html + str.slice(lastIndex, index) : html;
1029
+ return lastIndex !== index ? html + str2.slice(lastIndex, index) : html;
1030
1030
  }
1031
1031
  var commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
1032
1032
  function escapeHtmlComment(src) {
@@ -8120,9 +8120,9 @@ var PixodeskAnimatorVue = (() => {
8120
8120
  });
8121
8121
  }
8122
8122
  finishOp(type, size) {
8123
- const str = this.input.slice(this.state.pos, this.state.pos + size);
8123
+ const str2 = this.input.slice(this.state.pos, this.state.pos + size);
8124
8124
  this.state.pos += size;
8125
- this.finishToken(type, str);
8125
+ this.finishToken(type, str2);
8126
8126
  }
8127
8127
  readRegexp() {
8128
8128
  const startLoc = this.state.startLoc;
@@ -8216,8 +8216,8 @@ var PixodeskAnimatorVue = (() => {
8216
8216
  throw this.raise(Errors.NumberIdentifier, this.state.curPosition());
8217
8217
  }
8218
8218
  if (isBigInt) {
8219
- const str = this.input.slice(start, this.state.pos).replace(/[_n]/g, "");
8220
- this.finishToken(136, str);
8219
+ const str2 = this.input.slice(start, this.state.pos).replace(/[_n]/g, "");
8220
+ this.finishToken(136, str2);
8221
8221
  return;
8222
8222
  }
8223
8223
  this.finishToken(135, val);
@@ -8281,16 +8281,16 @@ var PixodeskAnimatorVue = (() => {
8281
8281
  if (isIdentifierStart(this.codePointAtPos(this.state.pos))) {
8282
8282
  throw this.raise(Errors.NumberIdentifier, this.state.curPosition());
8283
8283
  }
8284
- const str = this.input.slice(start, this.state.pos).replace(/[_mn]/g, "");
8284
+ const str2 = this.input.slice(start, this.state.pos).replace(/[_mn]/g, "");
8285
8285
  if (isBigInt) {
8286
- this.finishToken(136, str);
8286
+ this.finishToken(136, str2);
8287
8287
  return;
8288
8288
  }
8289
8289
  if (isDecimal) {
8290
- this.finishToken(137, str);
8290
+ this.finishToken(137, str2);
8291
8291
  return;
8292
8292
  }
8293
- const val = isOctal ? parseInt(str, 8) : parseFloat(str);
8293
+ const val = isOctal ? parseInt(str2, 8) : parseFloat(str2);
8294
8294
  this.finishToken(135, val);
8295
8295
  }
8296
8296
  readCodePoint(throwOnInvalid) {
@@ -8303,7 +8303,7 @@ var PixodeskAnimatorVue = (() => {
8303
8303
  }
8304
8304
  readString(quote) {
8305
8305
  const {
8306
- str,
8306
+ str: str2,
8307
8307
  pos,
8308
8308
  curLine,
8309
8309
  lineStart
@@ -8311,7 +8311,7 @@ var PixodeskAnimatorVue = (() => {
8311
8311
  this.state.pos = pos + 1;
8312
8312
  this.state.lineStart = lineStart;
8313
8313
  this.state.curLine = curLine;
8314
- this.finishToken(134, str);
8314
+ this.finishToken(134, str2);
8315
8315
  }
8316
8316
  readTemplateContinuation() {
8317
8317
  if (!this.match(8)) {
@@ -8323,7 +8323,7 @@ var PixodeskAnimatorVue = (() => {
8323
8323
  readTemplateToken() {
8324
8324
  const opening = this.input[this.state.pos];
8325
8325
  const {
8326
- str,
8326
+ str: str2,
8327
8327
  firstInvalidLoc,
8328
8328
  pos,
8329
8329
  curLine,
@@ -8336,10 +8336,10 @@ var PixodeskAnimatorVue = (() => {
8336
8336
  this.state.firstInvalidTemplateEscapePos = new Position(firstInvalidLoc.curLine, firstInvalidLoc.pos - firstInvalidLoc.lineStart, this.sourceToOffsetPos(firstInvalidLoc.pos));
8337
8337
  }
8338
8338
  if (this.input.codePointAt(pos) === 96) {
8339
- this.finishToken(24, firstInvalidLoc ? null : opening + str + "`");
8339
+ this.finishToken(24, firstInvalidLoc ? null : opening + str2 + "`");
8340
8340
  } else {
8341
8341
  this.state.pos++;
8342
- this.finishToken(25, firstInvalidLoc ? null : opening + str + "${");
8342
+ this.finishToken(25, firstInvalidLoc ? null : opening + str2 + "${");
8343
8343
  }
8344
8344
  }
8345
8345
  recordStrictModeErrors(toParseError, at) {
@@ -17045,8 +17045,8 @@ var PixodeskAnimatorVue = (() => {
17045
17045
  return strcmp(mappingA.name, mappingB.name);
17046
17046
  }
17047
17047
  exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
17048
- function parseSourceMapInput(str) {
17049
- return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ""));
17048
+ function parseSourceMapInput(str2) {
17049
+ return JSON.parse(str2.replace(/^\)]}'[^\n]*\n/, ""));
17050
17050
  }
17051
17051
  exports.parseSourceMapInput = parseSourceMapInput;
17052
17052
  function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
@@ -17865,7 +17865,7 @@ var PixodeskAnimatorVue = (() => {
17865
17865
  var temp = {};
17866
17866
  var originalMappings = [];
17867
17867
  var generatedMappings = [];
17868
- var mapping, str, segment, end, value;
17868
+ var mapping, str2, segment, end, value;
17869
17869
  let subarrayStart = 0;
17870
17870
  while (index < length) {
17871
17871
  if (aStr.charAt(index) === ";") {
@@ -17884,7 +17884,7 @@ var PixodeskAnimatorVue = (() => {
17884
17884
  break;
17885
17885
  }
17886
17886
  }
17887
- str = aStr.slice(index, end);
17887
+ str2 = aStr.slice(index, end);
17888
17888
  segment = [];
17889
17889
  while (index < end) {
17890
17890
  base64VLQ.decode(aStr, index, temp);
@@ -18417,11 +18417,11 @@ var PixodeskAnimatorVue = (() => {
18417
18417
  }
18418
18418
  };
18419
18419
  SourceNode.prototype.toString = function SourceNode_toString() {
18420
- var str = "";
18420
+ var str2 = "";
18421
18421
  this.walk(function(chunk) {
18422
- str += chunk;
18422
+ str2 += chunk;
18423
18423
  });
18424
- return str;
18424
+ return str2;
18425
18425
  };
18426
18426
  SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
18427
18427
  var generated = {
@@ -18928,10 +18928,10 @@ var PixodeskAnimatorVue = (() => {
18928
18928
  function isEndOfTagSection(c) {
18929
18929
  return c === 47 || c === 62 || isWhitespace(c);
18930
18930
  }
18931
- function toCharCodes(str) {
18932
- const ret = new Uint8Array(str.length);
18933
- for (let i = 0; i < str.length; i++) {
18934
- ret[i] = str.charCodeAt(i);
18931
+ function toCharCodes(str2) {
18932
+ const ret = new Uint8Array(str2.length);
18933
+ for (let i = 0; i < str2.length; i++) {
18934
+ ret[i] = str2.charCodeAt(i);
18935
18935
  }
18936
18936
  return ret;
18937
18937
  }
@@ -20770,9 +20770,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
20770
20770
  }
20771
20771
  }
20772
20772
  var forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;
20773
- function isAllWhitespace(str) {
20774
- for (let i = 0; i < str.length; i++) {
20775
- if (!isWhitespace(str.charCodeAt(i))) {
20773
+ function isAllWhitespace(str2) {
20774
+ for (let i = 0; i < str2.length; i++) {
20775
+ if (!isWhitespace(str2.charCodeAt(i))) {
20776
20776
  return false;
20777
20777
  }
20778
20778
  }
@@ -21375,26 +21375,26 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
21375
21375
  }
21376
21376
  return removedWhitespace ? nodes.filter(Boolean) : nodes;
21377
21377
  }
21378
- function hasNewlineChar(str) {
21379
- for (let i = 0; i < str.length; i++) {
21380
- const c = str.charCodeAt(i);
21378
+ function hasNewlineChar(str2) {
21379
+ for (let i = 0; i < str2.length; i++) {
21380
+ const c = str2.charCodeAt(i);
21381
21381
  if (c === 10 || c === 13) {
21382
21382
  return true;
21383
21383
  }
21384
21384
  }
21385
21385
  return false;
21386
21386
  }
21387
- function condense(str) {
21387
+ function condense(str2) {
21388
21388
  let ret = "";
21389
21389
  let prevCharIsWhitespace = false;
21390
- for (let i = 0; i < str.length; i++) {
21391
- if (isWhitespace(str.charCodeAt(i))) {
21390
+ for (let i = 0; i < str2.length; i++) {
21391
+ if (isWhitespace(str2.charCodeAt(i))) {
21392
21392
  if (!prevCharIsWhitespace) {
21393
21393
  ret += " ";
21394
21394
  prevCharIsWhitespace = true;
21395
21395
  }
21396
21396
  } else {
21397
- ret += str[i];
21397
+ ret += str2[i];
21398
21398
  prevCharIsWhitespace = false;
21399
21399
  }
21400
21400
  }
@@ -25695,10 +25695,10 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
25695
25695
  function isEndOfTagSection(c) {
25696
25696
  return c === 47 || c === 62 || isWhitespace(c);
25697
25697
  }
25698
- function toCharCodes(str) {
25699
- const ret = new Uint8Array(str.length);
25700
- for (let i = 0; i < str.length; i++) {
25701
- ret[i] = str.charCodeAt(i);
25698
+ function toCharCodes(str2) {
25699
+ const ret = new Uint8Array(str2.length);
25700
+ for (let i = 0; i < str2.length; i++) {
25701
+ ret[i] = str2.charCodeAt(i);
25702
25702
  }
25703
25703
  return ret;
25704
25704
  }
@@ -27541,9 +27541,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
27541
27541
  }
27542
27542
  }
27543
27543
  var forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;
27544
- function isAllWhitespace(str) {
27545
- for (let i = 0; i < str.length; i++) {
27546
- if (!isWhitespace(str.charCodeAt(i))) {
27544
+ function isAllWhitespace(str2) {
27545
+ for (let i = 0; i < str2.length; i++) {
27546
+ if (!isWhitespace(str2.charCodeAt(i))) {
27547
27547
  return false;
27548
27548
  }
27549
27549
  }
@@ -28176,26 +28176,26 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
28176
28176
  }
28177
28177
  return removedWhitespace ? nodes.filter(Boolean) : nodes;
28178
28178
  }
28179
- function hasNewlineChar(str) {
28180
- for (let i = 0; i < str.length; i++) {
28181
- const c = str.charCodeAt(i);
28179
+ function hasNewlineChar(str2) {
28180
+ for (let i = 0; i < str2.length; i++) {
28181
+ const c = str2.charCodeAt(i);
28182
28182
  if (c === 10 || c === 13) {
28183
28183
  return true;
28184
28184
  }
28185
28185
  }
28186
28186
  return false;
28187
28187
  }
28188
- function condense(str) {
28188
+ function condense(str2) {
28189
28189
  let ret = "";
28190
28190
  let prevCharIsWhitespace = false;
28191
- for (let i = 0; i < str.length; i++) {
28192
- if (isWhitespace(str.charCodeAt(i))) {
28191
+ for (let i = 0; i < str2.length; i++) {
28192
+ if (isWhitespace(str2.charCodeAt(i))) {
28193
28193
  if (!prevCharIsWhitespace) {
28194
28194
  ret += " ";
28195
28195
  prevCharIsWhitespace = true;
28196
28196
  }
28197
28197
  } else {
28198
- ret += str[i];
28198
+ ret += str2[i];
28199
28199
  prevCharIsWhitespace = false;
28200
28200
  }
28201
28201
  }
@@ -34456,10 +34456,10 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
34456
34456
  });
34457
34457
  },
34458
34458
  every(fn, thisArg) {
34459
- return apply(this, "every", fn, thisArg, void 0, arguments);
34459
+ return apply2(this, "every", fn, thisArg, void 0, arguments);
34460
34460
  },
34461
34461
  filter(fn, thisArg) {
34462
- return apply(
34462
+ return apply2(
34463
34463
  this,
34464
34464
  "filter",
34465
34465
  fn,
@@ -34469,7 +34469,7 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
34469
34469
  );
34470
34470
  },
34471
34471
  find(fn, thisArg) {
34472
- return apply(
34472
+ return apply2(
34473
34473
  this,
34474
34474
  "find",
34475
34475
  fn,
@@ -34479,10 +34479,10 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
34479
34479
  );
34480
34480
  },
34481
34481
  findIndex(fn, thisArg) {
34482
- return apply(this, "findIndex", fn, thisArg, void 0, arguments);
34482
+ return apply2(this, "findIndex", fn, thisArg, void 0, arguments);
34483
34483
  },
34484
34484
  findLast(fn, thisArg) {
34485
- return apply(
34485
+ return apply2(
34486
34486
  this,
34487
34487
  "findLast",
34488
34488
  fn,
@@ -34492,11 +34492,11 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
34492
34492
  );
34493
34493
  },
34494
34494
  findLastIndex(fn, thisArg) {
34495
- return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
34495
+ return apply2(this, "findLastIndex", fn, thisArg, void 0, arguments);
34496
34496
  },
34497
34497
  // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
34498
34498
  forEach(fn, thisArg) {
34499
- return apply(this, "forEach", fn, thisArg, void 0, arguments);
34499
+ return apply2(this, "forEach", fn, thisArg, void 0, arguments);
34500
34500
  },
34501
34501
  includes(...args) {
34502
34502
  return searchProxy(this, "includes", args);
@@ -34512,7 +34512,7 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
34512
34512
  return searchProxy(this, "lastIndexOf", args);
34513
34513
  },
34514
34514
  map(fn, thisArg) {
34515
- return apply(this, "map", fn, thisArg, void 0, arguments);
34515
+ return apply2(this, "map", fn, thisArg, void 0, arguments);
34516
34516
  },
34517
34517
  pop() {
34518
34518
  return noTracking(this, "pop");
@@ -34531,7 +34531,7 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
34531
34531
  },
34532
34532
  // slice could use ARRAY_ITERATE but also seems to beg for range tracking
34533
34533
  some(fn, thisArg) {
34534
- return apply(this, "some", fn, thisArg, void 0, arguments);
34534
+ return apply2(this, "some", fn, thisArg, void 0, arguments);
34535
34535
  },
34536
34536
  splice(...args) {
34537
34537
  return noTracking(this, "splice", args);
@@ -34568,7 +34568,7 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
34568
34568
  return iter;
34569
34569
  }
34570
34570
  var arrayProto = Array.prototype;
34571
- function apply(self2, method, fn, thisArg, wrappedRetFn, args) {
34571
+ function apply2(self2, method, fn, thisArg, wrappedRetFn, args) {
34572
34572
  const arr = shallowReadArray(self2);
34573
34573
  const needsWrap = arr !== self2 && !/* @__PURE__ */ isShallow(self2);
34574
34574
  const methodFn = arr[method];
@@ -36306,10 +36306,10 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
36306
36306
  });
36307
36307
  },
36308
36308
  every(fn, thisArg) {
36309
- return apply(this, "every", fn, thisArg, void 0, arguments);
36309
+ return apply2(this, "every", fn, thisArg, void 0, arguments);
36310
36310
  },
36311
36311
  filter(fn, thisArg) {
36312
- return apply(
36312
+ return apply2(
36313
36313
  this,
36314
36314
  "filter",
36315
36315
  fn,
@@ -36319,7 +36319,7 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
36319
36319
  );
36320
36320
  },
36321
36321
  find(fn, thisArg) {
36322
- return apply(
36322
+ return apply2(
36323
36323
  this,
36324
36324
  "find",
36325
36325
  fn,
@@ -36329,10 +36329,10 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
36329
36329
  );
36330
36330
  },
36331
36331
  findIndex(fn, thisArg) {
36332
- return apply(this, "findIndex", fn, thisArg, void 0, arguments);
36332
+ return apply2(this, "findIndex", fn, thisArg, void 0, arguments);
36333
36333
  },
36334
36334
  findLast(fn, thisArg) {
36335
- return apply(
36335
+ return apply2(
36336
36336
  this,
36337
36337
  "findLast",
36338
36338
  fn,
@@ -36342,11 +36342,11 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
36342
36342
  );
36343
36343
  },
36344
36344
  findLastIndex(fn, thisArg) {
36345
- return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
36345
+ return apply2(this, "findLastIndex", fn, thisArg, void 0, arguments);
36346
36346
  },
36347
36347
  // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
36348
36348
  forEach(fn, thisArg) {
36349
- return apply(this, "forEach", fn, thisArg, void 0, arguments);
36349
+ return apply2(this, "forEach", fn, thisArg, void 0, arguments);
36350
36350
  },
36351
36351
  includes(...args) {
36352
36352
  return searchProxy(this, "includes", args);
@@ -36362,7 +36362,7 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
36362
36362
  return searchProxy(this, "lastIndexOf", args);
36363
36363
  },
36364
36364
  map(fn, thisArg) {
36365
- return apply(this, "map", fn, thisArg, void 0, arguments);
36365
+ return apply2(this, "map", fn, thisArg, void 0, arguments);
36366
36366
  },
36367
36367
  pop() {
36368
36368
  return noTracking(this, "pop");
@@ -36381,7 +36381,7 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
36381
36381
  },
36382
36382
  // slice could use ARRAY_ITERATE but also seems to beg for range tracking
36383
36383
  some(fn, thisArg) {
36384
- return apply(this, "some", fn, thisArg, void 0, arguments);
36384
+ return apply2(this, "some", fn, thisArg, void 0, arguments);
36385
36385
  },
36386
36386
  splice(...args) {
36387
36387
  return noTracking(this, "splice", args);
@@ -36418,7 +36418,7 @@ const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(",
36418
36418
  return iter;
36419
36419
  }
36420
36420
  var arrayProto = Array.prototype;
36421
- function apply(self2, method, fn, thisArg, wrappedRetFn, args) {
36421
+ function apply2(self2, method, fn, thisArg, wrappedRetFn, args) {
36422
36422
  const arr = shallowReadArray(self2);
36423
36423
  const needsWrap = arr !== self2 && !/* @__PURE__ */ isShallow(self2);
36424
36424
  const methodFn = arr[method];
@@ -46766,8 +46766,8 @@ Server rendered element contains fewer child nodes than client vdom.`
46766
46766
  }
46767
46767
  return false;
46768
46768
  }
46769
- function toClassSet(str) {
46770
- return new Set(str.trim().split(/\s+/));
46769
+ function toClassSet(str2) {
46770
+ return new Set(str2.trim().split(/\s+/));
46771
46771
  }
46772
46772
  function isSetEqual(a, b) {
46773
46773
  if (a.size !== b.size) {
@@ -46780,9 +46780,9 @@ Server rendered element contains fewer child nodes than client vdom.`
46780
46780
  }
46781
46781
  return true;
46782
46782
  }
46783
- function toStyleMap(str) {
46783
+ function toStyleMap(str2) {
46784
46784
  const styleMap = /* @__PURE__ */ new Map();
46785
- for (const item of str.split(";")) {
46785
+ for (const item of str2.split(";")) {
46786
46786
  let [key, value] = item.split(":");
46787
46787
  key = key.trim();
46788
46788
  value = value && value.trim();
@@ -52550,7 +52550,7 @@ Component that was made reactive: `,
52550
52550
  }
52551
52551
  }
52552
52552
  var classifyRE = /(?:^|[-_])\w/g;
52553
- var classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
52553
+ var classify = (str2) => str2.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
52554
52554
  function getComponentName(Component, includeInferred = true) {
52555
52555
  return shared.isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
52556
52556
  }
@@ -56768,6 +56768,7 @@ ${codeFrame}` : message);
56768
56768
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
56769
56769
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
56770
56770
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
56771
+ var __pow = Math.pow;
56771
56772
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
56772
56773
  var __spreadValues = (a, b) => {
56773
56774
  for (var prop in b || (b = {}))
@@ -57648,10 +57649,22 @@ ${codeFrame}` : message);
57648
57649
  outAction: px.enum(["continue", "pause", "reset", "reverse"]).optional(),
57649
57650
  scrollIntoViewThreshold: px.number().optional()
57650
57651
  }));
57652
+ var PxGlyphSchema = implementsInterface()(px.object({
57653
+ width: px.number(),
57654
+ d: px.string()
57655
+ }));
57656
+ var PxGlyphFontSchema = implementsInterface()(px.object({
57657
+ fFamily: px.string(),
57658
+ style: px.string(),
57659
+ ascent: px.number(),
57660
+ unitsPerEm: px.number(),
57661
+ glyphs: px.record(PxGlyphSchema)
57662
+ }));
57651
57663
  var PxDefsSchema = implementsInterface()(px.object({
57652
57664
  easings: px.record(px.tuple([px.number(), px.number(), px.number(), px.number()])).optional(),
57653
57665
  animations: px.record(PxAnimationDefinitionSchema).optional(),
57654
- styles: px.record(px.any()).optional()
57666
+ styles: px.record(px.any()).optional(),
57667
+ glyphs: px.record(PxGlyphFontSchema).optional()
57655
57668
  }));
57656
57669
  var PxAnimatorConfigSchema = implementsInterface()(px.object({
57657
57670
  mode: px.enum([PxAnimatorMode.auto, PxAnimatorMode.webapi, PxAnimatorMode.frames]).optional(),
@@ -57763,6 +57776,9 @@ ${codeFrame}` : message);
57763
57776
  startOffset: PxAnimatableNumberSchema.optional(),
57764
57777
  textLength: PxAnimatableNumberSchema.optional()
57765
57778
  }));
57779
+ var PxTextEffectSchema = implementsInterface()(px.object({
57780
+ useGlyphs: px.boolean().optional()
57781
+ }));
57766
57782
  var PxEffectsSchema = implementsInterface()(px.object({
57767
57783
  transformation: PxTransformationEffectSchema.optional(),
57768
57784
  repeater: PxRepeaterEffectSchema.optional(),
@@ -57772,7 +57788,8 @@ ${codeFrame}` : message);
57772
57788
  isCombinedShape: px.boolean().optional(),
57773
57789
  fillGradient: PxFillGradientEffectSchema.optional(),
57774
57790
  strokeGradient: PxStrokeGradientEffectSchema.optional(),
57775
- textAlongPath: PxTextAlongPathEffectSchema.optional()
57791
+ textAlongPath: PxTextAlongPathEffectSchema.optional(),
57792
+ text: PxTextEffectSchema.optional()
57776
57793
  }));
57777
57794
  function validateNodeEffects(root, opts) {
57778
57795
  const warnings = [];
@@ -58662,6 +58679,57 @@ ${codeFrame}` : message);
58662
58679
  }
58663
58680
  }
58664
58681
  }
58682
+ var jsonElementFactory = (type, props, children) => {
58683
+ const node = { type };
58684
+ for (const k in props) if (props[k] !== void 0) node[k] = props[k];
58685
+ const arr = Array.isArray(children) ? children.filter((c) => c != null) : children != null ? [children] : [];
58686
+ if (arr.length) node.children = arr;
58687
+ return node;
58688
+ };
58689
+ function fmt(v, decimals) {
58690
+ return Math.round(v) === v ? "" + Math.round(v) : v.toFixed(decimals);
58691
+ }
58692
+ function pack(nums, decimals) {
58693
+ let s = "";
58694
+ for (let i = 0; i < nums.length; i++) {
58695
+ const str2 = fmt(nums[i], decimals);
58696
+ if (i > 0 && str2.charCodeAt(0) !== 45) s += " ";
58697
+ s += str2;
58698
+ }
58699
+ return s;
58700
+ }
58701
+ function apply(m, x, y) {
58702
+ return [m[0] * x + m[2] * y + m[4], m[1] * x + m[3] * y + m[5]];
58703
+ }
58704
+ var TOKEN_RE = /([MLCQZ])|(-?\d*\.?\d+(?:e[-+]?\d+)?)/gi;
58705
+ function transformPathData(d, m, decimals = 2) {
58706
+ const tokens = [];
58707
+ let match;
58708
+ TOKEN_RE.lastIndex = 0;
58709
+ while ((match = TOKEN_RE.exec(d)) !== null) tokens.push(match[0]);
58710
+ let out = "";
58711
+ let i = 0;
58712
+ const num2 = () => parseFloat(tokens[i++]);
58713
+ while (i < tokens.length) {
58714
+ const cmd = tokens[i++];
58715
+ if (cmd === "M" || cmd === "L") {
58716
+ const [x, y] = apply(m, num2(), num2());
58717
+ out += cmd + pack([x, y], decimals);
58718
+ } else if (cmd === "C") {
58719
+ const [x1, y1] = apply(m, num2(), num2());
58720
+ const [x2, y2] = apply(m, num2(), num2());
58721
+ const [x, y] = apply(m, num2(), num2());
58722
+ out += "C" + pack([x1, y1, x2, y2, x, y], decimals);
58723
+ } else if (cmd === "Q") {
58724
+ const [x1, y1] = apply(m, num2(), num2());
58725
+ const [x, y] = apply(m, num2(), num2());
58726
+ out += "Q" + pack([x1, y1, x, y], decimals);
58727
+ } else if (cmd === "Z" || cmd === "z") {
58728
+ out += "Z";
58729
+ }
58730
+ }
58731
+ return out;
58732
+ }
58665
58733
  function bezierToSvgPath(path) {
58666
58734
  var _a, _b, _c, _d;
58667
58735
  const v = path.v;
@@ -59033,6 +59101,24 @@ ${codeFrame}` : message);
59033
59101
  }
59034
59102
  return { ts, ds };
59035
59103
  }
59104
+ function bezier2D_tForDistance(lut, distance) {
59105
+ const { ts, ds } = lut;
59106
+ const last = ds.length - 1;
59107
+ if (distance <= 0) return ts[0];
59108
+ if (distance >= ds[last]) return ts[last];
59109
+ let lo = 1;
59110
+ let hi = last;
59111
+ while (lo < hi) {
59112
+ const mid = lo + hi >>> 1;
59113
+ if (ds[mid] < distance) lo = mid + 1;
59114
+ else hi = mid;
59115
+ }
59116
+ const dPrev = ds[hi - 1];
59117
+ const dCur = ds[hi];
59118
+ const span = dCur - dPrev;
59119
+ const frac = span > 0 ? (distance - dPrev) / span : 0;
59120
+ return ts[hi - 1] + frac * (ts[hi] - ts[hi - 1]);
59121
+ }
59036
59122
  function bezier2D_arcAtT(lut, t) {
59037
59123
  const { ts, ds } = lut;
59038
59124
  const last = ts.length - 1;
@@ -59054,6 +59140,435 @@ ${codeFrame}` : message);
59054
59140
  const flipped = [easing[1], easing[0], easing[3], easing[2]];
59055
59141
  return cubicBezier(flipped);
59056
59142
  }
59143
+ var LUT_STEPS = 48;
59144
+ var CMD_RE = /[MmLlHhVvCcSsQqTtAaZz]/;
59145
+ function tokenize(d) {
59146
+ const tokens = [];
59147
+ const re = /([MmLlHhVvCcSsQqTtAaZz])|(-?\d*\.?\d+(?:[eE][-+]?\d+)?)/g;
59148
+ let m;
59149
+ while ((m = re.exec(d)) !== null) tokens.push(m[0]);
59150
+ return tokens;
59151
+ }
59152
+ function quadToCubic(P0, Qc, P3) {
59153
+ return {
59154
+ P1: [P0[0] + 2 / 3 * (Qc[0] - P0[0]), P0[1] + 2 / 3 * (Qc[1] - P0[1])],
59155
+ P2: [P3[0] + 2 / 3 * (Qc[0] - P3[0]), P3[1] + 2 / 3 * (Qc[1] - P3[1])]
59156
+ };
59157
+ }
59158
+ function parseCubics(d) {
59159
+ const tokens = tokenize(d);
59160
+ const segs = [];
59161
+ let i = 0;
59162
+ let cx = 0, cy = 0;
59163
+ let sx = 0, sy = 0;
59164
+ let pcx = 0, pcy = 0;
59165
+ let pqx = 0, pqy = 0;
59166
+ let prevCmd = "";
59167
+ const num2 = () => parseFloat(tokens[i++]);
59168
+ const push = (P1, P2, P3) => {
59169
+ const P0 = [cx, cy];
59170
+ const lut = bezier2D_arcLengthLUT(P0, P1, P2, P3, LUT_STEPS);
59171
+ segs.push({ P0, P1, P2, P3, lut, len: lut.ds[lut.ds.length - 1] });
59172
+ cx = P3[0];
59173
+ cy = P3[1];
59174
+ };
59175
+ const pushLine = (x, y) => {
59176
+ push(
59177
+ [cx + (x - cx) / 3, cy + (y - cy) / 3],
59178
+ [cx + 2 * (x - cx) / 3, cy + 2 * (y - cy) / 3],
59179
+ [x, y]
59180
+ );
59181
+ };
59182
+ while (i < tokens.length) {
59183
+ let cmd = tokens[i];
59184
+ if (CMD_RE.test(cmd)) i++;
59185
+ else cmd = prevCmd === "M" ? "L" : prevCmd === "m" ? "l" : prevCmd;
59186
+ const rel = cmd >= "a";
59187
+ const U = cmd.toUpperCase();
59188
+ if (U === "Z") {
59189
+ pushLine(sx, sy);
59190
+ cx = sx;
59191
+ cy = sy;
59192
+ prevCmd = cmd;
59193
+ continue;
59194
+ }
59195
+ if (U === "M") {
59196
+ const x = num2() + (rel ? cx : 0), y = num2() + (rel ? cy : 0);
59197
+ cx = x;
59198
+ cy = y;
59199
+ sx = x;
59200
+ sy = y;
59201
+ prevCmd = cmd;
59202
+ continue;
59203
+ }
59204
+ if (U === "L") {
59205
+ pushLine(num2() + (rel ? cx : 0), num2() + (rel ? cy : 0));
59206
+ } else if (U === "H") {
59207
+ pushLine(num2() + (rel ? cx : 0), cy);
59208
+ } else if (U === "V") {
59209
+ pushLine(cx, num2() + (rel ? cy : 0));
59210
+ } else if (U === "C") {
59211
+ const p1 = [num2() + (rel ? cx : 0), num2() + (rel ? cy : 0)];
59212
+ const p2 = [num2() + (rel ? cx : 0), num2() + (rel ? cy : 0)];
59213
+ const p3 = [num2() + (rel ? cx : 0), num2() + (rel ? cy : 0)];
59214
+ pcx = p2[0];
59215
+ pcy = p2[1];
59216
+ push(p1, p2, p3);
59217
+ } else if (U === "S") {
59218
+ const smooth = prevCmd.toUpperCase() === "C" || prevCmd.toUpperCase() === "S";
59219
+ const p1 = smooth ? [2 * cx - pcx, 2 * cy - pcy] : [cx, cy];
59220
+ const p2 = [num2() + (rel ? cx : 0), num2() + (rel ? cy : 0)];
59221
+ const p3 = [num2() + (rel ? cx : 0), num2() + (rel ? cy : 0)];
59222
+ pcx = p2[0];
59223
+ pcy = p2[1];
59224
+ push(p1, p2, p3);
59225
+ } else if (U === "Q") {
59226
+ const qc = [num2() + (rel ? cx : 0), num2() + (rel ? cy : 0)];
59227
+ const p3 = [num2() + (rel ? cx : 0), num2() + (rel ? cy : 0)];
59228
+ pqx = qc[0];
59229
+ pqy = qc[1];
59230
+ const { P1, P2 } = quadToCubic([cx, cy], qc, p3);
59231
+ push(P1, P2, p3);
59232
+ } else if (U === "T") {
59233
+ const smooth = prevCmd.toUpperCase() === "Q" || prevCmd.toUpperCase() === "T";
59234
+ const qc = smooth ? [2 * cx - pqx, 2 * cy - pqy] : [cx, cy];
59235
+ const p3 = [num2() + (rel ? cx : 0), num2() + (rel ? cy : 0)];
59236
+ pqx = qc[0];
59237
+ pqy = qc[1];
59238
+ const { P1, P2 } = quadToCubic([cx, cy], qc, p3);
59239
+ push(P1, P2, p3);
59240
+ } else if (U === "A") {
59241
+ i += 5;
59242
+ pushLine(num2() + (rel ? cx : 0), num2() + (rel ? cy : 0));
59243
+ } else {
59244
+ i++;
59245
+ continue;
59246
+ }
59247
+ prevCmd = cmd;
59248
+ }
59249
+ return segs.length ? segs : null;
59250
+ }
59251
+ function clamp2(v, lo, hi) {
59252
+ return v < lo ? lo : v > hi ? hi : v;
59253
+ }
59254
+ function createPathSampler(d) {
59255
+ const segs = parseCubics(d);
59256
+ if (!segs) return null;
59257
+ const cum = new Float64Array(segs.length + 1);
59258
+ for (let k = 0; k < segs.length; k++) cum[k + 1] = cum[k] + segs[k].len;
59259
+ const totalLength = cum[segs.length];
59260
+ const start = segs[0].P0, end = segs[segs.length - 1].P3;
59261
+ const closed = Math.hypot(end[0] - start[0], end[1] - start[1]) < 1e-3;
59262
+ const sampleOn = (dist) => {
59263
+ let k = 0;
59264
+ while (k < segs.length - 1 && dist > cum[k + 1]) k++;
59265
+ const seg = segs[k];
59266
+ const local = dist - cum[k];
59267
+ const t = seg.len > 0 ? bezier2D_tForDistance(seg.lut, local) : 0;
59268
+ const [x, y] = bezier2D_pointAt(seg.P0, seg.P1, seg.P2, seg.P3, t);
59269
+ const [dx, dy] = bezier2D_derivativeAt(seg.P0, seg.P1, seg.P2, seg.P3, t);
59270
+ return { x, y, angle: Math.atan2(dy, dx) };
59271
+ };
59272
+ return {
59273
+ totalLength,
59274
+ sampleAtDistance(dist) {
59275
+ if (!closed && (dist < 0 || dist > totalLength)) {
59276
+ const edge = dist < 0 ? 0 : totalLength;
59277
+ const p = sampleOn(edge);
59278
+ const over = dist - edge;
59279
+ return { x: p.x + Math.cos(p.angle) * over, y: p.y + Math.sin(p.angle) * over, angle: p.angle };
59280
+ }
59281
+ return sampleOn(clamp2(dist, 0, totalLength));
59282
+ }
59283
+ };
59284
+ }
59285
+ var DEFAULT_FONT_SIZE = 16;
59286
+ var TEXT_ATTR_KEYS = [
59287
+ "fontFamily",
59288
+ "fontSize",
59289
+ "fontWeight",
59290
+ "fontStyle",
59291
+ "textAnchor",
59292
+ "letterSpacing",
59293
+ "wordSpacing",
59294
+ "textDecoration",
59295
+ "textTransform",
59296
+ "whiteSpace",
59297
+ "x",
59298
+ "y",
59299
+ "dx",
59300
+ "dy",
59301
+ "lengthAdjust",
59302
+ "fill",
59303
+ "stroke",
59304
+ "strokeWidth",
59305
+ "effects",
59306
+ TEXT_ATTR,
59307
+ TEXT_CONTENT_ATTR,
59308
+ "xml:space"
59309
+ ];
59310
+ function parseLen(v) {
59311
+ if (typeof v === "number") return v;
59312
+ if (typeof v === "string") {
59313
+ const n = parseFloat(v);
59314
+ return isNaN(n) ? void 0 : n;
59315
+ }
59316
+ return void 0;
59317
+ }
59318
+ function str(v) {
59319
+ return typeof v === "string" ? v : void 0;
59320
+ }
59321
+ function resolveStyle(node, parent) {
59322
+ var _a, _b, _c, _d, _e, _f, _g;
59323
+ return {
59324
+ fontFamily: (_a = str(node.fontFamily)) != null ? _a : parent.fontFamily,
59325
+ fontSize: (_b = parseLen(node.fontSize)) != null ? _b : parent.fontSize,
59326
+ fill: (_c = node.fill) != null ? _c : parent.fill,
59327
+ stroke: (_d = node.stroke) != null ? _d : parent.stroke,
59328
+ strokeWidth: (_e = node.strokeWidth) != null ? _e : parent.strokeWidth,
59329
+ letterSpacing: (_f = parseLen(node.letterSpacing)) != null ? _f : parent.letterSpacing,
59330
+ wordSpacing: (_g = parseLen(node.wordSpacing)) != null ? _g : parent.wordSpacing
59331
+ };
59332
+ }
59333
+ function rootStyleOf(node) {
59334
+ var _a, _b, _c;
59335
+ return {
59336
+ fontFamily: str(node.fontFamily),
59337
+ fontSize: (_a = parseLen(node.fontSize)) != null ? _a : DEFAULT_FONT_SIZE,
59338
+ fill: node.fill,
59339
+ stroke: node.stroke,
59340
+ strokeWidth: node.strokeWidth,
59341
+ letterSpacing: (_b = parseLen(node.letterSpacing)) != null ? _b : 0,
59342
+ wordSpacing: (_c = parseLen(node.wordSpacing)) != null ? _c : 0
59343
+ };
59344
+ }
59345
+ function paintOf(s) {
59346
+ const p = {};
59347
+ if (s.fill !== void 0) p.fill = s.fill;
59348
+ if (s.stroke !== void 0) p.stroke = s.stroke;
59349
+ if (s.strokeWidth !== void 0) p.strokeWidth = s.strokeWidth;
59350
+ return p;
59351
+ }
59352
+ function glyphFontFor(s, glyphs, soleFont, warnings) {
59353
+ var _a;
59354
+ const gf = s.fontFamily ? glyphs[s.fontFamily] : soleFont;
59355
+ if (!gf) warnings == null ? void 0 : warnings.push('textGlyphs: no glyphs for font "' + ((_a = s.fontFamily) != null ? _a : "") + '"');
59356
+ return gf;
59357
+ }
59358
+ function soleFontOf(glyphs) {
59359
+ const names = Object.keys(glyphs);
59360
+ return names.length === 1 ? glyphs[names[0]] : void 0;
59361
+ }
59362
+ function materialiseGlyphTextHorizontal(node, opts) {
59363
+ var _a, _b, _c, _d;
59364
+ const { glyphs, create = jsonElementFactory, warnings } = opts;
59365
+ const soleFont = soleFontOf(glyphs);
59366
+ const pen = { x: (_a = parseLen(node.x)) != null ? _a : 0, y: (_b = parseLen(node.y)) != null ? _b : 0 };
59367
+ const placements = [];
59368
+ const lines = [{ start: pen.x, end: pen.x }];
59369
+ let line = 0;
59370
+ const renderChars = (content, s) => {
59371
+ const gf = glyphFontFor(s, glyphs, soleFont, warnings);
59372
+ if (!gf) return;
59373
+ const scale = s.fontSize / gf.unitsPerEm;
59374
+ const paint = paintOf(s);
59375
+ for (let i = 0; i < content.length; i++) {
59376
+ const ch = content.charAt(i);
59377
+ const g = gf.glyphs[ch];
59378
+ if (g && g.d) placements.push({ glyphD: g.d, m: [scale, 0, 0, scale, pen.x, pen.y], paint, line, x: pen.x, y: pen.y, scale });
59379
+ pen.x += (g ? g.width : 0) * scale + s.letterSpacing + (ch === " " ? s.wordSpacing : 0);
59380
+ lines[line].end = pen.x;
59381
+ }
59382
+ };
59383
+ const walk = (el, parentStyle) => {
59384
+ var _a2, _b2, _c2, _d2;
59385
+ const s = resolveStyle(el, parentStyle);
59386
+ const x = parseLen(el.x);
59387
+ const y = parseLen(el.y);
59388
+ if (x !== void 0) {
59389
+ pen.x = x;
59390
+ line = lines.length;
59391
+ lines.push({ start: pen.x, end: pen.x });
59392
+ }
59393
+ if (y !== void 0) pen.y = y;
59394
+ pen.x += (_a2 = parseLen(el.dx)) != null ? _a2 : 0;
59395
+ pen.y += (_b2 = parseLen(el.dy)) != null ? _b2 : 0;
59396
+ const content = (_c2 = str(el[TEXT_ATTR])) != null ? _c2 : str(el[TEXT_CONTENT_ATTR]);
59397
+ if (content && !((_d2 = el.children) == null ? void 0 : _d2.length)) renderChars(content, s);
59398
+ if (el.children) for (const ch of el.children) walk(ch, s);
59399
+ };
59400
+ const rootStyle = rootStyleOf(node);
59401
+ if (node.children) for (const ch of node.children) walk(ch, rootStyle);
59402
+ const rootContent = (_c = str(node[TEXT_ATTR])) != null ? _c : str(node[TEXT_CONTENT_ATTR]);
59403
+ if (rootContent && !((_d = node.children) == null ? void 0 : _d.length)) renderChars(rootContent, rootStyle);
59404
+ const anchor = str(node.textAnchor);
59405
+ if (anchor === "middle" || anchor === "end") {
59406
+ for (const p of placements) {
59407
+ const w = lines[p.line].end - lines[p.line].start;
59408
+ const shift = anchor === "middle" ? -w / 2 : -w;
59409
+ p.m = [p.scale, 0, 0, p.scale, p.x + shift, p.y];
59410
+ }
59411
+ }
59412
+ return toGroup(node, buildPaths(placements, create, warnings), create);
59413
+ }
59414
+ function collectAlongPathCells(node, glyphs, soleFont, warnings) {
59415
+ const cells = [];
59416
+ let adv = 0;
59417
+ const walk = (el, parentStyle) => {
59418
+ var _a, _b;
59419
+ const s = resolveStyle(el, parentStyle);
59420
+ const content = (_a = str(el[TEXT_ATTR])) != null ? _a : str(el[TEXT_CONTENT_ATTR]);
59421
+ if (content && !((_b = el.children) == null ? void 0 : _b.length)) {
59422
+ const gf = glyphFontFor(s, glyphs, soleFont, warnings);
59423
+ if (gf) {
59424
+ const scale = s.fontSize / gf.unitsPerEm;
59425
+ const paint = paintOf(s);
59426
+ for (let i = 0; i < content.length; i++) {
59427
+ const ch = content.charAt(i);
59428
+ const g = gf.glyphs[ch];
59429
+ const glyphAdv = (g ? g.width : 0) * scale;
59430
+ if (g && g.d) cells.push({ glyphD: g.d, widthEm: g.width, scale, paint, midBase: adv + glyphAdv / 2 });
59431
+ adv += glyphAdv + s.letterSpacing + (ch === " " ? s.wordSpacing : 0);
59432
+ }
59433
+ }
59434
+ }
59435
+ if (el.children) for (const ch of el.children) walk(ch, s);
59436
+ };
59437
+ walk(node, rootStyleOf(node));
59438
+ return { cells, width: adv };
59439
+ }
59440
+ function alongAffine(sampler, dist, scale, widthEm) {
59441
+ const { x, y, angle } = sampler.sampleAtDistance(dist);
59442
+ const cos = Math.cos(angle), sin = Math.sin(angle), hw = widthEm / 2;
59443
+ return [scale * cos, scale * sin, -scale * sin, scale * cos, x - scale * cos * hw, y - scale * sin * hw];
59444
+ }
59445
+ function materialiseGlyphTextAlongPath(node, pathD, startOffset, opts, textLength) {
59446
+ var _a;
59447
+ const { glyphs, create = jsonElementFactory, warnings } = opts;
59448
+ const sampler = pathD ? createPathSampler(pathD) : null;
59449
+ if (!sampler) {
59450
+ warnings == null ? void 0 : warnings.push("textGlyphs: unparsable along-path geometry");
59451
+ return null;
59452
+ }
59453
+ const soleFont = soleFontOf(glyphs);
59454
+ const { cells, width } = collectAlongPathCells(node, glyphs, soleFont, warnings);
59455
+ if (!cells.length) return toGroup(node, [], create);
59456
+ if (textLength && textLength > 0 && width > 0) {
59457
+ const k = textLength / width;
59458
+ for (const c of cells) c.midBase *= k;
59459
+ }
59460
+ const so = readAnimatable(startOffset);
59461
+ if (so.kind === "animated" && so.keyframes.length >= 2) {
59462
+ return toGroup(node, buildAnimatedAlongPath(cells, sampler, so.keyframes, so.loop, create), create);
59463
+ }
59464
+ const base = so.kind === "animated" ? Number((_a = so.keyframes[0]) == null ? void 0 : _a.value) || 0 : so.kind === "static" ? Number(so.value) || 0 : 0;
59465
+ const placements = cells.map((c) => ({
59466
+ glyphD: c.glyphD,
59467
+ paint: c.paint,
59468
+ m: alongAffine(sampler, base + c.midBase, c.scale, c.widthEm)
59469
+ }));
59470
+ return toGroup(node, buildPaths(placements, create, warnings), create);
59471
+ }
59472
+ var ALONG_PATH_MAX_STEPS = 48;
59473
+ var ALONG_PATH_MAX_STEPS_PER_SEGMENT = 64;
59474
+ function roundN(v, n) {
59475
+ const f = __pow(10, n);
59476
+ return Math.round(v * f) / f;
59477
+ }
59478
+ function buildAnimatedAlongPath(cells, sampler, sokfs, loop, create) {
59479
+ const step = Math.max(sampler.totalLength / ALONG_PATH_MAX_STEPS, 0.5);
59480
+ const timeOf = (kf) => Number(kf.time) || 0;
59481
+ const offOf = (kf) => Number(kf.value) || 0;
59482
+ const out = [];
59483
+ for (const c of cells) {
59484
+ const centred = [c.scale, 0, 0, c.scale, -c.scale * (c.widthEm / 2), 0];
59485
+ const d = transformPathData(c.glyphD, centred);
59486
+ const sampleKf = (dist, time) => {
59487
+ const { x, y, angle } = sampler.sampleAtDistance(dist);
59488
+ return {
59489
+ time,
59490
+ value: {
59491
+ [
59492
+ "translate"
59493
+ /* Translate */
59494
+ ]: [roundN(x, 3), roundN(y, 3)],
59495
+ [
59496
+ "rotate"
59497
+ /* Rotate */
59498
+ ]: roundN(angle * 180 / Math.PI, 3)
59499
+ }
59500
+ };
59501
+ };
59502
+ const kfs = [sampleKf(offOf(sokfs[0]) + c.midBase, timeOf(sokfs[0]))];
59503
+ for (let k = 1; k < sokfs.length; k++) {
59504
+ const t0 = timeOf(sokfs[k - 1]), t1 = timeOf(sokfs[k]);
59505
+ const o0 = offOf(sokfs[k - 1]), o1 = offOf(sokfs[k]);
59506
+ const n = Math.min(ALONG_PATH_MAX_STEPS_PER_SEGMENT, Math.max(1, Math.ceil(Math.abs(o1 - o0) / step)));
59507
+ for (let s = 1; s <= n; s++) {
59508
+ const f = s / n;
59509
+ kfs.push(sampleKf(o0 + f * (o1 - o0) + c.midBase, t0 + f * (t1 - t0)));
59510
+ }
59511
+ }
59512
+ const transform = { keyframes: kfs };
59513
+ if (loop !== void 0) transform.loop = loop;
59514
+ out.push(create("path", __spreadProps(__spreadValues({ d }, paintProps(c.paint)), { animate: { transform } }), []));
59515
+ }
59516
+ return out;
59517
+ }
59518
+ function paintProps(paint) {
59519
+ const p = {};
59520
+ if (paint.fill !== void 0) p.fill = paint.fill;
59521
+ if (paint.stroke !== void 0) p.stroke = paint.stroke;
59522
+ if (paint.strokeWidth !== void 0) p.strokeWidth = paint.strokeWidth;
59523
+ return p;
59524
+ }
59525
+ function buildPaths(placements, create, warnings) {
59526
+ var _a, _b, _c;
59527
+ if (!placements.length) {
59528
+ warnings == null ? void 0 : warnings.push("textGlyphs: nothing to render");
59529
+ return [];
59530
+ }
59531
+ const byPaint = /* @__PURE__ */ new Map();
59532
+ for (const p of placements) {
59533
+ const key = JSON.stringify([(_a = p.paint.fill) != null ? _a : null, (_b = p.paint.stroke) != null ? _b : null, (_c = p.paint.strokeWidth) != null ? _c : null]);
59534
+ const baked = transformPathData(p.glyphD, p.m);
59535
+ const entry = byPaint.get(key);
59536
+ if (entry) entry.d += baked;
59537
+ else byPaint.set(key, { paint: p.paint, d: baked });
59538
+ }
59539
+ const out = [];
59540
+ for (const { paint, d } of byPaint.values()) out.push(create("path", __spreadValues({ d }, paintProps(paint)), []));
59541
+ return out;
59542
+ }
59543
+ function toGroup(node, children, create) {
59544
+ const gProps = {};
59545
+ for (const k of Object.keys(node)) {
59546
+ if (k === "type" || k === "children" || TEXT_ATTR_KEYS.indexOf(k) !== -1) continue;
59547
+ gProps[k] = node[k];
59548
+ }
59549
+ if (gProps.style && typeof gProps.style === "object") {
59550
+ const style = __spreadValues({}, gProps.style);
59551
+ delete style["white-space"];
59552
+ if (Object.keys(style).length) gProps.style = style;
59553
+ else delete gProps.style;
59554
+ }
59555
+ return create("g", gProps, children);
59556
+ }
59557
+ function applyTextGlyphsEffect(node, fx, ctx) {
59558
+ if (!(fx == null ? void 0 : fx.useGlyphs)) return node;
59559
+ if (!ctx.glyphs) {
59560
+ ctx.warnings.push("textGlyphs: no definitions.glyphs \u2014 left as native <text>");
59561
+ return node;
59562
+ }
59563
+ return materialiseGlyphTextHorizontal(node, { glyphs: ctx.glyphs, warnings: ctx.warnings });
59564
+ }
59565
+ function applyTextGlyphsAlongPath(node, ctx, pathD, startOffset, textLength) {
59566
+ if (!ctx.glyphs) {
59567
+ ctx.warnings.push("textGlyphs: no definitions.glyphs");
59568
+ return null;
59569
+ }
59570
+ return materialiseGlyphTextAlongPath(node, pathD, startOffset, { glyphs: ctx.glyphs, warnings: ctx.warnings }, textLength);
59571
+ }
59057
59572
  function getKfTranslate(kf) {
59058
59573
  var _a;
59059
59574
  const v = (_a = kf.value) != null ? _a : kf.v;
@@ -59494,12 +60009,12 @@ ${codeFrame}` : message);
59494
60009
  }
59495
60010
  return res;
59496
60011
  }
59497
- function extractPathData(str) {
59498
- if (str.startsWith("path(") && str.endsWith(")")) {
59499
- return str.slice(5, -1);
60012
+ function extractPathData(str2) {
60013
+ if (str2.startsWith("path(") && str2.endsWith(")")) {
60014
+ return str2.slice(5, -1);
59500
60015
  }
59501
- if (/^[MmZzLlHhVvCcSsQqTtAa]/.test(str)) {
59502
- return str;
60016
+ if (/^[MmZzLlHhVvCcSsQqTtAa]/.test(str2)) {
60017
+ return str2;
59503
60018
  }
59504
60019
  return void 0;
59505
60020
  }
@@ -60420,7 +60935,7 @@ ${codeFrame}` : message);
60420
60935
  return "M" + (x + w) + "," + y + "L" + (x + w) + "," + (y + h3) + "L" + x + "," + (y + h3) + "L" + x + "," + y + "L" + (x + w) + "," + y + "z";
60421
60936
  }
60422
60937
  function applyPlayerEffects(root) {
60423
- var _a;
60938
+ var _a, _b;
60424
60939
  const ctx = {
60425
60940
  defs: [],
60426
60941
  warnings: [],
@@ -60431,7 +60946,8 @@ ${codeFrame}` : message);
60431
60946
  maskAncestorChains: /* @__PURE__ */ new Map(),
60432
60947
  // Resolved engine: `frames` ONLY when explicitly set; auto/webapi/unset →
60433
60948
  // webapi (we're not 100% sure it's frames, and CSS/WAAPI need the inline form).
60434
- engine: ((_a = getAnimatorConfig(root)) == null ? void 0 : _a.mode) === PxAnimatorMode.frames ? PxAnimatorEngine.frames : PxAnimatorEngine.webapi
60949
+ engine: ((_a = getAnimatorConfig(root)) == null ? void 0 : _a.mode) === PxAnimatorMode.frames ? PxAnimatorEngine.frames : PxAnimatorEngine.webapi,
60950
+ glyphs: (_b = getDefs(root)) == null ? void 0 : _b.glyphs
60435
60951
  };
60436
60952
  const working = clone(root);
60437
60953
  indexById(working, ctx.idMap);
@@ -60443,16 +60959,34 @@ ${codeFrame}` : message);
60443
60959
  return { root: out, defs: ctx.defs, warnings: ctx.warnings, errors: ctx.errors };
60444
60960
  }
60445
60961
  function applyPlayerEffects_exceptRetime(node, ctx) {
60962
+ var _a;
60446
60963
  if (node.children) node.children = node.children.map((child) => applyPlayerEffects_exceptRetime(child, ctx));
60447
60964
  const fx = node.effects;
60448
60965
  const originalId = typeof node.id === "string" ? node.id : void 0;
60449
60966
  const innerIdForContentRef = originalId ? ctx.contentRefInnerIds.get(originalId) : void 0;
60450
60967
  if (!fx && !innerIdForContentRef) return node;
60451
- const { transformation, repeater, maskedBy, trimPath, clone: cloneFx, fillGradient, strokeGradient, textAlongPath } = fx != null ? fx : {};
60968
+ const { transformation, repeater, maskedBy, trimPath, clone: cloneFx, fillGradient, strokeGradient, textAlongPath, text } = fx != null ? fx : {};
60452
60969
  const isCombinedShape = fx == null ? void 0 : fx.isCombinedShape;
60453
60970
  if (fx) delete node.effects;
60454
60971
  let n = node;
60455
- n = applyTextAlongPathEffect(n, textAlongPath, ctx);
60972
+ let consumedByGlyphs = false;
60973
+ if (text == null ? void 0 : text.useGlyphs) {
60974
+ if (textAlongPath) {
60975
+ const pathNode = typeof textAlongPath.href === "string" ? ctx.idMap.get(textAlongPath.href) : void 0;
60976
+ const pathD = pathNode && typeof pathNode.d === "string" ? pathNode.d : void 0;
60977
+ const rawTL = textAlongPath.textLength;
60978
+ const textLength = typeof rawTL === "number" ? rawTL : rawTL && typeof rawTL === "object" ? typeof rawTL.value === "number" ? rawTL.value : Array.isArray(rawTL.keyframes) && rawTL.keyframes.length ? Number((_a = rawTL.keyframes[0]) == null ? void 0 : _a.value) : void 0 : void 0;
60979
+ const glyphed = applyTextGlyphsAlongPath(n, ctx, pathD, textAlongPath.startOffset, textLength);
60980
+ if (glyphed) {
60981
+ n = glyphed;
60982
+ consumedByGlyphs = true;
60983
+ }
60984
+ } else {
60985
+ n = applyTextGlyphsEffect(n, text, ctx);
60986
+ consumedByGlyphs = true;
60987
+ }
60988
+ }
60989
+ if (!consumedByGlyphs) n = applyTextAlongPathEffect(n, textAlongPath, ctx);
60456
60990
  n = applyFillGradientEffect(n, fillGradient, ctx);
60457
60991
  n = applyStrokeGradientEffect(n, strokeGradient, ctx);
60458
60992
  n = applyTrimPathEffect(n, trimPath, isCombinedShape, ctx);
@@ -60689,8 +61223,8 @@ ${codeFrame}` : message);
60689
61223
  var DATA_SVG_IMAGE_RE = /^data:image\/svg\+xml(?:;[^,]*)?,/i;
60690
61224
  var DATA_IMAGE_BASE64_PAYLOAD_RE = /^data:image\/[^;,]*;base64,([A-Za-z0-9+/]{8})/i;
60691
61225
  var BASE64_RASTER_MAGICS = ["iVBORw0K", "/9j/", "R0lGOD", "UklGR", "Qk"];
60692
- function isContentSniffedRasterImage(str) {
60693
- const m = DATA_IMAGE_BASE64_PAYLOAD_RE.exec(str);
61226
+ function isContentSniffedRasterImage(str2) {
61227
+ const m = DATA_IMAGE_BASE64_PAYLOAD_RE.exec(str2);
60694
61228
  return !!m && BASE64_RASTER_MAGICS.some((magic) => m[1].startsWith(magic));
60695
61229
  }
60696
61230
  function isDangerousAttrName(nameLower) {
@@ -60704,18 +61238,18 @@ ${codeFrame}` : message);
60704
61238
  return void 0;
60705
61239
  }
60706
61240
  if (nameLower === "fill" || nameLower === "stroke" || nameLower === "stopcolor") {
60707
- const str = String(value);
60708
- if (str.includes("url(") && !/^url\(#[^)]+\)$/.test(str)) {
61241
+ const str2 = String(value);
61242
+ if (str2.includes("url(") && !/^url\(#[^)]+\)$/.test(str2)) {
60709
61243
  console.warn('Attribute "' + nameLower + '" blocked: url() must be internal url(#id), got:', value);
60710
61244
  return void 0;
60711
61245
  }
60712
61246
  return value;
60713
61247
  }
60714
61248
  if (URL_VALUE_ATTRS_LOWER.has(nameLower)) {
60715
- const str = String(value);
60716
- if (str.startsWith("#")) return value;
60717
- if (/^url\(#[^)]+\)$/.test(str)) return value;
60718
- if (IMAGE_REF_ATTRS_LOWER.has(nameLower) && (DATA_RASTER_IMAGE_RE.test(str) || DATA_SVG_IMAGE_RE.test(str) || isContentSniffedRasterImage(str))) return value;
61249
+ const str2 = String(value);
61250
+ if (str2.startsWith("#")) return value;
61251
+ if (/^url\(#[^)]+\)$/.test(str2)) return value;
61252
+ if (IMAGE_REF_ATTRS_LOWER.has(nameLower) && (DATA_RASTER_IMAGE_RE.test(str2) || DATA_SVG_IMAGE_RE.test(str2) || isContentSniffedRasterImage(str2))) return value;
60719
61253
  console.warn('Attribute "' + nameLower + '" blocked: must be #id, url(#id), or data:image/\u2026 URI, got:', value);
60720
61254
  return void 0;
60721
61255
  }
@@ -60745,7 +61279,7 @@ ${codeFrame}` : message);
60745
61279
  if (textContent) element.textContent = textContent;
60746
61280
  return element;
60747
61281
  }
60748
- function resolveStyle(style, defs) {
61282
+ function resolveStyle2(style, defs) {
60749
61283
  var _a;
60750
61284
  if (!style) return void 0;
60751
61285
  if (typeof style === "string") {
@@ -60781,7 +61315,7 @@ ${codeFrame}` : message);
60781
61315
  if (!node) return null;
60782
61316
  const _a = node, { type, children, style } = _a, props = __objRest(_a, ["type", "children", "style"]);
60783
61317
  const nodeDefs = getDefs(node) || defs;
60784
- const resolvedStyle = resolveStyle(style, nodeDefs);
61318
+ const resolvedStyle = resolveStyle2(style, nodeDefs);
60785
61319
  let childElements;
60786
61320
  if (children) {
60787
61321
  for (const ch of children) {