@yuneta/gobj-js 7.22.0 → 7.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gobj-js.cjs.js +6 -5
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +111 -111
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +6 -5
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +136 -136
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +6 -5
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +107 -107
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +6 -5
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +3 -3
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.es.min.js
CHANGED
|
@@ -134,7 +134,7 @@ function s(e, t, n, r, l) {
|
|
|
134
134
|
data: l || []
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
|
-
var a = "7.0.0a", u = null, _ = null, c = null, f = null, g = null, d = null, b = [], p = Object.create(null), m = {}, E = null,
|
|
137
|
+
var a = "7.0.0a", u = null, _ = null, c = null, f = null, g = null, d = null, b = [], p = Object.create(null), m = {}, E = null, h = null, T = 0, y = Object.freeze({
|
|
138
138
|
DTP_STRING: 1,
|
|
139
139
|
DTP_BOOLEAN: 2,
|
|
140
140
|
DTP_INTEGER: 3,
|
|
@@ -169,11 +169,11 @@ var v = Object.freeze({
|
|
|
169
169
|
SDF_AUTHZ_RS: 1048576
|
|
170
170
|
});
|
|
171
171
|
v.SDF_RD, v.SDF_WR, v.SDF_STATS, v.SDF_PERSIST, v.SDF_VOLATIL, v.SDF_RSTATS, v.SDF_PSTATS, v.SDF_WR, v.SDF_PERSIST;
|
|
172
|
-
var
|
|
172
|
+
var O = 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
|
-
},
|
|
176
|
+
}, S = () => new O(0, null), N = (e, t, n, r, l) => new O(e, t, n, r, l), R = (e, t, n, r, l, o) => new O(e, t, 0, null, o, n, null, 0, l, r, null), w = (e, t, n, r, l, o, i) => new O(e, t, n, null, i, r, null, 0, o, l, null), j = (e, t, n, r, l) => new O(e, t, n, r, l), D = (e, t, n, r, l, o) => new O(e, t, n, null, o, r, null, 0, null, l, null), A = (e, t, n, r, l) => new O(e, t, n, null, l, null, null, 0, null, null, r), $ = (e, t, n, r, l, o) => new O(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
|
+
Sr(e) && (e = JSON.stringify(e)), rr(" ".repeat(Math.max(1, 2 * T)) + String(e));
|
|
235
235
|
}
|
|
236
236
|
var B = Object.freeze({
|
|
237
237
|
TRACE_MACHINE: 65536,
|
|
@@ -420,13 +420,13 @@ function me(e) {
|
|
|
420
420
|
function Ee(e) {
|
|
421
421
|
return Q = Number(e) || 0, 0;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function he(e, t, n) {
|
|
424
424
|
const r = Rr(e) ? Me(e) : e;
|
|
425
425
|
if (!r) return er(`gobj_set_gclass_trace: gclass NOT FOUND: ${e}`), -1;
|
|
426
426
|
const l = null === t ? 4294967295 : X(t, "gobj_set_gclass_trace", r.s_user_trace_level || null);
|
|
427
427
|
return l ? (n ? r.trace_level |= l : r.trace_level &= ~l, 0) : -1;
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function Te(e, t, n) {
|
|
430
430
|
if (!e) return er("gobj_set_gobj_trace: gobj NULL"), -1;
|
|
431
431
|
const r = X(t, "gobj_set_gobj_trace", e.gclass && e.gclass.s_user_trace_level || null);
|
|
432
432
|
return r ? (n ? e.trace_level |= r : e.trace_level &= ~r, 0) : -1;
|
|
@@ -442,7 +442,7 @@ function ve(e, t, n) {
|
|
|
442
442
|
const r = X(t, "gobj_set_gobj_no_trace", e.gclass && e.gclass.s_user_trace_level || null);
|
|
443
443
|
return r ? (n ? e.no_trace_level |= r : e.no_trace_level &= ~r, 0) : -1;
|
|
444
444
|
}
|
|
445
|
-
function
|
|
445
|
+
function Oe() {
|
|
446
446
|
return J.map(([e, t, n]) => ({
|
|
447
447
|
name: e,
|
|
448
448
|
bit: t,
|
|
@@ -450,7 +450,7 @@ function Se() {
|
|
|
450
450
|
set: !!(q & t)
|
|
451
451
|
}));
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function Se(e, t, n, r, l, o, i) {
|
|
454
454
|
u = t, _ = n, c = r, f = l, g = o, d = i;
|
|
455
455
|
const s = [["EV_STATE_CHANGED", U.EVF_SYSTEM_EVENT | U.EVF_OUTPUT_EVENT | U.EVF_NO_WARN_SUBS], [0, 0]];
|
|
456
456
|
for (let e = 0; e < s.length; e++) {
|
|
@@ -499,7 +499,7 @@ function Re(e, t, n) {
|
|
|
499
499
|
er(`JSON parse error: ${e.message}`);
|
|
500
500
|
}
|
|
501
501
|
else r = l;
|
|
502
|
-
|
|
502
|
+
Sr(r) || (r = {});
|
|
503
503
|
break;
|
|
504
504
|
case y.DTP_JSON:
|
|
505
505
|
if (Rr(l)) try {
|
|
@@ -549,7 +549,7 @@ function we(e, t, n, r) {
|
|
|
549
549
|
er(`JSON parse error: ${e.message}`);
|
|
550
550
|
}
|
|
551
551
|
else l = r;
|
|
552
|
-
if (!
|
|
552
|
+
if (!Sr(l)) return er(`attr must be an object: ${n.name}`), -1;
|
|
553
553
|
break;
|
|
554
554
|
case y.DTP_JSON:
|
|
555
555
|
if (Rr(r)) try {
|
|
@@ -558,11 +558,11 @@ function we(e, t, n, r) {
|
|
|
558
558
|
er(`JSON parse error: ${e.message}`);
|
|
559
559
|
}
|
|
560
560
|
else l = r;
|
|
561
|
-
if (!Nr(l) && !
|
|
561
|
+
if (!Nr(l) && !Sr(l)) return er(`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 && er(`${Dt(e)}: attr undefined: ${n.name}`), t[n.name] = l,
|
|
565
|
+
return void 0 === l && er(`${Dt(e)}: attr undefined: ${n.name}`), t[n.name] = l, Sr(e.priv) && e.priv.hasOwnProperty(n.name) && (e.priv[n.name] = l), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, n.name), 0;
|
|
566
566
|
}
|
|
567
567
|
function je(e) {
|
|
568
568
|
return e.jn_attrs;
|
|
@@ -698,7 +698,7 @@ function We() {
|
|
|
698
698
|
return e;
|
|
699
699
|
}
|
|
700
700
|
function Ke() {
|
|
701
|
-
return !
|
|
701
|
+
return !h || h.obflag & P.obflag_destroyed ? null : h;
|
|
702
702
|
}
|
|
703
703
|
function xe(e, t) {
|
|
704
704
|
e = e.toLowerCase();
|
|
@@ -753,7 +753,7 @@ function et(e, n, r, l, o) {
|
|
|
753
753
|
}
|
|
754
754
|
if (o & L.gobj_flag_service && xe(e, !1)) return er(`service ALREADY registered: ${n}^${e}`), null;
|
|
755
755
|
if (o & L.gobj_flag_default_service) {
|
|
756
|
-
if (
|
|
756
|
+
if (h) return er(`default service ALREADY registered: ${n}^${e}`), null;
|
|
757
757
|
o |= L.gobj_flag_service;
|
|
758
758
|
}
|
|
759
759
|
if (Cr(n)) return er("gclass_name must be a string"), null;
|
|
@@ -768,7 +768,7 @@ function et(e, n, r, l, o) {
|
|
|
768
768
|
s.jn_attrs = Ne(s, i.attrs_table);
|
|
769
769
|
for (const [e, t] of Object.entries(s.jn_attrs)) e in s.priv && (s.priv[e] = t);
|
|
770
770
|
let a = te(s);
|
|
771
|
-
return a && Y(t("💙💙⏩ creating: %s^%s", i.gclass_name, e)), s.gobj_flag & L.gobj_flag_service && Ye(s), s.gobj_flag & L.gobj_flag_yuno && (E = s), s.gobj_flag & L.gobj_flag_default_service && (
|
|
771
|
+
return a && Y(t("💙💙⏩ creating: %s^%s", i.gclass_name, e)), s.gobj_flag & L.gobj_flag_service && Ye(s), s.gobj_flag & L.gobj_flag_yuno && (E = s), s.gobj_flag & L.gobj_flag_default_service && (h = s), s.gobj_flag & L.gobj_flag_yuno || Be(l, s), s.obflag |= P.obflag_created, s.gclass.instances++, Ze(s, r), s.gobj_flag & L.gobj_flag_service && u && u(s, null), s.gclass.gmt.mt_create2 ? s.gclass.gmt.mt_create2(s, r) : s.gclass.gmt.mt_create && s.gclass.gmt.mt_create(s), l && l.gclass.gmt.mt_child_added && (a && Y(t("👦👦🔵 child_added(%s): %s", At(l), Dt(s))), l.gclass.gmt.mt_child_added(l, s)), a && Y(t("💙💙⏪ created: %s", At(s))), s;
|
|
772
772
|
}
|
|
773
773
|
function tt(e, t, n) {
|
|
774
774
|
return et(e, t, n, null, L.gobj_flag_yuno);
|
|
@@ -818,13 +818,13 @@ function at(e) {
|
|
|
818
818
|
return e.gclass.gmt.mt_start && (n = e.gclass.gmt.mt_start(e)), n;
|
|
819
819
|
}
|
|
820
820
|
function ut(e, t, n) {
|
|
821
|
-
return e.gclass.gclass_flag & C.gcflag_manual_start || Ct(e) ||
|
|
821
|
+
return e.gclass.gclass_flag & C.gcflag_manual_start || Ct(e) || ht(e) || Tt(e) || at(e), 0;
|
|
822
822
|
}
|
|
823
823
|
function _t(e) {
|
|
824
824
|
return Ct(e) ? (er("gobj NULL or DESTROYED"), -1) : Ft(e, F.WALK_FIRST2LAST, ut, 0, 0);
|
|
825
825
|
}
|
|
826
826
|
function ct(e, t, n) {
|
|
827
|
-
return e.gclass.gclass_flag & C.gcflag_manual_start ||
|
|
827
|
+
return e.gclass.gclass_flag & C.gcflag_manual_start || Tt(e) ? 1 : (ht(e) || at(e), 0);
|
|
828
828
|
}
|
|
829
829
|
function ft(e) {
|
|
830
830
|
return Ct(e) ? (er("gobj NULL or DESTROYED"), -1) : (re(e) && Y(t("⏺ ⏺ ⏺ ⏺ start_tree: %s", At(e))), e.gclass.gclass_flag & C.gcflag_manual_start || e.disabled ? 0 : (e.running || at(e), Gt(e, F.WALK_TOP2BOTTOM, ct, 0, 0)));
|
|
@@ -837,19 +837,19 @@ function gt(e) {
|
|
|
837
837
|
return e.gclass.gmt.mt_stop && (n = e.gclass.gmt.mt_stop(e)), n;
|
|
838
838
|
}
|
|
839
839
|
function dt(e, t, n) {
|
|
840
|
-
return
|
|
840
|
+
return ht(e) && gt(e), 0;
|
|
841
841
|
}
|
|
842
842
|
function bt(e) {
|
|
843
843
|
return Ct(e) ? (er("gobj NULL or DESTROYED"), -1) : Ft(e, F.WALK_FIRST2LAST, dt, 0, 0);
|
|
844
844
|
}
|
|
845
845
|
function pt(e) {
|
|
846
|
-
return Ct(e) ? (er("gobj NULL or DESTROYED"), -1) : (re(e) && Y(t("⏹ ⏹ ⏹ ⏹ stop_tree: %s", At(e))),
|
|
846
|
+
return Ct(e) ? (er("gobj NULL or DESTROYED"), -1) : (re(e) && Y(t("⏹ ⏹ ⏹ ⏹ stop_tree: %s", At(e))), ht(e) && gt(e), Gt(e, F.WALK_TOP2BOTTOM, dt, 0, 0));
|
|
847
847
|
}
|
|
848
848
|
function mt(e) {
|
|
849
849
|
if (Ct(e)) return er(`gobj NULL or DESTROYED: ${Dt(e)}`), -1;
|
|
850
850
|
if (e.playing) return er(`${Dt(e)}: GObj ALREADY PLAYING`), -1;
|
|
851
851
|
if (e.disabled) return er(`${Dt(e)}: GObj DISABLED`), -1;
|
|
852
|
-
if (!
|
|
852
|
+
if (!ht(e)) {
|
|
853
853
|
if (e.gclass.gclass_flag & C.gcflag_required_start_to_play) return er(`${Dt(e)}: Cannot play, start not done`), -1;
|
|
854
854
|
tr(`${Dt(e)}: GObj playing without previous start`), at(e);
|
|
855
855
|
}
|
|
@@ -860,10 +860,10 @@ function mt(e) {
|
|
|
860
860
|
function Et(e) {
|
|
861
861
|
return Ct(e) ? (er("gobj NULL or DESTROYED"), -1) : e.playing ? (re(e) && Y(t("⏸ ⏸ pause: %s", At(e))), e.playing = !1, e.gclass.gmt.mt_pause ? e.gclass.gmt.mt_pause(e) : 0) : (er(`${Dt(e)}: GObj NOT PLAYING`), -1);
|
|
862
862
|
}
|
|
863
|
-
function
|
|
863
|
+
function ht(e) {
|
|
864
864
|
return !Ct(e) && e.running;
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function Tt(e) {
|
|
867
867
|
return !!Ct(e) || e.disabled;
|
|
868
868
|
}
|
|
869
869
|
function yt(e) {
|
|
@@ -872,19 +872,19 @@ function yt(e) {
|
|
|
872
872
|
function vt(e) {
|
|
873
873
|
return !Ct(e) && e.playing;
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function Ot() {
|
|
876
876
|
return !E || E.obflag & P.obflag_destroyed ? null : E;
|
|
877
877
|
}
|
|
878
|
-
function
|
|
879
|
-
let e =
|
|
878
|
+
function St() {
|
|
879
|
+
let e = Ot();
|
|
880
880
|
return e ? wt(e) : "";
|
|
881
881
|
}
|
|
882
882
|
function Nt() {
|
|
883
|
-
let e =
|
|
883
|
+
let e = Ot();
|
|
884
884
|
return e ? tn(e, "yuno_role") : "";
|
|
885
885
|
}
|
|
886
886
|
function Rt() {
|
|
887
|
-
let e =
|
|
887
|
+
let e = Ot();
|
|
888
888
|
return e ? tn(e, "yuno_id") : "";
|
|
889
889
|
}
|
|
890
890
|
function wt(e) {
|
|
@@ -971,7 +971,7 @@ function Kt(e, t, n, r, l) {
|
|
|
971
971
|
function xt(e, t) {
|
|
972
972
|
if (Cr(t)) return null;
|
|
973
973
|
const n = t.toLowerCase();
|
|
974
|
-
return "__default_service__" === n ?
|
|
974
|
+
return "__default_service__" === n ? h : "__yuno__" === n || "__root__" === n ? E : Ht(E, t);
|
|
975
975
|
}
|
|
976
976
|
function Yt(e, t) {
|
|
977
977
|
if (!kr(e)) return er("gobj NULL of bad type"), !1;
|
|
@@ -1063,8 +1063,8 @@ function Xt(e, t, n) {
|
|
|
1063
1063
|
}
|
|
1064
1064
|
function Zt(e, t) {
|
|
1065
1065
|
if (t) {
|
|
1066
|
-
if (0 === Fr(t, "__disabled__")) return
|
|
1067
|
-
if (0 === Fr(t, "__running__")) return
|
|
1066
|
+
if (0 === Fr(t, "__disabled__")) return Tt(e);
|
|
1067
|
+
if (0 === Fr(t, "__running__")) return ht(e);
|
|
1068
1068
|
if (0 === Fr(t, "__playing__")) return vt(e);
|
|
1069
1069
|
if (0 === Fr(t, "__service__")) return yt(e);
|
|
1070
1070
|
}
|
|
@@ -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, Sr(e.priv) && e.priv.hasOwnProperty(l) && (e.priv[l] = r), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, l), 0) : (er(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, Sr(e.priv) && e.priv.hasOwnProperty(o) && (e.priv[o] = r), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.mt_writing && e.mt_writing(e, o), 0;
|
|
1105
1105
|
break;
|
|
1106
1106
|
}
|
|
1107
1107
|
return er(t("gobj_write_attr(%s): attr not found '%s'", Dt(e), o)), -1;
|
|
@@ -1114,7 +1114,7 @@ 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
|
+
Sr(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;
|
|
@@ -1130,15 +1130,15 @@ function on(e, t, n, r) {
|
|
|
1130
1130
|
}
|
|
1131
1131
|
function sn(e, t, n) {
|
|
1132
1132
|
let r = De(e, t, !1);
|
|
1133
|
-
return r ? (r[t] = Lr(n),
|
|
1133
|
+
return r ? (r[t] = Lr(n), Sr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (er(`${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), Sr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (er(`${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), Sr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (er(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1142
1142
|
}
|
|
1143
1143
|
function _n(e, n) {
|
|
1144
1144
|
if (Ct(e)) return er("gobj NULL or DESTROYED"), null;
|
|
@@ -1185,18 +1185,18 @@ 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(
|
|
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) : (er(`gobj_post_event(): event NOT DEFINED in gclass ${jt(e)}, event ${n}`), -1) : (er(`gobj_post_event(): gobj dst NULL, event ${n}`), -1);
|
|
1189
1189
|
}
|
|
1190
|
-
function
|
|
1190
|
+
function hn() {
|
|
1191
1191
|
return pn.length;
|
|
1192
1192
|
}
|
|
1193
|
-
function
|
|
1193
|
+
function Tn() {
|
|
1194
1194
|
mn = !1;
|
|
1195
1195
|
let e = pn;
|
|
1196
1196
|
pn = [];
|
|
1197
1197
|
let t = 0;
|
|
1198
1198
|
for (let n of e) n.dst.obflag & (P.obflag_destroyed | P.obflag_destroying) || (yn(n.dst, n.event, n.kw, n.src), t++);
|
|
1199
|
-
return pn.length > 0 && !mn && (mn = !0, setTimeout(
|
|
1199
|
+
return pn.length > 0 && !mn && (mn = !0, setTimeout(Tn, 0)), t;
|
|
1200
1200
|
}
|
|
1201
1201
|
function yn(e, n, r, l) {
|
|
1202
1202
|
if (!(e && e instanceof k)) return er("gobj dst NULL"), -1;
|
|
@@ -1204,28 +1204,28 @@ function yn(e, n, r, l) {
|
|
|
1204
1204
|
let o = e.current_state;
|
|
1205
1205
|
if (!o) return er(`${Dt(e)}: current_state NULL`), -1;
|
|
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 ? (
|
|
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 && i > 1 && Tr(r) && or(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))), er(`📛📛 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
1214
|
s.action && (r = no(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
|
-
r && le(e) &&
|
|
1216
|
+
r && le(e) && Tr(r) && or(r);
|
|
1217
1217
|
}
|
|
1218
1218
|
s.next_state && _n(e, s.next_state);
|
|
1219
1219
|
let a = -1;
|
|
1220
1220
|
try {
|
|
1221
1221
|
s.action && (a = s.action(e, n, r, l));
|
|
1222
1222
|
} finally {}
|
|
1223
|
-
return !i || 1 === W || e.obflag & P.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 || "", wr(a) ? a : 0)),
|
|
1223
|
+
return !i || 1 === W || e.obflag & P.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 || "", wr(a) ? a : 0)), T--, a;
|
|
1224
1224
|
}
|
|
1225
1225
|
var vn = Object.freeze({
|
|
1226
1226
|
__hard_subscription__: 1,
|
|
1227
1227
|
__own_event__: 2
|
|
1228
|
-
}),
|
|
1228
|
+
}), On = [
|
|
1229
1229
|
N(y.DTP_POINTER, "publisher", 0, null, "publisher gobj"),
|
|
1230
1230
|
N(y.DTP_POINTER, "subscriber", 0, null, "subscriber gobj"),
|
|
1231
1231
|
N(y.DTP_STRING, "event", 0, "", "event name subscribed"),
|
|
@@ -1236,9 +1236,9 @@ var vn = Object.freeze({
|
|
|
1236
1236
|
N(y.DTP_JSON, "__local__", 0, null, "local kw, remove in publishing"),
|
|
1237
1237
|
N(y.DTP_JSON, "__filter__", 0, null, "filter kw, filter in publishing"),
|
|
1238
1238
|
N(y.DTP_STRING, "__service__", 0, "", "subscription service"),
|
|
1239
|
-
|
|
1239
|
+
S()
|
|
1240
1240
|
];
|
|
1241
|
-
function
|
|
1241
|
+
function Sn(e, t, n, r, l) {
|
|
1242
1242
|
let o = Xr(t, r, "__config__", null), i = Xr(t, r, "__global__", null), s = Xr(t, r, "__local__", null), a = Zr(t, r, "__filter__", null), u = !0;
|
|
1243
1243
|
if (t && t !== zr(null, e, "publisher", null) && (u = !1), l && l !== zr(null, e, "subscriber", null) && (u = !1), n && n !== Qr(null, e, "event", "") && (u = !1), vr(o) > 0) {
|
|
1244
1244
|
let t = Xr(null, e, "__config__", null);
|
|
@@ -1262,12 +1262,12 @@ function Nn(e, t, n, r, l) {
|
|
|
1262
1262
|
let o = [];
|
|
1263
1263
|
for (let i = 0; i < e.length; i++) {
|
|
1264
1264
|
let s = e[i];
|
|
1265
|
-
|
|
1265
|
+
Sn(s, t, n, r, l) && pr(o, s);
|
|
1266
1266
|
}
|
|
1267
1267
|
return o;
|
|
1268
1268
|
}
|
|
1269
1269
|
function Rn(e, t, n, r, l) {
|
|
1270
|
-
for (let o = 0; o < e.length; o++) if (
|
|
1270
|
+
for (let o = 0; o < e.length; o++) if (Sn(e[o], t, n, r, l)) return o;
|
|
1271
1271
|
return -1;
|
|
1272
1272
|
}
|
|
1273
1273
|
function wn(e, n, r, l) {
|
|
@@ -1294,7 +1294,7 @@ function jn(e, n, r, l) {
|
|
|
1294
1294
|
let i = Nn(e.dl_subscriptions, e, n, r, l);
|
|
1295
1295
|
yr(i) > 0 && (er(`${Dt(e)}: ${yr(i)} subscription(s) REPEATED, will be deleted and override`), or(i, "subscription REPEATED"), An(e, i, !1));
|
|
1296
1296
|
let s = function(e, t, n, r) {
|
|
1297
|
-
let l = Ne(e,
|
|
1297
|
+
let l = Ne(e, On);
|
|
1298
1298
|
br(l, "event", t), br(l, "subscriber", r), br(l, "publisher", e);
|
|
1299
1299
|
let o = 0;
|
|
1300
1300
|
if (n) {
|
|
@@ -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 (Sr(r) || (r = {}), !e || e.obflag & (P.obflag_destroyed | P.obflag_destroying)) return er("gobj NULL or DESTROYED"), -1;
|
|
1376
1376
|
if (Cr(n)) return er(`${Dt(e)}: event EMPTY`), -1;
|
|
1377
1377
|
let l = gn(e, n, !0);
|
|
1378
1378
|
if (!(l && l.event_flag & (U.EVF_SYSTEM_EVENT | U.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return er(`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 ? "" : "!!", jt(e), wt(e), e.current_state.state_name, "", 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 ? "" : "!!", jt(e), wt(e), e.current_state.state_name, "", n || "", "")), Tr(r) && or(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
|
}
|
|
@@ -1399,7 +1399,7 @@ function Cn(e, n, r) {
|
|
|
1399
1399
|
if (!d) continue;
|
|
1400
1400
|
let b = gn(_, n, !0);
|
|
1401
1401
|
if (b && b.event_flag & U.EVF_SYSTEM_EVENT && !dn(_, b.event_name, 0)) continue;
|
|
1402
|
-
i && Kr(g, i), l && ur(g, l), o && (Y(1 === W ? t("🔝🔄 %s (%s) %s%s", n || "", n || "", _.running ? "" : "!!", Dt(_)) : t("🔝🔄 mach(%s%s), st: %s, ev: %s, from(%s%s)", _.running ? "" : "!!", Dt(_), cn(_), n || "", e && !e.running ? "!!" : "", Dt(e))),
|
|
1402
|
+
i && Kr(g, i), l && ur(g, l), o && (Y(1 === W ? t("🔝🔄 %s (%s) %s%s", n || "", n || "", _.running ? "" : "!!", Dt(_)) : t("🔝🔄 mach(%s%s), st: %s, ev: %s, from(%s%s)", _.running ? "" : "!!", Dt(_), cn(_), n || "", e && !e.running ? "!!" : "", Dt(e))), Tr(g) && or(g));
|
|
1403
1403
|
let p = yn(_, n, g, e);
|
|
1404
1404
|
if (p < 0 && c & vn.__own_event__) {
|
|
1405
1405
|
s = -1;
|
|
@@ -1413,7 +1413,7 @@ function Cn(e, n, r) {
|
|
|
1413
1413
|
function Ln(e, n, r, l) {
|
|
1414
1414
|
return Ct(e) ? (er("gobj NULL or DESTROYED"), -1) : ((function(e) {
|
|
1415
1415
|
return Q > 1 || !!e && !!(Z(e) & B.TRACE_COMMANDS);
|
|
1416
|
-
}(e) || oe(e, null) && !ie(l, null)) && (Y(t("🌀🌀 mach(%s%s), cmd: %s, src: %s",
|
|
1416
|
+
}(e) || oe(e, null) && !ie(l, null)) && (Y(t("🌀🌀 mach(%s%s), cmd: %s, src: %s", ht(e) ? "" : "!!", Dt(e), n, Dt(l))), le(e) && or(r)), e.gclass.gmt.mt_command_parser ? e.gclass.gmt.mt_command_parser(e, n, r, l) : e.gclass.command_table ? g ? g(e, n, r, l) : o(0, -1, t("%s: global command parser not available", Dt(e)), 0, 0) : o(0, -1, t("%s: command table not available", Dt(e)), 0, 0));
|
|
1417
1417
|
}
|
|
1418
1418
|
function Pn(e, n, r, l) {
|
|
1419
1419
|
return Ct(e) ? (er("gobj NULL or DESTROYED"), -1) : e.gclass.gmt.mt_stats ? e.gclass.gmt.mt_stats(e, n, r, l) : d ? d(e, n, r, l) : s(0, -1, t("%s, stats parser not available", Dt(e)), 0, 0);
|
|
@@ -1586,22 +1586,22 @@ function mr(e, t) {
|
|
|
1586
1586
|
function Er(e, t) {
|
|
1587
1587
|
e.splice(t, 1);
|
|
1588
1588
|
}
|
|
1589
|
-
function
|
|
1589
|
+
function hr(e, t) {
|
|
1590
1590
|
return t ? (Array.prototype.push.apply(e, t), e) : e;
|
|
1591
1591
|
}
|
|
1592
|
-
function
|
|
1593
|
-
return
|
|
1592
|
+
function Tr(e) {
|
|
1593
|
+
return Sr(e) ? Object.keys(e).length : 0;
|
|
1594
1594
|
}
|
|
1595
1595
|
function yr(e) {
|
|
1596
1596
|
return Nr(e) ? e.length : 0;
|
|
1597
1597
|
}
|
|
1598
1598
|
function vr(e) {
|
|
1599
|
-
return
|
|
1599
|
+
return Sr(e) ? Object.keys(e).length : Nr(e) ? e.length : Rr(e) && e.length > 0 ? 1 : 0;
|
|
1600
1600
|
}
|
|
1601
|
-
function
|
|
1601
|
+
function Or(e) {
|
|
1602
1602
|
return 0 === vr(e);
|
|
1603
1603
|
}
|
|
1604
|
-
function
|
|
1604
|
+
function Sr(e) {
|
|
1605
1605
|
return null !== e && "object" == typeof e && !Array.isArray(e);
|
|
1606
1606
|
}
|
|
1607
1607
|
function Nr(e) {
|
|
@@ -1652,7 +1652,7 @@ function Fr(e, t) {
|
|
|
1652
1652
|
return n === r ? 0 : n > r ? 1 : -1;
|
|
1653
1653
|
}
|
|
1654
1654
|
function Gr(e, t) {
|
|
1655
|
-
if (
|
|
1655
|
+
if (Sr(e) || Sr(t) || Nr(e) || Nr(t)) return 0;
|
|
1656
1656
|
if (wr(e) || wr(t)) {
|
|
1657
1657
|
let n = Number(e), r = Number(t);
|
|
1658
1658
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
@@ -1688,7 +1688,7 @@ function xr(e, t) {
|
|
|
1688
1688
|
return !(!(t in e) || !e.hasOwnProperty(t));
|
|
1689
1689
|
}
|
|
1690
1690
|
function Yr(e, t, n, r) {
|
|
1691
|
-
if (e && !kr(e) && er("GObj bad instanceof"), !
|
|
1691
|
+
if (e && !kr(e) && er("GObj bad instanceof"), !Sr(t) && !Nr(t)) return er(`${Dt(e)}: kw must be list or dict`), 0;
|
|
1692
1692
|
if (!Rr(n)) return er(`${Dt(e)}: path must be a string: ${String(n)}`), 0;
|
|
1693
1693
|
let l = n.split("`");
|
|
1694
1694
|
if (l.length <= 1) return t[n];
|
|
@@ -1780,7 +1780,7 @@ function Xr(e, t, n, r, l) {
|
|
|
1780
1780
|
}
|
|
1781
1781
|
return i && (er(`path not found: '${n}'`), or(t)), Object(r);
|
|
1782
1782
|
}
|
|
1783
|
-
return a && Br(e, t, n),
|
|
1783
|
+
return a && Br(e, t, n), Sr(o) ? Object(o) : (i && (er(`path value MUST BE a dict: ${n}`), lr(t)), Object(r));
|
|
1784
1784
|
}
|
|
1785
1785
|
function Zr(e, t, n, r, l) {
|
|
1786
1786
|
e && !kr(e) && er("GObj bad instanceof");
|
|
@@ -1809,7 +1809,7 @@ function el(e, t, n, r, l) {
|
|
|
1809
1809
|
return a && Br(e, t, n), Nr(o) ? Array(o) : (i && (er(`path value MUST BE an array: ${n}`), lr(t)), Array(r));
|
|
1810
1810
|
}
|
|
1811
1811
|
function tl(e, t, n, r) {
|
|
1812
|
-
if (e && !kr(e) && er("GObj bad instanceof"), !
|
|
1812
|
+
if (e && !kr(e) && er("GObj bad instanceof"), !Sr(t)) return er("kw is not an object"), -1;
|
|
1813
1813
|
let l = n.split("`");
|
|
1814
1814
|
if (l.length <= 1) return t[n] = r, 0;
|
|
1815
1815
|
let o = l.length;
|
|
@@ -1820,9 +1820,9 @@ function tl(e, t, n, r) {
|
|
|
1820
1820
|
return 0;
|
|
1821
1821
|
}
|
|
1822
1822
|
function nl(e, t, n, r, l) {
|
|
1823
|
-
if (e && !kr(e) && er("GObj bad instanceof"), !
|
|
1823
|
+
if (e && !kr(e) && er("GObj bad instanceof"), !Sr(t)) return er("kw is not an object"), -1;
|
|
1824
1824
|
let o = Xr(e, t, n, {}, !0);
|
|
1825
|
-
return
|
|
1825
|
+
return Sr(o) ? (o[r] = l, 0) : (er("subdict is not an object"), -1);
|
|
1826
1826
|
}
|
|
1827
1827
|
function rl(e, n, r) {
|
|
1828
1828
|
let l = "", o = !1;
|
|
@@ -1832,12 +1832,12 @@ function rl(e, n, r) {
|
|
|
1832
1832
|
let s = n[i];
|
|
1833
1833
|
if (l = Cr(r) ? t("%s", r) : t("%s`%d", r, i), o = rl(e, s, l), o) break;
|
|
1834
1834
|
}
|
|
1835
|
-
} else if (
|
|
1835
|
+
} else if (Sr(n)) {
|
|
1836
1836
|
o = !0;
|
|
1837
1837
|
let i = Object.keys(n);
|
|
1838
1838
|
for (let s = 0; s < i.length; s++) {
|
|
1839
1839
|
let a = i[s], u = n[a];
|
|
1840
|
-
if (l = Cr(r) ? t("%s", a) : t("%s`%s", r, a), Nr(u) ||
|
|
1840
|
+
if (l = Cr(r) ? t("%s", a) : t("%s`%s", r, a), Nr(u) || Sr(u)) {
|
|
1841
1841
|
if (o = rl(e, u, l), !o) break;
|
|
1842
1842
|
continue;
|
|
1843
1843
|
}
|
|
@@ -1871,7 +1871,7 @@ function il(e, t, n, r) {
|
|
|
1871
1871
|
r(o, n) && l.push(ir(o));
|
|
1872
1872
|
}
|
|
1873
1873
|
else {
|
|
1874
|
-
if (!
|
|
1874
|
+
if (!Sr(t)) return er("kw_select() BAD kw parameter"), null;
|
|
1875
1875
|
r(t, n) && l.push(ir(t));
|
|
1876
1876
|
}
|
|
1877
1877
|
return l;
|
|
@@ -1885,7 +1885,7 @@ function sl(e, t, n, r) {
|
|
|
1885
1885
|
r(o, n) && l.push(o);
|
|
1886
1886
|
}
|
|
1887
1887
|
else {
|
|
1888
|
-
if (!
|
|
1888
|
+
if (!Sr(t)) return er("kw_select() BAD kw parameter"), null;
|
|
1889
1889
|
r(t, n) && l.push(t);
|
|
1890
1890
|
}
|
|
1891
1891
|
return l;
|
|
@@ -1896,7 +1896,7 @@ function al(e, t, n, r) {
|
|
|
1896
1896
|
if (Rr(n) && !Cr(n)) {
|
|
1897
1897
|
let o = n;
|
|
1898
1898
|
t.hasOwnProperty(o) ? l[o] = t[o] : r && er(`${Dt(e)}: key not found: ${o}`);
|
|
1899
|
-
} else if (
|
|
1899
|
+
} else if (Sr(n) && Tr(n) > 0) for (let o of Object.keys(n)) t.hasOwnProperty(o) ? l[o] = t[o] : r && er(`${Dt(e)}: key not found: ${o}`);
|
|
1900
1900
|
else {
|
|
1901
1901
|
if (!(Nr(n) && yr(n) > 0)) return t;
|
|
1902
1902
|
for (let o = 0; o < n.length; o++) {
|
|
@@ -1911,7 +1911,7 @@ function ul(e, t, n, r) {
|
|
|
1911
1911
|
if (ur(l, t), Rr(n) && !Cr(n)) {
|
|
1912
1912
|
let o = n;
|
|
1913
1913
|
Zr(e, t, o, 0, 0) ? gr(l, o) : r && er(`${Dt(e)}: key not found: ${o}`);
|
|
1914
|
-
} else if (
|
|
1914
|
+
} else if (Sr(n) && Tr(n) > 0) for (let o of Object.keys(n)) t.hasOwnProperty(o) ? gr(l, o) : r && er(`${Dt(e)}: key not found: ${o}`);
|
|
1915
1915
|
else {
|
|
1916
1916
|
if (!(Nr(n) && yr(n) > 0)) return {};
|
|
1917
1917
|
for (let o = 0; o < n.length; o++) {
|
|
@@ -1951,7 +1951,7 @@ function gl(e, t) {
|
|
|
1951
1951
|
if (Nr(e)) {
|
|
1952
1952
|
if (0 === e.length) return !0;
|
|
1953
1953
|
for (let n = 0; n < e.length; n++) if (e[n] === t) return !0;
|
|
1954
|
-
} else if (
|
|
1954
|
+
} else if (Sr(e)) {
|
|
1955
1955
|
if (0 === Object.keys(e).length) return !0;
|
|
1956
1956
|
for (let n in e) if (n === t) return !0;
|
|
1957
1957
|
} else if (Rr(e) && e === t) return !0;
|
|
@@ -1963,7 +1963,7 @@ function dl(e, t, n, r, l) {
|
|
|
1963
1963
|
let o = [];
|
|
1964
1964
|
if (Nr(t)) for (let i = 0; i < t.length; i++) {
|
|
1965
1965
|
let s, a = t[i];
|
|
1966
|
-
if (
|
|
1966
|
+
if (Sr(a)) s = Qr(e, a, "id", "", 0);
|
|
1967
1967
|
else {
|
|
1968
1968
|
if (!Rr(a)) continue;
|
|
1969
1969
|
s = a;
|
|
@@ -1971,7 +1971,7 @@ function dl(e, t, n, r, l) {
|
|
|
1971
1971
|
gl(n, s) && l(a, r) && o.push(a);
|
|
1972
1972
|
}
|
|
1973
1973
|
else {
|
|
1974
|
-
if (!
|
|
1974
|
+
if (!Sr(t)) return er("kw_collect() BAD kw parameter"), null;
|
|
1975
1975
|
for (let e of Object.keys(t)) {
|
|
1976
1976
|
let i = t[e];
|
|
1977
1977
|
gl(n, e) && l(i, r) && o.push(i);
|
|
@@ -1982,7 +1982,7 @@ function dl(e, t, n, r, l) {
|
|
|
1982
1982
|
function bl(e, t, n) {
|
|
1983
1983
|
e && !kr(e) && er("GObj bad instanceof");
|
|
1984
1984
|
let r = {};
|
|
1985
|
-
if (Cr(n) || (t = Yr(e, t, n)),
|
|
1985
|
+
if (Cr(n) || (t = Yr(e, t, n)), Sr(t)) r = t;
|
|
1986
1986
|
else if (Nr(t)) for (let n = 0; n < t.length; n++) {
|
|
1987
1987
|
let l = t[n], o = Qr(e, l, "id", "", Un.KW_REQUIRED);
|
|
1988
1988
|
Cr(o) || (r[o] = l);
|
|
@@ -1992,11 +1992,11 @@ function bl(e, t, n) {
|
|
|
1992
1992
|
}
|
|
1993
1993
|
function pl(e, t, n) {
|
|
1994
1994
|
if (e && !kr(e) && er("GObj bad instanceof"), Cr(n) || (t = Yr(e, t, n)), Nr(t)) return t;
|
|
1995
|
-
if (
|
|
1995
|
+
if (Sr(t)) {
|
|
1996
1996
|
let n = [];
|
|
1997
1997
|
for (let r of Object.keys(t)) {
|
|
1998
1998
|
let l = t[r];
|
|
1999
|
-
|
|
1999
|
+
Sr(l) ? (l.id = r, n.push(l)) : er(`${Dt(e)} kwid_new_list: not a record: '${r}'`);
|
|
2000
2000
|
}
|
|
2001
2001
|
return n;
|
|
2002
2002
|
}
|
|
@@ -2011,17 +2011,17 @@ function El(e, t) {
|
|
|
2011
2011
|
if (e && !kr(e) && er("GObj bad instanceof"), !t) return [];
|
|
2012
2012
|
let n = [];
|
|
2013
2013
|
if (Rr(t)) n.push(t);
|
|
2014
|
-
else if (
|
|
2014
|
+
else if (Sr(t)) for (let e in t) t.hasOwnProperty(e) && n.push(e);
|
|
2015
2015
|
else Nr(t) && t.forEach(function(t) {
|
|
2016
2016
|
if (Rr(t)) Cr(t) || n.push(t);
|
|
2017
|
-
else if (
|
|
2017
|
+
else if (Sr(t)) {
|
|
2018
2018
|
let r = Qr(e, t, "id", 0, 0);
|
|
2019
2019
|
r && n.push(r);
|
|
2020
2020
|
}
|
|
2021
2021
|
});
|
|
2022
2022
|
return n;
|
|
2023
2023
|
}
|
|
2024
|
-
function
|
|
2024
|
+
function hl(e, t, n) {
|
|
2025
2025
|
t = t || "id", n = n || "value";
|
|
2026
2026
|
let r = [];
|
|
2027
2027
|
if (Nr(e)) for (let l = 0; l < e.length; l++) {
|
|
@@ -2030,7 +2030,7 @@ function Tl(e, t, n) {
|
|
|
2030
2030
|
id: e[l],
|
|
2031
2031
|
value: e[l]
|
|
2032
2032
|
});
|
|
2033
|
-
else if (
|
|
2033
|
+
else if (Sr(o)) {
|
|
2034
2034
|
let e = {};
|
|
2035
2035
|
if (xr(o, t)) {
|
|
2036
2036
|
if (!xr(o, n)) {
|
|
@@ -2051,14 +2051,14 @@ function Tl(e, t, n) {
|
|
|
2051
2051
|
r.push(e);
|
|
2052
2052
|
} else er("list2options(): case1 not implemented");
|
|
2053
2053
|
}
|
|
2054
|
-
else if (
|
|
2054
|
+
else if (Sr(e)) for (let t of Object.keys(e)) r.push({
|
|
2055
2055
|
id: t,
|
|
2056
2056
|
value: t
|
|
2057
2057
|
});
|
|
2058
2058
|
else er("list2options(): case2 not implemented");
|
|
2059
2059
|
return r;
|
|
2060
2060
|
}
|
|
2061
|
-
function
|
|
2061
|
+
function Tl(e, t) {
|
|
2062
2062
|
if (!e) return -1;
|
|
2063
2063
|
for (let n = 0; n < e.length; n++) if (e[n] && e[n].id === t) return n;
|
|
2064
2064
|
return -1;
|
|
@@ -2081,11 +2081,11 @@ function vl(e, t, n) {
|
|
|
2081
2081
|
for (let r = 0; r < t.length; r++) if (yl(e, t[r], n)) return !0;
|
|
2082
2082
|
return !1;
|
|
2083
2083
|
}
|
|
2084
|
-
function
|
|
2084
|
+
function Ol(e, t) {
|
|
2085
2085
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return e.splice(n, 1), !0;
|
|
2086
2086
|
return !1;
|
|
2087
2087
|
}
|
|
2088
|
-
function
|
|
2088
|
+
function Sl(e, t) {
|
|
2089
2089
|
try {
|
|
2090
2090
|
let n = e.__md_iev__;
|
|
2091
2091
|
if (n) return n[t];
|
|
@@ -2100,7 +2100,7 @@ function Nl(e, t, n) {
|
|
|
2100
2100
|
function Rl(e, t, n, r) {
|
|
2101
2101
|
if (!kr(e)) return er("gobj is not a GObj"), null;
|
|
2102
2102
|
if (!t) return;
|
|
2103
|
-
let l =
|
|
2103
|
+
let l = Sl(t, n);
|
|
2104
2104
|
l || (l = [], Nl(t, n, l));
|
|
2105
2105
|
try {
|
|
2106
2106
|
Nr(l) && l.unshift(r);
|
|
@@ -2110,8 +2110,8 @@ function Rl(e, t, n, r) {
|
|
|
2110
2110
|
}
|
|
2111
2111
|
function wl(e, t, n, r) {
|
|
2112
2112
|
if (!kr(e)) return er("gobj is not a GObj"), null;
|
|
2113
|
-
if (!
|
|
2114
|
-
let l =
|
|
2113
|
+
if (!Sr(t)) return er("kw is not a dict"), null;
|
|
2114
|
+
let l = Sl(t, n);
|
|
2115
2115
|
return l ? 0 === l.length ? (r && er(`stack empty: ${n}`), null) : l[0] : (r && er(`stack NOT FOUND: ${n}`), null);
|
|
2116
2116
|
}
|
|
2117
2117
|
function jl(e, t, n) {
|
|
@@ -2148,7 +2148,7 @@ function Il(e, t, n) {
|
|
|
2148
2148
|
r,
|
|
2149
2149
|
e[r],
|
|
2150
2150
|
n
|
|
2151
|
-
]),
|
|
2151
|
+
]), Sr(e[r]) && Il(e[r], t, n), n = n.slice(0, -l.length);
|
|
2152
2152
|
}
|
|
2153
2153
|
}
|
|
2154
2154
|
function kl(e, t, n) {
|
|
@@ -2165,7 +2165,7 @@ function Cl(e, t, n, r) {
|
|
|
2165
2165
|
if (!l) return er("jdb_update: topic not found: " + t), null;
|
|
2166
2166
|
if (Cr(r.id)) return er("jdb_update: record without id: " + r), lr(r), null;
|
|
2167
2167
|
let o, i = n.split("`"), s = l;
|
|
2168
|
-
for (; (o = i.shift()) && !Cr(o) && s;)
|
|
2168
|
+
for (; (o = i.shift()) && !Cr(o) && s;) Sr(s) && (s = Zr(null, s, e.hook, [], 1)), s = Gl(s, null, o, !1);
|
|
2169
2169
|
if (0 === i.length && s) if (Nr(s)) s.push(r);
|
|
2170
2170
|
else if (s.id === r.id) Object.assign(s, r);
|
|
2171
2171
|
else {
|
|
@@ -2179,12 +2179,12 @@ function Ll(e, t, n, r) {
|
|
|
2179
2179
|
if (!l) return er("jdb_delete: topic not found: " + t), null;
|
|
2180
2180
|
if (Cr(r.id)) return er("jdb_delete: record without id: " + r), lr(r), null;
|
|
2181
2181
|
let o, i = n.split("`"), s = l;
|
|
2182
|
-
for (; (o = i.shift()) && !Cr(o) && s;)
|
|
2182
|
+
for (; (o = i.shift()) && !Cr(o) && s;) Sr(s) && (s = Zr(null, s, e.hook, null, 0)), s = Gl(s, null, o, !1);
|
|
2183
2183
|
if (0 === i.length && s) if (Nr(s)) {
|
|
2184
|
-
let e =
|
|
2184
|
+
let e = Tl(s, r.id);
|
|
2185
2185
|
e >= 0 && s.splice(e, 1);
|
|
2186
2186
|
} else {
|
|
2187
|
-
let t = Zr(null, s, e.hook, null, 0), n =
|
|
2187
|
+
let t = Zr(null, s, e.hook, null, 0), n = Tl(t, r.id);
|
|
2188
2188
|
n >= 0 && t.splice(n, 1);
|
|
2189
2189
|
}
|
|
2190
2190
|
return l;
|
|
@@ -2354,9 +2354,9 @@ function Ql(e = "Time Tracker", t = !1) {
|
|
|
2354
2354
|
};
|
|
2355
2355
|
} };
|
|
2356
2356
|
}
|
|
2357
|
-
function zl() {
|
|
2358
|
-
const e = /* @__PURE__ */ new Date(), t
|
|
2359
|
-
return `${
|
|
2357
|
+
function zl(e) {
|
|
2358
|
+
const t = (e, t) => String(e).padStart(t, "0"), n = `${(e = e || /* @__PURE__ */ new Date()).getFullYear()}-${t(e.getMonth() + 1, 2)}-${t(e.getDate(), 2)}T${t(e.getHours(), 2)}:${t(e.getMinutes(), 2)}:${t(e.getSeconds(), 2)}`, r = t(e.getMilliseconds(), 3), l = e.getTimezoneOffset();
|
|
2359
|
+
return `${n}.${r}${l > 0 ? "-" : "+"}${t(Math.floor(Math.abs(l) / 60), 2)}${t(Math.abs(l) % 60, 2)}`;
|
|
2360
2360
|
}
|
|
2361
2361
|
function Xl() {
|
|
2362
2362
|
return Math.floor(Date.now() / 1e3);
|
|
@@ -2518,22 +2518,22 @@ function po(e) {
|
|
|
2518
2518
|
}
|
|
2519
2519
|
function mo(e, t) {
|
|
2520
2520
|
let n = Xt(e, v.SDF_PERSIST), r = _l(po(e), null, !1);
|
|
2521
|
-
if (r &&
|
|
2521
|
+
if (r && Sr(r)) {
|
|
2522
2522
|
let l = al(e, r, t, !1);
|
|
2523
2523
|
l = al(e, l, n, !1), on(e, l, v.SDF_PERSIST);
|
|
2524
2524
|
}
|
|
2525
2525
|
}
|
|
2526
2526
|
function Eo(e, t) {
|
|
2527
2527
|
let n = al(e, Xt(e, v.SDF_PERSIST), t, !1), r = _l(po(e), null, !1);
|
|
2528
|
-
return r &&
|
|
2528
|
+
return r && Sr(r) && cr(n, r), cl(po(e), n);
|
|
2529
2529
|
}
|
|
2530
|
-
function
|
|
2530
|
+
function ho(e, t) {
|
|
2531
2531
|
let n = ul(e, _l(po(e), null, !1), t, !1);
|
|
2532
|
-
0 ===
|
|
2532
|
+
0 === Tr(n) ? fl(po(e)) : cl(po(e), n);
|
|
2533
2533
|
}
|
|
2534
|
-
function
|
|
2534
|
+
function To(e, t) {
|
|
2535
2535
|
let n = _l(po(e), null, !1), r = {};
|
|
2536
|
-
return n &&
|
|
2536
|
+
return n && Sr(n) && (r = al(e, n, t, !1)), r;
|
|
2537
2537
|
}
|
|
2538
2538
|
function yo(e) {
|
|
2539
2539
|
if (Nr(e) && 1 === vr(e)) {
|
|
@@ -2546,7 +2546,7 @@ function vo(e, t) {
|
|
|
2546
2546
|
if (Rr(t)) {
|
|
2547
2547
|
if (-1 === t.indexOf("^")) {
|
|
2548
2548
|
let n, r, l = e.fkey;
|
|
2549
|
-
if (1 !==
|
|
2549
|
+
if (1 !== Tr(l)) return er("bad fkey 1"), er(e), er(t), null;
|
|
2550
2550
|
for (const e of Object.keys(l)) {
|
|
2551
2551
|
n = e, r = l[e];
|
|
2552
2552
|
break;
|
|
@@ -2566,21 +2566,21 @@ function vo(e, t) {
|
|
|
2566
2566
|
};
|
|
2567
2567
|
}
|
|
2568
2568
|
}
|
|
2569
|
-
return
|
|
2569
|
+
return Sr(t) ? {
|
|
2570
2570
|
topic_name: t.topic_name,
|
|
2571
2571
|
id: t.id,
|
|
2572
2572
|
hook_name: t.hook_name
|
|
2573
2573
|
} : (er("bad fkey 3"), er(e), er(t), null);
|
|
2574
2574
|
}
|
|
2575
|
-
function
|
|
2575
|
+
function Oo(e, t) {
|
|
2576
2576
|
let n = vo(e, t);
|
|
2577
2577
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
2578
2578
|
}
|
|
2579
|
-
function
|
|
2579
|
+
function So(e, t) {
|
|
2580
2580
|
if (Rr(t)) {
|
|
2581
2581
|
if (-1 === t.indexOf("^")) {
|
|
2582
2582
|
let n, r = e.hook;
|
|
2583
|
-
if (1 !==
|
|
2583
|
+
if (1 !== Tr(r)) return er("bad hook 1"), er(e), er(t), null;
|
|
2584
2584
|
for (let e of Object.keys(r)) {
|
|
2585
2585
|
n = e, r[e];
|
|
2586
2586
|
break;
|
|
@@ -2598,7 +2598,7 @@ function Oo(e, t) {
|
|
|
2598
2598
|
};
|
|
2599
2599
|
}
|
|
2600
2600
|
}
|
|
2601
|
-
return
|
|
2601
|
+
return Sr(t) ? {
|
|
2602
2602
|
topic_name: t.topic_name,
|
|
2603
2603
|
id: t.id
|
|
2604
2604
|
} : (er("bad hook 3"), er(e), er(t), null);
|
|
@@ -2732,14 +2732,14 @@ function Do(e, t) {
|
|
|
2732
2732
|
}
|
|
2733
2733
|
}
|
|
2734
2734
|
n.real_type || (n.real_type = "string");
|
|
2735
|
-
} else
|
|
2735
|
+
} else Sr(t) ? (n = jo(t), n.name || (n.name = e), n.header || (n.header = e)) : Nr(t) && (n.real_type = "array", n.enum_list = t);
|
|
2736
2736
|
return n.type || (n.type = n.real_type), n;
|
|
2737
2737
|
}
|
|
2738
2738
|
function Ao(e, t) {
|
|
2739
2739
|
let n = {};
|
|
2740
2740
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
2741
2741
|
let l;
|
|
2742
|
-
|
|
2742
|
+
Sr(r) && (l = r.default);
|
|
2743
2743
|
let o = Zr(null, t, e, l);
|
|
2744
2744
|
n[e] = o;
|
|
2745
2745
|
}), n;
|
|
@@ -2748,7 +2748,7 @@ var $o = [
|
|
|
2748
2748
|
N(y.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
2749
2749
|
N(y.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
2750
2750
|
N(y.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
2751
|
-
|
|
2751
|
+
S()
|
|
2752
2752
|
], Io = {
|
|
2753
2753
|
periodic: !1,
|
|
2754
2754
|
msec: 0,
|
|
@@ -2758,7 +2758,7 @@ function Co(e, t, n, r) {
|
|
|
2758
2758
|
let l = e.priv, o = l.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
2759
2759
|
return l.periodic && l.msec > 0 ? l.timer_id = setTimeout(function() {
|
|
2760
2760
|
yn(e, "EV_TIMEOUT", {}, e);
|
|
2761
|
-
}, l.msec) : l.timer_id = -1, kt(e) ? yn($t(e), o, {}, e) : Cn(e, o, {}), l.periodic || -1 !== l.timer_id ||
|
|
2761
|
+
}, l.msec) : l.timer_id = -1, kt(e) ? yn($t(e), o, {}, e) : Cn(e, o, {}), l.periodic || -1 !== l.timer_id || ht(e) && gt(e), 0;
|
|
2762
2762
|
}
|
|
2763
2763
|
var Lo = {
|
|
2764
2764
|
mt_create: function(e) {
|
|
@@ -2774,7 +2774,7 @@ var Lo = {
|
|
|
2774
2774
|
break;
|
|
2775
2775
|
case "msec": n.msec = en(e, "msec"), -1 !== n.timer_id && (clearTimeout(n.timer_id), n.timer_id = -1), n.msec > 0 && (n.timer_id = setTimeout(function() {
|
|
2776
2776
|
yn(e, "EV_TIMEOUT", {}, e);
|
|
2777
|
-
}, n.msec)), n.msec > 0 ?
|
|
2777
|
+
}, n.msec)), n.msec > 0 ? ht(e) || at(e) : ht(e) && gt(e);
|
|
2778
2778
|
}
|
|
2779
2779
|
},
|
|
2780
2780
|
mt_start: function(e) {
|
|
@@ -2828,11 +2828,11 @@ var Vo = [
|
|
|
2828
2828
|
N(y.DTP_POINTER, "trace_ievent_callback", 0, null, "Where the traffic trace goes (C_IEVENT_CLI levels ievents/ievents2); console when null"),
|
|
2829
2829
|
N(y.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
2830
2830
|
N(y.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
2831
|
-
|
|
2831
|
+
S()
|
|
2832
2832
|
], Mo = { gobj_timer: null }, Wo = null;
|
|
2833
2833
|
function Ko(e, t, n, r) {
|
|
2834
2834
|
let l = zt(e, t);
|
|
2835
|
-
return
|
|
2835
|
+
return Sr(l) || (l = {}), l[n] = r, rn(e, t, l), He(e, t);
|
|
2836
2836
|
}
|
|
2837
2837
|
function xo(e) {
|
|
2838
2838
|
if (!0 === e || !1 === e) return e;
|
|
@@ -2840,7 +2840,7 @@ function xo(e) {
|
|
|
2840
2840
|
return "true" === t || "set" === t || "false" !== t && "reset" !== t && ("" === t || isNaN(Number(t)) ? null : !!Number(t));
|
|
2841
2841
|
}
|
|
2842
2842
|
function Yo() {
|
|
2843
|
-
return `${Nt()}^${
|
|
2843
|
+
return `${Nt()}^${St()}`;
|
|
2844
2844
|
}
|
|
2845
2845
|
function Bo(e, t, n, r) {
|
|
2846
2846
|
return Cn(e, t, n), 0;
|
|
@@ -2850,7 +2850,7 @@ var Jo = {
|
|
|
2850
2850
|
let t = e.priv;
|
|
2851
2851
|
un(e, "start_date", zl()), un(e, "node_uuid", eo()), e.priv.gobj_timer = ot(wt(e), "C_TIMER", {}, e), t.periodic_timeout = zt(e, "periodic_timeout"), function(e) {
|
|
2852
2852
|
let t = zt(e, "trace_levels");
|
|
2853
|
-
if (!
|
|
2853
|
+
if (!Sr(t)) return 0;
|
|
2854
2854
|
let n = t.__global_trace__;
|
|
2855
2855
|
if (Nr(n)) {
|
|
2856
2856
|
ce(4294967295, !1);
|
|
@@ -2859,13 +2859,13 @@ var Jo = {
|
|
|
2859
2859
|
for (const [n, r] of Object.entries(t)) {
|
|
2860
2860
|
let t = Me(n);
|
|
2861
2861
|
if (t) if (Nr(r)) {
|
|
2862
|
-
|
|
2863
|
-
for (let e of r)
|
|
2862
|
+
he(t, null, !1);
|
|
2863
|
+
for (let e of r) he(t, e, !0);
|
|
2864
2864
|
} else er(`${wt(e)}: trace_levels of ${n} MUST be a list`);
|
|
2865
2865
|
}
|
|
2866
2866
|
}(e), function(e) {
|
|
2867
2867
|
let t = zt(e, "no_trace_levels");
|
|
2868
|
-
if (!
|
|
2868
|
+
if (!Sr(t)) return 0;
|
|
2869
2869
|
let n = t.__global_no_trace__;
|
|
2870
2870
|
if (Nr(n)) {
|
|
2871
2871
|
fe(4294967295, !1);
|
|
@@ -2890,7 +2890,7 @@ var Jo = {
|
|
|
2890
2890
|
mt_destroy: function(e) {},
|
|
2891
2891
|
mt_play: function(e) {
|
|
2892
2892
|
let t = Ke();
|
|
2893
|
-
return
|
|
2893
|
+
return ht(t) || at(t), vt(t) || mt(t), 0;
|
|
2894
2894
|
},
|
|
2895
2895
|
mt_pause: function(e) {
|
|
2896
2896
|
return Et(Ke()), 0;
|
|
@@ -2912,7 +2912,7 @@ var Jo = {
|
|
|
2912
2912
|
if (!i) return o(0, -1, `${Yo()}: what gclass is '${l}'?`, null, null);
|
|
2913
2913
|
if (0 === t.indexOf("get-")) return o(0, 0, null, null, r ? me(i) : be(i));
|
|
2914
2914
|
let s = n.level, a = xo(n.set);
|
|
2915
|
-
return s ? null === a ? o(0, -1, `${Yo()}: bitmask set or re-set?`, null, null) : (r ? ye(i, s, a) :
|
|
2915
|
+
return s ? null === a ? o(0, -1, `${Yo()}: bitmask set or re-set?`, null, null) : (r ? ye(i, s, a) : he(i, s, a)) < 0 ? o(0, -1, `${Yo()}: trace level of ${l} not found: ${s}`, null, null) : r ? (Ko(e, "no_trace_levels", l, me(i)), o(0, 0, null, null, me(i))) : (Ko(e, "trace_levels", l, pe(i)), o(0, 0, null, null, be(i))) : o(0, -1, `${Yo()}: what level?`, null, null);
|
|
2916
2916
|
}
|
|
2917
2917
|
default: return o(0, -1, `${Yo()}: command not available: ${t}`, null, null);
|
|
2918
2918
|
}
|
|
@@ -2945,7 +2945,7 @@ var Ho = "ievent_gate_stack", Qo = [
|
|
|
2945
2945
|
N(y.DTP_INTEGER, "timeout_retry_max", v.SDF_RD, "60000", "Cap of the reconnect backoff (ms). Set it equal to timeout_retry for the old fixed-interval behaviour"),
|
|
2946
2946
|
N(y.DTP_INTEGER, "timeout_idack", v.SDF_RD, "5000", "timeout waiting idAck"),
|
|
2947
2947
|
N(y.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
2948
|
-
|
|
2948
|
+
S()
|
|
2949
2949
|
], zo = [
|
|
2950
2950
|
["ievents", "Trace inter-events with metadata of kw"],
|
|
2951
2951
|
["ievents2", "Trace inter-events with full kw"],
|
|
@@ -2983,7 +2983,7 @@ function ti(e) {
|
|
|
2983
2983
|
data: n.data
|
|
2984
2984
|
}, e);
|
|
2985
2985
|
}, n.onclose = (n) => {
|
|
2986
|
-
Ct(e) || (Zt(
|
|
2986
|
+
Ct(e) || (Zt(Ot(), "browser_beforeunload") ? tr("Close websocket by unload page") : yn(e, "EV_ON_CLOSE", {
|
|
2987
2987
|
url: t,
|
|
2988
2988
|
e: n
|
|
2989
2989
|
}, e));
|
|
@@ -3017,7 +3017,7 @@ function oi(e, t, n, r) {
|
|
|
3017
3017
|
return function(e, t) {
|
|
3018
3018
|
let n = e.priv, r = JSON.stringify(t);
|
|
3019
3019
|
if (Xo(e)) {
|
|
3020
|
-
let n = tn(e, "url"), l = wt(
|
|
3020
|
+
let n = tn(e, "url"), l = wt(Ot()) + " ==> " + n, o = zt(Ot(), "trace_ievent_callback");
|
|
3021
3021
|
o ? o(l, t, 1, r.length) : ri(0, l, t);
|
|
3022
3022
|
}
|
|
3023
3023
|
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return tr(`${Dt(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
@@ -3036,19 +3036,19 @@ function ii(e, t, n) {
|
|
|
3036
3036
|
dst_yuno: tn(e, "wanted_yuno_name"),
|
|
3037
3037
|
dst_role: tn(e, "wanted_yuno_role"),
|
|
3038
3038
|
dst_service: n,
|
|
3039
|
-
src_yuno:
|
|
3039
|
+
src_yuno: St(),
|
|
3040
3040
|
src_role: Nt(),
|
|
3041
3041
|
src_service: t,
|
|
3042
3042
|
host: eo()
|
|
3043
3043
|
};
|
|
3044
3044
|
}
|
|
3045
3045
|
function si(e) {
|
|
3046
|
-
let t = e.priv, n = vt(
|
|
3047
|
-
i && i.length || (i = zt(
|
|
3046
|
+
let t = e.priv, n = vt(Ot()), r = tn(Ot(), "yuno_version"), l = tn(Ot(), "yuno_release"), o = tn(Ot(), "yuno_tag"), i = zt(e, "required_services");
|
|
3047
|
+
i && i.length || (i = zt(Ot(), "required_services"));
|
|
3048
3048
|
let s = {
|
|
3049
3049
|
yuno_role: Nt(),
|
|
3050
3050
|
yuno_id: Rt(),
|
|
3051
|
-
yuno_name:
|
|
3051
|
+
yuno_name: St(),
|
|
3052
3052
|
yuno_tag: o,
|
|
3053
3053
|
yuno_version: r,
|
|
3054
3054
|
yuno_release: l,
|
|
@@ -3057,9 +3057,9 @@ function si(e) {
|
|
|
3057
3057
|
pid: 0,
|
|
3058
3058
|
watcher_pid: 0,
|
|
3059
3059
|
jwt: tn(e, "jwt"),
|
|
3060
|
-
username: tn(
|
|
3060
|
+
username: tn(Ot(), "__username__"),
|
|
3061
3061
|
launch_id: 0,
|
|
3062
|
-
yuno_startdate: tn(
|
|
3062
|
+
yuno_startdate: tn(Ot(), "start_date"),
|
|
3063
3063
|
id: eo(),
|
|
3064
3064
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
3065
3065
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
@@ -3075,7 +3075,7 @@ function ai(e, t) {
|
|
|
3075
3075
|
}
|
|
3076
3076
|
function ui(e, t, n, r) {
|
|
3077
3077
|
let l = e.priv;
|
|
3078
|
-
return
|
|
3078
|
+
return ht(e) && (l.websocket = ti(e)), 0;
|
|
3079
3079
|
}
|
|
3080
3080
|
function _i(e, t, n, r) {
|
|
3081
3081
|
return rr("Websocket opened: " + e.priv.url), si(e), 0;
|
|
@@ -3095,7 +3095,7 @@ function ci(e, t, n, r) {
|
|
|
3095
3095
|
code: o.code,
|
|
3096
3096
|
reason: o.reason,
|
|
3097
3097
|
was_clean: o.wasClean
|
|
3098
|
-
})),
|
|
3098
|
+
})), ht(e) && Uo(l.gobj_timer, function(e) {
|
|
3099
3099
|
let t = e.priv, n = en(e, "timeout_retry"), r = en(e, "timeout_retry_max");
|
|
3100
3100
|
r < n && (r = n);
|
|
3101
3101
|
t.retry_ms = t.retry_ms ? Math.min(2 * t.retry_ms, r) : n;
|
|
@@ -3162,7 +3162,7 @@ function di(e, t, n, r) {
|
|
|
3162
3162
|
} : (er("parsing inter_event: kw not a json object"), null) : (er("parsing inter_kw: no kw"), null);
|
|
3163
3163
|
}(0, n.data);
|
|
3164
3164
|
if (Xo(e)) {
|
|
3165
|
-
let e = wt(
|
|
3165
|
+
let e = wt(Ot()) + " <== " + l, t = n.data.length, r = zt(Ot(), "trace_ievent_callback");
|
|
3166
3166
|
r ? r(e, o, 2, t) : ri(0, e, o);
|
|
3167
3167
|
}
|
|
3168
3168
|
let i = o.event, s = o.kw;
|
|
@@ -3359,6 +3359,6 @@ function Ei() {
|
|
|
3359
3359
|
], t, mi, 0, Qo, Zo, 0, 0, zo, C.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3360
3360
|
}("C_IEVENT_CLI");
|
|
3361
3361
|
}
|
|
3362
|
-
export { k as GObj, N as SDATA, D as SDATAAUTHZ, R as SDATACM, w as SDATACM2, $ as SDATADF, j as SDATAPM, A as SDATAPM0,
|
|
3362
|
+
export { k as GObj, N as SDATA, D as SDATAAUTHZ, R as SDATACM, w as SDATACM2, $ as SDATADF, j as SDATAPM, A as SDATAPM0, S as SDATA_END, O as SDataDesc, a as YUNETA_VERSION, E as __yuno__, o as build_command_response, lo as build_path, s as build_stats_response, to as clean_name, Go as clear_timeout, Gr as cmp_two_simple_json, l as command_parser, Bl as createElement2, Yl as createOneHtml, Vl as create_json_record, Ao as create_template_record, zl as current_timestamp, y as data_type_t, To as db_list_persistent_attrs, mo as db_load_persistent_attrs, ho as db_remove_persistent_attrs, Eo as db_save_persistent_attrs, ro as debounce, Ol as delete_from_list, sr as duplicate_objects, Or as empty_json, Cr as empty_string, Kl as escapeHtml, U as event_flag_t, co as flat2json, bo as flat_apply, go as flat_diff, ao as flat_key_join, uo as flat_key_split, Pe as gclass_add_ev_action, Fe as gclass_add_event_type, Le as gclass_add_state, Ve as gclass_check_fsm, $e as gclass_create, Ge as gclass_event_type, Me as gclass_find_by_name, C as gclass_flag_t, Ie as gclass_unregister, Jl as getPositionRelativeToBody, no as get_function_name, Xl 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, $n as gobj_find_subscriptions, L as gobj_flag_t, At 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, $t 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, Oe 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, Pt 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, Se as gobj_start_up, Pn 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, An 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, Ot as gobj_yuno, Rt as gobj_yuno_id, St as gobj_yuno_name, Nt as gobj_yuno_role, Tl as id_index_in_obj_list, Zl as index_in_list, Nr as is_array, jr as is_boolean, $r as is_date, Ir as is_function, kr as is_gobj, Mr as is_metadata_key, Dr as is_null, wr as is_number, Sr as is_object, Wr as is_private_key, Ar as is_pure_number, Rr as is_string, Ll as jdb_delete, Ul as jdb_get, Fl as jdb_get_by_idx, Pl as jdb_get_topic, kl as jdb_init, Cl as jdb_update, _o as json2flat, pr as json_array_append, mr as json_array_append_new, hr as json_array_extend, Er as json_array_remove, yr as json_array_size, ir as json_deep_copy, ar as json_is_identical, gr as json_object_del, fr as json_object_get, dr as json_object_set, br as json_object_set_new, Tr as json_object_size, ur as json_object_update, _r as json_object_update_existing, cr as json_object_update_missing, vr as json_size, Wl as jwt2json, Ml as jwtDecode, al as kw_clone_by_keys, ul as kw_clone_by_not_keys, sl as kw_collect, Br as kw_delete, ol as kw_find_json_in_list, Yr as kw_find_path, Un as kw_flag_t, Jr as kw_get_bool, Xr as kw_get_dict, Zr as kw_get_dict_value, qr as kw_get_int, el as kw_get_list, _l as kw_get_local_storage_value, zr as kw_get_pointer, Hr as kw_get_real, Qr as kw_get_str, xr as kw_has_key, ll as kw_match_simple, Kr as kw_pop, fl as kw_remove_local_storage_value, il as kw_select, tl as kw_set_dict_value, cl as kw_set_local_storage_value, nl as kw_set_subdict_value, dl as kwid_collect, ml as kwid_find_one_record, El as kwid_get_ids, gl as kwid_match_id, bl as kwid_new_dict, pl as kwid_new_list, hl as list2options, Al as load_json_file, rr as log_debug, er as log_error, nr as log_info, tr as log_warning, Dl as msg_iev_get_msg_type, wl as msg_iev_get_stack, Rl as msg_iev_push_stack, Sl as msg_iev_read_key, jl as msg_iev_set_msg_type, Nl as msg_iev_write_key, eo as node_uuid, Lr as parseBoolean, ql as parseSVG, Hl as refresh_language, Ei as register_c_ievent_cli, Po as register_c_timer, qo as register_c_yuno, xl as safeSrc, v as sdata_flag_t, $l as send_http_json_post, Bn as set_console_log_enabled, qn as set_console_log_filter, xn as set_log_callback, Xn as set_remote_log_functions, Uo as set_timeout, Fo as set_timeout_periodic, t as sprintf, i as stats_parser, yl as str_in_list, Fr as strcasecmp, Ur as strcmp, Pr as strncmp, vl as strs_in_list, Vr as strstr, Do as template_get_field_desc, Ql as timeTracker, or as trace_json, B as trace_level_t, lr as trace_msg, vo as treedb_decoder_fkey, So as treedb_decoder_hook, Oo as treedb_encoder_fkey, jo as treedb_get_field_desc, yo as treedb_hook_data_size, n as vsprintf, F as walk_type_t };
|
|
3363
3363
|
|
|
3364
3364
|
//# sourceMappingURL=gobj-js.es.min.js.map
|