@learncard/idx-plugin 1.0.30 → 1.0.31

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.
@@ -1427,9 +1427,9 @@ var require_random = __commonJS({
1427
1427
  }
1428
1428
  });
1429
1429
 
1430
- // ../../../node_modules/.pnpm/dataloader@2.2.2/node_modules/dataloader/index.js
1430
+ // ../../../node_modules/.pnpm/dataloader@2.2.3/node_modules/dataloader/index.js
1431
1431
  var require_dataloader = __commonJS({
1432
- "../../../node_modules/.pnpm/dataloader@2.2.2/node_modules/dataloader/index.js"(exports, module) {
1432
+ "../../../node_modules/.pnpm/dataloader@2.2.3/node_modules/dataloader/index.js"(exports, module) {
1433
1433
  "use strict";
1434
1434
  var DataLoader2 = /* @__PURE__ */ function() {
1435
1435
  function DataLoader3(batchLoadFn, options) {
@@ -1452,8 +1452,9 @@ var require_dataloader = __commonJS({
1452
1452
  }
1453
1453
  var batch = getCurrentBatch(this);
1454
1454
  var cacheMap = this._cacheMap;
1455
- var cacheKey = this._cacheKeyFn(key2);
1455
+ var cacheKey;
1456
1456
  if (cacheMap) {
1457
+ cacheKey = this._cacheKeyFn(key2);
1457
1458
  var cachedPromise = cacheMap.get(cacheKey);
1458
1459
  if (cachedPromise) {
1459
1460
  var cacheHits = batch.cacheHits || (batch.cacheHits = []);
@@ -1577,11 +1578,11 @@ var require_dataloader = __commonJS({
1577
1578
  }
1578
1579
  resolveCacheHits(batch);
1579
1580
  for (var i2 = 0; i2 < batch.callbacks.length; i2++) {
1580
- var value = values[i2];
1581
- if (value instanceof Error) {
1582
- batch.callbacks[i2].reject(value);
1581
+ var _value = values[i2];
1582
+ if (_value instanceof Error) {
1583
+ batch.callbacks[i2].reject(_value);
1583
1584
  } else {
1584
- batch.callbacks[i2].resolve(value);
1585
+ batch.callbacks[i2].resolve(_value);
1585
1586
  }
1586
1587
  }
1587
1588
  })["catch"](function(error) {
@@ -5945,13 +5946,13 @@ function __spreadArray(to, from4, pack) {
5945
5946
  }
5946
5947
  __name(__spreadArray, "__spreadArray");
5947
5948
 
5948
- // ../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/isFunction.js
5949
+ // ../../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/isFunction.js
5949
5950
  function isFunction(value) {
5950
5951
  return typeof value === "function";
5951
5952
  }
5952
5953
  __name(isFunction, "isFunction");
5953
5954
 
5954
- // ../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js
5955
+ // ../../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js
5955
5956
  function createErrorClass(createImpl) {
5956
5957
  var _super = /* @__PURE__ */ __name(function(instance) {
5957
5958
  Error.call(instance);
@@ -5964,7 +5965,7 @@ function createErrorClass(createImpl) {
5964
5965
  }
5965
5966
  __name(createErrorClass, "createErrorClass");
5966
5967
 
5967
- // ../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js
5968
+ // ../../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js
5968
5969
  var UnsubscriptionError = createErrorClass(function(_super) {
5969
5970
  return /* @__PURE__ */ __name(function UnsubscriptionErrorImpl(errors) {
5970
5971
  _super(this);
@@ -5976,7 +5977,7 @@ var UnsubscriptionError = createErrorClass(function(_super) {
5976
5977
  }, "UnsubscriptionErrorImpl");
5977
5978
  });
5978
5979
 
5979
- // ../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js
5980
+ // ../../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js
5980
5981
  function arrRemove(arr, item) {
5981
5982
  if (arr) {
5982
5983
  var index = arr.indexOf(item);
@@ -5985,7 +5986,7 @@ function arrRemove(arr, item) {
5985
5986
  }
5986
5987
  __name(arrRemove, "arrRemove");
5987
5988
 
5988
- // ../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Subscription.js
5989
+ // ../../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/Subscription.js
5989
5990
  var Subscription = function() {
5990
5991
  function Subscription3(initialTeardown) {
5991
5992
  this.initialTeardown = initialTeardown;
@@ -6125,7 +6126,7 @@ function execFinalizer(finalizer) {
6125
6126
  }
6126
6127
  __name(execFinalizer, "execFinalizer");
6127
6128
 
6128
- // ../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/config.js
6129
+ // ../../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/config.js
6129
6130
  var config = {
6130
6131
  onUnhandledError: null,
6131
6132
  onStoppedNotification: null,
@@ -6134,7 +6135,7 @@ var config = {
6134
6135
  useDeprecatedNextContext: false
6135
6136
  };
6136
6137
 
6137
- // ../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js
6138
+ // ../../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js
6138
6139
  var timeoutProvider = {
6139
6140
  setTimeout: function(handler, timeout) {
6140
6141
  var args = [];
@@ -6154,7 +6155,7 @@ var timeoutProvider = {
6154
6155
  delegate: void 0
6155
6156
  };
6156
6157
 
6157
- // ../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js
6158
+ // ../../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js
6158
6159
  function reportUnhandledError(err) {
6159
6160
  timeoutProvider.setTimeout(function() {
6160
6161
  var onUnhandledError = config.onUnhandledError;
@@ -6167,12 +6168,12 @@ function reportUnhandledError(err) {
6167
6168
  }
6168
6169
  __name(reportUnhandledError, "reportUnhandledError");
6169
6170
 
6170
- // ../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/noop.js
6171
+ // ../../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/noop.js
6171
6172
  function noop() {
6172
6173
  }
6173
6174
  __name(noop, "noop");
6174
6175
 
6175
- // ../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js
6176
+ // ../../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js
6176
6177
  var COMPLETE_NOTIFICATION = function() {
6177
6178
  return createNotification("C", void 0, void 0);
6178
6179
  }();
@@ -6193,7 +6194,7 @@ function createNotification(kind, value, error) {
6193
6194
  }
6194
6195
  __name(createNotification, "createNotification");
6195
6196
 
6196
- // ../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/errorContext.js
6197
+ // ../../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/errorContext.js
6197
6198
  var context = null;
6198
6199
  function errorContext(cb) {
6199
6200
  if (config.useDeprecatedSynchronousErrorHandling) {
@@ -6222,7 +6223,7 @@ function captureError(err) {
6222
6223
  }
6223
6224
  __name(captureError, "captureError");
6224
6225
 
6225
- // ../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Subscriber.js
6226
+ // ../../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/Subscriber.js
6226
6227
  var Subscriber = function(_super) {
6227
6228
  __extends2(Subscriber3, _super);
6228
6229
  function Subscriber3(destination) {
@@ -6394,18 +6395,18 @@ var EMPTY_OBSERVER = {
6394
6395
  complete: noop
6395
6396
  };
6396
6397
 
6397
- // ../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/symbol/observable.js
6398
+ // ../../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/symbol/observable.js
6398
6399
  var observable = function() {
6399
6400
  return typeof Symbol === "function" && Symbol.observable || "@@observable";
6400
6401
  }();
6401
6402
 
6402
- // ../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/identity.js
6403
+ // ../../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/identity.js
6403
6404
  function identity3(x) {
6404
6405
  return x;
6405
6406
  }
6406
6407
  __name(identity3, "identity");
6407
6408
 
6408
- // ../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/util/pipe.js
6409
+ // ../../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/pipe.js
6409
6410
  function pipeFromArray(fns) {
6410
6411
  if (fns.length === 0) {
6411
6412
  return identity3;
@@ -6421,7 +6422,7 @@ function pipeFromArray(fns) {
6421
6422
  }
6422
6423
  __name(pipeFromArray, "pipeFromArray");
6423
6424
 
6424
- // ../../../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm5/internal/Observable.js
6425
+ // ../../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/Observable.js
6425
6426
  var Observable = function() {
6426
6427
  function Observable3(subscribe) {
6427
6428
  if (subscribe) {
@@ -47476,24 +47477,25 @@ var require_lodash22 = __commonJS2({
47476
47477
  }
47477
47478
  });
47478
47479
  var require_browser_ponyfill = __commonJS2({
47479
- "../../../node_modules/.pnpm/cross-fetch@3.1.8/node_modules/cross-fetch/dist/browser-ponyfill.js"(exports, module) {
47480
- var global2 = typeof self !== "undefined" ? self : exports;
47481
- var __self__ = function() {
47480
+ "../../../node_modules/.pnpm/cross-fetch@3.2.0/node_modules/cross-fetch/dist/browser-ponyfill.js"(exports, module) {
47481
+ var __global__ = typeof globalThis !== "undefined" && globalThis || typeof self !== "undefined" && self || typeof global !== "undefined" && global;
47482
+ var __globalThis__ = function() {
47482
47483
  function F() {
47483
47484
  this.fetch = false;
47484
- this.DOMException = global2.DOMException;
47485
+ this.DOMException = __global__.DOMException;
47485
47486
  }
47486
47487
  __name(F, "F");
47487
47488
  __name3(F, "F");
47488
- F.prototype = global2;
47489
+ F.prototype = __global__;
47489
47490
  return new F();
47490
47491
  }();
47491
- (function(self2) {
47492
+ (function(globalThis2) {
47492
47493
  var irrelevant = function(exports2) {
47494
+ var g = typeof globalThis2 !== "undefined" && globalThis2 || typeof self !== "undefined" && self || typeof global !== "undefined" && global || {};
47493
47495
  var support = {
47494
- searchParams: "URLSearchParams" in self2,
47495
- iterable: "Symbol" in self2 && "iterator" in Symbol,
47496
- blob: "FileReader" in self2 && "Blob" in self2 && function() {
47496
+ searchParams: "URLSearchParams" in g,
47497
+ iterable: "Symbol" in g && "iterator" in Symbol,
47498
+ blob: "FileReader" in g && "Blob" in g && function() {
47497
47499
  try {
47498
47500
  new Blob();
47499
47501
  return true;
@@ -47501,8 +47503,8 @@ var require_browser_ponyfill = __commonJS2({
47501
47503
  return false;
47502
47504
  }
47503
47505
  }(),
47504
- formData: "FormData" in self2,
47505
- arrayBuffer: "ArrayBuffer" in self2
47506
+ formData: "FormData" in g,
47507
+ arrayBuffer: "ArrayBuffer" in g
47506
47508
  };
47507
47509
  function isDataView(obj) {
47508
47510
  return obj && DataView.prototype.isPrototypeOf(obj);
@@ -47529,8 +47531,8 @@ var require_browser_ponyfill = __commonJS2({
47529
47531
  if (typeof name32 !== "string") {
47530
47532
  name32 = String(name32);
47531
47533
  }
47532
- if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name32)) {
47533
- throw new TypeError("Invalid character in header field name");
47534
+ if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name32) || name32 === "") {
47535
+ throw new TypeError('Invalid character in header field name: "' + name32 + '"');
47534
47536
  }
47535
47537
  return name32.toLowerCase();
47536
47538
  }
@@ -47568,6 +47570,9 @@ var require_browser_ponyfill = __commonJS2({
47568
47570
  }, this);
47569
47571
  } else if (Array.isArray(headers)) {
47570
47572
  headers.forEach(function(header) {
47573
+ if (header.length != 2) {
47574
+ throw new TypeError("Headers constructor: expected name/value pair to be length 2, found" + header.length);
47575
+ }
47571
47576
  this.append(header[0], header[1]);
47572
47577
  }, this);
47573
47578
  } else if (headers) {
@@ -47629,6 +47634,8 @@ var require_browser_ponyfill = __commonJS2({
47629
47634
  Headers.prototype[Symbol.iterator] = Headers.prototype.entries;
47630
47635
  }
47631
47636
  function consumed(body) {
47637
+ if (body._noBody)
47638
+ return;
47632
47639
  if (body.bodyUsed) {
47633
47640
  return Promise.reject(new TypeError("Already read"));
47634
47641
  }
@@ -47659,7 +47666,9 @@ var require_browser_ponyfill = __commonJS2({
47659
47666
  function readBlobAsText(blob) {
47660
47667
  var reader = new FileReader();
47661
47668
  var promise = fileReaderReady(reader);
47662
- reader.readAsText(blob);
47669
+ var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type);
47670
+ var encoding = match ? match[1] : "utf-8";
47671
+ reader.readAsText(blob, encoding);
47663
47672
  return promise;
47664
47673
  }
47665
47674
  __name(readBlobAsText, "readBlobAsText");
@@ -47688,8 +47697,10 @@ var require_browser_ponyfill = __commonJS2({
47688
47697
  function Body() {
47689
47698
  this.bodyUsed = false;
47690
47699
  this._initBody = function(body) {
47700
+ this.bodyUsed = this.bodyUsed;
47691
47701
  this._bodyInit = body;
47692
47702
  if (!body) {
47703
+ this._noBody = true;
47693
47704
  this._bodyText = "";
47694
47705
  } else if (typeof body === "string") {
47695
47706
  this._bodyText = body;
@@ -47733,14 +47744,28 @@ var require_browser_ponyfill = __commonJS2({
47733
47744
  return Promise.resolve(new Blob([this._bodyText]));
47734
47745
  }
47735
47746
  };
47736
- this.arrayBuffer = function() {
47737
- if (this._bodyArrayBuffer) {
47738
- return consumed(this) || Promise.resolve(this._bodyArrayBuffer);
47747
+ }
47748
+ this.arrayBuffer = function() {
47749
+ if (this._bodyArrayBuffer) {
47750
+ var isConsumed = consumed(this);
47751
+ if (isConsumed) {
47752
+ return isConsumed;
47753
+ } else if (ArrayBuffer.isView(this._bodyArrayBuffer)) {
47754
+ return Promise.resolve(
47755
+ this._bodyArrayBuffer.buffer.slice(
47756
+ this._bodyArrayBuffer.byteOffset,
47757
+ this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
47758
+ )
47759
+ );
47739
47760
  } else {
47740
- return this.blob().then(readBlobAsArrayBuffer);
47761
+ return Promise.resolve(this._bodyArrayBuffer);
47741
47762
  }
47742
- };
47743
- }
47763
+ } else if (support.blob) {
47764
+ return this.blob().then(readBlobAsArrayBuffer);
47765
+ } else {
47766
+ throw new Error("could not read as ArrayBuffer");
47767
+ }
47768
+ };
47744
47769
  this.text = function() {
47745
47770
  var rejected = consumed(this);
47746
47771
  if (rejected) {
@@ -47768,7 +47793,7 @@ var require_browser_ponyfill = __commonJS2({
47768
47793
  }
47769
47794
  __name(Body, "Body");
47770
47795
  __name3(Body, "Body");
47771
- var methods = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
47796
+ var methods = ["CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE"];
47772
47797
  function normalizeMethod(method) {
47773
47798
  var upcased = method.toUpperCase();
47774
47799
  return methods.indexOf(upcased) > -1 ? upcased : method;
@@ -47776,6 +47801,9 @@ var require_browser_ponyfill = __commonJS2({
47776
47801
  __name(normalizeMethod, "normalizeMethod");
47777
47802
  __name3(normalizeMethod, "normalizeMethod");
47778
47803
  function Request(input, options) {
47804
+ if (!(this instanceof Request)) {
47805
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
47806
+ }
47779
47807
  options = options || {};
47780
47808
  var body = options.body;
47781
47809
  if (input instanceof Request) {
@@ -47803,12 +47831,28 @@ var require_browser_ponyfill = __commonJS2({
47803
47831
  }
47804
47832
  this.method = normalizeMethod(options.method || this.method || "GET");
47805
47833
  this.mode = options.mode || this.mode || null;
47806
- this.signal = options.signal || this.signal;
47834
+ this.signal = options.signal || this.signal || function() {
47835
+ if ("AbortController" in g) {
47836
+ var ctrl = new AbortController();
47837
+ return ctrl.signal;
47838
+ }
47839
+ }();
47807
47840
  this.referrer = null;
47808
47841
  if ((this.method === "GET" || this.method === "HEAD") && body) {
47809
47842
  throw new TypeError("Body not allowed for GET or HEAD requests");
47810
47843
  }
47811
47844
  this._initBody(body);
47845
+ if (this.method === "GET" || this.method === "HEAD") {
47846
+ if (options.cache === "no-store" || options.cache === "no-cache") {
47847
+ var reParamSearch = /([?&])_=[^&]*/;
47848
+ if (reParamSearch.test(this.url)) {
47849
+ this.url = this.url.replace(reParamSearch, "$1_=" + new Date().getTime());
47850
+ } else {
47851
+ var reQueryString = /\?/;
47852
+ this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + new Date().getTime();
47853
+ }
47854
+ }
47855
+ }
47812
47856
  }
47813
47857
  __name(Request, "Request");
47814
47858
  __name3(Request, "Request");
@@ -47832,12 +47876,18 @@ var require_browser_ponyfill = __commonJS2({
47832
47876
  function parseHeaders(rawHeaders) {
47833
47877
  var headers = new Headers();
47834
47878
  var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, " ");
47835
- preProcessedHeaders.split(/\r?\n/).forEach(function(line) {
47879
+ preProcessedHeaders.split("\r").map(function(header) {
47880
+ return header.indexOf("\n") === 0 ? header.substr(1, header.length) : header;
47881
+ }).forEach(function(line) {
47836
47882
  var parts = line.split(":");
47837
47883
  var key2 = parts.shift().trim();
47838
47884
  if (key2) {
47839
47885
  var value = parts.join(":").trim();
47840
- headers.append(key2, value);
47886
+ try {
47887
+ headers.append(key2, value);
47888
+ } catch (error) {
47889
+ console.warn("Response " + error.message);
47890
+ }
47841
47891
  }
47842
47892
  });
47843
47893
  return headers;
@@ -47846,13 +47896,19 @@ var require_browser_ponyfill = __commonJS2({
47846
47896
  __name3(parseHeaders, "parseHeaders");
47847
47897
  Body.call(Request.prototype);
47848
47898
  function Response(bodyInit, options) {
47899
+ if (!(this instanceof Response)) {
47900
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
47901
+ }
47849
47902
  if (!options) {
47850
47903
  options = {};
47851
47904
  }
47852
47905
  this.type = "default";
47853
47906
  this.status = options.status === void 0 ? 200 : options.status;
47907
+ if (this.status < 200 || this.status > 599) {
47908
+ throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");
47909
+ }
47854
47910
  this.ok = this.status >= 200 && this.status < 300;
47855
- this.statusText = "statusText" in options ? options.statusText : "OK";
47911
+ this.statusText = options.statusText === void 0 ? "" : "" + options.statusText;
47856
47912
  this.headers = new Headers(options.headers);
47857
47913
  this.url = options.url || "";
47858
47914
  this._initBody(bodyInit);
@@ -47869,7 +47925,9 @@ var require_browser_ponyfill = __commonJS2({
47869
47925
  });
47870
47926
  };
47871
47927
  Response.error = function() {
47872
- var response = new Response(null, { status: 0, statusText: "" });
47928
+ var response = new Response(null, { status: 200, statusText: "" });
47929
+ response.ok = false;
47930
+ response.status = 0;
47873
47931
  response.type = "error";
47874
47932
  return response;
47875
47933
  };
@@ -47880,7 +47938,7 @@ var require_browser_ponyfill = __commonJS2({
47880
47938
  }
47881
47939
  return new Response(null, { status, headers: { location: url } });
47882
47940
  };
47883
- exports2.DOMException = self2.DOMException;
47941
+ exports2.DOMException = g.DOMException;
47884
47942
  try {
47885
47943
  new exports2.DOMException();
47886
47944
  } catch (err) {
@@ -47907,35 +47965,73 @@ var require_browser_ponyfill = __commonJS2({
47907
47965
  __name3(abortXhr, "abortXhr");
47908
47966
  xhr.onload = function() {
47909
47967
  var options = {
47910
- status: xhr.status,
47911
47968
  statusText: xhr.statusText,
47912
47969
  headers: parseHeaders(xhr.getAllResponseHeaders() || "")
47913
47970
  };
47971
+ if (request.url.indexOf("file://") === 0 && (xhr.status < 200 || xhr.status > 599)) {
47972
+ options.status = 200;
47973
+ } else {
47974
+ options.status = xhr.status;
47975
+ }
47914
47976
  options.url = "responseURL" in xhr ? xhr.responseURL : options.headers.get("X-Request-URL");
47915
47977
  var body = "response" in xhr ? xhr.response : xhr.responseText;
47916
- resolve(new Response(body, options));
47978
+ setTimeout(function() {
47979
+ resolve(new Response(body, options));
47980
+ }, 0);
47917
47981
  };
47918
47982
  xhr.onerror = function() {
47919
- reject(new TypeError("Network request failed"));
47983
+ setTimeout(function() {
47984
+ reject(new TypeError("Network request failed"));
47985
+ }, 0);
47920
47986
  };
47921
47987
  xhr.ontimeout = function() {
47922
- reject(new TypeError("Network request failed"));
47988
+ setTimeout(function() {
47989
+ reject(new TypeError("Network request timed out"));
47990
+ }, 0);
47923
47991
  };
47924
47992
  xhr.onabort = function() {
47925
- reject(new exports2.DOMException("Aborted", "AbortError"));
47993
+ setTimeout(function() {
47994
+ reject(new exports2.DOMException("Aborted", "AbortError"));
47995
+ }, 0);
47926
47996
  };
47927
- xhr.open(request.method, request.url, true);
47997
+ function fixUrl(url) {
47998
+ try {
47999
+ return url === "" && g.location.href ? g.location.href : url;
48000
+ } catch (e2) {
48001
+ return url;
48002
+ }
48003
+ }
48004
+ __name(fixUrl, "fixUrl");
48005
+ __name3(fixUrl, "fixUrl");
48006
+ xhr.open(request.method, fixUrl(request.url), true);
47928
48007
  if (request.credentials === "include") {
47929
48008
  xhr.withCredentials = true;
47930
48009
  } else if (request.credentials === "omit") {
47931
48010
  xhr.withCredentials = false;
47932
48011
  }
47933
- if ("responseType" in xhr && support.blob) {
47934
- xhr.responseType = "blob";
48012
+ if ("responseType" in xhr) {
48013
+ if (support.blob) {
48014
+ xhr.responseType = "blob";
48015
+ } else if (support.arrayBuffer) {
48016
+ xhr.responseType = "arraybuffer";
48017
+ }
48018
+ }
48019
+ if (init2 && typeof init2.headers === "object" && !(init2.headers instanceof Headers || g.Headers && init2.headers instanceof g.Headers)) {
48020
+ var names = [];
48021
+ Object.getOwnPropertyNames(init2.headers).forEach(function(name32) {
48022
+ names.push(normalizeName(name32));
48023
+ xhr.setRequestHeader(name32, normalizeValue(init2.headers[name32]));
48024
+ });
48025
+ request.headers.forEach(function(value, name32) {
48026
+ if (names.indexOf(name32) === -1) {
48027
+ xhr.setRequestHeader(name32, value);
48028
+ }
48029
+ });
48030
+ } else {
48031
+ request.headers.forEach(function(value, name32) {
48032
+ xhr.setRequestHeader(name32, value);
48033
+ });
47935
48034
  }
47936
- request.headers.forEach(function(value, name32) {
47937
- xhr.setRequestHeader(name32, value);
47938
- });
47939
48035
  if (request.signal) {
47940
48036
  request.signal.addEventListener("abort", abortXhr);
47941
48037
  xhr.onreadystatechange = function() {
@@ -47950,11 +48046,11 @@ var require_browser_ponyfill = __commonJS2({
47950
48046
  __name(fetch2, "fetch2");
47951
48047
  __name3(fetch2, "fetch");
47952
48048
  fetch2.polyfill = true;
47953
- if (!self2.fetch) {
47954
- self2.fetch = fetch2;
47955
- self2.Headers = Headers;
47956
- self2.Request = Request;
47957
- self2.Response = Response;
48049
+ if (!g.fetch) {
48050
+ g.fetch = fetch2;
48051
+ g.Headers = Headers;
48052
+ g.Request = Request;
48053
+ g.Response = Response;
47958
48054
  }
47959
48055
  exports2.Headers = Headers;
47960
48056
  exports2.Request = Request;
@@ -47963,10 +48059,10 @@ var require_browser_ponyfill = __commonJS2({
47963
48059
  Object.defineProperty(exports2, "__esModule", { value: true });
47964
48060
  return exports2;
47965
48061
  }({});
47966
- })(__self__);
47967
- __self__.fetch.ponyfill = true;
47968
- delete __self__.fetch.polyfill;
47969
- var ctx = __self__;
48062
+ })(__globalThis__);
48063
+ __globalThis__.fetch.ponyfill = true;
48064
+ delete __globalThis__.fetch.polyfill;
48065
+ var ctx = __global__.fetch ? __global__ : __globalThis__;
47970
48066
  exports = ctx.fetch;
47971
48067
  exports.default = ctx.fetch;
47972
48068
  exports.fetch = ctx.fetch;
@@ -47977,7 +48073,7 @@ var require_browser_ponyfill = __commonJS2({
47977
48073
  }
47978
48074
  });
47979
48075
  var require_dataloader2 = __commonJS2({
47980
- "../../../node_modules/.pnpm/dataloader@2.2.2/node_modules/dataloader/index.js"(exports, module) {
48076
+ "../../../node_modules/.pnpm/dataloader@2.2.3/node_modules/dataloader/index.js"(exports, module) {
47981
48077
  "use strict";
47982
48078
  var DataLoader2 = /* @__PURE__ */ function() {
47983
48079
  function DataLoader3(batchLoadFn, options) {
@@ -48001,8 +48097,9 @@ var require_dataloader2 = __commonJS2({
48001
48097
  }
48002
48098
  var batch = getCurrentBatch(this);
48003
48099
  var cacheMap = this._cacheMap;
48004
- var cacheKey = this._cacheKeyFn(key2);
48100
+ var cacheKey;
48005
48101
  if (cacheMap) {
48102
+ cacheKey = this._cacheKeyFn(key2);
48006
48103
  var cachedPromise = cacheMap.get(cacheKey);
48007
48104
  if (cachedPromise) {
48008
48105
  var cacheHits = batch.cacheHits || (batch.cacheHits = []);
@@ -48127,11 +48224,11 @@ var require_dataloader2 = __commonJS2({
48127
48224
  }
48128
48225
  resolveCacheHits(batch);
48129
48226
  for (var i2 = 0; i2 < batch.callbacks.length; i2++) {
48130
- var value = values[i2];
48131
- if (value instanceof Error) {
48132
- batch.callbacks[i2].reject(value);
48227
+ var _value = values[i2];
48228
+ if (_value instanceof Error) {
48229
+ batch.callbacks[i2].reject(_value);
48133
48230
  } else {
48134
- batch.callbacks[i2].resolve(value);
48231
+ batch.callbacks[i2].resolve(_value);
48135
48232
  }
48136
48233
  }
48137
48234
  })["catch"](function(error) {
@@ -53620,7 +53717,7 @@ function verifyTimeChecks(cacao, options) {
53620
53717
  }
53621
53718
  __name(verifyTimeChecks, "verifyTimeChecks");
53622
53719
  __name3(verifyTimeChecks, "verifyTimeChecks");
53623
- var version22 = "logger/5.7.0";
53720
+ var version22 = "logger/5.8.0";
53624
53721
  var _permanentCensorErrors = false;
53625
53722
  var _censorErrors = false;
53626
53723
  var LogLevels = { debug: 1, "default": 2, info: 2, warning: 3, error: 4, off: 5 };
@@ -53910,7 +54007,7 @@ var Logger = /* @__PURE__ */ __name(class {
53910
54007
  __name3(Logger, "Logger");
53911
54008
  Logger.errors = ErrorCode;
53912
54009
  Logger.levels = LogLevel;
53913
- var version3 = "bytes/5.7.0";
54010
+ var version3 = "bytes/5.8.0";
53914
54011
  var logger = new Logger(version3);
53915
54012
  function isHexable(value) {
53916
54013
  return !!value.toHexString;
@@ -54253,7 +54350,7 @@ function splitSignature(signature2) {
54253
54350
  __name(splitSignature, "splitSignature");
54254
54351
  __name3(splitSignature, "splitSignature");
54255
54352
  var import_bn = __toESM2(require_bn2());
54256
- var version4 = "bignumber/5.7.0";
54353
+ var version4 = "bignumber/5.8.0";
54257
54354
  var BN = import_bn.default.BN;
54258
54355
  var logger2 = new Logger(version4);
54259
54356
  function _base36To16(value) {
@@ -54267,7 +54364,7 @@ function keccak256(data) {
54267
54364
  }
54268
54365
  __name(keccak256, "keccak256");
54269
54366
  __name3(keccak256, "keccak256");
54270
- var version5 = "address/5.7.0";
54367
+ var version5 = "address/5.8.0";
54271
54368
  var logger3 = new Logger(version5);
54272
54369
  function getChecksumAddress(address) {
54273
54370
  if (!isHexString(address, 20)) {
@@ -54356,7 +54453,7 @@ function getAddress(address) {
54356
54453
  }
54357
54454
  __name(getAddress, "getAddress");
54358
54455
  __name3(getAddress, "getAddress");
54359
- var version6 = "properties/5.7.0";
54456
+ var version6 = "properties/5.8.0";
54360
54457
  var logger4 = new Logger(version6);
54361
54458
  function defineReadOnly(object, name32, value) {
54362
54459
  Object.defineProperty(object, name32, {
@@ -54367,7 +54464,7 @@ function defineReadOnly(object, name32, value) {
54367
54464
  }
54368
54465
  __name(defineReadOnly, "defineReadOnly");
54369
54466
  __name3(defineReadOnly, "defineReadOnly");
54370
- var version7 = "strings/5.7.0";
54467
+ var version7 = "strings/5.8.0";
54371
54468
  var logger5 = new Logger(version7);
54372
54469
  var UnicodeNormalizationForm;
54373
54470
  (function(UnicodeNormalizationForm2) {
@@ -54572,10 +54669,13 @@ var utils_1$1 = createCommonjsModule(function(module, exports) {
54572
54669
  utils.encode = utils_1.encode;
54573
54670
  function getNAF2(num, w, bits) {
54574
54671
  var naf = new Array(Math.max(num.bitLength(), bits) + 1);
54575
- naf.fill(0);
54672
+ var i2;
54673
+ for (i2 = 0; i2 < naf.length; i2 += 1) {
54674
+ naf[i2] = 0;
54675
+ }
54576
54676
  var ws = 1 << w + 1;
54577
54677
  var k = num.clone();
54578
- for (var i2 = 0; i2 < naf.length; i2++) {
54678
+ for (i2 = 0; i2 < naf.length; i2++) {
54579
54679
  var z;
54580
54680
  var mod22 = k.andln(ws - 1);
54581
54681
  if (k.isOdd()) {
@@ -56040,8 +56140,8 @@ KeyPair.prototype.derive = /* @__PURE__ */ __name3(/* @__PURE__ */ __name(functi
56040
56140
  KeyPair.prototype.sign = /* @__PURE__ */ __name3(/* @__PURE__ */ __name(function sign2(msg, enc, options) {
56041
56141
  return this.ec.sign(msg, this, enc, options);
56042
56142
  }, "sign2"), "sign");
56043
- KeyPair.prototype.verify = /* @__PURE__ */ __name3(/* @__PURE__ */ __name(function verify2(msg, signature2) {
56044
- return this.ec.verify(msg, signature2, this);
56143
+ KeyPair.prototype.verify = /* @__PURE__ */ __name3(/* @__PURE__ */ __name(function verify2(msg, signature2, options) {
56144
+ return this.ec.verify(msg, signature2, this, void 0, options);
56045
56145
  }, "verify2"), "verify");
56046
56146
  KeyPair.prototype.inspect = /* @__PURE__ */ __name3(/* @__PURE__ */ __name(function inspect3() {
56047
56147
  return "<Key priv: " + (this.priv && this.priv.toString(16, 2)) + " pub: " + (this.pub && this.pub.inspect()) + " >";
@@ -56077,6 +56177,9 @@ function getLength(buf22, p) {
56077
56177
  if (octetLen === 0 || octetLen > 4) {
56078
56178
  return false;
56079
56179
  }
56180
+ if (buf22[p.place] === 0) {
56181
+ return false;
56182
+ }
56080
56183
  var val = 0;
56081
56184
  for (var i2 = 0, off = p.place; i2 < octetLen; i2++, off++) {
56082
56185
  val <<= 8;
@@ -56124,6 +56227,9 @@ Signature.prototype._importDER = /* @__PURE__ */ __name3(/* @__PURE__ */ __name(
56124
56227
  if (rlen === false) {
56125
56228
  return false;
56126
56229
  }
56230
+ if ((data[p.place] & 128) !== 0) {
56231
+ return false;
56232
+ }
56127
56233
  var r2 = data.slice(p.place, rlen + p.place);
56128
56234
  p.place += rlen;
56129
56235
  if (data[p.place++] !== 2) {
@@ -56136,6 +56242,9 @@ Signature.prototype._importDER = /* @__PURE__ */ __name3(/* @__PURE__ */ __name(
56136
56242
  if (data.length !== slen + p.place) {
56137
56243
  return false;
56138
56244
  }
56245
+ if ((data[p.place] & 128) !== 0) {
56246
+ return false;
56247
+ }
56139
56248
  var s2 = data.slice(p.place, slen + p.place);
56140
56249
  if (r2[0] === 0) {
56141
56250
  if (r2[1] & 128) {
@@ -56250,8 +56359,23 @@ EC.prototype.genKeyPair = /* @__PURE__ */ __name3(/* @__PURE__ */ __name(functio
56250
56359
  return this.keyFromPrivate(priv);
56251
56360
  }
56252
56361
  }, "genKeyPair"), "genKeyPair");
56253
- EC.prototype._truncateToN = /* @__PURE__ */ __name3(/* @__PURE__ */ __name(function _truncateToN(msg, truncOnly) {
56254
- var delta = msg.byteLength() * 8 - this.n.bitLength();
56362
+ EC.prototype._truncateToN = /* @__PURE__ */ __name3(/* @__PURE__ */ __name(function _truncateToN(msg, truncOnly, bitLength) {
56363
+ var byteLength;
56364
+ if (import_bn2.default.isBN(msg) || typeof msg === "number") {
56365
+ msg = new import_bn2.default(msg, 16);
56366
+ byteLength = msg.byteLength();
56367
+ } else if (typeof msg === "object") {
56368
+ byteLength = msg.length;
56369
+ msg = new import_bn2.default(msg, 16);
56370
+ } else {
56371
+ var str = msg.toString();
56372
+ byteLength = str.length + 1 >>> 1;
56373
+ msg = new import_bn2.default(str, 16);
56374
+ }
56375
+ if (typeof bitLength !== "number") {
56376
+ bitLength = byteLength * 8;
56377
+ }
56378
+ var delta = bitLength - this.n.bitLength();
56255
56379
  if (delta > 0)
56256
56380
  msg = msg.ushrn(delta);
56257
56381
  if (!truncOnly && msg.cmp(this.n) >= 0)
@@ -56266,11 +56390,22 @@ EC.prototype.sign = /* @__PURE__ */ __name3(/* @__PURE__ */ __name(function sign
56266
56390
  }
56267
56391
  if (!options)
56268
56392
  options = {};
56393
+ if (typeof msg !== "string" && typeof msg !== "number" && !import_bn2.default.isBN(msg)) {
56394
+ assert$5(
56395
+ typeof msg === "object" && msg && typeof msg.length === "number",
56396
+ "Expected message to be an array-like, a hex string, or a BN instance"
56397
+ );
56398
+ assert$5(msg.length >>> 0 === msg.length);
56399
+ for (var i2 = 0; i2 < msg.length; i2++)
56400
+ assert$5((msg[i2] & 255) === msg[i2]);
56401
+ }
56269
56402
  key2 = this.keyFromPrivate(key2, enc);
56270
- msg = this._truncateToN(new import_bn2.default(msg, 16));
56403
+ msg = this._truncateToN(msg, false, options.msgBitLength);
56404
+ assert$5(!msg.isNeg(), "Can not sign a negative message");
56271
56405
  var bytes = this.n.byteLength();
56272
56406
  var bkey = key2.getPrivate().toArray("be", bytes);
56273
56407
  var nonce = msg.toArray("be", bytes);
56408
+ assert$5(new import_bn2.default(nonce).eq(msg), "Can not sign message");
56274
56409
  var drbg = new hmacDrbg({
56275
56410
  hash: this.hash,
56276
56411
  entropy: bkey,
@@ -56303,8 +56438,10 @@ EC.prototype.sign = /* @__PURE__ */ __name3(/* @__PURE__ */ __name(function sign
56303
56438
  return new signature({ r: r2, s: s2, recoveryParam });
56304
56439
  }
56305
56440
  }, "sign3"), "sign");
56306
- EC.prototype.verify = /* @__PURE__ */ __name3(/* @__PURE__ */ __name(function verify3(msg, signature$1, key2, enc) {
56307
- msg = this._truncateToN(new import_bn2.default(msg, 16));
56441
+ EC.prototype.verify = /* @__PURE__ */ __name3(/* @__PURE__ */ __name(function verify3(msg, signature$1, key2, enc, options) {
56442
+ if (!options)
56443
+ options = {};
56444
+ msg = this._truncateToN(msg, false, options.msgBitLength);
56308
56445
  key2 = this.keyFromPublic(key2, enc);
56309
56446
  signature$1 = new signature(signature$1, "hex");
56310
56447
  var r2 = signature$1.r;
@@ -56367,7 +56504,7 @@ EC.prototype.getKeyRecoveryParam = function(e2, signature$1, Q, enc) {
56367
56504
  var elliptic_1 = createCommonjsModule(function(module, exports) {
56368
56505
  "use strict";
56369
56506
  var elliptic = exports;
56370
- elliptic.version = { version: "6.5.4" }.version;
56507
+ elliptic.version = { version: "6.6.1" }.version;
56371
56508
  elliptic.utils = utils_1$1;
56372
56509
  elliptic.rand = function() {
56373
56510
  throw new Error("unsupported");
@@ -56378,7 +56515,7 @@ var elliptic_1 = createCommonjsModule(function(module, exports) {
56378
56515
  elliptic.eddsa = null;
56379
56516
  });
56380
56517
  var EC$1 = elliptic_1.ec;
56381
- var version8 = "signing-key/5.7.0";
56518
+ var version8 = "signing-key/5.8.0";
56382
56519
  var logger6 = new Logger(version8);
56383
56520
  var _curve = null;
56384
56521
  function getCurve() {
@@ -56459,7 +56596,7 @@ function computePublicKey(key2, compressed) {
56459
56596
  }
56460
56597
  __name(computePublicKey, "computePublicKey");
56461
56598
  __name3(computePublicKey, "computePublicKey");
56462
- var version9 = "transactions/5.7.0";
56599
+ var version9 = "transactions/5.8.0";
56463
56600
  var logger7 = new Logger(version9);
56464
56601
  var TransactionTypes;
56465
56602
  (function(TransactionTypes2) {
@@ -56478,7 +56615,7 @@ function recoverAddress(digest22, signature2) {
56478
56615
  }
56479
56616
  __name(recoverAddress, "recoverAddress");
56480
56617
  __name3(recoverAddress, "recoverAddress");
56481
- var version10 = "wallet/5.7.0";
56618
+ var version10 = "wallet/5.8.0";
56482
56619
  var logger8 = new Logger(version10);
56483
56620
  function verifyMessage(message, signature2) {
56484
56621
  return recoverAddress(hashMessage(message), signature2);
@@ -66621,8 +66758,23 @@ var BackwardsCompatCredentialsListValidator = mod.object({
66621
66758
  credentials: CredentialRecordValidator.or(BackwardsCompatIDXCredentialValidator).array()
66622
66759
  }).strict();
66623
66760
 
66761
+ // src/defaults.ts
66762
+ var DEFAULT_IDX_ARGS = {
66763
+ modelData: {
66764
+ definitions: {
66765
+ MyVerifiableCredentials: "kjzl6cwe1jw14am5tu5hh412s19o4zm8aq3g2lpd6s4paxj2nly2lj4drp3pun2"
66766
+ },
66767
+ schemas: {
66768
+ AchievementVerifiableCredential: "ceramic://k3y52l7qbv1frylibw2725v8gem3hxs1onoh6pvux0szdduugczh0hddxo6qsd6o0",
66769
+ VerifiableCredentialsList: "ceramic://k3y52l7qbv1frxkcwfpyauky3fyl4n44izridy3blvjjzgftis40sk9w8g3remghs"
66770
+ },
66771
+ tiles: {}
66772
+ },
66773
+ credentialAlias: "MyVerifiableCredentials"
66774
+ };
66775
+
66624
66776
  // src/idx.ts
66625
- var getIDXPlugin = /* @__PURE__ */ __name(async (learnCard, { modelData, credentialAlias }) => {
66777
+ var getIDXPlugin = /* @__PURE__ */ __name(async (learnCard, { modelData, credentialAlias } = DEFAULT_IDX_ARGS) => {
66626
66778
  const ceramic = learnCard.invoke.getCeramicClient();
66627
66779
  const dataStore = new DIDDataStore({ ceramic, model: modelData });
66628
66780
  const getCredentialsListFromIdx = /* @__PURE__ */ __name(async (alias = credentialAlias) => {