@telia-ace/widget-core 1.0.21-experimental.9 → 1.0.21

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/index.js CHANGED
@@ -1,61 +1,63 @@
1
- var V = Object.defineProperty, j = Object.defineProperties;
2
- var z = Object.getOwnPropertyDescriptors;
3
- var S = Object.getOwnPropertySymbols;
4
- var Q = Object.prototype.hasOwnProperty, q = Object.prototype.propertyIsEnumerable;
5
- var D = (s, t, e) => t in s ? V(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, y = (s, t) => {
1
+ var q = Object.defineProperty, z = Object.defineProperties;
2
+ var Q = Object.getOwnPropertyDescriptors;
3
+ var H = Object.getOwnPropertySymbols;
4
+ var F = Object.prototype.hasOwnProperty, G = Object.prototype.propertyIsEnumerable;
5
+ var C = (n, t, e) => t in n ? q(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, x = (n, t) => {
6
6
  for (var e in t || (t = {}))
7
- Q.call(t, e) && D(s, e, t[e]);
8
- if (S)
9
- for (var e of S(t))
10
- q.call(t, e) && D(s, e, t[e]);
11
- return s;
12
- }, _ = (s, t) => j(s, z(t));
13
- import { bootstrapImplementation as F, ConfigurationApi as G } from "@webprovisions/bootstrapping";
14
- import { selectImplementations as K, createConfigurationApi as W, version as J, Environment as U, Implementation as X, Plugin as Y, WidgetType as Z } from "@webprovisions/platform";
15
- import { uuid as O, Logger as k } from "@telia-ace/widget-utilities";
16
- class yt {
7
+ F.call(t, e) && C(n, e, t[e]);
8
+ if (H)
9
+ for (var e of H(t))
10
+ G.call(t, e) && C(n, e, t[e]);
11
+ return n;
12
+ }, B = (n, t) => z(n, Q(t));
13
+ var u = (n, t, e) => (C(n, typeof t != "symbol" ? t + "" : t, e), e);
14
+ import { bootstrapImplementation as K, ConfigurationApi as U } from "@webprovisions/bootstrapping";
15
+ import { selectImplementations as W, createConfigurationApi as Y, Environment as J, version as X, Implementation as Z, Plugin as tt, WidgetType as et } from "@webprovisions/platform";
16
+ import { uuid as k, Logger as $ } from "@telia-ace/widget-utilities";
17
+ class xt {
17
18
  constructor(t) {
19
+ u(this, "events");
18
20
  const { events: e } = t.get("$widget");
19
21
  this.events = e.createChild(this);
20
22
  }
21
- action(t, e, n) {
22
- this.events.dispatch("data:action", { action: e, value: n, target: t }, { bubbles: !0 });
23
+ action(t, e, s) {
24
+ this.events.dispatch("data:action", { action: e, value: s, target: t }, { bubbles: !0 });
23
25
  }
24
26
  subscribe(t, e) {
25
27
  return this.events.subscribe(
26
28
  "data:action",
27
- (n, { action: i, value: r, target: c }) => t === c && e(t, i, r)
29
+ (s, { action: i, value: c, target: o }) => t === o && e(t, i, c)
28
30
  );
29
31
  }
30
32
  }
31
- const xt = (s, t, e = {}) => F(
32
- s,
33
- s.bindings,
33
+ const wt = (n, t, e = {}) => K(
34
+ n,
35
+ n.bindings,
34
36
  () => {
35
- const n = s.container.get("$runtimecfg").map((i) => {
36
- const r = i[0];
37
- if (typeof r == "function")
38
- return r;
39
- if (K(r)(s))
37
+ const s = n.container.get("$runtimecfg").map((i) => {
38
+ const c = i[0];
39
+ if (typeof c == "function")
40
+ return c;
41
+ if (W(c)(n))
40
42
  return i[1];
41
43
  }).filter((i) => !!i);
42
- return (t ? [t] : []).concat(n);
44
+ return (t ? [t] : []).concat(s);
43
45
  },
44
46
  e.rootElementResolver || (() => document.body)
45
- ), tt = (s) => {
47
+ ), st = (n) => {
46
48
  const t = [];
47
49
  return [
48
- (n, i) => {
49
- t.push(s.subscribe(n, i));
50
+ (s, i) => {
51
+ t.push(n.subscribe(s, i));
50
52
  },
51
53
  () => {
52
- t.forEach((n) => {
53
- n();
54
+ t.forEach((s) => {
55
+ s();
54
56
  });
55
57
  }
56
58
  ];
57
59
  };
58
- class N {
60
+ class R {
59
61
  constructor(t, e = []) {
60
62
  this.platform = t, this.rules = e;
61
63
  }
@@ -69,30 +71,33 @@ class N {
69
71
  return this.rules.push({ id: t }), this;
70
72
  }
71
73
  select() {
72
- return new et(this.platform, this);
74
+ return new nt(this.platform, this);
73
75
  }
74
76
  }
75
- class H {
76
- constructor(t, e, n) {
77
- this.platform = t, this.node = e, this.actions = new P(
77
+ class V {
78
+ constructor(t, e, s) {
79
+ u(this, "actions");
80
+ u(this, "subscribe");
81
+ u(this, "unsubscribe");
82
+ this.platform = t, this.node = e, this.actions = new A(
78
83
  t,
79
- new N(t).withId(e.id),
80
- n
84
+ new R(t).withId(e.id),
85
+ s
81
86
  );
82
- const [i, r] = tt(this.platform.events);
83
- this.subscribe = i, this.unsubscribe = r;
87
+ const [i, c] = st(this.platform.events);
88
+ this.subscribe = i, this.unsubscribe = c;
84
89
  }
85
90
  properties(t) {
86
91
  return t && this.node.touchProperties((e) => t(e)), this.node.attributes.properties;
87
92
  }
88
93
  context(t) {
89
- return t && this.subscribe("components:context-changed", (e, { node: n }) => {
90
- n === this.node && t(this.node.attributes.context);
94
+ return t && this.subscribe("components:context-changed", (e, { node: s }) => {
95
+ s === this.node && t(this.node.attributes.context);
91
96
  }), this.node.attributes.context;
92
97
  }
93
98
  layout(t) {
94
- return t && this.subscribe("components:layout-changed", (e, { node: n }) => {
95
- n === this.node && t(this.node.attributes.layout);
99
+ return t && this.subscribe("components:layout-changed", (e, { node: s }) => {
100
+ s === this.node && t(this.node.attributes.layout);
96
101
  }), this.node.attributes.layout;
97
102
  }
98
103
  writeProperties(t, e) {
@@ -108,9 +113,11 @@ class H {
108
113
  this.unsubscribe(), this.actions.dispose();
109
114
  }
110
115
  }
111
- class et {
112
- constructor(t, e, n = !0) {
113
- this.platform = t, this.target = e, this.clearOnDispose = n, this.removes = [], this.actions = new P(this.platform, this.target);
116
+ class nt {
117
+ constructor(t, e, s = !0) {
118
+ u(this, "actions");
119
+ u(this, "removes", []);
120
+ this.platform = t, this.target = e, this.clearOnDispose = s, this.actions = new A(this.platform, this.target);
114
121
  }
115
122
  writeProperties(t, e) {
116
123
  this.removes.push(
@@ -148,62 +155,63 @@ class et {
148
155
  }), this.actions.dispose();
149
156
  }
150
157
  }
151
- const st = (s, t, e) => {
152
- const n = s.concat(), i = (r, c, a) => {
153
- let u = !0;
154
- if (n.length) {
155
- const h = n.shift(), o = (p, l) => (u = !1, i(p, Object.assign({}, c, l), a));
156
- return Promise.resolve(h(r, o, a)).then((p) => _(y({}, p), {
157
- cancelled: u
158
+ const it = (n, t, e) => {
159
+ const s = n.concat(), i = (c, o, h) => {
160
+ let l = !0;
161
+ if (s.length) {
162
+ const a = s.shift(), r = (p, d) => (l = !1, i(p, Object.assign({}, o, d), h));
163
+ return Promise.resolve(a(c, r, h)).then((p) => B(x({}, p), {
164
+ cancelled: l
158
165
  }));
159
166
  }
160
- return Promise.resolve({ data: r, cancelled: !1, options: c });
167
+ return Promise.resolve({ data: c, cancelled: !1, options: o });
161
168
  };
162
169
  return i(t, {}, e);
163
170
  };
164
- class P {
165
- constructor(t, e, n) {
166
- this.platform = t, this.target = e, this.ns = n, this.subscriptions = [], this.create = this.create.bind(this);
171
+ class A {
172
+ constructor(t, e, s) {
173
+ u(this, "subscriptions", []);
174
+ this.platform = t, this.target = e, this.ns = s, this.create = this.create.bind(this);
167
175
  }
168
176
  create(t, e = () => {
169
177
  }) {
170
- const n = {
178
+ const s = {
171
179
  key: t,
172
180
  fn: e,
173
181
  target: this.target,
174
182
  ns: this.ns
175
183
  };
176
- this.platform.actionsState.handlers.push(n);
184
+ this.platform.actionsState.handlers.push(s);
177
185
  const i = () => {
178
- const r = this.platform.actionsState.handlers.indexOf(n);
179
- r > -1 && this.platform.actionsState.handlers.splice(r, 1);
186
+ const c = this.platform.actionsState.handlers.indexOf(s);
187
+ c > -1 && this.platform.actionsState.handlers.splice(c, 1);
180
188
  };
181
189
  return this.subscriptions.push(i), i;
182
190
  }
183
191
  dispatch(t, e) {
184
- const n = this.platform.nodes.all.concat(
192
+ const s = this.platform.nodes.all.concat(
185
193
  this.platform.nodes.detached
186
- ), i = {}, r = this.platform.actionsState.handlers.filter(
187
- (c) => c.key === t && (!c.ns || !this.ns || c.ns === this.ns)
194
+ ), i = {}, c = this.platform.actionsState.handlers.filter(
195
+ (o) => o.key === t && (!o.ns || !this.ns || o.ns === this.ns)
188
196
  );
189
197
  return Promise.all(
190
- r.map((c) => {
191
- const a = n.filter(
192
- (h) => c.target.match(h) && this.target.match(h)
193
- ), u = this.platform.actionsState.watchers.filter((h) => h.key === t && (!h.ns || !this.ns || h.ns === this.ns) && a.some((o) => h.target.match(o))).map((h) => h.fn);
198
+ c.map((o) => {
199
+ const h = s.filter(
200
+ (a) => o.target.match(a) && this.target.match(a)
201
+ ), l = this.platform.actionsState.watchers.filter((a) => a.key === t && (!a.ns || !this.ns || a.ns === this.ns) && h.some((r) => a.target.match(r))).map((a) => a.fn);
194
202
  return Promise.all(
195
- a.map((h) => {
196
- const o = new H(
203
+ h.map((a) => {
204
+ const r = new V(
197
205
  this.platform,
198
- h,
206
+ a,
199
207
  this.ns
200
208
  );
201
- return st(u, e, o).then((p) => {
202
- const { data: l = {}, options: d, cancelled: b } = p;
209
+ return it(l, e, r).then((p) => {
210
+ const { data: d = {}, options: f, cancelled: g } = p;
203
211
  return Promise.resolve(
204
- b ? {} : c.fn(l, d, o)
205
- ).then((g) => {
206
- i[h.id] = g;
212
+ g ? {} : o.fn(d, f, r)
213
+ ).then((y) => {
214
+ i[a.id] = y;
207
215
  });
208
216
  });
209
217
  })
@@ -212,38 +220,47 @@ class P {
212
220
  ).then(() => i);
213
221
  }
214
222
  watch(t, e) {
215
- let n = t, i = this.ns;
216
- const r = t.split(".");
217
- r.length > 1 && (i = r[0], n = r.splice(1).join("."));
218
- const c = {
223
+ let s = t, i = this.ns;
224
+ const c = t.split(".");
225
+ c.length > 1 && (i = c[0], s = c.splice(1).join("."));
226
+ const o = {
219
227
  fn: e,
220
228
  target: this.target,
221
- key: n,
229
+ key: s,
222
230
  ns: i
223
231
  };
224
- this.platform.actionsState.watchers.push(c);
225
- const a = () => {
226
- const u = this.platform.actionsState.watchers.indexOf(c);
227
- u > -1 && this.platform.actionsState.watchers.splice(u, 1);
232
+ this.platform.actionsState.watchers.push(o);
233
+ const h = () => {
234
+ const l = this.platform.actionsState.watchers.indexOf(o);
235
+ l > -1 && this.platform.actionsState.watchers.splice(l, 1);
228
236
  };
229
- return this.subscriptions.push(a), a;
237
+ return this.subscriptions.push(h), h;
230
238
  }
231
239
  dispose() {
232
240
  this.subscriptions.forEach((t) => t());
233
241
  }
234
242
  }
235
- const wt = W((s) => {
236
- s.createCommand("components", (t) => (e) => {
237
- t.events.subscribeOnce("components:platform-created", (n, { platform: i }) => {
238
- e.handlers && e.handlers.forEach(([r, c]) => {
239
- i.addComponentHandler(r, c);
243
+ const Ct = Y((n) => {
244
+ n.createCommand("components", (t) => (e) => {
245
+ t.events.subscribeOnce("components:platform-created", (s, { platform: i }) => {
246
+ e.handlers && e.handlers.forEach(([c, o]) => {
247
+ i.addComponentHandler(c, o);
240
248
  });
241
249
  });
242
250
  });
243
251
  });
244
- class L {
252
+ class M {
245
253
  constructor(t, e) {
246
- this.events = t, this.tags = [], this.children = {}, this.changesets = [], this.mountCount = 0, this.id = O(), this.type = e, this.attributes = {
254
+ u(this, "id");
255
+ u(this, "type");
256
+ u(this, "name");
257
+ u(this, "parent");
258
+ u(this, "tags", []);
259
+ u(this, "children", {});
260
+ u(this, "changesets", []);
261
+ u(this, "attributes");
262
+ u(this, "mountCount", 0);
263
+ this.events = t, this.id = k(), this.type = e, this.attributes = {
247
264
  context: {},
248
265
  properties: {},
249
266
  layout: {},
@@ -251,10 +268,10 @@ class L {
251
268
  }, this.writeLayout({ size: "full", indent: 0 });
252
269
  }
253
270
  mount(t, e) {
254
- let n = t.get("mounted-nodes");
255
- return n || (n = /* @__PURE__ */ new Map(), t.register("mounted-nodes", n)), n.has(this) ? (process.env.NODE_ENV !== "production" && k.error("Trying to mount an already mounted component node.", this), () => {
271
+ let s = t.get("mounted-nodes");
272
+ return s || (s = /* @__PURE__ */ new Map(), t.register("mounted-nodes", s)), s.has(this) ? (process.env.NODE_ENV !== "production" && $.error("Trying to mount an already mounted component node.", this), () => {
256
273
  }) : (this.events.dispatch("components:node-mounted", { node: this }), this.mountCount === 0 && (this.mountCount = this.mountCount + 1, this.events.dispatch("components:node-enter", { node: this })), () => {
257
- n.delete(this), this.events.dispatch("components:node-unmounted", { node: this }), this.mountCount = this.mountCount - 1, this.mountCount === 0 && this.events.dispatch("components:node-exit", { node: this });
274
+ s.delete(this), this.events.dispatch("components:node-unmounted", { node: this }), this.mountCount = this.mountCount - 1, this.mountCount === 0 && this.events.dispatch("components:node-exit", { node: this });
258
275
  });
259
276
  }
260
277
  appendChild(t, e = "default") {
@@ -273,47 +290,47 @@ class L {
273
290
  }
274
291
  t.parent = this, this.children[e] || (this.children[e] = []), this.children[e].unshift(t), this.events.dispatch("components:node-appended", { node: t });
275
292
  }
276
- touchProperties(t, e = {}, n) {
277
- const r = [{ properties: t }, e];
278
- return this.changesets.push(r), this.events.dispatch("components:set-properties", { node: this }), () => {
279
- if (n) {
280
- const c = this.changesets.indexOf(r);
281
- c > -1 && (this.changesets.splice(c, 1), this.events.dispatch("components:set-properties", { node: this }));
293
+ touchProperties(t, e = {}, s) {
294
+ const c = [{ properties: t }, e];
295
+ return this.changesets.push(c), this.events.dispatch("components:set-properties", { node: this }), () => {
296
+ if (s) {
297
+ const o = this.changesets.indexOf(c);
298
+ o > -1 && (this.changesets.splice(o, 1), this.events.dispatch("components:set-properties", { node: this }));
282
299
  }
283
300
  };
284
301
  }
285
- writeProperties(t, e = {}, n) {
286
- const r = [{ properties: t }, e];
287
- return this.changesets.push(r), this.events.dispatch("components:set-properties", { node: this }), () => {
288
- if (n) {
289
- const c = this.changesets.indexOf(r);
290
- c > -1 && (this.changesets.splice(c, 1), this.events.dispatch("components:set-properties", { node: this }));
302
+ writeProperties(t, e = {}, s) {
303
+ const c = [{ properties: t }, e];
304
+ return this.changesets.push(c), this.events.dispatch("components:set-properties", { node: this }), () => {
305
+ if (s) {
306
+ const o = this.changesets.indexOf(c);
307
+ o > -1 && (this.changesets.splice(o, 1), this.events.dispatch("components:set-properties", { node: this }));
291
308
  }
292
309
  };
293
310
  }
294
- writeLayout(t, e = {}, n) {
295
- const r = [{ layout: t }, e];
296
- return this.changesets.push(r), this.events.dispatch("components:set-layout", { node: this }), () => {
297
- if (!n)
311
+ writeLayout(t, e = {}, s) {
312
+ const c = [{ layout: t }, e];
313
+ return this.changesets.push(c), this.events.dispatch("components:set-layout", { node: this }), () => {
314
+ if (!s)
298
315
  return;
299
- const c = this.changesets.indexOf(r);
300
- c > -1 && (this.changesets.splice(c, 1), this.events.dispatch("components:set-layout", { node: this }));
316
+ const o = this.changesets.indexOf(c);
317
+ o > -1 && (this.changesets.splice(o, 1), this.events.dispatch("components:set-layout", { node: this }));
301
318
  };
302
319
  }
303
- writeContext(t, e = {}, n) {
304
- const r = [{ context: t }, e];
305
- return this.changesets.push(r), this.events.dispatch("components:set-context", { node: this }), () => {
306
- if (!n)
320
+ writeContext(t, e = {}, s) {
321
+ const c = [{ context: t }, e];
322
+ return this.changesets.push(c), this.events.dispatch("components:set-context", { node: this }), () => {
323
+ if (!s)
307
324
  return;
308
- const c = this.changesets.indexOf(r);
309
- c > -1 && (this.changesets.splice(c, 1), this.events.dispatch("components:set-context", { node: this }));
325
+ const o = this.changesets.indexOf(c);
326
+ o > -1 && (this.changesets.splice(o, 1), this.events.dispatch("components:set-context", { node: this }));
310
327
  };
311
328
  }
312
329
  getChildren(t = "default") {
313
330
  const e = this.children[t] || [];
314
- return e.reduce((n, i, r) => {
315
- const { order: c = r } = i.attributes.layout;
316
- return n[c] ? n.splice(c, 0, i) : n[c] = i, n;
331
+ return e.reduce((s, i, c) => {
332
+ const { order: o = c } = i.attributes.layout;
333
+ return s[o] ? s.splice(o, 0, i) : s[o] = i, s;
317
334
  }, Array(e.length));
318
335
  }
319
336
  remove() {
@@ -321,57 +338,60 @@ class L {
321
338
  }
322
339
  removeChild(t) {
323
340
  Object.keys(this.children).forEach((e) => {
324
- const n = this.children[e], i = n.indexOf(t);
325
- i > -1 && (n.splice(i, 1), this.events.dispatch("components:node-removed", { node: t, parentNode: this }));
341
+ const s = this.children[e], i = s.indexOf(t);
342
+ i > -1 && (s.splice(i, 1), this.events.dispatch("components:node-removed", { node: t, parentNode: this }));
326
343
  }), delete t.parent;
327
344
  }
328
345
  }
329
- const B = (s, t, e) => {
330
- for (let n = 0, i = s.length; n < i && e(s[n]) !== !0; n++) {
331
- const r = t[s[n].id] || "default", c = s[n].getChildren(r);
332
- B(c, t, e);
346
+ const j = (n, t, e) => {
347
+ for (let s = 0, i = n.length; s < i && e(n[s]) !== !0; s++) {
348
+ const c = t[n[s].id] || "default", o = n[s].getChildren(c);
349
+ j(o, t, e);
333
350
  }
334
- }, R = (s, t, e) => {
335
- if (e(s) !== !0) {
336
- const n = t[s.id] || "default", i = s.children[n];
337
- B(i, t, e);
351
+ }, T = (n, t, e) => {
352
+ if (e(n) !== !0) {
353
+ const s = t[n.id] || "default", i = n.children[s];
354
+ j(i, t, e);
338
355
  }
339
- }, w = (s, t) => {
356
+ }, E = (n, t) => {
340
357
  const e = [];
341
- return R(s, t, (n) => {
342
- e.push(n);
358
+ return T(n, t, (s) => {
359
+ e.push(s);
343
360
  }), e;
344
- }, nt = (s, t, e) => {
345
- let n;
346
- return R(s, t, (i) => {
361
+ }, ot = (n, t, e) => {
362
+ let s;
363
+ return T(n, t, (i) => {
347
364
  if (e(i))
348
- return n = i, !0;
349
- }), n;
365
+ return s = i, !0;
366
+ }), s;
350
367
  };
351
- class it {
352
- constructor(t, e, n) {
353
- this.root = t, this.switches = e, this.all = [], this.visible = [], this.detached = [], n.subscribe("components:node-appended", (i, r) => {
354
- this.all.push(r.node), this.visible = w(t, e);
355
- }), n.subscribe("components:node-removed", (i, r) => {
356
- let c = this.all.indexOf(r.node);
357
- c > -1 && this.all.splice(c, 1), c = this.visible.indexOf(r.node), c > -1 && this.visible.splice(c, 1), this.visible = w(t, e);
358
- }), n.subscribe("components:node-switched", (i, r) => {
359
- this.visible = w(t, e);
368
+ class rt {
369
+ constructor(t, e, s) {
370
+ u(this, "all", []);
371
+ u(this, "visible", []);
372
+ u(this, "detached", []);
373
+ this.root = t, this.switches = e, s.subscribe("components:node-appended", (i, c) => {
374
+ this.all.push(c.node), this.visible = E(t, e);
375
+ }), s.subscribe("components:node-removed", (i, c) => {
376
+ let o = this.all.indexOf(c.node);
377
+ o > -1 && this.all.splice(o, 1), o = this.visible.indexOf(c.node), o > -1 && this.visible.splice(o, 1), this.visible = E(t, e);
378
+ }), s.subscribe("components:node-switched", (i, c) => {
379
+ this.visible = E(t, e);
360
380
  });
361
381
  }
362
382
  query(t = {}) {
363
383
  const e = [];
364
- return R(this.root, this.switches, (n) => {
365
- Object.keys(t).every((r) => t[r] === n[r]) && e.push(n);
384
+ return T(this.root, this.switches, (s) => {
385
+ Object.keys(t).every((c) => t[c] === s[c]) && e.push(s);
366
386
  }), e;
367
387
  }
368
388
  get(t) {
369
- return nt(this.root, this.switches, (e) => e.id === t) || this.detached.find((e) => e.id === t);
389
+ return ot(this.root, this.switches, (e) => e.id === t) || this.detached.find((e) => e.id === t);
370
390
  }
371
391
  }
372
- class ot {
392
+ class ct {
373
393
  constructor() {
374
- this.handlers = /* @__PURE__ */ new Map();
394
+ u(this, "handlers", /* @__PURE__ */ new Map());
375
395
  }
376
396
  add(t, e) {
377
397
  this.handlers.set(t, e);
@@ -380,134 +400,143 @@ class ot {
380
400
  return this.handlers.get(t);
381
401
  }
382
402
  }
383
- const rt = (s) => {
384
- let t = s, e = 0;
403
+ const at = (n) => {
404
+ let t = n, e = 0;
385
405
  for (; t.parent; )
386
406
  e = e + 1, t = t.parent;
387
407
  return e;
388
- }, ct = (s) => s.map(([e, n]) => [rt(e), e, n]).sort(([e], [n]) => e - n).map(([, e, n]) => [e, n]), C = (s) => s instanceof Date ? !1 : s && typeof s == "object" && !Array.isArray(s), v = (s, ...t) => {
408
+ }, ht = (n) => n.map(([e, s]) => [at(e), e, s]).sort(([e], [s]) => e - s).map(([, e, s]) => [e, s]), O = (n) => n instanceof Date ? !1 : n && typeof n == "object" && !Array.isArray(n), v = (n, ...t) => {
389
409
  if (!t.length)
390
- return s;
410
+ return n;
391
411
  const e = t.shift();
392
- if (C(s) && C(e))
393
- for (const n in e)
394
- C(e[n]) ? (s[n] || Object.assign(s, { [n]: {} }), v(s[n], e[n])) : Object.assign(s, { [n]: e[n] });
395
- return v(s, ...t);
396
- }, ht = (s, t) => !s || s === "all" ? !0 : s.some((e) => t.indexOf(e) > -1), at = (s, t) => {
397
- let e = [], n = [], i;
398
- const r = () => {
412
+ if (O(n) && O(e))
413
+ for (const s in e)
414
+ O(e[s]) ? (n[s] || Object.assign(n, { [s]: {} }), v(n[s], e[s])) : Object.assign(n, { [s]: e[s] });
415
+ return v(n, ...t);
416
+ }, pt = (n, t) => !n || n === "all" ? !0 : n.some((e) => t.indexOf(e) > -1), ut = (n, t) => {
417
+ let e = [], s = [], i;
418
+ const c = () => {
399
419
  process.env.NODE_ENV !== "production" && console.time("state-processor.flush");
400
- const a = /* @__PURE__ */ new Map(), u = ct(e.map((o, p) => [o, n[p]])), h = (o, p) => {
401
- var I;
402
- const l = a.get(o) || {}, d = p.context && !l.context, b = p.properties && !l.properties, g = p.layout && !l.layout;
403
- a.set(o, {
404
- context: l.context || d,
405
- properties: l.properties || b,
406
- layout: l.layout || g
407
- }), b && (o.attributes.properties = {}), g && (o.attributes.layout = {}), d && (o.attributes.context = v({}, (I = o.parent) == null ? void 0 : I.attributes.context));
408
- const $ = [], A = [], T = [];
409
- if (o.changesets.forEach((f) => {
410
- const [m, x] = f;
411
- ht(x.breakpoints, s.breakpoints) && (b && (typeof m.properties == "function" ? $.push(
420
+ const h = /* @__PURE__ */ new Map(), l = ht(e.map((r, p) => [r, s[p]])), a = (r, p) => {
421
+ var _;
422
+ const d = h.get(r) || {}, f = p.context && !d.context, g = p.properties && !d.properties, y = p.layout && !d.layout;
423
+ h.set(r, {
424
+ context: d.context || f,
425
+ properties: d.properties || g,
426
+ layout: d.layout || y
427
+ }), g && (r.attributes.properties = {}), y && (r.attributes.layout = {}), f && (r.attributes.context = v({}, (_ = r.parent) == null ? void 0 : _.attributes.context));
428
+ const D = [], S = [], L = [];
429
+ if (r.changesets.forEach((b) => {
430
+ const [m, w] = b;
431
+ pt(w.breakpoints, n.breakpoints) && (g && (typeof m.properties == "function" ? D.push(
412
432
  m.properties
413
- ) : v(o.attributes.properties, m.properties)), g && (typeof m.layout == "function" ? A.push(m.layout) : v(o.attributes.layout, m.layout)), d && (typeof m.context == "function" ? T.push(m.context) : v(o.attributes.context, m.context)));
414
- }), $.forEach((f) => {
415
- v(o.attributes.properties, f(o.attributes.properties));
416
- }), A.forEach((f) => {
417
- v(o.attributes.layout, f(o.attributes.layout));
418
- }), T.forEach((f) => {
419
- v(o.attributes.context, f(o.attributes.context));
420
- }), d || p.recursive) {
421
- const f = s.getBranch(o), m = p.recursive ? p : {
422
- context: !!d
433
+ ) : v(r.attributes.properties, m.properties)), y && (typeof m.layout == "function" ? S.push(m.layout) : v(r.attributes.layout, m.layout)), f && (typeof m.context == "function" ? L.push(m.context) : v(r.attributes.context, m.context)));
434
+ }), D.forEach((b) => {
435
+ v(r.attributes.properties, b(r.attributes.properties));
436
+ }), S.forEach((b) => {
437
+ v(r.attributes.layout, b(r.attributes.layout));
438
+ }), L.forEach((b) => {
439
+ v(r.attributes.context, b(r.attributes.context));
440
+ }), f || p.recursive) {
441
+ const b = n.getBranch(r), m = p.recursive ? p : {
442
+ context: !!f
423
443
  };
424
- o.getChildren(f).forEach((x) => {
425
- h(x, m);
444
+ r.getChildren(b).forEach((w) => {
445
+ a(w, m);
426
446
  });
427
447
  }
428
448
  };
429
- process.env.NODE_ENV !== "production" && console.timeEnd("state-processor.flush"), u.forEach(([o, p]) => {
430
- h(o, p);
431
- }), e = [], n = [], t(a);
432
- }, c = () => {
433
- clearTimeout(i), i = setTimeout(r, 0);
449
+ process.env.NODE_ENV !== "production" && console.timeEnd("state-processor.flush"), l.forEach(([r, p]) => {
450
+ a(r, p);
451
+ }), e = [], s = [], t(h);
452
+ }, o = () => {
453
+ clearTimeout(i), i = setTimeout(c, 0);
434
454
  };
435
- return (a, u) => {
436
- const h = e.indexOf(a);
437
- if (h > -1) {
438
- const o = n[h];
439
- return u.context && (o.context = !0), u.properties && (o.properties = !0), u.layout && (o.layout = !0), u.recursive && (o.recursive = !0), c();
455
+ return (h, l) => {
456
+ const a = e.indexOf(h);
457
+ if (a > -1) {
458
+ const r = s[a];
459
+ return l.context && (r.context = !0), l.properties && (r.properties = !0), l.layout && (r.layout = !0), l.recursive && (r.recursive = !0), o();
440
460
  }
441
- return e.push(a), n.push(u), c();
461
+ return e.push(h), s.push(l), o();
442
462
  };
443
463
  };
444
- class pt {
464
+ class lt {
445
465
  constructor(t, e = {}) {
446
- this.providers = e, this.breakpoints = [], this.actionsState = { handlers: [], watchers: [] }, this.switches = {}, this.changesets = [], this.subscriptions = [], this.customComponentHandler = new ot(), this.events = t.events.createChild(this);
447
- const n = new L(this.events, "root");
448
- n.name = `root-${t.name}`, this.nodes = new it(n, this.switches, this.events);
449
- const i = this.processNode = at(this, (r) => {
450
- const c = Array.from(r.keys());
451
- process.env.NODE_ENV !== "production" && console.info(`STATE PROCESSOR: ${c.length} node(s) processed:
452
- ${c.map(
453
- (a) => `${a.name || "<no name>"} (${a.id})
466
+ u(this, "events");
467
+ u(this, "breakpoints", []);
468
+ u(this, "nodes");
469
+ u(this, "actionsState", { handlers: [], watchers: [] });
470
+ u(this, "switches", {});
471
+ u(this, "changesets", []);
472
+ u(this, "subscriptions", []);
473
+ u(this, "processNode");
474
+ u(this, "customComponentHandler", new ct());
475
+ this.providers = e, this.events = t.events.createChild(this);
476
+ const s = new M(this.events, "root");
477
+ s.name = `root-${t.name}`, this.nodes = new rt(s, this.switches, this.events);
478
+ const i = this.processNode = ut(this, (c) => {
479
+ const o = Array.from(c.keys());
480
+ process.env.NODE_ENV !== "production" && console.info(`STATE PROCESSOR: ${o.length} node(s) processed:
481
+ ${o.map(
482
+ (h) => `${h.name || "<no name>"} (${h.id})
454
483
  `
455
- )}`), c.forEach((a) => {
456
- const u = r.get(a);
457
- a.parent && a.parent.type === "root" && this.events.dispatch("components:root-children-changed", { node: a }), u != null && u.context && this.events.dispatch("components:context-changed", { node: a }), u != null && u.properties && this.events.dispatch("components:properties-changed", { node: a }), u != null && u.layout && this.events.dispatch("components:layout-changed", { node: a });
484
+ )}`), o.forEach((h) => {
485
+ const l = c.get(h);
486
+ h.parent && h.parent.type === "root" && this.events.dispatch("components:root-children-changed", { node: h }), l != null && l.context && this.events.dispatch("components:context-changed", { node: h }), l != null && l.properties && this.events.dispatch("components:properties-changed", { node: h }), l != null && l.layout && this.events.dispatch("components:layout-changed", { node: h });
458
487
  }), this.events.dispatch("components:component-model-initialized", {}, { bubbles: !0 });
459
488
  });
460
489
  Promise.all(
461
- Object.keys(e).map((r) => e[r].load(this))
490
+ Object.keys(e).map((c) => e[c].load(this))
462
491
  ), this.subscriptions.push(
463
492
  this.events.subscribe(
464
493
  "components:node-appended",
465
- (r, c) => {
466
- const { node: a } = c;
467
- this.changesets.forEach((u) => {
468
- const { changeset: h, target: o, removes: p } = u, [l, d] = h;
469
- o.match(c.node) && (l.properties && p.push(a.writeProperties(l.properties, d)), l.context && p.push(a.writeContext(l.context, d)), l.layout && p.push(a.writeLayout(l.layout, d)));
494
+ (c, o) => {
495
+ const { node: h } = o;
496
+ this.changesets.forEach((l) => {
497
+ const { changeset: a, target: r, removes: p } = l, [d, f] = a;
498
+ r.match(o.node) && (d.properties && p.push(h.writeProperties(d.properties, f)), d.context && p.push(h.writeContext(d.context, f)), d.layout && p.push(h.writeLayout(d.layout, f)));
470
499
  });
471
500
  }
472
501
  )
473
502
  ), this.subscriptions.push(
474
503
  this.events.subscribe(
475
504
  "components:node-appended",
476
- (r, c) => {
477
- i(c.node, { properties: !0, context: !0 });
505
+ (c, o) => {
506
+ i(o.node, { properties: !0, context: !0 });
478
507
  }
479
508
  )
480
509
  ), this.subscriptions.push(
481
510
  this.events.subscribe(
482
511
  "components:set-properties",
483
- (r, c) => {
484
- i(c.node, { properties: !0 });
512
+ (c, o) => {
513
+ i(o.node, { properties: !0 });
485
514
  }
486
515
  )
487
516
  ), this.subscriptions.push(
488
517
  this.events.subscribe(
489
518
  "components:set-context",
490
- (r, c) => {
491
- i(c.node, { properties: !0, context: !0 });
519
+ (c, o) => {
520
+ i(o.node, { properties: !0, context: !0 });
492
521
  }
493
522
  )
494
523
  ), this.subscriptions.push(
495
524
  this.events.subscribe(
496
525
  "components:set-indent",
497
- (r, c) => {
498
- i(c.node, { layout: !0 });
526
+ (c, o) => {
527
+ i(o.node, { layout: !0 });
499
528
  }
500
529
  )
501
530
  ), this.subscriptions.push(
502
531
  this.events.subscribe(
503
532
  "components:set-layout",
504
- (r, c) => {
505
- i(c.node, { layout: !0 });
533
+ (c, o) => {
534
+ i(o.node, { layout: !0 });
506
535
  }
507
536
  )
508
537
  ), this.subscriptions.push(
509
- this.events.subscribe("components:node-switched", (r, { node: c, branch: a }) => {
510
- i(c, {
538
+ this.events.subscribe("components:node-switched", (c, { node: o, branch: h }) => {
539
+ i(o, {
511
540
  layout: !0,
512
541
  recursive: !0,
513
542
  properties: !0,
@@ -515,8 +544,8 @@ ${c.map(
515
544
  });
516
545
  })
517
546
  ), this.subscriptions.push(
518
- this.events.subscribe("components:node-removed", (r, { parentNode: c }) => {
519
- i(c, { properties: !0 });
547
+ this.events.subscribe("components:node-removed", (c, { parentNode: o }) => {
548
+ i(o, { properties: !0 });
520
549
  })
521
550
  ), this.events.parent && this.events.parent.dispatch("components:platform-created", { platform: this });
522
551
  }
@@ -547,34 +576,34 @@ ${c.map(
547
576
  return this.switches[t.id];
548
577
  }
549
578
  createNode(t, e = {}) {
550
- const n = new L(this.events, t);
551
- return e.detached && this.nodes.detached.push(n), n;
579
+ const s = new M(this.events, t);
580
+ return e.detached && this.nodes.detached.push(s), s;
552
581
  }
553
582
  components() {
554
- return new N(this);
583
+ return new R(this);
555
584
  }
556
585
  actions(t, e) {
557
- return new P(this, t, e);
586
+ return new A(this, t, e);
558
587
  }
559
588
  write(t) {
560
- const { provider: e, target: n, attributes: i, options: r = {}, removable: c } = t, a = t.key || O(), h = { changeset: [i, r], target: n, removes: [] };
589
+ const { provider: e, target: s, attributes: i, options: c = {}, removable: o } = t, h = t.key || k(), a = { changeset: [i, c], target: s, removes: [] };
561
590
  if (e) {
562
- const o = this.providers[e];
563
- o.write(a, n, i, r), h.removes.push(() => {
564
- o.remove(a);
591
+ const r = this.providers[e];
592
+ r.write(h, s, i, c), a.removes.push(() => {
593
+ r.remove(h);
565
594
  });
566
595
  }
567
- return this.changesets.push(h), this.nodes.all.forEach((o) => {
568
- if (n.match(o)) {
596
+ return this.changesets.push(a), this.nodes.all.forEach((r) => {
597
+ if (s.match(r)) {
569
598
  let p = () => {
570
599
  };
571
- i.properties && (p = o.writeProperties(i.properties, r, c)), i.context && (p = o.writeContext(i.context, r, c)), i.layout && (p = o.writeContext(i.layout, r, c)), h.removes.push(p);
600
+ i.properties && (p = r.writeProperties(i.properties, c, o)), i.context && (p = r.writeContext(i.context, c, o)), i.layout && (p = r.writeContext(i.layout, c, o)), a.removes.push(p);
572
601
  }
573
602
  }), () => {
574
- if (c) {
575
- h.removes.forEach((p) => p());
576
- const o = this.changesets.indexOf(h);
577
- o > -1 && this.changesets.splice(o, 1);
603
+ if (o) {
604
+ a.removes.forEach((p) => p());
605
+ const r = this.changesets.indexOf(a);
606
+ r > -1 && this.changesets.splice(r, 1);
578
607
  }
579
608
  };
580
609
  }
@@ -588,113 +617,119 @@ ${c.map(
588
617
  this.subscriptions.forEach((t) => t());
589
618
  }
590
619
  }
591
- const ut = (s) => {
592
- if (Array.isArray(s)) {
593
- const [t, ...e] = s;
620
+ const dt = (n) => {
621
+ if (Array.isArray(n)) {
622
+ const [t, ...e] = n;
594
623
  return {
595
624
  definitionId: t,
596
625
  overrides: e
597
626
  };
598
627
  }
599
628
  return {
600
- definitionId: s,
629
+ definitionId: n,
601
630
  overrides: []
602
631
  };
603
- }, E = (s, t, e, n, i, r) => {
604
- e.forEach((c) => {
605
- const a = ut(c), u = n[a.definitionId];
606
- if (a.definitionId === "view") {
607
- const h = s.createNode("view");
608
- h.name = "view", Object.keys(i).forEach((o) => {
609
- const p = i[o];
610
- E(s, h, [p.entry], n, i, o);
611
- }), t.appendChild(h), a.overrides.forEach((o) => {
612
- o.properties && h.writeProperties(o.properties, {
613
- breakpoints: o.breakpoints
614
- }), o.context && h.writeContext(o.context, { breakpoints: o.breakpoints }), o.layout && h.writeLayout(o.layout, { breakpoints: o.breakpoints });
632
+ }, P = (n, t, e, s, i, c) => {
633
+ e.forEach((o) => {
634
+ const h = dt(o), l = s[h.definitionId];
635
+ if (h.definitionId === "view") {
636
+ const a = n.createNode("view");
637
+ a.name = "view", Object.keys(i).forEach((r) => {
638
+ const p = i[r];
639
+ P(n, a, [p.entry], s, i, r);
640
+ }), t.appendChild(a), h.overrides.forEach((r) => {
641
+ r.properties && a.writeProperties(r.properties, {
642
+ breakpoints: r.breakpoints
643
+ }), r.context && a.writeContext(r.context, { breakpoints: r.breakpoints }), r.layout && a.writeLayout(r.layout, { breakpoints: r.breakpoints });
615
644
  });
616
- } else if (s.getComponentHandler(u.type)) {
617
- const h = s.getComponentHandler(u.type);
618
- h && h(a, {
619
- platform: s,
645
+ } else if (n.getComponentHandler(l.type)) {
646
+ const a = n.getComponentHandler(l.type);
647
+ a && a(h, {
648
+ platform: n,
620
649
  node: t,
621
650
  references: e,
622
- definitions: n,
651
+ definitions: s,
623
652
  views: i,
624
- branch: r
653
+ branch: c
625
654
  });
626
655
  } else {
627
- const h = n[a.definitionId];
628
- if (process.env.NODE_ENV !== "production" && !h) {
629
- k.error(
630
- `No definition found for component type '${a.definitionId}'.`
656
+ const a = s[h.definitionId];
657
+ if (process.env.NODE_ENV !== "production" && !a) {
658
+ $.error(
659
+ `No definition found for component type '${h.definitionId}'.`
631
660
  );
632
661
  return;
633
662
  }
634
- const o = s.createNode(h.type);
635
- o.name = a.definitionId, o.tags = h.tags || [], h.properties && o.writeProperties(h.properties), h.context && o.writeContext(h.context), h.layout && o.writeLayout(h.layout), t.appendChild(o, r), a.overrides.forEach((p) => {
636
- const l = { breakpoints: p.breakpoints };
637
- p.properties && o.writeProperties(p.properties, l), p.context && o.writeContext(p.context, l), p.layout && o.writeLayout(p.layout, l);
638
- }), h.children && E(s, o, h.children, n, i);
663
+ const r = n.createNode(a.type);
664
+ r.name = h.definitionId, r.tags = a.tags || [], a.properties && r.writeProperties(a.properties), a.context && r.writeContext(a.context), a.layout && r.writeLayout(a.layout), t.appendChild(r, c), h.overrides.forEach((p) => {
665
+ const d = { breakpoints: p.breakpoints };
666
+ p.properties && r.writeProperties(p.properties, d), p.context && r.writeContext(p.context, d), p.layout && r.writeLayout(p.layout, d);
667
+ }), a.children && P(n, r, a.children, s, i);
639
668
  }
640
669
  });
641
- }, Ct = (s, t) => {
642
- const { entry: e, components: n, breakpoints: i, views: r } = t, c = [];
643
- return Object.keys(i).forEach((a) => {
644
- const u = i[a], h = window.matchMedia(u);
645
- h.matches && s.breakpoints.push(a);
646
- const o = (p) => {
647
- p.matches ? s.addBreakpoint(a) : s.removeBreakpoint(a);
670
+ }, Et = (n, t) => {
671
+ const { entry: e, components: s, breakpoints: i, views: c } = t, o = [];
672
+ return Object.keys(i).forEach((h) => {
673
+ const l = i[h], a = window.matchMedia(l);
674
+ a.matches && n.breakpoints.push(h);
675
+ const r = (p) => {
676
+ p.matches ? n.addBreakpoint(h) : n.removeBreakpoint(h);
648
677
  };
649
- h.addListener(o), c.push(() => h.removeListener(o));
650
- }), E(s, s.nodes.root, [e], n, r), () => c.forEach((a) => {
651
- a();
678
+ a.addListener(r), o.push(() => a.removeListener(r));
679
+ }), P(n, n.nodes.root, [e], s, c), () => o.forEach((h) => {
680
+ h();
652
681
  });
653
- }, Et = (s, t) => ({
654
- id: s.id,
655
- type: s.type,
656
- name: s.name,
682
+ }, Ot = (n, t) => ({
683
+ id: n.id,
684
+ type: n.type,
685
+ name: n.name,
657
686
  branch: t || "default"
658
- }), Ot = (s, t, e, n = O(), i = {}) => s.getAsync("components").then((r) => {
659
- let c;
687
+ }), Nt = (n, t, e, s = k(), i = {}) => n.getAsync("components").then((c) => {
688
+ let o;
660
689
  if (typeof t == "string") {
661
- const h = new N(r);
662
- h.ofType(t), c = h;
690
+ const a = new R(c);
691
+ a.ofType(t), o = a;
663
692
  } else
664
- c = t;
665
- const a = {}, u = (h) => {
666
- const o = a[h.id];
667
- return o ? Promise.resolve(o.controller) : pt.getInstance(s).then((p) => new H(p, h, n));
693
+ o = t;
694
+ const h = {}, l = (a) => {
695
+ const r = h[a.id];
696
+ return r ? Promise.resolve(r.controller) : lt.getInstance(n).then((p) => new V(p, a, s));
668
697
  };
669
- r.events.subscribe(
698
+ c.events.subscribe(
670
699
  "components:node-enter",
671
- (h, { node: o }) => {
672
- c.match(o) && u(o).then((p) => {
673
- Promise.resolve(e(p)).then((l) => {
674
- a[o.id] = {
675
- dispose: l,
700
+ (a, { node: r }) => {
701
+ o.match(r) && l(r).then((p) => {
702
+ Promise.resolve(e(p)).then((d) => {
703
+ h[r.id] = {
704
+ dispose: d,
676
705
  controller: p
677
706
  };
678
707
  });
679
708
  });
680
709
  }
681
- ), r.events.subscribe(
710
+ ), c.events.subscribe(
682
711
  "components:node-exit",
683
- (h, { node: o }) => {
684
- const p = a[o.id];
685
- p && (p.dispose && p.dispose(), i.reuseController || (p.controller.dispose(), delete a[o.id]));
712
+ (a, { node: r }) => {
713
+ const p = h[r.id];
714
+ p && (p.dispose && p.dispose(), i.reuseController || (p.controller.dispose(), delete h[r.id]));
686
715
  }
687
716
  );
688
717
  });
689
- class kt {
718
+ class Pt {
690
719
  constructor(t) {
691
- this.aliases = /* @__PURE__ */ new Map(), this.components = /* @__PURE__ */ new Map(), this.logger = new k();
720
+ u(this, "aliases", /* @__PURE__ */ new Map());
721
+ u(this, "components", /* @__PURE__ */ new Map());
722
+ u(this, "events");
723
+ u(this, "logger", new $());
692
724
  const { events: e } = t.get("$widget");
693
725
  this.events = e;
694
726
  }
695
727
  getComponent(t) {
696
- const e = this.aliases.get(t);
697
- return this.components.get(e || t) || null;
728
+ const e = this.aliases.get(t), s = this.components.get(e || t) || null;
729
+ return process.env.NODE_ENV !== "production" && (s || this.logger.warn(
730
+ e || t,
731
+ `Unable to resolve component: "${e || t}". You most likely forgot to register the required plugin for: ${e || t}.`
732
+ )), s;
698
733
  }
699
734
  registerComponent(t, e) {
700
735
  return this.components.set(t, e), this.events.dispatch("component-resolver:resolve", t), () => {
@@ -702,10 +737,10 @@ class kt {
702
737
  };
703
738
  }
704
739
  registerResolver(t, e) {
705
- return this.events.subscribe("component-resolver:resolve", (n, i) => {
740
+ return this.events.subscribe("component-resolver:resolve", (s, i) => {
706
741
  if (i === t) {
707
- const r = this.getComponent(t);
708
- e(r);
742
+ const c = this.getComponent(t);
743
+ e(c);
709
744
  }
710
745
  });
711
746
  }
@@ -715,81 +750,82 @@ class kt {
715
750
  };
716
751
  }
717
752
  }
718
- const lt = "04c9d64", M = class extends U {
719
- constructor(s, t = []) {
720
- super(s, t, {
721
- transformPluginSettings: (e, n, i) => {
722
- const r = i.get("$settings"), c = r.plugins && n ? r.plugins[n] || {} : {};
723
- return y(y({}, c), e);
753
+ const ft = "7270eae", I = class extends J {
754
+ constructor(t, e = []) {
755
+ super(t, e, {
756
+ transformPluginSettings: (s, i, c) => {
757
+ const o = c.get("$settings"), h = o.plugins && i ? o.plugins[i] || {} : {};
758
+ return x(x({}, h), s);
724
759
  }
725
760
  });
726
761
  }
727
- createImplementation(s) {
728
- const t = super.createImplementation(s);
729
- return t.bindings = s.bindings, t;
762
+ createImplementation(t) {
763
+ const e = super.createImplementation(t);
764
+ return e.bindings = t.bindings, e;
730
765
  }
731
- navigate(s, t, e) {
732
- this.widgets.query(s).forEach((n) => n.invoke("navigate", { route: t, params: e }));
766
+ navigate(t, e, s) {
767
+ this.widgets.query(t).forEach((i) => i.invoke("navigate", { route: e, params: s }));
733
768
  }
734
- static create(s = {}) {
735
- const t = [G].concat(
736
- s.configurationApiExtensions || []
769
+ static create(t = {}) {
770
+ const e = [U].concat(
771
+ t.configurationApiExtensions || []
737
772
  );
738
- return new M("humany", t);
773
+ return new I("humany", e);
739
774
  }
740
- static createFromGlobal(s, t = {}) {
741
- if (this.isRuntime(s))
742
- return s.patch(t), s;
743
- const e = [], n = s && s._c;
744
- n && n.forEach((r) => e.push(r));
745
- const i = this.create(t);
746
- return i.container.register("$runtimecfg", e), i;
775
+ static createFromGlobal(t, e = {}) {
776
+ if (this.isRuntime(t))
777
+ return t.patch(e), t;
778
+ const s = [], i = t && t._c;
779
+ i && i.forEach((o) => s.push(o));
780
+ const c = this.create(e);
781
+ return c.container.register("$runtimecfg", s), c;
747
782
  }
748
- static isRuntime(s) {
749
- return !!(s && typeof s == "object" && s.container && typeof s.container.get == "function" && s.container.get("$environment") === s && s.container.owner === s);
783
+ static isRuntime(t) {
784
+ return !!(t && typeof t == "object" && t.container && typeof t.container.get == "function" && t.container.get("$environment") === t && t.container.owner === t);
750
785
  }
751
786
  };
752
- let dt = M;
753
- dt.version = `${lt} (${J})`;
754
- class Nt extends X {
787
+ let N = I;
788
+ u(N, "version", `${ft} (${X})`);
789
+ class kt extends Z {
755
790
  constructor() {
756
- super(...arguments), this.bindings = [];
791
+ super(...arguments);
792
+ u(this, "bindings", []);
757
793
  }
758
794
  }
759
- class Pt extends Y {
795
+ class $t extends tt {
760
796
  constructor(t, e) {
761
797
  super(t, e);
762
798
  }
763
799
  }
764
- var mt = /* @__PURE__ */ ((s) => (s.open = "open", s.closed = "closed", s.hidden = "hidden", s))(mt || {});
765
- class Rt extends Z {
800
+ var mt = /* @__PURE__ */ ((n) => (n.open = "open", n.closed = "closed", n.hidden = "hidden", n))(mt || {});
801
+ class Rt extends et {
766
802
  constructor(t) {
767
803
  super(t);
768
804
  }
769
805
  }
770
806
  export {
771
- yt as ActionResolver,
772
- P as ActionsController,
773
- L as ComponentNode,
774
- H as ComponentNodeController,
775
- pt as ComponentPlatform,
776
- N as ComponentQuery,
777
- kt as ComponentResolver,
778
- dt as Environment,
779
- Nt as Implementation,
780
- Pt as Plugin,
807
+ xt as ActionResolver,
808
+ A as ActionsController,
809
+ M as ComponentNode,
810
+ V as ComponentNodeController,
811
+ lt as ComponentPlatform,
812
+ R as ComponentQuery,
813
+ Pt as ComponentResolver,
814
+ N as Environment,
815
+ kt as Implementation,
816
+ $t as Plugin,
781
817
  mt as WidgetRenderState,
782
818
  Rt as WidgetType,
783
- Et as asDescriptor,
784
- xt as bootstrap,
785
- wt as componentConfigurationApi,
786
- E as createChildren,
787
- Ct as createComponentModel,
788
- tt as createEventSubscriber,
789
- Ot as extendComponent,
790
- nt as findComponent,
791
- w as findVisibleComponents,
792
- R as traverseComponents,
793
- lt as version
819
+ Ot as asDescriptor,
820
+ wt as bootstrap,
821
+ Ct as componentConfigurationApi,
822
+ P as createChildren,
823
+ Et as createComponentModel,
824
+ st as createEventSubscriber,
825
+ Nt as extendComponent,
826
+ ot as findComponent,
827
+ E as findVisibleComponents,
828
+ T as traverseComponents,
829
+ ft as version
794
830
  };
795
831
  //# sourceMappingURL=index.js.map