use-abcd 1.6.3 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { useMemo as le, useSyncExternalStore as v, useCallback as g } from "react";
2
- import { b as oe, c as G, d as bt, e as fe, f as Je, h as he, j as Ye, S as ze, i as W, k as Ge, l as mt, n as Xe, o as St, p as V, q as gt, r as wt, s as vt, t as Ct, u as Mt, v as Ze, w as xt, x as ke, y as Ot, z as Pt, A as Rt, B as de, C as Et, D as It, E as Nt, F as zt, a as z, m as K, g as be } from "./chunks/utils-C2wXstxP.js";
2
+ import { b as oe, c as G, d as mt, e as fe, f as Je, h as he, j as Ye, S as ze, i as W, k as Ge, l as St, n as Xe, o as gt, p as V, q as wt, r as vt, s as Ct, t as Mt, u as xt, v as Ze, w as Ot, x as ke, y as Pt, z as Rt, A as Et, B as de, C as It, D as Nt, E as zt, F as At, a as z, m as K, g as be } from "./chunks/utils-C2wXstxP.js";
3
3
  import { H as Ts, G as qs } from "./chunks/utils-C2wXstxP.js";
4
4
  import { c as $s } from "./chunks/client-lHRDCo64.js";
5
5
  const b = {
6
6
  Remove: "remove",
7
7
  Replace: "replace",
8
8
  Add: "add"
9
- }, et = Symbol.for("__MUTATIVE_PROXY_DRAFT__"), At = Symbol("__MUTATIVE_RAW_RETURN_SYMBOL__"), ee = Symbol.iterator, O = {
9
+ }, et = Symbol.for("__MUTATIVE_PROXY_DRAFT__"), Ft = Symbol("__MUTATIVE_RAW_RETURN_SYMBOL__"), ee = Symbol.iterator, O = {
10
10
  mutable: "mutable",
11
11
  immutable: "immutable"
12
12
  }, xe = {};
@@ -65,20 +65,20 @@ function tt(e, t = []) {
65
65
  return tt(e.parent, t);
66
66
  t.reverse();
67
67
  try {
68
- Ft(e.copy, t);
68
+ jt(e.copy, t);
69
69
  } catch {
70
70
  return null;
71
71
  }
72
72
  return t;
73
73
  }
74
- function Q(e) {
74
+ function $(e) {
75
75
  return Array.isArray(e) ? 1 : e instanceof Map ? 2 : e instanceof Set ? 3 : 0;
76
76
  }
77
77
  function F(e, t) {
78
- return Q(e) === 2 ? e.get(t) : e[t];
78
+ return $(e) === 2 ? e.get(t) : e[t];
79
79
  }
80
80
  function Z(e, t, n) {
81
- Q(e) === 2 ? e.set(t, n) : e[t] = n;
81
+ $(e) === 2 ? e.set(t, n) : e[t] = n;
82
82
  }
83
83
  function pe(e, t) {
84
84
  const n = h(e);
@@ -98,15 +98,15 @@ function q(e, t) {
98
98
  return s.indexOf("/") === -1 && s.indexOf("~") === -1 ? s : s.replace(/~/g, "~0").replace(/\//g, "~1");
99
99
  }).join("/");
100
100
  }
101
- function Ft(e, t) {
101
+ function jt(e, t) {
102
102
  for (let n = 0; n < t.length - 1; n += 1) {
103
103
  const s = t[n];
104
- if (e = F(Q(e) === 3 ? Array.from(e) : e, s), typeof e != "object")
104
+ if (e = F($(e) === 3 ? Array.from(e) : e, s), typeof e != "object")
105
105
  throw new Error(`Cannot resolve patch at '${t.join("/")}'.`);
106
106
  }
107
107
  return e;
108
108
  }
109
- function jt(e) {
109
+ function Dt(e) {
110
110
  const t = Object.create(Object.getPrototypeOf(e));
111
111
  return Reflect.ownKeys(e).forEach((n) => {
112
112
  let s = Reflect.getOwnPropertyDescriptor(e, n);
@@ -122,7 +122,7 @@ function jt(e) {
122
122
  }), Reflect.defineProperty(t, n, s);
123
123
  }), t;
124
124
  }
125
- const Dt = Object.prototype.propertyIsEnumerable;
125
+ const Tt = Object.prototype.propertyIsEnumerable;
126
126
  function nt(e, t) {
127
127
  let n;
128
128
  if (Array.isArray(e))
@@ -141,7 +141,7 @@ function nt(e, t) {
141
141
  return new Map(e);
142
142
  } else if (t?.mark && (n = t.mark(e, O), n !== void 0) && n !== O.mutable) {
143
143
  if (n === O.immutable)
144
- return jt(e);
144
+ return Dt(e);
145
145
  if (typeof n == "function") {
146
146
  if (t.enablePatches || t.enableAutoFreeze)
147
147
  throw new Error("You can't use mark and patches or auto freeze together.");
@@ -153,7 +153,7 @@ function nt(e, t) {
153
153
  return Object.keys(e).forEach((i) => {
154
154
  s[i] = e[i];
155
155
  }), Object.getOwnPropertySymbols(e).forEach((i) => {
156
- Dt.call(e, i) && (s[i] = e[i]);
156
+ Tt.call(e, i) && (s[i] = e[i]);
157
157
  }), s;
158
158
  } else
159
159
  throw new Error("Please check mark() to ensure that it is a stable marker draftable function.");
@@ -200,7 +200,7 @@ function E(e) {
200
200
  function Fe() {
201
201
  throw new Error("Cannot modify frozen object");
202
202
  }
203
- function B(e, t, n, s, i) {
203
+ function U(e, t, n, s, i) {
204
204
  {
205
205
  n = n ?? /* @__PURE__ */ new WeakMap(), s = s ?? [], i = i ?? [];
206
206
  const o = n.has(e) ? n.get(e) : e;
@@ -221,33 +221,33 @@ function B(e, t, n, s, i) {
221
221
  s.pop(), i.pop();
222
222
  return;
223
223
  }
224
- switch (Q(e)) {
224
+ switch ($(e)) {
225
225
  case 2:
226
226
  for (const [c, a] of e)
227
- B(c, c, n, s, i), B(a, c, n, s, i);
227
+ U(c, c, n, s, i), U(a, c, n, s, i);
228
228
  e.set = e.clear = e.delete = Fe;
229
229
  break;
230
230
  case 3:
231
231
  for (const c of e)
232
- B(c, c, n, s, i);
232
+ U(c, c, n, s, i);
233
233
  e.add = e.clear = e.delete = Fe;
234
234
  break;
235
235
  case 1:
236
236
  Object.freeze(e);
237
237
  let o = 0;
238
238
  for (const c of e)
239
- B(c, o, n, s, i), o += 1;
239
+ U(c, o, n, s, i), o += 1;
240
240
  break;
241
241
  default:
242
242
  Object.freeze(e), Object.keys(e).forEach((c) => {
243
243
  const a = e[c];
244
- B(a, c, n, s, i);
244
+ U(a, c, n, s, i);
245
245
  });
246
246
  }
247
247
  s.pop(), i.pop();
248
248
  }
249
249
  function Ee(e, t) {
250
- const n = Q(e);
250
+ const n = $(e);
251
251
  if (n === 0)
252
252
  Reflect.ownKeys(e).forEach((s) => {
253
253
  t(s, e[s], e);
@@ -279,7 +279,7 @@ function st(e, t, n) {
279
279
  });
280
280
  }
281
281
  }
282
- function Tt(e, t) {
282
+ function qt(e, t) {
283
283
  const n = e.type === 3 ? e.setMap : e.copy;
284
284
  e.finalities.revoke.length > 1 && e.assignedMap.get(t) && n && st(F(n, t), e.finalities.handledSet, e.options);
285
285
  }
@@ -308,10 +308,10 @@ function Ie(e, t, n, s) {
308
308
  }
309
309
  }), e.options.enableAutoFreeze && i.finalities !== e.finalities && (e.options.enableAutoFreeze = !1)), R(n, e.options) && e.finalities.draft.push(() => {
310
310
  const r = e.type === 3 ? e.setMap : e.copy;
311
- A(F(r, t), n) && Tt(e, t);
311
+ A(F(r, t), n) && qt(e, t);
312
312
  });
313
313
  }
314
- function qt(e, t, n, s, i) {
314
+ function Qt(e, t, n, s, i) {
315
315
  let { original: r, assignedMap: o, options: c } = e, a = e.copy;
316
316
  a.length < r.length && ([r, a] = [a, r], [n, s] = [s, n]);
317
317
  for (let u = 0; u < r.length; u += 1)
@@ -357,7 +357,7 @@ function qt(e, t, n, s, i) {
357
357
  }
358
358
  }
359
359
  }
360
- function Qt({ original: e, copy: t, assignedMap: n }, s, i, r, o) {
360
+ function $t({ original: e, copy: t, assignedMap: n }, s, i, r, o) {
361
361
  n.forEach((c, a) => {
362
362
  const u = F(e, a), l = te(F(t, a)), f = c ? Y(e, a) ? b.Replace : b.Add : b.Remove;
363
363
  if (A(u, l) && f === b.Replace)
@@ -366,7 +366,7 @@ function Qt({ original: e, copy: t, assignedMap: n }, s, i, r, o) {
366
366
  i.push(f === b.Remove ? { op: f, path: p } : { op: f, path: p, value: l }), r.push(f === b.Add ? { op: b.Remove, path: p } : f === b.Remove ? { op: b.Add, path: p, value: u } : { op: b.Replace, path: p, value: u });
367
367
  });
368
368
  }
369
- function $t({ original: e, copy: t }, n, s, i, r) {
369
+ function Ht({ original: e, copy: t }, n, s, i, r) {
370
370
  let o = 0;
371
371
  e.forEach((c) => {
372
372
  if (!t.has(c)) {
@@ -403,11 +403,11 @@ function X(e, t, n, s) {
403
403
  switch (e.type) {
404
404
  case 0:
405
405
  case 2:
406
- return Qt(e, t, n, s, i);
406
+ return $t(e, t, n, s, i);
407
407
  case 1:
408
- return qt(e, t, n, s, i);
408
+ return Qt(e, t, n, s, i);
409
409
  case 3:
410
- return $t(e, t, n, s, i);
410
+ return Ht(e, t, n, s, i);
411
411
  }
412
412
  }
413
413
  const ce = (e, t, n = !1) => {
@@ -494,7 +494,7 @@ const ce = (e, t, n = !1) => {
494
494
  [ee]() {
495
495
  return this.entries();
496
496
  }
497
- }, Ht = Reflect.ownKeys(we), je = (e, t, { isValuesIterator: n }) => () => {
497
+ }, Bt = Reflect.ownKeys(we), je = (e, t, { isValuesIterator: n }) => () => {
498
498
  var s, i;
499
499
  const r = t.next();
500
500
  if (r.done)
@@ -605,7 +605,7 @@ Set.prototype.difference && Object.assign(ae, {
605
605
  return Set.prototype.isDisjointFrom.call(new Set(this.values()), e);
606
606
  }
607
607
  });
608
- const Bt = Reflect.ownKeys(ae), it = {
608
+ const Ut = Reflect.ownKeys(ae), it = {
609
609
  get(e, t, n) {
610
610
  var s, i;
611
611
  const r = (s = e.copy) === null || s === void 0 ? void 0 : s[t];
@@ -620,9 +620,9 @@ const Bt = Reflect.ownKeys(ae), it = {
620
620
  return e.options.strict && ce(u, e.options, !0), u;
621
621
  }
622
622
  const c = x(e);
623
- if (c instanceof Map && Ht.includes(t))
623
+ if (c instanceof Map && Bt.includes(t))
624
624
  return t === "size" ? Object.getOwnPropertyDescriptor(we, "size").get.call(e.proxy) : we[t].bind(e.proxy);
625
- if (c instanceof Set && Bt.includes(t))
625
+ if (c instanceof Set && Ut.includes(t))
626
626
  return t === "size" ? Object.getOwnPropertyDescriptor(ae, "size").get.call(e.proxy) : ae[t].bind(e.proxy);
627
627
  if (!Y(c, t)) {
628
628
  const u = Ae(c, t);
@@ -692,7 +692,7 @@ const Bt = Reflect.ownKeys(ae), it = {
692
692
  }
693
693
  };
694
694
  function Ne(e) {
695
- const { original: t, parentDraft: n, key: s, finalities: i, options: r } = e, o = Q(t), c = {
695
+ const { original: t, parentDraft: n, key: s, finalities: i, options: r } = e, o = $(t), c = {
696
696
  type: o,
697
697
  finalized: !1,
698
698
  parent: n,
@@ -710,14 +710,14 @@ function Ne(e) {
710
710
  const l = n;
711
711
  l.finalities.draft.push((f, y) => {
712
712
  var p, I;
713
- const $ = h(a);
713
+ const H = h(a);
714
714
  let C = l.type === 3 ? l.setMap : l.copy;
715
715
  const m = F(C, s), S = h(m);
716
716
  if (S) {
717
717
  let _ = S.original;
718
718
  S.operated && (_ = Re(m)), Se(S), ge(S, X, f, y), l.options.enableAutoFreeze && (l.options.updatedValues = (p = l.options.updatedValues) !== null && p !== void 0 ? p : /* @__PURE__ */ new WeakMap(), l.options.updatedValues.set(_, S.original)), Z(C, s, _);
719
719
  }
720
- (I = $.callbacks) === null || I === void 0 || I.forEach((_) => {
720
+ (I = H.callbacks) === null || I === void 0 || I.forEach((_) => {
721
721
  _(f, y);
722
722
  });
723
723
  });
@@ -730,20 +730,20 @@ function Ne(e) {
730
730
  return a;
731
731
  }
732
732
  xe.createDraft = Ne;
733
- function Ut(e, t, n, s, i) {
733
+ function Kt(e, t, n, s, i) {
734
734
  var r;
735
735
  const o = h(e), c = (r = o?.original) !== null && r !== void 0 ? r : e, a = !!t.length;
736
736
  if (o?.operated)
737
737
  for (; o.finalities.draft.length > 0; )
738
738
  o.finalities.draft.pop()(n, s);
739
739
  const u = a ? t[0] : o ? o.operated ? o.copy : o.original : e;
740
- return o && me(o), i && B(u, u, o?.options.updatedValues), [
740
+ return o && me(o), i && U(u, u, o?.options.updatedValues), [
741
741
  u,
742
742
  n && a ? [{ op: b.Replace, path: [], value: t[0] }] : n,
743
743
  s && a ? [{ op: b.Replace, path: [], value: c }] : s
744
744
  ];
745
745
  }
746
- function Kt(e, t) {
746
+ function Wt(e, t) {
747
747
  var n;
748
748
  const s = {
749
749
  draft: [],
@@ -762,7 +762,7 @@ function Kt(e, t) {
762
762
  return [
763
763
  c,
764
764
  (a = []) => {
765
- const [u, l, f] = Ut(c, a, i, r, t.enableAutoFreeze);
765
+ const [u, l, f] = Kt(c, a, i, r, t.enableAutoFreeze);
766
766
  return t.enablePatches ? [u, l, f] : u;
767
767
  }
768
768
  ];
@@ -787,7 +787,7 @@ function rt(e) {
787
787
  const n = h(e);
788
788
  if (!R(e, n?.options))
789
789
  return e;
790
- const s = Q(e);
790
+ const s = $(e);
791
791
  if (n && !n.operated)
792
792
  return n.original;
793
793
  let i;
@@ -819,7 +819,7 @@ function De(e) {
819
819
  throw new Error(`current() is only used for Draft, parameter: ${e}`);
820
820
  return rt(e);
821
821
  }
822
- const Wt = (e) => function t(n, s, i) {
822
+ const Vt = (e) => function t(n, s, i) {
823
823
  var r, o, c;
824
824
  if (typeof n == "function" && typeof s != "function")
825
825
  return function(d, ...N) {
@@ -846,7 +846,7 @@ const Wt = (e) => function t(n, s, i) {
846
846
  };
847
847
  if (!R(f, C) && typeof f == "object" && f !== null)
848
848
  throw new Error("Invalid base state: create() only supports plain objects, arrays, Set, Map or using mark() to mark the state as immutable.");
849
- const [m, S] = Kt(f, C);
849
+ const [m, S] = Wt(f, C);
850
850
  if (typeof s != "function") {
851
851
  if (!R(f, C))
852
852
  throw new Error("Invalid base state: create() only supports plain objects, arrays, Set, Map or using mark() to mark the state as immutable.");
@@ -863,14 +863,14 @@ const Wt = (e) => function t(n, s, i) {
863
863
  if (!T(d)) {
864
864
  if (d !== void 0 && !A(d, m) && N?.operated)
865
865
  throw new Error("Either the value is returned as a new non-draft value, or only the draft is modified without returning any value.");
866
- const L = d?.[At];
866
+ const L = d?.[Ft];
867
867
  if (L) {
868
- const yt = L[0];
868
+ const bt = L[0];
869
869
  return C.strict && typeof d == "object" && d !== null && ve({
870
870
  rootDraft: N,
871
871
  value: d,
872
872
  useRawReturn: !0
873
- }), S([yt]);
873
+ }), S([bt]);
874
874
  }
875
875
  if (d !== void 0)
876
876
  return typeof d == "object" && d !== null && ve({ rootDraft: N, value: d }), S([d]);
@@ -888,19 +888,19 @@ const Wt = (e) => function t(n, s, i) {
888
888
  return _ instanceof Promise ? _.then(j, (d) => {
889
889
  throw me(h(m)), d;
890
890
  }) : j(_);
891
- }, P = Wt();
891
+ }, P = Vt();
892
892
  Object.prototype.constructor.toString();
893
- var Vt = /\s/;
894
- function Lt(e) {
895
- for (var t = e.length; t-- && Vt.test(e.charAt(t)); )
893
+ var Lt = /\s/;
894
+ function Jt(e) {
895
+ for (var t = e.length; t-- && Lt.test(e.charAt(t)); )
896
896
  ;
897
897
  return t;
898
898
  }
899
- var Jt = /^\s+/;
900
- function Yt(e) {
901
- return e && e.slice(0, Lt(e) + 1).replace(Jt, "");
899
+ var Yt = /^\s+/;
900
+ function Gt(e) {
901
+ return e && e.slice(0, Jt(e) + 1).replace(Yt, "");
902
902
  }
903
- var Te = NaN, Gt = /^[-+]0x[0-9a-f]+$/i, Xt = /^0b[01]+$/i, Zt = /^0o[0-7]+$/i, kt = parseInt;
903
+ var Te = NaN, Xt = /^[-+]0x[0-9a-f]+$/i, Zt = /^0b[01]+$/i, kt = /^0o[0-7]+$/i, en = parseInt;
904
904
  function ne(e) {
905
905
  if (typeof e == "number")
906
906
  return e;
@@ -912,25 +912,25 @@ function ne(e) {
912
912
  }
913
913
  if (typeof e != "string")
914
914
  return e === 0 ? e : +e;
915
- e = Yt(e);
916
- var n = Xt.test(e);
917
- return n || Zt.test(e) ? kt(e.slice(2), n ? 2 : 8) : Gt.test(e) ? Te : +e;
915
+ e = Gt(e);
916
+ var n = Zt.test(e);
917
+ return n || kt.test(e) ? en(e.slice(2), n ? 2 : 8) : Xt.test(e) ? Te : +e;
918
918
  }
919
- var qe = 1 / 0, en = 17976931348623157e292;
920
- function tn(e) {
919
+ var qe = 1 / 0, tn = 17976931348623157e292;
920
+ function nn(e) {
921
921
  if (!e)
922
922
  return e === 0 ? e : 0;
923
923
  if (e = ne(e), e === qe || e === -qe) {
924
924
  var t = e < 0 ? -1 : 1;
925
- return t * en;
925
+ return t * tn;
926
926
  }
927
927
  return e === e ? e : 0;
928
928
  }
929
929
  function ot(e) {
930
- var t = tn(e), n = t % 1;
930
+ var t = nn(e), n = t % 1;
931
931
  return t === t ? n ? t - n : t : 0;
932
932
  }
933
- function nn(e, t, n) {
933
+ function sn(e, t, n) {
934
934
  switch (n.length) {
935
935
  case 0:
936
936
  return e.call(t);
@@ -943,50 +943,50 @@ function nn(e, t, n) {
943
943
  }
944
944
  return e.apply(t, n);
945
945
  }
946
- var sn = 800, rn = 16, on = Date.now;
947
- function cn(e) {
946
+ var rn = 800, on = 16, cn = Date.now;
947
+ function an(e) {
948
948
  var t = 0, n = 0;
949
949
  return function() {
950
- var s = on(), i = rn - (s - n);
950
+ var s = cn(), i = on - (s - n);
951
951
  if (n = s, i > 0) {
952
- if (++t >= sn)
952
+ if (++t >= rn)
953
953
  return arguments[0];
954
954
  } else
955
955
  t = 0;
956
956
  return e.apply(void 0, arguments);
957
957
  };
958
958
  }
959
- function an(e) {
959
+ function un(e) {
960
960
  return function() {
961
961
  return e;
962
962
  };
963
963
  }
964
964
  var ue = (function() {
965
965
  try {
966
- var e = bt(Object, "defineProperty");
966
+ var e = mt(Object, "defineProperty");
967
967
  return e({}, "", {}), e;
968
968
  } catch {
969
969
  }
970
- })(), un = ue ? function(e, t) {
970
+ })(), ln = ue ? function(e, t) {
971
971
  return ue(e, "toString", {
972
972
  configurable: !0,
973
973
  enumerable: !1,
974
- value: an(t),
974
+ value: un(t),
975
975
  writable: !0
976
976
  });
977
- } : fe, ln = cn(un);
978
- function fn(e, t) {
977
+ } : fe, fn = an(ln);
978
+ function hn(e, t) {
979
979
  for (var n = -1, s = e == null ? 0 : e.length; ++n < s && t(e[n], n, e) !== !1; )
980
980
  ;
981
981
  return e;
982
982
  }
983
- function hn(e, t, n, s) {
983
+ function dn(e, t, n, s) {
984
984
  for (var i = e.length, r = n + -1; ++r < i; )
985
985
  if (t(e[r], r, e))
986
986
  return r;
987
987
  return -1;
988
988
  }
989
- function dn(e, t, n) {
989
+ function pn(e, t, n) {
990
990
  t == "__proto__" && ue ? ue(e, t, {
991
991
  configurable: !0,
992
992
  enumerable: !0,
@@ -994,24 +994,24 @@ function dn(e, t, n) {
994
994
  writable: !0
995
995
  }) : e[t] = n;
996
996
  }
997
- var pn = Object.prototype, _n = pn.hasOwnProperty;
998
- function yn(e, t, n) {
997
+ var _n = Object.prototype, yn = _n.hasOwnProperty;
998
+ function bn(e, t, n) {
999
999
  var s = e[t];
1000
- (!(_n.call(e, t) && Je(s, n)) || n === void 0 && !(t in e)) && dn(e, t, n);
1000
+ (!(yn.call(e, t) && Je(s, n)) || n === void 0 && !(t in e)) && pn(e, t, n);
1001
1001
  }
1002
1002
  var Qe = Math.max;
1003
- function bn(e, t, n) {
1003
+ function mn(e, t, n) {
1004
1004
  return t = Qe(t === void 0 ? e.length - 1 : t, 0), function() {
1005
1005
  for (var s = arguments, i = -1, r = Qe(s.length - t, 0), o = Array(r); ++i < r; )
1006
1006
  o[i] = s[t + i];
1007
1007
  i = -1;
1008
1008
  for (var c = Array(t + 1); ++i < t; )
1009
1009
  c[i] = s[i];
1010
- return c[t] = n(o), nn(e, this, c);
1010
+ return c[t] = n(o), sn(e, this, c);
1011
1011
  };
1012
1012
  }
1013
- function mn(e, t) {
1014
- return ln(bn(e, t, fe), e + "");
1013
+ function Sn(e, t) {
1014
+ return fn(mn(e, t, fe), e + "");
1015
1015
  }
1016
1016
  function $e(e, t, n) {
1017
1017
  if (!G(n))
@@ -1020,57 +1020,57 @@ function $e(e, t, n) {
1020
1020
  return (s == "number" ? he(n) && Ye(t, n.length) : s == "string" && t in n) ? Je(n[t], e) : !1;
1021
1021
  }
1022
1022
  var He = ze ? ze.isConcatSpreadable : void 0;
1023
- function Sn(e) {
1023
+ function gn(e) {
1024
1024
  return W(e) || Ge(e) || !!(He && e && e[He]);
1025
1025
  }
1026
- function gn(e, t, n, s, i) {
1026
+ function wn(e, t, n, s, i) {
1027
1027
  var r = -1, o = e.length;
1028
- for (n || (n = Sn), i || (i = []); ++r < o; ) {
1028
+ for (n || (n = gn), i || (i = []); ++r < o; ) {
1029
1029
  var c = e[r];
1030
- n(c) ? mt(i, c) : i[i.length] = c;
1030
+ n(c) ? St(i, c) : i[i.length] = c;
1031
1031
  }
1032
1032
  return i;
1033
1033
  }
1034
- function wn(e, t, n) {
1034
+ function vn(e, t, n) {
1035
1035
  var s = -1, i = e.length;
1036
1036
  t < 0 && (t = -t > i ? 0 : i + t), n = n > i ? i : n, n < 0 && (n += i), i = t > n ? 0 : n - t >>> 0, t >>>= 0;
1037
1037
  for (var r = Array(i); ++s < i; )
1038
1038
  r[s] = e[s + t];
1039
1039
  return r;
1040
1040
  }
1041
- var vn = "\\ud800-\\udfff", Cn = "\\u0300-\\u036f", Mn = "\\ufe20-\\ufe2f", xn = "\\u20d0-\\u20ff", On = Cn + Mn + xn, Pn = "\\ufe0e\\ufe0f", Rn = "\\u200d", En = RegExp("[" + Rn + vn + On + Pn + "]");
1042
- function In(e) {
1043
- return En.test(e);
1041
+ var Cn = "\\ud800-\\udfff", Mn = "\\u0300-\\u036f", xn = "\\ufe20-\\ufe2f", On = "\\u20d0-\\u20ff", Pn = Mn + xn + On, Rn = "\\ufe0e\\ufe0f", En = "\\u200d", In = RegExp("[" + En + Cn + Pn + Rn + "]");
1042
+ function Nn(e) {
1043
+ return In.test(e);
1044
1044
  }
1045
- function Nn(e, t, n) {
1045
+ function zn(e, t, n) {
1046
1046
  return e === e && (n !== void 0 && (e = e <= n ? e : n), t !== void 0 && (e = e >= t ? e : t)), e;
1047
1047
  }
1048
- function zn(e, t, n) {
1049
- return n === void 0 && (n = t, t = void 0), n !== void 0 && (n = ne(n), n = n === n ? n : 0), t !== void 0 && (t = ne(t), t = t === t ? t : 0), Nn(ne(e), t, n);
1048
+ function An(e, t, n) {
1049
+ return n === void 0 && (n = t, t = void 0), n !== void 0 && (n = ne(n), n = n === n ? n : 0), t !== void 0 && (t = ne(t), t = t === t ? t : 0), zn(ne(e), t, n);
1050
1050
  }
1051
- function An(e) {
1051
+ function Fn(e) {
1052
1052
  return typeof e == "function" ? e : fe;
1053
1053
  }
1054
1054
  function k(e, t) {
1055
- var n = W(e) ? fn : Xe;
1056
- return n(e, An(t));
1055
+ var n = W(e) ? hn : Xe;
1056
+ return n(e, Fn(t));
1057
1057
  }
1058
- function Fn(e, t) {
1058
+ function jn(e, t) {
1059
1059
  var n = [];
1060
1060
  return Xe(e, function(s, i, r) {
1061
1061
  t(s, i, r) && n.push(s);
1062
1062
  }), n;
1063
1063
  }
1064
1064
  function se(e, t) {
1065
- var n = W(e) ? St : Fn;
1065
+ var n = W(e) ? gt : jn;
1066
1066
  return n(e, V(t));
1067
1067
  }
1068
- function jn(e) {
1068
+ function Dn(e) {
1069
1069
  return function(t, n, s) {
1070
1070
  var i = Object(t);
1071
1071
  if (!he(t)) {
1072
1072
  var r = V(n);
1073
- t = gt(t), n = function(c) {
1073
+ t = wt(t), n = function(c) {
1074
1074
  return r(i[c], c, i);
1075
1075
  };
1076
1076
  }
@@ -1078,43 +1078,43 @@ function jn(e) {
1078
1078
  return o > -1 ? i[r ? t[o] : o] : void 0;
1079
1079
  };
1080
1080
  }
1081
- var Dn = Math.max;
1081
+ var Tn = Math.max;
1082
1082
  function ie(e, t, n) {
1083
1083
  var s = e == null ? 0 : e.length;
1084
1084
  if (!s)
1085
1085
  return -1;
1086
1086
  var i = n == null ? 0 : ot(n);
1087
- return i < 0 && (i = Dn(s + i, 0)), hn(e, V(t), i);
1087
+ return i < 0 && (i = Tn(s + i, 0)), dn(e, V(t), i);
1088
1088
  }
1089
- var Be = jn(ie);
1090
- function Tn(e) {
1089
+ var Be = Dn(ie);
1090
+ function qn(e) {
1091
1091
  return e && e.length ? e[0] : void 0;
1092
1092
  }
1093
- function qn(e, t) {
1093
+ function Qn(e, t) {
1094
1094
  return e > t;
1095
1095
  }
1096
- var Qn = "[object String]";
1097
- function $n(e) {
1098
- return typeof e == "string" || !W(e) && wt(e) && vt(e) == Qn;
1096
+ var $n = "[object String]";
1097
+ function ct(e) {
1098
+ return typeof e == "string" || !W(e) && vt(e) && Ct(e) == $n;
1099
1099
  }
1100
1100
  var Hn = "[object Map]", Bn = "[object Set]", Un = Object.prototype, Kn = Un.hasOwnProperty;
1101
1101
  function Wn(e) {
1102
1102
  if (e == null)
1103
1103
  return !0;
1104
- if (he(e) && (W(e) || typeof e == "string" || typeof e.splice == "function" || Ct(e) || Mt(e) || Ge(e)))
1104
+ if (he(e) && (W(e) || typeof e == "string" || typeof e.splice == "function" || Mt(e) || xt(e) || Ge(e)))
1105
1105
  return !e.length;
1106
1106
  var t = Ze(e);
1107
1107
  if (t == Hn || t == Bn)
1108
1108
  return !e.size;
1109
- if (xt(e))
1109
+ if (Ot(e))
1110
1110
  return !ke(e).length;
1111
1111
  for (var n in e)
1112
1112
  if (Kn.call(e, n))
1113
1113
  return !1;
1114
1114
  return !0;
1115
1115
  }
1116
- function ct(e, t) {
1117
- return Ot(e, t);
1116
+ function at(e, t) {
1117
+ return Pt(e, t);
1118
1118
  }
1119
1119
  var Vn = Array.prototype, Ln = Vn.join;
1120
1120
  function _e(e, t) {
@@ -1123,7 +1123,7 @@ function _e(e, t) {
1123
1123
  function Jn(e, t) {
1124
1124
  return e < t;
1125
1125
  }
1126
- function at(e, t, n) {
1126
+ function ut(e, t, n) {
1127
1127
  for (var s = -1, i = e.length; ++s < i; ) {
1128
1128
  var r = e[s], o = t(r);
1129
1129
  if (o != null && (c === void 0 ? o === o && !oe(o) : n(o, c)))
@@ -1132,24 +1132,24 @@ function at(e, t, n) {
1132
1132
  return a;
1133
1133
  }
1134
1134
  function Ue(e, t) {
1135
- return e && e.length ? at(e, V(t), qn) : void 0;
1135
+ return e && e.length ? ut(e, V(t), Qn) : void 0;
1136
1136
  }
1137
1137
  function Yn(e, t) {
1138
- return e && e.length ? at(e, V(t), Jn) : void 0;
1138
+ return e && e.length ? ut(e, V(t), Jn) : void 0;
1139
1139
  }
1140
1140
  function Gn(e, t, n, s) {
1141
1141
  if (!G(e))
1142
1142
  return e;
1143
- t = Pt(t, e);
1143
+ t = Rt(t, e);
1144
1144
  for (var i = -1, r = t.length, o = r - 1, c = e; c != null && ++i < r; ) {
1145
- var a = Rt(t[i]), u = n;
1145
+ var a = Et(t[i]), u = n;
1146
1146
  if (a === "__proto__" || a === "constructor" || a === "prototype")
1147
1147
  return e;
1148
1148
  if (i != o) {
1149
1149
  var l = c[a];
1150
1150
  u = void 0, u === void 0 && (u = G(l) ? l : Ye(t[i + 1]) ? [] : {});
1151
1151
  }
1152
- yn(c, a, u), c = c[a];
1152
+ bn(c, a, u), c = c[a];
1153
1153
  }
1154
1154
  return e;
1155
1155
  }
@@ -1184,12 +1184,12 @@ function kn(e, t, n) {
1184
1184
  function es(e, t, n) {
1185
1185
  t.length ? t = de(t, function(r) {
1186
1186
  return W(r) ? function(o) {
1187
- return Et(o, r.length === 1 ? r[0] : r);
1187
+ return It(o, r.length === 1 ? r[0] : r);
1188
1188
  } : r;
1189
1189
  }) : t = [fe];
1190
1190
  var s = -1;
1191
- t = de(t, It(V));
1192
- var i = Nt(e, function(r, o, c) {
1191
+ t = de(t, Nt(V));
1192
+ var i = zt(e, function(r, o, c) {
1193
1193
  var a = de(t, function(u) {
1194
1194
  return u(r);
1195
1195
  });
@@ -1199,35 +1199,35 @@ function es(e, t, n) {
1199
1199
  return kn(r, o, n);
1200
1200
  });
1201
1201
  }
1202
- var ts = zt("length"), ut = "\\ud800-\\udfff", ns = "\\u0300-\\u036f", ss = "\\ufe20-\\ufe2f", is = "\\u20d0-\\u20ff", rs = ns + ss + is, os = "\\ufe0e\\ufe0f", cs = "[" + ut + "]", Ce = "[" + rs + "]", Me = "\\ud83c[\\udffb-\\udfff]", as = "(?:" + Ce + "|" + Me + ")", lt = "[^" + ut + "]", ft = "(?:\\ud83c[\\udde6-\\uddff]){2}", ht = "[\\ud800-\\udbff][\\udc00-\\udfff]", us = "\\u200d", dt = as + "?", pt = "[" + os + "]?", ls = "(?:" + us + "(?:" + [lt, ft, ht].join("|") + ")" + pt + dt + ")*", fs = pt + dt + ls, hs = "(?:" + [lt + Ce + "?", Ce, ft, ht, cs].join("|") + ")", Ke = RegExp(Me + "(?=" + Me + ")|" + hs + fs, "g");
1202
+ var ts = At("length"), lt = "\\ud800-\\udfff", ns = "\\u0300-\\u036f", ss = "\\ufe20-\\ufe2f", is = "\\u20d0-\\u20ff", rs = ns + ss + is, os = "\\ufe0e\\ufe0f", cs = "[" + lt + "]", Ce = "[" + rs + "]", Me = "\\ud83c[\\udffb-\\udfff]", as = "(?:" + Ce + "|" + Me + ")", ft = "[^" + lt + "]", ht = "(?:\\ud83c[\\udde6-\\uddff]){2}", dt = "[\\ud800-\\udbff][\\udc00-\\udfff]", us = "\\u200d", pt = as + "?", _t = "[" + os + "]?", ls = "(?:" + us + "(?:" + [ft, ht, dt].join("|") + ")" + _t + pt + ")*", fs = _t + pt + ls, hs = "(?:" + [ft + Ce + "?", Ce, ht, dt, cs].join("|") + ")", Ke = RegExp(Me + "(?=" + Me + ")|" + hs + fs, "g");
1203
1203
  function ds(e) {
1204
1204
  for (var t = Ke.lastIndex = 0; Ke.test(e); )
1205
1205
  ++t;
1206
1206
  return t;
1207
1207
  }
1208
1208
  function ps(e) {
1209
- return In(e) ? ds(e) : ts(e);
1209
+ return Nn(e) ? ds(e) : ts(e);
1210
1210
  }
1211
1211
  function _s(e, t, n) {
1212
1212
  return e == null ? e : Gn(e, t, n);
1213
1213
  }
1214
1214
  var ys = "[object Map]", bs = "[object Set]";
1215
- function U(e) {
1215
+ function Q(e) {
1216
1216
  if (e == null)
1217
1217
  return 0;
1218
1218
  if (he(e))
1219
- return $n(e) ? ps(e) : e.length;
1219
+ return ct(e) ? ps(e) : e.length;
1220
1220
  var t = Ze(e);
1221
1221
  return t == ys || t == bs ? e.size : ke(e).length;
1222
1222
  }
1223
- var re = mn(function(e, t) {
1223
+ var re = Sn(function(e, t) {
1224
1224
  if (e == null)
1225
1225
  return [];
1226
1226
  var n = t.length;
1227
- return n > 1 && $e(e, t[0], t[1]) ? t = [] : n > 2 && $e(t[0], t[1], t[2]) && (t = [t[0]]), es(e, gn(t), []);
1227
+ return n > 1 && $e(e, t[0], t[1]) ? t = [] : n > 2 && $e(t[0], t[1], t[2]) && (t = [t[0]]), es(e, wn(t), []);
1228
1228
  });
1229
1229
  function ms(e, t, n) {
1230
- return e && e.length ? (t = t === void 0 ? 1 : ot(t), wn(e, 0, t < 0 ? 0 : t)) : [];
1230
+ return e && e.length ? (t = t === void 0 ? 1 : ot(t), vn(e, 0, t < 0 ? 0 : t)) : [];
1231
1231
  }
1232
1232
  const Ss = (e, t) => e ? e.type === "create" && t.type === "delete" ? null : e.type === "create" && t.type === "update" ? { ...e, data: t.data } : (e.type === "update" && t.type === "update" || e.type === "update" && t.type === "delete", t) : t;
1233
1233
  class gs {
@@ -1308,7 +1308,7 @@ class gs {
1308
1308
  async _flush() {
1309
1309
  const { isPaused: t, isSyncing: n, queue: s } = this._state;
1310
1310
  if (t || n || Wn(s)) return;
1311
- const i = z(this._config, "batchSize", 1 / 0), r = [...s.entries()], o = ms(r, i), c = r.slice(U(o));
1311
+ const i = z(this._config, "batchSize", 1 / 0), r = [...s.entries()], o = ms(r, i), c = r.slice(Q(o));
1312
1312
  this._updateState((l) => {
1313
1313
  l.inFlight = new Map(o), l.queue = new Map(c), l.isSyncing = !0;
1314
1314
  });
@@ -1320,7 +1320,7 @@ class gs {
1320
1320
  } catch (l) {
1321
1321
  this._handleError(l);
1322
1322
  }
1323
- this._abortController = null, U(this._state.queue) > 0 && !this._state.isPaused && this._scheduleFlush();
1323
+ this._abortController = null, Q(this._state.queue) > 0 && !this._state.isPaused && this._scheduleFlush();
1324
1324
  }
1325
1325
  _processResponse(t) {
1326
1326
  const n = this._state.inFlight, s = new Map((t.syncResults ?? []).map((i) => [i.id, i]));
@@ -1339,11 +1339,11 @@ class gs {
1339
1339
  }
1340
1340
  }
1341
1341
  i.inFlight = /* @__PURE__ */ new Map(), i.isSyncing = !1;
1342
- }), this._config.onServerItems && U(t.items) > 0) {
1342
+ }), this._config.onServerItems && Q(t.items) > 0) {
1343
1343
  const i = new Set((t.syncResults ?? []).map((o) => o.id)), r = (t.items ?? []).filter(
1344
1344
  (o) => !i.has(o.id)
1345
1345
  );
1346
- U(r) > 0 && this._config.onServerItems(r);
1346
+ Q(r) > 0 && this._config.onServerItems(r);
1347
1347
  }
1348
1348
  }
1349
1349
  _handleError(t) {
@@ -1501,7 +1501,7 @@ class We {
1501
1501
  }
1502
1502
  getStatus() {
1503
1503
  const t = this._collection.getItemStatus(this._id);
1504
- return ct(this._cachedStatus, t) || (this._cachedStatus = t), this._cachedStatus;
1504
+ return at(this._cachedStatus, t) || (this._cachedStatus = t), this._cachedStatus;
1505
1505
  }
1506
1506
  exists() {
1507
1507
  return this._collection.getState().items.has(this._id);
@@ -1511,7 +1511,7 @@ class We {
1511
1511
  }
1512
1512
  }
1513
1513
  const Cs = ".";
1514
- function H(e, t) {
1514
+ function B(e, t) {
1515
1515
  const n = e.lastIndexOf(t);
1516
1516
  return n === -1 ? null : e.slice(0, n);
1517
1517
  }
@@ -1551,7 +1551,7 @@ class Le {
1551
1551
  }
1552
1552
  getStatus() {
1553
1553
  const t = this._collection.getItemStatus(this._id);
1554
- return ct(this._cachedStatus, t) || (this._cachedStatus = t), this._cachedStatus;
1554
+ return at(this._cachedStatus, t) || (this._cachedStatus = t), this._cachedStatus;
1555
1555
  }
1556
1556
  _touch(t) {
1557
1557
  this._collection.items.has(t) && this._collection.update(t, (n) => {
@@ -1559,7 +1559,7 @@ class Le {
1559
1559
  });
1560
1560
  }
1561
1561
  getParent() {
1562
- const t = H(this._id, this._separator);
1562
+ const t = B(this._id, this._separator);
1563
1563
  return t ? this._collection.getNode(t) : null;
1564
1564
  }
1565
1565
  getChildren() {
@@ -1576,7 +1576,7 @@ class Le {
1576
1576
  moveUp() {
1577
1577
  const t = this.data;
1578
1578
  if (!t) return;
1579
- const n = H(this._id, this._separator);
1579
+ const n = B(this._id, this._separator);
1580
1580
  if (!n) return;
1581
1581
  const i = this._collection.getNode(n).getChildren(), r = ie(i, (u) => u.id === this._id);
1582
1582
  if (r <= 0) return;
@@ -1594,10 +1594,10 @@ class Le {
1594
1594
  moveDown() {
1595
1595
  const t = this.data;
1596
1596
  if (!t) return;
1597
- const n = H(this._id, this._separator);
1597
+ const n = B(this._id, this._separator);
1598
1598
  if (!n) return;
1599
1599
  const i = this._collection.getNode(n).getChildren(), r = ie(i, (u) => u.id === this._id);
1600
- if (r === -1 || r >= U(i) - 1) return;
1600
+ if (r === -1 || r >= Q(i) - 1) return;
1601
1601
  const o = i[r + 1], c = o.data;
1602
1602
  if (!c) return;
1603
1603
  const a = t.position;
@@ -1611,11 +1611,11 @@ class Le {
1611
1611
  }
1612
1612
  setPosition(t) {
1613
1613
  if (!this.data) return;
1614
- const s = H(this._id, this._separator);
1614
+ const s = B(this._id, this._separator);
1615
1615
  if (!s) return;
1616
1616
  const r = this._collection.getNode(s).getChildren(), o = ie(r, (l) => l.id === this._id);
1617
1617
  if (o === -1) return;
1618
- const c = zn(t, 0, U(r) - 1);
1618
+ const c = An(t, 0, Q(r) - 1);
1619
1619
  if (c === o) return;
1620
1620
  const a = [...r], [u] = a.splice(o, 1);
1621
1621
  a.splice(c, 0, u), this._collection.batch(() => {
@@ -1649,7 +1649,7 @@ class Le {
1649
1649
  move(t, n) {
1650
1650
  const s = this.data;
1651
1651
  if (!s) return;
1652
- const i = H(this._id, this._separator);
1652
+ const i = B(this._id, this._separator);
1653
1653
  if (!i) return;
1654
1654
  if (!n) {
1655
1655
  const o = s.position;
@@ -1712,7 +1712,7 @@ class Le {
1712
1712
  if (t.size === 0) return;
1713
1713
  const s = [...t.keys()];
1714
1714
  let i = Be(s, (c) => !c.includes(this._separator));
1715
- if (i || (i = Tn(re(s, (c) => c.length))), !i) return;
1715
+ if (i || (i = qn(re(s, (c) => c.length))), !i) return;
1716
1716
  const r = this._generateChildId();
1717
1717
  let o;
1718
1718
  if (n !== void 0)
@@ -1744,7 +1744,7 @@ class Le {
1744
1744
  });
1745
1745
  }
1746
1746
  remove() {
1747
- const t = H(this._id, this._separator), n = [...this._collection.items.keys()], s = K(
1747
+ const t = B(this._id, this._separator), n = [...this._collection.items.keys()], s = K(
1748
1748
  se(n, (r) => ye(r, this._id, this._separator)),
1749
1749
  (r) => r
1750
1750
  ), i = [this._id, ...s];
@@ -1757,7 +1757,7 @@ class Le {
1757
1757
  this._collection.selectNode(this._id);
1758
1758
  }
1759
1759
  }
1760
- function _t(e) {
1760
+ function yt(e) {
1761
1761
  const t = /* @__PURE__ */ new Map();
1762
1762
  if (e.serverItems)
1763
1763
  for (const n of e.serverItems)
@@ -1896,9 +1896,11 @@ class M {
1896
1896
  }
1897
1897
  create(t) {
1898
1898
  const { id: n } = t;
1899
- return this._state = P(this._state, (s) => {
1900
- s.items.set(n, t);
1901
- }), this._fetchHandler.invalidateCache(), this._notifySubscribers(), this._syncQueue.enqueue({ id: n, type: "create", data: t }), n;
1899
+ if (ct(n) && Q(n) > 0)
1900
+ return this._state = P(this._state, (s) => {
1901
+ s.items.set(n, t);
1902
+ }), this._fetchHandler.invalidateCache(), this._notifySubscribers(), this._syncQueue.enqueue({ id: n, type: "create", data: t }), n;
1903
+ throw new Error("`id` property should exist and should be non-empty");
1902
1904
  }
1903
1905
  update(t, n) {
1904
1906
  const s = this._state.items.get(t);
@@ -2012,7 +2014,7 @@ class M {
2012
2014
  }
2013
2015
  }
2014
2016
  function Es(e) {
2015
- const t = M.get(e), n = le(() => _t(e), [e.id]), s = v(
2017
+ const t = M.get(e), n = le(() => yt(e), [e.id]), s = v(
2016
2018
  (i) => t.subscribe(i),
2017
2019
  () => t.getState(),
2018
2020
  () => n
@@ -2044,7 +2046,7 @@ function Es(e) {
2044
2046
  };
2045
2047
  }
2046
2048
  function Is(e) {
2047
- const t = e, n = M.get(t), s = le(() => _t(t), [e.id]), i = v(
2049
+ const t = e, n = M.get(t), s = le(() => yt(t), [e.id]), i = v(
2048
2050
  (u) => n.subscribe(u),
2049
2051
  () => n.getState(),
2050
2052
  () => s
@@ -2067,7 +2069,7 @@ function Is(e) {
2067
2069
  const I = K(
2068
2070
  se([...i.items.entries()], ([m]) => l(m, y)),
2069
2071
  ([m, S]) => ({ id: m, position: S.position })
2070
- ), $ = re(I, "position"), C = K($, (m) => f(m.id)).filter(Boolean);
2072
+ ), H = re(I, "position"), C = K(H, (m) => f(m.id)).filter(Boolean);
2071
2073
  return {
2072
2074
  id: p.id,
2073
2075
  type: p.type,
@@ -2145,7 +2147,7 @@ function xs(e) {
2145
2147
  ), o = le(() => e.getChildren(), [n, e]), c = g(() => e.getParent(), [e]), a = g((_, j) => e.append(_, j), [e]), u = g((_, j) => e.prepend(_, j), [e]), l = g(
2146
2148
  (_, j) => e.move(_, j),
2147
2149
  [e]
2148
- ), f = g(() => e.moveUp(), [e]), y = g(() => e.moveDown(), [e]), p = g((_) => e.setPosition(_), [e]), I = g(() => e.clone(), [e]), $ = g(
2150
+ ), f = g(() => e.moveUp(), [e]), y = g(() => e.moveDown(), [e]), p = g((_) => e.setPosition(_), [e]), I = g(() => e.clone(), [e]), H = g(
2149
2151
  (_) => e.updateProp(_),
2150
2152
  [e]
2151
2153
  ), C = g(() => e.remove(), [e]), m = g(() => e.select(), [e]), S = g(() => e.collection.deselectNode(), [e]);
@@ -2165,7 +2167,7 @@ function xs(e) {
2165
2167
  moveDown: y,
2166
2168
  setPosition: p,
2167
2169
  clone: I,
2168
- updateProp: $,
2170
+ updateProp: H,
2169
2171
  remove: C,
2170
2172
  select: m,
2171
2173
  deselect: S
@@ -2253,7 +2255,7 @@ export {
2253
2255
  We as Item,
2254
2256
  Le as Node,
2255
2257
  gs as SyncQueue,
2256
- _t as buildServerSnapshot,
2258
+ yt as buildServerSnapshot,
2257
2259
  Ts as compareTimeIds,
2258
2260
  $s as createSyncClient,
2259
2261
  be as getIdFromTime,