@milaboratories/pl-middle-layer 1.23.6 → 1.23.8

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.mjs CHANGED
@@ -6,10 +6,10 @@ export * from "@platforma-sdk/model";
6
6
  import { AnyChannel as ke, StableChannel as ne, blockPackIdToString as Jt, blockPackIdEquals as Gt } from "@milaboratories/pl-model-middle-layer";
7
7
  export * from "@milaboratories/pl-model-middle-layer";
8
8
  import { request as ie, RetryAgent as Cs } from "undici";
9
- import { RegistryV1 as ue, tryLoadPackDescription as ht, BlockPackMetaEmbedAbsoluteBytes as ks, RegistryV2Reader as Ps, folderReaderByUrl as $s, loadPackDescription as Mt } from "@platforma-sdk/block-tools";
9
+ import { RegistryV1 as ue, tryLoadPackDescription as ht, BlockPackMetaEmbedAbsoluteBytes as ks, RegistryV2Reader as Ps, folderReaderByUrl as Os, loadPackDescription as Mt } from "@platforma-sdk/block-tools";
10
10
  import q from "node:fs";
11
11
  import H from "node:path";
12
- import Os from "yaml";
12
+ import $s from "yaml";
13
13
  import { assertNever as J, notEmpty as B, ConsoleLoggerAdapter as Is, ConcurrencyLimitingExecutor as Fs, HmacSha256Signer as Lr } from "@milaboratories/ts-helpers";
14
14
  import * as Nr from "node:fs/promises";
15
15
  import { tryResolve as Ts } from "@milaboratories/resolve-helper";
@@ -91,7 +91,7 @@ async function Ur(s) {
91
91
  }
92
92
  return e.toString();
93
93
  }
94
- async function $t(s) {
94
+ async function Ot(s) {
95
95
  const e = await q.promises.stat(s.components.workflow.main.file, {
96
96
  bigint: !0
97
97
  }), t = await q.promises.stat(s.components.model.file, { bigint: !0 });
@@ -162,7 +162,7 @@ class Vl {
162
162
  H.join(a, ue.PlPackageYamlConfigFile)
163
163
  );
164
164
  if (l !== void 0) {
165
- const u = ue.PlPackageConfigData.parse(Os.parse(l)), d = await Ur(a), m = {
165
+ const u = ue.PlPackageConfigData.parse($s.parse(l)), d = await Ur(a), m = {
166
166
  organization: u.organization,
167
167
  name: u.package,
168
168
  version: "DEV"
@@ -198,7 +198,7 @@ class Vl {
198
198
  if (u = H.join(a, m), d = await ht(u), d !== void 0) break;
199
199
  }
200
200
  if (d !== void 0) {
201
- const m = await $t(d), h = {
201
+ const m = await Ot(d), h = {
202
202
  id: d.id,
203
203
  meta: await ks.parseAsync(d.meta),
204
204
  spec: {
@@ -249,7 +249,7 @@ class go {
249
249
  getRegistry(e) {
250
250
  const t = this.registries.get(e);
251
251
  if (t) return t;
252
- const r = new Ps($s(e, this.http));
252
+ const r = new Ps(Os(e, this.http));
253
253
  return this.registries.set(e, r), r;
254
254
  }
255
255
  }
@@ -269,7 +269,7 @@ const Ul = {
269
269
  blocksInLimbo: []
270
270
  }, yo = {
271
271
  label: "New Project"
272
- }, wo = { name: "UserProject", version: "2" }, Jr = "SchemaVersion", Gr = "1", Ot = "ProjectCreated", Te = "ProjectLastModified", Ae = "ProjectMeta", de = "ProjectStructure", Ke = "BlockRenderingState", So = "BlockFrontendState/", bo = /^BlockFrontendState\/(?<blockid>.*)$/;
272
+ }, wo = { name: "UserProject", version: "2" }, Jr = "SchemaVersion", Gr = "1", $t = "ProjectCreated", Te = "ProjectLastModified", Ae = "ProjectMeta", de = "ProjectStructure", Ke = "BlockRenderingState", So = "BlockFrontendState/", bo = /^BlockFrontendState\/(?<blockid>.*)$/;
273
273
  function mt(s) {
274
274
  return `${So}${s}`;
275
275
  }
@@ -297,14 +297,14 @@ function Po(s) {
297
297
  const { blockId: t, fieldName: r } = e.groups;
298
298
  return { blockId: t, fieldName: r };
299
299
  }
300
- const $o = "projects", Mr = { name: "Projects", version: "1" }, Oo = (s) => ae(s.type, Mr) ? s.fields : [];
300
+ const Oo = "projects", Mr = { name: "Projects", version: "1" }, $o = (s) => ae(s.type, Mr) ? s.fields : [];
301
301
  async function Io(s, e, t, r) {
302
302
  const o = await Br.init(
303
303
  s,
304
304
  e,
305
305
  {
306
306
  ...r.ops.defaultTreeOptions,
307
- pruning: Oo
307
+ pruning: $o
308
308
  },
309
309
  r.logger
310
310
  );
@@ -315,7 +315,7 @@ async function Io(s, e, t, r) {
315
315
  for (const u of c.listDynamicFields()) {
316
316
  const d = c.traverse(u);
317
317
  if (d === void 0) continue;
318
- const m = B(d.getKeyValueAsJson(Ae)), h = B(d.getKeyValueAsJson(Ot)), f = B(d.getKeyValueAsJson(Te));
318
+ const m = B(d.getKeyValueAsJson(Ae)), h = B(d.getKeyValueAsJson($t)), f = B(d.getKeyValueAsJson(Te));
319
319
  l.push({
320
320
  id: u,
321
321
  rid: d.id,
@@ -567,7 +567,7 @@ class qo {
567
567
  ), o = await q.promises.readFile(
568
568
  t.components.workflow.main.file
569
569
  ), n = t.components.ui.folder, i = { ...e };
570
- return e.mtime === void 0 && (i.mtime = await $t(t)), {
570
+ return e.mtime === void 0 && (i.mtime = await Ot(t)), {
571
571
  type: "explicit",
572
572
  template: {
573
573
  type: "explicit",
@@ -1326,7 +1326,7 @@ async function sn(s, e = yo) {
1326
1326
  const t = s.createEphemeral(wo);
1327
1327
  s.lock(t);
1328
1328
  const r = String(Date.now());
1329
- s.setKValue(t, Jr, JSON.stringify(Gr)), s.setKValue(t, Ot, r), s.setKValue(t, Te, r), s.setKValue(t, Ae, JSON.stringify(e)), s.setKValue(t, de, JSON.stringify(mo)), s.setKValue(t, Ke, JSON.stringify(vo));
1329
+ s.setKValue(t, Jr, JSON.stringify(Gr)), s.setKValue(t, $t, r), s.setKValue(t, Te, r), s.setKValue(t, Ae, JSON.stringify(e)), s.setKValue(t, de, JSON.stringify(mo)), s.setKValue(t, Ke, JSON.stringify(vo));
1330
1330
  const o = await Zr();
1331
1331
  return s.createField(
1332
1332
  j(t, wt(o.hash)),
@@ -1829,7 +1829,7 @@ function vn(s, e) {
1829
1829
  for (const [r, o] of Object.entries(s)) t[r] = e(o);
1830
1830
  return t;
1831
1831
  }
1832
- function $e(s, e) {
1832
+ function Oe(s, e) {
1833
1833
  return s === void 0 ? void 0 : e(s);
1834
1834
  }
1835
1835
  function yn(s) {
@@ -1882,7 +1882,7 @@ function En(s, e) {
1882
1882
  return r === void 0 ? C(void 0) : () => ({
1883
1883
  type: "ScheduleSubroutine",
1884
1884
  subroutine: rs(r.length),
1885
- args: ts(r, (o) => $({ ...s, [e.itVar]: o }, e.mapping))
1885
+ args: ts(r, (o) => O({ ...s, [e.itVar]: o }, e.mapping))
1886
1886
  });
1887
1887
  };
1888
1888
  }
@@ -1900,7 +1900,7 @@ function Cn(s, e) {
1900
1900
  const o = {};
1901
1901
  for (const [n, i] of Object.entries(r)) {
1902
1902
  const c = { ...s, [e.itVar]: i };
1903
- o[n] = $(c, e.mapping);
1903
+ o[n] = O(c, e.mapping);
1904
1904
  }
1905
1905
  return () => ({
1906
1906
  type: "ScheduleSubroutine",
@@ -1912,10 +1912,10 @@ function Cn(s, e) {
1912
1912
  const kn = (s) => C(s), Pn = (s) => {
1913
1913
  const e = s.arg;
1914
1914
  return C(e === void 0 ? void 0 : e.length === 0);
1915
- }, $n = (s) => {
1915
+ }, On = (s) => {
1916
1916
  const e = s.operand;
1917
1917
  return C(e === void 0 ? void 0 : !e);
1918
- }, On = (s) => {
1918
+ }, $n = (s) => {
1919
1919
  const e = s.operand1, t = s.operand2;
1920
1920
  return C(e === void 0 || t === void 0 ? void 0 : e && t);
1921
1921
  }, In = (s) => {
@@ -1941,7 +1941,7 @@ function An(s, e) {
1941
1941
  if (a === void 0) i[c] = C(void 0);
1942
1942
  else {
1943
1943
  const l = { ...s, [e.itVar]: a.persist() };
1944
- i[c] = $(l, e.mapping);
1944
+ i[c] = O(l, e.mapping);
1945
1945
  }
1946
1946
  }
1947
1947
  return {
@@ -2030,7 +2030,7 @@ const Ln = (s) => C(s), Nn = (s) => {
2030
2030
  computable: t.logDriver.getLogHandle(e)
2031
2031
  });
2032
2032
  };
2033
- function $(s, e) {
2033
+ function O(s, e) {
2034
2034
  switch (e.type) {
2035
2035
  case "GetFromCtx":
2036
2036
  const t = s[e.variable];
@@ -2047,8 +2047,8 @@ function $(s, e) {
2047
2047
  type: "ScheduleSubroutine",
2048
2048
  subroutine: Tn,
2049
2049
  args: {
2050
- source: $(s, e.source),
2051
- field: $(s, e.field)
2050
+ source: O(s, e.source),
2051
+ field: O(s, e.field)
2052
2052
  }
2053
2053
  });
2054
2054
  case "MapArrayValues":
@@ -2056,7 +2056,7 @@ function $(s, e) {
2056
2056
  type: "ScheduleSubroutine",
2057
2057
  subroutine: En(s, e),
2058
2058
  args: {
2059
- source: $(s, e.source)
2059
+ source: O(s, e.source)
2060
2060
  }
2061
2061
  });
2062
2062
  case "MapRecordValues":
@@ -2064,27 +2064,27 @@ function $(s, e) {
2064
2064
  type: "ScheduleSubroutine",
2065
2065
  subroutine: Cn(s, e),
2066
2066
  args: {
2067
- source: $(s, e.source)
2067
+ source: O(s, e.source)
2068
2068
  }
2069
2069
  });
2070
2070
  case "MakeObject":
2071
2071
  return () => ({
2072
2072
  type: "ScheduleSubroutine",
2073
2073
  subroutine: Sn,
2074
- args: vn(e.template, (r) => $(s, r))
2074
+ args: vn(e.template, (r) => O(s, r))
2075
2075
  });
2076
2076
  case "MakeArray":
2077
2077
  return () => ({
2078
2078
  type: "ScheduleSubroutine",
2079
2079
  subroutine: rs(e.template.length),
2080
- args: ts(e.template, (r) => $(s, r))
2080
+ args: ts(e.template, (r) => O(s, r))
2081
2081
  });
2082
2082
  case "Flatten":
2083
2083
  return () => ({
2084
2084
  type: "ScheduleSubroutine",
2085
2085
  subroutine: bn,
2086
2086
  args: {
2087
- source: $(s, e.source)
2087
+ source: O(s, e.source)
2088
2088
  }
2089
2089
  });
2090
2090
  case "IsEmpty":
@@ -2092,24 +2092,24 @@ function $(s, e) {
2092
2092
  type: "ScheduleSubroutine",
2093
2093
  subroutine: Pn,
2094
2094
  args: {
2095
- arg: $(s, e.arg)
2095
+ arg: O(s, e.arg)
2096
2096
  }
2097
2097
  });
2098
2098
  case "Not":
2099
2099
  return () => ({
2100
2100
  type: "ScheduleSubroutine",
2101
- subroutine: $n,
2101
+ subroutine: On,
2102
2102
  args: {
2103
- operand: $(s, e.operand)
2103
+ operand: O(s, e.operand)
2104
2104
  }
2105
2105
  });
2106
2106
  case "And":
2107
2107
  return () => ({
2108
2108
  type: "ScheduleSubroutine",
2109
- subroutine: On,
2109
+ subroutine: $n,
2110
2110
  args: {
2111
- operand1: $(s, e.operand1),
2112
- operand2: $(s, e.operand2)
2111
+ operand1: O(s, e.operand1),
2112
+ operand2: O(s, e.operand2)
2113
2113
  }
2114
2114
  });
2115
2115
  case "Or":
@@ -2117,8 +2117,8 @@ function $(s, e) {
2117
2117
  type: "ScheduleSubroutine",
2118
2118
  subroutine: In,
2119
2119
  args: {
2120
- operand1: $(s, e.operand1),
2121
- operand2: $(s, e.operand2)
2120
+ operand1: O(s, e.operand1),
2121
+ operand2: O(s, e.operand2)
2122
2122
  }
2123
2123
  });
2124
2124
  case "MapResourceFields":
@@ -2126,7 +2126,7 @@ function $(s, e) {
2126
2126
  type: "ScheduleSubroutine",
2127
2127
  subroutine: An(s, e),
2128
2128
  args: {
2129
- source: $(s, e.source)
2129
+ source: O(s, e.source)
2130
2130
  }
2131
2131
  });
2132
2132
  case "GetResourceField":
@@ -2134,8 +2134,8 @@ function $(s, e) {
2134
2134
  type: "ScheduleSubroutine",
2135
2135
  subroutine: Rn,
2136
2136
  args: {
2137
- source: $(s, e.source),
2138
- field: $(s, e.field)
2137
+ source: O(s, e.source),
2138
+ field: O(s, e.field)
2139
2139
  }
2140
2140
  });
2141
2141
  case "GetResourceValueAsJson":
@@ -2143,7 +2143,7 @@ function $(s, e) {
2143
2143
  type: "ScheduleSubroutine",
2144
2144
  subroutine: Fn,
2145
2145
  args: {
2146
- source: $(s, e.source)
2146
+ source: O(s, e.source)
2147
2147
  }
2148
2148
  });
2149
2149
  case "GetBlobContent":
@@ -2151,7 +2151,7 @@ function $(s, e) {
2151
2151
  type: "ScheduleSubroutine",
2152
2152
  subroutine: Nn,
2153
2153
  args: {
2154
- source: $(s, e.source)
2154
+ source: O(s, e.source)
2155
2155
  }
2156
2156
  });
2157
2157
  case "GetBlobContentAsString":
@@ -2159,7 +2159,7 @@ function $(s, e) {
2159
2159
  type: "ScheduleSubroutine",
2160
2160
  subroutine: Dn,
2161
2161
  args: {
2162
- source: $(s, e.source)
2162
+ source: O(s, e.source)
2163
2163
  }
2164
2164
  });
2165
2165
  case "GetBlobContentAsJson":
@@ -2167,7 +2167,7 @@ function $(s, e) {
2167
2167
  type: "ScheduleSubroutine",
2168
2168
  subroutine: Bn,
2169
2169
  args: {
2170
- source: $(s, e.source)
2170
+ source: O(s, e.source)
2171
2171
  }
2172
2172
  });
2173
2173
  case "GetDownloadedBlobContent":
@@ -2175,7 +2175,7 @@ function $(s, e) {
2175
2175
  type: "ScheduleSubroutine",
2176
2176
  subroutine: jn,
2177
2177
  args: {
2178
- source: $(s, e.source)
2178
+ source: O(s, e.source)
2179
2179
  }
2180
2180
  });
2181
2181
  case "GetOnDemandBlobContent":
@@ -2183,7 +2183,7 @@ function $(s, e) {
2183
2183
  type: "ScheduleSubroutine",
2184
2184
  subroutine: xn,
2185
2185
  args: {
2186
- source: $(s, e.source)
2186
+ source: O(s, e.source)
2187
2187
  }
2188
2188
  });
2189
2189
  case "GetImportProgress":
@@ -2191,7 +2191,7 @@ function $(s, e) {
2191
2191
  type: "ScheduleSubroutine",
2192
2192
  subroutine: Vn,
2193
2193
  args: {
2194
- source: $(s, e.source)
2194
+ source: O(s, e.source)
2195
2195
  }
2196
2196
  });
2197
2197
  case "GetLastLogs":
@@ -2199,7 +2199,7 @@ function $(s, e) {
2199
2199
  type: "ScheduleSubroutine",
2200
2200
  subroutine: Un(e.lines),
2201
2201
  args: {
2202
- source: $(s, e.source)
2202
+ source: O(s, e.source)
2203
2203
  }
2204
2204
  });
2205
2205
  case "GetProgressLog":
@@ -2207,7 +2207,7 @@ function $(s, e) {
2207
2207
  type: "ScheduleSubroutine",
2208
2208
  subroutine: Jn(e.patternToSearch),
2209
2209
  args: {
2210
- source: $(s, e.source)
2210
+ source: O(s, e.source)
2211
2211
  }
2212
2212
  });
2213
2213
  case "GetLogHandle":
@@ -2215,7 +2215,7 @@ function $(s, e) {
2215
2215
  type: "ScheduleSubroutine",
2216
2216
  subroutine: Gn,
2217
2217
  args: {
2218
- source: $(s, e.source)
2218
+ source: O(s, e.source)
2219
2219
  }
2220
2220
  });
2221
2221
  default:
@@ -2314,7 +2314,7 @@ function ns(s, e, t, r = {}) {
2314
2314
  [
2315
2315
  {
2316
2316
  destination: Kn,
2317
- operation: $(e, t)
2317
+ operation: O(e, t)
2318
2318
  }
2319
2319
  ],
2320
2320
  !0
@@ -2821,7 +2821,7 @@ class ze {
2821
2821
  }
2822
2822
  }
2823
2823
  function qe(s, e) {
2824
- return $e(
2824
+ return Oe(
2825
2825
  s.traverse(
2826
2826
  {
2827
2827
  field: U(e, "blockPack"),
@@ -2864,7 +2864,7 @@ function qn(s, e, t, r, o, n = {}) {
2864
2864
  function Yn(s) {
2865
2865
  return Ar(s) ? s.isActive === !0 : wn(s);
2866
2866
  }
2867
- function Oe(s, e, t, r, o, n = {}) {
2867
+ function $e(s, e, t, r, o, n = {}) {
2868
2868
  if (Ar(t)) {
2869
2869
  if (r === void 0) throw new Error("No code bundle.");
2870
2870
  return qn(s, e, t, r, o, n);
@@ -2874,7 +2874,7 @@ function Zn(s, e, t) {
2874
2874
  return V.make(
2875
2875
  (r) => {
2876
2876
  var f, I, F, D, _, k, se, pe;
2877
- const o = r.accessor(s).node(), n = B(o.getKeyValueAsJson(Ot)), i = B(o.getKeyValueAsJson(Te)), c = B(o.getKeyValueAsJson(Ae)), a = B(o.getKeyValueAsJson(de)), l = B(
2877
+ const o = r.accessor(s).node(), n = B(o.getKeyValueAsJson($t)), i = B(o.getKeyValueAsJson(Te)), c = B(o.getKeyValueAsJson(Ae)), a = B(o.getKeyValueAsJson(de)), l = B(
2878
2878
  o.getKeyValueAsJson(Ke)
2879
2879
  ), u = /* @__PURE__ */ new Map();
2880
2880
  for (const { id: A } of te(a)) {
@@ -2915,38 +2915,38 @@ function Zn(s, e, t) {
2915
2915
  const K = B(u.get(A)), G = B(d.nodes.get(A));
2916
2916
  let x = "NotCalculated";
2917
2917
  K.prod !== void 0 && (m.has(A) ? x = "Limbo" : x = K.prod.finished ? "Done" : "Running");
2918
- const X = qe(o, A), { sections: he, title: v, inputsValid: p, sdkVersion: y } = $e(X, ({ bpId: O, cfg: L, info: N }) => {
2918
+ const X = qe(o, A), { sections: he, title: v, inputsValid: p, sdkVersion: y } = Oe(X, ({ bpId: $, cfg: L, info: N }) => {
2919
2919
  const re = Tt(s, A);
2920
2920
  return {
2921
- sections: Oe(
2921
+ sections: $e(
2922
2922
  t,
2923
2923
  re,
2924
2924
  L.sections,
2925
2925
  L.code,
2926
- O
2926
+ $
2927
2927
  ),
2928
- title: $e(
2928
+ title: Oe(
2929
2929
  L.title,
2930
- (vs) => Oe(
2930
+ (vs) => $e(
2931
2931
  t,
2932
2932
  re,
2933
2933
  vs,
2934
2934
  L.code,
2935
- O
2935
+ $
2936
2936
  )
2937
2937
  ),
2938
- inputsValid: Oe(
2938
+ inputsValid: $e(
2939
2939
  t,
2940
2940
  re,
2941
2941
  L.inputsValid,
2942
2942
  L.code,
2943
- O
2943
+ $
2944
2944
  ),
2945
2945
  sdkVersion: L.sdkVersion
2946
2946
  };
2947
- }) || {}, g = $e(
2947
+ }) || {}, g = Oe(
2948
2948
  X,
2949
- ({ info: O }) => t.blockUpdateWatcher.get(O.source)
2949
+ ({ info: $ }) => t.blockUpdateWatcher.get($.source)
2950
2950
  );
2951
2951
  return {
2952
2952
  id: A,
@@ -3060,10 +3060,10 @@ function ri(s, e, t) {
3060
3060
  return V.make(
3061
3061
  (r) => {
3062
3062
  const o = r.accessor(s).node(), n = es(s, e);
3063
- return $e(qe(o, e), ({ cfg: i, bpId: c }) => {
3063
+ return Oe(qe(o, e), ({ cfg: i, bpId: c }) => {
3064
3064
  const a = {};
3065
3065
  for (const [l, u] of Object.entries(i.outputs)) {
3066
- const d = Oe(t, n, u, i.code, c);
3066
+ const d = $e(t, n, u, i.code, c);
3067
3067
  a[l] = V.wrapError(d);
3068
3068
  }
3069
3069
  return a;
@@ -3083,7 +3083,7 @@ function si(s, e) {
3083
3083
  const u = es(r.persist(), i);
3084
3084
  for (const d of l)
3085
3085
  n.push(
3086
- V.wrapError(Oe(e, u, d, a.cfg.code, a.bpId))
3086
+ V.wrapError($e(e, u, d, a.cfg.code, a.bpId))
3087
3087
  );
3088
3088
  }
3089
3089
  return n;
@@ -3661,8 +3661,8 @@ const ki = we, Pi = (s, e) => {
3661
3661
  const t = ki(s.trim().replace(/^[=v]+/, ""), e);
3662
3662
  return t ? t.version : null;
3663
3663
  };
3664
- var $i = Pi;
3665
- const dr = M, Oi = (s, e, t, r, o) => {
3664
+ var Oi = Pi;
3665
+ const dr = M, $i = (s, e, t, r, o) => {
3666
3666
  typeof t == "string" && (o = r, r = t, t = void 0);
3667
3667
  try {
3668
3668
  return new dr(
@@ -3673,7 +3673,7 @@ const dr = M, Oi = (s, e, t, r, o) => {
3673
3673
  return null;
3674
3674
  }
3675
3675
  };
3676
- var Ii = Oi;
3676
+ var Ii = $i;
3677
3677
  const pr = we, Fi = (s, e) => {
3678
3678
  const t = pr(s, null, !0), r = pr(e, null, !0), o = t.compare(r);
3679
3679
  if (o === 0)
@@ -3770,7 +3770,7 @@ const Ea = M, Ca = we, { safeRe: Je, t: Ge } = De, ka = (s, e) => {
3770
3770
  return Ca(`${r}.${o}.${n}${i}${c}`, e);
3771
3771
  };
3772
3772
  var Pa = ka;
3773
- class $a {
3773
+ class Oa {
3774
3774
  constructor() {
3775
3775
  this.max = 1e3, this.map = /* @__PURE__ */ new Map();
3776
3776
  }
@@ -3793,7 +3793,7 @@ class $a {
3793
3793
  return this;
3794
3794
  }
3795
3795
  }
3796
- var Oa = $a, it, gr;
3796
+ var $a = Oa, it, gr;
3797
3797
  function Z() {
3798
3798
  if (gr) return it;
3799
3799
  gr = 1;
@@ -3846,8 +3846,8 @@ function Z() {
3846
3846
  p = p.replace(R, X(this.options.includePrerelease)), i("hyphen replace", p), p = p.replace(a[l.COMPARATORTRIM], u), i("comparator trim", p), p = p.replace(a[l.TILDETRIM], d), i("tilde trim", p), p = p.replace(a[l.CARETTRIM], m), i("caret trim", p);
3847
3847
  let P = p.split(" ").map((N) => _(N, this.options)).join(" ").split(/\s+/).map((N) => x(N, this.options));
3848
3848
  w && (P = P.filter((N) => (i("loose invalid filter", N, this.options), !!N.match(a[l.COMPARATORLOOSE])))), i("range list", P);
3849
- const E = /* @__PURE__ */ new Map(), O = P.map((N) => new n(N, this.options));
3850
- for (const N of O) {
3849
+ const E = /* @__PURE__ */ new Map(), $ = P.map((N) => new n(N, this.options));
3850
+ for (const N of $) {
3851
3851
  if (I(N))
3852
3852
  return [N];
3853
3853
  E.set(N.value, N);
@@ -3878,7 +3878,7 @@ function Z() {
3878
3878
  }
3879
3879
  }
3880
3880
  it = e;
3881
- const t = Oa, r = new t(), o = Lt, n = et(), i = Ze, c = M, {
3881
+ const t = $a, r = new t(), o = Lt, n = et(), i = Ze, c = M, {
3882
3882
  safeRe: a,
3883
3883
  t: l,
3884
3884
  comparatorTrimReplace: u,
@@ -3903,18 +3903,18 @@ function Z() {
3903
3903
  const y = p.loose ? a[l.CARETLOOSE] : a[l.CARET], g = p.includePrerelease ? "-0" : "";
3904
3904
  return v.replace(y, (b, w, R, P, E) => {
3905
3905
  i("caret", v, b, w, R, P, E);
3906
- let O;
3907
- return k(w) ? O = "" : k(R) ? O = `>=${w}.0.0${g} <${+w + 1}.0.0-0` : k(P) ? w === "0" ? O = `>=${w}.${R}.0${g} <${w}.${+R + 1}.0-0` : O = `>=${w}.${R}.0${g} <${+w + 1}.0.0-0` : E ? (i("replaceCaret pr", E), w === "0" ? R === "0" ? O = `>=${w}.${R}.${P}-${E} <${w}.${R}.${+P + 1}-0` : O = `>=${w}.${R}.${P}-${E} <${w}.${+R + 1}.0-0` : O = `>=${w}.${R}.${P}-${E} <${+w + 1}.0.0-0`) : (i("no pr"), w === "0" ? R === "0" ? O = `>=${w}.${R}.${P}${g} <${w}.${R}.${+P + 1}-0` : O = `>=${w}.${R}.${P}${g} <${w}.${+R + 1}.0-0` : O = `>=${w}.${R}.${P} <${+w + 1}.0.0-0`), i("caret return", O), O;
3906
+ let $;
3907
+ return k(w) ? $ = "" : k(R) ? $ = `>=${w}.0.0${g} <${+w + 1}.0.0-0` : k(P) ? w === "0" ? $ = `>=${w}.${R}.0${g} <${w}.${+R + 1}.0-0` : $ = `>=${w}.${R}.0${g} <${+w + 1}.0.0-0` : E ? (i("replaceCaret pr", E), w === "0" ? R === "0" ? $ = `>=${w}.${R}.${P}-${E} <${w}.${R}.${+P + 1}-0` : $ = `>=${w}.${R}.${P}-${E} <${w}.${+R + 1}.0-0` : $ = `>=${w}.${R}.${P}-${E} <${+w + 1}.0.0-0`) : (i("no pr"), w === "0" ? R === "0" ? $ = `>=${w}.${R}.${P}${g} <${w}.${R}.${+P + 1}-0` : $ = `>=${w}.${R}.${P}${g} <${w}.${+R + 1}.0-0` : $ = `>=${w}.${R}.${P} <${+w + 1}.0.0-0`), i("caret return", $), $;
3908
3908
  });
3909
3909
  }, oe = (v, p) => (i("replaceXRanges", v, p), v.split(/\s+/).map((y) => K(y, p)).join(" ")), K = (v, p) => {
3910
3910
  v = v.trim();
3911
3911
  const y = p.loose ? a[l.XRANGELOOSE] : a[l.XRANGE];
3912
3912
  return v.replace(y, (g, b, w, R, P, E) => {
3913
3913
  i("xRange", v, g, b, w, R, P, E);
3914
- const O = k(w), L = O || k(R), N = L || k(P), re = N;
3915
- return b === "=" && re && (b = ""), E = p.includePrerelease ? "-0" : "", O ? b === ">" || b === "<" ? g = "<0.0.0-0" : g = "*" : b && re ? (L && (R = 0), P = 0, b === ">" ? (b = ">=", L ? (w = +w + 1, R = 0, P = 0) : (R = +R + 1, P = 0)) : b === "<=" && (b = "<", L ? w = +w + 1 : R = +R + 1), b === "<" && (E = "-0"), g = `${b + w}.${R}.${P}${E}`) : L ? g = `>=${w}.0.0${E} <${+w + 1}.0.0-0` : N && (g = `>=${w}.${R}.0${E} <${w}.${+R + 1}.0-0`), i("xRange return", g), g;
3914
+ const $ = k(w), L = $ || k(R), N = L || k(P), re = N;
3915
+ return b === "=" && re && (b = ""), E = p.includePrerelease ? "-0" : "", $ ? b === ">" || b === "<" ? g = "<0.0.0-0" : g = "*" : b && re ? (L && (R = 0), P = 0, b === ">" ? (b = ">=", L ? (w = +w + 1, R = 0, P = 0) : (R = +R + 1, P = 0)) : b === "<=" && (b = "<", L ? w = +w + 1 : R = +R + 1), b === "<" && (E = "-0"), g = `${b + w}.${R}.${P}${E}`) : L ? g = `>=${w}.0.0${E} <${+w + 1}.0.0-0` : N && (g = `>=${w}.${R}.0${E} <${w}.${+R + 1}.0-0`), i("xRange return", g), g;
3916
3916
  });
3917
- }, G = (v, p) => (i("replaceStars", v, p), v.trim().replace(a[l.STAR], "")), x = (v, p) => (i("replaceGTE0", v, p), v.trim().replace(a[p.includePrerelease ? l.GTE0PRE : l.GTE0], "")), X = (v) => (p, y, g, b, w, R, P, E, O, L, N, re) => (k(g) ? y = "" : k(b) ? y = `>=${g}.0.0${v ? "-0" : ""}` : k(w) ? y = `>=${g}.${b}.0${v ? "-0" : ""}` : R ? y = `>=${y}` : y = `>=${y}${v ? "-0" : ""}`, k(O) ? E = "" : k(L) ? E = `<${+O + 1}.0.0-0` : k(N) ? E = `<${O}.${+L + 1}.0-0` : re ? E = `<=${O}.${L}.${N}-${re}` : v ? E = `<${O}.${L}.${+N + 1}-0` : E = `<=${E}`, `${y} ${E}`.trim()), he = (v, p, y) => {
3917
+ }, G = (v, p) => (i("replaceStars", v, p), v.trim().replace(a[l.STAR], "")), x = (v, p) => (i("replaceGTE0", v, p), v.trim().replace(a[p.includePrerelease ? l.GTE0PRE : l.GTE0], "")), X = (v) => (p, y, g, b, w, R, P, E, $, L, N, re) => (k(g) ? y = "" : k(b) ? y = `>=${g}.0.0${v ? "-0" : ""}` : k(w) ? y = `>=${g}.${b}.0${v ? "-0" : ""}` : R ? y = `>=${y}` : y = `>=${y}${v ? "-0" : ""}`, k($) ? E = "" : k(L) ? E = `<${+$ + 1}.0.0-0` : k(N) ? E = `<${$}.${+L + 1}.0-0` : re ? E = `<=${$}.${L}.${N}-${re}` : v ? E = `<${$}.${L}.${+N + 1}-0` : E = `<=${E}`, `${y} ${E}`.trim()), he = (v, p, y) => {
3918
3918
  for (let g = 0; g < v.length; g++)
3919
3919
  if (!v[g].test(p))
3920
3920
  return !1;
@@ -4180,7 +4180,7 @@ const br = Z(), Vt = et(), { ANY: lt } = Vt, be = tt, Ut = Y, pc = (s, e, t = {}
4180
4180
  return r < 0 ? s : r > 0 || e.operator === "<" && s.operator === "<=" ? e : s;
4181
4181
  };
4182
4182
  var gc = pc;
4183
- const ut = De, kr = Ye, mc = M, Pr = ds, vc = we, yc = Ci, wc = $i, Sc = Ii, bc = Ti, Rc = Ni, Ec = ji, Cc = Ui, kc = Mi, Pc = Y, $c = Wi, Oc = qi, Ic = Nt, Fc = ea, Tc = sa, Ac = Qe, Lc = Dt, Nc = ps, Dc = hs, Bc = Bt, jc = jt, xc = fs, Vc = Pa, Uc = et(), Jc = Z(), Gc = tt, Mc = La, _c = ja, Kc = Ja, Hc = _a, Wc = Wa, zc = xt, Xc = sc, qc = ic, Yc = cc, Zc = dc, Qc = gc;
4183
+ const ut = De, kr = Ye, mc = M, Pr = ds, vc = we, yc = Ci, wc = Oi, Sc = Ii, bc = Ti, Rc = Ni, Ec = ji, Cc = Ui, kc = Mi, Pc = Y, Oc = Wi, $c = qi, Ic = Nt, Fc = ea, Tc = sa, Ac = Qe, Lc = Dt, Nc = ps, Dc = hs, Bc = Bt, jc = jt, xc = fs, Vc = Pa, Uc = et(), Jc = Z(), Gc = tt, Mc = La, _c = ja, Kc = Ja, Hc = _a, Wc = Wa, zc = xt, Xc = sc, qc = ic, Yc = cc, Zc = dc, Qc = gc;
4184
4184
  var el = {
4185
4185
  parse: vc,
4186
4186
  valid: yc,
@@ -4192,8 +4192,8 @@ var el = {
4192
4192
  patch: Cc,
4193
4193
  prerelease: kc,
4194
4194
  compare: Pc,
4195
- rcompare: $c,
4196
- compareLoose: Oc,
4195
+ rcompare: Oc,
4196
+ compareLoose: $c,
4197
4197
  compareBuild: Ic,
4198
4198
  sort: Fc,
4199
4199
  rsort: Tc,
@@ -4265,7 +4265,7 @@ class ol extends Gs {
4265
4265
  try {
4266
4266
  const r = await ht(t.folder, this.logger);
4267
4267
  if (r === void 0) return;
4268
- const o = await $t(r);
4268
+ const o = await Ot(r);
4269
4269
  return o === t.mtime ? void 0 : { ...t, mtime: o };
4270
4270
  } catch (r) {
4271
4271
  this.logger.warn(r);
@@ -4333,7 +4333,7 @@ class ol extends Gs {
4333
4333
  }
4334
4334
  }
4335
4335
  }
4336
- class $r {
4336
+ class Or {
4337
4337
  constructor() {
4338
4338
  S(this, "resources", /* @__PURE__ */ new Map());
4339
4339
  }
@@ -4374,7 +4374,7 @@ function ve() {
4374
4374
  logPFrameRequests: process.env.MI_LOG_PFRAMES !== void 0
4375
4375
  }, process.env.MI_LOG_TREE_STAT && (Re.logTreeStats = process.env.MI_LOG_TREE_STAT === "cumulative" ? "cumulative" : "per-request"), Re);
4376
4376
  }
4377
- function Or(s) {
4377
+ function $r(s) {
4378
4378
  return String(s.id);
4379
4379
  }
4380
4380
  const nl = ["Int", "Long", "Float", "Double", "String", "Bytes"];
@@ -4395,8 +4395,8 @@ function dt(s) {
4395
4395
  }
4396
4396
  const Ee = (s, e) => typeof e == "bigint" ? e.toString() : e;
4397
4397
  class il {
4398
- constructor(e, t, r) {
4399
- S(this, "pFrame", new oo());
4398
+ constructor(e, t, r, o) {
4399
+ S(this, "pFrame");
4400
4400
  S(this, "blobIdToResource", /* @__PURE__ */ new Map());
4401
4401
  S(this, "blobHandleComputables", /* @__PURE__ */ new Map());
4402
4402
  S(this, "preloadBlob", async (e) => {
@@ -4416,15 +4416,27 @@ class il {
4416
4416
  throw console.log(`resolveBlobContent catched error: ${r}`), t;
4417
4417
  }
4418
4418
  });
4419
- this.blobDriver = e, this.blobContentCache = t, this.columns = r, this.pFrame.setDataSource(this);
4420
- for (const o of r) {
4421
- for (const i of on(o.data)) this.blobIdToResource.set(Or(i), i);
4422
- const n = nn(o.data, Or);
4419
+ this.blobDriver = e, this.logger = t, this.blobContentCache = r, this.columns = o, this.pFrame = new oo(
4420
+ (n, i) => {
4421
+ switch (n) {
4422
+ default:
4423
+ case "info":
4424
+ return this.logger.info(i);
4425
+ case "warn":
4426
+ return this.logger.warn(i);
4427
+ case "error":
4428
+ return this.logger.error(i);
4429
+ }
4430
+ }
4431
+ ), this.pFrame.setDataSource(this);
4432
+ for (const n of o) {
4433
+ for (const c of on(n.data)) this.blobIdToResource.set($r(c), c);
4434
+ const i = nn(n.data, $r);
4423
4435
  try {
4424
- this.pFrame.addColumnSpec(o.id, o.spec), this.pFrame.setColumnData(o.id, n);
4425
- } catch (i) {
4436
+ this.pFrame.addColumnSpec(n.id, n.spec), this.pFrame.setColumnData(n.id, i);
4437
+ } catch (c) {
4426
4438
  throw new Error(
4427
- `Adding column ${o.id} to PFrame failed: ${i}; Spec: ${o.spec}, DataInfo: ${n}.`
4439
+ `Adding column ${n.id} to PFrame failed: ${c}; Spec: ${JSON.stringify(n.spec)}, DataInfo: ${JSON.stringify(i)}.`
4428
4440
  );
4429
4441
  }
4430
4442
  }
@@ -4455,19 +4467,19 @@ class al {
4455
4467
  fetchMethod: async (n) => await Nr.readFile(n),
4456
4468
  sizeCalculation: (n) => n.length
4457
4469
  }), o = new Fs(1);
4458
- this.blobContentCache = r, this.concurrencyLimiter = o, this.pFrames = new class extends $r {
4459
- constructor(n) {
4460
- super(), this.blobDriver = n;
4470
+ this.blobContentCache = r, this.concurrencyLimiter = o, this.pFrames = new class extends Or {
4471
+ constructor(n, i) {
4472
+ super(), this.blobDriver = n, this.logger = i;
4461
4473
  }
4462
4474
  createNewResource(n) {
4463
4475
  return ve().logPFrameRequests && t.info(
4464
4476
  `PFrame creation (pFrameHandle = ${this.calculateParamsKey(n)}): ${JSON.stringify(n, Ee)}`
4465
- ), new il(this.blobDriver, r, n);
4477
+ ), new il(this.blobDriver, this.logger, r, n);
4466
4478
  }
4467
4479
  calculateParamsKey(n) {
4468
4480
  return ll(n);
4469
4481
  }
4470
- }(this.blobDriver), this.pTables = new class extends $r {
4482
+ }(this.blobDriver, this.logger), this.pTables = new class extends Or {
4471
4483
  constructor(n) {
4472
4484
  super(), this.pFrames = n;
4473
4485
  }
@@ -4500,7 +4512,7 @@ class al {
4500
4512
  createPTable(e, t) {
4501
4513
  const r = this.createPFrame(Es(e.src), t), o = pt(e, (i) => i.id), n = this.pTables.acquire({ def: o, pFrameHandle: r });
4502
4514
  return ve().logPFrameRequests && this.logger.info(
4503
- `Create PTable call (pFrameHandle = ${r}; pTableHandle = ${n}): ${JSON.stringify(
4515
+ `Create PTable call (pFrameHandle = ${r}; pTableHandle = ${JSON.stringify(n)}): ${JSON.stringify(
4504
4516
  pt(e, (i) => i.spec),
4505
4517
  Ee
4506
4518
  )}`
@@ -4776,7 +4788,7 @@ class ms {
4776
4788
  };
4777
4789
  o.defaultTreeOptions.logStat = ve().logTreeStats;
4778
4790
  const n = await e.withWriteTx("MLInitialization", async (I) => {
4779
- const F = j(I.clientRoot, $o);
4791
+ const F = j(I.clientRoot, Oo);
4780
4792
  I.createField(F, "Dynamic");
4781
4793
  const D = await I.getField(F);
4782
4794
  if (_e(D.value)) {
@@ -5056,7 +5068,7 @@ export {
5056
5068
  Wl as checkNetwork,
5057
5069
  _r as createRenderTemplate,
5058
5070
  Ur as getDevV1PacketMtime,
5059
- $t as getDevV2PacketMtime,
5071
+ Ot as getDevV2PacketMtime,
5060
5072
  ul as initDriverKit,
5061
5073
  It as loadTemplate,
5062
5074
  Ho as prepareTemplateSpec