@explorable-viz/fluid 0.7.24 → 0.7.25

Sign up to get free protection for your applications and to get access to all the features.
@@ -3021,9 +3021,9 @@ var fromStringAsImpl = function(just) {
3021
3021
  } else {
3022
3022
  digits = "[0-9a-" + String.fromCharCode(86 + radix) + "]";
3023
3023
  }
3024
- var pattern3 = new RegExp("^[\\+\\-]?" + digits + "+$", "i");
3024
+ var pattern2 = new RegExp("^[\\+\\-]?" + digits + "+$", "i");
3025
3025
  return function(s) {
3026
- if (pattern3.test(s)) {
3026
+ if (pattern2.test(s)) {
3027
3027
  var i = parseInt(s, radix);
3028
3028
  return (i | 0) === i ? just(i) : nothing;
3029
3029
  } else {
@@ -4041,10 +4041,10 @@ function select_default(select2) {
4041
4041
  if (typeof select2 !== "function")
4042
4042
  select2 = selector_default(select2);
4043
4043
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
4044
- for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = new Array(n), node2, subnode, i = 0; i < n; ++i) {
4045
- if ((node2 = group2[i]) && (subnode = select2.call(node2, node2.__data__, i, group2))) {
4046
- if ("__data__" in node2)
4047
- subnode.__data__ = node2.__data__;
4044
+ for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
4045
+ if ((node = group2[i]) && (subnode = select2.call(node, node.__data__, i, group2))) {
4046
+ if ("__data__" in node)
4047
+ subnode.__data__ = node.__data__;
4048
4048
  subgroup[i] = subnode;
4049
4049
  }
4050
4050
  }
@@ -4079,10 +4079,10 @@ function selectAll_default(select2) {
4079
4079
  else
4080
4080
  select2 = selectorAll_default(select2);
4081
4081
  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
4082
- for (var group2 = groups[j], n = group2.length, node2, i = 0; i < n; ++i) {
4083
- if (node2 = group2[i]) {
4084
- subgroups.push(select2.call(node2, node2.__data__, i, group2));
4085
- parents.push(node2);
4082
+ for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
4083
+ if (node = group2[i]) {
4084
+ subgroups.push(select2.call(node, node.__data__, i, group2));
4085
+ parents.push(node);
4086
4086
  }
4087
4087
  }
4088
4088
  }
@@ -4096,8 +4096,8 @@ function matcher_default(selector2) {
4096
4096
  };
4097
4097
  }
4098
4098
  function childMatcher(selector2) {
4099
- return function(node2) {
4100
- return node2.matches(selector2);
4099
+ return function(node) {
4100
+ return node.matches(selector2);
4101
4101
  };
4102
4102
  }
4103
4103
 
@@ -4134,9 +4134,9 @@ function filter_default(match5) {
4134
4134
  if (typeof match5 !== "function")
4135
4135
  match5 = matcher_default(match5);
4136
4136
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
4137
- for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = [], node2, i = 0; i < n; ++i) {
4138
- if ((node2 = group2[i]) && match5.call(node2, node2.__data__, i, group2)) {
4139
- subgroup.push(node2);
4137
+ for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
4138
+ if ((node = group2[i]) && match5.call(node, node.__data__, i, group2)) {
4139
+ subgroup.push(node);
4140
4140
  }
4141
4141
  }
4142
4142
  }
@@ -4184,51 +4184,51 @@ function constant_default(x2) {
4184
4184
 
4185
4185
  // node_modules/d3-selection/src/selection/data.js
4186
4186
  function bindIndex(parent, group2, enter, update3, exit, data) {
4187
- var i = 0, node2, groupLength = group2.length, dataLength = data.length;
4187
+ var i = 0, node, groupLength = group2.length, dataLength = data.length;
4188
4188
  for (; i < dataLength; ++i) {
4189
- if (node2 = group2[i]) {
4190
- node2.__data__ = data[i];
4191
- update3[i] = node2;
4189
+ if (node = group2[i]) {
4190
+ node.__data__ = data[i];
4191
+ update3[i] = node;
4192
4192
  } else {
4193
4193
  enter[i] = new EnterNode(parent, data[i]);
4194
4194
  }
4195
4195
  }
4196
4196
  for (; i < groupLength; ++i) {
4197
- if (node2 = group2[i]) {
4198
- exit[i] = node2;
4197
+ if (node = group2[i]) {
4198
+ exit[i] = node;
4199
4199
  }
4200
4200
  }
4201
4201
  }
4202
4202
  function bindKey(parent, group2, enter, update3, exit, data, key) {
4203
- var i, node2, nodeByKeyValue = /* @__PURE__ */ new Map(), groupLength = group2.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue;
4203
+ var i, node, nodeByKeyValue = /* @__PURE__ */ new Map(), groupLength = group2.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue;
4204
4204
  for (i = 0; i < groupLength; ++i) {
4205
- if (node2 = group2[i]) {
4206
- keyValues[i] = keyValue = key.call(node2, node2.__data__, i, group2) + "";
4205
+ if (node = group2[i]) {
4206
+ keyValues[i] = keyValue = key.call(node, node.__data__, i, group2) + "";
4207
4207
  if (nodeByKeyValue.has(keyValue)) {
4208
- exit[i] = node2;
4208
+ exit[i] = node;
4209
4209
  } else {
4210
- nodeByKeyValue.set(keyValue, node2);
4210
+ nodeByKeyValue.set(keyValue, node);
4211
4211
  }
4212
4212
  }
4213
4213
  }
4214
4214
  for (i = 0; i < dataLength; ++i) {
4215
4215
  keyValue = key.call(parent, data[i], i, data) + "";
4216
- if (node2 = nodeByKeyValue.get(keyValue)) {
4217
- update3[i] = node2;
4218
- node2.__data__ = data[i];
4216
+ if (node = nodeByKeyValue.get(keyValue)) {
4217
+ update3[i] = node;
4218
+ node.__data__ = data[i];
4219
4219
  nodeByKeyValue.delete(keyValue);
4220
4220
  } else {
4221
4221
  enter[i] = new EnterNode(parent, data[i]);
4222
4222
  }
4223
4223
  }
4224
4224
  for (i = 0; i < groupLength; ++i) {
4225
- if ((node2 = group2[i]) && nodeByKeyValue.get(keyValues[i]) === node2) {
4226
- exit[i] = node2;
4225
+ if ((node = group2[i]) && nodeByKeyValue.get(keyValues[i]) === node) {
4226
+ exit[i] = node;
4227
4227
  }
4228
4228
  }
4229
4229
  }
4230
- function datum(node2) {
4231
- return node2.__data__;
4230
+ function datum(node) {
4231
+ return node.__data__;
4232
4232
  }
4233
4233
  function data_default(value, key) {
4234
4234
  if (!arguments.length)
@@ -4289,9 +4289,9 @@ function join_default(onenter, onupdate, onexit) {
4289
4289
  function merge_default(context) {
4290
4290
  var selection2 = context.selection ? context.selection() : context;
4291
4291
  for (var groups0 = this._groups, groups1 = selection2._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
4292
- for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node2, i = 0; i < n; ++i) {
4293
- if (node2 = group0[i] || group1[i]) {
4294
- merge[i] = node2;
4292
+ for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
4293
+ if (node = group0[i] || group1[i]) {
4294
+ merge[i] = node;
4295
4295
  }
4296
4296
  }
4297
4297
  }
@@ -4304,11 +4304,11 @@ function merge_default(context) {
4304
4304
  // node_modules/d3-selection/src/selection/order.js
4305
4305
  function order_default() {
4306
4306
  for (var groups = this._groups, j = -1, m = groups.length; ++j < m; ) {
4307
- for (var group2 = groups[j], i = group2.length - 1, next = group2[i], node2; --i >= 0; ) {
4308
- if (node2 = group2[i]) {
4309
- if (next && node2.compareDocumentPosition(next) ^ 4)
4310
- next.parentNode.insertBefore(node2, next);
4311
- next = node2;
4307
+ for (var group2 = groups[j], i = group2.length - 1, next = group2[i], node; --i >= 0; ) {
4308
+ if (node = group2[i]) {
4309
+ if (next && node.compareDocumentPosition(next) ^ 4)
4310
+ next.parentNode.insertBefore(node, next);
4311
+ next = node;
4312
4312
  }
4313
4313
  }
4314
4314
  }
@@ -4323,9 +4323,9 @@ function sort_default(compare2) {
4323
4323
  return a && b ? compare2(a.__data__, b.__data__) : !a - !b;
4324
4324
  }
4325
4325
  for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
4326
- for (var group2 = groups[j], n = group2.length, sortgroup = sortgroups[j] = new Array(n), node2, i = 0; i < n; ++i) {
4327
- if (node2 = group2[i]) {
4328
- sortgroup[i] = node2;
4326
+ for (var group2 = groups[j], n = group2.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
4327
+ if (node = group2[i]) {
4328
+ sortgroup[i] = node;
4329
4329
  }
4330
4330
  }
4331
4331
  sortgroup.sort(compareNode);
@@ -4353,9 +4353,9 @@ function nodes_default() {
4353
4353
  function node_default() {
4354
4354
  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
4355
4355
  for (var group2 = groups[j], i = 0, n = group2.length; i < n; ++i) {
4356
- var node2 = group2[i];
4357
- if (node2)
4358
- return node2;
4356
+ var node = group2[i];
4357
+ if (node)
4358
+ return node;
4359
4359
  }
4360
4360
  }
4361
4361
  return null;
@@ -4364,7 +4364,7 @@ function node_default() {
4364
4364
  // node_modules/d3-selection/src/selection/size.js
4365
4365
  function size_default() {
4366
4366
  let size4 = 0;
4367
- for (const node2 of this)
4367
+ for (const node of this)
4368
4368
  ++size4;
4369
4369
  return size4;
4370
4370
  }
@@ -4377,9 +4377,9 @@ function empty_default() {
4377
4377
  // node_modules/d3-selection/src/selection/each.js
4378
4378
  function each_default(callback) {
4379
4379
  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
4380
- for (var group2 = groups[j], i = 0, n = group2.length, node2; i < n; ++i) {
4381
- if (node2 = group2[i])
4382
- callback.call(node2, node2.__data__, i, group2);
4380
+ for (var group2 = groups[j], i = 0, n = group2.length, node; i < n; ++i) {
4381
+ if (node = group2[i])
4382
+ callback.call(node, node.__data__, i, group2);
4383
4383
  }
4384
4384
  }
4385
4385
  return this;
@@ -4427,15 +4427,15 @@ function attrFunctionNS(fullname, value) {
4427
4427
  function attr_default(name3, value) {
4428
4428
  var fullname = namespace_default(name3);
4429
4429
  if (arguments.length < 2) {
4430
- var node2 = this.node();
4431
- return fullname.local ? node2.getAttributeNS(fullname.space, fullname.local) : node2.getAttribute(fullname);
4430
+ var node = this.node();
4431
+ return fullname.local ? node.getAttributeNS(fullname.space, fullname.local) : node.getAttribute(fullname);
4432
4432
  }
4433
4433
  return this.each((value == null ? fullname.local ? attrRemoveNS : attrRemove : typeof value === "function" ? fullname.local ? attrFunctionNS : attrFunction : fullname.local ? attrConstantNS : attrConstant)(fullname, value));
4434
4434
  }
4435
4435
 
4436
4436
  // node_modules/d3-selection/src/window.js
4437
- function window_default(node2) {
4438
- return node2.ownerDocument && node2.ownerDocument.defaultView || node2.document && node2 || node2.defaultView;
4437
+ function window_default(node) {
4438
+ return node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView;
4439
4439
  }
4440
4440
 
4441
4441
  // node_modules/d3-selection/src/selection/style.js
@@ -4461,8 +4461,8 @@ function styleFunction(name3, value, priority) {
4461
4461
  function style_default(name3, value, priority) {
4462
4462
  return arguments.length > 1 ? this.each((value == null ? styleRemove : typeof value === "function" ? styleFunction : styleConstant)(name3, value, priority == null ? "" : priority)) : styleValue(this.node(), name3);
4463
4463
  }
4464
- function styleValue(node2, name3) {
4465
- return node2.style.getPropertyValue(name3) || window_default(node2).getComputedStyle(node2, null).getPropertyValue(name3);
4464
+ function styleValue(node, name3) {
4465
+ return node.style.getPropertyValue(name3) || window_default(node).getComputedStyle(node, null).getPropertyValue(name3);
4466
4466
  }
4467
4467
 
4468
4468
  // node_modules/d3-selection/src/selection/property.js
@@ -4493,12 +4493,12 @@ function property_default(name3, value) {
4493
4493
  function classArray(string4) {
4494
4494
  return string4.trim().split(/^|\s+/);
4495
4495
  }
4496
- function classList(node2) {
4497
- return node2.classList || new ClassList(node2);
4496
+ function classList(node) {
4497
+ return node.classList || new ClassList(node);
4498
4498
  }
4499
- function ClassList(node2) {
4500
- this._node = node2;
4501
- this._names = classArray(node2.getAttribute("class") || "");
4499
+ function ClassList(node) {
4500
+ this._node = node;
4501
+ this._names = classArray(node.getAttribute("class") || "");
4502
4502
  }
4503
4503
  ClassList.prototype = {
4504
4504
  add: function(name3) {
@@ -4519,41 +4519,41 @@ ClassList.prototype = {
4519
4519
  return this._names.indexOf(name3) >= 0;
4520
4520
  }
4521
4521
  };
4522
- function classedAdd(node2, names2) {
4523
- var list = classList(node2), i = -1, n = names2.length;
4522
+ function classedAdd(node, names) {
4523
+ var list = classList(node), i = -1, n = names.length;
4524
4524
  while (++i < n)
4525
- list.add(names2[i]);
4525
+ list.add(names[i]);
4526
4526
  }
4527
- function classedRemove(node2, names2) {
4528
- var list = classList(node2), i = -1, n = names2.length;
4527
+ function classedRemove(node, names) {
4528
+ var list = classList(node), i = -1, n = names.length;
4529
4529
  while (++i < n)
4530
- list.remove(names2[i]);
4530
+ list.remove(names[i]);
4531
4531
  }
4532
- function classedTrue(names2) {
4532
+ function classedTrue(names) {
4533
4533
  return function() {
4534
- classedAdd(this, names2);
4534
+ classedAdd(this, names);
4535
4535
  };
4536
4536
  }
4537
- function classedFalse(names2) {
4537
+ function classedFalse(names) {
4538
4538
  return function() {
4539
- classedRemove(this, names2);
4539
+ classedRemove(this, names);
4540
4540
  };
4541
4541
  }
4542
- function classedFunction(names2, value) {
4542
+ function classedFunction(names, value) {
4543
4543
  return function() {
4544
- (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names2);
4544
+ (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);
4545
4545
  };
4546
4546
  }
4547
4547
  function classed_default(name3, value) {
4548
- var names2 = classArray(name3 + "");
4548
+ var names = classArray(name3 + "");
4549
4549
  if (arguments.length < 2) {
4550
- var list = classList(this.node()), i = -1, n = names2.length;
4550
+ var list = classList(this.node()), i = -1, n = names.length;
4551
4551
  while (++i < n)
4552
- if (!list.contains(names2[i]))
4552
+ if (!list.contains(names[i]))
4553
4553
  return false;
4554
4554
  return true;
4555
4555
  }
4556
- return this.each((typeof value === "function" ? classedFunction : value ? classedTrue : classedFalse)(names2, value));
4556
+ return this.each((typeof value === "function" ? classedFunction : value ? classedTrue : classedFalse)(names, value));
4557
4557
  }
4558
4558
 
4559
4559
  // node_modules/d3-selection/src/selection/text.js
@@ -4732,8 +4732,8 @@ function on_default(typename, value, options) {
4732
4732
  }
4733
4733
 
4734
4734
  // node_modules/d3-selection/src/selection/dispatch.js
4735
- function dispatchEvent(node2, type2, params) {
4736
- var window2 = window_default(node2), event = window2.CustomEvent;
4735
+ function dispatchEvent(node, type2, params) {
4736
+ var window2 = window_default(node), event = window2.CustomEvent;
4737
4737
  if (typeof event === "function") {
4738
4738
  event = new event(type2, params);
4739
4739
  } else {
@@ -4743,7 +4743,7 @@ function dispatchEvent(node2, type2, params) {
4743
4743
  else
4744
4744
  event.initEvent(type2, false, false);
4745
4745
  }
4746
- node2.dispatchEvent(event);
4746
+ node.dispatchEvent(event);
4747
4747
  }
4748
4748
  function dispatchConstant(type2, params) {
4749
4749
  return function() {
@@ -4762,9 +4762,9 @@ function dispatch_default2(type2, params) {
4762
4762
  // node_modules/d3-selection/src/selection/iterator.js
4763
4763
  function* iterator_default() {
4764
4764
  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
4765
- for (var group2 = groups[j], i = 0, n = group2.length, node2; i < n; ++i) {
4766
- if (node2 = group2[i])
4767
- yield node2;
4765
+ for (var group2 = groups[j], i = 0, n = group2.length, node; i < n; ++i) {
4766
+ if (node = group2[i])
4767
+ yield node;
4768
4768
  }
4769
4769
  }
4770
4770
  }
@@ -5639,13 +5639,13 @@ var STARTED = 3;
5639
5639
  var RUNNING = 4;
5640
5640
  var ENDING = 5;
5641
5641
  var ENDED = 6;
5642
- function schedule_default(node2, name3, id3, index3, group2, timing) {
5643
- var schedules = node2.__transition;
5642
+ function schedule_default(node, name3, id3, index3, group2, timing) {
5643
+ var schedules = node.__transition;
5644
5644
  if (!schedules)
5645
- node2.__transition = {};
5645
+ node.__transition = {};
5646
5646
  else if (id3 in schedules)
5647
5647
  return;
5648
- create(node2, id3, {
5648
+ create(node, id3, {
5649
5649
  name: name3,
5650
5650
  index: index3,
5651
5651
  group: group2,
@@ -5659,26 +5659,26 @@ function schedule_default(node2, name3, id3, index3, group2, timing) {
5659
5659
  state: CREATED
5660
5660
  });
5661
5661
  }
5662
- function init2(node2, id3) {
5663
- var schedule = get2(node2, id3);
5662
+ function init2(node, id3) {
5663
+ var schedule = get2(node, id3);
5664
5664
  if (schedule.state > CREATED)
5665
5665
  throw new Error("too late; already scheduled");
5666
5666
  return schedule;
5667
5667
  }
5668
- function set2(node2, id3) {
5669
- var schedule = get2(node2, id3);
5668
+ function set2(node, id3) {
5669
+ var schedule = get2(node, id3);
5670
5670
  if (schedule.state > STARTED)
5671
5671
  throw new Error("too late; already running");
5672
5672
  return schedule;
5673
5673
  }
5674
- function get2(node2, id3) {
5675
- var schedule = node2.__transition;
5674
+ function get2(node, id3) {
5675
+ var schedule = node.__transition;
5676
5676
  if (!schedule || !(schedule = schedule[id3]))
5677
5677
  throw new Error("transition not found");
5678
5678
  return schedule;
5679
5679
  }
5680
- function create(node2, id3, self) {
5681
- var schedules = node2.__transition, tween;
5680
+ function create(node, id3, self) {
5681
+ var schedules = node.__transition, tween;
5682
5682
  schedules[id3] = self;
5683
5683
  self.timer = timer(schedule, 0, self.time);
5684
5684
  function schedule(elapsed) {
@@ -5700,12 +5700,12 @@ function create(node2, id3, self) {
5700
5700
  if (o.state === RUNNING) {
5701
5701
  o.state = ENDED;
5702
5702
  o.timer.stop();
5703
- o.on.call("interrupt", node2, node2.__data__, o.index, o.group);
5703
+ o.on.call("interrupt", node, node.__data__, o.index, o.group);
5704
5704
  delete schedules[i];
5705
5705
  } else if (+i < id3) {
5706
5706
  o.state = ENDED;
5707
5707
  o.timer.stop();
5708
- o.on.call("cancel", node2, node2.__data__, o.index, o.group);
5708
+ o.on.call("cancel", node, node.__data__, o.index, o.group);
5709
5709
  delete schedules[i];
5710
5710
  }
5711
5711
  }
@@ -5717,13 +5717,13 @@ function create(node2, id3, self) {
5717
5717
  }
5718
5718
  });
5719
5719
  self.state = STARTING;
5720
- self.on.call("start", node2, node2.__data__, self.index, self.group);
5720
+ self.on.call("start", node, node.__data__, self.index, self.group);
5721
5721
  if (self.state !== STARTING)
5722
5722
  return;
5723
5723
  self.state = STARTED;
5724
5724
  tween = new Array(n = self.tween.length);
5725
5725
  for (i = 0, j = -1; i < n; ++i) {
5726
- if (o = self.tween[i].value.call(node2, node2.__data__, self.index, self.group)) {
5726
+ if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {
5727
5727
  tween[++j] = o;
5728
5728
  }
5729
5729
  }
@@ -5732,10 +5732,10 @@ function create(node2, id3, self) {
5732
5732
  function tick(elapsed) {
5733
5733
  var t2 = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1), i = -1, n = tween.length;
5734
5734
  while (++i < n) {
5735
- tween[i].call(node2, t2);
5735
+ tween[i].call(node, t2);
5736
5736
  }
5737
5737
  if (self.state === ENDING) {
5738
- self.on.call("end", node2, node2.__data__, self.index, self.group);
5738
+ self.on.call("end", node, node.__data__, self.index, self.group);
5739
5739
  stop();
5740
5740
  }
5741
5741
  }
@@ -5745,13 +5745,13 @@ function create(node2, id3, self) {
5745
5745
  delete schedules[id3];
5746
5746
  for (var i in schedules)
5747
5747
  return;
5748
- delete node2.__transition;
5748
+ delete node.__transition;
5749
5749
  }
5750
5750
  }
5751
5751
 
5752
5752
  // node_modules/d3-transition/src/interrupt.js
5753
- function interrupt_default(node2, name3) {
5754
- var schedules = node2.__transition, schedule, active, empty4 = true, i;
5753
+ function interrupt_default(node, name3) {
5754
+ var schedules = node.__transition, schedule, active, empty4 = true, i;
5755
5755
  if (!schedules)
5756
5756
  return;
5757
5757
  name3 = name3 == null ? null : name3 + "";
@@ -5763,11 +5763,11 @@ function interrupt_default(node2, name3) {
5763
5763
  active = schedule.state > STARTING && schedule.state < ENDING;
5764
5764
  schedule.state = ENDED;
5765
5765
  schedule.timer.stop();
5766
- schedule.on.call(active ? "interrupt" : "cancel", node2, node2.__data__, schedule.index, schedule.group);
5766
+ schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group);
5767
5767
  delete schedules[i];
5768
5768
  }
5769
5769
  if (empty4)
5770
- delete node2.__transition;
5770
+ delete node.__transition;
5771
5771
  }
5772
5772
 
5773
5773
  // node_modules/d3-transition/src/selection/interrupt.js
@@ -5835,8 +5835,8 @@ function tweenValue(transition2, name3, value) {
5835
5835
  var schedule = set2(this, id3);
5836
5836
  (schedule.value || (schedule.value = {}))[name3] = value.apply(this, arguments);
5837
5837
  });
5838
- return function(node2) {
5839
- return get2(node2, id3).value[name3];
5838
+ return function(node) {
5839
+ return get2(node, id3).value[name3];
5840
5840
  };
5841
5841
  }
5842
5842
 
@@ -6008,9 +6008,9 @@ function filter_default2(match5) {
6008
6008
  if (typeof match5 !== "function")
6009
6009
  match5 = matcher_default(match5);
6010
6010
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
6011
- for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = [], node2, i = 0; i < n; ++i) {
6012
- if ((node2 = group2[i]) && match5.call(node2, node2.__data__, i, group2)) {
6013
- subgroup.push(node2);
6011
+ for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
6012
+ if ((node = group2[i]) && match5.call(node, node.__data__, i, group2)) {
6013
+ subgroup.push(node);
6014
6014
  }
6015
6015
  }
6016
6016
  }
@@ -6022,9 +6022,9 @@ function merge_default2(transition2) {
6022
6022
  if (transition2._id !== this._id)
6023
6023
  throw new Error();
6024
6024
  for (var groups0 = this._groups, groups1 = transition2._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
6025
- for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node2, i = 0; i < n; ++i) {
6026
- if (node2 = group0[i] || group1[i]) {
6027
- merge[i] = node2;
6025
+ for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
6026
+ if (node = group0[i] || group1[i]) {
6027
+ merge[i] = node;
6028
6028
  }
6029
6029
  }
6030
6030
  }
@@ -6078,12 +6078,12 @@ function select_default3(select2) {
6078
6078
  if (typeof select2 !== "function")
6079
6079
  select2 = selector_default(select2);
6080
6080
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
6081
- for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = new Array(n), node2, subnode, i = 0; i < n; ++i) {
6082
- if ((node2 = group2[i]) && (subnode = select2.call(node2, node2.__data__, i, group2))) {
6083
- if ("__data__" in node2)
6084
- subnode.__data__ = node2.__data__;
6081
+ for (var group2 = groups[j], n = group2.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
6082
+ if ((node = group2[i]) && (subnode = select2.call(node, node.__data__, i, group2))) {
6083
+ if ("__data__" in node)
6084
+ subnode.__data__ = node.__data__;
6085
6085
  subgroup[i] = subnode;
6086
- schedule_default(subgroup[i], name3, id3, i, subgroup, get2(node2, id3));
6086
+ schedule_default(subgroup[i], name3, id3, i, subgroup, get2(node, id3));
6087
6087
  }
6088
6088
  }
6089
6089
  }
@@ -6096,15 +6096,15 @@ function selectAll_default2(select2) {
6096
6096
  if (typeof select2 !== "function")
6097
6097
  select2 = selectorAll_default(select2);
6098
6098
  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
6099
- for (var group2 = groups[j], n = group2.length, node2, i = 0; i < n; ++i) {
6100
- if (node2 = group2[i]) {
6101
- for (var children2 = select2.call(node2, node2.__data__, i, group2), child, inherit2 = get2(node2, id3), k = 0, l = children2.length; k < l; ++k) {
6099
+ for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
6100
+ if (node = group2[i]) {
6101
+ for (var children2 = select2.call(node, node.__data__, i, group2), child, inherit2 = get2(node, id3), k = 0, l = children2.length; k < l; ++k) {
6102
6102
  if (child = children2[k]) {
6103
6103
  schedule_default(child, name3, id3, k, children2, inherit2);
6104
6104
  }
6105
6105
  }
6106
6106
  subgroups.push(children2);
6107
- parents.push(node2);
6107
+ parents.push(node);
6108
6108
  }
6109
6109
  }
6110
6110
  }
@@ -6236,10 +6236,10 @@ function textTween_default(value) {
6236
6236
  function transition_default() {
6237
6237
  var name3 = this._name, id0 = this._id, id1 = newId();
6238
6238
  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
6239
- for (var group2 = groups[j], n = group2.length, node2, i = 0; i < n; ++i) {
6240
- if (node2 = group2[i]) {
6241
- var inherit2 = get2(node2, id0);
6242
- schedule_default(node2, name3, id1, i, group2, {
6239
+ for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
6240
+ if (node = group2[i]) {
6241
+ var inherit2 = get2(node, id0);
6242
+ schedule_default(node, name3, id1, i, group2, {
6243
6243
  time: inherit2.time + inherit2.delay + inherit2.duration,
6244
6244
  delay: 0,
6245
6245
  duration: inherit2.duration,
@@ -6334,10 +6334,10 @@ var defaultTiming = {
6334
6334
  duration: 250,
6335
6335
  ease: cubicInOut
6336
6336
  };
6337
- function inherit(node2, id3) {
6337
+ function inherit(node, id3) {
6338
6338
  var timing;
6339
- while (!(timing = node2.__transition) || !(timing = timing[id3])) {
6340
- if (!(node2 = node2.parentNode)) {
6339
+ while (!(timing = node.__transition) || !(timing = timing[id3])) {
6340
+ if (!(node = node.parentNode)) {
6341
6341
  throw new Error(`transition ${id3} not found`);
6342
6342
  }
6343
6343
  }
@@ -6351,9 +6351,9 @@ function transition_default2(name3) {
6351
6351
  id3 = newId(), (timing = defaultTiming).time = now(), name3 = name3 == null ? null : name3 + "";
6352
6352
  }
6353
6353
  for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
6354
- for (var group2 = groups[j], n = group2.length, node2, i = 0; i < n; ++i) {
6355
- if (node2 = group2[i]) {
6356
- schedule_default(node2, name3, id3, i, group2, timing || inherit(node2, id3));
6354
+ for (var group2 = groups[j], n = group2.length, node, i = 0; i < n; ++i) {
6355
+ if (node = group2[i]) {
6356
+ schedule_default(node, name3, id3, i, group2, timing || inherit(node, id3));
6357
6357
  }
6358
6358
  }
6359
6359
  }
@@ -7233,11 +7233,11 @@ Transform.prototype = {
7233
7233
  };
7234
7234
  var identity11 = new Transform(1, 0, 0);
7235
7235
  transform.prototype = Transform.prototype;
7236
- function transform(node2) {
7237
- while (!node2.__zoom)
7238
- if (!(node2 = node2.parentNode))
7236
+ function transform(node) {
7237
+ while (!node.__zoom)
7238
+ if (!(node = node.parentNode))
7239
7239
  return identity11;
7240
- return node2.__zoom;
7240
+ return node.__zoom;
7241
7241
  }
7242
7242
 
7243
7243
  // node_modules/@codemirror/state/dist/index.js
@@ -7496,8 +7496,8 @@ var TextNode = class extends Text {
7496
7496
  function add(child) {
7497
7497
  let last2;
7498
7498
  if (child.lines > maxChunk && child instanceof TextNode) {
7499
- for (let node2 of child.children)
7500
- add(node2);
7499
+ for (let node of child.children)
7500
+ add(node);
7501
7501
  } else if (child.lines > minChunk && (currentLines > minChunk || !currentLines)) {
7502
7502
  flush();
7503
7503
  chunked.push(child);
@@ -10142,8 +10142,8 @@ function getSelection(root2) {
10142
10142
  }
10143
10143
  return target.getSelection();
10144
10144
  }
10145
- function contains2(dom, node2) {
10146
- return node2 ? dom == node2 || dom.contains(node2.nodeType != 1 ? node2.parentNode : node2) : false;
10145
+ function contains2(dom, node) {
10146
+ return node ? dom == node || dom.contains(node.nodeType != 1 ? node.parentNode : node) : false;
10147
10147
  }
10148
10148
  function deepActiveElement(doc2) {
10149
10149
  let elt = doc2.activeElement;
@@ -10168,40 +10168,40 @@ function clientRectsFor(dom) {
10168
10168
  else
10169
10169
  return [];
10170
10170
  }
10171
- function isEquivalentPosition(node2, off, targetNode, targetOff) {
10172
- return targetNode ? scanFor(node2, off, targetNode, targetOff, -1) || scanFor(node2, off, targetNode, targetOff, 1) : false;
10171
+ function isEquivalentPosition(node, off, targetNode, targetOff) {
10172
+ return targetNode ? scanFor(node, off, targetNode, targetOff, -1) || scanFor(node, off, targetNode, targetOff, 1) : false;
10173
10173
  }
10174
- function domIndex(node2) {
10174
+ function domIndex(node) {
10175
10175
  for (var index3 = 0; ; index3++) {
10176
- node2 = node2.previousSibling;
10177
- if (!node2)
10176
+ node = node.previousSibling;
10177
+ if (!node)
10178
10178
  return index3;
10179
10179
  }
10180
10180
  }
10181
- function scanFor(node2, off, targetNode, targetOff, dir) {
10181
+ function scanFor(node, off, targetNode, targetOff, dir) {
10182
10182
  for (; ; ) {
10183
- if (node2 == targetNode && off == targetOff)
10183
+ if (node == targetNode && off == targetOff)
10184
10184
  return true;
10185
- if (off == (dir < 0 ? 0 : maxOffset(node2))) {
10186
- if (node2.nodeName == "DIV")
10185
+ if (off == (dir < 0 ? 0 : maxOffset(node))) {
10186
+ if (node.nodeName == "DIV")
10187
10187
  return false;
10188
- let parent = node2.parentNode;
10188
+ let parent = node.parentNode;
10189
10189
  if (!parent || parent.nodeType != 1)
10190
10190
  return false;
10191
- off = domIndex(node2) + (dir < 0 ? 0 : 1);
10192
- node2 = parent;
10193
- } else if (node2.nodeType == 1) {
10194
- node2 = node2.childNodes[off + (dir < 0 ? -1 : 0)];
10195
- if (node2.nodeType == 1 && node2.contentEditable == "false")
10191
+ off = domIndex(node) + (dir < 0 ? 0 : 1);
10192
+ node = parent;
10193
+ } else if (node.nodeType == 1) {
10194
+ node = node.childNodes[off + (dir < 0 ? -1 : 0)];
10195
+ if (node.nodeType == 1 && node.contentEditable == "false")
10196
10196
  return false;
10197
- off = dir < 0 ? maxOffset(node2) : 0;
10197
+ off = dir < 0 ? maxOffset(node) : 0;
10198
10198
  } else {
10199
10199
  return false;
10200
10200
  }
10201
10201
  }
10202
10202
  }
10203
- function maxOffset(node2) {
10204
- return node2.nodeType == 3 ? node2.nodeValue.length : node2.childNodes.length;
10203
+ function maxOffset(node) {
10204
+ return node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length;
10205
10205
  }
10206
10206
  var Rect0 = { left: 0, right: 0, top: 0, bottom: 0 };
10207
10207
  function flattenRect(rect, left2) {
@@ -10370,10 +10370,10 @@ function focusPreventScroll(dom) {
10370
10370
  }
10371
10371
  }
10372
10372
  var scratchRange;
10373
- function textRange(node2, from, to = from) {
10373
+ function textRange(node, from, to = from) {
10374
10374
  let range5 = scratchRange || (scratchRange = document.createRange());
10375
- range5.setEnd(node2, to);
10376
- range5.setStart(node2, from);
10375
+ range5.setEnd(node, to);
10376
+ range5.setStart(node, from);
10377
10377
  return range5;
10378
10378
  }
10379
10379
  function dispatchKey(elt, name3, code) {
@@ -10386,44 +10386,44 @@ function dispatchKey(elt, name3, code) {
10386
10386
  elt.dispatchEvent(up);
10387
10387
  return down.defaultPrevented || up.defaultPrevented;
10388
10388
  }
10389
- function getRoot(node2) {
10390
- while (node2) {
10391
- if (node2 && (node2.nodeType == 9 || node2.nodeType == 11 && node2.host))
10392
- return node2;
10393
- node2 = node2.assignedSlot || node2.parentNode;
10389
+ function getRoot(node) {
10390
+ while (node) {
10391
+ if (node && (node.nodeType == 9 || node.nodeType == 11 && node.host))
10392
+ return node;
10393
+ node = node.assignedSlot || node.parentNode;
10394
10394
  }
10395
10395
  return null;
10396
10396
  }
10397
- function clearAttributes(node2) {
10398
- while (node2.attributes.length)
10399
- node2.removeAttributeNode(node2.attributes[0]);
10397
+ function clearAttributes(node) {
10398
+ while (node.attributes.length)
10399
+ node.removeAttributeNode(node.attributes[0]);
10400
10400
  }
10401
10401
  function atElementStart(doc2, selection2) {
10402
- let node2 = selection2.focusNode, offset = selection2.focusOffset;
10403
- if (!node2 || selection2.anchorNode != node2 || selection2.anchorOffset != offset)
10402
+ let node = selection2.focusNode, offset = selection2.focusOffset;
10403
+ if (!node || selection2.anchorNode != node || selection2.anchorOffset != offset)
10404
10404
  return false;
10405
10405
  for (; ; ) {
10406
10406
  if (offset) {
10407
- if (node2.nodeType != 1)
10407
+ if (node.nodeType != 1)
10408
10408
  return false;
10409
- let prev = node2.childNodes[offset - 1];
10409
+ let prev = node.childNodes[offset - 1];
10410
10410
  if (prev.contentEditable == "false")
10411
10411
  offset--;
10412
10412
  else {
10413
- node2 = prev;
10414
- offset = maxOffset(node2);
10413
+ node = prev;
10414
+ offset = maxOffset(node);
10415
10415
  }
10416
- } else if (node2 == doc2) {
10416
+ } else if (node == doc2) {
10417
10417
  return true;
10418
10418
  } else {
10419
- offset = domIndex(node2);
10420
- node2 = node2.parentNode;
10419
+ offset = domIndex(node);
10420
+ node = node.parentNode;
10421
10421
  }
10422
10422
  }
10423
10423
  }
10424
10424
  var DOMPos = class {
10425
- constructor(node2, offset, precise = true) {
10426
- this.node = node2;
10425
+ constructor(node, offset, precise = true) {
10426
+ this.node = node;
10427
10427
  this.offset = offset;
10428
10428
  this.precise = precise;
10429
10429
  }
@@ -10505,28 +10505,28 @@ var ContentView = class {
10505
10505
  }
10506
10506
  reuseDOM(_dom) {
10507
10507
  }
10508
- localPosFromDOM(node2, offset) {
10508
+ localPosFromDOM(node, offset) {
10509
10509
  let after;
10510
- if (node2 == this.dom) {
10510
+ if (node == this.dom) {
10511
10511
  after = this.dom.childNodes[offset];
10512
10512
  } else {
10513
- let bias = maxOffset(node2) == 0 ? 0 : offset == 0 ? -1 : 1;
10513
+ let bias = maxOffset(node) == 0 ? 0 : offset == 0 ? -1 : 1;
10514
10514
  for (; ; ) {
10515
- let parent = node2.parentNode;
10515
+ let parent = node.parentNode;
10516
10516
  if (parent == this.dom)
10517
10517
  break;
10518
10518
  if (bias == 0 && parent.firstChild != parent.lastChild) {
10519
- if (node2 == parent.firstChild)
10519
+ if (node == parent.firstChild)
10520
10520
  bias = -1;
10521
10521
  else
10522
10522
  bias = 1;
10523
10523
  }
10524
- node2 = parent;
10524
+ node = parent;
10525
10525
  }
10526
10526
  if (bias < 0)
10527
- after = node2;
10527
+ after = node;
10528
10528
  else
10529
- after = node2.nextSibling;
10529
+ after = node.nextSibling;
10530
10530
  }
10531
10531
  if (after == this.dom.firstChild)
10532
10532
  return 0;
@@ -10628,8 +10628,8 @@ var ContentView = class {
10628
10628
  let name3 = this.constructor.name.replace("View", "");
10629
10629
  return name3 + (this.children.length ? "(" + this.children.join() + ")" : this.length ? "[" + (name3 == "Text" ? this.text : this.length) + "]" : "") + (this.breakAfter ? "#" : "");
10630
10630
  }
10631
- static get(node2) {
10632
- return node2.cmView;
10631
+ static get(node) {
10632
+ return node.cmView;
10633
10633
  }
10634
10634
  get isEditable() {
10635
10635
  return true;
@@ -10811,8 +10811,8 @@ var TextView = class extends ContentView {
10811
10811
  this.markDirty();
10812
10812
  return result;
10813
10813
  }
10814
- localPosFromDOM(node2, offset) {
10815
- return node2 == this.dom ? offset : offset ? this.text.length : 0;
10814
+ localPosFromDOM(node, offset) {
10815
+ return node == this.dom ? offset : offset ? this.text.length : 0;
10816
10816
  }
10817
10817
  domAtPos(pos) {
10818
10818
  return new DOMPos(this.dom, pos);
@@ -10842,9 +10842,9 @@ var MarkView = class extends ContentView {
10842
10842
  dom.setAttribute(name3, this.mark.attrs[name3]);
10843
10843
  return dom;
10844
10844
  }
10845
- reuseDOM(node2) {
10846
- if (node2.nodeName == this.mark.tagName.toUpperCase()) {
10847
- this.setDOM(node2);
10845
+ reuseDOM(node) {
10846
+ if (node.nodeName == this.mark.tagName.toUpperCase()) {
10847
+ this.setDOM(node);
10848
10848
  this.dirty |= 4 | 2;
10849
10849
  }
10850
10850
  }
@@ -11018,11 +11018,11 @@ var CompositionView = class extends WidgetView {
11018
11018
  sync() {
11019
11019
  this.setDOM(this.widget.toDOM());
11020
11020
  }
11021
- localPosFromDOM(node2, offset) {
11021
+ localPosFromDOM(node, offset) {
11022
11022
  let { topView, text: text2 } = this.widget;
11023
11023
  if (!topView)
11024
11024
  return Math.min(offset, this.length);
11025
- return posFromDOMInCompositionTree(node2, offset, topView, text2);
11025
+ return posFromDOMInCompositionTree(node, offset, topView, text2);
11026
11026
  }
11027
11027
  ignoreMutation() {
11028
11028
  return false;
@@ -11067,19 +11067,19 @@ function scanCompositionTree(pos, side, view2, text2, enterView, fromText) {
11067
11067
  return enterView(view2, pos, side);
11068
11068
  }
11069
11069
  }
11070
- function posFromDOMInCompositionTree(node2, offset, view2, text2) {
11070
+ function posFromDOMInCompositionTree(node, offset, view2, text2) {
11071
11071
  if (view2 instanceof MarkView) {
11072
11072
  let pos = 0;
11073
11073
  for (let child of view2.children) {
11074
11074
  let hasComp = contains2(child.dom, text2);
11075
- if (contains2(child.dom, node2))
11076
- return pos + (hasComp ? posFromDOMInCompositionTree(node2, offset, child, text2) : child.localPosFromDOM(node2, offset));
11075
+ if (contains2(child.dom, node))
11076
+ return pos + (hasComp ? posFromDOMInCompositionTree(node, offset, child, text2) : child.localPosFromDOM(node, offset));
11077
11077
  pos += hasComp ? text2.nodeValue.length : child.length;
11078
11078
  }
11079
11079
  } else if (view2.dom == text2) {
11080
11080
  return Math.min(offset, text2.nodeValue.length);
11081
11081
  }
11082
- return view2.localPosFromDOM(node2, offset);
11082
+ return view2.localPosFromDOM(node, offset);
11083
11083
  }
11084
11084
  var WidgetBufferView = class extends ContentView {
11085
11085
  constructor(side) {
@@ -11475,9 +11475,9 @@ var LineView = class extends ContentView {
11475
11475
  domAtPos(pos) {
11476
11476
  return inlineDOMAtPos(this, pos);
11477
11477
  }
11478
- reuseDOM(node2) {
11479
- if (node2.nodeName == "DIV") {
11480
- this.setDOM(node2);
11478
+ reuseDOM(node) {
11479
+ if (node.nodeName == "DIV") {
11480
+ this.setDOM(node);
11481
11481
  this.dirty |= 4 | 2;
11482
11482
  }
11483
11483
  }
@@ -12248,10 +12248,10 @@ var DOMReader = class {
12248
12248
  this.findPointBefore(parent, end);
12249
12249
  return this;
12250
12250
  }
12251
- readTextNode(node2) {
12252
- let text2 = node2.nodeValue;
12251
+ readTextNode(node) {
12252
+ let text2 = node.nodeValue;
12253
12253
  for (let point2 of this.points)
12254
- if (point2.node == node2)
12254
+ if (point2.node == node)
12255
12255
  point2.pos = this.text.length + Math.min(point2.offset, text2.length);
12256
12256
  for (let off = 0, re2 = this.lineSeparator ? null : /\r\n?|\n/g; ; ) {
12257
12257
  let nextBreak = -1, breakSize = 1, m;
@@ -12268,51 +12268,51 @@ var DOMReader = class {
12268
12268
  this.lineBreak();
12269
12269
  if (breakSize > 1) {
12270
12270
  for (let point2 of this.points)
12271
- if (point2.node == node2 && point2.pos > this.text.length)
12271
+ if (point2.node == node && point2.pos > this.text.length)
12272
12272
  point2.pos -= breakSize - 1;
12273
12273
  }
12274
12274
  off = nextBreak + breakSize;
12275
12275
  }
12276
12276
  }
12277
- readNode(node2) {
12278
- if (node2.cmIgnore)
12277
+ readNode(node) {
12278
+ if (node.cmIgnore)
12279
12279
  return;
12280
- let view2 = ContentView.get(node2);
12280
+ let view2 = ContentView.get(node);
12281
12281
  let fromView = view2 && view2.overrideDOMText;
12282
12282
  if (fromView != null) {
12283
- this.findPointInside(node2, fromView.length);
12283
+ this.findPointInside(node, fromView.length);
12284
12284
  for (let i = fromView.iter(); !i.next().done; ) {
12285
12285
  if (i.lineBreak)
12286
12286
  this.lineBreak();
12287
12287
  else
12288
12288
  this.append(i.value);
12289
12289
  }
12290
- } else if (node2.nodeType == 3) {
12291
- this.readTextNode(node2);
12292
- } else if (node2.nodeName == "BR") {
12293
- if (node2.nextSibling)
12290
+ } else if (node.nodeType == 3) {
12291
+ this.readTextNode(node);
12292
+ } else if (node.nodeName == "BR") {
12293
+ if (node.nextSibling)
12294
12294
  this.lineBreak();
12295
- } else if (node2.nodeType == 1) {
12296
- this.readRange(node2.firstChild, null);
12295
+ } else if (node.nodeType == 1) {
12296
+ this.readRange(node.firstChild, null);
12297
12297
  }
12298
12298
  }
12299
- findPointBefore(node2, next) {
12299
+ findPointBefore(node, next) {
12300
12300
  for (let point2 of this.points)
12301
- if (point2.node == node2 && node2.childNodes[point2.offset] == next)
12301
+ if (point2.node == node && node.childNodes[point2.offset] == next)
12302
12302
  point2.pos = this.text.length;
12303
12303
  }
12304
- findPointInside(node2, maxLen) {
12304
+ findPointInside(node, maxLen) {
12305
12305
  for (let point2 of this.points)
12306
- if (node2.nodeType == 3 ? point2.node == node2 : node2.contains(point2.node))
12306
+ if (node.nodeType == 3 ? point2.node == node : node.contains(point2.node))
12307
12307
  point2.pos = this.text.length + Math.min(maxLen, point2.offset);
12308
12308
  }
12309
12309
  };
12310
- function isBlockElement(node2) {
12311
- return node2.nodeType == 1 && /^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(node2.nodeName);
12310
+ function isBlockElement(node) {
12311
+ return node.nodeType == 1 && /^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(node.nodeName);
12312
12312
  }
12313
12313
  var DOMPoint = class {
12314
- constructor(node2, offset) {
12315
- this.node = node2;
12314
+ constructor(node, offset) {
12315
+ this.node = node;
12316
12316
  this.offset = offset;
12317
12317
  this.pos = -1;
12318
12318
  }
@@ -12500,11 +12500,11 @@ var DocView = class extends ContentView {
12500
12500
  }
12501
12501
  return null;
12502
12502
  }
12503
- posFromDOM(node2, offset) {
12504
- let view2 = this.nearest(node2);
12503
+ posFromDOM(node, offset) {
12504
+ let view2 = this.nearest(node);
12505
12505
  if (!view2)
12506
12506
  throw new RangeError("Trying to find position for a DOM position outside of the document");
12507
- return view2.localPosFromDOM(node2, offset) + view2.posAtStart;
12507
+ return view2.localPosFromDOM(node, offset) + view2.posAtStart;
12508
12508
  }
12509
12509
  domAtPos(pos) {
12510
12510
  let { i, off } = this.childCursor().findPos(pos, -1);
@@ -12714,9 +12714,9 @@ function computeCompositionDeco(view2, changes) {
12714
12714
  let surrounding = compositionSurroundingNode(view2);
12715
12715
  if (!surrounding)
12716
12716
  return Decoration.none;
12717
- let { from, to, node: node2, text: textNode } = surrounding;
12717
+ let { from, to, node, text: textNode } = surrounding;
12718
12718
  let newFrom = changes.mapPos(from, 1), newTo = Math.max(newFrom, changes.mapPos(to, -1));
12719
- let { state } = view2, text2 = node2.nodeType == 3 ? node2.nodeValue : new DOMReader([], state).readRange(node2.firstChild, null).text;
12719
+ let { state } = view2, text2 = node.nodeType == 3 ? node.nodeValue : new DOMReader([], state).readRange(node.firstChild, null).text;
12720
12720
  if (newTo - newFrom < text2.length) {
12721
12721
  if (state.doc.sliceString(newFrom, Math.min(state.doc.length, newFrom + text2.length), LineBreakPlaceholder) == text2)
12722
12722
  newTo = newFrom + text2.length;
@@ -12727,12 +12727,12 @@ function computeCompositionDeco(view2, changes) {
12727
12727
  } else if (state.doc.sliceString(newFrom, newTo, LineBreakPlaceholder) != text2) {
12728
12728
  return Decoration.none;
12729
12729
  }
12730
- let topView = ContentView.get(node2);
12730
+ let topView = ContentView.get(node);
12731
12731
  if (topView instanceof CompositionView)
12732
12732
  topView = topView.widget.topView;
12733
12733
  else if (topView)
12734
12734
  topView.parent = null;
12735
- return Decoration.set(Decoration.replace({ widget: new CompositionWidget(node2, textNode, topView), inclusive: true }).range(newFrom, newTo));
12735
+ return Decoration.set(Decoration.replace({ widget: new CompositionWidget(node, textNode, topView), inclusive: true }).range(newFrom, newTo));
12736
12736
  }
12737
12737
  var CompositionWidget = class extends WidgetType {
12738
12738
  constructor(top3, text2, topView) {
@@ -12756,22 +12756,22 @@ var CompositionWidget = class extends WidgetType {
12756
12756
  };
12757
12757
  function nearbyTextNode(startNode, startOffset, side) {
12758
12758
  if (side <= 0)
12759
- for (let node2 = startNode, offset = startOffset; ; ) {
12760
- if (node2.nodeType == 3)
12761
- return node2;
12762
- if (node2.nodeType == 1 && offset > 0) {
12763
- node2 = node2.childNodes[offset - 1];
12764
- offset = maxOffset(node2);
12759
+ for (let node = startNode, offset = startOffset; ; ) {
12760
+ if (node.nodeType == 3)
12761
+ return node;
12762
+ if (node.nodeType == 1 && offset > 0) {
12763
+ node = node.childNodes[offset - 1];
12764
+ offset = maxOffset(node);
12765
12765
  } else {
12766
12766
  break;
12767
12767
  }
12768
12768
  }
12769
12769
  if (side >= 0)
12770
- for (let node2 = startNode, offset = startOffset; ; ) {
12771
- if (node2.nodeType == 3)
12772
- return node2;
12773
- if (node2.nodeType == 1 && offset < node2.childNodes.length && side >= 0) {
12774
- node2 = node2.childNodes[offset];
12770
+ for (let node = startNode, offset = startOffset; ; ) {
12771
+ if (node.nodeType == 3)
12772
+ return node;
12773
+ if (node.nodeType == 1 && offset < node.childNodes.length && side >= 0) {
12774
+ node = node.childNodes[offset];
12775
12775
  offset = 0;
12776
12776
  } else {
12777
12777
  break;
@@ -12779,10 +12779,10 @@ function nearbyTextNode(startNode, startOffset, side) {
12779
12779
  }
12780
12780
  return null;
12781
12781
  }
12782
- function nextToUneditable(node2, offset) {
12783
- if (node2.nodeType != 1)
12782
+ function nextToUneditable(node, offset) {
12783
+ if (node.nodeType != 1)
12784
12784
  return 0;
12785
- return (offset && node2.childNodes[offset - 1].contentEditable == "false" ? 1 : 0) | (offset < node2.childNodes.length && node2.childNodes[offset].contentEditable == "false" ? 2 : 0);
12785
+ return (offset && node.childNodes[offset - 1].contentEditable == "false" ? 1 : 0) | (offset < node.childNodes.length && node.childNodes[offset].contentEditable == "false" ? 2 : 0);
12786
12786
  }
12787
12787
  var DecorationComparator$1 = class {
12788
12788
  constructor() {
@@ -12800,8 +12800,8 @@ function findChangedDeco(a, b, diff) {
12800
12800
  RangeSet.compare(a, b, diff, comp);
12801
12801
  return comp.changes;
12802
12802
  }
12803
- function inUneditable(node2, inside2) {
12804
- for (let cur = node2; cur && cur != inside2; cur = cur.assignedSlot || cur.parentNode) {
12803
+ function inUneditable(node, inside2) {
12804
+ for (let cur = node; cur && cur != inside2; cur = cur.assignedSlot || cur.parentNode) {
12805
12805
  if (cur.nodeType == 1 && cur.contentEditable == "false") {
12806
12806
  return true;
12807
12807
  }
@@ -12904,11 +12904,11 @@ function domPosAtCoords(parent, x2, y2) {
12904
12904
  let offset = Array.prototype.indexOf.call(parent.childNodes, closest) + (x2 >= (closestRect.left + closestRect.right) / 2 ? 1 : 0);
12905
12905
  return { node: parent, offset };
12906
12906
  }
12907
- function domPosInText(node2, x2, y2) {
12908
- let len = node2.nodeValue.length;
12907
+ function domPosInText(node, x2, y2) {
12908
+ let len = node.nodeValue.length;
12909
12909
  let closestOffset = -1, closestDY = 1e9, generalSide = 0;
12910
12910
  for (let i = 0; i < len; i++) {
12911
- let rects = textRange(node2, i, i + 1).getClientRects();
12911
+ let rects = textRange(node, i, i + 1).getClientRects();
12912
12912
  for (let j = 0; j < rects.length; j++) {
12913
12913
  let rect = rects[j];
12914
12914
  if (rect.top == rect.bottom)
@@ -12919,18 +12919,18 @@ function domPosInText(node2, x2, y2) {
12919
12919
  if (rect.left - 1 <= x2 && rect.right + 1 >= x2 && dy < closestDY) {
12920
12920
  let right2 = x2 >= (rect.left + rect.right) / 2, after = right2;
12921
12921
  if (browser.chrome || browser.gecko) {
12922
- let rectBefore = textRange(node2, i).getBoundingClientRect();
12922
+ let rectBefore = textRange(node, i).getBoundingClientRect();
12923
12923
  if (rectBefore.left == rect.right)
12924
12924
  after = !right2;
12925
12925
  }
12926
12926
  if (dy <= 0)
12927
- return { node: node2, offset: i + (after ? 1 : 0) };
12927
+ return { node, offset: i + (after ? 1 : 0) };
12928
12928
  closestOffset = i + (after ? 1 : 0);
12929
12929
  closestDY = dy;
12930
12930
  }
12931
12931
  }
12932
12932
  }
12933
- return { node: node2, offset: closestOffset > -1 ? closestOffset : generalSide > 0 ? node2.nodeValue.length : 0 };
12933
+ return { node, offset: closestOffset > -1 ? closestOffset : generalSide > 0 ? node.nodeValue.length : 0 };
12934
12934
  }
12935
12935
  function posAtCoords(view2, coords, precise, bias = -1) {
12936
12936
  var _a2, _b;
@@ -12972,35 +12972,35 @@ function posAtCoords(view2, coords, precise, bias = -1) {
12972
12972
  if (element && !view2.contentDOM.contains(element))
12973
12973
  element = null;
12974
12974
  }
12975
- let node2, offset = -1;
12975
+ let node, offset = -1;
12976
12976
  if (element && ((_a2 = view2.docView.nearest(element)) === null || _a2 === void 0 ? void 0 : _a2.isEditable) != false) {
12977
12977
  if (doc2.caretPositionFromPoint) {
12978
12978
  let pos = doc2.caretPositionFromPoint(x2, y2);
12979
12979
  if (pos)
12980
- ({ offsetNode: node2, offset } = pos);
12980
+ ({ offsetNode: node, offset } = pos);
12981
12981
  } else if (doc2.caretRangeFromPoint) {
12982
12982
  let range5 = doc2.caretRangeFromPoint(x2, y2);
12983
12983
  if (range5) {
12984
- ({ startContainer: node2, startOffset: offset } = range5);
12985
- if (!view2.contentDOM.contains(node2) || browser.safari && isSuspiciousSafariCaretResult(node2, offset, x2) || browser.chrome && isSuspiciousChromeCaretResult(node2, offset, x2))
12986
- node2 = void 0;
12984
+ ({ startContainer: node, startOffset: offset } = range5);
12985
+ if (!view2.contentDOM.contains(node) || browser.safari && isSuspiciousSafariCaretResult(node, offset, x2) || browser.chrome && isSuspiciousChromeCaretResult(node, offset, x2))
12986
+ node = void 0;
12987
12987
  }
12988
12988
  }
12989
12989
  }
12990
- if (!node2 || !view2.docView.dom.contains(node2)) {
12990
+ if (!node || !view2.docView.dom.contains(node)) {
12991
12991
  let line2 = LineView.find(view2.docView, lineStart);
12992
12992
  if (!line2)
12993
12993
  return yOffset > block.top + block.height / 2 ? block.to : block.from;
12994
- ({ node: node2, offset } = domPosAtCoords(line2.dom, x2, y2));
12994
+ ({ node, offset } = domPosAtCoords(line2.dom, x2, y2));
12995
12995
  }
12996
- let nearest = view2.docView.nearest(node2);
12996
+ let nearest = view2.docView.nearest(node);
12997
12997
  if (!nearest)
12998
12998
  return null;
12999
12999
  if (nearest.isWidget && ((_b = nearest.dom) === null || _b === void 0 ? void 0 : _b.nodeType) == 1) {
13000
13000
  let rect = nearest.dom.getBoundingClientRect();
13001
13001
  return coords.y < rect.top || coords.y <= rect.bottom && coords.x <= (rect.left + rect.right) / 2 ? nearest.posAtStart : nearest.posAtEnd;
13002
13002
  } else {
13003
- return nearest.localPosFromDOM(node2, offset) + nearest.posAtStart;
13003
+ return nearest.localPosFromDOM(node, offset) + nearest.posAtStart;
13004
13004
  }
13005
13005
  }
13006
13006
  function posAtCoordsImprecise(view2, contentRect, block, x2, y2) {
@@ -13012,19 +13012,19 @@ function posAtCoordsImprecise(view2, contentRect, block, x2, y2) {
13012
13012
  let content2 = view2.state.sliceDoc(block.from, block.to);
13013
13013
  return block.from + findColumn(content2, into, view2.state.tabSize);
13014
13014
  }
13015
- function isSuspiciousSafariCaretResult(node2, offset, x2) {
13015
+ function isSuspiciousSafariCaretResult(node, offset, x2) {
13016
13016
  let len;
13017
- if (node2.nodeType != 3 || offset != (len = node2.nodeValue.length))
13017
+ if (node.nodeType != 3 || offset != (len = node.nodeValue.length))
13018
13018
  return false;
13019
- for (let next = node2.nextSibling; next; next = next.nextSibling)
13019
+ for (let next = node.nextSibling; next; next = next.nextSibling)
13020
13020
  if (next.nodeType != 1 || next.nodeName != "BR")
13021
13021
  return false;
13022
- return textRange(node2, len - 1, len).getBoundingClientRect().left > x2;
13022
+ return textRange(node, len - 1, len).getBoundingClientRect().left > x2;
13023
13023
  }
13024
- function isSuspiciousChromeCaretResult(node2, offset, x2) {
13024
+ function isSuspiciousChromeCaretResult(node, offset, x2) {
13025
13025
  if (offset != 0)
13026
13026
  return false;
13027
- for (let cur = node2; ; ) {
13027
+ for (let cur = node; ; ) {
13028
13028
  let parent = cur.parentNode;
13029
13029
  if (!parent || parent.nodeType != 1 || parent.firstChild != cur)
13030
13030
  return false;
@@ -13032,7 +13032,7 @@ function isSuspiciousChromeCaretResult(node2, offset, x2) {
13032
13032
  break;
13033
13033
  cur = parent;
13034
13034
  }
13035
- let rect = node2.nodeType == 1 ? node2.getBoundingClientRect() : textRange(node2, 0, Math.max(node2.nodeValue.length, 1)).getBoundingClientRect();
13035
+ let rect = node.nodeType == 1 ? node.getBoundingClientRect() : textRange(node, 0, Math.max(node.nodeValue.length, 1)).getBoundingClientRect();
13036
13036
  return x2 - rect.left > 5;
13037
13037
  }
13038
13038
  function moveToLineBoundary(view2, start2, forward, includeWrap) {
@@ -13429,8 +13429,8 @@ function eventBelongsToEditor(view2, event) {
13429
13429
  return true;
13430
13430
  if (event.defaultPrevented)
13431
13431
  return false;
13432
- for (let node2 = event.target, cView; node2 != view2.contentDOM; node2 = node2.parentNode)
13433
- if (!node2 || node2.nodeType == 11 || (cView = ContentView.get(node2)) && cView.ignoreEvent(event))
13432
+ for (let node = event.target, cView; node != view2.contentDOM; node = node.parentNode)
13433
+ if (!node || node.nodeType == 11 || (cView = ContentView.get(node)) && cView.ignoreEvent(event))
13434
13434
  return false;
13435
13435
  return true;
13436
13436
  }
@@ -14029,15 +14029,15 @@ var HeightMapText = class extends HeightMapBlock {
14029
14029
  this.widgetHeight = 0;
14030
14030
  }
14031
14031
  replace(_from, _to, nodes) {
14032
- let node2 = nodes[0];
14033
- if (nodes.length == 1 && (node2 instanceof HeightMapText || node2 instanceof HeightMapGap && node2.flags & 4) && Math.abs(this.length - node2.length) < 10) {
14034
- if (node2 instanceof HeightMapGap)
14035
- node2 = new HeightMapText(node2.length, this.height);
14032
+ let node = nodes[0];
14033
+ if (nodes.length == 1 && (node instanceof HeightMapText || node instanceof HeightMapGap && node.flags & 4) && Math.abs(this.length - node.length) < 10) {
14034
+ if (node instanceof HeightMapGap)
14035
+ node = new HeightMapText(node.length, this.height);
14036
14036
  else
14037
- node2.height = this.height;
14037
+ node.height = this.height;
14038
14038
  if (!this.outdated)
14039
- node2.outdated = false;
14040
- return node2;
14039
+ node.outdated = false;
14040
+ return node;
14041
14041
  } else {
14042
14042
  return HeightMap.of(nodes);
14043
14043
  }
@@ -14226,8 +14226,8 @@ var HeightMapBranch = class extends HeightMap {
14226
14226
  if (from > 0)
14227
14227
  this.decomposeLeft(from, result);
14228
14228
  let left2 = result.length;
14229
- for (let node2 of nodes)
14230
- result.push(node2);
14229
+ for (let node of nodes)
14230
+ result.push(node);
14231
14231
  if (from > 0)
14232
14232
  mergeGaps(result, left2 - 1);
14233
14233
  if (to < this.length) {
@@ -14396,10 +14396,10 @@ var NodeBuilder = class {
14396
14396
  else if (this.writtenTo < this.pos || last2 == null)
14397
14397
  this.nodes.push(this.blankContent(this.writtenTo, this.pos));
14398
14398
  let pos = from;
14399
- for (let node2 of this.nodes) {
14400
- if (node2 instanceof HeightMapText)
14401
- node2.updateHeight(this.oracle, pos);
14402
- pos += node2 ? node2.length : 1;
14399
+ for (let node of this.nodes) {
14400
+ if (node instanceof HeightMapText)
14401
+ node.updateHeight(this.oracle, pos);
14402
+ pos += node ? node.length : 1;
14403
14403
  }
14404
14404
  return this.nodes;
14405
14405
  }
@@ -16143,8 +16143,8 @@ var EditorView = class {
16143
16143
  domAtPos(pos) {
16144
16144
  return this.docView.domAtPos(pos);
16145
16145
  }
16146
- posAtDOM(node2, offset = 0) {
16147
- return this.docView.posFromDOM(node2, offset);
16146
+ posAtDOM(node, offset = 0) {
16147
+ return this.docView.posFromDOM(node, offset);
16148
16148
  }
16149
16149
  posAtCoords(coords, precise = true) {
16150
16150
  this.readMeasured();
@@ -16971,9 +16971,9 @@ var NodeType = class {
16971
16971
  for (let prop in map3)
16972
16972
  for (let name3 of prop.split(" "))
16973
16973
  direct[name3] = map3[prop];
16974
- return (node2) => {
16975
- for (let groups = node2.prop(NodeProp.group), i = -1; i < (groups ? groups.length : 0); i++) {
16976
- let found = direct[i < 0 ? node2.name : groups[i]];
16974
+ return (node) => {
16975
+ for (let groups = node.prop(NodeProp.group), i = -1; i < (groups ? groups.length : 0); i++) {
16976
+ let found = direct[i < 0 ? node.name : groups[i]];
16977
16977
  if (found)
16978
16978
  return found;
16979
16979
  }
@@ -17032,14 +17032,14 @@ var Tree = class {
17032
17032
  return new TreeNode(this, 0, 0, null);
17033
17033
  }
17034
17034
  resolve(pos, side = 0) {
17035
- let node2 = resolveNode(CachedNode.get(this) || this.topNode, pos, side, false);
17036
- CachedNode.set(this, node2);
17037
- return node2;
17035
+ let node = resolveNode(CachedNode.get(this) || this.topNode, pos, side, false);
17036
+ CachedNode.set(this, node);
17037
+ return node;
17038
17038
  }
17039
17039
  resolveInner(pos, side = 0) {
17040
- let node2 = resolveNode(CachedInnerNode.get(this) || this.topNode, pos, side, true);
17041
- CachedInnerNode.set(this, node2);
17042
- return node2;
17040
+ let node = resolveNode(CachedInnerNode.get(this) || this.topNode, pos, side, true);
17041
+ CachedInnerNode.set(this, node);
17042
+ return node;
17043
17043
  }
17044
17044
  iterate(spec) {
17045
17045
  let { enter, leave, from = 0, to = this.length } = spec;
@@ -17178,40 +17178,40 @@ function checkSide(side, pos, from, to) {
17178
17178
  return true;
17179
17179
  }
17180
17180
  }
17181
- function enterUnfinishedNodesBefore(node2, pos) {
17182
- let scan = node2.childBefore(pos);
17181
+ function enterUnfinishedNodesBefore(node, pos) {
17182
+ let scan = node.childBefore(pos);
17183
17183
  while (scan) {
17184
17184
  let last2 = scan.lastChild;
17185
17185
  if (!last2 || last2.to != scan.to)
17186
17186
  break;
17187
17187
  if (last2.type.isError && last2.from == last2.to) {
17188
- node2 = scan;
17188
+ node = scan;
17189
17189
  scan = last2.prevSibling;
17190
17190
  } else {
17191
17191
  scan = last2;
17192
17192
  }
17193
17193
  }
17194
- return node2;
17194
+ return node;
17195
17195
  }
17196
- function resolveNode(node2, pos, side, overlays) {
17196
+ function resolveNode(node, pos, side, overlays) {
17197
17197
  var _a2;
17198
- while (node2.from == node2.to || (side < 1 ? node2.from >= pos : node2.from > pos) || (side > -1 ? node2.to <= pos : node2.to < pos)) {
17199
- let parent = !overlays && node2 instanceof TreeNode && node2.index < 0 ? null : node2.parent;
17198
+ while (node.from == node.to || (side < 1 ? node.from >= pos : node.from > pos) || (side > -1 ? node.to <= pos : node.to < pos)) {
17199
+ let parent = !overlays && node instanceof TreeNode && node.index < 0 ? null : node.parent;
17200
17200
  if (!parent)
17201
- return node2;
17202
- node2 = parent;
17201
+ return node;
17202
+ node = parent;
17203
17203
  }
17204
17204
  let mode = overlays ? 0 : IterMode.IgnoreOverlays;
17205
17205
  if (overlays)
17206
- for (let scan = node2, parent = scan.parent; parent; scan = parent, parent = scan.parent) {
17206
+ for (let scan = node, parent = scan.parent; parent; scan = parent, parent = scan.parent) {
17207
17207
  if (scan instanceof TreeNode && scan.index < 0 && ((_a2 = parent.enter(pos, side, mode)) === null || _a2 === void 0 ? void 0 : _a2.from) != scan.from)
17208
- node2 = parent;
17208
+ node = parent;
17209
17209
  }
17210
17210
  for (; ; ) {
17211
- let inner = node2.enter(pos, side, mode);
17211
+ let inner = node.enter(pos, side, mode);
17212
17212
  if (!inner)
17213
- return node2;
17214
- node2 = inner;
17213
+ return node;
17214
+ node = inner;
17215
17215
  }
17216
17216
  }
17217
17217
  var TreeNode = class {
@@ -17334,8 +17334,8 @@ var TreeNode = class {
17334
17334
  return matchNodeContext(this, context);
17335
17335
  }
17336
17336
  };
17337
- function getChildren(node2, type2, before, after) {
17338
- let cur = node2.cursor(), result = [];
17337
+ function getChildren(node, type2, before, after) {
17338
+ let cur = node.cursor(), result = [];
17339
17339
  if (!cur.firstChild())
17340
17340
  return result;
17341
17341
  if (before != null) {
@@ -17352,8 +17352,8 @@ function getChildren(node2, type2, before, after) {
17352
17352
  return after == null ? result : [];
17353
17353
  }
17354
17354
  }
17355
- function matchNodeContext(node2, context, i = context.length - 1) {
17356
- for (let p = node2.parent; i >= 0; p = p.parent) {
17355
+ function matchNodeContext(node, context, i = context.length - 1) {
17356
+ for (let p = node.parent; i >= 0; p = p.parent) {
17357
17357
  if (!p)
17358
17358
  return false;
17359
17359
  if (!p.type.isAnonymous) {
@@ -17479,30 +17479,30 @@ var TreeCursor = class {
17479
17479
  get name() {
17480
17480
  return this.type.name;
17481
17481
  }
17482
- constructor(node2, mode = 0) {
17482
+ constructor(node, mode = 0) {
17483
17483
  this.mode = mode;
17484
17484
  this.buffer = null;
17485
17485
  this.stack = [];
17486
17486
  this.index = 0;
17487
17487
  this.bufferNode = null;
17488
- if (node2 instanceof TreeNode) {
17489
- this.yieldNode(node2);
17488
+ if (node instanceof TreeNode) {
17489
+ this.yieldNode(node);
17490
17490
  } else {
17491
- this._tree = node2.context.parent;
17492
- this.buffer = node2.context;
17493
- for (let n = node2._parent; n; n = n._parent)
17491
+ this._tree = node.context.parent;
17492
+ this.buffer = node.context;
17493
+ for (let n = node._parent; n; n = n._parent)
17494
17494
  this.stack.unshift(n.index);
17495
- this.bufferNode = node2;
17496
- this.yieldBuf(node2.index);
17495
+ this.bufferNode = node;
17496
+ this.yieldBuf(node.index);
17497
17497
  }
17498
17498
  }
17499
- yieldNode(node2) {
17500
- if (!node2)
17499
+ yieldNode(node) {
17500
+ if (!node)
17501
17501
  return false;
17502
- this._tree = node2;
17503
- this.type = node2.type;
17504
- this.from = node2.from;
17505
- this.to = node2.to;
17502
+ this._tree = node;
17503
+ this.type = node.type;
17504
+ this.from = node.from;
17505
+ this.to = node.to;
17506
17506
  return true;
17507
17507
  }
17508
17508
  yieldBuf(index3, type2) {
@@ -17513,15 +17513,15 @@ var TreeCursor = class {
17513
17513
  this.to = start2 + buffer.buffer[index3 + 2];
17514
17514
  return true;
17515
17515
  }
17516
- yield(node2) {
17517
- if (!node2)
17516
+ yield(node) {
17517
+ if (!node)
17518
17518
  return false;
17519
- if (node2 instanceof TreeNode) {
17519
+ if (node instanceof TreeNode) {
17520
17520
  this.buffer = null;
17521
- return this.yieldNode(node2);
17521
+ return this.yieldNode(node);
17522
17522
  }
17523
- this.buffer = node2.context;
17524
- return this.yieldBuf(node2.index, node2.type);
17523
+ this.buffer = node.context;
17524
+ return this.yieldBuf(node.index, node.type);
17525
17525
  }
17526
17526
  toString() {
17527
17527
  return this.buffer ? this.buffer.buffer.childString(this.index) : this._tree.toString();
@@ -17714,8 +17714,8 @@ function buildTree(data) {
17714
17714
  while (size4 < 0) {
17715
17715
  cursor.next();
17716
17716
  if (size4 == -1) {
17717
- let node3 = reused[id3];
17718
- children3.push(node3);
17717
+ let node2 = reused[id3];
17718
+ children3.push(node2);
17719
17719
  positions2.push(start2 - parentStart);
17720
17720
  return;
17721
17721
  } else if (size4 == -3) {
@@ -17728,14 +17728,14 @@ function buildTree(data) {
17728
17728
  throw new RangeError(`Unrecognized record size: ${size4}`);
17729
17729
  }
17730
17730
  }
17731
- let type2 = types2[id3], node2, buffer2;
17731
+ let type2 = types2[id3], node, buffer2;
17732
17732
  let startPos = start2 - parentStart;
17733
17733
  if (end - start2 <= maxBufferLength && (buffer2 = findBufferSize(cursor.pos - minPos, inRepeat))) {
17734
17734
  let data2 = new Uint16Array(buffer2.size - buffer2.skip);
17735
17735
  let endPos = cursor.pos - buffer2.size, index3 = data2.length;
17736
17736
  while (cursor.pos > endPos)
17737
17737
  index3 = copyToBuffer(buffer2.start, data2, index3);
17738
- node2 = new TreeBuffer(data2, end - buffer2.start, nodeSet);
17738
+ node = new TreeBuffer(data2, end - buffer2.start, nodeSet);
17739
17739
  startPos = buffer2.start - parentStart;
17740
17740
  } else {
17741
17741
  let endPos = cursor.pos - size4;
@@ -17761,12 +17761,12 @@ function buildTree(data) {
17761
17761
  localPositions.reverse();
17762
17762
  if (localInRepeat > -1 && lastGroup > 0) {
17763
17763
  let make = makeBalanced(type2);
17764
- node2 = balanceRange(type2, localChildren, localPositions, 0, localChildren.length, 0, end - start2, make, make);
17764
+ node = balanceRange(type2, localChildren, localPositions, 0, localChildren.length, 0, end - start2, make, make);
17765
17765
  } else {
17766
- node2 = makeTree(type2, localChildren, localPositions, end - start2, lookAheadAtStart - end);
17766
+ node = makeTree(type2, localChildren, localPositions, end - start2, lookAheadAtStart - end);
17767
17767
  }
17768
17768
  }
17769
- children3.push(node2);
17769
+ children3.push(node);
17770
17770
  positions2.push(startPos);
17771
17771
  }
17772
17772
  function makeBalanced(type2) {
@@ -17873,20 +17873,20 @@ function buildTree(data) {
17873
17873
  return new Tree(types2[data.topID], children2.reverse(), positions.reverse(), length6);
17874
17874
  }
17875
17875
  var nodeSizeCache = /* @__PURE__ */ new WeakMap();
17876
- function nodeSize(balanceType, node2) {
17877
- if (!balanceType.isAnonymous || node2 instanceof TreeBuffer || node2.type != balanceType)
17876
+ function nodeSize(balanceType, node) {
17877
+ if (!balanceType.isAnonymous || node instanceof TreeBuffer || node.type != balanceType)
17878
17878
  return 1;
17879
- let size4 = nodeSizeCache.get(node2);
17879
+ let size4 = nodeSizeCache.get(node);
17880
17880
  if (size4 == null) {
17881
17881
  size4 = 1;
17882
- for (let child of node2.children) {
17882
+ for (let child of node.children) {
17883
17883
  if (child.type != balanceType || !(child instanceof Tree)) {
17884
17884
  size4 = 1;
17885
17885
  break;
17886
17886
  }
17887
17887
  size4 += nodeSize(balanceType, child);
17888
17888
  }
17889
- nodeSizeCache.set(node2, size4);
17889
+ nodeSizeCache.set(node, size4);
17890
17890
  }
17891
17891
  return size4;
17892
17892
  }
@@ -18378,9 +18378,9 @@ Language.setState = /* @__PURE__ */ StateEffect.define();
18378
18378
  function topNodeAt(state, pos, side) {
18379
18379
  let topLang = state.facet(language), tree = syntaxTree(state).topNode;
18380
18380
  if (!topLang || topLang.allowsNesting) {
18381
- for (let node2 = tree; node2; node2 = node2.enter(pos, side, IterMode.ExcludeBuffers))
18382
- if (node2.type.isTop)
18383
- tree = node2;
18381
+ for (let node = tree; node; node = node.enter(pos, side, IterMode.ExcludeBuffers))
18382
+ if (node.type.isTop)
18383
+ tree = node;
18384
18384
  }
18385
18385
  return tree;
18386
18386
  }
@@ -18823,11 +18823,11 @@ function indentStrategy(tree) {
18823
18823
  }
18824
18824
  return tree.parent == null ? topIndent : null;
18825
18825
  }
18826
- function indentFrom(node2, pos, base2) {
18827
- for (; node2; node2 = node2.parent) {
18828
- let strategy = indentStrategy(node2);
18826
+ function indentFrom(node, pos, base2) {
18827
+ for (; node; node = node.parent) {
18828
+ let strategy = indentStrategy(node);
18829
18829
  if (strategy)
18830
- return strategy(TreeIndentContext.create(base2, pos, node2));
18830
+ return strategy(TreeIndentContext.create(base2, pos, node));
18831
18831
  }
18832
18832
  return null;
18833
18833
  }
@@ -18835,14 +18835,14 @@ function topIndent() {
18835
18835
  return 0;
18836
18836
  }
18837
18837
  var TreeIndentContext = class extends IndentContext {
18838
- constructor(base2, pos, node2) {
18838
+ constructor(base2, pos, node) {
18839
18839
  super(base2.state, base2.options);
18840
18840
  this.base = base2;
18841
18841
  this.pos = pos;
18842
- this.node = node2;
18842
+ this.node = node;
18843
18843
  }
18844
- static create(base2, pos, node2) {
18845
- return new TreeIndentContext(base2, pos, node2);
18844
+ static create(base2, pos, node) {
18845
+ return new TreeIndentContext(base2, pos, node);
18846
18846
  }
18847
18847
  get textAfter() {
18848
18848
  return this.textAfterPos(this.pos);
@@ -19002,25 +19002,25 @@ var defaultHighlightStyle = /* @__PURE__ */ HighlightStyle.define([
19002
19002
  var DefaultScanDist = 1e4;
19003
19003
  var DefaultBrackets = "()[]{}";
19004
19004
  var bracketMatchingHandle = /* @__PURE__ */ new NodeProp();
19005
- function matchingNodes(node2, dir, brackets2) {
19006
- let byProp = node2.prop(dir < 0 ? NodeProp.openedBy : NodeProp.closedBy);
19005
+ function matchingNodes(node, dir, brackets2) {
19006
+ let byProp = node.prop(dir < 0 ? NodeProp.openedBy : NodeProp.closedBy);
19007
19007
  if (byProp)
19008
19008
  return byProp;
19009
- if (node2.name.length == 1) {
19010
- let index3 = brackets2.indexOf(node2.name);
19009
+ if (node.name.length == 1) {
19010
+ let index3 = brackets2.indexOf(node.name);
19011
19011
  if (index3 > -1 && index3 % 2 == (dir < 0 ? 1 : 0))
19012
19012
  return [brackets2[index3 + dir]];
19013
19013
  }
19014
19014
  return null;
19015
19015
  }
19016
- function findHandle(node2) {
19017
- let hasHandle = node2.type.prop(bracketMatchingHandle);
19018
- return hasHandle ? hasHandle(node2.node) : node2;
19016
+ function findHandle(node) {
19017
+ let hasHandle = node.type.prop(bracketMatchingHandle);
19018
+ return hasHandle ? hasHandle(node.node) : node;
19019
19019
  }
19020
19020
  function matchBrackets(state, pos, dir, config = {}) {
19021
19021
  let maxScanDistance = config.maxScanDistance || DefaultScanDist, brackets2 = config.brackets || DefaultBrackets;
19022
- let tree = syntaxTree(state), node2 = tree.resolveInner(pos, dir);
19023
- for (let cur = node2; cur; cur = cur.parent) {
19022
+ let tree = syntaxTree(state), node = tree.resolveInner(pos, dir);
19023
+ for (let cur = node; cur; cur = cur.parent) {
19024
19024
  let matches = matchingNodes(cur.type, dir, brackets2);
19025
19025
  if (matches && cur.from < cur.to) {
19026
19026
  let handle = findHandle(cur);
@@ -19028,7 +19028,7 @@ function matchBrackets(state, pos, dir, config = {}) {
19028
19028
  return matchMarkedBrackets(state, pos, dir, cur, handle, matches, brackets2);
19029
19029
  }
19030
19030
  }
19031
- return matchPlainBrackets(state, pos, dir, tree, node2.type, maxScanDistance, brackets2);
19031
+ return matchPlainBrackets(state, pos, dir, tree, node.type, maxScanDistance, brackets2);
19032
19032
  }
19033
19033
  function matchMarkedBrackets(_state, _pos, dir, token2, handle, matching, brackets2) {
19034
19034
  let parent = token2.parent, firstToken = { from: handle.from, to: handle.to };
@@ -19480,11 +19480,11 @@ function cursorByGroup(view2, forward) {
19480
19480
  }
19481
19481
  var cursorGroupLeft = (view2) => cursorByGroup(view2, !ltrAtCursor(view2));
19482
19482
  var cursorGroupRight = (view2) => cursorByGroup(view2, ltrAtCursor(view2));
19483
- function interestingNode(state, node2, bracketProp) {
19484
- if (node2.type.prop(bracketProp))
19483
+ function interestingNode(state, node, bracketProp) {
19484
+ if (node.type.prop(bracketProp))
19485
19485
  return true;
19486
- let len = node2.to - node2.from;
19487
- return len && (len > 2 || /[^\s,.;:]/.test(state.sliceDoc(node2.from, node2.to))) || node2.firstChild;
19486
+ let len = node.to - node.from;
19487
+ return len && (len > 2 || /[^\s,.;:]/.test(state.sliceDoc(node.from, node.to))) || node.firstChild;
19488
19488
  }
19489
19489
  function moveBySyntax(state, start2, forward) {
19490
19490
  let pos = syntaxTree(state).resolveInner(start2.head);
@@ -20057,6 +20057,18 @@ var startState = EditorState.create({
20057
20057
  lineNumbers()
20058
20058
  ]
20059
20059
  });
20060
+ function getContentsLength_(ed) {
20061
+ return ed.state.doc.length;
20062
+ }
20063
+ function addEditorView_(id3) {
20064
+ return () => {
20065
+ const div = select_default2("#" + id3).node();
20066
+ return new EditorView({
20067
+ state: startState,
20068
+ parent: div
20069
+ });
20070
+ };
20071
+ }
20060
20072
  function replaceSelection_(editorState, str) {
20061
20073
  return editorState.replaceSelection(str);
20062
20074
  }
@@ -20070,7 +20082,9 @@ function update_(editorState, specs) {
20070
20082
  return editorState.update(...specs);
20071
20083
  };
20072
20084
  }
20085
+ var addEditorView = addEditorView_;
20073
20086
  var dispatch2 = curry2(dispatch_);
20087
+ var getContentsLength = getContentsLength_;
20074
20088
  var replaceSelection = curry2(replaceSelection_);
20075
20089
  var update = curry2(update_);
20076
20090
 
@@ -35762,7 +35776,7 @@ function dimensions(sel) {
35762
35776
  if (sel.nodes().length != 1) {
35763
35777
  throw "Expected singleton selection";
35764
35778
  }
35765
- [node] = sel.nodes();
35779
+ const [node] = sel.nodes();
35766
35780
  let { width, height } = node.getBBox();
35767
35781
  return { width: Math.ceil(width), height: Math.ceil(height) };
35768
35782
  };
@@ -36346,9 +36360,9 @@ selection_default.prototype.attrs = function(m) {
36346
36360
  return this;
36347
36361
  };
36348
36362
  function addHatchPattern(rootElement, j, col_j) {
36349
- pattern = rootElement.append("pattern").attr("id", "diagonalHatch-" + j).attr("patternUnits", "userSpaceOnUse").attr("width", 2).attr("height", 2).attr("patternTransform", "rotate(45)");
36350
- pattern.append("rect").attr("width", 3.5).attr("height", 3.5).attr("fill", col_j);
36351
- pattern.append("line").attr("x1", 0).attr("y", 0).attr("x2", 0).attr("y2", 3.5).attr("stroke", "rgba(255, 255, 255, 1)").attr("stroke-width", "1");
36363
+ let pattern2 = rootElement.append("pattern").attr("id", "diagonalHatch-" + j).attr("patternUnits", "userSpaceOnUse").attr("width", 2).attr("height", 2).attr("patternTransform", "rotate(45)");
36364
+ pattern2.append("rect").attr("width", 3.5).attr("height", 3.5).attr("fill", col_j);
36365
+ pattern2.append("line").attr("x1", 0).attr("y", 0).attr("x2", 0).attr("y2", 3.5).attr("stroke", "rgba(255, 255, 255, 1)").attr("stroke-width", "1");
36352
36366
  }
36353
36367
  function setSelState({ bar_attrs }, indexCol, rootElement, chart, listener) {
36354
36368
  rootElement.selectAll(".bar").each(function(bar2) {
@@ -36414,7 +36428,7 @@ function drawBarChart_(barChartHelpers2, uiHelpers2, {
36414
36428
  return height - y2(bar2.height) - strokeWidth;
36415
36429
  }).attr("stroke-width", (_) => strokeWidth);
36416
36430
  const legendLineHeight = 15, legendStart = width + margin.left / 2;
36417
- names = stackedBars[0].bars.map((bar2) => val(bar2.y));
36431
+ let names = stackedBars[0].bars.map((bar2) => val(bar2.y));
36418
36432
  rootElement.append("rect").attr("class", "legend-box").attr("transform", `translate(${legendStart}, ${height / 2 - margin.top - 2})`).attr("x", 0).attr("y", 0).attr("height", legendLineHeight * names.length).attr("width", margin.right - 22);
36419
36433
  const legend = rootElement.selectAll("legend").data(names).enter().append("g").attr(
36420
36434
  "transform",
@@ -38598,8 +38612,8 @@ var oneLineComment = (v) => {
38598
38612
  var isReserved = (isReserved$a0$copy) => (isReserved$a1$copy) => {
38599
38613
  let isReserved$a0 = isReserved$a0$copy, isReserved$a1 = isReserved$a1$copy, isReserved$c = true, isReserved$r;
38600
38614
  while (isReserved$c) {
38601
- const names2 = isReserved$a0, name3 = isReserved$a1;
38602
- const v = uncons(names2);
38615
+ const names = isReserved$a0, name3 = isReserved$a1;
38616
+ const v = uncons(names);
38603
38617
  if (v.tag === "Nothing") {
38604
38618
  isReserved$c = false;
38605
38619
  isReserved$r = false;
@@ -40480,7 +40494,7 @@ var simplePattern = (pattern$p) => {
40480
40494
  ));
40481
40495
  };
40482
40496
  };
40483
- var pattern2 = /* @__PURE__ */ (() => {
40497
+ var pattern = /* @__PURE__ */ (() => {
40484
40498
  const $0 = buildExprParser(operators((op) => (state1, more, lift12, $$throw2, done) => more((v1) => token.operator(
40485
40499
  state1,
40486
40500
  more,
@@ -40535,7 +40549,7 @@ var pattern2 = /* @__PURE__ */ (() => {
40535
40549
  })();
40536
40550
  var varDefs = (expr$p) => {
40537
40551
  const $0 = keyword2("let");
40538
- const $1 = sepBy1_try((state1, more, lift12, $$throw2, done) => more((v2) => more((v1) => more((v2$1) => more((v1$1) => pattern2(
40552
+ const $1 = sepBy1_try((state1, more, lift12, $$throw2, done) => more((v2) => more((v1) => more((v2$1) => more((v1$1) => pattern(
40539
40553
  state1,
40540
40554
  more,
40541
40555
  lift12,
@@ -40559,7 +40573,7 @@ var varDefs = (expr$p) => {
40559
40573
  (state2, a) => more((v2$1) => more((v3) => $1(state2, more, lift12, $$throw2, (state3, a$1) => more((v4) => done(state3, a$1)))))
40560
40574
  )));
40561
40575
  };
40562
- var clause_uncurried = (expr$p) => (delim) => (state1, more, lift12, $$throw2, done) => more((v2) => more((v1) => pattern2(
40576
+ var clause_uncurried = (expr$p) => (delim) => (state1, more, lift12, $$throw2, done) => more((v2) => more((v1) => pattern(
40563
40577
  state1,
40564
40578
  more,
40565
40579
  lift12,
@@ -40576,7 +40590,7 @@ var clause_uncurried = (expr$p) => (delim) => (state1, more, lift12, $$throw2, d
40576
40590
  })
40577
40591
  )));
40578
40592
  var clause_curried = (expr$p) => (delim) => {
40579
- const $0 = some3(simplePattern(pattern2));
40593
+ const $0 = some3(simplePattern(pattern));
40580
40594
  return (state1, more, lift12, $$throw2, done) => more((v1) => more((v2) => more((v1$1) => $0(
40581
40595
  state1,
40582
40596
  more,
@@ -40849,7 +40863,7 @@ var expr_$lazy = /* @__PURE__ */ binding(() => {
40849
40863
  $152,
40850
40864
  $16,
40851
40865
  $25,
40852
- (state2, a) => $152((v2$4) => $152((v3$2) => pattern2(
40866
+ (state2, a) => $152((v2$4) => $152((v3$2) => pattern(
40853
40867
  state2,
40854
40868
  $152,
40855
40869
  $16,
@@ -40878,7 +40892,7 @@ var expr_$lazy = /* @__PURE__ */ binding(() => {
40878
40892
  }));
40879
40893
  });
40880
40894
  };
40881
- return $152((v2$1) => $152((v2$2) => $152((v1) => $152((v1$1) => pattern2(
40895
+ return $152((v2$1) => $152((v2$2) => $152((v1) => $152((v1$1) => pattern(
40882
40896
  $ParseState($19, $20, false),
40883
40897
  $152,
40884
40898
  $16,
@@ -43772,6 +43786,7 @@ var loadFile = (v) => (v1) => (dictMonadAff) => {
43772
43786
  fail();
43773
43787
  });
43774
43788
  };
43789
+ var loadFile$p = (folder) => (file) => (dictMonadAff) => (dictMonadError) => dictMonadAff.MonadEffect0().Monad0().Bind1().Apply0().Functor0().map((v) => $Tuple(file, v))(loadFile(folder)(file)(dictMonadAff)(dictMonadError));
43775
43790
 
43776
43791
  // output-es/App.Fig/index.js
43777
43792
  var highlightableSelState2 = /* @__PURE__ */ highlightableSelState(highlightableBoolean)(joinSemilatticeBoolean);
@@ -44045,6 +44060,21 @@ var drawFig = (divId) => (fig) => {
44045
44060
  ))();
44046
44061
  };
44047
44062
  };
44063
+ var drawCode = (s) => (ed) => {
44064
+ const $0 = dispatch2(ed);
44065
+ const $1 = update(ed.state)([{ changes: { from: 0, to: getContentsLength(ed), insert: s } }]);
44066
+ return () => {
44067
+ const $2 = $1();
44068
+ return $0($2)();
44069
+ };
44070
+ };
44071
+ var drawFile = (v) => {
44072
+ const $0 = addEditorView("codemirror-" + v._1);
44073
+ return () => {
44074
+ const $1 = $0();
44075
+ return drawCode(v._2)($1)();
44076
+ };
44077
+ };
44048
44078
 
44049
44079
  // output-es/Data.Argonaut.Decode.Error/index.js
44050
44080
  var $JsonDecodeError = (tag, _1, _2) => ({ tag, _1, _2 });
@@ -44286,7 +44316,9 @@ var loadFigure = (fileName) => runAffs_((v) => drawFig(v._1)(v._2))([
44286
44316
  fail();
44287
44317
  })
44288
44318
  ]);
44319
+ var drawCode2 = (folder) => (file) => runAffs_(drawFile)([loadFile$p(folder)(file)(monadAffAff)(monadErrorAff)]);
44289
44320
  export {
44321
+ drawCode2 as drawCode,
44290
44322
  gDecodeJsonCons2 as gDecodeJsonCons,
44291
44323
  jsonToSpec,
44292
44324
  loadFigure,