@learncard/init 2.4.12 → 2.4.13

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.
@@ -123,9 +123,8 @@ var IANA_HASH_ALGORITHMS = [
123
123
  ];
124
124
 
125
125
  // ../../node_modules/js-base64/base64.mjs
126
- var version = "3.8.0";
126
+ var version = "3.9.3";
127
127
  var VERSION = version;
128
- var _hasBuffer = typeof Buffer === "function";
129
128
  var _TD = typeof TextDecoder === "function" ? new TextDecoder("utf-8", { ignoreBOM: true }) : void 0;
130
129
  var _TE = typeof TextEncoder === "function" ? new TextEncoder() : void 0;
131
130
  var b64ch = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
@@ -151,8 +150,8 @@ var btoaPolyfill = /* @__PURE__ */ __name((bin) => {
151
150
  }
152
151
  return pad ? asc.slice(0, pad - 3) + "===".substring(pad) : asc;
153
152
  }, "btoaPolyfill");
154
- var _btoa = typeof btoa === "function" ? (bin) => btoa(bin) : _hasBuffer ? (bin) => Buffer.from(bin, "binary").toString("base64") : btoaPolyfill;
155
- var _fromUint8Array = _hasBuffer ? (u8a) => Buffer.from(u8a).toString("base64") : (u8a) => {
153
+ var _btoa = typeof btoa === "function" ? (bin) => btoa(bin) : btoaPolyfill;
154
+ var _fromUint8Array = typeof Uint8Array.prototype.toBase64 === "function" ? (u8a) => u8a.toBase64() : (u8a) => {
156
155
  const maxargs = 4096;
157
156
  let strs = [];
158
157
  for (let i = 0, l = u8a.length; i < l; i += maxargs) {
@@ -170,9 +169,9 @@ var cb_utob = /* @__PURE__ */ __name((c) => {
170
169
  return _fromCC(240 | cc >>> 18 & 7) + _fromCC(128 | cc >>> 12 & 63) + _fromCC(128 | cc >>> 6 & 63) + _fromCC(128 | cc & 63);
171
170
  }
172
171
  }, "cb_utob");
173
- var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
172
+ var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\x00-\x7F]/g;
174
173
  var utob = /* @__PURE__ */ __name((u) => u.replace(re_utob, cb_utob), "utob");
175
- var _encode = _hasBuffer ? (s) => Buffer.from(s, "utf8").toString("base64") : _TE ? (s) => _fromUint8Array(_TE.encode(s)) : (s) => _btoa(utob(s));
174
+ var _encode = _TE ? (s) => _fromUint8Array(_TE.encode(s)) : (s) => _btoa(utob(s));
176
175
  var encode = /* @__PURE__ */ __name((src, urlsafe = false) => urlsafe ? _mkUriSafe(_encode(src)) : _encode(src), "encode");
177
176
  var encodeURI = /* @__PURE__ */ __name((src) => encode(src, true), "encodeURI");
178
177
  var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
@@ -207,10 +206,10 @@ var atobPolyfill = /* @__PURE__ */ __name((asc) => {
207
206
  }
208
207
  return binArray.join("");
209
208
  }, "atobPolyfill");
210
- var _atob = typeof atob === "function" ? (asc) => atob(_tidyB64(asc)) : _hasBuffer ? (asc) => Buffer.from(asc, "base64").toString("binary") : atobPolyfill;
211
- var _toUint8Array = _hasBuffer ? (a) => _U8Afrom(Buffer.from(a, "base64")) : (a) => _U8Afrom(_atob(a).split("").map((c) => c.charCodeAt(0)));
209
+ var _atob = typeof atob === "function" ? (asc) => atob(_tidyB64(asc)) : atobPolyfill;
210
+ var _toUint8Array = typeof Uint8Array.fromBase64 === "function" ? (a) => Uint8Array.fromBase64(a) : (a) => _U8Afrom(_atob(a).split("").map((c) => c.charCodeAt(0)));
212
211
  var toUint8Array = /* @__PURE__ */ __name((a) => _toUint8Array(_unURI(a)), "toUint8Array");
213
- var _decode = _hasBuffer ? (a) => Buffer.from(a, "base64").toString("utf8") : _TD ? (a) => _TD.decode(_toUint8Array(a)) : (a) => btou(_atob(a));
212
+ var _decode = _TD ? (a) => _TD.decode(_toUint8Array(a)) : (a) => btou(_atob(a));
214
213
  var _unURI = /* @__PURE__ */ __name((a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == "-" ? "+" : "/")), "_unURI");
215
214
  var decode = /* @__PURE__ */ __name((src) => _decode(_unURI(src)), "decode");
216
215
  var isValid = /* @__PURE__ */ __name((src) => {