@yuneta/gobj-js 7.25.1 → 7.25.2
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 +6 -0
- package/dist/gobj-js.cjs.js +56 -27
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +140 -146
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +56 -27
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +276 -282
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +56 -27
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +216 -222
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +56 -27
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +313 -319
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.es.min.js
CHANGED
|
@@ -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 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
|
-
},
|
|
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
|
}
|
|
@@ -195,11 +195,11 @@ var O = class {
|
|
|
195
195
|
gobj_flag_pure_child: 16,
|
|
196
196
|
gobj_flag_autostart: 32,
|
|
197
197
|
gobj_flag_autoplay: 64
|
|
198
|
-
}),
|
|
198
|
+
}), U = Object.freeze({
|
|
199
199
|
obflag_destroying: 1,
|
|
200
200
|
obflag_destroyed: 2,
|
|
201
201
|
obflag_created: 4
|
|
202
|
-
}),
|
|
202
|
+
}), P = Object.freeze({
|
|
203
203
|
EVF_NO_WARN_SUBS: 1,
|
|
204
204
|
EVF_OUTPUT_EVENT: 2,
|
|
205
205
|
EVF_SYSTEM_EVENT: 4,
|
|
@@ -333,7 +333,7 @@ function z(e, t) {
|
|
|
333
333
|
return n;
|
|
334
334
|
}
|
|
335
335
|
function X(e, t, n) {
|
|
336
|
-
if (
|
|
336
|
+
if (Pr(e)) return void 0 === n ? 268369920 : 65535;
|
|
337
337
|
if (/^[0-9]+$/.test(String(e))) {
|
|
338
338
|
const t = Number(e);
|
|
339
339
|
if (t) return t;
|
|
@@ -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 Se() {
|
|
446
446
|
return J.map(([e, t, n]) => ({
|
|
447
447
|
name: e,
|
|
448
448
|
bit: t,
|
|
@@ -450,12 +450,12 @@ function Oe() {
|
|
|
450
450
|
set: !!(q & t)
|
|
451
451
|
}));
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function Oe(e, t, n, r, l, o, i) {
|
|
454
454
|
u = t, _ = n, c = r, f = l, g = o, d = i;
|
|
455
|
-
const s = [["EV_STATE_CHANGED",
|
|
455
|
+
const s = [["EV_STATE_CHANGED", P.EVF_SYSTEM_EVENT | P.EVF_OUTPUT_EVENT | P.EVF_NO_WARN_SUBS], [0, 0]];
|
|
456
456
|
for (let e = 0; e < s.length; e++) {
|
|
457
457
|
let t = s[e][0], n = s[e][1];
|
|
458
|
-
|
|
458
|
+
Pe(b, t, n);
|
|
459
459
|
}
|
|
460
460
|
return 0;
|
|
461
461
|
}
|
|
@@ -562,7 +562,7 @@ function we(e, t, n, r) {
|
|
|
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, wr(e.priv) && e.priv.hasOwnProperty(n.name) && (e.priv[n.name] = l), e.obflag &
|
|
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
567
|
function je(e) {
|
|
568
568
|
return e.jn_attrs;
|
|
@@ -570,7 +570,7 @@ function je(e) {
|
|
|
570
570
|
function De(e, t, n) {
|
|
571
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
|
-
function
|
|
573
|
+
function $e(e, t, n) {
|
|
574
574
|
if (!(e && e instanceof I)) return n && rr("gclass NULL"), null;
|
|
575
575
|
if (!t) return e.attrs_table;
|
|
576
576
|
for (let n = 0; n < e.attrs_table.length; n++) {
|
|
@@ -579,8 +579,8 @@ function Ae(e, t, n) {
|
|
|
579
579
|
}
|
|
580
580
|
return n && rr(`${e.gclass_name}: GClass Attribute NOT FOUND: ${t}`), null;
|
|
581
581
|
}
|
|
582
|
-
function
|
|
583
|
-
if (
|
|
582
|
+
function Ae(e, t, n, r, l, o, i, s, a, u, _) {
|
|
583
|
+
if (Pr(e)) return rr("gclass_name EMPTY"), null;
|
|
584
584
|
if (e.includes("`") || e.includes("^") || e.includes(".")) return rr(`GClass name CANNOT have '.' or '^' or '\`' char: ${e}`), null;
|
|
585
585
|
if (Me(e)) return rr(`GClass ALREADY exists: ${e}`), null;
|
|
586
586
|
let c = new I(e, r, l, o, i, s, a, u, _);
|
|
@@ -590,17 +590,17 @@ function $e(e, t, n, r, l, o, i, s, a, u, _) {
|
|
|
590
590
|
const f = n.length;
|
|
591
591
|
for (let e = 0; e < f; e++) {
|
|
592
592
|
let t = n[e][0], r = n[e][1];
|
|
593
|
-
if (
|
|
593
|
+
if (Pr(t)) continue;
|
|
594
594
|
if (Le(c, t) < 0) return Ie(c), null;
|
|
595
595
|
const l = r.length;
|
|
596
596
|
for (let e = 0; e < l; e++) {
|
|
597
597
|
let n = r[e][0], l = r[e][1], o = r[e][2];
|
|
598
|
-
|
|
598
|
+
Pr(n) || Ue(c, t, n, l, o);
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
for (let e = 0; e < t.length; e++) {
|
|
602
602
|
let n = t[e][0], r = t[e][1];
|
|
603
|
-
if (!
|
|
603
|
+
if (!Pr(n)) {
|
|
604
604
|
if (Ge(c, n)) return rr(`SMachine: event repeated in input_events: ${n}`), Ie(c), null;
|
|
605
605
|
Fe(c, n, r);
|
|
606
606
|
}
|
|
@@ -640,17 +640,17 @@ function Ce(e, t) {
|
|
|
640
640
|
function Le(e, t) {
|
|
641
641
|
return e instanceof I ? ke(e, t) ? (rr(`state already exists: ${t}`), -1) : (e.dl_states.push(new V(t)), 0) : (rr("Cannot add state, typeof not GClass"), -1);
|
|
642
642
|
}
|
|
643
|
-
function
|
|
643
|
+
function Ue(e, t, n, r, l) {
|
|
644
644
|
if (!(e instanceof I)) return rr("Cannot add state, typeof not GClass"), -1;
|
|
645
|
-
if (
|
|
645
|
+
if (Pr(t)) return rr("state_name EMPTY"), -1;
|
|
646
646
|
let o = ke(e, t);
|
|
647
647
|
return o ? Ce(o, n) ? (rr(`event already exists: gclass ${e.gclass_name}, state ${t}, event ${n}`), -1) : (o.dl_actions.push(new G(n, r, l)), 0) : (rr(`state not found: ${t}`), -1);
|
|
648
648
|
}
|
|
649
|
-
function
|
|
650
|
-
|
|
649
|
+
function Pe(e, t, n) {
|
|
650
|
+
Pr(t) || e.push(new M(t, n));
|
|
651
651
|
}
|
|
652
652
|
function Fe(e, t, n) {
|
|
653
|
-
return e instanceof I ?
|
|
653
|
+
return e instanceof I ? Pe(e.dl_events, t, n) : (rr("Cannot add state, typeof not GClass"), -1);
|
|
654
654
|
}
|
|
655
655
|
function Ge(e, t) {
|
|
656
656
|
if (!(e instanceof I)) return rr("Cannot add state, typeof not GClass"), 0;
|
|
@@ -664,21 +664,21 @@ function Ge(e, t) {
|
|
|
664
664
|
function Ve(e) {
|
|
665
665
|
if (!(e instanceof I)) return rr("Cannot add state, typeof not GClass"), -1;
|
|
666
666
|
let t = 0;
|
|
667
|
-
|
|
667
|
+
Or(e.dl_states) || (rr(`GClass without states: ${e.gclass_name}`), t += -1);
|
|
668
668
|
for (let n = 0; n < e.dl_states.length; n++) {
|
|
669
669
|
let r = e.dl_states[n];
|
|
670
|
-
if (!
|
|
670
|
+
if (!Pr(r.state_name)) for (let n = 0; n < r.dl_actions.length; n++) {
|
|
671
671
|
let l = r.dl_actions[n];
|
|
672
|
-
|
|
672
|
+
Pr(l.event_name) || (Ge(e, l.event_name) || (rr(`SMachine: state's event NOT in input_events: gclass ${e.gclass_name}, state ${r.state_name}, event ${l.event_name}`), t += -1), l.next_state && (ke(e, l.next_state) || (rr(`SMachine: next state NOT in state names: gclass ${e.gclass_name}, state ${r.state_name}, next_state ${l.next_state}`), t += -1)));
|
|
673
673
|
}
|
|
674
674
|
}
|
|
675
675
|
for (let n = 0; n < e.dl_events.length; n++) {
|
|
676
676
|
let r = e.dl_events[n];
|
|
677
|
-
if (!
|
|
677
|
+
if (!Pr(r.event_name) && ($r(r.event_flag) || (rr(`SMachine: event flag is NOT number: gclass ${e.gclass_name}, event ${r.event_name}`), t += -1), !(r.event_flag & P.EVF_OUTPUT_EVENT))) {
|
|
678
678
|
let n = !1;
|
|
679
679
|
for (let t = 0; t < e.dl_states.length; t++) {
|
|
680
680
|
let l = e.dl_states[t];
|
|
681
|
-
|
|
681
|
+
Pr(l.state_name) || Ce(l, r.event_name) && (n = !0);
|
|
682
682
|
}
|
|
683
683
|
n || (rr(`SMachine: input_list's event NOT in state: gclass ${e.gclass_name}, event ${r.event_name}`), t += -1);
|
|
684
684
|
}
|
|
@@ -698,7 +698,7 @@ function We() {
|
|
|
698
698
|
return e;
|
|
699
699
|
}
|
|
700
700
|
function Ke() {
|
|
701
|
-
return !h || h.obflag &
|
|
701
|
+
return !h || h.obflag & U.obflag_destroyed ? null : h;
|
|
702
702
|
}
|
|
703
703
|
function xe(e, t) {
|
|
704
704
|
e = e.toLowerCase();
|
|
@@ -736,7 +736,7 @@ function Ze(e, t, n) {
|
|
|
736
736
|
if (!e || !t) return rr("hsdata or kw NULL"), -1;
|
|
737
737
|
let o = 0;
|
|
738
738
|
for (const [i, s] of Object.entries(t)) {
|
|
739
|
-
const t =
|
|
739
|
+
const t = $e(l.gclass, i, !1);
|
|
740
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;
|
|
@@ -756,11 +756,11 @@ function et(e, n, r, l, o) {
|
|
|
756
756
|
if (h) return rr(`default service ALREADY registered: ${n}^${e}`), null;
|
|
757
757
|
o |= L.gobj_flag_service;
|
|
758
758
|
}
|
|
759
|
-
if (
|
|
759
|
+
if (Pr(n)) return rr("gclass_name must be a string"), null;
|
|
760
760
|
let i = Me(n, !1);
|
|
761
761
|
if (!i) return rr(`GClass not registered: ${n}^${e}`), null;
|
|
762
762
|
if (!Dr(e)) return rr(`gobj_name must be a string: ${n}`), null;
|
|
763
|
-
if (!
|
|
763
|
+
if (!Pr(e)) {
|
|
764
764
|
if (e.includes("`")) return rr(`gobj_name cannot contain char ': ${n}^${e}`), null;
|
|
765
765
|
if (e.includes("^")) return rr(`gobj_name cannot contain char ^: ${n}^${e}`), null;
|
|
766
766
|
}
|
|
@@ -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 && (h = s), s.gobj_flag & L.gobj_flag_yuno || Be(l, s), s.obflag |=
|
|
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 |= U.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", $t(l), Dt(s))), l.gclass.gmt.mt_child_added(l, s)), a && Y(t("💙💙⏪ created: %s", $t(s))), s;
|
|
772
772
|
}
|
|
773
773
|
function tt(e, t, n) {
|
|
774
774
|
return et(e, t, n, null, L.gobj_flag_yuno);
|
|
@@ -790,30 +790,30 @@ function it(e, t, n, r) {
|
|
|
790
790
|
}
|
|
791
791
|
function st(e) {
|
|
792
792
|
if (Ct(e)) return void rr("gobj NULL or DESTROYED");
|
|
793
|
-
e.__refs__ > 0 && rr(`${Dt(e)}: gobj DESTROYING with references: ${e.__refs__}`), e.playing && (rr(`Destroying a PLAYING gobj: ${
|
|
793
|
+
e.__refs__ > 0 && rr(`${Dt(e)}: gobj DESTROYING with references: ${e.__refs__}`), e.playing && (rr(`Destroying a PLAYING gobj: ${$t(e)}`), Et(e)), e.running && (rr(`Destroying a RUNNING gobj: ${$t(e)}`), gt(e)), e.obflag |= U.obflag_destroying, function(e) {
|
|
794
794
|
if (0 === pn.length) return;
|
|
795
795
|
for (let t of pn) t.src === e && (t.src = null);
|
|
796
796
|
pn = pn.filter((t) => t.dst !== e);
|
|
797
797
|
}(e);
|
|
798
798
|
let n = te(e);
|
|
799
|
-
n && Y(t("💔💔⏩ destroying: %s",
|
|
800
|
-
let r =
|
|
801
|
-
r && r.gclass.gmt.mt_child_removed && (n && Y(t("👦👦🔴 child_removed(%s): %s",
|
|
799
|
+
n && Y(t("💔💔⏩ destroying: %s", $t(e)));
|
|
800
|
+
let r = At(e);
|
|
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
802
|
let t = wt(e);
|
|
803
803
|
t = t.toLowerCase(), m[t] ? delete m[t] : rr(`"service NOT found in register": ${t}`);
|
|
804
|
-
}(e),
|
|
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();
|
|
806
806
|
for (let e = 0; e < t.length; e++) {
|
|
807
807
|
let n = t[e];
|
|
808
808
|
Ct(n) || st(n);
|
|
809
809
|
}
|
|
810
|
-
}(e), e.obflag &
|
|
810
|
+
}(e), e.obflag & U.obflag_created && e.gclass.gmt.mt_destroy && e.gclass.gmt.mt_destroy(e), n && Y(t("💔💔⏪ destroyed: %s", $t(e))), e.obflag |= U.obflag_destroyed, e.obflag & U.obflag_created && e.gclass.instances--;
|
|
811
811
|
}
|
|
812
812
|
function at(e) {
|
|
813
813
|
if (Ct(e)) return rr("gobj NULL or DESTROYED"), -1;
|
|
814
814
|
if (e.running) return rr(`${Dt(e)}: GObj ALREADY RUNNING`), -1;
|
|
815
815
|
if (e.disabled) return rr(`${Dt(e)}: GObj DISABLED`), -1;
|
|
816
|
-
re(e) && Y(t("⏺ ⏺ start: %s",
|
|
816
|
+
re(e) && Y(t("⏺ ⏺ start: %s", $t(e))), e.running = !0;
|
|
817
817
|
let n = 0;
|
|
818
818
|
return e.gclass.gmt.mt_start && (n = e.gclass.gmt.mt_start(e)), n;
|
|
819
819
|
}
|
|
@@ -827,12 +827,12 @@ function ct(e, t, n) {
|
|
|
827
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
|
-
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : (re(e) && Y(t("⏺ ⏺ ⏺ ⏺ start_tree: %s",
|
|
830
|
+
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : (re(e) && Y(t("⏺ ⏺ ⏺ ⏺ start_tree: %s", $t(e))), e.gclass.gclass_flag & C.gcflag_manual_start || e.disabled ? 0 : (e.running || at(e), Gt(e, F.WALK_TOP2BOTTOM, ct, 0, 0)));
|
|
831
831
|
}
|
|
832
832
|
function gt(e) {
|
|
833
833
|
if (Ct(e)) return rr("gobj NULL or DESTROYED"), -1;
|
|
834
834
|
if (!e.running) return rr(`${Dt(e)}: GObj NOT RUNNING`), -1;
|
|
835
|
-
e.playing && (lr(`${Dt(e)}: GObj stopping without previous pause`), Et(e)), re(e) && Y(t("⏹ ⏹ stop: %s",
|
|
835
|
+
e.playing && (lr(`${Dt(e)}: GObj stopping without previous pause`), Et(e)), re(e) && Y(t("⏹ ⏹ stop: %s", $t(e))), e.running = !1;
|
|
836
836
|
let n = 0;
|
|
837
837
|
return e.gclass.gmt.mt_stop && (n = e.gclass.gmt.mt_stop(e)), n;
|
|
838
838
|
}
|
|
@@ -843,7 +843,7 @@ function bt(e) {
|
|
|
843
843
|
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : Ft(e, F.WALK_FIRST2LAST, dt, 0, 0);
|
|
844
844
|
}
|
|
845
845
|
function pt(e) {
|
|
846
|
-
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : (re(e) && Y(t("⏹ ⏹ ⏹ ⏹ stop_tree: %s",
|
|
846
|
+
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : (re(e) && Y(t("⏹ ⏹ ⏹ ⏹ stop_tree: %s", $t(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 rr(`gobj NULL or DESTROYED: ${Dt(e)}`), -1;
|
|
@@ -853,12 +853,12 @@ function mt(e) {
|
|
|
853
853
|
if (e.gclass.gclass_flag & C.gcflag_required_start_to_play) return rr(`${Dt(e)}: Cannot play, start not done`), -1;
|
|
854
854
|
lr(`${Dt(e)}: GObj playing without previous start`), at(e);
|
|
855
855
|
}
|
|
856
|
-
re(e) && Y(t("⏯ ⏯ play: %s",
|
|
856
|
+
re(e) && Y(t("⏯ ⏯ play: %s", $t(e))), e.playing = !0;
|
|
857
857
|
let n = 0;
|
|
858
858
|
return e.gclass.gmt.mt_play && (n = e.gclass.gmt.mt_play(e), (n < 0 || !1 === n) && (e.playing = !1)), n;
|
|
859
859
|
}
|
|
860
860
|
function Et(e) {
|
|
861
|
-
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : e.playing ? (re(e) && Y(t("⏸ ⏸ pause: %s",
|
|
861
|
+
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : e.playing ? (re(e) && Y(t("⏸ ⏸ pause: %s", $t(e))), e.playing = !1, e.gclass.gmt.mt_pause ? e.gclass.gmt.mt_pause(e) : 0) : (rr(`${Dt(e)}: GObj NOT PLAYING`), -1);
|
|
862
862
|
}
|
|
863
863
|
function ht(e) {
|
|
864
864
|
return !Ct(e) && e.running;
|
|
@@ -872,57 +872,57 @@ function yt(e) {
|
|
|
872
872
|
function vt(e) {
|
|
873
873
|
return !Ct(e) && e.playing;
|
|
874
874
|
}
|
|
875
|
-
function Ot() {
|
|
876
|
-
return !E || E.obflag & P.obflag_destroyed ? null : E;
|
|
877
|
-
}
|
|
878
875
|
function St() {
|
|
879
|
-
|
|
876
|
+
return !E || E.obflag & U.obflag_destroyed ? null : E;
|
|
877
|
+
}
|
|
878
|
+
function Ot() {
|
|
879
|
+
let e = St();
|
|
880
880
|
return e ? wt(e) : "";
|
|
881
881
|
}
|
|
882
882
|
function Nt() {
|
|
883
|
-
let e =
|
|
883
|
+
let e = St();
|
|
884
884
|
return e ? tn(e, "yuno_role") : "";
|
|
885
885
|
}
|
|
886
886
|
function Rt() {
|
|
887
|
-
let e =
|
|
887
|
+
let e = St();
|
|
888
888
|
return e ? tn(e, "yuno_id") : "";
|
|
889
889
|
}
|
|
890
890
|
function wt(e) {
|
|
891
|
-
return
|
|
891
|
+
return Ur(e) ? e.gobj_name : (rr("gobj bad type"), null);
|
|
892
892
|
}
|
|
893
893
|
function jt(e) {
|
|
894
|
-
return
|
|
894
|
+
return Ur(e) ? e.gclass.gclass_name : (rr("gobj NULL of bad type"), null);
|
|
895
895
|
}
|
|
896
896
|
function Dt(e) {
|
|
897
|
-
return
|
|
897
|
+
return Ur(e) ? e.gclass.gclass_name + "^" + wt(e) : (rr("gobj bad type"), null);
|
|
898
898
|
}
|
|
899
|
-
function
|
|
900
|
-
if (!
|
|
901
|
-
let t = Dt(e), n =
|
|
902
|
-
for (; n;) t = Dt(n) + "`" + t, n =
|
|
899
|
+
function $t(e) {
|
|
900
|
+
if (!Ur(e)) return rr("gobj NULL of bad type"), null;
|
|
901
|
+
let t = Dt(e), n = At(e);
|
|
902
|
+
for (; n;) t = Dt(n) + "`" + t, n = At(n);
|
|
903
903
|
return t;
|
|
904
904
|
}
|
|
905
|
-
function
|
|
906
|
-
return
|
|
905
|
+
function At(e) {
|
|
906
|
+
return Ur(e) ? e.parent : (rr("gobj NULL of bad type"), null);
|
|
907
907
|
}
|
|
908
908
|
function It(e) {
|
|
909
|
-
return
|
|
909
|
+
return Ur(e) ? !!(e.gobj_flag & L.gobj_flag_volatil) : (rr("gobj NULL of bad type"), null);
|
|
910
910
|
}
|
|
911
911
|
function kt(e) {
|
|
912
|
-
return
|
|
912
|
+
return Ur(e) ? !!(e.gobj_flag & L.gobj_flag_pure_child) : (rr("gobj NULL of bad type"), null);
|
|
913
913
|
}
|
|
914
914
|
function Ct(e) {
|
|
915
|
-
return !
|
|
915
|
+
return !Ur(e) || !!(e.obflag & (U.obflag_destroyed | U.obflag_destroying));
|
|
916
916
|
}
|
|
917
917
|
function Lt(e) {
|
|
918
|
-
return
|
|
918
|
+
return Ur(e) ? e.bottom_gobj : (rr("gobj NULL of bad type"), null);
|
|
919
919
|
}
|
|
920
|
-
function
|
|
921
|
-
if (!
|
|
920
|
+
function Ut(e, t) {
|
|
921
|
+
if (!Ur(e)) return rr("gobj NULL of bad type"), null;
|
|
922
922
|
e.bottom_gobj && lr(`${Dt(e)}: bottom_gobj already set`), e.bottom_gobj = t;
|
|
923
923
|
}
|
|
924
|
-
function
|
|
925
|
-
return
|
|
924
|
+
function Pt(e, t, n) {
|
|
925
|
+
return Ur(e) ? t ? $e(e.gclass, t, n) : e.gclass.attrs_table : (rr("gobj NULL of bad type"), null);
|
|
926
926
|
}
|
|
927
927
|
function Ft(e, t, n, r, l) {
|
|
928
928
|
return Ct(e) ? (rr("gobj NULL, destroying, or bad type"), 0) : Mt(e.dl_children, t, n, r, l);
|
|
@@ -969,12 +969,12 @@ function Kt(e, t, n, r, l) {
|
|
|
969
969
|
return 0;
|
|
970
970
|
}
|
|
971
971
|
function xt(e, t) {
|
|
972
|
-
if (
|
|
972
|
+
if (Pr(t)) return null;
|
|
973
973
|
const n = t.toLowerCase();
|
|
974
974
|
return "__default_service__" === n ? h : "__yuno__" === n || "__root__" === n ? E : Ht(E, t);
|
|
975
975
|
}
|
|
976
976
|
function Yt(e, t) {
|
|
977
|
-
if (!
|
|
977
|
+
if (!Ur(e)) return rr("gobj NULL of bad type"), !1;
|
|
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__;
|
|
@@ -1040,7 +1040,7 @@ function Ht(e, t) {
|
|
|
1040
1040
|
return o ? (n.splice(0, 1), n = n.join("`"), Ht(o, n)) : null;
|
|
1041
1041
|
}
|
|
1042
1042
|
function Qt(e, t) {
|
|
1043
|
-
return !
|
|
1043
|
+
return !Pr(t) && !!$e(e.gclass, t, !1);
|
|
1044
1044
|
}
|
|
1045
1045
|
function zt(e, t, n) {
|
|
1046
1046
|
let r = e.jn_attrs;
|
|
@@ -1056,7 +1056,7 @@ function Xt(e, t, n) {
|
|
|
1056
1056
|
const o = l[n];
|
|
1057
1057
|
if (o.name && (-1 === t || o.flag & t)) {
|
|
1058
1058
|
let t;
|
|
1059
|
-
!e.gclass.gmt.mt_reading || e.obflag &
|
|
1059
|
+
!e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ? t = br(e.jn_attrs, o.name) : (t = e.gclass.gmt.mt_reading(e, o.name), void 0 === t && (t = br(e.jn_attrs, o.name))), mr(r, o.name, t);
|
|
1060
1060
|
}
|
|
1061
1061
|
}
|
|
1062
1062
|
return r;
|
|
@@ -1069,28 +1069,28 @@ function Zt(e, t) {
|
|
|
1069
1069
|
if (0 === Mr(t, "__service__")) return yt(e);
|
|
1070
1070
|
}
|
|
1071
1071
|
let n = De(e, t, !1);
|
|
1072
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
1072
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ? br(n, t) : e.gclass.gmt.mt_reading(e, t) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1073
1073
|
}
|
|
1074
1074
|
function en(e, t) {
|
|
1075
1075
|
t && Mr(t, "__trace_level__");
|
|
1076
1076
|
let n = De(e, t, !1);
|
|
1077
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
1077
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ? br(n, t) : e.gclass.gmt.mt_reading(e, t) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1078
1078
|
}
|
|
1079
1079
|
function tn(e, t) {
|
|
1080
1080
|
if (t && 0 === Mr(t, "__state__")) return cn(e);
|
|
1081
1081
|
let n = De(e, t, !1);
|
|
1082
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
1082
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ? br(n, t) : e.gclass.gmt.mt_reading(e, t) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1083
1083
|
}
|
|
1084
1084
|
function nn(e, t) {
|
|
1085
1085
|
let n = De(e, t, !1);
|
|
1086
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
1086
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & U.obflag_destroyed ? br(n, t) : e.gclass.gmt.mt_reading(e, t) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1087
1087
|
}
|
|
1088
1088
|
function rn(e, n, r, l) {
|
|
1089
1089
|
if (!Dr(n)) return rr(t("gobj_write_attr(%s): path must be a string", Dt(e))), -1;
|
|
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, wr(e.priv) && e.priv.hasOwnProperty(l) && (e.priv[l] = r), e.obflag &
|
|
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, wr(e.priv) && e.priv.hasOwnProperty(o) && (e.priv[o] = r), e.obflag &
|
|
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;
|
|
@@ -1123,22 +1123,22 @@ function ln(e) {
|
|
|
1123
1123
|
function on(e, t, n, r) {
|
|
1124
1124
|
let l = je(e), o = 0;
|
|
1125
1125
|
for (const [r, i] of Object.entries(t)) {
|
|
1126
|
-
let t =
|
|
1126
|
+
let t = Pt(e, r, !0);
|
|
1127
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), wr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag &
|
|
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), wr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag &
|
|
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), wr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag &
|
|
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;
|
|
@@ -1152,13 +1152,13 @@ function _n(e, n) {
|
|
|
1152
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
|
-
return
|
|
1155
|
+
return Ur(e) ? e.current_state.state_name : (rr("hgobj NULL"), "");
|
|
1156
1156
|
}
|
|
1157
1157
|
function fn(e, n) {
|
|
1158
|
-
return Ct(e) ? (rr("gobj NULL or DESTROYED"), null) : n instanceof k ? (e.parent && e.parent.mt_child_removed && e.parent.mt_child_removed(e.parent, e), e.parent && (Je(e.parent, e), e.parent = null), Be(n, e), n.mt_child_added && (te(e) && ir(t("👦👦🔵 child_added(%s): %s",
|
|
1158
|
+
return Ct(e) ? (rr("gobj NULL or DESTROYED"), null) : n instanceof k ? (e.parent && e.parent.mt_child_removed && e.parent.mt_child_removed(e.parent, e), e.parent && (Je(e.parent, e), e.parent = null), Be(n, e), n.mt_child_added && (te(e) && ir(t("👦👦🔵 child_added(%s): %s", $t(n), Dt(e))), n.mt_child_added(n, e)), 0) : (rr(`${Dt(e)}: gobj_change_parent() BAD TYPE of parent`), -1);
|
|
1159
1159
|
}
|
|
1160
1160
|
function gn(e, t, n) {
|
|
1161
|
-
if (!
|
|
1161
|
+
if (!Ur(e)) return rr("gobj NULL of bad type"), null;
|
|
1162
1162
|
let r = Ge(e.gclass, t);
|
|
1163
1163
|
if (r) return r;
|
|
1164
1164
|
if (n) {
|
|
@@ -1176,11 +1176,11 @@ function dn(e, t, n) {
|
|
|
1176
1176
|
}
|
|
1177
1177
|
function bn(e, t, n) {
|
|
1178
1178
|
let r = gn(e, t, !1);
|
|
1179
|
-
return !!r && !(n && !(r.event_flag & n)) && !!(r.event_flag &
|
|
1179
|
+
return !!r && !(n && !(r.event_flag & n)) && !!(r.event_flag & P.EVF_OUTPUT_EVENT);
|
|
1180
1180
|
}
|
|
1181
1181
|
var pn = [], mn = !1;
|
|
1182
1182
|
function En(e, n, r, l) {
|
|
1183
|
-
return e && e instanceof k ? e.obflag & (
|
|
1183
|
+
return e && e instanceof k ? e.obflag & (U.obflag_destroyed | U.obflag_destroying) ? (rr(`gobj_post_event(): gobj dst DESTROYING, event ${n}`), -1) : Pr(n) ? (rr("gobj_post_event(): event EMPTY"), -1) : dn(e, n, 0) ? pn.length >= 1e4 ? (rr(`gobj_post_event(): too many posted events, this is NOT a work queue, event ${n}, pending ${pn.length}`), -1) : (pn.push({
|
|
1184
1184
|
dst: e,
|
|
1185
1185
|
event: n,
|
|
1186
1186
|
kw: r,
|
|
@@ -1195,37 +1195,37 @@ function Tn() {
|
|
|
1195
1195
|
let e = pn;
|
|
1196
1196
|
pn = [];
|
|
1197
1197
|
let t = 0;
|
|
1198
|
-
for (let n of e) n.dst.obflag & (
|
|
1198
|
+
for (let n of e) n.dst.obflag & (U.obflag_destroyed | U.obflag_destroying) || (yn(n.dst, n.event, n.kw, n.src), t++);
|
|
1199
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 rr("gobj dst NULL"), -1;
|
|
1203
|
-
if (e.obflag & (
|
|
1203
|
+
if (e.obflag & (U.obflag_destroyed | U.obflag_destroying)) return rr("gobj dst DESTROYED"), -1;
|
|
1204
1204
|
let o = e.current_state;
|
|
1205
1205
|
if (!o) return rr(`${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 ? (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) &&
|
|
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
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
|
-
r && le(e) &&
|
|
1216
|
+
r && le(e) && Sr(r) && ar(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 &
|
|
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,
|
|
1227
1227
|
__own_event__: 2
|
|
1228
|
-
}),
|
|
1228
|
+
}), Sn = [
|
|
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
|
+
O()
|
|
1240
1240
|
];
|
|
1241
|
-
function
|
|
1241
|
+
function On(e, t, n, r, l) {
|
|
1242
1242
|
let o = tl(t, r, "__config__", null), i = tl(t, r, "__global__", null), s = tl(t, r, "__local__", null), a = nl(t, r, "__filter__", null), u = !0;
|
|
1243
1243
|
if (t && t !== el(null, e, "publisher", null) && (u = !1), l && l !== el(null, e, "subscriber", null) && (u = !1), n && n !== Zr(null, e, "event", "") && (u = !1), Nr(o) > 0) {
|
|
1244
1244
|
let t = tl(null, e, "__config__", null);
|
|
@@ -1262,18 +1262,18 @@ 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
|
+
On(s, t, n, r, l) && hr(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 (On(e[o], t, n, r, l)) return o;
|
|
1271
1271
|
return -1;
|
|
1272
1272
|
}
|
|
1273
1273
|
function wn(e, n, r, l) {
|
|
1274
|
-
let o = el(e, n, "publisher", null,
|
|
1275
|
-
if (!!(zr(e, n, "subs_flag", null,
|
|
1276
|
-
(ne(i) || ne(o)) && (Y(t("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", s || "", Dt(o), Dt(i))), ar(n)), o.obflag &
|
|
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
|
+
if (!!(zr(e, n, "subs_flag", null, Pn.KW_REQUIRED) & vn.__hard_subscription__) && !r) return -1;
|
|
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
|
}
|
|
@@ -1289,12 +1289,12 @@ function jn(e, n, r, l) {
|
|
|
1289
1289
|
]);
|
|
1290
1290
|
if (Object.keys(r).forEach((t) => {
|
|
1291
1291
|
o.has(t) || rr(`${Dt(e)}: key ignored in subscription (key: ${t}, event: ${n})`);
|
|
1292
|
-
}),
|
|
1293
|
-
else if (!(bn(e, n,
|
|
1292
|
+
}), Pr(n)) n = "";
|
|
1293
|
+
else if (!(bn(e, n, P.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return rr(`event NOT in output event list: ${Dt(e)}, ${n}`), 0;
|
|
1294
1294
|
let i = Nn(e.dl_subscriptions, e, n, r, l);
|
|
1295
|
-
|
|
1295
|
+
Or(i) > 0 && (rr(`${Dt(e)}: ${Or(i)} subscription(s) REPEATED, will be deleted and override`), ar(i, "subscription REPEATED"), $n(e, i, !1));
|
|
1296
1296
|
let s = function(e, t, n, r) {
|
|
1297
|
-
let l = Ne(e,
|
|
1297
|
+
let l = Ne(e, Sn);
|
|
1298
1298
|
Er(l, "event", t), Er(l, "subscriber", r), Er(l, "publisher", e);
|
|
1299
1299
|
let o = 0;
|
|
1300
1300
|
if (n) {
|
|
@@ -1310,7 +1310,7 @@ function jn(e, n, r, l) {
|
|
|
1310
1310
|
pr(n, "__own_event__"), t && (o |= vn.__own_event__);
|
|
1311
1311
|
}
|
|
1312
1312
|
}
|
|
1313
|
-
Nr(i) > 0 && Er(l, "__local__", ur(i)), Nr(s) > 0 && Er(l, "__filter__", ur(s)),
|
|
1313
|
+
Nr(i) > 0 && Er(l, "__local__", ur(i)), Nr(s) > 0 && Er(l, "__filter__", ur(s)), Pr(a) || Er(l, "__service__", a);
|
|
1314
1314
|
}
|
|
1315
1315
|
return Er(l, "subs_flag", o), l;
|
|
1316
1316
|
}(e, n, r, l);
|
|
@@ -1333,8 +1333,8 @@ function Dn(e, t, n, r) {
|
|
|
1333
1333
|
]);
|
|
1334
1334
|
if (Object.keys(n).forEach((n) => {
|
|
1335
1335
|
l.has(n) || rr(`${Dt(e)}: key ignored in subscription (key: ${n}, event: ${t})`);
|
|
1336
|
-
}),
|
|
1337
|
-
else if (!(bn(e, t,
|
|
1336
|
+
}), Pr(t)) t = "";
|
|
1337
|
+
else if (!(bn(e, t, 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 ${t}`), 0;
|
|
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];
|
|
@@ -1342,42 +1342,42 @@ function Dn(e, t, n, r) {
|
|
|
1342
1342
|
}
|
|
1343
1343
|
return i || (lr(`${Dt(e)}: No subscription found`), ar(n, "No subscription found")), 0;
|
|
1344
1344
|
}
|
|
1345
|
-
function
|
|
1345
|
+
function $n(e, t, n) {
|
|
1346
1346
|
let r = [...t];
|
|
1347
1347
|
for (let t = 0; t < r.length; t++) wn(e, r[t], n, !1);
|
|
1348
1348
|
return 0;
|
|
1349
1349
|
}
|
|
1350
|
-
function
|
|
1350
|
+
function An(e, t, n, r) {
|
|
1351
1351
|
return null == n && (n = {}), Nn(e.dl_subscriptions, e, t, n, r);
|
|
1352
1352
|
}
|
|
1353
1353
|
function In(e) {
|
|
1354
|
-
let t =
|
|
1354
|
+
let t = An(e, null, null, null);
|
|
1355
1355
|
for (let n = 0; n < t.length; n++) {
|
|
1356
|
-
let r = t[n], l = el(e, r, "publisher", null,
|
|
1357
|
-
Er(r, "s_event", Zr(e, r, "event", "",
|
|
1356
|
+
let r = t[n], l = el(e, r, "publisher", null, Pn.KW_REQUIRED), o = el(e, r, "subscriber", null, Pn.KW_REQUIRED);
|
|
1357
|
+
Er(r, "s_event", Zr(e, r, "event", "", Pn.KW_REQUIRED)), Er(r, "s_publisher", Dt(l)), Er(r, "s_subscriber", Dt(o));
|
|
1358
1358
|
}
|
|
1359
1359
|
let n = kn(e, 0, null, 0);
|
|
1360
1360
|
for (let t = 0; t < n.length; t++) {
|
|
1361
|
-
let r = n[t], l = el(e, r, "publisher", null,
|
|
1362
|
-
Er(r, "s_event", Zr(e, r, "event", "",
|
|
1361
|
+
let r = n[t], l = el(e, r, "publisher", null, Pn.KW_REQUIRED), o = el(e, r, "subscriber", null, Pn.KW_REQUIRED);
|
|
1362
|
+
Er(r, "s_event", Zr(e, r, "event", "", Pn.KW_REQUIRED)), Er(r, "s_publisher", Dt(l)), Er(r, "s_subscriber", Dt(o));
|
|
1363
1363
|
}
|
|
1364
1364
|
return {
|
|
1365
1365
|
subscriptions: t,
|
|
1366
1366
|
subscribings: n,
|
|
1367
|
-
"total subscriptions":
|
|
1368
|
-
total_subscribings:
|
|
1367
|
+
"total subscriptions": Or(t),
|
|
1368
|
+
total_subscribings: Or(n)
|
|
1369
1369
|
};
|
|
1370
1370
|
}
|
|
1371
1371
|
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 (wr(r) || (r = {}), !e || e.obflag & (
|
|
1376
|
-
if (
|
|
1375
|
+
if (wr(r) || (r = {}), !e || e.obflag & (U.obflag_destroyed | U.obflag_destroying)) return rr("gobj NULL or DESTROYED"), -1;
|
|
1376
|
+
if (Pr(n)) return rr(`${Dt(e)}: event EMPTY`), -1;
|
|
1377
1377
|
let l = gn(e, n, !0);
|
|
1378
|
-
if (!(l && l.event_flag & (
|
|
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 ? "" : "!!", jt(e), wt(e), e.current_state.state_name, "", n || "", "")), le(e) &&
|
|
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
|
}
|
|
@@ -1389,17 +1389,17 @@ function Cn(e, n, r) {
|
|
|
1389
1389
|
if (t < 0) break;
|
|
1390
1390
|
if (!t) continue;
|
|
1391
1391
|
}
|
|
1392
|
-
let _ = el(e, u, "subscriber", null,
|
|
1392
|
+
let _ = el(e, u, "subscriber", null, Pn.KW_REQUIRED);
|
|
1393
1393
|
if (!_ || Ct(_)) continue;
|
|
1394
|
-
let c = zr(e, u, "subs_flag", 0,
|
|
1395
|
-
if (
|
|
1394
|
+
let c = zr(e, u, "subs_flag", 0, Pn.KW_REQUIRED), f = Zr(e, u, "event", "", Pn.KW_REQUIRED);
|
|
1395
|
+
if (Pr(f) || 0 === Mr(f, n)) {
|
|
1396
1396
|
tl(e, u, "__config__", null, 0);
|
|
1397
1397
|
let l = tl(e, u, "__global__", null, 0), i = tl(e, u, "__local__", null, 0), f = nl(e, u, "__filter__", null, 0), g = r, d = 1;
|
|
1398
1398
|
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, n, g, _) : Nr(f) > 0 && (d = sl(g, f) ? 1 : 0, o && (Y(t("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", d ? "👍" : "👎", n || "", Dt(_), Dt(e))), ar(f))), d < 0) break;
|
|
1399
1399
|
if (!d) continue;
|
|
1400
1400
|
let b = gn(_, n, !0);
|
|
1401
|
-
if (b && b.event_flag &
|
|
1402
|
-
i && Br(g, i), l && fr(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))), le(e) &&
|
|
1401
|
+
if (b && b.event_flag & P.EVF_SYSTEM_EVENT && !dn(_, b.event_name, 0)) continue;
|
|
1402
|
+
i && Br(g, i), l && fr(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))), le(e) && Sr(g) && ar(g));
|
|
1403
1403
|
let p = yn(_, n, g, e);
|
|
1404
1404
|
if (p < 0 && c & vn.__own_event__) {
|
|
1405
1405
|
s = -1;
|
|
@@ -1408,17 +1408,17 @@ function Cn(e, n, r) {
|
|
|
1408
1408
|
if (a += p, s++, Ct(e)) break;
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
1411
|
-
return s || l && l.event_flag &
|
|
1411
|
+
return s || l && l.event_flag & P.EVF_NO_WARN_SUBS || lr(`${Dt(e)}: Publish event WITHOUT subscribers, ev ${n}`), a;
|
|
1412
1412
|
}
|
|
1413
1413
|
function Ln(e, n, r, l) {
|
|
1414
1414
|
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : ((function(e) {
|
|
1415
1415
|
return Q > 1 || !!e && !!(Z(e) & B.TRACE_COMMANDS);
|
|
1416
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) && ar(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
|
-
function
|
|
1418
|
+
function Un(e, n, r, l) {
|
|
1419
1419
|
return Ct(e) ? (rr("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);
|
|
1420
1420
|
}
|
|
1421
|
-
var
|
|
1421
|
+
var Pn = Object.freeze({
|
|
1422
1422
|
KW_REQUIRED: 1,
|
|
1423
1423
|
KW_CREATE: 2,
|
|
1424
1424
|
KW_WILD_NUMBER: 4,
|
|
@@ -1542,7 +1542,7 @@ function sr(e) {
|
|
|
1542
1542
|
Wn && zn("msg", t) && Wn("%c" + n + " MSG: " + String(t), "color:cyan"), Zn("msg", t, n);
|
|
1543
1543
|
}
|
|
1544
1544
|
function ar(e, t) {
|
|
1545
|
-
zn("json", t) && (t &&
|
|
1545
|
+
zn("json", t) && (t && Fn.warn("=====> " + t), Fn.dir(e)), Zn("json", e, eo());
|
|
1546
1546
|
}
|
|
1547
1547
|
function ur(e) {
|
|
1548
1548
|
return structuredClone(e);
|
|
@@ -1615,10 +1615,10 @@ function yr(e, t) {
|
|
|
1615
1615
|
function vr(e, t) {
|
|
1616
1616
|
return t ? (Array.prototype.push.apply(e, t), e) : e;
|
|
1617
1617
|
}
|
|
1618
|
-
function
|
|
1618
|
+
function Sr(e) {
|
|
1619
1619
|
return wr(e) ? Object.keys(e).length : 0;
|
|
1620
1620
|
}
|
|
1621
|
-
function
|
|
1621
|
+
function Or(e) {
|
|
1622
1622
|
return jr(e) ? e.length : 0;
|
|
1623
1623
|
}
|
|
1624
1624
|
function Nr(e) {
|
|
@@ -1636,17 +1636,17 @@ function jr(e) {
|
|
|
1636
1636
|
function Dr(e) {
|
|
1637
1637
|
return "string" == typeof e;
|
|
1638
1638
|
}
|
|
1639
|
-
function
|
|
1639
|
+
function $r(e) {
|
|
1640
1640
|
return "number" == typeof e && Number.isFinite(e);
|
|
1641
1641
|
}
|
|
1642
|
-
function
|
|
1642
|
+
function Ar(e) {
|
|
1643
1643
|
return "boolean" == typeof e;
|
|
1644
1644
|
}
|
|
1645
1645
|
function Ir(e) {
|
|
1646
1646
|
return null == e;
|
|
1647
1647
|
}
|
|
1648
1648
|
function kr(e) {
|
|
1649
|
-
if (
|
|
1649
|
+
if ($r(e)) return !0;
|
|
1650
1650
|
if (!Dr(e)) return !1;
|
|
1651
1651
|
const t = Number(e);
|
|
1652
1652
|
return !isNaN(t) && "" !== e.trim() && !isNaN(t);
|
|
@@ -1657,14 +1657,14 @@ function Cr(e) {
|
|
|
1657
1657
|
function Lr(e) {
|
|
1658
1658
|
return "function" == typeof e;
|
|
1659
1659
|
}
|
|
1660
|
-
function
|
|
1660
|
+
function Ur(e) {
|
|
1661
1661
|
return e instanceof k;
|
|
1662
1662
|
}
|
|
1663
|
-
function
|
|
1663
|
+
function Pr(e) {
|
|
1664
1664
|
return !Dr(e) || 0 === e.length;
|
|
1665
1665
|
}
|
|
1666
1666
|
function Fr(e) {
|
|
1667
|
-
return
|
|
1667
|
+
return $r(e) ? Boolean(e) : /^\s*(true|1|on)\s*$/i.test(e);
|
|
1668
1668
|
}
|
|
1669
1669
|
function Gr(e, t, n) {
|
|
1670
1670
|
var r = (e + "").substring(0, n), l = (t + "").substring(0, n);
|
|
@@ -1679,11 +1679,11 @@ function Mr(e, t) {
|
|
|
1679
1679
|
}
|
|
1680
1680
|
function Wr(e, t) {
|
|
1681
1681
|
if (wr(e) || wr(t) || jr(e) || jr(t)) return 0;
|
|
1682
|
-
if (
|
|
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;
|
|
1685
1685
|
}
|
|
1686
|
-
if (
|
|
1686
|
+
if (Ar(e) || Ar(t)) {
|
|
1687
1687
|
let n = Number(e), r = Number(t);
|
|
1688
1688
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1689
1689
|
}
|
|
@@ -1714,7 +1714,7 @@ function Jr(e, t) {
|
|
|
1714
1714
|
return !(!(t in e) || !e.hasOwnProperty(t));
|
|
1715
1715
|
}
|
|
1716
1716
|
function qr(e, t, n, r) {
|
|
1717
|
-
if (e && !
|
|
1717
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !wr(t) && !jr(t)) return rr(`${Dt(e)}: kw must be list or dict`), 0;
|
|
1718
1718
|
if (!Dr(n)) return rr(`${Dt(e)}: path must be a string: ${String(n)}`), 0;
|
|
1719
1719
|
let l = n.split("`");
|
|
1720
1720
|
if (l.length <= 1) return t[n];
|
|
@@ -1723,17 +1723,17 @@ function qr(e, t, n, r) {
|
|
|
1723
1723
|
return t;
|
|
1724
1724
|
}
|
|
1725
1725
|
function Hr(e, t, n) {
|
|
1726
|
-
e && !
|
|
1726
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1727
1727
|
let [r, l] = function(e, t) {
|
|
1728
1728
|
let n = e.lastIndexOf(t);
|
|
1729
1729
|
return -1 === n ? [e, ""] : [e.substring(0, n), e.substring(n + 1)];
|
|
1730
1730
|
}(n, "`");
|
|
1731
|
-
return
|
|
1731
|
+
return Pr(l) ? pr(t, n) : pr(qr(e, t, r, !0), l), 0;
|
|
1732
1732
|
}
|
|
1733
1733
|
function Qr(e, t, n, r, l) {
|
|
1734
|
-
e && !
|
|
1734
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1735
1735
|
let o = qr(e, t, n, !1);
|
|
1736
|
-
const i = l && l &
|
|
1736
|
+
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
1737
|
if (void 0 === o) {
|
|
1738
1738
|
if (s) {
|
|
1739
1739
|
let l = Boolean(r);
|
|
@@ -1741,12 +1741,20 @@ function Qr(e, t, n, r, l) {
|
|
|
1741
1741
|
}
|
|
1742
1742
|
return i && (rr(`path not found: '${n}'`), ar(t)), Boolean(r);
|
|
1743
1743
|
}
|
|
1744
|
-
|
|
1744
|
+
let _;
|
|
1745
|
+
if (Ar(o)) _ = o;
|
|
1746
|
+
else if (u && $r(o)) _ = 0 !== o;
|
|
1747
|
+
else if (u && Dr(o)) _ = "true" === o.toLowerCase() || "false" !== o.toLowerCase() && 0 !== (parseInt(o) || 0);
|
|
1748
|
+
else {
|
|
1749
|
+
if (!u || null !== o) return i && (rr(`${Dt(e)}: path value MUST BE a boolean: ${n}`), sr(t)), Boolean(r);
|
|
1750
|
+
_ = !1;
|
|
1751
|
+
}
|
|
1752
|
+
return a && Hr(e, t, n), _;
|
|
1745
1753
|
}
|
|
1746
1754
|
function zr(e, t, n, r, l) {
|
|
1747
|
-
e && !
|
|
1755
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1748
1756
|
let o = qr(e, t, n, !1);
|
|
1749
|
-
const i = l && l &
|
|
1757
|
+
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1750
1758
|
if (void 0 === o) {
|
|
1751
1759
|
if (s) {
|
|
1752
1760
|
let l = parseInt(r);
|
|
@@ -1754,12 +1762,12 @@ function zr(e, t, n, r, l) {
|
|
|
1754
1762
|
}
|
|
1755
1763
|
return i && (rr(`path not found: '${n}'`), ar(t)), parseInt(r);
|
|
1756
1764
|
}
|
|
1757
|
-
return a && Hr(e, t, n),
|
|
1765
|
+
return a && Hr(e, t, n), $r(o) ? parseInt(o) : (i && (rr(`path value MUST BE a number: ${n}`), sr(t)), parseInt(r));
|
|
1758
1766
|
}
|
|
1759
1767
|
function Xr(e, t, n, r, l) {
|
|
1760
|
-
e && !
|
|
1768
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1761
1769
|
let o = qr(e, t, n, !1);
|
|
1762
|
-
const i = l && l &
|
|
1770
|
+
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1763
1771
|
if (void 0 === o) {
|
|
1764
1772
|
if (s) {
|
|
1765
1773
|
let l = Number(r);
|
|
@@ -1767,18 +1775,18 @@ function Xr(e, t, n, r, l) {
|
|
|
1767
1775
|
}
|
|
1768
1776
|
return i && (rr(`path not found: '${n}'`), ar(t)), Number(r);
|
|
1769
1777
|
}
|
|
1770
|
-
return a && Hr(e, t, n),
|
|
1778
|
+
return a && Hr(e, t, n), $r(o) ? Number(o) : (i && (rr(`path value MUST BE a number: ${n}`), sr(t)), Number(r));
|
|
1771
1779
|
}
|
|
1772
1780
|
function Zr(e, t, n, r, l) {
|
|
1773
|
-
e && !
|
|
1781
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1774
1782
|
let o = qr(e, t, n, !1);
|
|
1775
|
-
const i = l && l &
|
|
1783
|
+
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1776
1784
|
return void 0 === o ? s ? (ll(e, t, n, Dr(r) ? r : null), r) : (i && (rr(`path not found: '${n}'`), ar(t)), r) : (a && Hr(e, t, n), Dr(o) ? o : (i && (rr(`${Dt(e)}: path value MUST BE a string: ${n}`), sr(t)), r));
|
|
1777
1785
|
}
|
|
1778
1786
|
function el(e, t, n, r, l) {
|
|
1779
|
-
e && !
|
|
1787
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1780
1788
|
let o = qr(e, t, n, !1);
|
|
1781
|
-
const i = l && l &
|
|
1789
|
+
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1782
1790
|
if (void 0 === o) {
|
|
1783
1791
|
if (s) {
|
|
1784
1792
|
let l = r;
|
|
@@ -1789,22 +1797,15 @@ function el(e, t, n, r, l) {
|
|
|
1789
1797
|
return a && Hr(e, t, n), o;
|
|
1790
1798
|
}
|
|
1791
1799
|
function tl(e, t, n, r, l) {
|
|
1792
|
-
e && !
|
|
1800
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1793
1801
|
let o = qr(e, t, n, !1);
|
|
1794
|
-
const i = l && l &
|
|
1795
|
-
|
|
1796
|
-
if (s) {
|
|
1797
|
-
let l = Object(r);
|
|
1798
|
-
return ll(e, t, n, l), l;
|
|
1799
|
-
}
|
|
1800
|
-
return i && (rr(`path not found: '${n}'`), ar(t)), Object(r);
|
|
1801
|
-
}
|
|
1802
|
-
return a && Hr(e, t, n), wr(o) ? Object(o) : (i && (rr(`path value MUST BE a dict: ${n}`), sr(t)), Object(r));
|
|
1802
|
+
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1803
|
+
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(`${Dt(e)}: path value MUST BE a dict: ${n}`), sr(t)), r);
|
|
1803
1804
|
}
|
|
1804
1805
|
function nl(e, t, n, r, l) {
|
|
1805
|
-
e && !
|
|
1806
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1806
1807
|
let o = qr(e, t, n, !1);
|
|
1807
|
-
const i = l && l &
|
|
1808
|
+
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1808
1809
|
if (void 0 === o) {
|
|
1809
1810
|
if (s) {
|
|
1810
1811
|
let l = r;
|
|
@@ -1815,20 +1816,13 @@ function nl(e, t, n, r, l) {
|
|
|
1815
1816
|
return a && Hr(e, t, n), o;
|
|
1816
1817
|
}
|
|
1817
1818
|
function rl(e, t, n, r, l) {
|
|
1818
|
-
e && !
|
|
1819
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1819
1820
|
let o = qr(e, t, n, !1);
|
|
1820
|
-
const i = l && l &
|
|
1821
|
-
|
|
1822
|
-
if (s) {
|
|
1823
|
-
let l = Array(r);
|
|
1824
|
-
return ll(e, t, n, l), l;
|
|
1825
|
-
}
|
|
1826
|
-
return i && (rr(`path not found: '${n}'`), ar(t)), Array(r);
|
|
1827
|
-
}
|
|
1828
|
-
return a && Hr(e, t, n), jr(o) ? Array(o) : (i && (rr(`path value MUST BE an array: ${n}`), sr(t)), Array(r));
|
|
1821
|
+
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1822
|
+
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(`${Dt(e)}: path value MUST BE an array: ${n}`), sr(t)), r);
|
|
1829
1823
|
}
|
|
1830
1824
|
function ll(e, t, n, r) {
|
|
1831
|
-
if (e && !
|
|
1825
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !wr(t)) return rr("kw is not an object"), -1;
|
|
1832
1826
|
let l = n.split("`");
|
|
1833
1827
|
if (l.length <= 1) return t[n] = r, 0;
|
|
1834
1828
|
let o = l.length;
|
|
@@ -1839,8 +1833,8 @@ function ll(e, t, n, r) {
|
|
|
1839
1833
|
return 0;
|
|
1840
1834
|
}
|
|
1841
1835
|
function ol(e, t, n, r, l) {
|
|
1842
|
-
if (e && !
|
|
1843
|
-
let o = tl(e, t, n, {},
|
|
1836
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !wr(t)) return rr("kw is not an object"), -1;
|
|
1837
|
+
let o = tl(e, t, n, {}, Pn.KW_CREATE);
|
|
1844
1838
|
return wr(o) ? (o[r] = l, 0) : (rr("subdict is not an object"), -1);
|
|
1845
1839
|
}
|
|
1846
1840
|
function il(e, n, r) {
|
|
@@ -1849,14 +1843,14 @@ function il(e, n, r) {
|
|
|
1849
1843
|
o = !1;
|
|
1850
1844
|
for (let i = 0; i < n.length; i++) {
|
|
1851
1845
|
let s = n[i];
|
|
1852
|
-
if (l =
|
|
1846
|
+
if (l = Pr(r) ? t("%s", r) : t("%s`%d", r, i), o = il(e, s, l), o) break;
|
|
1853
1847
|
}
|
|
1854
1848
|
} else if (wr(n)) {
|
|
1855
1849
|
o = !0;
|
|
1856
1850
|
let i = Object.keys(n);
|
|
1857
1851
|
for (let s = 0; s < i.length; s++) {
|
|
1858
1852
|
let a = i[s], u = n[a];
|
|
1859
|
-
if (l =
|
|
1853
|
+
if (l = Pr(r) ? t("%s", a) : t("%s`%s", r, a), jr(u) || wr(u)) {
|
|
1860
1854
|
if (o = il(e, u, l), !o) break;
|
|
1861
1855
|
continue;
|
|
1862
1856
|
}
|
|
@@ -1882,7 +1876,7 @@ function al(e, t, n, r) {
|
|
|
1882
1876
|
return r && rr("item not found in this list"), -1;
|
|
1883
1877
|
}
|
|
1884
1878
|
function ul(e, t, n, r) {
|
|
1885
|
-
if (e && !
|
|
1879
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return null;
|
|
1886
1880
|
r || (r = sl);
|
|
1887
1881
|
let l = [];
|
|
1888
1882
|
if (jr(t)) for (let e = 0; e < t.length; e++) {
|
|
@@ -1896,7 +1890,7 @@ function ul(e, t, n, r) {
|
|
|
1896
1890
|
return l;
|
|
1897
1891
|
}
|
|
1898
1892
|
function _l(e, t, n, r) {
|
|
1899
|
-
if (e && !
|
|
1893
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return null;
|
|
1900
1894
|
r || (r = sl);
|
|
1901
1895
|
let l = [];
|
|
1902
1896
|
if (jr(t)) for (let e = 0; e < t.length; e++) {
|
|
@@ -1910,14 +1904,14 @@ function _l(e, t, n, r) {
|
|
|
1910
1904
|
return l;
|
|
1911
1905
|
}
|
|
1912
1906
|
function cl(e, t, n, r) {
|
|
1913
|
-
e && !
|
|
1907
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1914
1908
|
let l = {};
|
|
1915
|
-
if (Dr(n) && !
|
|
1909
|
+
if (Dr(n) && !Pr(n)) {
|
|
1916
1910
|
let o = n;
|
|
1917
1911
|
t.hasOwnProperty(o) ? l[o] = t[o] : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1918
|
-
} else if (wr(n) &&
|
|
1912
|
+
} 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}`);
|
|
1919
1913
|
else {
|
|
1920
|
-
if (!(jr(n) &&
|
|
1914
|
+
if (!(jr(n) && Or(n) > 0)) return t;
|
|
1921
1915
|
for (let o = 0; o < n.length; o++) {
|
|
1922
1916
|
let i = n[o];
|
|
1923
1917
|
t.hasOwnProperty(i) ? l[i] = t[i] : r && rr(`${Dt(e)}: key not found: ${i}`);
|
|
@@ -1927,12 +1921,12 @@ function cl(e, t, n, r) {
|
|
|
1927
1921
|
}
|
|
1928
1922
|
function fl(e, t, n, r) {
|
|
1929
1923
|
let l = {};
|
|
1930
|
-
if (fr(l, t), Dr(n) && !
|
|
1924
|
+
if (fr(l, t), Dr(n) && !Pr(n)) {
|
|
1931
1925
|
let o = n;
|
|
1932
1926
|
nl(e, t, o, 0, 0) ? pr(l, o) : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1933
|
-
} else if (wr(n) &&
|
|
1927
|
+
} 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}`);
|
|
1934
1928
|
else {
|
|
1935
|
-
if (!(jr(n) &&
|
|
1929
|
+
if (!(jr(n) && Or(n) > 0)) return {};
|
|
1936
1930
|
for (let o = 0; o < n.length; o++) {
|
|
1937
1931
|
let i = n[o];
|
|
1938
1932
|
t.hasOwnProperty(i) ? pr(l, i) : r && rr(`${Dt(e)}: key not found: ${i}`);
|
|
@@ -1977,7 +1971,7 @@ function pl(e, t) {
|
|
|
1977
1971
|
return !1;
|
|
1978
1972
|
}
|
|
1979
1973
|
function ml(e, t, n, r, l) {
|
|
1980
|
-
if (e && !
|
|
1974
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return null;
|
|
1981
1975
|
l || (l = sl);
|
|
1982
1976
|
let o = [];
|
|
1983
1977
|
if (jr(t)) for (let i = 0; i < t.length; i++) {
|
|
@@ -1999,18 +1993,18 @@ function ml(e, t, n, r, l) {
|
|
|
1999
1993
|
return o;
|
|
2000
1994
|
}
|
|
2001
1995
|
function El(e, t, n) {
|
|
2002
|
-
e && !
|
|
1996
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
2003
1997
|
let r = {};
|
|
2004
|
-
if (
|
|
1998
|
+
if (Pr(n) || (t = qr(e, t, n)), wr(t)) r = t;
|
|
2005
1999
|
else if (jr(t)) for (let n = 0; n < t.length; n++) {
|
|
2006
|
-
let l = t[n], o = Zr(e, l, "id", "",
|
|
2007
|
-
|
|
2000
|
+
let l = t[n], o = Zr(e, l, "id", "", Pn.KW_REQUIRED);
|
|
2001
|
+
Pr(o) || (r[o] = l);
|
|
2008
2002
|
}
|
|
2009
2003
|
else rr(`${Dt(e)} kwid_new_dict: data type unknown`);
|
|
2010
2004
|
return r;
|
|
2011
2005
|
}
|
|
2012
2006
|
function hl(e, t, n) {
|
|
2013
|
-
if (e && !
|
|
2007
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), Pr(n) || (t = qr(e, t, n)), jr(t)) return t;
|
|
2014
2008
|
if (wr(t)) {
|
|
2015
2009
|
let n = [];
|
|
2016
2010
|
for (let r of Object.keys(t)) {
|
|
@@ -2022,17 +2016,17 @@ function hl(e, t, n) {
|
|
|
2022
2016
|
return rr(`${Dt(e)} kwid_new_list: wrong type for list`), [];
|
|
2023
2017
|
}
|
|
2024
2018
|
function Tl(e, t, n, r, l) {
|
|
2025
|
-
e && !
|
|
2019
|
+
e && !Ur(e) && rr("GObj bad instanceof");
|
|
2026
2020
|
let o = ml(e, t, n, r, l);
|
|
2027
2021
|
return o && 0 !== o.length ? o[0] : null;
|
|
2028
2022
|
}
|
|
2029
2023
|
function yl(e, t) {
|
|
2030
|
-
if (e && !
|
|
2024
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return [];
|
|
2031
2025
|
let n = [];
|
|
2032
2026
|
if (Dr(t)) n.push(t);
|
|
2033
2027
|
else if (wr(t)) for (let e in t) t.hasOwnProperty(e) && n.push(e);
|
|
2034
2028
|
else jr(t) && t.forEach(function(t) {
|
|
2035
|
-
if (Dr(t))
|
|
2029
|
+
if (Dr(t)) Pr(t) || n.push(t);
|
|
2036
2030
|
else if (wr(t)) {
|
|
2037
2031
|
let r = Zr(e, t, "id", 0, 0);
|
|
2038
2032
|
r && n.push(r);
|
|
@@ -2077,12 +2071,12 @@ function vl(e, t, n) {
|
|
|
2077
2071
|
else rr("list2options(): case2 not implemented");
|
|
2078
2072
|
return r;
|
|
2079
2073
|
}
|
|
2080
|
-
function
|
|
2074
|
+
function Sl(e, t) {
|
|
2081
2075
|
if (!e) return -1;
|
|
2082
2076
|
for (let n = 0; n < e.length; n++) if (e[n] && e[n].id === t) return n;
|
|
2083
2077
|
return -1;
|
|
2084
2078
|
}
|
|
2085
|
-
function
|
|
2079
|
+
function Ol(e, t, n) {
|
|
2086
2080
|
if (!e || !t) return rr("ERROR: str_in_list() list or str empty"), !1;
|
|
2087
2081
|
let r = e.length;
|
|
2088
2082
|
if (n) {
|
|
@@ -2097,7 +2091,7 @@ function Sl(e, t, n) {
|
|
|
2097
2091
|
function Nl(e, t, n) {
|
|
2098
2092
|
if (!e) return rr("ERROR: strs_in_list() list empty"), !1;
|
|
2099
2093
|
if (!t) return rr("ERROR: strs_in_list() str empty"), !1;
|
|
2100
|
-
for (let r = 0; r < t.length; r++) if (
|
|
2094
|
+
for (let r = 0; r < t.length; r++) if (Ol(e, t[r], n)) return !0;
|
|
2101
2095
|
return !1;
|
|
2102
2096
|
}
|
|
2103
2097
|
function Rl(e, t) {
|
|
@@ -2117,7 +2111,7 @@ function jl(e, t, n) {
|
|
|
2117
2111
|
r || (r = {}, e.__md_iev__ = r), r[t] = n;
|
|
2118
2112
|
}
|
|
2119
2113
|
function Dl(e, t, n, r) {
|
|
2120
|
-
if (!
|
|
2114
|
+
if (!Ur(e)) return rr("gobj is not a GObj"), null;
|
|
2121
2115
|
if (!t) return;
|
|
2122
2116
|
let l = wl(t, n);
|
|
2123
2117
|
l || (l = [], jl(t, n, l));
|
|
@@ -2127,14 +2121,14 @@ function Dl(e, t, n, r) {
|
|
|
2127
2121
|
rr(e);
|
|
2128
2122
|
}
|
|
2129
2123
|
}
|
|
2130
|
-
function
|
|
2131
|
-
if (!
|
|
2124
|
+
function $l(e, t, n, r) {
|
|
2125
|
+
if (!Ur(e)) return rr("gobj is not a GObj"), null;
|
|
2132
2126
|
if (!wr(t)) return rr("kw is not a dict"), null;
|
|
2133
2127
|
let l = wl(t, n);
|
|
2134
2128
|
return l ? 0 === l.length ? (r && rr(`stack empty: ${n}`), null) : l[0] : (r && rr(`stack NOT FOUND: ${n}`), null);
|
|
2135
2129
|
}
|
|
2136
|
-
function
|
|
2137
|
-
return
|
|
2130
|
+
function Al(e, t, n) {
|
|
2131
|
+
return Pr(n) ? Hr(e, t, "__md_iev__`__msg_type__") : ol(e, t, "__md_iev__", "__msg_type__", n), 0;
|
|
2138
2132
|
}
|
|
2139
2133
|
function Il(e, t) {
|
|
2140
2134
|
return Zr(e, t, "__md_iev__`__msg_type__", "", 0);
|
|
@@ -2170,7 +2164,7 @@ function Ll(e, t, n) {
|
|
|
2170
2164
|
]), wr(e[r]) && Ll(e[r], t, n), n = n.slice(0, -l.length);
|
|
2171
2165
|
}
|
|
2172
2166
|
}
|
|
2173
|
-
function
|
|
2167
|
+
function Ul(e, t, n) {
|
|
2174
2168
|
n && (e = ur(e));
|
|
2175
2169
|
let r = nl(null, e, "type", [], 1);
|
|
2176
2170
|
Zr(null, e, "hook", "data", 1);
|
|
@@ -2179,12 +2173,12 @@ function Pl(e, t, n) {
|
|
|
2179
2173
|
"__" !== t.substring(0, 2) && nl(null, o, l, ur(r), 1);
|
|
2180
2174
|
}, t), e;
|
|
2181
2175
|
}
|
|
2182
|
-
function
|
|
2176
|
+
function Pl(e, t, n, r) {
|
|
2183
2177
|
let l = nl(null, nl(null, e, "topics", null, 0), t, null, 0);
|
|
2184
2178
|
if (!l) return rr("jdb_update: topic not found: " + t), null;
|
|
2185
|
-
if (
|
|
2179
|
+
if (Pr(r.id)) return rr("jdb_update: record without id: " + r), sr(r), null;
|
|
2186
2180
|
let o, i = n.split("`"), s = l;
|
|
2187
|
-
for (; (o = i.shift()) && !
|
|
2181
|
+
for (; (o = i.shift()) && !Pr(o) && s;) wr(s) && (s = nl(null, s, e.hook, [], 1)), s = Wl(s, null, o, !1);
|
|
2188
2182
|
if (0 === i.length && s) if (jr(s)) s.push(r);
|
|
2189
2183
|
else if (s.id === r.id) Object.assign(s, r);
|
|
2190
2184
|
else {
|
|
@@ -2196,14 +2190,14 @@ function Ul(e, t, n, r) {
|
|
|
2196
2190
|
function Fl(e, t, n, r) {
|
|
2197
2191
|
let l = nl(null, nl(null, e, "topics", null, 0), t, null, 0);
|
|
2198
2192
|
if (!l) return rr("jdb_delete: topic not found: " + t), null;
|
|
2199
|
-
if (
|
|
2193
|
+
if (Pr(r.id)) return rr("jdb_delete: record without id: " + r), sr(r), null;
|
|
2200
2194
|
let o, i = n.split("`"), s = l;
|
|
2201
|
-
for (; (o = i.shift()) && !
|
|
2195
|
+
for (; (o = i.shift()) && !Pr(o) && s;) wr(s) && (s = nl(null, s, e.hook, null, 0)), s = Wl(s, null, o, !1);
|
|
2202
2196
|
if (0 === i.length && s) if (jr(s)) {
|
|
2203
|
-
let e =
|
|
2197
|
+
let e = Sl(s, r.id);
|
|
2204
2198
|
e >= 0 && s.splice(e, 1);
|
|
2205
2199
|
} else {
|
|
2206
|
-
let t = nl(null, s, e.hook, null, 0), n =
|
|
2200
|
+
let t = nl(null, s, e.hook, null, 0), n = Sl(t, r.id);
|
|
2207
2201
|
n >= 0 && t.splice(n, 1);
|
|
2208
2202
|
}
|
|
2209
2203
|
return l;
|
|
@@ -2548,13 +2542,13 @@ function yo(e, t) {
|
|
|
2548
2542
|
}
|
|
2549
2543
|
function vo(e, t) {
|
|
2550
2544
|
let n = fl(e, gl(ho(e), null, !1), t, !1);
|
|
2551
|
-
0 ===
|
|
2545
|
+
0 === Sr(n) ? bl(ho(e)) : dl(ho(e), n);
|
|
2552
2546
|
}
|
|
2553
|
-
function
|
|
2547
|
+
function So(e, t) {
|
|
2554
2548
|
let n = gl(ho(e), null, !1), r = {};
|
|
2555
2549
|
return n && wr(n) && (r = cl(e, n, t, !1)), r;
|
|
2556
2550
|
}
|
|
2557
|
-
function
|
|
2551
|
+
function Oo(e) {
|
|
2558
2552
|
if (jr(e) && 1 === Nr(e)) {
|
|
2559
2553
|
let t = e[0];
|
|
2560
2554
|
return Jr(t, "size") ? t.size : 1;
|
|
@@ -2565,7 +2559,7 @@ function No(e, t) {
|
|
|
2565
2559
|
if (Dr(t)) {
|
|
2566
2560
|
if (-1 === t.indexOf("^")) {
|
|
2567
2561
|
let n, r, l = e.fkey;
|
|
2568
|
-
if (1 !==
|
|
2562
|
+
if (1 !== Sr(l)) return rr("bad fkey 1"), rr(e), rr(t), null;
|
|
2569
2563
|
for (const e of Object.keys(l)) {
|
|
2570
2564
|
n = e, r = l[e];
|
|
2571
2565
|
break;
|
|
@@ -2599,7 +2593,7 @@ function wo(e, t) {
|
|
|
2599
2593
|
if (Dr(t)) {
|
|
2600
2594
|
if (-1 === t.indexOf("^")) {
|
|
2601
2595
|
let n, r = e.hook;
|
|
2602
|
-
if (1 !==
|
|
2596
|
+
if (1 !== Sr(r)) return rr("bad hook 1"), rr(e), rr(t), null;
|
|
2603
2597
|
for (let e of Object.keys(r)) {
|
|
2604
2598
|
n = e, r[e];
|
|
2605
2599
|
break;
|
|
@@ -2644,7 +2638,7 @@ var jo = [
|
|
|
2644
2638
|
"stats",
|
|
2645
2639
|
"rstats",
|
|
2646
2640
|
"pstats"
|
|
2647
|
-
],
|
|
2641
|
+
], $o = [
|
|
2648
2642
|
"hook",
|
|
2649
2643
|
"fkey",
|
|
2650
2644
|
"enum",
|
|
@@ -2673,7 +2667,7 @@ var jo = [
|
|
|
2673
2667
|
"coordinates",
|
|
2674
2668
|
"gbuffer"
|
|
2675
2669
|
];
|
|
2676
|
-
function
|
|
2670
|
+
function Ao(e) {
|
|
2677
2671
|
let t = {
|
|
2678
2672
|
name: e.id,
|
|
2679
2673
|
header: e.header,
|
|
@@ -2692,7 +2686,7 @@ function $o(e) {
|
|
|
2692
2686
|
if (!e.flag) return t;
|
|
2693
2687
|
for (let n = 0; n < e.flag.length; n++) {
|
|
2694
2688
|
let r = e.flag[n];
|
|
2695
|
-
if (
|
|
2689
|
+
if (Ol($o, r)) {
|
|
2696
2690
|
switch (r) {
|
|
2697
2691
|
case "enum":
|
|
2698
2692
|
t.enum_list = e.enum;
|
|
@@ -2706,7 +2700,7 @@ function $o(e) {
|
|
|
2706
2700
|
case "file": t.is_file = !0;
|
|
2707
2701
|
}
|
|
2708
2702
|
t.type = r;
|
|
2709
|
-
} else if (
|
|
2703
|
+
} else if (Ol(Do, r)) switch (r) {
|
|
2710
2704
|
case "writable":
|
|
2711
2705
|
t.is_writable = !0;
|
|
2712
2706
|
break;
|
|
@@ -2737,9 +2731,9 @@ function Io(e, t) {
|
|
|
2737
2731
|
let e = t.split(".");
|
|
2738
2732
|
for (let t = 0; t < e.length; t++) {
|
|
2739
2733
|
let r = e[t];
|
|
2740
|
-
if (
|
|
2741
|
-
else if (
|
|
2742
|
-
else if (
|
|
2734
|
+
if (Ol(jo, r)) n.real_type || (n.real_type = r);
|
|
2735
|
+
else if (Ol($o, r)) n.type || (n.type = r);
|
|
2736
|
+
else if (Ol(Do, r)) switch (r) {
|
|
2743
2737
|
case "writable":
|
|
2744
2738
|
n.is_writable = !0;
|
|
2745
2739
|
break;
|
|
@@ -2751,7 +2745,7 @@ function Io(e, t) {
|
|
|
2751
2745
|
}
|
|
2752
2746
|
}
|
|
2753
2747
|
n.real_type || (n.real_type = "string");
|
|
2754
|
-
} else wr(t) ? (n =
|
|
2748
|
+
} 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);
|
|
2755
2749
|
return n.type || (n.type = n.real_type), n;
|
|
2756
2750
|
}
|
|
2757
2751
|
function ko(e, t) {
|
|
@@ -2767,17 +2761,17 @@ var Co = [
|
|
|
2767
2761
|
N(y.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
2768
2762
|
N(y.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
2769
2763
|
N(y.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
2770
|
-
|
|
2764
|
+
O()
|
|
2771
2765
|
], Lo = {
|
|
2772
2766
|
periodic: !1,
|
|
2773
2767
|
msec: 0,
|
|
2774
2768
|
timer_id: -1
|
|
2775
|
-
},
|
|
2776
|
-
function
|
|
2769
|
+
}, Uo = null;
|
|
2770
|
+
function Po(e, t, n, r) {
|
|
2777
2771
|
let l = e.priv, o = l.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
2778
2772
|
return l.periodic && l.msec > 0 ? l.timer_id = setTimeout(function() {
|
|
2779
2773
|
yn(e, "EV_TIMEOUT", {}, e);
|
|
2780
|
-
}, l.msec) : l.timer_id = -1, kt(e) ? yn(
|
|
2774
|
+
}, l.msec) : l.timer_id = -1, kt(e) ? yn(At(e), o, {}, e) : Cn(e, o, {}), l.periodic || -1 !== l.timer_id || ht(e) && gt(e), 0;
|
|
2781
2775
|
}
|
|
2782
2776
|
var Fo = {
|
|
2783
2777
|
mt_create: function(e) {
|
|
@@ -2806,15 +2800,15 @@ var Fo = {
|
|
|
2806
2800
|
};
|
|
2807
2801
|
function Go() {
|
|
2808
2802
|
return function(e) {
|
|
2809
|
-
if (
|
|
2803
|
+
if (Uo) return rr(`GClass ALREADY created: ${e}`), -1;
|
|
2810
2804
|
const t = [["ST_IDLE", [[
|
|
2811
2805
|
"EV_TIMEOUT",
|
|
2812
|
-
|
|
2806
|
+
Po,
|
|
2813
2807
|
null
|
|
2814
2808
|
]]]];
|
|
2815
|
-
return (
|
|
2816
|
-
["EV_TIMEOUT",
|
|
2817
|
-
["EV_TIMEOUT_PERIODIC",
|
|
2809
|
+
return (Uo = Ae(e, [
|
|
2810
|
+
["EV_TIMEOUT", P.EVF_OUTPUT_EVENT],
|
|
2811
|
+
["EV_TIMEOUT_PERIODIC", P.EVF_OUTPUT_EVENT],
|
|
2818
2812
|
[0, 0]
|
|
2819
2813
|
], t, Fo, 0, Co, Lo, 0, 0, 0, C.gcflag_manual_start)) ? 0 : -1;
|
|
2820
2814
|
}("C_TIMER");
|
|
@@ -2847,7 +2841,7 @@ var Ko = [
|
|
|
2847
2841
|
N(y.DTP_POINTER, "trace_ievent_callback", 0, null, "Where the traffic trace goes (C_IEVENT_CLI levels ievents/ievents2); console when null"),
|
|
2848
2842
|
N(y.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
2849
2843
|
N(y.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
2850
|
-
|
|
2844
|
+
O()
|
|
2851
2845
|
], xo = { gobj_timer: null }, Yo = null;
|
|
2852
2846
|
function Bo(e, t, n, r) {
|
|
2853
2847
|
let l = zt(e, t);
|
|
@@ -2859,7 +2853,7 @@ function Jo(e) {
|
|
|
2859
2853
|
return "true" === t || "set" === t || "false" !== t && "reset" !== t && ("" === t || isNaN(Number(t)) ? null : !!Number(t));
|
|
2860
2854
|
}
|
|
2861
2855
|
function qo() {
|
|
2862
|
-
return `${Nt()}^${
|
|
2856
|
+
return `${Nt()}^${Ot()}`;
|
|
2863
2857
|
}
|
|
2864
2858
|
function Ho(e, t, n, r) {
|
|
2865
2859
|
return Cn(e, t, n), 0;
|
|
@@ -2945,7 +2939,7 @@ function zo() {
|
|
|
2945
2939
|
Ho,
|
|
2946
2940
|
null
|
|
2947
2941
|
]]]];
|
|
2948
|
-
return (Yo =
|
|
2942
|
+
return (Yo = Ae(e, [["EV_TIMEOUT_PERIODIC", P.EVF_OUTPUT_EVENT | P.EVF_NO_WARN_SUBS], [0, 0]], t, Qo, 0, Ko, xo, 0, 0, 0, 0)) ? 0 : -1;
|
|
2949
2943
|
}("C_YUNO");
|
|
2950
2944
|
}
|
|
2951
2945
|
var Xo = "ievent_gate_stack", Zo = [
|
|
@@ -2964,7 +2958,7 @@ var Xo = "ievent_gate_stack", Zo = [
|
|
|
2964
2958
|
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"),
|
|
2965
2959
|
N(y.DTP_INTEGER, "timeout_idack", v.SDF_RD, "5000", "timeout waiting idAck"),
|
|
2966
2960
|
N(y.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
2967
|
-
|
|
2961
|
+
O()
|
|
2968
2962
|
], ei = [
|
|
2969
2963
|
["ievents", "Trace inter-events with metadata of kw"],
|
|
2970
2964
|
["ievents2", "Trace inter-events with full kw"],
|
|
@@ -3002,7 +2996,7 @@ function li(e) {
|
|
|
3002
2996
|
data: n.data
|
|
3003
2997
|
}, e);
|
|
3004
2998
|
}, n.onclose = (n) => {
|
|
3005
|
-
Ct(e) || (Zt(
|
|
2999
|
+
Ct(e) || (Zt(St(), "browser_beforeunload") ? lr("Close websocket by unload page") : yn(e, "EV_ON_CLOSE", {
|
|
3006
3000
|
url: t,
|
|
3007
3001
|
e: n
|
|
3008
3002
|
}, e));
|
|
@@ -3036,7 +3030,7 @@ function ai(e, t, n, r) {
|
|
|
3036
3030
|
return function(e, t) {
|
|
3037
3031
|
let n = e.priv, r = JSON.stringify(t);
|
|
3038
3032
|
if (ti(e)) {
|
|
3039
|
-
let n = tn(e, "url"), l = wt(
|
|
3033
|
+
let n = tn(e, "url"), l = wt(St()) + " ==> " + n, o = zt(St(), "trace_ievent_callback");
|
|
3040
3034
|
o ? o(l, t, 1, r.length) : ii(0, l, t);
|
|
3041
3035
|
}
|
|
3042
3036
|
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return lr(`${Dt(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
@@ -3047,27 +3041,27 @@ function ai(e, t, n, r) {
|
|
|
3047
3041
|
}
|
|
3048
3042
|
return 0;
|
|
3049
3043
|
}(e, function(e, t) {
|
|
3050
|
-
return
|
|
3044
|
+
return Pr(e) ? (rr("iev_create() event NULL"), null) : new si(e, t);
|
|
3051
3045
|
}(t, n));
|
|
3052
3046
|
}
|
|
3053
3047
|
function ui(e, t, n) {
|
|
3054
|
-
return
|
|
3048
|
+
return Pr(n) && (n = tn(e, "wanted_yuno_service")), {
|
|
3055
3049
|
dst_yuno: tn(e, "wanted_yuno_name"),
|
|
3056
3050
|
dst_role: tn(e, "wanted_yuno_role"),
|
|
3057
3051
|
dst_service: n,
|
|
3058
|
-
src_yuno:
|
|
3052
|
+
src_yuno: Ot(),
|
|
3059
3053
|
src_role: Nt(),
|
|
3060
3054
|
src_service: t,
|
|
3061
3055
|
host: ro()
|
|
3062
3056
|
};
|
|
3063
3057
|
}
|
|
3064
3058
|
function _i(e) {
|
|
3065
|
-
let t = e.priv, n = vt(
|
|
3066
|
-
i && i.length || (i = zt(
|
|
3059
|
+
let t = e.priv, n = vt(St()), r = tn(St(), "yuno_version"), l = tn(St(), "yuno_release"), o = tn(St(), "yuno_tag"), i = zt(e, "required_services");
|
|
3060
|
+
i && i.length || (i = zt(St(), "required_services"));
|
|
3067
3061
|
let s = {
|
|
3068
3062
|
yuno_role: Nt(),
|
|
3069
3063
|
yuno_id: Rt(),
|
|
3070
|
-
yuno_name:
|
|
3064
|
+
yuno_name: Ot(),
|
|
3071
3065
|
yuno_tag: o,
|
|
3072
3066
|
yuno_version: r,
|
|
3073
3067
|
yuno_release: l,
|
|
@@ -3076,21 +3070,21 @@ function _i(e) {
|
|
|
3076
3070
|
pid: 0,
|
|
3077
3071
|
watcher_pid: 0,
|
|
3078
3072
|
jwt: tn(e, "jwt"),
|
|
3079
|
-
username: tn(
|
|
3073
|
+
username: tn(St(), "__username__"),
|
|
3080
3074
|
launch_id: 0,
|
|
3081
|
-
yuno_startdate: tn(
|
|
3075
|
+
yuno_startdate: tn(St(), "start_date"),
|
|
3082
3076
|
id: ro(),
|
|
3083
3077
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
3084
3078
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
3085
3079
|
required_services: i
|
|
3086
3080
|
};
|
|
3087
|
-
return Dl(e, s, Xo, ui(e, wt(
|
|
3081
|
+
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);
|
|
3088
3082
|
}
|
|
3089
3083
|
function ci(e, t) {
|
|
3090
|
-
if (
|
|
3084
|
+
if (Pr(t.event)) return -1;
|
|
3091
3085
|
let n = {}, r = t.__global__, l = t.__config__, o = t.__filter__, i = t.__service__, s = t.subscriber;
|
|
3092
3086
|
l && (n.__config__ = l), r && (n.__global__ = r), o && (n.__filter__ = o);
|
|
3093
|
-
return Dl(e, n, Xo, ui(e, wt(s), i)),
|
|
3087
|
+
return Dl(e, n, Xo, ui(e, wt(s), i)), Al(e, n, "__subscribing__"), ai(e, t.event, n);
|
|
3094
3088
|
}
|
|
3095
3089
|
function fi(e, t, n, r) {
|
|
3096
3090
|
let l = e.priv;
|
|
@@ -3128,7 +3122,7 @@ function bi(e, t, n, r) {
|
|
|
3128
3122
|
function pi(e, t, n, r) {
|
|
3129
3123
|
let l = e.priv;
|
|
3130
3124
|
Wo(l.gobj_timer);
|
|
3131
|
-
let o =
|
|
3125
|
+
let o = $l(e, n, Xo, !0), i = Zr(e, o, "src_yuno", ""), s = Zr(e, o, "src_role", ""), a = Zr(e, o, "src_service", "");
|
|
3132
3126
|
un(e, "remote_yuno_name", i), un(e, "remote_yuno_role", s), un(e, "remote_yuno_service", a);
|
|
3133
3127
|
let u = zr(e, n, "result", -1, 0), _ = Zr(e, n, "comment", "", 0), c = Zr(e, n, "username", "", 0), f = nl(e, n, "services_roles", {});
|
|
3134
3128
|
if (u < 0) {
|
|
@@ -3142,7 +3136,7 @@ function pi(e, t, n, r) {
|
|
|
3142
3136
|
remote_yuno_role: s,
|
|
3143
3137
|
remote_yuno_service: a
|
|
3144
3138
|
};
|
|
3145
|
-
kt(e) ? yn(
|
|
3139
|
+
kt(e) ? yn(At(e), "EV_ON_ID_NAK", t, e) : Cn(e, "EV_ON_ID_NAK", t);
|
|
3146
3140
|
} else {
|
|
3147
3141
|
if (_n(e, "ST_SESSION"), l.inside_on_open = !0, l.retry_ms = 0, !l.inform_on_close) {
|
|
3148
3142
|
l.inform_on_close = !0;
|
|
@@ -3153,10 +3147,10 @@ function pi(e, t, n, r) {
|
|
|
3153
3147
|
remote_yuno_service: a,
|
|
3154
3148
|
services_roles: f
|
|
3155
3149
|
};
|
|
3156
|
-
kt(e) ? yn(
|
|
3150
|
+
kt(e) ? yn(At(e), "EV_ON_OPEN", t, e) : Cn(e, "EV_ON_OPEN", t);
|
|
3157
3151
|
}
|
|
3158
3152
|
l.inside_on_open = !1, function(e) {
|
|
3159
|
-
let t =
|
|
3153
|
+
let t = An(e, null, null, null);
|
|
3160
3154
|
for (let n = 0; n < t.length; n++) ci(e, t[n]);
|
|
3161
3155
|
}(e);
|
|
3162
3156
|
}
|
|
@@ -3181,28 +3175,28 @@ function mi(e, t, n, r) {
|
|
|
3181
3175
|
} : (rr("parsing inter_event: kw not a json object"), null) : (rr("parsing inter_kw: no kw"), null);
|
|
3182
3176
|
}(0, n.data);
|
|
3183
3177
|
if (ti(e)) {
|
|
3184
|
-
let e = wt(
|
|
3178
|
+
let e = wt(St()) + " <== " + l, t = n.data.length, r = zt(St(), "trace_ievent_callback");
|
|
3185
3179
|
r ? r(e, o, 2, t) : ii(0, e, o);
|
|
3186
3180
|
}
|
|
3187
3181
|
let i = o.event, s = o.kw;
|
|
3188
3182
|
if ("ST_SESSION" !== cn(e)) {
|
|
3189
|
-
if (dn(e, i,
|
|
3183
|
+
if (dn(e, i, P.EVF_PUBLIC_EVENT)) {
|
|
3190
3184
|
if (!(yn(e, i, s, e) < 0)) return 0;
|
|
3191
3185
|
} else rr(`${Dt(e)}: event UNKNOWN in not-session state ${i}`);
|
|
3192
3186
|
return oi(e), -1;
|
|
3193
3187
|
}
|
|
3194
3188
|
o = null;
|
|
3195
|
-
let a = Il(e, s), u =
|
|
3189
|
+
let a = Il(e, s), u = $l(e, s, Xo), _ = Zr(e, u, "dst_role", "");
|
|
3196
3190
|
if (_.toLowerCase() !== Nt().toLowerCase()) return rr(`"It's not my role, dst_role: ${_}, my_role: ${Nt()}`), 0;
|
|
3197
3191
|
let c = Zr(e, u, "dst_service", "");
|
|
3198
3192
|
if ("__subscribing__" === a) return -1;
|
|
3199
3193
|
if ("__unsubscribing__" === a) return -1;
|
|
3200
|
-
if (dn(e, i,
|
|
3201
|
-
if (!
|
|
3194
|
+
if (dn(e, i, P.EVF_PUBLIC_EVENT)) return yn(e, i, s, e), 0;
|
|
3195
|
+
if (!Pr(c)) {
|
|
3202
3196
|
let t = xe(c, !1);
|
|
3203
|
-
return t ? dn(t, i,
|
|
3197
|
+
return t ? dn(t, i, P.EVF_PUBLIC_EVENT) ? (yn(t, i, s, e), 0) : (rr(`${Dt(e)}: Service found but no event or not public, service '${Dt(t)}', ev '${i}'`), -1) : (lr(`${Dt(e)}: event for a service that is gone, DROPPED: service '${c}', ev '${i}'`), 0);
|
|
3204
3198
|
}
|
|
3205
|
-
return kt(e) ? yn(
|
|
3199
|
+
return kt(e) ? yn(At(e), i, s, e) : Cn(e, i, s), 0;
|
|
3206
3200
|
}
|
|
3207
3201
|
function Ei(e, t, n, r) {
|
|
3208
3202
|
return 0;
|
|
@@ -3244,29 +3238,29 @@ var Ti = {
|
|
|
3244
3238
|
mt_stats: function(e, t, n, r) {
|
|
3245
3239
|
if ("ST_SESSION" !== cn(e)) return rr("Not in session"), null;
|
|
3246
3240
|
n || (n = {});
|
|
3247
|
-
let l = ui(e, wt(r), Zr(e, n, "service", null, 0)), o = nl(e, n, "__md_stats__", null,
|
|
3241
|
+
let l = ui(e, wt(r), Zr(e, n, "service", null, 0)), o = nl(e, n, "__md_stats__", null, Pn.KW_EXTRACT);
|
|
3248
3242
|
return o || (o = {}), Dl(e, n, "stats_stack", {
|
|
3249
3243
|
stats: t,
|
|
3250
3244
|
kw: o
|
|
3251
|
-
}), Dl(e, n, Xo, l), n.__stats__ = t,
|
|
3245
|
+
}), Dl(e, n, Xo, l), n.__stats__ = t, Al(e, n, "__stats__"), ai(e, "EV_MT_STATS", n, r), null;
|
|
3252
3246
|
},
|
|
3253
3247
|
mt_command_parser: function(e, t, n, r) {
|
|
3254
3248
|
if ("ST_SESSION" !== cn(e)) return rr("Not in session"), null;
|
|
3255
3249
|
n || (n = {});
|
|
3256
|
-
let l = ui(e, wt(r), Zr(e, n, "service", "", 0)), o = nl(e, n, "__md_command__", null,
|
|
3250
|
+
let l = ui(e, wt(r), Zr(e, n, "service", "", 0)), o = nl(e, n, "__md_command__", null, Pn.KW_EXTRACT);
|
|
3257
3251
|
return o || (o = {}), Dl(e, n, "command_stack", {
|
|
3258
3252
|
command: t,
|
|
3259
3253
|
kw: o
|
|
3260
|
-
}), Dl(e, n, Xo, l), n.__command__ = t,
|
|
3254
|
+
}), Dl(e, n, Xo, l), n.__command__ = t, Al(e, n, "__command__"), ai(e, "EV_MT_COMMAND", n, r), null;
|
|
3261
3255
|
},
|
|
3262
3256
|
mt_inject_event: function(e, t, n, r) {
|
|
3263
3257
|
if ("ST_SESSION" !== cn(e)) return window.console.error("Not in session"), -1;
|
|
3264
|
-
if (n || (n = {}),
|
|
3258
|
+
if (n || (n = {}), $l(e, n, Xo));
|
|
3265
3259
|
else {
|
|
3266
3260
|
let l = ui(e, wt(r), Zr(e, n, "__service__", 0, 0));
|
|
3267
3261
|
pr(n, "__service__"), Dl(e, n, "__message__", t), Dl(e, n, Xo, l);
|
|
3268
3262
|
}
|
|
3269
|
-
return
|
|
3263
|
+
return Al(e, n, "__message__"), ai(e, t, n, r);
|
|
3270
3264
|
},
|
|
3271
3265
|
mt_subscription_added: function(e, t) {
|
|
3272
3266
|
let n = e.priv;
|
|
@@ -3276,10 +3270,10 @@ var Ti = {
|
|
|
3276
3270
|
let n = e.priv;
|
|
3277
3271
|
if ("ST_SESSION" !== cn(e) || !n.websocket) return 0;
|
|
3278
3272
|
if (n.inside_on_open) return 0;
|
|
3279
|
-
if (
|
|
3273
|
+
if (Pr(t.event)) return 0;
|
|
3280
3274
|
let r = {}, l = t.__global__, o = t.__config__, i = t.__filter__, s = t.__service__, a = t.subscriber;
|
|
3281
3275
|
o && (r.__config__ = o), l && (r.__global__ = l), i && (r.__filter__ = i);
|
|
3282
|
-
return Dl(e, r, Xo, ui(e, wt(a), s)),
|
|
3276
|
+
return Dl(e, r, Xo, ui(e, wt(a), s)), Al(e, r, "__unsubscribing__"), ai(e, t.event, r, e);
|
|
3283
3277
|
}
|
|
3284
3278
|
};
|
|
3285
3279
|
function yi() {
|
|
@@ -3364,20 +3358,20 @@ function yi() {
|
|
|
3364
3358
|
]],
|
|
3365
3359
|
[null, null]
|
|
3366
3360
|
];
|
|
3367
|
-
return (ri =
|
|
3368
|
-
["EV_ON_MESSAGE",
|
|
3369
|
-
["EV_IDENTITY_CARD_ACK",
|
|
3370
|
-
["EV_ON_ID_NAK",
|
|
3371
|
-
["EV_MT_STATS",
|
|
3372
|
-
["EV_MT_COMMAND",
|
|
3373
|
-
["EV_ON_OPEN",
|
|
3374
|
-
["EV_ON_CLOSE",
|
|
3375
|
-
["EV_ON_OPEN_ERROR",
|
|
3361
|
+
return (ri = Ae(e, [
|
|
3362
|
+
["EV_ON_MESSAGE", P.EVF_OUTPUT_EVENT],
|
|
3363
|
+
["EV_IDENTITY_CARD_ACK", P.EVF_PUBLIC_EVENT],
|
|
3364
|
+
["EV_ON_ID_NAK", P.EVF_PUBLIC_EVENT | P.EVF_OUTPUT_EVENT],
|
|
3365
|
+
["EV_MT_STATS", P.EVF_PUBLIC_EVENT],
|
|
3366
|
+
["EV_MT_COMMAND", P.EVF_PUBLIC_EVENT],
|
|
3367
|
+
["EV_ON_OPEN", P.EVF_OUTPUT_EVENT | P.EVF_NO_WARN_SUBS],
|
|
3368
|
+
["EV_ON_CLOSE", P.EVF_OUTPUT_EVENT | P.EVF_NO_WARN_SUBS],
|
|
3369
|
+
["EV_ON_OPEN_ERROR", P.EVF_OUTPUT_EVENT | P.EVF_NO_WARN_SUBS],
|
|
3376
3370
|
["EV_TIMEOUT", 0],
|
|
3377
3371
|
[null, 0]
|
|
3378
3372
|
], t, Ti, 0, Zo, ni, 0, 0, ei, C.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3379
3373
|
}("C_IEVENT_CLI");
|
|
3380
3374
|
}
|
|
3381
|
-
export { k as GObj, N as SDATA, D as SDATAAUTHZ, R as SDATACM, w as SDATACM2,
|
|
3375
|
+
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 };
|
|
3382
3376
|
|
|
3383
3377
|
//# sourceMappingURL=gobj-js.es.min.js.map
|