@raphy-js/raph 1.0.0-dev.2 → 1.0.1-dev.20

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 (211) hide show
  1. package/README.md +1096 -0
  2. package/dist/api/Raph.d.ts +59 -190
  3. package/dist/api/RaphFacadeSession.d.ts +90 -0
  4. package/dist/api/RaphReactivityInstance.d.ts +72 -0
  5. package/dist/api/errors.d.ts +9 -4
  6. package/dist/api/types.d.ts +162 -17
  7. package/dist/core-CyilRD7s.js +1055 -0
  8. package/dist/core-ugchZNqC.cjs +1 -0
  9. package/dist/debug/api/Raph.cjs +1 -1
  10. package/dist/debug/api/Raph.js +368 -366
  11. package/dist/debug/api/RaphFacadeSession.cjs +1 -0
  12. package/dist/debug/api/RaphFacadeSession.js +306 -0
  13. package/dist/debug/api/RaphReactivityInstance.cjs +1 -0
  14. package/dist/debug/api/RaphReactivityInstance.js +149 -0
  15. package/dist/debug/api/errors.cjs +1 -1
  16. package/dist/debug/api/errors.js +10 -7
  17. package/dist/debug/path/DataPath.cjs +1 -0
  18. package/dist/debug/path/{data-path.js → DataPath.js} +151 -180
  19. package/dist/debug/path/PathRouter.cjs +1 -0
  20. package/dist/debug/path/{path-router.js → PathRouter.js} +1 -1
  21. package/dist/debug/path/RaphKernel.cjs +1 -1
  22. package/dist/debug/path/RaphKernel.js +258 -207
  23. package/dist/debug/path/data-path.utils.cjs +1 -0
  24. package/dist/debug/path/data-path.utils.js +56 -0
  25. package/dist/debug/path/derived/DerivedRegistry.cjs +1 -0
  26. package/dist/debug/path/{DerivedRegistry.js → derived/DerivedRegistry.js} +5 -5
  27. package/dist/debug/path/derived/derived-collection.utils.cjs +1 -0
  28. package/dist/debug/path/{derived-collection.js → derived/derived-collection.utils.js} +1 -1
  29. package/dist/debug/path/derived/derived-strategy.types.cjs +1 -0
  30. package/dist/debug/path/derived/derived-strategy.types.js +1 -0
  31. package/dist/debug/path/{MetaController.cjs → meta/MetaController.cjs} +1 -1
  32. package/dist/debug/path/{MetaController.js → meta/MetaController.js} +3 -3
  33. package/dist/debug/path/meta/RaphMetaStore.cjs +1 -0
  34. package/dist/debug/path/{RaphMetaStore.js → meta/RaphMetaStore.js} +1 -1
  35. package/dist/debug/path/meta/meta.types.cjs +1 -0
  36. package/dist/debug/path/meta/meta.types.js +1 -0
  37. package/dist/debug/path/storage/AdapterPathStore.cjs +1 -0
  38. package/dist/debug/path/{AdapterPathStore.js → storage/AdapterPathStore.js} +9 -9
  39. package/dist/debug/path/storage/DefaultDataAdapter.cjs +1 -0
  40. package/dist/debug/path/{data-adapter.js → storage/DefaultDataAdapter.js} +2 -2
  41. package/dist/debug/path/storage/PathEventHub.cjs +1 -0
  42. package/dist/debug/path/{PathEventHub.js → storage/PathEventHub.js} +34 -34
  43. package/dist/debug/path/storage/PathStore.cjs +1 -0
  44. package/dist/debug/path/{PathStore.js → storage/PathStore.js} +28 -28
  45. package/dist/debug/path/storage/data-adapter.types.cjs +1 -0
  46. package/dist/debug/path/storage/data-adapter.types.js +1 -0
  47. package/dist/debug/reactivity/engine.cjs +1 -1
  48. package/dist/debug/reactivity/engine.js +478 -306
  49. package/dist/debug/reactivity/reactive-object.cjs +1 -0
  50. package/dist/debug/reactivity/reactive-object.js +280 -0
  51. package/dist/debug/runtime/RaphRuntime.cjs +1 -1
  52. package/dist/debug/runtime/RaphRuntime.js +798 -519
  53. package/dist/debug/runtime/diagnostics/RaphDebug.cjs +1 -0
  54. package/dist/debug/runtime/diagnostics/RaphDebug.js +297 -0
  55. package/dist/debug/runtime/errors.cjs +1 -1
  56. package/dist/debug/runtime/errors.js +6 -3
  57. package/dist/debug/runtime/ownership/RaphEffectScope.cjs +1 -0
  58. package/dist/debug/runtime/ownership/RaphEffectScope.js +171 -0
  59. package/dist/debug/runtime/ownership/RaphNode.cjs +1 -0
  60. package/dist/debug/runtime/ownership/RaphNode.js +206 -0
  61. package/dist/debug/runtime/ownership/RaphScope.cjs +1 -0
  62. package/dist/debug/runtime/ownership/RaphScope.js +101 -0
  63. package/dist/debug/runtime/ownership/parent-graph.types.cjs +1 -0
  64. package/dist/debug/runtime/ownership/parent-graph.types.js +1 -0
  65. package/dist/debug/runtime/phases/RaphPhasePipeline.cjs +1 -0
  66. package/dist/debug/runtime/phases/RaphPhasePipeline.js +587 -0
  67. package/dist/debug/runtime/phases/orderPhaseTasks.cjs +1 -0
  68. package/dist/debug/runtime/phases/orderPhaseTasks.js +59 -0
  69. package/dist/debug/runtime/reactivity/PathHandle.cjs +1 -0
  70. package/dist/debug/runtime/{PathHandle.js → reactivity/PathHandle.js} +75 -39
  71. package/dist/debug/runtime/reactivity/RaphMetaSource.cjs +1 -0
  72. package/dist/debug/runtime/reactivity/RaphMetaSource.js +112 -0
  73. package/dist/debug/runtime/reactivity/RaphWorkGraph.cjs +1 -0
  74. package/dist/debug/runtime/reactivity/RaphWorkGraph.js +995 -0
  75. package/dist/debug/runtime/reactivity/RuntimeReactivity.cjs +1 -0
  76. package/dist/debug/runtime/reactivity/RuntimeReactivity.js +156 -0
  77. package/dist/debug/runtime/reactivity/RuntimeWatch.cjs +1 -0
  78. package/dist/debug/runtime/reactivity/RuntimeWatch.js +88 -0
  79. package/dist/debug/runtime/reactivity/runtime-reactivity.types.cjs +1 -0
  80. package/dist/debug/runtime/reactivity/runtime-reactivity.types.js +1 -0
  81. package/dist/entrypoints/machine-testing.d.ts +2 -0
  82. package/dist/entrypoints/machine.d.ts +5 -0
  83. package/dist/entrypoints/path.d.ts +14 -0
  84. package/dist/entrypoints/reactivity.d.ts +1 -0
  85. package/dist/entrypoints/runtime.d.ts +17 -0
  86. package/dist/index.cjs +1 -1
  87. package/dist/index.js +46 -38
  88. package/dist/machine/compiler.d.ts +71 -0
  89. package/dist/machine/core.d.ts +50 -0
  90. package/dist/machine/persistence.d.ts +5 -0
  91. package/dist/machine/runtime.d.ts +4 -0
  92. package/dist/machine/testing.d.ts +43 -0
  93. package/dist/machine/types.d.ts +155 -0
  94. package/dist/machine-testing.cjs +1 -0
  95. package/dist/machine-testing.js +188 -0
  96. package/dist/machine.cjs +1 -0
  97. package/dist/machine.js +837 -0
  98. package/dist/main.d.ts +20 -0
  99. package/dist/path/{data-path.d.ts → DataPath.d.ts} +16 -40
  100. package/dist/path/{path-router.d.ts → PathRouter.d.ts} +1 -1
  101. package/dist/path/RaphKernel.d.ts +13 -10
  102. package/dist/path/data-path.types.d.ts +34 -0
  103. package/dist/path/data-path.utils.d.ts +9 -0
  104. package/dist/path/{DerivedRegistry.d.ts → derived/DerivedRegistry.d.ts} +2 -2
  105. package/dist/path/{RaphDerivedHandle.d.ts → derived/RaphDerivedHandle.d.ts} +3 -3
  106. package/dist/path/derived/derived-collection.types.d.ts +12 -0
  107. package/dist/path/{derived-collection.d.ts → derived/derived-collection.utils.d.ts} +3 -13
  108. package/dist/path/{derived-strategies.d.ts → derived/derived-strategy.types.d.ts} +0 -3
  109. package/dist/path/derived/derived-strategy.utils.d.ts +4 -0
  110. package/dist/path/{MetaController.d.ts → meta/MetaController.d.ts} +4 -4
  111. package/dist/path/{RaphMeta.d.ts → meta/RaphMeta.d.ts} +2 -2
  112. package/dist/path/{RaphMetaStore.d.ts → meta/RaphMetaStore.d.ts} +1 -1
  113. package/dist/path/{meta.types.d.ts → meta/meta.types.d.ts} +2 -4
  114. package/dist/path/path.types.d.ts +3 -2
  115. package/dist/path/{segment-key.d.ts → pathSegmentKey.d.ts} +1 -1
  116. package/dist/path/{AdapterPathStore.d.ts → storage/AdapterPathStore.d.ts} +4 -4
  117. package/dist/path/{data-adapter.d.ts → storage/DefaultDataAdapter.d.ts} +2 -17
  118. package/dist/path/{PathEventHub.d.ts → storage/PathEventHub.d.ts} +9 -9
  119. package/dist/path/{PathStore.d.ts → storage/PathStore.d.ts} +3 -3
  120. package/dist/path/storage/data-adapter.types.d.ts +17 -0
  121. package/dist/path.cjs +1 -1
  122. package/dist/path.js +16 -16
  123. package/dist/raph.cjs +1 -1
  124. package/dist/raph.js +46 -38
  125. package/dist/reactivity/engine.d.ts +17 -3
  126. package/dist/reactivity/reactive-object.d.ts +36 -0
  127. package/dist/reactivity/types.d.ts +25 -0
  128. package/dist/reactivity.cjs +1 -1
  129. package/dist/reactivity.js +12 -12
  130. package/dist/runtime/RaphRuntime.d.ts +132 -192
  131. package/dist/runtime/diagnostics/RaphDebug.d.ts +239 -0
  132. package/dist/runtime/errors.d.ts +5 -0
  133. package/dist/runtime/ownership/RaphEffectScope.d.ts +29 -0
  134. package/dist/runtime/ownership/RaphNode.d.ts +40 -0
  135. package/dist/runtime/ownership/RaphScope.d.ts +38 -0
  136. package/dist/runtime/{parent-graph.d.ts → ownership/parent-graph.types.d.ts} +0 -1
  137. package/dist/runtime/ownership/parentGraph.d.ts +3 -0
  138. package/dist/runtime/phases/RaphPhasePipeline.d.ts +79 -0
  139. package/dist/runtime/phases/orderPhaseTasks.d.ts +6 -0
  140. package/dist/runtime/phases/phase.types.d.ts +92 -0
  141. package/dist/runtime/{PathHandle.d.ts → reactivity/PathHandle.d.ts} +14 -6
  142. package/dist/runtime/reactivity/RaphMetaSource.d.ts +32 -0
  143. package/dist/runtime/reactivity/RaphWorkGraph.d.ts +171 -0
  144. package/dist/runtime/{RuntimeReactivity.d.ts → reactivity/RuntimeReactivity.d.ts} +14 -9
  145. package/dist/runtime/{RuntimeWatch.d.ts → reactivity/RuntimeWatch.d.ts} +9 -3
  146. package/dist/runtime/{runtime-reactivity.types.d.ts → reactivity/runtime-reactivity.types.d.ts} +3 -1
  147. package/dist/runtime.cjs +1 -1
  148. package/dist/runtime.js +21 -16
  149. package/package.json +68 -35
  150. package/ReadMe.md +0 -153
  151. package/dist/api/public.d.ts +0 -22
  152. package/dist/debug/api/public.cjs +0 -1
  153. package/dist/debug/api/public.js +0 -40
  154. package/dist/debug/path/AdapterPathStore.cjs +0 -1
  155. package/dist/debug/path/DerivedRegistry.cjs +0 -1
  156. package/dist/debug/path/PathEventHub.cjs +0 -1
  157. package/dist/debug/path/PathStore.cjs +0 -1
  158. package/dist/debug/path/RaphMetaStore.cjs +0 -1
  159. package/dist/debug/path/data-adapter.cjs +0 -1
  160. package/dist/debug/path/data-path.cjs +0 -1
  161. package/dist/debug/path/derived-collection.cjs +0 -1
  162. package/dist/debug/path/path-router.cjs +0 -1
  163. package/dist/debug/path/public.cjs +0 -1
  164. package/dist/debug/path/public.js +0 -18
  165. package/dist/debug/runtime/PathHandle.cjs +0 -1
  166. package/dist/debug/runtime/RaphDebug.cjs +0 -1
  167. package/dist/debug/runtime/RaphDebug.js +0 -15
  168. package/dist/debug/runtime/RaphNode.cjs +0 -1
  169. package/dist/debug/runtime/RaphNode.js +0 -143
  170. package/dist/debug/runtime/RaphPhasePipeline.cjs +0 -1
  171. package/dist/debug/runtime/RaphPhasePipeline.js +0 -526
  172. package/dist/debug/runtime/RaphScope.cjs +0 -1
  173. package/dist/debug/runtime/RaphScope.js +0 -64
  174. package/dist/debug/runtime/RuntimeReactivity.cjs +0 -1
  175. package/dist/debug/runtime/RuntimeReactivity.js +0 -154
  176. package/dist/debug/runtime/RuntimeWatch.cjs +0 -1
  177. package/dist/debug/runtime/RuntimeWatch.js +0 -71
  178. package/dist/debug/runtime/public.cjs +0 -1
  179. package/dist/debug/runtime/public.js +0 -18
  180. package/dist/path/public.d.ts +0 -14
  181. package/dist/runtime/RaphDebug.d.ts +0 -32
  182. package/dist/runtime/RaphNode.d.ts +0 -68
  183. package/dist/runtime/RaphPhasePipeline.d.ts +0 -133
  184. package/dist/runtime/RaphScope.d.ts +0 -50
  185. package/dist/runtime/phase.types.d.ts +0 -49
  186. package/dist/runtime/public.d.ts +0 -13
  187. /package/dist/debug/path/{meta.types.cjs → data-path.types.cjs} +0 -0
  188. /package/dist/debug/path/{meta.types.js → data-path.types.js} +0 -0
  189. /package/dist/debug/path/{RaphDerivedHandle.cjs → derived/RaphDerivedHandle.cjs} +0 -0
  190. /package/dist/debug/path/{RaphDerivedHandle.js → derived/RaphDerivedHandle.js} +0 -0
  191. /package/dist/debug/{runtime/runtime-reactivity.types.cjs → path/derived/derived-collection.types.cjs} +0 -0
  192. /package/dist/debug/{runtime/runtime-reactivity.types.js → path/derived/derived-collection.types.js} +0 -0
  193. /package/dist/debug/path/{derived-strategies.cjs → derived/derived-strategy.utils.cjs} +0 -0
  194. /package/dist/debug/path/{derived-strategies.js → derived/derived-strategy.utils.js} +0 -0
  195. /package/dist/debug/path/{RaphMeta.cjs → meta/RaphMeta.cjs} +0 -0
  196. /package/dist/debug/path/{RaphMeta.js → meta/RaphMeta.js} +0 -0
  197. /package/dist/debug/path/{segment-key.cjs → pathSegmentKey.cjs} +0 -0
  198. /package/dist/debug/path/{segment-key.js → pathSegmentKey.js} +0 -0
  199. /package/dist/debug/path/{data-draft.cjs → storage/createDataDraft.cjs} +0 -0
  200. /package/dist/debug/path/{data-draft.js → storage/createDataDraft.js} +0 -0
  201. /package/dist/debug/runtime/{parent-graph.cjs → ownership/parentGraph.cjs} +0 -0
  202. /package/dist/debug/runtime/{parent-graph.js → ownership/parentGraph.js} +0 -0
  203. /package/dist/debug/runtime/{disposal.cjs → ownership/throwDisposalErrors.cjs} +0 -0
  204. /package/dist/debug/runtime/{disposal.js → ownership/throwDisposalErrors.js} +0 -0
  205. /package/dist/debug/runtime/{RaphFrameLoop.cjs → phases/RaphFrameLoop.cjs} +0 -0
  206. /package/dist/debug/runtime/{RaphFrameLoop.js → phases/RaphFrameLoop.js} +0 -0
  207. /package/dist/debug/runtime/{phase.types.cjs → phases/phase.types.cjs} +0 -0
  208. /package/dist/debug/runtime/{phase.types.js → phases/phase.types.js} +0 -0
  209. /package/dist/path/{data-draft.d.ts → storage/createDataDraft.d.ts} +0 -0
  210. /package/dist/runtime/{disposal.d.ts → ownership/throwDisposalErrors.d.ts} +0 -0
  211. /package/dist/runtime/{RaphFrameLoop.d.ts → phases/RaphFrameLoop.d.ts} +0 -0
@@ -1,41 +1,43 @@
1
1
  var F = Object.defineProperty;
2
- var R = (f, e, t) => e in f ? F(f, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : f[e] = t;
3
- var p = (f, e, t) => R(f, typeof e != "symbol" ? e + "" : e, t);
4
- import { AdapterPathStore as b } from "./AdapterPathStore.js";
5
- import { DefaultDataAdapter as O } from "./data-adapter.js";
6
- import { parseDataPath as k, DataPath as W } from "./data-path.js";
7
- import { validateFullFilter as S, cloneMaterializedValue as z, validateFullCollection as K, collectionIndex as w, collectionError as M, indexesAreStale as P, validateIncrementalCollection as q, collectionKeys as C, keyedPath as A, filterError as I, validateIncrementalFilter as N } from "./derived-collection.js";
8
- import { DerivedRegistry as $ } from "./DerivedRegistry.js";
9
- import { MetaController as j } from "./MetaController.js";
10
- import { PathStore as L } from "./PathStore.js";
11
- import { RaphDerivedHandle as B, RaphDerivedTargetWriteError as H } from "./RaphDerivedHandle.js";
12
- const x = class x {
2
+ var O = (_, e, t) => e in _ ? F(_, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : _[e] = t;
3
+ var y = (_, e, t) => O(_, typeof e != "symbol" ? e + "" : e, t);
4
+ import { parseDataPath as w } from "./data-path.utils.js";
5
+ import { DataPath as T } from "./DataPath.js";
6
+ import { validateFullFilter as S, cloneMaterializedValue as C, validateFullCollection as W, collectionIndex as k, collectionError as b, indexesAreStale as z, validateIncrementalCollection as B, collectionKeys as x, keyedPath as A, filterError as P, validateIncrementalFilter as K } from "./derived/derived-collection.utils.js";
7
+ import { DerivedRegistry as q } from "./derived/DerivedRegistry.js";
8
+ import { RaphDerivedHandle as N, RaphDerivedTargetWriteError as $ } from "./derived/RaphDerivedHandle.js";
9
+ import { MetaController as j } from "./meta/MetaController.js";
10
+ import { AdapterPathStore as R } from "./storage/AdapterPathStore.js";
11
+ import { DefaultDataAdapter as L } from "./storage/DefaultDataAdapter.js";
12
+ import { PathStore as H } from "./storage/PathStore.js";
13
+ const M = class M {
13
14
  /**
14
15
  * Создаёт data/meta owner с независимым lifecycle и derived registry.
15
16
  */
16
17
  constructor(e = {}) {
17
18
  // Публикует стабильную identity data/meta owner.
18
- p(this, "id");
19
+ y(this, "id");
19
20
  // Лениво создают независимые data, derived, runtime и metadata controllers.
20
- p(this, "_paths");
21
- p(this, "_derivedController");
22
- p(this, "_runtimes");
23
- p(this, "_metaController");
24
- // Защищают transaction stabilization и записи в derived targets.
25
- p(this, "_transactionDepth", 0);
26
- p(this, "_stabilizing", !1);
27
- p(this, "_derivedWriteDepth", 0);
28
- if (this.id = e.id ?? `kernel-${x._kernelCounter++}`, e.adapter !== void 0) {
21
+ y(this, "_paths");
22
+ y(this, "_derivedController");
23
+ y(this, "_runtimes");
24
+ y(this, "_metaController");
25
+ // Защищают batch stabilization и записи в derived targets.
26
+ y(this, "_batchDepth", 0);
27
+ y(this, "_runtimeMutationDepth", 0);
28
+ y(this, "_stabilizing", !1);
29
+ y(this, "_derivedWriteDepth", 0);
30
+ if (this.id = e.id ?? `kernel-${M._kernelCounter++}`, e.adapter !== void 0) {
29
31
  if (e.initial !== void 0 || e.adapterOptions !== void 0)
30
32
  throw new TypeError("[Raph] A custom adapter cannot be combined with initial or adapterOptions.");
31
- this._paths = new b(e.adapter);
33
+ this._paths = new R(e.adapter);
32
34
  } else if (e.adapterOptions !== void 0)
33
- this._paths = new b(new O(
35
+ this._paths = new R(new L(
34
36
  e.initial,
35
37
  e.adapterOptions
36
38
  ));
37
39
  else {
38
- const t = this._paths = new L();
40
+ const t = this._paths = new H();
39
41
  e.initial !== void 0 && t.set("", e.initial);
40
42
  }
41
43
  }
@@ -81,6 +83,10 @@ const x = class x {
81
83
  */
82
84
  set(e, t, r) {
83
85
  var s;
86
+ if (this._runtimeMutationDepth === 0 && this._runtimes !== void 0) {
87
+ this._withAttachedRuntimeBoundary(() => this.set(e, t, r));
88
+ return;
89
+ }
84
90
  this._assertWritablePath("set", e, t, r);
85
91
  const i = this._store;
86
92
  if ((((s = this._metaController) == null ? void 0 : s.size) ?? 0) === 0) {
@@ -100,6 +106,10 @@ const x = class x {
100
106
  */
101
107
  merge(e, t, r) {
102
108
  var s;
109
+ if (this._runtimeMutationDepth === 0 && this._runtimes !== void 0) {
110
+ this._withAttachedRuntimeBoundary(() => this.merge(e, t, r));
111
+ return;
112
+ }
103
113
  this._assertWritablePath("merge", e, t, r);
104
114
  const i = this._store;
105
115
  if ((((s = this._metaController) == null ? void 0 : s.size) ?? 0) === 0) {
@@ -119,6 +129,10 @@ const x = class x {
119
129
  */
120
130
  delete(e, t) {
121
131
  var i;
132
+ if (this._runtimeMutationDepth === 0 && this._runtimes !== void 0) {
133
+ this._withAttachedRuntimeBoundary(() => this.delete(e, t));
134
+ return;
135
+ }
122
136
  this._assertWritablePath("delete", e, void 0, t);
123
137
  const r = this._store;
124
138
  if ((((i = this._metaController) == null ? void 0 : i.size) ?? 0) === 0) {
@@ -136,36 +150,24 @@ const x = class x {
136
150
  });
137
151
  }
138
152
  /**
139
- * Выполняет операцию в общей синхронной transaction boundary.
153
+ * Выполняет операцию в общей синхронной batch boundary.
140
154
  */
141
- transaction(e) {
142
- var c, l, v, _;
155
+ batch(e) {
156
+ var o;
157
+ if (this._runtimeMutationDepth === 0 && this._runtimes !== void 0)
158
+ return this._withAttachedRuntimeBoundary(() => this.batch(e));
143
159
  const t = this._store;
144
- if (this._derivedController === void 0 && !((c = this._metaController) != null && c.hasWatchers))
145
- return t.transaction(e);
146
- const r = this._transactionDepth === 0 && ((l = this._metaController) != null && l.hasDeferredWatchers) && this._runtimes !== void 0 ? [...this._runtimes] : void 0;
147
- if (r !== void 0)
148
- for (const o of r)
149
- (v = o._beginKernelTransaction) == null || v.call(o);
150
- let i, s, a = !1;
160
+ if (this._derivedController === void 0 && !((o = this._metaController) != null && o.hasWatchers))
161
+ return t.batch(e);
162
+ let r, i, s = !1;
151
163
  try {
152
- i = t.transaction(() => this._runDerivedTransaction(e));
153
- } catch (o) {
154
- a = !0, s = o;
164
+ r = t.batch(() => this._runDerivedBatch(e));
165
+ } catch (h) {
166
+ s = !0, i = h;
155
167
  }
156
- const d = [];
157
- if (a && d.push(s), r !== void 0)
158
- for (const o of r)
159
- try {
160
- (_ = o._endKernelTransaction) == null || _.call(o);
161
- } catch (m) {
162
- d.push(m);
163
- }
164
- if (d.length === 1)
165
- throw d[0];
166
- if (d.length > 1)
167
- throw new AggregateError(d, "[Raph] Kernel transaction execution failed.");
168
- return i;
168
+ if (s)
169
+ throw i;
170
+ return r;
169
171
  }
170
172
  /**
171
173
  * Подписывает callback на подходящие изменения и возвращает disposer.
@@ -191,6 +193,10 @@ const x = class x {
191
193
  * Записывает metadata указанного data-owner.
192
194
  */
193
195
  setMeta(e, t, r, i) {
196
+ if (this._runtimeMutationDepth === 0 && this._runtimes !== void 0) {
197
+ this._withAttachedRuntimeBoundary(() => this.setMeta(e, t, r, i));
198
+ return;
199
+ }
194
200
  this._assertMetaNamespace(t);
195
201
  const s = this._exactMetaPath(e, i);
196
202
  this._assertMetaOwner(s), this._metadata.set(s, t, r, i);
@@ -199,6 +205,10 @@ const x = class x {
199
205
  * Объединяет metadata указанного data-owner.
200
206
  */
201
207
  mergeMeta(e, t, r, i) {
208
+ if (this._runtimeMutationDepth === 0 && this._runtimes !== void 0) {
209
+ this._withAttachedRuntimeBoundary(() => this.mergeMeta(e, t, r, i));
210
+ return;
211
+ }
202
212
  this._assertMetaNamespace(t);
203
213
  const s = this._exactMetaPath(e, i);
204
214
  this._assertMetaOwner(s), this._metadata.merge(s, t, r, i);
@@ -208,6 +218,10 @@ const x = class x {
208
218
  */
209
219
  deleteMeta(e, t, r) {
210
220
  var s;
221
+ if (this._runtimeMutationDepth === 0 && this._runtimes !== void 0) {
222
+ this._withAttachedRuntimeBoundary(() => this.deleteMeta(e, t, r));
223
+ return;
224
+ }
211
225
  t !== void 0 && this._assertMetaNamespace(t);
212
226
  const i = this._exactMetaPath(e, r);
213
227
  (s = this._metaController) == null || s.delete(i, t, r);
@@ -223,26 +237,26 @@ const x = class x {
223
237
  * Создаёт управляемое derived-представление source path в target path.
224
238
  */
225
239
  derive(e) {
226
- var l, v, _;
240
+ var d, u, m;
227
241
  if (this._store, e.strategy !== void 0 && e.strategy.kind !== "full" && e.strategy.kind !== "collection-by-key" && e.strategy.kind !== "filter-by-key")
228
242
  throw new Error(`[Raph] Unsupported derived strategy "${String(e.strategy.kind)}".`);
229
- if (e.id !== void 0 && ((l = this._derivedController) != null && l.has(e.id)))
243
+ if (e.id !== void 0 && ((d = this._derivedController) != null && d.has(e.id)))
230
244
  throw new Error(`[Raph] Duplicate derived id "${e.id}".`);
231
- const t = k(e.from), r = k(e.to);
232
- if (T(t, r))
245
+ const t = w(e.from), r = w(e.to);
246
+ if (E(t, r))
233
247
  throw new Error("[Raph] Derived source and target must not overlap.");
234
- const i = this._derivedController ?? new $(), s = e.id ?? i.nextId(), a = {
248
+ const i = this._derivedController ?? new q(), s = e.id ?? i.nextId(), o = {
235
249
  ...e,
236
250
  from: t.canonical,
237
251
  to: r.canonical
238
- }, d = new B(this, s, a), c = ((v = e.strategy) == null ? void 0 : v.kind) === "collection-by-key" || ((_ = e.strategy) == null ? void 0 : _.kind) === "filter-by-key" ? e.strategy : void 0;
239
- this._derivedController = i, i.register(d, t, c);
252
+ }, h = new N(this, s, o), l = ((u = e.strategy) == null ? void 0 : u.kind) === "collection-by-key" || ((m = e.strategy) == null ? void 0 : m.kind) === "filter-by-key" ? e.strategy : void 0;
253
+ this._derivedController = i, i.register(h, t, l);
240
254
  try {
241
- e.immediate !== !1 && d.recompute();
242
- } catch (o) {
243
- throw this._removeDerived(d), d._disposeFromKernel(), o;
255
+ e.immediate !== !1 && h.recompute();
256
+ } catch (a) {
257
+ throw this._removeDerived(h), h._disposeFromKernel(), a;
244
258
  }
245
- return d;
259
+ return h;
246
260
  }
247
261
  /**
248
262
  * Регистрирует runtime, разделяющий этот Kernel.
@@ -309,21 +323,58 @@ const x = class x {
309
323
  return this._store, this._metaController ?? (this._metaController = new j(
310
324
  this,
311
325
  (e) => this.has(e),
312
- () => this._transactionDepth !== 0 || this._stabilizing
326
+ () => this._batchDepth !== 0 || this._stabilizing
313
327
  ));
314
328
  }
329
+ /** Keeps every attached Runtime quiescent until one Kernel publication completes. */
330
+ _withAttachedRuntimeBoundary(e) {
331
+ var h, l, d;
332
+ const t = this._runtimes === void 0 ? [] : [...this._runtimes];
333
+ if (t.length === 0)
334
+ return e();
335
+ const r = [], i = [];
336
+ let s, o = !1;
337
+ this._runtimeMutationDepth++;
338
+ try {
339
+ for (const u of t)
340
+ (h = u._beginKernelBatch) == null || h.call(u), r.push(u);
341
+ try {
342
+ s = e();
343
+ } catch (u) {
344
+ o = !0, i.push(u);
345
+ }
346
+ } catch (u) {
347
+ o = !0, i.push(u);
348
+ } finally {
349
+ this._runtimeMutationDepth--;
350
+ for (let u = r.length - 1; u >= 0; u--)
351
+ try {
352
+ (d = (l = r[u])._endKernelBatch) == null || d.call(l);
353
+ } catch (m) {
354
+ i.push(m);
355
+ }
356
+ }
357
+ if (i.length === 1)
358
+ throw i[0];
359
+ if (i.length > 1)
360
+ throw new AggregateError(
361
+ i,
362
+ o ? "[Raph] Kernel mutation and Runtime publication failed." : "[Raph] Runtime publication failed after a Kernel mutation."
363
+ );
364
+ return s;
365
+ }
315
366
  _assertWritablePath(e, t, r, i) {
316
367
  const s = this._derivedController;
317
368
  if (s === void 0 || this._derivedWriteDepth !== 0)
318
369
  return;
319
- const a = k(t, i);
320
- for (const d of s.values()) {
321
- const c = k(d.options.to);
322
- if (!T(a, c))
370
+ const o = w(t, i);
371
+ for (const h of s.values()) {
372
+ const l = w(h.options.to);
373
+ if (!E(o, l))
323
374
  continue;
324
- const l = a.segments.length < c.segments.length;
325
- if (!(e === "merge" && l && !U(r, c.segments[a.segments.length])))
326
- throw new H(a.canonical);
375
+ const d = o.segments.length < l.segments.length;
376
+ if (!(e === "merge" && d && !U(r, l.segments[o.segments.length])))
377
+ throw new $(o.canonical);
327
378
  }
328
379
  }
329
380
  _writeDerivedTarget(e, t) {
@@ -335,57 +386,57 @@ const x = class x {
335
386
  }
336
387
  }
337
388
  _mutateDerived(e, t, r, i, s) {
338
- const a = k(r, s);
339
- t === "delete" && !e.has(r, s) || e.transaction(() => {
340
- t === "set" ? e.set(r, i, s) : t === "merge" ? e.merge(r, i, s) : e.delete(r, s), this._queueDerived(a), this._transactionDepth === 0 && !this._stabilizing && this._stabilizeDerived();
389
+ const o = w(r, s);
390
+ t === "delete" && !e.has(r, s) || e.batch(() => {
391
+ t === "set" ? e.set(r, i, s) : t === "merge" ? e.merge(r, i, s) : e.delete(r, s), this._queueDerived(o), this._batchDepth === 0 && !this._stabilizing && this._stabilizeDerived();
341
392
  });
342
393
  }
343
- _runDerivedTransaction(e) {
344
- var v;
345
- let t = !1, r, i = !1, s, a = !1, d, c;
346
- this._transactionDepth++;
394
+ _runDerivedBatch(e) {
395
+ var u;
396
+ let t = !1, r, i = !1, s, o = !1, h, l;
397
+ this._batchDepth++;
347
398
  try {
348
- c = e();
349
- } catch (_) {
350
- t = !0, r = _;
399
+ l = e();
400
+ } catch (m) {
401
+ t = !0, r = m;
351
402
  } finally {
352
- if (this._transactionDepth--, this._transactionDepth === 0) {
403
+ if (this._batchDepth--, this._batchDepth === 0) {
353
404
  if (!this._stabilizing)
354
405
  try {
355
406
  this._stabilizeDerived();
356
- } catch (_) {
357
- i = !0, s = _;
407
+ } catch (m) {
408
+ i = !0, s = m;
358
409
  }
359
410
  try {
360
- (v = this._metaController) == null || v.publish();
361
- } catch (_) {
362
- a = !0, d = _;
411
+ (u = this._metaController) == null || u.publish();
412
+ } catch (m) {
413
+ o = !0, h = m;
363
414
  }
364
415
  }
365
416
  }
366
- const l = [];
367
- if (t && l.push(r), i && l.push(s), a && l.push(d), l.length > 1)
417
+ const d = [];
418
+ if (t && d.push(r), i && d.push(s), o && d.push(h), d.length > 1)
368
419
  throw new AggregateError(
369
- l,
370
- "[Raph] Kernel transaction publication failed."
420
+ d,
421
+ "[Raph] Kernel batch publication failed."
371
422
  );
372
- if (l.length === 1)
373
- throw l[0];
374
- return c;
423
+ if (d.length === 1)
424
+ throw d[0];
425
+ return l;
375
426
  }
376
427
  _mutateWithMetaLifecycle(e) {
377
- if (this._transactionDepth !== 0 || this._stabilizing) {
428
+ if (this._batchDepth !== 0 || this._stabilizing) {
378
429
  e();
379
430
  return;
380
431
  }
381
- this.transaction(e);
432
+ this.batch(e);
382
433
  }
383
434
  _pruneMissingMetaOwners(e, t, r) {
384
435
  var i;
385
436
  (i = this._metaController) == null || i.pruneMissing(this._metaPath(e, r), t);
386
437
  }
387
438
  _metaPath(e, t) {
388
- return W.from(e, t);
439
+ return T.from(e, t);
389
440
  }
390
441
  _exactMetaPath(e, t) {
391
442
  const r = this._metaPath(e, t);
@@ -410,7 +461,7 @@ const x = class x {
410
461
  (r = this._derivedController) == null || r.queueReplacement(e, t);
411
462
  }
412
463
  _replaceDerivedTarget(e, t, r) {
413
- const i = k(e);
464
+ const i = w(e);
414
465
  this._store.set(i.canonical, t), this._queueDerivedReplacement(i, r);
415
466
  }
416
467
  _stabilizeDerived() {
@@ -448,61 +499,61 @@ const x = class x {
448
499
  t.kind === "filter-by-key" ? this._recomputeDerivedFilter(e, t) : this._recomputeDerivedCollection(e, t);
449
500
  }
450
501
  _recomputeDerivedFull(e) {
451
- var c;
452
- const t = (c = this._derivedController) == null ? void 0 : c.state(e);
502
+ var l;
503
+ const t = (l = this._derivedController) == null ? void 0 : l.state(e);
453
504
  t !== void 0 && (t.full = !0);
454
505
  const r = this.get(e.options.from), i = e.options.compute(r);
455
- let s = i, a, d;
456
- t !== void 0 && (r === void 0 && (i === void 0 || Array.isArray(i) && i.length === 0) ? (a = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map()) : (t.kind === "filter-by-key" ? (S(e.id, t.key, r, i), s = z(i)) : K(e.id, t.key, r, i), a = w(r, t.key, "source"), d = w(s, t.key, "output"))), this._writeDerivedTarget(e.options.to, s), t !== void 0 && (t.sourceIndex = a, t.targetIndex = d, t.initialized = !0, t.full = !1, t.keys.clear());
506
+ let s = i, o, h;
507
+ t !== void 0 && (r === void 0 && (i === void 0 || Array.isArray(i) && i.length === 0) ? (o = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map()) : (t.kind === "filter-by-key" ? (S(e.id, t.key, r, i), s = C(i)) : W(e.id, t.key, r, i), o = k(r, t.key, "source"), h = k(s, t.key, "output"))), this._writeDerivedTarget(e.options.to, s), t !== void 0 && (t.sourceIndex = o, t.targetIndex = h, t.initialized = !0, t.full = !1, t.keys.clear());
457
508
  }
458
509
  _recomputeDerivedCollection(e, t) {
459
510
  t.full = !0;
460
511
  const r = this.get(e.options.from), i = this.get(e.options.to);
461
512
  if (!Array.isArray(r) || !Array.isArray(i))
462
- throw M(e.id, "requires array source and target");
463
- (t.sourceIndex === void 0 || P(r, t.key, t.sourceIndex, t.keys)) && (t.sourceIndex = w(r, t.key, "source"));
513
+ throw b(e.id, "requires array source and target");
514
+ (t.sourceIndex === void 0 || z(r, t.key, t.sourceIndex, t.keys)) && (t.sourceIndex = k(r, t.key, "source"));
464
515
  const s = t.targetIndex;
465
516
  if (s === void 0)
466
- throw M(e.id, "has no materialized target index");
467
- const a = [], d = [];
468
- for (const o of t.keys) {
469
- const m = t.sourceIndex.get(o);
470
- m === void 0 ? d.push(o) : a.push({ key: o, index: m, item: r[m] });
517
+ throw b(e.id, "has no materialized target index");
518
+ const o = [], h = [];
519
+ for (const a of t.keys) {
520
+ const g = t.sourceIndex.get(a);
521
+ g === void 0 ? h.push(a) : o.push({ key: a, index: g, item: r[g] });
471
522
  }
472
- a.sort((o, m) => o.index - m.index);
473
- const c = a.map((o) => o.item), l = c.length === 0 ? [] : e.options.compute(c);
474
- q(
523
+ o.sort((a, g) => a.index - g.index);
524
+ const l = o.map((a) => a.item), d = l.length === 0 ? [] : e.options.compute(l);
525
+ B(
475
526
  e.id,
476
527
  t.key,
477
- a.map((o) => o.key),
478
- l
528
+ o.map((a) => a.key),
529
+ d
479
530
  );
480
- const v = l;
481
- if (d.length !== 0 || a.some((o) => !s.has(o.key))) {
482
- const o = /* @__PURE__ */ new Map();
483
- for (let u = 0; u < a.length; u++)
484
- o.set(a[u].key, v[u]);
485
- const m = /* @__PURE__ */ new Map();
486
- for (const [u, g] of s)
487
- m.set(u, i[g]);
488
- const n = C(r, t.key, "source"), h = [];
489
- h.length = n.length;
490
- for (let u = 0; u < n.length; u++) {
491
- const g = n[u];
492
- if (g === void 0)
531
+ const u = d;
532
+ if (h.length !== 0 || o.some((a) => !s.has(a.key))) {
533
+ const a = /* @__PURE__ */ new Map();
534
+ for (let f = 0; f < o.length; f++)
535
+ a.set(o[f].key, u[f]);
536
+ const g = /* @__PURE__ */ new Map();
537
+ for (const [f, v] of s)
538
+ g.set(f, i[v]);
539
+ const n = x(r, t.key, "source"), c = [];
540
+ c.length = n.length;
541
+ for (let f = 0; f < n.length; f++) {
542
+ const v = n[f];
543
+ if (v === void 0)
493
544
  continue;
494
- const D = o.has(g) ? o.get(g) : m.get(g);
545
+ const D = a.has(v) ? a.get(v) : g.get(v);
495
546
  if (D === void 0)
496
- throw M(e.id, `is missing target item for key "${String(g)}"`);
497
- h[u] = D;
547
+ throw b(e.id, `is missing target item for key "${String(v)}"`);
548
+ c[f] = D;
498
549
  }
499
- const y = w(h, t.key, "target");
500
- this._replaceDerivedTarget(e.options.to, h, t.keys), t.targetIndex = y;
550
+ const p = k(c, t.key, "target");
551
+ this._replaceDerivedTarget(e.options.to, c, t.keys), t.targetIndex = p;
501
552
  } else
502
- for (let o = 0; o < a.length; o++)
553
+ for (let a = 0; a < o.length; a++)
503
554
  this._writeDerivedTarget(
504
- A(e.options.to, t.key, a[o].key),
505
- v[o]
555
+ A(e.options.to, t.key, o[a].key),
556
+ u[a]
506
557
  );
507
558
  t.keys.clear(), t.full = !1;
508
559
  }
@@ -510,127 +561,127 @@ const x = class x {
510
561
  t.full = !0;
511
562
  const r = this.get(e.options.from), i = this.get(e.options.to);
512
563
  if (!Array.isArray(r) || !Array.isArray(i))
513
- throw I(e.id, "requires array source and target");
514
- (t.sourceIndex === void 0 || P(r, t.key, t.sourceIndex, t.keys)) && (t.sourceIndex = w(r, t.key, "source"));
564
+ throw P(e.id, "requires array source and target");
565
+ (t.sourceIndex === void 0 || z(r, t.key, t.sourceIndex, t.keys)) && (t.sourceIndex = k(r, t.key, "source"));
515
566
  const s = t.targetIndex;
516
567
  if (s === void 0)
517
- throw I(e.id, "has no materialized target index");
518
- const a = [];
568
+ throw P(e.id, "has no materialized target index");
569
+ const o = [];
519
570
  for (const n of t.keys) {
520
- const h = t.sourceIndex.get(n);
521
- h !== void 0 && a.push({ key: n, index: h, item: r[h] });
571
+ const c = t.sourceIndex.get(n);
572
+ c !== void 0 && o.push({ key: n, index: c, item: r[c] });
522
573
  }
523
- a.sort((n, h) => n.index - h.index);
524
- const d = a.map((n) => n.item), c = d.length === 0 ? [] : e.options.compute(d);
525
- N(
574
+ o.sort((n, c) => n.index - c.index);
575
+ const h = o.map((n) => n.item), l = h.length === 0 ? [] : e.options.compute(h);
576
+ K(
526
577
  e.id,
527
578
  t.key,
528
- a.map((n) => n.key),
529
- c
579
+ o.map((n) => n.key),
580
+ l
530
581
  );
531
- const l = /* @__PURE__ */ new Map(), v = c, _ = C(v, t.key, "output");
532
- for (let n = 0; n < _.length; n++) {
533
- const h = _[n];
534
- h !== void 0 && l.set(h, z(v[n]));
582
+ const d = /* @__PURE__ */ new Map(), u = l, m = x(u, t.key, "output");
583
+ for (let n = 0; n < m.length; n++) {
584
+ const c = m[n];
585
+ c !== void 0 && d.set(c, C(u[n]));
535
586
  }
536
- const o = /* @__PURE__ */ new Set();
537
- let m = !1;
587
+ const a = /* @__PURE__ */ new Set();
588
+ let g = !1;
538
589
  for (const n of t.keys) {
539
- const h = s.has(n), y = l.has(n);
540
- !h && !y || (o.add(n), h !== y && (m = !0));
590
+ const c = s.has(n), p = d.has(n);
591
+ !c && !p || (a.add(n), c !== p && (g = !0));
541
592
  }
542
- if (m && t.keys.size === 1 && i.length === s.size && this._patchSingleFilterMembership(
593
+ if (g && t.keys.size === 1 && i.length === s.size && this._patchSingleFilterMembership(
543
594
  e,
544
595
  t,
545
596
  i,
546
597
  s,
547
- l,
548
- o
598
+ d,
599
+ a
549
600
  )) {
550
601
  t.keys.clear(), t.full = !1;
551
602
  return;
552
603
  }
553
- if (m) {
604
+ if (g) {
554
605
  const n = /* @__PURE__ */ new Map();
555
- for (const [u, g] of s)
556
- n.set(u, i[g]);
557
- const h = [];
558
- for (const u of C(r, t.key, "source"))
559
- if (u !== void 0) {
560
- if (t.keys.has(u)) {
561
- l.has(u) && h.push(l.get(u));
606
+ for (const [f, v] of s)
607
+ n.set(f, i[v]);
608
+ const c = [];
609
+ for (const f of x(r, t.key, "source"))
610
+ if (f !== void 0) {
611
+ if (t.keys.has(f)) {
612
+ d.has(f) && c.push(d.get(f));
562
613
  continue;
563
614
  }
564
- n.has(u) && h.push(n.get(u));
615
+ n.has(f) && c.push(n.get(f));
565
616
  }
566
- const y = w(h, t.key, "target");
567
- this._replaceDerivedTarget(e.options.to, h, o), t.targetIndex = y;
617
+ const p = k(c, t.key, "target");
618
+ this._replaceDerivedTarget(e.options.to, c, a), t.targetIndex = p;
568
619
  } else
569
- for (const [n, h] of l)
570
- this._writeDerivedTarget(A(e.options.to, t.key, n), h);
620
+ for (const [n, c] of d)
621
+ this._writeDerivedTarget(A(e.options.to, t.key, n), c);
571
622
  t.keys.clear(), t.full = !1;
572
623
  }
573
- _patchSingleFilterMembership(e, t, r, i, s, a) {
574
- const d = t.sourceIndex;
575
- if (d === void 0)
624
+ _patchSingleFilterMembership(e, t, r, i, s, o) {
625
+ const h = t.sourceIndex;
626
+ if (h === void 0)
576
627
  return !1;
577
- const c = t.keys.values().next().value;
578
- if (c === void 0)
628
+ const l = t.keys.values().next().value;
629
+ if (l === void 0)
579
630
  return !1;
580
- const l = i.get(c), v = s.has(c);
581
- if (l !== void 0 === v)
631
+ const d = i.get(l), u = s.has(l);
632
+ if (d !== void 0 === u)
582
633
  return !1;
583
- const _ = r.slice();
584
- let o;
585
- if (l !== void 0)
586
- o = l, _.splice(o, 1);
634
+ const m = r.slice();
635
+ let a;
636
+ if (d !== void 0)
637
+ a = d, m.splice(a, 1);
587
638
  else {
588
- const m = d.get(c);
589
- if (m === void 0)
639
+ const g = h.get(l);
640
+ if (g === void 0)
590
641
  return !1;
591
- let n = 0, h = _.length;
592
- for (; n < h; ) {
593
- const y = n + h >>> 1, u = _[y];
594
- if (typeof u != "object" || u === null || Array.isArray(u))
642
+ let n = 0, c = m.length;
643
+ for (; n < c; ) {
644
+ const p = n + c >>> 1, f = m[p];
645
+ if (typeof f != "object" || f === null || Array.isArray(f))
595
646
  return !1;
596
- const g = u[t.key];
597
- if (typeof g != "string" && typeof g != "number")
647
+ const v = f[t.key];
648
+ if (typeof v != "string" && typeof v != "number")
598
649
  return !1;
599
- const D = d.get(g);
650
+ const D = h.get(v);
600
651
  if (D === void 0)
601
652
  return !1;
602
- D < m ? n = y + 1 : h = y;
653
+ D < g ? n = p + 1 : c = p;
603
654
  }
604
- o = n, _.splice(o, 0, s.get(c));
655
+ a = n, m.splice(a, 0, s.get(l));
605
656
  }
606
- if (this._replaceDerivedTarget(e.options.to, _, a), l !== void 0) {
607
- i.delete(c);
608
- for (const [m, n] of i)
609
- n > o && i.set(m, n - 1);
657
+ if (this._replaceDerivedTarget(e.options.to, m, o), d !== void 0) {
658
+ i.delete(l);
659
+ for (const [g, n] of i)
660
+ n > a && i.set(g, n - 1);
610
661
  } else {
611
- for (const [m, n] of i)
612
- n >= o && i.set(m, n + 1);
613
- i.set(c, o);
662
+ for (const [g, n] of i)
663
+ n >= a && i.set(g, n + 1);
664
+ i.set(l, a);
614
665
  }
615
666
  return !0;
616
667
  }
617
668
  };
618
669
  // Формирует локальный id для Kernel без явно заданного имени.
619
- p(x, "_kernelCounter", 0);
620
- let E = x;
621
- function T(f, e) {
622
- const t = Math.min(f.segments.length, e.segments.length);
670
+ y(M, "_kernelCounter", 0);
671
+ let I = M;
672
+ function E(_, e) {
673
+ const t = Math.min(_.segments.length, e.segments.length);
623
674
  for (let r = 0; r < t; r++)
624
- if (!V(f.segments[r], e.segments[r]))
675
+ if (!V(_.segments[r], e.segments[r]))
625
676
  return !1;
626
677
  return !0;
627
678
  }
628
- function U(f, e) {
629
- return typeof f != "object" || f === null || Array.isArray(f) || e.kind !== "key" ? !0 : Object.hasOwn(f, e.key);
679
+ function U(_, e) {
680
+ return typeof _ != "object" || _ === null || Array.isArray(_) || e.kind !== "key" ? !0 : Object.hasOwn(_, e.key);
630
681
  }
631
- function V(f, e) {
632
- return f.kind !== e.kind ? !1 : f.kind === "key" && e.kind === "key" ? f.key === e.key : f.kind === "index" && e.kind === "index" ? f.index === e.index : f.kind === "selector" && e.kind === "selector" && f.key === e.key && Object.is(f.value, e.value);
682
+ function V(_, e) {
683
+ return _.kind !== e.kind ? !1 : _.kind === "key" && e.kind === "key" ? _.key === e.key : _.kind === "index" && e.kind === "index" ? _.index === e.index : _.kind === "selector" && e.kind === "selector" && _.key === e.key && Object.is(_.value, e.value);
633
684
  }
634
685
  export {
635
- E as RaphKernel
686
+ I as RaphKernel
636
687
  };