@yuneta/gobj-js 7.25.5 → 7.25.7
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 +12 -1
- package/dist/gobj-js.cjs.js +38 -17
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +81 -71
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +38 -17
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +159 -149
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +38 -17
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +76 -66
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +38 -17
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +76 -66
- 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,38 +1857,44 @@ 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;
|
|
1863
|
-
for (let
|
|
1864
|
-
let
|
|
1865
|
-
|
|
1867
|
+
for (let i = 0; i < o; i++) {
|
|
1868
|
+
let s = l[i];
|
|
1869
|
+
if (i === o - 1) t[s] = r;
|
|
1870
|
+
else {
|
|
1871
|
+
let r = t[s];
|
|
1872
|
+
if (void 0 === r) t[s] = {};
|
|
1873
|
+
else if (!wr(r) && !jr(r)) return rr(`${e ? Dt(e) + ": " : ""}kw_set_dict_value(): segment '${s}' is not a dict or a list: '${n}'`), -1;
|
|
1874
|
+
t = t[s];
|
|
1875
|
+
}
|
|
1866
1876
|
}
|
|
1867
1877
|
return 0;
|
|
1868
1878
|
}
|
|
1869
1879
|
function ol(e, t, n, r, l) {
|
|
1870
|
-
if (e && !Ur(e) && rr("GObj bad instanceof"), !
|
|
1880
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !wr(t)) return rr("kw is not an object"), -1;
|
|
1871
1881
|
let o = tl(e, t, n, {}, Pn.KW_CREATE);
|
|
1872
|
-
return
|
|
1882
|
+
return wr(o) ? (o[r] = l, 0) : (rr("subdict is not an object"), -1);
|
|
1873
1883
|
}
|
|
1874
1884
|
function il(e, n, r) {
|
|
1875
1885
|
let l = "", o = !1;
|
|
1876
|
-
if (
|
|
1886
|
+
if (jr(n)) {
|
|
1877
1887
|
o = !1;
|
|
1878
1888
|
for (let i = 0; i < n.length; i++) {
|
|
1879
1889
|
let s = n[i];
|
|
1880
1890
|
if (l = Pr(r) ? t("%s", r) : t("%s`%d", r, i), o = il(e, s, l), o) break;
|
|
1881
1891
|
}
|
|
1882
|
-
} else if (
|
|
1892
|
+
} else if (wr(n)) {
|
|
1883
1893
|
o = !0;
|
|
1884
1894
|
let i = Object.keys(n);
|
|
1885
1895
|
for (let s = 0; s < i.length; s++) {
|
|
1886
1896
|
let a = i[s], u = n[a];
|
|
1887
|
-
if (l = Pr(r) ? t("%s", a) : t("%s`%s", r, a),
|
|
1897
|
+
if (l = Pr(r) ? t("%s", a) : t("%s`%s", r, a), jr(u) || wr(u)) {
|
|
1888
1898
|
if (o = il(e, u, l), !o) break;
|
|
1889
1899
|
continue;
|
|
1890
1900
|
}
|
|
@@ -1905,7 +1915,7 @@ function sl(e, t) {
|
|
|
1905
1915
|
return 0 === Nr(t) || il(e, t, "");
|
|
1906
1916
|
}
|
|
1907
1917
|
function al(e, t, n, r) {
|
|
1908
|
-
if (!n || !
|
|
1918
|
+
if (!n || !jr(t)) return r && rr("item NULL or kw_list is not a list"), -1;
|
|
1909
1919
|
for (let e = 0; e < t.length; e++) if (cr(n, t[e])) return e;
|
|
1910
1920
|
return r && rr("item not found in this list"), -1;
|
|
1911
1921
|
}
|
|
@@ -1913,12 +1923,12 @@ function ul(e, t, n, r) {
|
|
|
1913
1923
|
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return null;
|
|
1914
1924
|
r || (r = sl);
|
|
1915
1925
|
let l = [];
|
|
1916
|
-
if (
|
|
1926
|
+
if (jr(t)) for (let e = 0; e < t.length; e++) {
|
|
1917
1927
|
let o = t[e];
|
|
1918
1928
|
r(o, n) && l.push(ur(o));
|
|
1919
1929
|
}
|
|
1920
1930
|
else {
|
|
1921
|
-
if (!
|
|
1931
|
+
if (!wr(t)) return rr("kw_select() BAD kw parameter"), null;
|
|
1922
1932
|
r(t, n) && l.push(ur(t));
|
|
1923
1933
|
}
|
|
1924
1934
|
return l;
|
|
@@ -1927,12 +1937,12 @@ function _l(e, t, n, r) {
|
|
|
1927
1937
|
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return null;
|
|
1928
1938
|
r || (r = sl);
|
|
1929
1939
|
let l = [];
|
|
1930
|
-
if (
|
|
1940
|
+
if (jr(t)) for (let e = 0; e < t.length; e++) {
|
|
1931
1941
|
let o = t[e];
|
|
1932
1942
|
r(o, n) && l.push(o);
|
|
1933
1943
|
}
|
|
1934
1944
|
else {
|
|
1935
|
-
if (!
|
|
1945
|
+
if (!wr(t)) return rr("kw_select() BAD kw parameter"), null;
|
|
1936
1946
|
r(t, n) && l.push(t);
|
|
1937
1947
|
}
|
|
1938
1948
|
return l;
|
|
@@ -1943,9 +1953,9 @@ function cl(e, t, n, r) {
|
|
|
1943
1953
|
if (Dr(n) && !Pr(n)) {
|
|
1944
1954
|
let o = n;
|
|
1945
1955
|
t.hasOwnProperty(o) ? l[o] = t[o] : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1946
|
-
} else if (
|
|
1956
|
+
} 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
1957
|
else {
|
|
1948
|
-
if (!(
|
|
1958
|
+
if (!(jr(n) && Or(n) > 0)) return t;
|
|
1949
1959
|
for (let o = 0; o < n.length; o++) {
|
|
1950
1960
|
let i = n[o];
|
|
1951
1961
|
t.hasOwnProperty(i) ? l[i] = t[i] : r && rr(`${Dt(e)}: key not found: ${i}`);
|
|
@@ -1958,9 +1968,9 @@ function fl(e, t, n, r) {
|
|
|
1958
1968
|
if (fr(l, t), Dr(n) && !Pr(n)) {
|
|
1959
1969
|
let o = n;
|
|
1960
1970
|
nl(e, t, o, 0, 0) ? pr(l, o) : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1961
|
-
} else if (
|
|
1971
|
+
} 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
1972
|
else {
|
|
1963
|
-
if (!(
|
|
1973
|
+
if (!(jr(n) && Or(n) > 0)) return {};
|
|
1964
1974
|
for (let o = 0; o < n.length; o++) {
|
|
1965
1975
|
let i = n[o];
|
|
1966
1976
|
t.hasOwnProperty(i) ? pr(l, i) : r && rr(`${Dt(e)}: key not found: ${i}`);
|
|
@@ -1995,10 +2005,10 @@ function bl(e) {
|
|
|
1995
2005
|
}
|
|
1996
2006
|
function pl(e, t) {
|
|
1997
2007
|
if (Ir(e) || Ir(t)) return !0;
|
|
1998
|
-
if (
|
|
2008
|
+
if (jr(e)) {
|
|
1999
2009
|
if (0 === e.length) return !0;
|
|
2000
2010
|
for (let n = 0; n < e.length; n++) if (e[n] === t) return !0;
|
|
2001
|
-
} else if (
|
|
2011
|
+
} else if (wr(e)) {
|
|
2002
2012
|
if (0 === Object.keys(e).length) return !0;
|
|
2003
2013
|
for (let n in e) if (n === t) return !0;
|
|
2004
2014
|
} else if (Dr(e) && e === t) return !0;
|
|
@@ -2008,9 +2018,9 @@ function ml(e, t, n, r, l) {
|
|
|
2008
2018
|
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return null;
|
|
2009
2019
|
l || (l = sl);
|
|
2010
2020
|
let o = [];
|
|
2011
|
-
if (
|
|
2021
|
+
if (jr(t)) for (let i = 0; i < t.length; i++) {
|
|
2012
2022
|
let s, a = t[i];
|
|
2013
|
-
if (
|
|
2023
|
+
if (wr(a)) s = Zr(e, a, "id", "", 0);
|
|
2014
2024
|
else {
|
|
2015
2025
|
if (!Dr(a)) continue;
|
|
2016
2026
|
s = a;
|
|
@@ -2018,7 +2028,7 @@ function ml(e, t, n, r, l) {
|
|
|
2018
2028
|
pl(n, s) && l(a, r) && o.push(a);
|
|
2019
2029
|
}
|
|
2020
2030
|
else {
|
|
2021
|
-
if (!
|
|
2031
|
+
if (!wr(t)) return rr("kw_collect() BAD kw parameter"), null;
|
|
2022
2032
|
for (let e of Object.keys(t)) {
|
|
2023
2033
|
let i = t[e];
|
|
2024
2034
|
pl(n, e) && l(i, r) && o.push(i);
|
|
@@ -2029,8 +2039,8 @@ function ml(e, t, n, r, l) {
|
|
|
2029
2039
|
function El(e, t, n) {
|
|
2030
2040
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
2031
2041
|
let r = {};
|
|
2032
|
-
if (Pr(n) || (t = qr(e, t, n)),
|
|
2033
|
-
else if (
|
|
2042
|
+
if (Pr(n) || (t = qr(e, t, n)), wr(t)) r = t;
|
|
2043
|
+
else if (jr(t)) for (let n = 0; n < t.length; n++) {
|
|
2034
2044
|
let l = t[n], o = Zr(e, l, "id", "", Pn.KW_REQUIRED);
|
|
2035
2045
|
Pr(o) || (r[o] = l);
|
|
2036
2046
|
}
|
|
@@ -2038,12 +2048,12 @@ function El(e, t, n) {
|
|
|
2038
2048
|
return r;
|
|
2039
2049
|
}
|
|
2040
2050
|
function hl(e, t, n) {
|
|
2041
|
-
if (e && !Ur(e) && rr("GObj bad instanceof"), Pr(n) || (t = qr(e, t, n)),
|
|
2042
|
-
if (
|
|
2051
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), Pr(n) || (t = qr(e, t, n)), jr(t)) return t;
|
|
2052
|
+
if (wr(t)) {
|
|
2043
2053
|
let n = [];
|
|
2044
2054
|
for (let r of Object.keys(t)) {
|
|
2045
2055
|
let l = t[r];
|
|
2046
|
-
|
|
2056
|
+
wr(l) ? (l.id = r, n.push(l)) : rr(`${Dt(e)} kwid_new_list: not a record: '${r}'`);
|
|
2047
2057
|
}
|
|
2048
2058
|
return n;
|
|
2049
2059
|
}
|
|
@@ -2058,10 +2068,10 @@ function yl(e, t) {
|
|
|
2058
2068
|
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return [];
|
|
2059
2069
|
let n = [];
|
|
2060
2070
|
if (Dr(t)) n.push(t);
|
|
2061
|
-
else if (
|
|
2062
|
-
else
|
|
2071
|
+
else if (wr(t)) for (let e in t) t.hasOwnProperty(e) && n.push(e);
|
|
2072
|
+
else jr(t) && t.forEach(function(t) {
|
|
2063
2073
|
if (Dr(t)) Pr(t) || n.push(t);
|
|
2064
|
-
else if (
|
|
2074
|
+
else if (wr(t)) {
|
|
2065
2075
|
let r = Zr(e, t, "id", 0, 0);
|
|
2066
2076
|
r && n.push(r);
|
|
2067
2077
|
}
|
|
@@ -2071,13 +2081,13 @@ function yl(e, t) {
|
|
|
2071
2081
|
function vl(e, t, n) {
|
|
2072
2082
|
t = t || "id", n = n || "value";
|
|
2073
2083
|
let r = [];
|
|
2074
|
-
if (
|
|
2084
|
+
if (jr(e)) for (let l = 0; l < e.length; l++) {
|
|
2075
2085
|
let o = e[l];
|
|
2076
2086
|
if (Dr(o)) r.push({
|
|
2077
2087
|
id: e[l],
|
|
2078
2088
|
value: e[l]
|
|
2079
2089
|
});
|
|
2080
|
-
else if (
|
|
2090
|
+
else if (wr(o)) {
|
|
2081
2091
|
let e = {};
|
|
2082
2092
|
if (Jr(o, t)) {
|
|
2083
2093
|
if (!Jr(o, n)) {
|
|
@@ -2098,7 +2108,7 @@ function vl(e, t, n) {
|
|
|
2098
2108
|
r.push(e);
|
|
2099
2109
|
} else rr("list2options(): case1 not implemented");
|
|
2100
2110
|
}
|
|
2101
|
-
else if (
|
|
2111
|
+
else if (wr(e)) for (let t of Object.keys(e)) r.push({
|
|
2102
2112
|
id: t,
|
|
2103
2113
|
value: t
|
|
2104
2114
|
});
|
|
@@ -2132,7 +2142,7 @@ function Rl(e, t) {
|
|
|
2132
2142
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return e.splice(n, 1), !0;
|
|
2133
2143
|
return !1;
|
|
2134
2144
|
}
|
|
2135
|
-
function
|
|
2145
|
+
function wl(e, t) {
|
|
2136
2146
|
try {
|
|
2137
2147
|
let n = e.__md_iev__;
|
|
2138
2148
|
if (n) return n[t];
|
|
@@ -2140,25 +2150,25 @@ function jl(e, t) {
|
|
|
2140
2150
|
return;
|
|
2141
2151
|
}
|
|
2142
2152
|
}
|
|
2143
|
-
function
|
|
2153
|
+
function jl(e, t, n) {
|
|
2144
2154
|
let r = e.__md_iev__;
|
|
2145
2155
|
r || (r = {}, e.__md_iev__ = r), r[t] = n;
|
|
2146
2156
|
}
|
|
2147
2157
|
function Dl(e, t, n, r) {
|
|
2148
2158
|
if (!Ur(e)) return rr("gobj is not a GObj"), null;
|
|
2149
2159
|
if (!t) return;
|
|
2150
|
-
let l =
|
|
2151
|
-
l || (l = [],
|
|
2160
|
+
let l = wl(t, n);
|
|
2161
|
+
l || (l = [], jl(t, n, l));
|
|
2152
2162
|
try {
|
|
2153
|
-
|
|
2163
|
+
jr(l) && l.unshift(r);
|
|
2154
2164
|
} catch (e) {
|
|
2155
2165
|
rr(e);
|
|
2156
2166
|
}
|
|
2157
2167
|
}
|
|
2158
2168
|
function $l(e, t, n, r) {
|
|
2159
2169
|
if (!Ur(e)) return rr("gobj is not a GObj"), null;
|
|
2160
|
-
if (!
|
|
2161
|
-
let l =
|
|
2170
|
+
if (!wr(t)) return rr("kw is not a dict"), null;
|
|
2171
|
+
let l = wl(t, n);
|
|
2162
2172
|
return l ? 0 === l.length ? (r && rr(`stack empty: ${n}`), null) : l[0] : (r && rr(`stack NOT FOUND: ${n}`), null);
|
|
2163
2173
|
}
|
|
2164
2174
|
function Al(e, t, n) {
|
|
@@ -2195,7 +2205,7 @@ function Ll(e, t, n) {
|
|
|
2195
2205
|
r,
|
|
2196
2206
|
e[r],
|
|
2197
2207
|
n
|
|
2198
|
-
]),
|
|
2208
|
+
]), wr(e[r]) && Ll(e[r], t, n), n = n.slice(0, -l.length);
|
|
2199
2209
|
}
|
|
2200
2210
|
}
|
|
2201
2211
|
function Ul(e, t, n) {
|
|
@@ -2212,8 +2222,8 @@ function Pl(e, t, n, r) {
|
|
|
2212
2222
|
if (!l) return rr("jdb_update: topic not found: " + t), null;
|
|
2213
2223
|
if (Pr(r.id)) return rr("jdb_update: record without id: " + r), sr(r), null;
|
|
2214
2224
|
let o, i = n.split("`"), s = l;
|
|
2215
|
-
for (; (o = i.shift()) && !Pr(o) && s;)
|
|
2216
|
-
if (0 === i.length && s) if (
|
|
2225
|
+
for (; (o = i.shift()) && !Pr(o) && s;) wr(s) && (s = nl(null, s, e.hook, [], 1)), s = Wl(s, null, o, !1);
|
|
2226
|
+
if (0 === i.length && s) if (jr(s)) s.push(r);
|
|
2217
2227
|
else if (s.id === r.id) Object.assign(s, r);
|
|
2218
2228
|
else {
|
|
2219
2229
|
let t = nl(null, s, e.hook, [], 1), n = Wl(t, e.hook, r.id, !1);
|
|
@@ -2226,8 +2236,8 @@ function Fl(e, t, n, r) {
|
|
|
2226
2236
|
if (!l) return rr("jdb_delete: topic not found: " + t), null;
|
|
2227
2237
|
if (Pr(r.id)) return rr("jdb_delete: record without id: " + r), sr(r), null;
|
|
2228
2238
|
let o, i = n.split("`"), s = l;
|
|
2229
|
-
for (; (o = i.shift()) && !Pr(o) && s;)
|
|
2230
|
-
if (0 === i.length && s) if (
|
|
2239
|
+
for (; (o = i.shift()) && !Pr(o) && s;) wr(s) && (s = nl(null, s, e.hook, null, 0)), s = Wl(s, null, o, !1);
|
|
2240
|
+
if (0 === i.length && s) if (jr(s)) {
|
|
2231
2241
|
let e = Sl(s, r.id);
|
|
2232
2242
|
e >= 0 && s.splice(e, 1);
|
|
2233
2243
|
} else {
|
|
@@ -2336,7 +2346,7 @@ function Hl(e, t) {
|
|
|
2336
2346
|
if (Dr(l)) if (l = l.trim(), l.length > 0 && "<" === l[0]) i.appendChild(ql(l));
|
|
2337
2347
|
else if (t && s) i.textContent = t(s) || l;
|
|
2338
2348
|
else i.textContent = l;
|
|
2339
|
-
else if (
|
|
2349
|
+
else if (jr(l)) {
|
|
2340
2350
|
if (l.length > 0) if (Dr(l[0])) i.appendChild(Hl(l, t));
|
|
2341
2351
|
else for (let e of l) Array.isArray(e) && e.length > 0 ? i.appendChild(Hl(e, t)) : e instanceof HTMLElement && i.appendChild(e);
|
|
2342
2352
|
} else l instanceof HTMLElement || l instanceof Text || l instanceof SVGElement ? i.appendChild(l) : null != l && (rr("content ignored"), ar(l));
|
|
@@ -2565,14 +2575,14 @@ function ho(e) {
|
|
|
2565
2575
|
}
|
|
2566
2576
|
function To(e, t) {
|
|
2567
2577
|
let n = Xt(e, v.SDF_PERSIST), r = gl(ho(e), null, !1);
|
|
2568
|
-
if (r &&
|
|
2578
|
+
if (r && wr(r)) {
|
|
2569
2579
|
let l = cl(e, r, t, !1);
|
|
2570
2580
|
l = cl(e, l, n, !1), on(e, l, v.SDF_PERSIST);
|
|
2571
2581
|
}
|
|
2572
2582
|
}
|
|
2573
2583
|
function yo(e, t) {
|
|
2574
2584
|
let n = cl(e, Xt(e, v.SDF_PERSIST), t, !1), r = gl(ho(e), null, !1);
|
|
2575
|
-
return r &&
|
|
2585
|
+
return r && wr(r) && dr(n, r), dl(ho(e), n);
|
|
2576
2586
|
}
|
|
2577
2587
|
function vo(e, t) {
|
|
2578
2588
|
let n = fl(e, gl(ho(e), null, !1), t, !1);
|
|
@@ -2580,10 +2590,10 @@ function vo(e, t) {
|
|
|
2580
2590
|
}
|
|
2581
2591
|
function So(e, t) {
|
|
2582
2592
|
let n = gl(ho(e), null, !1), r = {};
|
|
2583
|
-
return n &&
|
|
2593
|
+
return n && wr(n) && (r = cl(e, n, t, !1)), r;
|
|
2584
2594
|
}
|
|
2585
2595
|
function Oo(e) {
|
|
2586
|
-
if (
|
|
2596
|
+
if (jr(e) && 1 === Nr(e)) {
|
|
2587
2597
|
let t = e[0];
|
|
2588
2598
|
return Jr(t, "size") ? t.size : 1;
|
|
2589
2599
|
}
|
|
@@ -2613,7 +2623,7 @@ function No(e, t) {
|
|
|
2613
2623
|
};
|
|
2614
2624
|
}
|
|
2615
2625
|
}
|
|
2616
|
-
return
|
|
2626
|
+
return wr(t) ? {
|
|
2617
2627
|
topic_name: t.topic_name,
|
|
2618
2628
|
id: t.id,
|
|
2619
2629
|
hook_name: t.hook_name
|
|
@@ -2623,7 +2633,7 @@ function Ro(e, t) {
|
|
|
2623
2633
|
let n = No(e, t);
|
|
2624
2634
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
2625
2635
|
}
|
|
2626
|
-
function
|
|
2636
|
+
function wo(e, t) {
|
|
2627
2637
|
if (Dr(t)) {
|
|
2628
2638
|
if (-1 === t.indexOf("^")) {
|
|
2629
2639
|
let n, r = e.hook;
|
|
@@ -2645,12 +2655,12 @@ function jo(e, t) {
|
|
|
2645
2655
|
};
|
|
2646
2656
|
}
|
|
2647
2657
|
}
|
|
2648
|
-
return
|
|
2658
|
+
return wr(t) ? {
|
|
2649
2659
|
topic_name: t.topic_name,
|
|
2650
2660
|
id: t.id
|
|
2651
2661
|
} : (rr("bad hook 3"), rr(e), rr(t), null);
|
|
2652
2662
|
}
|
|
2653
|
-
var
|
|
2663
|
+
var jo = [
|
|
2654
2664
|
"string",
|
|
2655
2665
|
"integer",
|
|
2656
2666
|
"object",
|
|
@@ -2765,7 +2775,7 @@ function Io(e, t) {
|
|
|
2765
2775
|
let e = t.split(".");
|
|
2766
2776
|
for (let t = 0; t < e.length; t++) {
|
|
2767
2777
|
let r = e[t];
|
|
2768
|
-
if (Ol(
|
|
2778
|
+
if (Ol(jo, r)) n.real_type || (n.real_type = r);
|
|
2769
2779
|
else if (Ol($o, r)) n.type || (n.type = r);
|
|
2770
2780
|
else if (Ol(Do, r)) switch (r) {
|
|
2771
2781
|
case "writable":
|
|
@@ -2779,14 +2789,14 @@ function Io(e, t) {
|
|
|
2779
2789
|
}
|
|
2780
2790
|
}
|
|
2781
2791
|
n.real_type || (n.real_type = "string");
|
|
2782
|
-
} else
|
|
2792
|
+
} 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
2793
|
return n.type || (n.type = n.real_type), n;
|
|
2784
2794
|
}
|
|
2785
2795
|
function ko(e, t) {
|
|
2786
2796
|
let n = {};
|
|
2787
2797
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
2788
2798
|
let l;
|
|
2789
|
-
|
|
2799
|
+
wr(r) && (l = r.default);
|
|
2790
2800
|
let o = nl(null, t, e, l);
|
|
2791
2801
|
n[e] = o;
|
|
2792
2802
|
}), n;
|
|
@@ -2811,7 +2821,7 @@ var Fo = {
|
|
|
2811
2821
|
mt_create: function(e) {
|
|
2812
2822
|
let t = e.priv;
|
|
2813
2823
|
const n = nn(e, "subscriber");
|
|
2814
|
-
n &&
|
|
2824
|
+
n && jn(e, null, {}, n), t.periodic = Zt(e, "periodic"), t.msec = en(e, "msec");
|
|
2815
2825
|
},
|
|
2816
2826
|
mt_writing: function(e, t) {
|
|
2817
2827
|
let n = e.priv;
|
|
@@ -2848,13 +2858,13 @@ function Go() {
|
|
|
2848
2858
|
}("C_TIMER");
|
|
2849
2859
|
}
|
|
2850
2860
|
function Vo(e, t) {
|
|
2851
|
-
return e instanceof k ? "C_TIMER" !==
|
|
2861
|
+
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
2862
|
}
|
|
2853
2863
|
function Mo(e, t) {
|
|
2854
|
-
return e instanceof k ? "C_TIMER" !==
|
|
2864
|
+
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
2865
|
}
|
|
2856
2866
|
function Wo(e) {
|
|
2857
|
-
return e instanceof k ? "C_TIMER" !==
|
|
2867
|
+
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
2868
|
}
|
|
2859
2869
|
var Ko = [
|
|
2860
2870
|
N(y.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
@@ -2879,7 +2889,7 @@ var Ko = [
|
|
|
2879
2889
|
], xo = { gobj_timer: null }, Yo = null;
|
|
2880
2890
|
function Bo(e, t, n, r) {
|
|
2881
2891
|
let l = zt(e, t);
|
|
2882
|
-
return
|
|
2892
|
+
return wr(l) || (l = {}), l[n] = r, rn(e, t, l), He(e, t);
|
|
2883
2893
|
}
|
|
2884
2894
|
function Jo(e) {
|
|
2885
2895
|
if (!0 === e || !1 === e) return e;
|
|
@@ -2895,35 +2905,35 @@ function Ho(e, t, n, r) {
|
|
|
2895
2905
|
var Qo = {
|
|
2896
2906
|
mt_create: function(e) {
|
|
2897
2907
|
let t = e.priv;
|
|
2898
|
-
un(e, "start_date", eo()), un(e, "node_uuid", ro()), e.priv.gobj_timer = ot(
|
|
2908
|
+
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
2909
|
let t = zt(e, "trace_levels");
|
|
2900
|
-
if (!
|
|
2910
|
+
if (!wr(t)) return 0;
|
|
2901
2911
|
let n = t.__global_trace__;
|
|
2902
|
-
if (
|
|
2912
|
+
if (jr(n)) {
|
|
2903
2913
|
ce(4294967295, !1);
|
|
2904
2914
|
for (let e of n) se(e, !0);
|
|
2905
2915
|
}
|
|
2906
2916
|
for (const [n, r] of Object.entries(t)) {
|
|
2907
2917
|
let t = Me(n);
|
|
2908
|
-
if (t) if (
|
|
2918
|
+
if (t) if (jr(r)) {
|
|
2909
2919
|
he(t, null, !1);
|
|
2910
2920
|
for (let e of r) he(t, e, !0);
|
|
2911
|
-
} else rr(`${
|
|
2921
|
+
} else rr(`${wt(e)}: trace_levels of ${n} MUST be a list`);
|
|
2912
2922
|
}
|
|
2913
2923
|
}(e), function(e) {
|
|
2914
2924
|
let t = zt(e, "no_trace_levels");
|
|
2915
|
-
if (!
|
|
2925
|
+
if (!wr(t)) return 0;
|
|
2916
2926
|
let n = t.__global_no_trace__;
|
|
2917
|
-
if (
|
|
2927
|
+
if (jr(n)) {
|
|
2918
2928
|
fe(4294967295, !1);
|
|
2919
2929
|
for (let e of n) ae(e, !0);
|
|
2920
2930
|
}
|
|
2921
2931
|
for (const [n, r] of Object.entries(t)) {
|
|
2922
2932
|
let t = Me(n);
|
|
2923
|
-
if (t) if (
|
|
2933
|
+
if (t) if (jr(r)) {
|
|
2924
2934
|
ye(t, null, !1);
|
|
2925
2935
|
for (let e of r) ye(t, e, !0);
|
|
2926
|
-
} else rr(`${
|
|
2936
|
+
} else rr(`${wt(e)}: no_trace_levels of ${n} MUST be a list`);
|
|
2927
2937
|
}
|
|
2928
2938
|
}(e);
|
|
2929
2939
|
},
|
|
@@ -3064,7 +3074,7 @@ function ai(e, t, n, r) {
|
|
|
3064
3074
|
return function(e, t) {
|
|
3065
3075
|
let n = e.priv, r = JSON.stringify(t);
|
|
3066
3076
|
if (ti(e)) {
|
|
3067
|
-
let n = tn(e, "url"), l =
|
|
3077
|
+
let n = tn(e, "url"), l = wt(St()) + " ==> " + n, o = zt(St(), "trace_ievent_callback");
|
|
3068
3078
|
o ? o(l, t, 1, r.length) : ii(0, l, t);
|
|
3069
3079
|
}
|
|
3070
3080
|
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return lr(`${Dt(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
@@ -3112,13 +3122,13 @@ function _i(e) {
|
|
|
3112
3122
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
3113
3123
|
required_services: i
|
|
3114
3124
|
};
|
|
3115
|
-
return Dl(e, s, Xo, ui(e,
|
|
3125
|
+
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
3126
|
}
|
|
3117
3127
|
function ci(e, t) {
|
|
3118
3128
|
if (Pr(t.event)) return -1;
|
|
3119
3129
|
let n = {}, r = t.__global__, l = t.__config__, o = t.__filter__, i = t.__service__, s = t.subscriber;
|
|
3120
3130
|
l && (n.__config__ = l), r && (n.__global__ = r), o && (n.__filter__ = o);
|
|
3121
|
-
return Dl(e, n, Xo, ui(e,
|
|
3131
|
+
return Dl(e, n, Xo, ui(e, wt(s), i)), Al(e, n, "__subscribing__"), ai(e, t.event, n);
|
|
3122
3132
|
}
|
|
3123
3133
|
function fi(e, t, n, r) {
|
|
3124
3134
|
let l = e.priv;
|
|
@@ -3209,7 +3219,7 @@ function mi(e, t, n, r) {
|
|
|
3209
3219
|
} : (rr("parsing inter_event: kw not a json object"), null) : (rr("parsing inter_kw: no kw"), null);
|
|
3210
3220
|
}(0, n.data);
|
|
3211
3221
|
if (ti(e)) {
|
|
3212
|
-
let e =
|
|
3222
|
+
let e = wt(St()) + " <== " + l, t = n.data.length, r = zt(St(), "trace_ievent_callback");
|
|
3213
3223
|
r ? r(e, o, 2, t) : ii(0, e, o);
|
|
3214
3224
|
}
|
|
3215
3225
|
let i = o.event, s = o.kw;
|
|
@@ -3241,9 +3251,9 @@ function hi(e, t, n, r) {
|
|
|
3241
3251
|
var Ti = {
|
|
3242
3252
|
mt_create: function(e) {
|
|
3243
3253
|
let t = e.priv;
|
|
3244
|
-
t.gobj_timer = ot(
|
|
3254
|
+
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
3255
|
const n = nn(e, "subscriber");
|
|
3246
|
-
n &&
|
|
3256
|
+
n && jn(e, null, {}, n);
|
|
3247
3257
|
},
|
|
3248
3258
|
mt_writing: function(e, t) {
|
|
3249
3259
|
let n = e.priv;
|
|
@@ -3272,7 +3282,7 @@ var Ti = {
|
|
|
3272
3282
|
mt_stats: function(e, t, n, r) {
|
|
3273
3283
|
if ("ST_SESSION" !== cn(e)) return rr("Not in session"), null;
|
|
3274
3284
|
n || (n = {});
|
|
3275
|
-
let l = ui(e,
|
|
3285
|
+
let l = ui(e, wt(r), Zr(e, n, "service", null, 0)), o = nl(e, n, "__md_stats__", null, Pn.KW_EXTRACT);
|
|
3276
3286
|
return o || (o = {}), Dl(e, n, "stats_stack", {
|
|
3277
3287
|
stats: t,
|
|
3278
3288
|
kw: o
|
|
@@ -3281,7 +3291,7 @@ var Ti = {
|
|
|
3281
3291
|
mt_command_parser: function(e, t, n, r) {
|
|
3282
3292
|
if ("ST_SESSION" !== cn(e)) return rr("Not in session"), null;
|
|
3283
3293
|
n || (n = {});
|
|
3284
|
-
let l = ui(e,
|
|
3294
|
+
let l = ui(e, wt(r), Zr(e, n, "service", "", 0)), o = nl(e, n, "__md_command__", null, Pn.KW_EXTRACT);
|
|
3285
3295
|
return o || (o = {}), Dl(e, n, "command_stack", {
|
|
3286
3296
|
command: t,
|
|
3287
3297
|
kw: o
|
|
@@ -3291,7 +3301,7 @@ var Ti = {
|
|
|
3291
3301
|
if ("ST_SESSION" !== cn(e)) return window.console.error("Not in session"), -1;
|
|
3292
3302
|
if (n || (n = {}), $l(e, n, Xo));
|
|
3293
3303
|
else {
|
|
3294
|
-
let l = ui(e,
|
|
3304
|
+
let l = ui(e, wt(r), Zr(e, n, "__service__", 0, 0));
|
|
3295
3305
|
pr(n, "__service__"), Dl(e, n, "__message__", t), Dl(e, n, Xo, l);
|
|
3296
3306
|
}
|
|
3297
3307
|
return Al(e, n, "__message__"), ai(e, t, n, r);
|
|
@@ -3307,7 +3317,7 @@ var Ti = {
|
|
|
3307
3317
|
if (Pr(t.event)) return 0;
|
|
3308
3318
|
let r = {}, l = t.__global__, o = t.__config__, i = t.__filter__, s = t.__service__, a = t.subscriber;
|
|
3309
3319
|
o && (r.__config__ = o), l && (r.__global__ = l), i && (r.__filter__ = i);
|
|
3310
|
-
return Dl(e, r, Xo, ui(e,
|
|
3320
|
+
return Dl(e, r, Xo, ui(e, wt(a), s)), Al(e, r, "__unsubscribing__"), ai(e, t.event, r, e);
|
|
3311
3321
|
}
|
|
3312
3322
|
};
|
|
3313
3323
|
function yi() {
|
|
@@ -3406,6 +3416,6 @@ function yi() {
|
|
|
3406
3416
|
], t, Ti, 0, Zo, ni, 0, 0, ei, C.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3407
3417
|
}("C_IEVENT_CLI");
|
|
3408
3418
|
}
|
|
3409
|
-
export { k as GObj, N as SDATA, D as SDATAAUTHZ, R as SDATACM,
|
|
3419
|
+
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
3420
|
|
|
3411
3421
|
//# sourceMappingURL=gobj-js.es.min.js.map
|