@claude-sessions/web 0.4.7-beta.0 → 0.4.7-beta.2

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 (163) hide show
  1. package/README.md +29 -5
  2. package/build/client/_app/immutable/assets/0.nXM4xjKW.css +1 -0
  3. package/build/client/_app/immutable/assets/0.nXM4xjKW.css.br +0 -0
  4. package/build/client/_app/immutable/assets/0.nXM4xjKW.css.gz +0 -0
  5. package/build/client/_app/immutable/chunks/{Dw50LpzA.js → 6j6qgi5m.js} +1 -1
  6. package/build/client/_app/immutable/chunks/6j6qgi5m.js.br +0 -0
  7. package/build/client/_app/immutable/chunks/6j6qgi5m.js.gz +0 -0
  8. package/build/client/_app/immutable/chunks/B6sDeAgz.js +1 -0
  9. package/build/client/_app/immutable/chunks/B6sDeAgz.js.br +0 -0
  10. package/build/client/_app/immutable/chunks/B6sDeAgz.js.gz +0 -0
  11. package/build/client/_app/immutable/chunks/BylljJLn.js +1 -0
  12. package/build/client/_app/immutable/chunks/BylljJLn.js.br +0 -0
  13. package/build/client/_app/immutable/chunks/BylljJLn.js.gz +0 -0
  14. package/build/client/_app/immutable/chunks/{CYKpEMl5.js → CTZvkzKQ.js} +1 -1
  15. package/build/client/_app/immutable/chunks/CTZvkzKQ.js.br +0 -0
  16. package/build/client/_app/immutable/chunks/CTZvkzKQ.js.gz +0 -0
  17. package/build/client/_app/immutable/chunks/{B8g5xi4b.js → D1duoKAw.js} +1 -1
  18. package/build/client/_app/immutable/chunks/D1duoKAw.js.br +0 -0
  19. package/build/client/_app/immutable/chunks/D1duoKAw.js.gz +0 -0
  20. package/build/client/_app/immutable/chunks/DB1q-JFC.js +1 -0
  21. package/build/client/_app/immutable/chunks/DB1q-JFC.js.br +0 -0
  22. package/build/client/_app/immutable/chunks/DB1q-JFC.js.gz +0 -0
  23. package/build/client/_app/immutable/chunks/Do3Mx-wN.js +100 -0
  24. package/build/client/_app/immutable/chunks/Do3Mx-wN.js.br +0 -0
  25. package/build/client/_app/immutable/chunks/Do3Mx-wN.js.gz +0 -0
  26. package/build/client/_app/immutable/chunks/WK3b3g7j.js +2 -0
  27. package/build/client/_app/immutable/chunks/WK3b3g7j.js.br +0 -0
  28. package/build/client/_app/immutable/chunks/WK3b3g7j.js.gz +0 -0
  29. package/build/client/_app/immutable/entry/{app.CMV94ayS.js → app.nHtLn0I6.js} +2 -2
  30. package/build/client/_app/immutable/entry/app.nHtLn0I6.js.br +0 -0
  31. package/build/client/_app/immutable/entry/app.nHtLn0I6.js.gz +0 -0
  32. package/build/client/_app/immutable/entry/start.DHjDjXX8.js +1 -0
  33. package/build/client/_app/immutable/entry/start.DHjDjXX8.js.br +0 -0
  34. package/build/client/_app/immutable/entry/start.DHjDjXX8.js.gz +0 -0
  35. package/build/client/_app/immutable/nodes/{0.DVHVg7U5.js → 0.DwdBvQCI.js} +1 -1
  36. package/build/client/_app/immutable/nodes/0.DwdBvQCI.js.br +0 -0
  37. package/build/client/_app/immutable/nodes/0.DwdBvQCI.js.gz +0 -0
  38. package/build/client/_app/immutable/nodes/{1.D0PdYLPm.js → 1.BiB21EXS.js} +1 -1
  39. package/build/client/_app/immutable/nodes/1.BiB21EXS.js.br +2 -0
  40. package/build/client/_app/immutable/nodes/1.BiB21EXS.js.gz +0 -0
  41. package/build/client/_app/immutable/nodes/{2.Cs83Zp7C.js → 2.BEPizQDT.js} +1 -1
  42. package/build/client/_app/immutable/nodes/2.BEPizQDT.js.br +0 -0
  43. package/build/client/_app/immutable/nodes/2.BEPizQDT.js.gz +0 -0
  44. package/build/client/_app/immutable/nodes/3.BgRuDlwU.js +8 -0
  45. package/build/client/_app/immutable/nodes/3.BgRuDlwU.js.br +0 -0
  46. package/build/client/_app/immutable/nodes/3.BgRuDlwU.js.gz +0 -0
  47. package/build/client/_app/version.json +1 -1
  48. package/build/client/_app/version.json.br +0 -0
  49. package/build/client/_app/version.json.gz +0 -0
  50. package/build/server/chunks/0-D-HsJ-vO.js +17 -0
  51. package/build/server/chunks/{0-CEq226Yu.js.map → 0-D-HsJ-vO.js.map} +1 -1
  52. package/build/server/chunks/1-DeMndDCs.js +9 -0
  53. package/build/server/chunks/{1-CZKii7cF.js.map → 1-DeMndDCs.js.map} +1 -1
  54. package/build/server/chunks/2-D0dwPnJg.js +9 -0
  55. package/build/server/chunks/{2-1NHU8T7t.js.map → 2-D0dwPnJg.js.map} +1 -1
  56. package/build/server/chunks/3-D7qojxmc.js +9 -0
  57. package/build/server/chunks/{3-DHru04k0.js.map → 3-D7qojxmc.js.map} +1 -1
  58. package/build/server/chunks/{InputModal-B2QW71Rc.js → InputModal-Cp5WgcYP.js} +2 -2
  59. package/build/server/chunks/{InputModal-B2QW71Rc.js.map → InputModal-Cp5WgcYP.js.map} +1 -1
  60. package/build/server/chunks/{Toast-BzqOqKOg.js → Toast-AVuTocXd.js} +3 -3
  61. package/build/server/chunks/{Toast-BzqOqKOg.js.map → Toast-AVuTocXd.js.map} +1 -1
  62. package/build/server/chunks/{_layout.svelte-CkLZkYhs.js → _layout.svelte-DaSyc-mf.js} +6 -6
  63. package/build/server/chunks/{_layout.svelte-CkLZkYhs.js.map → _layout.svelte-DaSyc-mf.js.map} +1 -1
  64. package/build/server/chunks/{_page.svelte-DSpIiljH.js → _page.svelte-D0jFzJtD.js} +36 -6
  65. package/build/server/chunks/_page.svelte-D0jFzJtD.js.map +1 -0
  66. package/build/server/chunks/{_page.svelte-DuQWccy1.js → _page.svelte-D3EVHdvH.js} +6 -6
  67. package/build/server/chunks/_page.svelte-D3EVHdvH.js.map +1 -0
  68. package/build/server/chunks/{_server.ts-Ba6jXSm2.js → _server.ts-27jrx6Uo.js} +2 -2
  69. package/build/server/chunks/{_server.ts-Ba6jXSm2.js.map → _server.ts-27jrx6Uo.js.map} +1 -1
  70. package/build/server/chunks/{_server.ts-Cy5z0Rsk.js → _server.ts-BFl5HqTC.js} +2 -2
  71. package/build/server/chunks/{_server.ts-Cy5z0Rsk.js.map → _server.ts-BFl5HqTC.js.map} +1 -1
  72. package/build/server/chunks/{_server.ts-CozgvvoX.js → _server.ts-BhOezmyL.js} +2 -2
  73. package/build/server/chunks/{_server.ts-CozgvvoX.js.map → _server.ts-BhOezmyL.js.map} +1 -1
  74. package/build/server/chunks/{_server.ts-DCSJsfkA.js → _server.ts-BhQT5YuB.js} +2 -2
  75. package/build/server/chunks/{_server.ts-DCSJsfkA.js.map → _server.ts-BhQT5YuB.js.map} +1 -1
  76. package/build/server/chunks/{_server.ts-DcfIBmy4.js → _server.ts-Btc51FlH.js} +3 -3
  77. package/build/server/chunks/{_server.ts-DcfIBmy4.js.map → _server.ts-Btc51FlH.js.map} +1 -1
  78. package/build/server/chunks/{_server.ts-CoLbb7aT.js → _server.ts-BthX-Q9z.js} +2 -2
  79. package/build/server/chunks/{_server.ts-CoLbb7aT.js.map → _server.ts-BthX-Q9z.js.map} +1 -1
  80. package/build/server/chunks/{_server.ts-klbpGqf9.js → _server.ts-Bz6R94Qf.js} +3 -3
  81. package/build/server/chunks/{_server.ts-klbpGqf9.js.map → _server.ts-Bz6R94Qf.js.map} +1 -1
  82. package/build/server/chunks/{_server.ts-g1VNk1F2.js → _server.ts-C923Ajq5.js} +2 -2
  83. package/build/server/chunks/{_server.ts-g1VNk1F2.js.map → _server.ts-C923Ajq5.js.map} +1 -1
  84. package/build/server/chunks/{_server.ts-BhA9i-7j.js → _server.ts-ClQdpaTd.js} +3 -3
  85. package/build/server/chunks/{_server.ts-BhA9i-7j.js.map → _server.ts-ClQdpaTd.js.map} +1 -1
  86. package/build/server/chunks/{_server.ts-dEWE9PbU.js → _server.ts-CqC271AX.js} +2 -2
  87. package/build/server/chunks/{_server.ts-dEWE9PbU.js.map → _server.ts-CqC271AX.js.map} +1 -1
  88. package/build/server/chunks/{_server.ts-BjynU3C4.js → _server.ts-D3dUenaL.js} +2 -2
  89. package/build/server/chunks/{_server.ts-BjynU3C4.js.map → _server.ts-D3dUenaL.js.map} +1 -1
  90. package/build/server/chunks/{_server.ts-xRJQMsoy.js → _server.ts-D4gj35xA.js} +3 -3
  91. package/build/server/chunks/{_server.ts-xRJQMsoy.js.map → _server.ts-D4gj35xA.js.map} +1 -1
  92. package/build/server/chunks/{_server.ts-Dq4A0ML7.js → _server.ts-DbJhWH7w.js} +2 -2
  93. package/build/server/chunks/{_server.ts-Dq4A0ML7.js.map → _server.ts-DbJhWH7w.js.map} +1 -1
  94. package/build/server/chunks/{_server.ts-C-iKh37d.js → _server.ts-DtT_v20j.js} +2 -2
  95. package/build/server/chunks/{_server.ts-C-iKh37d.js.map → _server.ts-DtT_v20j.js.map} +1 -1
  96. package/build/server/chunks/{_server.ts-DRrwjyQ0.js → _server.ts-SnEIAk-f.js} +2 -2
  97. package/build/server/chunks/{_server.ts-DRrwjyQ0.js.map → _server.ts-SnEIAk-f.js.map} +1 -1
  98. package/build/server/chunks/{_server.ts-B-2v0wgR.js → _server.ts-kBggS0l1.js} +2 -2
  99. package/build/server/chunks/{_server.ts-B-2v0wgR.js.map → _server.ts-kBggS0l1.js.map} +1 -1
  100. package/build/server/chunks/{client-CJUAsTTN.js → client-C63uMw4h.js} +4 -3
  101. package/build/server/chunks/client-C63uMw4h.js.map +1 -0
  102. package/build/server/chunks/{error.svelte-CYLEgCzL.js → error.svelte-7ySp2asi.js} +4 -4
  103. package/build/server/chunks/{error.svelte-CYLEgCzL.js.map → error.svelte-7ySp2asi.js.map} +1 -1
  104. package/build/server/chunks/index-CoD1IJuy.js.map +1 -1
  105. package/build/server/chunks/{index-CUeePJRv.js → index-Dqbd-Nxp.js} +256 -235
  106. package/build/server/chunks/index-Dqbd-Nxp.js.map +1 -0
  107. package/build/server/chunks/{index2-BbHYMsUG.js → index2-gxrJEKeb.js} +2 -2
  108. package/build/server/chunks/{index2-BbHYMsUG.js.map → index2-gxrJEKeb.js.map} +1 -1
  109. package/build/server/chunks/{index3-BKokHvI9.js → index3-vPlrIIie.js} +3 -3
  110. package/build/server/chunks/{index3-BKokHvI9.js.map → index3-vPlrIIie.js.map} +1 -1
  111. package/build/server/chunks/{session-BEXBEvJ9.js → session-CYkrEqv3.js} +2 -2
  112. package/build/server/chunks/{session-BEXBEvJ9.js.map → session-CYkrEqv3.js.map} +1 -1
  113. package/build/server/index.js +99 -13
  114. package/build/server/index.js.map +1 -1
  115. package/build/server/manifest.js +21 -21
  116. package/build/server/manifest.js.map +1 -1
  117. package/package.json +23 -20
  118. package/build/client/_app/immutable/assets/0.cQgYior5.css +0 -1
  119. package/build/client/_app/immutable/assets/0.cQgYior5.css.br +0 -0
  120. package/build/client/_app/immutable/assets/0.cQgYior5.css.gz +0 -0
  121. package/build/client/_app/immutable/chunks/B8g5xi4b.js.br +0 -0
  122. package/build/client/_app/immutable/chunks/B8g5xi4b.js.gz +0 -0
  123. package/build/client/_app/immutable/chunks/CBiqUHp4.js +0 -1
  124. package/build/client/_app/immutable/chunks/CBiqUHp4.js.br +0 -0
  125. package/build/client/_app/immutable/chunks/CBiqUHp4.js.gz +0 -0
  126. package/build/client/_app/immutable/chunks/CG99hqDQ.js +0 -2
  127. package/build/client/_app/immutable/chunks/CG99hqDQ.js.br +0 -0
  128. package/build/client/_app/immutable/chunks/CG99hqDQ.js.gz +0 -0
  129. package/build/client/_app/immutable/chunks/CYKpEMl5.js.br +0 -0
  130. package/build/client/_app/immutable/chunks/CYKpEMl5.js.gz +0 -0
  131. package/build/client/_app/immutable/chunks/DWa7QuMS.js +0 -1
  132. package/build/client/_app/immutable/chunks/DWa7QuMS.js.br +0 -0
  133. package/build/client/_app/immutable/chunks/DWa7QuMS.js.gz +0 -0
  134. package/build/client/_app/immutable/chunks/DicbBas7.js +0 -1
  135. package/build/client/_app/immutable/chunks/DicbBas7.js.br +0 -0
  136. package/build/client/_app/immutable/chunks/DicbBas7.js.gz +0 -0
  137. package/build/client/_app/immutable/chunks/Dw50LpzA.js.br +0 -0
  138. package/build/client/_app/immutable/chunks/Dw50LpzA.js.gz +0 -0
  139. package/build/client/_app/immutable/chunks/GmjPUgZ0.js +0 -100
  140. package/build/client/_app/immutable/chunks/GmjPUgZ0.js.br +0 -0
  141. package/build/client/_app/immutable/chunks/GmjPUgZ0.js.gz +0 -0
  142. package/build/client/_app/immutable/entry/app.CMV94ayS.js.br +0 -0
  143. package/build/client/_app/immutable/entry/app.CMV94ayS.js.gz +0 -0
  144. package/build/client/_app/immutable/entry/start.CgzpSnrE.js +0 -1
  145. package/build/client/_app/immutable/entry/start.CgzpSnrE.js.br +0 -0
  146. package/build/client/_app/immutable/entry/start.CgzpSnrE.js.gz +0 -0
  147. package/build/client/_app/immutable/nodes/0.DVHVg7U5.js.br +0 -0
  148. package/build/client/_app/immutable/nodes/0.DVHVg7U5.js.gz +0 -0
  149. package/build/client/_app/immutable/nodes/1.D0PdYLPm.js.br +0 -0
  150. package/build/client/_app/immutable/nodes/1.D0PdYLPm.js.gz +0 -0
  151. package/build/client/_app/immutable/nodes/2.Cs83Zp7C.js.br +0 -0
  152. package/build/client/_app/immutable/nodes/2.Cs83Zp7C.js.gz +0 -0
  153. package/build/client/_app/immutable/nodes/3.BMgB8JW6.js +0 -4
  154. package/build/client/_app/immutable/nodes/3.BMgB8JW6.js.br +0 -0
  155. package/build/client/_app/immutable/nodes/3.BMgB8JW6.js.gz +0 -0
  156. package/build/server/chunks/0-CEq226Yu.js +0 -17
  157. package/build/server/chunks/1-CZKii7cF.js +0 -9
  158. package/build/server/chunks/2-1NHU8T7t.js +0 -9
  159. package/build/server/chunks/3-DHru04k0.js +0 -9
  160. package/build/server/chunks/_page.svelte-DSpIiljH.js.map +0 -1
  161. package/build/server/chunks/_page.svelte-DuQWccy1.js.map +0 -1
  162. package/build/server/chunks/client-CJUAsTTN.js.map +0 -1
  163. package/build/server/chunks/index-CUeePJRv.js.map +0 -1
@@ -878,8 +878,20 @@ class Batch {
878
878
  }
879
879
  #process() {
880
880
  if (flush_count++ > 1e3) {
881
+ batches.delete(this);
881
882
  infinite_loop_guard();
882
883
  }
884
+ if (!this.#is_deferred()) {
885
+ for (const e of this.#dirty_effects) {
886
+ this.#maybe_dirty_effects.delete(e);
887
+ set_signal_status(e, DIRTY);
888
+ this.schedule(e);
889
+ }
890
+ for (const e of this.#maybe_dirty_effects) {
891
+ set_signal_status(e, MAYBE_DIRTY);
892
+ this.schedule(e);
893
+ }
894
+ }
883
895
  const roots = this.#roots;
884
896
  this.#roots = [];
885
897
  this.apply();
@@ -887,7 +899,12 @@ class Batch {
887
899
  var render_effects = [];
888
900
  var updates = legacy_updates = [];
889
901
  for (const root2 of roots) {
890
- this.#traverse(root2, effects, render_effects);
902
+ try {
903
+ this.#traverse(root2, effects, render_effects);
904
+ } catch (e) {
905
+ reset_all(root2);
906
+ throw e;
907
+ }
891
908
  }
892
909
  current_batch = null;
893
910
  if (updates.length > 0) {
@@ -905,15 +922,15 @@ class Batch {
905
922
  reset_branch(e, t);
906
923
  }
907
924
  } else {
925
+ if (this.#pending === 0) {
926
+ batches.delete(this);
927
+ }
908
928
  this.#dirty_effects.clear();
909
929
  this.#maybe_dirty_effects.clear();
910
930
  for (const fn of this.#commit_callbacks) fn(this);
911
931
  this.#commit_callbacks.clear();
912
932
  flush_queued_effects(render_effects);
913
933
  flush_queued_effects(effects);
914
- if (this.#pending === 0) {
915
- this.#commit();
916
- }
917
934
  this.#deferred?.resolve();
918
935
  }
919
936
  var next_batch = (
@@ -921,10 +938,17 @@ class Batch {
921
938
  /** @type {unknown} */
922
939
  current_batch
923
940
  );
941
+ if (this.#roots.length > 0) {
942
+ const batch2 = next_batch ??= this;
943
+ batch2.#roots.push(...this.#roots.filter((r2) => !batch2.#roots.includes(r2)));
944
+ }
924
945
  if (next_batch !== null) {
925
946
  batches.add(next_batch);
926
947
  next_batch.#process();
927
948
  }
949
+ if (!batches.has(this)) {
950
+ this.#commit();
951
+ }
928
952
  }
929
953
  /**
930
954
  * Traverse the effect tree, executing effects or stashing
@@ -978,11 +1002,11 @@ class Batch {
978
1002
  * Associate a change to a given source with the current
979
1003
  * batch, noting its previous and current values
980
1004
  * @param {Source} source
981
- * @param {any} value
1005
+ * @param {any} old_value
982
1006
  */
983
- capture(source2, value) {
984
- if (value !== UNINITIALIZED && !this.previous.has(source2)) {
985
- this.previous.set(source2, value);
1007
+ capture(source2, old_value) {
1008
+ if (old_value !== UNINITIALIZED && !this.previous.has(source2)) {
1009
+ this.previous.set(source2, old_value);
986
1010
  }
987
1011
  if ((source2.f & ERROR_VALUE) === 0) {
988
1012
  this.current.set(source2, source2.v);
@@ -1000,17 +1024,6 @@ class Batch {
1000
1024
  try {
1001
1025
  is_processing = true;
1002
1026
  current_batch = this;
1003
- if (!this.#is_deferred()) {
1004
- for (const e of this.#dirty_effects) {
1005
- this.#maybe_dirty_effects.delete(e);
1006
- set_signal_status(e, DIRTY);
1007
- this.schedule(e);
1008
- }
1009
- for (const e of this.#maybe_dirty_effects) {
1010
- set_signal_status(e, MAYBE_DIRTY);
1011
- this.schedule(e);
1012
- }
1013
- }
1014
1027
  this.#process();
1015
1028
  } finally {
1016
1029
  flush_count = 0;
@@ -1026,54 +1039,44 @@ class Batch {
1026
1039
  discard() {
1027
1040
  for (const fn of this.#discard_callbacks) fn(this);
1028
1041
  this.#discard_callbacks.clear();
1042
+ batches.delete(this);
1029
1043
  }
1030
1044
  #commit() {
1031
- if (batches.size > 1) {
1032
- this.previous.clear();
1033
- var previous_batch = current_batch;
1034
- var previous_batch_values = batch_values;
1035
- var is_earlier = true;
1036
- for (const batch of batches) {
1037
- if (batch === this) {
1038
- is_earlier = false;
1039
- continue;
1040
- }
1041
- const sources = [];
1042
- for (const [source2, value] of this.current) {
1043
- if (batch.current.has(source2)) {
1044
- if (is_earlier && value !== batch.current.get(source2)) {
1045
- batch.current.set(source2, value);
1046
- } else {
1047
- continue;
1048
- }
1045
+ for (const batch of batches) {
1046
+ var is_earlier = batch.id < this.id;
1047
+ var sources = [];
1048
+ for (const [source3, value] of this.current) {
1049
+ if (batch.current.has(source3)) {
1050
+ if (is_earlier && value !== batch.current.get(source3)) {
1051
+ batch.current.set(source3, value);
1052
+ } else {
1053
+ continue;
1049
1054
  }
1050
- sources.push(source2);
1051
1055
  }
1052
- if (sources.length === 0) {
1053
- continue;
1056
+ sources.push(source3);
1057
+ }
1058
+ var others = [...batch.current.keys()].filter((s) => !this.current.has(s));
1059
+ if (others.length === 0) {
1060
+ if (is_earlier) {
1061
+ batch.discard();
1054
1062
  }
1055
- const others = [...batch.current.keys()].filter((s) => !this.current.has(s));
1056
- if (others.length > 0) {
1057
- batch.activate();
1058
- const marked = /* @__PURE__ */ new Set();
1059
- const checked = /* @__PURE__ */ new Map();
1060
- for (const source2 of sources) {
1061
- mark_effects(source2, others, marked, checked);
1062
- }
1063
- if (batch.#roots.length > 0) {
1064
- batch.apply();
1065
- for (const root2 of batch.#roots) {
1066
- batch.#traverse(root2, [], []);
1067
- }
1063
+ } else if (sources.length > 0) {
1064
+ batch.activate();
1065
+ var marked = /* @__PURE__ */ new Set();
1066
+ var checked = /* @__PURE__ */ new Map();
1067
+ for (var source2 of sources) {
1068
+ mark_effects(source2, others, marked, checked);
1069
+ }
1070
+ if (batch.#roots.length > 0) {
1071
+ batch.apply();
1072
+ for (var root2 of batch.#roots) {
1073
+ batch.#traverse(root2, [], []);
1068
1074
  }
1069
- batch.deactivate();
1075
+ batch.#roots = [];
1070
1076
  }
1077
+ batch.deactivate();
1071
1078
  }
1072
- current_batch = previous_batch;
1073
- batch_values = previous_batch_values;
1074
1079
  }
1075
- this.#skipped_branches.clear();
1076
- batches.delete(this);
1077
1080
  }
1078
1081
  /**
1079
1082
  *
@@ -1097,6 +1100,20 @@ class Batch {
1097
1100
  this.flush();
1098
1101
  });
1099
1102
  }
1103
+ /**
1104
+ * @param {Set<Effect>} dirty_effects
1105
+ * @param {Set<Effect>} maybe_dirty_effects
1106
+ */
1107
+ transfer_effects(dirty_effects, maybe_dirty_effects) {
1108
+ for (const e of dirty_effects) {
1109
+ this.#dirty_effects.add(e);
1110
+ }
1111
+ for (const e of maybe_dirty_effects) {
1112
+ this.#maybe_dirty_effects.add(e);
1113
+ }
1114
+ dirty_effects.clear();
1115
+ maybe_dirty_effects.clear();
1116
+ }
1100
1117
  /** @param {(batch: Batch) => void} fn */
1101
1118
  oncommit(fn) {
1102
1119
  this.#commit_callbacks.add(fn);
@@ -1126,7 +1143,10 @@ class Batch {
1126
1143
  return current_batch;
1127
1144
  }
1128
1145
  apply() {
1129
- return;
1146
+ {
1147
+ batch_values = null;
1148
+ return;
1149
+ }
1130
1150
  }
1131
1151
  /**
1132
1152
  *
@@ -1291,6 +1311,14 @@ function reset_branch(effect, tracked) {
1291
1311
  e = e.next;
1292
1312
  }
1293
1313
  }
1314
+ function reset_all(effect) {
1315
+ set_signal_status(effect, CLEAN);
1316
+ var e = effect.first;
1317
+ while (e !== null) {
1318
+ reset_all(e);
1319
+ e = e.next;
1320
+ }
1321
+ }
1294
1322
  function createSubscriber(start) {
1295
1323
  let subscribers = 0;
1296
1324
  let version = source(0);
@@ -1443,10 +1471,6 @@ class Boundary {
1443
1471
  if (!pending) return;
1444
1472
  this.is_pending = true;
1445
1473
  this.#pending_effect = branch(() => pending(this.#anchor));
1446
- var batch = (
1447
- /** @type {Batch} */
1448
- current_batch
1449
- );
1450
1474
  queue_micro_task(() => {
1451
1475
  var fragment = this.#offscreen_fragment = document.createDocumentFragment();
1452
1476
  var anchor = create_text();
@@ -1464,15 +1488,14 @@ class Boundary {
1464
1488
  this.#pending_effect = null;
1465
1489
  }
1466
1490
  );
1467
- this.#resolve(batch);
1491
+ this.#resolve(
1492
+ /** @type {Batch} */
1493
+ current_batch
1494
+ );
1468
1495
  }
1469
1496
  });
1470
1497
  }
1471
1498
  #render() {
1472
- var batch = (
1473
- /** @type {Batch} */
1474
- current_batch
1475
- );
1476
1499
  try {
1477
1500
  this.is_pending = this.has_pending_snippet();
1478
1501
  this.#pending_count = 0;
@@ -1489,7 +1512,10 @@ class Boundary {
1489
1512
  );
1490
1513
  this.#pending_effect = branch(() => pending(this.#anchor));
1491
1514
  } else {
1492
- this.#resolve(batch);
1515
+ this.#resolve(
1516
+ /** @type {Batch} */
1517
+ current_batch
1518
+ );
1493
1519
  }
1494
1520
  } catch (error) {
1495
1521
  this.error(error);
@@ -1500,16 +1526,7 @@ class Boundary {
1500
1526
  */
1501
1527
  #resolve(batch) {
1502
1528
  this.is_pending = false;
1503
- for (const e of this.#dirty_effects) {
1504
- set_signal_status(e, DIRTY);
1505
- batch.schedule(e);
1506
- }
1507
- for (const e of this.#maybe_dirty_effects) {
1508
- set_signal_status(e, MAYBE_DIRTY);
1509
- batch.schedule(e);
1510
- }
1511
- this.#dirty_effects.clear();
1512
- this.#maybe_dirty_effects.clear();
1529
+ batch.transfer_effects(this.#dirty_effects, this.#maybe_dirty_effects);
1513
1530
  }
1514
1531
  /**
1515
1532
  * Defer an effect inside a pending boundary until the boundary resolves
@@ -1748,11 +1765,13 @@ function execute_derived(derived2) {
1748
1765
  return value;
1749
1766
  }
1750
1767
  function update_derived(derived2) {
1768
+ var old_value = derived2.v;
1751
1769
  var value = execute_derived(derived2);
1752
1770
  if (!derived2.equals(value)) {
1753
1771
  derived2.wv = increment_write_version();
1754
1772
  if (!current_batch?.is_fork || derived2.deps === null) {
1755
1773
  derived2.v = value;
1774
+ current_batch?.capture(derived2, old_value);
1756
1775
  if (derived2.deps === null) {
1757
1776
  set_signal_status(derived2, CLEAN);
1758
1777
  return;
@@ -1848,7 +1867,9 @@ function internal_set(source2, value, updated_during_traversal = null) {
1848
1867
  if ((source2.f & DIRTY) !== 0) {
1849
1868
  execute_derived(derived2);
1850
1869
  }
1851
- update_derived_status(derived2);
1870
+ if (batch_values === null) {
1871
+ update_derived_status(derived2);
1872
+ }
1852
1873
  }
1853
1874
  source2.wv = increment_write_version();
1854
1875
  mark_reactions(source2, DIRTY, updated_during_traversal);
@@ -2788,42 +2809,20 @@ function untrack(fn) {
2788
2809
  untracking = previous_untracking;
2789
2810
  }
2790
2811
  }
2791
- const DOM_BOOLEAN_ATTRIBUTES = [
2792
- "allowfullscreen",
2793
- "async",
2794
- "autofocus",
2795
- "autoplay",
2796
- "checked",
2797
- "controls",
2798
- "default",
2799
- "disabled",
2800
- "formnovalidate",
2801
- "indeterminate",
2802
- "inert",
2803
- "ismap",
2804
- "loop",
2805
- "multiple",
2806
- "muted",
2807
- "nomodule",
2808
- "novalidate",
2809
- "open",
2810
- "playsinline",
2811
- "readonly",
2812
- "required",
2813
- "reversed",
2814
- "seamless",
2815
- "selected",
2816
- "webkitdirectory",
2817
- "defer",
2818
- "disablepictureinpicture",
2819
- "disableremoteplayback"
2820
- ];
2821
- function is_boolean_attribute(name) {
2822
- return DOM_BOOLEAN_ATTRIBUTES.includes(name);
2823
- }
2824
- const PASSIVE_EVENTS = ["touchstart", "touchmove"];
2825
- function is_passive_event(name) {
2826
- return PASSIVE_EVENTS.includes(name);
2812
+ function subscribe_to_store(store, run, invalidate) {
2813
+ if (store == null) {
2814
+ run(void 0);
2815
+ if (invalidate) invalidate(void 0);
2816
+ return noop;
2817
+ }
2818
+ const unsub = untrack(
2819
+ () => store.subscribe(
2820
+ run,
2821
+ // @ts-expect-error
2822
+ invalidate
2823
+ )
2824
+ );
2825
+ return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
2827
2826
  }
2828
2827
  const event_symbol = /* @__PURE__ */ Symbol("events");
2829
2828
  const all_registered_events = /* @__PURE__ */ new Set();
@@ -2922,6 +2921,43 @@ function assign_nodes(start, end) {
2922
2921
  effect.nodes = { start, end, a: null, t: null };
2923
2922
  }
2924
2923
  }
2924
+ const DOM_BOOLEAN_ATTRIBUTES = [
2925
+ "allowfullscreen",
2926
+ "async",
2927
+ "autofocus",
2928
+ "autoplay",
2929
+ "checked",
2930
+ "controls",
2931
+ "default",
2932
+ "disabled",
2933
+ "formnovalidate",
2934
+ "indeterminate",
2935
+ "inert",
2936
+ "ismap",
2937
+ "loop",
2938
+ "multiple",
2939
+ "muted",
2940
+ "nomodule",
2941
+ "novalidate",
2942
+ "open",
2943
+ "playsinline",
2944
+ "readonly",
2945
+ "required",
2946
+ "reversed",
2947
+ "seamless",
2948
+ "selected",
2949
+ "webkitdirectory",
2950
+ "defer",
2951
+ "disablepictureinpicture",
2952
+ "disableremoteplayback"
2953
+ ];
2954
+ function is_boolean_attribute(name) {
2955
+ return DOM_BOOLEAN_ATTRIBUTES.includes(name);
2956
+ }
2957
+ const PASSIVE_EVENTS = ["touchstart", "touchmove"];
2958
+ function is_passive_event(name) {
2959
+ return PASSIVE_EVENTS.includes(name);
2960
+ }
2925
2961
  function mount(component, options) {
2926
2962
  return _mount(component, options);
2927
2963
  }
@@ -3078,6 +3114,109 @@ function unmount(component, options) {
3078
3114
  }
3079
3115
  return Promise.resolve();
3080
3116
  }
3117
+ function asClassComponent$1(component) {
3118
+ return class extends Svelte4Component {
3119
+ /** @param {any} options */
3120
+ constructor(options) {
3121
+ super({
3122
+ component,
3123
+ ...options
3124
+ });
3125
+ }
3126
+ };
3127
+ }
3128
+ class Svelte4Component {
3129
+ /** @type {any} */
3130
+ #events;
3131
+ /** @type {Record<string, any>} */
3132
+ #instance;
3133
+ /**
3134
+ * @param {ComponentConstructorOptions & {
3135
+ * component: any;
3136
+ * }} options
3137
+ */
3138
+ constructor(options) {
3139
+ var sources = /* @__PURE__ */ new Map();
3140
+ var add_source = (key, value) => {
3141
+ var s = /* @__PURE__ */ mutable_source(value, false, false);
3142
+ sources.set(key, s);
3143
+ return s;
3144
+ };
3145
+ const props = new Proxy(
3146
+ { ...options.props || {}, $$events: {} },
3147
+ {
3148
+ get(target, prop) {
3149
+ return get$1(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
3150
+ },
3151
+ has(target, prop) {
3152
+ if (prop === LEGACY_PROPS) return true;
3153
+ get$1(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
3154
+ return Reflect.has(target, prop);
3155
+ },
3156
+ set(target, prop, value) {
3157
+ set(sources.get(prop) ?? add_source(prop, value), value);
3158
+ return Reflect.set(target, prop, value);
3159
+ }
3160
+ }
3161
+ );
3162
+ this.#instance = (options.hydrate ? hydrate : mount)(options.component, {
3163
+ target: options.target,
3164
+ anchor: options.anchor,
3165
+ props,
3166
+ context: options.context,
3167
+ intro: options.intro ?? false,
3168
+ recover: options.recover,
3169
+ transformError: options.transformError
3170
+ });
3171
+ if (!options?.props?.$$host || options.sync === false) {
3172
+ flushSync();
3173
+ }
3174
+ this.#events = props.$$events;
3175
+ for (const key of Object.keys(this.#instance)) {
3176
+ if (key === "$set" || key === "$destroy" || key === "$on") continue;
3177
+ define_property(this, key, {
3178
+ get() {
3179
+ return this.#instance[key];
3180
+ },
3181
+ /** @param {any} value */
3182
+ set(value) {
3183
+ this.#instance[key] = value;
3184
+ },
3185
+ enumerable: true
3186
+ });
3187
+ }
3188
+ this.#instance.$set = /** @param {Record<string, any>} next */
3189
+ (next2) => {
3190
+ Object.assign(props, next2);
3191
+ };
3192
+ this.#instance.$destroy = () => {
3193
+ unmount(this.#instance);
3194
+ };
3195
+ }
3196
+ /** @param {Record<string, any>} props */
3197
+ $set(props) {
3198
+ this.#instance.$set(props);
3199
+ }
3200
+ /**
3201
+ * @param {string} event
3202
+ * @param {(...args: any[]) => any} callback
3203
+ * @returns {any}
3204
+ */
3205
+ $on(event, callback) {
3206
+ this.#events[event] = this.#events[event] || [];
3207
+ const cb = (...args) => callback.call(this, ...args);
3208
+ this.#events[event].push(cb);
3209
+ return () => {
3210
+ this.#events[event] = this.#events[event].filter(
3211
+ /** @param {any} fn */
3212
+ (fn) => fn !== cb
3213
+ );
3214
+ };
3215
+ }
3216
+ $destroy() {
3217
+ this.#instance.$destroy();
3218
+ }
3219
+ }
3081
3220
  const ATTR_REGEX = /[&"<]/g;
3082
3221
  const CONTENT_REGEX = /[&<]/g;
3083
3222
  function escape_html(value, is_attr) {
@@ -3248,124 +3387,6 @@ function to_style(value, styles) {
3248
3387
  }
3249
3388
  return value == null ? null : String(value);
3250
3389
  }
3251
- function asClassComponent$1(component) {
3252
- return class extends Svelte4Component {
3253
- /** @param {any} options */
3254
- constructor(options) {
3255
- super({
3256
- component,
3257
- ...options
3258
- });
3259
- }
3260
- };
3261
- }
3262
- class Svelte4Component {
3263
- /** @type {any} */
3264
- #events;
3265
- /** @type {Record<string, any>} */
3266
- #instance;
3267
- /**
3268
- * @param {ComponentConstructorOptions & {
3269
- * component: any;
3270
- * }} options
3271
- */
3272
- constructor(options) {
3273
- var sources = /* @__PURE__ */ new Map();
3274
- var add_source = (key, value) => {
3275
- var s = /* @__PURE__ */ mutable_source(value, false, false);
3276
- sources.set(key, s);
3277
- return s;
3278
- };
3279
- const props = new Proxy(
3280
- { ...options.props || {}, $$events: {} },
3281
- {
3282
- get(target, prop) {
3283
- return get$1(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
3284
- },
3285
- has(target, prop) {
3286
- if (prop === LEGACY_PROPS) return true;
3287
- get$1(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
3288
- return Reflect.has(target, prop);
3289
- },
3290
- set(target, prop, value) {
3291
- set(sources.get(prop) ?? add_source(prop, value), value);
3292
- return Reflect.set(target, prop, value);
3293
- }
3294
- }
3295
- );
3296
- this.#instance = (options.hydrate ? hydrate : mount)(options.component, {
3297
- target: options.target,
3298
- anchor: options.anchor,
3299
- props,
3300
- context: options.context,
3301
- intro: options.intro ?? false,
3302
- recover: options.recover,
3303
- transformError: options.transformError
3304
- });
3305
- if (!options?.props?.$$host || options.sync === false) {
3306
- flushSync();
3307
- }
3308
- this.#events = props.$$events;
3309
- for (const key of Object.keys(this.#instance)) {
3310
- if (key === "$set" || key === "$destroy" || key === "$on") continue;
3311
- define_property(this, key, {
3312
- get() {
3313
- return this.#instance[key];
3314
- },
3315
- /** @param {any} value */
3316
- set(value) {
3317
- this.#instance[key] = value;
3318
- },
3319
- enumerable: true
3320
- });
3321
- }
3322
- this.#instance.$set = /** @param {Record<string, any>} next */
3323
- (next2) => {
3324
- Object.assign(props, next2);
3325
- };
3326
- this.#instance.$destroy = () => {
3327
- unmount(this.#instance);
3328
- };
3329
- }
3330
- /** @param {Record<string, any>} props */
3331
- $set(props) {
3332
- this.#instance.$set(props);
3333
- }
3334
- /**
3335
- * @param {string} event
3336
- * @param {(...args: any[]) => any} callback
3337
- * @returns {any}
3338
- */
3339
- $on(event, callback) {
3340
- this.#events[event] = this.#events[event] || [];
3341
- const cb = (...args) => callback.call(this, ...args);
3342
- this.#events[event].push(cb);
3343
- return () => {
3344
- this.#events[event] = this.#events[event].filter(
3345
- /** @param {any} fn */
3346
- (fn) => fn !== cb
3347
- );
3348
- };
3349
- }
3350
- $destroy() {
3351
- this.#instance.$destroy();
3352
- }
3353
- }
3354
- function subscribe_to_store(store, run, invalidate) {
3355
- if (store == null) {
3356
- run(void 0);
3357
- if (invalidate) invalidate(void 0);
3358
- return noop;
3359
- }
3360
- const unsub = untrack(
3361
- () => store.subscribe(
3362
- run,
3363
- // @ts-expect-error
3364
- invalidate
3365
- )
3366
- );
3367
- return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
3368
- }
3369
3390
  const BLOCK_OPEN = `<!--${HYDRATION_START}-->`;
3370
3391
  const BLOCK_OPEN_ELSE = `<!--${HYDRATION_START_ELSE}-->`;
3371
3392
  const BLOCK_CLOSE = `<!--${HYDRATION_END}-->`;
@@ -4649,4 +4670,4 @@ function get(store) {
4649
4670
  }
4650
4671
 
4651
4672
  export { derived as A, unsubscribe_stores as B, getContext as C, DevalueError as D, ensure_array_like as E, clsx as F, attributes as G, await_block as H, is_array as I, get_prototype_of as J, object_prototype as K, noop as L, bind_props as M, ssr_context as N, get as O, is_plain_object as a, stringify_string as b, browser as c, decode_pathname as d, enumerable_symbols as e, disable_search as f, get_type as g, decode_params as h, is_primitive as i, resolve as j, readable as k, writable as l, make_trackable as m, normalize_path as n, head as o, attr as p, stringify as q, root as r, stringify_key as s, store_get as t, uneval as u, valid_array_indices as v, with_request_store as w, escape_html as x, attr_class as y, derived$1 as z };
4652
- //# sourceMappingURL=index-CUeePJRv.js.map
4673
+ //# sourceMappingURL=index-Dqbd-Nxp.js.map