@milaboratories/pl-drivers 1.3.3 → 1.3.4

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
@@ -86,26 +86,26 @@ class pt extends g {
86
86
  return t.resourceId = 0n, e !== void 0 && f(this, t, e), t;
87
87
  }
88
88
  internalBinaryRead(e, t, n, r) {
89
- let o = r ?? this.create(), c = e.pos + t;
90
- for (; e.pos < c; ) {
91
- let [i, l] = e.tag();
89
+ let o = r ?? this.create(), a = e.pos + t;
90
+ for (; e.pos < a; ) {
91
+ let [i, c] = e.tag();
92
92
  switch (i) {
93
93
  case /* uint64 resource_id */
94
94
  1:
95
95
  o.resourceId = e.uint64().toBigInt();
96
96
  break;
97
97
  default:
98
- let a = n.readUnknownField;
99
- if (a === "throw")
98
+ let l = n.readUnknownField;
99
+ if (l === "throw")
100
100
  throw new globalThis.Error(
101
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
101
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
102
102
  );
103
- let p = e.skip(l);
104
- a !== !1 && (a === !0 ? u.onRead : a)(
103
+ let p = e.skip(c);
104
+ l !== !1 && (l === !0 ? u.onRead : l)(
105
105
  this.typeName,
106
106
  o,
107
107
  i,
108
- l,
108
+ c,
109
109
  p
110
110
  );
111
111
  }
@@ -150,9 +150,9 @@ class ft extends g {
150
150
  return t.partsCount = 0n, t.uploadedParts = [], e !== void 0 && f(this, t, e), t;
151
151
  }
152
152
  internalBinaryRead(e, t, n, r) {
153
- let o = r ?? this.create(), c = e.pos + t;
154
- for (; e.pos < c; ) {
155
- let [i, l] = e.tag();
153
+ let o = r ?? this.create(), a = e.pos + t;
154
+ for (; e.pos < a; ) {
155
+ let [i, c] = e.tag();
156
156
  switch (i) {
157
157
  case /* uint64 parts_count */
158
158
  1:
@@ -160,23 +160,23 @@ class ft extends g {
160
160
  break;
161
161
  case /* repeated uint64 uploaded_parts */
162
162
  2:
163
- if (l === h.LengthDelimited)
163
+ if (c === h.LengthDelimited)
164
164
  for (let P = e.int32() + e.pos; e.pos < P; )
165
165
  o.uploadedParts.push(e.uint64().toBigInt());
166
166
  else o.uploadedParts.push(e.uint64().toBigInt());
167
167
  break;
168
168
  default:
169
- let a = n.readUnknownField;
170
- if (a === "throw")
169
+ let l = n.readUnknownField;
170
+ if (l === "throw")
171
171
  throw new globalThis.Error(
172
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
172
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
173
173
  );
174
- let p = e.skip(l);
175
- a !== !1 && (a === !0 ? u.onRead : a)(
174
+ let p = e.skip(c);
175
+ l !== !1 && (l === !0 ? u.onRead : l)(
176
176
  this.typeName,
177
177
  o,
178
178
  i,
179
- l,
179
+ c,
180
180
  p
181
181
  );
182
182
  }
@@ -250,9 +250,9 @@ class yt extends g {
250
250
  ), t;
251
251
  }
252
252
  internalBinaryRead(e, t, n, r) {
253
- let o = r ?? this.create(), c = e.pos + t;
254
- for (; e.pos < c; ) {
255
- let [i, l] = e.tag();
253
+ let o = r ?? this.create(), a = e.pos + t;
254
+ for (; e.pos < a; ) {
255
+ let [i, c] = e.tag();
256
256
  switch (i) {
257
257
  case /* uint64 resource_id */
258
258
  1:
@@ -263,17 +263,17 @@ class yt extends g {
263
263
  o.bytesProcessed = e.int64().toBigInt();
264
264
  break;
265
265
  default:
266
- let a = n.readUnknownField;
267
- if (a === "throw")
266
+ let l = n.readUnknownField;
267
+ if (l === "throw")
268
268
  throw new globalThis.Error(
269
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
269
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
270
270
  );
271
- let p = e.skip(l);
272
- a !== !1 && (a === !0 ? u.onRead : a)(
271
+ let p = e.skip(c);
272
+ l !== !1 && (l === !0 ? u.onRead : l)(
273
273
  this.typeName,
274
274
  o,
275
275
  i,
276
- l,
276
+ c,
277
277
  p
278
278
  );
279
279
  }
@@ -378,9 +378,9 @@ class Pt extends g {
378
378
  ), t;
379
379
  }
380
380
  internalBinaryRead(e, t, n, r) {
381
- let o = r ?? this.create(), c = e.pos + t;
382
- for (; e.pos < c; ) {
383
- let [i, l] = e.tag();
381
+ let o = r ?? this.create(), a = e.pos + t;
382
+ for (; e.pos < a; ) {
383
+ let [i, c] = e.tag();
384
384
  switch (i) {
385
385
  case /* uint64 resource_id */
386
386
  1:
@@ -395,17 +395,17 @@ class Pt extends g {
395
395
  o.uploadedPartSize = e.uint64().toBigInt();
396
396
  break;
397
397
  default:
398
- let a = n.readUnknownField;
399
- if (a === "throw")
398
+ let l = n.readUnknownField;
399
+ if (l === "throw")
400
400
  throw new globalThis.Error(
401
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
401
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
402
402
  );
403
- let p = e.skip(l);
404
- a !== !1 && (a === !0 ? u.onRead : a)(
403
+ let p = e.skip(c);
404
+ l !== !1 && (l === !0 ? u.onRead : l)(
405
405
  this.typeName,
406
406
  o,
407
407
  i,
408
- l,
408
+ c,
409
409
  p
410
410
  );
411
411
  }
@@ -453,9 +453,9 @@ class Rt extends g {
453
453
  ), t;
454
454
  }
455
455
  internalBinaryRead(e, t, n, r) {
456
- let o = r ?? this.create(), c = e.pos + t;
457
- for (; e.pos < c; ) {
458
- let [i, l] = e.tag();
456
+ let o = r ?? this.create(), a = e.pos + t;
457
+ for (; e.pos < a; ) {
458
+ let [i, c] = e.tag();
459
459
  switch (i) {
460
460
  case /* string Name = 1 [json_name = "Name"];*/
461
461
  1:
@@ -466,17 +466,17 @@ class Rt extends g {
466
466
  o.value = e.string();
467
467
  break;
468
468
  default:
469
- let a = n.readUnknownField;
470
- if (a === "throw")
469
+ let l = n.readUnknownField;
470
+ if (l === "throw")
471
471
  throw new globalThis.Error(
472
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
472
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
473
473
  );
474
- let p = e.skip(l);
475
- a !== !1 && (a === !0 ? u.onRead : a)(
474
+ let p = e.skip(c);
475
+ l !== !1 && (l === !0 ? u.onRead : l)(
476
476
  this.typeName,
477
477
  o,
478
478
  i,
479
- l,
479
+ c,
480
480
  p
481
481
  );
482
482
  }
@@ -545,9 +545,9 @@ class St extends g {
545
545
  ), t;
546
546
  }
547
547
  internalBinaryRead(e, t, n, r) {
548
- let o = r ?? this.create(), c = e.pos + t;
549
- for (; e.pos < c; ) {
550
- let [i, l] = e.tag();
548
+ let o = r ?? this.create(), a = e.pos + t;
549
+ for (; e.pos < a; ) {
550
+ let [i, c] = e.tag();
551
551
  switch (i) {
552
552
  case /* string upload_url */
553
553
  1:
@@ -576,17 +576,17 @@ class St extends g {
576
576
  o.chunkEnd = e.uint64().toBigInt();
577
577
  break;
578
578
  default:
579
- let a = n.readUnknownField;
580
- if (a === "throw")
579
+ let l = n.readUnknownField;
580
+ if (l === "throw")
581
581
  throw new globalThis.Error(
582
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
582
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
583
583
  );
584
- let p = e.skip(l);
585
- a !== !1 && (a === !0 ? u.onRead : a)(
584
+ let p = e.skip(c);
585
+ l !== !1 && (l === !0 ? u.onRead : l)(
586
586
  this.typeName,
587
587
  o,
588
588
  i,
589
- l,
589
+ c,
590
590
  p
591
591
  );
592
592
  }
@@ -650,26 +650,26 @@ class Bt extends g {
650
650
  return t.resourceId = 0n, e !== void 0 && f(this, t, e), t;
651
651
  }
652
652
  internalBinaryRead(e, t, n, r) {
653
- let o = r ?? this.create(), c = e.pos + t;
654
- for (; e.pos < c; ) {
655
- let [i, l] = e.tag();
653
+ let o = r ?? this.create(), a = e.pos + t;
654
+ for (; e.pos < a; ) {
655
+ let [i, c] = e.tag();
656
656
  switch (i) {
657
657
  case /* uint64 resource_id */
658
658
  1:
659
659
  o.resourceId = e.uint64().toBigInt();
660
660
  break;
661
661
  default:
662
- let a = n.readUnknownField;
663
- if (a === "throw")
662
+ let l = n.readUnknownField;
663
+ if (l === "throw")
664
664
  throw new globalThis.Error(
665
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
665
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
666
666
  );
667
- let p = e.skip(l);
668
- a !== !1 && (a === !0 ? u.onRead : a)(
667
+ let p = e.skip(c);
668
+ l !== !1 && (l === !0 ? u.onRead : l)(
669
669
  this.typeName,
670
670
  o,
671
671
  i,
672
- l,
672
+ c,
673
673
  p
674
674
  );
675
675
  }
@@ -816,8 +816,8 @@ class Ot {
816
816
  const r = await this.grpcClient.init({ resourceId: e }, k(t, n));
817
817
  return this.partsToUpload(r.response);
818
818
  }
819
- async partUpload({ id: e, type: t }, n, r, o, c, i) {
820
- const l = await this.grpcClient.getPartURL(
819
+ async partUpload({ id: e, type: t }, n, r, o, a, i) {
820
+ const c = await this.grpcClient.getPartURL(
821
821
  {
822
822
  resourceId: e,
823
823
  partNumber: r,
@@ -825,22 +825,22 @@ class Ot {
825
825
  // we update progress as a separate call later.
826
826
  },
827
827
  k(t, i)
828
- ).response, { chunk: a, mTime: p } = await this.readChunk(n, l.chunkStart, l.chunkEnd);
829
- if (p > c)
828
+ ).response, { chunk: l, mTime: p } = await this.readChunk(n, c.chunkStart, c.chunkEnd);
829
+ if (p > a)
830
830
  throw new Pe(
831
- "file was modified, expected mtime: " + c + ", got: " + p + "."
831
+ "file was modified, expected mtime: " + a + ", got: " + p + "."
832
832
  );
833
- const P = await Te(l.uploadUrl, this.prepareUploadOpts(l, a)), le = await P.body.text();
833
+ const P = await Te(c.uploadUrl, this.prepareUploadOpts(c, l)), le = await P.body.text();
834
834
  if (this.logger.info(
835
835
  `uploaded chunk ${r} from ${o} of resource: ${e}, response: '${le.toString()}', status code: ${P.statusCode}`
836
836
  ), P.statusCode != 200)
837
837
  throw new Ct(
838
- `response is not ok, status code: ${P.statusCode}, body: ${le}, headers: ${P.headers}, url: ${l.uploadUrl}`
838
+ `response is not ok, status code: ${P.statusCode}, body: ${le}, headers: ${P.headers}, url: ${c.uploadUrl}`
839
839
  );
840
840
  await this.grpcClient.updateProgress(
841
841
  {
842
842
  resourceId: e,
843
- bytesProcessed: l.chunkEnd - l.chunkStart
843
+ bytesProcessed: c.chunkEnd - c.chunkStart
844
844
  },
845
845
  k(t, i)
846
846
  );
@@ -852,10 +852,10 @@ class Ot {
852
852
  let r;
853
853
  try {
854
854
  r = await m.open(e);
855
- const o = Number(n - t), c = Number(t), i = Buffer.alloc(o), l = await this.readBytesFromPosition(r, i, o, c), a = await m.stat(e);
855
+ const o = Number(n - t), a = Number(t), i = Buffer.alloc(o), c = await this.readBytesFromPosition(r, i, o, a), l = await m.stat(e);
856
856
  return {
857
- chunk: i.subarray(0, l),
858
- mTime: BigInt(Math.floor(a.mtimeMs / 1e3))
857
+ chunk: i.subarray(0, c),
858
+ mTime: BigInt(Math.floor(l.mtimeMs / 1e3))
859
859
  };
860
860
  } catch (o) {
861
861
  throw o.code == "ENOENT" ? new Re(`there is no file ${e} for uploading`) : o;
@@ -868,15 +868,15 @@ class Ot {
868
868
  async readBytesFromPosition(e, t, n, r) {
869
869
  let o = 0;
870
870
  for (; o < n; ) {
871
- const { bytesRead: c } = await e.read(
871
+ const { bytesRead: a } = await e.read(
872
872
  t,
873
873
  o,
874
874
  n - o,
875
875
  r + o
876
876
  );
877
- if (c === 0)
877
+ if (a === 0)
878
878
  throw new Ie("file ended earlier than expected.");
879
- o += c;
879
+ o += a;
880
880
  }
881
881
  return o;
882
882
  }
@@ -946,14 +946,14 @@ class Ft extends g {
946
946
  "Unable to parse Duration from JSON string. Invalid format."
947
947
  );
948
948
  n || (n = this.create());
949
- let [, o, c, i] = r, l = I.from(o + c);
950
- if (l.toNumber() > 315576e6 || l.toNumber() < -315576e6)
949
+ let [, o, a, i] = r, c = I.from(o + a);
950
+ if (c.toNumber() > 315576e6 || c.toNumber() < -315576e6)
951
951
  throw new Error(
952
952
  "Unable to parse Duration from JSON string. Value out of range."
953
953
  );
954
- if (n.seconds = l.toBigInt(), typeof i == "string") {
955
- let a = o + i + "0".repeat(9 - i.length);
956
- n.nanos = parseInt(a);
954
+ if (n.seconds = c.toBigInt(), typeof i == "string") {
955
+ let l = o + i + "0".repeat(9 - i.length);
956
+ n.nanos = parseInt(l);
957
957
  }
958
958
  return n;
959
959
  }
@@ -962,9 +962,9 @@ class Ft extends g {
962
962
  return t.seconds = 0n, t.nanos = 0, e !== void 0 && f(this, t, e), t;
963
963
  }
964
964
  internalBinaryRead(e, t, n, r) {
965
- let o = r ?? this.create(), c = e.pos + t;
966
- for (; e.pos < c; ) {
967
- let [i, l] = e.tag();
965
+ let o = r ?? this.create(), a = e.pos + t;
966
+ for (; e.pos < a; ) {
967
+ let [i, c] = e.tag();
968
968
  switch (i) {
969
969
  case /* int64 seconds */
970
970
  1:
@@ -975,17 +975,17 @@ class Ft extends g {
975
975
  o.nanos = e.int32();
976
976
  break;
977
977
  default:
978
- let a = n.readUnknownField;
979
- if (a === "throw")
978
+ let l = n.readUnknownField;
979
+ if (l === "throw")
980
980
  throw new globalThis.Error(
981
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
981
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
982
982
  );
983
- let p = e.skip(l);
984
- a !== !1 && (a === !0 ? u.onRead : a)(
983
+ let p = e.skip(c);
984
+ l !== !1 && (l === !0 ? u.onRead : l)(
985
985
  this.typeName,
986
986
  o,
987
987
  i,
988
- l,
988
+ c,
989
989
  p
990
990
  );
991
991
  }
@@ -1071,9 +1071,9 @@ class Wt extends g {
1071
1071
  return t.progress = 0, t.bytesProcessed = 0n, t.bytesTotal = 0n, t.done = !1, t.name = "", e !== void 0 && f(this, t, e), t;
1072
1072
  }
1073
1073
  internalBinaryRead(e, t, n, r) {
1074
- let o = r ?? this.create(), c = e.pos + t;
1075
- for (; e.pos < c; ) {
1076
- let [i, l] = e.tag();
1074
+ let o = r ?? this.create(), a = e.pos + t;
1075
+ for (; e.pos < a; ) {
1076
+ let [i, c] = e.tag();
1077
1077
  switch (i) {
1078
1078
  case /* float progress */
1079
1079
  1:
@@ -1096,17 +1096,17 @@ class Wt extends g {
1096
1096
  o.name = e.string();
1097
1097
  break;
1098
1098
  default:
1099
- let a = n.readUnknownField;
1100
- if (a === "throw")
1099
+ let l = n.readUnknownField;
1100
+ if (l === "throw")
1101
1101
  throw new globalThis.Error(
1102
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
1102
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
1103
1103
  );
1104
- let p = e.skip(l);
1105
- a !== !1 && (a === !0 ? u.onRead : a)(
1104
+ let p = e.skip(c);
1105
+ l !== !1 && (l === !0 ? u.onRead : l)(
1106
1106
  this.typeName,
1107
1107
  o,
1108
1108
  i,
1109
- l,
1109
+ c,
1110
1110
  p
1111
1111
  );
1112
1112
  }
@@ -1167,26 +1167,26 @@ class zt extends g {
1167
1167
  ), t;
1168
1168
  }
1169
1169
  internalBinaryRead(e, t, n, r) {
1170
- let o = r ?? this.create(), c = e.pos + t;
1171
- for (; e.pos < c; ) {
1172
- let [i, l] = e.tag();
1170
+ let o = r ?? this.create(), a = e.pos + t;
1171
+ for (; e.pos < a; ) {
1172
+ let [i, c] = e.tag();
1173
1173
  switch (i) {
1174
1174
  case /* uint64 resource_id */
1175
1175
  1:
1176
1176
  o.resourceId = e.uint64().toBigInt();
1177
1177
  break;
1178
1178
  default:
1179
- let a = n.readUnknownField;
1180
- if (a === "throw")
1179
+ let l = n.readUnknownField;
1180
+ if (l === "throw")
1181
1181
  throw new globalThis.Error(
1182
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
1182
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
1183
1183
  );
1184
- let p = e.skip(l);
1185
- a !== !1 && (a === !0 ? u.onRead : a)(
1184
+ let p = e.skip(c);
1185
+ l !== !1 && (l === !0 ? u.onRead : l)(
1186
1186
  this.typeName,
1187
1187
  o,
1188
1188
  i,
1189
- l,
1189
+ c,
1190
1190
  p
1191
1191
  );
1192
1192
  }
@@ -1219,9 +1219,9 @@ class Mt extends g {
1219
1219
  ), t;
1220
1220
  }
1221
1221
  internalBinaryRead(e, t, n, r) {
1222
- let o = r ?? this.create(), c = e.pos + t;
1223
- for (; e.pos < c; ) {
1224
- let [i, l] = e.tag();
1222
+ let o = r ?? this.create(), a = e.pos + t;
1223
+ for (; e.pos < a; ) {
1224
+ let [i, c] = e.tag();
1225
1225
  switch (i) {
1226
1226
  case /* MiLaboratories.Controller.Shared.ProgressAPI.Report report */
1227
1227
  1:
@@ -1233,17 +1233,17 @@ class Mt extends g {
1233
1233
  );
1234
1234
  break;
1235
1235
  default:
1236
- let a = n.readUnknownField;
1237
- if (a === "throw")
1236
+ let l = n.readUnknownField;
1237
+ if (l === "throw")
1238
1238
  throw new globalThis.Error(
1239
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
1239
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
1240
1240
  );
1241
- let p = e.skip(l);
1242
- a !== !1 && (a === !0 ? u.onRead : a)(
1241
+ let p = e.skip(c);
1242
+ l !== !1 && (l === !0 ? u.onRead : l)(
1243
1243
  this.typeName,
1244
1244
  o,
1245
1245
  i,
1246
- l,
1246
+ c,
1247
1247
  p
1248
1248
  );
1249
1249
  }
@@ -1312,9 +1312,9 @@ class Gt extends g {
1312
1312
  ), t;
1313
1313
  }
1314
1314
  internalBinaryRead(e, t, n, r) {
1315
- let o = r ?? this.create(), c = e.pos + t;
1316
- for (; e.pos < c; ) {
1317
- let [i, l] = e.tag();
1315
+ let o = r ?? this.create(), a = e.pos + t;
1316
+ for (; e.pos < a; ) {
1317
+ let [i, c] = e.tag();
1318
1318
  switch (i) {
1319
1319
  case /* uint64 resource_id */
1320
1320
  1:
@@ -1330,17 +1330,17 @@ class Gt extends g {
1330
1330
  );
1331
1331
  break;
1332
1332
  default:
1333
- let a = n.readUnknownField;
1334
- if (a === "throw")
1333
+ let l = n.readUnknownField;
1334
+ if (l === "throw")
1335
1335
  throw new globalThis.Error(
1336
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
1336
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
1337
1337
  );
1338
- let p = e.skip(l);
1339
- a !== !1 && (a === !0 ? u.onRead : a)(
1338
+ let p = e.skip(c);
1339
+ l !== !1 && (l === !0 ? u.onRead : l)(
1340
1340
  this.typeName,
1341
1341
  o,
1342
1342
  i,
1343
- l,
1343
+ c,
1344
1344
  p
1345
1345
  );
1346
1346
  }
@@ -1378,9 +1378,9 @@ class qt extends g {
1378
1378
  ), t;
1379
1379
  }
1380
1380
  internalBinaryRead(e, t, n, r) {
1381
- let o = r ?? this.create(), c = e.pos + t;
1382
- for (; e.pos < c; ) {
1383
- let [i, l] = e.tag();
1381
+ let o = r ?? this.create(), a = e.pos + t;
1382
+ for (; e.pos < a; ) {
1383
+ let [i, c] = e.tag();
1384
1384
  switch (i) {
1385
1385
  case /* MiLaboratories.Controller.Shared.ProgressAPI.Report report */
1386
1386
  1:
@@ -1392,17 +1392,17 @@ class qt extends g {
1392
1392
  );
1393
1393
  break;
1394
1394
  default:
1395
- let a = n.readUnknownField;
1396
- if (a === "throw")
1395
+ let l = n.readUnknownField;
1396
+ if (l === "throw")
1397
1397
  throw new globalThis.Error(
1398
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
1398
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
1399
1399
  );
1400
- let p = e.skip(l);
1401
- a !== !1 && (a === !0 ? u.onRead : a)(
1400
+ let p = e.skip(c);
1401
+ l !== !1 && (l === !0 ? u.onRead : l)(
1402
1402
  this.typeName,
1403
1403
  o,
1404
1404
  i,
1405
- l,
1405
+ c,
1406
1406
  p
1407
1407
  );
1408
1408
  }
@@ -1489,21 +1489,21 @@ class Qt {
1489
1489
  // GRPC stream every updateIntervalMs milliseconds.
1490
1490
  async *realtimeStatus({ id: e, type: t }, n = 100, r) {
1491
1491
  r = k(t, r);
1492
- const o = Math.floor(n / 1e3), c = (n - o * 1e3) * 1e6, i = $.create({
1492
+ const o = Math.floor(n / 1e3), a = (n - o * 1e3) * 1e6, i = $.create({
1493
1493
  seconds: BigInt(o),
1494
- nanos: c
1494
+ nanos: a
1495
1495
  });
1496
1496
  try {
1497
- const { responses: l } = this.grpcClient.realtimeStatus(
1497
+ const { responses: c } = this.grpcClient.realtimeStatus(
1498
1498
  {
1499
1499
  resourceId: e,
1500
1500
  updateInterval: i
1501
1501
  },
1502
1502
  r
1503
1503
  );
1504
- yield* l;
1505
- } catch (l) {
1506
- throw this.logger.warn("Failed to get realtime status" + l), l;
1504
+ yield* c;
1505
+ } catch (c) {
1506
+ throw this.logger.warn("Failed to get realtime status" + c), c;
1507
1507
  }
1508
1508
  }
1509
1509
  }
@@ -1574,26 +1574,26 @@ class Kt extends g {
1574
1574
  ), t;
1575
1575
  }
1576
1576
  internalBinaryRead(e, t, n, r) {
1577
- let o = r ?? this.create(), c = e.pos + t;
1578
- for (; e.pos < c; ) {
1579
- let [i, l] = e.tag();
1577
+ let o = r ?? this.create(), a = e.pos + t;
1578
+ for (; e.pos < a; ) {
1579
+ let [i, c] = e.tag();
1580
1580
  switch (i) {
1581
1581
  case /* uint64 resource_id */
1582
1582
  1:
1583
1583
  o.resourceId = e.uint64().toBigInt();
1584
1584
  break;
1585
1585
  default:
1586
- let a = n.readUnknownField;
1587
- if (a === "throw")
1586
+ let l = n.readUnknownField;
1587
+ if (l === "throw")
1588
1588
  throw new globalThis.Error(
1589
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
1589
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
1590
1590
  );
1591
- let p = e.skip(l);
1592
- a !== !1 && (a === !0 ? u.onRead : a)(
1591
+ let p = e.skip(c);
1592
+ l !== !1 && (l === !0 ? u.onRead : l)(
1593
1593
  this.typeName,
1594
1594
  o,
1595
1595
  i,
1596
- l,
1596
+ c,
1597
1597
  p
1598
1598
  );
1599
1599
  }
@@ -1644,9 +1644,9 @@ class tr extends g {
1644
1644
  ), t;
1645
1645
  }
1646
1646
  internalBinaryRead(e, t, n, r) {
1647
- let o = r ?? this.create(), c = e.pos + t;
1648
- for (; e.pos < c; ) {
1649
- let [i, l] = e.tag();
1647
+ let o = r ?? this.create(), a = e.pos + t;
1648
+ for (; e.pos < a; ) {
1649
+ let [i, c] = e.tag();
1650
1650
  switch (i) {
1651
1651
  case /* string Name = 1 [json_name = "Name"];*/
1652
1652
  1:
@@ -1657,17 +1657,17 @@ class tr extends g {
1657
1657
  o.value = e.string();
1658
1658
  break;
1659
1659
  default:
1660
- let a = n.readUnknownField;
1661
- if (a === "throw")
1660
+ let l = n.readUnknownField;
1661
+ if (l === "throw")
1662
1662
  throw new globalThis.Error(
1663
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
1663
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
1664
1664
  );
1665
- let p = e.skip(l);
1666
- a !== !1 && (a === !0 ? u.onRead : a)(
1665
+ let p = e.skip(c);
1666
+ l !== !1 && (l === !0 ? u.onRead : l)(
1667
1667
  this.typeName,
1668
1668
  o,
1669
1669
  i,
1670
- l,
1670
+ c,
1671
1671
  p
1672
1672
  );
1673
1673
  }
@@ -1716,9 +1716,9 @@ class rr extends g {
1716
1716
  ), t;
1717
1717
  }
1718
1718
  internalBinaryRead(e, t, n, r) {
1719
- let o = r ?? this.create(), c = e.pos + t;
1720
- for (; e.pos < c; ) {
1721
- let [i, l] = e.tag();
1719
+ let o = r ?? this.create(), a = e.pos + t;
1720
+ for (; e.pos < a; ) {
1721
+ let [i, c] = e.tag();
1722
1722
  switch (i) {
1723
1723
  case /* string download_url */
1724
1724
  1:
@@ -1735,17 +1735,17 @@ class rr extends g {
1735
1735
  );
1736
1736
  break;
1737
1737
  default:
1738
- let a = n.readUnknownField;
1739
- if (a === "throw")
1738
+ let l = n.readUnknownField;
1739
+ if (l === "throw")
1740
1740
  throw new globalThis.Error(
1741
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
1741
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
1742
1742
  );
1743
- let p = e.skip(l);
1744
- a !== !1 && (a === !0 ? u.onRead : a)(
1743
+ let p = e.skip(c);
1744
+ l !== !1 && (l === !0 ? u.onRead : l)(
1745
1745
  this.typeName,
1746
1746
  o,
1747
1747
  i,
1748
- l,
1748
+ c,
1749
1749
  p
1750
1750
  );
1751
1751
  }
@@ -1803,20 +1803,20 @@ class Se {
1803
1803
  this.httpClient = e;
1804
1804
  }
1805
1805
  async downloadRemoteFile(e, t, n) {
1806
- const { statusCode: r, body: o, headers: c } = await Te(e, {
1806
+ const { statusCode: r, body: o, headers: a } = await Te(e, {
1807
1807
  dispatcher: this.httpClient,
1808
1808
  headers: t,
1809
1809
  signal: n
1810
1810
  }), i = re.toWeb(o);
1811
1811
  if (r != 200) {
1812
- const l = await et(i), a = l.substring(0, Math.min(l.length, 1e3));
1812
+ const c = await et(i), l = c.substring(0, Math.min(c.length, 1e3));
1813
1813
  throw 400 <= r && r < 500 ? new ae(
1814
- `Http error: statusCode: ${r} url: ${e.toString()}, beginning of body: ${a}`
1814
+ `Http error: statusCode: ${r} url: ${e.toString()}, beginning of body: ${l}`
1815
1815
  ) : new Error(`Http error: statusCode: ${r} url: ${e.toString()}`);
1816
1816
  }
1817
1817
  return {
1818
1818
  content: i,
1819
- size: Number(c["content-length"])
1819
+ size: Number(a["content-length"])
1820
1820
  };
1821
1821
  }
1822
1822
  }
@@ -1972,9 +1972,9 @@ class cr extends g {
1972
1972
  return t.seconds = 0n, t.nanos = 0, e !== void 0 && f(this, t, e), t;
1973
1973
  }
1974
1974
  internalBinaryRead(e, t, n, r) {
1975
- let o = r ?? this.create(), c = e.pos + t;
1976
- for (; e.pos < c; ) {
1977
- let [i, l] = e.tag();
1975
+ let o = r ?? this.create(), a = e.pos + t;
1976
+ for (; e.pos < a; ) {
1977
+ let [i, c] = e.tag();
1978
1978
  switch (i) {
1979
1979
  case /* int64 seconds */
1980
1980
  1:
@@ -1985,17 +1985,17 @@ class cr extends g {
1985
1985
  o.nanos = e.int32();
1986
1986
  break;
1987
1987
  default:
1988
- let a = n.readUnknownField;
1989
- if (a === "throw")
1988
+ let l = n.readUnknownField;
1989
+ if (l === "throw")
1990
1990
  throw new globalThis.Error(
1991
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
1991
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
1992
1992
  );
1993
- let p = e.skip(l);
1994
- a !== !1 && (a === !0 ? u.onRead : a)(
1993
+ let p = e.skip(c);
1994
+ l !== !1 && (l === !0 ? u.onRead : l)(
1995
1995
  this.typeName,
1996
1996
  o,
1997
1997
  i,
1998
- l,
1998
+ c,
1999
1999
  p
2000
2000
  );
2001
2001
  }
@@ -2088,9 +2088,9 @@ class hr extends g {
2088
2088
  return t.name = "", t.size = 0n, t.isDir = !1, t.fullName = "", t.directory = "", t.version = "", e !== void 0 && f(this, t, e), t;
2089
2089
  }
2090
2090
  internalBinaryRead(e, t, n, r) {
2091
- let o = r ?? this.create(), c = e.pos + t;
2092
- for (; e.pos < c; ) {
2093
- let [i, l] = e.tag();
2091
+ let o = r ?? this.create(), a = e.pos + t;
2092
+ for (; e.pos < a; ) {
2093
+ let [i, c] = e.tag();
2094
2094
  switch (i) {
2095
2095
  case /* string name */
2096
2096
  1:
@@ -2126,17 +2126,17 @@ class hr extends g {
2126
2126
  o.version = e.string();
2127
2127
  break;
2128
2128
  default:
2129
- let a = n.readUnknownField;
2130
- if (a === "throw")
2129
+ let l = n.readUnknownField;
2130
+ if (l === "throw")
2131
2131
  throw new globalThis.Error(
2132
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
2132
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
2133
2133
  );
2134
- let p = e.skip(l);
2135
- a !== !1 && (a === !0 ? u.onRead : a)(
2134
+ let p = e.skip(c);
2135
+ l !== !1 && (l === !0 ? u.onRead : l)(
2136
2136
  this.typeName,
2137
2137
  o,
2138
2138
  i,
2139
- l,
2139
+ c,
2140
2140
  p
2141
2141
  );
2142
2142
  }
@@ -2204,9 +2204,9 @@ class pr extends g {
2204
2204
  return t.resourceId = 0n, t.location = "", e !== void 0 && f(this, t, e), t;
2205
2205
  }
2206
2206
  internalBinaryRead(e, t, n, r) {
2207
- let o = r ?? this.create(), c = e.pos + t;
2208
- for (; e.pos < c; ) {
2209
- let [i, l] = e.tag();
2207
+ let o = r ?? this.create(), a = e.pos + t;
2208
+ for (; e.pos < a; ) {
2209
+ let [i, c] = e.tag();
2210
2210
  switch (i) {
2211
2211
  case /* uint64 resource_id */
2212
2212
  1:
@@ -2217,17 +2217,17 @@ class pr extends g {
2217
2217
  o.location = e.string();
2218
2218
  break;
2219
2219
  default:
2220
- let a = n.readUnknownField;
2221
- if (a === "throw")
2220
+ let l = n.readUnknownField;
2221
+ if (l === "throw")
2222
2222
  throw new globalThis.Error(
2223
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
2223
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
2224
2224
  );
2225
- let p = e.skip(l);
2226
- a !== !1 && (a === !0 ? u.onRead : a)(
2225
+ let p = e.skip(c);
2226
+ l !== !1 && (l === !0 ? u.onRead : l)(
2227
2227
  this.typeName,
2228
2228
  o,
2229
2229
  i,
2230
- l,
2230
+ c,
2231
2231
  p
2232
2232
  );
2233
2233
  }
@@ -2269,9 +2269,9 @@ class fr extends g {
2269
2269
  return t.items = [], t.delimiter = "", e !== void 0 && f(this, t, e), t;
2270
2270
  }
2271
2271
  internalBinaryRead(e, t, n, r) {
2272
- let o = r ?? this.create(), c = e.pos + t;
2273
- for (; e.pos < c; ) {
2274
- let [i, l] = e.tag();
2272
+ let o = r ?? this.create(), a = e.pos + t;
2273
+ for (; e.pos < a; ) {
2274
+ let [i, c] = e.tag();
2275
2275
  switch (i) {
2276
2276
  case /* repeated MiLaboratories.Controller.Shared.LsAPI.ListItem items */
2277
2277
  1:
@@ -2284,17 +2284,17 @@ class fr extends g {
2284
2284
  o.delimiter = e.string();
2285
2285
  break;
2286
2286
  default:
2287
- let a = n.readUnknownField;
2288
- if (a === "throw")
2287
+ let l = n.readUnknownField;
2288
+ if (l === "throw")
2289
2289
  throw new globalThis.Error(
2290
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
2290
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
2291
2291
  );
2292
- let p = e.skip(l);
2293
- a !== !1 && (a === !0 ? u.onRead : a)(
2292
+ let p = e.skip(c);
2293
+ l !== !1 && (l === !0 ? u.onRead : l)(
2294
2294
  this.typeName,
2295
2295
  o,
2296
2296
  i,
2297
- l,
2297
+ c,
2298
2298
  p
2299
2299
  );
2300
2300
  }
@@ -2422,9 +2422,9 @@ class Tr extends g {
2422
2422
  return t.resourceId = 0n, t.offset = 0n, e !== void 0 && f(this, t, e), t;
2423
2423
  }
2424
2424
  internalBinaryRead(e, t, n, r) {
2425
- let o = r ?? this.create(), c = e.pos + t;
2426
- for (; e.pos < c; ) {
2427
- let [i, l] = e.tag();
2425
+ let o = r ?? this.create(), a = e.pos + t;
2426
+ for (; e.pos < a; ) {
2427
+ let [i, c] = e.tag();
2428
2428
  switch (i) {
2429
2429
  case /* uint64 resource_id */
2430
2430
  1:
@@ -2443,17 +2443,17 @@ class Tr extends g {
2443
2443
  o.readLimit = e.int64().toBigInt();
2444
2444
  break;
2445
2445
  default:
2446
- let a = n.readUnknownField;
2447
- if (a === "throw")
2446
+ let l = n.readUnknownField;
2447
+ if (l === "throw")
2448
2448
  throw new globalThis.Error(
2449
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
2449
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
2450
2450
  );
2451
- let p = e.skip(l);
2452
- a !== !1 && (a === !0 ? u.onRead : a)(
2451
+ let p = e.skip(c);
2452
+ l !== !1 && (l === !0 ? u.onRead : l)(
2453
2453
  this.typeName,
2454
2454
  o,
2455
2455
  i,
2456
- l,
2456
+ c,
2457
2457
  p
2458
2458
  );
2459
2459
  }
@@ -2505,9 +2505,9 @@ class Lr extends g {
2505
2505
  return t.resourceId = 0n, t.offset = 0n, e !== void 0 && f(this, t, e), t;
2506
2506
  }
2507
2507
  internalBinaryRead(e, t, n, r) {
2508
- let o = r ?? this.create(), c = e.pos + t;
2509
- for (; e.pos < c; ) {
2510
- let [i, l] = e.tag();
2508
+ let o = r ?? this.create(), a = e.pos + t;
2509
+ for (; e.pos < a; ) {
2510
+ let [i, c] = e.tag();
2511
2511
  switch (i) {
2512
2512
  case /* uint64 resource_id */
2513
2513
  1:
@@ -2522,17 +2522,17 @@ class Lr extends g {
2522
2522
  o.chunkSize = e.uint32();
2523
2523
  break;
2524
2524
  default:
2525
- let a = n.readUnknownField;
2526
- if (a === "throw")
2525
+ let l = n.readUnknownField;
2526
+ if (l === "throw")
2527
2527
  throw new globalThis.Error(
2528
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
2528
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
2529
2529
  );
2530
- let p = e.skip(l);
2531
- a !== !1 && (a === !0 ? u.onRead : a)(
2530
+ let p = e.skip(c);
2531
+ l !== !1 && (l === !0 ? u.onRead : l)(
2532
2532
  this.typeName,
2533
2533
  o,
2534
2534
  i,
2535
- l,
2535
+ c,
2536
2536
  p
2537
2537
  );
2538
2538
  }
@@ -2601,9 +2601,9 @@ class Ir extends g {
2601
2601
  return t.resourceId = 0n, t.offset = 0n, e !== void 0 && f(this, t, e), t;
2602
2602
  }
2603
2603
  internalBinaryRead(e, t, n, r) {
2604
- let o = r ?? this.create(), c = e.pos + t;
2605
- for (; e.pos < c; ) {
2606
- let [i, l] = e.tag();
2604
+ let o = r ?? this.create(), a = e.pos + t;
2605
+ for (; e.pos < a; ) {
2606
+ let [i, c] = e.tag();
2607
2607
  switch (i) {
2608
2608
  case /* uint64 resource_id */
2609
2609
  1:
@@ -2626,17 +2626,17 @@ class Ir extends g {
2626
2626
  o.searchRe = e.string();
2627
2627
  break;
2628
2628
  default:
2629
- let a = n.readUnknownField;
2630
- if (a === "throw")
2629
+ let l = n.readUnknownField;
2630
+ if (l === "throw")
2631
2631
  throw new globalThis.Error(
2632
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
2632
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
2633
2633
  );
2634
- let p = e.skip(l);
2635
- a !== !1 && (a === !0 ? u.onRead : a)(
2634
+ let p = e.skip(c);
2635
+ l !== !1 && (l === !0 ? u.onRead : l)(
2636
2636
  this.typeName,
2637
2637
  o,
2638
2638
  i,
2639
- l,
2639
+ c,
2640
2640
  p
2641
2641
  );
2642
2642
  }
@@ -2705,9 +2705,9 @@ class Sr extends g {
2705
2705
  return t.resourceId = 0n, t.offset = 0n, e !== void 0 && f(this, t, e), t;
2706
2706
  }
2707
2707
  internalBinaryRead(e, t, n, r) {
2708
- let o = r ?? this.create(), c = e.pos + t;
2709
- for (; e.pos < c; ) {
2710
- let [i, l] = e.tag();
2708
+ let o = r ?? this.create(), a = e.pos + t;
2709
+ for (; e.pos < a; ) {
2710
+ let [i, c] = e.tag();
2711
2711
  switch (i) {
2712
2712
  case /* uint64 resource_id */
2713
2713
  1:
@@ -2730,17 +2730,17 @@ class Sr extends g {
2730
2730
  o.searchRe = e.string();
2731
2731
  break;
2732
2732
  default:
2733
- let a = n.readUnknownField;
2734
- if (a === "throw")
2733
+ let l = n.readUnknownField;
2734
+ if (l === "throw")
2735
2735
  throw new globalThis.Error(
2736
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
2736
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
2737
2737
  );
2738
- let p = e.skip(l);
2739
- a !== !1 && (a === !0 ? u.onRead : a)(
2738
+ let p = e.skip(c);
2739
+ l !== !1 && (l === !0 ? u.onRead : l)(
2740
2740
  this.typeName,
2741
2741
  o,
2742
2742
  i,
2743
- l,
2743
+ c,
2744
2744
  p
2745
2745
  );
2746
2746
  }
@@ -2809,9 +2809,9 @@ class Ur extends g {
2809
2809
  return t.resourceId = 0n, e !== void 0 && f(this, t, e), t;
2810
2810
  }
2811
2811
  internalBinaryRead(e, t, n, r) {
2812
- let o = r ?? this.create(), c = e.pos + t;
2813
- for (; e.pos < c; ) {
2814
- let [i, l] = e.tag();
2812
+ let o = r ?? this.create(), a = e.pos + t;
2813
+ for (; e.pos < a; ) {
2814
+ let [i, c] = e.tag();
2815
2815
  switch (i) {
2816
2816
  case /* uint64 resource_id */
2817
2817
  1:
@@ -2834,17 +2834,17 @@ class Ur extends g {
2834
2834
  o.searchRe = e.string();
2835
2835
  break;
2836
2836
  default:
2837
- let a = n.readUnknownField;
2838
- if (a === "throw")
2837
+ let l = n.readUnknownField;
2838
+ if (l === "throw")
2839
2839
  throw new globalThis.Error(
2840
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
2840
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
2841
2841
  );
2842
- let p = e.skip(l);
2843
- a !== !1 && (a === !0 ? u.onRead : a)(
2842
+ let p = e.skip(c);
2843
+ l !== !1 && (l === !0 ? u.onRead : l)(
2844
2844
  this.typeName,
2845
2845
  o,
2846
2846
  i,
2847
- l,
2847
+ c,
2848
2848
  p
2849
2849
  );
2850
2850
  }
@@ -2895,9 +2895,9 @@ class Dr extends g {
2895
2895
  return t.data = new Uint8Array(0), t.size = 0n, t.newOffset = 0n, e !== void 0 && f(this, t, e), t;
2896
2896
  }
2897
2897
  internalBinaryRead(e, t, n, r) {
2898
- let o = r ?? this.create(), c = e.pos + t;
2899
- for (; e.pos < c; ) {
2900
- let [i, l] = e.tag();
2898
+ let o = r ?? this.create(), a = e.pos + t;
2899
+ for (; e.pos < a; ) {
2900
+ let [i, c] = e.tag();
2901
2901
  switch (i) {
2902
2902
  case /* bytes data */
2903
2903
  1:
@@ -2912,17 +2912,17 @@ class Dr extends g {
2912
2912
  o.newOffset = e.uint64().toBigInt();
2913
2913
  break;
2914
2914
  default:
2915
- let a = n.readUnknownField;
2916
- if (a === "throw")
2915
+ let l = n.readUnknownField;
2916
+ if (l === "throw")
2917
2917
  throw new globalThis.Error(
2918
- `Unknown field ${i} (wire type ${l}) for ${this.typeName}`
2918
+ `Unknown field ${i} (wire type ${c}) for ${this.typeName}`
2919
2919
  );
2920
- let p = e.skip(l);
2921
- a !== !1 && (a === !0 ? u.onRead : a)(
2920
+ let p = e.skip(c);
2921
+ l !== !1 && (l === !0 ? u.onRead : l)(
2922
2922
  this.typeName,
2923
2923
  o,
2924
2924
  i,
2925
- l,
2925
+ c,
2926
2926
  p
2927
2927
  );
2928
2928
  }
@@ -3085,7 +3085,7 @@ class $r {
3085
3085
  /** Reads text back and returns the text,
3086
3086
  * the new offset
3087
3087
  * and the total size of the (currently existing) file. */
3088
- async lastLines({ id: e, type: t }, n, r = 0n, o, c) {
3088
+ async lastLines({ id: e, type: t }, n, r = 0n, o, a) {
3089
3089
  return (await this.grpcClient.lastLines(
3090
3090
  {
3091
3091
  resourceId: e,
@@ -3093,13 +3093,13 @@ class $r {
3093
3093
  offset: r,
3094
3094
  search: o
3095
3095
  },
3096
- k(t, c)
3096
+ k(t, a)
3097
3097
  )).response;
3098
3098
  }
3099
3099
  /** Reads the file forward and returns the text,
3100
3100
  * the new offset
3101
3101
  * and the total size of the (currently existing) file. */
3102
- async readText({ id: e, type: t }, n, r = 0n, o, c) {
3102
+ async readText({ id: e, type: t }, n, r = 0n, o, a) {
3103
3103
  return (await this.grpcClient.readText(
3104
3104
  {
3105
3105
  resourceId: K(e),
@@ -3107,29 +3107,29 @@ class $r {
3107
3107
  offset: r,
3108
3108
  search: o
3109
3109
  },
3110
- k(t, c)
3110
+ k(t, a)
3111
3111
  )).response;
3112
3112
  }
3113
3113
  }
3114
- function On(s, e, t) {
3114
+ function Cn(s, e, t) {
3115
3115
  return e.getDriver({
3116
3116
  name: "DownloadBlob",
3117
3117
  init: (n, r, o) => new ir(r, o, s, t)
3118
3118
  });
3119
3119
  }
3120
- function Fn(s, e) {
3120
+ function On(s, e) {
3121
3121
  return s.getDriver({
3122
3122
  name: "StreamLogs",
3123
3123
  init: (t, n, r) => new $r(n, r, e)
3124
3124
  });
3125
3125
  }
3126
- function En(s, e) {
3126
+ function Fn(s, e) {
3127
3127
  return s.getDriver({
3128
3128
  name: "UploadProgress",
3129
3129
  init: (t, n, r) => new Qt(n, r, s, e)
3130
3130
  });
3131
3131
  }
3132
- function Wn(s, e) {
3132
+ function En(s, e) {
3133
3133
  return s.getDriver({
3134
3134
  name: "UploadBlob",
3135
3135
  init: (t, n, r) => new Ot(n, r, s, e)
@@ -3141,7 +3141,7 @@ function _r(s, e) {
3141
3141
  init: (t, n, r) => new yr(n, e)
3142
3142
  });
3143
3143
  }
3144
- class An {
3144
+ class Wn {
3145
3145
  constructor(e, t) {
3146
3146
  d(this, "updater");
3147
3147
  d(this, "schedule", () => this.updater.schedule());
@@ -3170,7 +3170,7 @@ class Be {
3170
3170
  })());
3171
3171
  }
3172
3172
  }
3173
- async function zn(s, e) {
3173
+ async function An(s, e) {
3174
3174
  return s.withReadTx("LogsDriverGetStream", async (t) => {
3175
3175
  const n = await t.getResourceData(e, !0), r = await Ge(t, Ve(n, "stream"));
3176
3176
  if (r.error != "")
@@ -3184,17 +3184,17 @@ function Or(s) {
3184
3184
  const t = s.replace(De, "").match(Cr);
3185
3185
  if (t == null || t.length != 4)
3186
3186
  return;
3187
- const [n, r, o, c] = t;
3187
+ const [n, r, o, a] = t;
3188
3188
  return {
3189
3189
  stage: r,
3190
3190
  // For example, 'Building pre-clones from tag groups'
3191
3191
  progress: o,
3192
3192
  // 35.3%
3193
- eta: c
3193
+ eta: a
3194
3194
  // ETA: 00:00:07
3195
3195
  };
3196
3196
  }
3197
- async function xn(s, e, t) {
3197
+ async function zn(s, e, t) {
3198
3198
  const n = await e.lastLines(s, 1, 0n, De, t);
3199
3199
  if (n.data == null || n.data.length == 0)
3200
3200
  return { found: !1 };
@@ -3242,7 +3242,7 @@ class ve {
3242
3242
  this.cache.delete(e.path), this.totalSizeBytes -= e.sizeBytes;
3243
3243
  }
3244
3244
  }
3245
- class Mn {
3245
+ class xn {
3246
3246
  constructor(e, t) {
3247
3247
  this.logsStreamDriver = e, this.downloadDriver = t;
3248
3248
  }
@@ -3338,8 +3338,8 @@ const Er = se({
3338
3338
  })
3339
3339
  }
3340
3340
  });
3341
- class Hn {
3342
- constructor(e, t, n, r, o, c) {
3341
+ class Mn {
3342
+ constructor(e, t, n, r, o, a) {
3343
3343
  /** Represents a Resource Id to the path of a blob as a map. */
3344
3344
  d(this, "idToDownload", /* @__PURE__ */ new Map());
3345
3345
  /** Writes and removes files to a hard drive and holds a counter for every
@@ -3351,17 +3351,17 @@ class Hn {
3351
3351
  d(this, "idToLastLines", /* @__PURE__ */ new Map());
3352
3352
  d(this, "idToProgressLog", /* @__PURE__ */ new Map());
3353
3353
  d(this, "saveDir");
3354
- this.logger = e, this.clientDownload = t, this.clientLogs = n, this.signer = o, this.cache = new ve(c.cacheSoftSizeBytes), this.downloadQueue = new ee(this.logger, c.nConcurrentDownloads), this.saveDir = w.resolve(r);
3354
+ this.logger = e, this.clientDownload = t, this.clientLogs = n, this.signer = o, this.cache = new ve(a.cacheSoftSizeBytes), this.downloadQueue = new ee(this.logger, a.nConcurrentDownloads), this.saveDir = w.resolve(r);
3355
3355
  }
3356
3356
  getDownloadedBlob(e, t) {
3357
- if (t === void 0) return b.make((c) => this.getDownloadedBlob(e, c));
3357
+ if (t === void 0) return b.make((a) => this.getDownloadedBlob(e, a));
3358
3358
  const n = R(e, t), r = L();
3359
3359
  t.addOnDestroy(() => this.releaseBlob(n.id, r));
3360
3360
  const o = this.getDownloadedBlobNoCtx(t.watcher, n, r);
3361
3361
  return o == null && t.markUnstable("download blob is still undefined"), o;
3362
3362
  }
3363
3363
  getOnDemandBlob(e, t) {
3364
- if (t === void 0) return b.make((c) => this.getOnDemandBlob(e, c));
3364
+ if (t === void 0) return b.make((a) => this.getOnDemandBlob(e, a));
3365
3365
  const n = ie(e) ? Q(e, Er, t) : e, r = L();
3366
3366
  return t.addOnDestroy(() => this.releaseOnDemandBlob(n.id, r)), this.getOnDemandBlobNoCtx(t.watcher, n, r);
3367
3367
  }
@@ -3377,11 +3377,11 @@ class Hn {
3377
3377
  getDownloadedBlobNoCtx(e, t, n) {
3378
3378
  let r = this.idToDownload.get(t.id);
3379
3379
  if (r === void 0) {
3380
- const c = this.setNewDownloadTask(e, t, n);
3380
+ const a = this.setNewDownloadTask(e, t, n);
3381
3381
  this.downloadQueue.push({
3382
- fn: () => this.downloadBlob(c, n),
3382
+ fn: () => this.downloadBlob(a, n),
3383
3383
  recoverableErrorPredicate: (i) => !0
3384
- }), r = c;
3384
+ }), r = a;
3385
3385
  }
3386
3386
  r.attach(e, n);
3387
3387
  const o = r.getBlob();
@@ -3414,47 +3414,47 @@ class Hn {
3414
3414
  if (n == null) return b.make((i) => this.getLastLogs(e, t, i));
3415
3415
  const r = R(e, n), o = L();
3416
3416
  n.addOnDestroy(() => this.releaseBlob(r.id, o));
3417
- const c = this.getLastLogsNoCtx(n.watcher, r, t, o);
3418
- return c == null && n.markUnstable("either a file was not downloaded or logs was not read"), c;
3417
+ const a = this.getLastLogsNoCtx(n.watcher, r, t, o);
3418
+ return a == null && n.markUnstable("either a file was not downloaded or logs was not read"), a;
3419
3419
  }
3420
3420
  getLastLogsNoCtx(e, t, n, r) {
3421
3421
  const o = this.getDownloadedBlobNoCtx(e, t, r);
3422
3422
  if (o == null) return;
3423
- const c = J(o.handle, this.signer);
3423
+ const a = J(o.handle, this.signer);
3424
3424
  let i = this.idToLastLines.get(t.id);
3425
3425
  if (i == null) {
3426
- const a = new he(c, n);
3427
- this.idToLastLines.set(t.id, a), i = a;
3426
+ const l = new he(a, n);
3427
+ this.idToLastLines.set(t.id, l), i = l;
3428
3428
  }
3429
- const l = i.getOrSchedule(e);
3430
- if (l.error) throw l.error;
3431
- return l.log;
3429
+ const c = i.getOrSchedule(e);
3430
+ if (c.error) throw c.error;
3431
+ return c.log;
3432
3432
  }
3433
3433
  getProgressLog(e, t, n) {
3434
3434
  if (n == null)
3435
3435
  return b.make((i) => this.getProgressLog(e, t, i));
3436
3436
  const r = R(e, n), o = L();
3437
3437
  n.addOnDestroy(() => this.releaseBlob(r.id, o));
3438
- const c = this.getProgressLogNoCtx(
3438
+ const a = this.getProgressLogNoCtx(
3439
3439
  n.watcher,
3440
3440
  r,
3441
3441
  t,
3442
3442
  o
3443
3443
  );
3444
- return c === void 0 && n.markUnstable("either a file was not downloaded or a progress log was not read"), c;
3444
+ return a === void 0 && n.markUnstable("either a file was not downloaded or a progress log was not read"), a;
3445
3445
  }
3446
3446
  getProgressLogNoCtx(e, t, n, r) {
3447
3447
  const o = this.getDownloadedBlobNoCtx(e, t, r);
3448
3448
  if (o == null) return;
3449
- const c = J(o.handle, this.signer);
3449
+ const a = J(o.handle, this.signer);
3450
3450
  let i = this.idToProgressLog.get(t.id);
3451
3451
  if (i == null) {
3452
- const a = new he(c, 1, n);
3453
- this.idToProgressLog.set(t.id, a), i = a;
3452
+ const l = new he(a, 1, n);
3453
+ this.idToProgressLog.set(t.id, l), i = l;
3454
3454
  }
3455
- const l = i.getOrSchedule(e);
3456
- if (l.error) throw l.error;
3457
- return l.log;
3455
+ const c = i.getOrSchedule(e);
3456
+ if (c.error) throw c.error;
3457
+ return c.log;
3458
3458
  }
3459
3459
  getLogHandle(e, t) {
3460
3460
  if (t == null) return b.make((r) => this.getLogHandle(e, r));
@@ -3503,7 +3503,7 @@ class Hn {
3503
3503
  r.map(async (o) => {
3504
3504
  await m.rm(o.path), this.cache.removeCache(o), this.removeTask(
3505
3505
  o,
3506
- `the task ${o.path} was removedfrom cache along with ${r.map((c) => c.path)}`
3506
+ `the task ${o.path} was removedfrom cache along with ${r.map((a) => a.path)}`
3507
3507
  );
3508
3508
  })
3509
3509
  );
@@ -3582,12 +3582,12 @@ async function Ar(s) {
3582
3582
  }
3583
3583
  function zr(s, e, t) {
3584
3584
  const n = O.createReadStream(s), r = new ne();
3585
- return new Promise((o, c) => {
3586
- const i = tt.createInterface(n, r), l = new rt();
3587
- i.on("line", function(a) {
3588
- t != null && !a.includes(t) || (l.push(a), l.length > e && l.shift());
3589
- }), i.on("error", c), i.on("close", function() {
3590
- o(l.toArray().join(de.EOL) + de.EOL);
3585
+ return new Promise((o, a) => {
3586
+ const i = tt.createInterface(n, r), c = new rt();
3587
+ i.on("line", function(l) {
3588
+ t != null && !l.includes(t) || (c.push(l), c.length > e && c.shift());
3589
+ }), i.on("error", a), i.on("close", function() {
3590
+ o(c.toArray().join(de.EOL) + de.EOL);
3591
3591
  });
3592
3592
  });
3593
3593
  }
@@ -3669,9 +3669,9 @@ function jr(s) {
3669
3669
  function Gr(s, e) {
3670
3670
  const t = s.match(Fe);
3671
3671
  if (t === null) throw new Error(`Remote handle is malformed: ${s}, matches: ${t}`);
3672
- const { content: n, resourceType: r, resourceVersion: o, resourceId: c, signature: i } = t.groups;
3672
+ const { content: n, resourceType: r, resourceVersion: o, resourceId: a, signature: i } = t.groups;
3673
3673
  return e.verify(n, i, `Signature verification failed for ${s}`), {
3674
- id: Y(BigInt(c)),
3674
+ id: Y(BigInt(a)),
3675
3675
  type: { name: r, version: o }
3676
3676
  };
3677
3677
  }
@@ -3693,7 +3693,7 @@ const F = T.object({
3693
3693
  storageId: T.string(),
3694
3694
  /** Path inside storage */
3695
3695
  path: T.string()
3696
- }), Gn = T.union([
3696
+ }), jn = T.union([
3697
3697
  F,
3698
3698
  Ee
3699
3699
  ]), qr = se({
@@ -3710,7 +3710,7 @@ function Zr(s, e) {
3710
3710
  const t = ie(s) ? e.accessor(s).node() : st(s) ? s.node() : s;
3711
3711
  return t.resourceType.name.startsWith("BlobUpload") ? Q(t, qr) : Q(t, Jr);
3712
3712
  }
3713
- class Vn {
3713
+ class Gn {
3714
3714
  constructor(e, t, n, r, o = {
3715
3715
  nConcurrentPartUploads: 10,
3716
3716
  nConcurrentGetProgresses: 10,
@@ -3737,11 +3737,11 @@ class Vn {
3737
3737
  () => this.startUpdating(),
3738
3738
  () => this.stopUpdating(),
3739
3739
  { stopDebounce: o.stopPollingDelay },
3740
- (c, i) => this.scheduleOnNextState(c, i)
3740
+ (a, i) => this.scheduleOnNextState(a, i)
3741
3741
  );
3742
3742
  }
3743
3743
  getProgressId(e, t) {
3744
- if (t == null) return b.make((c) => this.getProgressId(e, c));
3744
+ if (t == null) return b.make((a) => this.getProgressId(e, a));
3745
3745
  const n = ie(e) ? Zr(e, t) : e, r = L();
3746
3746
  t.attacheHooks(this.hooks), t.addOnDestroy(() => this.release(n.id, r));
3747
3747
  const o = this.getProgressIdNoCtx(t.watcher, n, r);
@@ -3751,7 +3751,7 @@ class Vn {
3751
3751
  const r = "blob" in t.fields ? t.fields.blob !== void 0 : t.fields.incarnation !== void 0, o = this.idToProgress.get(t.id);
3752
3752
  if (o != null)
3753
3753
  return o.attach(e, n), o.mustGetProgress(r);
3754
- const c = new Qr(
3754
+ const a = new Qr(
3755
3755
  this.logger,
3756
3756
  this.clientBlob,
3757
3757
  this.clientProgress,
@@ -3759,10 +3759,10 @@ class Vn {
3759
3759
  this.signer,
3760
3760
  t
3761
3761
  );
3762
- return this.idToProgress.set(t.id, c), c.attach(e, n), c.progress.isUpload && c.progress.isUploadSignMatch && this.uploadQueue.push({
3763
- fn: () => c.uploadBlobTask(),
3762
+ return this.idToProgress.set(t.id, a), a.attach(e, n), a.progress.isUpload && a.progress.isUploadSignMatch && this.uploadQueue.push({
3763
+ fn: () => a.uploadBlobTask(),
3764
3764
  recoverableErrorPredicate: (i) => !We(i)
3765
- }), c.mustGetProgress(r);
3765
+ }), a.mustGetProgress(r);
3766
3766
  }
3767
3767
  /** Decrement counters for the file and remove an uploading if counter == 0. */
3768
3768
  async release(e, t) {
@@ -3807,17 +3807,17 @@ class Vn {
3807
3807
  }
3808
3808
  }
3809
3809
  class Qr {
3810
- constructor(e, t, n, r, o, c) {
3810
+ constructor(e, t, n, r, o, a) {
3811
3811
  d(this, "change", new N());
3812
3812
  d(this, "counter", new v());
3813
3813
  d(this, "progress");
3814
3814
  /** If this is upload progress this field will be defined */
3815
3815
  d(this, "uploadData");
3816
3816
  d(this, "uploadingTerminallyFailed");
3817
- this.logger = e, this.clientBlob = t, this.clientProgress = n, this.nConcurrentPartsUpload = r, this.res = c;
3818
- const i = c.type.name.startsWith("BlobUpload");
3819
- let l;
3820
- i && (this.uploadData = F.parse(c.data), l = Yr(
3817
+ this.logger = e, this.clientBlob = t, this.clientProgress = n, this.nConcurrentPartsUpload = r, this.res = a;
3818
+ const i = a.type.name.startsWith("BlobUpload");
3819
+ let c;
3820
+ i && (this.uploadData = F.parse(a.data), c = Yr(
3821
3821
  o,
3822
3822
  this.uploadData.localPath,
3823
3823
  this.uploadData.pathSignature
@@ -3825,7 +3825,7 @@ class Qr {
3825
3825
  done: !1,
3826
3826
  status: void 0,
3827
3827
  isUpload: i,
3828
- isUploadSignMatch: l,
3828
+ isUploadSignMatch: c,
3829
3829
  lastError: void 0
3830
3830
  };
3831
3831
  }
@@ -3921,7 +3921,7 @@ function We(s) {
3921
3921
  function fe(s) {
3922
3922
  return s.name == "RpcError" && (s.code == "NOT_FOUND" || s.code == "ABORTED" || s.code == "ALREADY_EXISTS");
3923
3923
  }
3924
- class qn {
3924
+ class Vn {
3925
3925
  constructor(e, t = {
3926
3926
  nConcurrentGetLogs: 10,
3927
3927
  pollingInterval: 1e3,
@@ -3949,10 +3949,10 @@ class qn {
3949
3949
  if (n == null) return b.make((i) => this.getLastLogs(e, t, i));
3950
3950
  const r = R(e, n), o = L();
3951
3951
  n.attacheHooks(this.hooks), n.addOnDestroy(() => this.releaseLastLogs(r.id, o));
3952
- const c = this.getLastLogsNoCtx(n.watcher, r, t, o);
3952
+ const a = this.getLastLogsNoCtx(n.watcher, r, t, o);
3953
3953
  return n.markUnstable(
3954
3954
  "The logs are from stream, so we consider them unstable. Final values will be got from blobs."
3955
- ), c;
3955
+ ), a;
3956
3956
  }
3957
3957
  getLastLogsNoCtx(e, t, n, r) {
3958
3958
  let o = this.idToLastLines.get(t.id);
@@ -3961,19 +3961,19 @@ class qn {
3961
3961
  this.idToLastLines.set(t.id, i), o = i;
3962
3962
  }
3963
3963
  o.attach(e, r);
3964
- const c = o.getLog();
3965
- if (c.error != null) throw c.error;
3966
- return c.log;
3964
+ const a = o.getLog();
3965
+ if (a.error != null) throw a.error;
3966
+ return a.log;
3967
3967
  }
3968
3968
  getProgressLog(e, t, n) {
3969
3969
  if (n == null)
3970
3970
  return b.make((i) => this.getProgressLog(e, t, i));
3971
3971
  const r = R(e, n), o = L();
3972
3972
  n.attacheHooks(this.hooks), n.addOnDestroy(() => this.releaseProgressLog(r.id, o));
3973
- const c = this.getProgressLogNoCtx(n.watcher, r, t, o);
3973
+ const a = this.getProgressLogNoCtx(n.watcher, r, t, o);
3974
3974
  return n.markUnstable(
3975
3975
  "The progress log is from the stream, so we consider it unstable. Final value will be got from blobs."
3976
- ), c;
3976
+ ), a;
3977
3977
  }
3978
3978
  getProgressLogNoCtx(e, t, n, r) {
3979
3979
  let o = this.idToProgressLog.get(t.id);
@@ -3982,9 +3982,9 @@ class qn {
3982
3982
  this.idToProgressLog.set(t.id, i), o = i;
3983
3983
  }
3984
3984
  o.attach(e, r);
3985
- const c = o.getLog();
3986
- if (c.error) throw c.error;
3987
- return c.log;
3985
+ const a = o.getLog();
3986
+ if (a.error) throw a.error;
3987
+ return a.log;
3988
3988
  }
3989
3989
  getLogHandle(e, t) {
3990
3990
  if (t == null) return b.make((o) => this.getLogHandle(e, o));
@@ -4112,7 +4112,7 @@ class me {
4112
4112
  }
4113
4113
  }
4114
4114
  }
4115
- class Jn {
4115
+ class qn {
4116
4116
  constructor(e, t, n, r = {
4117
4117
  cacheSoftSizeBytes: 50 * 1024 * 1024,
4118
4118
  withGunzip: !0,
@@ -4139,11 +4139,11 @@ class Jn {
4139
4139
  const r = e.toString(), o = this.urlToDownload.get(r);
4140
4140
  if (o != null)
4141
4141
  return o.attach(t, n), o.getPath();
4142
- const c = this.setNewTask(t, e, n);
4142
+ const a = this.setNewTask(t, e, n);
4143
4143
  return this.downloadQueue.push({
4144
- fn: async () => this.downloadUrl(c, n),
4144
+ fn: async () => this.downloadUrl(a, n),
4145
4145
  recoverableErrorPredicate: (i) => !0
4146
- }), c.getPath();
4146
+ }), a.getPath();
4147
4147
  }
4148
4148
  /** Downloads and extracts a tar archive if it wasn't downloaded yet. */
4149
4149
  async downloadUrl(e, t) {
@@ -4158,10 +4158,10 @@ class Jn {
4158
4158
  if (this.cache.existsFile(r.path)) {
4159
4159
  const o = this.cache.removeFile(r.path, t);
4160
4160
  await Promise.all(
4161
- o.map(async (c) => {
4162
- await X(c.path), this.cache.removeCache(c), this.removeTask(
4163
- c,
4164
- `the task ${JSON.stringify(c)} was removedfrom cache along with ${JSON.stringify(o)}`
4161
+ o.map(async (a) => {
4162
+ await X(a.path), this.cache.removeCache(a), this.removeTask(
4163
+ a,
4164
+ `the task ${JSON.stringify(a)} was removedfrom cache along with ${JSON.stringify(o)}`
4165
4165
  );
4166
4166
  })
4167
4167
  );
@@ -4226,8 +4226,8 @@ class Kr {
4226
4226
  const i = Ke.toWeb(it.createGunzip());
4227
4227
  o = o.pipeThrough(i, { signal: n });
4228
4228
  }
4229
- const c = ne.toWeb(at.extract(this.path));
4230
- return await o.pipeTo(c, { signal: n }), r.size;
4229
+ const a = ne.toWeb(at.extract(this.path));
4230
+ return await o.pipeTo(a, { signal: n }), r.size;
4231
4231
  }
4232
4232
  getPath() {
4233
4233
  if (this.done) return { path: K(this.path) };
@@ -4327,9 +4327,32 @@ function dn(s) {
4327
4327
  function hn(s) {
4328
4328
  return { name: `LS/${s}`, version: "1" };
4329
4329
  }
4330
+ async function un() {
4331
+ const s = nt.homedir();
4332
+ if (Z.sep == "/")
4333
+ return [
4334
+ {
4335
+ name: "local",
4336
+ root: "/",
4337
+ initialPath: s
4338
+ }
4339
+ ];
4340
+ {
4341
+ const t = Z.parse(s).root.replaceAll(":\\", "");
4342
+ return (await ct.promisify(dt)("wmic logicaldisk get name")).stdout.split(`\r
4343
+ `).filter((o) => o.includes(":")).map((o) => o.trim().replaceAll(":", "")).map((o) => {
4344
+ const a = o == t;
4345
+ return {
4346
+ name: `local_disk_${o}`,
4347
+ root: `${o}:\\`,
4348
+ initialPath: a ? s : `${o}:\\`
4349
+ };
4350
+ });
4351
+ }
4352
+ }
4330
4353
  class Me {
4331
- constructor(e, t, n, r, o, c, i) {
4332
- this.logger = e, this.lsClient = t, this.storageIdToResourceId = n, this.signer = r, this.virtualStoragesMap = o, this.localProjectionsMap = c, this.openFileDialogCallback = i;
4354
+ constructor(e, t, n, r, o, a, i) {
4355
+ this.logger = e, this.lsClient = t, this.storageIdToResourceId = n, this.signer = r, this.virtualStoragesMap = o, this.localProjectionsMap = a, this.openFileDialogCallback = i;
4333
4356
  }
4334
4357
  async getLocalFileContent(e, t) {
4335
4358
  const n = await this.tryResolveLocalFileHandle(e);
@@ -4400,8 +4423,7 @@ class Me {
4400
4423
  const e = [...this.virtualStoragesMap.values()].map((r) => ({
4401
4424
  name: r.name,
4402
4425
  handle: sn(r.name, r.root),
4403
- initialFullPath: r.initialPath,
4404
- isInitialPathHome: r.isInitialPathHome
4426
+ initialFullPath: r.initialPath
4405
4427
  })), n = Object.entries(this.storageIdToResourceId).map(
4406
4428
  ([r, o]) => ({
4407
4429
  name: r,
@@ -4427,12 +4449,12 @@ class Me {
4427
4449
  {
4428
4450
  w.sep === "/" && t === "" && (t = "/"), n.rootPath === "" && B(t);
4429
4451
  const r = w.isAbsolute(t) ? t : w.join(n.rootPath, t), o = [];
4430
- for await (const c of await m.opendir(r)) {
4431
- if (!c.isFile() && !c.isDirectory()) continue;
4432
- const i = w.join(r, c.name);
4452
+ for await (const a of await m.opendir(r)) {
4453
+ if (!a.isFile() && !a.isDirectory()) continue;
4454
+ const i = w.join(r, a.name);
4433
4455
  o.push({
4434
- type: c.isFile() ? "file" : "dir",
4435
- name: c.name,
4456
+ type: a.isFile() ? "file" : "dir",
4457
+ name: a.name,
4436
4458
  fullPath: i,
4437
4459
  handle: await this.getLocalFileHandle(i)
4438
4460
  });
@@ -4440,83 +4462,55 @@ class Me {
4440
4462
  return { entries: o };
4441
4463
  }
4442
4464
  }
4443
- static async init(e, t, n, r, o, c) {
4465
+ static async init(e, t, n, r, o, a) {
4444
4466
  const i = _r(t, e);
4445
- for (const p of r) B(p.root);
4446
- for (const p of o) p.localPath !== "" && B(p.localPath);
4447
- const l = new Map(r.map((p) => [p.name, p])), a = new Map(o.map((p) => [p.storageId, p]));
4448
- if ((/* @__PURE__ */ new Set([...l.keys(), ...a.keys()])).size !== l.size + a.size)
4467
+ a || (a = await un());
4468
+ for (const p of a) B(p.root);
4469
+ for (const p of r) p.localPath !== "" && B(p.localPath);
4470
+ const c = new Map(a.map((p) => [p.name, p])), l = new Map(r.map((p) => [p.storageId, p]));
4471
+ if ((/* @__PURE__ */ new Set([...c.keys(), ...l.keys()])).size !== c.size + l.size)
4449
4472
  throw new Error(
4450
4473
  "Intersection between local projection storage ids and virtual storages names detected."
4451
4474
  );
4452
4475
  return new Me(
4453
4476
  e,
4454
4477
  i,
4455
- await un(t),
4478
+ await pn(t),
4456
4479
  n,
4480
+ c,
4457
4481
  l,
4458
- a,
4459
- c
4482
+ o
4460
4483
  );
4461
4484
  }
4462
4485
  }
4463
- async function un(s) {
4486
+ async function pn(s) {
4464
4487
  return s.withReadTx("GetAvailableStorageIds", async (e) => {
4465
4488
  const t = await e.getResourceByName("LSProvider"), n = await e.getResourceData(t, !0);
4466
- return pn(n);
4489
+ return gn(n);
4467
4490
  });
4468
4491
  }
4469
- function pn(s) {
4492
+ function gn(s) {
4470
4493
  return Object.fromEntries(
4471
4494
  s.fields.filter((e) => e.type == "Dynamic" && Ze(e.value)).map((e) => [e.name.substring(8), e.value])
4472
4495
  );
4473
4496
  }
4474
- async function Zn() {
4475
- const s = nt.homedir();
4476
- if (Z.sep == "/")
4477
- return [
4478
- {
4479
- name: "local",
4480
- root: "/",
4481
- initialPath: s,
4482
- isInitialPathHome: !0
4483
- }
4484
- ];
4485
- const t = Z.parse(s).root.replaceAll(":\\", ""), n = await ct.promisify(dt)("wmic logicaldisk get name"), r = gn(n.stdout);
4486
- return fn(r, t, s);
4487
- }
4488
- function gn(s) {
4489
- return s.split(`\r
4490
- `).filter((e) => e.includes(":")).map((e) => e.trim().replaceAll(":", ""));
4491
- }
4492
- function fn(s, e, t) {
4493
- return s.map((n) => {
4494
- const r = n == e;
4495
- return {
4496
- name: `local_disk_${n}`,
4497
- root: `${n}:\\`,
4498
- initialPath: r ? t : `${n}:\\`,
4499
- isInitialPathHome: r
4500
- };
4501
- });
4502
- }
4503
4497
  export {
4504
4498
  ir as ClientDownload,
4505
4499
  $r as ClientLogs,
4506
4500
  yr as ClientLs,
4507
4501
  Qt as ClientProgress,
4508
4502
  Ot as ClientUpload,
4509
- Zn as DefaultVirtualLocalStorages,
4503
+ un as DefaultVirtualLocalStorages,
4510
4504
  xr as Download,
4511
- Hn as DownloadDriver,
4512
- Jn as DownloadUrlDriver,
4513
- Gn as ImportFileHandleData,
4505
+ Mn as DownloadDriver,
4506
+ qn as DownloadUrlDriver,
4507
+ jn as ImportFileHandleData,
4514
4508
  Ee as ImportFileHandleIndexData,
4515
4509
  F as ImportFileHandleUploadData,
4516
4510
  Jr as IndexResourceSnapshot,
4517
- Mn as LogsDriver,
4518
- qn as LogsStreamDriver,
4519
- An as LongUpdater,
4511
+ xn as LogsDriver,
4512
+ Vn as LogsStreamDriver,
4513
+ Wn as LongUpdater,
4520
4514
  Me as LsDriver,
4521
4515
  Pe as MTimeError,
4522
4516
  Ct as NetworkError,
@@ -4525,26 +4519,24 @@ export {
4525
4519
  Ie as UnexpectedEOF,
4526
4520
  Ne as UnknownStorageError,
4527
4521
  Be as Updater,
4528
- Vn as UploadDriver,
4522
+ Gn as UploadDriver,
4529
4523
  qr as UploadResourceSnapshot,
4530
4524
  Ue as WrongLocalFileUrl,
4531
- On as createDownloadClient,
4532
- Fn as createLogsClient,
4525
+ Cn as createDownloadClient,
4526
+ On as createLogsClient,
4533
4527
  _r as createLsFilesClient,
4534
- Wn as createUploadBlobClient,
4535
- En as createUploadProgressClient,
4528
+ En as createUploadBlobClient,
4529
+ Fn as createUploadProgressClient,
4536
4530
  $e as dataToHandle,
4537
- zn as getStream,
4531
+ An as getStream,
4538
4532
  _ as handleToData,
4539
4533
  lr as headersFromProto,
4540
4534
  C as isLiveLogHandle,
4541
4535
  Fr as isReadyLogHandle,
4542
4536
  Or as lineToProgress,
4543
4537
  Zr as makeBlobImportSnapshot,
4544
- xn as mixcrProgressFromLogs,
4538
+ zn as mixcrProgressFromLogs,
4545
4539
  ar as parseLocalFileUrl,
4546
- B as validateAbsolute,
4547
- gn as windowsDrives,
4548
- fn as windowsStorages
4540
+ B as validateAbsolute
4549
4541
  };
4550
4542
  //# sourceMappingURL=index.mjs.map