@yuneta/gobj-js 7.25.6 → 7.25.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1219,13 +1219,14 @@
1219
1219
  let c = Xn(e, a, "subs_flag", 0, zt.KW_REQUIRED), f = Zn(e, a, "event", "", zt.KW_REQUIRED);
1220
1220
  if (Wn(f) || 0 === Yn(f, t)) {
1221
1221
  tr(e, a, "__config__", null, 0);
1222
- let l = tr(e, a, "__global__", null, 0), s = tr(e, a, "__local__", null, 0), f = nr(e, a, "__filter__", null, 0), g = r, d = 1;
1223
- if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, t, g, u) : In(f) > 0 && (d = sr(g, f) ? 1 : 0, o && (L(n("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", d ? "👍" : "👎", t || "", et(u), et(e))), hn(f))), d < 0) break;
1224
- if (!d) continue;
1225
- let b = kt(u, t, !0);
1226
- if (b && b.event_flag & D.EVF_SYSTEM_EVENT && !It(u, b.event_name, 0)) continue;
1227
- s && Jn(g, s), l && yn(g, l), o && (L(1 === C ? n("🔝🔄 %s (%s) %s%s", t || "", t || "", u.running ? "" : "!!", et(u)) : n("🔝🔄 mach(%s%s), st: %s, ev: %s, from(%s%s)", u.running ? "" : "!!", et(u), At(u), t || "", e && !e.running ? "!!" : "", et(e))), H(e) && An(g) && hn(g));
1228
- let p = Ft(u, t, g, e);
1222
+ let l = tr(e, a, "__global__", null, 0), s = tr(e, a, "__local__", null, 0), f = nr(e, a, "__filter__", null, 0), g = 1;
1223
+ if (e.gclass.gmt.mt_publication_filter ? g = e.gclass.gmt.mt_publication_filter(e, t, r, u) : In(f) > 0 && (g = sr(r, f) ? 1 : 0, o && (L(n("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", g ? "👍" : "👎", t || "", et(u), et(e))), hn(f))), g < 0) break;
1224
+ if (!g) continue;
1225
+ let d = kt(u, t, !0);
1226
+ if (d && d.event_flag & D.EVF_SYSTEM_EVENT && !It(u, d.event_name, 0)) continue;
1227
+ let b = r;
1228
+ (In(s) > 0 || In(l) > 0) && (b = Object.assign({}, r)), In(s) > 0 && Jn(b, s), In(l) > 0 && yn(b, En(l)), o && (L(1 === C ? n("🔝🔄 %s (%s) %s%s", t || "", t || "", u.running ? "" : "!!", et(u)) : n("🔝🔄 mach(%s%s), st: %s, ev: %s, from(%s%s)", u.running ? "" : "!!", et(u), At(u), t || "", e && !e.running ? "!!" : "", et(e))), H(e) && An(b) && hn(b));
1229
+ let p = Ft(u, t, b, e);
1229
1230
  if (p < 0 && c & Gt.__own_event__) {
1230
1231
  i = -1;
1231
1232
  break;
@@ -1584,9 +1585,15 @@
1584
1585
  let l = n.split("`");
1585
1586
  if (l.length <= 1) return t[n] = r, 0;
1586
1587
  let o = l.length;
1587
- for (let e = 0; e < o; e++) {
1588
- let n = l[e];
1589
- e === o - 1 ? t[n] = r : (void 0 === t[n] && (t[n] = {}), t = t[n]);
1588
+ for (let s = 0; s < o; s++) {
1589
+ let i = l[s];
1590
+ if (s === o - 1) t[i] = r;
1591
+ else {
1592
+ let r = t[i];
1593
+ if (void 0 === r) t[i] = {};
1594
+ else if (!Cn(r) && !Ln(r)) return dn(`${e ? et(e) + ": " : ""}kw_set_dict_value(): segment '${i}' is not a dict or a list: '${n}'`), -1;
1595
+ t = t[i];
1596
+ }
1590
1597
  }
1591
1598
  return 0;
1592
1599
  }
@@ -2484,7 +2491,7 @@
2484
2491
  },
2485
2492
  mt_inject_event: function(e, t, n, r) {
2486
2493
  if ("ST_SESSION" !== At(e)) return window.console.error("Not in session"), -1;
2487
- if (n || (n = {}), Er(e, n, ll));
2494
+ if (n = Object.assign({}, Cn(n) ? n : {}), Cn(n.__md_iev__) && (n.__md_iev__ = En(n.__md_iev__)), Er(e, n, ll));
2488
2495
  else {
2489
2496
  let l = bl(e, Xe(r), Zn(e, n, "__service__", 0, 0));
2490
2497
  On(n, "__service__"), hr(e, n, "__message__", t), hr(e, n, ll, l);