@manyducks.co/dolla 2.0.0-alpha.51 → 2.0.0-alpha.52

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.
Files changed (48) hide show
  1. package/README.md +15 -11
  2. package/dist/core/context.d.ts +7 -3
  3. package/dist/core/env.d.ts +9 -0
  4. package/dist/core/index.d.ts +23 -0
  5. package/dist/core/logger.d.ts +34 -0
  6. package/dist/core/markup.d.ts +6 -11
  7. package/dist/core/mount.d.ts +10 -0
  8. package/dist/core/nodes/dynamic.d.ts +1 -1
  9. package/dist/core/nodes/fragment.d.ts +1 -1
  10. package/dist/core/nodes/outlet.d.ts +1 -1
  11. package/dist/core/nodes/repeat.d.ts +1 -1
  12. package/dist/core/nodes/view.d.ts +11 -6
  13. package/dist/core/signals.d.ts +43 -2
  14. package/dist/core/store.d.ts +10 -5
  15. package/dist/{fragment-Bvuvw3ue.js → fragment-DSGTP-XE.js} +2 -2
  16. package/dist/{fragment-Bvuvw3ue.js.map → fragment-DSGTP-XE.js.map} +1 -1
  17. package/dist/http.js +163 -0
  18. package/dist/http.js.map +1 -0
  19. package/dist/{translate → i18n}/index.d.ts +7 -6
  20. package/dist/i18n.js +318 -0
  21. package/dist/i18n.js.map +1 -0
  22. package/dist/index.js +63 -1190
  23. package/dist/index.js.map +1 -1
  24. package/dist/jsx-dev-runtime.js +2 -2
  25. package/dist/jsx-runtime.js +2 -2
  26. package/dist/logger-CSRDjb4e.js +623 -0
  27. package/dist/logger-CSRDjb4e.js.map +1 -0
  28. package/dist/router/index.d.ts +1 -144
  29. package/dist/router/router.d.ts +139 -0
  30. package/dist/router-BYOH-To5.js +482 -0
  31. package/dist/router-BYOH-To5.js.map +1 -0
  32. package/dist/router.js +8 -0
  33. package/dist/router.js.map +1 -0
  34. package/dist/typeChecking-EAVNeFyB.js +75 -0
  35. package/dist/typeChecking-EAVNeFyB.js.map +1 -0
  36. package/dist/types.d.ts +9 -1
  37. package/dist/view-CY19Cf0X.js +932 -0
  38. package/dist/view-CY19Cf0X.js.map +1 -0
  39. package/docs/markup.md +16 -0
  40. package/notes/stores.md +26 -0
  41. package/package.json +14 -2
  42. package/vite.config.js +4 -5
  43. package/dist/core/dolla.d.ts +0 -128
  44. package/dist/core/signals-api.d.ts +0 -42
  45. package/dist/index.d.ts +0 -26
  46. package/dist/markup-QqAGIoYP.js +0 -1501
  47. package/dist/markup-QqAGIoYP.js.map +0 -1
  48. /package/dist/core/{signals-api.test.d.ts → signals.test.d.ts} +0 -0
@@ -0,0 +1,623 @@
1
+ import { c as T, t as N, i as B } from "./typeChecking-EAVNeFyB.js";
2
+ var v = /* @__PURE__ */ ((e) => (e[e.Computed = 1] = "Computed", e[e.Effect = 2] = "Effect", e[e.Tracking = 4] = "Tracking", e[e.Notified = 8] = "Notified", e[e.Recursed = 16] = "Recursed", e[e.Dirty = 32] = "Dirty", e[e.PendingComputed = 64] = "PendingComputed", e[e.PendingEffect = 128] = "PendingEffect", e[e.Propagated = 224] = "Propagated", e))(v || {});
3
+ function L({
4
+ updateComputed: e,
5
+ notifyEffect: t
6
+ }) {
7
+ let i, r;
8
+ return {
9
+ /**
10
+ * Links a given dependency and subscriber if they are not already linked.
11
+ *
12
+ * @param dep - The dependency to be linked.
13
+ * @param sub - The subscriber that depends on this dependency.
14
+ * @returns The newly created link object if the two are not already linked; otherwise `undefined`.
15
+ */
16
+ link(n, s) {
17
+ const f = s.depsTail;
18
+ if (f !== void 0 && f.dep === n)
19
+ return;
20
+ const c = f !== void 0 ? f.nextDep : s.deps;
21
+ if (c !== void 0 && c.dep === n) {
22
+ s.depsTail = c;
23
+ return;
24
+ }
25
+ const o = n.subsTail;
26
+ if (!(o !== void 0 && o.sub === s && E(o, s)))
27
+ return u(n, s, c, f);
28
+ },
29
+ /**
30
+ * Traverses and marks subscribers starting from the provided link.
31
+ *
32
+ * It sets flags (e.g., Dirty, PendingComputed, PendingEffect) on each subscriber
33
+ * to indicate which ones require re-computation or effect processing.
34
+ * This function should be called after a signal's value changes.
35
+ *
36
+ * @param link - The starting link from which propagation begins.
37
+ */
38
+ propagate(n) {
39
+ let s = 32, f = n, c = 0;
40
+ e: do {
41
+ const o = n.sub, l = o.flags;
42
+ if (!(l & 244) && (o.flags = l | s | 8, !0) || l & 16 && !(l & 4) && (o.flags = l & -17 | s | 8, !0) || !(l & 224) && E(n, o) && (o.flags = l | 16 | s | 8, o.subs !== void 0)) {
43
+ const g = o.subs;
44
+ if (g !== void 0) {
45
+ g.nextSub !== void 0 ? (g.prevSub = f, n = f = g, s = 64, ++c) : (n = g, s = l & 2 ? 128 : 64);
46
+ continue;
47
+ }
48
+ l & 2 && (r !== void 0 ? r.depsTail.nextDep = o.deps : i = o, r = o);
49
+ } else l & (4 | s) ? !(l & s) && l & 224 && E(n, o) && (o.flags = l | s) : (o.flags = l | s | 8, (l & 10) === 2 && (r !== void 0 ? r.depsTail.nextDep = o.deps : i = o, r = o));
50
+ if ((n = f.nextSub) !== void 0) {
51
+ f = n, s = c ? 64 : 32;
52
+ continue;
53
+ }
54
+ for (; c; ) {
55
+ --c;
56
+ const q = f.dep.subs;
57
+ if (f = q.prevSub, q.prevSub = void 0, (n = f.nextSub) !== void 0) {
58
+ f = n, s = c ? 64 : 32;
59
+ continue e;
60
+ }
61
+ }
62
+ break;
63
+ } while (!0);
64
+ },
65
+ /**
66
+ * Prepares the given subscriber to track new dependencies.
67
+ *
68
+ * It resets the subscriber's internal pointers (e.g., depsTail) and
69
+ * sets its flags to indicate it is now tracking dependency links.
70
+ *
71
+ * @param sub - The subscriber to start tracking.
72
+ */
73
+ startTracking(n) {
74
+ n.depsTail = void 0, n.flags = n.flags & -249 | 4;
75
+ },
76
+ /**
77
+ * Concludes tracking of dependencies for the specified subscriber.
78
+ *
79
+ * It clears or unlinks any tracked dependency information, then
80
+ * updates the subscriber's flags to indicate tracking is complete.
81
+ *
82
+ * @param sub - The subscriber whose tracking is ending.
83
+ */
84
+ endTracking(n) {
85
+ const s = n.depsTail;
86
+ if (s !== void 0) {
87
+ const f = s.nextDep;
88
+ f !== void 0 && (P(f), s.nextDep = void 0);
89
+ } else n.deps !== void 0 && (P(n.deps), n.deps = void 0);
90
+ n.flags &= -5;
91
+ },
92
+ /**
93
+ * Updates the dirty flag for the given subscriber based on its dependencies.
94
+ *
95
+ * If the subscriber has any pending computeds, this function sets the Dirty flag
96
+ * and returns `true`. Otherwise, it clears the PendingComputed flag and returns `false`.
97
+ *
98
+ * @param sub - The subscriber to update.
99
+ * @param flags - The current flag set for this subscriber.
100
+ * @returns `true` if the subscriber is marked as Dirty; otherwise `false`.
101
+ */
102
+ updateDirtyFlag(n, s) {
103
+ return a(n.deps) ? (n.flags = s | 32, !0) : (n.flags = s & -65, !1);
104
+ },
105
+ /**
106
+ * Updates the computed subscriber if necessary before its value is accessed.
107
+ *
108
+ * If the subscriber is marked Dirty or PendingComputed, this function runs
109
+ * the provided updateComputed logic and triggers a shallowPropagate for any
110
+ * downstream subscribers if an actual update occurs.
111
+ *
112
+ * @param computed - The computed subscriber to update.
113
+ * @param flags - The current flag set for this subscriber.
114
+ */
115
+ processComputedUpdate(n, s) {
116
+ if ((s & 32 || (a(n.deps) || (n.flags = s & -65, !1))) && e(n)) {
117
+ const f = n.subs;
118
+ f !== void 0 && p(f);
119
+ }
120
+ },
121
+ /**
122
+ * Ensures all pending internal effects for the given subscriber are processed.
123
+ *
124
+ * This should be called after an effect decides not to re-run itself but may still
125
+ * have dependencies flagged with PendingEffect. If the subscriber is flagged with
126
+ * PendingEffect, this function clears that flag and invokes `notifyEffect` on any
127
+ * related dependencies marked as Effect and Propagated, processing pending effects.
128
+ *
129
+ * @param sub - The subscriber which may have pending effects.
130
+ * @param flags - The current flags on the subscriber to check.
131
+ */
132
+ processPendingInnerEffects(n, s) {
133
+ if (s & 128) {
134
+ n.flags = s & -129;
135
+ let f = n.deps;
136
+ do {
137
+ const c = f.dep;
138
+ "flags" in c && c.flags & 2 && c.flags & 224 && t(c), f = f.nextDep;
139
+ } while (f !== void 0);
140
+ }
141
+ },
142
+ /**
143
+ * Processes queued effect notifications after a batch operation finishes.
144
+ *
145
+ * Iterates through all queued effects, calling notifyEffect on each.
146
+ * If an effect remains partially handled, its flags are updated, and future
147
+ * notifications may be triggered until fully handled.
148
+ */
149
+ processEffectNotifications() {
150
+ for (; i !== void 0; ) {
151
+ const n = i, s = n.depsTail, f = s.nextDep;
152
+ f !== void 0 ? (s.nextDep = void 0, i = f.sub) : (i = void 0, r = void 0), t(n) || (n.flags &= -9);
153
+ }
154
+ }
155
+ };
156
+ function u(n, s, f, c) {
157
+ const o = {
158
+ dep: n,
159
+ sub: s,
160
+ nextDep: f,
161
+ prevSub: void 0,
162
+ nextSub: void 0
163
+ };
164
+ if (c === void 0 ? s.deps = o : c.nextDep = o, n.subs === void 0)
165
+ n.subs = o;
166
+ else {
167
+ const l = n.subsTail;
168
+ o.prevSub = l, l.nextSub = o;
169
+ }
170
+ return s.depsTail = o, n.subsTail = o, o;
171
+ }
172
+ function a(n) {
173
+ let s = 0, f;
174
+ e: do {
175
+ f = !1;
176
+ const c = n.dep;
177
+ if ("flags" in c) {
178
+ const o = c.flags;
179
+ if ((o & 33) === 33) {
180
+ if (e(c)) {
181
+ const l = c.subs;
182
+ l.nextSub !== void 0 && p(l), f = !0;
183
+ }
184
+ } else if ((o & 65) === 65) {
185
+ const l = c.subs;
186
+ l.nextSub !== void 0 && (l.prevSub = n), n = c.deps, ++s;
187
+ continue;
188
+ }
189
+ }
190
+ if (!f && n.nextDep !== void 0) {
191
+ n = n.nextDep;
192
+ continue;
193
+ }
194
+ if (s) {
195
+ let o = n.sub;
196
+ do {
197
+ --s;
198
+ const l = o.subs;
199
+ if (f) {
200
+ if (e(o)) {
201
+ (n = l.prevSub) !== void 0 ? (l.prevSub = void 0, p(o.subs), o = n.sub) : o = l.sub;
202
+ continue;
203
+ }
204
+ } else
205
+ o.flags &= -65;
206
+ if ((n = l.prevSub) !== void 0) {
207
+ if (l.prevSub = void 0, n.nextDep !== void 0) {
208
+ n = n.nextDep;
209
+ continue e;
210
+ }
211
+ o = n.sub;
212
+ } else {
213
+ if ((n = l.nextDep) !== void 0)
214
+ continue e;
215
+ o = l.sub;
216
+ }
217
+ f = !1;
218
+ } while (s);
219
+ }
220
+ return f;
221
+ } while (!0);
222
+ }
223
+ function p(n) {
224
+ do {
225
+ const s = n.sub, f = s.flags;
226
+ (f & 96) === 64 && (s.flags = f | 32 | 8, (f & 10) === 2 && (r !== void 0 ? r.depsTail.nextDep = s.deps : i = s, r = s)), n = n.nextSub;
227
+ } while (n !== void 0);
228
+ }
229
+ function E(n, s) {
230
+ const f = s.depsTail;
231
+ if (f !== void 0) {
232
+ let c = s.deps;
233
+ do {
234
+ if (c === n)
235
+ return !0;
236
+ if (c === f)
237
+ break;
238
+ c = c.nextDep;
239
+ } while (c !== void 0);
240
+ }
241
+ return !1;
242
+ }
243
+ function P(n) {
244
+ do {
245
+ const s = n.dep, f = n.nextDep, c = n.nextSub, o = n.prevSub;
246
+ if (c !== void 0 ? c.prevSub = o : s.subsTail = o, o !== void 0 ? o.nextSub = c : s.subs = c, s.subs === void 0 && "deps" in s) {
247
+ const l = s.flags;
248
+ l & 32 || (s.flags = l | 32);
249
+ const g = s.deps;
250
+ if (g !== void 0) {
251
+ n = g, s.depsTail.nextDep = f, s.deps = void 0, s.depsTail = void 0;
252
+ continue;
253
+ }
254
+ }
255
+ n = f;
256
+ } while (n !== void 0);
257
+ }
258
+ }
259
+ var {
260
+ link: ce,
261
+ propagate: le,
262
+ updateDirtyFlag: X,
263
+ startTracking: _,
264
+ endTracking: A,
265
+ processEffectNotifications: ae,
266
+ processComputedUpdate: de,
267
+ processPendingInnerEffects: I
268
+ } = L({
269
+ updateComputed(e) {
270
+ _(e);
271
+ try {
272
+ const t = e.currentValue, i = e.getter(t);
273
+ return t !== i ? (e.currentValue = i, !0) : !1;
274
+ } finally {
275
+ A(e);
276
+ }
277
+ },
278
+ notifyEffect(e) {
279
+ return "isScope" in e ? K(e) : J(e);
280
+ }
281
+ });
282
+ function H(e) {
283
+ _(e);
284
+ try {
285
+ e.fn();
286
+ } finally {
287
+ A(e);
288
+ }
289
+ }
290
+ function J(e) {
291
+ const t = e.flags;
292
+ return t & 32 || t & 64 && X(e, t) ? H(e) : I(e, e.flags), !0;
293
+ }
294
+ function K(e) {
295
+ return e.flags & 128 ? (I(e, e.flags), !0) : !1;
296
+ }
297
+ const {
298
+ link: O,
299
+ propagate: Q,
300
+ updateDirtyFlag: Y,
301
+ startTracking: b,
302
+ endTracking: C,
303
+ processEffectNotifications: Z,
304
+ processComputedUpdate: F,
305
+ processPendingInnerEffects: ee
306
+ } = L({
307
+ updateComputed(e) {
308
+ const t = d;
309
+ d = e, b(e);
310
+ try {
311
+ const i = e.current, r = e.getter(i);
312
+ return e.equals(i, r) ? !1 : (e.current = r, !0);
313
+ } finally {
314
+ d = t, C(e);
315
+ }
316
+ },
317
+ notifyEffect(e) {
318
+ const t = e.flags;
319
+ return t & v.Dirty || t & v.PendingComputed && Y(e, t) ? V(e) : ee(e, e.flags), !0;
320
+ }
321
+ });
322
+ let d;
323
+ const h = [];
324
+ let S = !1;
325
+ function te() {
326
+ S || (S = !0, queueMicrotask(() => {
327
+ S = !1;
328
+ for (let e = 0; e < h.length; e++) {
329
+ const t = h[e], i = d;
330
+ d = t, b(t);
331
+ try {
332
+ t.cleanup && (z(), t.cleanup(), R()), t.cleanup = t.fn() ?? void 0;
333
+ } finally {
334
+ d = i, C(t);
335
+ }
336
+ }
337
+ h.length = 0;
338
+ }));
339
+ }
340
+ function V(e) {
341
+ h.push(e), te();
342
+ }
343
+ function ne() {
344
+ b(this), C(this), queueMicrotask(() => {
345
+ h.splice(h.indexOf(this), 1), this.cleanup && this.cleanup();
346
+ });
347
+ }
348
+ const k = [];
349
+ function z() {
350
+ k.push(d), d = void 0;
351
+ }
352
+ function R() {
353
+ d = k.pop();
354
+ }
355
+ const j = Symbol("SIGNAL"), U = Symbol("SOURCE");
356
+ function pe(e) {
357
+ let t;
358
+ return z(), t = D(e), R(), t;
359
+ }
360
+ function D(e) {
361
+ return T(e) ? e() : e;
362
+ }
363
+ function ge(e) {
364
+ const t = {
365
+ fn: e,
366
+ subs: void 0,
367
+ subsTail: void 0,
368
+ deps: void 0,
369
+ depsTail: void 0,
370
+ flags: v.Effect
371
+ };
372
+ return d !== void 0 && O(t, d), V(t), ne.bind(t);
373
+ }
374
+ function ve(e, t) {
375
+ return T(e) ? re(e, t) : $(e === void 0 ? void 0 : e, t);
376
+ }
377
+ function $(e, t) {
378
+ const i = {
379
+ current: e,
380
+ subs: void 0,
381
+ subsTail: void 0
382
+ }, r = (t == null ? void 0 : t.equals) ?? Object.is, u = function() {
383
+ if (arguments.length > 0) {
384
+ let a = arguments[0];
385
+ if (typeof a == "function" && (a = a(i.current)), !r(i.current, a)) {
386
+ i.current = a;
387
+ const p = i.subs;
388
+ p !== void 0 && (Q(p), Z());
389
+ }
390
+ } else
391
+ return d !== void 0 && O(i, d), i.current;
392
+ };
393
+ return u._type = U, u;
394
+ }
395
+ function re(e, t) {
396
+ if (T(e) && e._type === j)
397
+ return e._type === U ? () => e() : e;
398
+ const i = {
399
+ current: void 0,
400
+ equals: (t == null ? void 0 : t.equals) ?? Object.is,
401
+ subs: void 0,
402
+ subsTail: void 0,
403
+ deps: void 0,
404
+ depsTail: void 0,
405
+ flags: v.Computed | v.Dirty,
406
+ getter: (u) => {
407
+ const a = e(u);
408
+ return D(a);
409
+ }
410
+ }, r = function() {
411
+ if (arguments.length > 0)
412
+ throw new Error("Signals cannot be set as their values are derived from the sources they depend on.");
413
+ d !== void 0 && O(i, d);
414
+ const u = i.flags;
415
+ return u & (v.Dirty | v.PendingComputed) && F(i, u), i.current;
416
+ };
417
+ return r._type = j, r;
418
+ }
419
+ const se = () => {
420
+ };
421
+ let w = 1;
422
+ function he() {
423
+ return w = w % Number.MAX_SAFE_INTEGER + 1, w.toString(36) + Date.now().toString(36);
424
+ }
425
+ function ye(e, t) {
426
+ return Object.is(e, t);
427
+ }
428
+ function xe(e, t) {
429
+ if (Object.is(e, t)) return !0;
430
+ const i = N(e);
431
+ if (i !== N(t))
432
+ return !1;
433
+ switch (i) {
434
+ case "object":
435
+ let r = 0;
436
+ for (const u in e) {
437
+ if (e[u] !== t[u]) return !1;
438
+ r++;
439
+ }
440
+ return Object.keys(t).length === r;
441
+ case "array":
442
+ if (e.length !== t.length) return !1;
443
+ for (let u = 0; u < e.length; u++)
444
+ if (e[u] !== t[u]) return !1;
445
+ return !0;
446
+ case "map":
447
+ if (e.size !== t.size) return !1;
448
+ for (const u of e.keys())
449
+ if (e[u] !== t[u]) return !1;
450
+ return !0;
451
+ case "set":
452
+ if (T(e.symmetricDifference))
453
+ return e.symmetricDifference(t).size === 0;
454
+ for (const u of e.keys())
455
+ if (e[u] !== t.get(u)) return !1;
456
+ return !0;
457
+ }
458
+ return !1;
459
+ }
460
+ function m(e, t) {
461
+ if (e === t) return !0;
462
+ if (e && t && typeof e == "object" && typeof t == "object") {
463
+ if (e.constructor !== t.constructor) return !1;
464
+ var i, r, u;
465
+ if (Array.isArray(e)) {
466
+ if (i = e.length, i != t.length) return !1;
467
+ for (r = i; r-- !== 0; ) if (!m(e[r], t[r])) return !1;
468
+ return !0;
469
+ }
470
+ if (e instanceof Map && t instanceof Map) {
471
+ if (e.size !== t.size) return !1;
472
+ for (r of e.entries()) if (!t.has(r[0])) return !1;
473
+ for (r of e.entries()) if (!m(r[1], t.get(r[0]))) return !1;
474
+ return !0;
475
+ }
476
+ if (e instanceof Set && t instanceof Set) {
477
+ if (e.size !== t.size) return !1;
478
+ for (r of e.entries()) if (!t.has(r[0])) return !1;
479
+ return !0;
480
+ }
481
+ if (ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
482
+ if (i = e.length, i != t.length) return !1;
483
+ for (r = i; r-- !== 0; ) if (e[r] !== t[r]) return !1;
484
+ return !0;
485
+ }
486
+ if (e.constructor === RegExp) return e.source === t.source && e.flags === t.flags;
487
+ if (e.valueOf !== Object.prototype.valueOf) return e.valueOf() === t.valueOf();
488
+ if (e.toString !== Object.prototype.toString) return e.toString() === t.toString();
489
+ if (u = Object.keys(e), i = u.length, i !== Object.keys(t).length) return !1;
490
+ for (r = i; r-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(t, u[r])) return !1;
491
+ for (r = i; r-- !== 0; ) {
492
+ var a = u[r];
493
+ if (!m(e[a], t[a])) return !1;
494
+ }
495
+ return !0;
496
+ }
497
+ return e !== e && t !== t;
498
+ }
499
+ function De(e, t) {
500
+ const i = {};
501
+ for (const r in t)
502
+ e.includes(r) || (i[r] = t[r]);
503
+ return i;
504
+ }
505
+ function ie(e) {
506
+ let t = 0;
507
+ for (let i = 0; i < e.length; i++)
508
+ t = (t + e.charCodeAt(i) * 10) % 360;
509
+ return `oklch(0.68 0.15 ${t}deg)`;
510
+ }
511
+ function M(e) {
512
+ if (e instanceof RegExp)
513
+ return (r) => e.test(r);
514
+ const t = {
515
+ positive: [],
516
+ negative: []
517
+ }, i = e.split(",").map((r) => r.trim()).filter((r) => r !== "");
518
+ for (let r of i) {
519
+ let u = "positive";
520
+ r.startsWith("-") && (u = "negative", r = r.slice(1)), r === "*" ? t[u].push(function() {
521
+ return !0;
522
+ }) : r.endsWith("*") ? t[u].push(function(a) {
523
+ return a.startsWith(r.slice(0, r.length - 1));
524
+ }) : t[u].push(function(a) {
525
+ return a === r;
526
+ });
527
+ }
528
+ return function(r) {
529
+ const { positive: u, negative: a } = t;
530
+ return !(a.some((p) => p(r)) || u.length > 0 && !u.some((p) => p(r)));
531
+ };
532
+ }
533
+ let G = "production";
534
+ function fe() {
535
+ return G;
536
+ }
537
+ function Te(e) {
538
+ G = e;
539
+ }
540
+ let y = {
541
+ info: "development",
542
+ log: "development",
543
+ warn: "development",
544
+ error: !0
545
+ }, W = M("*,-Dolla.*"), x = [];
546
+ function Ee(e) {
547
+ return x.push(e), function() {
548
+ x.splice(x.indexOf(e), 1);
549
+ };
550
+ }
551
+ function Se(e, t) {
552
+ const i = (t == null ? void 0 : t.console) ?? oe(), r = (u) => {
553
+ if (y[u] === !1 || B(y[u]) && y[u] !== fe() || !W(D(e)))
554
+ return se;
555
+ {
556
+ let a = `%c${e}`;
557
+ return t != null && t.uid ? a += ` %c[uid: %c${t.uid}%c]` : a += "%c%c%c", i[u].bind(
558
+ i,
559
+ a,
560
+ `color:${ie(a)};font-weight:bold`,
561
+ "color:#777",
562
+ "color:#aaa",
563
+ "color:#777"
564
+ );
565
+ }
566
+ };
567
+ return {
568
+ get info() {
569
+ return r("info");
570
+ },
571
+ get log() {
572
+ return r("log");
573
+ },
574
+ get warn() {
575
+ return r("warn");
576
+ },
577
+ get error() {
578
+ return r("error");
579
+ },
580
+ crash(u) {
581
+ const a = {
582
+ error: u,
583
+ loggerName: D(e),
584
+ uid: t == null ? void 0 : t.uid
585
+ };
586
+ for (const p of x)
587
+ p(a);
588
+ }
589
+ };
590
+ }
591
+ function we(e) {
592
+ W = M(e);
593
+ }
594
+ function me(e) {
595
+ for (const t in e) {
596
+ const i = e[t];
597
+ i && (y[t] = i);
598
+ }
599
+ }
600
+ function oe() {
601
+ if (typeof window < "u" && window.console)
602
+ return window.console;
603
+ if (typeof global < "u" && global.console)
604
+ return global.console;
605
+ }
606
+ export {
607
+ ve as $,
608
+ ye as a,
609
+ fe as b,
610
+ Te as c,
611
+ m as d,
612
+ ge as e,
613
+ Se as f,
614
+ D as g,
615
+ we as h,
616
+ me as i,
617
+ De as j,
618
+ he as k,
619
+ Ee as o,
620
+ pe as p,
621
+ xe as s
622
+ };
623
+ //# sourceMappingURL=logger-CSRDjb4e.js.map