@uniformdev/next-app-router 20.63.0 → 20.63.1-alpha.12

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.esm.js CHANGED
@@ -4,6 +4,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __typeError = (msg) => {
8
+ throw TypeError(msg);
9
+ };
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
11
  var __commonJS = (cb, mod) => function __require() {
8
12
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
13
  };
@@ -23,12 +27,25 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
23
27
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
24
28
  mod
25
29
  ));
30
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
31
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
32
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
33
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
34
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
35
+ var __privateWrapper = (obj, member, setter, getter) => ({
36
+ set _(value) {
37
+ __privateSet(obj, member, value, setter);
38
+ },
39
+ get _() {
40
+ return __privateGet(obj, member, getter);
41
+ }
42
+ });
26
43
 
27
44
  // ../../node_modules/.pnpm/yocto-queue@0.1.0/node_modules/yocto-queue/index.js
28
45
  var require_yocto_queue = __commonJS({
29
46
  "../../node_modules/.pnpm/yocto-queue@0.1.0/node_modules/yocto-queue/index.js"(exports, module) {
30
47
  "use strict";
31
- var Node = class {
48
+ var Node2 = class {
32
49
  /// value;
33
50
  /// next;
34
51
  constructor(value) {
@@ -36,7 +53,7 @@ var require_yocto_queue = __commonJS({
36
53
  this.next = void 0;
37
54
  }
38
55
  };
39
- var Queue = class {
56
+ var Queue2 = class {
40
57
  // TODO: Use private class fields when targeting Node.js 12.
41
58
  // #_head;
42
59
  // #_tail;
@@ -45,7 +62,7 @@ var require_yocto_queue = __commonJS({
45
62
  this.clear();
46
63
  }
47
64
  enqueue(value) {
48
- const node = new Node(value);
65
+ const node = new Node2(value);
49
66
  if (this._head) {
50
67
  this._tail.next = node;
51
68
  this._tail = node;
@@ -80,7 +97,7 @@ var require_yocto_queue = __commonJS({
80
97
  }
81
98
  }
82
99
  };
83
- module.exports = Queue;
100
+ module.exports = Queue2;
84
101
  }
85
102
  });
86
103
 
@@ -88,12 +105,12 @@ var require_yocto_queue = __commonJS({
88
105
  var require_p_limit = __commonJS({
89
106
  "../../node_modules/.pnpm/p-limit@3.1.0/node_modules/p-limit/index.js"(exports, module) {
90
107
  "use strict";
91
- var Queue = require_yocto_queue();
92
- var pLimit2 = (concurrency) => {
108
+ var Queue2 = require_yocto_queue();
109
+ var pLimit3 = (concurrency) => {
93
110
  if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) {
94
111
  throw new TypeError("Expected `concurrency` to be a number from 1 and up");
95
112
  }
96
- const queue = new Queue();
113
+ const queue = new Queue2();
97
114
  let activeCount = 0;
98
115
  const next = () => {
99
116
  activeCount--;
@@ -138,7 +155,238 @@ var require_p_limit = __commonJS({
138
155
  });
139
156
  return generator;
140
157
  };
141
- module.exports = pLimit2;
158
+ module.exports = pLimit3;
159
+ }
160
+ });
161
+
162
+ // ../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js
163
+ var require_retry_operation = __commonJS({
164
+ "../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js"(exports, module) {
165
+ "use strict";
166
+ function RetryOperation(timeouts, options) {
167
+ if (typeof options === "boolean") {
168
+ options = { forever: options };
169
+ }
170
+ this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));
171
+ this._timeouts = timeouts;
172
+ this._options = options || {};
173
+ this._maxRetryTime = options && options.maxRetryTime || Infinity;
174
+ this._fn = null;
175
+ this._errors = [];
176
+ this._attempts = 1;
177
+ this._operationTimeout = null;
178
+ this._operationTimeoutCb = null;
179
+ this._timeout = null;
180
+ this._operationStart = null;
181
+ this._timer = null;
182
+ if (this._options.forever) {
183
+ this._cachedTimeouts = this._timeouts.slice(0);
184
+ }
185
+ }
186
+ module.exports = RetryOperation;
187
+ RetryOperation.prototype.reset = function() {
188
+ this._attempts = 1;
189
+ this._timeouts = this._originalTimeouts.slice(0);
190
+ };
191
+ RetryOperation.prototype.stop = function() {
192
+ if (this._timeout) {
193
+ clearTimeout(this._timeout);
194
+ }
195
+ if (this._timer) {
196
+ clearTimeout(this._timer);
197
+ }
198
+ this._timeouts = [];
199
+ this._cachedTimeouts = null;
200
+ };
201
+ RetryOperation.prototype.retry = function(err) {
202
+ if (this._timeout) {
203
+ clearTimeout(this._timeout);
204
+ }
205
+ if (!err) {
206
+ return false;
207
+ }
208
+ var currentTime = (/* @__PURE__ */ new Date()).getTime();
209
+ if (err && currentTime - this._operationStart >= this._maxRetryTime) {
210
+ this._errors.push(err);
211
+ this._errors.unshift(new Error("RetryOperation timeout occurred"));
212
+ return false;
213
+ }
214
+ this._errors.push(err);
215
+ var timeout = this._timeouts.shift();
216
+ if (timeout === void 0) {
217
+ if (this._cachedTimeouts) {
218
+ this._errors.splice(0, this._errors.length - 1);
219
+ timeout = this._cachedTimeouts.slice(-1);
220
+ } else {
221
+ return false;
222
+ }
223
+ }
224
+ var self = this;
225
+ this._timer = setTimeout(function() {
226
+ self._attempts++;
227
+ if (self._operationTimeoutCb) {
228
+ self._timeout = setTimeout(function() {
229
+ self._operationTimeoutCb(self._attempts);
230
+ }, self._operationTimeout);
231
+ if (self._options.unref) {
232
+ self._timeout.unref();
233
+ }
234
+ }
235
+ self._fn(self._attempts);
236
+ }, timeout);
237
+ if (this._options.unref) {
238
+ this._timer.unref();
239
+ }
240
+ return true;
241
+ };
242
+ RetryOperation.prototype.attempt = function(fn, timeoutOps) {
243
+ this._fn = fn;
244
+ if (timeoutOps) {
245
+ if (timeoutOps.timeout) {
246
+ this._operationTimeout = timeoutOps.timeout;
247
+ }
248
+ if (timeoutOps.cb) {
249
+ this._operationTimeoutCb = timeoutOps.cb;
250
+ }
251
+ }
252
+ var self = this;
253
+ if (this._operationTimeoutCb) {
254
+ this._timeout = setTimeout(function() {
255
+ self._operationTimeoutCb();
256
+ }, self._operationTimeout);
257
+ }
258
+ this._operationStart = (/* @__PURE__ */ new Date()).getTime();
259
+ this._fn(this._attempts);
260
+ };
261
+ RetryOperation.prototype.try = function(fn) {
262
+ console.log("Using RetryOperation.try() is deprecated");
263
+ this.attempt(fn);
264
+ };
265
+ RetryOperation.prototype.start = function(fn) {
266
+ console.log("Using RetryOperation.start() is deprecated");
267
+ this.attempt(fn);
268
+ };
269
+ RetryOperation.prototype.start = RetryOperation.prototype.try;
270
+ RetryOperation.prototype.errors = function() {
271
+ return this._errors;
272
+ };
273
+ RetryOperation.prototype.attempts = function() {
274
+ return this._attempts;
275
+ };
276
+ RetryOperation.prototype.mainError = function() {
277
+ if (this._errors.length === 0) {
278
+ return null;
279
+ }
280
+ var counts = {};
281
+ var mainError = null;
282
+ var mainErrorCount = 0;
283
+ for (var i = 0; i < this._errors.length; i++) {
284
+ var error = this._errors[i];
285
+ var message = error.message;
286
+ var count = (counts[message] || 0) + 1;
287
+ counts[message] = count;
288
+ if (count >= mainErrorCount) {
289
+ mainError = error;
290
+ mainErrorCount = count;
291
+ }
292
+ }
293
+ return mainError;
294
+ };
295
+ }
296
+ });
297
+
298
+ // ../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js
299
+ var require_retry = __commonJS({
300
+ "../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js"(exports) {
301
+ "use strict";
302
+ var RetryOperation = require_retry_operation();
303
+ exports.operation = function(options) {
304
+ var timeouts = exports.timeouts(options);
305
+ return new RetryOperation(timeouts, {
306
+ forever: options && (options.forever || options.retries === Infinity),
307
+ unref: options && options.unref,
308
+ maxRetryTime: options && options.maxRetryTime
309
+ });
310
+ };
311
+ exports.timeouts = function(options) {
312
+ if (options instanceof Array) {
313
+ return [].concat(options);
314
+ }
315
+ var opts = {
316
+ retries: 10,
317
+ factor: 2,
318
+ minTimeout: 1 * 1e3,
319
+ maxTimeout: Infinity,
320
+ randomize: false
321
+ };
322
+ for (var key in options) {
323
+ opts[key] = options[key];
324
+ }
325
+ if (opts.minTimeout > opts.maxTimeout) {
326
+ throw new Error("minTimeout is greater than maxTimeout");
327
+ }
328
+ var timeouts = [];
329
+ for (var i = 0; i < opts.retries; i++) {
330
+ timeouts.push(this.createTimeout(i, opts));
331
+ }
332
+ if (options && options.forever && !timeouts.length) {
333
+ timeouts.push(this.createTimeout(i, opts));
334
+ }
335
+ timeouts.sort(function(a, b) {
336
+ return a - b;
337
+ });
338
+ return timeouts;
339
+ };
340
+ exports.createTimeout = function(attempt, opts) {
341
+ var random = opts.randomize ? Math.random() + 1 : 1;
342
+ var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt));
343
+ timeout = Math.min(timeout, opts.maxTimeout);
344
+ return timeout;
345
+ };
346
+ exports.wrap = function(obj, options, methods) {
347
+ if (options instanceof Array) {
348
+ methods = options;
349
+ options = null;
350
+ }
351
+ if (!methods) {
352
+ methods = [];
353
+ for (var key in obj) {
354
+ if (typeof obj[key] === "function") {
355
+ methods.push(key);
356
+ }
357
+ }
358
+ }
359
+ for (var i = 0; i < methods.length; i++) {
360
+ var method = methods[i];
361
+ var original = obj[method];
362
+ obj[method] = function retryWrapper(original2) {
363
+ var op = exports.operation(options);
364
+ var args = Array.prototype.slice.call(arguments, 1);
365
+ var callback = args.pop();
366
+ args.push(function(err) {
367
+ if (op.retry(err)) {
368
+ return;
369
+ }
370
+ if (err) {
371
+ arguments[0] = op.mainError();
372
+ }
373
+ callback.apply(this, arguments);
374
+ });
375
+ op.attempt(function() {
376
+ original2.apply(obj, args);
377
+ });
378
+ }.bind(obj, original);
379
+ obj[method].options = options;
380
+ }
381
+ };
382
+ }
383
+ });
384
+
385
+ // ../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js
386
+ var require_retry2 = __commonJS({
387
+ "../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js"(exports, module) {
388
+ "use strict";
389
+ module.exports = require_retry();
142
390
  }
143
391
  });
144
392
 
@@ -151,14 +399,14 @@ import "server-only";
151
399
  // ../context/dist/api/api.mjs
152
400
  var import_p_limit = __toESM(require_p_limit(), 1);
153
401
  var __defProp2 = Object.defineProperty;
154
- var __typeError = (msg) => {
402
+ var __typeError2 = (msg) => {
155
403
  throw TypeError(msg);
156
404
  };
157
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
158
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
159
- var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
160
- var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
161
- var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
405
+ var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
406
+ var __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
407
+ var __accessCheck2 = (obj, member, msg) => member.has(obj) || __typeError2("Cannot " + msg);
408
+ var __privateGet2 = (obj, member, getter) => (__accessCheck2(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
409
+ var __privateAdd2 = (obj, member, value) => member.has(obj) ? __typeError2("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
162
410
  var defaultLimitPolicy = (0, import_p_limit.default)(6);
163
411
  var ApiClientError = class _ApiClientError extends Error {
164
412
  constructor(errorMessage, fetchMethod, fetchUri, statusCode, statusText, requestId) {
@@ -177,7 +425,7 @@ var ApiClientError = class _ApiClientError extends Error {
177
425
  };
178
426
  var ApiClient = class _ApiClient {
179
427
  constructor(options) {
180
- __publicField(this, "options");
428
+ __publicField2(this, "options");
181
429
  var _a, _b, _c, _d, _e;
182
430
  if (!options.apiKey && !options.bearerToken) {
183
431
  throw new Error("You must provide an API key or a bearer token");
@@ -347,12 +595,12 @@ var _AggregateClient = class _AggregateClient2 extends ApiClient {
347
595
  /** Fetches all aggregates for a project */
348
596
  async get(options) {
349
597
  const { projectId } = this.options;
350
- const fetchUri = this.createUrl(__privateGet(_AggregateClient2, _url), { ...options, projectId });
598
+ const fetchUri = this.createUrl(__privateGet2(_AggregateClient2, _url), { ...options, projectId });
351
599
  return await this.apiClient(fetchUri);
352
600
  }
353
601
  /** Updates or creates (based on id) an Aggregate */
354
602
  async upsert(body) {
355
- const fetchUri = this.createUrl(__privateGet(_AggregateClient2, _url));
603
+ const fetchUri = this.createUrl(__privateGet2(_AggregateClient2, _url));
356
604
  await this.apiClient(fetchUri, {
357
605
  method: "PUT",
358
606
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -361,7 +609,7 @@ var _AggregateClient = class _AggregateClient2 extends ApiClient {
361
609
  }
362
610
  /** Deletes an Aggregate */
363
611
  async remove(body) {
364
- const fetchUri = this.createUrl(__privateGet(_AggregateClient2, _url));
612
+ const fetchUri = this.createUrl(__privateGet2(_AggregateClient2, _url));
365
613
  await this.apiClient(fetchUri, {
366
614
  method: "DELETE",
367
615
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -370,7 +618,7 @@ var _AggregateClient = class _AggregateClient2 extends ApiClient {
370
618
  }
371
619
  };
372
620
  _url = /* @__PURE__ */ new WeakMap();
373
- __privateAdd(_AggregateClient, _url, "/api/v2/aggregate");
621
+ __privateAdd2(_AggregateClient, _url, "/api/v2/aggregate");
374
622
  var _url2;
375
623
  var _DimensionClient = class _DimensionClient2 extends ApiClient {
376
624
  constructor(options) {
@@ -379,12 +627,12 @@ var _DimensionClient = class _DimensionClient2 extends ApiClient {
379
627
  /** Fetches the known score dimensions for a project */
380
628
  async get(options) {
381
629
  const { projectId } = this.options;
382
- const fetchUri = this.createUrl(__privateGet(_DimensionClient2, _url2), { ...options, projectId });
630
+ const fetchUri = this.createUrl(__privateGet2(_DimensionClient2, _url2), { ...options, projectId });
383
631
  return await this.apiClient(fetchUri);
384
632
  }
385
633
  };
386
634
  _url2 = /* @__PURE__ */ new WeakMap();
387
- __privateAdd(_DimensionClient, _url2, "/api/v2/dimension");
635
+ __privateAdd2(_DimensionClient, _url2, "/api/v2/dimension");
388
636
  var _url3;
389
637
  var _valueUrl;
390
638
  var _EnrichmentClient = class _EnrichmentClient2 extends ApiClient {
@@ -394,12 +642,12 @@ var _EnrichmentClient = class _EnrichmentClient2 extends ApiClient {
394
642
  /** Fetches all enrichments and values for a project, grouped by category */
395
643
  async get(options) {
396
644
  const { projectId } = this.options;
397
- const fetchUri = this.createUrl(__privateGet(_EnrichmentClient2, _url3), { ...options, projectId });
645
+ const fetchUri = this.createUrl(__privateGet2(_EnrichmentClient2, _url3), { ...options, projectId });
398
646
  return await this.apiClient(fetchUri);
399
647
  }
400
648
  /** Updates or creates (based on id) an enrichment category */
401
649
  async upsertCategory(body) {
402
- const fetchUri = this.createUrl(__privateGet(_EnrichmentClient2, _url3));
650
+ const fetchUri = this.createUrl(__privateGet2(_EnrichmentClient2, _url3));
403
651
  await this.apiClient(fetchUri, {
404
652
  method: "PUT",
405
653
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -408,7 +656,7 @@ var _EnrichmentClient = class _EnrichmentClient2 extends ApiClient {
408
656
  }
409
657
  /** Deletes an enrichment category */
410
658
  async removeCategory(body) {
411
- const fetchUri = this.createUrl(__privateGet(_EnrichmentClient2, _url3));
659
+ const fetchUri = this.createUrl(__privateGet2(_EnrichmentClient2, _url3));
412
660
  await this.apiClient(fetchUri, {
413
661
  method: "DELETE",
414
662
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -417,7 +665,7 @@ var _EnrichmentClient = class _EnrichmentClient2 extends ApiClient {
417
665
  }
418
666
  /** Updates or creates (based on id) an enrichment value within an enrichment category */
419
667
  async upsertValue(body) {
420
- const fetchUri = this.createUrl(__privateGet(_EnrichmentClient2, _valueUrl));
668
+ const fetchUri = this.createUrl(__privateGet2(_EnrichmentClient2, _valueUrl));
421
669
  await this.apiClient(fetchUri, {
422
670
  method: "PUT",
423
671
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -426,7 +674,7 @@ var _EnrichmentClient = class _EnrichmentClient2 extends ApiClient {
426
674
  }
427
675
  /** Deletes an enrichment value within an enrichment category. The category is left alone. */
428
676
  async removeValue(body) {
429
- const fetchUri = this.createUrl(__privateGet(_EnrichmentClient2, _valueUrl));
677
+ const fetchUri = this.createUrl(__privateGet2(_EnrichmentClient2, _valueUrl));
430
678
  await this.apiClient(fetchUri, {
431
679
  method: "DELETE",
432
680
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -436,8 +684,8 @@ var _EnrichmentClient = class _EnrichmentClient2 extends ApiClient {
436
684
  };
437
685
  _url3 = /* @__PURE__ */ new WeakMap();
438
686
  _valueUrl = /* @__PURE__ */ new WeakMap();
439
- __privateAdd(_EnrichmentClient, _url3, "/api/v1/enrichments");
440
- __privateAdd(_EnrichmentClient, _valueUrl, "/api/v1/enrichment-values");
687
+ __privateAdd2(_EnrichmentClient, _url3, "/api/v1/enrichments");
688
+ __privateAdd2(_EnrichmentClient, _valueUrl, "/api/v1/enrichment-values");
441
689
  var _url4;
442
690
  var _ManifestClient = class _ManifestClient2 extends ApiClient {
443
691
  constructor(options) {
@@ -446,7 +694,7 @@ var _ManifestClient = class _ManifestClient2 extends ApiClient {
446
694
  /** Fetches the Context manifest for a project */
447
695
  async get(options) {
448
696
  const { projectId } = this.options;
449
- const fetchUri = this.createUrl(__privateGet(_ManifestClient2, _url4), { ...options, projectId });
697
+ const fetchUri = this.createUrl(__privateGet2(_ManifestClient2, _url4), { ...options, projectId });
450
698
  return await this.apiClient(fetchUri);
451
699
  }
452
700
  /** Publishes the Context manifest for a project */
@@ -460,7 +708,7 @@ var _ManifestClient = class _ManifestClient2 extends ApiClient {
460
708
  }
461
709
  };
462
710
  _url4 = /* @__PURE__ */ new WeakMap();
463
- __privateAdd(_ManifestClient, _url4, "/api/v2/manifest");
711
+ __privateAdd2(_ManifestClient, _url4, "/api/v2/manifest");
464
712
  var ManifestClient = _ManifestClient;
465
713
  var _url5;
466
714
  var _QuirkClient = class _QuirkClient2 extends ApiClient {
@@ -470,12 +718,12 @@ var _QuirkClient = class _QuirkClient2 extends ApiClient {
470
718
  /** Fetches all Quirks for a project */
471
719
  async get(options) {
472
720
  const { projectId } = this.options;
473
- const fetchUri = this.createUrl(__privateGet(_QuirkClient2, _url5), { ...options, projectId });
721
+ const fetchUri = this.createUrl(__privateGet2(_QuirkClient2, _url5), { ...options, projectId });
474
722
  return await this.apiClient(fetchUri);
475
723
  }
476
724
  /** Updates or creates (based on id) a Quirk */
477
725
  async upsert(body) {
478
- const fetchUri = this.createUrl(__privateGet(_QuirkClient2, _url5));
726
+ const fetchUri = this.createUrl(__privateGet2(_QuirkClient2, _url5));
479
727
  await this.apiClient(fetchUri, {
480
728
  method: "PUT",
481
729
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -484,7 +732,7 @@ var _QuirkClient = class _QuirkClient2 extends ApiClient {
484
732
  }
485
733
  /** Deletes a Quirk */
486
734
  async remove(body) {
487
- const fetchUri = this.createUrl(__privateGet(_QuirkClient2, _url5));
735
+ const fetchUri = this.createUrl(__privateGet2(_QuirkClient2, _url5));
488
736
  await this.apiClient(fetchUri, {
489
737
  method: "DELETE",
490
738
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -493,7 +741,7 @@ var _QuirkClient = class _QuirkClient2 extends ApiClient {
493
741
  }
494
742
  };
495
743
  _url5 = /* @__PURE__ */ new WeakMap();
496
- __privateAdd(_QuirkClient, _url5, "/api/v2/quirk");
744
+ __privateAdd2(_QuirkClient, _url5, "/api/v2/quirk");
497
745
  var _url6;
498
746
  var _SignalClient = class _SignalClient2 extends ApiClient {
499
747
  constructor(options) {
@@ -502,12 +750,12 @@ var _SignalClient = class _SignalClient2 extends ApiClient {
502
750
  /** Fetches all Signals for a project */
503
751
  async get(options) {
504
752
  const { projectId } = this.options;
505
- const fetchUri = this.createUrl(__privateGet(_SignalClient2, _url6), { ...options, projectId });
753
+ const fetchUri = this.createUrl(__privateGet2(_SignalClient2, _url6), { ...options, projectId });
506
754
  return await this.apiClient(fetchUri);
507
755
  }
508
756
  /** Updates or creates (based on id) a Signal */
509
757
  async upsert(body) {
510
- const fetchUri = this.createUrl(__privateGet(_SignalClient2, _url6));
758
+ const fetchUri = this.createUrl(__privateGet2(_SignalClient2, _url6));
511
759
  await this.apiClient(fetchUri, {
512
760
  method: "PUT",
513
761
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -516,7 +764,7 @@ var _SignalClient = class _SignalClient2 extends ApiClient {
516
764
  }
517
765
  /** Deletes a Signal */
518
766
  async remove(body) {
519
- const fetchUri = this.createUrl(__privateGet(_SignalClient2, _url6));
767
+ const fetchUri = this.createUrl(__privateGet2(_SignalClient2, _url6));
520
768
  await this.apiClient(fetchUri, {
521
769
  method: "DELETE",
522
770
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -525,425 +773,219 @@ var _SignalClient = class _SignalClient2 extends ApiClient {
525
773
  }
526
774
  };
527
775
  _url6 = /* @__PURE__ */ new WeakMap();
528
- __privateAdd(_SignalClient, _url6, "/api/v2/signal");
776
+ __privateAdd2(_SignalClient, _url6, "/api/v2/signal");
529
777
  var _url7;
530
778
  var _TestClient = class _TestClient2 extends ApiClient {
531
- constructor(options) {
532
- super(options);
533
- }
534
- /** Fetches all Tests for a project */
535
- async get(options) {
536
- const { projectId } = this.options;
537
- const fetchUri = this.createUrl(__privateGet(_TestClient2, _url7), { ...options, projectId });
538
- return await this.apiClient(fetchUri);
539
- }
540
- /** Updates or creates (based on id) a Test */
541
- async upsert(body) {
542
- const fetchUri = this.createUrl(__privateGet(_TestClient2, _url7));
543
- await this.apiClient(fetchUri, {
544
- method: "PUT",
545
- body: JSON.stringify({ ...body, projectId: this.options.projectId }),
546
- expectNoContent: true
547
- });
548
- }
549
- /** Deletes a Test */
550
- async remove(body) {
551
- const fetchUri = this.createUrl(__privateGet(_TestClient2, _url7));
552
- await this.apiClient(fetchUri, {
553
- method: "DELETE",
554
- body: JSON.stringify({ ...body, projectId: this.options.projectId }),
555
- expectNoContent: true
556
- });
557
- }
558
- };
559
- _url7 = /* @__PURE__ */ new WeakMap();
560
- __privateAdd(_TestClient, _url7, "/api/v2/test");
561
-
562
- // ../canvas/dist/index.mjs
563
- var __create2 = Object.create;
564
- var __defProp3 = Object.defineProperty;
565
- var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
566
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
567
- var __getProtoOf2 = Object.getPrototypeOf;
568
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
569
- var __typeError2 = (msg) => {
570
- throw TypeError(msg);
571
- };
572
- var __commonJS2 = (cb, mod) => function __require() {
573
- return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
574
- };
575
- var __copyProps2 = (to, from, except, desc) => {
576
- if (from && typeof from === "object" || typeof from === "function") {
577
- for (let key of __getOwnPropNames2(from))
578
- if (!__hasOwnProp2.call(to, key) && key !== except)
579
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
580
- }
581
- return to;
582
- };
583
- var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
584
- // If the importer is in node compatibility mode or this is not an ESM
585
- // file that has been converted to a CommonJS file using a Babel-
586
- // compatible transform (i.e. "__esModule" has not been set), then set
587
- // "default" to the CommonJS "module.exports" for node compatibility.
588
- isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target,
589
- mod
590
- ));
591
- var __accessCheck2 = (obj, member, msg) => member.has(obj) || __typeError2("Cannot " + msg);
592
- var __privateGet2 = (obj, member, getter) => (__accessCheck2(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
593
- var __privateAdd2 = (obj, member, value) => member.has(obj) ? __typeError2("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
594
- var require_yocto_queue2 = __commonJS2({
595
- "../../node_modules/.pnpm/yocto-queue@0.1.0/node_modules/yocto-queue/index.js"(exports, module) {
596
- "use strict";
597
- var Node = class {
598
- /// value;
599
- /// next;
600
- constructor(value) {
601
- this.value = value;
602
- this.next = void 0;
603
- }
604
- };
605
- var Queue = class {
606
- // TODO: Use private class fields when targeting Node.js 12.
607
- // #_head;
608
- // #_tail;
609
- // #_size;
610
- constructor() {
611
- this.clear();
612
- }
613
- enqueue(value) {
614
- const node = new Node(value);
615
- if (this._head) {
616
- this._tail.next = node;
617
- this._tail = node;
618
- } else {
619
- this._head = node;
620
- this._tail = node;
621
- }
622
- this._size++;
623
- }
624
- dequeue() {
625
- const current = this._head;
626
- if (!current) {
627
- return;
628
- }
629
- this._head = this._head.next;
630
- this._size--;
631
- return current.value;
632
- }
633
- clear() {
634
- this._head = void 0;
635
- this._tail = void 0;
636
- this._size = 0;
637
- }
638
- get size() {
639
- return this._size;
640
- }
641
- *[Symbol.iterator]() {
642
- let current = this._head;
643
- while (current) {
644
- yield current.value;
645
- current = current.next;
646
- }
647
- }
648
- };
649
- module.exports = Queue;
650
- }
651
- });
652
- var require_p_limit2 = __commonJS2({
653
- "../../node_modules/.pnpm/p-limit@3.1.0/node_modules/p-limit/index.js"(exports, module) {
654
- "use strict";
655
- var Queue = require_yocto_queue2();
656
- var pLimit2 = (concurrency) => {
657
- if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) {
658
- throw new TypeError("Expected `concurrency` to be a number from 1 and up");
659
- }
660
- const queue = new Queue();
661
- let activeCount = 0;
662
- const next = () => {
663
- activeCount--;
664
- if (queue.size > 0) {
665
- queue.dequeue()();
666
- }
667
- };
668
- const run = async (fn, resolve, ...args) => {
669
- activeCount++;
670
- const result = (async () => fn(...args))();
671
- resolve(result);
672
- try {
673
- await result;
674
- } catch (e) {
675
- }
676
- next();
677
- };
678
- const enqueue = (fn, resolve, ...args) => {
679
- queue.enqueue(run.bind(null, fn, resolve, ...args));
680
- (async () => {
681
- await Promise.resolve();
682
- if (activeCount < concurrency && queue.size > 0) {
683
- queue.dequeue()();
684
- }
685
- })();
686
- };
687
- const generator = (fn, ...args) => new Promise((resolve) => {
688
- enqueue(fn, resolve, ...args);
689
- });
690
- Object.defineProperties(generator, {
691
- activeCount: {
692
- get: () => activeCount
693
- },
694
- pendingCount: {
695
- get: () => queue.size
696
- },
697
- clearQueue: {
698
- value: () => {
699
- queue.clear();
700
- }
701
- }
702
- });
703
- return generator;
704
- };
705
- module.exports = pLimit2;
706
- }
707
- });
708
- var require_retry_operation = __commonJS2({
709
- "../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js"(exports, module) {
710
- "use strict";
711
- function RetryOperation(timeouts, options) {
712
- if (typeof options === "boolean") {
713
- options = { forever: options };
714
- }
715
- this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));
716
- this._timeouts = timeouts;
717
- this._options = options || {};
718
- this._maxRetryTime = options && options.maxRetryTime || Infinity;
719
- this._fn = null;
720
- this._errors = [];
721
- this._attempts = 1;
722
- this._operationTimeout = null;
723
- this._operationTimeoutCb = null;
724
- this._timeout = null;
725
- this._operationStart = null;
726
- this._timer = null;
727
- if (this._options.forever) {
728
- this._cachedTimeouts = this._timeouts.slice(0);
729
- }
730
- }
731
- module.exports = RetryOperation;
732
- RetryOperation.prototype.reset = function() {
733
- this._attempts = 1;
734
- this._timeouts = this._originalTimeouts.slice(0);
735
- };
736
- RetryOperation.prototype.stop = function() {
737
- if (this._timeout) {
738
- clearTimeout(this._timeout);
739
- }
740
- if (this._timer) {
741
- clearTimeout(this._timer);
742
- }
743
- this._timeouts = [];
744
- this._cachedTimeouts = null;
745
- };
746
- RetryOperation.prototype.retry = function(err) {
747
- if (this._timeout) {
748
- clearTimeout(this._timeout);
749
- }
750
- if (!err) {
751
- return false;
752
- }
753
- var currentTime = (/* @__PURE__ */ new Date()).getTime();
754
- if (err && currentTime - this._operationStart >= this._maxRetryTime) {
755
- this._errors.push(err);
756
- this._errors.unshift(new Error("RetryOperation timeout occurred"));
757
- return false;
758
- }
759
- this._errors.push(err);
760
- var timeout = this._timeouts.shift();
761
- if (timeout === void 0) {
762
- if (this._cachedTimeouts) {
763
- this._errors.splice(0, this._errors.length - 1);
764
- timeout = this._cachedTimeouts.slice(-1);
765
- } else {
766
- return false;
767
- }
768
- }
769
- var self = this;
770
- this._timer = setTimeout(function() {
771
- self._attempts++;
772
- if (self._operationTimeoutCb) {
773
- self._timeout = setTimeout(function() {
774
- self._operationTimeoutCb(self._attempts);
775
- }, self._operationTimeout);
776
- if (self._options.unref) {
777
- self._timeout.unref();
778
- }
779
- }
780
- self._fn(self._attempts);
781
- }, timeout);
782
- if (this._options.unref) {
783
- this._timer.unref();
784
- }
785
- return true;
786
- };
787
- RetryOperation.prototype.attempt = function(fn, timeoutOps) {
788
- this._fn = fn;
789
- if (timeoutOps) {
790
- if (timeoutOps.timeout) {
791
- this._operationTimeout = timeoutOps.timeout;
792
- }
793
- if (timeoutOps.cb) {
794
- this._operationTimeoutCb = timeoutOps.cb;
795
- }
796
- }
797
- var self = this;
798
- if (this._operationTimeoutCb) {
799
- this._timeout = setTimeout(function() {
800
- self._operationTimeoutCb();
801
- }, self._operationTimeout);
802
- }
803
- this._operationStart = (/* @__PURE__ */ new Date()).getTime();
804
- this._fn(this._attempts);
805
- };
806
- RetryOperation.prototype.try = function(fn) {
807
- console.log("Using RetryOperation.try() is deprecated");
808
- this.attempt(fn);
809
- };
810
- RetryOperation.prototype.start = function(fn) {
811
- console.log("Using RetryOperation.start() is deprecated");
812
- this.attempt(fn);
813
- };
814
- RetryOperation.prototype.start = RetryOperation.prototype.try;
815
- RetryOperation.prototype.errors = function() {
816
- return this._errors;
817
- };
818
- RetryOperation.prototype.attempts = function() {
819
- return this._attempts;
820
- };
821
- RetryOperation.prototype.mainError = function() {
822
- if (this._errors.length === 0) {
823
- return null;
824
- }
825
- var counts = {};
826
- var mainError = null;
827
- var mainErrorCount = 0;
828
- for (var i = 0; i < this._errors.length; i++) {
829
- var error = this._errors[i];
830
- var message = error.message;
831
- var count = (counts[message] || 0) + 1;
832
- counts[message] = count;
833
- if (count >= mainErrorCount) {
834
- mainError = error;
835
- mainErrorCount = count;
836
- }
837
- }
838
- return mainError;
839
- };
779
+ constructor(options) {
780
+ super(options);
840
781
  }
841
- });
842
- var require_retry = __commonJS2({
843
- "../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js"(exports) {
844
- "use strict";
845
- var RetryOperation = require_retry_operation();
846
- exports.operation = function(options) {
847
- var timeouts = exports.timeouts(options);
848
- return new RetryOperation(timeouts, {
849
- forever: options && (options.forever || options.retries === Infinity),
850
- unref: options && options.unref,
851
- maxRetryTime: options && options.maxRetryTime
852
- });
853
- };
854
- exports.timeouts = function(options) {
855
- if (options instanceof Array) {
856
- return [].concat(options);
857
- }
858
- var opts = {
859
- retries: 10,
860
- factor: 2,
861
- minTimeout: 1 * 1e3,
862
- maxTimeout: Infinity,
863
- randomize: false
864
- };
865
- for (var key in options) {
866
- opts[key] = options[key];
867
- }
868
- if (opts.minTimeout > opts.maxTimeout) {
869
- throw new Error("minTimeout is greater than maxTimeout");
870
- }
871
- var timeouts = [];
872
- for (var i = 0; i < opts.retries; i++) {
873
- timeouts.push(this.createTimeout(i, opts));
874
- }
875
- if (options && options.forever && !timeouts.length) {
876
- timeouts.push(this.createTimeout(i, opts));
782
+ /** Fetches all Tests for a project */
783
+ async get(options) {
784
+ const { projectId } = this.options;
785
+ const fetchUri = this.createUrl(__privateGet2(_TestClient2, _url7), { ...options, projectId });
786
+ return await this.apiClient(fetchUri);
787
+ }
788
+ /** Updates or creates (based on id) a Test */
789
+ async upsert(body) {
790
+ const fetchUri = this.createUrl(__privateGet2(_TestClient2, _url7));
791
+ await this.apiClient(fetchUri, {
792
+ method: "PUT",
793
+ body: JSON.stringify({ ...body, projectId: this.options.projectId }),
794
+ expectNoContent: true
795
+ });
796
+ }
797
+ /** Deletes a Test */
798
+ async remove(body) {
799
+ const fetchUri = this.createUrl(__privateGet2(_TestClient2, _url7));
800
+ await this.apiClient(fetchUri, {
801
+ method: "DELETE",
802
+ body: JSON.stringify({ ...body, projectId: this.options.projectId }),
803
+ expectNoContent: true
804
+ });
805
+ }
806
+ };
807
+ _url7 = /* @__PURE__ */ new WeakMap();
808
+ __privateAdd2(_TestClient, _url7, "/api/v2/test");
809
+
810
+ // ../../node_modules/.pnpm/yocto-queue@1.2.2/node_modules/yocto-queue/index.js
811
+ var Node = class {
812
+ constructor(value) {
813
+ __publicField(this, "value");
814
+ __publicField(this, "next");
815
+ this.value = value;
816
+ }
817
+ };
818
+ var _head, _tail, _size;
819
+ var Queue = class {
820
+ constructor() {
821
+ __privateAdd(this, _head);
822
+ __privateAdd(this, _tail);
823
+ __privateAdd(this, _size);
824
+ this.clear();
825
+ }
826
+ enqueue(value) {
827
+ const node = new Node(value);
828
+ if (__privateGet(this, _head)) {
829
+ __privateGet(this, _tail).next = node;
830
+ __privateSet(this, _tail, node);
831
+ } else {
832
+ __privateSet(this, _head, node);
833
+ __privateSet(this, _tail, node);
834
+ }
835
+ __privateWrapper(this, _size)._++;
836
+ }
837
+ dequeue() {
838
+ const current = __privateGet(this, _head);
839
+ if (!current) {
840
+ return;
841
+ }
842
+ __privateSet(this, _head, __privateGet(this, _head).next);
843
+ __privateWrapper(this, _size)._--;
844
+ if (!__privateGet(this, _head)) {
845
+ __privateSet(this, _tail, void 0);
846
+ }
847
+ return current.value;
848
+ }
849
+ peek() {
850
+ if (!__privateGet(this, _head)) {
851
+ return;
852
+ }
853
+ return __privateGet(this, _head).value;
854
+ }
855
+ clear() {
856
+ __privateSet(this, _head, void 0);
857
+ __privateSet(this, _tail, void 0);
858
+ __privateSet(this, _size, 0);
859
+ }
860
+ get size() {
861
+ return __privateGet(this, _size);
862
+ }
863
+ *[Symbol.iterator]() {
864
+ let current = __privateGet(this, _head);
865
+ while (current) {
866
+ yield current.value;
867
+ current = current.next;
868
+ }
869
+ }
870
+ *drain() {
871
+ while (__privateGet(this, _head)) {
872
+ yield this.dequeue();
873
+ }
874
+ }
875
+ };
876
+ _head = new WeakMap();
877
+ _tail = new WeakMap();
878
+ _size = new WeakMap();
879
+
880
+ // ../../node_modules/.pnpm/p-limit@6.2.0/node_modules/p-limit/index.js
881
+ function pLimit2(concurrency) {
882
+ validateConcurrency(concurrency);
883
+ const queue = new Queue();
884
+ let activeCount = 0;
885
+ const resumeNext = () => {
886
+ if (activeCount < concurrency && queue.size > 0) {
887
+ queue.dequeue()();
888
+ activeCount++;
889
+ }
890
+ };
891
+ const next = () => {
892
+ activeCount--;
893
+ resumeNext();
894
+ };
895
+ const run = async (function_, resolve, arguments_) => {
896
+ const result = (async () => function_(...arguments_))();
897
+ resolve(result);
898
+ try {
899
+ await result;
900
+ } catch (e) {
901
+ }
902
+ next();
903
+ };
904
+ const enqueue = (function_, resolve, arguments_) => {
905
+ new Promise((internalResolve) => {
906
+ queue.enqueue(internalResolve);
907
+ }).then(
908
+ run.bind(void 0, function_, resolve, arguments_)
909
+ );
910
+ (async () => {
911
+ await Promise.resolve();
912
+ if (activeCount < concurrency) {
913
+ resumeNext();
877
914
  }
878
- timeouts.sort(function(a, b) {
879
- return a - b;
880
- });
881
- return timeouts;
882
- };
883
- exports.createTimeout = function(attempt, opts) {
884
- var random = opts.randomize ? Math.random() + 1 : 1;
885
- var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt));
886
- timeout = Math.min(timeout, opts.maxTimeout);
887
- return timeout;
888
- };
889
- exports.wrap = function(obj, options, methods) {
890
- if (options instanceof Array) {
891
- methods = options;
892
- options = null;
915
+ })();
916
+ };
917
+ const generator = (function_, ...arguments_) => new Promise((resolve) => {
918
+ enqueue(function_, resolve, arguments_);
919
+ });
920
+ Object.defineProperties(generator, {
921
+ activeCount: {
922
+ get: () => activeCount
923
+ },
924
+ pendingCount: {
925
+ get: () => queue.size
926
+ },
927
+ clearQueue: {
928
+ value() {
929
+ queue.clear();
893
930
  }
894
- if (!methods) {
895
- methods = [];
896
- for (var key in obj) {
897
- if (typeof obj[key] === "function") {
898
- methods.push(key);
931
+ },
932
+ concurrency: {
933
+ get: () => concurrency,
934
+ set(newConcurrency) {
935
+ validateConcurrency(newConcurrency);
936
+ concurrency = newConcurrency;
937
+ queueMicrotask(() => {
938
+ while (activeCount < concurrency && queue.size > 0) {
939
+ resumeNext();
899
940
  }
900
- }
901
- }
902
- for (var i = 0; i < methods.length; i++) {
903
- var method = methods[i];
904
- var original = obj[method];
905
- obj[method] = function retryWrapper(original2) {
906
- var op = exports.operation(options);
907
- var args = Array.prototype.slice.call(arguments, 1);
908
- var callback = args.pop();
909
- args.push(function(err) {
910
- if (op.retry(err)) {
911
- return;
912
- }
913
- if (err) {
914
- arguments[0] = op.mainError();
915
- }
916
- callback.apply(this, arguments);
917
- });
918
- op.attempt(function() {
919
- original2.apply(obj, args);
920
- });
921
- }.bind(obj, original);
922
- obj[method].options = options;
941
+ });
923
942
  }
924
- };
925
- }
926
- });
927
- var require_retry2 = __commonJS2({
928
- "../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js"(exports, module) {
929
- "use strict";
930
- module.exports = require_retry();
943
+ }
944
+ });
945
+ return generator;
946
+ }
947
+ function validateConcurrency(concurrency) {
948
+ if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {
949
+ throw new TypeError("Expected `concurrency` to be a number from 1 and up");
931
950
  }
932
- });
933
- var import_p_limit2 = __toESM2(require_p_limit2());
934
- var import_retry = __toESM2(require_retry2(), 1);
935
- var networkErrorMsgs = /* @__PURE__ */ new Set([
951
+ }
952
+
953
+ // ../../node_modules/.pnpm/p-retry@6.2.1/node_modules/p-retry/index.js
954
+ var import_retry = __toESM(require_retry2(), 1);
955
+
956
+ // ../../node_modules/.pnpm/is-network-error@1.1.0/node_modules/is-network-error/index.js
957
+ var objectToString = Object.prototype.toString;
958
+ var isError = (value) => objectToString.call(value) === "[object Error]";
959
+ var errorMessages = /* @__PURE__ */ new Set([
960
+ "network error",
961
+ // Chrome
936
962
  "Failed to fetch",
937
963
  // Chrome
938
964
  "NetworkError when attempting to fetch resource.",
939
965
  // Firefox
940
966
  "The Internet connection appears to be offline.",
941
- // Safari
967
+ // Safari 16
968
+ "Load failed",
969
+ // Safari 17+
942
970
  "Network request failed",
943
971
  // `cross-fetch`
944
- "fetch failed"
972
+ "fetch failed",
973
+ // Undici (Node.js)
974
+ "terminated"
945
975
  // Undici (Node.js)
946
976
  ]);
977
+ function isNetworkError(error) {
978
+ const isValid = error && isError(error) && error.name === "TypeError" && typeof error.message === "string";
979
+ if (!isValid) {
980
+ return false;
981
+ }
982
+ if (error.message === "Load failed") {
983
+ return error.stack === void 0;
984
+ }
985
+ return errorMessages.has(error.message);
986
+ }
987
+
988
+ // ../../node_modules/.pnpm/p-retry@6.2.1/node_modules/p-retry/index.js
947
989
  var AbortError = class extends Error {
948
990
  constructor(message) {
949
991
  super();
@@ -964,63 +1006,68 @@ var decorateErrorWithCounts = (error, attemptNumber, options) => {
964
1006
  error.retriesLeft = retriesLeft;
965
1007
  return error;
966
1008
  };
967
- var isNetworkError = (errorMessage) => networkErrorMsgs.has(errorMessage);
968
- var getDOMException = (errorMessage) => globalThis.DOMException === void 0 ? new Error(errorMessage) : new DOMException(errorMessage);
969
1009
  async function pRetry(input, options) {
970
1010
  return new Promise((resolve, reject) => {
971
- options = {
972
- onFailedAttempt() {
973
- },
974
- retries: 10,
975
- ...options
1011
+ var _a, _b, _c;
1012
+ options = { ...options };
1013
+ (_a = options.onFailedAttempt) != null ? _a : options.onFailedAttempt = () => {
976
1014
  };
1015
+ (_b = options.shouldRetry) != null ? _b : options.shouldRetry = () => true;
1016
+ (_c = options.retries) != null ? _c : options.retries = 10;
977
1017
  const operation = import_retry.default.operation(options);
1018
+ const abortHandler = () => {
1019
+ var _a2;
1020
+ operation.stop();
1021
+ reject((_a2 = options.signal) == null ? void 0 : _a2.reason);
1022
+ };
1023
+ if (options.signal && !options.signal.aborted) {
1024
+ options.signal.addEventListener("abort", abortHandler, { once: true });
1025
+ }
1026
+ const cleanUp = () => {
1027
+ var _a2;
1028
+ (_a2 = options.signal) == null ? void 0 : _a2.removeEventListener("abort", abortHandler);
1029
+ operation.stop();
1030
+ };
978
1031
  operation.attempt(async (attemptNumber) => {
979
1032
  try {
980
- resolve(await input(attemptNumber));
1033
+ const result = await input(attemptNumber);
1034
+ cleanUp();
1035
+ resolve(result);
981
1036
  } catch (error) {
982
- if (!(error instanceof Error)) {
983
- reject(new TypeError(`Non-error was thrown: "${error}". You should only throw errors.`));
984
- return;
985
- }
986
- if (error instanceof AbortError) {
987
- operation.stop();
988
- reject(error.originalError);
989
- } else if (error instanceof TypeError && !isNetworkError(error.message)) {
990
- operation.stop();
991
- reject(error);
992
- } else {
1037
+ try {
1038
+ if (!(error instanceof Error)) {
1039
+ throw new TypeError(`Non-error was thrown: "${error}". You should only throw errors.`);
1040
+ }
1041
+ if (error instanceof AbortError) {
1042
+ throw error.originalError;
1043
+ }
1044
+ if (error instanceof TypeError && !isNetworkError(error)) {
1045
+ throw error;
1046
+ }
993
1047
  decorateErrorWithCounts(error, attemptNumber, options);
994
- try {
995
- await options.onFailedAttempt(error);
996
- } catch (error2) {
997
- reject(error2);
998
- return;
1048
+ if (!await options.shouldRetry(error)) {
1049
+ operation.stop();
1050
+ reject(error);
999
1051
  }
1052
+ await options.onFailedAttempt(error);
1000
1053
  if (!operation.retry(error)) {
1001
- reject(operation.mainError());
1054
+ throw operation.mainError();
1002
1055
  }
1056
+ } catch (finalError) {
1057
+ decorateErrorWithCounts(finalError, attemptNumber, options);
1058
+ cleanUp();
1059
+ reject(finalError);
1003
1060
  }
1004
1061
  }
1005
1062
  });
1006
- if (options.signal && !options.signal.aborted) {
1007
- options.signal.addEventListener("abort", () => {
1008
- operation.stop();
1009
- const reason = options.signal.reason === void 0 ? getDOMException("The operation was aborted.") : options.signal.reason;
1010
- reject(reason instanceof Error ? reason : getDOMException(reason));
1011
- }, {
1012
- once: true
1013
- });
1014
- }
1015
1063
  });
1016
1064
  }
1017
- var AbortError2 = class extends Error {
1018
- constructor() {
1019
- super("Throttled function aborted");
1020
- this.name = "AbortError";
1021
- }
1022
- };
1023
- function pThrottle({ limit, interval, strict }) {
1065
+
1066
+ // ../../node_modules/.pnpm/p-throttle@7.0.0/node_modules/p-throttle/index.js
1067
+ var registry = new FinalizationRegistry(({ signal, aborted }) => {
1068
+ signal == null ? void 0 : signal.removeEventListener("abort", aborted);
1069
+ });
1070
+ function pThrottle({ limit, interval, strict, signal, onDelay }) {
1024
1071
  if (!Number.isFinite(limit)) {
1025
1072
  throw new TypeError("Expected `limit` to be a finite number");
1026
1073
  }
@@ -1048,53 +1095,75 @@ function pThrottle({ limit, interval, strict }) {
1048
1095
  const strictTicks = [];
1049
1096
  function strictDelay() {
1050
1097
  const now = Date.now();
1051
- if (strictTicks.length < limit) {
1052
- strictTicks.push(now);
1053
- return 0;
1098
+ if (strictTicks.length > 0 && now - strictTicks.at(-1) > interval) {
1099
+ strictTicks.length = 0;
1054
1100
  }
1055
- const earliestTime = strictTicks.shift() + interval;
1056
- if (now >= earliestTime) {
1101
+ if (strictTicks.length < limit) {
1057
1102
  strictTicks.push(now);
1058
1103
  return 0;
1059
1104
  }
1060
- strictTicks.push(earliestTime);
1061
- return earliestTime - now;
1105
+ const nextExecutionTime = strictTicks[0] + interval;
1106
+ strictTicks.shift();
1107
+ strictTicks.push(nextExecutionTime);
1108
+ return Math.max(0, nextExecutionTime - now);
1062
1109
  }
1063
1110
  const getDelay = strict ? strictDelay : windowedDelay;
1064
1111
  return (function_) => {
1065
- const throttled = function(...args) {
1112
+ const throttled = function(...arguments_) {
1066
1113
  if (!throttled.isEnabled) {
1067
- return (async () => function_.apply(this, args))();
1114
+ return (async () => function_.apply(this, arguments_))();
1068
1115
  }
1069
- let timeout;
1116
+ let timeoutId;
1070
1117
  return new Promise((resolve, reject) => {
1071
1118
  const execute = () => {
1072
- resolve(function_.apply(this, args));
1073
- queue.delete(timeout);
1119
+ resolve(function_.apply(this, arguments_));
1120
+ queue.delete(timeoutId);
1074
1121
  };
1075
- timeout = setTimeout(execute, getDelay());
1076
- queue.set(timeout, reject);
1122
+ const delay = getDelay();
1123
+ if (delay > 0) {
1124
+ timeoutId = setTimeout(execute, delay);
1125
+ queue.set(timeoutId, reject);
1126
+ onDelay == null ? void 0 : onDelay(...arguments_);
1127
+ } else {
1128
+ execute();
1129
+ }
1077
1130
  });
1078
1131
  };
1079
- throttled.abort = () => {
1132
+ const aborted = () => {
1080
1133
  for (const timeout of queue.keys()) {
1081
1134
  clearTimeout(timeout);
1082
- queue.get(timeout)(new AbortError2());
1135
+ queue.get(timeout)(signal.reason);
1083
1136
  }
1084
1137
  queue.clear();
1085
1138
  strictTicks.splice(0, strictTicks.length);
1086
1139
  };
1140
+ registry.register(throttled, { signal, aborted });
1141
+ signal == null ? void 0 : signal.throwIfAborted();
1142
+ signal == null ? void 0 : signal.addEventListener("abort", aborted, { once: true });
1087
1143
  throttled.isEnabled = true;
1144
+ Object.defineProperty(throttled, "queueSize", {
1145
+ get() {
1146
+ return queue.size;
1147
+ }
1148
+ });
1088
1149
  return throttled;
1089
1150
  };
1090
1151
  }
1152
+
1153
+ // ../canvas/dist/index.mjs
1154
+ var __typeError3 = (msg) => {
1155
+ throw TypeError(msg);
1156
+ };
1157
+ var __accessCheck3 = (obj, member, msg) => member.has(obj) || __typeError3("Cannot " + msg);
1158
+ var __privateGet3 = (obj, member, getter) => (__accessCheck3(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
1159
+ var __privateAdd3 = (obj, member, value) => member.has(obj) ? __typeError3("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
1091
1160
  function createLimitPolicy({
1092
1161
  throttle = { interval: 1e3, limit: 10 },
1093
- retry: retry2 = { retries: 1, factor: 1.66 },
1162
+ retry: retry3 = { retries: 1, factor: 1.66 },
1094
1163
  limit = 10
1095
1164
  }) {
1096
1165
  const throttler = throttle ? pThrottle(throttle) : null;
1097
- const limiter = limit ? (0, import_p_limit2.default)(limit) : null;
1166
+ const limiter = limit ? pLimit2(limit) : null;
1098
1167
  return function limitPolicy(func) {
1099
1168
  let currentFunc = async () => await func();
1100
1169
  if (throttler) {
@@ -1105,13 +1174,13 @@ function createLimitPolicy({
1105
1174
  const limitFunc = currentFunc;
1106
1175
  currentFunc = () => limiter(limitFunc);
1107
1176
  }
1108
- if (retry2) {
1177
+ if (retry3) {
1109
1178
  const retryFunc = currentFunc;
1110
1179
  currentFunc = () => pRetry(retryFunc, {
1111
- ...retry2,
1180
+ ...retry3,
1112
1181
  onFailedAttempt: async (error) => {
1113
- if (retry2.onFailedAttempt) {
1114
- await retry2.onFailedAttempt(error);
1182
+ if (retry3.onFailedAttempt) {
1183
+ await retry3.onFailedAttempt(error);
1115
1184
  }
1116
1185
  if (error instanceof ApiClientError && typeof error.statusCode === "number" && error.statusCode >= 400 && error.statusCode < 500 && error.statusCode !== 429 && error.statusCode !== 408) {
1117
1186
  throw error;
@@ -1251,7 +1320,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
1251
1320
  }
1252
1321
  getContentTypes(options) {
1253
1322
  const { projectId } = this.options;
1254
- const fetchUri = this.createUrl(__privateGet2(_ContentClient2, _contentTypesUrl), { ...options, projectId });
1323
+ const fetchUri = this.createUrl(__privateGet3(_ContentClient2, _contentTypesUrl), { ...options, projectId });
1255
1324
  return this.apiClient(fetchUri);
1256
1325
  }
1257
1326
  getEntries(options) {
@@ -1259,11 +1328,11 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
1259
1328
  const { skipDataResolution, filters, ...params } = options;
1260
1329
  const rewrittenFilters = rewriteFiltersForApi(filters);
1261
1330
  if (skipDataResolution) {
1262
- const url = this.createUrl(__privateGet2(_ContentClient2, _entriesUrl), { ...params, ...rewrittenFilters, projectId });
1331
+ const url = this.createUrl(__privateGet3(_ContentClient2, _entriesUrl), { ...params, ...rewrittenFilters, projectId });
1263
1332
  return this.apiClient(url);
1264
1333
  }
1265
1334
  const edgeUrl = this.createUrl(
1266
- __privateGet2(_ContentClient2, _entriesUrl),
1335
+ __privateGet3(_ContentClient2, _entriesUrl),
1267
1336
  { ...this.getEdgeOptions(params), ...rewrittenFilters },
1268
1337
  this.edgeApiHost
1269
1338
  );
@@ -1281,7 +1350,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
1281
1350
  return this.apiClient(historyUrl);
1282
1351
  }
1283
1352
  async upsertContentType(body, opts = {}) {
1284
- const fetchUri = this.createUrl(__privateGet2(_ContentClient2, _contentTypesUrl));
1353
+ const fetchUri = this.createUrl(__privateGet3(_ContentClient2, _contentTypesUrl));
1285
1354
  if (typeof body.contentType.slugSettings === "object" && body.contentType.slugSettings !== null && Object.keys(body.contentType.slugSettings).length === 0) {
1286
1355
  delete body.contentType.slugSettings;
1287
1356
  }
@@ -1293,7 +1362,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
1293
1362
  });
1294
1363
  }
1295
1364
  async upsertEntry(body, options) {
1296
- const fetchUri = this.createUrl(__privateGet2(_ContentClient2, _entriesUrl));
1365
+ const fetchUri = this.createUrl(__privateGet3(_ContentClient2, _entriesUrl));
1297
1366
  const headers = {};
1298
1367
  if (options == null ? void 0 : options.ifUnmodifiedSince) {
1299
1368
  headers["x-if-unmodified-since"] = options.ifUnmodifiedSince;
@@ -1307,7 +1376,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
1307
1376
  return { modified: response.headers.get("x-modified-at") };
1308
1377
  }
1309
1378
  async deleteContentType(body) {
1310
- const fetchUri = this.createUrl(__privateGet2(_ContentClient2, _contentTypesUrl));
1379
+ const fetchUri = this.createUrl(__privateGet3(_ContentClient2, _contentTypesUrl));
1311
1380
  await this.apiClient(fetchUri, {
1312
1381
  method: "DELETE",
1313
1382
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -1315,7 +1384,7 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
1315
1384
  });
1316
1385
  }
1317
1386
  async deleteEntry(body) {
1318
- const fetchUri = this.createUrl(__privateGet2(_ContentClient2, _entriesUrl));
1387
+ const fetchUri = this.createUrl(__privateGet3(_ContentClient2, _entriesUrl));
1319
1388
  await this.apiClient(fetchUri, {
1320
1389
  method: "DELETE",
1321
1390
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -1334,8 +1403,8 @@ var _ContentClient = class _ContentClient2 extends ApiClient {
1334
1403
  };
1335
1404
  _contentTypesUrl = /* @__PURE__ */ new WeakMap();
1336
1405
  _entriesUrl = /* @__PURE__ */ new WeakMap();
1337
- __privateAdd2(_ContentClient, _contentTypesUrl, "/api/v1/content-types");
1338
- __privateAdd2(_ContentClient, _entriesUrl, "/api/v1/entries");
1406
+ __privateAdd3(_ContentClient, _contentTypesUrl, "/api/v1/content-types");
1407
+ __privateAdd3(_ContentClient, _entriesUrl, "/api/v1/entries");
1339
1408
  var _url8;
1340
1409
  var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
1341
1410
  constructor(options) {
@@ -1344,12 +1413,12 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
1344
1413
  /** Fetches all DataTypes for a project */
1345
1414
  async get(options) {
1346
1415
  const { projectId } = this.options;
1347
- const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8), { ...options, projectId });
1416
+ const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8), { ...options, projectId });
1348
1417
  return await this.apiClient(fetchUri);
1349
1418
  }
1350
1419
  /** Updates or creates (based on id) a DataType */
1351
1420
  async upsert(body) {
1352
- const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8));
1421
+ const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8));
1353
1422
  await this.apiClient(fetchUri, {
1354
1423
  method: "PUT",
1355
1424
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -1358,7 +1427,7 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
1358
1427
  }
1359
1428
  /** Deletes a DataType */
1360
1429
  async remove(body) {
1361
- const fetchUri = this.createUrl(__privateGet2(_DataTypeClient2, _url8));
1430
+ const fetchUri = this.createUrl(__privateGet3(_DataTypeClient2, _url8));
1362
1431
  await this.apiClient(fetchUri, {
1363
1432
  method: "DELETE",
1364
1433
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -1367,7 +1436,7 @@ var _DataTypeClient = class _DataTypeClient2 extends ApiClient {
1367
1436
  }
1368
1437
  };
1369
1438
  _url8 = /* @__PURE__ */ new WeakMap();
1370
- __privateAdd2(_DataTypeClient, _url8, "/api/v1/data-types");
1439
+ __privateAdd3(_DataTypeClient, _url8, "/api/v1/data-types");
1371
1440
  function getComponentPath(ancestorsAndSelf) {
1372
1441
  const path = [];
1373
1442
  for (let i = ancestorsAndSelf.length - 1; i >= 0; i--) {
@@ -1506,7 +1575,7 @@ function hasReferencedVariables(value) {
1506
1575
  return variableTokenCount;
1507
1576
  }
1508
1577
  function walkNodeTree(node, visitor, options) {
1509
- var _a, _b;
1578
+ var _a, _b, _c;
1510
1579
  const componentQueue = [
1511
1580
  {
1512
1581
  ancestorsAndSelf: Array.isArray(node) ? node : [{ node, type: "root" }],
@@ -1514,12 +1583,14 @@ function walkNodeTree(node, visitor, options) {
1514
1583
  }
1515
1584
  ];
1516
1585
  const childContexts = /* @__PURE__ */ new Map();
1586
+ const order = (_a = options == null ? void 0 : options.order) != null ? _a : "dfs";
1587
+ const takeNext = () => order === "bfs" ? componentQueue.shift() : componentQueue.pop();
1517
1588
  do {
1518
- const currentQueueEntry = componentQueue.pop();
1589
+ const currentQueueEntry = takeNext();
1519
1590
  if (!currentQueueEntry) continue;
1520
1591
  const currentComponent = currentQueueEntry.ancestorsAndSelf[0];
1521
1592
  let visitDescendants = true;
1522
- let descendantContext = (_a = childContexts.get(currentComponent.node)) != null ? _a : currentQueueEntry.context;
1593
+ let descendantContext = (_b = childContexts.get(currentComponent.node)) != null ? _b : currentQueueEntry.context;
1523
1594
  let visitorInfo;
1524
1595
  if (currentComponent.type === "root" && isRootEntryReference(currentComponent) || currentComponent.type === "block") {
1525
1596
  visitorInfo = {
@@ -1706,39 +1777,11 @@ function walkNodeTree(node, visitor, options) {
1706
1777
  continue;
1707
1778
  }
1708
1779
  const slots = "slots" in currentComponent.node && currentComponent.node.slots;
1709
- if (slots) {
1710
- const slotKeys = Object.keys(slots);
1711
- for (let slotIndex = slotKeys.length - 1; slotIndex >= 0; slotIndex--) {
1712
- const slotKey = slotKeys[slotIndex];
1713
- const components = slots[slotKey];
1714
- for (let componentIndex = components.length - 1; componentIndex >= 0; componentIndex--) {
1715
- const enqueueingComponent = components[componentIndex];
1716
- const parentSlotIndexFn = () => {
1717
- const result = currentComponent.node.slots[slotKey].findIndex(
1718
- (x) => x === enqueueingComponent
1719
- );
1720
- return result;
1721
- };
1722
- componentQueue.push({
1723
- ancestorsAndSelf: [
1724
- {
1725
- type: "slot",
1726
- node: enqueueingComponent,
1727
- parentSlot: slotKey,
1728
- parentSlotIndexFn
1729
- },
1730
- ...currentQueueEntry.ancestorsAndSelf
1731
- ],
1732
- context: descendantContext
1733
- });
1734
- }
1735
- }
1736
- }
1780
+ const childEntries = [];
1737
1781
  const properties = getPropertiesValue(currentComponent.node);
1738
1782
  if (properties) {
1739
1783
  const propertyEntries = Object.entries(properties);
1740
- for (let propIndex = propertyEntries.length - 1; propIndex >= 0; propIndex--) {
1741
- const [propKey, propObject] = propertyEntries[propIndex];
1784
+ for (const [propKey, propObject] of propertyEntries) {
1742
1785
  if (!isNestedNodeType(propObject.type)) {
1743
1786
  continue;
1744
1787
  }
@@ -1758,13 +1801,12 @@ function walkNodeTree(node, visitor, options) {
1758
1801
  continue;
1759
1802
  }
1760
1803
  }
1761
- const blocks = (_b = propObject.value) != null ? _b : [];
1762
- for (let blockIndex = blocks.length - 1; blockIndex >= 0; blockIndex--) {
1763
- const enqueueingBlock = blocks[blockIndex];
1804
+ const blocks = (_c = propObject.value) != null ? _c : [];
1805
+ for (const enqueueingBlock of blocks) {
1764
1806
  const blockIndexFn = () => {
1765
1807
  return getBlockValue(currentComponent.node, propKey).findIndex((x) => x === enqueueingBlock);
1766
1808
  };
1767
- componentQueue.push({
1809
+ childEntries.push({
1768
1810
  ancestorsAndSelf: [
1769
1811
  {
1770
1812
  type: "block",
@@ -1779,6 +1821,36 @@ function walkNodeTree(node, visitor, options) {
1779
1821
  }
1780
1822
  }
1781
1823
  }
1824
+ if (slots) {
1825
+ const slotKeys = Object.keys(slots);
1826
+ for (const slotKey of slotKeys) {
1827
+ const components = slots[slotKey];
1828
+ for (const enqueueingComponent of components) {
1829
+ const parentSlotIndexFn = () => {
1830
+ const result = currentComponent.node.slots[slotKey].findIndex(
1831
+ (x) => x === enqueueingComponent
1832
+ );
1833
+ return result;
1834
+ };
1835
+ childEntries.push({
1836
+ ancestorsAndSelf: [
1837
+ {
1838
+ type: "slot",
1839
+ node: enqueueingComponent,
1840
+ parentSlot: slotKey,
1841
+ parentSlotIndexFn
1842
+ },
1843
+ ...currentQueueEntry.ancestorsAndSelf
1844
+ ],
1845
+ context: descendantContext
1846
+ });
1847
+ }
1848
+ }
1849
+ }
1850
+ if (order === "dfs") {
1851
+ childEntries.reverse();
1852
+ }
1853
+ componentQueue.push(...childEntries);
1782
1854
  } while (componentQueue.length > 0);
1783
1855
  }
1784
1856
  function isNestedNodeType(type) {
@@ -1817,7 +1889,7 @@ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2
1817
1889
  * Gets a list of property type and hook names for the current team, including public integrations' hooks.
1818
1890
  */
1819
1891
  get(options) {
1820
- const fetchUri = this.createUrl(__privateGet2(_IntegrationPropertyEditorsClient2, _baseUrl), {
1892
+ const fetchUri = this.createUrl(__privateGet3(_IntegrationPropertyEditorsClient2, _baseUrl), {
1821
1893
  ...options,
1822
1894
  teamId: this.teamId
1823
1895
  });
@@ -1827,7 +1899,7 @@ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2
1827
1899
  * Creates or updates a custom AI property editor on a Mesh app.
1828
1900
  */
1829
1901
  async deploy(body) {
1830
- const fetchUri = this.createUrl(__privateGet2(_IntegrationPropertyEditorsClient2, _baseUrl));
1902
+ const fetchUri = this.createUrl(__privateGet3(_IntegrationPropertyEditorsClient2, _baseUrl));
1831
1903
  await this.apiClient(fetchUri, {
1832
1904
  method: "PUT",
1833
1905
  body: JSON.stringify({ ...body, teamId: this.teamId }),
@@ -1838,7 +1910,7 @@ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2
1838
1910
  * Removes a custom AI property editor from a Mesh app.
1839
1911
  */
1840
1912
  async delete(body) {
1841
- const fetchUri = this.createUrl(__privateGet2(_IntegrationPropertyEditorsClient2, _baseUrl));
1913
+ const fetchUri = this.createUrl(__privateGet3(_IntegrationPropertyEditorsClient2, _baseUrl));
1842
1914
  await this.apiClient(fetchUri, {
1843
1915
  method: "DELETE",
1844
1916
  body: JSON.stringify({ ...body, teamId: this.teamId }),
@@ -1847,7 +1919,7 @@ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient2
1847
1919
  }
1848
1920
  };
1849
1921
  _baseUrl = /* @__PURE__ */ new WeakMap();
1850
- __privateAdd2(_IntegrationPropertyEditorsClient, _baseUrl, "/api/v1/integration-property-editors");
1922
+ __privateAdd3(_IntegrationPropertyEditorsClient, _baseUrl, "/api/v1/integration-property-editors");
1851
1923
  var _url22;
1852
1924
  var _projectsUrl;
1853
1925
  var _ProjectClient = class _ProjectClient2 extends ApiClient {
@@ -1856,7 +1928,7 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
1856
1928
  }
1857
1929
  /** Fetches single Project */
1858
1930
  async get(options) {
1859
- const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url22), { ...options });
1931
+ const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url22), { ...options });
1860
1932
  return await this.apiClient(fetchUri);
1861
1933
  }
1862
1934
  /**
@@ -1865,12 +1937,12 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
1865
1937
  * When omitted, returns all accessible teams and their projects.
1866
1938
  */
1867
1939
  async getProjects(options) {
1868
- const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _projectsUrl), options ? { ...options } : {});
1940
+ const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _projectsUrl), options ? { ...options } : {});
1869
1941
  return await this.apiClient(fetchUri);
1870
1942
  }
1871
1943
  /** Updates or creates (based on id) a Project */
1872
1944
  async upsert(body) {
1873
- const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url22));
1945
+ const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url22));
1874
1946
  return await this.apiClient(fetchUri, {
1875
1947
  method: "PUT",
1876
1948
  body: JSON.stringify({ ...body })
@@ -1878,7 +1950,7 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
1878
1950
  }
1879
1951
  /** Deletes a Project */
1880
1952
  async delete(body) {
1881
- const fetchUri = this.createUrl(__privateGet2(_ProjectClient2, _url22));
1953
+ const fetchUri = this.createUrl(__privateGet3(_ProjectClient2, _url22));
1882
1954
  await this.apiClient(fetchUri, {
1883
1955
  method: "DELETE",
1884
1956
  body: JSON.stringify({ ...body }),
@@ -1888,8 +1960,8 @@ var _ProjectClient = class _ProjectClient2 extends ApiClient {
1888
1960
  };
1889
1961
  _url22 = /* @__PURE__ */ new WeakMap();
1890
1962
  _projectsUrl = /* @__PURE__ */ new WeakMap();
1891
- __privateAdd2(_ProjectClient, _url22, "/api/v1/project");
1892
- __privateAdd2(_ProjectClient, _projectsUrl, "/api/v1/projects");
1963
+ __privateAdd3(_ProjectClient, _url22, "/api/v1/project");
1964
+ __privateAdd3(_ProjectClient, _projectsUrl, "/api/v1/projects");
1893
1965
  var ROUTE_URL = "/api/v1/route";
1894
1966
  var RouteClient = class extends ApiClient {
1895
1967
  constructor(options) {
@@ -2147,7 +2219,7 @@ function createLimiter(concurrency) {
2147
2219
  });
2148
2220
  };
2149
2221
  }
2150
- async function retry(fn, options) {
2222
+ async function retry2(fn, options) {
2151
2223
  let lastError;
2152
2224
  let delay = 1e3;
2153
2225
  for (let attempt = 1; attempt <= options.retries + 1; attempt++) {
@@ -2187,7 +2259,7 @@ function createLimitPolicy2({
2187
2259
  }
2188
2260
  if (retryOptions) {
2189
2261
  const retryFunc = currentFunc;
2190
- currentFunc = () => retry(retryFunc, {
2262
+ currentFunc = () => retry2(retryFunc, {
2191
2263
  ...retryOptions,
2192
2264
  onFailedAttempt: async (error) => {
2193
2265
  if (retryOptions.onFailedAttempt) {
@@ -2321,14 +2393,14 @@ var getManifest = async (options) => {
2321
2393
  import "server-only";
2322
2394
 
2323
2395
  // ../project-map/dist/index.mjs
2324
- var __typeError3 = (msg) => {
2396
+ var __typeError4 = (msg) => {
2325
2397
  throw TypeError(msg);
2326
2398
  };
2327
- var __accessCheck3 = (obj, member, msg) => member.has(obj) || __typeError3("Cannot " + msg);
2328
- var __privateGet3 = (obj, member, getter) => (__accessCheck3(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
2329
- var __privateAdd3 = (obj, member, value) => member.has(obj) ? __typeError3("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
2330
- var __privateSet = (obj, member, value, setter) => (__accessCheck3(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
2331
- var __privateMethod = (obj, member, method) => (__accessCheck3(obj, member, "access private method"), method);
2399
+ var __accessCheck4 = (obj, member, msg) => member.has(obj) || __typeError4("Cannot " + msg);
2400
+ var __privateGet4 = (obj, member, getter) => (__accessCheck4(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
2401
+ var __privateAdd4 = (obj, member, value) => member.has(obj) ? __typeError4("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
2402
+ var __privateSet2 = (obj, member, value, setter) => (__accessCheck4(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
2403
+ var __privateMethod = (obj, member, method) => (__accessCheck4(obj, member, "access private method"), method);
2332
2404
  var ProjectMapClient = class extends ApiClient {
2333
2405
  constructor(options) {
2334
2406
  super(options);
@@ -2475,12 +2547,12 @@ var isDynamicRouteSegment_fn;
2475
2547
  var _Route = class _Route2 {
2476
2548
  constructor(route) {
2477
2549
  this.route = route;
2478
- __privateAdd3(this, _routeInfo);
2550
+ __privateAdd4(this, _routeInfo);
2479
2551
  var _a;
2480
- __privateSet(this, _routeInfo, __privateMethod(_a = _Route2, _Route_static, parseRouteOrPath_fn).call(_a, this.route));
2552
+ __privateSet2(this, _routeInfo, __privateMethod(_a = _Route2, _Route_static, parseRouteOrPath_fn).call(_a, this.route));
2481
2553
  }
2482
2554
  get dynamicSegmentCount() {
2483
- return __privateGet3(this, _routeInfo).segments.reduce(
2555
+ return __privateGet4(this, _routeInfo).segments.reduce(
2484
2556
  (count, segment) => {
2485
2557
  var _a;
2486
2558
  return __privateMethod(_a = _Route2, _Route_static, isDynamicRouteSegment_fn).call(_a, segment) ? count + 1 : count;
@@ -2492,7 +2564,7 @@ var _Route = class _Route2 {
2492
2564
  matches(path) {
2493
2565
  var _a, _b;
2494
2566
  const { segments: pathSegments, queryParams: pathQuery } = __privateMethod(_a = _Route2, _Route_static, parseRouteOrPath_fn).call(_a, path);
2495
- const { segments: routeSegments } = __privateGet3(this, _routeInfo);
2567
+ const { segments: routeSegments } = __privateGet4(this, _routeInfo);
2496
2568
  if (pathSegments.length !== routeSegments.length) {
2497
2569
  return { match: false };
2498
2570
  }
@@ -2513,7 +2585,7 @@ var _Route = class _Route2 {
2513
2585
  return { match: false };
2514
2586
  }
2515
2587
  }
2516
- for (const [key, value] of __privateGet3(this, _routeInfo).queryParams) {
2588
+ for (const [key, value] of __privateGet4(this, _routeInfo).queryParams) {
2517
2589
  possibleMatch.queryParams[key] = pathQuery.has(key) ? pathQuery.get(key) : value;
2518
2590
  }
2519
2591
  return possibleMatch;
@@ -2523,7 +2595,7 @@ var _Route = class _Route2 {
2523
2595
  */
2524
2596
  expand(options) {
2525
2597
  const { dynamicInputValues = {}, allowedQueryParams = [], doNotEscapeVariables = false } = options != null ? options : {};
2526
- const path = __privateGet3(this, _routeInfo).segments.map((segment) => {
2598
+ const path = __privateGet4(this, _routeInfo).segments.map((segment) => {
2527
2599
  const dynamicSegmentName = _Route2.getDynamicRouteSegmentName(segment);
2528
2600
  if (!dynamicSegmentName) {
2529
2601
  return segment;
@@ -2574,7 +2646,7 @@ isDynamicRouteSegment_fn = function(segment) {
2574
2646
  }
2575
2647
  return segment.startsWith(_Route.dynamicSegmentPrefix);
2576
2648
  };
2577
- __privateAdd3(_Route, _Route_static);
2649
+ __privateAdd4(_Route, _Route_static);
2578
2650
  _Route.dynamicSegmentPrefix = ":";
2579
2651
  function encodeRouteComponent(value, doNotEscapeVariables) {
2580
2652
  if (!doNotEscapeVariables) {