silentium 0.0.6 → 0.0.8

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/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.0.8](https://github.com/silentium-lab/silentium/compare/v0.0.7...v0.0.8) (2025-04-18)
6
+
7
+
8
+ ### Features
9
+
10
+ * **8-issue:** source can be any value except null and undefined ([cdb3112](https://github.com/silentium-lab/silentium/commit/cdb3112ecc1b3fe21bb2f4c6ae1a59bb43bdddb2))
11
+
12
+ ### [0.0.7](https://github.com/silentium-lab/silentium/compare/v0.0.6...v0.0.7) (2025-04-15)
13
+
14
+
15
+ ### Features
16
+
17
+ * **6-issue:** sourceSync class with documentation ([7def931](https://github.com/silentium-lab/silentium/commit/7def931cc0930c07953c3ff2ffe5473ea2eb86e6))
18
+
5
19
  ### [0.0.6](https://github.com/silentium-lab/silentium/compare/v0.0.5...v0.0.6) (2025-04-13)
6
20
 
7
21
 
@@ -62,9 +62,9 @@ class GuestCast {
62
62
  }
63
63
  }
64
64
 
65
- var __defProp$9 = Object.defineProperty;
66
- var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
67
- var __publicField$9 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
65
+ var __defProp$a = Object.defineProperty;
66
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
67
+ var __publicField$a = (obj, key, value) => __defNormalProp$a(obj, typeof key !== "symbol" ? key + "" : key, value);
68
68
  const poolSets = /* @__PURE__ */ new Map();
69
69
  const patronPools = (patron) => {
70
70
  const pools = [];
@@ -98,8 +98,8 @@ const isPatronInPools = (patron) => {
98
98
  class PatronPool {
99
99
  constructor(initiator) {
100
100
  this.initiator = initiator;
101
- __publicField$9(this, "patrons");
102
- __publicField$9(this, "give");
101
+ __publicField$a(this, "patrons");
102
+ __publicField$a(this, "give");
103
103
  this.patrons = /* @__PURE__ */ new Set();
104
104
  poolSets.set(this, this.patrons);
105
105
  const doReceive = (value) => {
@@ -148,13 +148,13 @@ class PatronPool {
148
148
  }
149
149
  }
150
150
 
151
- var __defProp$8 = Object.defineProperty;
152
- var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
153
- var __publicField$8 = (obj, key, value) => __defNormalProp$8(obj, typeof key !== "symbol" ? key + "" : key, value);
151
+ var __defProp$9 = Object.defineProperty;
152
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
153
+ var __publicField$9 = (obj, key, value) => __defNormalProp$9(obj, typeof key !== "symbol" ? key + "" : key, value);
154
154
  class GuestPool {
155
155
  constructor(initiator) {
156
- __publicField$8(this, "guests", /* @__PURE__ */ new Set());
157
- __publicField$8(this, "patronPool");
156
+ __publicField$9(this, "guests", /* @__PURE__ */ new Set());
157
+ __publicField$9(this, "patronPool");
158
158
  this.patronPool = new PatronPool(initiator);
159
159
  }
160
160
  give(value) {
@@ -264,12 +264,12 @@ class GuestApplied {
264
264
  }
265
265
  }
266
266
 
267
- var __defProp$7 = Object.defineProperty;
268
- var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
269
- var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, key + "" , value);
267
+ var __defProp$8 = Object.defineProperty;
268
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
269
+ var __publicField$8 = (obj, key, value) => __defNormalProp$8(obj, key + "" , value);
270
270
  class GuestExecutorApplied {
271
271
  constructor(baseGuest, applier) {
272
- __publicField$7(this, "give");
272
+ __publicField$8(this, "give");
273
273
  this.give = applier((v) => give(v, baseGuest));
274
274
  }
275
275
  }
@@ -295,13 +295,13 @@ class Patron {
295
295
  }
296
296
  const isPatron = (guest) => typeof guest === "object" && guest !== null && guest?.introduction?.() === "patron";
297
297
 
298
- var __defProp$6 = Object.defineProperty;
299
- var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
300
- var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, key + "" , value);
298
+ var __defProp$7 = Object.defineProperty;
299
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
300
+ var __publicField$7 = (obj, key, value) => __defNormalProp$7(obj, key + "" , value);
301
301
  class PatronOnce {
302
302
  constructor(baseGuest) {
303
303
  this.baseGuest = baseGuest;
304
- __publicField$6(this, "received", false);
304
+ __publicField$7(this, "received", false);
305
305
  if (baseGuest === void 0) {
306
306
  throw new Error("PatronOnce didnt receive baseGuest argument");
307
307
  }
@@ -325,12 +325,12 @@ class PatronOnce {
325
325
  }
326
326
  }
327
327
 
328
- var __defProp$5 = Object.defineProperty;
329
- var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
330
- var __publicField$5 = (obj, key, value) => __defNormalProp$5(obj, key + "" , value);
328
+ var __defProp$6 = Object.defineProperty;
329
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
330
+ var __publicField$6 = (obj, key, value) => __defNormalProp$6(obj, key + "" , value);
331
331
  class PatronApplied {
332
332
  constructor(baseGuest, applier) {
333
- __publicField$5(this, "guestApplied");
333
+ __publicField$6(this, "guestApplied");
334
334
  this.guestApplied = new GuestApplied(baseGuest, applier);
335
335
  }
336
336
  give(value) {
@@ -342,12 +342,12 @@ class PatronApplied {
342
342
  }
343
343
  }
344
344
 
345
- var __defProp$4 = Object.defineProperty;
346
- var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
347
- var __publicField$4 = (obj, key, value) => __defNormalProp$4(obj, key + "" , value);
345
+ var __defProp$5 = Object.defineProperty;
346
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
347
+ var __publicField$5 = (obj, key, value) => __defNormalProp$5(obj, key + "" , value);
348
348
  class PatronExecutorApplied {
349
349
  constructor(baseGuest, applier) {
350
- __publicField$4(this, "guestApplied");
350
+ __publicField$5(this, "guestApplied");
351
351
  this.guestApplied = new GuestExecutorApplied(baseGuest, applier);
352
352
  }
353
353
  give(value) {
@@ -359,15 +359,15 @@ class PatronExecutorApplied {
359
359
  }
360
360
  }
361
361
 
362
- var __defProp$3 = Object.defineProperty;
363
- var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
364
- var __publicField$3 = (obj, key, value) => __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
362
+ var __defProp$4 = Object.defineProperty;
363
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
364
+ var __publicField$4 = (obj, key, value) => __defNormalProp$4(obj, typeof key !== "symbol" ? key + "" : key, value);
365
365
  class SourceWithPool {
366
366
  constructor(sourceDocument) {
367
367
  this.sourceDocument = sourceDocument;
368
- __publicField$3(this, "thePool", new PatronPool(this));
369
- __publicField$3(this, "theEmptyPool", new PatronPool(this));
370
- __publicField$3(this, "isEmpty");
368
+ __publicField$4(this, "thePool", new PatronPool(this));
369
+ __publicField$4(this, "theEmptyPool", new PatronPool(this));
370
+ __publicField$4(this, "isEmpty");
371
371
  this.isEmpty = sourceDocument === void 0;
372
372
  }
373
373
  pool() {
@@ -399,15 +399,15 @@ class SourceWithPool {
399
399
  }
400
400
  }
401
401
 
402
- var __defProp$2 = Object.defineProperty;
403
- var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
404
- var __publicField$2 = (obj, key, value) => __defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
402
+ var __defProp$3 = Object.defineProperty;
403
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
404
+ var __publicField$3 = (obj, key, value) => __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
405
405
  class SourceAll {
406
406
  constructor(initialKnownKeys = []) {
407
- __publicField$2(this, "theAll");
408
- __publicField$2(this, "keysKnown");
409
- __publicField$2(this, "keysFilled", /* @__PURE__ */ new Set());
410
- __publicField$2(this, "filledAllPool", new GuestPool(this));
407
+ __publicField$3(this, "theAll");
408
+ __publicField$3(this, "keysKnown");
409
+ __publicField$3(this, "keysFilled", /* @__PURE__ */ new Set());
410
+ __publicField$3(this, "filledAllPool", new GuestPool(this));
411
411
  this.theAll = new SourceWithPool({});
412
412
  this.keysKnown = new Set(initialKnownKeys);
413
413
  }
@@ -465,16 +465,18 @@ class SourceAll {
465
465
  }
466
466
 
467
467
  function value(source, guest) {
468
- if (source === void 0) {
468
+ if (source === void 0 || source === null) {
469
469
  throw new Error("value didnt receive source argument");
470
470
  }
471
- if (guest === void 0) {
471
+ if (guest === void 0 || source === null) {
472
472
  throw new Error("value didnt receive guest argument");
473
473
  }
474
474
  if (typeof source === "function") {
475
475
  return source(guest);
476
- } else {
476
+ } else if (typeof source === "object" && "value" in source && typeof source.value === "function") {
477
477
  return source.value(guest);
478
+ } else {
479
+ return new Source((g) => give(source, g)).value(guest);
478
480
  }
479
481
  }
480
482
  function isSource(mbSource) {
@@ -647,24 +649,24 @@ class SourceApplied {
647
649
  }
648
650
  }
649
651
 
650
- var __defProp$1 = Object.defineProperty;
651
- var __defNormalProp$1 = (obj, key, value2) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value: value2 }) : obj[key] = value2;
652
- var __publicField$1 = (obj, key, value2) => __defNormalProp$1(obj, key + "" , value2);
652
+ var __defProp$2 = Object.defineProperty;
653
+ var __defNormalProp$2 = (obj, key, value2) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value: value2 }) : obj[key] = value2;
654
+ var __publicField$2 = (obj, key, value2) => __defNormalProp$2(obj, key + "" , value2);
653
655
  class SourceExecutorApplied {
654
656
  constructor(source, applier) {
655
- __publicField$1(this, "value");
657
+ __publicField$2(this, "value");
656
658
  this.value = applier((g) => {
657
659
  value(source, g);
658
660
  });
659
661
  }
660
662
  }
661
663
 
662
- var __defProp = Object.defineProperty;
663
- var __defNormalProp = (obj, key, value2) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value2 }) : obj[key] = value2;
664
- var __publicField = (obj, key, value2) => __defNormalProp(obj, key + "" , value2);
664
+ var __defProp$1 = Object.defineProperty;
665
+ var __defNormalProp$1 = (obj, key, value2) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value: value2 }) : obj[key] = value2;
666
+ var __publicField$1 = (obj, key, value2) => __defNormalProp$1(obj, key + "" , value2);
665
667
  class SourceOnce {
666
668
  constructor(initialValue) {
667
- __publicField(this, "source");
669
+ __publicField$1(this, "source");
668
670
  this.source = new SourceWithPool(initialValue);
669
671
  }
670
672
  value(guest) {
@@ -682,6 +684,28 @@ class SourceOnce {
682
684
  }
683
685
  }
684
686
 
687
+ var __defProp = Object.defineProperty;
688
+ var __defNormalProp = (obj, key, value2) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value2 }) : obj[key] = value2;
689
+ var __publicField = (obj, key, value2) => __defNormalProp(obj, key + "" , value2);
690
+ class SourceSync {
691
+ constructor(baseSource) {
692
+ this.baseSource = baseSource;
693
+ __publicField(this, "syncGuest", new GuestSync());
694
+ value(baseSource, new Patron(this.syncGuest));
695
+ }
696
+ value(guest) {
697
+ value(this.baseSource, guest);
698
+ return this;
699
+ }
700
+ syncValue() {
701
+ try {
702
+ return this.syncGuest.value();
703
+ } catch {
704
+ throw new Error("No value in SourceSync");
705
+ }
706
+ }
707
+ }
708
+
685
709
  class PrivateClass {
686
710
  constructor(constructorFn, modules = {}) {
687
711
  this.constructorFn = constructorFn;
@@ -734,6 +758,7 @@ exports.SourceMap = SourceMap;
734
758
  exports.SourceOnce = SourceOnce;
735
759
  exports.SourceRace = SourceRace;
736
760
  exports.SourceSequence = SourceSequence;
761
+ exports.SourceSync = SourceSync;
737
762
  exports.SourceWithPool = SourceWithPool;
738
763
  exports.give = give;
739
764
  exports.isGuest = isGuest;
@@ -1 +1 @@
1
- {"version":3,"file":"silentium.cjs","sources":["../src/Guest/Guest.ts","../src/Guest/GuestCast.ts","../src/Patron/PatronPool.ts","../src/Guest/GuestPool.ts","../src/Guest/GuestSync.ts","../src/Guest/GuestObject.ts","../src/Guest/GuestDisposable.ts","../src/Guest/GuestApplied.ts","../src/Guest/GuestExecutorApplied.ts","../src/Patron/Patron.ts","../src/Patron/PatronOnce.ts","../src/Patron/PatronApplied.ts","../src/Patron/PatronExecutorApplied.ts","../src/Source/SourceWithPool.ts","../src/Source/SourceAll.ts","../src/Source/Source.ts","../src/Source/SourceSequence.ts","../src/Source/SourceMap.ts","../src/Source/SourceRace.ts","../src/Source/SourceDynamic.ts","../src/Source/SourceApplied.ts","../src/Source/SourceExecutorApplied.ts","../src/Source/SourceOnce.ts","../src/Private/PrivateClass.ts","../src/Private/Private.ts"],"sourcesContent":["type GuestIntroduction = \"guest\" | \"patron\";\n\nexport type GuestExecutorType<T = any, This = void> = (value: T) => This;\n\nexport interface GuestObjectType<T = any> {\n give(value: T): this;\n introduction?(): GuestIntroduction;\n}\n\nexport type GuestType<T = any> = GuestExecutorType<T> | GuestObjectType<T>;\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/utils/give\n */\nexport function give<T>(data: T, guest: GuestType<T>) {\n if (data === undefined) {\n throw new Error(\"give didnt receive data argument\");\n }\n if (guest === undefined) {\n throw new Error(\"give didnt receive guest argument\");\n }\n if (typeof guest === \"function\") {\n guest(data);\n } else {\n guest.give(data);\n }\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/utils/is-guest\n */\nexport function isGuest(mbGuest: any): mbGuest is GuestType {\n if (mbGuest === undefined) {\n throw new Error(\"isGuest didnt receive mbGuest argument\");\n }\n return typeof mbGuest === \"function\" || typeof mbGuest?.give === \"function\";\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest\n */\nexport class Guest<T> implements GuestObjectType<T> {\n public constructor(private receiver: GuestExecutorType<T>) {\n if (!receiver) {\n throw new Error(\"reseiver function was not passed to Guest constructor\");\n }\n }\n\n public give(value: T) {\n this.receiver(value);\n return this;\n }\n}\n","import { give, GuestType } from \"./Guest\";\nimport { GuestDisposableType, MaybeDisposableType } from \"./GuestDisposable\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest/guest-cast\n */\nexport class GuestCast<T> implements GuestDisposableType<T> {\n public constructor(\n private sourceGuest: GuestType<any>,\n private targetGuest: GuestType<T>,\n ) {\n if (sourceGuest === undefined) {\n throw new Error(\"GuestCast didnt receive sourceGuest argument\");\n }\n if (targetGuest === undefined) {\n throw new Error(\"GuestCast didnt receive targetGuest argument\");\n }\n }\n\n public introduction() {\n if (typeof this.sourceGuest === \"function\") {\n return \"guest\";\n }\n if (!this.sourceGuest.introduction) {\n return \"guest\";\n }\n return this.sourceGuest.introduction();\n }\n\n public give(value: T): this {\n give(value, this.targetGuest);\n return this;\n }\n\n public disposed(value: T | null): boolean {\n const maybeDisposable = this.sourceGuest as MaybeDisposableType;\n return maybeDisposable.disposed ? maybeDisposable.disposed(value) : false;\n }\n}\n","import { give, GuestObjectType, GuestType } from \"../Guest/Guest\";\nimport { GuestDisposableType } from \"../Guest/GuestDisposable\";\n\nconst poolSets = new Map<PoolType, Set<GuestObjectType>>();\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/utils/patron-pools\n */\nexport const patronPools = (patron: GuestObjectType) => {\n const pools: PoolType[] = [];\n poolSets.forEach((pool, poolInstance) => {\n if (pool.has(patron)) {\n pools.push(poolInstance);\n }\n });\n return pools;\n};\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/utils/remove-patron-from-pools\n */\nexport const removePatronFromPools = (patron: GuestObjectType) => {\n if (patron === undefined) {\n throw new Error(\"removePatronFromPools didnt receive patron argument\");\n }\n poolSets.forEach((pool) => {\n pool.delete(patron);\n });\n};\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/utils/is-patron-in-pools\n */\nexport const isPatronInPools = (patron: GuestObjectType) => {\n if (patron === undefined) {\n throw new Error(\"isPatronInPools didnt receive patron argument\");\n }\n let inPool = false;\n poolSets.forEach((pool) => {\n if (!inPool) {\n inPool = pool.has(patron);\n }\n });\n return inPool;\n};\n\nexport interface PoolType<T = any> extends GuestObjectType<T> {\n add(guest: GuestObjectType<T>): this;\n distribute(receiving: T, possiblePatron: GuestObjectType<T>): this;\n remove(patron: GuestObjectType<T>): this;\n size(): number;\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/patron/patron-pool\n */\nexport class PatronPool<T> implements PoolType<T> {\n private patrons: Set<GuestObjectType<T>>;\n\n public give: (value: T) => this;\n\n public constructor(private initiator: unknown) {\n this.patrons = new Set<GuestObjectType<T>>();\n poolSets.set(this, this.patrons);\n const doReceive = (value: T) => {\n this.patrons.forEach((target) => {\n this.sendValueToGuest(value, target);\n });\n };\n this.give = (value: T) => {\n doReceive(value);\n return this;\n };\n }\n\n public size(): number {\n return this.patrons.size;\n }\n\n public add(shouldBePatron: GuestType<T>) {\n if (!shouldBePatron) {\n throw new Error(\"PatronPool add method received nothing!\");\n }\n if (\n typeof shouldBePatron !== \"function\" &&\n shouldBePatron.introduction &&\n shouldBePatron.introduction() === \"patron\"\n ) {\n this.patrons.add(shouldBePatron);\n }\n return this;\n }\n\n public remove(patron: GuestObjectType<T>) {\n this.patrons.delete(patron);\n return this;\n }\n\n public distribute(receiving: T, possiblePatron: GuestType<T>): this {\n this.add(possiblePatron);\n this.sendValueToGuest(receiving, possiblePatron);\n return this;\n }\n\n private sendValueToGuest(value: T, guest: GuestType<T>) {\n const isDisposed = this.guestDisposed(value, guest);\n\n if (!isDisposed) {\n give(value, guest);\n }\n }\n\n private guestDisposed(value: T, guest: GuestType<T>) {\n if ((guest as GuestDisposableType).disposed?.(value)) {\n this.remove(guest as GuestObjectType);\n return true;\n }\n\n return false;\n }\n}\n","import { PatronPool, PoolType } from \"../Patron/PatronPool\";\nimport { give, GuestObjectType, GuestType } from \"./Guest\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest/guest-pool\n */\nexport class GuestPool<T> implements GuestObjectType<T>, PoolType<T> {\n private guests = new Set<GuestType<T>>();\n\n private patronPool: PatronPool<T>;\n\n public constructor(initiator: unknown) {\n this.patronPool = new PatronPool(initiator);\n }\n\n public give(value: T): this {\n this.deliverToGuests(value);\n this.patronPool.give(value);\n return this;\n }\n\n public add(guest: GuestType<T>): this {\n if (\n typeof guest === \"function\" ||\n !guest.introduction ||\n guest.introduction() === \"guest\"\n ) {\n this.guests.add(guest);\n }\n this.patronPool.add(guest);\n return this;\n }\n\n public remove(patron: GuestObjectType<T>): this {\n this.guests.delete(patron);\n this.patronPool.remove(patron);\n return this;\n }\n\n public distribute(receiving: T, possiblePatron: GuestObjectType<T>): this {\n this.add(possiblePatron);\n this.give(receiving);\n return this;\n }\n\n public size() {\n return this.patronPool.size() + this.guests.size;\n }\n\n private deliverToGuests(value: T) {\n this.guests.forEach((target) => {\n give(value, target);\n });\n this.guests.clear();\n }\n}\n","import { GuestObjectType } from \"./Guest\";\n\nexport interface GuestValueType<T = any> extends GuestObjectType<T> {\n value(): T;\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest/guest-sync\n */\nexport class GuestSync<T> implements GuestValueType<T> {\n public constructor(private theValue?: T) {}\n\n public give(value: T): this {\n this.theValue = value;\n return this;\n }\n\n public value() {\n if (this.theValue === undefined) {\n throw new Error(\"no value in GuestSync!\");\n }\n return this.theValue;\n }\n}\n","import { Guest, GuestType } from \"./Guest\";\nimport { GuestDisposableType, MaybeDisposableType } from \"./GuestDisposable\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest/guest-object\n */\nexport class GuestObject<T> implements GuestDisposableType<T> {\n public constructor(private baseGuest: GuestType<T>) {\n if (baseGuest === undefined) {\n throw new Error(\"GuestObject didnt receive baseGuest argument\");\n }\n }\n\n public give(value: T): this {\n let guest = this.baseGuest;\n if (typeof guest === \"function\") {\n guest = new Guest(guest);\n }\n guest.give(value);\n return this;\n }\n\n public introduction() {\n if (typeof this.baseGuest === \"function\" || !this.baseGuest.introduction) {\n return \"guest\";\n }\n return this.baseGuest.introduction();\n }\n\n public disposed(value: T | null): boolean {\n const maybeDisposable = this.baseGuest as MaybeDisposableType;\n return maybeDisposable.disposed ? maybeDisposable.disposed(value) : false;\n }\n}\n","import { give, GuestObjectType, GuestType } from \"./Guest\";\n\nexport interface GuestDisposableType<T = any> extends GuestObjectType<T> {\n disposed(value: T | null): boolean;\n}\n\nexport type MaybeDisposableType<T = any> = Partial<GuestDisposableType<T>>;\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest/guest-disposable\n */\nexport class GuestDisposable<T> implements GuestDisposableType<T> {\n public constructor(\n private guest: GuestType,\n private disposeCheck: (value: T | null) => boolean,\n ) {\n if (guest === undefined) {\n throw new Error(\"GuestDisposable didnt receive guest argument\");\n }\n if (disposeCheck === undefined) {\n throw new Error(\"GuestDisposable didnt receive disposeCheck argument\");\n }\n }\n\n public disposed(value: T | null): boolean {\n return this.disposeCheck(value);\n }\n\n public give(value: T): this {\n give(value, this.guest);\n return this;\n }\n}\n","import { give, GuestObjectType, GuestType } from \"../Guest/Guest\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest/guest-applied\n */\nexport class GuestApplied<T, R> implements GuestObjectType<T> {\n public constructor(\n private baseGuest: GuestType<R>,\n private applier: (value: T) => R,\n ) {}\n\n public give(value: T): this {\n give(this.applier(value), this.baseGuest);\n return this;\n }\n}\n","import {\n give,\n GuestExecutorType,\n GuestObjectType,\n GuestType,\n} from \"../Guest/Guest\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest/guest-executor-applied\n */\nexport class GuestExecutorApplied<T> implements GuestObjectType<T> {\n public give: GuestExecutorType<T, this>;\n\n public constructor(\n baseGuest: GuestType<T>,\n applier: (executor: GuestExecutorType) => GuestExecutorType,\n ) {\n this.give = applier((v) => give(v, baseGuest)) as GuestExecutorType<\n T,\n this\n >;\n }\n}\n","import { give, GuestType } from \"../Guest/Guest\";\nimport { GuestDisposableType } from \"../Guest/GuestDisposable\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/patron\n */\nexport class Patron<T> implements GuestDisposableType<T> {\n public constructor(private willBePatron: GuestType<T>) {\n if (willBePatron === undefined) {\n throw new Error(\"Patron didnt receive willBePatron argument\");\n }\n }\n\n public introduction() {\n return \"patron\" as const;\n }\n\n public give(value: T): this {\n give(value, this.willBePatron);\n return this;\n }\n\n public disposed(value: T | null): boolean {\n const maybeDisposable = this.willBePatron as GuestDisposableType;\n return maybeDisposable?.disposed?.(value) || false;\n }\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/utils/is-patron\n */\nexport const isPatron = (guest: GuestType): guest is Patron<unknown> =>\n typeof guest === \"object\" &&\n guest !== null &&\n guest?.introduction?.() === \"patron\";\n","import { give, GuestType } from \"../Guest/Guest\";\nimport {\n GuestDisposableType,\n MaybeDisposableType,\n} from \"../Guest/GuestDisposable\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/patron/patron-once\n */\nexport class PatronOnce<T> implements GuestDisposableType<T> {\n private received = false;\n\n public constructor(private baseGuest: GuestType<T>) {\n if (baseGuest === undefined) {\n throw new Error(\"PatronOnce didnt receive baseGuest argument\");\n }\n }\n\n public introduction() {\n return \"patron\" as const;\n }\n\n public give(value: T): this {\n if (!this.received) {\n this.received = true;\n give(value, this.baseGuest);\n }\n return this;\n }\n\n public disposed(value: T | null): boolean {\n if (this.received) {\n return true;\n }\n const maybeDisposable = this.baseGuest as MaybeDisposableType;\n return maybeDisposable.disposed ? maybeDisposable.disposed(value) : false;\n }\n}\n","import { GuestObjectType, GuestType } from \"../Guest/Guest\";\nimport { GuestApplied } from \"../Guest/GuestApplied\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/patron/patron-applied\n */\nexport class PatronApplied<T, R> implements GuestObjectType<T> {\n private guestApplied: GuestApplied<T, R>;\n\n public constructor(baseGuest: GuestType<R>, applier: (value: T) => R) {\n this.guestApplied = new GuestApplied(baseGuest, applier);\n }\n\n public give(value: T): this {\n this.guestApplied.give(value);\n return this;\n }\n\n public introduction(): \"guest\" | \"patron\" {\n return \"patron\";\n }\n}\n","import { GuestExecutorType, GuestObjectType, GuestType } from \"../Guest/Guest\";\nimport { GuestExecutorApplied } from \"../Guest/GuestExecutorApplied\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/patron/patron-executor-applied\n */\nexport class PatronExecutorApplied<T> implements GuestObjectType<T> {\n private guestApplied: GuestExecutorApplied<T>;\n\n public constructor(\n baseGuest: GuestType<T>,\n applier: (executor: GuestExecutorType) => GuestExecutorType,\n ) {\n this.guestApplied = new GuestExecutorApplied(baseGuest, applier);\n }\n\n public give(value: T): this {\n this.guestApplied.give(value);\n return this;\n }\n\n public introduction(): \"guest\" | \"patron\" {\n return \"patron\";\n }\n}\n","import { Guest, GuestObjectType, GuestType } from \"../Guest/Guest\";\nimport { SourceObjectType } from \"./Source\";\nimport { PatronPool } from \"../Patron/PatronPool\";\nimport { isPatron } from \"../Patron/Patron\";\n\nexport interface PoolAwareType<T = any> {\n pool(): PatronPool<T>;\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/source-with-pool\n */\nexport type SourceWithPoolType<T = any> = SourceObjectType<T> &\n GuestObjectType<T> &\n PoolAwareType<T>;\n\nexport class SourceWithPool<T> implements SourceWithPoolType<T> {\n private thePool = new PatronPool(this);\n private theEmptyPool = new PatronPool(this);\n private isEmpty: boolean;\n\n public constructor(private sourceDocument?: T) {\n this.isEmpty = sourceDocument === undefined;\n }\n\n public pool() {\n return this.thePool;\n }\n\n public give(value: T): this {\n this.isEmpty = false;\n this.sourceDocument = value;\n this.thePool.give(this.sourceDocument);\n this.theEmptyPool.give(this.sourceDocument);\n return this;\n }\n\n public value(guest: GuestType<T>): this {\n if (this.isEmpty) {\n if (isPatron(guest)) {\n this.theEmptyPool.add(guest);\n }\n return this;\n }\n\n if (typeof guest === \"function\") {\n this.thePool.distribute(this.sourceDocument, new Guest(guest));\n } else {\n this.thePool.distribute(this.sourceDocument, guest);\n }\n\n return this;\n }\n\n public filled() {\n return !this.isEmpty;\n }\n}\n","import { SourceObjectType } from \"./Source\";\nimport { SourceWithPool } from \"./SourceWithPool\";\nimport { Guest, GuestObjectType, GuestType } from \"../Guest/Guest\";\nimport { GuestCast } from \"../Guest/GuestCast\";\nimport { GuestObject } from \"../Guest/GuestObject\";\nimport { GuestPool } from \"../Guest/GuestPool\";\n\nexport interface SourceAllType<T = any> extends SourceObjectType<T> {\n valueArray(guest: GuestObjectType<T>): this;\n guestKey<R>(key: string): GuestObjectType<R>;\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest/source-all\n */\nexport class SourceAll<T> implements SourceAllType<T> {\n private theAll: SourceWithPool<Record<string, unknown>>;\n\n private keysKnown: Set<string>;\n\n private keysFilled = new Set();\n\n private filledAllPool = new GuestPool(this);\n\n public constructor(initialKnownKeys: string[] = []) {\n this.theAll = new SourceWithPool<Record<string, unknown>>({});\n this.keysKnown = new Set(initialKnownKeys);\n }\n\n public valueArray(guest: GuestType<T>) {\n const guestObject = new GuestObject(guest);\n this.filledAllPool.add(\n new GuestCast(guestObject, (value: Record<string, unknown>) => {\n guestObject.give(Object.values(value) as T);\n }),\n );\n if (this.isAllFilled()) {\n this.theAll.value(\n new Guest((all: Record<string, unknown>) => {\n this.filledAllPool.give(Object.values(all));\n }),\n );\n }\n return this;\n }\n\n public value(guest: GuestType<T>) {\n const guestObject = new GuestObject(guest);\n if (this.isAllFilled()) {\n this.filledAllPool.add(guestObject);\n this.theAll.value(\n new Guest((all) => {\n this.filledAllPool.give(all);\n }),\n );\n } else {\n this.filledAllPool.add(guestObject);\n }\n return this;\n }\n\n public guestKey<R>(key: string): GuestObjectType<R> {\n this.keysKnown.add(key);\n return new Guest((value) => {\n this.theAll.value(\n new Guest((all: Record<string, unknown>) => {\n this.keysFilled.add(key);\n const lastAll = {\n ...all,\n [key]: value,\n };\n this.theAll.give(lastAll);\n if (this.isAllFilled()) {\n this.filledAllPool.give(lastAll);\n }\n }),\n );\n });\n }\n\n private isAllFilled() {\n return (\n this.keysFilled.size > 0 && this.keysFilled.size === this.keysKnown.size\n );\n }\n}\n","import { give, GuestType } from \"../Guest/Guest\";\n\nexport type SourceExecutorType<T> = (guest: GuestType<T>) => unknown;\n\nexport interface SourceObjectType<T> {\n value: SourceExecutorType<T>;\n}\n\nexport type SourceType<T = any> = SourceExecutorType<T> | SourceObjectType<T>;\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/utils/value\n */\nexport function value<T>(source: SourceType<T>, guest: GuestType<T>) {\n if (source === undefined) {\n throw new Error(\"value didnt receive source argument\");\n }\n if (guest === undefined) {\n throw new Error(\"value didnt receive guest argument\");\n }\n if (typeof source === \"function\") {\n return source(guest);\n } else {\n return source.value(guest);\n }\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/utils/is-source\n */\nexport function isSource(mbSource: any): mbSource is SourceType {\n if (mbSource === undefined) {\n throw new Error(\"isSource didnt receive mbSource argument\");\n }\n return (\n typeof mbSource === \"function\" || typeof mbSource?.value === \"function\"\n );\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest/source\n */\nexport class Source<T = any> implements SourceObjectType<T> {\n public constructor(private source: SourceType<T>) {\n if (source === undefined) {\n throw new Error(\"Source constructor didnt receive executor function\");\n }\n }\n\n public value(guest: GuestType<T>): GuestType<T> {\n value(this.source, guest);\n return guest;\n }\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/utils/source-of\n */\nexport const sourceOf = <T>(value: T) => new Source<T>((g) => give(value, g));\n","import { SourceWithPool } from \"../Source/SourceWithPool\";\nimport { give, GuestType } from \"../Guest/Guest\";\nimport { GuestCast } from \"../Guest/GuestCast\";\nimport { PatronOnce } from \"../Patron/PatronOnce\";\nimport { PrivateType } from \"../Private/Private\";\nimport { isSource, SourceObjectType, SourceType, value } from \"./Source\";\nimport { SourceAll } from \"./SourceAll\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest/source-sequence\n */\nexport class SourceSequence<T, TG> implements SourceObjectType<TG[]> {\n public constructor(\n private baseSource: SourceType<T[]>,\n private targetSource: PrivateType<SourceType<TG>>,\n ) {\n if (baseSource === undefined) {\n throw new Error(\"SourceSequence didnt receive baseSource argument\");\n }\n if (targetSource === undefined) {\n throw new Error(\"SourceSequence didnt receive targetSource argument\");\n }\n }\n\n public value(guest: GuestType<TG[]>) {\n const all = new SourceAll<TG[]>();\n const sequenceSource = new SourceWithPool();\n const targetSource = this.targetSource.get(sequenceSource);\n\n value(\n this.baseSource,\n new GuestCast(guest, (theValue) => {\n let index = 0;\n\n const nextItemHandle = () => {\n if (theValue[index + 1] !== undefined) {\n index = index + 1;\n handle();\n } else {\n all.valueArray(guest);\n }\n };\n\n function handle() {\n sequenceSource.give(null);\n const nextValue = theValue[index];\n if (isSource(nextValue)) {\n value(\n nextValue,\n new PatronOnce((theNextValue) => {\n sequenceSource.give(theNextValue);\n value(targetSource, all.guestKey(index.toString()));\n nextItemHandle();\n }),\n );\n } else {\n sequenceSource.give(nextValue);\n value(targetSource, all.guestKey(index.toString()));\n nextItemHandle();\n }\n }\n\n if (theValue[index] !== undefined) {\n handle();\n } else {\n give([], guest);\n }\n }),\n );\n return this;\n }\n}\n","import { PrivateType } from \"../Private/Private\";\nimport { give, GuestType } from \"../Guest/Guest\";\nimport {\n Source,\n SourceObjectType,\n SourceType,\n isSource,\n value,\n} from \"./Source\";\nimport { SourceAll } from \"./SourceAll\";\nimport { GuestCast } from \"../Guest/GuestCast\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest/source-map\n */\nexport class SourceMap<T, TG> implements SourceObjectType<TG[]> {\n public constructor(\n private baseSource: SourceType<T[]>,\n private targetSource: PrivateType<SourceType<TG>>,\n ) {\n if (baseSource === undefined) {\n throw new Error(\"SourceMap didnt receive baseSource argument\");\n }\n if (targetSource === undefined) {\n throw new Error(\"SourceMap didnt receive targetSource argument\");\n }\n }\n\n public value(guest: GuestType<TG[]>) {\n const all = new SourceAll();\n value(\n this.baseSource,\n new GuestCast(<GuestType>guest, (theValue) => {\n theValue.forEach((val, index) => {\n const valueSource = isSource(val)\n ? val\n : new Source((innerGuest) => {\n give(val, innerGuest);\n });\n const targetSource = this.targetSource.get(valueSource);\n value(targetSource, all.guestKey(index.toString()));\n });\n }),\n );\n all.valueArray(<GuestType>guest);\n return this;\n }\n}\n","import { give, GuestType } from \"../Guest/Guest\";\nimport { SourceObjectType, SourceType, value } from \"./Source\";\nimport { GuestCast } from \"../Guest/GuestCast\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest/source-race\n */\nexport class SourceRace<T> implements SourceObjectType<T> {\n public constructor(private sources: SourceType<T>[]) {\n if (sources === undefined) {\n throw new Error(\"SourceRace didnt receive sources argument\");\n }\n }\n\n public value(guest: GuestType<T>): this {\n let connectedWithSource: SourceType | null = null;\n this.sources.forEach((source) => {\n value(\n source,\n new GuestCast(<GuestType>guest, (value) => {\n if (!connectedWithSource || connectedWithSource === source) {\n give(value as T, guest);\n connectedWithSource = source;\n }\n }),\n );\n });\n return this;\n }\n}\n","import { give, GuestType } from \"../Guest/Guest\";\nimport { SourceType, value } from \"./Source\";\nimport { PatronPool } from \"../Patron/PatronPool\";\nimport { SourceWithPoolType } from \"./SourceWithPool\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/source-dynamic\n */\nexport class SourceDynamic<T = unknown> implements SourceWithPoolType<T> {\n public constructor(\n private baseGuest: GuestType<T>,\n private baseSource: SourceType<T>,\n ) {\n if (baseGuest === undefined) {\n throw new Error(\"SourceDynamic didnt receive baseGuest argument\");\n }\n if (baseSource === undefined) {\n throw new Error(\"SourceDynamic didnt receive baseSource argument\");\n }\n }\n\n public value(guest: GuestType<T>) {\n value(this.baseSource, guest);\n return this;\n }\n\n public give(value: T) {\n give(value, this.baseGuest);\n return this;\n }\n\n public pool(): PatronPool<T> {\n throw Error(\"No pool in SourceDynamic\");\n }\n}\n","import { give, GuestType } from \"../Guest/Guest\";\nimport { GuestCast } from \"../Guest/GuestCast\";\nimport { SourceObjectType, SourceType, value } from \"../Source/Source\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/source/source-applied\n */\nexport class SourceApplied<T, R> implements SourceObjectType<R> {\n public constructor(\n private baseSource: SourceType<T>,\n private applier: (v: T) => R,\n ) {}\n\n public value(g: GuestType<R>) {\n value(\n this.baseSource,\n new GuestCast(g, (v) => {\n give(this.applier(v), g);\n }),\n );\n return this;\n }\n}\n","import {\n SourceExecutorType,\n SourceObjectType,\n SourceType,\n value,\n} from \"../Source/Source\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/source/source-executor-applied\n */\nexport class SourceExecutorApplied<T> implements SourceObjectType<T> {\n public value: SourceExecutorType<T>;\n\n public constructor(\n source: SourceType<T>,\n applier: (executor: SourceExecutorType<T>) => SourceExecutorType<T>,\n ) {\n this.value = applier((g) => {\n value(source, g);\n });\n }\n}\n","import { GuestType } from \"../Guest/Guest\";\nimport { PatronPool } from \"../Patron/PatronPool\";\nimport { value } from \"./Source\";\nimport { SourceWithPool, SourceWithPoolType } from \"./SourceWithPool\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/source/source-once\n */\nexport class SourceOnce<T> implements SourceWithPoolType<T> {\n private source: SourceWithPool<T>;\n\n public constructor(initialValue?: T) {\n this.source = new SourceWithPool(initialValue);\n }\n\n public value(guest: GuestType<T>) {\n value(this.source, guest);\n return this;\n }\n\n public give(value: T): this {\n if (!this.source.filled()) {\n this.source.give(value);\n }\n return this;\n }\n\n public pool(): PatronPool<T> {\n return this.source.pool();\n }\n}\n","import { PrivateType } from \"./Private\";\n\ninterface Constructable<T> {\n new (...args: unknown[]): T;\n}\n\ninterface Prototyped<T> {\n prototype: T;\n}\n\nexport class PrivateClass<T> implements PrivateType<T> {\n public constructor(\n private constructorFn: Prototyped<T>,\n private modules: Record<string, unknown> = {},\n ) {\n if (constructorFn === undefined) {\n throw new Error(\"PrivateClass didnt receive constructorFn argument\");\n }\n }\n\n public get<R extends unknown[], CT = null>(\n ...args: R\n ): CT extends null ? T : CT {\n return new (this.constructorFn as Constructable<T>)(\n ...args,\n this.modules,\n ) as CT extends null ? T : CT;\n }\n}\n","/**\n * @url https://silentium-lab.github.io/silentium/#/utils/private\n */\nexport interface PrivateType<T> {\n get<R extends unknown[], CT = null>(...args: R): CT extends null ? T : CT;\n}\n\nexport class Private<T> implements PrivateType<T> {\n public constructor(private buildingFn: (...args: any[]) => T) {\n if (buildingFn === undefined) {\n throw new Error(\"Private didnt receive buildingFn argument\");\n }\n }\n\n public get<R extends unknown[], CT = null>(\n ...args: R\n ): CT extends null ? T : CT {\n return this.buildingFn(...args) as CT extends null ? T : CT;\n }\n}\n"],"names":["__publicField","value"],"mappings":";;AAcgB,SAAA,IAAA,CAAQ,MAAS,KAAqB,EAAA;AACpD,EAAA,IAAI,SAAS,MAAW,EAAA;AACtB,IAAM,MAAA,I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{"version":3,"file":"silentium.cjs","sources":["../src/Guest/Guest.ts","../src/Guest/GuestCast.ts","../src/Patron/PatronPool.ts","../src/Guest/GuestPool.ts","../src/Guest/GuestSync.ts","../src/Guest/GuestObject.ts","../src/Guest/GuestDisposable.ts","../src/Guest/GuestApplied.ts","../src/Guest/GuestExecutorApplied.ts","../src/Patron/Patron.ts","../src/Patron/PatronOnce.ts","../src/Patron/PatronApplied.ts","../src/Patron/PatronExecutorApplied.ts","../src/Source/SourceWithPool.ts","../src/Source/SourceAll.ts","../src/Source/Source.ts","../src/Source/SourceSequence.ts","../src/Source/SourceMap.ts","../src/Source/SourceRace.ts","../src/Source/SourceDynamic.ts","../src/Source/SourceApplied.ts","../src/Source/SourceExecutorApplied.ts","../src/Source/SourceOnce.ts","../src/Source/SourceSync.ts","../src/Private/PrivateClass.ts","../src/Private/Private.ts"],"sourcesContent":["type GuestIntroduction = \"guest\" | \"patron\";\n\nexport type GuestExecutorType<T = any, This = void> = (value: T) => This;\n\nexport interface GuestObjectType<T = any> {\n give(value: T): this;\n introduction?(): GuestIntroduction;\n}\n\nexport type GuestType<T = any> = GuestExecutorType<T> | GuestObjectType<T>;\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/utils/give\n */\nexport function give<T>(data: T, guest: GuestType<T>) {\n if (data === undefined) {\n throw new Error(\"give didnt receive data argument\");\n }\n if (guest === undefined) {\n throw new Error(\"give didnt receive guest argument\");\n }\n if (typeof guest === \"function\") {\n guest(data);\n } else {\n guest.give(data);\n }\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/utils/is-guest\n */\nexport function isGuest(mbGuest: any): mbGuest is GuestType {\n if (mbGuest === undefined) {\n throw new Error(\"isGuest didnt receive mbGuest argument\");\n }\n return typeof mbGuest === \"function\" || typeof mbGuest?.give === \"function\";\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest\n */\nexport class Guest<T> implements GuestObjectType<T> {\n public constructor(private receiver: GuestExecutorType<T>) {\n if (!receiver) {\n throw new Error(\"reseiver function was not passed to Guest constructor\");\n }\n }\n\n public give(value: T) {\n this.receiver(value);\n return this;\n }\n}\n","import { give, GuestType } from \"./Guest\";\nimport { GuestDisposableType, MaybeDisposableType } from \"./GuestDisposable\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest/guest-cast\n */\nexport class GuestCast<T> implements GuestDisposableType<T> {\n public constructor(\n private sourceGuest: GuestType<any>,\n private targetGuest: GuestType<T>,\n ) {\n if (sourceGuest === undefined) {\n throw new Error(\"GuestCast didnt receive sourceGuest argument\");\n }\n if (targetGuest === undefined) {\n throw new Error(\"GuestCast didnt receive targetGuest argument\");\n }\n }\n\n public introduction() {\n if (typeof this.sourceGuest === \"function\") {\n return \"guest\";\n }\n if (!this.sourceGuest.introduction) {\n return \"guest\";\n }\n return this.sourceGuest.introduction();\n }\n\n public give(value: T): this {\n give(value, this.targetGuest);\n return this;\n }\n\n public disposed(value: T | null): boolean {\n const maybeDisposable = this.sourceGuest as MaybeDisposableType;\n return maybeDisposable.disposed ? maybeDisposable.disposed(value) : false;\n }\n}\n","import { give, GuestObjectType, GuestType } from \"../Guest/Guest\";\nimport { GuestDisposableType } from \"../Guest/GuestDisposable\";\n\nconst poolSets = new Map<PoolType, Set<GuestObjectType>>();\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/utils/patron-pools\n */\nexport const patronPools = (patron: GuestObjectType) => {\n const pools: PoolType[] = [];\n poolSets.forEach((pool, poolInstance) => {\n if (pool.has(patron)) {\n pools.push(poolInstance);\n }\n });\n return pools;\n};\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/utils/remove-patron-from-pools\n */\nexport const removePatronFromPools = (patron: GuestObjectType) => {\n if (patron === undefined) {\n throw new Error(\"removePatronFromPools didnt receive patron argument\");\n }\n poolSets.forEach((pool) => {\n pool.delete(patron);\n });\n};\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/utils/is-patron-in-pools\n */\nexport const isPatronInPools = (patron: GuestObjectType) => {\n if (patron === undefined) {\n throw new Error(\"isPatronInPools didnt receive patron argument\");\n }\n let inPool = false;\n poolSets.forEach((pool) => {\n if (!inPool) {\n inPool = pool.has(patron);\n }\n });\n return inPool;\n};\n\nexport interface PoolType<T = any> extends GuestObjectType<T> {\n add(guest: GuestObjectType<T>): this;\n distribute(receiving: T, possiblePatron: GuestObjectType<T>): this;\n remove(patron: GuestObjectType<T>): this;\n size(): number;\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/patron/patron-pool\n */\nexport class PatronPool<T> implements PoolType<T> {\n private patrons: Set<GuestObjectType<T>>;\n\n public give: (value: T) => this;\n\n public constructor(private initiator: unknown) {\n this.patrons = new Set<GuestObjectType<T>>();\n poolSets.set(this, this.patrons);\n const doReceive = (value: T) => {\n this.patrons.forEach((target) => {\n this.sendValueToGuest(value, target);\n });\n };\n this.give = (value: T) => {\n doReceive(value);\n return this;\n };\n }\n\n public size(): number {\n return this.patrons.size;\n }\n\n public add(shouldBePatron: GuestType<T>) {\n if (!shouldBePatron) {\n throw new Error(\"PatronPool add method received nothing!\");\n }\n if (\n typeof shouldBePatron !== \"function\" &&\n shouldBePatron.introduction &&\n shouldBePatron.introduction() === \"patron\"\n ) {\n this.patrons.add(shouldBePatron);\n }\n return this;\n }\n\n public remove(patron: GuestObjectType<T>) {\n this.patrons.delete(patron);\n return this;\n }\n\n public distribute(receiving: T, possiblePatron: GuestType<T>): this {\n this.add(possiblePatron);\n this.sendValueToGuest(receiving, possiblePatron);\n return this;\n }\n\n private sendValueToGuest(value: T, guest: GuestType<T>) {\n const isDisposed = this.guestDisposed(value, guest);\n\n if (!isDisposed) {\n give(value, guest);\n }\n }\n\n private guestDisposed(value: T, guest: GuestType<T>) {\n if ((guest as GuestDisposableType).disposed?.(value)) {\n this.remove(guest as GuestObjectType);\n return true;\n }\n\n return false;\n }\n}\n","import { PatronPool, PoolType } from \"../Patron/PatronPool\";\nimport { give, GuestObjectType, GuestType } from \"./Guest\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest/guest-pool\n */\nexport class GuestPool<T> implements GuestObjectType<T>, PoolType<T> {\n private guests = new Set<GuestType<T>>();\n\n private patronPool: PatronPool<T>;\n\n public constructor(initiator: unknown) {\n this.patronPool = new PatronPool(initiator);\n }\n\n public give(value: T): this {\n this.deliverToGuests(value);\n this.patronPool.give(value);\n return this;\n }\n\n public add(guest: GuestType<T>): this {\n if (\n typeof guest === \"function\" ||\n !guest.introduction ||\n guest.introduction() === \"guest\"\n ) {\n this.guests.add(guest);\n }\n this.patronPool.add(guest);\n return this;\n }\n\n public remove(patron: GuestObjectType<T>): this {\n this.guests.delete(patron);\n this.patronPool.remove(patron);\n return this;\n }\n\n public distribute(receiving: T, possiblePatron: GuestObjectType<T>): this {\n this.add(possiblePatron);\n this.give(receiving);\n return this;\n }\n\n public size() {\n return this.patronPool.size() + this.guests.size;\n }\n\n private deliverToGuests(value: T) {\n this.guests.forEach((target) => {\n give(value, target);\n });\n this.guests.clear();\n }\n}\n","import { GuestObjectType } from \"./Guest\";\n\nexport interface GuestValueType<T = any> extends GuestObjectType<T> {\n value(): T;\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest/guest-sync\n */\nexport class GuestSync<T> implements GuestValueType<T> {\n public constructor(private theValue?: T) {}\n\n public give(value: T): this {\n this.theValue = value;\n return this;\n }\n\n public value() {\n if (this.theValue === undefined) {\n throw new Error(\"no value in GuestSync!\");\n }\n return this.theValue;\n }\n}\n","import { Guest, GuestType } from \"./Guest\";\nimport { GuestDisposableType, MaybeDisposableType } from \"./GuestDisposable\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest/guest-object\n */\nexport class GuestObject<T> implements GuestDisposableType<T> {\n public constructor(private baseGuest: GuestType<T>) {\n if (baseGuest === undefined) {\n throw new Error(\"GuestObject didnt receive baseGuest argument\");\n }\n }\n\n public give(value: T): this {\n let guest = this.baseGuest;\n if (typeof guest === \"function\") {\n guest = new Guest(guest);\n }\n guest.give(value);\n return this;\n }\n\n public introduction() {\n if (typeof this.baseGuest === \"function\" || !this.baseGuest.introduction) {\n return \"guest\";\n }\n return this.baseGuest.introduction();\n }\n\n public disposed(value: T | null): boolean {\n const maybeDisposable = this.baseGuest as MaybeDisposableType;\n return maybeDisposable.disposed ? maybeDisposable.disposed(value) : false;\n }\n}\n","import { give, GuestObjectType, GuestType } from \"./Guest\";\n\nexport interface GuestDisposableType<T = any> extends GuestObjectType<T> {\n disposed(value: T | null): boolean;\n}\n\nexport type MaybeDisposableType<T = any> = Partial<GuestDisposableType<T>>;\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest/guest-disposable\n */\nexport class GuestDisposable<T> implements GuestDisposableType<T> {\n public constructor(\n private guest: GuestType,\n private disposeCheck: (value: T | null) => boolean,\n ) {\n if (guest === undefined) {\n throw new Error(\"GuestDisposable didnt receive guest argument\");\n }\n if (disposeCheck === undefined) {\n throw new Error(\"GuestDisposable didnt receive disposeCheck argument\");\n }\n }\n\n public disposed(value: T | null): boolean {\n return this.disposeCheck(value);\n }\n\n public give(value: T): this {\n give(value, this.guest);\n return this;\n }\n}\n","import { give, GuestObjectType, GuestType } from \"../Guest/Guest\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest/guest-applied\n */\nexport class GuestApplied<T, R> implements GuestObjectType<T> {\n public constructor(\n private baseGuest: GuestType<R>,\n private applier: (value: T) => R,\n ) {}\n\n public give(value: T): this {\n give(this.applier(value), this.baseGuest);\n return this;\n }\n}\n","import {\n give,\n GuestExecutorType,\n GuestObjectType,\n GuestType,\n} from \"../Guest/Guest\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/guest/guest-executor-applied\n */\nexport class GuestExecutorApplied<T> implements GuestObjectType<T> {\n public give: GuestExecutorType<T, this>;\n\n public constructor(\n baseGuest: GuestType<T>,\n applier: (executor: GuestExecutorType) => GuestExecutorType,\n ) {\n this.give = applier((v) => give(v, baseGuest)) as GuestExecutorType<\n T,\n this\n >;\n }\n}\n","import { give, GuestType } from \"../Guest/Guest\";\nimport { GuestDisposableType } from \"../Guest/GuestDisposable\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/patron\n */\nexport class Patron<T> implements GuestDisposableType<T> {\n public constructor(private willBePatron: GuestType<T>) {\n if (willBePatron === undefined) {\n throw new Error(\"Patron didnt receive willBePatron argument\");\n }\n }\n\n public introduction() {\n return \"patron\" as const;\n }\n\n public give(value: T): this {\n give(value, this.willBePatron);\n return this;\n }\n\n public disposed(value: T | null): boolean {\n const maybeDisposable = this.willBePatron as GuestDisposableType;\n return maybeDisposable?.disposed?.(value) || false;\n }\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/utils/is-patron\n */\nexport const isPatron = (guest: GuestType): guest is Patron<unknown> =>\n typeof guest === \"object\" &&\n guest !== null &&\n guest?.introduction?.() === \"patron\";\n","import { give, GuestType } from \"../Guest/Guest\";\nimport {\n GuestDisposableType,\n MaybeDisposableType,\n} from \"../Guest/GuestDisposable\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/patron/patron-once\n */\nexport class PatronOnce<T> implements GuestDisposableType<T> {\n private received = false;\n\n public constructor(private baseGuest: GuestType<T>) {\n if (baseGuest === undefined) {\n throw new Error(\"PatronOnce didnt receive baseGuest argument\");\n }\n }\n\n public introduction() {\n return \"patron\" as const;\n }\n\n public give(value: T): this {\n if (!this.received) {\n this.received = true;\n give(value, this.baseGuest);\n }\n return this;\n }\n\n public disposed(value: T | null): boolean {\n if (this.received) {\n return true;\n }\n const maybeDisposable = this.baseGuest as MaybeDisposableType;\n return maybeDisposable.disposed ? maybeDisposable.disposed(value) : false;\n }\n}\n","import { GuestObjectType, GuestType } from \"../Guest/Guest\";\nimport { GuestApplied } from \"../Guest/GuestApplied\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/patron/patron-applied\n */\nexport class PatronApplied<T, R> implements GuestObjectType<T> {\n private guestApplied: GuestApplied<T, R>;\n\n public constructor(baseGuest: GuestType<R>, applier: (value: T) => R) {\n this.guestApplied = new GuestApplied(baseGuest, applier);\n }\n\n public give(value: T): this {\n this.guestApplied.give(value);\n return this;\n }\n\n public introduction(): \"guest\" | \"patron\" {\n return \"patron\";\n }\n}\n","import { GuestExecutorType, GuestObjectType, GuestType } from \"../Guest/Guest\";\nimport { GuestExecutorApplied } from \"../Guest/GuestExecutorApplied\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/patron/patron-executor-applied\n */\nexport class PatronExecutorApplied<T> implements GuestObjectType<T> {\n private guestApplied: GuestExecutorApplied<T>;\n\n public constructor(\n baseGuest: GuestType<T>,\n applier: (executor: GuestExecutorType) => GuestExecutorType,\n ) {\n this.guestApplied = new GuestExecutorApplied(baseGuest, applier);\n }\n\n public give(value: T): this {\n this.guestApplied.give(value);\n return this;\n }\n\n public introduction(): \"guest\" | \"patron\" {\n return \"patron\";\n }\n}\n","import { Guest, GuestObjectType, GuestType } from \"../Guest/Guest\";\nimport { SourceObjectType } from \"./Source\";\nimport { PatronPool } from \"../Patron/PatronPool\";\nimport { isPatron } from \"../Patron/Patron\";\n\nexport interface PoolAwareType<T = any> {\n pool(): PatronPool<T>;\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/source/source-with-pool\n */\nexport type SourceWithPoolType<T = any> = SourceObjectType<T> &\n GuestObjectType<T> &\n PoolAwareType<T>;\n\nexport class SourceWithPool<T> implements SourceWithPoolType<T> {\n private thePool = new PatronPool(this);\n private theEmptyPool = new PatronPool(this);\n private isEmpty: boolean;\n\n public constructor(private sourceDocument?: T) {\n this.isEmpty = sourceDocument === undefined;\n }\n\n public pool() {\n return this.thePool;\n }\n\n public give(value: T): this {\n this.isEmpty = false;\n this.sourceDocument = value;\n this.thePool.give(this.sourceDocument);\n this.theEmptyPool.give(this.sourceDocument);\n return this;\n }\n\n public value(guest: GuestType<T>): this {\n if (this.isEmpty) {\n if (isPatron(guest)) {\n this.theEmptyPool.add(guest);\n }\n return this;\n }\n\n if (typeof guest === \"function\") {\n this.thePool.distribute(this.sourceDocument, new Guest(guest));\n } else {\n this.thePool.distribute(this.sourceDocument, guest);\n }\n\n return this;\n }\n\n public filled() {\n return !this.isEmpty;\n }\n}\n","import { SourceObjectType } from \"./Source\";\nimport { SourceWithPool } from \"./SourceWithPool\";\nimport { Guest, GuestObjectType, GuestType } from \"../Guest/Guest\";\nimport { GuestCast } from \"../Guest/GuestCast\";\nimport { GuestObject } from \"../Guest/GuestObject\";\nimport { GuestPool } from \"../Guest/GuestPool\";\n\nexport interface SourceAllType<T = any> extends SourceObjectType<T> {\n valueArray(guest: GuestObjectType<T>): this;\n guestKey<R>(key: string): GuestObjectType<R>;\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/source/source-all\n */\nexport class SourceAll<T> implements SourceAllType<T> {\n private theAll: SourceWithPool<Record<string, unknown>>;\n\n private keysKnown: Set<string>;\n\n private keysFilled = new Set();\n\n private filledAllPool = new GuestPool(this);\n\n public constructor(initialKnownKeys: string[] = []) {\n this.theAll = new SourceWithPool<Record<string, unknown>>({});\n this.keysKnown = new Set(initialKnownKeys);\n }\n\n public valueArray(guest: GuestType<T>) {\n const guestObject = new GuestObject(guest);\n this.filledAllPool.add(\n new GuestCast(guestObject, (value: Record<string, unknown>) => {\n guestObject.give(Object.values(value) as T);\n }),\n );\n if (this.isAllFilled()) {\n this.theAll.value(\n new Guest((all: Record<string, unknown>) => {\n this.filledAllPool.give(Object.values(all));\n }),\n );\n }\n return this;\n }\n\n public value(guest: GuestType<T>) {\n const guestObject = new GuestObject(guest);\n if (this.isAllFilled()) {\n this.filledAllPool.add(guestObject);\n this.theAll.value(\n new Guest((all) => {\n this.filledAllPool.give(all);\n }),\n );\n } else {\n this.filledAllPool.add(guestObject);\n }\n return this;\n }\n\n public guestKey<R>(key: string): GuestObjectType<R> {\n this.keysKnown.add(key);\n return new Guest((value) => {\n this.theAll.value(\n new Guest((all: Record<string, unknown>) => {\n this.keysFilled.add(key);\n const lastAll = {\n ...all,\n [key]: value,\n };\n this.theAll.give(lastAll);\n if (this.isAllFilled()) {\n this.filledAllPool.give(lastAll);\n }\n }),\n );\n });\n }\n\n private isAllFilled() {\n return (\n this.keysFilled.size > 0 && this.keysFilled.size === this.keysKnown.size\n );\n }\n}\n","import { give, GuestType } from \"../Guest/Guest\";\n\nexport type SourceExecutorType<T> = (guest: GuestType<T>) => unknown;\n\nexport interface SourceObjectType<T> {\n value: SourceExecutorType<T>;\n}\n\nexport type SourceDataType =\n | string\n | number\n | boolean\n | Date\n | object\n | Array<unknown>\n | symbol;\n\nexport type SourceType<T = any> =\n | SourceExecutorType<T>\n | SourceObjectType<T>\n | SourceDataType;\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/utils/value\n */\nexport function value<T>(source: SourceType<T>, guest: GuestType<T>) {\n if (source === undefined || source === null) {\n throw new Error(\"value didnt receive source argument\");\n }\n if (guest === undefined || source === null) {\n throw new Error(\"value didnt receive guest argument\");\n }\n if (typeof source === \"function\") {\n return source(guest);\n } else if (\n typeof source === \"object\" &&\n \"value\" in source &&\n typeof source.value === \"function\"\n ) {\n return source.value(guest);\n } else {\n return new Source((g) => give(source as T, g)).value(guest);\n }\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/utils/is-source\n */\nexport function isSource(mbSource: any): mbSource is SourceType {\n if (mbSource === undefined) {\n throw new Error(\"isSource didnt receive mbSource argument\");\n }\n return (\n typeof mbSource === \"function\" || typeof mbSource?.value === \"function\"\n );\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/source\n */\nexport class Source<T = any> implements SourceObjectType<T> {\n public constructor(private source: SourceType<T>) {\n if (source === undefined) {\n throw new Error(\"Source constructor didnt receive executor function\");\n }\n }\n\n public value(guest: GuestType<T>): GuestType<T> {\n value(this.source, guest);\n return guest;\n }\n}\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/utils/source-of\n */\nexport const sourceOf = <T>(value: T) => new Source<T>((g) => give(value, g));\n","import { SourceWithPool } from \"../Source/SourceWithPool\";\nimport { give, GuestType } from \"../Guest/Guest\";\nimport { GuestCast } from \"../Guest/GuestCast\";\nimport { PatronOnce } from \"../Patron/PatronOnce\";\nimport { PrivateType } from \"../Private/Private\";\nimport { isSource, SourceObjectType, SourceType, value } from \"./Source\";\nimport { SourceAll } from \"./SourceAll\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/source/source-sequence\n */\nexport class SourceSequence<T, TG> implements SourceObjectType<TG[]> {\n public constructor(\n private baseSource: SourceType<T[]>,\n private targetSource: PrivateType<SourceType<TG>>,\n ) {\n if (baseSource === undefined) {\n throw new Error(\"SourceSequence didnt receive baseSource argument\");\n }\n if (targetSource === undefined) {\n throw new Error(\"SourceSequence didnt receive targetSource argument\");\n }\n }\n\n public value(guest: GuestType<TG[]>) {\n const all = new SourceAll<TG[]>();\n const sequenceSource = new SourceWithPool();\n const targetSource = this.targetSource.get(sequenceSource);\n\n value(\n this.baseSource,\n new GuestCast(guest, (theValue) => {\n let index = 0;\n\n const nextItemHandle = () => {\n if (theValue[index + 1] !== undefined) {\n index = index + 1;\n handle();\n } else {\n all.valueArray(guest);\n }\n };\n\n function handle() {\n sequenceSource.give(null);\n const nextValue = theValue[index];\n if (isSource(nextValue)) {\n value(\n nextValue,\n new PatronOnce((theNextValue) => {\n sequenceSource.give(theNextValue);\n value(targetSource, all.guestKey(index.toString()));\n nextItemHandle();\n }),\n );\n } else {\n sequenceSource.give(nextValue);\n value(targetSource, all.guestKey(index.toString()));\n nextItemHandle();\n }\n }\n\n if (theValue[index] !== undefined) {\n handle();\n } else {\n give([], guest);\n }\n }),\n );\n return this;\n }\n}\n","import { PrivateType } from \"../Private/Private\";\nimport { give, GuestType } from \"../Guest/Guest\";\nimport {\n Source,\n SourceObjectType,\n SourceType,\n isSource,\n value,\n} from \"./Source\";\nimport { SourceAll } from \"./SourceAll\";\nimport { GuestCast } from \"../Guest/GuestCast\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/source/source-map\n */\nexport class SourceMap<T, TG> implements SourceObjectType<TG[]> {\n public constructor(\n private baseSource: SourceType<T[]>,\n private targetSource: PrivateType<SourceType<TG>>,\n ) {\n if (baseSource === undefined) {\n throw new Error(\"SourceMap didnt receive baseSource argument\");\n }\n if (targetSource === undefined) {\n throw new Error(\"SourceMap didnt receive targetSource argument\");\n }\n }\n\n public value(guest: GuestType<TG[]>) {\n const all = new SourceAll();\n value(\n this.baseSource,\n new GuestCast(<GuestType>guest, (theValue) => {\n theValue.forEach((val, index) => {\n const valueSource = isSource(val)\n ? val\n : new Source((innerGuest) => {\n give(val, innerGuest);\n });\n const targetSource = this.targetSource.get(valueSource);\n value(targetSource, all.guestKey(index.toString()));\n });\n }),\n );\n all.valueArray(<GuestType>guest);\n return this;\n }\n}\n","import { give, GuestType } from \"../Guest/Guest\";\nimport { SourceObjectType, SourceType, value } from \"./Source\";\nimport { GuestCast } from \"../Guest/GuestCast\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/source/source-race\n */\nexport class SourceRace<T> implements SourceObjectType<T> {\n public constructor(private sources: SourceType<T>[]) {\n if (sources === undefined) {\n throw new Error(\"SourceRace didnt receive sources argument\");\n }\n }\n\n public value(guest: GuestType<T>): this {\n let connectedWithSource: SourceType | null = null;\n this.sources.forEach((source) => {\n value(\n source,\n new GuestCast(<GuestType>guest, (value) => {\n if (!connectedWithSource || connectedWithSource === source) {\n give(value as T, guest);\n connectedWithSource = source;\n }\n }),\n );\n });\n return this;\n }\n}\n","import { give, GuestType } from \"../Guest/Guest\";\nimport { SourceType, value } from \"./Source\";\nimport { PatronPool } from \"../Patron/PatronPool\";\nimport { SourceWithPoolType } from \"./SourceWithPool\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/source/source-dynamic\n */\nexport class SourceDynamic<T = unknown> implements SourceWithPoolType<T> {\n public constructor(\n private baseGuest: GuestType<T>,\n private baseSource: SourceType<T>,\n ) {\n if (baseGuest === undefined) {\n throw new Error(\"SourceDynamic didnt receive baseGuest argument\");\n }\n if (baseSource === undefined) {\n throw new Error(\"SourceDynamic didnt receive baseSource argument\");\n }\n }\n\n public value(guest: GuestType<T>) {\n value(this.baseSource, guest);\n return this;\n }\n\n public give(value: T) {\n give(value, this.baseGuest);\n return this;\n }\n\n public pool(): PatronPool<T> {\n throw Error(\"No pool in SourceDynamic\");\n }\n}\n","import { give, GuestType } from \"../Guest/Guest\";\nimport { GuestCast } from \"../Guest/GuestCast\";\nimport { SourceObjectType, SourceType, value } from \"../Source/Source\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/source/source-applied\n */\nexport class SourceApplied<T, R> implements SourceObjectType<R> {\n public constructor(\n private baseSource: SourceType<T>,\n private applier: (v: T) => R,\n ) {}\n\n public value(g: GuestType<R>) {\n value(\n this.baseSource,\n new GuestCast(g, (v) => {\n give(this.applier(v), g);\n }),\n );\n return this;\n }\n}\n","import {\n SourceExecutorType,\n SourceObjectType,\n SourceType,\n value,\n} from \"../Source/Source\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/source/source-executor-applied\n */\nexport class SourceExecutorApplied<T> implements SourceObjectType<T> {\n public value: SourceExecutorType<T>;\n\n public constructor(\n source: SourceType<T>,\n applier: (executor: SourceExecutorType<T>) => SourceExecutorType<T>,\n ) {\n this.value = applier((g) => {\n value(source, g);\n });\n }\n}\n","import { GuestType } from \"../Guest/Guest\";\nimport { PatronPool } from \"../Patron/PatronPool\";\nimport { value } from \"./Source\";\nimport { SourceWithPool, SourceWithPoolType } from \"./SourceWithPool\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/source/source-once\n */\nexport class SourceOnce<T> implements SourceWithPoolType<T> {\n private source: SourceWithPool<T>;\n\n public constructor(initialValue?: T) {\n this.source = new SourceWithPool(initialValue);\n }\n\n public value(guest: GuestType<T>) {\n value(this.source, guest);\n return this;\n }\n\n public give(value: T): this {\n if (!this.source.filled()) {\n this.source.give(value);\n }\n return this;\n }\n\n public pool(): PatronPool<T> {\n return this.source.pool();\n }\n}\n","import { GuestType } from \"../Guest/Guest\";\nimport { GuestSync } from \"../Guest/GuestSync\";\nimport { Patron } from \"../Patron/Patron\";\nimport { SourceObjectType, SourceType, value } from \"../Source/Source\";\n\n/**\n * @url https://silentium-lab.github.io/silentium/#/source/source-sync\n */\nexport class SourceSync<T> implements SourceObjectType<T> {\n private syncGuest = new GuestSync();\n\n public constructor(private baseSource: SourceType<T>) {\n value(baseSource, new Patron(this.syncGuest));\n }\n\n public value(guest: GuestType<T>) {\n value(this.baseSource, guest);\n return this;\n }\n\n public syncValue() {\n try {\n return this.syncGuest.value();\n } catch {\n throw new Error(\"No value in SourceSync\");\n }\n }\n}\n","import { PrivateType } from \"./Private\";\n\ninterface Constructable<T> {\n new (...args: unknown[]): T;\n}\n\ninterface Prototyped<T> {\n prototype: T;\n}\n\nexport class PrivateClass<T> implements PrivateType<T> {\n public constructor(\n private constructorFn: Prototyped<T>,\n private modules: Record<string, unknown> = {},\n ) {\n if (constructorFn === undefined) {\n throw new Error(\"PrivateClass didnt receive constructorFn argument\");\n }\n }\n\n public get<R extends unknown[], CT = null>(\n ...args: R\n ): CT extends null ? T : CT {\n return new (this.constructorFn as Constructable<T>)(\n ...args,\n this.modules,\n ) as CT extends null ? T : CT;\n }\n}\n","/**\n * @url https://silentium-lab.github.io/silentium/#/utils/private\n */\nexport interface PrivateType<T> {\n get<R extends unknown[], CT = null>(...args: R): CT extends null ? T : CT;\n}\n\nexport class Private<T> implements PrivateType<T> {\n public constructor(private buildingFn: (...args: any[]) => T) {\n if (buildingFn === undefined) {\n throw new Error(\"Private didnt receive buildingFn argument\");\n }\n }\n\n public get<R extends unknown[], CT = null>(\n ...args: R\n ): CT extends null ? T : CT {\n return this.buildingFn(...args) as CT extends null ? T : CT;\n }\n}\n"],"names":["__publicField","value"],"mappings":";;AAcgB,SAAA,IAAA,CAAQ,MAAS,KAAqB,EAAA;AACpD,EAAA,IAAI,SAAS,MAAW,EAAA;AACtB,IAAM,MAAA,IAAI,MAAM,kCAAkC,CAAA;AAAA;AAEpD,EAA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MAAM,MAAA,IAAI,MAAM,wBAAwB,CAAA;AAAA;AAC1C;AAEJ;;ACjBO,MAAM,YAA0C,CAAA;AAAA,EAC9C,WACG,CAAA,aAAA,EACA,OAAmC,GAAA,EAC3C,EAAA;AAFQ,IAAA,IAAA,CAAA,aAAA,GAAA,aAAA;AACA,IAAA,IAAA,CAAA,OAAA,GAAA,OAAA;AAER,IAAA,IAAI,kBAAkB,MAAW,EAAA;AAC/B,MAAM,MAAA,IAAI,MAAM,mDAAmD,CAAA;AAAA;AACrE;AACF,EAEO,OACF,IACuB,EAAA;AAC1B,IAAA,OAAO,IAAK,IAAK,CAAA,aAAA;AAAA,MACf,GAAG,IAAA;AAAA,MACH,IAAK,CAAA;AAAA,KACP;AAAA;AAEJ;;ACrBO,MAAM,OAAqC,CAAA;AAAA,EACzC,YAAoB,UAAmC,EAAA;AAAnC,IAAA,IAAA,CAAA,UAAA,GAAA,UAAA;AACzB,IAAA,IAAI,eAAe,MAAW,EAAA;AAC5B,MAAM,MAAA,IAAI,MAAM,2CAA2C,CAAA;AAAA;AAC7D;AACF,EAEO,OACF,IACuB,EAAA;AAC1B,IAAO,OAAA,IAAA,CAAK,UAAW,CAAA,GAAG,IAAI,CAAA;AAAA;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -191,17 +191,18 @@ type SourceExecutorType<T> = (guest: GuestType<T>) => unknown;
191
191
  interface SourceObjectType<T> {
192
192
  value: SourceExecutorType<T>;
193
193
  }
194
- type SourceType<T = any> = SourceExecutorType<T> | SourceObjectType<T>;
194
+ type SourceDataType = string | number | boolean | Date | object | Array<unknown> | symbol;
195
+ type SourceType<T = any> = SourceExecutorType<T> | SourceObjectType<T> | SourceDataType;
195
196
  /**
196
197
  * @url https://silentium-lab.github.io/silentium/#/utils/value
197
198
  */
198
- declare function value<T>(source: SourceType<T>, guest: GuestType<T>): unknown;
199
+ declare function value<T>(source: SourceType<T>, guest: GuestType<T>): any;
199
200
  /**
200
201
  * @url https://silentium-lab.github.io/silentium/#/utils/is-source
201
202
  */
202
203
  declare function isSource(mbSource: any): mbSource is SourceType;
203
204
  /**
204
- * @url https://silentium-lab.github.io/silentium/#/guest/source
205
+ * @url https://silentium-lab.github.io/silentium/#/source
205
206
  */
206
207
  declare class Source<T = any> implements SourceObjectType<T> {
207
208
  private source;
@@ -218,7 +219,7 @@ interface SourceAllType<T = any> extends SourceObjectType<T> {
218
219
  guestKey<R>(key: string): GuestObjectType<R>;
219
220
  }
220
221
  /**
221
- * @url https://silentium-lab.github.io/silentium/#/guest/source-all
222
+ * @url https://silentium-lab.github.io/silentium/#/source/source-all
222
223
  */
223
224
  declare class SourceAll<T> implements SourceAllType<T> {
224
225
  private theAll;
@@ -245,7 +246,7 @@ declare class Private<T> implements PrivateType<T> {
245
246
  }
246
247
 
247
248
  /**
248
- * @url https://silentium-lab.github.io/silentium/#/guest/source-sequence
249
+ * @url https://silentium-lab.github.io/silentium/#/source/source-sequence
249
250
  */
250
251
  declare class SourceSequence<T, TG> implements SourceObjectType<TG[]> {
251
252
  private baseSource;
@@ -255,7 +256,7 @@ declare class SourceSequence<T, TG> implements SourceObjectType<TG[]> {
255
256
  }
256
257
 
257
258
  /**
258
- * @url https://silentium-lab.github.io/silentium/#/guest/source-map
259
+ * @url https://silentium-lab.github.io/silentium/#/source/source-map
259
260
  */
260
261
  declare class SourceMap<T, TG> implements SourceObjectType<TG[]> {
261
262
  private baseSource;
@@ -265,7 +266,7 @@ declare class SourceMap<T, TG> implements SourceObjectType<TG[]> {
265
266
  }
266
267
 
267
268
  /**
268
- * @url https://silentium-lab.github.io/silentium/#/guest/source-race
269
+ * @url https://silentium-lab.github.io/silentium/#/source/source-race
269
270
  */
270
271
  declare class SourceRace<T> implements SourceObjectType<T> {
271
272
  private sources;
@@ -277,7 +278,7 @@ interface PoolAwareType<T = any> {
277
278
  pool(): PatronPool<T>;
278
279
  }
279
280
  /**
280
- * @url https://silentium-lab.github.io/silentium/#/source-with-pool
281
+ * @url https://silentium-lab.github.io/silentium/#/source/source-with-pool
281
282
  */
282
283
  type SourceWithPoolType<T = any> = SourceObjectType<T> & GuestObjectType<T> & PoolAwareType<T>;
283
284
  declare class SourceWithPool<T> implements SourceWithPoolType<T> {
@@ -293,7 +294,7 @@ declare class SourceWithPool<T> implements SourceWithPoolType<T> {
293
294
  }
294
295
 
295
296
  /**
296
- * @url https://silentium-lab.github.io/silentium/#/source-dynamic
297
+ * @url https://silentium-lab.github.io/silentium/#/source/source-dynamic
297
298
  */
298
299
  declare class SourceDynamic<T = unknown> implements SourceWithPoolType<T> {
299
300
  private baseGuest;
@@ -333,6 +334,17 @@ declare class SourceOnce<T> implements SourceWithPoolType<T> {
333
334
  pool(): PatronPool<T>;
334
335
  }
335
336
 
337
+ /**
338
+ * @url https://silentium-lab.github.io/silentium/#/source/source-sync
339
+ */
340
+ declare class SourceSync<T> implements SourceObjectType<T> {
341
+ private baseSource;
342
+ private syncGuest;
343
+ constructor(baseSource: SourceType<T>);
344
+ value(guest: GuestType<T>): this;
345
+ syncValue(): {} | null;
346
+ }
347
+
336
348
  interface Prototyped<T> {
337
349
  prototype: T;
338
350
  }
@@ -343,4 +355,4 @@ declare class PrivateClass<T> implements PrivateType<T> {
343
355
  get<R extends unknown[], CT = null>(...args: R): CT extends null ? T : CT;
344
356
  }
345
357
 
346
- export { Guest, GuestApplied, GuestCast, GuestDisposable, type GuestDisposableType, GuestExecutorApplied, type GuestExecutorType, GuestObject, type GuestObjectType, GuestPool, GuestSync, type GuestType, type GuestValueType, type MaybeDisposableType, Patron, PatronApplied, PatronExecutorApplied, PatronOnce, PatronPool, type PoolAwareType, type PoolType, Private, PrivateClass, type PrivateType, Source, SourceAll, type SourceAllType, SourceApplied, SourceDynamic, SourceExecutorApplied, type SourceExecutorType, SourceMap, type SourceObjectType, SourceOnce, SourceRace, SourceSequence, type SourceType, SourceWithPool, type SourceWithPoolType, give, isGuest, isPatron, isPatronInPools, isSource, patronPools, removePatronFromPools, sourceOf, value };
358
+ export { Guest, GuestApplied, GuestCast, GuestDisposable, type GuestDisposableType, GuestExecutorApplied, type GuestExecutorType, GuestObject, type GuestObjectType, GuestPool, GuestSync, type GuestType, type GuestValueType, type MaybeDisposableType, Patron, PatronApplied, PatronExecutorApplied, PatronOnce, PatronPool, type PoolAwareType, type PoolType, Private, PrivateClass, type PrivateType, Source, SourceAll, type SourceAllType, SourceApplied, type SourceDataType, SourceDynamic, SourceExecutorApplied, type SourceExecutorType, SourceMap, type SourceObjectType, SourceOnce, SourceRace, SourceSequence, SourceSync, type SourceType, SourceWithPool, type SourceWithPoolType, give, isGuest, isPatron, isPatronInPools, isSource, patronPools, removePatronFromPools, sourceOf, value };