@timeback/core 0.1.4 → 0.1.5

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/utils.js CHANGED
@@ -1,20 +1,4 @@
1
- import { createRequire } from "node:module";
2
- var __create = Object.create;
3
- var __getProtoOf = Object.getPrototypeOf;
4
1
  var __defProp = Object.defineProperty;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __toESM = (mod, isNodeMode, target) => {
8
- target = mod != null ? __create(__getProtoOf(mod)) : {};
9
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
10
- for (let key of __getOwnPropNames(mod))
11
- if (!__hasOwnProp.call(to, key))
12
- __defProp(to, key, {
13
- get: () => mod[key],
14
- enumerable: true
15
- });
16
- return to;
17
- };
18
2
  var __export = (target, all) => {
19
3
  for (var name in all)
20
4
  __defProp(target, name, {
@@ -24,7 +8,7 @@ var __export = (target, all) => {
24
8
  set: (newValue) => all[name] = () => newValue
25
9
  });
26
10
  };
27
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
11
+ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
28
12
 
29
13
  // ../edubridge/dist/index.js
30
14
  var __defProp2 = Object.defineProperty;
@@ -37,6 +21,423 @@ var __export2 = (target, all) => {
37
21
  set: (newValue) => all[name] = () => newValue
38
22
  });
39
23
  };
24
+ var __esm2 = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
25
+ var exports_util = {};
26
+ __export2(exports_util, {
27
+ types: () => types,
28
+ promisify: () => promisify,
29
+ log: () => log,
30
+ isUndefined: () => isUndefined,
31
+ isSymbol: () => isSymbol,
32
+ isString: () => isString,
33
+ isRegExp: () => isRegExp,
34
+ isPrimitive: () => isPrimitive,
35
+ isObject: () => isObject,
36
+ isNumber: () => isNumber,
37
+ isNullOrUndefined: () => isNullOrUndefined,
38
+ isNull: () => isNull,
39
+ isFunction: () => isFunction,
40
+ isError: () => isError,
41
+ isDate: () => isDate,
42
+ isBuffer: () => isBuffer,
43
+ isBoolean: () => isBoolean,
44
+ isArray: () => isArray,
45
+ inspect: () => inspect,
46
+ inherits: () => inherits,
47
+ format: () => format,
48
+ deprecate: () => deprecate,
49
+ default: () => util_default,
50
+ debuglog: () => debuglog,
51
+ callbackifyOnRejected: () => callbackifyOnRejected,
52
+ callbackify: () => callbackify,
53
+ _extend: () => _extend,
54
+ TextEncoder: () => TextEncoder,
55
+ TextDecoder: () => TextDecoder
56
+ });
57
+ function format(f, ...args) {
58
+ if (!isString(f)) {
59
+ var objects = [f];
60
+ for (var i = 0;i < args.length; i++)
61
+ objects.push(inspect(args[i]));
62
+ return objects.join(" ");
63
+ }
64
+ var i = 0, len = args.length, str = String(f).replace(formatRegExp, function(x2) {
65
+ if (x2 === "%%")
66
+ return "%";
67
+ if (i >= len)
68
+ return x2;
69
+ switch (x2) {
70
+ case "%s":
71
+ return String(args[i++]);
72
+ case "%d":
73
+ return Number(args[i++]);
74
+ case "%j":
75
+ try {
76
+ return JSON.stringify(args[i++]);
77
+ } catch (_) {
78
+ return "[Circular]";
79
+ }
80
+ default:
81
+ return x2;
82
+ }
83
+ });
84
+ for (var x = args[i];i < len; x = args[++i])
85
+ if (isNull(x) || !isObject(x))
86
+ str += " " + x;
87
+ else
88
+ str += " " + inspect(x);
89
+ return str;
90
+ }
91
+ function deprecate(fn, msg) {
92
+ if (typeof process > "u" || process?.noDeprecation === true)
93
+ return fn;
94
+ var warned = false;
95
+ function deprecated(...args) {
96
+ if (!warned) {
97
+ if (process.throwDeprecation)
98
+ throw Error(msg);
99
+ else if (process.traceDeprecation)
100
+ console.trace(msg);
101
+ else
102
+ console.error(msg);
103
+ warned = true;
104
+ }
105
+ return fn.apply(this, ...args);
106
+ }
107
+ return deprecated;
108
+ }
109
+ function stylizeWithColor(str, styleType) {
110
+ var style = inspect.styles[styleType];
111
+ if (style)
112
+ return "\x1B[" + inspect.colors[style][0] + "m" + str + "\x1B[" + inspect.colors[style][1] + "m";
113
+ else
114
+ return str;
115
+ }
116
+ function stylizeNoColor(str, styleType) {
117
+ return str;
118
+ }
119
+ function arrayToHash(array) {
120
+ var hash = {};
121
+ return array.forEach(function(val, idx) {
122
+ hash[val] = true;
123
+ }), hash;
124
+ }
125
+ function formatValue(ctx, value, recurseTimes) {
126
+ if (ctx.customInspect && value && isFunction(value.inspect) && value.inspect !== inspect && !(value.constructor && value.constructor.prototype === value)) {
127
+ var ret = value.inspect(recurseTimes, ctx);
128
+ if (!isString(ret))
129
+ ret = formatValue(ctx, ret, recurseTimes);
130
+ return ret;
131
+ }
132
+ var primitive = formatPrimitive(ctx, value);
133
+ if (primitive)
134
+ return primitive;
135
+ var keys = Object.keys(value), visibleKeys = arrayToHash(keys);
136
+ if (ctx.showHidden)
137
+ keys = Object.getOwnPropertyNames(value);
138
+ if (isError(value) && (keys.indexOf("message") >= 0 || keys.indexOf("description") >= 0))
139
+ return formatError(value);
140
+ if (keys.length === 0) {
141
+ if (isFunction(value)) {
142
+ var name = value.name ? ": " + value.name : "";
143
+ return ctx.stylize("[Function" + name + "]", "special");
144
+ }
145
+ if (isRegExp(value))
146
+ return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
147
+ if (isDate(value))
148
+ return ctx.stylize(Date.prototype.toString.call(value), "date");
149
+ if (isError(value))
150
+ return formatError(value);
151
+ }
152
+ var base = "", array = false, braces = ["{", "}"];
153
+ if (isArray(value))
154
+ array = true, braces = ["[", "]"];
155
+ if (isFunction(value)) {
156
+ var n = value.name ? ": " + value.name : "";
157
+ base = " [Function" + n + "]";
158
+ }
159
+ if (isRegExp(value))
160
+ base = " " + RegExp.prototype.toString.call(value);
161
+ if (isDate(value))
162
+ base = " " + Date.prototype.toUTCString.call(value);
163
+ if (isError(value))
164
+ base = " " + formatError(value);
165
+ if (keys.length === 0 && (!array || value.length == 0))
166
+ return braces[0] + base + braces[1];
167
+ if (recurseTimes < 0)
168
+ if (isRegExp(value))
169
+ return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
170
+ else
171
+ return ctx.stylize("[Object]", "special");
172
+ ctx.seen.push(value);
173
+ var output;
174
+ if (array)
175
+ output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
176
+ else
177
+ output = keys.map(function(key) {
178
+ return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
179
+ });
180
+ return ctx.seen.pop(), reduceToSingleString(output, base, braces);
181
+ }
182
+ function formatPrimitive(ctx, value) {
183
+ if (isUndefined(value))
184
+ return ctx.stylize("undefined", "undefined");
185
+ if (isString(value)) {
186
+ var simple = "'" + JSON.stringify(value).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
187
+ return ctx.stylize(simple, "string");
188
+ }
189
+ if (isNumber(value))
190
+ return ctx.stylize("" + value, "number");
191
+ if (isBoolean(value))
192
+ return ctx.stylize("" + value, "boolean");
193
+ if (isNull(value))
194
+ return ctx.stylize("null", "null");
195
+ }
196
+ function formatError(value) {
197
+ return "[" + Error.prototype.toString.call(value) + "]";
198
+ }
199
+ function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
200
+ var output = [];
201
+ for (var i = 0, l = value.length;i < l; ++i)
202
+ if (hasOwnProperty(value, String(i)))
203
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true));
204
+ else
205
+ output.push("");
206
+ return keys.forEach(function(key) {
207
+ if (!key.match(/^\d+$/))
208
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
209
+ }), output;
210
+ }
211
+ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
212
+ var name, str, desc;
213
+ if (desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }, desc.get)
214
+ if (desc.set)
215
+ str = ctx.stylize("[Getter/Setter]", "special");
216
+ else
217
+ str = ctx.stylize("[Getter]", "special");
218
+ else if (desc.set)
219
+ str = ctx.stylize("[Setter]", "special");
220
+ if (!hasOwnProperty(visibleKeys, key))
221
+ name = "[" + key + "]";
222
+ if (!str)
223
+ if (ctx.seen.indexOf(desc.value) < 0) {
224
+ if (isNull(recurseTimes))
225
+ str = formatValue(ctx, desc.value, null);
226
+ else
227
+ str = formatValue(ctx, desc.value, recurseTimes - 1);
228
+ if (str.indexOf(`
229
+ `) > -1)
230
+ if (array)
231
+ str = str.split(`
232
+ `).map(function(line) {
233
+ return " " + line;
234
+ }).join(`
235
+ `).slice(2);
236
+ else
237
+ str = `
238
+ ` + str.split(`
239
+ `).map(function(line) {
240
+ return " " + line;
241
+ }).join(`
242
+ `);
243
+ } else
244
+ str = ctx.stylize("[Circular]", "special");
245
+ if (isUndefined(name)) {
246
+ if (array && key.match(/^\d+$/))
247
+ return str;
248
+ if (name = JSON.stringify("" + key), name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/))
249
+ name = name.slice(1, -1), name = ctx.stylize(name, "name");
250
+ else
251
+ name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), name = ctx.stylize(name, "string");
252
+ }
253
+ return name + ": " + str;
254
+ }
255
+ function reduceToSingleString(output, base, braces) {
256
+ var numLinesEst = 0, length = output.reduce(function(prev, cur) {
257
+ if (numLinesEst++, cur.indexOf(`
258
+ `) >= 0)
259
+ numLinesEst++;
260
+ return prev + cur.replace(/\u001b\[\d\d?m/g, "").length + 1;
261
+ }, 0);
262
+ if (length > 60)
263
+ return braces[0] + (base === "" ? "" : base + `
264
+ `) + " " + output.join(`,
265
+ `) + " " + braces[1];
266
+ return braces[0] + base + " " + output.join(", ") + " " + braces[1];
267
+ }
268
+ function isArray(ar) {
269
+ return Array.isArray(ar);
270
+ }
271
+ function isBoolean(arg) {
272
+ return typeof arg === "boolean";
273
+ }
274
+ function isNull(arg) {
275
+ return arg === null;
276
+ }
277
+ function isNullOrUndefined(arg) {
278
+ return arg == null;
279
+ }
280
+ function isNumber(arg) {
281
+ return typeof arg === "number";
282
+ }
283
+ function isString(arg) {
284
+ return typeof arg === "string";
285
+ }
286
+ function isSymbol(arg) {
287
+ return typeof arg === "symbol";
288
+ }
289
+ function isUndefined(arg) {
290
+ return arg === undefined;
291
+ }
292
+ function isRegExp(re) {
293
+ return isObject(re) && objectToString(re) === "[object RegExp]";
294
+ }
295
+ function isObject(arg) {
296
+ return typeof arg === "object" && arg !== null;
297
+ }
298
+ function isDate(d) {
299
+ return isObject(d) && objectToString(d) === "[object Date]";
300
+ }
301
+ function isError(e) {
302
+ return isObject(e) && (objectToString(e) === "[object Error]" || e instanceof Error);
303
+ }
304
+ function isFunction(arg) {
305
+ return typeof arg === "function";
306
+ }
307
+ function isPrimitive(arg) {
308
+ return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || typeof arg > "u";
309
+ }
310
+ function isBuffer(arg) {
311
+ return arg instanceof Buffer;
312
+ }
313
+ function objectToString(o) {
314
+ return Object.prototype.toString.call(o);
315
+ }
316
+ function pad(n) {
317
+ return n < 10 ? "0" + n.toString(10) : n.toString(10);
318
+ }
319
+ function timestamp() {
320
+ var d = new Date, time = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(":");
321
+ return [d.getDate(), months[d.getMonth()], time].join(" ");
322
+ }
323
+ function log(...args) {
324
+ console.log("%s - %s", timestamp(), format.apply(null, args));
325
+ }
326
+ function inherits(ctor, superCtor) {
327
+ if (superCtor)
328
+ ctor.super_ = superCtor, ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } });
329
+ }
330
+ function _extend(origin, add) {
331
+ if (!add || !isObject(add))
332
+ return origin;
333
+ var keys = Object.keys(add), i = keys.length;
334
+ while (i--)
335
+ origin[keys[i]] = add[keys[i]];
336
+ return origin;
337
+ }
338
+ function hasOwnProperty(obj, prop) {
339
+ return Object.prototype.hasOwnProperty.call(obj, prop);
340
+ }
341
+ function callbackifyOnRejected(reason, cb) {
342
+ if (!reason) {
343
+ var newReason = Error("Promise was rejected with a falsy value");
344
+ newReason.reason = reason, reason = newReason;
345
+ }
346
+ return cb(reason);
347
+ }
348
+ function callbackify(original) {
349
+ if (typeof original !== "function")
350
+ throw TypeError('The "original" argument must be of type Function');
351
+ function callbackified(...args) {
352
+ var maybeCb = args.pop();
353
+ if (typeof maybeCb !== "function")
354
+ throw TypeError("The last argument must be of type Function");
355
+ var self = this, cb = function(...args2) {
356
+ return maybeCb.apply(self, ...args2);
357
+ };
358
+ original.apply(this, args).then(function(ret) {
359
+ process.nextTick(cb.bind(null, null, ret));
360
+ }, function(rej) {
361
+ process.nextTick(callbackifyOnRejected.bind(null, rej, cb));
362
+ });
363
+ }
364
+ return Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original)), Object.defineProperties(callbackified, Object.getOwnPropertyDescriptors(original)), callbackified;
365
+ }
366
+ var formatRegExp;
367
+ var debuglog;
368
+ var inspect;
369
+ var types = () => {};
370
+ var months;
371
+ var promisify;
372
+ var TextEncoder;
373
+ var TextDecoder;
374
+ var util_default;
375
+ var init_util = __esm2(() => {
376
+ formatRegExp = /%[sdj%]/g;
377
+ debuglog = ((debugs = {}, debugEnvRegex = {}, debugEnv) => ((debugEnv = typeof process < "u" && false) && (debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase()), debugEnvRegex = new RegExp("^" + debugEnv + "$", "i"), (set) => {
378
+ if (set = set.toUpperCase(), !debugs[set])
379
+ if (debugEnvRegex.test(set))
380
+ debugs[set] = function(...args) {
381
+ console.error("%s: %s", set, pid, format.apply(null, ...args));
382
+ };
383
+ else
384
+ debugs[set] = function() {};
385
+ return debugs[set];
386
+ }))();
387
+ inspect = ((i) => (i.colors = { bold: [1, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], white: [37, 39], grey: [90, 39], black: [30, 39], blue: [34, 39], cyan: [36, 39], green: [32, 39], magenta: [35, 39], red: [31, 39], yellow: [33, 39] }, i.styles = { special: "cyan", number: "yellow", boolean: "yellow", undefined: "grey", null: "bold", string: "green", date: "magenta", regexp: "red" }, i.custom = Symbol.for("nodejs.util.inspect.custom"), i))(function(obj, opts, ...rest) {
388
+ var ctx = { seen: [], stylize: stylizeNoColor };
389
+ if (rest.length >= 1)
390
+ ctx.depth = rest[0];
391
+ if (rest.length >= 2)
392
+ ctx.colors = rest[1];
393
+ if (isBoolean(opts))
394
+ ctx.showHidden = opts;
395
+ else if (opts)
396
+ _extend(ctx, opts);
397
+ if (isUndefined(ctx.showHidden))
398
+ ctx.showHidden = false;
399
+ if (isUndefined(ctx.depth))
400
+ ctx.depth = 2;
401
+ if (isUndefined(ctx.colors))
402
+ ctx.colors = false;
403
+ if (ctx.colors)
404
+ ctx.stylize = stylizeWithColor;
405
+ return formatValue(ctx, obj, ctx.depth);
406
+ });
407
+ months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
408
+ promisify = ((x) => (x.custom = Symbol.for("nodejs.util.promisify.custom"), x))(function(original) {
409
+ if (typeof original !== "function")
410
+ throw TypeError('The "original" argument must be of type Function');
411
+ if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
412
+ var fn = original[kCustomPromisifiedSymbol];
413
+ if (typeof fn !== "function")
414
+ throw TypeError('The "nodejs.util.promisify.custom" argument must be of type Function');
415
+ return Object.defineProperty(fn, kCustomPromisifiedSymbol, { value: fn, enumerable: false, writable: false, configurable: true }), fn;
416
+ }
417
+ function fn(...args) {
418
+ var promiseResolve, promiseReject, promise = new Promise(function(resolve, reject) {
419
+ promiseResolve = resolve, promiseReject = reject;
420
+ });
421
+ args.push(function(err, value) {
422
+ if (err)
423
+ promiseReject(err);
424
+ else
425
+ promiseResolve(value);
426
+ });
427
+ try {
428
+ original.apply(this, args);
429
+ } catch (err) {
430
+ promiseReject(err);
431
+ }
432
+ return promise;
433
+ }
434
+ if (Object.setPrototypeOf(fn, Object.getPrototypeOf(original)), kCustomPromisifiedSymbol)
435
+ Object.defineProperty(fn, kCustomPromisifiedSymbol, { value: fn, enumerable: false, writable: false, configurable: true });
436
+ return Object.defineProperties(fn, Object.getOwnPropertyDescriptors(original));
437
+ });
438
+ ({ TextEncoder, TextDecoder } = globalThis);
439
+ util_default = { TextEncoder, TextDecoder, promisify, log, inherits, _extend, callbackifyOnRejected, callbackify };
440
+ });
40
441
  var DEFAULT_PLATFORM = "BEYOND_AI";
41
442
  var BEYONDAI_TOKEN_URLS = {
42
443
  staging: "https://staging-beyond-timeback-api-2-idp.auth.us-east-1.amazoncognito.com/oauth2/token",
@@ -184,7 +585,7 @@ function detectEnvironment() {
184
585
  var nodeInspect;
185
586
  if (!isBrowser()) {
186
587
  try {
187
- const util = await import("node:util");
588
+ const util = await Promise.resolve().then(() => (init_util(), exports_util));
188
589
  nodeInspect = util.inspect;
189
590
  } catch {}
190
591
  }
@@ -237,10 +638,10 @@ var terminalFormatter = (entry) => {
237
638
  const consoleMethod = getConsoleMethod(entry.level);
238
639
  const levelUpper = entry.level.toUpperCase().padEnd(5);
239
640
  const isoString = entry.timestamp.toISOString().replace(/\.\d{3}Z$/, "");
240
- const timestamp = `${colors.dim}[${isoString}]${colors.reset}`;
641
+ const timestamp2 = `${colors.dim}[${isoString}]${colors.reset}`;
241
642
  const level = `${levelColor}${levelUpper}${colors.reset}`;
242
643
  const scope = entry.scope ? `${colors.bold}[${entry.scope}]${colors.reset} ` : "";
243
- const prefix = `${timestamp} ${level} ${scope}${entry.message}`;
644
+ const prefix = `${timestamp2} ${level} ${scope}${entry.message}`;
244
645
  if (entry.context && Object.keys(entry.context).length > 0) {
245
646
  consoleMethod(prefix, formatContext(entry.context));
246
647
  } else {
@@ -254,9 +655,9 @@ var LEVEL_PREFIX = {
254
655
  error: "[ERROR]"
255
656
  };
256
657
  function formatContext2(context) {
257
- return Object.entries(context).map(([key, value]) => `${key}=${formatValue(value)}`).join(" ");
658
+ return Object.entries(context).map(([key, value]) => `${key}=${formatValue2(value)}`).join(" ");
258
659
  }
259
- function formatValue(value) {
660
+ function formatValue2(value) {
260
661
  if (typeof value === "string")
261
662
  return value;
262
663
  if (typeof value === "number")
@@ -412,7 +813,7 @@ function isDebug() {
412
813
  return false;
413
814
  }
414
815
  }
415
- var log = createLogger({ scope: "auth", minLevel: isDebug() ? "debug" : "warn" });
816
+ var log2 = createLogger({ scope: "auth", minLevel: isDebug() ? "debug" : "warn" });
416
817
 
417
818
  class TokenManager {
418
819
  config;
@@ -426,11 +827,11 @@ class TokenManager {
426
827
  }
427
828
  async getToken() {
428
829
  if (this.accessToken && Date.now() < this.tokenExpiry) {
429
- log.debug("Using cached token");
830
+ log2.debug("Using cached token");
430
831
  return this.accessToken;
431
832
  }
432
833
  if (this.pendingRequest) {
433
- log.debug("Waiting for in-flight token request");
834
+ log2.debug("Waiting for in-flight token request");
434
835
  return this.pendingRequest;
435
836
  }
436
837
  this.pendingRequest = this.fetchToken();
@@ -441,7 +842,7 @@ class TokenManager {
441
842
  }
442
843
  }
443
844
  async fetchToken() {
444
- log.debug("Fetching new access token...");
845
+ log2.debug("Fetching new access token...");
445
846
  const { clientId, clientSecret } = this.config.credentials;
446
847
  const credentials = btoa(`${clientId}:${clientSecret}`);
447
848
  const start = performance.now();
@@ -455,17 +856,17 @@ class TokenManager {
455
856
  });
456
857
  const duration = Math.round(performance.now() - start);
457
858
  if (!response.ok) {
458
- log.error(`Token request failed: ${response.status} ${response.statusText}`);
859
+ log2.error(`Token request failed: ${response.status} ${response.statusText}`);
459
860
  throw new Error(`Failed to obtain access token: ${response.status} ${response.statusText}`);
460
861
  }
461
862
  const data = await response.json();
462
863
  this.accessToken = data.access_token;
463
864
  this.tokenExpiry = Date.now() + (data.expires_in - 60) * 1000;
464
- log.debug(`Token acquired (${duration}ms, expires in ${data.expires_in}s)`);
865
+ log2.debug(`Token acquired (${duration}ms, expires in ${data.expires_in}s)`);
465
866
  return this.accessToken;
466
867
  }
467
868
  invalidate() {
468
- log.debug("Token invalidated");
869
+ log2.debug("Token invalidated");
469
870
  this.accessToken = null;
470
871
  this.tokenExpiry = 0;
471
872
  }
@@ -934,7 +1335,7 @@ var MODE_TOKEN_PROVIDER = {
934
1335
  return "tokenProvider" in config;
935
1336
  },
936
1337
  resolve() {
937
- throw new Error("TokenProvider mode is not supported with provider pattern. Use { provider: TimebackProvider } or { env, auth } instead.");
1338
+ throw new Error("TokenProvider mode is not supported with provider pattern. " + "Use { provider: TimebackProvider } or { env, auth } instead.");
938
1339
  }
939
1340
  };
940
1341
  var MODES = [
@@ -1294,7 +1695,7 @@ var EDUBRIDGE_ENV_VARS = {
1294
1695
  function resolveToProvider2(config, registry = DEFAULT_PROVIDER_REGISTRY) {
1295
1696
  return resolveToProvider(config, EDUBRIDGE_ENV_VARS, registry);
1296
1697
  }
1297
- var log2 = createScopedLogger("edubridge");
1698
+ var log3 = createScopedLogger("edubridge");
1298
1699
  function normalizeBoolean(value) {
1299
1700
  if (typeof value === "boolean")
1300
1701
  return value;
@@ -1359,7 +1760,7 @@ function aggregateActivityMetrics(data) {
1359
1760
  class Transport extends BaseTransport {
1360
1761
  paths;
1361
1762
  constructor(config) {
1362
- super({ config, logger: log2 });
1763
+ super({ config, logger: log3 });
1363
1764
  this.paths = config.paths;
1364
1765
  }
1365
1766
  async requestPaginated(path, options = {}) {
@@ -1403,7 +1804,7 @@ __export2(exports_external, {
1403
1804
  uuidv6: () => uuidv6,
1404
1805
  uuidv4: () => uuidv4,
1405
1806
  uuid: () => uuid2,
1406
- util: () => exports_util,
1807
+ util: () => exports_util2,
1407
1808
  url: () => url,
1408
1809
  uppercase: () => _uppercase,
1409
1810
  unknown: () => unknown,
@@ -1512,7 +1913,7 @@ __export2(exports_external, {
1512
1913
  getErrorMap: () => getErrorMap,
1513
1914
  function: () => _function,
1514
1915
  fromJSONSchema: () => fromJSONSchema,
1515
- formatError: () => formatError,
1916
+ formatError: () => formatError2,
1516
1917
  float64: () => float64,
1517
1918
  float32: () => float32,
1518
1919
  flattenError: () => flattenError,
@@ -1636,7 +2037,7 @@ __export2(exports_external, {
1636
2037
  var exports_core2 = {};
1637
2038
  __export2(exports_core2, {
1638
2039
  version: () => version,
1639
- util: () => exports_util,
2040
+ util: () => exports_util2,
1640
2041
  treeifyError: () => treeifyError,
1641
2042
  toJSONSchema: () => toJSONSchema,
1642
2043
  toDotPath: () => toDotPath,
@@ -1660,7 +2061,7 @@ __export2(exports_core2, {
1660
2061
  initializeContext: () => initializeContext,
1661
2062
  globalRegistry: () => globalRegistry,
1662
2063
  globalConfig: () => globalConfig,
1663
- formatError: () => formatError,
2064
+ formatError: () => formatError2,
1664
2065
  flattenError: () => flattenError,
1665
2066
  finalize: () => finalize,
1666
2067
  extractDefs: () => extractDefs,
@@ -1984,8 +2385,8 @@ function config(newConfig) {
1984
2385
  Object.assign(globalConfig, newConfig);
1985
2386
  return globalConfig;
1986
2387
  }
1987
- var exports_util = {};
1988
- __export2(exports_util, {
2388
+ var exports_util2 = {};
2389
+ __export2(exports_util2, {
1989
2390
  unwrapMessage: () => unwrapMessage,
1990
2391
  uint8ArrayToHex: () => uint8ArrayToHex,
1991
2392
  uint8ArrayToBase64url: () => uint8ArrayToBase64url,
@@ -2015,7 +2416,7 @@ __export2(exports_util, {
2015
2416
  joinValues: () => joinValues,
2016
2417
  issue: () => issue2,
2017
2418
  isPlainObject: () => isPlainObject,
2018
- isObject: () => isObject,
2419
+ isObject: () => isObject2,
2019
2420
  hexToUint8Array: () => hexToUint8Array,
2020
2421
  getSizableOrigin: () => getSizableOrigin,
2021
2422
  getParsedType: () => getParsedType,
@@ -2184,7 +2585,7 @@ function slugify(input) {
2184
2585
  return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
2185
2586
  }
2186
2587
  var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {};
2187
- function isObject(data) {
2588
+ function isObject2(data) {
2188
2589
  return typeof data === "object" && data !== null && !Array.isArray(data);
2189
2590
  }
2190
2591
  var allowsEval = cached(() => {
@@ -2200,7 +2601,7 @@ var allowsEval = cached(() => {
2200
2601
  }
2201
2602
  });
2202
2603
  function isPlainObject(o) {
2203
- if (isObject(o) === false)
2604
+ if (isObject2(o) === false)
2204
2605
  return false;
2205
2606
  const ctor = o.constructor;
2206
2607
  if (ctor === undefined)
@@ -2208,7 +2609,7 @@ function isPlainObject(o) {
2208
2609
  if (typeof ctor !== "function")
2209
2610
  return true;
2210
2611
  const prot = ctor.prototype;
2211
- if (isObject(prot) === false)
2612
+ if (isObject2(prot) === false)
2212
2613
  return false;
2213
2614
  if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) {
2214
2615
  return false;
@@ -2687,7 +3088,7 @@ function flattenError(error, mapper = (issue3) => issue3.message) {
2687
3088
  }
2688
3089
  return { formErrors, fieldErrors };
2689
3090
  }
2690
- function formatError(error, mapper = (issue3) => issue3.message) {
3091
+ function formatError2(error, mapper = (issue3) => issue3.message) {
2691
3092
  const fieldErrors = { _errors: [] };
2692
3093
  const processError = (error2) => {
2693
3094
  for (const issue3 of error2.issues) {
@@ -4202,15 +4603,15 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
4202
4603
  } catch (_err) {}
4203
4604
  }
4204
4605
  const input = payload.value;
4205
- const isDate = input instanceof Date;
4206
- const isValidDate = isDate && !Number.isNaN(input.getTime());
4606
+ const isDate2 = input instanceof Date;
4607
+ const isValidDate = isDate2 && !Number.isNaN(input.getTime());
4207
4608
  if (isValidDate)
4208
4609
  return payload;
4209
4610
  payload.issues.push({
4210
4611
  expected: "date",
4211
4612
  code: "invalid_type",
4212
4613
  input,
4213
- ...isDate ? { received: "Invalid Date" } : {},
4614
+ ...isDate2 ? { received: "Invalid Date" } : {},
4214
4615
  inst
4215
4616
  });
4216
4617
  return payload;
@@ -4349,13 +4750,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
4349
4750
  }
4350
4751
  return propValues;
4351
4752
  });
4352
- const isObject2 = isObject;
4753
+ const isObject3 = isObject2;
4353
4754
  const catchall = def.catchall;
4354
4755
  let value;
4355
4756
  inst._zod.parse = (payload, ctx) => {
4356
4757
  value ?? (value = _normalized.value);
4357
4758
  const input = payload.value;
4358
- if (!isObject2(input)) {
4759
+ if (!isObject3(input)) {
4359
4760
  payload.issues.push({
4360
4761
  expected: "object",
4361
4762
  code: "invalid_type",
@@ -4453,7 +4854,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
4453
4854
  return (payload, ctx) => fn(shape, payload, ctx);
4454
4855
  };
4455
4856
  let fastpass;
4456
- const isObject2 = isObject;
4857
+ const isObject3 = isObject2;
4457
4858
  const jit = !globalConfig.jitless;
4458
4859
  const allowsEval2 = allowsEval;
4459
4860
  const fastEnabled = jit && allowsEval2.value;
@@ -4462,7 +4863,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
4462
4863
  inst._zod.parse = (payload, ctx) => {
4463
4864
  value ?? (value = _normalized.value);
4464
4865
  const input = payload.value;
4465
- if (!isObject2(input)) {
4866
+ if (!isObject3(input)) {
4466
4867
  payload.issues.push({
4467
4868
  expected: "object",
4468
4869
  code: "invalid_type",
@@ -4640,7 +5041,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
4640
5041
  });
4641
5042
  inst._zod.parse = (payload, ctx) => {
4642
5043
  const input = payload.value;
4643
- if (!isObject(input)) {
5044
+ if (!isObject2(input)) {
4644
5045
  payload.issues.push({
4645
5046
  code: "invalid_type",
4646
5047
  expected: "object",
@@ -4761,7 +5162,7 @@ function handleIntersectionResults(result, left, right) {
4761
5162
  return result;
4762
5163
  const merged = mergeValues(left.value, right.value);
4763
5164
  if (!merged.valid) {
4764
- throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`);
5165
+ throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);
4765
5166
  }
4766
5167
  result.value = merged.data;
4767
5168
  return result;
@@ -11679,10 +12080,10 @@ function _property(property, schema, params) {
11679
12080
  ...normalizeParams(params)
11680
12081
  });
11681
12082
  }
11682
- function _mime(types, params) {
12083
+ function _mime(types2, params) {
11683
12084
  return new $ZodCheckMimeType({
11684
12085
  check: "mime_type",
11685
- mime: types,
12086
+ mime: types2,
11686
12087
  ...normalizeParams(params)
11687
12088
  });
11688
12089
  }
@@ -12005,13 +12406,13 @@ function _stringbool(Classes, _params) {
12005
12406
  });
12006
12407
  return codec;
12007
12408
  }
12008
- function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
12409
+ function _stringFormat(Class2, format2, fnOrRegex, _params = {}) {
12009
12410
  const params = normalizeParams(_params);
12010
12411
  const def = {
12011
12412
  ...normalizeParams(_params),
12012
12413
  check: "string_format",
12013
12414
  type: "string",
12014
- format,
12415
+ format: format2,
12015
12416
  fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
12016
12417
  ...params
12017
12418
  };
@@ -12149,9 +12550,7 @@ function extractDefs(ctx, schema) {
12149
12550
  for (const entry of ctx.seen.entries()) {
12150
12551
  const seen = entry[1];
12151
12552
  if (seen.cycle) {
12152
- throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/<root>
12153
-
12154
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
12553
+ throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + '\n\nSet the `cycles` parameter to `"ref"` to resolve cyclical schemas with defs.');
12155
12554
  }
12156
12555
  }
12157
12556
  }
@@ -12377,16 +12776,16 @@ var formatMap = {
12377
12776
  var stringProcessor = (schema, ctx, _json, _params) => {
12378
12777
  const json = _json;
12379
12778
  json.type = "string";
12380
- const { minimum, maximum, format, patterns: patterns2, contentEncoding } = schema._zod.bag;
12779
+ const { minimum, maximum, format: format2, patterns: patterns2, contentEncoding } = schema._zod.bag;
12381
12780
  if (typeof minimum === "number")
12382
12781
  json.minLength = minimum;
12383
12782
  if (typeof maximum === "number")
12384
12783
  json.maxLength = maximum;
12385
- if (format) {
12386
- json.format = formatMap[format] ?? format;
12784
+ if (format2) {
12785
+ json.format = formatMap[format2] ?? format2;
12387
12786
  if (json.format === "")
12388
12787
  delete json.format;
12389
- if (format === "time") {
12788
+ if (format2 === "time") {
12390
12789
  delete json.format;
12391
12790
  }
12392
12791
  }
@@ -12408,8 +12807,8 @@ var stringProcessor = (schema, ctx, _json, _params) => {
12408
12807
  };
12409
12808
  var numberProcessor = (schema, ctx, _json, _params) => {
12410
12809
  const json = _json;
12411
- const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
12412
- if (typeof format === "string" && format.includes("int"))
12810
+ const { minimum, maximum, format: format2, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
12811
+ if (typeof format2 === "string" && format2.includes("int"))
12413
12812
  json.type = "integer";
12414
12813
  else
12415
12814
  json.type = "number";
@@ -13214,7 +13613,7 @@ var initializer2 = (inst, issues) => {
13214
13613
  inst.name = "ZodError";
13215
13614
  Object.defineProperties(inst, {
13216
13615
  format: {
13217
- value: (mapper) => formatError(inst, mapper)
13616
+ value: (mapper) => formatError2(inst, mapper)
13218
13617
  },
13219
13618
  flatten: {
13220
13619
  value: (mapper) => flattenError(inst, mapper)
@@ -13267,7 +13666,7 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
13267
13666
  inst.type = def.type;
13268
13667
  Object.defineProperty(inst, "_def", { value: def });
13269
13668
  inst.check = (...checks2) => {
13270
- return inst.clone(exports_util.mergeDefs(def, {
13669
+ return inst.clone(exports_util2.mergeDefs(def, {
13271
13670
  checks: [
13272
13671
  ...def.checks ?? [],
13273
13672
  ...checks2.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
@@ -13440,7 +13839,7 @@ function httpUrl(params) {
13440
13839
  return _url(ZodURL, {
13441
13840
  protocol: /^https?$/,
13442
13841
  hostname: exports_regexes.domain,
13443
- ...exports_util.normalizeParams(params)
13842
+ ...exports_util2.normalizeParams(params)
13444
13843
  });
13445
13844
  }
13446
13845
  var ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => {
@@ -13559,8 +13958,8 @@ var ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat"
13559
13958
  $ZodCustomStringFormat.init(inst, def);
13560
13959
  ZodStringFormat.init(inst, def);
13561
13960
  });
13562
- function stringFormat(format, fnOrRegex, _params = {}) {
13563
- return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
13961
+ function stringFormat(format2, fnOrRegex, _params = {}) {
13962
+ return _stringFormat(ZodCustomStringFormat, format2, fnOrRegex, _params);
13564
13963
  }
13565
13964
  function hostname2(_params) {
13566
13965
  return _stringFormat(ZodCustomStringFormat, "hostname", exports_regexes.hostname, _params);
@@ -13570,11 +13969,11 @@ function hex2(_params) {
13570
13969
  }
13571
13970
  function hash(alg, params) {
13572
13971
  const enc = params?.enc ?? "hex";
13573
- const format = `${alg}_${enc}`;
13574
- const regex = exports_regexes[format];
13972
+ const format2 = `${alg}_${enc}`;
13973
+ const regex = exports_regexes[format2];
13575
13974
  if (!regex)
13576
- throw new Error(`Unrecognized hash format: ${format}`);
13577
- return _stringFormat(ZodCustomStringFormat, format, regex, params);
13975
+ throw new Error(`Unrecognized hash format: ${format2}`);
13976
+ return _stringFormat(ZodCustomStringFormat, format2, regex, params);
13578
13977
  }
13579
13978
  var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
13580
13979
  $ZodNumber.init(inst, def);
@@ -13758,7 +14157,7 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
13758
14157
  $ZodObjectJIT.init(inst, def);
13759
14158
  ZodType.init(inst, def);
13760
14159
  inst._zod.processJSONSchema = (ctx, json, params) => objectProcessor(inst, ctx, json, params);
13761
- exports_util.defineLazy(inst, "shape", () => {
14160
+ exports_util2.defineLazy(inst, "shape", () => {
13762
14161
  return def.shape;
13763
14162
  });
13764
14163
  inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape));
@@ -13768,22 +14167,22 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
13768
14167
  inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
13769
14168
  inst.strip = () => inst.clone({ ...inst._zod.def, catchall: undefined });
13770
14169
  inst.extend = (incoming) => {
13771
- return exports_util.extend(inst, incoming);
14170
+ return exports_util2.extend(inst, incoming);
13772
14171
  };
13773
14172
  inst.safeExtend = (incoming) => {
13774
- return exports_util.safeExtend(inst, incoming);
14173
+ return exports_util2.safeExtend(inst, incoming);
13775
14174
  };
13776
- inst.merge = (other) => exports_util.merge(inst, other);
13777
- inst.pick = (mask) => exports_util.pick(inst, mask);
13778
- inst.omit = (mask) => exports_util.omit(inst, mask);
13779
- inst.partial = (...args) => exports_util.partial(ZodOptional, inst, args[0]);
13780
- inst.required = (...args) => exports_util.required(ZodNonOptional, inst, args[0]);
14175
+ inst.merge = (other) => exports_util2.merge(inst, other);
14176
+ inst.pick = (mask) => exports_util2.pick(inst, mask);
14177
+ inst.omit = (mask) => exports_util2.omit(inst, mask);
14178
+ inst.partial = (...args) => exports_util2.partial(ZodOptional, inst, args[0]);
14179
+ inst.required = (...args) => exports_util2.required(ZodNonOptional, inst, args[0]);
13781
14180
  });
13782
14181
  function object(shape, params) {
13783
14182
  const def = {
13784
14183
  type: "object",
13785
14184
  shape: shape ?? {},
13786
- ...exports_util.normalizeParams(params)
14185
+ ...exports_util2.normalizeParams(params)
13787
14186
  };
13788
14187
  return new ZodObject(def);
13789
14188
  }
@@ -13792,7 +14191,7 @@ function strictObject(shape, params) {
13792
14191
  type: "object",
13793
14192
  shape,
13794
14193
  catchall: never(),
13795
- ...exports_util.normalizeParams(params)
14194
+ ...exports_util2.normalizeParams(params)
13796
14195
  });
13797
14196
  }
13798
14197
  function looseObject(shape, params) {
@@ -13800,7 +14199,7 @@ function looseObject(shape, params) {
13800
14199
  type: "object",
13801
14200
  shape,
13802
14201
  catchall: unknown(),
13803
- ...exports_util.normalizeParams(params)
14202
+ ...exports_util2.normalizeParams(params)
13804
14203
  });
13805
14204
  }
13806
14205
  var ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
@@ -13813,7 +14212,7 @@ function union(options, params) {
13813
14212
  return new ZodUnion({
13814
14213
  type: "union",
13815
14214
  options,
13816
- ...exports_util.normalizeParams(params)
14215
+ ...exports_util2.normalizeParams(params)
13817
14216
  });
13818
14217
  }
13819
14218
  var ZodXor = /* @__PURE__ */ $constructor("ZodXor", (inst, def) => {
@@ -13827,7 +14226,7 @@ function xor(options, params) {
13827
14226
  type: "union",
13828
14227
  options,
13829
14228
  inclusive: false,
13830
- ...exports_util.normalizeParams(params)
14229
+ ...exports_util2.normalizeParams(params)
13831
14230
  });
13832
14231
  }
13833
14232
  var ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => {
@@ -13839,7 +14238,7 @@ function discriminatedUnion(discriminator, options, params) {
13839
14238
  type: "union",
13840
14239
  options,
13841
14240
  discriminator,
13842
- ...exports_util.normalizeParams(params)
14241
+ ...exports_util2.normalizeParams(params)
13843
14242
  });
13844
14243
  }
13845
14244
  var ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
@@ -13871,7 +14270,7 @@ function tuple(items, _paramsOrRest, _params) {
13871
14270
  type: "tuple",
13872
14271
  items,
13873
14272
  rest,
13874
- ...exports_util.normalizeParams(params)
14273
+ ...exports_util2.normalizeParams(params)
13875
14274
  });
13876
14275
  }
13877
14276
  var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
@@ -13886,7 +14285,7 @@ function record(keyType, valueType, params) {
13886
14285
  type: "record",
13887
14286
  keyType,
13888
14287
  valueType,
13889
- ...exports_util.normalizeParams(params)
14288
+ ...exports_util2.normalizeParams(params)
13890
14289
  });
13891
14290
  }
13892
14291
  function partialRecord(keyType, valueType, params) {
@@ -13896,7 +14295,7 @@ function partialRecord(keyType, valueType, params) {
13896
14295
  type: "record",
13897
14296
  keyType: k,
13898
14297
  valueType,
13899
- ...exports_util.normalizeParams(params)
14298
+ ...exports_util2.normalizeParams(params)
13900
14299
  });
13901
14300
  }
13902
14301
  function looseRecord(keyType, valueType, params) {
@@ -13905,7 +14304,7 @@ function looseRecord(keyType, valueType, params) {
13905
14304
  keyType,
13906
14305
  valueType,
13907
14306
  mode: "loose",
13908
- ...exports_util.normalizeParams(params)
14307
+ ...exports_util2.normalizeParams(params)
13909
14308
  });
13910
14309
  }
13911
14310
  var ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => {
@@ -13924,7 +14323,7 @@ function map(keyType, valueType, params) {
13924
14323
  type: "map",
13925
14324
  keyType,
13926
14325
  valueType,
13927
- ...exports_util.normalizeParams(params)
14326
+ ...exports_util2.normalizeParams(params)
13928
14327
  });
13929
14328
  }
13930
14329
  var ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => {
@@ -13940,7 +14339,7 @@ function set(valueType, params) {
13940
14339
  return new ZodSet({
13941
14340
  type: "set",
13942
14341
  valueType,
13943
- ...exports_util.normalizeParams(params)
14342
+ ...exports_util2.normalizeParams(params)
13944
14343
  });
13945
14344
  }
13946
14345
  var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
@@ -13961,7 +14360,7 @@ var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
13961
14360
  return new ZodEnum({
13962
14361
  ...def,
13963
14362
  checks: [],
13964
- ...exports_util.normalizeParams(params),
14363
+ ...exports_util2.normalizeParams(params),
13965
14364
  entries: newEntries
13966
14365
  });
13967
14366
  };
@@ -13976,7 +14375,7 @@ var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
13976
14375
  return new ZodEnum({
13977
14376
  ...def,
13978
14377
  checks: [],
13979
- ...exports_util.normalizeParams(params),
14378
+ ...exports_util2.normalizeParams(params),
13980
14379
  entries: newEntries
13981
14380
  });
13982
14381
  };
@@ -13986,14 +14385,14 @@ function _enum2(values, params) {
13986
14385
  return new ZodEnum({
13987
14386
  type: "enum",
13988
14387
  entries,
13989
- ...exports_util.normalizeParams(params)
14388
+ ...exports_util2.normalizeParams(params)
13990
14389
  });
13991
14390
  }
13992
14391
  function nativeEnum(entries, params) {
13993
14392
  return new ZodEnum({
13994
14393
  type: "enum",
13995
14394
  entries,
13996
- ...exports_util.normalizeParams(params)
14395
+ ...exports_util2.normalizeParams(params)
13997
14396
  });
13998
14397
  }
13999
14398
  var ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => {
@@ -14014,7 +14413,7 @@ function literal(value, params) {
14014
14413
  return new ZodLiteral({
14015
14414
  type: "literal",
14016
14415
  values: Array.isArray(value) ? value : [value],
14017
- ...exports_util.normalizeParams(params)
14416
+ ...exports_util2.normalizeParams(params)
14018
14417
  });
14019
14418
  }
14020
14419
  var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => {
@@ -14023,7 +14422,7 @@ var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => {
14023
14422
  inst._zod.processJSONSchema = (ctx, json, params) => fileProcessor(inst, ctx, json, params);
14024
14423
  inst.min = (size, params) => inst.check(_minSize(size, params));
14025
14424
  inst.max = (size, params) => inst.check(_maxSize(size, params));
14026
- inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params));
14425
+ inst.mime = (types2, params) => inst.check(_mime(Array.isArray(types2) ? types2 : [types2], params));
14027
14426
  });
14028
14427
  function file(params) {
14029
14428
  return _file(ZodFile, params);
@@ -14038,7 +14437,7 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
14038
14437
  }
14039
14438
  payload.addIssue = (issue3) => {
14040
14439
  if (typeof issue3 === "string") {
14041
- payload.issues.push(exports_util.issue(issue3, payload.value, def));
14440
+ payload.issues.push(exports_util2.issue(issue3, payload.value, def));
14042
14441
  } else {
14043
14442
  const _issue = issue3;
14044
14443
  if (_issue.fatal)
@@ -14046,7 +14445,7 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
14046
14445
  _issue.code ?? (_issue.code = "custom");
14047
14446
  _issue.input ?? (_issue.input = payload.value);
14048
14447
  _issue.inst ?? (_issue.inst = inst);
14049
- payload.issues.push(exports_util.issue(_issue));
14448
+ payload.issues.push(exports_util2.issue(_issue));
14050
14449
  }
14051
14450
  };
14052
14451
  const output = def.transform(payload.value, payload);
@@ -14117,7 +14516,7 @@ function _default2(innerType, defaultValue) {
14117
14516
  type: "default",
14118
14517
  innerType,
14119
14518
  get defaultValue() {
14120
- return typeof defaultValue === "function" ? defaultValue() : exports_util.shallowClone(defaultValue);
14519
+ return typeof defaultValue === "function" ? defaultValue() : exports_util2.shallowClone(defaultValue);
14121
14520
  }
14122
14521
  });
14123
14522
  }
@@ -14132,7 +14531,7 @@ function prefault(innerType, defaultValue) {
14132
14531
  type: "prefault",
14133
14532
  innerType,
14134
14533
  get defaultValue() {
14135
- return typeof defaultValue === "function" ? defaultValue() : exports_util.shallowClone(defaultValue);
14534
+ return typeof defaultValue === "function" ? defaultValue() : exports_util2.shallowClone(defaultValue);
14136
14535
  }
14137
14536
  });
14138
14537
  }
@@ -14146,7 +14545,7 @@ function nonoptional(innerType, params) {
14146
14545
  return new ZodNonOptional({
14147
14546
  type: "nonoptional",
14148
14547
  innerType,
14149
- ...exports_util.normalizeParams(params)
14548
+ ...exports_util2.normalizeParams(params)
14150
14549
  });
14151
14550
  }
14152
14551
  var ZodSuccess = /* @__PURE__ */ $constructor("ZodSuccess", (inst, def) => {
@@ -14231,7 +14630,7 @@ function templateLiteral(parts, params) {
14231
14630
  return new ZodTemplateLiteral({
14232
14631
  type: "template_literal",
14233
14632
  parts,
14234
- ...exports_util.normalizeParams(params)
14633
+ ...exports_util2.normalizeParams(params)
14235
14634
  });
14236
14635
  }
14237
14636
  var ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => {
@@ -14299,7 +14698,7 @@ function _instanceof(cls, params = {}) {
14299
14698
  check: "custom",
14300
14699
  fn: (data) => data instanceof cls,
14301
14700
  abort: true,
14302
- ...exports_util.normalizeParams(params)
14701
+ ...exports_util2.normalizeParams(params)
14303
14702
  });
14304
14703
  inst._zod.bag.Class = cls;
14305
14704
  inst._zod.check = (payload) => {
@@ -14531,52 +14930,52 @@ function convertBaseSchema(schema, ctx) {
14531
14930
  case "string": {
14532
14931
  let stringSchema = z.string();
14533
14932
  if (schema.format) {
14534
- const format = schema.format;
14535
- if (format === "email") {
14933
+ const format2 = schema.format;
14934
+ if (format2 === "email") {
14536
14935
  stringSchema = stringSchema.check(z.email());
14537
- } else if (format === "uri" || format === "uri-reference") {
14936
+ } else if (format2 === "uri" || format2 === "uri-reference") {
14538
14937
  stringSchema = stringSchema.check(z.url());
14539
- } else if (format === "uuid" || format === "guid") {
14938
+ } else if (format2 === "uuid" || format2 === "guid") {
14540
14939
  stringSchema = stringSchema.check(z.uuid());
14541
- } else if (format === "date-time") {
14940
+ } else if (format2 === "date-time") {
14542
14941
  stringSchema = stringSchema.check(z.iso.datetime());
14543
- } else if (format === "date") {
14942
+ } else if (format2 === "date") {
14544
14943
  stringSchema = stringSchema.check(z.iso.date());
14545
- } else if (format === "time") {
14944
+ } else if (format2 === "time") {
14546
14945
  stringSchema = stringSchema.check(z.iso.time());
14547
- } else if (format === "duration") {
14946
+ } else if (format2 === "duration") {
14548
14947
  stringSchema = stringSchema.check(z.iso.duration());
14549
- } else if (format === "ipv4") {
14948
+ } else if (format2 === "ipv4") {
14550
14949
  stringSchema = stringSchema.check(z.ipv4());
14551
- } else if (format === "ipv6") {
14950
+ } else if (format2 === "ipv6") {
14552
14951
  stringSchema = stringSchema.check(z.ipv6());
14553
- } else if (format === "mac") {
14952
+ } else if (format2 === "mac") {
14554
14953
  stringSchema = stringSchema.check(z.mac());
14555
- } else if (format === "cidr") {
14954
+ } else if (format2 === "cidr") {
14556
14955
  stringSchema = stringSchema.check(z.cidrv4());
14557
- } else if (format === "cidr-v6") {
14956
+ } else if (format2 === "cidr-v6") {
14558
14957
  stringSchema = stringSchema.check(z.cidrv6());
14559
- } else if (format === "base64") {
14958
+ } else if (format2 === "base64") {
14560
14959
  stringSchema = stringSchema.check(z.base64());
14561
- } else if (format === "base64url") {
14960
+ } else if (format2 === "base64url") {
14562
14961
  stringSchema = stringSchema.check(z.base64url());
14563
- } else if (format === "e164") {
14962
+ } else if (format2 === "e164") {
14564
14963
  stringSchema = stringSchema.check(z.e164());
14565
- } else if (format === "jwt") {
14964
+ } else if (format2 === "jwt") {
14566
14965
  stringSchema = stringSchema.check(z.jwt());
14567
- } else if (format === "emoji") {
14966
+ } else if (format2 === "emoji") {
14568
14967
  stringSchema = stringSchema.check(z.emoji());
14569
- } else if (format === "nanoid") {
14968
+ } else if (format2 === "nanoid") {
14570
14969
  stringSchema = stringSchema.check(z.nanoid());
14571
- } else if (format === "cuid") {
14970
+ } else if (format2 === "cuid") {
14572
14971
  stringSchema = stringSchema.check(z.cuid());
14573
- } else if (format === "cuid2") {
14972
+ } else if (format2 === "cuid2") {
14574
14973
  stringSchema = stringSchema.check(z.cuid2());
14575
- } else if (format === "ulid") {
14974
+ } else if (format2 === "ulid") {
14576
14975
  stringSchema = stringSchema.check(z.ulid());
14577
- } else if (format === "xid") {
14976
+ } else if (format2 === "xid") {
14578
14977
  stringSchema = stringSchema.check(z.xid());
14579
- } else if (format === "ksuid") {
14978
+ } else if (format2 === "ksuid") {
14580
14979
  stringSchema = stringSchema.check(z.ksuid());
14581
14980
  }
14582
14981
  }
@@ -15014,6 +15413,8 @@ var ActivityCompletedInput = exports_external.object({
15014
15413
  metricsId: exports_external.string().optional(),
15015
15414
  id: exports_external.string().optional(),
15016
15415
  extensions: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
15416
+ edApp: exports_external.union([exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())]).optional(),
15417
+ session: exports_external.union([exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())]).optional(),
15017
15418
  attempt: exports_external.number().int().min(1).optional(),
15018
15419
  generatedExtensions: exports_external.object({
15019
15420
  pctCompleteApp: exports_external.number().optional()
@@ -15026,7 +15427,9 @@ var TimeSpentInput = exports_external.object({
15026
15427
  eventTime: IsoDateTimeString.optional(),
15027
15428
  metricsId: exports_external.string().optional(),
15028
15429
  id: exports_external.string().optional(),
15029
- extensions: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
15430
+ extensions: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
15431
+ edApp: exports_external.union([exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())]).optional(),
15432
+ session: exports_external.union([exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())]).optional()
15030
15433
  }).strict();
15031
15434
  var TimebackEvent = exports_external.union([TimebackActivityEvent, TimebackTimeSpentEvent]);
15032
15435
  var CaliperEnvelope = exports_external.object({
@@ -15214,7 +15617,7 @@ var TimebackConfig = exports_external.object({
15214
15617
  message: "Each course must have an effective sensor. Either set `sensor` explicitly (top-level or per-course), or provide a `launchUrl` so sensor can be derived from its origin.",
15215
15618
  path: ["courses"]
15216
15619
  });
15217
- var EdubridgeDateString = IsoDateTimeString;
15620
+ var EdubridgeDateString = exports_external.union([IsoDateTimeString, IsoDateString]);
15218
15621
  var EduBridgeEnrollment = exports_external.object({
15219
15622
  id: exports_external.string(),
15220
15623
  role: exports_external.string(),
@@ -16412,7 +16815,7 @@ function createEdubridgeClient(registry2 = DEFAULT_PROVIDER_REGISTRY) {
16412
16815
  const resolved = resolveToProvider2(config3, registry2);
16413
16816
  if (resolved.mode === "transport") {
16414
16817
  this.transport = resolved.transport;
16415
- log2.info("Client initialized with custom transport");
16818
+ log3.info("Client initialized with custom transport");
16416
16819
  } else {
16417
16820
  const { provider } = resolved;
16418
16821
  const { baseUrl, paths } = provider.getEndpointWithPaths("edubridge");
@@ -16427,7 +16830,7 @@ function createEdubridgeClient(registry2 = DEFAULT_PROVIDER_REGISTRY) {
16427
16830
  timeout: provider.timeout,
16428
16831
  paths
16429
16832
  });
16430
- log2.info("Client initialized", {
16833
+ log3.info("Client initialized", {
16431
16834
  platform: provider.platform,
16432
16835
  env: provider.env,
16433
16836
  baseUrl