@sepveneto/free-dom 0.13.0 → 0.13.1

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.js CHANGED
@@ -2417,9 +2417,9 @@ var require_decode = __commonJS({
2417
2417
  }
2418
2418
  });
2419
2419
 
2420
- // ../../node_modules/.pnpm/@babel+parser@7.26.1/node_modules/@babel/parser/lib/index.js
2420
+ // ../../node_modules/.pnpm/@babel+parser@7.26.2/node_modules/@babel/parser/lib/index.js
2421
2421
  var require_lib = __commonJS({
2422
- "../../node_modules/.pnpm/@babel+parser@7.26.1/node_modules/@babel/parser/lib/index.js"(exports) {
2422
+ "../../node_modules/.pnpm/@babel+parser@7.26.2/node_modules/@babel/parser/lib/index.js"(exports) {
2423
2423
  "use strict";
2424
2424
  Object.defineProperty(exports, "__esModule", {
2425
2425
  value: true
@@ -3642,6 +3642,9 @@ var require_lib = __commonJS({
3642
3642
  name: createToken("name", {
3643
3643
  startsExpr
3644
3644
  }),
3645
+ placeholder: createToken("%%", {
3646
+ startsExpr: true
3647
+ }),
3645
3648
  string: createToken("string", {
3646
3649
  startsExpr
3647
3650
  }),
@@ -3668,22 +3671,19 @@ var require_lib = __commonJS({
3668
3671
  jsxTagStart: createToken("jsxTagStart", {
3669
3672
  startsExpr: true
3670
3673
  }),
3671
- jsxTagEnd: createToken("jsxTagEnd"),
3672
- placeholder: createToken("%%", {
3673
- startsExpr: true
3674
- })
3674
+ jsxTagEnd: createToken("jsxTagEnd")
3675
3675
  };
3676
3676
  function tokenIsIdentifier(token) {
3677
- return token >= 93 && token <= 132;
3677
+ return token >= 93 && token <= 133;
3678
3678
  }
3679
3679
  function tokenKeywordOrIdentifierIsKeyword(token) {
3680
3680
  return token <= 92;
3681
3681
  }
3682
3682
  function tokenIsKeywordOrIdentifier(token) {
3683
- return token >= 58 && token <= 132;
3683
+ return token >= 58 && token <= 133;
3684
3684
  }
3685
3685
  function tokenIsLiteralPropertyName(token) {
3686
- return token >= 58 && token <= 136;
3686
+ return token >= 58 && token <= 137;
3687
3687
  }
3688
3688
  function tokenComesBeforeExpression(token) {
3689
3689
  return tokenBeforeExprs[token];
@@ -3747,7 +3747,7 @@ var require_lib = __commonJS({
3747
3747
  context.push(types.template);
3748
3748
  }
3749
3749
  };
3750
- tokenTypes[142].updateContext = (context) => {
3750
+ tokenTypes[143].updateContext = (context) => {
3751
3751
  context.push(types.j_expr, types.j_oTag);
3752
3752
  };
3753
3753
  }
@@ -4317,7 +4317,7 @@ var require_lib = __commonJS({
4317
4317
  this.commentsLen = 0;
4318
4318
  this.commentStack = [];
4319
4319
  this.pos = 0;
4320
- this.type = 139;
4320
+ this.type = 140;
4321
4321
  this.value = null;
4322
4322
  this.start = 0;
4323
4323
  this.end = 0;
@@ -4459,8 +4459,7 @@ var require_lib = __commonJS({
4459
4459
  this.flags &= -4097;
4460
4460
  }
4461
4461
  curPosition() {
4462
- const index = this.startIndex + this.pos;
4463
- return new Position(this.curLine, index - this.lineStart, index);
4462
+ return new Position(this.curLine, this.pos - this.lineStart, this.pos + this.startIndex);
4464
4463
  }
4465
4464
  clone() {
4466
4465
  const state2 = new State();
@@ -4783,10 +4782,11 @@ var require_lib = __commonJS({
4783
4782
  var VALID_REGEX_FLAGS = /* @__PURE__ */ new Set([103, 109, 115, 105, 121, 117, 100, 118]);
4784
4783
  var Token = class {
4785
4784
  constructor(state2) {
4785
+ const startIndex = state2.startIndex || 0;
4786
4786
  this.type = state2.type;
4787
4787
  this.value = state2.value;
4788
- this.start = state2.start;
4789
- this.end = state2.end;
4788
+ this.start = startIndex + state2.start;
4789
+ this.end = startIndex + state2.end;
4790
4790
  this.loc = new SourceLocation(state2.startLoc, state2.endLoc);
4791
4791
  }
4792
4792
  };
@@ -4929,7 +4929,7 @@ var require_lib = __commonJS({
4929
4929
  if (!this.isLookahead)
4930
4930
  this.state.startLoc = this.state.curPosition();
4931
4931
  if (this.state.pos >= this.length) {
4932
- this.finishToken(139);
4932
+ this.finishToken(140);
4933
4933
  return;
4934
4934
  }
4935
4935
  this.getTokenFromCode(this.codePointAtPos(this.state.pos));
@@ -4954,8 +4954,8 @@ var require_lib = __commonJS({
4954
4954
  const comment = {
4955
4955
  type: "CommentBlock",
4956
4956
  value: this.input.slice(start + 2, end),
4957
- start,
4958
- end: end + commentEnd.length,
4957
+ start: this.sourceToOffsetPos(start),
4958
+ end: this.sourceToOffsetPos(end + commentEnd.length),
4959
4959
  loc: new SourceLocation(startLoc, this.state.curPosition())
4960
4960
  };
4961
4961
  if (this.options.tokens)
@@ -4980,8 +4980,8 @@ var require_lib = __commonJS({
4980
4980
  const comment = {
4981
4981
  type: "CommentLine",
4982
4982
  value,
4983
- start,
4984
- end,
4983
+ start: this.sourceToOffsetPos(start),
4984
+ end: this.sourceToOffsetPos(end),
4985
4985
  loc: new SourceLocation(startLoc, this.state.curPosition())
4986
4986
  };
4987
4987
  if (this.options.tokens)
@@ -5116,10 +5116,10 @@ var require_lib = __commonJS({
5116
5116
  }
5117
5117
  } else if (isIdentifierStart(next)) {
5118
5118
  ++this.state.pos;
5119
- this.finishToken(138, this.readWord1(next));
5119
+ this.finishToken(139, this.readWord1(next));
5120
5120
  } else if (next === 92) {
5121
5121
  ++this.state.pos;
5122
- this.finishToken(138, this.readWord1());
5122
+ this.finishToken(139, this.readWord1());
5123
5123
  } else {
5124
5124
  this.finishOp(27, 1);
5125
5125
  }
@@ -5532,7 +5532,7 @@ var require_lib = __commonJS({
5532
5532
  mods += char;
5533
5533
  }
5534
5534
  this.state.pos = pos;
5535
- this.finishToken(137, {
5535
+ this.finishToken(138, {
5536
5536
  pattern: content,
5537
5537
  flags: mods
5538
5538
  });
@@ -5568,10 +5568,10 @@ var require_lib = __commonJS({
5568
5568
  }
5569
5569
  if (isBigInt) {
5570
5570
  const str = this.input.slice(start, this.state.pos).replace(/[_n]/g, "");
5571
- this.finishToken(135, str);
5571
+ this.finishToken(136, str);
5572
5572
  return;
5573
5573
  }
5574
- this.finishToken(134, val);
5574
+ this.finishToken(135, val);
5575
5575
  }
5576
5576
  readNumber(startsWithDot) {
5577
5577
  const start = this.state.pos;
@@ -5634,15 +5634,15 @@ var require_lib = __commonJS({
5634
5634
  }
5635
5635
  const str = this.input.slice(start, this.state.pos).replace(/[_mn]/g, "");
5636
5636
  if (isBigInt) {
5637
- this.finishToken(135, str);
5637
+ this.finishToken(136, str);
5638
5638
  return;
5639
5639
  }
5640
5640
  if (isDecimal) {
5641
- this.finishToken(136, str);
5641
+ this.finishToken(137, str);
5642
5642
  return;
5643
5643
  }
5644
5644
  const val = isOctal ? parseInt(str, 8) : parseFloat(str);
5645
- this.finishToken(134, val);
5645
+ this.finishToken(135, val);
5646
5646
  }
5647
5647
  readCodePoint(throwOnInvalid) {
5648
5648
  const {
@@ -5662,7 +5662,7 @@ var require_lib = __commonJS({
5662
5662
  this.state.pos = pos + 1;
5663
5663
  this.state.lineStart = lineStart;
5664
5664
  this.state.curLine = curLine;
5665
- this.finishToken(133, str);
5665
+ this.finishToken(134, str);
5666
5666
  }
5667
5667
  readTemplateContinuation() {
5668
5668
  if (!this.match(8)) {
@@ -5684,7 +5684,7 @@ var require_lib = __commonJS({
5684
5684
  this.state.lineStart = lineStart;
5685
5685
  this.state.curLine = curLine;
5686
5686
  if (firstInvalidLoc) {
5687
- this.state.firstInvalidTemplateEscapePos = new Position(firstInvalidLoc.curLine, firstInvalidLoc.pos - firstInvalidLoc.lineStart, firstInvalidLoc.pos);
5687
+ this.state.firstInvalidTemplateEscapePos = new Position(firstInvalidLoc.curLine, firstInvalidLoc.pos - firstInvalidLoc.lineStart, this.sourceToOffsetPos(firstInvalidLoc.pos));
5688
5688
  }
5689
5689
  if (this.input.codePointAt(pos) === 96) {
5690
5690
  this.finishToken(24, firstInvalidLoc ? null : opening + str + "`");
@@ -6080,7 +6080,7 @@ var require_lib = __commonJS({
6080
6080
  }
6081
6081
  }
6082
6082
  canInsertSemicolon() {
6083
- return this.match(139) || this.match(8) || this.hasPrecedingLineBreak();
6083
+ return this.match(140) || this.match(8) || this.hasPrecedingLineBreak();
6084
6084
  }
6085
6085
  hasPrecedingLineBreak() {
6086
6086
  return hasNewLine(this.input, this.offsetToSourcePos(this.state.lastTokEndLoc.index), this.state.start);
@@ -6493,7 +6493,7 @@ var require_lib = __commonJS({
6493
6493
  return this.getPluginOption("flow", "all") || this.flowPragma === "flow";
6494
6494
  }
6495
6495
  finishToken(type, val) {
6496
- if (type !== 133 && type !== 13 && type !== 28) {
6496
+ if (type !== 134 && type !== 13 && type !== 28) {
6497
6497
  if (this.flowPragma === void 0) {
6498
6498
  this.flowPragma = null;
6499
6499
  }
@@ -6623,7 +6623,7 @@ var require_lib = __commonJS({
6623
6623
  }
6624
6624
  flowParseDeclareModule(node) {
6625
6625
  this.scope.enter(0);
6626
- if (this.match(133)) {
6626
+ if (this.match(134)) {
6627
6627
  node.id = super.parseExprAtom();
6628
6628
  } else {
6629
6629
  node.id = this.parseIdentifier();
@@ -6851,7 +6851,7 @@ var require_lib = __commonJS({
6851
6851
  const node = this.startNode();
6852
6852
  node.params = [];
6853
6853
  this.state.inType = true;
6854
- if (this.match(47) || this.match(142)) {
6854
+ if (this.match(47) || this.match(143)) {
6855
6855
  this.next();
6856
6856
  } else {
6857
6857
  this.unexpected();
@@ -6925,7 +6925,7 @@ var require_lib = __commonJS({
6925
6925
  return this.finishNode(node, "InterfaceTypeAnnotation");
6926
6926
  }
6927
6927
  flowParseObjectPropertyKey() {
6928
- return this.match(134) || this.match(133) ? super.parseExprAtom() : this.parseIdentifier(true);
6928
+ return this.match(135) || this.match(134) ? super.parseExprAtom() : this.parseIdentifier(true);
6929
6929
  }
6930
6930
  flowParseObjectTypeIndexer(node, isStatic, variance) {
6931
6931
  node.static = isStatic;
@@ -7369,7 +7369,7 @@ var require_lib = __commonJS({
7369
7369
  node2.typeParameters = null;
7370
7370
  return this.finishNode(node2, "FunctionTypeAnnotation");
7371
7371
  }
7372
- case 133:
7372
+ case 134:
7373
7373
  return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
7374
7374
  case 85:
7375
7375
  case 86:
@@ -7379,19 +7379,19 @@ var require_lib = __commonJS({
7379
7379
  case 53:
7380
7380
  if (this.state.value === "-") {
7381
7381
  this.next();
7382
- if (this.match(134)) {
7382
+ if (this.match(135)) {
7383
7383
  return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node);
7384
7384
  }
7385
- if (this.match(135)) {
7385
+ if (this.match(136)) {
7386
7386
  return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node);
7387
7387
  }
7388
7388
  throw this.raise(FlowErrors.UnexpectedSubtractionOperand, this.state.startLoc);
7389
7389
  }
7390
7390
  this.unexpected();
7391
7391
  return;
7392
- case 134:
7393
- return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
7394
7392
  case 135:
7393
+ return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
7394
+ case 136:
7395
7395
  return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation");
7396
7396
  case 88:
7397
7397
  this.next();
@@ -8150,7 +8150,7 @@ var require_lib = __commonJS({
8150
8150
  var _jsx;
8151
8151
  let state2 = null;
8152
8152
  let jsx2;
8153
- if (this.hasPlugin("jsx") && (this.match(142) || this.match(47))) {
8153
+ if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) {
8154
8154
  state2 = this.state.clone();
8155
8155
  jsx2 = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state2);
8156
8156
  if (!jsx2.error)
@@ -8422,7 +8422,7 @@ var require_lib = __commonJS({
8422
8422
  const startLoc = this.state.startLoc;
8423
8423
  const endOfInit = () => this.match(12) || this.match(8);
8424
8424
  switch (this.state.type) {
8425
- case 134: {
8425
+ case 135: {
8426
8426
  const literal = this.parseNumericLiteral(this.state.value);
8427
8427
  if (endOfInit()) {
8428
8428
  return {
@@ -8436,7 +8436,7 @@ var require_lib = __commonJS({
8436
8436
  loc: startLoc
8437
8437
  };
8438
8438
  }
8439
- case 133: {
8439
+ case 134: {
8440
8440
  const literal = this.parseStringLiteral(this.state.value);
8441
8441
  if (endOfInit()) {
8442
8442
  return {
@@ -9034,14 +9034,14 @@ var require_lib = __commonJS({
9034
9034
  if (this.state.pos === this.state.start) {
9035
9035
  if (ch === 60 && this.state.canStartJSXElement) {
9036
9036
  ++this.state.pos;
9037
- this.finishToken(142);
9037
+ this.finishToken(143);
9038
9038
  } else {
9039
9039
  super.getTokenFromCode(ch);
9040
9040
  }
9041
9041
  return;
9042
9042
  }
9043
9043
  out += this.input.slice(chunkStart, this.state.pos);
9044
- this.finishToken(141, out);
9044
+ this.finishToken(142, out);
9045
9045
  return;
9046
9046
  case 38:
9047
9047
  out += this.input.slice(chunkStart, this.state.pos);
@@ -9098,7 +9098,7 @@ var require_lib = __commonJS({
9098
9098
  }
9099
9099
  }
9100
9100
  out += this.input.slice(chunkStart, this.state.pos++);
9101
- this.finishToken(133, out);
9101
+ this.finishToken(134, out);
9102
9102
  }
9103
9103
  jsxReadEntity() {
9104
9104
  const startPos = ++this.state.pos;
@@ -9138,11 +9138,11 @@ var require_lib = __commonJS({
9138
9138
  do {
9139
9139
  ch = this.input.charCodeAt(++this.state.pos);
9140
9140
  } while (isIdentifierChar(ch) || ch === 45);
9141
- this.finishToken(140, this.input.slice(start, this.state.pos));
9141
+ this.finishToken(141, this.input.slice(start, this.state.pos));
9142
9142
  }
9143
9143
  jsxParseIdentifier() {
9144
9144
  const node = this.startNode();
9145
- if (this.match(140)) {
9145
+ if (this.match(141)) {
9146
9146
  node.name = this.state.value;
9147
9147
  } else if (tokenIsKeyword(this.state.type)) {
9148
9148
  node.name = tokenLabelName(this.state.type);
@@ -9188,8 +9188,8 @@ var require_lib = __commonJS({
9188
9188
  this.raise(JsxErrors.AttributeIsEmpty, node);
9189
9189
  }
9190
9190
  return node;
9191
- case 142:
9192
- case 133:
9191
+ case 143:
9192
+ case 134:
9193
9193
  return this.parseExprAtom();
9194
9194
  default:
9195
9195
  throw this.raise(JsxErrors.UnsupportedJsxValue, this.state.startLoc);
@@ -9237,7 +9237,7 @@ var require_lib = __commonJS({
9237
9237
  }
9238
9238
  jsxParseOpeningElementAt(startLoc) {
9239
9239
  const node = this.startNodeAt(startLoc);
9240
- if (this.eat(143)) {
9240
+ if (this.eat(144)) {
9241
9241
  return this.finishNode(node, "JSXOpeningFragment");
9242
9242
  }
9243
9243
  node.name = this.jsxParseElementName();
@@ -9245,21 +9245,21 @@ var require_lib = __commonJS({
9245
9245
  }
9246
9246
  jsxParseOpeningElementAfterName(node) {
9247
9247
  const attributes = [];
9248
- while (!this.match(56) && !this.match(143)) {
9248
+ while (!this.match(56) && !this.match(144)) {
9249
9249
  attributes.push(this.jsxParseAttribute());
9250
9250
  }
9251
9251
  node.attributes = attributes;
9252
9252
  node.selfClosing = this.eat(56);
9253
- this.expect(143);
9253
+ this.expect(144);
9254
9254
  return this.finishNode(node, "JSXOpeningElement");
9255
9255
  }
9256
9256
  jsxParseClosingElementAt(startLoc) {
9257
9257
  const node = this.startNodeAt(startLoc);
9258
- if (this.eat(143)) {
9258
+ if (this.eat(144)) {
9259
9259
  return this.finishNode(node, "JSXClosingFragment");
9260
9260
  }
9261
9261
  node.name = this.jsxParseElementName();
9262
- this.expect(143);
9262
+ this.expect(144);
9263
9263
  return this.finishNode(node, "JSXClosingElement");
9264
9264
  }
9265
9265
  jsxParseElementAt(startLoc) {
@@ -9271,7 +9271,7 @@ var require_lib = __commonJS({
9271
9271
  contents:
9272
9272
  for (; ; ) {
9273
9273
  switch (this.state.type) {
9274
- case 142:
9274
+ case 143:
9275
9275
  startLoc = this.state.startLoc;
9276
9276
  this.next();
9277
9277
  if (this.eat(56)) {
@@ -9280,7 +9280,7 @@ var require_lib = __commonJS({
9280
9280
  }
9281
9281
  children.push(this.jsxParseElementAt(startLoc));
9282
9282
  break;
9283
- case 141:
9283
+ case 142:
9284
9284
  children.push(this.parseLiteral(this.state.value, "JSXText"));
9285
9285
  break;
9286
9286
  case 5: {
@@ -9337,10 +9337,10 @@ var require_lib = __commonJS({
9337
9337
  context[context.length - 1] = newContext;
9338
9338
  }
9339
9339
  parseExprAtom(refExpressionErrors) {
9340
- if (this.match(142)) {
9340
+ if (this.match(143)) {
9341
9341
  return this.jsxParseElement();
9342
9342
  } else if (this.match(47) && this.input.charCodeAt(this.state.pos) !== 33) {
9343
- this.replaceToken(142);
9343
+ this.replaceToken(143);
9344
9344
  return this.jsxParseElement();
9345
9345
  } else {
9346
9346
  return super.parseExprAtom(refExpressionErrors);
@@ -9364,7 +9364,7 @@ var require_lib = __commonJS({
9364
9364
  }
9365
9365
  if (code2 === 62) {
9366
9366
  ++this.state.pos;
9367
- this.finishToken(143);
9367
+ this.finishToken(144);
9368
9368
  return;
9369
9369
  }
9370
9370
  if ((code2 === 34 || code2 === 39) && context === types.j_oTag) {
@@ -9374,7 +9374,7 @@ var require_lib = __commonJS({
9374
9374
  }
9375
9375
  if (code2 === 60 && this.state.canStartJSXElement && this.input.charCodeAt(this.state.pos + 1) !== 33) {
9376
9376
  ++this.state.pos;
9377
- this.finishToken(142);
9377
+ this.finishToken(143);
9378
9378
  return;
9379
9379
  }
9380
9380
  super.getTokenFromCode(code2);
@@ -9384,12 +9384,12 @@ var require_lib = __commonJS({
9384
9384
  context,
9385
9385
  type
9386
9386
  } = this.state;
9387
- if (type === 56 && prevType === 142) {
9387
+ if (type === 56 && prevType === 143) {
9388
9388
  context.splice(-2, 2, types.j_cTag);
9389
9389
  this.state.canStartJSXElement = false;
9390
- } else if (type === 142) {
9391
- context.push(types.j_oTag);
9392
9390
  } else if (type === 143) {
9391
+ context.push(types.j_oTag);
9392
+ } else if (type === 144) {
9393
9393
  const out = context[context.length - 1];
9394
9394
  if (out === types.j_oTag && prevType === 56 || out === types.j_cTag) {
9395
9395
  context.pop();
@@ -9746,7 +9746,7 @@ var require_lib = __commonJS({
9746
9746
  return this.parseBindingRestProperty(this.startNode());
9747
9747
  }
9748
9748
  const prop = this.startNode();
9749
- if (type === 138) {
9749
+ if (type === 139) {
9750
9750
  this.expectPlugin("destructuringPrivate", startLoc);
9751
9751
  this.classScope.usePrivateName(this.state.value, startLoc);
9752
9752
  prop.key = this.parsePrivateName();
@@ -10074,7 +10074,7 @@ var require_lib = __commonJS({
10074
10074
  return tokenIsIdentifier(this.state.type);
10075
10075
  }
10076
10076
  tsTokenCanFollowModifier() {
10077
- return this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(138) || this.isLiteralPropertyName();
10077
+ return this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(139) || this.isLiteralPropertyName();
10078
10078
  }
10079
10079
  tsNextTokenOnSameLineAndCanFollowModifier() {
10080
10080
  this.next();
@@ -10246,7 +10246,7 @@ var require_lib = __commonJS({
10246
10246
  const node = this.startNode();
10247
10247
  this.expect(83);
10248
10248
  this.expect(10);
10249
- if (!this.match(133)) {
10249
+ if (!this.match(134)) {
10250
10250
  this.raise(TSErrors.UnsupportedImportTypeArgument, this.state.startLoc);
10251
10251
  }
10252
10252
  node.argument = super.parseExprAtom();
@@ -10324,7 +10324,7 @@ var require_lib = __commonJS({
10324
10324
  }
10325
10325
  tsParseTypeParameters(parseModifiers) {
10326
10326
  const node = this.startNode();
10327
- if (this.match(47) || this.match(142)) {
10327
+ if (this.match(47) || this.match(143)) {
10328
10328
  this.next();
10329
10329
  } else {
10330
10330
  this.unexpected();
@@ -10653,9 +10653,9 @@ var require_lib = __commonJS({
10653
10653
  tsParseLiteralTypeNode() {
10654
10654
  const node = this.startNode();
10655
10655
  switch (this.state.type) {
10656
- case 134:
10657
10656
  case 135:
10658
- case 133:
10657
+ case 136:
10658
+ case 134:
10659
10659
  case 85:
10660
10660
  case 86:
10661
10661
  node.literal = super.parseExprAtom();
@@ -10685,9 +10685,9 @@ var require_lib = __commonJS({
10685
10685
  }
10686
10686
  tsParseNonArrayType() {
10687
10687
  switch (this.state.type) {
10688
- case 133:
10689
10688
  case 134:
10690
10689
  case 135:
10690
+ case 136:
10691
10691
  case 85:
10692
10692
  case 86:
10693
10693
  return this.tsParseLiteralTypeNode();
@@ -10695,7 +10695,7 @@ var require_lib = __commonJS({
10695
10695
  if (this.state.value === "-") {
10696
10696
  const node = this.startNode();
10697
10697
  const nextToken = this.lookahead();
10698
- if (nextToken.type !== 134 && nextToken.type !== 135) {
10698
+ if (nextToken.type !== 135 && nextToken.type !== 136) {
10699
10699
  this.unexpected();
10700
10700
  }
10701
10701
  node.literal = this.parseMaybeUnary();
@@ -11103,7 +11103,7 @@ var require_lib = __commonJS({
11103
11103
  }
11104
11104
  tsParseEnumMember() {
11105
11105
  const node = this.startNode();
11106
- node.id = this.match(133) ? super.parseStringLiteral(this.state.value) : this.parseIdentifier(true);
11106
+ node.id = this.match(134) ? super.parseStringLiteral(this.state.value) : this.parseIdentifier(true);
11107
11107
  if (this.eat(29)) {
11108
11108
  node.initializer = super.parseMaybeAssignAllowIn();
11109
11109
  }
@@ -11153,7 +11153,7 @@ var require_lib = __commonJS({
11153
11153
  node.kind = "global";
11154
11154
  node.global = true;
11155
11155
  node.id = this.parseIdentifier();
11156
- } else if (this.match(133)) {
11156
+ } else if (this.match(134)) {
11157
11157
  node.kind = "module";
11158
11158
  node.id = super.parseStringLiteral(this.state.value);
11159
11159
  } else {
@@ -11193,7 +11193,7 @@ var require_lib = __commonJS({
11193
11193
  const node = this.startNode();
11194
11194
  this.expectContextual(119);
11195
11195
  this.expect(10);
11196
- if (!this.match(133)) {
11196
+ if (!this.match(134)) {
11197
11197
  this.unexpected();
11198
11198
  }
11199
11199
  node.expression = super.parseExprAtom();
@@ -11311,7 +11311,7 @@ var require_lib = __commonJS({
11311
11311
  break;
11312
11312
  case "module":
11313
11313
  if (this.tsCheckLineTerminator(next)) {
11314
- if (this.match(133)) {
11314
+ if (this.match(134)) {
11315
11315
  return this.tsParseAmbientExternalModuleDeclaration(node);
11316
11316
  } else if (tokenIsIdentifier(this.state.type)) {
11317
11317
  node.kind = "module";
@@ -11616,7 +11616,7 @@ var require_lib = __commonJS({
11616
11616
  }
11617
11617
  }
11618
11618
  parseImport(node) {
11619
- if (this.match(133)) {
11619
+ if (this.match(134)) {
11620
11620
  node.importKind = "value";
11621
11621
  return super.parseImport(node);
11622
11622
  }
@@ -11993,7 +11993,7 @@ var require_lib = __commonJS({
11993
11993
  let state2;
11994
11994
  let jsx2;
11995
11995
  let typeCast;
11996
- if (this.hasPlugin("jsx") && (this.match(142) || this.match(47))) {
11996
+ if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) {
11997
11997
  state2 = this.state.clone();
11998
11998
  jsx2 = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state2);
11999
11999
  if (!jsx2.error)
@@ -12513,13 +12513,13 @@ var require_lib = __commonJS({
12513
12513
  });
12514
12514
  var placeholders = (superClass) => class PlaceholdersParserMixin extends superClass {
12515
12515
  parsePlaceholder(expectedNode) {
12516
- if (this.match(144)) {
12516
+ if (this.match(133)) {
12517
12517
  const node = this.startNode();
12518
12518
  this.next();
12519
12519
  this.assertNoSpace();
12520
12520
  node.name = super.parseIdentifier(true);
12521
12521
  this.assertNoSpace();
12522
- this.expect(144);
12522
+ this.expect(133);
12523
12523
  return this.finishPlaceholder(node, expectedNode);
12524
12524
  }
12525
12525
  }
@@ -12533,7 +12533,7 @@ var require_lib = __commonJS({
12533
12533
  }
12534
12534
  getTokenFromCode(code2) {
12535
12535
  if (code2 === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) {
12536
- this.finishOp(144, 2);
12536
+ this.finishOp(133, 2);
12537
12537
  } else {
12538
12538
  super.getTokenFromCode(code2);
12539
12539
  }
@@ -12567,7 +12567,7 @@ var require_lib = __commonJS({
12567
12567
  return true;
12568
12568
  }
12569
12569
  const nextToken = this.lookahead();
12570
- if (nextToken.type === 144) {
12570
+ if (nextToken.type === 133) {
12571
12571
  return true;
12572
12572
  }
12573
12573
  return false;
@@ -12606,7 +12606,7 @@ var require_lib = __commonJS({
12606
12606
  const oldStrict = this.state.strict;
12607
12607
  const placeholder = this.parsePlaceholder("Identifier");
12608
12608
  if (placeholder) {
12609
- if (this.match(81) || this.match(144) || this.match(5)) {
12609
+ if (this.match(81) || this.match(133) || this.match(5)) {
12610
12610
  node.id = placeholder;
12611
12611
  } else if (optionalId || !isStatement) {
12612
12612
  node.id = null;
@@ -12643,7 +12643,7 @@ var require_lib = __commonJS({
12643
12643
  if (this.match(65)) {
12644
12644
  const next = this.nextTokenStart();
12645
12645
  if (this.isUnparsedContextual(next, "from")) {
12646
- if (this.input.startsWith(tokenLabelName(144), this.nextTokenStartSince(next + 4))) {
12646
+ if (this.input.startsWith(tokenLabelName(133), this.nextTokenStartSince(next + 4))) {
12647
12647
  return true;
12648
12648
  }
12649
12649
  }
@@ -12899,7 +12899,7 @@ var require_lib = __commonJS({
12899
12899
  this.enterInitialScopes();
12900
12900
  this.nextToken();
12901
12901
  const expr = this.parseExpression();
12902
- if (!this.match(139)) {
12902
+ if (!this.match(140)) {
12903
12903
  this.unexpected();
12904
12904
  }
12905
12905
  this.finalizeRemainingComments();
@@ -13019,7 +13019,7 @@ var require_lib = __commonJS({
13019
13019
  return expr;
13020
13020
  }
13021
13021
  parseMaybeUnaryOrPrivate(refExpressionErrors) {
13022
- return this.match(138) ? this.parsePrivateName() : this.parseMaybeUnary(refExpressionErrors);
13022
+ return this.match(139) ? this.parsePrivateName() : this.parseMaybeUnary(refExpressionErrors);
13023
13023
  }
13024
13024
  parseExprOps(refExpressionErrors) {
13025
13025
  const startLoc = this.state.startLoc;
@@ -13260,7 +13260,7 @@ var require_lib = __commonJS({
13260
13260
  if (computed12) {
13261
13261
  node.property = this.parseExpression();
13262
13262
  this.expect(3);
13263
- } else if (this.match(138)) {
13263
+ } else if (this.match(139)) {
13264
13264
  if (base.type === "Super") {
13265
13265
  this.raise(Errors.SuperPrivateField, startLoc);
13266
13266
  }
@@ -13433,11 +13433,11 @@ var require_lib = __commonJS({
13433
13433
  this.readRegexp();
13434
13434
  return this.parseRegExpLiteral(this.state.value);
13435
13435
  }
13436
- case 134:
13437
- return this.parseNumericLiteral(this.state.value);
13438
13436
  case 135:
13437
+ return this.parseNumericLiteral(this.state.value);
13438
+ case 136:
13439
13439
  return this.parseBigIntLiteral(this.state.value);
13440
- case 133:
13440
+ case 134:
13441
13441
  return this.parseStringLiteral(this.state.value);
13442
13442
  case 84:
13443
13443
  return this.parseNullLiteral();
@@ -13485,7 +13485,7 @@ var require_lib = __commonJS({
13485
13485
  throw this.raise(Errors.UnsupportedBind, callee);
13486
13486
  }
13487
13487
  }
13488
- case 138: {
13488
+ case 139: {
13489
13489
  this.raise(Errors.PrivateInExpectedIn, this.state.startLoc, {
13490
13490
  identifierName: this.state.value
13491
13491
  });
@@ -13521,7 +13521,7 @@ var require_lib = __commonJS({
13521
13521
  break;
13522
13522
  }
13523
13523
  default:
13524
- if (type === 136) {
13524
+ if (type === 137) {
13525
13525
  return this.parseDecimalLiteral(this.state.value);
13526
13526
  }
13527
13527
  if (tokenIsIdentifier(type)) {
@@ -14109,16 +14109,16 @@ var require_lib = __commonJS({
14109
14109
  key = this.parseIdentifier(true);
14110
14110
  } else {
14111
14111
  switch (type) {
14112
- case 134:
14112
+ case 135:
14113
14113
  key = this.parseNumericLiteral(value);
14114
14114
  break;
14115
- case 133:
14115
+ case 134:
14116
14116
  key = this.parseStringLiteral(value);
14117
14117
  break;
14118
- case 135:
14118
+ case 136:
14119
14119
  key = this.parseBigIntLiteral(value);
14120
14120
  break;
14121
- case 138: {
14121
+ case 139: {
14122
14122
  const privateKeyLoc = this.state.startLoc;
14123
14123
  if (refExpressionErrors != null) {
14124
14124
  if (refExpressionErrors.privateKeyLoc === null) {
@@ -14131,7 +14131,7 @@ var require_lib = __commonJS({
14131
14131
  break;
14132
14132
  }
14133
14133
  default:
14134
- if (type === 136) {
14134
+ if (type === 137) {
14135
14135
  key = this.parseDecimalLiteral(value);
14136
14136
  break;
14137
14137
  }
@@ -14139,7 +14139,7 @@ var require_lib = __commonJS({
14139
14139
  }
14140
14140
  }
14141
14141
  prop.key = key;
14142
- if (type !== 138) {
14142
+ if (type !== 139) {
14143
14143
  prop.computed = false;
14144
14144
  }
14145
14145
  }
@@ -14395,7 +14395,7 @@ var require_lib = __commonJS({
14395
14395
  const {
14396
14396
  type
14397
14397
  } = this.state;
14398
- return type === 53 || type === 10 || type === 0 || tokenIsTemplate(type) || type === 102 && !this.state.containsEsc || type === 137 || type === 56 || this.hasPlugin("v8intrinsic") && type === 54;
14398
+ return type === 53 || type === 10 || type === 0 || tokenIsTemplate(type) || type === 102 && !this.state.containsEsc || type === 138 || type === 56 || this.hasPlugin("v8intrinsic") && type === 54;
14399
14399
  }
14400
14400
  parseYield() {
14401
14401
  const node = this.startNode();
@@ -14407,7 +14407,7 @@ var require_lib = __commonJS({
14407
14407
  delegating = this.eat(55);
14408
14408
  switch (this.state.type) {
14409
14409
  case 13:
14410
- case 139:
14410
+ case 140:
14411
14411
  case 8:
14412
14412
  case 11:
14413
14413
  case 3:
@@ -14593,7 +14593,7 @@ var require_lib = __commonJS({
14593
14593
  };
14594
14594
  var loneSurrogate = /[\uD800-\uDFFF]/u;
14595
14595
  var keywordRelationalOperator = /in(?:stanceof)?/y;
14596
- function babel7CompatTokens(tokens, input) {
14596
+ function babel7CompatTokens(tokens, input, startIndex) {
14597
14597
  for (let i = 0; i < tokens.length; i++) {
14598
14598
  const token = tokens[i];
14599
14599
  const {
@@ -14601,7 +14601,7 @@ var require_lib = __commonJS({
14601
14601
  } = token;
14602
14602
  if (typeof type === "number") {
14603
14603
  {
14604
- if (type === 138) {
14604
+ if (type === 139) {
14605
14605
  const {
14606
14606
  loc,
14607
14607
  start,
@@ -14638,7 +14638,7 @@ var require_lib = __commonJS({
14638
14638
  const backquoteEnd = start + 1;
14639
14639
  const backquoteEndLoc = createPositionWithColumnOffset(loc.start, 1);
14640
14640
  let startToken;
14641
- if (input.charCodeAt(start) === 96) {
14641
+ if (input.charCodeAt(start - startIndex) === 96) {
14642
14642
  startToken = new Token({
14643
14643
  type: getExportedToken(22),
14644
14644
  value: "`",
@@ -14705,11 +14705,11 @@ var require_lib = __commonJS({
14705
14705
  file.program = this.parseProgram(program);
14706
14706
  file.comments = this.comments;
14707
14707
  if (this.options.tokens) {
14708
- file.tokens = babel7CompatTokens(this.tokens, this.input);
14708
+ file.tokens = babel7CompatTokens(this.tokens, this.input, this.startIndex);
14709
14709
  }
14710
14710
  return this.finishNode(file, "File");
14711
14711
  }
14712
- parseProgram(program, end = 139, sourceType = this.options.sourceType) {
14712
+ parseProgram(program, end = 140, sourceType = this.options.sourceType) {
14713
14713
  program.sourceType = sourceType;
14714
14714
  program.interpreter = this.parseInterpreterDirective();
14715
14715
  this.parseBlockBody(program, true, true, end);
@@ -14724,7 +14724,7 @@ var require_lib = __commonJS({
14724
14724
  this.addExtra(program, "topLevelAwait", this.state.hasTopLevelAwait);
14725
14725
  }
14726
14726
  let finishedProgram;
14727
- if (end === 139) {
14727
+ if (end === 140) {
14728
14728
  finishedProgram = this.finishNode(program, "Program");
14729
14729
  } else {
14730
14730
  finishedProgram = this.finishNodeAt(program, "Program", createPositionWithColumnOffset(this.state.startLoc, -1));
@@ -15044,7 +15044,7 @@ var require_lib = __commonJS({
15044
15044
  while (this.eat(16)) {
15045
15045
  const node2 = this.startNodeAt(startLoc);
15046
15046
  node2.object = expr;
15047
- if (this.match(138)) {
15047
+ if (this.match(139)) {
15048
15048
  this.classScope.usePrivateName(this.state.value, this.state.startLoc);
15049
15049
  node2.property = this.parsePrivateName();
15050
15050
  } else {
@@ -15653,7 +15653,7 @@ var require_lib = __commonJS({
15653
15653
  this.parsePropertyNamePrefixOperator(member);
15654
15654
  if (this.eat(55)) {
15655
15655
  method.kind = "method";
15656
- const isPrivateName = this.match(138);
15656
+ const isPrivateName = this.match(139);
15657
15657
  this.parseClassElementName(method);
15658
15658
  if (isPrivateName) {
15659
15659
  this.pushClassPrivateMethod(classBody, privateMethod, true, false);
@@ -15704,7 +15704,7 @@ var require_lib = __commonJS({
15704
15704
  this.unexpected(maybeQuestionTokenStartLoc);
15705
15705
  }
15706
15706
  method.kind = "method";
15707
- const isPrivate2 = this.match(138);
15707
+ const isPrivate2 = this.match(139);
15708
15708
  this.parseClassElementName(method);
15709
15709
  this.parsePostMemberNameModifiers(publicMember);
15710
15710
  if (isPrivate2) {
@@ -15718,7 +15718,7 @@ var require_lib = __commonJS({
15718
15718
  } else if ((maybeContextualKw === "get" || maybeContextualKw === "set") && !(this.match(55) && this.isLineTerminator())) {
15719
15719
  this.resetPreviousNodeTrailingComments(key);
15720
15720
  method.kind = maybeContextualKw;
15721
- const isPrivate2 = this.match(138);
15721
+ const isPrivate2 = this.match(139);
15722
15722
  this.parseClassElementName(publicMethod);
15723
15723
  if (isPrivate2) {
15724
15724
  this.pushClassPrivateMethod(classBody, privateMethod, false, false);
@@ -15732,7 +15732,7 @@ var require_lib = __commonJS({
15732
15732
  } else if (maybeContextualKw === "accessor" && !this.isLineTerminator()) {
15733
15733
  this.expectPlugin("decoratorAutoAccessors");
15734
15734
  this.resetPreviousNodeTrailingComments(key);
15735
- const isPrivate2 = this.match(138);
15735
+ const isPrivate2 = this.match(139);
15736
15736
  this.parseClassElementName(publicProp);
15737
15737
  this.pushClassAccessorProperty(classBody, accessorProp, isPrivate2);
15738
15738
  } else if (this.isLineTerminator()) {
@@ -15750,10 +15750,10 @@ var require_lib = __commonJS({
15750
15750
  type,
15751
15751
  value
15752
15752
  } = this.state;
15753
- if ((type === 132 || type === 133) && member.static && value === "prototype") {
15753
+ if ((type === 132 || type === 134) && member.static && value === "prototype") {
15754
15754
  this.raise(Errors.StaticPrototype, this.state.startLoc);
15755
15755
  }
15756
- if (type === 138) {
15756
+ if (type === 139) {
15757
15757
  if (value === "constructor") {
15758
15758
  this.raise(Errors.ConstructorClassPrivateField, this.state.startLoc);
15759
15759
  }
@@ -16170,7 +16170,7 @@ var require_lib = __commonJS({
16170
16170
  break;
16171
16171
  }
16172
16172
  const isMaybeTypeOnly = this.isContextual(130);
16173
- const isString = this.match(133);
16173
+ const isString = this.match(134);
16174
16174
  const node = this.startNode();
16175
16175
  node.local = this.parseModuleExportName();
16176
16176
  nodes.push(this.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly));
@@ -16188,7 +16188,7 @@ var require_lib = __commonJS({
16188
16188
  return this.finishNode(node, "ExportSpecifier");
16189
16189
  }
16190
16190
  parseModuleExportName() {
16191
- if (this.match(133)) {
16191
+ if (this.match(134)) {
16192
16192
  const result = this.parseStringLiteral(this.state.value);
16193
16193
  const surrogate = loneSurrogate.exec(result.value);
16194
16194
  if (surrogate) {
@@ -16308,7 +16308,7 @@ var require_lib = __commonJS({
16308
16308
  return tokenIsIdentifier(type) ? type !== 98 || this.lookaheadCharCode() === 102 : type !== 12;
16309
16309
  }
16310
16310
  parseImport(node) {
16311
- if (this.match(133)) {
16311
+ if (this.match(134)) {
16312
16312
  return this.parseImportSourceAndAttributes(node);
16313
16313
  }
16314
16314
  return this.parseImportSpecifiersAndAfter(node, this.parseMaybeImportPhase(node, false));
@@ -16334,7 +16334,7 @@ var require_lib = __commonJS({
16334
16334
  return this.finishNode(node, "ImportDeclaration");
16335
16335
  }
16336
16336
  parseImportSource() {
16337
- if (!this.match(133))
16337
+ if (!this.match(134))
16338
16338
  this.unexpected();
16339
16339
  return this.parseExprAtom();
16340
16340
  }
@@ -16364,13 +16364,13 @@ var require_lib = __commonJS({
16364
16364
  });
16365
16365
  }
16366
16366
  attrNames.add(keyName);
16367
- if (this.match(133)) {
16367
+ if (this.match(134)) {
16368
16368
  node.key = this.parseStringLiteral(keyName);
16369
16369
  } else {
16370
16370
  node.key = this.parseIdentifier(true);
16371
16371
  }
16372
16372
  this.expect(14);
16373
- if (!this.match(133)) {
16373
+ if (!this.match(134)) {
16374
16374
  throw this.raise(Errors.ModuleAttributeInvalidValue, this.state.startLoc);
16375
16375
  }
16376
16376
  node.value = this.parseStringLiteral(this.state.value);
@@ -16395,7 +16395,7 @@ var require_lib = __commonJS({
16395
16395
  }
16396
16396
  attributes.add(node.key.name);
16397
16397
  this.expect(14);
16398
- if (!this.match(133)) {
16398
+ if (!this.match(134)) {
16399
16399
  throw this.raise(Errors.ModuleAttributeInvalidValue, this.state.startLoc);
16400
16400
  }
16401
16401
  node.value = this.parseStringLiteral(this.state.value);
@@ -16476,7 +16476,7 @@ var require_lib = __commonJS({
16476
16476
  break;
16477
16477
  }
16478
16478
  const specifier = this.startNode();
16479
- const importedIsString = this.match(133);
16479
+ const importedIsString = this.match(134);
16480
16480
  const isMaybeTypeOnly = this.isContextual(130);
16481
16481
  specifier.imported = this.parseModuleExportName();
16482
16482
  const importSpecifier = this.parseImportSpecifier(specifier, importedIsString, node.importKind === "type" || node.importKind === "typeof", isMaybeTypeOnly, void 0);
@@ -57939,22 +57939,6 @@ var freeDomProps = {
57939
57939
  default: void 0
57940
57940
  },
57941
57941
  keyboard: Boolean,
57942
- x: {
57943
- type: Number,
57944
- default: 0
57945
- },
57946
- y: {
57947
- type: Number,
57948
- default: 0
57949
- },
57950
- width: {
57951
- type: Number,
57952
- default: void 0
57953
- },
57954
- height: {
57955
- type: Number,
57956
- default: void 0
57957
- },
57958
57942
  handle: {
57959
57943
  type: String,
57960
57944
  default: void 0
@@ -58314,6 +58298,14 @@ var freeDomWrapProps = {
58314
58298
  keyboard: Boolean,
58315
58299
  disabledBatch: Boolean,
58316
58300
  handle: freeDomProps.handle,
58301
+ width: {
58302
+ type: Number,
58303
+ default: void 0
58304
+ },
58305
+ height: {
58306
+ type: Number,
58307
+ default: void 0
58308
+ },
58317
58309
  minWidth: {
58318
58310
  type: Number,
58319
58311
  default: void 0
@@ -58332,13 +58324,13 @@ var freeDomWrapProps = {
58332
58324
  var FreeDomWrap = (0, import_vue_demi18.defineComponent)({
58333
58325
  name: "FreeDomWrap",
58334
58326
  props: freeDomWrapProps,
58335
- emits: ["batch-select", "drop"],
58327
+ emits: ["batch-select", "drop", "update:width", "update:height"],
58336
58328
  setup(props, { emit }) {
58337
58329
  const eventBus = useEventBus();
58338
58330
  const nodes = (0, import_vue_demi18.ref)([]);
58339
58331
  const history = useOperateHistory(nodes);
58340
- const width = (0, import_vue_demi18.ref)();
58341
- const height = (0, import_vue_demi18.ref)();
58332
+ const width = (0, import_vue_demi18.ref)(props.width);
58333
+ const height = (0, import_vue_demi18.ref)(props.height);
58342
58334
  const rectRef = (0, import_vue_demi18.shallowRef)();
58343
58335
  const wrapRect = useElementBounding(rectRef);
58344
58336
  const wrapStyle = (0, import_vue_demi18.computed)(() => ({
@@ -58355,6 +58347,8 @@ var FreeDomWrap = (0, import_vue_demi18.defineComponent)({
58355
58347
  return;
58356
58348
  width.value = w;
58357
58349
  height.value = h7;
58350
+ emit("update:width", w);
58351
+ emit("update:height", h7);
58358
58352
  runCorrect();
58359
58353
  }, { immediate: true });
58360
58354
  const selectedNodes = (0, import_vue_demi18.computed)(() => nodes.value.filter((node) => node.node.selected));