@yuneta/gobj-js 7.25.5 → 7.25.6
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/README.md +7 -0
- package/dist/gobj-js.cjs.js +32 -16
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +72 -68
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +32 -16
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +150 -146
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +32 -16
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +67 -63
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +32 -16
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +67 -63
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.es.min.js
CHANGED
|
@@ -173,7 +173,7 @@ var S = class {
|
|
|
173
173
|
constructor(e, t, n = 0, r = null, l = "", o = null, i = null, s = 0, a = null, u = null, _ = null) {
|
|
174
174
|
this.type = e, this.name = t, this.alias = o, this.flag = n, this.default_value = r, this.header = i, this.fillspace = s, this.description = l, this.json_fn = a, this.schema = u, this.authpth = _;
|
|
175
175
|
}
|
|
176
|
-
}, O = () => new S(0, null), N = (e, t, n, r, l) => new S(e, t, n, r, l), R = (e, t, n, r, l, o) => new S(e, t, 0, null, o, n, null, 0, l, r, null),
|
|
176
|
+
}, O = () => new S(0, null), N = (e, t, n, r, l) => new S(e, t, n, r, l), R = (e, t, n, r, l, o) => new S(e, t, 0, null, o, n, null, 0, l, r, null), w = (e, t, n, r, l, o, i) => new S(e, t, n, null, i, r, null, 0, o, l, null), j = (e, t, n, r, l) => new S(e, t, n, r, l), D = (e, t, n, r, l, o) => new S(e, t, n, null, o, r, null, 0, null, l, null), $ = (e, t, n, r, l) => new S(e, t, n, null, l, null, null, 0, null, null, r), A = (e, t, n, r, l, o) => new S(e, t, n, null, o, null, r, l), I = class {
|
|
177
177
|
constructor(e, t, n, r, l, o, i, s, a) {
|
|
178
178
|
this.gclass_name = e, this.dl_states = [], this.dl_events = [], this.gmt = t, this.lmt = n, this.attrs_table = r, this.priv = l, this.authz_table = o, this.command_table = i, this.s_user_trace_level = s, this.gclass_flag = Number(a) || 0, this.instances = 0, this.trace_level = 0, this.no_trace_level = 0, this.jn_trace_filter = null, this.fsm_checked = !1;
|
|
179
179
|
}
|
|
@@ -231,7 +231,7 @@ function x() {
|
|
|
231
231
|
return W;
|
|
232
232
|
}
|
|
233
233
|
function Y(e) {
|
|
234
|
-
|
|
234
|
+
wr(e) && (e = JSON.stringify(e)), ir(" ".repeat(Math.max(1, 2 * T)) + String(e));
|
|
235
235
|
}
|
|
236
236
|
var B = Object.freeze({
|
|
237
237
|
TRACE_MACHINE: 65536,
|
|
@@ -461,7 +461,7 @@ function Oe(e, t, n, r, l, o, i) {
|
|
|
461
461
|
}
|
|
462
462
|
function Ne(e, t) {
|
|
463
463
|
let n = {};
|
|
464
|
-
if (!
|
|
464
|
+
if (!jr(t)) return rr("sdata_desc MUST be an array"), ar(t), n;
|
|
465
465
|
for (let r = 0; r < t.length; r++) {
|
|
466
466
|
const l = t[r];
|
|
467
467
|
l.name && Re(e, n, l);
|
|
@@ -490,7 +490,7 @@ function Re(e, t, n) {
|
|
|
490
490
|
rr(`JSON parse error: ${e.message}`);
|
|
491
491
|
}
|
|
492
492
|
else r = l;
|
|
493
|
-
|
|
493
|
+
jr(r) || (r = []);
|
|
494
494
|
break;
|
|
495
495
|
case y.DTP_DICT:
|
|
496
496
|
if (Dr(l)) try {
|
|
@@ -499,7 +499,7 @@ function Re(e, t, n) {
|
|
|
499
499
|
rr(`JSON parse error: ${e.message}`);
|
|
500
500
|
}
|
|
501
501
|
else r = l;
|
|
502
|
-
|
|
502
|
+
wr(r) || (r = {});
|
|
503
503
|
break;
|
|
504
504
|
case y.DTP_JSON:
|
|
505
505
|
if (Dr(l)) try {
|
|
@@ -513,7 +513,7 @@ function Re(e, t, n) {
|
|
|
513
513
|
}
|
|
514
514
|
return void 0 === r && (rr(`default_value WRONG, it: ${n.name}, value: ${n.default_value}`), r = null), t[n.name] = r, 0;
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function we(e, t, n, r) {
|
|
517
517
|
let l;
|
|
518
518
|
switch (n.type) {
|
|
519
519
|
case y.DTP_STRING:
|
|
@@ -540,7 +540,7 @@ function je(e, t, n, r) {
|
|
|
540
540
|
rr(`JSON parse error: ${e.message}`);
|
|
541
541
|
}
|
|
542
542
|
else l = r;
|
|
543
|
-
if (!
|
|
543
|
+
if (!jr(l)) return rr(`attr must be an array: ${n.name}`), -1;
|
|
544
544
|
break;
|
|
545
545
|
case y.DTP_DICT:
|
|
546
546
|
if (Dr(r)) try {
|
|
@@ -549,7 +549,7 @@ function je(e, t, n, r) {
|
|
|
549
549
|
rr(`JSON parse error: ${e.message}`);
|
|
550
550
|
}
|
|
551
551
|
else l = r;
|
|
552
|
-
if (!
|
|
552
|
+
if (!wr(l)) return rr(`attr must be an object: ${n.name}`), -1;
|
|
553
553
|
break;
|
|
554
554
|
case y.DTP_JSON:
|
|
555
555
|
if (Dr(r)) try {
|
|
@@ -558,17 +558,17 @@ function je(e, t, n, r) {
|
|
|
558
558
|
rr(`JSON parse error: ${e.message}`);
|
|
559
559
|
}
|
|
560
560
|
else l = r;
|
|
561
|
-
if (!
|
|
561
|
+
if (!jr(l) && !wr(l)) return rr(`attr must be a json dict/list: ${n.name}`), -1;
|
|
562
562
|
break;
|
|
563
563
|
case y.DTP_POINTER: l = r;
|
|
564
564
|
}
|
|
565
|
-
return void 0 === l && rr(`${Dt(e)}: attr undefined: ${n.name}`), t[n.name] = l,
|
|
565
|
+
return void 0 === l && rr(`${Dt(e)}: attr undefined: ${n.name}`), t[n.name] = l, wr(e.priv) && e.priv.hasOwnProperty(n.name) && (e.priv[n.name] = l), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, n.name), 0;
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function je(e) {
|
|
568
568
|
return e.jn_attrs;
|
|
569
569
|
}
|
|
570
570
|
function De(e, t, n) {
|
|
571
|
-
return Qt(e, t) ?
|
|
571
|
+
return Qt(e, t) ? je(e) : e && e.bottom_gobj ? De(e.bottom_gobj, t, n) : (n && rr(`GClass Attribute NOT FOUND: ${Dt(e)}, attr ${t}`), null);
|
|
572
572
|
}
|
|
573
573
|
function $e(e, t, n) {
|
|
574
574
|
if (!(e && e instanceof I)) return n && rr("gclass NULL"), null;
|
|
@@ -705,7 +705,7 @@ function xe(e, t) {
|
|
|
705
705
|
return m[e] || (t && rr(`gobj service not found: ${e}`), null);
|
|
706
706
|
}
|
|
707
707
|
function Ye(e) {
|
|
708
|
-
let t =
|
|
708
|
+
let t = wt(e);
|
|
709
709
|
return t = t.toLowerCase(), m[t] && rr(`service ALREADY REGISTERED: ${t}. Will be UPDATED`), m[t] = e, 0;
|
|
710
710
|
}
|
|
711
711
|
function Be(e, t) {
|
|
@@ -737,10 +737,10 @@ function Ze(e, t, n) {
|
|
|
737
737
|
let o = 0;
|
|
738
738
|
for (const [i, s] of Object.entries(t)) {
|
|
739
739
|
const t = $e(l.gclass, i, !1);
|
|
740
|
-
t ? (-1 === n || t.flag & n) && (t.flag & v.SDF_DEPRECATED && lr(`${Dt(l)}: Deprecated attribute used in gobj creation: ${i}`), o +=
|
|
740
|
+
t ? (-1 === n || t.flag & n) && (t.flag & v.SDF_DEPRECATED && lr(`${Dt(l)}: Deprecated attribute used in gobj creation: ${i}`), o += we(l, e, t, s)) : r && (r(l, i), o--);
|
|
741
741
|
}
|
|
742
742
|
return o;
|
|
743
|
-
})(
|
|
743
|
+
})(je(e), r, -1, e.gclass.gclass_flag & C.gcflag_ignore_unknown_attrs ? 0 : Xe, e) < 0 && (rr(`${Dt(e)} json2data() FAILED`), ar(r));
|
|
744
744
|
}
|
|
745
745
|
function et(e, n, r, l, o) {
|
|
746
746
|
if (o & L.gobj_flag_yuno) {
|
|
@@ -799,7 +799,7 @@ function st(e) {
|
|
|
799
799
|
n && Y(t("💔💔⏩ destroying: %s", $t(e)));
|
|
800
800
|
let r = At(e);
|
|
801
801
|
r && r.gclass.gmt.mt_child_removed && (n && Y(t("👦👦🔴 child_removed(%s): %s", $t(r), Dt(e))), r.gclass.gmt.mt_child_removed(r, e)), e.gobj_flag & L.gobj_flag_service && function(e) {
|
|
802
|
-
let t =
|
|
802
|
+
let t = wt(e);
|
|
803
803
|
t = t.toLowerCase(), m[t] ? delete m[t] : rr(`"service NOT found in register": ${t}`);
|
|
804
804
|
}(e), $n(e, e.dl_subscriptions, !0), $n(e, e.dl_subscribings, !0), r && (Je(r, e), It(e) && (Lt(r) !== e || Ct(r) || Ut(r, null))), function(e) {
|
|
805
805
|
let t = e.dl_children.slice();
|
|
@@ -877,7 +877,7 @@ function St() {
|
|
|
877
877
|
}
|
|
878
878
|
function Ot() {
|
|
879
879
|
let e = St();
|
|
880
|
-
return e ?
|
|
880
|
+
return e ? wt(e) : "";
|
|
881
881
|
}
|
|
882
882
|
function Nt() {
|
|
883
883
|
let e = St();
|
|
@@ -887,14 +887,14 @@ function Rt() {
|
|
|
887
887
|
let e = St();
|
|
888
888
|
return e ? tn(e, "yuno_id") : "";
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function wt(e) {
|
|
891
891
|
return Ur(e) ? e.gobj_name : (rr("gobj bad type"), null);
|
|
892
892
|
}
|
|
893
|
-
function
|
|
893
|
+
function jt(e) {
|
|
894
894
|
return Ur(e) ? e.gclass.gclass_name : (rr("gobj NULL of bad type"), null);
|
|
895
895
|
}
|
|
896
896
|
function Dt(e) {
|
|
897
|
-
return Ur(e) ? e.gclass.gclass_name + "^" +
|
|
897
|
+
return Ur(e) ? e.gclass.gclass_name + "^" + wt(e) : (rr("gobj bad type"), null);
|
|
898
898
|
}
|
|
899
899
|
function $t(e) {
|
|
900
900
|
if (!Ur(e)) return rr("gobj NULL of bad type"), null;
|
|
@@ -978,11 +978,11 @@ function Yt(e, t) {
|
|
|
978
978
|
let n = t.__gclass_name__, r = t.__gobj_name__, l = t.__prefix_gobj_name__;
|
|
979
979
|
t.__disabled__;
|
|
980
980
|
let o = t.__state__;
|
|
981
|
-
if (n && n !==
|
|
982
|
-
if (r && r !==
|
|
981
|
+
if (n && n !== jt(e)) return !1;
|
|
982
|
+
if (r && r !== wt(e)) return !1;
|
|
983
983
|
if (l) {
|
|
984
984
|
let t = l.length;
|
|
985
|
-
if (l !==
|
|
985
|
+
if (l !== wt(e).substring(0, t)) return !1;
|
|
986
986
|
}
|
|
987
987
|
if (o && o !== cn(e)) return !1;
|
|
988
988
|
let i = e.jn_attrs;
|
|
@@ -1026,12 +1026,12 @@ function Ht(e, t) {
|
|
|
1026
1026
|
if (!function(e, t) {
|
|
1027
1027
|
let n = t.split("^"), r = null, l = null;
|
|
1028
1028
|
if (2 === n.length) {
|
|
1029
|
-
if (l = n[0], r = n[1], l !==
|
|
1029
|
+
if (l = n[0], r = n[1], l !== jt(e)) return !1;
|
|
1030
1030
|
} else {
|
|
1031
1031
|
if (1 !== n.length) return !1;
|
|
1032
1032
|
r = n[0];
|
|
1033
1033
|
}
|
|
1034
|
-
return r ===
|
|
1034
|
+
return r === wt(e);
|
|
1035
1035
|
}(e, n[0])) return null;
|
|
1036
1036
|
if (1 === n.length) return e;
|
|
1037
1037
|
let r = n[1].split("^"), l = {};
|
|
@@ -1090,7 +1090,7 @@ function rn(e, n, r, l) {
|
|
|
1090
1090
|
let o, i = e.jn_attrs, s = n.split("`");
|
|
1091
1091
|
if (s.length <= 1) {
|
|
1092
1092
|
let l = n;
|
|
1093
|
-
return l in i && i.hasOwnProperty(l) ? (i[l] = r,
|
|
1093
|
+
return l in i && i.hasOwnProperty(l) ? (i[l] = r, wr(e.priv) && e.priv.hasOwnProperty(l) && (e.priv[l] = r), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, l), 0) : (rr(t("gobj_write_attr(%s): attr not found '%s'", Dt(e), l)), -1);
|
|
1094
1094
|
}
|
|
1095
1095
|
let a = s.length;
|
|
1096
1096
|
for (let t = 0; t < a; t++) {
|
|
@@ -1101,7 +1101,7 @@ function rn(e, n, r, l) {
|
|
|
1101
1101
|
continue;
|
|
1102
1102
|
}
|
|
1103
1103
|
let l = e.jn_attrs;
|
|
1104
|
-
if (o in l && l.hasOwnProperty(o)) return l[o] = r,
|
|
1104
|
+
if (o in l && l.hasOwnProperty(o)) return l[o] = r, wr(e.priv) && e.priv.hasOwnProperty(o) && (e.priv[o] = r), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.mt_writing && e.mt_writing(e, o), 0;
|
|
1105
1105
|
break;
|
|
1106
1106
|
}
|
|
1107
1107
|
return rr(t("gobj_write_attr(%s): attr not found '%s'", Dt(e), o)), -1;
|
|
@@ -1114,31 +1114,31 @@ function ln(e) {
|
|
|
1114
1114
|
const o = r[l];
|
|
1115
1115
|
if (o.name && !(n && o.flag & n) && (-1 === t || o.flag & t)) {
|
|
1116
1116
|
const t = Re(e, e.jn_attrs, o);
|
|
1117
|
-
|
|
1117
|
+
wr(e.priv) && e.priv.hasOwnProperty(o.name) && (e.priv[o.name] = t), e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, o.name);
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
1120
|
return 0;
|
|
1121
1121
|
}(e, v.SDF_VOLATIL, 0);
|
|
1122
1122
|
}
|
|
1123
1123
|
function on(e, t, n, r) {
|
|
1124
|
-
let l =
|
|
1124
|
+
let l = je(e), o = 0;
|
|
1125
1125
|
for (const [r, i] of Object.entries(t)) {
|
|
1126
1126
|
let t = Pt(e, r, !0);
|
|
1127
|
-
t && (-1 === n || t.flag & n) && (o +=
|
|
1127
|
+
t && (-1 === n || t.flag & n) && (o += we(e, l, t, i));
|
|
1128
1128
|
}
|
|
1129
1129
|
return o;
|
|
1130
1130
|
}
|
|
1131
1131
|
function sn(e, t, n) {
|
|
1132
1132
|
let r = De(e, t, !1);
|
|
1133
|
-
return r ? (r[t] = Fr(n),
|
|
1133
|
+
return r ? (r[t] = Fr(n), wr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1134
1134
|
}
|
|
1135
1135
|
function an(e, t, n) {
|
|
1136
1136
|
let r = De(e, t, !1);
|
|
1137
|
-
return r ? (r[t] = parseInt(n),
|
|
1137
|
+
return r ? (r[t] = parseInt(n), wr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1138
1138
|
}
|
|
1139
1139
|
function un(e, t, n) {
|
|
1140
1140
|
let r = De(e, t, !1);
|
|
1141
|
-
return r ? (r[t] = String(n),
|
|
1141
|
+
return r ? (r[t] = String(n), wr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1142
1142
|
}
|
|
1143
1143
|
function _n(e, n) {
|
|
1144
1144
|
if (Ct(e)) return rr("gobj NULL or DESTROYED"), null;
|
|
@@ -1149,7 +1149,7 @@ function _n(e, n) {
|
|
|
1149
1149
|
let l = oe(e, "EV_STATE_CHANGED"), o = !!function(e) {
|
|
1150
1150
|
return Z(e) & B.TRACE_STATES;
|
|
1151
1151
|
}(e);
|
|
1152
|
-
return (l || o) && (1 === W || Y(t("🔀🔀 mach(%s%s^%s), new st(%s), prev st(%s)", e.running ? "" : "!!",
|
|
1152
|
+
return (l || o) && (1 === W || Y(t("🔀🔀 mach(%s%s^%s), new st(%s), prev st(%s)", e.running ? "" : "!!", jt(e), wt(e), cn(e), e.last_state.state_name))), !0;
|
|
1153
1153
|
}
|
|
1154
1154
|
function cn(e) {
|
|
1155
1155
|
return Ur(e) ? e.current_state.state_name : (rr("hgobj NULL"), "");
|
|
@@ -1185,7 +1185,7 @@ function En(e, n, r, l) {
|
|
|
1185
1185
|
event: n,
|
|
1186
1186
|
kw: r,
|
|
1187
1187
|
src: l
|
|
1188
|
-
}), oe(e, n) && !ie(l, n) && Y(t("📬 posted(%s%s), ev: %s, pending: %d", e.running ? "" : "!!", Dt(e), n, pn.length)), mn || (mn = !0, setTimeout(Tn, 0)), 0) : (rr(`gobj_post_event(): event NOT DEFINED in gclass ${
|
|
1188
|
+
}), oe(e, n) && !ie(l, n) && Y(t("📬 posted(%s%s), ev: %s, pending: %d", e.running ? "" : "!!", Dt(e), n, pn.length)), mn || (mn = !0, setTimeout(Tn, 0)), 0) : (rr(`gobj_post_event(): event NOT DEFINED in gclass ${jt(e)}, event ${n}`), -1) : (rr(`gobj_post_event(): gobj dst NULL, event ${n}`), -1);
|
|
1189
1189
|
}
|
|
1190
1190
|
function hn() {
|
|
1191
1191
|
return pn.length;
|
|
@@ -1206,12 +1206,12 @@ function yn(e, n, r, l) {
|
|
|
1206
1206
|
let i = oe(e, n) && !ie(l, n);
|
|
1207
1207
|
T++;
|
|
1208
1208
|
let s = Ce(o, n);
|
|
1209
|
-
if (!s) return e.gclass.gmt.mt_inject_event ? (T--, i && (Y(1 === W ? t("🔜 %s %s%s %s", n || "", e.running ? "" : "!!", Dt(e), o.state_name) : t("🔃 mach(%s%s), st: %s, ev: %s, from(%s%s)", e.running ? "" : "!!", Dt(e), o.state_name, n || "", l && !l.running ? "!!" : "", Dt(l))), r && le(e) && Sr(r) && ar(r)), e.gclass.gmt.mt_inject_event(e, n, r, l)) : (i && Y(t("📛 mach(%s%s^%s), st: %s, ev: %s, 📛📛ERROR Event NOT DEFINED in state📛📛, from(%s%s^%s)", e.running ? "" : "!!",
|
|
1209
|
+
if (!s) return e.gclass.gmt.mt_inject_event ? (T--, i && (Y(1 === W ? t("🔜 %s %s%s %s", n || "", e.running ? "" : "!!", Dt(e), o.state_name) : t("🔃 mach(%s%s), st: %s, ev: %s, from(%s%s)", e.running ? "" : "!!", Dt(e), o.state_name, n || "", l && !l.running ? "!!" : "", Dt(l))), r && le(e) && Sr(r) && ar(r)), e.gclass.gmt.mt_inject_event(e, n, r, l)) : (i && Y(t("📛 mach(%s%s^%s), st: %s, ev: %s, 📛📛ERROR Event NOT DEFINED in state📛📛, from(%s%s^%s)", e.running ? "" : "!!", jt(e), wt(e), o.state_name, n || "", l && !l.running ? "!!" : "", jt(l), wt(l))), rr(`📛📛 Event NOT DEFINED in state 📛📛: ${Dt(e)}, ${o.state_name}, ${n}`), T--, -1);
|
|
1210
1210
|
if (i) {
|
|
1211
1211
|
if (1 === W) Y(t("🔄 %s %s%s %s from %s%s", n || "", e.running ? "" : "!!", Dt(e), o.state_name, l && !l.running ? "!!" : "", Dt(l)));
|
|
1212
1212
|
else {
|
|
1213
1213
|
let r = "";
|
|
1214
|
-
s.action && (r = oo(s.action)), Y(t("🔄 mach(%s%s^%s), st: %s, ev: %s%s%s, ac: %s, from(%s%s^%s)", e.running ? "" : "!!",
|
|
1214
|
+
s.action && (r = oo(s.action)), Y(t("🔄 mach(%s%s^%s), st: %s, ev: %s%s%s, ac: %s, from(%s%s^%s)", e.running ? "" : "!!", jt(e), wt(e), o.state_name, "", n || "", "", r, l && !l.running ? "!!" : "", jt(l), wt(l)));
|
|
1215
1215
|
}
|
|
1216
1216
|
r && le(e) && Sr(r) && ar(r);
|
|
1217
1217
|
}
|
|
@@ -1220,7 +1220,7 @@ function yn(e, n, r, l) {
|
|
|
1220
1220
|
try {
|
|
1221
1221
|
s.action && (a = s.action(e, n, r, l));
|
|
1222
1222
|
} finally {}
|
|
1223
|
-
return !i || 1 === W || e.obflag & U.obflag_destroyed || Y(t("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!",
|
|
1223
|
+
return !i || 1 === W || e.obflag & U.obflag_destroyed || Y(t("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!", jt(e), wt(e), e.current_state.state_name, n || "", $r(a) ? a : 0)), T--, a;
|
|
1224
1224
|
}
|
|
1225
1225
|
var vn = Object.freeze({
|
|
1226
1226
|
__hard_subscription__: 1,
|
|
@@ -1270,14 +1270,14 @@ function Rn(e, t, n, r, l) {
|
|
|
1270
1270
|
for (let o = 0; o < e.length; o++) if (On(e[o], t, n, r, l)) return o;
|
|
1271
1271
|
return -1;
|
|
1272
1272
|
}
|
|
1273
|
-
function
|
|
1273
|
+
function wn(e, n, r, l) {
|
|
1274
1274
|
let o = el(e, n, "publisher", null, Pn.KW_REQUIRED), i = el(e, n, "subscriber", null, Pn.KW_REQUIRED), s = Zr(e, n, "event", "", Pn.KW_REQUIRED);
|
|
1275
1275
|
if (!!(zr(e, n, "subs_flag", null, Pn.KW_REQUIRED) & vn.__hard_subscription__) && !r) return -1;
|
|
1276
1276
|
(ne(i) || ne(o)) && (Y(t("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", s || "", Dt(o), Dt(i))), ar(n)), o.obflag & U.obflag_destroyed || l || o.gclass.gmt.mt_subscription_deleted && o.gclass.gmt.mt_subscription_deleted(o, n);
|
|
1277
1277
|
let a = Rn(o.dl_subscriptions, o, s, n, i);
|
|
1278
1278
|
return a >= 0 ? yr(o.dl_subscriptions, a) : (rr(`${Dt(e)}: subscription in publisher not found`), ar(n)), a = Rn(i.dl_subscribings, o, s, n, i), a >= 0 ? yr(i.dl_subscribings, a) : (rr(`${Dt(e)}: subscription in subscriber not found`), ar(n)), 0;
|
|
1279
1279
|
}
|
|
1280
|
-
function
|
|
1280
|
+
function jn(e, n, r, l) {
|
|
1281
1281
|
if (null == r && (r = {}), !e) return rr(`publisher NULL: ev ${n}`), 0;
|
|
1282
1282
|
if (!l) return rr(`subscriber NULL: ev ${n}`), 0;
|
|
1283
1283
|
const o = /* @__PURE__ */ new Set([
|
|
@@ -1317,7 +1317,7 @@ function wn(e, n, r, l) {
|
|
|
1317
1317
|
if (!s) return rr(`${Dt(e)}: _create_subscription() FAILED`), 0;
|
|
1318
1318
|
if (hr(e.dl_subscriptions, s), hr(l.dl_subscribings, s), (ne(l) || ne(e)) && (Y(t("💜💜👍 subscribing event '%s', publisher '%s', subscriber %s", n || "", Dt(e), Dt(l))), r && (le(l) || le(e)) && ar(r)), e.gclass.gmt.mt_subscription_added) {
|
|
1319
1319
|
let t = e.gclass.gmt.mt_subscription_added(e, s);
|
|
1320
|
-
(t < 0 || !1 === t) && (
|
|
1320
|
+
(t < 0 || !1 === t) && (wn(e, s, !0, !0), s = 0);
|
|
1321
1321
|
}
|
|
1322
1322
|
return s;
|
|
1323
1323
|
}
|
|
@@ -1338,13 +1338,13 @@ function Dn(e, t, n, r) {
|
|
|
1338
1338
|
let o = Nn(e.dl_subscriptions, e, t, n, r), i = 0;
|
|
1339
1339
|
for (let t = 0; t < o.length; t++) {
|
|
1340
1340
|
let n = o[t];
|
|
1341
|
-
|
|
1341
|
+
wn(e, n, !1, !1), i++;
|
|
1342
1342
|
}
|
|
1343
1343
|
return i || (lr(`${Dt(e)}: No subscription found`), ar(n, "No subscription found")), 0;
|
|
1344
1344
|
}
|
|
1345
1345
|
function $n(e, t, n) {
|
|
1346
1346
|
let r = [...t];
|
|
1347
|
-
for (let t = 0; t < r.length; t++)
|
|
1347
|
+
for (let t = 0; t < r.length; t++) wn(e, r[t], n, !1);
|
|
1348
1348
|
return 0;
|
|
1349
1349
|
}
|
|
1350
1350
|
function An(e, t, n, r) {
|
|
@@ -1372,12 +1372,12 @@ function kn(e, t, n, r) {
|
|
|
1372
1372
|
return Nn(e.dl_subscribings, r, t, n, e);
|
|
1373
1373
|
}
|
|
1374
1374
|
function Cn(e, n, r) {
|
|
1375
|
-
if (
|
|
1375
|
+
if (wr(r) || (r = {}), !e || e.obflag & (U.obflag_destroyed | U.obflag_destroying)) return rr("gobj NULL or DESTROYED"), -1;
|
|
1376
1376
|
if (Pr(n)) return rr(`${Dt(e)}: event EMPTY`), -1;
|
|
1377
1377
|
let l = gn(e, n, !0);
|
|
1378
1378
|
if (!(l && l.event_flag & (P.EVF_SYSTEM_EVENT | P.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return rr(`event NOT in output event list: ${Dt(e)}, ev ${n}`), -1;
|
|
1379
1379
|
let o = (ne(e) || oe(e, n)) && !ie(e, n);
|
|
1380
|
-
if (o && (Y(1 === W ? t("🔝🔝 %s %s%s %s", n || "", e.running ? "" : "!!", Dt(e), e.current_state.state_name) : t("🔝🔝 mach(%s%s^%s), st: %s, ev: %s%s%s", e.running ? "" : "!!",
|
|
1380
|
+
if (o && (Y(1 === W ? t("🔝🔝 %s %s%s %s", n || "", e.running ? "" : "!!", Dt(e), e.current_state.state_name) : t("🔝🔝 mach(%s%s^%s), st: %s, ev: %s%s%s", e.running ? "" : "!!", jt(e), wt(e), e.current_state.state_name, "", n || "", "")), le(e) && Sr(r) && ar(r)), e.gclass.gmt.mt_publish_event) {
|
|
1381
1381
|
let t = e.gclass.gmt.mt_publish_event(e, n, r);
|
|
1382
1382
|
if (t <= 0) return t;
|
|
1383
1383
|
}
|
|
@@ -1616,21 +1616,21 @@ function vr(e, t) {
|
|
|
1616
1616
|
return t ? (Array.prototype.push.apply(e, t), e) : e;
|
|
1617
1617
|
}
|
|
1618
1618
|
function Sr(e) {
|
|
1619
|
-
return
|
|
1619
|
+
return wr(e) ? Object.keys(e).length : 0;
|
|
1620
1620
|
}
|
|
1621
1621
|
function Or(e) {
|
|
1622
|
-
return
|
|
1622
|
+
return jr(e) ? e.length : 0;
|
|
1623
1623
|
}
|
|
1624
1624
|
function Nr(e) {
|
|
1625
|
-
return
|
|
1625
|
+
return wr(e) ? Object.keys(e).length : jr(e) ? e.length : Dr(e) && e.length > 0 ? 1 : 0;
|
|
1626
1626
|
}
|
|
1627
1627
|
function Rr(e) {
|
|
1628
1628
|
return 0 === Nr(e);
|
|
1629
1629
|
}
|
|
1630
|
-
function
|
|
1630
|
+
function wr(e) {
|
|
1631
1631
|
return null !== e && "object" == typeof e && !Array.isArray(e);
|
|
1632
1632
|
}
|
|
1633
|
-
function
|
|
1633
|
+
function jr(e) {
|
|
1634
1634
|
return Array.isArray(e);
|
|
1635
1635
|
}
|
|
1636
1636
|
function Dr(e) {
|
|
@@ -1678,7 +1678,7 @@ function Mr(e, t) {
|
|
|
1678
1678
|
return n === r ? 0 : n > r ? 1 : -1;
|
|
1679
1679
|
}
|
|
1680
1680
|
function Wr(e, t) {
|
|
1681
|
-
if (
|
|
1681
|
+
if (wr(e) || wr(t) || jr(e) || jr(t)) return 0;
|
|
1682
1682
|
if ($r(e) || $r(t)) {
|
|
1683
1683
|
let n = Number(e), r = Number(t);
|
|
1684
1684
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
@@ -1714,13 +1714,17 @@ function Jr(e, t) {
|
|
|
1714
1714
|
return !(!(t in e) || !e.hasOwnProperty(t));
|
|
1715
1715
|
}
|
|
1716
1716
|
function qr(e, t, n, r) {
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
if (l
|
|
1721
|
-
let o =
|
|
1722
|
-
for (let
|
|
1723
|
-
|
|
1717
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1718
|
+
const l = e ? `${Dt(e)}: ` : "";
|
|
1719
|
+
if (!wr(t) && !jr(t)) return void rr(`${l}kw must be list or dict: '${String(n)}'`);
|
|
1720
|
+
if (!Dr(n)) return void rr(`${l}path must be a string: ${String(n)}`);
|
|
1721
|
+
let o = n.split("`"), i = o.length;
|
|
1722
|
+
for (let e = 0; e < i - 1; e++) {
|
|
1723
|
+
if (null == (t = t[o[e]])) return void (r && rr(`${l}path not found: '${n}'`));
|
|
1724
|
+
if (!wr(t) && !jr(t)) return void rr(`${l}kw must be list or dict: '${n}'`);
|
|
1725
|
+
}
|
|
1726
|
+
let s = t[o[i - 1]];
|
|
1727
|
+
return void 0 === s && r && rr(`${l}path not found: '${n}'`), s;
|
|
1724
1728
|
}
|
|
1725
1729
|
function Hr(e, t, n) {
|
|
1726
1730
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
@@ -1735,7 +1739,7 @@ function Qr(e, t, n, r, l) {
|
|
|
1735
1739
|
let o = qr(e, t, n, !1);
|
|
1736
1740
|
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT, u = l && l & Pn.KW_WILD_NUMBER;
|
|
1737
1741
|
if (void 0 === o) {
|
|
1738
|
-
if (s) {
|
|
1742
|
+
if (s && t) {
|
|
1739
1743
|
let l = Boolean(r);
|
|
1740
1744
|
return ll(e, t, n, l), l;
|
|
1741
1745
|
}
|
|
@@ -1756,7 +1760,7 @@ function zr(e, t, n, r, l) {
|
|
|
1756
1760
|
let o = qr(e, t, n, !1);
|
|
1757
1761
|
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT, u = l && l & Pn.KW_WILD_NUMBER;
|
|
1758
1762
|
if (void 0 === o) {
|
|
1759
|
-
if (s) {
|
|
1763
|
+
if (s && t) {
|
|
1760
1764
|
let l = parseInt(r);
|
|
1761
1765
|
return ll(e, t, n, l), l;
|
|
1762
1766
|
}
|
|
@@ -1785,7 +1789,7 @@ function Xr(e, t, n, r, l) {
|
|
|
1785
1789
|
let o = qr(e, t, n, !1);
|
|
1786
1790
|
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT, u = l && l & Pn.KW_WILD_NUMBER;
|
|
1787
1791
|
if (void 0 === o) {
|
|
1788
|
-
if (s) {
|
|
1792
|
+
if (s && t) {
|
|
1789
1793
|
let l = Number(r);
|
|
1790
1794
|
return ll(e, t, n, l), l;
|
|
1791
1795
|
}
|
|
@@ -1808,13 +1812,13 @@ function Zr(e, t, n, r, l) {
|
|
|
1808
1812
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1809
1813
|
let o = qr(e, t, n, !1);
|
|
1810
1814
|
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1811
|
-
return void 0 === o ? s ? (ll(e, t, n, Dr(r) ? r : null), r) : (i && !function(e, t) {
|
|
1815
|
+
return void 0 === o ? s && t ? (ll(e, t, n, Dr(r) ? r : null), r) : (i && !function(e, t) {
|
|
1812
1816
|
let n = Dr(t) ? t.split("`") : [], r = e;
|
|
1813
1817
|
for (let e = 0; e < n.length - 1; e++) {
|
|
1814
|
-
if (!
|
|
1818
|
+
if (!wr(r) && !jr(r)) return !1;
|
|
1815
1819
|
r = r[n[e]];
|
|
1816
1820
|
}
|
|
1817
|
-
return !(!
|
|
1821
|
+
return !(!wr(r) && !jr(r) || 0 === n.length) && Object.prototype.hasOwnProperty.call(r, n[n.length - 1]);
|
|
1818
1822
|
}(t, n) && (rr(`path not found: '${n}'`), ar(t)), r) : Dr(o) ? (a && Hr(e, t, n), o) : (null !== o && (rr(`${e ? Dt(e) + ": " : ""}path MUST BE a json str: '${n}'`), ar(t)), r);
|
|
1819
1823
|
}
|
|
1820
1824
|
function el(e, t, n, r, l) {
|
|
@@ -1834,7 +1838,7 @@ function tl(e, t, n, r, l) {
|
|
|
1834
1838
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1835
1839
|
let o = qr(e, t, n, !1);
|
|
1836
1840
|
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1837
|
-
return void 0 === o ? s &&
|
|
1841
|
+
return void 0 === o ? s && wr(r) && t ? (ll(e, t, n, r), r) : (i && (rr(`path not found: '${n}'`), ar(t)), r) : wr(o) ? (a && Hr(e, t, n), o) : (i && (rr(`${e ? Dt(e) + ": " : ""}path MUST BE a json dict: '${n}'`), ar(t)), r);
|
|
1838
1842
|
}
|
|
1839
1843
|
function nl(e, t, n, r, l) {
|
|
1840
1844
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
@@ -1853,10 +1857,10 @@ function rl(e, t, n, r, l) {
|
|
|
1853
1857
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1854
1858
|
let o = qr(e, t, n, !1);
|
|
1855
1859
|
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1856
|
-
return void 0 === o ? s &&
|
|
1860
|
+
return void 0 === o ? s && jr(r) && t ? (ll(e, t, n, r), r) : (i && (rr(`path not found: '${n}'`), ar(t)), r) : jr(o) ? (a && Hr(e, t, n), o) : (i && (rr(`${e ? Dt(e) + ": " : ""}path MUST BE a json list: '${n}'`), ar(t)), r);
|
|
1857
1861
|
}
|
|
1858
1862
|
function ll(e, t, n, r) {
|
|
1859
|
-
if (e && !Ur(e) && rr("GObj bad instanceof"), !
|
|
1863
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !wr(t)) return rr("kw is not an object"), -1;
|
|
1860
1864
|
let l = n.split("`");
|
|
1861
1865
|
if (l.length <= 1) return t[n] = r, 0;
|
|
1862
1866
|
let o = l.length;
|
|
@@ -1867,24 +1871,24 @@ function ll(e, t, n, r) {
|
|
|
1867
1871
|
return 0;
|
|
1868
1872
|
}
|
|
1869
1873
|
function ol(e, t, n, r, l) {
|
|
1870
|
-
if (e && !Ur(e) && rr("GObj bad instanceof"), !
|
|
1874
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !wr(t)) return rr("kw is not an object"), -1;
|
|
1871
1875
|
let o = tl(e, t, n, {}, Pn.KW_CREATE);
|
|
1872
|
-
return
|
|
1876
|
+
return wr(o) ? (o[r] = l, 0) : (rr("subdict is not an object"), -1);
|
|
1873
1877
|
}
|
|
1874
1878
|
function il(e, n, r) {
|
|
1875
1879
|
let l = "", o = !1;
|
|
1876
|
-
if (
|
|
1880
|
+
if (jr(n)) {
|
|
1877
1881
|
o = !1;
|
|
1878
1882
|
for (let i = 0; i < n.length; i++) {
|
|
1879
1883
|
let s = n[i];
|
|
1880
1884
|
if (l = Pr(r) ? t("%s", r) : t("%s`%d", r, i), o = il(e, s, l), o) break;
|
|
1881
1885
|
}
|
|
1882
|
-
} else if (
|
|
1886
|
+
} else if (wr(n)) {
|
|
1883
1887
|
o = !0;
|
|
1884
1888
|
let i = Object.keys(n);
|
|
1885
1889
|
for (let s = 0; s < i.length; s++) {
|
|
1886
1890
|
let a = i[s], u = n[a];
|
|
1887
|
-
if (l = Pr(r) ? t("%s", a) : t("%s`%s", r, a),
|
|
1891
|
+
if (l = Pr(r) ? t("%s", a) : t("%s`%s", r, a), jr(u) || wr(u)) {
|
|
1888
1892
|
if (o = il(e, u, l), !o) break;
|
|
1889
1893
|
continue;
|
|
1890
1894
|
}
|
|
@@ -1905,7 +1909,7 @@ function sl(e, t) {
|
|
|
1905
1909
|
return 0 === Nr(t) || il(e, t, "");
|
|
1906
1910
|
}
|
|
1907
1911
|
function al(e, t, n, r) {
|
|
1908
|
-
if (!n || !
|
|
1912
|
+
if (!n || !jr(t)) return r && rr("item NULL or kw_list is not a list"), -1;
|
|
1909
1913
|
for (let e = 0; e < t.length; e++) if (cr(n, t[e])) return e;
|
|
1910
1914
|
return r && rr("item not found in this list"), -1;
|
|
1911
1915
|
}
|
|
@@ -1913,12 +1917,12 @@ function ul(e, t, n, r) {
|
|
|
1913
1917
|
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return null;
|
|
1914
1918
|
r || (r = sl);
|
|
1915
1919
|
let l = [];
|
|
1916
|
-
if (
|
|
1920
|
+
if (jr(t)) for (let e = 0; e < t.length; e++) {
|
|
1917
1921
|
let o = t[e];
|
|
1918
1922
|
r(o, n) && l.push(ur(o));
|
|
1919
1923
|
}
|
|
1920
1924
|
else {
|
|
1921
|
-
if (!
|
|
1925
|
+
if (!wr(t)) return rr("kw_select() BAD kw parameter"), null;
|
|
1922
1926
|
r(t, n) && l.push(ur(t));
|
|
1923
1927
|
}
|
|
1924
1928
|
return l;
|
|
@@ -1927,12 +1931,12 @@ function _l(e, t, n, r) {
|
|
|
1927
1931
|
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return null;
|
|
1928
1932
|
r || (r = sl);
|
|
1929
1933
|
let l = [];
|
|
1930
|
-
if (
|
|
1934
|
+
if (jr(t)) for (let e = 0; e < t.length; e++) {
|
|
1931
1935
|
let o = t[e];
|
|
1932
1936
|
r(o, n) && l.push(o);
|
|
1933
1937
|
}
|
|
1934
1938
|
else {
|
|
1935
|
-
if (!
|
|
1939
|
+
if (!wr(t)) return rr("kw_select() BAD kw parameter"), null;
|
|
1936
1940
|
r(t, n) && l.push(t);
|
|
1937
1941
|
}
|
|
1938
1942
|
return l;
|
|
@@ -1943,9 +1947,9 @@ function cl(e, t, n, r) {
|
|
|
1943
1947
|
if (Dr(n) && !Pr(n)) {
|
|
1944
1948
|
let o = n;
|
|
1945
1949
|
t.hasOwnProperty(o) ? l[o] = t[o] : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1946
|
-
} else if (
|
|
1950
|
+
} else if (wr(n) && Sr(n) > 0) for (let o of Object.keys(n)) t.hasOwnProperty(o) ? l[o] = t[o] : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1947
1951
|
else {
|
|
1948
|
-
if (!(
|
|
1952
|
+
if (!(jr(n) && Or(n) > 0)) return t;
|
|
1949
1953
|
for (let o = 0; o < n.length; o++) {
|
|
1950
1954
|
let i = n[o];
|
|
1951
1955
|
t.hasOwnProperty(i) ? l[i] = t[i] : r && rr(`${Dt(e)}: key not found: ${i}`);
|
|
@@ -1958,9 +1962,9 @@ function fl(e, t, n, r) {
|
|
|
1958
1962
|
if (fr(l, t), Dr(n) && !Pr(n)) {
|
|
1959
1963
|
let o = n;
|
|
1960
1964
|
nl(e, t, o, 0, 0) ? pr(l, o) : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1961
|
-
} else if (
|
|
1965
|
+
} else if (wr(n) && Sr(n) > 0) for (let o of Object.keys(n)) t.hasOwnProperty(o) ? pr(l, o) : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1962
1966
|
else {
|
|
1963
|
-
if (!(
|
|
1967
|
+
if (!(jr(n) && Or(n) > 0)) return {};
|
|
1964
1968
|
for (let o = 0; o < n.length; o++) {
|
|
1965
1969
|
let i = n[o];
|
|
1966
1970
|
t.hasOwnProperty(i) ? pr(l, i) : r && rr(`${Dt(e)}: key not found: ${i}`);
|
|
@@ -1995,10 +1999,10 @@ function bl(e) {
|
|
|
1995
1999
|
}
|
|
1996
2000
|
function pl(e, t) {
|
|
1997
2001
|
if (Ir(e) || Ir(t)) return !0;
|
|
1998
|
-
if (
|
|
2002
|
+
if (jr(e)) {
|
|
1999
2003
|
if (0 === e.length) return !0;
|
|
2000
2004
|
for (let n = 0; n < e.length; n++) if (e[n] === t) return !0;
|
|
2001
|
-
} else if (
|
|
2005
|
+
} else if (wr(e)) {
|
|
2002
2006
|
if (0 === Object.keys(e).length) return !0;
|
|
2003
2007
|
for (let n in e) if (n === t) return !0;
|
|
2004
2008
|
} else if (Dr(e) && e === t) return !0;
|
|
@@ -2008,9 +2012,9 @@ function ml(e, t, n, r, l) {
|
|
|
2008
2012
|
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return null;
|
|
2009
2013
|
l || (l = sl);
|
|
2010
2014
|
let o = [];
|
|
2011
|
-
if (
|
|
2015
|
+
if (jr(t)) for (let i = 0; i < t.length; i++) {
|
|
2012
2016
|
let s, a = t[i];
|
|
2013
|
-
if (
|
|
2017
|
+
if (wr(a)) s = Zr(e, a, "id", "", 0);
|
|
2014
2018
|
else {
|
|
2015
2019
|
if (!Dr(a)) continue;
|
|
2016
2020
|
s = a;
|
|
@@ -2018,7 +2022,7 @@ function ml(e, t, n, r, l) {
|
|
|
2018
2022
|
pl(n, s) && l(a, r) && o.push(a);
|
|
2019
2023
|
}
|
|
2020
2024
|
else {
|
|
2021
|
-
if (!
|
|
2025
|
+
if (!wr(t)) return rr("kw_collect() BAD kw parameter"), null;
|
|
2022
2026
|
for (let e of Object.keys(t)) {
|
|
2023
2027
|
let i = t[e];
|
|
2024
2028
|
pl(n, e) && l(i, r) && o.push(i);
|
|
@@ -2029,8 +2033,8 @@ function ml(e, t, n, r, l) {
|
|
|
2029
2033
|
function El(e, t, n) {
|
|
2030
2034
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
2031
2035
|
let r = {};
|
|
2032
|
-
if (Pr(n) || (t = qr(e, t, n)),
|
|
2033
|
-
else if (
|
|
2036
|
+
if (Pr(n) || (t = qr(e, t, n)), wr(t)) r = t;
|
|
2037
|
+
else if (jr(t)) for (let n = 0; n < t.length; n++) {
|
|
2034
2038
|
let l = t[n], o = Zr(e, l, "id", "", Pn.KW_REQUIRED);
|
|
2035
2039
|
Pr(o) || (r[o] = l);
|
|
2036
2040
|
}
|
|
@@ -2038,12 +2042,12 @@ function El(e, t, n) {
|
|
|
2038
2042
|
return r;
|
|
2039
2043
|
}
|
|
2040
2044
|
function hl(e, t, n) {
|
|
2041
|
-
if (e && !Ur(e) && rr("GObj bad instanceof"), Pr(n) || (t = qr(e, t, n)),
|
|
2042
|
-
if (
|
|
2045
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), Pr(n) || (t = qr(e, t, n)), jr(t)) return t;
|
|
2046
|
+
if (wr(t)) {
|
|
2043
2047
|
let n = [];
|
|
2044
2048
|
for (let r of Object.keys(t)) {
|
|
2045
2049
|
let l = t[r];
|
|
2046
|
-
|
|
2050
|
+
wr(l) ? (l.id = r, n.push(l)) : rr(`${Dt(e)} kwid_new_list: not a record: '${r}'`);
|
|
2047
2051
|
}
|
|
2048
2052
|
return n;
|
|
2049
2053
|
}
|
|
@@ -2058,10 +2062,10 @@ function yl(e, t) {
|
|
|
2058
2062
|
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return [];
|
|
2059
2063
|
let n = [];
|
|
2060
2064
|
if (Dr(t)) n.push(t);
|
|
2061
|
-
else if (
|
|
2062
|
-
else
|
|
2065
|
+
else if (wr(t)) for (let e in t) t.hasOwnProperty(e) && n.push(e);
|
|
2066
|
+
else jr(t) && t.forEach(function(t) {
|
|
2063
2067
|
if (Dr(t)) Pr(t) || n.push(t);
|
|
2064
|
-
else if (
|
|
2068
|
+
else if (wr(t)) {
|
|
2065
2069
|
let r = Zr(e, t, "id", 0, 0);
|
|
2066
2070
|
r && n.push(r);
|
|
2067
2071
|
}
|
|
@@ -2071,13 +2075,13 @@ function yl(e, t) {
|
|
|
2071
2075
|
function vl(e, t, n) {
|
|
2072
2076
|
t = t || "id", n = n || "value";
|
|
2073
2077
|
let r = [];
|
|
2074
|
-
if (
|
|
2078
|
+
if (jr(e)) for (let l = 0; l < e.length; l++) {
|
|
2075
2079
|
let o = e[l];
|
|
2076
2080
|
if (Dr(o)) r.push({
|
|
2077
2081
|
id: e[l],
|
|
2078
2082
|
value: e[l]
|
|
2079
2083
|
});
|
|
2080
|
-
else if (
|
|
2084
|
+
else if (wr(o)) {
|
|
2081
2085
|
let e = {};
|
|
2082
2086
|
if (Jr(o, t)) {
|
|
2083
2087
|
if (!Jr(o, n)) {
|
|
@@ -2098,7 +2102,7 @@ function vl(e, t, n) {
|
|
|
2098
2102
|
r.push(e);
|
|
2099
2103
|
} else rr("list2options(): case1 not implemented");
|
|
2100
2104
|
}
|
|
2101
|
-
else if (
|
|
2105
|
+
else if (wr(e)) for (let t of Object.keys(e)) r.push({
|
|
2102
2106
|
id: t,
|
|
2103
2107
|
value: t
|
|
2104
2108
|
});
|
|
@@ -2132,7 +2136,7 @@ function Rl(e, t) {
|
|
|
2132
2136
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return e.splice(n, 1), !0;
|
|
2133
2137
|
return !1;
|
|
2134
2138
|
}
|
|
2135
|
-
function
|
|
2139
|
+
function wl(e, t) {
|
|
2136
2140
|
try {
|
|
2137
2141
|
let n = e.__md_iev__;
|
|
2138
2142
|
if (n) return n[t];
|
|
@@ -2140,25 +2144,25 @@ function jl(e, t) {
|
|
|
2140
2144
|
return;
|
|
2141
2145
|
}
|
|
2142
2146
|
}
|
|
2143
|
-
function
|
|
2147
|
+
function jl(e, t, n) {
|
|
2144
2148
|
let r = e.__md_iev__;
|
|
2145
2149
|
r || (r = {}, e.__md_iev__ = r), r[t] = n;
|
|
2146
2150
|
}
|
|
2147
2151
|
function Dl(e, t, n, r) {
|
|
2148
2152
|
if (!Ur(e)) return rr("gobj is not a GObj"), null;
|
|
2149
2153
|
if (!t) return;
|
|
2150
|
-
let l =
|
|
2151
|
-
l || (l = [],
|
|
2154
|
+
let l = wl(t, n);
|
|
2155
|
+
l || (l = [], jl(t, n, l));
|
|
2152
2156
|
try {
|
|
2153
|
-
|
|
2157
|
+
jr(l) && l.unshift(r);
|
|
2154
2158
|
} catch (e) {
|
|
2155
2159
|
rr(e);
|
|
2156
2160
|
}
|
|
2157
2161
|
}
|
|
2158
2162
|
function $l(e, t, n, r) {
|
|
2159
2163
|
if (!Ur(e)) return rr("gobj is not a GObj"), null;
|
|
2160
|
-
if (!
|
|
2161
|
-
let l =
|
|
2164
|
+
if (!wr(t)) return rr("kw is not a dict"), null;
|
|
2165
|
+
let l = wl(t, n);
|
|
2162
2166
|
return l ? 0 === l.length ? (r && rr(`stack empty: ${n}`), null) : l[0] : (r && rr(`stack NOT FOUND: ${n}`), null);
|
|
2163
2167
|
}
|
|
2164
2168
|
function Al(e, t, n) {
|
|
@@ -2195,7 +2199,7 @@ function Ll(e, t, n) {
|
|
|
2195
2199
|
r,
|
|
2196
2200
|
e[r],
|
|
2197
2201
|
n
|
|
2198
|
-
]),
|
|
2202
|
+
]), wr(e[r]) && Ll(e[r], t, n), n = n.slice(0, -l.length);
|
|
2199
2203
|
}
|
|
2200
2204
|
}
|
|
2201
2205
|
function Ul(e, t, n) {
|
|
@@ -2212,8 +2216,8 @@ function Pl(e, t, n, r) {
|
|
|
2212
2216
|
if (!l) return rr("jdb_update: topic not found: " + t), null;
|
|
2213
2217
|
if (Pr(r.id)) return rr("jdb_update: record without id: " + r), sr(r), null;
|
|
2214
2218
|
let o, i = n.split("`"), s = l;
|
|
2215
|
-
for (; (o = i.shift()) && !Pr(o) && s;)
|
|
2216
|
-
if (0 === i.length && s) if (
|
|
2219
|
+
for (; (o = i.shift()) && !Pr(o) && s;) wr(s) && (s = nl(null, s, e.hook, [], 1)), s = Wl(s, null, o, !1);
|
|
2220
|
+
if (0 === i.length && s) if (jr(s)) s.push(r);
|
|
2217
2221
|
else if (s.id === r.id) Object.assign(s, r);
|
|
2218
2222
|
else {
|
|
2219
2223
|
let t = nl(null, s, e.hook, [], 1), n = Wl(t, e.hook, r.id, !1);
|
|
@@ -2226,8 +2230,8 @@ function Fl(e, t, n, r) {
|
|
|
2226
2230
|
if (!l) return rr("jdb_delete: topic not found: " + t), null;
|
|
2227
2231
|
if (Pr(r.id)) return rr("jdb_delete: record without id: " + r), sr(r), null;
|
|
2228
2232
|
let o, i = n.split("`"), s = l;
|
|
2229
|
-
for (; (o = i.shift()) && !Pr(o) && s;)
|
|
2230
|
-
if (0 === i.length && s) if (
|
|
2233
|
+
for (; (o = i.shift()) && !Pr(o) && s;) wr(s) && (s = nl(null, s, e.hook, null, 0)), s = Wl(s, null, o, !1);
|
|
2234
|
+
if (0 === i.length && s) if (jr(s)) {
|
|
2231
2235
|
let e = Sl(s, r.id);
|
|
2232
2236
|
e >= 0 && s.splice(e, 1);
|
|
2233
2237
|
} else {
|
|
@@ -2336,7 +2340,7 @@ function Hl(e, t) {
|
|
|
2336
2340
|
if (Dr(l)) if (l = l.trim(), l.length > 0 && "<" === l[0]) i.appendChild(ql(l));
|
|
2337
2341
|
else if (t && s) i.textContent = t(s) || l;
|
|
2338
2342
|
else i.textContent = l;
|
|
2339
|
-
else if (
|
|
2343
|
+
else if (jr(l)) {
|
|
2340
2344
|
if (l.length > 0) if (Dr(l[0])) i.appendChild(Hl(l, t));
|
|
2341
2345
|
else for (let e of l) Array.isArray(e) && e.length > 0 ? i.appendChild(Hl(e, t)) : e instanceof HTMLElement && i.appendChild(e);
|
|
2342
2346
|
} else l instanceof HTMLElement || l instanceof Text || l instanceof SVGElement ? i.appendChild(l) : null != l && (rr("content ignored"), ar(l));
|
|
@@ -2565,14 +2569,14 @@ function ho(e) {
|
|
|
2565
2569
|
}
|
|
2566
2570
|
function To(e, t) {
|
|
2567
2571
|
let n = Xt(e, v.SDF_PERSIST), r = gl(ho(e), null, !1);
|
|
2568
|
-
if (r &&
|
|
2572
|
+
if (r && wr(r)) {
|
|
2569
2573
|
let l = cl(e, r, t, !1);
|
|
2570
2574
|
l = cl(e, l, n, !1), on(e, l, v.SDF_PERSIST);
|
|
2571
2575
|
}
|
|
2572
2576
|
}
|
|
2573
2577
|
function yo(e, t) {
|
|
2574
2578
|
let n = cl(e, Xt(e, v.SDF_PERSIST), t, !1), r = gl(ho(e), null, !1);
|
|
2575
|
-
return r &&
|
|
2579
|
+
return r && wr(r) && dr(n, r), dl(ho(e), n);
|
|
2576
2580
|
}
|
|
2577
2581
|
function vo(e, t) {
|
|
2578
2582
|
let n = fl(e, gl(ho(e), null, !1), t, !1);
|
|
@@ -2580,10 +2584,10 @@ function vo(e, t) {
|
|
|
2580
2584
|
}
|
|
2581
2585
|
function So(e, t) {
|
|
2582
2586
|
let n = gl(ho(e), null, !1), r = {};
|
|
2583
|
-
return n &&
|
|
2587
|
+
return n && wr(n) && (r = cl(e, n, t, !1)), r;
|
|
2584
2588
|
}
|
|
2585
2589
|
function Oo(e) {
|
|
2586
|
-
if (
|
|
2590
|
+
if (jr(e) && 1 === Nr(e)) {
|
|
2587
2591
|
let t = e[0];
|
|
2588
2592
|
return Jr(t, "size") ? t.size : 1;
|
|
2589
2593
|
}
|
|
@@ -2613,7 +2617,7 @@ function No(e, t) {
|
|
|
2613
2617
|
};
|
|
2614
2618
|
}
|
|
2615
2619
|
}
|
|
2616
|
-
return
|
|
2620
|
+
return wr(t) ? {
|
|
2617
2621
|
topic_name: t.topic_name,
|
|
2618
2622
|
id: t.id,
|
|
2619
2623
|
hook_name: t.hook_name
|
|
@@ -2623,7 +2627,7 @@ function Ro(e, t) {
|
|
|
2623
2627
|
let n = No(e, t);
|
|
2624
2628
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
2625
2629
|
}
|
|
2626
|
-
function
|
|
2630
|
+
function wo(e, t) {
|
|
2627
2631
|
if (Dr(t)) {
|
|
2628
2632
|
if (-1 === t.indexOf("^")) {
|
|
2629
2633
|
let n, r = e.hook;
|
|
@@ -2645,12 +2649,12 @@ function jo(e, t) {
|
|
|
2645
2649
|
};
|
|
2646
2650
|
}
|
|
2647
2651
|
}
|
|
2648
|
-
return
|
|
2652
|
+
return wr(t) ? {
|
|
2649
2653
|
topic_name: t.topic_name,
|
|
2650
2654
|
id: t.id
|
|
2651
2655
|
} : (rr("bad hook 3"), rr(e), rr(t), null);
|
|
2652
2656
|
}
|
|
2653
|
-
var
|
|
2657
|
+
var jo = [
|
|
2654
2658
|
"string",
|
|
2655
2659
|
"integer",
|
|
2656
2660
|
"object",
|
|
@@ -2765,7 +2769,7 @@ function Io(e, t) {
|
|
|
2765
2769
|
let e = t.split(".");
|
|
2766
2770
|
for (let t = 0; t < e.length; t++) {
|
|
2767
2771
|
let r = e[t];
|
|
2768
|
-
if (Ol(
|
|
2772
|
+
if (Ol(jo, r)) n.real_type || (n.real_type = r);
|
|
2769
2773
|
else if (Ol($o, r)) n.type || (n.type = r);
|
|
2770
2774
|
else if (Ol(Do, r)) switch (r) {
|
|
2771
2775
|
case "writable":
|
|
@@ -2779,14 +2783,14 @@ function Io(e, t) {
|
|
|
2779
2783
|
}
|
|
2780
2784
|
}
|
|
2781
2785
|
n.real_type || (n.real_type = "string");
|
|
2782
|
-
} else
|
|
2786
|
+
} else wr(t) ? (n = Ao(t), n.name || (n.name = e), n.header || (n.header = e)) : jr(t) && (n.real_type = "array", n.enum_list = t);
|
|
2783
2787
|
return n.type || (n.type = n.real_type), n;
|
|
2784
2788
|
}
|
|
2785
2789
|
function ko(e, t) {
|
|
2786
2790
|
let n = {};
|
|
2787
2791
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
2788
2792
|
let l;
|
|
2789
|
-
|
|
2793
|
+
wr(r) && (l = r.default);
|
|
2790
2794
|
let o = nl(null, t, e, l);
|
|
2791
2795
|
n[e] = o;
|
|
2792
2796
|
}), n;
|
|
@@ -2811,7 +2815,7 @@ var Fo = {
|
|
|
2811
2815
|
mt_create: function(e) {
|
|
2812
2816
|
let t = e.priv;
|
|
2813
2817
|
const n = nn(e, "subscriber");
|
|
2814
|
-
n &&
|
|
2818
|
+
n && jn(e, null, {}, n), t.periodic = Zt(e, "periodic"), t.msec = en(e, "msec");
|
|
2815
2819
|
},
|
|
2816
2820
|
mt_writing: function(e, t) {
|
|
2817
2821
|
let n = e.priv;
|
|
@@ -2848,13 +2852,13 @@ function Go() {
|
|
|
2848
2852
|
}("C_TIMER");
|
|
2849
2853
|
}
|
|
2850
2854
|
function Vo(e, t) {
|
|
2851
|
-
return e instanceof k ? "C_TIMER" !==
|
|
2855
|
+
return e instanceof k ? "C_TIMER" !== jt(e) ? (rr("not C_TIMER GObj"), -1) : (sn(e, "periodic", !1), void an(e, "msec", t)) : (rr("not GObj TYPE"), -1);
|
|
2852
2856
|
}
|
|
2853
2857
|
function Mo(e, t) {
|
|
2854
|
-
return e instanceof k ? "C_TIMER" !==
|
|
2858
|
+
return e instanceof k ? "C_TIMER" !== jt(e) ? (rr("not C_TIMER GObj"), -1) : (sn(e, "periodic", !0), void an(e, "msec", t)) : (rr("not GObj TYPE"), -1);
|
|
2855
2859
|
}
|
|
2856
2860
|
function Wo(e) {
|
|
2857
|
-
return e instanceof k ? "C_TIMER" !==
|
|
2861
|
+
return e instanceof k ? "C_TIMER" !== jt(e) ? (rr("not C_TIMER GObj"), -1) : void an(e, "msec", -1) : (rr("not GObj TYPE"), -1);
|
|
2858
2862
|
}
|
|
2859
2863
|
var Ko = [
|
|
2860
2864
|
N(y.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
@@ -2879,7 +2883,7 @@ var Ko = [
|
|
|
2879
2883
|
], xo = { gobj_timer: null }, Yo = null;
|
|
2880
2884
|
function Bo(e, t, n, r) {
|
|
2881
2885
|
let l = zt(e, t);
|
|
2882
|
-
return
|
|
2886
|
+
return wr(l) || (l = {}), l[n] = r, rn(e, t, l), He(e, t);
|
|
2883
2887
|
}
|
|
2884
2888
|
function Jo(e) {
|
|
2885
2889
|
if (!0 === e || !1 === e) return e;
|
|
@@ -2895,35 +2899,35 @@ function Ho(e, t, n, r) {
|
|
|
2895
2899
|
var Qo = {
|
|
2896
2900
|
mt_create: function(e) {
|
|
2897
2901
|
let t = e.priv;
|
|
2898
|
-
un(e, "start_date", eo()), un(e, "node_uuid", ro()), e.priv.gobj_timer = ot(
|
|
2902
|
+
un(e, "start_date", eo()), un(e, "node_uuid", ro()), e.priv.gobj_timer = ot(wt(e), "C_TIMER", {}, e), t.periodic_timeout = zt(e, "periodic_timeout"), function(e) {
|
|
2899
2903
|
let t = zt(e, "trace_levels");
|
|
2900
|
-
if (!
|
|
2904
|
+
if (!wr(t)) return 0;
|
|
2901
2905
|
let n = t.__global_trace__;
|
|
2902
|
-
if (
|
|
2906
|
+
if (jr(n)) {
|
|
2903
2907
|
ce(4294967295, !1);
|
|
2904
2908
|
for (let e of n) se(e, !0);
|
|
2905
2909
|
}
|
|
2906
2910
|
for (const [n, r] of Object.entries(t)) {
|
|
2907
2911
|
let t = Me(n);
|
|
2908
|
-
if (t) if (
|
|
2912
|
+
if (t) if (jr(r)) {
|
|
2909
2913
|
he(t, null, !1);
|
|
2910
2914
|
for (let e of r) he(t, e, !0);
|
|
2911
|
-
} else rr(`${
|
|
2915
|
+
} else rr(`${wt(e)}: trace_levels of ${n} MUST be a list`);
|
|
2912
2916
|
}
|
|
2913
2917
|
}(e), function(e) {
|
|
2914
2918
|
let t = zt(e, "no_trace_levels");
|
|
2915
|
-
if (!
|
|
2919
|
+
if (!wr(t)) return 0;
|
|
2916
2920
|
let n = t.__global_no_trace__;
|
|
2917
|
-
if (
|
|
2921
|
+
if (jr(n)) {
|
|
2918
2922
|
fe(4294967295, !1);
|
|
2919
2923
|
for (let e of n) ae(e, !0);
|
|
2920
2924
|
}
|
|
2921
2925
|
for (const [n, r] of Object.entries(t)) {
|
|
2922
2926
|
let t = Me(n);
|
|
2923
|
-
if (t) if (
|
|
2927
|
+
if (t) if (jr(r)) {
|
|
2924
2928
|
ye(t, null, !1);
|
|
2925
2929
|
for (let e of r) ye(t, e, !0);
|
|
2926
|
-
} else rr(`${
|
|
2930
|
+
} else rr(`${wt(e)}: no_trace_levels of ${n} MUST be a list`);
|
|
2927
2931
|
}
|
|
2928
2932
|
}(e);
|
|
2929
2933
|
},
|
|
@@ -3064,7 +3068,7 @@ function ai(e, t, n, r) {
|
|
|
3064
3068
|
return function(e, t) {
|
|
3065
3069
|
let n = e.priv, r = JSON.stringify(t);
|
|
3066
3070
|
if (ti(e)) {
|
|
3067
|
-
let n = tn(e, "url"), l =
|
|
3071
|
+
let n = tn(e, "url"), l = wt(St()) + " ==> " + n, o = zt(St(), "trace_ievent_callback");
|
|
3068
3072
|
o ? o(l, t, 1, r.length) : ii(0, l, t);
|
|
3069
3073
|
}
|
|
3070
3074
|
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return lr(`${Dt(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
@@ -3112,13 +3116,13 @@ function _i(e) {
|
|
|
3112
3116
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
3113
3117
|
required_services: i
|
|
3114
3118
|
};
|
|
3115
|
-
return Dl(e, s, Xo, ui(e,
|
|
3119
|
+
return Dl(e, s, Xo, ui(e, wt(At(e)), null)), Al(e, s, "__identity__"), Vo(t.gobj_timer, en(e, "timeout_idack")), ai(e, "EV_IDENTITY_CARD", s);
|
|
3116
3120
|
}
|
|
3117
3121
|
function ci(e, t) {
|
|
3118
3122
|
if (Pr(t.event)) return -1;
|
|
3119
3123
|
let n = {}, r = t.__global__, l = t.__config__, o = t.__filter__, i = t.__service__, s = t.subscriber;
|
|
3120
3124
|
l && (n.__config__ = l), r && (n.__global__ = r), o && (n.__filter__ = o);
|
|
3121
|
-
return Dl(e, n, Xo, ui(e,
|
|
3125
|
+
return Dl(e, n, Xo, ui(e, wt(s), i)), Al(e, n, "__subscribing__"), ai(e, t.event, n);
|
|
3122
3126
|
}
|
|
3123
3127
|
function fi(e, t, n, r) {
|
|
3124
3128
|
let l = e.priv;
|
|
@@ -3209,7 +3213,7 @@ function mi(e, t, n, r) {
|
|
|
3209
3213
|
} : (rr("parsing inter_event: kw not a json object"), null) : (rr("parsing inter_kw: no kw"), null);
|
|
3210
3214
|
}(0, n.data);
|
|
3211
3215
|
if (ti(e)) {
|
|
3212
|
-
let e =
|
|
3216
|
+
let e = wt(St()) + " <== " + l, t = n.data.length, r = zt(St(), "trace_ievent_callback");
|
|
3213
3217
|
r ? r(e, o, 2, t) : ii(0, e, o);
|
|
3214
3218
|
}
|
|
3215
3219
|
let i = o.event, s = o.kw;
|
|
@@ -3241,9 +3245,9 @@ function hi(e, t, n, r) {
|
|
|
3241
3245
|
var Ti = {
|
|
3242
3246
|
mt_create: function(e) {
|
|
3243
3247
|
let t = e.priv;
|
|
3244
|
-
t.gobj_timer = ot(
|
|
3248
|
+
t.gobj_timer = ot(wt(e), "C_TIMER", {}, e), t.url = tn(e, "url"), t.remote_yuno_name = tn(e, "remote_yuno_name"), t.remote_yuno_role = tn(e, "remote_yuno_role"), t.remote_yuno_service = tn(e, "remote_yuno_service"), un(e, "wanted_yuno_name", t.remote_yuno_name), un(e, "wanted_yuno_role", t.remote_yuno_role), un(e, "wanted_yuno_service", t.remote_yuno_service);
|
|
3245
3249
|
const n = nn(e, "subscriber");
|
|
3246
|
-
n &&
|
|
3250
|
+
n && jn(e, null, {}, n);
|
|
3247
3251
|
},
|
|
3248
3252
|
mt_writing: function(e, t) {
|
|
3249
3253
|
let n = e.priv;
|
|
@@ -3272,7 +3276,7 @@ var Ti = {
|
|
|
3272
3276
|
mt_stats: function(e, t, n, r) {
|
|
3273
3277
|
if ("ST_SESSION" !== cn(e)) return rr("Not in session"), null;
|
|
3274
3278
|
n || (n = {});
|
|
3275
|
-
let l = ui(e,
|
|
3279
|
+
let l = ui(e, wt(r), Zr(e, n, "service", null, 0)), o = nl(e, n, "__md_stats__", null, Pn.KW_EXTRACT);
|
|
3276
3280
|
return o || (o = {}), Dl(e, n, "stats_stack", {
|
|
3277
3281
|
stats: t,
|
|
3278
3282
|
kw: o
|
|
@@ -3281,7 +3285,7 @@ var Ti = {
|
|
|
3281
3285
|
mt_command_parser: function(e, t, n, r) {
|
|
3282
3286
|
if ("ST_SESSION" !== cn(e)) return rr("Not in session"), null;
|
|
3283
3287
|
n || (n = {});
|
|
3284
|
-
let l = ui(e,
|
|
3288
|
+
let l = ui(e, wt(r), Zr(e, n, "service", "", 0)), o = nl(e, n, "__md_command__", null, Pn.KW_EXTRACT);
|
|
3285
3289
|
return o || (o = {}), Dl(e, n, "command_stack", {
|
|
3286
3290
|
command: t,
|
|
3287
3291
|
kw: o
|
|
@@ -3291,7 +3295,7 @@ var Ti = {
|
|
|
3291
3295
|
if ("ST_SESSION" !== cn(e)) return window.console.error("Not in session"), -1;
|
|
3292
3296
|
if (n || (n = {}), $l(e, n, Xo));
|
|
3293
3297
|
else {
|
|
3294
|
-
let l = ui(e,
|
|
3298
|
+
let l = ui(e, wt(r), Zr(e, n, "__service__", 0, 0));
|
|
3295
3299
|
pr(n, "__service__"), Dl(e, n, "__message__", t), Dl(e, n, Xo, l);
|
|
3296
3300
|
}
|
|
3297
3301
|
return Al(e, n, "__message__"), ai(e, t, n, r);
|
|
@@ -3307,7 +3311,7 @@ var Ti = {
|
|
|
3307
3311
|
if (Pr(t.event)) return 0;
|
|
3308
3312
|
let r = {}, l = t.__global__, o = t.__config__, i = t.__filter__, s = t.__service__, a = t.subscriber;
|
|
3309
3313
|
o && (r.__config__ = o), l && (r.__global__ = l), i && (r.__filter__ = i);
|
|
3310
|
-
return Dl(e, r, Xo, ui(e,
|
|
3314
|
+
return Dl(e, r, Xo, ui(e, wt(a), s)), Al(e, r, "__unsubscribing__"), ai(e, t.event, r, e);
|
|
3311
3315
|
}
|
|
3312
3316
|
};
|
|
3313
3317
|
function yi() {
|
|
@@ -3406,6 +3410,6 @@ function yi() {
|
|
|
3406
3410
|
], t, Ti, 0, Zo, ni, 0, 0, ei, C.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3407
3411
|
}("C_IEVENT_CLI");
|
|
3408
3412
|
}
|
|
3409
|
-
export { k as GObj, N as SDATA, D as SDATAAUTHZ, R as SDATACM,
|
|
3413
|
+
export { k as GObj, N as SDATA, D as SDATAAUTHZ, R as SDATACM, w as SDATACM2, A as SDATADF, j as SDATAPM, $ as SDATAPM0, O as SDATA_END, S as SDataDesc, a as YUNETA_VERSION, E as __yuno__, o as build_command_response, so as build_path, s as build_stats_response, lo as clean_name, Wo as clear_timeout, Wr as cmp_two_simple_json, l as command_parser, Hl as createElement2, ql as createOneHtml, Kl as create_json_record, ko as create_template_record, eo as current_timestamp, y as data_type_t, So as db_list_persistent_attrs, To as db_load_persistent_attrs, vo as db_remove_persistent_attrs, yo as db_save_persistent_attrs, io as debounce, Rl as delete_from_list, _r as duplicate_objects, Rr as empty_json, Pr as empty_string, Bl as escapeHtml, P as event_flag_t, bo as flat2json, Eo as flat_apply, mo as flat_diff, co as flat_key_join, fo as flat_key_split, Ue as gclass_add_ev_action, Fe as gclass_add_event_type, Le as gclass_add_state, Ve as gclass_check_fsm, Ae as gclass_create, Ge as gclass_event_type, Me as gclass_find_by_name, C as gclass_flag_t, Ie as gclass_unregister, Ql as getPositionRelativeToBody, oo as get_function_name, to as get_now, Lt as gobj_bottom_gobj, fn as gobj_change_parent, _n as gobj_change_state, Ln as gobj_command, it as gobj_create, et as gobj_create2, rt as gobj_create_default_service, ot as gobj_create_pure_child, nt as gobj_create_service, lt as gobj_create_volatil, tt as gobj_create_yuno, cn as gobj_current_state, Ke as gobj_default_service, Tn as gobj_deliver_posted_events, st as gobj_destroy, Bt as gobj_find_child, xt as gobj_find_gobj, xe as gobj_find_service, kn as gobj_find_subscribings, An as gobj_find_subscriptions, L as gobj_flag_t, $t as gobj_full_name, jt as gobj_gclass_name, be as gobj_get_gclass_trace_level, pe as gobj_get_gclass_trace_level2, me as gobj_get_gclass_trace_no_level, ge as gobj_get_global_trace_level, de as gobj_get_global_trace_no_level, ue as gobj_global_trace_level, _e as gobj_global_trace_no_level, Qt as gobj_has_attr, dn as gobj_has_event, bn as gobj_has_output_event, je as gobj_hsdata, Ct as gobj_is_destroying, vt as gobj_is_playing, kt as gobj_is_pure_child, ht as gobj_is_running, yt as gobj_is_service, It as gobj_is_volatil, ze as gobj_list_persistent_attrs, In as gobj_list_subscriptions, qe as gobj_load_persistent_attrs, Jt as gobj_match_children, qt as gobj_match_children_tree, Yt as gobj_match_gobj, wt as gobj_name, At as gobj_parent, Et as gobj_pause, mt as gobj_play, En as gobj_post_event, hn as gobj_posted_events_size, Cn as gobj_publish_event, zt as gobj_read_attr, Xt as gobj_read_attrs, Zt as gobj_read_bool_attr, en as gobj_read_integer_attr, nn as gobj_read_pointer_attr, tn as gobj_read_str_attr, Qe as gobj_remove_persistent_attrs, Se as gobj_repr_global_trace_levels, ln as gobj_reset_volatil_attrs, He as gobj_save_persistent_attrs, Ht as gobj_search_path, yn as gobj_send_event, We as gobj_services, Ut as gobj_set_bottom_gobj, Ee as gobj_set_deep_trace, ye as gobj_set_gclass_no_trace, he as gobj_set_gclass_trace, ae as gobj_set_global_no_trace, fe as gobj_set_global_no_trace2, se as gobj_set_global_trace, ce as gobj_set_global_trace2, ve as gobj_set_gobj_no_trace, Te as gobj_set_gobj_trace, K as gobj_set_trace_machine_format, Dt as gobj_short_name, at as gobj_start, _t as gobj_start_children, ft as gobj_start_tree, Oe as gobj_start_up, Un as gobj_stats, gt as gobj_stop, bt as gobj_stop_children, pt as gobj_stop_tree, jn as gobj_subscribe_event, Z as gobj_trace_level, x as gobj_trace_machine_format, ee as gobj_trace_no_level, Dn as gobj_unsubscribe_event, $n as gobj_unsubscribe_list, Ft as gobj_walk_gobj_children, Gt as gobj_walk_gobj_children_tree, rn as gobj_write_attr, on as gobj_write_attrs, sn as gobj_write_bool_attr, an as gobj_write_integer_attr, un as gobj_write_str_attr, St as gobj_yuno, Rt as gobj_yuno_id, Ot as gobj_yuno_name, Nt as gobj_yuno_role, Sl as id_index_in_obj_list, no as index_in_list, jr as is_array, Ar as is_boolean, Cr as is_date, Lr as is_function, Ur as is_gobj, xr as is_metadata_key, Ir as is_null, $r as is_number, wr as is_object, Yr as is_private_key, kr as is_pure_number, Dr as is_string, Fl as jdb_delete, Vl as jdb_get, Ml as jdb_get_by_idx, Gl as jdb_get_topic, Ul as jdb_init, Pl as jdb_update, go as json2flat, hr as json_array_append, Tr as json_array_append_new, vr as json_array_extend, yr as json_array_remove, Or as json_array_size, ur as json_deep_copy, cr as json_is_identical, pr as json_object_del, br as json_object_get, mr as json_object_set, Er as json_object_set_new, Sr as json_object_size, fr as json_object_update, gr as json_object_update_existing, dr as json_object_update_missing, Nr as json_size, Yl as jwt2json, xl as jwtDecode, cl as kw_clone_by_keys, fl as kw_clone_by_not_keys, _l as kw_collect, Hr as kw_delete, al as kw_find_json_in_list, qr as kw_find_path, Pn as kw_flag_t, Qr as kw_get_bool, tl as kw_get_dict, nl as kw_get_dict_value, zr as kw_get_int, rl as kw_get_list, gl as kw_get_local_storage_value, el as kw_get_pointer, Xr as kw_get_real, Zr as kw_get_str, Jr as kw_has_key, sl as kw_match_simple, Br as kw_pop, bl as kw_remove_local_storage_value, ul as kw_select, ll as kw_set_dict_value, dl as kw_set_local_storage_value, ol as kw_set_subdict_value, ml as kwid_collect, Tl as kwid_find_one_record, yl as kwid_get_ids, pl as kwid_match_id, El as kwid_new_dict, hl as kwid_new_list, vl as list2options, kl as load_json_file, ir as log_debug, rr as log_error, or as log_info, lr as log_warning, Il as msg_iev_get_msg_type, $l as msg_iev_get_stack, Dl as msg_iev_push_stack, wl as msg_iev_read_key, Al as msg_iev_set_msg_type, jl as msg_iev_write_key, ro as node_uuid, Fr as parseBoolean, zl as parseSVG, Xl as refresh_language, yi as register_c_ievent_cli, Go as register_c_timer, zo as register_c_yuno, Jl as safeSrc, v as sdata_flag_t, Cl as send_http_json_post, qn as set_console_log_enabled, Qn as set_console_log_filter, Bn as set_log_callback, tr as set_remote_log_functions, Vo as set_timeout, Mo as set_timeout_periodic, t as sprintf, i as stats_parser, Ol as str_in_list, Mr as strcasecmp, Vr as strcmp, Gr as strncmp, Nl as strs_in_list, Kr as strstr, Io as template_get_field_desc, Zl as timeTracker, ar as trace_json, B as trace_level_t, sr as trace_msg, No as treedb_decoder_fkey, wo as treedb_decoder_hook, Ro as treedb_encoder_fkey, Ao as treedb_get_field_desc, Oo as treedb_hook_data_size, n as vsprintf, F as walk_type_t };
|
|
3410
3414
|
|
|
3411
3415
|
//# sourceMappingURL=gobj-js.es.min.js.map
|