@thatopen/services 0.28.1 → 0.28.2

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.es.js CHANGED
@@ -219,13 +219,13 @@ C.prototype.listeners = function(n) {
219
219
  C.prototype.hasListeners = function(n) {
220
220
  return !!this.listeners(n).length;
221
221
  };
222
- const vt = typeof Promise == "function" && typeof Promise.resolve == "function" ? (e) => Promise.resolve().then(e) : (e, t) => t(e, 0), V = typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")(), _n = "arraybuffer";
222
+ const vt = typeof Promise == "function" && typeof Promise.resolve == "function" ? (e) => Promise.resolve().then(e) : (e, t) => t(e, 0), H = typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")(), _n = "arraybuffer";
223
223
  function Fs(n, ...e) {
224
224
  return e.reduce((t, s) => (n.hasOwnProperty(s) && (t[s] = n[s]), t), {});
225
225
  }
226
- const In = V.setTimeout, Sn = V.clearTimeout;
226
+ const In = H.setTimeout, Sn = H.clearTimeout;
227
227
  function Et(n, e) {
228
- e.useNativeTimers ? (n.setTimeoutFn = In.bind(V), n.clearTimeoutFn = Sn.bind(V)) : (n.setTimeoutFn = V.setTimeout.bind(V), n.clearTimeoutFn = V.clearTimeout.bind(V));
228
+ e.useNativeTimers ? (n.setTimeoutFn = In.bind(H), n.clearTimeoutFn = Sn.bind(H)) : (n.setTimeoutFn = H.setTimeout.bind(H), n.clearTimeoutFn = H.clearTimeout.bind(H));
229
229
  }
230
230
  const kn = 1.33;
231
231
  function On(n) {
@@ -602,7 +602,7 @@ if (typeof document < "u") {
602
602
  if (typeof attachEvent == "function")
603
603
  attachEvent("onunload", ds);
604
604
  else if (typeof addEventListener == "function") {
605
- const n = "onpagehide" in V ? "pagehide" : "unload";
605
+ const n = "onpagehide" in H ? "pagehide" : "unload";
606
606
  addEventListener(n, ds, !1);
607
607
  }
608
608
  }
@@ -635,7 +635,7 @@ function qs(n) {
635
635
  }
636
636
  if (!e)
637
637
  try {
638
- return new V[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP");
638
+ return new H[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP");
639
639
  } catch {
640
640
  }
641
641
  }
@@ -696,7 +696,7 @@ class Dn extends ts {
696
696
  return this.opts.timestampRequests && (t[this.opts.timestampParam] = Ls()), this.supportsBinary || (t.b64 = 1), this.createUri(e, t);
697
697
  }
698
698
  }
699
- const St = V.WebSocket || V.MozWebSocket;
699
+ const St = H.WebSocket || H.MozWebSocket;
700
700
  class qn extends Dn {
701
701
  createSocket(e, t, s) {
702
702
  return js ? new St(e, t, s) : t ? new St(e, t) : new St(e);
@@ -795,7 +795,7 @@ const xt = typeof addEventListener == "function" && typeof removeEventListener =
795
795
  xt && addEventListener("offline", () => {
796
796
  dt.forEach((n) => n());
797
797
  }, !1);
798
- class ge extends C {
798
+ class we extends C {
799
799
  /**
800
800
  * Socket constructor.
801
801
  *
@@ -863,7 +863,7 @@ class ge extends C {
863
863
  }, 0);
864
864
  return;
865
865
  }
866
- const e = this.opts.rememberUpgrade && ge.priorWebsocketSuccess && this.transports.indexOf("websocket") !== -1 ? "websocket" : this.transports[0];
866
+ const e = this.opts.rememberUpgrade && we.priorWebsocketSuccess && this.transports.indexOf("websocket") !== -1 ? "websocket" : this.transports[0];
867
867
  this.readyState = "opening";
868
868
  const t = this.createTransport(e);
869
869
  t.open(), this.setTransport(t);
@@ -882,7 +882,7 @@ class ge extends C {
882
882
  * @private
883
883
  */
884
884
  onOpen() {
885
- this.readyState = "open", ge.priorWebsocketSuccess = this.transport.name === "websocket", this.emitReserved("open"), this.flush();
885
+ this.readyState = "open", we.priorWebsocketSuccess = this.transport.name === "websocket", this.emitReserved("open"), this.flush();
886
886
  }
887
887
  /**
888
888
  * Handles a packet.
@@ -1046,7 +1046,7 @@ class ge extends C {
1046
1046
  * @private
1047
1047
  */
1048
1048
  _onError(e) {
1049
- if (ge.priorWebsocketSuccess = !1, this.opts.tryAllTransports && this.transports.length > 1 && this.readyState === "opening")
1049
+ if (we.priorWebsocketSuccess = !1, this.opts.tryAllTransports && this.transports.length > 1 && this.readyState === "opening")
1050
1050
  return this.transports.shift(), this._open();
1051
1051
  this.emitReserved("error", e), this._onClose("transport error", e);
1052
1052
  }
@@ -1065,8 +1065,8 @@ class ge extends C {
1065
1065
  }
1066
1066
  }
1067
1067
  }
1068
- ge.protocol = Bs;
1069
- class Jn extends ge {
1068
+ we.protocol = Bs;
1069
+ class Jn extends we {
1070
1070
  constructor() {
1071
1071
  super(...arguments), this._upgrades = [];
1072
1072
  }
@@ -1083,14 +1083,14 @@ class Jn extends ge {
1083
1083
  */
1084
1084
  _probe(e) {
1085
1085
  let t = this.createTransport(e), s = !1;
1086
- ge.priorWebsocketSuccess = !1;
1086
+ we.priorWebsocketSuccess = !1;
1087
1087
  const r = () => {
1088
1088
  s || (t.send([{ type: "ping", data: "probe" }]), t.once("packet", (m) => {
1089
1089
  if (!s)
1090
1090
  if (m.type === "pong" && m.data === "probe") {
1091
1091
  if (this.upgrading = !0, this.emitReserved("upgrading", t), !t)
1092
1092
  return;
1093
- ge.priorWebsocketSuccess = t.name === "websocket", this.transport.pause(() => {
1093
+ we.priorWebsocketSuccess = t.name === "websocket", this.transport.pause(() => {
1094
1094
  s || this.readyState !== "closed" && (c(), this.setTransport(t), t.send([{ type: "upgrade" }]), this.emitReserved("upgrade", t), t = null, this.upgrading = !1, this.flush());
1095
1095
  });
1096
1096
  } else {
@@ -1227,10 +1227,10 @@ const tr = [
1227
1227
  "removeListener"
1228
1228
  // used by the Node.js EventEmitter
1229
1229
  ];
1230
- var v;
1230
+ var E;
1231
1231
  (function(n) {
1232
1232
  n[n.CONNECT = 0] = "CONNECT", n[n.DISCONNECT = 1] = "DISCONNECT", n[n.EVENT = 2] = "EVENT", n[n.ACK = 3] = "ACK", n[n.CONNECT_ERROR = 4] = "CONNECT_ERROR", n[n.BINARY_EVENT = 5] = "BINARY_EVENT", n[n.BINARY_ACK = 6] = "BINARY_ACK";
1233
- })(v || (v = {}));
1233
+ })(E || (E = {}));
1234
1234
  class sr {
1235
1235
  /**
1236
1236
  * Encoder constructor
@@ -1247,8 +1247,8 @@ class sr {
1247
1247
  * @param {Object} obj - packet object
1248
1248
  */
1249
1249
  encode(e) {
1250
- return (e.type === v.EVENT || e.type === v.ACK) && ut(e) ? this.encodeAsBinary({
1251
- type: e.type === v.EVENT ? v.BINARY_EVENT : v.BINARY_ACK,
1250
+ return (e.type === E.EVENT || e.type === E.ACK) && ut(e) ? this.encodeAsBinary({
1251
+ type: e.type === E.EVENT ? E.BINARY_EVENT : E.BINARY_ACK,
1252
1252
  nsp: e.nsp,
1253
1253
  data: e.data,
1254
1254
  id: e.id
@@ -1259,7 +1259,7 @@ class sr {
1259
1259
  */
1260
1260
  encodeAsString(e) {
1261
1261
  let t = "" + e.type;
1262
- return (e.type === v.BINARY_EVENT || e.type === v.BINARY_ACK) && (t += e.attachments + "-"), e.nsp && e.nsp !== "/" && (t += e.nsp + ","), e.id != null && (t += e.id), e.data != null && (t += JSON.stringify(e.data, this.replacer)), t;
1262
+ return (e.type === E.BINARY_EVENT || e.type === E.BINARY_ACK) && (t += e.attachments + "-"), e.nsp && e.nsp !== "/" && (t += e.nsp + ","), e.id != null && (t += e.id), e.data != null && (t += JSON.stringify(e.data, this.replacer)), t;
1263
1263
  }
1264
1264
  /**
1265
1265
  * Encode packet as 'buffer sequence' by removing blobs, and
@@ -1292,8 +1292,8 @@ class ns extends C {
1292
1292
  if (this.reconstructor)
1293
1293
  throw new Error("got plaintext data when reconstructing a packet");
1294
1294
  t = this.decodeString(e);
1295
- const s = t.type === v.BINARY_EVENT;
1296
- s || t.type === v.BINARY_ACK ? (t.type = s ? v.EVENT : v.ACK, this.reconstructor = new nr(t), t.attachments === 0 && super.emitReserved("decoded", t)) : super.emitReserved("decoded", t);
1295
+ const s = t.type === E.BINARY_EVENT;
1296
+ s || t.type === E.BINARY_ACK ? (t.type = s ? E.EVENT : E.ACK, this.reconstructor = new nr(t), t.attachments === 0 && super.emitReserved("decoded", t)) : super.emitReserved("decoded", t);
1297
1297
  } else if (ss(e) || e.base64)
1298
1298
  if (this.reconstructor)
1299
1299
  t = this.reconstructor.takeBinaryData(e), t && (this.reconstructor = null, super.emitReserved("decoded", t));
@@ -1313,9 +1313,9 @@ class ns extends C {
1313
1313
  const s = {
1314
1314
  type: Number(e.charAt(0))
1315
1315
  };
1316
- if (v[s.type] === void 0)
1316
+ if (E[s.type] === void 0)
1317
1317
  throw new Error("unknown packet type " + s.type);
1318
- if (s.type === v.BINARY_EVENT || s.type === v.BINARY_ACK) {
1318
+ if (s.type === E.BINARY_EVENT || s.type === E.BINARY_ACK) {
1319
1319
  const i = t + 1;
1320
1320
  for (; e.charAt(++t) !== "-" && t != e.length; )
1321
1321
  ;
@@ -1368,17 +1368,17 @@ class ns extends C {
1368
1368
  }
1369
1369
  static isPayloadValid(e, t) {
1370
1370
  switch (e) {
1371
- case v.CONNECT:
1371
+ case E.CONNECT:
1372
1372
  return us(t);
1373
- case v.DISCONNECT:
1373
+ case E.DISCONNECT:
1374
1374
  return t === void 0;
1375
- case v.CONNECT_ERROR:
1375
+ case E.CONNECT_ERROR:
1376
1376
  return typeof t == "string" || us(t);
1377
- case v.EVENT:
1378
- case v.BINARY_EVENT:
1377
+ case E.EVENT:
1378
+ case E.BINARY_EVENT:
1379
1379
  return Array.isArray(t) && (typeof t[0] == "number" || typeof t[0] == "string" && tr.indexOf(t[0]) === -1);
1380
- case v.ACK:
1381
- case v.BINARY_ACK:
1380
+ case E.ACK:
1381
+ case E.BINARY_ACK:
1382
1382
  return Array.isArray(t);
1383
1383
  }
1384
1384
  }
@@ -1426,7 +1426,7 @@ const ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1426
1426
  Decoder: ns,
1427
1427
  Encoder: sr,
1428
1428
  get PacketType() {
1429
- return v;
1429
+ return E;
1430
1430
  }
1431
1431
  }, Symbol.toStringTag, { value: "Module" }));
1432
1432
  function Y(n, e, t) {
@@ -1564,7 +1564,7 @@ class Ms extends C {
1564
1564
  if (t.unshift(e), this._opts.retries && !this.flags.fromQueue && !this.flags.volatile)
1565
1565
  return this._addToQueue(t), this;
1566
1566
  const o = {
1567
- type: v.EVENT,
1567
+ type: E.EVENT,
1568
1568
  data: t
1569
1569
  };
1570
1570
  if (o.options = {}, o.options.compress = this.flags.compress !== !1, typeof t[t.length - 1] == "function") {
@@ -1672,7 +1672,7 @@ class Ms extends C {
1672
1672
  */
1673
1673
  _sendConnectPacket(e) {
1674
1674
  this.packet({
1675
- type: v.CONNECT,
1675
+ type: E.CONNECT,
1676
1676
  data: this._pid ? Object.assign({ pid: this._pid, offset: this._lastOffset }, e) : e
1677
1677
  });
1678
1678
  }
@@ -1718,21 +1718,21 @@ class Ms extends C {
1718
1718
  onpacket(e) {
1719
1719
  if (e.nsp === this.nsp)
1720
1720
  switch (e.type) {
1721
- case v.CONNECT:
1721
+ case E.CONNECT:
1722
1722
  e.data && e.data.sid ? this.onconnect(e.data.sid, e.data.pid) : this.emitReserved("connect_error", new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));
1723
1723
  break;
1724
- case v.EVENT:
1725
- case v.BINARY_EVENT:
1724
+ case E.EVENT:
1725
+ case E.BINARY_EVENT:
1726
1726
  this.onevent(e);
1727
1727
  break;
1728
- case v.ACK:
1729
- case v.BINARY_ACK:
1728
+ case E.ACK:
1729
+ case E.BINARY_ACK:
1730
1730
  this.onack(e);
1731
1731
  break;
1732
- case v.DISCONNECT:
1732
+ case E.DISCONNECT:
1733
1733
  this.ondisconnect();
1734
1734
  break;
1735
- case v.CONNECT_ERROR:
1735
+ case E.CONNECT_ERROR:
1736
1736
  this.destroy();
1737
1737
  const s = new Error(e.data.message);
1738
1738
  s.data = e.data.data, this.emitReserved("connect_error", s);
@@ -1767,7 +1767,7 @@ class Ms extends C {
1767
1767
  let s = !1;
1768
1768
  return function(...r) {
1769
1769
  s || (s = !0, t.packet({
1770
- type: v.ACK,
1770
+ type: E.ACK,
1771
1771
  id: e,
1772
1772
  data: r
1773
1773
  }));
@@ -1836,7 +1836,7 @@ class Ms extends C {
1836
1836
  * @return self
1837
1837
  */
1838
1838
  disconnect() {
1839
- return this.connected && this.packet({ type: v.DISCONNECT }), this.destroy(), this.connected && this.onclose("io client disconnect"), this;
1839
+ return this.connected && this.packet({ type: E.DISCONNECT }), this.destroy(), this.connected && this.onclose("io client disconnect"), this;
1840
1840
  }
1841
1841
  /**
1842
1842
  * Alias for {@link disconnect()}.
@@ -2577,11 +2577,11 @@ W = new WeakMap(), Xe = new WeakSet(), Dt = async function() {
2577
2577
  );
2578
2578
  return t && R(this, W, te(t)), u(this, W);
2579
2579
  };
2580
- var oe, p, ie, Ce, ee, qt, We, de, jt, ft, Ye, pt, Ut, Ys;
2580
+ var ae, p, oe, Ce, ee, qt, We, ue, jt, ft, Ye, pt, Ut, Ys;
2581
2581
  class dr {
2582
2582
  constructor(e, t, s, r) {
2583
2583
  S(this, p);
2584
- S(this, oe);
2584
+ S(this, ae);
2585
2585
  this.client = e, this.project = t, this.source = s, this.docId = r;
2586
2586
  }
2587
2587
  // ─── Reading ───────────────────────────────────────────────────────────────
@@ -2618,7 +2618,7 @@ class dr {
2618
2618
  * {@link modelParts} and compose.
2619
2619
  */
2620
2620
  async model() {
2621
- const e = await h(this, p, de).call(this);
2621
+ const e = await h(this, p, ue).call(this);
2622
2622
  if (!e)
2623
2623
  throw new Error(
2624
2624
  `Document ${this.source}-${this.docId} has no model file yet.`
@@ -2660,7 +2660,7 @@ class dr {
2660
2660
  i = c;
2661
2661
  break;
2662
2662
  }
2663
- const o = await h(this, p, de).call(this);
2663
+ const o = await h(this, p, ue).call(this);
2664
2664
  if (!o)
2665
2665
  throw new Error(
2666
2666
  `Document ${this.source}-${this.docId} has no model file yet.`
@@ -2691,7 +2691,7 @@ class dr {
2691
2691
  * not carry one yet — an old folder from before descriptors existed.
2692
2692
  */
2693
2693
  async descriptor() {
2694
- return await u(this, p, ie).descriptor(await h(this, p, ee).call(this, !1));
2694
+ return await u(this, p, oe).descriptor(await h(this, p, ee).call(this, !1));
2695
2695
  }
2696
2696
  /**
2697
2697
  * The first view whose format appears in `formats`, searched in the order
@@ -2699,7 +2699,7 @@ class dr {
2699
2699
  * model .frag on a descriptor-less folder, so old documents keep viewing.
2700
2700
  */
2701
2701
  async view(e) {
2702
- const t = await h(this, p, ee).call(this, !1), s = await u(this, p, ie).descriptor(t);
2702
+ const t = await h(this, p, ee).call(this, !1), s = await u(this, p, oe).descriptor(t);
2703
2703
  if (s) {
2704
2704
  for (const i of e) {
2705
2705
  const o = s.views.find((a) => a.format === i);
@@ -2708,7 +2708,7 @@ class dr {
2708
2708
  return null;
2709
2709
  }
2710
2710
  if (!e.includes("frag")) return null;
2711
- const r = await h(this, p, de).call(this);
2711
+ const r = await h(this, p, ue).call(this);
2712
2712
  return r ? { fileId: r.id, format: "frag" } : null;
2713
2713
  }
2714
2714
  /**
@@ -2718,12 +2718,12 @@ class dr {
2718
2718
  */
2719
2719
  async addView(e) {
2720
2720
  const t = await h(this, p, ee).call(this, !0);
2721
- if (await u(this, p, ie).descriptor(t)) {
2722
- await u(this, p, ie).addView(t, e);
2721
+ if (await u(this, p, oe).descriptor(t)) {
2722
+ await u(this, p, oe).addView(t, e);
2723
2723
  return;
2724
2724
  }
2725
- const r = await h(this, p, de).call(this);
2726
- await u(this, p, ie).setDescriptor(t, {
2725
+ const r = await h(this, p, ue).call(this);
2726
+ await u(this, p, oe).setDescriptor(t, {
2727
2727
  name: (r == null ? void 0 : r.name.replace(/\.frag$/, "")) ?? u(this, p, Ce),
2728
2728
  views: [e]
2729
2729
  });
@@ -2737,15 +2737,15 @@ class dr {
2737
2737
  * model file).
2738
2738
  */
2739
2739
  async ensureDescriptor() {
2740
- const e = await h(this, p, ee).call(this, !1), t = await u(this, p, ie).descriptor(e);
2740
+ const e = await h(this, p, ee).call(this, !1), t = await u(this, p, oe).descriptor(e);
2741
2741
  if (t) return t;
2742
- const s = await h(this, p, de).call(this);
2742
+ const s = await h(this, p, ue).call(this);
2743
2743
  if (!s) return null;
2744
2744
  const r = {
2745
2745
  name: s.name.replace(/\.frag$/, ""),
2746
2746
  views: [{ fileId: s.id, format: "frag" }]
2747
2747
  };
2748
- return await u(this, p, ie).setDescriptor(e, r), await u(this, p, ie).descriptor(e);
2748
+ return await u(this, p, oe).setDescriptor(e, r), await u(this, p, oe).descriptor(e);
2749
2749
  }
2750
2750
  // ─── Ownership (element locks) ─────────────────────────────────────────────
2751
2751
  /**
@@ -2814,7 +2814,7 @@ class dr {
2814
2814
  counts: ur(e.changes)
2815
2815
  };
2816
2816
  if (e.model && (await h(this, p, Ys).call(this, t, e.model), i.full = !0), e.delta) {
2817
- const l = await h(this, p, de).call(this);
2817
+ const l = await h(this, p, ue).call(this);
2818
2818
  if (!l)
2819
2819
  throw new Error(
2820
2820
  "A delta needs the model file to hang from: sync a full model first."
@@ -2893,12 +2893,12 @@ class dr {
2893
2893
  return Object.assign(i, t), await h(this, p, pt).call(this, s, Re, r), i;
2894
2894
  }
2895
2895
  }
2896
- oe = new WeakMap(), p = new WeakSet(), ie = function() {
2896
+ ae = new WeakMap(), p = new WeakSet(), oe = function() {
2897
2897
  return new Vs(this.client, this.project.projectId);
2898
2898
  }, Ce = function() {
2899
2899
  return `${this.source}-${this.docId}`;
2900
2900
  }, ee = async function(e) {
2901
- if (u(this, oe)) return u(this, oe);
2901
+ if (u(this, ae)) return u(this, ae);
2902
2902
  const t = await this.project.rootFolderId(e);
2903
2903
  if (!t)
2904
2904
  throw new Error(
@@ -2911,7 +2911,7 @@ oe = new WeakMap(), p = new WeakSet(), ie = function() {
2911
2911
  (o) => String(o.name ?? "") === u(this, p, Ce)
2912
2912
  );
2913
2913
  if (r)
2914
- return R(this, oe, te(r)), u(this, oe);
2914
+ return R(this, ae, te(r)), u(this, ae);
2915
2915
  if (!e)
2916
2916
  throw new Error(
2917
2917
  `Document ${u(this, p, Ce)} does not exist in this project.`
@@ -2921,7 +2921,7 @@ oe = new WeakMap(), p = new WeakSet(), ie = function() {
2921
2921
  t,
2922
2922
  this.project.projectId
2923
2923
  );
2924
- return R(this, oe, te(i)), u(this, oe);
2924
+ return R(this, ae, te(i)), u(this, ae);
2925
2925
  }, qt = async function() {
2926
2926
  const e = await h(this, p, ee).call(this, !1);
2927
2927
  return (await this.client.listFiles({ folderId: e })).map((s) => ({
@@ -2934,7 +2934,7 @@ oe = new WeakMap(), p = new WeakSet(), ie = function() {
2934
2934
  } catch {
2935
2935
  return;
2936
2936
  }
2937
- }, de = async function() {
2937
+ }, ue = async function() {
2938
2938
  try {
2939
2939
  const e = await h(this, p, qt).call(this);
2940
2940
  return e.find((t) => t.name === Gs) ?? e.find(
@@ -2973,7 +2973,7 @@ oe = new WeakMap(), p = new WeakSet(), ie = function() {
2973
2973
  }), o = i.item;
2974
2974
  return { id: te(o ?? i), name: t };
2975
2975
  }, Ys = async function(e, t) {
2976
- const s = await h(this, p, de).call(this);
2976
+ const s = await h(this, p, ue).call(this);
2977
2977
  if (s)
2978
2978
  return await this.client.updateFile(s.id, {
2979
2979
  file: t,
@@ -3032,28 +3032,28 @@ function Mt() {
3032
3032
  return (e === "x" ? t : t & 3 | 8).toString(16);
3033
3033
  });
3034
3034
  }
3035
- var fe, Qe, Vt;
3035
+ var pe, Qe, Vt;
3036
3036
  class fr {
3037
3037
  constructor(e) {
3038
3038
  S(this, Qe);
3039
- S(this, fe, /* @__PURE__ */ new Map());
3039
+ S(this, pe, /* @__PURE__ */ new Map());
3040
3040
  this.client = e;
3041
3041
  }
3042
3042
  /** Registers a recipe. One per name; a second with the same name throws. */
3043
3043
  register(e) {
3044
- if (u(this, fe).has(e.name))
3044
+ if (u(this, pe).has(e.name))
3045
3045
  throw new Error(`A recipe named "${e.name}" is already registered.`);
3046
- u(this, fe).set(e.name, e);
3046
+ u(this, pe).set(e.name, e);
3047
3047
  }
3048
3048
  /** The registered recipes, optionally filtered by target application. */
3049
3049
  list(e) {
3050
- return [...u(this, fe).values()].filter(
3050
+ return [...u(this, pe).values()].filter(
3051
3051
  (s) => (!(e != null && e.to) || s.to === e.to) && (!(e != null && e.input) || s.inputs.includes(e.input))
3052
3052
  );
3053
3053
  }
3054
3054
  /** A registered recipe by name, or undefined. */
3055
3055
  get(e) {
3056
- return u(this, fe).get(e);
3056
+ return u(this, pe).get(e);
3057
3057
  }
3058
3058
  /**
3059
3059
  * Runs a recipe WITHOUT queueing anything: the dry pass. Returns a
@@ -3108,8 +3108,8 @@ class fr {
3108
3108
  }), result: o };
3109
3109
  }
3110
3110
  }
3111
- fe = new WeakMap(), Qe = new WeakSet(), Vt = async function(e, t) {
3112
- const s = u(this, fe).get(e);
3111
+ pe = new WeakMap(), Qe = new WeakSet(), Vt = async function(e, t) {
3112
+ const s = u(this, pe).get(e);
3113
3113
  if (!s) throw new Error(`No recipe named "${e}" is registered.`);
3114
3114
  if (s.to !== t.target.source)
3115
3115
  throw new Error(
@@ -3162,7 +3162,7 @@ class rs extends Error {
3162
3162
  this.name = "RequestError", this.status = t, this.code = o.code, this.details = o.details, this.body = r, this.retryAfter = i ?? mr(o.details);
3163
3163
  }
3164
3164
  }
3165
- const Z = "item/folder", b = "item", le = "processor", yr = "npm-registry", re = "hidden", kt = "FILE", Ot = "TOOL", At = "APP", gr = 500, Ts = 3e4, wr = 0.25, br = (n) => new Promise((e) => setTimeout(e, n));
3165
+ const Z = "item/folder", b = "item", de = "processor", yr = "npm-registry", ie = "hidden", kt = "FILE", Ot = "TOOL", At = "APP", gr = 500, Ts = 3e4, wr = 0.25, br = (n) => new Promise((e) => setTimeout(e, n));
3166
3166
  function vr(n) {
3167
3167
  var r, i;
3168
3168
  const e = (i = (r = n.headers) == null ? void 0 : r.get) == null ? void 0 : i.call(r, "Retry-After");
@@ -3183,7 +3183,7 @@ function Tr(n, e) {
3183
3183
  ), s = t * wr * Math.random(), r = n instanceof rs && n.retryAfter != null ? n.retryAfter * 1e3 : void 0;
3184
3184
  return r != null ? Math.min(r, Ts) + s : t + s;
3185
3185
  }
3186
- var f, Gt, w, ue, Ze, ze, mt, yt, Jt, Wt, Ks;
3186
+ var f, Gt, w, fe, Ze, ze, mt, yt, Jt, Wt, Ks;
3187
3187
  const is = class is {
3188
3188
  /**
3189
3189
  * Creates a new EngineServicesClient instance.
@@ -3530,7 +3530,7 @@ const is = class is {
3530
3530
  * @returns A fetch Response containing the ZIP data.
3531
3531
  */
3532
3532
  async downloadFolder(e) {
3533
- return await h(this, f, ue).call(this, `${Z}/${e}/download`);
3533
+ return await h(this, f, fe).call(this, `${Z}/${e}/download`);
3534
3534
  }
3535
3535
  // ─── Components ──────────────────────────────────────────────────
3536
3536
  /**
@@ -3598,7 +3598,7 @@ const is = class is {
3598
3598
  */
3599
3599
  async downloadComponentBundle(e, t) {
3600
3600
  const { versionTag: s, withDraft: r } = t || {};
3601
- return await h(this, f, ue).call(this, `${b}/${e}/download/bundle`, {
3601
+ return await h(this, f, fe).call(this, `${b}/${e}/download/bundle`, {
3602
3602
  query: {
3603
3603
  ...s && { versionTag: s },
3604
3604
  ...r && { withDraft: r }
@@ -3626,7 +3626,7 @@ const is = class is {
3626
3626
  * @returns The component's JavaScript source code as a string.
3627
3627
  */
3628
3628
  async getBuiltInComponent(e) {
3629
- return await (await h(this, f, ue).call(this, `built-in/${e}/bundle`)).text();
3629
+ return await (await h(this, f, fe).call(this, `built-in/${e}/bundle`)).text();
3630
3630
  }
3631
3631
  /**
3632
3632
  * Fetches a built-in component bundle, evaluates it, and registers it
@@ -3764,7 +3764,7 @@ return main;`)(...a), c = (d == null ? void 0 : d.componentDefinition) ?? d;
3764
3764
  */
3765
3765
  async downloadAppBundle(e, t) {
3766
3766
  const { versionTag: s, withDraft: r } = t || {};
3767
- return await h(this, f, ue).call(this, `${b}/${e}/download/bundle`, {
3767
+ return await h(this, f, fe).call(this, `${b}/${e}/download/bundle`, {
3768
3768
  query: {
3769
3769
  ...s && { versionTag: s },
3770
3770
  ...r && { withDraft: r }
@@ -3807,7 +3807,7 @@ return main;`)(...a), c = (d == null ? void 0 : d.componentDefinition) ?? d;
3807
3807
  */
3808
3808
  async executeComponent(e, t, s) {
3809
3809
  if (this.localServerUrl) {
3810
- const r = `${this.localServerUrl}/api/${le}/${e}/execute`, i = await fetch(r, {
3810
+ const r = `${this.localServerUrl}/api/${de}/${e}/execute`, i = await fetch(r, {
3811
3811
  method: "POST",
3812
3812
  headers: { "Content-Type": "application/json" },
3813
3813
  body: JSON.stringify(t)
@@ -3820,7 +3820,7 @@ return main;`)(...a), c = (d == null ? void 0 : d.componentDefinition) ?? d;
3820
3820
  }
3821
3821
  return await i.json();
3822
3822
  }
3823
- return await h(this, f, w).call(this, "POST", `${le}/${e}/execute`, {
3823
+ return await h(this, f, w).call(this, "POST", `${de}/${e}/execute`, {
3824
3824
  body: JSON.stringify(t),
3825
3825
  query: { ...s && { versionTag: s } },
3826
3826
  contentType: "application/json"
@@ -3832,7 +3832,7 @@ return main;`)(...a), c = (d == null ? void 0 : d.componentDefinition) ?? d;
3832
3832
  */
3833
3833
  async abortExecution(e) {
3834
3834
  if (this.localServerUrl) {
3835
- const t = `${this.localServerUrl}/api/${le}/progress/${e}/abort`, s = await fetch(t, { method: "POST" });
3835
+ const t = `${this.localServerUrl}/api/${de}/progress/${e}/abort`, s = await fetch(t, { method: "POST" });
3836
3836
  if (!s.ok) {
3837
3837
  const r = await s.text().catch(() => "");
3838
3838
  throw new Error(
@@ -3841,7 +3841,7 @@ return main;`)(...a), c = (d == null ? void 0 : d.componentDefinition) ?? d;
3841
3841
  }
3842
3842
  return await s.json();
3843
3843
  }
3844
- return await h(this, f, w).call(this, "POST", `${le}/progress/${e}/abort`);
3844
+ return await h(this, f, w).call(this, "POST", `${de}/progress/${e}/abort`);
3845
3845
  }
3846
3846
  /**
3847
3847
  * Lists all executions for a given component.
@@ -3858,7 +3858,7 @@ return main;`)(...a), c = (d == null ? void 0 : d.componentDefinition) ?? d;
3858
3858
  */
3859
3859
  async listExecutions(e, t) {
3860
3860
  if (this.localServerUrl) {
3861
- const s = t ? `?projectId=${encodeURIComponent(t)}` : "", r = `${this.localServerUrl}/api/${le}/${e}/progress${s}`, i = await fetch(r);
3861
+ const s = t ? `?projectId=${encodeURIComponent(t)}` : "", r = `${this.localServerUrl}/api/${de}/${e}/progress${s}`, i = await fetch(r);
3862
3862
  if (!i.ok) {
3863
3863
  const o = await i.text().catch(() => "");
3864
3864
  throw new Error(
@@ -3867,7 +3867,7 @@ return main;`)(...a), c = (d == null ? void 0 : d.componentDefinition) ?? d;
3867
3867
  }
3868
3868
  return await i.json();
3869
3869
  }
3870
- return await h(this, f, w).call(this, "GET", `${le}/${e}/progress`, { query: { ...t && { projectId: t } } });
3870
+ return await h(this, f, w).call(this, "GET", `${de}/${e}/progress`, { query: { ...t && { projectId: t } } });
3871
3871
  }
3872
3872
  /**
3873
3873
  * Gets details of a specific execution, including its messages.
@@ -3876,7 +3876,7 @@ return main;`)(...a), c = (d == null ? void 0 : d.componentDefinition) ?? d;
3876
3876
  */
3877
3877
  async getExecution(e) {
3878
3878
  if (this.localServerUrl) {
3879
- const t = `${this.localServerUrl}/api/${le}/progress/${e}`, s = await fetch(t);
3879
+ const t = `${this.localServerUrl}/api/${de}/progress/${e}`, s = await fetch(t);
3880
3880
  if (!s.ok) {
3881
3881
  const r = await s.text().catch(() => "");
3882
3882
  throw new Error(
@@ -3885,7 +3885,7 @@ return main;`)(...a), c = (d == null ? void 0 : d.componentDefinition) ?? d;
3885
3885
  }
3886
3886
  return await s.json();
3887
3887
  }
3888
- return await h(this, f, w).call(this, "GET", `${le}/progress/${e}`);
3888
+ return await h(this, f, w).call(this, "GET", `${de}/progress/${e}`);
3889
3889
  }
3890
3890
  /**
3891
3891
  * Subscribes to real-time execution progress via WebSocket.
@@ -3943,7 +3943,7 @@ return main;`)(...a), c = (d == null ? void 0 : d.componentDefinition) ?? d;
3943
3943
  */
3944
3944
  async createHiddenFile(e, t, s) {
3945
3945
  const r = new FormData();
3946
- return r.append("file", e), r.append("parentItemId", t), s != null && r.append("tag", s), await h(this, f, w).call(this, "POST", `${b}/${re}`, {
3946
+ return r.append("file", e), r.append("parentItemId", t), s != null && r.append("tag", s), await h(this, f, w).call(this, "POST", `${b}/${ie}`, {
3947
3947
  body: r
3948
3948
  });
3949
3949
  }
@@ -3961,7 +3961,7 @@ return main;`)(...a), c = (d == null ? void 0 : d.componentDefinition) ?? d;
3961
3961
  const r = new FormData();
3962
3962
  for (const i of e)
3963
3963
  r.append("files", i);
3964
- return r.append("parentItemId", t), s != null && r.append("tag", s), await h(this, f, w).call(this, "POST", `${b}/${re}/batch`, {
3964
+ return r.append("parentItemId", t), s != null && r.append("tag", s), await h(this, f, w).call(this, "POST", `${b}/${ie}/batch`, {
3965
3965
  body: r
3966
3966
  });
3967
3967
  }
@@ -3970,21 +3970,21 @@ return main;`)(...a), c = (d == null ? void 0 : d.componentDefinition) ?? d;
3970
3970
  * @param hiddenId - The hidden file's unique identifier.
3971
3971
  */
3972
3972
  async deleteHiddenFile(e) {
3973
- return await h(this, f, w).call(this, "DELETE", `${b}/${re}/${e}`);
3973
+ return await h(this, f, w).call(this, "DELETE", `${b}/${ie}/${e}`);
3974
3974
  }
3975
3975
  /**
3976
3976
  * Gets metadata for a hidden file.
3977
3977
  * @param hiddenId - The hidden file's unique identifier.
3978
3978
  */
3979
3979
  async getHiddenFile(e) {
3980
- return await h(this, f, w).call(this, "GET", `${b}/${re}/${e}`);
3980
+ return await h(this, f, w).call(this, "GET", `${b}/${ie}/${e}`);
3981
3981
  }
3982
3982
  /**
3983
3983
  * Downloads a hidden file's content. Returns the raw fetch Response.
3984
3984
  * @param hiddenId - The hidden file's unique identifier.
3985
3985
  */
3986
3986
  async downloadHiddenFile(e) {
3987
- return await h(this, f, ue).call(this, `${b}/${re}/${e}/download`);
3987
+ return await h(this, f, fe).call(this, `${b}/${ie}/${e}/download`);
3988
3988
  }
3989
3989
  /**
3990
3990
  * Mints a short-lived presigned URL for a hidden file so the browser can
@@ -4004,7 +4004,7 @@ return main;`)(...a), c = (d == null ? void 0 : d.componentDefinition) ?? d;
4004
4004
  * an ISO timestamp when it stops working.
4005
4005
  */
4006
4006
  async getHiddenFileSignedUrl(e, t) {
4007
- return await h(this, f, w).call(this, "GET", `${b}/${re}/${e}/signed-url`, { ...t != null && { query: { expiresIn: t } } });
4007
+ return await h(this, f, w).call(this, "GET", `${b}/${ie}/${e}/signed-url`, { ...t != null && { query: { expiresIn: t } } });
4008
4008
  }
4009
4009
  /**
4010
4010
  * Batch variant of {@link getHiddenFileSignedUrl}. Mints presigned URLs for
@@ -4025,7 +4025,7 @@ return main;`)(...a), c = (d == null ? void 0 : d.componentDefinition) ?? d;
4025
4025
  * 900 (15 min) server-side; values are clamped to that range.
4026
4026
  */
4027
4027
  async getHiddenFileSignedUrlsBatch(e, t) {
4028
- return await h(this, f, ze).call(this, e, async (s) => (await h(this, f, w).call(this, "POST", `${b}/${re}/signed-url/batch`, {
4028
+ return await h(this, f, ze).call(this, e, async (s) => (await h(this, f, w).call(this, "POST", `${b}/${ie}/signed-url/batch`, {
4029
4029
  body: JSON.stringify({
4030
4030
  hiddenFileIds: s,
4031
4031
  ...t != null && { expiresIn: t }
@@ -4041,14 +4041,14 @@ return main;`)(...a), c = (d == null ? void 0 : d.componentDefinition) ?? d;
4041
4041
  * @returns Array of hidden file entities.
4042
4042
  */
4043
4043
  async getHiddenFilesByParent(e, t) {
4044
- return await h(this, f, w).call(this, "GET", `${b}/${e}/${re}`, { ...t != null && { query: { tag: t } } });
4044
+ return await h(this, f, w).call(this, "GET", `${b}/${e}/${ie}`, { ...t != null && { query: { tag: t } } });
4045
4045
  }
4046
4046
  /**
4047
4047
  * Deletes all hidden files attached to a parent item.
4048
4048
  * @param parentFileId - The parent item's unique identifier.
4049
4049
  */
4050
4050
  async deleteHiddenFilesByParent(e) {
4051
- return await h(this, f, w).call(this, "DELETE", `${b}/${e}/${re}`);
4051
+ return await h(this, f, w).call(this, "DELETE", `${b}/${e}/${ie}`);
4052
4052
  }
4053
4053
  // ─── Icons ───────────────────────────────────────────────────────
4054
4054
  /**
@@ -4070,7 +4070,7 @@ return main;`)(...a), c = (d == null ? void 0 : d.componentDefinition) ?? d;
4070
4070
  * @returns The raw Response (use `.blob()`, `.arrayBuffer()`, or pipe the body).
4071
4071
  */
4072
4072
  async getItemIcon(e) {
4073
- return await h(this, f, ue).call(this, `${b}/${e}/icon`);
4073
+ return await h(this, f, fe).call(this, `${b}/${e}/icon`);
4074
4074
  }
4075
4075
  /**
4076
4076
  * Removes the icon from an item.
@@ -4194,29 +4194,29 @@ f = new WeakSet(), Gt = function(e) {
4194
4194
  }
4195
4195
  );
4196
4196
  if (!_.ok) {
4197
- const E = await _.text().then((N) => N).catch(() => "");
4197
+ const v = await _.text().then((N) => N).catch(() => "");
4198
4198
  throw new rs(
4199
4199
  _.status,
4200
4200
  _.statusText,
4201
- E,
4201
+ v,
4202
4202
  vr(_)
4203
4203
  );
4204
4204
  }
4205
- return l === "blob" ? await _.blob() : _.json().then((E) => E).catch(() => {
4205
+ return l === "blob" ? await _.blob() : _.json().then((v) => v).catch(() => {
4206
4206
  });
4207
4207
  } catch (_) {
4208
- const E = a ?? this.retries;
4209
- if (E > 0 && Er(_)) {
4208
+ const v = a ?? this.retries;
4209
+ if (v > 0 && Er(_)) {
4210
4210
  const N = d ?? 0;
4211
4211
  return await br(Tr(_, N)), await h(this, f, w).call(this, e, t, {
4212
4212
  ...s,
4213
- retries: E - 1,
4213
+ retries: v - 1,
4214
4214
  retryAttempt: N + 1
4215
4215
  });
4216
4216
  }
4217
4217
  throw _;
4218
4218
  }
4219
- }, ue = async function(e, t) {
4219
+ }, fe = async function(e, t) {
4220
4220
  const { query: s } = t || {}, r = h(this, f, Gt).call(this, e), i = await this.resolveAccessToken(), o = {
4221
4221
  ...s,
4222
4222
  ...this.useBearer ? {} : { accessToken: i }
@@ -4238,7 +4238,7 @@ f = new WeakSet(), Gt = function(e) {
4238
4238
  return (await Promise.all(s.map(t))).flat();
4239
4239
  }, mt = async function(e, t) {
4240
4240
  const { versionTag: s, withDraft: r } = t || {};
4241
- return await h(this, f, ue).call(this, `${b}/${e}/download`, {
4241
+ return await h(this, f, fe).call(this, `${b}/${e}/download`, {
4242
4242
  query: {
4243
4243
  ...s && { versionTag: s },
4244
4244
  ...r && { withDraft: r }
@@ -4304,13 +4304,13 @@ function gt(n) {
4304
4304
  console.error("[channel] a listener threw:", e);
4305
4305
  }
4306
4306
  }
4307
- var ae, U, M, xe, Ne, Pe, F, zt, Kt, $e;
4307
+ var ce, M, V, xe, Ne, Pe, L, zt, Kt, $e;
4308
4308
  class Xs {
4309
4309
  constructor(e, t) {
4310
- S(this, F);
4311
- S(this, ae, !1);
4312
- S(this, U, []);
4310
+ S(this, L);
4311
+ S(this, ce, !1);
4313
4312
  S(this, M, []);
4313
+ S(this, V, []);
4314
4314
  S(this, xe, /* @__PURE__ */ new Set());
4315
4315
  S(this, Ne, /* @__PURE__ */ new Set());
4316
4316
  S(this, Pe, /* @__PURE__ */ new Set());
@@ -4318,22 +4318,22 @@ class Xs {
4318
4318
  }
4319
4319
  /** Whether the platform has confirmed this tab is in the room. */
4320
4320
  get joined() {
4321
- return u(this, ae);
4321
+ return u(this, ce);
4322
4322
  }
4323
4323
  /** Who else is in the room right now, as the platform last reported. */
4324
4324
  get peers() {
4325
- return u(this, U);
4325
+ return u(this, M);
4326
4326
  }
4327
4327
  /**
4328
4328
  * Enters the room. Resolves when the platform confirms; rejects if it
4329
4329
  * refuses or does not answer in time. Joining twice is harmless.
4330
4330
  */
4331
4331
  join() {
4332
- return u(this, ae) ? Promise.resolve() : h(this, F, zt).call(this, "joined", this.controls.join);
4332
+ return u(this, ce) ? Promise.resolve() : h(this, L, zt).call(this, "joined", this.controls.join);
4333
4333
  }
4334
4334
  /** Leaves the room. Handlers stay registered, so `join()` resumes them. */
4335
4335
  leave() {
4336
- return !u(this, ae) && !u(this, M).some((e) => e.want === "joined") ? Promise.resolve() : h(this, F, zt).call(this, "left", this.controls.leave);
4336
+ return !u(this, ce) && !u(this, V).some((e) => e.want === "joined") ? Promise.resolve() : h(this, L, zt).call(this, "left", this.controls.leave);
4337
4337
  }
4338
4338
  /** Fires when `joined` or `peers` changes. Returns a function that stops it. */
4339
4339
  onChange(e) {
@@ -4347,29 +4347,29 @@ class Xs {
4347
4347
  }
4348
4348
  /** @internal */
4349
4349
  applyJoined() {
4350
- R(this, ae, !0), h(this, F, Kt).call(this, "joined"), h(this, F, $e).call(this);
4350
+ R(this, ce, !0), h(this, L, Kt).call(this, "joined"), h(this, L, $e).call(this);
4351
4351
  }
4352
4352
  /** @internal */
4353
4353
  applyLeft() {
4354
- R(this, ae, !1), R(this, U, []), h(this, F, Kt).call(this, "left"), h(this, F, $e).call(this);
4354
+ R(this, ce, !1), R(this, M, []), h(this, L, Kt).call(this, "left"), h(this, L, $e).call(this);
4355
4355
  }
4356
4356
  /** @internal */
4357
4357
  applyPeers(e) {
4358
- R(this, U, e), h(this, F, $e).call(this);
4358
+ R(this, M, e), h(this, L, $e).call(this);
4359
4359
  }
4360
4360
  /** @internal */
4361
4361
  applyPeerJoined(e) {
4362
- !u(this, ae) || u(this, U).some((t) => t.from === e.from) || (R(this, U, [...u(this, U), e]), u(this, Ne).forEach((t) => gt(() => t(e))), h(this, F, $e).call(this));
4362
+ !u(this, ce) || u(this, M).some((t) => t.from === e.from) || (R(this, M, [...u(this, M), e]), u(this, Ne).forEach((t) => gt(() => t(e))), h(this, L, $e).call(this));
4363
4363
  }
4364
4364
  /** @internal */
4365
4365
  applyPeerLeft(e) {
4366
- const t = u(this, U).find((s) => s.from === e);
4367
- t && (R(this, U, u(this, U).filter((s) => s.from !== e)), u(this, Pe).forEach((s) => gt(() => s(t))), h(this, F, $e).call(this));
4366
+ const t = u(this, M).find((s) => s.from === e);
4367
+ t && (R(this, M, u(this, M).filter((s) => s.from !== e)), u(this, Pe).forEach((s) => gt(() => s(t))), h(this, L, $e).call(this));
4368
4368
  }
4369
4369
  /** @internal */
4370
4370
  failPending(e) {
4371
- const t = u(this, M);
4372
- return R(this, M, []), t.forEach((s) => {
4371
+ const t = u(this, V);
4372
+ return R(this, V, []), t.forEach((s) => {
4373
4373
  clearTimeout(s.timer), s.reject(e);
4374
4374
  }), t.length > 0;
4375
4375
  }
@@ -4377,25 +4377,25 @@ class Xs {
4377
4377
  this.transport.post(e);
4378
4378
  }
4379
4379
  }
4380
- ae = new WeakMap(), U = new WeakMap(), M = new WeakMap(), xe = new WeakMap(), Ne = new WeakMap(), Pe = new WeakMap(), F = new WeakSet(), zt = function(e, t) {
4380
+ ce = new WeakMap(), M = new WeakMap(), V = new WeakMap(), xe = new WeakMap(), Ne = new WeakMap(), Pe = new WeakMap(), L = new WeakSet(), zt = function(e, t) {
4381
4381
  return new Promise((s, r) => {
4382
4382
  const i = {
4383
4383
  want: e,
4384
4384
  resolve: s,
4385
4385
  reject: r,
4386
4386
  timer: setTimeout(() => {
4387
- R(this, M, u(this, M).filter((o) => o !== i)), r(
4387
+ R(this, V, u(this, V).filter((o) => o !== i)), r(
4388
4388
  new Error(
4389
4389
  `The platform did not confirm ${e === "joined" ? "joining" : "leaving"} in time.`
4390
4390
  )
4391
4391
  );
4392
4392
  }, Ir)
4393
4393
  };
4394
- u(this, M).push(i), this.transport.post({ type: "APP_CHANNEL_CONTROL", ...t });
4394
+ u(this, V).push(i), this.transport.post({ type: "APP_CHANNEL_CONTROL", ...t });
4395
4395
  });
4396
4396
  }, Kt = function(e) {
4397
- const t = u(this, M).filter((s) => s.want === e);
4398
- R(this, M, u(this, M).filter((s) => s.want !== e)), t.forEach((s) => {
4397
+ const t = u(this, V).filter((s) => s.want === e);
4398
+ R(this, V, u(this, V).filter((s) => s.want !== e)), t.forEach((s) => {
4399
4399
  clearTimeout(s.timer), s.resolve();
4400
4400
  });
4401
4401
  }, $e = function() {
@@ -4439,7 +4439,7 @@ class Sr extends Xs {
4439
4439
  }
4440
4440
  }
4441
4441
  Be = new WeakMap();
4442
- var pe;
4442
+ var me;
4443
4443
  class kr extends Xs {
4444
4444
  /** @internal Use `client.channel.external(kind)`. */
4445
4445
  constructor(t, s) {
@@ -4447,7 +4447,7 @@ class kr extends Xs {
4447
4447
  join: { action: "joinExternal", kind: s },
4448
4448
  leave: { action: "leaveExternal", kind: s }
4449
4449
  });
4450
- S(this, pe, /* @__PURE__ */ new Map());
4450
+ S(this, me, /* @__PURE__ */ new Map());
4451
4451
  this.kind = s;
4452
4452
  }
4453
4453
  /**
@@ -4461,21 +4461,21 @@ class kr extends Xs {
4461
4461
  * @returns a function that removes the handler.
4462
4462
  */
4463
4463
  on(t, s) {
4464
- if (u(this, pe).has(t))
4464
+ if (u(this, me).has(t))
4465
4465
  throw new Error(
4466
4466
  `"${t}" already has a handler in this room. Remove it first.`
4467
4467
  );
4468
- return u(this, pe).set(t, s), () => void u(this, pe).delete(t);
4468
+ return u(this, me).set(t, s), () => void u(this, me).delete(t);
4469
4469
  }
4470
4470
  accepts(t, s) {
4471
4471
  return t !== void 0 && t !== "external" ? !1 : this.kind === void 0 || t === void 0 || this.kind === s;
4472
4472
  }
4473
4473
  /** @internal Whether this room has any handler at all. */
4474
4474
  get hasHandlers() {
4475
- return u(this, pe).size > 0;
4475
+ return u(this, me).size > 0;
4476
4476
  }
4477
4477
  async handle(t) {
4478
- const s = u(this, pe).get(t.type);
4478
+ const s = u(this, me).get(t.type);
4479
4479
  if (!s) return { handled: !1 };
4480
4480
  try {
4481
4481
  return { handled: !0, value: await s(t.payload, Qs(t)) };
@@ -4487,7 +4487,7 @@ class kr extends Xs {
4487
4487
  }
4488
4488
  }
4489
4489
  }
4490
- pe = new WeakMap();
4490
+ me = new WeakMap();
4491
4491
  function Qs(n) {
4492
4492
  return {
4493
4493
  from: n.from,
@@ -4510,20 +4510,20 @@ function Or(n) {
4510
4510
  kind: typeof t.kind == "string" ? t.kind : void 0
4511
4511
  };
4512
4512
  }
4513
- var Se, et, ce, me, ye, $, Xt, wt, Zs, en, tn, Qt;
4513
+ var Se, et, he, ye, ge, $, Xt, wt, Zs, en, tn, Qt;
4514
4514
  class Ar {
4515
4515
  constructor(e) {
4516
4516
  S(this, $);
4517
4517
  S(this, Se);
4518
4518
  S(this, et);
4519
- S(this, ce);
4520
- S(this, me, /* @__PURE__ */ new Map());
4521
- S(this, ye, /* @__PURE__ */ new Set());
4519
+ S(this, he);
4520
+ S(this, ye, /* @__PURE__ */ new Map());
4521
+ S(this, ge, /* @__PURE__ */ new Set());
4522
4522
  R(this, Se, e), R(this, et, e.listen((t) => void h(this, $, Zs).call(this, t)));
4523
4523
  }
4524
4524
  /** The collaboration room for this app. Always the same instance. */
4525
4525
  collab() {
4526
- return u(this, ce) ?? R(this, ce, new Sr(u(this, Se))), u(this, ce);
4526
+ return u(this, he) ?? R(this, he, new Sr(u(this, Se))), u(this, he);
4527
4527
  }
4528
4528
  /**
4529
4529
  * The room for commands from this account's external tools of one `kind`
@@ -4532,20 +4532,20 @@ class Ar {
4532
4532
  */
4533
4533
  external(e) {
4534
4534
  const t = e ?? "";
4535
- let s = u(this, me).get(t);
4536
- return s || (s = new kr(u(this, Se), e), u(this, me).set(t, s)), s;
4535
+ let s = u(this, ye).get(t);
4536
+ return s || (s = new kr(u(this, Se), e), u(this, ye).set(t, s)), s;
4537
4537
  }
4538
4538
  /** Stops listening. For tests and teardown; an app normally never calls it. */
4539
4539
  dispose() {
4540
4540
  u(this, et).call(this);
4541
4541
  }
4542
4542
  }
4543
- Se = new WeakMap(), et = new WeakMap(), ce = new WeakMap(), me = new WeakMap(), ye = new WeakMap(), $ = new WeakSet(), Xt = function() {
4544
- return [...u(this, ce) ? [u(this, ce)] : [], ...u(this, me).values()];
4543
+ Se = new WeakMap(), et = new WeakMap(), he = new WeakMap(), ye = new WeakMap(), ge = new WeakMap(), $ = new WeakSet(), Xt = function() {
4544
+ return [...u(this, he) ? [u(this, he)] : [], ...u(this, ye).values()];
4545
4545
  }, wt = function(e, t) {
4546
- if (e === "collab") return u(this, ce);
4546
+ if (e === "collab") return u(this, he);
4547
4547
  if (e === "external")
4548
- return u(this, me).get(typeof t == "string" ? t : "");
4548
+ return u(this, ye).get(typeof t == "string" ? t : "");
4549
4549
  }, Zs = async function(e) {
4550
4550
  const t = Or(e);
4551
4551
  if (t) {
@@ -4571,7 +4571,7 @@ Se = new WeakMap(), et = new WeakMap(), ce = new WeakMap(), me = new WeakMap(),
4571
4571
  case "channel:peer-joined":
4572
4572
  case "channel:peer-left": {
4573
4573
  if (!t.from) break;
4574
- const o = t.scope === "collab" ? [u(this, ce)] : [...u(this, me).values()].filter(
4574
+ const o = t.scope === "collab" ? [u(this, he)] : [...u(this, ye).values()].filter(
4575
4575
  (a) => a.accepts("external", t.kind)
4576
4576
  );
4577
4577
  for (const a of o)
@@ -4596,7 +4596,7 @@ Se = new WeakMap(), et = new WeakMap(), ce = new WeakMap(), me = new WeakMap(),
4596
4596
  error: `No handler for "${e.type}".`
4597
4597
  });
4598
4598
  }, Qt = function(e, t) {
4599
- u(this, ye).has(e) || (u(this, ye).add(e), u(this, ye).size > 500 && u(this, ye).delete(u(this, ye).values().next().value), u(this, Se).post({
4599
+ u(this, ge).has(e) || (u(this, ge).add(e), u(this, ge).size > 500 && u(this, ge).delete(u(this, ge).values().next().value), u(this, Se).post({
4600
4600
  type: "APP_CHANNEL_PUBLISH",
4601
4601
  message: {
4602
4602
  type: t.error === void 0 ? "reply" : "reply-error",
@@ -5080,27 +5080,27 @@ class nn {
5080
5080
  const { Attribute: i, Meshes: o, Model: a, SpatialStructure: l, Transform: d } = t, c = new e.Builder(1024), m = this.changes.length, T = new Uint32Array(m);
5081
5081
  let A = 1;
5082
5082
  for (let I = 0; I < m; I++) T[I] = A++;
5083
- const _ = A++, E = (I) => (I(c, 0), c.endVector()), N = o.createShellsVector(c, []), we = o.createCircleExtrusionsVector(c, []), H = E(o.startSamplesVector), z = E(o.startRepresentationsVector), De = E(o.startMaterialsVector), K = E(o.startLocalTransformsVector), O = E(o.startGlobalTransformsVector), q = o.createMeshesItemsVector(c, []), X = o.createMaterialIdsVector(c, []), be = o.createRepresentationIdsVector(c, []), ve = o.createSampleIdsVector(c, []), Ee = o.createLocalTransformIdsVector(c, []), qe = o.createGlobalTransformIdsVector(c, []);
5084
- o.startMeshes(c), o.addCoordinates(c, d.createTransform(c, 0, 0, 0, 1, 0, 0, 0, 1, 0)), o.addGlobalTransforms(c, O), o.addShells(c, N), o.addRepresentations(c, z), o.addSamples(c, H), o.addLocalTransforms(c, K), o.addMaterials(c, De), o.addCircleExtrusions(c, we), o.addMeshesItems(c, q), o.addRepresentationIds(c, be), o.addSampleIds(c, ve), o.addMaterialIds(c, X), o.addLocalTransformIds(c, Ee), o.addGlobalTransformIds(c, qe);
5085
- const je = o.endMeshes(c), Te = c.createString(r), Ue = /* @__PURE__ */ new Set(), Oe = [];
5083
+ const _ = A++, v = (I) => (I(c, 0), c.endVector()), N = o.createShellsVector(c, []), be = o.createCircleExtrusionsVector(c, []), G = v(o.startSamplesVector), z = v(o.startRepresentationsVector), De = v(o.startMaterialsVector), K = v(o.startLocalTransformsVector), O = v(o.startGlobalTransformsVector), q = o.createMeshesItemsVector(c, []), X = o.createMaterialIdsVector(c, []), ve = o.createRepresentationIdsVector(c, []), Ee = o.createSampleIdsVector(c, []), Te = o.createLocalTransformIdsVector(c, []), qe = o.createGlobalTransformIdsVector(c, []);
5084
+ o.startMeshes(c), o.addCoordinates(c, d.createTransform(c, 0, 0, 0, 1, 0, 0, 0, 1, 0)), o.addGlobalTransforms(c, O), o.addShells(c, N), o.addRepresentations(c, z), o.addSamples(c, G), o.addLocalTransforms(c, K), o.addMaterials(c, De), o.addCircleExtrusions(c, be), o.addMeshesItems(c, q), o.addRepresentationIds(c, ve), o.addSampleIds(c, Ee), o.addMaterialIds(c, X), o.addLocalTransformIds(c, Te), o.addGlobalTransformIds(c, qe);
5085
+ const je = o.endMeshes(c), _e = c.createString(r), Ue = /* @__PURE__ */ new Set(), Oe = [];
5086
5086
  for (const I of this.changes) {
5087
- const D = [], _e = {
5087
+ const F = [], re = {
5088
5088
  [xr]: I.op,
5089
5089
  ...I.attrs
5090
5090
  };
5091
- for (const [j, G] of Object.entries(_e)) {
5092
- const Q = JSON.stringify([j, G, "IFCTEXT"]);
5093
- Ue.add(Q), D.push(c.createString(Q));
5091
+ for (const [j, J] of Object.entries(re)) {
5092
+ const Q = JSON.stringify([j, J, "IFCTEXT"]);
5093
+ Ue.add(Q), F.push(c.createString(Q));
5094
5094
  }
5095
5095
  Oe.push(
5096
- i.createAttribute(c, i.createDataVector(c, D))
5096
+ i.createAttribute(c, i.createDataVector(c, F))
5097
5097
  );
5098
5098
  }
5099
5099
  {
5100
5100
  const I = JSON.stringify(["Name", s, "IFCLABEL"]);
5101
5101
  Ue.add(I);
5102
- const D = i.createDataVector(c, [c.createString(I)]);
5103
- Oe.push(i.createAttribute(c, D));
5102
+ const F = i.createDataVector(c, [c.createString(I)]);
5103
+ Oe.push(i.createAttribute(c, F));
5104
5104
  }
5105
5105
  const st = a.createAttributesVector(c, Oe), nt = a.createUniqueAttributesVector(
5106
5106
  c,
@@ -5110,13 +5110,13 @@ class nn {
5110
5110
  );
5111
5111
  Me.push(c.createString(Ss));
5112
5112
  const rt = a.createCategoriesVector(c, Me), Ve = [], He = [];
5113
- this.changes.forEach((I, D) => {
5114
- I.item && (Ve.push(c.createString(I.item)), He.push(T[D]));
5113
+ this.changes.forEach((I, F) => {
5114
+ I.item && (Ve.push(c.createString(I.item)), He.push(T[F]));
5115
5115
  });
5116
5116
  const g = a.createGuidsVector(c, Ve), y = a.createGuidsItemsVector(c, He), k = a.createLocalIdsVector(c, [...T, _]), x = this.changes.map(
5117
- (I, D) => l.createSpatialStructure(
5117
+ (I, F) => l.createSpatialStructure(
5118
5118
  c,
5119
- T[D],
5119
+ T[F],
5120
5120
  c.createString(Is),
5121
5121
  0
5122
5122
  )
@@ -5125,10 +5125,10 @@ class nn {
5125
5125
  _,
5126
5126
  c.createString(Ss),
5127
5127
  l.createChildrenVector(c, x)
5128
- ), L = c.createString(s);
5129
- a.startModel(c), a.addMeshes(c, je), a.addMetadata(c, Te), a.addAttributes(c, st), a.addUniqueAttributes(c, nt), a.addLocalIds(c, k), a.addCategories(c, rt), a.addGuidsItems(c, y), a.addGuids(c, g), a.addGuid(c, L), a.addSpatialStructure(c, P), a.addMaxLocalId(c, A);
5130
- const he = a.endModel(c);
5131
- return a.finishModelBuffer(c, he), c.asUint8Array();
5128
+ ), D = c.createString(s);
5129
+ a.startModel(c), a.addMeshes(c, je), a.addMetadata(c, _e), a.addAttributes(c, st), a.addUniqueAttributes(c, nt), a.addLocalIds(c, k), a.addCategories(c, rt), a.addGuidsItems(c, y), a.addGuids(c, g), a.addGuid(c, D), a.addSpatialStructure(c, P), a.addMaxLocalId(c, A);
5130
+ const le = a.endModel(c);
5131
+ return a.finishModelBuffer(c, le), c.asUint8Array();
5132
5132
  }
5133
5133
  }
5134
5134
  async function Br() {
@@ -5237,7 +5237,7 @@ function As(n) {
5237
5237
  const e = n.indexOf(":");
5238
5238
  return e <= 0 || e === n.length - 1 ? null : { family: n.slice(0, e), type: n.slice(e + 1) };
5239
5239
  }
5240
- const J = (n) => String(n);
5240
+ const U = (n) => String(n);
5241
5241
  function cn(n) {
5242
5242
  return async (e) => {
5243
5243
  var Oe, st, nt, Me, rt, Ve, He;
@@ -5259,11 +5259,11 @@ function cn(n) {
5259
5259
  document: e.targetDoc.docId,
5260
5260
  baseCommit: (A == null ? void 0 : A.version) ?? 0,
5261
5261
  author: m
5262
- }), E = rn, N = (g) => `${t.fileId}:${g}`, we = /* @__PURE__ */ new Set();
5263
- let H = 0;
5264
- const z = (g, y, k) => (we.add(g), T.has(g) ? (H++, !1) : (_.add(y, { ...k, source: g }), !0)), De = (g) => {
5262
+ }), v = rn, N = (g) => `${t.fileId}:${g}`, be = /* @__PURE__ */ new Set();
5263
+ let G = 0;
5264
+ const z = (g, y, k) => (be.add(g), T.has(g) ? (G++, !1) : (_.add(y, { ...k, source: g }), !0)), De = (g) => {
5265
5265
  const y = typeof g == "string" ? c.get(g) : void 0, k = y == null ? void 0 : y.params.thickness;
5266
- return typeof k == "number" && k > 0 ? k * E : void 0;
5266
+ return typeof k == "number" && k > 0 ? k * v : void 0;
5267
5267
  };
5268
5268
  let K = 0;
5269
5269
  if (l)
@@ -5271,62 +5271,62 @@ function cn(n) {
5271
5271
  z(N(g), {
5272
5272
  CategoryId: Rt.levels,
5273
5273
  Name: y.name,
5274
- Elevation: J(y.at * E)
5274
+ Elevation: U(y.at * v)
5275
5275
  }), K++;
5276
5276
  let O = 0, q = 0;
5277
5277
  for (const g of r) {
5278
5278
  if (g.kind !== "run" || g.params.of !== "wall") continue;
5279
- const y = ht(g, "run"), k = ((st = (Oe = y == null ? void 0 : y.run) == null ? void 0 : Oe.line) == null ? void 0 : st.curves) ?? [], x = typeof (y == null ? void 0 : y.base) == "number" ? y.base : 0, P = y == null ? void 0 : y.height, L = d.get(String((y == null ? void 0 : y.level) ?? g.params.level ?? "")), he = g.params.lookRef;
5280
- if (typeof he != "string" || typeof P != "number" || !L) {
5279
+ const y = ht(g, "run"), k = ((st = (Oe = y == null ? void 0 : y.run) == null ? void 0 : Oe.line) == null ? void 0 : st.curves) ?? [], x = typeof (y == null ? void 0 : y.base) == "number" ? y.base : 0, P = y == null ? void 0 : y.height, D = d.get(String((y == null ? void 0 : y.level) ?? g.params.level ?? "")), le = g.params.lookRef;
5280
+ if (typeof le != "string" || typeof P != "number" || !D) {
5281
5281
  q++;
5282
5282
  continue;
5283
5283
  }
5284
- k.forEach((I, D) => {
5284
+ k.forEach((I, F) => {
5285
5285
  if (I.kind !== "segment" || !I.from || !I.to) {
5286
5286
  q++;
5287
5287
  return;
5288
5288
  }
5289
- const _e = x * E, j = `${J(I.from[0] * E)},${J(I.from[1] * E)},${J(_e)};${J(I.to[0] * E)},${J(I.to[1] * E)},${J(_e)}`, G = {
5289
+ const re = (D.at + x) * v, j = `${U(I.from[0] * v)},${U(I.from[1] * v)},${U(re)};${U(I.to[0] * v)},${U(I.to[1] * v)},${U(re)}`, J = {
5290
5290
  CategoryId: Rt.walls,
5291
- Type: he,
5291
+ Type: le,
5292
5292
  LocationLine: j,
5293
- Level: L.name,
5294
- BaseOffset: J((x - L.at) * E),
5295
- Height: J(P * E)
5296
- }, Q = De(he);
5297
- Q && (G["Type.Width"] = J(Q)), z(`${N(g.id)}#${D}`, G) && O++;
5293
+ Level: D.name,
5294
+ BaseOffset: U(x * v),
5295
+ Height: U(P * v)
5296
+ }, Q = De(le);
5297
+ Q && (J["Type.Width"] = U(Q)), z(`${N(g.id)}#${F}`, J) && O++;
5298
5298
  });
5299
5299
  }
5300
- let X = 0, be = 0;
5300
+ let X = 0, ve = 0;
5301
5301
  for (const g of r) {
5302
5302
  if (g.kind !== "extrusion" || g.params.of !== "slab") continue;
5303
- const y = ht(g, "extrusion"), k = typeof g.params.base == "number" ? g.params.base : 0, x = d.get(String((y == null ? void 0 : y.level) ?? g.params.level ?? "")), P = g.params.lookRef, L = (j) => {
5303
+ const y = ht(g, "extrusion"), k = typeof g.params.base == "number" ? g.params.base : 0, x = d.get(String((y == null ? void 0 : y.level) ?? g.params.level ?? "")), P = g.params.lookRef, D = (j) => {
5304
5304
  if (!(j != null && j.length)) return null;
5305
- const G = [];
5305
+ const J = [];
5306
5306
  for (const Q of j) {
5307
5307
  if (Q.kind !== "segment" || !Q.from) return null;
5308
- G.push(Q.from[0] * E, Q.from[1] * E, k * E);
5308
+ J.push(Q.from[0] * v, Q.from[1] * v, k * v);
5309
5309
  }
5310
- return G.length >= 9 ? G : null;
5311
- }, he = L((Me = (nt = y == null ? void 0 : y.profile) == null ? void 0 : nt.outline) == null ? void 0 : Me.curves);
5312
- if (typeof P != "string" || !x || !he) {
5313
- be++;
5310
+ return J.length >= 9 ? J : null;
5311
+ }, le = D((Me = (nt = y == null ? void 0 : y.profile) == null ? void 0 : nt.outline) == null ? void 0 : Me.curves);
5312
+ if (typeof P != "string" || !x || !le) {
5313
+ ve++;
5314
5314
  continue;
5315
5315
  }
5316
- const I = [he];
5316
+ const I = [le];
5317
5317
  for (const j of ((rt = y == null ? void 0 : y.profile) == null ? void 0 : rt.holes) ?? []) {
5318
- const G = L(j == null ? void 0 : j.curves);
5319
- G && I.push(G);
5318
+ const J = D(j == null ? void 0 : j.curves);
5319
+ J && I.push(J);
5320
5320
  }
5321
- const D = {
5321
+ const F = {
5322
5322
  CategoryId: Rt.floors,
5323
5323
  Type: P,
5324
5324
  Profile: JSON.stringify(I),
5325
5325
  Level: x.name
5326
- }, _e = De(P);
5327
- _e && (D["Type.Width"] = J(_e)), z(N(g.id), D) && X++;
5326
+ }, re = De(P);
5327
+ re && (F["Type.Width"] = U(re)), re && (F.HeightOffset = U(k * v + re)), z(N(g.id), F) && X++;
5328
5328
  }
5329
- let ve = 0;
5329
+ let Ee = 0;
5330
5330
  for (const g of r) {
5331
5331
  if (g.kind !== "member" || g.params.of !== "column") continue;
5332
5332
  const y = ht(g, "member"), k = y == null ? void 0 : y.start;
@@ -5336,22 +5336,22 @@ function cn(n) {
5336
5336
  const P = x ?? {
5337
5337
  family: i.family,
5338
5338
  type: i.type
5339
- }, L = d.get(String((y == null ? void 0 : y.level) ?? ""));
5339
+ }, D = d.get(String((y == null ? void 0 : y.level) ?? ""));
5340
5340
  z(
5341
5341
  N(g.id),
5342
5342
  {
5343
5343
  ...i && !x ? { CategoryId: i.categoryId } : {},
5344
5344
  Family: P.family,
5345
5345
  Type: P.type,
5346
- ...L ? { Level: L.name } : {}
5346
+ ...D ? { Level: D.name } : {}
5347
5347
  },
5348
5348
  {
5349
- position: [k[0] * E, k[1] * E, k[2] * E],
5349
+ position: [k[0] * v, k[1] * v, k[2] * v],
5350
5350
  rotationDeg: (Number((y == null ? void 0 : y.roll) ?? 0) || 0) * Os
5351
5351
  }
5352
- ) && ve++;
5352
+ ) && Ee++;
5353
5353
  }
5354
- let Ee = 0, qe = 0;
5354
+ let Te = 0, qe = 0;
5355
5355
  for (const g of r) {
5356
5356
  if (g.kind !== "familyInstance") continue;
5357
5357
  if (g.params.host) {
@@ -5363,30 +5363,30 @@ function cn(n) {
5363
5363
  if (!k || k.length !== 3) continue;
5364
5364
  const x = As(g.params.type);
5365
5365
  if (!x) continue;
5366
- const P = (He = y == null ? void 0 : y.placement) == null ? void 0 : He.right, L = P ? Math.atan2(P[1], P[0]) * Os : 0;
5366
+ const P = (He = y == null ? void 0 : y.placement) == null ? void 0 : He.right, D = P ? Math.atan2(P[1], P[0]) * Os : 0;
5367
5367
  z(
5368
5368
  N(g.id),
5369
5369
  { Family: x.family, Type: x.type },
5370
- { position: [k[0] * E, k[1] * E, k[2] * E], rotationDeg: L }
5371
- ) && Ee++;
5370
+ { position: [k[0] * v, k[1] * v, k[2] * v], rotationDeg: D }
5371
+ ) && Te++;
5372
5372
  }
5373
5373
  let je = 0;
5374
5374
  for (const g of r)
5375
5375
  (g.kind === "stair" || g.kind === "footing" || g.kind === "ramp" || g.kind === "extrusion" && g.params.of !== "slab" || g.kind === "run" && g.params.of !== "wall") && je++;
5376
- let Te = 0;
5376
+ let _e = 0;
5377
5377
  for (const [g, y] of T)
5378
- !g.startsWith(`${t.fileId}:`) || we.has(g) || (_.remove(y), Te++);
5378
+ !g.startsWith(`${t.fileId}:`) || be.has(g) || (_.remove(y), _e++);
5379
5379
  if (_.length === 0)
5380
5380
  throw new Error(
5381
- `Nothing new to ask for: "${t.name}" holds ${H} element(s) this recipe already made, ${qe + je} waiting on the applier, and nothing is left to remove.`
5381
+ `Nothing new to ask for: "${t.name}" holds ${G} element(s) this recipe already made, ${qe + je} waiting on the applier, and nothing is left to remove.`
5382
5382
  );
5383
5383
  const Ue = [
5384
5384
  K ? `${K} level(s)` : "",
5385
5385
  O ? `${O} wall(s)` : "",
5386
5386
  X ? `${X} floor(s)` : "",
5387
- ve ? `${ve} column(s)` : "",
5388
- Ee ? `${Ee} instance(s)` : "",
5389
- Te ? `${Te} gone` : ""
5387
+ Ee ? `${Ee} column(s)` : "",
5388
+ Te ? `${Te} instance(s)` : "",
5389
+ _e ? `${_e} gone` : ""
5390
5390
  ].filter(Boolean);
5391
5391
  return {
5392
5392
  title: `${n === "ifc" ? "IFC" : "Model"} to Revit: ${Ue.join(", ")}`,
@@ -5396,10 +5396,10 @@ function cn(n) {
5396
5396
  ruleTallies: [
5397
5397
  { read: d.size, proposed: K },
5398
5398
  { read: O + q, proposed: O },
5399
- { read: X + be, proposed: X },
5400
- { read: ve, proposed: ve },
5399
+ { read: X + ve, proposed: X },
5401
5400
  { read: Ee, proposed: Ee },
5402
5401
  { read: Te, proposed: Te },
5402
+ { read: _e, proposed: _e },
5403
5403
  { read: qe + je, proposed: 0 }
5404
5404
  ]
5405
5405
  };
@@ -5620,12 +5620,12 @@ point's height.
5620
5620
  baseCommit: (m == null ? void 0 : m.version) ?? 0,
5621
5621
  author: Rs
5622
5622
  });
5623
- let A = 0, _ = 0, E = 0;
5624
- const N = /* @__PURE__ */ new Set(), we = [];
5623
+ let A = 0, _ = 0, v = 0;
5624
+ const N = /* @__PURE__ */ new Set(), be = [];
5625
5625
  for (const O of t.items) {
5626
5626
  if (!O.guid || Object.keys(O.attrs).length === 0) continue;
5627
5627
  if ((O.attrs.Layer ?? "") !== s) {
5628
- E++;
5628
+ v++;
5629
5629
  continue;
5630
5630
  }
5631
5631
  const q = Jr(O);
@@ -5635,8 +5635,8 @@ point's height.
5635
5635
  q[0] * d,
5636
5636
  q[1] * d,
5637
5637
  q[2] * d
5638
- ], be = c.get(O.guid);
5639
- be ? we.push({ instance: be, object: O.guid, position: X }) : (T.add(
5638
+ ], ve = c.get(O.guid);
5639
+ ve ? be.push({ instance: ve, object: O.guid, position: X }) : (T.add(
5640
5640
  {
5641
5641
  CategoryId: r.categoryId,
5642
5642
  Family: r.family,
@@ -5645,12 +5645,12 @@ point's height.
5645
5645
  { position: X, source: O.guid }
5646
5646
  ), A++);
5647
5647
  }
5648
- for (const O of we)
5648
+ for (const O of be)
5649
5649
  T.set(O.instance, {}, { position: O.position, source: O.object }), _++;
5650
- let H = 0;
5650
+ let G = 0;
5651
5651
  for (const [O, q] of c)
5652
- N.has(O) || (T.remove(q), H++);
5653
- const z = A + _ + H;
5652
+ N.has(O) || (T.remove(q), G++);
5653
+ const z = A + _ + G;
5654
5654
  if (z === 0)
5655
5655
  throw new Error(
5656
5656
  `Nothing to ask for: layer "${s}" of "${e.name}" has no placed object, and nothing of this recipe is left to remove.`
@@ -5659,7 +5659,7 @@ point's height.
5659
5659
  title: `From Rhino: ${[
5660
5660
  A ? `${A} new` : "",
5661
5661
  _ ? `${_} moved` : "",
5662
- H ? `${H} gone` : ""
5662
+ G ? `${G} gone` : ""
5663
5663
  ].filter(Boolean).join(", ")}`,
5664
5664
  verb: T.summary,
5665
5665
  targets: z,
@@ -5667,8 +5667,8 @@ point's height.
5667
5667
  ruleTallies: [
5668
5668
  { read: A, proposed: A },
5669
5669
  { read: _, proposed: _ },
5670
- { read: H, proposed: H },
5671
- { read: E, proposed: 0 }
5670
+ { read: G, proposed: G },
5671
+ { read: v, proposed: 0 }
5672
5672
  ]
5673
5673
  };
5674
5674
  }